@yoast/ai-insights-client 1.4.60 → 1.4.61

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.
@@ -9216,18 +9216,32 @@ var gh = Yf(void 0), M_ = function(t) {
9216
9216
  });
9217
9217
  });
9218
9218
  }, []), l = Nt(function(c) {
9219
- var u, d, f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, h = "toast-".concat(Date.now(), "-").concat(Math.random().toString(36).slice(2, 11)), g = (u = f.duration) !== null && u !== void 0 ? u : 5e3, y = {
9220
- id: h,
9221
- message: c,
9222
- variant: f.variant || "info",
9223
- duration: g,
9224
- dismissible: (d = f.dismissible) !== null && d !== void 0 ? d : !0
9225
- };
9226
- o(function(m) {
9227
- return [].concat(C_(m), [y]);
9228
- }), g > 0 && setTimeout(function() {
9229
- a(h);
9230
- }, g);
9219
+ var u = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
9220
+ o(function(d) {
9221
+ var f, h, g = (
9222
+ // only check for duplicates if the message is a string
9223
+ // if it's a ReactNode, we can't easily compare
9224
+ // in the future we could add a key or id to ToastOptions to handle this better
9225
+ typeof c == "string" ? d.some(function(b) {
9226
+ return typeof b.message != "string" ? !1 : b.message === c && b.variant === (u.variant || "info");
9227
+ }) : (
9228
+ // was not a string, so mark false
9229
+ !1
9230
+ )
9231
+ );
9232
+ if (g)
9233
+ return d;
9234
+ var y = "toast-".concat(Date.now(), "-").concat(Math.random().toString(36).slice(2, 11)), m = (f = u.duration) !== null && f !== void 0 ? f : 5e3, v = {
9235
+ id: y,
9236
+ message: c,
9237
+ variant: u.variant || "info",
9238
+ duration: m,
9239
+ dismissible: (h = u.dismissible) !== null && h !== void 0 ? h : !0
9240
+ };
9241
+ return m > 0 && setTimeout(function() {
9242
+ a(y);
9243
+ }, m), [].concat(C_(d), [v]);
9244
+ });
9231
9245
  }, [a]);
9232
9246
  return /* @__PURE__ */ p(gh.Provider, { value: {
9233
9247
  toasts: s,
@@ -12918,9 +12932,7 @@ var od = hl(Xg || (Xg = E9(["yst-flex-1 yst-space-y-2"]))), P9 = function(t) {
12918
12932
  return Ae;
12919
12933
  }
12920
12934
  }
12921
- }), T = P.data;
12922
- P.isLoading;
12923
- var R = $4({
12935
+ }), T = P.data, R = $4({
12924
12936
  mutation: {
12925
12937
  onSuccess: function() {
12926
12938
  var oe = A9(/* @__PURE__ */ yf().m(function Ae() {