@tung-engineering/agent-platform-web-sdk 0.0.73 → 0.0.75

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
@@ -272,6 +272,43 @@ const ju = `
272
272
  background: oklch(95% 0.035 50);
273
273
  }
274
274
 
275
+ /* Destructive actions (e.g. reject) use a separate red scale instead of the
276
+ brand accent, so they read as visually distinct from affirmative actions
277
+ like approve even though both can appear filled/outlined side by side. */
278
+ .ap-sdk-panel__btn--danger {
279
+ background: #dc2626;
280
+ color: #fff;
281
+ }
282
+
283
+ .ap-sdk-panel__btn--danger:hover:not(:disabled) {
284
+ background: #b91c1c;
285
+ }
286
+
287
+ .ap-sdk-panel__btn--danger-ghost {
288
+ background: transparent;
289
+ color: #b91c1c;
290
+ border: 1px solid #dc2626;
291
+ flex: 0 0 auto;
292
+ padding: 8px 16px;
293
+ }
294
+
295
+ .ap-sdk-panel__btn--danger-ghost:hover:not(:disabled) {
296
+ border-color: #b91c1c;
297
+ color: #b91c1c;
298
+ background: #fef2f2;
299
+ }
300
+
301
+ /* Full-width, roomier variant for stacked action layouts (e.g. the
302
+ automation summary card) — overrides the compact default padding/
303
+ flex sizing of whichever color variant it's paired with. */
304
+ .ap-sdk-panel__btn--block {
305
+ width: 100%;
306
+ flex: none;
307
+ padding: 11px 16px;
308
+ font-size: 14px;
309
+ border-radius: 10px;
310
+ }
311
+
275
312
  .ap-sdk-panel__btn:disabled {
276
313
  opacity: 0.55;
277
314
  cursor: not-allowed;
@@ -975,7 +1012,7 @@ button.ap-sdk-list-item__link {
975
1012
  .ap-sdk-status-link:hover {
976
1013
  color: oklch(47% 0.13 40);
977
1014
  }
978
- `, Yu = `
1015
+ `, Vu = `
979
1016
  .ap-sdk-record-review__list {
980
1017
  max-height: 320px;
981
1018
  overflow-y: auto;
@@ -1036,7 +1073,7 @@ button.ap-sdk-list-item__link {
1036
1073
  color: #ef4444;
1037
1074
  background: #fee2e2;
1038
1075
  }
1039
- `, Xu = `
1076
+ `, Yu = `
1040
1077
  @keyframes ap-sdk-card-in {
1041
1078
  from { opacity: 0; transform: scale(0.97); }
1042
1079
  to { opacity: 1; transform: scale(1); }
@@ -1115,17 +1152,23 @@ button.ap-sdk-list-item__link {
1115
1152
  flex: 1;
1116
1153
  white-space: nowrap;
1117
1154
  }
1118
- `, Vu = `
1155
+ `, Xu = `
1119
1156
  .ap-sdk-runner__approval {
1120
- margin-top: 10px;
1157
+ margin-top: 14px;
1121
1158
  display: flex;
1122
1159
  flex-direction: column;
1123
- gap: 8px;
1160
+ gap: 10px;
1124
1161
  width: 100%;
1125
1162
  }
1126
1163
 
1164
+ /* Approve is the one prominent full-width action; Reject is demoted to a
1165
+ small centered text link below it rather than a second full button, so
1166
+ the decision reads as "one clear primary choice, one quiet way out"
1167
+ instead of two competing buttons crammed into a row. */
1127
1168
  .ap-sdk-runner__approval-actions {
1128
1169
  display: flex;
1170
+ flex-direction: column;
1171
+ align-items: center;
1129
1172
  gap: 8px;
1130
1173
  width: 100%;
1131
1174
  }
@@ -1133,7 +1176,16 @@ button.ap-sdk-list-item__link {
1133
1176
  .ap-sdk-runner__reject-form {
1134
1177
  display: flex;
1135
1178
  flex-direction: column;
1136
- gap: 6px;
1179
+ gap: 8px;
1180
+ }
1181
+
1182
+ /* Persistent explanation of the blank-vs-filled textarea behavior — kept as
1183
+ its own element rather than only a placeholder, since placeholders vanish
1184
+ the moment the user starts typing feedback. */
1185
+ .ap-sdk-runner__reject-hint {
1186
+ font-size: 11px;
1187
+ line-height: 1.4;
1188
+ color: #9ca3af;
1137
1189
  }
1138
1190
 
1139
1191
  .ap-sdk-runner__approval-error {
@@ -1141,6 +1193,72 @@ button.ap-sdk-list-item__link {
1141
1193
  font-size: 12px;
1142
1194
  }
1143
1195
 
1196
+ /* Separates the approve/reject decision from the always-available
1197
+ View task / Close actions below it, so the two rows don't read as one
1198
+ undifferentiated stack of buttons. */
1199
+ .ap-sdk-runner__divider {
1200
+ height: 1px;
1201
+ width: 100%;
1202
+ background: #f3f4f6;
1203
+ margin: 6px 0;
1204
+ }
1205
+
1206
+ .ap-sdk-btn-icon {
1207
+ margin-right: 5px;
1208
+ }
1209
+
1210
+ .ap-sdk-btn-icon--trailing {
1211
+ margin-right: 0;
1212
+ margin-left: 5px;
1213
+ }
1214
+
1215
+ /* Lightweight text-link treatment for secondary/rare actions (Reject, Close)
1216
+ so they read as quiet fallbacks rather than full buttons competing for
1217
+ attention with the primary Approve / View task actions above them. */
1218
+ .ap-sdk-runner__text-btn {
1219
+ background: none;
1220
+ border: none;
1221
+ padding: 4px 2px;
1222
+ font-size: 12.5px;
1223
+ font-weight: 500;
1224
+ font-family: inherit;
1225
+ cursor: pointer;
1226
+ color: #6b7280;
1227
+ text-decoration: underline;
1228
+ text-underline-offset: 2px;
1229
+ }
1230
+
1231
+ .ap-sdk-runner__text-btn:hover:not(:disabled) {
1232
+ color: #374151;
1233
+ }
1234
+
1235
+ .ap-sdk-runner__text-btn--danger {
1236
+ color: #b91c1c;
1237
+ }
1238
+
1239
+ .ap-sdk-runner__text-btn--danger:hover:not(:disabled) {
1240
+ color: #991b1b;
1241
+ }
1242
+
1243
+ .ap-sdk-runner__text-btn:disabled {
1244
+ opacity: 0.55;
1245
+ cursor: not-allowed;
1246
+ }
1247
+
1248
+ /* Stacks the View task / Close row to match the approval block above it
1249
+ (full-width primary action + a quiet text link) instead of two side-by-side
1250
+ buttons — scoped here rather than in success-card.ts's shared base classes
1251
+ so panel.ts's unrelated capture-success card is unaffected. */
1252
+ .ap-sdk-success-actions--stacked {
1253
+ flex-direction: column;
1254
+ align-items: center;
1255
+ gap: 10px;
1256
+ }
1257
+
1258
+ .ap-sdk-success-actions--stacked .ap-sdk-panel__btn {
1259
+ flex: none;
1260
+ }
1261
+
1144
1262
  .ap-sdk-runner__meta {
1145
1263
  display: flex;
1146
1264
  flex-direction: column;
@@ -1353,9 +1471,9 @@ button.ap-sdk-list-item__link {
1353
1471
  Gu,
1354
1472
  Wu,
1355
1473
  Ju,
1474
+ Vu,
1356
1475
  Yu,
1357
1476
  Xu,
1358
- Vu,
1359
1477
  Ku
1360
1478
  ].join(`
1361
1479
  `);
@@ -1560,7 +1678,7 @@ function ud(e, t) {
1560
1678
  `);
1561
1679
  }
1562
1680
  const er = /* @__PURE__ */ new Set();
1563
- let Jn = null, Io = !1, Ts = !1;
1681
+ let Jn = null, zo = !1, Ts = !1;
1564
1682
  function dd(e) {
1565
1683
  if (e.getAttribute("aria-modal") === "false") return !1;
1566
1684
  const t = getComputedStyle(e);
@@ -1604,17 +1722,17 @@ function qa() {
1604
1722
  }
1605
1723
  }
1606
1724
  }
1607
- function Ii(e) {
1725
+ function zi(e) {
1608
1726
  if (!(e instanceof Node)) return !1;
1609
1727
  for (const t of er)
1610
1728
  if (t === e || t.contains(e)) return !0;
1611
1729
  return !1;
1612
1730
  }
1613
- function Yn(e) {
1614
- (Ii(e.target) || "relatedTarget" in e && Ii(e.relatedTarget)) && e.stopPropagation();
1731
+ function Vn(e) {
1732
+ (zi(e.target) || "relatedTarget" in e && zi(e.relatedTarget)) && e.stopPropagation();
1615
1733
  }
1616
1734
  function hd() {
1617
- Io || (window.addEventListener("focusin", Yn, !0), window.addEventListener("focusout", Yn, !0), window.addEventListener("pointerdown", Yn, !0), Io = !0), !Jn && (Jn = new MutationObserver((e) => {
1735
+ zo || (window.addEventListener("focusin", Vn, !0), window.addEventListener("focusout", Vn, !0), window.addEventListener("pointerdown", Vn, !0), zo = !0), !Jn && (Jn = new MutationObserver((e) => {
1618
1736
  e.some(
1619
1737
  (n) => n.type === "childList" || n.attributeName === "open" && n.target.tagName === "DIALOG" || n.attributeName === "inert" || n.attributeName === "aria-hidden" || n.attributeName === "role"
1620
1738
  ) && qa();
@@ -1625,11 +1743,11 @@ function hd() {
1625
1743
  subtree: !0
1626
1744
  }));
1627
1745
  }
1628
- function Yt(e) {
1746
+ function Vt(e) {
1629
1747
  "showPopover" in e && (e.setAttribute("popover", "manual"), er.add(e), hd(), qa());
1630
1748
  }
1631
- function Xt(e) {
1632
- if (er.delete(e), er.size === 0 && (Jn && (Jn.disconnect(), Jn = null), Io && (window.removeEventListener("focusin", Yn, !0), window.removeEventListener("focusout", Yn, !0), window.removeEventListener("pointerdown", Yn, !0), Io = !1), Ts = !1), "hidePopover" in e)
1749
+ function Yt(e) {
1750
+ if (er.delete(e), er.size === 0 && (Jn && (Jn.disconnect(), Jn = null), zo && (window.removeEventListener("focusin", Vn, !0), window.removeEventListener("focusout", Vn, !0), window.removeEventListener("pointerdown", Vn, !0), zo = !1), Ts = !1), "hidePopover" in e)
1633
1751
  try {
1634
1752
  e.hidePopover();
1635
1753
  } catch (t) {
@@ -1637,13 +1755,13 @@ function Xt(e) {
1637
1755
  }
1638
1756
  function Us(e = "ap-sdk-highlight") {
1639
1757
  const t = document.createElement("div");
1640
- return t.className = e, t.setAttribute("data-ap-sdk", "1"), t.style.display = "none", document.body.appendChild(t), Yt(t), { el: t, update: (i) => {
1758
+ return t.className = e, t.setAttribute("data-ap-sdk", "1"), t.style.display = "none", document.body.appendChild(t), Vt(t), { el: t, update: (i) => {
1641
1759
  const a = i.getBoundingClientRect();
1642
1760
  t.style.top = `${a.top}px`, t.style.left = `${a.left}px`, t.style.width = `${a.width}px`, t.style.height = `${a.height}px`, t.style.display = "block";
1643
1761
  }, hide: () => {
1644
1762
  t.style.display = "none";
1645
1763
  }, destroy: () => {
1646
- Xt(t), t.remove();
1764
+ Yt(t), t.remove();
1647
1765
  } };
1648
1766
  }
1649
1767
  const Ha = /^cc-|current-password|new-password/i, fd = /token|secret|password|apikey|auth/i, ps = "[redacted]";
@@ -1663,7 +1781,7 @@ function Fa(e) {
1663
1781
  }
1664
1782
  }
1665
1783
  const md = "🎯 Click any element to capture";
1666
- let ln = null, Ie = null, Ue = null;
1784
+ let ln = null, ze = null, Ue = null;
1667
1785
  function Lr(e) {
1668
1786
  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;
1669
1787
  }
@@ -1671,7 +1789,7 @@ function bd() {
1671
1789
  var e, t;
1672
1790
  return ((t = (e = window.matchMedia) == null ? void 0 : e.call(window, "(pointer: coarse)").matches) != null ? t : !1) || "ontouchstart" in window;
1673
1791
  }
1674
- function zi(e) {
1792
+ function Ii(e) {
1675
1793
  ln == null || ln.update(e);
1676
1794
  }
1677
1795
  function Ba(e) {
@@ -1696,13 +1814,13 @@ function Ba(e) {
1696
1814
  function hs(e, t) {
1697
1815
  Ue && Ue();
1698
1816
  const n = bd();
1699
- ln = Us(), Ie = document.createElement("div"), Ie.className = "ap-sdk-picker-cursor", Ie.setAttribute("data-ap-sdk", "1"), Ie.textContent = n ? "Tap any element to preview" : md, document.body.appendChild(Ie), Yt(Ie);
1817
+ ln = Us(), ze = document.createElement("div"), ze.className = "ap-sdk-picker-cursor", ze.setAttribute("data-ap-sdk", "1"), ze.textContent = n ? "Tap any element to preview" : md, document.body.appendChild(ze), Vt(ze);
1700
1818
  let r = null, o = null;
1701
1819
  const i = (h) => {
1702
1820
  Ue == null || Ue(), e(Ba(h), h);
1703
1821
  }, a = (h) => {
1704
- if (o = h, zi(h), !Ie) return;
1705
- Ie.classList.add("ap-sdk-picker-cursor--confirm"), Ie.innerHTML = "";
1822
+ if (o = h, Ii(h), !ze) return;
1823
+ ze.classList.add("ap-sdk-picker-cursor--confirm"), ze.innerHTML = "";
1706
1824
  const g = document.createElement("span");
1707
1825
  g.className = "ap-sdk-picker-cursor__label", g.textContent = `<${h.tagName.toLowerCase()}>`;
1708
1826
  const m = document.createElement("button");
@@ -1716,9 +1834,9 @@ function hs(e, t) {
1716
1834
  const y = document.createElement("button");
1717
1835
  y.type = "button", y.className = "ap-sdk-picker-cursor__btn ap-sdk-picker-cursor__btn--primary", y.textContent = "✓ Select", y.setAttribute("data-ap-sdk", "1"), y.addEventListener("click", (E) => {
1718
1836
  E.preventDefault(), E.stopPropagation(), o && i(o);
1719
- }), Ie.appendChild(g), Ie.appendChild(m), Ie.appendChild(k), Ie.appendChild(y);
1837
+ }), ze.appendChild(g), ze.appendChild(m), ze.appendChild(k), ze.appendChild(y);
1720
1838
  }, d = (h) => {
1721
- Lr(h.target) || (r = h.target, zi(r));
1839
+ Lr(h.target) || (r = h.target, Ii(r));
1722
1840
  }, l = (h) => {
1723
1841
  var m;
1724
1842
  if (Lr(h.target)) return;
@@ -1735,13 +1853,13 @@ function hs(e, t) {
1735
1853
  h.key === "Escape" && (Ue == null || Ue(), t());
1736
1854
  };
1737
1855
  n || document.addEventListener("mouseover", d, { capture: !0 }), document.addEventListener("click", l, { capture: !0 }), document.addEventListener("keydown", p, { capture: !0 }), Ue = () => {
1738
- n || document.removeEventListener("mouseover", d, { capture: !0 }), document.removeEventListener("click", l, { capture: !0 }), document.removeEventListener("keydown", p, { capture: !0 }), Ie && Xt(Ie), Ie == null || Ie.remove(), ln == null || ln.destroy(), ln = null, Ie = null, o = null, Ue = null;
1856
+ n || document.removeEventListener("mouseover", d, { capture: !0 }), document.removeEventListener("click", l, { capture: !0 }), document.removeEventListener("keydown", p, { capture: !0 }), ze && Yt(ze), ze == null || ze.remove(), ln == null || ln.destroy(), ln = null, ze = null, o = null, Ue = null;
1739
1857
  };
1740
1858
  }
1741
1859
  function js() {
1742
1860
  Ue == null || Ue();
1743
1861
  }
1744
- function Xn() {
1862
+ function Yn() {
1745
1863
  return Ue !== null;
1746
1864
  }
1747
1865
  const io = {
@@ -1791,7 +1909,7 @@ function w(e, t, n) {
1791
1909
  }
1792
1910
  }), Object.defineProperty(a, "name", { value: e }), a;
1793
1911
  }
1794
- class Vn extends Error {
1912
+ class Xn extends Error {
1795
1913
  constructor() {
1796
1914
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
1797
1915
  }
@@ -1812,7 +1930,7 @@ function Ja(e) {
1812
1930
  function Es(e, t) {
1813
1931
  return typeof t == "bigint" ? t.toString() : t;
1814
1932
  }
1815
- function Yo(e) {
1933
+ function Vo(e) {
1816
1934
  return {
1817
1935
  get value() {
1818
1936
  {
@@ -1856,7 +1974,7 @@ function ne(e, t, n) {
1856
1974
  configurable: !0
1857
1975
  });
1858
1976
  }
1859
- function In(e, t, n) {
1977
+ function zn(e, t, n) {
1860
1978
  Object.defineProperty(e, t, {
1861
1979
  value: n,
1862
1980
  writable: !0,
@@ -1878,12 +1996,12 @@ function Oi(e) {
1878
1996
  function _d(e) {
1879
1997
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
1880
1998
  }
1881
- const Ya = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1999
+ const Va = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1882
2000
  };
1883
2001
  function Dr(e) {
1884
2002
  return typeof e == "object" && e !== null && !Array.isArray(e);
1885
2003
  }
1886
- const vd = Yo(() => {
2004
+ const vd = Vo(() => {
1887
2005
  var e;
1888
2006
  if (typeof navigator != "undefined" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
1889
2007
  return !1;
@@ -1903,7 +2021,7 @@ function tr(e) {
1903
2021
  const n = t.prototype;
1904
2022
  return !(Dr(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1905
2023
  }
1906
- function Xa(e) {
2024
+ function Ya(e) {
1907
2025
  return tr(e) ? v({}, e) : Array.isArray(e) ? [...e] : e;
1908
2026
  }
1909
2027
  const yd = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
@@ -1949,7 +2067,7 @@ function Sd(e, t) {
1949
2067
  throw new Error(`Unrecognized key: "${d}"`);
1950
2068
  t[d] && (a[d] = n.shape[d]);
1951
2069
  }
1952
- return In(this, "shape", a), a;
2070
+ return zn(this, "shape", a), a;
1953
2071
  },
1954
2072
  checks: []
1955
2073
  });
@@ -1967,7 +2085,7 @@ function Td(e, t) {
1967
2085
  throw new Error(`Unrecognized key: "${d}"`);
1968
2086
  t[d] && delete a[d];
1969
2087
  }
1970
- return In(this, "shape", a), a;
2088
+ return zn(this, "shape", a), a;
1971
2089
  },
1972
2090
  checks: []
1973
2091
  });
@@ -1986,7 +2104,7 @@ function Ed(e, t) {
1986
2104
  const o = pn(e._zod.def, {
1987
2105
  get shape() {
1988
2106
  const i = v(v({}, e._zod.def.shape), t);
1989
- return In(this, "shape", i), i;
2107
+ return zn(this, "shape", i), i;
1990
2108
  }
1991
2109
  });
1992
2110
  return hn(e, o);
@@ -1997,7 +2115,7 @@ function Ad(e, t) {
1997
2115
  const n = pn(e._zod.def, {
1998
2116
  get shape() {
1999
2117
  const r = v(v({}, e._zod.def.shape), t);
2000
- return In(this, "shape", r), r;
2118
+ return zn(this, "shape", r), r;
2001
2119
  }
2002
2120
  });
2003
2121
  return hn(e, n);
@@ -2006,7 +2124,7 @@ function Cd(e, t) {
2006
2124
  const n = pn(e._zod.def, {
2007
2125
  get shape() {
2008
2126
  const r = v(v({}, e._zod.def.shape), t._zod.def.shape);
2009
- return In(this, "shape", r), r;
2127
+ return zn(this, "shape", r), r;
2010
2128
  },
2011
2129
  get catchall() {
2012
2130
  return t._zod.def.catchall;
@@ -2038,7 +2156,7 @@ function Pd(e, t, n) {
2038
2156
  type: "optional",
2039
2157
  innerType: d[p]
2040
2158
  }) : d[p];
2041
- return In(this, "shape", l), l;
2159
+ return zn(this, "shape", l), l;
2042
2160
  },
2043
2161
  checks: []
2044
2162
  });
@@ -2063,7 +2181,7 @@ function Rd(e, t, n) {
2063
2181
  type: "nonoptional",
2064
2182
  innerType: o[a]
2065
2183
  });
2066
- return In(this, "shape", i), i;
2184
+ return zn(this, "shape", i), i;
2067
2185
  }
2068
2186
  });
2069
2187
  return hn(t, r);
@@ -2108,7 +2226,7 @@ function Mr(...e) {
2108
2226
  inst: r
2109
2227
  } : v({}, t);
2110
2228
  }
2111
- const Va = (e, t) => {
2229
+ const Xa = (e, t) => {
2112
2230
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
2113
2231
  value: e._zod,
2114
2232
  enumerable: !1
@@ -2119,14 +2237,14 @@ const Va = (e, t) => {
2119
2237
  value: () => e.message,
2120
2238
  enumerable: !1
2121
2239
  });
2122
- }, Ka = w("$ZodError", Va), Qa = w("$ZodError", Va, { Parent: Error });
2240
+ }, Ka = w("$ZodError", Xa), Qa = w("$ZodError", Xa, { Parent: Error });
2123
2241
  function Ld(e, t = (n) => n.message) {
2124
2242
  const n = {}, r = [];
2125
2243
  for (const o of e.issues)
2126
2244
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
2127
2245
  return { formErrors: r, fieldErrors: n };
2128
2246
  }
2129
- function Id(e, t = (n) => n.message) {
2247
+ function zd(e, t = (n) => n.message) {
2130
2248
  const n = { _errors: [] }, r = (o) => {
2131
2249
  for (const i of o.issues)
2132
2250
  if (i.code === "invalid_union" && i.errors.length)
@@ -2151,10 +2269,10 @@ const Fs = (e) => (t, n, r, o) => {
2151
2269
  var d;
2152
2270
  const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, a = t._zod.run({ value: n, issues: [] }, i);
2153
2271
  if (a instanceof Promise)
2154
- throw new Vn();
2272
+ throw new Xn();
2155
2273
  if (a.issues.length) {
2156
2274
  const l = new ((d = o == null ? void 0 : o.Err) != null ? d : e)(a.issues.map((p) => dn(p, i, un())));
2157
- throw Ya(l, o == null ? void 0 : o.callee), l;
2275
+ throw Va(l, o == null ? void 0 : o.callee), l;
2158
2276
  }
2159
2277
  return a.value;
2160
2278
  }, Bs = (e) => (t, n, r, o) => L(null, null, function* () {
@@ -2163,25 +2281,25 @@ const Fs = (e) => (t, n, r, o) => {
2163
2281
  let a = t._zod.run({ value: n, issues: [] }, i);
2164
2282
  if (a instanceof Promise && (a = yield a), a.issues.length) {
2165
2283
  const l = new ((d = o == null ? void 0 : o.Err) != null ? d : e)(a.issues.map((p) => dn(p, i, un())));
2166
- throw Ya(l, o == null ? void 0 : o.callee), l;
2284
+ throw Va(l, o == null ? void 0 : o.callee), l;
2167
2285
  }
2168
2286
  return a.value;
2169
- }), Xo = (e) => (t, n, r) => {
2287
+ }), Yo = (e) => (t, n, r) => {
2170
2288
  const o = r ? M(v({}, r), { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
2171
2289
  if (i instanceof Promise)
2172
- throw new Vn();
2290
+ throw new Xn();
2173
2291
  return i.issues.length ? {
2174
2292
  success: !1,
2175
2293
  error: new (e != null ? e : Ka)(i.issues.map((a) => dn(a, o, un())))
2176
2294
  } : { success: !0, data: i.value };
2177
- }, zd = /* @__PURE__ */ Xo(Qa), Vo = (e) => (t, n, r) => L(null, null, function* () {
2295
+ }, Id = /* @__PURE__ */ Yo(Qa), Xo = (e) => (t, n, r) => L(null, null, function* () {
2178
2296
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
2179
2297
  let i = t._zod.run({ value: n, issues: [] }, o);
2180
2298
  return i instanceof Promise && (i = yield i), i.issues.length ? {
2181
2299
  success: !1,
2182
2300
  error: new e(i.issues.map((a) => dn(a, o, un())))
2183
2301
  } : { success: !0, data: i.value };
2184
- }), $d = /* @__PURE__ */ Vo(Qa), Od = (e) => (t, n, r) => {
2302
+ }), $d = /* @__PURE__ */ Xo(Qa), Od = (e) => (t, n, r) => {
2185
2303
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2186
2304
  return Fs(e)(t, n, o);
2187
2305
  }, Nd = (e) => (t, n, r) => Fs(e)(t, n, r), Dd = (e) => (t, n, r) => L(null, null, function* () {
@@ -2191,13 +2309,13 @@ const Fs = (e) => (t, n, r, o) => {
2191
2309
  return Bs(e)(t, n, r);
2192
2310
  }), Ud = (e) => (t, n, r) => {
2193
2311
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2194
- return Xo(e)(t, n, o);
2195
- }, jd = (e) => (t, n, r) => Xo(e)(t, n, r), Zd = (e) => (t, n, r) => L(null, null, function* () {
2312
+ return Yo(e)(t, n, o);
2313
+ }, jd = (e) => (t, n, r) => Yo(e)(t, n, r), Zd = (e) => (t, n, r) => L(null, null, function* () {
2196
2314
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
2197
- return Vo(e)(t, n, o);
2315
+ return Xo(e)(t, n, o);
2198
2316
  }), qd = (e) => (t, n, r) => L(null, null, function* () {
2199
- return Vo(e)(t, n, r);
2200
- }), Hd = /^[cC][^\s-]{8,}$/, Fd = /^[0-9a-z]+$/, Bd = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Gd = /^[0-9a-vA-V]{20}$/, Wd = /^[A-Za-z0-9]{27}$/, Jd = /^[a-zA-Z0-9_-]{21}$/, Yd = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Xd = /^([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})$/, Ni = (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)$/, Vd = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Kd = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2317
+ return Xo(e)(t, n, r);
2318
+ }), Hd = /^[cC][^\s-]{8,}$/, Fd = /^[0-9a-z]+$/, Bd = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Gd = /^[0-9a-vA-V]{20}$/, Wd = /^[A-Za-z0-9]{27}$/, Jd = /^[a-zA-Z0-9_-]{21}$/, Vd = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Yd = /^([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})$/, Ni = (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)$/, Xd = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Kd = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
2201
2319
  function Qd() {
2202
2320
  return new RegExp(Kd, "u");
2203
2321
  }
@@ -2566,7 +2684,7 @@ const Ap = {
2566
2684
  continue;
2567
2685
  const E = p.issues.length, j = y._zod.check(p);
2568
2686
  if (j instanceof Promise && (g == null ? void 0 : g.async) === !1)
2569
- throw new Vn();
2687
+ throw new Xn();
2570
2688
  if (k || j instanceof Promise)
2571
2689
  k = (k != null ? k : Promise.resolve()).then(() => L(null, null, function* () {
2572
2690
  yield j, p.issues.length !== E && (m || (m = Fn(p, E)));
@@ -2584,7 +2702,7 @@ const Ap = {
2584
2702
  const m = d(h, r, g);
2585
2703
  if (m instanceof Promise) {
2586
2704
  if (g.async === !1)
2587
- throw new Vn();
2705
+ throw new Xn();
2588
2706
  return m.then((k) => e._zod.parse(k, g));
2589
2707
  }
2590
2708
  return e._zod.parse(m, g);
@@ -2599,7 +2717,7 @@ const Ap = {
2599
2717
  const g = e._zod.parse(p, h);
2600
2718
  if (g instanceof Promise) {
2601
2719
  if (h.async === !1)
2602
- throw new Vn();
2720
+ throw new Xn();
2603
2721
  return g.then((m) => d(m, r, h));
2604
2722
  }
2605
2723
  return d(g, r, h);
@@ -2609,7 +2727,7 @@ const Ap = {
2609
2727
  validate: (d) => {
2610
2728
  var l;
2611
2729
  try {
2612
- const p = zd(e, d);
2730
+ const p = Id(e, d);
2613
2731
  return p.success ? { value: p.data } : { issues: (l = p.error) == null ? void 0 : l.issues };
2614
2732
  } catch (p) {
2615
2733
  return $d(e, d).then((h) => {
@@ -2640,7 +2758,7 @@ const Ap = {
2640
2758
  Ko.init(e, t), Gs.init(e, t);
2641
2759
  }), Cp = /* @__PURE__ */ w("$ZodGUID", (e, t) => {
2642
2760
  var n;
2643
- (n = t.pattern) != null || (t.pattern = Xd), ke.init(e, t);
2761
+ (n = t.pattern) != null || (t.pattern = Yd), ke.init(e, t);
2644
2762
  }), Pp = /* @__PURE__ */ w("$ZodUUID", (e, t) => {
2645
2763
  var n, r;
2646
2764
  if (t.version) {
@@ -2662,7 +2780,7 @@ const Ap = {
2662
2780
  ke.init(e, t);
2663
2781
  }), Rp = /* @__PURE__ */ w("$ZodEmail", (e, t) => {
2664
2782
  var n;
2665
- (n = t.pattern) != null || (t.pattern = Vd), ke.init(e, t);
2783
+ (n = t.pattern) != null || (t.pattern = Xd), ke.init(e, t);
2666
2784
  }), Lp = /* @__PURE__ */ w("$ZodURL", (e, t) => {
2667
2785
  ke.init(e, t), e._zod.check = (n) => {
2668
2786
  try {
@@ -2695,10 +2813,10 @@ const Ap = {
2695
2813
  });
2696
2814
  }
2697
2815
  };
2698
- }), Ip = /* @__PURE__ */ w("$ZodEmoji", (e, t) => {
2816
+ }), zp = /* @__PURE__ */ w("$ZodEmoji", (e, t) => {
2699
2817
  var n;
2700
2818
  (n = t.pattern) != null || (t.pattern = Qd()), ke.init(e, t);
2701
- }), zp = /* @__PURE__ */ w("$ZodNanoID", (e, t) => {
2819
+ }), Ip = /* @__PURE__ */ w("$ZodNanoID", (e, t) => {
2702
2820
  var n;
2703
2821
  (n = t.pattern) != null || (t.pattern = Jd), ke.init(e, t);
2704
2822
  }), $p = /* @__PURE__ */ w("$ZodCUID", (e, t) => {
@@ -2727,7 +2845,7 @@ const Ap = {
2727
2845
  (n = t.pattern) != null || (t.pattern = ap(t)), ke.init(e, t);
2728
2846
  }), qp = /* @__PURE__ */ w("$ZodISODuration", (e, t) => {
2729
2847
  var n;
2730
- (n = t.pattern) != null || (t.pattern = Yd), ke.init(e, t);
2848
+ (n = t.pattern) != null || (t.pattern = Vd), ke.init(e, t);
2731
2849
  }), Hp = /* @__PURE__ */ w("$ZodIPv4", (e, t) => {
2732
2850
  var n;
2733
2851
  (n = t.pattern) != null || (t.pattern = ep), ke.init(e, t), e._zod.bag.format = "ipv4";
@@ -2805,7 +2923,7 @@ function Jp(e) {
2805
2923
  const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
2806
2924
  return ac(n);
2807
2925
  }
2808
- const Yp = /* @__PURE__ */ w("$ZodBase64URL", (e, t) => {
2926
+ const Vp = /* @__PURE__ */ w("$ZodBase64URL", (e, t) => {
2809
2927
  var n;
2810
2928
  (n = t.pattern) != null || (t.pattern = ec), ke.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (r) => {
2811
2929
  Jp(r.value) || r.issues.push({
@@ -2816,11 +2934,11 @@ const Yp = /* @__PURE__ */ w("$ZodBase64URL", (e, t) => {
2816
2934
  continue: !t.abort
2817
2935
  });
2818
2936
  };
2819
- }), Xp = /* @__PURE__ */ w("$ZodE164", (e, t) => {
2937
+ }), Yp = /* @__PURE__ */ w("$ZodE164", (e, t) => {
2820
2938
  var n;
2821
2939
  (n = t.pattern) != null || (t.pattern = sp), ke.init(e, t);
2822
2940
  });
2823
- function Vp(e, t = null) {
2941
+ function Xp(e, t = null) {
2824
2942
  try {
2825
2943
  const n = e.split(".");
2826
2944
  if (n.length !== 3)
@@ -2836,7 +2954,7 @@ function Vp(e, t = null) {
2836
2954
  }
2837
2955
  const Kp = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
2838
2956
  ke.init(e, t), e._zod.check = (n) => {
2839
- Vp(n.value, t.alg) || n.issues.push({
2957
+ Xp(n.value, t.alg) || n.issues.push({
2840
2958
  code: "invalid_format",
2841
2959
  format: "jwt",
2842
2960
  input: n.value,
@@ -2917,7 +3035,7 @@ const oh = /* @__PURE__ */ w("$ZodArray", (e, t) => {
2917
3035
  return i.length ? Promise.all(i).then(() => n) : n;
2918
3036
  };
2919
3037
  });
2920
- function zo(e, t, n, r, o) {
3038
+ function Io(e, t, n, r, o) {
2921
3039
  if (e.issues.length) {
2922
3040
  if (o && !(n in r))
2923
3041
  return;
@@ -2949,7 +3067,7 @@ function uc(e, t, n, r, o, i) {
2949
3067
  continue;
2950
3068
  }
2951
3069
  const m = l.run({ value: t[g], issues: [] }, r);
2952
- m instanceof Promise ? e.push(m.then((k) => zo(k, n, g, t, h))) : zo(m, n, g, t, h);
3070
+ m instanceof Promise ? e.push(m.then((k) => Io(k, n, g, t, h))) : Io(m, n, g, t, h);
2953
3071
  }
2954
3072
  return a.length && n.issues.push({
2955
3073
  code: "unrecognized_keys",
@@ -2972,7 +3090,7 @@ const sh = /* @__PURE__ */ w("$ZodObject", (e, t) => {
2972
3090
  }
2973
3091
  });
2974
3092
  }
2975
- const r = Yo(() => lc(t));
3093
+ const r = Vo(() => lc(t));
2976
3094
  ne(e._zod, "propValues", () => {
2977
3095
  var p;
2978
3096
  const d = t.shape, l = {};
@@ -3002,13 +3120,13 @@ const sh = /* @__PURE__ */ w("$ZodObject", (e, t) => {
3002
3120
  const h = [], g = a.shape;
3003
3121
  for (const m of a.keys) {
3004
3122
  const k = g[m], y = k._zod.optout === "optional", E = k._zod.run({ value: p[m], issues: [] }, l);
3005
- E instanceof Promise ? h.push(E.then((j) => zo(j, d, m, p, y))) : zo(E, d, m, p, y);
3123
+ E instanceof Promise ? h.push(E.then((j) => Io(j, d, m, p, y))) : Io(E, d, m, p, y);
3006
3124
  }
3007
3125
  return i ? uc(h, p, d, l, r.value, e) : h.length ? Promise.all(h).then(() => d) : d;
3008
3126
  };
3009
3127
  }), ih = /* @__PURE__ */ w("$ZodObjectJIT", (e, t) => {
3010
3128
  sh.init(e, t);
3011
- const n = e._zod.parse, r = Yo(() => lc(t)), o = (m) => {
3129
+ const n = e._zod.parse, r = Vo(() => lc(t)), o = (m) => {
3012
3130
  var T;
3013
3131
  const k = new Ep(["shape", "payload", "ctx"]), y = r.value, E = (S) => {
3014
3132
  const P = Oi(S);
@@ -3021,7 +3139,7 @@ const sh = /* @__PURE__ */ w("$ZodObject", (e, t) => {
3021
3139
  j[S] = `key_${Q++}`;
3022
3140
  k.write("const newResult = {};");
3023
3141
  for (const S of y.keys) {
3024
- const P = j[S], Z = Oi(S), Y = m[S], he = ((T = Y == null ? void 0 : Y._zod) == null ? void 0 : T.optout) === "optional";
3142
+ const P = j[S], Z = Oi(S), V = m[S], he = ((T = V == null ? void 0 : V._zod) == null ? void 0 : T.optout) === "optional";
3025
3143
  k.write(`const ${P} = ${E(S)};`), he ? k.write(`
3026
3144
  if (${P}.issues.length) {
3027
3145
  if (${Z} in input) {
@@ -3136,7 +3254,7 @@ const dc = /* @__PURE__ */ w("$ZodUnion", (e, t) => {
3136
3254
  }
3137
3255
  return o;
3138
3256
  });
3139
- const r = Yo(() => {
3257
+ const r = Vo(() => {
3140
3258
  var a;
3141
3259
  const o = t.options, i = /* @__PURE__ */ new Map();
3142
3260
  for (const d of o) {
@@ -3333,7 +3451,7 @@ const lh = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
3333
3451
  if (r.async)
3334
3452
  return (o instanceof Promise ? o : Promise.resolve(o)).then((a) => (n.value = a, n));
3335
3453
  if (o instanceof Promise)
3336
- throw new Vn();
3454
+ throw new Xn();
3337
3455
  return n.value = o, n;
3338
3456
  };
3339
3457
  });
@@ -3580,7 +3698,7 @@ function Lh(e, t) {
3580
3698
  }, U(t)));
3581
3699
  }
3582
3700
  // @__NO_SIDE_EFFECTS__
3583
- function Ih(e, t) {
3701
+ function zh(e, t) {
3584
3702
  return new e(v({
3585
3703
  type: "string",
3586
3704
  format: "nanoid",
@@ -3589,7 +3707,7 @@ function Ih(e, t) {
3589
3707
  }, U(t)));
3590
3708
  }
3591
3709
  // @__NO_SIDE_EFFECTS__
3592
- function zh(e, t) {
3710
+ function Ih(e, t) {
3593
3711
  return new e(v({
3594
3712
  type: "string",
3595
3713
  format: "cuid",
@@ -3734,7 +3852,7 @@ function Jh(e, t) {
3734
3852
  }, U(t)));
3735
3853
  }
3736
3854
  // @__NO_SIDE_EFFECTS__
3737
- function Yh(e, t) {
3855
+ function Vh(e, t) {
3738
3856
  return new e(v({
3739
3857
  type: "string",
3740
3858
  format: "duration",
@@ -3742,14 +3860,14 @@ function Yh(e, t) {
3742
3860
  }, U(t)));
3743
3861
  }
3744
3862
  // @__NO_SIDE_EFFECTS__
3745
- function Xh(e, t) {
3863
+ function Yh(e, t) {
3746
3864
  return new e(v({
3747
3865
  type: "number",
3748
3866
  checks: []
3749
3867
  }, U(t)));
3750
3868
  }
3751
3869
  // @__NO_SIDE_EFFECTS__
3752
- function Vh(e, t) {
3870
+ function Xh(e, t) {
3753
3871
  return new e(v({
3754
3872
  type: "number",
3755
3873
  check: "number_format",
@@ -3818,7 +3936,7 @@ function gs(e, t) {
3818
3936
  }));
3819
3937
  }
3820
3938
  // @__NO_SIDE_EFFECTS__
3821
- function Yi(e, t) {
3939
+ function Vi(e, t) {
3822
3940
  return new fp(M(v({
3823
3941
  check: "multiple_of"
3824
3942
  }, U(t)), {
@@ -4028,7 +4146,7 @@ function mc(e, t) {
4028
4146
  var E, j, Q, N, T;
4029
4147
  const g = e.target === "draft-2020-12" ? "$defs" : "definitions";
4030
4148
  if (e.external) {
4031
- const S = (E = e.external.registry.get(h[0])) == null ? void 0 : E.id, P = (j = e.external.uri) != null ? j : ((Y) => Y);
4149
+ const S = (E = e.external.registry.get(h[0])) == null ? void 0 : E.id, P = (j = e.external.uri) != null ? j : ((V) => V);
4032
4150
  if (S)
4033
4151
  return { ref: P(S) };
4034
4152
  const Z = (N = (Q = h[1].defId) != null ? Q : h[1].schema.id) != null ? N : `schema${e.counter++}`;
@@ -4098,11 +4216,11 @@ function bc(e, t) {
4098
4216
  r(E);
4099
4217
  const S = e.seen.get(E), P = S.schema;
4100
4218
  if (P.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (k.allOf = (N = k.allOf) != null ? N : [], k.allOf.push(P)) : Object.assign(k, P), Object.assign(k, y), g._zod.parent === E)
4101
- for (const Y in k)
4102
- Y === "$ref" || Y === "allOf" || Y in y || delete k[Y];
4219
+ for (const V in k)
4220
+ V === "$ref" || V === "allOf" || V in y || delete k[V];
4103
4221
  if (P.$ref)
4104
- for (const Y in k)
4105
- Y === "$ref" || Y === "allOf" || Y in S.def && JSON.stringify(k[Y]) === JSON.stringify(S.def[Y]) && delete k[Y];
4222
+ for (const V in k)
4223
+ V === "$ref" || V === "allOf" || V in S.def && JSON.stringify(k[V]) === JSON.stringify(S.def[V]) && delete k[V];
4106
4224
  }
4107
4225
  const j = g._zod.parent;
4108
4226
  if (j && j !== E) {
@@ -4272,12 +4390,12 @@ const kf = (e, t = {}) => (n) => {
4272
4390
  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 = Ce(i.catchall, t, M(v({}, r), {
4273
4391
  path: [...r.path, "additionalProperties"]
4274
4392
  }))) : t.io === "output" && (o.additionalProperties = !1);
4275
- }, If = (e, t, n, r) => {
4393
+ }, zf = (e, t, n, r) => {
4276
4394
  const o = e._zod.def, i = o.inclusive === !1, a = o.options.map((d, l) => Ce(d, t, M(v({}, r), {
4277
4395
  path: [...r.path, i ? "oneOf" : "anyOf", l]
4278
4396
  })));
4279
4397
  i ? n.oneOf = a : n.anyOf = a;
4280
- }, zf = (e, t, n, r) => {
4398
+ }, If = (e, t, n, r) => {
4281
4399
  const o = e._zod.def, i = Ce(o.left, t, M(v({}, r), {
4282
4400
  path: [...r.path, "allOf", 0]
4283
4401
  })), a = Ce(o.right, t, M(v({}, r), {
@@ -4375,13 +4493,13 @@ function Wf(e) {
4375
4493
  const Jf = /* @__PURE__ */ w("ZodISODuration", (e, t) => {
4376
4494
  qp.init(e, t), we.init(e, t);
4377
4495
  });
4378
- function Yf(e) {
4379
- return /* @__PURE__ */ Yh(Jf, e);
4496
+ function Vf(e) {
4497
+ return /* @__PURE__ */ Vh(Jf, e);
4380
4498
  }
4381
- const Xf = (e, t) => {
4499
+ const Yf = (e, t) => {
4382
4500
  Ka.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
4383
4501
  format: {
4384
- value: (n) => Id(e, n)
4502
+ value: (n) => zd(e, n)
4385
4503
  // enumerable: false,
4386
4504
  },
4387
4505
  flatten: {
@@ -4407,9 +4525,9 @@ const Xf = (e, t) => {
4407
4525
  // enumerable: false,
4408
4526
  }
4409
4527
  });
4410
- }, gt = w("ZodError", Xf, {
4528
+ }, gt = w("ZodError", Yf, {
4411
4529
  Parent: Error
4412
- }), Vf = /* @__PURE__ */ Fs(gt), Kf = /* @__PURE__ */ Bs(gt), Qf = /* @__PURE__ */ Xo(gt), eg = /* @__PURE__ */ Vo(gt), tg = /* @__PURE__ */ Od(gt), ng = /* @__PURE__ */ Nd(gt), rg = /* @__PURE__ */ Dd(gt), og = /* @__PURE__ */ Md(gt), sg = /* @__PURE__ */ Ud(gt), ig = /* @__PURE__ */ jd(gt), ag = /* @__PURE__ */ Zd(gt), cg = /* @__PURE__ */ qd(gt), _e = /* @__PURE__ */ w("ZodType", (e, t) => (be.init(e, t), Object.assign(e["~standard"], {
4530
+ }), Xf = /* @__PURE__ */ Fs(gt), Kf = /* @__PURE__ */ Bs(gt), Qf = /* @__PURE__ */ Yo(gt), eg = /* @__PURE__ */ Xo(gt), tg = /* @__PURE__ */ Od(gt), ng = /* @__PURE__ */ Nd(gt), rg = /* @__PURE__ */ Dd(gt), og = /* @__PURE__ */ Md(gt), sg = /* @__PURE__ */ Ud(gt), ig = /* @__PURE__ */ jd(gt), ag = /* @__PURE__ */ Zd(gt), cg = /* @__PURE__ */ qd(gt), _e = /* @__PURE__ */ w("ZodType", (e, t) => (be.init(e, t), Object.assign(e["~standard"], {
4413
4531
  jsonSchema: {
4414
4532
  input: Oo(e, "input"),
4415
4533
  output: Oo(e, "output")
@@ -4424,7 +4542,7 @@ const Xf = (e, t) => {
4424
4542
  }), {
4425
4543
  parent: !0
4426
4544
  });
4427
- }, e.with = e.check, e.clone = (n, r) => hn(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Vf(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Qf(e, n, r), e.parseAsync = (n, r) => L(null, null, function* () {
4545
+ }, e.with = e.check, e.clone = (n, r) => hn(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Xf(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Qf(e, n, r), e.parseAsync = (n, r) => L(null, null, function* () {
4428
4546
  return Kf(e, n, r, { callee: e.parseAsync });
4429
4547
  }), e.safeParseAsync = (n, r) => L(null, null, function* () {
4430
4548
  return eg(e, n, r);
@@ -4436,7 +4554,7 @@ const Xf = (e, t) => {
4436
4554
  return ag(e, n, r);
4437
4555
  }), e.safeDecodeAsync = (n, r) => L(null, null, function* () {
4438
4556
  return cg(e, n, r);
4439
- }), e.refine = (n, r) => e.check(rm(n, r)), e.superRefine = (n) => e.check(om(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ ar(n)), e.optional = () => Qi(e), e.exactOptional = () => Fg(e), e.nullable = () => ea(e), e.nullish = () => Qi(ea(e)), e.nonoptional = (n) => Xg(e, n), e.array = () => st(e), e.or = (n) => Og([e, n]), e.and = (n) => Mg(e, n), e.transform = (n) => ta(e, qg(n)), e.default = (n) => Wg(e, n), e.prefault = (n) => Yg(e, n), e.catch = (n) => Kg(e, n), e.pipe = (n) => ta(e, n), e.readonly = () => tm(e), e.describe = (n) => {
4557
+ }), e.refine = (n, r) => e.check(rm(n, r)), e.superRefine = (n) => e.check(om(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ ar(n)), e.optional = () => Qi(e), e.exactOptional = () => Fg(e), e.nullable = () => ea(e), e.nullish = () => Qi(ea(e)), e.nonoptional = (n) => Yg(e, n), e.array = () => st(e), e.or = (n) => Og([e, n]), e.and = (n) => Mg(e, n), e.transform = (n) => ta(e, qg(n)), e.default = (n) => Wg(e, n), e.prefault = (n) => Vg(e, n), e.catch = (n) => Kg(e, n), e.pipe = (n) => ta(e, n), e.readonly = () => tm(e), e.describe = (n) => {
4440
4558
  const r = e.clone();
4441
4559
  return Pr.add(r, { description: n }), r;
4442
4560
  }, Object.defineProperty(e, "description", {
@@ -4456,7 +4574,7 @@ const Xf = (e, t) => {
4456
4574
  const n = e._zod.bag;
4457
4575
  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__ */ nf(...a)), e.includes = (...a) => e.check(/* @__PURE__ */ sf(...a)), e.startsWith = (...a) => e.check(/* @__PURE__ */ af(...a)), e.endsWith = (...a) => e.check(/* @__PURE__ */ cf(...a)), e.min = (...a) => e.check(/* @__PURE__ */ $o(...a)), e.max = (...a) => e.check(/* @__PURE__ */ hc(...a)), e.length = (...a) => e.check(/* @__PURE__ */ fc(...a)), e.nonempty = (...a) => e.check(/* @__PURE__ */ $o(1, ...a)), e.lowercase = (a) => e.check(/* @__PURE__ */ rf(a)), e.uppercase = (a) => e.check(/* @__PURE__ */ of(a)), e.trim = () => e.check(/* @__PURE__ */ uf()), e.normalize = (...a) => e.check(/* @__PURE__ */ lf(...a)), e.toLowerCase = () => e.check(/* @__PURE__ */ df()), e.toUpperCase = () => e.check(/* @__PURE__ */ pf()), e.slugify = () => e.check(/* @__PURE__ */ hf());
4458
4576
  }), lg = /* @__PURE__ */ w("ZodString", (e, t) => {
4459
- Gs.init(e, t), _c.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Th(ug, n)), e.url = (n) => e.check(/* @__PURE__ */ Rh(dg, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Bh(Eg, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Lh(pg, n)), e.guid = (n) => e.check(/* @__PURE__ */ Gi(Xi, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Eh(lo, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Ah(lo, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Ch(lo, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Ph(lo, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Ih(hg, n)), e.guid = (n) => e.check(/* @__PURE__ */ Gi(Xi, n)), e.cuid = (n) => e.check(/* @__PURE__ */ zh(fg, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ $h(gg, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Oh(mg, n)), e.base64 = (n) => e.check(/* @__PURE__ */ qh(xg, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Hh(Sg, n)), e.xid = (n) => e.check(/* @__PURE__ */ Nh(bg, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Dh(kg, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Mh(_g, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Uh(vg, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ jh(yg, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Zh(wg, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Fh(Tg, n)), e.datetime = (n) => e.check(Hf(n)), e.date = (n) => e.check(Bf(n)), e.time = (n) => e.check(Wf(n)), e.duration = (n) => e.check(Yf(n));
4577
+ Gs.init(e, t), _c.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Th(ug, n)), e.url = (n) => e.check(/* @__PURE__ */ Rh(dg, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Bh(Eg, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Lh(pg, n)), e.guid = (n) => e.check(/* @__PURE__ */ Gi(Yi, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Eh(lo, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Ah(lo, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Ch(lo, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Ph(lo, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ zh(hg, n)), e.guid = (n) => e.check(/* @__PURE__ */ Gi(Yi, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Ih(fg, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ $h(gg, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Oh(mg, n)), e.base64 = (n) => e.check(/* @__PURE__ */ qh(xg, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Hh(Sg, n)), e.xid = (n) => e.check(/* @__PURE__ */ Nh(bg, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Dh(kg, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Mh(_g, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Uh(vg, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ jh(yg, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Zh(wg, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Fh(Tg, n)), e.datetime = (n) => e.check(Hf(n)), e.date = (n) => e.check(Bf(n)), e.time = (n) => e.check(Wf(n)), e.duration = (n) => e.check(Vf(n));
4460
4578
  });
4461
4579
  function C(e) {
4462
4580
  return /* @__PURE__ */ Sh(lg, e);
@@ -4465,16 +4583,16 @@ const we = /* @__PURE__ */ w("ZodStringFormat", (e, t) => {
4465
4583
  ke.init(e, t), _c.init(e, t);
4466
4584
  }), ug = /* @__PURE__ */ w("ZodEmail", (e, t) => {
4467
4585
  Rp.init(e, t), we.init(e, t);
4468
- }), Xi = /* @__PURE__ */ w("ZodGUID", (e, t) => {
4586
+ }), Yi = /* @__PURE__ */ w("ZodGUID", (e, t) => {
4469
4587
  Cp.init(e, t), we.init(e, t);
4470
4588
  }), lo = /* @__PURE__ */ w("ZodUUID", (e, t) => {
4471
4589
  Pp.init(e, t), we.init(e, t);
4472
4590
  }), dg = /* @__PURE__ */ w("ZodURL", (e, t) => {
4473
4591
  Lp.init(e, t), we.init(e, t);
4474
4592
  }), pg = /* @__PURE__ */ w("ZodEmoji", (e, t) => {
4475
- Ip.init(e, t), we.init(e, t);
4476
- }), hg = /* @__PURE__ */ w("ZodNanoID", (e, t) => {
4477
4593
  zp.init(e, t), we.init(e, t);
4594
+ }), hg = /* @__PURE__ */ w("ZodNanoID", (e, t) => {
4595
+ Ip.init(e, t), we.init(e, t);
4478
4596
  }), fg = /* @__PURE__ */ w("ZodCUID", (e, t) => {
4479
4597
  $p.init(e, t), we.init(e, t);
4480
4598
  }), gg = /* @__PURE__ */ w("ZodCUID2", (e, t) => {
@@ -4496,25 +4614,25 @@ const we = /* @__PURE__ */ w("ZodStringFormat", (e, t) => {
4496
4614
  }), xg = /* @__PURE__ */ w("ZodBase64", (e, t) => {
4497
4615
  Wp.init(e, t), we.init(e, t);
4498
4616
  }), Sg = /* @__PURE__ */ w("ZodBase64URL", (e, t) => {
4499
- Yp.init(e, t), we.init(e, t);
4617
+ Vp.init(e, t), we.init(e, t);
4500
4618
  }), Tg = /* @__PURE__ */ w("ZodE164", (e, t) => {
4501
- Xp.init(e, t), we.init(e, t);
4619
+ Yp.init(e, t), we.init(e, t);
4502
4620
  }), Eg = /* @__PURE__ */ w("ZodJWT", (e, t) => {
4503
4621
  Kp.init(e, t), we.init(e, t);
4504
4622
  }), vc = /* @__PURE__ */ w("ZodNumber", (e, t) => {
4505
4623
  var r, o, i, a, d, l, p, h, g;
4506
- cc.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (m, k, y) => yf(e, m, k), e.gt = (m, k) => e.check(/* @__PURE__ */ Ji(m, k)), e.gte = (m, k) => e.check(/* @__PURE__ */ gs(m, k)), e.min = (m, k) => e.check(/* @__PURE__ */ gs(m, k)), e.lt = (m, k) => e.check(/* @__PURE__ */ Wi(m, k)), e.lte = (m, k) => e.check(/* @__PURE__ */ fs(m, k)), e.max = (m, k) => e.check(/* @__PURE__ */ fs(m, k)), e.int = (m) => e.check(Vi(m)), e.safe = (m) => e.check(Vi(m)), e.positive = (m) => e.check(/* @__PURE__ */ Ji(0, m)), e.nonnegative = (m) => e.check(/* @__PURE__ */ gs(0, m)), e.negative = (m) => e.check(/* @__PURE__ */ Wi(0, m)), e.nonpositive = (m) => e.check(/* @__PURE__ */ fs(0, m)), e.multipleOf = (m, k) => e.check(/* @__PURE__ */ Yi(m, k)), e.step = (m, k) => e.check(/* @__PURE__ */ Yi(m, k)), e.finite = () => e;
4624
+ cc.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (m, k, y) => yf(e, m, k), e.gt = (m, k) => e.check(/* @__PURE__ */ Ji(m, k)), e.gte = (m, k) => e.check(/* @__PURE__ */ gs(m, k)), e.min = (m, k) => e.check(/* @__PURE__ */ gs(m, k)), e.lt = (m, k) => e.check(/* @__PURE__ */ Wi(m, k)), e.lte = (m, k) => e.check(/* @__PURE__ */ fs(m, k)), e.max = (m, k) => e.check(/* @__PURE__ */ fs(m, k)), e.int = (m) => e.check(Xi(m)), e.safe = (m) => e.check(Xi(m)), e.positive = (m) => e.check(/* @__PURE__ */ Ji(0, m)), e.nonnegative = (m) => e.check(/* @__PURE__ */ gs(0, m)), e.negative = (m) => e.check(/* @__PURE__ */ Wi(0, m)), e.nonpositive = (m) => e.check(/* @__PURE__ */ fs(0, m)), e.multipleOf = (m, k) => e.check(/* @__PURE__ */ Vi(m, k)), e.step = (m, k) => e.check(/* @__PURE__ */ Vi(m, k)), e.finite = () => e;
4507
4625
  const n = e._zod.bag;
4508
4626
  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;
4509
4627
  });
4510
4628
  function Ut(e) {
4511
- return /* @__PURE__ */ Xh(vc, e);
4629
+ return /* @__PURE__ */ Yh(vc, e);
4512
4630
  }
4513
4631
  const Ag = /* @__PURE__ */ w("ZodNumberFormat", (e, t) => {
4514
4632
  Qp.init(e, t), vc.init(e, t);
4515
4633
  });
4516
- function Vi(e) {
4517
- return /* @__PURE__ */ Vh(Ag, e);
4634
+ function Xi(e) {
4635
+ return /* @__PURE__ */ Xh(Ag, e);
4518
4636
  }
4519
4637
  const Cg = /* @__PURE__ */ w("ZodBoolean", (e, t) => {
4520
4638
  eh.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => wf(e, n, r);
@@ -4537,17 +4655,17 @@ function Ki() {
4537
4655
  const Lg = /* @__PURE__ */ w("ZodNever", (e, t) => {
4538
4656
  rh.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => xf(e, n, r);
4539
4657
  });
4540
- function Ig(e) {
4658
+ function zg(e) {
4541
4659
  return /* @__PURE__ */ tf(Lg, e);
4542
4660
  }
4543
- const zg = /* @__PURE__ */ w("ZodArray", (e, t) => {
4661
+ const Ig = /* @__PURE__ */ w("ZodArray", (e, t) => {
4544
4662
  oh.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => Rf(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ $o(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ $o(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ hc(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ fc(n, r)), e.unwrap = () => e.element;
4545
4663
  });
4546
4664
  function st(e, t) {
4547
- return /* @__PURE__ */ ff(zg, e, t);
4665
+ return /* @__PURE__ */ ff(Ig, e, t);
4548
4666
  }
4549
4667
  const $g = /* @__PURE__ */ w("ZodObject", (e, t) => {
4550
- ih.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lf(e, n, r, o), ne(e, "shape", () => t.shape), e.keyof = () => pt(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone(M(v({}, e._zod.def), { catchall: n })), e.passthrough = () => e.clone(M(v({}, e._zod.def), { catchall: Ki() })), e.loose = () => e.clone(M(v({}, e._zod.def), { catchall: Ki() })), e.strict = () => e.clone(M(v({}, e._zod.def), { catchall: Ig() })), e.strip = () => e.clone(M(v({}, e._zod.def), { catchall: void 0 })), e.extend = (n) => Ed(e, n), e.safeExtend = (n) => Ad(e, n), e.merge = (n) => Cd(e, n), e.pick = (n) => Sd(e, n), e.omit = (n) => Td(e, n), e.partial = (...n) => Pd(Sc, e, n[0]), e.required = (...n) => Rd(Tc, e, n[0]);
4668
+ ih.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => Lf(e, n, r, o), ne(e, "shape", () => t.shape), e.keyof = () => pt(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone(M(v({}, e._zod.def), { catchall: n })), e.passthrough = () => e.clone(M(v({}, e._zod.def), { catchall: Ki() })), e.loose = () => e.clone(M(v({}, e._zod.def), { catchall: Ki() })), e.strict = () => e.clone(M(v({}, e._zod.def), { catchall: zg() })), e.strip = () => e.clone(M(v({}, e._zod.def), { catchall: void 0 })), e.extend = (n) => Ed(e, n), e.safeExtend = (n) => Ad(e, n), e.merge = (n) => Cd(e, n), e.pick = (n) => Sd(e, n), e.omit = (n) => Td(e, n), e.partial = (...n) => Pd(Sc, e, n[0]), e.required = (...n) => Rd(Tc, e, n[0]);
4551
4669
  });
4552
4670
  function fe(e, t) {
4553
4671
  const n = v({
@@ -4557,7 +4675,7 @@ function fe(e, t) {
4557
4675
  return new $g(n);
4558
4676
  }
4559
4677
  const wc = /* @__PURE__ */ w("ZodUnion", (e, t) => {
4560
- dc.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => If(e, n, r, o), e.options = t.options;
4678
+ dc.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => zf(e, n, r, o), e.options = t.options;
4561
4679
  });
4562
4680
  function Og(e, t) {
4563
4681
  return new wc(v({
@@ -4576,7 +4694,7 @@ function xc(e, t, n) {
4576
4694
  }, U(n)));
4577
4695
  }
4578
4696
  const Dg = /* @__PURE__ */ w("ZodIntersection", (e, t) => {
4579
- ch.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => zf(e, n, r, o);
4697
+ ch.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => If(e, n, r, o);
4580
4698
  });
4581
4699
  function Mg(e, t) {
4582
4700
  return new Dg({
@@ -4704,36 +4822,36 @@ function Wg(e, t) {
4704
4822
  type: "default",
4705
4823
  innerType: e,
4706
4824
  get defaultValue() {
4707
- return typeof t == "function" ? t() : Xa(t);
4825
+ return typeof t == "function" ? t() : Ya(t);
4708
4826
  }
4709
4827
  });
4710
4828
  }
4711
4829
  const Jg = /* @__PURE__ */ w("ZodPrefault", (e, t) => {
4712
4830
  mh.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mf(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4713
4831
  });
4714
- function Yg(e, t) {
4832
+ function Vg(e, t) {
4715
4833
  return new Jg({
4716
4834
  type: "prefault",
4717
4835
  innerType: e,
4718
4836
  get defaultValue() {
4719
- return typeof t == "function" ? t() : Xa(t);
4837
+ return typeof t == "function" ? t() : Ya(t);
4720
4838
  }
4721
4839
  });
4722
4840
  }
4723
4841
  const Tc = /* @__PURE__ */ w("ZodNonOptional", (e, t) => {
4724
4842
  bh.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => Nf(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
4725
4843
  });
4726
- function Xg(e, t) {
4844
+ function Yg(e, t) {
4727
4845
  return new Tc(v({
4728
4846
  type: "nonoptional",
4729
4847
  innerType: e
4730
4848
  }, U(t)));
4731
4849
  }
4732
- const Vg = /* @__PURE__ */ w("ZodCatch", (e, t) => {
4850
+ const Xg = /* @__PURE__ */ w("ZodCatch", (e, t) => {
4733
4851
  kh.init(e, t), _e.init(e, t), e._zod.processJSONSchema = (n, r, o) => Uf(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
4734
4852
  });
4735
4853
  function Kg(e, t) {
4736
- return new Vg({
4854
+ return new Xg({
4737
4855
  type: "catch",
4738
4856
  innerType: e,
4739
4857
  catchValue: typeof t == "function" ? t : () => t
@@ -5207,7 +5325,7 @@ function Em() {
5207
5325
  return N = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(P, Z) {
5208
5326
  P.__proto__ = Z;
5209
5327
  } || function(P, Z) {
5210
- for (var Y in Z) Z.hasOwnProperty(Y) && (P[Y] = Z[Y]);
5328
+ for (var V in Z) Z.hasOwnProperty(V) && (P[V] = Z[V]);
5211
5329
  }, N(T, S);
5212
5330
  };
5213
5331
  return function(T, S) {
@@ -5232,10 +5350,10 @@ function Em() {
5232
5350
  var Z = T[P] << 16 | T[P + 1] << 8 | T[P + 2];
5233
5351
  S += this._encodeByte(Z >>> 18 & 63), S += this._encodeByte(Z >>> 12 & 63), S += this._encodeByte(Z >>> 6 & 63), S += this._encodeByte(Z >>> 0 & 63);
5234
5352
  }
5235
- var Y = T.length - P;
5236
- if (Y > 0) {
5237
- var Z = T[P] << 16 | (Y === 2 ? T[P + 1] << 8 : 0);
5238
- S += this._encodeByte(Z >>> 18 & 63), S += this._encodeByte(Z >>> 12 & 63), Y === 2 ? S += this._encodeByte(Z >>> 6 & 63) : S += this._paddingCharacter || "", S += this._paddingCharacter || "";
5353
+ var V = T.length - P;
5354
+ if (V > 0) {
5355
+ var Z = T[P] << 16 | (V === 2 ? T[P + 1] << 8 : 0);
5356
+ S += this._encodeByte(Z >>> 18 & 63), S += this._encodeByte(Z >>> 12 & 63), V === 2 ? S += this._encodeByte(Z >>> 6 & 63) : S += this._paddingCharacter || "", S += this._paddingCharacter || "";
5239
5357
  }
5240
5358
  return S;
5241
5359
  }, N.prototype.maxDecodedLength = function(T) {
@@ -5245,9 +5363,9 @@ function Em() {
5245
5363
  }, N.prototype.decode = function(T) {
5246
5364
  if (T.length === 0)
5247
5365
  return new Uint8Array(0);
5248
- for (var S = this._getPaddingLength(T), P = T.length - S, Z = new Uint8Array(this.maxDecodedLength(P)), Y = 0, he = 0, Oe = 0, qe = 0, te = 0, Pe = 0, He = 0; he < P - 4; he += 4)
5249
- qe = this._decodeChar(T.charCodeAt(he + 0)), te = this._decodeChar(T.charCodeAt(he + 1)), Pe = this._decodeChar(T.charCodeAt(he + 2)), He = this._decodeChar(T.charCodeAt(he + 3)), Z[Y++] = qe << 2 | te >>> 4, Z[Y++] = te << 4 | Pe >>> 2, Z[Y++] = Pe << 6 | He, Oe |= qe & p, Oe |= te & p, Oe |= Pe & p, Oe |= He & p;
5250
- if (he < P - 1 && (qe = this._decodeChar(T.charCodeAt(he)), te = this._decodeChar(T.charCodeAt(he + 1)), Z[Y++] = qe << 2 | te >>> 4, Oe |= qe & p, Oe |= te & p), he < P - 2 && (Pe = this._decodeChar(T.charCodeAt(he + 2)), Z[Y++] = te << 4 | Pe >>> 2, Oe |= Pe & p), he < P - 3 && (He = this._decodeChar(T.charCodeAt(he + 3)), Z[Y++] = Pe << 6 | He, Oe |= He & p), Oe !== 0)
5366
+ for (var S = this._getPaddingLength(T), P = T.length - S, Z = new Uint8Array(this.maxDecodedLength(P)), V = 0, he = 0, Oe = 0, qe = 0, te = 0, Pe = 0, He = 0; he < P - 4; he += 4)
5367
+ qe = this._decodeChar(T.charCodeAt(he + 0)), te = this._decodeChar(T.charCodeAt(he + 1)), Pe = this._decodeChar(T.charCodeAt(he + 2)), He = this._decodeChar(T.charCodeAt(he + 3)), Z[V++] = qe << 2 | te >>> 4, Z[V++] = te << 4 | Pe >>> 2, Z[V++] = Pe << 6 | He, Oe |= qe & p, Oe |= te & p, Oe |= Pe & p, Oe |= He & p;
5368
+ if (he < P - 1 && (qe = this._decodeChar(T.charCodeAt(he)), te = this._decodeChar(T.charCodeAt(he + 1)), Z[V++] = qe << 2 | te >>> 4, Oe |= qe & p, Oe |= te & p), he < P - 2 && (Pe = this._decodeChar(T.charCodeAt(he + 2)), Z[V++] = te << 4 | Pe >>> 2, Oe |= Pe & p), he < P - 3 && (He = this._decodeChar(T.charCodeAt(he + 3)), Z[V++] = Pe << 6 | He, Oe |= He & p), Oe !== 0)
5251
5369
  throw new Error("Base64Coder: incorrect characters for decoding");
5252
5370
  return Z;
5253
5371
  }, N.prototype._encodeByte = function(T) {
@@ -5495,7 +5613,7 @@ function Em() {
5495
5613
  super(s), Object.setPrototypeOf(this, new.target.prototype);
5496
5614
  }
5497
5615
  }
5498
- class Y extends Error {
5616
+ class V extends Error {
5499
5617
  constructor(s) {
5500
5618
  super(s), Object.setPrototypeOf(this, new.target.prototype);
5501
5619
  }
@@ -5637,7 +5755,7 @@ function Em() {
5637
5755
  }
5638
5756
  function mn() {
5639
5757
  for (var u = ["Pusher"], s = 0; s < arguments.length; s++)
5640
- typeof arguments[s] == "string" ? u.push(arguments[s]) : u.push(Ye(arguments[s]));
5758
+ typeof arguments[s] == "string" ? u.push(arguments[s]) : u.push(Ve(arguments[s]));
5641
5759
  return u.join(" : ");
5642
5760
  }
5643
5761
  function De(u, s) {
@@ -5655,7 +5773,7 @@ function Em() {
5655
5773
  for (var c in u)
5656
5774
  Object.prototype.hasOwnProperty.call(u, c) && s(u[c], c, u);
5657
5775
  }
5658
- function ze(u) {
5776
+ function Ie(u) {
5659
5777
  var s = [];
5660
5778
  return ue(u, function(c, f) {
5661
5779
  s.push(f);
@@ -5716,7 +5834,7 @@ function Em() {
5716
5834
  }
5717
5835
  function dr(u) {
5718
5836
  return Je(u, function(s) {
5719
- return typeof s == "object" && (s = Ye(s)), encodeURIComponent(fn(s.toString()));
5837
+ return typeof s == "object" && (s = Ve(s)), encodeURIComponent(fn(s.toString()));
5720
5838
  });
5721
5839
  }
5722
5840
  function bn(u) {
@@ -5752,7 +5870,7 @@ function Em() {
5752
5870
  }
5753
5871
  })(u, "$");
5754
5872
  }
5755
- function Ye(u) {
5873
+ function Ve(u) {
5756
5874
  try {
5757
5875
  return JSON.stringify(u);
5758
5876
  } catch (s) {
@@ -5891,7 +6009,7 @@ function Em() {
5891
6009
  this._callbacks = {};
5892
6010
  return;
5893
6011
  }
5894
- var b = s ? [Zt(s)] : ze(this._callbacks);
6012
+ var b = s ? [Zt(s)] : Ie(this._callbacks);
5895
6013
  c || f ? this.removeCallback(b, c, f) : this.removeAllCallbacks(b);
5896
6014
  }
5897
6015
  removeCallback(s, c, f) {
@@ -6097,10 +6215,10 @@ function Em() {
6097
6215
  var s = G.isXDRSupported(u.useTLS);
6098
6216
  return s;
6099
6217
  }
6100
- }, br = new pe(Se({}, fr, mr)), Yr = new pe(Se({}, Mn, mr));
6101
- lt.xdr_streaming = br, lt.xdr_polling = Yr, lt.sockjs = Jr;
6218
+ }, br = new pe(Se({}, fr, mr)), Vr = new pe(Se({}, Mn, mr));
6219
+ lt.xdr_streaming = br, lt.xdr_polling = Vr, lt.sockjs = Jr;
6102
6220
  const yt = lt;
6103
- class Xr extends vt {
6221
+ class Yr extends vt {
6104
6222
  constructor() {
6105
6223
  super();
6106
6224
  var s = this;
@@ -6114,7 +6232,7 @@ function Em() {
6114
6232
  return window.navigator.onLine === void 0 ? !0 : window.navigator.onLine;
6115
6233
  }
6116
6234
  }
6117
- var Vr = new Xr();
6235
+ var Xr = new Yr();
6118
6236
  class Kr {
6119
6237
  constructor(s, c, f) {
6120
6238
  this.manager = s, this.transport = c, this.minPingDelay = f.minPingDelay, this.maxPingDelay = f.maxPingDelay, this.pingDelay = void 0;
@@ -6309,7 +6427,7 @@ function Em() {
6309
6427
  this.timeline.isEmpty() || this.timeline.send(G.TimelineTransport.getAgent(this, s), c);
6310
6428
  }
6311
6429
  }
6312
- class I extends vt {
6430
+ class z extends vt {
6313
6431
  constructor(s, c) {
6314
6432
  super(function(f, b) {
6315
6433
  de.debug("No callbacks on " + s + " for " + f);
@@ -6371,7 +6489,7 @@ function Em() {
6371
6489
  this.subscriptionCancelled = !1;
6372
6490
  }
6373
6491
  }
6374
- class se extends I {
6492
+ class se extends z {
6375
6493
  authorize(s, c) {
6376
6494
  return this.pusher.config.channelAuthorizer({
6377
6495
  channelName: this.name,
@@ -6493,7 +6611,7 @@ function Em() {
6493
6611
  this.members.reset(), super.disconnect();
6494
6612
  }
6495
6613
  }
6496
- var wt = l(978), It = l(594);
6614
+ var wt = l(978), zt = l(594);
6497
6615
  class _r extends se {
6498
6616
  constructor(s, c, f) {
6499
6617
  super(s, c), this.key = null, this.nacl = f;
@@ -6509,7 +6627,7 @@ function Em() {
6509
6627
  c(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
6510
6628
  return;
6511
6629
  }
6512
- this.key = (0, It.decode)(x), delete b.shared_secret, c(null, b);
6630
+ this.key = (0, zt.decode)(x), delete b.shared_secret, c(null, b);
6513
6631
  });
6514
6632
  }
6515
6633
  trigger(s, c) {
@@ -6532,12 +6650,12 @@ function Em() {
6532
6650
  de.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: " + c);
6533
6651
  return;
6534
6652
  }
6535
- let f = (0, It.decode)(c.ciphertext);
6653
+ let f = (0, zt.decode)(c.ciphertext);
6536
6654
  if (f.length < this.nacl.secretbox.overheadLength) {
6537
6655
  de.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${f.length}`);
6538
6656
  return;
6539
6657
  }
6540
- let b = (0, It.decode)(c.nonce);
6658
+ let b = (0, zt.decode)(c.nonce);
6541
6659
  if (b.length < this.nacl.secretbox.nonceLength) {
6542
6660
  de.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${b.length}`);
6543
6661
  return;
@@ -6774,7 +6892,7 @@ function Em() {
6774
6892
  return new Le(u, s);
6775
6893
  },
6776
6894
  createChannel(u, s) {
6777
- return new I(u, s);
6895
+ return new z(u, s);
6778
6896
  },
6779
6897
  createPrivateChannel(u, s) {
6780
6898
  return new se(u, s);
@@ -6914,7 +7032,7 @@ function Em() {
6914
7032
  }))) : x++);
6915
7033
  }
6916
7034
  var B = le.now(), ee = R.pop().connect(s, function oe(Ee, oo) {
6917
- Ee ? (fi(f), R.length > 0 ? (B = le.now(), ee = R.pop().connect(s, oe)) : c(Ee)) : (Il(f, oo.transport.name, le.now() - B, x), c(null, oo));
7035
+ Ee ? (fi(f), R.length > 0 ? (B = le.now(), ee = R.pop().connect(s, oe)) : c(Ee)) : (zl(f, oo.transport.name, le.now() - B, x), c(null, oo));
6918
7036
  });
6919
7037
  return {
6920
7038
  abort: function() {
@@ -6941,11 +7059,11 @@ function Em() {
6941
7059
  }
6942
7060
  return null;
6943
7061
  }
6944
- function Il(u, s, c, f) {
7062
+ function zl(u, s, c, f) {
6945
7063
  var b = G.getLocalStorage();
6946
7064
  if (b)
6947
7065
  try {
6948
- b[is(u)] = Ye({
7066
+ b[is(u)] = Ve({
6949
7067
  timestamp: le.now(),
6950
7068
  transport: s,
6951
7069
  latency: c,
@@ -6996,7 +7114,7 @@ function Em() {
6996
7114
  return f.connect(s, c);
6997
7115
  }
6998
7116
  }
6999
- class zl {
7117
+ class Il {
7000
7118
  constructor(s) {
7001
7119
  this.strategy = s;
7002
7120
  }
@@ -7017,8 +7135,8 @@ function Em() {
7017
7135
  }
7018
7136
  var $l = function(u, s, c) {
7019
7137
  var f = {};
7020
- function b(Ai, Lu, Iu, zu, $u) {
7021
- var Ci = c(u, Ai, Lu, Iu, zu, $u);
7138
+ function b(Ai, Lu, zu, Iu, $u) {
7139
+ var Ci = c(u, Ai, Lu, zu, Iu, $u);
7022
7140
  return f[Ai] = Ci, Ci;
7023
7141
  }
7024
7142
  var x = Object.assign({}, s, {
@@ -7059,7 +7177,7 @@ function Em() {
7059
7177
  xi,
7060
7178
  new to(Pu, { delay: 2e3 }),
7061
7179
  new to(ls, { delay: 5e3 })
7062
- ]), new Rl(new zl(new vr(yr(Ee), us, ls)), f, {
7180
+ ]), new Rl(new Il(new vr(yr(Ee), us, ls)), f, {
7063
7181
  ttl: 18e5,
7064
7182
  timeline: s.timeline,
7065
7183
  useTLS: s.useTLS
@@ -7260,8 +7378,8 @@ function Em() {
7260
7378
  u.onClose(1006, "Connection interrupted (" + s + ")", !1);
7261
7379
  }
7262
7380
  };
7263
- const Yl = Jl;
7264
- var Xl = {
7381
+ const Vl = Jl;
7382
+ var Yl = {
7265
7383
  getReceiveURL: function(u, s) {
7266
7384
  return u.base + "/" + s + "/xhr" + u.queryString;
7267
7385
  },
@@ -7274,7 +7392,7 @@ function Em() {
7274
7392
  s === 200 ? u.reconnect() : u.onClose(1006, "Connection interrupted (" + s + ")", !1);
7275
7393
  }
7276
7394
  };
7277
- const Vl = Xl;
7395
+ const Xl = Yl;
7278
7396
  var Kl = {
7279
7397
  getRequest: function(u) {
7280
7398
  var s = G.getXHRAPI(), c = new s();
@@ -7296,10 +7414,10 @@ function Em() {
7296
7414
  const Ql = Kl;
7297
7415
  var eu = {
7298
7416
  createStreamingSocket(u) {
7299
- return this.createSocket(Yl, u);
7417
+ return this.createSocket(Vl, u);
7300
7418
  },
7301
7419
  createPollingSocket(u) {
7302
- return this.createSocket(Vl, u);
7420
+ return this.createSocket(Xl, u);
7303
7421
  },
7304
7422
  createSocket(u, s) {
7305
7423
  return new Wl(u, s);
@@ -7376,7 +7494,7 @@ function Em() {
7376
7494
  return new ActiveXObject("Microsoft.XMLHTTP");
7377
7495
  },
7378
7496
  getNetwork() {
7379
- return Vr;
7497
+ return Xr;
7380
7498
  },
7381
7499
  createWebSocket(u) {
7382
7500
  var s = this.getWebSocketAPI();
@@ -7465,7 +7583,7 @@ function Em() {
7465
7583
  connect(s, c) {
7466
7584
  if (this.isSupported()) {
7467
7585
  if (this.priority < s)
7468
- return ki(new Y(), c);
7586
+ return ki(new V(), c);
7469
7587
  } else return ki(new te(), c);
7470
7588
  var f = !1, b = this.transport.createConnection(this.name, this.priority, this.options.key, this.options), x = null, R = function() {
7471
7589
  b.unbind("initialized", R), b.connect();
@@ -7478,7 +7596,7 @@ function Em() {
7478
7596
  }, ee = function() {
7479
7597
  oe();
7480
7598
  var Ee;
7481
- Ee = Ye(b), c(new he(Ee));
7599
+ Ee = Ve(b), c(new he(Ee));
7482
7600
  }, oe = function() {
7483
7601
  b.unbind("initialized", R), b.unbind("open", O), b.unbind("error", B), b.unbind("closed", ee);
7484
7602
  };
@@ -7711,7 +7829,7 @@ function Em() {
7711
7829
  const s = (c) => {
7712
7830
  c.subscriptionPending && c.subscriptionCancelled ? c.reinstateSubscription() : !c.subscriptionPending && this.pusher.connection.state === "connected" && c.subscribe();
7713
7831
  };
7714
- this.serverToUserChannel = new I(`#server-to-user-${this.user_data.id}`, this.pusher), this.serverToUserChannel.bind_global((c, f) => {
7832
+ this.serverToUserChannel = new z(`#server-to-user-${this.user_data.id}`, this.pusher), this.serverToUserChannel.bind_global((c, f) => {
7715
7833
  c.indexOf("pusher_internal:") === 0 || c.indexOf("pusher:") === 0 || this.emit(c, f);
7716
7834
  }), s(this.serverToUserChannel);
7717
7835
  }
@@ -7736,7 +7854,7 @@ function Em() {
7736
7854
  Me.instances[s].connect();
7737
7855
  }
7738
7856
  static getClientFeatures() {
7739
- return ze(at({ ws: G.Transports.ws }, function(s) {
7857
+ return Ie(at({ ws: G.Transports.ws }, function(s) {
7740
7858
  return s.isSupported({});
7741
7859
  }));
7742
7860
  }
@@ -7928,7 +8046,7 @@ function Lm(e, t, n) {
7928
8046
  });
7929
8047
  }
7930
8048
  const Ws = "ap-sdk-active-automation";
7931
- function Im() {
8049
+ function zm() {
7932
8050
  try {
7933
8051
  const e = sessionStorage.getItem(Ws);
7934
8052
  if (!e) return null;
@@ -7944,13 +8062,13 @@ function Lc(e) {
7944
8062
  } catch (t) {
7945
8063
  }
7946
8064
  }
7947
- function Ic() {
8065
+ function zc() {
7948
8066
  try {
7949
8067
  sessionStorage.removeItem(Ws);
7950
8068
  } catch (e) {
7951
8069
  }
7952
8070
  }
7953
- function zm(e) {
8071
+ function Im(e) {
7954
8072
  return L(this, null, function* () {
7955
8073
  var i;
7956
8074
  try {
@@ -7969,10 +8087,10 @@ function $m() {
7969
8087
  typeof requestAnimationFrame == "function" ? requestAnimationFrame(() => e()) : setTimeout(e, 16);
7970
8088
  });
7971
8089
  }
7972
- const Js = "shared", zc = "ap-sdk-panel-size:", la = 280, ua = 200;
8090
+ const Js = "shared", Ic = "ap-sdk-panel-size:", la = 280, ua = 200;
7973
8091
  function Om(e) {
7974
8092
  try {
7975
- const t = sessionStorage.getItem(zc + e);
8093
+ const t = sessionStorage.getItem(Ic + e);
7976
8094
  if (!t) return null;
7977
8095
  const n = JSON.parse(t);
7978
8096
  return typeof (n == null ? void 0 : n.width) == "number" && typeof (n == null ? void 0 : n.height) == "number" ? n : null;
@@ -7982,7 +8100,7 @@ function Om(e) {
7982
8100
  }
7983
8101
  function Nm(e, t) {
7984
8102
  try {
7985
- sessionStorage.setItem(zc + e, JSON.stringify(t));
8103
+ sessionStorage.setItem(Ic + e, JSON.stringify(t));
7986
8104
  } catch (n) {
7987
8105
  }
7988
8106
  }
@@ -7995,7 +8113,7 @@ function da() {
7995
8113
  function pa() {
7996
8114
  return window.innerHeight - 64;
7997
8115
  }
7998
- function Ys(e, t) {
8116
+ function Vs(e, t) {
7999
8117
  const n = Om(t);
8000
8118
  n && (e.style.width = `${uo(n.width, la, da())}px`, e.style.height = `${uo(n.height, ua, pa())}px`);
8001
8119
  const r = document.createElement("div");
@@ -8012,12 +8130,12 @@ function Ys(e, t) {
8012
8130
  d = y.width, l = y.height, p = d, h = l, document.addEventListener("pointermove", g), document.addEventListener("pointerup", m);
8013
8131
  });
8014
8132
  }
8015
- function Xs() {
8133
+ function Ys() {
8016
8134
  return { async: !1, breaks: !1, extensions: null, gfm: !0, hooks: null, pedantic: !1, renderer: null, silent: !1, tokenizer: null, walkTokens: null };
8017
8135
  }
8018
- var zn = Xs();
8136
+ var In = Ys();
8019
8137
  function $c(e) {
8020
- zn = e;
8138
+ In = e;
8021
8139
  }
8022
8140
  var xn = { exec: () => null };
8023
8141
  function jn(e) {
@@ -8027,7 +8145,7 @@ function jn(e) {
8027
8145
  return o || (o = e(r), t[r] = o), o;
8028
8146
  };
8029
8147
  }
8030
- function V(e, t = "") {
8148
+ function X(e, t = "") {
8031
8149
  let n = typeof e == "string" ? e : e.source, r = { replace: (o, i) => {
8032
8150
  let a = typeof i == "string" ? i : i.source;
8033
8151
  return a = a.replace(Ge.caret, "$1"), n = n.replace(o, a), r;
@@ -8040,9 +8158,9 @@ var Dm = ((e = "") => {
8040
8158
  } catch (t) {
8041
8159
  return !1;
8042
8160
  }
8043
- })(), Ge = { 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: jn((e) => new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: jn((e) => new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: jn((e) => new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)), headingBeginRegex: jn((e) => new RegExp(`^ {0,${e}}#`)), htmlBeginRegex: jn((e) => new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: jn((e) => new RegExp(`^ {0,${e}}>`)) }, Mm = /^(?:[ \t]*(?:\n|$))+/, Um = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, jm = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Zr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Zm = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Vs = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Oc = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Nc = V(Oc).replace(/bull/g, Vs).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(), qm = V(Oc).replace(/bull/g, Vs).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(), Ks = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Hm = /^[^\n]+/, Qs = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Fm = V(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Qs).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Bm = V(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, Vs).getRegex(), Qo = "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", ei = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Gm = V("^ {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", ei).replace("tag", Qo).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Dc = (e) => V(Ks).replace("hr", Zr).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", Qo).getRegex(), Wm = Dc(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Jm = Dc(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Ym = V(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Jm).getRegex(), ti = { blockquote: Ym, code: Um, def: Fm, fences: jm, heading: Zm, hr: Zr, html: Gm, lheading: Nc, list: Bm, newline: Mm, paragraph: Wm, table: xn, text: Hm }, ha = V("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Zr).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", Qo).getRegex(), Xm = M(v({}, ti), { lheading: qm, table: ha, paragraph: V(Ks).replace("hr", Zr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ha).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", Qo).getRegex() }), Vm = M(v({}, ti), { html: V(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ei).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: xn, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: V(Ks).replace("hr", Zr).replace("heading", ` *#{1,6} *[^
8044
- ]`).replace("lheading", Nc).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }), Km = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Qm = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Mc = /^( {2,}|\\)\n(?!\s*$)/, eb = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Vt = /[\p{P}\p{S}]/u, cr = /[\s\p{P}\p{S}]/u, qr = /[^\s\p{P}\p{S}]/u, tb = V(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, cr).getRegex(), nb = /[\p{Pi}\p{Ps}"']/u, Uc = /(?!~)[\p{P}\p{S}]/u, rb = /(?!~)[\s\p{P}\p{S}]/u, ob = /(?:[^\s\p{P}\p{S}]|~)/u, sb = V(/link|precode-code|html/, "g").replace("link", new RegExp("\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("precode-", Dm ? "(?<!`)()" : "(^^|[^`])").replace("code", new RegExp("(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html", /<(?! )[^<>]*?>/).getRegex(), jc = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ib = V(jc, "u").replace(/punct/g, Vt).getRegex(), ab = V(jc, "u").replace(/punct/g, Uc).getRegex(), cb = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, lb = V(cb, "u").replace(/openQuote/g, nb).replace(/punct/g, Vt).getRegex(), Zc = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ub = V(Zc, "gu").replace(/notPunctSpace/g, qr).replace(/punctSpace/g, cr).replace(/punct/g, Vt).getRegex(), db = V(Zc, "gu").replace(/notPunctSpace/g, ob).replace(/punctSpace/g, rb).replace(/punct/g, Uc).getRegex(), pb = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", hb = V(pb, "gu").replace(/notPunctSpace/g, qr).replace(/punctSpace/g, cr).replace(/punct/g, Vt).getRegex(), fb = V("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, qr).replace(/punctSpace/g, cr).replace(/punct/g, Vt).getRegex(), gb = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", mb = V(gb, "gu").replace(/notPunctSpace/g, qr).replace(/punctSpace/g, cr).replace(/punct/g, Vt).getRegex(), bb = V(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Vt).getRegex(), kb = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", _b = V(kb, "gu").replace(/notPunctSpace/g, qr).replace(/punctSpace/g, cr).replace(/punct/g, Vt).getRegex(), vb = V(/\\(punct)/, "gu").replace(/punct/g, Vt).getRegex(), yb = V(/^<(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(), wb = V(ei).replace("(?:-->|$)", "-->").getRegex(), xb = V("^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", wb).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Mo = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Sb = V(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Mo).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), qc = V(/^!?\[(label)\]\[(ref)\]/).replace("label", Mo).replace("ref", Qs).getRegex(), Hc = V(/^!?\[(ref)\](?:\[\])?/).replace("ref", Qs).getRegex(), Tb = V("reflink|nolink(?!\\()", "g").replace("reflink", qc).replace("nolink", Hc).getRegex(), fa = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, ni = { _backpedal: xn, anyPunctuation: vb, autolink: yb, blockSkip: sb, br: Mc, code: Qm, del: xn, delLDelim: xn, delRDelim: xn, emStrongLDelim: ib, emStrongRDelimAst: ub, emStrongRDelimUnd: fb, escape: Km, link: Sb, nolink: Hc, punctuation: tb, reflink: qc, reflinkSearch: Tb, tag: xb, text: eb, url: xn }, Eb = M(v({}, ni), { emStrongLDelim: lb, emStrongRDelimAst: hb, emStrongRDelimUnd: mb, link: V(/^!?\[(label)\]\((.*?)\)/).replace("label", Mo).getRegex(), reflink: V(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Mo).getRegex() }), Rs = M(v({}, ni), { emStrongRDelimAst: db, emStrongLDelim: ab, delLDelim: bb, delRDelim: _b, url: V(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", fa).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: V(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", fa).getRegex() }), Ab = M(v({}, Rs), { br: V(Mc).replace("{2,}", "*").getRegex(), text: V(Rs.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }), po = { normal: ti, gfm: Xm, pedantic: Vm }, xr = { normal: ni, gfm: Rs, breaks: Ab, pedantic: Eb }, Cb = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ga = (e) => Cb[e];
8045
- function zt(e, t) {
8161
+ })(), Ge = { 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: jn((e) => new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: jn((e) => new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: jn((e) => new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)), headingBeginRegex: jn((e) => new RegExp(`^ {0,${e}}#`)), htmlBeginRegex: jn((e) => new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: jn((e) => new RegExp(`^ {0,${e}}>`)) }, Mm = /^(?:[ \t]*(?:\n|$))+/, Um = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, jm = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Zr = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Zm = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Xs = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Oc = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Nc = X(Oc).replace(/bull/g, Xs).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(), qm = X(Oc).replace(/bull/g, Xs).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(), Ks = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Hm = /^[^\n]+/, Qs = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, Fm = X(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Qs).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Bm = X(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, Xs).getRegex(), Qo = "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", ei = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Gm = X("^ {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", ei).replace("tag", Qo).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Dc = (e) => X(Ks).replace("hr", Zr).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", Qo).getRegex(), Wm = Dc(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Jm = Dc(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Vm = X(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Jm).getRegex(), ti = { blockquote: Vm, code: Um, def: Fm, fences: jm, heading: Zm, hr: Zr, html: Gm, lheading: Nc, list: Bm, newline: Mm, paragraph: Wm, table: xn, text: Hm }, ha = X("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Zr).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", Qo).getRegex(), Ym = M(v({}, ti), { lheading: qm, table: ha, paragraph: X(Ks).replace("hr", Zr).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ha).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", Qo).getRegex() }), Xm = M(v({}, ti), { html: X(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ei).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: xn, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: X(Ks).replace("hr", Zr).replace("heading", ` *#{1,6} *[^
8162
+ ]`).replace("lheading", Nc).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }), Km = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Qm = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Mc = /^( {2,}|\\)\n(?!\s*$)/, eb = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Xt = /[\p{P}\p{S}]/u, cr = /[\s\p{P}\p{S}]/u, qr = /[^\s\p{P}\p{S}]/u, tb = X(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, cr).getRegex(), nb = /[\p{Pi}\p{Ps}"']/u, Uc = /(?!~)[\p{P}\p{S}]/u, rb = /(?!~)[\s\p{P}\p{S}]/u, ob = /(?:[^\s\p{P}\p{S}]|~)/u, sb = X(/link|precode-code|html/, "g").replace("link", new RegExp("\\[(?:[^\\[\\]`]|(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("precode-", Dm ? "(?<!`)()" : "(^^|[^`])").replace("code", new RegExp("(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html", /<(?! )[^<>]*?>/).getRegex(), jc = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ib = X(jc, "u").replace(/punct/g, Xt).getRegex(), ab = X(jc, "u").replace(/punct/g, Uc).getRegex(), cb = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, lb = X(cb, "u").replace(/openQuote/g, nb).replace(/punct/g, Xt).getRegex(), Zc = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", ub = X(Zc, "gu").replace(/notPunctSpace/g, qr).replace(/punctSpace/g, cr).replace(/punct/g, Xt).getRegex(), db = X(Zc, "gu").replace(/notPunctSpace/g, ob).replace(/punctSpace/g, rb).replace(/punct/g, Uc).getRegex(), pb = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", hb = X(pb, "gu").replace(/notPunctSpace/g, qr).replace(/punctSpace/g, cr).replace(/punct/g, Xt).getRegex(), fb = X("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, qr).replace(/punctSpace/g, cr).replace(/punct/g, Xt).getRegex(), gb = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", mb = X(gb, "gu").replace(/notPunctSpace/g, qr).replace(/punctSpace/g, cr).replace(/punct/g, Xt).getRegex(), bb = X(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Xt).getRegex(), kb = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", _b = X(kb, "gu").replace(/notPunctSpace/g, qr).replace(/punctSpace/g, cr).replace(/punct/g, Xt).getRegex(), vb = X(/\\(punct)/, "gu").replace(/punct/g, Xt).getRegex(), yb = X(/^<(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(), wb = X(ei).replace("(?:-->|$)", "-->").getRegex(), xb = X("^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", wb).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Mo = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Sb = X(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", Mo).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), qc = X(/^!?\[(label)\]\[(ref)\]/).replace("label", Mo).replace("ref", Qs).getRegex(), Hc = X(/^!?\[(ref)\](?:\[\])?/).replace("ref", Qs).getRegex(), Tb = X("reflink|nolink(?!\\()", "g").replace("reflink", qc).replace("nolink", Hc).getRegex(), fa = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, ni = { _backpedal: xn, anyPunctuation: vb, autolink: yb, blockSkip: sb, br: Mc, code: Qm, del: xn, delLDelim: xn, delRDelim: xn, emStrongLDelim: ib, emStrongRDelimAst: ub, emStrongRDelimUnd: fb, escape: Km, link: Sb, nolink: Hc, punctuation: tb, reflink: qc, reflinkSearch: Tb, tag: xb, text: eb, url: xn }, Eb = M(v({}, ni), { emStrongLDelim: lb, emStrongRDelimAst: hb, emStrongRDelimUnd: mb, link: X(/^!?\[(label)\]\((.*?)\)/).replace("label", Mo).getRegex(), reflink: X(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Mo).getRegex() }), Rs = M(v({}, ni), { emStrongRDelimAst: db, emStrongLDelim: ab, delLDelim: bb, delRDelim: _b, url: X(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", fa).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: X(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", fa).getRegex() }), Ab = M(v({}, Rs), { br: X(Mc).replace("{2,}", "*").getRegex(), text: X(Rs.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }), po = { normal: ti, gfm: Ym, pedantic: Xm }, xr = { normal: ni, gfm: Rs, breaks: Ab, pedantic: Eb }, Cb = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ga = (e) => Cb[e];
8163
+ function It(e, t) {
8046
8164
  if (t) {
8047
8165
  if (Ge.escapeTest.test(e)) return e.replace(Ge.escapeReplace, ga);
8048
8166
  } else if (Ge.escapeTestNoEncode.test(e)) return e.replace(Ge.escapeReplaceNoEncode, ga);
@@ -8123,7 +8241,7 @@ var Uo = class {
8123
8241
  ie(this, "options");
8124
8242
  ie(this, "rules");
8125
8243
  ie(this, "lexer");
8126
- this.options = e || zn;
8244
+ this.options = e || In;
8127
8245
  }
8128
8246
  space(e) {
8129
8247
  let t = this.rules.block.newline.exec(e);
@@ -8450,7 +8568,7 @@ ${y}`, o = o.substring(0, o.length - k.text.length) + j.text;
8450
8568
  ie(this, "state");
8451
8569
  ie(this, "inlineQueue");
8452
8570
  ie(this, "tokenizer");
8453
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || zn, this.options.tokenizer = this.options.tokenizer || new Uo(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
8571
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || In, this.options.tokenizer = this.options.tokenizer || new Uo(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
8454
8572
  let n = { other: Ge, block: po.normal, inline: xr.normal };
8455
8573
  this.options.pedantic ? (n.block = po.pedantic, n.inline = xr.pedantic) : this.options.gfm && (n.block = po.gfm, this.options.breaks ? n.inline = xr.breaks : n.inline = xr.gfm), this.tokenizer.rules = n;
8456
8574
  }
@@ -8668,7 +8786,7 @@ ${y}`, o = o.substring(0, o.length - k.text.length) + j.text;
8668
8786
  constructor(e) {
8669
8787
  ie(this, "options");
8670
8788
  ie(this, "parser");
8671
- this.options = e || zn;
8789
+ this.options = e || In;
8672
8790
  }
8673
8791
  space(e) {
8674
8792
  return "";
@@ -8677,8 +8795,8 @@ ${y}`, o = o.substring(0, o.length - k.text.length) + j.text;
8677
8795
  var i;
8678
8796
  let r = (i = (t || "").match(Ge.notSpaceStart)) == null ? void 0 : i[0], o = e.replace(Ge.endingNewline, "") + `
8679
8797
  `;
8680
- return r ? '<pre><code class="language-' + zt(r) + '">' + (n ? o : zt(o, !0)) + `</code></pre>
8681
- ` : "<pre><code>" + (n ? o : zt(o, !0)) + `</code></pre>
8798
+ return r ? '<pre><code class="language-' + It(r) + '">' + (n ? o : It(o, !0)) + `</code></pre>
8799
+ ` : "<pre><code>" + (n ? o : It(o, !0)) + `</code></pre>
8682
8800
  `;
8683
8801
  }
8684
8802
  blockquote({ tokens: e }) {
@@ -8756,7 +8874,7 @@ ${e}</tr>
8756
8874
  return `<em>${this.parser.parseInline(e)}</em>`;
8757
8875
  }
8758
8876
  codespan({ text: e }) {
8759
- return `<code>${zt(e, !0)}</code>`;
8877
+ return `<code>${It(e, !0)}</code>`;
8760
8878
  }
8761
8879
  br(e) {
8762
8880
  return "<br>";
@@ -8769,18 +8887,18 @@ ${e}</tr>
8769
8887
  if (o === null) return r;
8770
8888
  e = o;
8771
8889
  let i = '<a href="' + e + '"';
8772
- return t && (i += ' title="' + zt(t) + '"'), i += ">" + r + "</a>", i;
8890
+ return t && (i += ' title="' + It(t) + '"'), i += ">" + r + "</a>", i;
8773
8891
  }
8774
8892
  image({ href: e, title: t, text: n, tokens: r }) {
8775
8893
  r && (n = this.parser.parseInline(r, this.parser.textRenderer));
8776
8894
  let o = ma(e);
8777
- if (o === null) return zt(n);
8895
+ if (o === null) return It(n);
8778
8896
  e = o;
8779
- let i = `<img src="${e}" alt="${zt(n)}"`;
8780
- return t && (i += ` title="${zt(t)}"`), i += ">", i;
8897
+ let i = `<img src="${e}" alt="${It(n)}"`;
8898
+ return t && (i += ` title="${It(t)}"`), i += ">", i;
8781
8899
  }
8782
8900
  text(e) {
8783
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : zt(e.text);
8901
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : It(e.text);
8784
8902
  }
8785
8903
  }, ri = class {
8786
8904
  strong({ text: e }) {
@@ -8813,18 +8931,18 @@ ${e}</tr>
8813
8931
  checkbox({ raw: e }) {
8814
8932
  return e;
8815
8933
  }
8816
- }, Et = class Is {
8934
+ }, Et = class zs {
8817
8935
  constructor(t) {
8818
8936
  ie(this, "options");
8819
8937
  ie(this, "renderer");
8820
8938
  ie(this, "textRenderer");
8821
- this.options = t || zn, this.options.renderer = this.options.renderer || new jo(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ri();
8939
+ this.options = t || In, this.options.renderer = this.options.renderer || new jo(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new ri();
8822
8940
  }
8823
8941
  static parse(t, n) {
8824
- return new Is(n).parse(t);
8942
+ return new zs(n).parse(t);
8825
8943
  }
8826
8944
  static parseInline(t, n) {
8827
- return new Is(n).parseInline(t);
8945
+ return new zs(n).parseInline(t);
8828
8946
  }
8829
8947
  parse(t) {
8830
8948
  var r, o;
@@ -8970,7 +9088,7 @@ ${e}</tr>
8970
9088
  constructor(e) {
8971
9089
  ie(this, "options");
8972
9090
  ie(this, "block");
8973
- this.options = e || zn;
9091
+ this.options = e || In;
8974
9092
  }
8975
9093
  preprocess(e) {
8976
9094
  return e;
@@ -8990,9 +9108,9 @@ ${e}</tr>
8990
9108
  provideParser(e = this.block) {
8991
9109
  return e ? Et.parse : Et.parseInline;
8992
9110
  }
8993
- }, ie(ko, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), ie(ko, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), ko), Ib = class {
9111
+ }, ie(ko, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), ie(ko, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), ko), zb = class {
8994
9112
  constructor(...e) {
8995
- ie(this, "defaults", Xs());
9113
+ ie(this, "defaults", Ys());
8996
9114
  ie(this, "options", this.setOptions);
8997
9115
  ie(this, "parse", this.parseMarkdown(!0));
8998
9116
  ie(this, "parseInline", this.parseMarkdown(!1));
@@ -9144,26 +9262,26 @@ ${e}</tr>
9144
9262
  return (n) => {
9145
9263
  if (n.message += `
9146
9264
  Please report this to https://github.com/markedjs/marked.`, e) {
9147
- let r = "<p>An error occurred:</p><pre>" + zt(n.message + "", !0) + "</pre>";
9265
+ let r = "<p>An error occurred:</p><pre>" + It(n.message + "", !0) + "</pre>";
9148
9266
  return t ? Promise.resolve(r) : r;
9149
9267
  }
9150
9268
  if (t) return Promise.reject(n);
9151
9269
  throw n;
9152
9270
  };
9153
9271
  }
9154
- }, Pn = new Ib();
9272
+ }, Pn = new zb();
9155
9273
  function ce(e, t) {
9156
9274
  return Pn.parse(e, t);
9157
9275
  }
9158
9276
  ce.options = ce.setOptions = function(e) {
9159
9277
  return Pn.setOptions(e), ce.defaults = Pn.defaults, $c(ce.defaults), ce;
9160
9278
  };
9161
- ce.getDefaults = Xs;
9162
- ce.defaults = zn;
9163
- function zb(...e) {
9279
+ ce.getDefaults = Ys;
9280
+ ce.defaults = In;
9281
+ function Ib(...e) {
9164
9282
  return Pn.use(...e), ce.defaults = Pn.defaults, $c(ce.defaults), ce;
9165
9283
  }
9166
- ce.use = zb;
9284
+ ce.use = Ib;
9167
9285
  ce.walkTokens = function(e, t) {
9168
9286
  return Pn.walkTokens(e, t);
9169
9287
  };
@@ -9194,7 +9312,7 @@ const {
9194
9312
  let {
9195
9313
  freeze: tt,
9196
9314
  seal: ft,
9197
- create: zs
9315
+ create: Is
9198
9316
  } = Object, {
9199
9317
  apply: $s,
9200
9318
  construct: Os
@@ -9215,7 +9333,7 @@ Os || (Os = function(t) {
9215
9333
  r[o - 1] = arguments[o];
9216
9334
  return new t(...r);
9217
9335
  });
9218
- const ho = nt(Array.prototype.forEach), Db = nt(Array.prototype.lastIndexOf), ya = nt(Array.prototype.pop), Sr = nt(Array.prototype.push), Mb = nt(Array.prototype.splice), yo = nt(String.prototype.toLowerCase), bs = nt(String.prototype.toString), ks = nt(String.prototype.match), Tr = nt(String.prototype.replace), Ub = nt(String.prototype.indexOf), jb = nt(String.prototype.trim), xt = nt(Object.prototype.hasOwnProperty), Xe = nt(RegExp.prototype.test), Er = Zb(TypeError);
9336
+ const ho = nt(Array.prototype.forEach), Db = nt(Array.prototype.lastIndexOf), ya = nt(Array.prototype.pop), Sr = nt(Array.prototype.push), Mb = nt(Array.prototype.splice), yo = nt(String.prototype.toLowerCase), bs = nt(String.prototype.toString), ks = nt(String.prototype.match), Tr = nt(String.prototype.replace), Ub = nt(String.prototype.indexOf), jb = nt(String.prototype.trim), xt = nt(Object.prototype.hasOwnProperty), Ye = nt(RegExp.prototype.test), Er = Zb(TypeError);
9219
9337
  function nt(e) {
9220
9338
  return function(t) {
9221
9339
  t instanceof RegExp && (t.lastIndex = 0);
@@ -9231,7 +9349,7 @@ function Zb(e) {
9231
9349
  return Os(e, n);
9232
9350
  };
9233
9351
  }
9234
- function X(e, t) {
9352
+ function Y(e, t) {
9235
9353
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : yo;
9236
9354
  va && va(e, null);
9237
9355
  let r = t.length;
@@ -9251,7 +9369,7 @@ function qb(e) {
9251
9369
  return e;
9252
9370
  }
9253
9371
  function $t(e) {
9254
- const t = zs(null);
9372
+ const t = Is(null);
9255
9373
  for (const [n, r] of Fc(e))
9256
9374
  xt(e, n) && (Array.isArray(r) ? t[n] = qb(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = $t(r) : t[n] = r);
9257
9375
  return t;
@@ -9272,23 +9390,23 @@ function Ar(e, t) {
9272
9390
  }
9273
9391
  return n;
9274
9392
  }
9275
- const wa = tt(["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"]), _s = tt(["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"]), vs = tt(["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"]), Hb = tt(["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"]), ys = tt(["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"]), Fb = tt(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), xa = tt(["#text"]), Sa = tt(["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"]), ws = tt(["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"]), Ta = tt(["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"]), fo = tt(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Bb = ft(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Gb = ft(/<%[\w\W]*|[\w\W]*%>/gm), Wb = ft(/\$\{[\w\W]*/gm), Jb = ft(/^data-[\-\w.\u00B7-\uFFFF]+$/), Yb = ft(/^aria-[\-\w]+$/), Bc = ft(
9393
+ const wa = tt(["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"]), _s = tt(["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"]), vs = tt(["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"]), Hb = tt(["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"]), ys = tt(["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"]), Fb = tt(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), xa = tt(["#text"]), Sa = tt(["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"]), ws = tt(["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"]), Ta = tt(["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"]), fo = tt(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Bb = ft(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Gb = ft(/<%[\w\W]*|[\w\W]*%>/gm), Wb = ft(/\$\{[\w\W]*/gm), Jb = ft(/^data-[\-\w.\u00B7-\uFFFF]+$/), Vb = ft(/^aria-[\-\w]+$/), Bc = ft(
9276
9394
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
9277
9395
  // eslint-disable-line no-useless-escape
9278
- ), Xb = ft(/^(?:\w+script|data):/i), Vb = ft(
9396
+ ), Yb = ft(/^(?:\w+script|data):/i), Xb = ft(
9279
9397
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
9280
9398
  // eslint-disable-line no-control-regex
9281
9399
  ), Gc = ft(/^html$/i), Kb = ft(/^[a-z][.\w]*(-[.\w]+)+$/i);
9282
9400
  var Ea = /* @__PURE__ */ Object.freeze({
9283
9401
  __proto__: null,
9284
- ARIA_ATTR: Yb,
9285
- ATTR_WHITESPACE: Vb,
9402
+ ARIA_ATTR: Vb,
9403
+ ATTR_WHITESPACE: Xb,
9286
9404
  CUSTOM_ELEMENT: Kb,
9287
9405
  DATA_ATTR: Jb,
9288
9406
  DOCTYPE_NAME: Gc,
9289
9407
  ERB_EXPR: Gb,
9290
9408
  IS_ALLOWED_URI: Bc,
9291
- IS_SCRIPT_OR_DATA: Xb,
9409
+ IS_SCRIPT_OR_DATA: Yb,
9292
9410
  MUSTACHE_EXPR: Bb,
9293
9411
  TMPLIT_EXPR: Wb
9294
9412
  });
@@ -9359,7 +9477,7 @@ function Wc() {
9359
9477
  let S, P = "";
9360
9478
  const {
9361
9479
  implementation: Z,
9362
- createNodeIterator: Y,
9480
+ createNodeIterator: V,
9363
9481
  createDocumentFragment: he,
9364
9482
  getElementsByTagName: Oe
9365
9483
  } = n, {
@@ -9380,10 +9498,10 @@ function Wc() {
9380
9498
  let {
9381
9499
  IS_ALLOWED_URI: bt
9382
9500
  } = Ea, ve = null;
9383
- const gn = X({}, [...wa, ..._s, ...vs, ...ys, ...xa]);
9501
+ const gn = Y({}, [...wa, ..._s, ...vs, ...ys, ...xa]);
9384
9502
  let ye = null;
9385
- const W = X({}, [...Sa, ...ws, ...Ta, ...fo]);
9386
- let H = Object.seal(zs(null, {
9503
+ const W = Y({}, [...Sa, ...ws, ...Ta, ...fo]);
9504
+ let H = Object.seal(Is(null, {
9387
9505
  tagNameCheck: {
9388
9506
  writable: !0,
9389
9507
  configurable: !1,
@@ -9403,7 +9521,7 @@ function Wc() {
9403
9521
  value: !1
9404
9522
  }
9405
9523
  })), re = null, Ne = null;
9406
- const We = Object.seal(zs(null, {
9524
+ const We = Object.seal(Is(null, {
9407
9525
  tagCheck: {
9408
9526
  writable: !0,
9409
9527
  configurable: !1,
@@ -9417,18 +9535,18 @@ function Wc() {
9417
9535
  value: null
9418
9536
  }
9419
9537
  }));
9420
- let le = !0, Se = !0, mn = !1, De = !0, ue = !1, ze = !0, Re = !1, kt = !1, Fe = !1, Je = !1, Lt = !1, at = !1, Hr = !0, ur = !1;
9538
+ let le = !0, Se = !0, mn = !1, De = !0, ue = !1, Ie = !0, Re = !1, kt = !1, Fe = !1, Je = !1, Lt = !1, at = !1, Hr = !0, ur = !1;
9421
9539
  const es = "user-content-";
9422
- let dr = !0, bn = !1, Qt = {}, Ye = null;
9423
- const pr = X({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
9540
+ let dr = !0, bn = !1, Qt = {}, Ve = null;
9541
+ const pr = Y({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
9424
9542
  let de = null;
9425
- const Fr = X({}, ["audio", "video", "img", "source", "image", "track"]);
9543
+ const Fr = Y({}, ["audio", "video", "img", "source", "image", "track"]);
9426
9544
  let hr = null;
9427
- const Br = X({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), $n = "http://www.w3.org/1998/Math/MathML", On = "http://www.w3.org/2000/svg", _t = "http://www.w3.org/1999/xhtml";
9545
+ const Br = Y({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), $n = "http://www.w3.org/1998/Math/MathML", On = "http://www.w3.org/2000/svg", _t = "http://www.w3.org/1999/xhtml";
9428
9546
  let en = _t, kn = !1, _n = null;
9429
- const ts = X({}, [$n, On, _t], bs);
9430
- let Nn = X({}, ["mi", "mo", "mn", "ms", "mtext"]), Dn = X({}, ["annotation-xml"]);
9431
- const ns = X({}, ["title", "style", "font", "a", "script"]);
9547
+ const ts = Y({}, [$n, On, _t], bs);
9548
+ let Nn = Y({}, ["mi", "mo", "mn", "ms", "mtext"]), Dn = Y({}, ["annotation-xml"]);
9549
+ const ns = Y({}, ["title", "style", "font", "a", "script"]);
9432
9550
  let Zt = null;
9433
9551
  const vt = ["application/xhtml+xml", "text/html"], rs = "text/html";
9434
9552
  let pe = null, tn = null;
@@ -9438,7 +9556,7 @@ function Wc() {
9438
9556
  let _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
9439
9557
  if (!(tn && tn === _)) {
9440
9558
  if ((!_ || typeof _ != "object") && (_ = {}), _ = $t(_), Zt = // eslint-disable-next-line unicorn/prefer-includes
9441
- vt.indexOf(_.PARSER_MEDIA_TYPE) === -1 ? rs : _.PARSER_MEDIA_TYPE, pe = Zt === "application/xhtml+xml" ? bs : yo, ve = xt(_, "ALLOWED_TAGS") ? X({}, _.ALLOWED_TAGS, pe) : gn, ye = xt(_, "ALLOWED_ATTR") ? X({}, _.ALLOWED_ATTR, pe) : W, _n = xt(_, "ALLOWED_NAMESPACES") ? X({}, _.ALLOWED_NAMESPACES, bs) : ts, hr = xt(_, "ADD_URI_SAFE_ATTR") ? X($t(Br), _.ADD_URI_SAFE_ATTR, pe) : Br, de = xt(_, "ADD_DATA_URI_TAGS") ? X($t(Fr), _.ADD_DATA_URI_TAGS, pe) : Fr, Ye = xt(_, "FORBID_CONTENTS") ? X({}, _.FORBID_CONTENTS, pe) : pr, re = xt(_, "FORBID_TAGS") ? X({}, _.FORBID_TAGS, pe) : $t({}), Ne = xt(_, "FORBID_ATTR") ? X({}, _.FORBID_ATTR, pe) : $t({}), Qt = xt(_, "USE_PROFILES") ? _.USE_PROFILES : !1, le = _.ALLOW_ARIA_ATTR !== !1, Se = _.ALLOW_DATA_ATTR !== !1, mn = _.ALLOW_UNKNOWN_PROTOCOLS || !1, De = _.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ue = _.SAFE_FOR_TEMPLATES || !1, ze = _.SAFE_FOR_XML !== !1, Re = _.WHOLE_DOCUMENT || !1, Je = _.RETURN_DOM || !1, Lt = _.RETURN_DOM_FRAGMENT || !1, at = _.RETURN_TRUSTED_TYPE || !1, Fe = _.FORCE_BODY || !1, Hr = _.SANITIZE_DOM !== !1, ur = _.SANITIZE_NAMED_PROPS || !1, dr = _.KEEP_CONTENT !== !1, bn = _.IN_PLACE || !1, bt = _.ALLOWED_URI_REGEXP || Bc, en = _.NAMESPACE || _t, Nn = _.MATHML_TEXT_INTEGRATION_POINTS || Nn, Dn = _.HTML_INTEGRATION_POINTS || Dn, H = _.CUSTOM_ELEMENT_HANDLING || {}, _.CUSTOM_ELEMENT_HANDLING && fr(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = _.CUSTOM_ELEMENT_HANDLING.tagNameCheck), _.CUSTOM_ELEMENT_HANDLING && fr(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (H.attributeNameCheck = _.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), _.CUSTOM_ELEMENT_HANDLING && typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ue && (Se = !1), Lt && (Je = !0), Qt && (ve = X({}, xa), ye = [], Qt.html === !0 && (X(ve, wa), X(ye, Sa)), Qt.svg === !0 && (X(ve, _s), X(ye, ws), X(ye, fo)), Qt.svgFilters === !0 && (X(ve, vs), X(ye, ws), X(ye, fo)), Qt.mathMl === !0 && (X(ve, ys), X(ye, Ta), X(ye, fo))), _.ADD_TAGS && (typeof _.ADD_TAGS == "function" ? We.tagCheck = _.ADD_TAGS : (ve === gn && (ve = $t(ve)), X(ve, _.ADD_TAGS, pe))), _.ADD_ATTR && (typeof _.ADD_ATTR == "function" ? We.attributeCheck = _.ADD_ATTR : (ye === W && (ye = $t(ye)), X(ye, _.ADD_ATTR, pe))), _.ADD_URI_SAFE_ATTR && X(hr, _.ADD_URI_SAFE_ATTR, pe), _.FORBID_CONTENTS && (Ye === pr && (Ye = $t(Ye)), X(Ye, _.FORBID_CONTENTS, pe)), _.ADD_FORBID_CONTENTS && (Ye === pr && (Ye = $t(Ye)), X(Ye, _.ADD_FORBID_CONTENTS, pe)), dr && (ve["#text"] = !0), Re && X(ve, ["html", "head", "body"]), ve.table && (X(ve, ["tbody"]), delete re.tbody), _.TRUSTED_TYPES_POLICY) {
9559
+ vt.indexOf(_.PARSER_MEDIA_TYPE) === -1 ? rs : _.PARSER_MEDIA_TYPE, pe = Zt === "application/xhtml+xml" ? bs : yo, ve = xt(_, "ALLOWED_TAGS") ? Y({}, _.ALLOWED_TAGS, pe) : gn, ye = xt(_, "ALLOWED_ATTR") ? Y({}, _.ALLOWED_ATTR, pe) : W, _n = xt(_, "ALLOWED_NAMESPACES") ? Y({}, _.ALLOWED_NAMESPACES, bs) : ts, hr = xt(_, "ADD_URI_SAFE_ATTR") ? Y($t(Br), _.ADD_URI_SAFE_ATTR, pe) : Br, de = xt(_, "ADD_DATA_URI_TAGS") ? Y($t(Fr), _.ADD_DATA_URI_TAGS, pe) : Fr, Ve = xt(_, "FORBID_CONTENTS") ? Y({}, _.FORBID_CONTENTS, pe) : pr, re = xt(_, "FORBID_TAGS") ? Y({}, _.FORBID_TAGS, pe) : $t({}), Ne = xt(_, "FORBID_ATTR") ? Y({}, _.FORBID_ATTR, pe) : $t({}), Qt = xt(_, "USE_PROFILES") ? _.USE_PROFILES : !1, le = _.ALLOW_ARIA_ATTR !== !1, Se = _.ALLOW_DATA_ATTR !== !1, mn = _.ALLOW_UNKNOWN_PROTOCOLS || !1, De = _.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ue = _.SAFE_FOR_TEMPLATES || !1, Ie = _.SAFE_FOR_XML !== !1, Re = _.WHOLE_DOCUMENT || !1, Je = _.RETURN_DOM || !1, Lt = _.RETURN_DOM_FRAGMENT || !1, at = _.RETURN_TRUSTED_TYPE || !1, Fe = _.FORCE_BODY || !1, Hr = _.SANITIZE_DOM !== !1, ur = _.SANITIZE_NAMED_PROPS || !1, dr = _.KEEP_CONTENT !== !1, bn = _.IN_PLACE || !1, bt = _.ALLOWED_URI_REGEXP || Bc, en = _.NAMESPACE || _t, Nn = _.MATHML_TEXT_INTEGRATION_POINTS || Nn, Dn = _.HTML_INTEGRATION_POINTS || Dn, H = _.CUSTOM_ELEMENT_HANDLING || {}, _.CUSTOM_ELEMENT_HANDLING && fr(_.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = _.CUSTOM_ELEMENT_HANDLING.tagNameCheck), _.CUSTOM_ELEMENT_HANDLING && fr(_.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (H.attributeNameCheck = _.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), _.CUSTOM_ELEMENT_HANDLING && typeof _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = _.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ue && (Se = !1), Lt && (Je = !0), Qt && (ve = Y({}, xa), ye = [], Qt.html === !0 && (Y(ve, wa), Y(ye, Sa)), Qt.svg === !0 && (Y(ve, _s), Y(ye, ws), Y(ye, fo)), Qt.svgFilters === !0 && (Y(ve, vs), Y(ye, ws), Y(ye, fo)), Qt.mathMl === !0 && (Y(ve, ys), Y(ye, Ta), Y(ye, fo))), _.ADD_TAGS && (typeof _.ADD_TAGS == "function" ? We.tagCheck = _.ADD_TAGS : (ve === gn && (ve = $t(ve)), Y(ve, _.ADD_TAGS, pe))), _.ADD_ATTR && (typeof _.ADD_ATTR == "function" ? We.attributeCheck = _.ADD_ATTR : (ye === W && (ye = $t(ye)), Y(ye, _.ADD_ATTR, pe))), _.ADD_URI_SAFE_ATTR && Y(hr, _.ADD_URI_SAFE_ATTR, pe), _.FORBID_CONTENTS && (Ve === pr && (Ve = $t(Ve)), Y(Ve, _.FORBID_CONTENTS, pe)), _.ADD_FORBID_CONTENTS && (Ve === pr && (Ve = $t(Ve)), Y(Ve, _.ADD_FORBID_CONTENTS, pe)), dr && (ve["#text"] = !0), Re && Y(ve, ["html", "head", "body"]), ve.table && (Y(ve, ["tbody"]), delete re.tbody), _.TRUSTED_TYPES_POLICY) {
9442
9560
  if (typeof _.TRUSTED_TYPES_POLICY.createHTML != "function")
9443
9561
  throw Er('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
9444
9562
  if (typeof _.TRUSTED_TYPES_POLICY.createScriptURL != "function")
@@ -9448,14 +9566,14 @@ function Wc() {
9448
9566
  S === void 0 && (S = ek(k, o)), S !== null && typeof P == "string" && (P = S.createHTML(""));
9449
9567
  tt && tt(_), tn = _;
9450
9568
  }
9451
- }, gr = X({}, [..._s, ...vs, ...Hb]), Wr = X({}, [...ys, ...Fb]), os = function(_) {
9569
+ }, gr = Y({}, [..._s, ...vs, ...Hb]), Wr = Y({}, [...ys, ...Fb]), os = function(_) {
9452
9570
  let A = T(_);
9453
9571
  (!A || !A.tagName) && (A = {
9454
9572
  namespaceURI: en,
9455
9573
  tagName: "template"
9456
9574
  });
9457
- const I = yo(_.tagName), se = yo(A.tagName);
9458
- return _n[_.namespaceURI] ? _.namespaceURI === On ? A.namespaceURI === _t ? I === "svg" : A.namespaceURI === $n ? I === "svg" && (se === "annotation-xml" || Nn[se]) : !!gr[I] : _.namespaceURI === $n ? A.namespaceURI === _t ? I === "math" : A.namespaceURI === On ? I === "math" && Dn[se] : !!Wr[I] : _.namespaceURI === _t ? A.namespaceURI === On && !Dn[se] || A.namespaceURI === $n && !Nn[se] ? !1 : !Wr[I] && (ns[I] || !gr[I]) : !!(Zt === "application/xhtml+xml" && _n[_.namespaceURI]) : !1;
9575
+ const z = yo(_.tagName), se = yo(A.tagName);
9576
+ return _n[_.namespaceURI] ? _.namespaceURI === On ? A.namespaceURI === _t ? z === "svg" : A.namespaceURI === $n ? z === "svg" && (se === "annotation-xml" || Nn[se]) : !!gr[z] : _.namespaceURI === $n ? A.namespaceURI === _t ? z === "math" : A.namespaceURI === On ? z === "math" && Dn[se] : !!Wr[z] : _.namespaceURI === _t ? A.namespaceURI === On && !Dn[se] || A.namespaceURI === $n && !Nn[se] ? !1 : !Wr[z] && (ns[z] || !gr[z]) : !!(Zt === "application/xhtml+xml" && _n[_.namespaceURI]) : !1;
9459
9577
  }, ct = function(_) {
9460
9578
  Sr(t.removed, {
9461
9579
  element: _
@@ -9471,7 +9589,7 @@ function Wc() {
9471
9589
  attribute: A.getAttributeNode(_),
9472
9590
  from: A
9473
9591
  });
9474
- } catch (I) {
9592
+ } catch (z) {
9475
9593
  Sr(t.removed, {
9476
9594
  attribute: null,
9477
9595
  from: A
@@ -9481,20 +9599,20 @@ function Wc() {
9481
9599
  if (Je || Lt)
9482
9600
  try {
9483
9601
  ct(A);
9484
- } catch (I) {
9602
+ } catch (z) {
9485
9603
  }
9486
9604
  else
9487
9605
  try {
9488
9606
  A.setAttribute(_, "");
9489
- } catch (I) {
9607
+ } catch (z) {
9490
9608
  }
9491
9609
  }, Jr = function(_) {
9492
- let A = null, I = null;
9610
+ let A = null, z = null;
9493
9611
  if (Fe)
9494
9612
  _ = "<remove></remove>" + _;
9495
9613
  else {
9496
9614
  const xe = ks(_, /^[\r\n\t ]+/);
9497
- I = xe && xe[0];
9615
+ z = xe && xe[0];
9498
9616
  }
9499
9617
  Zt === "application/xhtml+xml" && en === _t && (_ = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + _ + "</body></html>");
9500
9618
  const se = S ? S.createHTML(_) : _;
@@ -9511,9 +9629,9 @@ function Wc() {
9511
9629
  }
9512
9630
  }
9513
9631
  const $e = A.body || A.documentElement;
9514
- return _ && I && $e.insertBefore(n.createTextNode(I), $e.childNodes[0] || null), en === _t ? Oe.call(A, Re ? "html" : "body")[0] : Re ? A.documentElement : $e;
9632
+ return _ && z && $e.insertBefore(n.createTextNode(z), $e.childNodes[0] || null), en === _t ? Oe.call(A, Re ? "html" : "body")[0] : Re ? A.documentElement : $e;
9515
9633
  }, mr = function(_) {
9516
- return Y.call(
9634
+ return V.call(
9517
9635
  _.ownerDocument || _,
9518
9636
  _,
9519
9637
  // eslint-disable-next-line no-bitwise
@@ -9522,28 +9640,28 @@ function Wc() {
9522
9640
  );
9523
9641
  }, br = function(_) {
9524
9642
  return _ instanceof g && (typeof _.nodeName != "string" || typeof _.textContent != "string" || typeof _.removeChild != "function" || !(_.attributes instanceof h) || typeof _.removeAttribute != "function" || typeof _.setAttribute != "function" || typeof _.namespaceURI != "string" || typeof _.insertBefore != "function" || typeof _.hasChildNodes != "function");
9525
- }, Yr = function(_) {
9643
+ }, Vr = function(_) {
9526
9644
  return typeof d == "function" && _ instanceof d;
9527
9645
  };
9528
9646
  function yt(D, _, A) {
9529
- ho(D, (I) => {
9530
- I.call(t, _, A, tn);
9647
+ ho(D, (z) => {
9648
+ z.call(t, _, A, tn);
9531
9649
  });
9532
9650
  }
9533
- const Xr = function(_) {
9651
+ const Yr = function(_) {
9534
9652
  let A = null;
9535
9653
  if (yt(te.beforeSanitizeElements, _, null), br(_))
9536
9654
  return ct(_), !0;
9537
- const I = pe(_.nodeName);
9655
+ const z = pe(_.nodeName);
9538
9656
  if (yt(te.uponSanitizeElement, _, {
9539
- tagName: I,
9657
+ tagName: z,
9540
9658
  allowedTags: ve
9541
- }), ze && _.hasChildNodes() && !Yr(_.firstElementChild) && Xe(/<[/\w!]/g, _.innerHTML) && Xe(/<[/\w!]/g, _.textContent) || _.nodeType === Cr.progressingInstruction || ze && _.nodeType === Cr.comment && Xe(/<[/\w]/g, _.data))
9659
+ }), Ie && _.hasChildNodes() && !Vr(_.firstElementChild) && Ye(/<[/\w!]/g, _.innerHTML) && Ye(/<[/\w!]/g, _.textContent) || _.nodeType === Cr.progressingInstruction || Ie && _.nodeType === Cr.comment && Ye(/<[/\w]/g, _.data))
9542
9660
  return ct(_), !0;
9543
- if (!(We.tagCheck instanceof Function && We.tagCheck(I)) && (!ve[I] || re[I])) {
9544
- if (!re[I] && Kr(I) && (H.tagNameCheck instanceof RegExp && Xe(H.tagNameCheck, I) || H.tagNameCheck instanceof Function && H.tagNameCheck(I)))
9661
+ if (!(We.tagCheck instanceof Function && We.tagCheck(z)) && (!ve[z] || re[z])) {
9662
+ if (!re[z] && Kr(z) && (H.tagNameCheck instanceof RegExp && Ye(H.tagNameCheck, z) || H.tagNameCheck instanceof Function && H.tagNameCheck(z)))
9545
9663
  return !1;
9546
- if (dr && !Ye[I]) {
9664
+ if (dr && !Ve[z]) {
9547
9665
  const se = T(_) || _.parentNode, $e = N(_) || _.childNodes;
9548
9666
  if ($e && se) {
9549
9667
  const xe = $e.length;
@@ -9555,31 +9673,31 @@ function Wc() {
9555
9673
  }
9556
9674
  return ct(_), !0;
9557
9675
  }
9558
- return _ instanceof l && !os(_) || (I === "noscript" || I === "noembed" || I === "noframes") && Xe(/<\/no(script|embed|frames)/i, _.innerHTML) ? (ct(_), !0) : (ue && _.nodeType === Cr.text && (A = _.textContent, ho([Pe, He, Ct], (se) => {
9676
+ return _ instanceof l && !os(_) || (z === "noscript" || z === "noembed" || z === "noframes") && Ye(/<\/no(script|embed|frames)/i, _.innerHTML) ? (ct(_), !0) : (ue && _.nodeType === Cr.text && (A = _.textContent, ho([Pe, He, Ct], (se) => {
9559
9677
  A = Tr(A, se, " ");
9560
9678
  }), _.textContent !== A && (Sr(t.removed, {
9561
9679
  element: _.cloneNode()
9562
9680
  }), _.textContent = A)), yt(te.afterSanitizeElements, _, null), !1);
9563
- }, Vr = function(_, A, I) {
9564
- if (Hr && (A === "id" || A === "name") && (I in n || I in Gr))
9681
+ }, Xr = function(_, A, z) {
9682
+ if (Hr && (A === "id" || A === "name") && (z in n || z in Gr))
9565
9683
  return !1;
9566
- if (!(Se && !Ne[A] && Xe(fn, A))) {
9567
- if (!(le && Xe(Pt, A))) {
9684
+ if (!(Se && !Ne[A] && Ye(fn, A))) {
9685
+ if (!(le && Ye(Pt, A))) {
9568
9686
  if (!(We.attributeCheck instanceof Function && We.attributeCheck(A, _))) {
9569
9687
  if (!ye[A] || Ne[A]) {
9570
9688
  if (
9571
9689
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
9572
9690
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
9573
9691
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
9574
- !(Kr(_) && (H.tagNameCheck instanceof RegExp && Xe(H.tagNameCheck, _) || H.tagNameCheck instanceof Function && H.tagNameCheck(_)) && (H.attributeNameCheck instanceof RegExp && Xe(H.attributeNameCheck, A) || H.attributeNameCheck instanceof Function && H.attributeNameCheck(A, _)) || // Alternative, second condition checks if it's an `is`-attribute, AND
9692
+ !(Kr(_) && (H.tagNameCheck instanceof RegExp && Ye(H.tagNameCheck, _) || H.tagNameCheck instanceof Function && H.tagNameCheck(_)) && (H.attributeNameCheck instanceof RegExp && Ye(H.attributeNameCheck, A) || H.attributeNameCheck instanceof Function && H.attributeNameCheck(A, _)) || // Alternative, second condition checks if it's an `is`-attribute, AND
9575
9693
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
9576
- A === "is" && H.allowCustomizedBuiltInElements && (H.tagNameCheck instanceof RegExp && Xe(H.tagNameCheck, I) || H.tagNameCheck instanceof Function && H.tagNameCheck(I)))
9694
+ A === "is" && H.allowCustomizedBuiltInElements && (H.tagNameCheck instanceof RegExp && Ye(H.tagNameCheck, z) || H.tagNameCheck instanceof Function && H.tagNameCheck(z)))
9577
9695
  ) return !1;
9578
9696
  } else if (!hr[A]) {
9579
- if (!Xe(bt, Tr(I, Rt, ""))) {
9580
- if (!((A === "src" || A === "xlink:href" || A === "href") && _ !== "script" && Ub(I, "data:") === 0 && de[_])) {
9581
- if (!(mn && !Xe(mt, Tr(I, Rt, "")))) {
9582
- if (I)
9697
+ if (!Ye(bt, Tr(z, Rt, ""))) {
9698
+ if (!((A === "src" || A === "xlink:href" || A === "href") && _ !== "script" && Ub(z, "data:") === 0 && de[_])) {
9699
+ if (!(mn && !Ye(mt, Tr(z, Rt, "")))) {
9700
+ if (z)
9583
9701
  return !1;
9584
9702
  }
9585
9703
  }
@@ -9598,7 +9716,7 @@ function Wc() {
9598
9716
  } = _;
9599
9717
  if (!A || br(_))
9600
9718
  return;
9601
- const I = {
9719
+ const z = {
9602
9720
  attrName: "",
9603
9721
  attrValue: "",
9604
9722
  keepAttr: !0,
@@ -9611,23 +9729,23 @@ function Wc() {
9611
9729
  name: xe,
9612
9730
  namespaceURI: Be,
9613
9731
  value: wt
9614
- } = $e, It = pe(xe), _r = wt;
9732
+ } = $e, zt = pe(xe), _r = wt;
9615
9733
  let Le = xe === "value" ? _r : jb(_r);
9616
- if (I.attrName = It, I.attrValue = Le, I.keepAttr = !0, I.forceKeepAttr = void 0, yt(te.uponSanitizeAttribute, _, I), Le = I.attrValue, ur && (It === "id" || It === "name") && (lt(xe, _), Le = es + Le), ze && Xe(/((--!?|])>)|<\/(style|title|textarea)/i, Le)) {
9734
+ if (z.attrName = zt, z.attrValue = Le, z.keepAttr = !0, z.forceKeepAttr = void 0, yt(te.uponSanitizeAttribute, _, z), Le = z.attrValue, ur && (zt === "id" || zt === "name") && (lt(xe, _), Le = es + Le), Ie && Ye(/((--!?|])>)|<\/(style|title|textarea)/i, Le)) {
9617
9735
  lt(xe, _);
9618
9736
  continue;
9619
9737
  }
9620
- if (It === "attributename" && ks(Le, "href")) {
9738
+ if (zt === "attributename" && ks(Le, "href")) {
9621
9739
  lt(xe, _);
9622
9740
  continue;
9623
9741
  }
9624
- if (I.forceKeepAttr)
9742
+ if (z.forceKeepAttr)
9625
9743
  continue;
9626
- if (!I.keepAttr) {
9744
+ if (!z.keepAttr) {
9627
9745
  lt(xe, _);
9628
9746
  continue;
9629
9747
  }
9630
- if (!De && Xe(/\/>/i, Le)) {
9748
+ if (!De && Ye(/\/>/i, Le)) {
9631
9749
  lt(xe, _);
9632
9750
  continue;
9633
9751
  }
@@ -9635,12 +9753,12 @@ function Wc() {
9635
9753
  Le = Tr(Le, eo, " ");
9636
9754
  });
9637
9755
  const Qr = pe(_.nodeName);
9638
- if (!Vr(Qr, It, Le)) {
9756
+ if (!Xr(Qr, zt, Le)) {
9639
9757
  lt(xe, _);
9640
9758
  continue;
9641
9759
  }
9642
9760
  if (S && typeof k == "object" && typeof k.getAttributeType == "function" && !Be)
9643
- switch (k.getAttributeType(Qr, It)) {
9761
+ switch (k.getAttributeType(Qr, zt)) {
9644
9762
  case "TrustedHTML": {
9645
9763
  Le = S.createHTML(Le);
9646
9764
  break;
@@ -9660,14 +9778,14 @@ function Wc() {
9660
9778
  yt(te.afterSanitizeAttributes, _, null);
9661
9779
  }, qt = function D(_) {
9662
9780
  let A = null;
9663
- const I = mr(_);
9664
- for (yt(te.beforeSanitizeShadowDOM, _, null); A = I.nextNode(); )
9665
- yt(te.uponSanitizeShadowNode, A, null), Xr(A), kr(A), A.content instanceof i && D(A.content);
9781
+ const z = mr(_);
9782
+ for (yt(te.beforeSanitizeShadowDOM, _, null); A = z.nextNode(); )
9783
+ yt(te.uponSanitizeShadowNode, A, null), Yr(A), kr(A), A.content instanceof i && D(A.content);
9666
9784
  yt(te.afterSanitizeShadowDOM, _, null);
9667
9785
  };
9668
9786
  return t.sanitize = function(D) {
9669
- let _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, A = null, I = null, se = null, $e = null;
9670
- if (kn = !D, kn && (D = "<!-->"), typeof D != "string" && !Yr(D))
9787
+ let _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, A = null, z = null, se = null, $e = null;
9788
+ if (kn = !D, kn && (D = "<!-->"), typeof D != "string" && !Vr(D))
9671
9789
  if (typeof D.toString == "function") {
9672
9790
  if (D = D.toString(), typeof D != "string")
9673
9791
  throw Er("dirty is not a string, aborting");
@@ -9682,7 +9800,7 @@ function Wc() {
9682
9800
  throw Er("root node is forbidden and cannot be sanitized in-place");
9683
9801
  }
9684
9802
  } else if (D instanceof d)
9685
- A = Jr("<!---->"), I = A.ownerDocument.importNode(D, !0), I.nodeType === Cr.element && I.nodeName === "BODY" || I.nodeName === "HTML" ? A = I : A.appendChild(I);
9803
+ A = Jr("<!---->"), z = A.ownerDocument.importNode(D, !0), z.nodeType === Cr.element && z.nodeName === "BODY" || z.nodeName === "HTML" ? A = z : A.appendChild(z);
9686
9804
  else {
9687
9805
  if (!Je && !ue && !Re && // eslint-disable-next-line unicorn/prefer-includes
9688
9806
  D.indexOf("<") === -1)
@@ -9693,7 +9811,7 @@ function Wc() {
9693
9811
  A && Fe && ct(A.firstChild);
9694
9812
  const xe = mr(bn ? D : A);
9695
9813
  for (; se = xe.nextNode(); )
9696
- Xr(se), kr(se), se.content instanceof i && qt(se.content);
9814
+ Yr(se), kr(se), se.content instanceof i && qt(se.content);
9697
9815
  if (bn)
9698
9816
  return D;
9699
9817
  if (Je) {
@@ -9705,7 +9823,7 @@ function Wc() {
9705
9823
  return (ye.shadowroot || ye.shadowrootmode) && ($e = qe.call(r, $e, !0)), $e;
9706
9824
  }
9707
9825
  let Be = Re ? A.outerHTML : A.innerHTML;
9708
- return Re && ve["!doctype"] && A.ownerDocument && A.ownerDocument.doctype && A.ownerDocument.doctype.name && Xe(Gc, A.ownerDocument.doctype.name) && (Be = "<!DOCTYPE " + A.ownerDocument.doctype.name + `>
9826
+ return Re && ve["!doctype"] && A.ownerDocument && A.ownerDocument.doctype && A.ownerDocument.doctype.name && Ye(Gc, A.ownerDocument.doctype.name) && (Be = "<!DOCTYPE " + A.ownerDocument.doctype.name + `>
9709
9827
  ` + Be), ue && ho([Pe, He, Ct], (wt) => {
9710
9828
  Be = Tr(Be, wt, " ");
9711
9829
  }), S && at ? S.createHTML(Be) : Be;
@@ -9716,8 +9834,8 @@ function Wc() {
9716
9834
  tn = null, kt = !1;
9717
9835
  }, t.isValidAttribute = function(D, _, A) {
9718
9836
  tn || Mn({});
9719
- const I = pe(D), se = pe(_);
9720
- return Vr(I, se, A);
9837
+ const z = pe(D), se = pe(_);
9838
+ return Xr(z, se, A);
9721
9839
  }, t.addHook = function(D, _) {
9722
9840
  typeof _ == "function" && Sr(te[D], _);
9723
9841
  }, t.removeHook = function(D, _) {
@@ -9737,13 +9855,13 @@ function Jc(e) {
9737
9855
  const t = ce.parse(e, { gfm: !0, breaks: !0, async: !1 });
9738
9856
  return tk.sanitize(t);
9739
9857
  }
9740
- const Yc = 1e3, Xc = 32, Ca = 15e3, nk = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]), rk = 4e3;
9741
- let $ = null, jt = null, je = null, oi = null, Zo = null, Ns = !1, wo = null, Ir = null, F = { kind: "connecting" }, Kn = [], rr = null, me = null, or = null, Gt = null, zr = -1, et = null, Jt = !1, Wt = null, Tn = /* @__PURE__ */ new Set();
9858
+ const Vc = 1e3, Yc = 32, Ca = 15e3, nk = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]), rk = 4e3;
9859
+ let $ = null, jt = null, je = null, oi = null, Zo = null, Ns = !1, wo = null, zr = null, F = { kind: "connecting" }, Kn = [], rr = null, me = null, or = null, Gt = null, Ir = -1, et = null, Jt = !1, Wt = null, Tn = /* @__PURE__ */ new Set();
9742
9860
  function Ds() {
9743
- xo(), Ic(), jt && clearInterval(jt), jt = null, Wt == null || Wt(), Wt = null, je == null || je.destroy(), je = null, $ && Xt($), $ == null || $.remove(), $ = null, oi = null, F = { kind: "connecting" }, Kn = [], rr = null, me = null, or = null, Gt = null, Zo = null, zr = -1, et = null, Jt = !1, Tn = /* @__PURE__ */ new Set();
9861
+ xo(), zc(), jt && clearInterval(jt), jt = null, Wt == null || Wt(), Wt = null, je == null || je.destroy(), je = null, $ && Yt($), $ == null || $.remove(), $ = null, oi = null, F = { kind: "connecting" }, Kn = [], rr = null, me = null, or = null, Gt = null, Zo = null, Ir = -1, et = null, Jt = !1, Tn = /* @__PURE__ */ new Set();
9744
9862
  }
9745
9863
  function si(e, t, n, r, o) {
9746
- $ && Ds(), oi = o != null ? o : null, F = { kind: "connecting" }, Kn = [], rr = null, zr = -1, et = null, Jt = !1, Tn = /* @__PURE__ */ new Set(), me = e, or = n, Gt = t, Zo = r, Lc({ taskId: e, backendUrl: n, title: r }), $ = document.createElement("div"), $.className = "ap-sdk-panel", $.setAttribute("data-ap-sdk", "1"), $.setAttribute("role", "dialog"), $.setAttribute("aria-modal", "true"), $.setAttribute("aria-label", "Automation in progress");
9864
+ $ && Ds(), oi = o != null ? o : null, F = { kind: "connecting" }, Kn = [], rr = null, Ir = -1, et = null, Jt = !1, Tn = /* @__PURE__ */ new Set(), me = e, or = n, Gt = t, Zo = r, Lc({ taskId: e, backendUrl: n, title: r }), $ = document.createElement("div"), $.className = "ap-sdk-panel", $.setAttribute("data-ap-sdk", "1"), $.setAttribute("role", "dialog"), $.setAttribute("aria-modal", "true"), $.setAttribute("aria-label", "Automation in progress");
9747
9865
  const i = r.length > 55 ? `${r.slice(0, 52)}…` : r;
9748
9866
  $.innerHTML = `
9749
9867
  <div class="ap-sdk-panel__header">
@@ -9788,7 +9906,7 @@ function si(e, t, n, r, o) {
9788
9906
  a.stopPropagation();
9789
9907
  }, { passive: !0 }), $.addEventListener("touchmove", (a) => {
9790
9908
  a.stopPropagation();
9791
- }, { passive: !0 }), document.body.appendChild($), je = Us(), Yt($), Ys($, Js), $.querySelector("[data-ap-close]").addEventListener("click", () => {
9909
+ }, { passive: !0 }), document.body.appendChild($), je = Us(), Vt($), Vs($, Js), $.querySelector("[data-ap-close]").addEventListener("click", () => {
9792
9910
  Ds(), o == null || o();
9793
9911
  }), $.querySelector("[data-ap-runner-chat-form]").addEventListener("submit", (a) => {
9794
9912
  a.preventDefault(), ik(t, e);
@@ -9796,15 +9914,15 @@ function si(e, t, n, r, o) {
9796
9914
  a.stopPropagation();
9797
9915
  const d = a.currentTarget;
9798
9916
  if (!Ns) {
9799
- Ns = !0, d.textContent = "Confirm", wo = setTimeout(xo, rk), Ir = (l) => {
9917
+ Ns = !0, d.textContent = "Confirm", wo = setTimeout(xo, rk), zr = (l) => {
9800
9918
  l.target !== d && xo();
9801
- }, document.addEventListener("click", Ir, !0);
9919
+ }, document.addEventListener("click", zr, !0);
9802
9920
  return;
9803
9921
  }
9804
9922
  xo(), ok(t, e);
9805
- }), ii(), Vc(e, t);
9923
+ }), ii(), Xc(e, t);
9806
9924
  }
9807
- function Vc(e, t) {
9925
+ function Xc(e, t) {
9808
9926
  const n = (d) => L(null, null, function* () {
9809
9927
  if (me !== e || !$ || F.kind !== "idle" && F.kind !== "connecting" || Tn.has(d.commandId)) return;
9810
9928
  Tn.add(d.commandId);
@@ -9869,10 +9987,10 @@ function Vc(e, t) {
9869
9987
  });
9870
9988
  }
9871
9989
  function Sn(e) {
9872
- F = e, F.kind === "idle" && rr === null && (rr = Date.now(), qo(), jt = setInterval(qo, Yc)), F.kind === "finished" && (jt && (clearInterval(jt), jt = null), Wt == null || Wt(), Wt = null, je == null || je.hide(), Ic()), ii();
9990
+ F = e, F.kind === "idle" && rr === null && (rr = Date.now(), qo(), jt = setInterval(qo, Vc)), F.kind === "finished" && (jt && (clearInterval(jt), jt = null), Wt == null || Wt(), Wt = null, je == null || je.hide(), zc()), ii();
9873
9991
  }
9874
9992
  function xo() {
9875
- Ns = !1, wo && (clearTimeout(wo), wo = null), Ir && (document.removeEventListener("click", Ir, !0), Ir = null);
9993
+ Ns = !1, wo && (clearTimeout(wo), wo = null), zr && (document.removeEventListener("click", zr, !0), zr = null);
9876
9994
  const e = $ == null ? void 0 : $.querySelector("[data-ap-runner-cancel]");
9877
9995
  e && (e.textContent = "Cancel task");
9878
9996
  }
@@ -9891,9 +10009,9 @@ function ok(e, t) {
9891
10009
  function Kc() {
9892
10010
  if (!me || !Gt || !or || !Zo) return;
9893
10011
  const e = me, t = Gt;
9894
- Lc({ taskId: e, backendUrl: or, title: Zo }), jt && clearInterval(jt), qo(), jt = setInterval(qo, Yc);
10012
+ Lc({ taskId: e, backendUrl: or, title: Zo }), jt && clearInterval(jt), qo(), jt = setInterval(qo, Vc);
9895
10013
  const n = F.kind === "finished" ? F.actionsRun : 0;
9896
- Tn = /* @__PURE__ */ new Set(), F = { kind: "idle", actionsRun: n }, ii(), Vc(e, t);
10014
+ Tn = /* @__PURE__ */ new Set(), F = { kind: "idle", actionsRun: n }, ii(), Xc(e, t);
9897
10015
  }
9898
10016
  function ii() {
9899
10017
  if (!$) return;
@@ -9986,7 +10104,7 @@ function Pa(e, t, n) {
9986
10104
  if (!a)
9987
10105
  throw new Error(`element not found (${e.selector})`);
9988
10106
  if (je == null || je.update(a), e.action === "click")
9989
- yield zm(a), o = "Clicked";
10107
+ yield Im(a), o = "Clicked";
9990
10108
  else {
9991
10109
  if (e.value === void 0)
9992
10110
  throw new Error("inputText command is missing a value");
@@ -10061,7 +10179,7 @@ function uk(e, t, n) {
10061
10179
  const l = $.querySelector("[data-ap-runner-log]");
10062
10180
  if (!l) return;
10063
10181
  (m = l.querySelector("[data-ap-runner-placeholder]")) == null || m.remove();
10064
- const p = l.scrollHeight - l.scrollTop - l.clientHeight <= Xc, h = document.createElement("div");
10182
+ const p = l.scrollHeight - l.scrollTop - l.clientHeight <= Yc, h = document.createElement("div");
10065
10183
  h.className = `ap-sdk-runner__log-entry ap-sdk-runner__log-entry--${e}`, h.textContent = Kn[Kn.length - 1].text, l.appendChild(h), p && (l.scrollTop = l.scrollHeight);
10066
10184
  }
10067
10185
  function dk(e) {
@@ -10074,15 +10192,15 @@ function pk(e) {
10074
10192
  }
10075
10193
  function Ra(e) {
10076
10194
  var r;
10077
- const t = e.filter((o) => o.sequence > zr).sort((o, i) => o.sequence - i.sequence);
10078
- if (t.length === 0 || (zr = Math.max(zr, ...t.map((o) => o.sequence)), !$)) return;
10195
+ const t = e.filter((o) => o.sequence > Ir).sort((o, i) => o.sequence - i.sequence);
10196
+ if (t.length === 0 || (Ir = Math.max(Ir, ...t.map((o) => o.sequence)), !$)) return;
10079
10197
  const n = $.querySelector("[data-ap-runner-log]");
10080
10198
  if (n)
10081
10199
  for (const o of t) {
10082
10200
  const i = pk(o);
10083
10201
  if (!i) continue;
10084
10202
  (r = n.querySelector("[data-ap-runner-placeholder]")) == null || r.remove();
10085
- const a = n.scrollHeight - n.scrollTop - n.clientHeight <= Xc, d = document.createElement("div");
10203
+ const a = n.scrollHeight - n.scrollTop - n.clientHeight <= Yc, d = document.createElement("div");
10086
10204
  d.className = `ap-sdk-runner__log-entry ap-sdk-runner__log-entry--output ap-sdk-runner__log-entry--${o.stream}`, o.stream === "sdk_event" ? (d.classList.add("ap-sdk-markdown"), d.innerHTML = Jc(i)) : d.textContent = i, n.appendChild(d), a && (n.scrollTop = n.scrollHeight);
10087
10205
  }
10088
10206
  }
@@ -10090,30 +10208,32 @@ function hk(e) {
10090
10208
  if (!$ || !me || !or) return;
10091
10209
  const t = $.querySelector("[data-ap-runner-summary]");
10092
10210
  if (!t) return;
10093
- const n = `${or.replace(/\/+$/, "")}/tasks/${me}`, r = e === "completed" ? "Automation complete!" : "Automation ended", o = e === "completed";
10211
+ const n = `${or.replace(/\/+$/, "")}/tasks/${me}`, r = e === "completed" ? "Automation complete!" : "Automation ended", o = e === "completed", i = o ? "ap-sdk-panel__btn--secondary" : "ap-sdk-panel__btn--primary";
10094
10212
  t.style.display = "block", t.innerHTML = `
10095
10213
  <div class="ap-sdk-success-card">
10096
10214
  <p class="ap-sdk-success-headline">${ai(r)}</p>
10097
10215
  ${o ? `
10098
10216
  <div class="ap-sdk-runner__approval" data-ap-runner-approval>
10099
10217
  <div class="ap-sdk-runner__approval-actions">
10100
- <button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-runner-approve>Approve</button>
10101
- <button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost" data-ap-runner-reject>Reject</button>
10218
+ <button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary ap-sdk-panel__btn--block" data-ap-runner-approve><span class="ap-sdk-btn-icon" aria-hidden="true">✓</span>Approve</button>
10219
+ <button class="ap-sdk-runner__text-btn ap-sdk-runner__text-btn--danger" data-ap-runner-reject>Reject</button>
10102
10220
  </div>
10103
10221
  <div class="ap-sdk-runner__reject-form" data-ap-runner-reject-form style="display:none">
10104
- <textarea class="ap-sdk-panel__textarea" rows="2" placeholder="Describe what was wrong — the agent will continue with this instruction. Leave empty to reject permanently." data-ap-runner-reject-feedback></textarea>
10105
- <button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-runner-reject-submit>Reject Permanently</button>
10222
+ <textarea class="ap-sdk-panel__textarea" rows="2" placeholder="What was wrong? (optional)" data-ap-runner-reject-feedback></textarea>
10223
+ <div class="ap-sdk-runner__reject-hint">Leave blank to reject permanently, or add details so the agent can retry with your feedback.</div>
10224
+ <button class="ap-sdk-panel__btn ap-sdk-panel__btn--danger ap-sdk-panel__btn--block" data-ap-runner-reject-submit>Reject Permanently</button>
10106
10225
  </div>
10107
10226
  <div class="ap-sdk-runner__approval-error" data-ap-runner-approval-error style="display:none"></div>
10108
- </div>` : ""}
10109
- <div class="ap-sdk-success-actions">
10110
- <button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-runner-view>View task →</button>
10111
- <button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost" data-ap-runner-close>Close</button>
10227
+ </div>
10228
+ <div class="ap-sdk-runner__divider"></div>` : ""}
10229
+ <div class="ap-sdk-success-actions ap-sdk-success-actions--stacked">
10230
+ <button class="ap-sdk-panel__btn ${i} ap-sdk-panel__btn--block" data-ap-runner-view>View task<span class="ap-sdk-btn-icon ap-sdk-btn-icon--trailing" aria-hidden="true">↗</span></button>
10231
+ <button class="ap-sdk-runner__text-btn" data-ap-runner-close>Close</button>
10112
10232
  </div>
10113
10233
  </div>
10114
10234
  `, t.querySelector("[data-ap-runner-view]").addEventListener("click", () => window.open(n, "_blank", "noopener,noreferrer")), t.querySelector("[data-ap-runner-close]").addEventListener("click", () => {
10115
- const i = oi;
10116
- Ds(), i == null || i();
10235
+ const a = oi;
10236
+ Ds(), a == null || a();
10117
10237
  }), o && fk(t);
10118
10238
  }
10119
10239
  function fk(e) {
@@ -10125,7 +10245,7 @@ function fk(e) {
10125
10245
  const h = me, g = Gt;
10126
10246
  t.disabled = !0, n.disabled = !0, a.style.display = "none";
10127
10247
  try {
10128
- yield xm(g, h), d.innerHTML = '<span class="ap-sdk-status-badge ap-sdk-status-badge--approved">Approved</span>', r.style.display = "none";
10248
+ yield xm(g, h), d.innerHTML = '<span class="ap-sdk-status-badge ap-sdk-status-badge--approved">✓ Approved</span>', r.style.display = "none";
10129
10249
  } catch (m) {
10130
10250
  t.disabled = !1, n.disabled = !1, l(m instanceof Error ? m.message : "Failed to approve — try again.");
10131
10251
  }
@@ -10140,7 +10260,7 @@ function fk(e) {
10140
10260
  const h = me, g = Gt, m = o.value.trim();
10141
10261
  i.disabled = !0, t.disabled = !0, a.style.display = "none", i.textContent = "Rejecting…";
10142
10262
  try {
10143
- yield Sm(g, h, m), m ? Kc() : (d.innerHTML = '<span class="ap-sdk-status-badge ap-sdk-status-badge--rejected">Rejected</span>', r.style.display = "none");
10263
+ yield Sm(g, h, m), m ? Kc() : (d.innerHTML = '<span class="ap-sdk-status-badge ap-sdk-status-badge--rejected">✕ Rejected</span>', r.style.display = "none");
10144
10264
  } catch (k) {
10145
10265
  i.disabled = !1, t.disabled = !1, p(), l(k instanceof Error ? k.message : "Failed to reject — try again.");
10146
10266
  }
@@ -10287,7 +10407,7 @@ function Ak(e) {
10287
10407
  function Ck(e) {
10288
10408
  return e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? Qc(e) : Lo(e) || e.tagName.toLowerCase();
10289
10409
  }
10290
- let sr = [], Ve = null, Ho = null, rt = null, Dt = null, Mt = null;
10410
+ let sr = [], Xe = null, Ho = null, rt = null, Dt = null, Mt = null;
10291
10411
  function nl() {
10292
10412
  Ho && (Ho.textContent = `● Recording — ${sr.length} step${sr.length === 1 ? "" : "s"}`);
10293
10413
  }
@@ -10302,11 +10422,11 @@ function Pk(e) {
10302
10422
  return e instanceof HTMLSelectElement && (r = (n = (t = e.selectedOptions[0]) == null ? void 0 : t.textContent) == null ? void 0 : n.trim()) != null ? r : e.value;
10303
10423
  }
10304
10424
  function Rk(e, t) {
10305
- rt && rt(), sr = [], Dt = null, Ve = document.createElement("div"), Ve.className = "ap-sdk-recorder-bar", Ve.setAttribute("data-ap-sdk", "1"), Ve.innerHTML = `
10425
+ rt && rt(), sr = [], Dt = null, Xe = document.createElement("div"), Xe.className = "ap-sdk-recorder-bar", Xe.setAttribute("data-ap-sdk", "1"), Xe.innerHTML = `
10306
10426
  <span class="ap-sdk-recorder-bar__counter" data-ap-recorder-counter>● Recording — 0 steps</span>
10307
10427
  <button class="ap-sdk-recorder-bar__btn ap-sdk-recorder-bar__btn--stop" data-ap-recorder-stop type="button">Stop</button>
10308
10428
  <button class="ap-sdk-recorder-bar__btn ap-sdk-recorder-bar__btn--discard" data-ap-recorder-discard type="button">Discard</button>
10309
- `, document.body.appendChild(Ve), Yt(Ve), Ho = Ve.querySelector("[data-ap-recorder-counter]");
10429
+ `, document.body.appendChild(Xe), Vt(Xe), Ho = Xe.querySelector("[data-ap-recorder-counter]");
10310
10430
  const n = () => {
10311
10431
  Ms();
10312
10432
  const l = sr;
@@ -10314,7 +10434,7 @@ function Rk(e, t) {
10314
10434
  }, r = () => {
10315
10435
  rt == null || rt();
10316
10436
  };
10317
- Ve.querySelector("[data-ap-recorder-stop]").addEventListener("click", n), Ve.querySelector("[data-ap-recorder-discard]").addEventListener("click", r);
10437
+ Xe.querySelector("[data-ap-recorder-stop]").addEventListener("click", n), Xe.querySelector("[data-ap-recorder-discard]").addEventListener("click", r);
10318
10438
  const o = (l) => {
10319
10439
  if (Lr(l.target)) return;
10320
10440
  const p = l.target;
@@ -10370,7 +10490,7 @@ function Rk(e, t) {
10370
10490
  });
10371
10491
  };
10372
10492
  document.addEventListener("click", o, { capture: !0 }), document.addEventListener("change", i, { capture: !0 }), window.addEventListener("scroll", a, { capture: !0, passive: !0 }), document.addEventListener("keydown", d, { capture: !0 }), rt = () => {
10373
- document.removeEventListener("click", o, { capture: !0 }), document.removeEventListener("change", i, { capture: !0 }), window.removeEventListener("scroll", a, { capture: !0 }), document.removeEventListener("keydown", d, { capture: !0 }), Mt && (clearTimeout(Mt), Mt = null), Dt = null, Ve && Xt(Ve), Ve == null || Ve.remove(), Ve = null, Ho = null, rt = null;
10493
+ document.removeEventListener("click", o, { capture: !0 }), document.removeEventListener("change", i, { capture: !0 }), window.removeEventListener("scroll", a, { capture: !0 }), document.removeEventListener("keydown", d, { capture: !0 }), Mt && (clearTimeout(Mt), Mt = null), Dt = null, Xe && Yt(Xe), Xe == null || Xe.remove(), Xe = null, Ho = null, rt = null;
10374
10494
  };
10375
10495
  }
10376
10496
  function Lk() {
@@ -10379,62 +10499,62 @@ function Lk() {
10379
10499
  function So() {
10380
10500
  return rt !== null;
10381
10501
  }
10382
- const Ik = "data-ap-sdk", zk = "ap-sdk-fab", Ia = "ap-sdk-fab--dragging", li = "ap-sdk-fab--open", rl = "ap-sdk-fab-pos", Fo = "ap-sdk-fab--left-edge", $k = '<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>', Ok = '<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>', Nk = '<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>', Dk = '<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>';
10383
- let z = null, Ot = null, sn = null, an = null, ut = null, Zn = null, qn = null, Hn = null, To = null, $r = null, Qn = null, Eo = null, Ao = null, Co = null, ol = 0, sl = 0, il = 0, al = 0, Gn = !1, St = !1, Or = null, En = null;
10502
+ const zk = "data-ap-sdk", Ik = "ap-sdk-fab", za = "ap-sdk-fab--dragging", li = "ap-sdk-fab--open", rl = "ap-sdk-fab-pos", Fo = "ap-sdk-fab--left-edge", $k = '<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>', Ok = '<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>', Nk = '<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>', Dk = '<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>';
10503
+ let I = null, Ot = null, sn = null, an = null, ut = null, Zn = null, qn = null, Hn = null, To = null, $r = null, Qn = null, Eo = null, Ao = null, Co = null, ol = 0, sl = 0, il = 0, al = 0, Gn = !1, St = !1, Or = null, En = null;
10384
10504
  function Mk() {
10385
10505
  Or = (e) => {
10386
- if (!z) {
10506
+ if (!I) {
10387
10507
  Po();
10388
10508
  return;
10389
10509
  }
10390
10510
  if (!Gn) {
10391
10511
  if (Math.hypot(e.clientX - il, e.clientY - al) < 5) return;
10392
- Gn = !0, St = !0, z.classList.add(Ia);
10512
+ Gn = !0, St = !0, I.classList.add(za);
10393
10513
  }
10394
10514
  Uk(e.clientX - ol, e.clientY - sl);
10395
10515
  }, En = () => {
10396
- if (!z) {
10516
+ if (!I) {
10397
10517
  Po();
10398
10518
  return;
10399
10519
  }
10400
- Gn ? (Gn = !1, z.classList.remove(Ia), z.style.transition = "", jk(z.getBoundingClientRect())) : z.style.transition = "", Po();
10520
+ Gn ? (Gn = !1, I.classList.remove(za), I.style.transition = "", jk(I.getBoundingClientRect())) : I.style.transition = "", Po();
10401
10521
  }, window.addEventListener("pointermove", Or), window.addEventListener("pointerup", En), window.addEventListener("pointercancel", En);
10402
10522
  }
10403
10523
  function Po() {
10404
10524
  Or && (window.removeEventListener("pointermove", Or), Or = null), En && (window.removeEventListener("pointerup", En), window.removeEventListener("pointercancel", En), En = null);
10405
10525
  }
10406
10526
  function Uk(e, t) {
10407
- if (!z) return;
10408
- const n = z.offsetWidth || 52, r = z.offsetHeight || 52;
10409
- z.style.top = `${Math.max(0, Math.min(t, window.innerHeight - r))}px`, z.style.left = `${Math.max(0, Math.min(e, window.innerWidth - n))}px`, z.style.bottom = "auto", z.style.right = "auto";
10527
+ if (!I) return;
10528
+ const n = I.offsetWidth || 52, r = I.offsetHeight || 52;
10529
+ I.style.top = `${Math.max(0, Math.min(t, window.innerHeight - r))}px`, I.style.left = `${Math.max(0, Math.min(e, window.innerWidth - n))}px`, I.style.bottom = "auto", I.style.right = "auto";
10410
10530
  }
10411
10531
  function jk(e) {
10412
- if (!z) return;
10532
+ if (!I) return;
10413
10533
  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";
10414
- z.style.top = "auto", z.style.bottom = `${n}px`, r === "left" ? (z.style.right = "auto", z.style.left = "16px", z.classList.add(Fo)) : (z.style.left = "auto", z.style.right = "16px", z.classList.remove(Fo));
10534
+ I.style.top = "auto", I.style.bottom = `${n}px`, r === "left" ? (I.style.right = "auto", I.style.left = "16px", I.classList.add(Fo)) : (I.style.left = "auto", I.style.right = "16px", I.classList.remove(Fo));
10415
10535
  try {
10416
10536
  localStorage.setItem(rl, JSON.stringify({ edge: r, bottom: n }));
10417
10537
  } catch (o) {
10418
10538
  }
10419
10539
  }
10420
10540
  function Zk() {
10421
- if (z)
10541
+ if (I)
10422
10542
  try {
10423
10543
  const e = localStorage.getItem(rl);
10424
10544
  if (!e) return;
10425
10545
  const t = JSON.parse(e);
10426
10546
  if (typeof t.bottom != "number" || t.edge !== "left" && t.edge !== "right") return;
10427
10547
  const r = Math.max(16, Math.min(t.bottom, window.innerHeight - 52 - 16));
10428
- z.style.top = "auto", z.style.bottom = `${r}px`, t.edge === "left" ? (z.style.right = "auto", z.style.left = "16px", z.classList.add(Fo)) : (z.style.left = "auto", z.style.right = "16px", z.classList.remove(Fo));
10548
+ I.style.top = "auto", I.style.bottom = `${r}px`, t.edge === "left" ? (I.style.right = "auto", I.style.left = "16px", I.classList.add(Fo)) : (I.style.left = "auto", I.style.right = "16px", I.classList.remove(Fo));
10429
10549
  } catch (e) {
10430
10550
  }
10431
10551
  }
10432
10552
  function Wn() {
10433
- z == null || z.classList.remove(li), Qn && (window.removeEventListener("pointerdown", Qn, { capture: !0 }), Qn = null);
10553
+ I == null || I.classList.remove(li), Qn && (window.removeEventListener("pointerdown", Qn, { capture: !0 }), Qn = null);
10434
10554
  }
10435
10555
  function qk() {
10436
- z && (z.classList.add(li), Qn = (e) => {
10437
- !z || z.contains(e.target) || Wn();
10556
+ I && (I.classList.add(li), Qn = (e) => {
10557
+ !I || I.contains(e.target) || Wn();
10438
10558
  }, requestAnimationFrame(() => {
10439
10559
  Qn && window.addEventListener("pointerdown", Qn, { capture: !0 });
10440
10560
  }));
@@ -10444,8 +10564,8 @@ function go(e) {
10444
10564
  }
10445
10565
  function cl(e, t, n) {
10446
10566
  var d;
10447
- if (Eo = e, Ao = t, Co = n, z) return;
10448
- z = document.createElement("div"), z.className = zk, z.setAttribute(Ik, "1"), Zn = document.createElement("div"), Zn.className = "ap-sdk-fab__row";
10567
+ if (Eo = e, Ao = t, Co = n, I) return;
10568
+ I = document.createElement("div"), I.className = Ik, I.setAttribute(zk, "1"), Zn = document.createElement("div"), Zn.className = "ap-sdk-fab__row";
10449
10569
  const r = document.createElement("span");
10450
10570
  r.className = "ap-sdk-fab__label", r.textContent = "View captures", ut = document.createElement("button"), ut.className = "ap-sdk-fab__list ap-sdk-fab__sub", ut.setAttribute("aria-label", "My captures"), ut.setAttribute("title", "View my captures"), ut.appendChild(go(Dk));
10451
10571
  const o = document.createElement("span");
@@ -10453,24 +10573,24 @@ function cl(e, t, n) {
10453
10573
  const i = document.createElement("span");
10454
10574
  i.className = "ap-sdk-fab__label", i.textContent = "Capture element", sn = document.createElement("button"), sn.className = "ap-sdk-fab__capture ap-sdk-fab__sub", sn.setAttribute("aria-label", "Capture element"), sn.setAttribute("title", "Capture element to Agent Platform"), sn.appendChild(go(Ok)), qn.appendChild(i), qn.appendChild(sn), Hn = document.createElement("div"), Hn.className = "ap-sdk-fab__row";
10455
10575
  const a = document.createElement("span");
10456
- a.className = "ap-sdk-fab__label", a.textContent = "Record interaction", an = document.createElement("button"), an.className = "ap-sdk-fab__record ap-sdk-fab__sub", an.setAttribute("aria-label", "Record interaction"), an.setAttribute("title", "Record a sequence of interactions"), an.appendChild(go(Nk)), Hn.appendChild(a), Hn.appendChild(an), Ot = document.createElement("button"), Ot.className = "ap-sdk-fab__main", Ot.setAttribute("aria-label", "Agent Platform"), Ot.setAttribute("title", "Agent Platform"), Ot.appendChild(go($k)), z.appendChild(Zn), z.appendChild(qn), z.appendChild(Hn), z.appendChild(Ot), Ot.addEventListener("click", (l) => {
10576
+ a.className = "ap-sdk-fab__label", a.textContent = "Record interaction", an = document.createElement("button"), an.className = "ap-sdk-fab__record ap-sdk-fab__sub", an.setAttribute("aria-label", "Record interaction"), an.setAttribute("title", "Record a sequence of interactions"), an.appendChild(go(Nk)), Hn.appendChild(a), Hn.appendChild(an), Ot = document.createElement("button"), Ot.className = "ap-sdk-fab__main", Ot.setAttribute("aria-label", "Agent Platform"), Ot.setAttribute("title", "Agent Platform"), Ot.appendChild(go($k)), I.appendChild(Zn), I.appendChild(qn), I.appendChild(Hn), I.appendChild(Ot), Ot.addEventListener("click", (l) => {
10457
10577
  if (St) {
10458
10578
  St = !1;
10459
10579
  return;
10460
10580
  }
10461
- l.preventDefault(), l.stopPropagation(), z != null && z.classList.contains(li) ? Wn() : qk();
10581
+ l.preventDefault(), l.stopPropagation(), I != null && I.classList.contains(li) ? Wn() : qk();
10462
10582
  }), sn.addEventListener("click", (l) => {
10463
10583
  if (St) {
10464
10584
  St = !1;
10465
10585
  return;
10466
10586
  }
10467
- l.preventDefault(), l.stopPropagation(), Wn(), !Xn() && !So() && Eo && Eo();
10587
+ l.preventDefault(), l.stopPropagation(), Wn(), !Yn() && !So() && Eo && Eo();
10468
10588
  }), an.addEventListener("click", (l) => {
10469
10589
  if (St) {
10470
10590
  St = !1;
10471
10591
  return;
10472
10592
  }
10473
- l.preventDefault(), l.stopPropagation(), Wn(), !Xn() && !So() && Ao && Ao();
10593
+ l.preventDefault(), l.stopPropagation(), Wn(), !Yn() && !So() && Ao && Ao();
10474
10594
  }), ut.addEventListener("click", (l) => {
10475
10595
  if (St) {
10476
10596
  St = !1;
@@ -10478,11 +10598,11 @@ function cl(e, t, n) {
10478
10598
  }
10479
10599
  l.preventDefault(), l.stopPropagation(), Wn(), Co && Co();
10480
10600
  }), $r = (l) => {
10481
- if (!z || !(z === l.target || z.contains(l.target))) return;
10482
- const p = z.getBoundingClientRect();
10483
- ol = l.clientX - p.left, sl = l.clientY - p.top, il = l.clientX, al = l.clientY, Gn = !1, St = !1, z.style.transition = "none", l.stopPropagation(), Mk();
10484
- }, window.addEventListener("pointerdown", $r, { capture: !0 }), ((d = document.body) != null ? d : document.documentElement).appendChild(z), Yt(z), Zk(), To = setInterval(() => {
10485
- Ot && Ot.classList.toggle("ap-sdk-fab__main--active", Xn() || So());
10601
+ if (!I || !(I === l.target || I.contains(l.target))) return;
10602
+ const p = I.getBoundingClientRect();
10603
+ ol = l.clientX - p.left, sl = l.clientY - p.top, il = l.clientX, al = l.clientY, Gn = !1, St = !1, I.style.transition = "none", l.stopPropagation(), Mk();
10604
+ }, window.addEventListener("pointerdown", $r, { capture: !0 }), ((d = document.body) != null ? d : document.documentElement).appendChild(I), Vt(I), Zk(), To = setInterval(() => {
10605
+ Ot && Ot.classList.toggle("ap-sdk-fab__main--active", Yn() || So());
10486
10606
  }, 200);
10487
10607
  }
10488
10608
  function Ln(e) {
@@ -10490,7 +10610,7 @@ function Ln(e) {
10490
10610
  t && (e > 0 ? (t.textContent = String(e), t.style.display = "") : t.style.display = "none");
10491
10611
  }
10492
10612
  function ll() {
10493
- Gn = !1, St = !1, Po(), Wn(), To && (clearInterval(To), To = null), $r && (window.removeEventListener("pointerdown", $r, { capture: !0 }), $r = null), z && Xt(z), z == null || z.remove(), z = null, Ot = null, sn = null, an = null, ut = null, Zn = null, qn = null, Hn = null, Eo = null, Ao = null, Co = null;
10613
+ Gn = !1, St = !1, Po(), Wn(), To && (clearInterval(To), To = null), $r && (window.removeEventListener("pointerdown", $r, { capture: !0 }), $r = null), I && Yt(I), I == null || I.remove(), I = null, Ot = null, sn = null, an = null, ut = null, Zn = null, qn = null, Hn = null, Eo = null, Ao = null, Co = null;
10494
10614
  }
10495
10615
  function ul(e, t) {
10496
10616
  return L(this, null, function* () {
@@ -10525,7 +10645,7 @@ function Nr() {
10525
10645
  return J !== null;
10526
10646
  }
10527
10647
  function Ur() {
10528
- J && Xt(J), J == null || J.remove(), J = null, Bt == null || Bt(), Bt = null, Qe == null || Qe.destroy(), Qe = null;
10648
+ J && Yt(J), J == null || J.remove(), J = null, Bt == null || Bt(), Bt = null, Qe == null || Qe.destroy(), Qe = null;
10529
10649
  }
10530
10650
  function hl(e, t, n, r, o, i, a, d, l, p, h = null) {
10531
10651
  var ye;
@@ -10552,7 +10672,7 @@ function hl(e, t, n, r, o, i, a, d, l, p, h = null) {
10552
10672
  </div>
10553
10673
  <div class="ap-sdk-pick-list" data-ap-pick-list style="display:none"></div>
10554
10674
  <div class="ap-sdk-panel__context" data-ap-context>
10555
- ${za(e)}
10675
+ ${Ia(e)}
10556
10676
  </div>
10557
10677
  <div class="ap-sdk-panel__pick-actions" data-ap-pick-actions>
10558
10678
  <button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost ap-sdk-panel__btn--select-parent" data-ap-select-parent type="button">
@@ -10606,15 +10726,15 @@ function hl(e, t, n, r, o, i, a, d, l, p, h = null) {
10606
10726
  W.stopPropagation();
10607
10727
  }, { passive: !0 });
10608
10728
  const y = J.querySelector(".ap-sdk-panel__body"), E = mk(y, n, (ye = r == null ? void 0 : r.id) != null ? ye : null);
10609
- document.body.appendChild(J), Qe = Us(), g.currentPickedEl && Qe.update(g.currentPickedEl), Yt(J), Ys(J, Js);
10610
- const j = J.querySelector("[data-ap-close]"), Q = J.querySelector("[data-ap-cancel]"), N = J.querySelector("[data-ap-submit]"), T = J.querySelector("[data-ap-note]"), S = J.querySelector("[data-ap-status]"), P = J.querySelectorAll("[data-ap-type]"), Z = J.querySelector("[data-ap-automate-options]"), Y = J.querySelector("[data-ap-allow-submit]"), he = J.querySelector("[data-ap-pick-list]"), Oe = J.querySelector("[data-ap-context]"), qe = J.querySelector("[data-ap-add-another]"), te = J.querySelector("[data-ap-pick-actions]"), Pe = J.querySelector("[data-ap-select-parent]"), He = J.querySelector("[data-ap-reselect]"), Ct = () => {
10729
+ document.body.appendChild(J), Qe = Us(), g.currentPickedEl && Qe.update(g.currentPickedEl), Vt(J), Vs(J, Js);
10730
+ const j = J.querySelector("[data-ap-close]"), Q = J.querySelector("[data-ap-cancel]"), N = J.querySelector("[data-ap-submit]"), T = J.querySelector("[data-ap-note]"), S = J.querySelector("[data-ap-status]"), P = J.querySelectorAll("[data-ap-type]"), Z = J.querySelector("[data-ap-automate-options]"), V = J.querySelector("[data-ap-allow-submit]"), he = J.querySelector("[data-ap-pick-list]"), Oe = J.querySelector("[data-ap-context]"), qe = J.querySelector("[data-ap-add-another]"), te = J.querySelector("[data-ap-pick-actions]"), Pe = J.querySelector("[data-ap-select-parent]"), He = J.querySelector("[data-ap-reselect]"), Ct = () => {
10611
10731
  g.currentPickedEl && (Qe == null || Qe.update(g.currentPickedEl));
10612
10732
  };
10613
10733
  window.addEventListener("scroll", Ct, { capture: !0, passive: !0 }), window.addEventListener("resize", Ct), Bt = () => {
10614
10734
  window.removeEventListener("scroll", Ct, !0), window.removeEventListener("resize", Ct);
10615
10735
  };
10616
10736
  const fn = (W) => {
10617
- W ? (Oe.innerHTML = za(W), T.disabled = !1, T.placeholder = "Describe the task or planning session…", setTimeout(() => T.focus(), 50)) : (Oe.innerHTML = `
10737
+ W ? (Oe.innerHTML = Ia(W), T.disabled = !1, T.placeholder = "Describe the task or planning session…", setTimeout(() => T.focus(), 50)) : (Oe.innerHTML = `
10618
10738
  <div class="ap-sdk-panel__context-label">Next element</div>
10619
10739
  <div class="ap-sdk-panel__context-text ap-sdk-awaiting-pick">👆 Hover and click any element on the page</div>
10620
10740
  `, T.disabled = !0, T.placeholder = "Pick an element to continue…");
@@ -10679,8 +10799,8 @@ function hl(e, t, n, r, o, i, a, d, l, p, h = null) {
10679
10799
  W.addEventListener("click", () => {
10680
10800
  g.captureType = W.dataset.apType, P.forEach((H) => H.classList.toggle("ap-sdk-active", H === W)), Z.style.display = g.captureType === "automate" ? "" : "none";
10681
10801
  });
10682
- }), Y.addEventListener("change", () => {
10683
- g.allowSubmit = Y.checked;
10802
+ }), V.addEventListener("change", () => {
10803
+ g.allowSubmit = V.checked;
10684
10804
  });
10685
10805
  const gn = J.querySelector("[data-ap-reconfigure]");
10686
10806
  a ? gn.addEventListener("click", () => {
@@ -10707,10 +10827,10 @@ function hl(e, t, n, r, o, i, a, d, l, p, h = null) {
10707
10827
  try {
10708
10828
  let De = r;
10709
10829
  De || (De = yield Cc(Ne, o), i({ backendUrl: W, token: H }));
10710
- let ue, ze, Re;
10830
+ let ue, Ie, Re;
10711
10831
  if (le.length === 1)
10712
10832
  if (g.captureType === "task")
10713
- ue = (yield Ps(Ne, { projectId: De.id, note: re, ctx: g.currentCtx, advancedOpts: We })).id, ze = "task", Re = re.slice(0, 120) || g.currentCtx.pageTitle || "Browser capture";
10833
+ ue = (yield Ps(Ne, { projectId: De.id, note: re, ctx: g.currentCtx, advancedOpts: We })).id, Ie = "task", Re = re.slice(0, 120) || g.currentCtx.pageTitle || "Browser capture";
10714
10834
  else if (g.captureType === "planning") {
10715
10835
  let Fe = ud(re, M(v({}, g.currentCtx), { ancestry: g.currentCtx.outerTree || g.currentCtx.ancestry }));
10716
10836
  (Se = g.currentCtx.innerTree) != null && Se.trim() && (Fe += `
@@ -10719,9 +10839,9 @@ Element tree:
10719
10839
  ${g.currentCtx.innerTree}`), (mn = g.currentCtx.interactionSteps) != null && mn.length && (Fe += `
10720
10840
 
10721
10841
  Recorded steps:
10722
- ${tl(g.currentCtx.interactionSteps)}`), ue = (yield sa(Ne, De.id, Fe, We)).id, ze = "planning", Re = re.slice(0, 120) || g.currentCtx.pageTitle || "Planning session";
10842
+ ${tl(g.currentCtx.interactionSteps)}`), ue = (yield sa(Ne, De.id, Fe, We)).id, Ie = "planning", Re = re.slice(0, 120) || g.currentCtx.pageTitle || "Planning session";
10723
10843
  } else
10724
- ue = (yield oa(Ne, { projectId: De.id, note: re, ctx: g.currentCtx, advancedOpts: We, allowSubmit: g.allowSubmit })).id, ze = "automate", Re = re.slice(0, 120) || g.currentCtx.pageTitle || "Browser automation";
10844
+ ue = (yield oa(Ne, { projectId: De.id, note: re, ctx: g.currentCtx, advancedOpts: We, allowSubmit: g.allowSubmit })).id, Ie = "automate", Re = re.slice(0, 120) || g.currentCtx.pageTitle || "Browser automation";
10725
10845
  else {
10726
10846
  const Fe = Fk(le), Je = le[0].instruction.slice(0, 120) || le[0].ctx.pageTitle || "Multi-element capture", Lt = le.map((at) => at.instruction).filter(Boolean).join(`
10727
10847
 
@@ -10734,7 +10854,7 @@ ${tl(g.currentCtx.interactionSteps)}`), ue = (yield sa(Ne, De.id, Fe, We)).id, z
10734
10854
  titleOverride: Je,
10735
10855
  type: Ec,
10736
10856
  titleInstruction: Lt
10737
- })).id, ze = "task", Re = Je) : g.captureType === "planning" ? (ue = (yield sa(Ne, De.id, Fe, We)).id, ze = "planning", Re = Je) : (ue = (yield oa(Ne, {
10857
+ })).id, Ie = "task", Re = Je) : g.captureType === "planning" ? (ue = (yield sa(Ne, De.id, Fe, We)).id, Ie = "planning", Re = Je) : (ue = (yield oa(Ne, {
10738
10858
  projectId: De.id,
10739
10859
  note: Fe,
10740
10860
  ctx: le[0].ctx,
@@ -10742,21 +10862,21 @@ ${tl(g.currentCtx.interactionSteps)}`), ue = (yield sa(Ne, De.id, Fe, We)).id, z
10742
10862
  titleOverride: Je,
10743
10863
  titleInstruction: Lt,
10744
10864
  allowSubmit: g.allowSubmit
10745
- })).id, ze = "automate", Re = Je);
10865
+ })).id, Ie = "automate", Re = Je);
10746
10866
  }
10747
10867
  if (vk({
10748
10868
  id: ue,
10749
- type: ze,
10869
+ type: Ie,
10750
10870
  title: Re,
10751
10871
  backendUrl: W,
10752
10872
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
10753
10873
  }), pl(Ne).catch(() => {
10754
- }), ze === "automate") {
10874
+ }), Ie === "automate") {
10755
10875
  bt(), si(ue, Ne, W, Re, p);
10756
10876
  return;
10757
10877
  }
10758
- const kt = ze === "task" ? `${W.replace(/\/+$/, "")}/tasks/${ue}` : `${W.replace(/\/+$/, "")}/planning/${ue}`;
10759
- Bk(S, ze, Re, kt, bt), J.classList.add("ap-sdk-panel--success"), Bt == null || Bt(), Bt = null, Qe == null || Qe.hide(), g.submitting = !1;
10878
+ const kt = Ie === "task" ? `${W.replace(/\/+$/, "")}/tasks/${ue}` : `${W.replace(/\/+$/, "")}/planning/${ue}`;
10879
+ Bk(S, Ie, Re, kt, bt), J.classList.add("ap-sdk-panel--success"), Bt == null || Bt(), Bt = null, Qe == null || Qe.hide(), g.submitting = !1;
10760
10880
  } catch (De) {
10761
10881
  mo(
10762
10882
  S,
@@ -10772,7 +10892,7 @@ const Hk = {
10772
10892
  scroll: "↕",
10773
10893
  keypress: "⌤"
10774
10894
  };
10775
- function za(e) {
10895
+ function Ia(e) {
10776
10896
  var t, n;
10777
10897
  return (t = e.interactionSteps) != null && t.length ? `
10778
10898
  <div class="ap-sdk-panel__context-label">Recorded steps (${e.interactionSteps.length})</div>
@@ -10847,7 +10967,7 @@ function fl() {
10847
10967
  return ae !== null;
10848
10968
  }
10849
10969
  function Cn() {
10850
- ae && Xt(ae), ae == null || ae.remove(), ae = null;
10970
+ ae && Yt(ae), ae == null || ae.remove(), ae = null;
10851
10971
  }
10852
10972
  function Gk(e) {
10853
10973
  return e === "task" ? "Task" : e === "planning" ? "Planning" : "Automate";
@@ -10874,7 +10994,7 @@ function Wk(e) {
10874
10994
  <button class="ap-sdk-panel__btn ap-sdk-panel__btn--secondary" data-ap-clear-history>Clear history</button>
10875
10995
  <button class="ap-sdk-panel__btn ap-sdk-panel__btn--secondary" data-ap-close-list>Close</button>
10876
10996
  </div>
10877
- `, document.body.appendChild(ae), Yt(ae), Ys(ae, Js), ae.querySelector("[data-ap-close]").addEventListener("click", () => {
10997
+ `, document.body.appendChild(ae), Vt(ae), Vs(ae, Js), ae.querySelector("[data-ap-close]").addEventListener("click", () => {
10878
10998
  Cn();
10879
10999
  }), ae.querySelector("[data-ap-close-list]").addEventListener("click", () => {
10880
11000
  Cn();
@@ -10894,11 +11014,11 @@ function Oa(e) {
10894
11014
  <div class="ap-sdk-list-item">
10895
11015
  <div class="ap-sdk-list-item__row">
10896
11016
  <span class="ap-sdk-list-item__badge ap-sdk-list-item__badge--${r.type}">${Gk(r.type)}</span>
10897
- <span class="ap-sdk-list-item__title" title="${bo(r.title)}">${Xk(r.title)}</span>
11017
+ <span class="ap-sdk-list-item__title" title="${bo(r.title)}">${Yk(r.title)}</span>
10898
11018
  </div>
10899
11019
  <div class="ap-sdk-list-item__row">
10900
11020
  <span class="ap-sdk-status-badge" data-ap-status="${bo(r.id)}">${e ? "…" : "—"}</span>
10901
- ${r.type === "automate" && e ? `<button class="ap-sdk-list-item__link" data-ap-resume="${bo(r.id)}">Resume →</button>` : `<a class="ap-sdk-list-item__link" href="${bo(Yk(r))}" target="_blank" rel="noopener noreferrer">View →</a>`}
11021
+ ${r.type === "automate" && e ? `<button class="ap-sdk-list-item__link" data-ap-resume="${bo(r.id)}">Resume →</button>` : `<a class="ap-sdk-list-item__link" href="${bo(Vk(r))}" target="_blank" rel="noopener noreferrer">View →</a>`}
10902
11022
  </div>
10903
11023
  </div>
10904
11024
  `
@@ -10921,18 +11041,18 @@ function Jk(e, t) {
10921
11041
  return r && (r.textContent = n.status.replace(/_/g, " "), r.className = `ap-sdk-status-badge ap-sdk-status-badge--${n.status.replace(/_/g, "-")}`), n;
10922
11042
  });
10923
11043
  }
10924
- function Yk(e) {
11044
+ function Vk(e) {
10925
11045
  const t = e.backendUrl.replace(/\/+$/, "");
10926
11046
  return e.type === "planning" ? `${t}/planning/${e.id}` : `${t}/tasks/${e.id}`;
10927
11047
  }
10928
11048
  function bo(e) {
10929
11049
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
10930
11050
  }
10931
- function Xk(e) {
11051
+ function Yk(e) {
10932
11052
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
10933
11053
  }
10934
11054
  let rn = null;
10935
- function Vk() {
11055
+ function Xk() {
10936
11056
  const e = new Uint32Array(4);
10937
11057
  return crypto.getRandomValues(e), Array.from(e, (t) => t.toString(16)).join("");
10938
11058
  }
@@ -10941,7 +11061,7 @@ function Na(e) {
10941
11061
  const d = rn;
10942
11062
  d.cleanup(), d.popup.closed || d.popup.close(), rn = null;
10943
11063
  }
10944
- 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");
11064
+ 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");
10945
11065
  return a ? new Promise((d, l) => {
10946
11066
  let p = !1;
10947
11067
  function h() {
@@ -10995,12 +11115,12 @@ function n_(e) {
10995
11115
  }
10996
11116
  let K = null;
10997
11117
  function Ft() {
10998
- K && Xt(K), K == null || K.remove(), K = null;
11118
+ K && Yt(K), K == null || K.remove(), K = null;
10999
11119
  }
11000
11120
  function r_(e) {
11001
11121
  K && Ft(), K = document.createElement("div"), K.className = "ap-sdk-panel", K.setAttribute("data-ap-sdk", "1"), K.setAttribute("role", "dialog"), K.setAttribute("aria-modal", "true"), K.setAttribute("aria-label", "Connect to Agent Platform");
11002
11122
  const t = t_();
11003
- t ? n(t) : r(Kk), document.body.appendChild(K), Yt(K);
11123
+ t ? n(t) : r(Kk), document.body.appendChild(K), Vt(K);
11004
11124
  function n(i) {
11005
11125
  if (!K) return;
11006
11126
  K.innerHTML = `
@@ -11186,7 +11306,7 @@ const i_ = {
11186
11306
  };
11187
11307
  let Ae = null, cn = [];
11188
11308
  function Ro() {
11189
- Ae && Xt(Ae), Ae == null || Ae.remove(), Ae = null, cn = [];
11309
+ Ae && Yt(Ae), Ae == null || Ae.remove(), Ae = null, cn = [];
11190
11310
  }
11191
11311
  function a_(e, t, n) {
11192
11312
  Ae && Ro(), cn = [...e], Ae = document.createElement("div"), Ae.className = "ap-sdk-panel ap-sdk-record-review", Ae.setAttribute("data-ap-sdk", "1"), Ae.setAttribute("role", "dialog"), Ae.setAttribute("aria-modal", "true"), Ae.setAttribute("aria-label", "Review recorded steps"), Ae.innerHTML = `
@@ -11204,7 +11324,7 @@ function a_(e, t, n) {
11204
11324
  <button class="ap-sdk-panel__btn ap-sdk-panel__btn--primary" data-ap-review-continue>Continue</button>
11205
11325
  <button class="ap-sdk-panel__btn ap-sdk-panel__btn--ghost" data-ap-review-cancel>Cancel</button>
11206
11326
  </div>
11207
- `, document.body.appendChild(Ae), Yt(Ae);
11327
+ `, document.body.appendChild(Ae), Vt(Ae);
11208
11328
  const r = Ae.querySelector("[data-ap-review-list]"), o = Ae.querySelector("[data-ap-review-continue]"), i = () => {
11209
11329
  if (cn.length === 0) {
11210
11330
  r.innerHTML = '<p class="ap-sdk-list-empty">No steps recorded.</p>', o.disabled = !0;
@@ -11292,7 +11412,7 @@ function l_(e) {
11292
11412
  yield Tl(), pl({ backendUrl: i, token: a }).catch(() => {
11293
11413
  }), Sl({ backendUrl: i, token: a }).catch(() => {
11294
11414
  });
11295
- const d = Im();
11415
+ const d = zm();
11296
11416
  d && si(
11297
11417
  d.taskId,
11298
11418
  { backendUrl: i, token: a },
@@ -11315,7 +11435,7 @@ function wl(e, t) {
11315
11435
  }
11316
11436
  function u_() {
11317
11437
  if (!q) throw new Error("AgentPlatformSDK: call init() first.");
11318
- Xn() || (jr(), hs(
11438
+ Yn() || (jr(), hs(
11319
11439
  (e, t) => L(null, null, function* () {
11320
11440
  fl() && Cn(), hl(
11321
11441
  e,
@@ -11353,7 +11473,7 @@ function u_() {
11353
11473
  },
11354
11474
  // onClose: deactivate picker if panel is closed while picker is active
11355
11475
  () => {
11356
- Xn() && js();
11476
+ Yn() && js();
11357
11477
  },
11358
11478
  q.permissions
11359
11479
  );
@@ -11397,7 +11517,7 @@ function p_() {
11397
11517
  Nr() && Ur();
11398
11518
  }
11399
11519
  function v_() {
11400
- return Xn();
11520
+ return Yn();
11401
11521
  }
11402
11522
  function h_() {
11403
11523
  s_(), An && (window.removeEventListener("hashchange", An), An = null), js(), Lk(), Ro(), Ur(), Cn(), ll(), Go = null, Wo = null, Jo = null, q = null;