botframework-webchat-fluent-theme 4.17.0-main.20240411.647b269 → 4.17.0-main.20240416.4ff01ae
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/dist/botframework-webchat-fluent-theme.development.css.map +1 -0
- package/dist/botframework-webchat-fluent-theme.development.js +2384 -0
- package/dist/botframework-webchat-fluent-theme.development.js.map +1 -0
- package/dist/botframework-webchat-fluent-theme.production.min.css.map +1 -0
- package/dist/botframework-webchat-fluent-theme.production.min.js +6 -16
- package/dist/botframework-webchat-fluent-theme.production.min.js.map +1 -1
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +1062 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1076 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -7
- package/src/bundle.ts +9 -2
- package/src/components/DropZone.tsx +3 -0
- package/src/components/SendBox.tsx +3 -0
- package/src/components/SuggestedActions.tsx +3 -0
- package/src/components/TelephoneKeypad.tsx +1 -0
- package/src/components/Theme.module.css +60 -0
- package/src/components/Theme.tsx +11 -0
- package/src/components/dropZone/index.module.css +23 -0
- package/src/components/dropZone/index.tsx +107 -0
- package/src/components/sendbox/AddAttachmentButton.module.css +10 -0
- package/src/components/sendbox/AddAttachmentButton.tsx +65 -0
- package/src/components/sendbox/Attachments.module.css +7 -0
- package/src/components/sendbox/Attachments.tsx +31 -0
- package/src/components/sendbox/ErrorMessage.module.css +9 -0
- package/src/components/sendbox/ErrorMessage.tsx +15 -0
- package/src/components/sendbox/TelephoneKeypadToolbarButton.tsx +30 -0
- package/src/components/sendbox/TextArea.module.css +61 -0
- package/src/components/sendbox/TextArea.tsx +85 -0
- package/src/components/sendbox/Toolbar.module.css +49 -0
- package/src/components/sendbox/Toolbar.tsx +64 -0
- package/src/components/sendbox/index.module.css +58 -0
- package/src/components/sendbox/index.tsx +169 -0
- package/src/components/sendbox/private/useSubmitError.ts +46 -0
- package/src/components/sendbox/private/useUniqueId.ts +13 -0
- package/src/components/suggestedActions/AccessibleButton.tsx +59 -0
- package/src/components/suggestedActions/SuggestedAction.module.css +34 -0
- package/src/components/suggestedActions/SuggestedAction.tsx +87 -0
- package/src/components/suggestedActions/index.module.css +23 -0
- package/src/components/suggestedActions/index.tsx +98 -0
- package/src/components/suggestedActions/private/computeSuggestedActionText.ts +21 -0
- package/src/components/telephoneKeypad/Provider.tsx +22 -0
- package/src/components/telephoneKeypad/Surrogate.tsx +13 -0
- package/src/components/telephoneKeypad/index.ts +6 -0
- package/src/components/telephoneKeypad/private/Button.module.css +62 -0
- package/src/components/telephoneKeypad/private/Button.tsx +45 -0
- package/src/components/telephoneKeypad/private/Context.ts +18 -0
- package/src/components/telephoneKeypad/private/TelephoneKeypad.module.css +30 -0
- package/src/components/telephoneKeypad/private/TelephoneKeypad.tsx +137 -0
- package/src/components/telephoneKeypad/types.ts +1 -0
- package/src/components/telephoneKeypad/useShown.ts +9 -0
- package/src/env.d.ts +7 -0
- package/src/external.umd/botframework-webchat-api.ts +3 -0
- package/src/external.umd/botframework-webchat-component.ts +4 -0
- package/src/external.umd/react.ts +1 -0
- package/src/icons/AddDocumentIcon.tsx +20 -0
- package/src/icons/AttachmentIcon.tsx +20 -0
- package/src/icons/SendIcon.tsx +20 -0
- package/src/icons/TelephoneKeypad.tsx +20 -0
- package/src/index.ts +5 -1
- package/src/private/FluentThemeProvider.tsx +11 -7
- package/src/styles/injectStyle.ts +9 -0
- package/src/styles/useStyles.ts +19 -0
- package/src/styles.ts +4 -0
- package/src/testIds.ts +21 -0
- package/src/tsconfig.json +2 -1
- package/src/types/PropsOf.ts +7 -0
- package/src/external/ThemeProvider.tsx +0 -16
- package/src/private/SendBox.tsx +0 -7
|
@@ -0,0 +1,2384 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
(() => {
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
|
|
29
|
+
// src/external.umd/botframework-webchat-component.ts
|
|
30
|
+
var require_botframework_webchat_component = __commonJS({
|
|
31
|
+
"src/external.umd/botframework-webchat-component.ts"(exports, module) {
|
|
32
|
+
module.exports = {
|
|
33
|
+
Components: globalThis.WebChat.Components,
|
|
34
|
+
hooks: globalThis.WebChat.hooks
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// src/external.umd/react.ts
|
|
40
|
+
var require_react = __commonJS({
|
|
41
|
+
"src/external.umd/react.ts"(exports, module) {
|
|
42
|
+
module.exports = globalThis.React;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// node_modules/core-js-pure/internals/global.js
|
|
47
|
+
var require_global = __commonJS({
|
|
48
|
+
"node_modules/core-js-pure/internals/global.js"(exports, module) {
|
|
49
|
+
"use strict";
|
|
50
|
+
var check = function(it) {
|
|
51
|
+
return it && it.Math === Math && it;
|
|
52
|
+
};
|
|
53
|
+
module.exports = // eslint-disable-next-line es/no-global-this -- safe
|
|
54
|
+
check(typeof globalThis == "object" && globalThis) || check(typeof window == "object" && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
55
|
+
check(typeof self == "object" && self) || check(typeof global == "object" && global) || check(typeof exports == "object" && exports) || // eslint-disable-next-line no-new-func -- fallback
|
|
56
|
+
/* @__PURE__ */ function() {
|
|
57
|
+
return this;
|
|
58
|
+
}() || Function("return this")();
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// node_modules/core-js-pure/internals/fails.js
|
|
63
|
+
var require_fails = __commonJS({
|
|
64
|
+
"node_modules/core-js-pure/internals/fails.js"(exports, module) {
|
|
65
|
+
"use strict";
|
|
66
|
+
module.exports = function(exec) {
|
|
67
|
+
try {
|
|
68
|
+
return !!exec();
|
|
69
|
+
} catch (error) {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// node_modules/core-js-pure/internals/function-bind-native.js
|
|
77
|
+
var require_function_bind_native = __commonJS({
|
|
78
|
+
"node_modules/core-js-pure/internals/function-bind-native.js"(exports, module) {
|
|
79
|
+
"use strict";
|
|
80
|
+
var fails = require_fails();
|
|
81
|
+
module.exports = !fails(function() {
|
|
82
|
+
var test = (function() {
|
|
83
|
+
}).bind();
|
|
84
|
+
return typeof test != "function" || test.hasOwnProperty("prototype");
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
// node_modules/core-js-pure/internals/function-apply.js
|
|
90
|
+
var require_function_apply = __commonJS({
|
|
91
|
+
"node_modules/core-js-pure/internals/function-apply.js"(exports, module) {
|
|
92
|
+
"use strict";
|
|
93
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
94
|
+
var FunctionPrototype = Function.prototype;
|
|
95
|
+
var apply = FunctionPrototype.apply;
|
|
96
|
+
var call = FunctionPrototype.call;
|
|
97
|
+
module.exports = typeof Reflect == "object" && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function() {
|
|
98
|
+
return call.apply(apply, arguments);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
// node_modules/core-js-pure/internals/function-uncurry-this.js
|
|
104
|
+
var require_function_uncurry_this = __commonJS({
|
|
105
|
+
"node_modules/core-js-pure/internals/function-uncurry-this.js"(exports, module) {
|
|
106
|
+
"use strict";
|
|
107
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
108
|
+
var FunctionPrototype = Function.prototype;
|
|
109
|
+
var call = FunctionPrototype.call;
|
|
110
|
+
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
|
|
111
|
+
module.exports = NATIVE_BIND ? uncurryThisWithBind : function(fn) {
|
|
112
|
+
return function() {
|
|
113
|
+
return call.apply(fn, arguments);
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// node_modules/core-js-pure/internals/classof-raw.js
|
|
120
|
+
var require_classof_raw = __commonJS({
|
|
121
|
+
"node_modules/core-js-pure/internals/classof-raw.js"(exports, module) {
|
|
122
|
+
"use strict";
|
|
123
|
+
var uncurryThis = require_function_uncurry_this();
|
|
124
|
+
var toString = uncurryThis({}.toString);
|
|
125
|
+
var stringSlice = uncurryThis("".slice);
|
|
126
|
+
module.exports = function(it) {
|
|
127
|
+
return stringSlice(toString(it), 8, -1);
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// node_modules/core-js-pure/internals/function-uncurry-this-clause.js
|
|
133
|
+
var require_function_uncurry_this_clause = __commonJS({
|
|
134
|
+
"node_modules/core-js-pure/internals/function-uncurry-this-clause.js"(exports, module) {
|
|
135
|
+
"use strict";
|
|
136
|
+
var classofRaw = require_classof_raw();
|
|
137
|
+
var uncurryThis = require_function_uncurry_this();
|
|
138
|
+
module.exports = function(fn) {
|
|
139
|
+
if (classofRaw(fn) === "Function")
|
|
140
|
+
return uncurryThis(fn);
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
// node_modules/core-js-pure/internals/is-callable.js
|
|
146
|
+
var require_is_callable = __commonJS({
|
|
147
|
+
"node_modules/core-js-pure/internals/is-callable.js"(exports, module) {
|
|
148
|
+
"use strict";
|
|
149
|
+
var documentAll = typeof document == "object" && document.all;
|
|
150
|
+
module.exports = typeof documentAll == "undefined" && documentAll !== void 0 ? function(argument) {
|
|
151
|
+
return typeof argument == "function" || argument === documentAll;
|
|
152
|
+
} : function(argument) {
|
|
153
|
+
return typeof argument == "function";
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// node_modules/core-js-pure/internals/descriptors.js
|
|
159
|
+
var require_descriptors = __commonJS({
|
|
160
|
+
"node_modules/core-js-pure/internals/descriptors.js"(exports, module) {
|
|
161
|
+
"use strict";
|
|
162
|
+
var fails = require_fails();
|
|
163
|
+
module.exports = !fails(function() {
|
|
164
|
+
return Object.defineProperty({}, 1, { get: function() {
|
|
165
|
+
return 7;
|
|
166
|
+
} })[1] !== 7;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
// node_modules/core-js-pure/internals/function-call.js
|
|
172
|
+
var require_function_call = __commonJS({
|
|
173
|
+
"node_modules/core-js-pure/internals/function-call.js"(exports, module) {
|
|
174
|
+
"use strict";
|
|
175
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
176
|
+
var call = Function.prototype.call;
|
|
177
|
+
module.exports = NATIVE_BIND ? call.bind(call) : function() {
|
|
178
|
+
return call.apply(call, arguments);
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
// node_modules/core-js-pure/internals/object-property-is-enumerable.js
|
|
184
|
+
var require_object_property_is_enumerable = __commonJS({
|
|
185
|
+
"node_modules/core-js-pure/internals/object-property-is-enumerable.js"(exports) {
|
|
186
|
+
"use strict";
|
|
187
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
188
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
189
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
190
|
+
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
191
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
192
|
+
return !!descriptor && descriptor.enumerable;
|
|
193
|
+
} : $propertyIsEnumerable;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// node_modules/core-js-pure/internals/create-property-descriptor.js
|
|
198
|
+
var require_create_property_descriptor = __commonJS({
|
|
199
|
+
"node_modules/core-js-pure/internals/create-property-descriptor.js"(exports, module) {
|
|
200
|
+
"use strict";
|
|
201
|
+
module.exports = function(bitmap, value) {
|
|
202
|
+
return {
|
|
203
|
+
enumerable: !(bitmap & 1),
|
|
204
|
+
configurable: !(bitmap & 2),
|
|
205
|
+
writable: !(bitmap & 4),
|
|
206
|
+
value
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
// node_modules/core-js-pure/internals/indexed-object.js
|
|
213
|
+
var require_indexed_object = __commonJS({
|
|
214
|
+
"node_modules/core-js-pure/internals/indexed-object.js"(exports, module) {
|
|
215
|
+
"use strict";
|
|
216
|
+
var uncurryThis = require_function_uncurry_this();
|
|
217
|
+
var fails = require_fails();
|
|
218
|
+
var classof = require_classof_raw();
|
|
219
|
+
var $Object = Object;
|
|
220
|
+
var split = uncurryThis("".split);
|
|
221
|
+
module.exports = fails(function() {
|
|
222
|
+
return !$Object("z").propertyIsEnumerable(0);
|
|
223
|
+
}) ? function(it) {
|
|
224
|
+
return classof(it) === "String" ? split(it, "") : $Object(it);
|
|
225
|
+
} : $Object;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// node_modules/core-js-pure/internals/is-null-or-undefined.js
|
|
230
|
+
var require_is_null_or_undefined = __commonJS({
|
|
231
|
+
"node_modules/core-js-pure/internals/is-null-or-undefined.js"(exports, module) {
|
|
232
|
+
"use strict";
|
|
233
|
+
module.exports = function(it) {
|
|
234
|
+
return it === null || it === void 0;
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
|
|
239
|
+
// node_modules/core-js-pure/internals/require-object-coercible.js
|
|
240
|
+
var require_require_object_coercible = __commonJS({
|
|
241
|
+
"node_modules/core-js-pure/internals/require-object-coercible.js"(exports, module) {
|
|
242
|
+
"use strict";
|
|
243
|
+
var isNullOrUndefined = require_is_null_or_undefined();
|
|
244
|
+
var $TypeError = TypeError;
|
|
245
|
+
module.exports = function(it) {
|
|
246
|
+
if (isNullOrUndefined(it))
|
|
247
|
+
throw new $TypeError("Can't call method on " + it);
|
|
248
|
+
return it;
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
// node_modules/core-js-pure/internals/to-indexed-object.js
|
|
254
|
+
var require_to_indexed_object = __commonJS({
|
|
255
|
+
"node_modules/core-js-pure/internals/to-indexed-object.js"(exports, module) {
|
|
256
|
+
"use strict";
|
|
257
|
+
var IndexedObject = require_indexed_object();
|
|
258
|
+
var requireObjectCoercible = require_require_object_coercible();
|
|
259
|
+
module.exports = function(it) {
|
|
260
|
+
return IndexedObject(requireObjectCoercible(it));
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
// node_modules/core-js-pure/internals/is-object.js
|
|
266
|
+
var require_is_object = __commonJS({
|
|
267
|
+
"node_modules/core-js-pure/internals/is-object.js"(exports, module) {
|
|
268
|
+
"use strict";
|
|
269
|
+
var isCallable = require_is_callable();
|
|
270
|
+
module.exports = function(it) {
|
|
271
|
+
return typeof it == "object" ? it !== null : isCallable(it);
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
// node_modules/core-js-pure/internals/path.js
|
|
277
|
+
var require_path = __commonJS({
|
|
278
|
+
"node_modules/core-js-pure/internals/path.js"(exports, module) {
|
|
279
|
+
"use strict";
|
|
280
|
+
module.exports = {};
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
// node_modules/core-js-pure/internals/get-built-in.js
|
|
285
|
+
var require_get_built_in = __commonJS({
|
|
286
|
+
"node_modules/core-js-pure/internals/get-built-in.js"(exports, module) {
|
|
287
|
+
"use strict";
|
|
288
|
+
var path = require_path();
|
|
289
|
+
var global2 = require_global();
|
|
290
|
+
var isCallable = require_is_callable();
|
|
291
|
+
var aFunction = function(variable) {
|
|
292
|
+
return isCallable(variable) ? variable : void 0;
|
|
293
|
+
};
|
|
294
|
+
module.exports = function(namespace, method) {
|
|
295
|
+
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global2[namespace]) : path[namespace] && path[namespace][method] || global2[namespace] && global2[namespace][method];
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
// node_modules/core-js-pure/internals/object-is-prototype-of.js
|
|
301
|
+
var require_object_is_prototype_of = __commonJS({
|
|
302
|
+
"node_modules/core-js-pure/internals/object-is-prototype-of.js"(exports, module) {
|
|
303
|
+
"use strict";
|
|
304
|
+
var uncurryThis = require_function_uncurry_this();
|
|
305
|
+
module.exports = uncurryThis({}.isPrototypeOf);
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
// node_modules/core-js-pure/internals/engine-user-agent.js
|
|
310
|
+
var require_engine_user_agent = __commonJS({
|
|
311
|
+
"node_modules/core-js-pure/internals/engine-user-agent.js"(exports, module) {
|
|
312
|
+
"use strict";
|
|
313
|
+
module.exports = typeof navigator != "undefined" && String(navigator.userAgent) || "";
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
|
|
317
|
+
// node_modules/core-js-pure/internals/engine-v8-version.js
|
|
318
|
+
var require_engine_v8_version = __commonJS({
|
|
319
|
+
"node_modules/core-js-pure/internals/engine-v8-version.js"(exports, module) {
|
|
320
|
+
"use strict";
|
|
321
|
+
var global2 = require_global();
|
|
322
|
+
var userAgent = require_engine_user_agent();
|
|
323
|
+
var process = global2.process;
|
|
324
|
+
var Deno = global2.Deno;
|
|
325
|
+
var versions = process && process.versions || Deno && Deno.version;
|
|
326
|
+
var v8 = versions && versions.v8;
|
|
327
|
+
var match;
|
|
328
|
+
var version;
|
|
329
|
+
if (v8) {
|
|
330
|
+
match = v8.split(".");
|
|
331
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
332
|
+
}
|
|
333
|
+
if (!version && userAgent) {
|
|
334
|
+
match = userAgent.match(/Edge\/(\d+)/);
|
|
335
|
+
if (!match || match[1] >= 74) {
|
|
336
|
+
match = userAgent.match(/Chrome\/(\d+)/);
|
|
337
|
+
if (match)
|
|
338
|
+
version = +match[1];
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
module.exports = version;
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
// node_modules/core-js-pure/internals/symbol-constructor-detection.js
|
|
346
|
+
var require_symbol_constructor_detection = __commonJS({
|
|
347
|
+
"node_modules/core-js-pure/internals/symbol-constructor-detection.js"(exports, module) {
|
|
348
|
+
"use strict";
|
|
349
|
+
var V8_VERSION = require_engine_v8_version();
|
|
350
|
+
var fails = require_fails();
|
|
351
|
+
var global2 = require_global();
|
|
352
|
+
var $String = global2.String;
|
|
353
|
+
module.exports = !!Object.getOwnPropertySymbols && !fails(function() {
|
|
354
|
+
var symbol = Symbol("symbol detection");
|
|
355
|
+
return !$String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
356
|
+
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
// node_modules/core-js-pure/internals/use-symbol-as-uid.js
|
|
362
|
+
var require_use_symbol_as_uid = __commonJS({
|
|
363
|
+
"node_modules/core-js-pure/internals/use-symbol-as-uid.js"(exports, module) {
|
|
364
|
+
"use strict";
|
|
365
|
+
var NATIVE_SYMBOL = require_symbol_constructor_detection();
|
|
366
|
+
module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == "symbol";
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
// node_modules/core-js-pure/internals/is-symbol.js
|
|
371
|
+
var require_is_symbol = __commonJS({
|
|
372
|
+
"node_modules/core-js-pure/internals/is-symbol.js"(exports, module) {
|
|
373
|
+
"use strict";
|
|
374
|
+
var getBuiltIn = require_get_built_in();
|
|
375
|
+
var isCallable = require_is_callable();
|
|
376
|
+
var isPrototypeOf = require_object_is_prototype_of();
|
|
377
|
+
var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
|
|
378
|
+
var $Object = Object;
|
|
379
|
+
module.exports = USE_SYMBOL_AS_UID ? function(it) {
|
|
380
|
+
return typeof it == "symbol";
|
|
381
|
+
} : function(it) {
|
|
382
|
+
var $Symbol = getBuiltIn("Symbol");
|
|
383
|
+
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
// node_modules/core-js-pure/internals/try-to-string.js
|
|
389
|
+
var require_try_to_string = __commonJS({
|
|
390
|
+
"node_modules/core-js-pure/internals/try-to-string.js"(exports, module) {
|
|
391
|
+
"use strict";
|
|
392
|
+
var $String = String;
|
|
393
|
+
module.exports = function(argument) {
|
|
394
|
+
try {
|
|
395
|
+
return $String(argument);
|
|
396
|
+
} catch (error) {
|
|
397
|
+
return "Object";
|
|
398
|
+
}
|
|
399
|
+
};
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
// node_modules/core-js-pure/internals/a-callable.js
|
|
404
|
+
var require_a_callable = __commonJS({
|
|
405
|
+
"node_modules/core-js-pure/internals/a-callable.js"(exports, module) {
|
|
406
|
+
"use strict";
|
|
407
|
+
var isCallable = require_is_callable();
|
|
408
|
+
var tryToString = require_try_to_string();
|
|
409
|
+
var $TypeError = TypeError;
|
|
410
|
+
module.exports = function(argument) {
|
|
411
|
+
if (isCallable(argument))
|
|
412
|
+
return argument;
|
|
413
|
+
throw new $TypeError(tryToString(argument) + " is not a function");
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
// node_modules/core-js-pure/internals/get-method.js
|
|
419
|
+
var require_get_method = __commonJS({
|
|
420
|
+
"node_modules/core-js-pure/internals/get-method.js"(exports, module) {
|
|
421
|
+
"use strict";
|
|
422
|
+
var aCallable = require_a_callable();
|
|
423
|
+
var isNullOrUndefined = require_is_null_or_undefined();
|
|
424
|
+
module.exports = function(V, P) {
|
|
425
|
+
var func = V[P];
|
|
426
|
+
return isNullOrUndefined(func) ? void 0 : aCallable(func);
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
|
|
431
|
+
// node_modules/core-js-pure/internals/ordinary-to-primitive.js
|
|
432
|
+
var require_ordinary_to_primitive = __commonJS({
|
|
433
|
+
"node_modules/core-js-pure/internals/ordinary-to-primitive.js"(exports, module) {
|
|
434
|
+
"use strict";
|
|
435
|
+
var call = require_function_call();
|
|
436
|
+
var isCallable = require_is_callable();
|
|
437
|
+
var isObject = require_is_object();
|
|
438
|
+
var $TypeError = TypeError;
|
|
439
|
+
module.exports = function(input, pref) {
|
|
440
|
+
var fn, val;
|
|
441
|
+
if (pref === "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
|
|
442
|
+
return val;
|
|
443
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input)))
|
|
444
|
+
return val;
|
|
445
|
+
if (pref !== "string" && isCallable(fn = input.toString) && !isObject(val = call(fn, input)))
|
|
446
|
+
return val;
|
|
447
|
+
throw new $TypeError("Can't convert object to primitive value");
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
|
|
452
|
+
// node_modules/core-js-pure/internals/is-pure.js
|
|
453
|
+
var require_is_pure = __commonJS({
|
|
454
|
+
"node_modules/core-js-pure/internals/is-pure.js"(exports, module) {
|
|
455
|
+
"use strict";
|
|
456
|
+
module.exports = true;
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
|
|
460
|
+
// node_modules/core-js-pure/internals/define-global-property.js
|
|
461
|
+
var require_define_global_property = __commonJS({
|
|
462
|
+
"node_modules/core-js-pure/internals/define-global-property.js"(exports, module) {
|
|
463
|
+
"use strict";
|
|
464
|
+
var global2 = require_global();
|
|
465
|
+
var defineProperty = Object.defineProperty;
|
|
466
|
+
module.exports = function(key, value) {
|
|
467
|
+
try {
|
|
468
|
+
defineProperty(global2, key, { value, configurable: true, writable: true });
|
|
469
|
+
} catch (error) {
|
|
470
|
+
global2[key] = value;
|
|
471
|
+
}
|
|
472
|
+
return value;
|
|
473
|
+
};
|
|
474
|
+
}
|
|
475
|
+
});
|
|
476
|
+
|
|
477
|
+
// node_modules/core-js-pure/internals/shared-store.js
|
|
478
|
+
var require_shared_store = __commonJS({
|
|
479
|
+
"node_modules/core-js-pure/internals/shared-store.js"(exports, module) {
|
|
480
|
+
"use strict";
|
|
481
|
+
var IS_PURE = require_is_pure();
|
|
482
|
+
var globalThis2 = require_global();
|
|
483
|
+
var defineGlobalProperty = require_define_global_property();
|
|
484
|
+
var SHARED = "__core-js_shared__";
|
|
485
|
+
var store = module.exports = globalThis2[SHARED] || defineGlobalProperty(SHARED, {});
|
|
486
|
+
(store.versions || (store.versions = [])).push({
|
|
487
|
+
version: "3.36.1",
|
|
488
|
+
mode: IS_PURE ? "pure" : "global",
|
|
489
|
+
copyright: "\xA9 2014-2024 Denis Pushkarev (zloirock.ru)",
|
|
490
|
+
license: "https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",
|
|
491
|
+
source: "https://github.com/zloirock/core-js"
|
|
492
|
+
});
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
// node_modules/core-js-pure/internals/shared.js
|
|
497
|
+
var require_shared = __commonJS({
|
|
498
|
+
"node_modules/core-js-pure/internals/shared.js"(exports, module) {
|
|
499
|
+
"use strict";
|
|
500
|
+
var store = require_shared_store();
|
|
501
|
+
module.exports = function(key, value) {
|
|
502
|
+
return store[key] || (store[key] = value || {});
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
});
|
|
506
|
+
|
|
507
|
+
// node_modules/core-js-pure/internals/to-object.js
|
|
508
|
+
var require_to_object = __commonJS({
|
|
509
|
+
"node_modules/core-js-pure/internals/to-object.js"(exports, module) {
|
|
510
|
+
"use strict";
|
|
511
|
+
var requireObjectCoercible = require_require_object_coercible();
|
|
512
|
+
var $Object = Object;
|
|
513
|
+
module.exports = function(argument) {
|
|
514
|
+
return $Object(requireObjectCoercible(argument));
|
|
515
|
+
};
|
|
516
|
+
}
|
|
517
|
+
});
|
|
518
|
+
|
|
519
|
+
// node_modules/core-js-pure/internals/has-own-property.js
|
|
520
|
+
var require_has_own_property = __commonJS({
|
|
521
|
+
"node_modules/core-js-pure/internals/has-own-property.js"(exports, module) {
|
|
522
|
+
"use strict";
|
|
523
|
+
var uncurryThis = require_function_uncurry_this();
|
|
524
|
+
var toObject = require_to_object();
|
|
525
|
+
var hasOwnProperty = uncurryThis({}.hasOwnProperty);
|
|
526
|
+
module.exports = Object.hasOwn || function hasOwn(it, key) {
|
|
527
|
+
return hasOwnProperty(toObject(it), key);
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
// node_modules/core-js-pure/internals/uid.js
|
|
533
|
+
var require_uid = __commonJS({
|
|
534
|
+
"node_modules/core-js-pure/internals/uid.js"(exports, module) {
|
|
535
|
+
"use strict";
|
|
536
|
+
var uncurryThis = require_function_uncurry_this();
|
|
537
|
+
var id = 0;
|
|
538
|
+
var postfix = Math.random();
|
|
539
|
+
var toString = uncurryThis(1 .toString);
|
|
540
|
+
module.exports = function(key) {
|
|
541
|
+
return "Symbol(" + (key === void 0 ? "" : key) + ")_" + toString(++id + postfix, 36);
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
|
|
546
|
+
// node_modules/core-js-pure/internals/well-known-symbol.js
|
|
547
|
+
var require_well_known_symbol = __commonJS({
|
|
548
|
+
"node_modules/core-js-pure/internals/well-known-symbol.js"(exports, module) {
|
|
549
|
+
"use strict";
|
|
550
|
+
var global2 = require_global();
|
|
551
|
+
var shared = require_shared();
|
|
552
|
+
var hasOwn = require_has_own_property();
|
|
553
|
+
var uid = require_uid();
|
|
554
|
+
var NATIVE_SYMBOL = require_symbol_constructor_detection();
|
|
555
|
+
var USE_SYMBOL_AS_UID = require_use_symbol_as_uid();
|
|
556
|
+
var Symbol2 = global2.Symbol;
|
|
557
|
+
var WellKnownSymbolsStore = shared("wks");
|
|
558
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol2["for"] || Symbol2 : Symbol2 && Symbol2.withoutSetter || uid;
|
|
559
|
+
module.exports = function(name) {
|
|
560
|
+
if (!hasOwn(WellKnownSymbolsStore, name)) {
|
|
561
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol2, name) ? Symbol2[name] : createWellKnownSymbol("Symbol." + name);
|
|
562
|
+
}
|
|
563
|
+
return WellKnownSymbolsStore[name];
|
|
564
|
+
};
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
// node_modules/core-js-pure/internals/to-primitive.js
|
|
569
|
+
var require_to_primitive = __commonJS({
|
|
570
|
+
"node_modules/core-js-pure/internals/to-primitive.js"(exports, module) {
|
|
571
|
+
"use strict";
|
|
572
|
+
var call = require_function_call();
|
|
573
|
+
var isObject = require_is_object();
|
|
574
|
+
var isSymbol = require_is_symbol();
|
|
575
|
+
var getMethod = require_get_method();
|
|
576
|
+
var ordinaryToPrimitive = require_ordinary_to_primitive();
|
|
577
|
+
var wellKnownSymbol = require_well_known_symbol();
|
|
578
|
+
var $TypeError = TypeError;
|
|
579
|
+
var TO_PRIMITIVE = wellKnownSymbol("toPrimitive");
|
|
580
|
+
module.exports = function(input, pref) {
|
|
581
|
+
if (!isObject(input) || isSymbol(input))
|
|
582
|
+
return input;
|
|
583
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
584
|
+
var result;
|
|
585
|
+
if (exoticToPrim) {
|
|
586
|
+
if (pref === void 0)
|
|
587
|
+
pref = "default";
|
|
588
|
+
result = call(exoticToPrim, input, pref);
|
|
589
|
+
if (!isObject(result) || isSymbol(result))
|
|
590
|
+
return result;
|
|
591
|
+
throw new $TypeError("Can't convert object to primitive value");
|
|
592
|
+
}
|
|
593
|
+
if (pref === void 0)
|
|
594
|
+
pref = "number";
|
|
595
|
+
return ordinaryToPrimitive(input, pref);
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
|
|
600
|
+
// node_modules/core-js-pure/internals/to-property-key.js
|
|
601
|
+
var require_to_property_key = __commonJS({
|
|
602
|
+
"node_modules/core-js-pure/internals/to-property-key.js"(exports, module) {
|
|
603
|
+
"use strict";
|
|
604
|
+
var toPrimitive = require_to_primitive();
|
|
605
|
+
var isSymbol = require_is_symbol();
|
|
606
|
+
module.exports = function(argument) {
|
|
607
|
+
var key = toPrimitive(argument, "string");
|
|
608
|
+
return isSymbol(key) ? key : key + "";
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
|
|
613
|
+
// node_modules/core-js-pure/internals/document-create-element.js
|
|
614
|
+
var require_document_create_element = __commonJS({
|
|
615
|
+
"node_modules/core-js-pure/internals/document-create-element.js"(exports, module) {
|
|
616
|
+
"use strict";
|
|
617
|
+
var global2 = require_global();
|
|
618
|
+
var isObject = require_is_object();
|
|
619
|
+
var document2 = global2.document;
|
|
620
|
+
var EXISTS = isObject(document2) && isObject(document2.createElement);
|
|
621
|
+
module.exports = function(it) {
|
|
622
|
+
return EXISTS ? document2.createElement(it) : {};
|
|
623
|
+
};
|
|
624
|
+
}
|
|
625
|
+
});
|
|
626
|
+
|
|
627
|
+
// node_modules/core-js-pure/internals/ie8-dom-define.js
|
|
628
|
+
var require_ie8_dom_define = __commonJS({
|
|
629
|
+
"node_modules/core-js-pure/internals/ie8-dom-define.js"(exports, module) {
|
|
630
|
+
"use strict";
|
|
631
|
+
var DESCRIPTORS = require_descriptors();
|
|
632
|
+
var fails = require_fails();
|
|
633
|
+
var createElement = require_document_create_element();
|
|
634
|
+
module.exports = !DESCRIPTORS && !fails(function() {
|
|
635
|
+
return Object.defineProperty(createElement("div"), "a", {
|
|
636
|
+
get: function() {
|
|
637
|
+
return 7;
|
|
638
|
+
}
|
|
639
|
+
}).a !== 7;
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
});
|
|
643
|
+
|
|
644
|
+
// node_modules/core-js-pure/internals/object-get-own-property-descriptor.js
|
|
645
|
+
var require_object_get_own_property_descriptor = __commonJS({
|
|
646
|
+
"node_modules/core-js-pure/internals/object-get-own-property-descriptor.js"(exports) {
|
|
647
|
+
"use strict";
|
|
648
|
+
var DESCRIPTORS = require_descriptors();
|
|
649
|
+
var call = require_function_call();
|
|
650
|
+
var propertyIsEnumerableModule = require_object_property_is_enumerable();
|
|
651
|
+
var createPropertyDescriptor = require_create_property_descriptor();
|
|
652
|
+
var toIndexedObject = require_to_indexed_object();
|
|
653
|
+
var toPropertyKey = require_to_property_key();
|
|
654
|
+
var hasOwn = require_has_own_property();
|
|
655
|
+
var IE8_DOM_DEFINE = require_ie8_dom_define();
|
|
656
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
657
|
+
exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
658
|
+
O = toIndexedObject(O);
|
|
659
|
+
P = toPropertyKey(P);
|
|
660
|
+
if (IE8_DOM_DEFINE)
|
|
661
|
+
try {
|
|
662
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
663
|
+
} catch (error) {
|
|
664
|
+
}
|
|
665
|
+
if (hasOwn(O, P))
|
|
666
|
+
return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
// node_modules/core-js-pure/internals/is-forced.js
|
|
672
|
+
var require_is_forced = __commonJS({
|
|
673
|
+
"node_modules/core-js-pure/internals/is-forced.js"(exports, module) {
|
|
674
|
+
"use strict";
|
|
675
|
+
var fails = require_fails();
|
|
676
|
+
var isCallable = require_is_callable();
|
|
677
|
+
var replacement = /#|\.prototype\./;
|
|
678
|
+
var isForced = function(feature, detection) {
|
|
679
|
+
var value = data[normalize(feature)];
|
|
680
|
+
return value === POLYFILL ? true : value === NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
|
|
681
|
+
};
|
|
682
|
+
var normalize = isForced.normalize = function(string) {
|
|
683
|
+
return String(string).replace(replacement, ".").toLowerCase();
|
|
684
|
+
};
|
|
685
|
+
var data = isForced.data = {};
|
|
686
|
+
var NATIVE = isForced.NATIVE = "N";
|
|
687
|
+
var POLYFILL = isForced.POLYFILL = "P";
|
|
688
|
+
module.exports = isForced;
|
|
689
|
+
}
|
|
690
|
+
});
|
|
691
|
+
|
|
692
|
+
// node_modules/core-js-pure/internals/function-bind-context.js
|
|
693
|
+
var require_function_bind_context = __commonJS({
|
|
694
|
+
"node_modules/core-js-pure/internals/function-bind-context.js"(exports, module) {
|
|
695
|
+
"use strict";
|
|
696
|
+
var uncurryThis = require_function_uncurry_this_clause();
|
|
697
|
+
var aCallable = require_a_callable();
|
|
698
|
+
var NATIVE_BIND = require_function_bind_native();
|
|
699
|
+
var bind = uncurryThis(uncurryThis.bind);
|
|
700
|
+
module.exports = function(fn, that) {
|
|
701
|
+
aCallable(fn);
|
|
702
|
+
return that === void 0 ? fn : NATIVE_BIND ? bind(fn, that) : function() {
|
|
703
|
+
return fn.apply(that, arguments);
|
|
704
|
+
};
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
|
|
709
|
+
// node_modules/core-js-pure/internals/v8-prototype-define-bug.js
|
|
710
|
+
var require_v8_prototype_define_bug = __commonJS({
|
|
711
|
+
"node_modules/core-js-pure/internals/v8-prototype-define-bug.js"(exports, module) {
|
|
712
|
+
"use strict";
|
|
713
|
+
var DESCRIPTORS = require_descriptors();
|
|
714
|
+
var fails = require_fails();
|
|
715
|
+
module.exports = DESCRIPTORS && fails(function() {
|
|
716
|
+
return Object.defineProperty(function() {
|
|
717
|
+
}, "prototype", {
|
|
718
|
+
value: 42,
|
|
719
|
+
writable: false
|
|
720
|
+
}).prototype !== 42;
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
// node_modules/core-js-pure/internals/an-object.js
|
|
726
|
+
var require_an_object = __commonJS({
|
|
727
|
+
"node_modules/core-js-pure/internals/an-object.js"(exports, module) {
|
|
728
|
+
"use strict";
|
|
729
|
+
var isObject = require_is_object();
|
|
730
|
+
var $String = String;
|
|
731
|
+
var $TypeError = TypeError;
|
|
732
|
+
module.exports = function(argument) {
|
|
733
|
+
if (isObject(argument))
|
|
734
|
+
return argument;
|
|
735
|
+
throw new $TypeError($String(argument) + " is not an object");
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
|
|
740
|
+
// node_modules/core-js-pure/internals/object-define-property.js
|
|
741
|
+
var require_object_define_property = __commonJS({
|
|
742
|
+
"node_modules/core-js-pure/internals/object-define-property.js"(exports) {
|
|
743
|
+
"use strict";
|
|
744
|
+
var DESCRIPTORS = require_descriptors();
|
|
745
|
+
var IE8_DOM_DEFINE = require_ie8_dom_define();
|
|
746
|
+
var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
|
|
747
|
+
var anObject = require_an_object();
|
|
748
|
+
var toPropertyKey = require_to_property_key();
|
|
749
|
+
var $TypeError = TypeError;
|
|
750
|
+
var $defineProperty = Object.defineProperty;
|
|
751
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
752
|
+
var ENUMERABLE = "enumerable";
|
|
753
|
+
var CONFIGURABLE = "configurable";
|
|
754
|
+
var WRITABLE = "writable";
|
|
755
|
+
exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
|
|
756
|
+
anObject(O);
|
|
757
|
+
P = toPropertyKey(P);
|
|
758
|
+
anObject(Attributes);
|
|
759
|
+
if (typeof O === "function" && P === "prototype" && "value" in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
760
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
761
|
+
if (current && current[WRITABLE]) {
|
|
762
|
+
O[P] = Attributes.value;
|
|
763
|
+
Attributes = {
|
|
764
|
+
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
765
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
766
|
+
writable: false
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
return $defineProperty(O, P, Attributes);
|
|
771
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
772
|
+
anObject(O);
|
|
773
|
+
P = toPropertyKey(P);
|
|
774
|
+
anObject(Attributes);
|
|
775
|
+
if (IE8_DOM_DEFINE)
|
|
776
|
+
try {
|
|
777
|
+
return $defineProperty(O, P, Attributes);
|
|
778
|
+
} catch (error) {
|
|
779
|
+
}
|
|
780
|
+
if ("get" in Attributes || "set" in Attributes)
|
|
781
|
+
throw new $TypeError("Accessors not supported");
|
|
782
|
+
if ("value" in Attributes)
|
|
783
|
+
O[P] = Attributes.value;
|
|
784
|
+
return O;
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
});
|
|
788
|
+
|
|
789
|
+
// node_modules/core-js-pure/internals/create-non-enumerable-property.js
|
|
790
|
+
var require_create_non_enumerable_property = __commonJS({
|
|
791
|
+
"node_modules/core-js-pure/internals/create-non-enumerable-property.js"(exports, module) {
|
|
792
|
+
"use strict";
|
|
793
|
+
var DESCRIPTORS = require_descriptors();
|
|
794
|
+
var definePropertyModule = require_object_define_property();
|
|
795
|
+
var createPropertyDescriptor = require_create_property_descriptor();
|
|
796
|
+
module.exports = DESCRIPTORS ? function(object, key, value) {
|
|
797
|
+
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
|
|
798
|
+
} : function(object, key, value) {
|
|
799
|
+
object[key] = value;
|
|
800
|
+
return object;
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
});
|
|
804
|
+
|
|
805
|
+
// node_modules/core-js-pure/internals/export.js
|
|
806
|
+
var require_export = __commonJS({
|
|
807
|
+
"node_modules/core-js-pure/internals/export.js"(exports, module) {
|
|
808
|
+
"use strict";
|
|
809
|
+
var global2 = require_global();
|
|
810
|
+
var apply = require_function_apply();
|
|
811
|
+
var uncurryThis = require_function_uncurry_this_clause();
|
|
812
|
+
var isCallable = require_is_callable();
|
|
813
|
+
var getOwnPropertyDescriptor = require_object_get_own_property_descriptor().f;
|
|
814
|
+
var isForced = require_is_forced();
|
|
815
|
+
var path = require_path();
|
|
816
|
+
var bind = require_function_bind_context();
|
|
817
|
+
var createNonEnumerableProperty = require_create_non_enumerable_property();
|
|
818
|
+
var hasOwn = require_has_own_property();
|
|
819
|
+
require_shared_store();
|
|
820
|
+
var wrapConstructor = function(NativeConstructor) {
|
|
821
|
+
var Wrapper = function(a, b, c) {
|
|
822
|
+
if (this instanceof Wrapper) {
|
|
823
|
+
switch (arguments.length) {
|
|
824
|
+
case 0:
|
|
825
|
+
return new NativeConstructor();
|
|
826
|
+
case 1:
|
|
827
|
+
return new NativeConstructor(a);
|
|
828
|
+
case 2:
|
|
829
|
+
return new NativeConstructor(a, b);
|
|
830
|
+
}
|
|
831
|
+
return new NativeConstructor(a, b, c);
|
|
832
|
+
}
|
|
833
|
+
return apply(NativeConstructor, this, arguments);
|
|
834
|
+
};
|
|
835
|
+
Wrapper.prototype = NativeConstructor.prototype;
|
|
836
|
+
return Wrapper;
|
|
837
|
+
};
|
|
838
|
+
module.exports = function(options, source) {
|
|
839
|
+
var TARGET = options.target;
|
|
840
|
+
var GLOBAL = options.global;
|
|
841
|
+
var STATIC = options.stat;
|
|
842
|
+
var PROTO = options.proto;
|
|
843
|
+
var nativeSource = GLOBAL ? global2 : STATIC ? global2[TARGET] : global2[TARGET] && global2[TARGET].prototype;
|
|
844
|
+
var target = GLOBAL ? path : path[TARGET] || createNonEnumerableProperty(path, TARGET, {})[TARGET];
|
|
845
|
+
var targetPrototype = target.prototype;
|
|
846
|
+
var FORCED, USE_NATIVE, VIRTUAL_PROTOTYPE;
|
|
847
|
+
var key, sourceProperty, targetProperty, nativeProperty, resultProperty, descriptor;
|
|
848
|
+
for (key in source) {
|
|
849
|
+
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? "." : "#") + key, options.forced);
|
|
850
|
+
USE_NATIVE = !FORCED && nativeSource && hasOwn(nativeSource, key);
|
|
851
|
+
targetProperty = target[key];
|
|
852
|
+
if (USE_NATIVE)
|
|
853
|
+
if (options.dontCallGetSet) {
|
|
854
|
+
descriptor = getOwnPropertyDescriptor(nativeSource, key);
|
|
855
|
+
nativeProperty = descriptor && descriptor.value;
|
|
856
|
+
} else
|
|
857
|
+
nativeProperty = nativeSource[key];
|
|
858
|
+
sourceProperty = USE_NATIVE && nativeProperty ? nativeProperty : source[key];
|
|
859
|
+
if (!FORCED && !PROTO && typeof targetProperty == typeof sourceProperty)
|
|
860
|
+
continue;
|
|
861
|
+
if (options.bind && USE_NATIVE)
|
|
862
|
+
resultProperty = bind(sourceProperty, global2);
|
|
863
|
+
else if (options.wrap && USE_NATIVE)
|
|
864
|
+
resultProperty = wrapConstructor(sourceProperty);
|
|
865
|
+
else if (PROTO && isCallable(sourceProperty))
|
|
866
|
+
resultProperty = uncurryThis(sourceProperty);
|
|
867
|
+
else
|
|
868
|
+
resultProperty = sourceProperty;
|
|
869
|
+
if (options.sham || sourceProperty && sourceProperty.sham || targetProperty && targetProperty.sham) {
|
|
870
|
+
createNonEnumerableProperty(resultProperty, "sham", true);
|
|
871
|
+
}
|
|
872
|
+
createNonEnumerableProperty(target, key, resultProperty);
|
|
873
|
+
if (PROTO) {
|
|
874
|
+
VIRTUAL_PROTOTYPE = TARGET + "Prototype";
|
|
875
|
+
if (!hasOwn(path, VIRTUAL_PROTOTYPE)) {
|
|
876
|
+
createNonEnumerableProperty(path, VIRTUAL_PROTOTYPE, {});
|
|
877
|
+
}
|
|
878
|
+
createNonEnumerableProperty(path[VIRTUAL_PROTOTYPE], key, sourceProperty);
|
|
879
|
+
if (options.real && targetPrototype && (FORCED || !targetPrototype[key])) {
|
|
880
|
+
createNonEnumerableProperty(targetPrototype, key, sourceProperty);
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
};
|
|
885
|
+
}
|
|
886
|
+
});
|
|
887
|
+
|
|
888
|
+
// node_modules/core-js-pure/internals/math-trunc.js
|
|
889
|
+
var require_math_trunc = __commonJS({
|
|
890
|
+
"node_modules/core-js-pure/internals/math-trunc.js"(exports, module) {
|
|
891
|
+
"use strict";
|
|
892
|
+
var ceil = Math.ceil;
|
|
893
|
+
var floor = Math.floor;
|
|
894
|
+
module.exports = Math.trunc || function trunc(x) {
|
|
895
|
+
var n = +x;
|
|
896
|
+
return (n > 0 ? floor : ceil)(n);
|
|
897
|
+
};
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
|
|
901
|
+
// node_modules/core-js-pure/internals/to-integer-or-infinity.js
|
|
902
|
+
var require_to_integer_or_infinity = __commonJS({
|
|
903
|
+
"node_modules/core-js-pure/internals/to-integer-or-infinity.js"(exports, module) {
|
|
904
|
+
"use strict";
|
|
905
|
+
var trunc = require_math_trunc();
|
|
906
|
+
module.exports = function(argument) {
|
|
907
|
+
var number = +argument;
|
|
908
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
});
|
|
912
|
+
|
|
913
|
+
// node_modules/core-js-pure/internals/to-absolute-index.js
|
|
914
|
+
var require_to_absolute_index = __commonJS({
|
|
915
|
+
"node_modules/core-js-pure/internals/to-absolute-index.js"(exports, module) {
|
|
916
|
+
"use strict";
|
|
917
|
+
var toIntegerOrInfinity = require_to_integer_or_infinity();
|
|
918
|
+
var max = Math.max;
|
|
919
|
+
var min = Math.min;
|
|
920
|
+
module.exports = function(index, length) {
|
|
921
|
+
var integer = toIntegerOrInfinity(index);
|
|
922
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
});
|
|
926
|
+
|
|
927
|
+
// node_modules/core-js-pure/internals/to-length.js
|
|
928
|
+
var require_to_length = __commonJS({
|
|
929
|
+
"node_modules/core-js-pure/internals/to-length.js"(exports, module) {
|
|
930
|
+
"use strict";
|
|
931
|
+
var toIntegerOrInfinity = require_to_integer_or_infinity();
|
|
932
|
+
var min = Math.min;
|
|
933
|
+
module.exports = function(argument) {
|
|
934
|
+
var len = toIntegerOrInfinity(argument);
|
|
935
|
+
return len > 0 ? min(len, 9007199254740991) : 0;
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
});
|
|
939
|
+
|
|
940
|
+
// node_modules/core-js-pure/internals/length-of-array-like.js
|
|
941
|
+
var require_length_of_array_like = __commonJS({
|
|
942
|
+
"node_modules/core-js-pure/internals/length-of-array-like.js"(exports, module) {
|
|
943
|
+
"use strict";
|
|
944
|
+
var toLength = require_to_length();
|
|
945
|
+
module.exports = function(obj) {
|
|
946
|
+
return toLength(obj.length);
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
});
|
|
950
|
+
|
|
951
|
+
// node_modules/core-js-pure/internals/array-includes.js
|
|
952
|
+
var require_array_includes = __commonJS({
|
|
953
|
+
"node_modules/core-js-pure/internals/array-includes.js"(exports, module) {
|
|
954
|
+
"use strict";
|
|
955
|
+
var toIndexedObject = require_to_indexed_object();
|
|
956
|
+
var toAbsoluteIndex = require_to_absolute_index();
|
|
957
|
+
var lengthOfArrayLike = require_length_of_array_like();
|
|
958
|
+
var createMethod = function(IS_INCLUDES) {
|
|
959
|
+
return function($this, el, fromIndex) {
|
|
960
|
+
var O = toIndexedObject($this);
|
|
961
|
+
var length = lengthOfArrayLike(O);
|
|
962
|
+
if (length === 0)
|
|
963
|
+
return !IS_INCLUDES && -1;
|
|
964
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
965
|
+
var value;
|
|
966
|
+
if (IS_INCLUDES && el !== el)
|
|
967
|
+
while (length > index) {
|
|
968
|
+
value = O[index++];
|
|
969
|
+
if (value !== value)
|
|
970
|
+
return true;
|
|
971
|
+
}
|
|
972
|
+
else
|
|
973
|
+
for (; length > index; index++) {
|
|
974
|
+
if ((IS_INCLUDES || index in O) && O[index] === el)
|
|
975
|
+
return IS_INCLUDES || index || 0;
|
|
976
|
+
}
|
|
977
|
+
return !IS_INCLUDES && -1;
|
|
978
|
+
};
|
|
979
|
+
};
|
|
980
|
+
module.exports = {
|
|
981
|
+
// `Array.prototype.includes` method
|
|
982
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
983
|
+
includes: createMethod(true),
|
|
984
|
+
// `Array.prototype.indexOf` method
|
|
985
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
986
|
+
indexOf: createMethod(false)
|
|
987
|
+
};
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
|
|
991
|
+
// node_modules/core-js-pure/internals/hidden-keys.js
|
|
992
|
+
var require_hidden_keys = __commonJS({
|
|
993
|
+
"node_modules/core-js-pure/internals/hidden-keys.js"(exports, module) {
|
|
994
|
+
"use strict";
|
|
995
|
+
module.exports = {};
|
|
996
|
+
}
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
// node_modules/core-js-pure/internals/object-keys-internal.js
|
|
1000
|
+
var require_object_keys_internal = __commonJS({
|
|
1001
|
+
"node_modules/core-js-pure/internals/object-keys-internal.js"(exports, module) {
|
|
1002
|
+
"use strict";
|
|
1003
|
+
var uncurryThis = require_function_uncurry_this();
|
|
1004
|
+
var hasOwn = require_has_own_property();
|
|
1005
|
+
var toIndexedObject = require_to_indexed_object();
|
|
1006
|
+
var indexOf = require_array_includes().indexOf;
|
|
1007
|
+
var hiddenKeys = require_hidden_keys();
|
|
1008
|
+
var push = uncurryThis([].push);
|
|
1009
|
+
module.exports = function(object, names) {
|
|
1010
|
+
var O = toIndexedObject(object);
|
|
1011
|
+
var i = 0;
|
|
1012
|
+
var result = [];
|
|
1013
|
+
var key;
|
|
1014
|
+
for (key in O)
|
|
1015
|
+
!hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
|
|
1016
|
+
while (names.length > i)
|
|
1017
|
+
if (hasOwn(O, key = names[i++])) {
|
|
1018
|
+
~indexOf(result, key) || push(result, key);
|
|
1019
|
+
}
|
|
1020
|
+
return result;
|
|
1021
|
+
};
|
|
1022
|
+
}
|
|
1023
|
+
});
|
|
1024
|
+
|
|
1025
|
+
// node_modules/core-js-pure/internals/enum-bug-keys.js
|
|
1026
|
+
var require_enum_bug_keys = __commonJS({
|
|
1027
|
+
"node_modules/core-js-pure/internals/enum-bug-keys.js"(exports, module) {
|
|
1028
|
+
"use strict";
|
|
1029
|
+
module.exports = [
|
|
1030
|
+
"constructor",
|
|
1031
|
+
"hasOwnProperty",
|
|
1032
|
+
"isPrototypeOf",
|
|
1033
|
+
"propertyIsEnumerable",
|
|
1034
|
+
"toLocaleString",
|
|
1035
|
+
"toString",
|
|
1036
|
+
"valueOf"
|
|
1037
|
+
];
|
|
1038
|
+
}
|
|
1039
|
+
});
|
|
1040
|
+
|
|
1041
|
+
// node_modules/core-js-pure/internals/object-keys.js
|
|
1042
|
+
var require_object_keys = __commonJS({
|
|
1043
|
+
"node_modules/core-js-pure/internals/object-keys.js"(exports, module) {
|
|
1044
|
+
"use strict";
|
|
1045
|
+
var internalObjectKeys = require_object_keys_internal();
|
|
1046
|
+
var enumBugKeys = require_enum_bug_keys();
|
|
1047
|
+
module.exports = Object.keys || function keys(O) {
|
|
1048
|
+
return internalObjectKeys(O, enumBugKeys);
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
});
|
|
1052
|
+
|
|
1053
|
+
// node_modules/core-js-pure/internals/object-define-properties.js
|
|
1054
|
+
var require_object_define_properties = __commonJS({
|
|
1055
|
+
"node_modules/core-js-pure/internals/object-define-properties.js"(exports) {
|
|
1056
|
+
"use strict";
|
|
1057
|
+
var DESCRIPTORS = require_descriptors();
|
|
1058
|
+
var V8_PROTOTYPE_DEFINE_BUG = require_v8_prototype_define_bug();
|
|
1059
|
+
var definePropertyModule = require_object_define_property();
|
|
1060
|
+
var anObject = require_an_object();
|
|
1061
|
+
var toIndexedObject = require_to_indexed_object();
|
|
1062
|
+
var objectKeys = require_object_keys();
|
|
1063
|
+
exports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1064
|
+
anObject(O);
|
|
1065
|
+
var props = toIndexedObject(Properties);
|
|
1066
|
+
var keys = objectKeys(Properties);
|
|
1067
|
+
var length = keys.length;
|
|
1068
|
+
var index = 0;
|
|
1069
|
+
var key;
|
|
1070
|
+
while (length > index)
|
|
1071
|
+
definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1072
|
+
return O;
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
});
|
|
1076
|
+
|
|
1077
|
+
// node_modules/core-js-pure/internals/html.js
|
|
1078
|
+
var require_html = __commonJS({
|
|
1079
|
+
"node_modules/core-js-pure/internals/html.js"(exports, module) {
|
|
1080
|
+
"use strict";
|
|
1081
|
+
var getBuiltIn = require_get_built_in();
|
|
1082
|
+
module.exports = getBuiltIn("document", "documentElement");
|
|
1083
|
+
}
|
|
1084
|
+
});
|
|
1085
|
+
|
|
1086
|
+
// node_modules/core-js-pure/internals/shared-key.js
|
|
1087
|
+
var require_shared_key = __commonJS({
|
|
1088
|
+
"node_modules/core-js-pure/internals/shared-key.js"(exports, module) {
|
|
1089
|
+
"use strict";
|
|
1090
|
+
var shared = require_shared();
|
|
1091
|
+
var uid = require_uid();
|
|
1092
|
+
var keys = shared("keys");
|
|
1093
|
+
module.exports = function(key) {
|
|
1094
|
+
return keys[key] || (keys[key] = uid(key));
|
|
1095
|
+
};
|
|
1096
|
+
}
|
|
1097
|
+
});
|
|
1098
|
+
|
|
1099
|
+
// node_modules/core-js-pure/internals/object-create.js
|
|
1100
|
+
var require_object_create = __commonJS({
|
|
1101
|
+
"node_modules/core-js-pure/internals/object-create.js"(exports, module) {
|
|
1102
|
+
"use strict";
|
|
1103
|
+
var anObject = require_an_object();
|
|
1104
|
+
var definePropertiesModule = require_object_define_properties();
|
|
1105
|
+
var enumBugKeys = require_enum_bug_keys();
|
|
1106
|
+
var hiddenKeys = require_hidden_keys();
|
|
1107
|
+
var html = require_html();
|
|
1108
|
+
var documentCreateElement = require_document_create_element();
|
|
1109
|
+
var sharedKey = require_shared_key();
|
|
1110
|
+
var GT = ">";
|
|
1111
|
+
var LT = "<";
|
|
1112
|
+
var PROTOTYPE = "prototype";
|
|
1113
|
+
var SCRIPT = "script";
|
|
1114
|
+
var IE_PROTO = sharedKey("IE_PROTO");
|
|
1115
|
+
var EmptyConstructor = function() {
|
|
1116
|
+
};
|
|
1117
|
+
var scriptTag = function(content) {
|
|
1118
|
+
return LT + SCRIPT + GT + content + LT + "/" + SCRIPT + GT;
|
|
1119
|
+
};
|
|
1120
|
+
var NullProtoObjectViaActiveX = function(activeXDocument2) {
|
|
1121
|
+
activeXDocument2.write(scriptTag(""));
|
|
1122
|
+
activeXDocument2.close();
|
|
1123
|
+
var temp = activeXDocument2.parentWindow.Object;
|
|
1124
|
+
activeXDocument2 = null;
|
|
1125
|
+
return temp;
|
|
1126
|
+
};
|
|
1127
|
+
var NullProtoObjectViaIFrame = function() {
|
|
1128
|
+
var iframe = documentCreateElement("iframe");
|
|
1129
|
+
var JS = "java" + SCRIPT + ":";
|
|
1130
|
+
var iframeDocument;
|
|
1131
|
+
iframe.style.display = "none";
|
|
1132
|
+
html.appendChild(iframe);
|
|
1133
|
+
iframe.src = String(JS);
|
|
1134
|
+
iframeDocument = iframe.contentWindow.document;
|
|
1135
|
+
iframeDocument.open();
|
|
1136
|
+
iframeDocument.write(scriptTag("document.F=Object"));
|
|
1137
|
+
iframeDocument.close();
|
|
1138
|
+
return iframeDocument.F;
|
|
1139
|
+
};
|
|
1140
|
+
var activeXDocument;
|
|
1141
|
+
var NullProtoObject = function() {
|
|
1142
|
+
try {
|
|
1143
|
+
activeXDocument = new ActiveXObject("htmlfile");
|
|
1144
|
+
} catch (error) {
|
|
1145
|
+
}
|
|
1146
|
+
NullProtoObject = typeof document != "undefined" ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument);
|
|
1147
|
+
var length = enumBugKeys.length;
|
|
1148
|
+
while (length--)
|
|
1149
|
+
delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
1150
|
+
return NullProtoObject();
|
|
1151
|
+
};
|
|
1152
|
+
hiddenKeys[IE_PROTO] = true;
|
|
1153
|
+
module.exports = Object.create || function create(O, Properties) {
|
|
1154
|
+
var result;
|
|
1155
|
+
if (O !== null) {
|
|
1156
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
1157
|
+
result = new EmptyConstructor();
|
|
1158
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
1159
|
+
result[IE_PROTO] = O;
|
|
1160
|
+
} else
|
|
1161
|
+
result = NullProtoObject();
|
|
1162
|
+
return Properties === void 0 ? result : definePropertiesModule.f(result, Properties);
|
|
1163
|
+
};
|
|
1164
|
+
}
|
|
1165
|
+
});
|
|
1166
|
+
|
|
1167
|
+
// node_modules/core-js-pure/modules/es.object.create.js
|
|
1168
|
+
var require_es_object_create = __commonJS({
|
|
1169
|
+
"node_modules/core-js-pure/modules/es.object.create.js"() {
|
|
1170
|
+
"use strict";
|
|
1171
|
+
var $ = require_export();
|
|
1172
|
+
var DESCRIPTORS = require_descriptors();
|
|
1173
|
+
var create = require_object_create();
|
|
1174
|
+
$({ target: "Object", stat: true, sham: !DESCRIPTORS }, {
|
|
1175
|
+
create
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
});
|
|
1179
|
+
|
|
1180
|
+
// node_modules/core-js-pure/es/object/create.js
|
|
1181
|
+
var require_create = __commonJS({
|
|
1182
|
+
"node_modules/core-js-pure/es/object/create.js"(exports, module) {
|
|
1183
|
+
"use strict";
|
|
1184
|
+
require_es_object_create();
|
|
1185
|
+
var path = require_path();
|
|
1186
|
+
var Object2 = path.Object;
|
|
1187
|
+
module.exports = function create(P, D) {
|
|
1188
|
+
return Object2.create(P, D);
|
|
1189
|
+
};
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1192
|
+
|
|
1193
|
+
// node_modules/core-js-pure/stable/object/create.js
|
|
1194
|
+
var require_create2 = __commonJS({
|
|
1195
|
+
"node_modules/core-js-pure/stable/object/create.js"(exports, module) {
|
|
1196
|
+
"use strict";
|
|
1197
|
+
var parent = require_create();
|
|
1198
|
+
module.exports = parent;
|
|
1199
|
+
}
|
|
1200
|
+
});
|
|
1201
|
+
|
|
1202
|
+
// node_modules/@babel/runtime-corejs3/core-js-stable/object/create.js
|
|
1203
|
+
var require_create3 = __commonJS({
|
|
1204
|
+
"node_modules/@babel/runtime-corejs3/core-js-stable/object/create.js"(exports, module) {
|
|
1205
|
+
module.exports = require_create2();
|
|
1206
|
+
}
|
|
1207
|
+
});
|
|
1208
|
+
|
|
1209
|
+
// node_modules/classnames/index.js
|
|
1210
|
+
var require_classnames = __commonJS({
|
|
1211
|
+
"node_modules/classnames/index.js"(exports, module) {
|
|
1212
|
+
(function() {
|
|
1213
|
+
"use strict";
|
|
1214
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1215
|
+
function classNames() {
|
|
1216
|
+
var classes = "";
|
|
1217
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
1218
|
+
var arg = arguments[i];
|
|
1219
|
+
if (arg) {
|
|
1220
|
+
classes = appendClass(classes, parseValue(arg));
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
return classes;
|
|
1224
|
+
}
|
|
1225
|
+
function parseValue(arg) {
|
|
1226
|
+
if (typeof arg === "string" || typeof arg === "number") {
|
|
1227
|
+
return arg;
|
|
1228
|
+
}
|
|
1229
|
+
if (typeof arg !== "object") {
|
|
1230
|
+
return "";
|
|
1231
|
+
}
|
|
1232
|
+
if (Array.isArray(arg)) {
|
|
1233
|
+
return classNames.apply(null, arg);
|
|
1234
|
+
}
|
|
1235
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
1236
|
+
return arg.toString();
|
|
1237
|
+
}
|
|
1238
|
+
var classes = "";
|
|
1239
|
+
for (var key in arg) {
|
|
1240
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1241
|
+
classes = appendClass(classes, key);
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
return classes;
|
|
1245
|
+
}
|
|
1246
|
+
function appendClass(value, newClass) {
|
|
1247
|
+
if (!newClass) {
|
|
1248
|
+
return value;
|
|
1249
|
+
}
|
|
1250
|
+
if (value) {
|
|
1251
|
+
return value + " " + newClass;
|
|
1252
|
+
}
|
|
1253
|
+
return value + newClass;
|
|
1254
|
+
}
|
|
1255
|
+
if (typeof module !== "undefined" && module.exports) {
|
|
1256
|
+
classNames.default = classNames;
|
|
1257
|
+
module.exports = classNames;
|
|
1258
|
+
} else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
|
|
1259
|
+
define("classnames", [], function() {
|
|
1260
|
+
return classNames;
|
|
1261
|
+
});
|
|
1262
|
+
} else {
|
|
1263
|
+
window.classNames = classNames;
|
|
1264
|
+
}
|
|
1265
|
+
})();
|
|
1266
|
+
}
|
|
1267
|
+
});
|
|
1268
|
+
|
|
1269
|
+
// node_modules/inject-meta-tag/lib/esmodules/injectMetaTag.js
|
|
1270
|
+
function injectMeta(name, content) {
|
|
1271
|
+
try {
|
|
1272
|
+
if (typeof document === "undefined") {
|
|
1273
|
+
return;
|
|
1274
|
+
}
|
|
1275
|
+
var metaElement = document.createElement("meta");
|
|
1276
|
+
metaElement.setAttribute("name", name);
|
|
1277
|
+
content && metaElement.setAttribute("content", content);
|
|
1278
|
+
document.head.appendChild(metaElement);
|
|
1279
|
+
} catch (error) {
|
|
1280
|
+
console.error('inject-meta-tag: Failed to inject <meta name="'.concat(name, '"> tag.'), error);
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1284
|
+
// src/private/FluentThemeProvider.tsx
|
|
1285
|
+
var import_botframework_webchat_component9 = __toESM(require_botframework_webchat_component());
|
|
1286
|
+
var import_react27 = __toESM(require_react());
|
|
1287
|
+
|
|
1288
|
+
// src/components/telephoneKeypad/Provider.tsx
|
|
1289
|
+
var import_react2 = __toESM(require_react());
|
|
1290
|
+
|
|
1291
|
+
// src/components/telephoneKeypad/private/Context.ts
|
|
1292
|
+
var import_react = __toESM(require_react());
|
|
1293
|
+
var Context = (0, import_react.createContext)(
|
|
1294
|
+
new Proxy({}, {
|
|
1295
|
+
get() {
|
|
1296
|
+
throw new Error("botframework-webchat: This hook can only used under its corresponding <Provider>.");
|
|
1297
|
+
}
|
|
1298
|
+
})
|
|
1299
|
+
);
|
|
1300
|
+
Context.displayName = "TelephoneKeypad.Context";
|
|
1301
|
+
var Context_default = Context;
|
|
1302
|
+
|
|
1303
|
+
// src/components/telephoneKeypad/Provider.tsx
|
|
1304
|
+
var Provider = (0, import_react2.memo)(({ children }) => {
|
|
1305
|
+
const [shown, setShown] = (0, import_react2.useState)(false);
|
|
1306
|
+
const context = (0, import_react2.useMemo)(
|
|
1307
|
+
() => Object.freeze({
|
|
1308
|
+
setShown,
|
|
1309
|
+
shown
|
|
1310
|
+
}),
|
|
1311
|
+
[setShown, shown]
|
|
1312
|
+
);
|
|
1313
|
+
return /* @__PURE__ */ import_react2.default.createElement(Context_default.Provider, { value: context }, children);
|
|
1314
|
+
});
|
|
1315
|
+
var Provider_default = Provider;
|
|
1316
|
+
|
|
1317
|
+
// src/components/telephoneKeypad/Surrogate.tsx
|
|
1318
|
+
var import_react8 = __toESM(require_react());
|
|
1319
|
+
|
|
1320
|
+
// src/components/telephoneKeypad/private/TelephoneKeypad.tsx
|
|
1321
|
+
var import_react7 = __toESM(require_react());
|
|
1322
|
+
|
|
1323
|
+
// node_modules/use-ref-from/lib/esmodules/useRefFrom.js
|
|
1324
|
+
var import_create = __toESM(require_create3());
|
|
1325
|
+
var import_react3 = __toESM(require_react());
|
|
1326
|
+
function useRefFrom(value) {
|
|
1327
|
+
var ref = (0, import_react3.useRef)();
|
|
1328
|
+
var readOnlyRef = (0, import_react3.useMemo)(function() {
|
|
1329
|
+
return (0, import_create.default)({}, {
|
|
1330
|
+
current: {
|
|
1331
|
+
get: function get() {
|
|
1332
|
+
return ref.current;
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
});
|
|
1336
|
+
}, [ref]);
|
|
1337
|
+
ref.current = value;
|
|
1338
|
+
return readOnlyRef;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
// src/components/telephoneKeypad/private/Button.tsx
|
|
1342
|
+
var import_react5 = __toESM(require_react());
|
|
1343
|
+
|
|
1344
|
+
// src/components/telephoneKeypad/private/Button.module.css
|
|
1345
|
+
var Button_default = {
|
|
1346
|
+
"telephone-keypad__button": "Button_telephone-keypad__button",
|
|
1347
|
+
"telephone-keypad__button__ruby": "Button_telephone-keypad__button__ruby",
|
|
1348
|
+
"telephone-keypad__button__text": "Button_telephone-keypad__button__text",
|
|
1349
|
+
"telephone-keypad--horizontal": "Button_telephone-keypad--horizontal"
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
// src/styles/injectStyle.ts
|
|
1353
|
+
var injectedStyles = "/* src/components/telephoneKeypad/private/Button.module.css */\n.webchat-fluent .Button_telephone-keypad__button {\n -webkit-user-select: none;\n align-items: center;\n appearance: none;\n background-color: White;\n border-radius: 100%;\n border: solid 1px var(--webchat-colorNeutralStroke1);\n color: var(--webchat-colorGray200);\n font-weight: var(--webchat-fontWeightSemibold);\n cursor: pointer;\n display: flex;\n flex-direction: column;\n height: 60px;\n opacity: 0.7;\n padding: 0;\n position: relative;\n touch-action: none;\n user-select: none;\n width: 60px;\n}\n.webchat-fluent .Button_telephone-keypad__button:hover {\n background-color: var(--webchat-colorGray30);\n}\n.webchat-fluent .Button_telephone-keypad__button__ruby {\n color: var(--webchat-colorGray190);\n font-size: 10px;\n}\n.webchat-fluent .Button_telephone-keypad__button__text {\n font-size: 24px;\n margin-top: 8px;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button {\n height: 32px;\n justify-content: center;\n margin: 8px 4px;\n width: 32px;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button__ruby {\n display: none;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button__text {\n font-size: 20px;\n margin-top: 0;\n}\n\n/* src/components/telephoneKeypad/private/TelephoneKeypad.module.css */\n.webchat-fluent .TelephoneKeypad_telephone-keypad {\n align-items: center;\n background: var(--webchat-colorNeutralBackground1);\n border: none;\n border-radius: var(--webchat-borderRadiusXLarge);\n display: flex;\n flex-direction: column;\n font-family: var(--webchat-fontFamilyBase);\n justify-content: center;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__box {\n box-sizing: border-box;\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(3, 1fr);\n grid-template-rows: repeat(4, 1fr);\n justify-items: center;\n padding: 16px;\n width: 100%;\n}\n\n/* src/components/Theme.module.css */\n.webchat-fluent.Theme_theme {\n display: contents;\n --webchat-colorNeutralForeground1: var(--colorNeutralForeground1, #242424);\n --webchat-colorNeutralForeground2: var(--colorNeutralForeground2, #424242);\n --webchat-colorNeutralForeground4: var(--colorNeutralForeground4, #707070);\n --webchat-colorNeutralForegroundDisabled: var(--colorNeutralForegroundDisabled, #bdbdbd);\n --webchat-colorNeutralBackground1: var(--colorNeutralBackground1, #ffffff);\n --webchat-colorNeutralBackground4: var(--colorNeutralBackground4, #f0f0f0);\n --webchat-colorNeutralBackground5: var(--colorNeutralBackground5, #ebebeb);\n --webchat-colorSubtleBackgroundHover: var(--colorSubtleBackgroundHover, #f5f5f5);\n --webchat-colorSubtleBackgroundPressed: var(--colorSubtleBackgroundPressed, #e0e0e0);\n --webchat-colorNeutralStroke1: var(--colorNeutralStroke1, #d1d1d1);\n --webchat-colorNeutralStroke2: var(--colorNeutralStroke2, #e0e0e0);\n --webchat-colorNeutralStroke1Selected: var(--colorNeutralStroke1Selected, #bdbdbd);\n --webchat-colorBrandStroke2: var(--colorBrandStroke2, #9edcf7);\n --webchat-colorBrandForeground2Hover: var(--colorBrandForeground2Hover, #015a7a);\n --webchat-colorBrandForeground2Pressed: var(--colorBrandForeground2Pressed, #01384d);\n --webchat-colorBrandBackground2Hover: var(--colorBrandBackground2Hover, #bee7fa);\n --webchat-colorBrandBackground2Pressed: var(--colorBrandBackground2Pressed, #7fd2f5);\n --webchat-colorCompoundBrandForeground1: var(--colorCompoundBrandForeground1, #077fab);\n --webchat-colorCompoundBrandForeground1Hover: var(--colorCompoundBrandForeground1Hover, #02729c);\n --webchat-colorCompoundBrandForeground1Pressed: var(--colorCompoundBrandForeground1Pressed, #01678c);\n --webchat-colorStatusDangerForeground1: var(--colorStatusDangerForeground1, #b10e1c);\n --webchat-colorGray30: var(--colorGray30, #edebe9);\n --webchat-colorGray160: var(--colorGray160, #323130);\n --webchat-colorGray190: var(--colorGray190, #201f1e);\n --webchat-colorGray200: var(--colorGray200, #1b1a19);\n --webchat-borderRadiusSmall: var(--borderRadiusSmall, 2px);\n --webchat-borderRadiusLarge: var(--borderRadiusLarge, 6px);\n --webchat-borderRadiusXLarge: var(--borderRadiusXLarge, 8px);\n --webchat-shadow16: var(--shadow16, 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108));\n --webchat-spacingHorizontalMNudge: var(--spacingHorizontalMNudge, 10px);\n --webchat-fontFamilyBase: var(--fontFamilyBase, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);\n --webchat-fontFamilyNumeric: var(--fontFamilyNumeric, Bahnschrift, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);\n --webchat-fontWeightSemibold: var(--fontWeightSemibold, 600);\n}\n\n/* src/components/dropZone/index.module.css */\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone {\n background-color: var(--webchat-colorNeutralBackground4);\n border-radius: inherit;\n cursor: copy;\n display: grid;\n gap: 8px;\n inset: 0;\n place-content: center;\n place-items: center;\n position: absolute;\n}\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone--droppable {\n background-color: #e00;\n color: White;\n}\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone-icon {\n height: 36px;\n pointer-events: none;\n width: 36px;\n}\n\n/* src/components/suggestedActions/SuggestedAction.module.css */\n.webchat-fluent .SuggestedAction_suggested-action {\n align-items: center;\n background: transparent;\n border-radius: 8px;\n border: 1px solid var(--webchat-colorBrandStroke2);\n cursor: pointer;\n display: flex;\n font-size: 12px;\n gap: 4px;\n padding: 4px 8px 4px;\n text-align: start;\n transition: all .15s ease-out;\n}\n@media (hover: hover) {\n .webchat-fluent .SuggestedAction_suggested-action:not([aria-disabled=true]):hover {\n background-color: var(--webchat-colorBrandBackground2Hover);\n color: var(--webchat-colorBrandForeground2Hover);\n }\n}\n.webchat-fluent .SuggestedAction_suggested-action:not([aria-disabled=true]):active {\n background-color: var(--webchat-colorBrandBackground2Pressed);\n color: var(--webchat-colorBrandForeground2Pressed);\n}\n.webchat-fluent .SuggestedAction_suggested-action[aria-disabled=true] {\n color: var(--webchat-colorNeutralForegroundDisabled);\n cursor: not-allowed;\n}\n.webchat-fluent .SuggestedAction_suggested-action__image {\n font-size: 12px;\n height: 1em;\n width: 1em;\n}\n\n/* src/components/suggestedActions/index.module.css */\n.webchat-fluent .suggestedActions_suggested-actions {\n align-items: flex-end;\n align-self: flex-end;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.webchat-fluent .suggestedActions_suggested-actions:not(:empty) {\n padding-block-end: 8px;\n padding-inline-start: 4px;\n}\n.webchat-fluent .suggestedActions_suggested-actions.suggestedActions_suggested-actions--flow {\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n.webchat-fluent .suggestedActions_suggested-actions.suggestedActions_suggested-actions--stacked {\n flex-direction: column;\n}\n\n/* src/components/sendbox/Toolbar.module.css */\n.webchat-fluent .Toolbar_sendbox__toolbar {\n display: flex;\n gap: 4px;\n margin-inline-start: auto;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button {\n align-items: center;\n appearance: none;\n aspect-ratio: 1;\n background: transparent;\n border-radius: var(--webchat-borderRadiusSmall);\n border: none;\n cursor: pointer;\n display: flex;\n justify-content: center;\n padding: 3px;\n width: 32px;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button > svg {\n font-size: 20px;\n pointer-events: none;\n}\n@media (hover: hover) {\n .webchat-fluent .Toolbar_sendbox__toolbar-button:not([aria-disabled=true]):hover {\n background-color: var(--webchat-colorSubtleBackgroundHover);\n color: var(--webchat-colorCompoundBrandForeground1Hover);\n }\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button:not([aria-disabled=true]):active {\n background-color: var(--webchat-colorSubtleBackgroundPressed);\n color: var(--webchat-colorCompoundBrandForeground1Pressed);\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button[aria-disabled=true] {\n color: var(--webchat-colorNeutralForegroundDisabled);\n cursor: not-allowed;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-separator {\n align-self: center;\n border-inline-end: 1px solid var(--webchat-colorNeutralStroke2);\n height: 28px;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-separator:is(:first-child, :last-child, :only-child) {\n display: none;\n}\n\n/* src/components/sendbox/AddAttachmentButton.module.css */\n.webchat-fluent .AddAttachmentButton_sendbox__add-attachment {\n display: grid;\n}\n.webchat-fluent .AddAttachmentButton_sendbox__add-attachment-input {\n font-size: 0;\n height: 0;\n opacity: 0;\n width: 0;\n}\n\n/* src/components/sendbox/Attachments.module.css */\n.webchat-fluent .Attachments_sendbox__attachment {\n border-radius: var(--webchat-borderRadiusLarge);\n border: 1px solid var(--webchat-colorNeutralStroke1);\n cursor: default;\n padding: 6px 8px;\n width: fit-content;\n}\n\n/* src/components/sendbox/ErrorMessage.module.css */\n.webchat-fluent .ErrorMessage_sendbox__error-message {\n color: transparent;\n font-size: 0;\n height: 0;\n left: 0;\n position: absolute;\n top: 0;\n width: 0;\n}\n\n/* src/components/sendbox/TextArea.module.css */\n.webchat-fluent .TextArea_sendbox__text-area {\n display: grid;\n grid-template-areas: \"main\";\n max-height: 200px;\n overflow: hidden;\n}\n.webchat-fluent .TextArea_sendbox__text-area--hidden {\n height: 0;\n visibility: collapse;\n}\n.webchat-fluent .TextArea_sendbox__text-area-shared {\n border: none;\n font: inherit;\n grid-area: main;\n outline: inherit;\n overflow-wrap: anywhere;\n resize: inherit;\n scrollbar-gutter: stable;\n}\n.webchat-fluent .TextArea_sendbox__text-area-doppelganger {\n overflow: hidden;\n visibility: hidden;\n white-space: pre-wrap;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input {\n height: 100%;\n padding: 0;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll {\n scrollbar-color: unset;\n scrollbar-width: unset;\n -moz-scrollbar-color: var(--webchat-colorNeutralBackground5) var(--webchat-colorNeutralForeground2);\n -moz-scrollbar-width: thin;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar {\n width: 8px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-track {\n background-color: var(--webchat-colorNeutralBackground5);\n border-radius: 16px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-thumb {\n background-color: var(--webchat-colorNeutralForeground2);\n border-radius: 16px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-corner {\n background-color: var(--webchat-colorNeutralBackground5);\n}\n\n/* src/components/sendbox/index.module.css */\n.webchat-fluent .sendbox_sendbox {\n color: var(--webchat-colorNeutralForeground1);\n font-family: var(--webchat-fontFamilyBase);\n padding: 0 10px 10px;\n text-rendering: optimizeLegibility;\n}\n.webchat-fluent .sendbox_sendbox__sendbox {\n background-color: var(--webchat-colorNeutralBackground1);\n border-radius: var(--webchat-borderRadiusLarge);\n border: 1px solid var(--webchat-colorNeutralStroke1);\n display: grid;\n font-family: var(--webchat-fontFamilyBase);\n font-size: 14px;\n gap: 6px;\n line-height: 20px;\n padding: 8px;\n position: relative;\n}\n.webchat-fluent .sendbox_sendbox__sendbox:focus-within {\n border-color: var(--webchat-colorNeutralStroke1Selected);\n box-shadow: inset 0 -6px 0 -3px var(--webchat-colorCompoundBrandForeground1Hover);\n}\n.webchat-fluent .sendbox_sendbox__sendbox-text {\n background-color: transparent;\n border: none;\n flex: auto;\n font-family: var(--webchat-fontFamilyBase);\n font-size: 14px;\n line-height: 20px;\n outline: none;\n padding: 4px 4px 0;\n resize: none;\n}\n.webchat-fluent .sendbox_sendbox__sendbox-controls {\n align-items: center;\n display: flex;\n padding-inline-start: 4px;\n}\n.webchat-fluent .sendbox_sendbox__text-counter {\n color: var(--webchat-colorNeutralForeground4);\n cursor: default;\n font-family: var(--webchat-fontFamilyNumeric);\n font-size: 10px;\n line-height: 14px;\n}\n.webchat-fluent .sendbox_sendbox__text-counter--error {\n color: var(--webchat-colorStatusDangerForeground1);\n}\n";
|
|
1354
|
+
function injectStyles() {
|
|
1355
|
+
if (globalThis.document) {
|
|
1356
|
+
const style = document.createElement("style");
|
|
1357
|
+
style.append(document.createTextNode(injectedStyles));
|
|
1358
|
+
document.head.appendChild(style);
|
|
1359
|
+
}
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
// src/styles/useStyles.ts
|
|
1363
|
+
var import_react4 = __toESM(require_react());
|
|
1364
|
+
function useStyles(styles) {
|
|
1365
|
+
return (0, import_react4.useMemo)(
|
|
1366
|
+
() => Object.freeze(
|
|
1367
|
+
Object.fromEntries(
|
|
1368
|
+
Object.entries(styles).map(([baseClassName, resultClassName]) => [
|
|
1369
|
+
baseClassName,
|
|
1370
|
+
`${baseClassName} ${resultClassName}`
|
|
1371
|
+
])
|
|
1372
|
+
)
|
|
1373
|
+
),
|
|
1374
|
+
[styles]
|
|
1375
|
+
);
|
|
1376
|
+
}
|
|
1377
|
+
var useStyles_default = useStyles;
|
|
1378
|
+
|
|
1379
|
+
// src/components/telephoneKeypad/private/Button.tsx
|
|
1380
|
+
var Button = (0, import_react5.memo)(
|
|
1381
|
+
// As we are all TypeScript, internal components do not need propTypes.
|
|
1382
|
+
// eslint-disable-next-line react/prop-types
|
|
1383
|
+
(0, import_react5.forwardRef)(({ button, "data-testid": dataTestId, onClick, ruby }, ref) => {
|
|
1384
|
+
const classNames = useStyles_default(Button_default);
|
|
1385
|
+
const onClickRef = useRefFrom(onClick);
|
|
1386
|
+
const handleClick = (0, import_react5.useCallback)(() => onClickRef.current?.(), [onClickRef]);
|
|
1387
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
|
1388
|
+
"button",
|
|
1389
|
+
{
|
|
1390
|
+
className: classNames["telephone-keypad__button"],
|
|
1391
|
+
"data-testid": dataTestId,
|
|
1392
|
+
onClick: handleClick,
|
|
1393
|
+
ref,
|
|
1394
|
+
type: "button"
|
|
1395
|
+
},
|
|
1396
|
+
/* @__PURE__ */ import_react5.default.createElement("span", { className: classNames["telephone-keypad__button__text"] }, button === "star" ? "\u2217" : button === "pound" ? "#" : button),
|
|
1397
|
+
!!ruby && /* @__PURE__ */ import_react5.default.createElement("ruby", { className: classNames["telephone-keypad__button__ruby"] }, ruby)
|
|
1398
|
+
);
|
|
1399
|
+
})
|
|
1400
|
+
);
|
|
1401
|
+
Button.displayName = "TelephoneKeypad.Button";
|
|
1402
|
+
var Button_default2 = Button;
|
|
1403
|
+
|
|
1404
|
+
// src/testIds.ts
|
|
1405
|
+
var testIds = {
|
|
1406
|
+
sendBoxDropZone: "send box drop zone",
|
|
1407
|
+
sendBoxSendButton: "send box send button",
|
|
1408
|
+
sendBoxTextBox: "send box text area",
|
|
1409
|
+
sendBoxTelephoneKeypadButton1: `send box telephone keypad button 1`,
|
|
1410
|
+
sendBoxTelephoneKeypadButton2: `send box telephone keypad button 2`,
|
|
1411
|
+
sendBoxTelephoneKeypadButton3: `send box telephone keypad button 3`,
|
|
1412
|
+
sendBoxTelephoneKeypadButton4: `send box telephone keypad button 4`,
|
|
1413
|
+
sendBoxTelephoneKeypadButton5: `send box telephone keypad button 5`,
|
|
1414
|
+
sendBoxTelephoneKeypadButton6: `send box telephone keypad button 6`,
|
|
1415
|
+
sendBoxTelephoneKeypadButton7: `send box telephone keypad button 7`,
|
|
1416
|
+
sendBoxTelephoneKeypadButton8: `send box telephone keypad button 8`,
|
|
1417
|
+
sendBoxTelephoneKeypadButton9: `send box telephone keypad button 9`,
|
|
1418
|
+
sendBoxTelephoneKeypadButton0: `send box telephone keypad button 0`,
|
|
1419
|
+
sendBoxTelephoneKeypadButtonStar: `send box telephone keypad button star`,
|
|
1420
|
+
sendBoxTelephoneKeypadButtonPound: `send box telephone keypad button pound`,
|
|
1421
|
+
sendBoxTelephoneKeypadToolbarButton: "send box telephone keypad toolbar button",
|
|
1422
|
+
sendBoxUploadButton: "send box upload button"
|
|
1423
|
+
};
|
|
1424
|
+
var testIds_default = testIds;
|
|
1425
|
+
|
|
1426
|
+
// src/components/telephoneKeypad/useShown.ts
|
|
1427
|
+
var import_react6 = __toESM(require_react());
|
|
1428
|
+
function useShown() {
|
|
1429
|
+
const { setShown, shown } = (0, import_react6.useContext)(Context_default);
|
|
1430
|
+
return (0, import_react6.useMemo)(() => Object.freeze([shown, setShown]), [shown, setShown]);
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
// src/components/telephoneKeypad/private/TelephoneKeypad.module.css
|
|
1434
|
+
var TelephoneKeypad_default = {
|
|
1435
|
+
"telephone-keypad": "TelephoneKeypad_telephone-keypad",
|
|
1436
|
+
"telephone-keypad__box": "TelephoneKeypad_telephone-keypad__box"
|
|
1437
|
+
};
|
|
1438
|
+
|
|
1439
|
+
// src/components/telephoneKeypad/private/TelephoneKeypad.tsx
|
|
1440
|
+
var Orientation = (0, import_react7.memo)(
|
|
1441
|
+
({ children, isHorizontal }) => {
|
|
1442
|
+
const classNames = useStyles_default(TelephoneKeypad_default);
|
|
1443
|
+
return isHorizontal ? (
|
|
1444
|
+
// <HorizontalDialPadController>{children}</HorizontalDialPadController>
|
|
1445
|
+
false
|
|
1446
|
+
) : /* @__PURE__ */ import_react7.default.createElement("div", { className: classNames["telephone-keypad__box"] }, children);
|
|
1447
|
+
}
|
|
1448
|
+
);
|
|
1449
|
+
Orientation.displayName = "TelephoneKeypad:Orientation";
|
|
1450
|
+
var TelephoneKeypad = (0, import_react7.memo)(({ autoFocus, onButtonClick, isHorizontal }) => {
|
|
1451
|
+
const autoFocusRef = useRefFrom(autoFocus);
|
|
1452
|
+
const classNames = useStyles_default(TelephoneKeypad_default);
|
|
1453
|
+
const firstButtonRef = (0, import_react7.useRef)(null);
|
|
1454
|
+
const onButtonClickRef = useRefFrom(onButtonClick);
|
|
1455
|
+
const [, setShown] = useShown();
|
|
1456
|
+
const handleButton1Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("1"), [onButtonClickRef]);
|
|
1457
|
+
const handleButton2Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("2"), [onButtonClickRef]);
|
|
1458
|
+
const handleButton3Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("3"), [onButtonClickRef]);
|
|
1459
|
+
const handleButton4Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("4"), [onButtonClickRef]);
|
|
1460
|
+
const handleButton5Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("5"), [onButtonClickRef]);
|
|
1461
|
+
const handleButton6Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("6"), [onButtonClickRef]);
|
|
1462
|
+
const handleButton7Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("7"), [onButtonClickRef]);
|
|
1463
|
+
const handleButton8Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("8"), [onButtonClickRef]);
|
|
1464
|
+
const handleButton9Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("9"), [onButtonClickRef]);
|
|
1465
|
+
const handleButton0Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("0"), [onButtonClickRef]);
|
|
1466
|
+
const handleButtonStarClick = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("star"), [onButtonClickRef]);
|
|
1467
|
+
const handleButtonPoundClick = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("pound"), [onButtonClickRef]);
|
|
1468
|
+
const handleKeyDown = (0, import_react7.useCallback)(
|
|
1469
|
+
(event) => {
|
|
1470
|
+
if (event.key === "Escape") {
|
|
1471
|
+
setShown(false);
|
|
1472
|
+
}
|
|
1473
|
+
},
|
|
1474
|
+
[setShown]
|
|
1475
|
+
);
|
|
1476
|
+
(0, import_react7.useEffect)(() => {
|
|
1477
|
+
autoFocusRef.current && firstButtonRef.current?.focus();
|
|
1478
|
+
}, [autoFocusRef, firstButtonRef]);
|
|
1479
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", { className: classNames["telephone-keypad"], onKeyDown: handleKeyDown }, /* @__PURE__ */ import_react7.default.createElement(Orientation, { isHorizontal }, /* @__PURE__ */ import_react7.default.createElement(
|
|
1480
|
+
Button_default2,
|
|
1481
|
+
{
|
|
1482
|
+
button: "1",
|
|
1483
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadButton1,
|
|
1484
|
+
onClick: handleButton1Click,
|
|
1485
|
+
ref: firstButtonRef
|
|
1486
|
+
}
|
|
1487
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1488
|
+
Button_default2,
|
|
1489
|
+
{
|
|
1490
|
+
button: "2",
|
|
1491
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadButton2,
|
|
1492
|
+
onClick: handleButton2Click,
|
|
1493
|
+
ruby: "ABC"
|
|
1494
|
+
}
|
|
1495
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1496
|
+
Button_default2,
|
|
1497
|
+
{
|
|
1498
|
+
button: "3",
|
|
1499
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadButton3,
|
|
1500
|
+
onClick: handleButton3Click,
|
|
1501
|
+
ruby: "DEF"
|
|
1502
|
+
}
|
|
1503
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1504
|
+
Button_default2,
|
|
1505
|
+
{
|
|
1506
|
+
button: "4",
|
|
1507
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadButton4,
|
|
1508
|
+
onClick: handleButton4Click,
|
|
1509
|
+
ruby: "GHI"
|
|
1510
|
+
}
|
|
1511
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1512
|
+
Button_default2,
|
|
1513
|
+
{
|
|
1514
|
+
button: "5",
|
|
1515
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadButton5,
|
|
1516
|
+
onClick: handleButton5Click,
|
|
1517
|
+
ruby: "JKL"
|
|
1518
|
+
}
|
|
1519
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1520
|
+
Button_default2,
|
|
1521
|
+
{
|
|
1522
|
+
button: "6",
|
|
1523
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadButton6,
|
|
1524
|
+
onClick: handleButton6Click,
|
|
1525
|
+
ruby: "MNO"
|
|
1526
|
+
}
|
|
1527
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1528
|
+
Button_default2,
|
|
1529
|
+
{
|
|
1530
|
+
button: "7",
|
|
1531
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadButton7,
|
|
1532
|
+
onClick: handleButton7Click,
|
|
1533
|
+
ruby: "PQRS"
|
|
1534
|
+
}
|
|
1535
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1536
|
+
Button_default2,
|
|
1537
|
+
{
|
|
1538
|
+
button: "8",
|
|
1539
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadButton8,
|
|
1540
|
+
onClick: handleButton8Click,
|
|
1541
|
+
ruby: "TUV"
|
|
1542
|
+
}
|
|
1543
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
1544
|
+
Button_default2,
|
|
1545
|
+
{
|
|
1546
|
+
button: "9",
|
|
1547
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadButton9,
|
|
1548
|
+
onClick: handleButton9Click,
|
|
1549
|
+
ruby: "WXYZ"
|
|
1550
|
+
}
|
|
1551
|
+
), /* @__PURE__ */ import_react7.default.createElement(Button_default2, { button: "star", "data-testid": testIds_default.sendBoxTelephoneKeypadButtonStar, onClick: handleButtonStarClick }), /* @__PURE__ */ import_react7.default.createElement(Button_default2, { button: "0", "data-testid": testIds_default.sendBoxTelephoneKeypadButton0, onClick: handleButton0Click, ruby: "+" }), /* @__PURE__ */ import_react7.default.createElement(
|
|
1552
|
+
Button_default2,
|
|
1553
|
+
{
|
|
1554
|
+
button: "pound",
|
|
1555
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadButtonPound,
|
|
1556
|
+
onClick: handleButtonPoundClick
|
|
1557
|
+
}
|
|
1558
|
+
)));
|
|
1559
|
+
});
|
|
1560
|
+
TelephoneKeypad.displayName = "TelephoneKeypad";
|
|
1561
|
+
var TelephoneKeypad_default2 = TelephoneKeypad;
|
|
1562
|
+
|
|
1563
|
+
// src/components/telephoneKeypad/Surrogate.tsx
|
|
1564
|
+
var TelephoneKeypadSurrogate = (0, import_react8.memo)((props) => useShown()[0] ? /* @__PURE__ */ import_react8.default.createElement(TelephoneKeypad_default2, { ...props }) : false);
|
|
1565
|
+
TelephoneKeypadSurrogate.displayName = "TelephoneKeypad.Surrogate";
|
|
1566
|
+
var Surrogate_default = TelephoneKeypadSurrogate;
|
|
1567
|
+
|
|
1568
|
+
// src/components/Theme.tsx
|
|
1569
|
+
var import_react9 = __toESM(require_react());
|
|
1570
|
+
var import_classnames = __toESM(require_classnames());
|
|
1571
|
+
|
|
1572
|
+
// src/components/Theme.module.css
|
|
1573
|
+
var Theme_default = {
|
|
1574
|
+
theme: "Theme_theme"
|
|
1575
|
+
};
|
|
1576
|
+
|
|
1577
|
+
// src/components/Theme.tsx
|
|
1578
|
+
var rootClassName = "webchat-fluent";
|
|
1579
|
+
function WebchatTheme(props) {
|
|
1580
|
+
const classNames = useStyles_default(Theme_default);
|
|
1581
|
+
return /* @__PURE__ */ import_react9.default.createElement("div", { className: (0, import_classnames.default)(rootClassName, classNames["theme"]) }, props.children);
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
// src/components/sendbox/index.tsx
|
|
1585
|
+
var import_botframework_webchat_component8 = __toESM(require_botframework_webchat_component());
|
|
1586
|
+
var import_classnames7 = __toESM(require_classnames());
|
|
1587
|
+
var import_react26 = __toESM(require_react());
|
|
1588
|
+
|
|
1589
|
+
// src/icons/SendIcon.tsx
|
|
1590
|
+
var import_react10 = __toESM(require_react());
|
|
1591
|
+
function SendIcon(props) {
|
|
1592
|
+
return /* @__PURE__ */ import_react10.default.createElement(
|
|
1593
|
+
"svg",
|
|
1594
|
+
{
|
|
1595
|
+
"aria-hidden": "true",
|
|
1596
|
+
className: props.className,
|
|
1597
|
+
fill: "currentColor",
|
|
1598
|
+
height: "1em",
|
|
1599
|
+
viewBox: "0 0 20 20",
|
|
1600
|
+
width: "1em",
|
|
1601
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1602
|
+
},
|
|
1603
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
1604
|
+
"path",
|
|
1605
|
+
{
|
|
1606
|
+
d: "M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z",
|
|
1607
|
+
fill: "currentColor"
|
|
1608
|
+
}
|
|
1609
|
+
)
|
|
1610
|
+
);
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
// src/components/dropZone/index.tsx
|
|
1614
|
+
var import_botframework_webchat_component = __toESM(require_botframework_webchat_component());
|
|
1615
|
+
var import_classnames2 = __toESM(require_classnames());
|
|
1616
|
+
var import_react12 = __toESM(require_react());
|
|
1617
|
+
|
|
1618
|
+
// src/icons/AddDocumentIcon.tsx
|
|
1619
|
+
var import_react11 = __toESM(require_react());
|
|
1620
|
+
function AddDocumentIcon(props) {
|
|
1621
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1622
|
+
"svg",
|
|
1623
|
+
{
|
|
1624
|
+
"aria-hidden": "true",
|
|
1625
|
+
className: props.className,
|
|
1626
|
+
fill: "currentColor",
|
|
1627
|
+
height: "1em",
|
|
1628
|
+
viewBox: "0 0 20 20",
|
|
1629
|
+
width: "1em",
|
|
1630
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1631
|
+
},
|
|
1632
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
1633
|
+
"path",
|
|
1634
|
+
{
|
|
1635
|
+
d: "M6 2a2 2 0 0 0-2 2v5.2c.32-.08.66-.15 1-.18V4a1 1 0 0 1 1-1h4v3.5c0 .83.67 1.5 1.5 1.5H15v8a1 1 0 0 1-1 1h-3.6c-.18.36-.4.7-.66 1H14a2 2 0 0 0 2-2V7.41c0-.4-.16-.78-.44-1.06l-3.91-3.91A1.5 1.5 0 0 0 10.59 2H6Zm8.8 5h-3.3a.5.5 0 0 1-.5-.5V3.2L14.8 7ZM10 14.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-4-2a.5.5 0 0 0-1 0V14H3.5a.5.5 0 0 0 0 1H5v1.5a.5.5 0 0 0 1 0V15h1.5a.5.5 0 0 0 0-1H6v-1.5Z",
|
|
1636
|
+
fill: "currentColor"
|
|
1637
|
+
}
|
|
1638
|
+
)
|
|
1639
|
+
);
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
// src/components/dropZone/index.module.css
|
|
1643
|
+
var dropZone_default = {
|
|
1644
|
+
"sendbox__attachment-drop-zone": "dropZone_sendbox__attachment-drop-zone",
|
|
1645
|
+
"sendbox__attachment-drop-zone--droppable": "dropZone_sendbox__attachment-drop-zone--droppable",
|
|
1646
|
+
"sendbox__attachment-drop-zone-icon": "dropZone_sendbox__attachment-drop-zone-icon"
|
|
1647
|
+
};
|
|
1648
|
+
|
|
1649
|
+
// src/components/dropZone/index.tsx
|
|
1650
|
+
var { useLocalizer } = import_botframework_webchat_component.hooks;
|
|
1651
|
+
var handleDragOver = (event) => {
|
|
1652
|
+
event.preventDefault();
|
|
1653
|
+
};
|
|
1654
|
+
var isFilesTransferEvent = (event) => !!event.dataTransfer?.types?.some((type) => type.toLowerCase() === "files");
|
|
1655
|
+
function isDescendantOf(target, ancestor) {
|
|
1656
|
+
let current = target.parentNode;
|
|
1657
|
+
while (current) {
|
|
1658
|
+
if (current === ancestor) {
|
|
1659
|
+
return true;
|
|
1660
|
+
}
|
|
1661
|
+
current = current.parentNode;
|
|
1662
|
+
}
|
|
1663
|
+
return false;
|
|
1664
|
+
}
|
|
1665
|
+
var DropZone = (props) => {
|
|
1666
|
+
const [dropZoneState, setDropZoneState] = (0, import_react12.useState)(false);
|
|
1667
|
+
const classNames = useStyles_default(dropZone_default);
|
|
1668
|
+
const dropZoneRef = (0, import_react12.useRef)(null);
|
|
1669
|
+
const localize = useLocalizer();
|
|
1670
|
+
const onFilesAddedRef = useRefFrom(props.onFilesAdded);
|
|
1671
|
+
(0, import_react12.useEffect)(() => {
|
|
1672
|
+
let entranceCounter = 0;
|
|
1673
|
+
const handleDragEnter = (event) => {
|
|
1674
|
+
entranceCounter++;
|
|
1675
|
+
if (isFilesTransferEvent(event)) {
|
|
1676
|
+
setDropZoneState(
|
|
1677
|
+
dropZoneRef.current && (event.target === dropZoneRef.current || event.target instanceof HTMLElement && isDescendantOf(event.target, dropZoneRef.current)) ? "droppable" : "visible"
|
|
1678
|
+
);
|
|
1679
|
+
}
|
|
1680
|
+
};
|
|
1681
|
+
const handleDragLeave = () => --entranceCounter <= 0 && setDropZoneState(false);
|
|
1682
|
+
document.addEventListener("dragenter", handleDragEnter, false);
|
|
1683
|
+
document.addEventListener("dragleave", handleDragLeave, false);
|
|
1684
|
+
return () => {
|
|
1685
|
+
document.removeEventListener("dragenter", handleDragEnter);
|
|
1686
|
+
document.removeEventListener("dragleave", handleDragLeave);
|
|
1687
|
+
};
|
|
1688
|
+
}, [setDropZoneState]);
|
|
1689
|
+
const handleDrop = (0, import_react12.useCallback)(
|
|
1690
|
+
(event) => {
|
|
1691
|
+
event.preventDefault();
|
|
1692
|
+
setDropZoneState(false);
|
|
1693
|
+
if (!isFilesTransferEvent(event.nativeEvent)) {
|
|
1694
|
+
return;
|
|
1695
|
+
}
|
|
1696
|
+
onFilesAddedRef.current([...event.dataTransfer.files]);
|
|
1697
|
+
},
|
|
1698
|
+
[onFilesAddedRef, setDropZoneState]
|
|
1699
|
+
);
|
|
1700
|
+
return dropZoneState ? /* @__PURE__ */ import_react12.default.createElement(
|
|
1701
|
+
"div",
|
|
1702
|
+
{
|
|
1703
|
+
className: (0, import_classnames2.default)(classNames["sendbox__attachment-drop-zone"], {
|
|
1704
|
+
[classNames["sendbox__attachment-drop-zone--droppable"]]: dropZoneState === "droppable"
|
|
1705
|
+
}),
|
|
1706
|
+
"data-testid": testIds_default.sendBoxDropZone,
|
|
1707
|
+
onDragOver: handleDragOver,
|
|
1708
|
+
onDrop: handleDrop,
|
|
1709
|
+
ref: dropZoneRef
|
|
1710
|
+
},
|
|
1711
|
+
/* @__PURE__ */ import_react12.default.createElement(AddDocumentIcon, { className: classNames["sendbox__attachment-drop-zone-icon"] }),
|
|
1712
|
+
localize("TEXT_INPUT_DROP_ZONE")
|
|
1713
|
+
) : null;
|
|
1714
|
+
};
|
|
1715
|
+
DropZone.displayName = "DropZone";
|
|
1716
|
+
var dropZone_default2 = (0, import_react12.memo)(DropZone);
|
|
1717
|
+
|
|
1718
|
+
// src/components/DropZone.tsx
|
|
1719
|
+
var DropZone_default = dropZone_default2;
|
|
1720
|
+
|
|
1721
|
+
// src/components/suggestedActions/index.tsx
|
|
1722
|
+
var import_botframework_webchat_component3 = __toESM(require_botframework_webchat_component());
|
|
1723
|
+
var import_classnames4 = __toESM(require_classnames());
|
|
1724
|
+
var import_react15 = __toESM(require_react());
|
|
1725
|
+
|
|
1726
|
+
// src/components/suggestedActions/SuggestedAction.tsx
|
|
1727
|
+
var import_botframework_webchat_component2 = __toESM(require_botframework_webchat_component());
|
|
1728
|
+
var import_classnames3 = __toESM(require_classnames());
|
|
1729
|
+
var import_react14 = __toESM(require_react());
|
|
1730
|
+
|
|
1731
|
+
// src/components/suggestedActions/SuggestedAction.module.css
|
|
1732
|
+
var SuggestedAction_default = {
|
|
1733
|
+
"suggested-action": "SuggestedAction_suggested-action",
|
|
1734
|
+
"suggested-action__image": "SuggestedAction_suggested-action__image"
|
|
1735
|
+
};
|
|
1736
|
+
|
|
1737
|
+
// src/components/suggestedActions/AccessibleButton.tsx
|
|
1738
|
+
var import_react13 = __toESM(require_react());
|
|
1739
|
+
var preventDefaultHandler = (event) => event.preventDefault();
|
|
1740
|
+
var AccessibleButton = (0, import_react13.forwardRef)(
|
|
1741
|
+
({ "aria-hidden": ariaHidden, children, disabled, onClick, tabIndex, ...props }, forwardedRef) => {
|
|
1742
|
+
const targetRef = (0, import_react13.useRef)(null);
|
|
1743
|
+
const ref = forwardedRef || targetRef;
|
|
1744
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
1745
|
+
"button",
|
|
1746
|
+
{
|
|
1747
|
+
"aria-disabled": disabled ? "true" : "false",
|
|
1748
|
+
"aria-hidden": ariaHidden,
|
|
1749
|
+
onClick: disabled ? preventDefaultHandler : onClick,
|
|
1750
|
+
ref,
|
|
1751
|
+
tabIndex,
|
|
1752
|
+
...disabled && {
|
|
1753
|
+
"aria-disabled": "true",
|
|
1754
|
+
tabIndex: -1
|
|
1755
|
+
},
|
|
1756
|
+
...props,
|
|
1757
|
+
type: "button"
|
|
1758
|
+
},
|
|
1759
|
+
children
|
|
1760
|
+
);
|
|
1761
|
+
}
|
|
1762
|
+
);
|
|
1763
|
+
var AccessibleButton_default = (0, import_react13.memo)(AccessibleButton);
|
|
1764
|
+
|
|
1765
|
+
// src/components/suggestedActions/SuggestedAction.tsx
|
|
1766
|
+
var { useDisabled, useFocus, usePerformCardAction, useScrollToEnd, useStyleSet, useSuggestedActions } = import_botframework_webchat_component2.hooks;
|
|
1767
|
+
function SuggestedAction({
|
|
1768
|
+
buttonText,
|
|
1769
|
+
className,
|
|
1770
|
+
displayText,
|
|
1771
|
+
image,
|
|
1772
|
+
imageAlt,
|
|
1773
|
+
text,
|
|
1774
|
+
type,
|
|
1775
|
+
value
|
|
1776
|
+
}) {
|
|
1777
|
+
const [_, setSuggestedActions] = useSuggestedActions();
|
|
1778
|
+
const [{ suggestedAction: suggestedActionStyleSet }] = useStyleSet();
|
|
1779
|
+
const [disabled] = useDisabled();
|
|
1780
|
+
const focus = useFocus();
|
|
1781
|
+
const focusRef = (0, import_react14.useRef)(null);
|
|
1782
|
+
const performCardAction = usePerformCardAction();
|
|
1783
|
+
const classNames = useStyles_default(SuggestedAction_default);
|
|
1784
|
+
const scrollToEnd = useScrollToEnd();
|
|
1785
|
+
const handleClick = (0, import_react14.useCallback)(
|
|
1786
|
+
({ target }) => {
|
|
1787
|
+
(async function() {
|
|
1788
|
+
await focus("sendBoxWithoutKeyboard");
|
|
1789
|
+
performCardAction({ displayText, text, type, value }, { target });
|
|
1790
|
+
type === "openUrl" && setSuggestedActions([]);
|
|
1791
|
+
scrollToEnd();
|
|
1792
|
+
})();
|
|
1793
|
+
},
|
|
1794
|
+
[displayText, focus, performCardAction, scrollToEnd, setSuggestedActions, text, type, value]
|
|
1795
|
+
);
|
|
1796
|
+
return /* @__PURE__ */ import_react14.default.createElement(
|
|
1797
|
+
AccessibleButton_default,
|
|
1798
|
+
{
|
|
1799
|
+
className: (0, import_classnames3.default)(classNames["suggested-action"], suggestedActionStyleSet + "", (className || "") + ""),
|
|
1800
|
+
disabled,
|
|
1801
|
+
onClick: handleClick,
|
|
1802
|
+
ref: focusRef,
|
|
1803
|
+
type: "button"
|
|
1804
|
+
},
|
|
1805
|
+
image && /* @__PURE__ */ import_react14.default.createElement("img", { alt: imageAlt, className: classNames["suggested-action__image"], src: image }),
|
|
1806
|
+
/* @__PURE__ */ import_react14.default.createElement("span", null, buttonText)
|
|
1807
|
+
);
|
|
1808
|
+
}
|
|
1809
|
+
var SuggestedAction_default2 = (0, import_react14.memo)(SuggestedAction);
|
|
1810
|
+
|
|
1811
|
+
// src/components/suggestedActions/private/computeSuggestedActionText.ts
|
|
1812
|
+
function computeSuggestedActionText(cardAction) {
|
|
1813
|
+
const { title } = cardAction;
|
|
1814
|
+
const { type, value } = cardAction;
|
|
1815
|
+
if (type === "messageBack") {
|
|
1816
|
+
return title || cardAction.displayText;
|
|
1817
|
+
} else if (title) {
|
|
1818
|
+
return title;
|
|
1819
|
+
} else if (typeof value === "string") {
|
|
1820
|
+
return value;
|
|
1821
|
+
}
|
|
1822
|
+
return JSON.stringify(value);
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
// src/components/suggestedActions/index.module.css
|
|
1826
|
+
var suggestedActions_default = {
|
|
1827
|
+
"suggested-actions": "suggestedActions_suggested-actions",
|
|
1828
|
+
"suggested-actions--flow": "suggestedActions_suggested-actions--flow",
|
|
1829
|
+
"suggested-actions--stacked": "suggestedActions_suggested-actions--stacked"
|
|
1830
|
+
};
|
|
1831
|
+
|
|
1832
|
+
// src/components/suggestedActions/index.tsx
|
|
1833
|
+
var { useLocalizer: useLocalizer2, useStyleOptions, useStyleSet: useStyleSet2, useSuggestedActions: useSuggestedActions2 } = import_botframework_webchat_component3.hooks;
|
|
1834
|
+
function SuggestedActionStackedOrFlowContainer(props) {
|
|
1835
|
+
const [{ suggestedActionLayout }] = useStyleOptions();
|
|
1836
|
+
const [{ suggestedActions: suggestedActionsStyleSet }] = useStyleSet2();
|
|
1837
|
+
const classNames = useStyles_default(suggestedActions_default);
|
|
1838
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
1839
|
+
"div",
|
|
1840
|
+
{
|
|
1841
|
+
"aria-label": props["aria-label"],
|
|
1842
|
+
"aria-live": "polite",
|
|
1843
|
+
"aria-orientation": "vertical",
|
|
1844
|
+
className: (0, import_classnames4.default)(
|
|
1845
|
+
classNames["suggested-actions"],
|
|
1846
|
+
suggestedActionsStyleSet + "",
|
|
1847
|
+
{
|
|
1848
|
+
[classNames["suggested-actions--flow"]]: suggestedActionLayout === "flow",
|
|
1849
|
+
[classNames["suggested-actions--stacked"]]: suggestedActionLayout !== "flow"
|
|
1850
|
+
},
|
|
1851
|
+
props.className
|
|
1852
|
+
),
|
|
1853
|
+
role: "toolbar"
|
|
1854
|
+
},
|
|
1855
|
+
!!props.children && !!import_react15.default.Children.count(props.children) && props.children
|
|
1856
|
+
);
|
|
1857
|
+
}
|
|
1858
|
+
function SuggestedActions() {
|
|
1859
|
+
const classNames = useStyles_default(suggestedActions_default);
|
|
1860
|
+
const localize = useLocalizer2();
|
|
1861
|
+
const [suggestedActions] = useSuggestedActions2();
|
|
1862
|
+
const children = suggestedActions.map((cardAction, index) => {
|
|
1863
|
+
const { displayText, image, imageAltText, text, type, value } = cardAction;
|
|
1864
|
+
if (!suggestedActions?.length) {
|
|
1865
|
+
return null;
|
|
1866
|
+
}
|
|
1867
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
1868
|
+
SuggestedAction_default2,
|
|
1869
|
+
{
|
|
1870
|
+
buttonText: computeSuggestedActionText(cardAction),
|
|
1871
|
+
displayText,
|
|
1872
|
+
image,
|
|
1873
|
+
imageAlt: image && (imageAltText || text),
|
|
1874
|
+
itemIndex: index,
|
|
1875
|
+
key: index,
|
|
1876
|
+
text,
|
|
1877
|
+
type,
|
|
1878
|
+
value
|
|
1879
|
+
}
|
|
1880
|
+
);
|
|
1881
|
+
});
|
|
1882
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
1883
|
+
SuggestedActionStackedOrFlowContainer,
|
|
1884
|
+
{
|
|
1885
|
+
"aria-label": localize("SUGGESTED_ACTIONS_LABEL_ALT"),
|
|
1886
|
+
className: classNames["suggested-actions"]
|
|
1887
|
+
},
|
|
1888
|
+
children
|
|
1889
|
+
);
|
|
1890
|
+
}
|
|
1891
|
+
var suggestedActions_default2 = (0, import_react15.memo)(SuggestedActions);
|
|
1892
|
+
|
|
1893
|
+
// src/components/SuggestedActions.tsx
|
|
1894
|
+
var SuggestedActions_default = suggestedActions_default2;
|
|
1895
|
+
|
|
1896
|
+
// src/components/sendbox/AddAttachmentButton.tsx
|
|
1897
|
+
var import_botframework_webchat_component4 = __toESM(require_botframework_webchat_component());
|
|
1898
|
+
var import_react18 = __toESM(require_react());
|
|
1899
|
+
|
|
1900
|
+
// src/icons/AttachmentIcon.tsx
|
|
1901
|
+
var import_react16 = __toESM(require_react());
|
|
1902
|
+
function AttachmentIcon(props) {
|
|
1903
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
1904
|
+
"svg",
|
|
1905
|
+
{
|
|
1906
|
+
"aria-hidden": "true",
|
|
1907
|
+
className: props.className,
|
|
1908
|
+
fill: "currentColor",
|
|
1909
|
+
height: "1em",
|
|
1910
|
+
viewBox: "0 0 20 20",
|
|
1911
|
+
width: "1em",
|
|
1912
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1913
|
+
},
|
|
1914
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
1915
|
+
"path",
|
|
1916
|
+
{
|
|
1917
|
+
d: "m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z",
|
|
1918
|
+
fill: "currentColor"
|
|
1919
|
+
}
|
|
1920
|
+
)
|
|
1921
|
+
);
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
// src/components/sendbox/Toolbar.tsx
|
|
1925
|
+
var import_classnames5 = __toESM(require_classnames());
|
|
1926
|
+
var import_react17 = __toESM(require_react());
|
|
1927
|
+
|
|
1928
|
+
// src/components/sendbox/Toolbar.module.css
|
|
1929
|
+
var Toolbar_default = {
|
|
1930
|
+
sendbox__toolbar: "Toolbar_sendbox__toolbar",
|
|
1931
|
+
"sendbox__toolbar-button": "Toolbar_sendbox__toolbar-button",
|
|
1932
|
+
"sendbox__toolbar-separator": "Toolbar_sendbox__toolbar-separator"
|
|
1933
|
+
};
|
|
1934
|
+
|
|
1935
|
+
// src/components/sendbox/Toolbar.tsx
|
|
1936
|
+
var preventDefaultHandler2 = (event) => event.preventDefault();
|
|
1937
|
+
var ToolbarButton = (0, import_react17.memo)(
|
|
1938
|
+
(props) => {
|
|
1939
|
+
const classNames = useStyles_default(Toolbar_default);
|
|
1940
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
1941
|
+
"button",
|
|
1942
|
+
{
|
|
1943
|
+
"aria-label": props["aria-label"],
|
|
1944
|
+
className: (0, import_classnames5.default)(classNames["sendbox__toolbar-button"], props.className),
|
|
1945
|
+
"data-testid": props["data-testid"],
|
|
1946
|
+
onClick: props.disabled ? preventDefaultHandler2 : props.onClick,
|
|
1947
|
+
type: props.type === "submit" ? "submit" : "button",
|
|
1948
|
+
...props.disabled && {
|
|
1949
|
+
"aria-disabled": "true",
|
|
1950
|
+
tabIndex: -1
|
|
1951
|
+
}
|
|
1952
|
+
},
|
|
1953
|
+
props.children
|
|
1954
|
+
);
|
|
1955
|
+
}
|
|
1956
|
+
);
|
|
1957
|
+
ToolbarButton.displayName = "ToolbarButton";
|
|
1958
|
+
var Toolbar = (0, import_react17.memo)((props) => {
|
|
1959
|
+
const classNames = useStyles_default(Toolbar_default);
|
|
1960
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { className: (0, import_classnames5.default)(classNames["sendbox__toolbar"], props.className) }, props.children);
|
|
1961
|
+
});
|
|
1962
|
+
Toolbar.displayName = "Toolbar";
|
|
1963
|
+
var ToolbarSeparator = (0, import_react17.memo)(
|
|
1964
|
+
(props) => {
|
|
1965
|
+
const classNames = useStyles_default(Toolbar_default);
|
|
1966
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
1967
|
+
"div",
|
|
1968
|
+
{
|
|
1969
|
+
"aria-orientation": "vertical",
|
|
1970
|
+
className: (0, import_classnames5.default)(classNames["sendbox__toolbar-separator"], props.className),
|
|
1971
|
+
role: "separator"
|
|
1972
|
+
}
|
|
1973
|
+
);
|
|
1974
|
+
}
|
|
1975
|
+
);
|
|
1976
|
+
ToolbarSeparator.displayName = "ToolbarSeparator";
|
|
1977
|
+
|
|
1978
|
+
// src/components/sendbox/AddAttachmentButton.module.css
|
|
1979
|
+
var AddAttachmentButton_default = {
|
|
1980
|
+
"sendbox__add-attachment": "AddAttachmentButton_sendbox__add-attachment",
|
|
1981
|
+
"sendbox__add-attachment-input": "AddAttachmentButton_sendbox__add-attachment-input"
|
|
1982
|
+
};
|
|
1983
|
+
|
|
1984
|
+
// src/components/sendbox/AddAttachmentButton.tsx
|
|
1985
|
+
var { useLocalizer: useLocalizer3, useStyleOptions: useStyleOptions2 } = import_botframework_webchat_component4.hooks;
|
|
1986
|
+
function AddAttachmentButton(props) {
|
|
1987
|
+
const inputRef = (0, import_react18.useRef)(null);
|
|
1988
|
+
const classNames = useStyles_default(AddAttachmentButton_default);
|
|
1989
|
+
const localize = useLocalizer3();
|
|
1990
|
+
const [{ uploadAccept, uploadMultiple }] = useStyleOptions2();
|
|
1991
|
+
const onFilesAddedRef = useRefFrom(props.onFilesAdded);
|
|
1992
|
+
const handleClick = (0, import_react18.useCallback)(() => inputRef.current?.click(), [inputRef]);
|
|
1993
|
+
const handleFileChange = (0, import_react18.useCallback)(
|
|
1994
|
+
({ target: { files } }) => {
|
|
1995
|
+
if (files) {
|
|
1996
|
+
onFilesAddedRef.current?.([...files]);
|
|
1997
|
+
if (inputRef.current) {
|
|
1998
|
+
inputRef.current.value = "";
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
},
|
|
2002
|
+
[inputRef, onFilesAddedRef]
|
|
2003
|
+
);
|
|
2004
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: classNames["sendbox__add-attachment"] }, /* @__PURE__ */ import_react18.default.createElement(
|
|
2005
|
+
"input",
|
|
2006
|
+
{
|
|
2007
|
+
accept: uploadAccept,
|
|
2008
|
+
"aria-disabled": props.disabled,
|
|
2009
|
+
"aria-hidden": "true",
|
|
2010
|
+
className: classNames["sendbox__add-attachment-input"],
|
|
2011
|
+
multiple: uploadMultiple,
|
|
2012
|
+
onInput: props.disabled ? void 0 : handleFileChange,
|
|
2013
|
+
readOnly: props.disabled,
|
|
2014
|
+
ref: inputRef,
|
|
2015
|
+
role: "button",
|
|
2016
|
+
tabIndex: -1,
|
|
2017
|
+
type: "file"
|
|
2018
|
+
}
|
|
2019
|
+
), /* @__PURE__ */ import_react18.default.createElement(
|
|
2020
|
+
ToolbarButton,
|
|
2021
|
+
{
|
|
2022
|
+
"aria-label": localize("TEXT_INPUT_UPLOAD_BUTTON_ALT"),
|
|
2023
|
+
"data-testid": testIds_default.sendBoxUploadButton,
|
|
2024
|
+
onClick: handleClick
|
|
2025
|
+
},
|
|
2026
|
+
/* @__PURE__ */ import_react18.default.createElement(AttachmentIcon, null)
|
|
2027
|
+
));
|
|
2028
|
+
}
|
|
2029
|
+
var AddAttachmentButton_default2 = (0, import_react18.memo)(AddAttachmentButton);
|
|
2030
|
+
|
|
2031
|
+
// src/components/sendbox/Attachments.tsx
|
|
2032
|
+
var import_botframework_webchat_component5 = __toESM(require_botframework_webchat_component());
|
|
2033
|
+
var import_react19 = __toESM(require_react());
|
|
2034
|
+
|
|
2035
|
+
// src/components/sendbox/Attachments.module.css
|
|
2036
|
+
var Attachments_default = {
|
|
2037
|
+
sendbox__attachment: "Attachments_sendbox__attachment"
|
|
2038
|
+
};
|
|
2039
|
+
|
|
2040
|
+
// src/components/sendbox/Attachments.tsx
|
|
2041
|
+
var { useLocalizer: useLocalizer4 } = import_botframework_webchat_component5.hooks;
|
|
2042
|
+
var attachmentsPluralStringIds = {
|
|
2043
|
+
one: "TEXT_INPUT_ATTACHMENTS_ONE",
|
|
2044
|
+
two: "TEXT_INPUT_ATTACHMENTS_TWO",
|
|
2045
|
+
few: "TEXT_INPUT_ATTACHMENTS_FEW",
|
|
2046
|
+
many: "TEXT_INPUT_ATTACHMENTS_MANY",
|
|
2047
|
+
other: "TEXT_INPUT_ATTACHMENTS_OTHER"
|
|
2048
|
+
};
|
|
2049
|
+
function Attachments({
|
|
2050
|
+
attachments
|
|
2051
|
+
}) {
|
|
2052
|
+
const classNames = useStyles_default(Attachments_default);
|
|
2053
|
+
const localizeWithPlural = useLocalizer4({ plural: true });
|
|
2054
|
+
return attachments.length ? /* @__PURE__ */ import_react19.default.createElement("div", { className: classNames["sendbox__attachment"] }, localizeWithPlural(attachmentsPluralStringIds, attachments.length)) : null;
|
|
2055
|
+
}
|
|
2056
|
+
var Attachments_default2 = (0, import_react19.memo)(Attachments);
|
|
2057
|
+
|
|
2058
|
+
// src/components/sendbox/ErrorMessage.tsx
|
|
2059
|
+
var import_react20 = __toESM(require_react());
|
|
2060
|
+
|
|
2061
|
+
// src/components/sendbox/ErrorMessage.module.css
|
|
2062
|
+
var ErrorMessage_default = {
|
|
2063
|
+
"sendbox__error-message": "ErrorMessage_sendbox__error-message"
|
|
2064
|
+
};
|
|
2065
|
+
|
|
2066
|
+
// src/components/sendbox/ErrorMessage.tsx
|
|
2067
|
+
function ErrorMessage(props) {
|
|
2068
|
+
const classNames = useStyles_default(ErrorMessage_default);
|
|
2069
|
+
return (
|
|
2070
|
+
// eslint-disable-next-line react/forbid-dom-props
|
|
2071
|
+
/* @__PURE__ */ import_react20.default.createElement("span", { className: classNames["sendbox__error-message"], id: props.id, role: "alert" }, props.error)
|
|
2072
|
+
);
|
|
2073
|
+
}
|
|
2074
|
+
var ErrorMessage_default2 = (0, import_react20.memo)(ErrorMessage);
|
|
2075
|
+
|
|
2076
|
+
// src/components/sendbox/TelephoneKeypadToolbarButton.tsx
|
|
2077
|
+
var import_react22 = __toESM(require_react());
|
|
2078
|
+
var import_botframework_webchat_component6 = __toESM(require_botframework_webchat_component());
|
|
2079
|
+
|
|
2080
|
+
// src/icons/TelephoneKeypad.tsx
|
|
2081
|
+
var import_react21 = __toESM(require_react());
|
|
2082
|
+
function TelephoneKeypadIcon(props) {
|
|
2083
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
2084
|
+
"svg",
|
|
2085
|
+
{
|
|
2086
|
+
"aria-hidden": "true",
|
|
2087
|
+
className: props.className,
|
|
2088
|
+
fill: "currentColor",
|
|
2089
|
+
height: "1em",
|
|
2090
|
+
viewBox: "0 0 20 20",
|
|
2091
|
+
width: "1em",
|
|
2092
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2093
|
+
},
|
|
2094
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
2095
|
+
"path",
|
|
2096
|
+
{
|
|
2097
|
+
d: "M6 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Zm0 4a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM7.25 12a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 16a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM15.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z",
|
|
2098
|
+
fill: "currentColor"
|
|
2099
|
+
}
|
|
2100
|
+
)
|
|
2101
|
+
);
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
// src/components/sendbox/TelephoneKeypadToolbarButton.tsx
|
|
2105
|
+
var { useLocalizer: useLocalizer5 } = import_botframework_webchat_component6.hooks;
|
|
2106
|
+
var TelephoneKeypadToolbarButton = (0, import_react22.memo)(() => {
|
|
2107
|
+
const [, setTelephoneKeypadShown] = useShown();
|
|
2108
|
+
const localize = useLocalizer5();
|
|
2109
|
+
const handleClick = (0, import_react22.useCallback)(() => setTelephoneKeypadShown((shown) => !shown), [setTelephoneKeypadShown]);
|
|
2110
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
2111
|
+
ToolbarButton,
|
|
2112
|
+
{
|
|
2113
|
+
"aria-label": localize("TEXT_INPUT_TELEPHONE_KEYPAD_BUTTON_ALT"),
|
|
2114
|
+
"data-testid": testIds_default.sendBoxTelephoneKeypadToolbarButton,
|
|
2115
|
+
onClick: handleClick
|
|
2116
|
+
},
|
|
2117
|
+
/* @__PURE__ */ import_react22.default.createElement(TelephoneKeypadIcon, null)
|
|
2118
|
+
);
|
|
2119
|
+
});
|
|
2120
|
+
TelephoneKeypadToolbarButton.displayName = "SendBox.TelephoneKeypadToolbarButton";
|
|
2121
|
+
var TelephoneKeypadToolbarButton_default = TelephoneKeypadToolbarButton;
|
|
2122
|
+
|
|
2123
|
+
// src/components/sendbox/TextArea.tsx
|
|
2124
|
+
var import_classnames6 = __toESM(require_classnames());
|
|
2125
|
+
var import_react23 = __toESM(require_react());
|
|
2126
|
+
|
|
2127
|
+
// src/components/sendbox/TextArea.module.css
|
|
2128
|
+
var TextArea_default = {
|
|
2129
|
+
"sendbox__text-area": "TextArea_sendbox__text-area",
|
|
2130
|
+
"sendbox__text-area--hidden": "TextArea_sendbox__text-area--hidden",
|
|
2131
|
+
"sendbox__text-area-shared": "TextArea_sendbox__text-area-shared",
|
|
2132
|
+
"sendbox__text-area-doppelganger": "TextArea_sendbox__text-area-doppelganger",
|
|
2133
|
+
"sendbox__text-area-input": "TextArea_sendbox__text-area-input",
|
|
2134
|
+
"sendbox__text-area-input--scroll": "TextArea_sendbox__text-area-input--scroll"
|
|
2135
|
+
};
|
|
2136
|
+
|
|
2137
|
+
// src/components/sendbox/TextArea.tsx
|
|
2138
|
+
var TextArea = (0, import_react23.forwardRef)((props, ref) => {
|
|
2139
|
+
const classNames = useStyles_default(TextArea_default);
|
|
2140
|
+
const handleKeyDown = (0, import_react23.useCallback)((event) => {
|
|
2141
|
+
if (!event.shiftKey && event.key === "Enter") {
|
|
2142
|
+
event.preventDefault();
|
|
2143
|
+
if ("form" in event.target && event.target.form instanceof HTMLFormElement) {
|
|
2144
|
+
event.target?.form?.requestSubmit();
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
}, []);
|
|
2148
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
2149
|
+
"div",
|
|
2150
|
+
{
|
|
2151
|
+
className: (0, import_classnames6.default)(
|
|
2152
|
+
classNames["sendbox__text-area"],
|
|
2153
|
+
{
|
|
2154
|
+
[classNames["sendbox__text-area--hidden"]]: props.hidden
|
|
2155
|
+
},
|
|
2156
|
+
props.className
|
|
2157
|
+
),
|
|
2158
|
+
role: props.hidden ? "hidden" : void 0
|
|
2159
|
+
},
|
|
2160
|
+
/* @__PURE__ */ import_react23.default.createElement(
|
|
2161
|
+
"div",
|
|
2162
|
+
{
|
|
2163
|
+
className: (0, import_classnames6.default)(
|
|
2164
|
+
classNames["sendbox__text-area-doppelganger"],
|
|
2165
|
+
classNames["sendbox__text-area-shared"],
|
|
2166
|
+
classNames["sendbox__text-area-input--scroll"]
|
|
2167
|
+
)
|
|
2168
|
+
},
|
|
2169
|
+
props.value || props.placeholder,
|
|
2170
|
+
" "
|
|
2171
|
+
),
|
|
2172
|
+
/* @__PURE__ */ import_react23.default.createElement(
|
|
2173
|
+
"textarea",
|
|
2174
|
+
{
|
|
2175
|
+
"aria-label": props["aria-label"],
|
|
2176
|
+
className: (0, import_classnames6.default)(
|
|
2177
|
+
classNames["sendbox__text-area-input"],
|
|
2178
|
+
classNames["sendbox__text-area-shared"],
|
|
2179
|
+
classNames["sendbox__text-area-input--scroll"]
|
|
2180
|
+
),
|
|
2181
|
+
"data-testid": props["data-testid"],
|
|
2182
|
+
onInput: props.onInput,
|
|
2183
|
+
onKeyDown: handleKeyDown,
|
|
2184
|
+
placeholder: props.placeholder,
|
|
2185
|
+
ref,
|
|
2186
|
+
rows: props.startRows ?? 1,
|
|
2187
|
+
tabIndex: props.hidden ? -1 : void 0,
|
|
2188
|
+
value: props.value
|
|
2189
|
+
}
|
|
2190
|
+
)
|
|
2191
|
+
);
|
|
2192
|
+
});
|
|
2193
|
+
TextArea.displayName = "TextArea";
|
|
2194
|
+
var TextArea_default2 = TextArea;
|
|
2195
|
+
|
|
2196
|
+
// src/components/sendbox/private/useSubmitError.ts
|
|
2197
|
+
var import_botframework_webchat_component7 = __toESM(require_botframework_webchat_component());
|
|
2198
|
+
var import_react24 = __toESM(require_react());
|
|
2199
|
+
var { useConnectivityStatus, useLocalizer: useLocalizer6 } = import_botframework_webchat_component7.hooks;
|
|
2200
|
+
var useSubmitError = ({
|
|
2201
|
+
attachments,
|
|
2202
|
+
message
|
|
2203
|
+
}) => {
|
|
2204
|
+
const [connectivityStatus] = useConnectivityStatus();
|
|
2205
|
+
const localize = useLocalizer6();
|
|
2206
|
+
const submitErrorRef = useRefFrom(
|
|
2207
|
+
connectivityStatus !== "connected" && connectivityStatus !== "reconnected" ? "offline" : !message && !attachments.length ? "empty" : void 0
|
|
2208
|
+
);
|
|
2209
|
+
const errorMessageStringMap = (0, import_react24.useMemo)(
|
|
2210
|
+
() => Object.freeze(
|
|
2211
|
+
(/* @__PURE__ */ new Map()).set("empty", localize("SEND_BOX_IS_EMPTY_TOOLTIP_ALT")).set("offline", localize("CONNECTIVITY_STATUS_ALT_FATAL"))
|
|
2212
|
+
),
|
|
2213
|
+
[localize]
|
|
2214
|
+
);
|
|
2215
|
+
return (0, import_react24.useMemo)(
|
|
2216
|
+
() => Object.freeze([submitErrorRef, submitErrorRef.current && errorMessageStringMap.get(submitErrorRef.current)]),
|
|
2217
|
+
[errorMessageStringMap, submitErrorRef]
|
|
2218
|
+
);
|
|
2219
|
+
};
|
|
2220
|
+
var useSubmitError_default = useSubmitError;
|
|
2221
|
+
|
|
2222
|
+
// src/components/sendbox/private/useUniqueId.ts
|
|
2223
|
+
var import_react25 = __toESM(require_react());
|
|
2224
|
+
function useUniqueId(prefix) {
|
|
2225
|
+
const id = (0, import_react25.useMemo)(() => Math.random().toString(36).substr(2, 5), []);
|
|
2226
|
+
prefix = prefix ? `${prefix}--` : "";
|
|
2227
|
+
return `${prefix}${id}`;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
// src/components/sendbox/index.module.css
|
|
2231
|
+
var sendbox_default = {
|
|
2232
|
+
sendbox: "sendbox_sendbox",
|
|
2233
|
+
sendbox__sendbox: "sendbox_sendbox__sendbox",
|
|
2234
|
+
"sendbox__sendbox-text": "sendbox_sendbox__sendbox-text",
|
|
2235
|
+
"sendbox__sendbox-controls": "sendbox_sendbox__sendbox-controls",
|
|
2236
|
+
"sendbox__text-counter": "sendbox_sendbox__text-counter",
|
|
2237
|
+
"sendbox__text-counter--error": "sendbox_sendbox__text-counter--error"
|
|
2238
|
+
};
|
|
2239
|
+
|
|
2240
|
+
// src/components/sendbox/index.tsx
|
|
2241
|
+
var { useStyleOptions: useStyleOptions3, useMakeThumbnail, useLocalizer: useLocalizer7, useSendBoxAttachments, useSendMessage } = import_botframework_webchat_component8.hooks;
|
|
2242
|
+
function SendBox(props) {
|
|
2243
|
+
const inputRef = (0, import_react26.useRef)(null);
|
|
2244
|
+
const [message, setMessage] = (0, import_react26.useState)("");
|
|
2245
|
+
const [attachments, setAttachments] = useSendBoxAttachments();
|
|
2246
|
+
const [{ hideTelephoneKeypadButton, hideUploadButton, maxMessageLength }] = useStyleOptions3();
|
|
2247
|
+
const isMessageLengthExceeded = !!maxMessageLength && message.length > maxMessageLength;
|
|
2248
|
+
const classNames = useStyles_default(sendbox_default);
|
|
2249
|
+
const localize = useLocalizer7();
|
|
2250
|
+
const sendMessage = useSendMessage();
|
|
2251
|
+
const makeThumbnail = useMakeThumbnail();
|
|
2252
|
+
const errorMessageId = useUniqueId("sendbox__error-message-id");
|
|
2253
|
+
const [errorRef, errorMessage] = useSubmitError_default({ message, attachments });
|
|
2254
|
+
const [telephoneKeypadShown] = useShown();
|
|
2255
|
+
const attachmentsRef = useRefFrom(attachments);
|
|
2256
|
+
const messageRef = useRefFrom(message);
|
|
2257
|
+
const handleSendBoxClick = (0, import_react26.useCallback)(
|
|
2258
|
+
(event) => {
|
|
2259
|
+
if ("tabIndex" in event.target && typeof event.target.tabIndex === "number" && event.target.tabIndex >= 0) {
|
|
2260
|
+
return;
|
|
2261
|
+
}
|
|
2262
|
+
inputRef.current?.focus();
|
|
2263
|
+
},
|
|
2264
|
+
[inputRef]
|
|
2265
|
+
);
|
|
2266
|
+
const handleMessageChange = (0, import_react26.useCallback)(
|
|
2267
|
+
(event) => setMessage(event.currentTarget.value),
|
|
2268
|
+
[setMessage]
|
|
2269
|
+
);
|
|
2270
|
+
const handleAddFiles = (0, import_react26.useCallback)(
|
|
2271
|
+
async (inputFiles) => {
|
|
2272
|
+
const newAttachments = Object.freeze(
|
|
2273
|
+
await Promise.all(
|
|
2274
|
+
inputFiles.map(
|
|
2275
|
+
(file) => makeThumbnail(file).then(
|
|
2276
|
+
(thumbnailURL) => Object.freeze({
|
|
2277
|
+
blob: file,
|
|
2278
|
+
...thumbnailURL && { thumbnailURL }
|
|
2279
|
+
})
|
|
2280
|
+
)
|
|
2281
|
+
)
|
|
2282
|
+
)
|
|
2283
|
+
);
|
|
2284
|
+
setAttachments(newAttachments);
|
|
2285
|
+
},
|
|
2286
|
+
[makeThumbnail, setAttachments]
|
|
2287
|
+
);
|
|
2288
|
+
const handleFormSubmit = (0, import_react26.useCallback)(
|
|
2289
|
+
(event) => {
|
|
2290
|
+
event.preventDefault();
|
|
2291
|
+
if (errorRef.current !== "empty" && !isMessageLengthExceeded) {
|
|
2292
|
+
sendMessage(messageRef.current, void 0, { attachments: attachmentsRef.current });
|
|
2293
|
+
setMessage("");
|
|
2294
|
+
setAttachments([]);
|
|
2295
|
+
}
|
|
2296
|
+
inputRef.current?.focus();
|
|
2297
|
+
},
|
|
2298
|
+
[attachmentsRef, messageRef, sendMessage, setAttachments, setMessage, isMessageLengthExceeded, errorRef, inputRef]
|
|
2299
|
+
);
|
|
2300
|
+
const handleTelephoneKeypadButtonClick = (0, import_react26.useCallback)(
|
|
2301
|
+
// TODO: We need more official way of sending DTMF.
|
|
2302
|
+
(dtmf) => sendMessage(`/DTMF ${dtmf}`),
|
|
2303
|
+
[sendMessage]
|
|
2304
|
+
);
|
|
2305
|
+
const aria = {
|
|
2306
|
+
"aria-invalid": "false",
|
|
2307
|
+
...errorMessage && {
|
|
2308
|
+
"aria-invalid": "true",
|
|
2309
|
+
"aria-errormessage": errorMessageId
|
|
2310
|
+
}
|
|
2311
|
+
};
|
|
2312
|
+
return /* @__PURE__ */ import_react26.default.createElement("form", { ...aria, className: (0, import_classnames7.default)(classNames["sendbox"], props.className), onSubmit: handleFormSubmit }, /* @__PURE__ */ import_react26.default.createElement(SuggestedActions_default, null), /* @__PURE__ */ import_react26.default.createElement("div", { className: (0, import_classnames7.default)(classNames["sendbox__sendbox"]), onClickCapture: handleSendBoxClick }, /* @__PURE__ */ import_react26.default.createElement(
|
|
2313
|
+
Surrogate_default,
|
|
2314
|
+
{
|
|
2315
|
+
autoFocus: true,
|
|
2316
|
+
isHorizontal: false,
|
|
2317
|
+
onButtonClick: handleTelephoneKeypadButtonClick
|
|
2318
|
+
}
|
|
2319
|
+
), /* @__PURE__ */ import_react26.default.createElement(
|
|
2320
|
+
TextArea_default2,
|
|
2321
|
+
{
|
|
2322
|
+
"aria-label": isMessageLengthExceeded ? localize("TEXT_INPUT_LENGTH_EXCEEDED_ALT") : localize("TEXT_INPUT_ALT"),
|
|
2323
|
+
className: classNames["sendbox__sendbox-text"],
|
|
2324
|
+
"data-testid": testIds_default.sendBoxTextBox,
|
|
2325
|
+
hidden: telephoneKeypadShown,
|
|
2326
|
+
onInput: handleMessageChange,
|
|
2327
|
+
placeholder: props.placeholder ?? localize("TEXT_INPUT_PLACEHOLDER"),
|
|
2328
|
+
ref: inputRef,
|
|
2329
|
+
value: message
|
|
2330
|
+
}
|
|
2331
|
+
), /* @__PURE__ */ import_react26.default.createElement(Attachments_default2, { attachments }), /* @__PURE__ */ import_react26.default.createElement("div", { className: (0, import_classnames7.default)(classNames["sendbox__sendbox-controls"]) }, maxMessageLength && /* @__PURE__ */ import_react26.default.createElement(
|
|
2332
|
+
"div",
|
|
2333
|
+
{
|
|
2334
|
+
className: (0, import_classnames7.default)(classNames["sendbox__text-counter"], {
|
|
2335
|
+
[classNames["sendbox__text-counter--error"]]: isMessageLengthExceeded
|
|
2336
|
+
})
|
|
2337
|
+
},
|
|
2338
|
+
`${message.length}/${maxMessageLength}`
|
|
2339
|
+
), /* @__PURE__ */ import_react26.default.createElement(Toolbar, null, !hideTelephoneKeypadButton && /* @__PURE__ */ import_react26.default.createElement(TelephoneKeypadToolbarButton_default, null), !hideUploadButton && /* @__PURE__ */ import_react26.default.createElement(AddAttachmentButton_default2, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react26.default.createElement(ToolbarSeparator, null), /* @__PURE__ */ import_react26.default.createElement(
|
|
2340
|
+
ToolbarButton,
|
|
2341
|
+
{
|
|
2342
|
+
"aria-label": localize("TEXT_INPUT_SEND_BUTTON_ALT"),
|
|
2343
|
+
"data-testid": testIds_default.sendBoxSendButton,
|
|
2344
|
+
disabled: isMessageLengthExceeded,
|
|
2345
|
+
type: "submit"
|
|
2346
|
+
},
|
|
2347
|
+
/* @__PURE__ */ import_react26.default.createElement(SendIcon, null)
|
|
2348
|
+
))), /* @__PURE__ */ import_react26.default.createElement(DropZone_default, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react26.default.createElement(ErrorMessage_default2, { error: errorMessage, id: errorMessageId })));
|
|
2349
|
+
}
|
|
2350
|
+
var sendbox_default2 = (0, import_react26.memo)(SendBox);
|
|
2351
|
+
|
|
2352
|
+
// src/components/SendBox.tsx
|
|
2353
|
+
var SendBox_default = sendbox_default2;
|
|
2354
|
+
|
|
2355
|
+
// src/private/FluentThemeProvider.tsx
|
|
2356
|
+
var { ThemeProvider } = import_botframework_webchat_component9.Components;
|
|
2357
|
+
var sendBoxMiddleware = [() => () => () => SendBox_default];
|
|
2358
|
+
var FluentThemeProvider = ({ children }) => /* @__PURE__ */ import_react27.default.createElement(WebchatTheme, null, /* @__PURE__ */ import_react27.default.createElement(Provider_default, null, /* @__PURE__ */ import_react27.default.createElement(ThemeProvider, { sendBoxMiddleware }, children)));
|
|
2359
|
+
var FluentThemeProvider_default = (0, import_react27.memo)(FluentThemeProvider);
|
|
2360
|
+
|
|
2361
|
+
// src/index.ts
|
|
2362
|
+
injectMeta("botframework-webchat-fluent-theme:version", "4.17.0-main.20240416.4ff01ae");
|
|
2363
|
+
injectStyles();
|
|
2364
|
+
|
|
2365
|
+
// src/bundle.ts
|
|
2366
|
+
globalThis.WebChat = {
|
|
2367
|
+
...globalThis.WebChat,
|
|
2368
|
+
FluentThemeProvider: FluentThemeProvider_default,
|
|
2369
|
+
testIds: {
|
|
2370
|
+
...globalThis.WebChat?.testIds,
|
|
2371
|
+
...testIds_default
|
|
2372
|
+
}
|
|
2373
|
+
};
|
|
2374
|
+
})();
|
|
2375
|
+
/*! Bundled license information:
|
|
2376
|
+
|
|
2377
|
+
classnames/index.js:
|
|
2378
|
+
(*!
|
|
2379
|
+
Copyright (c) 2018 Jed Watson.
|
|
2380
|
+
Licensed under the MIT License (MIT), see
|
|
2381
|
+
http://jedwatson.github.io/classnames
|
|
2382
|
+
*)
|
|
2383
|
+
*/
|
|
2384
|
+
//# sourceMappingURL=botframework-webchat-fluent-theme.development.js.map
|