@articles-media/articles-dev-box 1.0.14 → 1.0.16

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/Ad.js CHANGED
@@ -1,102 +1,102 @@
1
1
  import { j as e } from "./jsx-runtime-tc70JA_2.js";
2
- import * as _ from "react";
3
- import { lazy as F, memo as te, useState as p, useEffect as y } from "react";
4
- import { t as U, m as G, n as ae, A as re, L as C } from "./numberWithCommas-DnAkiOFL.js";
5
- import { u as H, a as w } from "./index-DLYx67wi.js";
6
- import { A as ne } from "./Button-_Quon8UV.js";
7
- import { c as ie } from "./index-YnD2EP-S.js";
8
- var $ = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new WeakMap(), X = 0, oe;
9
- function le(s) {
10
- return s ? (R.has(s) || (X += 1, R.set(s, X.toString())), R.get(s)) : "0";
2
+ import * as A from "react";
3
+ import { lazy as G, memo as re, useState as p, useEffect as y } from "react";
4
+ import { t as X, m as H, n as ne, A as ie, L as E } from "./numberWithCommas-DnAkiOFL.js";
5
+ import { u as J, a as k } from "./index-DLYx67wi.js";
6
+ import { A as oe } from "./Button-_Quon8UV.js";
7
+ import { c as le } from "./index-YnD2EP-S.js";
8
+ var S = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new WeakMap(), z = 0, de;
9
+ function ce(s) {
10
+ return s ? (I.has(s) || (z += 1, I.set(s, z.toString())), I.get(s)) : "0";
11
11
  }
12
- function de(s) {
12
+ function ue(s) {
13
13
  return Object.keys(s).sort().filter(
14
14
  (t) => s[t] !== void 0
15
- ).map((t) => `${t}_${t === "root" ? le(s.root) : s[t]}`).toString();
15
+ ).map((t) => `${t}_${t === "root" ? ce(s.root) : s[t]}`).toString();
16
16
  }
17
- function ce(s) {
18
- const t = de(s);
19
- let o = $.get(t);
20
- if (!o) {
17
+ function me(s) {
18
+ const t = ue(s);
19
+ let l = S.get(t);
20
+ if (!l) {
21
21
  const r = /* @__PURE__ */ new Map();
22
- let n;
23
- const u = new IntersectionObserver((f) => {
24
- f.forEach((i) => {
25
- var c;
26
- const j = i.isIntersecting && n.some((h) => i.intersectionRatio >= h);
27
- s.trackVisibility && typeof i.isVisible > "u" && (i.isVisible = j), (c = r.get(i.target)) == null || c.forEach((h) => {
28
- h(j, i);
22
+ let o;
23
+ const c = new IntersectionObserver((u) => {
24
+ u.forEach((n) => {
25
+ var h;
26
+ const N = n.isIntersecting && o.some((f) => n.intersectionRatio >= f);
27
+ s.trackVisibility && typeof n.isVisible > "u" && (n.isVisible = N), (h = r.get(n.target)) == null || h.forEach((f) => {
28
+ f(N, n);
29
29
  });
30
30
  });
31
31
  }, s);
32
- n = u.thresholds || (Array.isArray(s.threshold) ? s.threshold : [s.threshold || 0]), o = {
32
+ o = c.thresholds || (Array.isArray(s.threshold) ? s.threshold : [s.threshold || 0]), l = {
33
33
  id: t,
34
- observer: u,
34
+ observer: c,
35
35
  elements: r
36
- }, $.set(t, o);
36
+ }, S.set(t, l);
37
37
  }
38
- return o;
38
+ return l;
39
39
  }
40
- function ue(s, t, o = {}, r = oe) {
40
+ function he(s, t, l = {}, r = de) {
41
41
  if (typeof window.IntersectionObserver > "u" && r !== void 0) {
42
- const c = s.getBoundingClientRect();
42
+ const h = s.getBoundingClientRect();
43
43
  return t(r, {
44
44
  isIntersecting: r,
45
45
  target: s,
46
- intersectionRatio: typeof o.threshold == "number" ? o.threshold : 0,
46
+ intersectionRatio: typeof l.threshold == "number" ? l.threshold : 0,
47
47
  time: 0,
48
- boundingClientRect: c,
49
- intersectionRect: c,
50
- rootBounds: c
48
+ boundingClientRect: h,
49
+ intersectionRect: h,
50
+ rootBounds: h
51
51
  }), () => {
52
52
  };
53
53
  }
54
- const { id: n, observer: u, elements: f } = ce(o), i = f.get(s) || [];
55
- return f.has(s) || f.set(s, i), i.push(t), u.observe(s), function() {
56
- i.splice(i.indexOf(t), 1), i.length === 0 && (f.delete(s), u.unobserve(s)), f.size === 0 && (u.disconnect(), $.delete(n));
54
+ const { id: o, observer: c, elements: u } = me(l), n = u.get(s) || [];
55
+ return u.has(s) || u.set(s, n), n.push(t), c.observe(s), function() {
56
+ n.splice(n.indexOf(t), 1), n.length === 0 && (u.delete(s), c.unobserve(s)), u.size === 0 && (c.disconnect(), S.delete(o));
57
57
  };
58
58
  }
59
- function me({
59
+ function fe({
60
60
  threshold: s,
61
61
  delay: t,
62
- trackVisibility: o,
62
+ trackVisibility: l,
63
63
  rootMargin: r,
64
- root: n,
65
- triggerOnce: u,
66
- skip: f,
67
- initialInView: i,
68
- fallbackInView: c,
69
- onChange: j
64
+ root: o,
65
+ triggerOnce: c,
66
+ skip: u,
67
+ initialInView: n,
68
+ fallbackInView: h,
69
+ onChange: N
70
70
  } = {}) {
71
- var h;
72
- const [a, d] = _.useState(null), M = _.useRef(j), N = _.useRef(i), [D, P] = _.useState({
73
- inView: !!i,
71
+ var f;
72
+ const [_, b] = A.useState(null), a = A.useRef(N), i = A.useRef(n), [M, C] = A.useState({
73
+ inView: !!n,
74
74
  entry: void 0
75
75
  });
76
- M.current = j, _.useEffect(
76
+ a.current = N, A.useEffect(
77
77
  () => {
78
- if (N.current === void 0 && (N.current = i), f || !a) return;
79
- let v;
80
- return v = ue(
81
- a,
82
- (A, k) => {
83
- const I = N.current;
84
- N.current = A, !(I === void 0 && !A) && (P({
85
- inView: A,
86
- entry: k
87
- }), M.current && M.current(A, k), k.isIntersecting && u && v && (v(), v = void 0));
78
+ if (i.current === void 0 && (i.current = n), u || !_) return;
79
+ let x;
80
+ return x = he(
81
+ _,
82
+ (v, j) => {
83
+ const $ = i.current;
84
+ i.current = v, !($ === void 0 && !v) && (C({
85
+ inView: v,
86
+ entry: j
87
+ }), a.current && a.current(v, j), j.isIntersecting && c && x && (x(), x = void 0));
88
88
  },
89
89
  {
90
- root: n,
90
+ root: o,
91
91
  rootMargin: r,
92
92
  threshold: s,
93
93
  // @ts-expect-error
94
- trackVisibility: o,
94
+ trackVisibility: l,
95
95
  delay: t
96
96
  },
97
- c
97
+ h
98
98
  ), () => {
99
- v && v();
99
+ x && x();
100
100
  };
101
101
  },
102
102
  // We break the rule here, because we aren't including the actual `threshold` variable
@@ -104,28 +104,28 @@ function me({
104
104
  [
105
105
  // If the threshold is an array, convert it to a string, so it won't change between renders.
106
106
  Array.isArray(s) ? s.toString() : s,
107
- a,
108
- n,
109
- r,
110
- u,
111
- f,
107
+ _,
112
108
  o,
109
+ r,
113
110
  c,
111
+ u,
112
+ l,
113
+ h,
114
114
  t
115
115
  ]
116
116
  );
117
- const x = (h = D.entry) == null ? void 0 : h.target, E = _.useRef(void 0);
118
- !a && x && !u && !f && E.current !== x && (E.current = x, P({
119
- inView: !!i,
117
+ const D = (f = M.entry) == null ? void 0 : f.target, R = A.useRef(void 0);
118
+ !_ && D && !c && !u && R.current !== D && (R.current = D, C({
119
+ inView: !!n,
120
120
  entry: void 0
121
- }), N.current = i);
122
- const m = [d, D.inView, D.entry];
121
+ }), i.current = n);
122
+ const m = [b, M.inView, M.entry];
123
123
  return m.ref = m[0], m.inView = m[1], m.entry = m[2], m;
124
124
  }
125
- const fe = async (s) => {
125
+ const pe = async (s) => {
126
126
  if (process.env.NODE_ENV === "development")
127
127
  try {
128
- return (await w.get(`http://localhost:3001/api/ads/${s.ad_id}`, {
128
+ return (await k.get(`http://localhost:3001/api/ads/${s.ad_id}`, {
129
129
  params: {
130
130
  ad_id: s.ad_id,
131
131
  user_ad_token: s.user_ad_token
@@ -133,213 +133,216 @@ const fe = async (s) => {
133
133
  })).data.result;
134
134
  } catch {
135
135
  }
136
- return w.get(s.url, {
136
+ return k.get(s.url, {
137
137
  params: {
138
138
  ad_id: s.ad_id
139
139
  }
140
140
  }).then((t) => t.data.result);
141
- }, he = 60, pe = {
142
- dedupingInterval: 1e3 * 60 * he
141
+ }, ve = 60, ge = {
142
+ dedupingInterval: 1e3 * 60 * ve
143
143
  // keepPreviousData: true,
144
144
  // fallbackData: []
145
- }, ve = (s, t) => {
146
- const { data: o, error: r, isLoading: n, mutate: u } = H(
145
+ }, xe = (s, t) => {
146
+ const { data: l, error: r, isLoading: o, mutate: c } = J(
147
147
  s ? {
148
148
  url: `https://articles.media/api/ads/${s}`,
149
149
  ad_id: s,
150
150
  user_ad_token: t
151
151
  } : null,
152
- fe,
153
- pe
152
+ pe,
153
+ ge
154
154
  );
155
155
  return {
156
- data: o,
156
+ data: l,
157
157
  error: r,
158
- isLoading: n,
159
- mutate: u
158
+ isLoading: o,
159
+ mutate: c
160
160
  };
161
161
  };
162
- function ge(s) {
162
+ function je(s) {
163
163
  return (t) => {
164
164
  const r = (s ? Math[s] : Math.trunc)(t);
165
165
  return r === 0 ? 0 : r;
166
166
  };
167
167
  }
168
- function xe(s, t) {
169
- return +U(s) - +U(t);
168
+ function Ne(s, t) {
169
+ return +X(s) - +X(t);
170
170
  }
171
- function z(s, t, o) {
172
- const r = xe(s, t) / G;
173
- return ge(o?.roundingMethod)(r);
171
+ function q(s, t, l) {
172
+ const r = Ne(s, t) / H;
173
+ return je(l?.roundingMethod)(r);
174
174
  }
175
- function q(s) {
176
- return Math.trunc(s * G);
175
+ function K(s) {
176
+ return Math.trunc(s * H);
177
177
  }
178
- const je = async (s) => {
178
+ const be = async (s) => {
179
179
  if (process.env.NODE_ENV === "development")
180
180
  try {
181
- return (await w.get("http://localhost:3001/api/ads", {
181
+ return (await k.get("http://localhost:3001/api/ads", {
182
182
  params: {
183
183
  // ad_id: data.ad_id
184
184
  }
185
185
  })).data;
186
186
  } catch {
187
187
  }
188
- return w.get(s.url, {
188
+ return k.get(s.url, {
189
189
  params: {
190
190
  // ad_id: data.ad_id
191
191
  }
192
192
  }).then((t) => t.data);
193
- }, K = 60, Ne = {
194
- dedupingInterval: q(K),
195
- focusThrottleInterval: q(K)
193
+ }, F = 60, _e = {
194
+ dedupingInterval: K(F),
195
+ focusThrottleInterval: K(F)
196
196
  // keepPreviousData: true,
197
197
  // fallbackData: []
198
- }, be = (s) => {
199
- const { data: t, error: o, isLoading: r, mutate: n } = H(
198
+ }, we = (s) => {
199
+ const { data: t, error: l, isLoading: r, mutate: o } = J(
200
200
  s?.loading || s?.disabled ? null : {
201
201
  url: "https://articles.media/api/ads"
202
202
  // ad_id
203
203
  },
204
- je,
205
- Ne
204
+ be,
205
+ _e
206
206
  );
207
207
  return {
208
208
  data: t,
209
- error: o,
209
+ error: l,
210
210
  isLoading: r,
211
- mutate: n
211
+ mutate: o
212
212
  };
213
- }, _e = F(() => import("./AdDetailsModal-Bp5hZm9N.js")), we = F(() => import("./AdConfirmExitModal-CKkMAvBK.js"));
214
- function Ae(s, t) {
213
+ }, Ae = G(() => import("./AdDetailsModal-Bp5hZm9N.js")), ke = G(() => import("./AdConfirmExitModal-CKkMAvBK.js"));
214
+ function ye(s, t) {
215
215
  return Math.floor(Math.random() * (t - s + 1)) + s;
216
216
  }
217
- function ke(s) {
217
+ function Me(s) {
218
218
  let {
219
219
  previewMode: t,
220
- darkMode: o,
220
+ darkMode: l,
221
221
  user_ad_token: r,
222
- userDetails: n,
223
- userDetailsLoading: u
222
+ userDetails: o,
223
+ userDetailsLoading: c,
224
+ prepend: u,
225
+ append: n
224
226
  } = s;
225
- const f = !1, i = [], [c, j] = p(null), {
226
- data: h
227
- } = be(
227
+ const h = !1, N = [], [f, _] = p(null), {
228
+ data: b
229
+ } = we(
228
230
  {
229
- loading: u,
230
- disabled: n?.articles_membership?.status == "Active"
231
+ loading: c,
232
+ disabled: o?.articles_membership?.status == "Active"
231
233
  }
232
- ), { data: a } = ve(c, r);
233
- let d = s.previewData || {};
234
- const [M, N] = p(null), [D, P] = p(null), [x, E] = p(null), [m, v] = p(0), [A, k] = p(!1), [I, L] = p(!1), [J, V] = p(!1), [ye, Me] = p(/* @__PURE__ */ new Date()), [O, Q] = p([]);
234
+ ), { data: a } = xe(f, r);
235
+ let i = s.previewData || {};
236
+ const [M, C] = p(null), [D, R] = p(null), [m, x] = p(null), [v, j] = p(0), [$, Q] = p(!1), [L, V] = p(!1), [Y, O] = p(!1), [De, Ee] = p(/* @__PURE__ */ new Date()), [T, Z] = p([]);
235
237
  y(() => {
236
- h && h?.length > 0 && !c && (console.log("Ad Mounted or reduxAds changed"), j(s.ad_id || h[Ae(0, h?.length - 1)]?._id));
237
- }, [h]), y(() => {
238
+ b && b?.length > 0 && !f && (console.log("Ad Mounted or reduxAds changed"), _(s.ad_id || b[ye(0, b?.length - 1)]?._id));
239
+ }, [b]), y(() => {
238
240
  }, [a]), y(() => {
239
- a?.populated_promos && m >= 0 && E(a?.populated_promos[m]);
240
- }, [m, a]);
241
- function Y() {
242
- L(!I);
241
+ a?.populated_promos && v >= 0 && x(a?.populated_promos[v]);
242
+ }, [v, a]);
243
+ function ee() {
244
+ V(!L);
243
245
  }
244
- const { ref: Z, inView: b } = me({
246
+ const { ref: se, inView: w } = fe({
245
247
  /* Optional options */
246
248
  threshold: 0,
247
249
  triggerOnce: !0
248
250
  });
249
- function T(l) {
250
- if (t && console.log("Preventing this event from being logged as this ad is being shown in preview mode."), O.find((g) => g == l)) {
251
+ function B(d) {
252
+ if (t && console.log("Preventing this event from being logged as this ad is being shown in preview mode."), T.find((g) => g == d)) {
251
253
  console.log("Already logged this event");
252
254
  return;
253
255
  }
254
- w.get("/api/ads/event", {
256
+ k.get("/api/ads/event", {
255
257
  params: {
256
258
  ad_id: a?._id,
257
- event: l
259
+ event: d
258
260
  }
259
261
  }).then(function(g) {
260
- Q([...O, l]), console.log(g.data);
262
+ Z([...T, d]), console.log(g.data);
261
263
  }).catch(function(g) {
262
264
  console.log(g);
263
265
  });
264
266
  }
265
267
  y(() => {
266
- if (!t && (console.log("inView", b), b && c)) {
267
- let l = [
268
+ if (!t && (console.log("inView", w), w && f)) {
269
+ let d = [
268
270
  {
269
- ad_id: c,
271
+ ad_id: f,
270
272
  date: (/* @__PURE__ */ new Date()).toString()
271
273
  },
272
- ...i.filter((g) => {
274
+ ...N.filter((g) => {
273
275
  if (console.log(
274
- z(/* @__PURE__ */ new Date(), new Date(g.date))
275
- ), z(/* @__PURE__ */ new Date(), new Date(g.date)) > 5) {
276
+ q(/* @__PURE__ */ new Date(), new Date(g.date))
277
+ ), q(/* @__PURE__ */ new Date(), new Date(g.date)) > 5) {
276
278
  console.log("adsViewed - Remove Old Ad View Object");
277
279
  return;
278
280
  } else
279
281
  return console.log("adsViewed - Keep Ad View Object"), g;
280
282
  })
281
283
  ];
282
- console.log("unexpiredRecentViews", l);
284
+ console.log("unexpiredRecentViews", d);
283
285
  }
284
- }, [b, c]);
285
- const [B, ee] = p(null), [se, S] = p(!1);
286
- function W() {
287
- S(!0), console.log("logAdAvoided called", r), w.get(
286
+ }, [w, f]);
287
+ const [W, te] = p(null), [ae, P] = p(!1);
288
+ function U() {
289
+ P(!0), console.log("logAdAvoided called", r), k.get(
288
290
  process.env.NODE_ENV === "development" ? "http://localhost:3001/api/user/advertising/avoided" : "https://articles.media/api/user/advertising/avoided",
289
291
  {
290
292
  params: {
291
- user_id: n?._id
293
+ user_id: o?._id
292
294
  },
293
295
  headers: {
294
296
  "x-articles-api-key": r
295
297
  }
296
298
  }
297
- ).then(function(l) {
298
- S(!1), ee(l.data.avoided_count), console.log(l.data);
299
- }).catch(function(l) {
300
- console.log(l), S(!1);
299
+ ).then(function(d) {
300
+ P(!1), te(d.data.avoided_count), console.log(d.data);
301
+ }).catch(function(d) {
302
+ console.log(d), P(!1);
301
303
  });
302
304
  }
303
305
  return y(() => {
304
- t || (console.log("inView", b), n?.articles_membership?.status == "Active" && b && W());
305
- }, [b, n]), u ? null : /* @__PURE__ */ e.jsxs(
306
+ t || (console.log("inView", w), o?.articles_membership?.status == "Active" && w && U());
307
+ }, [w, o]), c ? null : /* @__PURE__ */ e.jsxs(
306
308
  "div",
307
309
  {
308
- ref: Z,
309
- className: ie(
310
+ ref: se,
311
+ className: le(
310
312
  "ad-wrap",
311
313
  {
312
- "active-member": n?.articles_membership?.status == "Active"
314
+ "active-member": o?.articles_membership?.status == "Active"
313
315
  }
314
316
  ),
315
317
  style: {
316
- "--articles-ad-background-color": d.background_color || a?.background_color,
317
- "--articles-ad-font-color": d.font_color || a?.font_color,
318
- "--articles-ad-border-color": d.border_color || a?.border_color
318
+ "--articles-ad-background-color": i.background_color || a?.background_color,
319
+ "--articles-ad-font-color": i.font_color || a?.font_color,
320
+ "--articles-ad-border-color": i.border_color || a?.border_color
319
321
  },
320
322
  children: [
321
- I && /* @__PURE__ */ e.jsx(
322
- _e,
323
+ L && /* @__PURE__ */ e.jsx(
324
+ Ae,
323
325
  {
324
- setModalShow: L,
326
+ setModalShow: V,
325
327
  ad: a,
326
- previewData: d
328
+ previewData: i
327
329
  }
328
330
  ),
329
- J && /* @__PURE__ */ e.jsx(
330
- we,
331
+ Y && /* @__PURE__ */ e.jsx(
332
+ ke,
331
333
  {
332
- setModalShow: V,
334
+ setModalShow: O,
333
335
  ad: a,
334
- previewData: d
336
+ previewData: i
335
337
  }
336
338
  ),
339
+ u && /* @__PURE__ */ e.jsx("div", { className: "prepend-container", children: u }),
337
340
  /* @__PURE__ */ e.jsxs(
338
341
  "div",
339
342
  {
340
343
  className: "ad",
341
344
  children: [
342
- n?.articles_membership?.status !== "Active" && /* @__PURE__ */ e.jsxs(
345
+ o?.articles_membership?.status !== "Active" && /* @__PURE__ */ e.jsxs(
343
346
  "div",
344
347
  {
345
348
  className: "main-panel",
@@ -350,10 +353,10 @@ function ke(s) {
350
353
  ] }) }),
351
354
  /* @__PURE__ */ e.jsxs("div", { className: "content-wrap", children: [
352
355
  /* @__PURE__ */ e.jsxs("div", { className: "photo-banner", children: [
353
- /* @__PURE__ */ e.jsx("div", { className: "logo", children: (d.logo?.location || a?.logo?.location) && /* @__PURE__ */ e.jsx(
356
+ /* @__PURE__ */ e.jsx("div", { className: "logo", children: (i.logo?.location || a?.logo?.location) && /* @__PURE__ */ e.jsx(
354
357
  "img",
355
358
  {
356
- src: d?.logo?.key ? `${process.env.NEXT_PUBLIC_CDN}${d?.logo?.key}` : `${process.env.NEXT_PUBLIC_CDN}${a?.logo?.key}`,
359
+ src: i?.logo?.key ? `${process.env.NEXT_PUBLIC_CDN}${i?.logo?.key}` : `${process.env.NEXT_PUBLIC_CDN}${a?.logo?.key}`,
357
360
  alt: ""
358
361
  }
359
362
  ) }),
@@ -362,14 +365,14 @@ function ke(s) {
362
365
  "img",
363
366
  {
364
367
  className: "photo",
365
- src: d?.background?.key ? `${process.env.NEXT_PUBLIC_CDN}${d.background?.key}` : `${process.env.NEXT_PUBLIC_CDN}${a?.background?.key}`,
368
+ src: i?.background?.key ? `${process.env.NEXT_PUBLIC_CDN}${i.background?.key}` : `${process.env.NEXT_PUBLIC_CDN}${a?.background?.key}`,
366
369
  alt: ""
367
370
  }
368
371
  )
369
372
  ] }),
370
373
  /* @__PURE__ */ e.jsxs("div", { className: "details-wrap", children: [
371
374
  /* @__PURE__ */ e.jsxs("div", { className: "detail-title", children: [
372
- /* @__PURE__ */ e.jsx("div", { className: "detail", children: /* @__PURE__ */ e.jsx("span", { className: "h4", children: d?.business || a?.business }) }),
375
+ /* @__PURE__ */ e.jsx("div", { className: "detail", children: /* @__PURE__ */ e.jsx("span", { className: "h4", children: i?.business || a?.business }) }),
373
376
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-column d-none", children: [
374
377
  /* @__PURE__ */ e.jsxs("div", { className: "detail", children: [
375
378
  /* @__PURE__ */ e.jsx("span", { className: "icon", children: /* @__PURE__ */ e.jsx("i", { className: "fas fa-search-location" }) }),
@@ -386,33 +389,33 @@ function ke(s) {
386
389
  ] })
387
390
  ] }),
388
391
  a?.city && /* @__PURE__ */ e.jsx("div", { className: "details mb-3 d-none" }),
389
- /* @__PURE__ */ e.jsx("div", { className: "short-description", children: d?.description || a?.description })
392
+ /* @__PURE__ */ e.jsx("div", { className: "short-description", children: i?.description || a?.description })
390
393
  ] })
391
394
  ] }),
392
- f?.roles?.isDev && a?.populated_promos?.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
393
- x && /* @__PURE__ */ e.jsx("div", { className: "promos-wrap", children: x && /* @__PURE__ */ e.jsxs(
395
+ h?.roles?.isDev && a?.populated_promos?.length > 0 && /* @__PURE__ */ e.jsxs("div", { children: [
396
+ m && /* @__PURE__ */ e.jsx("div", { className: "promos-wrap", children: m && /* @__PURE__ */ e.jsxs(
394
397
  "div",
395
398
  {
396
399
  className: "promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",
397
400
  children: [
398
401
  /* @__PURE__ */ e.jsxs("div", { className: "", children: [
399
- /* @__PURE__ */ e.jsx("div", { children: x.title }),
400
- /* @__PURE__ */ e.jsx("div", { className: "small", children: /* @__PURE__ */ e.jsx("div", { className: "small", children: x.details }) })
402
+ /* @__PURE__ */ e.jsx("div", { children: m.title }),
403
+ /* @__PURE__ */ e.jsx("div", { className: "small", children: /* @__PURE__ */ e.jsx("div", { className: "small", children: m.details }) })
401
404
  ] }),
402
405
  /* @__PURE__ */ e.jsx(
403
- ne,
406
+ oe,
404
407
  {
405
408
  className: "px-3",
406
409
  small: !0,
407
410
  onClick: () => {
408
- console.log("Load Save Modal"), k(!0);
411
+ console.log("Load Save Modal"), Q(!0);
409
412
  },
410
413
  children: "Save"
411
414
  }
412
415
  )
413
416
  ]
414
417
  },
415
- x._id
418
+ m._id
416
419
  ) }),
417
420
  /* @__PURE__ */ e.jsxs("div", { className: "d-flex justify-content-between", children: [
418
421
  /* @__PURE__ */ e.jsxs("div", { className: "px-2", children: [
@@ -426,17 +429,17 @@ function ke(s) {
426
429
  className: "fad fa-arrow-circle-left",
427
430
  type: "button",
428
431
  onClick: () => {
429
- m == 0 ? v(a?.populated_promos?.length - 1) : v((l) => l - 1);
432
+ v == 0 ? j(a?.populated_promos?.length - 1) : j((d) => d - 1);
430
433
  }
431
434
  }
432
435
  ),
433
436
  a?.populated_promos?.map(
434
- (l, g) => /* @__PURE__ */ e.jsx(
437
+ (d, g) => /* @__PURE__ */ e.jsx(
435
438
  "i",
436
439
  {
437
- className: `fa-square ${g == m ? "fad" : "fas"}`
440
+ className: `fa-square ${g == v ? "fad" : "fas"}`
438
441
  },
439
- l._id
442
+ d._id
440
443
  )
441
444
  ),
442
445
  /* @__PURE__ */ e.jsx(
@@ -445,7 +448,7 @@ function ke(s) {
445
448
  className: "fad fa-arrow-circle-right",
446
449
  type: "button",
447
450
  onClick: () => {
448
- m == a?.populated_promos?.length - 1 ? v(0) : v((l) => l + 1);
451
+ v == a?.populated_promos?.length - 1 ? j(0) : j((d) => d + 1);
449
452
  }
450
453
  }
451
454
  )
@@ -458,7 +461,7 @@ function ke(s) {
458
461
  "div",
459
462
  {
460
463
  onClick: () => {
461
- Y(), T("Details");
464
+ ee(), B("Details");
462
465
  },
463
466
  className: "action flex-grow-1 flex-shrink-0",
464
467
  children: "Details"
@@ -472,8 +475,8 @@ function ke(s) {
472
475
  href: a?.website,
473
476
  target: "_blank",
474
477
  rel: "noreferrer",
475
- onClick: (l) => {
476
- l.preventDefault(), V(!0), T("Confirm Exit Modal Opened");
478
+ onClick: (d) => {
479
+ d.preventDefault(), O(!0), B("Confirm Exit Modal Opened");
477
480
  },
478
481
  children: /* @__PURE__ */ e.jsx("div", { children: "Website" })
479
482
  }
@@ -482,7 +485,7 @@ function ke(s) {
482
485
  ]
483
486
  }
484
487
  ),
485
- n?.articles_membership?.status == "Active" && /* @__PURE__ */ e.jsx(
488
+ o?.articles_membership?.status == "Active" && /* @__PURE__ */ e.jsx(
486
489
  "div",
487
490
  {
488
491
  className: "main-panel",
@@ -496,7 +499,7 @@ function ke(s) {
496
499
  "div",
497
500
  {
498
501
  className: "count",
499
- children: se ? /* @__PURE__ */ e.jsx("i", { className: "fas fa-spinner fa-spin me-0" }) : B ? ae(B) : 0
502
+ children: ae ? /* @__PURE__ */ e.jsx("i", { className: "fas fa-spinner fa-spin me-0" }) : W ? ne(W) : 0
500
503
  }
501
504
  ),
502
505
  /* @__PURE__ */ e.jsx("div", { className: "label", children: "ads avoided." })
@@ -508,7 +511,7 @@ function ke(s) {
508
511
  className: "member-since",
509
512
  children: [
510
513
  "Member since: ",
511
- /* @__PURE__ */ e.jsx(re, { format: "PP", date: n?.articles_membership?.membership_started })
514
+ /* @__PURE__ */ e.jsx(ie, { format: "PP", date: o?.articles_membership?.membership_started })
512
515
  ]
513
516
  }
514
517
  )
@@ -519,7 +522,7 @@ function ke(s) {
519
522
  /* @__PURE__ */ e.jsx("div", { className: "mb-2", children: "Without support from users like you, we wouldn't be here." }),
520
523
  /* @__PURE__ */ e.jsxs("div", { className: "links-list", children: [
521
524
  /* @__PURE__ */ e.jsxs(
522
- C,
525
+ E,
523
526
  {
524
527
  newPage: !0,
525
528
  className: "link-item",
@@ -531,13 +534,13 @@ function ke(s) {
531
534
  }
532
535
  ),
533
536
  /* @__PURE__ */ e.jsxs(
534
- C,
537
+ E,
535
538
  {
536
539
  newPage: !0,
537
540
  className: "link-item",
538
541
  href: "https://articles.media/settings/notifications",
539
542
  onClick: () => {
540
- W();
543
+ U();
541
544
  },
542
545
  children: [
543
546
  /* @__PURE__ */ e.jsx("i", { className: "fas fa-bell" }),
@@ -546,7 +549,7 @@ function ke(s) {
546
549
  }
547
550
  ),
548
551
  /* @__PURE__ */ e.jsxs(
549
- C,
552
+ E,
550
553
  {
551
554
  newPage: !0,
552
555
  className: "link-item",
@@ -566,18 +569,19 @@ function ke(s) {
566
569
  ]
567
570
  }
568
571
  ),
572
+ n && /* @__PURE__ */ e.jsx("div", { className: "append-container", children: n }),
569
573
  !t && /* @__PURE__ */ e.jsx(
570
574
  "div",
571
575
  {
572
576
  className: "advertise-with-us p-1",
573
577
  style: {
574
578
  // ...(props.previewData ? props.previewData.background_color : ad?.background_color),
575
- backgroundColor: d.background_color || a?.background_color,
576
- color: d.font_color || a?.font_color,
577
- borderColor: d.border_color || a?.border_color
579
+ backgroundColor: i.background_color || a?.background_color,
580
+ color: i.font_color || a?.font_color,
581
+ borderColor: i.border_color || a?.border_color
578
582
  },
579
583
  children: /* @__PURE__ */ e.jsxs(
580
- C,
584
+ E,
581
585
  {
582
586
  className: "small d-block w-100 text-center",
583
587
  href: "https://articles.media/advertising",
@@ -594,7 +598,7 @@ function ke(s) {
594
598
  }
595
599
  );
596
600
  }
597
- const Se = te(ke);
601
+ const Le = re(Me);
598
602
  export {
599
- Se as default
603
+ Le as default
600
604
  };