text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.stream=e():t.stream=e()}(window,function(){return r={},i.m=n=[function(t,e){t.exports=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){t.exports=n(75)},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";n.d(e,"a",function(){return w}),n.d(e,"c",function(){return k}),n.d(e,"b",function(){return x}),n.d(e,"d",function(){return E});var r=n(2),s=n.n(r),i=n(17),a=n.n(i),o=n(18),c=n.n(o),u=n(63),l=n.n(u),h=n(32),f=n.n(h),d=n(64),p=n.n(d),v=n(0),y=n.n(v);function g(r){var i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e,n=f()(r);return e=i?(t=f()(this).constructor,Reflect.construct(n,arguments,t)):n.apply(this,arguments),l()(this,e)}}var m="function"==typeof Error.captureStackTrace,b=!!(new Error).stack,_=function(t){c()(r,t);var n=g(r);function r(t){var e;return s()(this,r),e=n.call(this,t),y()(a()(e),"message",void 0),e.message=t,m?Error.captureStackTrace(a()(e),r.constructor):e.stack=b?(new Error).stack:"",e}return r}(p()(Error)),w=function(t){c()(n,t);var e=g(n);function n(){return s()(this,n),e.apply(this,arguments)}return n}(_),k=function(t){c()(n,t);var e=g(n);function n(){return s()(this,n),e.apply(this,arguments)}return n}(_),x=function(t){c()(n,t);var e=g(n);function n(){return s()(this,n),e.apply(this,arguments)}return n}(_),E=function(t){c()(o,t);var i=g(o);function o(t,e,n){var r;return s()(this,o),r=i.call(this,t),y()(a()(r),"error",void 0),y()(a()(r),"response",void 0),r.error=e,r.response=n,r}return o}(_)},function(t,e){function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(t,e){function c(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(t){return void n(t)}a.done?e(c):Promise.resolve(c).then(r,i)}t.exports=function(a){return function(){var t=this,s=arguments;return new Promise(function(e,n){var r=a.apply(t,s);function i(t){c(r,e,n,i,o,"next",t)}function o(t){c(r,e,n,i,o,"throw",t)}i(void 0)})}}},function(t,e,n){"use strict";var r=n(31),o=n.n(r),i=n(38),s=n.n(i),a=n(66),c=n.n(a),u=n(3),l=/^[\w]+$/,h=/^[\w-]+$/;function f(t){if(!l.test(t))throw new u.a("Invalid feedSlug, please use letters, numbers or _: ".concat(t));return t}function d(t){if(!h.test(t))throw new u.a("Invalid userId, please use letters, numbers, - or _: ".concat(t));return t}function p(t){return null!==t&&"object"===s()(t)&&(t.readable||"function"==typeof t._read)}e.a={validateFeedId:function(t){var e=t.split(":");if(2!==e.length)throw new u.a("Invalid feedId, expected something like user:1 got ".concat(t));var n=o()(e,2),r=n[0],i=n[1];return f(r),d(i),t},validateFeedSlug:f,validateUserId:d,rfc3986:function(t){return t.replace(/[!'()*]/g,function(t){return"%".concat(t.charCodeAt(0).toString(16).toUpperCase())})},isReadableStream:p,addFileToFormData:function(t,e,n){var r,i,o=new c.a;return p(t)||null!=(i=t)&&null!=i.constructor&&"function"==typeof i.constructor.isBuffer&&i.constructor.isBuffer(i)||(r=t,"undefined"!=typeof window&&"File"in window&&r instanceof File)?e?o.append("file",t,e):o.append("file",t):o.append("file",{uri:t,name:e||t.split("/").reverse()[0],contentType:n||void 0}),o},replaceStreamObjects:function e(n){if(Array.isArray(n))return n.map(e);if("[object Object]"!==Object.prototype.toString.call(n))return n;if("function"==typeof n.ref)return n.ref();var r={};return Object.keys(n).forEach(function(t){r[t]=e(n[t])}),r}}},function(t,e,n){"use strict";var i=Array.prototype.forEach,o=Object.prototype.hasOwnProperty;t.exports=function(r){return i.call(arguments,function(t,e){if(0!==e)for(var n in t)o.call(t,n)&&(r[n]=t[n])}),r}},function(t,e,n){"use strict";n.d(e,"a",function(){return u}),n.d(e,"b",function(){return l});var r=n(0),i=n.n(r),o=n(39),s=n.n(o);function a(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){i()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},i=!r.expireTokens||!r.expireTokens,o={resource:e,action:n};return r.feedId&&(o.feed_id=r.feedId),r.userId&&(o.user_id=r.userId),s.a.sign(o,t,{algorithm:"HS256",noTimestamp:i})}function l(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};if("string"!=typeof e)throw new TypeError("userId should be a string");var i=c({user_id:e},n),o=c({algorithm:"HS256",noTimestamp:!0},r);return s.a.sign(i,t,o)}},function(t,e,n){"use strict";var i=n(42),r=Object.prototype.toString;function o(t){return"[object Array]"===r.call(t)}function s(t){return void 0===t}function a(t){return null!==t&&"object"==typeof t}function c(t){if("[object Object]"!==r.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}function u(t){return"[object Function]"===r.call(t)}function l(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),o(t))for(var n=0,r=t.length;n<r;n++)e.call(null,t[n],n,t);else for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(null,t[i],i,t)}t.exports={isArray:o,isArrayBuffer:function(t){return"[object ArrayBuffer]"===r.call(t)},isBuffer:function(t){return null!==t&&!s(t)&&null!==t.constructor&&!s(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return"undefined"!=typeof FormData&&t instanceof FormData},isArrayBufferView:function(t){var e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&t.buffer instanceof ArrayBuffer;return e},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:a,isPlainObject:c,isUndefined:s,isDate:function(t){return"[object Date]"===r.call(t)},isFile:function(t){return"[object File]"===r.call(t)},isBlob:function(t){return"[object Blob]"===r.call(t)},isFunction:u,isStream:function(t){return a(t)&&u(t.pipe)},isURLSearchParams:function(t){return"undefined"!=typeof URLSearchParams&&t instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function n(){var r={};function t(t,e){c(r[e])&&c(t)?r[e]=n(r[e],t):c(t)?r[e]=n({},t):o(t)?r[e]=t.slice():r[e]=t}for(var e=0,i=arguments.length;e<i;e++)l(arguments[e],t);return r},extend:function(n,t,r){return l(t,function(t,e){n[e]=r&&"function"==typeof t?i(t,r):t}),n},trim:function(t){return t.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t}}},function(t,e,n){"use strict";var i=n(7);t.exports=function(t,e){"function"!=typeof t&&(e=t,t=Object);function n(){return this.initialize&&this.initialize.apply(this,arguments)||this}function r(){}return r.prototype=t.prototype,n.prototype=new r,i(n.prototype,e),n}},function(t,e){var n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";n.d(e,"a",function(){return v});var r=n(1),o=n.n(r),i=n(5),s=n.n(i),a=n(2),c=n.n(a),u=n(4),l=n.n(u),h=n(0),f=n.n(h);function d(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach(function(t){f()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var v=function(){function r(t,e,n){c()(this,r),f()(this,"client",void 0),f()(this,"token",void 0),f()(this,"id",void 0),f()(this,"data",void 0),f()(this,"full",void 0),f()(this,"url",void 0),this.client=t,this.id=e,this.data=void 0,this.full=void 0,this.token=n,this.url="user/".concat(this.id,"/")}var e,n,i;return l()(r,[{key:"ref",value:function(){return"SU:".concat(this.id)}},{key:"delete",value:function(){return this.client.delete({url:this.url,token:this.token})}},{key:"get",value:(i=s()(o.a.mark(function t(e){var n;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.get({url:this.url,token:this.token,qs:e});case 2:return n=t.sent,this.full=p({},n),delete this.full.duration,this.data=this.full.data,t.abrupt("return",this);case 7:case"end":return t.stop()}},t,this)})),function(t){return i.apply(this,arguments)})},{key:"create",value:(n=s()(o.a.mark(function t(e,n){var r;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.post({url:"user/",body:{id:this.id,data:e||this.data||{}},qs:n,token:this.token});case 2:return r=t.sent,this.full=p({},r),delete this.full.duration,this.data=this.full.data,t.abrupt("return",this);case 7:case"end":return t.stop()}},t,this)})),function(t,e){return n.apply(this,arguments)})},{key:"update",value:(e=s()(o.a.mark(function t(e){var n;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.put({url:this.url,body:{data:e||this.data||{}},token:this.token});case 2:return n=t.sent,this.full=p({},n),delete this.full.duration,this.data=this.full.data,t.abrupt("return",this);case 7:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"getOrCreate",value:function(t){return this.create(t,{get_or_create:!0})}},{key:"profile",value:function(){return this.get({with_follow_counts:!0})}}]),r}()},function(t,e){},function(t,e,n){"use strict";t.exports={isURI:function(t){return t&&t.protocol&&t.host&&t.path},isSameOrigin:function(t){return t.protocol===location.protocol&&t.hostname===location.hostname&&t.port===location.port},parse:function(n){if("string"!=typeof n)return n;function t(e,t){n=n.replace(t,function(t){return c[e]=t,""}),c[e]=c[e]||""}var e,r,i,o,s,a,c={};for(t("protocol",/^[a-z]+\:/i),t("host",/^\/\/[^\/\?#]+/),/^\//.test(n)||c.host||(n=location.pathname.replace(/[^\/]*$/,"")+n),t("pathname",/^[^\?#]*/),t("search",/^\?[^#]*/),t("hash",/^#.*/),c.protocol=c.protocol||location.protocol,c.host?(c.host=c.host.substr(2),/@/.test(c.host)&&(c.auth=c.host.split("@")[0],c.host=c.host.split("@")[1]),e=c.host.match(/^\[([^\]]+)\]|^[^:]+/),c.hostname=e[1]||e[0],c.port=(c.host.match(/:(\d+)$/)||[])[1]||""):(c.host=location.host,c.hostname=location.hostname,c.port=location.port),c.pathname=c.pathname||"/",c.path=c.pathname+c.search,a={},o=0,s=(i=(r=c.search.replace(/^\?/,""))?r.split("&"):[]).length;o<s;o++)e=i[o].split("="),a[decodeURIComponent(e[0]||"")]=decodeURIComponent(e[1]||"");return c.query=a,c.href=this.stringify(c),c},stringify:function(t){var e=t.auth?t.auth+"@":"",n=t.protocol+"//"+e+t.host;return n+=t.pathname+this.queryString(t.query)+(t.hash||"")},queryString:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return 0===e.length?"":"?"+e.join("&")}}},function(u,t,h){"use strict";(function(s){var t=h(10),a=h(54).Cookie,n=h(23),l=h(33),r=h(7),e=h(19),i=h(98),o=h(52),c=r(t({className:"Transport",DEFAULT_PORTS:{"http:":80,"https:":443,"ws:":80,"wss:":443},MAX_DELAY:0,batching:!0,initialize:function(t,e){this._dispatcher=t,this.endpoint=e,this._outbox=[],this._proxy=r({},this._dispatcher.proxy),this._proxy.origin||(this._proxy.origin=this._findProxy())},close:function(){},encode:function(t){return""},sendMessage:function(t){return this.debug("Client ? sending message to ?: ?",this._dispatcher.clientId,this.endpoint.href,t),this.batching?(this._outbox.push(t),this._flushLargeBatch(),t.channel===o.HANDSHAKE?this._publish(.01):(t.channel===o.CONNECT&&(this._connectMessage=t),this._publish(this.MAX_DELAY))):n.resolve(this.request([t]))},_makePromise:function(){var e=this;this._requestPromise=this._requestPromise||new n(function(t){e._resolvePromise=t})},_publish:function(t){return this._makePromise(),this.addTimeout("publish",t,function(){this._flush(),delete this._requestPromise},this),this._requestPromise},_flush:function(){this.removeTimeout("publish"),1<this._outbox.length&&this._connectMessage&&(this._connectMessage.advice={timeout:0}),this._resolvePromise(this.request(this._outbox)),this._connectMessage=null,this._outbox=[]},_flushLargeBatch:function(){var t;this.encode(this._outbox).length<this._dispatcher.maxRequestSize||(t=this._outbox.pop(),this._makePromise(),this._flush(),t&&this._outbox.push(t))},_receive:function(t){if(t){t=[].concat(t),this.debug("Client ? received from ? via ?: ?",this._dispatcher.clientId,this.endpoint.href,this.connectionType,t);for(var e=0,n=t.length;e<n;e++)this._dispatcher.handleResponse(t[e])}},_handleError:function(t,e){t=[].concat(t),this.debug("Client ? failed to send to ? via ?: ?",this._dispatcher.clientId,this.endpoint.href,this.connectionType,t);for(var n=0,r=t.length;n<r;n++)this._dispatcher.handleError(t[n])},_getCookies:function(){var t=this._dispatcher.cookies,e=this.endpoint.href;return t?l.map(t.getCookiesSync(e),function(t){return t.cookieString()}).join("; "):""},_storeCookies:function(t){var e,n=this._dispatcher.cookies,r=this.endpoint.href;if(t&&n)for(var i=0,o=(t=[].concat(t)).length;i<o;i++)e=a.parse(t[i]),n.setCookieSync(e,r)},_findProxy:function(){if(void 0!==s){var t=this.endpoint.protocol;if(t){var e,n,r=t.replace(/:$/,"").toLowerCase()+"_proxy",i=r.toUpperCase(),o=s.env;return"http_proxy"===r&&o.REQUEST_METHOD?(1===(e=Object.keys(o).filter(function(t){return/^http_proxy$/i.test(t)})).length?e[0]===r&&void 0===o[i]&&(n=o[r]):1<e.length&&(n=o[r]),n=n||o["CGI_"+i]):(n=o[r]||o[i])&&!o[r]&&console.warn("The environment variable "+i+" is discouraged. Use "+r+"."),n}}}}),{get:function(o,s,a,c,u){var t=o.endpoint;l.asyncEach(this._transports,function(t,n){var e=t[0],r=t[1],i=o.endpointFor(e);return 0<=l.indexOf(a,e)?n():l.indexOf(s,e)<0?(r.isUsable(o,i,function(){}),n()):void r.isUsable(o,i,function(t){if(!t)return n();var e=r.hasOwnProperty("create")?r.create(o,i):new r(o,i);c.call(u,e)})},function(){throw new Error("Could not find a usable connection type for "+t.href)})},register:function(t,e){this._transports.push([t,e]),e.prototype.connectionType=t},getConnectionTypes:function(){return l.map(this._transports,function(t){return t[0]})},disable:function(t){if("autodisconnect"===t)for(var e=0;e<this._transports.length;e++)this._transports[e][1]._unloaded=!1},_transports:[]});r(c.prototype,e),r(c.prototype,i),u.exports=c}).call(this,h(22))},function(t,e,n){var s=n(74);t.exports=function(t,e){if(null==t)return{};var n,r=s(t,e);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(t),o=0;o<i.length;o++)n=i[o],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n]);return r}},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e,n){var r=n(37);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&r(t,e)}},function(t,e,n){"use strict";var a=n(20),c={LOG_LEVELS:{fatal:4,error:3,warn:2,info:1,debug:0},writeLog:function(t,e){var n,r,i,o,s=c.logger||(c.wrapper||c).logger;s&&(n=Array.prototype.slice.apply(t),r="[Faye",i=this.className,o=n.shift().replace(/\?/g,function(){try{return a(n.shift())}catch(t){return"[Object]"}}),i&&(r+="."+i),r+="] ","function"==typeof s[e]?s[e](r+o):"function"==typeof s&&s(r+o))}};for(var r in c.LOG_LEVELS)!function(t){c[t]=function(){this.writeLog(arguments,t)}}(r);t.exports=c},function(t,e,n){"use strict";t.exports=function(t){return JSON.stringify(t,function(t,e){return this[t]instanceof Array?this[t]:e})}},function(t,e,n){"use strict";(function(r){var i=n(23);t.exports={then:function(t,e){var n=this;return this._promise||(this._promise=new i(function(t,e){n._resolve=t,n._reject=e})),0===arguments.length?this._promise:this._promise.then(t,e)},callback:function(e,n){return this.then(function(t){e.call(n,t)})},errback:function(e,n){return this.then(null,function(t){e.call(n,t)})},timeout:function(t,e){this.then();var n=this;this._timer=r.setTimeout(function(){n._reject(e)},1e3*t)},setDeferredStatus:function(t,e){this._timer&&r.clearTimeout(this._timer),this.then(),"succeeded"===t?this._resolve(e):"failed"===t?this._reject(e):delete this._promise}}}).call(this,n(11))},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var c,u=[],l=!1,h=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=a(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function v(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=v,i.addListener=v,i.once=v,i.off=v,i.removeListener=v,i.removeAllListeners=v,i.emit=v,i.prependListener=v,i.prependOnceListener=v,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";function s(t){this._state=-1,this._value=null,this._defer=[],i(this,t)}var a=n(51);s.prototype.then=function(t,e){var n=new s,r={promise:n,onFulfilled:t,onRejected:e};return-1===this._state?this._defer.push(r):o(this,r),n},s.prototype.catch=function(t){return this.then(null,t)};var i=function(e,t){if("function"==typeof t){var n=0,r=function(t){0==n++&&h(e,t)};try{t(function(t){0==n++&&c(e,t)},r)}catch(t){r(t)}}},o=function(t,e){var n=t._state,r=t._value,i=e.promise,o=[e.onFulfilled,e.onRejected][n];if("function"!=typeof o)return(0,[c,h][n])(i,r);a(function(){try{c(i,o(r))}catch(t){h(i,t)}})},c=function(e,n){if(e===n)return h(e,new TypeError("Recursive promise chain detected"));var r;try{r=u(n)}catch(t){return h(e,t)}if(!r)return l(e,n);i(e,function(t,e){r.call(n,t,e)})},u=function(t){var e=typeof t,n=("object"==e||"function"==e)&&t&&t.then;return"function"==typeof n?n:null},l=function(t,e){r(t,0,e)},h=function(t,e){r(t,1,e)},r=function(t,e,n){var r=t._defer,i=0;if(t._state=e,t._value=n,t._defer=null,0!==r.length)for(;i<r.length;)o(t,r[i++])};s.resolve=function(n){try{if(u(n))return n}catch(t){return s.reject(t)}return new s(function(t,e){t(n)})},s.reject=function(n){return new s(function(t,e){e(n)})},s.all=function(e){return new s(function(n,r){var i=[],o=e.length;if(0===o)return n(i);for(var t=0;t<o;t++)!function(t,e){s.resolve(t).then(function(t){i[e]=t,0==--o&&n(i)},r)}(e[t],t)})},s.race=function(i){return new s(function(t,e){for(var n=0,r=i.length;n<r;n++)s.resolve(i[n]).then(t,e)})},s.deferred=function(){var n={};return n.promise=new s(function(t,e){n.resolve=t,n.reject=e}),n},t.exports=s},function(t,F,z){"use strict";(function(l){z.d(F,"a",function(){return M});var t=z(31),a=z.n(t),e=z(16),h=z.n(e),n=z(1),f=z.n(n),r=z(5),d=z.n(r),i=z(2),p=z.n(i),o=z(4),s=z.n(o),c=z(0),v=z.n(c),u=z(58),y=z.n(u),g=z(59),m=z(60),b=z(61),_=z(62),w=z.n(_),k=z(25),x=z(26),E=z(27),O=z(28),T=z(29),S=z(12),C=z(8),j=z(3),A=z(6),N=z(13),R=z.n(N),I=z(40),U=z.n(I),P=z(30);function D(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach(function(t){v()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var q=z(113),M=function(){function u(t,e,n){var r,i,o,s=this,a=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};if(p()(this,u),v()(this,"baseUrl",void 0),v()(this,"baseAnalyticsUrl",void 0),v()(this,"apiKey",void 0),v()(this,"appId",void 0),v()(this,"usingApiSecret",void 0),v()(this,"apiSecret",void 0),v()(this,"userToken",void 0),v()(this,"enrichByDefault",void 0),v()(this,"options",void 0),v()(this,"userId",void 0),v()(this,"authPayload",void 0),v()(this,"version",void 0),v()(this,"fayeUrl",void 0),v()(this,"group",void 0),v()(this,"expireTokens",void 0),v()(this,"location",void 0),v()(this,"fayeClient",void 0),v()(this,"browser",void 0),v()(this,"node",void 0),v()(this,"nodeOptions",void 0),v()(this,"request",void 0),v()(this,"subscriptions",void 0),v()(this,"handlers",void 0),v()(this,"currentUser",void 0),v()(this,"personalization",void 0),v()(this,"collections",void 0),v()(this,"files",void 0),v()(this,"images",void 0),v()(this,"reactions",void 0),v()(this,"_personalizationToken",void 0),v()(this,"_collectionsToken",void 0),v()(this,"_getOrCreateToken",void 0),v()(this,"addToMany",void 0),v()(this,"followMany",void 0),v()(this,"unfollowMany",void 0),v()(this,"createRedirectUrl",void 0),v()(this,"replaceReactionOptions",function(t){null!=t&&t.reactions&&(null!=t.reactions.own&&(t.withOwnReactions=t.reactions.own),null!=t.reactions.recent&&(t.withRecentReactions=t.reactions.recent),null!=t.reactions.counts&&(t.withReactionCounts=t.reactions.counts),null!=t.reactions.own_children&&(t.withOwnChildren=t.reactions.own_children),delete t.reactions)}),v()(this,"handleResponse",function(t){if(/^2/.test("".concat(t.status)))return s.send("response",null,t,t.data),t.data;throw new j.d("".concat(JSON.stringify(t.data)," with HTTP status code ").concat(t.status),t.data,t)}),v()(this,"doAxiosRequest",function(){var n=d()(f.a.mark(function t(e,n){var r;return f.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s.send("request",e,n),t.prev=1,t.next=4,s.request(s.enrichKwargs(L({method:e},n)));case 4:return r=t.sent,t.abrupt("return",s.handleResponse(r));case 8:if(t.prev=8,t.t0=t.catch(1),t.t0.response)return t.abrupt("return",s.handleResponse(t.t0.response));t.next=12;break;case 12:throw new j.c(t.t0.message);case 13:case"end":return t.stop()}},t,null,[[1,8]])}));return function(t,e){return n.apply(this,arguments)}}()),this.baseUrl="https://api.stream-io-api.com/api/",this.baseAnalyticsUrl="https://analytics.stream-io-api.com/analytics/",this.apiKey=t,this.usingApiSecret=null!=e&&!e.includes("."),this.apiSecret=this.usingApiSecret?e:null,this.userToken=this.usingApiSecret?null:e,this.enrichByDefault=!this.usingApiSecret,null!=this.userToken){var c=w()(this.userToken);if(!c.user_id)throw new TypeError("user_id is missing in user token");this.userId=c.user_id,this.currentUser=this.user(this.userId)}if(this.appId=n,this.options=a,this.version=this.options.version||"v1.0",this.fayeUrl=this.options.fayeUrl||"https://faye-us-east.stream-io-api.com/faye",this.fayeClient=null,this.group=this.options.group||"unspecified",this.subscriptions={},this.expireTokens=!!this.options.expireTokens&&this.options.expireTokens,this.location=this.options.location,this.baseUrl=this.getBaseUrl(),void 0!==l&&null!==(r=l.env)&&void 0!==r&&r.LOCAL_FAYE&&(this.fayeUrl="http://localhost:9999/faye/"),void 0!==l&&null!==(i=l.env)&&void 0!==i&&i.STREAM_ANALYTICS_BASE_URL&&(this.baseAnalyticsUrl=l.env.STREAM_ANALYTICS_BASE_URL),this.handlers={},this.browser=void 0!==this.options.browser?this.options.browser:"undefined"!=typeof window,this.node=!this.browser,this.node&&(o=void 0===this.options.keepAlive||this.options.keepAlive,this.nodeOptions={httpAgent:new m.Agent({keepAlive:o,keepAliveMsecs:3e3}),httpsAgent:new b.Agent({keepAlive:o,keepAliveMsecs:3e3})}),this.request=y.a.create(L({timeout:this.options.timeout||1e4,withCredentials:!1},this.nodeOptions||{})),this.personalization=new k.a(this),this.browser&&this.usingApiSecret)throw new j.a('You are publicly sharing your App Secret. Do not expose the App Secret in browsers, "native" mobile apps, or other non-trusted environments.');this.collections=new x.b(this,this.getOrCreateToken()),this.files=new E.a(this,this.getOrCreateToken()),this.images=new O.a(this,this.getOrCreateToken()),this.reactions=new T.a(this,this.getOrCreateToken()),R.a&&U.a&&(this.addToMany=R.a.addToMany,this.followMany=R.a.followMany,this.unfollowMany=R.a.unfollowMany,this.createRedirectUrl=U.a)}var e,n;return s()(u,[{key:"_throwMissingApiSecret",value:function(){if(!this.usingApiSecret)throw new j.c("This method can only be used server-side using your API Secret, use client = stream.connect(key, secret);")}},{key:"getPersonalizationToken",value:function(){return this._personalizationToken||(this._throwMissingApiSecret(),this._personalizationToken=Object(C.a)(this.apiSecret,"personalization","*",{userId:"*",feedId:"*",expireTokens:this.expireTokens})),this._personalizationToken}},{key:"getCollectionsToken",value:function(){return this._collectionsToken||(this._throwMissingApiSecret(),this._collectionsToken=Object(C.a)(this.apiSecret,"collections","*",{feedId:"*",expireTokens:this.expireTokens})),this._collectionsToken}},{key:"getAnalyticsToken",value:function(){return this._throwMissingApiSecret(),Object(C.a)(this.apiSecret,"analytics","*",{userId:"*",expireTokens:this.expireTokens})}},{key:"getBaseUrl",value:function(t){var e,n;if(t=t||"api",this.options.urlOverride&&this.options.urlOverride[t])return this.options.urlOverride[t];var r="api"===t?"STREAM_BASE_URL":"STREAM_".concat(t.toUpperCase(),"_URL");if(void 0!==l&&null!==(e=l.env)&&void 0!==e&&e[r])return l.env[r];if(void 0!==l&&null!==(n=l.env)&&void 0!==n&&n.LOCAL||this.options.local)return"http://localhost:8000/".concat(t,"/");if(this.location){var i=this.options.protocol||"https";return"".concat(i,"://").concat(this.location,"-").concat(t,".stream-io-api.com/").concat(t,"/")}return"api"!==t?"https://".concat(t,".stream-io-api.com/").concat(t,"/"):this.baseUrl}},{key:"on",value:function(t,e){this.handlers[t]=e}},{key:"off",value:function(t){void 0===t?this.handlers={}:delete this.handlers[t]}},{key:"send",value:function(t){for(var e=arguments.length,n=new Array(1<e?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.handlers[t]&&this.handlers[t].apply(this,n)}},{key:"userAgent",value:function(){return"stream-javascript-client-".concat(this.node?"node":"browser","-").concat(q.version)}},{key:"getReadOnlyToken",value:function(t,e){return A.a.validateFeedSlug(t),A.a.validateUserId(e),Object(C.a)(this.apiSecret,"*","read",{feedId:"".concat(t).concat(e),expireTokens:this.expireTokens})}},{key:"getReadWriteToken",value:function(t,e){return A.a.validateFeedSlug(t),A.a.validateUserId(e),Object(C.a)(this.apiSecret,"*","*",{feedId:"".concat(t).concat(e),expireTokens:this.expireTokens})}},{key:"feed",value:function(t,e,n){return e instanceof S.a&&(e=e.id),void 0===n&&(n=this.usingApiSecret?Object(C.a)(this.apiSecret,"*","*",{feedId:"".concat(t).concat(e)}):this.userToken),new P.a(this,t,e||this.userId,n)}},{key:"enrichUrl",value:function(t,e){return"".concat(this.getBaseUrl(e)).concat(this.version,"/").concat(t)}},{key:"shouldUseEnrichEndpoint",value:function(t){var e=0<arguments.length&&void 0!==t?t:{};if(void 0===e.enrich)return this.enrichByDefault||null!=e.ownReactions||null!=e.withRecentReactions||null!=e.withReactionCounts||null!=e.withOwnChildren;var n=e.enrich;return delete e.enrich,n}},{key:"enrichKwargs",value:function(t){var e=t.method,n=t.token,r=h()(t,["method","token"]);return L({method:e,url:this.enrichUrl(r.url,r.serviceName),data:r.body,params:L({api_key:this.apiKey,location:this.group},r.qs||{}),headers:L({"X-Stream-Client":this.userAgent(),"stream-auth-type":"jwt",Authorization:n},r.headers||{})},r.axiosOptions||{})}},{key:"getFayeAuthorization",value:function(){var r=this;return{incoming:function(t,e){return e(t)},outgoing:function(t,e){var n;t.subscription&&r.subscriptions[t.subscription]&&(n=r.subscriptions[t.subscription],t.ext={user_id:n.userId,api_key:r.apiKey,signature:n.token}),e(t)}}}},{key:"getFayeClient",value:function(t){var e,n=0<arguments.length&&void 0!==t?t:10;return null===this.fayeClient&&(this.fayeClient=new g.Client(this.fayeUrl,{timeout:n}),e=this.getFayeAuthorization(),this.fayeClient.addExtension(e)),this.fayeClient}},{key:"upload",value:function(t,e,n,r,i){var o=A.a.addFileToFormData(e,n,r);return this.doAxiosRequest("POST",{url:t,body:o,headers:o.getHeaders?o.getHeaders():{},token:this.getOrCreateToken(),axiosOptions:{timeout:0,maxContentLength:1/0,maxBodyLength:1/0,onUploadProgress:i}})}},{key:"get",value:function(t){return this.doAxiosRequest("GET",t)}},{key:"post",value:function(t){return this.doAxiosRequest("POST",t)}},{key:"delete",value:function(t){return this.doAxiosRequest("DELETE",t)}},{key:"put",value:function(t){return this.doAxiosRequest("PUT",t)}},{key:"createUserToken",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:{};return this._throwMissingApiSecret(),Object(C.b)(this.apiSecret,t,n,{noTimestamp:!this.expireTokens})}},{key:"updateActivities",value:function(t){if(this._throwMissingApiSecret(),!(t instanceof Array))throw new TypeError("The activities argument should be an Array");var e=Object(C.a)(this.apiSecret,"activities","*",{feedId:"*",expireTokens:this.expireTokens});return this.post({url:"activities/",body:{activities:t},token:e})}},{key:"updateActivity",value:function(t){return this._throwMissingApiSecret(),this.updateActivities([t])}},{key:"getActivities",value:function(t){var e=t.ids,n=t.foreignIDTimes,r=h()(t,["ids","foreignIDTimes"]),i={};if(e){if(!(e instanceof Array))throw new TypeError("The ids argument should be an Array");i.ids=e.join(",")}else{if(!n)throw new TypeError("Missing ids or foreignIDTimes params");if(!(n instanceof Array))throw new TypeError("The foreignIDTimes argument should be an Array");var o=[],s=[];n.forEach(function(t){if(!(t instanceof Object))throw new TypeError("foreignIDTimes elements should be Objects");o.push(t.foreignID),s.push(t.time)}),i.foreign_ids=o.join(","),i.timestamps=s.join(",")}var a=this.userToken;this.usingApiSecret&&(a=Object(C.a)(this.apiSecret,"activities","*",{feedId:"*",expireTokens:this.expireTokens})),this.replaceReactionOptions(r);var c=this.shouldUseEnrichEndpoint(r)?"enrich/activities/":"activities/";return this.get({url:c,qs:L(L({},r),i),token:a})}},{key:"getOrCreateToken",value:function(){return this._getOrCreateToken||(this._getOrCreateToken=this.usingApiSecret?Object(C.a)(this.apiSecret,"*","*",{feedId:"*"}):this.userToken),this._getOrCreateToken}},{key:"user",value:function(t){return new S.a(this,t,this.getOrCreateToken())}},{key:"setUser",value:(n=d()(f.a.mark(function t(e){var n,r;return f.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.usingApiSecret)throw new j.c("This method can only be used client-side using a user token");t.next=2;break;case 2:return delete(n=L({},e)).id,t.next=6,this.currentUser.getOrCreate(n);case 6:return r=t.sent,this.currentUser=r,t.abrupt("return",r);case 9:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)})},{key:"og",value:function(t){return this.get({url:"og/",qs:{url:t},token:this.getOrCreateToken()})}},{key:"personalizedFeed",value:function(t){var e=0<arguments.length&&void 0!==t?t:{};return this.get({url:"enrich/personalization/feed/",qs:e,token:this.getOrCreateToken()})}},{key:"activityPartialUpdate",value:(e=d()(f.a.mark(function t(e){var n,r,i,o,s;return f.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.activitiesPartialUpdate([e]);case 2:return n=t.sent,r=n.activities,i=h()(n,["activities"]),o=a()(r,1),s=o[0],t.abrupt("return",L(L({},s),i));case 7:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"activitiesPartialUpdate",value:function(t){if(!(t instanceof Array))throw new TypeError("changes should be an Array");t.forEach(function(t){if(!(t instanceof Object))throw new TypeError("changeset should be and Object");if(t.foreignID&&(t.foreign_id=t.foreignID),void 0===t.id&&(void 0===t.foreign_id||void 0===t.time))throw new TypeError("missing id or foreign ID and time");if(t.set&&!(t.set instanceof Object))throw new TypeError("set field should be an Object");if(t.unset&&!(t.unset instanceof Array))throw new TypeError("unset field should be an Array")});var e=this.userToken;return this.usingApiSecret&&(e=Object(C.a)(this.apiSecret,"activities","*",{feedId:"*",expireTokens:this.expireTokens})),this.post({url:"activity/",body:{changes:t},token:e})}}]),u}()}).call(this,z(22))},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(2),i=n.n(r),o=n(4),s=n.n(o),a=n(0),c=n.n(a),u=function(){function e(t){i()(this,e),c()(this,"client",void 0),this.client=t}return s()(e,[{key:"get",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:{};return this.client.get({url:"".concat(t,"/"),serviceName:"personalization",qs:n,token:n.token||this.client.getPersonalizationToken()})}},{key:"post",value:function(t,e,n){var r=1<arguments.length&&void 0!==e?e:{},i=2<arguments.length&&void 0!==n?n:{};return this.client.post({url:"".concat(t,"/"),serviceName:"personalization",qs:r,body:i,token:this.client.getPersonalizationToken()})}},{key:"delete",value:function(t,e){var n=1<arguments.length&&void 0!==e?e:{};return this.client.delete({url:"".concat(t,"/"),serviceName:"personalization",qs:n,token:this.client.getPersonalizationToken()})}}]),e}()},function(t,e,n){"use strict";n.d(e,"a",function(){return p}),n.d(e,"b",function(){return v});var r=n(1),s=n.n(r),i=n(5),a=n.n(i),o=n(2),c=n.n(o),u=n(4),l=n.n(u),h=n(0),f=n.n(h),d=n(3),p=function(){function i(t,e,n,r){c()(this,i),f()(this,"id",void 0),f()(this,"collection",void 0),f()(this,"store",void 0),f()(this,"data",void 0),f()(this,"full",void 0),this.collection=e,this.store=t,this.id=n,this.data=r}var t,e,n,r;return l()(i,[{key:"ref",value:function(){return"SO:".concat(this.collection,":").concat(this.id)}},{key:"get",value:(r=a()(s.a.mark(function t(){var e;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.store.get(this.collection,this.id);case 2:return e=t.sent,this.data=e.data,this.full=e,t.abrupt("return",e);case 6:case"end":return t.stop()}},t,this)})),function(){return r.apply(this,arguments)})},{key:"add",value:(n=a()(s.a.mark(function t(){var e;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.store.add(this.collection,this.id,this.data);case 2:return e=t.sent,this.data=e.data,this.full=e,t.abrupt("return",e);case 6:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"update",value:(e=a()(s.a.mark(function t(){var e;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.store.update(this.collection,this.id,this.data);case 2:return e=t.sent,this.data=e.data,this.full=e,t.abrupt("return",e);case 6:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"delete",value:(t=a()(s.a.mark(function t(){var e;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.store.delete(this.collection,this.id);case 2:return e=t.sent,this.data=null,this.full=null,t.abrupt("return",e);case 6:case"end":return t.stop()}},t,this)})),function(){return t.apply(this,arguments)})}]),i}(),v=function(){function n(t,e){c()(this,n),f()(this,"client",void 0),f()(this,"token",void 0),f()(this,"buildURL",function(t,e){var n="collections/".concat(t,"/");return void 0===e?n:"".concat(n).concat(e,"/")}),this.client=t,this.token=e}var r,i,o;return l()(n,[{key:"entry",value:function(t,e,n){return new p(this,t,e,n)}},{key:"get",value:(o=a()(s.a.mark(function t(e,n){var r,i;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.get({url:this.buildURL(e,n),token:this.token});case 2:return r=t.sent,(i=this.entry(r.collection,r.id,r.data)).full=r,t.abrupt("return",i);case 6:case"end":return t.stop()}},t,this)})),function(t,e){return o.apply(this,arguments)})},{key:"add",value:(i=a()(s.a.mark(function t(e,n,r){var i,o;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.post({url:this.buildURL(e),body:{id:null===n?void 0:n,data:r},token:this.token});case 2:return i=t.sent,(o=this.entry(i.collection,i.id,i.data)).full=i,t.abrupt("return",o);case 6:case"end":return t.stop()}},t,this)})),function(t,e,n){return i.apply(this,arguments)})},{key:"update",value:(r=a()(s.a.mark(function t(e,n,r){var i,o;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.client.put({url:this.buildURL(e,n),body:{data:r},token:this.token});case 2:return i=t.sent,(o=this.entry(i.collection,i.id,i.data)).full=i,t.abrupt("return",o);case 6:case"end":return t.stop()}},t,this)})),function(t,e,n){return r.apply(this,arguments)})},{key:"delete",value:function(t,e){return this.client.delete({url:this.buildURL(t,e),token:this.token})}},{key:"upsert",value:function(t,e){if(!this.client.usingApiSecret)throw new d.c("This method can only be used server-side using your API Secret");return Array.isArray(e)||(e=[e]),this.client.post({url:"collections/",serviceName:"api",body:{data:f()({},t,e)},token:this.client.getCollectionsToken()})}},{key:"select",value:function(e,t){if(!this.client.usingApiSecret)throw new d.c("This method can only be used server-side using your API Secret");return Array.isArray(t)||(t=[t]),this.client.get({url:"collections/",serviceName:"api",qs:{foreign_ids:t.map(function(t){return"".concat(e,":").concat(t)}).join(",")},token:this.client.getCollectionsToken()})}},{key:"deleteMany",value:function(t,e){if(!this.client.usingApiSecret)throw new d.c("This method can only be used server-side using your API Secret");Array.isArray(e)||(e=[e]);var n={collection_name:t,ids:e.map(function(t){return t.toString()}).join(",")};return this.client.delete({url:"collections/",serviceName:"api",qs:n,token:this.client.getCollectionsToken()})}}]),n}()},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(2),i=n.n(r),o=n(4),s=n.n(o),a=n(0),c=n.n(a),u=function(){function n(t,e){i()(this,n),c()(this,"client",void 0),c()(this,"token",void 0),this.client=t,this.token=e}return s()(n,[{key:"upload",value:function(t,e,n,r){return this.client.upload("files/",t,e,n,r)}},{key:"delete",value:function(t){return this.client.delete({url:"files/",qs:{url:t},token:this.token})}}]),n}()},function(t,e,n){"use strict";n.d(e,"a",function(){return h});var r=n(65),i=n.n(r),o=n(2),s=n.n(o),a=n(4),c=n.n(a),u=n(0),l=n.n(u),h=function(){function n(t,e){s()(this,n),l()(this,"client",void 0),l()(this,"token",void 0),this.client=t,this.token=e}return c()(n,[{key:"upload",value:function(t,e,n,r){return this.client.upload("images/",t,e,n,r)}},{key:"delete",value:function(t){return this.client.delete({url:"images/",qs:{url:t},token:this.token})}},{key:"process",value:function(t,e){var n=i()(e,{url:t});return Array.isArray(n.crop)&&(n.crop=n.crop.join(",")),this.client.get({url:"images/",qs:n,token:this.token})}},{key:"thumbnail",value:function(t,e,n,r){var i=3<arguments.length&&void 0!==r?r:{crop:"center",resize:"clip"},o=i.crop,s=i.resize;return this.process(t,{w:e,h:n,crop:o,resize:s})}}]),n}()},function(t,e,n){"use strict";n.d(e,"a",function(){return f});var r=n(16),c=n.n(r),i=n(2),o=n.n(i),s=n(4),a=n.n(s),u=n(0),l=n.n(u),h=n(3),f=function(){function n(t,e){o()(this,n),l()(this,"client",void 0),l()(this,"token",void 0),l()(this,"buildURL",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return"".concat(["reaction"].concat(e).join("/"),"/")}),l()(this,"_convertTargetFeeds",function(){return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).map(function(t){return"string"==typeof t?t:t.id})}),this.client=t,this.token=e}return a()(n,[{key:"add",value:function(t,e,n,r){var i=3<arguments.length&&void 0!==r?r:{},o=i.id,s=i.targetFeeds,a=void 0===s?[]:s,c=i.userId,u=i.targetFeedsExtraData,l={id:o,activity_id:e instanceof Object?e.id:e,kind:t,data:n||{},target_feeds:this._convertTargetFeeds(a),user_id:c};return null!=u&&(l.target_feeds_extra_data=u),this.client.post({url:this.buildURL(),body:l,token:this.token})}},{key:"addChild",value:function(t,e,n,r){var i=3<arguments.length&&void 0!==r?r:{},o=i.targetFeeds,s=void 0===o?[]:o,a=i.userId,c=i.targetFeedsExtraData,u={parent:e instanceof Object?e.id:e,kind:t,data:n||{},target_feeds:this._convertTargetFeeds(s),user_id:a};return null!=c&&(u.target_feeds_extra_data=c),this.client.post({url:this.buildURL(),body:u,token:this.token})}},{key:"get",value:function(t){return this.client.get({url:this.buildURL(t),token:this.token})}},{key:"filter",value:function(t){var e=t.user_id,n=t.activity_id,r=t.reaction_id,i=c()(t,["user_id","activity_id","reaction_id"]);if(i.limit||(i.limit=10),(e?1:0)+(n?1:0)+(r?1:0)!=1)throw new h.c("Must provide exactly one value for one of these params: user_id, activity_id, reaction_id");var o=(e?"user_id":n&&"activity_id")||r&&"reaction_id",s=e||n||r,a=t.kind?this.buildURL(o,s,t.kind):this.buildURL(o,s);return this.client.get({url:a,qs:i,token:this.token})}},{key:"update",value:function(t,e,n){var r=2<arguments.length&&void 0!==n?n:{},i=r.targetFeeds,o=void 0===i?[]:i,s=r.targetFeedsExtraData,a={data:e,target_feeds:this._convertTargetFeeds(o)};return null!=s&&(a.target_feeds_extra_data=s),this.client.put({url:this.buildURL(t),body:a,token:this.token})}},{key:"delete",value:function(t){return this.client.delete({url:this.buildURL(t),token:this.token})}}]),n}()},function(t,e,n){"use strict";n.d(e,"a",function(){return p});var r=n(2),o=n.n(r),i=n(4),s=n.n(i),a=n(0),c=n.n(a),u=n(12),l=n(3),h=n(6);function f(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)),r}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){c()(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var p=function(){function i(t,e,n,r){if(o()(this,i),c()(this,"client",void 0),c()(this,"token",void 0),c()(this,"id",void 0),c()(this,"slug",void 0),c()(this,"userId",void 0),c()(this,"feedUrl",void 0),c()(this,"feedTogether",void 0),c()(this,"notificationChannel",void 0),!e||!n)throw new l.a('Please provide a feed slug and user id, ie client.feed("user", "1")');if(-1!==e.indexOf(":"))throw new l.a('Please initialize the feed using client.feed("user", "1") not client.feed("user:1")');if(h.a.validateFeedSlug(e),h.a.validateUserId(n),!r)throw new l.a("Missing token, in client side mode please provide a feed secret");this.client=t,this.slug=e,this.userId=n,this.id="".concat(this.slug,":").concat(this.userId),this.token=r,this.feedUrl=this.id.replace(":","/"),this.feedTogether=this.id.replace(":",""),this.notificationChannel="site-".concat(this.client.appId,"-feed-").concat(this.feedTogether)}return s()(i,[{key:"addActivity",value:function(t){return!(t=h.a.replaceStreamObjects(t)).actor&&this.client.currentUser&&(t.actor=this.client.currentUser.ref()),this.client.post({url:"feed/".concat(this.feedUrl,"/"),body:t,token:this.token})}},{key:"removeActivity",value:function(t){return this.client.delete({url:"feed/".concat(this.feedUrl,"/").concat(t.foreignId||t,"/"),qs:t.foreignId?{foreign_id:"1"}:{},token:this.token})}},{key:"addActivities",value:function(t){return this.client.post({url:"feed/".concat(this.feedUrl,"/"),body:{activities:h.a.replaceStreamObjects(t)},token:this.token})}},{key:"follow",value:function(t,e,n){var r=2<arguments.length&&void 0!==n?n:{};e instanceof u.a&&(e=e.id),h.a.validateFeedSlug(t),h.a.validateUserId(e);var i={target:"".concat(t,":").concat(e)};return"number"==typeof r.limit&&(i.activity_copy_limit=r.limit),this.client.post({url:"feed/".concat(this.feedUrl,"/following/"),body:i,token:this.token})}},{key:"unfollow",value:function(t,e,n){var r=2<arguments.length&&void 0!==n?n:{},i={};"boolean"==typeof r.keepHistory&&r.keepHistory&&(i.keep_history="1"),h.a.validateFeedSlug(t),h.a.validateUserId(e);var o="".concat(t,":").concat(e);return this.client.delete({url:"feed/".concat(this.feedUrl,"/following/").concat(o,"/"),qs:i,token:this.token})}},{key:"following",value:function(t){var e=0<arguments.length&&void 0!==t?t:{},n={};return e.filter&&(n.filter=e.filter.join(",")),this.client.get({url:"feed/".concat(this.feedUrl,"/following/"),qs:d(d({},e),n),token:this.token})}},{key:"followers",value:function(t){var e=0<arguments.length&&void 0!==t?t:{},n={};return e.filter&&(n.filter=e.filter.join(",")),this.client.get({url:"feed/".concat(this.feedUrl,"/followers/"),qs:d(d({},e),n),token:this.token})}},{key:"followStats",value:function(t){var e=0<arguments.length&&void 0!==t?t:{},n={followers:this.id,following:this.id};return e.followerSlugs&&e.followerSlugs.length&&(n.followers_slugs=e.followerSlugs.join(",")),e.followingSlugs&&e.followingSlugs.length&&(n.following_slugs=e.followingSlugs.join(",")),this.client.get({url:"stats/follow/",qs:n,token:this.client.getOrCreateToken()})}},{key:"get",value:function(t){var e=0<arguments.length&&void 0!==t?t:{},n={};e.mark_read&&e.mark_read.join&&(n.mark_read=e.mark_read.join(",")),e.mark_seen&&e.mark_seen.join&&(n.mark_seen=e.mark_seen.join(",")),this.client.replaceReactionOptions(e);var r=this.client.shouldUseEnrichEndpoint(e)?"enrich/feed/":"feed/";return this.client.get({url:"".concat(r).concat(this.feedUrl,"/"),qs:d(d({},e),n),token:this.token})}},{key:"getActivityDetail",value:function(t,e){return this.get(d({id_lte:t,id_gte:t,limit:1},e||{}))}},{key:"getFayeClient",value:function(){return this.client.getFayeClient()}},{key:"subscribe",value:function(t){if(!this.client.appId)throw new l.c("Missing app id, which is needed to subscribe, use var client = stream.connect(key, secret, appId);");var e=this.getFayeClient().subscribe("/".concat(this.notificationChannel),t);return this.client.subscriptions["/".concat(this.notificationChannel)]={token:this.token,userId:this.notificationChannel,fayeSubscription:e},e}},{key:"unsubscribe",value:function(){var t=this.client.subscriptions["/".concat(this.notificationChannel)];t&&(delete this.client.subscriptions["/".concat(this.notificationChannel)],t.fayeSubscription.cancel())}},{key:"updateActivityToTargets",value:function(t,e,n,r,i){if(!t)throw new Error("Missing `foreign_id` parameter!");if(!e)throw new Error("Missing `time` parameter!");if(!n&&!r&&!i)throw new Error('Requires you to provide at least one parameter for `newTargets`, `addedTargets`, or `removedTargets` - example: `updateActivityToTargets("foreignID:1234", new Date(), [newTargets...], [addedTargets...], [removedTargets...])`');if(n&&(r||i))throw new Error("Can't include add_targets or removedTargets if you're also including newTargets");r&&i&&r.forEach(function(t){if(i.includes(t))throw new Error("Can't have the same feed ID in addedTargets and removedTargets.")});var o={foreign_id:t,time:e};return n&&(o.new_targets=n),r&&(o.added_targets=r),i&&(o.removed_targets=i),this.client.post({url:"feed_targets/".concat(this.feedUrl,"/activity_to_targets/"),token:this.token,body:o})}}]),i}()},function(t,e,n){var r=n(69),i=n(70),o=n(71),s=n(73);t.exports=function(t,e){return r(t)||i(t,e)||o(t,e)||s()}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},n(t)}e.exports=n},function(t,e,n){"use strict";t.exports={commonElement:function(t,e){for(var n=0,r=t.length;n<r;n++)if(-1!==this.indexOf(e,t[n]))return t[n];return null},indexOf:function(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},map:function(t,e,n){if(t.map)return t.map(e,n);var r=[];if(t instanceof Array)for(var i=0,o=t.length;i<o;i++)r.push(e.call(n||null,t[i],i));else for(var s in t)t.hasOwnProperty(s)&&r.push(e.call(n||null,s,t[s]));return r},filter:function(t,e,n){if(t.filter)return t.filter(e,n);for(var r=[],i=0,o=t.length;i<o;i++)e.call(n||null,t[i],i)&&r.push(t[i]);return r},asyncEach:function(t,e,n,r){function i(){if(!c){for(c=!0;0<a;)!function(){if(--a,(s+=1)===o)return n&&n.call(r);e(t[s],u)}();c=!1}}var o=t.length,s=-1,a=0,c=!1,u=function(){a+=1,i()};u()}}},function(n,t,e){"use strict";(function(t){var e={_registry:[],on:function(t,e,n,r){function i(){n.call(r)}t.addEventListener?t.addEventListener(e,i,!1):t.attachEvent("on"+e,i),this._registry.push({_element:t,_type:e,_callback:n,_context:r,_handler:i})},detach:function(t,e,n,r){for(var i,o=this._registry.length;o--;)i=this._registry[o],t&&t!==i._element||e&&e!==i._type||n&&n!==i._callback||r&&r!==i._context||(i._element.removeEventListener?i._element.removeEventListener(i._type,i._handler,!1):i._element.detachEvent("on"+i._type,i._handler),this._registry.splice(o,1),i=null)}};void 0!==t.onunload&&e.on(t,"unload",e.detach,e),n.exports={Event:e}}).call(this,e(11))},function(t,e,n){"use strict";var r={countListeners:function(t){return this.listeners(t).length},bind:function(t,e,n){function r(){e.apply(n,i.call(arguments))}var i=Array.prototype.slice;return this._listeners=this._listeners||[],this._listeners.push([t,e,n,r]),this.on(t,r)},unbind:function(t,e,n){this._listeners=this._listeners||[];for(var r,i=this._listeners.length;i--;)(r=this._listeners[i])[0]===t&&(e&&(r[1]!==e||r[2]!==n)||(this._listeners.splice(i,1),this.removeListener(t,r[3])))}};n(7)(r,n(95).prototype),r.trigger=r.emit,t.exports=r},function(t,e,n){"use strict";var i=function(t){var e,n,r;if(t instanceof Array){for(e=[],n=t.length;n--;)e[n]=i(t[n]);return e}if("object"!=typeof t)return t;for(r in e=null===t?null:{},t)e[r]=i(t[r]);return e};t.exports=i},function(n,t){function r(t,e){return n.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(t,e)}n.exports=r},function(e,t){function n(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=n=function(t){return typeof t}:e.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}e.exports=n},function(t,e){},function(t,e){},function(t,e,n){"use strict";(function(a){n.d(e,"a",function(){return t});var c=n(24);function t(t,e,n,r){var i,o,s;return void 0!==a&&null!==(i=a.env)&&void 0!==i&&i.STREAM_URL&&!t&&(t=(o=/https:\/\/(\w+):(\w+)@([\w-]*).*\?app_id=(\d+)/.exec(a.env.STREAM_URL)||[])[1],e=o[2],n=o[4],void 0===r&&(r={}),"getstream"!==(s=o[3])&&"stream-io-api"!==s&&(r.location=s)),new c.a(t,e,n,r)}}).call(this,n(22))},function(t,e,n){"use strict";t.exports=function(n,r){return function(){for(var t=new Array(arguments.length),e=0;e<t.length;e++)t[e]=arguments[e];return n.apply(r,t)}}},function(t,e,n){"use strict";var s=n(9);function a(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var r,i,o=n?n(e):s.isURLSearchParams(e)?e.toString():(r=[],s.forEach(e,function(t,e){null!=t&&(s.isArray(t)?e+="[]":t=[t],s.forEach(t,function(t){s.isDate(t)?t=t.toISOString():s.isObject(t)&&(t=JSON.stringify(t)),r.push(a(e)+"="+a(t))}))}),r.join("&"));return o&&(-1!==(i=t.indexOf("#"))&&(t=t.slice(0,i)),t+=(-1===t.indexOf("?")?"?":"&")+o),t}},function(t,e,n){"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},function(a,t,c){"use strict";(function(t){var n=c(9),r=c(81),e={"Content-Type":"application/x-www-form-urlencoded"};function i(t,e){!n.isUndefined(t)&&n.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var o,s={adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(o=c(46)),o),transformRequest:[function(t,e){return r(e,"Accept"),r(e,"Content-Type"),n.isFormData(t)||n.isArrayBuffer(t)||n.isBuffer(t)||n.isStream(t)||n.isFile(t)||n.isBlob(t)?t:n.isArrayBufferView(t)?t.buffer:n.isURLSearchParams(t)?(i(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):n.isObject(t)?(i(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return 200<=t&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],function(t){s.headers[t]={}}),n.forEach(["post","put","patch"],function(t){s.headers[t]=n.merge(e)}),a.exports=s}).call(this,c(22))},function(t,e,n){"use strict";var l=n(9),h=n(82),f=n(84),d=n(43),p=n(85),v=n(88),y=n(89),g=n(47);t.exports=function(u){return new Promise(function(n,r){var i=u.data,o=u.headers;l.isFormData(i)&&delete o["Content-Type"],(l.isBlob(i)||l.isFile(i))&&i.type&&delete o["Content-Type"];var t,e,s=new XMLHttpRequest;u.auth&&(t=u.auth.username||"",e=unescape(encodeURIComponent(u.auth.password))||"",o.Authorization="Basic "+btoa(t+":"+e));var a,c=p(u.baseURL,u.url);if(s.open(u.method.toUpperCase(),d(c,u.params,u.paramsSerializer),!0),s.timeout=u.timeout,s.onreadystatechange=function(){var t,e;s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))&&(t="getAllResponseHeaders"in s?v(s.getAllResponseHeaders()):null,e={data:u.responseType&&"text"!==u.responseType?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:t,config:u,request:s},h(n,r,e),s=null)},s.onabort=function(){s&&(r(g("Request aborted",u,"ECONNABORTED",s)),s=null)},s.onerror=function(){r(g("Network Error",u,null,s)),s=null},s.ontimeout=function(){var t="timeout of "+u.timeout+"ms exceeded";u.timeoutErrorMessage&&(t=u.timeoutErrorMessage),r(g(t,u,"ECONNABORTED",s)),s=null},!l.isStandardBrowserEnv()||(a=(u.withCredentials||y(c))&&u.xsrfCookieName?f.read(u.xsrfCookieName):void 0)&&(o[u.xsrfHeaderName]=a),"setRequestHeader"in s&&l.forEach(o,function(t,e){void 0===i&&"content-type"===e.toLowerCase()?delete o[e]:s.setRequestHeader(e,t)}),l.isUndefined(u.withCredentials)||(s.withCredentials=!!u.withCredentials),u.responseType)try{s.responseType=u.responseType}catch(t){if("json"!==u.responseType)throw t}"function"==typeof u.onDownloadProgress&&s.addEventListener("progress",u.onDownloadProgress),"function"==typeof u.onUploadProgress&&s.upload&&s.upload.addEventListener("progress",u.onUploadProgress),u.cancelToken&&u.cancelToken.promise.then(function(t){s&&(s.abort(),r(t),s=null)}),i=i||null,s.send(i)})}},function(t,e,n){"use strict";var s=n(83);t.exports=function(t,e,n,r,i){var o=new Error(t);return s(o,e,n,r,i)}},function(t,e,n){"use strict";var h=n(9);t.exports=function(e,n){n=n||{};var r={},t=["url","method","data"],i=["headers","auth","proxy","params"],o=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function a(t,e){return h.isPlainObject(t)&&h.isPlainObject(e)?h.merge(t,e):h.isPlainObject(e)?h.merge({},e):h.isArray(e)?e.slice():e}function c(t){h.isUndefined(n[t])?h.isUndefined(e[t])||(r[t]=a(void 0,e[t])):r[t]=a(e[t],n[t])}h.forEach(t,function(t){h.isUndefined(n[t])||(r[t]=a(void 0,n[t]))}),h.forEach(i,c),h.forEach(o,function(t){h.isUndefined(n[t])?h.isUndefined(e[t])||(r[t]=a(void 0,e[t])):r[t]=a(void 0,n[t])}),h.forEach(s,function(t){t in n?r[t]=a(e[t],n[t]):t in e&&(r[t]=a(void 0,e[t]))});var u=t.concat(i).concat(o).concat(s),l=Object.keys(e).concat(Object.keys(n)).filter(function(t){return-1===u.indexOf(t)});return h.forEach(l,c),r}},function(t,e,n){"use strict";function r(t){this.message=t}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,t.exports=r},function(t,e){t.exports={VERSION:"1.4.0",BAYEUX_VERSION:"1.0",ID_LENGTH:160,JSONP_CALLBACK:"jsonpcallback",CONNECTION_TYPES:["long-polling","cross-origin-long-polling","callback-polling","websocket","eventsource","in-process"],MANDATORY_CONNECTION_TYPES:["long-polling","callback-polling","in-process"]}},function(t,e,n){"use strict";var r=n(93),i=[],o=[],s=r.makeRequestCallFromTimer(function(){if(o.length)throw o.shift()});function a(t){var e=i.length?i.pop():new c;e.task=t,r(e)}function c(){this.task=null}t.exports=a,c.prototype.call=function(){try{this.task.call()}catch(t){a.onerror?a.onerror(t):(o.push(t),s())}finally{this.task=null,i[i.length]=this}}},function(t,e,n){"use strict";var r=n(10),i=n(7),o=n(35),s=n(53),a=r({initialize:function(t){this.id=this.name=t},push:function(t){this.trigger("message",t)},isUnused:function(){return 0===this.countListeners("message")}});i(a.prototype,o),i(a,{HANDSHAKE:"/meta/handshake",CONNECT:"/meta/connect",SUBSCRIBE:"/meta/subscribe",UNSUBSCRIBE:"/meta/unsubscribe",DISCONNECT:"/meta/disconnect",META:"meta",SERVICE:"service",expand:function(t){var e=this.parse(t),n=["/**",t],r=e.slice();r[r.length-1]="*",n.push(this.unparse(r));for(var i=1,o=e.length;i<o;i++)(r=e.slice(0,i)).push("**"),n.push(this.unparse(r));return n},isValid:function(t){return s.CHANNEL_NAME.test(t)||s.CHANNEL_PATTERN.test(t)},parse:function(t){return this.isValid(t)?t.split("/").slice(1):null},unparse:function(t){return"/"+t.join("/")},isMeta:function(t){var e=this.parse(t);return e?e[0]===this.META:null},isService:function(t){var e=this.parse(t);return e?e[0]===this.SERVICE:null},isSubscribable:function(t){return this.isValid(t)?!this.isMeta(t)&&!this.isService(t):null},Set:r({initialize:function(){this._channels={}},getKeys:function(){var t=[];for(var e in this._channels)t.push(e);return t},remove:function(t){delete this._channels[t]},hasSubscription:function(t){return this._channels.hasOwnProperty(t)},subscribe:function(t,e){for(var n=0,r=t.length;n<r;n++){var i=t[n];(this._channels[i]=this._channels[i]||new a(i)).bind("message",e)}},unsubscribe:function(t,e){var n=this._channels[t];return!!n&&(n.unbind("message",e),!!n.isUnused()&&(this.remove(t),!0))},distributeMessage:function(t){for(var e=a.expand(t.channel),n=0,r=e.length;n<r;n++){var i=this._channels[e[n]];i&&i.trigger("message",t)}}})}),t.exports=a},function(t,e,n){"use strict";t.exports={CHANNEL_NAME:/^\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*$/,CHANNEL_PATTERN:/^(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*\/\*{1,2}$/,ERROR:/^([0-9][0-9][0-9]:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*(,(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)*:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*|[0-9][0-9][0-9]::(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)$/,VERSION:/^([0-9])+(\.(([a-z]|[A-Z])|[0-9])(((([a-z]|[A-Z])|[0-9])|\-|\_))*)*$/}},function(t,e,n){"use strict";t.exports={}},function(t,e,n){"use strict";var r=n(10);t.exports=r({initialize:function(){this._index={}},add:function(t){var e=void 0!==t.id?t.id:t;return!this._index.hasOwnProperty(e)&&(this._index[e]=t,!0)},forEach:function(t,e){for(var n in this._index)this._index.hasOwnProperty(n)&&t.call(e,this._index[n])},isEmpty:function(){for(var t in this._index)if(this._index.hasOwnProperty(t))return!1;return!0},member:function(t){for(var e in this._index)if(this._index[e]===t)return!0;return!1},remove:function(t){var e=void 0!==t.id?t.id:t,n=this._index[e];return delete this._index[e],n},toArray:function(){var e=[];return this.forEach(function(t){e.push(t)}),e}})},function(i,t,s){"use strict";(function(c){var t=s(10),o=s(14),u=s(34),e=s(7),n=s(20),r=e(t(s(15),{encode:function(t){return n(t)},request:function(i){var o,t=this.endpoint.href,s=this;if(c.XMLHttpRequest)o=new XMLHttpRequest;else{if(!c.ActiveXObject)return this._handleError(i);o=new ActiveXObject("Microsoft.XMLHTTP")}o.open("POST",t,!0),o.setRequestHeader("Content-Type","application/json"),o.setRequestHeader("Pragma","no-cache"),o.setRequestHeader("X-Requested-With","XMLHttpRequest");var e=this._dispatcher.headers;for(var n in e)e.hasOwnProperty(n)&&o.setRequestHeader(n,e[n]);function a(){o.abort()}return void 0!==c.onbeforeunload&&u.Event.on(c,"beforeunload",a),o.onreadystatechange=function(){if(o&&4===o.readyState){var t=null,e=o.status,n=o.responseText,r=200<=e&&e<300||304===e||1223===e;if(void 0!==c.onbeforeunload&&u.Event.detach(c,"beforeunload",a),o.onreadystatechange=function(){},o=null,!r)return s._handleError(i);try{t=JSON.parse(n)}catch(t){}t?s._receive(t):s._handleError(i)}},o.send(this.encode(i)),o}}),{isUsable:function(t,e,n,r){var i="ReactNative"===navigator.product||o.isSameOrigin(e);n.call(r,i)}});i.exports=r}).call(this,s(11))},function(t,e,n){"use strict";function r(t,e){this.message=t,this.options=e,this.attempts=0}n(7)(r.prototype,{getTimeout:function(){return this.options.timeout},getInterval:function(){return this.options.interval},isDeliverable:function(){var t=this.options.attempts,e=this.attempts,n=this.options.deadline,r=(new Date).getTime();return!(void 0!==t&&t<=e)&&!(void 0!==n&&n<r)},send:function(){this.attempts+=1},succeed:function(){},fail:function(){},abort:function(){}}),t.exports=r},function(t,e,n){t.exports=n(76)},function(t,e,n){"use strict";var r=n(50),i=n(19),o={VERSION:r.VERSION,Client:n(92),Scheduler:n(57)};i.wrapper=o,t.exports=o},function(t,e){},function(t,e){},function(t,e,n){"use strict";var r=n(108);function i(t){this.message=t}(i.prototype=new Error).name="InvalidTokenError",t.exports=function(t,e){if("string"!=typeof t)throw new i("Invalid token specified");var n=!0===(e=e||{}).header?0:1;try{return JSON.parse(r(t.split(".")[n]))}catch(t){throw new i("Invalid token specified: "+t.message)}},t.exports.InvalidTokenError=i},function(t,e,n){var r=n(38),i=n(17);t.exports=function(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?i(t):e}},function(e,t,n){var r=n(32),i=n(37),o=n(110),s=n(111);function a(t){var n="function"==typeof Map?new Map:void 0;return e.exports=a=function(t){if(null===t||!o(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return s(t,arguments,r(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),i(e,t)},a(t)}e.exports=a},function(t,e){function n(){return t.exports=n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},n.apply(this,arguments)}t.exports=n},function(t,e){t.exports="object"==typeof self?self.FormData:window.FormData},function(t,e,n){t.exports=n(68)},function(t,e,n){"use strict";n.r(e);var r=n(41);n.d(e,"connect",function(){return r.a});var i=n(24);n.d(e,"StreamClient",function(){return i.a});var o=n(26);n.d(e,"CollectionEntry",function(){return o.a}),n.d(e,"Collections",function(){return o.b});var s=n(30);n.d(e,"StreamFeed",function(){return s.a});var a=n(27);n.d(e,"StreamFileStore",function(){return a.a});var c=n(28);n.d(e,"StreamImageStore",function(){return c.a});var u=n(25);n.d(e,"Personalization",function(){return u.a});var l=n(29);n.d(e,"StreamReaction",function(){return l.a});var h=n(12);n.d(e,"StreamUser",function(){return h.a});var f=n(13);for(var d in f)["default","connect","StreamClient","CollectionEntry","Collections","StreamFeed","StreamFileStore","StreamImageStore","Personalization","StreamReaction","StreamUser"].indexOf(d)<0&&function(t){n.d(e,t,function(){return f[t]})}(d);var p=n(3);n.d(e,"FeedError",function(){return p.a}),n.d(e,"SiteError",function(){return p.c}),n.d(e,"MissingSchemaError",function(){return p.b}),n.d(e,"StreamApiError",function(){return p.d});var v=n(8);n.d(e,"JWTScopeToken",function(){return v.a}),n.d(e,"JWTUserSessionToken",function(){return v.b})},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}}},function(t,e,n){var r=n(72);t.exports=function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e){t.exports=function(t,e){if(null==t)return{};for(var n,r={},i=Object.keys(t),o=0;o<i.length;o++)n=i[o],0<=e.indexOf(n)||(r[n]=t[n]);return r}},function(t,e,n){var r=function(s){"use strict";var h,t=Object.prototype,l=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},i=e.iterator||"@@iterator",n=e.asyncIterator||"@@asyncIterator",r=e.toStringTag||"@@toStringTag";function o(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,n){return t[e]=n}}function a(t,e,n,r){var o,s,a,c,i=e&&e.prototype instanceof m?e:m,u=Object.create(i.prototype),l=new S(r||[]);return u._invoke=(o=t,s=n,a=l,c=d,function(t,e){if(c===v)throw new Error("Generator is already running");if(c===y){if("throw"===t)throw e;return j()}for(a.method=t,a.arg=e;;){var n=a.delegate;if(n){var r=function t(e,n){var r=e.iterator[n.method];if(r===h){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=h,t(e,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var i=f(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var o=i.arg;if(!o)return n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g;{if(!o.done)return o;n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=h)}n.delegate=null;return g}(n,a);if(r){if(r===g)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(c===d)throw c=y,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);c=v;var i=f(o,s,a);if("normal"===i.type){if(c=a.done?y:p,i.arg===g)continue;return{value:i.arg,done:a.done}}"throw"===i.type&&(c=y,a.method="throw",a.arg=i.arg)}}),u}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}s.wrap=a;var d="suspendedStart",p="suspendedYield",v="executing",y="completed",g={};function m(){}function c(){}function u(){}var b={};b[i]=function(){return this};var _=Object.getPrototypeOf,w=_&&_(_(C([])));w&&w!==t&&l.call(w,i)&&(b=w);var k=u.prototype=m.prototype=Object.create(b);function x(t){["next","throw","return"].forEach(function(e){o(t,e,function(t){return this._invoke(e,t)})})}function E(c,u){var e;this._invoke=function(n,r){function t(){return new u(function(t,e){!function e(t,n,r,i){var o=f(c[t],c,n);if("throw"!==o.type){var s=o.arg,a=s.value;return a&&"object"==typeof a&&l.call(a,"__await")?u.resolve(a.__await).then(function(t){e("next",t,r,i)},function(t){e("throw",t,r,i)}):u.resolve(a).then(function(t){s.value=t,r(s)},function(t){return e("throw",t,r,i)})}i(o.arg)}(n,r,t,e)})}return e=e?e.then(t,t):t()}}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function C(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(l.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=h,t.done=!0,t};return r.next=r}}return{next:j}}function j(){return{value:h,done:!0}}return((c.prototype=k.constructor=u).constructor=c).displayName=o(u,r,"GeneratorFunction"),s.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===c||"GeneratorFunction"===(e.displayName||e.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,o(t,r,"GeneratorFunction")),t.prototype=Object.create(k),t},s.awrap=function(t){return{__await:t}},x(E.prototype),E.prototype[n]=function(){return this},s.AsyncIterator=E,s.async=function(t,e,n,r,i){void 0===i&&(i=Promise);var o=new E(a(t,e,n,r),i);return s.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},x(k),o(k,r,"Generator"),k[i]=function(){return this},k.toString=function(){return"[object Generator]"},s.keys=function(n){var r=[];for(var t in n)r.push(t);return r.reverse(),function t(){for(;r.length;){var e=r.pop();if(e in n)return t.value=e,t.done=!1,t}return t.done=!0,t}},s.values=C,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=h,this.done=!1,this.delegate=null,this.method="next",this.arg=h,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=h)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var r=this;function t(t,e){return o.type="throw",o.arg=n,r.next=t,e&&(r.method="next",r.arg=h),!!e}for(var e=this.tryEntries.length-1;0<=e;--e){var i=this.tryEntries[e],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var s=l.call(i,"catchLoc"),a=l.call(i,"finallyLoc");if(s&&a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!a)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&l.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),T(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r,i=n.completion;return"throw"===i.type&&(r=i.arg,T(n)),r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:C(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=h),g}},s}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},function(t,e,n){"use strict";var r=n(9),i=n(42),o=n(77),s=n(48);function a(t){var e=new o(t),n=i(o.prototype.request,e);return r.extend(n,o.prototype,e),r.extend(n,e),n}var c=a(n(45));c.Axios=o,c.create=function(t){return a(s(c.defaults,t))},c.Cancel=n(49),c.CancelToken=n(90),c.isCancel=n(44),c.all=function(t){return Promise.all(t)},c.spread=n(91),t.exports=c,t.exports.default=c},function(t,e,n){"use strict";var r=n(9),i=n(43),o=n(78),s=n(79),a=n(48);function c(t){this.defaults=t,this.interceptors={request:new o,response:new o}}c.prototype.request=function(t,e){"string"==typeof t?(t=e||{}).url=arguments[0]:t=t||{},(t=a(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=[s,void 0],r=Promise.resolve(t);for(this.interceptors.request.forEach(function(t){n.unshift(t.fulfilled,t.rejected)}),this.interceptors.response.forEach(function(t){n.push(t.fulfilled,t.rejected)});n.length;)r=r.then(n.shift(),n.shift());return r},c.prototype.getUri=function(t){return t=a(this.defaults,t),i(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],function(n){c.prototype[n]=function(t,e){return this.request(a(e||{},{method:n,url:t}))}}),r.forEach(["post","put","patch"],function(r){c.prototype[r]=function(t,e,n){return this.request(a(n||{},{method:r,url:t,data:e}))}}),t.exports=c},function(t,e,n){"use strict";var r=n(9);function i(){this.handlers=[]}i.prototype.use=function(t,e){return this.handlers.push({fulfilled:t,rejected:e}),this.handlers.length-1},i.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,function(t){null!==t&&e(t)})},t.exports=i},function(t,e,n){"use strict";var r=n(9),i=n(80),o=n(44),s=n(45);function a(t){t.cancelToken&&t.cancelToken.throwIfRequested()}t.exports=function(e){return a(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return a(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return o(t)||(a(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(t,e,n){"use strict";var r=n(9);t.exports=function(e,n,t){return r.forEach(t,function(t){e=t(e,n)}),e}},function(t,e,n){"use strict";var i=n(9);t.exports=function(n,r){i.forEach(n,function(t,e){e!==r&&e.toUpperCase()===r.toUpperCase()&&(n[r]=t,delete n[e])})}},function(t,e,n){"use strict";var i=n(47);t.exports=function(t,e,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?e(i("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},function(t,e,n){"use strict";t.exports=function(t,e,n,r,i){return t.config=e,n&&(t.code=n),t.request=r,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t}},function(t,e,n){"use strict";var a=n(9);t.exports=a.isStandardBrowserEnv()?{write:function(t,e,n,r,i,o){var s=[];s.push(t+"="+encodeURIComponent(e)),a.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),a.isString(r)&&s.push("path="+r),a.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(t,e,n){"use strict";var r=n(86),i=n(87);t.exports=function(t,e){return t&&!r(e)?i(t,e):e}},function(t,e,n){"use strict";t.exports=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)}},function(t,e,n){"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},function(t,e,n){"use strict";var o=n(9),s=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];t.exports=function(t){var e,n,r,i={};return t&&o.forEach(t.split("\n"),function(t){if(r=t.indexOf(":"),e=o.trim(t.substr(0,r)).toLowerCase(),n=o.trim(t.substr(r+1)),e){if(i[e]&&0<=s.indexOf(e))return;i[e]="set-cookie"===e?(i[e]?i[e]:[]).concat([n]):i[e]?i[e]+", "+n:n}}),i}},function(t,e,n){"use strict";var r,i,o,s=n(9);function a(t){var e=t;return i&&(o.setAttribute("href",e),e=o.href),o.setAttribute("href",e),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}t.exports=s.isStandardBrowserEnv()?(i=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a"),r=a(window.location.href),function(t){var e=s.isString(t)?a(t):t;return e.protocol===r.protocol&&e.host===r.host}):function(){return!0}},function(t,e,n){"use strict";var r=n(49);function i(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(t){e=t});var n=this;t(function(t){n.reason||(n.reason=new r(t),e(n.reason))})}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.source=function(){var e;return{token:new i(function(t){e=t}),cancel:e}},t.exports=i},function(t,e,n){"use strict";t.exports=function(e){return function(t){return e.apply(null,t)}}},function(m,t,b){"use strict";(function(i){var o=b(51),t=b(10),s=(b(23),b(33)),n=b(34),a=b(50),e=b(7),c=b(94),r=b(21),u=b(19),l=b(35),h=b(52),f=b(96),d=b(104),p=b(105),v=b(106),y=b(107),g=t({className:"Client",UNCONNECTED:1,CONNECTING:2,CONNECTED:3,DISCONNECTED:4,HANDSHAKE:"handshake",RETRY:"retry",NONE:"none",CONNECTION_TIMEOUT:60,DEFAULT_ENDPOINT:"/bayeux",INTERVAL:0,initialize:function(t,e){this.info("New client created for ?",t),c(e=e||{},["interval","timeout","endpoints","proxy","retry","scheduler","websocketExtensions","tls","ca"]),this._channels=new h.Set,this._dispatcher=f.create(this,t||this.DEFAULT_ENDPOINT,e),this._messageId=0,this._state=this.UNCONNECTED,this._responseCallbacks={},this._advice={reconnect:this.RETRY,interval:1e3*(e.interval||this.INTERVAL),timeout:1e3*(e.timeout||this.CONNECTION_TIMEOUT)},this._dispatcher.timeout=this._advice.timeout/1e3,this._dispatcher.bind("message",this._receiveMessage,this),n.Event&&void 0!==i.onbeforeunload&&n.Event.on(i,"beforeunload",function(){s.indexOf(this._dispatcher._disabled,"autodisconnect")<0&&this.disconnect()},this)},addWebsocketExtension:function(t){return this._dispatcher.addWebsocketExtension(t)},disable:function(t){return this._dispatcher.disable(t)},setHeader:function(t,e){return this._dispatcher.setHeader(t,e)},handshake:function(e,n){var r;this._advice.reconnect!==this.NONE&&this._state===this.UNCONNECTED&&(this._state=this.CONNECTING,(r=this).info("Initiating handshake with ?",this._dispatcher.endpoint.href),this._dispatcher.selectTransport(a.MANDATORY_CONNECTION_TYPES),this._sendMessage({channel:h.HANDSHAKE,version:a.BAYEUX_VERSION,supportedConnectionTypes:this._dispatcher.getConnectionTypes()},{},function(t){t.successful?(this._state=this.CONNECTED,this._dispatcher.clientId=t.clientId,this._dispatcher.selectTransport(t.supportedConnectionTypes),this.info("Handshake successful: ?",this._dispatcher.clientId),this.subscribe(this._channels.getKeys(),!0),e&&o(function(){e.call(n)})):(this.info("Handshake unsuccessful"),i.setTimeout(function(){r.handshake(e,n)},1e3*this._dispatcher.retry),this._state=this.UNCONNECTED)},this))},connect:function(t,e){if(this._advice.reconnect!==this.NONE&&this._state!==this.DISCONNECTED){if(this._state===this.UNCONNECTED)return this.handshake(function(){this.connect(t,e)},this);this.callback(t,e),this._state===this.CONNECTED&&(this.info("Calling deferred actions for ?",this._dispatcher.clientId),this.setDeferredStatus("succeeded"),this.setDeferredStatus("unknown"),this._connectRequest||(this._connectRequest=!0,this.info("Initiating connection for ?",this._dispatcher.clientId),this._sendMessage({channel:h.CONNECT,clientId:this._dispatcher.clientId,connectionType:this._dispatcher.connectionType},{},this._cycleConnection,this)))}},disconnect:function(){if(this._state===this.CONNECTED){this._state=this.DISCONNECTED,this.info("Disconnecting ?",this._dispatcher.clientId);var e=new v;return this._sendMessage({channel:h.DISCONNECT,clientId:this._dispatcher.clientId},{},function(t){t.successful?(this._dispatcher.close(),e.setDeferredStatus("succeeded")):e.setDeferredStatus("failed",d.parse(t.error))},this),this.info("Clearing channel listeners for ?",this._dispatcher.clientId),this._channels=new h.Set,e}},subscribe:function(n,e,r){if(n instanceof Array)return s.map(n,function(t){return this.subscribe(t,e,r)},this);var i=new y(this,n,e,r),t=!0===e;return this._channels.hasSubscription(n)&&!t?(this._channels.subscribe([n],i),i.setDeferredStatus("succeeded")):this.connect(function(){this.info("Client ? attempting to subscribe to ?",this._dispatcher.clientId,n),t||this._channels.subscribe([n],i),this._sendMessage({channel:h.SUBSCRIBE,clientId:this._dispatcher.clientId,subscription:n},{},function(t){if(!t.successful)return i.setDeferredStatus("failed",d.parse(t.error)),this._channels.unsubscribe(n,i);var e=[].concat(t.subscription);this.info("Subscription acknowledged for ? to ?",this._dispatcher.clientId,e),i.setDeferredStatus("succeeded")},this)},this),i},unsubscribe:function(t,e){if(t instanceof Array)return s.map(t,function(t){return this.unsubscribe(t,e)},this);this._channels.unsubscribe(t,e)&&this.connect(function(){this.info("Client ? attempting to unsubscribe from ?",this._dispatcher.clientId,t),this._sendMessage({channel:h.UNSUBSCRIBE,clientId:this._dispatcher.clientId,subscription:t},{},function(t){var e;t.successful&&(e=[].concat(t.subscription),this.info("Unsubscription acknowledged for ? from ?",this._dispatcher.clientId,e))},this)},this)},publish:function(t,e,n){c(n||{},["attempts","deadline"]);var r=new v;return this.connect(function(){this.info("Client ? queueing published message to ?: ?",this._dispatcher.clientId,t,e),this._sendMessage({channel:t,data:e,clientId:this._dispatcher.clientId},n,function(t){t.successful?r.setDeferredStatus("succeeded"):r.setDeferredStatus("failed",d.parse(t.error))},this)},this),r},_sendMessage:function(t,e,n,r){t.id=this._generateMessageId();var i=this._advice.timeout?1.2*this._advice.timeout/1e3:1.2*this._dispatcher.retry;this.pipeThroughExtensions("outgoing",t,null,function(t){t&&(n&&(this._responseCallbacks[t.id]=[n,r]),this._dispatcher.sendMessage(t,i,e||{}))},this)},_generateMessageId:function(){return this._messageId+=1,this._messageId>=Math.pow(2,32)&&(this._messageId=0),this._messageId.toString(36)},_receiveMessage:function(t){var e,n=t.id;void 0!==t.successful&&(e=this._responseCallbacks[n],delete this._responseCallbacks[n]),this.pipeThroughExtensions("incoming",t,null,function(t){t&&(t.advice&&this._handleAdvice(t.advice),this._deliverMessage(t),e&&e[0].call(e[1],t))},this)},_handleAdvice:function(t){e(this._advice,t),this._dispatcher.timeout=this._advice.timeout/1e3,this._advice.reconnect===this.HANDSHAKE&&this._state!==this.DISCONNECTED&&(this._state=this.UNCONNECTED,this._dispatcher.clientId=null,this._cycleConnection())},_deliverMessage:function(t){t.channel&&void 0!==t.data&&(this.info("Client ? calling listeners for ? with ?",this._dispatcher.clientId,t.channel,t.data),this._channels.distributeMessage(t))},_cycleConnection:function(){this._connectRequest&&(this._connectRequest=null,this.info("Closed connection for ?",this._dispatcher.clientId));var t=this;i.setTimeout(function(){t.connect()},this._advice.interval)}});e(g.prototype,r),e(g.prototype,l),e(g.prototype,u),e(g.prototype,p),m.exports=g}).call(this,b(11))},function(f,t,e){"use strict";(function(t){function e(t){r.length||(n(),0),r[r.length]=t}f.exports=e;var n,r=[],i=0;function o(){for(;i<r.length;){var t=i;if(i+=1,r[t].call(),1024<i){for(var e=0,n=r.length-i;e<n;e++)r[e]=r[e+i];r.length-=i,i=0}}r.length=0,i=0,0}var s,a,c,u=void 0!==t?t:self,l=u.MutationObserver||u.WebKitMutationObserver;function h(r){return function(){var t=setTimeout(n,0),e=setInterval(n,50);function n(){clearTimeout(t),clearInterval(e),r()}}}n="function"==typeof l?(s=1,a=new l(o),c=document.createTextNode(""),a.observe(c,{characterData:!0}),function(){s=-s,c.data=s}):h(o),e.requestFlush=n,e.makeRequestCallFromTimer=h}).call(this,e(11))},function(t,e,n){"use strict";var r=n(33);t.exports=function(t,e){for(var n in t)if(r.indexOf(e,n)<0)throw new Error("Unrecognized option: "+n)}},function(t,e){var s="function"==typeof Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};function n(){}(t.exports=n).prototype.emit=function(t){if("error"===t&&(!this._events||!this._events.error||s(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var e=this._events[t];if(!e)return!1;if("function"==typeof e){switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:var n=Array.prototype.slice.call(arguments,1);e.apply(this,n)}return!0}if(s(e)){for(var n=Array.prototype.slice.call(arguments,1),r=e.slice(),i=0,o=r.length;i<o;i++)r[i].apply(this,n);return!0}return!1},n.prototype.on=n.prototype.addListener=function(t,e){if("function"!=typeof e)throw new Error("addListener only takes instances of Function");return this._events||(this._events={}),this.emit("newListener",t,e),this._events[t]?s(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,this},n.prototype.once=function(e,n){var r=this;return r.on(e,function t(){r.removeListener(e,t),n.apply(this,arguments)}),this},n.prototype.removeListener=function(t,e){if("function"!=typeof e)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[t])return this;var n=this._events[t];if(s(n)){var r=function(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(e===t[n])return n;return-1}(n,e);if(r<0)return this;n.splice(r,1),0==n.length&&delete this._events[t]}else this._events[t]===e&&delete this._events[t];return this},n.prototype.removeAllListeners=function(t){return 0===arguments.length?this._events={}:t&&this._events&&this._events[t]&&(this._events[t]=null),this},n.prototype.listeners=function(t){return this._events||(this._events={}),this._events[t]||(this._events[t]=[]),s(this._events[t])||(this._events[t]=[this._events[t]]),this._events[t]}},function(l,t,h){"use strict";(function(s){var t=h(10),a=h(14),c=h(54),e=h(7),n=h(19),r=h(35),i=h(97),u=h(57),o=t({className:"Dispatcher",MAX_REQUEST_SIZE:2048,DEFAULT_RETRY:5,UP:1,DOWN:2,initialize:function(t,e,n){this._client=t,this.endpoint=a.parse(e),this._alternates=n.endpoints||{},this.cookies=c.CookieJar&&new c.CookieJar,this._disabled=[],this._envelopes={},this.headers={},this.retry=n.retry||this.DEFAULT_RETRY,this._scheduler=n.scheduler||u,this._state=0,this.transports={},this.wsExtensions=[],this.proxy=n.proxy||{},"string"==typeof this._proxy&&(this._proxy={origin:this._proxy});var r=n.websocketExtensions;if(r)for(var i=0,o=(r=[].concat(r)).length;i<o;i++)this.addWebsocketExtension(r[i]);for(var s in this.tls=n.tls||{},this.tls.ca=this.tls.ca||n.ca,this._alternates)this._alternates[s]=a.parse(this._alternates[s]);this.maxRequestSize=this.MAX_REQUEST_SIZE},endpointFor:function(t){return this._alternates[t]||this.endpoint},addWebsocketExtension:function(t){this.wsExtensions.push(t)},disable:function(t){this._disabled.push(t),i.disable(t)},setHeader:function(t,e){this.headers[t]=e},close:function(){var t=this._transport;delete this._transport,t&&t.close()},getConnectionTypes:function(){return i.getConnectionTypes()},selectTransport:function(t){i.get(this,t,this._disabled,function(t){this.debug("Selected ? transport for ?",t.connectionType,t.endpoint.href),t!==this._transport&&(this._transport&&this._transport.close(),this._transport=t,this.connectionType=t.connectionType)},this)},sendMessage:function(t,e,n){n=n||{};var r,i=t.id,o=n.attempts,s=n.deadline&&(new Date).getTime()+1e3*n.deadline,a=this._envelopes[i];a||(r=new this._scheduler(t,{timeout:e,interval:this.retry,attempts:o,deadline:s}),a=this._envelopes[i]={message:t,scheduler:r}),this._sendEnvelope(a)},_sendEnvelope:function(t){if(this._transport&&!t.request&&!t.timer){var e=t.message,n=t.scheduler,r=this;if(!n.isDeliverable())return n.abort(),void delete this._envelopes[e.id];t.timer=s.setTimeout(function(){r.handleError(e)},1e3*n.getTimeout()),n.send(),t.request=this._transport.sendMessage(e)}},handleResponse:function(t){var e=this._envelopes[t.id];void 0!==t.successful&&e&&(e.scheduler.succeed(),delete this._envelopes[t.id],s.clearTimeout(e.timer)),this.trigger("message",t),this._state!==this.UP&&(this._state=this.UP,this._client.trigger("transport:up"))},handleError:function(t,e){var n,r=this._envelopes[t.id],i=r&&r.request,o=this;i&&(i.then(function(t){t&&t.abort&&t.abort()}),(n=r.scheduler).fail(),s.clearTimeout(r.timer),r.request=r.timer=null,e?this._sendEnvelope(r):r.timer=s.setTimeout(function(){r.timer=null,o._sendEnvelope(r)},1e3*n.getInterval()),this._state!==this.DOWN&&(this._state=this.DOWN,this._client.trigger("transport:down")))}});o.create=function(t,e,n){return new o(t,e,n)},e(o.prototype,r),e(o.prototype,n),l.exports=o}).call(this,h(11))},function(t,e,n){"use strict";var r=n(15);r.register("websocket",n(99)),r.register("eventsource",n(101)),r.register("long-polling",n(56)),r.register("cross-origin-long-polling",n(102)),r.register("callback-polling",n(103)),t.exports=r},function(t,e,n){"use strict";(function(o){t.exports={addTimeout:function(t,e,n,r){var i;this._timeouts=this._timeouts||{},this._timeouts.hasOwnProperty(t)||((i=this)._timeouts[t]=o.setTimeout(function(){delete i._timeouts[t],n.call(r)},1e3*e))},removeTimeout:function(t){this._timeouts=this._timeouts||{};var e=this._timeouts[t];e&&(o.clearTimeout(e),delete this._timeouts[t])},removeAllTimeouts:function(){for(var t in this._timeouts=this._timeouts||{},this._timeouts)this.removeTimeout(t)}}}).call(this,n(11))},function(f,t,d){"use strict";(function(t){var e=d(10),o=d(23),s=d(55),n=d(14),r=d(34),i=d(36),a=d(7),c=d(20),u=d(100),l=d(21),h=a(e(d(15),{UNCONNECTED:1,CONNECTING:2,CONNECTED:3,batching:!1,isUsable:function(t,e){this.callback(function(){t.call(e,!0)}),this.errback(function(){t.call(e,!1)}),this.connect()},request:function(n){this._pending=this._pending||new s;for(var t=0,e=n.length;t<e;t++)this._pending.add(n[t]);var r=this,i=new o(function(e,t){r.callback(function(t){t&&1===t.readyState&&(t.send(c(n)),e(t))}),r.connect()});return{abort:function(){i.then(function(t){t.close()})}}},connect:function(){if(!h._unloaded&&(this._state=this._state||this.UNCONNECTED,this._state===this.UNCONNECTED)){this._state=this.CONNECTING;var n=this._createSocket();if(!n)return this.setDeferredStatus("failed");var i=this,r=!(n.onopen=function(){n.headers&&i._storeCookies(n.headers["set-cookie"]),i._socket=n,i._state=i.CONNECTED,i._everConnected=!0,i.setDeferredStatus("succeeded",n)});n.onclose=n.onerror=function(){var t,e;r||(r=!0,t=i._state===i.CONNECTED,n.onopen=n.onclose=n.onerror=n.onmessage=null,delete i._socket,i._state=i.UNCONNECTED,e=i._pending?i._pending.toArray():[],delete i._pending,t||i._everConnected?(i.setDeferredStatus("unknown"),i._handleError(e,t)):i.setDeferredStatus("failed"))},n.onmessage=function(t){var e;try{e=JSON.parse(t.data)}catch(t){}if(e){for(var n=0,r=(e=[].concat(e)).length;n<r;n++)void 0!==e[n].successful&&i._pending.remove(e[n]);i._receive(e)}}}},close:function(){this._socket&&this._socket.close()},_createSocket:function(){var t=h.getSocketUrl(this.endpoint),e=this._dispatcher.headers,n=this._dispatcher.wsExtensions,r=this._getCookies(),i=this._dispatcher.tls,o={extensions:n,headers:e,proxy:this._proxy,tls:i};""!==r&&(o.headers.Cookie=r);try{return u.create(t,[],o)}catch(t){}}}),{PROTOCOLS:{"http:":"ws:","https:":"wss:"},create:function(t,e){var n=t.transports.websocket=t.transports.websocket||{};return n[e.href]=n[e.href]||new this(t,e),n[e.href]},getSocketUrl:function(t){return(t=i(t)).protocol=this.PROTOCOLS[t.protocol],n.stringify(t)},isUsable:function(t,e,n,r){this.create(t,e).isUsable(n,r)}});a(h.prototype,l),r.Event&&void 0!==t.onbeforeunload&&r.Event.on(t,"beforeunload",function(){void 0===h._unloaded&&(h._unloaded=!0)}),f.exports=h}).call(this,d(11))},function(e,t,n){"use strict";(function(t){var r=t.MozWebSocket||t.WebSocket;e.exports={create:function(t,e,n){return"function"!=typeof r?null:new r(t)}}}).call(this,n(11))},function(u,t,l){"use strict";(function(i){var t=l(10),o=l(14),s=l(36),e=l(7),n=l(21),a=l(15),c=l(56),r=e(t(a,{initialize:function(t,e){if(a.prototype.initialize.call(this,t,e),!i.EventSource)return this.setDeferredStatus("failed");this._xhr=new c(t,e),(e=s(e)).pathname+="/"+t.clientId;var n=new i.EventSource(o.stringify(e)),r=this;n.onopen=function(){r._everConnected=!0,r.setDeferredStatus("succeeded")},n.onerror=function(){r._everConnected?r._handleError([]):(r.setDeferredStatus("failed"),n.close())},n.onmessage=function(t){var e;try{e=JSON.parse(t.data)}catch(t){}e?r._receive(e):r._handleError([])},this._socket=n},close:function(){this._socket&&(this._socket.onopen=this._socket.onerror=this._socket.onmessage=null,this._socket.close(),delete this._socket)},isUsable:function(t,e){this.callback(function(){t.call(e,!0)}),this.errback(function(){t.call(e,!1)})},encode:function(t){return this._xhr.encode(t)},request:function(t){return this._xhr.request(t)}}),{isUsable:function(e,n,r,i){if(!e.clientId)return r.call(i,!1);c.isUsable(e,n,function(t){return t?void this.create(e,n).isUsable(r,i):r.call(i,!1)},this)},create:function(t,e){var n=t.transports.eventsource=t.transports.eventsource||{},r=t.clientId,i=s(e);return i.pathname+="/"+(r||""),n[i=o.stringify(i)]=n[i]||new this(t,e),n[i]}});e(r.prototype,n),u.exports=r}).call(this,l(11))},function(i,t,s){"use strict";(function(c){var t=s(10),e=s(55),o=s(14),n=s(7),r=s(20),u=n(t(s(15),{encode:function(t){return"message="+encodeURIComponent(r(t))},request:function(e){var t,n=c.XDomainRequest?XDomainRequest:XMLHttpRequest,r=new n,i=++u._id,o=this._dispatcher.headers,s=this;if(r.open("POST",this.endpoint.href,!0),r.withCredentials=!0,r.setRequestHeader)for(t in r.setRequestHeader("Pragma","no-cache"),o)o.hasOwnProperty(t)&&r.setRequestHeader(t,o[t]);function a(){r&&(u._pending.remove(i),r.onload=r.onerror=r.ontimeout=r.onprogress=null,r=null)}return r.onload=function(){var t;try{t=JSON.parse(r.responseText)}catch(t){}a(),t?s._receive(t):s._handleError(e)},r.onerror=r.ontimeout=function(){a(),s._handleError(e)},r.onprogress=function(){},n===c.XDomainRequest&&u._pending.add({id:i,xhr:r}),r.send(this.encode(e)),r}}),{_id:0,_pending:new e,isUsable:function(t,e,n,r){if(o.isSameOrigin(e))return n.call(r,!1);if(c.XDomainRequest)return n.call(r,e.protocol===location.protocol);if(c.XMLHttpRequest){var i=new XMLHttpRequest;return n.call(r,void 0!==i.withCredentials)}return n.call(r,!1)}});i.exports=u}).call(this,s(11))},function(n,t,r){"use strict";(function(a){var t=r(10),c=r(14),u=r(36),e=r(7),l=r(20),h=e(t(r(15),{encode:function(t){var e=u(this.endpoint);return e.query.message=l(t),e.query.jsonp="__jsonp"+h._cbCount+"__",c.stringify(e)},request:function(t){var e=document.getElementsByTagName("head")[0],n=document.createElement("script"),r=h.getCallbackName(),i=u(this.endpoint),o=this;i.query.message=l(t),i.query.jsonp=r;function s(){if(!a[r])return!1;a[r]=void 0;try{delete a[r]}catch(t){}n.parentNode.removeChild(n)}return a[r]=function(t){s(),o._receive(t)},n.type="text/javascript",n.src=c.stringify(i),e.appendChild(n),n.onerror=function(){s(),o._handleError(t)},{abort:s}}}),{_cbCount:0,getCallbackName:function(){return this._cbCount+=1,"__jsonp"+this._cbCount+"__"},isUsable:function(t,e,n,r){n.call(r,!0)}});n.exports=h}).call(this,r(11))},function(t,e,n){"use strict";var r=n(10),i=n(53),o=r({initialize:function(t,e,n){this.code=t,this.params=Array.prototype.slice.call(e),this.message=n},toString:function(){return this.code+":"+this.params.join(",")+":"+this.message}});o.parse=function(t){if(t=t||"",!i.ERROR.test(t))return new o(null,[],t);var e=t.split(":"),n=parseInt(e[0]),r=e[1].split(","),t=e[2];return new o(n,r,t)};var s={versionMismatch:[300,"Version mismatch"],conntypeMismatch:[301,"Connection types not supported"],extMismatch:[302,"Extension mismatch"],badRequest:[400,"Bad request"],clientUnknown:[401,"Unknown client"],parameterMissing:[402,"Missing required parameter"],channelForbidden:[403,"Forbidden channel"],channelUnknown:[404,"Unknown channel"],channelInvalid:[405,"Invalid channel"],extUnknown:[406,"Unknown extension"],publishFailed:[407,"Failed to publish"],serverError:[500,"Internal server error"]};for(var a in s)!function(t){o[t]=function(){return new o(s[t][0],arguments,s[t][1]).toString()}}(a);t.exports=o},function(t,e,n){"use strict";var r={addExtension:function(t){this._extensions=this._extensions||[],this._extensions.push(t),t.added&&t.added(this)},removeExtension:function(t){if(this._extensions)for(var e=this._extensions.length;e--;)this._extensions[e]===t&&(this._extensions.splice(e,1),t.removed&&t.removed(this))},pipeThroughExtensions:function(r,t,i,o,s){if(this.debug("Passing through ? extensions: ?",r,t),!this._extensions)return o.call(s,t);var a=this._extensions.slice(),c=function(t){if(!t)return o.call(s,t);var e=a.shift();if(!e)return o.call(s,t);var n=e[r];if(!n)return c(t);3<=n.length?e[r](t,i,c):e[r](t,c)};c(t)}};n(7)(r,n(19)),t.exports=r},function(t,e,n){"use strict";var r=n(10),i=n(21);t.exports=r(i)},function(t,e,n){"use strict";var r=n(10),i=n(7),o=n(21),s=r({initialize:function(t,e,n,r){this._client=t,this._channels=e,this._callback=n,this._context=r,this._cancelled=!1},withChannel:function(t,e){return this._withChannel=[t,e],this},apply:function(t,e){var n=e[0];this._callback&&this._callback.call(this._context,n.data),this._withChannel&&this._withChannel[0].call(this._withChannel[1],n.channel,n.data)},cancel:function(){this._cancelled||(this._client.unsubscribe(this._channels,this),this._cancelled=!0)},unsubscribe:function(){this.cancel()}});i(s.prototype,o),t.exports=s},function(t,e,n){var r=n(109);t.exports=function(t){var e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw"Illegal base64url string!"}try{return decodeURIComponent(r(e).replace(/(.)/g,function(t,e){var n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}catch(t){return r(e)}}},function(t,e){function a(t){this.message=t}(a.prototype=new Error).name="InvalidCharacterError",t.exports="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(t){var e=String(t).replace(/=+$/,"");if(e.length%4==1)throw new a("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,o=0,s="";r=e.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)&&(s+=String.fromCharCode(255&n>>(-2*i&6))))r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return s}},function(t,e){t.exports=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")}},function(r,t,e){var o=e(37),i=e(112);function s(t,e,n){return i()?r.exports=s=Reflect.construct:r.exports=s=function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&o(i,n.prototype),i},s.apply(null,arguments)}r.exports=s},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}},function(t){t.exports=JSON.parse('{"author":{"name":"Thierry Schellenbach","company":"Stream.io Inc"},"name":"getstream","description":"The official low-level GetStream.io client for Node.js and the browser.","main":"./lib/index.js","module":"./lib/index.js","types":"./lib/index.d.ts","homepage":"https://getstream.io/docs/?language=js","email":"support@getstream.io","license":"BSD-3-Clause","version":"7.0.1","scripts":{"transpile":"babel src --out-dir lib --extensions \'.ts\'","types":"tsc --emitDeclarationOnly","build":"rm -rf lib && yarn run transpile && yarn run types","dist":"webpack && webpack --minify","eslint":"eslint \'**/*.{js,ts}\' --max-warnings 0","prettier":"prettier --list-different \'**/*.{js,ts}\'","lint":"yarn run prettier && yarn run eslint","lint-fix":"prettier --write \'**/*.{js,ts}\' && eslint --fix \'**/*.{js,ts}\'","test":"yarn run test-unit-node","test-types":"tsc --esModuleInterop true --noEmit true test/typescript/*.ts","test-unit-node":"mocha --require ./babel-register.js test/unit/common test/unit/node","test-integration-node":"mocha --require ./babel-register.js test/integration/common test/integration/node --exit","test-cloud":"mocha --require ./babel-register.js test/integration/cloud --timeout 40000","test-cloud-local":"LOCAL=true mocha --require ./babel-register.js test/integration/cloud --timeout 40000 --ignore \'test/integration/cloud/{personalized_feed,files,images}.js\'","test-browser":"karma start karma.config.js","coverage":"nyc yarn run test-unit-node && nyc report --reporter=text-lcov | codecov --pipe","prepare":"yarn run build","preversion":"yarn run test-unit-node","version":"yarn run dist && yarn run build && git add dist","postversion":"git push && git push --tags && npm publish"},"husky":{"hooks":{"pre-commit":"dotgit/hooks/pre-commit-format.sh && dotgit/hooks/pre-commit-reject-binaries.py"}},"browser":{"crypto":false,"jsonwebtoken":false,"./lib/batch_operations.js":false,"qs":false,"url":false,"http":false,"https":false},"react-native":{"crypto":false,"jsonwebtoken":false,"./lib/batch_operations.js":false,"qs":false,"url":false},"devDependencies":{"@babel/cli":"^7.11.5","@babel/core":"^7.11.5","@babel/node":"^7.10.5","@babel/plugin-proposal-class-properties":"^7.10.4","@babel/plugin-proposal-object-rest-spread":"^7.11.0","@babel/plugin-transform-object-assign":"^7.10.4","@babel/plugin-transform-runtime":"^7.11.5","@babel/preset-env":"^7.11.5","@babel/preset-typescript":"^7.10.4","@babel/register":"^7.11.5","@typescript-eslint/eslint-plugin":"^4.0.1","@typescript-eslint/parser":"^4.0.1","babel-eslint":"^10.1.0","babel-loader":"^8.1.0","chai":"^4.2.0","codecov":"^3.7.2","dotenv":"^8.2.0","eslint":"^7.8.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.11.0","eslint-plugin-chai-friendly":"^0.6.0","eslint-plugin-import":"^2.22.0","eslint-plugin-prettier":"^3.1.4","eslint-plugin-sonarjs":"^0.5.0","eslint-plugin-typescript-sort-keys":"^1.3.0","expect.js":"^0.3.1","husky":"^4.2.5","json-loader":"~0.5.7","karma":"^5.2.1","karma-chrome-launcher":"^3.1.0","karma-mocha":"^2.0.1","karma-mocha-reporter":"~2.2.5","karma-sauce-launcher":"^4.1.5","karma-sourcemap-loader":"~0.3.8","karma-webpack":"^4.0.2","mocha":"^8.1.3","null-loader":"^4.0.0","nyc":"^15.1.0","prettier":"^2.1.1","request":"^2.88.2","testdouble":"^3.16.1","typescript":"^4.0.2","uglifyjs-webpack-plugin":"^2.2.0","webpack":"^4.44.1","webpack-cli":"^3.3.12"},"dependencies":{"@babel/runtime":"^7.11.2","@types/jsonwebtoken":"^8.5.0","@types/jwt-decode":"^2.2.1","@types/qs":"^6.9.4","axios":"^0.20.0","faye":"^1.4.0","form-data":"^3.0.0","jsonwebtoken":"^8.5.1","jwt-decode":"^2.2.0","qs":"^6.9.4"},"peerDependencies":{"@types/node":">=10"},"repository":{"type":"git","url":"git://github.com/GetStream/stream-js.git"},"files":["src","dist","types","lib"],"engines":{"node":"10 || 12 || >=14"}}')}],i.c=r,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="dist/",i(i.s=67);function i(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var n,r});