@botpress/webchat 2.2.11 → 2.2.13
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/.turbo/turbo-build.log +6 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.js +86 -85
- package/dist/index.umd.cjs +18 -18
- package/dist/styles/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ var FD = Object.defineProperty;
|
|
|
3
3
|
var qD = (e, t, r) => t in e ? FD(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
4
4
|
var k = (e, t, r) => (qD(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
5
5
|
import * as I from "react";
|
|
6
|
-
import Vt, { createContext as li, useMemo as Sn, createElement as jt, useContext as Ao, useRef as
|
|
6
|
+
import Vt, { createContext as li, useMemo as Sn, createElement as jt, useContext as Ao, useRef as pt, useEffect as ht, useLayoutEffect as Si, useCallback as Zt, forwardRef as Rt, Children as ss, isValidElement as Md, cloneElement as Uv, Fragment as oT, useState as _t, useDebugValue as BD, useId as UD, memo as _p, useReducer as zD } from "react";
|
|
7
7
|
import * as ZD from "react-dom";
|
|
8
8
|
import { flushSync as aT, createPortal as VD } from "react-dom";
|
|
9
9
|
var Ke = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -11270,7 +11270,7 @@ function p5(...e) {
|
|
|
11270
11270
|
return r.scopeName = t.scopeName, r;
|
|
11271
11271
|
}
|
|
11272
11272
|
function Ia(e) {
|
|
11273
|
-
const t =
|
|
11273
|
+
const t = pt(e);
|
|
11274
11274
|
return ht(() => {
|
|
11275
11275
|
t.current = e;
|
|
11276
11276
|
}), Sn(
|
|
@@ -12233,7 +12233,7 @@ const Nx = (e, t) => {
|
|
|
12233
12233
|
}
|
|
12234
12234
|
};
|
|
12235
12235
|
};
|
|
12236
|
-
function
|
|
12236
|
+
function dt(e) {
|
|
12237
12237
|
if (!e)
|
|
12238
12238
|
return {};
|
|
12239
12239
|
const { errorMap: t, invalid_type_error: r, required_error: n, description: o } = e;
|
|
@@ -12373,7 +12373,7 @@ class yt {
|
|
|
12373
12373
|
}
|
|
12374
12374
|
transform(t) {
|
|
12375
12375
|
return new io({
|
|
12376
|
-
...
|
|
12376
|
+
...dt(this._def),
|
|
12377
12377
|
schema: this,
|
|
12378
12378
|
typeName: ot.ZodEffects,
|
|
12379
12379
|
effect: { type: "transform", transform: t }
|
|
@@ -12382,7 +12382,7 @@ class yt {
|
|
|
12382
12382
|
default(t) {
|
|
12383
12383
|
const r = typeof t == "function" ? t : () => t;
|
|
12384
12384
|
return new sl({
|
|
12385
|
-
...
|
|
12385
|
+
...dt(this._def),
|
|
12386
12386
|
innerType: this,
|
|
12387
12387
|
defaultValue: r,
|
|
12388
12388
|
typeName: ot.ZodDefault
|
|
@@ -12392,13 +12392,13 @@ class yt {
|
|
|
12392
12392
|
return new iA({
|
|
12393
12393
|
typeName: ot.ZodBranded,
|
|
12394
12394
|
type: this,
|
|
12395
|
-
...
|
|
12395
|
+
...dt(this._def)
|
|
12396
12396
|
});
|
|
12397
12397
|
}
|
|
12398
12398
|
catch(t) {
|
|
12399
12399
|
const r = typeof t == "function" ? t : () => t;
|
|
12400
12400
|
return new Lf({
|
|
12401
|
-
...
|
|
12401
|
+
...dt(this._def),
|
|
12402
12402
|
innerType: this,
|
|
12403
12403
|
catchValue: r,
|
|
12404
12404
|
typeName: ot.ZodCatch
|
|
@@ -12728,7 +12728,7 @@ Xn.create = (e) => {
|
|
|
12728
12728
|
checks: [],
|
|
12729
12729
|
typeName: ot.ZodString,
|
|
12730
12730
|
coerce: (t = e == null ? void 0 : e.coerce) !== null && t !== void 0 ? t : !1,
|
|
12731
|
-
...
|
|
12731
|
+
...dt(e)
|
|
12732
12732
|
});
|
|
12733
12733
|
};
|
|
12734
12734
|
function h4(e, t) {
|
|
@@ -12905,7 +12905,7 @@ Na.create = (e) => new Na({
|
|
|
12905
12905
|
checks: [],
|
|
12906
12906
|
typeName: ot.ZodNumber,
|
|
12907
12907
|
coerce: (e == null ? void 0 : e.coerce) || !1,
|
|
12908
|
-
...
|
|
12908
|
+
...dt(e)
|
|
12909
12909
|
});
|
|
12910
12910
|
class ja extends yt {
|
|
12911
12911
|
constructor() {
|
|
@@ -13032,7 +13032,7 @@ ja.create = (e) => {
|
|
|
13032
13032
|
checks: [],
|
|
13033
13033
|
typeName: ot.ZodBigInt,
|
|
13034
13034
|
coerce: (t = e == null ? void 0 : e.coerce) !== null && t !== void 0 ? t : !1,
|
|
13035
|
-
...
|
|
13035
|
+
...dt(e)
|
|
13036
13036
|
});
|
|
13037
13037
|
};
|
|
13038
13038
|
class Xc extends yt {
|
|
@@ -13051,7 +13051,7 @@ class Xc extends yt {
|
|
|
13051
13051
|
Xc.create = (e) => new Xc({
|
|
13052
13052
|
typeName: ot.ZodBoolean,
|
|
13053
13053
|
coerce: (e == null ? void 0 : e.coerce) || !1,
|
|
13054
|
-
...
|
|
13054
|
+
...dt(e)
|
|
13055
13055
|
});
|
|
13056
13056
|
class pi extends yt {
|
|
13057
13057
|
_parse(t) {
|
|
@@ -13129,7 +13129,7 @@ pi.create = (e) => new pi({
|
|
|
13129
13129
|
checks: [],
|
|
13130
13130
|
coerce: (e == null ? void 0 : e.coerce) || !1,
|
|
13131
13131
|
typeName: ot.ZodDate,
|
|
13132
|
-
...
|
|
13132
|
+
...dt(e)
|
|
13133
13133
|
});
|
|
13134
13134
|
class jf extends yt {
|
|
13135
13135
|
_parse(t) {
|
|
@@ -13146,7 +13146,7 @@ class jf extends yt {
|
|
|
13146
13146
|
}
|
|
13147
13147
|
jf.create = (e) => new jf({
|
|
13148
13148
|
typeName: ot.ZodSymbol,
|
|
13149
|
-
...
|
|
13149
|
+
...dt(e)
|
|
13150
13150
|
});
|
|
13151
13151
|
class Qc extends yt {
|
|
13152
13152
|
_parse(t) {
|
|
@@ -13163,7 +13163,7 @@ class Qc extends yt {
|
|
|
13163
13163
|
}
|
|
13164
13164
|
Qc.create = (e) => new Qc({
|
|
13165
13165
|
typeName: ot.ZodUndefined,
|
|
13166
|
-
...
|
|
13166
|
+
...dt(e)
|
|
13167
13167
|
});
|
|
13168
13168
|
class el extends yt {
|
|
13169
13169
|
_parse(t) {
|
|
@@ -13180,7 +13180,7 @@ class el extends yt {
|
|
|
13180
13180
|
}
|
|
13181
13181
|
el.create = (e) => new el({
|
|
13182
13182
|
typeName: ot.ZodNull,
|
|
13183
|
-
...
|
|
13183
|
+
...dt(e)
|
|
13184
13184
|
});
|
|
13185
13185
|
class ks extends yt {
|
|
13186
13186
|
constructor() {
|
|
@@ -13192,7 +13192,7 @@ class ks extends yt {
|
|
|
13192
13192
|
}
|
|
13193
13193
|
ks.create = (e) => new ks({
|
|
13194
13194
|
typeName: ot.ZodAny,
|
|
13195
|
-
...
|
|
13195
|
+
...dt(e)
|
|
13196
13196
|
});
|
|
13197
13197
|
class ti extends yt {
|
|
13198
13198
|
constructor() {
|
|
@@ -13204,7 +13204,7 @@ class ti extends yt {
|
|
|
13204
13204
|
}
|
|
13205
13205
|
ti.create = (e) => new ti({
|
|
13206
13206
|
typeName: ot.ZodUnknown,
|
|
13207
|
-
...
|
|
13207
|
+
...dt(e)
|
|
13208
13208
|
});
|
|
13209
13209
|
class ea extends yt {
|
|
13210
13210
|
_parse(t) {
|
|
@@ -13218,7 +13218,7 @@ class ea extends yt {
|
|
|
13218
13218
|
}
|
|
13219
13219
|
ea.create = (e) => new ea({
|
|
13220
13220
|
typeName: ot.ZodNever,
|
|
13221
|
-
...
|
|
13221
|
+
...dt(e)
|
|
13222
13222
|
});
|
|
13223
13223
|
class Mf extends yt {
|
|
13224
13224
|
_parse(t) {
|
|
@@ -13235,7 +13235,7 @@ class Mf extends yt {
|
|
|
13235
13235
|
}
|
|
13236
13236
|
Mf.create = (e) => new Mf({
|
|
13237
13237
|
typeName: ot.ZodVoid,
|
|
13238
|
-
...
|
|
13238
|
+
...dt(e)
|
|
13239
13239
|
});
|
|
13240
13240
|
class oo extends yt {
|
|
13241
13241
|
_parse(t) {
|
|
@@ -13308,7 +13308,7 @@ oo.create = (e, t) => new oo({
|
|
|
13308
13308
|
maxLength: null,
|
|
13309
13309
|
exactLength: null,
|
|
13310
13310
|
typeName: ot.ZodArray,
|
|
13311
|
-
...
|
|
13311
|
+
...dt(t)
|
|
13312
13312
|
});
|
|
13313
13313
|
function Yi(e) {
|
|
13314
13314
|
if (e instanceof lr) {
|
|
@@ -13599,21 +13599,21 @@ lr.create = (e, t) => new lr({
|
|
|
13599
13599
|
unknownKeys: "strip",
|
|
13600
13600
|
catchall: ea.create(),
|
|
13601
13601
|
typeName: ot.ZodObject,
|
|
13602
|
-
...
|
|
13602
|
+
...dt(t)
|
|
13603
13603
|
});
|
|
13604
13604
|
lr.strictCreate = (e, t) => new lr({
|
|
13605
13605
|
shape: () => e,
|
|
13606
13606
|
unknownKeys: "strict",
|
|
13607
13607
|
catchall: ea.create(),
|
|
13608
13608
|
typeName: ot.ZodObject,
|
|
13609
|
-
...
|
|
13609
|
+
...dt(t)
|
|
13610
13610
|
});
|
|
13611
13611
|
lr.lazycreate = (e, t) => new lr({
|
|
13612
13612
|
shape: e,
|
|
13613
13613
|
unknownKeys: "strip",
|
|
13614
13614
|
catchall: ea.create(),
|
|
13615
13615
|
typeName: ot.ZodObject,
|
|
13616
|
-
...
|
|
13616
|
+
...dt(t)
|
|
13617
13617
|
});
|
|
13618
13618
|
class tl extends yt {
|
|
13619
13619
|
_parse(t) {
|
|
@@ -13686,7 +13686,7 @@ class tl extends yt {
|
|
|
13686
13686
|
tl.create = (e, t) => new tl({
|
|
13687
13687
|
options: e,
|
|
13688
13688
|
typeName: ot.ZodUnion,
|
|
13689
|
-
...
|
|
13689
|
+
...dt(t)
|
|
13690
13690
|
});
|
|
13691
13691
|
const ud = (e) => e instanceof ol ? ud(e.schema) : e instanceof io ? ud(e.innerType()) : e instanceof al ? [e.value] : e instanceof Ma ? e.options : e instanceof il ? Object.keys(e.enum) : e instanceof sl ? ud(e._def.innerType) : e instanceof Qc ? [void 0] : e instanceof el ? [null] : null;
|
|
13692
13692
|
class Qp extends yt {
|
|
@@ -13747,7 +13747,7 @@ class Qp extends yt {
|
|
|
13747
13747
|
discriminator: t,
|
|
13748
13748
|
options: r,
|
|
13749
13749
|
optionsMap: o,
|
|
13750
|
-
...
|
|
13750
|
+
...dt(n)
|
|
13751
13751
|
});
|
|
13752
13752
|
}
|
|
13753
13753
|
}
|
|
@@ -13814,7 +13814,7 @@ rl.create = (e, t, r) => new rl({
|
|
|
13814
13814
|
left: e,
|
|
13815
13815
|
right: t,
|
|
13816
13816
|
typeName: ot.ZodIntersection,
|
|
13817
|
-
...
|
|
13817
|
+
...dt(r)
|
|
13818
13818
|
});
|
|
13819
13819
|
class Co extends yt {
|
|
13820
13820
|
_parse(t) {
|
|
@@ -13863,7 +13863,7 @@ Co.create = (e, t) => {
|
|
|
13863
13863
|
items: e,
|
|
13864
13864
|
typeName: ot.ZodTuple,
|
|
13865
13865
|
rest: null,
|
|
13866
|
-
...
|
|
13866
|
+
...dt(t)
|
|
13867
13867
|
});
|
|
13868
13868
|
};
|
|
13869
13869
|
class nl extends yt {
|
|
@@ -13897,12 +13897,12 @@ class nl extends yt {
|
|
|
13897
13897
|
keyType: t,
|
|
13898
13898
|
valueType: r,
|
|
13899
13899
|
typeName: ot.ZodRecord,
|
|
13900
|
-
...
|
|
13900
|
+
...dt(n)
|
|
13901
13901
|
}) : new nl({
|
|
13902
13902
|
keyType: Xn.create(),
|
|
13903
13903
|
valueType: t,
|
|
13904
13904
|
typeName: ot.ZodRecord,
|
|
13905
|
-
...
|
|
13905
|
+
...dt(r)
|
|
13906
13906
|
});
|
|
13907
13907
|
}
|
|
13908
13908
|
}
|
|
@@ -13952,7 +13952,7 @@ Df.create = (e, t, r) => new Df({
|
|
|
13952
13952
|
valueType: t,
|
|
13953
13953
|
keyType: e,
|
|
13954
13954
|
typeName: ot.ZodMap,
|
|
13955
|
-
...
|
|
13955
|
+
...dt(r)
|
|
13956
13956
|
});
|
|
13957
13957
|
class hi extends yt {
|
|
13958
13958
|
_parse(t) {
|
|
@@ -14016,7 +14016,7 @@ hi.create = (e, t) => new hi({
|
|
|
14016
14016
|
minSize: null,
|
|
14017
14017
|
maxSize: null,
|
|
14018
14018
|
typeName: ot.ZodSet,
|
|
14019
|
-
...
|
|
14019
|
+
...dt(t)
|
|
14020
14020
|
});
|
|
14021
14021
|
class ds extends yt {
|
|
14022
14022
|
constructor() {
|
|
@@ -14115,7 +14115,7 @@ class ds extends yt {
|
|
|
14115
14115
|
args: t || Co.create([]).rest(ti.create()),
|
|
14116
14116
|
returns: r || ti.create(),
|
|
14117
14117
|
typeName: ot.ZodFunction,
|
|
14118
|
-
...
|
|
14118
|
+
...dt(n)
|
|
14119
14119
|
});
|
|
14120
14120
|
}
|
|
14121
14121
|
}
|
|
@@ -14131,7 +14131,7 @@ class ol extends yt {
|
|
|
14131
14131
|
ol.create = (e, t) => new ol({
|
|
14132
14132
|
getter: e,
|
|
14133
14133
|
typeName: ot.ZodLazy,
|
|
14134
|
-
...
|
|
14134
|
+
...dt(t)
|
|
14135
14135
|
});
|
|
14136
14136
|
class al extends yt {
|
|
14137
14137
|
_parse(t) {
|
|
@@ -14152,13 +14152,13 @@ class al extends yt {
|
|
|
14152
14152
|
al.create = (e, t) => new al({
|
|
14153
14153
|
value: e,
|
|
14154
14154
|
typeName: ot.ZodLiteral,
|
|
14155
|
-
...
|
|
14155
|
+
...dt(t)
|
|
14156
14156
|
});
|
|
14157
14157
|
function aA(e, t) {
|
|
14158
14158
|
return new Ma({
|
|
14159
14159
|
values: e,
|
|
14160
14160
|
typeName: ot.ZodEnum,
|
|
14161
|
-
...
|
|
14161
|
+
...dt(t)
|
|
14162
14162
|
});
|
|
14163
14163
|
}
|
|
14164
14164
|
class Ma extends yt {
|
|
@@ -14238,7 +14238,7 @@ class il extends yt {
|
|
|
14238
14238
|
il.create = (e, t) => new il({
|
|
14239
14239
|
values: e,
|
|
14240
14240
|
typeName: ot.ZodNativeEnum,
|
|
14241
|
-
...
|
|
14241
|
+
...dt(t)
|
|
14242
14242
|
});
|
|
14243
14243
|
class Ts extends yt {
|
|
14244
14244
|
unwrap() {
|
|
@@ -14262,7 +14262,7 @@ class Ts extends yt {
|
|
|
14262
14262
|
Ts.create = (e, t) => new Ts({
|
|
14263
14263
|
type: e,
|
|
14264
14264
|
typeName: ot.ZodPromise,
|
|
14265
|
-
...
|
|
14265
|
+
...dt(t)
|
|
14266
14266
|
});
|
|
14267
14267
|
class io extends yt {
|
|
14268
14268
|
innerType() {
|
|
@@ -14336,13 +14336,13 @@ io.create = (e, t, r) => new io({
|
|
|
14336
14336
|
schema: e,
|
|
14337
14337
|
typeName: ot.ZodEffects,
|
|
14338
14338
|
effect: t,
|
|
14339
|
-
...
|
|
14339
|
+
...dt(r)
|
|
14340
14340
|
});
|
|
14341
14341
|
io.createWithPreprocess = (e, t, r) => new io({
|
|
14342
14342
|
schema: t,
|
|
14343
14343
|
effect: { type: "preprocess", transform: e },
|
|
14344
14344
|
typeName: ot.ZodEffects,
|
|
14345
|
-
...
|
|
14345
|
+
...dt(r)
|
|
14346
14346
|
});
|
|
14347
14347
|
class Vo extends yt {
|
|
14348
14348
|
_parse(t) {
|
|
@@ -14355,7 +14355,7 @@ class Vo extends yt {
|
|
|
14355
14355
|
Vo.create = (e, t) => new Vo({
|
|
14356
14356
|
innerType: e,
|
|
14357
14357
|
typeName: ot.ZodOptional,
|
|
14358
|
-
...
|
|
14358
|
+
...dt(t)
|
|
14359
14359
|
});
|
|
14360
14360
|
class mi extends yt {
|
|
14361
14361
|
_parse(t) {
|
|
@@ -14368,7 +14368,7 @@ class mi extends yt {
|
|
|
14368
14368
|
mi.create = (e, t) => new mi({
|
|
14369
14369
|
innerType: e,
|
|
14370
14370
|
typeName: ot.ZodNullable,
|
|
14371
|
-
...
|
|
14371
|
+
...dt(t)
|
|
14372
14372
|
});
|
|
14373
14373
|
class sl extends yt {
|
|
14374
14374
|
_parse(t) {
|
|
@@ -14388,7 +14388,7 @@ sl.create = (e, t) => new sl({
|
|
|
14388
14388
|
innerType: e,
|
|
14389
14389
|
typeName: ot.ZodDefault,
|
|
14390
14390
|
defaultValue: typeof t.default == "function" ? t.default : () => t.default,
|
|
14391
|
-
...
|
|
14391
|
+
...dt(t)
|
|
14392
14392
|
});
|
|
14393
14393
|
class Lf extends yt {
|
|
14394
14394
|
_parse(t) {
|
|
@@ -14431,7 +14431,7 @@ Lf.create = (e, t) => new Lf({
|
|
|
14431
14431
|
innerType: e,
|
|
14432
14432
|
typeName: ot.ZodCatch,
|
|
14433
14433
|
catchValue: typeof t.catch == "function" ? t.catch : () => t.catch,
|
|
14434
|
-
...
|
|
14434
|
+
...dt(t)
|
|
14435
14435
|
});
|
|
14436
14436
|
class Ff extends yt {
|
|
14437
14437
|
_parse(t) {
|
|
@@ -14448,7 +14448,7 @@ class Ff extends yt {
|
|
|
14448
14448
|
}
|
|
14449
14449
|
Ff.create = (e) => new Ff({
|
|
14450
14450
|
typeName: ot.ZodNaN,
|
|
14451
|
-
...
|
|
14451
|
+
...dt(e)
|
|
14452
14452
|
});
|
|
14453
14453
|
const m4 = Symbol("zod_brand");
|
|
14454
14454
|
class iA extends yt {
|
|
@@ -14513,7 +14513,7 @@ class qf extends yt {
|
|
|
14513
14513
|
qf.create = (e, t) => new qf({
|
|
14514
14514
|
innerType: e,
|
|
14515
14515
|
typeName: ot.ZodReadonly,
|
|
14516
|
-
...
|
|
14516
|
+
...dt(t)
|
|
14517
14517
|
});
|
|
14518
14518
|
const sA = (e, t = {}, r) => e ? ks.create().superRefine((n, o) => {
|
|
14519
14519
|
var a, i;
|
|
@@ -31939,7 +31939,7 @@ var OQ = ({ id: e, className: t, style: r, onHeightUpdate: n, children: o }) =>
|
|
|
31939
31939
|
}, rp.apply(this, arguments);
|
|
31940
31940
|
};
|
|
31941
31941
|
function IQ() {
|
|
31942
|
-
var e =
|
|
31942
|
+
var e = pt(!1), t = Zt(function() {
|
|
31943
31943
|
return e.current;
|
|
31944
31944
|
}, []);
|
|
31945
31945
|
return ht(function() {
|
|
@@ -31950,7 +31950,7 @@ function IQ() {
|
|
|
31950
31950
|
}
|
|
31951
31951
|
function PQ(e, t, r) {
|
|
31952
31952
|
t === void 0 && (t = []), r === void 0 && (r = { loading: !1 });
|
|
31953
|
-
var n =
|
|
31953
|
+
var n = pt(0), o = IQ(), a = _t(r), i = a[0], s = a[1], c = Zt(function() {
|
|
31954
31954
|
for (var l = [], u = 0; u < arguments.length; u++)
|
|
31955
31955
|
l[u] = arguments[u];
|
|
31956
31956
|
var d = ++n.current;
|
|
@@ -31988,7 +31988,7 @@ var MQ = function(e) {
|
|
|
31988
31988
|
};
|
|
31989
31989
|
const DQ = MQ;
|
|
31990
31990
|
var LQ = function(e) {
|
|
31991
|
-
var t =
|
|
31991
|
+
var t = pt(e);
|
|
31992
31992
|
t.current = e, DQ(function() {
|
|
31993
31993
|
return function() {
|
|
31994
31994
|
return t.current();
|
|
@@ -31997,7 +31997,7 @@ var LQ = function(e) {
|
|
|
31997
31997
|
};
|
|
31998
31998
|
const FQ = LQ;
|
|
31999
31999
|
var qQ = function(e) {
|
|
32000
|
-
var t =
|
|
32000
|
+
var t = pt(0), r = _t(e), n = r[0], o = r[1], a = Zt(function(i) {
|
|
32001
32001
|
cancelAnimationFrame(t.current), t.current = requestAnimationFrame(function() {
|
|
32002
32002
|
o(i);
|
|
32003
32003
|
});
|
|
@@ -32826,14 +32826,14 @@ const dl = (e) => (t) => {
|
|
|
32826
32826
|
)
|
|
32827
32827
|
);
|
|
32828
32828
|
};
|
|
32829
|
-
function
|
|
32829
|
+
function ft(e) {
|
|
32830
32830
|
const t = Ao(MP);
|
|
32831
32831
|
if (!t)
|
|
32832
32832
|
throw new Error("Missing WebchatContext.Provider in the tree");
|
|
32833
32833
|
return NP(t, e);
|
|
32834
32834
|
}
|
|
32835
32835
|
const iee = ({ text: e, buttonValue: t, type: r, variant: n, groupId: o, reusable: a, ...i }) => {
|
|
32836
|
-
const s =
|
|
32836
|
+
const s = ft((v) => v.eventEmitter), c = ft((v) => v.sendTextMessage), l = ft((v) => v.isReadOnly), [u, d] = _t(!1), [p, f] = _t(!1), [h, y] = _t(!1), {
|
|
32837
32837
|
message: {
|
|
32838
32838
|
blocks: { button: m }
|
|
32839
32839
|
}
|
|
@@ -34213,7 +34213,7 @@ function Ds(e, t, r) {
|
|
|
34213
34213
|
Ds.animationRealms = [];
|
|
34214
34214
|
Ds.globalOptions = void 0;
|
|
34215
34215
|
function kw(e = {}, t = []) {
|
|
34216
|
-
const r =
|
|
34216
|
+
const r = pt(e), n = pt(t), [o, a] = _t(), [i, s] = _t(), c = Zt(() => {
|
|
34217
34217
|
o && o.reInit(r.current, n.current);
|
|
34218
34218
|
}, [o]);
|
|
34219
34219
|
return ht(() => {
|
|
@@ -35757,7 +35757,7 @@ function ml(e) {
|
|
|
35757
35757
|
return "data-floating-ui-" + e;
|
|
35758
35758
|
}
|
|
35759
35759
|
function Ta(e) {
|
|
35760
|
-
const t =
|
|
35760
|
+
const t = pt(e);
|
|
35761
35761
|
return Cr(() => {
|
|
35762
35762
|
t.current = e;
|
|
35763
35763
|
}), t;
|
|
@@ -36894,7 +36894,7 @@ function ine(e, t) {
|
|
|
36894
36894
|
}
|
|
36895
36895
|
const sne = ({ options: e, label: t, reusable: r }) => {
|
|
36896
36896
|
var F, H, G, N, E;
|
|
36897
|
-
const n =
|
|
36897
|
+
const n = ft((q) => q.sendTextMessage), o = ft((q) => q.messageContainerRef), a = ft((q) => q.isReadOnly), [i, s] = I.useState(!1), [c, l] = I.useState(null), [u, d] = I.useState(null), {
|
|
36898
36898
|
message: {
|
|
36899
36899
|
blocks: { dropdown: p }
|
|
36900
36900
|
}
|
|
@@ -37026,7 +37026,7 @@ const sne = ({ options: e, label: t, reusable: r }) => {
|
|
|
37026
37026
|
text: zV,
|
|
37027
37027
|
video: fee
|
|
37028
37028
|
}, ru = ({ block: e, ...t }) => {
|
|
37029
|
-
const n =
|
|
37029
|
+
const n = ft((a) => a.renderers)[e.type] ?? lne[e.type], o = { ...t, ...e };
|
|
37030
37030
|
return /* @__PURE__ */ J.jsx(n, { ...o });
|
|
37031
37031
|
};
|
|
37032
37032
|
function une({
|
|
@@ -37095,7 +37095,7 @@ var gne = Si, vne = function(t) {
|
|
|
37095
37095
|
}
|
|
37096
37096
|
t.current = r;
|
|
37097
37097
|
}, bne = function(t, r) {
|
|
37098
|
-
var n =
|
|
37098
|
+
var n = pt();
|
|
37099
37099
|
return Zt(function(o) {
|
|
37100
37100
|
t.current = o, n.current && oS(n.current, null), n.current = r, r && oS(r, o);
|
|
37101
37101
|
}, [r]);
|
|
@@ -37211,9 +37211,7 @@ var $ne = function(t) {
|
|
|
37211
37211
|
}, Ane = /* @__PURE__ */ I.forwardRef(Rne);
|
|
37212
37212
|
const Ine = _p(
|
|
37213
37213
|
Rt(({ children: e, ...t }, r) => {
|
|
37214
|
-
const { composer: n } = nr, o =
|
|
37215
|
-
dt(null);
|
|
37216
|
-
const v = On(($) => $.user), b = On(($) => $.messageHistory);
|
|
37214
|
+
const { composer: n } = nr, o = ft(($) => $.disableComposer), a = ft(($) => $.setIsTyping), i = ft(($) => $.isReadOnly), s = ft(($) => $.sendFile), c = ft(($) => $.addMessage), l = ft(($) => $.sendTextMessage), u = ft(($) => $.allowFileUpload), { composerPlaceholder: d, showPoweredBy: p } = BP(), [f, h] = _t(""), [y, m] = _t(-1), g = pt(null), v = On(($) => $.user), b = On(($) => $.messageHistory);
|
|
37217
37215
|
if (i)
|
|
37218
37216
|
return null;
|
|
37219
37217
|
const x = () => {
|
|
@@ -37298,6 +37296,8 @@ const Ine = _p(
|
|
|
37298
37296
|
"data-hidden": p === !1,
|
|
37299
37297
|
hidden: p === !1,
|
|
37300
37298
|
href: "https://botpress.com",
|
|
37299
|
+
target: "_blank",
|
|
37300
|
+
rel: "noopener noreferrer",
|
|
37301
37301
|
children: "⚡ by Botpress"
|
|
37302
37302
|
}
|
|
37303
37303
|
)
|
|
@@ -37315,10 +37315,10 @@ const Ine = _p(
|
|
|
37315
37315
|
] });
|
|
37316
37316
|
};
|
|
37317
37317
|
const eEe = ({ children: e, ...t }) => {
|
|
37318
|
-
const r =
|
|
37318
|
+
const r = pt(), n = pt(null), o = aee({ ...t, messageContainerRef: n });
|
|
37319
37319
|
return r.current || (r.current = o), /* @__PURE__ */ J.jsx(qP.Provider, { value: { ...t.configuration }, children: /* @__PURE__ */ J.jsx(MP.Provider, { value: r.current, children: /* @__PURE__ */ J.jsx(Nne, { children: e }) }) });
|
|
37320
37320
|
}, Nne = ({ children: e }) => {
|
|
37321
|
-
const t =
|
|
37321
|
+
const t = ft((g) => g.client), r = ft((g) => g.addMessage), n = ft((g) => g.setMessages), o = ft((g) => g.configuration), a = ft((g) => g.setConnected), i = ft((g) => g.userData), s = ft((g) => g.userName), c = ft((g) => g.userPictureUrl), l = ft((g) => g.setIsTyping), u = ft((g) => g.getMessages), d = On((g) => g.setConversationId), p = On((g) => g.user), f = On((g) => g.conversationId), h = On((g) => g.setUser), [y, m] = _t(0);
|
|
37322
37322
|
return ht(() => {
|
|
37323
37323
|
if (t)
|
|
37324
37324
|
return t.on("messageSent", (g) => {
|
|
@@ -37442,7 +37442,7 @@ function wN({ prop: e, defaultProp: t, onChange: r = () => {
|
|
|
37442
37442
|
];
|
|
37443
37443
|
}
|
|
37444
37444
|
function Dne({ defaultProp: e, onChange: t }) {
|
|
37445
|
-
const r = _t(e), [n] = r, o =
|
|
37445
|
+
const r = _t(e), [n] = r, o = pt(n), a = Ia(t);
|
|
37446
37446
|
return ht(() => {
|
|
37447
37447
|
o.current !== n && (a(n), o.current = n);
|
|
37448
37448
|
}, [
|
|
@@ -37523,7 +37523,7 @@ const Bne = /* @__PURE__ */ li({
|
|
|
37523
37523
|
}));
|
|
37524
37524
|
});
|
|
37525
37525
|
function zne(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
37526
|
-
const r = Ia(e), n =
|
|
37526
|
+
const r = Ia(e), n = pt(!1), o = pt(() => {
|
|
37527
37527
|
});
|
|
37528
37528
|
return ht(() => {
|
|
37529
37529
|
const a = (s) => {
|
|
@@ -37556,7 +37556,7 @@ function zne(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
37556
37556
|
};
|
|
37557
37557
|
}
|
|
37558
37558
|
function Zne(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
37559
|
-
const r = Ia(e), n =
|
|
37559
|
+
const r = Ia(e), n = pt(!1);
|
|
37560
37560
|
return ht(() => {
|
|
37561
37561
|
const o = (a) => {
|
|
37562
37562
|
a.target && !n.current && xN(qne, r, {
|
|
@@ -37592,10 +37592,10 @@ const Qm = "focusScope.autoFocusOnMount", ey = "focusScope.autoFocusOnUnmount",
|
|
|
37592
37592
|
bubbles: !1,
|
|
37593
37593
|
cancelable: !0
|
|
37594
37594
|
}, Vne = /* @__PURE__ */ Rt((e, t) => {
|
|
37595
|
-
const { loop: r = !1, trapped: n = !1, onMountAutoFocus: o, onUnmountAutoFocus: a, ...i } = e, [s, c] = _t(null), l = Ia(o), u = Ia(a), d =
|
|
37595
|
+
const { loop: r = !1, trapped: n = !1, onMountAutoFocus: o, onUnmountAutoFocus: a, ...i } = e, [s, c] = _t(null), l = Ia(o), u = Ia(a), d = pt(null), p = Ei(
|
|
37596
37596
|
t,
|
|
37597
37597
|
(y) => c(y)
|
|
37598
|
-
), f =
|
|
37598
|
+
), f = pt({
|
|
37599
37599
|
paused: !1,
|
|
37600
37600
|
pause() {
|
|
37601
37601
|
this.paused = !0;
|
|
@@ -37784,7 +37784,7 @@ const Oh = (e) => {
|
|
|
37784
37784
|
};
|
|
37785
37785
|
Oh.displayName = "Presence";
|
|
37786
37786
|
function Qne(e) {
|
|
37787
|
-
const [t, r] = _t(), n =
|
|
37787
|
+
const [t, r] = _t(), n = pt({}), o = pt(e), a = pt("none"), i = e ? "mounted" : "unmounted", [s, c] = Xne(i, {
|
|
37788
37788
|
mounted: {
|
|
37789
37789
|
UNMOUNT: "unmounted",
|
|
37790
37790
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -38349,7 +38349,7 @@ var Moe = function(e) {
|
|
|
38349
38349
|
};
|
|
38350
38350
|
};
|
|
38351
38351
|
const IN = "Dialog", [PN, tEe] = Lb(IN), [qoe, ia] = PN(IN), Boe = (e) => {
|
|
38352
|
-
const { __scopeDialog: t, children: r, open: n, defaultOpen: o, onOpenChange: a, modal: i = !0 } = e, s =
|
|
38352
|
+
const { __scopeDialog: t, children: r, open: n, defaultOpen: o, onOpenChange: a, modal: i = !0 } = e, s = pt(null), c = pt(null), [l = !1, u] = wN({
|
|
38353
38353
|
prop: n,
|
|
38354
38354
|
defaultProp: o,
|
|
38355
38355
|
onChange: a
|
|
@@ -38425,7 +38425,7 @@ const IN = "Dialog", [PN, tEe] = Lb(IN), [qoe, ia] = PN(IN), Boe = (e) => {
|
|
|
38425
38425
|
ref: t
|
|
38426
38426
|
})));
|
|
38427
38427
|
}), Koe = /* @__PURE__ */ Rt((e, t) => {
|
|
38428
|
-
const r = ia(yl, e.__scopeDialog), n =
|
|
38428
|
+
const r = ia(yl, e.__scopeDialog), n = pt(null), o = Ei(t, r.contentRef, n);
|
|
38429
38429
|
return ht(() => {
|
|
38430
38430
|
const a = n.current;
|
|
38431
38431
|
if (a)
|
|
@@ -38448,7 +38448,7 @@ const IN = "Dialog", [PN, tEe] = Lb(IN), [qoe, ia] = PN(IN), Boe = (e) => {
|
|
|
38448
38448
|
)
|
|
38449
38449
|
}));
|
|
38450
38450
|
}), Goe = /* @__PURE__ */ Rt((e, t) => {
|
|
38451
|
-
const r = ia(yl, e.__scopeDialog), n =
|
|
38451
|
+
const r = ia(yl, e.__scopeDialog), n = pt(!1), o = pt(!1);
|
|
38452
38452
|
return /* @__PURE__ */ jt(jN, Rr({}, e, {
|
|
38453
38453
|
ref: t,
|
|
38454
38454
|
trapFocus: !1,
|
|
@@ -38469,7 +38469,7 @@ const IN = "Dialog", [PN, tEe] = Lb(IN), [qoe, ia] = PN(IN), Boe = (e) => {
|
|
|
38469
38469
|
}
|
|
38470
38470
|
}));
|
|
38471
38471
|
}), jN = /* @__PURE__ */ Rt((e, t) => {
|
|
38472
|
-
const { __scopeDialog: r, trapFocus: n, onOpenAutoFocus: o, onCloseAutoFocus: a, ...i } = e, s = ia(yl, r), c =
|
|
38472
|
+
const { __scopeDialog: r, trapFocus: n, onOpenAutoFocus: o, onCloseAutoFocus: a, ...i } = e, s = ia(yl, r), c = pt(null), l = Ei(t, c);
|
|
38473
38473
|
return eoe(), /* @__PURE__ */ jt(oT, null, /* @__PURE__ */ jt(Vne, {
|
|
38474
38474
|
asChild: !0,
|
|
38475
38475
|
loop: !0,
|
|
@@ -38567,7 +38567,7 @@ const cae = Rt(({ children: e, ...t }, r) => {
|
|
|
38567
38567
|
] })
|
|
38568
38568
|
] });
|
|
38569
38569
|
}), lae = () => {
|
|
38570
|
-
const { modal: e } = nr, t =
|
|
38570
|
+
const { modal: e } = nr, t = ft((n) => n.connected), { showModal: r } = FP();
|
|
38571
38571
|
return ht(() => {
|
|
38572
38572
|
var n, o, a, i;
|
|
38573
38573
|
t || r({
|
|
@@ -38640,7 +38640,7 @@ const cae = Rt(({ children: e, ...t }, r) => {
|
|
|
38640
38640
|
}))
|
|
38641
38641
|
);
|
|
38642
38642
|
}), yae = /* @__PURE__ */ Rt((e, t) => {
|
|
38643
|
-
const { __scopeCollapsible: r, present: n, children: o, ...a } = e, i = Mw(FN, r), [s, c] = _t(n), l =
|
|
38643
|
+
const { __scopeCollapsible: r, present: n, children: o, ...a } = e, i = Mw(FN, r), [s, c] = _t(n), l = pt(null), u = Ei(t, l), d = pt(0), p = d.current, f = pt(0), h = f.current, y = i.open || s, m = pt(y), g = pt();
|
|
38644
38644
|
return ht(() => {
|
|
38645
38645
|
const v = requestAnimationFrame(
|
|
38646
38646
|
() => m.current = !1
|
|
@@ -38678,7 +38678,7 @@ function Dw(e) {
|
|
|
38678
38678
|
}
|
|
38679
38679
|
const gae = fae, vae = mae, bae = (e) => /* @__PURE__ */ I.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, fill: "none", viewBox: "0 0 16 16", ...e }, /* @__PURE__ */ I.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667" })), wae = ({ ...e }) => {
|
|
38680
38680
|
var i, s;
|
|
38681
|
-
const { header: t, modal: r } = nr, n =
|
|
38681
|
+
const { header: t, modal: r } = nr, n = ft((c) => c.restartConversation), { showModal: o } = FP(), a = (c) => {
|
|
38682
38682
|
var l, u, d, p;
|
|
38683
38683
|
c.stopPropagation(), o({
|
|
38684
38684
|
title: "Restart Conversation",
|
|
@@ -38702,7 +38702,7 @@ const gae = fae, vae = mae, bae = (e) => /* @__PURE__ */ I.createElement("svg",
|
|
|
38702
38702
|
}
|
|
38703
38703
|
);
|
|
38704
38704
|
}, xae = ({ ...e }) => {
|
|
38705
|
-
const { header: t } = nr, r =
|
|
38705
|
+
const { header: t } = nr, r = ft((o) => o.closeWindow), n = (o) => {
|
|
38706
38706
|
o.stopPropagation(), r == null || r();
|
|
38707
38707
|
};
|
|
38708
38708
|
return /* @__PURE__ */ J.jsx(
|
|
@@ -38740,7 +38740,7 @@ const gae = fae, vae = mae, bae = (e) => /* @__PURE__ */ I.createElement("svg",
|
|
|
38740
38740
|
] }) : null;
|
|
38741
38741
|
}, _ae = ({ defaultOpen: e, disabled: t, onOpenChange: r, ...n }) => {
|
|
38742
38742
|
var p, f, h, y, m, g, v, b, x, w, _, $, A, P, C, M, V, B, z, L, F, H;
|
|
38743
|
-
const { header: o } = nr, a =
|
|
38743
|
+
const { header: o } = nr, a = ft((G) => G.configuration), i = ft((G) => G.closeWindow), s = ft((G) => G.getClientId)(), c = ft((G) => !G.disableRestartConversation), [l, u] = _t(!!e), d = !!((p = a.email) != null && p.title) || !!((f = a.phone) != null && f.title) || !!((h = a.website) != null && h.title) || !!((y = a.termsOfService) != null && y.link) || !!((m = a.privacyPolicy) != null && m.link);
|
|
38744
38744
|
return /* @__PURE__ */ J.jsxs(
|
|
38745
38745
|
gae,
|
|
38746
38746
|
{
|
|
@@ -38820,7 +38820,7 @@ const gae = fae, vae = mae, bae = (e) => /* @__PURE__ */ I.createElement("svg",
|
|
|
38820
38820
|
Rt(
|
|
38821
38821
|
({ direction: e, block: t, scroll: r, disableInput: n, children: o, sender: a, ...i }, s) => {
|
|
38822
38822
|
var y, m, g, v;
|
|
38823
|
-
const [c, l] = _t([]), { message: u } = nr, { botAvatar: d, botName: p } =
|
|
38823
|
+
const [c, l] = _t([]), { message: u } = nr, { botAvatar: d, botName: p } = ft((b) => b.configuration), f = ft((b) => b.getClientId)(), h = QR(f ?? "", 15);
|
|
38824
38824
|
return /* @__PURE__ */ J.jsx(DP.Provider, { value: { isLoading: c, setIsLoading: l }, children: /* @__PURE__ */ J.jsxs(
|
|
38825
38825
|
"div",
|
|
38826
38826
|
{
|
|
@@ -38844,7 +38844,7 @@ const gae = fae, vae = mae, bae = (e) => /* @__PURE__ */ I.createElement("svg",
|
|
|
38844
38844
|
)
|
|
38845
38845
|
);
|
|
38846
38846
|
function Eae() {
|
|
38847
|
-
const e =
|
|
38847
|
+
const e = ft((n) => n.getClientId)(), t = ft((n) => n.configuration), {
|
|
38848
38848
|
messageList: { marquee: r }
|
|
38849
38849
|
} = nr;
|
|
38850
38850
|
return /* @__PURE__ */ J.jsxs("li", { ...r.container, children: [
|
|
@@ -42538,7 +42538,7 @@ function V1e(e, t) {
|
|
|
42538
42538
|
};
|
|
42539
42539
|
}
|
|
42540
42540
|
var xD = function(t) {
|
|
42541
|
-
var r = t.debounce, n = t.name, o = t.onEvent, a = t.target, i =
|
|
42541
|
+
var r = t.debounce, n = t.name, o = t.onEvent, a = t.target, i = pt();
|
|
42542
42542
|
i.current = o;
|
|
42543
42543
|
var s = Sn(function() {
|
|
42544
42544
|
return V1e(function(l) {
|
|
@@ -42581,7 +42581,7 @@ function rSe(e, t, r, n) {
|
|
|
42581
42581
|
return o;
|
|
42582
42582
|
}
|
|
42583
42583
|
var _D = function(t) {
|
|
42584
|
-
var r = t.name, n = t.onEnd, o = t.target, a = t.value, i =
|
|
42584
|
+
var r = t.name, n = t.onEnd, o = t.target, a = t.value, i = pt(), s = Zt(function(l, u, d, p) {
|
|
42585
42585
|
var f = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : Ca();
|
|
42586
42586
|
(d === "100%" || typeof d == "number") && (cancelAnimationFrame(i.current), i.current = requestAnimationFrame(function() {
|
|
42587
42587
|
if (o) {
|
|
@@ -42611,7 +42611,7 @@ _D.propTypes = {
|
|
|
42611
42611
|
value: Pt.oneOfType([Pt.number, Pt.oneOf(["100%"])]).isRequired
|
|
42612
42612
|
};
|
|
42613
42613
|
function rg(e) {
|
|
42614
|
-
var t = _t(e), r = bo(t, 2), n = r[0], o = r[1], a =
|
|
42614
|
+
var t = _t(e), r = bo(t, 2), n = r[0], o = r[1], a = pt(), i = Zt(function(s) {
|
|
42615
42615
|
typeof s == "function" ? i(function(c) {
|
|
42616
42616
|
return s = s(c), a.current = s, s;
|
|
42617
42617
|
}) : (a.current = s, i(s));
|
|
@@ -42672,7 +42672,7 @@ var U0 = function(t) {
|
|
|
42672
42672
|
});
|
|
42673
42673
|
}, [a]);
|
|
42674
42674
|
s = s === Gn ? Gn : oSe;
|
|
42675
|
-
var d =
|
|
42675
|
+
var d = pt(0), p = pt(i), f = rg(s === Gn ? 0 : "100%"), h = bo(f, 3), y = h[0], m = h[1], g = h[2], v = rg(null), b = bo(v, 3), x = b[0], w = b[1], _ = b[2], $ = pt(0), A = pt(0), P = pt(0), C = _t(!0), M = bo(C, 2), V = M[0], B = M[1], z = _t(!0), L = bo(z, 2), F = L[0], H = L[1], G = _t(!0), N = bo(G, 2), E = N[0], q = N[1], X = _t(!1), T = bo(X, 2), se = T[0], fe = T[1], pe = rg(!0), ve = bo(pe, 3), Se = ve[0], _e = ve[1], me = ve[2], ce = pt([]), Q = Zt(function(Y) {
|
|
42676
42676
|
var he = _.current;
|
|
42677
42677
|
return ce.current.push(Y), he && Y({
|
|
42678
42678
|
scrollTop: he.scrollTop
|
|
@@ -43038,7 +43038,7 @@ function lSe() {
|
|
|
43038
43038
|
}
|
|
43039
43039
|
Tae();
|
|
43040
43040
|
const uSe = _p(({ scrollDownButton: e, ...t }) => {
|
|
43041
|
-
const { messageList: r } = nr, n = On((m) => m.conversationId), o =
|
|
43041
|
+
const { messageList: r } = nr, n = On((m) => m.conversationId), o = ft((m) => m.messages)[n ?? ""] ?? [], a = ft((m) => m.setState), i = ft((m) => m.client), s = ft((m) => m.messageContainerRef), c = ft((m) => m.isTyping), l = ft((m) => m.setIsTyping), u = Sn(() => K5(o), [o]), [d, p] = _t(!0), { y: f } = zQ(s), h = Zt(() => {
|
|
43042
43042
|
if (!s.current)
|
|
43043
43043
|
return;
|
|
43044
43044
|
const { scrollHeight: m } = s.current;
|
|
@@ -43129,6 +43129,7 @@ export {
|
|
|
43129
43129
|
$e as styleOptionSchema,
|
|
43130
43130
|
nz as themeSchema,
|
|
43131
43131
|
QSe as useClient,
|
|
43132
|
-
|
|
43133
|
-
az as userPropsSchema
|
|
43132
|
+
ft as useWebchatStore,
|
|
43133
|
+
az as userPropsSchema,
|
|
43134
|
+
nr as webchatClasses
|
|
43134
43135
|
};
|