@convokit/widget 0.0.7 → 0.0.8
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.
|
@@ -31,7 +31,7 @@ function vi(t) {
|
|
|
31
31
|
let e;
|
|
32
32
|
return () => (e === void 0 && (e = t()), e);
|
|
33
33
|
}
|
|
34
|
-
const ut = /* @__NO_SIDE_EFFECTS__ */ (t) => t, $a = (t, e) => (n) => e(t(n)), Ce = (...t) => t.reduce($a),
|
|
34
|
+
const ut = /* @__NO_SIDE_EFFECTS__ */ (t) => t, $a = (t, e) => (n) => e(t(n)), Ce = (...t) => t.reduce($a), xe = /* @__NO_SIDE_EFFECTS__ */ (t, e, n) => {
|
|
35
35
|
const i = e - t;
|
|
36
36
|
return i === 0 ? 1 : (n - t) / i;
|
|
37
37
|
};
|
|
@@ -183,7 +183,7 @@ function ur(t, e) {
|
|
|
183
183
|
o[Ue[E]].cancel(S);
|
|
184
184
|
}, state: s, steps: o };
|
|
185
185
|
}
|
|
186
|
-
const { schedule: I, cancel: It, state: q, steps:
|
|
186
|
+
const { schedule: I, cancel: It, state: q, steps: bn } = /* @__PURE__ */ ur(typeof requestAnimationFrame < "u" ? requestAnimationFrame : ut, !0);
|
|
187
187
|
let Ge;
|
|
188
188
|
function il() {
|
|
189
189
|
Ge = void 0;
|
|
@@ -193,7 +193,7 @@ const nt = {
|
|
|
193
193
|
set: (t) => {
|
|
194
194
|
Ge = t, queueMicrotask(il);
|
|
195
195
|
}
|
|
196
|
-
}, fr = (t) => (e) => typeof e == "string" && e.startsWith(t), hr = /* @__PURE__ */ fr("--"), sl = /* @__PURE__ */ fr("var(--"),
|
|
196
|
+
}, fr = (t) => (e) => typeof e == "string" && e.startsWith(t), hr = /* @__PURE__ */ fr("--"), sl = /* @__PURE__ */ fr("var(--"), bi = (t) => sl(t) ? ol.test(t.split("/*")[0].trim()) : !1, ol = /var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;
|
|
197
197
|
function Ts(t) {
|
|
198
198
|
return typeof t != "string" ? !1 : t.split("/*")[0].includes("var(--");
|
|
199
199
|
}
|
|
@@ -207,27 +207,27 @@ const ae = {
|
|
|
207
207
|
}, je = {
|
|
208
208
|
...ae,
|
|
209
209
|
default: 1
|
|
210
|
-
}, we = (t) => Math.round(t * 1e5) / 1e5,
|
|
210
|
+
}, we = (t) => Math.round(t * 1e5) / 1e5, xi = /-?(?:\d+(?:\.\d+)?|\.\d+)/gu;
|
|
211
211
|
function rl(t) {
|
|
212
212
|
return t == null;
|
|
213
213
|
}
|
|
214
214
|
const al = /^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu, Ei = (t, e) => (n) => !!(typeof n == "string" && al.test(n) && n.startsWith(t) || e && !rl(n) && Object.prototype.hasOwnProperty.call(n, e)), dr = (t, e, n) => (i) => {
|
|
215
215
|
if (typeof i != "string")
|
|
216
216
|
return i;
|
|
217
|
-
const [s, r, o, a] = i.match(
|
|
217
|
+
const [s, r, o, a] = i.match(xi);
|
|
218
218
|
return {
|
|
219
219
|
[t]: parseFloat(s),
|
|
220
220
|
[e]: parseFloat(r),
|
|
221
221
|
[n]: parseFloat(o),
|
|
222
222
|
alpha: a !== void 0 ? parseFloat(a) : 1
|
|
223
223
|
};
|
|
224
|
-
}, ll = (t) => wt(0, 255, t),
|
|
224
|
+
}, ll = (t) => wt(0, 255, t), xn = {
|
|
225
225
|
...ae,
|
|
226
226
|
transform: (t) => Math.round(ll(t))
|
|
227
227
|
}, jt = {
|
|
228
228
|
test: /* @__PURE__ */ Ei("rgb", "red"),
|
|
229
229
|
parse: /* @__PURE__ */ dr("red", "green", "blue"),
|
|
230
|
-
transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" +
|
|
230
|
+
transform: ({ red: t, green: e, blue: n, alpha: i = 1 }) => "rgba(" + xn.transform(t) + ", " + xn.transform(e) + ", " + xn.transform(n) + ", " + we(Ee.transform(i)) + ")"
|
|
231
231
|
};
|
|
232
232
|
function cl(t) {
|
|
233
233
|
let e = "", n = "", i = "", s = "";
|
|
@@ -246,7 +246,7 @@ const Gn = {
|
|
|
246
246
|
test: (e) => typeof e == "string" && e.endsWith(t) && e.split(" ").length === 1,
|
|
247
247
|
parse: parseFloat,
|
|
248
248
|
transform: (e) => `${e}${t}`
|
|
249
|
-
}), Lt = /* @__PURE__ */ Le("deg"), St = /* @__PURE__ */ Le("%"),
|
|
249
|
+
}), Lt = /* @__PURE__ */ Le("deg"), St = /* @__PURE__ */ Le("%"), b = /* @__PURE__ */ Le("px"), ul = /* @__PURE__ */ Le("vh"), fl = /* @__PURE__ */ Le("vw"), vs = {
|
|
250
250
|
...St,
|
|
251
251
|
parse: (t) => St.parse(t) / 100,
|
|
252
252
|
transform: (t) => St.transform(t * 100)
|
|
@@ -265,7 +265,7 @@ const Gn = {
|
|
|
265
265
|
}, hl = /(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;
|
|
266
266
|
function dl(t) {
|
|
267
267
|
var e, n;
|
|
268
|
-
return isNaN(t) && typeof t == "string" && (((e = t.match(
|
|
268
|
+
return isNaN(t) && typeof t == "string" && (((e = t.match(xi)) == null ? void 0 : e.length) || 0) + (((n = t.match(hl)) == null ? void 0 : n.length) || 0) > 0;
|
|
269
269
|
}
|
|
270
270
|
const mr = "number", pr = "color", ml = "var", pl = "var(", Ss = "${}", gl = /var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;
|
|
271
271
|
function Pe(t) {
|
|
@@ -347,11 +347,11 @@ const As = (t, e) => {
|
|
|
347
347
|
function Al(t, e) {
|
|
348
348
|
return $n.has(t) ? (n) => n <= 0 ? t : e : (n) => n >= 1 ? e : t;
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function bl(t, e) {
|
|
351
351
|
return (n) => N(t, e, n);
|
|
352
352
|
}
|
|
353
353
|
function Pi(t) {
|
|
354
|
-
return typeof t == "number" ?
|
|
354
|
+
return typeof t == "number" ? bl : typeof t == "string" ? bi(t) ? Ze : W.test(t) ? As : Pl : Array.isArray(t) ? Tr : typeof t == "object" ? W.test(t) ? As : xl : Ze;
|
|
355
355
|
}
|
|
356
356
|
function Tr(t, e) {
|
|
357
357
|
const n = [...t], i = n.length, s = t.map((r, o) => Pi(r)(r, e[o]));
|
|
@@ -361,7 +361,7 @@ function Tr(t, e) {
|
|
|
361
361
|
return n;
|
|
362
362
|
};
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function xl(t, e) {
|
|
365
365
|
const n = { ...t, ...e }, i = {};
|
|
366
366
|
for (const s in n)
|
|
367
367
|
t[s] !== void 0 && e[s] !== void 0 && (i[s] = Pi(t[s])(t[s], e[s]));
|
|
@@ -498,7 +498,7 @@ function Yn(t, e) {
|
|
|
498
498
|
return t * Math.sqrt(1 - e * e);
|
|
499
499
|
}
|
|
500
500
|
const Il = ["duration", "bounce"], Vl = ["stiffness", "damping", "mass"];
|
|
501
|
-
function
|
|
501
|
+
function bs(t, e) {
|
|
502
502
|
return e.some((n) => t[n] !== void 0);
|
|
503
503
|
}
|
|
504
504
|
function kl(t) {
|
|
@@ -510,7 +510,7 @@ function kl(t) {
|
|
|
510
510
|
isResolvedFromDuration: !1,
|
|
511
511
|
...t
|
|
512
512
|
};
|
|
513
|
-
if (!
|
|
513
|
+
if (!bs(t, Vl) && bs(t, Il))
|
|
514
514
|
if (t.visualDuration) {
|
|
515
515
|
const n = t.visualDuration, i = 2 * Math.PI / (n * 1.2), s = i * i, r = 2 * wt(0.05, 1, 1 - (t.bounce || 0)) * Math.sqrt(s);
|
|
516
516
|
e = {
|
|
@@ -643,7 +643,7 @@ function Nl(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
|
643
643
|
if (l > 1)
|
|
644
644
|
for (; f < t.length - 2 && !(c < t[f + 1]); f++)
|
|
645
645
|
;
|
|
646
|
-
const d = /* @__PURE__ */
|
|
646
|
+
const d = /* @__PURE__ */ xe(t[f], t[f + 1], c);
|
|
647
647
|
return a[f](d);
|
|
648
648
|
};
|
|
649
649
|
return n ? (c) => u(wt(t[0], t[r - 1], c)) : u;
|
|
@@ -651,7 +651,7 @@ function Nl(t, e, { clamp: n = !0, ease: i, mixer: s } = {}) {
|
|
|
651
651
|
function Fl(t, e) {
|
|
652
652
|
const n = t[t.length - 1];
|
|
653
653
|
for (let i = 1; i <= e; i++) {
|
|
654
|
-
const s = /* @__PURE__ */
|
|
654
|
+
const s = /* @__PURE__ */ xe(0, e, i);
|
|
655
655
|
t.push(N(n, 1, s));
|
|
656
656
|
}
|
|
657
657
|
}
|
|
@@ -858,7 +858,7 @@ const Wt = (t) => t * 180 / Math.PI, qn = (t) => {
|
|
|
858
858
|
skewX: (t) => Wt(Math.atan(t[1])),
|
|
859
859
|
skewY: (t) => Wt(Math.atan(t[2])),
|
|
860
860
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[2])) / 2
|
|
861
|
-
}, Zn = (t) => (t = t % 360, t < 0 && (t += 360), t),
|
|
861
|
+
}, Zn = (t) => (t = t % 360, t < 0 && (t += 360), t), xs = qn, Es = (t) => Math.sqrt(t[0] * t[0] + t[1] * t[1]), Ps = (t) => Math.sqrt(t[4] * t[4] + t[5] * t[5]), $l = {
|
|
862
862
|
x: 12,
|
|
863
863
|
y: 13,
|
|
864
864
|
z: 14,
|
|
@@ -870,8 +870,8 @@ const Wt = (t) => t * 180 / Math.PI, qn = (t) => {
|
|
|
870
870
|
scale: (t) => (Es(t) + Ps(t)) / 2,
|
|
871
871
|
rotateX: (t) => Zn(Wt(Math.atan2(t[6], t[5]))),
|
|
872
872
|
rotateY: (t) => Zn(Wt(Math.atan2(-t[2], t[0]))),
|
|
873
|
-
rotateZ:
|
|
874
|
-
rotate:
|
|
873
|
+
rotateZ: xs,
|
|
874
|
+
rotate: xs,
|
|
875
875
|
skewX: (t) => Wt(Math.atan(t[4])),
|
|
876
876
|
skewY: (t) => Wt(Math.atan(t[1])),
|
|
877
877
|
skew: (t) => (Math.abs(t[1]) + Math.abs(t[4])) / 2
|
|
@@ -920,7 +920,7 @@ const le = [
|
|
|
920
920
|
"skew",
|
|
921
921
|
"skewX",
|
|
922
922
|
"skewY"
|
|
923
|
-
], ce = new Set(le), Ds = (t) => t === ae || t ===
|
|
923
|
+
], ce = new Set(le), Ds = (t) => t === ae || t === b, ql = /* @__PURE__ */ new Set(["x", "y", "z"]), Zl = le.filter((t) => !ql.has(t));
|
|
924
924
|
function Jl(t) {
|
|
925
925
|
const e = [];
|
|
926
926
|
return Zl.forEach((n) => {
|
|
@@ -944,7 +944,7 @@ _t.translateX = _t.x;
|
|
|
944
944
|
_t.translateY = _t.y;
|
|
945
945
|
const Kt = /* @__PURE__ */ new Set();
|
|
946
946
|
let ti = !1, ei = !1, ni = !1;
|
|
947
|
-
function
|
|
947
|
+
function br() {
|
|
948
948
|
if (ei) {
|
|
949
949
|
const t = Array.from(Kt).filter((i) => i.needsMeasurement), e = new Set(t.map((i) => i.element)), n = /* @__PURE__ */ new Map();
|
|
950
950
|
e.forEach((i) => {
|
|
@@ -963,20 +963,20 @@ function xr() {
|
|
|
963
963
|
}
|
|
964
964
|
ei = !1, ti = !1, Kt.forEach((t) => t.complete(ni)), Kt.clear();
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function xr() {
|
|
967
967
|
Kt.forEach((t) => {
|
|
968
968
|
t.readKeyframes(), t.needsMeasurement && (ei = !0);
|
|
969
969
|
});
|
|
970
970
|
}
|
|
971
971
|
function Ql() {
|
|
972
|
-
ni = !0,
|
|
972
|
+
ni = !0, xr(), br(), ni = !1;
|
|
973
973
|
}
|
|
974
974
|
class Li {
|
|
975
975
|
constructor(e, n, i, s, r, o = !1) {
|
|
976
976
|
this.state = "pending", this.isAsync = !1, this.needsMeasurement = !1, this.unresolvedKeyframes = [...e], this.onComplete = n, this.name = i, this.motionValue = s, this.element = r, this.isAsync = o;
|
|
977
977
|
}
|
|
978
978
|
scheduleResolve() {
|
|
979
|
-
this.state = "scheduled", this.isAsync ? (Kt.add(this), ti || (ti = !0, I.read(
|
|
979
|
+
this.state = "scheduled", this.isAsync ? (Kt.add(this), ti || (ti = !0, I.read(xr), I.resolveKeyframes(br))) : (this.readKeyframes(), this.complete());
|
|
980
980
|
}
|
|
981
981
|
readKeyframes() {
|
|
982
982
|
const { unresolvedKeyframes: e, name: n, element: i, motionValue: s } = this;
|
|
@@ -1360,7 +1360,7 @@ function Rr(t, e, n = 1) {
|
|
|
1360
1360
|
const o = r.trim();
|
|
1361
1361
|
return Go(o) ? parseFloat(o) : o;
|
|
1362
1362
|
}
|
|
1363
|
-
return
|
|
1363
|
+
return bi(s) ? Rr(s, e, n + 1) : s;
|
|
1364
1364
|
}
|
|
1365
1365
|
const wc = {
|
|
1366
1366
|
type: "spring",
|
|
@@ -1372,14 +1372,14 @@ const wc = {
|
|
|
1372
1372
|
stiffness: 550,
|
|
1373
1373
|
damping: t === 0 ? 2 * Math.sqrt(550) : 30,
|
|
1374
1374
|
restSpeed: 10
|
|
1375
|
-
}),
|
|
1375
|
+
}), bc = {
|
|
1376
1376
|
type: "keyframes",
|
|
1377
1377
|
duration: 0.8
|
|
1378
|
-
},
|
|
1378
|
+
}, xc = {
|
|
1379
1379
|
type: "keyframes",
|
|
1380
1380
|
ease: [0.25, 0.1, 0.35, 1],
|
|
1381
1381
|
duration: 0.3
|
|
1382
|
-
}, Ec = (t, { keyframes: e }) => e.length > 2 ?
|
|
1382
|
+
}, Ec = (t, { keyframes: e }) => e.length > 2 ? bc : ce.has(t) ? t.startsWith("scale") ? Ac(e[1]) : wc : xc, Pc = (t) => t !== null;
|
|
1383
1383
|
function Dc(t, { repeat: e, repeatType: n = "loop" }, i) {
|
|
1384
1384
|
const s = t.filter(Pc), r = e && n !== "loop" && e % 2 === 1 ? 0 : s.length - 1;
|
|
1385
1385
|
return s[r];
|
|
@@ -1773,7 +1773,7 @@ function Fc(t, e, n = {}) {
|
|
|
1773
1773
|
const Bc = {
|
|
1774
1774
|
test: (t) => t === "auto",
|
|
1775
1775
|
parse: (t) => t
|
|
1776
|
-
}, kr = (t) => (e) => e.test(t), Or = [ae,
|
|
1776
|
+
}, kr = (t) => (e) => e.test(t), Or = [ae, b, St, Lt, fl, ul, Bc], _s = (t) => Or.find(kr(t));
|
|
1777
1777
|
function Uc(t) {
|
|
1778
1778
|
return typeof t == "number" ? t === 0 : t !== null ? t === "none" || t === "0" || Yo(t) : !0;
|
|
1779
1779
|
}
|
|
@@ -1782,7 +1782,7 @@ function Wc(t) {
|
|
|
1782
1782
|
const [e, n] = t.slice(0, -1).split("(");
|
|
1783
1783
|
if (e === "drop-shadow")
|
|
1784
1784
|
return t;
|
|
1785
|
-
const [i] = n.match(
|
|
1785
|
+
const [i] = n.match(xi) || [];
|
|
1786
1786
|
if (!i)
|
|
1787
1787
|
return t;
|
|
1788
1788
|
const s = n.replace(i, "");
|
|
@@ -1810,74 +1810,74 @@ const Hc = /\b([a-z-]*)\(.*?\)/gu, ai = {
|
|
|
1810
1810
|
skew: Lt,
|
|
1811
1811
|
skewX: Lt,
|
|
1812
1812
|
skewY: Lt,
|
|
1813
|
-
distance:
|
|
1814
|
-
translateX:
|
|
1815
|
-
translateY:
|
|
1816
|
-
translateZ:
|
|
1817
|
-
x,
|
|
1818
|
-
y:
|
|
1819
|
-
z:
|
|
1820
|
-
perspective:
|
|
1821
|
-
transformPerspective:
|
|
1813
|
+
distance: b,
|
|
1814
|
+
translateX: b,
|
|
1815
|
+
translateY: b,
|
|
1816
|
+
translateZ: b,
|
|
1817
|
+
x: b,
|
|
1818
|
+
y: b,
|
|
1819
|
+
z: b,
|
|
1820
|
+
perspective: b,
|
|
1821
|
+
transformPerspective: b,
|
|
1822
1822
|
opacity: Ee,
|
|
1823
1823
|
originX: vs,
|
|
1824
1824
|
originY: vs,
|
|
1825
|
-
originZ:
|
|
1825
|
+
originZ: b
|
|
1826
1826
|
}, Oi = {
|
|
1827
1827
|
// Border props
|
|
1828
|
-
borderWidth:
|
|
1829
|
-
borderTopWidth:
|
|
1830
|
-
borderRightWidth:
|
|
1831
|
-
borderBottomWidth:
|
|
1832
|
-
borderLeftWidth:
|
|
1833
|
-
borderRadius:
|
|
1834
|
-
radius:
|
|
1835
|
-
borderTopLeftRadius:
|
|
1836
|
-
borderTopRightRadius:
|
|
1837
|
-
borderBottomRightRadius:
|
|
1838
|
-
borderBottomLeftRadius:
|
|
1828
|
+
borderWidth: b,
|
|
1829
|
+
borderTopWidth: b,
|
|
1830
|
+
borderRightWidth: b,
|
|
1831
|
+
borderBottomWidth: b,
|
|
1832
|
+
borderLeftWidth: b,
|
|
1833
|
+
borderRadius: b,
|
|
1834
|
+
radius: b,
|
|
1835
|
+
borderTopLeftRadius: b,
|
|
1836
|
+
borderTopRightRadius: b,
|
|
1837
|
+
borderBottomRightRadius: b,
|
|
1838
|
+
borderBottomLeftRadius: b,
|
|
1839
1839
|
// Positioning props
|
|
1840
|
-
width:
|
|
1841
|
-
maxWidth:
|
|
1842
|
-
height:
|
|
1843
|
-
maxHeight:
|
|
1844
|
-
top:
|
|
1845
|
-
right:
|
|
1846
|
-
bottom:
|
|
1847
|
-
left:
|
|
1848
|
-
inset:
|
|
1849
|
-
insetBlock:
|
|
1850
|
-
insetBlockStart:
|
|
1851
|
-
insetBlockEnd:
|
|
1852
|
-
insetInline:
|
|
1853
|
-
insetInlineStart:
|
|
1854
|
-
insetInlineEnd:
|
|
1840
|
+
width: b,
|
|
1841
|
+
maxWidth: b,
|
|
1842
|
+
height: b,
|
|
1843
|
+
maxHeight: b,
|
|
1844
|
+
top: b,
|
|
1845
|
+
right: b,
|
|
1846
|
+
bottom: b,
|
|
1847
|
+
left: b,
|
|
1848
|
+
inset: b,
|
|
1849
|
+
insetBlock: b,
|
|
1850
|
+
insetBlockStart: b,
|
|
1851
|
+
insetBlockEnd: b,
|
|
1852
|
+
insetInline: b,
|
|
1853
|
+
insetInlineStart: b,
|
|
1854
|
+
insetInlineEnd: b,
|
|
1855
1855
|
// Spacing props
|
|
1856
|
-
padding:
|
|
1857
|
-
paddingTop:
|
|
1858
|
-
paddingRight:
|
|
1859
|
-
paddingBottom:
|
|
1860
|
-
paddingLeft:
|
|
1861
|
-
paddingBlock:
|
|
1862
|
-
paddingBlockStart:
|
|
1863
|
-
paddingBlockEnd:
|
|
1864
|
-
paddingInline:
|
|
1865
|
-
paddingInlineStart:
|
|
1866
|
-
paddingInlineEnd:
|
|
1867
|
-
margin:
|
|
1868
|
-
marginTop:
|
|
1869
|
-
marginRight:
|
|
1870
|
-
marginBottom:
|
|
1871
|
-
marginLeft:
|
|
1872
|
-
marginBlock:
|
|
1873
|
-
marginBlockStart:
|
|
1874
|
-
marginBlockEnd:
|
|
1875
|
-
marginInline:
|
|
1876
|
-
marginInlineStart:
|
|
1877
|
-
marginInlineEnd:
|
|
1856
|
+
padding: b,
|
|
1857
|
+
paddingTop: b,
|
|
1858
|
+
paddingRight: b,
|
|
1859
|
+
paddingBottom: b,
|
|
1860
|
+
paddingLeft: b,
|
|
1861
|
+
paddingBlock: b,
|
|
1862
|
+
paddingBlockStart: b,
|
|
1863
|
+
paddingBlockEnd: b,
|
|
1864
|
+
paddingInline: b,
|
|
1865
|
+
paddingInlineStart: b,
|
|
1866
|
+
paddingInlineEnd: b,
|
|
1867
|
+
margin: b,
|
|
1868
|
+
marginTop: b,
|
|
1869
|
+
marginRight: b,
|
|
1870
|
+
marginBottom: b,
|
|
1871
|
+
marginLeft: b,
|
|
1872
|
+
marginBlock: b,
|
|
1873
|
+
marginBlockStart: b,
|
|
1874
|
+
marginBlockEnd: b,
|
|
1875
|
+
marginInline: b,
|
|
1876
|
+
marginInlineStart: b,
|
|
1877
|
+
marginInlineEnd: b,
|
|
1878
1878
|
// Misc
|
|
1879
|
-
backgroundPositionX:
|
|
1880
|
-
backgroundPositionY:
|
|
1879
|
+
backgroundPositionX: b,
|
|
1880
|
+
backgroundPositionY: b,
|
|
1881
1881
|
...Kc,
|
|
1882
1882
|
zIndex: Is,
|
|
1883
1883
|
// SVG
|
|
@@ -1927,7 +1927,7 @@ class Yc extends Li {
|
|
|
1927
1927
|
super.readKeyframes();
|
|
1928
1928
|
for (let c = 0; c < e.length; c++) {
|
|
1929
1929
|
let f = e[c];
|
|
1930
|
-
if (typeof f == "string" && (f = f.trim(),
|
|
1930
|
+
if (typeof f == "string" && (f = f.trim(), bi(f))) {
|
|
1931
1931
|
const d = Rr(f, n.current);
|
|
1932
1932
|
d !== void 0 && (e[c] = d), c === e.length - 1 && (this.finalKeyframe = f);
|
|
1933
1933
|
}
|
|
@@ -2548,7 +2548,7 @@ const de = {
|
|
|
2548
2548
|
if (!e.target)
|
|
2549
2549
|
return t;
|
|
2550
2550
|
if (typeof t == "string")
|
|
2551
|
-
if (
|
|
2551
|
+
if (b.test(t))
|
|
2552
2552
|
t = parseFloat(t);
|
|
2553
2553
|
else
|
|
2554
2554
|
return t;
|
|
@@ -2626,14 +2626,14 @@ const wu = {
|
|
|
2626
2626
|
offset: "strokeDashoffset",
|
|
2627
2627
|
array: "strokeDasharray"
|
|
2628
2628
|
};
|
|
2629
|
-
function
|
|
2629
|
+
function bu(t, e, n = 1, i = 0, s = !0) {
|
|
2630
2630
|
t.pathLength = 1;
|
|
2631
2631
|
const r = s ? wu : Au;
|
|
2632
|
-
t[r.offset] =
|
|
2633
|
-
const o =
|
|
2632
|
+
t[r.offset] = b.transform(-i);
|
|
2633
|
+
const o = b.transform(e), a = b.transform(n);
|
|
2634
2634
|
t[r.array] = `${o} ${a}`;
|
|
2635
2635
|
}
|
|
2636
|
-
const
|
|
2636
|
+
const xu = [
|
|
2637
2637
|
"offsetDistance",
|
|
2638
2638
|
"offsetPath",
|
|
2639
2639
|
"offsetRotate",
|
|
@@ -2656,9 +2656,9 @@ function ea(t, {
|
|
|
2656
2656
|
t.attrs = t.style, t.style = {};
|
|
2657
2657
|
const { attrs: f, style: d } = t;
|
|
2658
2658
|
f.transform && (d.transform = f.transform, delete f.transform), (d.transform || f.transformOrigin) && (d.transformOrigin = f.transformOrigin ?? "50% 50%", delete f.transformOrigin), d.transform && (d.transformBox = (c == null ? void 0 : c.transformBox) ?? "fill-box", delete f.transformBox);
|
|
2659
|
-
for (const p of
|
|
2659
|
+
for (const p of xu)
|
|
2660
2660
|
f[p] !== void 0 && (d[p] = f[p], delete f[p]);
|
|
2661
|
-
e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), i !== void 0 && (f.scale = i), s !== void 0 &&
|
|
2661
|
+
e !== void 0 && (f.x = e), n !== void 0 && (f.y = n), i !== void 0 && (f.scale = i), s !== void 0 && bu(f, s, r, o, !1);
|
|
2662
2662
|
}
|
|
2663
2663
|
const na = /* @__PURE__ */ new Set([
|
|
2664
2664
|
"baseFrequency",
|
|
@@ -2798,21 +2798,21 @@ function Lu(t) {
|
|
|
2798
2798
|
G && (G.liveStyle = !1);
|
|
2799
2799
|
};
|
|
2800
2800
|
for (const F in ht) {
|
|
2801
|
-
const G = L[F],
|
|
2801
|
+
const G = L[F], bt = $[F];
|
|
2802
2802
|
if (p.hasOwnProperty(F))
|
|
2803
2803
|
continue;
|
|
2804
|
-
let
|
|
2805
|
-
si(G) && si(
|
|
2804
|
+
let xt = !1;
|
|
2805
|
+
si(G) && si(bt) ? xt = !ra(G, bt) : xt = G !== bt, xt ? G != null ? At(F) : d.add(F) : G !== void 0 && d.has(F) ? At(F) : w.protectedKeys[F] = !0;
|
|
2806
2806
|
}
|
|
2807
2807
|
w.prevProp = S, w.prevResolvedValues = L, w.isActive && (p = { ...p, ...L }), i && t.blockInitialAnimation && (v = !1);
|
|
2808
2808
|
const Q = R && k;
|
|
2809
2809
|
v && (!Q || _) && f.push(...H.map((F) => {
|
|
2810
2810
|
const G = { type: T };
|
|
2811
2811
|
if (typeof F == "string" && i && !Q && t.manuallyAnimateOnMount && t.parent) {
|
|
2812
|
-
const { parent:
|
|
2813
|
-
if (
|
|
2814
|
-
const { delayChildren: U } =
|
|
2815
|
-
G.delay = Cr(
|
|
2812
|
+
const { parent: bt } = t, xt = ie(bt, F);
|
|
2813
|
+
if (bt.enteringChildren && xt) {
|
|
2814
|
+
const { delayChildren: U } = xt.transition || {};
|
|
2815
|
+
G.delay = Cr(bt.enteringChildren, t, U);
|
|
2816
2816
|
}
|
|
2817
2817
|
}
|
|
2818
2818
|
return {
|
|
@@ -2967,7 +2967,7 @@ function Hu(t, e, n) {
|
|
|
2967
2967
|
const a = t.x.scale * e.x, l = t.y.scale * e.y;
|
|
2968
2968
|
return (a !== 1 || l !== 1) && (i += `scale(${a}, ${l})`), i || "none";
|
|
2969
2969
|
}
|
|
2970
|
-
const fa = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Ku = fa.length, ro = (t) => typeof t == "string" ? parseFloat(t) : t, ao = (t) => typeof t == "number" ||
|
|
2970
|
+
const fa = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"], Ku = fa.length, ro = (t) => typeof t == "string" ? parseFloat(t) : t, ao = (t) => typeof t == "number" || b.test(t);
|
|
2971
2971
|
function zu(t, e, n, i, s, r) {
|
|
2972
2972
|
s ? (t.opacity = N(0, n.opacity ?? 1, Gu(i)), t.opacityExit = N(e.opacity ?? 1, 0, $u(i))) : r && (t.opacity = N(e.opacity ?? 1, n.opacity ?? 1, i));
|
|
2973
2973
|
for (let o = 0; o < Ku; o++) {
|
|
@@ -2984,7 +2984,7 @@ function lo(t, e) {
|
|
|
2984
2984
|
}
|
|
2985
2985
|
const Gu = /* @__PURE__ */ ha(0, 0.5, ir), $u = /* @__PURE__ */ ha(0.5, 0.95, ut);
|
|
2986
2986
|
function ha(t, e, n) {
|
|
2987
|
-
return (i) => i < t ? 0 : i > e ? 1 : n(/* @__PURE__ */
|
|
2987
|
+
return (i) => i < t ? 0 : i > e ? 1 : n(/* @__PURE__ */ xe(t, e, i));
|
|
2988
2988
|
}
|
|
2989
2989
|
function Yu(t, e, n) {
|
|
2990
2990
|
const i = J(t) ? t : se(t);
|
|
@@ -3217,7 +3217,7 @@ function ma({ attachResizeListener: t, defaultParent: e, measureScroll: n, check
|
|
|
3217
3217
|
}
|
|
3218
3218
|
this.animationCommitId = this.animationId, this.isUpdating ? (this.isUpdating = !1, this.nodes.forEach(af), this.nodes.forEach(ef), this.nodes.forEach(nf)) : this.nodes.forEach(uo), this.clearAllSnapshots();
|
|
3219
3219
|
const a = nt.now();
|
|
3220
|
-
q.delta = wt(0, 1e3 / 60, a - q.timestamp), q.timestamp = a, q.isProcessing = !0,
|
|
3220
|
+
q.delta = wt(0, 1e3 / 60, a - q.timestamp), q.timestamp = a, q.isProcessing = !0, bn.update.process(q), bn.preRender.process(q), bn.render.process(q), q.isProcessing = !1;
|
|
3221
3221
|
}
|
|
3222
3222
|
didUpdate() {
|
|
3223
3223
|
this.updateScheduled || (this.updateScheduled = !0, Ni.read(this.scheduleUpdate));
|
|
@@ -3740,7 +3740,7 @@ const Ta = () => ({
|
|
|
3740
3740
|
...Hi(),
|
|
3741
3741
|
attrs: {}
|
|
3742
3742
|
});
|
|
3743
|
-
function
|
|
3743
|
+
function bf(t, e, n, i) {
|
|
3744
3744
|
const s = on(() => {
|
|
3745
3745
|
const r = Ta();
|
|
3746
3746
|
return ea(r, e, ia(i), t.transformTemplate, t.style), {
|
|
@@ -3754,7 +3754,7 @@ function xf(t, e, n, i) {
|
|
|
3754
3754
|
}
|
|
3755
3755
|
return s;
|
|
3756
3756
|
}
|
|
3757
|
-
const
|
|
3757
|
+
const xf = /* @__PURE__ */ new Set([
|
|
3758
3758
|
"animate",
|
|
3759
3759
|
"exit",
|
|
3760
3760
|
"variants",
|
|
@@ -3787,7 +3787,7 @@ const bf = /* @__PURE__ */ new Set([
|
|
|
3787
3787
|
"viewport"
|
|
3788
3788
|
]);
|
|
3789
3789
|
function sn(t) {
|
|
3790
|
-
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") ||
|
|
3790
|
+
return t.startsWith("while") || t.startsWith("drag") && t !== "draggable" || t.startsWith("layout") || t.startsWith("onTap") || t.startsWith("onPan") || t.startsWith("onLayout") || xf.has(t);
|
|
3791
3791
|
}
|
|
3792
3792
|
let va = (t) => !sn(t);
|
|
3793
3793
|
function Ef(t) {
|
|
@@ -3852,7 +3852,7 @@ function Ki(t) {
|
|
|
3852
3852
|
);
|
|
3853
3853
|
}
|
|
3854
3854
|
function Mf(t, e, n, { latestValues: i }, s, r = !1, o) {
|
|
3855
|
-
const l = (o ?? Ki(t) ?
|
|
3855
|
+
const l = (o ?? Ki(t) ? bf : Af)(e, i, s, t), u = Pf(e, typeof t == "string", r), c = t !== Ho ? { ...u, ...l, ref: n } : {}, { children: f } = e, d = on(() => J(f) ? f.get() : f, [f]);
|
|
3856
3856
|
return Wa(t, {
|
|
3857
3857
|
...c,
|
|
3858
3858
|
children: d
|
|
@@ -3971,7 +3971,7 @@ function Nf(t, e, n) {
|
|
|
3971
3971
|
else o && (o.current = r);
|
|
3972
3972
|
}, [e]);
|
|
3973
3973
|
}
|
|
3974
|
-
const
|
|
3974
|
+
const ba = oe({});
|
|
3975
3975
|
function Se(t) {
|
|
3976
3976
|
return t && typeof t == "object" && Object.prototype.hasOwnProperty.call(t, "current");
|
|
3977
3977
|
}
|
|
@@ -3988,7 +3988,7 @@ function Bf(t, e, n, i, s, r) {
|
|
|
3988
3988
|
reducedMotionConfig: u,
|
|
3989
3989
|
isSVG: r
|
|
3990
3990
|
}));
|
|
3991
|
-
const f = c.current, d = at(
|
|
3991
|
+
const f = c.current, d = at(ba);
|
|
3992
3992
|
f && !f.projection && s && (f.type === "html" || f.type === "svg") && Uf(c.current, n, s, d);
|
|
3993
3993
|
const p = Ht(!1);
|
|
3994
3994
|
Ko(() => {
|
|
@@ -4006,7 +4006,7 @@ function Bf(t, e, n, i, s, r) {
|
|
|
4006
4006
|
}
|
|
4007
4007
|
function Uf(t, e, n, i) {
|
|
4008
4008
|
const { layoutId: s, layout: r, drag: o, dragConstraints: a, layoutScroll: l, layoutRoot: u, layoutCrossfade: c } = e;
|
|
4009
|
-
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 :
|
|
4009
|
+
t.projection = new n(t.latestValues, e["data-framer-portal-id"] ? void 0 : xa(t.parent)), t.projection.setOptions({
|
|
4010
4010
|
layoutId: s,
|
|
4011
4011
|
layout: r,
|
|
4012
4012
|
alwaysMeasureLayout: !!o || a && Se(a),
|
|
@@ -4025,9 +4025,9 @@ function Uf(t, e, n, i) {
|
|
|
4025
4025
|
layoutRoot: u
|
|
4026
4026
|
});
|
|
4027
4027
|
}
|
|
4028
|
-
function
|
|
4028
|
+
function xa(t) {
|
|
4029
4029
|
if (t)
|
|
4030
|
-
return t.options.allowProjection !== !1 ? t.projection :
|
|
4030
|
+
return t.options.allowProjection !== !1 ? t.projection : xa(t.parent);
|
|
4031
4031
|
}
|
|
4032
4032
|
function jf(t, { forwardMotionProps: e = !1, type: n } = {}, i, s) {
|
|
4033
4033
|
i && kf(i);
|
|
@@ -4142,7 +4142,7 @@ function _e(t) {
|
|
|
4142
4142
|
};
|
|
4143
4143
|
}
|
|
4144
4144
|
const qf = (t) => (e) => Fi(e) && t(e, _e(e));
|
|
4145
|
-
function
|
|
4145
|
+
function be(t, e, n, i) {
|
|
4146
4146
|
return Me(t, e, qf(n), i);
|
|
4147
4147
|
}
|
|
4148
4148
|
const Ea = ({ current: t }) => t ? t.ownerDocument.defaultView : null, wo = (t, e) => Math.abs(t - e);
|
|
@@ -4182,7 +4182,7 @@ class Pa {
|
|
|
4182
4182
|
const l = _e(e), u = Vn(l, this.transformPagePoint), { point: c } = u, { timestamp: f } = q;
|
|
4183
4183
|
this.history = [{ ...c, timestamp: f }];
|
|
4184
4184
|
const { onSessionStart: d } = n;
|
|
4185
|
-
d && d(e, kn(u, this.history)), this.removeListeners = Ce(
|
|
4185
|
+
d && d(e, kn(u, this.history)), this.removeListeners = Ce(be(this.contextWindow, "pointermove", this.handlePointerMove), be(this.contextWindow, "pointerup", this.handlePointerUp), be(this.contextWindow, "pointercancel", this.handlePointerUp)), a && this.startScrollTracking(a);
|
|
4186
4186
|
}
|
|
4187
4187
|
/**
|
|
4188
4188
|
* Start tracking scroll on ancestors and window.
|
|
@@ -4236,14 +4236,14 @@ class Pa {
|
|
|
4236
4236
|
function Vn(t, e) {
|
|
4237
4237
|
return e ? { point: e(t.point) } : t;
|
|
4238
4238
|
}
|
|
4239
|
-
function
|
|
4239
|
+
function bo(t, e) {
|
|
4240
4240
|
return { x: t.x - e.x, y: t.y - e.y };
|
|
4241
4241
|
}
|
|
4242
4242
|
function kn({ point: t }, e) {
|
|
4243
4243
|
return {
|
|
4244
4244
|
point: t,
|
|
4245
|
-
delta:
|
|
4246
|
-
offset:
|
|
4245
|
+
delta: bo(t, Da(e)),
|
|
4246
|
+
offset: bo(t, Jf(e)),
|
|
4247
4247
|
velocity: Qf(e, 0.1)
|
|
4248
4248
|
};
|
|
4249
4249
|
}
|
|
@@ -4274,7 +4274,7 @@ function Qf(t, e) {
|
|
|
4274
4274
|
function th(t, { min: e, max: n }, i) {
|
|
4275
4275
|
return e !== void 0 && t < e ? t = i ? N(e, t, i.min) : Math.max(t, e) : n !== void 0 && t > n && (t = i ? N(n, t, i.max) : Math.min(t, n)), t;
|
|
4276
4276
|
}
|
|
4277
|
-
function
|
|
4277
|
+
function xo(t, e, n) {
|
|
4278
4278
|
return {
|
|
4279
4279
|
min: e !== void 0 ? t.min + e : void 0,
|
|
4280
4280
|
max: n !== void 0 ? t.max + n - (t.max - t.min) : void 0
|
|
@@ -4282,8 +4282,8 @@ function bo(t, e, n) {
|
|
|
4282
4282
|
}
|
|
4283
4283
|
function eh(t, { top: e, left: n, bottom: i, right: s }) {
|
|
4284
4284
|
return {
|
|
4285
|
-
x:
|
|
4286
|
-
y:
|
|
4285
|
+
x: xo(t.x, n, s),
|
|
4286
|
+
y: xo(t.y, e, i)
|
|
4287
4287
|
};
|
|
4288
4288
|
}
|
|
4289
4289
|
function Eo(t, e) {
|
|
@@ -4299,7 +4299,7 @@ function nh(t, e) {
|
|
|
4299
4299
|
function ih(t, e) {
|
|
4300
4300
|
let n = 0.5;
|
|
4301
4301
|
const i = it(t), s = it(e);
|
|
4302
|
-
return s > i ? n = /* @__PURE__ */
|
|
4302
|
+
return s > i ? n = /* @__PURE__ */ xe(e.min, e.max - i, t.min) : i > s && (n = /* @__PURE__ */ xe(t.min, t.max - s, e.min)), wt(0, 1, n);
|
|
4303
4303
|
}
|
|
4304
4304
|
function sh(t, e) {
|
|
4305
4305
|
const n = {};
|
|
@@ -4527,7 +4527,7 @@ class ah {
|
|
|
4527
4527
|
if (!this.visualElement.current)
|
|
4528
4528
|
return;
|
|
4529
4529
|
rh.set(this.visualElement, this);
|
|
4530
|
-
const e = this.visualElement.current, n =
|
|
4530
|
+
const e = this.visualElement.current, n = be(e, "pointerdown", (l) => {
|
|
4531
4531
|
const { drag: u, dragListener: c = !0 } = this.getProps();
|
|
4532
4532
|
u && c && !Hr(l.target) && this.start(l);
|
|
4533
4533
|
}), i = () => {
|
|
@@ -4606,7 +4606,7 @@ class uh extends kt {
|
|
|
4606
4606
|
};
|
|
4607
4607
|
}
|
|
4608
4608
|
mount() {
|
|
4609
|
-
this.removePointerDownListener =
|
|
4609
|
+
this.removePointerDownListener = be(this.node.current, "pointerdown", (e) => this.onPointerDown(e));
|
|
4610
4610
|
}
|
|
4611
4611
|
update() {
|
|
4612
4612
|
this.session && this.session.updateHandlers(this.createPanHandlers());
|
|
@@ -4670,7 +4670,7 @@ class hh extends Ga {
|
|
|
4670
4670
|
}
|
|
4671
4671
|
function Ma(t) {
|
|
4672
4672
|
const [e, n] = fh(), i = at(ar);
|
|
4673
|
-
return C(hh, { ...t, layoutGroup: i, switchLayoutGroup: at(
|
|
4673
|
+
return C(hh, { ...t, layoutGroup: i, switchLayoutGroup: at(ba), isPresent: e, safeToRemove: n });
|
|
4674
4674
|
}
|
|
4675
4675
|
const dh = {
|
|
4676
4676
|
pan: {
|
|
@@ -4783,15 +4783,15 @@ class Ah extends kt {
|
|
|
4783
4783
|
if (typeof IntersectionObserver > "u")
|
|
4784
4784
|
return;
|
|
4785
4785
|
const { props: e, prevProps: n } = this.node;
|
|
4786
|
-
["amount", "margin", "root"].some(
|
|
4786
|
+
["amount", "margin", "root"].some(bh(e, n)) && this.startObserver();
|
|
4787
4787
|
}
|
|
4788
4788
|
unmount() {
|
|
4789
4789
|
}
|
|
4790
4790
|
}
|
|
4791
|
-
function
|
|
4791
|
+
function bh({ viewport: t = {} }, { viewport: e = {} } = {}) {
|
|
4792
4792
|
return (n) => t[n] !== e[n];
|
|
4793
4793
|
}
|
|
4794
|
-
const
|
|
4794
|
+
const xh = {
|
|
4795
4795
|
inView: {
|
|
4796
4796
|
Feature: Ah
|
|
4797
4797
|
},
|
|
@@ -4811,14 +4811,14 @@ const bh = {
|
|
|
4811
4811
|
}
|
|
4812
4812
|
}, Ph = {
|
|
4813
4813
|
...Xf,
|
|
4814
|
-
...
|
|
4814
|
+
...xh,
|
|
4815
4815
|
...dh,
|
|
4816
4816
|
...Eh
|
|
4817
4817
|
};
|
|
4818
4818
|
function Dh(t, e) {
|
|
4819
4819
|
return jf(t, e, Ph, zf);
|
|
4820
4820
|
}
|
|
4821
|
-
const Fn = /* @__PURE__ */ Dh("div"), Lo = "https://
|
|
4821
|
+
const Fn = /* @__PURE__ */ Dh("div"), Lo = "https://widget-api.convokit.dev/api/widget/chat";
|
|
4822
4822
|
function cn(t) {
|
|
4823
4823
|
let e;
|
|
4824
4824
|
try {
|
|
@@ -5205,10 +5205,10 @@ function Ia() {
|
|
|
5205
5205
|
ARIA_ATTR: un,
|
|
5206
5206
|
IS_SCRIPT_OR_DATA: F,
|
|
5207
5207
|
ATTR_WHITESPACE: G,
|
|
5208
|
-
CUSTOM_ELEMENT:
|
|
5208
|
+
CUSTOM_ELEMENT: bt
|
|
5209
5209
|
} = Bo;
|
|
5210
5210
|
let {
|
|
5211
|
-
IS_ALLOWED_URI:
|
|
5211
|
+
IS_ALLOWED_URI: xt
|
|
5212
5212
|
} = Bo, U = null;
|
|
5213
5213
|
const $i = M({}, [...ko, ...jn, ...Wn, ...Hn, ...Oo]);
|
|
5214
5214
|
let Y = null;
|
|
@@ -5268,7 +5268,7 @@ function Ia() {
|
|
|
5268
5268
|
let h = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5269
5269
|
if (!(qt && qt === h)) {
|
|
5270
5270
|
if ((!h || typeof h != "object") && (h = {}), h = Tt(h), he = // eslint-disable-next-line unicorn/prefer-includes
|
|
5271
|
-
Na.indexOf(h.PARSER_MEDIA_TYPE) === -1 ? Fa : h.PARSER_MEDIA_TYPE, K = he === "application/xhtml+xml" ? Bn : qe, U = pt(h, "ALLOWED_TAGS") ? M({}, h.ALLOWED_TAGS, K) : $i, Y = pt(h, "ALLOWED_ATTR") ? M({}, h.ALLOWED_ATTR, K) : Yi, vn = pt(h, "ALLOWED_NAMESPACES") ? M({}, h.ALLOWED_NAMESPACES, Bn) : ka, yn = pt(h, "ADD_URI_SAFE_ATTR") ? M(Tt(ns), h.ADD_URI_SAFE_ATTR, K) : ns, ts = pt(h, "ADD_DATA_URI_TAGS") ? M(Tt(es), h.ADD_DATA_URI_TAGS, K) : es, gt = pt(h, "FORBID_CONTENTS") ? M({}, h.FORBID_CONTENTS, K) : gn, ue = pt(h, "FORBID_TAGS") ? M({}, h.FORBID_TAGS, K) : Tt({}), fn = pt(h, "FORBID_ATTR") ? M({}, h.FORBID_ATTR, K) : Tt({}), Yt = pt(h, "USE_PROFILES") ? h.USE_PROFILES : !1, Xi = h.ALLOW_ARIA_ATTR !== !1, hn = h.ALLOW_DATA_ATTR !== !1, qi = h.ALLOW_UNKNOWN_PROTOCOLS || !1, Zi = h.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Gt = h.SAFE_FOR_TEMPLATES || !1, Ie = h.SAFE_FOR_XML !== !1, Ot = h.WHOLE_DOCUMENT || !1, $t = h.RETURN_DOM || !1, Ve = h.RETURN_DOM_FRAGMENT || !1, ke = h.RETURN_TRUSTED_TYPE || !1, mn = h.FORCE_BODY || !1, Ji = h.SANITIZE_DOM !== !1, Qi = h.SANITIZE_NAMED_PROPS || !1, pn = h.KEEP_CONTENT !== !1, fe = h.IN_PLACE || !1,
|
|
5271
|
+
Na.indexOf(h.PARSER_MEDIA_TYPE) === -1 ? Fa : h.PARSER_MEDIA_TYPE, K = he === "application/xhtml+xml" ? Bn : qe, U = pt(h, "ALLOWED_TAGS") ? M({}, h.ALLOWED_TAGS, K) : $i, Y = pt(h, "ALLOWED_ATTR") ? M({}, h.ALLOWED_ATTR, K) : Yi, vn = pt(h, "ALLOWED_NAMESPACES") ? M({}, h.ALLOWED_NAMESPACES, Bn) : ka, yn = pt(h, "ADD_URI_SAFE_ATTR") ? M(Tt(ns), h.ADD_URI_SAFE_ATTR, K) : ns, ts = pt(h, "ADD_DATA_URI_TAGS") ? M(Tt(es), h.ADD_DATA_URI_TAGS, K) : es, gt = pt(h, "FORBID_CONTENTS") ? M({}, h.FORBID_CONTENTS, K) : gn, ue = pt(h, "FORBID_TAGS") ? M({}, h.FORBID_TAGS, K) : Tt({}), fn = pt(h, "FORBID_ATTR") ? M({}, h.FORBID_ATTR, K) : Tt({}), Yt = pt(h, "USE_PROFILES") ? h.USE_PROFILES : !1, Xi = h.ALLOW_ARIA_ATTR !== !1, hn = h.ALLOW_DATA_ATTR !== !1, qi = h.ALLOW_UNKNOWN_PROTOCOLS || !1, Zi = h.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Gt = h.SAFE_FOR_TEMPLATES || !1, Ie = h.SAFE_FOR_XML !== !1, Ot = h.WHOLE_DOCUMENT || !1, $t = h.RETURN_DOM || !1, Ve = h.RETURN_DOM_FRAGMENT || !1, ke = h.RETURN_TRUSTED_TYPE || !1, mn = h.FORCE_BODY || !1, Ji = h.SANITIZE_DOM !== !1, Qi = h.SANITIZE_NAMED_PROPS || !1, pn = h.KEEP_CONTENT !== !1, fe = h.IN_PLACE || !1, xt = h.ALLOWED_URI_REGEXP || La, Xt = h.NAMESPACE || Et, Fe = h.MATHML_TEXT_INTEGRATION_POINTS || Fe, Be = h.HTML_INTEGRATION_POINTS || Be, B = h.CUSTOM_ELEMENT_HANDLING || {}, h.CUSTOM_ELEMENT_HANDLING && is(h.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (B.tagNameCheck = h.CUSTOM_ELEMENT_HANDLING.tagNameCheck), h.CUSTOM_ELEMENT_HANDLING && is(h.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (B.attributeNameCheck = h.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), h.CUSTOM_ELEMENT_HANDLING && typeof h.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (B.allowCustomizedBuiltInElements = h.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Gt && (hn = !1), Ve && ($t = !0), Yt && (U = M({}, Oo), Y = [], Yt.html === !0 && (M(U, ko), M(Y, No)), Yt.svg === !0 && (M(U, jn), M(Y, Kn), M(Y, Ke)), Yt.svgFilters === !0 && (M(U, Wn), M(Y, Kn), M(Y, Ke)), Yt.mathMl === !0 && (M(U, Hn), M(Y, Fo), M(Y, Ke))), h.ADD_TAGS && (typeof h.ADD_TAGS == "function" ? zt.tagCheck = h.ADD_TAGS : (U === $i && (U = Tt(U)), M(U, h.ADD_TAGS, K))), h.ADD_ATTR && (typeof h.ADD_ATTR == "function" ? zt.attributeCheck = h.ADD_ATTR : (Y === Yi && (Y = Tt(Y)), M(Y, h.ADD_ATTR, K))), h.ADD_URI_SAFE_ATTR && M(yn, h.ADD_URI_SAFE_ATTR, K), h.FORBID_CONTENTS && (gt === gn && (gt = Tt(gt)), M(gt, h.FORBID_CONTENTS, K)), h.ADD_FORBID_CONTENTS && (gt === gn && (gt = Tt(gt)), M(gt, h.ADD_FORBID_CONTENTS, K)), pn && (U["#text"] = !0), Ot && M(U, ["html", "head", "body"]), U.table && (M(U, ["tbody"]), delete ue.tbody), h.TRUSTED_TYPES_POLICY) {
|
|
5272
5272
|
if (typeof h.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
5273
5273
|
throw ge('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
5274
5274
|
if (typeof h.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -5284,8 +5284,8 @@ function Ia() {
|
|
|
5284
5284
|
namespaceURI: Xt,
|
|
5285
5285
|
tagName: "template"
|
|
5286
5286
|
});
|
|
5287
|
-
const
|
|
5288
|
-
return vn[h.namespaceURI] ? h.namespaceURI === Ne ? g.namespaceURI === Et ?
|
|
5287
|
+
const x = qe(h.tagName), V = qe(g.tagName);
|
|
5288
|
+
return vn[h.namespaceURI] ? h.namespaceURI === Ne ? g.namespaceURI === Et ? x === "svg" : g.namespaceURI === Oe ? x === "svg" && (V === "annotation-xml" || Fe[V]) : !!ss[x] : h.namespaceURI === Oe ? g.namespaceURI === Et ? x === "math" : g.namespaceURI === Ne ? x === "math" && Be[V] : !!os[x] : h.namespaceURI === Et ? g.namespaceURI === Ne && !Be[V] || g.namespaceURI === Oe && !Fe[V] ? !1 : !os[x] && (Oa[x] || !ss[x]) : !!(he === "application/xhtml+xml" && vn[h.namespaceURI]) : !1;
|
|
5289
5289
|
}, yt = function(h) {
|
|
5290
5290
|
me(e.removed, {
|
|
5291
5291
|
element: h
|
|
@@ -5319,12 +5319,12 @@ function Ia() {
|
|
|
5319
5319
|
} catch {
|
|
5320
5320
|
}
|
|
5321
5321
|
}, rs = function(h) {
|
|
5322
|
-
let g = null,
|
|
5322
|
+
let g = null, x = null;
|
|
5323
5323
|
if (mn)
|
|
5324
5324
|
h = "<remove></remove>" + h;
|
|
5325
5325
|
else {
|
|
5326
5326
|
const j = Un(h, /^[\r\n\t ]+/);
|
|
5327
|
-
|
|
5327
|
+
x = j && j[0];
|
|
5328
5328
|
}
|
|
5329
5329
|
he === "application/xhtml+xml" && Xt === Et && (h = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + h + "</body></html>");
|
|
5330
5330
|
const V = E ? E.createHTML(h) : h;
|
|
@@ -5341,7 +5341,7 @@ function Ia() {
|
|
|
5341
5341
|
}
|
|
5342
5342
|
}
|
|
5343
5343
|
const Z = g.body || g.documentElement;
|
|
5344
|
-
return h &&
|
|
5344
|
+
return h && x && Z.insertBefore(n.createTextNode(x), Z.childNodes[0] || null), Xt === Et ? _.call(g, Ot ? "html" : "body")[0] : Ot ? g.documentElement : Z;
|
|
5345
5345
|
}, as = function(h) {
|
|
5346
5346
|
return k.call(
|
|
5347
5347
|
h.ownerDocument || h,
|
|
@@ -5356,24 +5356,24 @@ function Ia() {
|
|
|
5356
5356
|
return typeof a == "function" && h instanceof a;
|
|
5357
5357
|
};
|
|
5358
5358
|
function Pt(P, h, g) {
|
|
5359
|
-
He(P, (
|
|
5360
|
-
|
|
5359
|
+
He(P, (x) => {
|
|
5360
|
+
x.call(e, h, g, qt);
|
|
5361
5361
|
});
|
|
5362
5362
|
}
|
|
5363
5363
|
const cs = function(h) {
|
|
5364
5364
|
let g = null;
|
|
5365
5365
|
if (Pt(L.beforeSanitizeElements, h, null), wn(h))
|
|
5366
5366
|
return yt(h), !0;
|
|
5367
|
-
const
|
|
5367
|
+
const x = K(h.nodeName);
|
|
5368
5368
|
if (Pt(L.uponSanitizeElement, h, {
|
|
5369
|
-
tagName:
|
|
5369
|
+
tagName: x,
|
|
5370
5370
|
allowedTags: U
|
|
5371
5371
|
}), Ie && h.hasChildNodes() && !ls(h.firstElementChild) && tt(/<[/\w!]/g, h.innerHTML) && tt(/<[/\w!]/g, h.textContent) || h.nodeType === Te.progressingInstruction || Ie && h.nodeType === Te.comment && tt(/<[/\w]/g, h.data))
|
|
5372
5372
|
return yt(h), !0;
|
|
5373
|
-
if (!(zt.tagCheck instanceof Function && zt.tagCheck(
|
|
5374
|
-
if (!ue[
|
|
5373
|
+
if (!(zt.tagCheck instanceof Function && zt.tagCheck(x)) && (!U[x] || ue[x])) {
|
|
5374
|
+
if (!ue[x] && fs(x) && (B.tagNameCheck instanceof RegExp && tt(B.tagNameCheck, x) || B.tagNameCheck instanceof Function && B.tagNameCheck(x)))
|
|
5375
5375
|
return !1;
|
|
5376
|
-
if (pn && !gt[
|
|
5376
|
+
if (pn && !gt[x]) {
|
|
5377
5377
|
const V = S(h) || h.parentNode, Z = w(h) || h.childNodes;
|
|
5378
5378
|
if (Z && V) {
|
|
5379
5379
|
const j = Z.length;
|
|
@@ -5385,13 +5385,13 @@ function Ia() {
|
|
|
5385
5385
|
}
|
|
5386
5386
|
return yt(h), !0;
|
|
5387
5387
|
}
|
|
5388
|
-
return h instanceof l && !Ua(h) || (
|
|
5388
|
+
return h instanceof l && !Ua(h) || (x === "noscript" || x === "noembed" || x === "noframes") && tt(/<\/no(script|embed|frames)/i, h.innerHTML) ? (yt(h), !0) : (Gt && h.nodeType === Te.text && (g = h.textContent, He([$, ht, At], (V) => {
|
|
5389
5389
|
g = pe(g, V, " ");
|
|
5390
5390
|
}), h.textContent !== g && (me(e.removed, {
|
|
5391
5391
|
element: h.cloneNode()
|
|
5392
5392
|
}), h.textContent = g)), Pt(L.afterSanitizeElements, h, null), !1);
|
|
5393
|
-
}, us = function(h, g,
|
|
5394
|
-
if (Ji && (g === "id" || g === "name") && (
|
|
5393
|
+
}, us = function(h, g, x) {
|
|
5394
|
+
if (Ji && (g === "id" || g === "name") && (x in n || x in Ba))
|
|
5395
5395
|
return !1;
|
|
5396
5396
|
if (!(hn && !fn[g] && tt(Q, g))) {
|
|
5397
5397
|
if (!(Xi && tt(un, g))) {
|
|
@@ -5403,13 +5403,13 @@ function Ia() {
|
|
|
5403
5403
|
// and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
|
|
5404
5404
|
!(fs(h) && (B.tagNameCheck instanceof RegExp && tt(B.tagNameCheck, h) || B.tagNameCheck instanceof Function && B.tagNameCheck(h)) && (B.attributeNameCheck instanceof RegExp && tt(B.attributeNameCheck, g) || B.attributeNameCheck instanceof Function && B.attributeNameCheck(g, h)) || // Alternative, second condition checks if it's an `is`-attribute, AND
|
|
5405
5405
|
// the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
|
|
5406
|
-
g === "is" && B.allowCustomizedBuiltInElements && (B.tagNameCheck instanceof RegExp && tt(B.tagNameCheck,
|
|
5406
|
+
g === "is" && B.allowCustomizedBuiltInElements && (B.tagNameCheck instanceof RegExp && tt(B.tagNameCheck, x) || B.tagNameCheck instanceof Function && B.tagNameCheck(x)))
|
|
5407
5407
|
) return !1;
|
|
5408
5408
|
} else if (!yn[g]) {
|
|
5409
|
-
if (!tt(
|
|
5410
|
-
if (!((g === "src" || g === "xlink:href" || g === "href") && h !== "script" && Fh(
|
|
5411
|
-
if (!(qi && !tt(F, pe(
|
|
5412
|
-
if (
|
|
5409
|
+
if (!tt(xt, pe(x, G, ""))) {
|
|
5410
|
+
if (!((g === "src" || g === "xlink:href" || g === "href") && h !== "script" && Fh(x, "data:") === 0 && ts[h])) {
|
|
5411
|
+
if (!(qi && !tt(F, pe(x, G, "")))) {
|
|
5412
|
+
if (x)
|
|
5413
5413
|
return !1;
|
|
5414
5414
|
}
|
|
5415
5415
|
}
|
|
@@ -5420,7 +5420,7 @@ function Ia() {
|
|
|
5420
5420
|
}
|
|
5421
5421
|
return !0;
|
|
5422
5422
|
}, fs = function(h) {
|
|
5423
|
-
return h !== "annotation-xml" && Un(h,
|
|
5423
|
+
return h !== "annotation-xml" && Un(h, bt);
|
|
5424
5424
|
}, hs = function(h) {
|
|
5425
5425
|
Pt(L.beforeSanitizeAttributes, h, null);
|
|
5426
5426
|
const {
|
|
@@ -5428,7 +5428,7 @@ function Ia() {
|
|
|
5428
5428
|
} = h;
|
|
5429
5429
|
if (!g || wn(h))
|
|
5430
5430
|
return;
|
|
5431
|
-
const
|
|
5431
|
+
const x = {
|
|
5432
5432
|
attrName: "",
|
|
5433
5433
|
attrValue: "",
|
|
5434
5434
|
keepAttr: !0,
|
|
@@ -5443,7 +5443,7 @@ function Ia() {
|
|
|
5443
5443
|
value: Dt
|
|
5444
5444
|
} = Z, Zt = K(j), An = Dt;
|
|
5445
5445
|
let X = j === "value" ? An : Bh(An);
|
|
5446
|
-
if (
|
|
5446
|
+
if (x.attrName = Zt, x.attrValue = X, x.keepAttr = !0, x.forceKeepAttr = void 0, Pt(L.uponSanitizeAttribute, h, x), X = x.attrValue, Qi && (Zt === "id" || Zt === "name") && (Nt(j, h), X = Va + X), Ie && tt(/((--!?|])>)|<\/(style|title|textarea)/i, X)) {
|
|
5447
5447
|
Nt(j, h);
|
|
5448
5448
|
continue;
|
|
5449
5449
|
}
|
|
@@ -5451,9 +5451,9 @@ function Ia() {
|
|
|
5451
5451
|
Nt(j, h);
|
|
5452
5452
|
continue;
|
|
5453
5453
|
}
|
|
5454
|
-
if (
|
|
5454
|
+
if (x.forceKeepAttr)
|
|
5455
5455
|
continue;
|
|
5456
|
-
if (!
|
|
5456
|
+
if (!x.keepAttr) {
|
|
5457
5457
|
Nt(j, h);
|
|
5458
5458
|
continue;
|
|
5459
5459
|
}
|
|
@@ -5490,13 +5490,13 @@ function Ia() {
|
|
|
5490
5490
|
Pt(L.afterSanitizeAttributes, h, null);
|
|
5491
5491
|
}, ja = function P(h) {
|
|
5492
5492
|
let g = null;
|
|
5493
|
-
const
|
|
5494
|
-
for (Pt(L.beforeSanitizeShadowDOM, h, null); g =
|
|
5493
|
+
const x = as(h);
|
|
5494
|
+
for (Pt(L.beforeSanitizeShadowDOM, h, null); g = x.nextNode(); )
|
|
5495
5495
|
Pt(L.uponSanitizeShadowNode, g, null), cs(g), hs(g), g.content instanceof r && P(g.content);
|
|
5496
5496
|
Pt(L.afterSanitizeShadowDOM, h, null);
|
|
5497
5497
|
};
|
|
5498
5498
|
return e.sanitize = function(P) {
|
|
5499
|
-
let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = null,
|
|
5499
|
+
let h = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = null, x = null, V = null, Z = null;
|
|
5500
5500
|
if (Tn = !P, Tn && (P = "<!-->"), typeof P != "string" && !ls(P))
|
|
5501
5501
|
if (typeof P.toString == "function") {
|
|
5502
5502
|
if (P = P.toString(), typeof P != "string")
|
|
@@ -5512,7 +5512,7 @@ function Ia() {
|
|
|
5512
5512
|
throw ge("root node is forbidden and cannot be sanitized in-place");
|
|
5513
5513
|
}
|
|
5514
5514
|
} else if (P instanceof a)
|
|
5515
|
-
g = rs("<!---->"),
|
|
5515
|
+
g = rs("<!---->"), x = g.ownerDocument.importNode(P, !0), x.nodeType === Te.element && x.nodeName === "BODY" || x.nodeName === "HTML" ? g = x : g.appendChild(x);
|
|
5516
5516
|
else {
|
|
5517
5517
|
if (!$t && !Gt && !Ot && // eslint-disable-next-line unicorn/prefer-includes
|
|
5518
5518
|
P.indexOf("<") === -1)
|
|
@@ -5546,8 +5546,8 @@ function Ia() {
|
|
|
5546
5546
|
qt = null, dn = !1;
|
|
5547
5547
|
}, e.isValidAttribute = function(P, h, g) {
|
|
5548
5548
|
qt || Sn({});
|
|
5549
|
-
const
|
|
5550
|
-
return us(
|
|
5549
|
+
const x = K(P), V = K(h);
|
|
5550
|
+
return us(x, V, g);
|
|
5551
5551
|
}, e.addHook = function(P, h) {
|
|
5552
5552
|
typeof h == "function" && me(L[P], h);
|
|
5553
5553
|
}, e.removeHook = function(P, h) {
|
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document!="undefined"){var o=document.createElement("style");o.appendChild(document.createTextNode(":root{--convokit-primary: #000;--convokit-header-bg: #000;--convokit-font-family: Inter, system-ui, sans-serif;--convokit-font-size: 14px;--convokit-border-radius: 18px;--convokit-chat-bg: #ffffff;--convokit-user-msg-bg: #000;--convokit-assistant-msg-bg: #f3f4f6;--convokit-input-bg: #ffffff;--convokit-input-border: #d1d5db}.convokit-widget{position:fixed;top:0;left:0;right:0;bottom:0;pointer-events:none;font-family:var(--convokit-font-family);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.convokit-button{width:56px;height:56px;border-radius:50%;border:2px solid var(--convokit-primary);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 8px #0000001a;z-index:10000;transition:all .2s ease;background:var(--convokit-primary)}.convokit-button:hover{transform:translateY(-2px);box-shadow:0 4px 12px #00000026}.convokit-button:active{transform:translateY(0)}.convokit-button-hidden{opacity:0;transform:scale(0);pointer-events:none;transition:all .2s ease-in-out}.convokit-chat-window{width:380px;height:600px;background:#fff;border-radius:12px;box-shadow:0 4px 16px #0000001a;display:flex;flex-direction:column;overflow:hidden;position:absolute;bottom:0;right:0;z-index:9999;transform-origin:bottom right;border:2px solid #000;overscroll-behavior:contain}.convokit-chat-window-body{width:100%;height:100%;background:#fff;display:flex;flex-direction:column;overflow:hidden}.convokit-chat-wrapper{display:flex;flex-direction:column;flex:1;background:var(--convokit-chat-bg);overflow:hidden}.convokit-header{padding:16px 20px;color:#fff;display:flex;justify-content:space-between;align-items:center;min-height:60px;background:var(--convokit-header-bg);position:relative;border-bottom:2px solid var(--convokit-header-bg)}.convokit-header-subtitle{margin:0;font-size:12px;opacity:.85;line-height:1.3}.convokit-header-left{display:flex;align-items:center;gap:12px;flex:1}.convokit-avatar{display:none}.convokit-header-text{display:flex;flex-direction:column;gap:4px}.convokit-header-text h3{margin:0;font-size:16px;font-weight:600;line-height:1.3}.convokit-header-actions{display:flex;align-items:center;gap:4px}.convokit-header-icon{background:none;border:none;color:#fff;cursor:pointer;padding:4px;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:opacity .2s ease}.convokit-header-icon:hover{opacity:.7}.convokit-header-icon:active{opacity:.5}.convokit-chat-window-content{display:flex;flex-direction:column;flex:1;overflow:hidden;min-height:0}.convokit-chat-container{display:flex;flex-direction:column;flex:1;padding:16px;border:none;overflow:hidden;background:transparent;overscroll-behavior:contain}.convokit-messages{flex:1;overflow-y:auto;padding:8px 0;display:flex;flex-direction:column;gap:16px;background:transparent;scrollbar-width:none;-ms-overflow-style:none;overscroll-behavior:contain}.convokit-messages::-webkit-scrollbar{display:none}.convokit-welcome{text-align:center;color:#666;padding:20px;font-size:14px}.convokit-message{display:flex;align-items:flex-end;gap:0;max-width:75%}.convokit-message-user{align-self:flex-end}.convokit-message-assistant{align-self:flex-start}.convokit-bot-icon{display:none}.convokit-message-content{padding:10px 14px;border-radius:var(--convokit-border-radius);word-wrap:break-word;font-size:var(--convokit-font-size);line-height:1.5;position:relative}.convokit-message-user .convokit-message-content{background:var(--convokit-user-msg-bg);color:#fff;border-bottom-right-radius:4px}.convokit-message-assistant .convokit-message-content{background:var(--convokit-assistant-msg-bg);color:#000;border-bottom-left-radius:4px}.convokit-message-content strong{font-weight:600}.convokit-message-content em{font-style:italic}.convokit-message-content a{text-decoration:underline}.convokit-typing{display:flex;gap:6px;padding:4px 0;align-items:center}.convokit-typing span{width:8px;height:8px;border-radius:50%;background:#6b7280;animation:typing-bounce 1.4s ease-in-out infinite}.convokit-typing span:nth-child(1){animation-delay:0s}.convokit-typing span:nth-child(2){animation-delay:.2s}.convokit-typing span:nth-child(3){animation-delay:.4s}@keyframes typing-bounce{0%,60%,to{transform:translateY(0)}30%{transform:translateY(-8px)}}.convokit-input-form{display:flex;align-items:center;padding:12px 0 0;gap:8px;flex-shrink:0;background:transparent;border-bottom:none}.convokit-input{flex:1;padding:11px 14px;border:1px solid color-mix(in srgb,var(--convokit-primary) 35%,transparent);background:var(--convokit-input-bg);border-radius:20px;font-size:var(--convokit-font-size);outline:none;color:#000;font-family:var(--convokit-font-family);transition:border-color .2s ease,box-shadow .2s ease}.convokit-input:focus{border-color:var(--convokit-primary);box-shadow:none}.convokit-input::placeholder{color:#9ca3af}.convokit-input:disabled{background:#f9fafb;color:#9ca3af;border-color:#e5e7eb}.convokit-send-button{width:40px;height:40px;border-radius:50%;border:none;color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:var(--convokit-primary);transition:opacity .2s ease}.convokit-send-button:hover:not(:disabled){opacity:.8}.convokit-send-button:active:not(:disabled){opacity:.6}.convokit-send-button:disabled{opacity:.3;cursor:not-allowed;background:var(--convokit-primary)}.convokit-footer{padding:10px 16px;text-align:center;background:var(--convokit-chat-bg);font-size:11px;color:#6b7280}.convokit-footer a{color:var(--convokit-primary);text-decoration:none;font-weight:500;transition:opacity .2s ease}.convokit-footer a:hover{opacity:.7}.convokit-rating-prompt{padding:16px;border-top:1px solid #e5e7eb;background-color:#f9fafb;border-bottom-left-radius:12px;border-bottom-right-radius:12px}.convokit-rating-question{margin:0 0 12px;font-size:14px;font-weight:500;color:#374151;text-align:center}.convokit-rating-buttons{display:flex;gap:12px;justify-content:center;margin-bottom:12px}.convokit-rating-button{width:48px;height:48px;border-radius:50%;border:2px solid #d1d5db;background-color:#fff;color:#6b7280;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;padding:0}.convokit-rating-button:hover:not(:disabled){border-color:#9ca3af;transform:scale(1.05)}.convokit-rating-button:disabled{opacity:.5;cursor:not-allowed}.convokit-rating-button.convokit-rating-selected{color:#fff;border-width:2px}.convokit-rating-feedback{margin-top:12px;animation:slideDown .3s ease}@keyframes slideDown{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.convokit-rating-textarea{width:100%;padding:10px 12px;border:1px solid #d1d5db;border-radius:8px;font-size:14px;font-family:inherit;resize:vertical;min-height:60px;margin-bottom:8px;box-sizing:border-box}.convokit-rating-textarea:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.convokit-rating-textarea:disabled{background-color:#f3f4f6;cursor:not-allowed}.convokit-rating-submit{width:100%;padding:10px 16px;border:none;border-radius:8px;font-size:14px;font-weight:500;color:#fff;cursor:pointer;transition:opacity .2s ease}.convokit-rating-submit:hover:not(:disabled){opacity:.9}.convokit-rating-submit:disabled{opacity:.6;cursor:not-allowed}.convokit-rating-thankyou{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px 16px;animation:fadeIn .3s ease}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.convokit-rating-icon{width:48px;height:48px;border-radius:50%;background-color:#10b981;color:#fff;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:700;margin-bottom:12px}.convokit-rating-message{margin:0;font-size:14px;font-weight:500;color:#374151}@media (max-width: 480px){.convokit-widget{bottom:10px;right:10px}.convokit-chat-window{width:calc(100vw - 20px);height:calc(100vh - 20px);max-width:calc(100vw - 20px);max-height:calc(100vh - 20px);bottom:0;right:0;border-radius:16px}.convokit-message{max-width:85%}.convokit-header{padding:16px 16px 12px;min-height:64px}.convokit-chat-container{padding:12px}}")),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { M as L, r as _, f as R, i as $, s as G, c as Y, a as q, g as A, b as U, d as V, e as J } from "./PopupWidget-
|
|
3
|
-
import { P as he } from "./PopupWidget-
|
|
2
|
+
import { M as L, r as _, f as R, i as $, s as G, c as Y, a as q, g as A, b as U, d as V, e as J } from "./PopupWidget-NriZ7r1G.js";
|
|
3
|
+
import { P as he } from "./PopupWidget-NriZ7r1G.js";
|
|
4
4
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
5
5
|
import { useState as u, useRef as F, useEffect as N } from "react";
|
|
6
6
|
const Q = "convokit-widget", X = ({ config: e, onBack: c, backLabel: r = "Back to editor" }) => {
|
package/dist/next.esm.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import n from "next/dynamic";
|
|
4
4
|
const i = n(
|
|
5
|
-
() => import("./PopupWidget-
|
|
5
|
+
() => import("./PopupWidget-NriZ7r1G.js").then((e) => e.h).then((e) => e.PopupWidget),
|
|
6
6
|
{ ssr: !1 }
|
|
7
7
|
), s = () => {
|
|
8
8
|
var e;
|