@inploi/plugin-chatbot 4.0.0 → 4.0.2
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/cdn/index.js +2 -2
- package/dist/{chatbot-body-c80bdc34.js → chatbot-body-3dfd1aa9.js} +460 -466
- package/dist/chatbot-body-ee776a4a.cjs +1 -0
- package/dist/chatbot.api.d.ts +2 -2
- package/dist/chatbot.utils.d.ts +1 -1
- package/dist/i18n.d.ts +52 -4
- package/dist/index-8ae8589d.cjs +5 -0
- package/dist/{index-a2c09edd.js → index-daa7b492.js} +73 -86
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/package.json +4 -4
- package/dist/chatbot-body-2c87c7e2.cjs +0 -1
- package/dist/index-dc676e56.cjs +0 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Be = (t, e, a) => (
|
|
1
|
+
var Lr = Object.defineProperty;
|
|
2
|
+
var Hr = (t, e, a) => e in t ? Lr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
|
|
3
|
+
var Be = (t, e, a) => (Hr(t, typeof e != "symbol" ? e + "" : e, a), a);
|
|
4
4
|
import { createPlugin as Br } from "@inploi/sdk";
|
|
5
5
|
var zt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
6
6
|
function Rr(t) {
|
|
@@ -73,13 +73,13 @@ function Fi(t) {
|
|
|
73
73
|
}
|
|
74
74
|
return "";
|
|
75
75
|
}
|
|
76
|
-
var
|
|
76
|
+
var Li = Fi, Hi = Ii, Bi = Ai, Ri = Fa, Ui = Li, Vi = /[\\^$.*+?()[\]{}|]/g, Ki = /^\[object .+?Constructor\]$/, qi = Function.prototype, Wi = Object.prototype, Gi = qi.toString, Yi = Wi.hasOwnProperty, Xi = RegExp(
|
|
77
77
|
"^" + Gi.call(Yi).replace(Vi, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
78
78
|
);
|
|
79
79
|
function Zi(t) {
|
|
80
80
|
if (!Ri(t) || Bi(t))
|
|
81
81
|
return !1;
|
|
82
|
-
var e =
|
|
82
|
+
var e = Hi(t) ? Xi : Ki;
|
|
83
83
|
return e.test(Ui(t));
|
|
84
84
|
}
|
|
85
85
|
var Ji = Zi;
|
|
@@ -91,7 +91,7 @@ function ro(t, e) {
|
|
|
91
91
|
var a = ao(t, e);
|
|
92
92
|
return eo(a) ? a : void 0;
|
|
93
93
|
}
|
|
94
|
-
var
|
|
94
|
+
var La = ro, io = La, oo = io(Object, "create"), Wt = oo, qe = Wt;
|
|
95
95
|
function no() {
|
|
96
96
|
this.__data__ = qe ? qe(null) : {}, this.size = 0;
|
|
97
97
|
}
|
|
@@ -147,13 +147,13 @@ function Mo(t, e) {
|
|
|
147
147
|
return a;
|
|
148
148
|
return -1;
|
|
149
149
|
}
|
|
150
|
-
var Gt = Mo, Fo = Gt,
|
|
150
|
+
var Gt = Mo, Fo = Gt, Lo = Array.prototype, Ho = Lo.splice;
|
|
151
151
|
function Bo(t) {
|
|
152
152
|
var e = this.__data__, a = Fo(e, t);
|
|
153
153
|
if (a < 0)
|
|
154
154
|
return !1;
|
|
155
155
|
var r = e.length - 1;
|
|
156
|
-
return a == r ? e.pop() :
|
|
156
|
+
return a == r ? e.pop() : Ho.call(e, a, 1), --this.size, !0;
|
|
157
157
|
}
|
|
158
158
|
var Ro = Bo, Uo = Gt;
|
|
159
159
|
function Vo(t) {
|
|
@@ -182,7 +182,7 @@ ht.prototype.delete = Qo;
|
|
|
182
182
|
ht.prototype.get = tn;
|
|
183
183
|
ht.prototype.has = en;
|
|
184
184
|
ht.prototype.set = an;
|
|
185
|
-
var rn = ht, on =
|
|
185
|
+
var rn = ht, on = La, nn = Ce, sn = on(nn, "Map"), cn = sn, We = To, ln = rn, dn = cn;
|
|
186
186
|
function un() {
|
|
187
187
|
this.size = 0, this.__data__ = {
|
|
188
188
|
hash: new We(),
|
|
@@ -231,7 +231,7 @@ ft.prototype.delete = In;
|
|
|
231
231
|
ft.prototype.get = Tn;
|
|
232
232
|
ft.prototype.has = jn;
|
|
233
233
|
ft.prototype.set = zn;
|
|
234
|
-
var Dn = ft,
|
|
234
|
+
var Dn = ft, Ha = Dn, An = "Expected a function";
|
|
235
235
|
function Oe(t, e) {
|
|
236
236
|
if (typeof t != "function" || e != null && typeof e != "function")
|
|
237
237
|
throw new TypeError(An);
|
|
@@ -242,17 +242,17 @@ function Oe(t, e) {
|
|
|
242
242
|
var n = t.apply(this, r);
|
|
243
243
|
return a.cache = i.set(o, n) || i, n;
|
|
244
244
|
};
|
|
245
|
-
return a.cache = new (Oe.Cache ||
|
|
245
|
+
return a.cache = new (Oe.Cache || Ha)(), a;
|
|
246
246
|
}
|
|
247
|
-
Oe.Cache =
|
|
247
|
+
Oe.Cache = Ha;
|
|
248
248
|
var Nn = Oe, Mn = Nn, Fn = 500;
|
|
249
|
-
function
|
|
249
|
+
function Ln(t) {
|
|
250
250
|
var e = Mn(t, function(r) {
|
|
251
251
|
return a.size === Fn && a.clear(), r;
|
|
252
252
|
}), a = e.cache;
|
|
253
253
|
return e;
|
|
254
254
|
}
|
|
255
|
-
var
|
|
255
|
+
var Hn = Ln, Bn = Hn, Rn = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Un = /\\(\\)?/g, Vn = Bn(function(t) {
|
|
256
256
|
var e = [];
|
|
257
257
|
return t.charCodeAt(0) === 46 && e.push(""), t.replace(Rn, function(a, r, o, i) {
|
|
258
258
|
e.push(o ? i.replace(Un, "$1") : r || a);
|
|
@@ -332,16 +332,16 @@ function ys() {
|
|
|
332
332
|
function M(t) {
|
|
333
333
|
return t.children;
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function L(t, e) {
|
|
336
336
|
this.props = t, this.context = e;
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Ht(t, e) {
|
|
339
339
|
if (e == null)
|
|
340
|
-
return t.__ ?
|
|
340
|
+
return t.__ ? Ht(t.__, t.__.__k.indexOf(t) + 1) : null;
|
|
341
341
|
for (var a; e < t.__k.length; e++)
|
|
342
342
|
if ((a = t.__k[e]) != null && a.__e != null)
|
|
343
343
|
return a.__e;
|
|
344
|
-
return typeof t.type == "function" ?
|
|
344
|
+
return typeof t.type == "function" ? Ht(t) : null;
|
|
345
345
|
}
|
|
346
346
|
function Ga(t) {
|
|
347
347
|
var e, a;
|
|
@@ -360,7 +360,7 @@ function ue(t) {
|
|
|
360
360
|
function Bt() {
|
|
361
361
|
var t, e, a, r, o, i, n, c, l;
|
|
362
362
|
for (rt.sort(de); t = rt.shift(); )
|
|
363
|
-
t.__d && (e = rt.length, r = void 0, o = void 0, i = void 0, c = (n = (a = t).__v).__e, (l = a.__P) && (r = [], o = [], (i = R({}, n)).__v = n.__v + 1, Ie(l, n, i, a.__n, l.ownerSVGElement !== void 0, n.__h != null ? [c] : null, r, c ??
|
|
363
|
+
t.__d && (e = rt.length, r = void 0, o = void 0, i = void 0, c = (n = (a = t).__v).__e, (l = a.__P) && (r = [], o = [], (i = R({}, n)).__v = n.__v + 1, Ie(l, n, i, a.__n, l.ownerSVGElement !== void 0, n.__h != null ? [c] : null, r, c ?? Ht(n), n.__h, o), Ja(r, n, o), n.__e != c && Ga(n)), rt.length > e && rt.sort(de));
|
|
364
364
|
Bt.__r = 0;
|
|
365
365
|
}
|
|
366
366
|
function Ya(t, e, a, r, o, i, n, c, l, d, u) {
|
|
@@ -454,7 +454,7 @@ function Ie(t, e, a, r, o, i, n, c, l, d) {
|
|
|
454
454
|
try {
|
|
455
455
|
t:
|
|
456
456
|
if (typeof O == "function") {
|
|
457
|
-
if (v = e.props, $ = (u = O.contextType) && r[u.__c], N = u ? $ ? $.props.value : u.__ : r, a.__c ? m = (s = e.__c = a.__c).__ = s.__E : ("prototype" in O && O.prototype.render ? e.__c = s = new O(v, N) : (e.__c = s = new
|
|
457
|
+
if (v = e.props, $ = (u = O.contextType) && r[u.__c], N = u ? $ ? $.props.value : u.__ : r, a.__c ? m = (s = e.__c = a.__c).__ = s.__E : ("prototype" in O && O.prototype.render ? e.__c = s = new O(v, N) : (e.__c = s = new L(v, N), s.constructor = O, s.render = Ss), $ && $.sub(s), s.props = v, s.state || (s.state = {}), s.context = N, s.__n = r, h = s.__d = !0, s.__h = [], s._sb = []), s.__s == null && (s.__s = s.state), O.getDerivedStateFromProps != null && (s.__s == s.state && (s.__s = R({}, s.__s)), R(s.__s, O.getDerivedStateFromProps(v, s.__s))), g = s.props, p = s.state, s.__v = e, h)
|
|
458
458
|
O.getDerivedStateFromProps == null && s.componentWillMount != null && s.componentWillMount(), s.componentDidMount != null && s.__h.push(s.componentDidMount);
|
|
459
459
|
else {
|
|
460
460
|
if (O.getDerivedStateFromProps == null && v !== g && s.componentWillReceiveProps != null && s.componentWillReceiveProps(v, N), !s.__e && (s.shouldComponentUpdate != null && s.shouldComponentUpdate(v, s.__s, N) === !1 || e.__v === a.__v)) {
|
|
@@ -523,7 +523,7 @@ function $s(t, e, a, r, o, i, n, c, l) {
|
|
|
523
523
|
}
|
|
524
524
|
if (ks(t, g, h, o, c), s)
|
|
525
525
|
e.__k = [];
|
|
526
|
-
else if (Ya(t, Xt(b = e.props.children) ? b : [b], e, a, r, o && p !== "foreignObject", i, n, i ? i[0] : a.__k &&
|
|
526
|
+
else if (Ya(t, Xt(b = e.props.children) ? b : [b], e, a, r, o && p !== "foreignObject", i, n, i ? i[0] : a.__k && Ht(a, 0), c, l), i != null)
|
|
527
527
|
for (b = i.length; b--; )
|
|
528
528
|
i[b] != null && Wa(i[b]);
|
|
529
529
|
c || ("value" in g && (b = g.value) !== void 0 && (b !== t.value || p === "progress" && !b || p === "option" && b !== h.value) && Rt(t, "value", b, h.value, !1), "checked" in g && (b = g.checked) !== void 0 && b !== t.checked && Rt(t, "checked", b, h.checked, !1));
|
|
@@ -602,12 +602,12 @@ Pt = qa.slice, w = { __e: function(t, e, a, r) {
|
|
|
602
602
|
throw t;
|
|
603
603
|
} }, Ra = 0, Ua = function(t) {
|
|
604
604
|
return t != null && t.constructor === void 0;
|
|
605
|
-
},
|
|
605
|
+
}, L.prototype.setState = function(t, e) {
|
|
606
606
|
var a;
|
|
607
607
|
a = this.__s != null && this.__s !== this.state ? this.__s : this.__s = R({}, this.state), typeof t == "function" && (t = t(R({}, a), this.props)), t && R(a, t), t != null && this.__v && (e && this._sb.push(e), ue(this));
|
|
608
|
-
},
|
|
608
|
+
}, L.prototype.forceUpdate = function(t) {
|
|
609
609
|
this.__v && (this.__e = !0, t && this.__h.push(t), ue(this));
|
|
610
|
-
},
|
|
610
|
+
}, L.prototype.render = M, rt = [], Va = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, de = function(t, e) {
|
|
611
611
|
return t.__v.__b - e.__v.__b;
|
|
612
612
|
}, Bt.__r = 0, Ka = 0;
|
|
613
613
|
var je = class extends Error {
|
|
@@ -1269,7 +1269,7 @@ function ze(t) {
|
|
|
1269
1269
|
return { current: t };
|
|
1270
1270
|
}, []);
|
|
1271
1271
|
}
|
|
1272
|
-
function
|
|
1272
|
+
function Ls(t, e, a) {
|
|
1273
1273
|
ut = 6, It(function() {
|
|
1274
1274
|
return typeof t == "function" ? (t(e()), function() {
|
|
1275
1275
|
return t(null);
|
|
@@ -1282,7 +1282,7 @@ function gt(t, e) {
|
|
|
1282
1282
|
var a = wt(Y++, 7);
|
|
1283
1283
|
return De(a.__H, e) ? (a.__V = t(), a.i = e, a.__h = t, a.__V) : a.__;
|
|
1284
1284
|
}
|
|
1285
|
-
function
|
|
1285
|
+
function Hs(t, e) {
|
|
1286
1286
|
return ut = 8, gt(function() {
|
|
1287
1287
|
return t;
|
|
1288
1288
|
}, e);
|
|
@@ -1403,7 +1403,7 @@ function Ks(t, e) {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
return r.displayName = "Memo(" + (t.displayName || t.name) + ")", r.prototype.isReactComponent = !0, r.__f = !0, r;
|
|
1405
1405
|
}
|
|
1406
|
-
(fe.prototype = new
|
|
1406
|
+
(fe.prototype = new L()).isPureReactComponent = !0, fe.prototype.shouldComponentUpdate = function(t, e) {
|
|
1407
1407
|
return he(this.props, t) || he(this.state, e);
|
|
1408
1408
|
};
|
|
1409
1409
|
var ha = w.__b;
|
|
@@ -1477,7 +1477,7 @@ function mt() {
|
|
|
1477
1477
|
w.unmount = function(t) {
|
|
1478
1478
|
var e = t.__c;
|
|
1479
1479
|
e && e.__R && e.__R(), e && t.__h === !0 && (t.type = null), wa && wa(t);
|
|
1480
|
-
}, (kt.prototype = new
|
|
1480
|
+
}, (kt.prototype = new L()).__c = function(t, e) {
|
|
1481
1481
|
var a = e.__c, r = this;
|
|
1482
1482
|
r.t == null && (r.t = []), r.t.push(a);
|
|
1483
1483
|
var o = vr(r.__v), i = !1, n = function() {
|
|
@@ -1540,7 +1540,7 @@ function Js(t, e) {
|
|
|
1540
1540
|
var a = A(Zs, { __v: t, i: e });
|
|
1541
1541
|
return a.containerInfo = e, a;
|
|
1542
1542
|
}
|
|
1543
|
-
(mt.prototype = new
|
|
1543
|
+
(mt.prototype = new L()).__a = function(t) {
|
|
1544
1544
|
var e = this, a = vr(e.__v), r = e.o.get(t);
|
|
1545
1545
|
return r[0]++, function(o) {
|
|
1546
1546
|
var i = function() {
|
|
@@ -1570,8 +1570,8 @@ function ic(t, e, a) {
|
|
|
1570
1570
|
function oc(t, e, a) {
|
|
1571
1571
|
return tr(t, e), typeof a == "function" && a(), t ? t.__c : null;
|
|
1572
1572
|
}
|
|
1573
|
-
|
|
1574
|
-
Object.defineProperty(
|
|
1573
|
+
L.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t) {
|
|
1574
|
+
Object.defineProperty(L.prototype, t, { configurable: !0, get: function() {
|
|
1575
1575
|
return this["UNSAFE_" + t];
|
|
1576
1576
|
}, set: function(e) {
|
|
1577
1577
|
Object.defineProperty(this, t, { configurable: !0, writable: !0, value: e });
|
|
@@ -1662,7 +1662,7 @@ function yc(t, e) {
|
|
|
1662
1662
|
});
|
|
1663
1663
|
}, [t]), a;
|
|
1664
1664
|
}
|
|
1665
|
-
var
|
|
1665
|
+
var Ll = { useState: dr, useId: Rs, useReducer: ur, useEffect: pr, useLayoutEffect: It, useInsertionEffect: mc, useTransition: _c, useDeferredValue: vc, useSyncExternalStore: yc, startTransition: xr, useRef: ze, useImperativeHandle: Ls, useMemo: gt, useCallback: Hs, useContext: hr, useDebugValue: Bs, version: "17.0.2", Children: Gs, render: ic, hydrate: oc, unmountComponentAtNode: hc, createPortal: Js, createElement: A, createContext: er, createFactory: uc, cloneElement: pc, createRef: ys, Fragment: M, isValidElement: yr, findDOMNode: fc, Component: L, PureComponent: fe, memo: Ks, forwardRef: Ws, flushSync: gc, unstable_batchedUpdates: wc, StrictMode: bc, Suspense: kt, SuspenseList: mt, lazy: _r, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: dc };
|
|
1666
1666
|
const T = Symbol.for("@ts-pattern/matcher"), kr = Symbol.for("@ts-pattern/isVariadic"), Ut = "@ts-pattern/anonymous-select-key", we = (t) => !!(t && typeof t == "object"), Ft = (t) => t && !!t[T], C = (t, e, a) => {
|
|
1667
1667
|
if (Ft(t)) {
|
|
1668
1668
|
const r = t[T](), { matched: o, selections: i } = r.match(e);
|
|
@@ -1771,7 +1771,7 @@ function Ct(...t) {
|
|
|
1771
1771
|
}), selections: o };
|
|
1772
1772
|
}, getSelectionKeys: () => [e ?? Ut].concat(a === void 0 ? [] : D(a)) }) });
|
|
1773
1773
|
}
|
|
1774
|
-
function
|
|
1774
|
+
function H(t) {
|
|
1775
1775
|
return typeof t == "number";
|
|
1776
1776
|
}
|
|
1777
1777
|
function et(t) {
|
|
@@ -1794,7 +1794,7 @@ const Sr = P(_(function(t) {
|
|
|
1794
1794
|
}, regex: (e) => {
|
|
1795
1795
|
return at(x(t, (a = e, _((r) => et(r) && !!r.match(a)))));
|
|
1796
1796
|
var a;
|
|
1797
|
-
} }), Cc = at(_(et)), B = (t) => Object.assign(P(t), { between: (e, a) => B(x(t, ((r, o) => _((i) =>
|
|
1797
|
+
} }), Cc = at(_(et)), B = (t) => Object.assign(P(t), { between: (e, a) => B(x(t, ((r, o) => _((i) => H(i) && r <= i && o >= i))(e, a))), lt: (e) => B(x(t, ((a) => _((r) => H(r) && r < a))(e))), gt: (e) => B(x(t, ((a) => _((r) => H(r) && r > a))(e))), lte: (e) => B(x(t, ((a) => _((r) => H(r) && r <= a))(e))), gte: (e) => B(x(t, ((a) => _((r) => H(r) && r >= a))(e))), int: () => B(x(t, _((e) => H(e) && Number.isInteger(e)))), finite: () => B(x(t, _((e) => H(e) && Number.isFinite(e)))), positive: () => B(x(t, _((e) => H(e) && e > 0))), negative: () => B(x(t, _((e) => H(e) && e < 0))) }), Ec = B(_(H)), q = (t) => Object.assign(P(t), { between: (e, a) => q(x(t, ((r, o) => _((i) => K(i) && r <= i && o >= i))(e, a))), lt: (e) => q(x(t, ((a) => _((r) => K(r) && r < a))(e))), gt: (e) => q(x(t, ((a) => _((r) => K(r) && r > a))(e))), lte: (e) => q(x(t, ((a) => _((r) => K(r) && r <= a))(e))), gte: (e) => q(x(t, ((a) => _((r) => K(r) && r >= a))(e))), positive: () => q(x(t, _((e) => K(e) && e > 0))), negative: () => q(x(t, _((e) => K(e) && e < 0))) }), Pc = q(_(K)), Oc = P(_(function(t) {
|
|
1798
1798
|
return typeof t == "boolean";
|
|
1799
1799
|
})), Ic = P(_(function(t) {
|
|
1800
1800
|
return typeof t == "symbol";
|
|
@@ -1910,7 +1910,7 @@ class Vt {
|
|
|
1910
1910
|
return this;
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
|
-
|
|
1913
|
+
var jc = ["other", "few", "many", "two", "one", "zero"], ya = ({
|
|
1914
1914
|
terms: t,
|
|
1915
1915
|
overrides: e,
|
|
1916
1916
|
locale: a
|
|
@@ -1944,8 +1944,7 @@ const jc = ["other", "few", "many", "two", "one", "zero"], ya = ({
|
|
|
1944
1944
|
}
|
|
1945
1945
|
}
|
|
1946
1946
|
return o;
|
|
1947
|
-
};
|
|
1948
|
-
var zc = 0;
|
|
1947
|
+
}, zc = 0;
|
|
1949
1948
|
function f(t, e, a, r, o, i) {
|
|
1950
1949
|
var n, c, l = {};
|
|
1951
1950
|
for (c in e)
|
|
@@ -1956,43 +1955,23 @@ function f(t, e, a, r, o, i) {
|
|
|
1956
1955
|
l[c] === void 0 && (l[c] = n[c]);
|
|
1957
1956
|
return w.vnode && w.vnode(d), d;
|
|
1958
1957
|
}
|
|
1959
|
-
|
|
1960
|
-
TranslationProvider: ({
|
|
1961
|
-
terms: e,
|
|
1962
|
-
children: a
|
|
1963
|
-
locale: r
|
|
1964
|
-
}) => {
|
|
1965
|
-
const o = gt(() => (console.log("instantiating"), ya({
|
|
1966
|
-
locale: r,
|
|
1967
|
-
terms: t,
|
|
1968
|
-
overrides: e
|
|
1969
|
-
})), [e, r]);
|
|
1970
|
-
return f(xa.Provider, {
|
|
1971
|
-
value: {
|
|
1972
|
-
t: o,
|
|
1973
|
-
locale: r
|
|
1974
|
-
},
|
|
1975
|
-
children: a
|
|
1976
|
-
});
|
|
1958
|
+
var xa = er(null), Dc = (t) => ({
|
|
1959
|
+
TranslationProvider: ({ terms: e, children: a, locale: r }) => {
|
|
1960
|
+
const o = gt(() => (console.log("instantiating"), ya({ locale: r, terms: t, overrides: e })), [e, r]);
|
|
1961
|
+
return /* @__PURE__ */ f(xa.Provider, { value: { t: o, locale: r }, children: a });
|
|
1977
1962
|
},
|
|
1978
1963
|
useTranslation: () => {
|
|
1979
1964
|
const e = hr(xa);
|
|
1980
1965
|
if (e === null)
|
|
1981
1966
|
throw new Error("Please wrap useTranslation in a TranslationProvider");
|
|
1982
|
-
return {
|
|
1983
|
-
t: e.t,
|
|
1984
|
-
locale: e.locale
|
|
1985
|
-
};
|
|
1967
|
+
return { t: e.t, locale: e.locale };
|
|
1986
1968
|
},
|
|
1987
1969
|
createTFunction: ({
|
|
1988
1970
|
overrides: e,
|
|
1989
1971
|
locale: a
|
|
1990
|
-
}) => ya({
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
locale: a
|
|
1994
|
-
})
|
|
1995
|
-
}), {
|
|
1972
|
+
}) => ya({ terms: t, overrides: e, locale: a })
|
|
1973
|
+
});
|
|
1974
|
+
const {
|
|
1996
1975
|
TranslationProvider: Ac,
|
|
1997
1976
|
useTranslation: Cr,
|
|
1998
1977
|
createTFunction: Nc
|
|
@@ -2025,6 +2004,14 @@ const xa = er(null), Dc = (t) => ({
|
|
|
2025
2004
|
back: "Back",
|
|
2026
2005
|
search: "Search",
|
|
2027
2006
|
unknown_error: "An error occurred",
|
|
2007
|
+
line1: "Line 1",
|
|
2008
|
+
line2: "Line 2",
|
|
2009
|
+
line3: "Line 3",
|
|
2010
|
+
city: "City",
|
|
2011
|
+
state: "State",
|
|
2012
|
+
postcode: "Postcode",
|
|
2013
|
+
country: "Country",
|
|
2014
|
+
select_country: "Select a country",
|
|
2028
2015
|
validation_max_chars: "Please enter no more than {{count}} characters",
|
|
2029
2016
|
validation_min_chars: "Please enter {{count}} or more characters",
|
|
2030
2017
|
validation_phone: "Please enter a valid phone number",
|
|
@@ -2097,7 +2084,7 @@ E.prototype.U = function(t) {
|
|
|
2097
2084
|
};
|
|
2098
2085
|
E.prototype.subscribe = function(t) {
|
|
2099
2086
|
var e = this;
|
|
2100
|
-
return
|
|
2087
|
+
return He(function() {
|
|
2101
2088
|
var a = e.value, r = 32 & this.f;
|
|
2102
2089
|
this.f &= -33;
|
|
2103
2090
|
try {
|
|
@@ -2226,21 +2213,21 @@ function jr(t) {
|
|
|
2226
2213
|
try {
|
|
2227
2214
|
e();
|
|
2228
2215
|
} catch (r) {
|
|
2229
|
-
throw t.f &= -2, t.f |= 8,
|
|
2216
|
+
throw t.f &= -2, t.f |= 8, Le(t), r;
|
|
2230
2217
|
} finally {
|
|
2231
2218
|
k = a, Fe();
|
|
2232
2219
|
}
|
|
2233
2220
|
}
|
|
2234
2221
|
}
|
|
2235
|
-
function
|
|
2222
|
+
function Le(t) {
|
|
2236
2223
|
for (var e = t.s; e !== void 0; e = e.n)
|
|
2237
2224
|
e.S.U(e);
|
|
2238
2225
|
t.x = void 0, t.s = void 0, jr(t);
|
|
2239
2226
|
}
|
|
2240
|
-
function
|
|
2227
|
+
function Lc(t) {
|
|
2241
2228
|
if (k !== this)
|
|
2242
2229
|
throw new Error("Out-of-order effect");
|
|
2243
|
-
Tr(this), k = t, this.f &= -2, 8 & this.f &&
|
|
2230
|
+
Tr(this), k = t, this.f &= -2, 8 & this.f && Le(this), Fe();
|
|
2244
2231
|
}
|
|
2245
2232
|
function Tt(t) {
|
|
2246
2233
|
this.x = t, this.u = void 0, this.s = void 0, this.o = void 0, this.f = 32;
|
|
@@ -2259,15 +2246,15 @@ Tt.prototype.c = function() {
|
|
|
2259
2246
|
Tt.prototype.S = function() {
|
|
2260
2247
|
1 & this.f && Zt(), this.f |= 1, this.f &= -9, jr(this), Ir(this), lt++;
|
|
2261
2248
|
var t = k;
|
|
2262
|
-
return k = this,
|
|
2249
|
+
return k = this, Lc.bind(this, t);
|
|
2263
2250
|
};
|
|
2264
2251
|
Tt.prototype.N = function() {
|
|
2265
2252
|
2 & this.f || (this.f |= 2, this.o = $t, $t = this);
|
|
2266
2253
|
};
|
|
2267
2254
|
Tt.prototype.d = function() {
|
|
2268
|
-
this.f |= 8, 1 & this.f ||
|
|
2255
|
+
this.f |= 8, 1 & this.f || Le(this);
|
|
2269
2256
|
};
|
|
2270
|
-
function
|
|
2257
|
+
function He(t) {
|
|
2271
2258
|
var e = new Tt(t);
|
|
2272
2259
|
try {
|
|
2273
2260
|
e.c();
|
|
@@ -2323,7 +2310,7 @@ bt("__r", function(t, e) {
|
|
|
2323
2310
|
var a, r = e.__c;
|
|
2324
2311
|
r && (r.__$f &= -2, (a = r.__$u) === void 0 && (r.__$u = a = function(o) {
|
|
2325
2312
|
var i;
|
|
2326
|
-
return
|
|
2313
|
+
return He(function() {
|
|
2327
2314
|
i = this;
|
|
2328
2315
|
}), i.c = function() {
|
|
2329
2316
|
r.__$f |= 1, r.setState({});
|
|
@@ -2349,17 +2336,17 @@ bt("diffed", function(t, e) {
|
|
|
2349
2336
|
a.U = i = {};
|
|
2350
2337
|
for (var l in r) {
|
|
2351
2338
|
var d = i[l], u = r[l];
|
|
2352
|
-
d === void 0 ? (d =
|
|
2339
|
+
d === void 0 ? (d = Hc(a, l, u, o), i[l] = d) : d.o(u, o);
|
|
2353
2340
|
}
|
|
2354
2341
|
}
|
|
2355
2342
|
}
|
|
2356
2343
|
t(e);
|
|
2357
2344
|
});
|
|
2358
|
-
function
|
|
2345
|
+
function Hc(t, e, a, r) {
|
|
2359
2346
|
var o = e in t && t.ownerSVGElement === void 0, i = Et(a);
|
|
2360
2347
|
return { o: function(n, c) {
|
|
2361
2348
|
i.value = n, r = c;
|
|
2362
|
-
}, d:
|
|
2349
|
+
}, d: He(function() {
|
|
2363
2350
|
var n = i.value.value;
|
|
2364
2351
|
r[e] !== n && (r[e] = n, o ? t[e] = n : n ? t.setAttribute(e, n) : t.removeAttribute(e));
|
|
2365
2352
|
}) };
|
|
@@ -2389,7 +2376,7 @@ bt("unmount", function(t, e) {
|
|
|
2389
2376
|
bt("__h", function(t, e, a, r) {
|
|
2390
2377
|
(r < 3 || r === 9) && (e.__$f |= 2), t(e, a, r);
|
|
2391
2378
|
});
|
|
2392
|
-
|
|
2379
|
+
L.prototype.shouldComponentUpdate = function(t, e) {
|
|
2393
2380
|
var a = this.__$u;
|
|
2394
2381
|
if (!(a && a.s !== void 0 || 4 & this.__$f) || 3 & this.__$f)
|
|
2395
2382
|
return !0;
|
|
@@ -2566,7 +2553,7 @@ Dr((t) => ({
|
|
|
2566
2553
|
return Ea(e, a) || t.has(e, a);
|
|
2567
2554
|
}
|
|
2568
2555
|
}));
|
|
2569
|
-
const
|
|
2556
|
+
const Hl = (t) => Me(t).with(nt.number.lte(1e3), () => `${Math.round(t)}KB`).with(nt.number.lt(1e3 * 10), () => `${(t / 1e3).toFixed(1)}MB`).otherwise(() => `${Math.round(t / 1e3)}MB`), Bl = (t) => {
|
|
2570
2557
|
const e = t.find((a) => a.isHead);
|
|
2571
2558
|
if (!e)
|
|
2572
2559
|
throw new Error("No head node found");
|
|
@@ -2624,7 +2611,7 @@ const Kl = (t) => typeof t == "string", el = () => typeof crypto < "u" && "rando
|
|
|
2624
2611
|
const e = Ia(t);
|
|
2625
2612
|
return (a = await Oa) == null ? void 0 : a.put("state", t.data, e);
|
|
2626
2613
|
}, 1e3)
|
|
2627
|
-
},
|
|
2614
|
+
}, Lt = (t, e, a, r = 0) => {
|
|
2628
2615
|
if (!e.nextId)
|
|
2629
2616
|
return a(e.id, {
|
|
2630
2617
|
stepsMade: r,
|
|
@@ -2641,7 +2628,7 @@ const Kl = (t) => typeof t == "string", el = () => typeof crypto < "u" && "rando
|
|
|
2641
2628
|
};
|
|
2642
2629
|
const i = e.type === "if-block" ? e.branchId : void 0, n = t.find((d) => d.id === i), c = e.type.includes("question") ? 1 : 0;
|
|
2643
2630
|
if (n) {
|
|
2644
|
-
const d = c + Math.max(
|
|
2631
|
+
const d = c + Math.max(Lt(t, o, a, r + c).remainingSteps, Lt(t, n, a, r + c).remainingSteps);
|
|
2645
2632
|
return a(e.id, {
|
|
2646
2633
|
stepsMade: r,
|
|
2647
2634
|
remainingSteps: d
|
|
@@ -2650,7 +2637,7 @@ const Kl = (t) => typeof t == "string", el = () => typeof crypto < "u" && "rando
|
|
|
2650
2637
|
remainingSteps: d
|
|
2651
2638
|
};
|
|
2652
2639
|
}
|
|
2653
|
-
const l = c +
|
|
2640
|
+
const l = c + Lt(t, o, a, r + c).remainingSteps;
|
|
2654
2641
|
return a(e.id, {
|
|
2655
2642
|
stepsMade: r,
|
|
2656
2643
|
remainingSteps: l
|
|
@@ -2660,7 +2647,7 @@ const Kl = (t) => typeof t == "string", el = () => typeof crypto < "u" && "rando
|
|
|
2660
2647
|
};
|
|
2661
2648
|
}, al = (t) => {
|
|
2662
2649
|
const e = {}, a = t.find((r) => r.isHead);
|
|
2663
|
-
return a &&
|
|
2650
|
+
return a && Lt(t, a, (r, o) => {
|
|
2664
2651
|
e[r] = o;
|
|
2665
2652
|
}), e;
|
|
2666
2653
|
}, Ia = (t) => [...t.flowKeys, t.id, t.version].join("/"), W = Et({
|
|
@@ -2995,7 +2982,7 @@ const Kl = (t) => typeof t == "string", el = () => typeof crypto < "u" && "rando
|
|
|
2995
2982
|
};
|
|
2996
2983
|
function oe() {
|
|
2997
2984
|
}
|
|
2998
|
-
const cl = _r(() => import("./chatbot-body-
|
|
2985
|
+
const cl = _r(() => import("./chatbot-body-3dfd1aa9.js").then((t) => t.ChatbotBody)), ja = Fs("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out", {
|
|
2999
2986
|
variants: {
|
|
3000
2987
|
view: {
|
|
3001
2988
|
closed: "hidden",
|
|
@@ -3486,7 +3473,7 @@ export {
|
|
|
3486
3473
|
ra as B,
|
|
3487
3474
|
Cl as C,
|
|
3488
3475
|
Ul as D,
|
|
3489
|
-
|
|
3476
|
+
Ll as E,
|
|
3490
3477
|
gt as F,
|
|
3491
3478
|
El as G,
|
|
3492
3479
|
Il as H,
|
|
@@ -3516,7 +3503,7 @@ export {
|
|
|
3516
3503
|
dr as h,
|
|
3517
3504
|
Kl as i,
|
|
3518
3505
|
Et as j,
|
|
3519
|
-
|
|
3506
|
+
Hl as k,
|
|
3520
3507
|
Fs as l,
|
|
3521
3508
|
it as m,
|
|
3522
3509
|
Is as n,
|
package/dist/plugin-chatbot.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-8ae8589d.cjs");require("@inploi/sdk");exports.chatbotPlugin=e.chatbotPlugin;
|
package/dist/plugin-chatbot.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inploi/plugin-chatbot",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/plugin-chatbot.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"lodash": "^4.17.21",
|
|
20
|
-
"react-use-measure": "^2.1.1"
|
|
20
|
+
"react-use-measure": "^2.1.1",
|
|
21
|
+
"@inploi/i18n": "0.1.2"
|
|
21
22
|
},
|
|
22
23
|
"peerDependencies": {
|
|
23
24
|
"@inploi/sdk": "*",
|
|
@@ -65,10 +66,9 @@
|
|
|
65
66
|
"vite-tsconfig-paths": "^4.2.1",
|
|
66
67
|
"@inploi/core": "1.15.2",
|
|
67
68
|
"@inploi/design-tokens": "0.2.1",
|
|
68
|
-
"@inploi/plugin-feedback": "0.4.
|
|
69
|
+
"@inploi/plugin-feedback": "0.4.2",
|
|
69
70
|
"@inploi/sdk": "1.14.11",
|
|
70
71
|
"eslint-config-custom": "0.1.0",
|
|
71
|
-
"i18n": "0.1.1",
|
|
72
72
|
"tsconfig": "0.1.0"
|
|
73
73
|
},
|
|
74
74
|
"msw": {
|