@yext/visual-editor 0.0.43 → 0.0.45

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.
@@ -1,13 +1,13 @@
1
- import { r as p, f as l, o as w, a as k, s as S } from "./index-Cs0QW4io.js";
2
- function T() {
3
- return S().name !== "browser" || window.hasOwnProperty("debuggerInitialized") ? null : (window.debuggerInitialized = !0, k.createPortal(/* @__PURE__ */ l.jsx(D, {}), document.body));
1
+ import { r as b, n as l, e as w, a as k, l as S } from "./index-BAnL5AMG.js";
2
+ function P() {
3
+ return S().name !== "browser" || window.hasOwnProperty("debuggerInitialized") ? null : (window.debuggerInitialized = !0, k.createPortal(/* @__PURE__ */ l.jsx($, {}), document.body));
4
4
  }
5
5
  const Y = (e, s) => {
6
- const n = e.dataset.yaAction, t = e.dataset.yaScopeoverride, o = e.dataset.yaEventname, c = t || s;
6
+ const n = e.dataset.yaAction, t = e.dataset.yaScopeoverride, o = e.dataset.yaEventname, i = t || s;
7
7
  return {
8
8
  action: n,
9
- originalEventName: c ? `${c}_${o}` : o,
10
- scope: c
9
+ originalEventName: i ? `${i}_${o}` : o,
10
+ scope: i
11
11
  };
12
12
  }, C = (e, s) => {
13
13
  const n = [];
@@ -15,14 +15,14 @@ const Y = (e, s) => {
15
15
  for (; t != null && t.parentElement; )
16
16
  t = t.parentElement.closest(s), t && n.push(t);
17
17
  return n;
18
- }, b = {}, j = "YA_NO_SCOPE", N = (e, s, n, t) => {
19
- b.hasOwnProperty(e) ? b[e].events.map((o) => o.el).includes(t) || (b[e].events = [
20
- ...b[e].events,
18
+ }, h = {}, N = "YA_NO_SCOPE", j = (e, s, n, t) => {
19
+ h.hasOwnProperty(e) ? h[e].events.map((o) => o.el).includes(t) || (h[e].events = [
20
+ ...h[e].events,
21
21
  {
22
22
  eventData: s,
23
23
  el: t
24
24
  }
25
- ]) : b[e] = {
25
+ ]) : h[e] = {
26
26
  scopeEl: n || t,
27
27
  // overidden scopes still need an element
28
28
  events: [
@@ -33,39 +33,60 @@ const Y = (e, s) => {
33
33
  ]
34
34
  };
35
35
  };
36
- function D() {
37
- const [e, s] = p.useState(), [n, t] = p.useState([]), [o, c] = p.useState(!1), a = (i) => {
38
- s(e === i ? void 0 : i);
36
+ function $() {
37
+ const [e, s] = b.useState(), [n, t] = b.useState([]), [o, i] = b.useState(!1), a = (r) => {
38
+ s(e === r ? void 0 : r);
39
39
  };
40
- return p.useEffect(() => (document.documentElement.classList.add("xYextDebug"), document.querySelectorAll(
41
- "[data-ya-eventname]"
42
- ).forEach((i, g) => {
43
- const d = i.closest("[data-ya-scope]"), r = d?.dataset.yaScope, u = Y(i, r);
44
- i.addEventListener("mouseenter", () => {
45
- t([
46
- {
47
- elem: i,
48
- key: `${u.originalEventName}_${g}`,
49
- action: u.action,
50
- originalEventName: u.originalEventName,
51
- scope: u.scope
52
- }
53
- ]);
54
- }), i.addEventListener("mouseleave", () => {
55
- t([]);
56
- });
57
- const v = i.dataset.yaScopeoverride;
58
- v ? N(v, u, d, i) : [
59
- r,
60
- ...C(i, "[data-ya-scope]").map(
61
- (m) => m.dataset.yaScope
62
- )
63
- ].forEach((m) => {
64
- N(m || j, u, d, i);
65
- });
66
- }), c(!0), () => {
67
- document.documentElement.classList.remove("xYextDebug");
68
- }), []), o ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
40
+ return b.useEffect(() => {
41
+ let r = null;
42
+ const d = () => {
43
+ r && r.abort(), r = new AbortController();
44
+ const c = r.signal;
45
+ document.documentElement.classList.add("xYextDebug"), document.querySelectorAll(
46
+ "[data-ya-eventname]"
47
+ ).forEach((u, y) => {
48
+ const p = u.closest("[data-ya-scope]"), x = p?.dataset.yaScope, m = Y(u, x);
49
+ u.addEventListener(
50
+ "mouseenter",
51
+ () => {
52
+ t([
53
+ {
54
+ elem: u,
55
+ key: `${m.originalEventName}_${y}`,
56
+ action: m.action,
57
+ originalEventName: m.originalEventName,
58
+ scope: m.scope
59
+ }
60
+ ]);
61
+ },
62
+ { signal: c }
63
+ ), u.addEventListener(
64
+ "mouseleave",
65
+ () => {
66
+ t([]);
67
+ },
68
+ { signal: c }
69
+ );
70
+ const f = u.dataset.yaScopeoverride;
71
+ f ? j(f, m, p, u) : [
72
+ x,
73
+ ...C(u, "[data-ya-scope]").map(
74
+ (v) => v.dataset.yaScope
75
+ )
76
+ ].forEach((v) => {
77
+ j(v || N, m, p, u);
78
+ });
79
+ }), i(!0);
80
+ };
81
+ d();
82
+ const g = new MutationObserver(d);
83
+ return g.observe(document, {
84
+ childList: !0,
85
+ subtree: !0
86
+ }), () => {
87
+ document.documentElement.classList.remove("xYextDebug"), g.disconnect(), r?.abort();
88
+ };
89
+ }, []), o ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
69
90
  /* @__PURE__ */ l.jsxs("div", { className: "analytics-debugger", children: [
70
91
  /* @__PURE__ */ l.jsxs("div", { className: "analytics-debugger-toggles", children: [
71
92
  /* @__PURE__ */ l.jsx(
@@ -89,14 +110,14 @@ function D() {
89
110
  }
90
111
  )
91
112
  ] }),
92
- e && /* @__PURE__ */ l.jsx("div", { className: "analytics-debugger-tabs", children: e === "Events" ? /* @__PURE__ */ l.jsx(R, { data: b, setTooltips: t }) : /* @__PURE__ */ l.jsx(O, { data: b, setTooltips: t }) })
113
+ e && /* @__PURE__ */ l.jsx("div", { className: "analytics-debugger-tabs", children: e === "Events" ? /* @__PURE__ */ l.jsx(O, { data: h, setTooltips: t }) : /* @__PURE__ */ l.jsx(R, { data: h, setTooltips: t }) })
93
114
  ] }),
94
115
  /* @__PURE__ */ l.jsx(B, { tooltips: n })
95
116
  ] }) : null;
96
117
  }
97
- const $ = () => {
118
+ const D = () => {
98
119
  const e = {};
99
- return Object.values(b).forEach((s) => {
120
+ return Object.values(h).forEach((s) => {
100
121
  s.events.forEach((n) => {
101
122
  const { originalEventName: t } = n.eventData;
102
123
  e[t] || (e[t] = []), !e[t].find(
@@ -105,80 +126,80 @@ const $ = () => {
105
126
  });
106
127
  }), e;
107
128
  };
108
- function R(e) {
109
- const { setTooltips: s } = e, [n, t] = p.useState([]), [o, c] = p.useState(""), a = (i, g) => {
129
+ function O(e) {
130
+ const { setTooltips: s } = e, [n, t] = b.useState([]), [o, i] = b.useState(""), a = (r, d) => {
110
131
  n.forEach(
111
- (r) => r.classList.remove("analytics-event-highlight")
132
+ (c) => c.classList.remove("analytics-event-highlight")
112
133
  );
113
- const d = i.map((r) => (r.el.scrollIntoView({ behavior: "smooth", block: "nearest" }), r.el.classList.add("analytics-event-highlight"), r.el));
114
- t(d), c(g), s(
115
- i.map((r, u) => ({
116
- elem: r.el,
117
- key: `${r.eventData.originalEventName}_${u}`,
118
- action: r.eventData.action,
119
- originalEventName: r.eventData.originalEventName,
120
- scope: r.eventData.scope
134
+ const g = r.map((c) => (c.el.scrollIntoView({ behavior: "smooth", block: "nearest" }), c.el.classList.add("analytics-event-highlight"), c.el));
135
+ t(g), i(d), s(
136
+ r.map((c, u) => ({
137
+ elem: c.el,
138
+ key: `${c.eventData.originalEventName}_${u}`,
139
+ action: c.eventData.action,
140
+ originalEventName: c.eventData.originalEventName,
141
+ scope: c.eventData.scope
121
142
  }))
122
143
  );
123
144
  };
124
145
  return /* @__PURE__ */ l.jsxs("div", { className: "analytics-debugger-tab", children: [
125
146
  /* @__PURE__ */ l.jsx("h2", { className: "analytics-debugger-tab-title", children: "Event Names" }),
126
- /* @__PURE__ */ l.jsx("ul", { className: "analytics-debugger-list", children: Object.entries($()).map(
127
- ([i, g], d) => {
128
- const r = `${i}_${d}`;
147
+ /* @__PURE__ */ l.jsx("ul", { className: "analytics-debugger-list", children: Object.entries(D()).map(
148
+ ([r, d], g) => {
149
+ const c = `${r}_${g}`;
129
150
  return /* @__PURE__ */ l.jsx("li", { className: "analytics-debugger-listItem", children: /* @__PURE__ */ l.jsx(
130
151
  "button",
131
152
  {
132
153
  className: w("analytics-debugger-button", {
133
- "is-active": r === o
154
+ "is-active": c === o
134
155
  }),
135
- onClick: () => a(g, r),
136
- children: i
156
+ onClick: () => a(d, c),
157
+ children: r
137
158
  }
138
- ) }, r);
159
+ ) }, c);
139
160
  }
140
161
  ) })
141
162
  ] });
142
163
  }
143
- function O(e) {
144
- const { data: s, setTooltips: n } = e, [t, o] = p.useState(""), c = (a) => {
145
- const i = s[a];
146
- i.scopeEl && (i.scopeEl.scrollIntoView({
164
+ function R(e) {
165
+ const { data: s, setTooltips: n } = e, [t, o] = b.useState(""), i = (a) => {
166
+ const r = s[a];
167
+ r.scopeEl && (r.scopeEl.scrollIntoView({
147
168
  behavior: "smooth",
148
169
  block: "nearest"
149
170
  }), o(a), n(
150
- i.events.map((g, d) => {
151
- const r = g.eventData;
171
+ r.events.map((d, g) => {
172
+ const c = d.eventData;
152
173
  return {
153
- elem: g.el,
154
- key: `${r.originalEventName}_${d}`,
155
- action: r.action,
156
- originalEventName: r.originalEventName,
157
- scope: r.scope
174
+ elem: d.el,
175
+ key: `${c.originalEventName}_${g}`,
176
+ action: c.action,
177
+ originalEventName: c.originalEventName,
178
+ scope: c.scope
158
179
  };
159
180
  })
160
181
  ));
161
182
  };
162
183
  return /* @__PURE__ */ l.jsxs("div", { className: "analytics-debugger-tab", children: [
163
184
  /* @__PURE__ */ l.jsx("h2", { className: "analytics-debugger-tab-title", children: "Scope Names" }),
164
- /* @__PURE__ */ l.jsx("ul", { className: "analytics-debugger-list", children: Object.keys(s).map((a, i) => {
165
- if (a !== j)
185
+ /* @__PURE__ */ l.jsx("ul", { className: "analytics-debugger-list", children: Object.keys(s).map((a, r) => {
186
+ if (a !== N)
166
187
  return /* @__PURE__ */ l.jsx("li", { className: "analytics-debugger-listItem", children: /* @__PURE__ */ l.jsx(
167
188
  "button",
168
189
  {
169
190
  className: w("analytics-debugger-button", {
170
191
  "is-active": a === t
171
192
  }),
172
- onClick: () => c(a),
193
+ onClick: () => i(a),
173
194
  children: a
174
195
  }
175
- ) }, a + i);
196
+ ) }, a + r);
176
197
  }) })
177
198
  ] });
178
199
  }
179
200
  function B(e) {
180
- const s = p.useRef({});
181
- return p.useEffect(() => {
201
+ const s = b.useRef({});
202
+ return b.useEffect(() => {
182
203
  if (s.current)
183
204
  for (const n of Object.values(s.current)) {
184
205
  const t = Object.values(s.current).map((o) => o.el).filter((o) => o !== n.el);
@@ -222,72 +243,72 @@ function I(e, s) {
222
243
  e.el,
223
244
  n
224
245
  );
225
- if (e.el.style.inset = `${t.top} auto auto ${t.left}`, !!L(
246
+ if (e.el.style.inset = `${t.top} auto auto ${t.left}`, !!_(
226
247
  e.el.getBoundingClientRect().left,
227
248
  e.el.getBoundingClientRect().top + window.scrollY,
228
249
  e.el.getBoundingClientRect().right,
229
250
  e.el.getBoundingClientRect().bottom + window.scrollY
230
251
  )) continue;
231
252
  let o = !0;
232
- for (let c = 0; c < s.length; c++) {
233
- const a = s[c];
234
- _(e.el, a) && (o = !1);
253
+ for (let i = 0; i < s.length; i++) {
254
+ const a = s[i];
255
+ L(e.el, a) && (o = !1);
235
256
  }
236
257
  if (o) break;
237
258
  }
238
259
  }
239
- function _(e, s) {
240
- const n = e.getBoundingClientRect().top + window.scrollY, t = e.getBoundingClientRect().left, o = n + e.clientHeight, c = t + e.clientWidth, a = s.getBoundingClientRect().top + window.scrollY, i = s.getBoundingClientRect().left, g = a + s.clientHeight, d = i + s.clientWidth, r = (u, v, m, h, x, f, y, E) => m <= x && x <= y && h <= f && f <= E || m <= u && u <= y && h <= v && v <= E || m <= u && u <= y && h <= f && f <= E || m <= x && x <= y && h <= v && v <= E;
241
- return r(t, n, i, a, c, o, d, g) || r(i, a, t, n, d, g, c, o);
260
+ function L(e, s) {
261
+ const n = e.getBoundingClientRect().top + window.scrollY, t = e.getBoundingClientRect().left, o = n + e.clientHeight, i = t + e.clientWidth, a = s.getBoundingClientRect().top + window.scrollY, r = s.getBoundingClientRect().left, d = a + s.clientHeight, g = r + s.clientWidth, c = (u, y, p, x, m, f, v, E) => p <= m && m <= v && x <= f && f <= E || p <= u && u <= v && x <= y && y <= E || p <= u && u <= v && x <= f && f <= E || p <= m && m <= v && x <= y && y <= E;
262
+ return c(t, n, r, a, i, o, g, d) || c(r, a, t, n, g, d, i, o);
242
263
  }
243
- function L(e, s, n, t) {
264
+ function _(e, s, n, t) {
244
265
  return e < 0 || n > window.innerWidth || s < 0 || t > document.documentElement.scrollHeight;
245
266
  }
246
267
  function A(e, s, n) {
247
268
  const t = s.clientHeight, o = s.clientWidth;
248
- let c, a;
269
+ let i, a;
249
270
  switch (n) {
250
271
  case 0: {
251
- a = window.scrollY + e.top - t + "px", c = e.left - o + "px";
272
+ a = window.scrollY + e.top - t + "px", i = e.left - o + "px";
252
273
  break;
253
274
  }
254
275
  case 1: {
255
- a = window.scrollY + e.top - t + "px", c = e.left + "px";
276
+ a = window.scrollY + e.top - t + "px", i = e.left + "px";
256
277
  break;
257
278
  }
258
279
  case 2: {
259
- a = window.scrollY + e.top - t + "px", c = e.right + "px";
280
+ a = window.scrollY + e.top - t + "px", i = e.right + "px";
260
281
  break;
261
282
  }
262
283
  case 3: {
263
- a = window.scrollY + e.top - t + "px", c = e.right - o + "px";
284
+ a = window.scrollY + e.top - t + "px", i = e.right - o + "px";
264
285
  break;
265
286
  }
266
287
  case 4: {
267
- a = window.scrollY + e.bottom + "px", c = e.left - o + "px";
288
+ a = window.scrollY + e.bottom + "px", i = e.left - o + "px";
268
289
  break;
269
290
  }
270
291
  case 5: {
271
- a = window.scrollY + e.bottom + "px", c = e.left + "px";
292
+ a = window.scrollY + e.bottom + "px", i = e.left + "px";
272
293
  break;
273
294
  }
274
295
  case 6: {
275
- a = window.scrollY + e.bottom + "px", c = e.right - o + "px";
296
+ a = window.scrollY + e.bottom + "px", i = e.right - o + "px";
276
297
  break;
277
298
  }
278
299
  case 7: {
279
- a = window.scrollY + e.bottom + "px", c = e.right + "px";
300
+ a = window.scrollY + e.bottom + "px", i = e.right + "px";
280
301
  break;
281
302
  }
282
303
  default:
283
- a = 0, c = 0;
304
+ a = 0, i = 0;
284
305
  }
285
306
  return {
286
307
  top: a,
287
- left: c
308
+ left: i
288
309
  };
289
310
  }
290
311
  export {
291
- D as AnalyticsDebuggerInternal,
292
- T as default
312
+ $ as AnalyticsDebuggerInternal,
313
+ P as default
293
314
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-DvewYwma.cjs");function N(){return n.la().name!=="browser"||window.hasOwnProperty("debuggerInitialized")?null:(window.debuggerInitialized=!0,n.reactDomExports.createPortal(n.nt.jsx(j,{}),document.body))}const k=(e,a)=>{const s=e.dataset.yaAction,t=e.dataset.yaScopeoverride,o=e.dataset.yaEventname,i=t||a;return{action:s,originalEventName:i?`${i}_${o}`:o,scope:i}},S=(e,a)=>{const s=[];let t=e;for(;t!=null&&t.parentElement;)t=t.parentElement.closest(a),t&&s.push(t);return s},v={},w="YA_NO_SCOPE",y=(e,a,s,t)=>{v.hasOwnProperty(e)?v[e].events.map(o=>o.el).includes(t)||(v[e].events=[...v[e].events,{eventData:a,el:t}]):v[e]={scopeEl:s||t,events:[{eventData:a,el:t}]}};function j(){const[e,a]=n.reactExports.useState(),[s,t]=n.reactExports.useState([]),[o,i]=n.reactExports.useState(!1),l=r=>{a(e===r?void 0:r)};return n.reactExports.useEffect(()=>{let r=null;const d=()=>{r&&r.abort(),r=new AbortController;const c=r.signal;document.documentElement.classList.add("xYextDebug"),document.querySelectorAll("[data-ya-eventname]").forEach((u,E)=>{const m=u.closest("[data-ya-scope]"),h=m?.dataset.yaScope,p=k(u,h);u.addEventListener("mouseenter",()=>{t([{elem:u,key:`${p.originalEventName}_${E}`,action:p.action,originalEventName:p.originalEventName,scope:p.scope}])},{signal:c}),u.addEventListener("mouseleave",()=>{t([])},{signal:c});const x=u.dataset.yaScopeoverride;x?y(x,p,m,u):[h,...S(u,"[data-ya-scope]").map(b=>b.dataset.yaScope)].forEach(b=>{y(b||w,p,m,u)})}),i(!0)};d();const g=new MutationObserver(d);return g.observe(document,{childList:!0,subtree:!0}),()=>{document.documentElement.classList.remove("xYextDebug"),g.disconnect(),r?.abort()}},[]),o?n.nt.jsxs(n.nt.Fragment,{children:[n.nt.jsxs("div",{className:"analytics-debugger",children:[n.nt.jsxs("div",{className:"analytics-debugger-toggles",children:[n.nt.jsx("button",{className:n.el("analytics-debugger-toggle",{"is-active":e==="Events"}),onClick:()=>l("Events"),children:"Events"}),n.nt.jsx("button",{className:n.el("analytics-debugger-toggle",{"is-active":e==="Scopes"}),onClick:()=>l("Scopes"),children:"Scopes"})]}),e&&n.nt.jsx("div",{className:"analytics-debugger-tabs",children:e==="Events"?n.nt.jsx(C,{data:v,setTooltips:t}):n.nt.jsx($,{data:v,setTooltips:t})})]}),n.nt.jsx(D,{tooltips:s})]}):null}const Y=()=>{const e={};return Object.values(v).forEach(a=>{a.events.forEach(s=>{const{originalEventName:t}=s.eventData;e[t]||(e[t]=[]),!e[t].find(o=>o.el===s.el)&&e[t].push(s)})}),e};function C(e){const{setTooltips:a}=e,[s,t]=n.reactExports.useState([]),[o,i]=n.reactExports.useState(""),l=(r,d)=>{s.forEach(c=>c.classList.remove("analytics-event-highlight"));const g=r.map(c=>(c.el.scrollIntoView({behavior:"smooth",block:"nearest"}),c.el.classList.add("analytics-event-highlight"),c.el));t(g),i(d),a(r.map((c,u)=>({elem:c.el,key:`${c.eventData.originalEventName}_${u}`,action:c.eventData.action,originalEventName:c.eventData.originalEventName,scope:c.eventData.scope})))};return n.nt.jsxs("div",{className:"analytics-debugger-tab",children:[n.nt.jsx("h2",{className:"analytics-debugger-tab-title",children:"Event Names"}),n.nt.jsx("ul",{className:"analytics-debugger-list",children:Object.entries(Y()).map(([r,d],g)=>{const c=`${r}_${g}`;return n.nt.jsx("li",{className:"analytics-debugger-listItem",children:n.nt.jsx("button",{className:n.el("analytics-debugger-button",{"is-active":c===o}),onClick:()=>l(d,c),children:r})},c)})})]})}function $(e){const{data:a,setTooltips:s}=e,[t,o]=n.reactExports.useState(""),i=l=>{const r=a[l];r.scopeEl&&(r.scopeEl.scrollIntoView({behavior:"smooth",block:"nearest"}),o(l),s(r.events.map((d,g)=>{const c=d.eventData;return{elem:d.el,key:`${c.originalEventName}_${g}`,action:c.action,originalEventName:c.originalEventName,scope:c.scope}})))};return n.nt.jsxs("div",{className:"analytics-debugger-tab",children:[n.nt.jsx("h2",{className:"analytics-debugger-tab-title",children:"Scope Names"}),n.nt.jsx("ul",{className:"analytics-debugger-list",children:Object.keys(a).map((l,r)=>{if(l!==w)return n.nt.jsx("li",{className:"analytics-debugger-listItem",children:n.nt.jsx("button",{className:n.el("analytics-debugger-button",{"is-active":l===t}),onClick:()=>i(l),children:l})},l+r)})})]})}function D(e){const a=n.reactExports.useRef({});return n.reactExports.useEffect(()=>{if(a.current)for(const s of Object.values(a.current)){const t=Object.values(a.current).map(o=>o.el).filter(o=>o!==s.el);O(s,t),s.el.style.visibility="visible"}},[e.tooltips]),n.nt.jsx(n.nt.Fragment,{children:e.tooltips.map(s=>n.nt.jsxs("div",{style:{visibility:"hidden"},className:"analytics-debugger-tooltip",ref:t=>{t?a.current[s.key]={el:t,tooltip:s}:delete a.current[s.key]},children:[n.nt.jsxs("span",{children:["Action: ",s.action]}),n.nt.jsx("br",{}),n.nt.jsxs("span",{children:["Scope: ",s.scope]}),n.nt.jsx("br",{}),n.nt.jsxs("span",{children:["Original Event Name: ",s.originalEventName]})]},s.key))})}function O(e,a){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}`,!!B(e.el.getBoundingClientRect().left,e.el.getBoundingClientRect().top+window.scrollY,e.el.getBoundingClientRect().right,e.el.getBoundingClientRect().bottom+window.scrollY))continue;let o=!0;for(let i=0;i<a.length;i++){const l=a[i];R(e.el,l)&&(o=!1)}if(o)break}}function R(e,a){const s=e.getBoundingClientRect().top+window.scrollY,t=e.getBoundingClientRect().left,o=s+e.clientHeight,i=t+e.clientWidth,l=a.getBoundingClientRect().top+window.scrollY,r=a.getBoundingClientRect().left,d=l+a.clientHeight,g=r+a.clientWidth,c=(u,E,m,h,p,x,b,f)=>m<=p&&p<=b&&h<=x&&x<=f||m<=u&&u<=b&&h<=E&&E<=f||m<=u&&u<=b&&h<=x&&x<=f||m<=p&&p<=b&&h<=E&&E<=f;return c(t,s,r,l,i,o,g,d)||c(r,l,t,s,g,d,i,o)}function B(e,a,s,t){return e<0||s>window.innerWidth||a<0||t>document.documentElement.scrollHeight}function I(e,a,s){const t=a.clientHeight,o=a.clientWidth;let i,l;switch(s){case 0:{l=window.scrollY+e.top-t+"px",i=e.left-o+"px";break}case 1:{l=window.scrollY+e.top-t+"px",i=e.left+"px";break}case 2:{l=window.scrollY+e.top-t+"px",i=e.right+"px";break}case 3:{l=window.scrollY+e.top-t+"px",i=e.right-o+"px";break}case 4:{l=window.scrollY+e.bottom+"px",i=e.left-o+"px";break}case 5:{l=window.scrollY+e.bottom+"px",i=e.left+"px";break}case 6:{l=window.scrollY+e.bottom+"px",i=e.right-o+"px";break}case 7:{l=window.scrollY+e.bottom+"px",i=e.right+"px";break}default:l=0,i=0}return{top:l,left:i}}exports.AnalyticsDebuggerInternal=j;exports.default=N;