@yext/pages-components 1.0.5 → 1.1.0
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/THIRD-PARTY-NOTICES +2 -2
- package/dist/debugger-ChF76rKw.js +295 -0
- package/dist/debugger-DuJtPsjX.cjs +1 -0
- package/dist/{index-Dpvz9qZ8.cjs → index-DB0OPxMr.cjs} +2 -2
- package/dist/{index-BqDn49hh.js → index-G_YRmAId.js} +6366 -6400
- package/dist/{index-B_KO1dw5.cjs → index-PrX0sK7U.cjs} +57 -57
- package/dist/{index-s_etEaZu.js → index-bjY2y5oj.js} +3 -3
- package/dist/index.d.cts +3 -13
- package/dist/index.d.ts +3 -13
- package/dist/pages-components.cjs +1 -1
- package/dist/pages-components.js +16 -17
- package/dist/style.css +1 -1
- package/package.json +13 -13
- package/dist/debugger-DH7UN_-M.js +0 -286
- package/dist/debugger-DRWb3azj.cjs +0 -1
package/THIRD-PARTY-NOTICES
CHANGED
|
@@ -173,7 +173,7 @@ SOFTWARE.
|
|
|
173
173
|
|
|
174
174
|
The following npm package may be included in this product:
|
|
175
175
|
|
|
176
|
-
- @yext/analytics@1.0.0
|
|
176
|
+
- @yext/analytics@1.0.0
|
|
177
177
|
|
|
178
178
|
This package contains the following license:
|
|
179
179
|
|
|
@@ -244,7 +244,7 @@ SOFTWARE.
|
|
|
244
244
|
|
|
245
245
|
The following npm package may be included in this product:
|
|
246
246
|
|
|
247
|
-
- cross-fetch@4.
|
|
247
|
+
- cross-fetch@4.1.0
|
|
248
248
|
|
|
249
249
|
This package contains the following license:
|
|
250
250
|
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import { g as B, j as o, c as j } from "./index-G_YRmAId.js";
|
|
2
|
+
import { useState as b, useEffect as k, useRef as C } from "react";
|
|
3
|
+
import { createPortal as O } from "react-dom";
|
|
4
|
+
function q() {
|
|
5
|
+
return B().name !== "browser" || window.hasOwnProperty("debuggerInitialized") ? null : (window.debuggerInitialized = !0, O(/* @__PURE__ */ o.jsx(D, {}), document.body));
|
|
6
|
+
}
|
|
7
|
+
const S = (e, s) => {
|
|
8
|
+
const n = e.dataset.yaAction, t = e.dataset.yaScopeoverride, l = e.dataset.yaEventname, c = t || s;
|
|
9
|
+
return {
|
|
10
|
+
action: n,
|
|
11
|
+
originalEventName: c ? `${c}_${l}` : l,
|
|
12
|
+
scope: c
|
|
13
|
+
};
|
|
14
|
+
}, Y = (e, s) => {
|
|
15
|
+
const n = [];
|
|
16
|
+
let t = e;
|
|
17
|
+
for (; t != null && t.parentElement; )
|
|
18
|
+
t = t.parentElement.closest(s), t && n.push(t);
|
|
19
|
+
return n;
|
|
20
|
+
}, h = {}, N = "YA_NO_SCOPE", E = (e, s, n, t) => {
|
|
21
|
+
h.hasOwnProperty(e) ? h[e].events.map((l) => l.el).includes(t) || (h[e].events = [
|
|
22
|
+
...h[e].events,
|
|
23
|
+
{
|
|
24
|
+
eventData: s,
|
|
25
|
+
el: t
|
|
26
|
+
}
|
|
27
|
+
]) : h[e] = {
|
|
28
|
+
scopeEl: n || t,
|
|
29
|
+
// overidden scopes still need an element
|
|
30
|
+
events: [
|
|
31
|
+
{
|
|
32
|
+
eventData: s,
|
|
33
|
+
el: t
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
function D() {
|
|
39
|
+
const [e, s] = b(), [n, t] = b([]), [l, c] = b(!1), i = (r) => {
|
|
40
|
+
s(e === r ? void 0 : r);
|
|
41
|
+
};
|
|
42
|
+
return k(() => (document.documentElement.classList.add("xYextDebug"), document.querySelectorAll(
|
|
43
|
+
"[data-ya-eventname]"
|
|
44
|
+
).forEach((d, g) => {
|
|
45
|
+
const a = d.closest("[data-ya-scope]"), p = a == null ? void 0 : a.dataset.yaScope, u = S(d, p);
|
|
46
|
+
d.addEventListener("mouseenter", () => {
|
|
47
|
+
t([
|
|
48
|
+
{
|
|
49
|
+
elem: d,
|
|
50
|
+
key: `${u.originalEventName}_${g}`,
|
|
51
|
+
action: u.action,
|
|
52
|
+
originalEventName: u.originalEventName,
|
|
53
|
+
scope: u.scope
|
|
54
|
+
}
|
|
55
|
+
]);
|
|
56
|
+
}), d.addEventListener("mouseleave", () => {
|
|
57
|
+
t([]);
|
|
58
|
+
});
|
|
59
|
+
const v = d.dataset.yaScopeoverride;
|
|
60
|
+
v ? E(v, u, a, d) : [
|
|
61
|
+
p,
|
|
62
|
+
...Y(d, "[data-ya-scope]").map(
|
|
63
|
+
(m) => m.dataset.yaScope
|
|
64
|
+
)
|
|
65
|
+
].forEach((m) => {
|
|
66
|
+
E(m || N, u, a, d);
|
|
67
|
+
});
|
|
68
|
+
}), c(!0), () => {
|
|
69
|
+
document.documentElement.classList.remove("xYextDebug");
|
|
70
|
+
}), []), l ? /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
71
|
+
/* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger", children: [
|
|
72
|
+
/* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger-toggles", children: [
|
|
73
|
+
/* @__PURE__ */ o.jsx(
|
|
74
|
+
"button",
|
|
75
|
+
{
|
|
76
|
+
className: j("analytics-debugger-toggle", {
|
|
77
|
+
"is-active": e === "Events"
|
|
78
|
+
}),
|
|
79
|
+
onClick: () => i("Events"),
|
|
80
|
+
children: "Events"
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ o.jsx(
|
|
84
|
+
"button",
|
|
85
|
+
{
|
|
86
|
+
className: j("analytics-debugger-toggle", {
|
|
87
|
+
"is-active": e === "Scopes"
|
|
88
|
+
}),
|
|
89
|
+
onClick: () => i("Scopes"),
|
|
90
|
+
children: "Scopes"
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
] }),
|
|
94
|
+
e && /* @__PURE__ */ o.jsx("div", { className: "analytics-debugger-tabs", children: e === "Events" ? /* @__PURE__ */ o.jsx(T, { data: h, setTooltips: t }) : /* @__PURE__ */ o.jsx($, { data: h, setTooltips: t }) })
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ o.jsx(A, { tooltips: n })
|
|
97
|
+
] }) : null;
|
|
98
|
+
}
|
|
99
|
+
const R = () => {
|
|
100
|
+
const e = {};
|
|
101
|
+
return Object.values(h).forEach((s) => {
|
|
102
|
+
s.events.forEach((n) => {
|
|
103
|
+
const { originalEventName: t } = n.eventData;
|
|
104
|
+
e[t] || (e[t] = []), !e[t].find(
|
|
105
|
+
(l) => l.el === n.el
|
|
106
|
+
) && e[t].push(n);
|
|
107
|
+
});
|
|
108
|
+
}), e;
|
|
109
|
+
};
|
|
110
|
+
function T(e) {
|
|
111
|
+
const { setTooltips: s } = e, [n, t] = b([]), [l, c] = b(""), i = (r, d) => {
|
|
112
|
+
n.forEach(
|
|
113
|
+
(a) => a.classList.remove("analytics-event-highlight")
|
|
114
|
+
);
|
|
115
|
+
const g = r.map((a) => (a.el.scrollIntoView({ behavior: "smooth", block: "nearest" }), a.el.classList.add("analytics-event-highlight"), a.el));
|
|
116
|
+
t(g), c(d), s(
|
|
117
|
+
r.map((a, p) => ({
|
|
118
|
+
elem: a.el,
|
|
119
|
+
key: `${a.eventData.originalEventName}_${p}`,
|
|
120
|
+
action: a.eventData.action,
|
|
121
|
+
originalEventName: a.eventData.originalEventName,
|
|
122
|
+
scope: a.eventData.scope
|
|
123
|
+
}))
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
return /* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger-tab", children: [
|
|
127
|
+
/* @__PURE__ */ o.jsx("h2", { className: "analytics-debugger-tab-title", children: "Event Names" }),
|
|
128
|
+
/* @__PURE__ */ o.jsx("ul", { className: "analytics-debugger-list", children: Object.entries(R()).map(
|
|
129
|
+
([r, d], g) => {
|
|
130
|
+
const a = `${r}_${g}`;
|
|
131
|
+
return /* @__PURE__ */ o.jsx("li", { className: "analytics-debugger-listItem", children: /* @__PURE__ */ o.jsx(
|
|
132
|
+
"button",
|
|
133
|
+
{
|
|
134
|
+
className: j("analytics-debugger-button", {
|
|
135
|
+
"is-active": a === l
|
|
136
|
+
}),
|
|
137
|
+
onClick: () => i(d, a),
|
|
138
|
+
children: r
|
|
139
|
+
}
|
|
140
|
+
) }, a);
|
|
141
|
+
}
|
|
142
|
+
) })
|
|
143
|
+
] });
|
|
144
|
+
}
|
|
145
|
+
function $(e) {
|
|
146
|
+
const { data: s, setTooltips: n } = e, [t, l] = b(""), c = (i) => {
|
|
147
|
+
const r = s[i];
|
|
148
|
+
r.scopeEl && (r.scopeEl.scrollIntoView({
|
|
149
|
+
behavior: "smooth",
|
|
150
|
+
block: "nearest"
|
|
151
|
+
}), l(i), n(
|
|
152
|
+
r.events.map((d, g) => {
|
|
153
|
+
const a = d.eventData;
|
|
154
|
+
return {
|
|
155
|
+
elem: d.el,
|
|
156
|
+
key: `${a.originalEventName}_${g}`,
|
|
157
|
+
action: a.action,
|
|
158
|
+
originalEventName: a.originalEventName,
|
|
159
|
+
scope: a.scope
|
|
160
|
+
};
|
|
161
|
+
})
|
|
162
|
+
));
|
|
163
|
+
};
|
|
164
|
+
return /* @__PURE__ */ o.jsxs("div", { className: "analytics-debugger-tab", children: [
|
|
165
|
+
/* @__PURE__ */ o.jsx("h2", { className: "analytics-debugger-tab-title", children: "Scope Names" }),
|
|
166
|
+
/* @__PURE__ */ o.jsx("ul", { className: "analytics-debugger-list", children: Object.keys(s).map((i, r) => {
|
|
167
|
+
if (i !== N)
|
|
168
|
+
return /* @__PURE__ */ o.jsx("li", { className: "analytics-debugger-listItem", children: /* @__PURE__ */ o.jsx(
|
|
169
|
+
"button",
|
|
170
|
+
{
|
|
171
|
+
className: j("analytics-debugger-button", {
|
|
172
|
+
"is-active": i === t
|
|
173
|
+
}),
|
|
174
|
+
onClick: () => c(i),
|
|
175
|
+
children: i
|
|
176
|
+
}
|
|
177
|
+
) }, i + r);
|
|
178
|
+
}) })
|
|
179
|
+
] });
|
|
180
|
+
}
|
|
181
|
+
function A(e) {
|
|
182
|
+
const s = C({});
|
|
183
|
+
return k(() => {
|
|
184
|
+
if (s.current)
|
|
185
|
+
for (const n of Object.values(s.current)) {
|
|
186
|
+
const t = Object.values(s.current).map((l) => l.el).filter((l) => l !== n.el);
|
|
187
|
+
L(n, t), n.el.style.visibility = "visible";
|
|
188
|
+
}
|
|
189
|
+
}, [e.tooltips]), /* @__PURE__ */ o.jsx(o.Fragment, { children: e.tooltips.map((n) => /* @__PURE__ */ o.jsxs(
|
|
190
|
+
"div",
|
|
191
|
+
{
|
|
192
|
+
style: { visibility: "hidden" },
|
|
193
|
+
className: "analytics-debugger-tooltip",
|
|
194
|
+
ref: (t) => {
|
|
195
|
+
t ? s.current[n.key] = {
|
|
196
|
+
el: t,
|
|
197
|
+
tooltip: n
|
|
198
|
+
} : delete s.current[n.key];
|
|
199
|
+
},
|
|
200
|
+
children: [
|
|
201
|
+
/* @__PURE__ */ o.jsxs("span", { children: [
|
|
202
|
+
"Action: ",
|
|
203
|
+
n.action
|
|
204
|
+
] }),
|
|
205
|
+
/* @__PURE__ */ o.jsx("br", {}),
|
|
206
|
+
/* @__PURE__ */ o.jsxs("span", { children: [
|
|
207
|
+
"Scope: ",
|
|
208
|
+
n.scope
|
|
209
|
+
] }),
|
|
210
|
+
/* @__PURE__ */ o.jsx("br", {}),
|
|
211
|
+
/* @__PURE__ */ o.jsxs("span", { children: [
|
|
212
|
+
"Original Event Name: ",
|
|
213
|
+
n.originalEventName
|
|
214
|
+
] })
|
|
215
|
+
]
|
|
216
|
+
},
|
|
217
|
+
n.key
|
|
218
|
+
)) });
|
|
219
|
+
}
|
|
220
|
+
function L(e, s) {
|
|
221
|
+
for (let n = 0; n < 9; n++) {
|
|
222
|
+
const t = P(
|
|
223
|
+
e.tooltip.elem.getBoundingClientRect(),
|
|
224
|
+
e.el,
|
|
225
|
+
n
|
|
226
|
+
);
|
|
227
|
+
if (e.el.style.inset = `${t.top} auto auto ${t.left}`, !!I(
|
|
228
|
+
e.el.getBoundingClientRect().left,
|
|
229
|
+
e.el.getBoundingClientRect().top + window.scrollY,
|
|
230
|
+
e.el.getBoundingClientRect().right,
|
|
231
|
+
e.el.getBoundingClientRect().bottom + window.scrollY
|
|
232
|
+
)) continue;
|
|
233
|
+
let c = !0;
|
|
234
|
+
for (let i = 0; i < s.length; i++) {
|
|
235
|
+
const r = s[i];
|
|
236
|
+
_(e.el, r) && (c = !1);
|
|
237
|
+
}
|
|
238
|
+
if (c) break;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
function _(e, s) {
|
|
242
|
+
const n = e.getBoundingClientRect().top + window.scrollY, t = e.getBoundingClientRect().left, l = n + e.clientHeight, c = t + e.clientWidth, i = s.getBoundingClientRect().top + window.scrollY, r = s.getBoundingClientRect().left, d = i + s.clientHeight, g = r + s.clientWidth, a = (p, u, v, f, m, x, y, w) => v <= m && m <= y && f <= x && x <= w || v <= p && p <= y && f <= u && u <= w || v <= p && p <= y && f <= x && x <= w || v <= m && m <= y && f <= u && u <= w;
|
|
243
|
+
return a(t, n, r, i, c, l, g, d) || a(r, i, t, n, g, d, c, l);
|
|
244
|
+
}
|
|
245
|
+
function I(e, s, n, t) {
|
|
246
|
+
return e < 0 || n > window.innerWidth || s < 0 || t > document.documentElement.scrollHeight;
|
|
247
|
+
}
|
|
248
|
+
function P(e, s, n) {
|
|
249
|
+
const t = s.clientHeight, l = s.clientWidth;
|
|
250
|
+
let c, i;
|
|
251
|
+
switch (n) {
|
|
252
|
+
case 0: {
|
|
253
|
+
i = window.scrollY + e.top - t + "px", c = e.left - l + "px";
|
|
254
|
+
break;
|
|
255
|
+
}
|
|
256
|
+
case 1: {
|
|
257
|
+
i = window.scrollY + e.top - t + "px", c = e.left + "px";
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
case 2: {
|
|
261
|
+
i = window.scrollY + e.top - t + "px", c = e.right + "px";
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
case 3: {
|
|
265
|
+
i = window.scrollY + e.top - t + "px", c = e.right - l + "px";
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
case 4: {
|
|
269
|
+
i = window.scrollY + e.bottom + "px", c = e.left - l + "px";
|
|
270
|
+
break;
|
|
271
|
+
}
|
|
272
|
+
case 5: {
|
|
273
|
+
i = window.scrollY + e.bottom + "px", c = e.left + "px";
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
case 6: {
|
|
277
|
+
i = window.scrollY + e.bottom + "px", c = e.right - l + "px";
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
case 7: {
|
|
281
|
+
i = window.scrollY + e.bottom + "px", c = e.right + "px";
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
default:
|
|
285
|
+
i = 0, c = 0;
|
|
286
|
+
}
|
|
287
|
+
return {
|
|
288
|
+
top: i,
|
|
289
|
+
left: c
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
export {
|
|
293
|
+
D as AnalyticsDebuggerInternal,
|
|
294
|
+
q as default
|
|
295
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-PrX0sK7U.cjs"),p=require("react"),k=require("react-dom");function N(){return i.getRuntime().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=!0,k.createPortal(i.jsxRuntimeExports.jsx(R,{}),document.body))}const S=(e,n)=>{const s=e.dataset.yaAction,t=e.dataset.yaScopeoverride,l=e.dataset.yaEventname,c=t||n;return{action:s,originalEventName:c?`${c}_${l}`:l,scope:c}},B=(e,n)=>{const s=[];let t=e;for(;t!=null&&t.parentElement;)t=t.parentElement.closest(n),t&&s.push(t);return s},h={},w="YA_NO_SCOPE",y=(e,n,s,t)=>{h.hasOwnProperty(e)?h[e].events.map(l=>l.el).includes(t)||(h[e].events=[...h[e].events,{eventData:n,el:t}]):h[e]={scopeEl:s||t,events:[{eventData:n,el:t}]}};function R(){const[e,n]=p.useState(),[s,t]=p.useState([]),[l,c]=p.useState(!1),o=r=>{n(e===r?void 0:r)};return p.useEffect(()=>(document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((u,g)=>{const a=u.closest("[data-ya-scope]"),x=a==null?void 0:a.dataset.yaScope,d=S(u,x);u.addEventListener("mouseenter",()=>{t([{elem:u,key:`${d.originalEventName}_${g}`,action:d.action,originalEventName:d.originalEventName,scope:d.scope}])}),u.addEventListener("mouseleave",()=>{t([])});const b=u.dataset.yaScopeoverride;b?y(b,d,a,u):[x,...B(u,"[data-ya-scope]").map(m=>m.dataset.yaScope)].forEach(m=>{y(m||w,d,a,u)})}),c(!0),()=>{document.documentElement.classList.remove("xYextDebug")}),[]),l?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger",children:[i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-toggles",children:[i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Events"}),onClick:()=>o("Events"),children:"Events"}),i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-toggle",{"is-active":e==="Scopes"}),onClick:()=>o("Scopes"),children:"Scopes"})]}),e&&i.jsxRuntimeExports.jsx("div",{className:"analytics-debugger-tabs",children:e==="Events"?i.jsxRuntimeExports.jsx(O,{data:h,setTooltips:t}):i.jsxRuntimeExports.jsx($,{data:h,setTooltips:t})})]}),i.jsxRuntimeExports.jsx(D,{tooltips:s})]}):null}const C=()=>{const e={};return Object.values(h).forEach(n=>{n.events.forEach(s=>{const{originalEventName:t}=s.eventData;e[t]||(e[t]=[]),!e[t].find(l=>l.el===s.el)&&e[t].push(s)})}),e};function O(e){const{setTooltips:n}=e,[s,t]=p.useState([]),[l,c]=p.useState(""),o=(r,u)=>{s.forEach(a=>a.classList.remove("analytics-event-highlight"));const g=r.map(a=>(a.el.scrollIntoView({behavior:"smooth",block:"nearest"}),a.el.classList.add("analytics-event-highlight"),a.el));t(g),c(u),n(r.map((a,x)=>({elem:a.el,key:`${a.eventData.originalEventName}_${x}`,action:a.eventData.action,originalEventName:a.eventData.originalEventName,scope:a.eventData.scope})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Event Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.entries(C()).map(([r,u],g)=>{const a=`${r}_${g}`;return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":a===l}),onClick:()=>o(u,a),children:r})},a)})})]})}function $(e){const{data:n,setTooltips:s}=e,[t,l]=p.useState(""),c=o=>{const r=n[o];r.scopeEl&&(r.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),l(o),s(r.events.map((u,g)=>{const a=u.eventData;return{elem:u.el,key:`${a.originalEventName}_${g}`,action:a.action,originalEventName:a.originalEventName,scope:a.scope}})))};return i.jsxRuntimeExports.jsxs("div",{className:"analytics-debugger-tab",children:[i.jsxRuntimeExports.jsx("h2",{className:"analytics-debugger-tab-title",children:"Scope Names"}),i.jsxRuntimeExports.jsx("ul",{className:"analytics-debugger-list",children:Object.keys(n).map((o,r)=>{if(o!==w)return i.jsxRuntimeExports.jsx("li",{className:"analytics-debugger-listItem",children:i.jsxRuntimeExports.jsx("button",{className:i.c("analytics-debugger-button",{"is-active":o===t}),onClick:()=>c(o),children:o})},o+r)})})]})}function D(e){const n=p.useRef({});return p.useEffect(()=>{if(n.current)for(const s of Object.values(n.current)){const t=Object.values(n.current).map(l=>l.el).filter(l=>l!==s.el);Y(s,t),s.el.style.visibility="visible"}},[e.tooltips]),i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:e.tooltips.map(s=>i.jsxRuntimeExports.jsxs("div",{style:{visibility:"hidden"},className:"analytics-debugger-tooltip",ref:t=>{t?n.current[s.key]={el:t,tooltip:s}:delete n.current[s.key]},children:[i.jsxRuntimeExports.jsxs("span",{children:["Action: ",s.action]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Scope: ",s.scope]}),i.jsxRuntimeExports.jsx("br",{}),i.jsxRuntimeExports.jsxs("span",{children:["Original Event Name: ",s.originalEventName]})]},s.key))})}function Y(e,n){for(let s=0;s<9;s++){const t=I(e.tooltip.elem.getBoundingClientRect(),e.el,s);if(e.el.style.inset=`${t.top} auto auto ${t.left}`,!!A(e.el.getBoundingClientRect().left,e.el.getBoundingClientRect().top+window.scrollY,e.el.getBoundingClientRect().right,e.el.getBoundingClientRect().bottom+window.scrollY))continue;let c=!0;for(let o=0;o<n.length;o++){const r=n[o];T(e.el,r)&&(c=!1)}if(c)break}}function T(e,n){const s=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,l=s+e.clientHeight,c=t+e.clientWidth,o=n.getBoundingClientRect().top+window.scrollY,r=n.getBoundingClientRect().left,u=o+n.clientHeight,g=r+n.clientWidth,a=(x,d,b,E,m,j,v,f)=>b<=m&&m<=v&&E<=j&&j<=f||b<=x&&x<=v&&E<=d&&d<=f||b<=x&&x<=v&&E<=j&&j<=f||b<=m&&m<=v&&E<=d&&d<=f;return a(t,s,r,o,c,l,g,u)||a(r,o,t,s,g,u,c,l)}function A(e,n,s,t){return e<0||s>window.innerWidth||n<0||t>document.documentElement.scrollHeight}function I(e,n,s){const t=n.clientHeight,l=n.clientWidth;let c,o;switch(s){case 0:{o=window.scrollY+e.top-t+"px",c=e.left-l+"px";break}case 1:{o=window.scrollY+e.top-t+"px",c=e.left+"px";break}case 2:{o=window.scrollY+e.top-t+"px",c=e.right+"px";break}case 3:{o=window.scrollY+e.top-t+"px",c=e.right-l+"px";break}case 4:{o=window.scrollY+e.bottom+"px",c=e.left-l+"px";break}case 5:{o=window.scrollY+e.bottom+"px",c=e.left+"px";break}case 6:{o=window.scrollY+e.bottom+"px",c=e.right-l+"px";break}case 7:{o=window.scrollY+e.bottom+"px",c=e.right+"px";break}default:o=0,c=0}return{top:o,left:c}}exports.AnalyticsDebuggerInternal=R;exports.default=N;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const On=require("react"),m=require("./index-PrX0sK7U.cjs");function er(n){const t=[];let e=-1;for(;++e<n.footnoteOrder.length;){const r=n.footnoteById[n.footnoteOrder[e]];if(!r)continue;const i=n.all(r),l=String(r.identifier).toUpperCase(),o=m.normalizeUri(l.toLowerCase());let a=0;const s=[];for(;++a<=n.footnoteCounts[l];){const p={type:"element",tagName:"a",properties:{href:"#"+n.clobberPrefix+"fnref-"+o+(a>1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:n.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&p.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),s.length>0&&s.push({type:"text",value:" "}),s.push(p)}const c=i[i.length-1];if(c&&c.type==="element"&&c.tagName==="p"){const p=c.children[c.children.length-1];p&&p.type==="text"?p.value+=" ":c.children.push({type:"text",value:" "}),c.children.push(...s)}else i.push(...s);const d={type:"element",tagName:"li",properties:{id:n.clobberPrefix+"fn-"+o},children:n.wrap(i,!0)};n.patch(r,d),t.push(d)}if(t.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:n.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(n.footnoteLabelProperties)),id:"footnote-label"},children:[{type:"text",value:n.footnoteLabel}]},{type:"text",value:`
|
|
2
2
|
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(t,!0)},{type:"text",value:`
|
|
3
3
|
`}]}}function yt(n,t){const e=m.createState(n,t),r=e.one(n,null),i=er(e);return i&&r.children.push({type:"text",value:`
|
|
4
4
|
`},i),Array.isArray(r)?{type:"root",children:r}:r}const tr=function(n,t){return n&&"run"in n?rr(n,t):ir(n||t)};function rr(n,t){return(e,r,i)=>{n.run(yt(e,t),r,l=>{i(l)})}}function ir(n){return t=>yt(t,n)}const Pe=["http","https","mailto","tel"];function xt(n){const t=(n||"").trim(),e=t.charAt(0);if(e==="#"||e==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++i<Pe.length;){const l=Pe[i];if(r===l.length&&t.slice(0,l.length).toLowerCase()===l)return t}return i=t.indexOf("?"),i!==-1&&r>i||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}/*!
|
|
@@ -44,4 +44,4 @@ Valid keys: `+JSON.stringify(Object.keys(u),null," "));var O=cn(j,V,M,H,I+"."+V
|
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/var ft;function Ul(){return ft||(ft=1,process.env.NODE_ENV!=="production"&&function(){var n=Symbol.for("react.element"),t=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.server_context"),s=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),E=!1,y=!1,x=!1,w=!1,F=!1,C;C=Symbol.for("react.module.reference");function z(L){return!!(typeof L=="string"||typeof L=="function"||L===e||L===i||F||L===r||L===c||L===d||w||L===h||E||y||x||typeof L=="object"&&L!==null&&(L.$$typeof===g||L.$$typeof===p||L.$$typeof===l||L.$$typeof===o||L.$$typeof===s||L.$$typeof===C||L.getModuleId!==void 0))}function S(L){if(typeof L=="object"&&L!==null){var En=L.$$typeof;switch(En){case n:var Tn=L.type;switch(Tn){case e:case i:case r:case c:case d:return Tn;default:var Rn=Tn&&Tn.$$typeof;switch(Rn){case a:case o:case s:case g:case p:case l:return Rn;default:return En}}case t:return En}}}var k=o,R=l,q=n,X=s,un=e,_=g,A=p,W=t,nn=i,Y=r,en=c,rn=d,pn=!1,dn=!1;function u(L){return pn||(pn=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function P(L){return dn||(dn=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function D(L){return S(L)===o}function f(L){return S(L)===l}function M(L){return typeof L=="object"&&L!==null&&L.$$typeof===n}function H(L){return S(L)===s}function I(L){return S(L)===e}function j(L){return S(L)===g}function B(L){return S(L)===p}function Q(L){return S(L)===t}function V(L){return S(L)===i}function cn(L){return S(L)===r}function O(L){return S(L)===c}function mn(L){return S(L)===d}Z.ContextConsumer=k,Z.ContextProvider=R,Z.Element=q,Z.ForwardRef=X,Z.Fragment=un,Z.Lazy=_,Z.Memo=A,Z.Portal=W,Z.Profiler=nn,Z.StrictMode=Y,Z.Suspense=en,Z.SuspenseList=rn,Z.isAsyncMode=u,Z.isConcurrentMode=P,Z.isContextConsumer=D,Z.isContextProvider=f,Z.isElement=M,Z.isForwardRef=H,Z.isFragment=I,Z.isLazy=j,Z.isMemo=B,Z.isPortal=Q,Z.isProfiler=V,Z.isStrictMode=cn,Z.isSuspense=O,Z.isSuspenseList=mn,Z.isValidElementType=z,Z.typeOf=S}()),Z}process.env.NODE_ENV==="production"?ge.exports=ql():ge.exports=Ul();var Hl=ge.exports;const Vl=m.getDefaultExportFromCjs(Hl);function Yl(n){const t=n&&typeof n=="object"&&n.type==="text"?n.value||"":n;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function Wl(n){return n.join(" ").trim()}function Ql(n,t){const e={};return(n[n.length-1]===""?[...n,""]:n).join((e.padRight?" ":"")+","+(e.padLeft===!1?"":" ")).trim()}var Se={exports:{}},pt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Xl=/\n/g,Kl=/^\s*/,Gl=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Jl=/^:\s*/,Zl=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,no=/^[;\s]*/,eo=/^\s+|\s+$/g,to=`
|
|
47
|
-
`,ht="/",dt="*",vn="",ro="comment",io="declaration",lo=function(n,t){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];t=t||{};var e=1,r=1;function i(E){var y=E.match(Xl);y&&(e+=y.length);var x=E.lastIndexOf(to);r=~x?E.length-x:r+E.length}function l(){var E={line:e,column:r};return function(y){return y.position=new o(E),c(),y}}function o(E){this.start=E,this.end={line:e,column:r},this.source=t.source}o.prototype.content=n;function a(E){var y=new Error(t.source+":"+e+":"+r+": "+E);if(y.reason=E,y.filename=t.source,y.line=e,y.column=r,y.source=n,!t.silent)throw y}function s(E){var y=E.exec(n);if(y){var x=y[0];return i(x),n=n.slice(x.length),y}}function c(){s(Kl)}function d(E){var y;for(E=E||[];y=p();)y!==!1&&E.push(y);return E}function p(){var E=l();if(!(ht!=n.charAt(0)||dt!=n.charAt(1))){for(var y=2;vn!=n.charAt(y)&&(dt!=n.charAt(y)||ht!=n.charAt(y+1));)++y;if(y+=2,vn===n.charAt(y-1))return a("End of comment missing");var x=n.slice(2,y-2);return r+=2,i(x),n=n.slice(y),r+=2,E({type:ro,comment:x})}}function g(){var E=l(),y=s(Gl);if(y){if(p(),!s(Jl))return a("property missing ':'");var x=s(Zl),w=E({type:io,property:mt(y[0].replace(pt,vn)),value:x?mt(x[0].replace(pt,vn)):vn});return s(no),w}}function h(){var E=[];d(E);for(var y;y=g();)y!==!1&&(E.push(y),d(E));return E}return c(),h()};function mt(n){return n?n.replace(eo,vn):vn}var oo=lo;function Yt(n,t){var e=null;if(!n||typeof n!="string")return e;for(var r,i=oo(n),l=typeof t=="function",o,a,s=0,c=i.length;s<c;s++)r=i[s],o=r.property,a=r.value,l?t(o,a,r):a&&(e||(e={}),e[o]=a);return e}Se.exports=Yt;Se.exports.default=Yt;var ao=Se.exports;const uo=m.getDefaultExportFromCjs(ao),ye={}.hasOwnProperty,so=new Set(["table","thead","tbody","tfoot","tr"]);function Wt(n,t){const e=[];let r=-1,i;for(;++r<t.children.length;)i=t.children[r],i.type==="element"?e.push(co(n,i,r,t)):i.type==="text"?(t.type!=="element"||!so.has(t.tagName)||!Yl(i))&&e.push(i.value):i.type==="raw"&&!n.options.skipHtml&&e.push(i.value);return e}function co(n,t,e,r){const i=n.options,l=i.transformLinkUri===void 0?xt:i.transformLinkUri,o=n.schema,a=t.tagName,s={};let c=o,d;if(o.space==="html"&&a==="svg"&&(c=$l,n.schema=c),t.properties)for(d in t.properties)ye.call(t.properties,d)&&po(s,d,t.properties[d],n);(a==="ol"||a==="ul")&&n.listDepth++;const p=Wt(n,t);(a==="ol"||a==="ul")&&n.listDepth--,n.schema=o;const g=t.position||{start:{line:null,column:null},end:{line:null,column:null}},h=i.components&&ye.call(i.components,a)?i.components[a]:a,E=typeof h=="string"||h===On.Fragment;if(!Vl.isValidElementType(h))throw new TypeError(`Component for name \`${a}\` not defined or is not renderable`);if(s.key=e,a==="a"&&i.linkTarget&&(s.target=typeof i.linkTarget=="function"?i.linkTarget(String(s.href||""),t.children,typeof s.title=="string"?s.title:null):i.linkTarget),a==="a"&&l&&(s.href=l(String(s.href||""),t.children,typeof s.title=="string"?s.title:null)),!E&&a==="code"&&r.type==="element"&&r.tagName!=="pre"&&(s.inline=!0),!E&&(a==="h1"||a==="h2"||a==="h3"||a==="h4"||a==="h5"||a==="h6")&&(s.level=Number.parseInt(a.charAt(1),10)),a==="img"&&i.transformImageUri&&(s.src=i.transformImageUri(String(s.src||""),String(s.alt||""),typeof s.title=="string"?s.title:null)),!E&&a==="li"&&r.type==="element"){const y=fo(t);s.checked=y&&y.properties?!!y.properties.checked:null,s.index=ae(r,t),s.ordered=r.tagName==="ol"}return!E&&(a==="ol"||a==="ul")&&(s.ordered=a==="ol",s.depth=n.listDepth),(a==="td"||a==="th")&&(s.align&&(s.style||(s.style={}),s.style.textAlign=s.align,delete s.align),E||(s.isHeader=a==="th")),!E&&a==="tr"&&r.type==="element"&&(s.isHeader=r.tagName==="thead"),i.sourcePos&&(s["data-sourcepos"]=go(g)),!E&&i.rawSourcePos&&(s.sourcePosition=t.position),!E&&i.includeElementIndex&&(s.index=ae(r,t),s.siblingCount=ae(r)),E||(s.node=t),p.length>0?On.createElement(h,s,p):On.createElement(h,s)}function fo(n){let t=-1;for(;++t<n.children.length;){const e=n.children[t];if(e.type==="element"&&e.tagName==="input")return e}return null}function ae(n,t){let e=-1,r=0;for(;++e<n.children.length&&n.children[e]!==t;)n.children[e].type==="element"&&r++;return r}function po(n,t,e,r){const i=Fl(r.schema,t);let l=e;l==null||l!==l||(Array.isArray(l)&&(l=i.commaSeparated?Ql(l):Wl(l)),i.property==="style"&&typeof l=="string"&&(l=ho(l)),i.space&&i.property?n[ye.call(st,i.property)?st[i.property]:i.property]=l:i.attribute&&(n[i.attribute]=l))}function ho(n){const t={};try{uo(n,e)}catch{}return t;function e(r,i){const l=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;t[l.replace(/-([a-z])/g,mo)]=i}}function mo(n,t){return t.toUpperCase()}function go(n){return[n.start.line,":",n.start.column,"-",n.end.line,":",n.end.column].map(String).join("")}const gt={}.hasOwnProperty,yo="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Nn={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function Qt(n){for(const l in Nn)if(gt.call(Nn,l)&>.call(n,l)){const o=Nn[l];console.warn(`[react-markdown] Warning: please ${o.to?`use \`${o.to}\` instead of`:"remove"} \`${l}\` (see <${yo}#${o.id}> for more info)`),delete Nn[l]}const t=br().use(bl).use(n.remarkPlugins||[]).use(tr,{...n.remarkRehypeOptions,allowDangerousHtml:!0}).use(n.rehypePlugins||[]).use(Nl,n),e=new bt;typeof n.children=="string"?e.value=n.children:n.children!==void 0&&n.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${n.children}\`)`);const r=t.runSync(t.parse(e),e);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=On.createElement(On.Fragment,{},Wt({options:n,schema:Bl,listDepth:0},r));return n.className&&(i=On.createElement("div",{className:n.className},i)),i}Qt.propTypes={children:$.string,className:$.string,allowElement:$.func,allowedElements:$.arrayOf($.string),disallowedElements:$.arrayOf($.string),unwrapDisallowed:$.bool,remarkPlugins:$.arrayOf($.oneOfType([$.object,$.func,$.arrayOf($.oneOfType([$.bool,$.string,$.object,$.func,$.arrayOf($.any)]))])),rehypePlugins:$.arrayOf($.oneOfType([$.object,$.func,$.arrayOf($.oneOfType([$.bool,$.string,$.object,$.func,$.arrayOf($.any)]))])),sourcePos:$.bool,rawSourcePos:$.bool,skipHtml:$.bool,includeElementIndex:$.bool,transformLinkUri:$.oneOfType([$.func,$.bool]),linkTarget:$.oneOfType([$.func,$.string]),transformImageUri:$.func,components:$.object};exports.default=Qt;exports.uriTransformer=xt;
|
|
47
|
+
`,ht="/",dt="*",vn="",ro="comment",io="declaration",lo=function(n,t){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];t=t||{};var e=1,r=1;function i(E){var y=E.match(Xl);y&&(e+=y.length);var x=E.lastIndexOf(to);r=~x?E.length-x:r+E.length}function l(){var E={line:e,column:r};return function(y){return y.position=new o(E),c(),y}}function o(E){this.start=E,this.end={line:e,column:r},this.source=t.source}o.prototype.content=n;function a(E){var y=new Error(t.source+":"+e+":"+r+": "+E);if(y.reason=E,y.filename=t.source,y.line=e,y.column=r,y.source=n,!t.silent)throw y}function s(E){var y=E.exec(n);if(y){var x=y[0];return i(x),n=n.slice(x.length),y}}function c(){s(Kl)}function d(E){var y;for(E=E||[];y=p();)y!==!1&&E.push(y);return E}function p(){var E=l();if(!(ht!=n.charAt(0)||dt!=n.charAt(1))){for(var y=2;vn!=n.charAt(y)&&(dt!=n.charAt(y)||ht!=n.charAt(y+1));)++y;if(y+=2,vn===n.charAt(y-1))return a("End of comment missing");var x=n.slice(2,y-2);return r+=2,i(x),n=n.slice(y),r+=2,E({type:ro,comment:x})}}function g(){var E=l(),y=s(Gl);if(y){if(p(),!s(Jl))return a("property missing ':'");var x=s(Zl),w=E({type:io,property:mt(y[0].replace(pt,vn)),value:x?mt(x[0].replace(pt,vn)):vn});return s(no),w}}function h(){var E=[];d(E);for(var y;y=g();)y!==!1&&(E.push(y),d(E));return E}return c(),h()};function mt(n){return n?n.replace(eo,vn):vn}var oo=lo;function Yt(n,t){var e=null;if(!n||typeof n!="string")return e;for(var r,i=oo(n),l=typeof t=="function",o,a,s=0,c=i.length;s<c;s++)r=i[s],o=r.property,a=r.value,l?t(o,a,r):a&&(e||(e={}),e[o]=a);return e}Se.exports=Yt;Se.exports.default=Yt;var ao=Se.exports;const uo=m.getDefaultExportFromCjs(ao),ye={}.hasOwnProperty,so=new Set(["table","thead","tbody","tfoot","tr"]);function Wt(n,t){const e=[];let r=-1,i;for(;++r<t.children.length;)i=t.children[r],i.type==="element"?e.push(co(n,i,r,t)):i.type==="text"?(t.type!=="element"||!so.has(t.tagName)||!Yl(i))&&e.push(i.value):i.type==="raw"&&!n.options.skipHtml&&e.push(i.value);return e}function co(n,t,e,r){const i=n.options,l=i.transformLinkUri===void 0?xt:i.transformLinkUri,o=n.schema,a=t.tagName,s={};let c=o,d;if(o.space==="html"&&a==="svg"&&(c=$l,n.schema=c),t.properties)for(d in t.properties)ye.call(t.properties,d)&&po(s,d,t.properties[d],n);(a==="ol"||a==="ul")&&n.listDepth++;const p=Wt(n,t);(a==="ol"||a==="ul")&&n.listDepth--,n.schema=o;const g=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},h=i.components&&ye.call(i.components,a)?i.components[a]:a,E=typeof h=="string"||h===On.Fragment;if(!Vl.isValidElementType(h))throw new TypeError(`Component for name \`${a}\` not defined or is not renderable`);if(s.key=e,a==="a"&&i.linkTarget&&(s.target=typeof i.linkTarget=="function"?i.linkTarget(String(s.href||""),t.children,typeof s.title=="string"?s.title:null):i.linkTarget),a==="a"&&l&&(s.href=l(String(s.href||""),t.children,typeof s.title=="string"?s.title:null)),!E&&a==="code"&&r.type==="element"&&r.tagName!=="pre"&&(s.inline=!0),!E&&(a==="h1"||a==="h2"||a==="h3"||a==="h4"||a==="h5"||a==="h6")&&(s.level=Number.parseInt(a.charAt(1),10)),a==="img"&&i.transformImageUri&&(s.src=i.transformImageUri(String(s.src||""),String(s.alt||""),typeof s.title=="string"?s.title:null)),!E&&a==="li"&&r.type==="element"){const y=fo(t);s.checked=y&&y.properties?!!y.properties.checked:null,s.index=ae(r,t),s.ordered=r.tagName==="ol"}return!E&&(a==="ol"||a==="ul")&&(s.ordered=a==="ol",s.depth=n.listDepth),(a==="td"||a==="th")&&(s.align&&(s.style||(s.style={}),s.style.textAlign=s.align,delete s.align),E||(s.isHeader=a==="th")),!E&&a==="tr"&&r.type==="element"&&(s.isHeader=r.tagName==="thead"),i.sourcePos&&(s["data-sourcepos"]=go(g)),!E&&i.rawSourcePos&&(s.sourcePosition=t.position),!E&&i.includeElementIndex&&(s.index=ae(r,t),s.siblingCount=ae(r)),E||(s.node=t),p.length>0?On.createElement(h,s,p):On.createElement(h,s)}function fo(n){let t=-1;for(;++t<n.children.length;){const e=n.children[t];if(e.type==="element"&&e.tagName==="input")return e}return null}function ae(n,t){let e=-1,r=0;for(;++e<n.children.length&&n.children[e]!==t;)n.children[e].type==="element"&&r++;return r}function po(n,t,e,r){const i=Fl(r.schema,t);let l=e;l==null||l!==l||(Array.isArray(l)&&(l=i.commaSeparated?Ql(l):Wl(l)),i.property==="style"&&typeof l=="string"&&(l=ho(l)),i.space&&i.property?n[ye.call(st,i.property)?st[i.property]:i.property]=l:i.attribute&&(n[i.attribute]=l))}function ho(n){const t={};try{uo(n,e)}catch{}return t;function e(r,i){const l=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;t[l.replace(/-([a-z])/g,mo)]=i}}function mo(n,t){return t.toUpperCase()}function go(n){return[n.start.line,":",n.start.column,"-",n.end.line,":",n.end.column].map(String).join("")}const gt={}.hasOwnProperty,yo="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Nn={plugins:{to:"remarkPlugins",id:"change-plugins-to-remarkplugins"},renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function Qt(n){for(const l in Nn)if(gt.call(Nn,l)&>.call(n,l)){const o=Nn[l];console.warn(`[react-markdown] Warning: please ${o.to?`use \`${o.to}\` instead of`:"remove"} \`${l}\` (see <${yo}#${o.id}> for more info)`),delete Nn[l]}const t=br().use(bl).use(n.remarkPlugins||[]).use(tr,{...n.remarkRehypeOptions,allowDangerousHtml:!0}).use(n.rehypePlugins||[]).use(Nl,n),e=new bt;typeof n.children=="string"?e.value=n.children:n.children!==void 0&&n.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${n.children}\`)`);const r=t.runSync(t.parse(e),e);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=On.createElement(On.Fragment,{},Wt({options:n,schema:Bl,listDepth:0},r));return n.className&&(i=On.createElement("div",{className:n.className},i)),i}Qt.propTypes={children:$.string,className:$.string,allowElement:$.func,allowedElements:$.arrayOf($.string),disallowedElements:$.arrayOf($.string),unwrapDisallowed:$.bool,remarkPlugins:$.arrayOf($.oneOfType([$.object,$.func,$.arrayOf($.oneOfType([$.bool,$.string,$.object,$.func,$.arrayOf($.any)]))])),rehypePlugins:$.arrayOf($.oneOfType([$.object,$.func,$.arrayOf($.oneOfType([$.bool,$.string,$.object,$.func,$.arrayOf($.any)]))])),sourcePos:$.bool,rawSourcePos:$.bool,skipHtml:$.bool,includeElementIndex:$.bool,transformLinkUri:$.oneOfType([$.func,$.bool]),linkTarget:$.oneOfType([$.func,$.string]),transformImageUri:$.func,components:$.object};exports.default=Qt;exports.uriTransformer=xt;
|