@articles-media/articles-dev-box 1.0.5 → 1.0.6
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/README.md +43 -41
- package/dist/Ad.cjs +1 -1
- package/dist/Ad.js +163 -157
- package/dist/AdConfirmExitModal-BRpOrF3L.cjs +1 -0
- package/dist/AdConfirmExitModal-TTHQo9Ou.js +72 -0
- package/dist/{AdDetailsModal-BOLzA3ZL.js → AdDetailsModal-C3ytLQho.js} +10 -21
- package/dist/AdDetailsModal-CHgLXn9p.cjs +1 -0
- package/dist/GameScoreboard.cjs +1 -1
- package/dist/GameScoreboard.js +3835 -89
- package/dist/GlobalBody.cjs +24 -24
- package/dist/GlobalBody.js +28 -28
- package/dist/{Modal-BoOxjQvF.js → Modal-CZ77qLgM.js} +129 -110
- package/dist/Modal-Cr0uB770.cjs +2 -0
- package/dist/{index-CsgQIn35.js → toDate-CDo8dBwb.js} +470 -438
- package/dist/toDate-CzgAa_PT.cjs +6 -0
- package/package.json +75 -75
- package/dist/AdDetailsModal-BCRLBkc_.cjs +0 -1
- package/dist/Modal-BNCxuVnD.cjs +0 -2
- package/dist/index-CqsCVLvJ.cjs +0 -6
package/dist/Ad.js
CHANGED
|
@@ -1,100 +1,100 @@
|
|
|
1
1
|
import { j as s } from "./jsx-runtime-tc70JA_2.js";
|
|
2
2
|
import * as w from "react";
|
|
3
|
-
import { lazy as
|
|
4
|
-
import { u as W, a as
|
|
5
|
-
import { A as
|
|
6
|
-
var
|
|
7
|
-
function
|
|
8
|
-
return e ? (
|
|
3
|
+
import { lazy as X, memo as G, useState as p, useEffect as I } from "react";
|
|
4
|
+
import { u as W, a as D, t as V, m as z, L as H } from "./toDate-CDo8dBwb.js";
|
|
5
|
+
import { A as J } from "./Button-B5nVYPMZ.js";
|
|
6
|
+
var S = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new WeakMap(), O = 0, Q;
|
|
7
|
+
function Y(e) {
|
|
8
|
+
return e ? (R.has(e) || (O += 1, R.set(e, O.toString())), R.get(e)) : "0";
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function Z(e) {
|
|
11
11
|
return Object.keys(e).sort().filter(
|
|
12
12
|
(t) => e[t] !== void 0
|
|
13
|
-
).map((t) => `${t}_${t === "root" ?
|
|
13
|
+
).map((t) => `${t}_${t === "root" ? Y(e.root) : e[t]}`).toString();
|
|
14
14
|
}
|
|
15
|
-
function
|
|
16
|
-
const t =
|
|
17
|
-
let a =
|
|
15
|
+
function ee(e) {
|
|
16
|
+
const t = Z(e);
|
|
17
|
+
let a = S.get(t);
|
|
18
18
|
if (!a) {
|
|
19
|
-
const
|
|
20
|
-
let
|
|
21
|
-
const
|
|
19
|
+
const n = /* @__PURE__ */ new Map();
|
|
20
|
+
let d;
|
|
21
|
+
const o = new IntersectionObserver((c) => {
|
|
22
22
|
c.forEach((i) => {
|
|
23
|
-
var
|
|
24
|
-
const
|
|
25
|
-
e.trackVisibility && typeof i.isVisible > "u" && (i.isVisible =
|
|
26
|
-
|
|
23
|
+
var f;
|
|
24
|
+
const b = i.isIntersecting && d.some((x) => i.intersectionRatio >= x);
|
|
25
|
+
e.trackVisibility && typeof i.isVisible > "u" && (i.isVisible = b), (f = n.get(i.target)) == null || f.forEach((x) => {
|
|
26
|
+
x(b, i);
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
}, e);
|
|
30
|
-
|
|
30
|
+
d = o.thresholds || (Array.isArray(e.threshold) ? e.threshold : [e.threshold || 0]), a = {
|
|
31
31
|
id: t,
|
|
32
|
-
observer:
|
|
33
|
-
elements:
|
|
34
|
-
},
|
|
32
|
+
observer: o,
|
|
33
|
+
elements: n
|
|
34
|
+
}, S.set(t, a);
|
|
35
35
|
}
|
|
36
36
|
return a;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
if (typeof window.IntersectionObserver > "u" &&
|
|
40
|
-
const
|
|
41
|
-
return t(
|
|
42
|
-
isIntersecting:
|
|
38
|
+
function se(e, t, a = {}, n = Q) {
|
|
39
|
+
if (typeof window.IntersectionObserver > "u" && n !== void 0) {
|
|
40
|
+
const f = e.getBoundingClientRect();
|
|
41
|
+
return t(n, {
|
|
42
|
+
isIntersecting: n,
|
|
43
43
|
target: e,
|
|
44
44
|
intersectionRatio: typeof a.threshold == "number" ? a.threshold : 0,
|
|
45
45
|
time: 0,
|
|
46
|
-
boundingClientRect:
|
|
47
|
-
intersectionRect:
|
|
48
|
-
rootBounds:
|
|
46
|
+
boundingClientRect: f,
|
|
47
|
+
intersectionRect: f,
|
|
48
|
+
rootBounds: f
|
|
49
49
|
}), () => {
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
const { id:
|
|
53
|
-
return c.has(e) || c.set(e, i), i.push(t),
|
|
54
|
-
i.splice(i.indexOf(t), 1), i.length === 0 && (c.delete(e),
|
|
52
|
+
const { id: d, observer: o, elements: c } = ee(a), i = c.get(e) || [];
|
|
53
|
+
return c.has(e) || c.set(e, i), i.push(t), o.observe(e), function() {
|
|
54
|
+
i.splice(i.indexOf(t), 1), i.length === 0 && (c.delete(e), o.unobserve(e)), c.size === 0 && (o.disconnect(), S.delete(d));
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function te({
|
|
58
58
|
threshold: e,
|
|
59
59
|
delay: t,
|
|
60
60
|
trackVisibility: a,
|
|
61
|
-
rootMargin:
|
|
62
|
-
root:
|
|
63
|
-
triggerOnce:
|
|
61
|
+
rootMargin: n,
|
|
62
|
+
root: d,
|
|
63
|
+
triggerOnce: o,
|
|
64
64
|
skip: c,
|
|
65
65
|
initialInView: i,
|
|
66
|
-
fallbackInView:
|
|
67
|
-
onChange:
|
|
66
|
+
fallbackInView: f,
|
|
67
|
+
onChange: b
|
|
68
68
|
} = {}) {
|
|
69
|
-
var
|
|
70
|
-
const [_,
|
|
69
|
+
var x;
|
|
70
|
+
const [_, j] = w.useState(null), y = w.useRef(b), u = w.useRef(i), [g, k] = w.useState({
|
|
71
71
|
inView: !!i,
|
|
72
72
|
entry: void 0
|
|
73
73
|
});
|
|
74
|
-
y.current =
|
|
74
|
+
y.current = b, w.useEffect(
|
|
75
75
|
() => {
|
|
76
|
-
if (
|
|
77
|
-
let
|
|
78
|
-
return
|
|
76
|
+
if (u.current === void 0 && (u.current = i), c || !_) return;
|
|
77
|
+
let v;
|
|
78
|
+
return v = se(
|
|
79
79
|
_,
|
|
80
|
-
(
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
inView:
|
|
84
|
-
entry:
|
|
85
|
-
}), y.current && y.current(
|
|
80
|
+
(N, E) => {
|
|
81
|
+
const $ = u.current;
|
|
82
|
+
u.current = N, !($ === void 0 && !N) && (k({
|
|
83
|
+
inView: N,
|
|
84
|
+
entry: E
|
|
85
|
+
}), y.current && y.current(N, E), E.isIntersecting && o && v && (v(), v = void 0));
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
|
-
root:
|
|
89
|
-
rootMargin:
|
|
88
|
+
root: d,
|
|
89
|
+
rootMargin: n,
|
|
90
90
|
threshold: e,
|
|
91
91
|
// @ts-expect-error
|
|
92
92
|
trackVisibility: a,
|
|
93
93
|
delay: t
|
|
94
94
|
},
|
|
95
|
-
|
|
95
|
+
f
|
|
96
96
|
), () => {
|
|
97
|
-
|
|
97
|
+
v && v();
|
|
98
98
|
};
|
|
99
99
|
},
|
|
100
100
|
// We break the rule here, because we aren't including the actual `threshold` variable
|
|
@@ -103,91 +103,85 @@ function ee({
|
|
|
103
103
|
// If the threshold is an array, convert it to a string, so it won't change between renders.
|
|
104
104
|
Array.isArray(e) ? e.toString() : e,
|
|
105
105
|
_,
|
|
106
|
-
|
|
107
|
-
o,
|
|
106
|
+
d,
|
|
108
107
|
n,
|
|
108
|
+
o,
|
|
109
109
|
c,
|
|
110
110
|
a,
|
|
111
|
-
|
|
111
|
+
f,
|
|
112
112
|
t
|
|
113
113
|
]
|
|
114
114
|
);
|
|
115
|
-
const
|
|
116
|
-
!_ &&
|
|
115
|
+
const A = (x = g.entry) == null ? void 0 : x.target, M = w.useRef(void 0);
|
|
116
|
+
!_ && A && !o && !c && M.current !== A && (M.current = A, k({
|
|
117
117
|
inView: !!i,
|
|
118
118
|
entry: void 0
|
|
119
|
-
}),
|
|
120
|
-
const h = [
|
|
119
|
+
}), u.current = i);
|
|
120
|
+
const h = [j, g.inView, g.entry];
|
|
121
121
|
return h.ref = h[0], h.inView = h[1], h.entry = h[2], h;
|
|
122
122
|
}
|
|
123
|
-
const
|
|
123
|
+
const re = async (e) => {
|
|
124
124
|
if (process.env.NODE_ENV === "development")
|
|
125
125
|
try {
|
|
126
|
-
return (await
|
|
126
|
+
return (await D.get(`http://localhost:3001/api/ads/${e.ad_id}`, {
|
|
127
127
|
params: {
|
|
128
128
|
ad_id: e.ad_id
|
|
129
129
|
}
|
|
130
130
|
})).data.result;
|
|
131
131
|
} catch {
|
|
132
132
|
}
|
|
133
|
-
return
|
|
133
|
+
return D.get(e.url, {
|
|
134
134
|
params: {
|
|
135
135
|
ad_id: e.ad_id
|
|
136
136
|
}
|
|
137
137
|
}).then((t) => t.data.result);
|
|
138
|
-
},
|
|
139
|
-
dedupingInterval: 1e3 * 60 *
|
|
138
|
+
}, oe = 60, ne = {
|
|
139
|
+
dedupingInterval: 1e3 * 60 * oe
|
|
140
140
|
// keepPreviousData: true,
|
|
141
141
|
// fallbackData: []
|
|
142
|
-
},
|
|
143
|
-
const { data: t, error: a, isLoading:
|
|
142
|
+
}, ae = (e) => {
|
|
143
|
+
const { data: t, error: a, isLoading: n, mutate: d } = W(
|
|
144
144
|
e ? {
|
|
145
145
|
url: `https://articles.media/api/ads/${e}`,
|
|
146
146
|
ad_id: e
|
|
147
147
|
} : null,
|
|
148
|
-
|
|
149
|
-
|
|
148
|
+
re,
|
|
149
|
+
ne
|
|
150
150
|
);
|
|
151
151
|
return {
|
|
152
152
|
data: t,
|
|
153
153
|
error: a,
|
|
154
|
-
isLoading:
|
|
155
|
-
mutate:
|
|
154
|
+
isLoading: n,
|
|
155
|
+
mutate: d
|
|
156
156
|
};
|
|
157
|
-
}
|
|
158
|
-
function
|
|
159
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" && T in e ? e[T](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
160
|
-
}
|
|
161
|
-
function L(e, t) {
|
|
162
|
-
return oe(e, e);
|
|
163
|
-
}
|
|
164
|
-
function ae(e) {
|
|
157
|
+
};
|
|
158
|
+
function ie(e) {
|
|
165
159
|
return (t) => {
|
|
166
|
-
const
|
|
167
|
-
return
|
|
160
|
+
const n = (e ? Math[e] : Math.trunc)(t);
|
|
161
|
+
return n === 0 ? 0 : n;
|
|
168
162
|
};
|
|
169
163
|
}
|
|
170
|
-
function
|
|
171
|
-
return +
|
|
164
|
+
function ce(e, t) {
|
|
165
|
+
return +V(e) - +V(t);
|
|
172
166
|
}
|
|
173
|
-
function
|
|
174
|
-
const
|
|
175
|
-
return
|
|
167
|
+
function T(e, t, a) {
|
|
168
|
+
const n = ce(e, t) / z;
|
|
169
|
+
return ie(a?.roundingMethod)(n);
|
|
176
170
|
}
|
|
177
171
|
function B(e) {
|
|
178
|
-
return Math.trunc(e *
|
|
172
|
+
return Math.trunc(e * z);
|
|
179
173
|
}
|
|
180
|
-
const
|
|
174
|
+
const de = async (e) => {
|
|
181
175
|
if (process.env.NODE_ENV === "development")
|
|
182
176
|
try {
|
|
183
|
-
return (await
|
|
177
|
+
return (await D.get("http://localhost:3001/api/ads", {
|
|
184
178
|
params: {
|
|
185
179
|
// ad_id: data.ad_id
|
|
186
180
|
}
|
|
187
181
|
})).data;
|
|
188
182
|
} catch {
|
|
189
183
|
}
|
|
190
|
-
return
|
|
184
|
+
return D.get(e.url, {
|
|
191
185
|
params: {
|
|
192
186
|
// ad_id: data.ad_id
|
|
193
187
|
}
|
|
@@ -197,97 +191,105 @@ const ce = async (e) => {
|
|
|
197
191
|
focusThrottleInterval: B(U)
|
|
198
192
|
// keepPreviousData: true,
|
|
199
193
|
// fallbackData: []
|
|
200
|
-
},
|
|
201
|
-
const { data: t, error: a, isLoading:
|
|
194
|
+
}, ue = (e) => {
|
|
195
|
+
const { data: t, error: a, isLoading: n, mutate: d } = W(
|
|
202
196
|
{
|
|
203
197
|
url: "https://articles.media/api/ads"
|
|
204
198
|
// ad_id
|
|
205
199
|
},
|
|
206
|
-
|
|
200
|
+
de,
|
|
207
201
|
le
|
|
208
202
|
);
|
|
209
203
|
return {
|
|
210
204
|
data: t,
|
|
211
205
|
error: a,
|
|
212
|
-
isLoading:
|
|
213
|
-
mutate:
|
|
206
|
+
isLoading: n,
|
|
207
|
+
mutate: d
|
|
214
208
|
};
|
|
215
|
-
},
|
|
216
|
-
function
|
|
209
|
+
}, fe = X(() => import("./AdDetailsModal-C3ytLQho.js")), me = X(() => import("./AdConfirmExitModal-TTHQo9Ou.js"));
|
|
210
|
+
function he(e, t) {
|
|
217
211
|
return Math.floor(Math.random() * (t - e + 1)) + e;
|
|
218
212
|
}
|
|
219
|
-
function
|
|
213
|
+
function pe(e) {
|
|
220
214
|
const a = [], {
|
|
221
|
-
data:
|
|
222
|
-
} =
|
|
223
|
-
let { previewMode:
|
|
224
|
-
const [c, i] = p(null), [
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}, [
|
|
228
|
-
}, [r]),
|
|
229
|
-
r?.populated_promos &&
|
|
230
|
-
}, [
|
|
231
|
-
function
|
|
232
|
-
h(!
|
|
215
|
+
data: n
|
|
216
|
+
} = ue();
|
|
217
|
+
let { previewMode: d } = e, o = e.previewData || {};
|
|
218
|
+
const [c, i] = p(null), [f, b] = p(null), [x, _] = p(null), [j, y] = p(null), [u, g] = p(0), [k, A] = p(!1), [M, h] = p(!1), [v, N] = p(!1), [E, $] = p(/* @__PURE__ */ new Date()), [L, q] = p([]), { data: r } = ae(c);
|
|
219
|
+
I(() => {
|
|
220
|
+
n && n?.length > 0 && !c && (console.log("Ad Mounted or reduxAds changed"), i(e.ad_id || n[he(0, n?.length - 1)]?._id));
|
|
221
|
+
}, [n]), I(() => {
|
|
222
|
+
}, [r]), I(() => {
|
|
223
|
+
r?.populated_promos && u >= 0 && y(r?.populated_promos[u]);
|
|
224
|
+
}, [u, r]);
|
|
225
|
+
function K() {
|
|
226
|
+
h(!M);
|
|
233
227
|
}
|
|
234
|
-
const { ref:
|
|
228
|
+
const { ref: F, inView: C } = te({
|
|
235
229
|
/* Optional options */
|
|
236
230
|
threshold: 0,
|
|
237
231
|
triggerOnce: !0
|
|
238
232
|
});
|
|
239
|
-
function
|
|
240
|
-
if (
|
|
233
|
+
function P(l) {
|
|
234
|
+
if (d && console.log("Preventing this event from being logged as this ad is being shown in preview mode."), L.find((m) => m == l)) {
|
|
241
235
|
console.log("Already logged this event");
|
|
242
236
|
return;
|
|
243
237
|
}
|
|
244
|
-
|
|
238
|
+
D.get("/api/ads/event", {
|
|
245
239
|
params: {
|
|
246
240
|
ad_id: r?._id,
|
|
247
|
-
event:
|
|
241
|
+
event: l
|
|
248
242
|
}
|
|
249
243
|
}).then(function(m) {
|
|
250
|
-
|
|
244
|
+
q([...L, l]), console.log(m.data);
|
|
251
245
|
}).catch(function(m) {
|
|
252
246
|
console.log(m);
|
|
253
247
|
});
|
|
254
248
|
}
|
|
255
|
-
return
|
|
256
|
-
if (!
|
|
257
|
-
let
|
|
249
|
+
return I(() => {
|
|
250
|
+
if (!d && (console.log("inView", C), C && c)) {
|
|
251
|
+
let l = [
|
|
258
252
|
{
|
|
259
253
|
ad_id: c,
|
|
260
254
|
date: (/* @__PURE__ */ new Date()).toString()
|
|
261
255
|
},
|
|
262
256
|
...a.filter((m) => {
|
|
263
257
|
if (console.log(
|
|
264
|
-
|
|
265
|
-
),
|
|
258
|
+
T(/* @__PURE__ */ new Date(), new Date(m.date))
|
|
259
|
+
), T(/* @__PURE__ */ new Date(), new Date(m.date)) > 5) {
|
|
266
260
|
console.log("adsViewed - Remove Old Ad View Object");
|
|
267
261
|
return;
|
|
268
262
|
} else
|
|
269
263
|
return console.log("adsViewed - Keep Ad View Object"), m;
|
|
270
264
|
})
|
|
271
265
|
];
|
|
272
|
-
console.log("unexpiredRecentViews",
|
|
266
|
+
console.log("unexpiredRecentViews", l);
|
|
273
267
|
}
|
|
274
|
-
}, [
|
|
268
|
+
}, [C, c]), /* @__PURE__ */ s.jsxs(
|
|
275
269
|
"div",
|
|
276
270
|
{
|
|
277
|
-
ref:
|
|
271
|
+
ref: F,
|
|
278
272
|
className: "ad-wrap",
|
|
279
273
|
style: {
|
|
280
|
-
"--articles-ad-background-color":
|
|
281
|
-
"--articles-ad-font-color":
|
|
282
|
-
"--articles-ad-border-color":
|
|
274
|
+
"--articles-ad-background-color": o.background_color || r?.background_color,
|
|
275
|
+
"--articles-ad-font-color": o.font_color || r?.font_color,
|
|
276
|
+
"--articles-ad-border-color": o.border_color || r?.border_color
|
|
283
277
|
},
|
|
284
278
|
children: [
|
|
285
|
-
|
|
286
|
-
|
|
279
|
+
M && /* @__PURE__ */ s.jsx(
|
|
280
|
+
fe,
|
|
287
281
|
{
|
|
288
282
|
setModalShow: h,
|
|
289
283
|
ad: r,
|
|
290
|
-
previewData:
|
|
284
|
+
previewData: o
|
|
285
|
+
}
|
|
286
|
+
),
|
|
287
|
+
v && /* @__PURE__ */ s.jsx(
|
|
288
|
+
me,
|
|
289
|
+
{
|
|
290
|
+
setModalShow: N,
|
|
291
|
+
ad: r,
|
|
292
|
+
previewData: o
|
|
291
293
|
}
|
|
292
294
|
),
|
|
293
295
|
/* @__PURE__ */ s.jsx(
|
|
@@ -305,10 +307,10 @@ function me(e) {
|
|
|
305
307
|
] }) }),
|
|
306
308
|
/* @__PURE__ */ s.jsxs("div", { className: "content-wrap", children: [
|
|
307
309
|
/* @__PURE__ */ s.jsxs("div", { className: "photo-banner", children: [
|
|
308
|
-
/* @__PURE__ */ s.jsx("div", { className: "logo", children: (
|
|
310
|
+
/* @__PURE__ */ s.jsx("div", { className: "logo", children: (o.logo?.location || r?.logo?.location) && /* @__PURE__ */ s.jsx(
|
|
309
311
|
"img",
|
|
310
312
|
{
|
|
311
|
-
src:
|
|
313
|
+
src: o?.logo?.key ? `${process.env.NEXT_PUBLIC_CDN}${o?.logo?.key}` : `${process.env.NEXT_PUBLIC_CDN}${r?.logo?.key}`,
|
|
312
314
|
alt: ""
|
|
313
315
|
}
|
|
314
316
|
) }),
|
|
@@ -317,14 +319,14 @@ function me(e) {
|
|
|
317
319
|
"img",
|
|
318
320
|
{
|
|
319
321
|
className: "photo",
|
|
320
|
-
src:
|
|
322
|
+
src: o?.background?.key ? `${process.env.NEXT_PUBLIC_CDN}${o.background?.key}` : `${process.env.NEXT_PUBLIC_CDN}${r?.background?.key}`,
|
|
321
323
|
alt: ""
|
|
322
324
|
}
|
|
323
325
|
)
|
|
324
326
|
] }),
|
|
325
327
|
/* @__PURE__ */ s.jsxs("div", { className: "details-wrap", children: [
|
|
326
328
|
/* @__PURE__ */ s.jsxs("div", { className: "detail-title", children: [
|
|
327
|
-
/* @__PURE__ */ s.jsx("div", { className: "detail", children: /* @__PURE__ */ s.jsx("span", { className: "h4", children:
|
|
329
|
+
/* @__PURE__ */ s.jsx("div", { className: "detail", children: /* @__PURE__ */ s.jsx("span", { className: "h4", children: o?.business || r?.business }) }),
|
|
328
330
|
/* @__PURE__ */ s.jsxs("div", { className: "flex flex-column d-none", children: [
|
|
329
331
|
/* @__PURE__ */ s.jsxs("div", { className: "detail", children: [
|
|
330
332
|
/* @__PURE__ */ s.jsx("span", { className: "icon", children: /* @__PURE__ */ s.jsx("i", { className: "fas fa-search-location" }) }),
|
|
@@ -341,33 +343,33 @@ function me(e) {
|
|
|
341
343
|
] })
|
|
342
344
|
] }),
|
|
343
345
|
r?.city && /* @__PURE__ */ s.jsx("div", { className: "details mb-3 d-none" }),
|
|
344
|
-
/* @__PURE__ */ s.jsx("div", { className: "short-description", children:
|
|
346
|
+
/* @__PURE__ */ s.jsx("div", { className: "short-description", children: o?.description || r?.description })
|
|
345
347
|
] })
|
|
346
348
|
] }),
|
|
347
349
|
(!1)?.roles?.isDev && r?.populated_promos?.length > 0 && /* @__PURE__ */ s.jsxs("div", { children: [
|
|
348
|
-
|
|
350
|
+
j && /* @__PURE__ */ s.jsx("div", { className: "promos-wrap", children: j && /* @__PURE__ */ s.jsxs(
|
|
349
351
|
"div",
|
|
350
352
|
{
|
|
351
353
|
className: "promo-wrap d-flex justify-content-between align-items-center mx-2 p-1 px-2 border border-2 border-light mb-0",
|
|
352
354
|
children: [
|
|
353
355
|
/* @__PURE__ */ s.jsxs("div", { className: "", children: [
|
|
354
|
-
/* @__PURE__ */ s.jsx("div", { children:
|
|
355
|
-
/* @__PURE__ */ s.jsx("div", { className: "small", children: /* @__PURE__ */ s.jsx("div", { className: "small", children:
|
|
356
|
+
/* @__PURE__ */ s.jsx("div", { children: j.title }),
|
|
357
|
+
/* @__PURE__ */ s.jsx("div", { className: "small", children: /* @__PURE__ */ s.jsx("div", { className: "small", children: j.details }) })
|
|
356
358
|
] }),
|
|
357
359
|
/* @__PURE__ */ s.jsx(
|
|
358
|
-
|
|
360
|
+
J,
|
|
359
361
|
{
|
|
360
362
|
className: "px-3",
|
|
361
363
|
small: !0,
|
|
362
364
|
onClick: () => {
|
|
363
|
-
console.log("Load Save Modal"),
|
|
365
|
+
console.log("Load Save Modal"), A(!0);
|
|
364
366
|
},
|
|
365
367
|
children: "Save"
|
|
366
368
|
}
|
|
367
369
|
)
|
|
368
370
|
]
|
|
369
371
|
},
|
|
370
|
-
|
|
372
|
+
j._id
|
|
371
373
|
) }),
|
|
372
374
|
/* @__PURE__ */ s.jsxs("div", { className: "d-flex justify-content-between", children: [
|
|
373
375
|
/* @__PURE__ */ s.jsxs("div", { className: "px-2", children: [
|
|
@@ -381,17 +383,17 @@ function me(e) {
|
|
|
381
383
|
className: "fad fa-arrow-circle-left",
|
|
382
384
|
type: "button",
|
|
383
385
|
onClick: () => {
|
|
384
|
-
|
|
386
|
+
u == 0 ? g(r?.populated_promos?.length - 1) : g((l) => l - 1);
|
|
385
387
|
}
|
|
386
388
|
}
|
|
387
389
|
),
|
|
388
390
|
r?.populated_promos?.map(
|
|
389
|
-
(
|
|
391
|
+
(l, m) => /* @__PURE__ */ s.jsx(
|
|
390
392
|
"i",
|
|
391
393
|
{
|
|
392
|
-
className: `fa-square ${m ==
|
|
394
|
+
className: `fa-square ${m == u ? "fad" : "fas"}`
|
|
393
395
|
},
|
|
394
|
-
|
|
396
|
+
l._id
|
|
395
397
|
)
|
|
396
398
|
),
|
|
397
399
|
/* @__PURE__ */ s.jsx(
|
|
@@ -400,7 +402,7 @@ function me(e) {
|
|
|
400
402
|
className: "fad fa-arrow-circle-right",
|
|
401
403
|
type: "button",
|
|
402
404
|
onClick: () => {
|
|
403
|
-
|
|
405
|
+
u == r?.populated_promos?.length - 1 ? g(0) : g((l) => l + 1);
|
|
404
406
|
}
|
|
405
407
|
}
|
|
406
408
|
)
|
|
@@ -413,7 +415,7 @@ function me(e) {
|
|
|
413
415
|
"div",
|
|
414
416
|
{
|
|
415
417
|
onClick: () => {
|
|
416
|
-
|
|
418
|
+
K(), P("Details");
|
|
417
419
|
},
|
|
418
420
|
className: "action flex-grow-1 flex-shrink-0",
|
|
419
421
|
children: "Details"
|
|
@@ -427,7 +429,9 @@ function me(e) {
|
|
|
427
429
|
href: r?.website,
|
|
428
430
|
target: "_blank",
|
|
429
431
|
rel: "noreferrer",
|
|
430
|
-
onClick: () =>
|
|
432
|
+
onClick: (l) => {
|
|
433
|
+
l.preventDefault(), N(!0), P("Confirm Exit Modal Opened");
|
|
434
|
+
},
|
|
431
435
|
children: /* @__PURE__ */ s.jsx("div", { children: "Website" })
|
|
432
436
|
}
|
|
433
437
|
)
|
|
@@ -437,20 +441,22 @@ function me(e) {
|
|
|
437
441
|
)
|
|
438
442
|
}
|
|
439
443
|
),
|
|
440
|
-
!
|
|
444
|
+
!d && /* @__PURE__ */ s.jsx(
|
|
441
445
|
"div",
|
|
442
446
|
{
|
|
443
447
|
className: "advertise-with-us p-1",
|
|
444
448
|
style: {
|
|
445
449
|
// ...(props.previewData ? props.previewData.background_color : ad?.background_color),
|
|
446
|
-
backgroundColor:
|
|
447
|
-
color:
|
|
448
|
-
borderColor:
|
|
450
|
+
backgroundColor: o.background_color || r?.background_color,
|
|
451
|
+
color: o.font_color || r?.font_color,
|
|
452
|
+
borderColor: o.border_color || r?.border_color
|
|
449
453
|
},
|
|
450
454
|
children: /* @__PURE__ */ s.jsxs(
|
|
451
|
-
|
|
455
|
+
H,
|
|
452
456
|
{
|
|
453
457
|
className: "small d-block w-100 text-center",
|
|
458
|
+
href: "https://articles.media/advertising",
|
|
459
|
+
newPage: !0,
|
|
454
460
|
children: [
|
|
455
461
|
/* @__PURE__ */ s.jsx("i", { className: "fas fa-share me-1" }),
|
|
456
462
|
"Advertise with Articles Media!"
|
|
@@ -463,7 +469,7 @@ function me(e) {
|
|
|
463
469
|
}
|
|
464
470
|
);
|
|
465
471
|
}
|
|
466
|
-
const
|
|
472
|
+
const Ne = G(pe);
|
|
467
473
|
export {
|
|
468
|
-
|
|
474
|
+
Ne as default
|
|
469
475
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./jsx-runtime-nZSsnGb7.cjs"),n=require("react"),l=require("./toDate-CzgAa_PT.cjs"),s=require("./Modal-Cr0uB770.cjs"),a=require("./Button-BVYvDTtH.cjs");function d(i){let{setModalShow:o,ad:r,previewData:c}=i;n.useEffect(()=>{console.log("Mounted")},[]);const t=()=>{o(!1)};return e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsxs(s.Modal,{show:!0,backdropClassName:"ad-details-modal-backdrop",className:"articles-modal",centered:!0,onHide:t,size:"md",children:[e.jsxRuntimeExports.jsx(s.Modal.Header,{className:"align-items-center",closeButton:!0,children:e.jsxRuntimeExports.jsx(s.Modal.Title,{children:"Confirm Exit"})}),e.jsxRuntimeExports.jsxs(s.Modal.Body,{className:"",children:[e.jsxRuntimeExports.jsx("div",{className:"ratio ratio-16x9 bg-black mb-2"}),e.jsxRuntimeExports.jsx("p",{className:"mb-1",children:"This advertiser has been approved and verified to display ads but always be cautious when interacting with ads. Any offsite interactions are at your own risk and should be approached with caution. We can not be held responsible for any issues that may arise."})]}),e.jsxRuntimeExports.jsxs(s.Modal.Footer,{className:"d-flex justify-content-between",children:[e.jsxRuntimeExports.jsxs(a.ArticlesButton,{variant:"articles",onClick:t,children:[e.jsxRuntimeExports.jsx("i",{className:"fad fa-times"}),"Close"]}),e.jsxRuntimeExports.jsx(l.Link,{href:r?.website,newPage:!0,children:e.jsxRuntimeExports.jsxs(a.ArticlesButton,{variant:"articles",onClick:t,children:[e.jsxRuntimeExports.jsx("i",{className:"fad fa-link"}),"Proceed"]})})]})]})})}exports.default=d;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { j as e } from "./jsx-runtime-tc70JA_2.js";
|
|
2
|
+
import { useEffect as l } from "react";
|
|
3
|
+
import { L as n } from "./toDate-CDo8dBwb.js";
|
|
4
|
+
import { M as s } from "./Modal-CZ77qLgM.js";
|
|
5
|
+
import { A as i } from "./Button-B5nVYPMZ.js";
|
|
6
|
+
function x(t) {
|
|
7
|
+
let { setModalShow: r, ad: o, previewData: d } = t;
|
|
8
|
+
l(() => {
|
|
9
|
+
console.log("Mounted");
|
|
10
|
+
}, []);
|
|
11
|
+
const a = () => {
|
|
12
|
+
r(!1);
|
|
13
|
+
};
|
|
14
|
+
return /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs(
|
|
15
|
+
s,
|
|
16
|
+
{
|
|
17
|
+
show: !0,
|
|
18
|
+
backdropClassName: "ad-details-modal-backdrop",
|
|
19
|
+
className: "articles-modal",
|
|
20
|
+
centered: !0,
|
|
21
|
+
onHide: a,
|
|
22
|
+
size: "md",
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ e.jsx(s.Header, { className: "align-items-center", closeButton: !0, children: /* @__PURE__ */ e.jsx(s.Title, { children: "Confirm Exit" }) }),
|
|
25
|
+
/* @__PURE__ */ e.jsxs(
|
|
26
|
+
s.Body,
|
|
27
|
+
{
|
|
28
|
+
className: "",
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ e.jsx("div", { className: "ratio ratio-16x9 bg-black mb-2" }),
|
|
31
|
+
/* @__PURE__ */ e.jsx("p", { className: "mb-1", children: "This advertiser has been approved and verified to display ads but always be cautious when interacting with ads. Any offsite interactions are at your own risk and should be approached with caution. We can not be held responsible for any issues that may arise." })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ e.jsxs(s.Footer, { className: "d-flex justify-content-between", children: [
|
|
36
|
+
/* @__PURE__ */ e.jsxs(
|
|
37
|
+
i,
|
|
38
|
+
{
|
|
39
|
+
variant: "articles",
|
|
40
|
+
onClick: a,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ e.jsx("i", { className: "fad fa-times" }),
|
|
43
|
+
"Close"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ e.jsx(
|
|
48
|
+
n,
|
|
49
|
+
{
|
|
50
|
+
href: o?.website,
|
|
51
|
+
newPage: !0,
|
|
52
|
+
children: /* @__PURE__ */ e.jsxs(
|
|
53
|
+
i,
|
|
54
|
+
{
|
|
55
|
+
variant: "articles",
|
|
56
|
+
onClick: a,
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ e.jsx("i", { className: "fad fa-link" }),
|
|
59
|
+
"Proceed"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
] })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
) });
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
x as default
|
|
72
|
+
};
|