@mannegobot/nego-chat-sdk
Version:
JS SDK for the Negobot
7 lines • 311 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Negobot=t():e.Negobot=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=284)}([function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(159),s=(r=i)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,s.default)(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}()},function(e,t){var n=e.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},function(e,t,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,s=i&&"function"==typeof i.apply?i.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var u=10;function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,s,a,o;if("function"!=typeof n)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof n);if(void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),a=s[t]),void 0===a)a=s[t]=n,++e._eventsCount;else if("function"==typeof a?a=s[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=c(e))>0&&a.length>i&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,o=u,console&&console.warn&&console.warn(o)}return e}function d(){for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);this.fired||(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,s(this.listener,this.target,e))}function h(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=d.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var o=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw o.context=a,o}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)s(u,this,t);else{var c=u.length,l=m(u,c);for(n=0;n<c;++n)s(l[n],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.on(e,h(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);return this.prependListener(e,h(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,s,a;if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t);if(void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){a=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){var r=n(6),i=n(2),s=n(19),a=n(20),o=n(27),u=function(e,t,n){var c,l,d,h=e&u.F,f=e&u.G,p=e&u.S,m=e&u.P,y=e&u.B,g=e&u.W,v=f?i:i[t]||(i[t]={}),b=v.prototype,w=f?r:p?r[t]:(r[t]||{}).prototype;for(c in f&&(n=t),n)(l=!h&&w&&void 0!==w[c])&&o(v,c)||(d=l?w[c]:n[c],v[c]=f&&"function"!=typeof w[c]?n[c]:y&&l?s(d,r):g&&w[c]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?s(Function.call,d):d,m&&((v.virtual||(v.virtual={}))[c]=d,e&u.R&&b&&!b[c]&&a(b,c,d)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t,n){e.exports=n(138)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(10),s=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){return function(){var t=e.apply(this,arguments);return new s.default((function(e,n){return function r(i,a){try{var o=t[i](a),u=o.value}catch(e){return void n(e)}if(!o.done)return s.default.resolve(u).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(u)}("next")}))}}},function(e,t,n){var r=n(64)("wks"),i=n(51),s=n(6).Symbol,a="function"==typeof s;(e.exports=function(e){return r[e]||(r[e]=a&&s[e]||(a?s:i)("Symbol."+e))}).store=r},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports={default:n(145),__esModule:!0}},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1)),s=a(n(103));function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(45);function u(e,t){return[(new Date).toISOString()+" Chat "+e+":"].concat((0,s.default)(t))}var c=function(){function e(t){(0,r.default)(this,e),this.prefix="",this.prefix=null!=t&&t.length>0?t+" ":""}return(0,i.default)(e,[{key:"setLevel",value:function(e){o.setLevel(e)}},{key:"trace",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.trace.apply(null,u(this.prefix+"T",t))}},{key:"debug",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.debug.apply(null,u(this.prefix+"D",t))}},{key:"info",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.info.apply(null,u(this.prefix+"I",t))}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.warn.apply(null,u(this.prefix+"W",t))}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.error.apply(null,u(this.prefix+"E",t))}}],[{key:"scope",value:function(t){return new e(t)}},{key:"setLevel",value:function(e){o.setLevel(e)}},{key:"trace",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.trace.apply(null,u("T",t))}},{key:"debug",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.debug.apply(null,u("D",t))}},{key:"info",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.info.apply(null,u("I",t))}},{key:"warn",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.warn.apply(null,u("W",t))}},{key:"error",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.error.apply(null,u("E",t))}}]),e}();t.Logger=c},function(e,t,n){var r=n(13),i=n(82),s=n(59),a=Object.defineProperty;t.f=n(14)?Object.defineProperty:function(e,t,n){if(r(e),t=s(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(9);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(21)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){e.exports={default:n(156),__esModule:!0}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(97),s=(r=i)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,s.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(101)),i=a(n(102)),s=a(n(97));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,s.default)(t)));e.prototype=(0,i.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){"use strict";var r=a(n(0)),i=a(n(1)),s=a(n(29));function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(181);t.isDeepEqual=function(e,t){return 0===o.createPatch(e,t).length},t.deepClone=function(e){return JSON.parse((0,s.default)(e))},t.parseToNumber=function(e){return void 0===e||isNaN(Number(e))?null:Number(e)},t.parseTime=function(e){try{return new Date(e)}catch(e){return null}},t.parseAttributes=function(e,t,n){var r={};if(e)try{r=JSON.parse(e)}catch(e){n.warn(t)}return r};var u=function(){function e(t){(0,r.default)(this,e),this.base=t.replace(/\/$/,""),this.args=[],this.paths=[]}return(0,i.default)(e,[{key:"arg",value:function(e,t){return void 0!==t&&this.args.push(encodeURIComponent(e)+"="+encodeURIComponent(t)),this}},{key:"path",value:function(e){return this.paths.push(encodeURIComponent(e)),this}},{key:"build",value:function(){var e=this.base;return this.paths.length&&(e+="/"+this.paths.join("/")),this.args.length&&(e+="?"+this.args.join("&")),e}}]),e}();t.UriBuilder=u},function(e,t,n){var r=n(26);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(12),i=n(39);e.exports=n(14)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){e.exports={default:n(188),__esModule:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(213);t.TwilsockClient=r.TwilsockClient,t.Twilsock=r.TwilsockClient;const i=n(32);t.TwilsockError=i.TwilsockError;const s=n(237);t.TransportUnavailableError=s.TransportUnavailableError},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e,t=0,n=0){super(),this.name=this.constructor.name,this.message=`${e} (status: ${t}, code: ${n})`,this.status=t,this.code=n}}t.SyncError=r;t.SyncNetworkError=class extends r{constructor(e,t=0,n=0,r){super(e,t,n),this.body=r}},t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(45);function i(e,t){return[`${(new Date).toISOString()} Sync ${e}:`].concat(Array.from(t))}t.default={setLevel:function(e){r.setLevel(e)},trace:function(...e){r.trace.apply(null,i("T",e))},debug:function(...e){r.debug.apply(null,i("D",e))},info:function(...e){r.info.apply(null,i("I",e))},warn:function(...e){r.warn.apply(null,i("W",e))},error:function(...e){r.error.apply(null,i("E",e))}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";var r=n(146)(!0);n(67)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){e.exports={default:n(180),__esModule:!0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(45);function i(e,t){return[`${(new Date).toISOString()} Twilsock ${e}:`].concat(Array.from(t))}class s{constructor(e){this.prefix="",this.prefix=null!=e&&e.length>0?" "+e+":":""}setLevel(e){r.setLevel(e)}static setLevel(e){r.setLevel(e)}trace(...e){r.debug.apply(null,i("T",e))}debug(...e){r.debug.apply(null,i("D",e))}info(...e){r.info.apply(null,i("I",e))}warn(...e){r.warn.apply(null,i("W",e))}error(...e){r.error.apply(null,i("E",e))}static trace(...e){r.trace.apply(null,i("T",e))}static debug(...e){r.debug.apply(null,i("D",e))}static info(...e){r.info.apply(null,i("I",e))}static warn(...e){r.warn.apply(null,i("W",e))}static error(...e){r.error.apply(null,i("E",e))}}t.Logger=s;let a=new s("");t.log=a},function(e,t,n){var r=n(218),i=n(219),s=i;s.v1=r,s.v4=i,e.exports=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super(e)}}t.TwilsockError=r},function(e,t,n){var r=n(60),i=n(61);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(61);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports={}},function(e,t,n){n(149);for(var r=n(6),i=n(20),s=n(35),a=n(8)("toStringTag"),o="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),u=0;u<o.length;u++){var c=o[u],l=r[c],d=l&&l.prototype;d&&!d[a]&&i(d,a,c),s[c]=s.Array}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(209);t.Retrier=r.Retrier;const i=n(210);t.Backoff=i.Backoff,t.default=r.Retrier},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(31);t.AbstractMessage=class{constructor(e){this.id=e||`TM${r.v4()}`}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=!0},function(e,t,n){var r=n(13),i=n(148),s=n(65),a=n(63)("IE_PROTO"),o=function(){},u=function(){var e,t=n(58)("iframe"),r=s.length;for(t.style.display="none",n(85).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[s[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(o.prototype=r(e),n=new o,o.prototype=null,n[a]=e):n=u(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(12).f,i=n(27),s=n(8)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,s)&&r(e,s,{configurable:!0,value:t})}},function(e,t,n){var r=n(19),i=n(88),s=n(89),a=n(13),o=n(50),u=n(69),c={},l={};(t=e.exports=function(e,t,n,d,h){var f,p,m,y,g=h?function(){return e}:u(e),v=r(n,d,t?2:1),b=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(s(g)){for(f=o(e.length);f>b;b++)if((y=t?v(a(p=e[b])[0],p[1]):v(e[b]))===c||y===l)return y}else for(m=g.call(e);!(p=m.next()).done;)if((y=i(m,v,p.value,t))===c||y===l)return y}).BREAK=c,t.RETURN=l},function(e,t,n){var r,i;!function(s,a){"use strict";void 0===(i="function"==typeof(r=function(){var e=function(){},t="undefined",n=typeof window!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"];function i(e,t){var n=e[t];if("function"==typeof n.bind)return n.bind(e);try{return Function.prototype.bind.call(n,e)}catch(t){return function(){return Function.prototype.apply.apply(n,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(t,n){for(var i=0;i<r.length;i++){var s=r[i];this[s]=i<t?e:this.methodFactory(s,t,n)}this.log=this.debug}function o(e,n,r){return function(){typeof console!==t&&(a.call(this,n,r),this[e].apply(this,arguments))}}function u(r,a,u){return function(r){return"debug"===r&&(r="log"),typeof console!==t&&("trace"===r&&n?s:void 0!==console[r]?i(console,r):void 0!==console.log?i(console,"log"):e)}(r)||o.apply(this,arguments)}function c(e,n,i){var s,o=this,c="loglevel";function l(){var e;if(typeof window!==t){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var n=window.document.cookie,r=n.indexOf(encodeURIComponent(c)+"=");-1!==r&&(e=/^([^;]+)/.exec(n.slice(r))[1])}catch(e){}return void 0===o.levels[e]&&(e=void 0),e}}e&&(c+=":"+e),o.name=e,o.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},o.methodFactory=i||u,o.getLevel=function(){return s},o.setLevel=function(n,i){if("string"==typeof n&&void 0!==o.levels[n.toUpperCase()]&&(n=o.levels[n.toUpperCase()]),!("number"==typeof n&&n>=0&&n<=o.levels.SILENT))throw"log.setLevel() called with invalid level: "+n;if(s=n,!1!==i&&function(e){var n=(r[e]||"silent").toUpperCase();if(typeof window!==t){try{return void(window.localStorage[c]=n)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+n+";"}catch(e){}}}(n),a.call(o,n,e),typeof console===t&&n<o.levels.SILENT)return"No console available for logging"},o.setDefaultLevel=function(e){l()||o.setLevel(e,!1)},o.enableAll=function(e){o.setLevel(o.levels.TRACE,e)},o.disableAll=function(e){o.setLevel(o.levels.SILENT,e)};var d=l();null==d&&(d=null==n?"WARN":n),o.setLevel(d,!1)}var l=new c,d={};l.getLogger=function(e){if("string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=d[e];return t||(t=d[e]=new c(e,l.getLevel(),l.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return l.noConflict=function(){return typeof window!==t&&window.log===l&&(window.log=h),l},l.getLoggers=function(){return d},l})?r.call(t,n,t,e):r)||(e.exports=i)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(24);function i(e){return!isNaN(parseInt(e))&&isFinite(e)}function s(e){return i(e)&&e>=0}t.deepClone=function(e){return JSON.parse(JSON.stringify(e))},t.validateOptionalTtl=function(e){if(!(void 0===e||s(e)))throw new r.default(`Invalid TTL value, expected a positive integer, was '${e}'`,400,54011)},t.validateMandatoryTtl=function(e){if(!s(e))throw new r.default(`Invalid TTL value, expected a positive integer, was '${e}'`,400,54011)},t.validatePageSize=function(e){var t;if(!(void 0===e||i(t=e)&&t>0))throw new r.default(`Invalid pageSize parameter. Expected a positive integer, was '${e}'.`,400,54455)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.services=e,this.removalHandler=t,this.subscriptionState="none",this._attachedListeners=new Map}_advanceLastEventId(e,t){}reportFailure(e){404===e.status?this.onRemoved(!1):this.broadcastEventToListeners("failure",e)}_subscribe(){this.services.router.subscribe(this.sid,this)}_unsubscribe(){this.services.router.unsubscribe(this.sid)}_setSubscriptionState(e){this.subscriptionState=e,this.broadcastEventToListeners("_subscriptionStateChanged",e)}close(){this._unsubscribe(),null!=this.removalHandler&&this.removalHandler(this.type,this.sid,this.uniqueName)}attach(e){const t=e.listenerUuid;this._attachedListeners.get(t)||(this._attachedListeners.size||this._subscribe(),this._attachedListeners.set(t,e))}detach(e){this._attachedListeners.delete(e),this._attachedListeners.size||this.close()}broadcastEventToListeners(e,t){for(let n of this._attachedListeners.values())n.emit(e,t)}}t.SyncEntity=r,t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(3),i=n(31);class s extends r.EventEmitter{constructor(){super(),this.closed=!1,this.uuid=i()}get listenerUuid(){return this.uuid}close(){this.removeAllListeners(),this.closed=!0}ensureNotClosed(){if(this.closed)throw new Error("Invalid operation on closed object")}}t.Closeable=s,t.default=s},function(e,t,n){var r=n(83),i=n(65);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(62),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){},function(e,t,n){var r=n(40),i=n(8)("toStringTag"),s="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:s?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){"use strict";var r=a(n(10)),i=a(n(0)),s=a(n(1));function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(t,n,r,s){(0,i.default)(this,e),this.state={prevToken:r,nextToken:s,source:n,items:t}}return(0,s.default)(e,[{key:"nextPage",value:function(){return this.hasNextPage?this.state.source(this.state.nextToken):r.default.reject(new Error("No next page"))}},{key:"prevPage",value:function(){return this.hasPrevPage?this.state.source(this.state.prevToken):r.default.reject(new Error("No previous page"))}},{key:"hasNextPage",get:function(){return!!this.state.nextToken}},{key:"hasPrevPage",get:function(){return!!this.state.prevToken}},{key:"items",get:function(){return this.state.items}}]),e}();t.RestPaginator=o},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.UriBuilder=class{constructor(e){this.base=e,this.args=new Array,this.paths=new Array}pathSegment(e){return this.paths.push(encodeURIComponent(e)),this}queryParam(e,t){return void 0!==t&&this.args.push(encodeURIComponent(e)+"="+encodeURIComponent(t)),this}build(){let e=this.base;return this.paths.length&&(e+="/"+this.paths.join("/")),this.args.length&&(e+="?"+this.args.join("&")),e}}},function(e,t,n){var r=n(9),i=n(6).document,s=r(i)&&r(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},function(e,t,n){var r=n(9);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(40);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(64)("keys"),i=n(51);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t,n){var r=n(2),i=n(6),s=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return s[e]||(s[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(41)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var r=n(41),i=n(4),s=n(84),a=n(20),o=n(35),u=n(147),c=n(43),l=n(86),d=n(8)("iterator"),h=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,p,m,y,g){u(n,t,p);var v,b,w,_=function(e){if(!h&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",x="values"==m,S=!1,C=e.prototype,T=C[d]||C["@@iterator"]||m&&C[m],E=T||_(m),M=m?x?_("entries"):E:void 0,I="Array"==t&&C.entries||T;if(I&&(w=l(I.call(new e)))!==Object.prototype&&w.next&&(c(w,k,!0),r||"function"==typeof w[d]||a(w,d,f)),x&&T&&"values"!==T.name&&(S=!0,E=function(){return T.call(this)}),r&&!g||!h&&!S&&C[d]||a(C,d,E),o[t]=E,o[k]=f,m)if(v={values:x?E:_("values"),keys:y?E:_("keys"),entries:M},g)for(b in v)b in C||s(C,b,v[b]);else i(i.P+i.F*(h||S),t,v);return v}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(54),i=n(8)("iterator"),s=n(35);e.exports=n(2).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||s[r(e)]}},function(e,t,n){"use strict";var r=n(26);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(20);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e,t,n){t.f=n(8)},function(e,t,n){var r=n(51)("meta"),i=n(9),s=n(27),a=n(12).f,o=0,u=Object.isExtensible||function(){return!0},c=!n(21)((function(){return u(Object.preventExtensions({}))})),l=function(e){a(e,r,{value:{i:"O"+ ++o,w:{}}})},d=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!s(e,r)){if(!u(e))return"F";if(!t)return"E";l(e)}return e[r].i},getWeak:function(e,t){if(!s(e,r)){if(!u(e))return!0;if(!t)return!1;l(e)}return e[r].w},onFreeze:function(e){return c&&d.NEED&&u(e)&&!s(e,r)&&l(e),e}}},function(e,t,n){var r=n(6),i=n(2),s=n(41),a=n(72),o=n(12).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=s?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||o(t,e,{value:a.f(e)})}},function(e,t,n){e.exports={default:n(186),__esModule:!0}},function(e,t,n){var r=n(9);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(217);t.Init=r.Init;const i=n(220);t.InitReply=i.InitReply;const s=n(221);t.Update=s.Update;const a=n(222);t.Message=a.Message;const o=n(223);t.Reply=o.Reply;const u=n(224);t.Close=u.Close},function(e,t,n){(function(e,r){var i;
/*!
* Platform.js <https://mths.be/platform>
* Copyright 2014-2018 Benjamin Tan <https://bnjmnt4n.now.sh/>
* Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
* Available under MIT license <https://mths.be/mit>
*/(function(){"use strict";var s={function:!0,object:!0},a=s[typeof window]&&window||this,o=s[typeof t]&&t,u=s[typeof e]&&e&&!e.nodeType&&e,c=o&&u&&"object"==typeof r&&r;!c||c.global!==c&&c.window!==c&&c.self!==c||(a=c);var l=Math.pow(2,53)-1,d=/\bOpera/,h=Object.prototype,f=h.hasOwnProperty,p=h.toString;function m(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function y(e){return e=_(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:m(e)}function g(e,t){for(var n in e)f.call(e,n)&&t(e[n],n,e)}function v(e){return null==e?m(e):p.call(e).slice(8,-1)}function b(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function w(e,t){var n=null;return function(e,t){var n=-1,r=e?e.length:0;if("number"==typeof r&&r>-1&&r<=l)for(;++n<r;)t(e[n],n,e);else g(e,t)}(e,(function(r,i){n=t(n,r,i,e)})),n}function _(e){return String(e).replace(/^ +| +$/g,"")}var k=function e(t){var n=a,r=t&&"object"==typeof t&&"String"!=v(t);r&&(n=t,t=null);var i=n.navigator||{},s=i.userAgent||"";t||(t=s);var o,u,c,l,h,f=r?!!i.likeChrome:/\bChrome\b/.test(t)&&!/internal|\n/i.test(p.toString()),m=r?"Object":"ScriptBridgingProxyObject",k=r?"Object":"Environment",x=r&&n.java?"JavaPackage":v(n.java),S=r?"Object":"RuntimeObject",C=/\bJava/.test(x)&&n.java,T=C&&v(n.environment)==k,E=C?"a":"α",M=C?"b":"β",I=n.document||{},P=n.operamini||n.opera,O=d.test(O=r&&P?P["[[Class]]"]:v(P))?O:P=null,R=t,N=[],j=null,L=t==s,U=L&&P&&"function"==typeof P.version&&P.version(),D=w([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,n){return e||RegExp("\\b"+(n.pattern||b(n))+"\\b","i").exec(t)&&(n.label||n)})),A=function(e){return w(e,(function(e,n){return e||RegExp("\\b"+(n.pattern||b(n))+"\\b","i").exec(t)&&(n.label||n)}))}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),F=W([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),q=function(e){return w(e,(function(e,n,r){return e||(n[F]||n[/^[a-z]+(?: +[a-z]+\b)*/i.exec(F)]||RegExp("\\b"+b(r)+"(?:\\b|\\w*\\d)","i").exec(t))&&r}))}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),B=function(e){return w(e,(function(e,n){var r=n.pattern||b(n);return!e&&(e=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(t))&&(e=function(e,t,n){var r={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return t&&n&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\d.]+$/.exec(e)])&&(e="Windows "+r),e=String(e),t&&n&&(e=e.replace(RegExp(t,"i"),n)),e=y(e.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}(e,r,n.label||n)),e}))}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function W(e){return w(e,(function(e,n){var r=n.pattern||b(n);return!e&&(e=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(t)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(t)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(t))&&((e=String(n.label&&!RegExp(r,"i").test(n.label)?n.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),n=n.label||n,e=y(e[0].replace(RegExp(r,"i"),n).replace(RegExp("; *(?:"+n+"[_-])?","i")," ").replace(RegExp("("+n+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}if(D&&(D=[D]),q&&!F&&(F=W([q])),(o=/\bGoogle TV\b/.exec(F))&&(F=o[0]),/\bSimulator\b/i.test(t)&&(F=(F?F+" ":"")+"Simulator"),"Opera Mini"==A&&/\bOPiOS\b/.test(t)&&N.push("running in Turbo/Uncompressed mode"),"IE"==A&&/\blike iPhone OS\b/.test(t)?(q=(o=e(t.replace(/like iPhone OS/,""))).manufacturer,F=o.product):/^iP/.test(F)?(A||(A="Safari"),B="iOS"+((o=/ OS ([\d_]+)/i.exec(t))?" "+o[1].replace(/_/g,"."):"")):"Konqueror"!=A||/buntu/i.test(B)?q&&"Google"!=q&&(/Chrome/.test(A)&&!/\bMobile Safari\b/i.test(t)||/\bVita\b/.test(F))||/\bAndroid\b/.test(B)&&/^Chrome/.test(A)&&/\bVersion\//i.test(t)?(A="Android Browser",B=/\bAndroid\b/.test(B)?B:"Android"):"Silk"==A?(/\bMobi/i.test(t)||(B="Android",N.unshift("desktop mode")),/Accelerated *= *true/i.test(t)&&N.unshift("accelerated")):"PaleMoon"==A&&(o=/\bFirefox\/([\d.]+)\b/.exec(t))?N.push("identifying as Firefox "+o[1]):"Firefox"==A&&(o=/\b(Mobile|Tablet|TV)\b/i.exec(t))?(B||(B="Firefox OS"),F||(F=o[1])):!A||(o=!/\bMinefield\b/i.test(t)&&/\b(?:Firefox|Safari)\b/.exec(A))?(A&&!F&&/[\/,]|^[^(]+?\)/.test(t.slice(t.indexOf(o+"/")+8))&&(A=null),(o=F||q||B)&&(F||q||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(B))&&(A=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(B)?B:o)+" Browser")):"Electron"==A&&(o=(/\bChrome\/([\d.]+)\b/.exec(t)||0)[1])&&N.push("Chromium "+o):B="Kubuntu",U||(U=w(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",b(A),"(?:Firefox|Minefield|NetFront)"],(function(e,n){return e||(RegExp(n+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(t)||0)[1]||null}))),(o=("iCab"==D&&parseFloat(U)>3?"WebKit":/\bOpera\b/.test(A)&&(/\bOPR\b/.test(t)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(t)&&!/^(?:Trident|EdgeHTML)$/.test(D)&&"WebKit"||!D&&/\bMSIE\b/i.test(t)&&("Mac OS"==B?"Tasman":"Trident")||"WebKit"==D&&/\bPlayStation\b(?! Vita\b)/i.test(A)&&"NetFront")&&(D=[o]),"IE"==A&&(o=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(t)||0)[1])?(A+=" Mobile",B="Windows Phone "+(/\+$/.test(o)?o:o+".x"),N.unshift("desktop mode")):/\bWPDesktop\b/i.test(t)?(A="IE Mobile",B="Windows Phone 8.x",N.unshift("desktop mode"),U||(U=(/\brv:([\d.]+)/.exec(t)||0)[1])):"IE"!=A&&"Trident"==D&&(o=/\brv:([\d.]+)/.exec(t))&&(A&&N.push("identifying as "+A+(U?" "+U:"")),A="IE",U=o[1]),L){if(l="global",h=null!=(c=n)?typeof c[l]:"number",/^(?:boolean|number|string|undefined)$/.test(h)||"object"==h&&!c[l])v(o=n.runtime)==m?(A="Adobe AIR",B=o.flash.system.Capabilities.os):v(o=n.phantom)==S?(A="PhantomJS",U=(o=o.version||null)&&o.major+"."+o.minor+"."+o.patch):"number"==typeof I.documentMode&&(o=/\bTrident\/(\d+)/i.exec(t))?(U=[U,I.documentMode],(o=+o[1]+4)!=U[1]&&(N.push("IE "+U[1]+" mode"),D&&(D[1]=""),U[1]=o),U="IE"==A?String(U[1].toFixed(1)):U[0]):"number"==typeof I.documentMode&&/^(?:Chrome|Firefox)\b/.test(A)&&(N.push("masking as "+A+" "+U),A="IE",U="11.0",D=["Trident"],B="Windows");else if(C&&(R=(o=C.lang.System).getProperty("os.arch"),B=B||o.getProperty("os.name")+" "+o.getProperty("os.version")),T){try{U=n.require("ringo/engine").version.join("."),A="RingoJS"}catch(e){(o=n.system)&&o.global.system==n.system&&(A="Narwhal",B||(B=o[0].os||null))}A||(A="Rhino")}else"object"==typeof n.process&&!n.process.browser&&(o=n.process)&&("object"==typeof o.versions&&("string"==typeof o.versions.electron?(N.push("Node "+o.versions.node),A="Electron",U=o.versions.electron):"string"==typeof o.versions.nw&&(N.push("Chromium "+U,"Node "+o.versions.node),A="NW.js",U=o.versions.nw)),A||(A="Node.js",R=o.arch,B=o.platform,U=(U=/[\d.]+/.exec(o.version))?U[0]:null));B=B&&y(B)}if(U&&(o=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(U)||/(?:alpha|beta)(?: ?\d)?/i.exec(t+";"+(L&&i.appMinorVersion))||/\bMinefield\b/i.test(t)&&"a")&&(j=/b/i.test(o)?"beta":"alpha",U=U.replace(RegExp(o+"\\+?$"),"")+("beta"==j?M:E)+(/\d+\+?/.exec(o)||"")),"Fennec"==A||"Firefox"==A&&/\b(?:Android|Firefox OS)\b/.test(B))A="Firefox Mobile";else if("Maxthon"==A&&U)U=U.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(F))"Xbox 360"==F&&(B=null),"Xbox 360"==F&&/\bIEMobile\b/.test(t)&&N.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(A)&&(!A||F||/Browser|Mobi/.test(A))||"Windows CE"!=B&&!/Mobi/i.test(t))if("IE"==A&&L)try{null===n.external&&N.unshift("platform preview")}catch(e){N.unshift("embedded")}else(/\bBlackBerry\b/.test(F)||/\bBB10\b/.test(t))&&(o=(RegExp(F.replace(/ +/g," *")+"/([.\\d]+)","i").exec(t)||0)[1]||U)?(B=((o=[o,/BB10/.test(t)])[1]?(F=null,q="BlackBerry"):"Device Software")+" "+o[0],U=null):this!=g&&"Wii"!=F&&(L&&P||/Opera/.test(A)&&/\b(?:MSIE|Firefox)\b/i.test(t)||"Firefox"==A&&/\bOS X (?:\d+\.){2,}/.test(B)||"IE"==A&&(B&&!/^Win/.test(B)&&U>5.5||/\bWindows XP\b/.test(B)&&U>8||8==U&&!/\bTrident\b/.test(t)))&&!d.test(o=e.call(g,t.replace(d,"")+";"))&&o.name&&(o="ing as "+o.name+((o=o.version)?" "+o:""),d.test(A)?(/\bIE\b/.test(o)&&"Mac OS"==B&&(B=null),o="identify"+o):(o="mask"+o,A=O?y(O.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(o)&&(B=null),L||(U=null)),D=["Presto"],N.push(o));else A+=" Mobile";(o=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(t)||0)[1])&&(o=[parseFloat(o.replace(/\.(\d)$/,".0$1")),o],"Safari"==A&&"+"==o[1].slice(-1)?(A="WebKit Nightly",j="alpha",U=o[1].slice(0,-1)):U!=o[1]&&U!=(o[2]=(/\bSafari\/([\d.]+\+?)/i.exec(t)||0)[1])||(U=null),o[1]=(/\bChrome\/([\d.]+)/i.exec(t)||0)[1],537.36==o[0]&&537.36==o[2]&&parseFloat(o[1])>=28&&"WebKit"==D&&(D=["Blink"]),L&&(f||o[1])?(D&&(D[1]="like Chrome"),o=o[1]||((o=o[0])<530?1:o<532?2:o<532.05?3:o<533?4:o<534.03?5:o<534.07?6:o<534.1?7:o<534.13?8:o<534.16?9:o<534.24?10:o<534.3?11:o<535.01?12:o<535.02?"13+":o<535.07?15:o<535.11?16:o<535.19?17:o<536.05?18:o<536.1?19:o<537.01?20:o<537.11?"21+":o<537.13?23:o<537.18?24:o<537.24?25:o<537.36?26:"Blink"!=D?"27":"28")):(D&&(D[1]="like Safari"),o=(o=o[0])<400?1:o<500?2:o<526?3:o<533?4:o<534?"4+":o<535?5:o<537?6:o<538?7:o<601?8:"8"),D&&(D[1]+=" "+(o+="number"==typeof o?".x":/[.+]/.test(o)?"":"+")),"Safari"==A&&(!U||parseInt(U)>45)&&(U=o)),"Opera"==A&&(o=/\bzbov|zvav$/.exec(B))?(A+=" ",N.unshift("desktop mode"),"zvav"==o?(A+="Mini",U=null):A+="Mobile",B=B.replace(RegExp(" *"+o+"$"),"")):"Safari"==A&&/\bChrome\b/.exec(D&&D[1])&&(N.unshift("desktop mode"),A="Chrome Mobile",U=null,/\bOS X\b/.test(B)?(q="Apple",B="iOS 4.3+"):B=null),U&&0==U.indexOf(o=/[\d.]+$/.exec(B))&&t.indexOf("/"+o+"-")>-1&&(B=_(B.replace(o,""))),D&&!/\b(?:Avant|Nook)\b/.test(A)&&(/Browser|Lunascape|Maxthon/.test(A)||"Safari"!=A&&/^iOS/.test(B)&&/\bSafari\b/.test(D[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(A)&&D[1])&&(o=D[D.length-1])&&N.push(o),N.length&&(N=["("+N.join("; ")+")"]),q&&F&&F.indexOf(q)<0&&N.push("on "+q),F&&N.push((/^on /.test(N[N.length-1])?"":"on ")+F),B&&(o=/ ([\d.+]+)$/.exec(B),u=o&&"/"==B.charAt(B.length-o[0].length-1),B={architecture:32,family:o&&!u?B.replace(o[0],""):B,version:o?o[1]:null,toString:function(){var e=this.version;return this.family+(e&&!u?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(o=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(R))&&!/\bi686\b/i.test(R)?(B&&(B.architecture=64,B.family=B.family.replace(RegExp(" *"+o),"")),A&&(/\bWOW64\b/i.test(t)||L&&/\w(?:86|32)$/.test(i.cpuClass||i.platform)&&!/\bWin64; x64\b/i.test(t))&&N.unshift("32-bit")):B&&/^OS X/.test(B.family)&&"Chrome"==A&&parseFloat(U)>=39&&(B.architecture=64),t||(t=null);var $={};return $.description=t,$.layout=D&&D[0],$.manufacturer=q,$.name=A,$.prerelease=j,$.product=F,$.ua=t,$.version=A&&U,$.os=B||{architecture:null,family:null,version:null,toString:function(){return"null"}},$.parse=e,$.toString=function(){return this.description||""},$.version&&N.unshift(U),$.name&&N.unshift(A),B&&A&&(B!=String(B).split(" ")[0]||B!=A.split(" ")[0]&&!F)&&N.push(F?"("+B+")":"on "+B),N.length&&($.description=N.join(" ")),$}();a.platform=k,void 0===(i=function(){return k}.call(t,n,t,e))||(e.exports=i)}).call(this)}).call(this,n(228)(e),n(56))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(45);function i(e,t){return[`${(new Date).toISOString()} Notifications ${e}:`].concat(Array.from(t))}class s{constructor(){this.prefix=""}static scope(e=""){return new s}setLevel(e){r.setLevel(e)}trace(...e){r.debug.apply(null,i("T"+this.prefix,e))}debug(...e){r.debug.apply(null,i("D"+this.prefix,e))}info(...e){r.info.apply(null,i("I"+this.prefix,e))}warn(...e){r.warn.apply(null,i("W"+this.prefix,e))}error(...e){r.error.apply(null,i("E"+this.prefix,e))}}t.Logger=s;let a=s.scope();t.log=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e){this.queuedRequests=[],this.isRequestInFlight=!1,this.inputMergingFunction=e}add(e,t){let n=new Promise((n,r)=>this.queuedRequests.push({input:e,requestFunction:t,resolve:n,reject:r}));return this.wakeupQueue(),n}squashAndAdd(e,t){let n,r=this.queuedRequests;this.queuedRequests=[],r.length>0?(n=r.map(e=>e.input).reduce(this.inputMergingFunction),n=this.inputMergingFunction(n,e)):n=e;let i=this.add(n,t);return r.forEach(e=>i.then(e.resolve,e.reject)),i}isEmpty(){return 0===this.queuedRequests.length&&!this.isRequestInFlight}wakeupQueue(){if(0!==this.queuedRequests.length&&!this.isRequestInFlight){let e=this.queuedRequests.shift();this.isRequestInFlight=!0,e.requestFunction(e.input).then(e.resolve,e.reject).then(e=>{this.isRequestInFlight=!1,this.wakeupQueue()})}}}t.MergingQueue=r;t.NamespacedMergingQueue=class{constructor(e){this.queueByNamespaceKey=new Map,this.inputReducer=e}async add(e,t,n){return this.invokeQueueMethod(e,e=>e.add(t,n))}async squashAndAdd(e,t,n){return this.invokeQueueMethod(e,e=>e.squashAndAdd(t,n))}async invokeQueueMethod(e,t){this.queueByNamespaceKey.has(e)||this.queueByNamespaceKey.set(e,new r(this.inputReducer));const n=t(this.queueByNamespaceKey.get(e));return this.queueByNamespaceKey.get(e).isEmpty()&&this.queueByNamespaceKey.delete(e),n}}},function(e,t,n){e.exports={default:n(140),__esModule:!0}},function(e,t,n){e.exports=!n(14)&&!n(21)((function(){return 7!=Object.defineProperty(n(58)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(27),i=n(33),s=n(143)(!1),a=n(63)("IE_PROTO");e.exports=function(e,t){var n,o=i(e),u=0,c=[];for(n in o)n!=a&&r(o,n)&&c.push(n);for(;t.length>u;)r(o,n=t[u++])&&(~s(c,n)||c.push(n));return c}},function(e,t,n){e.exports=n(20)},function(e,t,n){var r=n(6).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(27),i=n(34),s=n(63)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){var r=n(13);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var s=e.return;throw void 0!==s&&r(s.call(e)),t}}},function(e,t,n){var r=n(35),i=n(8)("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||s[i]===e)}},function(e,t,n){var r=n(13),i=n(26),s=n(8)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[s])?t:i(n)}},function(e,t,n){var r,i,s,a=n(19),o=n(92),u=n(85),c=n(58),l=n(6),d=l.process,h=l.setImmediate,f=l.clearImmediate,p=l.MessageChannel,m=l.Dispatch,y=0,g={},v=function(){var e=+this;if(g.hasOwnProperty(e)){var t=g[e];delete g[e],t()}},b=function(e){v.call(e.data)};h&&f||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return g[++y]=function(){o("function"==typeof e?e:Function(e),t)},r(y),y},f=function(e){delete g[e]},"process"==n(40)(d)?r=function(e){d.nextTick(a(v,e,1))}:m&&m.now?r=function(e){m.now(a(v,e,1))}:p?(s=(i=new p).port2,i.port1.onmessage=b,r=a(s.postMessage,s,1)):l.addEventListener&&"function"==typeof postMessage&&!l.importScripts?(r=function(e){l.postMessage(e+"","*")},l.addEventListener("message",b,!1)):r="onreadystatechange"in c("script")?function(e){u.appendChild(c("script")).onreadystatechange=function(){u.removeChild(this),v.call(e)}}:function(e){setTimeout(a(v,e,1),0)}),e.exports={set:h,clear:f}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(13),i=n(9),s=n(70);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=s.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(6),i=n(2),s=n(12),a=n(14),o=n(8)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];a&&t&&!t[o]&&s.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(8)("iterator"),i=!1;try{var s=[7][r]();s.return=function(){i=!0},Array.from(s,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var s=[7],a=s[r]();a.next=function(){return{done:n=!0}},s[r]=function(){return a},e(s)}catch(e){}return n}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(162)),i=a(n(164)),s="function"==typeof i.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof i.default&&"symbol"===s(r.default)?function(e){return void 0===e?"undefined":s(e)}:function(e){return e&&"function"==typeof i.default&&e.constructor===i.default&&e!==i.default.prototype?"symbol":void 0===e?"undefined":s(e)}},function(e,t,n){var r=n(40);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(83),i=n(65).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(52),i=n(39),s=n(33),a=n(59),o=n(27),u=n(82),c=Object.getOwnPropertyDe