@wavelengthusaf/components 3.3.10 → 3.4.0

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.
@@ -7,6 +7,10 @@ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
7
  var __commonJS = (cb, mod) => function __require() {
8
8
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
9
  };
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
10
14
  var __copyProps = (to, from, except, desc) => {
11
15
  if (from && typeof from === "object" || typeof from === "function") {
12
16
  for (let key of __getOwnPropNames(from))
@@ -989,7 +993,7 @@ var require_react_is_production = __commonJS({
989
993
  var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
990
994
  var REACT_MEMO_TYPE = Symbol.for("react.memo");
991
995
  var REACT_LAZY_TYPE = Symbol.for("react.lazy");
992
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
996
+ var REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition");
993
997
  var REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
994
998
  function typeOf(object) {
995
999
  if ("object" === typeof object && null !== object) {
@@ -1002,6 +1006,7 @@ var require_react_is_production = __commonJS({
1002
1006
  case REACT_STRICT_MODE_TYPE:
1003
1007
  case REACT_SUSPENSE_TYPE:
1004
1008
  case REACT_SUSPENSE_LIST_TYPE:
1009
+ case REACT_VIEW_TRANSITION_TYPE:
1005
1010
  return object;
1006
1011
  default:
1007
1012
  switch (object = object && object.$$typeof, object) {
@@ -1070,7 +1075,7 @@ var require_react_is_production = __commonJS({
1070
1075
  return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
1071
1076
  };
1072
1077
  exports.isValidElementType = function(type) {
1073
- return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
1078
+ return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
1074
1079
  };
1075
1080
  exports.typeOf = typeOf;
1076
1081
  }
@@ -1080,7 +1085,7 @@ var require_react_is_production = __commonJS({
1080
1085
  var require_react_is_development2 = __commonJS({
1081
1086
  "../../node_modules/react-is/cjs/react-is.development.js"(exports) {
1082
1087
  "use strict";
1083
- "production" !== process.env.NODE_ENV && function() {
1088
+ "production" !== process.env.NODE_ENV && (function() {
1084
1089
  function typeOf(object) {
1085
1090
  if ("object" === typeof object && null !== object) {
1086
1091
  var $$typeof = object.$$typeof;
@@ -1092,6 +1097,7 @@ var require_react_is_development2 = __commonJS({
1092
1097
  case REACT_STRICT_MODE_TYPE:
1093
1098
  case REACT_SUSPENSE_TYPE:
1094
1099
  case REACT_SUSPENSE_LIST_TYPE:
1100
+ case REACT_VIEW_TRANSITION_TYPE:
1095
1101
  return object;
1096
1102
  default:
1097
1103
  switch (object = object && object.$$typeof, object) {
@@ -1113,7 +1119,7 @@ var require_react_is_development2 = __commonJS({
1113
1119
  }
1114
1120
  var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1115
1121
  Symbol.for("react.provider");
1116
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
1122
+ var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
1117
1123
  exports.ContextConsumer = REACT_CONSUMER_TYPE;
1118
1124
  exports.ContextProvider = REACT_CONTEXT_TYPE;
1119
1125
  exports.Element = REACT_ELEMENT_TYPE;
@@ -1163,10 +1169,10 @@ var require_react_is_development2 = __commonJS({
1163
1169
  return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
1164
1170
  };
1165
1171
  exports.isValidElementType = function(type) {
1166
- return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_OFFSCREEN_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
1172
+ return "string" === typeof type || "function" === typeof type || type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type && null !== type && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type.getModuleId) ? true : false;
1167
1173
  };
1168
1174
  exports.typeOf = typeOf;
1169
- }();
1175
+ })();
1170
1176
  }
1171
1177
  });
1172
1178
 
@@ -1481,90 +1487,2930 @@ var WavelengthButton = class extends HTMLElement {
1481
1487
  this.button.style.border = `0.063rem solid ${colorOne}`;
1482
1488
  this.button.style.boxShadow = boxShadow || "none";
1483
1489
  } else {
1484
- this.button.style.backgroundColor = "transparent";
1485
- this.button.style.color = colorOne;
1486
- this.button.style.border = "none";
1487
- this.button.style.boxShadow = boxShadow || "none";
1490
+ this.button.style.backgroundColor = "transparent";
1491
+ this.button.style.color = colorOne;
1492
+ this.button.style.border = "none";
1493
+ this.button.style.boxShadow = boxShadow || "none";
1494
+ }
1495
+ if (href && !disabled) {
1496
+ this.button.onclick = () => window.open(href, target);
1497
+ this.button.style.cursor = "pointer";
1498
+ } else {
1499
+ this.button.onclick = null;
1500
+ }
1501
+ this.button.removeEventListener("mouseenter", this.handleHoverIn);
1502
+ this.button.removeEventListener("mouseleave", this.handleHoverOut);
1503
+ this.handleHoverIn = () => {
1504
+ if (variant === "contained") {
1505
+ this.button.style.backgroundColor = this.shadeColor(colorOne, -15);
1506
+ } else {
1507
+ this.button.style.backgroundColor = this.hexToRgba(colorOne, 0.05);
1508
+ }
1509
+ };
1510
+ this.handleHoverOut = () => {
1511
+ if (variant === "contained") {
1512
+ this.button.style.backgroundColor = colorOne;
1513
+ } else {
1514
+ this.button.style.backgroundColor = "transparent";
1515
+ }
1516
+ };
1517
+ this.button.addEventListener("mouseenter", this.handleHoverIn);
1518
+ this.button.addEventListener("mouseleave", this.handleHoverOut);
1519
+ }
1520
+ applyPresetSize(size) {
1521
+ if (size === "small") {
1522
+ this.button.style.padding = "0.5rem";
1523
+ } else if (size === "medium") {
1524
+ this.button.style.padding = "0.6875rem 0.75rem";
1525
+ } else if (size === "large") {
1526
+ this.button.style.padding = "0.875rem 1rem";
1527
+ }
1528
+ }
1529
+ hexToRgba(hex, alpha) {
1530
+ let r = 0, g = 0, b = 0;
1531
+ if (hex.length === 4) {
1532
+ r = parseInt(hex[1] + hex[1], 16);
1533
+ g = parseInt(hex[2] + hex[2], 16);
1534
+ b = parseInt(hex[3] + hex[3], 16);
1535
+ } else if (hex.length === 7) {
1536
+ r = parseInt(hex[1] + hex[2], 16);
1537
+ g = parseInt(hex[3] + hex[4], 16);
1538
+ b = parseInt(hex[5] + hex[6], 16);
1539
+ }
1540
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
1541
+ }
1542
+ shadeColor(hex, percent) {
1543
+ let R = parseInt(hex.substring(1, 3), 16);
1544
+ let G = parseInt(hex.substring(3, 5), 16);
1545
+ let B = parseInt(hex.substring(5, 7), 16);
1546
+ R = Math.min(255, Math.max(0, R + R * percent / 100));
1547
+ G = Math.min(255, Math.max(0, G + G * percent / 100));
1548
+ B = Math.min(255, Math.max(0, B + B * percent / 100));
1549
+ const toHex = (c) => {
1550
+ const hex2 = Math.round(c).toString(16);
1551
+ return hex2.length === 1 ? "0" + hex2 : hex2;
1552
+ };
1553
+ return `#${toHex(R)}${toHex(G)}${toHex(B)}`;
1554
+ }
1555
+ handleRipple(event) {
1556
+ if (this.button.disabled) return;
1557
+ const variant = this.getAttribute("variant") || "outlined";
1558
+ const colorOne = this.getAttribute("color-one") || "#1976D2";
1559
+ const ripple = document.createElement("span");
1560
+ ripple.className = "ripple";
1561
+ const color2 = variant === "contained" ? this.hexToRgba(this.shadeColor(colorOne, 40), 0.6) : this.hexToRgba(this.shadeColor(colorOne, -40), 0.3);
1562
+ ripple.style.backgroundColor = color2;
1563
+ const rect = this.button.getBoundingClientRect();
1564
+ const size = Math.max(rect.width, rect.height);
1565
+ ripple.style.width = ripple.style.height = `${size}px`;
1566
+ ripple.style.left = `${event.clientX - rect.left - size / 2}px`;
1567
+ ripple.style.top = `${event.clientY - rect.top - size / 2}px`;
1568
+ this.button.appendChild(ripple);
1569
+ setTimeout(() => ripple.remove(), 600);
1570
+ }
1571
+ };
1572
+ if (!customElements.get("wavelength-button")) {
1573
+ customElements.define("wavelength-button", WavelengthButton);
1574
+ }
1575
+
1576
+ // src/form/zodToFields.ts
1577
+ function camelToPascalLabel(name) {
1578
+ return name.replace(/([A-Z])/g, " $1").replace(/\b\w/g, (c) => c.toUpperCase()).trim();
1579
+ }
1580
+ function unwrap(t) {
1581
+ let cur = t;
1582
+ while (cur && cur._def) {
1583
+ const next = cur._def.innerType || cur._def.schema || cur._def.type;
1584
+ if (next && typeof next === "object") {
1585
+ cur = next;
1586
+ } else {
1587
+ break;
1588
+ }
1589
+ }
1590
+ return cur;
1591
+ }
1592
+ function isZodType(core, type) {
1593
+ const anyCore = core;
1594
+ const typeName = _optionalChain([anyCore, 'optionalAccess', _6 => _6._def, 'optionalAccess', _7 => _7.typeName]);
1595
+ if (typeof typeName === "string" && typeName === type) return true;
1596
+ const ctorName = _optionalChain([anyCore, 'optionalAccess', _8 => _8.constructor, 'optionalAccess', _9 => _9.name]);
1597
+ return ctorName === type;
1598
+ }
1599
+ function zodToFields(schema) {
1600
+ const fields = [];
1601
+ const shape2 = schema.shape;
1602
+ for (const [name, zt] of Object.entries(shape2)) {
1603
+ const core = unwrap(zt);
1604
+ let type;
1605
+ if (isZodType(core, "ZodString")) type = "text";
1606
+ else if (isZodType(core, "ZodNumber")) type = "number";
1607
+ else if (isZodType(core, "ZodBoolean")) type = "checkbox";
1608
+ if (type) {
1609
+ const anyZt = zt;
1610
+ const field = {
1611
+ name,
1612
+ label: camelToPascalLabel(name),
1613
+ type,
1614
+ required: typeof anyZt.isOptional === "function" ? !anyZt.isOptional() : true
1615
+ };
1616
+ const placeholder = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce((typeof anyZt.meta === "function" ? _optionalChain([anyZt, 'access', _10 => _10.meta, 'call', _11 => _11(), 'optionalAccess', _12 => _12.placeholder]) : void 0), () => ( _optionalChain([anyZt, 'optionalAccess', _13 => _13.description]))), () => ( _optionalChain([anyZt, 'optionalAccess', _14 => _14._def, 'optionalAccess', _15 => _15.description]))), () => ( (typeof core.meta === "function" ? _optionalChain([core, 'access', _16 => _16.meta, 'call', _17 => _17(), 'optionalAccess', _18 => _18.placeholder]) : void 0))), () => ( _optionalChain([core, 'optionalAccess', _19 => _19.description]))), () => ( _optionalChain([core, 'optionalAccess', _20 => _20._def, 'optionalAccess', _21 => _21.description]))), () => ( field.label));
1617
+ field.placeholder = placeholder;
1618
+ if (type === "text") {
1619
+ const checks = _nullishCoalesce(_optionalChain([core, 'optionalAccess', _22 => _22._def, 'optionalAccess', _23 => _23.checks]), () => ( []));
1620
+ for (const chk of checks) {
1621
+ const kind = chk.kind || _optionalChain([chk, 'access', _24 => _24._zod, 'optionalAccess', _25 => _25.def, 'optionalAccess', _26 => _26.check]);
1622
+ const min = _nullishCoalesce(chk.value, () => ( _optionalChain([chk, 'access', _27 => _27._zod, 'optionalAccess', _28 => _28.def, 'optionalAccess', _29 => _29.minimum])));
1623
+ const max = _nullishCoalesce(chk.value, () => ( _optionalChain([chk, 'access', _30 => _30._zod, 'optionalAccess', _31 => _31.def, 'optionalAccess', _32 => _32.maximum])));
1624
+ if ((kind === "min" || kind === "min_length") && typeof min === "number") {
1625
+ field.minLength = min;
1626
+ }
1627
+ if ((kind === "max" || kind === "max_length") && typeof max === "number") {
1628
+ field.maxLength = max;
1629
+ }
1630
+ }
1631
+ }
1632
+ fields.push(field);
1633
+ }
1634
+ }
1635
+ return fields;
1636
+ }
1637
+
1638
+ // ../../node_modules/zod/v4/core/core.js
1639
+ var NEVER = Object.freeze({
1640
+ status: "aborted"
1641
+ });
1642
+ // @__NO_SIDE_EFFECTS__
1643
+ function $constructor(name, initializer3, params) {
1644
+ function init(inst, def) {
1645
+ var _a;
1646
+ Object.defineProperty(inst, "_zod", {
1647
+ value: _nullishCoalesce(inst._zod, () => ( {})),
1648
+ enumerable: false
1649
+ });
1650
+ _nullishCoalesce((_a = inst._zod).traits, () => ( (_a.traits = /* @__PURE__ */ new Set())));
1651
+ inst._zod.traits.add(name);
1652
+ initializer3(inst, def);
1653
+ for (const k in _.prototype) {
1654
+ if (!(k in inst))
1655
+ Object.defineProperty(inst, k, { value: _.prototype[k].bind(inst) });
1656
+ }
1657
+ inst._zod.constr = _;
1658
+ inst._zod.def = def;
1659
+ }
1660
+ const Parent = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _33 => _33.Parent]), () => ( Object));
1661
+ class Definition extends Parent {
1662
+ }
1663
+ Object.defineProperty(Definition, "name", { value: name });
1664
+ function _(def) {
1665
+ var _a;
1666
+ const inst = _optionalChain([params, 'optionalAccess', _34 => _34.Parent]) ? new Definition() : this;
1667
+ init(inst, def);
1668
+ _nullishCoalesce((_a = inst._zod).deferred, () => ( (_a.deferred = [])));
1669
+ for (const fn of inst._zod.deferred) {
1670
+ fn();
1671
+ }
1672
+ return inst;
1673
+ }
1674
+ Object.defineProperty(_, "init", { value: init });
1675
+ Object.defineProperty(_, Symbol.hasInstance, {
1676
+ value: (inst) => {
1677
+ if (_optionalChain([params, 'optionalAccess', _35 => _35.Parent]) && inst instanceof params.Parent)
1678
+ return true;
1679
+ return _optionalChain([inst, 'optionalAccess', _36 => _36._zod, 'optionalAccess', _37 => _37.traits, 'optionalAccess', _38 => _38.has, 'call', _39 => _39(name)]);
1680
+ }
1681
+ });
1682
+ Object.defineProperty(_, "name", { value: name });
1683
+ return _;
1684
+ }
1685
+ var $brand = Symbol("zod_brand");
1686
+ var $ZodAsyncError = class extends Error {
1687
+ constructor() {
1688
+ super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
1689
+ }
1690
+ };
1691
+ var $ZodEncodeError = class extends Error {
1692
+ constructor(name) {
1693
+ super(`Encountered unidirectional transform during encode: ${name}`);
1694
+ this.name = "ZodEncodeError";
1695
+ }
1696
+ };
1697
+ var globalConfig = {};
1698
+ function config(newConfig) {
1699
+ if (newConfig)
1700
+ Object.assign(globalConfig, newConfig);
1701
+ return globalConfig;
1702
+ }
1703
+
1704
+ // ../../node_modules/zod/v4/core/util.js
1705
+ var util_exports = {};
1706
+ __export(util_exports, {
1707
+ BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
1708
+ Class: () => Class,
1709
+ NUMBER_FORMAT_RANGES: () => NUMBER_FORMAT_RANGES,
1710
+ aborted: () => aborted,
1711
+ allowsEval: () => allowsEval,
1712
+ assert: () => assert,
1713
+ assertEqual: () => assertEqual,
1714
+ assertIs: () => assertIs,
1715
+ assertNever: () => assertNever,
1716
+ assertNotEqual: () => assertNotEqual,
1717
+ assignProp: () => assignProp,
1718
+ base64ToUint8Array: () => base64ToUint8Array,
1719
+ base64urlToUint8Array: () => base64urlToUint8Array,
1720
+ cached: () => cached,
1721
+ captureStackTrace: () => captureStackTrace,
1722
+ cleanEnum: () => cleanEnum,
1723
+ cleanRegex: () => cleanRegex,
1724
+ clone: () => clone,
1725
+ cloneDef: () => cloneDef,
1726
+ createTransparentProxy: () => createTransparentProxy,
1727
+ defineLazy: () => defineLazy,
1728
+ esc: () => esc,
1729
+ escapeRegex: () => escapeRegex,
1730
+ extend: () => extend,
1731
+ finalizeIssue: () => finalizeIssue,
1732
+ floatSafeRemainder: () => floatSafeRemainder,
1733
+ getElementAtPath: () => getElementAtPath,
1734
+ getEnumValues: () => getEnumValues,
1735
+ getLengthableOrigin: () => getLengthableOrigin,
1736
+ getParsedType: () => getParsedType,
1737
+ getSizableOrigin: () => getSizableOrigin,
1738
+ hexToUint8Array: () => hexToUint8Array,
1739
+ isObject: () => isObject,
1740
+ isPlainObject: () => isPlainObject,
1741
+ issue: () => issue,
1742
+ joinValues: () => joinValues,
1743
+ jsonStringifyReplacer: () => jsonStringifyReplacer,
1744
+ merge: () => merge,
1745
+ mergeDefs: () => mergeDefs,
1746
+ normalizeParams: () => normalizeParams,
1747
+ nullish: () => nullish,
1748
+ numKeys: () => numKeys,
1749
+ objectClone: () => objectClone,
1750
+ omit: () => omit,
1751
+ optionalKeys: () => optionalKeys,
1752
+ partial: () => partial,
1753
+ pick: () => pick,
1754
+ prefixIssues: () => prefixIssues,
1755
+ primitiveTypes: () => primitiveTypes,
1756
+ promiseAllObject: () => promiseAllObject,
1757
+ propertyKeyTypes: () => propertyKeyTypes,
1758
+ randomString: () => randomString,
1759
+ required: () => required,
1760
+ safeExtend: () => safeExtend,
1761
+ shallowClone: () => shallowClone,
1762
+ stringifyPrimitive: () => stringifyPrimitive,
1763
+ uint8ArrayToBase64: () => uint8ArrayToBase64,
1764
+ uint8ArrayToBase64url: () => uint8ArrayToBase64url,
1765
+ uint8ArrayToHex: () => uint8ArrayToHex,
1766
+ unwrapMessage: () => unwrapMessage
1767
+ });
1768
+ function assertEqual(val) {
1769
+ return val;
1770
+ }
1771
+ function assertNotEqual(val) {
1772
+ return val;
1773
+ }
1774
+ function assertIs(_arg) {
1775
+ }
1776
+ function assertNever(_x) {
1777
+ throw new Error();
1778
+ }
1779
+ function assert(_) {
1780
+ }
1781
+ function getEnumValues(entries) {
1782
+ const numericValues = Object.values(entries).filter((v) => typeof v === "number");
1783
+ const values2 = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
1784
+ return values2;
1785
+ }
1786
+ function joinValues(array2, separator = "|") {
1787
+ return array2.map((val) => stringifyPrimitive(val)).join(separator);
1788
+ }
1789
+ function jsonStringifyReplacer(_, value) {
1790
+ if (typeof value === "bigint")
1791
+ return value.toString();
1792
+ return value;
1793
+ }
1794
+ function cached(getter) {
1795
+ const set = false;
1796
+ return {
1797
+ get value() {
1798
+ if (!set) {
1799
+ const value = getter();
1800
+ Object.defineProperty(this, "value", { value });
1801
+ return value;
1802
+ }
1803
+ throw new Error("cached value already set");
1804
+ }
1805
+ };
1806
+ }
1807
+ function nullish(input) {
1808
+ return input === null || input === void 0;
1809
+ }
1810
+ function cleanRegex(source) {
1811
+ const start = source.startsWith("^") ? 1 : 0;
1812
+ const end = source.endsWith("$") ? source.length - 1 : source.length;
1813
+ return source.slice(start, end);
1814
+ }
1815
+ function floatSafeRemainder(val, step) {
1816
+ const valDecCount = (val.toString().split(".")[1] || "").length;
1817
+ const stepString = step.toString();
1818
+ let stepDecCount = (stepString.split(".")[1] || "").length;
1819
+ if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
1820
+ const match = stepString.match(/\d?e-(\d?)/);
1821
+ if (_optionalChain([match, 'optionalAccess', _40 => _40[1]])) {
1822
+ stepDecCount = Number.parseInt(match[1]);
1823
+ }
1824
+ }
1825
+ const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
1826
+ const valInt = Number.parseInt(val.toFixed(decCount).replace(".", ""));
1827
+ const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
1828
+ return valInt % stepInt / 10 ** decCount;
1829
+ }
1830
+ var EVALUATING = Symbol("evaluating");
1831
+ function defineLazy(object, key, getter) {
1832
+ let value = void 0;
1833
+ Object.defineProperty(object, key, {
1834
+ get() {
1835
+ if (value === EVALUATING) {
1836
+ return void 0;
1837
+ }
1838
+ if (value === void 0) {
1839
+ value = EVALUATING;
1840
+ value = getter();
1841
+ }
1842
+ return value;
1843
+ },
1844
+ set(v) {
1845
+ Object.defineProperty(object, key, {
1846
+ value: v
1847
+ // configurable: true,
1848
+ });
1849
+ },
1850
+ configurable: true
1851
+ });
1852
+ }
1853
+ function objectClone(obj) {
1854
+ return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));
1855
+ }
1856
+ function assignProp(target, prop, value) {
1857
+ Object.defineProperty(target, prop, {
1858
+ value,
1859
+ writable: true,
1860
+ enumerable: true,
1861
+ configurable: true
1862
+ });
1863
+ }
1864
+ function mergeDefs(...defs) {
1865
+ const mergedDescriptors = {};
1866
+ for (const def of defs) {
1867
+ const descriptors = Object.getOwnPropertyDescriptors(def);
1868
+ Object.assign(mergedDescriptors, descriptors);
1869
+ }
1870
+ return Object.defineProperties({}, mergedDescriptors);
1871
+ }
1872
+ function cloneDef(schema) {
1873
+ return mergeDefs(schema._zod.def);
1874
+ }
1875
+ function getElementAtPath(obj, path) {
1876
+ if (!path)
1877
+ return obj;
1878
+ return path.reduce((acc, key) => _optionalChain([acc, 'optionalAccess', _41 => _41[key]]), obj);
1879
+ }
1880
+ function promiseAllObject(promisesObj) {
1881
+ const keys = Object.keys(promisesObj);
1882
+ const promises = keys.map((key) => promisesObj[key]);
1883
+ return Promise.all(promises).then((results) => {
1884
+ const resolvedObj = {};
1885
+ for (let i = 0; i < keys.length; i++) {
1886
+ resolvedObj[keys[i]] = results[i];
1887
+ }
1888
+ return resolvedObj;
1889
+ });
1890
+ }
1891
+ function randomString(length = 10) {
1892
+ const chars = "abcdefghijklmnopqrstuvwxyz";
1893
+ let str = "";
1894
+ for (let i = 0; i < length; i++) {
1895
+ str += chars[Math.floor(Math.random() * chars.length)];
1896
+ }
1897
+ return str;
1898
+ }
1899
+ function esc(str) {
1900
+ return JSON.stringify(str);
1901
+ }
1902
+ var captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {
1903
+ };
1904
+ function isObject(data) {
1905
+ return typeof data === "object" && data !== null && !Array.isArray(data);
1906
+ }
1907
+ var allowsEval = cached(() => {
1908
+ if (typeof navigator !== "undefined" && _optionalChain([navigator, 'optionalAccess', _42 => _42.userAgent, 'optionalAccess', _43 => _43.includes, 'call', _44 => _44("Cloudflare")])) {
1909
+ return false;
1910
+ }
1911
+ try {
1912
+ const F = Function;
1913
+ new F("");
1914
+ return true;
1915
+ } catch (_) {
1916
+ return false;
1917
+ }
1918
+ });
1919
+ function isPlainObject(o) {
1920
+ if (isObject(o) === false)
1921
+ return false;
1922
+ const ctor = o.constructor;
1923
+ if (ctor === void 0)
1924
+ return true;
1925
+ const prot = ctor.prototype;
1926
+ if (isObject(prot) === false)
1927
+ return false;
1928
+ if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) {
1929
+ return false;
1930
+ }
1931
+ return true;
1932
+ }
1933
+ function shallowClone(o) {
1934
+ if (isPlainObject(o))
1935
+ return { ...o };
1936
+ return o;
1937
+ }
1938
+ function numKeys(data) {
1939
+ let keyCount = 0;
1940
+ for (const key in data) {
1941
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
1942
+ keyCount++;
1943
+ }
1944
+ }
1945
+ return keyCount;
1946
+ }
1947
+ var getParsedType = (data) => {
1948
+ const t = typeof data;
1949
+ switch (t) {
1950
+ case "undefined":
1951
+ return "undefined";
1952
+ case "string":
1953
+ return "string";
1954
+ case "number":
1955
+ return Number.isNaN(data) ? "nan" : "number";
1956
+ case "boolean":
1957
+ return "boolean";
1958
+ case "function":
1959
+ return "function";
1960
+ case "bigint":
1961
+ return "bigint";
1962
+ case "symbol":
1963
+ return "symbol";
1964
+ case "object":
1965
+ if (Array.isArray(data)) {
1966
+ return "array";
1967
+ }
1968
+ if (data === null) {
1969
+ return "null";
1970
+ }
1971
+ if (data.then && typeof data.then === "function" && data.catch && typeof data.catch === "function") {
1972
+ return "promise";
1973
+ }
1974
+ if (typeof Map !== "undefined" && data instanceof Map) {
1975
+ return "map";
1976
+ }
1977
+ if (typeof Set !== "undefined" && data instanceof Set) {
1978
+ return "set";
1979
+ }
1980
+ if (typeof Date !== "undefined" && data instanceof Date) {
1981
+ return "date";
1982
+ }
1983
+ if (typeof File !== "undefined" && data instanceof File) {
1984
+ return "file";
1985
+ }
1986
+ return "object";
1987
+ default:
1988
+ throw new Error(`Unknown data type: ${t}`);
1989
+ }
1990
+ };
1991
+ var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
1992
+ var primitiveTypes = /* @__PURE__ */ new Set(["string", "number", "bigint", "boolean", "symbol", "undefined"]);
1993
+ function escapeRegex(str) {
1994
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1995
+ }
1996
+ function clone(inst, def, params) {
1997
+ const cl = new inst._zod.constr(_nullishCoalesce(def, () => ( inst._zod.def)));
1998
+ if (!def || _optionalChain([params, 'optionalAccess', _45 => _45.parent]))
1999
+ cl._zod.parent = inst;
2000
+ return cl;
2001
+ }
2002
+ function normalizeParams(_params) {
2003
+ const params = _params;
2004
+ if (!params)
2005
+ return {};
2006
+ if (typeof params === "string")
2007
+ return { error: () => params };
2008
+ if (_optionalChain([params, 'optionalAccess', _46 => _46.message]) !== void 0) {
2009
+ if (_optionalChain([params, 'optionalAccess', _47 => _47.error]) !== void 0)
2010
+ throw new Error("Cannot specify both `message` and `error` params");
2011
+ params.error = params.message;
2012
+ }
2013
+ delete params.message;
2014
+ if (typeof params.error === "string")
2015
+ return { ...params, error: () => params.error };
2016
+ return params;
2017
+ }
2018
+ function createTransparentProxy(getter) {
2019
+ let target;
2020
+ return new Proxy({}, {
2021
+ get(_, prop, receiver) {
2022
+ _nullishCoalesce(target, () => ( (target = getter())));
2023
+ return Reflect.get(target, prop, receiver);
2024
+ },
2025
+ set(_, prop, value, receiver) {
2026
+ _nullishCoalesce(target, () => ( (target = getter())));
2027
+ return Reflect.set(target, prop, value, receiver);
2028
+ },
2029
+ has(_, prop) {
2030
+ _nullishCoalesce(target, () => ( (target = getter())));
2031
+ return Reflect.has(target, prop);
2032
+ },
2033
+ deleteProperty(_, prop) {
2034
+ _nullishCoalesce(target, () => ( (target = getter())));
2035
+ return Reflect.deleteProperty(target, prop);
2036
+ },
2037
+ ownKeys(_) {
2038
+ _nullishCoalesce(target, () => ( (target = getter())));
2039
+ return Reflect.ownKeys(target);
2040
+ },
2041
+ getOwnPropertyDescriptor(_, prop) {
2042
+ _nullishCoalesce(target, () => ( (target = getter())));
2043
+ return Reflect.getOwnPropertyDescriptor(target, prop);
2044
+ },
2045
+ defineProperty(_, prop, descriptor) {
2046
+ _nullishCoalesce(target, () => ( (target = getter())));
2047
+ return Reflect.defineProperty(target, prop, descriptor);
2048
+ }
2049
+ });
2050
+ }
2051
+ function stringifyPrimitive(value) {
2052
+ if (typeof value === "bigint")
2053
+ return value.toString() + "n";
2054
+ if (typeof value === "string")
2055
+ return `"${value}"`;
2056
+ return `${value}`;
2057
+ }
2058
+ function optionalKeys(shape2) {
2059
+ return Object.keys(shape2).filter((k) => {
2060
+ return shape2[k]._zod.optin === "optional" && shape2[k]._zod.optout === "optional";
2061
+ });
2062
+ }
2063
+ var NUMBER_FORMAT_RANGES = {
2064
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
2065
+ int32: [-2147483648, 2147483647],
2066
+ uint32: [0, 4294967295],
2067
+ float32: [-34028234663852886e22, 34028234663852886e22],
2068
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
2069
+ };
2070
+ var BIGINT_FORMAT_RANGES = {
2071
+ int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
2072
+ uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
2073
+ };
2074
+ function pick(schema, mask) {
2075
+ const currDef = schema._zod.def;
2076
+ const def = mergeDefs(schema._zod.def, {
2077
+ get shape() {
2078
+ const newShape = {};
2079
+ for (const key in mask) {
2080
+ if (!(key in currDef.shape)) {
2081
+ throw new Error(`Unrecognized key: "${key}"`);
2082
+ }
2083
+ if (!mask[key])
2084
+ continue;
2085
+ newShape[key] = currDef.shape[key];
2086
+ }
2087
+ assignProp(this, "shape", newShape);
2088
+ return newShape;
2089
+ },
2090
+ checks: []
2091
+ });
2092
+ return clone(schema, def);
2093
+ }
2094
+ function omit(schema, mask) {
2095
+ const currDef = schema._zod.def;
2096
+ const def = mergeDefs(schema._zod.def, {
2097
+ get shape() {
2098
+ const newShape = { ...schema._zod.def.shape };
2099
+ for (const key in mask) {
2100
+ if (!(key in currDef.shape)) {
2101
+ throw new Error(`Unrecognized key: "${key}"`);
2102
+ }
2103
+ if (!mask[key])
2104
+ continue;
2105
+ delete newShape[key];
2106
+ }
2107
+ assignProp(this, "shape", newShape);
2108
+ return newShape;
2109
+ },
2110
+ checks: []
2111
+ });
2112
+ return clone(schema, def);
2113
+ }
2114
+ function extend(schema, shape2) {
2115
+ if (!isPlainObject(shape2)) {
2116
+ throw new Error("Invalid input to extend: expected a plain object");
2117
+ }
2118
+ const checks = schema._zod.def.checks;
2119
+ const hasChecks = checks && checks.length > 0;
2120
+ if (hasChecks) {
2121
+ throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
2122
+ }
2123
+ const def = mergeDefs(schema._zod.def, {
2124
+ get shape() {
2125
+ const _shape = { ...schema._zod.def.shape, ...shape2 };
2126
+ assignProp(this, "shape", _shape);
2127
+ return _shape;
2128
+ },
2129
+ checks: []
2130
+ });
2131
+ return clone(schema, def);
2132
+ }
2133
+ function safeExtend(schema, shape2) {
2134
+ if (!isPlainObject(shape2)) {
2135
+ throw new Error("Invalid input to safeExtend: expected a plain object");
2136
+ }
2137
+ const def = {
2138
+ ...schema._zod.def,
2139
+ get shape() {
2140
+ const _shape = { ...schema._zod.def.shape, ...shape2 };
2141
+ assignProp(this, "shape", _shape);
2142
+ return _shape;
2143
+ },
2144
+ checks: schema._zod.def.checks
2145
+ };
2146
+ return clone(schema, def);
2147
+ }
2148
+ function merge(a, b) {
2149
+ const def = mergeDefs(a._zod.def, {
2150
+ get shape() {
2151
+ const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
2152
+ assignProp(this, "shape", _shape);
2153
+ return _shape;
2154
+ },
2155
+ get catchall() {
2156
+ return b._zod.def.catchall;
2157
+ },
2158
+ checks: []
2159
+ // delete existing checks
2160
+ });
2161
+ return clone(a, def);
2162
+ }
2163
+ function partial(Class2, schema, mask) {
2164
+ const def = mergeDefs(schema._zod.def, {
2165
+ get shape() {
2166
+ const oldShape = schema._zod.def.shape;
2167
+ const shape2 = { ...oldShape };
2168
+ if (mask) {
2169
+ for (const key in mask) {
2170
+ if (!(key in oldShape)) {
2171
+ throw new Error(`Unrecognized key: "${key}"`);
2172
+ }
2173
+ if (!mask[key])
2174
+ continue;
2175
+ shape2[key] = Class2 ? new Class2({
2176
+ type: "optional",
2177
+ innerType: oldShape[key]
2178
+ }) : oldShape[key];
2179
+ }
2180
+ } else {
2181
+ for (const key in oldShape) {
2182
+ shape2[key] = Class2 ? new Class2({
2183
+ type: "optional",
2184
+ innerType: oldShape[key]
2185
+ }) : oldShape[key];
2186
+ }
2187
+ }
2188
+ assignProp(this, "shape", shape2);
2189
+ return shape2;
2190
+ },
2191
+ checks: []
2192
+ });
2193
+ return clone(schema, def);
2194
+ }
2195
+ function required(Class2, schema, mask) {
2196
+ const def = mergeDefs(schema._zod.def, {
2197
+ get shape() {
2198
+ const oldShape = schema._zod.def.shape;
2199
+ const shape2 = { ...oldShape };
2200
+ if (mask) {
2201
+ for (const key in mask) {
2202
+ if (!(key in shape2)) {
2203
+ throw new Error(`Unrecognized key: "${key}"`);
2204
+ }
2205
+ if (!mask[key])
2206
+ continue;
2207
+ shape2[key] = new Class2({
2208
+ type: "nonoptional",
2209
+ innerType: oldShape[key]
2210
+ });
2211
+ }
2212
+ } else {
2213
+ for (const key in oldShape) {
2214
+ shape2[key] = new Class2({
2215
+ type: "nonoptional",
2216
+ innerType: oldShape[key]
2217
+ });
2218
+ }
2219
+ }
2220
+ assignProp(this, "shape", shape2);
2221
+ return shape2;
2222
+ },
2223
+ checks: []
2224
+ });
2225
+ return clone(schema, def);
2226
+ }
2227
+ function aborted(x, startIndex = 0) {
2228
+ if (x.aborted === true)
2229
+ return true;
2230
+ for (let i = startIndex; i < x.issues.length; i++) {
2231
+ if (_optionalChain([x, 'access', _48 => _48.issues, 'access', _49 => _49[i], 'optionalAccess', _50 => _50.continue]) !== true) {
2232
+ return true;
2233
+ }
2234
+ }
2235
+ return false;
2236
+ }
2237
+ function prefixIssues(path, issues) {
2238
+ return issues.map((iss) => {
2239
+ var _a;
2240
+ _nullishCoalesce((_a = iss).path, () => ( (_a.path = [])));
2241
+ iss.path.unshift(path);
2242
+ return iss;
2243
+ });
2244
+ }
2245
+ function unwrapMessage(message) {
2246
+ return typeof message === "string" ? message : _optionalChain([message, 'optionalAccess', _51 => _51.message]);
2247
+ }
2248
+ function finalizeIssue(iss, ctx, config2) {
2249
+ const full = { ...iss, path: _nullishCoalesce(iss.path, () => ( [])) };
2250
+ if (!iss.message) {
2251
+ const message = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(unwrapMessage(_optionalChain([iss, 'access', _52 => _52.inst, 'optionalAccess', _53 => _53._zod, 'access', _54 => _54.def, 'optionalAccess', _55 => _55.error, 'optionalCall', _56 => _56(iss)])), () => ( unwrapMessage(_optionalChain([ctx, 'optionalAccess', _57 => _57.error, 'optionalCall', _58 => _58(iss)])))), () => ( unwrapMessage(_optionalChain([config2, 'access', _59 => _59.customError, 'optionalCall', _60 => _60(iss)])))), () => ( unwrapMessage(_optionalChain([config2, 'access', _61 => _61.localeError, 'optionalCall', _62 => _62(iss)])))), () => ( "Invalid input"));
2252
+ full.message = message;
2253
+ }
2254
+ delete full.inst;
2255
+ delete full.continue;
2256
+ if (!_optionalChain([ctx, 'optionalAccess', _63 => _63.reportInput])) {
2257
+ delete full.input;
2258
+ }
2259
+ return full;
2260
+ }
2261
+ function getSizableOrigin(input) {
2262
+ if (input instanceof Set)
2263
+ return "set";
2264
+ if (input instanceof Map)
2265
+ return "map";
2266
+ if (input instanceof File)
2267
+ return "file";
2268
+ return "unknown";
2269
+ }
2270
+ function getLengthableOrigin(input) {
2271
+ if (Array.isArray(input))
2272
+ return "array";
2273
+ if (typeof input === "string")
2274
+ return "string";
2275
+ return "unknown";
2276
+ }
2277
+ function issue(...args) {
2278
+ const [iss, input, inst] = args;
2279
+ if (typeof iss === "string") {
2280
+ return {
2281
+ message: iss,
2282
+ code: "custom",
2283
+ input,
2284
+ inst
2285
+ };
2286
+ }
2287
+ return { ...iss };
2288
+ }
2289
+ function cleanEnum(obj) {
2290
+ return Object.entries(obj).filter(([k, _]) => {
2291
+ return Number.isNaN(Number.parseInt(k, 10));
2292
+ }).map((el) => el[1]);
2293
+ }
2294
+ function base64ToUint8Array(base64) {
2295
+ const binaryString = atob(base64);
2296
+ const bytes = new Uint8Array(binaryString.length);
2297
+ for (let i = 0; i < binaryString.length; i++) {
2298
+ bytes[i] = binaryString.charCodeAt(i);
2299
+ }
2300
+ return bytes;
2301
+ }
2302
+ function uint8ArrayToBase64(bytes) {
2303
+ let binaryString = "";
2304
+ for (let i = 0; i < bytes.length; i++) {
2305
+ binaryString += String.fromCharCode(bytes[i]);
2306
+ }
2307
+ return btoa(binaryString);
2308
+ }
2309
+ function base64urlToUint8Array(base64url) {
2310
+ const base64 = base64url.replace(/-/g, "+").replace(/_/g, "/");
2311
+ const padding2 = "=".repeat((4 - base64.length % 4) % 4);
2312
+ return base64ToUint8Array(base64 + padding2);
2313
+ }
2314
+ function uint8ArrayToBase64url(bytes) {
2315
+ return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
2316
+ }
2317
+ function hexToUint8Array(hex) {
2318
+ const cleanHex = hex.replace(/^0x/, "");
2319
+ if (cleanHex.length % 2 !== 0) {
2320
+ throw new Error("Invalid hex string length");
2321
+ }
2322
+ const bytes = new Uint8Array(cleanHex.length / 2);
2323
+ for (let i = 0; i < cleanHex.length; i += 2) {
2324
+ bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);
2325
+ }
2326
+ return bytes;
2327
+ }
2328
+ function uint8ArrayToHex(bytes) {
2329
+ return Array.from(bytes).map((b) => b.toString(16).padStart(2, "0")).join("");
2330
+ }
2331
+ var Class = class {
2332
+ constructor(..._args) {
2333
+ }
2334
+ };
2335
+
2336
+ // ../../node_modules/zod/v4/core/errors.js
2337
+ var initializer = (inst, def) => {
2338
+ inst.name = "$ZodError";
2339
+ Object.defineProperty(inst, "_zod", {
2340
+ value: inst._zod,
2341
+ enumerable: false
2342
+ });
2343
+ Object.defineProperty(inst, "issues", {
2344
+ value: def,
2345
+ enumerable: false
2346
+ });
2347
+ inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
2348
+ Object.defineProperty(inst, "toString", {
2349
+ value: () => inst.message,
2350
+ enumerable: false
2351
+ });
2352
+ };
2353
+ var $ZodError = $constructor("$ZodError", initializer);
2354
+ var $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
2355
+ function flattenError(error, mapper = (issue2) => issue2.message) {
2356
+ const fieldErrors = {};
2357
+ const formErrors = [];
2358
+ for (const sub of error.issues) {
2359
+ if (sub.path.length > 0) {
2360
+ fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
2361
+ fieldErrors[sub.path[0]].push(mapper(sub));
2362
+ } else {
2363
+ formErrors.push(mapper(sub));
2364
+ }
2365
+ }
2366
+ return { formErrors, fieldErrors };
2367
+ }
2368
+ function formatError(error, _mapper) {
2369
+ const mapper = _mapper || function(issue2) {
2370
+ return issue2.message;
2371
+ };
2372
+ const fieldErrors = { _errors: [] };
2373
+ const processError = (error2) => {
2374
+ for (const issue2 of error2.issues) {
2375
+ if (issue2.code === "invalid_union" && issue2.errors.length) {
2376
+ issue2.errors.map((issues) => processError({ issues }));
2377
+ } else if (issue2.code === "invalid_key") {
2378
+ processError({ issues: issue2.issues });
2379
+ } else if (issue2.code === "invalid_element") {
2380
+ processError({ issues: issue2.issues });
2381
+ } else if (issue2.path.length === 0) {
2382
+ fieldErrors._errors.push(mapper(issue2));
2383
+ } else {
2384
+ let curr = fieldErrors;
2385
+ let i = 0;
2386
+ while (i < issue2.path.length) {
2387
+ const el = issue2.path[i];
2388
+ const terminal = i === issue2.path.length - 1;
2389
+ if (!terminal) {
2390
+ curr[el] = curr[el] || { _errors: [] };
2391
+ } else {
2392
+ curr[el] = curr[el] || { _errors: [] };
2393
+ curr[el]._errors.push(mapper(issue2));
2394
+ }
2395
+ curr = curr[el];
2396
+ i++;
2397
+ }
2398
+ }
2399
+ }
2400
+ };
2401
+ processError(error);
2402
+ return fieldErrors;
2403
+ }
2404
+
2405
+ // ../../node_modules/zod/v4/core/parse.js
2406
+ var _parse = (_Err) => (schema, value, _ctx, _params) => {
2407
+ const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
2408
+ const result = schema._zod.run({ value, issues: [] }, ctx);
2409
+ if (result instanceof Promise) {
2410
+ throw new $ZodAsyncError();
2411
+ }
2412
+ if (result.issues.length) {
2413
+ const e = new (_nullishCoalesce(_optionalChain([_params, 'optionalAccess', _64 => _64.Err]), () => ( _Err)))(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
2414
+ captureStackTrace(e, _optionalChain([_params, 'optionalAccess', _65 => _65.callee]));
2415
+ throw e;
2416
+ }
2417
+ return result.value;
2418
+ };
2419
+ var _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
2420
+ const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
2421
+ let result = schema._zod.run({ value, issues: [] }, ctx);
2422
+ if (result instanceof Promise)
2423
+ result = await result;
2424
+ if (result.issues.length) {
2425
+ const e = new (_nullishCoalesce(_optionalChain([params, 'optionalAccess', _66 => _66.Err]), () => ( _Err)))(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
2426
+ captureStackTrace(e, _optionalChain([params, 'optionalAccess', _67 => _67.callee]));
2427
+ throw e;
2428
+ }
2429
+ return result.value;
2430
+ };
2431
+ var _safeParse = (_Err) => (schema, value, _ctx) => {
2432
+ const ctx = _ctx ? { ..._ctx, async: false } : { async: false };
2433
+ const result = schema._zod.run({ value, issues: [] }, ctx);
2434
+ if (result instanceof Promise) {
2435
+ throw new $ZodAsyncError();
2436
+ }
2437
+ return result.issues.length ? {
2438
+ success: false,
2439
+ error: new (_nullishCoalesce(_Err, () => ( $ZodError)))(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
2440
+ } : { success: true, data: result.value };
2441
+ };
2442
+ var safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
2443
+ var _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
2444
+ const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
2445
+ let result = schema._zod.run({ value, issues: [] }, ctx);
2446
+ if (result instanceof Promise)
2447
+ result = await result;
2448
+ return result.issues.length ? {
2449
+ success: false,
2450
+ error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
2451
+ } : { success: true, data: result.value };
2452
+ };
2453
+ var safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
2454
+ var _encode = (_Err) => (schema, value, _ctx) => {
2455
+ const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
2456
+ return _parse(_Err)(schema, value, ctx);
2457
+ };
2458
+ var _decode = (_Err) => (schema, value, _ctx) => {
2459
+ return _parse(_Err)(schema, value, _ctx);
2460
+ };
2461
+ var _encodeAsync = (_Err) => async (schema, value, _ctx) => {
2462
+ const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
2463
+ return _parseAsync(_Err)(schema, value, ctx);
2464
+ };
2465
+ var _decodeAsync = (_Err) => async (schema, value, _ctx) => {
2466
+ return _parseAsync(_Err)(schema, value, _ctx);
2467
+ };
2468
+ var _safeEncode = (_Err) => (schema, value, _ctx) => {
2469
+ const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
2470
+ return _safeParse(_Err)(schema, value, ctx);
2471
+ };
2472
+ var _safeDecode = (_Err) => (schema, value, _ctx) => {
2473
+ return _safeParse(_Err)(schema, value, _ctx);
2474
+ };
2475
+ var _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
2476
+ const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
2477
+ return _safeParseAsync(_Err)(schema, value, ctx);
2478
+ };
2479
+ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
2480
+ return _safeParseAsync(_Err)(schema, value, _ctx);
2481
+ };
2482
+
2483
+ // ../../node_modules/zod/v4/core/checks.js
2484
+ var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
2485
+ var _a;
2486
+ _nullishCoalesce(inst._zod, () => ( (inst._zod = {})));
2487
+ inst._zod.def = def;
2488
+ _nullishCoalesce((_a = inst._zod).onattach, () => ( (_a.onattach = [])));
2489
+ });
2490
+ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
2491
+ var _a;
2492
+ $ZodCheck.init(inst, def);
2493
+ _nullishCoalesce((_a = inst._zod.def).when, () => ( (_a.when = (payload) => {
2494
+ const val = payload.value;
2495
+ return !nullish(val) && val.length !== void 0;
2496
+ })));
2497
+ inst._zod.onattach.push((inst2) => {
2498
+ const curr = _nullishCoalesce(inst2._zod.bag.maximum, () => ( Number.POSITIVE_INFINITY));
2499
+ if (def.maximum < curr)
2500
+ inst2._zod.bag.maximum = def.maximum;
2501
+ });
2502
+ inst._zod.check = (payload) => {
2503
+ const input = payload.value;
2504
+ const length = input.length;
2505
+ if (length <= def.maximum)
2506
+ return;
2507
+ const origin = getLengthableOrigin(input);
2508
+ payload.issues.push({
2509
+ origin,
2510
+ code: "too_big",
2511
+ maximum: def.maximum,
2512
+ inclusive: true,
2513
+ input,
2514
+ inst,
2515
+ continue: !def.abort
2516
+ });
2517
+ };
2518
+ });
2519
+ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
2520
+ var _a;
2521
+ $ZodCheck.init(inst, def);
2522
+ _nullishCoalesce((_a = inst._zod.def).when, () => ( (_a.when = (payload) => {
2523
+ const val = payload.value;
2524
+ return !nullish(val) && val.length !== void 0;
2525
+ })));
2526
+ inst._zod.onattach.push((inst2) => {
2527
+ const curr = _nullishCoalesce(inst2._zod.bag.minimum, () => ( Number.NEGATIVE_INFINITY));
2528
+ if (def.minimum > curr)
2529
+ inst2._zod.bag.minimum = def.minimum;
2530
+ });
2531
+ inst._zod.check = (payload) => {
2532
+ const input = payload.value;
2533
+ const length = input.length;
2534
+ if (length >= def.minimum)
2535
+ return;
2536
+ const origin = getLengthableOrigin(input);
2537
+ payload.issues.push({
2538
+ origin,
2539
+ code: "too_small",
2540
+ minimum: def.minimum,
2541
+ inclusive: true,
2542
+ input,
2543
+ inst,
2544
+ continue: !def.abort
2545
+ });
2546
+ };
2547
+ });
2548
+ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
2549
+ var _a;
2550
+ $ZodCheck.init(inst, def);
2551
+ _nullishCoalesce((_a = inst._zod.def).when, () => ( (_a.when = (payload) => {
2552
+ const val = payload.value;
2553
+ return !nullish(val) && val.length !== void 0;
2554
+ })));
2555
+ inst._zod.onattach.push((inst2) => {
2556
+ const bag = inst2._zod.bag;
2557
+ bag.minimum = def.length;
2558
+ bag.maximum = def.length;
2559
+ bag.length = def.length;
2560
+ });
2561
+ inst._zod.check = (payload) => {
2562
+ const input = payload.value;
2563
+ const length = input.length;
2564
+ if (length === def.length)
2565
+ return;
2566
+ const origin = getLengthableOrigin(input);
2567
+ const tooBig = length > def.length;
2568
+ payload.issues.push({
2569
+ origin,
2570
+ ...tooBig ? { code: "too_big", maximum: def.length } : { code: "too_small", minimum: def.length },
2571
+ inclusive: true,
2572
+ exact: true,
2573
+ input: payload.value,
2574
+ inst,
2575
+ continue: !def.abort
2576
+ });
2577
+ };
2578
+ });
2579
+ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
2580
+ $ZodCheck.init(inst, def);
2581
+ inst._zod.check = (payload) => {
2582
+ payload.value = def.tx(payload.value);
2583
+ };
2584
+ });
2585
+
2586
+ // ../../node_modules/zod/v4/core/doc.js
2587
+ var Doc = class {
2588
+ constructor(args = []) {
2589
+ this.content = [];
2590
+ this.indent = 0;
2591
+ if (this)
2592
+ this.args = args;
2593
+ }
2594
+ indented(fn) {
2595
+ this.indent += 1;
2596
+ fn(this);
2597
+ this.indent -= 1;
2598
+ }
2599
+ write(arg) {
2600
+ if (typeof arg === "function") {
2601
+ arg(this, { execution: "sync" });
2602
+ arg(this, { execution: "async" });
2603
+ return;
2604
+ }
2605
+ const content = arg;
2606
+ const lines = content.split("\n").filter((x) => x);
2607
+ const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
2608
+ const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
2609
+ for (const line of dedented) {
2610
+ this.content.push(line);
2611
+ }
2612
+ }
2613
+ compile() {
2614
+ const F = Function;
2615
+ const args = _optionalChain([this, 'optionalAccess', _68 => _68.args]);
2616
+ const content = _nullishCoalesce(_optionalChain([this, 'optionalAccess', _69 => _69.content]), () => ( [``]));
2617
+ const lines = [...content.map((x) => ` ${x}`)];
2618
+ return new F(...args, lines.join("\n"));
2619
+ }
2620
+ };
2621
+
2622
+ // ../../node_modules/zod/v4/core/versions.js
2623
+ var version = {
2624
+ major: 4,
2625
+ minor: 1,
2626
+ patch: 5
2627
+ };
2628
+
2629
+ // ../../node_modules/zod/v4/core/schemas.js
2630
+ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
2631
+ var _a;
2632
+ _nullishCoalesce(inst, () => ( (inst = {})));
2633
+ inst._zod.def = def;
2634
+ inst._zod.bag = inst._zod.bag || {};
2635
+ inst._zod.version = version;
2636
+ const checks = [..._nullishCoalesce(inst._zod.def.checks, () => ( []))];
2637
+ if (inst._zod.traits.has("$ZodCheck")) {
2638
+ checks.unshift(inst);
2639
+ }
2640
+ for (const ch of checks) {
2641
+ for (const fn of ch._zod.onattach) {
2642
+ fn(inst);
2643
+ }
2644
+ }
2645
+ if (checks.length === 0) {
2646
+ _nullishCoalesce((_a = inst._zod).deferred, () => ( (_a.deferred = [])));
2647
+ _optionalChain([inst, 'access', _70 => _70._zod, 'access', _71 => _71.deferred, 'optionalAccess', _72 => _72.push, 'call', _73 => _73(() => {
2648
+ inst._zod.run = inst._zod.parse;
2649
+ })]);
2650
+ } else {
2651
+ const runChecks = (payload, checks2, ctx) => {
2652
+ let isAborted = aborted(payload);
2653
+ let asyncResult;
2654
+ for (const ch of checks2) {
2655
+ if (ch._zod.def.when) {
2656
+ const shouldRun = ch._zod.def.when(payload);
2657
+ if (!shouldRun)
2658
+ continue;
2659
+ } else if (isAborted) {
2660
+ continue;
2661
+ }
2662
+ const currLen = payload.issues.length;
2663
+ const _ = ch._zod.check(payload);
2664
+ if (_ instanceof Promise && _optionalChain([ctx, 'optionalAccess', _74 => _74.async]) === false) {
2665
+ throw new $ZodAsyncError();
2666
+ }
2667
+ if (asyncResult || _ instanceof Promise) {
2668
+ asyncResult = (_nullishCoalesce(asyncResult, () => ( Promise.resolve()))).then(async () => {
2669
+ await _;
2670
+ const nextLen = payload.issues.length;
2671
+ if (nextLen === currLen)
2672
+ return;
2673
+ if (!isAborted)
2674
+ isAborted = aborted(payload, currLen);
2675
+ });
2676
+ } else {
2677
+ const nextLen = payload.issues.length;
2678
+ if (nextLen === currLen)
2679
+ continue;
2680
+ if (!isAborted)
2681
+ isAborted = aborted(payload, currLen);
2682
+ }
2683
+ }
2684
+ if (asyncResult) {
2685
+ return asyncResult.then(() => {
2686
+ return payload;
2687
+ });
2688
+ }
2689
+ return payload;
2690
+ };
2691
+ const handleCanaryResult = (canary, payload, ctx) => {
2692
+ if (aborted(canary)) {
2693
+ canary.aborted = true;
2694
+ return canary;
2695
+ }
2696
+ const checkResult = runChecks(payload, checks, ctx);
2697
+ if (checkResult instanceof Promise) {
2698
+ if (ctx.async === false)
2699
+ throw new $ZodAsyncError();
2700
+ return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx));
2701
+ }
2702
+ return inst._zod.parse(checkResult, ctx);
2703
+ };
2704
+ inst._zod.run = (payload, ctx) => {
2705
+ if (ctx.skipChecks) {
2706
+ return inst._zod.parse(payload, ctx);
2707
+ }
2708
+ if (ctx.direction === "backward") {
2709
+ const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
2710
+ if (canary instanceof Promise) {
2711
+ return canary.then((canary2) => {
2712
+ return handleCanaryResult(canary2, payload, ctx);
2713
+ });
2714
+ }
2715
+ return handleCanaryResult(canary, payload, ctx);
2716
+ }
2717
+ const result = inst._zod.parse(payload, ctx);
2718
+ if (result instanceof Promise) {
2719
+ if (ctx.async === false)
2720
+ throw new $ZodAsyncError();
2721
+ return result.then((result2) => runChecks(result2, checks, ctx));
2722
+ }
2723
+ return runChecks(result, checks, ctx);
2724
+ };
2725
+ }
2726
+ inst["~standard"] = {
2727
+ validate: (value) => {
2728
+ try {
2729
+ const r = safeParse(inst, value);
2730
+ return r.success ? { value: r.data } : { issues: _optionalChain([r, 'access', _75 => _75.error, 'optionalAccess', _76 => _76.issues]) };
2731
+ } catch (_) {
2732
+ return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: _optionalChain([r, 'access', _77 => _77.error, 'optionalAccess', _78 => _78.issues]) });
2733
+ }
2734
+ },
2735
+ vendor: "zod",
2736
+ version: 1
2737
+ };
2738
+ });
2739
+ var $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
2740
+ $ZodType.init(inst, def);
2741
+ inst._zod.parse = (payload) => payload;
2742
+ });
2743
+ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
2744
+ $ZodType.init(inst, def);
2745
+ inst._zod.parse = (payload, _ctx) => {
2746
+ payload.issues.push({
2747
+ expected: "never",
2748
+ code: "invalid_type",
2749
+ input: payload.value,
2750
+ inst
2751
+ });
2752
+ return payload;
2753
+ };
2754
+ });
2755
+ function handleArrayResult(result, final, index) {
2756
+ if (result.issues.length) {
2757
+ final.issues.push(...prefixIssues(index, result.issues));
2758
+ }
2759
+ final.value[index] = result.value;
2760
+ }
2761
+ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
2762
+ $ZodType.init(inst, def);
2763
+ inst._zod.parse = (payload, ctx) => {
2764
+ const input = payload.value;
2765
+ if (!Array.isArray(input)) {
2766
+ payload.issues.push({
2767
+ expected: "array",
2768
+ code: "invalid_type",
2769
+ input,
2770
+ inst
2771
+ });
2772
+ return payload;
2773
+ }
2774
+ payload.value = Array(input.length);
2775
+ const proms = [];
2776
+ for (let i = 0; i < input.length; i++) {
2777
+ const item = input[i];
2778
+ const result = def.element._zod.run({
2779
+ value: item,
2780
+ issues: []
2781
+ }, ctx);
2782
+ if (result instanceof Promise) {
2783
+ proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
2784
+ } else {
2785
+ handleArrayResult(result, payload, i);
2786
+ }
2787
+ }
2788
+ if (proms.length) {
2789
+ return Promise.all(proms).then(() => payload);
2790
+ }
2791
+ return payload;
2792
+ };
2793
+ });
2794
+ function handlePropertyResult(result, final, key, input) {
2795
+ if (result.issues.length) {
2796
+ final.issues.push(...prefixIssues(key, result.issues));
2797
+ }
2798
+ if (result.value === void 0) {
2799
+ if (key in input) {
2800
+ final.value[key] = void 0;
2801
+ }
2802
+ } else {
2803
+ final.value[key] = result.value;
2804
+ }
2805
+ }
2806
+ function normalizeDef(def) {
2807
+ const keys = Object.keys(def.shape);
2808
+ for (const k of keys) {
2809
+ if (!def.shape[k]._zod.traits.has("$ZodType")) {
2810
+ throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
2811
+ }
2812
+ }
2813
+ const okeys = optionalKeys(def.shape);
2814
+ return {
2815
+ ...def,
2816
+ keys,
2817
+ keySet: new Set(keys),
2818
+ numKeys: keys.length,
2819
+ optionalKeys: new Set(okeys)
2820
+ };
2821
+ }
2822
+ function handleCatchall(proms, input, payload, ctx, def, inst) {
2823
+ const unrecognized = [];
2824
+ const keySet = def.keySet;
2825
+ const _catchall = def.catchall._zod;
2826
+ const t = _catchall.def.type;
2827
+ for (const key of Object.keys(input)) {
2828
+ if (keySet.has(key))
2829
+ continue;
2830
+ if (t === "never") {
2831
+ unrecognized.push(key);
2832
+ continue;
2833
+ }
2834
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
2835
+ if (r instanceof Promise) {
2836
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input)));
2837
+ } else {
2838
+ handlePropertyResult(r, payload, key, input);
2839
+ }
2840
+ }
2841
+ if (unrecognized.length) {
2842
+ payload.issues.push({
2843
+ code: "unrecognized_keys",
2844
+ keys: unrecognized,
2845
+ input,
2846
+ inst
2847
+ });
2848
+ }
2849
+ if (!proms.length)
2850
+ return payload;
2851
+ return Promise.all(proms).then(() => {
2852
+ return payload;
2853
+ });
2854
+ }
2855
+ var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2856
+ $ZodType.init(inst, def);
2857
+ const _normalized = cached(() => normalizeDef(def));
2858
+ defineLazy(inst._zod, "propValues", () => {
2859
+ const shape2 = def.shape;
2860
+ const propValues = {};
2861
+ for (const key in shape2) {
2862
+ const field = shape2[key]._zod;
2863
+ if (field.values) {
2864
+ _nullishCoalesce(propValues[key], () => ( (propValues[key] = /* @__PURE__ */ new Set())));
2865
+ for (const v of field.values)
2866
+ propValues[key].add(v);
2867
+ }
2868
+ }
2869
+ return propValues;
2870
+ });
2871
+ const isObject2 = isObject;
2872
+ const catchall = def.catchall;
2873
+ let value;
2874
+ inst._zod.parse = (payload, ctx) => {
2875
+ _nullishCoalesce(value, () => ( (value = _normalized.value)));
2876
+ const input = payload.value;
2877
+ if (!isObject2(input)) {
2878
+ payload.issues.push({
2879
+ expected: "object",
2880
+ code: "invalid_type",
2881
+ input,
2882
+ inst
2883
+ });
2884
+ return payload;
2885
+ }
2886
+ payload.value = {};
2887
+ const proms = [];
2888
+ const shape2 = value.shape;
2889
+ for (const key of value.keys) {
2890
+ const el = shape2[key];
2891
+ const r = el._zod.run({ value: input[key], issues: [] }, ctx);
2892
+ if (r instanceof Promise) {
2893
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input)));
2894
+ } else {
2895
+ handlePropertyResult(r, payload, key, input);
2896
+ }
2897
+ }
2898
+ if (!catchall) {
2899
+ return proms.length ? Promise.all(proms).then(() => payload) : payload;
2900
+ }
2901
+ return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
2902
+ };
2903
+ });
2904
+ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
2905
+ $ZodObject.init(inst, def);
2906
+ const superParse = inst._zod.parse;
2907
+ const _normalized = cached(() => normalizeDef(def));
2908
+ const generateFastpass = (shape2) => {
2909
+ const doc = new Doc(["shape", "payload", "ctx"]);
2910
+ const normalized = _normalized.value;
2911
+ const parseStr = (key) => {
2912
+ const k = esc(key);
2913
+ return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
2914
+ };
2915
+ doc.write(`const input = payload.value;`);
2916
+ const ids = /* @__PURE__ */ Object.create(null);
2917
+ let counter = 0;
2918
+ for (const key of normalized.keys) {
2919
+ ids[key] = `key_${counter++}`;
2920
+ }
2921
+ doc.write(`const newResult = {}`);
2922
+ for (const key of normalized.keys) {
2923
+ const id = ids[key];
2924
+ const k = esc(key);
2925
+ doc.write(`const ${id} = ${parseStr(key)};`);
2926
+ doc.write(`
2927
+ if (${id}.issues.length) {
2928
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
2929
+ ...iss,
2930
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
2931
+ })));
2932
+ }
2933
+
2934
+ if (${id}.value === undefined) {
2935
+ if (${k} in input) {
2936
+ newResult[${k}] = undefined;
2937
+ }
2938
+ } else {
2939
+ newResult[${k}] = ${id}.value;
2940
+ }
2941
+ `);
2942
+ }
2943
+ doc.write(`payload.value = newResult;`);
2944
+ doc.write(`return payload;`);
2945
+ const fn = doc.compile();
2946
+ return (payload, ctx) => fn(shape2, payload, ctx);
2947
+ };
2948
+ let fastpass;
2949
+ const isObject2 = isObject;
2950
+ const jit = !globalConfig.jitless;
2951
+ const allowsEval2 = allowsEval;
2952
+ const fastEnabled = jit && allowsEval2.value;
2953
+ const catchall = def.catchall;
2954
+ let value;
2955
+ inst._zod.parse = (payload, ctx) => {
2956
+ _nullishCoalesce(value, () => ( (value = _normalized.value)));
2957
+ const input = payload.value;
2958
+ if (!isObject2(input)) {
2959
+ payload.issues.push({
2960
+ expected: "object",
2961
+ code: "invalid_type",
2962
+ input,
2963
+ inst
2964
+ });
2965
+ return payload;
2966
+ }
2967
+ if (jit && fastEnabled && _optionalChain([ctx, 'optionalAccess', _79 => _79.async]) === false && ctx.jitless !== true) {
2968
+ if (!fastpass)
2969
+ fastpass = generateFastpass(def.shape);
2970
+ payload = fastpass(payload, ctx);
2971
+ if (!catchall)
2972
+ return payload;
2973
+ return handleCatchall([], input, payload, ctx, value, inst);
2974
+ }
2975
+ return superParse(payload, ctx);
2976
+ };
2977
+ });
2978
+ function handleUnionResults(results, final, inst, ctx) {
2979
+ for (const result of results) {
2980
+ if (result.issues.length === 0) {
2981
+ final.value = result.value;
2982
+ return final;
2983
+ }
2984
+ }
2985
+ const nonaborted = results.filter((r) => !aborted(r));
2986
+ if (nonaborted.length === 1) {
2987
+ final.value = nonaborted[0].value;
2988
+ return nonaborted[0];
2989
+ }
2990
+ final.issues.push({
2991
+ code: "invalid_union",
2992
+ input: final.value,
2993
+ inst,
2994
+ errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
2995
+ });
2996
+ return final;
2997
+ }
2998
+ var $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2999
+ $ZodType.init(inst, def);
3000
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
3001
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
3002
+ defineLazy(inst._zod, "values", () => {
3003
+ if (def.options.every((o) => o._zod.values)) {
3004
+ return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
3005
+ }
3006
+ return void 0;
3007
+ });
3008
+ defineLazy(inst._zod, "pattern", () => {
3009
+ if (def.options.every((o) => o._zod.pattern)) {
3010
+ const patterns = def.options.map((o) => o._zod.pattern);
3011
+ return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
3012
+ }
3013
+ return void 0;
3014
+ });
3015
+ const single = def.options.length === 1;
3016
+ const first = def.options[0]._zod.run;
3017
+ inst._zod.parse = (payload, ctx) => {
3018
+ if (single) {
3019
+ return first(payload, ctx);
3020
+ }
3021
+ let async = false;
3022
+ const results = [];
3023
+ for (const option of def.options) {
3024
+ const result = option._zod.run({
3025
+ value: payload.value,
3026
+ issues: []
3027
+ }, ctx);
3028
+ if (result instanceof Promise) {
3029
+ results.push(result);
3030
+ async = true;
3031
+ } else {
3032
+ if (result.issues.length === 0)
3033
+ return result;
3034
+ results.push(result);
3035
+ }
3036
+ }
3037
+ if (!async)
3038
+ return handleUnionResults(results, payload, inst, ctx);
3039
+ return Promise.all(results).then((results2) => {
3040
+ return handleUnionResults(results2, payload, inst, ctx);
3041
+ });
3042
+ };
3043
+ });
3044
+ var $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
3045
+ $ZodType.init(inst, def);
3046
+ inst._zod.parse = (payload, ctx) => {
3047
+ const input = payload.value;
3048
+ const left = def.left._zod.run({ value: input, issues: [] }, ctx);
3049
+ const right = def.right._zod.run({ value: input, issues: [] }, ctx);
3050
+ const async = left instanceof Promise || right instanceof Promise;
3051
+ if (async) {
3052
+ return Promise.all([left, right]).then(([left2, right2]) => {
3053
+ return handleIntersectionResults(payload, left2, right2);
3054
+ });
3055
+ }
3056
+ return handleIntersectionResults(payload, left, right);
3057
+ };
3058
+ });
3059
+ function mergeValues(a, b) {
3060
+ if (a === b) {
3061
+ return { valid: true, data: a };
3062
+ }
3063
+ if (a instanceof Date && b instanceof Date && +a === +b) {
3064
+ return { valid: true, data: a };
3065
+ }
3066
+ if (isPlainObject(a) && isPlainObject(b)) {
3067
+ const bKeys = Object.keys(b);
3068
+ const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
3069
+ const newObj = { ...a, ...b };
3070
+ for (const key of sharedKeys) {
3071
+ const sharedValue = mergeValues(a[key], b[key]);
3072
+ if (!sharedValue.valid) {
3073
+ return {
3074
+ valid: false,
3075
+ mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
3076
+ };
3077
+ }
3078
+ newObj[key] = sharedValue.data;
3079
+ }
3080
+ return { valid: true, data: newObj };
3081
+ }
3082
+ if (Array.isArray(a) && Array.isArray(b)) {
3083
+ if (a.length !== b.length) {
3084
+ return { valid: false, mergeErrorPath: [] };
3085
+ }
3086
+ const newArray = [];
3087
+ for (let index = 0; index < a.length; index++) {
3088
+ const itemA = a[index];
3089
+ const itemB = b[index];
3090
+ const sharedValue = mergeValues(itemA, itemB);
3091
+ if (!sharedValue.valid) {
3092
+ return {
3093
+ valid: false,
3094
+ mergeErrorPath: [index, ...sharedValue.mergeErrorPath]
3095
+ };
3096
+ }
3097
+ newArray.push(sharedValue.data);
3098
+ }
3099
+ return { valid: true, data: newArray };
3100
+ }
3101
+ return { valid: false, mergeErrorPath: [] };
3102
+ }
3103
+ function handleIntersectionResults(result, left, right) {
3104
+ if (left.issues.length) {
3105
+ result.issues.push(...left.issues);
3106
+ }
3107
+ if (right.issues.length) {
3108
+ result.issues.push(...right.issues);
3109
+ }
3110
+ if (aborted(result))
3111
+ return result;
3112
+ const merged = mergeValues(left.value, right.value);
3113
+ if (!merged.valid) {
3114
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
3115
+ }
3116
+ result.value = merged.data;
3117
+ return result;
3118
+ }
3119
+ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
3120
+ $ZodType.init(inst, def);
3121
+ const values2 = getEnumValues(def.entries);
3122
+ const valuesSet = new Set(values2);
3123
+ inst._zod.values = valuesSet;
3124
+ inst._zod.pattern = new RegExp(`^(${values2.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
3125
+ inst._zod.parse = (payload, _ctx) => {
3126
+ const input = payload.value;
3127
+ if (valuesSet.has(input)) {
3128
+ return payload;
3129
+ }
3130
+ payload.issues.push({
3131
+ code: "invalid_value",
3132
+ values: values2,
3133
+ input,
3134
+ inst
3135
+ });
3136
+ return payload;
3137
+ };
3138
+ });
3139
+ var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
3140
+ $ZodType.init(inst, def);
3141
+ inst._zod.parse = (payload, ctx) => {
3142
+ if (ctx.direction === "backward") {
3143
+ throw new $ZodEncodeError(inst.constructor.name);
3144
+ }
3145
+ const _out = def.transform(payload.value, payload);
3146
+ if (ctx.async) {
3147
+ const output = _out instanceof Promise ? _out : Promise.resolve(_out);
3148
+ return output.then((output2) => {
3149
+ payload.value = output2;
3150
+ return payload;
3151
+ });
3152
+ }
3153
+ if (_out instanceof Promise) {
3154
+ throw new $ZodAsyncError();
3155
+ }
3156
+ payload.value = _out;
3157
+ return payload;
3158
+ };
3159
+ });
3160
+ function handleOptionalResult(result, input) {
3161
+ if (result.issues.length && input === void 0) {
3162
+ return { issues: [], value: void 0 };
3163
+ }
3164
+ return result;
3165
+ }
3166
+ var $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
3167
+ $ZodType.init(inst, def);
3168
+ inst._zod.optin = "optional";
3169
+ inst._zod.optout = "optional";
3170
+ defineLazy(inst._zod, "values", () => {
3171
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0;
3172
+ });
3173
+ defineLazy(inst._zod, "pattern", () => {
3174
+ const pattern = def.innerType._zod.pattern;
3175
+ return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
3176
+ });
3177
+ inst._zod.parse = (payload, ctx) => {
3178
+ if (def.innerType._zod.optin === "optional") {
3179
+ const result = def.innerType._zod.run(payload, ctx);
3180
+ if (result instanceof Promise)
3181
+ return result.then((r) => handleOptionalResult(r, payload.value));
3182
+ return handleOptionalResult(result, payload.value);
3183
+ }
3184
+ if (payload.value === void 0) {
3185
+ return payload;
3186
+ }
3187
+ return def.innerType._zod.run(payload, ctx);
3188
+ };
3189
+ });
3190
+ var $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
3191
+ $ZodType.init(inst, def);
3192
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3193
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3194
+ defineLazy(inst._zod, "pattern", () => {
3195
+ const pattern = def.innerType._zod.pattern;
3196
+ return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
3197
+ });
3198
+ defineLazy(inst._zod, "values", () => {
3199
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0;
3200
+ });
3201
+ inst._zod.parse = (payload, ctx) => {
3202
+ if (payload.value === null)
3203
+ return payload;
3204
+ return def.innerType._zod.run(payload, ctx);
3205
+ };
3206
+ });
3207
+ var $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
3208
+ $ZodType.init(inst, def);
3209
+ inst._zod.optin = "optional";
3210
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3211
+ inst._zod.parse = (payload, ctx) => {
3212
+ if (ctx.direction === "backward") {
3213
+ return def.innerType._zod.run(payload, ctx);
3214
+ }
3215
+ if (payload.value === void 0) {
3216
+ payload.value = def.defaultValue;
3217
+ return payload;
3218
+ }
3219
+ const result = def.innerType._zod.run(payload, ctx);
3220
+ if (result instanceof Promise) {
3221
+ return result.then((result2) => handleDefaultResult(result2, def));
3222
+ }
3223
+ return handleDefaultResult(result, def);
3224
+ };
3225
+ });
3226
+ function handleDefaultResult(payload, def) {
3227
+ if (payload.value === void 0) {
3228
+ payload.value = def.defaultValue;
3229
+ }
3230
+ return payload;
3231
+ }
3232
+ var $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
3233
+ $ZodType.init(inst, def);
3234
+ inst._zod.optin = "optional";
3235
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3236
+ inst._zod.parse = (payload, ctx) => {
3237
+ if (ctx.direction === "backward") {
3238
+ return def.innerType._zod.run(payload, ctx);
3239
+ }
3240
+ if (payload.value === void 0) {
3241
+ payload.value = def.defaultValue;
3242
+ }
3243
+ return def.innerType._zod.run(payload, ctx);
3244
+ };
3245
+ });
3246
+ var $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
3247
+ $ZodType.init(inst, def);
3248
+ defineLazy(inst._zod, "values", () => {
3249
+ const v = def.innerType._zod.values;
3250
+ return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
3251
+ });
3252
+ inst._zod.parse = (payload, ctx) => {
3253
+ const result = def.innerType._zod.run(payload, ctx);
3254
+ if (result instanceof Promise) {
3255
+ return result.then((result2) => handleNonOptionalResult(result2, inst));
3256
+ }
3257
+ return handleNonOptionalResult(result, inst);
3258
+ };
3259
+ });
3260
+ function handleNonOptionalResult(payload, inst) {
3261
+ if (!payload.issues.length && payload.value === void 0) {
3262
+ payload.issues.push({
3263
+ code: "invalid_type",
3264
+ expected: "nonoptional",
3265
+ input: payload.value,
3266
+ inst
3267
+ });
3268
+ }
3269
+ return payload;
3270
+ }
3271
+ var $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
3272
+ $ZodType.init(inst, def);
3273
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3274
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3275
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3276
+ inst._zod.parse = (payload, ctx) => {
3277
+ if (ctx.direction === "backward") {
3278
+ return def.innerType._zod.run(payload, ctx);
3279
+ }
3280
+ const result = def.innerType._zod.run(payload, ctx);
3281
+ if (result instanceof Promise) {
3282
+ return result.then((result2) => {
3283
+ payload.value = result2.value;
3284
+ if (result2.issues.length) {
3285
+ payload.value = def.catchValue({
3286
+ ...payload,
3287
+ error: {
3288
+ issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config()))
3289
+ },
3290
+ input: payload.value
3291
+ });
3292
+ payload.issues = [];
3293
+ }
3294
+ return payload;
3295
+ });
3296
+ }
3297
+ payload.value = result.value;
3298
+ if (result.issues.length) {
3299
+ payload.value = def.catchValue({
3300
+ ...payload,
3301
+ error: {
3302
+ issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config()))
3303
+ },
3304
+ input: payload.value
3305
+ });
3306
+ payload.issues = [];
3307
+ }
3308
+ return payload;
3309
+ };
3310
+ });
3311
+ var $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
3312
+ $ZodType.init(inst, def);
3313
+ defineLazy(inst._zod, "values", () => def.in._zod.values);
3314
+ defineLazy(inst._zod, "optin", () => def.in._zod.optin);
3315
+ defineLazy(inst._zod, "optout", () => def.out._zod.optout);
3316
+ defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
3317
+ inst._zod.parse = (payload, ctx) => {
3318
+ if (ctx.direction === "backward") {
3319
+ const right = def.out._zod.run(payload, ctx);
3320
+ if (right instanceof Promise) {
3321
+ return right.then((right2) => handlePipeResult(right2, def.in, ctx));
3322
+ }
3323
+ return handlePipeResult(right, def.in, ctx);
3324
+ }
3325
+ const left = def.in._zod.run(payload, ctx);
3326
+ if (left instanceof Promise) {
3327
+ return left.then((left2) => handlePipeResult(left2, def.out, ctx));
3328
+ }
3329
+ return handlePipeResult(left, def.out, ctx);
3330
+ };
3331
+ });
3332
+ function handlePipeResult(left, next, ctx) {
3333
+ if (left.issues.length) {
3334
+ left.aborted = true;
3335
+ return left;
3336
+ }
3337
+ return next._zod.run({ value: left.value, issues: left.issues }, ctx);
3338
+ }
3339
+ var $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
3340
+ $ZodType.init(inst, def);
3341
+ defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
3342
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
3343
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
3344
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
3345
+ inst._zod.parse = (payload, ctx) => {
3346
+ if (ctx.direction === "backward") {
3347
+ return def.innerType._zod.run(payload, ctx);
3348
+ }
3349
+ const result = def.innerType._zod.run(payload, ctx);
3350
+ if (result instanceof Promise) {
3351
+ return result.then(handleReadonlyResult);
3352
+ }
3353
+ return handleReadonlyResult(result);
3354
+ };
3355
+ });
3356
+ function handleReadonlyResult(payload) {
3357
+ payload.value = Object.freeze(payload.value);
3358
+ return payload;
3359
+ }
3360
+ var $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
3361
+ $ZodCheck.init(inst, def);
3362
+ $ZodType.init(inst, def);
3363
+ inst._zod.parse = (payload, _) => {
3364
+ return payload;
3365
+ };
3366
+ inst._zod.check = (payload) => {
3367
+ const input = payload.value;
3368
+ const r = def.fn(input);
3369
+ if (r instanceof Promise) {
3370
+ return r.then((r2) => handleRefineResult(r2, payload, input, inst));
3371
+ }
3372
+ handleRefineResult(r, payload, input, inst);
3373
+ return;
3374
+ };
3375
+ });
3376
+ function handleRefineResult(result, payload, input, inst) {
3377
+ if (!result) {
3378
+ const _iss = {
3379
+ code: "custom",
3380
+ input,
3381
+ inst,
3382
+ // incorporates params.error into issue reporting
3383
+ path: [..._nullishCoalesce(inst._zod.def.path, () => ( []))],
3384
+ // incorporates params.error into issue reporting
3385
+ continue: !inst._zod.def.abort
3386
+ // params: inst._zod.def.params,
3387
+ };
3388
+ if (inst._zod.def.params)
3389
+ _iss.params = inst._zod.def.params;
3390
+ payload.issues.push(issue(_iss));
3391
+ }
3392
+ }
3393
+
3394
+ // ../../node_modules/zod/v4/core/registries.js
3395
+ var $output = Symbol("ZodOutput");
3396
+ var $input = Symbol("ZodInput");
3397
+ var $ZodRegistry = class {
3398
+ constructor() {
3399
+ this._map = /* @__PURE__ */ new Map();
3400
+ this._idmap = /* @__PURE__ */ new Map();
3401
+ }
3402
+ add(schema, ..._meta) {
3403
+ const meta = _meta[0];
3404
+ this._map.set(schema, meta);
3405
+ if (meta && typeof meta === "object" && "id" in meta) {
3406
+ if (this._idmap.has(meta.id)) {
3407
+ throw new Error(`ID ${meta.id} already exists in the registry`);
3408
+ }
3409
+ this._idmap.set(meta.id, schema);
3410
+ }
3411
+ return this;
3412
+ }
3413
+ clear() {
3414
+ this._map = /* @__PURE__ */ new Map();
3415
+ this._idmap = /* @__PURE__ */ new Map();
3416
+ return this;
3417
+ }
3418
+ remove(schema) {
3419
+ const meta = this._map.get(schema);
3420
+ if (meta && typeof meta === "object" && "id" in meta) {
3421
+ this._idmap.delete(meta.id);
3422
+ }
3423
+ this._map.delete(schema);
3424
+ return this;
3425
+ }
3426
+ get(schema) {
3427
+ const p = schema._zod.parent;
3428
+ if (p) {
3429
+ const pm = { ..._nullishCoalesce(this.get(p), () => ( {})) };
3430
+ delete pm.id;
3431
+ const f = { ...pm, ...this._map.get(schema) };
3432
+ return Object.keys(f).length ? f : void 0;
3433
+ }
3434
+ return this._map.get(schema);
3435
+ }
3436
+ has(schema) {
3437
+ return this._map.has(schema);
3438
+ }
3439
+ };
3440
+ function registry() {
3441
+ return new $ZodRegistry();
3442
+ }
3443
+ var globalRegistry = /* @__PURE__ */ registry();
3444
+
3445
+ // ../../node_modules/zod/v4/core/api.js
3446
+ function _unknown(Class2) {
3447
+ return new Class2({
3448
+ type: "unknown"
3449
+ });
3450
+ }
3451
+ function _never(Class2, params) {
3452
+ return new Class2({
3453
+ type: "never",
3454
+ ...normalizeParams(params)
3455
+ });
3456
+ }
3457
+ function _maxLength(maximum, params) {
3458
+ const ch = new $ZodCheckMaxLength({
3459
+ check: "max_length",
3460
+ ...normalizeParams(params),
3461
+ maximum
3462
+ });
3463
+ return ch;
3464
+ }
3465
+ function _minLength(minimum, params) {
3466
+ return new $ZodCheckMinLength({
3467
+ check: "min_length",
3468
+ ...normalizeParams(params),
3469
+ minimum
3470
+ });
3471
+ }
3472
+ function _length(length, params) {
3473
+ return new $ZodCheckLengthEquals({
3474
+ check: "length_equals",
3475
+ ...normalizeParams(params),
3476
+ length
3477
+ });
3478
+ }
3479
+ function _overwrite(tx) {
3480
+ return new $ZodCheckOverwrite({
3481
+ check: "overwrite",
3482
+ tx
3483
+ });
3484
+ }
3485
+ function _array(Class2, element, params) {
3486
+ return new Class2({
3487
+ type: "array",
3488
+ element,
3489
+ // get element() {
3490
+ // return element;
3491
+ // },
3492
+ ...normalizeParams(params)
3493
+ });
3494
+ }
3495
+ function _refine(Class2, fn, _params) {
3496
+ const schema = new Class2({
3497
+ type: "custom",
3498
+ check: "custom",
3499
+ fn,
3500
+ ...normalizeParams(_params)
3501
+ });
3502
+ return schema;
3503
+ }
3504
+ function _superRefine(fn) {
3505
+ const ch = _check((payload) => {
3506
+ payload.addIssue = (issue2) => {
3507
+ if (typeof issue2 === "string") {
3508
+ payload.issues.push(issue(issue2, payload.value, ch._zod.def));
3509
+ } else {
3510
+ const _issue = issue2;
3511
+ if (_issue.fatal)
3512
+ _issue.continue = false;
3513
+ _nullishCoalesce(_issue.code, () => ( (_issue.code = "custom")));
3514
+ _nullishCoalesce(_issue.input, () => ( (_issue.input = payload.value)));
3515
+ _nullishCoalesce(_issue.inst, () => ( (_issue.inst = ch)));
3516
+ _nullishCoalesce(_issue.continue, () => ( (_issue.continue = !ch._zod.def.abort)));
3517
+ payload.issues.push(issue(_issue));
3518
+ }
3519
+ };
3520
+ return fn(payload.value, payload);
3521
+ });
3522
+ return ch;
3523
+ }
3524
+ function _check(fn, params) {
3525
+ const ch = new $ZodCheck({
3526
+ check: "custom",
3527
+ ...normalizeParams(params)
3528
+ });
3529
+ ch._zod.check = fn;
3530
+ return ch;
3531
+ }
3532
+
3533
+ // ../../node_modules/zod/v4/classic/errors.js
3534
+ var initializer2 = (inst, issues) => {
3535
+ $ZodError.init(inst, issues);
3536
+ inst.name = "ZodError";
3537
+ Object.defineProperties(inst, {
3538
+ format: {
3539
+ value: (mapper) => formatError(inst, mapper)
3540
+ // enumerable: false,
3541
+ },
3542
+ flatten: {
3543
+ value: (mapper) => flattenError(inst, mapper)
3544
+ // enumerable: false,
3545
+ },
3546
+ addIssue: {
3547
+ value: (issue2) => {
3548
+ inst.issues.push(issue2);
3549
+ inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
3550
+ }
3551
+ // enumerable: false,
3552
+ },
3553
+ addIssues: {
3554
+ value: (issues2) => {
3555
+ inst.issues.push(...issues2);
3556
+ inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
3557
+ }
3558
+ // enumerable: false,
3559
+ },
3560
+ isEmpty: {
3561
+ get() {
3562
+ return inst.issues.length === 0;
3563
+ }
3564
+ // enumerable: false,
3565
+ }
3566
+ });
3567
+ };
3568
+ var ZodError = $constructor("ZodError", initializer2);
3569
+ var ZodRealError = $constructor("ZodError", initializer2, {
3570
+ Parent: Error
3571
+ });
3572
+
3573
+ // ../../node_modules/zod/v4/classic/parse.js
3574
+ var parse2 = /* @__PURE__ */ _parse(ZodRealError);
3575
+ var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
3576
+ var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
3577
+ var safeParseAsync2 = /* @__PURE__ */ _safeParseAsync(ZodRealError);
3578
+ var encode = /* @__PURE__ */ _encode(ZodRealError);
3579
+ var decode = /* @__PURE__ */ _decode(ZodRealError);
3580
+ var encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError);
3581
+ var decodeAsync = /* @__PURE__ */ _decodeAsync(ZodRealError);
3582
+ var safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
3583
+ var safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
3584
+ var safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
3585
+ var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
3586
+
3587
+ // ../../node_modules/zod/v4/classic/schemas.js
3588
+ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
3589
+ $ZodType.init(inst, def);
3590
+ inst.def = def;
3591
+ inst.type = def.type;
3592
+ Object.defineProperty(inst, "_def", { value: def });
3593
+ inst.check = (...checks) => {
3594
+ return inst.clone(
3595
+ {
3596
+ ...def,
3597
+ checks: [
3598
+ ..._nullishCoalesce(def.checks, () => ( [])),
3599
+ ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
3600
+ ]
3601
+ }
3602
+ // { parent: true }
3603
+ );
3604
+ };
3605
+ inst.clone = (def2, params) => clone(inst, def2, params);
3606
+ inst.brand = () => inst;
3607
+ inst.register = ((reg, meta) => {
3608
+ reg.add(inst, meta);
3609
+ return inst;
3610
+ });
3611
+ inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
3612
+ inst.safeParse = (data, params) => safeParse2(inst, data, params);
3613
+ inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
3614
+ inst.safeParseAsync = async (data, params) => safeParseAsync2(inst, data, params);
3615
+ inst.spa = inst.safeParseAsync;
3616
+ inst.encode = (data, params) => encode(inst, data, params);
3617
+ inst.decode = (data, params) => decode(inst, data, params);
3618
+ inst.encodeAsync = async (data, params) => encodeAsync(inst, data, params);
3619
+ inst.decodeAsync = async (data, params) => decodeAsync(inst, data, params);
3620
+ inst.safeEncode = (data, params) => safeEncode(inst, data, params);
3621
+ inst.safeDecode = (data, params) => safeDecode(inst, data, params);
3622
+ inst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params);
3623
+ inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);
3624
+ inst.refine = (check, params) => inst.check(refine(check, params));
3625
+ inst.superRefine = (refinement) => inst.check(superRefine(refinement));
3626
+ inst.overwrite = (fn) => inst.check(_overwrite(fn));
3627
+ inst.optional = () => optional(inst);
3628
+ inst.nullable = () => nullable(inst);
3629
+ inst.nullish = () => optional(nullable(inst));
3630
+ inst.nonoptional = (params) => nonoptional(inst, params);
3631
+ inst.array = () => array(inst);
3632
+ inst.or = (arg) => union([inst, arg]);
3633
+ inst.and = (arg) => intersection(inst, arg);
3634
+ inst.transform = (tx) => pipe(inst, transform(tx));
3635
+ inst.default = (def2) => _default(inst, def2);
3636
+ inst.prefault = (def2) => prefault(inst, def2);
3637
+ inst.catch = (params) => _catch(inst, params);
3638
+ inst.pipe = (target) => pipe(inst, target);
3639
+ inst.readonly = () => readonly(inst);
3640
+ inst.describe = (description) => {
3641
+ const cl = inst.clone();
3642
+ globalRegistry.add(cl, { description });
3643
+ return cl;
3644
+ };
3645
+ Object.defineProperty(inst, "description", {
3646
+ get() {
3647
+ return _optionalChain([globalRegistry, 'access', _80 => _80.get, 'call', _81 => _81(inst), 'optionalAccess', _82 => _82.description]);
3648
+ },
3649
+ configurable: true
3650
+ });
3651
+ inst.meta = (...args) => {
3652
+ if (args.length === 0) {
3653
+ return globalRegistry.get(inst);
3654
+ }
3655
+ const cl = inst.clone();
3656
+ globalRegistry.add(cl, args[0]);
3657
+ return cl;
3658
+ };
3659
+ inst.isOptional = () => inst.safeParse(void 0).success;
3660
+ inst.isNullable = () => inst.safeParse(null).success;
3661
+ return inst;
3662
+ });
3663
+ var ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
3664
+ $ZodUnknown.init(inst, def);
3665
+ ZodType.init(inst, def);
3666
+ });
3667
+ function unknown() {
3668
+ return _unknown(ZodUnknown);
3669
+ }
3670
+ var ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
3671
+ $ZodNever.init(inst, def);
3672
+ ZodType.init(inst, def);
3673
+ });
3674
+ function never(params) {
3675
+ return _never(ZodNever, params);
3676
+ }
3677
+ var ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
3678
+ $ZodArray.init(inst, def);
3679
+ ZodType.init(inst, def);
3680
+ inst.element = def.element;
3681
+ inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
3682
+ inst.nonempty = (params) => inst.check(_minLength(1, params));
3683
+ inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
3684
+ inst.length = (len, params) => inst.check(_length(len, params));
3685
+ inst.unwrap = () => inst.element;
3686
+ });
3687
+ function array(element, params) {
3688
+ return _array(ZodArray, element, params);
3689
+ }
3690
+ var ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
3691
+ $ZodObjectJIT.init(inst, def);
3692
+ ZodType.init(inst, def);
3693
+ util_exports.defineLazy(inst, "shape", () => def.shape);
3694
+ inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
3695
+ inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
3696
+ inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
3697
+ inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
3698
+ inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
3699
+ inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
3700
+ inst.extend = (incoming) => {
3701
+ return util_exports.extend(inst, incoming);
3702
+ };
3703
+ inst.safeExtend = (incoming) => {
3704
+ return util_exports.safeExtend(inst, incoming);
3705
+ };
3706
+ inst.merge = (other) => util_exports.merge(inst, other);
3707
+ inst.pick = (mask) => util_exports.pick(inst, mask);
3708
+ inst.omit = (mask) => util_exports.omit(inst, mask);
3709
+ inst.partial = (...args) => util_exports.partial(ZodOptional, inst, args[0]);
3710
+ inst.required = (...args) => util_exports.required(ZodNonOptional, inst, args[0]);
3711
+ });
3712
+ var ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
3713
+ $ZodUnion.init(inst, def);
3714
+ ZodType.init(inst, def);
3715
+ inst.options = def.options;
3716
+ });
3717
+ function union(options, params) {
3718
+ return new ZodUnion({
3719
+ type: "union",
3720
+ options,
3721
+ ...util_exports.normalizeParams(params)
3722
+ });
3723
+ }
3724
+ var ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
3725
+ $ZodIntersection.init(inst, def);
3726
+ ZodType.init(inst, def);
3727
+ });
3728
+ function intersection(left, right) {
3729
+ return new ZodIntersection({
3730
+ type: "intersection",
3731
+ left,
3732
+ right
3733
+ });
3734
+ }
3735
+ var ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
3736
+ $ZodEnum.init(inst, def);
3737
+ ZodType.init(inst, def);
3738
+ inst.enum = def.entries;
3739
+ inst.options = Object.values(def.entries);
3740
+ const keys = new Set(Object.keys(def.entries));
3741
+ inst.extract = (values2, params) => {
3742
+ const newEntries = {};
3743
+ for (const value of values2) {
3744
+ if (keys.has(value)) {
3745
+ newEntries[value] = def.entries[value];
3746
+ } else
3747
+ throw new Error(`Key ${value} not found in enum`);
3748
+ }
3749
+ return new ZodEnum({
3750
+ ...def,
3751
+ checks: [],
3752
+ ...util_exports.normalizeParams(params),
3753
+ entries: newEntries
3754
+ });
3755
+ };
3756
+ inst.exclude = (values2, params) => {
3757
+ const newEntries = { ...def.entries };
3758
+ for (const value of values2) {
3759
+ if (keys.has(value)) {
3760
+ delete newEntries[value];
3761
+ } else
3762
+ throw new Error(`Key ${value} not found in enum`);
3763
+ }
3764
+ return new ZodEnum({
3765
+ ...def,
3766
+ checks: [],
3767
+ ...util_exports.normalizeParams(params),
3768
+ entries: newEntries
3769
+ });
3770
+ };
3771
+ });
3772
+ function _enum(values2, params) {
3773
+ const entries = Array.isArray(values2) ? Object.fromEntries(values2.map((v) => [v, v])) : values2;
3774
+ return new ZodEnum({
3775
+ type: "enum",
3776
+ entries,
3777
+ ...util_exports.normalizeParams(params)
3778
+ });
3779
+ }
3780
+ var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
3781
+ $ZodTransform.init(inst, def);
3782
+ ZodType.init(inst, def);
3783
+ inst._zod.parse = (payload, _ctx) => {
3784
+ if (_ctx.direction === "backward") {
3785
+ throw new $ZodEncodeError(inst.constructor.name);
3786
+ }
3787
+ payload.addIssue = (issue2) => {
3788
+ if (typeof issue2 === "string") {
3789
+ payload.issues.push(util_exports.issue(issue2, payload.value, def));
3790
+ } else {
3791
+ const _issue = issue2;
3792
+ if (_issue.fatal)
3793
+ _issue.continue = false;
3794
+ _nullishCoalesce(_issue.code, () => ( (_issue.code = "custom")));
3795
+ _nullishCoalesce(_issue.input, () => ( (_issue.input = payload.value)));
3796
+ _nullishCoalesce(_issue.inst, () => ( (_issue.inst = inst)));
3797
+ payload.issues.push(util_exports.issue(_issue));
3798
+ }
3799
+ };
3800
+ const output = def.transform(payload.value, payload);
3801
+ if (output instanceof Promise) {
3802
+ return output.then((output2) => {
3803
+ payload.value = output2;
3804
+ return payload;
3805
+ });
3806
+ }
3807
+ payload.value = output;
3808
+ return payload;
3809
+ };
3810
+ });
3811
+ function transform(fn) {
3812
+ return new ZodTransform({
3813
+ type: "transform",
3814
+ transform: fn
3815
+ });
3816
+ }
3817
+ var ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
3818
+ $ZodOptional.init(inst, def);
3819
+ ZodType.init(inst, def);
3820
+ inst.unwrap = () => inst._zod.def.innerType;
3821
+ });
3822
+ function optional(innerType) {
3823
+ return new ZodOptional({
3824
+ type: "optional",
3825
+ innerType
3826
+ });
3827
+ }
3828
+ var ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
3829
+ $ZodNullable.init(inst, def);
3830
+ ZodType.init(inst, def);
3831
+ inst.unwrap = () => inst._zod.def.innerType;
3832
+ });
3833
+ function nullable(innerType) {
3834
+ return new ZodNullable({
3835
+ type: "nullable",
3836
+ innerType
3837
+ });
3838
+ }
3839
+ var ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
3840
+ $ZodDefault.init(inst, def);
3841
+ ZodType.init(inst, def);
3842
+ inst.unwrap = () => inst._zod.def.innerType;
3843
+ inst.removeDefault = inst.unwrap;
3844
+ });
3845
+ function _default(innerType, defaultValue) {
3846
+ return new ZodDefault({
3847
+ type: "default",
3848
+ innerType,
3849
+ get defaultValue() {
3850
+ return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue);
3851
+ }
3852
+ });
3853
+ }
3854
+ var ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
3855
+ $ZodPrefault.init(inst, def);
3856
+ ZodType.init(inst, def);
3857
+ inst.unwrap = () => inst._zod.def.innerType;
3858
+ });
3859
+ function prefault(innerType, defaultValue) {
3860
+ return new ZodPrefault({
3861
+ type: "prefault",
3862
+ innerType,
3863
+ get defaultValue() {
3864
+ return typeof defaultValue === "function" ? defaultValue() : util_exports.shallowClone(defaultValue);
3865
+ }
3866
+ });
3867
+ }
3868
+ var ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
3869
+ $ZodNonOptional.init(inst, def);
3870
+ ZodType.init(inst, def);
3871
+ inst.unwrap = () => inst._zod.def.innerType;
3872
+ });
3873
+ function nonoptional(innerType, params) {
3874
+ return new ZodNonOptional({
3875
+ type: "nonoptional",
3876
+ innerType,
3877
+ ...util_exports.normalizeParams(params)
3878
+ });
3879
+ }
3880
+ var ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
3881
+ $ZodCatch.init(inst, def);
3882
+ ZodType.init(inst, def);
3883
+ inst.unwrap = () => inst._zod.def.innerType;
3884
+ inst.removeCatch = inst.unwrap;
3885
+ });
3886
+ function _catch(innerType, catchValue) {
3887
+ return new ZodCatch({
3888
+ type: "catch",
3889
+ innerType,
3890
+ catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
3891
+ });
3892
+ }
3893
+ var ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
3894
+ $ZodPipe.init(inst, def);
3895
+ ZodType.init(inst, def);
3896
+ inst.in = def.in;
3897
+ inst.out = def.out;
3898
+ });
3899
+ function pipe(in_, out) {
3900
+ return new ZodPipe({
3901
+ type: "pipe",
3902
+ in: in_,
3903
+ out
3904
+ // ...util.normalizeParams(params),
3905
+ });
3906
+ }
3907
+ var ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
3908
+ $ZodReadonly.init(inst, def);
3909
+ ZodType.init(inst, def);
3910
+ inst.unwrap = () => inst._zod.def.innerType;
3911
+ });
3912
+ function readonly(innerType) {
3913
+ return new ZodReadonly({
3914
+ type: "readonly",
3915
+ innerType
3916
+ });
3917
+ }
3918
+ var ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
3919
+ $ZodCustom.init(inst, def);
3920
+ ZodType.init(inst, def);
3921
+ });
3922
+ function refine(fn, _params = {}) {
3923
+ return _refine(ZodCustom, fn, _params);
3924
+ }
3925
+ function superRefine(fn) {
3926
+ return _superRefine(fn);
3927
+ }
3928
+
3929
+ // src/form/validator.ts
3930
+ var Validator = class {
3931
+ constructor(schema) {
3932
+ this.schema = schema;
3933
+ }
3934
+ /**
3935
+ * Validate the entire object payload.
3936
+ */
3937
+ validate(payload) {
3938
+ const parsed = this.schema.safeParse(payload);
3939
+ if (parsed.success) {
3940
+ return { isValid: true, value: parsed.data };
3941
+ }
3942
+ return { isValid: false, issues: parsed.error.issues };
3943
+ }
3944
+ /**
3945
+ * Validate only the fields present in `payload`.
3946
+ * Returns success if all provided keys pass their individual checks.
3947
+ */
3948
+ validatePartial(payload) {
3949
+ if (!(this.schema instanceof ZodObject)) {
3950
+ throw new Error("Partial validation requires a ZodObject schema");
3951
+ }
3952
+ const partialSchema = this.schema.strict().partial();
3953
+ const parsed = partialSchema.safeParse(payload);
3954
+ if (parsed.success) {
3955
+ return { isValid: true, value: parsed.data };
3956
+ } else {
3957
+ return { isValid: false, issues: parsed.error.issues };
3958
+ }
3959
+ }
3960
+ /**
3961
+ * Validate a single property by key and value.
3962
+ * Requires the schema to be a ZodObject.
3963
+ */
3964
+ validateProperty(key, value) {
3965
+ return this.validatePartial({ [key]: value });
3966
+ }
3967
+ };
3968
+
3969
+ // src/web-components/wavelength-form.ts
3970
+ var WavelengthForm = class extends HTMLElement {
3971
+ constructor() {
3972
+ super();
3973
+ this._fields = [];
3974
+ this._value = {};
3975
+ this._errors = {};
3976
+ this._inputProps = {};
3977
+ this._idPrefix = "";
3978
+ this._title = "";
3979
+ this._titleAlign = "left";
3980
+ this._titleColor = "";
3981
+ this._formWidth = "300px";
3982
+ // --- Event handlers ---
3983
+ this.onInputChange = (name, rawValue) => {
3984
+ this._value = { ...this._value, [name]: rawValue };
3985
+ const res = _optionalChain([this, 'access', _83 => _83._validator, 'optionalAccess', _84 => _84.validate, 'call', _85 => _85(this._value)]);
3986
+ const issues = res && !res.isValid ? _nullishCoalesce(res.issues, () => ( [])) : [];
3987
+ this.dispatchEvent(
3988
+ new CustomEvent("form-change", {
3989
+ detail: { value: { ...this._value }, issues }
3990
+ })
3991
+ );
3992
+ };
3993
+ this.onBlur = (name) => {
3994
+ const field = this._fields.find((f) => f.name === name);
3995
+ const el = this.queryFieldEl(name);
3996
+ if (!field || !el) return;
3997
+ let value;
3998
+ if (field.type === "checkbox") {
3999
+ value = el.checked;
4000
+ } else if (field.type === "number") {
4001
+ const raw = _nullishCoalesce(el.value, () => ( ""));
4002
+ value = raw === "" ? void 0 : Number(raw);
4003
+ } else {
4004
+ value = _nullishCoalesce(el.value, () => ( ""));
4005
+ }
4006
+ this.validateField(name, value);
4007
+ };
4008
+ this.onSubmit = (e) => {
4009
+ e.preventDefault();
4010
+ const res = this.validateAll();
4011
+ const submitEvent = typeof SubmitEvent === "function" ? new SubmitEvent("submit", { bubbles: true, cancelable: true, composed: true }) : new Event("submit", { bubbles: true, cancelable: true, composed: true });
4012
+ this.dispatchEvent(submitEvent);
4013
+ if (res.isValid) {
4014
+ this.dispatchEvent(new CustomEvent("form-valid", { detail: { value: res.value, issues: [] } }));
4015
+ } else {
4016
+ this.dispatchEvent(new CustomEvent("form-invalid", { detail: { value: res.value, issues: res.issues } }));
4017
+ }
4018
+ };
4019
+ this._shadow = this.attachShadow({ mode: "open" });
4020
+ }
4021
+ static get observedAttributes() {
4022
+ return ["id-prefix", "title", "title-align", "title-color", "form-width"];
4023
+ }
4024
+ // --- Public API ---
4025
+ /**
4026
+ * Assign a Zod object schema to render. (required)
4027
+ */
4028
+ set schema(s) {
4029
+ this._schema = s;
4030
+ this._validator = s ? new Validator(s) : void 0;
4031
+ this._fields = s ? zodToFields(s) : [];
4032
+ this._errors = {};
4033
+ this.render();
4034
+ }
4035
+ get schema() {
4036
+ return this._schema;
4037
+ }
4038
+ /**
4039
+ * Optional initial values. You can also set individual values
4040
+ * by dispatching inputChange from your inputs after mount.
4041
+ */
4042
+ set value(v) {
4043
+ this._value = _nullishCoalesce(v, () => ( {}));
4044
+ this.render();
4045
+ }
4046
+ get value() {
4047
+ return this.collectValues();
4048
+ }
4049
+ set leftButton(v) {
4050
+ this._leftButton = v;
4051
+ this.render();
4052
+ }
4053
+ get leftButton() {
4054
+ return this._leftButton;
4055
+ }
4056
+ set centerButton(v) {
4057
+ this._centerButton = v;
4058
+ this.render();
4059
+ }
4060
+ get centerButton() {
4061
+ return this._centerButton;
4062
+ }
4063
+ set rightButton(v) {
4064
+ this._rightButton = v;
4065
+ this.render();
4066
+ }
4067
+ get rightButton() {
4068
+ return this._rightButton;
4069
+ }
4070
+ set inputProps(v) {
4071
+ this._inputProps = _nullishCoalesce(v, () => ( {}));
4072
+ this.render();
4073
+ }
4074
+ get inputProps() {
4075
+ return this._inputProps;
4076
+ }
4077
+ set idPrefix(v) {
4078
+ this._idPrefix = _nullishCoalesce(v, () => ( ""));
4079
+ this.render();
4080
+ }
4081
+ get idPrefix() {
4082
+ return this._idPrefix || void 0;
4083
+ }
4084
+ /** Heading text displayed above the form */
4085
+ set title(v) {
4086
+ this._title = _nullishCoalesce(v, () => ( ""));
4087
+ if (v === "") {
4088
+ this.removeAttribute("title");
4089
+ } else {
4090
+ this.setAttribute("title", v);
1488
4091
  }
1489
- if (href && !disabled) {
1490
- this.button.onclick = () => window.open(href, target);
1491
- this.button.style.cursor = "pointer";
4092
+ this.render();
4093
+ }
4094
+ get title() {
4095
+ return this._title;
4096
+ }
4097
+ /** CSS text-align value applied to the heading */
4098
+ set titleAlign(v) {
4099
+ this._titleAlign = _nullishCoalesce(v, () => ( "left"));
4100
+ this.setAttribute("title-align", this._titleAlign);
4101
+ this.render();
4102
+ }
4103
+ get titleAlign() {
4104
+ return this._titleAlign;
4105
+ }
4106
+ /** Color applied to the heading text */
4107
+ set titleColor(v) {
4108
+ this._titleColor = _nullishCoalesce(v, () => ( ""));
4109
+ if (v === void 0) {
4110
+ this.removeAttribute("title-color");
1492
4111
  } else {
1493
- this.button.onclick = null;
4112
+ this.setAttribute("title-color", this._titleColor);
1494
4113
  }
1495
- this.button.removeEventListener("mouseenter", this.handleHoverIn);
1496
- this.button.removeEventListener("mouseleave", this.handleHoverOut);
1497
- this.handleHoverIn = () => {
1498
- if (variant === "contained") {
1499
- this.button.style.backgroundColor = this.shadeColor(colorOne, -15);
1500
- } else {
1501
- this.button.style.backgroundColor = this.hexToRgba(colorOne, 0.05);
4114
+ this.render();
4115
+ }
4116
+ get titleColor() {
4117
+ return this._titleColor || void 0;
4118
+ }
4119
+ /** Width applied to the form element */
4120
+ set formWidth(v) {
4121
+ this._formWidth = _nullishCoalesce(v, () => ( "300px"));
4122
+ if (v === void 0) {
4123
+ this.removeAttribute("form-width");
4124
+ } else {
4125
+ this.setAttribute("form-width", this._formWidth);
4126
+ }
4127
+ this.render();
4128
+ }
4129
+ get formWidth() {
4130
+ return this._formWidth;
4131
+ }
4132
+ /** Array describing how many fields appear in each row */
4133
+ set layout(v) {
4134
+ this._layout = v;
4135
+ this.render();
4136
+ }
4137
+ get layout() {
4138
+ return this._layout;
4139
+ }
4140
+ /**
4141
+ * Imperative validation without submitting.
4142
+ * Returns true if the current form values are valid.
4143
+ */
4144
+ validate() {
4145
+ return this.validateAll().isValid;
4146
+ }
4147
+ connectedCallback() {
4148
+ this.render();
4149
+ }
4150
+ attributeChangedCallback(name, _old, value) {
4151
+ if (name === "id-prefix") {
4152
+ this._idPrefix = _nullishCoalesce(value, () => ( ""));
4153
+ this.render();
4154
+ } else if (name === "title") {
4155
+ this._title = _nullishCoalesce(value, () => ( ""));
4156
+ this.render();
4157
+ } else if (name === "title-align") {
4158
+ this._titleAlign = _nullishCoalesce(value, () => ( "left"));
4159
+ this.render();
4160
+ } else if (name === "title-color") {
4161
+ this._titleColor = _nullishCoalesce(value, () => ( ""));
4162
+ this.render();
4163
+ } else if (name === "form-width") {
4164
+ this._formWidth = _nullishCoalesce(value, () => ( "300px"));
4165
+ if (value === null) {
4166
+ this.removeAttribute("form-width");
1502
4167
  }
1503
- };
1504
- this.handleHoverOut = () => {
1505
- if (variant === "contained") {
1506
- this.button.style.backgroundColor = colorOne;
4168
+ this.render();
4169
+ }
4170
+ }
4171
+ // --- Internal helpers ---
4172
+ collectValues() {
4173
+ const next = {};
4174
+ for (const f of this._fields) {
4175
+ const el = this.queryFieldEl(f.name);
4176
+ if (!el) continue;
4177
+ if (f.type === "checkbox") {
4178
+ next[f.name] = el.checked;
4179
+ } else if (f.type === "number") {
4180
+ const val = _nullishCoalesce(el.value, () => ( ""));
4181
+ next[f.name] = val === "" ? void 0 : Number(val);
1507
4182
  } else {
1508
- this.button.style.backgroundColor = "transparent";
4183
+ const val = _nullishCoalesce(el.value, () => ( ""));
4184
+ next[f.name] = val;
1509
4185
  }
1510
- };
1511
- this.button.addEventListener("mouseenter", this.handleHoverIn);
1512
- this.button.addEventListener("mouseleave", this.handleHoverOut);
1513
- }
1514
- applyPresetSize(size) {
1515
- if (size === "small") {
1516
- this.button.style.padding = "0.5rem";
1517
- } else if (size === "medium") {
1518
- this.button.style.padding = "0.6875rem 0.75rem";
1519
- } else if (size === "large") {
1520
- this.button.style.padding = "0.875rem 1rem";
1521
4186
  }
4187
+ return next;
1522
4188
  }
1523
- hexToRgba(hex, alpha) {
1524
- let r = 0, g = 0, b = 0;
1525
- if (hex.length === 4) {
1526
- r = parseInt(hex[1] + hex[1], 16);
1527
- g = parseInt(hex[2] + hex[2], 16);
1528
- b = parseInt(hex[3] + hex[3], 16);
1529
- } else if (hex.length === 7) {
1530
- r = parseInt(hex[1] + hex[2], 16);
1531
- g = parseInt(hex[3] + hex[4], 16);
1532
- b = parseInt(hex[5] + hex[6], 16);
4189
+ queryFieldEl(name) {
4190
+ return this._shadow.querySelector(`[data-name="${name}"]`);
4191
+ }
4192
+ setFieldError(name, message) {
4193
+ const el = this.queryFieldEl(name);
4194
+ if (!el) return;
4195
+ if (message) {
4196
+ const existing = this._errors[name];
4197
+ const pieces = [...existing ? existing.split("\n") : [], ...message.split("\n")].filter((m) => m !== "");
4198
+ const combined = Array.from(new Set(pieces)).join("\n");
4199
+ el.setAttribute("error-message", combined);
4200
+ el.setAttribute("force-error", "");
4201
+ this._errors[name] = combined;
4202
+ } else {
4203
+ el.removeAttribute("force-error");
4204
+ el.removeAttribute("error-message");
4205
+ delete this._errors[name];
1533
4206
  }
1534
- return `rgba(${r}, ${g}, ${b}, ${alpha})`;
1535
4207
  }
1536
- shadeColor(hex, percent) {
1537
- let R = parseInt(hex.substring(1, 3), 16);
1538
- let G = parseInt(hex.substring(3, 5), 16);
1539
- let B = parseInt(hex.substring(5, 7), 16);
1540
- R = Math.min(255, Math.max(0, R + R * percent / 100));
1541
- G = Math.min(255, Math.max(0, G + G * percent / 100));
1542
- B = Math.min(255, Math.max(0, B + B * percent / 100));
1543
- const toHex = (c) => {
1544
- const hex2 = Math.round(c).toString(16);
1545
- return hex2.length === 1 ? "0" + hex2 : hex2;
4208
+ validateField(name, value) {
4209
+ if (!this._validator) return;
4210
+ const res = this._validator.validateProperty(name, value);
4211
+ if (res.isValid) {
4212
+ this.setFieldError(name, void 0);
4213
+ } else {
4214
+ const issues = _nullishCoalesce(_optionalChain([res, 'access', _86 => _86.issues, 'optionalAccess', _87 => _87.filter, 'call', _88 => _88((i) => _optionalChain([i, 'access', _89 => _89.path, 'optionalAccess', _90 => _90[0]]) === name)]), () => ( []));
4215
+ const messages = issues.map((i) => i.message).join("\n");
4216
+ this.setFieldError(name, issues.length > 0 ? messages : "Invalid value");
4217
+ }
4218
+ }
4219
+ validateAll() {
4220
+ if (!this._validator) {
4221
+ return { isValid: true, value: this.collectValues(), issues: [] };
4222
+ }
4223
+ const values2 = this.collectValues();
4224
+ for (const f of this._fields) this.setFieldError(f.name, void 0);
4225
+ const res = this._validator.validate(values2);
4226
+ if (res.isValid) {
4227
+ return { isValid: true, value: res.value, issues: [] };
4228
+ }
4229
+ for (const f of this._fields) {
4230
+ const issues = _nullishCoalesce(_optionalChain([res, 'access', _91 => _91.issues, 'optionalAccess', _92 => _92.filter, 'call', _93 => _93((i) => _optionalChain([i, 'access', _94 => _94.path, 'optionalAccess', _95 => _95[0]]) === f.name)]), () => ( []));
4231
+ if (issues.length > 0) {
4232
+ const messages = issues.map((i) => i.message).join("\n");
4233
+ this.setFieldError(f.name, messages);
4234
+ }
4235
+ }
4236
+ return { isValid: false, value: values2, issues: _nullishCoalesce(res.issues, () => ( [])) };
4237
+ }
4238
+ // --- Rendering ---
4239
+ render() {
4240
+ const css2 = (
4241
+ /*css*/
4242
+ `
4243
+ :host { display: block; font: 14px/1.4 system-ui, sans-serif; }
4244
+ form { display: grid; gap: 12px; }
4245
+ .field-row { display: grid; gap: 12px; }
4246
+ .row { display: grid; gap: 6px; }
4247
+ .checkbox-row { display: flex; align-items: center; gap: 6px; }
4248
+ .actions {
4249
+ margin-top: 8px;
4250
+ display: flex;
4251
+ gap: 8px;
4252
+ }
4253
+ .actions > .left,
4254
+ .actions > .center,
4255
+ .actions > .right {
4256
+ flex: 1;
4257
+ display: flex;
4258
+ }
4259
+ .actions > .left { justify-content: flex-start; }
4260
+ .actions > .center { justify-content: center; }
4261
+ .actions > .right { justify-content: flex-end; }
4262
+ `
4263
+ );
4264
+ const form = document.createElement("form");
4265
+ form.noValidate = true;
4266
+ form.addEventListener("submit", this.onSubmit);
4267
+ form.style.width = this._formWidth;
4268
+ const layout = this._layout && this._layout.length > 0 ? [...this._layout] : [];
4269
+ let total = layout.reduce((a, b) => a + b, 0);
4270
+ while (total < this._fields.length) {
4271
+ layout.push(1);
4272
+ total += 1;
4273
+ }
4274
+ let fieldIndex = 0;
4275
+ for (const cols of layout) {
4276
+ if (fieldIndex >= this._fields.length) break;
4277
+ const rowWrap = document.createElement("div");
4278
+ rowWrap.className = "field-row";
4279
+ rowWrap.style.gridTemplateColumns = `repeat(${cols}, 1fr)`;
4280
+ for (let i = 0; i < cols && fieldIndex < this._fields.length; i++) {
4281
+ const f = this._fields[fieldIndex++];
4282
+ const cell = document.createElement("div");
4283
+ cell.className = f.type === "checkbox" ? "row checkbox-row" : "row";
4284
+ const fieldId = this._idPrefix ? `${this._idPrefix}-${f.name}` : f.name;
4285
+ if (f.type === "checkbox") {
4286
+ const input = document.createElement("input");
4287
+ input.type = "checkbox";
4288
+ input.id = fieldId;
4289
+ input.setAttribute("data-name", f.name);
4290
+ input.name = fieldId;
4291
+ if (this._value[f.name] !== void 0) {
4292
+ input.checked = Boolean(this._value[f.name]);
4293
+ }
4294
+ input.addEventListener("change", () => {
4295
+ this.onInputChange(f.name, input.checked);
4296
+ });
4297
+ input.addEventListener("blur", () => this.onBlur(f.name));
4298
+ const label = document.createElement("label");
4299
+ label.htmlFor = fieldId;
4300
+ label.textContent = f.label;
4301
+ cell.appendChild(input);
4302
+ cell.appendChild(label);
4303
+ } else {
4304
+ const input = document.createElement("wavelength-input");
4305
+ if (this._inputProps) {
4306
+ for (const [key, value] of Object.entries(this._inputProps)) {
4307
+ if (value !== void 0) input.setAttribute(key, String(value));
4308
+ }
4309
+ }
4310
+ input.setAttribute("data-name", f.name);
4311
+ input.setAttribute("name", fieldId);
4312
+ if (f.placeholder !== void 0) {
4313
+ input.setAttribute("placeholder", f.placeholder);
4314
+ input.setAttribute("label", f.placeholder);
4315
+ } else {
4316
+ input.setAttribute("label", f.label);
4317
+ }
4318
+ input.setAttribute("validation-type", "manual");
4319
+ input.setAttribute("id", fieldId);
4320
+ if (f.type === "number") {
4321
+ input.setAttribute("input-type", "number");
4322
+ }
4323
+ if (f.required) {
4324
+ input.setAttribute("required", "");
4325
+ }
4326
+ if (f.minLength !== void 0) {
4327
+ input.setAttribute("min-length", String(f.minLength));
4328
+ }
4329
+ if (f.maxLength !== void 0) {
4330
+ input.setAttribute("max-length", String(f.maxLength));
4331
+ }
4332
+ if (this._value[f.name] !== null && this._value[f.name] !== void 0) {
4333
+ input.value = String(this._value[f.name]);
4334
+ }
4335
+ input.addEventListener("inputChange", ((e) => {
4336
+ const detail = _nullishCoalesce(e.detail, () => ( {}));
4337
+ let val = _nullishCoalesce(detail.value, () => ( ""));
4338
+ if (f.type === "number") {
4339
+ val = val === "" ? "" : Number(val);
4340
+ }
4341
+ this.onInputChange(f.name, val);
4342
+ }));
4343
+ input.addEventListener("blur", (() => this.onBlur(f.name)));
4344
+ cell.appendChild(input);
4345
+ }
4346
+ rowWrap.appendChild(cell);
4347
+ }
4348
+ form.appendChild(rowWrap);
4349
+ }
4350
+ const actions = document.createElement("div");
4351
+ actions.className = "actions";
4352
+ const leftSlot = document.createElement("div");
4353
+ leftSlot.className = "left";
4354
+ const centerSlot = document.createElement("div");
4355
+ centerSlot.className = "center";
4356
+ const rightSlot = document.createElement("div");
4357
+ rightSlot.className = "right";
4358
+ const buildButton = (cfg, defaultEvent) => {
4359
+ const btn = document.createElement("wavelength-button");
4360
+ const requestedType = _nullishCoalesce(_optionalChain([cfg, 'access', _96 => _96.buttonProps, 'optionalAccess', _97 => _97.type]), () => ( ""));
4361
+ const type = requestedType === "submit" ? "submit" : "button";
4362
+ if (cfg.buttonProps) {
4363
+ for (const [key, value] of Object.entries(cfg.buttonProps)) {
4364
+ if (key === "type") continue;
4365
+ if (value !== void 0) btn.setAttribute(key, String(value));
4366
+ }
4367
+ }
4368
+ btn.setAttribute("type", type);
4369
+ if (cfg.label) btn.textContent = cfg.label;
4370
+ btn.addEventListener("click", (e) => {
4371
+ const ev = _nullishCoalesce(cfg.eventName, () => ( defaultEvent));
4372
+ if (requestedType === "submit") {
4373
+ form.requestSubmit();
4374
+ } else {
4375
+ e.preventDefault();
4376
+ }
4377
+ this.dispatchEvent(new CustomEvent(ev));
4378
+ });
4379
+ return btn;
1546
4380
  };
1547
- return `#${toHex(R)}${toHex(G)}${toHex(B)}`;
1548
- }
1549
- handleRipple(event) {
1550
- if (this.button.disabled) return;
1551
- const variant = this.getAttribute("variant") || "outlined";
1552
- const colorOne = this.getAttribute("color-one") || "#1976D2";
1553
- const ripple = document.createElement("span");
1554
- ripple.className = "ripple";
1555
- const color2 = variant === "contained" ? this.hexToRgba(this.shadeColor(colorOne, 40), 0.6) : this.hexToRgba(this.shadeColor(colorOne, -40), 0.3);
1556
- ripple.style.backgroundColor = color2;
1557
- const rect = this.button.getBoundingClientRect();
1558
- const size = Math.max(rect.width, rect.height);
1559
- ripple.style.width = ripple.style.height = `${size}px`;
1560
- ripple.style.left = `${event.clientX - rect.left - size / 2}px`;
1561
- ripple.style.top = `${event.clientY - rect.top - size / 2}px`;
1562
- this.button.appendChild(ripple);
1563
- setTimeout(() => ripple.remove(), 600);
4381
+ if (this._leftButton) {
4382
+ leftSlot.appendChild(buildButton(this._leftButton, "form-left"));
4383
+ }
4384
+ if (this._centerButton) {
4385
+ centerSlot.appendChild(buildButton(this._centerButton, "form-center"));
4386
+ }
4387
+ if (this._rightButton) {
4388
+ rightSlot.appendChild(buildButton(this._rightButton, "form-right"));
4389
+ }
4390
+ if (leftSlot.children.length + centerSlot.children.length + rightSlot.children.length > 0) {
4391
+ actions.append(leftSlot, centerSlot, rightSlot);
4392
+ form.appendChild(actions);
4393
+ }
4394
+ this._shadow.innerHTML = `<style>${css2}</style>`;
4395
+ if (this._title) {
4396
+ const heading = document.createElement("h2");
4397
+ heading.textContent = this._title;
4398
+ heading.style.textAlign = this._titleAlign;
4399
+ if (this._titleColor) {
4400
+ heading.style.color = this._titleColor;
4401
+ }
4402
+ heading.style.userSelect = "none";
4403
+ heading.style.setProperty("-webkit-user-select", "none");
4404
+ this._shadow.appendChild(heading);
4405
+ }
4406
+ this._shadow.appendChild(form);
4407
+ for (const [name, msg] of Object.entries(this._errors)) {
4408
+ this.setFieldError(name, msg);
4409
+ }
1564
4410
  }
1565
4411
  };
1566
- if (!customElements.get("wavelength-button")) {
1567
- customElements.define("wavelength-button", WavelengthButton);
4412
+ if (!customElements.get("wavelength-form")) {
4413
+ customElements.define("wavelength-form", WavelengthForm);
1568
4414
  }
1569
4415
 
1570
4416
  // src/web-components/wavelength-progress-bar.ts
@@ -1649,13 +4495,14 @@ customElements.define("wavelength-progress-bar", WavelengthProgressBar);
1649
4495
  // src/web-components/wavelength-input.ts
1650
4496
  var template3 = document.createElement("template");
1651
4497
  template3.innerHTML = `
1652
- <style>
1653
- :host {
1654
- display: inline-block;
1655
- font-family: sans-serif;
1656
- --wavelength-container-background: #f8f8f8;
1657
- --wavelength-label-background: #ffffff;
1658
- }
4498
+ <style>
4499
+ :host {
4500
+ display: block;
4501
+ width: 100%;
4502
+ font-family: sans-serif;
4503
+ --wavelength-container-background: #f8f8f8;
4504
+ --wavelength-label-background: #ffffff;
4505
+ }
1659
4506
 
1660
4507
  .field-wrapper {
1661
4508
  position: relative;
@@ -1782,6 +4629,14 @@ template3.innerHTML = `
1782
4629
  </div>
1783
4630
  <div class="helper-message" id="helper"></div>
1784
4631
  `;
4632
+ function getAncestor(el) {
4633
+ if (!el) return null;
4634
+ if (el.parentElement) {
4635
+ return el.parentElement;
4636
+ }
4637
+ const root = el.getRootNode();
4638
+ return root instanceof ShadowRoot ? root.host : null;
4639
+ }
1785
4640
  var WavelengthInput = class extends HTMLElement {
1786
4641
  constructor() {
1787
4642
  super();
@@ -1794,6 +4649,7 @@ var WavelengthInput = class extends HTMLElement {
1794
4649
  this._debounceValidate = () => {
1795
4650
  };
1796
4651
  this._debounceTimeout = null;
4652
+ this._lastErrorMessage = "";
1797
4653
  this._onInput = () => {
1798
4654
  this.setAttribute("value", this.inputEl.value);
1799
4655
  this.internals.setFormValue(this.inputEl.value);
@@ -1819,8 +4675,15 @@ var WavelengthInput = class extends HTMLElement {
1819
4675
  this.hasBlurred = true;
1820
4676
  }
1821
4677
  const shouldValidate = this.validationType === "onBlur" || this.validationType === "always";
4678
+ let isValid = true;
4679
+ if (shouldValidate) {
4680
+ isValid = this._validate();
4681
+ }
4682
+ const hasError = this.hasAttribute("data-error") || this.hasAttribute("force-error");
4683
+ if (hasError) {
4684
+ return;
4685
+ }
1822
4686
  if (shouldValidate) {
1823
- const isValid = this._validate();
1824
4687
  if (isValid) {
1825
4688
  this.inputEl.style.borderColor = this.getAttribute("border-color") || "#cccccc";
1826
4689
  }
@@ -1893,7 +4756,7 @@ var WavelengthInput = class extends HTMLElement {
1893
4756
  this._applyAttributes();
1894
4757
  this._setupDebouncedValidation();
1895
4758
  const maxLengthAttr = this.getAttribute("max-length");
1896
- const value = _optionalChain([this, 'access', _6 => _6.inputEl, 'optionalAccess', _7 => _7.value, 'optionalAccess', _8 => _8.trim, 'optionalCall', _9 => _9()]) || "";
4759
+ const value = _optionalChain([this, 'access', _98 => _98.inputEl, 'optionalAccess', _99 => _99.value, 'optionalAccess', _100 => _100.trim, 'optionalCall', _101 => _101()]) || "";
1897
4760
  this.inputEl.addEventListener("input", this._onInput);
1898
4761
  this.inputEl.addEventListener("blur", this._onBlur);
1899
4762
  this.inputEl.addEventListener("focus", this._onFocus);
@@ -1918,13 +4781,13 @@ var WavelengthInput = class extends HTMLElement {
1918
4781
  this._bgObserver = new MutationObserver(() => {
1919
4782
  requestAnimationFrame(() => this._applyColors());
1920
4783
  });
1921
- let ancestor = this.parentElement;
4784
+ let ancestor = getAncestor(this);
1922
4785
  while (ancestor && ancestor !== document.body) {
1923
4786
  this._bgObserver.observe(ancestor, {
1924
4787
  attributes: true,
1925
4788
  attributeFilter: ["class", "style"]
1926
4789
  });
1927
- ancestor = ancestor.parentElement;
4790
+ ancestor = getAncestor(ancestor);
1928
4791
  }
1929
4792
  this._bgObserver.observe(document.body, {
1930
4793
  attributes: true,
@@ -1961,35 +4824,42 @@ var WavelengthInput = class extends HTMLElement {
1961
4824
  if (!bypassTypeCheck && (validationType === "manual" || validationType === "none") && !force) {
1962
4825
  return true;
1963
4826
  }
1964
- const shouldValidate = bypassTypeCheck || force || validationType === "always" || validationType === "onBlur" && this.hasBlurred;
1965
- const errors = [];
4827
+ const shouldValidate = bypassTypeCheck || validationType === "always" || validationType === "onBlur" && this.hasBlurred;
4828
+ const errors = /* @__PURE__ */ new Set();
1966
4829
  if (force) {
1967
- errors.push(errorMessage || "Invalid input.");
1968
- }
1969
- if (isRequired && isEmpty2 && shouldValidate) {
1970
- errors.push("This field is required.");
4830
+ if (errorMessage) {
4831
+ errors.add(errorMessage);
4832
+ }
1971
4833
  }
1972
- if (regexAttr && !isEmpty2 && shouldValidate) {
1973
- try {
1974
- const regex = new RegExp(regexAttr);
1975
- if (!regex.test(value)) {
1976
- errors.push(errorMessage || "Input does not match the required pattern.");
4834
+ if (!force) {
4835
+ if (isRequired && isEmpty2 && shouldValidate) {
4836
+ errors.add(_nullishCoalesce(errorMessage, () => ( "This field is required.")));
4837
+ }
4838
+ if (regexAttr && !isEmpty2 && shouldValidate) {
4839
+ try {
4840
+ const regex = new RegExp(regexAttr);
4841
+ if (!regex.test(value)) {
4842
+ errors.add(_nullishCoalesce(errorMessage, () => ( "Input does not match the required pattern.")));
4843
+ }
4844
+ } catch (e) {
4845
+ console.warn(`[WavelengthInput] Invalid regex pattern: "${regexAttr}"`, e);
4846
+ errors.add("Invalid regex pattern.");
1977
4847
  }
1978
- } catch (e) {
1979
- console.warn(`[WavelengthInput] Invalid regex pattern: "${regexAttr}"`, e);
1980
- errors.push("Invalid regex pattern.");
4848
+ }
4849
+ const min = parseInt(_nullishCoalesce(minLengthAttr, () => ( "")), 10);
4850
+ if (!isNaN(min) && value.length < min && shouldValidate) {
4851
+ errors.add(_nullishCoalesce(minLengthMessage, () => ( `MINIMUM length is ${min} characters.`)));
4852
+ }
4853
+ const max = parseInt(_nullishCoalesce(maxLengthAttr, () => ( "")), 10);
4854
+ if (!isNaN(max) && value.length > max && shouldValidate) {
4855
+ errors.add(_nullishCoalesce(maxLengthMessage, () => ( `MAXIMUM length is ${max} characters.`)));
1981
4856
  }
1982
4857
  }
1983
- const min = parseInt(_nullishCoalesce(minLengthAttr, () => ( "")), 10);
1984
- if (!isNaN(min) && value.length < min && shouldValidate) {
1985
- errors.push(minLengthMessage || `MINIMUM length is ${min} characters.`);
1986
- }
1987
- const max = parseInt(_nullishCoalesce(maxLengthAttr, () => ( "")), 10);
1988
- if (!isNaN(max) && value.length > max && shouldValidate) {
1989
- errors.push(maxLengthMessage || `MAXIMUM length is ${max} characters.`);
1990
- }
1991
- if (errors.length > 0) {
1992
- this._showError(errors.join("\n"));
4858
+ if (errors.size > 0) {
4859
+ const message = Array.from(errors).join("\n");
4860
+ if (message !== this._lastErrorMessage) {
4861
+ this._showError(message);
4862
+ }
1993
4863
  return false;
1994
4864
  }
1995
4865
  this._clearError(helperMessage || "");
@@ -1997,12 +4867,17 @@ var WavelengthInput = class extends HTMLElement {
1997
4867
  }
1998
4868
  _showError(message) {
1999
4869
  const htmlMessage = message.replace(/\n/g, "<br>");
4870
+ if (this.helperEl.innerHTML === htmlMessage) {
4871
+ this._lastErrorMessage = message;
4872
+ return;
4873
+ }
2000
4874
  this.helperEl.innerHTML = htmlMessage;
2001
4875
  this.helperEl.classList.add("error");
2002
4876
  this.inputEl.style.borderColor = "red";
2003
4877
  this.helperEl.style.color = "red";
2004
4878
  this.inputEl.setAttribute("aria-invalid", "true");
2005
4879
  this.setAttribute("data-error", "true");
4880
+ this._lastErrorMessage = message;
2006
4881
  }
2007
4882
  _clearError(helperText) {
2008
4883
  const borderColor2 = this.isFocused ? this.getAttribute("focus-color") || "#5e9ed6" : this.getAttribute("border-color") || "#cccccc";
@@ -2014,6 +4889,7 @@ var WavelengthInput = class extends HTMLElement {
2014
4889
  this.inputEl.setAttribute("aria-invalid", "false");
2015
4890
  this.removeAttribute("data-error");
2016
4891
  this._applyValidationHint();
4892
+ this._lastErrorMessage = "";
2017
4893
  }
2018
4894
  _applyAttributes() {
2019
4895
  this._applyContent();
@@ -2059,7 +4935,8 @@ var WavelengthInput = class extends HTMLElement {
2059
4935
  this._updateRequiredMarker();
2060
4936
  }
2061
4937
  _applyLayout() {
2062
- const width2 = this.getAttribute("width") || "320px";
4938
+ const widthAttr = this.getAttribute("width");
4939
+ const width2 = widthAttr || "100%";
2063
4940
  const rawPadding = this.getAttribute("padding") || "16.5px 14px";
2064
4941
  const paddingParts = rawPadding.trim().split(/\s+/);
2065
4942
  let leftPaddingPx;
@@ -2079,8 +4956,8 @@ var WavelengthInput = class extends HTMLElement {
2079
4956
  default:
2080
4957
  leftPaddingPx = 14;
2081
4958
  }
2082
- const parsedWidth = parseInt(width2, 10);
2083
- const helperWidth = `${parsedWidth - leftPaddingPx}px`;
4959
+ const isNumericWidth = widthAttr ? /^\d+(px)?$/.test(widthAttr.trim()) : false;
4960
+ const helperWidth = isNumericWidth ? `${parseInt(widthAttr, 10) - leftPaddingPx}px` : `calc(${width2} - ${leftPaddingPx}px)`;
2084
4961
  this.inputEl.style.width = width2;
2085
4962
  this.inputEl.style.padding = rawPadding;
2086
4963
  this.inputEl.style.height = this.getAttribute("height") || "";
@@ -2106,7 +4983,7 @@ var WavelengthInput = class extends HTMLElement {
2106
4983
  containerBg = bg;
2107
4984
  break;
2108
4985
  }
2109
- el = el.parentElement;
4986
+ el = getAncestor(el);
2110
4987
  }
2111
4988
  this.inputEl.style.backgroundColor = InputBg;
2112
4989
  this.labelEl.style.setProperty("--wavelength-label-background", InputBg);
@@ -2159,6 +5036,13 @@ var WavelengthInput = class extends HTMLElement {
2159
5036
  case "helper-message":
2160
5037
  this._applyValidationHint();
2161
5038
  break;
5039
+ case "error-message":
5040
+ case "force-error":
5041
+ this._applyAttributes();
5042
+ if (!this.hasAttribute("error-message") && !this.hasAttribute("force-error")) {
5043
+ this._clearError(this.getAttribute("helper-message") || "");
5044
+ }
5045
+ break;
2162
5046
  case "validation-type":
2163
5047
  this.validationType = validTypes.includes(newValue) ? newValue : "none";
2164
5048
  break;
@@ -2295,8 +5179,8 @@ var WavelengthTitleBar = class extends HTMLElement {
2295
5179
  }`;
2296
5180
  shadow.appendChild(fallbackStyle);
2297
5181
  }
2298
- const wrapper = document.createElement("div");
2299
- wrapper.classList.add("title-bar");
5182
+ const wrapper2 = document.createElement("div");
5183
+ wrapper2.classList.add("title-bar");
2300
5184
  const title = document.createElement("div");
2301
5185
  title.classList.add("title");
2302
5186
  title.textContent = this.getAttribute("title-text") || "Default Title";
@@ -2304,6 +5188,7 @@ var WavelengthTitleBar = class extends HTMLElement {
2304
5188
  subtitle.classList.add("subtitle");
2305
5189
  subtitle.textContent = this.getAttribute("subtitle-text") || "Default Subtitle";
2306
5190
  const textColor = this.getAttribute("text-color") || "#34649b";
5191
+ const shadowColor = this.getAttribute("shadow-color");
2307
5192
  const style3 = document.createElement("style");
2308
5193
  style3.textContent = `
2309
5194
  :host {
@@ -2316,7 +5201,7 @@ var WavelengthTitleBar = class extends HTMLElement {
2316
5201
  .title {
2317
5202
  font-family: "Goldman", sans-serif;
2318
5203
  font-size: 3.75rem;
2319
- text-shadow: 0.313rem 0.313rem 0.375rem #FFFFFF;
5204
+ ${shadowColor ? `text-shadow: 0.313rem 0.313rem 0.375rem ${shadowColor};` : ""}
2320
5205
  -webkit-text-stroke: 1px black;
2321
5206
  letter-spacing: 0.07em;
2322
5207
  user-select: none;
@@ -2330,9 +5215,9 @@ var WavelengthTitleBar = class extends HTMLElement {
2330
5215
  }
2331
5216
  `;
2332
5217
  shadow.appendChild(style3);
2333
- wrapper.appendChild(title);
2334
- wrapper.appendChild(subtitle);
2335
- shadow.appendChild(wrapper);
5218
+ wrapper2.appendChild(title);
5219
+ wrapper2.appendChild(subtitle);
5220
+ shadow.appendChild(wrapper2);
2336
5221
  }
2337
5222
  connectedCallback() {
2338
5223
  if (!fontsInjected) {
@@ -2346,35 +5231,32 @@ var WavelengthTitleBar = class extends HTMLElement {
2346
5231
  }
2347
5232
  }
2348
5233
  static get observedAttributes() {
2349
- return ["title-text", "subtitle-text", "text-color", "has-shadow"];
5234
+ return ["title-text", "subtitle-text", "text-color", "shadow-color"];
2350
5235
  }
2351
5236
  attributeChangedCallback(name, oldValue, newValue) {
2352
- if (oldValue !== newValue) {
2353
- if (name === "title-text") {
2354
- const titleElement = _optionalChain([this, 'access', _10 => _10.shadowRoot, 'optionalAccess', _11 => _11.querySelector, 'call', _12 => _12(".title")]);
2355
- if (titleElement) {
2356
- titleElement.textContent = newValue;
2357
- }
2358
- } else if (name === "subtitle-text") {
2359
- const subtitleElement = _optionalChain([this, 'access', _13 => _13.shadowRoot, 'optionalAccess', _14 => _14.querySelector, 'call', _15 => _15(".subtitle")]);
2360
- if (subtitleElement) {
2361
- subtitleElement.textContent = newValue;
2362
- }
2363
- } else if (name === "text-color") {
2364
- const titleElement = _optionalChain([this, 'access', _16 => _16.shadowRoot, 'optionalAccess', _17 => _17.querySelector, 'call', _18 => _18(".title")]);
2365
- const subtitleElement = _optionalChain([this, 'access', _19 => _19.shadowRoot, 'optionalAccess', _20 => _20.querySelector, 'call', _21 => _21(".subtitle")]);
2366
- if (titleElement) {
2367
- titleElement.style.color = newValue;
2368
- }
2369
- if (subtitleElement) {
2370
- subtitleElement.style.color = newValue;
2371
- }
2372
- } else if (name === "has-shadow") {
2373
- const titleElement = _optionalChain([this, 'access', _22 => _22.shadowRoot, 'optionalAccess', _23 => _23.querySelector, 'call', _24 => _24(".title")]);
5237
+ if (oldValue === newValue) return;
5238
+ const titleElement = _optionalChain([this, 'access', _102 => _102.shadowRoot, 'optionalAccess', _103 => _103.querySelector, 'call', _104 => _104(".title")]);
5239
+ const subtitleElement = _optionalChain([this, 'access', _105 => _105.shadowRoot, 'optionalAccess', _106 => _106.querySelector, 'call', _107 => _107(".subtitle")]);
5240
+ switch (name) {
5241
+ case "title-text":
5242
+ if (titleElement) titleElement.textContent = newValue;
5243
+ break;
5244
+ case "subtitle-text":
5245
+ if (subtitleElement) subtitleElement.textContent = newValue;
5246
+ break;
5247
+ case "text-color":
5248
+ if (titleElement) titleElement.style.color = newValue;
5249
+ if (subtitleElement) subtitleElement.style.color = newValue;
5250
+ break;
5251
+ case "shadow-color":
2374
5252
  if (titleElement) {
2375
- titleElement.style.textShadow = newValue !== "false" ? "none" : "0.313rem 0.313rem 0.375rem #FFFFFF";
5253
+ if (newValue) {
5254
+ titleElement.style.textShadow = `0.313rem 0.313rem 0.375rem ${newValue}`;
5255
+ } else {
5256
+ titleElement.style.textShadow = "";
5257
+ }
2376
5258
  }
2377
- }
5259
+ break;
2378
5260
  }
2379
5261
  }
2380
5262
  };
@@ -2468,6 +5350,7 @@ var WavelengthButton2 = ({
2468
5350
  }, []);
2469
5351
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-button", { ref, className, style: style3, ...rest, children });
2470
5352
  };
5353
+ WavelengthButton2.displayName = "WavelengthButton";
2471
5354
 
2472
5355
  // src/components/buttons/WavelengthDropdownButton/WavelengthDropdownButton.tsx
2473
5356
  var _Button = require('@mui/material/Button'); var _Button2 = _interopRequireDefault(_Button);
@@ -2483,6 +5366,273 @@ function formatMuiErrorMessage(code) {
2483
5366
 
2484
5367
  // ../../node_modules/@mui/styled-engine/index.js
2485
5368
  var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);
5369
+
5370
+ // ../../node_modules/@emotion/hash/dist/emotion-hash.esm.js
5371
+ function murmur2(str) {
5372
+ var h = 0;
5373
+ var k, i = 0, len = str.length;
5374
+ for (; len >= 4; ++i, len -= 4) {
5375
+ k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;
5376
+ k = /* Math.imul(k, m): */
5377
+ (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);
5378
+ k ^= /* k >>> r: */
5379
+ k >>> 24;
5380
+ h = /* Math.imul(k, m): */
5381
+ (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
5382
+ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
5383
+ }
5384
+ switch (len) {
5385
+ case 3:
5386
+ h ^= (str.charCodeAt(i + 2) & 255) << 16;
5387
+ case 2:
5388
+ h ^= (str.charCodeAt(i + 1) & 255) << 8;
5389
+ case 1:
5390
+ h ^= str.charCodeAt(i) & 255;
5391
+ h = /* Math.imul(h, m): */
5392
+ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
5393
+ }
5394
+ h ^= h >>> 13;
5395
+ h = /* Math.imul(h, m): */
5396
+ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
5397
+ return ((h ^ h >>> 15) >>> 0).toString(36);
5398
+ }
5399
+
5400
+ // ../../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
5401
+ var unitlessKeys = {
5402
+ animationIterationCount: 1,
5403
+ aspectRatio: 1,
5404
+ borderImageOutset: 1,
5405
+ borderImageSlice: 1,
5406
+ borderImageWidth: 1,
5407
+ boxFlex: 1,
5408
+ boxFlexGroup: 1,
5409
+ boxOrdinalGroup: 1,
5410
+ columnCount: 1,
5411
+ columns: 1,
5412
+ flex: 1,
5413
+ flexGrow: 1,
5414
+ flexPositive: 1,
5415
+ flexShrink: 1,
5416
+ flexNegative: 1,
5417
+ flexOrder: 1,
5418
+ gridRow: 1,
5419
+ gridRowEnd: 1,
5420
+ gridRowSpan: 1,
5421
+ gridRowStart: 1,
5422
+ gridColumn: 1,
5423
+ gridColumnEnd: 1,
5424
+ gridColumnSpan: 1,
5425
+ gridColumnStart: 1,
5426
+ msGridRow: 1,
5427
+ msGridRowSpan: 1,
5428
+ msGridColumn: 1,
5429
+ msGridColumnSpan: 1,
5430
+ fontWeight: 1,
5431
+ lineHeight: 1,
5432
+ opacity: 1,
5433
+ order: 1,
5434
+ orphans: 1,
5435
+ scale: 1,
5436
+ tabSize: 1,
5437
+ widows: 1,
5438
+ zIndex: 1,
5439
+ zoom: 1,
5440
+ WebkitLineClamp: 1,
5441
+ // SVG-related properties
5442
+ fillOpacity: 1,
5443
+ floodOpacity: 1,
5444
+ stopOpacity: 1,
5445
+ strokeDasharray: 1,
5446
+ strokeDashoffset: 1,
5447
+ strokeMiterlimit: 1,
5448
+ strokeOpacity: 1,
5449
+ strokeWidth: 1
5450
+ };
5451
+
5452
+ // ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
5453
+ function memoize(fn) {
5454
+ var cache = /* @__PURE__ */ Object.create(null);
5455
+ return function(arg) {
5456
+ if (cache[arg] === void 0) cache[arg] = fn(arg);
5457
+ return cache[arg];
5458
+ };
5459
+ }
5460
+
5461
+ // ../../node_modules/@emotion/serialize/dist/emotion-serialize.esm.js
5462
+ var isDevelopment = false;
5463
+ var hyphenateRegex = /[A-Z]|^ms/g;
5464
+ var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
5465
+ var isCustomProperty = function isCustomProperty2(property) {
5466
+ return property.charCodeAt(1) === 45;
5467
+ };
5468
+ var isProcessableValue = function isProcessableValue2(value) {
5469
+ return value != null && typeof value !== "boolean";
5470
+ };
5471
+ var processStyleName = /* @__PURE__ */ memoize(function(styleName) {
5472
+ return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, "-$&").toLowerCase();
5473
+ });
5474
+ var processStyleValue = function processStyleValue2(key, value) {
5475
+ switch (key) {
5476
+ case "animation":
5477
+ case "animationName": {
5478
+ if (typeof value === "string") {
5479
+ return value.replace(animationRegex, function(match, p1, p2) {
5480
+ cursor = {
5481
+ name: p1,
5482
+ styles: p2,
5483
+ next: cursor
5484
+ };
5485
+ return p1;
5486
+ });
5487
+ }
5488
+ }
5489
+ }
5490
+ if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === "number" && value !== 0) {
5491
+ return value + "px";
5492
+ }
5493
+ return value;
5494
+ };
5495
+ var noComponentSelectorMessage = "Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";
5496
+ function handleInterpolation(mergedProps, registered, interpolation) {
5497
+ if (interpolation == null) {
5498
+ return "";
5499
+ }
5500
+ var componentSelector = interpolation;
5501
+ if (componentSelector.__emotion_styles !== void 0) {
5502
+ return componentSelector;
5503
+ }
5504
+ switch (typeof interpolation) {
5505
+ case "boolean": {
5506
+ return "";
5507
+ }
5508
+ case "object": {
5509
+ var keyframes2 = interpolation;
5510
+ if (keyframes2.anim === 1) {
5511
+ cursor = {
5512
+ name: keyframes2.name,
5513
+ styles: keyframes2.styles,
5514
+ next: cursor
5515
+ };
5516
+ return keyframes2.name;
5517
+ }
5518
+ var serializedStyles = interpolation;
5519
+ if (serializedStyles.styles !== void 0) {
5520
+ var next = serializedStyles.next;
5521
+ if (next !== void 0) {
5522
+ while (next !== void 0) {
5523
+ cursor = {
5524
+ name: next.name,
5525
+ styles: next.styles,
5526
+ next: cursor
5527
+ };
5528
+ next = next.next;
5529
+ }
5530
+ }
5531
+ var styles = serializedStyles.styles + ";";
5532
+ return styles;
5533
+ }
5534
+ return createStringFromObject(mergedProps, registered, interpolation);
5535
+ }
5536
+ case "function": {
5537
+ if (mergedProps !== void 0) {
5538
+ var previousCursor = cursor;
5539
+ var result = interpolation(mergedProps);
5540
+ cursor = previousCursor;
5541
+ return handleInterpolation(mergedProps, registered, result);
5542
+ }
5543
+ break;
5544
+ }
5545
+ }
5546
+ var asString = interpolation;
5547
+ if (registered == null) {
5548
+ return asString;
5549
+ }
5550
+ var cached2 = registered[asString];
5551
+ return cached2 !== void 0 ? cached2 : asString;
5552
+ }
5553
+ function createStringFromObject(mergedProps, registered, obj) {
5554
+ var string = "";
5555
+ if (Array.isArray(obj)) {
5556
+ for (var i = 0; i < obj.length; i++) {
5557
+ string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
5558
+ }
5559
+ } else {
5560
+ for (var key in obj) {
5561
+ var value = obj[key];
5562
+ if (typeof value !== "object") {
5563
+ var asString = value;
5564
+ if (registered != null && registered[asString] !== void 0) {
5565
+ string += key + "{" + registered[asString] + "}";
5566
+ } else if (isProcessableValue(asString)) {
5567
+ string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
5568
+ }
5569
+ } else {
5570
+ if (key === "NO_COMPONENT_SELECTOR" && isDevelopment) {
5571
+ throw new Error(noComponentSelectorMessage);
5572
+ }
5573
+ if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
5574
+ for (var _i = 0; _i < value.length; _i++) {
5575
+ if (isProcessableValue(value[_i])) {
5576
+ string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
5577
+ }
5578
+ }
5579
+ } else {
5580
+ var interpolated = handleInterpolation(mergedProps, registered, value);
5581
+ switch (key) {
5582
+ case "animation":
5583
+ case "animationName": {
5584
+ string += processStyleName(key) + ":" + interpolated + ";";
5585
+ break;
5586
+ }
5587
+ default: {
5588
+ string += key + "{" + interpolated + "}";
5589
+ }
5590
+ }
5591
+ }
5592
+ }
5593
+ }
5594
+ }
5595
+ return string;
5596
+ }
5597
+ var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g;
5598
+ var cursor;
5599
+ function serializeStyles(args, registered, mergedProps) {
5600
+ if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) {
5601
+ return args[0];
5602
+ }
5603
+ var stringMode = true;
5604
+ var styles = "";
5605
+ cursor = void 0;
5606
+ var strings = args[0];
5607
+ if (strings == null || strings.raw === void 0) {
5608
+ stringMode = false;
5609
+ styles += handleInterpolation(mergedProps, registered, strings);
5610
+ } else {
5611
+ var asTemplateStringsArr = strings;
5612
+ styles += asTemplateStringsArr[0];
5613
+ }
5614
+ for (var i = 1; i < args.length; i++) {
5615
+ styles += handleInterpolation(mergedProps, registered, args[i]);
5616
+ if (stringMode) {
5617
+ var templateStringsArr = strings;
5618
+ styles += templateStringsArr[i];
5619
+ }
5620
+ }
5621
+ labelPattern.lastIndex = 0;
5622
+ var identifierName = "";
5623
+ var match;
5624
+ while ((match = labelPattern.exec(styles)) !== null) {
5625
+ identifierName += "-" + match[1];
5626
+ }
5627
+ var name = murmur2(styles) + identifierName;
5628
+ return {
5629
+ name,
5630
+ styles,
5631
+ next: cursor
5632
+ };
5633
+ }
5634
+
5635
+ // ../../node_modules/@mui/styled-engine/index.js
2486
5636
  var _react2 = require('@emotion/react');
2487
5637
  function styled(tag, options) {
2488
5638
  const stylesFactory = _styled2.default.call(void 0, tag, options);
@@ -2504,6 +5654,11 @@ var internal_processStyles = (tag, processor) => {
2504
5654
  tag.__emotion_styles = processor(tag.__emotion_styles);
2505
5655
  }
2506
5656
  };
5657
+ var wrapper = [];
5658
+ function internal_serializeStyles(styles) {
5659
+ wrapper[0] = styles;
5660
+ return serializeStyles(wrapper);
5661
+ }
2507
5662
 
2508
5663
  // ../../node_modules/@babel/runtime/helpers/esm/extends.js
2509
5664
  function _extends() {
@@ -2521,7 +5676,7 @@ function _objectWithoutPropertiesLoose(r, e) {
2521
5676
  if (null == r) return {};
2522
5677
  var t = {};
2523
5678
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
2524
- if (e.includes(n)) continue;
5679
+ if (-1 !== e.indexOf(n)) continue;
2525
5680
  t[n] = r[n];
2526
5681
  }
2527
5682
  return t;
@@ -2529,7 +5684,7 @@ function _objectWithoutPropertiesLoose(r, e) {
2529
5684
 
2530
5685
  // ../../node_modules/@mui/utils/esm/deepmerge/deepmerge.js
2531
5686
 
2532
- function isPlainObject(item) {
5687
+ function isPlainObject2(item) {
2533
5688
  if (typeof item !== "object" || item === null) {
2534
5689
  return false;
2535
5690
  }
@@ -2537,7 +5692,7 @@ function isPlainObject(item) {
2537
5692
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
2538
5693
  }
2539
5694
  function deepClone(source) {
2540
- if (/* @__PURE__ */ React2.isValidElement(source) || !isPlainObject(source)) {
5695
+ if (/* @__PURE__ */ React2.isValidElement(source) || !isPlainObject2(source)) {
2541
5696
  return source;
2542
5697
  }
2543
5698
  const output = {};
@@ -2550,15 +5705,15 @@ function deepmerge(target, source, options = {
2550
5705
  clone: true
2551
5706
  }) {
2552
5707
  const output = options.clone ? _extends({}, target) : target;
2553
- if (isPlainObject(target) && isPlainObject(source)) {
5708
+ if (isPlainObject2(target) && isPlainObject2(source)) {
2554
5709
  Object.keys(source).forEach((key) => {
2555
5710
  if (/* @__PURE__ */ React2.isValidElement(source[key])) {
2556
5711
  output[key] = source[key];
2557
- } else if (isPlainObject(source[key]) && // Avoid prototype pollution
2558
- Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {
5712
+ } else if (isPlainObject2(source[key]) && // Avoid prototype pollution
5713
+ Object.prototype.hasOwnProperty.call(target, key) && isPlainObject2(target[key])) {
2559
5714
  output[key] = deepmerge(target[key], source[key], options);
2560
5715
  } else if (options.clone) {
2561
- output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];
5716
+ output[key] = isPlainObject2(source[key]) ? deepClone(source[key]) : source[key];
2562
5717
  } else {
2563
5718
  output[key] = source[key];
2564
5719
  }
@@ -2654,7 +5809,7 @@ var responsivePropType = process.env.NODE_ENV !== "production" ? import_prop_typ
2654
5809
  var responsivePropType_default = responsivePropType;
2655
5810
 
2656
5811
  // ../../node_modules/@mui/system/esm/merge.js
2657
- function merge(acc, item) {
5812
+ function merge2(acc, item) {
2658
5813
  if (!item) {
2659
5814
  return acc;
2660
5815
  }
@@ -2663,7 +5818,7 @@ function merge(acc, item) {
2663
5818
  // No need to clone deep, it's way faster.
2664
5819
  });
2665
5820
  }
2666
- var merge_default = merge;
5821
+ var merge_default = merge2;
2667
5822
 
2668
5823
  // ../../node_modules/@mui/system/esm/breakpoints.js
2669
5824
  var values = {
@@ -2755,7 +5910,7 @@ function getPath(obj, path, checkVars = true) {
2755
5910
  return null;
2756
5911
  }, obj);
2757
5912
  }
2758
- function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {
5913
+ function getStyleValue(themeMapping, transform2, propValueFinal, userValue = propValueFinal) {
2759
5914
  let value;
2760
5915
  if (typeof themeMapping === "function") {
2761
5916
  value = themeMapping(propValueFinal);
@@ -2764,8 +5919,8 @@ function getStyleValue(themeMapping, transform, propValueFinal, userValue = prop
2764
5919
  } else {
2765
5920
  value = getPath(themeMapping, propValueFinal) || userValue;
2766
5921
  }
2767
- if (transform) {
2768
- value = transform(value, userValue, themeMapping);
5922
+ if (transform2) {
5923
+ value = transform2(value, userValue, themeMapping);
2769
5924
  }
2770
5925
  return value;
2771
5926
  }
@@ -2774,7 +5929,7 @@ function style(options) {
2774
5929
  prop,
2775
5930
  cssProperty = options.prop,
2776
5931
  themeKey,
2777
- transform
5932
+ transform: transform2
2778
5933
  } = options;
2779
5934
  const fn = (props) => {
2780
5935
  if (props[prop] == null) {
@@ -2784,9 +5939,9 @@ function style(options) {
2784
5939
  const theme = props.theme;
2785
5940
  const themeMapping = getPath(theme, themeKey) || {};
2786
5941
  const styleFromPropValue = (propValueFinal) => {
2787
- let value = getStyleValue(themeMapping, transform, propValueFinal);
5942
+ let value = getStyleValue(themeMapping, transform2, propValueFinal);
2788
5943
  if (propValueFinal === value && typeof propValueFinal === "string") {
2789
- value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === "default" ? "" : capitalize(propValueFinal)}`, propValueFinal);
5944
+ value = getStyleValue(themeMapping, transform2, `${prop}${propValueFinal === "default" ? "" : capitalize(propValueFinal)}`, propValueFinal);
2790
5945
  }
2791
5946
  if (cssProperty === false) {
2792
5947
  return value;
@@ -2806,7 +5961,7 @@ function style(options) {
2806
5961
  var style_default = style;
2807
5962
 
2808
5963
  // ../../node_modules/@mui/system/esm/memoize.js
2809
- function memoize(fn) {
5964
+ function memoize2(fn) {
2810
5965
  const cache = {};
2811
5966
  return (arg) => {
2812
5967
  if (cache[arg] === void 0) {
@@ -2835,7 +5990,7 @@ var aliases = {
2835
5990
  paddingX: "px",
2836
5991
  paddingY: "py"
2837
5992
  };
2838
- var getCssProperties = memoize((prop) => {
5993
+ var getCssProperties = memoize2((prop) => {
2839
5994
  if (prop.length > 2) {
2840
5995
  if (aliases[prop]) {
2841
5996
  prop = aliases[prop];
@@ -2956,7 +6111,7 @@ function createSpacing(spacingInput = 8) {
2956
6111
  if (spacingInput.mui) {
2957
6112
  return spacingInput;
2958
6113
  }
2959
- const transform = createUnarySpacing({
6114
+ const transform2 = createUnarySpacing({
2960
6115
  spacing: spacingInput
2961
6116
  });
2962
6117
  const spacing2 = (...argsInput) => {
@@ -2967,7 +6122,7 @@ function createSpacing(spacingInput = 8) {
2967
6122
  }
2968
6123
  const args = argsInput.length === 0 ? [1] : argsInput;
2969
6124
  return args.map((argument) => {
2970
- const output = transform(argument);
6125
+ const output = transform2(argument);
2971
6126
  return typeof output === "number" ? `${output}px` : output;
2972
6127
  }).join(" ");
2973
6128
  };
@@ -3004,11 +6159,11 @@ function borderTransform(value) {
3004
6159
  }
3005
6160
  return `${value}px solid`;
3006
6161
  }
3007
- function createBorderStyle(prop, transform) {
6162
+ function createBorderStyle(prop, transform2) {
3008
6163
  return style_default({
3009
6164
  prop,
3010
6165
  themeKey: "borders",
3011
- transform
6166
+ transform: transform2
3012
6167
  });
3013
6168
  }
3014
6169
  var border = createBorderStyle("border", borderTransform);
@@ -3490,19 +6645,19 @@ var defaultSxConfig_default = defaultSxConfig;
3490
6645
  // ../../node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js
3491
6646
  function objectsHaveSameKeys(...objects) {
3492
6647
  const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);
3493
- const union = new Set(allKeys);
3494
- return objects.every((object) => union.size === Object.keys(object).length);
6648
+ const union2 = new Set(allKeys);
6649
+ return objects.every((object) => union2.size === Object.keys(object).length);
3495
6650
  }
3496
6651
  function callIfFn(maybeFn, arg) {
3497
6652
  return typeof maybeFn === "function" ? maybeFn(arg) : maybeFn;
3498
6653
  }
3499
6654
  function unstable_createStyleFunctionSx() {
3500
- function getThemeValue(prop, val, theme, config) {
6655
+ function getThemeValue(prop, val, theme, config2) {
3501
6656
  const props = {
3502
6657
  [prop]: val,
3503
6658
  theme
3504
6659
  };
3505
- const options = config[prop];
6660
+ const options = config2[prop];
3506
6661
  if (!options) {
3507
6662
  return {
3508
6663
  [prop]: val
@@ -3511,7 +6666,7 @@ function unstable_createStyleFunctionSx() {
3511
6666
  const {
3512
6667
  cssProperty = prop,
3513
6668
  themeKey,
3514
- transform,
6669
+ transform: transform2,
3515
6670
  style: style3
3516
6671
  } = options;
3517
6672
  if (val == null) {
@@ -3527,9 +6682,9 @@ function unstable_createStyleFunctionSx() {
3527
6682
  return style3(props);
3528
6683
  }
3529
6684
  const styleFromPropValue = (propValueFinal) => {
3530
- let value = getStyleValue(themeMapping, transform, propValueFinal);
6685
+ let value = getStyleValue(themeMapping, transform2, propValueFinal);
3531
6686
  if (propValueFinal === value && typeof propValueFinal === "string") {
3532
- value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === "default" ? "" : capitalize(propValueFinal)}`, propValueFinal);
6687
+ value = getStyleValue(themeMapping, transform2, `${prop}${propValueFinal === "default" ? "" : capitalize(propValueFinal)}`, propValueFinal);
3533
6688
  }
3534
6689
  if (cssProperty === false) {
3535
6690
  return value;
@@ -3544,12 +6699,13 @@ function unstable_createStyleFunctionSx() {
3544
6699
  var _theme$unstable_sxCon;
3545
6700
  const {
3546
6701
  sx,
3547
- theme = {}
6702
+ theme = {},
6703
+ nested
3548
6704
  } = props || {};
3549
6705
  if (!sx) {
3550
6706
  return null;
3551
6707
  }
3552
- const config = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig_default;
6708
+ const config2 = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig_default;
3553
6709
  function traverse(sxInput) {
3554
6710
  let sxObject = sxInput;
3555
6711
  if (typeof sxInput === "function") {
@@ -3567,8 +6723,8 @@ function unstable_createStyleFunctionSx() {
3567
6723
  const value = callIfFn(sxObject[styleKey], theme);
3568
6724
  if (value !== null && value !== void 0) {
3569
6725
  if (typeof value === "object") {
3570
- if (config[styleKey]) {
3571
- css2 = merge_default(css2, getThemeValue(styleKey, value, theme, config));
6726
+ if (config2[styleKey]) {
6727
+ css2 = merge_default(css2, getThemeValue(styleKey, value, theme, config2));
3572
6728
  } else {
3573
6729
  const breakpointsValues = handleBreakpoints({
3574
6730
  theme
@@ -3578,17 +6734,23 @@ function unstable_createStyleFunctionSx() {
3578
6734
  if (objectsHaveSameKeys(breakpointsValues, value)) {
3579
6735
  css2[styleKey] = styleFunctionSx2({
3580
6736
  sx: value,
3581
- theme
6737
+ theme,
6738
+ nested: true
3582
6739
  });
3583
6740
  } else {
3584
6741
  css2 = merge_default(css2, breakpointsValues);
3585
6742
  }
3586
6743
  }
3587
6744
  } else {
3588
- css2 = merge_default(css2, getThemeValue(styleKey, value, theme, config));
6745
+ css2 = merge_default(css2, getThemeValue(styleKey, value, theme, config2));
3589
6746
  }
3590
6747
  }
3591
6748
  });
6749
+ if (!nested && theme.modularCssLayers) {
6750
+ return {
6751
+ "@layer sx": removeUnusedBreakpoints(breakpointsKeys, css2)
6752
+ };
6753
+ }
3592
6754
  return removeUnusedBreakpoints(breakpointsKeys, css2);
3593
6755
  }
3594
6756
  return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
@@ -3703,6 +6865,12 @@ function isStringTag(tag) {
3703
6865
  function shouldForwardProp(prop) {
3704
6866
  return prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as";
3705
6867
  }
6868
+ function shallowLayer(serialized, layerName) {
6869
+ if (layerName && serialized && typeof serialized === "object" && serialized.styles && !serialized.styles.startsWith("@layer")) {
6870
+ serialized.styles = `@layer ${layerName}{${String(serialized.styles)}}`;
6871
+ }
6872
+ return serialized;
6873
+ }
3706
6874
  var systemDefaultTheme = createTheme_default();
3707
6875
  var lowercaseFirstLetter = (string) => {
3708
6876
  if (!string) {
@@ -3723,7 +6891,7 @@ function defaultOverridesResolver(slot) {
3723
6891
  }
3724
6892
  return (props, styles) => styles[slot];
3725
6893
  }
3726
- function processStyleArg(callableStyle, _ref) {
6894
+ function processStyleArg(callableStyle, _ref, layerName) {
3727
6895
  let {
3728
6896
  ownerState
3729
6897
  } = _ref, props = _objectWithoutPropertiesLoose(_ref, _excluded3);
@@ -3733,7 +6901,7 @@ function processStyleArg(callableStyle, _ref) {
3733
6901
  if (Array.isArray(resolvedStylesArg)) {
3734
6902
  return resolvedStylesArg.flatMap((resolvedStyle) => processStyleArg(resolvedStyle, _extends({
3735
6903
  ownerState
3736
- }, props)));
6904
+ }, props), layerName));
3737
6905
  }
3738
6906
  if (!!resolvedStylesArg && typeof resolvedStylesArg === "object" && Array.isArray(resolvedStylesArg.variants)) {
3739
6907
  const {
@@ -3757,14 +6925,15 @@ function processStyleArg(callableStyle, _ref) {
3757
6925
  if (!Array.isArray(result)) {
3758
6926
  result = [result];
3759
6927
  }
3760
- result.push(typeof variant.style === "function" ? variant.style(_extends({
6928
+ const variantStyle = typeof variant.style === "function" ? variant.style(_extends({
3761
6929
  ownerState
3762
- }, props, ownerState)) : variant.style);
6930
+ }, props, ownerState)) : variant.style;
6931
+ result.push(layerName ? shallowLayer(internal_serializeStyles(variantStyle), layerName) : variantStyle);
3763
6932
  }
3764
6933
  });
3765
6934
  return result;
3766
6935
  }
3767
- return resolvedStylesArg;
6936
+ return layerName ? shallowLayer(internal_serializeStyles(resolvedStylesArg), layerName) : resolvedStylesArg;
3768
6937
  }
3769
6938
  function createStyled(input = {}) {
3770
6939
  const {
@@ -3793,6 +6962,7 @@ function createStyled(input = {}) {
3793
6962
  // For more details: https://github.com/mui/material-ui/pull/37908
3794
6963
  overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))
3795
6964
  } = inputOptions, options = _objectWithoutPropertiesLoose(inputOptions, _excluded32);
6965
+ const layerName = componentName && componentName.startsWith("Mui") || !!componentSlot ? "components" : "custom";
3796
6966
  const skipVariantsResolver = inputSkipVariantsResolver !== void 0 ? inputSkipVariantsResolver : (
3797
6967
  // TODO v6: remove `Root` in the next major release
3798
6968
  // For more details: https://github.com/mui/material-ui/pull/37908
@@ -3818,14 +6988,17 @@ function createStyled(input = {}) {
3818
6988
  label
3819
6989
  }, options));
3820
6990
  const transformStyleArg = (stylesArg) => {
3821
- if (typeof stylesArg === "function" && stylesArg.__emotion_real !== stylesArg || isPlainObject(stylesArg)) {
3822
- return (props) => processStyleArg(stylesArg, _extends({}, props, {
3823
- theme: resolveTheme({
6991
+ if (typeof stylesArg === "function" && stylesArg.__emotion_real !== stylesArg || isPlainObject2(stylesArg)) {
6992
+ return (props) => {
6993
+ const theme = resolveTheme({
3824
6994
  theme: props.theme,
3825
6995
  defaultTheme,
3826
6996
  themeId
3827
- })
3828
- }));
6997
+ });
6998
+ return processStyleArg(stylesArg, _extends({}, props, {
6999
+ theme
7000
+ }), theme.modularCssLayers ? layerName : void 0);
7001
+ };
3829
7002
  }
3830
7003
  return stylesArg;
3831
7004
  };
@@ -3846,7 +7019,7 @@ function createStyled(input = {}) {
3846
7019
  Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
3847
7020
  resolvedStyleOverrides[slotKey] = processStyleArg(slotStyle, _extends({}, props, {
3848
7021
  theme
3849
- }));
7022
+ }), theme.modularCssLayers ? "theme" : void 0);
3850
7023
  });
3851
7024
  return overridesResolver(props, resolvedStyleOverrides);
3852
7025
  });
@@ -3863,7 +7036,7 @@ function createStyled(input = {}) {
3863
7036
  variants: themeVariants
3864
7037
  }, _extends({}, props, {
3865
7038
  theme
3866
- }));
7039
+ }), theme.modularCssLayers ? "theme" : void 0);
3867
7040
  });
3868
7041
  }
3869
7042
  if (!skipSx) {
@@ -3965,6 +7138,7 @@ function WavelengthDropdownButton({ children, onClick }) {
3965
7138
  renderButtonMenu(children)
3966
7139
  ] }) });
3967
7140
  }
7141
+ WavelengthDropdownButton.displayName = "WavelengthDropdownButton";
3968
7142
 
3969
7143
  // src/components/buttons/WavelengthDropdownButton/WavelengthAutocomplete.tsx
3970
7144
  var _material = require('@mui/material');
@@ -4051,6 +7225,7 @@ function WavelengthAutocomplete({ label, width: width2 = 300, variant = "outline
4051
7225
  }
4052
7226
  ) });
4053
7227
  }
7228
+ WavelengthAutocomplete.displayName = "WavelengthAutocomplete";
4054
7229
 
4055
7230
  // src/components/buttons/WavelengthFileDownloader.tsx
4056
7231
  var _Download = require('@mui/icons-material/Download'); var _Download2 = _interopRequireDefault(_Download);
@@ -4075,6 +7250,7 @@ function WavelengthFileDownloader({ fileLoc, fileURL, fileName, button, id }) {
4075
7250
  ] });
4076
7251
  }
4077
7252
  }
7253
+ WavelengthFileDownloader.displayName = "WavelengthFileDownloader";
4078
7254
 
4079
7255
  // src/components/buttons/WavelengthButton/WavelengthStyledButton.tsx
4080
7256
  var _styledcomponents = require('styled-components'); var _styledcomponents2 = _interopRequireDefault(_styledcomponents);
@@ -4491,6 +7667,7 @@ function WavelengthStyledButton({ type = "default", styles, children, disabled =
4491
7667
  children
4492
7668
  ] });
4493
7669
  }
7670
+ WavelengthStyledButton.displayName = "WavelengthStyledButton";
4494
7671
  var WavelengthStyledButton_default = WavelengthStyledButton;
4495
7672
 
4496
7673
  // src/themes/WavelengthAppTheme.tsx
@@ -4562,6 +7739,7 @@ function WavelengthBox({ width: width2, height: height2, children, borderBottomR
4562
7739
  }
4563
7740
  );
4564
7741
  }
7742
+ WavelengthBox.displayName = "WavelengthBox";
4565
7743
 
4566
7744
  // src/components/containers/WavelengthContentPlaceholder/WavelengthContentPlaceholder.tsx
4567
7745
 
@@ -4597,6 +7775,7 @@ function WavelengthContentPlaceholder({ type, width: width2, height: height2, tx
4597
7775
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { style: divStyleRectangle, id, children });
4598
7776
  }
4599
7777
  }
7778
+ WavelengthContentPlaceholder.displayName = "WavelengthContentPlaceholder";
4600
7779
 
4601
7780
  // src/components/example/WavelengthExampleComponent.tsx
4602
7781
 
@@ -4620,6 +7799,7 @@ function WavelengthExampleComponent({ width: width2 = 100, height: height2 = 100
4620
7799
  ] })
4621
7800
  ] }) });
4622
7801
  }
7802
+ WavelengthExampleComponent.displayName = "WavelengthExampleComponent";
4623
7803
 
4624
7804
  // src/components/search/WavelengthSearch.tsx
4625
7805
  var _TextField = require('@mui/material/TextField'); var _TextField2 = _interopRequireDefault(_TextField);
@@ -5175,6 +8355,7 @@ function WavelengthSearch({
5175
8355
  }
5176
8356
  return void 0;
5177
8357
  }
8358
+ WavelengthSearch.displayName = "WavelengthSearch";
5178
8359
 
5179
8360
  // src/components/search/WavelengthSearchTextField.tsx
5180
8361
 
@@ -5202,6 +8383,7 @@ function WavelengthSearchTextField() {
5202
8383
  }));
5203
8384
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WavelengthSearchTextField2, {});
5204
8385
  }
8386
+ WavelengthSearchTextField.displayName = "WavelengthSearchTextField";
5205
8387
 
5206
8388
  // src/components/logos/applogo/WavelengthAppLogo.tsx
5207
8389
 
@@ -5649,6 +8831,7 @@ function WavelengthAppLogo({ width: width2, height: height2, name = "", grayscal
5649
8831
  }
5650
8832
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: logo });
5651
8833
  }
8834
+ WavelengthAppLogo.displayName = "WavelengthAppLogo";
5652
8835
  var WavelengthAppLogo_default = WavelengthAppLogo;
5653
8836
 
5654
8837
  // src/components/PageComponents/WavelengthNotAvailablePage.tsx
@@ -5666,6 +8849,7 @@ function WavelengthNotAvailablePage({ WavelengthAppLogoName, errorMessage, backg
5666
8849
  ] })
5667
8850
  ] }) });
5668
8851
  }
8852
+ WavelengthNotAvailablePage.displayName = "WavelengthNotAvailablePage";
5669
8853
 
5670
8854
  // src/components/PageComponents/WavelengthSideBar.tsx
5671
8855
 
@@ -5709,7 +8893,7 @@ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor
5709
8893
  openSections[section.title] ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsmaterial.KeyboardArrowDownRounded, { sx: { color: arrowColor ? arrowColor : palette2.secondary } }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsmaterial.KeyboardArrowRightRounded, { sx: { color: arrowColor ? arrowColor : palette2.secondary } }),
5710
8894
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Typography2.default, { variant: "h6", sx: { fontSize: 16, color: txtColor ? txtColor : palette2.secondary }, children: section.title })
5711
8895
  ] }),
5712
- _optionalChain([section, 'access', _25 => _25.subsections, 'optionalAccess', _26 => _26.length]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Collapse2.default, { in: openSections[section.title], timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _List2.default, { component: "div", disablePadding: true, sx: { paddingLeft: 4 }, children: section.subsections.map((subsection, subIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
8896
+ _optionalChain([section, 'access', _108 => _108.subsections, 'optionalAccess', _109 => _109.length]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Collapse2.default, { in: openSections[section.title], timeout: "auto", unmountOnExit: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _List2.default, { component: "div", disablePadding: true, sx: { paddingLeft: 4 }, children: section.subsections.map((subsection, subIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React2.default.Fragment, { children: [
5713
8897
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5714
8898
  _Typography2.default,
5715
8899
  {
@@ -5720,7 +8904,7 @@ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor
5720
8904
  paddingLeft: 0.75,
5721
8905
  color: labelColor ? labelColor : palette2.secondary
5722
8906
  },
5723
- children: _optionalChain([subsection, 'access', _27 => _27.title, 'optionalAccess', _28 => _28.toUpperCase, 'call', _29 => _29()])
8907
+ children: _optionalChain([subsection, 'access', _110 => _110.title, 'optionalAccess', _111 => _111.toUpperCase, 'call', _112 => _112()])
5724
8908
  }
5725
8909
  ),
5726
8910
  subsection.items && subsection.items.map((item, itemIndex) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -5738,6 +8922,7 @@ function WavelengthSideBar({ sections, txtColor, bgColor, labelColor, arrowColor
5738
8922
  }
5739
8923
  );
5740
8924
  }
8925
+ WavelengthSideBar.displayName = "WavelengthSideBar";
5741
8926
 
5742
8927
  // src/components/PageComponents/WavelengthSpinningLogo.tsx
5743
8928
 
@@ -5789,6 +8974,7 @@ function WavelengthSpinningOuterCircle({ size, id, clip, color: color2, gradient
5789
8974
  }
5790
8975
  );
5791
8976
  }
8977
+ WavelengthSpinningOuterCircle.displayName = "WavelengthSpinningOuterCircle";
5792
8978
  var WavelengthSpinningLogo_default = WavelengthSpinningOuterCircle;
5793
8979
 
5794
8980
  // src/components/PageComponents/WavelengthSpinningLogoComponent.tsx
@@ -5831,6 +9017,7 @@ function WavelengthSpinningLogo({ svg = /* @__PURE__ */ _jsxruntime.jsx.call(voi
5831
9017
  ) });
5832
9018
  return loadingSymbol;
5833
9019
  }
9020
+ WavelengthSpinningLogo.displayName = "WavelengthSpinningLogo";
5834
9021
 
5835
9022
  // src/components/PageComponents/WavelengthDragAndDrop.tsx
5836
9023
 
@@ -5897,6 +9084,7 @@ function WavelengthDragAndDrop({
5897
9084
  }
5898
9085
  );
5899
9086
  }
9087
+ WavelengthDragAndDrop.displayName = "WavelengthDragAndDrop";
5900
9088
 
5901
9089
  // src/components/PageComponents/WavelengthProgressBar.tsx
5902
9090
 
@@ -5917,6 +9105,7 @@ var WavelengthProgressBar2 = ({ name, value, width: width2, height: height2, fon
5917
9105
  }, [name, value, width2, height2, fontSize, fontColor, progressBorder, progressColor]);
5918
9106
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-progress-bar", { ref, ...rest });
5919
9107
  };
9108
+ WavelengthProgressBar2.displayName = "WavelengthProgressBar";
5920
9109
 
5921
9110
  // src/components/PageComponents/WavelengthCommentDisplay.tsx
5922
9111
 
@@ -5950,7 +9139,7 @@ function WavelengthCommentDisplay(props) {
5950
9139
  {
5951
9140
  onClick: (e) => {
5952
9141
  setSelected(!selected);
5953
- _optionalChain([props, 'access', _30 => _30.onClick, 'optionalCall', _31 => _31(e)]);
9142
+ _optionalChain([props, 'access', _113 => _113.onClick, 'optionalCall', _114 => _114(e)]);
5954
9143
  },
5955
9144
  style: { padding: "0px" },
5956
9145
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckCircleOutline2.default, { fontSize: "small" })
@@ -5961,7 +9150,7 @@ function WavelengthCommentDisplay(props) {
5961
9150
  {
5962
9151
  onClick: (e) => {
5963
9152
  setSelected(!selected);
5964
- _optionalChain([props, 'access', _32 => _32.onClick, 'optionalCall', _33 => _33(e)]);
9153
+ _optionalChain([props, 'access', _115 => _115.onClick, 'optionalCall', _116 => _116(e)]);
5965
9154
  },
5966
9155
  style: { padding: "0px" },
5967
9156
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CheckCircle2.default, { fontSize: "small", sx: { color: props.iconSelectedColor || "rgba(209, 106, 47, 1)" } })
@@ -5974,6 +9163,7 @@ function WavelengthCommentDisplay(props) {
5974
9163
  }
5975
9164
  );
5976
9165
  }
9166
+ WavelengthCommentDisplay.displayName = "WavelengthCommentDisplay";
5977
9167
 
5978
9168
  // src/components/PageComponents/WavelengthPermissionAlert.tsx
5979
9169
 
@@ -6036,6 +9226,7 @@ function WavelengthPermissionAlert({
6036
9226
  }
6037
9227
  ) });
6038
9228
  }
9229
+ WavelengthPermissionAlert.displayName = "WavelengthPermissionAlert";
6039
9230
 
6040
9231
  // src/components/PageComponents/WavelengthAccessAlert.tsx
6041
9232
  var _Check = require('@mui/icons-material/Check'); var _Check2 = _interopRequireDefault(_Check);
@@ -6169,6 +9360,7 @@ function WavelengthAccessAlert({
6169
9360
  );
6170
9361
  }
6171
9362
  }
9363
+ WavelengthAccessAlert.displayName = "WavelengthAccessAlert";
6172
9364
 
6173
9365
  // src/components/PageComponents/WavelengthAlert.tsx
6174
9366
  var _Close = require('@mui/icons-material/Close'); var _Close2 = _interopRequireDefault(_Close);
@@ -6283,6 +9475,7 @@ function WavelengthAlert({
6283
9475
  ] });
6284
9476
  }
6285
9477
  }
9478
+ WavelengthAlert.displayName = "WavelengthAlert";
6286
9479
 
6287
9480
  // src/components/footers/WavelengthFooter/WavelengthFooter.tsx
6288
9481
 
@@ -6334,22 +9527,149 @@ function WavelengthFooter({ text, textColor }) {
6334
9527
  }
6335
9528
  );
6336
9529
  }
9530
+ WavelengthFooter.displayName = "WavelengthFooter";
9531
+
9532
+ // src/components/forms/WavelengthForm.tsx
9533
+
9534
+
9535
+ function useStableCallback(fn) {
9536
+ const fnRef = _react.useRef.call(void 0, fn);
9537
+ _react.useEffect.call(void 0, () => {
9538
+ fnRef.current = fn;
9539
+ }, [fn]);
9540
+ return (...args) => _optionalChain([fnRef, 'access', _117 => _117.current, 'optionalCall', _118 => _118(...args)]);
9541
+ }
9542
+ function WavelengthFormInner(props, ref) {
9543
+ const {
9544
+ schema,
9545
+ value,
9546
+ className,
9547
+ style: style3,
9548
+ onChange,
9549
+ onValid,
9550
+ onInvalid,
9551
+ leftButton,
9552
+ centerButton,
9553
+ rightButton,
9554
+ inputProps,
9555
+ idPrefix,
9556
+ title,
9557
+ titleAlign,
9558
+ titleColor,
9559
+ placeholders,
9560
+ formWidth,
9561
+ layout,
9562
+ onLeft,
9563
+ onCenter,
9564
+ onRight,
9565
+ onSubmit
9566
+ } = props;
9567
+ const hostRef = _react.useRef.call(void 0, null);
9568
+ const onChangeStable = useStableCallback(onChange);
9569
+ const onValidStable = useStableCallback(onValid);
9570
+ const onInvalidStable = useStableCallback(onInvalid);
9571
+ const onLeftStable = useStableCallback(onLeft);
9572
+ const onCenterStable = useStableCallback(onCenter);
9573
+ const onRightStable = useStableCallback(onRight);
9574
+ const onSubmitStable = useStableCallback(onSubmit);
9575
+ _react.useEffect.call(void 0, () => {
9576
+ const el = hostRef.current;
9577
+ if (!el) return;
9578
+ let finalSchema = schema;
9579
+ if (placeholders) {
9580
+ const shape2 = _optionalChain([schema, 'optionalAccess', _119 => _119.shape]);
9581
+ if (shape2) {
9582
+ const overrides = {};
9583
+ for (const [key, ph] of Object.entries(placeholders)) {
9584
+ const field = shape2[key];
9585
+ if (field && typeof field.meta === "function") {
9586
+ const curMeta = field.meta() || {};
9587
+ overrides[key] = field.meta({ ...curMeta, placeholder: ph });
9588
+ }
9589
+ }
9590
+ if (Object.keys(overrides).length > 0 && typeof schema.extend === "function") {
9591
+ finalSchema = schema.extend(overrides);
9592
+ }
9593
+ }
9594
+ }
9595
+ el.schema = finalSchema;
9596
+ if (value) el.value = value;
9597
+ if (leftButton !== void 0) el.leftButton = leftButton;
9598
+ if (centerButton !== void 0) el.centerButton = centerButton;
9599
+ if (rightButton !== void 0) el.rightButton = rightButton;
9600
+ if (inputProps !== void 0) el.inputProps = inputProps;
9601
+ el.idPrefix = idPrefix;
9602
+ if (title !== void 0) el.title = title;
9603
+ if (titleAlign !== void 0) el.titleAlign = titleAlign;
9604
+ if (titleColor !== void 0) el.titleColor = titleColor;
9605
+ if (formWidth !== void 0) el.formWidth = formWidth;
9606
+ if (layout !== void 0) el.layout = layout;
9607
+ }, [schema, value, leftButton, centerButton, rightButton, inputProps, idPrefix, title, titleAlign, titleColor, placeholders, formWidth, layout]);
9608
+ _react.useEffect.call(void 0, () => {
9609
+ const el = hostRef.current;
9610
+ if (!el) return;
9611
+ const handleChange = (e) => {
9612
+ const detail = e.detail;
9613
+ _optionalChain([onChangeStable, 'optionalCall', _120 => _120(_nullishCoalesce(_optionalChain([detail, 'optionalAccess', _121 => _121.value]), () => ( {})), _nullishCoalesce(_optionalChain([detail, 'optionalAccess', _122 => _122.issues]), () => ( [])))]);
9614
+ };
9615
+ const handleValid = (e) => {
9616
+ const detail = e.detail;
9617
+ _optionalChain([onValidStable, 'optionalCall', _123 => _123(_optionalChain([detail, 'optionalAccess', _124 => _124.value]), _nullishCoalesce(_optionalChain([detail, 'optionalAccess', _125 => _125.issues]), () => ( [])))]);
9618
+ };
9619
+ const handleInvalid = (e) => {
9620
+ const detail = e.detail;
9621
+ _optionalChain([onInvalidStable, 'optionalCall', _126 => _126(_nullishCoalesce(_optionalChain([detail, 'optionalAccess', _127 => _127.value]), () => ( {})), _nullishCoalesce(_optionalChain([detail, 'optionalAccess', _128 => _128.issues]), () => ( [])))]);
9622
+ };
9623
+ el.addEventListener("form-change", handleChange);
9624
+ el.addEventListener("form-valid", handleValid);
9625
+ el.addEventListener("form-invalid", handleInvalid);
9626
+ el.addEventListener("form-left", onLeftStable);
9627
+ el.addEventListener("form-center", onCenterStable);
9628
+ el.addEventListener("form-right", onRightStable);
9629
+ el.addEventListener("submit", onSubmitStable);
9630
+ return () => {
9631
+ el.removeEventListener("form-change", handleChange);
9632
+ el.removeEventListener("form-valid", handleValid);
9633
+ el.removeEventListener("form-invalid", handleInvalid);
9634
+ el.removeEventListener("form-left", onLeftStable);
9635
+ el.removeEventListener("form-center", onCenterStable);
9636
+ el.removeEventListener("form-right", onRightStable);
9637
+ el.removeEventListener("submit", onSubmitStable);
9638
+ };
9639
+ }, [onChangeStable, onValidStable, onInvalidStable, onLeftStable, onCenterStable, onRightStable, onSubmitStable]);
9640
+ _react.useImperativeHandle.call(void 0,
9641
+ ref,
9642
+ () => ({
9643
+ validate: () => _nullishCoalesce(_optionalChain([hostRef, 'access', _129 => _129.current, 'optionalAccess', _130 => _130.validate, 'optionalCall', _131 => _131()]), () => ( false)),
9644
+ getValue: () => _optionalChain([hostRef, 'access', _132 => _132.current, 'optionalAccess', _133 => _133.value]),
9645
+ setValue: (v) => {
9646
+ if (hostRef.current) hostRef.current.value = v;
9647
+ }
9648
+ }),
9649
+ []
9650
+ );
9651
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-form", { ref: hostRef, className, style: style3 });
9652
+ }
9653
+ var WavelengthFormForwardRef = React2.default.forwardRef(WavelengthFormInner);
9654
+ WavelengthFormForwardRef.displayName = "WavelengthForm";
9655
+ var WavelengthForm2 = WavelengthFormForwardRef;
6337
9656
 
6338
9657
  // src/components/headers/WavelengthTitleBar/WavelengthTitleBar.tsx
6339
9658
 
6340
9659
 
6341
- function WavelengthTitleBar2({ titleText, subtitleText, textColor, textShadow }) {
9660
+ function WavelengthTitleBar2({ titleText, subtitleText, textColor, shadowColor }) {
6342
9661
  const ref = _react.useRef.call(void 0, null);
6343
9662
  _react.useEffect.call(void 0, () => {
6344
9663
  if (ref.current) {
6345
9664
  ref.current.setAttribute("title-text", titleText || "Default Title");
6346
9665
  ref.current.setAttribute("subtitle-text", subtitleText || "Default Subtitle");
6347
9666
  ref.current.setAttribute("text-color", textColor || "#34649b");
6348
- ref.current.setAttribute("has-shadow", textShadow ? "false" : "true");
9667
+ ref.current.setAttribute("shadow-color", shadowColor || "");
6349
9668
  }
6350
- }, [titleText, subtitleText, textColor, textShadow]);
9669
+ }, [titleText, subtitleText, textColor, shadowColor]);
6351
9670
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-title-bar", { ref });
6352
9671
  }
9672
+ WavelengthTitleBar2.displayName = "WavelengthTitleBar";
6353
9673
 
6354
9674
  // src/components/headers/WavelengthTitleBar/WavelengthBanner.tsx
6355
9675
 
@@ -6370,6 +9690,7 @@ function WavelengthBanner2({ bannerText, bannerColor, textColor, opacity = 1, zI
6370
9690
  }, [bannerText, bannerColor, textColor, classification, control, opacity, zIndex, id]);
6371
9691
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-banner", { ref });
6372
9692
  }
9693
+ WavelengthBanner2.displayName = "WavelengthBanner";
6373
9694
 
6374
9695
  // src/components/logos/default/WavelengthDefaultIcon.tsx
6375
9696
 
@@ -6402,6 +9723,7 @@ function WavelengthDefaultIcon({ width: width2 = "180", height: height2 = 140 })
6402
9723
  ] }) })
6403
9724
  ] }) });
6404
9725
  }
9726
+ WavelengthDefaultIcon.displayName = "WavelengthDefaultIcon";
6405
9727
 
6406
9728
  // src/components/CSFD/WavelengthManyPlanes.tsx
6407
9729
 
@@ -6444,6 +9766,7 @@ function WavelengthManyPlanes({ numberOfPlanes = 5, trailDir = "left", color: co
6444
9766
  };
6445
9767
  return PlaneGridWrapper(numberOfPlanes, opacity);
6446
9768
  }
9769
+ WavelengthManyPlanes.displayName = "WavelengthManyPlanes";
6447
9770
 
6448
9771
  // src/components/separators/WavelengthPlaneTrail/WavelengthPlaneTrail.tsx
6449
9772
  var _Divider = require('@mui/material/Divider'); var _Divider2 = _interopRequireDefault(_Divider);
@@ -6474,6 +9797,7 @@ function WavelengthPlaneTrail({ trailDir = "right", id, color: color2 }) {
6474
9797
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Grid2.default, { item: true, style: { width: "75%" }, id: "trailExample", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Divider2.default, { variant: "middle", sx: { bgcolor: color2 ? color2 : palette2.primary } }) })
6475
9798
  ] });
6476
9799
  }
9800
+ WavelengthPlaneTrail.displayName = "WavelengthPlaneTrail";
6477
9801
 
6478
9802
  // src/components/modals/WavelengthConfirmationModal.tsx
6479
9803
 
@@ -6504,8 +9828,8 @@ function WavelengthConfirmationModal(props) {
6504
9828
  overflow: "scroll"
6505
9829
  },
6506
9830
  children: [
6507
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { margin: "0px", fontSize: "28px", fontWeight: 500, padding: "0px", marginBottom: "16px", fontFamily: props.fontFamily }, children: _optionalChain([props, 'access', _34 => _34.textObj, 'optionalAccess', _35 => _35.title]) }),
6508
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { margin: "0px", fontSize: "16px", lineHeight: "19.2px", fontFamily: props.fontFamily, fontWeight: 400, height: "60px" }, children: _optionalChain([props, 'access', _36 => _36.textObj, 'optionalAccess', _37 => _37.dialog]) }),
9831
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { margin: "0px", fontSize: "28px", fontWeight: 500, padding: "0px", marginBottom: "16px", fontFamily: props.fontFamily }, children: _optionalChain([props, 'access', _134 => _134.textObj, 'optionalAccess', _135 => _135.title]) }),
9832
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { style: { margin: "0px", fontSize: "16px", lineHeight: "19.2px", fontFamily: props.fontFamily, fontWeight: 400, height: "60px" }, children: _optionalChain([props, 'access', _136 => _136.textObj, 'optionalAccess', _137 => _137.dialog]) }),
6509
9833
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { display: "flex", flexDirection: "row", justifyContent: "flex-end", marginTop: "40px", gap: "8px" }, children: [
6510
9834
  props.cancelButton,
6511
9835
  props.submitButton
@@ -6514,6 +9838,7 @@ function WavelengthConfirmationModal(props) {
6514
9838
  }
6515
9839
  ) });
6516
9840
  }
9841
+ WavelengthConfirmationModal.displayName = "WavelengthConfirmationModal";
6517
9842
 
6518
9843
  // src/components/modals/WavelengthContentModal.tsx
6519
9844
 
@@ -6526,13 +9851,14 @@ function WavelengthContentModal(props) {
6526
9851
  };
6527
9852
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Dialog, { "data-testid": "testId-WavelengthContentModal", open: show, onClose: handleClose, "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description", children: [
6528
9853
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogTitle, { alignContent: `center`, id: "alert-dialog-title", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _material.Box, { display: "flex", alignItems: "center", children: [
6529
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { flexGrow: 1, children: _optionalChain([props, 'access', _38 => _38.textObj, 'optionalAccess', _39 => _39.title]) }),
9854
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { flexGrow: 1, children: _optionalChain([props, 'access', _138 => _138.textObj, 'optionalAccess', _139 => _139.title]) }),
6530
9855
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Box, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.IconButton, { onClick: handleClose, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Close2.default, {}) }) })
6531
9856
  ] }) }),
6532
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { align: "center", children: _optionalChain([props, 'access', _40 => _40.textObj, 'optionalAccess', _41 => _41.dialog]) }) }),
6533
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogActions, { style: { justifyContent: `center` }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Button, { "data-testid": "testId-WavelengthContentModalConfirmButton", onClick: handleContentModalOnConfirmProp, color: "primary", variant: "contained", autoFocus: true, children: _optionalChain([props, 'access', _42 => _42.textObj, 'optionalAccess', _43 => _43.purpose]) }) })
9857
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Typography, { align: "center", children: _optionalChain([props, 'access', _140 => _140.textObj, 'optionalAccess', _141 => _141.dialog]) }) }),
9858
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.DialogActions, { style: { justifyContent: `center` }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _material.Button, { "data-testid": "testId-WavelengthContentModalConfirmButton", onClick: handleContentModalOnConfirmProp, color: "primary", variant: "contained", autoFocus: true, children: _optionalChain([props, 'access', _142 => _142.textObj, 'optionalAccess', _143 => _143.purpose]) }) })
6534
9859
  ] });
6535
9860
  }
9861
+ WavelengthContentModal.displayName = "WavelengthContentModal";
6536
9862
 
6537
9863
  // src/components/modals/WavelengthPopUpMenu.tsx
6538
9864
 
@@ -6580,7 +9906,7 @@ function WavelengthPopUpMenu({ menuItems, customIcon = false, width: width2, men
6580
9906
  icon = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _iconsmaterial.HelpOutline, { fontSize: "medium", sx: { color: color2 } });
6581
9907
  }
6582
9908
  const anchor = menuDirection === "top" || menuDirection === void 0 ? "top" : "bottom";
6583
- const transform = menuDirection === "top" || menuDirection === void 0 ? "bottom" : "top";
9909
+ const transform2 = menuDirection === "top" || menuDirection === void 0 ? "bottom" : "top";
6584
9910
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
6585
9911
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _IconButton2.default, { onClick: handleClick, children: icon }),
6586
9912
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -6598,7 +9924,7 @@ function WavelengthPopUpMenu({ menuItems, customIcon = false, width: width2, men
6598
9924
  anchorEl,
6599
9925
  TransitionComponent: _Slide2.default,
6600
9926
  anchorOrigin: { vertical: anchor, horizontal: "center" },
6601
- transformOrigin: { vertical: transform, horizontal: "center" },
9927
+ transformOrigin: { vertical: transform2, horizontal: "center" },
6602
9928
  children: [
6603
9929
  ...menuItems.map((items, index) => {
6604
9930
  if (items.end === true) {
@@ -6666,6 +9992,7 @@ function WavelengthPopUpMenu({ menuItems, customIcon = false, width: width2, men
6666
9992
  )
6667
9993
  ] });
6668
9994
  }
9995
+ WavelengthPopUpMenu.displayName = "WavelengthPopUpMenu";
6669
9996
 
6670
9997
  // src/components/modals/WavelengthDropdown.tsx
6671
9998
 
@@ -6744,7 +10071,7 @@ function WavelengthDropdown({
6744
10071
  borderBottomRightRadius: "8px",
6745
10072
  borderTopRightRadius: "0px",
6746
10073
  borderTopLeftRadius: "0px",
6747
- boxShadow: _optionalChain([menuSx, 'optionalAccess', _44 => _44.boxShadow]),
10074
+ boxShadow: _optionalChain([menuSx, 'optionalAccess', _144 => _144.boxShadow]),
6748
10075
  width: myMenusx.width,
6749
10076
  backgroundColor: `${myMenusx.backgroundColor}`
6750
10077
  },
@@ -6795,6 +10122,7 @@ function WavelengthDropdown({
6795
10122
  ] });
6796
10123
  }
6797
10124
  var WavelengthDropdownStyled = _material.styled.call(void 0, WavelengthDropdown)``;
10125
+ WavelengthDropdown.displayName = "WavelengthDropdown";
6798
10126
 
6799
10127
  // src/components/snackbars/WavelengthSnackbar.tsx
6800
10128
  var _Snackbar = require('@mui/material/Snackbar'); var _Snackbar2 = _interopRequireDefault(_Snackbar);
@@ -6839,6 +10167,7 @@ function WavelengthSnackbar({ show, setShow, closeIcon, message, snackBarColor,
6839
10167
  }
6840
10168
  );
6841
10169
  }
10170
+ WavelengthSnackbar.displayName = "WavelengthSnackbar";
6842
10171
 
6843
10172
  // src/components/snackbars/WavelengthStandardSnackbar.tsx
6844
10173
 
@@ -6901,6 +10230,7 @@ function WavelengthStandardSnackbar({ type, show, icon, horryAlign, vertyAlign,
6901
10230
  }
6902
10231
  );
6903
10232
  }
10233
+ WavelengthStandardSnackbar.displayName = "WavelengthStandardSnackbar";
6904
10234
 
6905
10235
  // src/components/snackbars/WavelengthTestSnackbar.tsx
6906
10236
 
@@ -6971,6 +10301,7 @@ function WavelengthTestSnackbar({ isPopUpOpen, toggleOpen, type, message, custom
6971
10301
  }
6972
10302
  ) });
6973
10303
  }
10304
+ WavelengthTestSnackbar.displayName = "WavelengthTestSnackbar";
6974
10305
 
6975
10306
  // src/components/sliders/WavelengthSlider.tsx
6976
10307
 
@@ -6999,6 +10330,7 @@ function WavelengthSlider({ width: width2 = "300px", color: color2, valueDisplay
6999
10330
  }
7000
10331
  ) });
7001
10332
  }
10333
+ WavelengthSlider.displayName = "WavelengthSlider";
7002
10334
 
7003
10335
  // src/components/carousels/WavelengthDefaultCarousel.tsx
7004
10336
 
@@ -7059,6 +10391,7 @@ var DefaultCarousel = ({ items, buttonSize, imageHeight, imageWidth, cardHeight,
7059
10391
  }
7060
10392
  ) }) });
7061
10393
  };
10394
+ DefaultCarousel.displayName = "DefaultCarousel";
7062
10395
 
7063
10396
  // src/components/carousels/WavelengthSliderCarousel.tsx
7064
10397
 
@@ -7142,6 +10475,7 @@ var SliderCardCarousel = ({ items, cardHeight, cardWidth, contHeight, contWidth
7142
10475
  }
7143
10476
  ) }) });
7144
10477
  };
10478
+ SliderCardCarousel.displayName = "SliderCardCarousel";
7145
10479
 
7146
10480
  // src/components/pagination/WavelengthDefaultPagination.tsx
7147
10481
 
@@ -7255,6 +10589,7 @@ function WavelengthButtonPagination({ totalPages, current, handleChangePage, ite
7255
10589
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Button2.default, { onClick: () => handleChangePage(current + 1), disabled: current === totalPages, sx: WLButtonPagStyle, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ArrowForwardIos2.default, {}) })
7256
10590
  ] });
7257
10591
  }
10592
+ WavelengthButtonPagination.displayName = "WavelengthButtonPagination";
7258
10593
  var WavelengthButtonPagination_default = WavelengthButtonPagination;
7259
10594
 
7260
10595
  // src/components/pagination/WavelengthVariationPagination.tsx
@@ -7346,6 +10681,7 @@ function WavelengthVariationPagination({ totalPages, current, variant, handleCha
7346
10681
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _Button2.default, { onClick: () => handleChangePage(current + 1), disabled: current === totalPages, variant, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _ArrowForwardIos2.default, {}) })
7347
10682
  ] });
7348
10683
  }
10684
+ WavelengthVariationPagination.displayName = "WavelengthVariationPagination";
7349
10685
  var WavelengthVariationPagination_default = WavelengthVariationPagination;
7350
10686
 
7351
10687
  // src/components/pagination/WavelengthDefaultPagination.tsx
@@ -7451,6 +10787,7 @@ function DefaultPagination({ totalPages, currentPageNumber, siblingCount = 1, bo
7451
10787
  );
7452
10788
  }
7453
10789
  }
10790
+ DefaultPagination.displayName = "DefaultPagination";
7454
10791
  var WavelengthDefaultPagination_default = DefaultPagination;
7455
10792
 
7456
10793
  // src/components/TextField/WavelengthInput.tsx
@@ -7472,7 +10809,7 @@ var WavelengthInput2 = _react.forwardRef.call(void 0,
7472
10809
  validationType = "none",
7473
10810
  minLength,
7474
10811
  maxLength,
7475
- required,
10812
+ required: required2,
7476
10813
  forceError,
7477
10814
  disabled,
7478
10815
  width: width2,
@@ -7494,7 +10831,7 @@ var WavelengthInput2 = _react.forwardRef.call(void 0,
7494
10831
  const internalRef = _react.useRef.call(void 0, null);
7495
10832
  _react.useImperativeHandle.call(void 0, ref, () => ({
7496
10833
  ...internalRef.current,
7497
- validate: () => _optionalChain([internalRef, 'access', _45 => _45.current, 'optionalAccess', _46 => _46.validate, 'optionalCall', _47 => _47(true)])
10834
+ validate: () => _optionalChain([internalRef, 'access', _145 => _145.current, 'optionalAccess', _146 => _146.validate, 'optionalCall', _147 => _147(true)])
7498
10835
  }));
7499
10836
  _react.useEffect.call(void 0, () => {
7500
10837
  const el = internalRef.current;
@@ -7520,7 +10857,7 @@ var WavelengthInput2 = _react.forwardRef.call(void 0,
7520
10857
  set("validation-type", validationType);
7521
10858
  set("min-length", minLength);
7522
10859
  set("max-length", maxLength);
7523
- set("required", required ? "" : void 0);
10860
+ set("required", required2 ? "" : void 0);
7524
10861
  set("force-error", forceError ? "" : void 0);
7525
10862
  set("width", width2);
7526
10863
  set("height", height2);
@@ -7550,7 +10887,7 @@ var WavelengthInput2 = _react.forwardRef.call(void 0,
7550
10887
  validationType,
7551
10888
  minLength,
7552
10889
  maxLength,
7553
- required,
10890
+ required2,
7554
10891
  forceError,
7555
10892
  width2,
7556
10893
  height2,
@@ -7570,7 +10907,7 @@ var WavelengthInput2 = _react.forwardRef.call(void 0,
7570
10907
  const el = internalRef.current;
7571
10908
  if (!el || !onChange) return;
7572
10909
  const handler = (e) => {
7573
- const input = _optionalChain([el, 'access', _48 => _48.shadowRoot, 'optionalAccess', _49 => _49.querySelector, 'call', _50 => _50("input")]);
10910
+ const input = _optionalChain([el, 'access', _148 => _148.shadowRoot, 'optionalAccess', _149 => _149.querySelector, 'call', _150 => _150("input")]);
7574
10911
  if (input) {
7575
10912
  const synthetic = {
7576
10913
  ...e,
@@ -7770,7 +11107,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages }) => {
7770
11107
  const [noRowsOpen, setNoRowsOpen] = _react.useState.call(void 0, false);
7771
11108
  const [isModalOpen, setIsModalOpen] = _react.useState.call(void 0, false);
7772
11109
  const [searchItem, setSearchItem] = _react.useState.call(void 0, "");
7773
- const [selectedValue, setSelectedValue] = _react.useState.call(void 0, _optionalChain([columns, 'access', _51 => _51[0], 'optionalAccess', _52 => _52.key]) || "");
11110
+ const [selectedValue, setSelectedValue] = _react.useState.call(void 0, _optionalChain([columns, 'access', _151 => _151[0], 'optionalAccess', _152 => _152.key]) || "");
7774
11111
  const [currentPage, setCurrentPage] = _react.useState.call(void 0, 1);
7775
11112
  const [isOpen, setIsOpen] = _react.useState.call(void 0, false);
7776
11113
  const [editingMenuKey, setEditingMenuKey] = _react.useState.call(void 0, null);
@@ -7924,7 +11261,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages }) => {
7924
11261
  ] }, index)
7925
11262
  ] }, `headCell-${index}`);
7926
11263
  });
7927
- const rows = !_optionalChain([currentPageData, 'optionalAccess', _53 => _53.length]) || noRowsOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([currentPageData, 'optionalAccess', _54 => _54.map, 'call', _55 => _55((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: columns.map((column, index2) => {
11264
+ const rows = !_optionalChain([currentPageData, 'optionalAccess', _153 => _153.length]) || noRowsOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([currentPageData, 'optionalAccess', _154 => _154.map, 'call', _155 => _155((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: columns.map((column, index2) => {
7928
11265
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledTd, { children: editingId === item.id && editedColumnKey === column.key ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7929
11266
  StyledInput,
7930
11267
  {
@@ -7952,6 +11289,7 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages }) => {
7952
11289
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledNavBoxDiv, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WavelengthDefaultPagination_default, { totalPages, currentPageNumber: currentPage, onPageChange: setCurrentPage, style: "circular" }) })
7953
11290
  ] });
7954
11291
  };
11292
+ WavelengthDataTable.displayName = "WavelengthDataTable";
7955
11293
 
7956
11294
  // src/components/DataTable/SubRowTable/ChildSubTable.tsx
7957
11295
 
@@ -8169,7 +11507,7 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
8169
11507
  }
8170
11508
  if (sortSubOrder) {
8171
11509
  result.map(
8172
- (item) => _optionalChain([item, 'access', _56 => _56.Details, 'optionalAccess', _57 => _57.fileObjects, 'access', _58 => _58.sort, 'call', _59 => _59((c, d) => {
11510
+ (item) => _optionalChain([item, 'access', _156 => _156.Details, 'optionalAccess', _157 => _157.fileObjects, 'access', _158 => _158.sort, 'call', _159 => _159((c, d) => {
8173
11511
  const valueC = c[sortSubKey];
8174
11512
  const valueD = d[sortSubKey];
8175
11513
  if (typeof valueC === "string" && typeof valueD === "string") {
@@ -8230,24 +11568,24 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
8230
11568
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { children: renderSortSubButton(column, sortSubOrder, sortSubKey) }, `SubHeadCell-${index}`);
8231
11569
  });
8232
11570
  const subDataRows = (itemId) => {
8233
- return processedRowData.filter((item) => _optionalChain([item, 'access', _60 => _60.Details, 'optionalAccess', _61 => _61.relationId]) === itemId).map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: _optionalChain([item, 'access', _62 => _62.Details, 'optionalAccess', _63 => _63.fileObjects, 'access', _64 => _64.map, 'call', _65 => _65((fileItem, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SubDataTableBodyRowContainer, { children: [
11571
+ return processedRowData.filter((item) => _optionalChain([item, 'access', _160 => _160.Details, 'optionalAccess', _161 => _161.relationId]) === itemId).map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: _optionalChain([item, 'access', _162 => _162.Details, 'optionalAccess', _163 => _163.fileObjects, 'access', _164 => _164.map, 'call', _165 => _165((fileItem, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SubDataTableBodyRowContainer, { children: [
8234
11572
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DownloadArrow, { onClick: downloadArrowOnClick, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8235
11573
  "path",
8236
11574
  {
8237
11575
  d: "M8.5 12L3.5 7L4.9 5.55L7.5 8.15V0H9.5V8.15L12.1 5.55L13.5 7L8.5 12ZM2.5 16C1.95 16 1.47917 15.8042 1.0875 15.4125C0.695833 15.0208 0.5 14.55 0.5 14V11H2.5V14H14.5V11H16.5V14C16.5 14.55 16.3042 15.0208 15.9125 15.4125C15.5208 15.8042 15.05 16 14.5 16H2.5Z",
8238
11576
  fill: "#1C1B1F"
8239
11577
  }
8240
- ) }) }) }, `td-${_optionalChain([item, 'access', _66 => _66.Details, 'optionalAccess', _67 => _67.relationId])}-${fileItem.id}`),
11578
+ ) }) }) }, `td-${_optionalChain([item, 'access', _166 => _166.Details, 'optionalAccess', _167 => _167.relationId])}-${fileItem.id}`),
8241
11579
  SubDataColumns.map((column) => {
8242
11580
  const columnKey = trimBeforePeriod2(column.key);
8243
11581
  const value = fileItem[columnKey];
8244
11582
  if (value !== void 0) {
8245
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }, `span-${_optionalChain([item, 'access', _68 => _68.Details, 'optionalAccess', _69 => _69.relationId])}-${fileItem.id}-${index}-${column.title}`) }, `fileitem-${item}-${_optionalChain([item, 'access', _70 => _70.Details, 'optionalAccess', _71 => _71.relationId])}-${fileItem.id}-${index}-${column.title}`);
11583
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }, `span-${_optionalChain([item, 'access', _168 => _168.Details, 'optionalAccess', _169 => _169.relationId])}-${fileItem.id}-${index}-${column.title}`) }, `fileitem-${item}-${_optionalChain([item, 'access', _170 => _170.Details, 'optionalAccess', _171 => _171.relationId])}-${fileItem.id}-${index}-${column.title}`);
8246
11584
  }
8247
11585
  })
8248
- ] }, `${item}-${_optionalChain([item, 'access', _72 => _72.Details, 'optionalAccess', _73 => _73.relationId])}-${fileItem.id}-${index}`))]) }, `SDR-${item.id}-${_optionalChain([item, 'access', _74 => _74.Details, 'optionalAccess', _75 => _75.relationId])}`));
11586
+ ] }, `${item}-${_optionalChain([item, 'access', _172 => _172.Details, 'optionalAccess', _173 => _173.relationId])}-${fileItem.id}-${index}`))]) }, `SDR-${item.id}-${_optionalChain([item, 'access', _174 => _174.Details, 'optionalAccess', _175 => _175.relationId])}`));
8249
11587
  };
8250
- const dataRows = _optionalChain([processedRowData, 'optionalAccess', _76 => _76.map, 'call', _77 => _77((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, BodyRowContainer, { children: [
11588
+ const dataRows = _optionalChain([processedRowData, 'optionalAccess', _176 => _176.map, 'call', _177 => _177((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, BodyRowContainer, { children: [
8251
11589
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { $amountofColumns: HeadColumns.length, children: HeadColumns.map((column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBodyCell, { $primaryBoldState: column.PrimaryBoldText, children: item[column.key] }, `TableBodycell-${item.id}-${column.key}`)) }),
8252
11590
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ButtonStylingRow, { children: [
8253
11591
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DownloadMissionButton, { onClick: downloadMissionOnClick, children: "Download Mission" }),
@@ -8270,6 +11608,7 @@ var ChildDataTable = ({ data, columns, downloadArrowOnClick, downloadMissionOnCl
8270
11608
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { title: "tablebodies", children: dataRows })
8271
11609
  ] });
8272
11610
  };
11611
+ ChildDataTable.displayName = "ChildDataTable";
8273
11612
 
8274
11613
  // src/components/DataTable/NestedDataTable/NestedDataTable.tsx
8275
11614
 
@@ -8366,9 +11705,9 @@ var NestedDataTable = ({ data, columns }) => {
8366
11705
  const SubDataHeaders = SubDataColumns.map((column, index) => {
8367
11706
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "th", { children: column.title }, `SubHeadCell-${index}`);
8368
11707
  });
8369
- const subDataRows = !_optionalChain([data, 'optionalAccess', _78 => _78.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoSubDataRows", colSpan: columns.length, children: "No data" }) }) : data.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTr, { children: SubDataColumns.map((column, colIndex) => {
11708
+ const subDataRows = !_optionalChain([data, 'optionalAccess', _178 => _178.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoSubDataRows", colSpan: columns.length, children: "No data" }) }) : data.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SubDataTr, { children: SubDataColumns.map((column, colIndex) => {
8370
11709
  const columnKey = trimBeforePeriod(column.key);
8371
- const value = _optionalChain([item, 'access', _79 => _79.Details, 'optionalAccess', _80 => _80[columnKey]]);
11710
+ const value = _optionalChain([item, 'access', _179 => _179.Details, 'optionalAccess', _180 => _180[columnKey]]);
8372
11711
  console.log("value: ", value);
8373
11712
  if (value !== void 0) {
8374
11713
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: value }) }, `Span-${item.id}-${colIndex}`);
@@ -8378,7 +11717,7 @@ var NestedDataTable = ({ data, columns }) => {
8378
11717
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: SubDataHeaders }) }),
8379
11718
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: subDataRows })
8380
11719
  ] });
8381
- const rows = !_optionalChain([data, 'optionalAccess', _81 => _81.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([data, 'optionalAccess', _82 => _82.map, 'call', _83 => _83((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
11720
+ const rows = !_optionalChain([data, 'optionalAccess', _181 => _181.length]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([data, 'optionalAccess', _182 => _182.map, 'call', _183 => _183((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
8382
11721
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, PrimaryTrRows, { $index: index, children: [
8383
11722
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownButton, { onClick: () => toggleDropdown(index), children: isAscending && isOpen && primaryRowIndex === index ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: "\u2227" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: "\u2228" }) }),
8384
11723
  HeadColumns.map((column, index2) => {
@@ -8395,6 +11734,7 @@ var NestedDataTable = ({ data, columns }) => {
8395
11734
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: rows })
8396
11735
  ] }) });
8397
11736
  };
11737
+ NestedDataTable.displayName = "NestedDataTable";
8398
11738
 
8399
11739
  // src/components/AutoComplete/WlAutoComplete.tsx
8400
11740
 
@@ -8657,6 +11997,7 @@ var WLAutoComplete = ({
8657
11997
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, NoHoverListItem, { "data-testid": "NoOptionsListitem", ref: noItemListRef, id: "No-Option-List-item", onMouseDown: (e) => e.preventDefault(), children: "No Options found" }) })
8658
11998
  ] }) });
8659
11999
  };
12000
+ WLAutoComplete.displayName = "WLAutoComplete";
8660
12001
 
8661
12002
  // src/components/inputs/WavelengthInputDatePicketer.tsx
8662
12003
 
@@ -8703,6 +12044,7 @@ var WLInputDatePicker2 = () => {
8703
12044
  }, []);
8704
12045
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "wavelength-input-date-picker", { ref });
8705
12046
  };
12047
+ WLInputDatePicker2.displayName = "WLInputDatePicker";
8706
12048
 
8707
12049
  // src/components/inputs/WLDatePicker.tsx
8708
12050
 
@@ -8849,6 +12191,7 @@ var WLDatePicker = ({
8849
12191
  }
8850
12192
  );
8851
12193
  };
12194
+ WLDatePicker.displayName = "WLDatePicker";
8852
12195
 
8853
12196
  // src/components/samples/SampleComponent.tsx
8854
12197
 
@@ -8869,6 +12212,8 @@ var SampleComponent2 = ({
8869
12212
  }, [testProp]);
8870
12213
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "sample-component", { ref, ...rest, children });
8871
12214
  };
12215
+ SampleComponent2.displayName = "SampleComponent";
12216
+
8872
12217
 
8873
12218
 
8874
12219
 
@@ -8926,7 +12271,7 @@ var SampleComponent2 = ({
8926
12271
 
8927
12272
 
8928
12273
 
8929
- exports.ButtonIcon = ButtonIcon; exports.ButtonMenu = ButtonMenu; exports.ChildDataTable = ChildDataTable; exports.DefaultCarousel = DefaultCarousel; exports.DefaultPagination = DefaultPagination; exports.NestedDataTable = NestedDataTable; exports.SampleComponent = SampleComponent2; exports.SliderCardCarousel = SliderCardCarousel; exports.WLAutoComplete = WLAutoComplete; exports.WLDatePicker = WLDatePicker; exports.WLInputDatePicker = WLInputDatePicker2; exports.WavelengthAccessAlert = WavelengthAccessAlert; exports.WavelengthAlert = WavelengthAlert; exports.WavelengthAppLogo = WavelengthAppLogo; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutocomplete = WavelengthAutocomplete; exports.WavelengthBanner = WavelengthBanner2; exports.WavelengthBox = WavelengthBox; exports.WavelengthButton = WavelengthButton2; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDataTable = WavelengthDataTable; exports.WavelengthDefaultIcon = WavelengthDefaultIcon; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthInput = WavelengthInput2; exports.WavelengthManyPlanes = WavelengthManyPlanes; exports.WavelengthNotAvailablePage = WavelengthNotAvailablePage; exports.WavelengthPermissionAlert = WavelengthPermissionAlert; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar2; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSearchTextField = WavelengthSearchTextField; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSpinningOuterCircle = WavelengthSpinningOuterCircle; exports.WavelengthStandardSnackbar = WavelengthStandardSnackbar; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthTestSnackbar = WavelengthTestSnackbar; exports.WavelengthTitleBar = WavelengthTitleBar2; exports.add = add; exports.ascendingRange = ascendingRange; exports.concat = concat; exports.findBestStringMatch = findBestStringMatch; exports.range = range; exports.useOutsideClick = useOutsideClick; exports.useThemeContext = useThemeContext;
12274
+ exports.ButtonIcon = ButtonIcon; exports.ButtonMenu = ButtonMenu; exports.ChildDataTable = ChildDataTable; exports.DefaultCarousel = DefaultCarousel; exports.DefaultPagination = DefaultPagination; exports.NestedDataTable = NestedDataTable; exports.SampleComponent = SampleComponent2; exports.SliderCardCarousel = SliderCardCarousel; exports.WLAutoComplete = WLAutoComplete; exports.WLDatePicker = WLDatePicker; exports.WLInputDatePicker = WLInputDatePicker2; exports.WavelengthAccessAlert = WavelengthAccessAlert; exports.WavelengthAlert = WavelengthAlert; exports.WavelengthAppLogo = WavelengthAppLogo; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutocomplete = WavelengthAutocomplete; exports.WavelengthBanner = WavelengthBanner2; exports.WavelengthBox = WavelengthBox; exports.WavelengthButton = WavelengthButton2; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentModal = WavelengthContentModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDataTable = WavelengthDataTable; exports.WavelengthDefaultIcon = WavelengthDefaultIcon; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthDropdownButton = WavelengthDropdownButton; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDownloader = WavelengthFileDownloader; exports.WavelengthFooter = WavelengthFooter; exports.WavelengthForm = WavelengthForm2; exports.WavelengthInput = WavelengthInput2; exports.WavelengthManyPlanes = WavelengthManyPlanes; exports.WavelengthNotAvailablePage = WavelengthNotAvailablePage; exports.WavelengthPermissionAlert = WavelengthPermissionAlert; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar2; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSearchTextField = WavelengthSearchTextField; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSpinningOuterCircle = WavelengthSpinningOuterCircle; exports.WavelengthStandardSnackbar = WavelengthStandardSnackbar; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthTestSnackbar = WavelengthTestSnackbar; exports.WavelengthTitleBar = WavelengthTitleBar2; exports.add = add; exports.ascendingRange = ascendingRange; exports.concat = concat; exports.findBestStringMatch = findBestStringMatch; exports.range = range; exports.useOutsideClick = useOutsideClick; exports.useThemeContext = useThemeContext;
8930
12275
  /*! Bundled license information:
8931
12276
 
8932
12277
  react-is/cjs/react-is.production.min.js:
@@ -8980,7 +12325,7 @@ react-is/cjs/react-is.development.js:
8980
12325
 
8981
12326
  @mui/styled-engine/index.js:
8982
12327
  (**
8983
- * @mui/styled-engine v5.16.14
12328
+ * @mui/styled-engine v5.18.0
8984
12329
  *
8985
12330
  * @license MIT
8986
12331
  * This source code is licensed under the MIT license found in the