@twilio/mcs-client 1.0.0-rc.6 → 1.0.0

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.
Files changed (36) hide show
  1. package/builds/browser.js +1344 -523
  2. package/builds/browser.js.map +1 -1
  3. package/builds/lib.d.ts +56 -5
  4. package/builds/lib.js +1319 -523
  5. package/builds/lib.js.map +1 -1
  6. package/builds/twilio-mcs-client.js +10387 -1828
  7. package/builds/twilio-mcs-client.min.js +1 -44
  8. package/dist/_virtual/rng-browser.js +34 -0
  9. package/dist/_virtual/rng-browser.js.map +1 -0
  10. package/dist/cancellable-promise.js +98 -0
  11. package/dist/cancellable-promise.js.map +1 -0
  12. package/dist/client.js +7 -7
  13. package/dist/client.js.map +1 -1
  14. package/dist/index.js +2 -5
  15. package/dist/index.js.map +1 -1
  16. package/dist/logger.js +6 -2
  17. package/dist/logger.js.map +1 -1
  18. package/dist/media.js +16 -2
  19. package/dist/media.js.map +1 -1
  20. package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
  21. package/dist/node_modules/uuid/index.js +44 -0
  22. package/dist/node_modules/uuid/index.js.map +1 -0
  23. package/dist/node_modules/uuid/lib/bytesToUuid.js +60 -0
  24. package/dist/node_modules/uuid/lib/bytesToUuid.js.map +1 -0
  25. package/dist/node_modules/uuid/lib/rng-browser.js +65 -0
  26. package/dist/node_modules/uuid/lib/rng-browser.js.map +1 -0
  27. package/dist/node_modules/uuid/v1.js +146 -0
  28. package/dist/node_modules/uuid/v1.js.map +1 -0
  29. package/dist/node_modules/uuid/v4.js +66 -0
  30. package/dist/node_modules/uuid/v4.js.map +1 -0
  31. package/dist/packages/mcs-client/package.json.js +1 -1
  32. package/dist/services/network.js +4 -4
  33. package/dist/services/network.js.map +1 -1
  34. package/dist/services/transport.js +3 -4
  35. package/dist/services/transport.js.map +1 -1
  36. package/package.json +12 -14
@@ -15,47 +15,4 @@ OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
15
15
  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
16
 
17
17
  */
18
- this.Twilio=this.Twilio||{},this.Twilio.McsClient=function(e){"use strict";var t=void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function n(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var o,i,s,a={},l={exports:{}};i=r,s=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function o(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function s(t,r){for(var o=0;o<n.length;o++){var i=n[o];this[i]=o<t?e:this.methodFactory(i,t,r)}this.log=this.debug}function a(e,r,n){return function(){typeof console!==t&&(s.call(this,r,n),this[e].apply(this,arguments))}}function l(n,s,l){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?i:void 0!==console[n]?o(console,n):void 0!==console.log?o(console,"log"):e)}(n)||a.apply(this,arguments)}function c(e,r,o){var i,a=this;r=null==r?"WARN":r;var c="loglevel";function u(){var e;if(typeof window!==t&&c){try{e=window.localStorage[c]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(e=/^([^;]+)/.exec(r.slice(n))[1])}catch(e){}return void 0===a.levels[e]&&(e=void 0),e}}"string"==typeof e?c+=":"+e:"symbol"==typeof e&&(c=void 0),a.name=e,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=o||l,a.getLevel=function(){return i},a.setLevel=function(r,o){if("string"==typeof r&&void 0!==a.levels[r.toUpperCase()]&&(r=a.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(i=r,!1!==o&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&c){try{return void(window.localStorage[c]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(e){}}}(r),s.call(a,r,e),typeof console===t&&r<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(e){r=e,u()||a.setLevel(e,!1)},a.resetLevel=function(){a.setLevel(r,!1),function(){if(typeof window!==t&&c){try{return void window.localStorage.removeItem(c)}catch(e){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}()},a.enableAll=function(e){a.setLevel(a.levels.TRACE,e)},a.disableAll=function(e){a.setLevel(a.levels.SILENT,e)};var h=u();null==h&&(h=r),a.setLevel(h,!1)}var u=new c,h={};u.getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=h[e];return t||(t=h[e]=new c(e,u.getLevel(),u.methodFactory)),t};var f=typeof window!==t?window.log:void 0;return u.noConflict=function(){return typeof window!==t&&window.log===u&&(window.log=f),u},u.getLoggers=function(){return h},u.default=u,u},(o=l).exports?o.exports=s():i.log=s();let c=e=>crypto.getRandomValues(new Uint8Array(e)),u=(e,t,r)=>{let n=(2<<Math.log(e.length-1)/Math.LN2)-1,o=-~(1.6*n*t/e.length);return function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,s="";for(;;){let t=r(o),a=o;for(;a--;)if(s+=e[t[a]&n]||"",s.length===i)return s}}};var h=Object.freeze({__proto__:null,nanoid:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")},customAlphabet:function(e){return u(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,c)},customRandom:u,urlAlphabet:"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",random:c}),f=n(h);
19
- /*
20
- @license
21
- Copyright (c) 2022 Twilio Inc.
22
-
23
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
24
-
25
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
26
-
27
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
-
29
-
30
- */
31
- Object.defineProperty(a,"__esModule",{value:!0});var p=l.exports,d=f;function y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=y(p);const g=e=>{const t=m.default.getLevel();m.default.setLevel("warn"),m.default.warn(e),m.default.setLevel(t)};class v extends Error{constructor(){super("Promise was cancelled")}}class w extends Promise{static#e=new Map;#t;#r;constructor(e){const t=d.nanoid();let r;super(((n,o)=>(r=o,e((e=>{w.#e.delete(t),n(e)}),(e=>{w.#e.delete(t),o(e)}),(e=>{w.#e.set(t,e)}))))),this.#t=t,this.#r=r}cancel(){const e=w.#e.get(this.#t);return e?.(),this.#r&&(this.catch((()=>{})),this.#r(new v)),this}static withAsyncExecutor(e){return new w((async(t,r,n)=>{try{t(await e(n))}catch(e){r(e)}}))}}const b={unknown:"Unknown error",cancelled:"Job was cancelled",timeout:"Timeout occurred",mediaUploadError:"Media upload error",mediaFetchError:"Media fetch error",tooManyAttachments:"Too many attachments",unsupportedEmailBodyContentType:"Unsupported email body content type",unsupportedEmailHistoryContentType:"Unsupported email history content type",transportDisconnected:"Transport has been disconnected",networkBecameUnreachable:"Network became unreachable",unauthorized:"Unauthorized",tokenExpired:"Token expired",tokenUpdatedLocally:"Transport disconnected, token updated locally and will be used at reconnect",tooManyRequests:"Request failed with 429 reply",hostnameUnverified:"Failed on ssl handshake: CERTIFICATE_VERIFY_FAILED",sslHandshakeError:"Failed on ssl handshake: UNAUTHORIZED",closeMessageReceived:"Twilsock received a close message from the server",cannotParse:"Error while parsing an incoming message"};class x extends Error{errorInfo;constructor(e){super(`${e}`),this.errorInfo=e,Object.freeze(e)}}var D=a.CancellablePromise=w;function T(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function k(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function A(e,t){return[`${(new Date).toISOString()} MCS Client ${e}:`].concat(Array.from(t))}a.CancellationError=v,a.Deferred=class{promise;#n;#o;#i=!1;constructor(){this.promise=new Promise(((e,t)=>{this.#n=t=>{this.#i=!0,e(t)},this.#o=e=>{this.#i=!0,t(e)}}))}get resolve(){return this.#n}get reject(){return this.#o}get isDone(){return this.#i}},a.ErrorInfo=class{reason;message;status;code;description;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:b[e];this.reason=e,this.message=t,this.status=r,this.code=n,this.description=o}toString(){return`${this.description} ${this.status}:${this.code} ${this.message}`}},a.Logger=class{#s;#a;constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.#s=t,this.#a=p.getLogger(e)}setLevel(e){this.#a.setLevel(e)}trace(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.#a.trace.apply(null,this.#l("T",t))}debug(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.#a.debug.apply(null,this.#l("D",t))}info(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.#a.info.apply(null,this.#l("I",t))}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.#a.warn.apply(null,this.#l("W",t))}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.#a.error.apply(null,this.#l("E",t))}#l(e,t){return[`${(new Date).toISOString()} ${this.#s} ${e}:`,...t]}},a.TwilioError=x,a.deprecated=(e,t,r)=>(n,o,i)=>{if("function"!=typeof i.value&&void 0===i?.get)throw new Error("The deprecated decorator can only be applied to methods or getters");if("function"==typeof i.value){const n=i.value;return void(i.value=function(){g(`The method ${e} is deprecated${t?", use "+t+" instead":""}${r?", "+r:"."}`);for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return n.apply(this,i)})}const s=i.get;i.get=function(){return g(`The getter ${e} is deprecated${t?", use "+t+" instead":""}${r?", "+r:"."}`),s?.apply(this)}},a.deprecationWarning=g;class L{prefix="";constructor(e){this.prefix=null!=e&&e.length>0?e+" ":""}static scope(e){return new L(e)}setLevel(e){l.exports.setLevel(e)}static setLevel(e){l.exports.setLevel(e)}trace(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l.exports.trace.apply(null,A(this.prefix+"T",t))}debug(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l.exports.debug.apply(null,A(this.prefix+"D",t))}info(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l.exports.info.apply(null,A(this.prefix+"I",t))}warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l.exports.warn.apply(null,A(this.prefix+"W",t))}error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l.exports.error.apply(null,A(this.prefix+"E",t))}static trace(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l.exports.trace.apply(null,A("T",t))}static debug(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l.exports.debug.apply(null,A("D",t))}static info(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l.exports.info.apply(null,A("I",t))}static warn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l.exports.warn.apply(null,A("W",t))}static error(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];l.exports.error.apply(null,A("E",t))}}const _=(e,t)=>{return`${r=e,r.startsWith("http")?"":(e=>`https://mcs.${e??"us1"}.twilio.com`)(t)}${e}`;var r};class E{token;retryWhenThrottledOverride;backoffConfigOverride;mediaUrl;mediaSetUrl;region;constructor(e,t,r,n){const o=n.MCS??n??{};this.region=o.region??n.region??"us1",this.mediaUrl=_(t,this.region),this.mediaSetUrl=r?_(r):`${this.mediaUrl}Set`,this.token=e,this.retryWhenThrottledOverride=o.retryWhenThrottledOverride??true,this.backoffConfigOverride=o.backoffConfigOverride??E.backoffConfigDefault}static get backoffConfigDefault(){return{min:1e3,max:4e3,maxAttemptsCount:3}}static get retryWhenThrottledDefault(){return true}updateToken(e){this.token=e}}class C{state;network;config;constructor(e,t,r){this.config=e,this.network=t,this._update(r)}get sid(){return this.state.sid}get serviceSid(){return this.state.serviceSid}get dateCreated(){return this.state.dateCreated}get dateUpdated(){return this.state.dateUpdated}get contentType(){return this.state.contentType}get size(){return this.state.size}get fileName(){return this.state.filename}get filename(){return this.state.filename}get category(){return this.state.category}getContentUrl(){return new D((async(e,t,r)=>{const n=this.network.get(`${this.config.mediaUrl}/${this.sid}`);r((()=>n.cancel()));try{const t=await n;this._update(t.body),e(this.state.contentDirectUrl)}catch(e){t(e)}}))}_update(e){this.state={sid:e.sid,serviceSid:e.service_sid,channelSid:e.channel_sid,messageSid:e.message_sid,dateCreated:e.date_created?new Date(e.date_created):null,dateUploadUpdated:e.date_upload_updated?new Date(e.date_upload_updated):null,dateUpdated:e.date_updated?new Date(e.date_updated):null,size:e.size,contentType:e.content_type,author:e.author,url:e.url,contentUrl:e.links.content,contentDirectUrl:e.links.content_direct_temporary??null,filename:e.filename??null,category:e.category??"media",isMultipartUpstream:e.is_multipart_upstream??!1}}}class $ extends Error{code;body;status;headers;constructor(e,t,r,n,o){super(e),this.code=t,this.body=r,this.status=n,this.headers=o}}const j=t.XMLHttpRequest||{};class O{static request(e,t,r,n){return new D(((o,i,s)=>{const a=new j;let l=!1;s((()=>{a.abort(),l=!0})),a.open(e,t,!0),a.onreadystatechange=function(){if(4!==a.readyState||l)return;const e=(t=a.getAllResponseHeaders())?t.split("\r\n").map((e=>e.split(": "))).filter((e=>2===e.length&&e[1].length>0)).reduce(((e,t)=>(e[t[0]]=t[1],e)),{}):{};var t;const r=function(e){const t=e.getResponseHeader("Content-Type");if(!t||0!==t.indexOf("application/json")||0===e.responseText.length)return e.responseText;try{return JSON.parse(e.responseText)}catch(t){return e.responseText}}(a);if(200<=a.status&&a.status<300)o({status:a.status,headers:e,body:r});else{const t=a.statusText??"NONE";let n;if("string"==typeof r)if(r&&1===r.split("\n",2).length)n=r;else{const e=r.replace(/<.*?>/g,"").split(/\r\n/g).filter((e=>e.length))[0]?.split(" ");n=e?.length>2?e?.slice(1).join(" "):""}else n=JSON.stringify(r);const o=`${a.status}: [${t}] ${n}`;i(new $(o,a.status,r,t,e))}};for(const e in r)a.setRequestHeader(e,r[e]),"Content-Type"===e&&"application/json"===r[e]&&(n=JSON.stringify(n));a.send(n)}))}get(e,t){return O.request("GET",e,t)}post(e,t,r){return O.request("POST",e,t,r)}}var M={};
32
- /*
33
- @license
34
- Copyright (c) 2016, Twilio, Inc.
35
-
36
- Permission to use, copy, modify, and/or distribute this software for any
37
- purpose with or without fee is hereby granted, provided that the above
38
- copyright notice and this permission notice appear in all copies.
39
-
40
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
41
- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
42
- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
43
- SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
44
- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
45
- OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
46
- CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
47
-
48
- */function U(){}function S(){S.init.call(this)}function R(e){return void 0===e._maxListeners?S.defaultMaxListeners:e._maxListeners}function N(e,t,r,n){var o,i,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]):(i=e._events=new U,e._eventsCount=0),s){if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),!s.warned&&(o=R(e))&&o>0&&s.length>o){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,a=l,"function"==typeof console.warn?console.warn(a):console.log(a)}}else s=i[t]=r,++e._eventsCount;return e}function I(e,t,r){var n=!1;function o(){e.removeListener(t,o),n||(n=!0,r.apply(e,arguments))}return o.listener=r,o}function P(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function F(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}Object.defineProperty(M,"__esModule",{value:!0}),U.prototype=Object.create(null),S.EventEmitter=S,S.usingDomains=!1,S.prototype.domain=void 0,S.prototype._events=void 0,S.prototype._maxListeners=void 0,S.defaultMaxListeners=10,S.init=function(){this.domain=null,S.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new U,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},S.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},S.prototype.getMaxListeners=function(){return R(this)},S.prototype.emit=function(e){var t,r,n,o,i,s,a,l="error"===e;if(s=this._events)l=l&&null==s.error;else if(!l)return!1;if(a=this.domain,l){if(t=arguments[1],!a){if(t instanceof Error)throw t;var c=new Error('Uncaught, unspecified "error" event. ('+t+")");throw c.context=t,c}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(r=s[e]))return!1;var u="function"==typeof r;switch(n=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var n=e.length,o=F(e,n),i=0;i<n;++i)o[i].call(r)}(r,u,this);break;case 2:!function(e,t,r,n){if(t)e.call(r,n);else for(var o=e.length,i=F(e,o),s=0;s<o;++s)i[s].call(r,n)}(r,u,this,arguments[1]);break;case 3:!function(e,t,r,n,o){if(t)e.call(r,n,o);else for(var i=e.length,s=F(e,i),a=0;a<i;++a)s[a].call(r,n,o)}(r,u,this,arguments[1],arguments[2]);break;case 4:!function(e,t,r,n,o,i){if(t)e.call(r,n,o,i);else for(var s=e.length,a=F(e,s),l=0;l<s;++l)a[l].call(r,n,o,i)}(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];!function(e,t,r,n){if(t)e.apply(r,n);else for(var o=e.length,i=F(e,o),s=0;s<o;++s)i[s].apply(r,n)}(r,u,this,o)}return!0},S.prototype.addListener=function(e,t){return N(this,e,t,!1)},S.prototype.on=S.prototype.addListener,S.prototype.prependListener=function(e,t){return N(this,e,t,!0)},S.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,I(this,e,t)),this},S.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,I(this,e,t)),this},S.prototype.removeListener=function(e,t){var r,n,o,i,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[e]))return this;if(r===t||r.listener&&r.listener===t)0==--this._eventsCount?this._events=new U:(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length;i-- >0;)if(r[i]===t||r[i].listener&&r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new U,this;delete n[e]}else!function(e,t){for(var r=t,n=r+1,o=e.length;n<o;r+=1,n+=1)e[r]=e[n];e.pop()}(r,o);n.removeListener&&this.emit("removeListener",e,s||t)}return this},S.prototype.off=function(e,t){return this.removeListener(e,t)},S.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new U,this._eventsCount=0):r[e]&&(0==--this._eventsCount?this._events=new U:delete r[e]),this;if(0===arguments.length){for(var n,o=Object.keys(r),i=0;i<o.length;++i)"removeListener"!==(n=o[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new U,this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},S.prototype.listeners=function(e){var t,r=this._events;return r&&(t=r[e])?"function"==typeof t?[t.listener||t]:function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(t):[]},S.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):P.call(e,t)},S.prototype.listenerCount=P,S.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};class W extends S{minDelay;maxDelay;initialDelay;maxAttemptsCount;maxAttemptsTime;randomness;prevDelay;currDelay;timeout=null;inProgress;attemptNum;startTimestamp=-1;constructor(e){super(),this.minDelay=e.min,this.maxDelay=e.max,this.initialDelay=e.initial||0,this.maxAttemptsCount=e.maxAttemptsCount||0,this.maxAttemptsTime=e.maxAttemptsTime||0,this.randomness=e.randomness||0,this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}attempt(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.attemptNum++,this.emit("attempt",this)}nextDelay(e){if("number"==typeof e)return this.prevDelay=0,this.currDelay=e,e;if(0==this.attemptNum)return this.initialDelay;if(1==this.attemptNum)return this.currDelay=this.minDelay,this.currDelay;this.prevDelay=this.currDelay;let t=this.currDelay+this.prevDelay;return this.maxDelay&&t>this.maxDelay&&(this.currDelay=this.maxDelay,t=this.maxDelay),this.currDelay=t,t}randomize(e){const t=e*this.randomness,r=Math.round(Math.random()*t*2-t);return Math.max(0,e+r)}scheduleAttempt(e){if(this.maxAttemptsCount&&this.attemptNum>=this.maxAttemptsCount)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt count limit reached"));let t=this.nextDelay(e);if(t=this.randomize(t),this.maxAttemptsTime&&this.startTimestamp+this.maxAttemptsTime<Date.now()+t)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt time limit reached"));this.timeout=setTimeout((()=>this.attempt()),t)}cleanup(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}start(){if(this.inProgress)throw new Error("Retrier is already in progress");this.inProgress=!0,this.startTimestamp=Date.now(),this.scheduleAttempt(this.initialDelay)}cancel(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.emit("cancelled"))}succeeded(e){this.emit("succeeded",e)}failed(e,t){if(this.timeout)throw new Error("Retrier attempt is already in progress");this.scheduleAttempt(t)}}function q(e){return null!=e}class z extends S{maxDelay;initialDelay;factor;randomisationFactor;backoffDelay=0;nextBackoffDelay=0;backoffNumber=0;timeoutID=null;maxNumberOfRetry=-1;constructor(e){super(),e=e||{};const{initialDelay:t,maxDelay:r,randomisationFactor:n,factor:o}=e;if(q(t)&&t<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(q(r)&&r<=1)throw new Error("The maximal timeout must be greater than 1.");if(q(n)&&(n<0||n>1))throw new Error("The randomisation factor must be between 0 and 1.");if(q(o)&&o<=1)throw new Error("Exponential factor should be greater than 1.");if(this.initialDelay=t||100,this.maxDelay=r||1e4,this.maxDelay<=this.initialDelay)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");this.randomisationFactor=n||0,this.factor=o||2,this.reset()}static exponential(e){return new z(e)}backoff(e){null==this.timeoutID&&(this.backoffNumber===this.maxNumberOfRetry?(this.emit("fail",e),this.reset()):(this.backoffDelay=this.next(),this.timeoutID=setTimeout(this.onBackoff.bind(this),this.backoffDelay),this.emit("backoff",this.backoffNumber,this.backoffDelay,e)))}reset(){this.backoffDelay=0,this.nextBackoffDelay=this.initialDelay,this.backoffNumber=0,this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=null}failAfter(e){if(e<=0)throw new Error(`Expected a maximum number of retry greater than 0 but got ${e}`);this.maxNumberOfRetry=e}next(){this.backoffDelay=Math.min(this.nextBackoffDelay,this.maxDelay),this.nextBackoffDelay=this.backoffDelay*this.factor;const e=1+Math.random()*this.randomisationFactor;return Math.min(this.maxDelay,Math.round(this.backoffDelay*e))}onBackoff(){this.timeoutID=null,this.emit("ready",this.backoffNumber,this.backoffDelay),this.backoffNumber++}}M.AsyncRetrier=class extends S{retrier;resolve=()=>{};reject=()=>{};constructor(e){super(),this.retrier=new W(e)}run(e){return this.retrier.on("attempt",(()=>{e().then((e=>this.retrier.succeeded(e))).catch((e=>this.retrier.failed(e)))})),this.retrier.on("succeeded",(e=>this.resolve(e))),this.retrier.on("cancelled",(()=>this.reject(new Error("Cancelled")))),this.retrier.on("failed",(e=>this.reject(e))),new Promise(((e,t)=>{this.resolve=e,this.reject=t,this.retrier.start()}))}cancel(){this.retrier.cancel()}},M.Backoff=z;var B=M.Retrier=W;const H=L.scope("Network");class G{config;transport;constructor(e,t){this.config=e,this.transport=t}backoffConfig(){return Object.assign(E.backoffConfigDefault,this.config.backoffConfigOverride)}retryWhenThrottled(){return this.config.retryWhenThrottledOverride??E.retryWhenThrottledDefault??!1}executeWithRetry(e,t){return new D((async(r,n,o)=>{const i=new B(this.backoffConfig()),s=[502,503,504];t&&s.push(429),o((()=>{i.cancel(),i.removeAllListeners()})),i.on("attempt",(async()=>{try{const t=e();o((()=>{t.cancel(),i.cancel(),i.removeAllListeners()}));const r=await t;i.succeeded(r)}catch(e){s.indexOf(e.status)>-1||"Twilsock disconnected"===e.message?i.failed(e):(i.removeAllListeners(),i.cancel(),n(e))}})),i.on("succeeded",(e=>{r(e)})),i.on("cancelled",(e=>n(e))),i.on("failed",(e=>n(e))),i.start()}))}get(e){return new D((async(t,r,n)=>{const o={"X-Twilio-Token":this.config.token},i=this.executeWithRetry((()=>this.transport.get(e,o)),this.retryWhenThrottled());H.trace("sending GET request to ",e," headers ",o),n((()=>i.cancel()));try{const e=await i;H.trace("response",e),t(e)}catch(e){H.debug(`get() error ${e}`),r(e)}}))}post(e,r,n,o,i){const s={"X-Twilio-Token":this.config.token};"undefined"!=typeof FormData&&n instanceof FormData||!o||Object.assign(s,{"Content-Type":o});const a=new URL(e);return r&&a.searchParams.append("Category",r),i&&a.searchParams.append("Filename",i),new D((async(r,o,i)=>{const l=this.transport.post(a.href,s,n);let c;i((()=>l.cancel())),H.trace(`sending POST request to ${e} with headers ${s}`);try{c=await l}catch(e){return void 0===t.XMLHttpRequest&&n instanceof FormData?void o(new TypeError("Posting FormData supported only with browser engine's FormData")):(H.debug(`post() error ${e}`),void o(e))}H.trace("response",c),r(c)}))}}var J={};
49
- /*
50
- @license
51
- Copyright (c) 2021 Twilio Inc.
52
-
53
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
54
-
55
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
56
-
57
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
58
-
59
-
60
- */
61
- Object.defineProperty(J,"__esModule",{value:!0});const V=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return{checks:t}},X=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return V((e=>{let r=!1;const n=[];for(const o of t)"string"!=typeof o?(r=r||e instanceof o,n.push(`an instance of ${o.name}`)):(r=r||typeof e===o,n.push(`of type ${o}`));return[r,n]}))},Y=(e,t)=>{if(t.length>e.length)throw new Error(`Expected at most ${e.length} argument(s), but got ${t.length}`);for(;t.length<e.length;)t.push(void 0);for(const[r,n]of t.entries()){const[t,o,i,s]=ee(e[r],n);if(t)continue;throw new Error(`Argument ${r+1} is expected to be ${i}${s} but got ${o}`)}},K=e=>{let t;return["undefined","boolean","number","bigint","string"].includes(typeof e)&&(t="string"==typeof e?`"${e}"`:`${e}`),"object"==typeof e&&"Object"!==e?.constructor?.name&&(t=null===e?"null":`instance of ${e?.constructor?.name}`),t||(t=typeof e),t},Z=e=>{const t=[];for(const r of e)t.push(Q(r));return t},Q=e=>{const t=[],r=Array.isArray(e)?e:[e];for(const e of r)"string"!=typeof e&&"function"!=typeof e?t.push(e):t.push(X(e));return t},ee=(e,t)=>{let r,n=[],o=!1;for(const i of e)for(const e of i.checks){const[i,s,a]=e(t);o=o||i,!r&&a&&(r=a),s&&(n="string"==typeof s?[...n,s]:[...n,...s])}if(o)return[!0];const i=r||K(t),s=n.length-1;return[!1,i,s>0?`${n.slice(0,s).join(", ")} or ${n[s]}`:n.join(", "),s>1?";":","]},te=V((e=>["string"==typeof e&&e.length>0,"a non-empty string"])),re=V((e=>["number"==typeof e&&Number.isInteger(e)&&e>=0,"a non-negative integer"])),ne=V((e=>["object"==typeof e&&null!==e&&!Array.isArray(e),"a pure object (non-null and non-array)"]));J.array=(e,t)=>V((r=>{if(!Array.isArray(r))return[!1,`an array of ${e}`];for(const[n,o]of r.entries()){const[r,i,s]=ee(Q(t),o);if(!r)return[!1,`a valid array of ${e} (index ${n} should be ${s})`,`malformed array of ${e} (index ${n} is ${i})`]}return[!0]})),J.custom=V;var oe=J.literal=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return V((e=>{let r=!1;const n=[];for(const o of t)r=r||e===o,n.push("string"==typeof o?`"${o}"`:`${o}`);return[r,n]}))};J.nonEmptyArray=(e,t)=>V((r=>{if(!Array.isArray(r)||r.length<1)return[!1,`a non-empty array of ${e}`];for(const[n,o]of r.entries()){const[r,i,s]=ee(Q(t),o);if(!r)return[!1,`a valid non-empty array of ${e} (index ${n} should be ${s})`,`malformed array of ${e} (index ${n} is ${i})`]}return[!0]}));var ie=J.nonEmptyString=te;J.nonNegativeInteger=re,J.objectSchema=(e,t)=>V((r=>{if("object"!=typeof r||null===r||Array.isArray(r))return[!1,`valid ${e} (should be a pure object)`];for(const[n,o]of Object.entries(t)){const[t,i,s]=ee(Q(o),r[n]);if(!t)return[!1,`valid ${e} (key "${n}" should be ${s})`,`malformed ${e} (key "${n}" is ${i})`]}return[!0]}));var se=J.pureObject=ne;J.runtimeTypeValidation=Y,J.stringifyReceivedType=K,J.type=X;var ae=J.validateConstructorTypes=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=Z(t);return e=>class extends e{constructor(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];Y(n,t),super(...t)}}},le=J.validateTypes=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=Z(t);return(e,t,r)=>{if("function"!=typeof r.value)throw new Error("The validateTypes decorator can only be applied to methods");const o=r.value;r.value=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Y(n,t),o.apply(this,t)}}},ce=J.validateTypesAsync=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=Z(t);return(e,t,r)=>{if("function"!=typeof r.value)throw new Error("The validateTypesAsync decorator can only be applied to methods");const o=r.value;r.value=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];try{Y(n,t)}catch(e){return Promise.reject(e)}return o.apply(this,t)}}};const ue=L.scope("");return e.default=class{transport;options;network;config;static version="1.0.0-rc.6";constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};this.options=n,this.options.logLevel=this.options.logLevel??"silent",this.config=new E(e,t,r,this.options),ue.setLevel(this.options.logLevel),this.options.transport=this.options.transport??new O,this.transport=this.options.transport,this.network=new G(this.config,this.transport)}updateToken(e){ue.info("updateToken"),this.config.updateToken(e)}get(e){return new D((async(t,r,n)=>{const o=this.network.get(`${this.config.mediaUrl}/${e}`);n((()=>o.cancel()));try{const e=await o;t(new C(this.config,this.network,e.body))}catch(e){r(e)}}))}post(e,t,r,n){return new D((async(o,i,s)=>{const a=this.network.post(this.config.mediaUrl,r??"media",t,e,n);s((()=>a.cancel()));try{const e=await a;o(new C(this.config,this.network,e.body))}catch(e){i(e)}}))}postFormData(e,t){return new D((async(r,n,o)=>{const i=this.network.post(this.config.mediaUrl,t??"media",e);o((()=>i.cancel()));try{const e=await i;r(new C(this.config,this.network,e.body))}catch(e){n(e)}}))}mediaSetGet(e){return new D((async(t,r,n)=>{const o={command:"get",list:e.map((e=>({media_sid:e})))},i=this.network.post(`${this.config.mediaSetUrl}`,null,o,"application/json");n((()=>i.cancel()));try{const e=await i;t(e.body.map((e=>{if(200===e.code)return new C(this.config,this.network,e.media_record);r(`Failed to obtain detailed information about Media items (failed SID ${e.media_record.sid})`)})))}catch(e){r(e)}}))}mediaSetGetContentUrls(e){return new D((async(t,r,n)=>{const o={command:"get",list:e.map((e=>({media_sid:e})))},i=this.network.post(`${this.config.mediaSetUrl}`,null,o,"application/json");n((()=>i.cancel()));try{const e=await i,n=new Map;e.body.forEach((e=>{200===e.code?n.set(e.media_record.sid,e.media_record.links.content_direct_temporary):r(`Failed to obtain detailed information about Media items (failed SID ${e.media_record.sid})`)})),t(n)}catch(e){r(e)}}))}},T([le(ie),k("design:type",Function),k("design:paramtypes",[String]),k("design:returntype",void 0)],e.default.prototype,"updateToken",null),T([ce(ie),k("design:type",Function),k("design:paramtypes",[String]),k("design:returntype",D)],e.default.prototype,"get",null),e.default=T([ae(ie,ie,[ie,oe(null)],[se,"undefined"]),k("design:paramtypes",[String,String,Object,Object])],e.default),e.CancellablePromise=D,e.Client=e.default,e.McsClient=e.default,e.McsMedia=C,e.Media=C,Object.defineProperty(e,"__esModule",{value:!0}),e}({});
18
+ this.Twilio=this.Twilio||{},this.Twilio.McsClient=function(t){"use strict";var e=void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},n=function(t){return t&&t.Math==Math&&t},o=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r&&r)||function(){return this}()||Function("return this")(),i={},a=function(t){try{return!!t()}catch(t){return!0}},u=!a((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={},s={}.propertyIsEnumerable,f=Object.getOwnPropertyDescriptor,l=f&&!s.call({1:2},1);c.f=l?function(t){var e=f(this,t);return!!e&&e.enumerable}:s;var p,h,d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},v={}.toString,y=function(t){return v.call(t).slice(8,-1)},g=y,m="".split,b=a((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==g(t)?m.call(t,""):Object(t)}:Object,w=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},x=b,k=w,S=function(t){return x(k(t))},E=function(t){return"object"==typeof t?null!==t:"function"==typeof t},O=o,A=function(t){return"function"==typeof t?t:void 0},j=function(t,e){return arguments.length<2?A(O[t]):O[t]&&O[t][e]},T=j("navigator","userAgent")||"",_=o,L=T,R=_.process,P=_.Deno,I=R&&R.versions||P&&P.version,C=I&&I.v8;C?h=(p=C.split("."))[0]<4?1:p[0]+p[1]:L&&(!(p=L.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=L.match(/Chrome\/(\d+)/))&&(h=p[1]);var D=h&&+h,M=D,U=a,N=!!Object.getOwnPropertySymbols&&!U((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&M&&M<41})),F=N&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,B=j,q=F?function(t){return"symbol"==typeof t}:function(t){var e=B("Symbol");return"function"==typeof e&&Object(t)instanceof e},$=E,z={exports:{}},G=o,W=function(t,e){try{Object.defineProperty(G,t,{value:e,configurable:!0,writable:!0})}catch(r){G[t]=e}return e},V=W,H="__core-js_shared__",Y=o[H]||V(H,{}),J=Y;(z.exports=function(t,e){return J[t]||(J[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.17.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var K=w,X=function(t){return Object(K(t))},Z=X,Q={}.hasOwnProperty,tt=Object.hasOwn||function(t,e){return Q.call(Z(t),e)},et=0,rt=Math.random(),nt=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++et+rt).toString(36)},ot=o,it=z.exports,at=tt,ut=nt,ct=N,st=F,ft=it("wks"),lt=ot.Symbol,pt=st?lt:lt&&lt.withoutSetter||ut,ht=function(t){return at(ft,t)&&(ct||"string"==typeof ft[t])||(ct&&at(lt,t)?ft[t]=lt[t]:ft[t]=pt("Symbol."+t)),ft[t]},dt=E,vt=q,yt=function(t,e){var r,n;if("string"===e&&"function"==typeof(r=t.toString)&&!$(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!$(n=r.call(t)))return n;if("string"!==e&&"function"==typeof(r=t.toString)&&!$(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},gt=ht("toPrimitive"),mt=function(t,e){if(!dt(t)||vt(t))return t;var r,n=t[gt];if(void 0!==n){if(void 0===e&&(e="default"),r=n.call(t,e),!dt(r)||vt(r))return r;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),yt(t,e)},bt=mt,wt=q,xt=function(t){var e=bt(t,"string");return wt(e)?e:String(e)},kt=E,St=o.document,Et=kt(St)&&kt(St.createElement),Ot=function(t){return Et?St.createElement(t):{}},At=Ot,jt=!u&&!a((function(){return 7!=Object.defineProperty(At("div"),"a",{get:function(){return 7}}).a})),Tt=u,_t=c,Lt=d,Rt=S,Pt=xt,It=tt,Ct=jt,Dt=Object.getOwnPropertyDescriptor;i.f=Tt?Dt:function(t,e){if(t=Rt(t),e=Pt(e),Ct)try{return Dt(t,e)}catch(t){}if(It(t,e))return Lt(!_t.f.call(t,e),t[e])};var Mt={},Ut=E,Nt=function(t){if(!Ut(t))throw TypeError(String(t)+" is not an object");return t},Ft=u,Bt=jt,qt=Nt,$t=xt,zt=Object.defineProperty;Mt.f=Ft?zt:function(t,e,r){if(qt(t),e=$t(e),qt(r),Bt)try{return zt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t};var Gt=Mt,Wt=d,Vt=u?function(t,e,r){return Gt.f(t,e,Wt(1,r))}:function(t,e,r){return t[e]=r,t},Ht={exports:{}},Yt=Y,Jt=Function.toString;"function"!=typeof Yt.inspectSource&&(Yt.inspectSource=function(t){return Jt.call(t)});var Kt,Xt,Zt,Qt=Yt.inspectSource,te=Qt,ee=o.WeakMap,re="function"==typeof ee&&/native code/.test(te(ee)),ne=z.exports,oe=nt,ie=ne("keys"),ae=function(t){return ie[t]||(ie[t]=oe(t))},ue={},ce=re,se=E,fe=Vt,le=tt,pe=Y,he=ae,de=ue,ve="Object already initialized",ye=o.WeakMap;if(ce||pe.state){var ge=pe.state||(pe.state=new ye),me=ge.get,be=ge.has,we=ge.set;Kt=function(t,e){if(be.call(ge,t))throw new TypeError(ve);return e.facade=t,we.call(ge,t,e),e},Xt=function(t){return me.call(ge,t)||{}},Zt=function(t){return be.call(ge,t)}}else{var xe=he("state");de[xe]=!0,Kt=function(t,e){if(le(t,xe))throw new TypeError(ve);return e.facade=t,fe(t,xe,e),e},Xt=function(t){return le(t,xe)?t[xe]:{}},Zt=function(t){return le(t,xe)}}var ke={set:Kt,get:Xt,has:Zt,enforce:function(t){return Zt(t)?Xt(t):Kt(t,{})},getterFor:function(t){return function(e){var r;if(!se(e)||(r=Xt(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},Se=o,Ee=Vt,Oe=tt,Ae=W,je=Qt,Te=ke.get,_e=ke.enforce,Le=String(String).split("String");(Ht.exports=function(t,e,r,n){var o,i=!!n&&!!n.unsafe,a=!!n&&!!n.enumerable,u=!!n&&!!n.noTargetGet;"function"==typeof r&&("string"!=typeof e||Oe(r,"name")||Ee(r,"name",e),(o=_e(r)).source||(o.source=Le.join("string"==typeof e?e:""))),t!==Se?(i?!u&&t[e]&&(a=!0):delete t[e],a?t[e]=r:Ee(t,e,r)):a?t[e]=r:Ae(e,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&Te(this).source||je(this)}));var Re={},Pe=Math.ceil,Ie=Math.floor,Ce=function(t){return isNaN(t=+t)?0:(t>0?Ie:Pe)(t)},De=Ce,Me=Math.min,Ue=function(t){return t>0?Me(De(t),9007199254740991):0},Ne=Ce,Fe=Math.max,Be=Math.min,qe=function(t,e){var r=Ne(t);return r<0?Fe(r+e,0):Be(r,e)},$e=S,ze=Ue,Ge=qe,We=function(t){return function(e,r,n){var o,i=$e(e),a=ze(i.length),u=Ge(n,a);if(t&&r!=r){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===r)return t||u||0;return!t&&-1}},Ve={includes:We(!0),indexOf:We(!1)},He=tt,Ye=S,Je=Ve.indexOf,Ke=ue,Xe=function(t,e){var r,n=Ye(t),o=0,i=[];for(r in n)!He(Ke,r)&&He(n,r)&&i.push(r);for(;e.length>o;)He(n,r=e[o++])&&(~Je(i,r)||i.push(r));return i},Ze=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Qe=Xe,tr=Ze.concat("length","prototype");Re.f=Object.getOwnPropertyNames||function(t){return Qe(t,tr)};var er={};er.f=Object.getOwnPropertySymbols;var rr=Re,nr=er,or=Nt,ir=j("Reflect","ownKeys")||function(t){var e=rr.f(or(t)),r=nr.f;return r?e.concat(r(t)):e},ar=tt,ur=ir,cr=i,sr=Mt,fr=function(t,e){for(var r=ur(e),n=sr.f,o=cr.f,i=0;i<r.length;i++){var a=r[i];ar(t,a)||n(t,a,o(e,a))}},lr=a,pr=/#|\.prototype\./,hr=function(t,e){var r=vr[dr(t)];return r==gr||r!=yr&&("function"==typeof e?lr(e):!!e)},dr=hr.normalize=function(t){return String(t).replace(pr,".").toLowerCase()},vr=hr.data={},yr=hr.NATIVE="N",gr=hr.POLYFILL="P",mr=hr,br=o,wr=i.f,xr=Vt,kr=Ht.exports,Sr=W,Er=fr,Or=mr,Ar=function(t,e){var r,n,o,i,a,u=t.target,c=t.global,s=t.stat;if(r=c?br:s?br[u]||Sr(u,{}):(br[u]||{}).prototype)for(n in e){if(i=e[n],o=t.noTargetGet?(a=wr(r,n))&&a.value:r[n],!Or(c?n:u+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Er(i,o)}(t.sham||o&&o.sham)&&xr(i,"sham",!0),kr(r,n,i,t)}},jr=Mt.f,Tr=tt,_r=ht("toStringTag"),Lr=function(t,e,r){t&&!Tr(t=r?t:t.prototype,_r)&&jr(t,_r,{configurable:!0,value:e})},Rr=o,Pr=Lr;Ar({global:!0},{Reflect:{}}),Pr(Rr.Reflect,"Reflect",!0);var Ir,Cr=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t},Dr=Xe,Mr=Ze,Ur=Object.keys||function(t){return Dr(t,Mr)},Nr=Mt,Fr=Nt,Br=Ur,qr=u?Object.defineProperties:function(t,e){Fr(t);for(var r,n=Br(e),o=n.length,i=0;o>i;)Nr.f(t,r=n[i++],e[r]);return t},$r=j("document","documentElement"),zr=Nt,Gr=qr,Wr=Ze,Vr=ue,Hr=$r,Yr=Ot,Jr=ae("IE_PROTO"),Kr=function(){},Xr=function(t){return"<script>"+t+"</"+"script>"},Zr=function(t){t.write(Xr("")),t.close();var e=t.parentWindow.Object;return t=null,e},Qr=function(){try{Ir=new ActiveXObject("htmlfile")}catch(t){}var t,e;Qr="undefined"!=typeof document?document.domain&&Ir?Zr(Ir):((e=Yr("iframe")).style.display="none",Hr.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(Xr("document.F=Object")),t.close(),t.F):Zr(Ir);for(var r=Wr.length;r--;)delete Qr.prototype[Wr[r]];return Qr()};Vr[Jr]=!0;var tn=Object.create||function(t,e){var r;return null!==t?(Kr.prototype=zr(t),r=new Kr,Kr.prototype=null,r[Jr]=t):r=Qr(),void 0===e?r:Gr(r,e)},en=Cr,rn=E,nn=[].slice,on={},an=function(t,e,r){if(!(e in on)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";on[e]=Function("C,a","return new C("+n.join(",")+")")}return on[e](t,r)},un=Function.bind||function(t){var e=en(this),r=nn.call(arguments,1),n=function(){var o=r.concat(nn.call(arguments));return this instanceof n?an(e,o.length,o):e.apply(t,o)};return rn(e.prototype)&&(n.prototype=e.prototype),n},cn=Ar,sn=Cr,fn=Nt,ln=E,pn=tn,hn=un,dn=a,vn=j("Reflect","construct"),yn=dn((function(){function t(){}return!(vn((function(){}),[],t)instanceof t)})),gn=!dn((function(){vn((function(){}))})),mn=yn||gn;function bn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xn(t,e,r){return e&&wn(t.prototype,e),r&&wn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function kn(t,e){return kn=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},kn(t,e)}function Sn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kn(t,e)}function En(t){return En="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},En(t)}function On(t,e){if(e&&("object"===En(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function An(t){return An=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},An(t)}function jn(){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(t){return!1}}function Tn(t,e,r){return Tn=jn()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&kn(o,r.prototype),o},Tn.apply(null,arguments)}function _n(t){var e="function"==typeof Map?new Map:void 0;return _n=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Tn(t,arguments,An(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),kn(n,t)},_n(t)}function Ln(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}cn({target:"Reflect",stat:!0,forced:mn,sham:mn},{construct:function(t,e){sn(t),fn(e);var r=arguments.length<3?t:sn(arguments[2]);if(gn&&!yn)return vn(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return n.push.apply(n,e),new(hn.apply(t,n))}var o=r.prototype,i=pn(ln(o)?o:Object.prototype),a=Function.apply.call(t,i,e);return ln(a)?a:i}});var Rn={};Rn[ht("toStringTag")]="z";var Pn="[object z]"===String(Rn),In=Pn,Cn=y,Dn=ht("toStringTag"),Mn="Arguments"==Cn(function(){return arguments}()),Un=In?Cn:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),Dn))?r:Mn?Cn(e):"Object"==(n=Cn(e))&&"function"==typeof e.callee?"Arguments":n},Nn=Un,Fn=Pn?{}.toString:function(){return"[object "+Nn(this)+"]"},Bn=Pn,qn=Ht.exports,$n=Fn;Bn||qn(Object.prototype,"toString",$n,{unsafe:!0});var zn=o.Promise,Gn=Ht.exports,Wn=function(t,e,r){for(var n in e)Gn(t,n,e[n],r);return t},Vn=E,Hn=Nt,Yn=function(t){if(!Vn(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t},Jn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return Hn(r),Yn(n),e?t.call(r,n):r.__proto__=n,r}}():void 0),Kn=j,Xn=Mt,Zn=u,Qn=ht("species"),to=function(t){var e=Kn(t),r=Xn.f;Zn&&e&&!e[Qn]&&r(e,Qn,{configurable:!0,get:function(){return this}})},eo=function(t,e,r){if(!(t instanceof e))throw TypeError("Incorrect "+(r?r+" ":"")+"invocation");return t},ro={},no=ro,oo=ht("iterator"),io=Array.prototype,ao=function(t){return void 0!==t&&(no.Array===t||io[oo]===t)},uo=Cr,co=function(t,e,r){if(uo(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,n){return t.call(e,r,n)};case 3:return function(r,n,o){return t.call(e,r,n,o)}}return function(){return t.apply(e,arguments)}},so=Un,fo=ro,lo=ht("iterator"),po=function(t){if(null!=t)return t[lo]||t["@@iterator"]||fo[so(t)]},ho=Nt,vo=po,yo=function(t,e){var r=arguments.length<2?vo(t):e;if("function"!=typeof r)throw TypeError(String(t)+" is not iterable");return ho(r.call(t))},go=Nt,mo=function(t,e,r){var n,o;go(t);try{if(void 0===(n=t.return)){if("throw"===e)throw r;return r}n=n.call(t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return go(n),r},bo=Nt,wo=ao,xo=Ue,ko=co,So=yo,Eo=po,Oo=mo,Ao=function(t,e){this.stopped=t,this.result=e},jo=function(t,e,r){var n,o,i,a,u,c,s,f=r&&r.that,l=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_ITERATOR),h=!(!r||!r.INTERRUPTED),d=ko(e,f,1+l+h),v=function(t){return n&&Oo(n,"normal",t),new Ao(!0,t)},y=function(t){return l?(bo(t),h?d(t[0],t[1],v):d(t[0],t[1])):h?d(t,v):d(t)};if(p)n=t;else{if("function"!=typeof(o=Eo(t)))throw TypeError("Target is not iterable");if(wo(o)){for(i=0,a=xo(t.length);a>i;i++)if((u=y(t[i]))&&u instanceof Ao)return u;return new Ao(!1)}n=So(t,o)}for(c=n.next;!(s=c.call(n)).done;){try{u=y(s.value)}catch(t){Oo(n,"throw",t)}if("object"==typeof u&&u&&u instanceof Ao)return u}return new Ao(!1)},To=ht("iterator"),_o=!1;try{var Lo=0,Ro={next:function(){return{done:!!Lo++}},return:function(){_o=!0}};Ro[To]=function(){return this},Array.from(Ro,(function(){throw 2}))}catch(t){}var Po,Io,Co,Do,Mo=function(t,e){if(!e&&!_o)return!1;var r=!1;try{var n={};n[To]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Uo=Nt,No=Cr,Fo=ht("species"),Bo=function(t,e){var r,n=Uo(t).constructor;return void 0===n||null==(r=Uo(n)[Fo])?e:No(r)},qo=/(?:ipad|iphone|ipod).*applewebkit/i.test(T),$o="process"==y(o.process),zo=o,Go=a,Wo=co,Vo=$r,Ho=Ot,Yo=qo,Jo=$o,Ko=zo.setImmediate,Xo=zo.clearImmediate,Zo=zo.process,Qo=zo.MessageChannel,ti=zo.Dispatch,ei=0,ri={},ni="onreadystatechange";try{Po=zo.location}catch(t){}var oi=function(t){if(ri.hasOwnProperty(t)){var e=ri[t];delete ri[t],e()}},ii=function(t){return function(){oi(t)}},ai=function(t){oi(t.data)},ui=function(t){zo.postMessage(String(t),Po.protocol+"//"+Po.host)};Ko&&Xo||(Ko=function(t){for(var e=[],r=arguments.length,n=1;r>n;)e.push(arguments[n++]);return ri[++ei]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},Io(ei),ei},Xo=function(t){delete ri[t]},Jo?Io=function(t){Zo.nextTick(ii(t))}:ti&&ti.now?Io=function(t){ti.now(ii(t))}:Qo&&!Yo?(Do=(Co=new Qo).port2,Co.port1.onmessage=ai,Io=Wo(Do.postMessage,Do,1)):zo.addEventListener&&"function"==typeof postMessage&&!zo.importScripts&&Po&&"file:"!==Po.protocol&&!Go(ui)?(Io=ui,zo.addEventListener("message",ai,!1)):Io=ni in Ho("script")?function(t){Vo.appendChild(Ho("script")).onreadystatechange=function(){Vo.removeChild(this),oi(t)}}:function(t){setTimeout(ii(t),0)});var ci,si,fi,li,pi,hi,di,vi,yi={set:Ko,clear:Xo},gi=o,mi=/ipad|iphone|ipod/i.test(T)&&void 0!==gi.Pebble,bi=/web0s(?!.*chrome)/i.test(T),wi=o,xi=i.f,ki=yi.set,Si=qo,Ei=mi,Oi=bi,Ai=$o,ji=wi.MutationObserver||wi.WebKitMutationObserver,Ti=wi.document,_i=wi.process,Li=wi.Promise,Ri=xi(wi,"queueMicrotask"),Pi=Ri&&Ri.value;Pi||(ci=function(){var t,e;for(Ai&&(t=_i.domain)&&t.exit();si;){e=si.fn,si=si.next;try{e()}catch(t){throw si?li():fi=void 0,t}}fi=void 0,t&&t.enter()},Si||Ai||Oi||!ji||!Ti?!Ei&&Li&&Li.resolve?((di=Li.resolve(void 0)).constructor=Li,vi=di.then,li=function(){vi.call(di,ci)}):li=Ai?function(){_i.nextTick(ci)}:function(){ki.call(wi,ci)}:(pi=!0,hi=Ti.createTextNode(""),new ji(ci).observe(hi,{characterData:!0}),li=function(){hi.data=pi=!pi}));var Ii=Pi||function(t){var e={fn:t,next:void 0};fi&&(fi.next=e),si||(si=e,li()),fi=e},Ci={},Di=Cr,Mi=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=Di(e),this.reject=Di(r)};Ci.f=function(t){return new Mi(t)};var Ui,Ni,Fi,Bi,qi=Nt,$i=E,zi=Ci,Gi=o,Wi="object"==typeof window,Vi=Ar,Hi=o,Yi=j,Ji=zn,Ki=Ht.exports,Xi=Wn,Zi=Jn,Qi=Lr,ta=to,ea=E,ra=Cr,na=eo,oa=Qt,ia=jo,aa=Mo,ua=Bo,ca=yi.set,sa=Ii,fa=function(t,e){if(qi(t),$i(e)&&e.constructor===t)return e;var r=zi.f(t);return(0,r.resolve)(e),r.promise},la=function(t,e){var r=Gi.console;r&&r.error&&(1===arguments.length?r.error(t):r.error(t,e))},pa=Ci,ha=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},da=ke,va=mr,ya=Wi,ga=$o,ma=D,ba=ht("species"),wa="Promise",xa=da.get,ka=da.set,Sa=da.getterFor(wa),Ea=Ji&&Ji.prototype,Oa=Ji,Aa=Ea,ja=Hi.TypeError,Ta=Hi.document,_a=Hi.process,La=pa.f,Ra=La,Pa=!!(Ta&&Ta.createEvent&&Hi.dispatchEvent),Ia="function"==typeof PromiseRejectionEvent,Ca="unhandledrejection",Da=!1,Ma=va(wa,(function(){var t=oa(Oa),e=t!==String(Oa);if(!e&&66===ma)return!0;if(ma>=51&&/native code/.test(t))return!1;var r=new Oa((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[ba]=n,!(Da=r.then((function(){}))instanceof n)||!e&&ya&&!Ia})),Ua=Ma||!aa((function(t){Oa.all(t).catch((function(){}))})),Na=function(t){var e;return!(!ea(t)||"function"!=typeof(e=t.then))&&e},Fa=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;sa((function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var a,u,c,s=r[i++],f=o?s.ok:s.fail,l=s.resolve,p=s.reject,h=s.domain;try{f?(o||(2===t.rejection&&za(t),t.rejection=1),!0===f?a=n:(h&&h.enter(),a=f(n),h&&(h.exit(),c=!0)),a===s.promise?p(ja("Promise-chain cycle")):(u=Na(a))?u.call(a,l,p):l(a)):p(n)}catch(t){h&&!c&&h.exit(),p(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&qa(t)}))}},Ba=function(t,e,r){var n,o;Pa?((n=Ta.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),Hi.dispatchEvent(n)):n={promise:e,reason:r},!Ia&&(o=Hi["on"+t])?o(n):t===Ca&&la("Unhandled promise rejection",r)},qa=function(t){ca.call(Hi,(function(){var e,r=t.facade,n=t.value;if($a(t)&&(e=ha((function(){ga?_a.emit("unhandledRejection",n,r):Ba(Ca,r,n)})),t.rejection=ga||$a(t)?2:1,e.error))throw e.value}))},$a=function(t){return 1!==t.rejection&&!t.parent},za=function(t){ca.call(Hi,(function(){var e=t.facade;ga?_a.emit("rejectionHandled",e):Ba("rejectionhandled",e,t.value)}))},Ga=function(t,e,r){return function(n){t(e,n,r)}},Wa=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Fa(t,!0))},Va=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw ja("Promise can't be resolved itself");var n=Na(e);n?sa((function(){var r={done:!1};try{n.call(e,Ga(Va,r,t),Ga(Wa,r,t))}catch(e){Wa(r,e,t)}})):(t.value=e,t.state=1,Fa(t,!1))}catch(e){Wa({done:!1},e,t)}}};if(Ma&&(Aa=(Oa=function(t){na(this,Oa,wa),ra(t),Ui.call(this);var e=xa(this);try{t(Ga(Va,e),Ga(Wa,e))}catch(t){Wa(e,t)}}).prototype,(Ui=function(t){ka(this,{type:wa,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=Xi(Aa,{then:function(t,e){var r=Sa(this),n=La(ua(this,Oa));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=ga?_a.domain:void 0,r.parent=!0,r.reactions.push(n),0!=r.state&&Fa(r,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),Ni=function(){var t=new Ui,e=xa(t);this.promise=t,this.resolve=Ga(Va,e),this.reject=Ga(Wa,e)},pa.f=La=function(t){return t===Oa||t===Fi?new Ni(t):Ra(t)},"function"==typeof Ji&&Ea!==Object.prototype)){Bi=Ea.then,Da||(Ki(Ea,"then",(function(t,e){var r=this;return new Oa((function(t,e){Bi.call(r,t,e)})).then(t,e)}),{unsafe:!0}),Ki(Ea,"catch",Aa.catch,{unsafe:!0}));try{delete Ea.constructor}catch(t){}Zi&&Zi(Ea,Aa)}Vi({global:!0,wrap:!0,forced:Ma},{Promise:Oa}),Qi(Oa,wa,!1),ta(wa),Fi=Yi(wa),Vi({target:wa,stat:!0,forced:Ma},{reject:function(t){var e=La(this);return e.reject.call(void 0,t),e.promise}}),Vi({target:wa,stat:!0,forced:Ma},{resolve:function(t){return fa(this,t)}}),Vi({target:wa,stat:!0,forced:Ua},{all:function(t){var e=this,r=La(e),n=r.resolve,o=r.reject,i=ha((function(){var r=ra(e.resolve),i=[],a=0,u=1;ia(t,(function(t){var c=a++,s=!1;i.push(void 0),u++,r.call(e,t).then((function(t){s||(s=!0,i[c]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=La(e),n=r.reject,o=ha((function(){var o=ra(e.resolve);ia(t,(function(t){o.call(e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var Ha=tn,Ya=Mt,Ja=ht("unscopables"),Ka=Array.prototype;null==Ka[Ja]&&Ya.f(Ka,Ja,{configurable:!0,value:Ha(null)});var Xa,Za,Qa,tu=function(t){Ka[Ja][t]=!0},eu=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),ru=tt,nu=X,ou=eu,iu=ae("IE_PROTO"),au=Object.prototype,uu=ou?Object.getPrototypeOf:function(t){return t=nu(t),ru(t,iu)?t[iu]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?au:null},cu=a,su=uu,fu=Vt,lu=ht("iterator"),pu=!1;[].keys&&("next"in(Qa=[].keys())?(Za=su(su(Qa)))!==Object.prototype&&(Xa=Za):pu=!0);var hu=null==Xa||cu((function(){var t={};return Xa[lu].call(t)!==t}));hu&&(Xa={}),"function"!=typeof Xa[lu]&&fu(Xa,lu,(function(){return this}));var du={IteratorPrototype:Xa,BUGGY_SAFARI_ITERATORS:pu},vu=du.IteratorPrototype,yu=tn,gu=d,mu=Lr,bu=ro,wu=function(){return this},xu=function(t,e,r){var n=e+" Iterator";return t.prototype=yu(vu,{next:gu(1,r)}),mu(t,n,!1),bu[n]=wu,t},ku=Ar,Su=xu,Eu=uu,Ou=Jn,Au=Lr,ju=Vt,Tu=Ht.exports,_u=ro,Lu=du.IteratorPrototype,Ru=du.BUGGY_SAFARI_ITERATORS,Pu=ht("iterator"),Iu="keys",Cu="values",Du="entries",Mu=function(){return this},Uu=function(t,e,r,n,o,i,a){Su(r,e,n);var u,c,s,f=function(t){if(t===o&&v)return v;if(!Ru&&t in h)return h[t];switch(t){case Iu:case Cu:case Du:return function(){return new r(this,t)}}return function(){return new r(this)}},l=e+" Iterator",p=!1,h=t.prototype,d=h[Pu]||h["@@iterator"]||o&&h[o],v=!Ru&&d||f(o),y="Array"==e&&h.entries||d;if(y&&(u=Eu(y.call(new t)))!==Object.prototype&&u.next&&(Eu(u)!==Lu&&(Ou?Ou(u,Lu):"function"!=typeof u[Pu]&&ju(u,Pu,Mu)),Au(u,l,!0)),o==Cu&&d&&d.name!==Cu&&(p=!0,v=function(){return d.call(this)}),h[Pu]!==v&&ju(h,Pu,v),_u[e]=v,o)if(c={values:f(Cu),keys:i?v:f(Iu),entries:f(Du)},a)for(s in c)(Ru||p||!(s in h))&&Tu(h,s,c[s]);else ku({target:e,proto:!0,forced:Ru||p},c);return c},Nu=S,Fu=tu,Bu=ro,qu=ke,$u=Uu,zu="Array Iterator",Gu=qu.set,Wu=qu.getterFor(zu),Vu=$u(Array,"Array",(function(t,e){Gu(this,{type:zu,target:Nu(t),index:0,kind:e})}),(function(){var t=Wu(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values");Bu.Arguments=Bu.Array,Fu("keys"),Fu("values"),Fu("entries");var Hu={exports:{}},Yu={},Ju=S,Ku=Re.f,Xu={}.toString,Zu="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Yu.f=function(t){return Zu&&"[object Window]"==Xu.call(t)?function(t){try{return Ku(t)}catch(t){return Zu.slice()}}(t):Ku(Ju(t))};var Qu=!a((function(){return Object.isExtensible(Object.preventExtensions({}))})),tc=Ar,ec=ue,rc=E,nc=tt,oc=Mt.f,ic=Re,ac=Yu,uc=Qu,cc=!1,sc=nt("meta"),fc=0,lc=Object.isExtensible||function(){return!0},pc=function(t){oc(t,sc,{value:{objectID:"O"+fc++,weakData:{}}})},hc=Hu.exports={enable:function(){hc.enable=function(){},cc=!0;var t=ic.f,e=[].splice,r={};r[sc]=1,t(r).length&&(ic.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===sc){e.call(n,o,1);break}return n},tc({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ac.f}))},fastKey:function(t,e){if(!rc(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!nc(t,sc)){if(!lc(t))return"F";if(!e)return"E";pc(t)}return t[sc].objectID},getWeakData:function(t,e){if(!nc(t,sc)){if(!lc(t))return!0;if(!e)return!1;pc(t)}return t[sc].weakData},onFreeze:function(t){return uc&&cc&&lc(t)&&!nc(t,sc)&&pc(t),t}};ec[sc]=!0;var dc=E,vc=Jn,yc=function(t,e,r){var n,o;return vc&&"function"==typeof(n=e.constructor)&&n!==r&&dc(o=n.prototype)&&o!==r.prototype&&vc(t,o),t},gc=Ar,mc=o,bc=mr,wc=Ht.exports,xc=Hu.exports,kc=jo,Sc=eo,Ec=E,Oc=a,Ac=Mo,jc=Lr,Tc=yc,_c=Mt.f,Lc=tn,Rc=Wn,Pc=co,Ic=eo,Cc=jo,Dc=Uu,Mc=to,Uc=u,Nc=Hu.exports.fastKey,Fc=ke.set,Bc=ke.getterFor,qc={getConstructor:function(t,e,r,n){var o=t((function(t,i){Ic(t,o,e),Fc(t,{type:e,index:Lc(null),first:void 0,last:void 0,size:0}),Uc||(t.size=0),null!=i&&Cc(i,t[n],{that:t,AS_ENTRIES:r})})),i=Bc(e),a=function(t,e,r){var n,o,a=i(t),c=u(t,e);return c?c.value=r:(a.last=c={index:o=Nc(e,!0),key:e,value:r,previous:n=a.last,next:void 0,removed:!1},a.first||(a.first=c),n&&(n.next=c),Uc?a.size++:t.size++,"F"!==o&&(a.index[o]=c)),t},u=function(t,e){var r,n=i(t),o=Nc(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return Rc(o.prototype,{clear:function(){for(var t=i(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,Uc?t.size=0:this.size=0},delete:function(t){var e=this,r=i(e),n=u(e,t);if(n){var o=n.next,a=n.previous;delete r.index[n.index],n.removed=!0,a&&(a.next=o),o&&(o.previous=a),r.first==n&&(r.first=o),r.last==n&&(r.last=a),Uc?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=i(this),n=Pc(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!u(this,t)}}),Rc(o.prototype,r?{get:function(t){var e=u(this,t);return e&&e.value},set:function(t,e){return a(this,0===t?0:t,e)}}:{add:function(t){return a(this,t=0===t?0:t,t)}}),Uc&&_c(o.prototype,"size",{get:function(){return i(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=Bc(e),i=Bc(n);Dc(t,e,(function(t,e){Fc(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),Mc(e)}},$c=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=n?"set":"add",a=mc[t],u=a&&a.prototype,c=a,s={},f=function(t){var e=u[t];wc(u,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!Ec(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return o&&!Ec(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!Ec(t))&&e.call(this,0===t?0:t)}:function(t,r){return e.call(this,0===t?0:t,r),this})};if(bc(t,"function"!=typeof a||!(o||u.forEach&&!Oc((function(){(new a).entries().next()})))))c=r.getConstructor(e,t,n,i),xc.enable();else if(bc(t,!0)){var l=new c,p=l[i](o?{}:-0,1)!=l,h=Oc((function(){l.has(1)})),d=Ac((function(t){new a(t)})),v=!o&&Oc((function(){for(var t=new a,e=5;e--;)t[i](e,e);return!t.has(-0)}));d||((c=e((function(e,r){Sc(e,c,t);var o=Tc(new a,e,c);return null!=r&&kc(r,o[i],{that:o,AS_ENTRIES:n}),o}))).prototype=u,u.constructor=c),(h||v)&&(f("delete"),f("has"),n&&f("get")),(v||p)&&f(i),o&&u.clear&&delete u.clear}return s[t]=c,gc({global:!0,forced:c!=a},s),jc(c,t),o||r.setStrong(c,t,n),c};$c("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),qc);var zc=q,Gc=function(t){if(zc(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)},Wc=Ce,Vc=Gc,Hc=w,Yc=function(t){return function(e,r){var n,o,i=Vc(Hc(e)),a=Wc(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=i.charCodeAt(a))<55296||n>56319||a+1===u||(o=i.charCodeAt(a+1))<56320||o>57343?t?i.charAt(a):n:t?i.slice(a,a+2):o-56320+(n-55296<<10)+65536}},Jc={codeAt:Yc(!1),charAt:Yc(!0)},Kc=Jc.charAt,Xc=Gc,Zc=ke,Qc=Uu,ts="String Iterator",es=Zc.set,rs=Zc.getterFor(ts);Qc(String,"String",(function(t){es(this,{type:ts,string:Xc(t),index:0})}),(function(){var t,e=rs(this),r=e.string,n=e.index;return n>=r.length?{value:void 0,done:!0}:(t=Kc(r,n),e.index+=t.length,{value:t,done:!1})}));var ns={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},os=Ot("span").classList,is=os&&os.constructor&&os.constructor.prototype,as=is===Object.prototype?void 0:is,us=o,cs=ns,ss=as,fs=Vu,ls=Vt,ps=ht,hs=ps("iterator"),ds=ps("toStringTag"),vs=fs.values,ys=function(t,e){if(t){if(t[hs]!==vs)try{ls(t,hs,vs)}catch(e){t[hs]=vs}if(t[ds]||ls(t,ds,e),cs[e])for(var r in fs)if(t[r]!==fs[r])try{ls(t,r,fs[r])}catch(e){t[r]=fs[r]}}};for(var gs in cs)ys(us[gs]&&us[gs].prototype,gs);ys(ss,"DOMTokenList");var ms={exports:{}},bs="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(bs){var ws=new Uint8Array(16);ms.exports=function(){return bs(ws),ws}}else{var xs=new Array(16);ms.exports=function(){for(var t,e=0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),xs[e]=t>>>((3&e)<<3)&255;return xs}}for(var ks=[],Ss=0;Ss<256;++Ss)ks[Ss]=(Ss+256).toString(16).substr(1);var Es,Os,As=function(t,e){var r=e||0,n=ks;return[n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],"-",n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]],n[t[r++]]].join("")},js=ms.exports,Ts=As,_s=0,Ls=0;var Rs=function(t,e,r){var n=e&&r||0,o=e||[],i=(t=t||{}).node||Es,a=void 0!==t.clockseq?t.clockseq:Os;if(null==i||null==a){var u=js();null==i&&(i=Es=[1|u[0],u[1],u[2],u[3],u[4],u[5]]),null==a&&(a=Os=16383&(u[6]<<8|u[7]))}var c=void 0!==t.msecs?t.msecs:(new Date).getTime(),s=void 0!==t.nsecs?t.nsecs:Ls+1,f=c-_s+(s-Ls)/1e4;if(f<0&&void 0===t.clockseq&&(a=a+1&16383),(f<0||c>_s)&&void 0===t.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_s=c,Ls=s,Os=a;var l=(1e4*(268435455&(c+=122192928e5))+s)%4294967296;o[n++]=l>>>24&255,o[n++]=l>>>16&255,o[n++]=l>>>8&255,o[n++]=255&l;var p=c/4294967296*1e4&268435455;o[n++]=p>>>8&255,o[n++]=255&p,o[n++]=p>>>24&15|16,o[n++]=p>>>16&255,o[n++]=a>>>8|128,o[n++]=255&a;for(var h=0;h<6;++h)o[n+h]=i[h];return e||Ts(o)},Ps=ms.exports,Is=As;var Cs=function(t,e,r){var n=e&&r||0;"string"==typeof t&&(e="binary"===t?new Array(16):null,t=null);var o=(t=t||{}).random||(t.rng||Ps)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;++i)e[n+i]=o[i];return e||Is(o)},Ds=Rs,Ms=Cs,Us=Ms;Us.v1=Ds,Us.v4=Ms;var Ns=Us;function Fs(t){var e=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(t){return!1}}();return function(){var r,n=An(t);if(e){var o=An(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return On(this,r)}}var Bs=function(t){Sn(r,t);var e=Fs(r);function r(t){var n;bn(this,r);var o,i=Ns.v4();return(n=e.call(this,(function(e,n){return o=n,t((function(t){r.cancellationMap.delete(i),e(t)}),(function(t){r.cancellationMap.delete(i),n(t)}),(function(t){r.cancellationMap.set(i,t)}))}))).id=i,n.rejectPromise=o,n}return xn(r,[{key:"cancel",value:function(){var t=r.cancellationMap.get(this.id);return null==t||t(),this.rejectPromise&&(this.catch((function(){})),this.rejectPromise(new Error("Promise was cancelled"))),this}}]),r}(_n(Promise));function qs(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function $s(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){qs(i,n,o,a,u,"next",t)}function u(t){qs(i,n,o,a,u,"throw",t)}a(void 0)}))}}Ln(Bs,"cancellationMap",new Map);var zs,Gs=Object.prototype,Ws=Gs.hasOwnProperty,Vs="function"==typeof Symbol?Symbol:{},Hs=Vs.iterator||"@@iterator",Ys=Vs.asyncIterator||"@@asyncIterator",Js=Vs.toStringTag||"@@toStringTag";function Ks(t,e,r,n){var o=e&&e.prototype instanceof nf?e:nf,i=Object.create(o.prototype),a=new gf(n||[]);return i._invoke=function(t,e,r){var n=Zs;return function(o,i){if(n===tf)throw new Error("Generator is already running");if(n===ef){if("throw"===o)throw i;return bf()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=df(a,r);if(u){if(u===rf)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===Zs)throw n=ef,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=tf;var c=Xs(t,e,r);if("normal"===c.type){if(n=r.done?ef:Qs,c.arg===rf)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=ef,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function Xs(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}var Zs="suspendedStart",Qs="suspendedYield",tf="executing",ef="completed",rf={};function nf(){}function of(){}function af(){}var uf={};uf[Hs]=function(){return this};var cf=Object.getPrototypeOf,sf=cf&&cf(cf(mf([])));sf&&sf!==Gs&&Ws.call(sf,Hs)&&(uf=sf);var ff=af.prototype=nf.prototype=Object.create(uf);function lf(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function pf(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===of||"GeneratorFunction"===(e.displayName||e.name))}function hf(t,e){function r(n,o,i,a){var u=Xs(t[n],t,o);if("throw"!==u.type){var c=u.arg,s=c.value;return s&&"object"===En(s)&&Ws.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,a)}),(function(t){r("throw",t,i,a)})):e.resolve(s).then((function(t){c.value=t,i(c)}),(function(t){return r("throw",t,i,a)}))}a(u.arg)}var n;this._invoke=function(t,o){function i(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(i,i):i()}}function df(t,e){var r=t.iterator[e.method];if(r===zs){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=zs,df(t,e),"throw"===e.method))return rf;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return rf}var n=Xs(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,rf;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=zs),e.delegate=null,rf):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,rf)}function vf(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function yf(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function gf(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(vf,this),this.reset(!0)}function mf(t){if(t){var e=t[Hs];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r<t.length;)if(Ws.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=zs,e.done=!0,e};return n.next=n}}return{next:bf}}function bf(){return{value:zs,done:!0}}of.prototype=ff.constructor=af,af.constructor=of,af[Js]=of.displayName="GeneratorFunction",lf(hf.prototype),hf.prototype[Ys]=function(){return this},lf(ff),ff[Js]="Generator",ff[Hs]=function(){return this},ff.toString=function(){return"[object Generator]"},gf.prototype={constructor:gf,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=zs,this.done=!1,this.delegate=null,this.method="next",this.arg=zs,this.tryEntries.forEach(yf),!t)for(var e in this)"t"===e.charAt(0)&&Ws.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=zs)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,n){return i.type="throw",i.arg=t,e.next=r,n&&(e.method="next",e.arg=zs),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=Ws.call(o,"catchLoc"),u=Ws.call(o,"finallyLoc");if(a&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&Ws.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,rf):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),rf},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),yf(r),rf}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;yf(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:mf(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=zs),rf}};var wf={wrap:Ks,isGeneratorFunction:pf,AsyncIterator:hf,mark:function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,af):(t.__proto__=af,Js in t||(t[Js]="GeneratorFunction")),t.prototype=Object.create(ff),t},awrap:function(t){return{__await:t}},async:function(t,e,r,n,o){void 0===o&&(o=Promise);var i=new hf(Ks(t,e,r,n),o);return pf(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},keys:function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:mf},xf=y,kf=Array.isArray||function(t){return"Array"==xf(t)},Sf=xt,Ef=Mt,Of=d,Af=function(t,e,r){var n=Sf(e);n in t?Ef.f(t,n,Of(0,r)):t[n]=r},jf=E,Tf=kf,_f=ht("species"),Lf=function(t){var e;return Tf(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!Tf(e.prototype)?jf(e)&&null===(e=e[_f])&&(e=void 0):e=void 0),void 0===e?Array:e},Rf=function(t,e){return new(Lf(t))(0===e?0:e)},Pf=a,If=D,Cf=ht("species"),Df=function(t){return If>=51||!Pf((function(){var e=[];return(e.constructor={})[Cf]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Mf=Ar,Uf=a,Nf=kf,Ff=E,Bf=X,qf=Ue,$f=Af,zf=Rf,Gf=Df,Wf=D,Vf=ht("isConcatSpreadable"),Hf=9007199254740991,Yf="Maximum allowed index exceeded",Jf=Wf>=51||!Uf((function(){var t=[];return t[Vf]=!1,t.concat()[0]!==t})),Kf=Gf("concat"),Xf=function(t){if(!Ff(t))return!1;var e=t[Vf];return void 0!==e?!!e:Nf(t)};Mf({target:"Array",proto:!0,forced:!Jf||!Kf},{concat:function(t){var e,r,n,o,i,a=Bf(this),u=zf(a,0),c=0;for(e=-1,n=arguments.length;e<n;e++)if(Xf(i=-1===e?a:arguments[e])){if(c+(o=qf(i.length))>Hf)throw TypeError(Yf);for(r=0;r<o;r++,c++)r in i&&$f(u,c,i[r])}else{if(c>=Hf)throw TypeError(Yf);$f(u,c++,i)}return u.length=c,u}});var Zf=co,Qf=b,tl=X,el=Ue,rl=Rf,nl=[].push,ol=function(t){var e=1==t,r=2==t,n=3==t,o=4==t,i=6==t,a=7==t,u=5==t||i;return function(c,s,f,l){for(var p,h,d=tl(c),v=Qf(d),y=Zf(s,f,3),g=el(v.length),m=0,b=l||rl,w=e?b(c,g):r||a?b(c,0):void 0;g>m;m++)if((u||m in v)&&(h=y(p=v[m],m,d),t))if(e)w[m]=h;else if(h)switch(t){case 3:return!0;case 5:return p;case 6:return m;case 2:nl.call(w,p)}else switch(t){case 4:return!1;case 7:nl.call(w,p)}return i?-1:n||o?o:w}},il={forEach:ol(0),map:ol(1),filter:ol(2),some:ol(3),every:ol(4),find:ol(5),findIndex:ol(6),filterReject:ol(7)},al=il.map;Ar({target:"Array",proto:!0,forced:!Df("map")},{map:function(t){return al(this,t,arguments.length>1?arguments[1]:void 0)}});var ul=a,cl=function(t,e){var r=[][t];return!!r&&ul((function(){r.call(null,e||function(){throw 1},1)}))},sl=il.forEach,fl=cl("forEach")?[].forEach:function(t){return sl(this,t,arguments.length>1?arguments[1]:void 0)},ll=o,pl=ns,hl=as,dl=fl,vl=Vt,yl=function(t){if(t&&t.forEach!==dl)try{vl(t,"forEach",dl)}catch(e){t.forEach=dl}};for(var gl in pl)yl(ll[gl]&&ll[gl].prototype);function ml(t,e,r,n){var o,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"===("undefined"==typeof Reflect?"undefined":En(Reflect))&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(o=t[u])&&(a=(i<3?o(a):i>3?o(e,r,a):o(e,r))||a);return i>3&&a&&Object.defineProperty(e,r,a),a}function bl(t,e){if("object"===("undefined"==typeof Reflect?"undefined":En(Reflect))&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}yl(hl);var wl=Nt,xl=mo,kl=co,Sl=X,El=function(t,e,r,n){try{return n?e(wl(r)[0],r[1]):e(r)}catch(e){xl(t,"throw",e)}},Ol=ao,Al=Ue,jl=Af,Tl=yo,_l=po,Ll=function(t){var e,r,n,o,i,a,u=Sl(t),c="function"==typeof this?this:Array,s=arguments.length,f=s>1?arguments[1]:void 0,l=void 0!==f,p=_l(u),h=0;if(l&&(f=kl(f,s>2?arguments[2]:void 0,2)),null==p||c==Array&&Ol(p))for(r=new c(e=Al(u.length));e>h;h++)a=l?f(u[h],h):u[h],jl(r,h,a);else for(i=(o=Tl(u,p)).next,r=new c;!(n=i.call(o)).done;h++)a=l?El(o,f,[n.value,h],!0):n.value,jl(r,h,a);return r.length=h,r},Rl=Ll;Ar({target:"Array",stat:!0,forced:!Mo((function(t){Array.from(t)}))},{from:Rl});var Pl,Il,Cl,Dl={exports:{}};function Ml(t,e){return["".concat((new Date).toISOString()," MCS Client ").concat(t,":")].concat(Array.from(e))}Il=r,Cl=function(){var t=function(){},e="undefined",r=("undefined"==typeof window?"undefined":En(window))!==e&&En(window.navigator)!==e&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"];function o(t,e){var r=t[e];if("function"==typeof r.bind)return r.bind(t);try{return Function.prototype.bind.call(r,t)}catch(e){return function(){return Function.prototype.apply.apply(r,[t,arguments])}}}function i(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function a(n){return"debug"===n&&(n="log"),("undefined"==typeof console?"undefined":En(console))!==e&&("trace"===n&&r?i:void 0!==console[n]?o(console,n):void 0!==console.log?o(console,"log"):t)}function u(e,r){for(var o=0;o<n.length;o++){var i=n[o];this[i]=o<e?t:this.methodFactory(i,e,r)}this.log=this.debug}function c(t,r,n){return function(){("undefined"==typeof console?"undefined":En(console))!==e&&(u.call(this,r,n),this[t].apply(this,arguments))}}function s(t,e,r){return a(t)||c.apply(this,arguments)}function f(t,r,o){var i,a=this;r=null==r?"WARN":r;var c="loglevel";function f(){var t;if(("undefined"==typeof window?"undefined":En(window))!==e&&c){try{t=window.localStorage[c]}catch(t){}if(En(t)===e)try{var r=window.document.cookie,n=r.indexOf(encodeURIComponent(c)+"=");-1!==n&&(t=/^([^;]+)/.exec(r.slice(n))[1])}catch(t){}return void 0===a.levels[t]&&(t=void 0),t}}"string"==typeof t?c+=":"+t:"symbol"===En(t)&&(c=void 0),a.name=t,a.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},a.methodFactory=o||s,a.getLevel=function(){return i},a.setLevel=function(r,o){if("string"==typeof r&&void 0!==a.levels[r.toUpperCase()]&&(r=a.levels[r.toUpperCase()]),!("number"==typeof r&&r>=0&&r<=a.levels.SILENT))throw"log.setLevel() called with invalid level: "+r;if(i=r,!1!==o&&function(t){var r=(n[t]||"silent").toUpperCase();if(("undefined"==typeof window?"undefined":En(window))!==e&&c){try{return void(window.localStorage[c]=r)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"="+r+";"}catch(t){}}}(r),u.call(a,r,t),("undefined"==typeof console?"undefined":En(console))===e&&r<a.levels.SILENT)return"No console available for logging"},a.setDefaultLevel=function(t){r=t,f()||a.setLevel(t,!1)},a.resetLevel=function(){a.setLevel(r,!1),function(){if(("undefined"==typeof window?"undefined":En(window))!==e&&c){try{return void window.localStorage.removeItem(c)}catch(t){}try{window.document.cookie=encodeURIComponent(c)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(t){}}}()},a.enableAll=function(t){a.setLevel(a.levels.TRACE,t)},a.disableAll=function(t){a.setLevel(a.levels.SILENT,t)};var l=f();null==l&&(l=r),a.setLevel(l,!1)}var l=new f,p={};l.getLogger=function(t){if("symbol"!==En(t)&&"string"!=typeof t||""===t)throw new TypeError("You must supply a name when creating a logger.");var e=p[t];return e||(e=p[t]=new f(t,l.getLevel(),l.methodFactory)),e};var h=("undefined"==typeof window?"undefined":En(window))!==e?window.log:void 0;return l.noConflict=function(){return("undefined"==typeof window?"undefined":En(window))!==e&&window.log===l&&(window.log=h),l},l.getLoggers=function(){return p},l.default=l,l},(Pl=Dl).exports?Pl.exports=Cl():Il.log=Cl();var Ul,Nl=function(){function t(e){bn(this,t),Ln(this,"prefix",""),this.prefix=null!=e&&e.length>0?e+" ":""}return xn(t,[{key:"setLevel",value:function(t){Dl.exports.setLevel(t)}},{key:"trace",value:function(){if(Dl.exports.getLevel()==Dl.exports.levels.TRACE){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.debug.apply(null,Ml(this.prefix+"T",e))}}},{key:"debug",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.debug.apply(null,Ml(this.prefix+"D",e))}},{key:"info",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.info.apply(null,Ml(this.prefix+"I",e))}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.warn.apply(null,Ml(this.prefix+"W",e))}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.error.apply(null,Ml(this.prefix+"E",e))}}],[{key:"scope",value:function(e){return new t(e)}},{key:"setLevel",value:function(t){Dl.exports.setLevel(t)}},{key:"trace",value:function(){if(Dl.exports.getLevel()==Dl.exports.levels.TRACE){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.debug.apply(null,Ml("T",e))}}},{key:"debug",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.debug.apply(null,Ml("D",e))}},{key:"info",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.info.apply(null,Ml("I",e))}},{key:"warn",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.warn.apply(null,Ml("W",e))}},{key:"error",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];Dl.exports.error.apply(null,Ml("E",e))}}]),t}(),Fl=E,Bl=y,ql=ht("match"),$l=function(t){var e;return Fl(t)&&(void 0!==(e=t[ql])?!!e:"RegExp"==Bl(t))},zl=$l,Gl=ht("match"),Wl=Ar,Vl=i.f,Hl=Ue,Yl=Gc,Jl=function(t){if(zl(t))throw TypeError("The method doesn't accept regular expressions");return t},Kl=w,Xl=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[Gl]=!1,"/./"[t](e)}catch(t){}}return!1},Zl="".startsWith,Ql=Math.min,tp=Xl("startsWith");Wl({target:"String",proto:!0,forced:!!(tp||(Ul=Vl(String.prototype,"startsWith"),!Ul||Ul.writable))&&!tp},{startsWith:function(t){var e=Yl(Kl(this));Jl(t);var r=Hl(Ql(arguments.length>1?arguments[1]:void 0,e.length)),n=Yl(t);return Zl?Zl.call(e,n,r):e.slice(r,r+n.length)===n}});var ep=function(t,e){return"".concat((r=t,r.startsWith("http")?"":function(t){return"https://mcs.".concat(null!=t?t:"us1",".twilio.com")}(e))).concat(t);var r},rp=function(){function t(e,r,n,o){var i,a,u,c,s,f;bn(this,t);var l=null!==(i=null!==(a=o.MCS)&&void 0!==a?a:o)&&void 0!==i?i:{};this.region=null!==(u=null!==(c=l.region)&&void 0!==c?c:o.region)&&void 0!==u?u:"us1",this.mediaUrl=ep(r,this.region),this.mediaSetUrl=n?ep(n):"".concat(this.mediaUrl,"Set"),this.token=e,this.retryWhenThrottledOverride=null===(s=l.retryWhenThrottledOverride)||void 0===s||s,this.backoffConfigOverride=null!==(f=l.backoffConfigOverride)&&void 0!==f?f:t.backoffConfigDefault}return xn(t,[{key:"updateToken",value:function(t){this.token=t}}],[{key:"backoffConfigDefault",get:function(){return{min:1e3,max:4e3,maxAttemptsCount:3}}},{key:"retryWhenThrottledDefault",get:function(){return true}}]),t}(),np=function(){function t(e,r,n){bn(this,t),this.config=e,this.network=r,this._update(n)}return xn(t,[{key:"sid",get:function(){return this.state.sid}},{key:"serviceSid",get:function(){return this.state.serviceSid}},{key:"dateCreated",get:function(){return this.state.dateCreated}},{key:"dateUpdated",get:function(){return this.state.dateUpdated}},{key:"contentType",get:function(){return this.state.contentType}},{key:"size",get:function(){return this.state.size}},{key:"fileName",get:function(){return this.state.filename}},{key:"filename",get:function(){return this.state.filename}},{key:"category",get:function(){return this.state.category}},{key:"getContentUrl",value:function(){var t=this;return new Bs(function(){var e=$s(wf.mark((function e(r,n,o){var i,a;return wf.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.network.get("".concat(t.config.mediaUrl,"/").concat(t.sid)),o((function(){return i.cancel()})),e.prev=2,e.next=5,i;case 5:a=e.sent,t._update(a.body),r(t.state.contentDirectUrl),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(2),n(e.t0);case 13:case"end":return e.stop()}}),e,null,[[2,10]])})));return function(t,r,n){return e.apply(this,arguments)}}())}},{key:"_update",value:function(t){var e,r,n,o;this.state={sid:t.sid,serviceSid:t.service_sid,channelSid:t.channel_sid,messageSid:t.message_sid,dateCreated:t.date_created?new Date(t.date_created):null,dateUploadUpdated:t.date_upload_updated?new Date(t.date_upload_updated):null,dateUpdated:t.date_updated?new Date(t.date_updated):null,size:t.size,contentType:t.content_type,author:t.author,url:t.url,contentUrl:t.links.content,contentDirectUrl:null!==(e=t.links.content_direct_temporary)&&void 0!==e?e:null,filename:null!==(r=t.filename)&&void 0!==r?r:null,category:null!==(n=t.category)&&void 0!==n?n:"media",isMultipartUpstream:null!==(o=t.is_multipart_upstream)&&void 0!==o&&o}}},{key:"_state",value:function(){var t;return{sid:this.state.sid,category:this.state.category,filename:null!==(t=this.state.filename)&&void 0!==t?t:null,contentType:this.state.contentType,size:this.state.size}}}]),t}(),op=il.filter;Ar({target:"Array",proto:!0,forced:!Df("filter")},{filter:function(t){return op(this,t,arguments.length>1?arguments[1]:void 0)}});var ip=Nt,ap={},up=a,cp=o.RegExp;ap.UNSUPPORTED_Y=up((function(){var t=cp("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),ap.BROKEN_CARET=up((function(){var t=cp("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));var sp,fp,lp=a,pp=o.RegExp,hp=lp((function(){var t=pp(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),dp=a,vp=o.RegExp,yp=dp((function(){var t=vp("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),gp=Gc,mp=function(){var t=ip(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},bp=ap,wp=z.exports,xp=tn,kp=ke.get,Sp=hp,Ep=yp,Op=RegExp.prototype.exec,Ap=wp("native-string-replace",String.prototype.replace),jp=Op,Tp=(sp=/a/,fp=/b*/g,Op.call(sp,"a"),Op.call(fp,"a"),0!==sp.lastIndex||0!==fp.lastIndex),_p=bp.UNSUPPORTED_Y||bp.BROKEN_CARET,Lp=void 0!==/()??/.exec("")[1];(Tp||Lp||_p||Sp||Ep)&&(jp=function(t){var e,r,n,o,i,a,u,c=this,s=kp(c),f=gp(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=jp.call(l,f),c.lastIndex=l.lastIndex,e;var p=s.groups,h=_p&&c.sticky,d=mp.call(c),v=c.source,y=0,g=f;if(h&&(-1===(d=d.replace("y","")).indexOf("g")&&(d+="g"),g=f.slice(c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==f.charAt(c.lastIndex-1))&&(v="(?: "+v+")",g=" "+g,y++),r=new RegExp("^(?:"+v+")",d)),Lp&&(r=new RegExp("^"+v+"$(?!\\s)",d)),Tp&&(n=c.lastIndex),o=Op.call(h?r:c,g),h?o?(o.input=o.input.slice(y),o[0]=o[0].slice(y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Tp&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),Lp&&o&&o.length>1&&Ap.call(o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&p)for(o.groups=a=xp(null),i=0;i<p.length;i++)a[(u=p[i])[0]]=o[u[1]];return o});var Rp=jp;Ar({target:"RegExp",proto:!0,forced:/./.exec!==Rp},{exec:Rp});var Pp=Ht.exports,Ip=Rp,Cp=a,Dp=ht,Mp=Vt,Up=Dp("species"),Np=RegExp.prototype,Fp=function(t,e,r,n){var o=Dp(t),i=!Cp((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),a=i&&!Cp((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[Up]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return e=!0,null},r[o](""),!e}));if(!i||!a||r){var u=/./[o],c=e(o,""[t],(function(t,e,r,n,o){var a=e.exec;return a===Ip||a===Np.exec?i&&!o?{done:!0,value:u.call(e,r,n)}:{done:!0,value:t.call(r,e,n)}:{done:!1}}));Pp(String.prototype,t,c[0]),Pp(Np,o,c[1])}n&&Mp(Np[o],"sham",!0)},Bp=Jc.charAt,qp=function(t,e,r){return e+(r?Bp(t,e).length:1)},$p=y,zp=Rp,Gp=function(t,e){var r=t.exec;if("function"==typeof r){var n=r.call(t,e);if("object"!=typeof n)throw TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==$p(t))throw TypeError("RegExp#exec called on incompatible receiver");return zp.call(t,e)},Wp=Fp,Vp=$l,Hp=Nt,Yp=w,Jp=Bo,Kp=qp,Xp=Ue,Zp=Gc,Qp=Gp,th=Rp,eh=a,rh=ap.UNSUPPORTED_Y,nh=[].push,oh=Math.min,ih=4294967295,ah=!eh((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));Wp("split",(function(t,e,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var n=Zp(Yp(this)),o=void 0===r?ih:r>>>0;if(0===o)return[];if(void 0===t)return[n];if(!Vp(t))return e.call(n,t,o);for(var i,a,u,c=[],s=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,l=new RegExp(t.source,s+"g");(i=th.call(l,n))&&!((a=l.lastIndex)>f&&(c.push(n.slice(f,i.index)),i.length>1&&i.index<n.length&&nh.apply(c,i.slice(1)),u=i[0].length,f=a,c.length>=o));)l.lastIndex===i.index&&l.lastIndex++;return f===n.length?!u&&l.test("")||c.push(""):c.push(n.slice(f)),c.length>o?c.slice(0,o):c}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:e.call(this,t,r)}:e,[function(e,r){var o=Yp(this),i=null==e?void 0:e[t];return void 0!==i?i.call(e,o,r):n.call(Zp(o),e,r)},function(t,o){var i=Hp(this),a=Zp(t),u=r(n,i,a,o,n!==e);if(u.done)return u.value;var c=Jp(i,RegExp),s=i.unicode,f=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(rh?"g":"y"),l=new c(rh?"^(?:"+i.source+")":i,f),p=void 0===o?ih:o>>>0;if(0===p)return[];if(0===a.length)return null===Qp(l,a)?[a]:[];for(var h=0,d=0,v=[];d<a.length;){l.lastIndex=rh?0:d;var y,g=Qp(l,rh?a.slice(d):a);if(null===g||(y=oh(Xp(l.lastIndex+(rh?d:0)),a.length))===h)d=Kp(a,d,s);else{if(v.push(a.slice(h,d)),v.length===p)return v;for(var m=1;m<=g.length-1;m++)if(v.push(g[m]),v.length===p)return v;d=h=y}}return v.push(a.slice(h)),v}]}),!ah,rh);var uh=X,ch=Math.floor,sh="".replace,fh=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,lh=/\$([$&'`]|\d{1,2})/g,ph=Fp,hh=a,dh=Nt,vh=Ce,yh=Ue,gh=Gc,mh=w,bh=qp,wh=function(t,e,r,n,o,i){var a=r+t.length,u=n.length,c=lh;return void 0!==o&&(o=uh(o),c=fh),sh.call(i,c,(function(i,c){var s;switch(c.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(a);case"<":s=o[c.slice(1,-1)];break;default:var f=+c;if(0===f)return i;if(f>u){var l=ch(f/10);return 0===l?i:l<=u?void 0===n[l-1]?c.charAt(1):n[l-1]+c.charAt(1):i}s=n[f-1]}return void 0===s?"":s}))},xh=Gp,kh=ht("replace"),Sh=Math.max,Eh=Math.min,Oh="$0"==="a".replace(/./,"$0"),Ah=!!/./[kh]&&""===/./[kh]("a","$0"),jh=!hh((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}));ph("replace",(function(t,e,r){var n=Ah?"$":"$0";return[function(t,r){var n=mh(this),o=null==t?void 0:t[kh];return void 0!==o?o.call(t,n,r):e.call(gh(n),t,r)},function(t,o){var i=dh(this),a=gh(t);if("string"==typeof o&&-1===o.indexOf(n)&&-1===o.indexOf("$<")){var u=r(e,i,a,o);if(u.done)return u.value}var c="function"==typeof o;c||(o=gh(o));var s=i.global;if(s){var f=i.unicode;i.lastIndex=0}for(var l=[];;){var p=xh(i,a);if(null===p)break;if(l.push(p),!s)break;""===gh(p[0])&&(i.lastIndex=bh(a,yh(i.lastIndex),f))}for(var h,d="",v=0,y=0;y<l.length;y++){p=l[y];for(var g=gh(p[0]),m=Sh(Eh(vh(p.index),a.length),0),b=[],w=1;w<p.length;w++)b.push(void 0===(h=p[w])?h:String(h));var x=p.groups;if(c){var k=[g].concat(b,m,a);void 0!==x&&k.push(x);var S=gh(o.apply(void 0,k))}else S=wh(g,a,m,b,x,o);m>=v&&(d+=a.slice(v,m)+S,v=m+g.length)}return d+a.slice(v)}]}),!jh||!Oh||Ah);var Th=Ar,_h=S,Lh=[].join,Rh=b!=Object,Ph=cl("join",",");Th({target:"Array",proto:!0,forced:Rh||!Ph},{join:function(t){return Lh.call(_h(this),void 0===t?",":t)}});var Ih=Ar,Ch=E,Dh=kf,Mh=qe,Uh=Ue,Nh=S,Fh=Af,Bh=ht,qh=Df("slice"),$h=Bh("species"),zh=[].slice,Gh=Math.max;Ih({target:"Array",proto:!0,forced:!qh},{slice:function(t,e){var r,n,o,i=Nh(this),a=Uh(i.length),u=Mh(t,a),c=Mh(void 0===e?a:e,a);if(Dh(i)&&("function"!=typeof(r=i.constructor)||r!==Array&&!Dh(r.prototype)?Ch(r)&&null===(r=r[$h])&&(r=void 0):r=void 0,r===Array||void 0===r))return zh.call(i,u,c);for(n=new(void 0===r?Array:r)(Gh(c-u,0)),o=0;u<c;u++,o++)u in i&&Fh(n,o,i[u]);return n.length=o,n}});var Wh=Ar,Vh=a,Hh=j("JSON","stringify"),Yh=/[\uD800-\uDFFF]/g,Jh=/^[\uD800-\uDBFF]$/,Kh=/^[\uDC00-\uDFFF]$/,Xh=function(t,e,r){var n=r.charAt(e-1),o=r.charAt(e+1);return Jh.test(t)&&!Kh.test(o)||Kh.test(t)&&!Jh.test(n)?"\\u"+t.charCodeAt(0).toString(16):t},Zh=Vh((function(){return'"\\udf06\\ud834"'!==Hh("\udf06\ud834")||'"\\udead"'!==Hh("\udead")}));function Qh(t){var e=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(t){return!1}}();return function(){var r,n=An(t);if(e){var o=An(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return On(this,r)}}Hh&&Wh({target:"JSON",stat:!0,forced:Zh},{stringify:function(t,e,r){var n=Hh.apply(null,arguments);return"string"==typeof n?n.replace(Yh,Xh):n}});var td=function(t){Sn(r,t);var e=Qh(r);function r(t,n,o,i,a){var u;return bn(this,r),(u=e.call(this,t)).code=n,u.body=o,u.status=i,u.headers=a,u}return xn(r)}(_n(Error)),ed=e.XMLHttpRequest||{};var rd=function(){function t(){bn(this,t)}return xn(t,[{key:"get",value:function(e,r){return t.request("GET",e,r)}},{key:"post",value:function(e,r,n){return t.request("POST",e,r,n)}}],[{key:"request",value:function(t,e,r,n){return new Bs((function(o,i,a){var u=new ed,c=!1;for(var s in a((function(){u.abort(),c=!0})),u.open(t,e,!0),u.onreadystatechange=function(){if(4===u.readyState&&!c){var t,e=(t=u.getAllResponseHeaders())?t.split("\r\n").map((function(t){return t.split(": ")})).filter((function(t){return 2===t.length&&t[1].length>0})).reduce((function(t,e){return t[e[0]]=e[1],t}),{}):{},r=function(t){var e=t.getResponseHeader("Content-Type");if(!e||0!==e.indexOf("application/json")||0===t.responseText.length)return t.responseText;try{return JSON.parse(t.responseText)}catch(e){return t.responseText}}(u);if(200<=u.status&&u.status<300)o({status:u.status,headers:e,body:r});else{var n,a,s=null!==(n=u.statusText)&&void 0!==n?n:"NONE";if("string"==typeof r)if(r&&1===r.split("\n",2).length)a=r;else{var f,l=null===(f=r.replace(/<.*?>/g,"").split(/\r\n/g).filter((function(t){return t.length}))[0])||void 0===f?void 0:f.split(" ");a=(null==l?void 0:l.length)>2?null==l?void 0:l.slice(1).join(" "):""}else a=JSON.stringify(r);var p="".concat(u.status,": [").concat(s,"] ").concat(a);i(new td(p,u.status,r,s,e))}}},r)u.setRequestHeader(s,r[s]),"Content-Type"===s&&"application/json"===r[s]&&(n=JSON.stringify(n));u.send(n)}))}}]),t}(),nd=u,od=a,id=Ur,ad=er,ud=c,cd=X,sd=b,fd=Object.assign,ld=Object.defineProperty,pd=!fd||od((function(){if(nd&&1!==fd({b:1},fd(ld({},"a",{enumerable:!0,get:function(){ld(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach((function(t){e[t]=t})),7!=fd({},t)[r]||id(fd({},e)).join("")!=n}))?function(t,e){for(var r=cd(t),n=arguments.length,o=1,i=ad.f,a=ud.f;n>o;)for(var u,c=sd(arguments[o++]),s=i?id(c).concat(i(c)):id(c),f=s.length,l=0;f>l;)u=s[l++],nd&&!a.call(c,u)||(r[u]=c[u]);return r}:fd,hd=pd;Ar({target:"Object",stat:!0,forced:Object.assign!==hd},{assign:hd});var dd=a,vd=ht("iterator"),yd=!dd((function(){var t=new URL("b?a=1&b=2&c=3","http://a"),e=t.searchParams,r="";return t.pathname="c%20d",e.forEach((function(t,n){e.delete("b"),r+=n+t})),!e.sort||"http://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[vd]||"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"!==r||"x"!==new URL("http://x",void 0).host})),gd=2147483647,md=/[^\0-\u007E]/,bd=/[.\u3002\uFF0E\uFF61]/g,wd="Overflow: input needs wider integers to process",xd=Math.floor,kd=String.fromCharCode,Sd=function(t){return t+22+75*(t<26)},Ed=function(t,e,r){var n=0;for(t=r?xd(t/700):t>>1,t+=xd(t/e);t>455;n+=36)t=xd(t/35);return xd(n+36*t/(t+38))},Od=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r<n;){var o=t.charCodeAt(r++);if(o>=55296&&o<=56319&&r<n){var i=t.charCodeAt(r++);56320==(64512&i)?e.push(((1023&o)<<10)+(1023&i)+65536):(e.push(o),r--)}else e.push(o)}return e}(t);var r,n,o=t.length,i=128,a=0,u=72;for(r=0;r<t.length;r++)(n=t[r])<128&&e.push(kd(n));var c=e.length,s=c;for(c&&e.push("-");s<o;){var f=gd;for(r=0;r<t.length;r++)(n=t[r])>=i&&n<f&&(f=n);var l=s+1;if(f-i>xd((gd-a)/l))throw RangeError(wd);for(a+=(f-i)*l,i=f,r=0;r<t.length;r++){if((n=t[r])<i&&++a>gd)throw RangeError(wd);if(n==i){for(var p=a,h=36;;h+=36){var d=h<=u?1:h>=u+26?26:h-u;if(p<d)break;var v=p-d,y=36-d;e.push(kd(Sd(d+v%y))),p=xd(v/y)}e.push(kd(Sd(p))),u=Ed(a,l,s==c),a=0,++s}}++a,++i}return e.join("")},Ad=Ar,jd=j,Td=yd,_d=Ht.exports,Ld=Wn,Rd=Lr,Pd=xu,Id=ke,Cd=eo,Dd=tt,Md=co,Ud=Un,Nd=Nt,Fd=E,Bd=Gc,qd=tn,$d=d,zd=yo,Gd=po,Wd=ht,Vd=jd("fetch"),Hd=jd("Request"),Yd=Hd&&Hd.prototype,Jd=jd("Headers"),Kd=Wd("iterator"),Xd="URLSearchParams",Zd="URLSearchParamsIterator",Qd=Id.set,tv=Id.getterFor(Xd),ev=Id.getterFor(Zd),rv=/\+/g,nv=Array(4),ov=function(t){return nv[t-1]||(nv[t-1]=RegExp("((?:%[\\da-f]{2}){"+t+"})","gi"))},iv=function(t){try{return decodeURIComponent(t)}catch(e){return t}},av=function(t){var e=t.replace(rv," "),r=4;try{return decodeURIComponent(e)}catch(t){for(;r;)e=e.replace(ov(r--),iv);return e}},uv=/[!'()~]|%20/g,cv={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},sv=function(t){return cv[t]},fv=function(t){return encodeURIComponent(t).replace(uv,sv)},lv=function(t,e){if(e)for(var r,n,o=e.split("&"),i=0;i<o.length;)(r=o[i++]).length&&(n=r.split("="),t.push({key:av(n.shift()),value:av(n.join("="))}))},pv=function(t){this.entries.length=0,lv(this.entries,t)},hv=function(t,e){if(t<e)throw TypeError("Not enough arguments")},dv=Pd((function(t,e){Qd(this,{type:Zd,iterator:zd(tv(t).entries),kind:e})}),"Iterator",(function(){var t=ev(this),e=t.kind,r=t.iterator.next(),n=r.value;return r.done||(r.value="keys"===e?n.key:"values"===e?n.value:[n.key,n.value]),r})),vv=function(){Cd(this,vv,Xd);var t,e,r,n,o,i,a,u,c,s=arguments.length>0?arguments[0]:void 0,f=this,l=[];if(Qd(f,{type:Xd,entries:l,updateURL:function(){},updateSearchParams:pv}),void 0!==s)if(Fd(s))if("function"==typeof(t=Gd(s)))for(r=(e=zd(s,t)).next;!(n=r.call(e)).done;){if((a=(i=(o=zd(Nd(n.value))).next).call(o)).done||(u=i.call(o)).done||!i.call(o).done)throw TypeError("Expected sequence with length 2");l.push({key:Bd(a.value),value:Bd(u.value)})}else for(c in s)Dd(s,c)&&l.push({key:c,value:Bd(s[c])});else lv(l,"string"==typeof s?"?"===s.charAt(0)?s.slice(1):s:Bd(s))},yv=vv.prototype;if(Ld(yv,{append:function(t,e){hv(arguments.length,2);var r=tv(this);r.entries.push({key:Bd(t),value:Bd(e)}),r.updateURL()},delete:function(t){hv(arguments.length,1);for(var e=tv(this),r=e.entries,n=Bd(t),o=0;o<r.length;)r[o].key===n?r.splice(o,1):o++;e.updateURL()},get:function(t){hv(arguments.length,1);for(var e=tv(this).entries,r=Bd(t),n=0;n<e.length;n++)if(e[n].key===r)return e[n].value;return null},getAll:function(t){hv(arguments.length,1);for(var e=tv(this).entries,r=Bd(t),n=[],o=0;o<e.length;o++)e[o].key===r&&n.push(e[o].value);return n},has:function(t){hv(arguments.length,1);for(var e=tv(this).entries,r=Bd(t),n=0;n<e.length;)if(e[n++].key===r)return!0;return!1},set:function(t,e){hv(arguments.length,1);for(var r,n=tv(this),o=n.entries,i=!1,a=Bd(t),u=Bd(e),c=0;c<o.length;c++)(r=o[c]).key===a&&(i?o.splice(c--,1):(i=!0,r.value=u));i||o.push({key:a,value:u}),n.updateURL()},sort:function(){var t,e,r,n=tv(this),o=n.entries,i=o.slice();for(o.length=0,r=0;r<i.length;r++){for(t=i[r],e=0;e<r;e++)if(o[e].key>t.key){o.splice(e,0,t);break}e===r&&o.push(t)}n.updateURL()},forEach:function(t){for(var e,r=tv(this).entries,n=Md(t,arguments.length>1?arguments[1]:void 0,3),o=0;o<r.length;)n((e=r[o++]).value,e.key,this)},keys:function(){return new dv(this,"keys")},values:function(){return new dv(this,"values")},entries:function(){return new dv(this,"entries")}},{enumerable:!0}),_d(yv,Kd,yv.entries),_d(yv,"toString",(function(){for(var t,e=tv(this).entries,r=[],n=0;n<e.length;)t=e[n++],r.push(fv(t.key)+"="+fv(t.value));return r.join("&")}),{enumerable:!0}),Rd(vv,Xd),Ad({global:!0,forced:!Td},{URLSearchParams:vv}),!Td&&"function"==typeof Jd){var gv=function(t){if(Fd(t)){var e,r=t.body;if(Ud(r)===Xd)return(e=t.headers?new Jd(t.headers):new Jd).has("content-type")||e.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),qd(t,{body:$d(0,String(r)),headers:$d(0,e)})}return t};if("function"==typeof Vd&&Ad({global:!0,enumerable:!0,forced:!0},{fetch:function(t){return Vd(t,arguments.length>1?gv(arguments[1]):{})}}),"function"==typeof Hd){var mv=function(t){return Cd(this,mv,"Request"),new Hd(t,arguments.length>1?gv(arguments[1]):{})};Yd.constructor=mv,mv.prototype=Yd,Ad({global:!0,forced:!0},{Request:mv})}}var bv,wv={URLSearchParams:vv,getState:tv},xv=Ar,kv=u,Sv=yd,Ev=o,Ov=qr,Av=Ht.exports,jv=eo,Tv=tt,_v=pd,Lv=Ll,Rv=Jc.codeAt,Pv=function(t){var e,r,n=[],o=t.toLowerCase().replace(bd,".").split(".");for(e=0;e<o.length;e++)r=o[e],n.push(md.test(r)?"xn--"+Od(r):r);return n.join(".")},Iv=Gc,Cv=Lr,Dv=wv,Mv=ke,Uv=Ev.URL,Nv=Dv.URLSearchParams,Fv=Dv.getState,Bv=Mv.set,qv=Mv.getterFor("URL"),$v=Math.floor,zv=Math.pow,Gv="Invalid scheme",Wv="Invalid host",Vv="Invalid port",Hv=/[A-Za-z]/,Yv=/[\d+-.A-Za-z]/,Jv=/\d/,Kv=/^0x/i,Xv=/^[0-7]+$/,Zv=/^\d+$/,Qv=/^[\dA-Fa-f]+$/,ty=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ey=/[\0\t\n\r #/:<>?@[\\\]^|]/,ry=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,ny=/[\t\n\r]/g,oy=function(t,e){var r,n,o;if("["==e.charAt(0)){if("]"!=e.charAt(e.length-1))return Wv;if(!(r=ay(e.slice(1,-1))))return Wv;t.host=r}else if(dy(t)){if(e=Pv(e),ty.test(e))return Wv;if(null===(r=iy(e)))return Wv;t.host=r}else{if(ey.test(e))return Wv;for(r="",n=Lv(e),o=0;o<n.length;o++)r+=py(n[o],cy);t.host=r}},iy=function(t){var e,r,n,o,i,a,u,c=t.split(".");if(c.length&&""==c[c.length-1]&&c.pop(),(e=c.length)>4)return t;for(r=[],n=0;n<e;n++){if(""==(o=c[n]))return t;if(i=10,o.length>1&&"0"==o.charAt(0)&&(i=Kv.test(o)?16:8,o=o.slice(8==i?1:2)),""===o)a=0;else{if(!(10==i?Zv:8==i?Xv:Qv).test(o))return t;a=parseInt(o,i)}r.push(a)}for(n=0;n<e;n++)if(a=r[n],n==e-1){if(a>=zv(256,5-e))return null}else if(a>255)return null;for(u=r.pop(),n=0;n<r.length;n++)u+=r[n]*zv(256,3-n);return u},ay=function(t){var e,r,n,o,i,a,u,c=[0,0,0,0,0,0,0,0],s=0,f=null,l=0,p=function(){return t.charAt(l)};if(":"==p()){if(":"!=t.charAt(1))return;l+=2,f=++s}for(;p();){if(8==s)return;if(":"!=p()){for(e=r=0;r<4&&Qv.test(p());)e=16*e+parseInt(p(),16),l++,r++;if("."==p()){if(0==r)return;if(l-=r,s>6)return;for(n=0;p();){if(o=null,n>0){if(!("."==p()&&n<4))return;l++}if(!Jv.test(p()))return;for(;Jv.test(p());){if(i=parseInt(p(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}c[s]=256*c[s]+o,2!=++n&&4!=n||s++}if(4!=n)return;break}if(":"==p()){if(l++,!p())return}else if(p())return;c[s++]=e}else{if(null!==f)return;l++,f=++s}}if(null!==f)for(a=s-f,s=7;0!=s&&a>0;)u=c[s],c[s--]=c[f+a-1],c[f+--a]=u;else if(8!=s)return;return c},uy=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)e.unshift(t%256),t=$v(t/256);return e.join(".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(e=n,r=o),e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=t[r].toString(16),r<7&&(e+=":")));return"["+e+"]"}return t},cy={},sy=_v({},cy,{" ":1,'"':1,"<":1,">":1,"`":1}),fy=_v({},sy,{"#":1,"?":1,"{":1,"}":1}),ly=_v({},fy,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),py=function(t,e){var r=Rv(t,0);return r>32&&r<127&&!Tv(e,t)?t:encodeURIComponent(t)},hy={ftp:21,file:null,http:80,https:443,ws:80,wss:443},dy=function(t){return Tv(hy,t.scheme)},vy=function(t){return""!=t.username||""!=t.password},yy=function(t){return!t.host||t.cannotBeABaseURL||"file"==t.scheme},gy=function(t,e){var r;return 2==t.length&&Hv.test(t.charAt(0))&&(":"==(r=t.charAt(1))||!e&&"|"==r)},my=function(t){var e;return t.length>1&&gy(t.slice(0,2))&&(2==t.length||"/"===(e=t.charAt(2))||"\\"===e||"?"===e||"#"===e)},by=function(t){var e=t.path,r=e.length;!r||"file"==t.scheme&&1==r&&gy(e[0],!0)||e.pop()},wy=function(t){return"."===t||"%2e"===t.toLowerCase()},xy={},ky={},Sy={},Ey={},Oy={},Ay={},jy={},Ty={},_y={},Ly={},Ry={},Py={},Iy={},Cy={},Dy={},My={},Uy={},Ny={},Fy={},By={},qy={},$y=function(t,e,r,n){var o,i,a,u,c,s=r||xy,f=0,l="",p=!1,h=!1,d=!1;for(r||(t.scheme="",t.username="",t.password="",t.host=null,t.port=null,t.path=[],t.query=null,t.fragment=null,t.cannotBeABaseURL=!1,e=e.replace(ry,"")),e=e.replace(ny,""),o=Lv(e);f<=o.length;){switch(i=o[f],s){case xy:if(!i||!Hv.test(i)){if(r)return Gv;s=Sy;continue}l+=i.toLowerCase(),s=ky;break;case ky:if(i&&(Yv.test(i)||"+"==i||"-"==i||"."==i))l+=i.toLowerCase();else{if(":"!=i){if(r)return Gv;l="",s=Sy,f=0;continue}if(r&&(dy(t)!=Tv(hy,l)||"file"==l&&(vy(t)||null!==t.port)||"file"==t.scheme&&!t.host))return;if(t.scheme=l,r)return void(dy(t)&&hy[t.scheme]==t.port&&(t.port=null));l="","file"==t.scheme?s=Cy:dy(t)&&n&&n.scheme==t.scheme?s=Ey:dy(t)?s=Ty:"/"==o[f+1]?(s=Oy,f++):(t.cannotBeABaseURL=!0,t.path.push(""),s=Fy)}break;case Sy:if(!n||n.cannotBeABaseURL&&"#"!=i)return Gv;if(n.cannotBeABaseURL&&"#"==i){t.scheme=n.scheme,t.path=n.path.slice(),t.query=n.query,t.fragment="",t.cannotBeABaseURL=!0,s=qy;break}s="file"==n.scheme?Cy:Ay;continue;case Ey:if("/"!=i||"/"!=o[f+1]){s=Ay;continue}s=_y,f++;break;case Oy:if("/"==i){s=Ly;break}s=Ny;continue;case Ay:if(t.scheme=n.scheme,i==bv)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query;else if("/"==i||"\\"==i&&dy(t))s=jy;else if("?"==i)t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query="",s=By;else{if("#"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.path.pop(),s=Ny;continue}t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=qy}break;case jy:if(!dy(t)||"/"!=i&&"\\"!=i){if("/"!=i){t.username=n.username,t.password=n.password,t.host=n.host,t.port=n.port,s=Ny;continue}s=Ly}else s=_y;break;case Ty:if(s=_y,"/"!=i||"/"!=l.charAt(f+1))continue;f++;break;case _y:if("/"!=i&&"\\"!=i){s=Ly;continue}break;case Ly:if("@"==i){p&&(l="%40"+l),p=!0,a=Lv(l);for(var v=0;v<a.length;v++){var y=a[v];if(":"!=y||d){var g=py(y,ly);d?t.password+=g:t.username+=g}else d=!0}l=""}else if(i==bv||"/"==i||"?"==i||"#"==i||"\\"==i&&dy(t)){if(p&&""==l)return"Invalid authority";f-=Lv(l).length+1,l="",s=Ry}else l+=i;break;case Ry:case Py:if(r&&"file"==t.scheme){s=My;continue}if(":"!=i||h){if(i==bv||"/"==i||"?"==i||"#"==i||"\\"==i&&dy(t)){if(dy(t)&&""==l)return Wv;if(r&&""==l&&(vy(t)||null!==t.port))return;if(u=oy(t,l))return u;if(l="",s=Uy,r)return;continue}"["==i?h=!0:"]"==i&&(h=!1),l+=i}else{if(""==l)return Wv;if(u=oy(t,l))return u;if(l="",s=Iy,r==Py)return}break;case Iy:if(!Jv.test(i)){if(i==bv||"/"==i||"?"==i||"#"==i||"\\"==i&&dy(t)||r){if(""!=l){var m=parseInt(l,10);if(m>65535)return Vv;t.port=dy(t)&&m===hy[t.scheme]?null:m,l=""}if(r)return;s=Uy;continue}return Vv}l+=i;break;case Cy:if(t.scheme="file","/"==i||"\\"==i)s=Dy;else{if(!n||"file"!=n.scheme){s=Ny;continue}if(i==bv)t.host=n.host,t.path=n.path.slice(),t.query=n.query;else if("?"==i)t.host=n.host,t.path=n.path.slice(),t.query="",s=By;else{if("#"!=i){my(o.slice(f).join(""))||(t.host=n.host,t.path=n.path.slice(),by(t)),s=Ny;continue}t.host=n.host,t.path=n.path.slice(),t.query=n.query,t.fragment="",s=qy}}break;case Dy:if("/"==i||"\\"==i){s=My;break}n&&"file"==n.scheme&&!my(o.slice(f).join(""))&&(gy(n.path[0],!0)?t.path.push(n.path[0]):t.host=n.host),s=Ny;continue;case My:if(i==bv||"/"==i||"\\"==i||"?"==i||"#"==i){if(!r&&gy(l))s=Ny;else if(""==l){if(t.host="",r)return;s=Uy}else{if(u=oy(t,l))return u;if("localhost"==t.host&&(t.host=""),r)return;l="",s=Uy}continue}l+=i;break;case Uy:if(dy(t)){if(s=Ny,"/"!=i&&"\\"!=i)continue}else if(r||"?"!=i)if(r||"#"!=i){if(i!=bv&&(s=Ny,"/"!=i))continue}else t.fragment="",s=qy;else t.query="",s=By;break;case Ny:if(i==bv||"/"==i||"\\"==i&&dy(t)||!r&&("?"==i||"#"==i)){if(".."===(c=(c=l).toLowerCase())||"%2e."===c||".%2e"===c||"%2e%2e"===c?(by(t),"/"==i||"\\"==i&&dy(t)||t.path.push("")):wy(l)?"/"==i||"\\"==i&&dy(t)||t.path.push(""):("file"==t.scheme&&!t.path.length&&gy(l)&&(t.host&&(t.host=""),l=l.charAt(0)+":"),t.path.push(l)),l="","file"==t.scheme&&(i==bv||"?"==i||"#"==i))for(;t.path.length>1&&""===t.path[0];)t.path.shift();"?"==i?(t.query="",s=By):"#"==i&&(t.fragment="",s=qy)}else l+=py(i,fy);break;case Fy:"?"==i?(t.query="",s=By):"#"==i?(t.fragment="",s=qy):i!=bv&&(t.path[0]+=py(i,cy));break;case By:r||"#"!=i?i!=bv&&("'"==i&&dy(t)?t.query+="%27":t.query+="#"==i?"%23":py(i,cy)):(t.fragment="",s=qy);break;case qy:i!=bv&&(t.fragment+=py(i,sy))}f++}},zy=function(t){var e,r,n=jv(this,zy,"URL"),o=arguments.length>1?arguments[1]:void 0,i=Iv(t),a=Bv(n,{type:"URL"});if(void 0!==o)if(o instanceof zy)e=qv(o);else if(r=$y(e={},Iv(o)))throw TypeError(r);if(r=$y(a,i,null,e))throw TypeError(r);var u=a.searchParams=new Nv,c=Fv(u);c.updateSearchParams(a.query),c.updateURL=function(){a.query=String(u)||null},kv||(n.href=Wy.call(n),n.origin=Vy.call(n),n.protocol=Hy.call(n),n.username=Yy.call(n),n.password=Jy.call(n),n.host=Ky.call(n),n.hostname=Xy.call(n),n.port=Zy.call(n),n.pathname=Qy.call(n),n.search=tg.call(n),n.searchParams=eg.call(n),n.hash=rg.call(n))},Gy=zy.prototype,Wy=function(){var t=qv(this),e=t.scheme,r=t.username,n=t.password,o=t.host,i=t.port,a=t.path,u=t.query,c=t.fragment,s=e+":";return null!==o?(s+="//",vy(t)&&(s+=r+(n?":"+n:"")+"@"),s+=uy(o),null!==i&&(s+=":"+i)):"file"==e&&(s+="//"),s+=t.cannotBeABaseURL?a[0]:a.length?"/"+a.join("/"):"",null!==u&&(s+="?"+u),null!==c&&(s+="#"+c),s},Vy=function(){var t=qv(this),e=t.scheme,r=t.port;if("blob"==e)try{return new zy(e.path[0]).origin}catch(t){return"null"}return"file"!=e&&dy(t)?e+"://"+uy(t.host)+(null!==r?":"+r:""):"null"},Hy=function(){return qv(this).scheme+":"},Yy=function(){return qv(this).username},Jy=function(){return qv(this).password},Ky=function(){var t=qv(this),e=t.host,r=t.port;return null===e?"":null===r?uy(e):uy(e)+":"+r},Xy=function(){var t=qv(this).host;return null===t?"":uy(t)},Zy=function(){var t=qv(this).port;return null===t?"":String(t)},Qy=function(){var t=qv(this),e=t.path;return t.cannotBeABaseURL?e[0]:e.length?"/"+e.join("/"):""},tg=function(){var t=qv(this).query;return t?"?"+t:""},eg=function(){return qv(this).searchParams},rg=function(){var t=qv(this).fragment;return t?"#"+t:""},ng=function(t,e){return{get:t,set:e,configurable:!0,enumerable:!0}};if(kv&&Ov(Gy,{href:ng(Wy,(function(t){var e=qv(this),r=Iv(t),n=$y(e,r);if(n)throw TypeError(n);Fv(e.searchParams).updateSearchParams(e.query)})),origin:ng(Vy),protocol:ng(Hy,(function(t){var e=qv(this);$y(e,Iv(t)+":",xy)})),username:ng(Yy,(function(t){var e=qv(this),r=Lv(Iv(t));if(!yy(e)){e.username="";for(var n=0;n<r.length;n++)e.username+=py(r[n],ly)}})),password:ng(Jy,(function(t){var e=qv(this),r=Lv(Iv(t));if(!yy(e)){e.password="";for(var n=0;n<r.length;n++)e.password+=py(r[n],ly)}})),host:ng(Ky,(function(t){var e=qv(this);e.cannotBeABaseURL||$y(e,Iv(t),Ry)})),hostname:ng(Xy,(function(t){var e=qv(this);e.cannotBeABaseURL||$y(e,Iv(t),Py)})),port:ng(Zy,(function(t){var e=qv(this);yy(e)||(""==(t=Iv(t))?e.port=null:$y(e,t,Iy))})),pathname:ng(Qy,(function(t){var e=qv(this);e.cannotBeABaseURL||(e.path=[],$y(e,Iv(t),Uy))})),search:ng(tg,(function(t){var e=qv(this);""==(t=Iv(t))?e.query=null:("?"==t.charAt(0)&&(t=t.slice(1)),e.query="",$y(e,t,By)),Fv(e.searchParams).updateSearchParams(e.query)})),searchParams:ng(eg),hash:ng(rg,(function(t){var e=qv(this);""!=(t=Iv(t))?("#"==t.charAt(0)&&(t=t.slice(1)),e.fragment="",$y(e,t,qy)):e.fragment=null}))}),Av(Gy,"toJSON",(function(){return Wy.call(this)}),{enumerable:!0}),Av(Gy,"toString",(function(){return Wy.call(this)}),{enumerable:!0}),Uv){var og=Uv.createObjectURL,ig=Uv.revokeObjectURL;og&&Av(zy,"createObjectURL",(function(t){return og.apply(Uv,arguments)})),ig&&Av(zy,"revokeObjectURL",(function(t){return ig.apply(Uv,arguments)}))}Cv(zy,"URL"),xv({global:!0,forced:!Sv,sham:!kv},{URL:zy});var ag={},ug={exports:{}};!function(t){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports}(ug);var cg={exports:{}};!function(t){function e(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}(cg);var sg={exports:{}};!function(t){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t},t.exports.__esModule=!0,t.exports.default=t.exports}(sg);var fg={exports:{}},lg={exports:{}};!function(t){function e(r,n){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r,n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(lg),function(t){var e=lg.exports;t.exports=function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&e(t,r)},t.exports.__esModule=!0,t.exports.default=t.exports}(fg);var pg={exports:{}},hg={exports:{}};!function(t){function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(hg),function(t){var e=hg.exports.default,r=sg.exports;t.exports=function(t,n){if(n&&("object"===e(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return r(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(pg);var dg={exports:{}};!function(t){function e(r){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports}(dg);var vg={exports:{}};!function(t){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports}(vg),Object.defineProperty(ag,"__esModule",{value:!0});var yg=cg.exports,gg=sg.exports,mg=fg.exports,bg=pg.exports,wg=dg.exports,xg=vg.exports;function kg(t){return t&&"object"===En(t)&&"default"in t?t:{default:t}}var Sg=kg(ug.exports),Eg=kg(yg),Og=kg(gg),Ag=kg(mg),jg=kg(bg),Tg=kg(wg),_g=kg(xg);function Lg(){}function Rg(){Rg.init.call(this)}function Pg(t){return void 0===t._maxListeners?Rg.defaultMaxListeners:t._maxListeners}function Ig(t,e,r){if(e)t.call(r);else for(var n=t.length,o=qg(t,n),i=0;i<n;++i)o[i].call(r)}function Cg(t,e,r,n){if(e)t.call(r,n);else for(var o=t.length,i=qg(t,o),a=0;a<o;++a)i[a].call(r,n)}function Dg(t,e,r,n,o){if(e)t.call(r,n,o);else for(var i=t.length,a=qg(t,i),u=0;u<i;++u)a[u].call(r,n,o)}function Mg(t,e,r,n,o,i){if(e)t.call(r,n,o,i);else for(var a=t.length,u=qg(t,a),c=0;c<a;++c)u[c].call(r,n,o,i)}function Ug(t,e,r,n){if(e)t.apply(r,n);else for(var o=t.length,i=qg(t,o),a=0;a<o;++a)i[a].apply(r,n)}function Ng(t,e,r,n){var o,i,a,u;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=t._events)?(i.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),i=t._events),a=i[e]):(i=t._events=new Lg,t._eventsCount=0),a){if("function"==typeof a?a=i[e]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(o=Pg(t))&&o>0&&a.length>o){a.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=a.length,u=c,"function"==typeof console.warn?console.warn(u):console.log(u)}}else a=i[e]=r,++t._eventsCount;return t}function Fg(t,e,r){var n=!1;function o(){t.removeListener(e,o),n||(n=!0,r.apply(t,arguments))}return o.listener=r,o}function Bg(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function qg(t,e){for(var r=new Array(e);e--;)r[e]=t[e];return r}function $g(t){var e=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(t){return!1}}();return function(){var r,n=Tg.default(t);if(e){var o=Tg.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jg.default(this,r)}}Lg.prototype=Object.create(null),Rg.EventEmitter=Rg,Rg.usingDomains=!1,Rg.prototype.domain=void 0,Rg.prototype._events=void 0,Rg.prototype._maxListeners=void 0,Rg.defaultMaxListeners=10,Rg.init=function(){this.domain=null,Rg.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Lg,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Rg.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Rg.prototype.getMaxListeners=function(){return Pg(this)},Rg.prototype.emit=function(t){var e,r,n,o,i,a,u,c="error"===t;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(u=this.domain,c){if(e=arguments[1],!u){if(e instanceof Error)throw e;var s=new Error('Uncaught, unspecified "error" event. ('+e+")");throw s.context=e,s}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=u,e.domainThrown=!1,u.emit("error",e),!1}if(!(r=a[t]))return!1;var f="function"==typeof r;switch(n=arguments.length){case 1:Ig(r,f,this);break;case 2:Cg(r,f,this,arguments[1]);break;case 3:Dg(r,f,this,arguments[1],arguments[2]);break;case 4:Mg(r,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(n-1),i=1;i<n;i++)o[i-1]=arguments[i];Ug(r,f,this,o)}return!0},Rg.prototype.addListener=function(t,e){return Ng(this,t,e,!1)},Rg.prototype.on=Rg.prototype.addListener,Rg.prototype.prependListener=function(t,e){return Ng(this,t,e,!0)},Rg.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,Fg(this,t,e)),this},Rg.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,Fg(this,t,e)),this},Rg.prototype.removeListener=function(t,e){var r,n,o,i,a;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[t]))return this;if(r===e||r.listener&&r.listener===e)0==--this._eventsCount?this._events=new Lg:(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(o=-1,i=r.length;i-- >0;)if(r[i]===e||r[i].listener&&r[i].listener===e){a=r[i].listener,o=i;break}if(o<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new Lg,this;delete n[t]}else!function(t,e){for(var r=e,n=r+1,o=t.length;n<o;r+=1,n+=1)t[r]=t[n];t.pop()}(r,o);n.removeListener&&this.emit("removeListener",t,a||e)}return this},Rg.prototype.off=function(t,e){return this.removeListener(t,e)},Rg.prototype.removeAllListeners=function(t){var e,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new Lg,this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=new Lg:delete r[t]),this;if(0===arguments.length){for(var n,o=Object.keys(r),i=0;i<o.length;++i)"removeListener"!==(n=o[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new Lg,this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)do{this.removeListener(t,e[e.length-1])}while(e[0]);return this},Rg.prototype.listeners=function(t){var e,r,n=this._events;return r=n&&(e=n[t])?"function"==typeof e?[e.listener||e]:function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(e):[],r},Rg.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):Bg.call(t,e)},Rg.prototype.listenerCount=Bg,Rg.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var zg=function(t){Ag.default(r,t);var e=$g(r);function r(t){var n;return Sg.default(this,r),n=e.call(this),_g.default(Og.default(n),"timeout",null),_g.default(Og.default(n),"startTimestamp",-1),n.minDelay=t.min,n.maxDelay=t.max,n.initialDelay=t.initial||0,n.maxAttemptsCount=t.maxAttemptsCount||0,n.maxAttemptsTime=t.maxAttemptsTime||0,n.randomness=t.randomness||0,n.inProgress=!1,n.attemptNum=0,n.prevDelay=0,n.currDelay=0,n}return Eg.default(r,[{key:"attempt",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.attemptNum++,this.emit("attempt",this)}},{key:"nextDelay",value:function(t){if("number"==typeof t)return this.prevDelay=0,this.currDelay=t,t;if(0==this.attemptNum)return this.initialDelay;if(1==this.attemptNum)return this.currDelay=this.minDelay,this.currDelay;this.prevDelay=this.currDelay;var e=this.currDelay+this.prevDelay;return this.maxDelay&&e>this.maxDelay&&(this.currDelay=this.maxDelay,e=this.maxDelay),this.currDelay=e,e}},{key:"randomize",value:function(t){var e=t*this.randomness,r=Math.round(Math.random()*e*2-e);return Math.max(0,t+r)}},{key:"scheduleAttempt",value:function(t){var e=this;if(this.maxAttemptsCount&&this.attemptNum>=this.maxAttemptsCount)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt count limit reached"));var r=this.nextDelay(t);if(r=this.randomize(r),this.maxAttemptsTime&&this.startTimestamp+this.maxAttemptsTime<Date.now()+r)return this.cleanup(),void this.emit("failed",new Error("Maximum attempt time limit reached"));this.timeout=setTimeout((function(){return e.attempt()}),r)}},{key:"cleanup",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.inProgress=!1,this.attemptNum=0,this.prevDelay=0,this.currDelay=0}},{key:"start",value:function(){if(this.inProgress)throw new Error("Retrier is already in progress");this.inProgress=!0,this.startTimestamp=Date.now(),this.scheduleAttempt(this.initialDelay)}},{key:"cancel",value:function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null,this.inProgress=!1,this.emit("cancelled"))}},{key:"succeeded",value:function(t){this.emit("succeeded",t)}},{key:"failed",value:function(t,e){if(this.timeout)throw new Error("Retrier attempt is already in progress");this.scheduleAttempt(e)}}]),r}(Rg),Gg=function(t){Ag.default(r,t);var e=$g(r);function r(t){var n;return Sg.default(this,r),n=e.call(this),_g.default(Og.default(n),"resolve",(function(){})),_g.default(Og.default(n),"reject",(function(){})),n.retrier=new zg(t),n}return Eg.default(r,[{key:"run",value:function(t){var e=this;return this.retrier.on("attempt",(function(){t().then((function(t){return e.retrier.succeeded(t)})).catch((function(t){return e.retrier.failed(t)}))})),this.retrier.on("succeeded",(function(t){return e.resolve(t)})),this.retrier.on("cancelled",(function(){return e.reject(new Error("Cancelled"))})),this.retrier.on("failed",(function(t){return e.reject(t)})),new Promise((function(t,r){e.resolve=t,e.reject=r,e.retrier.start()}))}},{key:"cancel",value:function(){this.retrier.cancel()}}]),r}(Rg);function Wg(t){var e=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(t){return!1}}();return function(){var r,n=Tg.default(t);if(e){var o=Tg.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jg.default(this,r)}}function Vg(t){return null!=t}var Hg=function(t){Ag.default(r,t);var e=Wg(r);function r(t){var n;Sg.default(this,r),n=e.call(this),_g.default(Og.default(n),"backoffDelay",0),_g.default(Og.default(n),"nextBackoffDelay",0),_g.default(Og.default(n),"backoffNumber",0),_g.default(Og.default(n),"timeoutID",null),_g.default(Og.default(n),"maxNumberOfRetry",-1);var o=t=t||{},i=o.initialDelay,a=o.maxDelay,u=o.randomisationFactor,c=o.factor;if(Vg(i)&&i<1)throw new Error("The initial timeout must be equal to or greater than 1.");if(Vg(a)&&a<=1)throw new Error("The maximal timeout must be greater than 1.");if(Vg(u)&&(u<0||u>1))throw new Error("The randomisation factor must be between 0 and 1.");if(Vg(c)&&c<=1)throw new Error("Exponential factor should be greater than 1.");if(n.initialDelay=i||100,n.maxDelay=a||1e4,n.maxDelay<=n.initialDelay)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");return n.randomisationFactor=u||0,n.factor=c||2,n.reset(),n}return Eg.default(r,[{key:"backoff",value:function(t){null==this.timeoutID&&(this.backoffNumber===this.maxNumberOfRetry?(this.emit("fail",t),this.reset()):(this.backoffDelay=this.next(),this.timeoutID=setTimeout(this.onBackoff.bind(this),this.backoffDelay),this.emit("backoff",this.backoffNumber,this.backoffDelay,t)))}},{key:"reset",value:function(){this.backoffDelay=0,this.nextBackoffDelay=this.initialDelay,this.backoffNumber=0,this.timeoutID&&clearTimeout(this.timeoutID),this.timeoutID=null}},{key:"failAfter",value:function(t){if(t<=0)throw new Error("Expected a maximum number of retry greater than 0 but got ".concat(t));this.maxNumberOfRetry=t}},{key:"next",value:function(){this.backoffDelay=Math.min(this.nextBackoffDelay,this.maxDelay),this.nextBackoffDelay=this.backoffDelay*this.factor;var t=1+Math.random()*this.randomisationFactor;return Math.min(this.maxDelay,Math.round(this.backoffDelay*t))}},{key:"onBackoff",value:function(){this.timeoutID=null,this.emit("ready",this.backoffNumber,this.backoffDelay),this.backoffNumber++}}],[{key:"exponential",value:function(t){return new r(t)}}]),r}(Rg);ag.AsyncRetrier=Gg,ag.Backoff=Hg;var Yg=ag.Retrier=zg,Jg=Nl.scope("Network"),Kg=function(){function t(e,r){bn(this,t),this.config=e,this.transport=r}return xn(t,[{key:"backoffConfig",value:function(){return Object.assign(rp.backoffConfigDefault,this.config.backoffConfigOverride)}},{key:"retryWhenThrottled",value:function(){var t,e;return null!==(t=null!==(e=this.config.retryWhenThrottledOverride)&&void 0!==e?e:rp.retryWhenThrottledDefault)&&void 0!==t&&t}},{key:"executeWithRetry",value:function(t,e){var r=this;return new Bs(function(){var n=$s(wf.mark((function n(o,i,a){var u,c;return wf.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:u=new Yg(r.backoffConfig()),c=[502,503,504],e&&c.push(429),a((function(){u.cancel(),u.removeAllListeners()})),u.on("attempt",$s(wf.mark((function e(){var r,n;return wf.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,r=t(),a((function(){r.cancel(),u.cancel(),u.removeAllListeners()})),e.next=5,r;case 5:n=e.sent,u.succeeded(n),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),c.indexOf(e.t0.status)>-1||"Twilsock disconnected"===e.t0.message?u.failed(e.t0):(u.removeAllListeners(),u.cancel(),i(e.t0));case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))),u.on("succeeded",(function(t){o(t)})),u.on("cancelled",(function(t){return i(t)})),u.on("failed",(function(t){return i(t)})),u.start();case 9:case"end":return n.stop()}}),n)})));return function(t,e,r){return n.apply(this,arguments)}}())}},{key:"get",value:function(t){var e=this;return new Bs(function(){var r=$s(wf.mark((function r(n,o,i){var a,u,c;return wf.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={"X-Twilio-Token":e.config.token},u=e.executeWithRetry((function(){return e.transport.get(t,a)}),e.retryWhenThrottled()),Jg.trace("sending GET request to ",t," headers ",a),i((function(){return u.cancel()})),r.prev=4,r.next=7,u;case 7:c=r.sent,Jg.trace("response",c),n(c),r.next=16;break;case 12:r.prev=12,r.t0=r.catch(4),Jg.debug("get() error ".concat(r.t0)),o(r.t0);case 16:case"end":return r.stop()}}),r,null,[[4,12]])})));return function(t,e,n){return r.apply(this,arguments)}}())}},{key:"post",value:function(t,r,n,o,i){var a=this,u={"X-Twilio-Token":this.config.token};"undefined"!=typeof FormData&&n instanceof FormData||!o||Object.assign(u,{"Content-Type":o});var c=new URL(t);return r&&c.searchParams.append("Category",r),i&&c.searchParams.append("Filename",i),new Bs(function(){var r=$s(wf.mark((function r(o,i,s){var f,l;return wf.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return f=a.transport.post(c.href,u,n),s((function(){return f.cancel()})),Jg.trace("sending POST request to ".concat(t," with headers ").concat(u)),r.prev=3,r.next=6,f;case 6:l=r.sent,r.next=17;break;case 9:if(r.prev=9,r.t0=r.catch(3),!(void 0===e.XMLHttpRequest&&n instanceof FormData)){r.next=14;break}return i(new TypeError("Posting FormData supported only with browser engine's FormData")),r.abrupt("return");case 14:return Jg.debug("post() error ".concat(r.t0)),i(r.t0),r.abrupt("return");case 17:Jg.trace("response",l),o(l);case 19:case"end":return r.stop()}}),r,null,[[3,9]])})));return function(t,e,n){return r.apply(this,arguments)}}())}}]),t}(),Xg={},Zg=u,Qg=Mt.f,tm=Function.prototype,em=tm.toString,rm=/^\s*function ([^ (]*)/,nm="name";Zg&&!(nm in tm)&&Qg(tm,nm,{configurable:!0,get:function(){try{return em.call(this).match(rm)[1]}catch(t){return""}}});var om={exports:{}},im={exports:{}};!function(t){t.exports=function(t){if(Array.isArray(t))return t},t.exports.__esModule=!0,t.exports.default=t.exports}(im);var am={exports:{}};!function(t){t.exports=function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}},t.exports.__esModule=!0,t.exports.default=t.exports}(am);var um={exports:{}},cm={exports:{}};!function(t){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports}(cm),function(t){var e=cm.exports;t.exports=function(t,r){if(t){if("string"==typeof t)return e(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?e(t,r):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports}(um);var sm={exports:{}};!function(t){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports}(sm),function(t){var e=im.exports,r=am.exports,n=um.exports,o=sm.exports;t.exports=function(t,i){return e(t)||r(t,i)||n(t,i)||o()},t.exports.__esModule=!0,t.exports.default=t.exports}(om);var fm=Ar,lm=E,pm=function(){var t=!1,e=/[ac]/;return e.exec=function(){return t=!0,/./.exec.apply(this,arguments)},!0===e.test("abc")&&t}(),hm=/./.test;fm({target:"RegExp",proto:!0,forced:!pm},{test:function(t){if("function"!=typeof this.exec)return hm.call(this,t);var e=this.exec(t);if(null!==e&&!lm(e))throw new Error("RegExp exec method returned something other than an Object or null");return!!e}});var dm={},vm=ht;dm.f=vm;var ym=o,gm=tt,mm=dm,bm=Mt.f,wm=function(t){var e=ym.Symbol||(ym.Symbol={});gm(e,t)||bm(e,t,{value:mm.f(t)})},xm=Ar,km=o,Sm=j,Em=u,Om=N,Am=a,jm=tt,Tm=kf,_m=E,Lm=q,Rm=Nt,Pm=X,Im=S,Cm=xt,Dm=Gc,Mm=d,Um=tn,Nm=Ur,Fm=Re,Bm=Yu,qm=er,$m=i,zm=Mt,Gm=c,Wm=Vt,Vm=Ht.exports,Hm=z.exports,Ym=ue,Jm=nt,Km=ht,Xm=dm,Zm=wm,Qm=Lr,tb=ke,eb=il.forEach,rb=ae("hidden"),nb="Symbol",ob=Km("toPrimitive"),ib=tb.set,ab=tb.getterFor(nb),ub=Object.prototype,cb=km.Symbol,sb=Sm("JSON","stringify"),fb=$m.f,lb=zm.f,pb=Bm.f,hb=Gm.f,db=Hm("symbols"),vb=Hm("op-symbols"),yb=Hm("string-to-symbol-registry"),gb=Hm("symbol-to-string-registry"),mb=Hm("wks"),bb=km.QObject,wb=!bb||!bb.prototype||!bb.prototype.findChild,xb=Em&&Am((function(){return 7!=Um(lb({},"a",{get:function(){return lb(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=fb(ub,e);n&&delete ub[e],lb(t,e,r),n&&t!==ub&&lb(ub,e,n)}:lb,kb=function(t,e){var r=db[t]=Um(cb.prototype);return ib(r,{type:nb,tag:t,description:e}),Em||(r.description=e),r},Sb=function(t,e,r){t===ub&&Sb(vb,e,r),Rm(t);var n=Cm(e);return Rm(r),jm(db,n)?(r.enumerable?(jm(t,rb)&&t[rb][n]&&(t[rb][n]=!1),r=Um(r,{enumerable:Mm(0,!1)})):(jm(t,rb)||lb(t,rb,Mm(1,{})),t[rb][n]=!0),xb(t,n,r)):lb(t,n,r)},Eb=function(t,e){Rm(t);var r=Im(e),n=Nm(r).concat(Tb(r));return eb(n,(function(e){Em&&!Ob.call(r,e)||Sb(t,e,r[e])})),t},Ob=function(t){var e=Cm(t),r=hb.call(this,e);return!(this===ub&&jm(db,e)&&!jm(vb,e))&&(!(r||!jm(this,e)||!jm(db,e)||jm(this,rb)&&this[rb][e])||r)},Ab=function(t,e){var r=Im(t),n=Cm(e);if(r!==ub||!jm(db,n)||jm(vb,n)){var o=fb(r,n);return!o||!jm(db,n)||jm(r,rb)&&r[rb][n]||(o.enumerable=!0),o}},jb=function(t){var e=pb(Im(t)),r=[];return eb(e,(function(t){jm(db,t)||jm(Ym,t)||r.push(t)})),r},Tb=function(t){var e=t===ub,r=pb(e?vb:Im(t)),n=[];return eb(r,(function(t){!jm(db,t)||e&&!jm(ub,t)||n.push(db[t])})),n};(Om||(cb=function(){if(this instanceof cb)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?Dm(arguments[0]):void 0,e=Jm(t),r=function(t){this===ub&&r.call(vb,t),jm(this,rb)&&jm(this[rb],e)&&(this[rb][e]=!1),xb(this,e,Mm(1,t))};return Em&&wb&&xb(ub,e,{configurable:!0,set:r}),kb(e,t)},Vm(cb.prototype,"toString",(function(){return ab(this).tag})),Vm(cb,"withoutSetter",(function(t){return kb(Jm(t),t)})),Gm.f=Ob,zm.f=Sb,$m.f=Ab,Fm.f=Bm.f=jb,qm.f=Tb,Xm.f=function(t){return kb(Km(t),t)},Em&&(lb(cb.prototype,"description",{configurable:!0,get:function(){return ab(this).description}}),Vm(ub,"propertyIsEnumerable",Ob,{unsafe:!0}))),xm({global:!0,wrap:!0,forced:!Om,sham:!Om},{Symbol:cb}),eb(Nm(mb),(function(t){Zm(t)})),xm({target:nb,stat:!0,forced:!Om},{for:function(t){var e=Dm(t);if(jm(yb,e))return yb[e];var r=cb(e);return yb[e]=r,gb[r]=e,r},keyFor:function(t){if(!Lm(t))throw TypeError(t+" is not a symbol");if(jm(gb,t))return gb[t]},useSetter:function(){wb=!0},useSimple:function(){wb=!1}}),xm({target:"Object",stat:!0,forced:!Om,sham:!Em},{create:function(t,e){return void 0===e?Um(t):Eb(Um(t),e)},defineProperty:Sb,defineProperties:Eb,getOwnPropertyDescriptor:Ab}),xm({target:"Object",stat:!0,forced:!Om},{getOwnPropertyNames:jb,getOwnPropertySymbols:Tb}),xm({target:"Object",stat:!0,forced:Am((function(){qm.f(1)}))},{getOwnPropertySymbols:function(t){return qm.f(Pm(t))}}),sb)&&xm({target:"JSON",stat:!0,forced:!Om||Am((function(){var t=cb();return"[null]"!=sb([t])||"{}"!=sb({a:t})||"{}"!=sb(Object(t))}))},{stringify:function(t,e,r){for(var n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e,(_m(e)||void 0!==t)&&!Lm(t))return Tm(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!Lm(e))return e}),o[1]=e,sb.apply(null,o)}});cb.prototype[ob]||Wm(cb.prototype,ob,cb.prototype.valueOf),Qm(cb,nb),Ym[rb]=!0;var _b=Ar,Lb=u,Rb=o,Pb=tt,Ib=E,Cb=Mt.f,Db=fr,Mb=Rb.Symbol;if(Lb&&"function"==typeof Mb&&(!("description"in Mb.prototype)||void 0!==Mb().description)){var Ub={},Nb=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof Nb?new Mb(t):void 0===t?Mb():Mb(t);return""===t&&(Ub[e]=!0),e};Db(Nb,Mb);var Fb=Nb.prototype=Mb.prototype;Fb.constructor=Nb;var Bb=Fb.toString,qb="Symbol(test)"==String(Mb("test")),$b=/^Symbol\((.*)\)[^)]+$/;Cb(Fb,"description",{configurable:!0,get:function(){var t=Ib(this)?this.valueOf():this,e=Bb.call(t);if(Pb(Ub,t))return"";var r=qb?e.slice(7,-1):e.replace($b,"$1");return""===r?void 0:r}}),_b({global:!0,forced:!0},{Symbol:Nb})}wm("iterator");var zb={exports:{}},Gb={exports:{}};!function(t){var e=cm.exports;t.exports=function(t){if(Array.isArray(t))return e(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(Gb);var Wb={exports:{}};!function(t){t.exports=function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)},t.exports.__esModule=!0,t.exports.default=t.exports}(Wb);var Vb={exports:{}};!function(t){t.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.")},t.exports.__esModule=!0,t.exports.default=t.exports}(Vb),function(t){var e=Gb.exports,r=Wb.exports,n=um.exports,o=Vb.exports;t.exports=function(t){return e(t)||r(t)||n(t)||o()},t.exports.__esModule=!0,t.exports.default=t.exports}(zb);var Hb=Ve.includes,Yb=tu;Ar({target:"Array",proto:!0},{includes:function(t){return Hb(this,t,arguments.length>1?arguments[1]:void 0)}}),Yb("includes");var Jb=E,Kb=Math.floor;Ar({target:"Number",stat:!0},{isInteger:function(t){return!Jb(t)&&isFinite(t)&&Kb(t)===t}});var Xb=w,Zb=Gc,Qb="[\t\n\v\f\r                 \u2028\u2029\ufeff]",tw=RegExp("^"+Qb+Qb+"*"),ew=RegExp(Qb+Qb+"*$"),rw=function(t){return function(e){var r=Zb(Xb(e));return 1&t&&(r=r.replace(tw,"")),2&t&&(r=r.replace(ew,"")),r}},nw={start:rw(1),end:rw(2),trim:rw(3)},ow=u,iw=o,aw=mr,uw=Ht.exports,cw=tt,sw=y,fw=yc,lw=q,pw=mt,hw=a,dw=tn,vw=Re.f,yw=i.f,gw=Mt.f,mw=nw.trim,bw="Number",ww=iw.Number,xw=ww.prototype,kw=sw(dw(xw))==bw,Sw=function(t){if(lw(t))throw TypeError("Cannot convert a Symbol value to a number");var e,r,n,o,i,a,u,c,s=pw(t,"number");if("string"==typeof s&&s.length>2)if(43===(e=(s=mw(s)).charCodeAt(0))||45===e){if(88===(r=s.charCodeAt(2))||120===r)return NaN}else if(48===e){switch(s.charCodeAt(1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(a=(i=s.slice(2)).length,u=0;u<a;u++)if((c=i.charCodeAt(u))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(aw(bw,!ww(" 0o1")||!ww("0b1")||ww("+0x1"))){for(var Ew,Ow=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof Ow&&(kw?hw((function(){xw.valueOf.call(r)})):sw(r)!=bw)?fw(new ww(Sw(e)),r,Ow):Sw(e)},Aw=ow?vw(ww):"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(","),jw=0;Aw.length>jw;jw++)cw(ww,Ew=Aw[jw])&&!cw(Ow,Ew)&&gw(Ow,Ew,yw(ww,Ew));Ow.prototype=xw,xw.constructor=Ow,uw(iw,bw,Ow)}var Tw=u,_w=Ur,Lw=S,Rw=c.f,Pw=function(t){return function(e){for(var r,n=Lw(e),o=_w(n),i=o.length,a=0,u=[];i>a;)r=o[a++],Tw&&!Rw.call(n,r)||u.push(t?[r,n[r]]:n[r]);return u}},Iw={entries:Pw(!0),values:Pw(!1)}.entries;Ar({target:"Object",stat:!0},{entries:function(t){return Iw(t)}}),Object.defineProperty(Xg,"__esModule",{value:!0});var Cw=om.exports,Dw=zb.exports,Mw=cg.exports,Uw=ug.exports,Nw=fg.exports,Fw=pg.exports,Bw=dg.exports;function qw(t){return t&&"object"===En(t)&&"default"in t?t:{default:t}}var $w=qw(hg.exports),zw=qw(Cw),Gw=qw(Dw),Ww=qw(Mw),Vw=qw(Uw),Hw=qw(Nw),Yw=qw(Fw),Jw=qw(Bw),Kw=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return{checks:e}},Xw=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Kw((function(t){for(var r=!1,n=[],o=0,i=e;o<i.length;o++){var a=i[o];"string"!=typeof a?(r=r||t instanceof a,n.push("an instance of ".concat(a.name))):(r=r||$w.default(t)===a,n.push("of type ".concat(a)))}return[r,n]}))};function Zw(t){var e=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(t){return!1}}();return function(){var r,n=Jw.default(t);if(e){var o=Jw.default(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Yw.default(this,r)}}function Qw(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return tx(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tx(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function tx(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ex=function(t,e){if(e.length>t.length)throw new Error("Expected at most ".concat(t.length," argument(s), but got ").concat(e.length));for(;e.length<t.length;)e.push(void 0);var r,n=Qw(e.entries());try{for(n.s();!(r=n.n()).done;){var o=zw.default(r.value,2),i=o[0],a=o[1],u=ix(t[i],a),c=zw.default(u,4),s=c[0],f=c[1],l=c[2],p=c[3];if(!s)throw new Error("Argument ".concat(i+1," is expected to be ").concat(l).concat(p," but got ").concat(f))}}catch(t){n.e(t)}finally{n.f()}},rx=function(t){var e,r,n;(["undefined","boolean","number","bigint","string"].includes($w.default(t))&&(r="string"==typeof t?'"'.concat(t,'"'):"".concat(t)),"object"===$w.default(t)&&"Object"!==(null==t||null===(e=t.constructor)||void 0===e?void 0:e.name))&&(r=null===t?"null":"instance of ".concat(null==t||null===(n=t.constructor)||void 0===n?void 0:n.name));return r||(r=$w.default(t)),r},nx=function(t){var e,r=[],n=Qw(t);try{for(n.s();!(e=n.n()).done;){var o=e.value;r.push(ox(o))}}catch(t){n.e(t)}finally{n.f()}return r},ox=function(t){var e,r=[],n=Qw(Array.isArray(t)?t:[t]);try{for(n.s();!(e=n.n()).done;){var o=e.value;"string"!=typeof o&&"function"!=typeof o?r.push(o):r.push(Xw(o))}}catch(t){n.e(t)}finally{n.f()}return r},ix=function(t,e){var r,n,o=[],i=!1,a=Qw(t);try{for(a.s();!(n=a.n()).done;){var u,c=Qw(n.value.checks);try{for(c.s();!(u=c.n()).done;){var s=(0,u.value)(e),f=zw.default(s,3),l=f[0],p=f[1],h=f[2];i=i||l,!r&&h&&(r=h),p&&(o=[].concat(Gw.default(o),"string"==typeof p?[p]:Gw.default(p)))}}catch(t){c.e(t)}finally{c.f()}}}catch(t){a.e(t)}finally{a.f()}if(i)return[!0];var d=r||rx(e),v=o.length-1;return[!1,d,v>0?"".concat(o.slice(0,v).join(", ")," or ").concat(o[v]):o.join(", "),v>1?";":","]};function ax(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return ux(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ux(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function ux(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var cx=Kw((function(t){return["string"==typeof t&&t.length>0,"a non-empty string"]})),sx=Kw((function(t){return["number"==typeof t&&Number.isInteger(t)&&t>=0,"a non-negative integer"]})),fx=Kw((function(t){return["object"===$w.default(t)&&null!==t&&!Array.isArray(t),"a pure object (non-null and non-array)"]}));function lx(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return px(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return px(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function px(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}Xg.array=function(t,e){return Kw((function(r){if(!Array.isArray(r))return[!1,"an array of ".concat(t)];var n,o=lx(r.entries());try{for(o.s();!(n=o.n()).done;){var i=zw.default(n.value,2),a=i[0],u=i[1],c=ix(ox(e),u),s=zw.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"a valid array of ".concat(t," (index ").concat(a," should be ").concat(p,")"),"malformed array of ".concat(t," (index ").concat(a," is ").concat(l,")")]}}catch(t){o.e(t)}finally{o.f()}return[!0]}))},Xg.custom=Kw;var hx=Xg.literal=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return Kw((function(t){for(var r=!1,n=[],o=0,i=e;o<i.length;o++){var a=i[o];r=r||t===a,n.push("string"==typeof a?'"'.concat(a,'"'):"".concat(a))}return[r,n]}))};Xg.nonEmptyArray=function(t,e){return Kw((function(r){if(!Array.isArray(r)||r.length<1)return[!1,"a non-empty array of ".concat(t)];var n,o=ax(r.entries());try{for(o.s();!(n=o.n()).done;){var i=zw.default(n.value,2),a=i[0],u=i[1],c=ix(ox(e),u),s=zw.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"a valid non-empty array of ".concat(t," (index ").concat(a," should be ").concat(p,")"),"malformed array of ".concat(t," (index ").concat(a," is ").concat(l,")")]}}catch(t){o.e(t)}finally{o.f()}return[!0]}))};var dx=Xg.nonEmptyString=cx;Xg.nonNegativeInteger=sx,Xg.objectSchema=function(t,e){return Kw((function(r){if("object"!==$w.default(r)||null===r||Array.isArray(r))return[!1,"valid ".concat(t," (should be a pure object)")];for(var n=0,o=Object.entries(e);n<o.length;n++){var i=zw.default(o[n],2),a=i[0],u=i[1],c=ix(ox(u),r[a]),s=zw.default(c,3),f=s[0],l=s[1],p=s[2];if(!f)return[!1,"valid ".concat(t,' (key "').concat(a,'" should be ').concat(p,")"),"malformed ".concat(t,' (key "').concat(a,'" is ').concat(l,")")]}return[!0]}))};var vx=Xg.pureObject=fx;Xg.runtimeTypeValidation=ex,Xg.stringifyReceivedType=rx,Xg.type=Xw;var yx,gx=Xg.validateConstructorTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=nx(e);return function(t){return function(t){Hw.default(r,t);var e=Zw(r);function r(){Vw.default(this,r);for(var t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return ex(n,o),e.call.apply(e,[this].concat(o))}return Ww.default(r)}(t)}},mx=Xg.validateTypes=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=nx(e);return function(t,e,r){if("function"!=typeof r.value)throw new Error("The validateTypes decorator can only be applied to methods");var o=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return ex(n,e),o.apply(this,e)}}},bx=Xg.validateTypesAsync=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=nx(e);return function(t,e,r){if("function"!=typeof r.value)throw new Error("The validateTypesAsync decorator can only be applied to methods");var o=r.value;r.value=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];try{ex(n,e)}catch(t){return Promise.reject(t)}return o.apply(this,e)}}},wx=Nl.scope("");return t.default=(yx=function(){function t(e,r,n){var o,i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};bn(this,t),this.options=a,this.options.logLevel=null!==(o=this.options.logLevel)&&void 0!==o?o:"silent",this.config=new rp(e,r,n,this.options),wx.setLevel(this.options.logLevel),this.options.transport=null!==(i=this.options.transport)&&void 0!==i?i:new rd,this.transport=this.options.transport,this.network=new Kg(this.config,this.transport)}return xn(t,[{key:"updateToken",value:function(t){wx.info("updateToken"),this.config.updateToken(t)}},{key:"get",value:function(t){var e=this;return new Bs(function(){var r=$s(wf.mark((function r(n,o,i){var a,u;return wf.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a=e.network.get("".concat(e.config.mediaUrl,"/").concat(t)),i((function(){return a.cancel()})),r.prev=2,r.next=5,a;case 5:u=r.sent,n(new np(e.config,e.network,u.body)),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),o(r.t0);case 12:case"end":return r.stop()}}),r,null,[[2,9]])})));return function(t,e,n){return r.apply(this,arguments)}}())}},{key:"post",value:function(t,e,r,n){var o=this;return new Bs(function(){var i=$s(wf.mark((function i(a,u,c){var s,f;return wf.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return s=o.network.post(o.config.mediaUrl,null!=r?r:"media",e,t,n),c((function(){return s.cancel()})),i.prev=2,i.next=5,s;case 5:f=i.sent,a(new np(o.config,o.network,f.body)),i.next=12;break;case 9:i.prev=9,i.t0=i.catch(2),u(i.t0);case 12:case"end":return i.stop()}}),i,null,[[2,9]])})));return function(t,e,r){return i.apply(this,arguments)}}())}},{key:"postFormData",value:function(t,e){var r=this;return new Bs(function(){var n=$s(wf.mark((function n(o,i,a){var u,c;return wf.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u=r.network.post(r.config.mediaUrl,null!=e?e:"media",t),a((function(){return u.cancel()})),n.prev=2,n.next=5,u;case 5:c=n.sent,o(new np(r.config,r.network,c.body)),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),i(n.t0);case 12:case"end":return n.stop()}}),n,null,[[2,9]])})));return function(t,e,r){return n.apply(this,arguments)}}())}},{key:"mediaSetGet",value:function(t){var e=this;return new Bs(function(){var r=$s(wf.mark((function r(n,o,i){var a,u,c,s;return wf.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={command:"get",list:t.map((function(t){return{media_sid:t}}))},u=e.network.post("".concat(e.config.mediaSetUrl),null,a,"application/json"),i((function(){return u.cancel()})),r.prev=3,r.next=6,u;case 6:c=r.sent,s=c.body.map((function(t){if(200===t.code)return new np(e.config,e.network,t.media_record);o("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"))})),n(s),r.next=14;break;case 11:r.prev=11,r.t0=r.catch(3),o(r.t0);case 14:case"end":return r.stop()}}),r,null,[[3,11]])})));return function(t,e,n){return r.apply(this,arguments)}}())}},{key:"mediaSetGetContentUrls",value:function(t){var e=this;return new Bs(function(){var r=$s(wf.mark((function r(n,o,i){var a,u,c,s;return wf.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return a={command:"get",list:t.map((function(t){return{media_sid:t}}))},u=e.network.post("".concat(e.config.mediaSetUrl),null,a,"application/json"),i((function(){return u.cancel()})),r.prev=3,r.next=6,u;case 6:c=r.sent,s=new Map,c.body.forEach((function(t){200===t.code?s.set(t.media_record.sid,t.media_record.links.content_direct_temporary):o("Failed to obtain detailed information about Media items (failed SID ".concat(t.media_record.sid,")"))})),n(s),r.next=15;break;case 12:r.prev=12,r.t0=r.catch(3),o(r.t0);case 15:case"end":return r.stop()}}),r,null,[[3,12]])})));return function(t,e,n){return r.apply(this,arguments)}}())}}]),t}(),Ln(yx,"version","1.0.0"),yx),ml([mx(dx),bl("design:type",Function),bl("design:paramtypes",[String]),bl("design:returntype",void 0)],t.default.prototype,"updateToken",null),ml([bx(dx),bl("design:type",Function),bl("design:paramtypes",[String]),bl("design:returntype",Bs)],t.default.prototype,"get",null),t.default=ml([gx(dx,dx,[dx,hx(null)],[vx,"undefined"]),bl("design:paramtypes",[String,String,Object,Object])],t.default),t.CancellablePromise=Bs,t.Client=t.default,t.McsClient=t.default,t.McsMedia=np,t.Media=np,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
@@ -0,0 +1,34 @@
1
+ /*
2
+ @license
3
+ Copyright (c) 2018, Twilio, Inc.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
12
+ SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
14
+ OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
15
+ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
+
17
+ */
18
+ 'use strict';
19
+
20
+ var global =
21
+ typeof global !== "undefined"
22
+ ? global
23
+ : typeof self !== "undefined"
24
+ ? self
25
+ : typeof window !== "undefined"
26
+ ? window
27
+ : {};
28
+
29
+ Object.defineProperty(exports, '__esModule', { value: true });
30
+
31
+ var rngBrowser = {exports: {}};
32
+
33
+ exports.rngBrowser = rngBrowser;
34
+ //# sourceMappingURL=rng-browser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rng-browser.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,98 @@
1
+ /*
2
+ @license
3
+ Copyright (c) 2018, Twilio, Inc.
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any
6
+ purpose with or without fee is hereby granted, provided that the above
7
+ copyright notice and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
12
+ SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
14
+ OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
15
+ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16
+
17
+ */
18
+ 'use strict';
19
+
20
+ var global =
21
+ typeof global !== "undefined"
22
+ ? global
23
+ : typeof self !== "undefined"
24
+ ? self
25
+ : typeof window !== "undefined"
26
+ ? window
27
+ : {};
28
+
29
+ Object.defineProperty(exports, '__esModule', { value: true });
30
+
31
+ var index = require('./node_modules/uuid/index.js');
32
+
33
+ /**
34
+ * Cancellable promise. Extends the functionality of the native Promise to include the cancel method.
35
+ *
36
+ * Example:
37
+ *
38
+ * ```ts
39
+ *
40
+ * const cancellableFetchPromise = new CancellablePromise(async (resolve, reject, onCancel) => {
41
+ * const request = fetch("https://example.com/");
42
+ *
43
+ * onCancel(() => request.cancel());
44
+ *
45
+ * try {
46
+ * const response = await request;
47
+ * resolve(response);
48
+ * } catch (err) {
49
+ * reject(err);
50
+ * }
51
+ * });
52
+ *
53
+ * cancellableFetchPromise.cancel();
54
+ * ```
55
+ */
56
+ class CancellablePromise extends Promise {
57
+ /**
58
+ * Creates a new CancellablePromise.
59
+ * @param executor A callback used to initialize the promise. This callback is passed three arguments:
60
+ * a resolve callback used to resolve the promise with a value or the result of another promise,
61
+ * a reject callback used to reject the promise with a provided reason or error,
62
+ * and an onCancel callback used to define behavior of cancellation.
63
+ */
64
+ constructor(executor) {
65
+ const outerId = index["default"].v4();
66
+ let outerRejectPromise;
67
+ super((resolve, reject) => {
68
+ outerRejectPromise = reject;
69
+ return executor((value) => {
70
+ CancellablePromise.cancellationMap.delete(outerId);
71
+ resolve(value);
72
+ }, (reason) => {
73
+ CancellablePromise.cancellationMap.delete(outerId);
74
+ reject(reason);
75
+ }, (cancellationFunction) => {
76
+ CancellablePromise.cancellationMap.set(outerId, cancellationFunction);
77
+ });
78
+ });
79
+ this.id = outerId;
80
+ this.rejectPromise = outerRejectPromise;
81
+ }
82
+ /**
83
+ * Cancels the promise and invokes the cancellation callback if it was defined during instantiation. Cancellation will result in the promise being rejected.
84
+ */
85
+ cancel() {
86
+ const onCancel = CancellablePromise.cancellationMap.get(this.id);
87
+ onCancel === null || onCancel === void 0 ? void 0 : onCancel();
88
+ if (this.rejectPromise) {
89
+ this.catch(() => void 0);
90
+ this.rejectPromise(new Error("Promise was cancelled"));
91
+ }
92
+ return this;
93
+ }
94
+ }
95
+ CancellablePromise.cancellationMap = new Map();
96
+
97
+ exports.CancellablePromise = CancellablePromise;
98
+ //# sourceMappingURL=cancellable-promise.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cancellable-promise.js","sources":["../src/cancellable-promise.ts"],"sourcesContent":["import { v4 as uuidv4 } from \"uuid\";\n\n/**\n * Cancellable promise. Extends the functionality of the native Promise to include the cancel method.\n *\n * Example:\n *\n * ```ts\n *\n * const cancellableFetchPromise = new CancellablePromise(async (resolve, reject, onCancel) => {\n * const request = fetch(\"https://example.com/\");\n *\n * onCancel(() => request.cancel());\n *\n * try {\n * const response = await request;\n * resolve(response);\n * } catch (err) {\n * reject(err);\n * }\n * });\n *\n * cancellableFetchPromise.cancel();\n * ```\n */\nclass CancellablePromise<T> extends Promise<T> {\n private readonly id: string;\n private rejectPromise?: (reason?: any) => void;\n\n private static readonly cancellationMap: Map<string, () => void> = new Map();\n\n /**\n * Creates a new CancellablePromise.\n * @param executor A callback used to initialize the promise. This callback is passed three arguments:\n * a resolve callback used to resolve the promise with a value or the result of another promise,\n * a reject callback used to reject the promise with a provided reason or error,\n * and an onCancel callback used to define behavior of cancellation.\n */\n constructor(\n executor: (\n resolve: (value: T | PromiseLike<T>) => void,\n reject: (reason?: string | Error) => void,\n onCancel: (cancellationFunction: () => void) => void\n ) => void\n ) {\n const outerId = uuidv4();\n let outerRejectPromise!: (reason?: any) => void;\n\n super((resolve, reject) => {\n outerRejectPromise = reject;\n return executor(\n (value: T | PromiseLike<T>) => {\n CancellablePromise.cancellationMap.delete(outerId);\n resolve(value);\n },\n (reason?: string | Error) => {\n CancellablePromise.cancellationMap.delete(outerId);\n reject(reason);\n },\n (cancellationFunction: () => void) => {\n CancellablePromise.cancellationMap.set(outerId, cancellationFunction);\n }\n );\n });\n\n this.id = outerId;\n this.rejectPromise = outerRejectPromise;\n }\n\n /**\n * Cancels the promise and invokes the cancellation callback if it was defined during instantiation. Cancellation will result in the promise being rejected.\n */\n cancel(): this {\n const onCancel = CancellablePromise.cancellationMap.get(this.id);\n\n onCancel?.();\n\n if (this.rejectPromise) {\n this.catch(() => void 0);\n this.rejectPromise(new Error(\"Promise was cancelled\"));\n }\n\n return this;\n }\n}\n\nexport { CancellablePromise };\n"],"names":["uuidv4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;AAsBG;AACH,MAAM,kBAAsB,SAAQ,OAAU,CAAA;AAM5C;;;;;;AAMG;AACH,IAAA,WAAA,CACE,QAIS,EAAA;AAET,QAAA,MAAM,OAAO,GAAGA,mBAAM,EAAE,CAAC;AACzB,QAAA,IAAI,kBAA2C,CAAC;AAEhD,QAAA,KAAK,CAAC,CAAC,OAAO,EAAE,MAAM,KAAI;YACxB,kBAAkB,GAAG,MAAM,CAAC;AAC5B,YAAA,OAAO,QAAQ,CACb,CAAC,KAAyB,KAAI;AAC5B,gBAAA,kBAAkB,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACnD,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,aAAC,EACD,CAAC,MAAuB,KAAI;AAC1B,gBAAA,kBAAkB,CAAC,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACnD,MAAM,CAAC,MAAM,CAAC,CAAC;AACjB,aAAC,EACD,CAAC,oBAAgC,KAAI;gBACnC,kBAAkB,CAAC,eAAe,CAAC,GAAG,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;AACxE,aAAC,CACF,CAAC;AACJ,SAAC,CAAC,CAAC;AAEH,QAAA,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC;AAClB,QAAA,IAAI,CAAC,aAAa,GAAG,kBAAkB,CAAC;KACzC;AAED;;AAEG;IACH,MAAM,GAAA;AACJ,QAAA,MAAM,QAAQ,GAAG,kBAAkB,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEjE,QAAA,QAAQ,KAAR,IAAA,IAAA,QAAQ,KAAR,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,QAAQ,EAAI,CAAC;QAEb,IAAI,IAAI,CAAC,aAAa,EAAE;YACtB,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC;YACzB,IAAI,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAAC;AACxD,SAAA;AAED,QAAA,OAAO,IAAI,CAAC;KACb;;AAtDuB,kBAAA,CAAA,eAAe,GAA4B,IAAI,GAAG,EAAE;;;;"}