@phenixrts/sdk 2022.0.10-beta.20 → 2022.0.10-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/debug/channels.js +1 -1
- package/dist/debug/full.js +1 -1
- package/dist/debug/groups.js +1 -1
- package/dist/debug/messaging.js +1 -1
- package/dist/debug/publish.js +1 -1
- package/dist/debug.private/channels.js +1 -1
- package/dist/debug.private/full.js +1 -1
- package/dist/debug.private/groups.js +1 -1
- package/dist/debug.private/messaging.js +1 -1
- package/dist/debug.private/publish.js +1 -1
- package/dist/es5.debug.private/channels.js +1 -1
- package/dist/es5.debug.private/full.js +1 -1
- package/dist/es5.debug.private/groups.js +1 -1
- package/dist/es5.debug.private/messaging.js +1 -1
- package/dist/es5.debug.private/publish.js +1 -1
- package/dist/legacy.debug/channels.js +1 -1
- package/dist/legacy.debug/full.js +1 -1
- package/dist/legacy.debug/groups.js +1 -1
- package/dist/legacy.debug/messaging.js +1 -1
- package/dist/legacy.debug/publish.js +1 -1
- package/dist/legacy.debug.private/channels.js +1 -1
- package/dist/legacy.debug.private/full.js +1 -1
- package/dist/legacy.debug.private/groups.js +1 -1
- package/dist/legacy.debug.private/messaging.js +1 -1
- package/dist/legacy.debug.private/publish.js +1 -1
- package/dist/legacy.min/channels.js +1 -1
- package/dist/legacy.min/full.js +1 -1
- package/dist/legacy.min/groups.js +1 -1
- package/dist/legacy.min/messaging.js +1 -1
- package/dist/legacy.min/publish.js +1 -1
- package/dist/min/channels.js +1 -1
- package/dist/min/full.js +1 -1
- package/dist/min/groups.js +1 -1
- package/dist/min/messaging.js +1 -1
- package/dist/min/publish.js +1 -1
- package/dist/min.private/channels.js +1 -1
- package/dist/min.private/full.js +1 -1
- package/dist/min.private/groups.js +1 -1
- package/dist/min.private/messaging.js +1 -1
- package/dist/min.private/publish.js +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see publish.js.LICENSE.txt */
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.phenix=t():e.phenix=t()}(self,(function(){return function(){var e={7228:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},2858:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},3646:function(e,t,n){var r=n(7228);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},1506:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},8926:function(e,t,n){var r=n(202).default;function i(e,t,n,i,o,a,s){try{var u=e[a](s),c=u.value}catch(e){return void n(e)}u.done?t(c):r.resolve(c).then(i,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new r((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},4575:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},3913:function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},9713:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},9754:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2205:function(e,t,n){var r=n(9489);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},6860:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},3884:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}},e.exports.__esModule=!0,e.exports.default=e.exports},521:function(e){e.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.")},e.exports.__esModule=!0,e.exports.default=e.exports},8206:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},8585:function(e,t,n){var r=n(8).default,i=n(1506);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9591:function(e,t,n){var r=n(202).default,i=n(8).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,a=n.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new R(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=p(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d={};function v(){}function g(){}function y(){}var m={};f(m,u,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(L([])));b&&b!==n&&a.call(b,u)&&(m=b);var w=y.prototype=v.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(r,o,s,u){var c=p(e[r],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=p(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function L(e){if(e){var t=e[u];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(a.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:P}}function P(){return{value:void 0,done:!0}}return g.prototype=y,f(w,"constructor",y),f(y,"constructor",g),g.displayName=f(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,f(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},x(S.prototype),f(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,i,o,a){void 0===a&&(a=r);var s=new S(h(e,n,i,o),a);return t.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},x(w),f(w,l,"Generator"),f(w,u,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=L,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},9489:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3038:function(e,t,n){var r=n(2858),i=n(3884),o=n(379),a=n(521);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},319:function(e,t,n){var r=n(3646),i=n(6860),o=n(379),a=n(8206);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},8:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},379:function(e,t,n){var r=n(7228);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},7757:function(e,t,n){var r=n(9591)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},202:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}}),n(9753),n(7042),n(1539),n(8674),n(7727),n(2564);var r=n(8),i=n.n(r),o=n(4575),a=n.n(o),s=n(3913),u=n.n(s),c=n(9713),l=n.n(c),f=u()((function e(t,n,r){a()(this,e),l()(this,"onFulfilled",void 0),l()(this,"onRejected",void 0),l()(this,"promise",void 0),this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=r})),h=function(){function e(t){if(a()(this,e),l()(this,"_state",void 0),l()(this,"_handled",void 0),l()(this,"_value",void 0),l()(this,"_deferreds",void 0),!(this instanceof e))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],this.doResolve(t)}return u()(e,[{key:"doResolve",value:function(e){var t=this,n=!1;try{e((function(e){n||(n=!0,t.promiseResolve(e))}),(function(e){n||(n=!0,t.promiseReject(e))}))}catch(e){if(n)return;n=!0,this.promiseReject(e)}}},{key:"promiseResolve",value:function(t){var n=this;try{if(t===n)throw new TypeError("A Promise cannot be resolved with it self.");if(t&&("object"===i()(t)||"function"==typeof t)){var r=t.then;if(t instanceof e)return n._state=3,n._value=t,void n.finale();if("function"==typeof r)return void n.doResolve((function(){r.apply(t,arguments)}))}n._state=1,n._value=t,n.finale()}catch(e){n.promiseReject(e)}}},{key:"promiseReject",value:function(e){this._state=2,this._value=e,this.finale()}},{key:"finale",value:function(){var t=this;2===this._state&&0===this._deferreds.length&&e._immediate((function(){t._handled||e._unhandledRejection(t._value)}));for(var n=0,r=this._deferreds.length;n<r;n++)this.handle(this._deferreds[n]);this._deferreds=null}},{key:"handle",value:function(t){for(var n=this;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,e._immediate((function(){var e=1===n._state?t.onFulfilled:t.onRejected;if(null!==e){var r;try{r=e(n._value)}catch(e){return void t.promise.promiseReject(e)}t.promise.promiseResolve(r)}else 1===n._state?t.promise.promiseResolve(n._value):t.promise.promiseReject(n._value)}))):n._deferreds.push(t)}}],[{key:"all",value:function(t){return new e((function(e,n){if(!Array.isArray(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);for(var o=r.length,a=function t(a,s){try{if(s&&("object"===i()(s)||"function"==typeof s)){var u=s.then;if("function"==typeof u)return void u.call(s,(function(e){return t(a,e)}),n)}r[a]=s,0==--o&&e(r)}catch(e){n(e)}},s=0;s<r.length;s++)a(s,r[s])}))}},{key:"resolve",value:function(t){return t&&"object"===i()(t)&&t.constructor===e?t:new e((function(e){return e(t)}))}},{key:"reject",value:function(t){return new e((function(e,n){return n(t)}))}},{key:"race",value:function(t){return new e((function(n,r){if(!Array.isArray(t))return r(new TypeError("Promise.race accepts an array"));for(var i=0,o=t.length;i<o;i++)e.resolve(t[i]).then(n,r)}))}},{key:"_immediate",value:function(e){setTimeout(e,0)}},{key:"_unhandledRejection",value:function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)}}]),e}();h.prototype.catch=function(e){return this.then(null,e)},h.prototype.then=function(e,t){var n=new this.constructor((function(){return null}));return this.handle(new f(e,t,n)),n},h.prototype.finally=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))};var p=h},2874:function(e,t,n){"use strict";n.r(t),n.d(t,{SDK:function(){return he},default:function(){return Be}}),n(9826),n(3843),n(3710),n(1539),n(9714);var r,i=n(4575),o=n.n(i),a=n(3913),s=n.n(a),u=n(9713),c=n.n(u);n(4812),n(9554),n(6699),n(2772),n(5827),n(561),n(4747),function(e){e[e.All=-1]="All",e[e.Trace=10]="Trace",e[e.Debug=20]="Debug",e[e.Info=30]="Info",e[e.Warn=40]="Warn",e[e.Error=50]="Error",e[e.Fatal=60]="Fatal",e[e.Off=100]="Off"}(r||(r={}));var l=function(){function e(t,n,r){o()(this,e),c()(this,"_category",void 0),c()(this,"_appenders",void 0),c()(this,"_threshold",void 0),this._category=t,this._appenders=n,this._threshold=r}return s()(e,[{key:"category",get:function(){return this._category}},{key:"appenders",get:function(){return this._appenders}},{key:"threshold",get:function(){return this._threshold}},{key:"trace",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Trace)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Trace,t)}}},{key:"debug",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Debug)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Debug,t)}}},{key:"info",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Info)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Info,t)}}},{key:"warn",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Warn)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Warn,t)}}},{key:"error",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Error)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Error,t)}}},{key:"fatal",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Fatal)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Fatal,t)}}},{key:"log",value:function(e,t){var n=this,r=new Date,i=this.replacePlaceholders(t);this._appenders.value.forEach((function(t){t.log(e,i,n.category,r)}))}},{key:"replacePlaceholders",value:function(e){for(var t=this,n=e[0],r=0;n.indexOf&&e.length>1&&r>=0;)if((r=n.indexOf("%",r))>0)switch(n.substring(r+1,r+2)){case"%":n=n.substring(0,r)+n.substring(r+1),r++;break;case"s":case"d":e[0]=n=this.replaceArgument(this.toString(e[1]),n,r),e.splice(1,1);break;case"j":e[0]=n=this.replaceArgument(this.stringify(e[1]),n,r),e.splice(1,1);break;default:return e.toString()}return e.length>1&&(e=e.reduce((function(e,n,r,i){return r+1===i.length&&n instanceof Error?e+"\n"+t.toString(n.stack):e+"[".concat(t.toString(n),"]")}))),e.toString()}},{key:"stringify",value:function(e){var t=[];try{return JSON.stringify(e instanceof Error?this.toString(e):e,(function(e,n){if(n&&n instanceof Object){if(t.includes(n))return"<recursive>";t.push(n)}return n}),2)}catch(e){return"[object invalid JSON.stringify]"}}},{key:"replaceArgument",value:function(e,t,n){return t.substring(0,n)+this.toString(e)+t.substring(n+2)}},{key:"toString",value:function(e){if("string"==typeof e)return e;if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e)return e.toString();var t="";if(e)if("function"==typeof e)t=e.toString();else if(e instanceof Object)try{t=e.toString()}catch(e){t="[object invalid toString()]"}return t}}]),e}(),f=function(){function e(){o()(this,e),c()(this,"_appenders",[])}return s()(e,[{key:"value",get:function(){return this._appenders}},{key:"add",value:function(e){this._appenders.push(e)}},{key:"remove",value:function(e){this._appenders=this._appenders.reduce((function(t,n){return n!==e&&t.push(n),t}),[])}}]),e}(),h=function(){function e(){o()(this,e)}return s()(e,null,[{key:"isPrivate",get:function(){return this._isPrivate}},{key:"applyIsPrivate",value:function(){try{this._isPrivate=!1}catch(e){this._isPrivate=!1}}}]),e}();c()(h,"_isPrivate",void 0),h.applyIsPrivate();var p=function(){function e(){o()(this,e)}return s()(e,null,[{key:"defaultLoggingLevel",get:function(){return h.isPrivate?r.Off:r.All}},{key:"defaultConsoleLoggingLevel",get:function(){return h.isPrivate?r.Off:r.All}},{key:"defaultTelemetryLoggingLevel",get:function(){return r.Info}}]),e}(),d=function(){function e(){o()(this,e),c()(this,"_threshold",p.defaultLoggingLevel)}return s()(e,[{key:"value",get:function(){return this._threshold}},{key:"setThreshold",value:function(e){this._threshold=e}}]),e}(),v=(n(2222),n(8733),function(){function e(t){o()(this,e),c()(this,"_threshold",void 0),this._threshold=t}return s()(e,[{key:"log",value:function(e,t,n,i){if(!(e<this._threshold)){var o="".concat(i.toISOString()," [").concat(n,"] [").concat(r[e],"] ").concat(t);e<r.Warn?console.log(o):console.error(o)}}}]),e}()),g=(n(7042),n(2479),n(8674),n(5666),n(8926)),y=n.n(g),m=n(7757),_=n.n(m),b=function(){function e(){o()(this,e)}return s()(e,null,[{key:"sdkVersion",get:function(){try{return"2022-09-26T20:05:17.370Z (2022.0.10-beta.20)"}catch(e){return this._defaultVersion}}}]),e}();c()(b,"_defaultVersion",(new Date).toISOString());var w,x=function(){function e(t){o()(this,e),c()(this,"_telemetryConfiguration",void 0),c()(this,"_logs",[]),c()(this,"_isSending",void 0),c()(this,"_domain",location.hostname),this._telemetryConfiguration=t}var t,n;return s()(e,[{key:"push",value:function(e,t,n,i){var o={timestamp:i.toISOString(),tenancy:this._telemetryConfiguration.tenancy,level:r[e],category:n,message:t,sessionId:this._telemetryConfiguration.sessionId,version:b.sdkVersion,environment:this._telemetryConfiguration.environment,fullQualifiedName:this._domain};e<r.Error?this._logs.push(o):this._logs.unshift(o),this.sendLogsIfAble()}},{key:"sendLogs",value:(n=y()(_().mark((function e(t){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new FormData).append("jsonBody",JSON.stringify({records:t})),e.next=4,fetch(this._telemetryConfiguration.url,{method:"POST",body:n});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"sendLogsIfAble",value:(t=y()(_().mark((function e(){var t,n,r,i,o=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._logs.length<=0||this._isSending)){e.next=2;break}return e.abrupt("return");case 2:for(t=0,n=0,this._isSending=!0,r=function(e){return Object.values(e).reduce((function(e,t){return e+(t?t.length:0)}),0)};this._logs.length>t&&r(this._logs[t])+n<8192;)n+=r(this._logs[t]),t++;return t||(this._logs[t].message=this._logs[t].message.substring(0,r(this._logs[t])+(8192-r(this._logs[t]))),t=1),i=this._logs.slice(0,t),this._logs=this._logs.slice(t),e.abrupt("return",this.sendLogs(i).then((function(e){return o._isSending=!1,o.sendLogsIfAble(),e})).catch((function(){o._isSending=!1,o.sendLogsIfAble()})));case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),S=function(){function e(t){o()(this,e),c()(this,"_telemetryService",void 0),c()(this,"_tenancy",void 0),c()(this,"_sessionId",void 0),c()(this,"_threshold",void 0),this._tenancy=t.tenancy,this._sessionId=t.sessionId,this._threshold=t.threshold,this._telemetryService=new x(t)}return s()(e,[{key:"log",value:function(e,t,n,r){e<this._threshold||this._telemetryService.push(e,t,n,r)}}]),e}(),k=(n(6992),n(8783),n(3948),n(285),function(){function e(){o()(this,e),c()(this,"_url","https://telemetry.phenixrts.com/telemetry/logs"),c()(this,"_tenancy",void 0),c()(this,"_sessionId",void 0),c()(this,"_environment",void 0),c()(this,"_threshold",p.defaultTelemetryLoggingLevel)}return s()(e,[{key:"url",get:function(){return this._url},set:function(e){var t=new URL(e);t.pathname=t.pathname+"/logs",this._url=t.toString()}},{key:"environment",get:function(){return this._environment},set:function(e){this._environment=e}},{key:"tenancy",get:function(){return this._tenancy},set:function(e){this._tenancy=e}},{key:"sessionId",get:function(){return this._sessionId},set:function(e){this._sessionId=e}},{key:"threshold",get:function(){return this._threshold},set:function(e){this._threshold=e}}]),e}());n(4916),n(4765),function(e){e[e.Off=100]="Off",e[e.Essential=10]="Essential",e[e.All=-1]="All"}(w||(w={}));var T=function(){function e(){o()(this,e),c()(this,"_url","https://telemetry.phenixrts.com/telemetry/metrics"),c()(this,"_tenancy",void 0),c()(this,"_sessionId",void 0),c()(this,"_environment",void 0),c()(this,"_threshold",C.defaultTelemetryLevel)}return s()(e,[{key:"url",get:function(){return this._url},set:function(e){var t=new URL(e);t.pathname=t.pathname+"/metrics",this._url=t.toString()}},{key:"environment",get:function(){return this._environment},set:function(e){this._environment=e}},{key:"tenancy",get:function(){return this._tenancy},set:function(e){this._tenancy=e}},{key:"sessionId",get:function(){return this._sessionId},set:function(e){this._sessionId=e}},{key:"threshold",get:function(){return this._threshold},set:function(e){this._threshold=e}}]),e}(),C=function(){function e(){o()(this,e)}return s()(e,null,[{key:"defaultTelemetryLevel",get:function(){return h.isPrivate?w.Essential:w.All}}]),e}(),R=function(e){throw new Error("Unexpected value [".concat(e,"]. This should never be reached"))},L=function(){function e(){o()(this,e)}return s()(e,null,[{key:"convertTelemetryLevelToTelemetryLevelType",value:function(e){switch(e){case w.Off:return"Off";case w.Essential:return"Essential";case w.All:return"All";default:R(e)}}},{key:"convertTelemetryLevelTypeToTelemetryLevel",value:function(e){switch(e){case"Off":return w.Off;case"Essential":return w.Essential;case"All":return w.All;default:R(e)}}}]),e}(),P=function(){function e(){o()(this,e)}return s()(e,null,[{key:"convertLoggingLevelToLoggingLevelType",value:function(e){switch(e){case r.Off:return"Off";case r.Trace:return"Trace";case r.Debug:return"Debug";case r.Info:return"Trace";case r.Warn:return"Warn";case r.Error:return"Error";case r.Fatal:return"Fatal";case r.All:return"All";default:R(e)}}},{key:"convertLoggingLevelTypeToLoggingLevel",value:function(e){switch(e){case"Off":return r.Off;case"Trace":return r.Trace;case"Debug":return r.Debug;case"Info":return r.Info;case"Warn":return r.Warn;case"Error":return r.Error;case"Fatal":return r.Fatal;case"All":return r.All;default:R(e)}}}]),e}(),O=function(){function e(){o()(this,e)}return s()(e,[{key:"getStringValue",value:function(e){return this.readConfigurationParameterValue(e)||this.readConfigurationParameterURIValue("".concat(e,"-uri-parameter-name"))||this.defaultStringValue[e]}},{key:"getBooleanValue",value:function(e){var t=this.readConfigurationParameterValue(e);return t||this.readConfigurationParameterURIValue("".concat(e,"-uri-parameter-name"))?"true"===t||"1"===t||"On"===t:!0===this.defaultBooleanValue[e]}},{key:"defaultStringValue",get:function(){return{"phenix-metrics-level":L.convertTelemetryLevelToTelemetryLevelType(C.defaultTelemetryLevel),"phenix-logging-level":P.convertLoggingLevelToLoggingLevelType(p.defaultLoggingLevel),"phenix-console-logging-level":P.convertLoggingLevelToLoggingLevelType(p.defaultConsoleLoggingLevel),"phenix-telemetry-logging-level":P.convertLoggingLevelToLoggingLevelType(p.defaultTelemetryLoggingLevel),"phenix-channel-token":"","phenix-uri":"","phenix-base-uri":""}}},{key:"defaultBooleanValue",get:function(){return{"phenix-automatically-retry-on-failure":!0,"phenix-automatically-reconnect-peer-connection":!0}}},{key:"readConfigurationParameterValue",value:function(e){var t=document.querySelector("meta[name='".concat(e,"']"));if(t){var n=t.getAttribute("value");if(n)return n}}},{key:"readConfigurationParameterURIValue",value:function(e){var t=this.readConfigurationParameterValue(e);if(t){var n=new URLSearchParams(location.search).get(t)||void 0;if(n)return n}}}]),e}(),E=function(){function e(){throw o()(this,e),new Error("LoggerFactory is a static class that may not be instantiated")}return s()(e,null,[{key:"telemetryConfiguration",get:function(){return e._telemetryConfiguration}},{key:"getLogger",value:function(t){return"string"!=typeof t&&(t="SDK"),e._loggers[t]||(e._loggers[t]=new l(t,this._appenders,this._threshold))}},{key:"applyLoggerConfigFromParameterConfiguration",value:function(){e.applyLoggingLevel(),e.applyAppenderLoggingLevel("console",e.applyConsoleLogger.bind(this)),e.applyAppenderLoggingLevel("telemetry",e.applyTelemetryLogger.bind(this))}},{key:"applyLoggingLevel",value:function(){var e=this._configurationParameterReader.getStringValue("phenix-logging-level");r[e]&&this._threshold.setThreshold(r[e])}},{key:"applyAppenderLoggingLevel",value:function(e,t){var n=this._configurationParameterReader.getStringValue("phenix-".concat(e,"-logging-level"));"Off"!==n&&t(r[n])}},{key:"applyConsoleLogger",value:function(e){this._appenders.add(new v(e||p.defaultConsoleLoggingLevel))}},{key:"applyTelemetryLogger",value:function(e){this._telemetryConfiguration.threshold=e||p.defaultTelemetryLoggingLevel,this._appenders.add(new S(this._telemetryConfiguration))}}]),e}();c()(E,"_configurationParameterReader",new O),c()(E,"_loggers",{}),c()(E,"_appenders",new f),c()(E,"_threshold",new d),c()(E,"_telemetryConfiguration",new k),E.applyLoggerConfigFromParameterConfiguration(),n(3290);var A=function(){function e(){throw o()(this,e),new Error("Strings is a static class that may not be instantiated")}return s()(e,null,[{key:"random",value:function(e){var t=Math.ceil(e/13);return new Array(t).fill((function(){return Math.random().toString(16).substring(2,15)})).reduce((function(e,t){return e+t()}),"").substring(0,e)}}]),e}(),I=n(2205),D=n.n(I),j=n(8585),F=n.n(j),M=n(9754),U=n.n(M),N=function(){function e(t){o()(this,e),c()(this,"_disposed",void 0),c()(this,"_disposable",void 0),this._disposed=!1,this._disposable=t}return s()(e,[{key:"dispose",value:function(){if(!this._disposed)return this._disposed=!0,this._disposable.call(this)}}]),e}();var V=function(e){D()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=U()(t);if(n){var i=U()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return F()(this,e)});function i(e,t){return o()(this,i),r.call(this,(function(){var n=e.indexOf(t);n>=0&&e.splice(n,1)}))}return s()(i)}(N),B=function(){function e(t){o()(this,e),c()(this,"_listeners",void 0),c()(this,"_value",void 0),this._listeners=[],this._value=t}return s()(e,[{key:"value",get:function(){return this._value},set:function(e){var t=this._value!==e;if(t&&e){var n=e;"function"==typeof n.equals&&(t=!n.equals(this._value))}t&&(this._value=e,this._listeners.forEach((function(t){t(e)})))}},{key:"subscribe",value:function(e){return this._listeners.push(e),e(this._value),new V(this._listeners,e)}}]),e}(),G=function(){function e(t){o()(this,e),c()(this,"_subject",void 0),this._subject=t}return s()(e,[{key:"value",get:function(){return this._subject.value}},{key:"subscribe",value:function(e){return this._subject.subscribe(e)}}]),e}(),z=(n(4723),n(9653),n(1058),n(2023),n(3123),function(){function e(){o()(this,e)}return s()(e,null,[{key:"browserNameAndVersion",get:function(){return e._browserNameAndVersion}},{key:"browserName",get:function(){return this._browserName}},{key:"browserMajorVersion",get:function(){return this._browserMajorVersion}},{key:"isChrome69",get:function(){return e._isChrome69}},{key:"isChrome70",get:function(){return e._isChrome70}},{key:"isChrome71",get:function(){return e._isChrome71}},{key:"isChrome72",get:function(){return e._isChrome72}},{key:"isChrome74",get:function(){return e._isChrome74}},{key:"isChrome75",get:function(){return e._isChrome75}},{key:"isChrome76",get:function(){return e._isChrome76}},{key:"isChrome77",get:function(){return e._isChrome77}},{key:"parseBrowserNameAndVersion",value:function(){if(!navigator||!navigator.userAgent)return"";var t=navigator.userAgent.match(e._browserNameAndVersionRegex);return t&&t[0]?t[0]:e.parseBrowserNameAndVersionForIE()}},{key:"parseBrowserName",value:function(){if(!e._browserNameAndVersion)return"";var t=e._browserNameAndVersion.split("/");return t&&t[0]?t[0]:""}},{key:"parseBrowserMajorVersion",value:function(){if(!e._browserNameAndVersion)return 0;var t=e._browserNameAndVersion.split("/");if(!t||!t[1])return 0;var n=t[1];return n&&Number(n.split(".")[0])||0}},{key:"parseBrowserNameAndVersionForIE",value:function(){if(!navigator||!navigator.userAgent)return"";var e=navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return"IE/".concat(parseInt(e.substring(t+5,e.indexOf(".",t)),10));if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return"IE/".concat(parseInt(e.substring(n+3,e.indexOf(".",n)),10))}return""}}]),e}());c()(z,"_browserNameAndVersionRegex",/(MSIE|(?!Gecko.+)Firefox|(?!AppleWebKit.+Chrome.+)Safari|(?!AppleWebKit.+)Chrome|AppleWebKit(?!.+Chrome|.+Safari)|Gecko(?!.+Firefox))(?: |\/)([\d.apre]+)/g),c()(z,"_browserNameAndVersion",z.parseBrowserNameAndVersion()),c()(z,"_browserName",z.parseBrowserName()),c()(z,"_browserMajorVersion",z.parseBrowserMajorVersion()),c()(z,"_isChrome69",z._browserNameAndVersion.includes("Chrome/69.")),c()(z,"_isChrome70",z._browserNameAndVersion.includes("Chrome/70.")),c()(z,"_isChrome71",z._browserNameAndVersion.includes("Chrome/71.")),c()(z,"_isChrome72",z._browserNameAndVersion.includes("Chrome/72.")),c()(z,"_isChrome74",z._browserNameAndVersion.includes("Chrome/74.")),c()(z,"_isChrome75",z._browserNameAndVersion.includes("Chrome/75.")),c()(z,"_isChrome76",z._browserNameAndVersion.includes("Chrome/76.")),c()(z,"_isChrome77",z._browserNameAndVersion.includes("Chrome/77."));var q=function(){function e(){o()(this,e)}return s()(e,null,[{key:"clientOfferDisabled",get:function(){return z.isChrome74||z.isChrome75||z.isChrome76||z.isChrome77}},{key:"addTranceiverDisabled",get:function(){return z.isChrome69||z.isChrome70||z.isChrome71||z.isChrome72}},{key:"getStatsPromiseBasedDisabled",get:function(){return"Chrome"===z.browserName&&z.browserMajorVersion<=66}},{key:"getCurrentOfferDisabled",get:function(){return"Chrome"===z.browserName&&z.browserMajorVersion<=69||"Firefox"===z.browserName&&z.browserMajorVersion<=56}},{key:"onTrackDisabled",get:function(){return"Chrome"===z.browserName&&z.browserMajorVersion<=63||"Firefox"===z.browserName&&z.browserMajorVersion<=52}},{key:"webkitRTCPeerConnectionEnabled",get:function(){return"Chrome"===z.browserName&&z.browserMajorVersion<=55}},{key:"promiseBasedPCMethodsDisabled",get:function(){return"Firefox"===z.browserName&&z.browserMajorVersion<=52}},{key:"shouldUseNativeHls",get:function(){return"Safari"===z.browserName||"SamsungBrowser"===z.browserName}},{key:"isRTMPEnabled",get:function(){return"Firefox"===z.browserName&&z.browserMajorVersion<84||"Chrome"===z.browserName&&z.browserMajorVersion<70||"Edge"===z.browserName||"IE"===z.browserName}},{key:"isPrecachingEnabled",get:function(){return"IE"!==z.browserName}}]),e}(),H=n(202).default,W=function(){function e(t){o()(this,e),c()(this,"_logger",E.getLogger("VanillaPeerConnection")),c()(this,"_peerConnection",void 0),q.webkitRTCPeerConnectionEnabled?this._peerConnection=new webkitRTCPeerConnection(t):this._peerConnection=new RTCPeerConnection(t)}var t,n,r,i;return s()(e,[{key:"native",get:function(){return this._peerConnection}},{key:"currentLocalDescription",get:function(){return this._peerConnection.currentLocalDescription}},{key:"currentRemoteDescription",get:function(){return this._peerConnection.currentRemoteDescription}},{key:"iceConnectionState",get:function(){return this._peerConnection.iceConnectionState}},{key:"supportsGetConfiguration",get:function(){return"function"==typeof this._peerConnection.getConfiguration}},{key:"supportsSetConfiguration",get:function(){return"function"==typeof this._peerConnection.setConfiguration}},{key:"supportsAddTransceiver",get:function(){return!q.addTranceiverDisabled&&"function"==typeof this._peerConnection.addTransceiver}},{key:"createOffer",value:(i=y()(_().mark((function e(t){var n=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!q.promiseBasedPCMethodsDisabled){e.next=2;break}return e.abrupt("return",new H((function(e,r){return n._peerConnection.createOffer(e,r,t)})));case 2:return e.abrupt("return",this._peerConnection.createOffer(t));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"createAnswer",value:(r=y()(_().mark((function e(t){var n=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!q.promiseBasedPCMethodsDisabled){e.next=2;break}return e.abrupt("return",new H((function(e,r){return n._peerConnection.createAnswer(e,r,t)})));case 2:return e.abrupt("return",this._peerConnection.createAnswer(t));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"setLocalDescription",value:(n=y()(_().mark((function e(t){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._peerConnection.setLocalDescription(q.promiseBasedPCMethodsDisabled?new RTCSessionDescription(t):t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"setRemoteDescription",value:(t=y()(_().mark((function e(t){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(null===(n=t.sdp)||void 0===n?void 0:n.match(/a=crypto:/i))&&this._logger.warn("SDP a=crypto is not supported"),e.abrupt("return",this._peerConnection.setRemoteDescription(q.promiseBasedPCMethodsDisabled?new RTCSessionDescription(t):t));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getStats",value:function(e){return this._peerConnection.getStats(e)}},{key:"getStatsLegacy",value:function(){var e=this;return new H((function(t){e._peerConnection.getStats(t)}))}},{key:"addEventListener",value:function(e,t,n){this._peerConnection.addEventListener(e,t,n)}},{key:"removeEventListener",value:function(e,t,n){this._peerConnection.removeEventListener(e,t,n)}},{key:"addTransceiver",value:function(e,t){return this._peerConnection.addTransceiver(e,t)}},{key:"addStream",value:function(e){var t=this;e.getTracks().forEach((function(e){t._peerConnection.addTrack(e)}))}},{key:"getConfiguration",value:function(){return this._peerConnection.getConfiguration()}},{key:"setConfiguration",value:function(e){this._peerConnection.setConfiguration(e)}},{key:"ontrack",get:function(){return this._peerConnection.ontrack},set:function(e){this._peerConnection.ontrack=e}},{key:"onicecandidate",get:function(){return this._peerConnection.onicecandidate},set:function(e){this._peerConnection.onicecandidate=e}},{key:"oniceconnectionstatechange",get:function(){return this._peerConnection.oniceconnectionstatechange},set:function(e){this._peerConnection.oniceconnectionstatechange=e}},{key:"close",value:function(){this._peerConnection.close()}}]),e}(),J=W,K=function(){function e(){o()(this,e)}var t;return s()(e,[{key:"createPeerConnection",value:(t=y()(_().mark((function e(t){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new J(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),Y=K,$=(n(6755),"DIGEST:"),X=function(){function e(){o()(this,e)}return s()(e,null,[{key:"parseToken",value:function(t){if(this.isValidToken(t))try{var n=atob(t.substr($.length)),r=JSON.parse(n);return r.token=JSON.parse(r.token),r}catch(t){return void e._logger.error("Cannot parse token value",t)}else e._logger.error("Token is not valid [%s]",t)}},{key:"getUri",value:function(e){return e&&e.token&&e.token.uri?new URL(e.token.uri):null}},{key:"getTenancy",value:function(e){return e&&e.applicationId?e.applicationId:""}},{key:"isValidToken",value:function(e){return!!e&&e.startsWith($)}}]),e}();c()(X,"_logger",E.getLogger("EdgeAuth")),n(2564);var Z,Q=n(8),ee=n.n(Q),te=function(){function e(){o()(this,e),c()(this,"_list",[])}return s()(e,[{key:"add",value:function(e){this._list.push(e)}},{key:"dispose",value:function(){this._list.forEach((function(e){return e.dispose()})),this._list.length=0}},{key:"toString",value:function(){return"DisposableList[disposables=".concat(this._list.length,"]")}}]),e}(),ne=function(){function e(){o()(this,e),c()(this,"_disposables",new te),c()(this,"_readOnlyIsForeground",void 0),c()(this,"_isForeground",void 0),c()(this,"_timeOfLastTabFocusChange",Date.now()),c()(this,"_documentFocusInterval",void 0),this._isForeground=new B(!0),this._readOnlyIsForeground=new G(this._isForeground),this.detectTabFocusChange()}return s()(e,[{key:"isForeground",get:function(){return this._readOnlyIsForeground}},{key:"getTimeSinceLastChange",value:function(){return Date.now()-this._timeOfLastTabFocusChange}},{key:"dispose",value:function(){this._disposables.dispose()}},{key:"detectTabFocusChange",value:function(){var e,t,n=this;if("object"===("undefined"==typeof document?"undefined":ee()(document))){void 0!==document.msHidden?(e="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden?(e="webkitHidden",t="webkitvisibilitychange"):void 0!==document.hidden&&(e="hidden",t="visibilitychange");var r=function(){var t=!document[e];n.setFocusState(t)};void 0!==document.addEventListener&&void 0!==document[e]?(document.addEventListener(t,r,!1),this._disposables.add(new N((function(){document.removeEventListener(t,r,!1)})))):this.listenForDocumentFocus.call(this)}}},{key:"listenForDocumentFocus",value:function(){var e=this;this._documentFocusInterval=window.setInterval((function(){var t=document.hasFocus();e.setFocusState(t)}),3e3),this._disposables.add(new N((function(){e._documentFocusInterval&&clearInterval(e._documentFocusInterval),e._documentFocusInterval=null})))}},{key:"setFocusState",value:function(e){this._isForeground!==e&&(this._isForeground.value=e)}}]),e}(),re=(n(9600),n(7852),function(){function e(){o()(this,e)}return s()(e,null,[{key:"getTelemetryUrl",value:function(e){try{var t=new URL(e),n=t.hostname.split(".");switch(t.protocol){case"ws:":t.protocol="http:";break;case"wss:":t.protocol="https:"}return 2===n.length||3===n.length&&n[n.length-2].length<=2&&n[n.length-1].length<=3?n.unshift("telemetry"):n[0].startsWith("stg-")||n[0].endsWith("-stg")||n[0].includes("-stg-")||"stg"===n[0]?n[0]="telemetry-stg":n[0].startsWith("local")||n[0].endsWith("-local")||(n[0]="telemetry"),t.hostname=n.join("."),"".concat(t.origin,"/telemetry")}catch(t){return e}}}]),e}()),ie=function(){function e(){o()(this,e)}return s()(e,null,[{key:"getEnvironmentFromUrl",value:function(e){try{return new URL(e).origin}catch(e){return""}}}]),e}(),oe=function(){function e(){throw o()(this,e),new Error("DiscoveryUri is a static class that may not be instantiated")}return s()(e,null,[{key:"uri",get:function(){return e._discoveryUri}},{key:"buildDiscoveryUrl",value:function(e){var t=new URL(e.toString()),n=b.sdkVersion;return t.search="?".concat(new URLSearchParams([["version",n],["_","".concat(Date.now())]]).toString()),"/"===t.pathname&&(t.pathname="/pcast/endPoints"),t.toString()}}]),e}();c()(oe,"_discoveryUri",new B("https://pcast.phenixrts.com/pcast/endPoints")),function(e){e[e.TimeToFirstFrame=0]="TimeToFirstFrame",e[e.ChannelCreationTimeToFirstFrame=1]="ChannelCreationTimeToFirstFrame",e[e.Stalled=2]="Stalled",e[e.Buffering=3]="Buffering",e[e.SetupCompleted=4]="SetupCompleted",e[e.SetupFailed=5]="SetupFailed",e[e.RoundTripTime=6]="RoundTripTime",e[e.DownlinkThroughputCapacity=7]="DownlinkThroughputCapacity",e[e.NetworkType=8]="NetworkType",e[e.ResolutionChanged=9]="ResolutionChanged",e[e.ApplicationForeground=10]="ApplicationForeground",e[e.ApplicationBackground=11]="ApplicationBackground"}(Z||(Z={}));var ae=Z,se=function(){function e(t){o()(this,e),c()(this,"_metrics",void 0),this._metrics=t}return s()(e,[{key:"getName",value:function(){return ae[this._metrics]}},{key:"getTelemetryLevel",value:function(){switch(this._metrics){case ae.TimeToFirstFrame:case ae.ChannelCreationTimeToFirstFrame:return w.Essential;case ae.Stalled:case ae.Buffering:case ae.SetupCompleted:case ae.SetupFailed:case ae.RoundTripTime:case ae.DownlinkThroughputCapacity:case ae.NetworkType:case ae.ResolutionChanged:case ae.ApplicationForeground:case ae.ApplicationBackground:return w.All;default:R(this._metrics)}}}]),e}(),ue=function(){function e(t){o()(this,e),c()(this,"_metricsConfiguration",void 0),c()(this,"_metrics",[]),c()(this,"_isSending",void 0),c()(this,"_domain",location.hostname),this._metricsConfiguration=t}var t,n;return s()(e,[{key:"metricsConfiguration",get:function(){return this._metricsConfiguration}},{key:"push",value:function(e){var t=e.streamId,n=e.value,r=e.previousValue,i=e.runtime,o=e.resource,a=e.kind,s=new se(e.metricType);if(!(this._metricsConfiguration.threshold>s.getTelemetryLevel())){var u={timestamp:(new Date).toISOString(),tenancy:this._metricsConfiguration.tenancy,sessionId:this._metricsConfiguration.sessionId,streamId:t,metric:s.getName(),value:n,previousValue:r,fullQualifiedName:this._domain,environment:this._metricsConfiguration.environment,version:b.sdkVersion,runtime:i,resource:o,kind:a};this._metrics.push(u),this.sendMetricsIfAble()}}},{key:"sendMetrics",value:(n=y()(_().mark((function e(t){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new FormData).append("jsonBody",JSON.stringify({records:t})),e.next=4,fetch(this._metricsConfiguration.url,{method:"POST",body:n});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"sendMetricsIfAble",value:(t=y()(_().mark((function e(){var t,n=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._metrics.length<=0||this._isSending)){e.next=2;break}return e.abrupt("return");case 2:return this._isSending=!0,t=this._metrics.slice(0,1024),this._metrics=this._metrics.slice(1024),e.abrupt("return",this.sendMetrics(t).then((function(e){return n._isSending=!1,n.sendMetricsIfAble(),e})).catch((function(){n._isSending=!1,n.sendMetricsIfAble()})));case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),ce=function(){function e(){throw o()(this,e),new Error("LoggerFactory is a static class that may not be instantiated")}return s()(e,null,[{key:"getMetricsService",value:function(t){if("string"!=typeof t)throw new Error("ur");var n=e._metricsServices[t];if(n)return n;var r=new T;return r.sessionId=he.clientSessionId,r.tenancy=he.tenancy.value,r.url=re.getTelemetryUrl(t),r.environment=ie.getEnvironmentFromUrl(t),r.threshold=L.convertTelemetryLevelTypeToTelemetryLevel(he.telemetryLevel),e._metricsServices[t]=new ue(r)}},{key:"setTelemetryLevel",value:function(t){var n=Object.values(e._metricsServices);n&&n.length&&n.forEach((function(e){e.metricsConfiguration.threshold=t}))}}]),e}();c()(ce,"_metricsServices",{});var le,fe=window.__phenixPageLoadTime||window.__pageLoadTime||Date.now(),he=function(){function e(){throw o()(this,e),new Error("SDK is a static class that may not be instantiated")}return s()(e,null,[{key:"pageLoadTime",get:function(){return fe}},{key:"sendLocalCandidates",get:function(){return this._sendLocalCandidates}},{key:"tenancy",get:function(){return this._tenancy}},{key:"clientSessionId",get:function(){return e._clientSessionId}},{key:"loadedTimestamp",get:function(){return e._loadedTimestamp}},{key:"initialized",get:function(){return e._readOnlyInitialized}},{key:"discoveryUri",get:function(){return e._readOnlyDiscoveryUri}},{key:"peerConnectionFactory",get:function(){return e._readOnlyPeerConnectionFactory}},{key:"automaticRetryOnFailure",get:function(){return e._automaticallyRetryOnFailure}},{key:"automaticallyReconnectPeerConnection",get:function(){return e._automaticallyReconnectPeerConnection}},{key:"automaticallyPlayMediaStream",get:function(){return e._automaticallyPlayMediaStream}},{key:"automaticallyMuteVideoOnPlayFailure",get:function(){return e._automaticallyMuteVideoOnPlayFailure}},{key:"webPlayerLoader",get:function(){return this._webPlayerLoader}},{key:"shakaPlayerLoader",get:function(){return this._shakaPlayerLoader}},{key:"hlsJsLoader",get:function(){return this._hlsJsLoader}},{key:"metricsService",get:function(){return e._metricsService}},{key:"applicationActivityMonitor",get:function(){return this._applicationActivityMonitor}},{key:"telemetryUrl",get:function(){return this._telemetryUrl}},{key:"maximalNumberOfPeerConnectionReconnectAttempts",get:function(){return this._maximalNumberOfPeerConnectionReconnectAttempts},set:function(e){this._maximalNumberOfPeerConnectionReconnectAttempts=e}},{key:"loggingLevel",get:function(){return P.convertLoggingLevelToLoggingLevelType(this._logger.threshold.value)}},{key:"telemetryLevel",get:function(){return L.convertTelemetryLevelToTelemetryLevelType(e._telemetryLevel.value)}},{key:"browserDetector",get:function(){return z}},{key:"applyTelemetryConfiguration",value:function(){var t=this,n=E.telemetryConfiguration;n.sessionId=e.clientSessionId,e._environment.subscribe((function(e){n.environment=e})),e.telemetryUrl.subscribe((function(e){var r=t._logger.appenders.value.find((function(e){return e instanceof S}));r&&(n.url=e,t._logger.appenders.remove(r),t._logger.appenders.add(new S(n)),t._logger.info("Telemetry URL was set to [%s]",n.url))})),e._tenancy.subscribe((function(e){var r=t._logger.appenders.value.find((function(e){return e instanceof S}));r&&e&&(n.tenancy=e,t._logger.appenders.remove(r),t._logger.appenders.add(new S(n)),t._logger.info("Telemetry tenancy was set to [%s]",n.tenancy))}))}},{key:"applyMetricsConfiguration",value:function(){e._metricsService=ce.getMetricsService(oe.uri.value),e._metricsConfiguration=e._metricsService.metricsConfiguration,e._metricsConfiguration.sessionId=e.clientSessionId,e._environment.subscribe((function(t){e._metricsConfiguration.environment=t})),e.telemetryUrl.subscribe((function(t){e._metricsConfiguration.url=t})),e._tenancy.subscribe((function(t){e._metricsConfiguration.tenancy=t}));var t=this._configurationParameterReader.getStringValue("phenix-metrics-level");t&&ce.setTelemetryLevel(w[t]),e._telemetryLevel.subscribe((function(e){ce.setTelemetryLevel(e)}))}},{key:"applyAutomaticallyRetryOnFailureFromParameterConfiguration",value:function(){this._automaticallyRetryOnFailure=this._configurationParameterReader.getBooleanValue("phenix-automatically-retry-on-failure"),this._logger.info("Automatically retry on failure is set to: [%s]",this._automaticallyRetryOnFailure)}},{key:"applyAutomaticallyReconnectPeerConnectionFromParameterConfiguration",value:function(){this._automaticallyReconnectPeerConnection=this._configurationParameterReader.getBooleanValue("phenix-automatically-reconnect-peer-connection"),this._logger.info("Automatically reconnect peer connection is set to: [%s]",this._automaticallyReconnectPeerConnection)}},{key:"applyDiscoveryUriDefaultFromParameterConfiguration",value:function(){e.discoveryUri.subscribe((function(t){e.telemetryUrl.value=e.getTelemetryUrl(t),e._environment.value=ie.getEnvironmentFromUrl(t)}));var t=this._configurationParameterReader.getStringValue("phenix-channel-token");if(t){var n=X.parseToken(t);return e._tenancy.value=X.getTenancy(n),oe.uri.value=(X.getUri(n)||e.discoveryUri.value).toString(),void this._logger.info("Discovery URI set from configuration parameter to [%s]",e.discoveryUri.value)}var r=this._configurationParameterReader.getStringValue("phenix-uri");if(r)return oe.uri.value=r,void this._logger.info('Discovery URI set from "phenix-uri" configuration parameter tag to [%s]',e.discoveryUri.value);var i=this._configurationParameterReader.getStringValue("phenix-base-uri");return i?(oe.uri.value="".concat(i,"/pcast/endPoints"),void this._logger.info('Discovery URI set from "phenix-base-uri" configuration parameter tag to [%s]',e.discoveryUri.value)):void 0}},{key:"init",value:function(t){if(this._initialized.value||(this._applicationActivityMonitor=new ne),t){if(t.discoveryUri&&(oe.uri.value=t.discoveryUri),t.peerConnectionFactory&&(e._peerConnectionFactory.value=t.peerConnectionFactory),t.telemetryLevel&&w[t.telemetryLevel]&&(e._telemetryLevel.value=L.convertTelemetryLevelTypeToTelemetryLevel(t.telemetryLevel)),t.loggingLevel&&r[t.loggingLevel]&&this._logger.threshold.setThreshold(P.convertLoggingLevelTypeToLoggingLevel(t.loggingLevel)),t.consoleLoggingLevel&&r[t.consoleLoggingLevel]){var n=this._logger.appenders.value.find((function(e){return e instanceof v}));n&&this._logger.appenders.remove(n),"Off"!==t.consoleLoggingLevel&&this._logger.appenders.add(new v(P.convertLoggingLevelTypeToLoggingLevel(t.consoleLoggingLevel)))}"boolean"==typeof t.automaticallyPlayMediaStream&&(this._automaticallyPlayMediaStream=t.automaticallyPlayMediaStream),"boolean"==typeof t.automaticallyMuteVideoOnPlayFailure&&(this._automaticallyMuteVideoOnPlayFailure=t.automaticallyMuteVideoOnPlayFailure),t.webPlayerLoader&&(this._webPlayerLoader=t.webPlayerLoader),t.shakaPlayerLoader&&(this._shakaPlayerLoader=t.shakaPlayerLoader),t.hlsJsLoader&&(this._hlsJsLoader=t.hlsJsLoader)}e._initialized.value=!0}},{key:"dispose",value:function(){e._initialized.value=!1,this._applicationActivityMonitor.dispose(),this._applicationActivityMonitor=null}},{key:"getTelemetryUrl",value:function(e){return re.getTelemetryUrl(e)}}]),e}();c()(he,"_automaticallyRetryOnFailure",!0),c()(he,"_automaticallyReconnectPeerConnection",!0),c()(he,"_automaticallyPlayMediaStream",!0),c()(he,"_automaticallyMuteVideoOnPlayFailure",!0),c()(he,"_webPlayerLoader",null),c()(he,"_shakaPlayerLoader",null),c()(he,"_hlsJsLoader",null),c()(he,"_configurationParameterReader",new O),c()(he,"_applicationActivityMonitor",void 0),c()(he,"_environment",new B("")),c()(he,"_telemetryUrl",new B("https://telemetry.phenixrts.com/telemetry")),c()(he,"_maximalNumberOfPeerConnectionReconnectAttempts",8),c()(he,"_telemetryLevel",new B(C.defaultTelemetryLevel)),c()(he,"_metricsService",void 0),c()(he,"_metricsConfiguration",void 0),c()(he,"_sendLocalCandidates",new B(!h.isPrivate)),c()(he,"_tenancy",new B("")),c()(he,"_clientSessionId",A.random(32)),c()(he,"_loadedTimestamp",new Date),c()(he,"_logger",E.getLogger("SDK")),c()(he,"_initialized",new B(!1)),c()(he,"_peerConnectionFactory",new B(new Y)),c()(he,"_readOnlyInitialized",new G(he._initialized)),c()(he,"_readOnlyDiscoveryUri",new G(oe.uri)),c()(he,"_readOnlyPeerConnectionFactory",new G(he._peerConnectionFactory)),window.addEventListener("unload",(function(){he.dispose()})),he.applyDiscoveryUriDefaultFromParameterConfiguration(),he.applyMetricsConfiguration(),he.applyTelemetryConfiguration(),he.applyAutomaticallyRetryOnFailureFromParameterConfiguration(),he.applyAutomaticallyReconnectPeerConnectionFromParameterConfiguration(),he.init(),n(8309),n(7727),function(e){e[e.Offline=1]="Offline",e[e.Starting=2]="Starting",e[e.Publishing=3]="Publishing",e[e.Recovering=4]="Recovering",e[e.Reconnecting=5]="Reconnecting",e[e.StandBy=6]="StandBy",e[e.Stopped=7]="Stopped",e[e.Unauthorized=8]="Unauthorized",e[e.GeoRestricted=9]="GeoRestricted",e[e.GeoBlocked=10]="GeoBlocked",e[e.UnsupportedFeature=11]="UnsupportedFeature",e[e.Error=12]="Error"}(le||(le={}));var pe=le,de=(n(3112),n(2481),function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;o()(this,e),c()(this,"_duration",void 0),this._duration=t}return s()(e,[{key:"toIsoString",value:function(){if(0===this._duration)return"P0S";var e=this._duration<0,t=e?Math.abs(this._duration):this._duration,n=Math.floor(t),r=n%1e3,i=(n=Math.floor(n/1e3))%60,o=(n=Math.floor(n/60))%60,a=(n=Math.floor(n/60))%24,s=["PT"];return e&&s.unshift("-"),a&&s.push(a+"H"),o&&s.push(o+"M"),(i||r)&&(s.push(String(i)),r&&s.push("."+this.padStart(r.toString(),3,"0")),s.push("S")),s.join("")}},{key:"padStart",value:function(e,t,n){return t>>=0,n=String(void 0!==n?n:" "),e.length>t?e:((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),n.slice(0,t)+e)}}]),e}()),ve=function(){function e(t){o()(this,e),c()(this,"_logger",E.getLogger("StreamSetupListener")),c()(this,"metricsService",he.metricsService),c()(this,"_pageLoadTime",void 0),c()(this,"_startTime",void 0),c()(this,"_metricSubmitted",!1),this._startTime=Date.now(),this._pageLoadTime=t}return s()(e,[{key:"success",value:function(e){this.recordStreamMetric(ae.SetupCompleted,e)}},{key:"fail",value:function(){this.recordStreamMetric(ae.SetupFailed)}},{key:"recordStreamMetric",value:function(e,t){if(!this._metricSubmitted){this._metricSubmitted=!0;var n=Date.now(),r=n-this._startTime,i=new se(e).getName();this.metricsService.push({metricType:e,runtime:(n-this._pageLoadTime)/1e3,value:{uint64:r},streamId:t}),this._logger.info("[%s] [%s] Stream metric [%s] in [%s]",new de(n-this._pageLoadTime).toIsoString(),t,i,new de(r).toIsoString())}}}]),e}(),ge=function(){function e(){o()(this,e),c()(this,"_disposables",new te),c()(this,"_isSupported",navigator&&navigator.connection),c()(this,"_rtt",new B(void 0)),c()(this,"_effectiveType",new B(void 0)),c()(this,"_downlinkThroughputCapacity",new B(void 0)),this.isSupported&&(this.setupNetworkChangeListeners(),this.updateStatistics())}return s()(e,[{key:"isSupported",get:function(){return this._isSupported}},{key:"rtt",get:function(){return this._rtt}},{key:"effectiveType",get:function(){return this._effectiveType}},{key:"downlinkThroughputCapacity",get:function(){return this._downlinkThroughputCapacity}},{key:"dispose",value:function(){this._disposables.dispose()}},{key:"getDownlinkThroughputCapacity",value:function(){return this.isSupported?navigator.connection.downlink||navigator.connection.downlinkMax:-1}},{key:"getEffectiveType",value:function(){return this.isSupported?navigator.connection.effectiveType||navigator.connection.type:"Unknown"}},{key:"getRoundTripTime",value:function(){return navigator.connection.rtt}},{key:"setupNetworkChangeListeners",value:function(){var e=this,t=function(){e.updateStatistics()};navigator.connection.addEventListener("change",t),this._disposables.add(new N((function(){navigator.connection.removeEventListener("change",t)})))}},{key:"updateStatistics",value:function(){this._rtt.value=this.getRoundTripTime(),this._effectiveType.value=this.getEffectiveType(),this._downlinkThroughputCapacity.value=this.getDownlinkThroughputCapacity()}}]),e}(),ye=function(){function e(t,n){var r=this;o()(this,e),c()(this,"_logger",E.getLogger("SessionTelemetry")),c()(this,"_metricsService",void 0),c()(this,"_applicationActivityMonitor",he.applicationActivityMonitor),c()(this,"_networkMonitor",new ge),c()(this,"_pageLoadTime",void 0),c()(this,"_disposables",new te),c()(this,"_lastNetworkStatistics",{}),this._pageLoadTime=t,this._disposables.add(this._networkMonitor),this._metricsService=n,this._networkMonitor.isSupported&&(this._disposables.add(this._applicationActivityMonitor.isForeground.subscribe((function(e){r.recordForegroundChange(e)}))),this._disposables.add(this._networkMonitor.rtt.subscribe((function(e){r.recordNetworkRTTUpdate(e)}))),this._disposables.add(this._networkMonitor.effectiveType.subscribe((function(e){r.recordNetworkTypeChangeUpdate(e)}))),this._disposables.add(this._networkMonitor.downlinkThroughputCapacity.subscribe((function(e){r.recordNetworkDownlinkThroughputCapacityUpdate(e)}))))}return s()(e,[{key:"listenOnStreamSetup",value:function(){return new ve(this._pageLoadTime)}},{key:"dispose",value:function(){this._disposables.dispose()}},{key:"recordForegroundChange",value:function(e){var t=Date.now(),n=this._applicationActivityMonitor.getTimeSinceLastChange();this._metricsService.push({metricType:e?ae.ApplicationForeground:ae.ApplicationBackground,runtime:(t-this._pageLoadTime)/1e3,value:{uint64:n}}),this._logger.info("Application has gone into the [%s] after [%s] ms",e?"foreground":"background",new de(n).toIsoString())}},{key:"recordNetworkRTTUpdate",value:function(e){var t=Date.now(),n=this._lastNetworkStatistics.rtt;this._lastNetworkStatistics.rtt=e,this._metricsService.push({metricType:ae.RoundTripTime,runtime:(t-this._pageLoadTime)/1e3,value:{uint64:e},previousValue:n?{uint64:n}:void 0,resource:"navigator"}),this._logger.info("[%s] Network RTT changed to [%s] from [%s]",new de(t-this._pageLoadTime).toIsoString(),e,n)}},{key:"recordNetworkTypeChangeUpdate",value:function(e){var t=Date.now(),n=this._lastNetworkStatistics.effectiveType;this._lastNetworkStatistics.effectiveType=e,this._metricsService.push({metricType:ae.NetworkType,runtime:(t-this._pageLoadTime)/1e3,value:{string:e},previousValue:n?{string:n}:void 0}),this._logger.info("[%s] Network effective type has changed to [%s] from [%s]",new de(t-this._pageLoadTime).toIsoString(),e,n)}},{key:"recordNetworkDownlinkThroughputCapacityUpdate",value:function(e){var t=Date.now(),n=this._lastNetworkStatistics.downlinkThroughputCapacity;this._lastNetworkStatistics.downlinkThroughputCapacity=e,this._metricsService.push({metricType:ae.DownlinkThroughputCapacity,runtime:(t-this._pageLoadTime)/1e3,value:{float:e},previousValue:n?{float:n}:void 0}),this._logger.info("[%s] Network downlink throughput capacity changed to [%s] from [%s]",new de(t-this._pageLoadTime).toIsoString(),e,n)}}]),e}(),me=function(){function e(t,n){o()(this,e),c()(this,"width",void 0),c()(this,"height",void 0),this.width=t,this.height=n}return s()(e,[{key:"equals",value:function(e){return e&&this.width===e.width&&this.height===e.height}},{key:"toString",value:function(){return"".concat(this.width,"x").concat(this.height)}}],[{key:"empty",get:function(){return new e(0,0)}}]),e}(),_e=function(){function e(t,n){o()(this,e),c()(this,"publisherInitialization",void 0),c()(this,"disposables",void 0),c()(this,"publisherDisposables",void 0),c()(this,"token",void 0),c()(this,"peerConnection",void 0),c()(this,"mediaStream",void 0),c()(this,"state",void 0),c()(this,"tokenExpiring",void 0),c()(this,"authorized",void 0),c()(this,"online",void 0),c()(this,"loading",void 0),c()(this,"publishing",void 0),c()(this,"standby",void 0),c()(this,"stopped",void 0),c()(this,"bitrateLimit",void 0),c()(this,"resolution",void 0),c()(this,"failureCount",void 0),c()(this,"endPoint",void 0),c()(this,"stream",void 0),c()(this,"rtcStatistics",void 0),c()(this,"peerConnectionReconnectAttempts",void 0),c()(this,"isStarting",void 0),c()(this,"isDisposed",void 0),c()(this,"sessionTelemetry",void 0),c()(this,"clearFailureCountTimeout",void 0),c()(this,"name",void 0),this.isDisposed=!1,this.isStarting=new B(!1),this.disposables=new te,this.publisherDisposables=new te,this.publisherInitialization=new Date,this.token=new B(t),this.peerConnection=new B(null),this.mediaStream=new B(null),this.state=new B(pe.Starting),this.tokenExpiring=new B(!1),this.authorized=new B(!0),this.online=new B(!0),this.loading=new B(!1),this.publishing=new B(!1),this.standby=new B(!1),this.stopped=new B(!1),this.bitrateLimit=new B(0),this.resolution=new B(me.empty),this.failureCount=new B(0),this.endPoint=new B(null),this.stream=new B(null),this.rtcStatistics=new B(null),this.peerConnectionReconnectAttempts=0,this.name=n&&n.length?n:this.generateScreenName()}return s()(e,[{key:"streamId",get:function(){var e=this.stream.value;return e?e.streamId:"-"}},{key:"applyStatus",value:function(e){switch(e){case"ok":break;case"unauthorized":case"geo-restricted":case"geo-blocked":this.authorized.value=!1;case"no-stream":case"not-found":return this.failureCount.value=0,this.publishing.value=!1,this.standby.value=!0,this.stopped.value=!1,void(this.stream.value=null);default:return this.failureCount.value++,this.publishing.value=!1,this.standby.value=!0,this.stopped.value=!1,this.stream.value=null,void(this.state.value=pe.Error)}}},{key:"mapPublishStatusToPublisherStatus",value:function(e){switch(e){case"ok":return pe.Starting;case"no-stream":case"not-found":return pe.StandBy;case"geo-restricted":return pe.GeoRestricted;case"geo-blocked":return pe.GeoBlocked;case"unauthorized":return pe.Unauthorized;case"capacity":case"rate-limited":case"timeout":return pe.Recovering;case"failed":return pe.Error;default:R(e)}}},{key:"generateScreenName",value:function(){return A.random(12)}}]),e}(),be=n(3038),we=n.n(be),xe=function(){function e(){throw o()(this,e),new Error("PeerConnectionService is a static class that may not be instantiated")}var t,n;return s()(e,null,[{key:"initiateInitialPrecaching",value:function(){q.isPrecachingEnabled&&e.precacheCreatePeerConnectionOffer().catch((function(t){return e._logger.error('Failed to pre-cache peer connection offer"',t)}))}},{key:"precacheCreatePeerConnectionOffer",value:(n=y()(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e._cached={direction:"recvonly",peerConnection:e.createPeerConnectionOffer().catch((function(t){throw e._cached=null,t}))});case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"createPeerConnectionOffer",value:(t=y()(_().mark((function t(){var n,r,i,o=arguments;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=o.length>0&&void 0!==o[0]?o[0]:"recvonly",!e._cached||e._cached.direction!==n){t.next=5;break}return r=e._cached.peerConnection,e._cached=null,t.abrupt("return",r);case 5:return i=he.peerConnectionFactory.value,t.abrupt("return",i.createPeerConnection().then(function(){var e=y()(_().mark((function e(t){var r,i,o;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.supportsAddTransceiver){e.next=11;break}return i=t.addTransceiver("audio",{direction:n}),r=t.addTransceiver("video",{direction:n}),e.t0=i,e.t1=r,e.t2=t,e.next=9,t.createOffer(void 0);case 9:return e.t3=e.sent,e.abrupt("return",{audioTransceiver:e.t0,videoTransceiver:e.t1,peerConnection:e.t2,localOffer:e.t3});case 11:return o="recvonly"===n?{offerToReceiveAudio:!0,offerToReceiveVideo:!0}:{},e.t4=t,e.next=15,t.createOffer(o);case 15:return e.t5=e.sent,e.abrupt("return",{peerConnection:e.t4,localOffer:e.t5});case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 7:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();c()(xe,"_logger",E.getLogger("PeerConnectionService")),c()(xe,"_cached",void 0),xe.initiateInitialPrecaching(),n(1249);var Se,ke,Te=n(319),Ce=n.n(Te);!function(e){e[e.Keep=0]="Keep",e[e.Reset=1]="Reset"}(Se||(Se={})),function(e){e[e.Normal=0]="Normal",e[e.Force=1]="Force",e[e.Reset=2]="Reset"}(ke||(ke={}));var Re=function(){function e(){o()(this,e)}return s()(e,null,[{key:"convertBitrateModeToBitrateModeType",value:function(e){switch(e){case ke.Normal:return"Normal";case ke.Force:return"Force";case ke.Reset:return"Reset";default:R(e)}}}]),e}(),Le=function(){function e(){o()(this,e)}return s()(e,null,[{key:"convertBitrateStateToBitrateStateType",value:function(e){switch(e){case Se.Keep:return"Keep";case Se.Reset:return"Reset";default:R(e)}}}]),e}(),Pe=n(202).default,Oe=function(){function e(t,n){if(o()(this,e),c()(this,"_logger",E.getLogger("EndPoint")),c()(this,"_uri",void 0),c()(this,"_timeout",void 0),c()(this,"_roundTripTime",void 0),this._uri=t,this._timeout=n,!n)throw new Error("End point requires a timeout")}var t,n,r,i,a,u,l,f,h,p,d,v;return s()(e,[{key:"roundTripTime",get:function(){return this._roundTripTime}},{key:"toString",value:function(){return"EndPoint[uri=".concat(this._uri,"]")}},{key:"ping",value:(v=y()(_().mark((function e(){var t,n,r,i,o=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.buildPingUrl(),n=Date.now(),e.next=4,Pe.race([fetch(t,{method:"GET",cache:"no-cache"}),new Pe((function(e,n){return setTimeout((function(){return n(new Error("Ping timed out [".concat(t,"]")))}),o._timeout)}))]);case 4:if(r=e.sent,i=Date.now(),r.ok){e.next=8;break}throw new Error("Ping failed [".concat(t,"] [").concat(r.status,"]"));case 8:return this._roundTripTime=i-n,e.abrupt("return",this._roundTripTime);case 10:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"subscribe",value:(d=y()(_().mark((function e(t,n,r){var i,o,a,s,u,c,l,f,h,p,d,v,g,y=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=X.parseToken(t))&&i.applicationId){e.next=4;break}return this._logger.error("Failed to parse token [%s]",t),e.abrupt("return",{status:"unauthorized"});case 4:return o=i.applicationId,a=this.buildUrl([o,"stream","subscribe"]).toString(),s=new FormData,u=b.sdkVersion,0===r&&n?(c={apiVersion:6,clientVersion:u,edgeAuthToken:t,failureCount:r,httpRoundTripTime:this._roundTripTime,setRemoteDescription:{apiVersion:6,sessionDescription:{type:this.convertRTCSdpTypeToSdpType(n.type),sdp:n.sdp}},createAnswerDescription:{apiVersion:6}},s.append("jsonBody",JSON.stringify(c))):(l={apiVersion:6,clientVersion:u,edgeAuthToken:t,failureCount:r,httpRoundTripTime:this._roundTripTime,createOfferDescription:{apiVersion:6}},s.append("jsonBody",JSON.stringify(l))),f=Date.now(),e.prev=10,p=null,e.next=14,Pe.race([fetch(a,{method:"POST",body:s}),new Pe((function(e){return p=window.setTimeout((function(){y._logger.error("Failed to subscribe",new Error("Subscribe timed out [".concat(a,"]"))),e({status:408})}),y._timeout)}))]).finally((function(){p&&clearTimeout(p)}));case 14:h=e.sent,e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(10),this._logger.error("Failed to subscribe",e.t0),e.abrupt("return",{status:"failed"});case 21:if("ok"===(d=this.mapHttpStatusToSubscribeStatus(h))){e.next=24;break}return e.abrupt("return",{status:d});case 24:return v=Date.now(),e.next=27,this.convertHttpResponseToSubscribeResponse(o,h);case 27:return g=e.sent,this._logger.debug("Got subscribe response [%j] in [%s] ms",g,v-f),e.abrupt("return",g);case 30:case"end":return e.stop()}}),e,this,[[10,17]])}))),function(e,t,n){return d.apply(this,arguments)})},{key:"publish",value:(p=y()(_().mark((function e(t,n,r,i){var o,a,s,u,c,l,f,h,p,d,v,g,y,m=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((o=X.parseToken(n))&&o.applicationId){e.next=4;break}return this._logger.error("Failed to parse token [%s]",n),e.abrupt("return",{status:"unauthorized"});case 4:return a=o.applicationId,s=this.buildUrl([a,"stream","publish"]).toString(),u=new FormData,c=b.sdkVersion,0===i&&r?(l={apiVersion:6,clientVersion:c,edgeAuthToken:n,failureCount:i,httpRoundTripTime:this._roundTripTime,name:t,setRemoteDescription:{apiVersion:6,sessionDescription:{type:this.convertRTCSdpTypeToSdpType(r.type),sdp:r.sdp}},createAnswerDescription:{streamId:"",options:["upload"],apiVersion:6}},u.append("jsonBody",JSON.stringify(l))):(f={apiVersion:6,clientVersion:c,edgeAuthToken:n,failureCount:i,httpRoundTripTime:this._roundTripTime,name:t,createOfferDescription:{streamId:"",options:["upload"],apiVersion:6}},u.append("jsonBody",JSON.stringify(f))),h=Date.now(),e.prev=10,d=null,e.next=14,Pe.race([fetch(s,{method:"POST",body:u}),new Pe((function(e){return d=window.setTimeout((function(){m._logger.error("Failed to publish",new Error("Publish timed out [".concat(s,"]"))),e({status:408})}),m._timeout)}))]).finally((function(){d&&clearTimeout(d)}));case 14:p=e.sent,e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(10),this._logger.error("Failed to publish",e.t0),e.abrupt("return",{status:"failed"});case 21:if("ok"===(v=this.mapHttpStatusToPublishStatus(p))){e.next=24;break}return e.abrupt("return",{status:v});case 24:return g=Date.now(),e.next=27,this.convertHttpResponseToPublishResponse(a,p);case 27:return y=e.sent,this._logger.debug("Got publish response [%j] in [%s] ms",y,g-h),e.abrupt("return",y);case 30:case"end":return e.stop()}}),e,this,[[10,17]])}))),function(e,t,n,r){return p.apply(this,arguments)})},{key:"setRemoteDescription",value:(h=y()(_().mark((function e(t,n){var r,i,o,a,s,u,c,l,f,h=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.buildUrl([t.tenancy,"stream",t.streamId,"description","remote"]).toString(),i=new FormData,o={apiVersion:6,sharedSecret:t.sharedSecret,sessionDescription:{type:this.convertRTCSdpTypeToSdpType(n.type),sdp:n.sdp}},i.append("jsonBody",JSON.stringify(o)),a=Date.now(),e.prev=5,u=null,e.next=9,Pe.race([fetch(r,{method:"POST",body:i}),new Pe((function(e){return u=window.setTimeout((function(){h._logger.error("Failed to set remote description",new Error("Set remote description timed out [".concat(r,"]"))),e({status:408})}),h._timeout)}))]).finally((function(){u&&clearTimeout(u)}));case 9:s=e.sent,e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(5),this._logger.error("Failed to set remote description",e.t0),e.abrupt("return",{status:"failed"});case 16:if("ok"===(c=this.mapHttpStatusToSetRemoteDescriptionStatus(s))){e.next=19;break}return e.abrupt("return",{status:c});case 19:return l=Date.now(),e.next=22,this.convertHttpResponseToSetRemoteDescriptionResponse(s);case 22:return f=e.sent,this._logger.debug("Got set remote description response [%j] in [%s] ms",f,l-a),e.abrupt("return",f);case 25:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e,t){return h.apply(this,arguments)})},{key:"limitBitrate",value:(f=y()(_().mark((function e(t,n,r,i,o){var a,s,u,c,l,f,h,p,d=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.buildUrl([t.tenancy,"stream",t.streamId,"bitrate"]).toString(),s=new FormData,u={apiVersion:6,sharedSecret:t.sharedSecret,elapsedInMilliseconds:n,bitrateInBitsPerSecond:r,bitrateState:Le.convertBitrateStateToBitrateStateType(i),bitrateMode:Re.convertBitrateModeToBitrateModeType(o)},s.append("jsonBody",JSON.stringify(u)),c=Date.now(),e.prev=5,f=null,e.next=9,Pe.race([fetch(a,{method:"POST",body:s}),new Pe((function(e){return f=window.setTimeout((function(){d._logger.error("Failed to set limit bitrate timed",new Error("Set limit bitrate timed out [".concat(a,"]"))),e({status:408})}),d._timeout)}))]).finally((function(){f&&clearTimeout(f)}));case 9:l=e.sent,e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(5),this._logger.error("Failed to set limit bitrate timed",e.t0),e.abrupt("return",{status:"failed"});case 16:return h=this.mapHttpStatusToSetTemporaryMaximalBitrateStatus(l),p=Date.now(),this._logger.info("Got set limit bitrate response [%s] in [%s] ms",h,p-c),e.abrupt("return",{status:h});case 20:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e,t,n,r,i){return f.apply(this,arguments)})},{key:"addIceCandidates",value:(l=y()(_().mark((function e(t,n,r){var i,o,a,s,u,c,l,f,h,p,d=this,v=arguments;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=v.length>3&&void 0!==v[3]?v[3]:[],o=this.buildUrl([t.tenancy,"stream",t.streamId,"ice","candidates"]).toString(),a=new FormData,s={apiVersion:6,sharedSecret:t.sharedSecret,candidates:n,discoveryCompleted:r,options:i},a.append("jsonBody",JSON.stringify(s)),u=Date.now(),e.prev=6,l=null,e.next=10,Pe.race([fetch(o,{method:"POST",body:a}),new Pe((function(e){return l=window.setTimeout((function(){d._logger.error("Failed to add ice candidates",new Error("Add ice candidates timed out [".concat(o,"]"))),e({status:408})}),d._timeout)}))]).finally((function(){l&&clearTimeout(l)}));case 10:c=e.sent,e.next=17;break;case 13:return e.prev=13,e.t0=e.catch(6),this._logger.error("Failed to add ice candidates",e.t0),e.abrupt("return",{status:"failed"});case 17:if("ok"===(f=this.mapHttpStatusToAddIceCandidatesStatus(c))){e.next=20;break}return e.abrupt("return",{status:f});case 20:return h=Date.now(),e.next=23,this.convertHttpResponseToAddIceCandidatesResponse(c);case 23:return p=e.sent,this._logger.info("Got add ICE candidates response [%j] in [%s] ms",p,h-u),e.abrupt("return",p);case 26:case"end":return e.stop()}}),e,this,[[6,13]])}))),function(e,t,n){return l.apply(this,arguments)})},{key:"destroyStream",value:(u=y()(_().mark((function e(t,n){var r,i,o,a,s,u,c,l,f,h=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.buildUrl([t.tenancy,"stream",t.streamId,"destroy"]).toString(),i=new FormData,o={apiVersion:6,sharedSecret:t.sharedSecret,reason:n,options:[]},i.append("jsonBody",JSON.stringify(o)),a=Date.now(),e.prev=5,u=null,e.next=9,Pe.race([fetch(r,{method:"POST",body:i,cache:"no-cache"}),new Pe((function(e){return u=window.setTimeout((function(){h._logger.error("Failed to subscribe",new Error("Delete stream timed out [".concat(r,"]"))),e({status:408})}),h._timeout)}))]).finally((function(){u&&clearTimeout(u)}));case 9:s=e.sent,e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(5),this._logger.error("Failed to delete stream",e.t0),e.abrupt("return",{status:"failed"});case 16:if("ok"===(c=this.mapHttpStatusToSetDestroyStreamStatus(s))){e.next=19;break}return e.abrupt("return",{status:c});case 19:return l=Date.now(),e.next=22,this.convertHttpResponseToDestroyStreamResponse(s);case 22:return f=e.sent,this._logger.info("Got destroy stream response [%j] in [%s] ms",f,l-a),e.abrupt("return",f);case 25:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e,t){return u.apply(this,arguments)})},{key:"buildUrl",value:function(e){var t=new URL(this._uri),n=t.pathname.split("/");return n.length=n.length-1,t.pathname=n.concat.apply(n,Ce()(e)).join("/"),t}},{key:"buildPingUrl",value:function(){var e=new URL(this._uri),t=b.sdkVersion;return e.search="?".concat(new URLSearchParams([["type","http"],["version",t],["_","".concat(Date.now())]]).toString()),e.toString()}},{key:"mapHttpStatusToPublishStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 402:return"geo-restricted";case 403:return"geo-blocked";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"mapHttpStatusToSubscribeStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 402:return"geo-restricted";case 403:return"geo-blocked";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"mapHttpStatusToSetRemoteDescriptionStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"mapHttpStatusToSetTemporaryMaximalBitrateStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"mapHttpStatusToAddIceCandidatesStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"mapHttpStatusToSetDestroyStreamStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"convertHttpResponseToSubscribeResponse",value:(a=y()(_().mark((function e(t,n){var r,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.json();case 2:return r=e.sent,(i={status:r.status}).stream={tenancy:t,streamId:r.streamId,sharedSecret:r.sharedSecret},i.lag=r.lag,r&&(r.rtcConfiguration&&(i.rtcConfiguration=this.convertIRtcConfigurationToRTCConfiguration(r.rtcConfiguration)),r.setRemoteDescriptionResponse&&r.setRemoteDescriptionResponse.sessionDescription&&(i.setRemoteDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.setRemoteDescriptionResponse.sessionDescription)}),r.createAnswerDescriptionResponse&&r.createAnswerDescriptionResponse.sessionDescription&&(i.createAnswerDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.createAnswerDescriptionResponse.sessionDescription)}),r.createOfferDescriptionResponse&&r.createOfferDescriptionResponse.sessionDescription&&(i.createOfferDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.createOfferDescriptionResponse.sessionDescription)})),e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"convertHttpResponseToPublishResponse",value:(i=y()(_().mark((function e(t,n){var r,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.json();case 2:return r=e.sent,(i={status:r.status}).stream={tenancy:t,streamId:r.streamId,sharedSecret:r.sharedSecret},r&&(r.rtcConfiguration&&(i.rtcConfiguration=this.convertIRtcConfigurationToRTCConfiguration(r.rtcConfiguration)),r.setRemoteDescriptionResponse&&r.setRemoteDescriptionResponse.sessionDescription&&(i.setRemoteDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.setRemoteDescriptionResponse.sessionDescription)}),r.createAnswerDescriptionResponse&&r.createAnswerDescriptionResponse.sessionDescription&&(i.createAnswerDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.createAnswerDescriptionResponse.sessionDescription)}),r.createOfferDescriptionResponse&&r.createOfferDescriptionResponse.sessionDescription&&(i.createOfferDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.createOfferDescriptionResponse.sessionDescription)})),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"convertIRtcConfigurationToRTCConfiguration",value:function(e){var t={};if(e.bundlePolicy)switch(e.bundlePolicy){case"BundlePolicyBalanced":t.bundlePolicy="balanced";break;case"BundlePolicyMaxCompat":t.bundlePolicy="max-compat";break;case"BundlePolicyMaxBundle":t.bundlePolicy="max-bundle";break;default:R(e.bundlePolicy)}if("number"==typeof e.iceCandidatePoolSize&&(t.iceCandidatePoolSize=e.iceCandidatePoolSize),e.iceServers){for(var n=[],r=0;r<e.iceServers.length;r++)n.push({urls:e.iceServers[r].urls,username:e.iceServers[r].username,credential:e.iceServers[r].credential});t.iceServers=n}if(e.iceTransportPolicy)switch(e.iceTransportPolicy){case"IceTransportPolicyAll":t.iceTransportPolicy="all";break;case"IceTransportPolicyRelay":t.iceTransportPolicy="relay";break;case"IceTransportPolicyPublic":break;default:R(e.iceTransportPolicy)}if(e.peerIdentity&&(t.peerIdentity=e.peerIdentity),e.rtcpMuxPolicy)switch(e.rtcpMuxPolicy){case"RtcpMuxPolicyNegotiate":t.rtcpMuxPolicy="negotiate";break;case"RtcpMuxPolicyRequire":t.rtcpMuxPolicy="require";break;default:R(e.rtcpMuxPolicy)}return t}},{key:"convertISessionDescriptionToRTCSessionDescription",value:function(e){var t={sdp:e.sdp};switch(e.type){case"Offer":t.type="offer";break;case"Answer":t.type="answer";break;default:R(e.type)}return t}},{key:"convertHttpResponseToSetRemoteDescriptionResponse",value:(r=y()(_().mark((function e(t){var n,r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:return n=e.sent,r={status:n.status},n&&n.sessionDescription&&(r.sessionDescription=this.convertISessionDescriptionToRTCSessionDescription(n.sessionDescription)),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"convertHttpResponseToAddIceCandidatesResponse",value:(n=y()(_().mark((function e(t){var n,r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:return n=e.sent,r={status:n.status,options:[]},n&&n.options&&(r.options=n.options),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"convertHttpResponseToDestroyStreamResponse",value:(t=y()(_().mark((function e(t){var n,r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:return n=e.sent,r={status:n.status},e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"convertRTCSdpTypeToSdpType",value:function(e){switch(e){case"answer":return"Answer";case"offer":return"Offer";case"pranswer":case"rollback":throw new Error("SDP type [".concat(e,"] is not supported"));default:R(e)}}}]),e}(),Ee=n(202).default,Ae=function(){function e(t){if(o()(this,e),c()(this,"_logger",E.getLogger("Discovery")),c()(this,"_metricsService",void 0),c()(this,"_uri",void 0),!t)throw new Error("Discovery requires uri");this._metricsService=ce.getMetricsService(t.toString()),this._uri=t}var t,n;return s()(e,[{key:"discoverNearbyEndPoints",value:(n=y()(_().mark((function e(t,n){var r,i,o,a;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}throw new Error("Discovery requires timeout");case 2:return r=t.toString(),e.next=5,Ee.race([fetch(r,{method:"GET",cache:"no-cache"}),new Ee((function(e,t){return setTimeout((function(){return t(new Error("Discovery timed out [".concat(r,"]")))}),n)}))]);case 5:if((i=e.sent).ok){e.next=8;break}throw new Error("Discovery failed [".concat(r,"] [").concat(i.status,"]"));case 8:if(null!==i.body){e.next=10;break}throw new Error("Discovery failed with no data [".concat(r,"]"));case 10:return e.next=12,i.text();case 12:return o=e.sent,a=o.split(","),e.abrupt("return",a.map((function(e){return new Oe(e,n)})));case 15:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},{key:"discoverClosestEndPoint",value:(t=y()(_().mark((function e(){var t,n,r,i,o,a=this,s=arguments;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:2e4,n=oe.buildDiscoveryUrl(this._uri),e.next=4,this.discoverNearbyEndPoints(new URL(n),t);case 4:return r=e.sent,i=function(){return new Ee((function(){a._logger.info("Request [%s] failed, preventing it from completing",n)}))},e.next=8,Ee.race(r.map((function(e){return e.ping().catch((function(t){return a._logger.warn("Failed to ping end point [%s]",e,t),i()})).then((function(t){var n=Date.now();return a._logger.info("Discovered end point [%s] with time [%s]",e.toString(),t),a._metricsService.push({metricType:ae.RoundTripTime,runtime:(n-he.pageLoadTime)/1e3,value:{uint64:t||0},resource:e.toString(),kind:"ping"}),e}))})));case 8:return o=e.sent,e.abrupt("return",o);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),Ie=function(){function e(){throw o()(this,e),new Error("Discovery is a static class that may not be instantiated")}var t,n;return s()(e,null,[{key:"precacheClosestEndPointDiscovery",value:(n=y()(_().mark((function t(){var n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new URL(he.discoveryUri.value),t.abrupt("return",e.discoverClosestEndPointWithCaching(n));case 2:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"discoverClosestEndPointWithCaching",value:(t=y()(_().mark((function t(n){var r,i,o;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.toString(),!e._cache[r]){t.next=3;break}return t.abrupt("return",e._cache[r]);case 3:return i=new Ae(n),o=e._cache[r]=i.discoverClosestEndPoint(),e._cache[r].then((function(){setTimeout((function(){e._cache[r]===o&&delete e._cache[r]}),6e4)})).catch((function(t){throw delete e._cache[r],t})),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}]),e}();c()(Ie,"_cache",{}),Ie.precacheClosestEndPointDiscovery();var De=n(202).default;function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Me=function(){function e(t,n){o()(this,e),c()(this,"_logger",E.getLogger("RealTimePublisher")),c()(this,"_publisherContext",void 0),c()(this,"_handleStreamFailure",void 0),this._publisherContext=t,this._handleStreamFailure=n}var t;return s()(e,[{key:"start",value:function(e,t,n){var r=this;return De.all([Ie.discoverClosestEndPointWithCaching(e),xe.createPeerConnectionOffer("sendonly")]).then((function(e){var n=we()(e,2),i=n[0],o=n[1],a=o.localOffer,s=o.peerConnection;return r._publisherContext.online.value=!0,r._publisherContext.endPoint.value=i,r._logger.info("Connecting to [%s]",i.toString()),r._logger.info("Local offer:\n"+a.sdp),!q.clientOfferDisabled&&s.supportsSetConfiguration&&s.supportsGetConfiguration||(s.close(),s=null,a=null),r._publisherContext.peerConnection.value=s,i.publish(r._publisherContext.name,t,a,r._publisherContext.failureCount.value)})).then((function(e){var t=e.status,i=e.stream,o=e.rtcConfiguration,a=e.setRemoteDescriptionResponse,s=e.createOfferDescriptionResponse,u=e.createAnswerDescriptionResponse;if(r._publisherContext.stream.value=i,r._logger.debug("[%s] Publish completed [%s] [%j] [%j] [%j] [%j]",r._publisherContext.streamId,t,o,a,s,u),r._publisherContext.state.value=r._publisherContext.mapPublishStatusToPublisherStatus(t),r._publisherContext.applyStatus(t),"ok"===t)return r.applyRtcConfiguration(r._publisherContext.peerConnection.value,o).then((function(e){var t,o=!1,c=!1,l=[];return r._publisherContext.peerConnection.value=e,e.addStream(r._publisherContext.mediaStream.value),e.onicecandidate=function(n){r._publisherContext.stream.value===i&&r._publisherContext.peerConnection.value===e&&(o||he.sendLocalCandidates.value&&(n.candidate&&n.candidate.candidate?l.push(n.candidate):c=!0,t||(t=setTimeout((function(){r._publisherContext.stream.value!==i||o||r._publisherContext.endPoint.value.addIceCandidates(i,l,c).then((function(e){var t=e.status,n=e.options;"ok"===t?(n.includes("cancel")&&(o=!0),r._logger.info("[%s] Added ICE candidates with reason [%s] and options [%s]",r._publisherContext.streamId,t,n)):r._logger.warn("[%s] Failed to add ICE candidates with reason [%s]",r._publisherContext.streamId,t)})).catch((function(e){r._logger.error("[%s] Failed to add ICE candidates",r._publisherContext.streamId,e)}))}),100))))},e.oniceconnectionstatechange=function(){if(r._publisherContext.stream.value===i&&r._publisherContext.peerConnection.value===e){var t=function(){r._publisherContext.state.value=pe.Error,r._publisherContext.publishing.value=!1,r._publisherContext.loading.value=!0,r._handleStreamFailure().catch((function(t){r._logger.error("[%s] Failed handling stream failure after peer connection stopped with state [%s]",r._publisherContext.streamId,e.iceConnectionState,t)}))};switch(e.iceConnectionState){case"checking":case"completed":case"connected":case"new":return;case"disconnected":case"failed":return void(navigator.onLine&&(r._logger.info("[%s] ICE connection state changed to [%s], trying to reconnect",r._publisherContext.streamId,e.iceConnectionState),r.reconnectPeerConnection(e,t)));case"closed":return r._logger.info("[%s] ICE connection state changed to [%s], retrying to connect",r._publisherContext.streamId,e.iceConnectionState),void t();default:R(e.iceConnectionState)}}},new De((function(e){e()})).then((function(){if(a)return r._logger.info("[%s] Set local SDP offer [%s]",r._publisherContext.streamId,a.sessionDescription.sdp),e.setLocalDescription(a.sessionDescription).catch((function(e){throw r._logger.info("[%s] Failed to set local description [%j] with message [%s]",r._publisherContext.streamId,a.sessionDescription,e.message),e}))})).then((function(){if(u)return r._logger.info("[%s] Set remote SDP answer [%s]",r._publisherContext.streamId,u.sessionDescription.sdp),e.setRemoteDescription(u.sessionDescription).catch((function(e){throw r._logger.info("[%s] Failed to set remote description [%j] with message [%s]",r._publisherContext.streamId,u.sessionDescription,e.message),e}))})).then((function(){if(s)return r._logger.info("[%s] Set remote SDP offer [%s]",r._publisherContext.streamId,s.sessionDescription.sdp),e.setRemoteDescription(s.sessionDescription).catch((function(e){throw r._logger.info("[%s] Failed to set remote description [%j] with message [%s]",r._publisherContext.streamId,u.sessionDescription,e.message),e})).then((function(){return e.createAnswer({offerToReceiveAudio:!1,offerToReceiveVideo:!1})})).then((function(e){return r._logger.info("[%s] Set local SDP answer [%s]",r._publisherContext.streamId,e.sdp),r._publisherContext.endPoint.value.setRemoteDescription(i,e)})).then((function(t){var n=t.status,i=t.sessionDescription;return r._publisherContext.state.value=r.mapSetRemoteDescriptionStatusToPublisherStatus(n),"ok"!==n?(r._publisherContext.publishing.value=!1,r._publisherContext.standby.value=!0,void(r._publisherContext.stopped.value=!1)):(r._logger.info("[%s] Set local SDP [%s]",r._publisherContext.streamId,i.sdp),e.setLocalDescription(i).catch((function(e){throw r._logger.info("[%s] Failed to set local description [%j] with message [%s]",r._publisherContext.streamId,i,e.message),e})))}))})).then((function(){return n.success(r._publisherContext.streamId),De.resolve()}))}))}))}},{key:"applyRtcConfiguration",value:(t=y()(_().mark((function e(t,n){var r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return n=this.truncateIceServers(n),e.abrupt("return",he.peerConnectionFactory.value.createPeerConnection(n));case 3:return r=Fe(Fe({},t.getConfiguration()),n),t.setConfiguration(r),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"truncateIceServers",value:function(e){for(var t=[],n=0;n<e.iceServers.length;n++){for(var r=[],i=0;i<2;i++)e.iceServers[n].urls[i]&&r.push(e.iceServers[n].urls[i]);t.push({urls:r,username:e.iceServers[n].username,credential:e.iceServers[n].credential})}return e.iceServers=t,e}},{key:"reconnectPeerConnection",value:function(e,t){var n=this;if("closed"!==e.iceConnectionState)if(this._publisherContext.state.value=pe.Reconnecting,this._publisherContext.peerConnectionReconnectAttempts<he.maximalNumberOfPeerConnectionReconnectAttempts||!he.automaticallyReconnectPeerConnection){if(this._publisherContext.peerConnectionReconnectAttempts++,q.clientOfferDisabled||!e.supportsSetConfiguration||!e.supportsGetConfiguration||this._publisherContext.failureCount.value)return;this._logger.info("Reconnecting peer connection by restarting ICE");var r=e.currentLocalDescription;e.createOffer({iceRestart:!0}).then((function(t){return e.setLocalDescription(t).then((function(){return e.setLocalDescription(r)}))})).catch((function(e){n._logger.error("Failed to reconnect peer connection",e),n._publisherContext.peerConnectionReconnectAttempts=0,t()}))}else this._logger.info("Failed to reconnect peer connection after [%s] attempts, performing full recovery",this._publisherContext.peerConnectionReconnectAttempts),this._publisherContext.peerConnectionReconnectAttempts=0,t()}},{key:"mapSetRemoteDescriptionStatusToPublisherStatus",value:function(e){switch(e){case"ok":return pe.Starting;case"unauthorized":return pe.Unauthorized;case"not-found":case"capacity":case"rate-limited":case"timeout":return pe.Recovering;case"failed":return pe.Error;default:R(e)}}}]),e}(),Ue=n(202).default,Ne="client:termination",Ve=function(){function e(t,n,r){var i=this;o()(this,e),c()(this,"_logger",E.getLogger("Publisher")),c()(this,"_context",void 0),c()(this,"_publisherStartTime",void 0),c()(this,"_readOnlyToken",void 0),c()(this,"_readOnlyPeerConnection",void 0),c()(this,"_readOnlyState",void 0),c()(this,"_readOnlyTokenExpiring",void 0),c()(this,"_readOnlyAuthorized",void 0),c()(this,"_readOnlyOnline",void 0),c()(this,"_readOnlyLoading",void 0),c()(this,"_readOnlyPublishing",void 0),c()(this,"_readOnlyStandby",void 0),c()(this,"_readOnlyStopped",void 0),c()(this,"_readOnlyFailureCount",void 0),c()(this,"_readOnlyEndPoint",void 0),c()(this,"_readOnlyStream",void 0),c()(this,"_readOnlyRtcStatistics",void 0),c()(this,"_readOnlyMediaStream",void 0),c()(this,"_metricsService",void 0),this._context=new _e(n,r),this._publisherStartTime=Date.now(),this._readOnlyToken=new G(this._context.token),this._readOnlyPeerConnection=new G(this._context.peerConnection),this._readOnlyState=new G(this._context.state),this._readOnlyTokenExpiring=new G(this._context.tokenExpiring),this._readOnlyAuthorized=new G(this._context.authorized),this._readOnlyOnline=new G(this._context.online),this._readOnlyLoading=new G(this._context.loading),this._readOnlyPublishing=new G(this._context.publishing),this._readOnlyStandby=new G(this._context.standby),this._readOnlyStopped=new G(this._context.stopped),this._readOnlyFailureCount=new G(this._context.failureCount),this._readOnlyEndPoint=new G(this._context.endPoint),this._readOnlyStream=new G(this._context.stream),this._readOnlyRtcStatistics=new G(this._context.rtcStatistics),this._readOnlyMediaStream=new G(this._context.mediaStream),this._context.mediaStream.value=t;var a=X.parseToken(this._context.token.value),s=(X.getUri(a)||he.discoveryUri.value).toString();he.tenancy.value=X.getTenancy(a)||he.tenancy.value,oe.uri.value=s,this._metricsService=ce.getMetricsService(s),this._context.sessionTelemetry=new ye(he.pageLoadTime,this._metricsService),this._context.publisherDisposables.add(this._context.sessionTelemetry),this._context.publisherDisposables.add(this._context.state.subscribe((function(e){i._context.clearFailureCountTimeout&&clearTimeout(i._context.clearFailureCountTimeout),i._context.failureCount.value&&e===pe.Publishing&&(i._context.clearFailureCountTimeout=window.setTimeout((function(){i._context.failureCount.value=0}),3e3))}))),this.start()}var t,n,r,i,a;return s()(e,[{key:"token",get:function(){return this._context.token.value},set:function(e){this._context.disposables.dispose(),this._context.token.value=e,this._context.tokenExpiring.value=!1;var t=X.parseToken(this._context.token.value),n=(X.getUri(t)||he.discoveryUri.value).toString();he.tenancy.value=X.getTenancy(t)||he.tenancy.value,oe.uri.value=n,this._metricsService=ce.getMetricsService(n),this.start()}},{key:"peerConnection",get:function(){return this._readOnlyPeerConnection}},{key:"state",get:function(){return this._readOnlyState}},{key:"tokenExpiring",get:function(){return this._readOnlyTokenExpiring}},{key:"authorized",get:function(){return this._readOnlyAuthorized}},{key:"online",get:function(){return this._readOnlyOnline}},{key:"loading",get:function(){return this._readOnlyLoading}},{key:"publishing",get:function(){return this._readOnlyPublishing}},{key:"standby",get:function(){return this._readOnlyStandby}},{key:"stopped",get:function(){return this._readOnlyStopped}},{key:"failureCount",get:function(){return this._readOnlyFailureCount}},{key:"endPoint",get:function(){return this._readOnlyEndPoint}},{key:"stream",get:function(){return this._readOnlyStream}},{key:"streamId",get:function(){return this._context.streamId}},{key:"rtcStats",get:function(){return this._readOnlyRtcStatistics}},{key:"mediaStream",get:function(){return this._readOnlyMediaStream}},{key:"stop",value:(a=y()(_().mark((function e(t){var n=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Ue((function(e){if(!n._context.isStarting.value)return n.processStop(t),void e();n._context.disposables.add(n._context.isStarting.subscribe((function(r){r||(n.processStop(t),e())})))})));case 1:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"processStop",value:function(e){this.cleanUpResources(e),this._context.mediaStream.value&&this._context.mediaStream.value.getTracks().forEach((function(e){return e.stop()})),this._context.peerConnection.value&&this._context.peerConnection.value.close(),this._context.state.value=pe.Stopped}},{key:"dispose",value:(i=y()(_().mark((function e(){var t=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.stop("client:channel-dispose").then((function(){t._context.publisherDisposables.dispose(),t._context.isDisposed=!0})));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getUri",value:function(e){var t=X.parseToken(e);return X.getUri(t)||(this._logger.info("Fall back to the default discover URI [%s]",he.discoveryUri.value),new URL(he.discoveryUri.value))}},{key:"start",value:(r=y()(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._context.isDisposed){e.next=2;break}throw new Error("Channel was already disposed");case 2:if(!this._context.isStarting.value){e.next=5;break}return this._logger.info("Publisher is already starting, skipping start"),e.abrupt("return");case 5:return this._context.isStarting.value=!0,e.abrupt("return",this.processStart());case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"processStart",value:(n=y()(_().mark((function e(){var t,n,r,i,o,a=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._context.token.value,n=this._context.sessionTelemetry.listenOnStreamSetup(),X.isValidToken(t)){e.next=8;break}return this._logger.error("Failed to parse token [%s]",t),this._context.state.value=pe.Unauthorized,this._context.authorized.value=!1,this._context.isStarting.value=!1,e.abrupt("return");case 8:return this.cleanUpResources("client:start"),this._context.state.value=pe.Starting,this._context.loading.value=!0,r=this.getUri(t),i=function(){return new Ue((function(e){return a._context.isStarting.value=!1,e(a.handleStreamFailure())}))},o=new Me(this._context,i),e.abrupt("return",o.start(r,t,n).then((function(){a._context.loading.value=!1,a._context.publishing.value=!0,a._context.state.value=pe.Publishing})).catch((function(e){n.fail(),a._context.failureCount.value++,a._context.online.value=!1,a.cleanUpResources("client:cleanup-after-failed-setup"),a._context.state.value=pe.Error,a._logger.error("Failed to start publishing",e)})).finally((function(){if(a._context.isStarting.value=!1,a._context.state.value!==pe.Publishing&&he.automaticRetryOnFailure){var e=setTimeout((function(){a.handleStreamFailure().catch((function(e){a._logger.error("Failed handling stream failure",e)}))}),a.getRetryInterval());a._context.disposables.add(new N((function(){clearTimeout(e)})))}})));case 15:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getRetryInterval",value:function(){switch(this._context.state.value){case pe.StandBy:case pe.Offline:return 15e3;case pe.Error:case pe.Recovering:case pe.Unauthorized:case pe.GeoRestricted:case pe.GeoBlocked:case pe.Stopped:case pe.Starting:case pe.Publishing:case pe.Reconnecting:case pe.UnsupportedFeature:return Math.min(3e5,Math.pow(2e3,Math.max(0,this._context.failureCount.value-1)));default:R(this._context.state.value)}}},{key:"handleStreamFailure",value:(t=y()(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this._context.state.value,e.next=e.t0===pe.Error||e.t0===pe.Reconnecting||e.t0===pe.StandBy||e.t0===pe.Offline||e.t0===pe.Recovering?3:e.t0===pe.Unauthorized?5:e.t0===pe.GeoRestricted?7:e.t0===pe.GeoBlocked?9:e.t0===pe.Stopped?11:e.t0===pe.Publishing?13:e.t0===pe.Starting?15:e.t0===pe.UnsupportedFeature?17:19;break;case 3:return this._logger.info("Retry start with initial state [%s] [%s]",this._context.state.value,pe[this._context.state.value]),e.abrupt("break",20);case 5:return this._logger.info("Publisher is unauthorized, skipping retry of start. Please provide a new token and invoke start()"),e.abrupt("return");case 7:return this._logger.info("Publisher is geo restricted, skipping retry of start. Please provide a new token and invoke start()"),e.abrupt("return");case 9:return this._logger.info("Publisher is geo blocked, skipping retry of start. Please provide a new token and invoke start()"),e.abrupt("return");case 11:return this._logger.info("Publisher is stopped, skipping retry of start."),e.abrupt("return");case 13:return this._logger.info("Publisher is publishing, skipping retry of start"),e.abrupt("return");case 15:return this._logger.info("Publisher is already starting, skipping retry of start"),e.abrupt("return");case 17:return this._logger.info("Publisher is stopped due to unsupported feature, skipping retry of start."),e.abrupt("return");case 19:R(this._context.state.value);case 20:return e.abrupt("return",this.start());case 21:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cleanUpResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ne;this._context.disposables.dispose();var n=this._context.peerConnection.value;n&&(this._context.peerConnection.value=null,n.close()),this._context.publishing.value=!1,this._context.stopped.value=!0,this._context.standby.value=!1,this._context.stream.value&&this._context.endPoint.value&&this._context.endPoint.value.destroyStream(this._context.stream.value,t).then((function(t){var n=t.status;"ok"===n?e._logger.info("[%s] Destroyed stream with reason [%s]",e.streamId,n):e._logger.warn("[%s] Failed to destroy stream with reason [%s]",e.streamId,n)})).catch((function(t){e._logger.error("[%s] Failed to destroy stream",e.streamId,t)})),this._context.stream.value=null,this._context.endPoint.value=null,this._context.peerConnectionReconnectAttempts=0}}]),e}(),Be={SDK:he,Publishers:function(){function e(){throw o()(this,e),new Error("Publishers is a static class that may not be instantiated")}return s()(e,null,[{key:"createPublisher",value:function(e){if(!he.initialized.value)throw new Error("SDK is not loaded.");return new Ve(e.mediaStream,e.token,e.name)}}]),e}(),PublisherState:pe}},3099:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6077:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},1223:function(e,t,n){var r=n(5112),i=n(30),o=n(3070),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1530:function(e,t,n){"use strict";var r=n(8710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},5787:function(e){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},9670:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},1285:function(e,t,n){"use strict";var r=n(7908),i=n(1400),o=n(7466);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)t[s++]=e;return t}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,i=n(9341),o=n(9207),a=i("forEach"),s=o("forEach");e.exports=a&&s?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},8457:function(e,t,n){"use strict";var r=n(9974),i=n(7908),o=n(3411),a=n(7659),s=n(7466),u=n(6135),c=n(1246);e.exports=function(e){var t,n,l,f,h,p,d=i(e),v="function"==typeof this?this:Array,g=arguments.length,y=g>1?arguments[1]:void 0,m=void 0!==y,_=c(d),b=0;if(m&&(y=r(y,g>2?arguments[2]:void 0,2)),null==_||v==Array&&a(_))for(n=new v(t=s(d.length));t>b;b++)p=m?y(d[b],b):d[b],u(n,b,p);else for(h=(f=_.call(d)).next,n=new v;!(l=h.call(f)).done;b++)p=m?o(f,y,[l.value,b],!0):l.value,u(n,b,p);return n.length=b,n}},1318:function(e,t,n){var r=n(5656),i=n(7466),o=n(1400),a=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,n){var r=n(9974),i=n(8361),o=n(7908),a=n(7466),s=n(5417),u=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,l=4==e,f=6==e,h=7==e,p=5==e||f;return function(d,v,g,y){for(var m,_,b=o(d),w=i(b),x=r(v,g,3),S=a(w.length),k=0,T=y||s,C=t?T(d,S):n||h?T(d,0):void 0;S>k;k++)if((p||k in w)&&(_=x(m=w[k],k,b),e))if(t)C[k]=_;else if(_)switch(e){case 3:return!0;case 5:return m;case 6:return k;case 2:u.call(C,m)}else switch(e){case 4:return!1;case 7:u.call(C,m)}return f?-1:c||l?l:C}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},1194:function(e,t,n){var r=n(7293),i=n(5112),o=n(7392),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:function(e,t,n){"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},9207:function(e,t,n){var r=n(9781),i=n(7293),o=n(6656),a=Object.defineProperty,s={},u=function(e){throw e};e.exports=function(e,t){if(o(s,e))return s[e];t||(t={});var n=[][e],c=!!o(t,"ACCESSORS")&&t.ACCESSORS,l=o(t,0)?t[0]:u,f=o(t,1)?t[1]:void 0;return s[e]=!!n&&!i((function(){if(c&&!r)return!0;var e={length:-1};c?a(e,1,{enumerable:!0,get:u}):e[1]=1,n.call(e,l,f)}))}},3671:function(e,t,n){var r=n(3099),i=n(7908),o=n(8361),a=n(7466),s=function(e){return function(t,n,s,u){r(n);var c=i(t),l=o(c),f=a(c.length),h=e?f-1:0,p=e?-1:1;if(s<2)for(;;){if(h in l){u=l[h],h+=p;break}if(h+=p,e?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:f>h;h+=p)h in l&&(u=n(u,l[h],h,c));return u}};e.exports={left:s(!1),right:s(!0)}},5417:function(e,t,n){var r=n(111),i=n(3157),o=n(5112)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},3411:function(e,t,n){var r=n(9670),i=n(9212);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){throw i(e),t}}},7072:function(e,t,n){var r=n(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},4326:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:function(e,t,n){var r=n(1694),i=n(4326),o=n(5112)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},9920:function(e,t,n){var r=n(6656),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];r(e,l)||s(e,l,u(t,l))}}},4964:function(e,t,n){var r=n(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},8544:function(e,t,n){var r=n(7293);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4994:function(e,t,n){"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),a=n(8003),s=n(7497),u=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,c,!1,!0),s[c]=u,e}},8880:function(e,t,n){var r=n(9781),i=n(3070),o=n(9114);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},9114:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:function(e,t,n){"use strict";var r=n(7593),i=n(3070),o=n(9114);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},5573:function(e,t,n){"use strict";var r=n(7293),i=n(6650).start,o=Math.abs,a=Date.prototype,s=a.getTime,u=a.toISOString;e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=u.call(new Date(-50000000000001))}))||!r((function(){u.call(new Date(NaN))}))?function(){if(!isFinite(s.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+i(o(t),r?6:4,0)+"-"+i(e.getUTCMonth()+1,2,0)+"-"+i(e.getUTCDate(),2,0)+"T"+i(e.getUTCHours(),2,0)+":"+i(e.getUTCMinutes(),2,0)+":"+i(e.getUTCSeconds(),2,0)+"."+i(n,3,0)+"Z"}:u},654:function(e,t,n){"use strict";var r=n(2109),i=n(4994),o=n(9518),a=n(7674),s=n(8003),u=n(8880),c=n(1320),l=n(5112),f=n(1913),h=n(7497),p=n(3383),d=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,g=l("iterator"),y="keys",m="values",_="entries",b=function(){return this};e.exports=function(e,t,n,l,p,w,x){i(n,t,l);var S,k,T,C=function(e){if(e===p&&E)return E;if(!v&&e in P)return P[e];switch(e){case y:case m:case _:return function(){return new n(this,e)}}return function(){return new n(this)}},R=t+" Iterator",L=!1,P=e.prototype,O=P[g]||P["@@iterator"]||p&&P[p],E=!v&&O||C(p),A="Array"==t&&P.entries||O;if(A&&(S=o(A.call(new e)),d!==Object.prototype&&S.next&&(f||o(S)===d||(a?a(S,d):"function"!=typeof S[g]&&u(S,g,b)),s(S,R,!0,!0),f&&(h[R]=b))),p==m&&O&&O.name!==m&&(L=!0,E=function(){return O.call(this)}),f&&!x||P[g]===E||u(P,g,E),h[t]=E,p)if(k={values:C(m),keys:w?E:C(y),entries:C(_)},x)for(T in k)(v||L||!(T in P))&&c(P,T,k[T]);else r({target:t,proto:!0,forced:v||L},k);return k}},9781:function(e,t,n){var r=n(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(e,t,n){var r=n(7854),i=n(111),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},8324:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},6833:function(e,t,n){var r=n(8113);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},5268:function(e,t,n){var r=n(4326),i=n(7854);e.exports="process"==r(i.process)},8113:function(e,t,n){var r=n(5005);e.exports=r("navigator","userAgent")||""},7392:function(e,t,n){var r,i,o=n(7854),a=n(8113),s=o.process,u=s&&s.versions,c=u&&u.v8;c?i=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),s=n(3505),u=n(9920),c=n(4705);e.exports=function(e,t){var n,l,f,h,p,d=e.target,v=e.global,g=e.stat;if(n=v?r:g?r[d]||s(d,{}):(r[d]||{}).prototype)for(l in t){if(h=t[l],f=e.noTargetGet?(p=i(n,l))&&p.value:n[l],!c(v?l:d+(g?".":"#")+l,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(n,l,h,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:function(e,t,n){"use strict";n(4916);var r=n(1320),i=n(7293),o=n(5112),a=n(2261),s=n(8880),u=o("species"),c=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l="$0"==="a".replace(/./,"$0"),f=o("replace"),h=!!/./[f]&&""===/./[f]("a","$0"),p=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var d=o(e),v=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),g=v&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t}));if(!v||!g||"replace"===e&&(!c||!l||h)||"split"===e&&!p){var y=/./[d],m=n(d,""[e],(function(e,t,n,r,i){return t.exec===a?v&&!i?{done:!0,value:y.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}),_=m[0],b=m[1];r(String.prototype,e,_),r(RegExp.prototype,d,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}f&&s(RegExp.prototype[d],"sham",!0)}},9974:function(e,t,n){var r=n(3099);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};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)}}},7065:function(e,t,n){"use strict";var r=n(3099),i=n(111),o=[].slice,a={},s=function(e,t,n){if(!(t in a)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";a[t]=Function("C,a","return new C("+r.join(",")+")")}return a[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=o.call(arguments,1),a=function(){var r=n.concat(o.call(arguments));return this instanceof a?s(t,r.length,r):t.apply(e,r)};return i(t.prototype)&&(a.prototype=t.prototype),a}},5005:function(e,t,n){var r=n(857),i=n(7854),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},1246:function(e,t,n){var r=n(648),i=n(7497),o=n(5112)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},8554:function(e,t,n){var r=n(9670),i=n(1246);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},3501:function(e){e.exports={}},842:function(e,t,n){var r=n(7854);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:function(e,t,n){var r=n(7293),i=n(4326),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},9587:function(e,t,n){var r=n(111),i=n(7674);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},2788:function(e,t,n){var r=n(5465),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},9909:function(e,t,n){var r,i,o,a=n(8536),s=n(7854),u=n(111),c=n(8880),l=n(6656),f=n(5465),h=n(6200),p=n(3501),d=s.WeakMap;if(a){var v=f.state||(f.state=new d),g=v.get,y=v.has,m=v.set;r=function(e,t){return t.facade=e,m.call(v,e,t),t},i=function(e){return g.call(v,e)||{}},o=function(e){return y.call(v,e)}}else{var _=h("state");p[_]=!0,r=function(e,t){return t.facade=e,c(e,_,t),t},i=function(e){return l(e,_)?e[_]:{}},o=function(e){return l(e,_)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},7659:function(e,t,n){var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:function(e,t,n){var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4705:function(e,t,n){var r=n(7293),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==c||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},111:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:function(e){e.exports=!1},7850:function(e,t,n){var r=n(111),i=n(4326),o=n(5112)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},408:function(e,t,n){var r=n(9670),i=n(7659),o=n(7466),a=n(9974),s=n(1246),u=n(9212),c=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var l,f,h,p,d,v,g,y=n&&n.that,m=!(!n||!n.AS_ENTRIES),_=!(!n||!n.IS_ITERATOR),b=!(!n||!n.INTERRUPTED),w=a(t,y,1+m+b),x=function(e){return l&&u(l),new c(!0,e)},S=function(e){return m?(r(e),b?w(e[0],e[1],x):w(e[0],e[1])):b?w(e,x):w(e)};if(_)l=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(i(f)){for(h=0,p=o(e.length);p>h;h++)if((d=S(e[h]))&&d instanceof c)return d;return new c(!1)}l=f.call(e)}for(v=l.next;!(g=v.call(l)).done;){try{d=S(g.value)}catch(e){throw u(l),e}if("object"==typeof d&&d&&d instanceof c)return d}return new c(!1)}},9212:function(e,t,n){var r=n(9670);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},3383:function(e,t,n){"use strict";var r,i,o,a=n(9518),s=n(8880),u=n(6656),c=n(5112),l=n(1913),f=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),l||u(r,f)||s(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},7497:function(e){e.exports={}},5948:function(e,t,n){var r,i,o,a,s,u,c,l,f=n(7854),h=n(1236).f,p=n(261).set,d=n(6833),v=n(5268),g=f.MutationObserver||f.WebKitMutationObserver,y=f.document,m=f.process,_=f.Promise,b=h(f,"queueMicrotask"),w=b&&b.value;w||(r=function(){var e,t;for(v&&(e=m.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},!d&&!v&&g&&y?(s=!0,u=y.createTextNode(""),new g(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s}):_&&_.resolve?(c=_.resolve(void 0),l=c.then,a=function(){l.call(c,r)}):a=v?function(){m.nextTick(r)}:function(){p.call(f,r)}),e.exports=w||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},3366:function(e,t,n){var r=n(7854);e.exports=r.Promise},133:function(e,t,n){var r=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},590:function(e,t,n){var r=n(7293),i=n(5112),o=n(1913),a=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:function(e,t,n){var r=n(7854),i=n(2788),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},8523:function(e,t,n){"use strict";var r=n(3099),i=function(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)}},3929:function(e,t,n){var r=n(7850);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},3009:function(e,t,n){var r=n(7854),i=n(3111).trim,o=n(1361),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");e.exports=u?function(e,t){var n=i(String(e));return a(n,t>>>0||(s.test(n)?16:10))}:a},1574:function(e,t,n){"use strict";var r=n(9781),i=n(7293),o=n(1956),a=n(5181),s=n(5296),u=n(7908),c=n(8361),l=Object.assign,f=Object.defineProperty;e.exports=!l||i((function(){if(r&&1!==l({b:1},l(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||o(l({},t)).join("")!=i}))?function(e,t){for(var n=u(e),i=arguments.length,l=1,f=a.f,h=s.f;i>l;)for(var p,d=c(arguments[l++]),v=f?o(d).concat(f(d)):o(d),g=v.length,y=0;g>y;)p=v[y++],r&&!h.call(d,p)||(n[p]=d[p]);return n}:l},30:function(e,t,n){var r,i=n(9670),o=n(6048),a=n(748),s=n(3501),u=n(490),c=n(317),l=n(6200)("IE_PROTO"),f=function(){},h=function(e){return"<script>"+e+"<\/script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=r?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=c("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[l]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=i(e),n=new f,f.prototype=null,n[l]=e):n=p(),void 0===t?n:o(n,t)}},6048:function(e,t,n){var r=n(9781),i=n(3070),o=n(9670),a=n(1956);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},3070:function(e,t,n){var r=n(9781),i=n(4664),o=n(9670),a=n(7593),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(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}},1236:function(e,t,n){var r=n(9781),i=n(5296),o=n(9114),a=n(5656),s=n(7593),u=n(6656),c=n(4664),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=a(e),t=s(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},8006:function(e,t,n){var r=n(6324),i=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},5181:function(e,t){t.f=Object.getOwnPropertySymbols},9518:function(e,t,n){var r=n(6656),i=n(7908),o=n(6200),a=n(8544),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?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?u:null}},6324:function(e,t,n){var r=n(6656),i=n(5656),o=n(1318).indexOf,a=n(3501);e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},1956:function(e,t,n){var r=n(6324),i=n(748);e.exports=Object.keys||function(e){return r(e,i)}},5296:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7674:function(e,t,n){var r=n(9670),i=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},4699:function(e,t,n){var r=n(9781),i=n(1956),o=n(5656),a=n(5296).f,s=function(e){return function(t){for(var n,s=o(t),u=i(s),c=u.length,l=0,f=[];c>l;)n=u[l++],r&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}};e.exports={entries:s(!0),values:s(!1)}},288:function(e,t,n){"use strict";var r=n(1694),i=n(648);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},3887:function(e,t,n){var r=n(5005),i=n(8006),o=n(5181),a=n(9670);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},857:function(e,t,n){var r=n(7854);e.exports=r},2534:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},9478:function(e,t,n){var r=n(9670),i=n(111),o=n(8523);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},2248:function(e,t,n){var r=n(1320);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},1320:function(e,t,n){var r=n(7854),i=n(8880),o=n(6656),a=n(3505),s=n(2788),u=n(9909),c=u.get,l=u.enforce,f=String(String).split("String");(e.exports=function(e,t,n,s){var u,c=!!s&&!!s.unsafe,h=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),(u=l(n)).source||(u.source=f.join("string"==typeof t?t:""))),e!==r?(c?!p&&e[t]&&(h=!0):delete e[t],h?e[t]=n:i(e,t,n)):h?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},7651:function(e,t,n){var r=n(4326),i=n(2261);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},2261:function(e,t,n){"use strict";var r,i,o=n(7066),a=n(2999),s=RegExp.prototype.exec,u=String.prototype.replace,c=s,l=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=a.UNSUPPORTED_Y||a.BROKEN_CARET,h=void 0!==/()??/.exec("")[1];(l||h||f)&&(c=function(e){var t,n,r,i,a=this,c=f&&a.sticky,p=o.call(a),d=a.source,v=0,g=e;return c&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),g=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(d="(?: "+d+")",g=" "+g,v++),n=new RegExp("^(?:"+d+")",p)),h&&(n=new RegExp("^"+d+"$(?!\\s)",p)),l&&(t=a.lastIndex),r=s.call(c?n:a,g),c?r?(r.input=r.input.slice(v),r[0]=r[0].slice(v),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:l&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),h&&r&&r.length>1&&u.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=c},7066:function(e,t,n){"use strict";var r=n(9670);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},2999:function(e,t,n){"use strict";var r=n(7293);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},4488:function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},1150:function(e){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},3505:function(e,t,n){var r=n(7854),i=n(8880);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},6340:function(e,t,n){"use strict";var r=n(5005),i=n(3070),o=n(5112),a=n(9781),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},8003:function(e,t,n){var r=n(3070).f,i=n(6656),o=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},6200:function(e,t,n){var r=n(2309),i=n(9711),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:function(e,t,n){var r=n(7854),i=n(3505),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},2309:function(e,t,n){var r=n(1913),i=n(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.1",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},6707:function(e,t,n){var r=n(9670),i=n(3099),o=n(5112)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},8710:function(e,t,n){var r=n(9958),i=n(4488),o=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},4986:function(e,t,n){var r=n(8113);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},6650:function(e,t,n){var r=n(7466),i=n(8415),o=n(4488),a=Math.ceil,s=function(e){return function(t,n,s){var u,c,l=String(o(t)),f=l.length,h=void 0===s?" ":String(s),p=r(n);return p<=f||""==h?l:(u=p-f,(c=i.call(h,a(u/h.length))).length>u&&(c=c.slice(0,u)),e?l+c:c+l)}};e.exports={start:s(!1),end:s(!0)}},3197:function(e){"use strict";var t=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",o=Math.floor,a=String.fromCharCode,s=function(e){return e+22+75*(e<26)},u=function(e,t,n){var r=0;for(e=n?o(e/700):e>>1,e+=o(e/t);e>455;r+=36)e=o(e/35);return o(r+36*e/(e+38))},c=function(e){var n=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}(e);var r,c,l=e.length,f=128,h=0,p=72;for(r=0;r<e.length;r++)(c=e[r])<128&&n.push(a(c));var d=n.length,v=d;for(d&&n.push("-");v<l;){var g=t;for(r=0;r<e.length;r++)(c=e[r])>=f&&c<g&&(g=c);var y=v+1;if(g-f>o((t-h)/y))throw RangeError(i);for(h+=(g-f)*y,f=g,r=0;r<e.length;r++){if((c=e[r])<f&&++h>t)throw RangeError(i);if(c==f){for(var m=h,_=36;;_+=36){var b=_<=p?1:_>=p+26?26:_-p;if(m<b)break;var w=m-b,x=36-b;n.push(a(s(b+w%x))),m=o(w/x)}n.push(a(s(m))),p=u(h,y,v==d),h=0,++v}}++h,++f}return n.join("")};e.exports=function(e){var t,i,o=[],a=e.toLowerCase().replace(r,".").split(".");for(t=0;t<a.length;t++)i=a[t],o.push(n.test(i)?"xn--"+c(i):i);return o.join(".")}},8415:function(e,t,n){"use strict";var r=n(9958),i=n(4488);e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},3111:function(e,t,n){var r=n(4488),i="["+n(1361)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},261:function(e,t,n){var r,i,o,a=n(7854),s=n(7293),u=n(9974),c=n(490),l=n(317),f=n(6833),h=n(5268),p=a.location,d=a.setImmediate,v=a.clearImmediate,g=a.process,y=a.MessageChannel,m=a.Dispatch,_=0,b={},w=function(e){if(b.hasOwnProperty(e)){var t=b[e];delete b[e],t()}},x=function(e){return function(){w(e)}},S=function(e){w(e.data)},k=function(e){a.postMessage(e+"",p.protocol+"//"+p.host)};d&&v||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return b[++_]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(_),_},v=function(e){delete b[e]},h?r=function(e){g.nextTick(x(e))}:m&&m.now?r=function(e){m.now(x(e))}:y&&!f?(o=(i=new y).port2,i.port1.onmessage=S,r=u(o.postMessage,o,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts&&p&&"file:"!==p.protocol&&!s(k)?(r=k,a.addEventListener("message",S,!1)):r="onreadystatechange"in l("script")?function(e){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),w(e)}}:function(e){setTimeout(x(e),0)}),e.exports={set:d,clear:v}},1400:function(e,t,n){var r=n(9958),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},5656:function(e,t,n){var r=n(8361),i=n(4488);e.exports=function(e){return r(i(e))}},9958:function(e){var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},7466:function(e,t,n){var r=n(9958),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},7908:function(e,t,n){var r=n(4488);e.exports=function(e){return Object(r(e))}},7593:function(e,t,n){var r=n(111);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")}},1694:function(e,t,n){var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},9711:function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},3307:function(e,t,n){var r=n(133);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:function(e,t,n){var r=n(7854),i=n(2309),o=n(6656),a=n(9711),s=n(133),u=n(3307),c=i("wks"),l=r.Symbol,f=u?l:l&&l.withoutSetter||a;e.exports=function(e){return o(c,e)||(s&&o(l,e)?c[e]=l[e]:c[e]=f("Symbol."+e)),c[e]}},1361:function(e){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},2222:function(e,t,n){"use strict";var r=n(2109),i=n(7293),o=n(3157),a=n(111),s=n(7908),u=n(7466),c=n(6135),l=n(5417),f=n(1194),h=n(5112),p=n(7392),d=h("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",y=p>=51||!i((function(){var e=[];return e[d]=!1,e.concat()[0]!==e})),m=f("concat"),_=function(e){if(!a(e))return!1;var t=e[d];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(e){var t,n,r,i,o,a=s(this),f=l(a,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(_(o=-1===t?a:arguments[t])){if(h+(i=u(o.length))>v)throw TypeError(g);for(n=0;n<i;n++,h++)n in o&&c(f,h,o[n])}else{if(h>=v)throw TypeError(g);c(f,h++,o)}return f.length=h,f}})},3290:function(e,t,n){var r=n(2109),i=n(1285),o=n(1223);r({target:"Array",proto:!0},{fill:i}),o("fill")},9826:function(e,t,n){"use strict";var r=n(2109),i=n(2092).find,o=n(1223),a=n(9207),s="find",u=!0,c=a(s);s in[]&&Array(1).find((function(){u=!1})),r({target:"Array",proto:!0,forced:u||!c},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(s)},9554:function(e,t,n){"use strict";var r=n(2109),i=n(8533);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},6699:function(e,t,n){"use strict";var r=n(2109),i=n(1318).includes,o=n(1223);r({target:"Array",proto:!0,forced:!n(9207)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},2772:function(e,t,n){"use strict";var r=n(2109),i=n(1318).indexOf,o=n(9341),a=n(9207),s=[].indexOf,u=!!s&&1/[1].indexOf(1,-0)<0,c=o("indexOf"),l=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:u||!c||!l},{indexOf:function(e){return u?s.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},9753:function(e,t,n){n(2109)({target:"Array",stat:!0},{isArray:n(3157)})},6992:function(e,t,n){"use strict";var r=n(5656),i=n(1223),o=n(7497),a=n(9909),s=n(654),u="Array Iterator",c=a.set,l=a.getterFor(u);e.exports=s(Array,"Array",(function(e,t){c(this,{type:u,target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},9600:function(e,t,n){"use strict";var r=n(2109),i=n(8361),o=n(5656),a=n(9341),s=[].join,u=i!=Object,c=a("join",",");r({target:"Array",proto:!0,forced:u||!c},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},1249:function(e,t,n){"use strict";var r=n(2109),i=n(2092).map,o=n(1194),a=n(9207),s=o("map"),u=a("map");r({target:"Array",proto:!0,forced:!s||!u},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},5827:function(e,t,n){"use strict";var r=n(2109),i=n(3671).left,o=n(9341),a=n(9207),s=n(7392),u=n(5268),c=o("reduce"),l=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!l||!u&&s>79&&s<83},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},7042:function(e,t,n){"use strict";var r=n(2109),i=n(111),o=n(3157),a=n(1400),s=n(7466),u=n(5656),c=n(6135),l=n(5112),f=n(1194),h=n(9207),p=f("slice"),d=h("slice",{ACCESSORS:!0,0:0,1:2}),v=l("species"),g=[].slice,y=Math.max;r({target:"Array",proto:!0,forced:!p||!d},{slice:function(e,t){var n,r,l,f=u(this),h=s(f.length),p=a(e,h),d=a(void 0===t?h:t,h);if(o(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[v])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(f,p,d);for(r=new(void 0===n?Array:n)(y(d-p,0)),l=0;p<d;p++,l++)p in f&&c(r,l,f[p]);return r.length=l,r}})},561:function(e,t,n){"use strict";var r=n(2109),i=n(1400),o=n(9958),a=n(7466),s=n(7908),u=n(5417),c=n(6135),l=n(1194),f=n(9207),h=l("splice"),p=f("splice",{ACCESSORS:!0,0:0,1:2}),d=Math.max,v=Math.min,g=9007199254740991,y="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!h||!p},{splice:function(e,t){var n,r,l,f,h,p,m=s(this),_=a(m.length),b=i(e,_),w=arguments.length;if(0===w?n=r=0:1===w?(n=0,r=_-b):(n=w-2,r=v(d(o(t),0),_-b)),_+n-r>g)throw TypeError(y);for(l=u(m,r),f=0;f<r;f++)(h=b+f)in m&&c(l,f,m[h]);if(l.length=r,n<r){for(f=b;f<_-r;f++)p=f+n,(h=f+r)in m?m[p]=m[h]:delete m[p];for(f=_;f>_-r+n;f--)delete m[f-1]}else if(n>r)for(f=_-r;f>b;f--)p=f+n-1,(h=f+r-1)in m?m[p]=m[h]:delete m[p];for(f=0;f<n;f++)m[f+b]=arguments[f+2];return m.length=_-r+n,l}})},3843:function(e,t,n){n(2109)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},8733:function(e,t,n){var r=n(2109),i=n(5573);r({target:"Date",proto:!0,forced:Date.prototype.toISOString!==i},{toISOString:i})},3710:function(e,t,n){var r=n(1320),i=Date.prototype,o="Invalid Date",a=i.toString,s=i.getTime;new Date(NaN)+""!=o&&r(i,"toString",(function(){var e=s.call(this);return e==e?a.call(this):o}))},4812:function(e,t,n){n(2109)({target:"Function",proto:!0},{bind:n(7065)})},8309:function(e,t,n){var r=n(9781),i=n(3070).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/,u="name";r&&!(u in o)&&i(o,u,{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},9653:function(e,t,n){"use strict";var r=n(9781),i=n(7854),o=n(4705),a=n(1320),s=n(6656),u=n(4326),c=n(9587),l=n(7593),f=n(7293),h=n(30),p=n(8006).f,d=n(1236).f,v=n(3070).f,g=n(3111).trim,y="Number",m=i.Number,_=m.prototype,b=u(h(_))==y,w=function(e){var t,n,r,i,o,a,s,u,c=l(e,!1);if("string"==typeof c&&c.length>2)if(43===(t=(c=g(c)).charCodeAt(0))||45===t){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=c.slice(2)).length,s=0;s<a;s++)if((u=o.charCodeAt(s))<48||u>i)return NaN;return parseInt(o,r)}return+c};if(o(y,!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var x,S=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof S&&(b?f((function(){_.valueOf.call(n)})):u(n)!=y)?c(new m(w(t)),n,S):w(t)},k=r?p(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),T=0;k.length>T;T++)s(m,x=k[T])&&!s(S,x)&&v(S,x,d(m,x));S.prototype=_,_.constructor=S,a(i,y,S)}},1539:function(e,t,n){var r=n(1694),i=n(1320),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},2479:function(e,t,n){var r=n(2109),i=n(4699).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},1058:function(e,t,n){var r=n(2109),i=n(3009);r({global:!0,forced:parseInt!=i},{parseInt:i})},7727:function(e,t,n){"use strict";var r=n(2109),i=n(1913),o=n(3366),a=n(7293),s=n(5005),u=n(6707),c=n(9478),l=n(1320);r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,s("Promise")),n="function"==typeof e;return this.then(n?function(n){return c(t,e()).then((function(){return n}))}:e,n?function(n){return c(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",s("Promise").prototype.finally)},8674:function(e,t,n){"use strict";var r,i,o,a,s=n(2109),u=n(1913),c=n(7854),l=n(5005),f=n(3366),h=n(1320),p=n(2248),d=n(8003),v=n(6340),g=n(111),y=n(3099),m=n(5787),_=n(2788),b=n(408),w=n(7072),x=n(6707),S=n(261).set,k=n(5948),T=n(9478),C=n(842),R=n(8523),L=n(2534),P=n(9909),O=n(4705),E=n(5112),A=n(5268),I=n(7392),D=E("species"),j="Promise",F=P.get,M=P.set,U=P.getterFor(j),N=f,V=c.TypeError,B=c.document,G=c.process,z=l("fetch"),q=R.f,H=q,W=!!(B&&B.createEvent&&c.dispatchEvent),J="function"==typeof PromiseRejectionEvent,K="unhandledrejection",Y=O(j,(function(){if(_(N)===String(N)){if(66===I)return!0;if(!A&&!J)return!0}if(u&&!N.prototype.finally)return!0;if(I>=51&&/native code/.test(N))return!1;var e=N.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[D]=t,!(e.then((function(){}))instanceof t)})),$=Y||!w((function(e){N.all(e).catch((function(){}))})),X=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},Z=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;k((function(){for(var r=e.value,i=1==e.state,o=0;n.length>o;){var a,s,u,c=n[o++],l=i?c.ok:c.fail,f=c.resolve,h=c.reject,p=c.domain;try{l?(i||(2===e.rejection&&ne(e),e.rejection=1),!0===l?a=r:(p&&p.enter(),a=l(r),p&&(p.exit(),u=!0)),a===c.promise?h(V("Promise-chain cycle")):(s=X(a))?s.call(a,f,h):f(a)):h(r)}catch(e){p&&!u&&p.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ee(e)}))}},Q=function(e,t,n){var r,i;W?((r=B.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!J&&(i=c["on"+e])?i(r):e===K&&C("Unhandled promise rejection",n)},ee=function(e){S.call(c,(function(){var t,n=e.facade,r=e.value;if(te(e)&&(t=L((function(){A?G.emit("unhandledRejection",r,n):Q(K,n,r)})),e.rejection=A||te(e)?2:1,t.error))throw t.value}))},te=function(e){return 1!==e.rejection&&!e.parent},ne=function(e){S.call(c,(function(){var t=e.facade;A?G.emit("rejectionHandled",t):Q("rejectionhandled",t,e.value)}))},re=function(e,t,n){return function(r){e(t,r,n)}},ie=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Z(e,!0))},oe=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw V("Promise can't be resolved itself");var r=X(t);r?k((function(){var n={done:!1};try{r.call(t,re(oe,n,e),re(ie,n,e))}catch(t){ie(n,t,e)}})):(e.value=t,e.state=1,Z(e,!1))}catch(t){ie({done:!1},t,e)}}};Y&&(N=function(e){m(this,N,j),y(e),r.call(this);var t=F(this);try{e(re(oe,t),re(ie,t))}catch(e){ie(t,e)}},(r=function(e){M(this,{type:j,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(N.prototype,{then:function(e,t){var n=U(this),r=q(x(this,N));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=A?G.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Z(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=F(e);this.promise=e,this.resolve=re(oe,t),this.reject=re(ie,t)},R.f=q=function(e){return e===N||e===o?new i(e):H(e)},u||"function"!=typeof f||(a=f.prototype.then,h(f.prototype,"then",(function(e,t){var n=this;return new N((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof z&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return T(N,z.apply(c,arguments))}}))),s({global:!0,wrap:!0,forced:Y},{Promise:N}),d(N,j,!1,!0),v(j),o=l(j),s({target:j,stat:!0,forced:Y},{reject:function(e){var t=q(this);return t.reject.call(void 0,e),t.promise}}),s({target:j,stat:!0,forced:u||Y},{resolve:function(e){return T(u&&this===o?N:this,e)}}),s({target:j,stat:!0,forced:$},{all:function(e){var t=this,n=q(t),r=n.resolve,i=n.reject,o=L((function(){var n=y(t.resolve),o=[],a=0,s=1;b(e,(function(e){var u=a++,c=!1;o.push(void 0),s++,n.call(t,e).then((function(e){c||(c=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=q(t),r=n.reject,i=L((function(){var i=y(t.resolve);b(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},4916:function(e,t,n){"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:function(e,t,n){"use strict";var r=n(1320),i=n(9670),o=n(7293),a=n(7066),s="toString",u=RegExp.prototype,c=u.toString,l=o((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),f=c.name!=s;(l||f)&&r(RegExp.prototype,s,(function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in u)?a.call(e):n)}),{unsafe:!0})},7852:function(e,t,n){"use strict";var r,i=n(2109),o=n(1236).f,a=n(7466),s=n(3929),u=n(4488),c=n(4964),l=n(1913),f="".endsWith,h=Math.min,p=c("endsWith");i({target:"String",proto:!0,forced:!(!l&&!p&&(r=o(String.prototype,"endsWith"),r&&!r.writable)||p)},{endsWith:function(e){var t=String(u(this));s(e);var n=arguments.length>1?arguments[1]:void 0,r=a(t.length),i=void 0===n?r:h(a(n),r),o=String(e);return f?f.call(t,o,i):t.slice(i-o.length,i)===o}})},2023:function(e,t,n){"use strict";var r=n(2109),i=n(3929),o=n(4488);r({target:"String",proto:!0,forced:!n(4964)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},8783:function(e,t,n){"use strict";var r=n(8710).charAt,i=n(9909),o=n(654),a="String Iterator",s=i.set,u=i.getterFor(a);o(String,"String",(function(e){s(this,{type:a,string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},4723:function(e,t,n){"use strict";var r=n(7007),i=n(9670),o=n(7466),a=n(4488),s=n(1530),u=n(7651);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),c=String(this);if(!a.global)return u(a,c);var l=a.unicode;a.lastIndex=0;for(var f,h=[],p=0;null!==(f=u(a,c));){var d=String(f[0]);h[p]=d,""===d&&(a.lastIndex=s(c,o(a.lastIndex),l)),p++}return 0===p?null:h}]}))},3112:function(e,t,n){"use strict";var r=n(2109),i=n(6650).start;r({target:"String",proto:!0,forced:n(4986)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},2481:function(e,t,n){n(2109)({target:"String",proto:!0},{repeat:n(8415)})},4765:function(e,t,n){"use strict";var r=n(7007),i=n(9670),o=n(4488),a=n(1150),s=n(7651);r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),u=String(this),c=o.lastIndex;a(c,0)||(o.lastIndex=0);var l=s(o,u);return a(o.lastIndex,c)||(o.lastIndex=c),null===l?-1:l.index}]}))},3123:function(e,t,n){"use strict";var r=n(7007),i=n(7850),o=n(9670),a=n(4488),s=n(6707),u=n(1530),c=n(7466),l=n(7651),f=n(2261),h=n(7293),p=[].push,d=Math.min,v=4294967295,g=!h((function(){return!RegExp(v,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?v:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var s,u,c,l=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,g=new RegExp(e.source,h+"g");(s=f.call(g,r))&&!((u=g.lastIndex)>d&&(l.push(r.slice(d,s.index)),s.length>1&&s.index<r.length&&p.apply(l,s.slice(1)),c=s[0].length,d=u,l.length>=o));)g.lastIndex===s.index&&g.lastIndex++;return d===r.length?!c&&g.test("")||l.push(""):l.push(r.slice(d)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),h=String(this),p=s(f,RegExp),y=f.unicode,m=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(g?"y":"g"),_=new p(g?f:"^(?:"+f.source+")",m),b=void 0===i?v:i>>>0;if(0===b)return[];if(0===h.length)return null===l(_,h)?[h]:[];for(var w=0,x=0,S=[];x<h.length;){_.lastIndex=g?x:0;var k,T=l(_,g?h:h.slice(x));if(null===T||(k=d(c(_.lastIndex+(g?0:x)),h.length))===w)x=u(h,x,y);else{if(S.push(h.slice(w,x)),S.length===b)return S;for(var C=1;C<=T.length-1;C++)if(S.push(T[C]),S.length===b)return S;x=w=k}}return S.push(h.slice(w)),S}]}),!g)},6755:function(e,t,n){"use strict";var r,i=n(2109),o=n(1236).f,a=n(7466),s=n(3929),u=n(4488),c=n(4964),l=n(1913),f="".startsWith,h=Math.min,p=c("startsWith");i({target:"String",proto:!0,forced:!(!l&&!p&&(r=o(String.prototype,"startsWith"),r&&!r.writable)||p)},{startsWith:function(e){var t=String(u(this));s(e);var n=a(h(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return f?f.call(t,r,n):t.slice(n,n+r.length)===r}})},4747:function(e,t,n){var r=n(7854),i=n(8324),o=n(8533),a=n(8880);for(var s in i){var u=r[s],c=u&&u.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(e){c.forEach=o}}},3948:function(e,t,n){var r=n(7854),i=n(8324),o=n(6992),a=n(8880),s=n(5112),u=s("iterator"),c=s("toStringTag"),l=o.values;for(var f in i){var h=r[f],p=h&&h.prototype;if(p){if(p[u]!==l)try{a(p,u,l)}catch(e){p[u]=l}if(p[c]||a(p,c,f),i[f])for(var d in o)if(p[d]!==o[d])try{a(p,d,o[d])}catch(e){p[d]=o[d]}}}},2564:function(e,t,n){var r=n(2109),i=n(7854),o=n(8113),a=[].slice,s=function(e){return function(t,n){var r=arguments.length>2,i=r?a.call(arguments,2):void 0;return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(o)},{setTimeout:s(i.setTimeout),setInterval:s(i.setInterval)})},1637:function(e,t,n){"use strict";n(6992);var r=n(2109),i=n(5005),o=n(590),a=n(1320),s=n(2248),u=n(8003),c=n(4994),l=n(9909),f=n(5787),h=n(6656),p=n(9974),d=n(648),v=n(9670),g=n(111),y=n(30),m=n(9114),_=n(8554),b=n(1246),w=n(5112),x=i("fetch"),S=i("Headers"),k=w("iterator"),T="URLSearchParams",C="URLSearchParamsIterator",R=l.set,L=l.getterFor(T),P=l.getterFor(C),O=/\+/g,E=Array(4),A=function(e){return E[e-1]||(E[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},I=function(e){try{return decodeURIComponent(e)}catch(t){return e}},D=function(e){var t=e.replace(O," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(A(n--),I);return t}},j=/[!'()~]|%20/g,F={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},M=function(e){return F[e]},U=function(e){return encodeURIComponent(e).replace(j,M)},N=function(e,t){if(t)for(var n,r,i=t.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),e.push({key:D(r.shift()),value:D(r.join("="))}))},V=function(e){this.entries.length=0,N(this.entries,e)},B=function(e,t){if(e<t)throw TypeError("Not enough arguments")},G=c((function(e,t){R(this,{type:C,iterator:_(L(e).entries),kind:t})}),"Iterator",(function(){var e=P(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),z=function(){f(this,z,T);var e,t,n,r,i,o,a,s,u,c=arguments.length>0?arguments[0]:void 0,l=this,p=[];if(R(l,{type:T,entries:p,updateURL:function(){},updateSearchParams:V}),void 0!==c)if(g(c))if("function"==typeof(e=b(c)))for(n=(t=e.call(c)).next;!(r=n.call(t)).done;){if((a=(o=(i=_(v(r.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");p.push({key:a.value+"",value:s.value+""})}else for(u in c)h(c,u)&&p.push({key:u,value:c[u]+""});else N(p,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},q=z.prototype;s(q,{append:function(e,t){B(arguments.length,2);var n=L(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){B(arguments.length,1);for(var t=L(this),n=t.entries,r=e+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){B(arguments.length,1);for(var t=L(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){B(arguments.length,1);for(var t=L(this).entries,n=e+"",r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){B(arguments.length,1);for(var t=L(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){B(arguments.length,1);for(var n,r=L(this),i=r.entries,o=!1,a=e+"",s=t+"",u=0;u<i.length;u++)(n=i[u]).key===a&&(o?i.splice(u--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var e,t,n,r=L(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(e=o[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=L(this).entries,r=p(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new G(this,"keys")},values:function(){return new G(this,"values")},entries:function(){return new G(this,"entries")}},{enumerable:!0}),a(q,k,q.entries),a(q,"toString",(function(){for(var e,t=L(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(U(e.key)+"="+U(e.value));return n.join("&")}),{enumerable:!0}),u(z,T),r({global:!0,forced:!o},{URLSearchParams:z}),o||"function"!=typeof x||"function"!=typeof S||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,i=[e];return arguments.length>1&&(g(t=arguments[1])&&(n=t.body,d(n)===T&&((r=t.headers?new S(t.headers):new S).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=y(t,{body:m(0,String(n)),headers:m(0,r)}))),i.push(t)),x.apply(this,i)}}),e.exports={URLSearchParams:z,getState:L}},285:function(e,t,n){"use strict";n(8783);var r,i=n(2109),o=n(9781),a=n(590),s=n(7854),u=n(6048),c=n(1320),l=n(5787),f=n(6656),h=n(1574),p=n(8457),d=n(8710).codeAt,v=n(3197),g=n(8003),y=n(1637),m=n(9909),_=s.URL,b=y.URLSearchParams,w=y.getState,x=m.set,S=m.getterFor("URL"),k=Math.floor,T=Math.pow,C="Invalid scheme",R="Invalid host",L="Invalid port",P=/[A-Za-z]/,O=/[\d+-.A-Za-z]/,E=/\d/,A=/^(0x|0X)/,I=/^[0-7]+$/,D=/^\d+$/,j=/^[\dA-Fa-f]+$/,F=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,M=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,U=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,N=/[\u0009\u000A\u000D]/g,V=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return R;if(!(n=G(t.slice(1,-1))))return R;e.host=n}else if($(e)){if(t=v(t),F.test(t))return R;if(null===(n=B(t)))return R;e.host=n}else{if(M.test(t))return R;for(n="",r=p(t),i=0;i<r.length;i++)n+=K(r[i],q);e.host=n}},B=function(e){var t,n,r,i,o,a,s,u=e.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=A.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?D:8==o?I:j).test(i))return e;a=parseInt(i,o)}n.push(a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=T(256,5-t))return null}else if(a>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*T(256,3-r);return s},G=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return e.charAt(f)};if(":"==h()){if(":"!=e.charAt(1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&j.test(h());)t=16*t+parseInt(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,c>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!E.test(h()))return;for(;E.test(h());){if(o=parseInt(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u},z=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=k(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},q={},H=h({},q,{" ":1,'"':1,"<":1,">":1,"`":1}),W=h({},H,{"#":1,"?":1,"{":1,"}":1}),J=h({},W,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),K=function(e,t){var n=d(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},Y={ftp:21,file:null,http:80,https:443,ws:80,wss:443},$=function(e){return f(Y,e.scheme)},X=function(e){return""!=e.username||""!=e.password},Z=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Q=function(e,t){var n;return 2==e.length&&P.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},ee=function(e){var t;return e.length>1&&Q(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&Q(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},re={},ie={},oe={},ae={},se={},ue={},ce={},le={},fe={},he={},pe={},de={},ve={},ge={},ye={},me={},_e={},be={},we={},xe={},Se={},ke=function(e,t,n,i){var o,a,s,u,c,l=n||re,h=0,d="",v=!1,g=!1,y=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(U,"")),t=t.replace(N,""),o=p(t);h<=o.length;){switch(a=o[h],l){case re:if(!a||!P.test(a)){if(n)return C;l=oe;continue}d+=a.toLowerCase(),l=ie;break;case ie:if(a&&(O.test(a)||"+"==a||"-"==a||"."==a))d+=a.toLowerCase();else{if(":"!=a){if(n)return C;d="",l=oe,h=0;continue}if(n&&($(e)!=f(Y,d)||"file"==d&&(X(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,n)return void($(e)&&Y[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?l=ge:$(e)&&i&&i.scheme==e.scheme?l=ae:$(e)?l=le:"/"==o[h+1]?(l=se,h++):(e.cannotBeABaseURL=!0,e.path.push(""),l=we)}break;case oe:if(!i||i.cannotBeABaseURL&&"#"!=a)return C;if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,l=Se;break}l="file"==i.scheme?ge:ue;continue;case ae:if("/"!=a||"/"!=o[h+1]){l=ue;continue}l=fe,h++;break;case se:if("/"==a){l=he;break}l=be;continue;case ue:if(e.scheme=i.scheme,a==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==a||"\\"==a&&$(e))l=ce;else if("?"==a)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",l=xe;else{if("#"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),l=be;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",l=Se}break;case ce:if(!$(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,l=be;continue}l=he}else l=fe;break;case le:if(l=fe,"/"!=a||"/"!=d.charAt(h+1))continue;h++;break;case fe:if("/"!=a&&"\\"!=a){l=he;continue}break;case he:if("@"==a){v&&(d="%40"+d),v=!0,s=p(d);for(var m=0;m<s.length;m++){var _=s[m];if(":"!=_||y){var b=K(_,J);y?e.password+=b:e.username+=b}else y=!0}d=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&$(e)){if(v&&""==d)return"Invalid authority";h-=p(d).length+1,d="",l=pe}else d+=a;break;case pe:case de:if(n&&"file"==e.scheme){l=me;continue}if(":"!=a||g){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&$(e)){if($(e)&&""==d)return R;if(n&&""==d&&(X(e)||null!==e.port))return;if(u=V(e,d))return u;if(d="",l=_e,n)return;continue}"["==a?g=!0:"]"==a&&(g=!1),d+=a}else{if(""==d)return R;if(u=V(e,d))return u;if(d="",l=ve,n==de)return}break;case ve:if(!E.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&$(e)||n){if(""!=d){var w=parseInt(d,10);if(w>65535)return L;e.port=$(e)&&w===Y[e.scheme]?null:w,d=""}if(n)return;l=_e;continue}return L}d+=a;break;case ge:if(e.scheme="file","/"==a||"\\"==a)l=ye;else{if(!i||"file"!=i.scheme){l=be;continue}if(a==r)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==a)e.host=i.host,e.path=i.path.slice(),e.query="",l=xe;else{if("#"!=a){ee(o.slice(h).join(""))||(e.host=i.host,e.path=i.path.slice(),te(e)),l=be;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",l=Se}}break;case ye:if("/"==a||"\\"==a){l=me;break}i&&"file"==i.scheme&&!ee(o.slice(h).join(""))&&(Q(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),l=be;continue;case me:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&Q(d))l=be;else if(""==d){if(e.host="",n)return;l=_e}else{if(u=V(e,d))return u;if("localhost"==e.host&&(e.host=""),n)return;d="",l=_e}continue}d+=a;break;case _e:if($(e)){if(l=be,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(l=be,"/"!=a))continue}else e.fragment="",l=Se;else e.query="",l=xe;break;case be:if(a==r||"/"==a||"\\"==a&&$(e)||!n&&("?"==a||"#"==a)){if(".."===(c=(c=d).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(te(e),"/"==a||"\\"==a&&$(e)||e.path.push("")):ne(d)?"/"==a||"\\"==a&&$(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Q(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(a==r||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",l=xe):"#"==a&&(e.fragment="",l=Se)}else d+=K(a,W);break;case we:"?"==a?(e.query="",l=xe):"#"==a?(e.fragment="",l=Se):a!=r&&(e.path[0]+=K(a,q));break;case xe:n||"#"!=a?a!=r&&("'"==a&&$(e)?e.query+="%27":e.query+="#"==a?"%23":K(a,q)):(e.fragment="",l=Se);break;case Se:a!=r&&(e.fragment+=K(a,H))}h++}},Te=function(e){var t,n,r=l(this,Te,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),s=x(r,{type:"URL"});if(void 0!==i)if(i instanceof Te)t=S(i);else if(n=ke(t={},String(i)))throw TypeError(n);if(n=ke(s,a,null,t))throw TypeError(n);var u=s.searchParams=new b,c=w(u);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(u)||null},o||(r.href=Re.call(r),r.origin=Le.call(r),r.protocol=Pe.call(r),r.username=Oe.call(r),r.password=Ee.call(r),r.host=Ae.call(r),r.hostname=Ie.call(r),r.port=De.call(r),r.pathname=je.call(r),r.search=Fe.call(r),r.searchParams=Me.call(r),r.hash=Ue.call(r))},Ce=Te.prototype,Re=function(){var e=S(this),t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",X(e)&&(c+=n+(r?":"+r:"")+"@"),c+=z(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},Le=function(){var e=S(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&$(e)?t+"://"+z(e.host)+(null!==n?":"+n:""):"null"},Pe=function(){return S(this).scheme+":"},Oe=function(){return S(this).username},Ee=function(){return S(this).password},Ae=function(){var e=S(this),t=e.host,n=e.port;return null===t?"":null===n?z(t):z(t)+":"+n},Ie=function(){var e=S(this).host;return null===e?"":z(e)},De=function(){var e=S(this).port;return null===e?"":String(e)},je=function(){var e=S(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Fe=function(){var e=S(this).query;return e?"?"+e:""},Me=function(){return S(this).searchParams},Ue=function(){var e=S(this).fragment;return e?"#"+e:""},Ne=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&u(Ce,{href:Ne(Re,(function(e){var t=S(this),n=String(e),r=ke(t,n);if(r)throw TypeError(r);w(t.searchParams).updateSearchParams(t.query)})),origin:Ne(Le),protocol:Ne(Pe,(function(e){var t=S(this);ke(t,String(e)+":",re)})),username:Ne(Oe,(function(e){var t=S(this),n=p(String(e));if(!Z(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=K(n[r],J)}})),password:Ne(Ee,(function(e){var t=S(this),n=p(String(e));if(!Z(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=K(n[r],J)}})),host:Ne(Ae,(function(e){var t=S(this);t.cannotBeABaseURL||ke(t,String(e),pe)})),hostname:Ne(Ie,(function(e){var t=S(this);t.cannotBeABaseURL||ke(t,String(e),de)})),port:Ne(De,(function(e){var t=S(this);Z(t)||(""==(e=String(e))?t.port=null:ke(t,e,ve))})),pathname:Ne(je,(function(e){var t=S(this);t.cannotBeABaseURL||(t.path=[],ke(t,e+"",_e))})),search:Ne(Fe,(function(e){var t=S(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",ke(t,e,xe)),w(t.searchParams).updateSearchParams(t.query)})),searchParams:Ne(Me),hash:Ne(Ue,(function(e){var t=S(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",ke(t,e,Se)):t.fragment=null}))}),c(Ce,"toJSON",(function(){return Re.call(this)}),{enumerable:!0}),c(Ce,"toString",(function(){return Re.call(this)}),{enumerable:!0}),_){var Ve=_.createObjectURL,Be=_.revokeObjectURL;Ve&&c(Te,"createObjectURL",(function(e){return Ve.apply(_,arguments)})),Be&&c(Te,"revokeObjectURL",(function(e){return Be.apply(_,arguments)}))}g(Te,"URL"),i({global:!0,forced:!a,sham:!o},{URL:Te})},5666:function(e,t,n){var r=n(202).default,i=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),a=new L(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function g(){}function y(){}function m(){}var _={};_[a]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==n&&i.call(w,a)&&(_=w);var x=m.prototype=g.prototype=Object.create(_);function S(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function k(e,t){function n(r,o,a,s){var u=l(e[r],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}}function T(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function P(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:O}}function O(){return{value:t,done:!0}}return y.prototype=x.constructor=m,m.constructor=y,m[u]=y.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},S(k.prototype),k.prototype[s]=function(){return this},e.AsyncIterator=k,e.async=function(t,n,i,o,a){void 0===a&&(a=r);var s=new k(c(t,n,i,o),a);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},S(x),x[u]="Generator",x[a]=function(){return this},x.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=i}catch(e){Function("r","regeneratorRuntime = r")(i)}}},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(2874)}()}));
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.phenix=t():e.phenix=t()}(self,(function(){return function(){var e={7228:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},2858:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},3646:function(e,t,n){var r=n(7228);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},1506:function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},8926:function(e,t,n){var r=n(202).default;function i(e,t,n,i,o,a,s){try{var u=e[a](s),c=u.value}catch(e){return void n(e)}u.done?t(c):r.resolve(c).then(i,o)}e.exports=function(e){return function(){var t=this,n=arguments;return new r((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},4575:function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},3913:function(e){function t(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},9713:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},9754:function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},2205:function(e,t,n){var r=n(9489);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},6860:function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},3884:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}},e.exports.__esModule=!0,e.exports.default=e.exports},521:function(e){e.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.")},e.exports.__esModule=!0,e.exports.default=e.exports},8206:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},8585:function(e,t,n){var r=n(8).default,i=n(1506);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},9591:function(e,t,n){var r=n(202).default,i=n(8).default;function o(){"use strict";e.exports=o=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,a=n.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},u=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function h(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),a=new R(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=p(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var d={};function v(){}function g(){}function y(){}var m={};f(m,u,(function(){return this}));var _=Object.getPrototypeOf,b=_&&_(_(L([])));b&&b!==n&&a.call(b,u)&&(m=b);var w=y.prototype=v.prototype=Object.create(m);function x(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(r,o,s,u){var c=p(e[r],e,o);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==i(f)&&a.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,u)}),(function(e){n("throw",e,s,u)})):t.resolve(f).then((function(e){l.value=e,s(l)}),(function(e){return n("throw",e,s,u)}))}u(c.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=p(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function L(e){if(e){var t=e[u];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(a.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:P}}function P(){return{value:void 0,done:!0}}return g.prototype=y,f(w,"constructor",y),f(y,"constructor",g),g.displayName=f(y,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,f(e,l,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},x(S.prototype),f(S.prototype,c,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,i,o,a){void 0===a&&(a=r);var s=new S(h(e,n,i,o),a);return t.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},x(w),f(w,l,"Generator"),f(w,u,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=L,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=a.call(i,"catchLoc"),u=a.call(i,"finallyLoc");if(s&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},9489:function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},3038:function(e,t,n){var r=n(2858),i=n(3884),o=n(379),a=n(521);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},319:function(e,t,n){var r=n(3646),i=n(6860),o=n(379),a=n(8206);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},8:function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},379:function(e,t,n){var r=n(7228);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},7757:function(e,t,n){var r=n(9591)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},202:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}}),n(9753),n(7042),n(1539),n(8674),n(7727),n(2564);var r=n(8),i=n.n(r),o=n(4575),a=n.n(o),s=n(3913),u=n.n(s),c=n(9713),l=n.n(c),f=u()((function e(t,n,r){a()(this,e),l()(this,"onFulfilled",void 0),l()(this,"onRejected",void 0),l()(this,"promise",void 0),this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof n?n:null,this.promise=r})),h=function(){function e(t){if(a()(this,e),l()(this,"_state",void 0),l()(this,"_handled",void 0),l()(this,"_value",void 0),l()(this,"_deferreds",void 0),!(this instanceof e))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],this.doResolve(t)}return u()(e,[{key:"doResolve",value:function(e){var t=this,n=!1;try{e((function(e){n||(n=!0,t.promiseResolve(e))}),(function(e){n||(n=!0,t.promiseReject(e))}))}catch(e){if(n)return;n=!0,this.promiseReject(e)}}},{key:"promiseResolve",value:function(t){var n=this;try{if(t===n)throw new TypeError("A Promise cannot be resolved with it self.");if(t&&("object"===i()(t)||"function"==typeof t)){var r=t.then;if(t instanceof e)return n._state=3,n._value=t,void n.finale();if("function"==typeof r)return void n.doResolve((function(){r.apply(t,arguments)}))}n._state=1,n._value=t,n.finale()}catch(e){n.promiseReject(e)}}},{key:"promiseReject",value:function(e){this._state=2,this._value=e,this.finale()}},{key:"finale",value:function(){var t=this;2===this._state&&0===this._deferreds.length&&e._immediate((function(){t._handled||e._unhandledRejection(t._value)}));for(var n=0,r=this._deferreds.length;n<r;n++)this.handle(this._deferreds[n]);this._deferreds=null}},{key:"handle",value:function(t){for(var n=this;3===n._state;)n=n._value;0!==n._state?(n._handled=!0,e._immediate((function(){var e=1===n._state?t.onFulfilled:t.onRejected;if(null!==e){var r;try{r=e(n._value)}catch(e){return void t.promise.promiseReject(e)}t.promise.promiseResolve(r)}else 1===n._state?t.promise.promiseResolve(n._value):t.promise.promiseReject(n._value)}))):n._deferreds.push(t)}}],[{key:"all",value:function(t){return new e((function(e,n){if(!Array.isArray(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);for(var o=r.length,a=function t(a,s){try{if(s&&("object"===i()(s)||"function"==typeof s)){var u=s.then;if("function"==typeof u)return void u.call(s,(function(e){return t(a,e)}),n)}r[a]=s,0==--o&&e(r)}catch(e){n(e)}},s=0;s<r.length;s++)a(s,r[s])}))}},{key:"resolve",value:function(t){return t&&"object"===i()(t)&&t.constructor===e?t:new e((function(e){return e(t)}))}},{key:"reject",value:function(t){return new e((function(e,n){return n(t)}))}},{key:"race",value:function(t){return new e((function(n,r){if(!Array.isArray(t))return r(new TypeError("Promise.race accepts an array"));for(var i=0,o=t.length;i<o;i++)e.resolve(t[i]).then(n,r)}))}},{key:"_immediate",value:function(e){setTimeout(e,0)}},{key:"_unhandledRejection",value:function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)}}]),e}();h.prototype.catch=function(e){return this.then(null,e)},h.prototype.then=function(e,t){var n=new this.constructor((function(){return null}));return this.handle(new f(e,t,n)),n},h.prototype.finally=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))};var p=h},2874:function(e,t,n){"use strict";n.r(t),n.d(t,{SDK:function(){return he},default:function(){return Be}}),n(9826),n(3843),n(3710),n(1539),n(9714);var r,i=n(4575),o=n.n(i),a=n(3913),s=n.n(a),u=n(9713),c=n.n(u);n(4812),n(9554),n(6699),n(2772),n(5827),n(561),n(4747),function(e){e[e.All=-1]="All",e[e.Trace=10]="Trace",e[e.Debug=20]="Debug",e[e.Info=30]="Info",e[e.Warn=40]="Warn",e[e.Error=50]="Error",e[e.Fatal=60]="Fatal",e[e.Off=100]="Off"}(r||(r={}));var l=function(){function e(t,n,r){o()(this,e),c()(this,"_category",void 0),c()(this,"_appenders",void 0),c()(this,"_threshold",void 0),this._category=t,this._appenders=n,this._threshold=r}return s()(e,[{key:"category",get:function(){return this._category}},{key:"appenders",get:function(){return this._appenders}},{key:"threshold",get:function(){return this._threshold}},{key:"trace",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Trace)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Trace,t)}}},{key:"debug",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Debug)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Debug,t)}}},{key:"info",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Info)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Info,t)}}},{key:"warn",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Warn)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Warn,t)}}},{key:"error",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Error)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Error,t)}}},{key:"fatal",value:function(){if(this._threshold.value&&!(this._threshold.value>r.Fatal)){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.log(r.Fatal,t)}}},{key:"log",value:function(e,t){var n=this,r=new Date,i=this.replacePlaceholders(t);this._appenders.value.forEach((function(t){t.log(e,i,n.category,r)}))}},{key:"replacePlaceholders",value:function(e){for(var t=this,n=e[0],r=0;n.indexOf&&e.length>1&&r>=0;)if((r=n.indexOf("%",r))>0)switch(n.substring(r+1,r+2)){case"%":n=n.substring(0,r)+n.substring(r+1),r++;break;case"s":case"d":e[0]=n=this.replaceArgument(this.toString(e[1]),n,r),e.splice(1,1);break;case"j":e[0]=n=this.replaceArgument(this.stringify(e[1]),n,r),e.splice(1,1);break;default:return e.toString()}return e.length>1&&(e=e.reduce((function(e,n,r,i){return r+1===i.length&&n instanceof Error?e+"\n"+t.toString(n.stack):e+"[".concat(t.toString(n),"]")}))),e.toString()}},{key:"stringify",value:function(e){var t=[];try{return JSON.stringify(e instanceof Error?this.toString(e):e,(function(e,n){if(n&&n instanceof Object){if(t.includes(n))return"<recursive>";t.push(n)}return n}),2)}catch(e){return"[object invalid JSON.stringify]"}}},{key:"replaceArgument",value:function(e,t,n){return t.substring(0,n)+this.toString(e)+t.substring(n+2)}},{key:"toString",value:function(e){if("string"==typeof e)return e;if("boolean"==typeof e)return e?"true":"false";if("number"==typeof e)return e.toString();var t="";if(e)if("function"==typeof e)t=e.toString();else if(e instanceof Object)try{t=e.toString()}catch(e){t="[object invalid toString()]"}return t}}]),e}(),f=function(){function e(){o()(this,e),c()(this,"_appenders",[])}return s()(e,[{key:"value",get:function(){return this._appenders}},{key:"add",value:function(e){this._appenders.push(e)}},{key:"remove",value:function(e){this._appenders=this._appenders.reduce((function(t,n){return n!==e&&t.push(n),t}),[])}}]),e}(),h=function(){function e(){o()(this,e)}return s()(e,null,[{key:"isPrivate",get:function(){return this._isPrivate}},{key:"applyIsPrivate",value:function(){try{this._isPrivate=!1}catch(e){this._isPrivate=!1}}}]),e}();c()(h,"_isPrivate",void 0),h.applyIsPrivate();var p=function(){function e(){o()(this,e)}return s()(e,null,[{key:"defaultLoggingLevel",get:function(){return h.isPrivate?r.Off:r.All}},{key:"defaultConsoleLoggingLevel",get:function(){return h.isPrivate?r.Off:r.All}},{key:"defaultTelemetryLoggingLevel",get:function(){return r.Info}}]),e}(),d=function(){function e(){o()(this,e),c()(this,"_threshold",p.defaultLoggingLevel)}return s()(e,[{key:"value",get:function(){return this._threshold}},{key:"setThreshold",value:function(e){this._threshold=e}}]),e}(),v=(n(2222),n(8733),function(){function e(t){o()(this,e),c()(this,"_threshold",void 0),this._threshold=t}return s()(e,[{key:"log",value:function(e,t,n,i){if(!(e<this._threshold)){var o="".concat(i.toISOString()," [").concat(n,"] [").concat(r[e],"] ").concat(t);e<r.Warn?console.log(o):console.error(o)}}}]),e}()),g=(n(7042),n(2479),n(8674),n(5666),n(8926)),y=n.n(g),m=n(7757),_=n.n(m),b=function(){function e(){o()(this,e)}return s()(e,null,[{key:"sdkVersion",get:function(){try{return"2022-09-27T18:35:22.910Z (2022.0.10-beta.21)"}catch(e){return this._defaultVersion}}}]),e}();c()(b,"_defaultVersion",(new Date).toISOString());var w,x=function(){function e(t){o()(this,e),c()(this,"_telemetryConfiguration",void 0),c()(this,"_logs",[]),c()(this,"_isSending",void 0),c()(this,"_domain",location.hostname),this._telemetryConfiguration=t}var t,n;return s()(e,[{key:"push",value:function(e,t,n,i){var o={timestamp:i.toISOString(),tenancy:this._telemetryConfiguration.tenancy,level:r[e],category:n,message:t,sessionId:this._telemetryConfiguration.sessionId,version:b.sdkVersion,environment:this._telemetryConfiguration.environment,fullQualifiedName:this._domain};e<r.Error?this._logs.push(o):this._logs.unshift(o),this.sendLogsIfAble()}},{key:"sendLogs",value:(n=y()(_().mark((function e(t){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new FormData).append("jsonBody",JSON.stringify({records:t})),e.next=4,fetch(this._telemetryConfiguration.url,{method:"POST",body:n});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"sendLogsIfAble",value:(t=y()(_().mark((function e(){var t,n,r,i,o=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._logs.length<=0||this._isSending)){e.next=2;break}return e.abrupt("return");case 2:for(t=0,n=0,this._isSending=!0,r=function(e){return Object.values(e).reduce((function(e,t){return e+(t?t.length:0)}),0)};this._logs.length>t&&r(this._logs[t])+n<8192;)n+=r(this._logs[t]),t++;return t||(this._logs[t].message=this._logs[t].message.substring(0,r(this._logs[t])+(8192-r(this._logs[t]))),t=1),i=this._logs.slice(0,t),this._logs=this._logs.slice(t),e.abrupt("return",this.sendLogs(i).then((function(e){return o._isSending=!1,o.sendLogsIfAble(),e})).catch((function(){o._isSending=!1,o.sendLogsIfAble()})));case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),S=function(){function e(t){o()(this,e),c()(this,"_telemetryService",void 0),c()(this,"_tenancy",void 0),c()(this,"_sessionId",void 0),c()(this,"_threshold",void 0),this._tenancy=t.tenancy,this._sessionId=t.sessionId,this._threshold=t.threshold,this._telemetryService=new x(t)}return s()(e,[{key:"log",value:function(e,t,n,r){e<this._threshold||this._telemetryService.push(e,t,n,r)}}]),e}(),k=(n(6992),n(8783),n(3948),n(285),function(){function e(){o()(this,e),c()(this,"_url","https://telemetry.phenixrts.com/telemetry/logs"),c()(this,"_tenancy",void 0),c()(this,"_sessionId",void 0),c()(this,"_environment",void 0),c()(this,"_threshold",p.defaultTelemetryLoggingLevel)}return s()(e,[{key:"url",get:function(){return this._url},set:function(e){var t=new URL(e);t.pathname=t.pathname+"/logs",this._url=t.toString()}},{key:"environment",get:function(){return this._environment},set:function(e){this._environment=e}},{key:"tenancy",get:function(){return this._tenancy},set:function(e){this._tenancy=e}},{key:"sessionId",get:function(){return this._sessionId},set:function(e){this._sessionId=e}},{key:"threshold",get:function(){return this._threshold},set:function(e){this._threshold=e}}]),e}());n(4916),n(4765),function(e){e[e.Off=100]="Off",e[e.Essential=10]="Essential",e[e.All=-1]="All"}(w||(w={}));var T=function(){function e(){o()(this,e),c()(this,"_url","https://telemetry.phenixrts.com/telemetry/metrics"),c()(this,"_tenancy",void 0),c()(this,"_sessionId",void 0),c()(this,"_environment",void 0),c()(this,"_threshold",C.defaultTelemetryLevel)}return s()(e,[{key:"url",get:function(){return this._url},set:function(e){var t=new URL(e);t.pathname=t.pathname+"/metrics",this._url=t.toString()}},{key:"environment",get:function(){return this._environment},set:function(e){this._environment=e}},{key:"tenancy",get:function(){return this._tenancy},set:function(e){this._tenancy=e}},{key:"sessionId",get:function(){return this._sessionId},set:function(e){this._sessionId=e}},{key:"threshold",get:function(){return this._threshold},set:function(e){this._threshold=e}}]),e}(),C=function(){function e(){o()(this,e)}return s()(e,null,[{key:"defaultTelemetryLevel",get:function(){return h.isPrivate?w.Essential:w.All}}]),e}(),R=function(e){throw new Error("Unexpected value [".concat(e,"]. This should never be reached"))},L=function(){function e(){o()(this,e)}return s()(e,null,[{key:"convertTelemetryLevelToTelemetryLevelType",value:function(e){switch(e){case w.Off:return"Off";case w.Essential:return"Essential";case w.All:return"All";default:R(e)}}},{key:"convertTelemetryLevelTypeToTelemetryLevel",value:function(e){switch(e){case"Off":return w.Off;case"Essential":return w.Essential;case"All":return w.All;default:R(e)}}}]),e}(),P=function(){function e(){o()(this,e)}return s()(e,null,[{key:"convertLoggingLevelToLoggingLevelType",value:function(e){switch(e){case r.Off:return"Off";case r.Trace:return"Trace";case r.Debug:return"Debug";case r.Info:return"Trace";case r.Warn:return"Warn";case r.Error:return"Error";case r.Fatal:return"Fatal";case r.All:return"All";default:R(e)}}},{key:"convertLoggingLevelTypeToLoggingLevel",value:function(e){switch(e){case"Off":return r.Off;case"Trace":return r.Trace;case"Debug":return r.Debug;case"Info":return r.Info;case"Warn":return r.Warn;case"Error":return r.Error;case"Fatal":return r.Fatal;case"All":return r.All;default:R(e)}}}]),e}(),O=function(){function e(){o()(this,e)}return s()(e,[{key:"getStringValue",value:function(e){return this.readConfigurationParameterValue(e)||this.readConfigurationParameterURIValue("".concat(e,"-uri-parameter-name"))||this.defaultStringValue[e]}},{key:"getBooleanValue",value:function(e){var t=this.readConfigurationParameterValue(e);return t||this.readConfigurationParameterURIValue("".concat(e,"-uri-parameter-name"))?"true"===t||"1"===t||"On"===t:!0===this.defaultBooleanValue[e]}},{key:"defaultStringValue",get:function(){return{"phenix-metrics-level":L.convertTelemetryLevelToTelemetryLevelType(C.defaultTelemetryLevel),"phenix-logging-level":P.convertLoggingLevelToLoggingLevelType(p.defaultLoggingLevel),"phenix-console-logging-level":P.convertLoggingLevelToLoggingLevelType(p.defaultConsoleLoggingLevel),"phenix-telemetry-logging-level":P.convertLoggingLevelToLoggingLevelType(p.defaultTelemetryLoggingLevel),"phenix-channel-token":"","phenix-uri":"","phenix-base-uri":""}}},{key:"defaultBooleanValue",get:function(){return{"phenix-automatically-retry-on-failure":!0,"phenix-automatically-reconnect-peer-connection":!0}}},{key:"readConfigurationParameterValue",value:function(e){var t=document.querySelector("meta[name='".concat(e,"']"));if(t){var n=t.getAttribute("value");if(n)return n}}},{key:"readConfigurationParameterURIValue",value:function(e){var t=this.readConfigurationParameterValue(e);if(t){var n=new URLSearchParams(location.search).get(t)||void 0;if(n)return n}}}]),e}(),E=function(){function e(){throw o()(this,e),new Error("LoggerFactory is a static class that may not be instantiated")}return s()(e,null,[{key:"telemetryConfiguration",get:function(){return e._telemetryConfiguration}},{key:"getLogger",value:function(t){return"string"!=typeof t&&(t="SDK"),e._loggers[t]||(e._loggers[t]=new l(t,this._appenders,this._threshold))}},{key:"applyLoggerConfigFromParameterConfiguration",value:function(){e.applyLoggingLevel(),e.applyAppenderLoggingLevel("console",e.applyConsoleLogger.bind(this)),e.applyAppenderLoggingLevel("telemetry",e.applyTelemetryLogger.bind(this))}},{key:"applyLoggingLevel",value:function(){var e=this._configurationParameterReader.getStringValue("phenix-logging-level");r[e]&&this._threshold.setThreshold(r[e])}},{key:"applyAppenderLoggingLevel",value:function(e,t){var n=this._configurationParameterReader.getStringValue("phenix-".concat(e,"-logging-level"));"Off"!==n&&t(r[n])}},{key:"applyConsoleLogger",value:function(e){this._appenders.add(new v(e||p.defaultConsoleLoggingLevel))}},{key:"applyTelemetryLogger",value:function(e){this._telemetryConfiguration.threshold=e||p.defaultTelemetryLoggingLevel,this._appenders.add(new S(this._telemetryConfiguration))}}]),e}();c()(E,"_configurationParameterReader",new O),c()(E,"_loggers",{}),c()(E,"_appenders",new f),c()(E,"_threshold",new d),c()(E,"_telemetryConfiguration",new k),E.applyLoggerConfigFromParameterConfiguration(),n(3290);var A=function(){function e(){throw o()(this,e),new Error("Strings is a static class that may not be instantiated")}return s()(e,null,[{key:"random",value:function(e){var t=Math.ceil(e/13);return new Array(t).fill((function(){return Math.random().toString(16).substring(2,15)})).reduce((function(e,t){return e+t()}),"").substring(0,e)}}]),e}(),I=n(2205),D=n.n(I),j=n(8585),F=n.n(j),M=n(9754),U=n.n(M),N=function(){function e(t){o()(this,e),c()(this,"_disposed",void 0),c()(this,"_disposable",void 0),this._disposed=!1,this._disposable=t}return s()(e,[{key:"dispose",value:function(){if(!this._disposed)return this._disposed=!0,this._disposable.call(this)}}]),e}();var V=function(e){D()(i,e);var t,n,r=(t=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=U()(t);if(n){var i=U()(this).constructor;e=Reflect.construct(r,arguments,i)}else e=r.apply(this,arguments);return F()(this,e)});function i(e,t){return o()(this,i),r.call(this,(function(){var n=e.indexOf(t);n>=0&&e.splice(n,1)}))}return s()(i)}(N),B=function(){function e(t){o()(this,e),c()(this,"_listeners",void 0),c()(this,"_value",void 0),this._listeners=[],this._value=t}return s()(e,[{key:"value",get:function(){return this._value},set:function(e){var t=this._value!==e;if(t&&e){var n=e;"function"==typeof n.equals&&(t=!n.equals(this._value))}t&&(this._value=e,this._listeners.forEach((function(t){t(e)})))}},{key:"subscribe",value:function(e){return this._listeners.push(e),e(this._value),new V(this._listeners,e)}}]),e}(),G=function(){function e(t){o()(this,e),c()(this,"_subject",void 0),this._subject=t}return s()(e,[{key:"value",get:function(){return this._subject.value}},{key:"subscribe",value:function(e){return this._subject.subscribe(e)}}]),e}(),z=(n(4723),n(9653),n(1058),n(2023),n(3123),function(){function e(){o()(this,e)}return s()(e,null,[{key:"browserNameAndVersion",get:function(){return e._browserNameAndVersion}},{key:"browserName",get:function(){return this._browserName}},{key:"browserMajorVersion",get:function(){return this._browserMajorVersion}},{key:"isChrome69",get:function(){return e._isChrome69}},{key:"isChrome70",get:function(){return e._isChrome70}},{key:"isChrome71",get:function(){return e._isChrome71}},{key:"isChrome72",get:function(){return e._isChrome72}},{key:"isChrome74",get:function(){return e._isChrome74}},{key:"isChrome75",get:function(){return e._isChrome75}},{key:"isChrome76",get:function(){return e._isChrome76}},{key:"isChrome77",get:function(){return e._isChrome77}},{key:"parseBrowserNameAndVersion",value:function(){if(!navigator||!navigator.userAgent)return"";var t=navigator.userAgent.match(e._browserNameAndVersionRegex);return t&&t[0]?t[0]:e.parseBrowserNameAndVersionForIE()}},{key:"parseBrowserName",value:function(){if(!e._browserNameAndVersion)return"";var t=e._browserNameAndVersion.split("/");return t&&t[0]?t[0]:""}},{key:"parseBrowserMajorVersion",value:function(){if(!e._browserNameAndVersion)return 0;var t=e._browserNameAndVersion.split("/");if(!t||!t[1])return 0;var n=t[1];return n&&Number(n.split(".")[0])||0}},{key:"parseBrowserNameAndVersionForIE",value:function(){if(!navigator||!navigator.userAgent)return"";var e=navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return"IE/".concat(parseInt(e.substring(t+5,e.indexOf(".",t)),10));if(e.indexOf("Trident/")>0){var n=e.indexOf("rv:");return"IE/".concat(parseInt(e.substring(n+3,e.indexOf(".",n)),10))}return""}}]),e}());c()(z,"_browserNameAndVersionRegex",/(MSIE|(?!Gecko.+)Firefox|(?!AppleWebKit.+Chrome.+)Safari|(?!AppleWebKit.+)Chrome|AppleWebKit(?!.+Chrome|.+Safari)|Gecko(?!.+Firefox))(?: |\/)([\d.apre]+)/g),c()(z,"_browserNameAndVersion",z.parseBrowserNameAndVersion()),c()(z,"_browserName",z.parseBrowserName()),c()(z,"_browserMajorVersion",z.parseBrowserMajorVersion()),c()(z,"_isChrome69",z._browserNameAndVersion.includes("Chrome/69.")),c()(z,"_isChrome70",z._browserNameAndVersion.includes("Chrome/70.")),c()(z,"_isChrome71",z._browserNameAndVersion.includes("Chrome/71.")),c()(z,"_isChrome72",z._browserNameAndVersion.includes("Chrome/72.")),c()(z,"_isChrome74",z._browserNameAndVersion.includes("Chrome/74.")),c()(z,"_isChrome75",z._browserNameAndVersion.includes("Chrome/75.")),c()(z,"_isChrome76",z._browserNameAndVersion.includes("Chrome/76.")),c()(z,"_isChrome77",z._browserNameAndVersion.includes("Chrome/77."));var q=function(){function e(){o()(this,e)}return s()(e,null,[{key:"clientOfferDisabled",get:function(){return z.isChrome74||z.isChrome75||z.isChrome76||z.isChrome77}},{key:"addTranceiverDisabled",get:function(){return z.isChrome69||z.isChrome70||z.isChrome71||z.isChrome72}},{key:"getStatsPromiseBasedDisabled",get:function(){return"Chrome"===z.browserName&&z.browserMajorVersion<=66}},{key:"getCurrentOfferDisabled",get:function(){return"Chrome"===z.browserName&&z.browserMajorVersion<=69||"Firefox"===z.browserName&&z.browserMajorVersion<=56}},{key:"onTrackDisabled",get:function(){return"Chrome"===z.browserName&&z.browserMajorVersion<=63||"Firefox"===z.browserName&&z.browserMajorVersion<=52}},{key:"webkitRTCPeerConnectionEnabled",get:function(){return"Chrome"===z.browserName&&z.browserMajorVersion<=55}},{key:"promiseBasedPCMethodsDisabled",get:function(){return"Firefox"===z.browserName&&z.browserMajorVersion<=52}},{key:"shouldUseNativeHls",get:function(){return"Safari"===z.browserName||"SamsungBrowser"===z.browserName}},{key:"isRTMPEnabled",get:function(){return"Firefox"===z.browserName&&z.browserMajorVersion<84||"Chrome"===z.browserName&&z.browserMajorVersion<70||"Edge"===z.browserName||"IE"===z.browserName}},{key:"isPrecachingEnabled",get:function(){return"IE"!==z.browserName}}]),e}(),H=n(202).default,W=function(){function e(t){o()(this,e),c()(this,"_logger",E.getLogger("VanillaPeerConnection")),c()(this,"_peerConnection",void 0),q.webkitRTCPeerConnectionEnabled?this._peerConnection=new webkitRTCPeerConnection(t):this._peerConnection=new RTCPeerConnection(t)}var t,n,r,i;return s()(e,[{key:"native",get:function(){return this._peerConnection}},{key:"currentLocalDescription",get:function(){return this._peerConnection.currentLocalDescription}},{key:"currentRemoteDescription",get:function(){return this._peerConnection.currentRemoteDescription}},{key:"iceConnectionState",get:function(){return this._peerConnection.iceConnectionState}},{key:"supportsGetConfiguration",get:function(){return"function"==typeof this._peerConnection.getConfiguration}},{key:"supportsSetConfiguration",get:function(){return"function"==typeof this._peerConnection.setConfiguration}},{key:"supportsAddTransceiver",get:function(){return!q.addTranceiverDisabled&&"function"==typeof this._peerConnection.addTransceiver}},{key:"createOffer",value:(i=y()(_().mark((function e(t){var n=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!q.promiseBasedPCMethodsDisabled){e.next=2;break}return e.abrupt("return",new H((function(e,r){return n._peerConnection.createOffer(e,r,t)})));case 2:return e.abrupt("return",this._peerConnection.createOffer(t));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"createAnswer",value:(r=y()(_().mark((function e(t){var n=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!q.promiseBasedPCMethodsDisabled){e.next=2;break}return e.abrupt("return",new H((function(e,r){return n._peerConnection.createAnswer(e,r,t)})));case 2:return e.abrupt("return",this._peerConnection.createAnswer(t));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"setLocalDescription",value:(n=y()(_().mark((function e(t){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this._peerConnection.setLocalDescription(q.promiseBasedPCMethodsDisabled?new RTCSessionDescription(t):t));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"setRemoteDescription",value:(t=y()(_().mark((function e(t){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(null===(n=t.sdp)||void 0===n?void 0:n.match(/a=crypto:/i))&&this._logger.warn("SDP a=crypto is not supported"),e.abrupt("return",this._peerConnection.setRemoteDescription(q.promiseBasedPCMethodsDisabled?new RTCSessionDescription(t):t));case 3:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"getStats",value:function(e){return this._peerConnection.getStats(e)}},{key:"getStatsLegacy",value:function(){var e=this;return new H((function(t){e._peerConnection.getStats(t)}))}},{key:"addEventListener",value:function(e,t,n){this._peerConnection.addEventListener(e,t,n)}},{key:"removeEventListener",value:function(e,t,n){this._peerConnection.removeEventListener(e,t,n)}},{key:"addTransceiver",value:function(e,t){return this._peerConnection.addTransceiver(e,t)}},{key:"addStream",value:function(e){var t=this;e.getTracks().forEach((function(e){t._peerConnection.addTrack(e)}))}},{key:"getConfiguration",value:function(){return this._peerConnection.getConfiguration()}},{key:"setConfiguration",value:function(e){this._peerConnection.setConfiguration(e)}},{key:"ontrack",get:function(){return this._peerConnection.ontrack},set:function(e){this._peerConnection.ontrack=e}},{key:"onicecandidate",get:function(){return this._peerConnection.onicecandidate},set:function(e){this._peerConnection.onicecandidate=e}},{key:"oniceconnectionstatechange",get:function(){return this._peerConnection.oniceconnectionstatechange},set:function(e){this._peerConnection.oniceconnectionstatechange=e}},{key:"close",value:function(){this._peerConnection.close()}}]),e}(),J=W,K=function(){function e(){o()(this,e)}var t;return s()(e,[{key:"createPeerConnection",value:(t=y()(_().mark((function e(t){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new J(t));case 1:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}]),e}(),Y=K,$=(n(6755),"DIGEST:"),X=function(){function e(){o()(this,e)}return s()(e,null,[{key:"parseToken",value:function(t){if(this.isValidToken(t))try{var n=atob(t.substr($.length)),r=JSON.parse(n);return r.token=JSON.parse(r.token),r}catch(t){return void e._logger.error("Cannot parse token value",t)}else e._logger.error("Token is not valid [%s]",t)}},{key:"getUri",value:function(e){return e&&e.token&&e.token.uri?new URL(e.token.uri):null}},{key:"getTenancy",value:function(e){return e&&e.applicationId?e.applicationId:""}},{key:"isValidToken",value:function(e){return!!e&&e.startsWith($)}}]),e}();c()(X,"_logger",E.getLogger("EdgeAuth")),n(2564);var Z,Q=n(8),ee=n.n(Q),te=function(){function e(){o()(this,e),c()(this,"_list",[])}return s()(e,[{key:"add",value:function(e){this._list.push(e)}},{key:"dispose",value:function(){this._list.forEach((function(e){return e.dispose()})),this._list.length=0}},{key:"toString",value:function(){return"DisposableList[disposables=".concat(this._list.length,"]")}}]),e}(),ne=function(){function e(){o()(this,e),c()(this,"_disposables",new te),c()(this,"_readOnlyIsForeground",void 0),c()(this,"_isForeground",void 0),c()(this,"_timeOfLastTabFocusChange",Date.now()),c()(this,"_documentFocusInterval",void 0),this._isForeground=new B(!0),this._readOnlyIsForeground=new G(this._isForeground),this.detectTabFocusChange()}return s()(e,[{key:"isForeground",get:function(){return this._readOnlyIsForeground}},{key:"getTimeSinceLastChange",value:function(){return Date.now()-this._timeOfLastTabFocusChange}},{key:"dispose",value:function(){this._disposables.dispose()}},{key:"detectTabFocusChange",value:function(){var e,t,n=this;if("object"===("undefined"==typeof document?"undefined":ee()(document))){void 0!==document.msHidden?(e="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden?(e="webkitHidden",t="webkitvisibilitychange"):void 0!==document.hidden&&(e="hidden",t="visibilitychange");var r=function(){var t=!document[e];n.setFocusState(t)};void 0!==document.addEventListener&&void 0!==document[e]?(document.addEventListener(t,r,!1),this._disposables.add(new N((function(){document.removeEventListener(t,r,!1)})))):this.listenForDocumentFocus.call(this)}}},{key:"listenForDocumentFocus",value:function(){var e=this;this._documentFocusInterval=window.setInterval((function(){var t=document.hasFocus();e.setFocusState(t)}),3e3),this._disposables.add(new N((function(){e._documentFocusInterval&&clearInterval(e._documentFocusInterval),e._documentFocusInterval=null})))}},{key:"setFocusState",value:function(e){this._isForeground!==e&&(this._isForeground.value=e)}}]),e}(),re=(n(9600),n(7852),function(){function e(){o()(this,e)}return s()(e,null,[{key:"getTelemetryUrl",value:function(e){try{var t=new URL(e),n=t.hostname.split(".");switch(t.protocol){case"ws:":t.protocol="http:";break;case"wss:":t.protocol="https:"}return 2===n.length||3===n.length&&n[n.length-2].length<=2&&n[n.length-1].length<=3?n.unshift("telemetry"):n[0].startsWith("stg-")||n[0].endsWith("-stg")||n[0].includes("-stg-")||"stg"===n[0]?n[0]="telemetry-stg":n[0].startsWith("local")||n[0].endsWith("-local")||(n[0]="telemetry"),t.hostname=n.join("."),"".concat(t.origin,"/telemetry")}catch(t){return e}}}]),e}()),ie=function(){function e(){o()(this,e)}return s()(e,null,[{key:"getEnvironmentFromUrl",value:function(e){try{return new URL(e).origin}catch(e){return""}}}]),e}(),oe=function(){function e(){throw o()(this,e),new Error("DiscoveryUri is a static class that may not be instantiated")}return s()(e,null,[{key:"uri",get:function(){return e._discoveryUri}},{key:"buildDiscoveryUrl",value:function(e){var t=new URL(e.toString()),n=b.sdkVersion;return t.search="?".concat(new URLSearchParams([["version",n],["_","".concat(Date.now())]]).toString()),"/"===t.pathname&&(t.pathname="/pcast/endPoints"),t.toString()}}]),e}();c()(oe,"_discoveryUri",new B("https://pcast.phenixrts.com/pcast/endPoints")),function(e){e[e.TimeToFirstFrame=0]="TimeToFirstFrame",e[e.ChannelCreationTimeToFirstFrame=1]="ChannelCreationTimeToFirstFrame",e[e.Stalled=2]="Stalled",e[e.Buffering=3]="Buffering",e[e.SetupCompleted=4]="SetupCompleted",e[e.SetupFailed=5]="SetupFailed",e[e.RoundTripTime=6]="RoundTripTime",e[e.DownlinkThroughputCapacity=7]="DownlinkThroughputCapacity",e[e.NetworkType=8]="NetworkType",e[e.ResolutionChanged=9]="ResolutionChanged",e[e.ApplicationForeground=10]="ApplicationForeground",e[e.ApplicationBackground=11]="ApplicationBackground"}(Z||(Z={}));var ae=Z,se=function(){function e(t){o()(this,e),c()(this,"_metrics",void 0),this._metrics=t}return s()(e,[{key:"getName",value:function(){return ae[this._metrics]}},{key:"getTelemetryLevel",value:function(){switch(this._metrics){case ae.TimeToFirstFrame:case ae.ChannelCreationTimeToFirstFrame:return w.Essential;case ae.Stalled:case ae.Buffering:case ae.SetupCompleted:case ae.SetupFailed:case ae.RoundTripTime:case ae.DownlinkThroughputCapacity:case ae.NetworkType:case ae.ResolutionChanged:case ae.ApplicationForeground:case ae.ApplicationBackground:return w.All;default:R(this._metrics)}}}]),e}(),ue=function(){function e(t){o()(this,e),c()(this,"_metricsConfiguration",void 0),c()(this,"_metrics",[]),c()(this,"_isSending",void 0),c()(this,"_domain",location.hostname),this._metricsConfiguration=t}var t,n;return s()(e,[{key:"metricsConfiguration",get:function(){return this._metricsConfiguration}},{key:"push",value:function(e){var t=e.streamId,n=e.value,r=e.previousValue,i=e.runtime,o=e.resource,a=e.kind,s=new se(e.metricType);if(!(this._metricsConfiguration.threshold>s.getTelemetryLevel())){var u={timestamp:(new Date).toISOString(),tenancy:this._metricsConfiguration.tenancy,sessionId:this._metricsConfiguration.sessionId,streamId:t,metric:s.getName(),value:n,previousValue:r,fullQualifiedName:this._domain,environment:this._metricsConfiguration.environment,version:b.sdkVersion,runtime:i,resource:o,kind:a};this._metrics.push(u),this.sendMetricsIfAble()}}},{key:"sendMetrics",value:(n=y()(_().mark((function e(t){var n;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(n=new FormData).append("jsonBody",JSON.stringify({records:t})),e.next=4,fetch(this._metricsConfiguration.url,{method:"POST",body:n});case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"sendMetricsIfAble",value:(t=y()(_().mark((function e(){var t,n=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(this._metrics.length<=0||this._isSending)){e.next=2;break}return e.abrupt("return");case 2:return this._isSending=!0,t=this._metrics.slice(0,1024),this._metrics=this._metrics.slice(1024),e.abrupt("return",this.sendMetrics(t).then((function(e){return n._isSending=!1,n.sendMetricsIfAble(),e})).catch((function(){n._isSending=!1,n.sendMetricsIfAble()})));case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),ce=function(){function e(){throw o()(this,e),new Error("LoggerFactory is a static class that may not be instantiated")}return s()(e,null,[{key:"getMetricsService",value:function(t){if("string"!=typeof t)throw new Error("ur");var n=e._metricsServices[t];if(n)return n;var r=new T;return r.sessionId=he.clientSessionId,r.tenancy=he.tenancy.value,r.url=re.getTelemetryUrl(t),r.environment=ie.getEnvironmentFromUrl(t),r.threshold=L.convertTelemetryLevelTypeToTelemetryLevel(he.telemetryLevel),e._metricsServices[t]=new ue(r)}},{key:"setTelemetryLevel",value:function(t){var n=Object.values(e._metricsServices);n&&n.length&&n.forEach((function(e){e.metricsConfiguration.threshold=t}))}}]),e}();c()(ce,"_metricsServices",{});var le,fe=window.__phenixPageLoadTime||window.__pageLoadTime||Date.now(),he=function(){function e(){throw o()(this,e),new Error("SDK is a static class that may not be instantiated")}return s()(e,null,[{key:"pageLoadTime",get:function(){return fe}},{key:"sendLocalCandidates",get:function(){return this._sendLocalCandidates}},{key:"tenancy",get:function(){return this._tenancy}},{key:"clientSessionId",get:function(){return e._clientSessionId}},{key:"loadedTimestamp",get:function(){return e._loadedTimestamp}},{key:"initialized",get:function(){return e._readOnlyInitialized}},{key:"discoveryUri",get:function(){return e._readOnlyDiscoveryUri}},{key:"peerConnectionFactory",get:function(){return e._readOnlyPeerConnectionFactory}},{key:"automaticRetryOnFailure",get:function(){return e._automaticallyRetryOnFailure}},{key:"automaticallyReconnectPeerConnection",get:function(){return e._automaticallyReconnectPeerConnection}},{key:"automaticallyPlayMediaStream",get:function(){return e._automaticallyPlayMediaStream}},{key:"automaticallyMuteVideoOnPlayFailure",get:function(){return e._automaticallyMuteVideoOnPlayFailure}},{key:"webPlayerLoader",get:function(){return this._webPlayerLoader}},{key:"shakaPlayerLoader",get:function(){return this._shakaPlayerLoader}},{key:"hlsJsLoader",get:function(){return this._hlsJsLoader}},{key:"metricsService",get:function(){return e._metricsService}},{key:"applicationActivityMonitor",get:function(){return this._applicationActivityMonitor}},{key:"telemetryUrl",get:function(){return this._telemetryUrl}},{key:"maximalNumberOfPeerConnectionReconnectAttempts",get:function(){return this._maximalNumberOfPeerConnectionReconnectAttempts},set:function(e){this._maximalNumberOfPeerConnectionReconnectAttempts=e}},{key:"loggingLevel",get:function(){return P.convertLoggingLevelToLoggingLevelType(this._logger.threshold.value)}},{key:"telemetryLevel",get:function(){return L.convertTelemetryLevelToTelemetryLevelType(e._telemetryLevel.value)}},{key:"browserDetector",get:function(){return z}},{key:"applyTelemetryConfiguration",value:function(){var t=this,n=E.telemetryConfiguration;n.sessionId=e.clientSessionId,e._environment.subscribe((function(e){n.environment=e})),e.telemetryUrl.subscribe((function(e){var r=t._logger.appenders.value.find((function(e){return e instanceof S}));r&&(n.url=e,t._logger.appenders.remove(r),t._logger.appenders.add(new S(n)),t._logger.info("Telemetry URL was set to [%s]",n.url))})),e._tenancy.subscribe((function(e){var r=t._logger.appenders.value.find((function(e){return e instanceof S}));r&&e&&(n.tenancy=e,t._logger.appenders.remove(r),t._logger.appenders.add(new S(n)),t._logger.info("Telemetry tenancy was set to [%s]",n.tenancy))}))}},{key:"applyMetricsConfiguration",value:function(){e._metricsService=ce.getMetricsService(oe.uri.value),e._metricsConfiguration=e._metricsService.metricsConfiguration,e._metricsConfiguration.sessionId=e.clientSessionId,e._environment.subscribe((function(t){e._metricsConfiguration.environment=t})),e.telemetryUrl.subscribe((function(t){e._metricsConfiguration.url=t})),e._tenancy.subscribe((function(t){e._metricsConfiguration.tenancy=t}));var t=this._configurationParameterReader.getStringValue("phenix-metrics-level");t&&ce.setTelemetryLevel(w[t]),e._telemetryLevel.subscribe((function(e){ce.setTelemetryLevel(e)}))}},{key:"applyAutomaticallyRetryOnFailureFromParameterConfiguration",value:function(){this._automaticallyRetryOnFailure=this._configurationParameterReader.getBooleanValue("phenix-automatically-retry-on-failure"),this._logger.info("Automatically retry on failure is set to: [%s]",this._automaticallyRetryOnFailure)}},{key:"applyAutomaticallyReconnectPeerConnectionFromParameterConfiguration",value:function(){this._automaticallyReconnectPeerConnection=this._configurationParameterReader.getBooleanValue("phenix-automatically-reconnect-peer-connection"),this._logger.info("Automatically reconnect peer connection is set to: [%s]",this._automaticallyReconnectPeerConnection)}},{key:"applyDiscoveryUriDefaultFromParameterConfiguration",value:function(){e.discoveryUri.subscribe((function(t){e.telemetryUrl.value=e.getTelemetryUrl(t),e._environment.value=ie.getEnvironmentFromUrl(t)}));var t=this._configurationParameterReader.getStringValue("phenix-channel-token");if(t){var n=X.parseToken(t);return e._tenancy.value=X.getTenancy(n),oe.uri.value=(X.getUri(n)||e.discoveryUri.value).toString(),void this._logger.info("Discovery URI set from configuration parameter to [%s]",e.discoveryUri.value)}var r=this._configurationParameterReader.getStringValue("phenix-uri");if(r)return oe.uri.value=r,void this._logger.info('Discovery URI set from "phenix-uri" configuration parameter tag to [%s]',e.discoveryUri.value);var i=this._configurationParameterReader.getStringValue("phenix-base-uri");return i?(oe.uri.value="".concat(i,"/pcast/endPoints"),void this._logger.info('Discovery URI set from "phenix-base-uri" configuration parameter tag to [%s]',e.discoveryUri.value)):void 0}},{key:"init",value:function(t){if(this._initialized.value||(this._applicationActivityMonitor=new ne),t){if(t.discoveryUri&&(oe.uri.value=t.discoveryUri),t.peerConnectionFactory&&(e._peerConnectionFactory.value=t.peerConnectionFactory),t.telemetryLevel&&w[t.telemetryLevel]&&(e._telemetryLevel.value=L.convertTelemetryLevelTypeToTelemetryLevel(t.telemetryLevel)),t.loggingLevel&&r[t.loggingLevel]&&this._logger.threshold.setThreshold(P.convertLoggingLevelTypeToLoggingLevel(t.loggingLevel)),t.consoleLoggingLevel&&r[t.consoleLoggingLevel]){var n=this._logger.appenders.value.find((function(e){return e instanceof v}));n&&this._logger.appenders.remove(n),"Off"!==t.consoleLoggingLevel&&this._logger.appenders.add(new v(P.convertLoggingLevelTypeToLoggingLevel(t.consoleLoggingLevel)))}"boolean"==typeof t.automaticallyPlayMediaStream&&(this._automaticallyPlayMediaStream=t.automaticallyPlayMediaStream),"boolean"==typeof t.automaticallyMuteVideoOnPlayFailure&&(this._automaticallyMuteVideoOnPlayFailure=t.automaticallyMuteVideoOnPlayFailure),t.webPlayerLoader&&(this._webPlayerLoader=t.webPlayerLoader),t.shakaPlayerLoader&&(this._shakaPlayerLoader=t.shakaPlayerLoader),t.hlsJsLoader&&(this._hlsJsLoader=t.hlsJsLoader)}e._initialized.value=!0}},{key:"dispose",value:function(){e._initialized.value=!1,this._applicationActivityMonitor.dispose(),this._applicationActivityMonitor=null}},{key:"getTelemetryUrl",value:function(e){return re.getTelemetryUrl(e)}}]),e}();c()(he,"_automaticallyRetryOnFailure",!0),c()(he,"_automaticallyReconnectPeerConnection",!0),c()(he,"_automaticallyPlayMediaStream",!0),c()(he,"_automaticallyMuteVideoOnPlayFailure",!0),c()(he,"_webPlayerLoader",null),c()(he,"_shakaPlayerLoader",null),c()(he,"_hlsJsLoader",null),c()(he,"_configurationParameterReader",new O),c()(he,"_applicationActivityMonitor",void 0),c()(he,"_environment",new B("")),c()(he,"_telemetryUrl",new B("https://telemetry.phenixrts.com/telemetry")),c()(he,"_maximalNumberOfPeerConnectionReconnectAttempts",8),c()(he,"_telemetryLevel",new B(C.defaultTelemetryLevel)),c()(he,"_metricsService",void 0),c()(he,"_metricsConfiguration",void 0),c()(he,"_sendLocalCandidates",new B(!h.isPrivate)),c()(he,"_tenancy",new B("")),c()(he,"_clientSessionId",A.random(32)),c()(he,"_loadedTimestamp",new Date),c()(he,"_logger",E.getLogger("SDK")),c()(he,"_initialized",new B(!1)),c()(he,"_peerConnectionFactory",new B(new Y)),c()(he,"_readOnlyInitialized",new G(he._initialized)),c()(he,"_readOnlyDiscoveryUri",new G(oe.uri)),c()(he,"_readOnlyPeerConnectionFactory",new G(he._peerConnectionFactory)),window.addEventListener("unload",(function(){he.dispose()})),he.applyDiscoveryUriDefaultFromParameterConfiguration(),he.applyMetricsConfiguration(),he.applyTelemetryConfiguration(),he.applyAutomaticallyRetryOnFailureFromParameterConfiguration(),he.applyAutomaticallyReconnectPeerConnectionFromParameterConfiguration(),he.init(),n(8309),n(7727),function(e){e[e.Offline=1]="Offline",e[e.Starting=2]="Starting",e[e.Publishing=3]="Publishing",e[e.Recovering=4]="Recovering",e[e.Reconnecting=5]="Reconnecting",e[e.StandBy=6]="StandBy",e[e.Stopped=7]="Stopped",e[e.Unauthorized=8]="Unauthorized",e[e.GeoRestricted=9]="GeoRestricted",e[e.GeoBlocked=10]="GeoBlocked",e[e.UnsupportedFeature=11]="UnsupportedFeature",e[e.Error=12]="Error"}(le||(le={}));var pe=le,de=(n(3112),n(2481),function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;o()(this,e),c()(this,"_duration",void 0),this._duration=t}return s()(e,[{key:"toIsoString",value:function(){if(0===this._duration)return"P0S";var e=this._duration<0,t=e?Math.abs(this._duration):this._duration,n=Math.floor(t),r=n%1e3,i=(n=Math.floor(n/1e3))%60,o=(n=Math.floor(n/60))%60,a=(n=Math.floor(n/60))%24,s=["PT"];return e&&s.unshift("-"),a&&s.push(a+"H"),o&&s.push(o+"M"),(i||r)&&(s.push(String(i)),r&&s.push("."+this.padStart(r.toString(),3,"0")),s.push("S")),s.join("")}},{key:"padStart",value:function(e,t,n){return t>>=0,n=String(void 0!==n?n:" "),e.length>t?e:((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),n.slice(0,t)+e)}}]),e}()),ve=function(){function e(t){o()(this,e),c()(this,"_logger",E.getLogger("StreamSetupListener")),c()(this,"metricsService",he.metricsService),c()(this,"_pageLoadTime",void 0),c()(this,"_startTime",void 0),c()(this,"_metricSubmitted",!1),this._startTime=Date.now(),this._pageLoadTime=t}return s()(e,[{key:"success",value:function(e){this.recordStreamMetric(ae.SetupCompleted,e)}},{key:"fail",value:function(){this.recordStreamMetric(ae.SetupFailed)}},{key:"recordStreamMetric",value:function(e,t){if(!this._metricSubmitted){this._metricSubmitted=!0;var n=Date.now(),r=n-this._startTime,i=new se(e).getName();this.metricsService.push({metricType:e,runtime:(n-this._pageLoadTime)/1e3,value:{uint64:r},streamId:t}),this._logger.info("[%s] [%s] Stream metric [%s] in [%s]",new de(n-this._pageLoadTime).toIsoString(),t,i,new de(r).toIsoString())}}}]),e}(),ge=function(){function e(){o()(this,e),c()(this,"_disposables",new te),c()(this,"_isSupported",navigator&&navigator.connection),c()(this,"_rtt",new B(void 0)),c()(this,"_effectiveType",new B(void 0)),c()(this,"_downlinkThroughputCapacity",new B(void 0)),this.isSupported&&(this.setupNetworkChangeListeners(),this.updateStatistics())}return s()(e,[{key:"isSupported",get:function(){return this._isSupported}},{key:"rtt",get:function(){return this._rtt}},{key:"effectiveType",get:function(){return this._effectiveType}},{key:"downlinkThroughputCapacity",get:function(){return this._downlinkThroughputCapacity}},{key:"dispose",value:function(){this._disposables.dispose()}},{key:"getDownlinkThroughputCapacity",value:function(){return this.isSupported?navigator.connection.downlink||navigator.connection.downlinkMax:-1}},{key:"getEffectiveType",value:function(){return this.isSupported?navigator.connection.effectiveType||navigator.connection.type:"Unknown"}},{key:"getRoundTripTime",value:function(){return navigator.connection.rtt}},{key:"setupNetworkChangeListeners",value:function(){var e=this,t=function(){e.updateStatistics()};navigator.connection.addEventListener("change",t),this._disposables.add(new N((function(){navigator.connection.removeEventListener("change",t)})))}},{key:"updateStatistics",value:function(){this._rtt.value=this.getRoundTripTime(),this._effectiveType.value=this.getEffectiveType(),this._downlinkThroughputCapacity.value=this.getDownlinkThroughputCapacity()}}]),e}(),ye=function(){function e(t,n){var r=this;o()(this,e),c()(this,"_logger",E.getLogger("SessionTelemetry")),c()(this,"_metricsService",void 0),c()(this,"_applicationActivityMonitor",he.applicationActivityMonitor),c()(this,"_networkMonitor",new ge),c()(this,"_pageLoadTime",void 0),c()(this,"_disposables",new te),c()(this,"_lastNetworkStatistics",{}),this._pageLoadTime=t,this._disposables.add(this._networkMonitor),this._metricsService=n,this._networkMonitor.isSupported&&(this._disposables.add(this._applicationActivityMonitor.isForeground.subscribe((function(e){r.recordForegroundChange(e)}))),this._disposables.add(this._networkMonitor.rtt.subscribe((function(e){r.recordNetworkRTTUpdate(e)}))),this._disposables.add(this._networkMonitor.effectiveType.subscribe((function(e){r.recordNetworkTypeChangeUpdate(e)}))),this._disposables.add(this._networkMonitor.downlinkThroughputCapacity.subscribe((function(e){r.recordNetworkDownlinkThroughputCapacityUpdate(e)}))))}return s()(e,[{key:"listenOnStreamSetup",value:function(){return new ve(this._pageLoadTime)}},{key:"dispose",value:function(){this._disposables.dispose()}},{key:"recordForegroundChange",value:function(e){var t=Date.now(),n=this._applicationActivityMonitor.getTimeSinceLastChange();this._metricsService.push({metricType:e?ae.ApplicationForeground:ae.ApplicationBackground,runtime:(t-this._pageLoadTime)/1e3,value:{uint64:n}}),this._logger.info("Application has gone into the [%s] after [%s] ms",e?"foreground":"background",new de(n).toIsoString())}},{key:"recordNetworkRTTUpdate",value:function(e){var t=Date.now(),n=this._lastNetworkStatistics.rtt;this._lastNetworkStatistics.rtt=e,this._metricsService.push({metricType:ae.RoundTripTime,runtime:(t-this._pageLoadTime)/1e3,value:{uint64:e},previousValue:n?{uint64:n}:void 0,resource:"navigator"}),this._logger.info("[%s] Network RTT changed to [%s] from [%s]",new de(t-this._pageLoadTime).toIsoString(),e,n)}},{key:"recordNetworkTypeChangeUpdate",value:function(e){var t=Date.now(),n=this._lastNetworkStatistics.effectiveType;this._lastNetworkStatistics.effectiveType=e,this._metricsService.push({metricType:ae.NetworkType,runtime:(t-this._pageLoadTime)/1e3,value:{string:e},previousValue:n?{string:n}:void 0}),this._logger.info("[%s] Network effective type has changed to [%s] from [%s]",new de(t-this._pageLoadTime).toIsoString(),e,n)}},{key:"recordNetworkDownlinkThroughputCapacityUpdate",value:function(e){var t=Date.now(),n=this._lastNetworkStatistics.downlinkThroughputCapacity;this._lastNetworkStatistics.downlinkThroughputCapacity=e,this._metricsService.push({metricType:ae.DownlinkThroughputCapacity,runtime:(t-this._pageLoadTime)/1e3,value:{float:e},previousValue:n?{float:n}:void 0}),this._logger.info("[%s] Network downlink throughput capacity changed to [%s] from [%s]",new de(t-this._pageLoadTime).toIsoString(),e,n)}}]),e}(),me=function(){function e(t,n){o()(this,e),c()(this,"width",void 0),c()(this,"height",void 0),this.width=t,this.height=n}return s()(e,[{key:"equals",value:function(e){return e&&this.width===e.width&&this.height===e.height}},{key:"toString",value:function(){return"".concat(this.width,"x").concat(this.height)}}],[{key:"empty",get:function(){return new e(0,0)}}]),e}(),_e=function(){function e(t,n){o()(this,e),c()(this,"publisherInitialization",void 0),c()(this,"disposables",void 0),c()(this,"publisherDisposables",void 0),c()(this,"token",void 0),c()(this,"peerConnection",void 0),c()(this,"mediaStream",void 0),c()(this,"state",void 0),c()(this,"tokenExpiring",void 0),c()(this,"authorized",void 0),c()(this,"online",void 0),c()(this,"loading",void 0),c()(this,"publishing",void 0),c()(this,"standby",void 0),c()(this,"stopped",void 0),c()(this,"bitrateLimit",void 0),c()(this,"resolution",void 0),c()(this,"failureCount",void 0),c()(this,"endPoint",void 0),c()(this,"stream",void 0),c()(this,"rtcStatistics",void 0),c()(this,"peerConnectionReconnectAttempts",void 0),c()(this,"isStarting",void 0),c()(this,"isDisposed",void 0),c()(this,"sessionTelemetry",void 0),c()(this,"clearFailureCountTimeout",void 0),c()(this,"name",void 0),this.isDisposed=!1,this.isStarting=new B(!1),this.disposables=new te,this.publisherDisposables=new te,this.publisherInitialization=new Date,this.token=new B(t),this.peerConnection=new B(null),this.mediaStream=new B(null),this.state=new B(pe.Starting),this.tokenExpiring=new B(!1),this.authorized=new B(!0),this.online=new B(!0),this.loading=new B(!1),this.publishing=new B(!1),this.standby=new B(!1),this.stopped=new B(!1),this.bitrateLimit=new B(0),this.resolution=new B(me.empty),this.failureCount=new B(0),this.endPoint=new B(null),this.stream=new B(null),this.rtcStatistics=new B(null),this.peerConnectionReconnectAttempts=0,this.name=n&&n.length?n:this.generateScreenName()}return s()(e,[{key:"streamId",get:function(){var e=this.stream.value;return e?e.streamId:"-"}},{key:"applyStatus",value:function(e){switch(e){case"ok":break;case"unauthorized":case"geo-restricted":case"geo-blocked":this.authorized.value=!1;case"no-stream":case"not-found":return this.failureCount.value=0,this.publishing.value=!1,this.standby.value=!0,this.stopped.value=!1,void(this.stream.value=null);default:return this.failureCount.value++,this.publishing.value=!1,this.standby.value=!0,this.stopped.value=!1,this.stream.value=null,void(this.state.value=pe.Error)}}},{key:"mapPublishStatusToPublisherStatus",value:function(e){switch(e){case"ok":return pe.Starting;case"no-stream":case"not-found":return pe.StandBy;case"geo-restricted":return pe.GeoRestricted;case"geo-blocked":return pe.GeoBlocked;case"unauthorized":return pe.Unauthorized;case"capacity":case"rate-limited":case"timeout":return pe.Recovering;case"failed":return pe.Error;default:R(e)}}},{key:"generateScreenName",value:function(){return A.random(12)}}]),e}(),be=n(3038),we=n.n(be),xe=function(){function e(){throw o()(this,e),new Error("PeerConnectionService is a static class that may not be instantiated")}var t,n;return s()(e,null,[{key:"initiateInitialPrecaching",value:function(){q.isPrecachingEnabled&&e.precacheCreatePeerConnectionOffer().catch((function(t){return e._logger.error('Failed to pre-cache peer connection offer"',t)}))}},{key:"precacheCreatePeerConnectionOffer",value:(n=y()(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e._cached={direction:"recvonly",peerConnection:e.createPeerConnectionOffer().catch((function(t){throw e._cached=null,t}))});case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"createPeerConnectionOffer",value:(t=y()(_().mark((function t(){var n,r,i,o=arguments;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=o.length>0&&void 0!==o[0]?o[0]:"recvonly",!e._cached||e._cached.direction!==n){t.next=5;break}return r=e._cached.peerConnection,e._cached=null,t.abrupt("return",r);case 5:return i=he.peerConnectionFactory.value,t.abrupt("return",i.createPeerConnection().then(function(){var e=y()(_().mark((function e(t){var r,i,o;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.supportsAddTransceiver){e.next=11;break}return i=t.addTransceiver("audio",{direction:n}),r=t.addTransceiver("video",{direction:n}),e.t0=i,e.t1=r,e.t2=t,e.next=9,t.createOffer(void 0);case 9:return e.t3=e.sent,e.abrupt("return",{audioTransceiver:e.t0,videoTransceiver:e.t1,peerConnection:e.t2,localOffer:e.t3});case 11:return o="recvonly"===n?{offerToReceiveAudio:!0,offerToReceiveVideo:!0}:{},e.t4=t,e.next=15,t.createOffer(o);case 15:return e.t5=e.sent,e.abrupt("return",{peerConnection:e.t4,localOffer:e.t5});case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 7:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})}]),e}();c()(xe,"_logger",E.getLogger("PeerConnectionService")),c()(xe,"_cached",void 0),xe.initiateInitialPrecaching(),n(1249);var Se,ke,Te=n(319),Ce=n.n(Te);!function(e){e[e.Keep=0]="Keep",e[e.Reset=1]="Reset"}(Se||(Se={})),function(e){e[e.Normal=0]="Normal",e[e.Force=1]="Force",e[e.Reset=2]="Reset"}(ke||(ke={}));var Re=function(){function e(){o()(this,e)}return s()(e,null,[{key:"convertBitrateModeToBitrateModeType",value:function(e){switch(e){case ke.Normal:return"Normal";case ke.Force:return"Force";case ke.Reset:return"Reset";default:R(e)}}}]),e}(),Le=function(){function e(){o()(this,e)}return s()(e,null,[{key:"convertBitrateStateToBitrateStateType",value:function(e){switch(e){case Se.Keep:return"Keep";case Se.Reset:return"Reset";default:R(e)}}}]),e}(),Pe=n(202).default,Oe=function(){function e(t,n){if(o()(this,e),c()(this,"_logger",E.getLogger("EndPoint")),c()(this,"_uri",void 0),c()(this,"_timeout",void 0),c()(this,"_roundTripTime",void 0),this._uri=t,this._timeout=n,!n)throw new Error("End point requires a timeout")}var t,n,r,i,a,u,l,f,h,p,d,v;return s()(e,[{key:"roundTripTime",get:function(){return this._roundTripTime}},{key:"toString",value:function(){return"EndPoint[uri=".concat(this._uri,"]")}},{key:"ping",value:(v=y()(_().mark((function e(){var t,n,r,i,o=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.buildPingUrl(),n=Date.now(),e.next=4,Pe.race([fetch(t,{method:"GET",cache:"no-cache"}),new Pe((function(e,n){return setTimeout((function(){return n(new Error("Ping timed out [".concat(t,"]")))}),o._timeout)}))]);case 4:if(r=e.sent,i=Date.now(),r.ok){e.next=8;break}throw new Error("Ping failed [".concat(t,"] [").concat(r.status,"]"));case 8:return this._roundTripTime=i-n,e.abrupt("return",this._roundTripTime);case 10:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"subscribe",value:(d=y()(_().mark((function e(t,n,r){var i,o,a,s,u,c,l,f,h,p,d,v,g,y=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((i=X.parseToken(t))&&i.applicationId){e.next=4;break}return this._logger.error("Failed to parse token [%s]",t),e.abrupt("return",{status:"unauthorized"});case 4:return o=i.applicationId,a=this.buildUrl([o,"stream","subscribe"]).toString(),s=new FormData,u=b.sdkVersion,0===r&&n?(c={apiVersion:6,clientVersion:u,edgeAuthToken:t,failureCount:r,httpRoundTripTime:this._roundTripTime,setRemoteDescription:{apiVersion:6,sessionDescription:{type:this.convertRTCSdpTypeToSdpType(n.type),sdp:n.sdp}},createAnswerDescription:{apiVersion:6}},s.append("jsonBody",JSON.stringify(c))):(l={apiVersion:6,clientVersion:u,edgeAuthToken:t,failureCount:r,httpRoundTripTime:this._roundTripTime,createOfferDescription:{apiVersion:6}},s.append("jsonBody",JSON.stringify(l))),f=Date.now(),e.prev=10,p=null,e.next=14,Pe.race([fetch(a,{method:"POST",body:s}),new Pe((function(e){return p=window.setTimeout((function(){y._logger.error("Failed to subscribe",new Error("Subscribe timed out [".concat(a,"]"))),e({status:408})}),y._timeout)}))]).finally((function(){p&&clearTimeout(p)}));case 14:h=e.sent,e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(10),this._logger.error("Failed to subscribe",e.t0),e.abrupt("return",{status:"failed"});case 21:if("ok"===(d=this.mapHttpStatusToSubscribeStatus(h))){e.next=24;break}return e.abrupt("return",{status:d});case 24:return v=Date.now(),e.next=27,this.convertHttpResponseToSubscribeResponse(o,h);case 27:return g=e.sent,this._logger.debug("Got subscribe response [%j] in [%s] ms",g,v-f),e.abrupt("return",g);case 30:case"end":return e.stop()}}),e,this,[[10,17]])}))),function(e,t,n){return d.apply(this,arguments)})},{key:"publish",value:(p=y()(_().mark((function e(t,n,r,i){var o,a,s,u,c,l,f,h,p,d,v,g,y,m=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((o=X.parseToken(n))&&o.applicationId){e.next=4;break}return this._logger.error("Failed to parse token [%s]",n),e.abrupt("return",{status:"unauthorized"});case 4:return a=o.applicationId,s=this.buildUrl([a,"stream","publish"]).toString(),u=new FormData,c=b.sdkVersion,0===i&&r?(l={apiVersion:6,clientVersion:c,edgeAuthToken:n,failureCount:i,httpRoundTripTime:this._roundTripTime,name:t,setRemoteDescription:{apiVersion:6,sessionDescription:{type:this.convertRTCSdpTypeToSdpType(r.type),sdp:r.sdp}},createAnswerDescription:{streamId:"",options:["upload"],apiVersion:6}},u.append("jsonBody",JSON.stringify(l))):(f={apiVersion:6,clientVersion:c,edgeAuthToken:n,failureCount:i,httpRoundTripTime:this._roundTripTime,name:t,createOfferDescription:{streamId:"",options:["upload"],apiVersion:6}},u.append("jsonBody",JSON.stringify(f))),h=Date.now(),e.prev=10,d=null,e.next=14,Pe.race([fetch(s,{method:"POST",body:u}),new Pe((function(e){return d=window.setTimeout((function(){m._logger.error("Failed to publish",new Error("Publish timed out [".concat(s,"]"))),e({status:408})}),m._timeout)}))]).finally((function(){d&&clearTimeout(d)}));case 14:p=e.sent,e.next=21;break;case 17:return e.prev=17,e.t0=e.catch(10),this._logger.error("Failed to publish",e.t0),e.abrupt("return",{status:"failed"});case 21:if("ok"===(v=this.mapHttpStatusToPublishStatus(p))){e.next=24;break}return e.abrupt("return",{status:v});case 24:return g=Date.now(),e.next=27,this.convertHttpResponseToPublishResponse(a,p);case 27:return y=e.sent,this._logger.debug("Got publish response [%j] in [%s] ms",y,g-h),e.abrupt("return",y);case 30:case"end":return e.stop()}}),e,this,[[10,17]])}))),function(e,t,n,r){return p.apply(this,arguments)})},{key:"setRemoteDescription",value:(h=y()(_().mark((function e(t,n){var r,i,o,a,s,u,c,l,f,h=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.buildUrl([t.tenancy,"stream",t.streamId,"description","remote"]).toString(),i=new FormData,o={apiVersion:6,sharedSecret:t.sharedSecret,sessionDescription:{type:this.convertRTCSdpTypeToSdpType(n.type),sdp:n.sdp}},i.append("jsonBody",JSON.stringify(o)),a=Date.now(),e.prev=5,u=null,e.next=9,Pe.race([fetch(r,{method:"POST",body:i}),new Pe((function(e){return u=window.setTimeout((function(){h._logger.error("Failed to set remote description",new Error("Set remote description timed out [".concat(r,"]"))),e({status:408})}),h._timeout)}))]).finally((function(){u&&clearTimeout(u)}));case 9:s=e.sent,e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(5),this._logger.error("Failed to set remote description",e.t0),e.abrupt("return",{status:"failed"});case 16:if("ok"===(c=this.mapHttpStatusToSetRemoteDescriptionStatus(s))){e.next=19;break}return e.abrupt("return",{status:c});case 19:return l=Date.now(),e.next=22,this.convertHttpResponseToSetRemoteDescriptionResponse(s);case 22:return f=e.sent,this._logger.debug("Got set remote description response [%j] in [%s] ms",f,l-a),e.abrupt("return",f);case 25:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e,t){return h.apply(this,arguments)})},{key:"limitBitrate",value:(f=y()(_().mark((function e(t,n,r,i,o){var a,s,u,c,l,f,h,p,d=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=this.buildUrl([t.tenancy,"stream",t.streamId,"bitrate"]).toString(),s=new FormData,u={apiVersion:6,sharedSecret:t.sharedSecret,elapsedInMilliseconds:n,bitrateInBitsPerSecond:r,bitrateState:Le.convertBitrateStateToBitrateStateType(i),bitrateMode:Re.convertBitrateModeToBitrateModeType(o)},s.append("jsonBody",JSON.stringify(u)),c=Date.now(),e.prev=5,f=null,e.next=9,Pe.race([fetch(a,{method:"POST",body:s}),new Pe((function(e){return f=window.setTimeout((function(){d._logger.error("Failed to set limit bitrate timed",new Error("Set limit bitrate timed out [".concat(a,"]"))),e({status:408})}),d._timeout)}))]).finally((function(){f&&clearTimeout(f)}));case 9:l=e.sent,e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(5),this._logger.error("Failed to set limit bitrate timed",e.t0),e.abrupt("return",{status:"failed"});case 16:return h=this.mapHttpStatusToSetTemporaryMaximalBitrateStatus(l),p=Date.now(),this._logger.info("Got set limit bitrate response [%s] in [%s] ms",h,p-c),e.abrupt("return",{status:h});case 20:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e,t,n,r,i){return f.apply(this,arguments)})},{key:"addIceCandidates",value:(l=y()(_().mark((function e(t,n,r){var i,o,a,s,u,c,l,f,h,p,d=this,v=arguments;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=v.length>3&&void 0!==v[3]?v[3]:[],o=this.buildUrl([t.tenancy,"stream",t.streamId,"ice","candidates"]).toString(),a=new FormData,s={apiVersion:6,sharedSecret:t.sharedSecret,candidates:n,discoveryCompleted:r,options:i},a.append("jsonBody",JSON.stringify(s)),u=Date.now(),e.prev=6,l=null,e.next=10,Pe.race([fetch(o,{method:"POST",body:a}),new Pe((function(e){return l=window.setTimeout((function(){d._logger.error("Failed to add ice candidates",new Error("Add ice candidates timed out [".concat(o,"]"))),e({status:408})}),d._timeout)}))]).finally((function(){l&&clearTimeout(l)}));case 10:c=e.sent,e.next=17;break;case 13:return e.prev=13,e.t0=e.catch(6),this._logger.error("Failed to add ice candidates",e.t0),e.abrupt("return",{status:"failed"});case 17:if("ok"===(f=this.mapHttpStatusToAddIceCandidatesStatus(c))){e.next=20;break}return e.abrupt("return",{status:f});case 20:return h=Date.now(),e.next=23,this.convertHttpResponseToAddIceCandidatesResponse(c);case 23:return p=e.sent,this._logger.info("Got add ICE candidates response [%j] in [%s] ms",p,h-u),e.abrupt("return",p);case 26:case"end":return e.stop()}}),e,this,[[6,13]])}))),function(e,t,n){return l.apply(this,arguments)})},{key:"destroyStream",value:(u=y()(_().mark((function e(t,n){var r,i,o,a,s,u,c,l,f,h=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.buildUrl([t.tenancy,"stream",t.streamId,"destroy"]).toString(),i=new FormData,o={apiVersion:6,sharedSecret:t.sharedSecret,reason:n,options:[]},i.append("jsonBody",JSON.stringify(o)),a=Date.now(),e.prev=5,u=null,e.next=9,Pe.race([fetch(r,{method:"POST",body:i,cache:"no-cache"}),new Pe((function(e){return u=window.setTimeout((function(){h._logger.error("Failed to subscribe",new Error("Delete stream timed out [".concat(r,"]"))),e({status:408})}),h._timeout)}))]).finally((function(){u&&clearTimeout(u)}));case 9:s=e.sent,e.next=16;break;case 12:return e.prev=12,e.t0=e.catch(5),this._logger.error("Failed to delete stream",e.t0),e.abrupt("return",{status:"failed"});case 16:if("ok"===(c=this.mapHttpStatusToSetDestroyStreamStatus(s))){e.next=19;break}return e.abrupt("return",{status:c});case 19:return l=Date.now(),e.next=22,this.convertHttpResponseToDestroyStreamResponse(s);case 22:return f=e.sent,this._logger.info("Got destroy stream response [%j] in [%s] ms",f,l-a),e.abrupt("return",f);case 25:case"end":return e.stop()}}),e,this,[[5,12]])}))),function(e,t){return u.apply(this,arguments)})},{key:"buildUrl",value:function(e){var t=new URL(this._uri),n=t.pathname.split("/");return n.length=n.length-1,t.pathname=n.concat.apply(n,Ce()(e)).join("/"),t}},{key:"buildPingUrl",value:function(){var e=new URL(this._uri),t=b.sdkVersion;return e.search="?".concat(new URLSearchParams([["type","http"],["version",t],["_","".concat(Date.now())]]).toString()),e.toString()}},{key:"mapHttpStatusToPublishStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 402:return"geo-restricted";case 403:return"geo-blocked";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"mapHttpStatusToSubscribeStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 402:return"geo-restricted";case 403:return"geo-blocked";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"mapHttpStatusToSetRemoteDescriptionStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"mapHttpStatusToSetTemporaryMaximalBitrateStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"mapHttpStatusToAddIceCandidatesStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"mapHttpStatusToSetDestroyStreamStatus",value:function(e){if(!e)return"failed";switch(e.status){case 200:return"ok";case 401:return"unauthorized";case 408:return"timeout";case 503:return"capacity";case 504:return"rate-limited";default:return"failed"}}},{key:"convertHttpResponseToSubscribeResponse",value:(a=y()(_().mark((function e(t,n){var r,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.json();case 2:return r=e.sent,(i={status:r.status}).stream={tenancy:t,streamId:r.streamId,sharedSecret:r.sharedSecret},i.lag=r.lag,r&&(r.rtcConfiguration&&(i.rtcConfiguration=this.convertIRtcConfigurationToRTCConfiguration(r.rtcConfiguration)),r.setRemoteDescriptionResponse&&r.setRemoteDescriptionResponse.sessionDescription&&(i.setRemoteDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.setRemoteDescriptionResponse.sessionDescription)}),r.createAnswerDescriptionResponse&&r.createAnswerDescriptionResponse.sessionDescription&&(i.createAnswerDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.createAnswerDescriptionResponse.sessionDescription)}),r.createOfferDescriptionResponse&&r.createOfferDescriptionResponse.sessionDescription&&(i.createOfferDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.createOfferDescriptionResponse.sessionDescription)})),e.abrupt("return",i);case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"convertHttpResponseToPublishResponse",value:(i=y()(_().mark((function e(t,n){var r,i;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.json();case 2:return r=e.sent,(i={status:r.status}).stream={tenancy:t,streamId:r.streamId,sharedSecret:r.sharedSecret},r&&(r.rtcConfiguration&&(i.rtcConfiguration=this.convertIRtcConfigurationToRTCConfiguration(r.rtcConfiguration)),r.setRemoteDescriptionResponse&&r.setRemoteDescriptionResponse.sessionDescription&&(i.setRemoteDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.setRemoteDescriptionResponse.sessionDescription)}),r.createAnswerDescriptionResponse&&r.createAnswerDescriptionResponse.sessionDescription&&(i.createAnswerDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.createAnswerDescriptionResponse.sessionDescription)}),r.createOfferDescriptionResponse&&r.createOfferDescriptionResponse.sessionDescription&&(i.createOfferDescriptionResponse={sessionDescription:this.convertISessionDescriptionToRTCSessionDescription(r.createOfferDescriptionResponse.sessionDescription)})),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"convertIRtcConfigurationToRTCConfiguration",value:function(e){var t={};if(e.bundlePolicy)switch(e.bundlePolicy){case"BundlePolicyBalanced":t.bundlePolicy="balanced";break;case"BundlePolicyMaxCompat":t.bundlePolicy="max-compat";break;case"BundlePolicyMaxBundle":t.bundlePolicy="max-bundle";break;default:R(e.bundlePolicy)}if("number"==typeof e.iceCandidatePoolSize&&(t.iceCandidatePoolSize=e.iceCandidatePoolSize),e.iceServers){for(var n=[],r=0;r<e.iceServers.length;r++)n.push({urls:e.iceServers[r].urls,username:e.iceServers[r].username,credential:e.iceServers[r].credential});t.iceServers=n}if(e.iceTransportPolicy)switch(e.iceTransportPolicy){case"IceTransportPolicyAll":t.iceTransportPolicy="all";break;case"IceTransportPolicyRelay":t.iceTransportPolicy="relay";break;case"IceTransportPolicyPublic":break;default:R(e.iceTransportPolicy)}if(e.peerIdentity&&(t.peerIdentity=e.peerIdentity),e.rtcpMuxPolicy)switch(e.rtcpMuxPolicy){case"RtcpMuxPolicyNegotiate":t.rtcpMuxPolicy="negotiate";break;case"RtcpMuxPolicyRequire":t.rtcpMuxPolicy="require";break;default:R(e.rtcpMuxPolicy)}return t}},{key:"convertISessionDescriptionToRTCSessionDescription",value:function(e){var t={sdp:e.sdp};switch(e.type){case"Offer":t.type="offer";break;case"Answer":t.type="answer";break;default:R(e.type)}return t}},{key:"convertHttpResponseToSetRemoteDescriptionResponse",value:(r=y()(_().mark((function e(t){var n,r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:return n=e.sent,r={status:n.status},n&&n.sessionDescription&&(r.sessionDescription=this.convertISessionDescriptionToRTCSessionDescription(n.sessionDescription)),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"convertHttpResponseToAddIceCandidatesResponse",value:(n=y()(_().mark((function e(t){var n,r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:return n=e.sent,r={status:n.status,options:[]},n&&n.options&&(r.options=n.options),e.abrupt("return",r);case 6:case"end":return e.stop()}}),e)}))),function(e){return n.apply(this,arguments)})},{key:"convertHttpResponseToDestroyStreamResponse",value:(t=y()(_().mark((function e(t){var n,r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.json();case 2:return n=e.sent,r={status:n.status},e.abrupt("return",r);case 5:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},{key:"convertRTCSdpTypeToSdpType",value:function(e){switch(e){case"answer":return"Answer";case"offer":return"Offer";case"pranswer":case"rollback":throw new Error("SDP type [".concat(e,"] is not supported"));default:R(e)}}}]),e}(),Ee=n(202).default,Ae=function(){function e(t){if(o()(this,e),c()(this,"_logger",E.getLogger("Discovery")),c()(this,"_metricsService",void 0),c()(this,"_uri",void 0),!t)throw new Error("Discovery requires uri");this._metricsService=ce.getMetricsService(t.toString()),this._uri=t}var t,n;return s()(e,[{key:"discoverNearbyEndPoints",value:(n=y()(_().mark((function e(t,n){var r,i,o,a;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}throw new Error("Discovery requires timeout");case 2:return r=t.toString(),e.next=5,Ee.race([fetch(r,{method:"GET",cache:"no-cache"}),new Ee((function(e,t){return setTimeout((function(){return t(new Error("Discovery timed out [".concat(r,"]")))}),n)}))]);case 5:if((i=e.sent).ok){e.next=8;break}throw new Error("Discovery failed [".concat(r,"] [").concat(i.status,"]"));case 8:if(null!==i.body){e.next=10;break}throw new Error("Discovery failed with no data [".concat(r,"]"));case 10:return e.next=12,i.text();case 12:return o=e.sent,a=o.split(","),e.abrupt("return",a.map((function(e){return new Oe(e,n)})));case 15:case"end":return e.stop()}}),e)}))),function(e,t){return n.apply(this,arguments)})},{key:"discoverClosestEndPoint",value:(t=y()(_().mark((function e(){var t,n,r,i,o,a=this,s=arguments;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:2e4,n=oe.buildDiscoveryUrl(this._uri),e.next=4,this.discoverNearbyEndPoints(new URL(n),t);case 4:return r=e.sent,i=function(){return new Ee((function(){a._logger.info("Request [%s] failed, preventing it from completing",n)}))},e.next=8,Ee.race(r.map((function(e){return e.ping().catch((function(t){return a._logger.warn("Failed to ping end point [%s]",e,t),i()})).then((function(t){var n=Date.now();return a._logger.info("Discovered end point [%s] with time [%s]",e.toString(),t),a._metricsService.push({metricType:ae.RoundTripTime,runtime:(n-he.pageLoadTime)/1e3,value:{uint64:t||0},resource:e.toString(),kind:"ping"}),e}))})));case 8:return o=e.sent,e.abrupt("return",o);case 10:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})}]),e}(),Ie=function(){function e(){throw o()(this,e),new Error("Discovery is a static class that may not be instantiated")}var t,n;return s()(e,null,[{key:"precacheClosestEndPointDiscovery",value:(n=y()(_().mark((function t(){var n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new URL(he.discoveryUri.value),t.abrupt("return",e.discoverClosestEndPointWithCaching(n));case 2:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})},{key:"discoverClosestEndPointWithCaching",value:(t=y()(_().mark((function t(n){var r,i,o;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.toString(),!e._cache[r]){t.next=3;break}return t.abrupt("return",e._cache[r]);case 3:return i=new Ae(n),o=e._cache[r]=i.discoverClosestEndPoint(),e._cache[r].then((function(){setTimeout((function(){e._cache[r]===o&&delete e._cache[r]}),6e4)})).catch((function(t){throw delete e._cache[r],t})),t.abrupt("return",o);case 7:case"end":return t.stop()}}),t)}))),function(e){return t.apply(this,arguments)})}]),e}();c()(Ie,"_cache",{}),Ie.precacheClosestEndPointDiscovery();var De=n(202).default;function je(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Fe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?je(Object(n),!0).forEach((function(t){c()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):je(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Me=function(){function e(t,n){o()(this,e),c()(this,"_logger",E.getLogger("RealTimePublisher")),c()(this,"_publisherContext",void 0),c()(this,"_handleStreamFailure",void 0),this._publisherContext=t,this._handleStreamFailure=n}var t;return s()(e,[{key:"start",value:function(e,t,n){var r=this;return De.all([Ie.discoverClosestEndPointWithCaching(e),xe.createPeerConnectionOffer("sendonly")]).then((function(e){var n=we()(e,2),i=n[0],o=n[1],a=o.localOffer,s=o.peerConnection;return r._publisherContext.online.value=!0,r._publisherContext.endPoint.value=i,r._logger.info("Connecting to [%s]",i.toString()),r._logger.info("Local offer:\n"+a.sdp),!q.clientOfferDisabled&&s.supportsSetConfiguration&&s.supportsGetConfiguration||(s.close(),s=null,a=null),r._publisherContext.peerConnection.value=s,i.publish(r._publisherContext.name,t,a,r._publisherContext.failureCount.value)})).then((function(e){var t=e.status,i=e.stream,o=e.rtcConfiguration,a=e.setRemoteDescriptionResponse,s=e.createOfferDescriptionResponse,u=e.createAnswerDescriptionResponse;if(r._publisherContext.stream.value=i,r._logger.debug("[%s] Publish completed [%s] [%j] [%j] [%j] [%j]",r._publisherContext.streamId,t,o,a,s,u),r._publisherContext.state.value=r._publisherContext.mapPublishStatusToPublisherStatus(t),r._publisherContext.applyStatus(t),"ok"===t)return r.applyRtcConfiguration(r._publisherContext.peerConnection.value,o).then((function(e){var t,o=!1,c=!1,l=[];return r._publisherContext.peerConnection.value=e,e.addStream(r._publisherContext.mediaStream.value),e.onicecandidate=function(n){r._publisherContext.stream.value===i&&r._publisherContext.peerConnection.value===e&&(o||he.sendLocalCandidates.value&&(n.candidate&&n.candidate.candidate?l.push(n.candidate):c=!0,t||(t=setTimeout((function(){r._publisherContext.stream.value!==i||o||r._publisherContext.endPoint.value.addIceCandidates(i,l,c).then((function(e){var t=e.status,n=e.options;"ok"===t?(n.includes("cancel")&&(o=!0),r._logger.info("[%s] Added ICE candidates with reason [%s] and options [%s]",r._publisherContext.streamId,t,n)):r._logger.warn("[%s] Failed to add ICE candidates with reason [%s]",r._publisherContext.streamId,t)})).catch((function(e){r._logger.error("[%s] Failed to add ICE candidates",r._publisherContext.streamId,e)}))}),100))))},e.oniceconnectionstatechange=function(){if(r._publisherContext.stream.value===i&&r._publisherContext.peerConnection.value===e){var t=function(){r._publisherContext.state.value=pe.Error,r._publisherContext.publishing.value=!1,r._publisherContext.loading.value=!0,r._handleStreamFailure().catch((function(t){r._logger.error("[%s] Failed handling stream failure after peer connection stopped with state [%s]",r._publisherContext.streamId,e.iceConnectionState,t)}))};switch(e.iceConnectionState){case"checking":case"completed":case"connected":case"new":return;case"disconnected":case"failed":return void(navigator.onLine&&(r._logger.info("[%s] ICE connection state changed to [%s], trying to reconnect",r._publisherContext.streamId,e.iceConnectionState),r.reconnectPeerConnection(e,t)));case"closed":return r._logger.info("[%s] ICE connection state changed to [%s], retrying to connect",r._publisherContext.streamId,e.iceConnectionState),void t();default:R(e.iceConnectionState)}}},new De((function(e){e()})).then((function(){if(a)return r._logger.info("[%s] Set local SDP offer [%s]",r._publisherContext.streamId,a.sessionDescription.sdp),e.setLocalDescription(a.sessionDescription).catch((function(e){throw r._logger.info("[%s] Failed to set local description [%j] with message [%s]",r._publisherContext.streamId,a.sessionDescription,e.message),e}))})).then((function(){if(u)return r._logger.info("[%s] Set remote SDP answer [%s]",r._publisherContext.streamId,u.sessionDescription.sdp),e.setRemoteDescription(u.sessionDescription).catch((function(e){throw r._logger.info("[%s] Failed to set remote description [%j] with message [%s]",r._publisherContext.streamId,u.sessionDescription,e.message),e}))})).then((function(){if(s)return r._logger.info("[%s] Set remote SDP offer [%s]",r._publisherContext.streamId,s.sessionDescription.sdp),e.setRemoteDescription(s.sessionDescription).catch((function(e){throw r._logger.info("[%s] Failed to set remote description [%j] with message [%s]",r._publisherContext.streamId,u.sessionDescription,e.message),e})).then((function(){return e.createAnswer({offerToReceiveAudio:!1,offerToReceiveVideo:!1})})).then((function(e){return r._logger.info("[%s] Set local SDP answer [%s]",r._publisherContext.streamId,e.sdp),r._publisherContext.endPoint.value.setRemoteDescription(i,e)})).then((function(t){var n=t.status,i=t.sessionDescription;return r._publisherContext.state.value=r.mapSetRemoteDescriptionStatusToPublisherStatus(n),"ok"!==n?(r._publisherContext.publishing.value=!1,r._publisherContext.standby.value=!0,void(r._publisherContext.stopped.value=!1)):(r._logger.info("[%s] Set local SDP [%s]",r._publisherContext.streamId,i.sdp),e.setLocalDescription(i).catch((function(e){throw r._logger.info("[%s] Failed to set local description [%j] with message [%s]",r._publisherContext.streamId,i,e.message),e})))}))})).then((function(){return n.success(r._publisherContext.streamId),De.resolve()}))}))}))}},{key:"applyRtcConfiguration",value:(t=y()(_().mark((function e(t,n){var r;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return n=this.truncateIceServers(n),e.abrupt("return",he.peerConnectionFactory.value.createPeerConnection(n));case 3:return r=Fe(Fe({},t.getConfiguration()),n),t.setConfiguration(r),e.abrupt("return",t);case 6:case"end":return e.stop()}}),e,this)}))),function(e,n){return t.apply(this,arguments)})},{key:"truncateIceServers",value:function(e){for(var t=[],n=0;n<e.iceServers.length;n++){for(var r=[],i=0;i<2;i++)e.iceServers[n].urls[i]&&r.push(e.iceServers[n].urls[i]);t.push({urls:r,username:e.iceServers[n].username,credential:e.iceServers[n].credential})}return e.iceServers=t,e}},{key:"reconnectPeerConnection",value:function(e,t){var n=this;if("closed"!==e.iceConnectionState)if(this._publisherContext.state.value=pe.Reconnecting,this._publisherContext.peerConnectionReconnectAttempts<he.maximalNumberOfPeerConnectionReconnectAttempts||!he.automaticallyReconnectPeerConnection){if(this._publisherContext.peerConnectionReconnectAttempts++,q.clientOfferDisabled||!e.supportsSetConfiguration||!e.supportsGetConfiguration||this._publisherContext.failureCount.value)return;this._logger.info("Reconnecting peer connection by restarting ICE");var r=e.currentLocalDescription;e.createOffer({iceRestart:!0}).then((function(t){return e.setLocalDescription(t).then((function(){return e.setLocalDescription(r)}))})).catch((function(e){n._logger.error("Failed to reconnect peer connection",e),n._publisherContext.peerConnectionReconnectAttempts=0,t()}))}else this._logger.info("Failed to reconnect peer connection after [%s] attempts, performing full recovery",this._publisherContext.peerConnectionReconnectAttempts),this._publisherContext.peerConnectionReconnectAttempts=0,t()}},{key:"mapSetRemoteDescriptionStatusToPublisherStatus",value:function(e){switch(e){case"ok":return pe.Starting;case"unauthorized":return pe.Unauthorized;case"not-found":case"capacity":case"rate-limited":case"timeout":return pe.Recovering;case"failed":return pe.Error;default:R(e)}}}]),e}(),Ue=n(202).default,Ne="client:termination",Ve=function(){function e(t,n,r){var i=this;o()(this,e),c()(this,"_logger",E.getLogger("Publisher")),c()(this,"_context",void 0),c()(this,"_publisherStartTime",void 0),c()(this,"_readOnlyToken",void 0),c()(this,"_readOnlyPeerConnection",void 0),c()(this,"_readOnlyState",void 0),c()(this,"_readOnlyTokenExpiring",void 0),c()(this,"_readOnlyAuthorized",void 0),c()(this,"_readOnlyOnline",void 0),c()(this,"_readOnlyLoading",void 0),c()(this,"_readOnlyPublishing",void 0),c()(this,"_readOnlyStandby",void 0),c()(this,"_readOnlyStopped",void 0),c()(this,"_readOnlyFailureCount",void 0),c()(this,"_readOnlyEndPoint",void 0),c()(this,"_readOnlyStream",void 0),c()(this,"_readOnlyRtcStatistics",void 0),c()(this,"_readOnlyMediaStream",void 0),c()(this,"_metricsService",void 0),this._context=new _e(n,r),this._publisherStartTime=Date.now(),this._readOnlyToken=new G(this._context.token),this._readOnlyPeerConnection=new G(this._context.peerConnection),this._readOnlyState=new G(this._context.state),this._readOnlyTokenExpiring=new G(this._context.tokenExpiring),this._readOnlyAuthorized=new G(this._context.authorized),this._readOnlyOnline=new G(this._context.online),this._readOnlyLoading=new G(this._context.loading),this._readOnlyPublishing=new G(this._context.publishing),this._readOnlyStandby=new G(this._context.standby),this._readOnlyStopped=new G(this._context.stopped),this._readOnlyFailureCount=new G(this._context.failureCount),this._readOnlyEndPoint=new G(this._context.endPoint),this._readOnlyStream=new G(this._context.stream),this._readOnlyRtcStatistics=new G(this._context.rtcStatistics),this._readOnlyMediaStream=new G(this._context.mediaStream),this._context.mediaStream.value=t;var a=X.parseToken(this._context.token.value),s=(X.getUri(a)||he.discoveryUri.value).toString();he.tenancy.value=X.getTenancy(a)||he.tenancy.value,oe.uri.value=s,this._metricsService=ce.getMetricsService(s),this._context.sessionTelemetry=new ye(he.pageLoadTime,this._metricsService),this._context.publisherDisposables.add(this._context.sessionTelemetry),this._context.publisherDisposables.add(this._context.state.subscribe((function(e){i._context.clearFailureCountTimeout&&clearTimeout(i._context.clearFailureCountTimeout),i._context.failureCount.value&&e===pe.Publishing&&(i._context.clearFailureCountTimeout=window.setTimeout((function(){i._context.failureCount.value=0}),3e3))}))),this.start()}var t,n,r,i,a;return s()(e,[{key:"token",get:function(){return this._context.token.value},set:function(e){this._context.disposables.dispose(),this._context.token.value=e,this._context.tokenExpiring.value=!1;var t=X.parseToken(this._context.token.value),n=(X.getUri(t)||he.discoveryUri.value).toString();he.tenancy.value=X.getTenancy(t)||he.tenancy.value,oe.uri.value=n,this._metricsService=ce.getMetricsService(n),this.start()}},{key:"peerConnection",get:function(){return this._readOnlyPeerConnection}},{key:"state",get:function(){return this._readOnlyState}},{key:"tokenExpiring",get:function(){return this._readOnlyTokenExpiring}},{key:"authorized",get:function(){return this._readOnlyAuthorized}},{key:"online",get:function(){return this._readOnlyOnline}},{key:"loading",get:function(){return this._readOnlyLoading}},{key:"publishing",get:function(){return this._readOnlyPublishing}},{key:"standby",get:function(){return this._readOnlyStandby}},{key:"stopped",get:function(){return this._readOnlyStopped}},{key:"failureCount",get:function(){return this._readOnlyFailureCount}},{key:"endPoint",get:function(){return this._readOnlyEndPoint}},{key:"stream",get:function(){return this._readOnlyStream}},{key:"streamId",get:function(){return this._context.streamId}},{key:"rtcStats",get:function(){return this._readOnlyRtcStatistics}},{key:"mediaStream",get:function(){return this._readOnlyMediaStream}},{key:"stop",value:(a=y()(_().mark((function e(t){var n=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Ue((function(e){if(!n._context.isStarting.value)return n.processStop(t),void e();n._context.disposables.add(n._context.isStarting.subscribe((function(r){r||(n.processStop(t),e())})))})));case 1:case"end":return e.stop()}}),e)}))),function(e){return a.apply(this,arguments)})},{key:"processStop",value:function(e){this.cleanUpResources(e),this._context.mediaStream.value&&this._context.mediaStream.value.getTracks().forEach((function(e){return e.stop()})),this._context.peerConnection.value&&this._context.peerConnection.value.close(),this._context.state.value=pe.Stopped}},{key:"dispose",value:(i=y()(_().mark((function e(){var t=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.stop("client:channel-dispose").then((function(){t._context.publisherDisposables.dispose(),t._context.isDisposed=!0})));case 1:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getUri",value:function(e){var t=X.parseToken(e);return X.getUri(t)||(this._logger.info("Fall back to the default discover URI [%s]",he.discoveryUri.value),new URL(he.discoveryUri.value))}},{key:"start",value:(r=y()(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._context.isDisposed){e.next=2;break}throw new Error("Channel was already disposed");case 2:if(!this._context.isStarting.value){e.next=5;break}return this._logger.info("Publisher is already starting, skipping start"),e.abrupt("return");case 5:return this._context.isStarting.value=!0,e.abrupt("return",this.processStart());case 7:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"processStart",value:(n=y()(_().mark((function e(){var t,n,r,i,o,a=this;return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this._context.token.value,n=this._context.sessionTelemetry.listenOnStreamSetup(),X.isValidToken(t)){e.next=8;break}return this._logger.error("Failed to parse token [%s]",t),this._context.state.value=pe.Unauthorized,this._context.authorized.value=!1,this._context.isStarting.value=!1,e.abrupt("return");case 8:return this.cleanUpResources("client:start"),this._context.state.value=pe.Starting,this._context.loading.value=!0,r=this.getUri(t),i=function(){return new Ue((function(e){return a._context.isStarting.value=!1,e(a.handleStreamFailure())}))},o=new Me(this._context,i),e.abrupt("return",o.start(r,t,n).then((function(){a._context.loading.value=!1,a._context.publishing.value=!0,a._context.state.value=pe.Publishing})).catch((function(e){n.fail(),a._context.failureCount.value++,a._context.online.value=!1,a.cleanUpResources("client:cleanup-after-failed-setup"),a._context.state.value=pe.Error,a._logger.error("Failed to start publishing",e)})).finally((function(){if(a._context.isStarting.value=!1,a._context.state.value!==pe.Publishing&&he.automaticRetryOnFailure){var e=setTimeout((function(){a.handleStreamFailure().catch((function(e){a._logger.error("Failed handling stream failure",e)}))}),a.getRetryInterval());a._context.disposables.add(new N((function(){clearTimeout(e)})))}})));case 15:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"getRetryInterval",value:function(){switch(this._context.state.value){case pe.StandBy:case pe.Offline:return 15e3;case pe.Error:case pe.Recovering:case pe.Unauthorized:case pe.GeoRestricted:case pe.GeoBlocked:case pe.Stopped:case pe.Starting:case pe.Publishing:case pe.Reconnecting:case pe.UnsupportedFeature:return Math.min(3e5,Math.pow(2e3,Math.max(0,this._context.failureCount.value-1)));default:R(this._context.state.value)}}},{key:"handleStreamFailure",value:(t=y()(_().mark((function e(){return _().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.t0=this._context.state.value,e.next=e.t0===pe.Error||e.t0===pe.Reconnecting||e.t0===pe.StandBy||e.t0===pe.Offline||e.t0===pe.Recovering?3:e.t0===pe.Unauthorized?5:e.t0===pe.GeoRestricted?7:e.t0===pe.GeoBlocked?9:e.t0===pe.Stopped?11:e.t0===pe.Publishing?13:e.t0===pe.Starting?15:e.t0===pe.UnsupportedFeature?17:19;break;case 3:return this._logger.info("Retry start with initial state [%s] [%s]",this._context.state.value,pe[this._context.state.value]),e.abrupt("break",20);case 5:return this._logger.info("Publisher is unauthorized, skipping retry of start. Please provide a new token and invoke start()"),e.abrupt("return");case 7:return this._logger.info("Publisher is geo restricted, skipping retry of start. Please provide a new token and invoke start()"),e.abrupt("return");case 9:return this._logger.info("Publisher is geo blocked, skipping retry of start. Please provide a new token and invoke start()"),e.abrupt("return");case 11:return this._logger.info("Publisher is stopped, skipping retry of start."),e.abrupt("return");case 13:return this._logger.info("Publisher is publishing, skipping retry of start"),e.abrupt("return");case 15:return this._logger.info("Publisher is already starting, skipping retry of start"),e.abrupt("return");case 17:return this._logger.info("Publisher is stopped due to unsupported feature, skipping retry of start."),e.abrupt("return");case 19:R(this._context.state.value);case 20:return e.abrupt("return",this.start());case 21:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"cleanUpResources",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ne;this._context.disposables.dispose();var n=this._context.peerConnection.value;n&&(this._context.peerConnection.value=null,n.close()),this._context.publishing.value=!1,this._context.stopped.value=!0,this._context.standby.value=!1,this._context.stream.value&&this._context.endPoint.value&&this._context.endPoint.value.destroyStream(this._context.stream.value,t).then((function(t){var n=t.status;"ok"===n?e._logger.info("[%s] Destroyed stream with reason [%s]",e.streamId,n):e._logger.warn("[%s] Failed to destroy stream with reason [%s]",e.streamId,n)})).catch((function(t){e._logger.error("[%s] Failed to destroy stream",e.streamId,t)})),this._context.stream.value=null,this._context.endPoint.value=null,this._context.peerConnectionReconnectAttempts=0}}]),e}(),Be={SDK:he,Publishers:function(){function e(){throw o()(this,e),new Error("Publishers is a static class that may not be instantiated")}return s()(e,null,[{key:"createPublisher",value:function(e){if(!he.initialized.value)throw new Error("SDK is not loaded.");return new Ve(e.mediaStream,e.token,e.name)}}]),e}(),PublisherState:pe}},3099:function(e){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},6077:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},1223:function(e,t,n){var r=n(5112),i=n(30),o=n(3070),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),e.exports=function(e){s[a][e]=!0}},1530:function(e,t,n){"use strict";var r=n(8710).charAt;e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},5787:function(e){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},9670:function(e,t,n){var r=n(111);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},1285:function(e,t,n){"use strict";var r=n(7908),i=n(1400),o=n(7466);e.exports=function(e){for(var t=r(this),n=o(t.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,c=void 0===u?n:i(u,n);c>s;)t[s++]=e;return t}},8533:function(e,t,n){"use strict";var r=n(2092).forEach,i=n(9341),o=n(9207),a=i("forEach"),s=o("forEach");e.exports=a&&s?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},8457:function(e,t,n){"use strict";var r=n(9974),i=n(7908),o=n(3411),a=n(7659),s=n(7466),u=n(6135),c=n(1246);e.exports=function(e){var t,n,l,f,h,p,d=i(e),v="function"==typeof this?this:Array,g=arguments.length,y=g>1?arguments[1]:void 0,m=void 0!==y,_=c(d),b=0;if(m&&(y=r(y,g>2?arguments[2]:void 0,2)),null==_||v==Array&&a(_))for(n=new v(t=s(d.length));t>b;b++)p=m?y(d[b],b):d[b],u(n,b,p);else for(h=(f=_.call(d)).next,n=new v;!(l=h.call(f)).done;b++)p=m?o(f,y,[l.value,b],!0):l.value,u(n,b,p);return n.length=b,n}},1318:function(e,t,n){var r=n(5656),i=n(7466),o=n(1400),a=function(e){return function(t,n,a){var s,u=r(t),c=i(u.length),l=o(a,c);if(e&&n!=n){for(;c>l;)if((s=u[l++])!=s)return!0}else for(;c>l;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},2092:function(e,t,n){var r=n(9974),i=n(8361),o=n(7908),a=n(7466),s=n(5417),u=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,l=4==e,f=6==e,h=7==e,p=5==e||f;return function(d,v,g,y){for(var m,_,b=o(d),w=i(b),x=r(v,g,3),S=a(w.length),k=0,T=y||s,C=t?T(d,S):n||h?T(d,0):void 0;S>k;k++)if((p||k in w)&&(_=x(m=w[k],k,b),e))if(t)C[k]=_;else if(_)switch(e){case 3:return!0;case 5:return m;case 6:return k;case 2:u.call(C,m)}else switch(e){case 4:return!1;case 7:u.call(C,m)}return f?-1:c||l?l:C}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},1194:function(e,t,n){var r=n(7293),i=n(5112),o=n(7392),a=i("species");e.exports=function(e){return o>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},9341:function(e,t,n){"use strict";var r=n(7293);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},9207:function(e,t,n){var r=n(9781),i=n(7293),o=n(6656),a=Object.defineProperty,s={},u=function(e){throw e};e.exports=function(e,t){if(o(s,e))return s[e];t||(t={});var n=[][e],c=!!o(t,"ACCESSORS")&&t.ACCESSORS,l=o(t,0)?t[0]:u,f=o(t,1)?t[1]:void 0;return s[e]=!!n&&!i((function(){if(c&&!r)return!0;var e={length:-1};c?a(e,1,{enumerable:!0,get:u}):e[1]=1,n.call(e,l,f)}))}},3671:function(e,t,n){var r=n(3099),i=n(7908),o=n(8361),a=n(7466),s=function(e){return function(t,n,s,u){r(n);var c=i(t),l=o(c),f=a(c.length),h=e?f-1:0,p=e?-1:1;if(s<2)for(;;){if(h in l){u=l[h],h+=p;break}if(h+=p,e?h<0:f<=h)throw TypeError("Reduce of empty array with no initial value")}for(;e?h>=0:f>h;h+=p)h in l&&(u=n(u,l[h],h,c));return u}};e.exports={left:s(!1),right:s(!0)}},5417:function(e,t,n){var r=n(111),i=n(3157),o=n(5112)("species");e.exports=function(e,t){var n;return i(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},3411:function(e,t,n){var r=n(9670),i=n(9212);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(t){throw i(e),t}}},7072:function(e,t,n){var r=n(5112)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},4326:function(e){var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},648:function(e,t,n){var r=n(1694),i=n(4326),o=n(5112)("toStringTag"),a="Arguments"==i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),o))?n:a?i(t):"Object"==(r=i(t))&&"function"==typeof t.callee?"Arguments":r}},9920:function(e,t,n){var r=n(6656),i=n(3887),o=n(1236),a=n(3070);e.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];r(e,l)||s(e,l,u(t,l))}}},4964:function(e,t,n){var r=n(5112)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},8544:function(e,t,n){var r=n(7293);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},4994:function(e,t,n){"use strict";var r=n(3383).IteratorPrototype,i=n(30),o=n(9114),a=n(8003),s=n(7497),u=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=i(r,{next:o(1,n)}),a(e,c,!1,!0),s[c]=u,e}},8880:function(e,t,n){var r=n(9781),i=n(3070),o=n(9114);e.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},9114:function(e){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6135:function(e,t,n){"use strict";var r=n(7593),i=n(3070),o=n(9114);e.exports=function(e,t,n){var a=r(t);a in e?i.f(e,a,o(0,n)):e[a]=n}},5573:function(e,t,n){"use strict";var r=n(7293),i=n(6650).start,o=Math.abs,a=Date.prototype,s=a.getTime,u=a.toISOString;e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=u.call(new Date(-50000000000001))}))||!r((function(){u.call(new Date(NaN))}))?function(){if(!isFinite(s.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+i(o(t),r?6:4,0)+"-"+i(e.getUTCMonth()+1,2,0)+"-"+i(e.getUTCDate(),2,0)+"T"+i(e.getUTCHours(),2,0)+":"+i(e.getUTCMinutes(),2,0)+":"+i(e.getUTCSeconds(),2,0)+"."+i(n,3,0)+"Z"}:u},654:function(e,t,n){"use strict";var r=n(2109),i=n(4994),o=n(9518),a=n(7674),s=n(8003),u=n(8880),c=n(1320),l=n(5112),f=n(1913),h=n(7497),p=n(3383),d=p.IteratorPrototype,v=p.BUGGY_SAFARI_ITERATORS,g=l("iterator"),y="keys",m="values",_="entries",b=function(){return this};e.exports=function(e,t,n,l,p,w,x){i(n,t,l);var S,k,T,C=function(e){if(e===p&&E)return E;if(!v&&e in P)return P[e];switch(e){case y:case m:case _:return function(){return new n(this,e)}}return function(){return new n(this)}},R=t+" Iterator",L=!1,P=e.prototype,O=P[g]||P["@@iterator"]||p&&P[p],E=!v&&O||C(p),A="Array"==t&&P.entries||O;if(A&&(S=o(A.call(new e)),d!==Object.prototype&&S.next&&(f||o(S)===d||(a?a(S,d):"function"!=typeof S[g]&&u(S,g,b)),s(S,R,!0,!0),f&&(h[R]=b))),p==m&&O&&O.name!==m&&(L=!0,E=function(){return O.call(this)}),f&&!x||P[g]===E||u(P,g,E),h[t]=E,p)if(k={values:C(m),keys:w?E:C(y),entries:C(_)},x)for(T in k)(v||L||!(T in P))&&c(P,T,k[T]);else r({target:t,proto:!0,forced:v||L},k);return k}},9781:function(e,t,n){var r=n(7293);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},317:function(e,t,n){var r=n(7854),i=n(111),o=r.document,a=i(o)&&i(o.createElement);e.exports=function(e){return a?o.createElement(e):{}}},8324:function(e){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},6833:function(e,t,n){var r=n(8113);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(r)},5268:function(e,t,n){var r=n(4326),i=n(7854);e.exports="process"==r(i.process)},8113:function(e,t,n){var r=n(5005);e.exports=r("navigator","userAgent")||""},7392:function(e,t,n){var r,i,o=n(7854),a=n(8113),s=o.process,u=s&&s.versions,c=u&&u.v8;c?i=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),e.exports=i&&+i},748:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2109:function(e,t,n){var r=n(7854),i=n(1236).f,o=n(8880),a=n(1320),s=n(3505),u=n(9920),c=n(4705);e.exports=function(e,t){var n,l,f,h,p,d=e.target,v=e.global,g=e.stat;if(n=v?r:g?r[d]||s(d,{}):(r[d]||{}).prototype)for(l in t){if(h=t[l],f=e.noTargetGet?(p=i(n,l))&&p.value:n[l],!c(v?l:d+(g?".":"#")+l,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(n,l,h,e)}}},7293:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},7007:function(e,t,n){"use strict";n(4916);var r=n(1320),i=n(7293),o=n(5112),a=n(2261),s=n(8880),u=o("species"),c=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),l="$0"==="a".replace(/./,"$0"),f=o("replace"),h=!!/./[f]&&""===/./[f]("a","$0"),p=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,f){var d=o(e),v=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),g=v&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[u]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return t=!0,null},n[d](""),!t}));if(!v||!g||"replace"===e&&(!c||!l||h)||"split"===e&&!p){var y=/./[d],m=n(d,""[e],(function(e,t,n,r,i){return t.exec===a?v&&!i?{done:!0,value:y.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:l,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:h}),_=m[0],b=m[1];r(String.prototype,e,_),r(RegExp.prototype,d,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}f&&s(RegExp.prototype[d],"sham",!0)}},9974:function(e,t,n){var r=n(3099);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};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)}}},7065:function(e,t,n){"use strict";var r=n(3099),i=n(111),o=[].slice,a={},s=function(e,t,n){if(!(t in a)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";a[t]=Function("C,a","return new C("+r.join(",")+")")}return a[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=o.call(arguments,1),a=function(){var r=n.concat(o.call(arguments));return this instanceof a?s(t,r.length,r):t.apply(e,r)};return i(t.prototype)&&(a.prototype=t.prototype),a}},5005:function(e,t,n){var r=n(857),i=n(7854),o=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e])||o(i[e]):r[e]&&r[e][t]||i[e]&&i[e][t]}},1246:function(e,t,n){var r=n(648),i=n(7497),o=n(5112)("iterator");e.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},8554:function(e,t,n){var r=n(9670),i=n(1246);e.exports=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(String(e)+" is not iterable");return r(t.call(e))}},7854:function(e,t,n){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},6656:function(e){var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},3501:function(e){e.exports={}},842:function(e,t,n){var r=n(7854);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},490:function(e,t,n){var r=n(5005);e.exports=r("document","documentElement")},4664:function(e,t,n){var r=n(9781),i=n(7293),o=n(317);e.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},8361:function(e,t,n){var r=n(7293),i=n(4326),o="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},9587:function(e,t,n){var r=n(111),i=n(7674);e.exports=function(e,t,n){var o,a;return i&&"function"==typeof(o=t.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(e,a),e}},2788:function(e,t,n){var r=n(5465),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return i.call(e)}),e.exports=r.inspectSource},9909:function(e,t,n){var r,i,o,a=n(8536),s=n(7854),u=n(111),c=n(8880),l=n(6656),f=n(5465),h=n(6200),p=n(3501),d=s.WeakMap;if(a){var v=f.state||(f.state=new d),g=v.get,y=v.has,m=v.set;r=function(e,t){return t.facade=e,m.call(v,e,t),t},i=function(e){return g.call(v,e)||{}},o=function(e){return y.call(v,e)}}else{var _=h("state");p[_]=!0,r=function(e,t){return t.facade=e,c(e,_,t),t},i=function(e){return l(e,_)?e[_]:{}},o=function(e){return l(e,_)}}e.exports={set:r,get:i,has:o,enforce:function(e){return o(e)?i(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!u(t)||(n=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},7659:function(e,t,n){var r=n(5112),i=n(7497),o=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},3157:function(e,t,n){var r=n(4326);e.exports=Array.isArray||function(e){return"Array"==r(e)}},4705:function(e,t,n){var r=n(7293),i=/#|\.prototype\./,o=function(e,t){var n=s[a(e)];return n==c||n!=u&&("function"==typeof t?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},111:function(e){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},1913:function(e){e.exports=!1},7850:function(e,t,n){var r=n(111),i=n(4326),o=n(5112)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},408:function(e,t,n){var r=n(9670),i=n(7659),o=n(7466),a=n(9974),s=n(1246),u=n(9212),c=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var l,f,h,p,d,v,g,y=n&&n.that,m=!(!n||!n.AS_ENTRIES),_=!(!n||!n.IS_ITERATOR),b=!(!n||!n.INTERRUPTED),w=a(t,y,1+m+b),x=function(e){return l&&u(l),new c(!0,e)},S=function(e){return m?(r(e),b?w(e[0],e[1],x):w(e[0],e[1])):b?w(e,x):w(e)};if(_)l=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(i(f)){for(h=0,p=o(e.length);p>h;h++)if((d=S(e[h]))&&d instanceof c)return d;return new c(!1)}l=f.call(e)}for(v=l.next;!(g=v.call(l)).done;){try{d=S(g.value)}catch(e){throw u(l),e}if("object"==typeof d&&d&&d instanceof c)return d}return new c(!1)}},9212:function(e,t,n){var r=n(9670);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},3383:function(e,t,n){"use strict";var r,i,o,a=n(9518),s=n(8880),u=n(6656),c=n(5112),l=n(1913),f=c("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):h=!0),null==r&&(r={}),l||u(r,f)||s(r,f,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},7497:function(e){e.exports={}},5948:function(e,t,n){var r,i,o,a,s,u,c,l,f=n(7854),h=n(1236).f,p=n(261).set,d=n(6833),v=n(5268),g=f.MutationObserver||f.WebKitMutationObserver,y=f.document,m=f.process,_=f.Promise,b=h(f,"queueMicrotask"),w=b&&b.value;w||(r=function(){var e,t;for(v&&(e=m.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},!d&&!v&&g&&y?(s=!0,u=y.createTextNode(""),new g(r).observe(u,{characterData:!0}),a=function(){u.data=s=!s}):_&&_.resolve?(c=_.resolve(void 0),l=c.then,a=function(){l.call(c,r)}):a=v?function(){m.nextTick(r)}:function(){p.call(f,r)}),e.exports=w||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},3366:function(e,t,n){var r=n(7854);e.exports=r.Promise},133:function(e,t,n){var r=n(7293);e.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},590:function(e,t,n){var r=n(7293),i=n(5112),o=n(1913),a=i("iterator");e.exports=!r((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,n="";return e.pathname="c%20d",t.forEach((function(e,r){t.delete("b"),n+=r+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==n||"x"!==new URL("http://x",void 0).host}))},8536:function(e,t,n){var r=n(7854),i=n(2788),o=r.WeakMap;e.exports="function"==typeof o&&/native code/.test(i(o))},8523:function(e,t,n){"use strict";var r=n(3099),i=function(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)}},3929:function(e,t,n){var r=n(7850);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},3009:function(e,t,n){var r=n(7854),i=n(3111).trim,o=n(1361),a=r.parseInt,s=/^[+-]?0[Xx]/,u=8!==a(o+"08")||22!==a(o+"0x16");e.exports=u?function(e,t){var n=i(String(e));return a(n,t>>>0||(s.test(n)?16:10))}:a},1574:function(e,t,n){"use strict";var r=n(9781),i=n(7293),o=n(1956),a=n(5181),s=n(5296),u=n(7908),c=n(8361),l=Object.assign,f=Object.defineProperty;e.exports=!l||i((function(){if(r&&1!==l({b:1},l(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||o(l({},t)).join("")!=i}))?function(e,t){for(var n=u(e),i=arguments.length,l=1,f=a.f,h=s.f;i>l;)for(var p,d=c(arguments[l++]),v=f?o(d).concat(f(d)):o(d),g=v.length,y=0;g>y;)p=v[y++],r&&!h.call(d,p)||(n[p]=d[p]);return n}:l},30:function(e,t,n){var r,i=n(9670),o=n(6048),a=n(748),s=n(3501),u=n(490),c=n(317),l=n(6200)("IE_PROTO"),f=function(){},h=function(e){return"<script>"+e+"<\/script>"},p=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;p=r?function(e){e.write(h("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=c("iframe")).style.display="none",u.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(h("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete p.prototype[a[n]];return p()};s[l]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(f.prototype=i(e),n=new f,f.prototype=null,n[l]=e):n=p(),void 0===t?n:o(n,t)}},6048:function(e,t,n){var r=n(9781),i=n(3070),o=n(9670),a=n(1956);e.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;s>u;)i.f(e,n=r[u++],t[n]);return e}},3070:function(e,t,n){var r=n(9781),i=n(4664),o=n(9670),a=n(7593),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(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}},1236:function(e,t,n){var r=n(9781),i=n(5296),o=n(9114),a=n(5656),s=n(7593),u=n(6656),c=n(4664),l=Object.getOwnPropertyDescriptor;t.f=r?l:function(e,t){if(e=a(e),t=s(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},8006:function(e,t,n){var r=n(6324),i=n(748).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},5181:function(e,t){t.f=Object.getOwnPropertySymbols},9518:function(e,t,n){var r=n(6656),i=n(7908),o=n(6200),a=n(8544),s=o("IE_PROTO"),u=Object.prototype;e.exports=a?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?u:null}},6324:function(e,t,n){var r=n(6656),i=n(5656),o=n(1318).indexOf,a=n(3501);e.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>u;)r(s,n=t[u++])&&(~o(c,n)||c.push(n));return c}},1956:function(e,t,n){var r=n(6324),i=n(748);e.exports=Object.keys||function(e){return r(e,i)}},5296:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!n.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},7674:function(e,t,n){var r=n(9670),i=n(6077);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},4699:function(e,t,n){var r=n(9781),i=n(1956),o=n(5656),a=n(5296).f,s=function(e){return function(t){for(var n,s=o(t),u=i(s),c=u.length,l=0,f=[];c>l;)n=u[l++],r&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}};e.exports={entries:s(!0),values:s(!1)}},288:function(e,t,n){"use strict";var r=n(1694),i=n(648);e.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},3887:function(e,t,n){var r=n(5005),i=n(8006),o=n(5181),a=n(9670);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},857:function(e,t,n){var r=n(7854);e.exports=r},2534:function(e){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},9478:function(e,t,n){var r=n(9670),i=n(111),o=n(8523);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},2248:function(e,t,n){var r=n(1320);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},1320:function(e,t,n){var r=n(7854),i=n(8880),o=n(6656),a=n(3505),s=n(2788),u=n(9909),c=u.get,l=u.enforce,f=String(String).split("String");(e.exports=function(e,t,n,s){var u,c=!!s&&!!s.unsafe,h=!!s&&!!s.enumerable,p=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),(u=l(n)).source||(u.source=f.join("string"==typeof t?t:""))),e!==r?(c?!p&&e[t]&&(h=!0):delete e[t],h?e[t]=n:i(e,t,n)):h?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},7651:function(e,t,n){var r=n(4326),i=n(2261);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},2261:function(e,t,n){"use strict";var r,i,o=n(7066),a=n(2999),s=RegExp.prototype.exec,u=String.prototype.replace,c=s,l=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),f=a.UNSUPPORTED_Y||a.BROKEN_CARET,h=void 0!==/()??/.exec("")[1];(l||h||f)&&(c=function(e){var t,n,r,i,a=this,c=f&&a.sticky,p=o.call(a),d=a.source,v=0,g=e;return c&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),g=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(d="(?: "+d+")",g=" "+g,v++),n=new RegExp("^(?:"+d+")",p)),h&&(n=new RegExp("^"+d+"$(?!\\s)",p)),l&&(t=a.lastIndex),r=s.call(c?n:a,g),c?r?(r.input=r.input.slice(v),r[0]=r[0].slice(v),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:l&&r&&(a.lastIndex=a.global?r.index+r[0].length:t),h&&r&&r.length>1&&u.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=c},7066:function(e,t,n){"use strict";var r=n(9670);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},2999:function(e,t,n){"use strict";var r=n(7293);function i(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=r((function(){var e=i("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=r((function(){var e=i("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},4488:function(e){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},1150:function(e){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},3505:function(e,t,n){var r=n(7854),i=n(8880);e.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},6340:function(e,t,n){"use strict";var r=n(5005),i=n(3070),o=n(5112),a=n(9781),s=o("species");e.exports=function(e){var t=r(e),n=i.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},8003:function(e,t,n){var r=n(3070).f,i=n(6656),o=n(5112)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},6200:function(e,t,n){var r=n(2309),i=n(9711),o=r("keys");e.exports=function(e){return o[e]||(o[e]=i(e))}},5465:function(e,t,n){var r=n(7854),i=n(3505),o="__core-js_shared__",a=r[o]||i(o,{});e.exports=a},2309:function(e,t,n){var r=n(1913),i=n(5465);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.8.1",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},6707:function(e,t,n){var r=n(9670),i=n(3099),o=n(5112)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[o])?t:i(n)}},8710:function(e,t,n){var r=n(9958),i=n(4488),o=function(e){return function(t,n){var o,a,s=String(i(t)),u=r(n),c=s.length;return u<0||u>=c?e?"":void 0:(o=s.charCodeAt(u))<55296||o>56319||u+1===c||(a=s.charCodeAt(u+1))<56320||a>57343?e?s.charAt(u):o:e?s.slice(u,u+2):a-56320+(o-55296<<10)+65536}};e.exports={codeAt:o(!1),charAt:o(!0)}},4986:function(e,t,n){var r=n(8113);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r)},6650:function(e,t,n){var r=n(7466),i=n(8415),o=n(4488),a=Math.ceil,s=function(e){return function(t,n,s){var u,c,l=String(o(t)),f=l.length,h=void 0===s?" ":String(s),p=r(n);return p<=f||""==h?l:(u=p-f,(c=i.call(h,a(u/h.length))).length>u&&(c=c.slice(0,u)),e?l+c:c+l)}};e.exports={start:s(!1),end:s(!0)}},3197:function(e){"use strict";var t=2147483647,n=/[^\0-\u007E]/,r=/[.\u3002\uFF0E\uFF61]/g,i="Overflow: input needs wider integers to process",o=Math.floor,a=String.fromCharCode,s=function(e){return e+22+75*(e<26)},u=function(e,t,n){var r=0;for(e=n?o(e/700):e>>1,e+=o(e/t);e>455;r+=36)e=o(e/35);return o(r+36*e/(e+38))},c=function(e){var n=[];e=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}(e);var r,c,l=e.length,f=128,h=0,p=72;for(r=0;r<e.length;r++)(c=e[r])<128&&n.push(a(c));var d=n.length,v=d;for(d&&n.push("-");v<l;){var g=t;for(r=0;r<e.length;r++)(c=e[r])>=f&&c<g&&(g=c);var y=v+1;if(g-f>o((t-h)/y))throw RangeError(i);for(h+=(g-f)*y,f=g,r=0;r<e.length;r++){if((c=e[r])<f&&++h>t)throw RangeError(i);if(c==f){for(var m=h,_=36;;_+=36){var b=_<=p?1:_>=p+26?26:_-p;if(m<b)break;var w=m-b,x=36-b;n.push(a(s(b+w%x))),m=o(w/x)}n.push(a(s(m))),p=u(h,y,v==d),h=0,++v}}++h,++f}return n.join("")};e.exports=function(e){var t,i,o=[],a=e.toLowerCase().replace(r,".").split(".");for(t=0;t<a.length;t++)i=a[t],o.push(n.test(i)?"xn--"+c(i):i);return o.join(".")}},8415:function(e,t,n){"use strict";var r=n(9958),i=n(4488);e.exports="".repeat||function(e){var t=String(i(this)),n="",o=r(e);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(t+=t))1&o&&(n+=t);return n}},3111:function(e,t,n){var r=n(4488),i="["+n(1361)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(e){return function(t){var n=String(r(t));return 1&e&&(n=n.replace(o,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:s(1),end:s(2),trim:s(3)}},261:function(e,t,n){var r,i,o,a=n(7854),s=n(7293),u=n(9974),c=n(490),l=n(317),f=n(6833),h=n(5268),p=a.location,d=a.setImmediate,v=a.clearImmediate,g=a.process,y=a.MessageChannel,m=a.Dispatch,_=0,b={},w=function(e){if(b.hasOwnProperty(e)){var t=b[e];delete b[e],t()}},x=function(e){return function(){w(e)}},S=function(e){w(e.data)},k=function(e){a.postMessage(e+"",p.protocol+"//"+p.host)};d&&v||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return b[++_]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(_),_},v=function(e){delete b[e]},h?r=function(e){g.nextTick(x(e))}:m&&m.now?r=function(e){m.now(x(e))}:y&&!f?(o=(i=new y).port2,i.port1.onmessage=S,r=u(o.postMessage,o,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts&&p&&"file:"!==p.protocol&&!s(k)?(r=k,a.addEventListener("message",S,!1)):r="onreadystatechange"in l("script")?function(e){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),w(e)}}:function(e){setTimeout(x(e),0)}),e.exports={set:d,clear:v}},1400:function(e,t,n){var r=n(9958),i=Math.max,o=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):o(n,t)}},5656:function(e,t,n){var r=n(8361),i=n(4488);e.exports=function(e){return r(i(e))}},9958:function(e){var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},7466:function(e,t,n){var r=n(9958),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},7908:function(e,t,n){var r=n(4488);e.exports=function(e){return Object(r(e))}},7593:function(e,t,n){var r=n(111);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")}},1694:function(e,t,n){var r={};r[n(5112)("toStringTag")]="z",e.exports="[object z]"===String(r)},9711:function(e){var t=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++t+n).toString(36)}},3307:function(e,t,n){var r=n(133);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5112:function(e,t,n){var r=n(7854),i=n(2309),o=n(6656),a=n(9711),s=n(133),u=n(3307),c=i("wks"),l=r.Symbol,f=u?l:l&&l.withoutSetter||a;e.exports=function(e){return o(c,e)||(s&&o(l,e)?c[e]=l[e]:c[e]=f("Symbol."+e)),c[e]}},1361:function(e){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},2222:function(e,t,n){"use strict";var r=n(2109),i=n(7293),o=n(3157),a=n(111),s=n(7908),u=n(7466),c=n(6135),l=n(5417),f=n(1194),h=n(5112),p=n(7392),d=h("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",y=p>=51||!i((function(){var e=[];return e[d]=!1,e.concat()[0]!==e})),m=f("concat"),_=function(e){if(!a(e))return!1;var t=e[d];return void 0!==t?!!t:o(e)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(e){var t,n,r,i,o,a=s(this),f=l(a,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(_(o=-1===t?a:arguments[t])){if(h+(i=u(o.length))>v)throw TypeError(g);for(n=0;n<i;n++,h++)n in o&&c(f,h,o[n])}else{if(h>=v)throw TypeError(g);c(f,h++,o)}return f.length=h,f}})},3290:function(e,t,n){var r=n(2109),i=n(1285),o=n(1223);r({target:"Array",proto:!0},{fill:i}),o("fill")},9826:function(e,t,n){"use strict";var r=n(2109),i=n(2092).find,o=n(1223),a=n(9207),s="find",u=!0,c=a(s);s in[]&&Array(1).find((function(){u=!1})),r({target:"Array",proto:!0,forced:u||!c},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o(s)},9554:function(e,t,n){"use strict";var r=n(2109),i=n(8533);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},6699:function(e,t,n){"use strict";var r=n(2109),i=n(1318).includes,o=n(1223);r({target:"Array",proto:!0,forced:!n(9207)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),o("includes")},2772:function(e,t,n){"use strict";var r=n(2109),i=n(1318).indexOf,o=n(9341),a=n(9207),s=[].indexOf,u=!!s&&1/[1].indexOf(1,-0)<0,c=o("indexOf"),l=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:u||!c||!l},{indexOf:function(e){return u?s.apply(this,arguments)||0:i(this,e,arguments.length>1?arguments[1]:void 0)}})},9753:function(e,t,n){n(2109)({target:"Array",stat:!0},{isArray:n(3157)})},6992:function(e,t,n){"use strict";var r=n(5656),i=n(1223),o=n(7497),a=n(9909),s=n(654),u="Array Iterator",c=a.set,l=a.getterFor(u);e.exports=s(Array,"Array",(function(e,t){c(this,{type:u,target:r(e),index:0,kind:t})}),(function(){var e=l(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},9600:function(e,t,n){"use strict";var r=n(2109),i=n(8361),o=n(5656),a=n(9341),s=[].join,u=i!=Object,c=a("join",",");r({target:"Array",proto:!0,forced:u||!c},{join:function(e){return s.call(o(this),void 0===e?",":e)}})},1249:function(e,t,n){"use strict";var r=n(2109),i=n(2092).map,o=n(1194),a=n(9207),s=o("map"),u=a("map");r({target:"Array",proto:!0,forced:!s||!u},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},5827:function(e,t,n){"use strict";var r=n(2109),i=n(3671).left,o=n(9341),a=n(9207),s=n(7392),u=n(5268),c=o("reduce"),l=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!c||!l||!u&&s>79&&s<83},{reduce:function(e){return i(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}})},7042:function(e,t,n){"use strict";var r=n(2109),i=n(111),o=n(3157),a=n(1400),s=n(7466),u=n(5656),c=n(6135),l=n(5112),f=n(1194),h=n(9207),p=f("slice"),d=h("slice",{ACCESSORS:!0,0:0,1:2}),v=l("species"),g=[].slice,y=Math.max;r({target:"Array",proto:!0,forced:!p||!d},{slice:function(e,t){var n,r,l,f=u(this),h=s(f.length),p=a(e,h),d=a(void 0===t?h:t,h);if(o(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[v])&&(n=void 0):n=void 0,n===Array||void 0===n))return g.call(f,p,d);for(r=new(void 0===n?Array:n)(y(d-p,0)),l=0;p<d;p++,l++)p in f&&c(r,l,f[p]);return r.length=l,r}})},561:function(e,t,n){"use strict";var r=n(2109),i=n(1400),o=n(9958),a=n(7466),s=n(7908),u=n(5417),c=n(6135),l=n(1194),f=n(9207),h=l("splice"),p=f("splice",{ACCESSORS:!0,0:0,1:2}),d=Math.max,v=Math.min,g=9007199254740991,y="Maximum allowed length exceeded";r({target:"Array",proto:!0,forced:!h||!p},{splice:function(e,t){var n,r,l,f,h,p,m=s(this),_=a(m.length),b=i(e,_),w=arguments.length;if(0===w?n=r=0:1===w?(n=0,r=_-b):(n=w-2,r=v(d(o(t),0),_-b)),_+n-r>g)throw TypeError(y);for(l=u(m,r),f=0;f<r;f++)(h=b+f)in m&&c(l,f,m[h]);if(l.length=r,n<r){for(f=b;f<_-r;f++)p=f+n,(h=f+r)in m?m[p]=m[h]:delete m[p];for(f=_;f>_-r+n;f--)delete m[f-1]}else if(n>r)for(f=_-r;f>b;f--)p=f+n-1,(h=f+r-1)in m?m[p]=m[h]:delete m[p];for(f=0;f<n;f++)m[f+b]=arguments[f+2];return m.length=_-r+n,l}})},3843:function(e,t,n){n(2109)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},8733:function(e,t,n){var r=n(2109),i=n(5573);r({target:"Date",proto:!0,forced:Date.prototype.toISOString!==i},{toISOString:i})},3710:function(e,t,n){var r=n(1320),i=Date.prototype,o="Invalid Date",a=i.toString,s=i.getTime;new Date(NaN)+""!=o&&r(i,"toString",(function(){var e=s.call(this);return e==e?a.call(this):o}))},4812:function(e,t,n){n(2109)({target:"Function",proto:!0},{bind:n(7065)})},8309:function(e,t,n){var r=n(9781),i=n(3070).f,o=Function.prototype,a=o.toString,s=/^\s*function ([^ (]*)/,u="name";r&&!(u in o)&&i(o,u,{configurable:!0,get:function(){try{return a.call(this).match(s)[1]}catch(e){return""}}})},9653:function(e,t,n){"use strict";var r=n(9781),i=n(7854),o=n(4705),a=n(1320),s=n(6656),u=n(4326),c=n(9587),l=n(7593),f=n(7293),h=n(30),p=n(8006).f,d=n(1236).f,v=n(3070).f,g=n(3111).trim,y="Number",m=i.Number,_=m.prototype,b=u(h(_))==y,w=function(e){var t,n,r,i,o,a,s,u,c=l(e,!1);if("string"==typeof c&&c.length>2)if(43===(t=(c=g(c)).charCodeAt(0))||45===t){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(c.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=c.slice(2)).length,s=0;s<a;s++)if((u=o.charCodeAt(s))<48||u>i)return NaN;return parseInt(o,r)}return+c};if(o(y,!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var x,S=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof S&&(b?f((function(){_.valueOf.call(n)})):u(n)!=y)?c(new m(w(t)),n,S):w(t)},k=r?p(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),T=0;k.length>T;T++)s(m,x=k[T])&&!s(S,x)&&v(S,x,d(m,x));S.prototype=_,_.constructor=S,a(i,y,S)}},1539:function(e,t,n){var r=n(1694),i=n(1320),o=n(288);r||i(Object.prototype,"toString",o,{unsafe:!0})},2479:function(e,t,n){var r=n(2109),i=n(4699).values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},1058:function(e,t,n){var r=n(2109),i=n(3009);r({global:!0,forced:parseInt!=i},{parseInt:i})},7727:function(e,t,n){"use strict";var r=n(2109),i=n(1913),o=n(3366),a=n(7293),s=n(5005),u=n(6707),c=n(9478),l=n(1320);r({target:"Promise",proto:!0,real:!0,forced:!!o&&a((function(){o.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=u(this,s("Promise")),n="function"==typeof e;return this.then(n?function(n){return c(t,e()).then((function(){return n}))}:e,n?function(n){return c(t,e()).then((function(){throw n}))}:e)}}),i||"function"!=typeof o||o.prototype.finally||l(o.prototype,"finally",s("Promise").prototype.finally)},8674:function(e,t,n){"use strict";var r,i,o,a,s=n(2109),u=n(1913),c=n(7854),l=n(5005),f=n(3366),h=n(1320),p=n(2248),d=n(8003),v=n(6340),g=n(111),y=n(3099),m=n(5787),_=n(2788),b=n(408),w=n(7072),x=n(6707),S=n(261).set,k=n(5948),T=n(9478),C=n(842),R=n(8523),L=n(2534),P=n(9909),O=n(4705),E=n(5112),A=n(5268),I=n(7392),D=E("species"),j="Promise",F=P.get,M=P.set,U=P.getterFor(j),N=f,V=c.TypeError,B=c.document,G=c.process,z=l("fetch"),q=R.f,H=q,W=!!(B&&B.createEvent&&c.dispatchEvent),J="function"==typeof PromiseRejectionEvent,K="unhandledrejection",Y=O(j,(function(){if(_(N)===String(N)){if(66===I)return!0;if(!A&&!J)return!0}if(u&&!N.prototype.finally)return!0;if(I>=51&&/native code/.test(N))return!1;var e=N.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[D]=t,!(e.then((function(){}))instanceof t)})),$=Y||!w((function(e){N.all(e).catch((function(){}))})),X=function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t},Z=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;k((function(){for(var r=e.value,i=1==e.state,o=0;n.length>o;){var a,s,u,c=n[o++],l=i?c.ok:c.fail,f=c.resolve,h=c.reject,p=c.domain;try{l?(i||(2===e.rejection&&ne(e),e.rejection=1),!0===l?a=r:(p&&p.enter(),a=l(r),p&&(p.exit(),u=!0)),a===c.promise?h(V("Promise-chain cycle")):(s=X(a))?s.call(a,f,h):f(a)):h(r)}catch(e){p&&!u&&p.exit(),h(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&ee(e)}))}},Q=function(e,t,n){var r,i;W?((r=B.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!J&&(i=c["on"+e])?i(r):e===K&&C("Unhandled promise rejection",n)},ee=function(e){S.call(c,(function(){var t,n=e.facade,r=e.value;if(te(e)&&(t=L((function(){A?G.emit("unhandledRejection",r,n):Q(K,n,r)})),e.rejection=A||te(e)?2:1,t.error))throw t.value}))},te=function(e){return 1!==e.rejection&&!e.parent},ne=function(e){S.call(c,(function(){var t=e.facade;A?G.emit("rejectionHandled",t):Q("rejectionhandled",t,e.value)}))},re=function(e,t,n){return function(r){e(t,r,n)}},ie=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,Z(e,!0))},oe=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw V("Promise can't be resolved itself");var r=X(t);r?k((function(){var n={done:!1};try{r.call(t,re(oe,n,e),re(ie,n,e))}catch(t){ie(n,t,e)}})):(e.value=t,e.state=1,Z(e,!1))}catch(t){ie({done:!1},t,e)}}};Y&&(N=function(e){m(this,N,j),y(e),r.call(this);var t=F(this);try{e(re(oe,t),re(ie,t))}catch(e){ie(t,e)}},(r=function(e){M(this,{type:j,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=p(N.prototype,{then:function(e,t){var n=U(this),r=q(x(this,N));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=A?G.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&Z(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=F(e);this.promise=e,this.resolve=re(oe,t),this.reject=re(ie,t)},R.f=q=function(e){return e===N||e===o?new i(e):H(e)},u||"function"!=typeof f||(a=f.prototype.then,h(f.prototype,"then",(function(e,t){var n=this;return new N((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof z&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return T(N,z.apply(c,arguments))}}))),s({global:!0,wrap:!0,forced:Y},{Promise:N}),d(N,j,!1,!0),v(j),o=l(j),s({target:j,stat:!0,forced:Y},{reject:function(e){var t=q(this);return t.reject.call(void 0,e),t.promise}}),s({target:j,stat:!0,forced:u||Y},{resolve:function(e){return T(u&&this===o?N:this,e)}}),s({target:j,stat:!0,forced:$},{all:function(e){var t=this,n=q(t),r=n.resolve,i=n.reject,o=L((function(){var n=y(t.resolve),o=[],a=0,s=1;b(e,(function(e){var u=a++,c=!1;o.push(void 0),s++,n.call(t,e).then((function(e){c||(c=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=q(t),r=n.reject,i=L((function(){var i=y(t.resolve);b(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},4916:function(e,t,n){"use strict";var r=n(2109),i=n(2261);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},9714:function(e,t,n){"use strict";var r=n(1320),i=n(9670),o=n(7293),a=n(7066),s="toString",u=RegExp.prototype,c=u.toString,l=o((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),f=c.name!=s;(l||f)&&r(RegExp.prototype,s,(function(){var e=i(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in u)?a.call(e):n)}),{unsafe:!0})},7852:function(e,t,n){"use strict";var r,i=n(2109),o=n(1236).f,a=n(7466),s=n(3929),u=n(4488),c=n(4964),l=n(1913),f="".endsWith,h=Math.min,p=c("endsWith");i({target:"String",proto:!0,forced:!(!l&&!p&&(r=o(String.prototype,"endsWith"),r&&!r.writable)||p)},{endsWith:function(e){var t=String(u(this));s(e);var n=arguments.length>1?arguments[1]:void 0,r=a(t.length),i=void 0===n?r:h(a(n),r),o=String(e);return f?f.call(t,o,i):t.slice(i-o.length,i)===o}})},2023:function(e,t,n){"use strict";var r=n(2109),i=n(3929),o=n(4488);r({target:"String",proto:!0,forced:!n(4964)("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),arguments.length>1?arguments[1]:void 0)}})},8783:function(e,t,n){"use strict";var r=n(8710).charAt,i=n(9909),o=n(654),a="String Iterator",s=i.set,u=i.getterFor(a);o(String,"String",(function(e){s(this,{type:a,string:String(e),index:0})}),(function(){var e,t=u(this),n=t.string,i=t.index;return i>=n.length?{value:void 0,done:!0}:(e=r(n,i),t.index+=e.length,{value:e,done:!1})}))},4723:function(e,t,n){"use strict";var r=n(7007),i=n(9670),o=n(7466),a=n(4488),s=n(1530),u=n(7651);r("match",1,(function(e,t,n){return[function(t){var n=a(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var a=i(e),c=String(this);if(!a.global)return u(a,c);var l=a.unicode;a.lastIndex=0;for(var f,h=[],p=0;null!==(f=u(a,c));){var d=String(f[0]);h[p]=d,""===d&&(a.lastIndex=s(c,o(a.lastIndex),l)),p++}return 0===p?null:h}]}))},3112:function(e,t,n){"use strict";var r=n(2109),i=n(6650).start;r({target:"String",proto:!0,forced:n(4986)},{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},2481:function(e,t,n){n(2109)({target:"String",proto:!0},{repeat:n(8415)})},4765:function(e,t,n){"use strict";var r=n(7007),i=n(9670),o=n(4488),a=n(1150),s=n(7651);r("search",1,(function(e,t,n){return[function(t){var n=o(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=i(e),u=String(this),c=o.lastIndex;a(c,0)||(o.lastIndex=0);var l=s(o,u);return a(o.lastIndex,c)||(o.lastIndex=c),null===l?-1:l.index}]}))},3123:function(e,t,n){"use strict";var r=n(7007),i=n(7850),o=n(9670),a=n(4488),s=n(6707),u=n(1530),c=n(7466),l=n(7651),f=n(2261),h=n(7293),p=[].push,d=Math.min,v=4294967295,g=!h((function(){return!RegExp(v,"y")}));r("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(a(this)),o=void 0===n?v:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!i(e))return t.call(r,e,o);for(var s,u,c,l=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),d=0,g=new RegExp(e.source,h+"g");(s=f.call(g,r))&&!((u=g.lastIndex)>d&&(l.push(r.slice(d,s.index)),s.length>1&&s.index<r.length&&p.apply(l,s.slice(1)),c=s[0].length,d=u,l.length>=o));)g.lastIndex===s.index&&g.lastIndex++;return d===r.length?!c&&g.test("")||l.push(""):l.push(r.slice(d)),l.length>o?l.slice(0,o):l}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var i=a(this),o=null==t?void 0:t[e];return void 0!==o?o.call(t,i,n):r.call(String(i),t,n)},function(e,i){var a=n(r,e,this,i,r!==t);if(a.done)return a.value;var f=o(e),h=String(this),p=s(f,RegExp),y=f.unicode,m=(f.ignoreCase?"i":"")+(f.multiline?"m":"")+(f.unicode?"u":"")+(g?"y":"g"),_=new p(g?f:"^(?:"+f.source+")",m),b=void 0===i?v:i>>>0;if(0===b)return[];if(0===h.length)return null===l(_,h)?[h]:[];for(var w=0,x=0,S=[];x<h.length;){_.lastIndex=g?x:0;var k,T=l(_,g?h:h.slice(x));if(null===T||(k=d(c(_.lastIndex+(g?0:x)),h.length))===w)x=u(h,x,y);else{if(S.push(h.slice(w,x)),S.length===b)return S;for(var C=1;C<=T.length-1;C++)if(S.push(T[C]),S.length===b)return S;x=w=k}}return S.push(h.slice(w)),S}]}),!g)},6755:function(e,t,n){"use strict";var r,i=n(2109),o=n(1236).f,a=n(7466),s=n(3929),u=n(4488),c=n(4964),l=n(1913),f="".startsWith,h=Math.min,p=c("startsWith");i({target:"String",proto:!0,forced:!(!l&&!p&&(r=o(String.prototype,"startsWith"),r&&!r.writable)||p)},{startsWith:function(e){var t=String(u(this));s(e);var n=a(h(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return f?f.call(t,r,n):t.slice(n,n+r.length)===r}})},4747:function(e,t,n){var r=n(7854),i=n(8324),o=n(8533),a=n(8880);for(var s in i){var u=r[s],c=u&&u.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(e){c.forEach=o}}},3948:function(e,t,n){var r=n(7854),i=n(8324),o=n(6992),a=n(8880),s=n(5112),u=s("iterator"),c=s("toStringTag"),l=o.values;for(var f in i){var h=r[f],p=h&&h.prototype;if(p){if(p[u]!==l)try{a(p,u,l)}catch(e){p[u]=l}if(p[c]||a(p,c,f),i[f])for(var d in o)if(p[d]!==o[d])try{a(p,d,o[d])}catch(e){p[d]=o[d]}}}},2564:function(e,t,n){var r=n(2109),i=n(7854),o=n(8113),a=[].slice,s=function(e){return function(t,n){var r=arguments.length>2,i=r?a.call(arguments,2):void 0;return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(o)},{setTimeout:s(i.setTimeout),setInterval:s(i.setInterval)})},1637:function(e,t,n){"use strict";n(6992);var r=n(2109),i=n(5005),o=n(590),a=n(1320),s=n(2248),u=n(8003),c=n(4994),l=n(9909),f=n(5787),h=n(6656),p=n(9974),d=n(648),v=n(9670),g=n(111),y=n(30),m=n(9114),_=n(8554),b=n(1246),w=n(5112),x=i("fetch"),S=i("Headers"),k=w("iterator"),T="URLSearchParams",C="URLSearchParamsIterator",R=l.set,L=l.getterFor(T),P=l.getterFor(C),O=/\+/g,E=Array(4),A=function(e){return E[e-1]||(E[e-1]=RegExp("((?:%[\\da-f]{2}){"+e+"})","gi"))},I=function(e){try{return decodeURIComponent(e)}catch(t){return e}},D=function(e){var t=e.replace(O," "),n=4;try{return decodeURIComponent(t)}catch(e){for(;n;)t=t.replace(A(n--),I);return t}},j=/[!'()~]|%20/g,F={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},M=function(e){return F[e]},U=function(e){return encodeURIComponent(e).replace(j,M)},N=function(e,t){if(t)for(var n,r,i=t.split("&"),o=0;o<i.length;)(n=i[o++]).length&&(r=n.split("="),e.push({key:D(r.shift()),value:D(r.join("="))}))},V=function(e){this.entries.length=0,N(this.entries,e)},B=function(e,t){if(e<t)throw TypeError("Not enough arguments")},G=c((function(e,t){R(this,{type:C,iterator:_(L(e).entries),kind:t})}),"Iterator",(function(){var e=P(this),t=e.kind,n=e.iterator.next(),r=n.value;return n.done||(n.value="keys"===t?r.key:"values"===t?r.value:[r.key,r.value]),n})),z=function(){f(this,z,T);var e,t,n,r,i,o,a,s,u,c=arguments.length>0?arguments[0]:void 0,l=this,p=[];if(R(l,{type:T,entries:p,updateURL:function(){},updateSearchParams:V}),void 0!==c)if(g(c))if("function"==typeof(e=b(c)))for(n=(t=e.call(c)).next;!(r=n.call(t)).done;){if((a=(o=(i=_(v(r.value))).next).call(i)).done||(s=o.call(i)).done||!o.call(i).done)throw TypeError("Expected sequence with length 2");p.push({key:a.value+"",value:s.value+""})}else for(u in c)h(c,u)&&p.push({key:u,value:c[u]+""});else N(p,"string"==typeof c?"?"===c.charAt(0)?c.slice(1):c:c+"")},q=z.prototype;s(q,{append:function(e,t){B(arguments.length,2);var n=L(this);n.entries.push({key:e+"",value:t+""}),n.updateURL()},delete:function(e){B(arguments.length,1);for(var t=L(this),n=t.entries,r=e+"",i=0;i<n.length;)n[i].key===r?n.splice(i,1):i++;t.updateURL()},get:function(e){B(arguments.length,1);for(var t=L(this).entries,n=e+"",r=0;r<t.length;r++)if(t[r].key===n)return t[r].value;return null},getAll:function(e){B(arguments.length,1);for(var t=L(this).entries,n=e+"",r=[],i=0;i<t.length;i++)t[i].key===n&&r.push(t[i].value);return r},has:function(e){B(arguments.length,1);for(var t=L(this).entries,n=e+"",r=0;r<t.length;)if(t[r++].key===n)return!0;return!1},set:function(e,t){B(arguments.length,1);for(var n,r=L(this),i=r.entries,o=!1,a=e+"",s=t+"",u=0;u<i.length;u++)(n=i[u]).key===a&&(o?i.splice(u--,1):(o=!0,n.value=s));o||i.push({key:a,value:s}),r.updateURL()},sort:function(){var e,t,n,r=L(this),i=r.entries,o=i.slice();for(i.length=0,n=0;n<o.length;n++){for(e=o[n],t=0;t<n;t++)if(i[t].key>e.key){i.splice(t,0,e);break}t===n&&i.push(e)}r.updateURL()},forEach:function(e){for(var t,n=L(this).entries,r=p(e,arguments.length>1?arguments[1]:void 0,3),i=0;i<n.length;)r((t=n[i++]).value,t.key,this)},keys:function(){return new G(this,"keys")},values:function(){return new G(this,"values")},entries:function(){return new G(this,"entries")}},{enumerable:!0}),a(q,k,q.entries),a(q,"toString",(function(){for(var e,t=L(this).entries,n=[],r=0;r<t.length;)e=t[r++],n.push(U(e.key)+"="+U(e.value));return n.join("&")}),{enumerable:!0}),u(z,T),r({global:!0,forced:!o},{URLSearchParams:z}),o||"function"!=typeof x||"function"!=typeof S||r({global:!0,enumerable:!0,forced:!0},{fetch:function(e){var t,n,r,i=[e];return arguments.length>1&&(g(t=arguments[1])&&(n=t.body,d(n)===T&&((r=t.headers?new S(t.headers):new S).has("content-type")||r.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),t=y(t,{body:m(0,String(n)),headers:m(0,r)}))),i.push(t)),x.apply(this,i)}}),e.exports={URLSearchParams:z,getState:L}},285:function(e,t,n){"use strict";n(8783);var r,i=n(2109),o=n(9781),a=n(590),s=n(7854),u=n(6048),c=n(1320),l=n(5787),f=n(6656),h=n(1574),p=n(8457),d=n(8710).codeAt,v=n(3197),g=n(8003),y=n(1637),m=n(9909),_=s.URL,b=y.URLSearchParams,w=y.getState,x=m.set,S=m.getterFor("URL"),k=Math.floor,T=Math.pow,C="Invalid scheme",R="Invalid host",L="Invalid port",P=/[A-Za-z]/,O=/[\d+-.A-Za-z]/,E=/\d/,A=/^(0x|0X)/,I=/^[0-7]+$/,D=/^\d+$/,j=/^[\dA-Fa-f]+$/,F=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/,M=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/,U=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g,N=/[\u0009\u000A\u000D]/g,V=function(e,t){var n,r,i;if("["==t.charAt(0)){if("]"!=t.charAt(t.length-1))return R;if(!(n=G(t.slice(1,-1))))return R;e.host=n}else if($(e)){if(t=v(t),F.test(t))return R;if(null===(n=B(t)))return R;e.host=n}else{if(M.test(t))return R;for(n="",r=p(t),i=0;i<r.length;i++)n+=K(r[i],q);e.host=n}},B=function(e){var t,n,r,i,o,a,s,u=e.split(".");if(u.length&&""==u[u.length-1]&&u.pop(),(t=u.length)>4)return e;for(n=[],r=0;r<t;r++){if(""==(i=u[r]))return e;if(o=10,i.length>1&&"0"==i.charAt(0)&&(o=A.test(i)?16:8,i=i.slice(8==o?1:2)),""===i)a=0;else{if(!(10==o?D:8==o?I:j).test(i))return e;a=parseInt(i,o)}n.push(a)}for(r=0;r<t;r++)if(a=n[r],r==t-1){if(a>=T(256,5-t))return null}else if(a>255)return null;for(s=n.pop(),r=0;r<n.length;r++)s+=n[r]*T(256,3-r);return s},G=function(e){var t,n,r,i,o,a,s,u=[0,0,0,0,0,0,0,0],c=0,l=null,f=0,h=function(){return e.charAt(f)};if(":"==h()){if(":"!=e.charAt(1))return;f+=2,l=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=n=0;n<4&&j.test(h());)t=16*t+parseInt(h(),16),f++,n++;if("."==h()){if(0==n)return;if(f-=n,c>6)return;for(r=0;h();){if(i=null,r>0){if(!("."==h()&&r<4))return;f++}if(!E.test(h()))return;for(;E.test(h());){if(o=parseInt(h(),10),null===i)i=o;else{if(0==i)return;i=10*i+o}if(i>255)return;f++}u[c]=256*u[c]+i,2!=++r&&4!=r||c++}if(4!=r)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;u[c++]=t}else{if(null!==l)return;f++,l=++c}}if(null!==l)for(a=c-l,c=7;0!=c&&a>0;)s=u[c],u[c--]=u[l+a-1],u[l+--a]=s;else if(8!=c)return;return u},z=function(e){var t,n,r,i;if("number"==typeof e){for(t=[],n=0;n<4;n++)t.unshift(e%256),e=k(e/256);return t.join(".")}if("object"==typeof e){for(t="",r=function(e){for(var t=null,n=1,r=null,i=0,o=0;o<8;o++)0!==e[o]?(i>n&&(t=r,n=i),r=null,i=0):(null===r&&(r=o),++i);return i>n&&(t=r,n=i),t}(e),n=0;n<8;n++)i&&0===e[n]||(i&&(i=!1),r===n?(t+=n?":":"::",i=!0):(t+=e[n].toString(16),n<7&&(t+=":")));return"["+t+"]"}return e},q={},H=h({},q,{" ":1,'"':1,"<":1,">":1,"`":1}),W=h({},H,{"#":1,"?":1,"{":1,"}":1}),J=h({},W,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),K=function(e,t){var n=d(e,0);return n>32&&n<127&&!f(t,e)?e:encodeURIComponent(e)},Y={ftp:21,file:null,http:80,https:443,ws:80,wss:443},$=function(e){return f(Y,e.scheme)},X=function(e){return""!=e.username||""!=e.password},Z=function(e){return!e.host||e.cannotBeABaseURL||"file"==e.scheme},Q=function(e,t){var n;return 2==e.length&&P.test(e.charAt(0))&&(":"==(n=e.charAt(1))||!t&&"|"==n)},ee=function(e){var t;return e.length>1&&Q(e.slice(0,2))&&(2==e.length||"/"===(t=e.charAt(2))||"\\"===t||"?"===t||"#"===t)},te=function(e){var t=e.path,n=t.length;!n||"file"==e.scheme&&1==n&&Q(t[0],!0)||t.pop()},ne=function(e){return"."===e||"%2e"===e.toLowerCase()},re={},ie={},oe={},ae={},se={},ue={},ce={},le={},fe={},he={},pe={},de={},ve={},ge={},ye={},me={},_e={},be={},we={},xe={},Se={},ke=function(e,t,n,i){var o,a,s,u,c,l=n||re,h=0,d="",v=!1,g=!1,y=!1;for(n||(e.scheme="",e.username="",e.password="",e.host=null,e.port=null,e.path=[],e.query=null,e.fragment=null,e.cannotBeABaseURL=!1,t=t.replace(U,"")),t=t.replace(N,""),o=p(t);h<=o.length;){switch(a=o[h],l){case re:if(!a||!P.test(a)){if(n)return C;l=oe;continue}d+=a.toLowerCase(),l=ie;break;case ie:if(a&&(O.test(a)||"+"==a||"-"==a||"."==a))d+=a.toLowerCase();else{if(":"!=a){if(n)return C;d="",l=oe,h=0;continue}if(n&&($(e)!=f(Y,d)||"file"==d&&(X(e)||null!==e.port)||"file"==e.scheme&&!e.host))return;if(e.scheme=d,n)return void($(e)&&Y[e.scheme]==e.port&&(e.port=null));d="","file"==e.scheme?l=ge:$(e)&&i&&i.scheme==e.scheme?l=ae:$(e)?l=le:"/"==o[h+1]?(l=se,h++):(e.cannotBeABaseURL=!0,e.path.push(""),l=we)}break;case oe:if(!i||i.cannotBeABaseURL&&"#"!=a)return C;if(i.cannotBeABaseURL&&"#"==a){e.scheme=i.scheme,e.path=i.path.slice(),e.query=i.query,e.fragment="",e.cannotBeABaseURL=!0,l=Se;break}l="file"==i.scheme?ge:ue;continue;case ae:if("/"!=a||"/"!=o[h+1]){l=ue;continue}l=fe,h++;break;case se:if("/"==a){l=he;break}l=be;continue;case ue:if(e.scheme=i.scheme,a==r)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query;else if("/"==a||"\\"==a&&$(e))l=ce;else if("?"==a)e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query="",l=xe;else{if("#"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.path.pop(),l=be;continue}e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,e.path=i.path.slice(),e.query=i.query,e.fragment="",l=Se}break;case ce:if(!$(e)||"/"!=a&&"\\"!=a){if("/"!=a){e.username=i.username,e.password=i.password,e.host=i.host,e.port=i.port,l=be;continue}l=he}else l=fe;break;case le:if(l=fe,"/"!=a||"/"!=d.charAt(h+1))continue;h++;break;case fe:if("/"!=a&&"\\"!=a){l=he;continue}break;case he:if("@"==a){v&&(d="%40"+d),v=!0,s=p(d);for(var m=0;m<s.length;m++){var _=s[m];if(":"!=_||y){var b=K(_,J);y?e.password+=b:e.username+=b}else y=!0}d=""}else if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&$(e)){if(v&&""==d)return"Invalid authority";h-=p(d).length+1,d="",l=pe}else d+=a;break;case pe:case de:if(n&&"file"==e.scheme){l=me;continue}if(":"!=a||g){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&$(e)){if($(e)&&""==d)return R;if(n&&""==d&&(X(e)||null!==e.port))return;if(u=V(e,d))return u;if(d="",l=_e,n)return;continue}"["==a?g=!0:"]"==a&&(g=!1),d+=a}else{if(""==d)return R;if(u=V(e,d))return u;if(d="",l=ve,n==de)return}break;case ve:if(!E.test(a)){if(a==r||"/"==a||"?"==a||"#"==a||"\\"==a&&$(e)||n){if(""!=d){var w=parseInt(d,10);if(w>65535)return L;e.port=$(e)&&w===Y[e.scheme]?null:w,d=""}if(n)return;l=_e;continue}return L}d+=a;break;case ge:if(e.scheme="file","/"==a||"\\"==a)l=ye;else{if(!i||"file"!=i.scheme){l=be;continue}if(a==r)e.host=i.host,e.path=i.path.slice(),e.query=i.query;else if("?"==a)e.host=i.host,e.path=i.path.slice(),e.query="",l=xe;else{if("#"!=a){ee(o.slice(h).join(""))||(e.host=i.host,e.path=i.path.slice(),te(e)),l=be;continue}e.host=i.host,e.path=i.path.slice(),e.query=i.query,e.fragment="",l=Se}}break;case ye:if("/"==a||"\\"==a){l=me;break}i&&"file"==i.scheme&&!ee(o.slice(h).join(""))&&(Q(i.path[0],!0)?e.path.push(i.path[0]):e.host=i.host),l=be;continue;case me:if(a==r||"/"==a||"\\"==a||"?"==a||"#"==a){if(!n&&Q(d))l=be;else if(""==d){if(e.host="",n)return;l=_e}else{if(u=V(e,d))return u;if("localhost"==e.host&&(e.host=""),n)return;d="",l=_e}continue}d+=a;break;case _e:if($(e)){if(l=be,"/"!=a&&"\\"!=a)continue}else if(n||"?"!=a)if(n||"#"!=a){if(a!=r&&(l=be,"/"!=a))continue}else e.fragment="",l=Se;else e.query="",l=xe;break;case be:if(a==r||"/"==a||"\\"==a&&$(e)||!n&&("?"==a||"#"==a)){if(".."===(c=(c=d).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(te(e),"/"==a||"\\"==a&&$(e)||e.path.push("")):ne(d)?"/"==a||"\\"==a&&$(e)||e.path.push(""):("file"==e.scheme&&!e.path.length&&Q(d)&&(e.host&&(e.host=""),d=d.charAt(0)+":"),e.path.push(d)),d="","file"==e.scheme&&(a==r||"?"==a||"#"==a))for(;e.path.length>1&&""===e.path[0];)e.path.shift();"?"==a?(e.query="",l=xe):"#"==a&&(e.fragment="",l=Se)}else d+=K(a,W);break;case we:"?"==a?(e.query="",l=xe):"#"==a?(e.fragment="",l=Se):a!=r&&(e.path[0]+=K(a,q));break;case xe:n||"#"!=a?a!=r&&("'"==a&&$(e)?e.query+="%27":e.query+="#"==a?"%23":K(a,q)):(e.fragment="",l=Se);break;case Se:a!=r&&(e.fragment+=K(a,H))}h++}},Te=function(e){var t,n,r=l(this,Te,"URL"),i=arguments.length>1?arguments[1]:void 0,a=String(e),s=x(r,{type:"URL"});if(void 0!==i)if(i instanceof Te)t=S(i);else if(n=ke(t={},String(i)))throw TypeError(n);if(n=ke(s,a,null,t))throw TypeError(n);var u=s.searchParams=new b,c=w(u);c.updateSearchParams(s.query),c.updateURL=function(){s.query=String(u)||null},o||(r.href=Re.call(r),r.origin=Le.call(r),r.protocol=Pe.call(r),r.username=Oe.call(r),r.password=Ee.call(r),r.host=Ae.call(r),r.hostname=Ie.call(r),r.port=De.call(r),r.pathname=je.call(r),r.search=Fe.call(r),r.searchParams=Me.call(r),r.hash=Ue.call(r))},Ce=Te.prototype,Re=function(){var e=S(this),t=e.scheme,n=e.username,r=e.password,i=e.host,o=e.port,a=e.path,s=e.query,u=e.fragment,c=t+":";return null!==i?(c+="//",X(e)&&(c+=n+(r?":"+r:"")+"@"),c+=z(i),null!==o&&(c+=":"+o)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==s&&(c+="?"+s),null!==u&&(c+="#"+u),c},Le=function(){var e=S(this),t=e.scheme,n=e.port;if("blob"==t)try{return new URL(t.path[0]).origin}catch(e){return"null"}return"file"!=t&&$(e)?t+"://"+z(e.host)+(null!==n?":"+n:""):"null"},Pe=function(){return S(this).scheme+":"},Oe=function(){return S(this).username},Ee=function(){return S(this).password},Ae=function(){var e=S(this),t=e.host,n=e.port;return null===t?"":null===n?z(t):z(t)+":"+n},Ie=function(){var e=S(this).host;return null===e?"":z(e)},De=function(){var e=S(this).port;return null===e?"":String(e)},je=function(){var e=S(this),t=e.path;return e.cannotBeABaseURL?t[0]:t.length?"/"+t.join("/"):""},Fe=function(){var e=S(this).query;return e?"?"+e:""},Me=function(){return S(this).searchParams},Ue=function(){var e=S(this).fragment;return e?"#"+e:""},Ne=function(e,t){return{get:e,set:t,configurable:!0,enumerable:!0}};if(o&&u(Ce,{href:Ne(Re,(function(e){var t=S(this),n=String(e),r=ke(t,n);if(r)throw TypeError(r);w(t.searchParams).updateSearchParams(t.query)})),origin:Ne(Le),protocol:Ne(Pe,(function(e){var t=S(this);ke(t,String(e)+":",re)})),username:Ne(Oe,(function(e){var t=S(this),n=p(String(e));if(!Z(t)){t.username="";for(var r=0;r<n.length;r++)t.username+=K(n[r],J)}})),password:Ne(Ee,(function(e){var t=S(this),n=p(String(e));if(!Z(t)){t.password="";for(var r=0;r<n.length;r++)t.password+=K(n[r],J)}})),host:Ne(Ae,(function(e){var t=S(this);t.cannotBeABaseURL||ke(t,String(e),pe)})),hostname:Ne(Ie,(function(e){var t=S(this);t.cannotBeABaseURL||ke(t,String(e),de)})),port:Ne(De,(function(e){var t=S(this);Z(t)||(""==(e=String(e))?t.port=null:ke(t,e,ve))})),pathname:Ne(je,(function(e){var t=S(this);t.cannotBeABaseURL||(t.path=[],ke(t,e+"",_e))})),search:Ne(Fe,(function(e){var t=S(this);""==(e=String(e))?t.query=null:("?"==e.charAt(0)&&(e=e.slice(1)),t.query="",ke(t,e,xe)),w(t.searchParams).updateSearchParams(t.query)})),searchParams:Ne(Me),hash:Ne(Ue,(function(e){var t=S(this);""!=(e=String(e))?("#"==e.charAt(0)&&(e=e.slice(1)),t.fragment="",ke(t,e,Se)):t.fragment=null}))}),c(Ce,"toJSON",(function(){return Re.call(this)}),{enumerable:!0}),c(Ce,"toString",(function(){return Re.call(this)}),{enumerable:!0}),_){var Ve=_.createObjectURL,Be=_.revokeObjectURL;Ve&&c(Te,"createObjectURL",(function(e){return Ve.apply(_,arguments)})),Be&&c(Te,"revokeObjectURL",(function(e){return Be.apply(_,arguments)}))}g(Te,"URL"),i({global:!0,forced:!a,sham:!o},{URL:Te})},5666:function(e,t,n){var r=n(202).default,i=function(e){"use strict";var t,n=Object.prototype,i=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(e,t,n,r){var i=t&&t.prototype instanceof g?t:g,o=Object.create(i.prototype),a=new L(r||[]);return o._invoke=function(e,t,n){var r=f;return function(i,o){if(r===p)throw new Error("Generator is already running");if(r===d){if("throw"===i)throw o;return O()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===v)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var u=l(e,t,n);if("normal"===u.type){if(r=n.done?d:h,u.arg===v)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=d,n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=c;var f="suspendedStart",h="suspendedYield",p="executing",d="completed",v={};function g(){}function y(){}function m(){}var _={};_[a]=function(){return this};var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==n&&i.call(w,a)&&(_=w);var x=m.prototype=g.prototype=Object.create(_);function S(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function k(e,t){function n(r,o,a,s){var u=l(e[r],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var r;this._invoke=function(e,i){function o(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(o,o):o()}}function T(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method))return v;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=l(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,v;var o=i.arg;return o?o.done?(n[e.resultName]=o.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function R(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function P(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}return{next:O}}function O(){return{value:t,done:!0}}return y.prototype=x.constructor=m,m.constructor=y,m[u]=y.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===y||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u in e||(e[u]="GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},S(k.prototype),k.prototype[s]=function(){return this},e.AsyncIterator=k,e.async=function(t,n,i,o,a){void 0===a&&(a=r);var s=new k(c(t,n,i,o),a);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},S(x),x[u]="Generator",x[a]=function(){return this},x.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,L.prototype={constructor:L,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(R),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function r(r,i){return s.type="throw",s.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),R(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=i}catch(e){Function("r","regeneratorRuntime = r")(i)}}},t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(2874)}()}));
|
|
3
3
|
//# sourceMappingURL=publish.js.map
|