diff --git a/samples/alarmbot-es6-botframework-webchat/README.md b/samples/alarmbot-es6-botframework-webchat/README.md
deleted file mode 100644
index a1a1fdba67..0000000000
--- a/samples/alarmbot-es6-botframework-webchat/README.md
+++ /dev/null
@@ -1,6 +0,0 @@
-The example shows the use of the botbuilder-js SDK for the browser using the [BotFramework-WebChat](https://github.com/Microsoft/BotFramework-WebChat)
-
-### To Run:
-1. from the root `./botbuilder-js` run `npm install -g lerna && lerna bootstrap --hoist`
-2. cd to the alarmbot-es6-botframework-webchat directory and start the dev server: `npm start`
-2. navigate to `http://localhost:8080`
\ No newline at end of file
diff --git a/samples/alarmbot-es6-botframework-webchat/dist/app.js b/samples/alarmbot-es6-botframework-webchat/dist/app.js
deleted file mode 100644
index ed67c4874c..0000000000
--- a/samples/alarmbot-es6-botframework-webchat/dist/app.js
+++ /dev/null
@@ -1,62612 +0,0 @@
-/******/ (function(modules) { // webpackBootstrap
-/******/ function hotDisposeChunk(chunkId) {
-/******/ delete installedChunks[chunkId];
-/******/ }
-/******/ var parentHotUpdateCallback = window["webpackHotUpdate"];
-/******/ window["webpackHotUpdate"] =
-/******/ function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ hotAddUpdateChunk(chunkId, moreModules);
-/******/ if(parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
-/******/ } ;
-/******/
-/******/ function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars
-/******/ var head = document.getElementsByTagName("head")[0];
-/******/ var script = document.createElement("script");
-/******/ script.type = "text/javascript";
-/******/ script.charset = "utf-8";
-/******/ script.src = __webpack_require__.p + "" + chunkId + "." + hotCurrentHash + ".hot-update.js";
-/******/ ;
-/******/ head.appendChild(script);
-/******/ }
-/******/
-/******/ function hotDownloadManifest(requestTimeout) { // eslint-disable-line no-unused-vars
-/******/ requestTimeout = requestTimeout || 10000;
-/******/ return new Promise(function(resolve, reject) {
-/******/ if(typeof XMLHttpRequest === "undefined")
-/******/ return reject(new Error("No browser support"));
-/******/ try {
-/******/ var request = new XMLHttpRequest();
-/******/ var requestPath = __webpack_require__.p + "" + hotCurrentHash + ".hot-update.json";
-/******/ request.open("GET", requestPath, true);
-/******/ request.timeout = requestTimeout;
-/******/ request.send(null);
-/******/ } catch(err) {
-/******/ return reject(err);
-/******/ }
-/******/ request.onreadystatechange = function() {
-/******/ if(request.readyState !== 4) return;
-/******/ if(request.status === 0) {
-/******/ // timeout
-/******/ reject(new Error("Manifest request to " + requestPath + " timed out."));
-/******/ } else if(request.status === 404) {
-/******/ // no update available
-/******/ resolve();
-/******/ } else if(request.status !== 200 && request.status !== 304) {
-/******/ // other failure
-/******/ reject(new Error("Manifest request to " + requestPath + " failed."));
-/******/ } else {
-/******/ // success
-/******/ try {
-/******/ var update = JSON.parse(request.responseText);
-/******/ } catch(e) {
-/******/ reject(e);
-/******/ return;
-/******/ }
-/******/ resolve(update);
-/******/ }
-/******/ };
-/******/ });
-/******/ }
-/******/
-/******/
-/******/
-/******/ var hotApplyOnUpdate = true;
-/******/ var hotCurrentHash = "7cbbf5b4fa6d00323a10"; // eslint-disable-line no-unused-vars
-/******/ var hotRequestTimeout = 10000;
-/******/ var hotCurrentModuleData = {};
-/******/ var hotCurrentChildModule; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
-/******/ var hotCurrentParentsTemp = []; // eslint-disable-line no-unused-vars
-/******/
-/******/ function hotCreateRequire(moduleId) { // eslint-disable-line no-unused-vars
-/******/ var me = installedModules[moduleId];
-/******/ if(!me) return __webpack_require__;
-/******/ var fn = function(request) {
-/******/ if(me.hot.active) {
-/******/ if(installedModules[request]) {
-/******/ if(installedModules[request].parents.indexOf(moduleId) < 0)
-/******/ installedModules[request].parents.push(moduleId);
-/******/ } else {
-/******/ hotCurrentParents = [moduleId];
-/******/ hotCurrentChildModule = request;
-/******/ }
-/******/ if(me.children.indexOf(request) < 0)
-/******/ me.children.push(request);
-/******/ } else {
-/******/ console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
-/******/ hotCurrentParents = [];
-/******/ }
-/******/ return __webpack_require__(request);
-/******/ };
-/******/ var ObjectFactory = function ObjectFactory(name) {
-/******/ return {
-/******/ configurable: true,
-/******/ enumerable: true,
-/******/ get: function() {
-/******/ return __webpack_require__[name];
-/******/ },
-/******/ set: function(value) {
-/******/ __webpack_require__[name] = value;
-/******/ }
-/******/ };
-/******/ };
-/******/ for(var name in __webpack_require__) {
-/******/ if(Object.prototype.hasOwnProperty.call(__webpack_require__, name) && name !== "e") {
-/******/ Object.defineProperty(fn, name, ObjectFactory(name));
-/******/ }
-/******/ }
-/******/ fn.e = function(chunkId) {
-/******/ if(hotStatus === "ready")
-/******/ hotSetStatus("prepare");
-/******/ hotChunksLoading++;
-/******/ return __webpack_require__.e(chunkId).then(finishChunkLoading, function(err) {
-/******/ finishChunkLoading();
-/******/ throw err;
-/******/ });
-/******/
-/******/ function finishChunkLoading() {
-/******/ hotChunksLoading--;
-/******/ if(hotStatus === "prepare") {
-/******/ if(!hotWaitingFilesMap[chunkId]) {
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/ }
-/******/ };
-/******/ return fn;
-/******/ }
-/******/
-/******/ function hotCreateModule(moduleId) { // eslint-disable-line no-unused-vars
-/******/ var hot = {
-/******/ // private stuff
-/******/ _acceptedDependencies: {},
-/******/ _declinedDependencies: {},
-/******/ _selfAccepted: false,
-/******/ _selfDeclined: false,
-/******/ _disposeHandlers: [],
-/******/ _main: hotCurrentChildModule !== moduleId,
-/******/
-/******/ // Module API
-/******/ active: true,
-/******/ accept: function(dep, callback) {
-/******/ if(typeof dep === "undefined")
-/******/ hot._selfAccepted = true;
-/******/ else if(typeof dep === "function")
-/******/ hot._selfAccepted = dep;
-/******/ else if(typeof dep === "object")
-/******/ for(var i = 0; i < dep.length; i++)
-/******/ hot._acceptedDependencies[dep[i]] = callback || function() {};
-/******/ else
-/******/ hot._acceptedDependencies[dep] = callback || function() {};
-/******/ },
-/******/ decline: function(dep) {
-/******/ if(typeof dep === "undefined")
-/******/ hot._selfDeclined = true;
-/******/ else if(typeof dep === "object")
-/******/ for(var i = 0; i < dep.length; i++)
-/******/ hot._declinedDependencies[dep[i]] = true;
-/******/ else
-/******/ hot._declinedDependencies[dep] = true;
-/******/ },
-/******/ dispose: function(callback) {
-/******/ hot._disposeHandlers.push(callback);
-/******/ },
-/******/ addDisposeHandler: function(callback) {
-/******/ hot._disposeHandlers.push(callback);
-/******/ },
-/******/ removeDisposeHandler: function(callback) {
-/******/ var idx = hot._disposeHandlers.indexOf(callback);
-/******/ if(idx >= 0) hot._disposeHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ // Management API
-/******/ check: hotCheck,
-/******/ apply: hotApply,
-/******/ status: function(l) {
-/******/ if(!l) return hotStatus;
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ addStatusHandler: function(l) {
-/******/ hotStatusHandlers.push(l);
-/******/ },
-/******/ removeStatusHandler: function(l) {
-/******/ var idx = hotStatusHandlers.indexOf(l);
-/******/ if(idx >= 0) hotStatusHandlers.splice(idx, 1);
-/******/ },
-/******/
-/******/ //inherit from previous dispose call
-/******/ data: hotCurrentModuleData[moduleId]
-/******/ };
-/******/ hotCurrentChildModule = undefined;
-/******/ return hot;
-/******/ }
-/******/
-/******/ var hotStatusHandlers = [];
-/******/ var hotStatus = "idle";
-/******/
-/******/ function hotSetStatus(newStatus) {
-/******/ hotStatus = newStatus;
-/******/ for(var i = 0; i < hotStatusHandlers.length; i++)
-/******/ hotStatusHandlers[i].call(null, newStatus);
-/******/ }
-/******/
-/******/ // while downloading
-/******/ var hotWaitingFiles = 0;
-/******/ var hotChunksLoading = 0;
-/******/ var hotWaitingFilesMap = {};
-/******/ var hotRequestedFilesMap = {};
-/******/ var hotAvailableFilesMap = {};
-/******/ var hotDeferred;
-/******/
-/******/ // The update info
-/******/ var hotUpdate, hotUpdateNewHash;
-/******/
-/******/ function toModuleId(id) {
-/******/ var isNumber = (+id) + "" === id;
-/******/ return isNumber ? +id : id;
-/******/ }
-/******/
-/******/ function hotCheck(apply) {
-/******/ if(hotStatus !== "idle") throw new Error("check() is only allowed in idle status");
-/******/ hotApplyOnUpdate = apply;
-/******/ hotSetStatus("check");
-/******/ return hotDownloadManifest(hotRequestTimeout).then(function(update) {
-/******/ if(!update) {
-/******/ hotSetStatus("idle");
-/******/ return null;
-/******/ }
-/******/ hotRequestedFilesMap = {};
-/******/ hotWaitingFilesMap = {};
-/******/ hotAvailableFilesMap = update.c;
-/******/ hotUpdateNewHash = update.h;
-/******/
-/******/ hotSetStatus("prepare");
-/******/ var promise = new Promise(function(resolve, reject) {
-/******/ hotDeferred = {
-/******/ resolve: resolve,
-/******/ reject: reject
-/******/ };
-/******/ });
-/******/ hotUpdate = {};
-/******/ var chunkId = 0;
-/******/ { // eslint-disable-line no-lone-blocks
-/******/ /*globals chunkId */
-/******/ hotEnsureUpdateChunk(chunkId);
-/******/ }
-/******/ if(hotStatus === "prepare" && hotChunksLoading === 0 && hotWaitingFiles === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ return promise;
-/******/ });
-/******/ }
-/******/
-/******/ function hotAddUpdateChunk(chunkId, moreModules) { // eslint-disable-line no-unused-vars
-/******/ if(!hotAvailableFilesMap[chunkId] || !hotRequestedFilesMap[chunkId])
-/******/ return;
-/******/ hotRequestedFilesMap[chunkId] = false;
-/******/ for(var moduleId in moreModules) {
-/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
-/******/ hotUpdate[moduleId] = moreModules[moduleId];
-/******/ }
-/******/ }
-/******/ if(--hotWaitingFiles === 0 && hotChunksLoading === 0) {
-/******/ hotUpdateDownloaded();
-/******/ }
-/******/ }
-/******/
-/******/ function hotEnsureUpdateChunk(chunkId) {
-/******/ if(!hotAvailableFilesMap[chunkId]) {
-/******/ hotWaitingFilesMap[chunkId] = true;
-/******/ } else {
-/******/ hotRequestedFilesMap[chunkId] = true;
-/******/ hotWaitingFiles++;
-/******/ hotDownloadUpdateChunk(chunkId);
-/******/ }
-/******/ }
-/******/
-/******/ function hotUpdateDownloaded() {
-/******/ hotSetStatus("ready");
-/******/ var deferred = hotDeferred;
-/******/ hotDeferred = null;
-/******/ if(!deferred) return;
-/******/ if(hotApplyOnUpdate) {
-/******/ // Wrap deferred object in Promise to mark it as a well-handled Promise to
-/******/ // avoid triggering uncaught exception warning in Chrome.
-/******/ // See https://bugs.chromium.org/p/chromium/issues/detail?id=465666
-/******/ Promise.resolve().then(function() {
-/******/ return hotApply(hotApplyOnUpdate);
-/******/ }).then(
-/******/ function(result) {
-/******/ deferred.resolve(result);
-/******/ },
-/******/ function(err) {
-/******/ deferred.reject(err);
-/******/ }
-/******/ );
-/******/ } else {
-/******/ var outdatedModules = [];
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ outdatedModules.push(toModuleId(id));
-/******/ }
-/******/ }
-/******/ deferred.resolve(outdatedModules);
-/******/ }
-/******/ }
-/******/
-/******/ function hotApply(options) {
-/******/ if(hotStatus !== "ready") throw new Error("apply() is only allowed in ready status");
-/******/ options = options || {};
-/******/
-/******/ var cb;
-/******/ var i;
-/******/ var j;
-/******/ var module;
-/******/ var moduleId;
-/******/
-/******/ function getAffectedStuff(updateModuleId) {
-/******/ var outdatedModules = [updateModuleId];
-/******/ var outdatedDependencies = {};
-/******/
-/******/ var queue = outdatedModules.slice().map(function(id) {
-/******/ return {
-/******/ chain: [id],
-/******/ id: id
-/******/ };
-/******/ });
-/******/ while(queue.length > 0) {
-/******/ var queueItem = queue.pop();
-/******/ var moduleId = queueItem.id;
-/******/ var chain = queueItem.chain;
-/******/ module = installedModules[moduleId];
-/******/ if(!module || module.hot._selfAccepted)
-/******/ continue;
-/******/ if(module.hot._selfDeclined) {
-/******/ return {
-/******/ type: "self-declined",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ if(module.hot._main) {
-/******/ return {
-/******/ type: "unaccepted",
-/******/ chain: chain,
-/******/ moduleId: moduleId
-/******/ };
-/******/ }
-/******/ for(var i = 0; i < module.parents.length; i++) {
-/******/ var parentId = module.parents[i];
-/******/ var parent = installedModules[parentId];
-/******/ if(!parent) continue;
-/******/ if(parent.hot._declinedDependencies[moduleId]) {
-/******/ return {
-/******/ type: "declined",
-/******/ chain: chain.concat([parentId]),
-/******/ moduleId: moduleId,
-/******/ parentId: parentId
-/******/ };
-/******/ }
-/******/ if(outdatedModules.indexOf(parentId) >= 0) continue;
-/******/ if(parent.hot._acceptedDependencies[moduleId]) {
-/******/ if(!outdatedDependencies[parentId])
-/******/ outdatedDependencies[parentId] = [];
-/******/ addAllToSet(outdatedDependencies[parentId], [moduleId]);
-/******/ continue;
-/******/ }
-/******/ delete outdatedDependencies[parentId];
-/******/ outdatedModules.push(parentId);
-/******/ queue.push({
-/******/ chain: chain.concat([parentId]),
-/******/ id: parentId
-/******/ });
-/******/ }
-/******/ }
-/******/
-/******/ return {
-/******/ type: "accepted",
-/******/ moduleId: updateModuleId,
-/******/ outdatedModules: outdatedModules,
-/******/ outdatedDependencies: outdatedDependencies
-/******/ };
-/******/ }
-/******/
-/******/ function addAllToSet(a, b) {
-/******/ for(var i = 0; i < b.length; i++) {
-/******/ var item = b[i];
-/******/ if(a.indexOf(item) < 0)
-/******/ a.push(item);
-/******/ }
-/******/ }
-/******/
-/******/ // at begin all updates modules are outdated
-/******/ // the "outdated" status can propagate to parents if they don't accept the children
-/******/ var outdatedDependencies = {};
-/******/ var outdatedModules = [];
-/******/ var appliedUpdate = {};
-/******/
-/******/ var warnUnexpectedRequire = function warnUnexpectedRequire() {
-/******/ console.warn("[HMR] unexpected require(" + result.moduleId + ") to disposed module");
-/******/ };
-/******/
-/******/ for(var id in hotUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(hotUpdate, id)) {
-/******/ moduleId = toModuleId(id);
-/******/ var result;
-/******/ if(hotUpdate[id]) {
-/******/ result = getAffectedStuff(moduleId);
-/******/ } else {
-/******/ result = {
-/******/ type: "disposed",
-/******/ moduleId: id
-/******/ };
-/******/ }
-/******/ var abortError = false;
-/******/ var doApply = false;
-/******/ var doDispose = false;
-/******/ var chainInfo = "";
-/******/ if(result.chain) {
-/******/ chainInfo = "\nUpdate propagation: " + result.chain.join(" -> ");
-/******/ }
-/******/ switch(result.type) {
-/******/ case "self-declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of self decline: " + result.moduleId + chainInfo);
-/******/ break;
-/******/ case "declined":
-/******/ if(options.onDeclined)
-/******/ options.onDeclined(result);
-/******/ if(!options.ignoreDeclined)
-/******/ abortError = new Error("Aborted because of declined dependency: " + result.moduleId + " in " + result.parentId + chainInfo);
-/******/ break;
-/******/ case "unaccepted":
-/******/ if(options.onUnaccepted)
-/******/ options.onUnaccepted(result);
-/******/ if(!options.ignoreUnaccepted)
-/******/ abortError = new Error("Aborted because " + moduleId + " is not accepted" + chainInfo);
-/******/ break;
-/******/ case "accepted":
-/******/ if(options.onAccepted)
-/******/ options.onAccepted(result);
-/******/ doApply = true;
-/******/ break;
-/******/ case "disposed":
-/******/ if(options.onDisposed)
-/******/ options.onDisposed(result);
-/******/ doDispose = true;
-/******/ break;
-/******/ default:
-/******/ throw new Error("Unexception type " + result.type);
-/******/ }
-/******/ if(abortError) {
-/******/ hotSetStatus("abort");
-/******/ return Promise.reject(abortError);
-/******/ }
-/******/ if(doApply) {
-/******/ appliedUpdate[moduleId] = hotUpdate[moduleId];
-/******/ addAllToSet(outdatedModules, result.outdatedModules);
-/******/ for(moduleId in result.outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(result.outdatedDependencies, moduleId)) {
-/******/ if(!outdatedDependencies[moduleId])
-/******/ outdatedDependencies[moduleId] = [];
-/******/ addAllToSet(outdatedDependencies[moduleId], result.outdatedDependencies[moduleId]);
-/******/ }
-/******/ }
-/******/ }
-/******/ if(doDispose) {
-/******/ addAllToSet(outdatedModules, [result.moduleId]);
-/******/ appliedUpdate[moduleId] = warnUnexpectedRequire;
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Store self accepted outdated modules to require them later by the module system
-/******/ var outdatedSelfAcceptedModules = [];
-/******/ for(i = 0; i < outdatedModules.length; i++) {
-/******/ moduleId = outdatedModules[i];
-/******/ if(installedModules[moduleId] && installedModules[moduleId].hot._selfAccepted)
-/******/ outdatedSelfAcceptedModules.push({
-/******/ module: moduleId,
-/******/ errorHandler: installedModules[moduleId].hot._selfAccepted
-/******/ });
-/******/ }
-/******/
-/******/ // Now in "dispose" phase
-/******/ hotSetStatus("dispose");
-/******/ Object.keys(hotAvailableFilesMap).forEach(function(chunkId) {
-/******/ if(hotAvailableFilesMap[chunkId] === false) {
-/******/ hotDisposeChunk(chunkId);
-/******/ }
-/******/ });
-/******/
-/******/ var idx;
-/******/ var queue = outdatedModules.slice();
-/******/ while(queue.length > 0) {
-/******/ moduleId = queue.pop();
-/******/ module = installedModules[moduleId];
-/******/ if(!module) continue;
-/******/
-/******/ var data = {};
-/******/
-/******/ // Call dispose handlers
-/******/ var disposeHandlers = module.hot._disposeHandlers;
-/******/ for(j = 0; j < disposeHandlers.length; j++) {
-/******/ cb = disposeHandlers[j];
-/******/ cb(data);
-/******/ }
-/******/ hotCurrentModuleData[moduleId] = data;
-/******/
-/******/ // disable module (this disables requires from this module)
-/******/ module.hot.active = false;
-/******/
-/******/ // remove module from cache
-/******/ delete installedModules[moduleId];
-/******/
-/******/ // when disposing there is no need to call dispose handler
-/******/ delete outdatedDependencies[moduleId];
-/******/
-/******/ // remove "parents" references from all children
-/******/ for(j = 0; j < module.children.length; j++) {
-/******/ var child = installedModules[module.children[j]];
-/******/ if(!child) continue;
-/******/ idx = child.parents.indexOf(moduleId);
-/******/ if(idx >= 0) {
-/******/ child.parents.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // remove outdated dependency from module children
-/******/ var dependency;
-/******/ var moduleOutdatedDependencies;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ if(module) {
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ for(j = 0; j < moduleOutdatedDependencies.length; j++) {
-/******/ dependency = moduleOutdatedDependencies[j];
-/******/ idx = module.children.indexOf(dependency);
-/******/ if(idx >= 0) module.children.splice(idx, 1);
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Not in "apply" phase
-/******/ hotSetStatus("apply");
-/******/
-/******/ hotCurrentHash = hotUpdateNewHash;
-/******/
-/******/ // insert new code
-/******/ for(moduleId in appliedUpdate) {
-/******/ if(Object.prototype.hasOwnProperty.call(appliedUpdate, moduleId)) {
-/******/ modules[moduleId] = appliedUpdate[moduleId];
-/******/ }
-/******/ }
-/******/
-/******/ // call accept handlers
-/******/ var error = null;
-/******/ for(moduleId in outdatedDependencies) {
-/******/ if(Object.prototype.hasOwnProperty.call(outdatedDependencies, moduleId)) {
-/******/ module = installedModules[moduleId];
-/******/ if(module) {
-/******/ moduleOutdatedDependencies = outdatedDependencies[moduleId];
-/******/ var callbacks = [];
-/******/ for(i = 0; i < moduleOutdatedDependencies.length; i++) {
-/******/ dependency = moduleOutdatedDependencies[i];
-/******/ cb = module.hot._acceptedDependencies[dependency];
-/******/ if(cb) {
-/******/ if(callbacks.indexOf(cb) >= 0) continue;
-/******/ callbacks.push(cb);
-/******/ }
-/******/ }
-/******/ for(i = 0; i < callbacks.length; i++) {
-/******/ cb = callbacks[i];
-/******/ try {
-/******/ cb(moduleOutdatedDependencies);
-/******/ } catch(err) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "accept-errored",
-/******/ moduleId: moduleId,
-/******/ dependencyId: moduleOutdatedDependencies[i],
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // Load self accepted modules
-/******/ for(i = 0; i < outdatedSelfAcceptedModules.length; i++) {
-/******/ var item = outdatedSelfAcceptedModules[i];
-/******/ moduleId = item.module;
-/******/ hotCurrentParents = [moduleId];
-/******/ try {
-/******/ __webpack_require__(moduleId);
-/******/ } catch(err) {
-/******/ if(typeof item.errorHandler === "function") {
-/******/ try {
-/******/ item.errorHandler(err);
-/******/ } catch(err2) {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-error-handler-errored",
-/******/ moduleId: moduleId,
-/******/ error: err2,
-/******/ orginalError: err, // TODO remove in webpack 4
-/******/ originalError: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err2;
-/******/ }
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ } else {
-/******/ if(options.onErrored) {
-/******/ options.onErrored({
-/******/ type: "self-accept-errored",
-/******/ moduleId: moduleId,
-/******/ error: err
-/******/ });
-/******/ }
-/******/ if(!options.ignoreErrored) {
-/******/ if(!error)
-/******/ error = err;
-/******/ }
-/******/ }
-/******/ }
-/******/ }
-/******/
-/******/ // handle errors in accept handlers and self accepted module load
-/******/ if(error) {
-/******/ hotSetStatus("fail");
-/******/ return Promise.reject(error);
-/******/ }
-/******/
-/******/ hotSetStatus("idle");
-/******/ return new Promise(function(resolve) {
-/******/ resolve(outdatedModules);
-/******/ });
-/******/ }
-/******/
-/******/ // The module cache
-/******/ var installedModules = {};
-/******/
-/******/ // The require function
-/******/ function __webpack_require__(moduleId) {
-/******/
-/******/ // Check if module is in cache
-/******/ if(installedModules[moduleId]) {
-/******/ return installedModules[moduleId].exports;
-/******/ }
-/******/ // Create a new module (and put it into the cache)
-/******/ var module = installedModules[moduleId] = {
-/******/ i: moduleId,
-/******/ l: false,
-/******/ exports: {},
-/******/ hot: hotCreateModule(moduleId),
-/******/ parents: (hotCurrentParentsTemp = hotCurrentParents, hotCurrentParents = [], hotCurrentParentsTemp),
-/******/ children: []
-/******/ };
-/******/
-/******/ // Execute the module function
-/******/ modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
-/******/
-/******/ // Flag the module as loaded
-/******/ module.l = true;
-/******/
-/******/ // Return the exports of the module
-/******/ return module.exports;
-/******/ }
-/******/
-/******/
-/******/ // expose the modules object (__webpack_modules__)
-/******/ __webpack_require__.m = modules;
-/******/
-/******/ // expose the module cache
-/******/ __webpack_require__.c = installedModules;
-/******/
-/******/ // define getter function for harmony exports
-/******/ __webpack_require__.d = function(exports, name, getter) {
-/******/ if(!__webpack_require__.o(exports, name)) {
-/******/ Object.defineProperty(exports, name, {
-/******/ configurable: false,
-/******/ enumerable: true,
-/******/ get: getter
-/******/ });
-/******/ }
-/******/ };
-/******/
-/******/ // getDefaultExport function for compatibility with non-harmony modules
-/******/ __webpack_require__.n = function(module) {
-/******/ var getter = module && module.__esModule ?
-/******/ function getDefault() { return module['default']; } :
-/******/ function getModuleExports() { return module; };
-/******/ __webpack_require__.d(getter, 'a', getter);
-/******/ return getter;
-/******/ };
-/******/
-/******/ // Object.prototype.hasOwnProperty.call
-/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
-/******/
-/******/ // __webpack_public_path__
-/******/ __webpack_require__.p = "";
-/******/
-/******/ // __webpack_hash__
-/******/ __webpack_require__.h = function() { return hotCurrentHash; };
-/******/
-/******/ // Load entry module and return exports
-/******/ return hotCreateRequire("./src/app.js")(__webpack_require__.s = "./src/app.js");
-/******/ })
-/************************************************************************/
-/******/ ({
-
-/***/ "../../node_modules/botframework-directlinejs/built/directLine.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// In order to keep file size down, only import the parts of rxjs that we use
-var __rest = (this && this.__rest) || function (s, e) {
- var t = {};
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
- t[p] = s[p];
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
- t[p[i]] = s[p[i]];
- return t;
-};
-Object.defineProperty(exports, "__esModule", { value: true });
-var BehaviorSubject_1 = __webpack_require__("../../node_modules/rxjs/BehaviorSubject.js");
-var Observable_1 = __webpack_require__("../../node_modules/rxjs/Observable.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/catch.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/combineLatest.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/count.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/delay.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/do.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/filter.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/map.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/mergeMap.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/retryWhen.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/share.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/take.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/dom/ajax.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/empty.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/from.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/interval.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/of.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/throw.js");
-// These types are specific to this client library, not to Direct Line 3.0
-var ConnectionStatus;
-(function (ConnectionStatus) {
- ConnectionStatus[ConnectionStatus["Uninitialized"] = 0] = "Uninitialized";
- ConnectionStatus[ConnectionStatus["Connecting"] = 1] = "Connecting";
- ConnectionStatus[ConnectionStatus["Online"] = 2] = "Online";
- ConnectionStatus[ConnectionStatus["ExpiredToken"] = 3] = "ExpiredToken";
- ConnectionStatus[ConnectionStatus["FailedToConnect"] = 4] = "FailedToConnect";
- ConnectionStatus[ConnectionStatus["Ended"] = 5] = "Ended"; // the bot ended the conversation
-})(ConnectionStatus = exports.ConnectionStatus || (exports.ConnectionStatus = {}));
-var lifetimeRefreshToken = 30 * 60 * 1000;
-var intervalRefreshToken = lifetimeRefreshToken / 2;
-var timeout = 20 * 1000;
-var retries = (lifetimeRefreshToken - intervalRefreshToken) / timeout;
-var errorExpiredToken = new Error("expired token");
-var errorConversationEnded = new Error("conversation ended");
-var errorFailedToConnect = new Error("failed to connect");
-var konsole = {
- log: function (message) {
- var optionalParams = [];
- for (var _i = 1; _i < arguments.length; _i++) {
- optionalParams[_i - 1] = arguments[_i];
- }
- if (typeof (window) !== 'undefined' && window["botchatDebug"] && message)
- console.log.apply(console, [message].concat(optionalParams));
- }
-};
-var DirectLine = (function () {
- function DirectLine(options) {
- this.connectionStatus$ = new BehaviorSubject_1.BehaviorSubject(ConnectionStatus.Uninitialized);
- this.domain = "https://directline.botframework.com/v3/directline";
- this.watermark = '';
- this.pollingInterval = 1000;
- this.secret = options.secret;
- this.token = options.secret || options.token;
- this.webSocket = (options.webSocket === undefined ? true : options.webSocket) && typeof WebSocket !== 'undefined' && WebSocket !== undefined;
- if (options.domain)
- this.domain = options.domain;
- if (options.conversationId) {
- this.conversationId = options.conversationId;
- }
- if (options.watermark) {
- if (this.webSocket)
- console.warn("Watermark was ignored: it is not supported using websockets at the moment");
- else
- this.watermark = options.watermark;
- }
- if (options.streamUrl) {
- if (options.token && options.conversationId)
- this.streamUrl = options.streamUrl;
- else
- console.warn("streamUrl was ignored: you need to provide a token and a conversationid");
- }
- if (options.pollingInterval !== undefined)
- this.pollingInterval = options.pollingInterval;
- this.activity$ = (this.webSocket
- ? this.webSocketActivity$()
- : this.pollingGetActivity$()).share();
- }
- // Every time we're about to make a Direct Line REST call, we call this first to see check the current connection status.
- // Either throws an error (indicating an error state) or emits a null, indicating a (presumably) healthy connection
- DirectLine.prototype.checkConnection = function (once) {
- var _this = this;
- if (once === void 0) { once = false; }
- var obs = this.connectionStatus$
- .flatMap(function (connectionStatus) {
- if (connectionStatus === ConnectionStatus.Uninitialized) {
- _this.connectionStatus$.next(ConnectionStatus.Connecting);
- //if token and streamUrl are defined it means reconnect has already been done. Skipping it.
- if (_this.token && _this.streamUrl) {
- _this.connectionStatus$.next(ConnectionStatus.Online);
- return Observable_1.Observable.of(connectionStatus);
- }
- else {
- return _this.startConversation().do(function (conversation) {
- _this.conversationId = conversation.conversationId;
- _this.token = _this.secret || conversation.token;
- _this.streamUrl = conversation.streamUrl;
- _this.referenceGrammarId = conversation.referenceGrammarId;
- if (!_this.secret)
- _this.refreshTokenLoop();
- _this.connectionStatus$.next(ConnectionStatus.Online);
- }, function (error) {
- _this.connectionStatus$.next(ConnectionStatus.FailedToConnect);
- })
- .map(function (_) { return connectionStatus; });
- }
- }
- else {
- return Observable_1.Observable.of(connectionStatus);
- }
- })
- .filter(function (connectionStatus) { return connectionStatus != ConnectionStatus.Uninitialized && connectionStatus != ConnectionStatus.Connecting; })
- .flatMap(function (connectionStatus) {
- switch (connectionStatus) {
- case ConnectionStatus.Ended:
- return Observable_1.Observable.throw(errorConversationEnded);
- case ConnectionStatus.FailedToConnect:
- return Observable_1.Observable.throw(errorFailedToConnect);
- case ConnectionStatus.ExpiredToken:
- return Observable_1.Observable.throw(errorExpiredToken);
- default:
- return Observable_1.Observable.of(null);
- }
- });
- return once ? obs.take(1) : obs;
- };
- DirectLine.prototype.expiredToken = function () {
- var connectionStatus = this.connectionStatus$.getValue();
- if (connectionStatus != ConnectionStatus.Ended && connectionStatus != ConnectionStatus.FailedToConnect)
- this.connectionStatus$.next(ConnectionStatus.ExpiredToken);
- };
- DirectLine.prototype.startConversation = function () {
- //if conversationid is set here, it means we need to call the reconnect api, else it is a new conversation
- var url = this.conversationId
- ? this.domain + "/conversations/" + this.conversationId + "?watermark=" + this.watermark
- : this.domain + "/conversations";
- var method = this.conversationId ? "GET" : "POST";
- return Observable_1.Observable.ajax({
- method: method,
- url: url,
- timeout: timeout,
- headers: {
- "Accept": "application/json",
- "Authorization": "Bearer " + this.token
- }
- })
- .map(function (ajaxResponse) { return ajaxResponse.response; })
- .retryWhen(function (error$) {
- // for now we deem 4xx and 5xx errors as unrecoverable
- // for everything else (timeouts), retry for a while
- return error$.mergeMap(function (error) { return error.status >= 400 && error.status < 600
- ? Observable_1.Observable.throw(error)
- : Observable_1.Observable.of(error); })
- .delay(timeout)
- .take(retries);
- });
- };
- DirectLine.prototype.refreshTokenLoop = function () {
- var _this = this;
- this.tokenRefreshSubscription = Observable_1.Observable.interval(intervalRefreshToken)
- .flatMap(function (_) { return _this.refreshToken(); })
- .subscribe(function (token) {
- konsole.log("refreshing token", token, "at", new Date());
- _this.token = token;
- });
- };
- DirectLine.prototype.refreshToken = function () {
- var _this = this;
- return this.checkConnection(true)
- .flatMap(function (_) {
- return Observable_1.Observable.ajax({
- method: "POST",
- url: _this.domain + "/tokens/refresh",
- timeout: timeout,
- headers: {
- "Authorization": "Bearer " + _this.token
- }
- })
- .map(function (ajaxResponse) { return ajaxResponse.response.token; })
- .retryWhen(function (error$) { return error$
- .mergeMap(function (error) {
- if (error.status === 403) {
- // if the token is expired there's no reason to keep trying
- _this.expiredToken();
- return Observable_1.Observable.throw(error);
- }
- return Observable_1.Observable.of(error);
- })
- .delay(timeout)
- .take(retries); });
- });
- };
- DirectLine.prototype.reconnect = function (conversation) {
- this.token = conversation.token;
- this.streamUrl = conversation.streamUrl;
- if (this.connectionStatus$.getValue() === ConnectionStatus.ExpiredToken)
- this.connectionStatus$.next(ConnectionStatus.Online);
- };
- DirectLine.prototype.end = function () {
- if (this.tokenRefreshSubscription)
- this.tokenRefreshSubscription.unsubscribe();
- this.connectionStatus$.next(ConnectionStatus.Ended);
- };
- DirectLine.prototype.postActivity = function (activity) {
- var _this = this;
- // Use postMessageWithAttachments for messages with attachments that are local files (e.g. an image to upload)
- // Technically we could use it for *all* activities, but postActivity is much lighter weight
- // So, since WebChat is partially a reference implementation of Direct Line, we implement both.
- if (activity.type === "message" && activity.attachments && activity.attachments.length > 0)
- return this.postMessageWithAttachments(activity);
- // If we're not connected to the bot, get connected
- // Will throw an error if we are not connected
- konsole.log("postActivity", activity);
- return this.checkConnection(true)
- .flatMap(function (_) {
- return Observable_1.Observable.ajax({
- method: "POST",
- url: _this.domain + "/conversations/" + _this.conversationId + "/activities",
- body: activity,
- timeout: timeout,
- headers: {
- "Content-Type": "application/json",
- "Authorization": "Bearer " + _this.token
- }
- })
- .map(function (ajaxResponse) { return ajaxResponse.response.id; })
- .catch(function (error) { return _this.catchPostError(error); });
- })
- .catch(function (error) { return _this.catchExpiredToken(error); });
- };
- DirectLine.prototype.postMessageWithAttachments = function (_a) {
- var _this = this;
- var attachments = _a.attachments, messageWithoutAttachments = __rest(_a, ["attachments"]);
- var formData;
- // If we're not connected to the bot, get connected
- // Will throw an error if we are not connected
- return this.checkConnection(true)
- .flatMap(function (_) {
- // To send this message to DirectLine we need to deconstruct it into a "template" activity
- // and one blob for each attachment.
- formData = new FormData();
- formData.append('activity', new Blob([JSON.stringify(messageWithoutAttachments)], { type: 'application/vnd.microsoft.activity' }));
- return Observable_1.Observable.from(attachments || [])
- .flatMap(function (media) {
- return Observable_1.Observable.ajax({
- method: "GET",
- url: media.contentUrl,
- responseType: 'arraybuffer'
- })
- .do(function (ajaxResponse) {
- return formData.append('file', new Blob([ajaxResponse.response], { type: media.contentType }), media.name);
- });
- })
- .count();
- })
- .flatMap(function (_) {
- return Observable_1.Observable.ajax({
- method: "POST",
- url: _this.domain + "/conversations/" + _this.conversationId + "/upload?userId=" + messageWithoutAttachments.from.id,
- body: formData,
- timeout: timeout,
- headers: {
- "Authorization": "Bearer " + _this.token
- }
- })
- .map(function (ajaxResponse) { return ajaxResponse.response.id; })
- .catch(function (error) { return _this.catchPostError(error); });
- })
- .catch(function (error) { return _this.catchPostError(error); });
- };
- DirectLine.prototype.catchPostError = function (error) {
- if (error.status === 403)
- // token has expired (will fall through to return "retry")
- this.expiredToken();
- else if (error.status >= 400 && error.status < 500)
- // more unrecoverable errors
- return Observable_1.Observable.throw(error);
- return Observable_1.Observable.of("retry");
- };
- DirectLine.prototype.catchExpiredToken = function (error) {
- return error === errorExpiredToken
- ? Observable_1.Observable.of("retry")
- : Observable_1.Observable.throw(error);
- };
- DirectLine.prototype.pollingGetActivity$ = function () {
- var _this = this;
- return Observable_1.Observable.interval(this.pollingInterval)
- .combineLatest(this.checkConnection())
- .flatMap(function (_) {
- return Observable_1.Observable.ajax({
- method: "GET",
- url: _this.domain + "/conversations/" + _this.conversationId + "/activities?watermark=" + _this.watermark,
- timeout: timeout,
- headers: {
- "Accept": "application/json",
- "Authorization": "Bearer " + _this.token
- }
- })
- .catch(function (error) {
- if (error.status === 403) {
- // This is slightly ugly. We want to update this.connectionStatus$ to ExpiredToken so that subsequent
- // calls to checkConnection will throw an error. But when we do so, it causes this.checkConnection()
- // to immediately throw an error, which is caught by the catch() below and transformed into an empty
- // object. Then next() returns, and we emit an empty object. Which means one 403 is causing
- // two empty objects to be emitted. Which is harmless but, again, slightly ugly.
- _this.expiredToken();
- }
- return Observable_1.Observable.empty();
- })
- .map(function (ajaxResponse) { return ajaxResponse.response; })
- .flatMap(function (activityGroup) { return _this.observableFromActivityGroup(activityGroup); });
- })
- .catch(function (error) { return Observable_1.Observable.empty(); });
- };
- DirectLine.prototype.observableFromActivityGroup = function (activityGroup) {
- if (activityGroup.watermark)
- this.watermark = activityGroup.watermark;
- return Observable_1.Observable.from(activityGroup.activities);
- };
- DirectLine.prototype.webSocketActivity$ = function () {
- var _this = this;
- return this.checkConnection()
- .flatMap(function (_) {
- return _this.observableWebSocket()
- .retryWhen(function (error$) { return error$.mergeMap(function (error) { return _this.reconnectToConversation(); }); });
- })
- .flatMap(function (activityGroup) { return _this.observableFromActivityGroup(activityGroup); });
- };
- // Originally we used Observable.webSocket, but it's fairly opionated and I ended up writing
- // a lot of code to work around their implemention details. Since WebChat is meant to be a reference
- // implementation, I decided roll the below, where the logic is more purposeful. - @billba
- DirectLine.prototype.observableWebSocket = function () {
- var _this = this;
- return Observable_1.Observable.create(function (subscriber) {
- konsole.log("creating WebSocket", _this.streamUrl);
- var ws = new WebSocket(_this.streamUrl);
- var sub;
- ws.onopen = function (open) {
- konsole.log("WebSocket open", open);
- // Chrome is pretty bad at noticing when a WebSocket connection is broken.
- // If we periodically ping the server with empty messages, it helps Chrome
- // realize when connection breaks, and close the socket. We then throw an
- // error, and that give us the opportunity to attempt to reconnect.
- sub = Observable_1.Observable.interval(timeout).subscribe(function (_) { return ws.send(null); });
- };
- ws.onclose = function (close) {
- konsole.log("WebSocket close", close);
- if (sub)
- sub.unsubscribe();
- subscriber.error(close);
- };
- ws.onmessage = function (message) { return message.data && subscriber.next(JSON.parse(message.data)); };
- // This is the 'unsubscribe' method, which is called when this observable is disposed.
- // When the WebSocket closes itself, we throw an error, and this function is eventually called.
- // When the observable is closed first (e.g. when tearing down a WebChat instance) then
- // we need to manually close the WebSocket.
- return function () {
- if (ws.readyState === 0 || ws.readyState === 1)
- ws.close();
- };
- });
- };
- DirectLine.prototype.reconnectToConversation = function () {
- var _this = this;
- return this.checkConnection(true)
- .flatMap(function (_) {
- return Observable_1.Observable.ajax({
- method: "GET",
- url: _this.domain + "/conversations/" + _this.conversationId + "?watermark=" + _this.watermark,
- timeout: timeout,
- headers: {
- "Accept": "application/json",
- "Authorization": "Bearer " + _this.token
- }
- })
- .do(function (result) {
- if (!_this.secret)
- _this.token = result.response.token;
- _this.streamUrl = result.response.streamUrl;
- })
- .map(function (_) { return null; })
- .retryWhen(function (error$) { return error$
- .mergeMap(function (error) {
- if (error.status === 403) {
- // token has expired. We can't recover from this here, but the embedding
- // website might eventually call reconnect() with a new token and streamUrl.
- _this.expiredToken();
- }
- return Observable_1.Observable.of(error);
- })
- .delay(timeout)
- .take(retries); });
- });
- };
- return DirectLine;
-}());
-exports.DirectLine = DirectLine;
-//# sourceMappingURL=directLine.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/adaptivecards-hostconfig.json":
-/***/ (function(module, exports) {
-
-module.exports = {"supportsInteractivity":true,"strongSeparation":{"spacing":40,"lineThickness":1,"lineColor":"#eeeeee"},"fontFamily":"\"Segoe UI\", sans-serif","fontSizes":{"small":12,"normal":13,"medium":15,"large":17,"extraLarge":19},"fontWeights":{"lighter":200,"normal":400,"bolder":700},"colors":{"dark":{"normal":"#000000","subtle":"#808c95"},"light":{"normal":"#ffffff","subtle":"#88ffff"},"accent":{"normal":"#2e89fc","subtle":"#802E8901"},"attention":{"normal":"#ffd800","subtle":"#CCFFD800"},"good":{"normal":"#00ff00","subtle":"#CC00FF00"},"warning":{"normal":"#ff0000","subtle":"#CCFF0000"}},"imageSizes":{"small":40,"medium":64,"large":96},"actions":{"maxActions":100,"separation":{"spacing":8},"buttonSpacing":8,"stretch":false,"showCard":{"actionMode":"inlineEdgeToEdge","inlineTopMargin":16,"backgroundColor":"#00000000","padding":{"top":8,"right":8,"bottom":8,"left":8}},"actionsOrientation":"vertical","actionAlignment":"left"},"adaptiveCard":{"backgroundColor":"#00000000","padding":{"left":8,"top":8,"right":8,"bottom":8}},"container":{"separation":{"spacing":8},"normal":{"backgroundColor":"#00000000"},"emphasis":{"backgroundColor":"#eeeeee","borderColor":"#aaaaaa","borderThickness":{"top":1,"right":1,"bottom":1,"left":1},"padding":{"top":8,"right":8,"bottom":8,"left":8}}},"textBlock":{"color":"dark","separations":{"small":{"spacing":8},"normal":{"spacing":8},"medium":{"spacing":8},"large":{"spacing":8},"extraLarge":{"spacing":8}}},"image":{"size":"medium","separation":{"spacing":8}},"imageSet":{"imageSize":"medium","separation":{"spacing":8}},"factSet":{"separation":{"spacing":8},"title":{"color":"dark","size":"normal","isSubtle":false,"weight":"bolder","wrap":true,"maxWidth":150},"value":{"color":"dark","size":"normal","isSubtle":false,"weight":"normal","wrap":true},"spacing":8},"input":{"separation":{"spacing":8}},"columnSet":{"separation":{"spacing":8}},"column":{"separation":{"spacing":8}}}
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/botchat.css":
-/***/ (function(module, exports, __webpack_require__) {
-
-
-var content = __webpack_require__("../../node_modules/css-loader/index.js!../../node_modules/botframework-webchat/botchat.css");
-
-if(typeof content === 'string') content = [[module.i, content, '']];
-
-var transform;
-var insertInto;
-
-
-
-var options = {"hmr":true}
-
-options.transform = transform
-options.insertInto = undefined;
-
-var update = __webpack_require__("../../node_modules/style-loader/lib/addStyles.js")(content, options);
-
-if(content.locals) module.exports = content.locals;
-
-if(true) {
- module.hot.accept("../../node_modules/css-loader/index.js!../../node_modules/botframework-webchat/botchat.css", function() {
- var newContent = __webpack_require__("../../node_modules/css-loader/index.js!../../node_modules/botframework-webchat/botchat.css");
-
- if(typeof newContent === 'string') newContent = [[module.i, newContent, '']];
-
- var locals = (function(a, b) {
- var key, idx = 0;
-
- for(key in a) {
- if(!b || a[key] !== b[key]) return false;
- idx++;
- }
-
- for(key in b) idx--;
-
- return idx === 0;
- }(content.locals, newContent.locals));
-
- if(!locals) throw new Error('Aborting CSS HMR due to changed css-modules locals.');
-
- update(newContent);
- });
-
- module.hot.dispose(function() { update(); });
-}
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/ActivityView.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-var Attachment_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Attachment.js");
-var Carousel_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Carousel.js");
-var FormattedText_1 = __webpack_require__("../../node_modules/botframework-webchat/built/FormattedText.js");
-var Attachments = function (props) {
- var attachments = props.attachments, attachmentLayout = props.attachmentLayout, otherProps = tslib_1.__rest(props, ["attachments", "attachmentLayout"]);
- if (!attachments || attachments.length === 0)
- return null;
- return attachmentLayout === 'carousel' ?
- React.createElement(Carousel_1.Carousel, tslib_1.__assign({ attachments: attachments }, otherProps))
- :
- React.createElement("div", { className: "wc-list" }, attachments.map(function (attachment, index) {
- return React.createElement(Attachment_1.AttachmentView, { key: index, attachment: attachment, format: props.format, onCardAction: props.onCardAction, onImageLoad: props.onImageLoad });
- }));
-};
-var ActivityView = (function (_super) {
- tslib_1.__extends(ActivityView, _super);
- function ActivityView(props) {
- return _super.call(this, props) || this;
- }
- ActivityView.prototype.shouldComponentUpdate = function (nextProps) {
- // if the activity changed, re-render
- return this.props.activity !== nextProps.activity
- || this.props.format !== nextProps.format
- || (this.props.activity.type === 'message'
- && this.props.activity.attachmentLayout === 'carousel'
- && this.props.size !== nextProps.size);
- };
- ActivityView.prototype.render = function () {
- var _a = this.props, activity = _a.activity, props = tslib_1.__rest(_a, ["activity"]);
- switch (activity.type) {
- case 'message':
- return (React.createElement("div", null,
- React.createElement(FormattedText_1.FormattedText, { text: activity.text, format: activity.textFormat, onImageLoad: props.onImageLoad }),
- React.createElement(Attachments, { attachments: activity.attachments, attachmentLayout: activity.attachmentLayout, format: props.format, onCardAction: props.onCardAction, onImageLoad: props.onImageLoad, size: props.size })));
- case 'typing':
- return React.createElement("div", { className: "wc-typing" });
- }
- };
- return ActivityView;
-}(React.Component));
-exports.ActivityView = ActivityView;
-//# sourceMappingURL=ActivityView.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/AdaptiveCardContainer.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-var AdaptiveCards = __webpack_require__("../../node_modules/microsoft-adaptivecards/built/adaptive-cards.js");
-var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js");
-var adaptivecardsHostConfig = __webpack_require__("../../node_modules/botframework-webchat/adaptivecards-hostconfig.json");
-var LinkedAdaptiveCard = (function (_super) {
- tslib_1.__extends(LinkedAdaptiveCard, _super);
- function LinkedAdaptiveCard(adaptiveCardContainer) {
- var _this = _super.call(this) || this;
- _this.adaptiveCardContainer = adaptiveCardContainer;
- return _this;
- }
- return LinkedAdaptiveCard;
-}(AdaptiveCards.AdaptiveCard));
-function getLinkedAdaptiveCard(action) {
- var element = action.parent;
- while (element && !(element instanceof LinkedAdaptiveCard)) {
- element = element.parent;
- }
- return element;
-}
-function cardWithoutHttpActions(card) {
- if (!card.actions)
- return card;
- var actions = [];
- card.actions.forEach(function (action) {
- //filter out http action buttons
- if (action.type === 'Action.Http')
- return;
- if (action.type === 'Action.ShowCard') {
- var showCardAction = action;
- showCardAction.card = cardWithoutHttpActions(showCardAction.card);
- }
- actions.push(action);
- });
- return tslib_1.__assign({}, card, { actions: actions });
-}
-AdaptiveCards.AdaptiveCard.onExecuteAction = function (action) {
- if (action instanceof AdaptiveCards.OpenUrlAction) {
- window.open(action.url);
- }
- else if (action instanceof AdaptiveCards.SubmitAction) {
- var linkedAdaptiveCard = getLinkedAdaptiveCard(action);
- if (linkedAdaptiveCard && action.data !== undefined) {
- if (typeof action.data === 'object' && action.data.__isBotFrameworkCardAction) {
- var cardAction = action.data;
- linkedAdaptiveCard.adaptiveCardContainer.onCardAction(cardAction.type, cardAction.value);
- }
- else {
- linkedAdaptiveCard.adaptiveCardContainer.onCardAction(typeof action.data === 'string' ? 'imBack' : 'postBack', action.data);
- }
- }
- }
-};
-var AdaptiveCardContainer = (function (_super) {
- tslib_1.__extends(AdaptiveCardContainer, _super);
- function AdaptiveCardContainer(props) {
- var _this = _super.call(this, props) || this;
- _this.onCardAction = function (type, value) {
- _this.props.onCardAction(type, value);
- };
- return _this;
- }
- AdaptiveCardContainer.prototype.onClick = function (e) {
- if (!this.props.onClick)
- return;
- //do not allow form elements to trigger a parent click event
- switch (e.target.tagName) {
- case 'A':
- case 'AUDIO':
- case 'VIDEO':
- case 'BUTTON':
- case 'INPUT':
- case 'LABEL':
- case 'TEXTAREA':
- case 'SELECT':
- break;
- default:
- this.props.onClick(e);
- }
- };
- AdaptiveCardContainer.prototype.componentDidMount = function () {
- var _this = this;
- var adaptiveCard = new LinkedAdaptiveCard(this);
- adaptiveCard.parse(cardWithoutHttpActions(this.props.card));
- var errors = adaptiveCard.validate();
- if (errors.length === 0) {
- var renderedCard = void 0;
- try {
- renderedCard = adaptiveCard.render();
- }
- catch (e) {
- var ve = {
- error: -1,
- message: e
- };
- errors.push(ve);
- if (e.stack) {
- ve.message += '\n' + e.stack;
- }
- }
- if (renderedCard) {
- if (this.props.onImageLoad) {
- var imgs = renderedCard.querySelectorAll('img');
- if (imgs && imgs.length > 0) {
- Array.prototype.forEach.call(imgs, function (img) {
- img.addEventListener('load', _this.props.onImageLoad);
- });
- }
- }
- this.div.appendChild(renderedCard);
- return;
- }
- }
- if (errors.length > 0) {
- console.log('Error(s) rendering AdaptiveCard:');
- errors.forEach(function (e) { return console.log(e.message); });
- this.setState({ errors: errors.map(function (e) { return e.message; }) });
- }
- };
- AdaptiveCardContainer.prototype.render = function () {
- var _this = this;
- var wrappedChildren;
- var hasErrors = this.state && this.state.errors && this.state.errors.length > 0;
- if (hasErrors) {
- wrappedChildren = (React.createElement("div", null,
- React.createElement("svg", { className: "error-icon", viewBox: "0 0 15 12.01" },
- React.createElement("path", { d: "M7.62 8.63v-.38H.94a.18.18 0 0 1-.19-.19V.94A.18.18 0 0 1 .94.75h10.12a.18.18 0 0 1 .19.19v3.73H12V.94a.91.91 0 0 0-.07-.36 1 1 0 0 0-.5-.5.91.91 0 0 0-.37-.08H.94a.91.91 0 0 0-.37.07 1 1 0 0 0-.5.5.91.91 0 0 0-.07.37v7.12a.91.91 0 0 0 .07.36 1 1 0 0 0 .5.5.91.91 0 0 0 .37.08h6.72c-.01-.12-.04-.24-.04-.37z M11.62 5.26a3.27 3.27 0 0 1 1.31.27 3.39 3.39 0 0 1 1.8 1.8 3.36 3.36 0 0 1 0 2.63 3.39 3.39 0 0 1-1.8 1.8 3.36 3.36 0 0 1-2.62 0 3.39 3.39 0 0 1-1.8-1.8 3.36 3.36 0 0 1 0-2.63 3.39 3.39 0 0 1 1.8-1.8 3.27 3.27 0 0 1 1.31-.27zm0 6a2.53 2.53 0 0 0 1-.21A2.65 2.65 0 0 0 14 9.65a2.62 2.62 0 0 0 0-2 2.65 2.65 0 0 0-1.39-1.39 2.62 2.62 0 0 0-2 0A2.65 2.65 0 0 0 9.2 7.61a2.62 2.62 0 0 0 0 2A2.65 2.65 0 0 0 10.6 11a2.53 2.53 0 0 0 1.02.26zM13 7.77l-.86.86.86.86-.53.53-.86-.86-.86.86-.53-.53.86-.86-.86-.86.53-.53.86.86.86-.86zM1.88 7.13h2.25V4.88H1.88zm.75-1.5h.75v.75h-.75zM5.63 2.63h4.5v.75h-4.5zM1.88 4.13h2.25V1.88H1.88zm.75-1.5h.75v.75h-.75zM9 5.63H5.63v.75h2.64A4 4 0 0 1 9 5.63z" })),
- React.createElement("div", { className: "error-text" }, "Can't render card")));
- }
- else if (this.props.children) {
- wrappedChildren = (React.createElement("div", { className: "non-adaptive-content" }, this.props.children));
- }
- else {
- wrappedChildren = null;
- }
- return (React.createElement("div", { className: Chat_1.classList('wc-card', 'wc-adaptive-card', this.props.className, hasErrors && 'error'), ref: function (div) { return _this.div = div; }, onClick: function (e) { return _this.onClick(e); } }, wrappedChildren));
- };
- AdaptiveCardContainer.prototype.componentDidUpdate = function () {
- if (this.props.onImageLoad)
- this.props.onImageLoad();
- };
- return AdaptiveCardContainer;
-}(React.Component));
-exports.AdaptiveCardContainer = AdaptiveCardContainer;
-AdaptiveCards.setHostConfig(adaptivecardsHostConfig);
-//# sourceMappingURL=AdaptiveCardContainer.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/App.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-var ReactDOM = __webpack_require__("../../node_modules/react-dom/index.js");
-var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js");
-var konsole = __webpack_require__("../../node_modules/botframework-webchat/built/Konsole.js");
-exports.App = function (props, container) {
- konsole.log("BotChat.App props", props);
- ReactDOM.render(React.createElement(AppContainer, props), container);
-};
-var AppContainer = function (props) {
- return React.createElement("div", { className: "wc-app" },
- React.createElement(Chat_1.Chat, tslib_1.__assign({}, props)));
-};
-//# sourceMappingURL=App.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/Attachment.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-var CardBuilder = __webpack_require__("../../node_modules/botframework-webchat/built/CardBuilder.js");
-var AdaptiveCardContainer_1 = __webpack_require__("../../node_modules/botframework-webchat/built/AdaptiveCardContainer.js");
-var regExpCard = /\^application\/vnd\.microsoft\.card\./i;
-var YOUTUBE_DOMAIN = "youtube.com";
-var YOUTUBE_WWW_DOMAIN = "www.youtube.com";
-var YOUTUBE_SHORT_DOMAIN = "youtu.be";
-var YOUTUBE_WWW_SHORT_DOMAIN = "www.youtu.be";
-var VIMEO_DOMAIN = "vimeo.com";
-var VIMEO_WWW_DOMAIN = "www.vimeo.com";
-exports.queryParams = function (src) {
- return src
- .substr(1)
- .split('&')
- .reduce(function (previous, current) {
- var keyValue = current.split('=');
- previous[decodeURIComponent(keyValue[0])] = decodeURIComponent(keyValue[1]);
- return previous;
- }, {});
-};
-var queryString = function (query) {
- return Object.keys(query)
- .map(function (key) { return encodeURIComponent(key) + '=' + encodeURIComponent(query[key].toString()); })
- .join('&');
-};
-var exists = function (value) { return value != null && typeof value != "undefined"; };
-var Youtube = function (props) {
- return React.createElement("iframe", { src: "https://" + YOUTUBE_DOMAIN + "/embed/" + props.embedId + "?" + queryString({
- modestbranding: '1',
- loop: props.loop ? '1' : '0',
- autoplay: props.autoPlay ? '1' : '0'
- }) });
-};
-var Vimeo = function (props) {
- return React.createElement("iframe", { src: "https://player." + VIMEO_DOMAIN + "/video/" + props.embedId + "?" + queryString({
- title: '0',
- byline: '0',
- portrait: '0',
- badge: '0',
- autoplay: props.autoPlay ? '1' : '0',
- loop: props.loop ? '1' : '0'
- }) });
-};
-var Video = function (props) {
- var url = document.createElement('a');
- url.href = props.src;
- var urlQueryParams = exports.queryParams(url.search);
- var pathSegments = url.pathname.substr(1).split('/');
- switch (url.hostname) {
- case YOUTUBE_DOMAIN:
- case YOUTUBE_SHORT_DOMAIN:
- case YOUTUBE_WWW_DOMAIN:
- case YOUTUBE_WWW_SHORT_DOMAIN:
- return React.createElement(Youtube, { embedId: url.hostname === YOUTUBE_DOMAIN || url.hostname === YOUTUBE_WWW_DOMAIN ? urlQueryParams['v'] : pathSegments[pathSegments.length - 1], autoPlay: props.autoPlay, loop: props.loop });
- case VIMEO_WWW_DOMAIN:
- case VIMEO_DOMAIN:
- return React.createElement(Vimeo, { embedId: pathSegments[pathSegments.length - 1], autoPlay: props.autoPlay, loop: props.loop });
- default:
- return React.createElement("video", tslib_1.__assign({ controls: true }, props));
- }
-};
-var Media = function (props) {
- switch (props.type) {
- case 'video':
- return React.createElement(Video, tslib_1.__assign({}, props));
- case 'audio':
- return React.createElement("audio", tslib_1.__assign({ controls: true }, props));
- default:
- return React.createElement("img", tslib_1.__assign({}, props));
- }
-};
-var Unknown = function (props) {
- if (regExpCard.test(props.contentType)) {
- return React.createElement("span", null, props.format.strings.unknownCard.replace('%1', props.contentType));
- }
- else if (props.contentUrl) {
- return React.createElement("div", null,
- React.createElement("a", { className: "wc-link-download", href: props.contentUrl, target: "_blank", title: props.contentUrl },
- React.createElement("div", { className: "wc-text-download" }, props.name || props.format.strings.unknownFile.replace('%1', props.contentType)),
- React.createElement("div", { className: "wc-icon-download" })));
- }
- else {
- return React.createElement("span", null, props.format.strings.unknownFile.replace('%1', props.contentType));
- }
-};
-var mediaType = function (url) {
- return url.slice((url.lastIndexOf(".") - 1 >>> 0) + 2).toLowerCase() == 'gif' ? 'image' : 'video';
-};
-exports.AttachmentView = function (props) {
- if (!props.attachment)
- return;
- var attachment = props.attachment;
- var onCardAction = function (cardAction) { return cardAction &&
- (function (e) {
- props.onCardAction(cardAction.type, cardAction.value);
- e.stopPropagation();
- }); };
- var attachedImage = function (images) { return images && images.length > 0 &&
- React.createElement(Media, { src: images[0].url, onLoad: props.onImageLoad, onClick: onCardAction(images[0].tap) }); };
- switch (attachment.contentType) {
- case "application/vnd.microsoft.card.hero":
- if (!attachment.content)
- return null;
- var heroCardBuilder_1 = new CardBuilder.AdaptiveCardBuilder();
- if (attachment.content.images) {
- attachment.content.images.forEach(function (img) { return heroCardBuilder_1.addImage(img.url); });
- }
- heroCardBuilder_1.addCommon(attachment.content);
- return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "hero", card: heroCardBuilder_1.card, onImageLoad: props.onImageLoad, onCardAction: props.onCardAction, onClick: onCardAction(attachment.content.tap) }));
- case "application/vnd.microsoft.card.thumbnail":
- if (!attachment.content)
- return null;
- var thumbnailCardBuilder = new CardBuilder.AdaptiveCardBuilder();
- if (attachment.content.images && attachment.content.images.length > 0) {
- var columns_1 = thumbnailCardBuilder.addColumnSet([75, 25]);
- thumbnailCardBuilder.addTextBlock(attachment.content.title, { size: "medium", weight: "bolder" }, columns_1[0]);
- thumbnailCardBuilder.addTextBlock(attachment.content.subtitle, { isSubtle: true, wrap: true }, columns_1[0]);
- thumbnailCardBuilder.addImage(attachment.content.images[0].url, columns_1[1]);
- thumbnailCardBuilder.addTextBlock(attachment.content.text, { wrap: true });
- thumbnailCardBuilder.addButtons(attachment.content.buttons);
- }
- else {
- thumbnailCardBuilder.addCommon(attachment.content);
- }
- return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "thumbnail", card: thumbnailCardBuilder.card, onImageLoad: props.onImageLoad, onCardAction: props.onCardAction, onClick: onCardAction(attachment.content.tap) }));
- case "application/vnd.microsoft.card.video":
- if (!attachment.content || !attachment.content.media || attachment.content.media.length === 0)
- return null;
- return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "video", card: CardBuilder.buildCommonCard(attachment.content), onCardAction: props.onCardAction },
- React.createElement(Media, { type: 'video', src: attachment.content.media[0].url, onLoad: props.onImageLoad, poster: attachment.content.image && attachment.content.image.url, autoPlay: attachment.content.autostart, loop: attachment.content.autoloop })));
- case "application/vnd.microsoft.card.animation":
- if (!attachment.content || !attachment.content.media || attachment.content.media.length === 0)
- return null;
- return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "animation", card: CardBuilder.buildCommonCard(attachment.content), onCardAction: props.onCardAction },
- React.createElement(Media, { type: mediaType(attachment.content.media[0].url), src: attachment.content.media[0].url, onLoad: props.onImageLoad, poster: attachment.content.image && attachment.content.image.url, autoPlay: attachment.content.autostart, loop: attachment.content.autoloop })));
- case "application/vnd.microsoft.card.audio":
- if (!attachment.content || !attachment.content.media || attachment.content.media.length === 0)
- return null;
- return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "audio", card: CardBuilder.buildCommonCard(attachment.content), onCardAction: props.onCardAction },
- React.createElement(Media, { type: 'audio', src: attachment.content.media[0].url, autoPlay: attachment.content.autostart, loop: attachment.content.autoloop })));
- case "application/vnd.microsoft.card.signin":
- if (!attachment.content)
- return null;
- return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "signin", card: CardBuilder.buildCommonCard(attachment.content), onCardAction: props.onCardAction }));
- case "application/vnd.microsoft.card.receipt":
- if (!attachment.content)
- return null;
- var receiptCardBuilder_1 = new CardBuilder.AdaptiveCardBuilder();
- receiptCardBuilder_1.addTextBlock(attachment.content.title, { size: "medium", weight: "bolder" });
- var columns_2 = receiptCardBuilder_1.addColumnSet([75, 25]);
- attachment.content.facts && attachment.content.facts.map(function (fact, i) {
- receiptCardBuilder_1.addTextBlock(fact.key, { color: 'default', size: 'medium' }, columns_2[0]);
- receiptCardBuilder_1.addTextBlock(fact.value, { color: 'default', size: 'medium', horizontalAlignment: 'right' }, columns_2[1]);
- });
- attachment.content.items && attachment.content.items.map(function (item, i) {
- if (item.image) {
- var columns2 = receiptCardBuilder_1.addColumnSet([15, 75, 10]);
- receiptCardBuilder_1.addImage(item.image.url, columns2[0]);
- receiptCardBuilder_1.addTextBlock(item.title, { size: "medium", weight: "bolder" }, columns2[1]);
- receiptCardBuilder_1.addTextBlock(item.subtitle, { color: 'default', size: 'medium' }, columns2[1]);
- receiptCardBuilder_1.addTextBlock(item.price, { horizontalAlignment: 'right' }, columns2[2]);
- }
- else {
- var columns3 = receiptCardBuilder_1.addColumnSet([75, 25]);
- receiptCardBuilder_1.addTextBlock(item.title, { size: "medium", weight: "bolder" }, columns3[0]);
- receiptCardBuilder_1.addTextBlock(item.subtitle, { color: 'default', size: 'medium' }, columns3[0]);
- receiptCardBuilder_1.addTextBlock(item.price, { horizontalAlignment: 'right' }, columns3[1]);
- }
- });
- if (exists(attachment.content.vat)) {
- var vatCol = receiptCardBuilder_1.addColumnSet([75, 25]);
- receiptCardBuilder_1.addTextBlock(props.format.strings.receiptVat, { size: "medium", weight: "bolder" }, vatCol[0]);
- receiptCardBuilder_1.addTextBlock(attachment.content.vat, { horizontalAlignment: 'right' }, vatCol[1]);
- }
- if (exists(attachment.content.tax)) {
- var taxCol = receiptCardBuilder_1.addColumnSet([75, 25]);
- receiptCardBuilder_1.addTextBlock(props.format.strings.receiptTax, { size: "medium", weight: "bolder" }, taxCol[0]);
- receiptCardBuilder_1.addTextBlock(attachment.content.tax, { horizontalAlignment: 'right' }, taxCol[1]);
- }
- if (exists(attachment.content.total)) {
- var totalCol = receiptCardBuilder_1.addColumnSet([75, 25]);
- receiptCardBuilder_1.addTextBlock(props.format.strings.receiptTotal, { size: "medium", weight: "bolder" }, totalCol[0]);
- receiptCardBuilder_1.addTextBlock(attachment.content.total, { horizontalAlignment: 'right', size: "medium", weight: "bolder" }, totalCol[1]);
- }
- receiptCardBuilder_1.addButtons(attachment.content.buttons);
- return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: 'receipt', card: receiptCardBuilder_1.card, onCardAction: props.onCardAction, onClick: onCardAction(attachment.content.tap) }));
- case "application/vnd.microsoft.card.adaptive":
- if (!attachment.content)
- return null;
- return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { card: attachment.content, onImageLoad: props.onImageLoad, onCardAction: props.onCardAction }));
- // Deprecated format for Skype channels. For testing legacy bots in Emulator only.
- case "application/vnd.microsoft.card.flex":
- if (!attachment.content)
- return null;
- return (React.createElement(AdaptiveCardContainer_1.AdaptiveCardContainer, { className: "flex", card: CardBuilder.buildCommonCard(attachment.content), onCardAction: props.onCardAction }, attachedImage(attachment.content.images)));
- case "image/svg+xml":
- case "image/png":
- case "image/jpg":
- case "image/jpeg":
- case "image/gif":
- return React.createElement(Media, { src: attachment.contentUrl, onLoad: props.onImageLoad });
- case "audio/mpeg":
- case "audio/mp4":
- return React.createElement(Media, { type: 'audio', src: attachment.contentUrl });
- case "video/mp4":
- return React.createElement(Media, { type: 'video', poster: attachment.thumbnailUrl, src: attachment.contentUrl, onLoad: props.onImageLoad });
- default:
- var unknownAttachment = props.attachment;
- return React.createElement(Unknown, { format: props.format, contentType: unknownAttachment.contentType, contentUrl: unknownAttachment.contentUrl, name: unknownAttachment.name });
- }
-};
-//# sourceMappingURL=Attachment.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/BotChat.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-function __export(m) {
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
-}
-Object.defineProperty(exports, "__esModule", { value: true });
-var App_1 = __webpack_require__("../../node_modules/botframework-webchat/built/App.js");
-exports.App = App_1.App;
-var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js");
-exports.Chat = Chat_1.Chat;
-__export(__webpack_require__("../../node_modules/botframework-directlinejs/built/directLine.js"));
-var Attachment_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Attachment.js");
-exports.queryParams = Attachment_1.queryParams;
-var SpeechOptions_1 = __webpack_require__("../../node_modules/botframework-webchat/built/SpeechOptions.js");
-exports.SpeechOptions = SpeechOptions_1.SpeechOptions;
-var SpeechModule_1 = __webpack_require__("../../node_modules/botframework-webchat/built/SpeechModule.js");
-exports.Speech = SpeechModule_1.Speech;
-// below are shims for compatibility with old browsers (IE 10 being the main culprit)
-__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.string.starts-with.js");
-__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.array.find.js");
-__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.array.find-index.js");
-//# sourceMappingURL=BotChat.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/CardBuilder.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var AdaptiveCardBuilder = (function () {
- function AdaptiveCardBuilder() {
- this.container = {
- type: "Container",
- items: []
- };
- this.card = {
- type: "AdaptiveCard",
- version: "0.5",
- body: [this.container]
- };
- }
- AdaptiveCardBuilder.prototype.addColumnSet = function (sizes, container) {
- if (container === void 0) { container = this.container; }
- var columnSet = {
- type: 'ColumnSet',
- columns: sizes.map(function (size) {
- return {
- type: 'Column',
- size: size.toString(),
- items: []
- };
- })
- };
- container.items.push(columnSet);
- return columnSet.columns;
- };
- AdaptiveCardBuilder.prototype.addItems = function (elements, container) {
- if (container === void 0) { container = this.container; }
- container.items.push.apply(container.items, elements);
- };
- AdaptiveCardBuilder.prototype.addTextBlock = function (text, template, container) {
- if (container === void 0) { container = this.container; }
- if (typeof text !== 'undefined') {
- var textblock = tslib_1.__assign({ type: "TextBlock", text: text }, template);
- container.items.push(textblock);
- }
- };
- AdaptiveCardBuilder.prototype.addButtons = function (buttons) {
- if (buttons) {
- this.card.actions = buttons.map(function (button) {
- var cardAction = tslib_1.__assign({ __isBotFrameworkCardAction: true }, button);
- return {
- title: button.title,
- type: "Action.Submit",
- data: cardAction
- };
- });
- }
- };
- AdaptiveCardBuilder.prototype.addCommon = function (content) {
- this.addTextBlock(content.title, { size: "medium", weight: "bolder" });
- this.addTextBlock(content.subtitle, { isSubtle: true, wrap: true, separation: "none" }); //TODO remove "as any" because separation is not defined
- this.addTextBlock(content.text, { wrap: true });
- this.addButtons(content.buttons);
- };
- AdaptiveCardBuilder.prototype.addImage = function (url, container) {
- if (container === void 0) { container = this.container; }
- var image = {
- type: "Image",
- url: url,
- size: "stretch"
- };
- container.items.push(image);
- };
- return AdaptiveCardBuilder;
-}());
-exports.AdaptiveCardBuilder = AdaptiveCardBuilder;
-exports.buildCommonCard = function (content) {
- if (!content)
- return null;
- var cardBuilder = new AdaptiveCardBuilder();
- cardBuilder.addCommon(content);
- return cardBuilder.card;
-};
-//# sourceMappingURL=CardBuilder.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/Carousel.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-var Attachment_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Attachment.js");
-var HScroll_1 = __webpack_require__("../../node_modules/botframework-webchat/built/HScroll.js");
-var konsole = __webpack_require__("../../node_modules/botframework-webchat/built/Konsole.js");
-var Carousel = (function (_super) {
- tslib_1.__extends(Carousel, _super);
- function Carousel(props) {
- return _super.call(this, props) || this;
- }
- Carousel.prototype.updateContentWidth = function () {
- //after the attachments have been rendered, we can now measure their actual width
- var width = this.props.size.width - this.props.format.carouselMargin;
- //important: remove any hard styling so that we can measure the natural width
- this.root.style.width = '';
- //now measure the natural offsetWidth
- if (this.root.offsetWidth > width) {
- // the content width is bigger than the space allotted, so we'll clip it to force scrolling
- this.root.style.width = width.toString() + "px";
- // since we're scrolling, we need to show scroll buttons
- this.hscroll.updateScrollButtons();
- }
- };
- Carousel.prototype.componentDidMount = function () {
- this.updateContentWidth();
- };
- Carousel.prototype.componentDidUpdate = function () {
- this.updateContentWidth();
- };
- Carousel.prototype.render = function () {
- var _this = this;
- return (React.createElement("div", { className: "wc-carousel", ref: function (div) { return _this.root = div; } },
- React.createElement(HScroll_1.HScroll, { ref: function (hscroll) { return _this.hscroll = hscroll; }, prevSvgPathData: "M 16.5 22 L 19 19.5 L 13.5 14 L 19 8.5 L 16.5 6 L 8.5 14 L 16.5 22 Z", nextSvgPathData: "M 12.5 22 L 10 19.5 L 15.5 14 L 10 8.5 L 12.5 6 L 20.5 14 L 12.5 22 Z", scrollUnit: "item" },
- React.createElement(CarouselAttachments, tslib_1.__assign({}, this.props)))));
- };
- return Carousel;
-}(React.PureComponent));
-exports.Carousel = Carousel;
-var CarouselAttachments = (function (_super) {
- tslib_1.__extends(CarouselAttachments, _super);
- function CarouselAttachments() {
- return _super !== null && _super.apply(this, arguments) || this;
- }
- CarouselAttachments.prototype.render = function () {
- konsole.log("rendering CarouselAttachments");
- var _a = this.props, attachments = _a.attachments, props = tslib_1.__rest(_a, ["attachments"]);
- return (React.createElement("ul", null, this.props.attachments.map(function (attachment, index) {
- return React.createElement("li", { key: index, className: "wc-carousel-item" },
- React.createElement(Attachment_1.AttachmentView, { attachment: attachment, format: props.format, onCardAction: props.onCardAction, onImageLoad: props.onImageLoad }));
- })));
- };
- return CarouselAttachments;
-}(React.PureComponent));
-//# sourceMappingURL=Carousel.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/Chat.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-var react_dom_1 = __webpack_require__("../../node_modules/react-dom/index.js");
-var botframework_directlinejs_1 = __webpack_require__("../../node_modules/botframework-directlinejs/built/directLine.js");
-var Store_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Store.js");
-var react_redux_1 = __webpack_require__("../../node_modules/react-redux/es/index.js");
-var SpeechModule_1 = __webpack_require__("../../node_modules/botframework-webchat/built/SpeechModule.js");
-var konsole = __webpack_require__("../../node_modules/botframework-webchat/built/Konsole.js");
-var getTabIndex_1 = __webpack_require__("../../node_modules/botframework-webchat/built/getTabIndex.js");
-var History_1 = __webpack_require__("../../node_modules/botframework-webchat/built/History.js");
-var MessagePane_1 = __webpack_require__("../../node_modules/botframework-webchat/built/MessagePane.js");
-var Shell_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Shell.js");
-var Chat = (function (_super) {
- tslib_1.__extends(Chat, _super);
- function Chat(props) {
- var _this = _super.call(this, props) || this;
- _this.store = Store_1.createStore();
- _this.resizeListener = function () { return _this.setSize(); };
- _this._handleCardAction = _this.handleCardAction.bind(_this);
- _this._handleKeyDownCapture = _this.handleKeyDownCapture.bind(_this);
- _this._saveChatviewPanelRef = _this.saveChatviewPanelRef.bind(_this);
- _this._saveHistoryRef = _this.saveHistoryRef.bind(_this);
- _this._saveShellRef = _this.saveShellRef.bind(_this);
- konsole.log("BotChat.Chat props", props);
- _this.store.dispatch({
- type: 'Set_Locale',
- locale: props.locale || window.navigator["userLanguage"] || window.navigator.language || 'en'
- });
- if (props.formatOptions)
- _this.store.dispatch({ type: 'Set_Format_Options', options: props.formatOptions });
- if (props.sendTyping)
- _this.store.dispatch({ type: 'Set_Send_Typing', sendTyping: props.sendTyping });
- if (props.speechOptions) {
- SpeechModule_1.Speech.SpeechRecognizer.setSpeechRecognizer(props.speechOptions.speechRecognizer);
- SpeechModule_1.Speech.SpeechSynthesizer.setSpeechSynthesizer(props.speechOptions.speechSynthesizer);
- }
- return _this;
- }
- Chat.prototype.handleIncomingActivity = function (activity) {
- var state = this.store.getState();
- switch (activity.type) {
- case "message":
- this.store.dispatch({ type: activity.from.id === state.connection.user.id ? 'Receive_Sent_Message' : 'Receive_Message', activity: activity });
- break;
- case "typing":
- if (activity.from.id !== state.connection.user.id)
- this.store.dispatch({ type: 'Show_Typing', activity: activity });
- break;
- }
- };
- Chat.prototype.setSize = function () {
- this.store.dispatch({
- type: 'Set_Size',
- width: this.chatviewPanelRef.offsetWidth,
- height: this.chatviewPanelRef.offsetHeight
- });
- };
- Chat.prototype.handleCardAction = function () {
- // After the user click on any card action, we will "blur" the focus, by setting focus on message pane
- // This is for after click on card action, the user press "A", it should go into the chat box
- var historyDOM = react_dom_1.findDOMNode(this.historyRef);
- if (historyDOM) {
- historyDOM.focus();
- }
- };
- Chat.prototype.handleKeyDownCapture = function (evt) {
- var target = evt.target;
- var tabIndex = getTabIndex_1.getTabIndex(target);
- if (evt.altKey
- || evt.ctrlKey
- || evt.metaKey
- || (!inputtableKey(evt.key) && evt.key !== 'Backspace')) {
- // Ignore if one of the utility key (except SHIFT) is pressed
- // E.g. CTRL-C on a link in one of the message should not jump to chat box
- // E.g. "A" or "Backspace" should jump to chat box
- return;
- }
- if (target === react_dom_1.findDOMNode(this.historyRef)
- || typeof tabIndex !== 'number'
- || tabIndex < 0) {
- evt.stopPropagation();
- var key = void 0;
- // Quirks: onKeyDown we re-focus, but the newly focused element does not receive the subsequent onKeyPress event
- // It is working in Chrome/Firefox/IE, confirmed not working in Edge/16
- // So we are manually appending the key if they can be inputted in the box
- if (/(^|\s)Edge\/16\./.test(navigator.userAgent)) {
- key = inputtableKey(evt.key);
- }
- this.shellRef.focus(key);
- }
- };
- Chat.prototype.saveChatviewPanelRef = function (chatviewPanelRef) {
- this.chatviewPanelRef = chatviewPanelRef;
- };
- Chat.prototype.saveHistoryRef = function (historyWrapper) {
- this.historyRef = historyWrapper.getWrappedInstance();
- };
- Chat.prototype.saveShellRef = function (shellWrapper) {
- this.shellRef = shellWrapper.getWrappedInstance();
- };
- Chat.prototype.componentDidMount = function () {
- var _this = this;
- // Now that we're mounted, we know our dimensions. Put them in the store (this will force a re-render)
- this.setSize();
- var botConnection = this.props.directLine
- ? (this.botConnection = new botframework_directlinejs_1.DirectLine(this.props.directLine))
- : this.props.botConnection;
- if (this.props.resize === 'window')
- window.addEventListener('resize', this.resizeListener);
- this.store.dispatch({ type: 'Start_Connection', user: this.props.user, bot: this.props.bot, botConnection: botConnection, selectedActivity: this.props.selectedActivity });
- this.connectionStatusSubscription = botConnection.connectionStatus$.subscribe(function (connectionStatus) {
- if (_this.props.speechOptions && _this.props.speechOptions.speechRecognizer) {
- var refGrammarId = botConnection.referenceGrammarId;
- if (refGrammarId)
- _this.props.speechOptions.speechRecognizer.referenceGrammarId = refGrammarId;
- }
- _this.store.dispatch({ type: 'Connection_Change', connectionStatus: connectionStatus });
- });
- this.activitySubscription = botConnection.activity$.subscribe(function (activity) { return _this.handleIncomingActivity(activity); }, function (error) { return konsole.log("activity$ error", error); });
- if (this.props.selectedActivity) {
- this.selectedActivitySubscription = this.props.selectedActivity.subscribe(function (activityOrID) {
- _this.store.dispatch({
- type: 'Select_Activity',
- selectedActivity: activityOrID.activity || _this.store.getState().history.activities.find(function (activity) { return activity.id === activityOrID.id; })
- });
- });
- }
- };
- Chat.prototype.componentWillUnmount = function () {
- this.connectionStatusSubscription.unsubscribe();
- this.activitySubscription.unsubscribe();
- if (this.selectedActivitySubscription)
- this.selectedActivitySubscription.unsubscribe();
- if (this.botConnection)
- this.botConnection.end();
- window.removeEventListener('resize', this.resizeListener);
- };
- // At startup we do three render passes:
- // 1. To determine the dimensions of the chat panel (nothing needs to actually render here, so we don't)
- // 2. To determine the margins of any given carousel (we just render one mock activity so that we can measure it)
- // 3. (this is also the normal re-render case) To render without the mock activity
- Chat.prototype.render = function () {
- var state = this.store.getState();
- konsole.log("BotChat.Chat state", state);
- // only render real stuff after we know our dimensions
- var header;
- if (state.format.options.showHeader)
- header =
- React.createElement("div", { className: "wc-header" },
- React.createElement("span", null, state.format.strings.title));
- var resize;
- if (this.props.resize === 'detect')
- resize =
- React.createElement(ResizeDetector, { onresize: this.resizeListener });
- return (React.createElement(react_redux_1.Provider, { store: this.store },
- React.createElement("div", { className: "wc-chatview-panel", onKeyDownCapture: this._handleKeyDownCapture, ref: this._saveChatviewPanelRef },
- header,
- React.createElement(MessagePane_1.MessagePane, null,
- React.createElement(History_1.History, { onCardAction: this._handleCardAction, ref: this._saveHistoryRef })),
- React.createElement(Shell_1.Shell, { ref: this._saveShellRef }),
- resize)));
- };
- return Chat;
-}(React.Component));
-exports.Chat = Chat;
-exports.doCardAction = function (botConnection, from, locale, sendMessage) { return function (type, actionValue) {
- var text = (typeof actionValue === 'string') ? actionValue : undefined;
- var value = (typeof actionValue === 'object') ? actionValue : undefined;
- switch (type) {
- case "imBack":
- if (typeof text === 'string')
- sendMessage(text, from, locale);
- break;
- case "postBack":
- exports.sendPostBack(botConnection, text, value, from, locale);
- break;
- case "call":
- case "openUrl":
- case "playAudio":
- case "playVideo":
- case "showImage":
- case "downloadFile":
- case "signin":
- window.open(text);
- break;
- default:
- konsole.log("unknown button type", type);
- }
-}; };
-exports.sendPostBack = function (botConnection, text, value, from, locale) {
- botConnection.postActivity({
- type: "message",
- text: text,
- value: value,
- from: from,
- locale: locale
- })
- .subscribe(function (id) {
- konsole.log("success sending postBack", id);
- }, function (error) {
- konsole.log("failed to send postBack", error);
- });
-};
-exports.renderIfNonempty = function (value, renderer) {
- if (value !== undefined && value !== null && (typeof value !== 'string' || value.length > 0))
- return renderer(value);
-};
-exports.classList = function () {
- var args = [];
- for (var _i = 0; _i < arguments.length; _i++) {
- args[_i] = arguments[_i];
- }
- return args.filter(Boolean).join(' ');
-};
-// note: container of this element must have CSS position of either absolute or relative
-var ResizeDetector = function (props) {
- // adapted to React from https://github.com/developit/simple-element-resize-detector
- return React.createElement("iframe", { style: { position: 'absolute', left: '0', top: '-100%', width: '100%', height: '100%', margin: '1px 0 0', border: 'none', opacity: 0, visibility: 'hidden', pointerEvents: 'none' }, ref: function (frame) {
- if (frame)
- frame.contentWindow.onresize = props.onresize;
- } });
-};
-// For auto-focus in some browsers, we synthetically insert keys into the chatbox.
-// By default, we insert keys when:
-// 1. evt.key.length === 1 (e.g. "1", "A", "=" keys), or
-// 2. evt.key is one of the map keys below (e.g. "Add" will insert "+", "Decimal" will insert ".")
-var INPUTTABLE_KEY = {
- Add: '+',
- Decimal: '.',
- Divide: '/',
- Multiply: '*',
- Subtract: '-' // Numpad subtract key
-};
-function inputtableKey(key) {
- return key.length === 1 ? key : INPUTTABLE_KEY[key];
-}
-//# sourceMappingURL=Chat.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/FormattedText.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var MarkdownIt = __webpack_require__("../../node_modules/markdown-it/index.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-exports.FormattedText = function (props) {
- if (!props.text || props.text === '')
- return null;
- switch (props.format) {
- case "xml":
- case "plain":
- return renderPlainText(props.text);
- default:
- return renderMarkdown(props.text, props.onImageLoad);
- }
-};
-var renderPlainText = function (text) {
- var lines = text.replace('\r', '').split('\n');
- var elements = lines.map(function (line, i) { return React.createElement("span", { key: i },
- line,
- React.createElement("br", null)); });
- return React.createElement("span", { className: "format-plain" }, elements);
-};
-var markdownIt = new MarkdownIt({ html: false, xhtmlOut: true, breaks: true, linkify: true, typographer: true });
-//configure MarkdownIt to open links in new tab
-//from https://github.com/markdown-it/markdown-it/blob/master/docs/architecture.md#renderer
-// Remember old renderer, if overriden, or proxy to default renderer
-var defaultRender = markdownIt.renderer.rules.link_open || (function (tokens, idx, options, env, self) {
- return self.renderToken(tokens, idx, options);
-});
-markdownIt.renderer.rules.link_open = function (tokens, idx, options, env, self) {
- // If you are sure other plugins can't add `target` - drop check below
- var targetIndex = tokens[idx].attrIndex('target');
- if (targetIndex < 0) {
- tokens[idx].attrPush(['target', '_blank']); // add new attribute
- }
- else {
- tokens[idx].attrs[targetIndex][1] = '_blank'; // replace value of existing attr
- }
- // pass token to default renderer.
- return defaultRender(tokens, idx, options, env, self);
-};
-var renderMarkdown = function (text, onImageLoad) {
- var __html;
- if (text.trim()) {
- var src = text
- .replace(/ /ig, '\n')
- .replace(/\[(.*?)\]\((.*?)( +".*?"){0,1}\)/ig, function (match, text, url, title) { return "[" + text + "](" + markdownIt.normalizeLink(url) + (title === undefined ? '' : title) + ")"; });
- var arr = src.split(/\n *\n|\r\n *\r\n|\r *\r/);
- var ma = arr.map(function (a) { return markdownIt.render(a); });
- __html = ma.join(' ');
- }
- else {
- // Replace spaces with non-breaking space Unicode characters
- __html = text.replace(/ */, '\u00A0');
- }
- return React.createElement("div", { className: "format-markdown", dangerouslySetInnerHTML: { __html: __html } });
-};
-//# sourceMappingURL=FormattedText.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/HScroll.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-var Observable_1 = __webpack_require__("../../node_modules/rxjs/Observable.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/fromEvent.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/merge.js");
-var HScroll = (function (_super) {
- tslib_1.__extends(HScroll, _super);
- function HScroll(props) {
- return _super.call(this, props) || this;
- }
- HScroll.prototype.clearScrollTimers = function () {
- clearInterval(this.scrollStartTimer);
- clearInterval(this.scrollSyncTimer);
- clearTimeout(this.scrollDurationTimer);
- document.body.removeChild(this.animateDiv);
- this.animateDiv = null;
- this.scrollStartTimer = null;
- this.scrollSyncTimer = null;
- this.scrollDurationTimer = null;
- };
- HScroll.prototype.updateScrollButtons = function () {
- this.prevButton.disabled = !this.scrollDiv || Math.round(this.scrollDiv.scrollLeft) <= 0;
- this.nextButton.disabled = !this.scrollDiv || Math.round(this.scrollDiv.scrollLeft) >= Math.round(this.scrollDiv.scrollWidth - this.scrollDiv.offsetWidth);
- };
- HScroll.prototype.componentDidMount = function () {
- var _this = this;
- this.scrollDiv.style.marginBottom = -(this.scrollDiv.offsetHeight - this.scrollDiv.clientHeight) + 'px';
- this.scrollSubscription = Observable_1.Observable.fromEvent(this.scrollDiv, 'scroll').subscribe(function (_) {
- _this.updateScrollButtons();
- });
- this.clickSubscription = Observable_1.Observable.merge(Observable_1.Observable.fromEvent(this.prevButton, 'click').map(function (_) { return -1; }), Observable_1.Observable.fromEvent(this.nextButton, 'click').map(function (_) { return 1; })).subscribe(function (delta) {
- _this.scrollBy(delta);
- });
- this.updateScrollButtons();
- };
- HScroll.prototype.componentDidUpdate = function () {
- this.scrollDiv.scrollLeft = 0;
- this.updateScrollButtons();
- };
- HScroll.prototype.componentWillUnmount = function () {
- this.scrollSubscription.unsubscribe();
- this.clickSubscription.unsubscribe();
- };
- HScroll.prototype.scrollAmount = function (direction) {
- if (this.props.scrollUnit == 'item') {
- // TODO: this can be improved by finding the actual item in the viewport,
- // instead of the first item, because they may not have the same width.
- // the width of the li is measured on demand in case CSS has resized it
- var firstItem = this.scrollDiv.querySelector('ul > li');
- return firstItem ? direction * firstItem.offsetWidth : 0;
- }
- else {
- // TODO: use a good page size. This can be improved by finding the next clipped item.
- return direction * (this.scrollDiv.offsetWidth - 70);
- }
- };
- HScroll.prototype.scrollBy = function (direction) {
- var _this = this;
- var easingClassName = 'wc-animate-scroll';
- //cancel existing animation when clicking fast
- if (this.animateDiv) {
- easingClassName = 'wc-animate-scroll-rapid';
- this.clearScrollTimers();
- }
- var unit = this.scrollAmount(direction);
- var scrollLeft = this.scrollDiv.scrollLeft;
- var dest = scrollLeft + unit;
- //don't exceed boundaries
- dest = Math.max(dest, 0);
- dest = Math.min(dest, this.scrollDiv.scrollWidth - this.scrollDiv.offsetWidth);
- if (scrollLeft == dest)
- return;
- //use proper easing curve when distance is small
- if (Math.abs(dest - scrollLeft) < 60) {
- easingClassName = 'wc-animate-scroll-near';
- }
- this.animateDiv = document.createElement('div');
- this.animateDiv.className = easingClassName;
- this.animateDiv.style.left = scrollLeft + 'px';
- document.body.appendChild(this.animateDiv);
- //capture ComputedStyle every millisecond
- this.scrollSyncTimer = window.setInterval(function () {
- var num = parseFloat(getComputedStyle(_this.animateDiv).left);
- _this.scrollDiv.scrollLeft = num;
- }, 1);
- //don't let the browser optimize the setting of 'this.animateDiv.style.left' - we need this to change values to trigger the CSS animation
- //we accomplish this by calling 'this.animateDiv.style.left' off this thread, using setTimeout
- this.scrollStartTimer = window.setTimeout(function () {
- _this.animateDiv.style.left = dest + 'px';
- var duration = 1000 * parseFloat(getComputedStyle(_this.animateDiv).transitionDuration);
- if (duration) {
- //slightly longer that the CSS time so we don't cut it off prematurely
- duration += 50;
- //stop capturing
- _this.scrollDurationTimer = window.setTimeout(function () { return _this.clearScrollTimers(); }, duration);
- }
- else {
- _this.clearScrollTimers();
- }
- }, 1);
- };
- HScroll.prototype.render = function () {
- var _this = this;
- return (React.createElement("div", null,
- React.createElement("button", { ref: function (button) { return _this.prevButton = button; }, className: "scroll previous", disabled: true },
- React.createElement("svg", null,
- React.createElement("path", { d: this.props.prevSvgPathData }))),
- React.createElement("div", { className: "wc-hscroll-outer" },
- React.createElement("div", { className: "wc-hscroll", ref: function (div) { return _this.scrollDiv = div; } }, this.props.children)),
- React.createElement("button", { ref: function (button) { return _this.nextButton = button; }, className: "scroll next", disabled: true },
- React.createElement("svg", null,
- React.createElement("path", { d: this.props.nextSvgPathData })))));
- };
- return HScroll;
-}(React.Component));
-exports.HScroll = HScroll;
-//# sourceMappingURL=HScroll.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/History.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-var react_redux_1 = __webpack_require__("../../node_modules/react-redux/es/index.js");
-var ActivityView_1 = __webpack_require__("../../node_modules/botframework-webchat/built/ActivityView.js");
-var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js");
-var konsole = __webpack_require__("../../node_modules/botframework-webchat/built/Konsole.js");
-var Store_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Store.js");
-var HistoryView = (function (_super) {
- tslib_1.__extends(HistoryView, _super);
- function HistoryView(props) {
- var _this = _super.call(this, props) || this;
- _this.scrollToBottom = true;
- // In order to do their cool horizontal scrolling thing, Carousels need to know how wide they can be.
- // So, at startup, we create this mock Carousel activity and measure it.
- _this.measurableCarousel = function () {
- // find the largest possible message size by forcing a width larger than the chat itself
- return React.createElement(WrappedActivity, { ref: function (x) { return _this.carouselActivity = x; }, activity: {
- type: 'message',
- id: '',
- from: { id: '' },
- attachmentLayout: 'carousel'
- }, format: null, fromMe: false, onClickActivity: null, onClickRetry: null, selected: false, showTimestamp: false },
- React.createElement("div", { style: { width: _this.largeWidth } }, "\u00A0"));
- };
- return _this;
- }
- HistoryView.prototype.componentWillUpdate = function () {
- this.scrollToBottom = (Math.abs(this.scrollMe.scrollHeight - this.scrollMe.scrollTop - this.scrollMe.offsetHeight) <= 1);
- };
- HistoryView.prototype.componentDidUpdate = function () {
- if (this.props.format.carouselMargin == undefined) {
- // After our initial render we need to measure the carousel width
- // Measure the message padding by subtracting the known large width
- var paddedWidth = measurePaddedWidth(this.carouselActivity.messageDiv) - this.largeWidth;
- // Subtract the padding from the offsetParent's width to get the width of the content
- var maxContentWidth = this.carouselActivity.messageDiv.offsetParent.offsetWidth - paddedWidth;
- // Subtract the content width from the chat width to get the margin.
- // Next time we need to get the content width (on a resize) we can use this margin to get the maximum content width
- var carouselMargin = this.props.size.width - maxContentWidth;
- konsole.log('history measureMessage ' + carouselMargin);
- // Finally, save it away in the Store, which will force another re-render
- this.props.setMeasurements(carouselMargin);
- this.carouselActivity = null; // After the re-render this activity doesn't exist
- }
- this.autoscroll();
- };
- HistoryView.prototype.autoscroll = function () {
- var vAlignBottomPadding = Math.max(0, measurePaddedHeight(this.scrollMe) - this.scrollContent.offsetHeight);
- this.scrollContent.style.marginTop = vAlignBottomPadding + 'px';
- var lastActivity = this.props.activities[this.props.activities.length - 1];
- var lastActivityFromMe = lastActivity && this.props.isFromMe && this.props.isFromMe(lastActivity);
- // Validating if we are at the bottom of the list or the last activity was triggered by the user.
- if (this.scrollToBottom || lastActivityFromMe) {
- this.scrollMe.scrollTop = this.scrollMe.scrollHeight - this.scrollMe.offsetHeight;
- }
- };
- // At startup we do three render passes:
- // 1. To determine the dimensions of the chat panel (not much needs to actually render here)
- // 2. To determine the margins of any given carousel (we just render one mock activity so that we can measure it)
- // 3. (this is also the normal re-render case) To render without the mock activity
- HistoryView.prototype.doCardAction = function (type, value) {
- this.props.onClickCardAction();
- this.props.onCardAction && this.props.onCardAction();
- return this.props.doCardAction(type, value);
- };
- HistoryView.prototype.render = function () {
- var _this = this;
- konsole.log("History props", this);
- var content;
- if (this.props.size.width !== undefined) {
- if (this.props.format.carouselMargin === undefined) {
- // For measuring carousels we need a width known to be larger than the chat itself
- this.largeWidth = this.props.size.width * 2;
- content = React.createElement(this.measurableCarousel, null);
- }
- else {
- content = this.props.activities.map(function (activity, index) {
- return React.createElement(WrappedActivity, { format: _this.props.format, key: 'message' + index, activity: activity, showTimestamp: index === _this.props.activities.length - 1 || (index + 1 < _this.props.activities.length && suitableInterval(activity, _this.props.activities[index + 1])), selected: _this.props.isSelected(activity), fromMe: _this.props.isFromMe(activity), onClickActivity: _this.props.onClickActivity(activity), onClickRetry: function (e) {
- // Since this is a click on an anchor, we need to stop it
- // from trying to actually follow a (nonexistant) link
- e.preventDefault();
- e.stopPropagation();
- _this.props.onClickRetry(activity);
- } },
- React.createElement(ActivityView_1.ActivityView, { format: _this.props.format, size: _this.props.size, activity: activity, onCardAction: function (type, value) { return _this.doCardAction(type, value); }, onImageLoad: function () { return _this.autoscroll(); } }));
- });
- }
- }
- var groupsClassName = Chat_1.classList('wc-message-groups', !this.props.format.options.showHeader && 'no-header');
- return (React.createElement("div", { className: groupsClassName, ref: function (div) { return _this.scrollMe = div || _this.scrollMe; }, role: "log", tabIndex: 0 },
- React.createElement("div", { className: "wc-message-group-content", ref: function (div) { if (div)
- _this.scrollContent = div; } }, content)));
- };
- return HistoryView;
-}(React.Component));
-exports.HistoryView = HistoryView;
-exports.History = react_redux_1.connect(function (state) { return ({
- // passed down to HistoryView
- format: state.format,
- size: state.size,
- activities: state.history.activities,
- // only used to create helper functions below
- connectionSelectedActivity: state.connection.selectedActivity,
- selectedActivity: state.history.selectedActivity,
- botConnection: state.connection.botConnection,
- user: state.connection.user
-}); }, {
- setMeasurements: function (carouselMargin) { return ({ type: 'Set_Measurements', carouselMargin: carouselMargin }); },
- onClickRetry: function (activity) { return ({ type: 'Send_Message_Retry', clientActivityId: activity.channelData.clientActivityId }); },
- onClickCardAction: function () { return ({ type: 'Card_Action_Clicked' }); },
- // only used to create helper functions below
- sendMessage: Store_1.sendMessage
-}, function (stateProps, dispatchProps, ownProps) { return ({
- // from stateProps
- format: stateProps.format,
- size: stateProps.size,
- activities: stateProps.activities,
- // from dispatchProps
- setMeasurements: dispatchProps.setMeasurements,
- onClickRetry: dispatchProps.onClickRetry,
- onClickCardAction: dispatchProps.onClickCardAction,
- // helper functions
- doCardAction: Chat_1.doCardAction(stateProps.botConnection, stateProps.user, stateProps.format.locale, dispatchProps.sendMessage),
- isFromMe: function (activity) { return activity.from.id === stateProps.user.id; },
- isSelected: function (activity) { return activity === stateProps.selectedActivity; },
- onClickActivity: function (activity) { return stateProps.connectionSelectedActivity && (function () { return stateProps.connectionSelectedActivity.next({ activity: activity }); }); },
- onCardAction: ownProps.onCardAction
-}); }, {
- withRef: true
-})(HistoryView);
-var getComputedStyleValues = function (el, stylePropertyNames) {
- var s = window.getComputedStyle(el);
- var result = {};
- stylePropertyNames.forEach(function (name) { return result[name] = parseInt(s.getPropertyValue(name)); });
- return result;
-};
-var measurePaddedHeight = function (el) {
- var paddingTop = 'padding-top', paddingBottom = 'padding-bottom';
- var values = getComputedStyleValues(el, [paddingTop, paddingBottom]);
- return el.offsetHeight - values[paddingTop] - values[paddingBottom];
-};
-var measurePaddedWidth = function (el) {
- var paddingLeft = 'padding-left', paddingRight = 'padding-right';
- var values = getComputedStyleValues(el, [paddingLeft, paddingRight]);
- return el.offsetWidth + values[paddingLeft] + values[paddingRight];
-};
-var suitableInterval = function (current, next) {
- return Date.parse(next.timestamp) - Date.parse(current.timestamp) > 5 * 60 * 1000;
-};
-var WrappedActivity = (function (_super) {
- tslib_1.__extends(WrappedActivity, _super);
- function WrappedActivity(props) {
- return _super.call(this, props) || this;
- }
- WrappedActivity.prototype.render = function () {
- var _this = this;
- var timeLine;
- switch (this.props.activity.id) {
- case undefined:
- timeLine = React.createElement("span", null, this.props.format.strings.messageSending);
- break;
- case null:
- timeLine = React.createElement("span", null, this.props.format.strings.messageFailed);
- break;
- case "retry":
- timeLine =
- React.createElement("span", null,
- this.props.format.strings.messageFailed,
- ' ',
- React.createElement("a", { href: ".", onClick: this.props.onClickRetry }, this.props.format.strings.messageRetry));
- break;
- default:
- var sent = void 0;
- if (this.props.showTimestamp)
- sent = this.props.format.strings.timeSent.replace('%1', (new Date(this.props.activity.timestamp)).toLocaleTimeString());
- timeLine = React.createElement("span", null,
- this.props.activity.from.name || this.props.activity.from.id,
- sent);
- break;
- }
- var who = this.props.fromMe ? 'me' : 'bot';
- var wrapperClassName = Chat_1.classList('wc-message-wrapper', this.props.activity.attachmentLayout || 'list', this.props.onClickActivity && 'clickable');
- var contentClassName = Chat_1.classList('wc-message-content', this.props.selected && 'selected');
- return (React.createElement("div", { "data-activity-id": this.props.activity.id, className: wrapperClassName, onClick: this.props.onClickActivity },
- React.createElement("div", { className: 'wc-message wc-message-from-' + who, ref: function (div) { return _this.messageDiv = div; } },
- React.createElement("div", { className: contentClassName },
- React.createElement("svg", { className: "wc-message-callout" },
- React.createElement("path", { className: "point-left", d: "m0,6 l6 6 v-12 z" }),
- React.createElement("path", { className: "point-right", d: "m6,6 l-6 6 v-12 z" })),
- this.props.children)),
- React.createElement("div", { className: 'wc-message-from wc-message-from-' + who }, timeLine)));
- };
- return WrappedActivity;
-}(React.Component));
-exports.WrappedActivity = WrappedActivity;
-//# sourceMappingURL=History.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/Konsole.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.log = function (message) {
- var optionalParams = [];
- for (var _i = 1; _i < arguments.length; _i++) {
- optionalParams[_i - 1] = arguments[_i];
- }
- if (typeof (window) !== 'undefined' && window["botchatDebug"] && message)
- console.log.apply(console, [message].concat(optionalParams));
-};
-//# sourceMappingURL=Konsole.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/MessagePane.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-var react_redux_1 = __webpack_require__("../../node_modules/react-redux/es/index.js");
-var HScroll_1 = __webpack_require__("../../node_modules/botframework-webchat/built/HScroll.js");
-var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js");
-var Store_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Store.js");
-var MessagePaneView = function (props) {
- return React.createElement("div", { className: Chat_1.classList('wc-message-pane', props.activityWithSuggestedActions && 'show-actions') },
- props.children,
- React.createElement("div", { className: "wc-suggested-actions" },
- React.createElement(SuggestedActions, tslib_1.__assign({}, props))));
-};
-var SuggestedActions = (function (_super) {
- tslib_1.__extends(SuggestedActions, _super);
- function SuggestedActions(props) {
- return _super.call(this, props) || this;
- }
- SuggestedActions.prototype.actionClick = function (e, cardAction) {
- //"stale" actions may be displayed (see shouldComponentUpdate), do not respond to click events if there aren't actual actions
- if (!this.props.activityWithSuggestedActions)
- return;
- this.props.takeSuggestedAction(this.props.activityWithSuggestedActions);
- this.props.doCardAction(cardAction.type, cardAction.value);
- e.stopPropagation();
- };
- SuggestedActions.prototype.shouldComponentUpdate = function (nextProps) {
- //update only when there are actions. We want the old actions to remain displayed as it animates down.
- return !!nextProps.activityWithSuggestedActions;
- };
- SuggestedActions.prototype.render = function () {
- var _this = this;
- if (!this.props.activityWithSuggestedActions)
- return null;
- return (React.createElement(HScroll_1.HScroll, { prevSvgPathData: "M 16.5 22 L 19 19.5 L 13.5 14 L 19 8.5 L 16.5 6 L 8.5 14 L 16.5 22 Z", nextSvgPathData: "M 12.5 22 L 10 19.5 L 15.5 14 L 10 8.5 L 12.5 6 L 20.5 14 L 12.5 22 Z", scrollUnit: "page" },
- React.createElement("ul", null, this.props.activityWithSuggestedActions.suggestedActions.actions.map(function (action, index) {
- return React.createElement("li", { key: index },
- React.createElement("button", { type: "button", onClick: function (e) { return _this.actionClick(e, action); }, title: action.title }, action.title));
- }))));
- };
- return SuggestedActions;
-}(React.Component));
-function activityWithSuggestedActions(activities) {
- if (!activities || activities.length === 0)
- return;
- var lastActivity = activities[activities.length - 1];
- if (lastActivity.type === 'message'
- && lastActivity.suggestedActions
- && lastActivity.suggestedActions.actions.length > 0)
- return lastActivity;
-}
-exports.MessagePane = react_redux_1.connect(function (state) { return ({
- // passed down to MessagePaneView
- activityWithSuggestedActions: activityWithSuggestedActions(state.history.activities),
- // only used to create helper functions below
- botConnection: state.connection.botConnection,
- user: state.connection.user,
- locale: state.format.locale
-}); }, {
- takeSuggestedAction: function (message) { return ({ type: 'Take_SuggestedAction', message: message }); },
- // only used to create helper functions below
- sendMessage: Store_1.sendMessage
-}, function (stateProps, dispatchProps, ownProps) { return ({
- // from stateProps
- activityWithSuggestedActions: stateProps.activityWithSuggestedActions,
- // from dispatchProps
- takeSuggestedAction: dispatchProps.takeSuggestedAction,
- // from ownProps
- children: ownProps.children,
- // helper functions
- doCardAction: Chat_1.doCardAction(stateProps.botConnection, stateProps.user, stateProps.locale, dispatchProps.sendMessage),
-}); })(MessagePaneView);
-//# sourceMappingURL=MessagePane.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/Shell.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var React = __webpack_require__("../../node_modules/react/react.js");
-var Chat_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Chat.js");
-var react_redux_1 = __webpack_require__("../../node_modules/react-redux/es/index.js");
-var SpeechModule_1 = __webpack_require__("../../node_modules/botframework-webchat/built/SpeechModule.js");
-var Store_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Store.js");
-var ShellContainer = (function (_super) {
- tslib_1.__extends(ShellContainer, _super);
- function ShellContainer() {
- return _super !== null && _super.apply(this, arguments) || this;
- }
- ShellContainer.prototype.sendMessage = function () {
- if (this.props.inputText.trim().length > 0) {
- this.props.sendMessage(this.props.inputText);
- }
- };
- ShellContainer.prototype.handleSendButtonKeyPress = function (evt) {
- if (evt.key === 'Enter' || evt.key === ' ') {
- evt.preventDefault();
- this.sendMessage();
- this.textInput.focus();
- }
- };
- ShellContainer.prototype.handleUploadButtonKeyPress = function (evt) {
- if (evt.key === 'Enter' || evt.key === ' ') {
- evt.preventDefault();
- this.fileInput.click();
- }
- };
- ShellContainer.prototype.onKeyPress = function (e) {
- if (e.key === 'Enter') {
- this.sendMessage();
- }
- };
- ShellContainer.prototype.onClickSend = function () {
- this.sendMessage();
- };
- ShellContainer.prototype.onChangeFile = function () {
- this.props.sendFiles(this.fileInput.files);
- this.fileInput.value = null;
- this.textInput.focus();
- };
- ShellContainer.prototype.onTextInputFocus = function () {
- if (this.props.listening) {
- this.props.stopListening();
- }
- };
- ShellContainer.prototype.onClickMic = function () {
- if (this.props.listening) {
- this.props.stopListening();
- }
- else {
- this.props.startListening();
- }
- };
- ShellContainer.prototype.focus = function (appendKey) {
- this.textInput.focus();
- if (appendKey) {
- this.props.onChangeText(this.props.inputText + appendKey);
- }
- };
- ShellContainer.prototype.render = function () {
- var _this = this;
- var className = Chat_1.classList('wc-console', this.props.inputText.length > 0 && 'has-text');
- var showMicButton = this.props.listening || (SpeechModule_1.Speech.SpeechRecognizer.speechIsAvailable() && !this.props.inputText.length);
- var sendButtonClassName = Chat_1.classList('wc-send', showMicButton && 'hidden');
- var micButtonClassName = Chat_1.classList('wc-mic', !showMicButton && 'hidden', this.props.listening && 'active', !this.props.listening && 'inactive');
- var placeholder = this.props.listening ? this.props.strings.listeningIndicator : this.props.strings.consolePlaceholder;
- return (React.createElement("div", { className: className },
- React.createElement("label", { className: "wc-upload", onKeyPress: function (evt) { return _this.handleUploadButtonKeyPress(evt); }, tabIndex: 0 },
- React.createElement("svg", null,
- React.createElement("path", { d: "M19.96 4.79m-2 0a2 2 0 0 1 4 0 2 2 0 0 1-4 0zM8.32 4.19L2.5 15.53 22.45 15.53 17.46 8.56 14.42 11.18 8.32 4.19ZM1.04 1L1.04 17 24.96 17 24.96 1 1.04 1ZM1.03 0L24.96 0C25.54 0 26 0.45 26 0.99L26 17.01C26 17.55 25.53 18 24.96 18L1.03 18C0.46 18 0 17.55 0 17.01L0 0.99C0 0.45 0.47 0 1.03 0Z" })),
- React.createElement("input", { id: "wc-upload-input", tabIndex: -1, type: "file", ref: function (input) { return _this.fileInput = input; }, multiple: true, onChange: function () { return _this.onChangeFile(); }, "aria-label": this.props.strings.uploadFile, role: "button" })),
- React.createElement("div", { className: "wc-textbox" },
- React.createElement("input", { type: "text", className: "wc-shellinput", ref: function (input) { return _this.textInput = input; }, autoFocus: true, value: this.props.inputText, onChange: function (_) { return _this.props.onChangeText(_this.textInput.value); }, onKeyPress: function (e) { return _this.onKeyPress(e); }, onFocus: function () { return _this.onTextInputFocus(); }, placeholder: placeholder, "aria-label": this.props.inputText ? null : placeholder, "aria-live": "polite" })),
- React.createElement("button", { className: sendButtonClassName, onClick: function () { return _this.onClickSend(); }, "aria-label": this.props.strings.send, role: "button", onKeyPress: function (evt) { return _this.handleSendButtonKeyPress(evt); }, tabIndex: 0 },
- React.createElement("svg", null,
- React.createElement("path", { d: "M26.79 9.38A0.31 0.31 0 0 0 26.79 8.79L0.41 0.02C0.36 0 0.34 0 0.32 0 0.14 0 0 0.13 0 0.29 0 0.33 0.01 0.37 0.03 0.41L3.44 9.08 0.03 17.76A0.29 0.29 0 0 0 0.01 17.8 0.28 0.28 0 0 0 0.01 17.86C0.01 18.02 0.14 18.16 0.3 18.16A0.3 0.3 0 0 0 0.41 18.14L26.79 9.38ZM0.81 0.79L24.84 8.79 3.98 8.79 0.81 0.79ZM3.98 9.37L24.84 9.37 0.81 17.37 3.98 9.37Z" }))),
- React.createElement("button", { className: micButtonClassName, onClick: function () { return _this.onClickMic(); }, "aria-label": this.props.strings.speak, role: "button", tabIndex: 0 },
- React.createElement("svg", { width: "28", height: "22", viewBox: "0 0 58 58" },
- React.createElement("path", { d: "M 44 28 C 43.448 28 43 28.447 43 29 L 43 35 C 43 42.72 36.72 49 29 49 C 21.28 49 15 42.72 15 35 L 15 29 C 15 28.447 14.552 28 14 28 C 13.448 28 13 28.447 13 29 L 13 35 C 13 43.485 19.644 50.429 28 50.949 L 28 56 L 23 56 C 22.448 56 22 56.447 22 57 C 22 57.553 22.448 58 23 58 L 35 58 C 35.552 58 36 57.553 36 57 C 36 56.447 35.552 56 35 56 L 30 56 L 30 50.949 C 38.356 50.429 45 43.484 45 35 L 45 29 C 45 28.447 44.552 28 44 28 Z" }),
- React.createElement("path", { id: "micFilling", d: "M 28.97 44.438 L 28.97 44.438 C 23.773 44.438 19.521 40.033 19.521 34.649 L 19.521 11.156 C 19.521 5.772 23.773 1.368 28.97 1.368 L 28.97 1.368 C 34.166 1.368 38.418 5.772 38.418 11.156 L 38.418 34.649 C 38.418 40.033 34.166 44.438 28.97 44.438 Z" }),
- React.createElement("path", { d: "M 29 46 C 35.065 46 40 41.065 40 35 L 40 11 C 40 4.935 35.065 0 29 0 C 22.935 0 18 4.935 18 11 L 18 35 C 18 41.065 22.935 46 29 46 Z M 20 11 C 20 6.037 24.038 2 29 2 C 33.962 2 38 6.037 38 11 L 38 35 C 38 39.963 33.962 44 29 44 C 24.038 44 20 39.963 20 35 L 20 11 Z" })))));
- };
- return ShellContainer;
-}(React.Component));
-exports.Shell = react_redux_1.connect(function (state) { return ({
- // passed down to ShellContainer
- inputText: state.shell.input,
- strings: state.format.strings,
- // only used to create helper functions below
- locale: state.format.locale,
- user: state.connection.user,
- listening: state.shell.listening
-}); }, {
- // passed down to ShellContainer
- onChangeText: function (input) { return ({ type: 'Update_Input', input: input, source: "text" }); },
- stopListening: function () { return ({ type: 'Listening_Stop' }); },
- startListening: function () { return ({ type: 'Listening_Starting' }); },
- // only used to create helper functions below
- sendMessage: Store_1.sendMessage,
- sendFiles: Store_1.sendFiles
-}, function (stateProps, dispatchProps, ownProps) { return ({
- // from stateProps
- inputText: stateProps.inputText,
- strings: stateProps.strings,
- listening: stateProps.listening,
- // from dispatchProps
- onChangeText: dispatchProps.onChangeText,
- // helper functions
- sendMessage: function (text) { return dispatchProps.sendMessage(text, stateProps.user, stateProps.locale); },
- sendFiles: function (files) { return dispatchProps.sendFiles(files, stateProps.user, stateProps.locale); },
- startListening: function () { return dispatchProps.startListening(); },
- stopListening: function () { return dispatchProps.stopListening(); }
-}); }, {
- withRef: true
-})(ShellContainer);
-//# sourceMappingURL=Shell.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/SpeechModule.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var Speech;
-(function (Speech) {
- var SpeechRecognizer = (function () {
- function SpeechRecognizer() {
- }
- SpeechRecognizer.setSpeechRecognizer = function (recognizer) {
- SpeechRecognizer.instance = recognizer;
- };
- SpeechRecognizer.startRecognizing = function (locale, onIntermediateResult, onFinalResult, onAudioStreamStarted, onRecognitionFailed) {
- if (locale === void 0) { locale = 'en-US'; }
- if (onIntermediateResult === void 0) { onIntermediateResult = null; }
- if (onFinalResult === void 0) { onFinalResult = null; }
- if (onAudioStreamStarted === void 0) { onAudioStreamStarted = null; }
- if (onRecognitionFailed === void 0) { onRecognitionFailed = null; }
- if (!SpeechRecognizer.speechIsAvailable())
- return;
- if (locale && SpeechRecognizer.instance.locale !== locale) {
- SpeechRecognizer.instance.stopRecognizing();
- SpeechRecognizer.instance.locale = locale; // to do this could invalidate warmup.
- }
- if (SpeechRecognizer.alreadyRecognizing()) {
- SpeechRecognizer.stopRecognizing();
- }
- SpeechRecognizer.instance.onIntermediateResult = onIntermediateResult;
- SpeechRecognizer.instance.onFinalResult = onFinalResult;
- SpeechRecognizer.instance.onAudioStreamingToService = onAudioStreamStarted;
- SpeechRecognizer.instance.onRecognitionFailed = onRecognitionFailed;
- SpeechRecognizer.instance.startRecognizing();
- };
- SpeechRecognizer.stopRecognizing = function () {
- if (!SpeechRecognizer.speechIsAvailable())
- return;
- SpeechRecognizer.instance.stopRecognizing();
- };
- SpeechRecognizer.warmup = function () {
- if (!SpeechRecognizer.speechIsAvailable())
- return;
- SpeechRecognizer.instance.warmup();
- };
- SpeechRecognizer.speechIsAvailable = function () {
- return SpeechRecognizer.instance != null && SpeechRecognizer.instance.speechIsAvailable();
- };
- SpeechRecognizer.alreadyRecognizing = function () {
- return SpeechRecognizer.instance ? SpeechRecognizer.instance.isStreamingToService : false;
- };
- return SpeechRecognizer;
- }());
- SpeechRecognizer.instance = null;
- Speech.SpeechRecognizer = SpeechRecognizer;
- var SpeechSynthesizer = (function () {
- function SpeechSynthesizer() {
- }
- SpeechSynthesizer.setSpeechSynthesizer = function (speechSynthesizer) {
- SpeechSynthesizer.instance = speechSynthesizer;
- };
- SpeechSynthesizer.speak = function (text, lang, onSpeakingStarted, onSpeakingFinished) {
- if (onSpeakingStarted === void 0) { onSpeakingStarted = null; }
- if (onSpeakingFinished === void 0) { onSpeakingFinished = null; }
- if (SpeechSynthesizer.instance == null)
- return;
- SpeechSynthesizer.instance.speak(text, lang, onSpeakingStarted, onSpeakingFinished);
- };
- SpeechSynthesizer.stopSpeaking = function () {
- if (SpeechSynthesizer.instance == null)
- return;
- SpeechSynthesizer.instance.stopSpeaking();
- };
- return SpeechSynthesizer;
- }());
- SpeechSynthesizer.instance = null;
- Speech.SpeechSynthesizer = SpeechSynthesizer;
- var BrowserSpeechRecognizer = (function () {
- function BrowserSpeechRecognizer() {
- var _this = this;
- this.locale = null;
- this.isStreamingToService = false;
- this.onIntermediateResult = null;
- this.onFinalResult = null;
- this.onAudioStreamingToService = null;
- this.onRecognitionFailed = null;
- this.recognizer = null;
- if (!window.webkitSpeechRecognition) {
- console.error("This browser does not support speech recognition");
- return;
- }
- this.recognizer = new window.webkitSpeechRecognition();
- this.recognizer.lang = 'en-US';
- this.recognizer.interimResults = true;
- this.recognizer.onaudiostart = function () {
- if (_this.onAudioStreamingToService) {
- _this.onAudioStreamingToService();
- }
- };
- this.recognizer.onresult = function (srevent) {
- if (srevent.results == null || srevent.length == 0) {
- return;
- }
- var result = srevent.results[0];
- if (result.isFinal === true && _this.onFinalResult != null) {
- _this.onFinalResult(result[0].transcript);
- }
- else if (result.isFinal === false && _this.onIntermediateResult != null) {
- var text = "";
- for (var i = 0; i < srevent.results.length; ++i) {
- text += srevent.results[i][0].transcript;
- }
- _this.onIntermediateResult(text);
- }
- };
- this.recognizer.onerror = function (err) {
- if (_this.onRecognitionFailed) {
- _this.onRecognitionFailed();
- }
- throw err;
- };
- }
- BrowserSpeechRecognizer.prototype.speechIsAvailable = function () {
- return this.recognizer != null;
- };
- BrowserSpeechRecognizer.prototype.warmup = function () {
- };
- BrowserSpeechRecognizer.prototype.startRecognizing = function () {
- this.recognizer.start();
- };
- BrowserSpeechRecognizer.prototype.stopRecognizing = function () {
- this.recognizer.stop();
- };
- return BrowserSpeechRecognizer;
- }());
- Speech.BrowserSpeechRecognizer = BrowserSpeechRecognizer;
- var BrowserSpeechSynthesizer = (function () {
- function BrowserSpeechSynthesizer() {
- this.lastOperation = null;
- this.audioElement = null;
- this.speakRequests = [];
- }
- BrowserSpeechSynthesizer.prototype.speak = function (text, lang, onSpeakingStarted, onSpeakingFinished) {
- var _this = this;
- if (onSpeakingStarted === void 0) { onSpeakingStarted = null; }
- if (onSpeakingFinished === void 0) { onSpeakingFinished = null; }
- if (!('SpeechSynthesisUtterance' in window) || !text)
- return;
- if (this.audioElement === null) {
- var audio = document.createElement('audio');
- audio.id = 'player';
- audio.autoplay = true;
- this.audioElement = audio;
- }
- var chunks = new Array();
- if (text[0] === '<') {
- if (text.indexOf('\n';
- var parser = new DOMParser();
- var dom = parser.parseFromString(text, 'text/xml');
- var nodes = dom.documentElement.childNodes;
- this.processNodes(nodes, chunks);
- }
- else {
- chunks.push(text);
- }
- var onSpeakingFinishedWrapper = function () {
- if (onSpeakingFinished !== null)
- onSpeakingFinished();
- // remove this from the queue since it's done:
- if (_this.speakRequests.length) {
- _this.speakRequests[0].completed();
- _this.speakRequests.splice(0, 1);
- }
- // If there are other speak operations in the queue, process them
- if (_this.speakRequests.length) {
- _this.playNextTTS(_this.speakRequests[0], 0);
- }
- };
- var request = new SpeakRequest(chunks, lang, function (speakOp) { _this.lastOperation = speakOp; }, onSpeakingStarted, onSpeakingFinishedWrapper);
- if (this.speakRequests.length === 0) {
- this.speakRequests = [request];
- this.playNextTTS(this.speakRequests[0], 0);
- }
- else {
- this.speakRequests.push(request);
- }
- };
- BrowserSpeechSynthesizer.prototype.stopSpeaking = function () {
- if (('SpeechSynthesisUtterance' in window) === false)
- return;
- if (this.speakRequests.length) {
- if (this.audioElement)
- this.audioElement.pause();
- this.speakRequests.forEach(function (req) {
- req.abandon();
- });
- this.speakRequests = [];
- var ss = window.speechSynthesis;
- if (ss.speaking || ss.pending) {
- if (this.lastOperation)
- this.lastOperation.onend = null;
- ss.cancel();
- }
- }
- };
- ;
- BrowserSpeechSynthesizer.prototype.playNextTTS = function (requestContainer, iCurrent) {
- // lang : string, onSpeakQueued: Func, onSpeakStarted : Action, onFinishedSpeaking : Action
- var _this = this;
- var moveToNext = function () {
- _this.playNextTTS(requestContainer, iCurrent + 1);
- };
- if (iCurrent < requestContainer.speakChunks.length) {
- var current = requestContainer.speakChunks[iCurrent];
- if (typeof current === 'number') {
- setTimeout(moveToNext, current);
- }
- else {
- if (current.indexOf('http') === 0) {
- var audio = this.audioElement; // document.getElementById('player');
- audio.src = current;
- audio.onended = moveToNext;
- audio.onerror = moveToNext;
- audio.play();
- }
- else {
- var msg = new SpeechSynthesisUtterance();
- // msg.voiceURI = 'native';
- // msg.volume = 1; // 0 to 1
- // msg.rate = 1; // 0.1 to 10
- // msg.pitch = 2; //0 to 2
- msg.text = current;
- msg.lang = requestContainer.lang;
- msg.onstart = iCurrent === 0 ? requestContainer.onSpeakingStarted : null;
- msg.onend = moveToNext;
- msg.onerror = moveToNext;
- if (requestContainer.onSpeakQueued)
- requestContainer.onSpeakQueued(msg);
- window.speechSynthesis.speak(msg);
- }
- }
- }
- else {
- if (requestContainer.onSpeakingFinished)
- requestContainer.onSpeakingFinished();
- }
- };
- // process SSML markup into an array of either
- // * utterenance
- // * number which is delay in msg
- // * url which is an audio file
- BrowserSpeechSynthesizer.prototype.processNodes = function (nodes, output) {
- for (var i = 0; i < nodes.length; i++) {
- var node = nodes[i];
- switch (node.nodeName) {
- case 'p':
- this.processNodes(node.childNodes, output);
- output.push(250);
- break;
- case 'break':
- if (node.attributes.getNamedItem('strength')) {
- var strength = node.attributes.getNamedItem('strength').nodeValue;
- if (strength === 'weak') {
- // output.push(50);
- }
- else if (strength === 'medium') {
- output.push(50);
- }
- else if (strength === 'strong') {
- output.push(100);
- }
- else if (strength === 'x-strong') {
- output.push(250);
- }
- }
- else if (node.attributes.getNamedItem('time')) {
- output.push(JSON.parse(node.attributes.getNamedItem('time').value));
- }
- break;
- case 'audio':
- if (node.attributes.getNamedItem('src')) {
- output.push(node.attributes.getNamedItem('src').value);
- }
- break;
- case 'say-as':
- case 'prosody': // ToDo: handle via msg.rate
- case 'emphasis': // ToDo: can probably emulate via prosody + pitch
- case 'w':
- case 'phoneme': //
- case 'voice':
- this.processNodes(node.childNodes, output);
- break;
- default:
- // Todo: coalesce consecutive non numeric / non html entries.
- output.push(node.nodeValue);
- break;
- }
- }
- };
- return BrowserSpeechSynthesizer;
- }());
- Speech.BrowserSpeechSynthesizer = BrowserSpeechSynthesizer;
- var SpeakRequest = (function () {
- function SpeakRequest(speakChunks, lang, onSpeakQueued, onSpeakingStarted, onSpeakingFinished) {
- if (onSpeakQueued === void 0) { onSpeakQueued = null; }
- if (onSpeakingStarted === void 0) { onSpeakingStarted = null; }
- if (onSpeakingFinished === void 0) { onSpeakingFinished = null; }
- this._onSpeakQueued = null;
- this._onSpeakingStarted = null;
- this._onSpeakingFinished = null;
- this._speakChunks = [];
- this._lang = null;
- this._onSpeakQueued = onSpeakQueued;
- this._onSpeakingStarted = onSpeakingStarted;
- this._onSpeakingFinished = onSpeakingFinished;
- this._speakChunks = speakChunks;
- this._lang = lang;
- }
- SpeakRequest.prototype.abandon = function () {
- this._speakChunks = [];
- };
- SpeakRequest.prototype.completed = function () {
- this._speakChunks = [];
- };
- Object.defineProperty(SpeakRequest.prototype, "onSpeakQueued", {
- get: function () { return this._onSpeakQueued; },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(SpeakRequest.prototype, "onSpeakingStarted", {
- get: function () { return this._onSpeakingStarted; },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(SpeakRequest.prototype, "onSpeakingFinished", {
- get: function () { return this._onSpeakingFinished; },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(SpeakRequest.prototype, "speakChunks", {
- get: function () { return this._speakChunks; },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(SpeakRequest.prototype, "lang", {
- get: function () { return this._lang; },
- enumerable: true,
- configurable: true
- });
- return SpeakRequest;
- }());
-})(Speech = exports.Speech || (exports.Speech = {}));
-//# sourceMappingURL=SpeechModule.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/SpeechOptions.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var SpeechOptions = (function () {
- function SpeechOptions() {
- }
- return SpeechOptions;
-}());
-exports.SpeechOptions = SpeechOptions;
-//# sourceMappingURL=SpeechOptions.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/Store.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var tslib_1 = __webpack_require__("../../node_modules/tslib/tslib.es6.js");
-var botframework_directlinejs_1 = __webpack_require__("../../node_modules/botframework-directlinejs/built/directLine.js");
-var Strings_1 = __webpack_require__("../../node_modules/botframework-webchat/built/Strings.js");
-var SpeechModule_1 = __webpack_require__("../../node_modules/botframework-webchat/built/SpeechModule.js");
-var konsole = __webpack_require__("../../node_modules/botframework-webchat/built/Konsole.js");
-exports.sendMessage = function (text, from, locale) { return ({
- type: 'Send_Message',
- activity: {
- type: "message",
- text: text,
- from: from,
- locale: locale,
- textFormat: 'plain',
- timestamp: (new Date()).toISOString()
- }
-}); };
-exports.sendFiles = function (files, from, locale) { return ({
- type: 'Send_Message',
- activity: {
- type: "message",
- attachments: attachmentsFromFiles(files),
- from: from,
- locale: locale
- }
-}); };
-var attachmentsFromFiles = function (files) {
- var attachments = [];
- for (var i = 0, numFiles = files.length; i < numFiles; i++) {
- var file = files[i];
- attachments.push({
- contentType: file.type,
- contentUrl: window.URL.createObjectURL(file),
- name: file.name
- });
- }
- return attachments;
-};
-exports.shell = function (state, action) {
- if (state === void 0) { state = {
- input: '',
- sendTyping: false,
- listening: false,
- lastInputViaSpeech: false
- }; }
- switch (action.type) {
- case 'Update_Input':
- return tslib_1.__assign({}, state, { input: action.input, lastInputViaSpeech: action.source == "speech" });
- case 'Listening_Start':
- return tslib_1.__assign({}, state, { listening: true });
- case 'Listening_Stop':
- return tslib_1.__assign({}, state, { listening: false });
- case 'Send_Message':
- return tslib_1.__assign({}, state, { input: '' });
- case 'Set_Send_Typing':
- return tslib_1.__assign({}, state, { sendTyping: action.sendTyping });
- case 'Card_Action_Clicked':
- return tslib_1.__assign({}, state, { lastInputViaSpeech: false });
- default:
- case 'Listening_Starting':
- return state;
- }
-};
-exports.format = function (state, action) {
- if (state === void 0) { state = {
- locale: 'en-us',
- options: {
- showHeader: true
- },
- strings: Strings_1.defaultStrings,
- carouselMargin: undefined
- }; }
- switch (action.type) {
- case 'Set_Format_Options':
- return tslib_1.__assign({}, state, { options: tslib_1.__assign({}, state.options, action.options) });
- case 'Set_Locale':
- return tslib_1.__assign({}, state, { locale: action.locale, strings: Strings_1.strings(action.locale) });
- case 'Set_Measurements':
- return tslib_1.__assign({}, state, { carouselMargin: action.carouselMargin });
- default:
- return state;
- }
-};
-exports.size = function (state, action) {
- if (state === void 0) { state = {
- width: undefined,
- height: undefined
- }; }
- switch (action.type) {
- case 'Set_Size':
- return tslib_1.__assign({}, state, { width: action.width, height: action.height });
- default:
- return state;
- }
-};
-exports.connection = function (state, action) {
- if (state === void 0) { state = {
- connectionStatus: botframework_directlinejs_1.ConnectionStatus.Uninitialized,
- botConnection: undefined,
- selectedActivity: undefined,
- user: undefined,
- bot: undefined
- }; }
- switch (action.type) {
- case 'Start_Connection':
- return tslib_1.__assign({}, state, { botConnection: action.botConnection, user: action.user, bot: action.bot, selectedActivity: action.selectedActivity });
- case 'Connection_Change':
- return tslib_1.__assign({}, state, { connectionStatus: action.connectionStatus });
- default:
- return state;
- }
-};
-var copyArrayWithUpdatedItem = function (array, i, item) { return array.slice(0, i).concat([
- item
-], array.slice(i + 1)); };
-exports.history = function (state, action) {
- if (state === void 0) { state = {
- activities: [],
- clientActivityBase: Date.now().toString() + Math.random().toString().substr(1) + '.',
- clientActivityCounter: 0,
- selectedActivity: null
- }; }
- konsole.log("history action", action);
- switch (action.type) {
- case 'Receive_Sent_Message': {
- if (!action.activity.channelData || !action.activity.channelData.clientActivityId) {
- // only postBack messages don't have clientActivityId, and these shouldn't be added to the history
- return state;
- }
- var i_1 = state.activities.findIndex(function (activity) {
- return activity.channelData && activity.channelData.clientActivityId === action.activity.channelData.clientActivityId;
- });
- if (i_1 !== -1) {
- var activity_1 = state.activities[i_1];
- return tslib_1.__assign({}, state, { activities: copyArrayWithUpdatedItem(state.activities, i_1, activity_1), selectedActivity: state.selectedActivity === activity_1 ? action.activity : state.selectedActivity });
- }
- // else fall through and treat this as a new message
- }
- case 'Receive_Message':
- if (state.activities.find(function (a) { return a.id === action.activity.id; }))
- return state; // don't allow duplicate messages
- return tslib_1.__assign({}, state, { activities: state.activities.filter(function (activity) { return activity.type !== "typing"; }).concat([
- action.activity
- ], state.activities.filter(function (activity) { return activity.from.id !== action.activity.from.id && activity.type === "typing"; })) });
- case 'Send_Message':
- return tslib_1.__assign({}, state, { activities: state.activities.filter(function (activity) { return activity.type !== "typing"; }).concat([
- tslib_1.__assign({}, action.activity, { timestamp: (new Date()).toISOString(), channelData: { clientActivityId: state.clientActivityBase + state.clientActivityCounter } })
- ], state.activities.filter(function (activity) { return activity.type === "typing"; })), clientActivityCounter: state.clientActivityCounter + 1 });
- case 'Send_Message_Retry': {
- var activity_2 = state.activities.find(function (activity) {
- return activity.channelData && activity.channelData.clientActivityId === action.clientActivityId;
- });
- var newActivity_1 = activity_2.id === undefined ? activity_2 : tslib_1.__assign({}, activity_2, { id: undefined });
- return tslib_1.__assign({}, state, { activities: state.activities.filter(function (activityT) { return activityT.type !== "typing" && activityT !== activity_2; }).concat([
- newActivity_1
- ], state.activities.filter(function (activity) { return activity.type === "typing"; })), selectedActivity: state.selectedActivity === activity_2 ? newActivity_1 : state.selectedActivity });
- }
- case 'Send_Message_Succeed':
- case 'Send_Message_Fail': {
- var i_2 = state.activities.findIndex(function (activity) {
- return activity.channelData && activity.channelData.clientActivityId === action.clientActivityId;
- });
- if (i_2 === -1)
- return state;
- var activity_3 = state.activities[i_2];
- if (activity_3.id && activity_3.id != "retry")
- return state;
- var newActivity_2 = tslib_1.__assign({}, activity_3, { id: action.type === 'Send_Message_Succeed' ? action.id : null });
- return tslib_1.__assign({}, state, { activities: copyArrayWithUpdatedItem(state.activities, i_2, newActivity_2), clientActivityCounter: state.clientActivityCounter + 1, selectedActivity: state.selectedActivity === activity_3 ? newActivity_2 : state.selectedActivity });
- }
- case 'Show_Typing':
- return tslib_1.__assign({}, state, { activities: state.activities.filter(function (activity) { return activity.type !== "typing"; }).concat(state.activities.filter(function (activity) { return activity.from.id !== action.activity.from.id && activity.type === "typing"; }), [
- action.activity
- ]) });
- case 'Clear_Typing':
- return tslib_1.__assign({}, state, { activities: state.activities.filter(function (activity) { return activity.id !== action.id; }), selectedActivity: state.selectedActivity && state.selectedActivity.id === action.id ? null : state.selectedActivity });
- case 'Select_Activity':
- if (action.selectedActivity === state.selectedActivity)
- return state;
- return tslib_1.__assign({}, state, { selectedActivity: action.selectedActivity });
- case 'Take_SuggestedAction':
- var i = state.activities.findIndex(function (activity) { return activity === action.message; });
- var activity = state.activities[i];
- var newActivity = tslib_1.__assign({}, activity, { suggestedActions: undefined });
- return tslib_1.__assign({}, state, { activities: copyArrayWithUpdatedItem(state.activities, i, newActivity), selectedActivity: state.selectedActivity === activity ? newActivity : state.selectedActivity });
- default:
- return state;
- }
-};
-var nullAction = { type: null };
-var speakFromMsg = function (msg, fallbackLocale) {
- var speak = msg.speak;
- if (!speak && msg.textFormat == null || msg.textFormat == "plain")
- speak = msg.text;
- if (!speak && msg.channelData && msg.channelData.speechOutput && msg.channelData.speechOutput.speakText)
- speak = msg.channelData.speechOutput.speakText;
- if (!speak && msg.attachments && msg.attachments.length > 0)
- for (var i = 0; i < msg.attachments.length; i++) {
- var anymsg = msg;
- if (anymsg.attachments[i]["content"] && anymsg.attachments[i]["content"]["speak"]) {
- speak = anymsg.attachments[i]["content"]["speak"];
- break;
- }
- }
- return {
- type: 'Speak_SSML',
- ssml: speak,
- locale: msg.locale || fallbackLocale,
- autoListenAfterSpeak: (msg.inputHint == "expectingInput") || (msg.channelData && msg.channelData.botState == "WaitingForAnswerToQuestion"),
- };
-};
-// Epics - chain actions together with async operations
-var redux_1 = __webpack_require__("../../node_modules/redux/es/index.js");
-var Observable_1 = __webpack_require__("../../node_modules/rxjs/Observable.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/catch.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/delay.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/do.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/filter.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/map.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/merge.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/mergeMap.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/throttleTime.js");
-__webpack_require__("../../node_modules/rxjs/add/operator/takeUntil.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/bindCallback.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/empty.js");
-__webpack_require__("../../node_modules/rxjs/add/observable/of.js");
-var sendMessageEpic = function (action$, store) {
- return action$.ofType('Send_Message')
- .map(function (action) {
- var state = store.getState();
- var clientActivityId = state.history.clientActivityBase + (state.history.clientActivityCounter - 1);
- return { type: 'Send_Message_Try', clientActivityId: clientActivityId };
- });
-};
-var trySendMessageEpic = function (action$, store) {
- return action$.ofType('Send_Message_Try')
- .flatMap(function (action) {
- var state = store.getState();
- var clientActivityId = action.clientActivityId;
- var activity = state.history.activities.find(function (activity) { return activity.channelData && activity.channelData.clientActivityId === clientActivityId; });
- if (!activity) {
- konsole.log("trySendMessage: activity not found");
- return Observable_1.Observable.empty();
- }
- if (state.history.clientActivityCounter == 1) {
- var capabilities = {
- type: 'ClientCapabilities',
- requiresBotState: true,
- supportsTts: true,
- supportsListening: true,
- };
- activity.entities = activity.entities == null ? [capabilities] : activity.entities.concat([capabilities]);
- }
- return state.connection.botConnection.postActivity(activity)
- .map(function (id) { return ({ type: 'Send_Message_Succeed', clientActivityId: clientActivityId, id: id }); })
- .catch(function (error) { return Observable_1.Observable.of({ type: 'Send_Message_Fail', clientActivityId: clientActivityId }); });
- });
-};
-var speakObservable = Observable_1.Observable.bindCallback(SpeechModule_1.Speech.SpeechSynthesizer.speak);
-var speakSSMLEpic = function (action$, store) {
- return action$.ofType('Speak_SSML')
- .filter(function (action) { return action.ssml; })
- .mergeMap(function (action) {
- var onSpeakingStarted = null;
- var onSpeakingFinished = function () { return nullAction; };
- if (action.autoListenAfterSpeak) {
- onSpeakingStarted = function () { return SpeechModule_1.Speech.SpeechRecognizer.warmup(); };
- onSpeakingFinished = function () { return ({ type: 'Listening_Starting' }); };
- }
- var call$ = speakObservable(action.ssml, action.locale, onSpeakingStarted);
- return call$.map(onSpeakingFinished)
- .catch(function (error) { return Observable_1.Observable.of(nullAction); });
- })
- .merge(action$.ofType('Speak_SSML').map(function (_) { return ({ type: 'Listening_Stop' }); }));
-};
-var speakOnMessageReceivedEpic = function (action$, store) {
- return action$.ofType('Receive_Message')
- .filter(function (action) { return action.activity && store.getState().shell.lastInputViaSpeech; })
- .map(function (action) { return speakFromMsg(action.activity, store.getState().format.locale); });
-};
-var stopSpeakingEpic = function (action$) {
- return action$.ofType('Update_Input', 'Listening_Starting', 'Send_Message', 'Card_Action_Clicked', 'Stop_Speaking')
- .do(SpeechModule_1.Speech.SpeechSynthesizer.stopSpeaking)
- .map(function (_) { return nullAction; });
-};
-var stopListeningEpic = function (action$) {
- return action$.ofType('Listening_Stop', 'Card_Action_Clicked')
- .do(SpeechModule_1.Speech.SpeechRecognizer.stopRecognizing)
- .map(function (_) { return nullAction; });
-};
-var startListeningEpic = function (action$, store) {
- return action$.ofType('Listening_Starting')
- .do(function (action) {
- var locale = store.getState().format.locale;
- var onIntermediateResult = function (srText) { store.dispatch({ type: 'Update_Input', input: srText, source: "speech" }); };
- var onFinalResult = function (srText) {
- srText = srText.replace(/^[.\s]+|[.\s]+$/g, "");
- onIntermediateResult(srText);
- store.dispatch({ type: 'Listening_Stop' });
- store.dispatch(exports.sendMessage(srText, store.getState().connection.user, locale));
- };
- var onAudioStreamStart = function () { store.dispatch({ type: 'Listening_Start' }); };
- var onRecognitionFailed = function () { store.dispatch({ type: 'Listening_Stop' }); };
- SpeechModule_1.Speech.SpeechRecognizer.startRecognizing(locale, onIntermediateResult, onFinalResult, onAudioStreamStart, onRecognitionFailed);
- })
- .map(function (_) { return nullAction; });
-};
-var listeningSilenceTimeoutEpic = function (action$, store) {
- var cancelMessages$ = action$.ofType('Update_Input', 'Listening_Stop');
- return action$.ofType('Listening_Start')
- .mergeMap(function (action) {
- return Observable_1.Observable.of(({ type: 'Listening_Stop' }))
- .delay(5000)
- .takeUntil(cancelMessages$);
- });
-};
-var retrySendMessageEpic = function (action$) {
- return action$.ofType('Send_Message_Retry')
- .map(function (action) { return ({ type: 'Send_Message_Try', clientActivityId: action.clientActivityId }); });
-};
-var updateSelectedActivityEpic = function (action$, store) {
- return action$.ofType('Send_Message_Succeed', 'Send_Message_Fail', 'Show_Typing', 'Clear_Typing')
- .map(function (action) {
- var state = store.getState();
- if (state.connection.selectedActivity)
- state.connection.selectedActivity.next({ activity: state.history.selectedActivity });
- return nullAction;
- });
-};
-var showTypingEpic = function (action$) {
- return action$.ofType('Show_Typing')
- .delay(3000)
- .map(function (action) { return ({ type: 'Clear_Typing', id: action.activity.id }); });
-};
-var sendTypingEpic = function (action$, store) {
- return action$.ofType('Update_Input')
- .map(function (_) { return store.getState(); })
- .filter(function (state) { return state.shell.sendTyping; })
- .throttleTime(3000)
- .do(function (_) { return konsole.log("sending typing"); })
- .flatMap(function (state) {
- return state.connection.botConnection.postActivity({
- type: 'typing',
- from: state.connection.user
- })
- .map(function (_) { return nullAction; })
- .catch(function (error) { return Observable_1.Observable.of(nullAction); });
- });
-};
-// Now we put it all together into a store with middleware
-var redux_2 = __webpack_require__("../../node_modules/redux/es/index.js");
-var redux_observable_1 = __webpack_require__("../../node_modules/redux-observable/lib/index.js");
-exports.createStore = function () {
- return redux_2.createStore(redux_2.combineReducers({
- shell: exports.shell,
- format: exports.format,
- size: exports.size,
- connection: exports.connection,
- history: exports.history
- }), redux_1.applyMiddleware(redux_observable_1.createEpicMiddleware(redux_observable_1.combineEpics(updateSelectedActivityEpic, sendMessageEpic, trySendMessageEpic, retrySendMessageEpic, showTypingEpic, sendTypingEpic, speakSSMLEpic, speakOnMessageReceivedEpic, startListeningEpic, stopListeningEpic, stopSpeakingEpic, listeningSilenceTimeoutEpic))));
-};
-//# sourceMappingURL=Store.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/Strings.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var localizedStrings = {
- 'en-us': {
- title: "Chat",
- send: "Send",
- unknownFile: "[File of type '%1']",
- unknownCard: "[Unknown Card '%1']",
- receiptVat: "VAT",
- receiptTax: "Tax",
- receiptTotal: "Total",
- messageRetry: "retry",
- messageFailed: "couldn't send",
- messageSending: "sending",
- timeSent: " at %1",
- consolePlaceholder: "Type your message...",
- listeningIndicator: "Listening...",
- uploadFile: "Upload file",
- speak: "Speak"
- },
- 'ja-jp': {
- title: "チャット",
- send: "送信",
- unknownFile: "[ファイルタイプ '%1']",
- unknownCard: "[不明なカード '%1']",
- receiptVat: "消費税",
- receiptTax: "税",
- receiptTotal: "合計",
- messageRetry: "再送",
- messageFailed: "送信できませんでした。",
- messageSending: "送信中",
- timeSent: " %1",
- consolePlaceholder: "メッセージを入力してください...",
- listeningIndicator: "聴いてます...",
- uploadFile: "",
- speak: ""
- },
- 'nb-no': {
- title: "Chat",
- send: "Send",
- unknownFile: "[Fil av typen '%1']",
- unknownCard: "[Ukjent Kort '%1']",
- receiptVat: "MVA",
- receiptTax: "Skatt",
- receiptTotal: "Totalt",
- messageRetry: "prøv igjen",
- messageFailed: "kunne ikke sende",
- messageSending: "sender",
- timeSent: " %1",
- consolePlaceholder: "Skriv inn melding...",
- listeningIndicator: "Lytter...",
- uploadFile: "",
- speak: ""
- },
- 'da-dk': {
- title: "Chat",
- send: "Send",
- unknownFile: "[Fil af typen '%1']",
- unknownCard: "[Ukendt kort '%1']",
- receiptVat: "Moms",
- receiptTax: "Skat",
- receiptTotal: "Total",
- messageRetry: "prøv igen",
- messageFailed: "ikke sendt",
- messageSending: "sender",
- timeSent: " kl %1",
- consolePlaceholder: "Skriv din besked...",
- listeningIndicator: "Lytter...",
- uploadFile: "",
- speak: ""
- },
- 'de-de': {
- title: "Chat",
- send: "Senden",
- unknownFile: "[Datei vom Typ '%1']",
- unknownCard: "[Unbekannte Card '%1']",
- receiptVat: "VAT",
- receiptTax: "MwSt.",
- receiptTotal: "Gesamtbetrag",
- messageRetry: "wiederholen",
- messageFailed: "konnte nicht senden",
- messageSending: "sendet",
- timeSent: " am %1",
- consolePlaceholder: "Verfasse eine Nachricht...",
- listeningIndicator: "Hören...",
- uploadFile: "",
- speak: ""
- },
- 'pl-pl': {
- title: "Chat",
- send: "Wyślij",
- unknownFile: "[Plik typu '%1']",
- unknownCard: "[Nieznana karta '%1']",
- receiptVat: "VAT",
- receiptTax: "Podatek",
- receiptTotal: "Razem",
- messageRetry: "wyślij ponownie",
- messageFailed: "wysłanie nieudane",
- messageSending: "wysyłanie",
- timeSent: " o %1",
- consolePlaceholder: "Wpisz swoją wiadomość...",
- listeningIndicator: "Słuchający...",
- uploadFile: "",
- speak: ""
- },
- 'ru-ru': {
- title: "Чат",
- send: "Отправить",
- unknownFile: "[Неизвестный тип '%1']",
- unknownCard: "[Неизвестная карта '%1']",
- receiptVat: "VAT",
- receiptTax: "Налог",
- receiptTotal: "Итого",
- messageRetry: "повторить",
- messageFailed: "не удалось отправить",
- messageSending: "отправка",
- timeSent: " в %1",
- consolePlaceholder: "Введите ваше сообщение...",
- listeningIndicator: "прослушивание...",
- uploadFile: "",
- speak: ""
- },
- 'nl-nl': {
- title: "Chat",
- send: "Verstuur",
- unknownFile: "[Bestand van het type '%1']",
- unknownCard: "[Onbekende kaart '%1']",
- receiptVat: "VAT",
- receiptTax: "BTW",
- receiptTotal: "Totaal",
- messageRetry: "opnieuw",
- messageFailed: "versturen mislukt",
- messageSending: "versturen",
- timeSent: " om %1",
- consolePlaceholder: "Typ je bericht...",
- listeningIndicator: "het luisteren...",
- uploadFile: "",
- speak: ""
- },
- 'lv-lv': {
- title: "Tērzēšana",
- send: "Sūtīt",
- unknownFile: "[Nezināms tips '%1']",
- unknownCard: "[Nezināma kartīte '%1']",
- receiptVat: "VAT",
- receiptTax: "Nodoklis",
- receiptTotal: "Kopsumma",
- messageRetry: "Mēģināt vēlreiz",
- messageFailed: "Neizdevās nosūtīt",
- messageSending: "Nosūtīšana",
- timeSent: " %1",
- consolePlaceholder: "Ierakstiet savu ziņu...",
- listeningIndicator: "Klausoties...",
- uploadFile: "",
- speak: ""
- },
- 'pt-br': {
- title: "Bate-papo",
- send: "Enviar",
- unknownFile: "[Arquivo do tipo '%1']",
- unknownCard: "[Cartão desconhecido '%1']",
- receiptVat: "VAT",
- receiptTax: "Imposto",
- receiptTotal: "Total",
- messageRetry: "repetir",
- messageFailed: "não pude enviar",
- messageSending: "enviando",
- timeSent: " às %1",
- consolePlaceholder: "Digite sua mensagem...",
- listeningIndicator: "Ouvindo...",
- uploadFile: "",
- speak: ""
- },
- 'fr-fr': {
- title: "Chat",
- send: "Envoyer",
- unknownFile: "[Fichier de type '%1']",
- unknownCard: "[Carte inconnue '%1']",
- receiptVat: "TVA",
- receiptTax: "Taxe",
- receiptTotal: "Total",
- messageRetry: "reéssayer",
- messageFailed: "envoi impossible",
- messageSending: "envoi",
- timeSent: " à %1",
- consolePlaceholder: "Écrivez votre message...",
- listeningIndicator: "Écoute...",
- uploadFile: "",
- speak: ""
- },
- 'es-es': {
- title: "Chat",
- send: "Enviar",
- unknownFile: "[Archivo de tipo '%1']",
- unknownCard: "[Tarjeta desconocida '%1']",
- receiptVat: "IVA",
- receiptTax: "Impuestos",
- receiptTotal: "Total",
- messageRetry: "reintentar",
- messageFailed: "no enviado",
- messageSending: "enviando",
- timeSent: " a las %1",
- consolePlaceholder: "Escribe tu mensaje...",
- listeningIndicator: "Escuchando...",
- uploadFile: "",
- speak: ""
- },
- 'el-gr': {
- title: "Συνομιλία",
- send: "Αποστολή",
- unknownFile: "[Αρχείο τύπου '%1']",
- unknownCard: "[Αγνωστη Κάρτα '%1']",
- receiptVat: "VAT",
- receiptTax: "ΦΠΑ",
- receiptTotal: "Σύνολο",
- messageRetry: "δοκιμή",
- messageFailed: "αποτυχία",
- messageSending: "αποστολή",
- timeSent: " την %1",
- consolePlaceholder: "Πληκτρολόγηση μηνύματος...",
- listeningIndicator: "Ακούγοντας...",
- uploadFile: "",
- speak: ""
- },
- 'it-it': {
- title: "Chat",
- send: "Invia",
- unknownFile: "[File di tipo '%1']",
- unknownCard: "[Card sconosciuta '%1']",
- receiptVat: "VAT",
- receiptTax: "Tasse",
- receiptTotal: "Totale",
- messageRetry: "riprova",
- messageFailed: "impossibile inviare",
- messageSending: "invio",
- timeSent: " %1",
- consolePlaceholder: "Scrivi il tuo messaggio...",
- listeningIndicator: "Ascoltando...",
- uploadFile: "",
- speak: ""
- },
- 'zh-hans': {
- title: "聊天",
- send: "发送",
- unknownFile: "[类型为'%1'的文件]",
- unknownCard: "[未知的'%1'卡片]",
- receiptVat: "VAT",
- receiptTax: "税",
- receiptTotal: "共计",
- messageRetry: "重试",
- messageFailed: "无法发送",
- messageSending: "正在发送",
- timeSent: " 用时 %1",
- consolePlaceholder: "输入你的消息...",
- listeningIndicator: "正在倾听...",
- uploadFile: "",
- speak: ""
- },
- 'zh-hant': {
- title: "聊天",
- send: "發送",
- unknownFile: "[類型為'%1'的文件]",
- unknownCard: "[未知的'%1'卡片]",
- receiptVat: "消費稅",
- receiptTax: "税",
- receiptTotal: "總共",
- messageRetry: "重試",
- messageFailed: "無法發送",
- messageSending: "正在發送",
- timeSent: " 於 %1",
- consolePlaceholder: "輸入你的訊息...",
- listeningIndicator: "正在聆聽...",
- uploadFile: "上載檔案",
- speak: "發言"
- },
- 'zh-yue': {
- title: "傾偈",
- send: "傳送",
- unknownFile: "[類型係'%1'嘅文件]",
- unknownCard: "[唔知'%1'係咩卡片]",
- receiptVat: "消費稅",
- receiptTax: "税",
- receiptTotal: "總共",
- messageRetry: "再嚟一次",
- messageFailed: "傳送唔倒",
- messageSending: "而家傳送緊",
- timeSent: " 喺 %1",
- consolePlaceholder: "輸入你嘅訊息...",
- listeningIndicator: "聽緊你講嘢...",
- uploadFile: "上載檔案",
- speak: "講嘢"
- },
- 'cs-cz': {
- title: "Chat",
- send: "Odeslat",
- unknownFile: "[Soubor typu '%1']",
- unknownCard: "[Neznámá karta '%1']",
- receiptVat: "DPH",
- receiptTax: "Daň z prod.",
- receiptTotal: "Celkem",
- messageRetry: "opakovat",
- messageFailed: "nepodařilo se odeslat",
- messageSending: "Odesílání",
- timeSent: " v %1",
- consolePlaceholder: "Napište svou zprávu...",
- listeningIndicator: "Poslouchám...",
- uploadFile: "",
- speak: ""
- },
- 'ko-kr': {
- title: "채팅",
- send: "전송",
- unknownFile: "[파일 형식 '%1']",
- unknownCard: "[알수없는 타입의 카드 '%1']",
- receiptVat: "부가세",
- receiptTax: "세액",
- receiptTotal: "합계",
- messageRetry: "재전송",
- messageFailed: "전송할 수 없습니다",
- messageSending: "전송중",
- timeSent: " %1",
- consolePlaceholder: "메세지를 입력하세요...",
- listeningIndicator: "수신중...",
- uploadFile: "",
- speak: ""
- }
-};
-exports.defaultStrings = localizedStrings['en-us'];
-// Returns strings using the "best match available"" locale
-// e.g. if 'en-us' is the only supported English locale, then
-// strings('en') should return localizedStrings('en-us')
-exports.strings = function (locale) {
- if (locale.startsWith('da'))
- locale = 'da-dk';
- else if (locale.startsWith('de'))
- locale = 'de-de';
- else if (locale.startsWith('no') || locale.startsWith('nb') || locale.startsWith('nn'))
- locale = 'nb-no';
- else if (locale.startsWith('pl'))
- locale = 'pl-pl';
- else if (locale.startsWith('ru'))
- locale = 'ru-ru';
- else if (locale.startsWith('nl'))
- locale = 'nl-nl';
- else if (locale.startsWith('lv'))
- locale = 'lv-lv';
- else if (locale.startsWith('pt'))
- locale = 'pt-br';
- else if (locale.startsWith('fr'))
- locale = 'fr-fr';
- else if (locale.startsWith('es'))
- locale = 'es-es';
- else if (locale.startsWith('el'))
- locale = 'el-gr';
- else if (locale.startsWith('it'))
- locale = 'it-it';
- else if (locale === 'zh-hant' || locale === 'zh-hk' || locale === 'zh-mo' || locale === 'zh-tw')
- locale = 'zh-hant';
- else if (locale.startsWith('zh'))
- locale = 'zh-hans';
- else if (locale.startsWith('cs'))
- locale = 'cs-cz';
- else if (locale.startsWith('ko'))
- locale = 'ko-kr';
- else if (locale.startsWith('ja'))
- locale = 'ja-jp';
- else if (locale in localizedStrings === false)
- locale = 'en-us';
- return localizedStrings[locale];
-};
-//# sourceMappingURL=Strings.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/built/getTabIndex.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", { value: true });
-var IE_FOCUSABLE_LIST = ['a', 'body', 'button', 'frame', 'iframe', 'img', 'input', 'isindex', 'object', 'select', 'textarea'];
-var IS_FIREFOX = /Firefox\//i.test(navigator.userAgent);
-var IS_IE = /Trident\//i.test(navigator.userAgent);
-function getTabIndex(element) {
- var tabIndex = element.tabIndex;
- if (IS_IE) {
- var tabIndexAttribute = element.attributes.getNamedItem('tabindex');
- if (!tabIndexAttribute || !tabIndexAttribute.specified) {
- return ~IE_FOCUSABLE_LIST.indexOf(element.nodeName.toLowerCase()) ? 0 : null;
- }
- }
- else if (!~tabIndex) {
- var attr = element.getAttribute('tabindex');
- if (attr === null || (attr === '' && !IS_FIREFOX)) {
- return null;
- }
- }
- return tabIndex;
-}
-exports.getTabIndex = getTabIndex;
-;
-//# sourceMappingURL=getTabIndex.js.map
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_a-function.js":
-/***/ (function(module, exports) {
-
-module.exports = function(it){
- if(typeof it != 'function')throw TypeError(it + ' is not a function!');
- return it;
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_add-to-unscopables.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// 22.1.3.31 Array.prototype[@@unscopables]
-var UNSCOPABLES = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_wks.js")('unscopables')
- , ArrayProto = Array.prototype;
-if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_hide.js")(ArrayProto, UNSCOPABLES, {});
-module.exports = function(key){
- ArrayProto[UNSCOPABLES][key] = true;
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_an-object.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-var isObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js");
-module.exports = function(it){
- if(!isObject(it))throw TypeError(it + ' is not an object!');
- return it;
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-methods.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// 0 -> Array#forEach
-// 1 -> Array#map
-// 2 -> Array#filter
-// 3 -> Array#some
-// 4 -> Array#every
-// 5 -> Array#find
-// 6 -> Array#findIndex
-var ctx = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_ctx.js")
- , IObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_iobject.js")
- , toObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-object.js")
- , toLength = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-length.js")
- , asc = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-species-create.js");
-module.exports = function(TYPE, $create){
- var IS_MAP = TYPE == 1
- , IS_FILTER = TYPE == 2
- , IS_SOME = TYPE == 3
- , IS_EVERY = TYPE == 4
- , IS_FIND_INDEX = TYPE == 6
- , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
- , create = $create || asc;
- return function($this, callbackfn, that){
- var O = toObject($this)
- , self = IObject(O)
- , f = ctx(callbackfn, that, 3)
- , length = toLength(self.length)
- , index = 0
- , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
- , val, res;
- for(;length > index; index++)if(NO_HOLES || index in self){
- val = self[index];
- res = f(val, index, O);
- if(TYPE){
- if(IS_MAP)result[index] = res; // map
- else if(res)switch(TYPE){
- case 3: return true; // some
- case 5: return val; // find
- case 6: return index; // findIndex
- case 2: result.push(val); // filter
- } else if(IS_EVERY)return false; // every
- }
- }
- return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
- };
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-species-constructor.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-var isObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js")
- , isArray = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-array.js")
- , SPECIES = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_wks.js")('species');
-
-module.exports = function(original){
- var C;
- if(isArray(original)){
- C = original.constructor;
- // cross-realm fallback
- if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
- if(isObject(C)){
- C = C[SPECIES];
- if(C === null)C = undefined;
- }
- } return C === undefined ? Array : C;
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-species-create.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
-var speciesConstructor = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-species-constructor.js");
-
-module.exports = function(original, length){
- return new (speciesConstructor(original))(length);
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_cof.js":
-/***/ (function(module, exports) {
-
-var toString = {}.toString;
-
-module.exports = function(it){
- return toString.call(it).slice(8, -1);
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_core.js":
-/***/ (function(module, exports) {
-
-var core = module.exports = {version: '2.4.0'};
-if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_ctx.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// optional / simple context binding
-var aFunction = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_a-function.js");
-module.exports = function(fn, that, length){
- aFunction(fn);
- if(that === undefined)return fn;
- switch(length){
- case 1: return function(a){
- return fn.call(that, a);
- };
- case 2: return function(a, b){
- return fn.call(that, a, b);
- };
- case 3: return function(a, b, c){
- return fn.call(that, a, b, c);
- };
- }
- return function(/* ...args */){
- return fn.apply(that, arguments);
- };
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_defined.js":
-/***/ (function(module, exports) {
-
-// 7.2.1 RequireObjectCoercible(argument)
-module.exports = function(it){
- if(it == undefined)throw TypeError("Can't call method on " + it);
- return it;
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_descriptors.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// Thank's IE8 for his funny defineProperty
-module.exports = !__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_fails.js")(function(){
- return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
-});
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_dom-create.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-var isObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js")
- , document = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js").document
- // in old IE typeof document.createElement is 'object'
- , is = isObject(document) && isObject(document.createElement);
-module.exports = function(it){
- return is ? document.createElement(it) : {};
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_export.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-var global = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js")
- , core = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_core.js")
- , hide = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_hide.js")
- , redefine = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_redefine.js")
- , ctx = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_ctx.js")
- , PROTOTYPE = 'prototype';
-
-var $export = function(type, name, source){
- var IS_FORCED = type & $export.F
- , IS_GLOBAL = type & $export.G
- , IS_STATIC = type & $export.S
- , IS_PROTO = type & $export.P
- , IS_BIND = type & $export.B
- , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
- , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
- , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
- , key, own, out, exp;
- if(IS_GLOBAL)source = name;
- for(key in source){
- // contains in native
- own = !IS_FORCED && target && target[key] !== undefined;
- // export native or passed
- out = (own ? target : source)[key];
- // bind timers to global for call from export context
- exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- // extend global
- if(target)redefine(target, key, out, type & $export.U);
- // export
- if(exports[key] != out)hide(exports, key, exp);
- if(IS_PROTO && expProto[key] != out)expProto[key] = out;
- }
-};
-global.core = core;
-// type bitmap
-$export.F = 1; // forced
-$export.G = 2; // global
-$export.S = 4; // static
-$export.P = 8; // proto
-$export.B = 16; // bind
-$export.W = 32; // wrap
-$export.U = 64; // safe
-$export.R = 128; // real proto method for `library`
-module.exports = $export;
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_fails-is-regexp.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-var MATCH = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_wks.js")('match');
-module.exports = function(KEY){
- var re = /./;
- try {
- '/./'[KEY](re);
- } catch(e){
- try {
- re[MATCH] = false;
- return !'/./'[KEY](re);
- } catch(f){ /* empty */ }
- } return true;
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_fails.js":
-/***/ (function(module, exports) {
-
-module.exports = function(exec){
- try {
- return !!exec();
- } catch(e){
- return true;
- }
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js":
-/***/ (function(module, exports) {
-
-// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
-var global = module.exports = typeof window != 'undefined' && window.Math == Math
- ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
-if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_has.js":
-/***/ (function(module, exports) {
-
-var hasOwnProperty = {}.hasOwnProperty;
-module.exports = function(it, key){
- return hasOwnProperty.call(it, key);
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_hide.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-var dP = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_object-dp.js")
- , createDesc = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_property-desc.js");
-module.exports = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_descriptors.js") ? function(object, key, value){
- return dP.f(object, key, createDesc(1, value));
-} : function(object, key, value){
- object[key] = value;
- return object;
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_ie8-dom-define.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-module.exports = !__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_descriptors.js") && !__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_fails.js")(function(){
- return Object.defineProperty(__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_dom-create.js")('div'), 'a', {get: function(){ return 7; }}).a != 7;
-});
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_iobject.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// fallback for non-array-like ES3 and non-enumerable old V8 strings
-var cof = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_cof.js");
-module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
- return cof(it) == 'String' ? it.split('') : Object(it);
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-array.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// 7.2.2 IsArray(argument)
-var cof = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_cof.js");
-module.exports = Array.isArray || function isArray(arg){
- return cof(arg) == 'Array';
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js":
-/***/ (function(module, exports) {
-
-module.exports = function(it){
- return typeof it === 'object' ? it !== null : typeof it === 'function';
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-regexp.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// 7.2.8 IsRegExp(argument)
-var isObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js")
- , cof = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_cof.js")
- , MATCH = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_wks.js")('match');
-module.exports = function(it){
- var isRegExp;
- return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_object-dp.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-var anObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_an-object.js")
- , IE8_DOM_DEFINE = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_ie8-dom-define.js")
- , toPrimitive = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-primitive.js")
- , dP = Object.defineProperty;
-
-exports.f = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_descriptors.js") ? Object.defineProperty : function defineProperty(O, P, Attributes){
- anObject(O);
- P = toPrimitive(P, true);
- anObject(Attributes);
- if(IE8_DOM_DEFINE)try {
- return dP(O, P, Attributes);
- } catch(e){ /* empty */ }
- if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
- if('value' in Attributes)O[P] = Attributes.value;
- return O;
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_property-desc.js":
-/***/ (function(module, exports) {
-
-module.exports = function(bitmap, value){
- return {
- enumerable : !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable : !(bitmap & 4),
- value : value
- };
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_redefine.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-var global = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js")
- , hide = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_hide.js")
- , has = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_has.js")
- , SRC = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_uid.js")('src')
- , TO_STRING = 'toString'
- , $toString = Function[TO_STRING]
- , TPL = ('' + $toString).split(TO_STRING);
-
-__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_core.js").inspectSource = function(it){
- return $toString.call(it);
-};
-
-(module.exports = function(O, key, val, safe){
- var isFunction = typeof val == 'function';
- if(isFunction)has(val, 'name') || hide(val, 'name', key);
- if(O[key] === val)return;
- if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
- if(O === global){
- O[key] = val;
- } else {
- if(!safe){
- delete O[key];
- hide(O, key, val);
- } else {
- if(O[key])O[key] = val;
- else hide(O, key, val);
- }
- }
-// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
-})(Function.prototype, TO_STRING, function toString(){
- return typeof this == 'function' && this[SRC] || $toString.call(this);
-});
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_shared.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-var global = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js")
- , SHARED = '__core-js_shared__'
- , store = global[SHARED] || (global[SHARED] = {});
-module.exports = function(key){
- return store[key] || (store[key] = {});
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_string-context.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// helper for String#{startsWith, endsWith, includes}
-var isRegExp = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-regexp.js")
- , defined = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_defined.js");
-
-module.exports = function(that, searchString, NAME){
- if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!");
- return String(defined(that));
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-integer.js":
-/***/ (function(module, exports) {
-
-// 7.1.4 ToInteger
-var ceil = Math.ceil
- , floor = Math.floor;
-module.exports = function(it){
- return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-length.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// 7.1.15 ToLength
-var toInteger = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-integer.js")
- , min = Math.min;
-module.exports = function(it){
- return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-object.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// 7.1.13 ToObject(argument)
-var defined = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_defined.js");
-module.exports = function(it){
- return Object(defined(it));
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-primitive.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-// 7.1.1 ToPrimitive(input [, PreferredType])
-var isObject = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_is-object.js");
-// instead of the ES6 spec version, we didn't implement @@toPrimitive case
-// and the second argument - flag - preferred type is a string
-module.exports = function(it, S){
- if(!isObject(it))return it;
- var fn, val;
- if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
- if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
- throw TypeError("Can't convert object to primitive value");
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_uid.js":
-/***/ (function(module, exports) {
-
-var id = 0
- , px = Math.random();
-module.exports = function(key){
- return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
-};
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/_wks.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-var store = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_shared.js")('wks')
- , uid = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_uid.js")
- , Symbol = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_global.js").Symbol
- , USE_SYMBOL = typeof Symbol == 'function';
-
-var $exports = module.exports = function(name){
- return store[name] || (store[name] =
- USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
-};
-
-$exports.store = store;
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.array.find-index.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
-var $export = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_export.js")
- , $find = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-methods.js")(6)
- , KEY = 'findIndex'
- , forced = true;
-// Shouldn't skip holes
-if(KEY in [])Array(1)[KEY](function(){ forced = false; });
-$export($export.P + $export.F * forced, 'Array', {
- findIndex: function findIndex(callbackfn/*, that = undefined */){
- return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
-__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_add-to-unscopables.js")(KEY);
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.array.find.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
-var $export = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_export.js")
- , $find = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_array-methods.js")(5)
- , KEY = 'find'
- , forced = true;
-// Shouldn't skip holes
-if(KEY in [])Array(1)[KEY](function(){ forced = false; });
-$export($export.P + $export.F * forced, 'Array', {
- find: function find(callbackfn/*, that = undefined */){
- return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
- }
-});
-__webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_add-to-unscopables.js")(KEY);
-
-/***/ }),
-
-/***/ "../../node_modules/botframework-webchat/node_modules/core-js/modules/es6.string.starts-with.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
-
-var $export = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_export.js")
- , toLength = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_to-length.js")
- , context = __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_string-context.js")
- , STARTS_WITH = 'startsWith'
- , $startsWith = ''[STARTS_WITH];
-
-$export($export.P + $export.F * __webpack_require__("../../node_modules/botframework-webchat/node_modules/core-js/modules/_fails-is-regexp.js")(STARTS_WITH), 'String', {
- startsWith: function startsWith(searchString /*, position = 0 */){
- var that = context(this, searchString, STARTS_WITH)
- , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length))
- , search = String(searchString);
- return $startsWith
- ? $startsWith.call(that, search, index)
- : that.slice(index, index + search.length) === search;
- }
-});
-
-/***/ }),
-
-/***/ "../../node_modules/create-react-class/factory.js":
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-/* WEBPACK VAR INJECTION */(function(process) {/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- *
- */
-
-
-
-var _assign = __webpack_require__("../../node_modules/object-assign/index.js");
-
-var emptyObject = __webpack_require__("../../node_modules/fbjs/lib/emptyObject.js");
-var _invariant = __webpack_require__("../../node_modules/fbjs/lib/invariant.js");
-
-if (process.env.NODE_ENV !== 'production') {
- var warning = __webpack_require__("../../node_modules/fbjs/lib/warning.js");
-}
-
-var MIXINS_KEY = 'mixins';
-
-// Helper function to allow the creation of anonymous functions which do not
-// have .name set to the name of the variable being assigned to.
-function identity(fn) {
- return fn;
-}
-
-var ReactPropTypeLocationNames;
-if (process.env.NODE_ENV !== 'production') {
- ReactPropTypeLocationNames = {
- prop: 'prop',
- context: 'context',
- childContext: 'child context'
- };
-} else {
- ReactPropTypeLocationNames = {};
-}
-
-function factory(ReactComponent, isValidElement, ReactNoopUpdateQueue) {
- /**
- * Policies that describe methods in `ReactClassInterface`.
- */
-
- var injectedMixins = [];
-
- /**
- * Composite components are higher-level components that compose other composite
- * or host components.
- *
- * To create a new type of `ReactClass`, pass a specification of
- * your new class to `React.createClass`. The only requirement of your class
- * specification is that you implement a `render` method.
- *
- * var MyComponent = React.createClass({
- * render: function() {
- * return
Hello World
;
- * }
- * });
- *
- * The class specification supports a specific protocol of methods that have
- * special meaning (e.g. `render`). See `ReactClassInterface` for
- * more the comprehensive protocol. Any other properties and methods in the
- * class specification will be available on the prototype.
- *
- * @interface ReactClassInterface
- * @internal
- */
- var ReactClassInterface = {
- /**
- * An array of Mixin objects to include when defining your component.
- *
- * @type {array}
- * @optional
- */
- mixins: 'DEFINE_MANY',
-
- /**
- * An object containing properties and methods that should be defined on
- * the component's constructor instead of its prototype (static methods).
- *
- * @type {object}
- * @optional
- */
- statics: 'DEFINE_MANY',
-
- /**
- * Definition of prop types for this component.
- *
- * @type {object}
- * @optional
- */
- propTypes: 'DEFINE_MANY',
-
- /**
- * Definition of context types for this component.
- *
- * @type {object}
- * @optional
- */
- contextTypes: 'DEFINE_MANY',
-
- /**
- * Definition of context types this component sets for its children.
- *
- * @type {object}
- * @optional
- */
- childContextTypes: 'DEFINE_MANY',
-
- // ==== Definition methods ====
-
- /**
- * Invoked when the component is mounted. Values in the mapping will be set on
- * `this.props` if that prop is not specified (i.e. using an `in` check).
- *
- * This method is invoked before `getInitialState` and therefore cannot rely
- * on `this.state` or use `this.setState`.
- *
- * @return {object}
- * @optional
- */
- getDefaultProps: 'DEFINE_MANY_MERGED',
-
- /**
- * Invoked once before the component is mounted. The return value will be used
- * as the initial value of `this.state`.
- *
- * getInitialState: function() {
- * return {
- * isOn: false,
- * fooBaz: new BazFoo()
- * }
- * }
- *
- * @return {object}
- * @optional
- */
- getInitialState: 'DEFINE_MANY_MERGED',
-
- /**
- * @return {object}
- * @optional
- */
- getChildContext: 'DEFINE_MANY_MERGED',
-
- /**
- * Uses props from `this.props` and state from `this.state` to render the
- * structure of the component.
- *
- * No guarantees are made about when or how often this method is invoked, so
- * it must not have side effects.
- *
- * render: function() {
- * var name = this.props.name;
- * return