Changeset 1883416
- Timestamp:
- 05/29/2018 02:48:58 PM (8 years ago)
- Location:
- conversation-watson
- Files:
-
- 5 deleted
- 6 edited
- 8 copied
-
tags/0.7.0 (copied) (copied from conversation-watson/trunk)
-
tags/0.7.0/Readme.txt (deleted)
-
tags/0.7.0/app.js (copied) (copied from conversation-watson/trunk/app.js) (5 diffs)
-
tags/0.7.0/css/chatbox.css (copied) (copied from conversation-watson/trunk/css/chatbox.css) (2 diffs)
-
tags/0.7.0/css/settings.css (copied) (copied from conversation-watson/trunk/css/settings.css) (1 diff)
-
tags/0.7.0/img/context_var.jpg (copied) (copied from conversation-watson/trunk/img/context_var.jpg)
-
tags/0.7.0/includes/api.php (copied) (copied from conversation-watson/trunk/includes/api.php)
-
tags/0.7.0/includes/frontend.php (copied) (copied from conversation-watson/trunk/includes/frontend.php) (3 diffs)
-
tags/0.7.0/includes/settings.js (deleted)
-
tags/0.7.0/includes/settings.php (deleted)
-
tags/0.7.0/watson.php (copied) (copied from conversation-watson/trunk/watson.php) (2 diffs)
-
trunk/Readme.txt (modified) (3 diffs)
-
trunk/app.js (modified) (5 diffs)
-
trunk/css/chatbox.css (modified) (2 diffs)
-
trunk/css/settings.css (modified) (1 diff)
-
trunk/includes/frontend.php (modified) (3 diffs)
-
trunk/includes/settings.js (deleted)
-
trunk/includes/settings.php (deleted)
-
trunk/watson.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
conversation-watson/tags/0.7.0/app.js
r1878701 r1883416 5 5 !*** ./~/preact-compat/dist/preact-compat.es.js ***! 6 6 \**************************************************/ 7 function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(){return null}function o(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&w(e.attributes,t.defaultProps),n&&w(e.attributes,n)}function i(e,t){var n,r,o;if(t){for(o in t)if(n=V.test(o))break;if(n){r=e.attributes={};for(o in t)t.hasOwnProperty(o)&&(r[V.test(o)?o.replace(/([A-Z0-9])/,"-$1").toLowerCase():o]=t[o])}}}function a(e,t,r){var o=t&&t._preactCompatRendered&&t._preactCompatRendered.base;o&&o.parentNode!==t&&(o=null),!o&&t&&(o=t.firstElementChild);for(var i=t.childNodes.length;i--;)t.childNodes[i]!==o&&t.removeChild(t.childNodes[i]);var a=n.i(U.c)(e,t,o);return t&&(t._preactCompatRendered=a&&(a._component||{base:a})),"function"==typeof r&&r(),a&&a._component||a}function s(e,t,r,o){var i=n.i(U.a)($,{context:e.context},t),s=a(i,r),u=s._component||s.base;return o&&o.call(u,s),u}function u(e){var t=e._preactCompatRendered&&e._preactCompatRendered.base;return!(!t||t.parentNode!==e)&&(n.i(U.c)(n.i(U.a)(r),e,t),!0)}function c(e){return h.bind(null,e)}function l(e,t){for(var n=t||0;n<e.length;n++){var r=e[n];Array.isArray(r)?l(r):r&&"object"==typeof r&&!v(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(e[n]=h(r.type||r.nodeName,r.props||r.attributes,r.children))}}function f(e){return"function"==typeof e&&!(e.prototype&&e.prototype.render)}function p(e){return O({displayName:e.displayName||e.name,render:function(){return e(this.props,this.context)}})}function d(e){var t=e[ z];return t?!0===t?e:t:(t=p(e),Object.defineProperty(t,z,{configurable:!0,value:!0}),t.displayName=e.displayName,t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,Object.defineProperty(e,z,{configurable:!0,value:t}),t)}function h(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return l(e,2),m(U.a.apply(void 0,e))}function m(e){e.preactCompatNormalized=!0,_(e),f(e.nodeName)&&(e.nodeName=d(e.nodeName));var t=e.attributes.ref,n=t&&typeof t;return!Q||"string"!==n&&"number"!==n||(e.attributes.ref=b(t,Q)),g(e),e}function y(e,t){for(var r=[],o=arguments.length-2;o-- >0;)r[o]=arguments[o+2];if(!v(e))return e;var i=e.attributes||e.props,a=n.i(U.a)(e.nodeName||e.type,i,e.children||i&&i.children),s=[a,t];return r&&r.length?s.push(r):t&&t.children&&s.push(t.children),m(U.d.apply(void 0,s))}function v(e){return e&&(e instanceof q||e.$$typeof===F)}function b(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}function g(e){var t=e.nodeName,n=e.attributes;if(n&&"string"==typeof t){var r={};for(var o in n)r[o.toLowerCase()]=o;if(r.ondoubleclick&&(n.ondblclick=n[r.ondoubleclick],delete n[r.ondoubleclick]),r.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var i=r.oninput||"oninput";n[i]||(n[i]=k([n[i],n[r.onchange]]),delete n[r.onchange])}}}function _(e){var t=e.attributes||(e.attributes={});re.enumerable="className"in t,t.className&&(t.class=t.className),Object.defineProperty(t,"className",re)}function w(e,t){for(var n=arguments,r=1,o=void 0;r<arguments.length;r++)if(o=n[r])for(var i in o)o.hasOwnProperty(i)&&(e[i]=o[i]);return e}function x(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}function E(e){return e&&e.base||e}function S(){}function O(e){function t(e,t){P(this),L.call(this,e,t,Y),j.call(this,e,t)}return e=w({constructor:t},e),e.mixins&&A(e,T(e.mixins)),e.statics&&w(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps()),S.prototype=L.prototype,t.prototype=w(new S,e),t.displayName=e.displayName||"Component",t}function T(e){for(var t={},n=0;n<e.length;n++){var r=e[n];for(var o in r)r.hasOwnProperty(o)&&"function"==typeof r[o]&&(t[o]||(t[o]=[])).push(r[o])}return t}function A(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=k(t[n].concat(e[n]||Z),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}function P(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||W.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function C(e,t,n){if("string"==typeof t&&(t=e.constructor.prototype[t]),"function"==typeof t)return t.apply(e,n)}function k(e,t){return function(){for(var n,r=arguments,o=this,i=0;i<e.length;i++){var a=C(o,e[i],r);if(t&&null!=a){n||(n={});for(var s in a)a.hasOwnProperty(s)&&(n[s]=a[s])}else void 0!==a&&(n=a)}return n}}function j(e,t){N.call(this,e,t),this.componentWillReceiveProps=k([N,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=k([N,M,this.render||"render",D])}function N(e,t){if(e){var n=e.children;if(n&&Array.isArray(n)&&1===n.length&&("string"==typeof n[0]||"function"==typeof n[0]||n[0]instanceof q)&&(e.children=n[0],e.children&&"object"==typeof e.children&&(e.children.length=1,e.children[0]=e.children)),X){var r="function"==typeof this?this:this.constructor,o=this.propTypes||r.propTypes,i=this.displayName||r.name;o&&B.a.checkPropTypes(o,e,"prop",i)}}}function M(e){Q=this}function D(){Q===this&&(Q=null)}function L(e,t,n){U.e.call(this,e,t),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==Y&&j.call(this,e,t)}function R(e,t){L.call(this,e,t)}n.d(t,"version",function(){return G}),n.d(t,"DOM",function(){return te}),n.d(t,"Children",function(){return ee}),n.d(t,"render",function(){return a}),n.d(t,"createClass",function(){return O}),n.d(t,"createFactory",function(){return c}),n.d(t,"createElement",function(){return h}),n.d(t,"cloneElement",function(){return y}),n.d(t,"isValidElement",function(){return v}),n.d(t,"findDOMNode",function(){return E}),n.d(t,"unmountComponentAtNode",function(){return u}),n.d(t,"Component",function(){return L}),n.d(t,"PureComponent",function(){return R}),n.d(t,"unstable_renderSubtreeIntoContainer",function(){return s}),n.d(t,"__spread",function(){return w});var I=n(/*! prop-types */21),B=n.n(I),U=n(/*! preact */148);n.d(t,"PropTypes",function(){return B.a});var G="15.1.0",H="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),F="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,z="undefined"!=typeof Symbol?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",W={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},V=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,Y={},X=void 0===e||!e.env||!1,q=n.i(U.a)("a",null).constructor;q.prototype.$$typeof=F,q.prototype.preactCompatUpgraded=!1,q.prototype.preactCompatNormalized=!1,Object.defineProperty(q.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty(q.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var K=U.b.event;U.b.event=function(e){return K&&(e=K(e)),e.persist=Object,e.nativeEvent=e,e};var J=U.b.vnode;U.b.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes=w({},e.attributes);"function"==typeof t?(!0===t[z]||t.prototype&&"isReactComponent"in t.prototype)&&(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),e.preactCompatNormalized||m(e),o(e)):(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),i(e,n))}J&&J(e)};var $=function(){};$.prototype.getChildContext=function(){return this.props.context},$.prototype.render=function(e){return e.children[0]};for(var Q,Z=[],ee={map:function(e,t,n){return null==e?null:(e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t))},forEach:function(e,t,n){if(null==e)return null;e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(e=ee.toArray(e),1!==e.length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:Z.concat(e)}},te={},ne=H.length;ne--;)te[H[ne]]=c(H[ne]);var re={configurable:!0,get:function(){return this.class},set:function(e){this.class=e}};w(L.prototype=new U.e,{constructor:L,isReactComponent:{},replaceState:function(e,t){var n=this;this.setState(e,t);for(var r in n.state)r in e||delete n.state[r]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),S.prototype=L.prototype,R.prototype=new S,R.prototype.isPureReactComponent=!0,R.prototype.shouldComponentUpdate=function(e,t){return x(this.props,e)||x(this.state,t)};var oe={version:G,DOM:te,PropTypes:B.a,Children:ee,render:a,createClass:O,createFactory:c,createElement:h,cloneElement:y,isValidElement:v,findDOMNode:E,unmountComponentAtNode:u,Component:L,PureComponent:R,unstable_renderSubtreeIntoContainer:s,__spread:w};t.default=oe}.call(t,n(/*! ./../../process/browser.js */149))},/*!*****************************************!*\7 function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(){return null}function o(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&w(e.attributes,t.defaultProps),n&&w(e.attributes,n)}function i(e,t){var n,r,o;if(t){for(o in t)if(n=V.test(o))break;if(n){r=e.attributes={};for(o in t)t.hasOwnProperty(o)&&(r[V.test(o)?o.replace(/([A-Z0-9])/,"-$1").toLowerCase():o]=t[o])}}}function a(e,t,r){var o=t&&t._preactCompatRendered&&t._preactCompatRendered.base;o&&o.parentNode!==t&&(o=null),!o&&t&&(o=t.firstElementChild);for(var i=t.childNodes.length;i--;)t.childNodes[i]!==o&&t.removeChild(t.childNodes[i]);var a=n.i(U.c)(e,t,o);return t&&(t._preactCompatRendered=a&&(a._component||{base:a})),"function"==typeof r&&r(),a&&a._component||a}function s(e,t,r,o){var i=n.i(U.a)($,{context:e.context},t),s=a(i,r),u=s._component||s.base;return o&&o.call(u,s),u}function u(e){var t=e._preactCompatRendered&&e._preactCompatRendered.base;return!(!t||t.parentNode!==e)&&(n.i(U.c)(n.i(U.a)(r),e,t),!0)}function c(e){return h.bind(null,e)}function l(e,t){for(var n=t||0;n<e.length;n++){var r=e[n];Array.isArray(r)?l(r):r&&"object"==typeof r&&!v(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(e[n]=h(r.type||r.nodeName,r.props||r.attributes,r.children))}}function f(e){return"function"==typeof e&&!(e.prototype&&e.prototype.render)}function p(e){return O({displayName:e.displayName||e.name,render:function(){return e(this.props,this.context)}})}function d(e){var t=e[F];return t?!0===t?e:t:(t=p(e),Object.defineProperty(t,F,{configurable:!0,value:!0}),t.displayName=e.displayName,t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,Object.defineProperty(e,F,{configurable:!0,value:t}),t)}function h(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return l(e,2),m(U.a.apply(void 0,e))}function m(e){e.preactCompatNormalized=!0,_(e),f(e.nodeName)&&(e.nodeName=d(e.nodeName));var t=e.attributes.ref,n=t&&typeof t;return!Q||"string"!==n&&"number"!==n||(e.attributes.ref=b(t,Q)),g(e),e}function y(e,t){for(var r=[],o=arguments.length-2;o-- >0;)r[o]=arguments[o+2];if(!v(e))return e;var i=e.attributes||e.props,a=n.i(U.a)(e.nodeName||e.type,i,e.children||i&&i.children),s=[a,t];return r&&r.length?s.push(r):t&&t.children&&s.push(t.children),m(U.d.apply(void 0,s))}function v(e){return e&&(e instanceof q||e.$$typeof===z)}function b(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}function g(e){var t=e.nodeName,n=e.attributes;if(n&&"string"==typeof t){var r={};for(var o in n)r[o.toLowerCase()]=o;if(r.ondoubleclick&&(n.ondblclick=n[r.ondoubleclick],delete n[r.ondoubleclick]),r.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var i=r.oninput||"oninput";n[i]||(n[i]=k([n[i],n[r.onchange]]),delete n[r.onchange])}}}function _(e){var t=e.attributes||(e.attributes={});re.enumerable="className"in t,t.className&&(t.class=t.className),Object.defineProperty(t,"className",re)}function w(e,t){for(var n=arguments,r=1,o=void 0;r<arguments.length;r++)if(o=n[r])for(var i in o)o.hasOwnProperty(i)&&(e[i]=o[i]);return e}function x(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}function E(e){return e&&e.base||e}function S(){}function O(e){function t(e,t){P(this),L.call(this,e,t,Y),j.call(this,e,t)}return e=w({constructor:t},e),e.mixins&&A(e,T(e.mixins)),e.statics&&w(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps()),S.prototype=L.prototype,t.prototype=w(new S,e),t.displayName=e.displayName||"Component",t}function T(e){for(var t={},n=0;n<e.length;n++){var r=e[n];for(var o in r)r.hasOwnProperty(o)&&"function"==typeof r[o]&&(t[o]||(t[o]=[])).push(r[o])}return t}function A(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=k(t[n].concat(e[n]||Z),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}function P(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||W.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function C(e,t,n){if("string"==typeof t&&(t=e.constructor.prototype[t]),"function"==typeof t)return t.apply(e,n)}function k(e,t){return function(){for(var n,r=arguments,o=this,i=0;i<e.length;i++){var a=C(o,e[i],r);if(t&&null!=a){n||(n={});for(var s in a)a.hasOwnProperty(s)&&(n[s]=a[s])}else void 0!==a&&(n=a)}return n}}function j(e,t){N.call(this,e,t),this.componentWillReceiveProps=k([N,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=k([N,M,this.render||"render",D])}function N(e,t){if(e){var n=e.children;if(n&&Array.isArray(n)&&1===n.length&&("string"==typeof n[0]||"function"==typeof n[0]||n[0]instanceof q)&&(e.children=n[0],e.children&&"object"==typeof e.children&&(e.children.length=1,e.children[0]=e.children)),X){var r="function"==typeof this?this:this.constructor,o=this.propTypes||r.propTypes,i=this.displayName||r.name;o&&B.a.checkPropTypes(o,e,"prop",i)}}}function M(e){Q=this}function D(){Q===this&&(Q=null)}function L(e,t,n){U.e.call(this,e,t),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==Y&&j.call(this,e,t)}function R(e,t){L.call(this,e,t)}n.d(t,"version",function(){return G}),n.d(t,"DOM",function(){return te}),n.d(t,"Children",function(){return ee}),n.d(t,"render",function(){return a}),n.d(t,"createClass",function(){return O}),n.d(t,"createFactory",function(){return c}),n.d(t,"createElement",function(){return h}),n.d(t,"cloneElement",function(){return y}),n.d(t,"isValidElement",function(){return v}),n.d(t,"findDOMNode",function(){return E}),n.d(t,"unmountComponentAtNode",function(){return u}),n.d(t,"Component",function(){return L}),n.d(t,"PureComponent",function(){return R}),n.d(t,"unstable_renderSubtreeIntoContainer",function(){return s}),n.d(t,"__spread",function(){return w});var I=n(/*! prop-types */21),B=n.n(I),U=n(/*! preact */148);n.d(t,"PropTypes",function(){return B.a});var G="15.1.0",H="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,F="undefined"!=typeof Symbol?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",W={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},V=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,Y={},X=void 0===e||!e.env||!1,q=n.i(U.a)("a",null).constructor;q.prototype.$$typeof=z,q.prototype.preactCompatUpgraded=!1,q.prototype.preactCompatNormalized=!1,Object.defineProperty(q.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty(q.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var K=U.b.event;U.b.event=function(e){return K&&(e=K(e)),e.persist=Object,e.nativeEvent=e,e};var J=U.b.vnode;U.b.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes=w({},e.attributes);"function"==typeof t?(!0===t[F]||t.prototype&&"isReactComponent"in t.prototype)&&(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),e.preactCompatNormalized||m(e),o(e)):(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),i(e,n))}J&&J(e)};var $=function(){};$.prototype.getChildContext=function(){return this.props.context},$.prototype.render=function(e){return e.children[0]};for(var Q,Z=[],ee={map:function(e,t,n){return null==e?null:(e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t))},forEach:function(e,t,n){if(null==e)return null;e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(e=ee.toArray(e),1!==e.length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:Z.concat(e)}},te={},ne=H.length;ne--;)te[H[ne]]=c(H[ne]);var re={configurable:!0,get:function(){return this.class},set:function(e){this.class=e}};w(L.prototype=new U.e,{constructor:L,isReactComponent:{},replaceState:function(e,t){var n=this;this.setState(e,t);for(var r in n.state)r in e||delete n.state[r]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),S.prototype=L.prototype,R.prototype=new S,R.prototype.isPureReactComponent=!0,R.prototype.shouldComponentUpdate=function(e,t){return x(this.props,e)||x(this.state,t)};var oe={version:G,DOM:te,PropTypes:B.a,Children:ee,render:a,createClass:O,createFactory:c,createElement:h,cloneElement:y,isValidElement:v,findDOMNode:E,unmountComponentAtNode:u,Component:L,PureComponent:R,unstable_renderSubtreeIntoContainer:s,__spread:w};t.default=oe}.call(t,n(/*! ./../../process/browser.js */149))},/*!*****************************************!*\ 8 8 !*** ./~/core-js/modules/_is-object.js ***! 9 9 \*****************************************/ … … 149 149 !*** ./src/ChatBox.jsx ***! 150 150 \*************************/ 151 function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(/*! react */1),l=r(c),f=n(/*! react-tooltip-currenttarget */160),p=r(f),d=n(/*! webrtcsupport */172),h=r(d),m=n(/*! jstz */147),y=r(m),v=n(/*! ./MessageGroup */86),b=r(v),g=n(/*! ./InputBox.jsx */83),_=r(g),w=n(/*! ./CallInterface.jsx */81),x=r(w);n(/*! whatwg-fetch */173);var E=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return"undefined"!=typeof sessionStorage&&sessionStorage.getItem("watson_bot_state")?(n.state=JSON.parse(sessionStorage.getItem("watson_bot_state")),Object.assign(n.state.context,watsonconvSettings.context,{timezone:y.default.determine().name()})):(n.state={messages:[],context:watsonconvSettings.context,showCallInterface:!1,mediaSecure:!0,convStarted:!1},Object.assign(n.state.context,{timezone:y.default.determine().name()})),n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this;void 0!==this.messageList&&(this.messageList.scrollTop=this.messageList.scrollHeight),this.state.convStarted||this.props.isMinimized||this.sendMessage(),h.default.support&&"https:"!==document.location.protocol&&navigator.mediaDevices.getUserMedia({video:{width:{min:2,max:1}}}).then(function(e){console.log("getUserMedia detection failed"),e.getTracks().forEach(function(e){return e.stop()})}).catch(function(t){switch(t.name){case"NotSupportedError":case"NotAllowedError":case"SecurityError":console.log("Can't access microphone in http"),e.setState({mediaSecure:!1})}})}},{key:"componentDidUpdate",value:function(e,t){this.state.convStarted||this.props.isMinimized||this.sendMessage(),t.messages.length!==this.state.messages.length&&void 0!==this.messageList&&this.scrollToBottom()}},{key:"toggleCallInterface",value:function(){this.setState({showCallInterface:!this.state.showCallInterface})}},{key:"scrollToBottom",value:function(){jQuery(this.messageList).stop().animate({scrollTop:this.messageList.scrollHeight})}},{key:"sendMessage",value:function(e){var t=this;this.state.convStarted||this.setState({convStarted:!0}),fetch("?rest_route=/watsonconv/v1/message",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({input:{text:e},context:this.state.context})}).then(function(e){if(!e.ok)throw Error("Message could not be sent.");return e.json()}).then(function(e){var n=e.output.text;t.setState({context:e.context,messages:t.state.messages.concat({from:"watson",text:Array.isArray(n)?n:[n],options:e.output.options,loadedMessages:"yes"===watsonconvSettings.typingDelay?0:n.length})},t.saveState.bind(t))}).catch(function(e){console.log(e)}),e&&this.setState({messages:this.state.messages.concat({from:"user",text:[e],loadedMessages:1})})}},{key:"reset",value:function(){this.setState({messages:[],context:null}),this.sendMessage()}},{key:"incLoadedMessages",value:function(e){var t=this.state.messages.slice();t[e]=s({},t[e],{loadedMessages:t[e].loadedMessages+1}),this.setState({messages:t},this.saveState.bind(this))}},{key:"saveState",value:function(){"undefined"!=typeof sessionStorage&&sessionStorage.setItem("watson_bot_state",JSON.stringify(this.state))}},{key:"render",value:function(){var e=this,t=watsonconvSettings,n=t.callConfig,r=t.clearText,o=watsonconvSettings.position||["bottom","right"],i=this.state.showCallInterface,a="yes"==n.useTwilio&&n.configured&&h.default.support&&this.state.mediaSecure,s=Boolean(n.recipient);return l.default.createElement("div",{id:"watson-box",className:"drop-shadow animated"},l.default.createElement("div",{id:"watson-header",className:"watson-font"},l.default.createElement("span",{className:"dashicons dashicons-arrow-"+("bottom"==o[0]?"down":"up")+"-alt2 header-button minimize-button"}),l.default.createElement("span",{onClick:this.reset.bind(this),className:"dashicons dashicons-trash header-button","data-tip":r||"Clear Messages"}),s&&l.default.createElement("span",{onClick:this.toggleCallInterface.bind(this),className:"dashicons dashicons-phone header-button","data-tip":n.callTooltip||"Talk to a Live Agent"}),l.default.createElement(p.default,null),l.default.createElement("div",{className:"overflow-hidden watson-font"},watsonconvSettings.title)),l.default.createElement("div",{id:"chatbox-body"},s&&i&&l.default.createElement(x.default,{allowTwilio:a}),l.default.createElement("div",{id:"message-container"},l.default.createElement("div",{id:"messages",ref:function(t){e.messageList=t}},this.state.messages.map(function(t,n){return l.default.createElement(b.default,{message:t,key:n,index:n,sendMessage:e.sendMessage.bind(e),incLoaded:e.incLoadedMessages.bind(e),scroll:e.scrollToBottom.bind(e)})}))),l.default.createElement(_.default,{sendMessage:this.sendMessage.bind(this)})))}}]),t}(c.Component);t.default=E},/*!************************************!*\151 function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(/*! react */1),l=r(c),f=n(/*! react-tooltip-currenttarget */160),p=r(f),d=n(/*! webrtcsupport */172),h=r(d),m=n(/*! jstz */147),y=r(m),v=n(/*! ./MessageGroup */86),b=r(v),g=n(/*! ./InputBox.jsx */83),_=r(g),w=n(/*! ./CallInterface.jsx */81),x=r(w);n(/*! whatwg-fetch */173);var E=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return"undefined"!=typeof sessionStorage&&sessionStorage.getItem("watson_bot_state")?(n.state=JSON.parse(sessionStorage.getItem("watson_bot_state")),Object.assign(n.state.context,watsonconvSettings.context,{timezone:y.default.determine().name()})):(n.state={messages:[],context:watsonconvSettings.context,showCallInterface:!1,mediaSecure:!0,convStarted:!1},Object.assign(n.state.context,{timezone:y.default.determine().name()})),n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this;void 0!==this.messageList&&(this.messageList.scrollTop=this.messageList.scrollHeight),this.state.convStarted||this.props.isMinimized||this.sendMessage(),h.default.support&&"https:"!==document.location.protocol&&navigator.mediaDevices.getUserMedia({video:{width:{min:2,max:1}}}).then(function(e){console.log("getUserMedia detection failed"),e.getTracks().forEach(function(e){return e.stop()})}).catch(function(t){switch(t.name){case"NotSupportedError":case"NotAllowedError":case"SecurityError":console.log("Can't access microphone in http"),e.setState({mediaSecure:!1})}})}},{key:"componentDidUpdate",value:function(e,t){this.state.convStarted||this.props.isMinimized||this.sendMessage(),t.messages.length!==this.state.messages.length&&void 0!==this.messageList&&this.scrollToBottom()}},{key:"toggleCallInterface",value:function(){this.setState({showCallInterface:!this.state.showCallInterface})}},{key:"scrollToBottom",value:function(){jQuery(this.messageList).stop().animate({scrollTop:this.messageList.scrollHeight})}},{key:"sendMessage",value:function(e){var t=this;this.state.convStarted||this.setState({convStarted:!0}),fetch("?rest_route=/watsonconv/v1/message",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({input:{text:e},context:this.state.context})}).then(function(e){if(!e.ok)throw Error("Message could not be sent.");return e.json()}).then(function(e){var n=e.output.text;t.setState({context:e.context,messages:t.state.messages.concat({from:"watson",text:Array.isArray(n)?n:[n],options:e.output.options,loadedMessages:"yes"===watsonconvSettings.typingDelay?0:n.length})},t.saveState.bind(t))}).catch(function(e){console.log(e)}),e&&this.setState({messages:this.state.messages.concat({from:"user",text:[e],loadedMessages:1})})}},{key:"reset",value:function(){this.setState({messages:[],context:null}),this.sendMessage()}},{key:"incLoadedMessages",value:function(e){var t=this.state.messages.slice();t[e]=s({},t[e],{loadedMessages:t[e].loadedMessages+1}),this.setState({messages:t},this.saveState.bind(this))}},{key:"saveState",value:function(){"undefined"!=typeof sessionStorage&&sessionStorage.setItem("watson_bot_state",JSON.stringify(this.state))}},{key:"render",value:function(){var e=this,t=watsonconvSettings,n=t.callConfig,r=t.clearText,o=watsonconvSettings.position||["bottom","right"],i=this.state.showCallInterface,a="yes"==n.useTwilio&&n.configured&&h.default.support&&this.state.mediaSecure,s=Boolean(n.recipient);return l.default.createElement("div",{id:"watson-box",className:"drop-shadow animated"},l.default.createElement("div",{id:"watson-header",className:"watson-font"},l.default.createElement("span",{className:"dashicons \n dashicons-arrow-"+("bottom"==o[0]?"down":"up")+"-alt2 \n header-button minimize-button",onClick:this.props.toggleMinimize}),l.default.createElement("span",{onClick:this.reset.bind(this),className:"dashicons dashicons-trash header-button","data-tip":r||"Clear Messages"}),s&&l.default.createElement("span",{onClick:this.toggleCallInterface.bind(this),className:"dashicons dashicons-phone header-button","data-tip":n.callTooltip||"Talk to a Live Agent"}),l.default.createElement(p.default,null),l.default.createElement("div",{className:"overflow-hidden watson-font"},watsonconvSettings.title)),l.default.createElement("div",{id:"chatbox-body"},s&&i&&l.default.createElement(x.default,{allowTwilio:a}),l.default.createElement("div",{id:"message-container"},l.default.createElement("div",{id:"messages",ref:function(t){e.messageList=t}},this.state.messages.map(function(t,n){return l.default.createElement(b.default,{message:t,key:n,index:n,sendMessage:e.sendMessage.bind(e),incLoaded:e.incLoadedMessages.bind(e),scroll:e.scrollToBottom.bind(e)})}))),l.default.createElement(_.default,{sendMessage:this.sendMessage.bind(this)})))}}]),t}(c.Component);t.default=E},/*!************************************!*\ 152 152 !*** ./~/core-js/modules/_html.js ***! 153 153 \************************************/ … … 216 216 !*** ./~/core-js/modules/es6.symbol.js ***! 217 217 \*****************************************/ 218 function(e,t,n){"use strict";var r=n(/*! ./_global */3),o=n(/*! ./_has */12),i=n(/*! ./_descriptors */5),a=n(/*! ./_export */0),s=n(/*! ./_redefine */17),u=n(/*! ./_meta */20).KEY,c=n(/*! ./_fails */11),l=n(/*! ./_shared */46),f=n(/*! ./_set-to-string-tag */28),p=n(/*! ./_uid */30),d=n(/*! ./_wks */4),h=n(/*! ./_wks-ext */69),m=n(/*! ./_wks-define */48),y=n(/*! ./_enum-keys */94),v=n(/*! ./_is-array */98),b=n(/*! ./_an-object */8),g=n(/*! ./_is-object */2),_=n(/*! ./_to-iobject */10),w=n(/*! ./_to-primitive */29),x=n(/*! ./_property-desc */27),E=n(/*! ./_object-create */25),S=n(/*! ./_object-gopn-ext */57),O=n(/*! ./_object-gopd */15),T=n(/*! ./_object-dp */6),A=n(/*! ./_object-keys */16),P=O.f,C=T.f,k=S.f,j=r.Symbol,N=r.JSON,M=N&&N.stringify,D=d("_hidden"),L=d("toPrimitive"),R={}.propertyIsEnumerable,I=l("symbol-registry"),B=l("symbols"),U=l("op-symbols"),G=Object.prototype,H="function"==typeof j, F=r.QObject,z=!F||!F.prototype||!F.prototype.findChild,W=i&&c(function(){return 7!=E(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(G,t);r&&delete G[t],C(e,t,n),r&&e!==G&&C(G,t,r)}:C,V=function(e){var t=B[e]=E(j.prototype);return t._k=e,t},Y=H&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},X=function(e,t,n){return e===G&&X(U,t,n),b(e),t=w(t,!0),b(n),o(B,t)?(n.enumerable?(o(e,D)&&e[D][t]&&(e[D][t]=!1),n=E(n,{enumerable:x(0,!1)})):(o(e,D)||C(e,D,x(1,{})),e[D][t]=!0),W(e,t,n)):C(e,t,n)},q=function(e,t){b(e);for(var n,r=y(t=_(t)),o=0,i=r.length;i>o;)X(e,n=r[o++],t[n]);return e},K=function(e,t){return void 0===t?E(e):q(E(e),t)},J=function(e){var t=R.call(this,e=w(e,!0));return!(this===G&&o(B,e)&&!o(U,e))&&(!(t||!o(this,e)||!o(B,e)||o(this,D)&&this[D][e])||t)},$=function(e,t){if(e=_(e),t=w(t,!0),e!==G||!o(B,t)||o(U,t)){var n=P(e,t);return!n||!o(B,t)||o(e,D)&&e[D][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=k(_(e)),r=[],i=0;n.length>i;)o(B,t=n[i++])||t==D||t==u||r.push(t);return r},Z=function(e){for(var t,n=e===G,r=k(n?U:_(e)),i=[],a=0;r.length>a;)!o(B,t=r[a++])||n&&!o(G,t)||i.push(B[t]);return i};H||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===G&&t.call(U,n),o(this,D)&&o(this[D],e)&&(this[D][e]=!1),W(this,e,x(1,n))};return i&&z&&W(G,e,{configurable:!0,set:t}),V(e)},s(j.prototype,"toString",function(){return this._k}),O.f=$,T.f=X,n(/*! ./_object-gopn */43).f=S.f=Q,n(/*! ./_object-pie */26).f=J,n(/*! ./_object-gops */33).f=Z,i&&!n(/*! ./_library */24)&&s(G,"propertyIsEnumerable",J,!0),h.f=function(e){return V(d(e))}),a(a.G+a.W+a.F*!H,{Symbol:j});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)d(ee[te++]);for(var ne=A(d.store),re=0;ne.length>re;)m(ne[re++]);a(a.S+a.F*!H,"Symbol",{for:function(e){return o(I,e+="")?I[e]:I[e]=j(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in I)if(I[t]===e)return t},useSetter:function(){z=!0},useSimple:function(){z=!1}}),a(a.S+a.F*!H,"Object",{create:K,defineProperty:X,defineProperties:q,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),N&&a(a.S+a.F*(!H||c(function(){var e=j();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(g(t)||void 0!==e)&&!Y(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,M.apply(N,r)}}),j.prototype[L]||n(/*! ./_hide */14)(j.prototype,L,j.prototype.valueOf),f(j,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},/*!***********************************************!*\218 function(e,t,n){"use strict";var r=n(/*! ./_global */3),o=n(/*! ./_has */12),i=n(/*! ./_descriptors */5),a=n(/*! ./_export */0),s=n(/*! ./_redefine */17),u=n(/*! ./_meta */20).KEY,c=n(/*! ./_fails */11),l=n(/*! ./_shared */46),f=n(/*! ./_set-to-string-tag */28),p=n(/*! ./_uid */30),d=n(/*! ./_wks */4),h=n(/*! ./_wks-ext */69),m=n(/*! ./_wks-define */48),y=n(/*! ./_enum-keys */94),v=n(/*! ./_is-array */98),b=n(/*! ./_an-object */8),g=n(/*! ./_is-object */2),_=n(/*! ./_to-iobject */10),w=n(/*! ./_to-primitive */29),x=n(/*! ./_property-desc */27),E=n(/*! ./_object-create */25),S=n(/*! ./_object-gopn-ext */57),O=n(/*! ./_object-gopd */15),T=n(/*! ./_object-dp */6),A=n(/*! ./_object-keys */16),P=O.f,C=T.f,k=S.f,j=r.Symbol,N=r.JSON,M=N&&N.stringify,D=d("_hidden"),L=d("toPrimitive"),R={}.propertyIsEnumerable,I=l("symbol-registry"),B=l("symbols"),U=l("op-symbols"),G=Object.prototype,H="function"==typeof j,z=r.QObject,F=!z||!z.prototype||!z.prototype.findChild,W=i&&c(function(){return 7!=E(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(G,t);r&&delete G[t],C(e,t,n),r&&e!==G&&C(G,t,r)}:C,V=function(e){var t=B[e]=E(j.prototype);return t._k=e,t},Y=H&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},X=function(e,t,n){return e===G&&X(U,t,n),b(e),t=w(t,!0),b(n),o(B,t)?(n.enumerable?(o(e,D)&&e[D][t]&&(e[D][t]=!1),n=E(n,{enumerable:x(0,!1)})):(o(e,D)||C(e,D,x(1,{})),e[D][t]=!0),W(e,t,n)):C(e,t,n)},q=function(e,t){b(e);for(var n,r=y(t=_(t)),o=0,i=r.length;i>o;)X(e,n=r[o++],t[n]);return e},K=function(e,t){return void 0===t?E(e):q(E(e),t)},J=function(e){var t=R.call(this,e=w(e,!0));return!(this===G&&o(B,e)&&!o(U,e))&&(!(t||!o(this,e)||!o(B,e)||o(this,D)&&this[D][e])||t)},$=function(e,t){if(e=_(e),t=w(t,!0),e!==G||!o(B,t)||o(U,t)){var n=P(e,t);return!n||!o(B,t)||o(e,D)&&e[D][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=k(_(e)),r=[],i=0;n.length>i;)o(B,t=n[i++])||t==D||t==u||r.push(t);return r},Z=function(e){for(var t,n=e===G,r=k(n?U:_(e)),i=[],a=0;r.length>a;)!o(B,t=r[a++])||n&&!o(G,t)||i.push(B[t]);return i};H||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===G&&t.call(U,n),o(this,D)&&o(this[D],e)&&(this[D][e]=!1),W(this,e,x(1,n))};return i&&F&&W(G,e,{configurable:!0,set:t}),V(e)},s(j.prototype,"toString",function(){return this._k}),O.f=$,T.f=X,n(/*! ./_object-gopn */43).f=S.f=Q,n(/*! ./_object-pie */26).f=J,n(/*! ./_object-gops */33).f=Z,i&&!n(/*! ./_library */24)&&s(G,"propertyIsEnumerable",J,!0),h.f=function(e){return V(d(e))}),a(a.G+a.W+a.F*!H,{Symbol:j});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)d(ee[te++]);for(var ne=A(d.store),re=0;ne.length>re;)m(ne[re++]);a(a.S+a.F*!H,"Symbol",{for:function(e){return o(I,e+="")?I[e]:I[e]=j(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in I)if(I[t]===e)return t},useSetter:function(){F=!0},useSimple:function(){F=!1}}),a(a.S+a.F*!H,"Object",{create:K,defineProperty:X,defineProperties:q,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),N&&a(a.S+a.F*(!H||c(function(){var e=j();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(g(t)||void 0!==e)&&!Y(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,M.apply(N,r)}}),j.prototype[L]||n(/*! ./_hide */14)(j.prototype,L,j.prototype.valueOf),f(j,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},/*!***********************************************!*\ 219 219 !*** ./~/core-js/modules/web.dom.iterable.js ***! 220 220 \***********************************************/ … … 231 231 !*** ./src/App.jsx ***! 232 232 \*********************/ 233 function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(/*! react */1),c=r(u),l=n(/*! react-draggable */153),f=r(l),p=n(/*! react-transition-group */168),d=n(/*! querystringify */152),h=r(d),m=n(/*! ./ChatBox.jsx */49),y=r(m),v=n(/*! ./Fab.jsx */82),b=r(v),g=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));"undefined"!=typeof sessionStorage&&sessionStorage.getItem("watson_bot_window_state")?n.state=JSON.parse(sessionStorage.getItem("watson_bot_window_state")):n.state={minimized:e.isMobile||"yes"===watsonconvSettings.minimized,position:{x:0,y:0}};var r=h.default.parse(window.location.search);return r.hasOwnProperty("chat_min")&&("true"==r.chat_min||"yes"==r.chat_min?n.state.minimized=!0:"false"!=r.chat_min&&"no"!=r.chat_min||(n.state.minimized=!1)),n}return a(t,e),s(t,[{key:"componentDidUpdate",value:function(e,t){this.saveState(),this.state.minimized!=t.minimized&&this.props.isMobile&&(document.body.style.overflow=this.state.minimized?"scroll":"hidden")}},{key:"toggleMinimize",value:function(e){e.preventDefault(),this.setState({minimized:!this.state.minimized})}},{key:"startDragging",value:function(e){e.preventDefault(),this.setState({animated:!0})}},{key:"saveState",value:function(){"undefined"!=typeof sessionStorage&&sessionStorage.setItem("watson_bot_ state",JSON.stringify(this.state))}},{key:"savePosition",value:function(e,t){Math.sqrt(Math.pow(t.x-this.state.position.x,2)+Math.pow(t.y-this.state.position.y,2))<3?(this.setState({animated:!1}),this.toggleMinimize(e)):this.setState({position:{x:t.x,y:t.y}})}},{key:"render",value:function(e,t){var n=t.minimized,r=t.animated;return c.default.createElement("div",null,c.default.createElement(f.default,{handle:"#watson-header",cancel:"#watson-header .header-button",onStart:this.startDragging.bind(this),onStop:this.savePosition.bind(this)},c.default.createElement(p.TransitionGroup,{id:"watson-float",class:!r&&"animated",style:n&&{opacity:0,visibility:"hidden"}},c.default.createElement(y.default,{isMinimized:n}))),c.default.createElement(p.TransitionGroup,{id:"watson-fab-float",class:"animated",style:!n&&{opacity:0,visibility:"hidden"}},n&&c.default.createElement(b.default,{openChat:this.toggleMinimize.bind(this)})))}}]),t}(u.Component);t.default=g},/*!******************************!*\233 function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(/*! react */1),c=r(u),l=n(/*! react-draggable */153),f=r(l),p=n(/*! react-transition-group */168),d=n(/*! querystringify */152),h=r(d),m=n(/*! ./ChatBox.jsx */49),y=r(m),v=n(/*! ./Fab.jsx */82),b=r(v),g=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));"undefined"!=typeof sessionStorage&&sessionStorage.getItem("watson_bot_window_state")?n.state=JSON.parse(sessionStorage.getItem("watson_bot_window_state")):n.state={minimized:e.isMobile||"yes"===watsonconvSettings.minimized,position:{x:0,y:0}};var r=h.default.parse(window.location.search);return r.hasOwnProperty("chat_min")&&("true"==r.chat_min||"yes"==r.chat_min?n.state.minimized=!0:"false"!=r.chat_min&&"no"!=r.chat_min||(n.state.minimized=!1)),n}return a(t,e),s(t,[{key:"componentDidUpdate",value:function(e,t){this.saveState(),this.state.minimized!=t.minimized&&this.props.isMobile&&(document.body.style.overflow=this.state.minimized?"scroll":"hidden")}},{key:"toggleMinimize",value:function(e){e.preventDefault(),this.setState({minimized:!this.state.minimized})}},{key:"startDragging",value:function(e){e.preventDefault(),this.setState({animated:!0})}},{key:"saveState",value:function(){"undefined"!=typeof sessionStorage&&sessionStorage.setItem("watson_bot_window_state",JSON.stringify(this.state))}},{key:"savePosition",value:function(e,t){Math.sqrt(Math.pow(t.x-this.state.position.x,2)+Math.pow(t.y-this.state.position.y,2))<3?(this.setState({animated:!1}),this.toggleMinimize(e)):this.setState({position:{x:t.x,y:t.y}})}},{key:"render",value:function(e,t){var n=t.minimized,r=t.animated,o=window.matchMedia(watsonconvSettings.fullScreenQuery).matches;return c.default.createElement("div",null,c.default.createElement(f.default,{handle:"#watson-header",cancel:"#watson-header .header-button",onStart:this.startDragging.bind(this),onStop:this.savePosition.bind(this),position:o||n?{x:0,y:0}:this.state.position},c.default.createElement(p.TransitionGroup,{id:"watson-float",class:!r&&"animated",style:n&&{opacity:0,visibility:"hidden"}},c.default.createElement(y.default,{isMinimized:n,toggleMinimize:this.toggleMinimize.bind(this)}))),c.default.createElement(p.TransitionGroup,{id:"watson-fab-float",class:"animated",style:!n&&{opacity:0,visibility:"hidden"}},n&&c.default.createElement(b.default,{openChat:this.toggleMinimize.bind(this)})))}}]),t}(u.Component);t.default=g},/*!******************************!*\ 234 234 !*** ./~/core-js/es6/map.js ***! 235 235 \******************************/ … … 466 466 !*** ./~/preact/dist/preact.esm.js ***! 467 467 \*************************************/ 468 function(e,t,n){"use strict";function r(){}function o(e,t){var n,o,i,a,s=L;for(a=arguments.length;a-- >2;)D.push(arguments[a]);for(t&&null!=t.children&&(D.length||D.push(t.children),delete t.children);D.length;)if((o=D.pop())&&void 0!==o.pop)for(a=o.length;a--;)D.push(o[a]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(i=!1)),i&&n?s[s.length-1]+=o:s===L?s=[o]:s.push(o),n=i;var u=new r;return u.nodeName=e,u.children=s,u.attributes=null==t?void 0:t,u.key=null==t?void 0:t.key,void 0!==M.vnode&&M.vnode(u),u}function i(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t){return o(e.nodeName,i(i({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function s(e){!e._dirty&&(e._dirty=!0)&&1==B.push(e)&&(M.debounceRendering||R)(u)}function u(){var e,t=B;for(B=[];e=t.pop();)e._dirty&&P(e)}function c(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&l(e,t.nodeName):n||e._componentConstructor===t.nodeName}function l(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function f(e){var t=i({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function p(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),r&&r(e);else if("class"!==t||o)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"==typeof r[i]&&!1===I.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,y,a):e.removeEventListener(t,y,a),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)m(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var s=o&&t!==(t=t.replace(/^xlink\:?/,""));null==r||!1===r?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function m(e,t,n){try{e[t]=n}catch(e){}}function y(e){return this._listeners[e.type](M.event&&M.event(e)||e)}function v(){for(var e;e=U.pop();)M.afterMount&&M.afterMount(e),e.componentDidMount&&e.componentDidMount()}function b(e,t,n,r,o,i){G++||(H=null!=o&&void 0!==o.ownerSVGElement, F=null!=e&&!("__preactattr_"in e));var a=g(e,t,n,r,i);return o&&a.parentNode!==o&&o.appendChild(a),--G||(F=!1,i||v()),a}function g(e,t,n,r,o){var i=e,a=H;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0))),i.__preactattr_=!0,i;var s=t.nodeName;if("function"==typeof s)return C(e,t,n,r);if(H="svg"===s||"foreignObject"!==s&&H,s=String(s),(!e||!l(e,s))&&(i=p(s,H),e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0)}var u=i.firstChild,c=i.__preactattr_,f=t.children;if(null==c){c=i.__preactattr_={};for(var d=i.attributes,h=d.length;h--;)c[d[h].name]=d[h].value}return!F&&f&&1===f.length&&"string"==typeof f[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=f[0]&&(u.nodeValue=f[0]):(f&&f.length||null!=u)&&_(i,f,n,r,F||null!=c.dangerouslySetInnerHTML),E(i,t.attributes,c),H=a,i}function _(e,t,n,r,o){var i,a,s,u,l,f=e.childNodes,p=[],h={},m=0,y=0,v=f.length,b=0,_=t?t.length:0;if(0!==v)for(var x=0;x<v;x++){var E=f[x],S=E.__preactattr_,O=_&&S?E._component?E._component.__key:S.key:null;null!=O?(m++,h[O]=E):(S||(void 0!==E.splitText?!o||E.nodeValue.trim():o))&&(p[b++]=E)}if(0!==_)for(var x=0;x<_;x++){u=t[x],l=null;var O=u.key;if(null!=O)m&&void 0!==h[O]&&(l=h[O],h[O]=void 0,m--);else if(!l&&y<b)for(i=y;i<b;i++)if(void 0!==p[i]&&c(a=p[i],u,o)){l=a,p[i]=void 0,i===b-1&&b--,i===y&&y++;break}l=g(l,u,n,r),s=f[x],l&&l!==e&&l!==s&&(null==s?e.appendChild(l):l===s.nextSibling?d(s):e.insertBefore(l,s))}if(m)for(var x in h)void 0!==h[x]&&w(h[x],!1);for(;y<=b;)void 0!==(l=p[b--])&&w(l,!1)}function w(e,t){var n=e._component;n?k(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||d(e),x(e))}function x(e){for(e=e.lastChild;e;){var t=e.previousSibling;w(e,!0),e=t}}function E(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||h(e,r,n[r],n[r]=void 0,H);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||h(e,r,n[r],n[r]=t[r],H)}function S(e){var t=e.constructor.name;(z[t]||(z[t]=[])).push(e)}function O(e,t,n){var r,o=z[e.name];if(e.prototype&&e.prototype.render?(r=new e(t,n),j.call(r,t,n)):(r=new j(t,n),r.constructor=e,r.render=T),o)for(var i=o.length;i--;)if(o[i].constructor===e){r.nextBase=o[i].nextBase,o.splice(i,1);break}return r}function T(e,t,n){return this.constructor(e,n)}function A(e,t,n,r,o){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||o?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===M.syncComponentUpdates&&e.base?s(e):P(e,1,o)),e.__ref&&e.__ref(e))}function P(e,t,n,r){if(!e._disable){var o,a,s,u=e.props,c=e.state,l=e.context,p=e.prevProps||u,d=e.prevState||c,h=e.prevContext||l,m=e.base,y=e.nextBase,g=m||y,_=e._component,x=!1;if(m&&(e.props=p,e.state=d,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(u,c,l)?x=!0:e.componentWillUpdate&&e.componentWillUpdate(u,c,l),e.props=u,e.state=c,e.context=l),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!x){o=e.render(u,c,l),e.getChildContext&&(l=i(i({},l),e.getChildContext()));var E,S,T=o&&o.nodeName;if("function"==typeof T){var C=f(o);a=_,a&&a.constructor===T&&C.key==a.__key?A(a,C,1,l,!1):(E=a,e._component=a=O(T,C,l),a.nextBase=a.nextBase||y,a._parentComponent=e,A(a,C,0,l,!1),P(a,1,n,!0)),S=a.base}else s=g,E=_,E&&(s=e._component=null),(g||1===t)&&(s&&(s._component=null),S=b(s,o,l,n||!m,g&&g.parentNode,!0));if(g&&S!==g&&a!==_){var j=g.parentNode;j&&S!==j&&(j.replaceChild(S,g),E||(g._component=null,w(g,!1)))}if(E&&k(E),e.base=S,S&&!r){for(var N=e,D=e;D=D._parentComponent;)(N=D).base=S;S._component=N,S._componentConstructor=N.constructor}}if(!m||n?U.unshift(e):x||(e.componentDidUpdate&&e.componentDidUpdate(p,d,h),M.afterUpdate&&M.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);G||r||v()}}function C(e,t,n,r){for(var o=e&&e._component,i=o,a=e,s=o&&e._componentConstructor===t.nodeName,u=s,c=f(t);o&&!u&&(o=o._parentComponent);)u=o.constructor===t.nodeName;return o&&u&&(!r||o._component)?(A(o,c,3,n,r),e=o.base):(i&&!s&&(k(i),e=a=null),o=O(t.nodeName,c,n),e&&!o.nextBase&&(o.nextBase=e,a=null),A(o,c,1,n,r),e=o.base,a&&e!==a&&(a._component=null,w(a,!1))),e}function k(e){M.beforeUnmount&&M.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?k(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,d(t),S(e),x(t)),e.__ref&&e.__ref(null)}function j(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function N(e,t,n){return b(n,e,{},!1,t,!1)}n.d(t,"a",function(){return o}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return j}),n.d(t,"c",function(){return N}),n.d(t,"b",function(){return M});var M={},D=[],L=[],R="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,I=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,B=[],U=[],G=0,H=!1,F=!1,z={};i(j.prototype,{setState:function(e,t){var n=this.state;this.prevState||(this.prevState=i({},n)),i(n,"function"==typeof e?e(n,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),s(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),P(this,2)},render:function(){}})},/*!******************************!*\468 function(e,t,n){"use strict";function r(){}function o(e,t){var n,o,i,a,s=L;for(a=arguments.length;a-- >2;)D.push(arguments[a]);for(t&&null!=t.children&&(D.length||D.push(t.children),delete t.children);D.length;)if((o=D.pop())&&void 0!==o.pop)for(a=o.length;a--;)D.push(o[a]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(i=!1)),i&&n?s[s.length-1]+=o:s===L?s=[o]:s.push(o),n=i;var u=new r;return u.nodeName=e,u.children=s,u.attributes=null==t?void 0:t,u.key=null==t?void 0:t.key,void 0!==M.vnode&&M.vnode(u),u}function i(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t){return o(e.nodeName,i(i({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function s(e){!e._dirty&&(e._dirty=!0)&&1==B.push(e)&&(M.debounceRendering||R)(u)}function u(){var e,t=B;for(B=[];e=t.pop();)e._dirty&&P(e)}function c(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&l(e,t.nodeName):n||e._componentConstructor===t.nodeName}function l(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function f(e){var t=i({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function p(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),r&&r(e);else if("class"!==t||o)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"==typeof r[i]&&!1===I.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,y,a):e.removeEventListener(t,y,a),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)m(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var s=o&&t!==(t=t.replace(/^xlink\:?/,""));null==r||!1===r?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function m(e,t,n){try{e[t]=n}catch(e){}}function y(e){return this._listeners[e.type](M.event&&M.event(e)||e)}function v(){for(var e;e=U.pop();)M.afterMount&&M.afterMount(e),e.componentDidMount&&e.componentDidMount()}function b(e,t,n,r,o,i){G++||(H=null!=o&&void 0!==o.ownerSVGElement,z=null!=e&&!("__preactattr_"in e));var a=g(e,t,n,r,i);return o&&a.parentNode!==o&&o.appendChild(a),--G||(z=!1,i||v()),a}function g(e,t,n,r,o){var i=e,a=H;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0))),i.__preactattr_=!0,i;var s=t.nodeName;if("function"==typeof s)return C(e,t,n,r);if(H="svg"===s||"foreignObject"!==s&&H,s=String(s),(!e||!l(e,s))&&(i=p(s,H),e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0)}var u=i.firstChild,c=i.__preactattr_,f=t.children;if(null==c){c=i.__preactattr_={};for(var d=i.attributes,h=d.length;h--;)c[d[h].name]=d[h].value}return!z&&f&&1===f.length&&"string"==typeof f[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=f[0]&&(u.nodeValue=f[0]):(f&&f.length||null!=u)&&_(i,f,n,r,z||null!=c.dangerouslySetInnerHTML),E(i,t.attributes,c),H=a,i}function _(e,t,n,r,o){var i,a,s,u,l,f=e.childNodes,p=[],h={},m=0,y=0,v=f.length,b=0,_=t?t.length:0;if(0!==v)for(var x=0;x<v;x++){var E=f[x],S=E.__preactattr_,O=_&&S?E._component?E._component.__key:S.key:null;null!=O?(m++,h[O]=E):(S||(void 0!==E.splitText?!o||E.nodeValue.trim():o))&&(p[b++]=E)}if(0!==_)for(var x=0;x<_;x++){u=t[x],l=null;var O=u.key;if(null!=O)m&&void 0!==h[O]&&(l=h[O],h[O]=void 0,m--);else if(!l&&y<b)for(i=y;i<b;i++)if(void 0!==p[i]&&c(a=p[i],u,o)){l=a,p[i]=void 0,i===b-1&&b--,i===y&&y++;break}l=g(l,u,n,r),s=f[x],l&&l!==e&&l!==s&&(null==s?e.appendChild(l):l===s.nextSibling?d(s):e.insertBefore(l,s))}if(m)for(var x in h)void 0!==h[x]&&w(h[x],!1);for(;y<=b;)void 0!==(l=p[b--])&&w(l,!1)}function w(e,t){var n=e._component;n?k(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||d(e),x(e))}function x(e){for(e=e.lastChild;e;){var t=e.previousSibling;w(e,!0),e=t}}function E(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||h(e,r,n[r],n[r]=void 0,H);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||h(e,r,n[r],n[r]=t[r],H)}function S(e){var t=e.constructor.name;(F[t]||(F[t]=[])).push(e)}function O(e,t,n){var r,o=F[e.name];if(e.prototype&&e.prototype.render?(r=new e(t,n),j.call(r,t,n)):(r=new j(t,n),r.constructor=e,r.render=T),o)for(var i=o.length;i--;)if(o[i].constructor===e){r.nextBase=o[i].nextBase,o.splice(i,1);break}return r}function T(e,t,n){return this.constructor(e,n)}function A(e,t,n,r,o){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||o?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===M.syncComponentUpdates&&e.base?s(e):P(e,1,o)),e.__ref&&e.__ref(e))}function P(e,t,n,r){if(!e._disable){var o,a,s,u=e.props,c=e.state,l=e.context,p=e.prevProps||u,d=e.prevState||c,h=e.prevContext||l,m=e.base,y=e.nextBase,g=m||y,_=e._component,x=!1;if(m&&(e.props=p,e.state=d,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(u,c,l)?x=!0:e.componentWillUpdate&&e.componentWillUpdate(u,c,l),e.props=u,e.state=c,e.context=l),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!x){o=e.render(u,c,l),e.getChildContext&&(l=i(i({},l),e.getChildContext()));var E,S,T=o&&o.nodeName;if("function"==typeof T){var C=f(o);a=_,a&&a.constructor===T&&C.key==a.__key?A(a,C,1,l,!1):(E=a,e._component=a=O(T,C,l),a.nextBase=a.nextBase||y,a._parentComponent=e,A(a,C,0,l,!1),P(a,1,n,!0)),S=a.base}else s=g,E=_,E&&(s=e._component=null),(g||1===t)&&(s&&(s._component=null),S=b(s,o,l,n||!m,g&&g.parentNode,!0));if(g&&S!==g&&a!==_){var j=g.parentNode;j&&S!==j&&(j.replaceChild(S,g),E||(g._component=null,w(g,!1)))}if(E&&k(E),e.base=S,S&&!r){for(var N=e,D=e;D=D._parentComponent;)(N=D).base=S;S._component=N,S._componentConstructor=N.constructor}}if(!m||n?U.unshift(e):x||(e.componentDidUpdate&&e.componentDidUpdate(p,d,h),M.afterUpdate&&M.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);G||r||v()}}function C(e,t,n,r){for(var o=e&&e._component,i=o,a=e,s=o&&e._componentConstructor===t.nodeName,u=s,c=f(t);o&&!u&&(o=o._parentComponent);)u=o.constructor===t.nodeName;return o&&u&&(!r||o._component)?(A(o,c,3,n,r),e=o.base):(i&&!s&&(k(i),e=a=null),o=O(t.nodeName,c,n),e&&!o.nextBase&&(o.nextBase=e,a=null),A(o,c,1,n,r),e=o.base,a&&e!==a&&(a._component=null,w(a,!1))),e}function k(e){M.beforeUnmount&&M.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?k(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,d(t),S(e),x(t)),e.__ref&&e.__ref(null)}function j(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function N(e,t,n){return b(n,e,{},!1,t,!1)}n.d(t,"a",function(){return o}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return j}),n.d(t,"c",function(){return N}),n.d(t,"b",function(){return M});var M={},D=[],L=[],R="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,I=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,B=[],U=[],G=0,H=!1,z=!1,F={};i(j.prototype,{setState:function(e,t){var n=this.state;this.prevState||(this.prevState=i({},n)),i(n,"function"==typeof e?e(n,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),s(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),P(this,2)},render:function(){}})},/*!******************************!*\ 469 469 !*** ./~/process/browser.js ***! 470 470 \******************************/ -
conversation-watson/tags/0.7.0/css/chatbox.css
r1878701 r1883416 334 334 border-radius: 50%; 335 335 margin-right: 4px; 336 background-color: white; 336 337 337 338 -webkit-animation: jump 1.5s ease-in-out 0s infinite normal ; … … 393 394 border: 0; 394 395 padding: 0 0.75em; 396 margin: 0; 395 397 background-color: #fff; 396 398 color: #333; -
conversation-watson/tags/0.7.0/css/settings.css
r1871849 r1883416 1 1 a:hover { 2 2 cursor: pointer; 3 } 4 5 ul 6 { 7 list-style-position: inside; 8 list-style-type: disc; 3 9 } 4 10 -
conversation-watson/tags/0.7.0/includes/frontend.php
r1878701 r1883416 8 8 9 9 class Frontend { 10 const VERSION = '0. 6.10';10 const VERSION = '0.7.0'; 11 11 12 12 public static function enqueue_styles($force_full_screen = null) { … … 231 231 ); 232 232 233 $full_screen_settings = get_option('watsonconv_full_screen'); 234 $full_screen_query = isset($full_screen_settings['query']) ? 235 $full_screen_settings['query'] : '@media screen and (max-width:640px) { %s }'; 236 233 237 return array( 234 238 'delay' => (int) get_option('watsonconv_delay', 0), … … 238 242 'clearText' => get_option('watsonconv_clear_text', 'Clear Messages'), 239 243 'messagePrompt' => get_option('watsonconv_message_prompt', 'Type a Message'), 240 'fullScreen ' => get_option('watsonconv_full_screen', 'no'),244 'fullScreenQuery' => $full_screen_query, 241 245 'showSendBtn' => get_option('watsonconv_send_btn', 'no'), 242 246 'typingDelay' => get_option('watsonconv_typing_delay', 'no'), -
conversation-watson/tags/0.7.0/watson.php
r1878701 r1883416 5 5 Author: IBM Cognitive Class 6 6 Author URI: https://cognitiveclass.ai 7 Version: 0. 6.107 Version: 0.7.0 8 8 Text Domain: watsonconv 9 9 */ … … 35 35 36 36 require_once(WATSON_CONV_PATH.'vendor/autoload.php'); 37 require_once(WATSON_CONV_PATH.'includes/settings .php');37 require_once(WATSON_CONV_PATH.'includes/settings/main.php'); 38 38 require_once(WATSON_CONV_PATH.'includes/frontend.php'); 39 39 require_once(WATSON_CONV_PATH.'includes/api.php'); -
conversation-watson/trunk/Readme.txt
r1878701 r1883416 4 4 Requires at least: 4.7 5 5 Tested up to: 4.9 6 Stable tag: 0. 6.106 Stable tag: 0.7.0 7 7 License: Apache v2.0 8 8 License URI: http://www.apache.org/licenses/LICENSE-2.0 … … 18 18 Currently supported features: 19 19 20 * **All New:**Use user's account data such as name in chatbot dialog20 * Use user's account data such as name in chatbot dialog 21 21 * Easy VOIP calling powered by Twilio for users to contact a real person if they wish 22 22 * Simple plugin setup to get your Watson Assistant chatbot available to users as soon as possible … … 87 87 88 88 == Changelog == 89 90 = 0.7.0 = 91 * Reorganized and moved settings to top-level menu 92 * Fixed chat box minimize bug 93 * Fixed issue with chat box disappearing sometimes 89 94 90 95 = 0.6.10 = -
conversation-watson/trunk/app.js
r1878701 r1883416 5 5 !*** ./~/preact-compat/dist/preact-compat.es.js ***! 6 6 \**************************************************/ 7 function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(){return null}function o(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&w(e.attributes,t.defaultProps),n&&w(e.attributes,n)}function i(e,t){var n,r,o;if(t){for(o in t)if(n=V.test(o))break;if(n){r=e.attributes={};for(o in t)t.hasOwnProperty(o)&&(r[V.test(o)?o.replace(/([A-Z0-9])/,"-$1").toLowerCase():o]=t[o])}}}function a(e,t,r){var o=t&&t._preactCompatRendered&&t._preactCompatRendered.base;o&&o.parentNode!==t&&(o=null),!o&&t&&(o=t.firstElementChild);for(var i=t.childNodes.length;i--;)t.childNodes[i]!==o&&t.removeChild(t.childNodes[i]);var a=n.i(U.c)(e,t,o);return t&&(t._preactCompatRendered=a&&(a._component||{base:a})),"function"==typeof r&&r(),a&&a._component||a}function s(e,t,r,o){var i=n.i(U.a)($,{context:e.context},t),s=a(i,r),u=s._component||s.base;return o&&o.call(u,s),u}function u(e){var t=e._preactCompatRendered&&e._preactCompatRendered.base;return!(!t||t.parentNode!==e)&&(n.i(U.c)(n.i(U.a)(r),e,t),!0)}function c(e){return h.bind(null,e)}function l(e,t){for(var n=t||0;n<e.length;n++){var r=e[n];Array.isArray(r)?l(r):r&&"object"==typeof r&&!v(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(e[n]=h(r.type||r.nodeName,r.props||r.attributes,r.children))}}function f(e){return"function"==typeof e&&!(e.prototype&&e.prototype.render)}function p(e){return O({displayName:e.displayName||e.name,render:function(){return e(this.props,this.context)}})}function d(e){var t=e[ z];return t?!0===t?e:t:(t=p(e),Object.defineProperty(t,z,{configurable:!0,value:!0}),t.displayName=e.displayName,t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,Object.defineProperty(e,z,{configurable:!0,value:t}),t)}function h(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return l(e,2),m(U.a.apply(void 0,e))}function m(e){e.preactCompatNormalized=!0,_(e),f(e.nodeName)&&(e.nodeName=d(e.nodeName));var t=e.attributes.ref,n=t&&typeof t;return!Q||"string"!==n&&"number"!==n||(e.attributes.ref=b(t,Q)),g(e),e}function y(e,t){for(var r=[],o=arguments.length-2;o-- >0;)r[o]=arguments[o+2];if(!v(e))return e;var i=e.attributes||e.props,a=n.i(U.a)(e.nodeName||e.type,i,e.children||i&&i.children),s=[a,t];return r&&r.length?s.push(r):t&&t.children&&s.push(t.children),m(U.d.apply(void 0,s))}function v(e){return e&&(e instanceof q||e.$$typeof===F)}function b(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}function g(e){var t=e.nodeName,n=e.attributes;if(n&&"string"==typeof t){var r={};for(var o in n)r[o.toLowerCase()]=o;if(r.ondoubleclick&&(n.ondblclick=n[r.ondoubleclick],delete n[r.ondoubleclick]),r.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var i=r.oninput||"oninput";n[i]||(n[i]=k([n[i],n[r.onchange]]),delete n[r.onchange])}}}function _(e){var t=e.attributes||(e.attributes={});re.enumerable="className"in t,t.className&&(t.class=t.className),Object.defineProperty(t,"className",re)}function w(e,t){for(var n=arguments,r=1,o=void 0;r<arguments.length;r++)if(o=n[r])for(var i in o)o.hasOwnProperty(i)&&(e[i]=o[i]);return e}function x(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}function E(e){return e&&e.base||e}function S(){}function O(e){function t(e,t){P(this),L.call(this,e,t,Y),j.call(this,e,t)}return e=w({constructor:t},e),e.mixins&&A(e,T(e.mixins)),e.statics&&w(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps()),S.prototype=L.prototype,t.prototype=w(new S,e),t.displayName=e.displayName||"Component",t}function T(e){for(var t={},n=0;n<e.length;n++){var r=e[n];for(var o in r)r.hasOwnProperty(o)&&"function"==typeof r[o]&&(t[o]||(t[o]=[])).push(r[o])}return t}function A(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=k(t[n].concat(e[n]||Z),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}function P(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||W.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function C(e,t,n){if("string"==typeof t&&(t=e.constructor.prototype[t]),"function"==typeof t)return t.apply(e,n)}function k(e,t){return function(){for(var n,r=arguments,o=this,i=0;i<e.length;i++){var a=C(o,e[i],r);if(t&&null!=a){n||(n={});for(var s in a)a.hasOwnProperty(s)&&(n[s]=a[s])}else void 0!==a&&(n=a)}return n}}function j(e,t){N.call(this,e,t),this.componentWillReceiveProps=k([N,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=k([N,M,this.render||"render",D])}function N(e,t){if(e){var n=e.children;if(n&&Array.isArray(n)&&1===n.length&&("string"==typeof n[0]||"function"==typeof n[0]||n[0]instanceof q)&&(e.children=n[0],e.children&&"object"==typeof e.children&&(e.children.length=1,e.children[0]=e.children)),X){var r="function"==typeof this?this:this.constructor,o=this.propTypes||r.propTypes,i=this.displayName||r.name;o&&B.a.checkPropTypes(o,e,"prop",i)}}}function M(e){Q=this}function D(){Q===this&&(Q=null)}function L(e,t,n){U.e.call(this,e,t),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==Y&&j.call(this,e,t)}function R(e,t){L.call(this,e,t)}n.d(t,"version",function(){return G}),n.d(t,"DOM",function(){return te}),n.d(t,"Children",function(){return ee}),n.d(t,"render",function(){return a}),n.d(t,"createClass",function(){return O}),n.d(t,"createFactory",function(){return c}),n.d(t,"createElement",function(){return h}),n.d(t,"cloneElement",function(){return y}),n.d(t,"isValidElement",function(){return v}),n.d(t,"findDOMNode",function(){return E}),n.d(t,"unmountComponentAtNode",function(){return u}),n.d(t,"Component",function(){return L}),n.d(t,"PureComponent",function(){return R}),n.d(t,"unstable_renderSubtreeIntoContainer",function(){return s}),n.d(t,"__spread",function(){return w});var I=n(/*! prop-types */21),B=n.n(I),U=n(/*! preact */148);n.d(t,"PropTypes",function(){return B.a});var G="15.1.0",H="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),F="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,z="undefined"!=typeof Symbol?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",W={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},V=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,Y={},X=void 0===e||!e.env||!1,q=n.i(U.a)("a",null).constructor;q.prototype.$$typeof=F,q.prototype.preactCompatUpgraded=!1,q.prototype.preactCompatNormalized=!1,Object.defineProperty(q.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty(q.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var K=U.b.event;U.b.event=function(e){return K&&(e=K(e)),e.persist=Object,e.nativeEvent=e,e};var J=U.b.vnode;U.b.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes=w({},e.attributes);"function"==typeof t?(!0===t[z]||t.prototype&&"isReactComponent"in t.prototype)&&(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),e.preactCompatNormalized||m(e),o(e)):(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),i(e,n))}J&&J(e)};var $=function(){};$.prototype.getChildContext=function(){return this.props.context},$.prototype.render=function(e){return e.children[0]};for(var Q,Z=[],ee={map:function(e,t,n){return null==e?null:(e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t))},forEach:function(e,t,n){if(null==e)return null;e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(e=ee.toArray(e),1!==e.length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:Z.concat(e)}},te={},ne=H.length;ne--;)te[H[ne]]=c(H[ne]);var re={configurable:!0,get:function(){return this.class},set:function(e){this.class=e}};w(L.prototype=new U.e,{constructor:L,isReactComponent:{},replaceState:function(e,t){var n=this;this.setState(e,t);for(var r in n.state)r in e||delete n.state[r]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),S.prototype=L.prototype,R.prototype=new S,R.prototype.isPureReactComponent=!0,R.prototype.shouldComponentUpdate=function(e,t){return x(this.props,e)||x(this.state,t)};var oe={version:G,DOM:te,PropTypes:B.a,Children:ee,render:a,createClass:O,createFactory:c,createElement:h,cloneElement:y,isValidElement:v,findDOMNode:E,unmountComponentAtNode:u,Component:L,PureComponent:R,unstable_renderSubtreeIntoContainer:s,__spread:w};t.default=oe}.call(t,n(/*! ./../../process/browser.js */149))},/*!*****************************************!*\7 function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(){return null}function o(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&w(e.attributes,t.defaultProps),n&&w(e.attributes,n)}function i(e,t){var n,r,o;if(t){for(o in t)if(n=V.test(o))break;if(n){r=e.attributes={};for(o in t)t.hasOwnProperty(o)&&(r[V.test(o)?o.replace(/([A-Z0-9])/,"-$1").toLowerCase():o]=t[o])}}}function a(e,t,r){var o=t&&t._preactCompatRendered&&t._preactCompatRendered.base;o&&o.parentNode!==t&&(o=null),!o&&t&&(o=t.firstElementChild);for(var i=t.childNodes.length;i--;)t.childNodes[i]!==o&&t.removeChild(t.childNodes[i]);var a=n.i(U.c)(e,t,o);return t&&(t._preactCompatRendered=a&&(a._component||{base:a})),"function"==typeof r&&r(),a&&a._component||a}function s(e,t,r,o){var i=n.i(U.a)($,{context:e.context},t),s=a(i,r),u=s._component||s.base;return o&&o.call(u,s),u}function u(e){var t=e._preactCompatRendered&&e._preactCompatRendered.base;return!(!t||t.parentNode!==e)&&(n.i(U.c)(n.i(U.a)(r),e,t),!0)}function c(e){return h.bind(null,e)}function l(e,t){for(var n=t||0;n<e.length;n++){var r=e[n];Array.isArray(r)?l(r):r&&"object"==typeof r&&!v(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(e[n]=h(r.type||r.nodeName,r.props||r.attributes,r.children))}}function f(e){return"function"==typeof e&&!(e.prototype&&e.prototype.render)}function p(e){return O({displayName:e.displayName||e.name,render:function(){return e(this.props,this.context)}})}function d(e){var t=e[F];return t?!0===t?e:t:(t=p(e),Object.defineProperty(t,F,{configurable:!0,value:!0}),t.displayName=e.displayName,t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,Object.defineProperty(e,F,{configurable:!0,value:t}),t)}function h(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return l(e,2),m(U.a.apply(void 0,e))}function m(e){e.preactCompatNormalized=!0,_(e),f(e.nodeName)&&(e.nodeName=d(e.nodeName));var t=e.attributes.ref,n=t&&typeof t;return!Q||"string"!==n&&"number"!==n||(e.attributes.ref=b(t,Q)),g(e),e}function y(e,t){for(var r=[],o=arguments.length-2;o-- >0;)r[o]=arguments[o+2];if(!v(e))return e;var i=e.attributes||e.props,a=n.i(U.a)(e.nodeName||e.type,i,e.children||i&&i.children),s=[a,t];return r&&r.length?s.push(r):t&&t.children&&s.push(t.children),m(U.d.apply(void 0,s))}function v(e){return e&&(e instanceof q||e.$$typeof===z)}function b(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}function g(e){var t=e.nodeName,n=e.attributes;if(n&&"string"==typeof t){var r={};for(var o in n)r[o.toLowerCase()]=o;if(r.ondoubleclick&&(n.ondblclick=n[r.ondoubleclick],delete n[r.ondoubleclick]),r.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var i=r.oninput||"oninput";n[i]||(n[i]=k([n[i],n[r.onchange]]),delete n[r.onchange])}}}function _(e){var t=e.attributes||(e.attributes={});re.enumerable="className"in t,t.className&&(t.class=t.className),Object.defineProperty(t,"className",re)}function w(e,t){for(var n=arguments,r=1,o=void 0;r<arguments.length;r++)if(o=n[r])for(var i in o)o.hasOwnProperty(i)&&(e[i]=o[i]);return e}function x(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}function E(e){return e&&e.base||e}function S(){}function O(e){function t(e,t){P(this),L.call(this,e,t,Y),j.call(this,e,t)}return e=w({constructor:t},e),e.mixins&&A(e,T(e.mixins)),e.statics&&w(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps()),S.prototype=L.prototype,t.prototype=w(new S,e),t.displayName=e.displayName||"Component",t}function T(e){for(var t={},n=0;n<e.length;n++){var r=e[n];for(var o in r)r.hasOwnProperty(o)&&"function"==typeof r[o]&&(t[o]||(t[o]=[])).push(r[o])}return t}function A(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=k(t[n].concat(e[n]||Z),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}function P(e){for(var t in e){var n=e[t];"function"!=typeof n||n.__bound||W.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function C(e,t,n){if("string"==typeof t&&(t=e.constructor.prototype[t]),"function"==typeof t)return t.apply(e,n)}function k(e,t){return function(){for(var n,r=arguments,o=this,i=0;i<e.length;i++){var a=C(o,e[i],r);if(t&&null!=a){n||(n={});for(var s in a)a.hasOwnProperty(s)&&(n[s]=a[s])}else void 0!==a&&(n=a)}return n}}function j(e,t){N.call(this,e,t),this.componentWillReceiveProps=k([N,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=k([N,M,this.render||"render",D])}function N(e,t){if(e){var n=e.children;if(n&&Array.isArray(n)&&1===n.length&&("string"==typeof n[0]||"function"==typeof n[0]||n[0]instanceof q)&&(e.children=n[0],e.children&&"object"==typeof e.children&&(e.children.length=1,e.children[0]=e.children)),X){var r="function"==typeof this?this:this.constructor,o=this.propTypes||r.propTypes,i=this.displayName||r.name;o&&B.a.checkPropTypes(o,e,"prop",i)}}}function M(e){Q=this}function D(){Q===this&&(Q=null)}function L(e,t,n){U.e.call(this,e,t),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==Y&&j.call(this,e,t)}function R(e,t){L.call(this,e,t)}n.d(t,"version",function(){return G}),n.d(t,"DOM",function(){return te}),n.d(t,"Children",function(){return ee}),n.d(t,"render",function(){return a}),n.d(t,"createClass",function(){return O}),n.d(t,"createFactory",function(){return c}),n.d(t,"createElement",function(){return h}),n.d(t,"cloneElement",function(){return y}),n.d(t,"isValidElement",function(){return v}),n.d(t,"findDOMNode",function(){return E}),n.d(t,"unmountComponentAtNode",function(){return u}),n.d(t,"Component",function(){return L}),n.d(t,"PureComponent",function(){return R}),n.d(t,"unstable_renderSubtreeIntoContainer",function(){return s}),n.d(t,"__spread",function(){return w});var I=n(/*! prop-types */21),B=n.n(I),U=n(/*! preact */148);n.d(t,"PropTypes",function(){return B.a});var G="15.1.0",H="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,F="undefined"!=typeof Symbol?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",W={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},V=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,Y={},X=void 0===e||!e.env||!1,q=n.i(U.a)("a",null).constructor;q.prototype.$$typeof=z,q.prototype.preactCompatUpgraded=!1,q.prototype.preactCompatNormalized=!1,Object.defineProperty(q.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty(q.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var K=U.b.event;U.b.event=function(e){return K&&(e=K(e)),e.persist=Object,e.nativeEvent=e,e};var J=U.b.vnode;U.b.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes=w({},e.attributes);"function"==typeof t?(!0===t[F]||t.prototype&&"isReactComponent"in t.prototype)&&(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),e.preactCompatNormalized||m(e),o(e)):(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),i(e,n))}J&&J(e)};var $=function(){};$.prototype.getChildContext=function(){return this.props.context},$.prototype.render=function(e){return e.children[0]};for(var Q,Z=[],ee={map:function(e,t,n){return null==e?null:(e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t))},forEach:function(e,t,n){if(null==e)return null;e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(e=ee.toArray(e),1!==e.length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:Z.concat(e)}},te={},ne=H.length;ne--;)te[H[ne]]=c(H[ne]);var re={configurable:!0,get:function(){return this.class},set:function(e){this.class=e}};w(L.prototype=new U.e,{constructor:L,isReactComponent:{},replaceState:function(e,t){var n=this;this.setState(e,t);for(var r in n.state)r in e||delete n.state[r]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),S.prototype=L.prototype,R.prototype=new S,R.prototype.isPureReactComponent=!0,R.prototype.shouldComponentUpdate=function(e,t){return x(this.props,e)||x(this.state,t)};var oe={version:G,DOM:te,PropTypes:B.a,Children:ee,render:a,createClass:O,createFactory:c,createElement:h,cloneElement:y,isValidElement:v,findDOMNode:E,unmountComponentAtNode:u,Component:L,PureComponent:R,unstable_renderSubtreeIntoContainer:s,__spread:w};t.default=oe}.call(t,n(/*! ./../../process/browser.js */149))},/*!*****************************************!*\ 8 8 !*** ./~/core-js/modules/_is-object.js ***! 9 9 \*****************************************/ … … 149 149 !*** ./src/ChatBox.jsx ***! 150 150 \*************************/ 151 function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(/*! react */1),l=r(c),f=n(/*! react-tooltip-currenttarget */160),p=r(f),d=n(/*! webrtcsupport */172),h=r(d),m=n(/*! jstz */147),y=r(m),v=n(/*! ./MessageGroup */86),b=r(v),g=n(/*! ./InputBox.jsx */83),_=r(g),w=n(/*! ./CallInterface.jsx */81),x=r(w);n(/*! whatwg-fetch */173);var E=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return"undefined"!=typeof sessionStorage&&sessionStorage.getItem("watson_bot_state")?(n.state=JSON.parse(sessionStorage.getItem("watson_bot_state")),Object.assign(n.state.context,watsonconvSettings.context,{timezone:y.default.determine().name()})):(n.state={messages:[],context:watsonconvSettings.context,showCallInterface:!1,mediaSecure:!0,convStarted:!1},Object.assign(n.state.context,{timezone:y.default.determine().name()})),n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this;void 0!==this.messageList&&(this.messageList.scrollTop=this.messageList.scrollHeight),this.state.convStarted||this.props.isMinimized||this.sendMessage(),h.default.support&&"https:"!==document.location.protocol&&navigator.mediaDevices.getUserMedia({video:{width:{min:2,max:1}}}).then(function(e){console.log("getUserMedia detection failed"),e.getTracks().forEach(function(e){return e.stop()})}).catch(function(t){switch(t.name){case"NotSupportedError":case"NotAllowedError":case"SecurityError":console.log("Can't access microphone in http"),e.setState({mediaSecure:!1})}})}},{key:"componentDidUpdate",value:function(e,t){this.state.convStarted||this.props.isMinimized||this.sendMessage(),t.messages.length!==this.state.messages.length&&void 0!==this.messageList&&this.scrollToBottom()}},{key:"toggleCallInterface",value:function(){this.setState({showCallInterface:!this.state.showCallInterface})}},{key:"scrollToBottom",value:function(){jQuery(this.messageList).stop().animate({scrollTop:this.messageList.scrollHeight})}},{key:"sendMessage",value:function(e){var t=this;this.state.convStarted||this.setState({convStarted:!0}),fetch("?rest_route=/watsonconv/v1/message",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({input:{text:e},context:this.state.context})}).then(function(e){if(!e.ok)throw Error("Message could not be sent.");return e.json()}).then(function(e){var n=e.output.text;t.setState({context:e.context,messages:t.state.messages.concat({from:"watson",text:Array.isArray(n)?n:[n],options:e.output.options,loadedMessages:"yes"===watsonconvSettings.typingDelay?0:n.length})},t.saveState.bind(t))}).catch(function(e){console.log(e)}),e&&this.setState({messages:this.state.messages.concat({from:"user",text:[e],loadedMessages:1})})}},{key:"reset",value:function(){this.setState({messages:[],context:null}),this.sendMessage()}},{key:"incLoadedMessages",value:function(e){var t=this.state.messages.slice();t[e]=s({},t[e],{loadedMessages:t[e].loadedMessages+1}),this.setState({messages:t},this.saveState.bind(this))}},{key:"saveState",value:function(){"undefined"!=typeof sessionStorage&&sessionStorage.setItem("watson_bot_state",JSON.stringify(this.state))}},{key:"render",value:function(){var e=this,t=watsonconvSettings,n=t.callConfig,r=t.clearText,o=watsonconvSettings.position||["bottom","right"],i=this.state.showCallInterface,a="yes"==n.useTwilio&&n.configured&&h.default.support&&this.state.mediaSecure,s=Boolean(n.recipient);return l.default.createElement("div",{id:"watson-box",className:"drop-shadow animated"},l.default.createElement("div",{id:"watson-header",className:"watson-font"},l.default.createElement("span",{className:"dashicons dashicons-arrow-"+("bottom"==o[0]?"down":"up")+"-alt2 header-button minimize-button"}),l.default.createElement("span",{onClick:this.reset.bind(this),className:"dashicons dashicons-trash header-button","data-tip":r||"Clear Messages"}),s&&l.default.createElement("span",{onClick:this.toggleCallInterface.bind(this),className:"dashicons dashicons-phone header-button","data-tip":n.callTooltip||"Talk to a Live Agent"}),l.default.createElement(p.default,null),l.default.createElement("div",{className:"overflow-hidden watson-font"},watsonconvSettings.title)),l.default.createElement("div",{id:"chatbox-body"},s&&i&&l.default.createElement(x.default,{allowTwilio:a}),l.default.createElement("div",{id:"message-container"},l.default.createElement("div",{id:"messages",ref:function(t){e.messageList=t}},this.state.messages.map(function(t,n){return l.default.createElement(b.default,{message:t,key:n,index:n,sendMessage:e.sendMessage.bind(e),incLoaded:e.incLoadedMessages.bind(e),scroll:e.scrollToBottom.bind(e)})}))),l.default.createElement(_.default,{sendMessage:this.sendMessage.bind(this)})))}}]),t}(c.Component);t.default=E},/*!************************************!*\151 function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(/*! react */1),l=r(c),f=n(/*! react-tooltip-currenttarget */160),p=r(f),d=n(/*! webrtcsupport */172),h=r(d),m=n(/*! jstz */147),y=r(m),v=n(/*! ./MessageGroup */86),b=r(v),g=n(/*! ./InputBox.jsx */83),_=r(g),w=n(/*! ./CallInterface.jsx */81),x=r(w);n(/*! whatwg-fetch */173);var E=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return"undefined"!=typeof sessionStorage&&sessionStorage.getItem("watson_bot_state")?(n.state=JSON.parse(sessionStorage.getItem("watson_bot_state")),Object.assign(n.state.context,watsonconvSettings.context,{timezone:y.default.determine().name()})):(n.state={messages:[],context:watsonconvSettings.context,showCallInterface:!1,mediaSecure:!0,convStarted:!1},Object.assign(n.state.context,{timezone:y.default.determine().name()})),n}return a(t,e),u(t,[{key:"componentDidMount",value:function(){var e=this;void 0!==this.messageList&&(this.messageList.scrollTop=this.messageList.scrollHeight),this.state.convStarted||this.props.isMinimized||this.sendMessage(),h.default.support&&"https:"!==document.location.protocol&&navigator.mediaDevices.getUserMedia({video:{width:{min:2,max:1}}}).then(function(e){console.log("getUserMedia detection failed"),e.getTracks().forEach(function(e){return e.stop()})}).catch(function(t){switch(t.name){case"NotSupportedError":case"NotAllowedError":case"SecurityError":console.log("Can't access microphone in http"),e.setState({mediaSecure:!1})}})}},{key:"componentDidUpdate",value:function(e,t){this.state.convStarted||this.props.isMinimized||this.sendMessage(),t.messages.length!==this.state.messages.length&&void 0!==this.messageList&&this.scrollToBottom()}},{key:"toggleCallInterface",value:function(){this.setState({showCallInterface:!this.state.showCallInterface})}},{key:"scrollToBottom",value:function(){jQuery(this.messageList).stop().animate({scrollTop:this.messageList.scrollHeight})}},{key:"sendMessage",value:function(e){var t=this;this.state.convStarted||this.setState({convStarted:!0}),fetch("?rest_route=/watsonconv/v1/message",{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({input:{text:e},context:this.state.context})}).then(function(e){if(!e.ok)throw Error("Message could not be sent.");return e.json()}).then(function(e){var n=e.output.text;t.setState({context:e.context,messages:t.state.messages.concat({from:"watson",text:Array.isArray(n)?n:[n],options:e.output.options,loadedMessages:"yes"===watsonconvSettings.typingDelay?0:n.length})},t.saveState.bind(t))}).catch(function(e){console.log(e)}),e&&this.setState({messages:this.state.messages.concat({from:"user",text:[e],loadedMessages:1})})}},{key:"reset",value:function(){this.setState({messages:[],context:null}),this.sendMessage()}},{key:"incLoadedMessages",value:function(e){var t=this.state.messages.slice();t[e]=s({},t[e],{loadedMessages:t[e].loadedMessages+1}),this.setState({messages:t},this.saveState.bind(this))}},{key:"saveState",value:function(){"undefined"!=typeof sessionStorage&&sessionStorage.setItem("watson_bot_state",JSON.stringify(this.state))}},{key:"render",value:function(){var e=this,t=watsonconvSettings,n=t.callConfig,r=t.clearText,o=watsonconvSettings.position||["bottom","right"],i=this.state.showCallInterface,a="yes"==n.useTwilio&&n.configured&&h.default.support&&this.state.mediaSecure,s=Boolean(n.recipient);return l.default.createElement("div",{id:"watson-box",className:"drop-shadow animated"},l.default.createElement("div",{id:"watson-header",className:"watson-font"},l.default.createElement("span",{className:"dashicons \n dashicons-arrow-"+("bottom"==o[0]?"down":"up")+"-alt2 \n header-button minimize-button",onClick:this.props.toggleMinimize}),l.default.createElement("span",{onClick:this.reset.bind(this),className:"dashicons dashicons-trash header-button","data-tip":r||"Clear Messages"}),s&&l.default.createElement("span",{onClick:this.toggleCallInterface.bind(this),className:"dashicons dashicons-phone header-button","data-tip":n.callTooltip||"Talk to a Live Agent"}),l.default.createElement(p.default,null),l.default.createElement("div",{className:"overflow-hidden watson-font"},watsonconvSettings.title)),l.default.createElement("div",{id:"chatbox-body"},s&&i&&l.default.createElement(x.default,{allowTwilio:a}),l.default.createElement("div",{id:"message-container"},l.default.createElement("div",{id:"messages",ref:function(t){e.messageList=t}},this.state.messages.map(function(t,n){return l.default.createElement(b.default,{message:t,key:n,index:n,sendMessage:e.sendMessage.bind(e),incLoaded:e.incLoadedMessages.bind(e),scroll:e.scrollToBottom.bind(e)})}))),l.default.createElement(_.default,{sendMessage:this.sendMessage.bind(this)})))}}]),t}(c.Component);t.default=E},/*!************************************!*\ 152 152 !*** ./~/core-js/modules/_html.js ***! 153 153 \************************************/ … … 216 216 !*** ./~/core-js/modules/es6.symbol.js ***! 217 217 \*****************************************/ 218 function(e,t,n){"use strict";var r=n(/*! ./_global */3),o=n(/*! ./_has */12),i=n(/*! ./_descriptors */5),a=n(/*! ./_export */0),s=n(/*! ./_redefine */17),u=n(/*! ./_meta */20).KEY,c=n(/*! ./_fails */11),l=n(/*! ./_shared */46),f=n(/*! ./_set-to-string-tag */28),p=n(/*! ./_uid */30),d=n(/*! ./_wks */4),h=n(/*! ./_wks-ext */69),m=n(/*! ./_wks-define */48),y=n(/*! ./_enum-keys */94),v=n(/*! ./_is-array */98),b=n(/*! ./_an-object */8),g=n(/*! ./_is-object */2),_=n(/*! ./_to-iobject */10),w=n(/*! ./_to-primitive */29),x=n(/*! ./_property-desc */27),E=n(/*! ./_object-create */25),S=n(/*! ./_object-gopn-ext */57),O=n(/*! ./_object-gopd */15),T=n(/*! ./_object-dp */6),A=n(/*! ./_object-keys */16),P=O.f,C=T.f,k=S.f,j=r.Symbol,N=r.JSON,M=N&&N.stringify,D=d("_hidden"),L=d("toPrimitive"),R={}.propertyIsEnumerable,I=l("symbol-registry"),B=l("symbols"),U=l("op-symbols"),G=Object.prototype,H="function"==typeof j, F=r.QObject,z=!F||!F.prototype||!F.prototype.findChild,W=i&&c(function(){return 7!=E(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(G,t);r&&delete G[t],C(e,t,n),r&&e!==G&&C(G,t,r)}:C,V=function(e){var t=B[e]=E(j.prototype);return t._k=e,t},Y=H&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},X=function(e,t,n){return e===G&&X(U,t,n),b(e),t=w(t,!0),b(n),o(B,t)?(n.enumerable?(o(e,D)&&e[D][t]&&(e[D][t]=!1),n=E(n,{enumerable:x(0,!1)})):(o(e,D)||C(e,D,x(1,{})),e[D][t]=!0),W(e,t,n)):C(e,t,n)},q=function(e,t){b(e);for(var n,r=y(t=_(t)),o=0,i=r.length;i>o;)X(e,n=r[o++],t[n]);return e},K=function(e,t){return void 0===t?E(e):q(E(e),t)},J=function(e){var t=R.call(this,e=w(e,!0));return!(this===G&&o(B,e)&&!o(U,e))&&(!(t||!o(this,e)||!o(B,e)||o(this,D)&&this[D][e])||t)},$=function(e,t){if(e=_(e),t=w(t,!0),e!==G||!o(B,t)||o(U,t)){var n=P(e,t);return!n||!o(B,t)||o(e,D)&&e[D][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=k(_(e)),r=[],i=0;n.length>i;)o(B,t=n[i++])||t==D||t==u||r.push(t);return r},Z=function(e){for(var t,n=e===G,r=k(n?U:_(e)),i=[],a=0;r.length>a;)!o(B,t=r[a++])||n&&!o(G,t)||i.push(B[t]);return i};H||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===G&&t.call(U,n),o(this,D)&&o(this[D],e)&&(this[D][e]=!1),W(this,e,x(1,n))};return i&&z&&W(G,e,{configurable:!0,set:t}),V(e)},s(j.prototype,"toString",function(){return this._k}),O.f=$,T.f=X,n(/*! ./_object-gopn */43).f=S.f=Q,n(/*! ./_object-pie */26).f=J,n(/*! ./_object-gops */33).f=Z,i&&!n(/*! ./_library */24)&&s(G,"propertyIsEnumerable",J,!0),h.f=function(e){return V(d(e))}),a(a.G+a.W+a.F*!H,{Symbol:j});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)d(ee[te++]);for(var ne=A(d.store),re=0;ne.length>re;)m(ne[re++]);a(a.S+a.F*!H,"Symbol",{for:function(e){return o(I,e+="")?I[e]:I[e]=j(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in I)if(I[t]===e)return t},useSetter:function(){z=!0},useSimple:function(){z=!1}}),a(a.S+a.F*!H,"Object",{create:K,defineProperty:X,defineProperties:q,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),N&&a(a.S+a.F*(!H||c(function(){var e=j();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(g(t)||void 0!==e)&&!Y(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,M.apply(N,r)}}),j.prototype[L]||n(/*! ./_hide */14)(j.prototype,L,j.prototype.valueOf),f(j,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},/*!***********************************************!*\218 function(e,t,n){"use strict";var r=n(/*! ./_global */3),o=n(/*! ./_has */12),i=n(/*! ./_descriptors */5),a=n(/*! ./_export */0),s=n(/*! ./_redefine */17),u=n(/*! ./_meta */20).KEY,c=n(/*! ./_fails */11),l=n(/*! ./_shared */46),f=n(/*! ./_set-to-string-tag */28),p=n(/*! ./_uid */30),d=n(/*! ./_wks */4),h=n(/*! ./_wks-ext */69),m=n(/*! ./_wks-define */48),y=n(/*! ./_enum-keys */94),v=n(/*! ./_is-array */98),b=n(/*! ./_an-object */8),g=n(/*! ./_is-object */2),_=n(/*! ./_to-iobject */10),w=n(/*! ./_to-primitive */29),x=n(/*! ./_property-desc */27),E=n(/*! ./_object-create */25),S=n(/*! ./_object-gopn-ext */57),O=n(/*! ./_object-gopd */15),T=n(/*! ./_object-dp */6),A=n(/*! ./_object-keys */16),P=O.f,C=T.f,k=S.f,j=r.Symbol,N=r.JSON,M=N&&N.stringify,D=d("_hidden"),L=d("toPrimitive"),R={}.propertyIsEnumerable,I=l("symbol-registry"),B=l("symbols"),U=l("op-symbols"),G=Object.prototype,H="function"==typeof j,z=r.QObject,F=!z||!z.prototype||!z.prototype.findChild,W=i&&c(function(){return 7!=E(C({},"a",{get:function(){return C(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=P(G,t);r&&delete G[t],C(e,t,n),r&&e!==G&&C(G,t,r)}:C,V=function(e){var t=B[e]=E(j.prototype);return t._k=e,t},Y=H&&"symbol"==typeof j.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof j},X=function(e,t,n){return e===G&&X(U,t,n),b(e),t=w(t,!0),b(n),o(B,t)?(n.enumerable?(o(e,D)&&e[D][t]&&(e[D][t]=!1),n=E(n,{enumerable:x(0,!1)})):(o(e,D)||C(e,D,x(1,{})),e[D][t]=!0),W(e,t,n)):C(e,t,n)},q=function(e,t){b(e);for(var n,r=y(t=_(t)),o=0,i=r.length;i>o;)X(e,n=r[o++],t[n]);return e},K=function(e,t){return void 0===t?E(e):q(E(e),t)},J=function(e){var t=R.call(this,e=w(e,!0));return!(this===G&&o(B,e)&&!o(U,e))&&(!(t||!o(this,e)||!o(B,e)||o(this,D)&&this[D][e])||t)},$=function(e,t){if(e=_(e),t=w(t,!0),e!==G||!o(B,t)||o(U,t)){var n=P(e,t);return!n||!o(B,t)||o(e,D)&&e[D][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=k(_(e)),r=[],i=0;n.length>i;)o(B,t=n[i++])||t==D||t==u||r.push(t);return r},Z=function(e){for(var t,n=e===G,r=k(n?U:_(e)),i=[],a=0;r.length>a;)!o(B,t=r[a++])||n&&!o(G,t)||i.push(B[t]);return i};H||(j=function(){if(this instanceof j)throw TypeError("Symbol is not a constructor!");var e=p(arguments.length>0?arguments[0]:void 0),t=function(n){this===G&&t.call(U,n),o(this,D)&&o(this[D],e)&&(this[D][e]=!1),W(this,e,x(1,n))};return i&&F&&W(G,e,{configurable:!0,set:t}),V(e)},s(j.prototype,"toString",function(){return this._k}),O.f=$,T.f=X,n(/*! ./_object-gopn */43).f=S.f=Q,n(/*! ./_object-pie */26).f=J,n(/*! ./_object-gops */33).f=Z,i&&!n(/*! ./_library */24)&&s(G,"propertyIsEnumerable",J,!0),h.f=function(e){return V(d(e))}),a(a.G+a.W+a.F*!H,{Symbol:j});for(var ee="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),te=0;ee.length>te;)d(ee[te++]);for(var ne=A(d.store),re=0;ne.length>re;)m(ne[re++]);a(a.S+a.F*!H,"Symbol",{for:function(e){return o(I,e+="")?I[e]:I[e]=j(e)},keyFor:function(e){if(!Y(e))throw TypeError(e+" is not a symbol!");for(var t in I)if(I[t]===e)return t},useSetter:function(){F=!0},useSimple:function(){F=!1}}),a(a.S+a.F*!H,"Object",{create:K,defineProperty:X,defineProperties:q,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:Z}),N&&a(a.S+a.F*(!H||c(function(){var e=j();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=t=r[1],(g(t)||void 0!==e)&&!Y(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!Y(t))return t}),r[1]=t,M.apply(N,r)}}),j.prototype[L]||n(/*! ./_hide */14)(j.prototype,L,j.prototype.valueOf),f(j,"Symbol"),f(Math,"Math",!0),f(r.JSON,"JSON",!0)},/*!***********************************************!*\ 219 219 !*** ./~/core-js/modules/web.dom.iterable.js ***! 220 220 \***********************************************/ … … 231 231 !*** ./src/App.jsx ***! 232 232 \*********************/ 233 function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(/*! react */1),c=r(u),l=n(/*! react-draggable */153),f=r(l),p=n(/*! react-transition-group */168),d=n(/*! querystringify */152),h=r(d),m=n(/*! ./ChatBox.jsx */49),y=r(m),v=n(/*! ./Fab.jsx */82),b=r(v),g=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));"undefined"!=typeof sessionStorage&&sessionStorage.getItem("watson_bot_window_state")?n.state=JSON.parse(sessionStorage.getItem("watson_bot_window_state")):n.state={minimized:e.isMobile||"yes"===watsonconvSettings.minimized,position:{x:0,y:0}};var r=h.default.parse(window.location.search);return r.hasOwnProperty("chat_min")&&("true"==r.chat_min||"yes"==r.chat_min?n.state.minimized=!0:"false"!=r.chat_min&&"no"!=r.chat_min||(n.state.minimized=!1)),n}return a(t,e),s(t,[{key:"componentDidUpdate",value:function(e,t){this.saveState(),this.state.minimized!=t.minimized&&this.props.isMobile&&(document.body.style.overflow=this.state.minimized?"scroll":"hidden")}},{key:"toggleMinimize",value:function(e){e.preventDefault(),this.setState({minimized:!this.state.minimized})}},{key:"startDragging",value:function(e){e.preventDefault(),this.setState({animated:!0})}},{key:"saveState",value:function(){"undefined"!=typeof sessionStorage&&sessionStorage.setItem("watson_bot_ state",JSON.stringify(this.state))}},{key:"savePosition",value:function(e,t){Math.sqrt(Math.pow(t.x-this.state.position.x,2)+Math.pow(t.y-this.state.position.y,2))<3?(this.setState({animated:!1}),this.toggleMinimize(e)):this.setState({position:{x:t.x,y:t.y}})}},{key:"render",value:function(e,t){var n=t.minimized,r=t.animated;return c.default.createElement("div",null,c.default.createElement(f.default,{handle:"#watson-header",cancel:"#watson-header .header-button",onStart:this.startDragging.bind(this),onStop:this.savePosition.bind(this)},c.default.createElement(p.TransitionGroup,{id:"watson-float",class:!r&&"animated",style:n&&{opacity:0,visibility:"hidden"}},c.default.createElement(y.default,{isMinimized:n}))),c.default.createElement(p.TransitionGroup,{id:"watson-fab-float",class:"animated",style:!n&&{opacity:0,visibility:"hidden"}},n&&c.default.createElement(b.default,{openChat:this.toggleMinimize.bind(this)})))}}]),t}(u.Component);t.default=g},/*!******************************!*\233 function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(/*! react */1),c=r(u),l=n(/*! react-draggable */153),f=r(l),p=n(/*! react-transition-group */168),d=n(/*! querystringify */152),h=r(d),m=n(/*! ./ChatBox.jsx */49),y=r(m),v=n(/*! ./Fab.jsx */82),b=r(v),g=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));"undefined"!=typeof sessionStorage&&sessionStorage.getItem("watson_bot_window_state")?n.state=JSON.parse(sessionStorage.getItem("watson_bot_window_state")):n.state={minimized:e.isMobile||"yes"===watsonconvSettings.minimized,position:{x:0,y:0}};var r=h.default.parse(window.location.search);return r.hasOwnProperty("chat_min")&&("true"==r.chat_min||"yes"==r.chat_min?n.state.minimized=!0:"false"!=r.chat_min&&"no"!=r.chat_min||(n.state.minimized=!1)),n}return a(t,e),s(t,[{key:"componentDidUpdate",value:function(e,t){this.saveState(),this.state.minimized!=t.minimized&&this.props.isMobile&&(document.body.style.overflow=this.state.minimized?"scroll":"hidden")}},{key:"toggleMinimize",value:function(e){e.preventDefault(),this.setState({minimized:!this.state.minimized})}},{key:"startDragging",value:function(e){e.preventDefault(),this.setState({animated:!0})}},{key:"saveState",value:function(){"undefined"!=typeof sessionStorage&&sessionStorage.setItem("watson_bot_window_state",JSON.stringify(this.state))}},{key:"savePosition",value:function(e,t){Math.sqrt(Math.pow(t.x-this.state.position.x,2)+Math.pow(t.y-this.state.position.y,2))<3?(this.setState({animated:!1}),this.toggleMinimize(e)):this.setState({position:{x:t.x,y:t.y}})}},{key:"render",value:function(e,t){var n=t.minimized,r=t.animated,o=window.matchMedia(watsonconvSettings.fullScreenQuery).matches;return c.default.createElement("div",null,c.default.createElement(f.default,{handle:"#watson-header",cancel:"#watson-header .header-button",onStart:this.startDragging.bind(this),onStop:this.savePosition.bind(this),position:o||n?{x:0,y:0}:this.state.position},c.default.createElement(p.TransitionGroup,{id:"watson-float",class:!r&&"animated",style:n&&{opacity:0,visibility:"hidden"}},c.default.createElement(y.default,{isMinimized:n,toggleMinimize:this.toggleMinimize.bind(this)}))),c.default.createElement(p.TransitionGroup,{id:"watson-fab-float",class:"animated",style:!n&&{opacity:0,visibility:"hidden"}},n&&c.default.createElement(b.default,{openChat:this.toggleMinimize.bind(this)})))}}]),t}(u.Component);t.default=g},/*!******************************!*\ 234 234 !*** ./~/core-js/es6/map.js ***! 235 235 \******************************/ … … 466 466 !*** ./~/preact/dist/preact.esm.js ***! 467 467 \*************************************/ 468 function(e,t,n){"use strict";function r(){}function o(e,t){var n,o,i,a,s=L;for(a=arguments.length;a-- >2;)D.push(arguments[a]);for(t&&null!=t.children&&(D.length||D.push(t.children),delete t.children);D.length;)if((o=D.pop())&&void 0!==o.pop)for(a=o.length;a--;)D.push(o[a]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(i=!1)),i&&n?s[s.length-1]+=o:s===L?s=[o]:s.push(o),n=i;var u=new r;return u.nodeName=e,u.children=s,u.attributes=null==t?void 0:t,u.key=null==t?void 0:t.key,void 0!==M.vnode&&M.vnode(u),u}function i(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t){return o(e.nodeName,i(i({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function s(e){!e._dirty&&(e._dirty=!0)&&1==B.push(e)&&(M.debounceRendering||R)(u)}function u(){var e,t=B;for(B=[];e=t.pop();)e._dirty&&P(e)}function c(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&l(e,t.nodeName):n||e._componentConstructor===t.nodeName}function l(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function f(e){var t=i({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function p(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),r&&r(e);else if("class"!==t||o)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"==typeof r[i]&&!1===I.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,y,a):e.removeEventListener(t,y,a),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)m(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var s=o&&t!==(t=t.replace(/^xlink\:?/,""));null==r||!1===r?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function m(e,t,n){try{e[t]=n}catch(e){}}function y(e){return this._listeners[e.type](M.event&&M.event(e)||e)}function v(){for(var e;e=U.pop();)M.afterMount&&M.afterMount(e),e.componentDidMount&&e.componentDidMount()}function b(e,t,n,r,o,i){G++||(H=null!=o&&void 0!==o.ownerSVGElement, F=null!=e&&!("__preactattr_"in e));var a=g(e,t,n,r,i);return o&&a.parentNode!==o&&o.appendChild(a),--G||(F=!1,i||v()),a}function g(e,t,n,r,o){var i=e,a=H;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0))),i.__preactattr_=!0,i;var s=t.nodeName;if("function"==typeof s)return C(e,t,n,r);if(H="svg"===s||"foreignObject"!==s&&H,s=String(s),(!e||!l(e,s))&&(i=p(s,H),e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0)}var u=i.firstChild,c=i.__preactattr_,f=t.children;if(null==c){c=i.__preactattr_={};for(var d=i.attributes,h=d.length;h--;)c[d[h].name]=d[h].value}return!F&&f&&1===f.length&&"string"==typeof f[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=f[0]&&(u.nodeValue=f[0]):(f&&f.length||null!=u)&&_(i,f,n,r,F||null!=c.dangerouslySetInnerHTML),E(i,t.attributes,c),H=a,i}function _(e,t,n,r,o){var i,a,s,u,l,f=e.childNodes,p=[],h={},m=0,y=0,v=f.length,b=0,_=t?t.length:0;if(0!==v)for(var x=0;x<v;x++){var E=f[x],S=E.__preactattr_,O=_&&S?E._component?E._component.__key:S.key:null;null!=O?(m++,h[O]=E):(S||(void 0!==E.splitText?!o||E.nodeValue.trim():o))&&(p[b++]=E)}if(0!==_)for(var x=0;x<_;x++){u=t[x],l=null;var O=u.key;if(null!=O)m&&void 0!==h[O]&&(l=h[O],h[O]=void 0,m--);else if(!l&&y<b)for(i=y;i<b;i++)if(void 0!==p[i]&&c(a=p[i],u,o)){l=a,p[i]=void 0,i===b-1&&b--,i===y&&y++;break}l=g(l,u,n,r),s=f[x],l&&l!==e&&l!==s&&(null==s?e.appendChild(l):l===s.nextSibling?d(s):e.insertBefore(l,s))}if(m)for(var x in h)void 0!==h[x]&&w(h[x],!1);for(;y<=b;)void 0!==(l=p[b--])&&w(l,!1)}function w(e,t){var n=e._component;n?k(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||d(e),x(e))}function x(e){for(e=e.lastChild;e;){var t=e.previousSibling;w(e,!0),e=t}}function E(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||h(e,r,n[r],n[r]=void 0,H);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||h(e,r,n[r],n[r]=t[r],H)}function S(e){var t=e.constructor.name;(z[t]||(z[t]=[])).push(e)}function O(e,t,n){var r,o=z[e.name];if(e.prototype&&e.prototype.render?(r=new e(t,n),j.call(r,t,n)):(r=new j(t,n),r.constructor=e,r.render=T),o)for(var i=o.length;i--;)if(o[i].constructor===e){r.nextBase=o[i].nextBase,o.splice(i,1);break}return r}function T(e,t,n){return this.constructor(e,n)}function A(e,t,n,r,o){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||o?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===M.syncComponentUpdates&&e.base?s(e):P(e,1,o)),e.__ref&&e.__ref(e))}function P(e,t,n,r){if(!e._disable){var o,a,s,u=e.props,c=e.state,l=e.context,p=e.prevProps||u,d=e.prevState||c,h=e.prevContext||l,m=e.base,y=e.nextBase,g=m||y,_=e._component,x=!1;if(m&&(e.props=p,e.state=d,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(u,c,l)?x=!0:e.componentWillUpdate&&e.componentWillUpdate(u,c,l),e.props=u,e.state=c,e.context=l),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!x){o=e.render(u,c,l),e.getChildContext&&(l=i(i({},l),e.getChildContext()));var E,S,T=o&&o.nodeName;if("function"==typeof T){var C=f(o);a=_,a&&a.constructor===T&&C.key==a.__key?A(a,C,1,l,!1):(E=a,e._component=a=O(T,C,l),a.nextBase=a.nextBase||y,a._parentComponent=e,A(a,C,0,l,!1),P(a,1,n,!0)),S=a.base}else s=g,E=_,E&&(s=e._component=null),(g||1===t)&&(s&&(s._component=null),S=b(s,o,l,n||!m,g&&g.parentNode,!0));if(g&&S!==g&&a!==_){var j=g.parentNode;j&&S!==j&&(j.replaceChild(S,g),E||(g._component=null,w(g,!1)))}if(E&&k(E),e.base=S,S&&!r){for(var N=e,D=e;D=D._parentComponent;)(N=D).base=S;S._component=N,S._componentConstructor=N.constructor}}if(!m||n?U.unshift(e):x||(e.componentDidUpdate&&e.componentDidUpdate(p,d,h),M.afterUpdate&&M.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);G||r||v()}}function C(e,t,n,r){for(var o=e&&e._component,i=o,a=e,s=o&&e._componentConstructor===t.nodeName,u=s,c=f(t);o&&!u&&(o=o._parentComponent);)u=o.constructor===t.nodeName;return o&&u&&(!r||o._component)?(A(o,c,3,n,r),e=o.base):(i&&!s&&(k(i),e=a=null),o=O(t.nodeName,c,n),e&&!o.nextBase&&(o.nextBase=e,a=null),A(o,c,1,n,r),e=o.base,a&&e!==a&&(a._component=null,w(a,!1))),e}function k(e){M.beforeUnmount&&M.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?k(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,d(t),S(e),x(t)),e.__ref&&e.__ref(null)}function j(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function N(e,t,n){return b(n,e,{},!1,t,!1)}n.d(t,"a",function(){return o}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return j}),n.d(t,"c",function(){return N}),n.d(t,"b",function(){return M});var M={},D=[],L=[],R="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,I=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,B=[],U=[],G=0,H=!1,F=!1,z={};i(j.prototype,{setState:function(e,t){var n=this.state;this.prevState||(this.prevState=i({},n)),i(n,"function"==typeof e?e(n,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),s(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),P(this,2)},render:function(){}})},/*!******************************!*\468 function(e,t,n){"use strict";function r(){}function o(e,t){var n,o,i,a,s=L;for(a=arguments.length;a-- >2;)D.push(arguments[a]);for(t&&null!=t.children&&(D.length||D.push(t.children),delete t.children);D.length;)if((o=D.pop())&&void 0!==o.pop)for(a=o.length;a--;)D.push(o[a]);else"boolean"==typeof o&&(o=null),(i="function"!=typeof e)&&(null==o?o="":"number"==typeof o?o=String(o):"string"!=typeof o&&(i=!1)),i&&n?s[s.length-1]+=o:s===L?s=[o]:s.push(o),n=i;var u=new r;return u.nodeName=e,u.children=s,u.attributes=null==t?void 0:t,u.key=null==t?void 0:t.key,void 0!==M.vnode&&M.vnode(u),u}function i(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t){return o(e.nodeName,i(i({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function s(e){!e._dirty&&(e._dirty=!0)&&1==B.push(e)&&(M.debounceRendering||R)(u)}function u(){var e,t=B;for(B=[];e=t.pop();)e._dirty&&P(e)}function c(e,t,n){return"string"==typeof t||"number"==typeof t?void 0!==e.splitText:"string"==typeof t.nodeName?!e._componentConstructor&&l(e,t.nodeName):n||e._componentConstructor===t.nodeName}function l(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function f(e){var t=i({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function p(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),r&&r(e);else if("class"!==t||o)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"==typeof r[i]&&!1===I.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var a=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,y,a):e.removeEventListener(t,y,a),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e)m(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var s=o&&t!==(t=t.replace(/^xlink\:?/,""));null==r||!1===r?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function m(e,t,n){try{e[t]=n}catch(e){}}function y(e){return this._listeners[e.type](M.event&&M.event(e)||e)}function v(){for(var e;e=U.pop();)M.afterMount&&M.afterMount(e),e.componentDidMount&&e.componentDidMount()}function b(e,t,n,r,o,i){G++||(H=null!=o&&void 0!==o.ownerSVGElement,z=null!=e&&!("__preactattr_"in e));var a=g(e,t,n,r,i);return o&&a.parentNode!==o&&o.appendChild(a),--G||(z=!1,i||v()),a}function g(e,t,n,r,o){var i=e,a=H;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0))),i.__preactattr_=!0,i;var s=t.nodeName;if("function"==typeof s)return C(e,t,n,r);if(H="svg"===s||"foreignObject"!==s&&H,s=String(s),(!e||!l(e,s))&&(i=p(s,H),e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),w(e,!0)}var u=i.firstChild,c=i.__preactattr_,f=t.children;if(null==c){c=i.__preactattr_={};for(var d=i.attributes,h=d.length;h--;)c[d[h].name]=d[h].value}return!z&&f&&1===f.length&&"string"==typeof f[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=f[0]&&(u.nodeValue=f[0]):(f&&f.length||null!=u)&&_(i,f,n,r,z||null!=c.dangerouslySetInnerHTML),E(i,t.attributes,c),H=a,i}function _(e,t,n,r,o){var i,a,s,u,l,f=e.childNodes,p=[],h={},m=0,y=0,v=f.length,b=0,_=t?t.length:0;if(0!==v)for(var x=0;x<v;x++){var E=f[x],S=E.__preactattr_,O=_&&S?E._component?E._component.__key:S.key:null;null!=O?(m++,h[O]=E):(S||(void 0!==E.splitText?!o||E.nodeValue.trim():o))&&(p[b++]=E)}if(0!==_)for(var x=0;x<_;x++){u=t[x],l=null;var O=u.key;if(null!=O)m&&void 0!==h[O]&&(l=h[O],h[O]=void 0,m--);else if(!l&&y<b)for(i=y;i<b;i++)if(void 0!==p[i]&&c(a=p[i],u,o)){l=a,p[i]=void 0,i===b-1&&b--,i===y&&y++;break}l=g(l,u,n,r),s=f[x],l&&l!==e&&l!==s&&(null==s?e.appendChild(l):l===s.nextSibling?d(s):e.insertBefore(l,s))}if(m)for(var x in h)void 0!==h[x]&&w(h[x],!1);for(;y<=b;)void 0!==(l=p[b--])&&w(l,!1)}function w(e,t){var n=e._component;n?k(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||d(e),x(e))}function x(e){for(e=e.lastChild;e;){var t=e.previousSibling;w(e,!0),e=t}}function E(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||h(e,r,n[r],n[r]=void 0,H);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||h(e,r,n[r],n[r]=t[r],H)}function S(e){var t=e.constructor.name;(F[t]||(F[t]=[])).push(e)}function O(e,t,n){var r,o=F[e.name];if(e.prototype&&e.prototype.render?(r=new e(t,n),j.call(r,t,n)):(r=new j(t,n),r.constructor=e,r.render=T),o)for(var i=o.length;i--;)if(o[i].constructor===e){r.nextBase=o[i].nextBase,o.splice(i,1);break}return r}function T(e,t,n){return this.constructor(e,n)}function A(e,t,n,r,o){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||o?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===M.syncComponentUpdates&&e.base?s(e):P(e,1,o)),e.__ref&&e.__ref(e))}function P(e,t,n,r){if(!e._disable){var o,a,s,u=e.props,c=e.state,l=e.context,p=e.prevProps||u,d=e.prevState||c,h=e.prevContext||l,m=e.base,y=e.nextBase,g=m||y,_=e._component,x=!1;if(m&&(e.props=p,e.state=d,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(u,c,l)?x=!0:e.componentWillUpdate&&e.componentWillUpdate(u,c,l),e.props=u,e.state=c,e.context=l),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!x){o=e.render(u,c,l),e.getChildContext&&(l=i(i({},l),e.getChildContext()));var E,S,T=o&&o.nodeName;if("function"==typeof T){var C=f(o);a=_,a&&a.constructor===T&&C.key==a.__key?A(a,C,1,l,!1):(E=a,e._component=a=O(T,C,l),a.nextBase=a.nextBase||y,a._parentComponent=e,A(a,C,0,l,!1),P(a,1,n,!0)),S=a.base}else s=g,E=_,E&&(s=e._component=null),(g||1===t)&&(s&&(s._component=null),S=b(s,o,l,n||!m,g&&g.parentNode,!0));if(g&&S!==g&&a!==_){var j=g.parentNode;j&&S!==j&&(j.replaceChild(S,g),E||(g._component=null,w(g,!1)))}if(E&&k(E),e.base=S,S&&!r){for(var N=e,D=e;D=D._parentComponent;)(N=D).base=S;S._component=N,S._componentConstructor=N.constructor}}if(!m||n?U.unshift(e):x||(e.componentDidUpdate&&e.componentDidUpdate(p,d,h),M.afterUpdate&&M.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);G||r||v()}}function C(e,t,n,r){for(var o=e&&e._component,i=o,a=e,s=o&&e._componentConstructor===t.nodeName,u=s,c=f(t);o&&!u&&(o=o._parentComponent);)u=o.constructor===t.nodeName;return o&&u&&(!r||o._component)?(A(o,c,3,n,r),e=o.base):(i&&!s&&(k(i),e=a=null),o=O(t.nodeName,c,n),e&&!o.nextBase&&(o.nextBase=e,a=null),A(o,c,1,n,r),e=o.base,a&&e!==a&&(a._component=null,w(a,!1))),e}function k(e){M.beforeUnmount&&M.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?k(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,d(t),S(e),x(t)),e.__ref&&e.__ref(null)}function j(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function N(e,t,n){return b(n,e,{},!1,t,!1)}n.d(t,"a",function(){return o}),n.d(t,"d",function(){return a}),n.d(t,"e",function(){return j}),n.d(t,"c",function(){return N}),n.d(t,"b",function(){return M});var M={},D=[],L=[],R="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,I=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,B=[],U=[],G=0,H=!1,z=!1,F={};i(j.prototype,{setState:function(e,t){var n=this.state;this.prevState||(this.prevState=i({},n)),i(n,"function"==typeof e?e(n,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),s(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),P(this,2)},render:function(){}})},/*!******************************!*\ 469 469 !*** ./~/process/browser.js ***! 470 470 \******************************/ -
conversation-watson/trunk/css/chatbox.css
r1878701 r1883416 334 334 border-radius: 50%; 335 335 margin-right: 4px; 336 background-color: white; 336 337 337 338 -webkit-animation: jump 1.5s ease-in-out 0s infinite normal ; … … 393 394 border: 0; 394 395 padding: 0 0.75em; 396 margin: 0; 395 397 background-color: #fff; 396 398 color: #333; -
conversation-watson/trunk/css/settings.css
r1871849 r1883416 1 1 a:hover { 2 2 cursor: pointer; 3 } 4 5 ul 6 { 7 list-style-position: inside; 8 list-style-type: disc; 3 9 } 4 10 -
conversation-watson/trunk/includes/frontend.php
r1878701 r1883416 8 8 9 9 class Frontend { 10 const VERSION = '0. 6.10';10 const VERSION = '0.7.0'; 11 11 12 12 public static function enqueue_styles($force_full_screen = null) { … … 231 231 ); 232 232 233 $full_screen_settings = get_option('watsonconv_full_screen'); 234 $full_screen_query = isset($full_screen_settings['query']) ? 235 $full_screen_settings['query'] : '@media screen and (max-width:640px) { %s }'; 236 233 237 return array( 234 238 'delay' => (int) get_option('watsonconv_delay', 0), … … 238 242 'clearText' => get_option('watsonconv_clear_text', 'Clear Messages'), 239 243 'messagePrompt' => get_option('watsonconv_message_prompt', 'Type a Message'), 240 'fullScreen ' => get_option('watsonconv_full_screen', 'no'),244 'fullScreenQuery' => $full_screen_query, 241 245 'showSendBtn' => get_option('watsonconv_send_btn', 'no'), 242 246 'typingDelay' => get_option('watsonconv_typing_delay', 'no'), -
conversation-watson/trunk/watson.php
r1878701 r1883416 5 5 Author: IBM Cognitive Class 6 6 Author URI: https://cognitiveclass.ai 7 Version: 0. 6.107 Version: 0.7.0 8 8 Text Domain: watsonconv 9 9 */ … … 35 35 36 36 require_once(WATSON_CONV_PATH.'vendor/autoload.php'); 37 require_once(WATSON_CONV_PATH.'includes/settings .php');37 require_once(WATSON_CONV_PATH.'includes/settings/main.php'); 38 38 require_once(WATSON_CONV_PATH.'includes/frontend.php'); 39 39 require_once(WATSON_CONV_PATH.'includes/api.php');
Note: See TracChangeset
for help on using the changeset viewer.