UNPKG

react-tinymce-mention

Version:

@Mention functionality for TinyMCE, built with React and Redux.

34 lines 256 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React")):"function"==typeof define&&define.amd?define(["React"],t):"object"==typeof exports?exports.reactMentions=t(require("React")):e.reactMentions=t(e.React)}(this,function(e){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/static/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),n(1);var o=n(2),a=r(o),i=n(5),u=r(i);a["default"].polyfill(),t["default"]=u["default"],e.exports=t["default"]},function(e,t){/*! https://mths.be/includes v0.2.0 by @mathias */ String.prototype.includes||!function(){"use strict";var e={}.toString,t=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(r){}return n}(),n="".indexOf,r=function(t){if(null==this)throw TypeError();var r=String(this);if(t&&"[object RegExp]"==e.call(t))throw TypeError();var o=r.length,a=String(t),i=a.length,u=arguments.length>1?arguments[1]:void 0,s=u?Number(u):0;s!=s&&(s=0);var c=Math.min(Math.max(s,0),o);return!(i+c>o)&&n.call(r,a,s)!=-1};t?t(String.prototype,"includes",{value:r,configurable:!0,writable:!0}):String.prototype.includes=r}()},function(e,t,n){(function(t,r){/*! * @overview es6-promise - a tiny implementation of Promises/A+. * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) * @license Licensed under MIT license * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE * @version 3.3.1 */ !function(t,n){e.exports=n()}(this,function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function o(e){return"function"==typeof e}function a(e){G=e}function i(e){Q=e}function u(){return function(){return t.nextTick(p)}}function s(){return function(){$(p)}}function c(){var e=0,t=new J(p),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function l(){var e=new MessageChannel;return e.port1.onmessage=p,function(){return e.port2.postMessage(0)}}function d(){var e=setTimeout;return function(){return e(p,1)}}function p(){for(var e=0;e<Y;e+=2){var t=ne[e],n=ne[e+1];t(n),ne[e]=void 0,ne[e+1]=void 0}Y=0}function f(){try{var e=n(4);return $=e.runOnLoop||e.runOnContext,s()}catch(t){return d()}}function h(e,t){var n=arguments,r=this,o=new this.constructor(m);void 0===o[oe]&&D(o);var a=r._state;return a?!function(){var e=n[a-1];Q(function(){return A(a,o,e,r._result)})}():S(r,o,e,t),o}function v(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(m);return w(n,e),n}function m(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function y(){return new TypeError("A promises callback cannot return that same promise.")}function b(e){try{return e.then}catch(t){return se.error=t,se}}function x(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function _(e,t,n){Q(function(e){var r=!1,o=x(n,t,function(n){r||(r=!0,t!==n?w(e,n):k(e,n))},function(t){r||(r=!0,P(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,P(e,o))},e)}function C(e,t){t._state===ie?k(e,t._result):t._state===ue?P(e,t._result):S(t,void 0,function(t){return w(e,t)},function(t){return P(e,t)})}function E(e,t,n){t.constructor===e.constructor&&n===h&&t.constructor.resolve===v?C(e,t):n===se?P(e,se.error):void 0===n?k(e,t):o(n)?_(e,t,n):k(e,t)}function w(t,n){t===n?P(t,g()):e(n)?E(t,n,b(n)):k(t,n)}function T(e){e._onerror&&e._onerror(e._result),O(e)}function k(e,t){e._state===ae&&(e._result=t,e._state=ie,0!==e._subscribers.length&&Q(O,e))}function P(e,t){e._state===ae&&(e._state=ue,e._result=t,Q(T,e))}function S(e,t,n,r){var o=e._subscribers,a=o.length;e._onerror=null,o[a]=t,o[a+ie]=n,o[a+ue]=r,0===a&&e._state&&Q(O,e)}function O(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,o=void 0,a=e._result,i=0;i<t.length;i+=3)r=t[i],o=t[i+n],r?A(n,r,o,a):o(a);e._subscribers.length=0}}function M(){this.error=null}function N(e,t){try{return e(t)}catch(n){return ce.error=n,ce}}function A(e,t,n,r){var a=o(n),i=void 0,u=void 0,s=void 0,c=void 0;if(a){if(i=N(n,r),i===ce?(c=!0,u=i.error,i=null):s=!0,t===i)return void P(t,y())}else i=r,s=!0;t._state!==ae||(a&&s?w(t,i):c?P(t,u):e===ie?k(t,i):e===ue&&P(t,i))}function R(e,t){try{t(function(t){w(e,t)},function(t){P(e,t)})}catch(n){P(e,n)}}function I(){return le++}function D(e){e[oe]=le++,e._state=void 0,e._result=void 0,e._subscribers=[]}function U(e,t){this._instanceConstructor=e,this.promise=new e(m),this.promise[oe]||D(this.promise),K(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?k(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&k(this.promise,this._result))):P(this.promise,j())}function j(){return new Error("Array Methods must be provided an Array")}function L(e){return new U(this,e).promise}function F(e){var t=this;return new t(K(e)?function(n,r){for(var o=e.length,a=0;a<o;a++)t.resolve(e[a]).then(n,r)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function B(e){var t=this,n=new t(m);return P(n,e),n}function W(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function V(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function H(e){this[oe]=I(),this._result=this._state=void 0,this._subscribers=[],m!==e&&("function"!=typeof e&&W(),this instanceof H?R(this,e):V())}function z(){var e=void 0;if("undefined"!=typeof r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;if(n){var o=null;try{o=Object.prototype.toString.call(n.resolve())}catch(t){}if("[object Promise]"===o&&!n.cast)return}e.Promise=H}var q=void 0;q=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var K=q,Y=0,$=void 0,G=void 0,Q=function(e,t){ne[Y]=e,ne[Y+1]=t,Y+=2,2===Y&&(G?G(p):re())},X="undefined"!=typeof window?window:void 0,Z=X||{},J=Z.MutationObserver||Z.WebKitMutationObserver,ee="undefined"==typeof self&&"undefined"!=typeof t&&"[object process]"==={}.toString.call(t),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,ne=new Array(1e3),re=void 0;re=ee?u():J?c():te?l():void 0===X?f():d();var oe=Math.random().toString(36).substring(16),ae=void 0,ie=1,ue=2,se=new M,ce=new M,le=0;return U.prototype._enumerate=function(){for(var e=this.length,t=this._input,n=0;this._state===ae&&n<e;n++)this._eachEntry(t[n],n)},U.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===v){var o=b(e);if(o===h&&e._state!==ae)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(n===H){var a=new n(m);E(a,e,o),this._willSettleAt(a,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},U.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===ae&&(this._remaining--,e===ue?P(r,n):this._result[t]=n),0===this._remaining&&k(r,this._result)},U.prototype._willSettleAt=function(e,t){var n=this;S(e,void 0,function(e){return n._settledAt(ie,t,e)},function(e){return n._settledAt(ue,t,e)})},H.all=L,H.race=F,H.resolve=v,H.reject=B,H._setScheduler=a,H._setAsap=i,H._asap=Q,H.prototype={constructor:H,then:h,"catch":function(e){return this.then(null,e)}},z(),H.polyfill=z,H.Promise=H,H})}).call(t,n(3),function(){return this}())},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function a(e){if(d===clearTimeout)return clearTimeout(e);if((d===r||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{return d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}function i(){v&&f&&(v=!1,f.length?h=f.concat(h):m=-1,h.length&&u())}function u(){if(!v){var e=o(i);v=!0;for(var t=h.length;t;){for(f=h,h=[];++m<t;)f&&f[m].run();m=-1,t=h.length}f=null,v=!1,a(e)}}function s(e,t){this.fun=e,this.array=t}function c(){}var l,d,p=e.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{d="function"==typeof clearTimeout?clearTimeout:r}catch(e){d=r}}();var f,h=[],v=!1,m=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new s(e,t)),1!==h.length||v||o(u)},s.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){},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 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 i=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}}(),s=function(e,t,n){for(var r=!0;r;){var o=e,a=t,i=n;r=!1,null===o&&(o=Function.prototype);var u=Object.getOwnPropertyDescriptor(o,a);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(i)}var c=Object.getPrototypeOf(o);if(null===c)return;e=c,t=a,n=i,r=!0,u=c=void 0}},c=n(6),l=r(c),d=n(7),p=r(d),f=n(8),h=n(25),v=n(54),m=r(v),g=n(56),y=r(g),b=n(51),x=n(58),_=r(x),C=n(80),E=r(C),w=n(240),T=r(w),k=n(251),P=r(k),S=function(e){function t(){o(this,t),s(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return a(t,e),u(t,[{key:"componentWillMount",value:function(){var e=this.props.asyncDataSource;this.store=(0,m["default"])({mention:_["default"]},{mention:i({},x.initialState,{asyncDataSource:e})})}},{key:"componentDidMount",value:function(){var e=this.props,t=e.dataSource,n=void 0===t?[]:t,r=e.delimiter;(0,h.initializePlugin)(this.store,n,r).then(this._transformAndDispatch.bind(this))["catch"](function(e){console.error(e)})}},{key:"_transformResponse",value:function(e,t){var n="function"==typeof t;(0,p["default"])(n||"undefined"==typeof t,"Error initializing plugin: `transformFn` must be a function.");var r=n?t(e):e;return(0,y["default"])(r)}},{key:"_transformAndDispatch",value:function(e){var t=e.editor,n=e.resolvedDataSource,r=this._transformResponse(n,this.props.transformFn),o=r.dataSource;this.store.dispatch((0,b.finalizeSetup)(t,o))}},{key:"render",value:function(){var e=this.props,t=e.beforeAdd,n=e.customListRenderer,r=e.customRTEMention,o=e.delimiter,a=e.onAdd,i=e.onRemove,u=e.showDebugger;return l["default"].createElement(f.Provider,{store:this.store},l["default"].createElement("div",null,l["default"].createElement(T["default"],{customListRenderer:n}),l["default"].createElement(E["default"],{delimiter:o,customRTEMention:r,beforeAdd:t,onAdd:a,onRemove:i}),u&&l["default"].createElement(P["default"],null)))}}],[{key:"propTypes",value:{dataSource:c.PropTypes.oneOfType([c.PropTypes.array,c.PropTypes.func,c.PropTypes.object]),asyncDataSource:c.PropTypes.func,beforeAdd:c.PropTypes.func,customListRenderer:c.PropTypes.func,customRTEMention:c.PropTypes.func,delimiter:c.PropTypes.string,onAdd:c.PropTypes.func,onRemove:c.PropTypes.func,showDebugger:c.PropTypes.bool,transformFn:c.PropTypes.func},enumerable:!0},{key:"defaultProps",value:{delimiter:"@"},enumerable:!0}]),t}(l["default"].Component);t["default"]=S,e.exports=t["default"]},function(t,n){t.exports=e},function(e,t,n){"use strict";var r=function(e,t,n,r,o,a,i,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,u],l=0;s=new Error(t.replace(/%s/g,function(){return c[l++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}};e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(6),a=r(o),i=n(9),u=r(i),s=u["default"](a["default"]),c=s.Provider,l=s.connect;t.Provider=c,t.connect=l},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){var t=i["default"](e),n=s["default"](e);return{Provider:t,connect:n}}t.__esModule=!0,t["default"]=o;var a=n(10),i=r(a),u=n(12),s=r(u);e.exports=t["default"]},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 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)}function i(e){var t=e.version;if("string"!=typeof t)return!0;var n=t.split("."),r=parseInt(n[0],10),o=parseInt(n[1],10);return 0===r&&13===o}function u(e){function t(){h||f||(h=!0,console.error("With React 0.14 and later versions, you no longer need to wrap <Provider> child into a function."))}function n(){!h&&f&&(h=!0,console.error("With React 0.13, you need to wrap <Provider> child into a function. This restriction will be removed with React 0.14."))}function r(){v||(v=!0,console.error("<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/rackt/react-redux/releases/tag/v2.0.0 for the migration instructions."))}var u=e.Component,c=e.PropTypes,d=e.Children,p=l["default"](c),f=i(e),h=!1,v=!1;return function(e){function i(t,n){o(this,i),e.call(this,t,n),this.store=t.store}return a(i,e),i.prototype.getChildContext=function(){return{store:this.store}},s(i,null,[{key:"childContextTypes",value:{store:p.isRequired},enumerable:!0},{key:"propTypes",value:{store:p.isRequired,children:(f?c.func:c.element).isRequired},enumerable:!0}]),i.prototype.componentWillReceiveProps=function(e){var t=this.store,n=e.store;t!==n&&r()},i.prototype.render=function(){var e=this.props.children;return"function"==typeof e?(t(),e=e()):n(),d.only(e)},i}(u)}t.__esModule=!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}}();t["default"]=u;var c=n(11),l=r(c);e.exports=t["default"]},function(e,t){"use strict";function n(e){return e.shape({subscribe:e.func.isRequired,dispatch:e.func.isRequired,getState:e.func.isRequired})}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},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 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)}function i(e){return e.displayName||e.name||"Component"}function u(e){var t=e.Component,n=e.PropTypes,r=d["default"](n);return function(n,u,l){function d(e,t){var n=e.getState(),r=P?w(n,t):w(n);return b["default"](v["default"](r),"`mapStateToProps` must return an object. Instead received %s.",r),r}function p(e,t){var n=e.dispatch,r=S?T(n,t):T(n);return b["default"](v["default"](r),"`mapDispatchToProps` must return an object. Instead received %s.",r),r}function h(e,t,n){var r=k(e,t,n);return b["default"](v["default"](r),"`mergeProps` must return an object. Instead received %s.",r),r}var m=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],y=Boolean(n),w=n||x,T=v["default"](u)?g["default"](u):u||_,k=l||C,P=w.length>1,S=T.length>1,O=m.pure,M=void 0===O||O,N=E++;return function(n){var u=function(t){function u(e,n){o(this,u),t.call(this,e,n),this.version=N,this.store=e.store||n.store,b["default"](this.store,'Could not find "store" in either the context or '+('props of "'+this.constructor.displayName+'". ')+"Either wrap the root component in a <Provider>, "+('or explicitly pass "store" as a prop to "'+this.constructor.displayName+'".')),this.stateProps=d(this.store,e),this.dispatchProps=p(this.store,e),this.state={props:this.computeNextState()}}return a(u,t),u.prototype.shouldComponentUpdate=function(e,t){return!M||!f["default"](this.state.props,t.props)},s(u,null,[{key:"displayName",value:"Connect("+i(n)+")",enumerable:!0},{key:"WrappedComponent",value:n,enumerable:!0},{key:"contextTypes",value:{store:r},enumerable:!0},{key:"propTypes",value:{store:r},enumerable:!0}]),u.prototype.computeNextState=function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0];return h(this.stateProps,this.dispatchProps,e)},u.prototype.updateStateProps=function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=d(this.store,e);return!f["default"](t,this.stateProps)&&(this.stateProps=t,!0)},u.prototype.updateDispatchProps=function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=p(this.store,e);return!f["default"](t,this.dispatchProps)&&(this.dispatchProps=t,!0)},u.prototype.updateState=function(){var e=arguments.length<=0||void 0===arguments[0]?this.props:arguments[0],t=this.computeNextState(e);f["default"](t,this.state.props)||this.setState({props:t})},u.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},u.prototype.trySubscribe=function(){y&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},u.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},u.prototype.componentDidMount=function(){this.trySubscribe()},u.prototype.componentWillReceiveProps=function(e){f["default"](e,this.props)||(P&&this.updateStateProps(e),S&&this.updateDispatchProps(e),this.updateState(e))},u.prototype.componentWillUnmount=function(){this.tryUnsubscribe()},u.prototype.handleChange=function(){this.unsubscribe&&this.updateStateProps()&&this.updateState()},u.prototype.getWrappedInstance=function(){return this.refs.wrappedInstance},u.prototype.render=function(){return e.createElement(n,c({ref:"wrappedInstance"},this.state.props))},u}(t);return u}}}t.__esModule=!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}}(),c=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};t["default"]=u;var l=n(11),d=r(l),p=n(13),f=r(p),h=n(14),v=r(h),m=n(15),g=r(m),y=n(7),b=r(y),x=function(){return{}},_=function(e){return{dispatch:e}},C=function(e,t,n){return c({},n,e,t)},E=0;e.exports=t["default"]},function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=Object.prototype.hasOwnProperty,a=0;a<n.length;a++)if(!o.call(t,n[a])||e[n[a]]!==t[n[a]])return!1;return!0}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(e){if(!e||"object"!=typeof e)return!1;var t="function"==typeof e.constructor?Object.getPrototypeOf(e):Object.prototype;if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&r(n)===r(Object)}t.__esModule=!0,t["default"]=n;var r=function(e){return Function.prototype.toString.call(e)};e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return function(t){return o.bindActionCreators(e,t)}}t.__esModule=!0,t["default"]=r;var o=n(16);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}t.__esModule=!0;var o=n(17),a=r(o),i=n(19),u=r(i),s=n(22),c=r(s),l=n(23),d=r(l),p=n(24),f=r(p);t.createStore=a["default"],t.combineReducers=u["default"],t.bindActionCreators=c["default"],t.applyMiddleware=d["default"],t.compose=f["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){function n(){return c}function r(e){return l.push(e),function(){var t=l.indexOf(e);l.splice(t,1)}}function o(e){if(!i["default"](e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(d)throw new Error("Reducers may not dispatch actions.");try{d=!0,c=s(c,e)}finally{d=!1}return l.slice().forEach(function(e){return e()}),e}function a(e){s=e,o({type:u.INIT})}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var s=e,c=t,l=[],d=!1;return o({type:u.INIT}),{dispatch:o,subscribe:r,getState:n,replaceReducer:a}}t.__esModule=!0,t["default"]=o;var a=n(18),i=r(a),u={INIT:"@@redux/INIT"};t.ActionTypes=u},function(e,t){"use strict";function n(e){if(!e||"object"!=typeof e)return!1;var t="function"==typeof e.constructor?Object.getPrototypeOf(e):Object.prototype;if(null===t)return!0;var n=t.constructor;return"function"==typeof n&&n instanceof n&&r(n)===r(Object)}t.__esModule=!0,t["default"]=n;var r=function(e){return Function.prototype.toString.call(e)};e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=t&&t.type,r=n&&'"'+n.toString()+'"'||"an action";return'Reducer "'+e+'" returned undefined handling '+r+". To ignore an action, you must explicitly return the previous state."}function a(e){var t=d["default"](e,function(e){return"function"==typeof e});Object.keys(t).forEach(function(e){var n=t[e];if("undefined"==typeof n(void 0,{type:i.ActionTypes.INIT}))throw new Error('Reducer "'+e+'" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined.');var r=Math.random().toString(36).substring(7).split("").join(".");if("undefined"==typeof n(void 0,{type:r}))throw new Error('Reducer "'+e+'" returned undefined when probed with a random type. '+("Don't try to handle "+i.ActionTypes.INIT+' or other actions in "redux/*" ')+"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined.")});var n=c["default"](t,function(){});return function(e,r){void 0===e&&(e=n);var a=c["default"](t,function(t,n){var a=t(e[n],r);if("undefined"==typeof a)throw new Error(o(n,r));return a});return a}}t.__esModule=!0,t["default"]=a;var i=n(17),u=n(18),s=(r(u),n(20)),c=r(s),l=n(21),d=r(l);e.exports=t["default"]},function(e,t){"use strict";function n(e,t){return Object.keys(e).reduce(function(n,r){return n[r]=t(e[r],r),n},{})}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t){"use strict";function n(e,t){return Object.keys(e).reduce(function(n,r){return t(e[r])&&(n[r]=e[r]),n},{})}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){return function(){return t(e.apply(void 0,arguments))}}function a(e,t){if("function"==typeof e)return o(e,t);if("object"!=typeof e||null==e)throw new Error("bindActionCreators expected an object or a function, instead received "+typeof e+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');return u["default"](e,function(e){return o(e,t)})}t.__esModule=!0,t["default"]=a;var i=n(20),u=r(i);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(n,r){var o=e(n,r),i=o.dispatch,s=[],c={getState:o.getState,dispatch:function(e){return i(e)}};return s=t.map(function(e){return e(c)}),i=u["default"].apply(void 0,s)(o.dispatch),a({},o,{dispatch:i})}}}t.__esModule=!0;var a=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};t["default"]=o;var i=n(24),u=r(i);e.exports=t["default"]},function(e,t){"use strict";function n(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}}t.__esModule=!0,t["default"]=n,e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=arguments.length<=2||void 0===arguments[2]?L:arguments[2];if("undefined"==typeof window.tinymce)throw new Error("Error initializing Mention plugin: `tinymce` is undefined.");return new Promise(function(r,o){C()?i(t,r,o):window.tinymce.PluginManager.add("mention",function(a){(0,k["default"])(e,"Plugin must be initialized with a Redux store."),(0,k["default"])(t,"Plugin must be initialized with a `dataSource` that is an array or promise."),(0,k["default"])(E(n),"Plugin must be initialized with a valid delimiter ("+F.toString()+")"),V=e,B=n,W=a,i(t,r,o)})})}function i(e,t){setTimeout(function(){"function"==typeof e.then?(e.then(function(e){u(),t({editor:W,resolvedDataSource:e})}),"function"===e["catch"]?e["catch"](function(e){throw new Error(e)}):"function"===e.fail&&e.fail(function(e){throw new Error(e)})):(u(),t({editor:W,resolvedDataSource:e}))},100)}function u(){setTimeout(function(){s(),W.on("keypress",c),W.on("keydown",l),W.on("keyup",f)},50)}function s(){W.off()}function c(e){var t=(0,A["default"])(e),n=String.fromCharCode(t),r=B.indexOf(n)>-1;_(W),!H.active&&r?v():H.active&&" "!==n||m()}function l(e){var t=(0,A["default"])(e);if(H.active&&t===j.BACKSPACE||t===j.DELETE)if((0,D.getLastChar)(W)===B)m();else{var n=g(t);V.dispatch((0,U.query)(n))}}function d(e){var t=(0,A["default"])(e);if(w(j,t,V)||h(t,e))return e.preventDefault(),!1}function p(e){var t=(0,A["default"])(e);setTimeout(function(){var e=g(t);if(""!==e){var n=W.getContent(),r=(0,I["default"])(n,B),a=r.mentions,i=r.prop,u=(0,M["default"])(a,o({},i,e));u&&V.dispatch((0,U.query)(u[i]))}},0)}function f(e){var t=(0,A["default"])(e),n=".tinymce-mention",r=window.tinymce.dom.DomQuery;if(t===j.BACKSPACE||t===j.DELETE){var o=W.selection.getNode(),a=r(o).closest(n)[0];if(a){var i=x(a);V.dispatch((0,U.remove)(i))}else if(W.getContent({format:"html"}).trim().length){var u=(0,D.collectMentionIds)(W,n);V.dispatch((0,U.syncEditorState)(u))}else V.dispatch((0,U.resetMentions)()),m()}}function h(e,t){var n=V.getState().mention.matchedSources;if(n.length){if(e===j.BACKSPACE||e===e.DELETE)return z.update(e),p(t);switch(e){case j.TAB:return y(),!0;case j.ENTER:return y(),!0;case j.DOWN:return V.dispatch((0,U.moveDown)()),!0;case j.UP:return V.dispatch((0,U.moveUp)()),!0;case j.ESC:return m(),!0;default:return!1}}}function v(){H.active||(H.toggle(),W.on("keydown",d),W.on("keypress",p))}function m(){H.active&&(H.toggle(),z.clear(),V.dispatch((0,U.resetQuery)()),W.off("keydown",d),W.off("keypress",p))}function g(e){var t=e!==j.BACKSPACE&&e!==j.DELETE?z.update((0,D.getLastChar)(W)):z.backspace();return t}function y(){return V.dispatch((0,U.select)()),z.clear(),m(),!0}function b(e,t){var n=new RegExp("(?:"+t+"|_)");return e.innerHTML.replace(n,"").trim()}function x(e){return(0,S["default"])(e),b(e,B)}function _(){""!==W.getContent()&&"<br>"!==W.getContent({format:"raw"})||W.insertContent(" ")}function C(){var e=window.tinymce.activeEditor,t=e&&e.plugins,n=t&&t.mention;return!!n}function E(e){return F.some(function(t){return t===e})}function w(e,t,n){var r=n.getState().mention.fetching,o=Object.keys(e).some(function(n){var o=e[n],a=[e.ESC,e.BACKSPACE,e.DELETE].some(function(e){return e===o});return!(!r||o!==t||a)});return o}Object.defineProperty(t,"__esModule",{value:!0}),t.initializePlugin=a;var T=n(7),k=r(T),P=n(26),S=r(P),O=n(31),M=r(O),N=n(47),A=r(N),R=n(48),I=r(R),D=n(50),U=n(51),j={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,TAB:9,UP:38,ESC:27},L="@",F=["#","@"],B=void 0,W=void 0,V=void 0,H={active:!1,toggle:function(){return this.active=!this.active,this.active}},z={value:"",update:function(e){return this.value=(this.value+e).trim(),this.value},backspace:function(){var e=this.value;return this.value=e.substring(0,e.length-1).trim(),this.value},clear:function(){this.value=""}},q={_typedMention:z,_focus:H,_loadMentions:i,_shouldSelectOrMove:h,_updateMentionText:g,_normalizeEditorInput:_,_isValidDelimiter:E,_handleKeyPress:p,_handleEditorBackspace:f,_removeMentionFromEditor:x,_extractMentionFromNode:b};t.testExports=q},function(e,t,n){"use strict";var r={}.toString,o=n(27);e.exports=function a(e){if(e){if("[object Array]"===r.call(e))return o(e,a);var t=e.parentNode;return!!t&&(t.removeChild(e),!0)}}},function(e,t,n){/*! * array-every <https://github.com/jonschlinkert/array-every> * * Copyright (c) 2014 Jon Schlinkert, contributors. * Licensed under the MIT license. */ "use strict";var r=n(28);e.exports=function(e,t,n){t=r(t,n);var o=!0;if(null==e)return o;for(var a=e.length,i=0;a--;)if(!t(e[i++],i,e)){o=!1;break}return o}},function(e,t,n){/*! * make-iterator <https://github.com/jonschlinkert/make-iterator> * * Copyright (c) 2014 Jon Schlinkert, contributors. * Copyright (c) 2012, 2013 moutjs team and contributors (http://moutjs.com) * Licensed under the MIT License */ "use strict";function r(e,t){for(var n=e.length,r=-1;++r<n;)if(i(e[r],t))return!0;return!1}function o(e,t){for(var n=t.length,o=-1;++o<n;)if(!r(e,t[o]))return!1;return!0}function a(e,t){var n=!0;return c(t,function(t,r){if(!i(e[r],t))return n=!1}),n}function i(e,t){return e&&"object"==typeof e?Array.isArray(e)&&Array.isArray(t)?o(e,t):a(e,t):e===t}function u(e){return function(t){return t[e]}}function s(e){return e}var c=n(29);e.exports=function(e,t){if(null==e)return s;switch(typeof e){case"function":return"undefined"!=typeof t?function(n,r,o){return e.call(t,n,r,o)}:e;case"object":return function(t){return i(t,e)};case"string":case"number":return u(e)}}},function(e,t,n){/*! * for-own <https://github.com/jonschlinkert/for-own> * * Copyright (c) 2014-2016, Jon Schlinkert. * Licensed under the MIT License. */ "use strict";var r=n(30),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){r(e,function(r,a){if(o.call(e,a))return t.call(n,e[a],a,e)})}},function(e,t){/*! * for-in <https://github.com/jonschlinkert/for-in> * * Copyright (c) 2014-2016, Jon Schlinkert. * Licensed under the MIT License. */ "use strict";e.exports=function(e,t,n){for(var r in e)if(t.call(n,e[r],r,e)===!1)break}},function(e,t,n){function r(e,t){return a(e,o(t))}var o=n(32),a=n(41);e.exports=r},function(e,t,n){function r(e){var t=o(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&(e[n]===r&&(void 0!==r||n in i(e)))}}return function(e){return s(e,t)}}function o(e){for(var t=c(e),n=t.length;n--;)t[n][2]=a(t[n][1]);return t}function a(e){return e===e&&!u(e)}function i(e){return u(e)?e:Object(e)}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var s=n(33),c=n(40);e.exports=r},function(e,t,n){function r(e,t,n){var r=t.length,a=r,u=!n;if(null==e)return!a;for(e=o(e);r--;){var s=t[r];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++r<a;){s=t[r];var c=s[0],l=e[c],d=s[1];if(u&&s[2]){if(void 0===l&&!(c in e))return!1}else{var p=n?n(l,d,c):void 0;if(!(void 0===p?i(d,l,n,!0):p))return!1}}return!0}function o(e){return a(e)?e:Object(e)}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var i=n(34);e.exports=r},function(e,t,n){function r(e){return!!e&&"object"==typeof e}function o(e,t){for(var n=-1,r=e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function a(e,t,n,o,u,s){return e===t||(null==e||null==t||!l(e)&&!r(t)?e!==e&&t!==t:i(e,t,a,n,o,u,s))}function i(e,t,n,r,o,a,i){var l=d(e),f=d(t),m=v,g=v;l||(m=T.call(e),m==h?m=x:m!=x&&(l=p(e))),f||(g=T.call(t),g==h?g=x:g!=x&&(f=p(t)));var y=m==x,b=g==x,_=m==g;if(_&&!l&&!y)return s(e,t,m);if(!o){var C=y&&w.call(e,"__wrapped__"),E=b&&w.call(t,"__wrapped__");if(C||E)return n(C?e.value():e,E?t.value():t,r,o,a,i)}if(!_)return!1;a||(a=[]),i||(i=[]);for(var k=a.length;k--;)if(a[k]==e)return i[k]==t;a.push(e),i.push(t);var P=(l?u:c)(e,t,n,r,o,a,i);return a.pop(),i.pop(),P}function u(e,t,n,r,a,i,u){var s=-1,c=e.length,l=t.length;if(c!=l&&!(a&&l>c))return!1;for(;++s<c;){var d=e[s],p=t[s],f=r?r(a?p:d,a?d:p,s):void 0;if(void 0!==f){if(f)continue;return!1}if(a){if(!o(t,function(e){return d===e||n(d,e,r,a,i,u)}))return!1}else if(d!==p&&!n(d,p,r,a,i,u))return!1}return!0}function s(e,t,n){switch(n){case m:case g:return+e==+t;case y:return e.name==t.name&&e.message==t.message;case b:return e!=+e?t!=+t:e==+t;case _:case C:return e==t+""}return!1}function c(e,t,n,r,o,a,i){var u=f(e),s=u.length,c=f(t),l=c.length;if(s!=l&&!o)return!1;for(var d=s;d--;){var p=u[d];if(!(o?p in t:w.call(t,p)))return!1}for(var h=o;++d<s;){p=u[d];var v=e[p],m=t[p],g=r?r(o?m:v,o?v:m,p):void 0;if(!(void 0===g?n(v,m,r,o,a,i):g))return!1;h||(h="constructor"==p)}if(!h){var y=e.constructor,b=t.constructor;if(y!=b&&"constructor"in e&&"constructor"in t&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b))return!1}return!0}function l(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var d=n(35),p=n(36),f=n(37),h="[object Arguments]",v="[object Array]",m="[object Boolean]",g="[object Date]",y="[object Error]",b="[object Number]",x="[object Object]",_="[object RegExp]",C="[object String]",E=Object.prototype,w=E.hasOwnProperty,T=E.toString;e.exports=a},function(e,t){function n(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return u(n)?n:void 0}function o(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=g}function a(e){return i(e)&&h.call(e)==c}function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function u(e){return null!=e&&(a(e)?v.test(p.call(e)):n(e)&&l.test(e))}var s="[object Array]",c="[object Function]",l=/^\[object .+?Constructor\]$/,d=Object.prototype,p=Function.prototype.toString,f=d.hasOwnProperty,h=d.toString,v=RegExp("^"+p.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m=r(Array,"isArray"),g=9007199254740991,y=m||function(e){return n(e)&&o(e.length)&&h.call(e)==s};e.exports=y},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=a}function r(e){return!!e&&"object"==typeof e}function o(e){return r(e)&&n(e.length)&&!!M[A.call(e)]}var a=9007199254740991,i="[object Arguments]",u="[object Array]",s="[object Boolean]",c="[object Date]",l="[object Error]",d="[object Function]",p="[object Map]",f="[object Number]",h="[object Object]",v="[object RegExp]",m="[object Set]",g="[object String]",y="[object WeakMap]",b="[object ArrayBuffer]",x="[object DataView]",_="[object Float32Array]",C="[object Float64Array]",E="[object Int8Array]",w="[object Int16Array]",T="[object Int32Array]",k="[object Uint8Array]",P="[object Uint8ClampedArray]",S="[object Uint16Array]",O="[object Uint32Array]",M={};M[_]=M[C]=M[E]=M[w]=M[T]=M[k]=M[P]=M[S]=M[O]=!0,M[i]=M[u]=M[b]=M[s]=M[x]=M[c]=M[l]=M[d]=M[p]=M[f]=M[h]=M[v]=M[m]=M[g]=M[y]=!1;var N=Object.prototype,A=N.toString;e.exports=o},function(e,t,n){function r(e){return function(t){return null==t?void 0:t[e]}}function o(e){return null!=e&&i(y(e))}function a(e,t){return e="number"==typeof e||f.test(e)?+e:-1,t=null==t?g:t,e>-1&&e%1==0&&e<t}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=g}function u(e){for(var t=c(e),n=t.length,r=n&&e.length,o=!!r&&i(r)&&(p(e)||d(e)),u=-1,s=[];++u<n;){var l=t[u];(o&&a(l,r)||v.call(e,l))&&s.push(l)}return s}function s(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function c(e){if(null==e)return[];s(e)||(e=Object(e));var t=e.length;t=t&&i(t)&&(p(e)||d(e))&&t||0;for(var n=e.constructor,r=-1,o="function"==typeof n&&n.prototype===e,u=Array(t),c=t>0;++r<t;)u[r]=r+"";for(var l in e)c&&a(l,t)||"constructor"==l&&(o||!v.call(e,l))||u.push(l);return u}var l=n(38),d=n(39),p=n(35),f=/^\d+$/,h=Object.prototype,v=h.hasOwnProperty,m=l(Object,"keys"),g=9007199254740991,y=r("length"),b=m?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||"function"!=typeof e&&o(e)?u(e):s(e)?m(e):[]}:u;e.exports=b},function(e,t){function n(e){return!!e&&"object"==typeof e}function r(e,t){var n=null==e?void 0:e[t];return i(n)?n:void 0}function o(e){return a(e)&&p.call(e)==u}function a(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function i(e){return null!=e&&(o(e)?f.test(l.call(e)):n(e)&&s.test(e))}var u="[object Function]",s=/^\[object .+?Constructor\]$/,c=Object.prototype,l=Function.prototype.toString,d=c.hasOwnProperty,p=c.toString,f=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t){function n(e){return o(e)&&h.call(e,"callee")&&(!m.call(e,"callee")||v.call(e)==l)}function r(e){return null!=e&&i(e.length)&&!a(e)}function o(e){return s(e)&&r(e)}function a(e){var t=u(e)?v.call(e):"";return t==d||t==p}function i(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=c}function u(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s(e){return!!e&&"object"==typeof e}var c=9007199254740991,l="[object Arguments]",d="[object Function]",p="[object GeneratorFunction]",f=Object.prototype,h=f.hasOwnProperty,v=f.toString,m=f.propertyIsEnumerable;e.exports=n},function(e,t,n){function r(e){return o(e)?e:Object(e)}function o(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function a(e){e=r(e);for(var t=-1,n=i(e),o=n.length,a=Array(o);++t<o;){var u=n[t];a[t]=[u,e[u]]}return a}var i=n(37);e.exports=a},function(e,t,n){function r(e,t){return function(n,r,a){if(r=o(r,a,3),s(n)){var c=u(n,r,t);return c>-1?n[c]:void 0}return i(n,r,e)}}var o=n(42),a=n(44),i=n(45),u=n(46),s=n(35),c=r(a);e.exports=c},function(e,t,n){function r(e){return null==e?"":e+""}function o(e,t,n){var r=typeof e;return"function"==r?void 0===t?e:C(e,t,n):null==e?b:"object"==r?u(e):void 0===t?x(e):s(e,t)}function a(e,t,n){if(null!=e){void 0!==n&&n in v(e)&&(t=[n]);for(var r=0,o=t.length;null!=e&&r<o;)e=e[t[r++]];return r&&r==o?e:void 0}}function i(e,t,n){var r=t.length,o=r,a=!n;if(null==e)return!o;for(e=v(e);r--;){var i=t[r];if(a&&i[2]?i[1]!==e[i[0]]:!(i[0]in e))return!1}for(;++r<o;){i=t[r];var u=i[0],s=e[u],c=i[1];if(a&&i[2]){if(void 0===s&&!(u in e))return!1}else{var l=n?n(s,c,u):void 0;if(!(void 0===l?_(c,s,n,!0):l))return!1}}return!0}function u(e){var t=p(e);if(1==t.length&&t[0][2]){var n=t[0][0],r=t[0][1];return function(e){return null!=e&&(e[n]===r&&(void 0!==r||n in v(e)))}}return function(e){return i(e,t)}}function s(e,t){var n=E(e),r=f(e)&&h(t),o=e+"";return e=m(e),function(i){if(null==i)return!1;var u=o;if(i=v(i),(n||!r)&&!(u in i)){if(i=1==e.length?i:a(i,d(e,0,-1)),null==i)return!1;u=g(e),i=v(i)}return i[u]===t?void 0!==t||u in i:_(t,i[u],void 0,!0)}}function c(e){return function(t){return null==t?void 0:t[e]}}function l(e){var t=e+"";return e=m(e),function(n){return a(n,e,t)}}function d(e,t,n){var r=-1,o=e.length;t=null==t?0:+t||0,t<0&&(t=-t>o?0:o+t),n=void 0===n||n>o?o:+n||0,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function p(e){for(var t=w(e),n=t.length;n--;)t[n][2]=h(t[n][1]);return t}function f(e,t){var n=typeof e;if("string"==n&&k.test(e)||"number"==n)return!0;if(E(e))return!1;var r=!T.test(e);return r||null!=t&&e in v(t)}function h(e){return e===e&&!y(e)}function v(e){return y(e)?e:Object(e)}function m(e){if(E(e))return e;var t=[];return r(e).replace(P,function(e,n,r,o){t.push(r?o.replace(S,"$1"):n||e)}),t}function g(e){var t=e?e.length:0;return t?e[t-1]:void 0}function y(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function b(e){return e}function x(e){return f(e)?c(e):l(e)}var _=n(34),C=n(43),E=n(35),w=n(40),T=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,k=/^\w*$/,P=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,S=/\\(\\)?/g;e.exports=o},function(e,t){function n(e,t,n){if("function"!=typeof e)return r;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,a){return e.call(t,n,r,o,a)};case 5:return function(n,r,o,a,i){return e.call(t,n,r,o,a,i)}}return function(){return e.apply(t,arguments)}}function r(e){return e}e.exports=n},function(e,t,n){function r(e,t){return f(e,t,l)}function o(e){return function(t){return null==t?void 0:t[e]}}function a(e,t){return function(n,r){var o=n?h(n):0;if(!u(o))return e(n,r);for(var a=t?o:-1,i=s(n);(t?a--:++a<o)&&r(i[a],a,i)!==!1;);return n}}function i(e){return function(t,n,r){for(var o=s(t),a=r(t),i=a.length,u=e?i:-1;e?u--:++u<i;){var c=a[u];if(n(o[c],c,o)===!1)break}return t}}function u(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=d}function s(e){return c(e)?e:Object(e)}function c(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}var l=n(37),d=9007199254740991,p=a(r),f=i(),h=o("length");e.exports=p},function(e,t){function n(e,t,n,r){var o;return n(e,function(e,n,a){if(t(e,n,a))return o=r?n:e,!1}),o}e.exports=n},function(e,t){function n(e,t,n){for(var r=e.length,o=n?r:-1;n?o--:++o<r;)if(t(e[o],o,e))return o;return-1}e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return(0,i["default"])(e,"Error returning keyCode: `event` is undefined."),e.which||e.keyCode}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o;var a=n(7),i=r(a);e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){var n=void 0,r=void 0;if("@"===t)n=i["default"].extractMentionsWithIndices(e),r="screenName";else{if("#"!==t)throw new Error("Error extracting mentions: "+t+" must be either '@' or '#'");n=i["default"].extractHashtagsWithIndices(e),r="hashtag"}return{mentions:n,prop:r}}Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=o;var a=n(49),i=r(a);e.exports=t["default"]},function(e,t,n){var r,o,a;!function(){function n(e,t){return t=t||"","string"!=typeof e&&(e.global&&t.indexOf("g")<0&&(t+="g"),e.ignoreCase&&t.indexOf("i")<0&&(t+="i"),e.multiline&&t.indexOf("m")<0&&(t+="m"),e=e.source),new RegExp(e.replace(/#\{(\w+)\}/g,function(e,t){var n=c.txt.regexen[t]||"";return"string"!=typeof n&&(n=n.source),n}),t)}function i(e,t){return e.replace(/#\{(\w+)\}/g,function(e,n){return t[n]||""})}function u(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function s(e,t,n){return n?!e||e.match(t)&&RegExp["$&"]===e:"string"==typeof e&&e.match(t)&&RegExp["$&"]===e}if("undefined"==typeof c||null===c)var c={};c.txt={},c.txt.regexen={};var l={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#39;"};c.txt.htmlEscape=function(e){return e&&e.replace(/[&"'><]/g,function(e){return l[e]})},c.txt.regexSupplant=n,c.txt.stringSupplant=i,c.txt.regexen.spaces_group=/\x09-\x0D\x20\x85\xA0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000/,c.txt.regexen.spaces=n(/[#{spaces_group}]/),c.txt.regexen.invalid_chars_group=/\uFFFE\uFEFF\uFFFF\u202A-\u202E/,c.txt.regexen.invalid_chars=n(/[#{invalid_chars_group}]/),c.txt.regexen.punct=/\!'#%&'\(\)*\+,\\\-\.\/:;<=>\?@\[\]\^_{|}~\$/,c.txt.regexen.rtl_chars=/[\u0600-\u06FF]|[\u0750-\u077F]|[\u0590-\u05FF]|[\uFE70-\uFEFF]/gm,c.txt.regexen.non_bmp_code_pairs=/[\uD800-\uDBFF][\uDC00-\uDFFF]/gm,c.txt.regexen.latinAccentChars=/\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u024F\u0253\u0254\u0256\u0257\u0259\u025B\u0263\u0268\u026F\u0272\u0289\u028B\u02BB\u0300-\u036F\u1E00-\u1EFF/,c.txt.regexen.bmpLetterAndMarks=/A-Za-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u052f\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u065f\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06ef\u06fa-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07ca-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0-\u08b2\u08e4-\u0963\u0971-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09f0\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a70-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0c00-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c81-\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0cf1\u0cf2\u0d01-\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u103f\u1050-\u108f\u109a-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16f1-\u16f8\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u180b-\u180d\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191e\u1920-\u192b\u1930-\u193b\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f\u1aa7\u1ab0-\u1abe\u1b00-\u1b4b\u1b6b-\u1b73\u1b80-\u1baf\u1bba-\u1bf3\u1c00-\u1c37\u1c4d-\u1c4f\u1c5a-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1cf8\u1cf9\u1d00-\u1df5\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u20d0-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2183\u2184\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005\u3006\u302a-\u302f\u3031-\u3035\u303b\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua672\ua674-\ua67d\ua67f-\ua69d\ua69f-\ua6e5\ua6f0\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua7ad\ua7b0\ua7b1\ua7f7-\ua827\ua840-\ua873\ua880-\ua8c4\ua8e0-\ua8f7\ua8fb\ua90a-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf\ua9e0-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa36\uaa40-\uaa4d\uaa60-\uaa76\uaa7a-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab5f\u