@tung-engineering/agent-platform-web-sdk 0.0.87 → 0.0.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/web-sdk.mjs CHANGED
@@ -1,15 +1,15 @@
1
- var Uu = Object.defineProperty, Zu = Object.defineProperties;
2
- var qu = Object.getOwnPropertyDescriptors;
1
+ var Zu = Object.defineProperty, qu = Object.defineProperties;
2
+ var Hu = Object.getOwnPropertyDescriptors;
3
3
  var Di = Object.getOwnPropertySymbols;
4
- var Hu = Object.prototype.hasOwnProperty, Fu = Object.prototype.propertyIsEnumerable;
5
- var Mi = Math.pow, gs = (e, t, n) => t in e ? Uu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y = (e, t) => {
4
+ var Fu = Object.prototype.hasOwnProperty, Bu = Object.prototype.propertyIsEnumerable;
5
+ var Mi = Math.pow, gs = (e, t, n) => t in e ? Zu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, y = (e, t) => {
6
6
  for (var n in t || (t = {}))
7
- Hu.call(t, n) && gs(e, n, t[n]);
7
+ Fu.call(t, n) && gs(e, n, t[n]);
8
8
  if (Di)
9
9
  for (var n of Di(t))
10
- Fu.call(t, n) && gs(e, n, t[n]);
10
+ Bu.call(t, n) && gs(e, n, t[n]);
11
11
  return e;
12
- }, D = (e, t) => Zu(e, qu(t));
12
+ }, D = (e, t) => qu(e, Hu(t));
13
13
  var ie = (e, t, n) => gs(e, typeof t != "symbol" ? t + "" : t, n);
14
14
  var z = (e, t, n) => new Promise((r, o) => {
15
15
  var i = (l) => {
@@ -27,7 +27,7 @@ var z = (e, t, n) => new Promise((r, o) => {
27
27
  }, d = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(i, a);
28
28
  d((n = n.apply(e, t)).next());
29
29
  });
30
- const Bu = `
30
+ const Gu = `
31
31
  :where([data-ap-sdk][popover]) {
32
32
  position: fixed;
33
33
  margin: 0;
@@ -38,7 +38,7 @@ const Bu = `
38
38
  overflow: visible;
39
39
  inset: auto;
40
40
  }
41
- `, Gu = `
41
+ `, Wu = `
42
42
  @keyframes ap-sdk-panel-in {
43
43
  from { opacity: 0; transform: translateY(-50%) translateX(16px) scale(0.98); }
44
44
  to { opacity: 1; transform: translateY(-50%) translateX(0) scale(1); }
@@ -332,7 +332,7 @@ const Bu = `
332
332
  color: #991b1b;
333
333
  border: 1px solid #fca5a5;
334
334
  }
335
- `, Wu = `
335
+ `, Ju = `
336
336
  .ap-sdk-highlight {
337
337
  position: fixed;
338
338
  pointer-events: none;
@@ -343,7 +343,7 @@ const Bu = `
343
343
  z-index: 2147483645;
344
344
  transition: top 60ms ease, left 60ms ease, width 60ms ease, height 60ms ease;
345
345
  }
346
- `, Ju = `
346
+ `, Vu = `
347
347
  .ap-sdk-picker-cursor {
348
348
  position: fixed;
349
349
  bottom: 16px;
@@ -417,7 +417,7 @@ const Bu = `
417
417
  background: rgba(255, 255, 255, 0.12);
418
418
  opacity: 1;
419
419
  }
420
- `, Vu = `
420
+ `, Yu = `
421
421
  .ap-sdk-recorder-bar {
422
422
  position: fixed;
423
423
  bottom: 16px;
@@ -471,7 +471,7 @@ const Bu = `
471
471
  .ap-sdk-recorder-bar__btn--stop:hover {
472
472
  background: oklch(95% 0.035 50);
473
473
  }
474
- `, Yu = `
474
+ `, Xu = `
475
475
  .ap-sdk-panel__context {
476
476
  padding: 10px 16px;
477
477
  background: #f9fafb;
@@ -701,7 +701,7 @@ const Bu = `
701
701
  font-style: italic;
702
702
  white-space: normal;
703
703
  }
704
- `, Xu = `
704
+ `, Ku = `
705
705
  .ap-sdk-fab {
706
706
  position: fixed;
707
707
  bottom: 20px;
@@ -831,7 +831,7 @@ const Bu = `
831
831
  line-height: 1;
832
832
  pointer-events: none;
833
833
  }
834
- `, Ku = `
834
+ `, Qu = `
835
835
  .ap-sdk-advanced {
836
836
  border-top: 1px solid #f3f4f6;
837
837
  padding-top: 8px;
@@ -887,7 +887,7 @@ const Bu = `
887
887
  color: #9ca3af;
888
888
  margin-top: 2px;
889
889
  }
890
- `, Qu = `
890
+ `, ed = `
891
891
  .ap-sdk-list-body {
892
892
  padding: 8px 0;
893
893
  max-height: 320px;
@@ -1012,7 +1012,7 @@ button.ap-sdk-list-item__link {
1012
1012
  .ap-sdk-status-link:hover {
1013
1013
  color: oklch(47% 0.13 40);
1014
1014
  }
1015
- `, ed = `
1015
+ `, td = `
1016
1016
  .ap-sdk-record-review__list {
1017
1017
  max-height: 320px;
1018
1018
  overflow-y: auto;
@@ -1073,7 +1073,7 @@ button.ap-sdk-list-item__link {
1073
1073
  color: #ef4444;
1074
1074
  background: #fee2e2;
1075
1075
  }
1076
- `, td = `
1076
+ `, nd = `
1077
1077
  @keyframes ap-sdk-card-in {
1078
1078
  from { opacity: 0; transform: scale(0.97); }
1079
1079
  to { opacity: 1; transform: scale(1); }
@@ -1152,7 +1152,7 @@ button.ap-sdk-list-item__link {
1152
1152
  flex: 1;
1153
1153
  white-space: nowrap;
1154
1154
  }
1155
- `, nd = `
1155
+ `, rd = `
1156
1156
  .ap-sdk-runner__approval {
1157
1157
  margin-top: 14px;
1158
1158
  display: flex;
@@ -1474,7 +1474,7 @@ button.ap-sdk-list-item__link {
1474
1474
  font-style: italic;
1475
1475
  padding: 4px 0;
1476
1476
  }
1477
- `, rd = `
1477
+ `, od = `
1478
1478
  .ap-sdk-resize-handle {
1479
1479
  position: absolute;
1480
1480
  bottom: 2px;
@@ -1496,8 +1496,7 @@ button.ap-sdk-list-item__link {
1496
1496
  border-right: 2px solid #d1d5db;
1497
1497
  border-bottom: 2px solid #d1d5db;
1498
1498
  }
1499
- `, od = [
1500
- Bu,
1499
+ `, sd = [
1501
1500
  Gu,
1502
1501
  Wu,
1503
1502
  Ju,
@@ -1509,14 +1508,15 @@ button.ap-sdk-list-item__link {
1509
1508
  ed,
1510
1509
  td,
1511
1510
  nd,
1512
- rd
1511
+ rd,
1512
+ od
1513
1513
  ].join(`
1514
1514
  `);
1515
1515
  let ji = !1;
1516
1516
  function Hr() {
1517
1517
  if (ji) return;
1518
1518
  const e = document.createElement("style");
1519
- e.setAttribute("data-ap-sdk", "1"), e.textContent = od, document.head.appendChild(e), ji = !0;
1519
+ e.setAttribute("data-ap-sdk", "1"), e.textContent = sd, document.head.appendChild(e), ji = !0;
1520
1520
  }
1521
1521
  function vo(e) {
1522
1522
  if (e === document.body) return "body";
@@ -1547,7 +1547,7 @@ function Io(e, t = 200) {
1547
1547
  const n = ((r = e.textContent) != null ? r : "").replace(/\s+/g, " ").trim();
1548
1548
  return n.length > t ? n.slice(0, t) + "…" : n;
1549
1549
  }
1550
- const sd = [
1550
+ const id = [
1551
1551
  "role",
1552
1552
  "type",
1553
1553
  "name",
@@ -1570,22 +1570,22 @@ function yo(e) {
1570
1570
  };
1571
1571
  for (const d of Array.from(e.attributes))
1572
1572
  d.name.startsWith("aria-") && a(d.name);
1573
- for (const d of sd)
1573
+ for (const d of id)
1574
1574
  a(d);
1575
1575
  return `${t}${n}${r}${o.join("")}`;
1576
1576
  }
1577
- function id(e, t = 80) {
1577
+ function ad(e, t = 80) {
1578
1578
  const n = Array.from(e.childNodes).filter((r) => r.nodeType === Node.TEXT_NODE).map((r) => {
1579
1579
  var o;
1580
1580
  return ((o = r.textContent) != null ? o : "").trim();
1581
1581
  }).filter(Boolean).join(" ");
1582
1582
  return n.length > t ? n.slice(0, t) + "…" : n;
1583
1583
  }
1584
- function ad(e, t = 5, n = 10) {
1584
+ function cd(e, t = 5, n = 10) {
1585
1585
  function r(o, i) {
1586
1586
  const a = yo(o), d = " ".repeat(i), l = Array.from(o.children).slice(0, n);
1587
1587
  if (i >= t || l.length === 0) {
1588
- const p = id(o);
1588
+ const p = ad(o);
1589
1589
  return p ? `${d}${a} "${p}"` : `${d}${a}`;
1590
1590
  }
1591
1591
  return [`${d}${a}`, ...l.map((p) => r(p, i + 1))].join(`
@@ -1593,7 +1593,7 @@ function ad(e, t = 5, n = 10) {
1593
1593
  }
1594
1594
  return r(e, 0);
1595
1595
  }
1596
- const cd = 'section, article, aside, nav, main, header, footer, form, fieldset, dialog, [role="region"], [role="navigation"], [role="main"], [role="complementary"], [role="banner"], [role="contentinfo"], [role="form"], [role="search"], [role="dialog"]', ld = {
1596
+ const ld = 'section, article, aside, nav, main, header, footer, form, fieldset, dialog, [role="region"], [role="navigation"], [role="main"], [role="complementary"], [role="banner"], [role="contentinfo"], [role="form"], [role="search"], [role="dialog"]', ud = {
1597
1597
  fieldset: "legend",
1598
1598
  table: "caption",
1599
1599
  figure: "figcaption",
@@ -1603,12 +1603,12 @@ function ao(e, t) {
1603
1603
  const n = e.replace(/\s+/g, " ").trim();
1604
1604
  return n.length > t ? n.slice(0, t) + "…" : n;
1605
1605
  }
1606
- function ud(e) {
1606
+ function dd(e) {
1607
1607
  var n;
1608
1608
  const t = e.querySelectorAll('h1, h2, h3, h4, h5, h6, [role="heading"]');
1609
1609
  for (const r of Array.from(t)) {
1610
1610
  let o = r.parentElement;
1611
- for (; o && o !== e && !o.matches(cd); )
1611
+ for (; o && o !== e && !o.matches(ld); )
1612
1612
  o = o.parentElement;
1613
1613
  if (o === e) {
1614
1614
  const i = ((n = r.textContent) != null ? n : "").trim();
@@ -1617,14 +1617,14 @@ function ud(e) {
1617
1617
  }
1618
1618
  return "";
1619
1619
  }
1620
- function dd(e, t = 80) {
1620
+ function pd(e, t = 80) {
1621
1621
  var a, d, l;
1622
- const n = ld[e.tagName.toLowerCase()];
1622
+ const n = ud[e.tagName.toLowerCase()];
1623
1623
  if (n) {
1624
1624
  const p = (d = (a = e.querySelector(n)) == null ? void 0 : a.textContent) == null ? void 0 : d.trim();
1625
1625
  if (p) return ao(p, t);
1626
1626
  }
1627
- const r = ud(e);
1627
+ const r = dd(e);
1628
1628
  if (r) return ao(r, t);
1629
1629
  const o = (l = e.getAttribute("aria-label")) == null ? void 0 : l.trim();
1630
1630
  if (o) return ao(o, t);
@@ -1638,11 +1638,11 @@ function dd(e, t = 80) {
1638
1638
  }
1639
1639
  return "";
1640
1640
  }
1641
- function pd(e, t = 6) {
1641
+ function hd(e, t = 6) {
1642
1642
  const n = [], r = /* @__PURE__ */ new Set();
1643
1643
  let o = e;
1644
1644
  for (; o && o !== document.body && n.length < t; ) {
1645
- const i = o === e ? "" : dd(o), a = i && !r.has(i) ? `${yo(o)} ["${i}"]` : yo(o);
1645
+ const i = o === e ? "" : pd(o), a = i && !r.has(i) ? `${yo(o)} ["${i}"]` : yo(o);
1646
1646
  i && r.add(i), n.unshift(a), o = o.parentElement;
1647
1647
  }
1648
1648
  return n.join(" > ") || yo(e);
@@ -1688,7 +1688,7 @@ function Ja() {
1688
1688
  capturedAt: (/* @__PURE__ */ new Date()).toISOString()
1689
1689
  };
1690
1690
  }
1691
- function hd(e) {
1691
+ function fd(e) {
1692
1692
  const t = [];
1693
1693
  let n = e;
1694
1694
  for (; n && t.length < 6; ) {
@@ -1697,7 +1697,7 @@ function hd(e) {
1697
1697
  }
1698
1698
  return t.join(" > ");
1699
1699
  }
1700
- function fd(e) {
1700
+ function gd(e) {
1701
1701
  const t = e.getAttribute("role") || void 0, n = e.getAttribute("aria-label") || void 0;
1702
1702
  let r;
1703
1703
  const o = e.closest("section, article, main, nav, aside, header, footer, [role]");
@@ -1707,19 +1707,19 @@ function fd(e) {
1707
1707
  }
1708
1708
  return { elementRole: t, elementAriaLabel: n, enclosingSection: r };
1709
1709
  }
1710
- function gd(e, t) {
1710
+ function md(e, t) {
1711
1711
  const n = [e.trim(), "", `Page: ${t.pageTitle} (${t.pageUrl})`];
1712
1712
  return t.description && n.push(`Description: ${t.description}`), t.selectionText && n.push(`Selection: ${t.selectionText}`), t.elementText && n.push(`Selected element: ${t.elementText}`), t.elementRole && n.push(` Role: ${t.elementRole}`), t.elementAriaLabel && n.push(` ARIA label: ${t.elementAriaLabel}`), t.enclosingSection && n.push(`Section: ${t.enclosingSection}`), t.ancestry && n.push(`Ancestry: ${t.ancestry}`), t.cssSelector && n.push(`Selector: ${t.cssSelector}`), n.join(`
1713
1713
  `);
1714
1714
  }
1715
1715
  const sr = /* @__PURE__ */ new Set();
1716
1716
  let Qn = null, $o = !1, Rs = !1;
1717
- function md(e) {
1717
+ function bd(e) {
1718
1718
  if (e.getAttribute("aria-modal") === "false") return !1;
1719
1719
  const t = getComputedStyle(e);
1720
1720
  return t.display !== "none" && t.visibility !== "hidden";
1721
1721
  }
1722
- function bd() {
1722
+ function kd() {
1723
1723
  const e = document.querySelectorAll("dialog[open]");
1724
1724
  for (let n = 0; n < e.length; n++)
1725
1725
  try {
@@ -1729,13 +1729,13 @@ function bd() {
1729
1729
  const t = document.querySelectorAll('[role="dialog"], [role="alertdialog"]');
1730
1730
  for (let n = 0; n < t.length; n++) {
1731
1731
  const r = t[n];
1732
- if (!(sr.has(r) || r.hasAttribute("data-ap-sdk")) && r.isConnected && md(r))
1732
+ if (!(sr.has(r) || r.hasAttribute("data-ap-sdk")) && r.isConnected && bd(r))
1733
1733
  return !0;
1734
1734
  }
1735
1735
  return !1;
1736
1736
  }
1737
1737
  function Va() {
1738
- const e = bd(), t = e && !Rs;
1738
+ const e = kd(), t = e && !Rs;
1739
1739
  Rs = e;
1740
1740
  for (const n of sr) {
1741
1741
  n.hasAttribute("inert") && n.removeAttribute("inert"), n.getAttribute("aria-hidden") === "true" && n.removeAttribute("aria-hidden");
@@ -1766,7 +1766,7 @@ function Ui(e) {
1766
1766
  function er(e) {
1767
1767
  (Ui(e.target) || "relatedTarget" in e && Ui(e.relatedTarget)) && e.stopPropagation();
1768
1768
  }
1769
- function kd() {
1769
+ function _d() {
1770
1770
  $o || (window.addEventListener("focusin", er, !0), window.addEventListener("focusout", er, !0), window.addEventListener("pointerdown", er, !0), $o = !0), !Qn && (Qn = new MutationObserver((e) => {
1771
1771
  e.some(
1772
1772
  (n) => n.type === "childList" || n.attributeName === "open" && n.target.tagName === "DIALOG" || n.attributeName === "inert" || n.attributeName === "aria-hidden" || n.attributeName === "role"
@@ -1779,7 +1779,7 @@ function kd() {
1779
1779
  }));
1780
1780
  }
1781
1781
  function Qt(e) {
1782
- "showPopover" in e && (e.setAttribute("popover", "manual"), sr.add(e), kd(), Va());
1782
+ "showPopover" in e && (e.setAttribute("popover", "manual"), sr.add(e), _d(), Va());
1783
1783
  }
1784
1784
  function en(e) {
1785
1785
  if (sr.delete(e), sr.size === 0 && (Qn && (Qn.disconnect(), Qn = null), $o && (window.removeEventListener("focusin", er, !0), window.removeEventListener("focusout", er, !0), window.removeEventListener("pointerdown", er, !0), $o = !1), Rs = !1), "hidePopover" in e)
@@ -1799,8 +1799,8 @@ function Gs(e = "ap-sdk-highlight") {
1799
1799
  en(t), t.remove();
1800
1800
  } };
1801
1801
  }
1802
- const Ya = /^cc-|current-password|new-password/i, _d = /token|secret|password|apikey|auth/i, ms = "[redacted]";
1803
- function vd(e) {
1802
+ const Ya = /^cc-|current-password|new-password/i, vd = /token|secret|password|apikey|auth/i, ms = "[redacted]";
1803
+ function yd(e) {
1804
1804
  if (e instanceof HTMLInputElement && e.type === "password") return !0;
1805
1805
  const t = e.getAttribute("autocomplete");
1806
1806
  return !!t && Ya.test(t);
@@ -1812,15 +1812,15 @@ function Xa(e) {
1812
1812
  const r = n.getAttribute("autocomplete");
1813
1813
  r && Ya.test(r) && n.setAttribute("value", ms);
1814
1814
  for (const o of Array.from(n.attributes))
1815
- _d.test(o.name) && n.setAttribute(o.name, ms);
1815
+ vd.test(o.name) && n.setAttribute(o.name, ms);
1816
1816
  }
1817
1817
  }
1818
- const yd = "🎯 Click any element to capture";
1818
+ const wd = "🎯 Click any element to capture";
1819
1819
  let mn = null, $e = null, qe = null;
1820
1820
  function $r(e) {
1821
1821
  return e instanceof Element ? e.closest("[data-ap-sdk]") !== null || e.closest(".ap-sdk-panel") !== null || e.closest(".ap-sdk-highlight") !== null || e.closest(".ap-sdk-picker-cursor") !== null : !1;
1822
1822
  }
1823
- function wd() {
1823
+ function xd() {
1824
1824
  var e, t;
1825
1825
  return ((t = (e = window.matchMedia) == null ? void 0 : e.call(window, "(pointer: coarse)").matches) != null ? t : !1) || "ontouchstart" in window;
1826
1826
  }
@@ -1828,7 +1828,7 @@ function Zi(e) {
1828
1828
  mn == null || mn.update(e);
1829
1829
  }
1830
1830
  function Ka(e) {
1831
- const t = Ja(), n = hd(e), r = fd(e);
1831
+ const t = Ja(), n = fd(e), r = gd(e);
1832
1832
  let o;
1833
1833
  try {
1834
1834
  const i = e.cloneNode(!0);
@@ -1840,16 +1840,16 @@ function Ka(e) {
1840
1840
  pageTitle: document.title,
1841
1841
  elementText: Io(e),
1842
1842
  cssSelector: vo(e),
1843
- innerTree: ad(e),
1844
- outerTree: pd(e),
1843
+ innerTree: cd(e),
1844
+ outerTree: hd(e),
1845
1845
  elementOuterHtml: o,
1846
1846
  ancestry: n
1847
1847
  }, r), t);
1848
1848
  }
1849
1849
  function bs(e, t) {
1850
1850
  qe && qe();
1851
- const n = wd();
1852
- mn = Gs(), $e = document.createElement("div"), $e.className = "ap-sdk-picker-cursor", $e.setAttribute("data-ap-sdk", "1"), $e.textContent = n ? "Tap any element to preview" : yd, document.body.appendChild($e), Qt($e);
1851
+ const n = xd();
1852
+ mn = Gs(), $e = document.createElement("div"), $e.className = "ap-sdk-picker-cursor", $e.setAttribute("data-ap-sdk", "1"), $e.textContent = n ? "Tap any element to preview" : wd, document.body.appendChild($e), Qt($e);
1853
1853
  let r = null, o = null;
1854
1854
  const i = (h) => {
1855
1855
  qe == null || qe(), e(Ka(h), h);
@@ -1982,7 +1982,7 @@ function Vs(e) {
1982
1982
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
1983
1983
  return e.slice(t, n);
1984
1984
  }
1985
- function xd(e, t) {
1985
+ function Sd(e, t) {
1986
1986
  const n = (e.toString().split(".")[1] || "").length, r = t.toString();
1987
1987
  let o = (r.split(".")[1] || "").length;
1988
1988
  if (o === 0 && /\d?e-\d?/.test(r)) {
@@ -2028,7 +2028,7 @@ function _n(...e) {
2028
2028
  function Hi(e) {
2029
2029
  return JSON.stringify(e);
2030
2030
  }
2031
- function Sd(e) {
2031
+ function Td(e) {
2032
2032
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
2033
2033
  }
2034
2034
  const nc = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
@@ -2036,7 +2036,7 @@ const nc = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
2036
2036
  function Ur(e) {
2037
2037
  return typeof e == "object" && e !== null && !Array.isArray(e);
2038
2038
  }
2039
- const Td = Ko(() => {
2039
+ const Ed = Ko(() => {
2040
2040
  var e;
2041
2041
  if (typeof navigator != "undefined" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
2042
2042
  return !1;
@@ -2059,7 +2059,7 @@ function ir(e) {
2059
2059
  function rc(e) {
2060
2060
  return ir(e) ? y({}, e) : Array.isArray(e) ? [...e] : e;
2061
2061
  }
2062
- const Ed = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
2062
+ const Ad = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
2063
2063
  function ar(e) {
2064
2064
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2065
2065
  }
@@ -2080,17 +2080,17 @@ function U(e) {
2080
2080
  }
2081
2081
  return delete t.message, typeof t.error == "string" ? D(y({}, t), { error: () => t.error }) : t;
2082
2082
  }
2083
- function Ad(e) {
2083
+ function Cd(e) {
2084
2084
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
2085
2085
  }
2086
- const Cd = {
2086
+ const Pd = {
2087
2087
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
2088
2088
  int32: [-2147483648, 2147483647],
2089
2089
  uint32: [0, 4294967295],
2090
2090
  float32: [-34028234663852886e22, 34028234663852886e22],
2091
2091
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
2092
2092
  };
2093
- function Pd(e, t) {
2093
+ function Rd(e, t) {
2094
2094
  const n = e._zod.def, r = n.checks;
2095
2095
  if (r && r.length > 0)
2096
2096
  throw new Error(".pick() cannot be used on object schemas containing refinements");
@@ -2108,7 +2108,7 @@ function Pd(e, t) {
2108
2108
  });
2109
2109
  return vn(e, i);
2110
2110
  }
2111
- function Rd(e, t) {
2111
+ function Ld(e, t) {
2112
2112
  const n = e._zod.def, r = n.checks;
2113
2113
  if (r && r.length > 0)
2114
2114
  throw new Error(".omit() cannot be used on object schemas containing refinements");
@@ -2126,7 +2126,7 @@ function Rd(e, t) {
2126
2126
  });
2127
2127
  return vn(e, i);
2128
2128
  }
2129
- function Ld(e, t) {
2129
+ function zd(e, t) {
2130
2130
  if (!ir(t))
2131
2131
  throw new Error("Invalid input to extend: expected a plain object");
2132
2132
  const n = e._zod.def.checks;
@@ -2144,7 +2144,7 @@ function Ld(e, t) {
2144
2144
  });
2145
2145
  return vn(e, o);
2146
2146
  }
2147
- function zd(e, t) {
2147
+ function Id(e, t) {
2148
2148
  if (!ir(t))
2149
2149
  throw new Error("Invalid input to safeExtend: expected a plain object");
2150
2150
  const n = _n(e._zod.def, {
@@ -2155,7 +2155,7 @@ function zd(e, t) {
2155
2155
  });
2156
2156
  return vn(e, n);
2157
2157
  }
2158
- function Id(e, t) {
2158
+ function $d(e, t) {
2159
2159
  const n = _n(e._zod.def, {
2160
2160
  get shape() {
2161
2161
  const r = y(y({}, e._zod.def.shape), t._zod.def.shape);
@@ -2169,7 +2169,7 @@ function Id(e, t) {
2169
2169
  });
2170
2170
  return vn(e, n);
2171
2171
  }
2172
- function $d(e, t, n) {
2172
+ function Od(e, t, n) {
2173
2173
  const o = t._zod.def.checks;
2174
2174
  if (o && o.length > 0)
2175
2175
  throw new Error(".partial() cannot be used on object schemas containing refinements");
@@ -2197,7 +2197,7 @@ function $d(e, t, n) {
2197
2197
  });
2198
2198
  return vn(t, a);
2199
2199
  }
2200
- function Od(e, t, n) {
2200
+ function Nd(e, t, n) {
2201
2201
  const r = _n(t._zod.def, {
2202
2202
  get shape() {
2203
2203
  const o = t._zod.def.shape, i = y({}, o);
@@ -2273,13 +2273,13 @@ const oc = (e, t) => {
2273
2273
  enumerable: !1
2274
2274
  });
2275
2275
  }, sc = x("$ZodError", oc), ic = x("$ZodError", oc, { Parent: Error });
2276
- function Nd(e, t = (n) => n.message) {
2276
+ function Dd(e, t = (n) => n.message) {
2277
2277
  const n = {}, r = [];
2278
2278
  for (const o of e.issues)
2279
2279
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
2280
2280
  return { formErrors: r, fieldErrors: n };
2281
2281
  }
2282
- function Dd(e, t = (n) => n.message) {
2282
+ function Md(e, t = (n) => n.message) {
2283
2283
  const n = { _errors: [] }, r = (o) => {
2284
2284
  for (const i of o.issues)
2285
2285
  if (i.code === "invalid_union" && i.errors.length)
@@ -2327,52 +2327,52 @@ const Xs = (e) => (t, n, r, o) => {
2327
2327
  success: !1,
2328
2328
  error: new (e != null ? e : sc)(i.issues.map((a) => kn(a, o, bn())))
2329
2329
  } : { success: !0, data: i.value };
2330
- }, Md = /* @__PURE__ */ Qo(ic), es = (e) => (t, n, r) => z(null, null, function* () {
2330
+ }, jd = /* @__PURE__ */ Qo(ic), es = (e) => (t, n, r) => z(null, null, function* () {
2331
2331
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
2332
2332
  let i = t._zod.run({ value: n, issues: [] }, o);
2333
2333
  return i instanceof Promise && (i = yield i), i.issues.length ? {
2334
2334
  success: !1,
2335
2335
  error: new e(i.issues.map((a) => kn(a, o, bn())))
2336
2336
  } : { success: !0, data: i.value };
2337
- }), jd = /* @__PURE__ */ es(ic), Ud = (e) => (t, n, r) => {
2337
+ }), Ud = /* @__PURE__ */ es(ic), Zd = (e) => (t, n, r) => {
2338
2338
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2339
2339
  return Xs(e)(t, n, o);
2340
- }, Zd = (e) => (t, n, r) => Xs(e)(t, n, r), qd = (e) => (t, n, r) => z(null, null, function* () {
2340
+ }, qd = (e) => (t, n, r) => Xs(e)(t, n, r), Hd = (e) => (t, n, r) => z(null, null, function* () {
2341
2341
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2342
2342
  return Ks(e)(t, n, o);
2343
- }), Hd = (e) => (t, n, r) => z(null, null, function* () {
2343
+ }), Fd = (e) => (t, n, r) => z(null, null, function* () {
2344
2344
  return Ks(e)(t, n, r);
2345
- }), Fd = (e) => (t, n, r) => {
2345
+ }), Bd = (e) => (t, n, r) => {
2346
2346
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2347
2347
  return Qo(e)(t, n, o);
2348
- }, Bd = (e) => (t, n, r) => Qo(e)(t, n, r), Gd = (e) => (t, n, r) => z(null, null, function* () {
2348
+ }, Gd = (e) => (t, n, r) => Qo(e)(t, n, r), Wd = (e) => (t, n, r) => z(null, null, function* () {
2349
2349
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2350
2350
  return es(e)(t, n, o);
2351
- }), Wd = (e) => (t, n, r) => z(null, null, function* () {
2351
+ }), Jd = (e) => (t, n, r) => z(null, null, function* () {
2352
2352
  return es(e)(t, n, r);
2353
- }), Jd = /^[cC][^\s-]{8,}$/, Vd = /^[0-9a-z]+$/, Yd = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Xd = /^[0-9a-vA-V]{20}$/, Kd = /^[A-Za-z0-9]{27}$/, Qd = /^[a-zA-Z0-9_-]{21}$/, ep = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, tp = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Fi = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, np = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, rp = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2354
- function op() {
2355
- return new RegExp(rp, "u");
2353
+ }), Vd = /^[cC][^\s-]{8,}$/, Yd = /^[0-9a-z]+$/, Xd = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Kd = /^[0-9a-vA-V]{20}$/, Qd = /^[A-Za-z0-9]{27}$/, ep = /^[a-zA-Z0-9_-]{21}$/, tp = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, np = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Fi = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, rp = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, op = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2354
+ function sp() {
2355
+ return new RegExp(op, "u");
2356
2356
  }
2357
- const sp = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ip = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, ap = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, cp = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, lp = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ac = /^[A-Za-z0-9_-]*$/, up = /^\+[1-9]\d{6,14}$/, cc = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", dp = /* @__PURE__ */ new RegExp(`^${cc}$`);
2357
+ const ip = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ap = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, cp = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, lp = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, up = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ac = /^[A-Za-z0-9_-]*$/, dp = /^\+[1-9]\d{6,14}$/, cc = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", pp = /* @__PURE__ */ new RegExp(`^${cc}$`);
2358
2358
  function lc(e) {
2359
2359
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
2360
2360
  return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
2361
2361
  }
2362
- function pp(e) {
2362
+ function hp(e) {
2363
2363
  return new RegExp(`^${lc(e)}$`);
2364
2364
  }
2365
- function hp(e) {
2365
+ function fp(e) {
2366
2366
  const t = lc({ precision: e.precision }), n = ["Z"];
2367
2367
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
2368
2368
  const r = `${t}(?:${n.join("|")})`;
2369
2369
  return new RegExp(`^${cc}T(?:${r})$`);
2370
2370
  }
2371
- const fp = (e) => {
2371
+ const gp = (e) => {
2372
2372
  var n, r;
2373
2373
  const t = e ? `[\\s\\S]{${(n = e == null ? void 0 : e.minimum) != null ? n : 0},${(r = e == null ? void 0 : e.maximum) != null ? r : ""}}` : "[\\s\\S]*";
2374
2374
  return new RegExp(`^${t}$`);
2375
- }, gp = /^-?\d+$/, uc = /^-?\d+(?:\.\d+)?$/, mp = /^(?:true|false)$/i, bp = /^[^A-Z]*$/, kp = /^[^a-z]*$/, at = /* @__PURE__ */ x("$ZodCheck", (e, t) => {
2375
+ }, mp = /^-?\d+$/, uc = /^-?\d+(?:\.\d+)?$/, bp = /^(?:true|false)$/i, kp = /^[^A-Z]*$/, _p = /^[^a-z]*$/, at = /* @__PURE__ */ x("$ZodCheck", (e, t) => {
2376
2376
  var r, o;
2377
2377
  var n;
2378
2378
  (r = e._zod) != null || (e._zod = {}), e._zod.def = t, (o = (n = e._zod).onattach) != null || (n.onattach = []);
@@ -2416,7 +2416,7 @@ const fp = (e) => {
2416
2416
  continue: !t.abort
2417
2417
  });
2418
2418
  };
2419
- }), _p = /* @__PURE__ */ x("$ZodCheckMultipleOf", (e, t) => {
2419
+ }), vp = /* @__PURE__ */ x("$ZodCheckMultipleOf", (e, t) => {
2420
2420
  at.init(e, t), e._zod.onattach.push((n) => {
2421
2421
  var o;
2422
2422
  var r;
@@ -2424,7 +2424,7 @@ const fp = (e) => {
2424
2424
  }), e._zod.check = (n) => {
2425
2425
  if (typeof n.value != typeof t.value)
2426
2426
  throw new Error("Cannot mix number and bigint in multiple_of check.");
2427
- (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : xd(n.value, t.value) === 0) || n.issues.push({
2427
+ (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Sd(n.value, t.value) === 0) || n.issues.push({
2428
2428
  origin: typeof n.value,
2429
2429
  code: "not_multiple_of",
2430
2430
  divisor: t.value,
@@ -2433,13 +2433,13 @@ const fp = (e) => {
2433
2433
  continue: !t.abort
2434
2434
  });
2435
2435
  };
2436
- }), vp = /* @__PURE__ */ x("$ZodCheckNumberFormat", (e, t) => {
2436
+ }), yp = /* @__PURE__ */ x("$ZodCheckNumberFormat", (e, t) => {
2437
2437
  var a;
2438
2438
  at.init(e, t), t.format = t.format || "float64";
2439
- const n = (a = t.format) == null ? void 0 : a.includes("int"), r = n ? "int" : "number", [o, i] = Cd[t.format];
2439
+ const n = (a = t.format) == null ? void 0 : a.includes("int"), r = n ? "int" : "number", [o, i] = Pd[t.format];
2440
2440
  e._zod.onattach.push((d) => {
2441
2441
  const l = d._zod.bag;
2442
- l.format = t.format, l.minimum = o, l.maximum = i, n && (l.pattern = gp);
2442
+ l.format = t.format, l.minimum = o, l.maximum = i, n && (l.pattern = mp);
2443
2443
  }), e._zod.check = (d) => {
2444
2444
  const l = d.value;
2445
2445
  if (n) {
@@ -2495,7 +2495,7 @@ const fp = (e) => {
2495
2495
  continue: !t.abort
2496
2496
  });
2497
2497
  };
2498
- }), yp = /* @__PURE__ */ x("$ZodCheckMaxLength", (e, t) => {
2498
+ }), wp = /* @__PURE__ */ x("$ZodCheckMaxLength", (e, t) => {
2499
2499
  var r;
2500
2500
  var n;
2501
2501
  at.init(e, t), (r = (n = e._zod.def).when) != null || (n.when = (o) => {
@@ -2520,7 +2520,7 @@ const fp = (e) => {
2520
2520
  continue: !t.abort
2521
2521
  });
2522
2522
  };
2523
- }), wp = /* @__PURE__ */ x("$ZodCheckMinLength", (e, t) => {
2523
+ }), xp = /* @__PURE__ */ x("$ZodCheckMinLength", (e, t) => {
2524
2524
  var r;
2525
2525
  var n;
2526
2526
  at.init(e, t), (r = (n = e._zod.def).when) != null || (n.when = (o) => {
@@ -2545,7 +2545,7 @@ const fp = (e) => {
2545
2545
  continue: !t.abort
2546
2546
  });
2547
2547
  };
2548
- }), xp = /* @__PURE__ */ x("$ZodCheckLengthEquals", (e, t) => {
2548
+ }), Sp = /* @__PURE__ */ x("$ZodCheckLengthEquals", (e, t) => {
2549
2549
  var r;
2550
2550
  var n;
2551
2551
  at.init(e, t), (r = (n = e._zod.def).when) != null || (n.when = (o) => {
@@ -2588,7 +2588,7 @@ const fp = (e) => {
2588
2588
  }));
2589
2589
  }) : (i = (r = e._zod).check) != null || (r.check = () => {
2590
2590
  });
2591
- }), Sp = /* @__PURE__ */ x("$ZodCheckRegex", (e, t) => {
2591
+ }), Tp = /* @__PURE__ */ x("$ZodCheckRegex", (e, t) => {
2592
2592
  ts.init(e, t), e._zod.check = (n) => {
2593
2593
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
2594
2594
  origin: "string",
@@ -2600,13 +2600,13 @@ const fp = (e) => {
2600
2600
  continue: !t.abort
2601
2601
  });
2602
2602
  };
2603
- }), Tp = /* @__PURE__ */ x("$ZodCheckLowerCase", (e, t) => {
2604
- var n;
2605
- (n = t.pattern) != null || (t.pattern = bp), ts.init(e, t);
2606
- }), Ep = /* @__PURE__ */ x("$ZodCheckUpperCase", (e, t) => {
2603
+ }), Ep = /* @__PURE__ */ x("$ZodCheckLowerCase", (e, t) => {
2607
2604
  var n;
2608
2605
  (n = t.pattern) != null || (t.pattern = kp), ts.init(e, t);
2609
- }), Ap = /* @__PURE__ */ x("$ZodCheckIncludes", (e, t) => {
2606
+ }), Ap = /* @__PURE__ */ x("$ZodCheckUpperCase", (e, t) => {
2607
+ var n;
2608
+ (n = t.pattern) != null || (t.pattern = _p), ts.init(e, t);
2609
+ }), Cp = /* @__PURE__ */ x("$ZodCheckIncludes", (e, t) => {
2610
2610
  at.init(e, t);
2611
2611
  const n = ar(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
2612
2612
  t.pattern = r, e._zod.onattach.push((o) => {
@@ -2624,7 +2624,7 @@ const fp = (e) => {
2624
2624
  continue: !t.abort
2625
2625
  });
2626
2626
  };
2627
- }), Cp = /* @__PURE__ */ x("$ZodCheckStartsWith", (e, t) => {
2627
+ }), Pp = /* @__PURE__ */ x("$ZodCheckStartsWith", (e, t) => {
2628
2628
  var r;
2629
2629
  at.init(e, t);
2630
2630
  const n = new RegExp(`^${ar(t.prefix)}.*`);
@@ -2643,7 +2643,7 @@ const fp = (e) => {
2643
2643
  continue: !t.abort
2644
2644
  });
2645
2645
  };
2646
- }), Pp = /* @__PURE__ */ x("$ZodCheckEndsWith", (e, t) => {
2646
+ }), Rp = /* @__PURE__ */ x("$ZodCheckEndsWith", (e, t) => {
2647
2647
  var r;
2648
2648
  at.init(e, t);
2649
2649
  const n = new RegExp(`.*${ar(t.suffix)}$`);
@@ -2662,12 +2662,12 @@ const fp = (e) => {
2662
2662
  continue: !t.abort
2663
2663
  });
2664
2664
  };
2665
- }), Rp = /* @__PURE__ */ x("$ZodCheckOverwrite", (e, t) => {
2665
+ }), Lp = /* @__PURE__ */ x("$ZodCheckOverwrite", (e, t) => {
2666
2666
  at.init(e, t), e._zod.check = (n) => {
2667
2667
  n.value = t.tx(n.value);
2668
2668
  };
2669
2669
  });
2670
- class Lp {
2670
+ class zp {
2671
2671
  constructor(t = []) {
2672
2672
  this.content = [], this.indent = 0, this && (this.args = t);
2673
2673
  }
@@ -2691,14 +2691,14 @@ class Lp {
2691
2691
  `));
2692
2692
  }
2693
2693
  }
2694
- const zp = {
2694
+ const Ip = {
2695
2695
  major: 4,
2696
2696
  minor: 3,
2697
2697
  patch: 5
2698
2698
  }, me = /* @__PURE__ */ x("$ZodType", (e, t) => {
2699
2699
  var o, i, a;
2700
2700
  var n;
2701
- e != null || (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = zp;
2701
+ e != null || (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Ip;
2702
2702
  const r = [...(o = e._zod.def.checks) != null ? o : []];
2703
2703
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
2704
2704
  for (const d of r)
@@ -2762,10 +2762,10 @@ const zp = {
2762
2762
  validate: (d) => {
2763
2763
  var l;
2764
2764
  try {
2765
- const p = Md(e, d);
2765
+ const p = jd(e, d);
2766
2766
  return p.success ? { value: p.data } : { issues: (l = p.error) == null ? void 0 : l.issues };
2767
2767
  } catch (p) {
2768
- return jd(e, d).then((h) => {
2768
+ return Ud(e, d).then((h) => {
2769
2769
  var g;
2770
2770
  return h.success ? { value: h.data } : { issues: (g = h.error) == null ? void 0 : g.issues };
2771
2771
  });
@@ -2776,7 +2776,7 @@ const zp = {
2776
2776
  }));
2777
2777
  }), Qs = /* @__PURE__ */ x("$ZodString", (e, t) => {
2778
2778
  var n, r, o;
2779
- me.init(e, t), e._zod.pattern = (o = [...(r = (n = e == null ? void 0 : e._zod.bag) == null ? void 0 : n.patterns) != null ? r : []].pop()) != null ? o : fp(e._zod.bag), e._zod.parse = (i, a) => {
2779
+ me.init(e, t), e._zod.pattern = (o = [...(r = (n = e == null ? void 0 : e._zod.bag) == null ? void 0 : n.patterns) != null ? r : []].pop()) != null ? o : gp(e._zod.bag), e._zod.parse = (i, a) => {
2780
2780
  if (t.coerce)
2781
2781
  try {
2782
2782
  i.value = String(i.value);
@@ -2791,10 +2791,10 @@ const zp = {
2791
2791
  };
2792
2792
  }), be = /* @__PURE__ */ x("$ZodStringFormat", (e, t) => {
2793
2793
  ts.init(e, t), Qs.init(e, t);
2794
- }), Ip = /* @__PURE__ */ x("$ZodGUID", (e, t) => {
2794
+ }), $p = /* @__PURE__ */ x("$ZodGUID", (e, t) => {
2795
2795
  var n;
2796
- (n = t.pattern) != null || (t.pattern = tp), be.init(e, t);
2797
- }), $p = /* @__PURE__ */ x("$ZodUUID", (e, t) => {
2796
+ (n = t.pattern) != null || (t.pattern = np), be.init(e, t);
2797
+ }), Op = /* @__PURE__ */ x("$ZodUUID", (e, t) => {
2798
2798
  var n, r;
2799
2799
  if (t.version) {
2800
2800
  const i = {
@@ -2813,10 +2813,10 @@ const zp = {
2813
2813
  } else
2814
2814
  (r = t.pattern) != null || (t.pattern = Fi());
2815
2815
  be.init(e, t);
2816
- }), Op = /* @__PURE__ */ x("$ZodEmail", (e, t) => {
2816
+ }), Np = /* @__PURE__ */ x("$ZodEmail", (e, t) => {
2817
2817
  var n;
2818
- (n = t.pattern) != null || (t.pattern = np), be.init(e, t);
2819
- }), Np = /* @__PURE__ */ x("$ZodURL", (e, t) => {
2818
+ (n = t.pattern) != null || (t.pattern = rp), be.init(e, t);
2819
+ }), Dp = /* @__PURE__ */ x("$ZodURL", (e, t) => {
2820
2820
  be.init(e, t), e._zod.check = (n) => {
2821
2821
  try {
2822
2822
  const r = n.value.trim(), o = new URL(r);
@@ -2848,45 +2848,45 @@ const zp = {
2848
2848
  });
2849
2849
  }
2850
2850
  };
2851
- }), Dp = /* @__PURE__ */ x("$ZodEmoji", (e, t) => {
2851
+ }), Mp = /* @__PURE__ */ x("$ZodEmoji", (e, t) => {
2852
2852
  var n;
2853
- (n = t.pattern) != null || (t.pattern = op()), be.init(e, t);
2854
- }), Mp = /* @__PURE__ */ x("$ZodNanoID", (e, t) => {
2853
+ (n = t.pattern) != null || (t.pattern = sp()), be.init(e, t);
2854
+ }), jp = /* @__PURE__ */ x("$ZodNanoID", (e, t) => {
2855
2855
  var n;
2856
- (n = t.pattern) != null || (t.pattern = Qd), be.init(e, t);
2857
- }), jp = /* @__PURE__ */ x("$ZodCUID", (e, t) => {
2858
- var n;
2859
- (n = t.pattern) != null || (t.pattern = Jd), be.init(e, t);
2860
- }), Up = /* @__PURE__ */ x("$ZodCUID2", (e, t) => {
2856
+ (n = t.pattern) != null || (t.pattern = ep), be.init(e, t);
2857
+ }), Up = /* @__PURE__ */ x("$ZodCUID", (e, t) => {
2861
2858
  var n;
2862
2859
  (n = t.pattern) != null || (t.pattern = Vd), be.init(e, t);
2863
- }), Zp = /* @__PURE__ */ x("$ZodULID", (e, t) => {
2860
+ }), Zp = /* @__PURE__ */ x("$ZodCUID2", (e, t) => {
2864
2861
  var n;
2865
2862
  (n = t.pattern) != null || (t.pattern = Yd), be.init(e, t);
2866
- }), qp = /* @__PURE__ */ x("$ZodXID", (e, t) => {
2863
+ }), qp = /* @__PURE__ */ x("$ZodULID", (e, t) => {
2867
2864
  var n;
2868
2865
  (n = t.pattern) != null || (t.pattern = Xd), be.init(e, t);
2869
- }), Hp = /* @__PURE__ */ x("$ZodKSUID", (e, t) => {
2866
+ }), Hp = /* @__PURE__ */ x("$ZodXID", (e, t) => {
2870
2867
  var n;
2871
2868
  (n = t.pattern) != null || (t.pattern = Kd), be.init(e, t);
2872
- }), Fp = /* @__PURE__ */ x("$ZodISODateTime", (e, t) => {
2869
+ }), Fp = /* @__PURE__ */ x("$ZodKSUID", (e, t) => {
2873
2870
  var n;
2874
- (n = t.pattern) != null || (t.pattern = hp(t)), be.init(e, t);
2875
- }), Bp = /* @__PURE__ */ x("$ZodISODate", (e, t) => {
2871
+ (n = t.pattern) != null || (t.pattern = Qd), be.init(e, t);
2872
+ }), Bp = /* @__PURE__ */ x("$ZodISODateTime", (e, t) => {
2876
2873
  var n;
2877
- (n = t.pattern) != null || (t.pattern = dp), be.init(e, t);
2878
- }), Gp = /* @__PURE__ */ x("$ZodISOTime", (e, t) => {
2874
+ (n = t.pattern) != null || (t.pattern = fp(t)), be.init(e, t);
2875
+ }), Gp = /* @__PURE__ */ x("$ZodISODate", (e, t) => {
2879
2876
  var n;
2880
- (n = t.pattern) != null || (t.pattern = pp(t)), be.init(e, t);
2881
- }), Wp = /* @__PURE__ */ x("$ZodISODuration", (e, t) => {
2877
+ (n = t.pattern) != null || (t.pattern = pp), be.init(e, t);
2878
+ }), Wp = /* @__PURE__ */ x("$ZodISOTime", (e, t) => {
2882
2879
  var n;
2883
- (n = t.pattern) != null || (t.pattern = ep), be.init(e, t);
2884
- }), Jp = /* @__PURE__ */ x("$ZodIPv4", (e, t) => {
2880
+ (n = t.pattern) != null || (t.pattern = hp(t)), be.init(e, t);
2881
+ }), Jp = /* @__PURE__ */ x("$ZodISODuration", (e, t) => {
2885
2882
  var n;
2886
- (n = t.pattern) != null || (t.pattern = sp), be.init(e, t), e._zod.bag.format = "ipv4";
2887
- }), Vp = /* @__PURE__ */ x("$ZodIPv6", (e, t) => {
2883
+ (n = t.pattern) != null || (t.pattern = tp), be.init(e, t);
2884
+ }), Vp = /* @__PURE__ */ x("$ZodIPv4", (e, t) => {
2888
2885
  var n;
2889
- (n = t.pattern) != null || (t.pattern = ip), be.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (r) => {
2886
+ (n = t.pattern) != null || (t.pattern = ip), be.init(e, t), e._zod.bag.format = "ipv4";
2887
+ }), Yp = /* @__PURE__ */ x("$ZodIPv6", (e, t) => {
2888
+ var n;
2889
+ (n = t.pattern) != null || (t.pattern = ap), be.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (r) => {
2890
2890
  try {
2891
2891
  new URL(`http://[${r.value}]`);
2892
2892
  } catch (o) {
@@ -2899,12 +2899,12 @@ const zp = {
2899
2899
  });
2900
2900
  }
2901
2901
  };
2902
- }), Yp = /* @__PURE__ */ x("$ZodCIDRv4", (e, t) => {
2902
+ }), Xp = /* @__PURE__ */ x("$ZodCIDRv4", (e, t) => {
2903
2903
  var n;
2904
- (n = t.pattern) != null || (t.pattern = ap), be.init(e, t);
2905
- }), Xp = /* @__PURE__ */ x("$ZodCIDRv6", (e, t) => {
2904
+ (n = t.pattern) != null || (t.pattern = cp), be.init(e, t);
2905
+ }), Kp = /* @__PURE__ */ x("$ZodCIDRv6", (e, t) => {
2906
2906
  var n;
2907
- (n = t.pattern) != null || (t.pattern = cp), be.init(e, t), e._zod.check = (r) => {
2907
+ (n = t.pattern) != null || (t.pattern = lp), be.init(e, t), e._zod.check = (r) => {
2908
2908
  const o = r.value.split("/");
2909
2909
  try {
2910
2910
  if (o.length !== 2)
@@ -2940,9 +2940,9 @@ function fc(e) {
2940
2940
  return !1;
2941
2941
  }
2942
2942
  }
2943
- const Kp = /* @__PURE__ */ x("$ZodBase64", (e, t) => {
2943
+ const Qp = /* @__PURE__ */ x("$ZodBase64", (e, t) => {
2944
2944
  var n;
2945
- (n = t.pattern) != null || (t.pattern = lp), be.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (r) => {
2945
+ (n = t.pattern) != null || (t.pattern = up), be.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (r) => {
2946
2946
  fc(r.value) || r.issues.push({
2947
2947
  code: "invalid_format",
2948
2948
  format: "base64",
@@ -2952,16 +2952,16 @@ const Kp = /* @__PURE__ */ x("$ZodBase64", (e, t) => {
2952
2952
  });
2953
2953
  };
2954
2954
  });
2955
- function Qp(e) {
2955
+ function eh(e) {
2956
2956
  if (!ac.test(e))
2957
2957
  return !1;
2958
2958
  const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
2959
2959
  return fc(n);
2960
2960
  }
2961
- const eh = /* @__PURE__ */ x("$ZodBase64URL", (e, t) => {
2961
+ const th = /* @__PURE__ */ x("$ZodBase64URL", (e, t) => {
2962
2962
  var n;
2963
2963
  (n = t.pattern) != null || (t.pattern = ac), be.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (r) => {
2964
- Qp(r.value) || r.issues.push({
2964
+ eh(r.value) || r.issues.push({
2965
2965
  code: "invalid_format",
2966
2966
  format: "base64url",
2967
2967
  input: r.value,
@@ -2969,11 +2969,11 @@ const eh = /* @__PURE__ */ x("$ZodBase64URL", (e, t) => {
2969
2969
  continue: !t.abort
2970
2970
  });
2971
2971
  };
2972
- }), th = /* @__PURE__ */ x("$ZodE164", (e, t) => {
2972
+ }), nh = /* @__PURE__ */ x("$ZodE164", (e, t) => {
2973
2973
  var n;
2974
- (n = t.pattern) != null || (t.pattern = up), be.init(e, t);
2974
+ (n = t.pattern) != null || (t.pattern = dp), be.init(e, t);
2975
2975
  });
2976
- function nh(e, t = null) {
2976
+ function rh(e, t = null) {
2977
2977
  try {
2978
2978
  const n = e.split(".");
2979
2979
  if (n.length !== 3)
@@ -2987,9 +2987,9 @@ function nh(e, t = null) {
2987
2987
  return !1;
2988
2988
  }
2989
2989
  }
2990
- const rh = /* @__PURE__ */ x("$ZodJWT", (e, t) => {
2990
+ const oh = /* @__PURE__ */ x("$ZodJWT", (e, t) => {
2991
2991
  be.init(e, t), e._zod.check = (n) => {
2992
- nh(n.value, t.alg) || n.issues.push({
2992
+ rh(n.value, t.alg) || n.issues.push({
2993
2993
  code: "invalid_format",
2994
2994
  format: "jwt",
2995
2995
  input: n.value,
@@ -3016,10 +3016,10 @@ const rh = /* @__PURE__ */ x("$ZodJWT", (e, t) => {
3016
3016
  inst: e
3017
3017
  }, a ? { received: a } : {})), r;
3018
3018
  };
3019
- }), oh = /* @__PURE__ */ x("$ZodNumberFormat", (e, t) => {
3020
- vp.init(e, t), gc.init(e, t);
3021
- }), sh = /* @__PURE__ */ x("$ZodBoolean", (e, t) => {
3022
- me.init(e, t), e._zod.pattern = mp, e._zod.parse = (n, r) => {
3019
+ }), sh = /* @__PURE__ */ x("$ZodNumberFormat", (e, t) => {
3020
+ yp.init(e, t), gc.init(e, t);
3021
+ }), ih = /* @__PURE__ */ x("$ZodBoolean", (e, t) => {
3022
+ me.init(e, t), e._zod.pattern = bp, e._zod.parse = (n, r) => {
3023
3023
  if (t.coerce)
3024
3024
  try {
3025
3025
  n.value = !!n.value;
@@ -3033,11 +3033,11 @@ const rh = /* @__PURE__ */ x("$ZodJWT", (e, t) => {
3033
3033
  inst: e
3034
3034
  }), n;
3035
3035
  };
3036
- }), ih = /* @__PURE__ */ x("$ZodAny", (e, t) => {
3036
+ }), ah = /* @__PURE__ */ x("$ZodAny", (e, t) => {
3037
3037
  me.init(e, t), e._zod.parse = (n) => n;
3038
- }), ah = /* @__PURE__ */ x("$ZodUnknown", (e, t) => {
3038
+ }), ch = /* @__PURE__ */ x("$ZodUnknown", (e, t) => {
3039
3039
  me.init(e, t), e._zod.parse = (n) => n;
3040
- }), ch = /* @__PURE__ */ x("$ZodNever", (e, t) => {
3040
+ }), lh = /* @__PURE__ */ x("$ZodNever", (e, t) => {
3041
3041
  me.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
3042
3042
  expected: "never",
3043
3043
  code: "invalid_type",
@@ -3048,7 +3048,7 @@ const rh = /* @__PURE__ */ x("$ZodJWT", (e, t) => {
3048
3048
  function Bi(e, t, n) {
3049
3049
  e.issues.length && t.issues.push(...Yn(n, e.issues)), t.value[n] = e.value;
3050
3050
  }
3051
- const lh = /* @__PURE__ */ x("$ZodArray", (e, t) => {
3051
+ const uh = /* @__PURE__ */ x("$ZodArray", (e, t) => {
3052
3052
  me.init(e, t), e._zod.parse = (n, r) => {
3053
3053
  const o = n.value;
3054
3054
  if (!Array.isArray(o))
@@ -3084,7 +3084,7 @@ function mc(e) {
3084
3084
  for (const d of t)
3085
3085
  if (!((a = (i = (o = (r = e.shape) == null ? void 0 : r[d]) == null ? void 0 : o._zod) == null ? void 0 : i.traits) != null && a.has("$ZodType")))
3086
3086
  throw new Error(`Invalid element at key "${d}": expected a Zod schema`);
3087
- const n = Ad(e.shape);
3087
+ const n = Cd(e.shape);
3088
3088
  return D(y({}, e), {
3089
3089
  keys: t,
3090
3090
  keySet: new Set(t),
@@ -3111,7 +3111,7 @@ function bc(e, t, n, r, o, i) {
3111
3111
  inst: i
3112
3112
  }), e.length ? Promise.all(e).then(() => n) : n;
3113
3113
  }
3114
- const uh = /* @__PURE__ */ x("$ZodObject", (e, t) => {
3114
+ const dh = /* @__PURE__ */ x("$ZodObject", (e, t) => {
3115
3115
  me.init(e, t);
3116
3116
  const n = Object.getOwnPropertyDescriptor(t, "shape");
3117
3117
  if (!(n != null && n.get)) {
@@ -3159,11 +3159,11 @@ const uh = /* @__PURE__ */ x("$ZodObject", (e, t) => {
3159
3159
  }
3160
3160
  return i ? bc(h, p, d, l, r.value, e) : h.length ? Promise.all(h).then(() => d) : d;
3161
3161
  };
3162
- }), dh = /* @__PURE__ */ x("$ZodObjectJIT", (e, t) => {
3163
- uh.init(e, t);
3162
+ }), ph = /* @__PURE__ */ x("$ZodObjectJIT", (e, t) => {
3163
+ dh.init(e, t);
3164
3164
  const n = e._zod.parse, r = Ko(() => mc(t)), o = (m) => {
3165
3165
  var E;
3166
- const k = new Lp(["shape", "payload", "ctx"]), w = r.value, v = (T) => {
3166
+ const k = new zp(["shape", "payload", "ctx"]), w = r.value, v = (T) => {
3167
3167
  const A = Hi(T);
3168
3168
  return `shape[${A}]._zod.run({ value: input[${A}], issues: [] }, ctx)`;
3169
3169
  };
@@ -3216,7 +3216,7 @@ const uh = /* @__PURE__ */ x("$ZodObject", (e, t) => {
3216
3216
  return (T, A) => M(m, T, A);
3217
3217
  };
3218
3218
  let i;
3219
- const a = Ur, d = !ec.jitless, p = d && Td.value, h = t.catchall;
3219
+ const a = Ur, d = !ec.jitless, p = d && Ed.value, h = t.catchall;
3220
3220
  let g;
3221
3221
  e._zod.parse = (m, k) => {
3222
3222
  g != null || (g = r.value);
@@ -3272,7 +3272,7 @@ const kc = /* @__PURE__ */ x("$ZodUnion", (e, t) => {
3272
3272
  }
3273
3273
  return a ? Promise.all(d).then((l) => Gi(l, o, e, i)) : Gi(d, o, e, i);
3274
3274
  };
3275
- }), ph = /* @__PURE__ */ x("$ZodDiscriminatedUnion", (e, t) => {
3275
+ }), hh = /* @__PURE__ */ x("$ZodDiscriminatedUnion", (e, t) => {
3276
3276
  t.inclusive = !1, kc.init(e, t);
3277
3277
  const n = e._zod.parse;
3278
3278
  ne(e._zod, "propValues", () => {
@@ -3324,7 +3324,7 @@ const kc = /* @__PURE__ */ x("$ZodUnion", (e, t) => {
3324
3324
  inst: e
3325
3325
  }), o);
3326
3326
  };
3327
- }), hh = /* @__PURE__ */ x("$ZodIntersection", (e, t) => {
3327
+ }), fh = /* @__PURE__ */ x("$ZodIntersection", (e, t) => {
3328
3328
  me.init(e, t), e._zod.parse = (n, r) => {
3329
3329
  const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), a = t.right._zod.run({ value: o, issues: [] }, r);
3330
3330
  return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([l, p]) => Wi(n, l, p)) : Wi(n, i, a);
@@ -3389,7 +3389,7 @@ function Wi(e, t, n) {
3389
3389
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);
3390
3390
  return e.value = a.data, e;
3391
3391
  }
3392
- const fh = /* @__PURE__ */ x("$ZodRecord", (e, t) => {
3392
+ const gh = /* @__PURE__ */ x("$ZodRecord", (e, t) => {
3393
3393
  me.init(e, t), e._zod.parse = (n, r) => {
3394
3394
  const o = n.value;
3395
3395
  if (!ir(o))
@@ -3453,10 +3453,10 @@ const fh = /* @__PURE__ */ x("$ZodRecord", (e, t) => {
3453
3453
  }
3454
3454
  return i.length ? Promise.all(i).then(() => n) : n;
3455
3455
  };
3456
- }), gh = /* @__PURE__ */ x("$ZodEnum", (e, t) => {
3456
+ }), mh = /* @__PURE__ */ x("$ZodEnum", (e, t) => {
3457
3457
  me.init(e, t);
3458
3458
  const n = tc(t.entries), r = new Set(n);
3459
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Ed.has(typeof o)).map((o) => typeof o == "string" ? ar(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
3459
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Ad.has(typeof o)).map((o) => typeof o == "string" ? ar(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
3460
3460
  const a = o.value;
3461
3461
  return r.has(a) || o.issues.push({
3462
3462
  code: "invalid_value",
@@ -3465,7 +3465,7 @@ const fh = /* @__PURE__ */ x("$ZodRecord", (e, t) => {
3465
3465
  inst: e
3466
3466
  }), o;
3467
3467
  };
3468
- }), mh = /* @__PURE__ */ x("$ZodLiteral", (e, t) => {
3468
+ }), bh = /* @__PURE__ */ x("$ZodLiteral", (e, t) => {
3469
3469
  if (me.init(e, t), t.values.length === 0)
3470
3470
  throw new Error("Cannot create literal schema with no valid values");
3471
3471
  const n = new Set(t.values);
@@ -3478,7 +3478,7 @@ const fh = /* @__PURE__ */ x("$ZodRecord", (e, t) => {
3478
3478
  inst: e
3479
3479
  }), r;
3480
3480
  };
3481
- }), bh = /* @__PURE__ */ x("$ZodTransform", (e, t) => {
3481
+ }), kh = /* @__PURE__ */ x("$ZodTransform", (e, t) => {
3482
3482
  me.init(e, t), e._zod.parse = (n, r) => {
3483
3483
  if (r.direction === "backward")
3484
3484
  throw new Qa(e.constructor.name);
@@ -3504,14 +3504,14 @@ const _c = /* @__PURE__ */ x("$ZodOptional", (e, t) => {
3504
3504
  }
3505
3505
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
3506
3506
  };
3507
- }), kh = /* @__PURE__ */ x("$ZodExactOptional", (e, t) => {
3507
+ }), _h = /* @__PURE__ */ x("$ZodExactOptional", (e, t) => {
3508
3508
  _c.init(e, t), ne(e._zod, "values", () => t.innerType._zod.values), ne(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
3509
- }), _h = /* @__PURE__ */ x("$ZodNullable", (e, t) => {
3509
+ }), vh = /* @__PURE__ */ x("$ZodNullable", (e, t) => {
3510
3510
  me.init(e, t), ne(e._zod, "optin", () => t.innerType._zod.optin), ne(e._zod, "optout", () => t.innerType._zod.optout), ne(e._zod, "pattern", () => {
3511
3511
  const n = t.innerType._zod.pattern;
3512
3512
  return n ? new RegExp(`^(${Vs(n.source)}|null)$`) : void 0;
3513
3513
  }), ne(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
3514
- }), vh = /* @__PURE__ */ x("$ZodDefault", (e, t) => {
3514
+ }), yh = /* @__PURE__ */ x("$ZodDefault", (e, t) => {
3515
3515
  me.init(e, t), e._zod.optin = "optional", ne(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
3516
3516
  if (r.direction === "backward")
3517
3517
  return t.innerType._zod.run(n, r);
@@ -3524,9 +3524,9 @@ const _c = /* @__PURE__ */ x("$ZodOptional", (e, t) => {
3524
3524
  function Vi(e, t) {
3525
3525
  return e.value === void 0 && (e.value = t.defaultValue), e;
3526
3526
  }
3527
- const yh = /* @__PURE__ */ x("$ZodPrefault", (e, t) => {
3527
+ const wh = /* @__PURE__ */ x("$ZodPrefault", (e, t) => {
3528
3528
  me.init(e, t), e._zod.optin = "optional", ne(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
3529
- }), wh = /* @__PURE__ */ x("$ZodNonOptional", (e, t) => {
3529
+ }), xh = /* @__PURE__ */ x("$ZodNonOptional", (e, t) => {
3530
3530
  me.init(e, t), ne(e._zod, "values", () => {
3531
3531
  const n = t.innerType._zod.values;
3532
3532
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
@@ -3543,7 +3543,7 @@ function Yi(e, t) {
3543
3543
  inst: t
3544
3544
  }), e;
3545
3545
  }
3546
- const xh = /* @__PURE__ */ x("$ZodCatch", (e, t) => {
3546
+ const Sh = /* @__PURE__ */ x("$ZodCatch", (e, t) => {
3547
3547
  me.init(e, t), ne(e._zod, "optin", () => t.innerType._zod.optin), ne(e._zod, "optout", () => t.innerType._zod.optout), ne(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
3548
3548
  if (r.direction === "backward")
3549
3549
  return t.innerType._zod.run(n, r);
@@ -3560,7 +3560,7 @@ const xh = /* @__PURE__ */ x("$ZodCatch", (e, t) => {
3560
3560
  input: n.value
3561
3561
  })), n.issues = []), n);
3562
3562
  };
3563
- }), Sh = /* @__PURE__ */ x("$ZodPipe", (e, t) => {
3563
+ }), Th = /* @__PURE__ */ x("$ZodPipe", (e, t) => {
3564
3564
  me.init(e, t), ne(e._zod, "values", () => t.in._zod.values), ne(e._zod, "optin", () => t.in._zod.optin), ne(e._zod, "optout", () => t.out._zod.optout), ne(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
3565
3565
  if (r.direction === "backward") {
3566
3566
  const i = t.out._zod.run(n, r);
@@ -3573,7 +3573,7 @@ const xh = /* @__PURE__ */ x("$ZodCatch", (e, t) => {
3573
3573
  function uo(e, t, n) {
3574
3574
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
3575
3575
  }
3576
- const Th = /* @__PURE__ */ x("$ZodReadonly", (e, t) => {
3576
+ const Eh = /* @__PURE__ */ x("$ZodReadonly", (e, t) => {
3577
3577
  me.init(e, t), ne(e._zod, "propValues", () => t.innerType._zod.propValues), ne(e._zod, "values", () => t.innerType._zod.values), ne(e._zod, "optin", () => {
3578
3578
  var n, r;
3579
3579
  return (r = (n = t.innerType) == null ? void 0 : n._zod) == null ? void 0 : r.optin;
@@ -3590,7 +3590,7 @@ const Th = /* @__PURE__ */ x("$ZodReadonly", (e, t) => {
3590
3590
  function Xi(e) {
3591
3591
  return e.value = Object.freeze(e.value), e;
3592
3592
  }
3593
- const Eh = /* @__PURE__ */ x("$ZodCustom", (e, t) => {
3593
+ const Ah = /* @__PURE__ */ x("$ZodCustom", (e, t) => {
3594
3594
  at.init(e, t), me.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
3595
3595
  const r = n.value, o = t.fn(r);
3596
3596
  if (o instanceof Promise)
@@ -3615,7 +3615,7 @@ function Ki(e, t, n, r) {
3615
3615
  }
3616
3616
  }
3617
3617
  var Qi;
3618
- class Ah {
3618
+ class Ch {
3619
3619
  constructor() {
3620
3620
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
3621
3621
  }
@@ -3645,20 +3645,20 @@ class Ah {
3645
3645
  return this._map.has(t);
3646
3646
  }
3647
3647
  }
3648
- function Ch() {
3649
- return new Ah();
3648
+ function Ph() {
3649
+ return new Ch();
3650
3650
  }
3651
3651
  var Ga;
3652
- (Ga = (Qi = globalThis).__zod_globalRegistry) != null || (Qi.__zod_globalRegistry = Ch());
3652
+ (Ga = (Qi = globalThis).__zod_globalRegistry) != null || (Qi.__zod_globalRegistry = Ph());
3653
3653
  const zr = globalThis.__zod_globalRegistry;
3654
3654
  // @__NO_SIDE_EFFECTS__
3655
- function Ph(e, t) {
3655
+ function Rh(e, t) {
3656
3656
  return new e(y({
3657
3657
  type: "string"
3658
3658
  }, U(t)));
3659
3659
  }
3660
3660
  // @__NO_SIDE_EFFECTS__
3661
- function Rh(e, t) {
3661
+ function Lh(e, t) {
3662
3662
  return new e(y({
3663
3663
  type: "string",
3664
3664
  format: "email",
@@ -3676,7 +3676,7 @@ function ea(e, t) {
3676
3676
  }, U(t)));
3677
3677
  }
3678
3678
  // @__NO_SIDE_EFFECTS__
3679
- function Lh(e, t) {
3679
+ function zh(e, t) {
3680
3680
  return new e(y({
3681
3681
  type: "string",
3682
3682
  format: "uuid",
@@ -3685,7 +3685,7 @@ function Lh(e, t) {
3685
3685
  }, U(t)));
3686
3686
  }
3687
3687
  // @__NO_SIDE_EFFECTS__
3688
- function zh(e, t) {
3688
+ function Ih(e, t) {
3689
3689
  return new e(y({
3690
3690
  type: "string",
3691
3691
  format: "uuid",
@@ -3695,7 +3695,7 @@ function zh(e, t) {
3695
3695
  }, U(t)));
3696
3696
  }
3697
3697
  // @__NO_SIDE_EFFECTS__
3698
- function Ih(e, t) {
3698
+ function $h(e, t) {
3699
3699
  return new e(y({
3700
3700
  type: "string",
3701
3701
  format: "uuid",
@@ -3705,7 +3705,7 @@ function Ih(e, t) {
3705
3705
  }, U(t)));
3706
3706
  }
3707
3707
  // @__NO_SIDE_EFFECTS__
3708
- function $h(e, t) {
3708
+ function Oh(e, t) {
3709
3709
  return new e(y({
3710
3710
  type: "string",
3711
3711
  format: "uuid",
@@ -3715,7 +3715,7 @@ function $h(e, t) {
3715
3715
  }, U(t)));
3716
3716
  }
3717
3717
  // @__NO_SIDE_EFFECTS__
3718
- function Oh(e, t) {
3718
+ function Nh(e, t) {
3719
3719
  return new e(y({
3720
3720
  type: "string",
3721
3721
  format: "url",
@@ -3724,7 +3724,7 @@ function Oh(e, t) {
3724
3724
  }, U(t)));
3725
3725
  }
3726
3726
  // @__NO_SIDE_EFFECTS__
3727
- function Nh(e, t) {
3727
+ function Dh(e, t) {
3728
3728
  return new e(y({
3729
3729
  type: "string",
3730
3730
  format: "emoji",
@@ -3733,7 +3733,7 @@ function Nh(e, t) {
3733
3733
  }, U(t)));
3734
3734
  }
3735
3735
  // @__NO_SIDE_EFFECTS__
3736
- function Dh(e, t) {
3736
+ function Mh(e, t) {
3737
3737
  return new e(y({
3738
3738
  type: "string",
3739
3739
  format: "nanoid",
@@ -3742,7 +3742,7 @@ function Dh(e, t) {
3742
3742
  }, U(t)));
3743
3743
  }
3744
3744
  // @__NO_SIDE_EFFECTS__
3745
- function Mh(e, t) {
3745
+ function jh(e, t) {
3746
3746
  return new e(y({
3747
3747
  type: "string",
3748
3748
  format: "cuid",
@@ -3751,7 +3751,7 @@ function Mh(e, t) {
3751
3751
  }, U(t)));
3752
3752
  }
3753
3753
  // @__NO_SIDE_EFFECTS__
3754
- function jh(e, t) {
3754
+ function Uh(e, t) {
3755
3755
  return new e(y({
3756
3756
  type: "string",
3757
3757
  format: "cuid2",
@@ -3760,7 +3760,7 @@ function jh(e, t) {
3760
3760
  }, U(t)));
3761
3761
  }
3762
3762
  // @__NO_SIDE_EFFECTS__
3763
- function Uh(e, t) {
3763
+ function Zh(e, t) {
3764
3764
  return new e(y({
3765
3765
  type: "string",
3766
3766
  format: "ulid",
@@ -3769,7 +3769,7 @@ function Uh(e, t) {
3769
3769
  }, U(t)));
3770
3770
  }
3771
3771
  // @__NO_SIDE_EFFECTS__
3772
- function Zh(e, t) {
3772
+ function qh(e, t) {
3773
3773
  return new e(y({
3774
3774
  type: "string",
3775
3775
  format: "xid",
@@ -3778,7 +3778,7 @@ function Zh(e, t) {
3778
3778
  }, U(t)));
3779
3779
  }
3780
3780
  // @__NO_SIDE_EFFECTS__
3781
- function qh(e, t) {
3781
+ function Hh(e, t) {
3782
3782
  return new e(y({
3783
3783
  type: "string",
3784
3784
  format: "ksuid",
@@ -3787,7 +3787,7 @@ function qh(e, t) {
3787
3787
  }, U(t)));
3788
3788
  }
3789
3789
  // @__NO_SIDE_EFFECTS__
3790
- function Hh(e, t) {
3790
+ function Fh(e, t) {
3791
3791
  return new e(y({
3792
3792
  type: "string",
3793
3793
  format: "ipv4",
@@ -3796,7 +3796,7 @@ function Hh(e, t) {
3796
3796
  }, U(t)));
3797
3797
  }
3798
3798
  // @__NO_SIDE_EFFECTS__
3799
- function Fh(e, t) {
3799
+ function Bh(e, t) {
3800
3800
  return new e(y({
3801
3801
  type: "string",
3802
3802
  format: "ipv6",
@@ -3805,7 +3805,7 @@ function Fh(e, t) {
3805
3805
  }, U(t)));
3806
3806
  }
3807
3807
  // @__NO_SIDE_EFFECTS__
3808
- function Bh(e, t) {
3808
+ function Gh(e, t) {
3809
3809
  return new e(y({
3810
3810
  type: "string",
3811
3811
  format: "cidrv4",
@@ -3814,7 +3814,7 @@ function Bh(e, t) {
3814
3814
  }, U(t)));
3815
3815
  }
3816
3816
  // @__NO_SIDE_EFFECTS__
3817
- function Gh(e, t) {
3817
+ function Wh(e, t) {
3818
3818
  return new e(y({
3819
3819
  type: "string",
3820
3820
  format: "cidrv6",
@@ -3823,7 +3823,7 @@ function Gh(e, t) {
3823
3823
  }, U(t)));
3824
3824
  }
3825
3825
  // @__NO_SIDE_EFFECTS__
3826
- function Wh(e, t) {
3826
+ function Jh(e, t) {
3827
3827
  return new e(y({
3828
3828
  type: "string",
3829
3829
  format: "base64",
@@ -3832,7 +3832,7 @@ function Wh(e, t) {
3832
3832
  }, U(t)));
3833
3833
  }
3834
3834
  // @__NO_SIDE_EFFECTS__
3835
- function Jh(e, t) {
3835
+ function Vh(e, t) {
3836
3836
  return new e(y({
3837
3837
  type: "string",
3838
3838
  format: "base64url",
@@ -3841,7 +3841,7 @@ function Jh(e, t) {
3841
3841
  }, U(t)));
3842
3842
  }
3843
3843
  // @__NO_SIDE_EFFECTS__
3844
- function Vh(e, t) {
3844
+ function Yh(e, t) {
3845
3845
  return new e(y({
3846
3846
  type: "string",
3847
3847
  format: "e164",
@@ -3850,7 +3850,7 @@ function Vh(e, t) {
3850
3850
  }, U(t)));
3851
3851
  }
3852
3852
  // @__NO_SIDE_EFFECTS__
3853
- function Yh(e, t) {
3853
+ function Xh(e, t) {
3854
3854
  return new e(y({
3855
3855
  type: "string",
3856
3856
  format: "jwt",
@@ -3859,7 +3859,7 @@ function Yh(e, t) {
3859
3859
  }, U(t)));
3860
3860
  }
3861
3861
  // @__NO_SIDE_EFFECTS__
3862
- function Xh(e, t) {
3862
+ function Kh(e, t) {
3863
3863
  return new e(y({
3864
3864
  type: "string",
3865
3865
  format: "datetime",
@@ -3870,7 +3870,7 @@ function Xh(e, t) {
3870
3870
  }, U(t)));
3871
3871
  }
3872
3872
  // @__NO_SIDE_EFFECTS__
3873
- function Kh(e, t) {
3873
+ function Qh(e, t) {
3874
3874
  return new e(y({
3875
3875
  type: "string",
3876
3876
  format: "date",
@@ -3878,7 +3878,7 @@ function Kh(e, t) {
3878
3878
  }, U(t)));
3879
3879
  }
3880
3880
  // @__NO_SIDE_EFFECTS__
3881
- function Qh(e, t) {
3881
+ function ef(e, t) {
3882
3882
  return new e(y({
3883
3883
  type: "string",
3884
3884
  format: "time",
@@ -3887,7 +3887,7 @@ function Qh(e, t) {
3887
3887
  }, U(t)));
3888
3888
  }
3889
3889
  // @__NO_SIDE_EFFECTS__
3890
- function ef(e, t) {
3890
+ function tf(e, t) {
3891
3891
  return new e(y({
3892
3892
  type: "string",
3893
3893
  format: "duration",
@@ -3895,14 +3895,14 @@ function ef(e, t) {
3895
3895
  }, U(t)));
3896
3896
  }
3897
3897
  // @__NO_SIDE_EFFECTS__
3898
- function tf(e, t) {
3898
+ function nf(e, t) {
3899
3899
  return new e(y({
3900
3900
  type: "number",
3901
3901
  checks: []
3902
3902
  }, U(t)));
3903
3903
  }
3904
3904
  // @__NO_SIDE_EFFECTS__
3905
- function nf(e, t) {
3905
+ function rf(e, t) {
3906
3906
  return new e(y({
3907
3907
  type: "number",
3908
3908
  check: "number_format",
@@ -3911,25 +3911,25 @@ function nf(e, t) {
3911
3911
  }, U(t)));
3912
3912
  }
3913
3913
  // @__NO_SIDE_EFFECTS__
3914
- function rf(e, t) {
3914
+ function of(e, t) {
3915
3915
  return new e(y({
3916
3916
  type: "boolean"
3917
3917
  }, U(t)));
3918
3918
  }
3919
3919
  // @__NO_SIDE_EFFECTS__
3920
- function of(e) {
3920
+ function sf(e) {
3921
3921
  return new e({
3922
3922
  type: "any"
3923
3923
  });
3924
3924
  }
3925
3925
  // @__NO_SIDE_EFFECTS__
3926
- function sf(e) {
3926
+ function af(e) {
3927
3927
  return new e({
3928
3928
  type: "unknown"
3929
3929
  });
3930
3930
  }
3931
3931
  // @__NO_SIDE_EFFECTS__
3932
- function af(e, t) {
3932
+ function cf(e, t) {
3933
3933
  return new e(y({
3934
3934
  type: "never"
3935
3935
  }, U(t)));
@@ -3972,7 +3972,7 @@ function _s(e, t) {
3972
3972
  }
3973
3973
  // @__NO_SIDE_EFFECTS__
3974
3974
  function ra(e, t) {
3975
- return new _p(D(y({
3975
+ return new vp(D(y({
3976
3976
  check: "multiple_of"
3977
3977
  }, U(t)), {
3978
3978
  value: e
@@ -3980,7 +3980,7 @@ function ra(e, t) {
3980
3980
  }
3981
3981
  // @__NO_SIDE_EFFECTS__
3982
3982
  function vc(e, t) {
3983
- return new yp(D(y({
3983
+ return new wp(D(y({
3984
3984
  check: "max_length"
3985
3985
  }, U(t)), {
3986
3986
  maximum: e
@@ -3988,7 +3988,7 @@ function vc(e, t) {
3988
3988
  }
3989
3989
  // @__NO_SIDE_EFFECTS__
3990
3990
  function No(e, t) {
3991
- return new wp(D(y({
3991
+ return new xp(D(y({
3992
3992
  check: "min_length"
3993
3993
  }, U(t)), {
3994
3994
  minimum: e
@@ -3996,15 +3996,15 @@ function No(e, t) {
3996
3996
  }
3997
3997
  // @__NO_SIDE_EFFECTS__
3998
3998
  function yc(e, t) {
3999
- return new xp(D(y({
3999
+ return new Sp(D(y({
4000
4000
  check: "length_equals"
4001
4001
  }, U(t)), {
4002
4002
  length: e
4003
4003
  }));
4004
4004
  }
4005
4005
  // @__NO_SIDE_EFFECTS__
4006
- function cf(e, t) {
4007
- return new Sp(D(y({
4006
+ function lf(e, t) {
4007
+ return new Tp(D(y({
4008
4008
  check: "string_format",
4009
4009
  format: "regex"
4010
4010
  }, U(t)), {
@@ -4012,22 +4012,22 @@ function cf(e, t) {
4012
4012
  }));
4013
4013
  }
4014
4014
  // @__NO_SIDE_EFFECTS__
4015
- function lf(e) {
4016
- return new Tp(y({
4015
+ function uf(e) {
4016
+ return new Ep(y({
4017
4017
  check: "string_format",
4018
4018
  format: "lowercase"
4019
4019
  }, U(e)));
4020
4020
  }
4021
4021
  // @__NO_SIDE_EFFECTS__
4022
- function uf(e) {
4023
- return new Ep(y({
4022
+ function df(e) {
4023
+ return new Ap(y({
4024
4024
  check: "string_format",
4025
4025
  format: "uppercase"
4026
4026
  }, U(e)));
4027
4027
  }
4028
4028
  // @__NO_SIDE_EFFECTS__
4029
- function df(e, t) {
4030
- return new Ap(D(y({
4029
+ function pf(e, t) {
4030
+ return new Cp(D(y({
4031
4031
  check: "string_format",
4032
4032
  format: "includes"
4033
4033
  }, U(t)), {
@@ -4035,8 +4035,8 @@ function df(e, t) {
4035
4035
  }));
4036
4036
  }
4037
4037
  // @__NO_SIDE_EFFECTS__
4038
- function pf(e, t) {
4039
- return new Cp(D(y({
4038
+ function hf(e, t) {
4039
+ return new Pp(D(y({
4040
4040
  check: "string_format",
4041
4041
  format: "starts_with"
4042
4042
  }, U(t)), {
@@ -4044,8 +4044,8 @@ function pf(e, t) {
4044
4044
  }));
4045
4045
  }
4046
4046
  // @__NO_SIDE_EFFECTS__
4047
- function hf(e, t) {
4048
- return new Pp(D(y({
4047
+ function ff(e, t) {
4048
+ return new Rp(D(y({
4049
4049
  check: "string_format",
4050
4050
  format: "ends_with"
4051
4051
  }, U(t)), {
@@ -4054,40 +4054,40 @@ function hf(e, t) {
4054
4054
  }
4055
4055
  // @__NO_SIDE_EFFECTS__
4056
4056
  function dr(e) {
4057
- return new Rp({
4057
+ return new Lp({
4058
4058
  check: "overwrite",
4059
4059
  tx: e
4060
4060
  });
4061
4061
  }
4062
4062
  // @__NO_SIDE_EFFECTS__
4063
- function ff(e) {
4063
+ function gf(e) {
4064
4064
  return /* @__PURE__ */ dr((t) => t.normalize(e));
4065
4065
  }
4066
4066
  // @__NO_SIDE_EFFECTS__
4067
- function gf() {
4067
+ function mf() {
4068
4068
  return /* @__PURE__ */ dr((e) => e.trim());
4069
4069
  }
4070
4070
  // @__NO_SIDE_EFFECTS__
4071
- function mf() {
4071
+ function bf() {
4072
4072
  return /* @__PURE__ */ dr((e) => e.toLowerCase());
4073
4073
  }
4074
4074
  // @__NO_SIDE_EFFECTS__
4075
- function bf() {
4075
+ function kf() {
4076
4076
  return /* @__PURE__ */ dr((e) => e.toUpperCase());
4077
4077
  }
4078
4078
  // @__NO_SIDE_EFFECTS__
4079
- function kf() {
4080
- return /* @__PURE__ */ dr((e) => Sd(e));
4079
+ function _f() {
4080
+ return /* @__PURE__ */ dr((e) => Td(e));
4081
4081
  }
4082
4082
  // @__NO_SIDE_EFFECTS__
4083
- function _f(e, t, n) {
4083
+ function vf(e, t, n) {
4084
4084
  return new e(y({
4085
4085
  type: "array",
4086
4086
  element: t
4087
4087
  }, U(n)));
4088
4088
  }
4089
4089
  // @__NO_SIDE_EFFECTS__
4090
- function vf(e, t, n) {
4090
+ function yf(e, t, n) {
4091
4091
  return new e(y({
4092
4092
  type: "custom",
4093
4093
  check: "custom",
@@ -4095,8 +4095,8 @@ function vf(e, t, n) {
4095
4095
  }, U(n)));
4096
4096
  }
4097
4097
  // @__NO_SIDE_EFFECTS__
4098
- function yf(e) {
4099
- const t = /* @__PURE__ */ wf((n) => (n.addIssue = (r) => {
4098
+ function wf(e) {
4099
+ const t = /* @__PURE__ */ xf((n) => (n.addIssue = (r) => {
4100
4100
  var o, i, a, d;
4101
4101
  if (typeof r == "string")
4102
4102
  n.issues.push(Zr(r, n.value, t._zod.def));
@@ -4108,7 +4108,7 @@ function yf(e) {
4108
4108
  return t;
4109
4109
  }
4110
4110
  // @__NO_SIDE_EFFECTS__
4111
- function wf(e, t) {
4111
+ function xf(e, t) {
4112
4112
  const n = new at(y({
4113
4113
  check: "custom"
4114
4114
  }, U(t)));
@@ -4345,25 +4345,25 @@ function Qe(e, t) {
4345
4345
  }
4346
4346
  return !1;
4347
4347
  }
4348
- const xf = (e, t = {}) => (n) => {
4348
+ const Sf = (e, t = {}) => (n) => {
4349
4349
  const r = wc(D(y({}, n), { processors: t }));
4350
4350
  return Le(e, r), xc(r, e), Sc(r, e);
4351
4351
  }, Do = (e, t, n = {}) => (r) => {
4352
4352
  const { libraryOptions: o, target: i } = r != null ? r : {}, a = wc(D(y({}, o != null ? o : {}), { target: i, io: t, processors: n }));
4353
4353
  return Le(e, a), xc(a, e), Sc(a, e);
4354
- }, Sf = {
4354
+ }, Tf = {
4355
4355
  guid: "uuid",
4356
4356
  url: "uri",
4357
4357
  datetime: "date-time",
4358
4358
  json_string: "json-string",
4359
4359
  regex: ""
4360
4360
  // do not set
4361
- }, Tf = (e, t, n, r) => {
4361
+ }, Ef = (e, t, n, r) => {
4362
4362
  var h;
4363
4363
  const o = n;
4364
4364
  o.type = "string";
4365
4365
  const { minimum: i, maximum: a, format: d, patterns: l, contentEncoding: p } = e._zod.bag;
4366
- if (typeof i == "number" && (o.minLength = i), typeof a == "number" && (o.maxLength = a), d && (o.format = (h = Sf[d]) != null ? h : d, o.format === "" && delete o.format, d === "time" && delete o.format), p && (o.contentEncoding = p), l && l.size > 0) {
4366
+ if (typeof i == "number" && (o.minLength = i), typeof a == "number" && (o.maxLength = a), d && (o.format = (h = Tf[d]) != null ? h : d, o.format === "" && delete o.format, d === "time" && delete o.format), p && (o.contentEncoding = p), l && l.size > 0) {
4367
4367
  const g = [...l];
4368
4368
  g.length === 1 ? o.pattern = g[0].source : g.length > 1 && (o.allOf = [
4369
4369
  ...g.map((m) => D(y({}, t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {}), {
@@ -4371,19 +4371,19 @@ const xf = (e, t = {}) => (n) => {
4371
4371
  }))
4372
4372
  ]);
4373
4373
  }
4374
- }, Ef = (e, t, n, r) => {
4374
+ }, Af = (e, t, n, r) => {
4375
4375
  const o = n, { minimum: i, maximum: a, format: d, multipleOf: l, exclusiveMaximum: p, exclusiveMinimum: h } = e._zod.bag;
4376
4376
  typeof d == "string" && d.includes("int") ? o.type = "integer" : o.type = "number", typeof h == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = h, o.exclusiveMinimum = !0) : o.exclusiveMinimum = h), typeof i == "number" && (o.minimum = i, typeof h == "number" && t.target !== "draft-04" && (h >= i ? delete o.minimum : delete o.exclusiveMinimum)), typeof p == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = p, o.exclusiveMaximum = !0) : o.exclusiveMaximum = p), typeof a == "number" && (o.maximum = a, typeof p == "number" && t.target !== "draft-04" && (p <= a ? delete o.maximum : delete o.exclusiveMaximum)), typeof l == "number" && (o.multipleOf = l);
4377
- }, Af = (e, t, n, r) => {
4378
- n.type = "boolean";
4379
4377
  }, Cf = (e, t, n, r) => {
4380
- n.not = {};
4378
+ n.type = "boolean";
4381
4379
  }, Pf = (e, t, n, r) => {
4380
+ n.not = {};
4382
4381
  }, Rf = (e, t, n, r) => {
4383
4382
  }, Lf = (e, t, n, r) => {
4383
+ }, zf = (e, t, n, r) => {
4384
4384
  const o = e._zod.def, i = tc(o.entries);
4385
4385
  i.every((a) => typeof a == "number") && (n.type = "number"), i.every((a) => typeof a == "string") && (n.type = "string"), n.enum = i;
4386
- }, zf = (e, t, n, r) => {
4386
+ }, If = (e, t, n, r) => {
4387
4387
  const o = e._zod.def, i = [];
4388
4388
  for (const a of o.values)
4389
4389
  if (a === void 0) {
@@ -4400,16 +4400,16 @@ const xf = (e, t = {}) => (n) => {
4400
4400
  n.type = a === null ? "null" : typeof a, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [a] : n.const = a;
4401
4401
  } else
4402
4402
  i.every((a) => typeof a == "number") && (n.type = "number"), i.every((a) => typeof a == "string") && (n.type = "string"), i.every((a) => typeof a == "boolean") && (n.type = "boolean"), i.every((a) => a === null) && (n.type = "null"), n.enum = i;
4403
- }, If = (e, t, n, r) => {
4403
+ }, $f = (e, t, n, r) => {
4404
4404
  if (t.unrepresentable === "throw")
4405
4405
  throw new Error("Custom types cannot be represented in JSON Schema");
4406
- }, $f = (e, t, n, r) => {
4406
+ }, Of = (e, t, n, r) => {
4407
4407
  if (t.unrepresentable === "throw")
4408
4408
  throw new Error("Transforms cannot be represented in JSON Schema");
4409
- }, Of = (e, t, n, r) => {
4409
+ }, Nf = (e, t, n, r) => {
4410
4410
  const o = n, i = e._zod.def, { minimum: a, maximum: d } = e._zod.bag;
4411
4411
  typeof a == "number" && (o.minItems = a), typeof d == "number" && (o.maxItems = d), o.type = "array", o.items = Le(i.element, t, D(y({}, r), { path: [...r.path, "items"] }));
4412
- }, Nf = (e, t, n, r) => {
4412
+ }, Df = (e, t, n, r) => {
4413
4413
  var p;
4414
4414
  const o = n, i = e._zod.def;
4415
4415
  o.type = "object", o.properties = {};
@@ -4425,12 +4425,12 @@ const xf = (e, t = {}) => (n) => {
4425
4425
  l.size > 0 && (o.required = Array.from(l)), ((p = i.catchall) == null ? void 0 : p._zod.def.type) === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = Le(i.catchall, t, D(y({}, r), {
4426
4426
  path: [...r.path, "additionalProperties"]
4427
4427
  }))) : t.io === "output" && (o.additionalProperties = !1);
4428
- }, Df = (e, t, n, r) => {
4428
+ }, Mf = (e, t, n, r) => {
4429
4429
  const o = e._zod.def, i = o.inclusive === !1, a = o.options.map((d, l) => Le(d, t, D(y({}, r), {
4430
4430
  path: [...r.path, i ? "oneOf" : "anyOf", l]
4431
4431
  })));
4432
4432
  i ? n.oneOf = a : n.anyOf = a;
4433
- }, Mf = (e, t, n, r) => {
4433
+ }, jf = (e, t, n, r) => {
4434
4434
  const o = e._zod.def, i = Le(o.left, t, D(y({}, r), {
4435
4435
  path: [...r.path, "allOf", 0]
4436
4436
  })), a = Le(o.right, t, D(y({}, r), {
@@ -4440,7 +4440,7 @@ const xf = (e, t = {}) => (n) => {
4440
4440
  ...d(a) ? a.allOf : [a]
4441
4441
  ];
4442
4442
  n.allOf = l;
4443
- }, jf = (e, t, n, r) => {
4443
+ }, Uf = (e, t, n, r) => {
4444
4444
  const o = n, i = e._zod.def;
4445
4445
  o.type = "object";
4446
4446
  const a = i.keyType, d = a._zod.bag, l = d == null ? void 0 : d.patterns;
@@ -4462,25 +4462,25 @@ const xf = (e, t = {}) => (n) => {
4462
4462
  const h = [...p].filter((g) => typeof g == "string" || typeof g == "number");
4463
4463
  h.length > 0 && (o.required = h);
4464
4464
  }
4465
- }, Uf = (e, t, n, r) => {
4465
+ }, Zf = (e, t, n, r) => {
4466
4466
  const o = e._zod.def, i = Le(o.innerType, t, r), a = t.seen.get(e);
4467
4467
  t.target === "openapi-3.0" ? (a.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
4468
- }, Zf = (e, t, n, r) => {
4468
+ }, qf = (e, t, n, r) => {
4469
4469
  const o = e._zod.def;
4470
4470
  Le(o.innerType, t, r);
4471
4471
  const i = t.seen.get(e);
4472
4472
  i.ref = o.innerType;
4473
- }, qf = (e, t, n, r) => {
4473
+ }, Hf = (e, t, n, r) => {
4474
4474
  const o = e._zod.def;
4475
4475
  Le(o.innerType, t, r);
4476
4476
  const i = t.seen.get(e);
4477
4477
  i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
4478
- }, Hf = (e, t, n, r) => {
4478
+ }, Ff = (e, t, n, r) => {
4479
4479
  const o = e._zod.def;
4480
4480
  Le(o.innerType, t, r);
4481
4481
  const i = t.seen.get(e);
4482
4482
  i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
4483
- }, Ff = (e, t, n, r) => {
4483
+ }, Bf = (e, t, n, r) => {
4484
4484
  const o = e._zod.def;
4485
4485
  Le(o.innerType, t, r);
4486
4486
  const i = t.seen.get(e);
@@ -4492,12 +4492,12 @@ const xf = (e, t = {}) => (n) => {
4492
4492
  throw new Error("Dynamic catch values are not supported in JSON Schema");
4493
4493
  }
4494
4494
  n.default = a;
4495
- }, Bf = (e, t, n, r) => {
4495
+ }, Gf = (e, t, n, r) => {
4496
4496
  const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
4497
4497
  Le(i, t, r);
4498
4498
  const a = t.seen.get(e);
4499
4499
  a.ref = i;
4500
- }, Gf = (e, t, n, r) => {
4500
+ }, Wf = (e, t, n, r) => {
4501
4501
  const o = e._zod.def;
4502
4502
  Le(o.innerType, t, r);
4503
4503
  const i = t.seen.get(e);
@@ -4507,38 +4507,38 @@ const xf = (e, t = {}) => (n) => {
4507
4507
  Le(o.innerType, t, r);
4508
4508
  const i = t.seen.get(e);
4509
4509
  i.ref = o.innerType;
4510
- }, Wf = /* @__PURE__ */ x("ZodISODateTime", (e, t) => {
4511
- Fp.init(e, t), ve.init(e, t);
4512
- });
4513
- function Jf(e) {
4514
- return /* @__PURE__ */ Xh(Wf, e);
4515
- }
4516
- const Vf = /* @__PURE__ */ x("ZodISODate", (e, t) => {
4510
+ }, Jf = /* @__PURE__ */ x("ZodISODateTime", (e, t) => {
4517
4511
  Bp.init(e, t), ve.init(e, t);
4518
4512
  });
4519
- function Yf(e) {
4520
- return /* @__PURE__ */ Kh(Vf, e);
4513
+ function Vf(e) {
4514
+ return /* @__PURE__ */ Kh(Jf, e);
4521
4515
  }
4522
- const Xf = /* @__PURE__ */ x("ZodISOTime", (e, t) => {
4516
+ const Yf = /* @__PURE__ */ x("ZodISODate", (e, t) => {
4523
4517
  Gp.init(e, t), ve.init(e, t);
4524
4518
  });
4525
- function Kf(e) {
4526
- return /* @__PURE__ */ Qh(Xf, e);
4519
+ function Xf(e) {
4520
+ return /* @__PURE__ */ Qh(Yf, e);
4527
4521
  }
4528
- const Qf = /* @__PURE__ */ x("ZodISODuration", (e, t) => {
4522
+ const Kf = /* @__PURE__ */ x("ZodISOTime", (e, t) => {
4529
4523
  Wp.init(e, t), ve.init(e, t);
4530
4524
  });
4531
- function eg(e) {
4532
- return /* @__PURE__ */ ef(Qf, e);
4525
+ function Qf(e) {
4526
+ return /* @__PURE__ */ ef(Kf, e);
4533
4527
  }
4534
- const tg = (e, t) => {
4528
+ const eg = /* @__PURE__ */ x("ZodISODuration", (e, t) => {
4529
+ Jp.init(e, t), ve.init(e, t);
4530
+ });
4531
+ function tg(e) {
4532
+ return /* @__PURE__ */ tf(eg, e);
4533
+ }
4534
+ const ng = (e, t) => {
4535
4535
  sc.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
4536
4536
  format: {
4537
- value: (n) => Dd(e, n)
4537
+ value: (n) => Md(e, n)
4538
4538
  // enumerable: false,
4539
4539
  },
4540
4540
  flatten: {
4541
- value: (n) => Nd(e, n)
4541
+ value: (n) => Dd(e, n)
4542
4542
  // enumerable: false,
4543
4543
  },
4544
4544
  addIssue: {
@@ -4560,14 +4560,14 @@ const tg = (e, t) => {
4560
4560
  // enumerable: false,
4561
4561
  }
4562
4562
  });
4563
- }, _t = x("ZodError", tg, {
4563
+ }, _t = x("ZodError", ng, {
4564
4564
  Parent: Error
4565
- }), ng = /* @__PURE__ */ Xs(_t), rg = /* @__PURE__ */ Ks(_t), og = /* @__PURE__ */ Qo(_t), sg = /* @__PURE__ */ es(_t), ig = /* @__PURE__ */ Ud(_t), ag = /* @__PURE__ */ Zd(_t), cg = /* @__PURE__ */ qd(_t), lg = /* @__PURE__ */ Hd(_t), ug = /* @__PURE__ */ Fd(_t), dg = /* @__PURE__ */ Bd(_t), pg = /* @__PURE__ */ Gd(_t), hg = /* @__PURE__ */ Wd(_t), ke = /* @__PURE__ */ x("ZodType", (e, t) => (me.init(e, t), Object.assign(e["~standard"], {
4565
+ }), rg = /* @__PURE__ */ Xs(_t), og = /* @__PURE__ */ Ks(_t), sg = /* @__PURE__ */ Qo(_t), ig = /* @__PURE__ */ es(_t), ag = /* @__PURE__ */ Zd(_t), cg = /* @__PURE__ */ qd(_t), lg = /* @__PURE__ */ Hd(_t), ug = /* @__PURE__ */ Fd(_t), dg = /* @__PURE__ */ Bd(_t), pg = /* @__PURE__ */ Gd(_t), hg = /* @__PURE__ */ Wd(_t), fg = /* @__PURE__ */ Jd(_t), ke = /* @__PURE__ */ x("ZodType", (e, t) => (me.init(e, t), Object.assign(e["~standard"], {
4566
4566
  jsonSchema: {
4567
4567
  input: Do(e, "input"),
4568
4568
  output: Do(e, "output")
4569
4569
  }
4570
- }), e.toJSONSchema = xf(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => {
4570
+ }), e.toJSONSchema = Sf(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => {
4571
4571
  var r;
4572
4572
  return e.clone(_n(t, {
4573
4573
  checks: [
@@ -4577,19 +4577,19 @@ const tg = (e, t) => {
4577
4577
  }), {
4578
4578
  parent: !0
4579
4579
  });
4580
- }, e.with = e.check, e.clone = (n, r) => vn(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => ng(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => og(e, n, r), e.parseAsync = (n, r) => z(null, null, function* () {
4581
- return rg(e, n, r, { callee: e.parseAsync });
4580
+ }, e.with = e.check, e.clone = (n, r) => vn(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => rg(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => sg(e, n, r), e.parseAsync = (n, r) => z(null, null, function* () {
4581
+ return og(e, n, r, { callee: e.parseAsync });
4582
4582
  }), e.safeParseAsync = (n, r) => z(null, null, function* () {
4583
- return sg(e, n, r);
4584
- }), e.spa = e.safeParseAsync, e.encode = (n, r) => ig(e, n, r), e.decode = (n, r) => ag(e, n, r), e.encodeAsync = (n, r) => z(null, null, function* () {
4585
- return cg(e, n, r);
4586
- }), e.decodeAsync = (n, r) => z(null, null, function* () {
4583
+ return ig(e, n, r);
4584
+ }), e.spa = e.safeParseAsync, e.encode = (n, r) => ag(e, n, r), e.decode = (n, r) => cg(e, n, r), e.encodeAsync = (n, r) => z(null, null, function* () {
4587
4585
  return lg(e, n, r);
4588
- }), e.safeEncode = (n, r) => ug(e, n, r), e.safeDecode = (n, r) => dg(e, n, r), e.safeEncodeAsync = (n, r) => z(null, null, function* () {
4589
- return pg(e, n, r);
4590
- }), e.safeDecodeAsync = (n, r) => z(null, null, function* () {
4586
+ }), e.decodeAsync = (n, r) => z(null, null, function* () {
4587
+ return ug(e, n, r);
4588
+ }), e.safeEncode = (n, r) => dg(e, n, r), e.safeDecode = (n, r) => pg(e, n, r), e.safeEncodeAsync = (n, r) => z(null, null, function* () {
4591
4589
  return hg(e, n, r);
4592
- }), e.refine = (n, r) => e.check(cm(n, r)), e.superRefine = (n) => e.check(lm(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ dr(n)), e.optional = () => aa(e), e.exactOptional = () => Vg(e), e.nullable = () => ca(e), e.nullish = () => aa(ca(e)), e.nonoptional = (n) => tm(e, n), e.array = () => ct(e), e.or = (n) => Ug([e, n]), e.and = (n) => Hg(e, n), e.transform = (n) => la(e, Wg(n)), e.default = (n) => Kg(e, n), e.prefault = (n) => em(e, n), e.catch = (n) => rm(e, n), e.pipe = (n) => la(e, n), e.readonly = () => im(e), e.describe = (n) => {
4590
+ }), e.safeDecodeAsync = (n, r) => z(null, null, function* () {
4591
+ return fg(e, n, r);
4592
+ }), e.refine = (n, r) => e.check(lm(n, r)), e.superRefine = (n) => e.check(um(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ dr(n)), e.optional = () => aa(e), e.exactOptional = () => Yg(e), e.nullable = () => ca(e), e.nullish = () => aa(ca(e)), e.nonoptional = (n) => nm(e, n), e.array = () => ct(e), e.or = (n) => Zg([e, n]), e.and = (n) => Fg(e, n), e.transform = (n) => la(e, Jg(n)), e.default = (n) => Qg(e, n), e.prefault = (n) => tm(e, n), e.catch = (n) => om(e, n), e.pipe = (n) => la(e, n), e.readonly = () => am(e), e.describe = (n) => {
4593
4593
  const r = e.clone();
4594
4594
  return zr.add(r, { description: n }), r;
4595
4595
  }, Object.defineProperty(e, "description", {
@@ -4605,151 +4605,151 @@ const tg = (e, t) => {
4605
4605
  return zr.add(r, n[0]), r;
4606
4606
  }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), Ec = /* @__PURE__ */ x("_ZodString", (e, t) => {
4607
4607
  var r, o, i;
4608
- Qs.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (a, d, l) => Tf(e, a, d);
4608
+ Qs.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (a, d, l) => Ef(e, a, d);
4609
4609
  const n = e._zod.bag;
4610
- e.format = (r = n.format) != null ? r : null, e.minLength = (o = n.minimum) != null ? o : null, e.maxLength = (i = n.maximum) != null ? i : null, e.regex = (...a) => e.check(/* @__PURE__ */ cf(...a)), e.includes = (...a) => e.check(/* @__PURE__ */ df(...a)), e.startsWith = (...a) => e.check(/* @__PURE__ */ pf(...a)), e.endsWith = (...a) => e.check(/* @__PURE__ */ hf(...a)), e.min = (...a) => e.check(/* @__PURE__ */ No(...a)), e.max = (...a) => e.check(/* @__PURE__ */ vc(...a)), e.length = (...a) => e.check(/* @__PURE__ */ yc(...a)), e.nonempty = (...a) => e.check(/* @__PURE__ */ No(1, ...a)), e.lowercase = (a) => e.check(/* @__PURE__ */ lf(a)), e.uppercase = (a) => e.check(/* @__PURE__ */ uf(a)), e.trim = () => e.check(/* @__PURE__ */ gf()), e.normalize = (...a) => e.check(/* @__PURE__ */ ff(...a)), e.toLowerCase = () => e.check(/* @__PURE__ */ mf()), e.toUpperCase = () => e.check(/* @__PURE__ */ bf()), e.slugify = () => e.check(/* @__PURE__ */ kf());
4611
- }), fg = /* @__PURE__ */ x("ZodString", (e, t) => {
4612
- Qs.init(e, t), Ec.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Rh(gg, n)), e.url = (n) => e.check(/* @__PURE__ */ Oh(mg, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Yh(Lg, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Nh(bg, n)), e.guid = (n) => e.check(/* @__PURE__ */ ea(oa, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Lh(po, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ zh(po, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Ih(po, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ $h(po, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Dh(kg, n)), e.guid = (n) => e.check(/* @__PURE__ */ ea(oa, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Mh(_g, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ jh(vg, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Uh(yg, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Wh(Cg, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Jh(Pg, n)), e.xid = (n) => e.check(/* @__PURE__ */ Zh(wg, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ qh(xg, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Hh(Sg, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Fh(Tg, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Bh(Eg, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Gh(Ag, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Vh(Rg, n)), e.datetime = (n) => e.check(Jf(n)), e.date = (n) => e.check(Yf(n)), e.time = (n) => e.check(Kf(n)), e.duration = (n) => e.check(eg(n));
4610
+ e.format = (r = n.format) != null ? r : null, e.minLength = (o = n.minimum) != null ? o : null, e.maxLength = (i = n.maximum) != null ? i : null, e.regex = (...a) => e.check(/* @__PURE__ */ lf(...a)), e.includes = (...a) => e.check(/* @__PURE__ */ pf(...a)), e.startsWith = (...a) => e.check(/* @__PURE__ */ hf(...a)), e.endsWith = (...a) => e.check(/* @__PURE__ */ ff(...a)), e.min = (...a) => e.check(/* @__PURE__ */ No(...a)), e.max = (...a) => e.check(/* @__PURE__ */ vc(...a)), e.length = (...a) => e.check(/* @__PURE__ */ yc(...a)), e.nonempty = (...a) => e.check(/* @__PURE__ */ No(1, ...a)), e.lowercase = (a) => e.check(/* @__PURE__ */ uf(a)), e.uppercase = (a) => e.check(/* @__PURE__ */ df(a)), e.trim = () => e.check(/* @__PURE__ */ mf()), e.normalize = (...a) => e.check(/* @__PURE__ */ gf(...a)), e.toLowerCase = () => e.check(/* @__PURE__ */ bf()), e.toUpperCase = () => e.check(/* @__PURE__ */ kf()), e.slugify = () => e.check(/* @__PURE__ */ _f());
4611
+ }), gg = /* @__PURE__ */ x("ZodString", (e, t) => {
4612
+ Qs.init(e, t), Ec.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Lh(mg, n)), e.url = (n) => e.check(/* @__PURE__ */ Nh(bg, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Xh(zg, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Dh(kg, n)), e.guid = (n) => e.check(/* @__PURE__ */ ea(oa, n)), e.uuid = (n) => e.check(/* @__PURE__ */ zh(po, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Ih(po, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ $h(po, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Oh(po, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Mh(_g, n)), e.guid = (n) => e.check(/* @__PURE__ */ ea(oa, n)), e.cuid = (n) => e.check(/* @__PURE__ */ jh(vg, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Uh(yg, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Zh(wg, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Jh(Pg, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Vh(Rg, n)), e.xid = (n) => e.check(/* @__PURE__ */ qh(xg, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Hh(Sg, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Fh(Tg, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Bh(Eg, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Gh(Ag, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Wh(Cg, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Yh(Lg, n)), e.datetime = (n) => e.check(Vf(n)), e.date = (n) => e.check(Xf(n)), e.time = (n) => e.check(Qf(n)), e.duration = (n) => e.check(tg(n));
4613
4613
  });
4614
4614
  function P(e) {
4615
- return /* @__PURE__ */ Ph(fg, e);
4615
+ return /* @__PURE__ */ Rh(gg, e);
4616
4616
  }
4617
4617
  const ve = /* @__PURE__ */ x("ZodStringFormat", (e, t) => {
4618
4618
  be.init(e, t), Ec.init(e, t);
4619
- }), gg = /* @__PURE__ */ x("ZodEmail", (e, t) => {
4620
- Op.init(e, t), ve.init(e, t);
4619
+ }), mg = /* @__PURE__ */ x("ZodEmail", (e, t) => {
4620
+ Np.init(e, t), ve.init(e, t);
4621
4621
  }), oa = /* @__PURE__ */ x("ZodGUID", (e, t) => {
4622
- Ip.init(e, t), ve.init(e, t);
4623
- }), po = /* @__PURE__ */ x("ZodUUID", (e, t) => {
4624
4622
  $p.init(e, t), ve.init(e, t);
4625
- }), mg = /* @__PURE__ */ x("ZodURL", (e, t) => {
4626
- Np.init(e, t), ve.init(e, t);
4627
- }), bg = /* @__PURE__ */ x("ZodEmoji", (e, t) => {
4623
+ }), po = /* @__PURE__ */ x("ZodUUID", (e, t) => {
4624
+ Op.init(e, t), ve.init(e, t);
4625
+ }), bg = /* @__PURE__ */ x("ZodURL", (e, t) => {
4628
4626
  Dp.init(e, t), ve.init(e, t);
4629
- }), kg = /* @__PURE__ */ x("ZodNanoID", (e, t) => {
4627
+ }), kg = /* @__PURE__ */ x("ZodEmoji", (e, t) => {
4630
4628
  Mp.init(e, t), ve.init(e, t);
4631
- }), _g = /* @__PURE__ */ x("ZodCUID", (e, t) => {
4629
+ }), _g = /* @__PURE__ */ x("ZodNanoID", (e, t) => {
4632
4630
  jp.init(e, t), ve.init(e, t);
4633
- }), vg = /* @__PURE__ */ x("ZodCUID2", (e, t) => {
4631
+ }), vg = /* @__PURE__ */ x("ZodCUID", (e, t) => {
4634
4632
  Up.init(e, t), ve.init(e, t);
4635
- }), yg = /* @__PURE__ */ x("ZodULID", (e, t) => {
4633
+ }), yg = /* @__PURE__ */ x("ZodCUID2", (e, t) => {
4636
4634
  Zp.init(e, t), ve.init(e, t);
4637
- }), wg = /* @__PURE__ */ x("ZodXID", (e, t) => {
4635
+ }), wg = /* @__PURE__ */ x("ZodULID", (e, t) => {
4638
4636
  qp.init(e, t), ve.init(e, t);
4639
- }), xg = /* @__PURE__ */ x("ZodKSUID", (e, t) => {
4637
+ }), xg = /* @__PURE__ */ x("ZodXID", (e, t) => {
4640
4638
  Hp.init(e, t), ve.init(e, t);
4641
- }), Sg = /* @__PURE__ */ x("ZodIPv4", (e, t) => {
4642
- Jp.init(e, t), ve.init(e, t);
4643
- }), Tg = /* @__PURE__ */ x("ZodIPv6", (e, t) => {
4639
+ }), Sg = /* @__PURE__ */ x("ZodKSUID", (e, t) => {
4640
+ Fp.init(e, t), ve.init(e, t);
4641
+ }), Tg = /* @__PURE__ */ x("ZodIPv4", (e, t) => {
4644
4642
  Vp.init(e, t), ve.init(e, t);
4645
- }), Eg = /* @__PURE__ */ x("ZodCIDRv4", (e, t) => {
4643
+ }), Eg = /* @__PURE__ */ x("ZodIPv6", (e, t) => {
4646
4644
  Yp.init(e, t), ve.init(e, t);
4647
- }), Ag = /* @__PURE__ */ x("ZodCIDRv6", (e, t) => {
4645
+ }), Ag = /* @__PURE__ */ x("ZodCIDRv4", (e, t) => {
4648
4646
  Xp.init(e, t), ve.init(e, t);
4649
- }), Cg = /* @__PURE__ */ x("ZodBase64", (e, t) => {
4647
+ }), Cg = /* @__PURE__ */ x("ZodCIDRv6", (e, t) => {
4650
4648
  Kp.init(e, t), ve.init(e, t);
4651
- }), Pg = /* @__PURE__ */ x("ZodBase64URL", (e, t) => {
4652
- eh.init(e, t), ve.init(e, t);
4653
- }), Rg = /* @__PURE__ */ x("ZodE164", (e, t) => {
4649
+ }), Pg = /* @__PURE__ */ x("ZodBase64", (e, t) => {
4650
+ Qp.init(e, t), ve.init(e, t);
4651
+ }), Rg = /* @__PURE__ */ x("ZodBase64URL", (e, t) => {
4654
4652
  th.init(e, t), ve.init(e, t);
4655
- }), Lg = /* @__PURE__ */ x("ZodJWT", (e, t) => {
4656
- rh.init(e, t), ve.init(e, t);
4653
+ }), Lg = /* @__PURE__ */ x("ZodE164", (e, t) => {
4654
+ nh.init(e, t), ve.init(e, t);
4655
+ }), zg = /* @__PURE__ */ x("ZodJWT", (e, t) => {
4656
+ oh.init(e, t), ve.init(e, t);
4657
4657
  }), Ac = /* @__PURE__ */ x("ZodNumber", (e, t) => {
4658
4658
  var r, o, i, a, d, l, p, h, g;
4659
- gc.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (m, k, w) => Ef(e, m, k), e.gt = (m, k) => e.check(/* @__PURE__ */ na(m, k)), e.gte = (m, k) => e.check(/* @__PURE__ */ _s(m, k)), e.min = (m, k) => e.check(/* @__PURE__ */ _s(m, k)), e.lt = (m, k) => e.check(/* @__PURE__ */ ta(m, k)), e.lte = (m, k) => e.check(/* @__PURE__ */ ks(m, k)), e.max = (m, k) => e.check(/* @__PURE__ */ ks(m, k)), e.int = (m) => e.check(sa(m)), e.safe = (m) => e.check(sa(m)), e.positive = (m) => e.check(/* @__PURE__ */ na(0, m)), e.nonnegative = (m) => e.check(/* @__PURE__ */ _s(0, m)), e.negative = (m) => e.check(/* @__PURE__ */ ta(0, m)), e.nonpositive = (m) => e.check(/* @__PURE__ */ ks(0, m)), e.multipleOf = (m, k) => e.check(/* @__PURE__ */ ra(m, k)), e.step = (m, k) => e.check(/* @__PURE__ */ ra(m, k)), e.finite = () => e;
4659
+ gc.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (m, k, w) => Af(e, m, k), e.gt = (m, k) => e.check(/* @__PURE__ */ na(m, k)), e.gte = (m, k) => e.check(/* @__PURE__ */ _s(m, k)), e.min = (m, k) => e.check(/* @__PURE__ */ _s(m, k)), e.lt = (m, k) => e.check(/* @__PURE__ */ ta(m, k)), e.lte = (m, k) => e.check(/* @__PURE__ */ ks(m, k)), e.max = (m, k) => e.check(/* @__PURE__ */ ks(m, k)), e.int = (m) => e.check(sa(m)), e.safe = (m) => e.check(sa(m)), e.positive = (m) => e.check(/* @__PURE__ */ na(0, m)), e.nonnegative = (m) => e.check(/* @__PURE__ */ _s(0, m)), e.negative = (m) => e.check(/* @__PURE__ */ ta(0, m)), e.nonpositive = (m) => e.check(/* @__PURE__ */ ks(0, m)), e.multipleOf = (m, k) => e.check(/* @__PURE__ */ ra(m, k)), e.step = (m, k) => e.check(/* @__PURE__ */ ra(m, k)), e.finite = () => e;
4660
4660
  const n = e._zod.bag;
4661
4661
  e.minValue = (i = Math.max((r = n.minimum) != null ? r : Number.NEGATIVE_INFINITY, (o = n.exclusiveMinimum) != null ? o : Number.NEGATIVE_INFINITY)) != null ? i : null, e.maxValue = (l = Math.min((a = n.maximum) != null ? a : Number.POSITIVE_INFINITY, (d = n.exclusiveMaximum) != null ? d : Number.POSITIVE_INFINITY)) != null ? l : null, e.isInt = ((p = n.format) != null ? p : "").includes("int") || Number.isSafeInteger((h = n.multipleOf) != null ? h : 0.5), e.isFinite = !0, e.format = (g = n.format) != null ? g : null;
4662
4662
  });
4663
4663
  function qt(e) {
4664
- return /* @__PURE__ */ tf(Ac, e);
4664
+ return /* @__PURE__ */ nf(Ac, e);
4665
4665
  }
4666
- const zg = /* @__PURE__ */ x("ZodNumberFormat", (e, t) => {
4667
- oh.init(e, t), Ac.init(e, t);
4666
+ const Ig = /* @__PURE__ */ x("ZodNumberFormat", (e, t) => {
4667
+ sh.init(e, t), Ac.init(e, t);
4668
4668
  });
4669
4669
  function sa(e) {
4670
- return /* @__PURE__ */ nf(zg, e);
4670
+ return /* @__PURE__ */ rf(Ig, e);
4671
4671
  }
4672
- const Ig = /* @__PURE__ */ x("ZodBoolean", (e, t) => {
4673
- sh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Af(e, n, r);
4672
+ const $g = /* @__PURE__ */ x("ZodBoolean", (e, t) => {
4673
+ ih.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Cf(e, n, r);
4674
4674
  });
4675
4675
  function fe(e) {
4676
- return /* @__PURE__ */ rf(Ig, e);
4676
+ return /* @__PURE__ */ of($g, e);
4677
4677
  }
4678
- const $g = /* @__PURE__ */ x("ZodAny", (e, t) => {
4679
- ih.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Pf();
4678
+ const Og = /* @__PURE__ */ x("ZodAny", (e, t) => {
4679
+ ah.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Rf();
4680
4680
  });
4681
4681
  function Cc() {
4682
- return /* @__PURE__ */ of($g);
4682
+ return /* @__PURE__ */ sf(Og);
4683
4683
  }
4684
- const Og = /* @__PURE__ */ x("ZodUnknown", (e, t) => {
4685
- ah.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Rf();
4684
+ const Ng = /* @__PURE__ */ x("ZodUnknown", (e, t) => {
4685
+ ch.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lf();
4686
4686
  });
4687
4687
  function ia() {
4688
- return /* @__PURE__ */ sf(Og);
4688
+ return /* @__PURE__ */ af(Ng);
4689
4689
  }
4690
- const Ng = /* @__PURE__ */ x("ZodNever", (e, t) => {
4691
- ch.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Cf(e, n, r);
4690
+ const Dg = /* @__PURE__ */ x("ZodNever", (e, t) => {
4691
+ lh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Pf(e, n, r);
4692
4692
  });
4693
- function Dg(e) {
4694
- return /* @__PURE__ */ af(Ng, e);
4693
+ function Mg(e) {
4694
+ return /* @__PURE__ */ cf(Dg, e);
4695
4695
  }
4696
- const Mg = /* @__PURE__ */ x("ZodArray", (e, t) => {
4697
- lh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Of(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ No(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ No(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ vc(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ yc(n, r)), e.unwrap = () => e.element;
4696
+ const jg = /* @__PURE__ */ x("ZodArray", (e, t) => {
4697
+ uh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Nf(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ No(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ No(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ vc(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ yc(n, r)), e.unwrap = () => e.element;
4698
4698
  });
4699
4699
  function ct(e, t) {
4700
- return /* @__PURE__ */ _f(Mg, e, t);
4700
+ return /* @__PURE__ */ vf(jg, e, t);
4701
4701
  }
4702
- const jg = /* @__PURE__ */ x("ZodObject", (e, t) => {
4703
- dh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Nf(e, n, r, o), ne(e, "shape", () => t.shape), e.keyof = () => mt(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone(D(y({}, e._zod.def), { catchall: n })), e.passthrough = () => e.clone(D(y({}, e._zod.def), { catchall: ia() })), e.loose = () => e.clone(D(y({}, e._zod.def), { catchall: ia() })), e.strict = () => e.clone(D(y({}, e._zod.def), { catchall: Dg() })), e.strip = () => e.clone(D(y({}, e._zod.def), { catchall: void 0 })), e.extend = (n) => Ld(e, n), e.safeExtend = (n) => zd(e, n), e.merge = (n) => Id(e, n), e.pick = (n) => Pd(e, n), e.omit = (n) => Rd(e, n), e.partial = (...n) => $d(Lc, e, n[0]), e.required = (...n) => Od(zc, e, n[0]);
4702
+ const Ug = /* @__PURE__ */ x("ZodObject", (e, t) => {
4703
+ ph.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Df(e, n, r, o), ne(e, "shape", () => t.shape), e.keyof = () => mt(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone(D(y({}, e._zod.def), { catchall: n })), e.passthrough = () => e.clone(D(y({}, e._zod.def), { catchall: ia() })), e.loose = () => e.clone(D(y({}, e._zod.def), { catchall: ia() })), e.strict = () => e.clone(D(y({}, e._zod.def), { catchall: Mg() })), e.strip = () => e.clone(D(y({}, e._zod.def), { catchall: void 0 })), e.extend = (n) => zd(e, n), e.safeExtend = (n) => Id(e, n), e.merge = (n) => $d(e, n), e.pick = (n) => Rd(e, n), e.omit = (n) => Ld(e, n), e.partial = (...n) => Od(Lc, e, n[0]), e.required = (...n) => Nd(zc, e, n[0]);
4704
4704
  });
4705
4705
  function he(e, t) {
4706
4706
  const n = y({
4707
4707
  type: "object",
4708
4708
  shape: e != null ? e : {}
4709
4709
  }, U(t));
4710
- return new jg(n);
4710
+ return new Ug(n);
4711
4711
  }
4712
4712
  const Pc = /* @__PURE__ */ x("ZodUnion", (e, t) => {
4713
- kc.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Df(e, n, r, o), e.options = t.options;
4713
+ kc.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mf(e, n, r, o), e.options = t.options;
4714
4714
  });
4715
- function Ug(e, t) {
4715
+ function Zg(e, t) {
4716
4716
  return new Pc(y({
4717
4717
  type: "union",
4718
4718
  options: e
4719
4719
  }, U(t)));
4720
4720
  }
4721
- const Zg = /* @__PURE__ */ x("ZodDiscriminatedUnion", (e, t) => {
4722
- Pc.init(e, t), ph.init(e, t);
4721
+ const qg = /* @__PURE__ */ x("ZodDiscriminatedUnion", (e, t) => {
4722
+ Pc.init(e, t), hh.init(e, t);
4723
4723
  });
4724
4724
  function Rc(e, t, n) {
4725
- return new Zg(y({
4725
+ return new qg(y({
4726
4726
  type: "union",
4727
4727
  options: t,
4728
4728
  discriminator: e
4729
4729
  }, U(n)));
4730
4730
  }
4731
- const qg = /* @__PURE__ */ x("ZodIntersection", (e, t) => {
4732
- hh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mf(e, n, r, o);
4731
+ const Hg = /* @__PURE__ */ x("ZodIntersection", (e, t) => {
4732
+ fh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => jf(e, n, r, o);
4733
4733
  });
4734
- function Hg(e, t) {
4735
- return new qg({
4734
+ function Fg(e, t) {
4735
+ return new Hg({
4736
4736
  type: "intersection",
4737
4737
  left: e,
4738
4738
  right: t
4739
4739
  });
4740
4740
  }
4741
- const Fg = /* @__PURE__ */ x("ZodRecord", (e, t) => {
4742
- fh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => jf(e, n, r, o), e.keyType = t.keyType, e.valueType = t.valueType;
4741
+ const Bg = /* @__PURE__ */ x("ZodRecord", (e, t) => {
4742
+ gh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uf(e, n, r, o), e.keyType = t.keyType, e.valueType = t.valueType;
4743
4743
  });
4744
4744
  function jt(e, t, n) {
4745
- return new Fg(y({
4745
+ return new Bg(y({
4746
4746
  type: "record",
4747
4747
  keyType: e,
4748
4748
  valueType: t
4749
4749
  }, U(n)));
4750
4750
  }
4751
4751
  const Is = /* @__PURE__ */ x("ZodEnum", (e, t) => {
4752
- gh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (r, o, i) => Lf(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
4752
+ mh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (r, o, i) => zf(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
4753
4753
  const n = new Set(Object.keys(t.entries));
4754
4754
  e.extract = (r, o) => {
4755
4755
  const i = {};
@@ -4784,8 +4784,8 @@ function mt(e, t) {
4784
4784
  entries: n
4785
4785
  }, U(t)));
4786
4786
  }
4787
- const Bg = /* @__PURE__ */ x("ZodLiteral", (e, t) => {
4788
- mh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => zf(e, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", {
4787
+ const Gg = /* @__PURE__ */ x("ZodLiteral", (e, t) => {
4788
+ bh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => If(e, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", {
4789
4789
  get() {
4790
4790
  if (t.values.length > 1)
4791
4791
  throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
@@ -4794,13 +4794,13 @@ const Bg = /* @__PURE__ */ x("ZodLiteral", (e, t) => {
4794
4794
  });
4795
4795
  });
4796
4796
  function gt(e, t) {
4797
- return new Bg(y({
4797
+ return new Gg(y({
4798
4798
  type: "literal",
4799
4799
  values: Array.isArray(e) ? e : [e]
4800
4800
  }, U(t)));
4801
4801
  }
4802
- const Gg = /* @__PURE__ */ x("ZodTransform", (e, t) => {
4803
- bh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => $f(e, n), e._zod.parse = (n, r) => {
4802
+ const Wg = /* @__PURE__ */ x("ZodTransform", (e, t) => {
4803
+ kh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Of(e, n), e._zod.parse = (n, r) => {
4804
4804
  if (r.direction === "backward")
4805
4805
  throw new Qa(e.constructor.name);
4806
4806
  n.addIssue = (i) => {
@@ -4816,8 +4816,8 @@ const Gg = /* @__PURE__ */ x("ZodTransform", (e, t) => {
4816
4816
  return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
4817
4817
  };
4818
4818
  });
4819
- function Wg(e) {
4820
- return new Gg({
4819
+ function Jg(e) {
4820
+ return new Wg({
4821
4821
  type: "transform",
4822
4822
  transform: e
4823
4823
  });
@@ -4831,29 +4831,29 @@ function aa(e) {
4831
4831
  innerType: e
4832
4832
  });
4833
4833
  }
4834
- const Jg = /* @__PURE__ */ x("ZodExactOptional", (e, t) => {
4835
- kh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Tc(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4834
+ const Vg = /* @__PURE__ */ x("ZodExactOptional", (e, t) => {
4835
+ _h.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Tc(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4836
4836
  });
4837
- function Vg(e) {
4838
- return new Jg({
4837
+ function Yg(e) {
4838
+ return new Vg({
4839
4839
  type: "optional",
4840
4840
  innerType: e
4841
4841
  });
4842
4842
  }
4843
- const Yg = /* @__PURE__ */ x("ZodNullable", (e, t) => {
4844
- _h.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uf(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4843
+ const Xg = /* @__PURE__ */ x("ZodNullable", (e, t) => {
4844
+ vh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Zf(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4845
4845
  });
4846
4846
  function ca(e) {
4847
- return new Yg({
4847
+ return new Xg({
4848
4848
  type: "nullable",
4849
4849
  innerType: e
4850
4850
  });
4851
4851
  }
4852
- const Xg = /* @__PURE__ */ x("ZodDefault", (e, t) => {
4853
- vh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => qf(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4852
+ const Kg = /* @__PURE__ */ x("ZodDefault", (e, t) => {
4853
+ yh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Hf(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
4854
4854
  });
4855
- function Kg(e, t) {
4856
- return new Xg({
4855
+ function Qg(e, t) {
4856
+ return new Kg({
4857
4857
  type: "default",
4858
4858
  innerType: e,
4859
4859
  get defaultValue() {
@@ -4861,11 +4861,11 @@ function Kg(e, t) {
4861
4861
  }
4862
4862
  });
4863
4863
  }
4864
- const Qg = /* @__PURE__ */ x("ZodPrefault", (e, t) => {
4865
- yh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Hf(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4864
+ const em = /* @__PURE__ */ x("ZodPrefault", (e, t) => {
4865
+ wh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ff(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4866
4866
  });
4867
- function em(e, t) {
4868
- return new Qg({
4867
+ function tm(e, t) {
4868
+ return new em({
4869
4869
  type: "prefault",
4870
4870
  innerType: e,
4871
4871
  get defaultValue() {
@@ -4874,54 +4874,54 @@ function em(e, t) {
4874
4874
  });
4875
4875
  }
4876
4876
  const zc = /* @__PURE__ */ x("ZodNonOptional", (e, t) => {
4877
- wh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Zf(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4877
+ xh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => qf(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4878
4878
  });
4879
- function tm(e, t) {
4879
+ function nm(e, t) {
4880
4880
  return new zc(y({
4881
4881
  type: "nonoptional",
4882
4882
  innerType: e
4883
4883
  }, U(t)));
4884
4884
  }
4885
- const nm = /* @__PURE__ */ x("ZodCatch", (e, t) => {
4886
- xh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ff(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4885
+ const rm = /* @__PURE__ */ x("ZodCatch", (e, t) => {
4886
+ Sh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bf(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4887
4887
  });
4888
- function rm(e, t) {
4889
- return new nm({
4888
+ function om(e, t) {
4889
+ return new rm({
4890
4890
  type: "catch",
4891
4891
  innerType: e,
4892
4892
  catchValue: typeof t == "function" ? t : () => t
4893
4893
  });
4894
4894
  }
4895
- const om = /* @__PURE__ */ x("ZodPipe", (e, t) => {
4896
- Sh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bf(e, n, r, o), e.in = t.in, e.out = t.out;
4895
+ const sm = /* @__PURE__ */ x("ZodPipe", (e, t) => {
4896
+ Th.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Gf(e, n, r, o), e.in = t.in, e.out = t.out;
4897
4897
  });
4898
4898
  function la(e, t) {
4899
- return new om({
4899
+ return new sm({
4900
4900
  type: "pipe",
4901
4901
  in: e,
4902
4902
  out: t
4903
4903
  // ...util.normalizeParams(params),
4904
4904
  });
4905
4905
  }
4906
- const sm = /* @__PURE__ */ x("ZodReadonly", (e, t) => {
4907
- Th.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Gf(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4906
+ const im = /* @__PURE__ */ x("ZodReadonly", (e, t) => {
4907
+ Eh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wf(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4908
4908
  });
4909
- function im(e) {
4910
- return new sm({
4909
+ function am(e) {
4910
+ return new im({
4911
4911
  type: "readonly",
4912
4912
  innerType: e
4913
4913
  });
4914
4914
  }
4915
- const am = /* @__PURE__ */ x("ZodCustom", (e, t) => {
4916
- Eh.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => If(e, n);
4915
+ const cm = /* @__PURE__ */ x("ZodCustom", (e, t) => {
4916
+ Ah.init(e, t), ke.init(e, t), e._zod.processJSONSchema = (n, r, o) => $f(e, n);
4917
4917
  });
4918
- function cm(e, t = {}) {
4919
- return /* @__PURE__ */ vf(am, e, t);
4918
+ function lm(e, t = {}) {
4919
+ return /* @__PURE__ */ yf(cm, e, t);
4920
4920
  }
4921
- function lm(e) {
4922
- return /* @__PURE__ */ yf(e);
4921
+ function um(e) {
4922
+ return /* @__PURE__ */ wf(e);
4923
4923
  }
4924
- const um = he({
4924
+ const dm = he({
4925
4925
  name: P().min(1).max(100).optional(),
4926
4926
  command: P().min(1).max(500),
4927
4927
  args: ct(P()).optional(),
@@ -4945,12 +4945,12 @@ he({
4945
4945
  });
4946
4946
  const En = he({
4947
4947
  path: P(),
4948
- extraCommands: ct(um).optional(),
4948
+ extraCommands: ct(dm).optional(),
4949
4949
  id: P().uuid().optional(),
4950
4950
  rotationKey: P().optional(),
4951
4951
  usageStatus: mt(["free", "in_use"]).optional(),
4952
4952
  agentTags: ct(P()).optional()
4953
- }), dm = Rc("operation", [
4953
+ }), pm = Rc("operation", [
4954
4954
  En.extend({
4955
4955
  operation: gt("create"),
4956
4956
  content: P().optional(),
@@ -4996,12 +4996,12 @@ const En = he({
4996
4996
  })
4997
4997
  ]);
4998
4998
  var Ee = /* @__PURE__ */ ((e) => (e.PENDING = "pending", e.ASSIGNED = "assigned", e.IN_PROGRESS = "in_progress", e.WAITING_FOR_INPUT = "waiting_for_input", e.WAITING_FOR_PLAN_APPROVAL = "waiting_for_plan_approval", e.PLAN_APPROVED = "plan_approved", e.PLAN_REJECTED = "plan_rejected", e.COMPLETED = "completed", e.FAILED = "failed", e.CANCELLED = "cancelled", e.RESULT_REJECTED = "result_rejected", e))(Ee || {});
4999
- const pm = he({
4999
+ const hm = he({
5000
5000
  type: mt(["json", "file", "regex"]).describe("Extraction method"),
5001
5001
  source: P().describe("Source to extract from (file path or stdout/stderr)"),
5002
5002
  schema: he({}).passthrough().optional().describe("JSON schema for validation"),
5003
5003
  pattern: P().optional().describe("Regex pattern for extraction")
5004
- }), hm = he({
5004
+ }), fm = he({
5005
5005
  type: mt(["issue_update", "bulk_issue_update", "notification", "webhook"]).describe("Hook type"),
5006
5006
  config: Cc().describe("Hook-specific configuration")
5007
5007
  });
@@ -5010,12 +5010,12 @@ he({
5010
5010
  args: ct(P()).optional().describe("Legacy — unused in SDK mode"),
5011
5011
  env: jt(P(), P()).optional().describe("Environment variables"),
5012
5012
  workingDirectory: P().optional().describe("Working directory for command execution"),
5013
- fileOperations: ct(dm).optional().describe("File operations to perform during setup"),
5013
+ fileOperations: ct(pm).optional().describe("File operations to perform during setup"),
5014
5014
  gitUrl: P().optional().describe("Git repository URL (populated from project)"),
5015
5015
  gitPrivateKey: P().optional().describe("Git SSH private key (populated from project)"),
5016
5016
  gitCommitMessage: P().optional().describe("Commit message for git operations"),
5017
- resultExtraction: pm.optional().describe("Schema for extracting result data"),
5018
- postExecutionHooks: ct(hm).optional().describe("Hooks to run after task completion"),
5017
+ resultExtraction: hm.optional().describe("Schema for extracting result data"),
5018
+ postExecutionHooks: ct(fm).optional().describe("Hooks to run after task completion"),
5019
5019
  executionMode: mt(["claudeAgentSdk", "openaiAgentSdk", "opencodeSdk", "cursorSdk", "codexSdk"]).optional().default("claudeAgentSdk").describe("Execution mode (default: claudeAgentSdk)"),
5020
5020
  executionPlan: Rc("executionMode", [
5021
5021
  he({
@@ -5102,13 +5102,13 @@ he({
5102
5102
  enableBrowserTools: fe().optional().describe("When true, the MCP server registers browser_interact and browser_get_context (browser_automate tasks only)")
5103
5103
  });
5104
5104
  Ee.PENDING + "", Ee.CANCELLED, Ee.ASSIGNED + "", Ee.CANCELLED, Ee.IN_PROGRESS + "", Ee.CANCELLED, Ee.FAILED, Ee.WAITING_FOR_INPUT + "", Ee.CANCELLED, Ee.WAITING_FOR_PLAN_APPROVAL + "", Ee.CANCELLED, Ee.PLAN_APPROVED + "", Ee.CANCELLED, Ee.PLAN_REJECTED + "", Ee.CANCELLED, Ee.COMPLETED + "", Ee.RESULT_REJECTED + "", Ee.CANCELLED, Ee.FAILED + "", Ee.CANCELLED + "";
5105
- const Ic = "browser_capture", fm = "browser_automate";
5105
+ const Ic = "browser_capture", gm = "browser_automate";
5106
5106
  function ua(e) {
5107
5107
  let t = (e || "").trim().toLowerCase();
5108
5108
  const n = t.indexOf("@");
5109
5109
  return n >= 0 && (t = t.slice(n + 1)), t = t.split("/")[0].split(":")[0], t.startsWith("www.") && (t = t.slice(4)), t;
5110
5110
  }
5111
- function gm(e, t) {
5111
+ function mm(e, t) {
5112
5112
  const n = ua(e), r = (t || "").trim().toLowerCase();
5113
5113
  if (!n || !r) return !1;
5114
5114
  if (r.startsWith("*.")) {
@@ -5130,7 +5130,7 @@ function da(e, t) {
5130
5130
  let r = null, o = -1;
5131
5131
  for (const a of t)
5132
5132
  for (const d of (i = a.domains) != null ? i : [])
5133
- gm(n, d) && d.length > o && (o = d.length, r = a.id);
5133
+ mm(n, d) && d.length > o && (o = d.length, r = a.id);
5134
5134
  return r;
5135
5135
  }
5136
5136
  class $c extends Error {
@@ -5144,9 +5144,13 @@ function Oc(e) {
5144
5144
  return e.json();
5145
5145
  });
5146
5146
  }
5147
- const mm = 3e4;
5147
+ const bm = 3e4;
5148
+ let Nc = bm;
5149
+ function km(e) {
5150
+ Number.isFinite(e) && e > 0 && (Nc = e);
5151
+ }
5148
5152
  function Mo(r) {
5149
- return z(this, arguments, function* (e, t = {}, n = mm) {
5153
+ return z(this, arguments, function* (e, t = {}, n = Nc) {
5150
5154
  const o = new AbortController(), i = setTimeout(() => o.abort(), n);
5151
5155
  try {
5152
5156
  return yield fetch(e, D(y({}, t), { signal: o.signal }));
@@ -5170,15 +5174,15 @@ function Fe(e, t, n, r) {
5170
5174
  return Oc(a);
5171
5175
  });
5172
5176
  }
5173
- function bm(e, t) {
5177
+ function _m(e, t) {
5174
5178
  return z(this, null, function* () {
5175
5179
  return Fe(e, "GET", `/projects/by-key/${encodeURIComponent(t)}`);
5176
5180
  });
5177
5181
  }
5178
- const km = ["project", "note", "ctx"];
5179
- function _m(e) {
5182
+ const vm = ["project", "note", "ctx"];
5183
+ function ym(e) {
5180
5184
  var n, r;
5181
- const t = km.filter((o) => e[o] === void 0 || e[o] === null);
5185
+ const t = vm.filter((o) => e[o] === void 0 || e[o] === null);
5182
5186
  if (t.length > 0)
5183
5187
  throw new Error(`createTask: missing required field(s): ${t.join(", ")}`);
5184
5188
  if (!((n = e.project) != null && n.id) && !((r = e.project) != null && r.key))
@@ -5187,7 +5191,7 @@ function _m(e) {
5187
5191
  function $s(e, t) {
5188
5192
  return z(this, null, function* () {
5189
5193
  var h, g, m, k, w, v;
5190
- _m(t);
5194
+ ym(t);
5191
5195
  const { project: n, note: r, ctx: o, advancedOpts: i, titleOverride: a, titleInstruction: d, allowSubmit: l, type: p = Ic } = t;
5192
5196
  return Fe(e, "POST", "/tasks", D(y(y(y(y(y(y(y(y(y(y(y(y(D(y({
5193
5197
  type: p,
@@ -5231,7 +5235,7 @@ function $s(e, t) {
5231
5235
  }
5232
5236
  function pa(e, t) {
5233
5237
  return z(this, null, function* () {
5234
- return $s(e, D(y({}, t), { type: fm }));
5238
+ return $s(e, D(y({}, t), { type: gm }));
5235
5239
  });
5236
5240
  }
5237
5241
  function ha(e, t, n, r) {
@@ -5243,18 +5247,18 @@ function ha(e, t, n, r) {
5243
5247
  }), r != null && r.claudeTemplateId ? { claudeTemplateId: r.claudeTemplateId } : {}));
5244
5248
  });
5245
5249
  }
5246
- function vm(e, t) {
5250
+ function wm(e, t) {
5247
5251
  return z(this, null, function* () {
5248
5252
  const n = t ? `?projectId=${encodeURIComponent(t)}` : "";
5249
5253
  return Fe(e, "GET", `/claude-templates${n}`);
5250
5254
  });
5251
5255
  }
5252
- function Nc(e, t) {
5256
+ function Dc(e, t) {
5253
5257
  return z(this, null, function* () {
5254
5258
  return Fe(e, "GET", `/tasks/${t}`);
5255
5259
  });
5256
5260
  }
5257
- function ym(e, t) {
5261
+ function xm(e, t) {
5258
5262
  return z(this, null, function* () {
5259
5263
  return Fe(e, "GET", `/planning-sessions/${t}`);
5260
5264
  });
@@ -5264,7 +5268,7 @@ function fa(e) {
5264
5268
  return Fe(e, "GET", "/projects");
5265
5269
  });
5266
5270
  }
5267
- function wm(e) {
5271
+ function Sm(e) {
5268
5272
  return z(this, null, function* () {
5269
5273
  return (yield Fe(e, "GET", "/tenants/current")).membership;
5270
5274
  });
@@ -5284,12 +5288,12 @@ function Os(e, t, n) {
5284
5288
  return Oc(i);
5285
5289
  });
5286
5290
  }
5287
- function xm(e, t) {
5291
+ function Tm(e, t) {
5288
5292
  return z(this, null, function* () {
5289
5293
  return Fe(e, "GET", `/tasks/${t}/browser-commands/pending`);
5290
5294
  });
5291
5295
  }
5292
- function Sm(e, t, n, r, o) {
5296
+ function Em(e, t, n, r, o) {
5293
5297
  return z(this, null, function* () {
5294
5298
  return Fe(e, "POST", `/tasks/${t}/browser-commands/${n}/result`, {
5295
5299
  status: r,
@@ -5297,27 +5301,27 @@ function Sm(e, t, n, r, o) {
5297
5301
  });
5298
5302
  });
5299
5303
  }
5300
- function Tm(e, t) {
5304
+ function Am(e, t) {
5301
5305
  return z(this, null, function* () {
5302
5306
  return Fe(e, "GET", `/tasks/${t}/chunks`);
5303
5307
  });
5304
5308
  }
5305
- function Em(e, t, n) {
5309
+ function Cm(e, t, n) {
5306
5310
  return z(this, null, function* () {
5307
5311
  return Fe(e, "POST", `/tasks/${t}/instructions`, { content: n });
5308
5312
  });
5309
5313
  }
5310
- function Am(e, t) {
5314
+ function Pm(e, t) {
5311
5315
  return z(this, null, function* () {
5312
5316
  return Fe(e, "POST", `/tasks/${t}/cancel`);
5313
5317
  });
5314
5318
  }
5315
- function Cm(e, t) {
5319
+ function Rm(e, t) {
5316
5320
  return z(this, null, function* () {
5317
5321
  return Fe(e, "POST", `/tasks/${t}/approve-result`);
5318
5322
  });
5319
5323
  }
5320
- function Pm(e, t, n) {
5324
+ function Lm(e, t, n) {
5321
5325
  return z(this, null, function* () {
5322
5326
  return Fe(e, "POST", `/tasks/${t}/reject-result`, { feedback: n });
5323
5327
  });
@@ -5327,7 +5331,7 @@ function jo(e, t) {
5327
5331
  return Fe(e, "GET", `/tasks/${t}/interactions?filter=unanswered`);
5328
5332
  });
5329
5333
  }
5330
- function Dc(e, t, n, r) {
5334
+ function Mc(e, t, n, r) {
5331
5335
  return z(this, null, function* () {
5332
5336
  return Fe(
5333
5337
  e,
@@ -5337,7 +5341,7 @@ function Dc(e, t, n, r) {
5337
5341
  );
5338
5342
  });
5339
5343
  }
5340
- function Rm(e) {
5344
+ function zm(e) {
5341
5345
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
5342
5346
  }
5343
5347
  var vs = { exports: {} };
@@ -5349,7 +5353,7 @@ var vs = { exports: {} };
5349
5353
  * Released under the MIT licence.
5350
5354
  */
5351
5355
  var ma;
5352
- function Lm() {
5356
+ function Im() {
5353
5357
  return ma || (ma = 1, (function(e, t) {
5354
5358
  (function(r, o) {
5355
5359
  e.exports = o();
@@ -6923,7 +6927,7 @@ function Lm() {
6923
6927
  return Wt.createChannel(u, s);
6924
6928
  }
6925
6929
  }
6926
- var Ll = {
6930
+ var zl = {
6927
6931
  createChannels() {
6928
6932
  return new to();
6929
6933
  },
@@ -6952,7 +6956,7 @@ function Lm() {
6952
6956
  return new eo(u, s, c);
6953
6957
  }
6954
6958
  };
6955
- const Wt = Ll;
6959
+ const Wt = zl;
6956
6960
  class yi {
6957
6961
  constructor(s) {
6958
6962
  this.options = s || {}, this.livesLeft = this.options.lives || 1 / 0;
@@ -7014,10 +7018,10 @@ function Lm() {
7014
7018
  return Ue(this.strategies, xe.method("isSupported"));
7015
7019
  }
7016
7020
  connect(s, c) {
7017
- return zl(this.strategies, s, function(f, b) {
7021
+ return Il(this.strategies, s, function(f, b) {
7018
7022
  return function(S, R) {
7019
7023
  if (b[f].error = S, S) {
7020
- Il(b) && c(!0);
7024
+ $l(b) && c(!0);
7021
7025
  return;
7022
7026
  }
7023
7027
  je(b, function(O) {
@@ -7027,13 +7031,13 @@ function Lm() {
7027
7031
  });
7028
7032
  }
7029
7033
  }
7030
- function zl(u, s, c) {
7034
+ function Il(u, s, c) {
7031
7035
  var f = Ft(u, function(b, S, R, O) {
7032
7036
  return b.connect(s, c(S, O));
7033
7037
  });
7034
7038
  return {
7035
7039
  abort: function() {
7036
- je(f, $l);
7040
+ je(f, Ol);
7037
7041
  },
7038
7042
  forceMinPriority: function(b) {
7039
7043
  je(f, function(S) {
@@ -7042,15 +7046,15 @@ function Lm() {
7042
7046
  }
7043
7047
  };
7044
7048
  }
7045
- function Il(u) {
7049
+ function $l(u) {
7046
7050
  return fr(u, function(s) {
7047
7051
  return !!s.error;
7048
7052
  });
7049
7053
  }
7050
- function $l(u) {
7054
+ function Ol(u) {
7051
7055
  !u.error && !u.aborted && (u.abort(), u.aborted = !0);
7052
7056
  }
7053
- class Ol {
7057
+ class Nl {
7054
7058
  constructor(s, c, f) {
7055
7059
  this.strategy = s, this.transports = c, this.ttl = f.ttl || 18e5, this.usingTLS = f.useTLS, this.timeline = f.timeline;
7056
7060
  }
@@ -7058,7 +7062,7 @@ function Lm() {
7058
7062
  return this.strategy.isSupported();
7059
7063
  }
7060
7064
  connect(s, c) {
7061
- var f = this.usingTLS, b = Nl(f), S = b && b.cacheSkipCount ? b.cacheSkipCount : 0, R = [this.strategy];
7065
+ var f = this.usingTLS, b = Dl(f), S = b && b.cacheSkipCount ? b.cacheSkipCount : 0, R = [this.strategy];
7062
7066
  if (b && b.timestamp + this.ttl >= xe.now()) {
7063
7067
  var O = this.transports[b.transport];
7064
7068
  O && (["ws", "wss"].includes(b.transport) || S > 3 ? (this.timeline.info({
@@ -7071,7 +7075,7 @@ function Lm() {
7071
7075
  }))) : S++);
7072
7076
  }
7073
7077
  var B = xe.now(), ee = R.pop().connect(s, function re(Pe, io) {
7074
- Pe ? (wi(f), R.length > 0 ? (B = xe.now(), ee = R.pop().connect(s, re)) : c(Pe)) : (Dl(f, io.transport.name, xe.now() - B, S), c(null, io));
7078
+ Pe ? (wi(f), R.length > 0 ? (B = xe.now(), ee = R.pop().connect(s, re)) : c(Pe)) : (Ml(f, io.transport.name, xe.now() - B, S), c(null, io));
7075
7079
  });
7076
7080
  return {
7077
7081
  abort: function() {
@@ -7086,7 +7090,7 @@ function Lm() {
7086
7090
  function us(u) {
7087
7091
  return "pusherTransport" + (u ? "TLS" : "NonTLS");
7088
7092
  }
7089
- function Nl(u) {
7093
+ function Dl(u) {
7090
7094
  var s = G.getLocalStorage();
7091
7095
  if (s)
7092
7096
  try {
@@ -7098,7 +7102,7 @@ function Lm() {
7098
7102
  }
7099
7103
  return null;
7100
7104
  }
7101
- function Dl(u, s, c, f) {
7105
+ function Ml(u, s, c, f) {
7102
7106
  var b = G.getLocalStorage();
7103
7107
  if (b)
7104
7108
  try {
@@ -7153,7 +7157,7 @@ function Lm() {
7153
7157
  return f.connect(s, c);
7154
7158
  }
7155
7159
  }
7156
- class Ml {
7160
+ class jl {
7157
7161
  constructor(s) {
7158
7162
  this.strategy = s;
7159
7163
  }
@@ -7172,10 +7176,10 @@ function Lm() {
7172
7176
  return u.isSupported();
7173
7177
  };
7174
7178
  }
7175
- var jl = function(u, s, c) {
7179
+ var Ul = function(u, s, c) {
7176
7180
  var f = {};
7177
- function b(Oi, Nu, Du, Mu, ju) {
7178
- var Ni = c(u, Oi, Nu, Du, Mu, ju);
7181
+ function b(Oi, Du, Mu, ju, Uu) {
7182
+ var Ni = c(u, Oi, Du, Mu, ju, Uu);
7179
7183
  return f[Oi] = Ni, Ni;
7180
7184
  }
7181
7185
  var S = Object.assign({}, s, {
@@ -7199,31 +7203,31 @@ function Lm() {
7199
7203
  lives: 2,
7200
7204
  minPingDelay: 1e4,
7201
7205
  maxPingDelay: u.activityTimeout
7202
- }), Pe = b("ws", "ws", 3, S, ee), io = b("wss", "ws", 3, R, ee), Lu = b("sockjs", "sockjs", 1, O), Pi = b("xhr_streaming", "xhr_streaming", 1, O, re), zu = b("xdr_streaming", "xdr_streaming", 1, O, re), Ri = b("xhr_polling", "xhr_polling", 1, O), Iu = b("xdr_polling", "xdr_polling", 1, O), Li = new Sn([Pe], B), $u = new Sn([io], B), Ou = new Sn([Lu], B), zi = new Sn([
7203
- new xr(Sr(Pi), Pi, zu)
7206
+ }), Pe = b("ws", "ws", 3, S, ee), io = b("wss", "ws", 3, R, ee), zu = b("sockjs", "sockjs", 1, O), Pi = b("xhr_streaming", "xhr_streaming", 1, O, re), Iu = b("xdr_streaming", "xdr_streaming", 1, O, re), Ri = b("xhr_polling", "xhr_polling", 1, O), $u = b("xdr_polling", "xdr_polling", 1, O), Li = new Sn([Pe], B), Ou = new Sn([io], B), Nu = new Sn([zu], B), zi = new Sn([
7207
+ new xr(Sr(Pi), Pi, Iu)
7204
7208
  ], B), Ii = new Sn([
7205
- new xr(Sr(Ri), Ri, Iu)
7209
+ new xr(Sr(Ri), Ri, $u)
7206
7210
  ], B), $i = new Sn([
7207
7211
  new xr(Sr(zi), new ls([
7208
7212
  zi,
7209
7213
  new ro(Ii, { delay: 4e3 })
7210
7214
  ]), Ii)
7211
- ], B), hs = new xr(Sr($i), $i, Ou), fs;
7215
+ ], B), hs = new xr(Sr($i), $i, Nu), fs;
7212
7216
  return s.useTLS ? fs = new ls([
7213
7217
  Li,
7214
7218
  new ro(hs, { delay: 2e3 })
7215
7219
  ]) : fs = new ls([
7216
7220
  Li,
7217
- new ro($u, { delay: 2e3 }),
7221
+ new ro(Ou, { delay: 2e3 }),
7218
7222
  new ro(hs, { delay: 5e3 })
7219
- ]), new Ol(new Ml(new xr(Sr(Pe), fs, hs)), f, {
7223
+ ]), new Nl(new jl(new xr(Sr(Pe), fs, hs)), f, {
7220
7224
  ttl: 18e5,
7221
7225
  timeline: s.timeline,
7222
7226
  useTLS: s.useTLS
7223
7227
  });
7224
7228
  };
7225
- const Ul = jl;
7226
- function Zl() {
7229
+ const Zl = Ul;
7230
+ function ql() {
7227
7231
  var u = this;
7228
7232
  u.timeline.info(u.buildTimelineMessage({
7229
7233
  transport: u.name + (u.options.useTLS ? "s" : "")
@@ -7231,7 +7235,7 @@ function Lm() {
7231
7235
  u.hooks.isInitialized() ? (u.changeState("initialized"), c(!0)) : (s && u.onError(s), u.onClose(), c(!1));
7232
7236
  })) : u.onClose();
7233
7237
  }
7234
- var ql = {
7238
+ var Hl = {
7235
7239
  getRequest: function(u) {
7236
7240
  var s = new window.XDomainRequest();
7237
7241
  return s.ontimeout = function() {
@@ -7248,8 +7252,8 @@ function Lm() {
7248
7252
  u.ontimeout = u.onerror = u.onprogress = u.onload = null, u.abort();
7249
7253
  }
7250
7254
  };
7251
- const Hl = ql, Fl = 256 * 1024;
7252
- class Bl extends Tt {
7255
+ const Fl = Hl, Bl = 256 * 1024;
7256
+ class Gl extends Tt {
7253
7257
  constructor(s, c, f) {
7254
7258
  super(), this.hooks = s, this.method = c, this.url = f;
7255
7259
  }
@@ -7277,7 +7281,7 @@ function Lm() {
7277
7281
  return f !== -1 ? (this.position += f + 1, c.slice(0, f)) : null;
7278
7282
  }
7279
7283
  isBufferTooLong(s) {
7280
- return this.position === s.length && s.length > Fl;
7284
+ return this.position === s.length && s.length > Bl;
7281
7285
  }
7282
7286
  }
7283
7287
  var ds;
@@ -7285,10 +7289,10 @@ function Lm() {
7285
7289
  u[u.CONNECTING = 0] = "CONNECTING", u[u.OPEN = 1] = "OPEN", u[u.CLOSED = 3] = "CLOSED";
7286
7290
  })(ds || (ds = {}));
7287
7291
  const Tn = ds;
7288
- var Gl = 1;
7289
- class Wl {
7292
+ var Wl = 1;
7293
+ class Jl {
7290
7294
  constructor(s, c) {
7291
- this.hooks = s, this.session = Si(1e3) + "/" + Xl(8), this.location = Jl(c), this.readyState = Tn.CONNECTING, this.openStream();
7295
+ this.hooks = s, this.session = Si(1e3) + "/" + Kl(8), this.location = Vl(c), this.readyState = Tn.CONNECTING, this.openStream();
7292
7296
  }
7293
7297
  send(s) {
7294
7298
  return this.sendRaw(JSON.stringify([s]));
@@ -7302,7 +7306,7 @@ function Lm() {
7302
7306
  sendRaw(s) {
7303
7307
  if (this.readyState === Tn.OPEN)
7304
7308
  try {
7305
- return G.createSocketRequest("POST", xi(Vl(this.location, this.session))).start(s), !0;
7309
+ return G.createSocketRequest("POST", xi(Yl(this.location, this.session))).start(s), !0;
7306
7310
  } catch (c) {
7307
7311
  return !1;
7308
7312
  }
@@ -7345,7 +7349,7 @@ function Lm() {
7345
7349
  }
7346
7350
  }
7347
7351
  onOpen(s) {
7348
- this.readyState === Tn.CONNECTING ? (s && s.hostname && (this.location.base = Yl(this.location.base, s.hostname)), this.readyState = Tn.OPEN, this.onopen && this.onopen()) : this.onClose(1006, "Server lost session", !0);
7352
+ this.readyState === Tn.CONNECTING ? (s && s.hostname && (this.location.base = Xl(this.location.base, s.hostname)), this.readyState = Tn.OPEN, this.onopen && this.onopen()) : this.onClose(1006, "Server lost session", !0);
7349
7353
  }
7350
7354
  onEvent(s) {
7351
7355
  this.readyState === Tn.OPEN && this.onmessage && this.onmessage({ data: s });
@@ -7376,34 +7380,34 @@ function Lm() {
7376
7380
  this.stream && (this.stream.unbind_all(), this.stream.close(), this.stream = null);
7377
7381
  }
7378
7382
  }
7379
- function Jl(u) {
7383
+ function Vl(u) {
7380
7384
  var s = /([^\?]*)\/*(\??.*)/.exec(u);
7381
7385
  return {
7382
7386
  base: s[1],
7383
7387
  queryString: s[2]
7384
7388
  };
7385
7389
  }
7386
- function Vl(u, s) {
7390
+ function Yl(u, s) {
7387
7391
  return u.base + "/" + s + "/xhr_send";
7388
7392
  }
7389
7393
  function xi(u) {
7390
7394
  var s = u.indexOf("?") === -1 ? "?" : "&";
7391
- return u + s + "t=" + +/* @__PURE__ */ new Date() + "&n=" + Gl++;
7395
+ return u + s + "t=" + +/* @__PURE__ */ new Date() + "&n=" + Wl++;
7392
7396
  }
7393
- function Yl(u, s) {
7397
+ function Xl(u, s) {
7394
7398
  var c = /(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(u);
7395
7399
  return c[1] + s + c[3];
7396
7400
  }
7397
7401
  function Si(u) {
7398
7402
  return G.randomInt(u);
7399
7403
  }
7400
- function Xl(u) {
7404
+ function Kl(u) {
7401
7405
  for (var s = [], c = 0; c < u; c++)
7402
7406
  s.push(Si(32).toString(32));
7403
7407
  return s.join("");
7404
7408
  }
7405
- const Kl = Wl;
7406
- var Ql = {
7409
+ const Ql = Jl;
7410
+ var eu = {
7407
7411
  getReceiveURL: function(u, s) {
7408
7412
  return u.base + "/" + s + "/xhr_streaming" + u.queryString;
7409
7413
  },
@@ -7417,8 +7421,8 @@ function Lm() {
7417
7421
  u.onClose(1006, "Connection interrupted (" + s + ")", !1);
7418
7422
  }
7419
7423
  };
7420
- const eu = Ql;
7421
- var tu = {
7424
+ const tu = eu;
7425
+ var nu = {
7422
7426
  getReceiveURL: function(u, s) {
7423
7427
  return u.base + "/" + s + "/xhr" + u.queryString;
7424
7428
  },
@@ -7431,8 +7435,8 @@ function Lm() {
7431
7435
  s === 200 ? u.reconnect() : u.onClose(1006, "Connection interrupted (" + s + ")", !1);
7432
7436
  }
7433
7437
  };
7434
- const nu = tu;
7435
- var ru = {
7438
+ const ru = nu;
7439
+ var ou = {
7436
7440
  getRequest: function(u) {
7437
7441
  var s = G.getXHRAPI(), c = new s();
7438
7442
  return c.onreadystatechange = c.onprogress = function() {
@@ -7450,36 +7454,36 @@ function Lm() {
7450
7454
  u.onreadystatechange = null, u.abort();
7451
7455
  }
7452
7456
  };
7453
- const ou = ru;
7454
- var su = {
7457
+ const su = ou;
7458
+ var iu = {
7455
7459
  createStreamingSocket(u) {
7456
- return this.createSocket(eu, u);
7460
+ return this.createSocket(tu, u);
7457
7461
  },
7458
7462
  createPollingSocket(u) {
7459
- return this.createSocket(nu, u);
7463
+ return this.createSocket(ru, u);
7460
7464
  },
7461
7465
  createSocket(u, s) {
7462
- return new Kl(u, s);
7466
+ return new Ql(u, s);
7463
7467
  },
7464
7468
  createXHR(u, s) {
7465
- return this.createRequest(ou, u, s);
7469
+ return this.createRequest(su, u, s);
7466
7470
  },
7467
7471
  createRequest(u, s, c) {
7468
- return new Bl(u, s, c);
7472
+ return new Gl(u, s, c);
7469
7473
  }
7470
7474
  };
7471
- const Ti = su;
7475
+ const Ti = iu;
7472
7476
  Ti.createXDR = function(u, s) {
7473
- return this.createRequest(Hl, u, s);
7477
+ return this.createRequest(Fl, u, s);
7474
7478
  };
7475
- var iu = {
7479
+ var au = {
7476
7480
  nextAuthCallbackID: 1,
7477
7481
  auth_callbacks: {},
7478
7482
  ScriptReceivers: h,
7479
7483
  DependenciesReceivers: w,
7480
- getDefaultStrategy: Ul,
7484
+ getDefaultStrategy: Zl,
7481
7485
  Transports: Et,
7482
- transportConnectionInitializer: Zl,
7486
+ transportConnectionInitializer: ql,
7483
7487
  HTTPFactory: Ti,
7484
7488
  TimelineTransport: cn,
7485
7489
  getXHRAPI() {
@@ -7566,13 +7570,13 @@ function Lm() {
7566
7570
  }() * u);
7567
7571
  }
7568
7572
  };
7569
- const G = iu;
7573
+ const G = au;
7570
7574
  var ps;
7571
7575
  (function(u) {
7572
7576
  u[u.ERROR = 3] = "ERROR", u[u.INFO = 6] = "INFO", u[u.DEBUG = 7] = "DEBUG";
7573
7577
  })(ps || (ps = {}));
7574
7578
  const oo = ps;
7575
- class au {
7579
+ class cu {
7576
7580
  constructor(s, c, f) {
7577
7581
  this.key = s, this.session = c, this.events = [], this.options = f || {}, this.sent = 0, this.uniqueID = 0;
7578
7582
  }
@@ -7610,7 +7614,7 @@ function Lm() {
7610
7614
  return this.uniqueID++, this.uniqueID;
7611
7615
  }
7612
7616
  }
7613
- class cu {
7617
+ class lu {
7614
7618
  constructor(s, c, f, b) {
7615
7619
  this.name = s, this.priority = c, this.transport = f, this.options = b || {};
7616
7620
  }
@@ -7659,14 +7663,14 @@ function Lm() {
7659
7663
  }
7660
7664
  };
7661
7665
  }
7662
- const { Transports: lu } = G;
7663
- var uu = function(u, s, c, f, b, S) {
7664
- var R = lu[c];
7666
+ const { Transports: uu } = G;
7667
+ var du = function(u, s, c, f, b, S) {
7668
+ var R = uu[c];
7665
7669
  if (!R)
7666
7670
  throw new Be(c);
7667
7671
  var O = (!u.enabledTransports || oe(u.enabledTransports, s) !== -1) && (!u.disabledTransports || oe(u.disabledTransports, s) === -1), B;
7668
- return O ? (b = Object.assign({ ignoreNullOrigin: u.ignoreNullOrigin }, b), B = new cu(s, f, S ? S.getAssistant(R) : R, b)) : B = du, B;
7669
- }, du = {
7672
+ return O ? (b = Object.assign({ ignoreNullOrigin: u.ignoreNullOrigin }, b), B = new lu(s, f, S ? S.getAssistant(R) : R, b)) : B = pu, B;
7673
+ }, pu = {
7670
7674
  isSupported: function() {
7671
7675
  return !1;
7672
7676
  },
@@ -7683,14 +7687,14 @@ function Lm() {
7683
7687
  };
7684
7688
  }
7685
7689
  };
7686
- function pu(u) {
7690
+ function hu(u) {
7687
7691
  if (u == null)
7688
7692
  throw "You must pass an options object";
7689
7693
  if (u.cluster == null)
7690
7694
  throw "Options object must provide a cluster";
7691
7695
  "disableStats" in u && ue.warn("The disableStats option is deprecated in favor of enableStats");
7692
7696
  }
7693
- const hu = (u, s) => {
7697
+ const fu = (u, s) => {
7694
7698
  var c = "socket_id=" + encodeURIComponent(u.socketId);
7695
7699
  for (var f in s.params)
7696
7700
  c += "&" + encodeURIComponent(f) + "=" + encodeURIComponent(s.params[f]);
@@ -7700,14 +7704,14 @@ function Lm() {
7700
7704
  c += "&" + encodeURIComponent(f) + "=" + encodeURIComponent(b[f]);
7701
7705
  }
7702
7706
  return c;
7703
- }, fu = (u) => {
7707
+ }, gu = (u) => {
7704
7708
  if (typeof G.getAuthorizers()[u.transport] == "undefined")
7705
7709
  throw `'${u.transport}' is not a recognized auth transport`;
7706
7710
  return (s, c) => {
7707
- const f = hu(s, u);
7711
+ const f = fu(s, u);
7708
7712
  G.getAuthorizers()[u.transport](G, f, u, E.UserAuthentication, c);
7709
7713
  };
7710
- }, gu = (u, s) => {
7714
+ }, mu = (u, s) => {
7711
7715
  var c = "socket_id=" + encodeURIComponent(u.socketId);
7712
7716
  c += "&channel_name=" + encodeURIComponent(u.channelName);
7713
7717
  for (var f in s.params)
@@ -7718,14 +7722,14 @@ function Lm() {
7718
7722
  c += "&" + encodeURIComponent(f) + "=" + encodeURIComponent(b[f]);
7719
7723
  }
7720
7724
  return c;
7721
- }, mu = (u) => {
7725
+ }, bu = (u) => {
7722
7726
  if (typeof G.getAuthorizers()[u.transport] == "undefined")
7723
7727
  throw `'${u.transport}' is not a recognized auth transport`;
7724
7728
  return (s, c) => {
7725
- const f = gu(s, u);
7729
+ const f = mu(s, u);
7726
7730
  G.getAuthorizers()[u.transport](G, f, u, E.ChannelAuthorization, c);
7727
7731
  };
7728
- }, bu = (u, s, c) => {
7732
+ }, ku = (u, s, c) => {
7729
7733
  const f = {
7730
7734
  authTransport: s.transport,
7731
7735
  authEndpoint: s.endpoint,
@@ -7752,36 +7756,36 @@ function Lm() {
7752
7756
  wsPath: u.wsPath || m.wsPath,
7753
7757
  wsPort: u.wsPort || m.wsPort,
7754
7758
  wssPort: u.wssPort || m.wssPort,
7755
- enableStats: wu(u),
7756
- httpHost: ku(u),
7757
- useTLS: yu(u),
7758
- wsHost: _u(u),
7759
- userAuthenticator: xu(u),
7760
- channelAuthorizer: Tu(u, s)
7759
+ enableStats: xu(u),
7760
+ httpHost: _u(u),
7761
+ useTLS: wu(u),
7762
+ wsHost: vu(u),
7763
+ userAuthenticator: Su(u),
7764
+ channelAuthorizer: Eu(u, s)
7761
7765
  };
7762
7766
  return "disabledTransports" in u && (c.disabledTransports = u.disabledTransports), "enabledTransports" in u && (c.enabledTransports = u.enabledTransports), "ignoreNullOrigin" in u && (c.ignoreNullOrigin = u.ignoreNullOrigin), "timelineParams" in u && (c.timelineParams = u.timelineParams), "nacl" in u && (c.nacl = u.nacl), c;
7763
7767
  }
7764
- function ku(u) {
7765
- return u.httpHost ? u.httpHost : u.cluster ? `sockjs-${u.cluster}.pusher.com` : m.httpHost;
7766
- }
7767
7768
  function _u(u) {
7768
- return u.wsHost ? u.wsHost : vu(u.cluster);
7769
+ return u.httpHost ? u.httpHost : u.cluster ? `sockjs-${u.cluster}.pusher.com` : m.httpHost;
7769
7770
  }
7770
7771
  function vu(u) {
7771
- return `ws-${u}.pusher.com`;
7772
+ return u.wsHost ? u.wsHost : yu(u.cluster);
7772
7773
  }
7773
7774
  function yu(u) {
7774
- return G.getProtocol() === "https:" ? !0 : u.forceTLS !== !1;
7775
+ return `ws-${u}.pusher.com`;
7775
7776
  }
7776
7777
  function wu(u) {
7778
+ return G.getProtocol() === "https:" ? !0 : u.forceTLS !== !1;
7779
+ }
7780
+ function xu(u) {
7777
7781
  return "enableStats" in u ? u.enableStats : "disableStats" in u ? !u.disableStats : !1;
7778
7782
  }
7779
7783
  const Ci = (u) => "customHandler" in u && u.customHandler != null;
7780
- function xu(u) {
7784
+ function Su(u) {
7781
7785
  const s = Object.assign(Object.assign({}, m.userAuthentication), u.userAuthentication);
7782
- return Ci(s) ? s.customHandler : fu(s);
7786
+ return Ci(s) ? s.customHandler : gu(s);
7783
7787
  }
7784
- function Su(u, s) {
7788
+ function Tu(u, s) {
7785
7789
  let c;
7786
7790
  if ("channelAuthorization" in u)
7787
7791
  c = Object.assign(Object.assign({}, m.channelAuthorization), u.channelAuthorization);
@@ -7790,15 +7794,15 @@ function Lm() {
7790
7794
  endpoint: u.authEndpoint || m.authEndpoint
7791
7795
  }, "auth" in u && ("params" in u.auth && (c.params = u.auth.params), "headers" in u.auth && (c.headers = u.auth.headers)), "authorizer" in u)
7792
7796
  return {
7793
- customHandler: bu(s, c, u.authorizer)
7797
+ customHandler: ku(s, c, u.authorizer)
7794
7798
  };
7795
7799
  return c;
7796
7800
  }
7797
- function Tu(u, s) {
7798
- const c = Su(u, s);
7799
- return Ci(c) ? c.customHandler : mu(c);
7801
+ function Eu(u, s) {
7802
+ const c = Tu(u, s);
7803
+ return Ci(c) ? c.customHandler : bu(c);
7800
7804
  }
7801
- class Eu extends Tt {
7805
+ class Au extends Tt {
7802
7806
  constructor(s) {
7803
7807
  super(function(c, f) {
7804
7808
  ue.debug(`No callbacks on watchlist events for ${c}`);
@@ -7816,14 +7820,14 @@ function Lm() {
7816
7820
  });
7817
7821
  }
7818
7822
  }
7819
- function Au() {
7823
+ function Cu() {
7820
7824
  let u, s;
7821
7825
  return { promise: new Promise((f, b) => {
7822
7826
  u = f, s = b;
7823
7827
  }), resolve: u, reject: s };
7824
7828
  }
7825
- const Cu = Au;
7826
- class Pu extends Tt {
7829
+ const Pu = Cu;
7830
+ class Ru extends Tt {
7827
7831
  constructor(s) {
7828
7832
  super(function(c, f) {
7829
7833
  ue.debug("No callbacks on user for " + c);
@@ -7838,7 +7842,7 @@ function Lm() {
7838
7842
  });
7839
7843
  }, this.pusher = s, this.pusher.connection.bind("state_change", ({ previous: c, current: f }) => {
7840
7844
  c !== "connected" && f === "connected" && this._signin(), c === "connected" && f !== "connected" && (this._cleanup(), this._newSigninPromiseIfNeeded());
7841
- }), this.watchlist = new Eu(s), this.pusher.connection.bind("message", (c) => {
7845
+ }), this.watchlist = new Au(s), this.pusher.connection.bind("message", (c) => {
7842
7846
  var f = c.event;
7843
7847
  f === "pusher:signin_success" && this._onSigninSuccess(c.data), this.serverToUserChannel && this.serverToUserChannel.name === c.channel && this.serverToUserChannel.handleEvent(c);
7844
7848
  });
@@ -7878,7 +7882,7 @@ function Lm() {
7878
7882
  _newSigninPromiseIfNeeded() {
7879
7883
  if (!this.signin_requested || this.signinDonePromise && !this.signinDonePromise.done)
7880
7884
  return;
7881
- const { promise: s, resolve: c } = Cu();
7885
+ const { promise: s, resolve: c } = Pu();
7882
7886
  s.done = !1;
7883
7887
  const f = () => {
7884
7888
  s.done = !0;
@@ -7898,7 +7902,7 @@ function Lm() {
7898
7902
  }));
7899
7903
  }
7900
7904
  constructor(s, c) {
7901
- Ru(s), pu(c), this.key = s, this.options = c, this.config = Ai(this.options, this), this.channels = Wt.createChannels(), this.global_emitter = new Tt(), this.sessionID = G.randomInt(1e9), this.timeline = new au(this.key, this.sessionID, {
7905
+ Lu(s), hu(c), this.key = s, this.options = c, this.config = Ai(this.options, this), this.channels = Wt.createChannels(), this.global_emitter = new Tt(), this.sessionID = G.randomInt(1e9), this.timeline = new cu(this.key, this.sessionID, {
7902
7906
  cluster: this.config.cluster,
7903
7907
  features: Ze.getClientFeatures(),
7904
7908
  params: this.config.timelineParams || {},
@@ -7909,7 +7913,7 @@ function Lm() {
7909
7913
  host: this.config.statsHost,
7910
7914
  path: "/timeline/v2/" + G.TimelineTransport.name
7911
7915
  }));
7912
- var f = (b) => G.getDefaultStrategy(this.config, b, uu);
7916
+ var f = (b) => G.getDefaultStrategy(this.config, b, du);
7913
7917
  this.connection = Wt.createConnectionManager(this.key, {
7914
7918
  getStrategy: f,
7915
7919
  timeline: this.timeline,
@@ -7932,7 +7936,7 @@ function Lm() {
7932
7936
  this.channels.disconnect();
7933
7937
  }), this.connection.bind("error", (b) => {
7934
7938
  ue.warn(b);
7935
- }), Ze.instances.push(this), this.timeline.info({ instances: Ze.instances.length }), this.user = new Pu(this), Ze.isReady && this.connect();
7939
+ }), Ze.instances.push(this), this.timeline.info({ instances: Ze.instances.length }), this.user = new Ru(this), Ze.isReady && this.connect();
7936
7940
  }
7937
7941
  switchCluster(s) {
7938
7942
  const { appKey: c, cluster: f } = s;
@@ -7995,7 +7999,7 @@ function Lm() {
7995
7999
  }
7996
8000
  Ze.instances = [], Ze.isReady = !1, Ze.logToConsole = !1, Ze.Runtime = G, Ze.ScriptReceivers = G.ScriptReceivers, Ze.DependenciesReceivers = G.DependenciesReceivers, Ze.auth_callbacks = G.auth_callbacks;
7997
8001
  const so = Ze;
7998
- function Ru(u) {
8002
+ function Lu(u) {
7999
8003
  if (u == null)
8000
8004
  throw "You must pass your app key when you instantiate Pusher.";
8001
8005
  }
@@ -8028,10 +8032,10 @@ function Lm() {
8028
8032
  ));
8029
8033
  })(vs)), vs.exports;
8030
8034
  }
8031
- var zm = Lm();
8032
- const Im = /* @__PURE__ */ Rm(zm);
8035
+ var $m = Im();
8036
+ const Om = /* @__PURE__ */ zm($m);
8033
8037
  let zt = null, Hn = null;
8034
- function $m(e) {
8038
+ function Nm(e) {
8035
8039
  return z(this, null, function* () {
8036
8040
  return Hn || (Hn = z(null, null, function* () {
8037
8041
  const t = e.backendUrl.replace(/\/+$/, ""), n = yield Mo(`${t}/api/settings`, {
@@ -8039,7 +8043,7 @@ function $m(e) {
8039
8043
  });
8040
8044
  if (!n.ok) throw new Error(`Failed to fetch settings: HTTP ${n.status}`);
8041
8045
  const r = yield n.json();
8042
- zt = new Im(r.pusher.key, {
8046
+ zt = new Om(r.pusher.key, {
8043
8047
  cluster: r.pusher.cluster || "local",
8044
8048
  forceTLS: !0,
8045
8049
  wsHost: r.pusher.wsHost || void 0,
@@ -8064,7 +8068,7 @@ function $m(e) {
8064
8068
  }), Hn);
8065
8069
  });
8066
8070
  }
8067
- function Om(e) {
8071
+ function Dm(e) {
8068
8072
  if (!e || !zt) return null;
8069
8073
  let t = !1;
8070
8074
  const n = ({ current: r }) => {
@@ -8072,20 +8076,20 @@ function Om(e) {
8072
8076
  };
8073
8077
  return zt.connection.bind("state_change", n), () => zt == null ? void 0 : zt.connection.unbind("state_change", n);
8074
8078
  }
8075
- function Nm(e, t, n) {
8079
+ function Mm(e, t, n) {
8076
8080
  return z(this, null, function* () {
8077
- if (yield $m(e), !zt) return () => {
8081
+ if (yield Nm(e), !zt) return () => {
8078
8082
  };
8079
8083
  const r = zt.subscribe(`private-task-${t}`);
8080
8084
  n.onStatusUpdate && r.bind(co.TASK_STATUS_UPDATED, n.onStatusUpdate), n.onInteractionCreated && r.bind(co.TASK_INTERACTION_CREATED, n.onInteractionCreated), n.onInteractionAnswered && r.bind(co.TASK_INTERACTION_ANSWERED, n.onInteractionAnswered), n.onBrowserCommandCreated && r.bind(co.TASK_BROWSER_COMMAND_CREATED, n.onBrowserCommandCreated);
8081
- const o = Om(n.onReconnect);
8085
+ const o = Dm(n.onReconnect);
8082
8086
  return () => {
8083
8087
  r.unbind_all(), zt == null || zt.unsubscribe(`private-task-${t}`), o == null || o();
8084
8088
  };
8085
8089
  });
8086
8090
  }
8087
8091
  const ei = "ap-sdk-active-automation";
8088
- function Dm() {
8092
+ function jm() {
8089
8093
  try {
8090
8094
  const e = sessionStorage.getItem(ei);
8091
8095
  if (!e) return null;
@@ -8095,19 +8099,19 @@ function Dm() {
8095
8099
  return null;
8096
8100
  }
8097
8101
  }
8098
- function Mc(e) {
8102
+ function jc(e) {
8099
8103
  try {
8100
8104
  sessionStorage.setItem(ei, JSON.stringify(e));
8101
8105
  } catch (t) {
8102
8106
  }
8103
8107
  }
8104
- function jc() {
8108
+ function Uc() {
8105
8109
  try {
8106
8110
  sessionStorage.removeItem(ei);
8107
8111
  } catch (e) {
8108
8112
  }
8109
8113
  }
8110
- function Mm(e) {
8114
+ function Um(e) {
8111
8115
  return z(this, null, function* () {
8112
8116
  var i;
8113
8117
  try {
@@ -8116,20 +8120,20 @@ function Mm(e) {
8116
8120
  }
8117
8121
  e.scrollIntoView({ block: "center", inline: "center", behavior: "instant" });
8118
8122
  let t = e.getBoundingClientRect();
8119
- t.width === 0 && t.height === 0 && (yield jm(), t = e.getBoundingClientRect());
8123
+ t.width === 0 && t.height === 0 && (yield Zm(), t = e.getBoundingClientRect());
8120
8124
  const n = t.left + t.width / 2, r = t.top + t.height / 2, o = { bubbles: !0, cancelable: !0, clientX: n, clientY: r };
8121
8125
  typeof PointerEvent == "function" && e.dispatchEvent(new PointerEvent("pointerdown", o)), e.dispatchEvent(new MouseEvent("mousedown", o)), typeof PointerEvent == "function" && e.dispatchEvent(new PointerEvent("pointerup", o)), e.dispatchEvent(new MouseEvent("mouseup", o)), e.click();
8122
8126
  });
8123
8127
  }
8124
- function jm() {
8128
+ function Zm() {
8125
8129
  return new Promise((e) => {
8126
8130
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => e()) : setTimeout(e, 16);
8127
8131
  });
8128
8132
  }
8129
- const ti = "shared", Uc = "ap-sdk-panel-size:", ba = 280, ka = 200;
8130
- function Um(e) {
8133
+ const ti = "shared", Zc = "ap-sdk-panel-size:", ba = 280, ka = 200;
8134
+ function qm(e) {
8131
8135
  try {
8132
- const t = sessionStorage.getItem(Uc + e);
8136
+ const t = sessionStorage.getItem(Zc + e);
8133
8137
  if (!t) return null;
8134
8138
  const n = JSON.parse(t);
8135
8139
  return typeof (n == null ? void 0 : n.width) == "number" && typeof (n == null ? void 0 : n.height) == "number" ? n : null;
@@ -8137,9 +8141,9 @@ function Um(e) {
8137
8141
  return null;
8138
8142
  }
8139
8143
  }
8140
- function Zm(e, t) {
8144
+ function Hm(e, t) {
8141
8145
  try {
8142
- sessionStorage.setItem(Uc + e, JSON.stringify(t));
8146
+ sessionStorage.setItem(Zc + e, JSON.stringify(t));
8143
8147
  } catch (n) {
8144
8148
  }
8145
8149
  }
@@ -8153,7 +8157,7 @@ function va() {
8153
8157
  return window.innerHeight - 64;
8154
8158
  }
8155
8159
  function ni(e, t) {
8156
- const n = Um(t);
8160
+ const n = qm(t);
8157
8161
  n && (e.style.width = `${ho(n.width, ba, _a())}px`, e.style.height = `${ho(n.height, ka, va())}px`);
8158
8162
  const r = document.createElement("div");
8159
8163
  r.className = "ap-sdk-resize-handle", r.setAttribute("data-ap-sdk", "1"), e.appendChild(r);
@@ -8161,7 +8165,7 @@ function ni(e, t) {
8161
8165
  const g = (k) => {
8162
8166
  o && (p = ho(d + (k.clientX - i), ba, _a()), h = ho(l + (k.clientY - a), ka, va()), e.style.width = `${p}px`, e.style.height = `${h}px`);
8163
8167
  }, m = () => {
8164
- o && (o = !1, document.removeEventListener("pointermove", g), document.removeEventListener("pointerup", m), Zm(t, { width: p, height: h }));
8168
+ o && (o = !1, document.removeEventListener("pointermove", g), document.removeEventListener("pointerup", m), Hm(t, { width: p, height: h }));
8165
8169
  };
8166
8170
  r.addEventListener("pointerdown", (k) => {
8167
8171
  k.preventDefault(), k.stopPropagation(), o = !0, i = k.clientX, a = k.clientY;
@@ -8173,7 +8177,7 @@ function ri() {
8173
8177
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
8174
8178
  }
8175
8179
  var Dn = ri();
8176
- function Zc(e) {
8180
+ function qc(e) {
8177
8181
  Dn = e;
8178
8182
  }
8179
8183
  var An = { exec: () => null };
@@ -8191,14 +8195,14 @@ function Y(e, t = "") {
8191
8195
  }, getRegex: () => new RegExp(n, t) };
8192
8196
  return r;
8193
8197
  }
8194
- var qm = ((e = "") => {
8198
+ var Fm = ((e = "") => {
8195
8199
  try {
8196
8200
  return !!new RegExp("(?<=1)(?<!1)" + e);
8197
8201
  } catch (t) {
8198
8202
  return !1;
8199
8203
  }
8200
- })(), Ve = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: Fn((e) => new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: Fn((e) => new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: Fn((e) => new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)), headingBeginRegex: Fn((e) => new RegExp(`^ {0,${e}}#`)), htmlBeginRegex: Fn((e) => new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: Fn((e) => new RegExp(`^ {0,${e}}>`)) }, Hm = /^(?:[ \t]*(?:\n|$))+/, Fm = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Bm = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Fr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Gm = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, oi = / {0,3}(?:[*+-]|\d{1,9}[.)])/, qc = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Hc = Y(qc).replace(/bull/g, oi).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Wm = Y(qc).replace(/bull/g, oi).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), si = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Jm = /^[^\n]+/, ii = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Vm = Y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ii).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ym = Y(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, oi).getRegex(), ns = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", ai = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Xm = Y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", ai).replace("tag", ns).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Fc = (e) => Y(si).replace("hr", Fr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ns).getRegex(), Km = Fc(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Qm = Fc(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), eb = Y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Qm).getRegex(), ci = { blockquote: eb, code: Fm, def: Vm, fences: Bm, heading: Gm, hr: Fr, html: Xm, lheading: Hc, list: Ym, newline: Hm, paragraph: Km, table: An, text: Jm }, ya = Y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Fr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ns).getRegex(), tb = D(y({}, ci), { lheading: Wm, table: ya, paragraph: Y(si).replace("hr", Fr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ya).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ns).getRegex() }), nb = D(y({}, ci), { html: Y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ai).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: An, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: Y(si).replace("hr", Fr).replace("heading", ` *#{1,6} *[^
8201
- ]`).replace("lheading", Hc).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }), rb = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ob = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Bc = /^( {2,}|\\)\n(?!\s*$)/, sb = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, tn = /[\p{P}\p{S}]/u, pr = /[\s\p{P}\p{S}]/u, Br = /[^\s\p{P}\p{S}]/u, ib = Y(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, pr).getRegex(), ab = /[\p{Pi}\p{Ps}"']/u, Gc = /(?!~)[\p{P}\p{S}]/u, cb = /(?!~)[\s\p{P}\p{S}]/u, lb = /(?:[^\s\p{P}\p{S}]|~)/u, ub = Y(/link|precode-code|html/, "g").replace("link", new RegExp("\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("precode-", qm ? "(?<!`)()" : "(^^|[^`])").replace("code", new RegExp("(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html", /<(?! )[^<>]*?>/).getRegex(), Wc = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, db = Y(Wc, "u").replace(/punct/g, tn).getRegex(), pb = Y(Wc, "u").replace(/punct/g, Gc).getRegex(), hb = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, fb = Y(hb, "u").replace(/openQuote/g, ab).replace(/punct/g, tn).getRegex(), Jc = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", gb = Y(Jc, "gu").replace(/notPunctSpace/g, Br).replace(/punctSpace/g, pr).replace(/punct/g, tn).getRegex(), mb = Y(Jc, "gu").replace(/notPunctSpace/g, lb).replace(/punctSpace/g, cb).replace(/punct/g, Gc).getRegex(), bb = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", kb = Y(bb, "gu").replace(/notPunctSpace/g, Br).replace(/punctSpace/g, pr).replace(/punct/g, tn).getRegex(), _b = Y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Br).replace(/punctSpace/g, pr).replace(/punct/g, tn).getRegex(), vb = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", yb = Y(vb, "gu").replace(/notPunctSpace/g, Br).replace(/punctSpace/g, pr).replace(/punct/g, tn).getRegex(), wb = Y(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, tn).getRegex(), xb = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Sb = Y(xb, "gu").replace(/notPunctSpace/g, Br).replace(/punctSpace/g, pr).replace(/punct/g, tn).getRegex(), Tb = Y(/\\(punct)/, "gu").replace(/punct/g, tn).getRegex(), Eb = Y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ab = Y(ai).replace("(?:-->|$)", "-->").getRegex(), Cb = Y("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ab).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Uo = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Pb = Y(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Uo).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Vc = Y(/^!?\[(label)\]\[(ref)\]/).replace("label", Uo).replace("ref", ii).getRegex(), Yc = Y(/^!?\[(ref)\](?:\[\])?/).replace("ref", ii).getRegex(), Rb = Y("reflink|nolink(?!\\()", "g").replace("reflink", Vc).replace("nolink", Yc).getRegex(), wa = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, li = { _backpedal: An, anyPunctuation: Tb, autolink: Eb, blockSkip: ub, br: Bc, code: ob, del: An, delLDelim: An, delRDelim: An, emStrongLDelim: db, emStrongRDelimAst: gb, emStrongRDelimUnd: _b, escape: rb, link: Pb, nolink: Yc, punctuation: ib, reflink: Vc, reflinkSearch: Rb, tag: Cb, text: sb, url: An }, Lb = D(y({}, li), { emStrongLDelim: fb, emStrongRDelimAst: kb, emStrongRDelimUnd: yb, link: Y(/^!?\[(label)\]\((.*?)\)/).replace("label", Uo).getRegex(), reflink: Y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Uo).getRegex() }), Ns = D(y({}, li), { emStrongRDelimAst: mb, emStrongLDelim: pb, delLDelim: wb, delRDelim: Sb, url: Y(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", wa).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: Y(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", wa).getRegex() }), zb = D(y({}, Ns), { br: Y(Bc).replace("{2,}", "*").getRegex(), text: Y(Ns.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }), fo = { normal: ci, gfm: tb, pedantic: nb }, Er = { normal: li, gfm: Ns, breaks: zb, pedantic: Lb }, Ib = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, xa = (e) => Ib[e];
8204
+ })(), Ve = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: Fn((e) => new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: Fn((e) => new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: Fn((e) => new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)), headingBeginRegex: Fn((e) => new RegExp(`^ {0,${e}}#`)), htmlBeginRegex: Fn((e) => new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: Fn((e) => new RegExp(`^ {0,${e}}>`)) }, Bm = /^(?:[ \t]*(?:\n|$))+/, Gm = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Wm = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Fr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Jm = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, oi = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Hc = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Fc = Y(Hc).replace(/bull/g, oi).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Vm = Y(Hc).replace(/bull/g, oi).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), si = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Ym = /^[^\n]+/, ii = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Xm = Y(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ii).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Km = Y(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, oi).getRegex(), ns = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", ai = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Qm = Y("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", ai).replace("tag", ns).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Bc = (e) => Y(si).replace("hr", Fr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", e).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ns).getRegex(), eb = Bc(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), tb = Bc(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), nb = Y(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", tb).getRegex(), ci = { blockquote: nb, code: Gm, def: Xm, fences: Wm, heading: Jm, hr: Fr, html: Qm, lheading: Fc, list: Km, newline: Bm, paragraph: eb, table: An, text: Ym }, ya = Y("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Fr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ns).getRegex(), rb = D(y({}, ci), { lheading: Vm, table: ya, paragraph: Y(si).replace("hr", Fr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ya).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", ns).getRegex() }), ob = D(y({}, ci), { html: Y(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ai).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: An, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: Y(si).replace("hr", Fr).replace("heading", ` *#{1,6} *[^
8205
+ ]`).replace("lheading", Fc).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }), sb = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ib = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Gc = /^( {2,}|\\)\n(?!\s*$)/, ab = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, tn = /[\p{P}\p{S}]/u, pr = /[\s\p{P}\p{S}]/u, Br = /[^\s\p{P}\p{S}]/u, cb = Y(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, pr).getRegex(), lb = /[\p{Pi}\p{Ps}"']/u, Wc = /(?!~)[\p{P}\p{S}]/u, ub = /(?!~)[\s\p{P}\p{S}]/u, db = /(?:[^\s\p{P}\p{S}]|~)/u, pb = Y(/link|precode-code|html/, "g").replace("link", new RegExp("\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("precode-", Fm ? "(?<!`)()" : "(^^|[^`])").replace("code", new RegExp("(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html", /<(?! )[^<>]*?>/).getRegex(), Jc = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, hb = Y(Jc, "u").replace(/punct/g, tn).getRegex(), fb = Y(Jc, "u").replace(/punct/g, Wc).getRegex(), gb = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, mb = Y(gb, "u").replace(/openQuote/g, lb).replace(/punct/g, tn).getRegex(), Vc = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", bb = Y(Vc, "gu").replace(/notPunctSpace/g, Br).replace(/punctSpace/g, pr).replace(/punct/g, tn).getRegex(), kb = Y(Vc, "gu").replace(/notPunctSpace/g, db).replace(/punctSpace/g, ub).replace(/punct/g, Wc).getRegex(), _b = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", vb = Y(_b, "gu").replace(/notPunctSpace/g, Br).replace(/punctSpace/g, pr).replace(/punct/g, tn).getRegex(), yb = Y("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Br).replace(/punctSpace/g, pr).replace(/punct/g, tn).getRegex(), wb = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", xb = Y(wb, "gu").replace(/notPunctSpace/g, Br).replace(/punctSpace/g, pr).replace(/punct/g, tn).getRegex(), Sb = Y(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, tn).getRegex(), Tb = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", Eb = Y(Tb, "gu").replace(/notPunctSpace/g, Br).replace(/punctSpace/g, pr).replace(/punct/g, tn).getRegex(), Ab = Y(/\\(punct)/, "gu").replace(/punct/g, tn).getRegex(), Cb = Y(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Pb = Y(ai).replace("(?:-->|$)", "-->").getRegex(), Rb = Y("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Pb).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Uo = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Lb = Y(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Uo).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Yc = Y(/^!?\[(label)\]\[(ref)\]/).replace("label", Uo).replace("ref", ii).getRegex(), Xc = Y(/^!?\[(ref)\](?:\[\])?/).replace("ref", ii).getRegex(), zb = Y("reflink|nolink(?!\\()", "g").replace("reflink", Yc).replace("nolink", Xc).getRegex(), wa = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, li = { _backpedal: An, anyPunctuation: Ab, autolink: Cb, blockSkip: pb, br: Gc, code: ib, del: An, delLDelim: An, delRDelim: An, emStrongLDelim: hb, emStrongRDelimAst: bb, emStrongRDelimUnd: yb, escape: sb, link: Lb, nolink: Xc, punctuation: cb, reflink: Yc, reflinkSearch: zb, tag: Rb, text: ab, url: An }, Ib = D(y({}, li), { emStrongLDelim: mb, emStrongRDelimAst: vb, emStrongRDelimUnd: xb, link: Y(/^!?\[(label)\]\((.*?)\)/).replace("label", Uo).getRegex(), reflink: Y(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Uo).getRegex() }), Ns = D(y({}, li), { emStrongRDelimAst: kb, emStrongLDelim: fb, delLDelim: Sb, delRDelim: Eb, url: Y(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", wa).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: Y(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", wa).getRegex() }), $b = D(y({}, Ns), { br: Y(Gc).replace("{2,}", "*").getRegex(), text: Y(Ns.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }), fo = { normal: ci, gfm: rb, pedantic: ob }, Er = { normal: li, gfm: Ns, breaks: $b, pedantic: Ib }, Ob = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, xa = (e) => Ob[e];
8202
8206
  function Nt(e, t) {
8203
8207
  if (t) {
8204
8208
  if (Ve.escapeTest.test(e)) return e.replace(Ve.escapeReplace, xa);
@@ -8240,7 +8244,7 @@ function Ea(e) {
8240
8244
  return t.length - n <= 2 ? e : t.slice(0, n + 1).join(`
8241
8245
  `);
8242
8246
  }
8243
- function $b(e, t) {
8247
+ function Nb(e, t) {
8244
8248
  if (e.indexOf(t[1]) === -1) return -1;
8245
8249
  let n = 0;
8246
8250
  for (let r = 0; r < e.length; r++) if (e[r] === "\\") r++;
@@ -8248,7 +8252,7 @@ function $b(e, t) {
8248
8252
  else if (e[r] === t[1] && (n--, n < 0)) return r;
8249
8253
  return n > 0 ? -2 : -1;
8250
8254
  }
8251
- function Ob(e, t = 0) {
8255
+ function Db(e, t = 0) {
8252
8256
  let n = t, r = "";
8253
8257
  for (let o of e) if (o === " ") {
8254
8258
  let i = 4 - n % 4;
@@ -8262,7 +8266,7 @@ function Aa(e, t, n, r, o) {
8262
8266
  let l = { type: e[0].charAt(0) === "!" ? "image" : "link", raw: n, href: i, title: a, text: d, tokens: r.inlineTokens(d) };
8263
8267
  return r.state.inLink = !1, l;
8264
8268
  }
8265
- function Nb(e, t, n) {
8269
+ function Mb(e, t, n) {
8266
8270
  let r = e.match(n.other.indentCodeCompensation);
8267
8271
  if (r === null) return t;
8268
8272
  let o = r[1];
@@ -8296,7 +8300,7 @@ var Zo = class {
8296
8300
  fences(e) {
8297
8301
  let t = this.rules.block.fences.exec(e);
8298
8302
  if (t) {
8299
- let n = t[0], r = Nb(n, t[3] || "", this.rules);
8303
+ let n = t[0], r = Mb(n, t[3] || "", this.rules);
8300
8304
  return { type: "code", raw: n, lang: t[2] ? t[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t[2], text: r };
8301
8305
  }
8302
8306
  }
@@ -8368,7 +8372,7 @@ ${w}`, o = o.substring(0, o.length - k.text.length) + Z.text;
8368
8372
  let l = !1, p = "", h = "";
8369
8373
  if (!(t = i.exec(e)) || this.rules.block.hr.test(e)) break;
8370
8374
  p = t[0], e = e.substring(p.length);
8371
- let g = Ob(t[2].split(`
8375
+ let g = Db(t[2].split(`
8372
8376
  `, 1)[0], t[1].length), m = e.split(`
8373
8377
  `, 1)[0], k = !g.trim(), w = 0;
8374
8378
  if (this.options.pedantic ? (w = 2, h = g.trimStart()) : k ? w = t[1].length + 1 : (w = g.search(this.rules.other.nonSpaceChar), w = w > 4 ? 1 : w, h = g.slice(w), w += t[1].length), k && this.rules.other.blankLine.test(m) && (p += m + `
@@ -8488,7 +8492,7 @@ ${w}`, o = o.substring(0, o.length - k.text.length) + Z.text;
8488
8492
  let i = un(n.slice(0, -1), "\\");
8489
8493
  if ((n.length - i.length) % 2 === 0) return;
8490
8494
  } else {
8491
- let i = $b(t[2], "()");
8495
+ let i = Nb(t[2], "()");
8492
8496
  if (i === -2) return;
8493
8497
  if (i > -1) {
8494
8498
  let a = (t[0].indexOf("!") === 0 ? 5 : 4) + t[1].length + i;
@@ -9147,7 +9151,7 @@ ${e}</tr>
9147
9151
  provideParser(e = this.block) {
9148
9152
  return e ? Lt.parse : Lt.parseInline;
9149
9153
  }
9150
- }, ie(_o, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), ie(_o, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _o), Db = class {
9154
+ }, ie(_o, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), ie(_o, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), _o), jb = class {
9151
9155
  constructor(...e) {
9152
9156
  ie(this, "defaults", ri());
9153
9157
  ie(this, "options", this.setOptions);
@@ -9308,19 +9312,19 @@ Please report this to https://github.com/markedjs/marked.`, e) {
9308
9312
  throw n;
9309
9313
  };
9310
9314
  }
9311
- }, In = new Db();
9315
+ }, In = new jb();
9312
9316
  function ce(e, t) {
9313
9317
  return In.parse(e, t);
9314
9318
  }
9315
9319
  ce.options = ce.setOptions = function(e) {
9316
- return In.setOptions(e), ce.defaults = In.defaults, Zc(ce.defaults), ce;
9320
+ return In.setOptions(e), ce.defaults = In.defaults, qc(ce.defaults), ce;
9317
9321
  };
9318
9322
  ce.getDefaults = ri;
9319
9323
  ce.defaults = Dn;
9320
- function Mb(...e) {
9321
- return In.use(...e), ce.defaults = In.defaults, Zc(ce.defaults), ce;
9324
+ function Ub(...e) {
9325
+ return In.use(...e), ce.defaults = In.defaults, qc(ce.defaults), ce;
9322
9326
  }
9323
- ce.use = Mb;
9327
+ ce.use = Ub;
9324
9328
  ce.walkTokens = function(e, t) {
9325
9329
  return In.walkTokens(e, t);
9326
9330
  };
@@ -9342,11 +9346,11 @@ Lt.parse;
9342
9346
  Rt.lex;
9343
9347
  /*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE */
9344
9348
  const {
9345
- entries: Xc,
9349
+ entries: Kc,
9346
9350
  setPrototypeOf: Ca,
9347
- isFrozen: jb,
9348
- getPrototypeOf: Ub,
9349
- getOwnPropertyDescriptor: Zb
9351
+ isFrozen: Zb,
9352
+ getPrototypeOf: qb,
9353
+ getOwnPropertyDescriptor: Hb
9350
9354
  } = Object;
9351
9355
  let {
9352
9356
  freeze: nt,
@@ -9372,7 +9376,7 @@ Zs || (Zs = function(t) {
9372
9376
  r[o - 1] = arguments[o];
9373
9377
  return new t(...r);
9374
9378
  });
9375
- const go = rt(Array.prototype.forEach), qb = rt(Array.prototype.lastIndexOf), Pa = rt(Array.prototype.pop), Ar = rt(Array.prototype.push), Hb = rt(Array.prototype.splice), wo = rt(String.prototype.toLowerCase), ys = rt(String.prototype.toString), ws = rt(String.prototype.match), Cr = rt(String.prototype.replace), Fb = rt(String.prototype.indexOf), Bb = rt(String.prototype.trim), Ct = rt(Object.prototype.hasOwnProperty), Xe = rt(RegExp.prototype.test), Pr = Gb(TypeError);
9379
+ const go = rt(Array.prototype.forEach), Fb = rt(Array.prototype.lastIndexOf), Pa = rt(Array.prototype.pop), Ar = rt(Array.prototype.push), Bb = rt(Array.prototype.splice), wo = rt(String.prototype.toLowerCase), ys = rt(String.prototype.toString), ws = rt(String.prototype.match), Cr = rt(String.prototype.replace), Gb = rt(String.prototype.indexOf), Wb = rt(String.prototype.trim), Ct = rt(Object.prototype.hasOwnProperty), Xe = rt(RegExp.prototype.test), Pr = Jb(TypeError);
9376
9380
  function rt(e) {
9377
9381
  return function(t) {
9378
9382
  t instanceof RegExp && (t.lastIndex = 0);
@@ -9381,7 +9385,7 @@ function rt(e) {
9381
9385
  return Us(e, t, r);
9382
9386
  };
9383
9387
  }
9384
- function Gb(e) {
9388
+ function Jb(e) {
9385
9389
  return function() {
9386
9390
  for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++)
9387
9391
  n[r] = arguments[r];
@@ -9396,58 +9400,58 @@ function V(e, t) {
9396
9400
  let o = t[r];
9397
9401
  if (typeof o == "string") {
9398
9402
  const i = n(o);
9399
- i !== o && (jb(t) || (t[r] = i), o = i);
9403
+ i !== o && (Zb(t) || (t[r] = i), o = i);
9400
9404
  }
9401
9405
  e[o] = !0;
9402
9406
  }
9403
9407
  return e;
9404
9408
  }
9405
- function Wb(e) {
9409
+ function Vb(e) {
9406
9410
  for (let t = 0; t < e.length; t++)
9407
9411
  Ct(e, t) || (e[t] = null);
9408
9412
  return e;
9409
9413
  }
9410
9414
  function Dt(e) {
9411
9415
  const t = js(null);
9412
- for (const [n, r] of Xc(e))
9413
- Ct(e, n) && (Array.isArray(r) ? t[n] = Wb(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = Dt(r) : t[n] = r);
9416
+ for (const [n, r] of Kc(e))
9417
+ Ct(e, n) && (Array.isArray(r) ? t[n] = Vb(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = Dt(r) : t[n] = r);
9414
9418
  return t;
9415
9419
  }
9416
9420
  function Rr(e, t) {
9417
9421
  for (; e !== null; ) {
9418
- const r = Zb(e, t);
9422
+ const r = Hb(e, t);
9419
9423
  if (r) {
9420
9424
  if (r.get)
9421
9425
  return rt(r.get);
9422
9426
  if (typeof r.value == "function")
9423
9427
  return rt(r.value);
9424
9428
  }
9425
- e = Ub(e);
9429
+ e = qb(e);
9426
9430
  }
9427
9431
  function n() {
9428
9432
  return null;
9429
9433
  }
9430
9434
  return n;
9431
9435
  }
9432
- const Ra = nt(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), xs = nt(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ss = nt(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Jb = nt(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ts = nt(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Vb = nt(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), La = nt(["#text"]), za = nt(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Es = nt(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ia = nt(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), mo = nt(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Yb = kt(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Xb = kt(/<%[\w\W]*|[\w\W]*%>/gm), Kb = kt(/\$\{[\w\W]*/gm), Qb = kt(/^data-[\-\w.\u00B7-\uFFFF]+$/), ek = kt(/^aria-[\-\w]+$/), Kc = kt(
9436
+ const Ra = nt(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), xs = nt(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ss = nt(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Yb = nt(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ts = nt(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Xb = nt(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), La = nt(["#text"]), za = nt(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Es = nt(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Ia = nt(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), mo = nt(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Kb = kt(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Qb = kt(/<%[\w\W]*|[\w\W]*%>/gm), ek = kt(/\$\{[\w\W]*/gm), tk = kt(/^data-[\-\w.\u00B7-\uFFFF]+$/), nk = kt(/^aria-[\-\w]+$/), Qc = kt(
9433
9437
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
9434
9438
  // eslint-disable-line no-useless-escape
9435
- ), tk = kt(/^(?:\w+script|data):/i), nk = kt(
9439
+ ), rk = kt(/^(?:\w+script|data):/i), ok = kt(
9436
9440
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
9437
9441
  // eslint-disable-line no-control-regex
9438
- ), Qc = kt(/^html$/i), rk = kt(/^[a-z][.\w]*(-[.\w]+)+$/i);
9442
+ ), el = kt(/^html$/i), sk = kt(/^[a-z][.\w]*(-[.\w]+)+$/i);
9439
9443
  var $a = /* @__PURE__ */ Object.freeze({
9440
9444
  __proto__: null,
9441
- ARIA_ATTR: ek,
9442
- ATTR_WHITESPACE: nk,
9443
- CUSTOM_ELEMENT: rk,
9444
- DATA_ATTR: Qb,
9445
- DOCTYPE_NAME: Qc,
9446
- ERB_EXPR: Xb,
9447
- IS_ALLOWED_URI: Kc,
9448
- IS_SCRIPT_OR_DATA: tk,
9449
- MUSTACHE_EXPR: Yb,
9450
- TMPLIT_EXPR: Kb
9445
+ ARIA_ATTR: nk,
9446
+ ATTR_WHITESPACE: ok,
9447
+ CUSTOM_ELEMENT: sk,
9448
+ DATA_ATTR: tk,
9449
+ DOCTYPE_NAME: el,
9450
+ ERB_EXPR: Qb,
9451
+ IS_ALLOWED_URI: Qc,
9452
+ IS_SCRIPT_OR_DATA: rk,
9453
+ MUSTACHE_EXPR: Kb,
9454
+ TMPLIT_EXPR: ek
9451
9455
  });
9452
9456
  const Lr = {
9453
9457
  element: 1,
@@ -9456,9 +9460,9 @@ const Lr = {
9456
9460
  progressingInstruction: 7,
9457
9461
  comment: 8,
9458
9462
  document: 9
9459
- }, ok = function() {
9463
+ }, ik = function() {
9460
9464
  return typeof window == "undefined" ? null : window;
9461
- }, sk = function(t, n) {
9465
+ }, ak = function(t, n) {
9462
9466
  if (typeof t != "object" || typeof t.createPolicy != "function")
9463
9467
  return null;
9464
9468
  let r = null;
@@ -9490,9 +9494,9 @@ const Lr = {
9490
9494
  uponSanitizeShadowNode: []
9491
9495
  };
9492
9496
  };
9493
- function el() {
9494
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ok();
9495
- const t = (j) => el(j);
9497
+ function tl() {
9498
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ik();
9499
+ const t = (j) => tl(j);
9496
9500
  if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== Lr.document || !e.Element)
9497
9501
  return t.isSupported = !1, t;
9498
9502
  let {
@@ -9523,7 +9527,7 @@ function el() {
9523
9527
  importNode: Be
9524
9528
  } = r;
9525
9529
  let te = Oa();
9526
- t.isSupported = typeof Xc == "function" && typeof E == "function" && N && N.createHTMLDocument !== void 0;
9530
+ t.isSupported = typeof Kc == "function" && typeof E == "function" && N && N.createHTMLDocument !== void 0;
9527
9531
  const {
9528
9532
  MUSTACHE_EXPR: we,
9529
9533
  ERB_EXPR: ot,
@@ -9595,17 +9599,17 @@ function el() {
9595
9599
  let _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
9596
9600
  if (!(ln && ln === _)) {
9597
9601
  if ((!_ || typeof _ != "object") && (_ = {}), _ = Dt(_), Bt = // eslint-disable-next-line unicorn/prefer-includes
9598
- Tt.indexOf(_.PARSER_MEDIA_TYPE) === -1 ? as : _.PARSER_MEDIA_TYPE, de = Bt === "application/xhtml+xml" ? ys : wo, pe = Ct(_, "ALLOWED_TAGS") ? V({}, _.ALLOWED_TAGS, de) : vt, _e = Ct(_, "ALLOWED_ATTR") ? V({}, _.ALLOWED_ATTR, de) : yn, xn = Ct(_, "ALLOWED_NAMESPACES") ? V({}, _.ALLOWED_NAMESPACES, ys) : ss, mr = Ct(_, "ADD_URI_SAFE_ATTR") ? V(Dt(Wr), _.ADD_URI_SAFE_ATTR, de) : Wr, ue = Ct(_, "ADD_DATA_URI_TAGS") ? V(Dt(Gr), _.ADD_DATA_URI_TAGS, de) : Gr, Ce = Ct(_, "FORBID_CONTENTS") ? V({}, _.FORBID_CONTENTS, de) : gr, Ge = Ct(_, "FORBID_TAGS") ? V({}, _.FORBID_TAGS, de) : Dt({}), an = Ct(_, "FORBID_ATTR") ? V({}, _.FORBID_ATTR, de) : Dt({}), xt = Ct(_, "USE_PROFILES") ? _.USE_PROFILES : !1, xe = _.ALLOW_ARIA_ATTR !== !1, Te = _.ALLOW_DATA_ATTR !== !1, H = _.ALLOW_UNKNOWN_PROTOCOLS || !1, oe = _.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Q = _.SAFE_FOR_TEMPLATES || !1, Ne = _.SAFE_FOR_XML !== !1, We = _.WHOLE_DOCUMENT || !1, wt = _.RETURN_DOM || !1, De = _.RETURN_DOM_FRAGMENT || !1, Ae = _.RETURN_TRUSTED_TYPE || !1, Ft = _.FORCE_BODY || !1, ze = _.SANITIZE_DOM !== !1, Ue = _.SANITIZE_NAMED_PROPS || !1, Ye = _.KEEP_CONTENT !== !1, st = _.IN_PLACE || !1, $t = _.ALLOWED_URI_REGEXP || Kc, cn = _.NAMESPACE || St, Un = _.MATHML_TEXT_INTEGRATION_POINTS || Un, Zn = _.HTML_INTEGRATION_POINTS || Zn, le = _.CUSTOM_ELEMENT_HANDLING || {}, _.CUSTOM_ELEMENT_HANDLING && br(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (le.tagNameCheck = _.CUSTOM_ELEMENT_HANDLING.tagNameCheck), _.CUSTOM_ELEMENT_HANDLING && br(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (le.attributeNameCheck = _.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), _.CUSTOM_ELEMENT_HANDLING && typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (le.allowCustomizedBuiltInElements = _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Q && (Te = !1), De && (wt = !0), xt && (pe = V({}, La), _e = [], xt.html === !0 && (V(pe, Ra), V(_e, za)), xt.svg === !0 && (V(pe, xs), V(_e, Es), V(_e, mo)), xt.svgFilters === !0 && (V(pe, Ss), V(_e, Es), V(_e, mo)), xt.mathMl === !0 && (V(pe, Ts), V(_e, Ia), V(_e, mo))), _.ADD_TAGS && (typeof _.ADD_TAGS == "function" ? yt.tagCheck = _.ADD_TAGS : (pe === vt && (pe = Dt(pe)), V(pe, _.ADD_TAGS, de))), _.ADD_ATTR && (typeof _.ADD_ATTR == "function" ? yt.attributeCheck = _.ADD_ATTR : (_e === yn && (_e = Dt(_e)), V(_e, _.ADD_ATTR, de))), _.ADD_URI_SAFE_ATTR && V(mr, _.ADD_URI_SAFE_ATTR, de), _.FORBID_CONTENTS && (Ce === gr && (Ce = Dt(Ce)), V(Ce, _.FORBID_CONTENTS, de)), _.ADD_FORBID_CONTENTS && (Ce === gr && (Ce = Dt(Ce)), V(Ce, _.ADD_FORBID_CONTENTS, de)), Ye && (pe["#text"] = !0), We && V(pe, ["html", "head", "body"]), pe.table && (V(pe, ["tbody"]), delete Ge.tbody), _.TRUSTED_TYPES_POLICY) {
9602
+ Tt.indexOf(_.PARSER_MEDIA_TYPE) === -1 ? as : _.PARSER_MEDIA_TYPE, de = Bt === "application/xhtml+xml" ? ys : wo, pe = Ct(_, "ALLOWED_TAGS") ? V({}, _.ALLOWED_TAGS, de) : vt, _e = Ct(_, "ALLOWED_ATTR") ? V({}, _.ALLOWED_ATTR, de) : yn, xn = Ct(_, "ALLOWED_NAMESPACES") ? V({}, _.ALLOWED_NAMESPACES, ys) : ss, mr = Ct(_, "ADD_URI_SAFE_ATTR") ? V(Dt(Wr), _.ADD_URI_SAFE_ATTR, de) : Wr, ue = Ct(_, "ADD_DATA_URI_TAGS") ? V(Dt(Gr), _.ADD_DATA_URI_TAGS, de) : Gr, Ce = Ct(_, "FORBID_CONTENTS") ? V({}, _.FORBID_CONTENTS, de) : gr, Ge = Ct(_, "FORBID_TAGS") ? V({}, _.FORBID_TAGS, de) : Dt({}), an = Ct(_, "FORBID_ATTR") ? V({}, _.FORBID_ATTR, de) : Dt({}), xt = Ct(_, "USE_PROFILES") ? _.USE_PROFILES : !1, xe = _.ALLOW_ARIA_ATTR !== !1, Te = _.ALLOW_DATA_ATTR !== !1, H = _.ALLOW_UNKNOWN_PROTOCOLS || !1, oe = _.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Q = _.SAFE_FOR_TEMPLATES || !1, Ne = _.SAFE_FOR_XML !== !1, We = _.WHOLE_DOCUMENT || !1, wt = _.RETURN_DOM || !1, De = _.RETURN_DOM_FRAGMENT || !1, Ae = _.RETURN_TRUSTED_TYPE || !1, Ft = _.FORCE_BODY || !1, ze = _.SANITIZE_DOM !== !1, Ue = _.SANITIZE_NAMED_PROPS || !1, Ye = _.KEEP_CONTENT !== !1, st = _.IN_PLACE || !1, $t = _.ALLOWED_URI_REGEXP || Qc, cn = _.NAMESPACE || St, Un = _.MATHML_TEXT_INTEGRATION_POINTS || Un, Zn = _.HTML_INTEGRATION_POINTS || Zn, le = _.CUSTOM_ELEMENT_HANDLING || {}, _.CUSTOM_ELEMENT_HANDLING && br(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (le.tagNameCheck = _.CUSTOM_ELEMENT_HANDLING.tagNameCheck), _.CUSTOM_ELEMENT_HANDLING && br(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (le.attributeNameCheck = _.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), _.CUSTOM_ELEMENT_HANDLING && typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (le.allowCustomizedBuiltInElements = _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Q && (Te = !1), De && (wt = !0), xt && (pe = V({}, La), _e = [], xt.html === !0 && (V(pe, Ra), V(_e, za)), xt.svg === !0 && (V(pe, xs), V(_e, Es), V(_e, mo)), xt.svgFilters === !0 && (V(pe, Ss), V(_e, Es), V(_e, mo)), xt.mathMl === !0 && (V(pe, Ts), V(_e, Ia), V(_e, mo))), _.ADD_TAGS && (typeof _.ADD_TAGS == "function" ? yt.tagCheck = _.ADD_TAGS : (pe === vt && (pe = Dt(pe)), V(pe, _.ADD_TAGS, de))), _.ADD_ATTR && (typeof _.ADD_ATTR == "function" ? yt.attributeCheck = _.ADD_ATTR : (_e === yn && (_e = Dt(_e)), V(_e, _.ADD_ATTR, de))), _.ADD_URI_SAFE_ATTR && V(mr, _.ADD_URI_SAFE_ATTR, de), _.FORBID_CONTENTS && (Ce === gr && (Ce = Dt(Ce)), V(Ce, _.FORBID_CONTENTS, de)), _.ADD_FORBID_CONTENTS && (Ce === gr && (Ce = Dt(Ce)), V(Ce, _.ADD_FORBID_CONTENTS, de)), Ye && (pe["#text"] = !0), We && V(pe, ["html", "head", "body"]), pe.table && (V(pe, ["tbody"]), delete Ge.tbody), _.TRUSTED_TYPES_POLICY) {
9599
9603
  if (typeof _.TRUSTED_TYPES_POLICY.createHTML != "function")
9600
9604
  throw Pr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
9601
9605
  if (typeof _.TRUSTED_TYPES_POLICY.createScriptURL != "function")
9602
9606
  throw Pr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
9603
9607
  T = _.TRUSTED_TYPES_POLICY, A = T.createHTML("");
9604
9608
  } else
9605
- T === void 0 && (T = sk(k, o)), T !== null && typeof A == "string" && (A = T.createHTML(""));
9609
+ T === void 0 && (T = ak(k, o)), T !== null && typeof A == "string" && (A = T.createHTML(""));
9606
9610
  nt && nt(_), ln = _;
9607
9611
  }
9608
- }, kr = V({}, [...xs, ...Ss, ...Jb]), Vr = V({}, [...Ts, ...Vb]), cs = function(_) {
9612
+ }, kr = V({}, [...xs, ...Ss, ...Yb]), Vr = V({}, [...Ts, ...Xb]), cs = function(_) {
9609
9613
  let C = E(_);
9610
9614
  (!C || !C.tagName) && (C = {
9611
9615
  namespaceURI: cn,
@@ -9734,7 +9738,7 @@ function el() {
9734
9738
  ) return !1;
9735
9739
  } else if (!mr[C]) {
9736
9740
  if (!Xe($t, Cr(I, on, ""))) {
9737
- if (!((C === "src" || C === "xlink:href" || C === "href") && _ !== "script" && Fb(I, "data:") === 0 && ue[_])) {
9741
+ if (!((C === "src" || C === "xlink:href" || C === "href") && _ !== "script" && Gb(I, "data:") === 0 && ue[_])) {
9738
9742
  if (!(H && !Xe(It, Cr(I, on, "")))) {
9739
9743
  if (I)
9740
9744
  return !1;
@@ -9769,7 +9773,7 @@ function el() {
9769
9773
  namespaceURI: Je,
9770
9774
  value: At
9771
9775
  } = Me, Ot = de(Se), wr = At;
9772
- let Ie = Se === "value" ? wr : Bb(wr);
9776
+ let Ie = Se === "value" ? wr : Wb(wr);
9773
9777
  if (I.attrName = Ot, I.attrValue = Ie, I.keepAttr = !0, I.forceKeepAttr = void 0, Et(te.uponSanitizeAttribute, _, I), Ie = I.attrValue, Ue && (Ot === "id" || Ot === "name") && (ht(Se, _), Ie = fr + Ie), Ne && Xe(/((--!?|])>)|<\/(style|title|textarea)/i, Ie)) {
9774
9778
  ht(Se, _);
9775
9779
  continue;
@@ -9862,7 +9866,7 @@ function el() {
9862
9866
  return (_e.shadowroot || _e.shadowrootmode) && (Me = Be.call(r, Me, !0)), Me;
9863
9867
  }
9864
9868
  let Je = We ? C.outerHTML : C.innerHTML;
9865
- return We && pe["!doctype"] && C.ownerDocument && C.ownerDocument.doctype && C.ownerDocument.doctype.name && Xe(Qc, C.ownerDocument.doctype.name) && (Je = "<!DOCTYPE " + C.ownerDocument.doctype.name + `>
9869
+ return We && pe["!doctype"] && C.ownerDocument && C.ownerDocument.doctype && C.ownerDocument.doctype.name && Xe(el, C.ownerDocument.doctype.name) && (Je = "<!DOCTYPE " + C.ownerDocument.doctype.name + `>
9866
9870
  ` + Je), Q && go([we, ot, nn], (At) => {
9867
9871
  Je = Cr(Je, At, " ");
9868
9872
  }), T && Ae ? T.createHTML(Je) : Je;
@@ -9879,8 +9883,8 @@ function el() {
9879
9883
  typeof _ == "function" && Ar(te[j], _);
9880
9884
  }, t.removeHook = function(j, _) {
9881
9885
  if (_ !== void 0) {
9882
- const C = qb(te[j], _);
9883
- return C === -1 ? void 0 : Hb(te[j], C, 1)[0];
9886
+ const C = Fb(te[j], _);
9887
+ return C === -1 ? void 0 : Bb(te[j], C, 1)[0];
9884
9888
  }
9885
9889
  return Pa(te[j]);
9886
9890
  }, t.removeHooks = function(j) {
@@ -9889,18 +9893,18 @@ function el() {
9889
9893
  te = Oa();
9890
9894
  }, t;
9891
9895
  }
9892
- var ik = el();
9893
- function tl(e) {
9896
+ var ck = tl();
9897
+ function nl(e) {
9894
9898
  const t = ce.parse(e, { gfm: !0, breaks: !0, async: !1 });
9895
- return ik.sanitize(t);
9899
+ return ck.sanitize(t);
9896
9900
  }
9897
- const nl = 1e3, ak = 32, Na = 15e3, ck = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]), lk = 4e3;
9901
+ const rl = 1e3, lk = 32, Na = 15e3, uk = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]), dk = 4e3;
9898
9902
  let L = null, Ht = null, He = null, di = null, Ho = null, qs = !1, xo = null, Or = null, F = { kind: "connecting" }, rr = [], lt = !0, cr = null, ge = null, lr = null, Yt = null, Nr = -1, tt = null, Kt = !1, Xt = null, Pn = /* @__PURE__ */ new Set();
9899
9903
  function Hs() {
9900
- To(), jc(), Ht && clearInterval(Ht), Ht = null, Xt == null || Xt(), Xt = null, He == null || He.destroy(), He = null, L && en(L), L == null || L.remove(), L = null, di = null, F = { kind: "connecting" }, rr = [], lt = !0, cr = null, ge = null, lr = null, Yt = null, Ho = null, Nr = -1, tt = null, Kt = !1, Pn = /* @__PURE__ */ new Set();
9904
+ To(), Uc(), Ht && clearInterval(Ht), Ht = null, Xt == null || Xt(), Xt = null, He == null || He.destroy(), He = null, L && en(L), L == null || L.remove(), L = null, di = null, F = { kind: "connecting" }, rr = [], lt = !0, cr = null, ge = null, lr = null, Yt = null, Ho = null, Nr = -1, tt = null, Kt = !1, Pn = /* @__PURE__ */ new Set();
9901
9905
  }
9902
9906
  function pi(e, t, n, r, o) {
9903
- L && Hs(), di = o != null ? o : null, F = { kind: "connecting" }, rr = [], lt = !0, cr = null, Nr = -1, tt = null, Kt = !1, Pn = /* @__PURE__ */ new Set(), ge = e, lr = n, Yt = t, Ho = r, Mc({ taskId: e, backendUrl: n, title: r }), L = document.createElement("div"), L.className = "ap-sdk-panel", L.setAttribute("data-ap-sdk", "1"), L.setAttribute("role", "dialog"), L.setAttribute("aria-modal", "true"), L.setAttribute("aria-label", "Automation in progress");
9907
+ L && Hs(), di = o != null ? o : null, F = { kind: "connecting" }, rr = [], lt = !0, cr = null, Nr = -1, tt = null, Kt = !1, Pn = /* @__PURE__ */ new Set(), ge = e, lr = n, Yt = t, Ho = r, jc({ taskId: e, backendUrl: n, title: r }), L = document.createElement("div"), L.className = "ap-sdk-panel", L.setAttribute("data-ap-sdk", "1"), L.setAttribute("role", "dialog"), L.setAttribute("aria-modal", "true"), L.setAttribute("aria-label", "Automation in progress");
9904
9908
  const i = r.length > 55 ? `${r.slice(0, 52)}…` : r;
9905
9909
  L.innerHTML = `
9906
9910
  <div class="ap-sdk-panel__header">
@@ -9915,7 +9919,7 @@ function pi(e, t, n, r, o) {
9915
9919
  <div class="ap-sdk-runner__meta">
9916
9920
  <div class="ap-sdk-runner__meta-row">
9917
9921
  <span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--automate">Automate</span>
9918
- <span class="ap-sdk-runner__title" title="${yk(r)}">${fi(i)}</span>
9922
+ <span class="ap-sdk-runner__title" title="${xk(r)}">${fi(i)}</span>
9919
9923
  </div>
9920
9924
  <div class="ap-sdk-runner__meta-row ap-sdk-runner__meta-row--controls">
9921
9925
  <span class="ap-sdk-runner__counter" data-ap-runner-counter>0 actions</span>
@@ -9952,17 +9956,17 @@ function pi(e, t, n, r, o) {
9952
9956
  }, { passive: !0 }), document.body.appendChild(L), He = Gs(), Qt(L), ni(L, ti), L.querySelector("[data-ap-close]").addEventListener("click", () => {
9953
9957
  Hs(), o == null || o();
9954
9958
  }), L.querySelector("[data-ap-runner-chat-form]").addEventListener("submit", (a) => {
9955
- a.preventDefault(), pk(t, e);
9959
+ a.preventDefault(), fk(t, e);
9956
9960
  }), L.querySelector("[data-ap-runner-cancel]").addEventListener("click", (a) => {
9957
9961
  a.stopPropagation();
9958
9962
  const d = a.currentTarget;
9959
9963
  if (!qs) {
9960
- qs = !0, d.textContent = "Confirm", xo = setTimeout(To, lk), Or = (l) => {
9964
+ qs = !0, d.textContent = "Confirm", xo = setTimeout(To, dk), Or = (l) => {
9961
9965
  l.target !== d && To();
9962
9966
  }, document.addEventListener("click", Or, !0);
9963
9967
  return;
9964
9968
  }
9965
- To(), uk(t, e);
9969
+ To(), pk(t, e);
9966
9970
  }), L.querySelector("[data-ap-runner-scroll-toggle]").addEventListener("click", () => {
9967
9971
  lt = !lt, lt && Da(), So();
9968
9972
  }), L.querySelector("[data-ap-runner-scroll-jump]").addEventListener("click", () => {
@@ -9970,8 +9974,8 @@ function pi(e, t, n, r, o) {
9970
9974
  }), L.querySelector("[data-ap-runner-log]").addEventListener("scroll", () => {
9971
9975
  if (!lt || !L) return;
9972
9976
  const a = L.querySelector("[data-ap-runner-log]");
9973
- a.scrollHeight - a.scrollTop - a.clientHeight > ak && (lt = !1, So());
9974
- }), hi(), rl(e, t);
9977
+ a.scrollHeight - a.scrollTop - a.clientHeight > lk && (lt = !1, So());
9978
+ }), hi(), ol(e, t);
9975
9979
  }
9976
9980
  function Da() {
9977
9981
  const e = L == null ? void 0 : L.querySelector("[data-ap-runner-log]");
@@ -9982,7 +9986,7 @@ function So() {
9982
9986
  const e = L.querySelector("[data-ap-runner-scroll-toggle]");
9983
9987
  e && (e.textContent = lt ? "Auto ↓" : "Manual", e.title = lt ? "Disable auto-scroll" : "Enable auto-scroll", e.classList.toggle("ap-sdk-runner__scroll-toggle--active", lt));
9984
9988
  }
9985
- function rl(e, t) {
9989
+ function ol(e, t) {
9986
9990
  const n = (d) => z(null, null, function* () {
9987
9991
  if (ge !== e || !L || F.kind !== "idle" && F.kind !== "connecting" || Pn.has(d.commandId)) return;
9988
9992
  Pn.add(d.commandId);
@@ -9998,7 +10002,7 @@ function rl(e, t) {
9998
10002
  };
9999
10003
  Cn({ kind: "executing", command: l, actionsRun: F.kind === "idle" ? F.actionsRun : 0 }), yield Ma(l, t, e);
10000
10004
  }), r = (d) => {
10001
- if (!(ge !== e || !L) && ck.has(d)) {
10005
+ if (!(ge !== e || !L) && uk.has(d)) {
10002
10006
  if (F.kind === "executing")
10003
10007
  Cn({ kind: "finishing", status: d, actionsRun: F.actionsRun });
10004
10008
  else if (F.kind === "connecting" || F.kind === "idle") {
@@ -10020,17 +10024,17 @@ function rl(e, t) {
10020
10024
  var d;
10021
10025
  try {
10022
10026
  const [l, p, h, g] = yield Promise.all([
10023
- Nc(t, e),
10024
- Tm(t, e),
10027
+ Dc(t, e),
10028
+ Am(t, e),
10025
10029
  jo(t, e),
10026
- xm(t, e)
10030
+ Tm(t, e)
10027
10031
  ]);
10028
10032
  if (ge !== e || !L) return;
10029
10033
  ja(p), tt = (d = h[0]) != null ? d : null, $n(), r(l.status), g && g.status === "pending" && (F.kind === "idle" || F.kind === "connecting") && !Pn.has(g.id) ? (Pn.add(g.id), Cn({ kind: "executing", command: g, actionsRun: F.kind === "idle" ? F.actionsRun : 0 }), yield Ma(g, t, e)) : F.kind === "connecting" && Cn({ kind: "idle", actionsRun: 0 });
10030
10034
  } catch (l) {
10031
10035
  }
10032
10036
  });
10033
- a(), Nm(t, e, {
10037
+ a(), Mm(t, e, {
10034
10038
  onStatusUpdate: o,
10035
10039
  onInteractionCreated: i,
10036
10040
  onInteractionAnswered: i,
@@ -10047,38 +10051,38 @@ function rl(e, t) {
10047
10051
  });
10048
10052
  }
10049
10053
  function Cn(e) {
10050
- F = e, F.kind === "idle" && cr === null && (cr = Date.now(), Fo(), Ht = setInterval(Fo, nl)), F.kind === "finished" && (Ht && (clearInterval(Ht), Ht = null), Xt == null || Xt(), Xt = null, He == null || He.hide(), jc()), hi();
10054
+ F = e, F.kind === "idle" && cr === null && (cr = Date.now(), Fo(), Ht = setInterval(Fo, rl)), F.kind === "finished" && (Ht && (clearInterval(Ht), Ht = null), Xt == null || Xt(), Xt = null, He == null || He.hide(), Uc()), hi();
10051
10055
  }
10052
10056
  function To() {
10053
10057
  qs = !1, xo && (clearTimeout(xo), xo = null), Or && (document.removeEventListener("click", Or, !0), Or = null);
10054
10058
  const e = L == null ? void 0 : L.querySelector("[data-ap-runner-cancel]");
10055
10059
  e && (e.textContent = "Cancel task");
10056
10060
  }
10057
- function uk(e, t) {
10061
+ function pk(e, t) {
10058
10062
  return z(this, null, function* () {
10059
10063
  if (ge !== t || !L) return;
10060
10064
  const n = L.querySelector("[data-ap-runner-cancel]");
10061
10065
  n && (n.disabled = !0);
10062
10066
  try {
10063
- yield Am(e, t);
10067
+ yield Pm(e, t);
10064
10068
  } catch (r) {
10065
10069
  n && (n.disabled = !1);
10066
10070
  }
10067
10071
  });
10068
10072
  }
10069
- function ol() {
10073
+ function sl() {
10070
10074
  if (!ge || !Yt || !lr || !Ho) return;
10071
10075
  const e = ge, t = Yt;
10072
- Mc({ taskId: e, backendUrl: lr, title: Ho }), Ht && clearInterval(Ht), Fo(), Ht = setInterval(Fo, nl);
10076
+ jc({ taskId: e, backendUrl: lr, title: Ho }), Ht && clearInterval(Ht), Fo(), Ht = setInterval(Fo, rl);
10073
10077
  const n = F.kind === "finished" ? F.actionsRun : 0;
10074
- Pn = /* @__PURE__ */ new Set(), F = { kind: "idle", actionsRun: n }, hi(), rl(e, t);
10078
+ Pn = /* @__PURE__ */ new Set(), F = { kind: "idle", actionsRun: n }, hi(), ol(e, t);
10075
10079
  }
10076
10080
  function hi() {
10077
10081
  if (!L) return;
10078
10082
  const e = L.querySelector("[data-ap-runner-status]"), t = L.querySelector("[data-ap-runner-counter]"), n = L.querySelector("[data-ap-runner-log]"), r = L.querySelector("[data-ap-runner-hint]");
10079
10083
  if (!e || !t || !n || !r) return;
10080
10084
  const o = "actionsRun" in F ? F.actionsRun : 0;
10081
- t.textContent = `${o} action${o === 1 ? "" : "s"}`, So(), F.kind === "finished" ? (e.textContent = F.status.replace(/_/g, " "), e.className = `ap-sdk-status-badge ap-sdk-status-badge--${F.status.replace(/_/g, "-")}`, r.style.display = "none", _k(F.status)) : (e.textContent = "running", e.className = "ap-sdk-status-badge ap-sdk-status-badge--in-progress", r.style.display = "block");
10085
+ t.textContent = `${o} action${o === 1 ? "" : "s"}`, So(), F.kind === "finished" ? (e.textContent = F.status.replace(/_/g, " "), e.className = `ap-sdk-status-badge ap-sdk-status-badge--${F.status.replace(/_/g, "-")}`, r.style.display = "none", yk(F.status)) : (e.textContent = "running", e.className = "ap-sdk-status-badge ap-sdk-status-badge--in-progress", r.style.display = "block");
10082
10086
  const i = n.querySelector("[data-ap-runner-placeholder]");
10083
10087
  if (rr.length === 0 && (F.kind === "connecting" || F.kind === "idle")) {
10084
10088
  if (!i) {
@@ -10110,17 +10114,17 @@ function $n() {
10110
10114
  const n = tt.questionMetadata, r = (o = n == null ? void 0 : n.options) != null ? o : [];
10111
10115
  if (t.placeholder = "Type your answer…", e.style.display = "block", e.innerHTML = `
10112
10116
  <div class="ap-sdk-runner__question-label">${fi((n == null ? void 0 : n.header) || "The agent has a question")}</div>
10113
- <div class="ap-sdk-runner__question-text ap-sdk-markdown">${tl((n == null ? void 0 : n.question) || tt.question)}</div>
10117
+ <div class="ap-sdk-runner__question-text ap-sdk-markdown">${nl((n == null ? void 0 : n.question) || tt.question)}</div>
10114
10118
  ${r.length > 0 ? '<div class="ap-sdk-runner__question-options" data-ap-runner-question-options></div>' : ""}
10115
10119
  `, r.length > 0) {
10116
10120
  const i = e.querySelector("[data-ap-runner-question-options]");
10117
10121
  for (const a of r) {
10118
10122
  const d = document.createElement("button");
10119
- d.type = "button", d.className = "ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-runner__question-option", d.textContent = a.label, d.addEventListener("click", () => void dk(a.label)), i.appendChild(d);
10123
+ d.type = "button", d.className = "ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-runner__question-option", d.textContent = a.label, d.addEventListener("click", () => void hk(a.label)), i.appendChild(d);
10120
10124
  }
10121
10125
  }
10122
10126
  }
10123
- function dk(e) {
10127
+ function hk(e) {
10124
10128
  return z(this, null, function* () {
10125
10129
  var r;
10126
10130
  if (!L || !tt || !ge || Kt) return;
@@ -10129,7 +10133,7 @@ function dk(e) {
10129
10133
  Kt = !0;
10130
10134
  try {
10131
10135
  const o = { selectedOption: e };
10132
- yield Dc(n, t, tt.id, o), tt = null, $n();
10136
+ yield Mc(n, t, tt.id, o), tt = null, $n();
10133
10137
  const i = yield jo(n, t);
10134
10138
  ge === t && L && (tt = (r = i[0]) != null ? r : null, $n());
10135
10139
  } catch (o) {
@@ -10156,7 +10160,7 @@ function Ma(e, t, n) {
10156
10160
  const a = e.selector ? document.querySelector(e.selector) : document.body;
10157
10161
  if (!a)
10158
10162
  throw new Error(`element not found (${e.selector})`);
10159
- He == null || He.update(a), o = fk(a);
10163
+ He == null || He.update(a), o = mk(a);
10160
10164
  } else {
10161
10165
  if (!e.selector)
10162
10166
  throw new Error(`${e.action} command is missing a selector`);
@@ -10164,23 +10168,23 @@ function Ma(e, t, n) {
10164
10168
  if (!a)
10165
10169
  throw new Error(`element not found (${e.selector})`);
10166
10170
  if (He == null || He.update(a), e.action === "click")
10167
- yield Mm(a), o = "Clicked";
10171
+ yield Um(a), o = "Clicked";
10168
10172
  else {
10169
10173
  if (e.value === void 0)
10170
10174
  throw new Error("inputText command is missing a value");
10171
- gk(a, e.value), o = "Entered text";
10175
+ bk(a, e.value), o = "Entered text";
10172
10176
  }
10173
10177
  }
10174
10178
  } catch (a) {
10175
10179
  r = "error", o = a instanceof Error ? a.message : "Unknown error executing command";
10176
10180
  }
10177
- if (ge === n && L && mk(r, e, o), yield hk(t, n, e.id, r, o), ge !== n || !L) return;
10181
+ if (ge === n && L && kk(r, e, o), yield gk(t, n, e.id, r, o), ge !== n || !L) return;
10178
10182
  He == null || He.hide();
10179
10183
  const i = (F.kind === "executing" || F.kind === "finishing" ? F.actionsRun : 0) + 1;
10180
10184
  F.kind === "finishing" ? Cn({ kind: "finished", status: F.status, actionsRun: i }) : F.kind === "executing" && Cn({ kind: "idle", actionsRun: i });
10181
10185
  });
10182
10186
  }
10183
- function pk(e, t) {
10187
+ function fk(e, t) {
10184
10188
  return z(this, null, function* () {
10185
10189
  var a;
10186
10190
  if (!L || Kt || F.kind === "finished" && F.status === "failed") return;
@@ -10191,14 +10195,14 @@ function pk(e, t) {
10191
10195
  Kt = !0, o.disabled = !0, r.style.display = "none";
10192
10196
  try {
10193
10197
  if (tt) {
10194
- yield Dc(e, t, tt.id, i), tt = null, $n();
10198
+ yield Mc(e, t, tt.id, i), tt = null, $n();
10195
10199
  try {
10196
10200
  const d = yield jo(e, t);
10197
10201
  ge === t && L && (tt = (a = d[0]) != null ? a : null, $n());
10198
10202
  } catch (d) {
10199
10203
  }
10200
10204
  } else
10201
- yield Em(e, t, i), F.kind === "finished" && ol();
10205
+ yield Cm(e, t, i), F.kind === "finished" && sl();
10202
10206
  n.value = "";
10203
10207
  } catch (d) {
10204
10208
  r.textContent = d instanceof Error ? d.message : "Failed to send — try again.", r.style.display = "block";
@@ -10208,15 +10212,15 @@ function pk(e, t) {
10208
10212
  }
10209
10213
  });
10210
10214
  }
10211
- function hk(e, t, n, r, o) {
10215
+ function gk(e, t, n, r, o) {
10212
10216
  return z(this, null, function* () {
10213
10217
  try {
10214
- yield Sm(e, t, n, r, o);
10218
+ yield Em(e, t, n, r, o);
10215
10219
  } catch (i) {
10216
10220
  }
10217
10221
  });
10218
10222
  }
10219
- function fk(e) {
10223
+ function mk(e) {
10220
10224
  const t = e.cloneNode(!0);
10221
10225
  t.querySelectorAll("script, style, noscript").forEach((o) => o.remove()), Xa(t);
10222
10226
  let n = t.outerHTML, r = !1;
@@ -10226,13 +10230,13 @@ Title: ${document.title}
10226
10230
  ${n}${r ? `
10227
10231
  … (truncated)` : ""}`;
10228
10232
  }
10229
- function gk(e, t) {
10233
+ function bk(e, t) {
10230
10234
  var i;
10231
10235
  const r = e instanceof HTMLTextAreaElement ? HTMLTextAreaElement.prototype : HTMLInputElement.prototype, o = (i = Object.getOwnPropertyDescriptor(r, "value")) == null ? void 0 : i.set;
10232
10236
  if (!o) throw new Error("target element does not accept text input");
10233
10237
  o.call(e, t), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }));
10234
10238
  }
10235
- function mk(e, t, n) {
10239
+ function kk(e, t, n) {
10236
10240
  var h, g;
10237
10241
  const r = e === "done" ? "✓" : "✗", o = t.selector ? ` \`${t.selector}\`` : "", i = t.description || `${t.action}${o}`, a = e === "done" && t.action === "getContext" ? `read context (${(h = n == null ? void 0 : n.length) != null ? h : 0} chars)` : n, d = a ? ` — ${a}` : "";
10238
10242
  if (rr.push({ status: e, text: `${r} ${i}${d}` }), !L) return;
@@ -10242,12 +10246,12 @@ function mk(e, t, n) {
10242
10246
  const p = document.createElement("div");
10243
10247
  p.className = `ap-sdk-runner__log-entry ap-sdk-runner__log-entry--${e}`, p.textContent = rr[rr.length - 1].text, l.appendChild(p), lt && (l.scrollTop = l.scrollHeight);
10244
10248
  }
10245
- function bk(e) {
10249
+ function _k(e) {
10246
10250
  var t, n;
10247
10251
  return (n = (t = e.display) == null ? void 0 : t.variant) != null ? n : e.sdkEventType;
10248
10252
  }
10249
- function kk(e) {
10250
- const t = bk(e);
10253
+ function vk(e) {
10254
+ const t = _k(e);
10251
10255
  return (e.stream === "stdout" || e.stream === "stderr" || e.stream === "sdk_event" && (t === "text" || t === "thinking")) && e.data.trim() || null;
10252
10256
  }
10253
10257
  function ja(e) {
@@ -10257,14 +10261,14 @@ function ja(e) {
10257
10261
  const n = L.querySelector("[data-ap-runner-log]");
10258
10262
  if (n)
10259
10263
  for (const o of t) {
10260
- const i = kk(o);
10264
+ const i = vk(o);
10261
10265
  if (!i) continue;
10262
10266
  (r = n.querySelector("[data-ap-runner-placeholder]")) == null || r.remove();
10263
10267
  const a = document.createElement("div");
10264
- a.className = `ap-sdk-runner__log-entry ap-sdk-runner__log-entry--output ap-sdk-runner__log-entry--${o.stream}`, o.stream === "sdk_event" ? (a.classList.add("ap-sdk-markdown"), a.innerHTML = tl(i)) : a.textContent = i, n.appendChild(a), lt && (n.scrollTop = n.scrollHeight);
10268
+ a.className = `ap-sdk-runner__log-entry ap-sdk-runner__log-entry--output ap-sdk-runner__log-entry--${o.stream}`, o.stream === "sdk_event" ? (a.classList.add("ap-sdk-markdown"), a.innerHTML = nl(i)) : a.textContent = i, n.appendChild(a), lt && (n.scrollTop = n.scrollHeight);
10265
10269
  }
10266
10270
  }
10267
- function _k(e) {
10271
+ function yk(e) {
10268
10272
  if (!L || !ge || !lr) return;
10269
10273
  const t = L.querySelector("[data-ap-runner-summary]");
10270
10274
  if (!t) return;
@@ -10294,9 +10298,9 @@ function _k(e) {
10294
10298
  `, t.querySelector("[data-ap-runner-view]").addEventListener("click", () => window.open(n, "_blank", "noopener,noreferrer")), t.querySelector("[data-ap-runner-close]").addEventListener("click", () => {
10295
10299
  const a = di;
10296
10300
  Hs(), a == null || a();
10297
- }), o && vk(t);
10301
+ }), o && wk(t);
10298
10302
  }
10299
- function vk(e) {
10303
+ function wk(e) {
10300
10304
  const t = e.querySelector("[data-ap-runner-approve]"), n = e.querySelector("[data-ap-runner-reject]"), r = e.querySelector("[data-ap-runner-reject-form]"), o = e.querySelector("[data-ap-runner-reject-feedback]"), i = e.querySelector("[data-ap-runner-reject-submit]"), a = e.querySelector("[data-ap-runner-approval-error]"), d = e.querySelector(".ap-sdk-runner__approval-actions"), l = (h) => {
10301
10305
  a.textContent = h, a.style.display = "block";
10302
10306
  };
@@ -10305,7 +10309,7 @@ function vk(e) {
10305
10309
  const h = ge, g = Yt;
10306
10310
  t.disabled = !0, n.disabled = !0, a.style.display = "none";
10307
10311
  try {
10308
- yield Cm(g, h), d.innerHTML = '<span class="ap-sdk-status-badge ap-sdk-status-badge--approved">✓ Approved</span>', r.style.display = "none";
10312
+ yield Rm(g, h), d.innerHTML = '<span class="ap-sdk-status-badge ap-sdk-status-badge--approved">✓ Approved</span>', r.style.display = "none";
10309
10313
  } catch (m) {
10310
10314
  t.disabled = !1, n.disabled = !1, l(m instanceof Error ? m.message : "Failed to approve — try again.");
10311
10315
  }
@@ -10320,19 +10324,19 @@ function vk(e) {
10320
10324
  const h = ge, g = Yt, m = o.value.trim();
10321
10325
  i.disabled = !0, t.disabled = !0, a.style.display = "none", i.textContent = "Rejecting…";
10322
10326
  try {
10323
- yield Pm(g, h, m), m ? ol() : (d.innerHTML = '<span class="ap-sdk-status-badge ap-sdk-status-badge--rejected">✕ Rejected</span>', r.style.display = "none");
10327
+ yield Lm(g, h, m), m ? sl() : (d.innerHTML = '<span class="ap-sdk-status-badge ap-sdk-status-badge--rejected">✕ Rejected</span>', r.style.display = "none");
10324
10328
  } catch (k) {
10325
10329
  i.disabled = !1, t.disabled = !1, p(), l(k instanceof Error ? k.message : "Failed to reject — try again.");
10326
10330
  }
10327
10331
  }));
10328
10332
  }
10329
- function yk(e) {
10333
+ function xk(e) {
10330
10334
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
10331
10335
  }
10332
10336
  function fi(e) {
10333
10337
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
10334
10338
  }
10335
- function wk(e, t, n) {
10339
+ function Sk(e, t, n) {
10336
10340
  const r = !!(t.backendUrl && t.token), o = document.createElement("div");
10337
10341
  o.className = "ap-sdk-advanced", o.innerHTML = `
10338
10342
  <details class="ap-sdk-advanced__details">
@@ -10361,14 +10365,14 @@ function wk(e, t, n) {
10361
10365
  backendUrl: t.backendUrl,
10362
10366
  token: t.token
10363
10367
  };
10364
- vm(p, n != null ? n : void 0).then((h) => {
10368
+ wm(p, n != null ? n : void 0).then((h) => {
10365
10369
  var m, k;
10366
10370
  if (l = h, h.length === 0) {
10367
10371
  i.style.display = "none";
10368
10372
  return;
10369
10373
  }
10370
10374
  const g = (m = h.find((w) => w.isDefault && w.scope === "project")) != null ? m : h.find((w) => w.isDefault && w.scope === "global");
10371
- a.innerHTML = '<option value="">None (use default)</option>' + h.map((w) => `<option value="${xk(w.id)}">${Sk(w.name)}${w.isDefault ? " (Default)" : ""}</option>`).join(""), a.value = (k = g == null ? void 0 : g.id) != null ? k : "";
10375
+ a.innerHTML = '<option value="">None (use default)</option>' + h.map((w) => `<option value="${Tk(w.id)}">${Ek(w.name)}${w.isDefault ? " (Default)" : ""}</option>`).join(""), a.value = (k = g == null ? void 0 : g.id) != null ? k : "";
10372
10376
  }).catch(() => {
10373
10377
  i.style.display = "none";
10374
10378
  });
@@ -10388,13 +10392,13 @@ function wk(e, t, n) {
10388
10392
  }
10389
10393
  };
10390
10394
  }
10391
- function xk(e) {
10395
+ function Tk(e) {
10392
10396
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
10393
10397
  }
10394
- function Sk(e) {
10398
+ function Ek(e) {
10395
10399
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
10396
10400
  }
10397
- const gi = "ap-sdk-captures", Tk = 50;
10401
+ const gi = "ap-sdk-captures", Ak = 50;
10398
10402
  function hr() {
10399
10403
  try {
10400
10404
  const e = localStorage.getItem(gi);
@@ -10403,20 +10407,20 @@ function hr() {
10403
10407
  return [];
10404
10408
  }
10405
10409
  }
10406
- function Ek(e) {
10407
- const t = hr(), n = [e, ...t].slice(0, Tk);
10410
+ function Ck(e) {
10411
+ const t = hr(), n = [e, ...t].slice(0, Ak);
10408
10412
  try {
10409
10413
  localStorage.setItem(gi, JSON.stringify(n));
10410
10414
  } catch (r) {
10411
10415
  }
10412
10416
  }
10413
- function Ak() {
10417
+ function Pk() {
10414
10418
  try {
10415
10419
  localStorage.removeItem(gi);
10416
10420
  } catch (e) {
10417
10421
  }
10418
10422
  }
10419
- function sl(e) {
10423
+ function il(e) {
10420
10424
  var a, d, l, p, h;
10421
10425
  if (e.id) {
10422
10426
  const g = document.querySelector(`label[for="${CSS.escape(e.id)}"]`), m = (a = g == null ? void 0 : g.textContent) == null ? void 0 : a.trim();
@@ -10431,23 +10435,23 @@ function sl(e) {
10431
10435
  const i = (h = e.getAttribute("name")) == null ? void 0 : h.trim();
10432
10436
  return i || e.tagName.toLowerCase();
10433
10437
  }
10434
- function Ck(e, t) {
10438
+ function Rk(e, t) {
10435
10439
  return `Click "${e}" ${t.toLowerCase()}`;
10436
10440
  }
10437
- function il(e, t, n) {
10441
+ function al(e, t, n) {
10438
10442
  return n ? `Typed [redacted] into ${e}` : `Typed "${t}" into ${e}`;
10439
10443
  }
10440
10444
  function Ua(e, t) {
10441
10445
  return `Scrolled to (${e}, ${t})`;
10442
10446
  }
10443
- function Pk(e, t) {
10447
+ function Lk(e, t) {
10444
10448
  return t ? `Pressed "${e}" in ${t}` : `Pressed "${e}"`;
10445
10449
  }
10446
- function al(e) {
10450
+ function cl(e) {
10447
10451
  return e.map((t, n) => `${n + 1}. ${t.description}`).join(`
10448
10452
  `);
10449
10453
  }
10450
- const Rk = 400, Lk = /* @__PURE__ */ new Set([
10454
+ const zk = 400, Ik = /* @__PURE__ */ new Set([
10451
10455
  "Enter",
10452
10456
  "Tab",
10453
10457
  "ArrowUp",
@@ -10458,30 +10462,30 @@ const Rk = 400, Lk = /* @__PURE__ */ new Set([
10458
10462
  "End",
10459
10463
  "PageUp",
10460
10464
  "PageDown"
10461
- ]), zk = /* @__PURE__ */ new Set(["Control", "Meta", "Alt", "Shift"]);
10462
- function Ik(e) {
10463
- if (zk.has(e.key)) return null;
10465
+ ]), $k = /* @__PURE__ */ new Set(["Control", "Meta", "Alt", "Shift"]);
10466
+ function Ok(e) {
10467
+ if ($k.has(e.key)) return null;
10464
10468
  const t = [];
10465
- return e.ctrlKey && t.push("Ctrl"), e.metaKey && t.push("Cmd"), e.altKey && t.push("Alt"), t.length > 0 ? (t.push(e.key.length === 1 ? e.key.toUpperCase() : e.key), t.join("+")) : Lk.has(e.key) ? e.key : null;
10469
+ return e.ctrlKey && t.push("Ctrl"), e.metaKey && t.push("Cmd"), e.altKey && t.push("Alt"), t.length > 0 ? (t.push(e.key.length === 1 ? e.key.toUpperCase() : e.key), t.join("+")) : Ik.has(e.key) ? e.key : null;
10466
10470
  }
10467
- function $k(e) {
10468
- return e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? sl(e) : Io(e) || e.tagName.toLowerCase();
10471
+ function Nk(e) {
10472
+ return e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? il(e) : Io(e) || e.tagName.toLowerCase();
10469
10473
  }
10470
10474
  let ur = [], Ke = null, Bo = null, it = null, Ut = null, Zt = null;
10471
- function cl() {
10475
+ function ll() {
10472
10476
  Bo && (Bo.textContent = `● Recording — ${ur.length} step${ur.length === 1 ? "" : "s"}`);
10473
10477
  }
10474
10478
  function Fs() {
10475
- Zt && (clearTimeout(Zt), Zt = null), Ut && (ur.push(Ut), Ut = null, cl());
10479
+ Zt && (clearTimeout(Zt), Zt = null), Ut && (ur.push(Ut), Ut = null, ll());
10476
10480
  }
10477
10481
  function As(e) {
10478
- Fs(), ur.push(e), cl();
10482
+ Fs(), ur.push(e), ll();
10479
10483
  }
10480
- function Ok(e) {
10484
+ function Dk(e) {
10481
10485
  var t, n, r;
10482
10486
  return e instanceof HTMLSelectElement && (r = (n = (t = e.selectedOptions[0]) == null ? void 0 : t.textContent) == null ? void 0 : n.trim()) != null ? r : e.value;
10483
10487
  }
10484
- function Nk(e, t) {
10488
+ function Mk(e, t) {
10485
10489
  it && it(), ur = [], Ut = null, Ke = document.createElement("div"), Ke.className = "ap-sdk-recorder-bar", Ke.setAttribute("data-ap-sdk", "1"), Ke.innerHTML = `
10486
10490
  <span class="ap-sdk-recorder-bar__counter" data-ap-recorder-counter>● Recording — 0 steps</span>
10487
10491
  <button class="ap-sdk-recorder-bar__btn ap-sdk-recorder-bar__btn--stop" data-ap-recorder-stop type="button">Stop</button>
@@ -10502,7 +10506,7 @@ function Nk(e, t) {
10502
10506
  action: "click",
10503
10507
  cssSelector: vo(p),
10504
10508
  elementText: Io(p),
10505
- description: Ck(Io(p), p.tagName),
10509
+ description: Rk(Io(p), p.tagName),
10506
10510
  capturedAt: (/* @__PURE__ */ new Date()).toISOString()
10507
10511
  });
10508
10512
  }, i = (l) => {
@@ -10510,14 +10514,14 @@ function Nk(e, t) {
10510
10514
  const p = l.target;
10511
10515
  if (!(p instanceof HTMLInputElement) && !(p instanceof HTMLTextAreaElement) && !(p instanceof HTMLSelectElement))
10512
10516
  return;
10513
- const h = sl(p), g = vd(p), m = g ? "[redacted]" : Ok(p);
10517
+ const h = il(p), g = yd(p), m = g ? "[redacted]" : Dk(p);
10514
10518
  As(D(y({
10515
10519
  action: "inputText",
10516
10520
  cssSelector: vo(p),
10517
10521
  elementText: h,
10518
10522
  value: m
10519
10523
  }, g ? { redacted: !0 } : {}), {
10520
- description: il(h, m, g),
10524
+ description: al(h, m, g),
10521
10525
  capturedAt: (/* @__PURE__ */ new Date()).toISOString()
10522
10526
  }));
10523
10527
  }, a = () => {
@@ -10530,22 +10534,22 @@ function Nk(e, t) {
10530
10534
  capturedAt: (/* @__PURE__ */ new Date()).toISOString()
10531
10535
  }, Zt && clearTimeout(Zt), Zt = setTimeout(() => {
10532
10536
  Zt = null, Fs();
10533
- }, Rk);
10537
+ }, zk);
10534
10538
  }, d = (l) => {
10535
10539
  if (l.key === "Escape") {
10536
10540
  r();
10537
10541
  return;
10538
10542
  }
10539
10543
  if ($r(l.target)) return;
10540
- const p = Ik(l);
10544
+ const p = Ok(l);
10541
10545
  if (!p) return;
10542
- const h = l.target instanceof Element ? l.target : document.body, g = $k(h);
10546
+ const h = l.target instanceof Element ? l.target : document.body, g = Nk(h);
10543
10547
  As({
10544
10548
  action: "keypress",
10545
10549
  cssSelector: vo(h),
10546
10550
  elementText: g,
10547
10551
  key: p,
10548
- description: Pk(p, g),
10552
+ description: Lk(p, g),
10549
10553
  capturedAt: (/* @__PURE__ */ new Date()).toISOString()
10550
10554
  });
10551
10555
  };
@@ -10553,54 +10557,54 @@ function Nk(e, t) {
10553
10557
  document.removeEventListener("click", o, { capture: !0 }), document.removeEventListener("change", i, { capture: !0 }), window.removeEventListener("scroll", a, { capture: !0 }), document.removeEventListener("keydown", d, { capture: !0 }), Zt && (clearTimeout(Zt), Zt = null), Ut = null, Ke && en(Ke), Ke == null || Ke.remove(), Ke = null, Bo = null, it = null;
10554
10558
  };
10555
10559
  }
10556
- function Dk() {
10560
+ function jk() {
10557
10561
  it == null || it();
10558
10562
  }
10559
10563
  function Eo() {
10560
10564
  return it !== null;
10561
10565
  }
10562
- const Mk = "data-ap-sdk", jk = "ap-sdk-fab", Za = "ap-sdk-fab--dragging", mi = "ap-sdk-fab--open", ll = "ap-sdk-fab-pos", Go = "ap-sdk-fab--left-edge", Uk = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/></svg>', Zk = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3 3 7.07 16.97 2.51-7.39 7.39-2.51L3 3z"/><path d="m13 13 6 6"/></svg>', qk = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="12" r="8"/></svg>', Hk = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>';
10563
- let $ = null, Mt = null, hn = null, fn = null, ft = null, Bn = null, Gn = null, Wn = null, Ao = null, Dr = null, or = null, Co = null, Po = null, Ro = null, ul = 0, dl = 0, pl = 0, hl = 0, Xn = !1, Pt = !1, Mr = null, Rn = null;
10564
- function Fk() {
10566
+ const Uk = "data-ap-sdk", Zk = "ap-sdk-fab", Za = "ap-sdk-fab--dragging", mi = "ap-sdk-fab--open", ul = "ap-sdk-fab-pos", Go = "ap-sdk-fab--left-edge", qk = '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/></svg>', Hk = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m3 3 7.07 16.97 2.51-7.39 7.39-2.51L3 3z"/><path d="m13 13 6 6"/></svg>', Fk = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="currentColor"><circle cx="12" cy="12" r="8"/></svg>', Bk = '<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/></svg>';
10567
+ let $ = null, Mt = null, hn = null, fn = null, ft = null, Bn = null, Gn = null, Wn = null, Ao = null, Dr = null, or = null, Co = null, Po = null, Ro = null, dl = 0, pl = 0, hl = 0, fl = 0, Xn = !1, Pt = !1, Mr = null, Rn = null;
10568
+ function Gk() {
10565
10569
  Mr = (e) => {
10566
10570
  if (!$) {
10567
10571
  Lo();
10568
10572
  return;
10569
10573
  }
10570
10574
  if (!Xn) {
10571
- if (Math.hypot(e.clientX - pl, e.clientY - hl) < 5) return;
10575
+ if (Math.hypot(e.clientX - hl, e.clientY - fl) < 5) return;
10572
10576
  Xn = !0, Pt = !0, $.classList.add(Za);
10573
10577
  }
10574
- Bk(e.clientX - ul, e.clientY - dl);
10578
+ Wk(e.clientX - dl, e.clientY - pl);
10575
10579
  }, Rn = () => {
10576
10580
  if (!$) {
10577
10581
  Lo();
10578
10582
  return;
10579
10583
  }
10580
- Xn ? (Xn = !1, $.classList.remove(Za), $.style.transition = "", Gk($.getBoundingClientRect())) : $.style.transition = "", Lo();
10584
+ Xn ? (Xn = !1, $.classList.remove(Za), $.style.transition = "", Jk($.getBoundingClientRect())) : $.style.transition = "", Lo();
10581
10585
  }, window.addEventListener("pointermove", Mr), window.addEventListener("pointerup", Rn), window.addEventListener("pointercancel", Rn);
10582
10586
  }
10583
10587
  function Lo() {
10584
10588
  Mr && (window.removeEventListener("pointermove", Mr), Mr = null), Rn && (window.removeEventListener("pointerup", Rn), window.removeEventListener("pointercancel", Rn), Rn = null);
10585
10589
  }
10586
- function Bk(e, t) {
10590
+ function Wk(e, t) {
10587
10591
  if (!$) return;
10588
10592
  const n = $.offsetWidth || 52, r = $.offsetHeight || 52;
10589
10593
  $.style.top = `${Math.max(0, Math.min(t, window.innerHeight - r))}px`, $.style.left = `${Math.max(0, Math.min(e, window.innerWidth - n))}px`, $.style.bottom = "auto", $.style.right = "auto";
10590
10594
  }
10591
- function Gk(e) {
10595
+ function Jk(e) {
10592
10596
  if (!$) return;
10593
10597
  const n = Math.max(16, Math.min(window.innerHeight - e.bottom, window.innerHeight - 52 - 16)), r = e.left + e.width / 2 < window.innerWidth / 2 ? "left" : "right";
10594
10598
  $.style.top = "auto", $.style.bottom = `${n}px`, r === "left" ? ($.style.right = "auto", $.style.left = "16px", $.classList.add(Go)) : ($.style.left = "auto", $.style.right = "16px", $.classList.remove(Go));
10595
10599
  try {
10596
- localStorage.setItem(ll, JSON.stringify({ edge: r, bottom: n }));
10600
+ localStorage.setItem(ul, JSON.stringify({ edge: r, bottom: n }));
10597
10601
  } catch (o) {
10598
10602
  }
10599
10603
  }
10600
- function Wk() {
10604
+ function Vk() {
10601
10605
  if ($)
10602
10606
  try {
10603
- const e = localStorage.getItem(ll);
10607
+ const e = localStorage.getItem(ul);
10604
10608
  if (!e) return;
10605
10609
  const t = JSON.parse(e);
10606
10610
  if (typeof t.bottom != "number" || t.edge !== "left" && t.edge !== "right") return;
@@ -10612,7 +10616,7 @@ function Wk() {
10612
10616
  function Kn() {
10613
10617
  $ == null || $.classList.remove(mi), or && (window.removeEventListener("pointerdown", or, { capture: !0 }), or = null);
10614
10618
  }
10615
- function Jk() {
10619
+ function Yk() {
10616
10620
  $ && ($.classList.add(mi), or = (e) => {
10617
10621
  !$ || $.contains(e.target) || Kn();
10618
10622
  }, requestAnimationFrame(() => {
@@ -10622,23 +10626,23 @@ function Jk() {
10622
10626
  function bo(e) {
10623
10627
  return new DOMParser().parseFromString(e, "text/html").body.firstElementChild;
10624
10628
  }
10625
- function fl(e, t, n) {
10629
+ function gl(e, t, n) {
10626
10630
  var d;
10627
10631
  if (Co = e, Po = t, Ro = n, $) return;
10628
- $ = document.createElement("div"), $.className = jk, $.setAttribute(Mk, "1"), Bn = document.createElement("div"), Bn.className = "ap-sdk-fab__row";
10632
+ $ = document.createElement("div"), $.className = Zk, $.setAttribute(Uk, "1"), Bn = document.createElement("div"), Bn.className = "ap-sdk-fab__row";
10629
10633
  const r = document.createElement("span");
10630
- r.className = "ap-sdk-fab__label", r.textContent = "View captures", ft = document.createElement("button"), ft.className = "ap-sdk-fab__list ap-sdk-fab__sub", ft.setAttribute("aria-label", "My captures"), ft.setAttribute("title", "View my captures"), ft.appendChild(bo(Hk));
10634
+ r.className = "ap-sdk-fab__label", r.textContent = "View captures", ft = document.createElement("button"), ft.className = "ap-sdk-fab__list ap-sdk-fab__sub", ft.setAttribute("aria-label", "My captures"), ft.setAttribute("title", "View my captures"), ft.appendChild(bo(Bk));
10631
10635
  const o = document.createElement("span");
10632
10636
  o.className = "ap-sdk-fab__badge", o.setAttribute("data-ap-badge", ""), o.style.display = "none", ft.appendChild(o), Bn.appendChild(r), Bn.appendChild(ft), Gn = document.createElement("div"), Gn.className = "ap-sdk-fab__row";
10633
10637
  const i = document.createElement("span");
10634
- i.className = "ap-sdk-fab__label", i.textContent = "Capture element", hn = document.createElement("button"), hn.className = "ap-sdk-fab__capture ap-sdk-fab__sub", hn.setAttribute("aria-label", "Capture element"), hn.setAttribute("title", "Capture element to Agent Platform"), hn.appendChild(bo(Zk)), Gn.appendChild(i), Gn.appendChild(hn), Wn = document.createElement("div"), Wn.className = "ap-sdk-fab__row";
10638
+ i.className = "ap-sdk-fab__label", i.textContent = "Capture element", hn = document.createElement("button"), hn.className = "ap-sdk-fab__capture ap-sdk-fab__sub", hn.setAttribute("aria-label", "Capture element"), hn.setAttribute("title", "Capture element to Agent Platform"), hn.appendChild(bo(Hk)), Gn.appendChild(i), Gn.appendChild(hn), Wn = document.createElement("div"), Wn.className = "ap-sdk-fab__row";
10635
10639
  const a = document.createElement("span");
10636
- a.className = "ap-sdk-fab__label", a.textContent = "Record interaction", fn = document.createElement("button"), fn.className = "ap-sdk-fab__record ap-sdk-fab__sub", fn.setAttribute("aria-label", "Record interaction"), fn.setAttribute("title", "Record a sequence of interactions"), fn.appendChild(bo(qk)), Wn.appendChild(a), Wn.appendChild(fn), Mt = document.createElement("button"), Mt.className = "ap-sdk-fab__main", Mt.setAttribute("aria-label", "Agent Platform"), Mt.setAttribute("title", "Agent Platform"), Mt.appendChild(bo(Uk)), $.appendChild(Bn), $.appendChild(Gn), $.appendChild(Wn), $.appendChild(Mt), Mt.addEventListener("click", (l) => {
10640
+ a.className = "ap-sdk-fab__label", a.textContent = "Record interaction", fn = document.createElement("button"), fn.className = "ap-sdk-fab__record ap-sdk-fab__sub", fn.setAttribute("aria-label", "Record interaction"), fn.setAttribute("title", "Record a sequence of interactions"), fn.appendChild(bo(Fk)), Wn.appendChild(a), Wn.appendChild(fn), Mt = document.createElement("button"), Mt.className = "ap-sdk-fab__main", Mt.setAttribute("aria-label", "Agent Platform"), Mt.setAttribute("title", "Agent Platform"), Mt.appendChild(bo(qk)), $.appendChild(Bn), $.appendChild(Gn), $.appendChild(Wn), $.appendChild(Mt), Mt.addEventListener("click", (l) => {
10637
10641
  if (Pt) {
10638
10642
  Pt = !1;
10639
10643
  return;
10640
10644
  }
10641
- l.preventDefault(), l.stopPropagation(), $ != null && $.classList.contains(mi) ? Kn() : Jk();
10645
+ l.preventDefault(), l.stopPropagation(), $ != null && $.classList.contains(mi) ? Kn() : Yk();
10642
10646
  }), hn.addEventListener("click", (l) => {
10643
10647
  if (Pt) {
10644
10648
  Pt = !1;
@@ -10660,8 +10664,8 @@ function fl(e, t, n) {
10660
10664
  }), Dr = (l) => {
10661
10665
  if (!$ || !($ === l.target || $.contains(l.target))) return;
10662
10666
  const p = $.getBoundingClientRect();
10663
- ul = l.clientX - p.left, dl = l.clientY - p.top, pl = l.clientX, hl = l.clientY, Xn = !1, Pt = !1, $.style.transition = "none", l.stopPropagation(), Fk();
10664
- }, window.addEventListener("pointerdown", Dr, { capture: !0 }), ((d = document.body) != null ? d : document.documentElement).appendChild($), Qt($), Wk(), Ao = setInterval(() => {
10667
+ dl = l.clientX - p.left, pl = l.clientY - p.top, hl = l.clientX, fl = l.clientY, Xn = !1, Pt = !1, $.style.transition = "none", l.stopPropagation(), Gk();
10668
+ }, window.addEventListener("pointerdown", Dr, { capture: !0 }), ((d = document.body) != null ? d : document.documentElement).appendChild($), Qt($), Vk(), Ao = setInterval(() => {
10665
10669
  Mt && Mt.classList.toggle("ap-sdk-fab__main--active", tr() || Eo());
10666
10670
  }, 200);
10667
10671
  }
@@ -10669,39 +10673,39 @@ function On(e) {
10669
10673
  const t = ft == null ? void 0 : ft.querySelector("[data-ap-badge]");
10670
10674
  t && (e > 0 ? (t.textContent = String(e), t.style.display = "") : t.style.display = "none");
10671
10675
  }
10672
- function gl() {
10676
+ function ml() {
10673
10677
  Xn = !1, Pt = !1, Lo(), Kn(), Ao && (clearInterval(Ao), Ao = null), Dr && (window.removeEventListener("pointerdown", Dr, { capture: !0 }), Dr = null), $ && en($), $ == null || $.remove(), $ = null, Mt = null, hn = null, fn = null, ft = null, Bn = null, Gn = null, Wn = null, Co = null, Po = null, Ro = null;
10674
10678
  }
10675
- function ml(e, t) {
10679
+ function bl(e, t) {
10676
10680
  return z(this, null, function* () {
10677
10681
  try {
10678
10682
  if (e.type === "planning") {
10679
- const r = yield ym(t, e.id);
10683
+ const r = yield xm(t, e.id);
10680
10684
  return { capture: e, status: r.status, approved: r.status === "approved" };
10681
10685
  }
10682
- const n = yield Nc(t, e.id);
10686
+ const n = yield Dc(t, e.id);
10683
10687
  return { capture: e, status: n.status, approved: n.approved === !0 };
10684
10688
  } catch (n) {
10685
10689
  return { capture: e, status: "unavailable", approved: !1 };
10686
10690
  }
10687
10691
  });
10688
10692
  }
10689
- function bl(e) {
10693
+ function kl(e) {
10690
10694
  return e.filter((t) => !t.approved).length;
10691
10695
  }
10692
- function kl(e) {
10696
+ function _l(e) {
10693
10697
  return z(this, null, function* () {
10694
10698
  const t = hr();
10695
10699
  if (!e || t.length === 0) {
10696
10700
  On(t.length);
10697
10701
  return;
10698
10702
  }
10699
- const n = yield Promise.all(t.map((r) => ml(r, e)));
10700
- On(bl(n));
10703
+ const n = yield Promise.all(t.map((r) => bl(r, e)));
10704
+ On(kl(n));
10701
10705
  });
10702
10706
  }
10703
10707
  let dn = null;
10704
- function Vk() {
10708
+ function Xk() {
10705
10709
  const e = new Uint32Array(4);
10706
10710
  return crypto.getRandomValues(e), Array.from(e, (t) => t.toString(16)).join("");
10707
10711
  }
@@ -10710,7 +10714,7 @@ function Bs(e) {
10710
10714
  const d = dn;
10711
10715
  d.cleanup(), d.popup.closed || d.popup.close(), dn = null;
10712
10716
  }
10713
- const t = e.replace(/\/+$/, ""), n = new URL(t).origin, r = Vk(), o = window.location.origin, i = `${t}/oauth/authorize?origin=${encodeURIComponent(o)}&state=${encodeURIComponent(r)}`, a = window.open(i, "ap-sdk-oauth", "width=480,height=640");
10717
+ const t = e.replace(/\/+$/, ""), n = new URL(t).origin, r = Xk(), o = window.location.origin, i = `${t}/oauth/authorize?origin=${encodeURIComponent(o)}&state=${encodeURIComponent(r)}`, a = window.open(i, "ap-sdk-oauth", "width=480,height=640");
10714
10718
  return a ? new Promise((d, l) => {
10715
10719
  let p = !1;
10716
10720
  function h() {
@@ -10728,27 +10732,27 @@ function Bs(e) {
10728
10732
  dn = { popup: a, cleanup: h };
10729
10733
  }) : Promise.reject(new Error("Popup blocked — please allow popups for this site and try again."));
10730
10734
  }
10731
- const Yk = "https://agent-platform.tung.engineering", bi = "ap-sdk-config";
10732
- function Xk() {
10735
+ const Kk = "https://agent-platform.tung.engineering", bi = "ap-sdk-config";
10736
+ function Qk() {
10733
10737
  try {
10734
10738
  const e = sessionStorage.getItem(bi);
10735
10739
  if (!e) return null;
10736
10740
  const t = JSON.parse(e);
10737
- return !(t != null && t.backendUrl) || !(t != null && t.token) || !(t != null && t.projectCode) || !(t != null && t.expiresAt) ? null : new Date(t.expiresAt).getTime() <= Date.now() ? (_l(), null) : t;
10741
+ return !(t != null && t.backendUrl) || !(t != null && t.token) || !(t != null && t.projectCode) || !(t != null && t.expiresAt) ? null : new Date(t.expiresAt).getTime() <= Date.now() ? (vl(), null) : t;
10738
10742
  } catch (e) {
10739
10743
  return null;
10740
10744
  }
10741
10745
  }
10742
10746
  function rs(e) {
10743
- sessionStorage.setItem(bi, JSON.stringify(e)), Qk({ backendUrl: e.backendUrl, projectCode: e.projectCode });
10747
+ sessionStorage.setItem(bi, JSON.stringify(e)), t_({ backendUrl: e.backendUrl, projectCode: e.projectCode });
10744
10748
  }
10745
- function _l() {
10749
+ function vl() {
10746
10750
  sessionStorage.removeItem(bi);
10747
10751
  }
10748
- const vl = "ap-sdk-last-connection";
10749
- function Kk() {
10752
+ const yl = "ap-sdk-last-connection";
10753
+ function e_() {
10750
10754
  try {
10751
- const e = localStorage.getItem(vl);
10755
+ const e = localStorage.getItem(yl);
10752
10756
  if (!e) return null;
10753
10757
  const t = JSON.parse(e);
10754
10758
  return !(t != null && t.backendUrl) || !(t != null && t.projectCode) ? null : t;
@@ -10756,9 +10760,9 @@ function Kk() {
10756
10760
  return null;
10757
10761
  }
10758
10762
  }
10759
- function Qk(e) {
10763
+ function t_(e) {
10760
10764
  try {
10761
- localStorage.setItem(vl, JSON.stringify(e));
10765
+ localStorage.setItem(yl, JSON.stringify(e));
10762
10766
  } catch (t) {
10763
10767
  }
10764
10768
  }
@@ -10768,8 +10772,8 @@ function Jt() {
10768
10772
  }
10769
10773
  function ki(e) {
10770
10774
  X && Jt(), X = document.createElement("div"), X.className = "ap-sdk-panel", X.setAttribute("data-ap-sdk", "1"), X.setAttribute("role", "dialog"), X.setAttribute("aria-modal", "true"), X.setAttribute("aria-label", "Connect to Agent Platform");
10771
- const t = Kk();
10772
- t ? n(t) : r(Yk), document.body.appendChild(X), Qt(X);
10775
+ const t = e_();
10776
+ t ? n(t) : r(Kk), document.body.appendChild(X), Qt(X);
10773
10777
  function n(i) {
10774
10778
  if (!X) return;
10775
10779
  X.innerHTML = `
@@ -10938,7 +10942,7 @@ function jr() {
10938
10942
  function qr() {
10939
10943
  W && en(W), W == null || W.remove(), W = null, Vt == null || Vt(), Vt = null, et == null || et.destroy(), et = null;
10940
10944
  }
10941
- function yl(e, t, n, r, o, i, a, d, l, p, h = null, g) {
10945
+ function wl(e, t, n, r, o, i, a, d, l, p, h = null, g) {
10942
10946
  var an, yt, xe, Te;
10943
10947
  W && qr();
10944
10948
  const m = !n.backendUrl || !n.token, k = ga(h, "tasks:write"), w = ga(h, "planning-sessions:write"), v = {
@@ -11018,7 +11022,7 @@ function yl(e, t, n, r, o, i, a, d, l, p, h = null, g) {
11018
11022
  }, { passive: !0 }), W.addEventListener("touchmove", (H) => {
11019
11023
  H.stopPropagation();
11020
11024
  }, { passive: !0 });
11021
- const Z = W.querySelector(".ap-sdk-panel__body"), K = wk(Z, n, (Te = r == null ? void 0 : r.id) != null ? Te : null);
11025
+ const Z = W.querySelector(".ap-sdk-panel__body"), K = Sk(Z, n, (Te = r == null ? void 0 : r.id) != null ? Te : null);
11022
11026
  document.body.appendChild(W), et = Gs(), v.currentPickedEl && et.update(v.currentPickedEl), Qt(W), ni(W, ti);
11023
11027
  const M = W.querySelector("[data-ap-close]"), E = W.querySelector("[data-ap-cancel]"), T = W.querySelector("[data-ap-submit]"), A = W.querySelector("[data-ap-note]"), N = W.querySelector("[data-ap-status]"), J = W.querySelectorAll("[data-ap-type]"), ye = W.querySelector("[data-ap-automate-options]"), Oe = W.querySelector("[data-ap-allow-submit]"), Be = W.querySelector("[data-ap-pick-list]"), te = W.querySelector("[data-ap-context]"), we = W.querySelector("[data-ap-add-another]"), ot = W.querySelector("[data-ap-pick-actions]"), nn = W.querySelector("[data-ap-select-parent]"), rn = W.querySelector("[data-ap-reselect]"), dt = () => {
11024
11028
  v.currentPickedEl && (et == null || et.update(v.currentPickedEl));
@@ -11134,18 +11138,18 @@ function yl(e, t, n, r, o, i, a, d, l, p, h = null, g) {
11134
11138
  if (v.captureType === "task")
11135
11139
  Ae = (yield $s(Ne, { project: De, note: Q, ctx: v.currentCtx, advancedOpts: We })).id, ze = "task", Ue = Q.slice(0, 120) || v.currentCtx.pageTitle || "Browser capture";
11136
11140
  else if (v.captureType === "planning") {
11137
- let Ye = gd(Q, D(y({}, v.currentCtx), { ancestry: v.currentCtx.outerTree || v.currentCtx.ancestry }));
11141
+ let Ye = md(Q, D(y({}, v.currentCtx), { ancestry: v.currentCtx.outerTree || v.currentCtx.ancestry }));
11138
11142
  (Ft = v.currentCtx.innerTree) != null && Ft.trim() && (Ye += `
11139
11143
 
11140
11144
  Element tree:
11141
11145
  ${v.currentCtx.innerTree}`), (wt = v.currentCtx.interactionSteps) != null && wt.length && (Ye += `
11142
11146
 
11143
11147
  Recorded steps:
11144
- ${al(v.currentCtx.interactionSteps)}`), Ae = (yield ha(Ne, De, Ye, We)).id, ze = "planning", Ue = Q.slice(0, 120) || v.currentCtx.pageTitle || "Planning session";
11148
+ ${cl(v.currentCtx.interactionSteps)}`), Ae = (yield ha(Ne, De, Ye, We)).id, ze = "planning", Ue = Q.slice(0, 120) || v.currentCtx.pageTitle || "Planning session";
11145
11149
  } else
11146
11150
  Ae = (yield pa(Ne, { project: De, note: Q, ctx: v.currentCtx, advancedOpts: We, allowSubmit: v.allowSubmit })).id, ze = "automate", Ue = Q.slice(0, 120) || v.currentCtx.pageTitle || "Browser automation";
11147
11151
  else {
11148
- const Ye = t_(je), st = je[0].instruction.slice(0, 120) || je[0].ctx.pageTitle || "Multi-element capture", xt = je.map((Ce) => Ce.instruction).filter(Boolean).join(`
11152
+ const Ye = r_(je), st = je[0].instruction.slice(0, 120) || je[0].ctx.pageTitle || "Multi-element capture", xt = je.map((Ce) => Ce.instruction).filter(Boolean).join(`
11149
11153
 
11150
11154
  `);
11151
11155
  v.captureType === "task" ? (Ae = (yield $s(Ne, {
@@ -11166,21 +11170,21 @@ ${al(v.currentCtx.interactionSteps)}`), Ae = (yield ha(Ne, De, Ye, We)).id, ze =
11166
11170
  allowSubmit: v.allowSubmit
11167
11171
  })).id, ze = "automate", Ue = st);
11168
11172
  }
11169
- if (Ek({
11173
+ if (Ck({
11170
11174
  id: Ae,
11171
11175
  type: ze,
11172
11176
  title: Ue,
11173
11177
  backendUrl: H,
11174
11178
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
11175
- }), kl(Ne).catch(() => {
11179
+ }), _l(Ne).catch(() => {
11176
11180
  }), ze === "automate") {
11177
11181
  vt(), pi(Ae, Ne, H, Ue, p);
11178
11182
  return;
11179
11183
  }
11180
11184
  const fr = ze === "task" ? `${H.replace(/\/+$/, "")}/tasks/${Ae}` : `${H.replace(/\/+$/, "")}/planning/${Ae}`;
11181
- r_(N, ze, Ue, fr, vt), W.classList.add("ap-sdk-panel--success"), Vt == null || Vt(), Vt = null, et == null || et.hide(), v.submitting = !1, Ps(W, !1);
11185
+ s_(N, ze, Ue, fr, vt), W.classList.add("ap-sdk-panel--success"), Vt == null || Vt(), Vt = null, et == null || et.hide(), v.submitting = !1, Ps(W, !1);
11182
11186
  } catch (De) {
11183
- De instanceof $c ? n_(N, () => z(null, null, function* () {
11187
+ De instanceof $c ? o_(N, () => z(null, null, function* () {
11184
11188
  const { code: Ae } = yield Bs(H), { token: ze, expiresAt: Ue } = yield Os({ backendUrl: H }, Ae, window.location.origin);
11185
11189
  rs({ backendUrl: H, token: ze, projectCode: o, expiresAt: Ue }), n.token = ze, i({ backendUrl: H, token: ze }), yield Ge();
11186
11190
  })) : Jn(
@@ -11192,7 +11196,7 @@ ${al(v.currentCtx.interactionSteps)}`), Ae = (yield ha(Ne, De, Ye, We)).id, ze =
11192
11196
  });
11193
11197
  T.addEventListener("click", Ge), setTimeout(() => A.focus(), 50);
11194
11198
  }
11195
- const e_ = {
11199
+ const n_ = {
11196
11200
  click: "🖱",
11197
11201
  inputText: "⌨",
11198
11202
  scroll: "↕",
@@ -11205,7 +11209,7 @@ function Ha(e) {
11205
11209
  <div class="ap-sdk-panel__context-steps">
11206
11210
  ${e.interactionSteps.map((r) => `
11207
11211
  <div class="ap-sdk-panel__context-step">
11208
- <span class="ap-sdk-panel__context-step-icon">${e_[r.action]}</span>
11212
+ <span class="ap-sdk-panel__context-step-icon">${n_[r.action]}</span>
11209
11213
  <span class="ap-sdk-panel__context-step-text">${ut(r.description)}</span>
11210
11214
  </div>
11211
11215
  `).join("")}
@@ -11216,11 +11220,11 @@ function Ha(e) {
11216
11220
  ${e.cssSelector ? `<div class="ap-sdk-panel__context-selector" title="${ut(e.cssSelector)}">${ut(e.cssSelector)}</div>` : ""}
11217
11221
  `;
11218
11222
  }
11219
- function t_(e) {
11223
+ function r_(e) {
11220
11224
  return e.map((t, n) => {
11221
11225
  var o, i;
11222
11226
  const r = [`## Pick ${n + 1}`, ""];
11223
- return (o = t.ctx.interactionSteps) != null && o.length ? r.push("Recorded steps:", al(t.ctx.interactionSteps)) : (r.push(`Element: ${t.ctx.elementText || "(no text)"}`), t.ctx.cssSelector && r.push(`Selector: ${t.ctx.cssSelector}`), t.ctx.ancestry && r.push(`Ancestry: ${t.ctx.ancestry}`)), r.push(`Page: ${t.ctx.pageTitle} (${t.ctx.pageUrl})`), (i = t.ctx.innerTree) != null && i.trim() && r.push(`
11227
+ return (o = t.ctx.interactionSteps) != null && o.length ? r.push("Recorded steps:", cl(t.ctx.interactionSteps)) : (r.push(`Element: ${t.ctx.elementText || "(no text)"}`), t.ctx.cssSelector && r.push(`Selector: ${t.ctx.cssSelector}`), t.ctx.ancestry && r.push(`Ancestry: ${t.ctx.ancestry}`)), r.push(`Page: ${t.ctx.pageTitle} (${t.ctx.pageUrl})`), (i = t.ctx.innerTree) != null && i.trim() && r.push(`
11224
11228
  Element tree:
11225
11229
  ${t.ctx.innerTree}`), r.push("", `Instruction:
11226
11230
  ${t.instruction}`), r.join(`
@@ -11238,7 +11242,7 @@ function Jn(e, t, n) {
11238
11242
  }
11239
11243
  e.style.display = "block", e.className = `ap-sdk-panel__status ap-sdk-panel__status--${t}`, e.textContent = n;
11240
11244
  }
11241
- function n_(e, t) {
11245
+ function o_(e, t) {
11242
11246
  e.style.display = "block", e.className = "ap-sdk-panel__status ap-sdk-panel__status--error", e.innerHTML = `
11243
11247
  <p>Your session expired.</p>
11244
11248
  <button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-reconnect type="button">Reconnect</button>
@@ -11253,7 +11257,7 @@ function n_(e, t) {
11253
11257
  }
11254
11258
  }));
11255
11259
  }
11256
- function r_(e, t, n, r, o) {
11260
+ function s_(e, t, n, r, o) {
11257
11261
  const i = t === "task" ? "Task" : "Planning", a = t === "task" ? "Task created successfully!" : "Planning session created!", d = t === "task" ? "View task →" : "View planning session →", l = n.length > 55 ? `${n.slice(0, 52)}…` : n;
11258
11262
  e.style.display = "block", e.className = "ap-sdk-panel__status", e.innerHTML = `
11259
11263
  <div class="ap-sdk-success-card">
@@ -11284,16 +11288,16 @@ function ut(e) {
11284
11288
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
11285
11289
  }
11286
11290
  let ae = null;
11287
- function wl() {
11291
+ function xl() {
11288
11292
  return ae !== null;
11289
11293
  }
11290
11294
  function zn() {
11291
11295
  ae && en(ae), ae == null || ae.remove(), ae = null;
11292
11296
  }
11293
- function o_(e) {
11297
+ function i_(e) {
11294
11298
  return e === "task" ? "Task" : e === "planning" ? "Planning" : "Automate";
11295
11299
  }
11296
- function s_(e) {
11300
+ function a_(e) {
11297
11301
  if (ae) {
11298
11302
  zn();
11299
11303
  return;
@@ -11320,7 +11324,7 @@ function s_(e) {
11320
11324
  }), ae.querySelector("[data-ap-close-list]").addEventListener("click", () => {
11321
11325
  zn();
11322
11326
  }), ae.querySelector("[data-ap-clear-history]").addEventListener("click", () => {
11323
- Ak(), On(0), Fa(e);
11327
+ Pk(), On(0), Fa(e);
11324
11328
  }), Fa(e);
11325
11329
  }
11326
11330
  function Fa(e) {
@@ -11334,19 +11338,19 @@ function Fa(e) {
11334
11338
  (r) => `
11335
11339
  <div class="ap-sdk-list-item">
11336
11340
  <div class="ap-sdk-list-item__row">
11337
- <span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--${r.type}">${o_(r.type)}</span>
11338
- <span class="ap-sdk-list-item__title" title="${ko(r.title)}">${c_(r.title)}</span>
11341
+ <span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--${r.type}">${i_(r.type)}</span>
11342
+ <span class="ap-sdk-list-item__title" title="${ko(r.title)}">${u_(r.title)}</span>
11339
11343
  </div>
11340
11344
  <div class="ap-sdk-list-item__row">
11341
11345
  <span class="ap-sdk-status-badge" data-ap-status="${ko(r.id)}">${e ? "…" : "—"}</span>
11342
- ${r.type === "automate" && e ? `<button class="ap-sdk-list-item__link" data-ap-resume="${ko(r.id)}">Resume →</button>` : `<a class="ap-sdk-list-item__link" href="${ko(a_(r))}" target="_blank" rel="noopener noreferrer">View →</a>`}
11346
+ ${r.type === "automate" && e ? `<button class="ap-sdk-list-item__link" data-ap-resume="${ko(r.id)}">Resume →</button>` : `<a class="ap-sdk-list-item__link" href="${ko(l_(r))}" target="_blank" rel="noopener noreferrer">View →</a>`}
11343
11347
  </div>
11344
11348
  </div>
11345
11349
  `
11346
11350
  ).join(""), e) {
11347
11351
  const r = e;
11348
- Promise.all(n.map((o) => i_(o, r))).then((o) => {
11349
- On(bl(o));
11352
+ Promise.all(n.map((o) => c_(o, r))).then((o) => {
11353
+ On(kl(o));
11350
11354
  }), t.querySelectorAll("[data-ap-resume]").forEach((o) => {
11351
11355
  o.addEventListener("click", () => {
11352
11356
  const i = o.dataset.apResume, a = n.find((d) => d.id === i);
@@ -11356,39 +11360,39 @@ function Fa(e) {
11356
11360
  });
11357
11361
  }
11358
11362
  }
11359
- function i_(e, t) {
11363
+ function c_(e, t) {
11360
11364
  return z(this, null, function* () {
11361
- const n = yield ml(e, t), r = ae == null ? void 0 : ae.querySelector(`[data-ap-status="${CSS.escape(e.id)}"]`);
11365
+ const n = yield bl(e, t), r = ae == null ? void 0 : ae.querySelector(`[data-ap-status="${CSS.escape(e.id)}"]`);
11362
11366
  return r && (r.textContent = n.status.replace(/_/g, " "), r.className = `ap-sdk-status-badge ap-sdk-status-badge--${n.status.replace(/_/g, "-")}`), n;
11363
11367
  });
11364
11368
  }
11365
- function a_(e) {
11369
+ function l_(e) {
11366
11370
  const t = e.backendUrl.replace(/\/+$/, "");
11367
11371
  return e.type === "planning" ? `${t}/planning/${e.id}` : `${t}/tasks/${e.id}`;
11368
11372
  }
11369
11373
  function ko(e) {
11370
11374
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
11371
11375
  }
11372
- function c_(e) {
11376
+ function u_(e) {
11373
11377
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
11374
11378
  }
11375
11379
  let bt = null, Wo = !1;
11376
- function l_() {
11380
+ function d_() {
11377
11381
  bt == null || bt.disconnect(), Array.from(document.body.querySelectorAll(':scope > [data-ap-sdk="1"]')).forEach((e) => document.body.appendChild(e)), bt && bt.observe(document.body, { childList: !0 }), Wo = !1;
11378
11382
  }
11379
- function xl() {
11383
+ function Sl() {
11380
11384
  bt || (bt = new MutationObserver((e) => {
11381
11385
  !e.some(
11382
11386
  (n) => Array.from(n.addedNodes).some(
11383
11387
  (r) => r instanceof Element && r.getAttribute("data-ap-sdk") !== "1"
11384
11388
  )
11385
- ) || Wo || (Wo = !0, queueMicrotask(l_));
11389
+ ) || Wo || (Wo = !0, queueMicrotask(d_));
11386
11390
  }), bt.observe(document.body, { childList: !0 }));
11387
11391
  }
11388
- function u_() {
11392
+ function p_() {
11389
11393
  bt == null || bt.disconnect(), bt = null, Wo = !1;
11390
11394
  }
11391
- const d_ = {
11395
+ const h_ = {
11392
11396
  click: "🖱",
11393
11397
  inputText: "⌨",
11394
11398
  scroll: "↕",
@@ -11398,7 +11402,7 @@ let Re = null, gn = [];
11398
11402
  function zo() {
11399
11403
  Re && en(Re), Re == null || Re.remove(), Re = null, gn = [];
11400
11404
  }
11401
- function p_(e, t, n) {
11405
+ function f_(e, t, n) {
11402
11406
  Re && zo(), gn = [...e], Re = document.createElement("div"), Re.className = "ap-sdk-panel ap-sdk-record-review", Re.setAttribute("data-ap-sdk", "1"), Re.setAttribute("role", "dialog"), Re.setAttribute("aria-modal", "true"), Re.setAttribute("aria-label", "Review recorded steps"), Re.innerHTML = `
11403
11407
  <div class="ap-sdk-panel__header">
11404
11408
  <span class="ap-sdk-panel__title">
@@ -11424,8 +11428,8 @@ function p_(e, t, n) {
11424
11428
  var p;
11425
11429
  return `
11426
11430
  <div class="ap-sdk-record-step" data-step-index="${l}">
11427
- <span class="ap-sdk-record-step__icon">${d_[d.action]}</span>
11428
- ${d.action === "inputText" && !d.redacted ? `<input class="ap-sdk-record-step__input" type="text" value="${h_((p = d.value) != null ? p : "")}" data-ap-step-value />` : `<span class="ap-sdk-record-step__description">${Sl(d.description)}</span>`}
11431
+ <span class="ap-sdk-record-step__icon">${h_[d.action]}</span>
11432
+ ${d.action === "inputText" && !d.redacted ? `<input class="ap-sdk-record-step__input" type="text" value="${g_((p = d.value) != null ? p : "")}" data-ap-step-value />` : `<span class="ap-sdk-record-step__description">${Tl(d.description)}</span>`}
11429
11433
  <button class="ap-sdk-record-step__remove" data-ap-step-remove="${l}" aria-label="Remove step ${l + 1}">✕</button>
11430
11434
  </div>
11431
11435
  `;
@@ -11439,7 +11443,7 @@ function p_(e, t, n) {
11439
11443
  d.addEventListener("input", () => {
11440
11444
  var g;
11441
11445
  const h = gn[p];
11442
- h.value = d.value, h.description = il((g = h.elementText) != null ? g : "", d.value, !1);
11446
+ h.value = d.value, h.description = al((g = h.elementText) != null ? g : "", d.value, !1);
11443
11447
  });
11444
11448
  });
11445
11449
  };
@@ -11457,35 +11461,35 @@ function p_(e, t, n) {
11457
11461
  zo(), t(l);
11458
11462
  });
11459
11463
  }
11460
- function Sl(e) {
11464
+ function Tl(e) {
11461
11465
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
11462
11466
  }
11463
- function h_(e) {
11464
- return Sl(e);
11467
+ function g_(e) {
11468
+ return Tl(e);
11465
11469
  }
11466
11470
  let q = null, Jo = null, Vo = null, Yo = null;
11467
11471
  function _i(e, t, n) {
11468
- Jo = e, Vo = t, Yo = n, fl(e, t, n);
11472
+ Jo = e, Vo = t, Yo = n, gl(e, t, n);
11469
11473
  }
11470
- const Tl = "#agent-platform-web-sdk", El = "ap-sdk-fab-unlocked";
11474
+ const El = "#agent-platform-web-sdk", Al = "ap-sdk-fab-unlocked";
11471
11475
  let Ln = null;
11472
- function Al() {
11476
+ function Cl() {
11473
11477
  try {
11474
- if (localStorage.getItem(El) === "1") return !0;
11478
+ if (localStorage.getItem(Al) === "1") return !0;
11475
11479
  } catch (e) {
11476
11480
  }
11477
- return window.location.hash === Tl;
11481
+ return window.location.hash === El;
11478
11482
  }
11479
11483
  function Ba() {
11480
11484
  try {
11481
- localStorage.setItem(El, "1");
11485
+ localStorage.setItem(Al, "1");
11482
11486
  } catch (e) {
11483
11487
  }
11484
11488
  }
11485
- function f_(e) {
11489
+ function m_(e) {
11486
11490
  return z(this, null, function* () {
11487
11491
  var t, n, r, o;
11488
- if (Hr(), !(q && q.projectCode === e.projectCode && q.backendUrl === ((t = e.backendUrl) != null ? t : null) && q.token === ((n = e.token) != null ? n : null))) {
11492
+ if (Hr(), e.requestTimeoutMs != null && km(e.requestTimeoutMs), !(q && q.projectCode === e.projectCode && q.backendUrl === ((t = e.backendUrl) != null ? t : null) && q.token === ((n = e.token) != null ? n : null))) {
11489
11493
  if (q = {
11490
11494
  projectCode: e.projectCode,
11491
11495
  backendUrl: (r = e.backendUrl) != null ? r : null,
@@ -11494,15 +11498,15 @@ function f_(e) {
11494
11498
  resolvingProject: !1,
11495
11499
  permissions: null
11496
11500
  }, _i(
11497
- () => g_(),
11498
- () => m_(),
11501
+ () => b_(),
11502
+ () => k_(),
11499
11503
  () => vi()
11500
11504
  ), On(hr().length), q.backendUrl && q.token) {
11501
11505
  const i = q.backendUrl, a = q.token;
11502
- yield Rl(), kl({ backendUrl: i, token: a }).catch(() => {
11503
- }), Pl({ backendUrl: i, token: a }).catch(() => {
11506
+ yield Ll(), _l({ backendUrl: i, token: a }).catch(() => {
11507
+ }), Rl({ backendUrl: i, token: a }).catch(() => {
11504
11508
  });
11505
- const d = Dm();
11509
+ const d = jm();
11506
11510
  d && pi(
11507
11511
  d.taskId,
11508
11512
  { backendUrl: i, token: a },
@@ -11512,30 +11516,30 @@ function f_(e) {
11512
11516
  }
11513
11517
  );
11514
11518
  }
11515
- xl();
11519
+ Sl();
11516
11520
  }
11517
11521
  });
11518
11522
  }
11519
- function Cl(e, t) {
11523
+ function Pl(e, t) {
11520
11524
  return z(this, null, function* () {
11521
11525
  if (!q) throw new Error("AgentPlatformSDK: call init() first.");
11522
- q.backendUrl = e, q.token = t, q.project = null, q.permissions = null, yield Rl(), Pl({ backendUrl: e, token: t }).catch(() => {
11526
+ q.backendUrl = e, q.token = t, q.project = null, q.permissions = null, yield Ll(), Rl({ backendUrl: e, token: t }).catch(() => {
11523
11527
  });
11524
11528
  });
11525
11529
  }
11526
- function g_() {
11530
+ function b_() {
11527
11531
  if (!q) throw new Error("AgentPlatformSDK: call init() first.");
11528
11532
  if (tr()) return;
11529
11533
  Hr();
11530
11534
  const e = (t, n, r) => {
11531
- yl(
11535
+ wl(
11532
11536
  t,
11533
11537
  n,
11534
11538
  { backendUrl: q.backendUrl, token: q.token },
11535
11539
  q.project,
11536
11540
  q.projectCode,
11537
11541
  (o) => z(null, null, function* () {
11538
- yield Cl(o.backendUrl, o.token);
11542
+ yield Pl(o.backendUrl, o.token);
11539
11543
  }),
11540
11544
  // onReconfigure: run the OAuth connect flow, then reopen the panel with the
11541
11545
  // draft that was in progress instead of discarding it — this is what lets
@@ -11552,7 +11556,7 @@ function g_() {
11552
11556
  jr() && o(i, a);
11553
11557
  },
11554
11558
  () => {
11555
- b_();
11559
+ __();
11556
11560
  }
11557
11561
  );
11558
11562
  },
@@ -11579,28 +11583,28 @@ function g_() {
11579
11583
  };
11580
11584
  bs(
11581
11585
  (t, n) => z(null, null, function* () {
11582
- wl() && zn(), e(t, n);
11586
+ xl() && zn(), e(t, n);
11583
11587
  }),
11584
11588
  () => {
11585
11589
  }
11586
11590
  );
11587
11591
  }
11588
- function S_() {
11592
+ function E_() {
11589
11593
  Ws();
11590
11594
  }
11591
- function m_() {
11595
+ function k_() {
11592
11596
  if (!q) throw new Error("AgentPlatformSDK: call init() first.");
11593
11597
  if (Eo()) return;
11594
11598
  Hr();
11595
11599
  const e = (t, n) => {
11596
- yl(
11600
+ wl(
11597
11601
  t,
11598
11602
  null,
11599
11603
  { backendUrl: q.backendUrl, token: q.token },
11600
11604
  q.project,
11601
11605
  q.projectCode,
11602
11606
  (r) => z(null, null, function* () {
11603
- yield Cl(r.backendUrl, r.token);
11607
+ yield Pl(r.backendUrl, r.token);
11604
11608
  }),
11605
11609
  // onReconfigure: run the OAuth connect flow, then reopen the panel with the
11606
11610
  // draft that was in progress instead of discarding it.
@@ -11617,55 +11621,55 @@ function m_() {
11617
11621
  n
11618
11622
  );
11619
11623
  };
11620
- Nk(
11624
+ Mk(
11621
11625
  (t) => {
11622
- p_(
11626
+ f_(
11623
11627
  t,
11624
11628
  (n) => e(n)
11625
11629
  );
11626
11630
  }
11627
11631
  );
11628
11632
  }
11629
- function b_() {
11633
+ function __() {
11630
11634
  jr() && qr();
11631
11635
  }
11632
- function T_() {
11636
+ function A_() {
11633
11637
  return tr();
11634
11638
  }
11635
- function k_() {
11636
- u_(), Ln && (window.removeEventListener("hashchange", Ln), Ln = null), Ws(), Dk(), zo(), qr(), zn(), gl(), Jo = null, Vo = null, Yo = null, q = null;
11639
+ function v_() {
11640
+ p_(), Ln && (window.removeEventListener("hashchange", Ln), Ln = null), Ws(), jk(), zo(), qr(), zn(), ml(), Jo = null, Vo = null, Yo = null, q = null;
11637
11641
  }
11638
- function __() {
11642
+ function y_() {
11639
11643
  if (typeof window == "undefined" || typeof document == "undefined") return;
11640
11644
  Hr();
11641
- const e = Xk(), t = () => {
11645
+ const e = Qk(), t = () => {
11642
11646
  e ? os(e).catch(console.error) : (_i(
11643
11647
  () => Xo(),
11644
11648
  () => Xo(),
11645
11649
  () => vi()
11646
- ), On(hr().length), xl());
11650
+ ), On(hr().length), Sl());
11647
11651
  };
11648
- if (Al()) {
11652
+ if (Cl()) {
11649
11653
  Ba(), t();
11650
11654
  return;
11651
11655
  }
11652
11656
  Ln = () => {
11653
- window.location.hash === Tl && (Ba(), window.removeEventListener("hashchange", Ln), Ln = null, t());
11657
+ window.location.hash === El && (Ba(), window.removeEventListener("hashchange", Ln), Ln = null, t());
11654
11658
  }, window.addEventListener("hashchange", Ln);
11655
11659
  }
11656
- function E_() {
11657
- Jo && Vo && Yo && fl(Jo, Vo, Yo);
11660
+ function C_() {
11661
+ Jo && Vo && Yo && gl(Jo, Vo, Yo);
11658
11662
  }
11659
- function A_() {
11660
- gl();
11663
+ function P_() {
11664
+ ml();
11661
11665
  }
11662
11666
  function Xo() {
11663
11667
  ki((e) => {
11664
11668
  rs(e), os(e).catch(console.error);
11665
11669
  });
11666
11670
  }
11667
- function C_() {
11668
- _l(), k_(), Hr(), Al() && (_i(
11671
+ function R_() {
11672
+ vl(), v_(), Hr(), Cl() && (_i(
11669
11673
  () => Xo(),
11670
11674
  () => Xo(),
11671
11675
  () => vi()
@@ -11673,7 +11677,7 @@ function C_() {
11673
11677
  }
11674
11678
  function os(e) {
11675
11679
  return z(this, null, function* () {
11676
- yield f_({
11680
+ yield m_({
11677
11681
  projectCode: e.projectCode,
11678
11682
  backendUrl: e.backendUrl,
11679
11683
  token: e.token
@@ -11681,26 +11685,26 @@ function os(e) {
11681
11685
  });
11682
11686
  }
11683
11687
  function vi() {
11684
- if (wl()) {
11688
+ if (xl()) {
11685
11689
  zn();
11686
11690
  return;
11687
11691
  }
11688
11692
  jr() && qr();
11689
11693
  const e = q != null && q.backendUrl && (q != null && q.token) ? { backendUrl: q.backendUrl, token: q.token } : null;
11690
- s_(e);
11694
+ a_(e);
11691
11695
  }
11692
- function Pl(e) {
11696
+ function Rl(e) {
11693
11697
  return z(this, null, function* () {
11694
- const t = yield wm(e);
11698
+ const t = yield Sm(e);
11695
11699
  q && (q.permissions = t.permissions);
11696
11700
  });
11697
11701
  }
11698
- function Rl() {
11702
+ function Ll() {
11699
11703
  return z(this, null, function* () {
11700
11704
  if (!(!q || !q.backendUrl || !q.token || q.project || q.resolvingProject)) {
11701
11705
  q.resolvingProject = !0;
11702
11706
  try {
11703
- q.project = yield bm(
11707
+ q.project = yield _m(
11704
11708
  { backendUrl: q.backendUrl, token: q.token },
11705
11709
  q.projectCode
11706
11710
  );
@@ -11711,19 +11715,19 @@ function Rl() {
11711
11715
  }
11712
11716
  });
11713
11717
  }
11714
- __();
11718
+ y_();
11715
11719
  export {
11716
- g_ as activateElementPicker,
11717
- __ as autoInit,
11718
- C_ as clearConfig,
11719
- b_ as closePanelIfOpen,
11720
+ b_ as activateElementPicker,
11721
+ y_ as autoInit,
11722
+ R_ as clearConfig,
11723
+ __ as closePanelIfOpen,
11720
11724
  Xo as configure,
11721
- S_ as deactivateElementPicker,
11722
- k_ as destroy,
11723
- A_ as hideFab,
11724
- f_ as init,
11725
- T_ as isPickerRunning,
11726
- E_ as showFab,
11727
- Cl as updateCredentials
11725
+ E_ as deactivateElementPicker,
11726
+ v_ as destroy,
11727
+ P_ as hideFab,
11728
+ m_ as init,
11729
+ A_ as isPickerRunning,
11730
+ C_ as showFab,
11731
+ Pl as updateCredentials
11728
11732
  };
11729
11733
  //# sourceMappingURL=web-sdk.mjs.map