@makefully/engagefully 0.3.1 → 0.4.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.
- package/CHANGELOG.md +8 -0
- package/README.md +15 -0
- package/lib/engagefully.js +1 -1
- package/package.json +1 -1
- package/src/Controller.js +54 -1
- package/src/devices/FabricDevice.js +1 -0
- package/src/devices/GamepadDevice.js +2 -0
- package/src/devices/KeyboardDevice.js +2 -0
- package/src/devices/PixiDevice.js +1 -0
- package/src/devices/PointerDevice.js +1 -0
- package/src/devices/SpeechDevice.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.4.0] - 2026-12-02
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Input precedence on `Controller`: `inputPrecedence`, `preferredInput`, `noteInput()`, and `input-precedence-updated` (most recent method at index 0)
|
|
12
|
+
- Device `inputMethod` defaults (`keyboard` / `gamepad` / `pointer` / `speech`); pointer refined via `pointerType`
|
|
13
|
+
- `input-activity` on gamepad connect and SpeechDevice mic arm (`setActive(true)` / `start()`)
|
|
14
|
+
|
|
7
15
|
## [0.3.1] - 2026-12-01
|
|
8
16
|
|
|
9
17
|
### Added
|
package/README.md
CHANGED
|
@@ -51,8 +51,23 @@ controller.on('LeftStick', (event) => {
|
|
|
51
51
|
const q = quantizeStick(event.x, event.y, { sectors: 6, deadzone: 0.35 });
|
|
52
52
|
// q?.sector → 0..5 or null in deadzone
|
|
53
53
|
});
|
|
54
|
+
|
|
55
|
+
// Preferred input method for glyphs / instructional VO:
|
|
56
|
+
controller.on('input-precedence-updated', (methods) => {
|
|
57
|
+
// methods[0] === controller.preferredInput → 'keyboard' | 'gamepad' | 'touch' | …
|
|
58
|
+
});
|
|
54
59
|
```
|
|
55
60
|
|
|
61
|
+
### Input precedence
|
|
62
|
+
|
|
63
|
+
`Controller` tracks which input method the player used most recently (Platypus-style):
|
|
64
|
+
|
|
65
|
+
- `controller.inputPrecedence` — ordered list; **index 0 is preferred**
|
|
66
|
+
- `controller.preferredInput` — same as `inputPrecedence[0]`, or `null`
|
|
67
|
+
- `input-precedence-updated` — fires when the preferred method changes
|
|
68
|
+
|
|
69
|
+
Methods come from device activity (`keyboard`, `gamepad`, `mouse` / `touch` / `pen` via pointer, `speech`, …). Gamepad connect and speech mic-arm (`setActive(true)`) also bump preference. Turning a method off does not demote it.
|
|
70
|
+
|
|
56
71
|
### Physical control ids
|
|
57
72
|
|
|
58
73
|
| Device | Examples |
|
package/lib/engagefully.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var t={6981:(t,e,n)=>{"use strict";n(1983);var r,o=(r=n(115))&&r.__esModule?r:{default:r};o.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),o.default._babelPolyfill=!0},1983:(t,e,n)=>{"use strict";n(6266),n(990),n(911),n(4160),n(6197),n(6728),n(4039),n(3568),n(8051),n(8250),n(5434),n(4952),n(6337),n(5666)},9009:(t,e,n)=>{"use strict";var r=n(7187),o=n.n(r);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){var n=!1;t.value!==this.value&&(n=!0,this.value=t.value),n&&e.emit(this.control,t,this)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){t.value!==this.value&&(this.value=t.value,1===this.value&&e.emit("".concat(this.control,":pressed"),t,this),0===this.value&&e.emit("".concat(this.control,":released"),t,this),e.emit(this.control,t,this))}},{key:"poll",value:function(){return this.value}},{key:"toJSON",value:function(){return{control:this.control,type:"Button",value:this.value}}}])&&u(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const f=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value=null}var e,n;return e=t,(n=[{key:"update",value:function(t,e){this.value=t.value,e.emit(this.control,t,this)}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){t.value!==this.value&&(this.value=t.value,e.emit(this.control,t,this))}}])&&l(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const v=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value="",this.x=0,this.y=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){t.value===this.value&&t.x===this.x&&t.y===this.y||(this.value=t.value,this.x=t.x,this.y=t.y,e.emit(this.control,t,this))}}])&&h(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();Promise.resolve(!1),Promise.resolve(!0);var d=Promise.resolve();function y(t,e){return t||(t=0),new Promise(function(n){return setTimeout(function(){return n(e)},t)})}function b(){return Math.random().toString(36).substring(2)}var g=0,m=0;function _(){var t=(new Date).getTime();return t===g?1e3*t+ ++m:(g=t,m=0,1e3*t)}var w="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);const x={create:function(t){var e={messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=function(t){e.messagesCallback&&e.messagesCallback(t.data)},e},close:function(t){t.bc.close(),t.subFns=[]},onMessage:function(t,e){t.messagesCallback=e},postMessage:function(t,e){try{return t.bc.postMessage(e,!1),d}catch(t){return Promise.reject(t)}},canBeUsed:function(){if(w&&"undefined"==typeof window)return!1;if("function"==typeof BroadcastChannel){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}return!1},type:"native",averageResponseTime:function(){return 150},microSeconds:_};var S=function(){function t(t){this.ttl=t,this.set=new Set,this.timeMap=new Map}return t.prototype.has=function(t){return this.set.has(t)},t.prototype.add=function(t){var e=this;this.timeMap.set(t,O()),this.set.add(t),setTimeout(function(){!function(t){for(var e=O()-t.ttl,n=t.set[Symbol.iterator]();;){var r=n.next().value;if(!r)return;if(!(t.timeMap.get(r)<e))return;t.timeMap.delete(r),t.set.delete(r)}}(e)},0)},t.prototype.clear=function(){this.set.clear(),this.timeMap.clear()},t}();function O(){return(new Date).getTime()}function P(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=JSON.parse(JSON.stringify(t));return void 0===e.webWorkerSupport&&(e.webWorkerSupport=!0),e.idb||(e.idb={}),e.idb.ttl||(e.idb.ttl=45e3),e.idb.fallbackInterval||(e.idb.fallbackInterval=150),t.idb&&"function"==typeof t.idb.onclose&&(e.idb.onclose=t.idb.onclose),e.localstorage||(e.localstorage={}),e.localstorage.removeTimeout||(e.localstorage.removeTimeout=6e4),t.methods&&(e.methods=t.methods),e.node||(e.node={}),e.node.ttl||(e.node.ttl=12e4),e.node.maxParallelWrites||(e.node.maxParallelWrites=2048),void 0===e.node.useFastPath&&(e.node.useFastPath=!0),e}var E="messages";function j(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function k(t){t.closed||T(t).then(function(){return y(t.options.idb.fallbackInterval)}).then(function(){return k(t)})}function T(t){return t.closed?d:t.messagesCallback?(e=t.db,n=t.lastCursorId,r=e.transaction(E).objectStore(E),o=[],new Promise(function(t){(function(){try{var t=IDBKeyRange.bound(n+1,1/0);return r.openCursor(t)}catch(t){return r.openCursor()}}()).onsuccess=function(e){var r=e.target.result;r?r.value.id<n+1?r.continue(n+1):(o.push(r.value),r.continue()):t(o)}})).then(function(e){var n=e.filter(function(t){return!!t}).map(function(e){return e.id>t.lastCursorId&&(t.lastCursorId=e.id),e}).filter(function(e){return function(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}(e,t)}).sort(function(t,e){return t.time-e.time});return n.forEach(function(e){t.messagesCallback&&(t.eMIs.add(e.id),t.messagesCallback(e.data))}),d}):d;var e,n,r,o}const R={create:function(t,e){return e=P(e),function(t){var e="pubkey.broadcast-channel-0-"+t,n=j().open(e,1);return n.onupgradeneeded=function(t){t.target.result.createObjectStore(E,{keyPath:"id",autoIncrement:!0})},new Promise(function(t,e){n.onerror=function(t){return e(t)},n.onsuccess=function(){t(n.result)}})}(t).then(function(n){var r={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:b(),eMIs:new S(2*e.idb.ttl),writeBlockPromise:d,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){r.closed=!0,e.idb.onclose&&e.idb.onclose()},k(r),r})},close:function(t){t.closed=!0,t.db.close()},onMessage:function(t,e,n){t.messagesCallbackTime=n,t.messagesCallback=e,T(t)},postMessage:function(t,e){return t.writeBlockPromise=t.writeBlockPromise.then(function(){return function(t,e,n){var r={uuid:e,time:(new Date).getTime(),data:n},o=t.transaction([E],"readwrite");return new Promise(function(t,e){o.oncomplete=function(){return t()},o.onerror=function(t){return e(t)},o.objectStore(E).add(r)})}(t.db,t.uuid,e)}).then(function(){var e,n;0===Math.floor(11*Math.random()+0)&&(e=t.db,n=t.options.idb.ttl,function(t,e){var n=(new Date).getTime()-e,r=t.transaction(E).objectStore(E),o=[];return new Promise(function(t){r.openCursor().onsuccess=function(e){var r=e.target.result;if(r){var i=r.value;if(!(i.time<n))return void t(o);o.push(i),r.continue()}else t(o)}})}(e,n).then(function(t){return Promise.all(t.map(function(t){return function(t,e){var n=t.transaction([E],"readwrite").objectStore(E).delete(e);return new Promise(function(t){n.onsuccess=function(){return t()}})}(e,t.id)}))}))}),t.writeBlockPromise},canBeUsed:function(){return!w&&!!j()},type:"idb",averageResponseTime:function(t){return 2*t.idb.fallbackInterval},microSeconds:_};function M(){var t;if("undefined"==typeof window)return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch(t){}return t}function L(t){return"pubkey.broadcastChannel-"+t}function A(){if(w)return!1;var t=M();if(!t)return!1;try{var e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch(t){return!1}return!0}const F={create:function(t,e){if(e=P(e),!A())throw new Error("BroadcastChannel: localstorage cannot be used");var n=b(),r=new S(e.localstorage.removeTimeout),o={channelName:t,uuid:n,eMIs:r};return o.listener=function(t){var e=L(t),i=function(t){var i;t.key===e&&(i=JSON.parse(t.newValue),o.messagesCallback&&i.uuid!==n&&i.token&&!r.has(i.token)&&(i.data.time&&i.data.time<o.messagesCallbackTime||(r.add(i.token),o.messagesCallback(i.data))))};return window.addEventListener("storage",i),i}(t),o},close:function(t){var e;e=t.listener,window.removeEventListener("storage",e)},onMessage:function(t,e,n){t.messagesCallbackTime=n,t.messagesCallback=e},postMessage:function(t,e){return new Promise(function(n){y().then(function(){var r=L(t.channelName),o={token:b(),time:(new Date).getTime(),data:e,uuid:t.uuid},i=JSON.stringify(o);M().setItem(r,i);var a=document.createEvent("Event");a.initEvent("storage",!0,!0),a.key=r,a.newValue=i,window.dispatchEvent(a),n()})})},canBeUsed:A,type:"localstorage",averageResponseTime:function(){var t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?240:120},microSeconds:_};var I=_,C=new Set;const D={create:function(t){var e={name:t,messagesCallback:null};return C.add(e),e},close:function(t){C.delete(t)},onMessage:function(t,e){t.messagesCallback=e},postMessage:function(t,e){return new Promise(function(n){return setTimeout(function(){Array.from(C).filter(function(e){return e.name===t.name}).filter(function(e){return e!==t}).filter(function(t){return!!t.messagesCallback}).forEach(function(t){return t.messagesCallback(e)}),n()},5)})},canBeUsed:function(){return!0},type:"simulate",averageResponseTime:function(){return 5},microSeconds:I};var N=[x,R,F],B=new Set,U=0,W=function(t,e){var n,r,o;this.id=U++,B.add(this),this.name=t,this.options=P(e),this.method=function(t){var e=[].concat(t.methods,N).filter(Boolean);if(t.type){if("simulate"===t.type)return D;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||w||(e=e.filter(function(t){return"idb"!==t.type}));var r=e.find(function(t){return t.canBeUsed()});if(r)return r;throw new Error("No useable method found in "+JSON.stringify(N.map(function(t){return t.type})))}(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,(o=r=(n=this).method.create(n.name,n.options))&&"function"==typeof o.then?(n._prepP=r,r.then(function(t){n._state=t})):n._state=r};function G(t,e,n){var r={time:t.method.microSeconds(),type:e,data:n};return(t._prepP?t._prepP:d).then(function(){var e=t.method.postMessage(t._state,r);return t._uMP.add(e),e.catch().then(function(){return t._uMP.delete(e)}),e})}function V(t){return t._addEL.message.length>0||t._addEL.internal.length>0}function z(t,e,n){t._addEL[e].push(n),function(t){if(!t._iL&&V(t)){var e=function(e){t._addEL[e.type].forEach(function(t){var n=t.time-1e5;e.time>=n&&t.fn(e.data)})},n=t.method.microSeconds();t._prepP?t._prepP.then(function(){t._iL=!0,t.method.onMessage(t._state,e,n)}):(t._iL=!0,t.method.onMessage(t._state,e,n))}}(t)}function q(t,e,n){t._addEL[e]=t._addEL[e].filter(function(t){return t!==n}),function(t){if(t._iL&&!V(t)){t._iL=!1;var e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}(t)}function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function K(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function H(t,e,n){return e&&Z(t.prototype,e),n&&Z(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}W._pubkey=!0,W.prototype={postMessage:function(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return G(this,"message",t)},postInternal:function(t){return G(this,"internal",t)},set onmessage(t){var e={time:this.method.microSeconds(),fn:t};q(this,"message",this._onML),t&&"function"==typeof t?(this._onML=e,z(this,"message",e)):this._onML=null},addEventListener:function(t,e){z(this,t,{time:this.method.microSeconds(),fn:e})},removeEventListener:function(t,e){q(this,t,this._addEL[t].find(function(t){return t.fn===e}))},close:function(){var t=this;if(!this.closed){B.delete(this),this.closed=!0;var e=this._prepP?this._prepP:d;return this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(t){return t()}))}).then(function(){return t.method.close(t._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};var Y=H(function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"PageDevice";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var o=e.devices||e;this.channel=new W(r),o.forEach(function(t){t.on("updated",function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach(function(e){K(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t);e.device="".concat(r,"-").concat(t.device),e.control="Page".concat(t.control),delete e.target,delete e.event,n.channel.postMessage(e)})})});function $(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const Q={Amount:a,Button:c,Data:f,Dial:p,Drop:v,PageAction:Y,Pointer:function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value=0,this.x=0,this.y=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){t.value===this.value&&t.x===this.x&&t.y===this.y||(this.value=t.value,this.x=t.x,this.y=t.y,e.emit(this.control,t,this))}}])&&$(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Joystick:function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.x=0,this.y=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){t.x===this.x&&t.y===this.y||(this.x=t.x,this.y=t.y,e.emit(this.control,t,this))}}])&&X(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()};function tt(t){return tt="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},tt(t)}function et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function nt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?et(Object(n),!0).forEach(function(e){rt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function rt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ot(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function it(t,e){return it=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},it(t,e)}function at(t){return at=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},at(t)}var ut=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&it(t,e)}(a,t);var e,n,r,o,i=(r=a,o=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}}(),function(){var t,e=at(r);if(o){var n=at(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===tt(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)}(this,t)});function a(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this)).devices=[],t.controls={},t.controlMap=nt(nt({},Q),n),e.forEach(function(e){return t.addDevice(e)}),t}return e=a,(n=[{key:"addControl",value:function(t,e){var n=this.controlMap[e];if(n)return this.controls[t]=new n(t);var r=this.controls[t]=new this.controlMap.Data(t);return console.warn("".concat(t,': "').concat(e,"\" has no associated control class. Using 'Data'.")),r}},{key:"addDevice",value:function(t){var e=this;this.devices.push(t),t.on("updated",function(t){var n=t.control,r=e.controls[n];(r||(r=e.addControl(n,t.type)))&&r.update(t,e)})}},{key:"getControl",value:function(t,e){var n=this.controls[t];return!n&&e&&(n=this.addControl(t,e)),n}},{key:"poll",value:function(t){var e,n;return null===(e=this.controls[t])||void 0===e||null===(n=e.poll)||void 0===n?void 0:n.call(e)}}])&&ot(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o());const ct=ut;function st(t){return st="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},st(t)}function ft(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=pt(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function lt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||pt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pt(t,e){if(t){if("string"==typeof t)return ht(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ht(t,e):void 0}}function ht(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function vt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dt(t,e){return dt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},dt(t,e)}function yt(t){return yt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},yt(t)}function bt(t){return"string"==typeof t?{control:t,data:void 0}:{control:t.control,data:t.data}}const gt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dt(t,e)}(a,t);var e,n,r,o,i=(r=a,o=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}}(),function(){var t,e=yt(r);if(o){var n=yt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===st(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)}(this,t)});function a(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=i.call(this)).controller=t,e.enabled="function"==typeof r.enabled?r.enabled:function(){return!0},e.preventDefault=!1!==r.preventDefault,e.autoTick=!1!==r.autoTick,e._bindings=new Map,e._controlIndex=new Map,e._heldByAction=new Map,e._lastEvent=new Map,e._listeners=[],e._disposed=!1,e._wasEnabled=!0,e._raf=0,e._applyBindings(n),e.preventDefault&&(e._onKeyDownCapture=function(t){e.enabled()&&e._keyboardCodes.has(t.code)&&t.preventDefault()},window.addEventListener("keydown",e._onKeyDownCapture,!0)),e._onBlur=function(){e.clearHeld()},window.addEventListener("blur",e._onBlur),e.autoTick&&(e._raf=requestAnimationFrame(function t(){e._disposed||(e._raf=requestAnimationFrame(t),e._tick())})),e}return e=a,(n=[{key:"_applyBindings",value:function(t){var e=this;this._keyboardCodes=new Set;for(var n=0,r=Object.entries(t);n<r.length;n++){var o=lt(r[n],2),i=o[0],a=(o[1]||[]).map(bt);this._bindings.set(i,a),this._heldByAction.set(i,new Set);var u,c=ft(a);try{var s=function(){var t,n=u.value;((t=n.control).startsWith("Key")||t.startsWith("Arrow")||t.startsWith("Digit")||t.startsWith("Numpad")||"Space"===t||"Enter"===t||"Escape"===t||"Tab"===t||"Backspace"===t||"ShiftLeft"===t||"ShiftRight"===t||"ControlLeft"===t||"ControlRight"===t||"AltLeft"===t||"AltRight"===t)&&e._keyboardCodes.add(n.control);var r=e._controlIndex.get(n.control);r||(r=[],e._controlIndex.set(n.control,r)),r.push({action:i,data:n.data});var o=function(t){return e._onPhysicalPressed(n.control,t)},a=function(t){return e._onPhysicalReleased(n.control,t)};e.controller.on("".concat(n.control,":pressed"),o),e.controller.on("".concat(n.control,":released"),a),e._listeners.push({event:"".concat(n.control,":pressed"),fn:o},{event:"".concat(n.control,":released"),fn:a})};for(c.s();!(u=c.n()).done;)s()}catch(t){c.e(t)}finally{c.f()}}}},{key:"_isEnabled",value:function(){var t=this.enabled();return this._wasEnabled&&!t&&this.clearHeld(),this._wasEnabled=t,t}},{key:"_onPhysicalPressed",value:function(t,e){if(this._isEnabled()){var n=this._controlIndex.get(t);if(n){var r,o=ft(n);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=i.action,u=i.data,c=this._heldByAction.get(a),s=0===c.size;c.add(t);var f={action:a,control:t,data:u,device:null==e?void 0:e.device,raw:e};this._lastEvent.set(a,f),s&&this.emit("".concat(a,":pressed"),f),this.emit(a,f)}}catch(t){o.e(t)}finally{o.f()}}}}},{key:"_onPhysicalReleased",value:function(t,e){var n=this._controlIndex.get(t);if(n){var r,o=ft(n);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=i.action,u=i.data,c=this._heldByAction.get(a);if(c.has(t)){c.delete(t);var s={action:a,control:t,data:u,device:null==e?void 0:e.device,raw:e};if(0===c.size)this._lastEvent.delete(a),this.emit("".concat(a,":released"),s);else{var f,l=ft(this._bindings.get(a)||[]);try{for(l.s();!(f=l.n()).done;){var p=f.value;if(c.has(p.control)){this._lastEvent.set(a,{action:a,control:p.control,data:p.data,device:null==e?void 0:e.device,raw:e});break}}}catch(t){l.e(t)}finally{l.f()}}}}}catch(t){o.e(t)}finally{o.f()}}}},{key:"_tick",value:function(){if(this._isEnabled()){var t,e=ft(this._heldByAction);try{for(e.s();!(t=e.n()).done;){var n=lt(t.value,2),r=n[0];if(0!==n[1].size){var o=this._lastEvent.get(r);o&&this.emit("".concat(r,":held"),o)}}}catch(t){e.e(t)}finally{e.f()}}}},{key:"held",value:function(t){var e=this._heldByAction.get(t);return Boolean(e&&e.size>0)}},{key:"heldEvent",value:function(t){return this.held(t)&&this._lastEvent.get(t)||null}},{key:"clearHeld",value:function(){var t,e=ft(this._heldByAction);try{for(e.s();!(t=e.n()).done;){var n=lt(t.value,2),r=n[0],o=n[1];if(0!==o.size){var i=this._lastEvent.get(r);o.clear(),this._lastEvent.delete(r),this.emit("".concat(r,":released"),i||{action:r,control:null,data:void 0})}}}catch(t){e.e(t)}finally{e.f()}}},{key:"dispose",value:function(){if(!this._disposed){this._disposed=!0,cancelAnimationFrame(this._raf);var t,e=ft(this._listeners);try{for(e.s();!(t=e.n()).done;){var n=t.value,r=n.event,o=n.fn;this.controller.off(r,o)}}catch(t){e.e(t)}finally{e.f()}this._listeners.length=0,this._onKeyDownCapture&&window.removeEventListener("keydown",this._onKeyDownCapture,!0),window.removeEventListener("blur",this._onBlur),this.removeAllListeners()}}}])&&vt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o()),mt=JSON.parse('{"00002a7e-0000-1000-8000-00805f9b34fb":"aerobic_heart_rate_lower_limit","00002a84-0000-1000-8000-00805f9b34fb":"aerobic_heart_rate_upper_limit","00002a7f-0000-1000-8000-00805f9b34fb":"aerobic_threshold","00002a80-0000-1000-8000-00805f9b34fb":"age","00002a5a-0000-1000-8000-00805f9b34fb":"aggregate","00002a43-0000-1000-8000-00805f9b34fb":"alert_category_id","00002a42-0000-1000-8000-00805f9b34fb":"alert_category_id_bit_mask","00002a06-0000-1000-8000-00805f9b34fb":"alert_level","00002a44-0000-1000-8000-00805f9b34fb":"alert_notification_control_point","00002a3f-0000-1000-8000-00805f9b34fb":"alert_status","00002ab3-0000-1000-8000-00805f9b34fb":"altitude","00002a81-0000-1000-8000-00805f9b34fb":"anaerobic_heart_rate_lower_limit","00002a82-0000-1000-8000-00805f9b34fb":"anaerobic_heart_rate_upper_limit","00002a83-0000-1000-8000-00805f9b34fb":"anaerobic_threshold","00002a58-0000-1000-8000-00805f9b34fb":"analog","00002a73-0000-1000-8000-00805f9b34fb":"apparent_wind_direction","00002a72-0000-1000-8000-00805f9b34fb":"apparent_wind_speed","00002a01-0000-1000-8000-00805f9b34fb":"gap.appearance","00002aa3-0000-1000-8000-00805f9b34fb":"barometric_pressure_trend","00002a19-0000-1000-8000-00805f9b34fb":"battery_level","00002a49-0000-1000-8000-00805f9b34fb":"blood_pressure_feature","00002a35-0000-1000-8000-00805f9b34fb":"blood_pressure_measurement","00002a9b-0000-1000-8000-00805f9b34fb":"body_composition_feature","00002a9c-0000-1000-8000-00805f9b34fb":"body_composition_measurement","00002a38-0000-1000-8000-00805f9b34fb":"body_sensor_location","00002aa4-0000-1000-8000-00805f9b34fb":"bond_management_control_point","00002aa5-0000-1000-8000-00805f9b34fb":"bond_management_feature","00002a22-0000-1000-8000-00805f9b34fb":"boot_keyboard_input_report","00002a32-0000-1000-8000-00805f9b34fb":"boot_keyboard_output_report","00002a33-0000-1000-8000-00805f9b34fb":"boot_mouse_input_report","00002aa6-0000-1000-8000-00805f9b34fb":"gap.central_address_resolution_support","00002aa8-0000-1000-8000-00805f9b34fb":"cgm_feature","00002aa7-0000-1000-8000-00805f9b34fb":"cgm_measurement","00002aab-0000-1000-8000-00805f9b34fb":"cgm_session_run_time","00002aaa-0000-1000-8000-00805f9b34fb":"cgm_session_start_time","00002aac-0000-1000-8000-00805f9b34fb":"cgm_specific_ops_control_point","00002aa9-0000-1000-8000-00805f9b34fb":"cgm_status","00002a5c-0000-1000-8000-00805f9b34fb":"csc_feature","00002a5b-0000-1000-8000-00805f9b34fb":"csc_measurement","00002a2b-0000-1000-8000-00805f9b34fb":"current_time","00002a66-0000-1000-8000-00805f9b34fb":"cycling_power_control_point","00002a65-0000-1000-8000-00805f9b34fb":"cycling_power_feature","00002a63-0000-1000-8000-00805f9b34fb":"cycling_power_measurement","00002a64-0000-1000-8000-00805f9b34fb":"cycling_power_vector","00002a99-0000-1000-8000-00805f9b34fb":"database_change_increment","00002a85-0000-1000-8000-00805f9b34fb":"date_of_birth","00002a86-0000-1000-8000-00805f9b34fb":"date_of_threshold_assessment","00002a08-0000-1000-8000-00805f9b34fb":"date_time","00002a0a-0000-1000-8000-00805f9b34fb":"day_date_time","00002a09-0000-1000-8000-00805f9b34fb":"day_of_week","00002a7d-0000-1000-8000-00805f9b34fb":"descriptor_value_changed","00002a00-0000-1000-8000-00805f9b34fb":"gap.device_name","00002a7b-0000-1000-8000-00805f9b34fb":"dew_point","00002a56-0000-1000-8000-00805f9b34fb":"digital","00002a0d-0000-1000-8000-00805f9b34fb":"dst_offset","00002a6c-0000-1000-8000-00805f9b34fb":"elevation","00002a87-0000-1000-8000-00805f9b34fb":"email_address","00002a0c-0000-1000-8000-00805f9b34fb":"exact_time_256","00002a88-0000-1000-8000-00805f9b34fb":"fat_burn_heart_rate_lower_limit","00002a89-0000-1000-8000-00805f9b34fb":"fat_burn_heart_rate_upper_limit","00002a26-0000-1000-8000-00805f9b34fb":"firmware_revision_string","00002a8a-0000-1000-8000-00805f9b34fb":"first_name","00002a8b-0000-1000-8000-00805f9b34fb":"five_zone_heart_rate_limits","00002ab2-0000-1000-8000-00805f9b34fb":"floor_number","00002a8c-0000-1000-8000-00805f9b34fb":"gender","00002a51-0000-1000-8000-00805f9b34fb":"glucose_feature","00002a18-0000-1000-8000-00805f9b34fb":"glucose_measurement","00002a34-0000-1000-8000-00805f9b34fb":"glucose_measurement_context","00002a74-0000-1000-8000-00805f9b34fb":"gust_factor","00002a27-0000-1000-8000-00805f9b34fb":"hardware_revision_string","00002a39-0000-1000-8000-00805f9b34fb":"heart_rate_control_point","00002a8d-0000-1000-8000-00805f9b34fb":"heart_rate_max","00002a37-0000-1000-8000-00805f9b34fb":"heart_rate_measurement","00002a7a-0000-1000-8000-00805f9b34fb":"heat_index","00002a8e-0000-1000-8000-00805f9b34fb":"height","00002a4c-0000-1000-8000-00805f9b34fb":"hid_control_point","00002a4a-0000-1000-8000-00805f9b34fb":"hid_information","00002a8f-0000-1000-8000-00805f9b34fb":"hip_circumference","00002a6f-0000-1000-8000-00805f9b34fb":"humidity","00002aad-0000-1000-8000-00805f9b34fb":"indoor_positioning_configuration","00002a1e-0000-1000-8000-00805f9b34fb":"intermediate_temperature","00002a77-0000-1000-8000-00805f9b34fb":"irradiance","00002aa2-0000-1000-8000-00805f9b34fb":"language","00002a90-0000-1000-8000-00805f9b34fb":"last_name","00002aae-0000-1000-8000-00805f9b34fb":"latitude","00002a6b-0000-1000-8000-00805f9b34fb":"ln_control_point","00002a6a-0000-1000-8000-00805f9b34fb":"ln_feature","00002ab0-0000-1000-8000-00805f9b34fb":"local_north_coordinate","00002a0f-0000-1000-8000-00805f9b34fb":"local_time_information","00002a67-0000-1000-8000-00805f9b34fb":"location_and_speed","00002ab5-0000-1000-8000-00805f9b34fb":"location_name","00002aaf-0000-1000-8000-00805f9b34fb":"longitude","00002a2c-0000-1000-8000-00805f9b34fb":"magnetic_declination","00002aa0-0000-1000-8000-00805f9b34fb":"magnetic_flux_density_2D","00002aa1-0000-1000-8000-00805f9b34fb":"magnetic_flux_density_3D","00002a29-0000-1000-8000-00805f9b34fb":"manufacturer_name_string","00002a91-0000-1000-8000-00805f9b34fb":"maximum_recommended_heart_rate","00002a21-0000-1000-8000-00805f9b34fb":"measurement_interval","00002a24-0000-1000-8000-00805f9b34fb":"model_number_string","00002a68-0000-1000-8000-00805f9b34fb":"navigation","00002a46-0000-1000-8000-00805f9b34fb":"new_alert","00002a04-0000-1000-8000-00805f9b34fb":"gap.peripheral_preferred_connection_parameters","00002a02-0000-1000-8000-00805f9b34fb":"gap.peripheral_privacy_flag","00002a5f-0000-1000-8000-00805f9b34fb":"plx_continuous_measurement","00002a60-0000-1000-8000-00805f9b34fb":"plx_features","00002a5e-0000-1000-8000-00805f9b34fb":"plx_spot_check_measurement","00002a50-0000-1000-8000-00805f9b34fb":"pnp_id","00002a75-0000-1000-8000-00805f9b34fb":"pollen_concentration","00002a69-0000-1000-8000-00805f9b34fb":"position_quality","00002a6d-0000-1000-8000-00805f9b34fb":"pressure","00002a4e-0000-1000-8000-00805f9b34fb":"protocol_mode","00002a78-0000-1000-8000-00805f9b34fb":"rainfall","00002a03-0000-1000-8000-00805f9b34fb":"gap.reconnection_address","00002a52-0000-1000-8000-00805f9b34fb":"record_access_control_point","00002a14-0000-1000-8000-00805f9b34fb":"reference_time_information","00002a4d-0000-1000-8000-00805f9b34fb":"report","00002a4b-0000-1000-8000-00805f9b34fb":"report_map","00002a92-0000-1000-8000-00805f9b34fb":"resting_heart_rate","00002a40-0000-1000-8000-00805f9b34fb":"ringer_control_point","00002a41-0000-1000-8000-00805f9b34fb":"ringer_setting","00002a54-0000-1000-8000-00805f9b34fb":"rsc_feature","00002a53-0000-1000-8000-00805f9b34fb":"rsc_measurement","00002a55-0000-1000-8000-00805f9b34fb":"sc_control_point","00002a4f-0000-1000-8000-00805f9b34fb":"scan_interval_window","00002a31-0000-1000-8000-00805f9b34fb":"scan_refresh","00002a5d-0000-1000-8000-00805f9b34fb":"sensor_location","00002a25-0000-1000-8000-00805f9b34fb":"serial_number_string","00002a05-0000-1000-8000-00805f9b34fb":"gatt.service_changed","00002a28-0000-1000-8000-00805f9b34fb":"software_revision_string","00002a93-0000-1000-8000-00805f9b34fb":"sport_type_for_aerobic_and_anaerobic_thresholds","00002a47-0000-1000-8000-00805f9b34fb":"supported_new_alert_category","00002a48-0000-1000-8000-00805f9b34fb":"supported_unread_alert_category","00002a23-0000-1000-8000-00805f9b34fb":"system_id","00002a6e-0000-1000-8000-00805f9b34fb":"temperature","00002a1c-0000-1000-8000-00805f9b34fb":"temperature_measurement","00002a1d-0000-1000-8000-00805f9b34fb":"temperature_type","00002a94-0000-1000-8000-00805f9b34fb":"three_zone_heart_rate_limits","00002a12-0000-1000-8000-00805f9b34fb":"time_accuracy","00002a13-0000-1000-8000-00805f9b34fb":"time_source","00002a16-0000-1000-8000-00805f9b34fb":"time_update_control_point","00002a17-0000-1000-8000-00805f9b34fb":"time_update_state","00002a11-0000-1000-8000-00805f9b34fb":"time_with_dst","00002a0e-0000-1000-8000-00805f9b34fb":"time_zone","00002a71-0000-1000-8000-00805f9b34fb":"true_wind_direction","00002a70-0000-1000-8000-00805f9b34fb":"true_wind_speed","00002a95-0000-1000-8000-00805f9b34fb":"two_zone_heart_rate_limit","00002a07-0000-1000-8000-00805f9b34fb":"tx_power_level","00002ab4-0000-1000-8000-00805f9b34fb":"uncertainty","00002a45-0000-1000-8000-00805f9b34fb":"unread_alert_status","00002a9f-0000-1000-8000-00805f9b34fb":"user_control_point","00002a9a-0000-1000-8000-00805f9b34fb":"user_index","00002a76-0000-1000-8000-00805f9b34fb":"uv_index","00002a96-0000-1000-8000-00805f9b34fb":"vo2_max","00002a97-0000-1000-8000-00805f9b34fb":"waist_circumference","00002a98-0000-1000-8000-00805f9b34fb":"weight","00002a9d-0000-1000-8000-00805f9b34fb":"weight_measurement","00002a9e-0000-1000-8000-00805f9b34fb":"weight_scale_feature","00002a79-0000-1000-8000-00805f9b34fb":"wind_chill"}'),_t={default:{convert:function(t){return t.byteLength?t:null}},"00002901-0000-1000-8000-00805f9b34fb":{convert:function(t){return new TextDecoder("utf-8").decode(t)}},"00002904-0000-1000-8000-00805f9b34fb":{convert:function(t){return t.getUint8()}}},wt=[{description:"Reserved For Future Use",convert:function(t){return t.byteLength?t:null}},{description:"Boolean",convert:function(t){return t.getInt8()}},{description:"unsigned 2-bit integer",convert:function(t){return t.getUint8()}},{description:"unsigned 4-bit integer",convert:function(t){return t.getUint8()}},{description:"unsigned 8-bit integer",convert:function(t){return t.getUint8()}},{description:"unsigned 12-bit integer",convert:function(t){return t.getUint16()}},{description:"unsigned 16-bit integer",convert:function(t){return t.getUint16()}},{description:"unsigned 24-bit integer",convert:function(t){return t.getUint32()}},{description:"unsigned 32-bit integer",convert:function(t){return t.getUint32()}},{description:"unsigned 48-bit integer",convert:function(t){return t.getBigUint64()}},{description:"unsigned 64-bit integer",convert:function(t){return t.getBigUint64()}},{description:"unsigned 128-bit integer",convert:function(t){return[t.getBigUint64(),t.getBigUint64(8)]}},{description:"signed 8-bit integer",convert:function(t){return t.getInt8()}},{description:"signed 12-bit integer",convert:function(t){return t.getInt16()}},{description:"signed 16-bit integer",convert:function(t){return t.getInt16()}},{description:"signed 24-bit integer",convert:function(t){return t.getInt32()}},{description:"signed 32-bit integer",convert:function(t){return t.getInt32()}},{description:"signed 48-bit integer",convert:function(t){return t.getBigInt64()}},{description:"signed 64-bit integer",convert:function(t){return t.getBigInt64()}},{description:"signed 128-bit integer",convert:function(t){return[t.getBigInt64(),t.getBigInt64(8)]}},{description:"IEEE-754 32-bit floating point",convert:function(t){return t.getFloat32()}},{description:"IEEE-754 64-bit floating point",convert:function(t){return t.getFloat64()}},{description:"IEEE-11073 16-bit SFLOAT",convert:function(t){return t}},{description:"IEEE-11073 32-bit FLOAT",convert:function(t){return t}},{description:"IEEE-20601 format",convert:function(t){return t}},{description:"UTF-8 string",convert:function(t){return new TextDecoder("utf-8").decode(t)}},{description:"UTF-16 string",convert:function(t){return new TextDecoder("utf-16").decode(t)}},{description:"Opaque Structure",convert:function(t){return t}}];function xt(t){return xt="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},xt(t)}function St(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Ot(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){St(i,r,o,a,u,"next",t)}function u(t){St(i,r,o,a,u,"throw",t)}a(void 0)})}}function Pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function Et(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(n),!0).forEach(function(e){jt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function jt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Rt(t,e,n){return e&&Tt(t.prototype,e),n&&Tt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Mt(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&&Lt(t,e)}function Lt(t,e){return Lt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Lt(t,e)}function At(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 n,r=Ft(t);if(e){var o=Ft(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===xt(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)}(this,n)}}function Ft(t){return Ft=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ft(t)}var It=function(t,e){var n=null==e?void 0:e.descriptors;if(n){var r=n.find(function(e){return e.uuid===t});if(r)return r.value}return null},Ct=function(t){return"string"==typeof t?t:It("2901",t)||It("00002904-0000-1000-8000-00805f9b34fb",t)},Dt=It.bind(null,"2904"),Nt=function(t){var e=t.description,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CustomType";switch(e){case"Reserved For Future Use":case"Opaque Structure":return n;case"Boolean":return"Button";case"UTF-8 string":case"UTF-16 string":return"Text";default:return"Amount"}},Bt=null,Ut=null;try{Bt=window.ble||window.top.ble,Ut=window.cordova||window.top.cordova}catch(t){}var Wt=function(t){Mt(r,t);var e,n=At(r);function r(){var t,e,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{acceptAllDevices:!0},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BLEDevice",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return kt(this,r),(e=n.call(this)).deviceName=i,e.uuidMap=Et(Et({},mt),a),e.ble=null!==(t=window.ble)&&void 0!==t?t:window.top.ble,e.writes={},null!=o&&o.id?(e.device=o,e.options=null):(e.device=null,e.options=o),e}return Rt(r,[{key:"initialize",value:(e=Ot(regeneratorRuntime.mark(function t(e){var n,r,o=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.device){t.next=6;break}return t.next=3,this.requestDevice(e||this.options);case 3:if(this.device=t.sent,this.device){t.next=6;break}throw"No device selected.";case 6:return t.next=8,this.connect();case 8:(n=t.sent)&&(r=n.characteristics,this.device=n,r.forEach(function(){var t=Ot(regeneratorRuntime.mark(function t(e){var r,i,a,u,c,s,f,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.properties,i=e.characteristic.toLowerCase(),a=o.uuidMap[i],u=Ct(a)||i,c=e.descriptors||[],s=wt[Dt(a)||27],console.log(u,e),c.forEach(function(t){console.log("".concat(t.uuid," | ").concat(u),t)}),r.indexOf("Read"),!(r.indexOf("Write")>=0)){t.next=8;break}if(!o.writes[u]){t.next=7;break}throw new Error('There is already a writable characteristic named "'.concat(u,'".'));case 7:o.writes[u]=function(t){var r;return o.ble.withPromises.write(n.id,e.service,e.characteristic,null!==(r=t.buffer)&&void 0!==r?r:t)};case 8:r.indexOf("Notify")>=0&&(f=Nt(s,u),l=null,o.ble.startNotification(n.id,e.service,e.characteristic,function(t,e){var n=s.convert(new DataView(t));l!==n&&(l=n,o.emit("updated",{control:u,device:o.deviceName,type:f,value:n}))},function(t){throw t}));case 9:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()));case 10:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"requestDevice",value:function(t){var e=this;return console.log("Requesting Device..."),new Promise(function(n,r){var o;console.log("Starting Scan... "),"ios"!==Ut.platformId&&e.ble.isLocationEnabled(function(){console.log("Location is enabled")},function(){console.log("Location is disabled")}),e.ble.startScan("ios"===Ut.platformId&&null!==(o=null==t?void 0:t.optionalServices)&&void 0!==o?o:[],function(r){var o,i=null!==(o=null==t?void 0:t.optionalServices)&&void 0!==o?o:[],a=null;if(console.log("Found",r),"ios"===Ut.platformId)a=r;else{var u=new Uint8Array(r.advertising),c=Array.prototype.map.call(u,function(t){return("00"+t.toString(16)).slice(-2)}).join("");console.log(c.match(/[a-fA-F0-9]{4}/g).join("-")),i.forEach(function(t){var e=t.replace(/\-/g,"");c.match(/[a-fA-F0-9]{2}/g).reverse().join("").indexOf(e)>=0&&(a=r,console.log("Found a match! ".concat(t)))})}a&&(e.ble.stopScan(),n(a))},function(t){console.log("Error",t),e.ble.stopScan(),r(t)})})}},{key:"connect",value:function(){var t=this;return new Promise(function(e,n){if(!t.device)throw n(),"No device selected.";t.ble.connect(t.device.id,function(n){t.emit("updated",{control:"".concat(t.deviceName,"Connection"),device:t.deviceName,target:n,type:"Button",value:1}),e(n)},function(){console.log("".concat(t.deviceName," disconnected.")),t.emit("updated",{control:"".concat(t.deviceName,"Connection"),device:t.deviceName,type:"Button",value:0}),t.writes={}})})}},{key:"disconnect",value:function(){var t=this;this.ble.isConnected(this.device.id,function(){t.ble.disconnect(t.device.id)},function(){throw"Device not connected."})}},{key:"write",value:function(t,e){if(!this.writes[t])throw new Error('No writable characteristic "'.concat(t,'".'));return this.writes[t](e)}}]),r}(o()),Gt=function(t){Mt(o,t);var e,n,r=At(o);function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{acceptAllDevices:!0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BLEDevice",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return kt(this,o),(t=r.call(this)).deviceName=n,t.uuidMap=Et(Et({},mt),i),t.writes={},null!=e&&e.gatt?(t.device=e,t.options=null):(t.device=null,t.options=e),t}return Rt(o,[{key:"initialize",value:(n=Ot(regeneratorRuntime.mark(function t(e){var n,r,o,i,a=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=!!this.device){t.next=9;break}if(navigator.bluetooth){t.next=4;break}throw"This web browser does not support Bluetooth.";case 4:return t.next=6,navigator.bluetooth.requestDevice(e||this.options);case 6:if(this.device=t.sent,this.device){t.next=9;break}throw"No device selected.";case 9:return this.device.addEventListener("gattserverdisconnected",function(){console.log("".concat(a.deviceName," disconnected.")),a.emit("updated",{control:"".concat(a.deviceName,"Connection"),device:a.deviceName,type:"Button",value:0}),a.writes={}}),t.prev=10,t.next=13,this.connect();case 13:if(!t.sent){t.next=22;break}return r=this.device.gatt,t.next=17,r.getPrimaryServices();case 17:t.sent.forEach(function(){var t=Ot(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getCharacteristics();case 2:t.sent.forEach(function(){var t=Ot(regeneratorRuntime.mark(function t(e){var n,r,o,i,u,c,s,f,l,p;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.properties,r=a.uuidMap[e.uuid],o=Ct(r)||e.uuid,i=wt[27],console.log(o,e),t.prev=3,t.next=6,e.getDescriptors();case 6:u=t.sent,c=!1,u.forEach(function(){var t=Ot(regeneratorRuntime.mark(function t(e){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=null!==(n=_t[e.uuid])&&void 0!==n?n:_t.default,t.next=4,e.readValue();case 4:t.t1=t.sent,r=t.t0.convert.call(t.t0,t.t1),"00002904-0000-1000-8000-00805f9b34fb"===e.uuid&&(i=wt[r]||wt[0],c=!0),console.log("".concat(e.uuid," | ").concat(o),r),t.next=13;break;case 10:t.prev=10,t.t2=t.catch(0),console.warn('Error converting data from descriptor "'.concat(e.uuid,'".'),t.t2);case 13:case"end":return t.stop()}},t,null,[[0,10]])}));return function(e){return t.apply(this,arguments)}}()),c||(s=Dt(r))&&(i=wt[s]),t.next=14;break;case 12:t.prev=12,t.t0=t.catch(3);case 14:if(n.read,!n.write){t.next=19;break}if(!a.writes[o]){t.next=18;break}throw new Error('There is already a writable characteristic named "'.concat(o,'".'));case 18:a.writes[o]=function(t){var n,r=t instanceof DataView?t:new DataView(null!==(n=t.buffer)&&void 0!==n?n:t);return e.writeValueWithResponse(r)};case 19:if(!n.notify){t.next=25;break}return f=function(t){var e=t.currentTarget,n=i.convert(e.value);p!==n&&(p=n,a.emit("updated",{control:o,device:a.deviceName,type:l,value:n}))},l=Nt(i,o),p=null,t.next=24,e.startNotifications();case 24:e.addEventListener("characteristicvaluechanged",f);case 25:case"end":return t.stop()}},t,null,[[3,12]])}));return function(e){return t.apply(this,arguments)}}());case 4:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),t.next=23;break;case 22:throw"Not able to connect to device.";case 23:t.next=29;break;case 25:throw t.prev=25,t.t0=t.catch(10),n||(null!==(o=this.device)&&void 0!==o&&null!==(i=o.gatt)&&void 0!==i&&i.connected&&this.device.gatt.disconnect(),this.device=null),t.t0;case 29:case"end":return t.stop()}},t,this,[[10,25]])})),function(t){return n.apply(this,arguments)})},{key:"connect",value:(e=Ot(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.device){t.next=4;break}throw"No device selected.";case 4:return e=this.device.gatt,t.next=7,e.connect();case 7:if(!e.connected){t.next=12;break}return this.emit("updated",{control:"".concat(this.deviceName,"Connection"),device:this.deviceName,target:this.device,type:"Button",value:1}),t.abrupt("return",!0);case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"disconnect",value:function(){var t,e;if(null!==(t=this.device)&&void 0!==t&&null!==(e=t.gatt)&&void 0!==e&&e.connected)return this.device.gatt.disconnect();throw"Device not connected."}},{key:"write",value:function(t,e){if(!this.writes[t])throw new Error('No writable characteristic "'.concat(t,'".'));return this.writes[t](e)}}]),o}(o());const Vt=Bt?Wt:Gt;function zt(t){return zt="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},zt(t)}function qt(t,e){return qt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},qt(t,e)}function Jt(t){return Jt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Jt(t)}const Kt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qt(t,e)}(i,t);var e,n,r,o=(n=i,r=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}}(),function(){var t,e=Jt(n);if(r){var o=Jt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===zt(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)}(this,t)});function i(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"FabricDevice";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).pressed=0,t.on("mousedown",function(r){e.pressed=1,e.emit("updated",{control:"FabricPointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.pointer.x,y:r.pointer.y})}),t.on("mousemove",function(r){e.emit("updated",{control:"FabricPointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.pointer.x,y:r.pointer.y})}),t.on("mouseup",function(r){e.pressed=0,e.emit("updated",{control:"FabricPointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.pointer.x,y:r.pointer.y})}),t.on("dropped",function(r){e.emit("updated",{control:"FabricDrop",device:n,event:r,target:t,type:"Drop",value:r.dropZone?r.dropZone.dropZone:"",x:r.dropZone?r.dropZoneX:r.x,y:r.dropZone?r.dropZoneY:r.y}),r.stopPropagation()}),t.on("dragover",function(r){e.emit("updated",{control:"FabricDrag",device:n,event:r,target:t,type:"Drop",value:r.dropZone?r.dropZone.dropZone:"",x:r.dropZone?r.dropZoneX:r.x,y:r.dropZone?r.dropZoneY:r.y}),r.stopPropagation()}),t.on("rotating",function(r){e.emit("updated",{control:"FabricDial",device:n,event:r,target:t,type:"Dial",value:t.angle/360})}),e}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(o());function Zt(t){return Zt="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},Zt(t)}function Ht(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $t(t,e,n){return e&&Yt(t.prototype,e),n&&Yt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Xt(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&&Qt(t,e)}function Qt(t,e){return Qt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Qt(t,e)}function te(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 n,r=ee(t);if(e){var o=ee(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Zt(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)}(this,n)}}function ee(t){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ee(t)}function ne(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var re=function(t,e){var n=t.x,r=t.y,o=Math.sqrt(n*n+r*r);if(o>1)t.x*=1/o,t.y*=1/o;else if(o<e)t.x=0,t.y=0;else{var i=1-e;t.x=(n-e)/i,t.y=(r-e)/i}return t},oe=function t(){for(var e=function(t){if(Array.isArray(t))return ne(t)}(i=window.navigator.getGamepads())||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return ne(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ne(t,e):void 0}}(i)||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.")}(),n=0;n<e.length;n++){var r=e[n];if(r){var o=ue[r.index];o?o.update(r):ue[r.index]=new ce(r)}}var i;window.requestAnimationFrame(t)},ie={duration:500,startDelay:0,strongMagnitude:1,weakMagnitude:1},ae={a0:"LeftStick",a1:"RightStick",b0:"AButton",b1:"BButton",b2:"XButton",b3:"YButton",b4:"LeftBumper",b5:"RightBumper",b6:"LeftTrigger",b7:"RightTrigger",b8:"BackButton",b9:"StartButton",b10:"LeftStickButton",b11:"RightStickButton",b12:"UpDPad",b13:"DownDPad",b14:"LeftDPad",b15:"RightDPad"},ue=[];window.addEventListener("gamepadconnected",function(){oe()});var ce=function(t){Xt(n,t);var e=te(n);function n(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1;Ht(this,n),(r=e.call(this)).source=t,r.deadzone=i,r.axes=[];for(var a=0;a<t.axes.length>>1;a++)r.axes.push(re({x:t.axes[2*a],y:t.axes[2*a+1]},i));r.buttons=[];for(var u=0;u<t.buttons.length;u++)r.buttons.push(t.buttons[u].value);return r.id=o||"".concat(t.id," - ").concat(t.index),r}return $t(n,[{key:"dualRumble",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;ie.duration=t,ie.startDelay=e,ie.strongMagnitude=n,ie.weakMagnitude=r,this.source.vibrationActuator.playEffect("dual-rumble",ie)}},{key:"update",value:function(t){for(var e=this.axes,n=this.buttons,r=0;r<e.length;r++){var o=e[r],i=re({x:t.axes[2*r],y:t.axes[2*r+1]},this.deadzone);if(o.x!==i.x||o.y!==i.y){var a=i.x,u=i.y;o.x=a,o.y=u,this.emit("updated",{control:ae["a".concat(r)],device:this.id,target:this,type:"Joystick",x:a,y:u})}}for(var c=0;c<t.buttons.length;c++){var s=t.buttons[c].value;s!==n[c]&&(n[c]=s,this.emit("updated",{control:ae["b".concat(c)],device:this.id,target:this,type:"Button",value:s}))}}}]),n}(o());const se=function(t){Xt(n,t);var e=te(n);function n(){var t;return Ht(this,n),(t=e.call(this)).eventHandlers=[],window.addEventListener("gamepadconnected",function(){t.updateGamepads()}),t.updateGamepads(),t}return $t(n,[{key:"updateGamepads",value:function(){for(var t=this,e=0;e<this.eventHandlers.length;e++)this.eventHandlers[e].gamepad.off("updated",this.eventHandlers[e].handler);this.eventHandlers.length=0;for(var n=0;n<ue.length;n++){var r=function(e){t.emit("updated",e)};ue[n].on("updated",r),this.eventHandlers.push({gamepad:ue[n],handler:r})}}}]),n}(o());function fe(t){return fe="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},fe(t)}function le(t,e){return le=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},le(t,e)}function pe(t){return pe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pe(t)}const he=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)}(i,t);var e,n,r,o=(n=i,r=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}}(),function(){var t,e=pe(n);if(r){var o=pe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===fe(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)}(this,t)});function i(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Keyboard";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t=o.call(this),window.addEventListener("keydown",function(n){t.emit("updated",{control:n.code,device:e,event:n,type:"Button",value:1})}),window.addEventListener("keyup",function(n){t.emit("updated",{control:n.code,device:e,event:n,type:"Button",value:0})}),t}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(o());function ve(t){return ve="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},ve(t)}function de(t,e){return de=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},de(t,e)}function ye(t){return ye=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ye(t)}const be=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&de(t,e)}(i,t);var e,n,r,o=(n=i,r=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}}(),function(){var t,e=ye(n);if(r){var o=ye(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ve(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)}(this,t)});function i(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"PageDevice";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).channel=new W(e),t.channel.addEventListener("message",function(e){t.emit("updated",e)}),t}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(o());function ge(t){return ge="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},ge(t)}function me(t,e){return me=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},me(t,e)}function _e(t){return _e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_e(t)}const we=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&me(t,e)}(i,t);var e,n,r,o=(n=i,r=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}}(),function(){var t,e=_e(n);if(r){var o=_e(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ge(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)}(this,t)});function i(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"PixiDevice";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).pressed=0,t.on("pointerdown",function(r){e.pressed=1,e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.x,y:r.y})}),t.on("pointermove",function(r){e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.x,y:r.y})}),t.on("pointerup",function(r){e.pressed=0,e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.x,y:r.y})}),e}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(o());function xe(t){return xe="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},xe(t)}function Se(t,e){return Se=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Se(t,e)}function Oe(t){return Oe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Oe(t)}const Pe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Se(t,e)}(i,t);var e,n,r,o=(n=i,r=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}}(),function(){var t,e=Oe(n);if(r){var o=Oe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===xe(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)}(this,t)});function i(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"PointerDevice";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).pressed=0,t.addEventListener("pointerdown",function(r){var o,i,a,u;e.pressed=1,e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:null!==(o=r.x)&&void 0!==o?o:null===(i=r.pointer)||void 0===i?void 0:i.x,y:null!==(a=r.y)&&void 0!==a?a:null===(u=r.pointer)||void 0===u?void 0:u.y})}),t.addEventListener("pointermove",function(r){var o,i,a,u;e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:null!==(o=r.x)&&void 0!==o?o:null===(i=r.pointer)||void 0===i?void 0:i.x,y:null!==(a=r.y)&&void 0!==a?a:null===(u=r.pointer)||void 0===u?void 0:u.y})}),t.addEventListener("pointerup",function(r){var o,i,a,u;e.pressed=0,e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:null!==(o=r.x)&&void 0!==o?o:null===(i=r.pointer)||void 0===i?void 0:i.x,y:null!==(a=r.y)&&void 0!==a?a:null===(u=r.pointer)||void 0===u?void 0:u.y})}),e}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(o());function Ee(t){return Ee="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},Ee(t)}function je(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function ke(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Te(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Te(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Te(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Re(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Me(t,e){return Me=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Me(t,e)}function Le(t){return Le=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Le(t)}var Ae=[250,500,1e3,2e3];function Fe(){return"undefined"==typeof window?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function Ie(t){return String(null!=t?t:"").replace(/\s+/g," ").trim().toLowerCase()}function Ce(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?t.filter(function(t){return t&&"string"==typeof t.control&&t.type&&Array.isArray(t.phrases)}).map(function(t){return{control:t.control,type:t.type,phrases:t.phrases.map(Ie).filter(Boolean),value:t.value,x:t.x,y:t.y,releaseMs:"number"==typeof t.releaseMs?t.releaseMs:null}}).filter(function(t){return t.phrases.length>0}):[]}var De=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Me(t,e)}(s,t);var e,n,r,o,i,a,u,c=(a=s,u=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}}(),function(){var t,e=Le(a);if(u){var n=Le(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Ee(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)}(this,t)});function s(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),"string"==typeof e&&(e={device:e}),(t=c.call(this)).device=e.device||"Speech",t.transcriptControl=e.transcriptControl||"SpeechTranscript",t.lang=e.lang||"en-US",t.interimResults=Boolean(e.interimResults),t.cooldownMs="number"==typeof e.cooldownMs?e.cooldownMs:800,t._Ctor=Fe(),t._mappings=Ce(e.mappings),t._cooldownUntil=new Map,t._releaseTimers=new Map,t._recognition=null,t._active=!1,t._listening=!1,t._starting=!1,t._recovering=!1,t._intentionalStop=!1,t._failCount=0,t._destroyed=!1,t._restartTimer=null,t._stopWaitTimer=null,t._startWatchTimer=null,t._warmResult=null,t._warmPromise=null,t._onBlur=function(){t.setActive(!1)},"undefined"!=typeof window&&window.addEventListener("blur",t._onBlur),t}return e=s,n=[{key:"setMappings",value:function(t){this._mappings=Ce(t)}},{key:"setActive",value:function(t){var e=Boolean(t);if(this._active!==e){if(this._active=e,!e)return this._failCount=0,void this._stopRecognition();this._shouldListen()&&this._scheduleStart(0)}}},{key:"start",value:function(){this.setActive(!0)}},{key:"stop",value:function(){this.setActive(!1)}},{key:"destroy",value:function(){this._destroyed=!0,"undefined"!=typeof window&&window.removeEventListener("blur",this._onBlur),this._clearRestartTimer(),this._clearStopWaitTimer(),this._clearStartWatchTimer(),this._clearAllReleaseTimers(),this.setActive(!1),this.removeAllListeners()}},{key:"_shouldListen",value:function(){return this._active&&!this._destroyed&&null!=this._Ctor}},{key:"_clearRestartTimer",value:function(){null!=this._restartTimer&&(clearTimeout(this._restartTimer),this._restartTimer=null)}},{key:"_clearStopWaitTimer",value:function(){null!=this._stopWaitTimer&&(clearTimeout(this._stopWaitTimer),this._stopWaitTimer=null)}},{key:"_clearStartWatchTimer",value:function(){null!=this._startWatchTimer&&(clearTimeout(this._startWatchTimer),this._startWatchTimer=null)}},{key:"_clearAllReleaseTimers",value:function(){var t,e=ke(this._releaseTimers.values());try{for(e.s();!(t=e.n()).done;){var n=t.value;clearTimeout(n)}}catch(t){e.e(t)}finally{e.f()}this._releaseTimers.clear()}},{key:"_clearReleaseTimer",value:function(t){var e=this._releaseTimers.get(t);null!=e&&(clearTimeout(e),this._releaseTimers.delete(t))}},{key:"_detach",value:function(t){t.onstart=null,t.onresult=null,t.onerror=null,t.onend=null}},{key:"_scheduleStart",value:function(t){var e=this;this._clearRestartTimer(),this._shouldListen()&&(this._restartTimer=setTimeout(function(){e._restartTimer=null,e._startRecognition()},t))}},{key:"_noteRecoverableFailure",value:function(){var t;if(this._failCount+=1,this._starting=!1,this._listening=!1,this._shouldListen()){if(this._failCount>Ae.length)return this._recovering=!1,void this.setActive(!1);this._recovering=!0;var e=null!==(t=Ae[this._failCount-1])&&void 0!==t?t:Ae[Ae.length-1];this._scheduleStart(e)}else this._recovering=!1}},{key:"_warmCapture",value:function(){var t=this;if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this._warmResult=null),null!=this._warmResult)return Promise.resolve(this._warmResult);if(this._warmPromise)return this._warmPromise;var e="undefined"!=typeof navigator?navigator.mediaDevices:null;if(null==e||!e.getUserMedia)return this._warmResult=!0,Promise.resolve(!0);var n=e.getUserMedia({audio:!0}).then(function(e){var n,r=ke(e.getTracks());try{for(r.s();!(n=r.n()).done;)n.value.stop()}catch(t){r.e(t)}finally{r.f()}return t._warmResult=!0,!0}).catch(function(){return t._warmResult=!1,!1}),r=Promise.race([n,new Promise(function(e){setTimeout(function(){var n;return e(null!==(n=t._warmResult)&&void 0!==n&&n)},1500)})]);return this._warmPromise=r.finally(function(){t._warmPromise=null}),this._warmPromise}},{key:"_stopRecognition",value:function(){var t=this;this._clearRestartTimer(),this._clearStartWatchTimer(),this._starting=!1,this._recovering=!1;var e=this._recognition;if(!e)return this._intentionalStop=!1,this._clearStopWaitTimer(),void(this._listening=!1);this._intentionalStop=!0;try{e.stop()}catch(t){try{e.abort()}catch(t){}}this._clearStopWaitTimer(),this._stopWaitTimer=setTimeout(function(){t._stopWaitTimer=null,t._recognition===e&&(t._recognition=null,t._detach(e)),t._intentionalStop=!1,t._listening=!1,t._shouldListen()&&t._scheduleStart(250)},500)}},{key:"_startRecognition",value:(o=regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this._shouldListen()&&!this._listening&&!this._starting&&!this._recognition){t.next=2;break}return t.abrupt("return");case 2:if(this._clearRestartTimer(),this._starting=!0,!(null==this._warmResult||this._failCount>0)){t.next=10;break}return t.next=7,this._warmCapture(this._failCount>0);case 7:if(this._shouldListen()&&!this._listening&&!this._recognition){t.next=10;break}return this._starting=!1,t.abrupt("return");case 10:e=new this._Ctor,this._recognition=e,e.continuous=!0,e.interimResults=!0,e.lang=this.lang,e.onstart=function(){n._recognition===e&&(n._clearStartWatchTimer(),n._starting=!1,n._failCount=0,n._recovering=!1,n._listening=!0)},e.onresult=function(t){n._recognition===e&&n._handleResult(t)},e.onerror=function(t){if(n._recognition===e){var r=t.error||"";if("aborted"!==r&&"no-speech"!==r){if(n._clearStartWatchTimer(),n._recognition=null,n._detach(e),n._starting=!1,n._listening=!1,"not-allowed"===r||"service-not-allowed"===r)return n._intentionalStop=!1,n._clearStopWaitTimer(),n._recovering=!1,void n.setActive(!1);n._intentionalStop||("audio-capture"===r&&(n._warmResult=null),n._noteRecoverableFailure())}}},e.onend=function(){n._clearStartWatchTimer(),n._recognition===e&&(n._recognition=null,n._detach(e)),n._starting=!1,n._listening=!1,n._intentionalStop=!1,n._clearStopWaitTimer(),n._shouldListen()&&n._scheduleStart(250)};try{e.start(),this._clearStartWatchTimer(),this._startWatchTimer=setTimeout(function(){if(n._startWatchTimer=null,n._recognition===e&&!n._listening){try{e.abort()}catch(t){}n._recognition===e&&(n._recognition=null,n._detach(e),n._noteRecoverableFailure())}},3e3)}catch(t){this._clearStartWatchTimer(),this._recognition=null,this._detach(e),this._noteRecoverableFailure()}case 20:case"end":return t.stop()}},t,this)}),i=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=o.apply(t,e);function a(t){je(i,n,r,a,u,"next",t)}function u(t){je(i,n,r,a,u,"throw",t)}a(void 0)})},function(){return i.apply(this,arguments)})},{key:"_handleResult",value:function(t){for(var e=Date.now(),n=t.resultIndex;n<t.results.length;n++){var r,o=t.results[n];if(o){var i=o[0],a=null!==(r=null==i?void 0:i.transcript)&&void 0!==r?r:"",u=String(a).replace(/\s+/g," ").trim();if(u){var c=Boolean(o.isFinal),s="number"==typeof(null==i?void 0:i.confidence)?i.confidence:void 0;if(c){var f,l=Ie(u),p=[],h=[],v=new Set,d=ke(this._mappings);try{for(d.s();!(f=d.n()).done;){var y=f.value;y.phrases.includes(l)&&(e<(this._cooldownUntil.get(y.control)||0)||(p.push(y),v.has(y.control)||(v.add(y.control),h.push(y.control))))}}catch(t){d.e(t)}finally{d.f()}this.emit("updated",{control:this.transcriptControl,device:this.device,type:"Data",value:{text:u,isFinal:!0,confidence:s,matchedControls:h},event:t});for(var b=0,g=p;b<g.length;b++){var m=g[b];this._cooldownUntil.set(m.control,e+this.cooldownMs),this._emitMapping(m,t)}}else this.interimResults&&this.emit("updated",{control:this.transcriptControl,device:this.device,type:"Data",value:{text:u,isFinal:!1,confidence:s,matchedControls:[]},event:t})}}}}},{key:"_emitMapping",value:function(t,e){var n=this;this._clearReleaseTimer(t.control);var r=t.type;if("Button"===r)return this.emit("updated",{control:t.control,device:this.device,type:"Button",value:1,event:e}),void queueMicrotask(function(){n._destroyed||n.emit("updated",{control:t.control,device:n.device,type:"Button",value:0,event:e})});if("Joystick"===r){var o="number"==typeof t.x?t.x:0,i="number"==typeof t.y?t.y:0;return this.emit("updated",{control:t.control,device:this.device,type:"Joystick",x:o,y:i,event:e}),void(null!=t.releaseMs&&this._releaseTimers.set(t.control,setTimeout(function(){n._releaseTimers.delete(t.control),n._destroyed||n.emit("updated",{control:t.control,device:n.device,type:"Joystick",x:0,y:0,event:e})},t.releaseMs)))}var a=t.value;this.emit("updated",{control:t.control,device:this.device,type:r,value:a,event:e}),null==t.releaseMs||"Amount"!==r&&"Dial"!==r||this._releaseTimers.set(t.control,setTimeout(function(){n._releaseTimers.delete(t.control),n._destroyed||n.emit("updated",{control:t.control,device:n.device,type:r,value:0,event:e})},t.releaseMs))}}],r=[{key:"supported",value:function(){return null!=Fe()}}],n&&Re(e.prototype,n),r&&Re(e,r),Object.defineProperty(e,"prototype",{writable:!1}),s}(o());const Ne={BLEDevice:Vt,FabricDevice:Kt,GamepadDevice:se,KeyboardDevice:he,PageDevice:be,PixiDevice:we,PointerDevice:Pe,SpeechDevice:De};window.engagefully={Controller:ct,ActionMap:gt,actions:Q,devices:Ne,quantizeStick:function(t,e){var n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=null!==(n=i.sectors)&&void 0!==n?n:8,u=null!==(r=i.deadzone)&&void 0!==r?r:.35,c=null!==(o=i.forward)&&void 0!==o?o:"-y";if(Math.hypot(t,e)<u||a<1)return null;var s="+y"===c?e:-e,f=Math.atan2(t,s);return{sector:(Math.round(f/(2*Math.PI/a))%a+a)%a}},focusGate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="function"==typeof t.extra?t.extra:function(){return!1};return function(){if(e())return!1;var t="undefined"!=typeof document?document.activeElement:null;if(!t||t===document.body)return!0;var n=t.tagName;return"INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n&&!t.isContentEditable}}}},6266:(t,e,n)=>{n(5767),n(8132),n(8388),n(7470),n(4882),n(1520),n(7476),n(9622),n(9375),n(3533),n(4672),n(4157),n(5095),n(9892),n(5115),n(9176),n(8838),n(6253),n(9730),n(6059),n(8377),n(1084),n(4299),n(1246),n(726),n(1901),n(5972),n(3403),n(2516),n(9371),n(6479),n(1736),n(1889),n(5177),n(6943),n(6503),n(6786),n(932),n(7526),n(1591),n(9073),n(347),n(579),n(4669),n(7710),n(5789),n(3514),n(9978),n(8472),n(6946),n(5068),n(413),n(191),n(8306),n(4564),n(9115),n(9539),n(6620),n(2850),n(823),n(7732),n(856),n(703),n(1539),n(5292),n(6629),n(3694),n(7648),n(7795),n(4531),n(3605),n(6780),n(9937),n(511),n(1822),n(9977),n(1031),n(6331),n(1560),n(774),n(522),n(8295),n(7842),n(110),n(75),n(4336),n(1802),n(8837),n(6773),n(5745),n(3057),n(3750),n(3369),n(9564),n(2e3),n(8977),n(2310),n(4899),n(1842),n(6997),n(3946),n(8269),n(6108),n(6774),n(1466),n(9357),n(6142),n(1876),n(851),n(8416),n(8184),n(147),n(9192),n(142),n(1786),n(5368),n(6964),n(2152),n(4821),n(9103),n(1303),n(3318),n(162),n(3834),n(1572),n(2139),n(685),n(5535),n(7347),n(3049),n(6633),n(8989),n(8270),n(4510),n(3984),n(5769),n(55),n(6014),t.exports=n(5645)},911:(t,e,n)=>{n(1268),t.exports=n(5645).Array.flatMap},990:(t,e,n)=>{n(2773),t.exports=n(5645).Array.includes},5434:(t,e,n)=>{n(3276),t.exports=n(5645).Object.entries},8051:(t,e,n)=>{n(8351),t.exports=n(5645).Object.getOwnPropertyDescriptors},8250:(t,e,n)=>{n(6409),t.exports=n(5645).Object.values},4952:(t,e,n)=>{"use strict";n(851),n(9865),t.exports=n(5645).Promise.finally},6197:(t,e,n)=>{n(2770),t.exports=n(5645).String.padEnd},4160:(t,e,n)=>{n(1784),t.exports=n(5645).String.padStart},4039:(t,e,n)=>{n(4325),t.exports=n(5645).String.trimRight},6728:(t,e,n)=>{n(5869),t.exports=n(5645).String.trimLeft},3568:(t,e,n)=>{n(9665),t.exports=n(8787).f("asyncIterator")},115:(t,e,n)=>{n(4579),t.exports=n(1327).global},5663:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},2159:(t,e,n)=>{var r=n(6727);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},1327:t=>{var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},9216:(t,e,n)=>{var r=n(5663);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},9666:(t,e,n)=>{t.exports=!n(7929)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},7467:(t,e,n)=>{var r=n(6727),o=n(3938).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},3856:(t,e,n)=>{var r=n(3938),o=n(1327),i=n(9216),a=n(1818),u=n(7069),c="prototype",s=function(t,e,n){var f,l,p,h=t&s.F,v=t&s.G,d=t&s.S,y=t&s.P,b=t&s.B,g=t&s.W,m=v?o:o[e]||(o[e]={}),_=m[c],w=v?r:d?r[e]:(r[e]||{})[c];for(f in v&&(n=e),n)(l=!h&&w&&void 0!==w[f])&&u(m,f)||(p=l?w[f]:n[f],m[f]=v&&"function"!=typeof w[f]?n[f]:b&&l?i(p,r):g&&w[f]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[c]=t[c],e}(p):y&&"function"==typeof p?i(Function.call,p):p,y&&((m.virtual||(m.virtual={}))[f]=p,t&s.R&&_&&!_[f]&&a(_,f,p)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},7929:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},3938:t=>{var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},7069:t=>{var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},1818:(t,e,n)=>{var r=n(4743),o=n(3101);t.exports=n(9666)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},3758:(t,e,n)=>{t.exports=!n(9666)&&!n(7929)(function(){return 7!=Object.defineProperty(n(7467)("div"),"a",{get:function(){return 7}}).a})},6727:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},4743:(t,e,n)=>{var r=n(2159),o=n(3758),i=n(3206),a=Object.defineProperty;e.f=n(9666)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},3101:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},3206:(t,e,n)=>{var r=n(6727);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},4579:(t,e,n)=>{var r=n(3856);r(r.G,{global:n(3938)})},4963:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},3365:(t,e,n)=>{var r=n(2032);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},7722:(t,e,n)=>{var r=n(6314)("unscopables"),o=Array.prototype;null==o[r]&&n(7728)(o,r,{}),t.exports=function(t){o[r][t]=!0}},6793:(t,e,n)=>{"use strict";var r=n(4496)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},3328:t=>{t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},7007:(t,e,n)=>{var r=n(5286);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},5216:(t,e,n)=>{"use strict";var r=n(508),o=n(2337),i=n(875);t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),u=o(t,a),c=o(e,a),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?a:o(s,a))-c,a-u),l=1;for(c<u&&u<c+f&&(l=-1,c+=f-1,u+=f-1);f-- >0;)c in n?n[u]=n[c]:delete n[u],u+=l,c+=l;return n}},6852:(t,e,n)=>{"use strict";var r=n(508),o=n(2337),i=n(875);t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,s=void 0===c?n:o(c,n);s>u;)e[u++]=t;return e}},9315:(t,e,n)=>{var r=n(2110),o=n(875),i=n(2337);t.exports=function(t){return function(e,n,a){var u,c=r(e),s=o(c.length),f=i(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},50:(t,e,n)=>{var r=n(741),o=n(9797),i=n(508),a=n(875),u=n(6886);t.exports=function(t,e){var n=1==t,c=2==t,s=3==t,f=4==t,l=6==t,p=5==t||l,h=e||u;return function(e,u,v){for(var d,y,b=i(e),g=o(b),m=r(u,v,3),_=a(g.length),w=0,x=n?h(e,_):c?h(e,0):void 0;_>w;w++)if((p||w in g)&&(y=m(d=g[w],w,b),t))if(n)x[w]=y;else if(y)switch(t){case 3:return!0;case 5:return d;case 6:return w;case 2:x.push(d)}else if(f)return!1;return l?-1:s||f?f:x}}},7628:(t,e,n)=>{var r=n(4963),o=n(508),i=n(9797),a=n(875);t.exports=function(t,e,n,u,c){r(e);var s=o(t),f=i(s),l=a(s.length),p=c?l-1:0,h=c?-1:1;if(n<2)for(;;){if(p in f){u=f[p],p+=h;break}if(p+=h,c?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;c?p>=0:l>p;p+=h)p in f&&(u=e(u,f[p],p,s));return u}},2736:(t,e,n)=>{var r=n(5286),o=n(4302),i=n(6314)("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},6886:(t,e,n)=>{var r=n(2736);t.exports=function(t,e){return new(r(t))(e)}},4398:(t,e,n)=>{"use strict";var r=n(4963),o=n(5286),i=n(7242),a=[].slice,u={};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),c=function(){var r=n.concat(a.call(arguments));return this instanceof c?function(t,e,n){if(!(e in u)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";u[e]=Function("F,a","return new F("+r.join(",")+")")}return u[e](t,n)}(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(c.prototype=e.prototype),c}},1488:(t,e,n)=>{var r=n(2032),o=n(6314)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},2032:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},9824:(t,e,n)=>{"use strict";var r=n(9275).f,o=n(2503),i=n(4408),a=n(741),u=n(3328),c=n(3531),s=n(2923),f=n(5436),l=n(2974),p=n(7057),h=n(4728).fastKey,v=n(1616),d=p?"_s":"size",y=function(t,e){var n,r=h(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,s){var f=t(function(t,r){u(t,f,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[d]=0,null!=r&&c(r,n,t[s],t)});return i(f.prototype,{clear:function(){for(var t=v(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[d]=0},delete:function(t){var n=v(this,e),r=y(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[d]--}return!!r},forEach:function(t){v(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!y(v(this,e),t)}}),p&&r(f.prototype,"size",{get:function(){return v(this,e)[d]}}),f},def:function(t,e,n){var r,o,i=y(t,e);return i?i.v=n:(t._l=i={i:o=h(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[d]++,"F"!==o&&(t._i[o]=i)),t},getEntry:y,setStrong:function(t,e,n){s(t,e,function(t,n){this._t=v(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?f(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,f(1))},n?"entries":"values",!n,!0),l(e)}}},3657:(t,e,n)=>{"use strict";var r=n(4408),o=n(4728).getWeak,i=n(7007),a=n(5286),u=n(3328),c=n(3531),s=n(50),f=n(9181),l=n(1616),p=s(5),h=s(6),v=0,d=function(t){return t._l||(t._l=new y)},y=function(){this.a=[]},b=function(t,e){return p(t.a,function(t){return t[0]===e})};y.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var s=t(function(t,r){u(t,s,e,"_i"),t._t=e,t._i=v++,t._l=void 0,null!=r&&c(r,n,t[i],t)});return r(s.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?d(l(this,e)).delete(t):n&&f(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?d(l(this,e)).has(t):n&&f(n,this._i)}}),s},def:function(t,e,n){var r=o(i(e),!0);return!0===r?d(t).set(e,n):r[t._i]=n,t},ufstore:d}},5795:(t,e,n)=>{"use strict";var r=n(3816),o=n(2985),i=n(7234),a=n(4408),u=n(4728),c=n(3531),s=n(3328),f=n(5286),l=n(4253),p=n(7462),h=n(2943),v=n(266);t.exports=function(t,e,n,d,y,b){var g=r[t],m=g,_=y?"set":"add",w=m&&m.prototype,x={},S=function(t){var e=w[t];i(w,t,"delete"==t||"has"==t?function(t){return!(b&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return b&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof m&&(b||w.forEach&&!l(function(){(new m).entries().next()}))){var O=new m,P=O[_](b?{}:-0,1)!=O,E=l(function(){O.has(1)}),j=p(function(t){new m(t)}),k=!b&&l(function(){for(var t=new m,e=5;e--;)t[_](e,e);return!t.has(-0)});j||((m=e(function(e,n){s(e,m,t);var r=v(new g,e,m);return null!=n&&c(n,y,r[_],r),r})).prototype=w,w.constructor=m),(E||k)&&(S("delete"),S("has"),y&&S("get")),(k||P)&&S(_),b&&w.clear&&delete w.clear}else m=d.getConstructor(e,t,y,_),a(m.prototype,n),u.NEED=!0;return h(m,t),x[t]=m,o(o.G+o.W+o.F*(m!=g),x),b||d.setStrong(m,t,y),m}},5645:t=>{var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},2811:(t,e,n)=>{"use strict";var r=n(9275),o=n(681);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},741:(t,e,n)=>{var r=n(4963);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},3537:(t,e,n)=>{"use strict";var r=n(4253),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},870:(t,e,n)=>{"use strict";var r=n(7007),o=n(1689),i="number";t.exports=function(t){if("string"!==t&&t!==i&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),t!=i)}},1355:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},7057:(t,e,n)=>{t.exports=!n(4253)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},2457:(t,e,n)=>{var r=n(5286),o=n(3816).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},4430:t=>{t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},5541:(t,e,n)=>{var r=n(7184),o=n(4548),i=n(4682);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,u=n(t),c=i.f,s=0;u.length>s;)c.call(t,a=u[s++])&&e.push(a);return e}},2985:(t,e,n)=>{var r=n(3816),o=n(5645),i=n(7728),a=n(7234),u=n(741),c="prototype",s=function(t,e,n){var f,l,p,h,v=t&s.F,d=t&s.G,y=t&s.S,b=t&s.P,g=t&s.B,m=d?r:y?r[e]||(r[e]={}):(r[e]||{})[c],_=d?o:o[e]||(o[e]={}),w=_[c]||(_[c]={});for(f in d&&(n=e),n)p=((l=!v&&m&&void 0!==m[f])?m:n)[f],h=g&&l?u(p,r):b&&"function"==typeof p?u(Function.call,p):p,m&&a(m,f,p,t&s.U),_[f]!=p&&i(_,f,h),b&&w[f]!=p&&(w[f]=p)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},8852:(t,e,n)=>{var r=n(6314)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},4253:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},8082:(t,e,n)=>{"use strict";n(8269);var r=n(7234),o=n(7728),i=n(4253),a=n(1355),u=n(6314),c=n(1165),s=u("species"),f=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=u(t),h=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),v=h?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[s]=function(){return n}),n[p](""),!e}):void 0;if(!h||!v||"replace"===t&&!f||"split"===t&&!l){var d=/./[p],y=n(a,p,""[t],function(t,e,n,r,o){return e.exec===c?h&&!o?{done:!0,value:d.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),b=y[0],g=y[1];r(String.prototype,t,b),o(RegExp.prototype,p,2==e?function(t,e){return g.call(t,this,e)}:function(t){return g.call(t,this)})}}},3218:(t,e,n)=>{"use strict";var r=n(7007);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},3325:(t,e,n)=>{"use strict";var r=n(4302),o=n(5286),i=n(875),a=n(741),u=n(6314)("isConcatSpreadable");t.exports=function t(e,n,c,s,f,l,p,h){for(var v,d,y=f,b=0,g=!!p&&a(p,h,3);b<s;){if(b in c){if(v=g?g(c[b],b,n):c[b],d=!1,o(v)&&(d=void 0!==(d=v[u])?!!d:r(v)),d&&l>0)y=t(e,n,v,i(v.length),y,l-1)-1;else{if(y>=9007199254740991)throw TypeError();e[y]=v}y++}b++}return y}},3531:(t,e,n)=>{var r=n(741),o=n(8851),i=n(6555),a=n(7007),u=n(875),c=n(9002),s={},f={},l=t.exports=function(t,e,n,l,p){var h,v,d,y,b=p?function(){return t}:c(t),g=r(n,l,e?2:1),m=0;if("function"!=typeof b)throw TypeError(t+" is not iterable!");if(i(b)){for(h=u(t.length);h>m;m++)if((y=e?g(a(v=t[m])[0],v[1]):g(t[m]))===s||y===f)return y}else for(d=b.call(t);!(v=d.next()).done;)if((y=o(d,g,v.value,e))===s||y===f)return y};l.BREAK=s,l.RETURN=f},18:(t,e,n)=>{t.exports=n(3825)("native-function-to-string",Function.toString)},3816:t=>{var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},9181:t=>{var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},7728:(t,e,n)=>{var r=n(9275),o=n(681);t.exports=n(7057)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},639:(t,e,n)=>{var r=n(3816).document;t.exports=r&&r.documentElement},1734:(t,e,n)=>{t.exports=!n(7057)&&!n(4253)(function(){return 7!=Object.defineProperty(n(2457)("div"),"a",{get:function(){return 7}}).a})},266:(t,e,n)=>{var r=n(5286),o=n(7375).set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},7242:t=>{t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},9797:(t,e,n)=>{var r=n(2032);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},6555:(t,e,n)=>{var r=n(2803),o=n(6314)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},4302:(t,e,n)=>{var r=n(2032);t.exports=Array.isArray||function(t){return"Array"==r(t)}},8367:(t,e,n)=>{var r=n(5286),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},5286:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},5364:(t,e,n)=>{var r=n(5286),o=n(2032),i=n(6314)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},8851:(t,e,n)=>{var r=n(7007);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},9988:(t,e,n)=>{"use strict";var r=n(2503),o=n(681),i=n(2943),a={};n(7728)(a,n(6314)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},2923:(t,e,n)=>{"use strict";var r=n(4461),o=n(2985),i=n(7234),a=n(7728),u=n(2803),c=n(9988),s=n(2943),f=n(468),l=n(6314)("iterator"),p=!([].keys&&"next"in[].keys()),h="keys",v="values",d=function(){return this};t.exports=function(t,e,n,y,b,g,m){c(n,e,y);var _,w,x,S=function(t){if(!p&&t in j)return j[t];switch(t){case h:case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",P=b==v,E=!1,j=t.prototype,k=j[l]||j["@@iterator"]||b&&j[b],T=k||S(b),R=b?P?S("entries"):T:void 0,M="Array"==e&&j.entries||k;if(M&&(x=f(M.call(new t)))!==Object.prototype&&x.next&&(s(x,O,!0),r||"function"==typeof x[l]||a(x,l,d)),P&&k&&k.name!==v&&(E=!0,T=function(){return k.call(this)}),r&&!m||!p&&!E&&j[l]||a(j,l,T),u[e]=T,u[O]=d,b)if(_={values:P?T:S(v),keys:g?T:S(h),entries:R},m)for(w in _)w in j||i(j,w,_[w]);else o(o.P+o.F*(p||E),e,_);return _}},7462:(t,e,n)=>{var r=n(6314)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},5436:t=>{t.exports=function(t,e){return{value:e,done:!!t}}},2803:t=>{t.exports={}},4461:t=>{t.exports=!1},3086:t=>{var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},4934:(t,e,n)=>{var r=n(1801),o=Math.pow,i=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),c=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),s=r(t);return o<c?s*(o/c/a+1/i-1/i)*c*a:(n=(e=(1+a/i)*o)-(e-o))>u||n!=n?s*(1/0):s*n}},6206:t=>{t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},1801:t=>{t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},4728:(t,e,n)=>{var r=n(3953)("meta"),o=n(5286),i=n(9181),a=n(9275).f,u=0,c=Object.isExtensible||function(){return!0},s=!n(4253)(function(){return c(Object.preventExtensions({}))}),f=function(t){a(t,r,{value:{i:"O"+ ++u,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return s&&l.NEED&&c(t)&&!i(t,r)&&f(t),t}}},4351:(t,e,n)=>{var r=n(3816),o=n(4193).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,c="process"==n(2032)(a);t.exports=function(){var t,e,n,s=function(){var r,o;for(c&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(s)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var f=u.resolve(void 0);n=function(){f.then(s)}}else n=function(){o.call(r,s)};else{var l=!0,p=document.createTextNode("");new i(s).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},3499:(t,e,n)=>{"use strict";var r=n(4963);function o(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},5345:(t,e,n)=>{"use strict";var r=n(7057),o=n(7184),i=n(4548),a=n(4682),u=n(508),c=n(9797),s=Object.assign;t.exports=!s||n(4253)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){for(var n=u(t),s=arguments.length,f=1,l=i.f,p=a.f;s>f;)for(var h,v=c(arguments[f++]),d=l?o(v).concat(l(v)):o(v),y=d.length,b=0;y>b;)h=d[b++],r&&!p.call(v,h)||(n[h]=v[h]);return n}:s},2503:(t,e,n)=>{var r=n(7007),o=n(5588),i=n(4430),a=n(9335)("IE_PROTO"),u=function(){},c="prototype",s=function(){var t,e=n(2457)("iframe"),r=i.length;for(e.style.display="none",n(639).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s[c][i[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(u[c]=r(t),n=new u,u[c]=null,n[a]=t):n=s(),void 0===e?n:o(n,e)}},9275:(t,e,n)=>{var r=n(7007),o=n(1734),i=n(1689),a=Object.defineProperty;e.f=n(7057)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},5588:(t,e,n)=>{var r=n(9275),o=n(7007),i=n(7184);t.exports=n(7057)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),u=a.length,c=0;u>c;)r.f(t,n=a[c++],e[n]);return t}},8693:(t,e,n)=>{var r=n(4682),o=n(681),i=n(2110),a=n(1689),u=n(9181),c=n(1734),s=Object.getOwnPropertyDescriptor;e.f=n(7057)?s:function(t,e){if(t=i(t),e=a(e,!0),c)try{return s(t,e)}catch(t){}if(u(t,e))return o(!r.f.call(t,e),t[e])}},9327:(t,e,n)=>{var r=n(2110),o=n(616).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},616:(t,e,n)=>{var r=n(189),o=n(4430).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},4548:(t,e)=>{e.f=Object.getOwnPropertySymbols},468:(t,e,n)=>{var r=n(9181),o=n(508),i=n(9335)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},189:(t,e,n)=>{var r=n(9181),o=n(2110),i=n(9315)(!1),a=n(9335)("IE_PROTO");t.exports=function(t,e){var n,u=o(t),c=0,s=[];for(n in u)n!=a&&r(u,n)&&s.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(s,n)||s.push(n));return s}},7184:(t,e,n)=>{var r=n(189),o=n(4430);t.exports=Object.keys||function(t){return r(t,o)}},4682:(t,e)=>{e.f={}.propertyIsEnumerable},3160:(t,e,n)=>{var r=n(2985),o=n(5645),i=n(4253);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},1131:(t,e,n)=>{var r=n(7057),o=n(7184),i=n(2110),a=n(4682).f;t.exports=function(t){return function(e){for(var n,u=i(e),c=o(u),s=c.length,f=0,l=[];s>f;)n=c[f++],r&&!a.call(u,n)||l.push(t?[n,u[n]]:u[n]);return l}}},7643:(t,e,n)=>{var r=n(616),o=n(4548),i=n(7007),a=n(3816).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},7743:(t,e,n)=>{var r=n(3816).parseFloat,o=n(9599).trim;t.exports=1/r(n(4644)+"-0")!=-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},5960:(t,e,n)=>{var r=n(3816).parseInt,o=n(9599).trim,i=n(4644),a=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},188:t=>{t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},94:(t,e,n)=>{var r=n(7007),o=n(5286),i=n(3499);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},681:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4408:(t,e,n)=>{var r=n(7234);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},7234:(t,e,n)=>{var r=n(3816),o=n(7728),i=n(9181),a=n(3953)("src"),u=n(18),c="toString",s=(""+u).split(c);n(5645).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,c,function(){return"function"==typeof this&&this[a]||u.call(this)})},7787:(t,e,n)=>{"use strict";var r=n(1488),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},1165:(t,e,n)=>{"use strict";var r,o,i=n(3218),a=RegExp.prototype.exec,u=String.prototype.replace,c=a,s="lastIndex",f=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r[s]||0!==o[s]),l=void 0!==/()??/.exec("")[1];(f||l)&&(c=function(t){var e,n,r,o,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",i.call(c))),f&&(e=c[s]),r=a.call(c,t),f&&r&&(c[s]=c.global?r.index+r[0].length:e),l&&r&&r.length>1&&u.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),t.exports=c},7195:t=>{t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},7375:(t,e,n)=>{var r=n(5286),o=n(7007),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(741)(Function.call,n(8693).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},2974:(t,e,n)=>{"use strict";var r=n(3816),o=n(9275),i=n(7057),a=n(6314)("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},2943:(t,e,n)=>{var r=n(9275).f,o=n(9181),i=n(6314)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},9335:(t,e,n)=>{var r=n(3825)("keys"),o=n(3953);t.exports=function(t){return r[t]||(r[t]=o(t))}},3825:(t,e,n)=>{var r=n(5645),o=n(3816),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(4461)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},8364:(t,e,n)=>{var r=n(7007),o=n(4963),i=n(6314)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},7717:(t,e,n)=>{"use strict";var r=n(4253);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},4496:(t,e,n)=>{var r=n(1467),o=n(1355);t.exports=function(t){return function(e,n){var i,a,u=String(o(e)),c=r(n),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c))<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},2094:(t,e,n)=>{var r=n(5364),o=n(1355);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},9395:(t,e,n)=>{var r=n(2985),o=n(4253),i=n(1355),a=/"/g,u=function(t,e,n,r){var o=String(i(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,""")+'"'),u+">"+o+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(u),r(r.P+r.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},5442:(t,e,n)=>{var r=n(875),o=n(8595),i=n(1355);t.exports=function(t,e,n,a){var u=String(i(t)),c=u.length,s=void 0===n?" ":String(n),f=r(e);if(f<=c||""==s)return u;var l=f-c,p=o.call(s,Math.ceil(l/s.length));return p.length>l&&(p=p.slice(0,l)),a?p+u:u+p}},8595:(t,e,n)=>{"use strict";var r=n(1467),o=n(1355);t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},9599:(t,e,n)=>{var r=n(2985),o=n(1355),i=n(4253),a=n(4644),u="["+a+"]",c=RegExp("^"+u+u+"*"),s=RegExp(u+u+"*$"),f=function(t,e,n){var o={},u=i(function(){return!!a[t]()||"
"!="
"[t]()}),c=o[t]=u?e(l):a[t];n&&(o[n]=c),r(r.P+r.F*u,"String",o)},l=f.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(s,"")),t};t.exports=f},4644:t=>{t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},4193:(t,e,n)=>{var r,o,i,a=n(741),u=n(7242),c=n(639),s=n(2457),f=n(3816),l=f.process,p=f.setImmediate,h=f.clearImmediate,v=f.MessageChannel,d=f.Dispatch,y=0,b={},g="onreadystatechange",m=function(){var t=+this;if(b.hasOwnProperty(t)){var e=b[t];delete b[t],e()}},_=function(t){m.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return b[++y]=function(){u("function"==typeof t?t:Function(t),e)},r(y),y},h=function(t){delete b[t]},"process"==n(2032)(l)?r=function(t){l.nextTick(a(m,t,1))}:d&&d.now?r=function(t){d.now(a(m,t,1))}:v?(i=(o=new v).port2,o.port1.onmessage=_,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",_,!1)):r=g in s("script")?function(t){c.appendChild(s("script"))[g]=function(){c.removeChild(this),m.call(t)}}:function(t){setTimeout(a(m,t,1),0)}),t.exports={set:p,clear:h}},2337:(t,e,n)=>{var r=n(1467),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},4843:(t,e,n)=>{var r=n(1467),o=n(875);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},1467:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},2110:(t,e,n)=>{var r=n(9797),o=n(1355);t.exports=function(t){return r(o(t))}},875:(t,e,n)=>{var r=n(1467),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},508:(t,e,n)=>{var r=n(1355);t.exports=function(t){return Object(r(t))}},1689:(t,e,n)=>{var r=n(5286);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},8440:(t,e,n)=>{"use strict";if(n(7057)){var r=n(4461),o=n(3816),i=n(4253),a=n(2985),u=n(9383),c=n(1125),s=n(741),f=n(3328),l=n(681),p=n(7728),h=n(4408),v=n(1467),d=n(875),y=n(4843),b=n(2337),g=n(1689),m=n(9181),_=n(1488),w=n(5286),x=n(508),S=n(6555),O=n(2503),P=n(468),E=n(616).f,j=n(9002),k=n(3953),T=n(6314),R=n(50),M=n(9315),L=n(8364),A=n(6997),F=n(2803),I=n(7462),C=n(2974),D=n(6852),N=n(5216),B=n(9275),U=n(8693),W=B.f,G=U.f,V=o.RangeError,z=o.TypeError,q=o.Uint8Array,J="ArrayBuffer",K="Shared"+J,Z="BYTES_PER_ELEMENT",H="prototype",Y=Array[H],$=c.ArrayBuffer,X=c.DataView,Q=R(0),tt=R(2),et=R(3),nt=R(4),rt=R(5),ot=R(6),it=M(!0),at=M(!1),ut=A.values,ct=A.keys,st=A.entries,ft=Y.lastIndexOf,lt=Y.reduce,pt=Y.reduceRight,ht=Y.join,vt=Y.sort,dt=Y.slice,yt=Y.toString,bt=Y.toLocaleString,gt=T("iterator"),mt=T("toStringTag"),_t=k("typed_constructor"),wt=k("def_constructor"),xt=u.CONSTR,St=u.TYPED,Ot=u.VIEW,Pt="Wrong length!",Et=R(1,function(t,e){return Mt(L(t,t[wt]),e)}),jt=i(function(){return 1===new q(new Uint16Array([1]).buffer)[0]}),kt=!!q&&!!q[H].set&&i(function(){new q(1).set({})}),Tt=function(t,e){var n=v(t);if(n<0||n%e)throw V("Wrong offset!");return n},Rt=function(t){if(w(t)&&St in t)return t;throw z(t+" is not a typed array!")},Mt=function(t,e){if(!w(t)||!(_t in t))throw z("It is not a typed array constructor!");return new t(e)},Lt=function(t,e){return At(L(t,t[wt]),e)},At=function(t,e){for(var n=0,r=e.length,o=Mt(t,r);r>n;)o[n]=e[n++];return o},Ft=function(t,e,n){W(t,e,{get:function(){return this._d[n]}})},It=function(t){var e,n,r,o,i,a,u=x(t),c=arguments.length,f=c>1?arguments[1]:void 0,l=void 0!==f,p=j(u);if(null!=p&&!S(p)){for(a=p.call(u),r=[],e=0;!(i=a.next()).done;e++)r.push(i.value);u=r}for(l&&c>2&&(f=s(f,arguments[2],2)),e=0,n=d(u.length),o=Mt(this,n);n>e;e++)o[e]=l?f(u[e],e):u[e];return o},Ct=function(){for(var t=0,e=arguments.length,n=Mt(this,e);e>t;)n[t]=arguments[t++];return n},Dt=!!q&&i(function(){bt.call(new q(1))}),Nt=function(){return bt.apply(Dt?dt.call(Rt(this)):Rt(this),arguments)},Bt={copyWithin:function(t,e){return N.call(Rt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return D.apply(Rt(this),arguments)},filter:function(t){return Lt(this,tt(Rt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(Rt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Rt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Rt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(Rt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ht.apply(Rt(this),arguments)},lastIndexOf:function(t){return ft.apply(Rt(this),arguments)},map:function(t){return Et(Rt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return lt.apply(Rt(this),arguments)},reduceRight:function(t){return pt.apply(Rt(this),arguments)},reverse:function(){for(var t,e=this,n=Rt(e).length,r=Math.floor(n/2),o=0;o<r;)t=e[o],e[o++]=e[--n],e[n]=t;return e},some:function(t){return et(Rt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return vt.call(Rt(this),t)},subarray:function(t,e){var n=Rt(this),r=n.length,o=b(t,r);return new(L(n,n[wt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,d((void 0===e?r:b(e,r))-o))}},Ut=function(t,e){return Lt(this,dt.call(Rt(this),t,e))},Wt=function(t){Rt(this);var e=Tt(arguments[1],1),n=this.length,r=x(t),o=d(r.length),i=0;if(o+e>n)throw V(Pt);for(;i<o;)this[e+i]=r[i++]},Gt={entries:function(){return st.call(Rt(this))},keys:function(){return ct.call(Rt(this))},values:function(){return ut.call(Rt(this))}},Vt=function(t,e){return w(t)&&t[St]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},zt=function(t,e){return Vt(t,e=g(e,!0))?l(2,t[e]):G(t,e)},qt=function(t,e,n){return!(Vt(t,e=g(e,!0))&&w(n)&&m(n,"value"))||m(n,"get")||m(n,"set")||n.configurable||m(n,"writable")&&!n.writable||m(n,"enumerable")&&!n.enumerable?W(t,e,n):(t[e]=n.value,t)};xt||(U.f=zt,B.f=qt),a(a.S+a.F*!xt,"Object",{getOwnPropertyDescriptor:zt,defineProperty:qt}),i(function(){yt.call({})})&&(yt=bt=function(){return ht.call(this)});var Jt=h({},Bt);h(Jt,Gt),p(Jt,gt,Gt.values),h(Jt,{slice:Ut,set:Wt,constructor:function(){},toString:yt,toLocaleString:Nt}),Ft(Jt,"buffer","b"),Ft(Jt,"byteOffset","o"),Ft(Jt,"byteLength","l"),Ft(Jt,"length","e"),W(Jt,mt,{get:function(){return this[St]}}),t.exports=function(t,e,n,c){var s=t+((c=!!c)?"Clamped":"")+"Array",l="get"+t,h="set"+t,v=o[s],b=v||{},g=v&&P(v),m=!v||!u.ABV,x={},S=v&&v[H],j=function(t,n){W(t,n,{get:function(){return function(t,n){var r=t._d;return r.v[l](n*e+r.o,jt)}(this,n)},set:function(t){return function(t,n,r){var o=t._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[h](n*e+o.o,r,jt)}(this,n,t)},enumerable:!0})};m?(v=n(function(t,n,r,o){f(t,v,s,"_d");var i,a,u,c,l=0,h=0;if(w(n)){if(!(n instanceof $||(c=_(n))==J||c==K))return St in n?At(v,n):It.call(v,n);i=n,h=Tt(r,e);var b=n.byteLength;if(void 0===o){if(b%e)throw V(Pt);if((a=b-h)<0)throw V(Pt)}else if((a=d(o)*e)+h>b)throw V(Pt);u=a/e}else u=y(n),i=new $(a=u*e);for(p(t,"_d",{b:i,o:h,l:a,e:u,v:new X(i)});l<u;)j(t,l++)}),S=v[H]=O(Jt),p(S,"constructor",v)):i(function(){v(1)})&&i(function(){new v(-1)})&&I(function(t){new v,new v(null),new v(1.5),new v(t)},!0)||(v=n(function(t,n,r,o){var i;return f(t,v,s),w(n)?n instanceof $||(i=_(n))==J||i==K?void 0!==o?new b(n,Tt(r,e),o):void 0!==r?new b(n,Tt(r,e)):new b(n):St in n?At(v,n):It.call(v,n):new b(y(n))}),Q(g!==Function.prototype?E(b).concat(E(g)):E(b),function(t){t in v||p(v,t,b[t])}),v[H]=S,r||(S.constructor=v));var k=S[gt],T=!!k&&("values"==k.name||null==k.name),R=Gt.values;p(v,_t,!0),p(S,St,s),p(S,Ot,!0),p(S,wt,v),(c?new v(1)[mt]==s:mt in S)||W(S,mt,{get:function(){return s}}),x[s]=v,a(a.G+a.W+a.F*(v!=b),x),a(a.S,s,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*i(function(){b.of.call(v,1)}),s,{from:It,of:Ct}),Z in S||p(S,Z,e),a(a.P,s,Bt),C(s),a(a.P+a.F*kt,s,{set:Wt}),a(a.P+a.F*!T,s,Gt),r||S.toString==yt||(S.toString=yt),a(a.P+a.F*i(function(){new v(1).slice()}),s,{slice:Ut}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()})||!i(function(){S.toLocaleString.call([1,2])})),s,{toLocaleString:Nt}),F[s]=T?k:R,r||T||p(S,gt,R)}}else t.exports=function(){}},1125:(t,e,n)=>{"use strict";var r=n(3816),o=n(7057),i=n(4461),a=n(9383),u=n(7728),c=n(4408),s=n(4253),f=n(3328),l=n(1467),p=n(875),h=n(4843),v=n(616).f,d=n(9275).f,y=n(6852),b=n(2943),g="ArrayBuffer",m="DataView",_="prototype",w="Wrong index!",x=r[g],S=r[m],O=r.Math,P=r.RangeError,E=r.Infinity,j=x,k=O.abs,T=O.pow,R=O.floor,M=O.log,L=O.LN2,A="buffer",F="byteLength",I="byteOffset",C=o?"_b":A,D=o?"_l":F,N=o?"_o":I;function B(t,e,n){var r,o,i,a=new Array(n),u=8*n-e-1,c=(1<<u)-1,s=c>>1,f=23===e?T(2,-24)-T(2,-77):0,l=0,p=t<0||0===t&&1/t<0?1:0;for((t=k(t))!=t||t===E?(o=t!=t?1:0,r=c):(r=R(M(t)/L),t*(i=T(2,-r))<1&&(r--,i*=2),(t+=r+s>=1?f/i:f*T(2,1-s))*i>=2&&(r++,i/=2),r+s>=c?(o=0,r=c):r+s>=1?(o=(t*i-1)*T(2,e),r+=s):(o=t*T(2,s-1)*T(2,e),r=0));e>=8;a[l++]=255&o,o/=256,e-=8);for(r=r<<e|o,u+=e;u>0;a[l++]=255&r,r/=256,u-=8);return a[--l]|=128*p,a}function U(t,e,n){var r,o=8*n-e-1,i=(1<<o)-1,a=i>>1,u=o-7,c=n-1,s=t[c--],f=127&s;for(s>>=7;u>0;f=256*f+t[c],c--,u-=8);for(r=f&(1<<-u)-1,f>>=-u,u+=e;u>0;r=256*r+t[c],c--,u-=8);if(0===f)f=1-a;else{if(f===i)return r?NaN:s?-E:E;r+=T(2,e),f-=a}return(s?-1:1)*r*T(2,f-e)}function W(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function G(t){return[255&t]}function V(t){return[255&t,t>>8&255]}function z(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function q(t){return B(t,52,8)}function J(t){return B(t,23,4)}function K(t,e,n){d(t[_],e,{get:function(){return this[n]}})}function Z(t,e,n,r){var o=h(+n);if(o+e>t[D])throw P(w);var i=t[C]._b,a=o+t[N],u=i.slice(a,a+e);return r?u:u.reverse()}function H(t,e,n,r,o,i){var a=h(+n);if(a+e>t[D])throw P(w);for(var u=t[C]._b,c=a+t[N],s=r(+o),f=0;f<e;f++)u[c+f]=s[i?f:e-f-1]}if(a.ABV){if(!s(function(){x(1)})||!s(function(){new x(-1)})||s(function(){return new x,new x(1.5),new x(NaN),x.name!=g})){for(var Y,$=(x=function(t){return f(this,x),new j(h(t))})[_]=j[_],X=v(j),Q=0;X.length>Q;)(Y=X[Q++])in x||u(x,Y,j[Y]);i||($.constructor=x)}var tt=new S(new x(2)),et=S[_].setInt8;tt.setInt8(0,2147483648),tt.setInt8(1,2147483649),!tt.getInt8(0)&&tt.getInt8(1)||c(S[_],{setInt8:function(t,e){et.call(this,t,e<<24>>24)},setUint8:function(t,e){et.call(this,t,e<<24>>24)}},!0)}else x=function(t){f(this,x,g);var e=h(t);this._b=y.call(new Array(e),0),this[D]=e},S=function(t,e,n){f(this,S,m),f(t,x,m);var r=t[D],o=l(e);if(o<0||o>r)throw P("Wrong offset!");if(o+(n=void 0===n?r-o:p(n))>r)throw P("Wrong length!");this[C]=t,this[N]=o,this[D]=n},o&&(K(x,F,"_l"),K(S,A,"_b"),K(S,F,"_l"),K(S,I,"_o")),c(S[_],{getInt8:function(t){return Z(this,1,t)[0]<<24>>24},getUint8:function(t){return Z(this,1,t)[0]},getInt16:function(t){var e=Z(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Z(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return W(Z(this,4,t,arguments[1]))},getUint32:function(t){return W(Z(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return U(Z(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return U(Z(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){H(this,1,t,G,e)},setUint8:function(t,e){H(this,1,t,G,e)},setInt16:function(t,e){H(this,2,t,V,e,arguments[2])},setUint16:function(t,e){H(this,2,t,V,e,arguments[2])},setInt32:function(t,e){H(this,4,t,z,e,arguments[2])},setUint32:function(t,e){H(this,4,t,z,e,arguments[2])},setFloat32:function(t,e){H(this,4,t,J,e,arguments[2])},setFloat64:function(t,e){H(this,8,t,q,e,arguments[2])}});b(x,g),b(S,m),u(S[_],a.VIEW,!0),e[g]=x,e[m]=S},9383:(t,e,n)=>{for(var r,o=n(3816),i=n(7728),a=n(3953),u=a("typed_array"),c=a("view"),s=!(!o.ArrayBuffer||!o.DataView),f=s,l=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=o[p[l++]])?(i(r.prototype,u,!0),i(r.prototype,c,!0)):f=!1;t.exports={ABV:s,CONSTR:f,TYPED:u,VIEW:c}},3953:t=>{var e=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+n).toString(36))}},575:(t,e,n)=>{var r=n(3816).navigator;t.exports=r&&r.userAgent||""},1616:(t,e,n)=>{var r=n(5286);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},6074:(t,e,n)=>{var r=n(3816),o=n(5645),i=n(4461),a=n(8787),u=n(9275).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:a.f(t)})}},8787:(t,e,n)=>{e.f=n(6314)},6314:(t,e,n)=>{var r=n(3825)("wks"),o=n(3953),i=n(3816).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},9002:(t,e,n)=>{var r=n(1488),o=n(6314)("iterator"),i=n(2803);t.exports=n(5645).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},2e3:(t,e,n)=>{var r=n(2985);r(r.P,"Array",{copyWithin:n(5216)}),n(7722)("copyWithin")},5745:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(4);r(r.P+r.F*!n(7717)([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},8977:(t,e,n)=>{var r=n(2985);r(r.P,"Array",{fill:n(6852)}),n(7722)("fill")},8837:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(2);r(r.P+r.F*!n(7717)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},4899:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(7722)(i)},2310:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(5),i="find",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(7722)(i)},4336:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(0),i=n(7717)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},522:(t,e,n)=>{"use strict";var r=n(741),o=n(2985),i=n(508),a=n(8851),u=n(6555),c=n(875),s=n(2811),f=n(9002);o(o.S+o.F*!n(7462)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,l,p=i(t),h="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,y=void 0!==d,b=0,g=f(p);if(y&&(d=r(d,v>2?arguments[2]:void 0,2)),null==g||h==Array&&u(g))for(n=new h(e=c(p.length));e>b;b++)s(n,b,y?d(p[b],b):p[b]);else for(l=g.call(p),n=new h;!(o=l.next()).done;b++)s(n,b,y?a(l,d,[o.value,b],!0):o.value);return n.length=b,n}})},3369:(t,e,n)=>{"use strict";var r=n(2985),o=n(9315)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(7717)(i)),"Array",{indexOf:function(t){return a?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},774:(t,e,n)=>{var r=n(2985);r(r.S,"Array",{isArray:n(4302)})},6997:(t,e,n)=>{"use strict";var r=n(7722),o=n(5436),i=n(2803),a=n(2110);t.exports=n(2923)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},7842:(t,e,n)=>{"use strict";var r=n(2985),o=n(2110),i=[].join;r(r.P+r.F*(n(9797)!=Object||!n(7717)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},9564:(t,e,n)=>{"use strict";var r=n(2985),o=n(2110),i=n(1467),a=n(875),u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(7717)(u)),"Array",{lastIndexOf:function(t){if(c)return u.apply(this,arguments)||0;var e=o(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},1802:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(1);r(r.P+r.F*!n(7717)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},8295:(t,e,n)=>{"use strict";var r=n(2985),o=n(2811);r(r.S+r.F*n(4253)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},3750:(t,e,n)=>{"use strict";var r=n(2985),o=n(7628);r(r.P+r.F*!n(7717)([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},3057:(t,e,n)=>{"use strict";var r=n(2985),o=n(7628);r(r.P+r.F*!n(7717)([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},110:(t,e,n)=>{"use strict";var r=n(2985),o=n(639),i=n(2032),a=n(2337),u=n(875),c=[].slice;r(r.P+r.F*n(4253)(function(){o&&c.call(o)}),"Array",{slice:function(t,e){var n=u(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var o=a(t,n),s=a(e,n),f=u(s-o),l=new Array(f),p=0;p<f;p++)l[p]="String"==r?this.charAt(o+p):this[o+p];return l}})},6773:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(3);r(r.P+r.F*!n(7717)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},75:(t,e,n)=>{"use strict";var r=n(2985),o=n(4963),i=n(508),a=n(4253),u=[].sort,c=[1,2,3];r(r.P+r.F*(a(function(){c.sort(void 0)})||!a(function(){c.sort(null)})||!n(7717)(u)),"Array",{sort:function(t){return void 0===t?u.call(i(this)):u.call(i(this),o(t))}})},1842:(t,e,n)=>{n(2974)("Array")},1822:(t,e,n)=>{var r=n(2985);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},1031:(t,e,n)=>{var r=n(2985),o=n(3537);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},9977:(t,e,n)=>{"use strict";var r=n(2985),o=n(508),i=n(1689);r(r.P+r.F*n(4253)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},1560:(t,e,n)=>{var r=n(6314)("toPrimitive"),o=Date.prototype;r in o||n(7728)(o,r,n(870))},6331:(t,e,n)=>{var r=Date.prototype,o="Invalid Date",i="toString",a=r[i],u=r.getTime;new Date(NaN)+""!=o&&n(7234)(r,i,function(){var t=u.call(this);return t==t?a.call(this):o})},9730:(t,e,n)=>{var r=n(2985);r(r.P,"Function",{bind:n(4398)})},8377:(t,e,n)=>{"use strict";var r=n(5286),o=n(468),i=n(6314)("hasInstance"),a=Function.prototype;i in a||n(9275).f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},6059:(t,e,n)=>{var r=n(9275).f,o=Function.prototype,i=/^\s*function ([^ (]*)/,a="name";a in o||n(7057)&&r(o,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},8416:(t,e,n)=>{"use strict";var r=n(9824),o=n(1616),i="Map";t.exports=n(5795)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,i),t);return e&&e.v},set:function(t,e){return r.def(o(this,i),0===t?0:t,e)}},r,!0)},6503:(t,e,n)=>{var r=n(2985),o=n(6206),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},6786:(t,e,n)=>{var r=n(2985),o=Math.asinh;r(r.S+r.F*!(o&&1/o(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},932:(t,e,n)=>{var r=n(2985),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},7526:(t,e,n)=>{var r=n(2985),o=n(1801);r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},1591:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},9073:(t,e,n)=>{var r=n(2985),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},347:(t,e,n)=>{var r=n(2985),o=n(3086);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},579:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{fround:n(4934)})},4669:(t,e,n)=>{var r=n(2985),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,u=arguments.length,c=0;a<u;)c<(n=o(arguments[a++]))?(i=i*(r=c/n)*r+1,c=n):i+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(i)}})},7710:(t,e,n)=>{var r=n(2985),o=Math.imul;r(r.S+r.F*n(4253)(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(t,e){var n=65535,r=+t,o=+e,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}})},5789:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},3514:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{log1p:n(6206)})},9978:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},8472:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{sign:n(1801)})},6946:(t,e,n)=>{var r=n(2985),o=n(3086),i=Math.exp;r(r.S+r.F*n(4253)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},5068:(t,e,n)=>{var r=n(2985),o=n(3086),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},413:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},1246:(t,e,n)=>{"use strict";var r=n(3816),o=n(9181),i=n(2032),a=n(266),u=n(1689),c=n(4253),s=n(616).f,f=n(8693).f,l=n(9275).f,p=n(9599).trim,h="Number",v=r[h],d=v,y=v.prototype,b=i(n(2503)(y))==h,g="trim"in String.prototype,m=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,c=e.slice(2),s=0,f=c.length;s<f;s++)if((a=c.charCodeAt(s))<48||a>o)return NaN;return parseInt(c,r)}}return+e};if(!v(" 0o1")||!v("0b1")||v("+0x1")){v=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof v&&(b?c(function(){y.valueOf.call(n)}):i(n)!=h)?a(new d(m(e)),n,v):m(e)};for(var _,w=n(7057)?s(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)o(d,_=w[x])&&!o(v,_)&&l(v,_,f(d,_));v.prototype=y,y.constructor=v,n(7234)(r,h,v)}},5972:(t,e,n)=>{var r=n(2985);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},3403:(t,e,n)=>{var r=n(2985),o=n(3816).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},2516:(t,e,n)=>{var r=n(2985);r(r.S,"Number",{isInteger:n(8367)})},9371:(t,e,n)=>{var r=n(2985);r(r.S,"Number",{isNaN:function(t){return t!=t}})},6479:(t,e,n)=>{var r=n(2985),o=n(8367),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},1736:(t,e,n)=>{var r=n(2985);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},1889:(t,e,n)=>{var r=n(2985);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},5177:(t,e,n)=>{var r=n(2985),o=n(7743);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},6943:(t,e,n)=>{var r=n(2985),o=n(5960);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},726:(t,e,n)=>{"use strict";var r=n(2985),o=n(1467),i=n(3365),a=n(8595),u=1..toFixed,c=Math.floor,s=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l="0",p=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*s[n],s[n]=r%1e7,r=c(r/1e7)},h=function(t){for(var e=6,n=0;--e>=0;)n+=s[e],s[e]=c(n/t),n=n%t*1e7},v=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==s[t]){var n=String(s[t]);e=""===e?n:e+a.call(l,7-n.length)+n}return e},d=function(t,e,n){return 0===e?n:e%2==1?d(t,e-1,n*t):d(t*t,e/2,n)};r(r.P+r.F*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(4253)(function(){u.call({})})),"Number",{toFixed:function(t){var e,n,r,u,c=i(this,f),s=o(t),y="",b=l;if(s<0||s>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(y="-",c=-c),c>1e-21)if(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*d(2,69,1))-69,n=e<0?c*d(2,-e,1):c/d(2,e,1),n*=4503599627370496,(e=52-e)>0){for(p(0,n),r=s;r>=7;)p(1e7,0),r-=7;for(p(d(10,r,1),0),r=e-1;r>=23;)h(1<<23),r-=23;h(1<<r),p(1,1),h(2),b=v()}else p(0,n),p(1<<-e,0),b=v()+a.call(l,s);return s>0?y+((u=b.length)<=s?"0."+a.call(l,s-u)+b:b.slice(0,u-s)+"."+b.slice(u-s)):y+b}})},1901:(t,e,n)=>{"use strict";var r=n(2985),o=n(4253),i=n(3365),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},5115:(t,e,n)=>{var r=n(2985);r(r.S+r.F,"Object",{assign:n(5345)})},8132:(t,e,n)=>{var r=n(2985);r(r.S,"Object",{create:n(2503)})},7470:(t,e,n)=>{var r=n(2985);r(r.S+r.F*!n(7057),"Object",{defineProperties:n(5588)})},8388:(t,e,n)=>{var r=n(2985);r(r.S+r.F*!n(7057),"Object",{defineProperty:n(9275).f})},9375:(t,e,n)=>{var r=n(5286),o=n(4728).onFreeze;n(3160)("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},4882:(t,e,n)=>{var r=n(2110),o=n(8693).f;n(3160)("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},9622:(t,e,n)=>{n(3160)("getOwnPropertyNames",function(){return n(9327).f})},1520:(t,e,n)=>{var r=n(508),o=n(468);n(3160)("getPrototypeOf",function(){return function(t){return o(r(t))}})},9892:(t,e,n)=>{var r=n(5286);n(3160)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},4157:(t,e,n)=>{var r=n(5286);n(3160)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},5095:(t,e,n)=>{var r=n(5286);n(3160)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},9176:(t,e,n)=>{var r=n(2985);r(r.S,"Object",{is:n(7195)})},7476:(t,e,n)=>{var r=n(508),o=n(7184);n(3160)("keys",function(){return function(t){return o(r(t))}})},4672:(t,e,n)=>{var r=n(5286),o=n(4728).onFreeze;n(3160)("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},3533:(t,e,n)=>{var r=n(5286),o=n(4728).onFreeze;n(3160)("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},8838:(t,e,n)=>{var r=n(2985);r(r.S,"Object",{setPrototypeOf:n(7375).set})},6253:(t,e,n)=>{"use strict";var r=n(1488),o={};o[n(6314)("toStringTag")]="z",o+""!="[object z]"&&n(7234)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},4299:(t,e,n)=>{var r=n(2985),o=n(7743);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},1084:(t,e,n)=>{var r=n(2985),o=n(5960);r(r.G+r.F*(parseInt!=o),{parseInt:o})},851:(t,e,n)=>{"use strict";var r,o,i,a,u=n(4461),c=n(3816),s=n(741),f=n(1488),l=n(2985),p=n(5286),h=n(4963),v=n(3328),d=n(3531),y=n(8364),b=n(4193).set,g=n(4351)(),m=n(3499),_=n(188),w=n(575),x=n(94),S="Promise",O=c.TypeError,P=c.process,E=P&&P.versions,j=E&&E.v8||"",k=c[S],T="process"==f(P),R=function(){},M=o=m.f,L=!!function(){try{var t=k.resolve(1),e=(t.constructor={})[n(6314)("species")]=function(t){t(R,R)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(R)instanceof e&&0!==j.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),A=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},F=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,u=o?e.ok:e.fail,c=e.resolve,s=e.reject,f=e.domain;try{u?(o||(2==t._h&&D(t),t._h=1),!0===u?n=r:(f&&f.enter(),n=u(r),f&&(f.exit(),a=!0)),n===e.promise?s(O("Promise-chain cycle")):(i=A(n))?i.call(n,c,s):c(n)):s(r)}catch(t){f&&!a&&f.exit(),s(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&I(t)})}},I=function(t){b.call(c,function(){var e,n,r,o=t._v,i=C(t);if(i&&(e=_(function(){T?P.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=T||C(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},C=function(t){return 1!==t._h&&0===(t._a||t._c).length},D=function(t){b.call(c,function(){var e;T?P.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},N=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),F(e,!0))},B=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw O("Promise can't be resolved itself");(e=A(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,s(B,r,1),s(N,r,1))}catch(t){N.call(r,t)}}):(n._v=t,n._s=1,F(n,!1))}catch(t){N.call({_w:n,_d:!1},t)}}};L||(k=function(t){v(this,k,S,"_h"),h(t),r.call(this);try{t(s(B,this,1),s(N,this,1))}catch(t){N.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(4408)(k.prototype,{then:function(t,e){var n=M(y(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=T?P.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&F(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=s(B,t,1),this.reject=s(N,t,1)},m.f=M=function(t){return t===k||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!L,{Promise:k}),n(2943)(k,S),n(2974)(S),a=n(5645)[S],l(l.S+l.F*!L,S,{reject:function(t){var e=M(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(u||!L),S,{resolve:function(t){return x(u&&this===a?k:this,t)}}),l(l.S+l.F*!(L&&n(7462)(function(t){k.all(t).catch(R)})),S,{all:function(t){var e=this,n=M(e),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;d(t,!1,function(t){var u=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[u]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=M(e),r=n.reject,o=_(function(){d(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},1572:(t,e,n)=>{var r=n(2985),o=n(4963),i=n(7007),a=(n(3816).Reflect||{}).apply,u=Function.apply;r(r.S+r.F*!n(4253)(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=o(t),c=i(n);return a?a(r,e,c):u.call(r,e,c)}})},2139:(t,e,n)=>{var r=n(2985),o=n(2503),i=n(4963),a=n(7007),u=n(5286),c=n(4253),s=n(4398),f=(n(3816).Reflect||{}).construct,l=c(function(){function t(){}return!(f(function(){},[],t)instanceof t)}),p=!c(function(){f(function(){})});r(r.S+r.F*(l||p),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!l)return f(t,e,n);if(t==n){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 r=[null];return r.push.apply(r,e),new(s.apply(t,r))}var c=n.prototype,h=o(u(c)?c:Object.prototype),v=Function.apply.call(t,h,e);return u(v)?v:h}})},685:(t,e,n)=>{var r=n(9275),o=n(2985),i=n(7007),a=n(1689);o(o.S+o.F*n(4253)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){i(t),e=a(e,!0),i(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},5535:(t,e,n)=>{var r=n(2985),o=n(8693).f,i=n(7007);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=o(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},7347:(t,e,n)=>{"use strict";var r=n(2985),o=n(7007),i=function(t){this._t=o(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(9988)(i,"Object",function(){var t,e=this,n=e._k;do{if(e._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},6633:(t,e,n)=>{var r=n(8693),o=n(2985),i=n(7007);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},8989:(t,e,n)=>{var r=n(2985),o=n(468),i=n(7007);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},3049:(t,e,n)=>{var r=n(8693),o=n(468),i=n(9181),a=n(2985),u=n(5286),c=n(7007);a(a.S,"Reflect",{get:function t(e,n){var a,s,f=arguments.length<3?e:arguments[2];return c(e)===f?e[n]:(a=r.f(e,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(f):void 0:u(s=o(e))?t(s,n,f):void 0}})},8270:(t,e,n)=>{var r=n(2985);r(r.S,"Reflect",{has:function(t,e){return e in t}})},4510:(t,e,n)=>{var r=n(2985),o=n(7007),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},3984:(t,e,n)=>{var r=n(2985);r(r.S,"Reflect",{ownKeys:n(7643)})},5769:(t,e,n)=>{var r=n(2985),o=n(7007),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},6014:(t,e,n)=>{var r=n(2985),o=n(7375);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},55:(t,e,n)=>{var r=n(9275),o=n(8693),i=n(468),a=n(9181),u=n(2985),c=n(681),s=n(7007),f=n(5286);u(u.S,"Reflect",{set:function t(e,n,u){var l,p,h=arguments.length<4?e:arguments[3],v=o.f(s(e),n);if(!v){if(f(p=i(e)))return t(p,n,u,h);v=c(0)}if(a(v,"value")){if(!1===v.writable||!f(h))return!1;if(l=o.f(h,n)){if(l.get||l.set||!1===l.writable)return!1;l.value=u,r.f(h,n,l)}else r.f(h,n,c(0,u));return!0}return void 0!==v.set&&(v.set.call(h,u),!0)}})},3946:(t,e,n)=>{var r=n(3816),o=n(266),i=n(9275).f,a=n(616).f,u=n(5364),c=n(3218),s=r.RegExp,f=s,l=s.prototype,p=/a/g,h=/a/g,v=new s(p)!==p;if(n(7057)&&(!v||n(4253)(function(){return h[n(6314)("match")]=!1,s(p)!=p||s(h)==h||"/a/i"!=s(p,"i")}))){s=function(t,e){var n=this instanceof s,r=u(t),i=void 0===e;return!n&&r&&t.constructor===s&&i?t:o(v?new f(r&&!i?t.source:t,e):f((r=t instanceof s)?t.source:t,r&&i?c.call(t):e),n?this:l,s)};for(var d=function(t){t in s||i(s,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},y=a(f),b=0;y.length>b;)d(y[b++]);l.constructor=s,s.prototype=l,n(7234)(r,"RegExp",s)}n(2974)("RegExp")},8269:(t,e,n)=>{"use strict";var r=n(1165);n(2985)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},6774:(t,e,n)=>{n(7057)&&"g"!=/./g.flags&&n(9275).f(RegExp.prototype,"flags",{configurable:!0,get:n(3218)})},1466:(t,e,n)=>{"use strict";var r=n(7007),o=n(875),i=n(6793),a=n(7787);n(8082)("match",1,function(t,e,n,u){return[function(n){var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=u(n,t,this);if(e.done)return e.value;var c=r(t),s=String(this);if(!c.global)return a(c,s);var f=c.unicode;c.lastIndex=0;for(var l,p=[],h=0;null!==(l=a(c,s));){var v=String(l[0]);p[h]=v,""===v&&(c.lastIndex=i(s,o(c.lastIndex),f)),h++}return 0===h?null:p}]})},9357:(t,e,n)=>{"use strict";var r=n(7007),o=n(508),i=n(875),a=n(1467),u=n(6793),c=n(7787),s=Math.max,f=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g,v=function(t){return void 0===t?t:String(t)};n(8082)("replace",2,function(t,e,n,d){return[function(r,o){var i=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=d(n,t,this,e);if(o.done)return o.value;var l=r(t),p=String(this),h="function"==typeof e;h||(e=String(e));var b=l.global;if(b){var g=l.unicode;l.lastIndex=0}for(var m=[];;){var _=c(l,p);if(null===_)break;if(m.push(_),!b)break;""===String(_[0])&&(l.lastIndex=u(p,i(l.lastIndex),g))}for(var w="",x=0,S=0;S<m.length;S++){_=m[S];for(var O=String(_[0]),P=s(f(a(_.index),p.length),0),E=[],j=1;j<_.length;j++)E.push(v(_[j]));var k=_.groups;if(h){var T=[O].concat(E,P,p);void 0!==k&&T.push(k);var R=String(e.apply(void 0,T))}else R=y(O,p,P,E,k,e);P>=x&&(w+=p.slice(x,P)+R,x=P+O.length)}return w+p.slice(x)}];function y(t,e,r,i,a,u){var c=r+t.length,s=i.length,f=h;return void 0!==a&&(a=o(a),f=p),n.call(u,f,function(n,o){var u;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(c);case"<":u=a[o.slice(1,-1)];break;default:var f=+o;if(0===f)return n;if(f>s){var p=l(f/10);return 0===p?n:p<=s?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}u=i[f-1]}return void 0===u?"":u})}})},6142:(t,e,n)=>{"use strict";var r=n(7007),o=n(7195),i=n(7787);n(8082)("search",1,function(t,e,n,a){return[function(n){var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var u=r(t),c=String(this),s=u.lastIndex;o(s,0)||(u.lastIndex=0);var f=i(u,c);return o(u.lastIndex,s)||(u.lastIndex=s),null===f?-1:f.index}]})},1876:(t,e,n)=>{"use strict";var r=n(5364),o=n(7007),i=n(8364),a=n(6793),u=n(875),c=n(7787),s=n(1165),f=n(4253),l=Math.min,p=[].push,h="split",v="length",d="lastIndex",y=4294967295,b=!f(function(){RegExp(y,"y")});n(8082)("split",2,function(t,e,n,f){var g;return g="c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[v]||2!="ab"[h](/(?:ab)*/)[v]||4!="."[h](/(.?)(.?)/)[v]||"."[h](/()()/)[v]>1||""[h](/.?/)[v]?function(t,e){var o=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(o,t,e);for(var i,a,u,c=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,h=void 0===e?y:e>>>0,b=new RegExp(t.source,f+"g");(i=s.call(b,o))&&!((a=b[d])>l&&(c.push(o.slice(l,i.index)),i[v]>1&&i.index<o[v]&&p.apply(c,i.slice(1)),u=i[0][v],l=a,c[v]>=h));)b[d]===i.index&&b[d]++;return l===o[v]?!u&&b.test("")||c.push(""):c.push(o.slice(l)),c[v]>h?c.slice(0,h):c}:"0"[h](void 0,0)[v]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var o=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):g.call(String(o),n,r)},function(t,e){var r=f(g,t,this,e,g!==n);if(r.done)return r.value;var s=o(t),p=String(this),h=i(s,RegExp),v=s.unicode,d=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(b?"y":"g"),m=new h(b?s:"^(?:"+s.source+")",d),_=void 0===e?y:e>>>0;if(0===_)return[];if(0===p.length)return null===c(m,p)?[p]:[];for(var w=0,x=0,S=[];x<p.length;){m.lastIndex=b?x:0;var O,P=c(m,b?p:p.slice(x));if(null===P||(O=l(u(m.lastIndex+(b?0:x)),p.length))===w)x=a(p,x,v);else{if(S.push(p.slice(w,x)),S.length===_)return S;for(var E=1;E<=P.length-1;E++)if(S.push(P[E]),S.length===_)return S;x=w=O}}return S.push(p.slice(w)),S}]})},6108:(t,e,n)=>{"use strict";n(6774);var r=n(7007),o=n(3218),i=n(7057),a="toString",u=/./[a],c=function(t){n(7234)(RegExp.prototype,a,t,!0)};n(4253)(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?c(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):u.name!=a&&c(function(){return u.call(this)})},8184:(t,e,n)=>{"use strict";var r=n(9824),o=n(1616);t.exports=n(5795)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},856:(t,e,n)=>{"use strict";n(9395)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},703:(t,e,n)=>{"use strict";n(9395)("big",function(t){return function(){return t(this,"big","","")}})},1539:(t,e,n)=>{"use strict";n(9395)("blink",function(t){return function(){return t(this,"blink","","")}})},5292:(t,e,n)=>{"use strict";n(9395)("bold",function(t){return function(){return t(this,"b","","")}})},9539:(t,e,n)=>{"use strict";var r=n(2985),o=n(4496)(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},6620:(t,e,n)=>{"use strict";var r=n(2985),o=n(875),i=n(2094),a="endsWith",u=""[a];r(r.P+r.F*n(8852)(a),"String",{endsWith:function(t){var e=i(this,t,a),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),c=void 0===n?r:Math.min(o(n),r),s=String(t);return u?u.call(e,s,c):e.slice(c-s.length,c)===s}})},6629:(t,e,n)=>{"use strict";n(9395)("fixed",function(t){return function(){return t(this,"tt","","")}})},3694:(t,e,n)=>{"use strict";n(9395)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},7648:(t,e,n)=>{"use strict";n(9395)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},191:(t,e,n)=>{var r=n(2985),o=n(2337),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},2850:(t,e,n)=>{"use strict";var r=n(2985),o=n(2094),i="includes";r(r.P+r.F*n(8852)(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},7795:(t,e,n)=>{"use strict";n(9395)("italics",function(t){return function(){return t(this,"i","","")}})},9115:(t,e,n)=>{"use strict";var r=n(4496)(!0);n(2923)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},4531:(t,e,n)=>{"use strict";n(9395)("link",function(t){return function(e){return t(this,"a","href",e)}})},8306:(t,e,n)=>{var r=n(2985),o=n(2110),i=n(875);r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(e[u++])),u<r&&a.push(String(arguments[u]));return a.join("")}})},823:(t,e,n)=>{var r=n(2985);r(r.P,"String",{repeat:n(8595)})},3605:(t,e,n)=>{"use strict";n(9395)("small",function(t){return function(){return t(this,"small","","")}})},7732:(t,e,n)=>{"use strict";var r=n(2985),o=n(875),i=n(2094),a="startsWith",u=""[a];r(r.P+r.F*n(8852)(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return u?u.call(e,r,n):e.slice(n,n+r.length)===r}})},6780:(t,e,n)=>{"use strict";n(9395)("strike",function(t){return function(){return t(this,"strike","","")}})},9937:(t,e,n)=>{"use strict";n(9395)("sub",function(t){return function(){return t(this,"sub","","")}})},511:(t,e,n)=>{"use strict";n(9395)("sup",function(t){return function(){return t(this,"sup","","")}})},4564:(t,e,n)=>{"use strict";n(9599)("trim",function(t){return function(){return t(this,3)}})},5767:(t,e,n)=>{"use strict";var r=n(3816),o=n(9181),i=n(7057),a=n(2985),u=n(7234),c=n(4728).KEY,s=n(4253),f=n(3825),l=n(2943),p=n(3953),h=n(6314),v=n(8787),d=n(6074),y=n(5541),b=n(4302),g=n(7007),m=n(5286),_=n(508),w=n(2110),x=n(1689),S=n(681),O=n(2503),P=n(9327),E=n(8693),j=n(4548),k=n(9275),T=n(7184),R=E.f,M=k.f,L=P.f,A=r.Symbol,F=r.JSON,I=F&&F.stringify,C="prototype",D=h("_hidden"),N=h("toPrimitive"),B={}.propertyIsEnumerable,U=f("symbol-registry"),W=f("symbols"),G=f("op-symbols"),V=Object[C],z="function"==typeof A&&!!j.f,q=r.QObject,J=!q||!q[C]||!q[C].findChild,K=i&&s(function(){return 7!=O(M({},"a",{get:function(){return M(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=R(V,e);r&&delete V[e],M(t,e,n),r&&t!==V&&M(V,e,r)}:M,Z=function(t){var e=W[t]=O(A[C]);return e._k=t,e},H=z&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},Y=function(t,e,n){return t===V&&Y(G,e,n),g(t),e=x(e,!0),g(n),o(W,e)?(n.enumerable?(o(t,D)&&t[D][e]&&(t[D][e]=!1),n=O(n,{enumerable:S(0,!1)})):(o(t,D)||M(t,D,S(1,{})),t[D][e]=!0),K(t,e,n)):M(t,e,n)},$=function(t,e){g(t);for(var n,r=y(e=w(e)),o=0,i=r.length;i>o;)Y(t,n=r[o++],e[n]);return t},X=function(t){var e=B.call(this,t=x(t,!0));return!(this===V&&o(W,t)&&!o(G,t))&&(!(e||!o(this,t)||!o(W,t)||o(this,D)&&this[D][t])||e)},Q=function(t,e){if(t=w(t),e=x(e,!0),t!==V||!o(W,e)||o(G,e)){var n=R(t,e);return!n||!o(W,e)||o(t,D)&&t[D][e]||(n.enumerable=!0),n}},tt=function(t){for(var e,n=L(w(t)),r=[],i=0;n.length>i;)o(W,e=n[i++])||e==D||e==c||r.push(e);return r},et=function(t){for(var e,n=t===V,r=L(n?G:w(t)),i=[],a=0;r.length>a;)!o(W,e=r[a++])||n&&!o(V,e)||i.push(W[e]);return i};z||(u((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===V&&e.call(G,n),o(this,D)&&o(this[D],t)&&(this[D][t]=!1),K(this,t,S(1,n))};return i&&J&&K(V,t,{configurable:!0,set:e}),Z(t)})[C],"toString",function(){return this._k}),E.f=Q,k.f=Y,n(616).f=P.f=tt,n(4682).f=X,j.f=et,i&&!n(4461)&&u(V,"propertyIsEnumerable",X,!0),v.f=function(t){return Z(h(t))}),a(a.G+a.W+a.F*!z,{Symbol:A});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)h(nt[rt++]);for(var ot=T(h.store),it=0;ot.length>it;)d(ot[it++]);a(a.S+a.F*!z,"Symbol",{for:function(t){return o(U,t+="")?U[t]:U[t]=A(t)},keyFor:function(t){if(!H(t))throw TypeError(t+" is not a symbol!");for(var e in U)if(U[e]===t)return e},useSetter:function(){J=!0},useSimple:function(){J=!1}}),a(a.S+a.F*!z,"Object",{create:function(t,e){return void 0===e?O(t):$(O(t),e)},defineProperty:Y,defineProperties:$,getOwnPropertyDescriptor:Q,getOwnPropertyNames:tt,getOwnPropertySymbols:et});var at=s(function(){j.f(1)});a(a.S+a.F*at,"Object",{getOwnPropertySymbols:function(t){return j.f(_(t))}}),F&&a(a.S+a.F*(!z||s(function(){var t=A();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(m(e)||void 0!==t)&&!H(t))return b(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!H(e))return e}),r[1]=e,I.apply(F,r)}}),A[C][N]||n(7728)(A[C],N,A[C].valueOf),l(A,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},142:(t,e,n)=>{"use strict";var r=n(2985),o=n(9383),i=n(1125),a=n(7007),u=n(2337),c=n(875),s=n(5286),f=n(3816).ArrayBuffer,l=n(8364),p=i.ArrayBuffer,h=i.DataView,v=o.ABV&&f.isView,d=p.prototype.slice,y=o.VIEW,b="ArrayBuffer";r(r.G+r.W+r.F*(f!==p),{ArrayBuffer:p}),r(r.S+r.F*!o.CONSTR,b,{isView:function(t){return v&&v(t)||s(t)&&y in t}}),r(r.P+r.U+r.F*n(4253)(function(){return!new p(2).slice(1,void 0).byteLength}),b,{slice:function(t,e){if(void 0!==d&&void 0===e)return d.call(a(this),t);for(var n=a(this).byteLength,r=u(t,n),o=u(void 0===e?n:e,n),i=new(l(this,p))(c(o-r)),s=new h(this),f=new h(i),v=0;r<o;)f.setUint8(v++,s.getUint8(r++));return i}}),n(2974)(b)},1786:(t,e,n)=>{var r=n(2985);r(r.G+r.W+r.F*!n(9383).ABV,{DataView:n(1125).DataView})},162:(t,e,n)=>{n(8440)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},3834:(t,e,n)=>{n(8440)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},4821:(t,e,n)=>{n(8440)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},1303:(t,e,n)=>{n(8440)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},5368:(t,e,n)=>{n(8440)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},9103:(t,e,n)=>{n(8440)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},3318:(t,e,n)=>{n(8440)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},6964:(t,e,n)=>{n(8440)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},2152:(t,e,n)=>{n(8440)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},147:(t,e,n)=>{"use strict";var r,o=n(3816),i=n(50)(0),a=n(7234),u=n(4728),c=n(5345),s=n(3657),f=n(5286),l=n(1616),p=n(1616),h=!o.ActiveXObject&&"ActiveXObject"in o,v="WeakMap",d=u.getWeak,y=Object.isExtensible,b=s.ufstore,g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(f(t)){var e=d(t);return!0===e?b(l(this,v)).get(t):e?e[this._i]:void 0}},set:function(t,e){return s.def(l(this,v),t,e)}},_=t.exports=n(5795)(v,g,m,s,!0,!0);p&&h&&(c((r=s.getConstructor(g,v)).prototype,m),u.NEED=!0,i(["delete","has","get","set"],function(t){var e=_.prototype,n=e[t];a(e,t,function(e,o){if(f(e)&&!y(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},9192:(t,e,n)=>{"use strict";var r=n(3657),o=n(1616),i="WeakSet";n(5795)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,i),t,!0)}},r,!1,!0)},1268:(t,e,n)=>{"use strict";var r=n(2985),o=n(3325),i=n(508),a=n(875),u=n(4963),c=n(6886);r(r.P,"Array",{flatMap:function(t){var e,n,r=i(this);return u(t),e=a(r.length),n=c(r,0),o(n,r,r,e,0,1,t,arguments[1]),n}}),n(7722)("flatMap")},2773:(t,e,n)=>{"use strict";var r=n(2985),o=n(9315)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(7722)("includes")},3276:(t,e,n)=>{var r=n(2985),o=n(1131)(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},8351:(t,e,n)=>{var r=n(2985),o=n(7643),i=n(2110),a=n(8693),u=n(2811);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),c=a.f,s=o(r),f={},l=0;s.length>l;)void 0!==(n=c(r,e=s[l++]))&&u(f,e,n);return f}})},6409:(t,e,n)=>{var r=n(2985),o=n(1131)(!1);r(r.S,"Object",{values:function(t){return o(t)}})},9865:(t,e,n)=>{"use strict";var r=n(2985),o=n(5645),i=n(3816),a=n(8364),u=n(94);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then(function(){return n})}:t,n?function(n){return u(e,t()).then(function(){throw n})}:t)}})},2770:(t,e,n)=>{"use strict";var r=n(2985),o=n(5442),i=n(575),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*a,"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},1784:(t,e,n)=>{"use strict";var r=n(2985),o=n(5442),i=n(575),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*a,"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},5869:(t,e,n)=>{"use strict";n(9599)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},4325:(t,e,n)=>{"use strict";n(9599)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},9665:(t,e,n)=>{n(6074)("asyncIterator")},1181:(t,e,n)=>{for(var r=n(6997),o=n(7184),i=n(7234),a=n(3816),u=n(7728),c=n(2803),s=n(6314),f=s("iterator"),l=s("toStringTag"),p=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(h),d=0;d<v.length;d++){var y,b=v[d],g=h[b],m=a[b],_=m&&m.prototype;if(_&&(_[f]||u(_,f,p),_[l]||u(_,l,b),c[b]=p,g))for(y in r)_[y]||i(_,y,r[y],!0)}},4633:(t,e,n)=>{var r=n(2985),o=n(4193);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},2564:(t,e,n)=>{var r=n(3816),o=n(2985),i=n(575),a=[].slice,u=/MSIE .\./.test(i),c=function(t){return function(e,n){var r=arguments.length>2,o=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};o(o.G+o.B+o.F*u,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},6337:(t,e,n)=>{n(2564),n(4633),n(1181),t.exports=n(5645)},7187:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function i(){i.init.call(this)}t.exports=i,t.exports.once=function(t,e){return new Promise(function(n,r){function o(n){t.removeListener(e,i),r(n)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}d(t,e,i,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&d(t,"error",e,{once:!0})}(t,o)})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?i.defaultMaxListeners:t._maxListeners}function s(t,e,n,r){var o,i,a,s;if(u(n),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),a=i[e]),void 0===a)a=i[e]=n,++t._eventsCount;else if("function"==typeof a?a=i[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(t))>0&&a.length>o&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=a.length,s=f,console&&console.warn&&console.warn(s)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=f.bind(r);return o.listener=n,r.wrapFn=o,o}function p(t,e,n){var r=t._events;if(void 0===r)return[];var o=r[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):v(o,o.length)}function h(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function d(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,function o(i){r.once&&t.removeEventListener(e,o),n(i)})}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");a=t}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var o="error"===t,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var u=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw u.context=a,u}var c=i[t];if(void 0===c)return!1;if("function"==typeof c)r(c,this,e);else{var s=c.length,f=v(c,s);for(n=0;n<s;++n)r(f[n],this,e)}return!0},i.prototype.addListener=function(t,e){return s(this,t,e,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(t,e){return s(this,t,e,!0)},i.prototype.once=function(t,e){return u(e),this.on(t,l(this,t,e)),this},i.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,l(this,t,e)),this},i.prototype.removeListener=function(t,e){var n,r,o,i,a;if(u(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===e||n[i].listener===e){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,a||e)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},i.prototype.listeners=function(t){return p(this,t,!0)},i.prototype.rawListeners=function(t){return p(this,t,!1)},i.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},5666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===v){if("throw"===o)throw i;return R()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=P(a,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=f(t,e,n);if("normal"===c.type){if(r=n.done?v:p,c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=v,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",p="suspendedYield",h="executing",v="completed",d={};function y(){}function b(){}function g(){}var m={};c(m,i,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(T([])));w&&w!==n&&r.call(w,i)&&(m=w);var x=g.prototype=y.prototype=Object.create(m);function S(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,u)},function(t){n("throw",t,a,u)}):e.resolve(l).then(function(t){s.value=t,a(s)},function(t){return n("throw",t,a,u)})}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}}function P(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=f(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function E(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function T(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:R}}function R(){return{value:e,done:!0}}return b.prototype=g,c(x,"constructor",g),c(g,"constructor",b),b.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},S(O.prototype),c(O.prototype,a,function(){return this}),t.AsyncIterator=O,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(x),c(x,u,"Generator"),c(x,i,function(){return this}),c(x,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(j),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},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 n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n(6981),n(9009)})();
|
|
1
|
+
(()=>{var t={6981:(t,e,n)=>{"use strict";n(1983);var r,o=(r=n(115))&&r.__esModule?r:{default:r};o.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),o.default._babelPolyfill=!0},1983:(t,e,n)=>{"use strict";n(6266),n(990),n(911),n(4160),n(6197),n(6728),n(4039),n(3568),n(8051),n(8250),n(5434),n(4952),n(6337),n(5666)},9009:(t,e,n)=>{"use strict";var r=n(7187),o=n.n(r);function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const a=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){var n=!1;t.value!==this.value&&(n=!0,this.value=t.value),n&&e.emit(this.control,t,this)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const c=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){t.value!==this.value&&(this.value=t.value,1===this.value&&e.emit("".concat(this.control,":pressed"),t,this),0===this.value&&e.emit("".concat(this.control,":released"),t,this),e.emit(this.control,t,this))}},{key:"poll",value:function(){return this.value}},{key:"toJSON",value:function(){return{control:this.control,type:"Button",value:this.value}}}])&&u(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const f=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value=null}var e,n;return e=t,(n=[{key:"update",value:function(t,e){this.value=t.value,e.emit(this.control,t,this)}}])&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function l(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const p=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){t.value!==this.value&&(this.value=t.value,e.emit(this.control,t,this))}}])&&l(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function h(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const v=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value="",this.x=0,this.y=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){t.value===this.value&&t.x===this.x&&t.y===this.y||(this.value=t.value,this.x=t.x,this.y=t.y,e.emit(this.control,t,this))}}])&&h(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();Promise.resolve(!1),Promise.resolve(!0);var d=Promise.resolve();function y(t,e){return t||(t=0),new Promise(function(n){return setTimeout(function(){return n(e)},t)})}function b(){return Math.random().toString(36).substring(2)}var g=0,m=0;function _(){var t=(new Date).getTime();return t===g?1e3*t+ ++m:(g=t,m=0,1e3*t)}var w="[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0);const x={create:function(t){var e={messagesCallback:null,bc:new BroadcastChannel(t),subFns:[]};return e.bc.onmessage=function(t){e.messagesCallback&&e.messagesCallback(t.data)},e},close:function(t){t.bc.close(),t.subFns=[]},onMessage:function(t,e){t.messagesCallback=e},postMessage:function(t,e){try{return t.bc.postMessage(e,!1),d}catch(t){return Promise.reject(t)}},canBeUsed:function(){if(w&&"undefined"==typeof window)return!1;if("function"==typeof BroadcastChannel){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}return!1},type:"native",averageResponseTime:function(){return 150},microSeconds:_};var S=function(){function t(t){this.ttl=t,this.set=new Set,this.timeMap=new Map}return t.prototype.has=function(t){return this.set.has(t)},t.prototype.add=function(t){var e=this;this.timeMap.set(t,O()),this.set.add(t),setTimeout(function(){!function(t){for(var e=O()-t.ttl,n=t.set[Symbol.iterator]();;){var r=n.next().value;if(!r)return;if(!(t.timeMap.get(r)<e))return;t.timeMap.delete(r),t.set.delete(r)}}(e)},0)},t.prototype.clear=function(){this.set.clear(),this.timeMap.clear()},t}();function O(){return(new Date).getTime()}function P(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=JSON.parse(JSON.stringify(t));return void 0===e.webWorkerSupport&&(e.webWorkerSupport=!0),e.idb||(e.idb={}),e.idb.ttl||(e.idb.ttl=45e3),e.idb.fallbackInterval||(e.idb.fallbackInterval=150),t.idb&&"function"==typeof t.idb.onclose&&(e.idb.onclose=t.idb.onclose),e.localstorage||(e.localstorage={}),e.localstorage.removeTimeout||(e.localstorage.removeTimeout=6e4),t.methods&&(e.methods=t.methods),e.node||(e.node={}),e.node.ttl||(e.node.ttl=12e4),e.node.maxParallelWrites||(e.node.maxParallelWrites=2048),void 0===e.node.useFastPath&&(e.node.useFastPath=!0),e}var E="messages";function j(){if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof window){if(void 0!==window.mozIndexedDB)return window.mozIndexedDB;if(void 0!==window.webkitIndexedDB)return window.webkitIndexedDB;if(void 0!==window.msIndexedDB)return window.msIndexedDB}return!1}function k(t){t.closed||T(t).then(function(){return y(t.options.idb.fallbackInterval)}).then(function(){return k(t)})}function T(t){return t.closed?d:t.messagesCallback?(e=t.db,n=t.lastCursorId,r=e.transaction(E).objectStore(E),o=[],new Promise(function(t){(function(){try{var t=IDBKeyRange.bound(n+1,1/0);return r.openCursor(t)}catch(t){return r.openCursor()}}()).onsuccess=function(e){var r=e.target.result;r?r.value.id<n+1?r.continue(n+1):(o.push(r.value),r.continue()):t(o)}})).then(function(e){var n=e.filter(function(t){return!!t}).map(function(e){return e.id>t.lastCursorId&&(t.lastCursorId=e.id),e}).filter(function(e){return function(t,e){return!(t.uuid===e.uuid||e.eMIs.has(t.id)||t.data.time<e.messagesCallbackTime)}(e,t)}).sort(function(t,e){return t.time-e.time});return n.forEach(function(e){t.messagesCallback&&(t.eMIs.add(e.id),t.messagesCallback(e.data))}),d}):d;var e,n,r,o}const M={create:function(t,e){return e=P(e),function(t){var e="pubkey.broadcast-channel-0-"+t,n=j().open(e,1);return n.onupgradeneeded=function(t){t.target.result.createObjectStore(E,{keyPath:"id",autoIncrement:!0})},new Promise(function(t,e){n.onerror=function(t){return e(t)},n.onsuccess=function(){t(n.result)}})}(t).then(function(n){var r={closed:!1,lastCursorId:0,channelName:t,options:e,uuid:b(),eMIs:new S(2*e.idb.ttl),writeBlockPromise:d,messagesCallback:null,readQueuePromises:[],db:n};return n.onclose=function(){r.closed=!0,e.idb.onclose&&e.idb.onclose()},k(r),r})},close:function(t){t.closed=!0,t.db.close()},onMessage:function(t,e,n){t.messagesCallbackTime=n,t.messagesCallback=e,T(t)},postMessage:function(t,e){return t.writeBlockPromise=t.writeBlockPromise.then(function(){return function(t,e,n){var r={uuid:e,time:(new Date).getTime(),data:n},o=t.transaction([E],"readwrite");return new Promise(function(t,e){o.oncomplete=function(){return t()},o.onerror=function(t){return e(t)},o.objectStore(E).add(r)})}(t.db,t.uuid,e)}).then(function(){var e,n;0===Math.floor(11*Math.random()+0)&&(e=t.db,n=t.options.idb.ttl,function(t,e){var n=(new Date).getTime()-e,r=t.transaction(E).objectStore(E),o=[];return new Promise(function(t){r.openCursor().onsuccess=function(e){var r=e.target.result;if(r){var i=r.value;if(!(i.time<n))return void t(o);o.push(i),r.continue()}else t(o)}})}(e,n).then(function(t){return Promise.all(t.map(function(t){return function(t,e){var n=t.transaction([E],"readwrite").objectStore(E).delete(e);return new Promise(function(t){n.onsuccess=function(){return t()}})}(e,t.id)}))}))}),t.writeBlockPromise},canBeUsed:function(){return!w&&!!j()},type:"idb",averageResponseTime:function(t){return 2*t.idb.fallbackInterval},microSeconds:_};function R(){var t;if("undefined"==typeof window)return null;try{t=window.localStorage,t=window["ie8-eventlistener/storage"]||window.localStorage}catch(t){}return t}function L(t){return"pubkey.broadcastChannel-"+t}function A(){if(w)return!1;var t=R();if(!t)return!1;try{var e="__broadcastchannel_check";t.setItem(e,"works"),t.removeItem(e)}catch(t){return!1}return!0}const F={create:function(t,e){if(e=P(e),!A())throw new Error("BroadcastChannel: localstorage cannot be used");var n=b(),r=new S(e.localstorage.removeTimeout),o={channelName:t,uuid:n,eMIs:r};return o.listener=function(t){var e=L(t),i=function(t){var i;t.key===e&&(i=JSON.parse(t.newValue),o.messagesCallback&&i.uuid!==n&&i.token&&!r.has(i.token)&&(i.data.time&&i.data.time<o.messagesCallbackTime||(r.add(i.token),o.messagesCallback(i.data))))};return window.addEventListener("storage",i),i}(t),o},close:function(t){var e;e=t.listener,window.removeEventListener("storage",e)},onMessage:function(t,e,n){t.messagesCallbackTime=n,t.messagesCallback=e},postMessage:function(t,e){return new Promise(function(n){y().then(function(){var r=L(t.channelName),o={token:b(),time:(new Date).getTime(),data:e,uuid:t.uuid},i=JSON.stringify(o);R().setItem(r,i);var a=document.createEvent("Event");a.initEvent("storage",!0,!0),a.key=r,a.newValue=i,window.dispatchEvent(a),n()})})},canBeUsed:A,type:"localstorage",averageResponseTime:function(){var t=navigator.userAgent.toLowerCase();return t.includes("safari")&&!t.includes("chrome")?240:120},microSeconds:_};var I=_,C=new Set;const D={create:function(t){var e={name:t,messagesCallback:null};return C.add(e),e},close:function(t){C.delete(t)},onMessage:function(t,e){t.messagesCallback=e},postMessage:function(t,e){return new Promise(function(n){return setTimeout(function(){Array.from(C).filter(function(e){return e.name===t.name}).filter(function(e){return e!==t}).filter(function(t){return!!t.messagesCallback}).forEach(function(t){return t.messagesCallback(e)}),n()},5)})},canBeUsed:function(){return!0},type:"simulate",averageResponseTime:function(){return 5},microSeconds:I};var N=[x,M,F],B=new Set,U=0,W=function(t,e){var n,r,o;this.id=U++,B.add(this),this.name=t,this.options=P(e),this.method=function(t){var e=[].concat(t.methods,N).filter(Boolean);if(t.type){if("simulate"===t.type)return D;var n=e.find(function(e){return e.type===t.type});if(n)return n;throw new Error("method-type "+t.type+" not found")}t.webWorkerSupport||w||(e=e.filter(function(t){return"idb"!==t.type}));var r=e.find(function(t){return t.canBeUsed()});if(r)return r;throw new Error("No useable method found in "+JSON.stringify(N.map(function(t){return t.type})))}(this.options),this._iL=!1,this._onML=null,this._addEL={message:[],internal:[]},this._uMP=new Set,this._befC=[],this._prepP=null,(o=r=(n=this).method.create(n.name,n.options))&&"function"==typeof o.then?(n._prepP=r,r.then(function(t){n._state=t})):n._state=r};function G(t,e,n){var r={time:t.method.microSeconds(),type:e,data:n};return(t._prepP?t._prepP:d).then(function(){var e=t.method.postMessage(t._state,r);return t._uMP.add(e),e.catch().then(function(){return t._uMP.delete(e)}),e})}function V(t){return t._addEL.message.length>0||t._addEL.internal.length>0}function z(t,e,n){t._addEL[e].push(n),function(t){if(!t._iL&&V(t)){var e=function(e){t._addEL[e.type].forEach(function(t){var n=t.time-1e5;e.time>=n&&t.fn(e.data)})},n=t.method.microSeconds();t._prepP?t._prepP.then(function(){t._iL=!0,t.method.onMessage(t._state,e,n)}):(t._iL=!0,t.method.onMessage(t._state,e,n))}}(t)}function q(t,e,n){t._addEL[e]=t._addEL[e].filter(function(t){return t!==n}),function(t){if(t._iL&&!V(t)){t._iL=!1;var e=t.method.microSeconds();t.method.onMessage(t._state,null,e)}}(t)}function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function K(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function H(t,e,n){return e&&Z(t.prototype,e),n&&Z(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}W._pubkey=!0,W.prototype={postMessage:function(t){if(this.closed)throw new Error("BroadcastChannel.postMessage(): Cannot post message after channel has closed "+JSON.stringify(t));return G(this,"message",t)},postInternal:function(t){return G(this,"internal",t)},set onmessage(t){var e={time:this.method.microSeconds(),fn:t};q(this,"message",this._onML),t&&"function"==typeof t?(this._onML=e,z(this,"message",e)):this._onML=null},addEventListener:function(t,e){z(this,t,{time:this.method.microSeconds(),fn:e})},removeEventListener:function(t,e){q(this,t,this._addEL[t].find(function(t){return t.fn===e}))},close:function(){var t=this;if(!this.closed){B.delete(this),this.closed=!0;var e=this._prepP?this._prepP:d;return this._onML=null,this._addEL.message=[],e.then(function(){return Promise.all(Array.from(t._uMP))}).then(function(){return Promise.all(t._befC.map(function(t){return t()}))}).then(function(){return t.method.close(t._state)})}},get type(){return this.method.type},get isClosed(){return this.closed}};var Y=H(function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"PageDevice";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var o=e.devices||e;this.channel=new W(r),o.forEach(function(t){t.on("updated",function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach(function(e){K(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t);e.device="".concat(r,"-").concat(t.device),e.control="Page".concat(t.control),delete e.target,delete e.event,n.channel.postMessage(e)})})});function $(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}const Q={Amount:a,Button:c,Data:f,Dial:p,Drop:v,PageAction:Y,Pointer:function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.value=0,this.x=0,this.y=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){t.value===this.value&&t.x===this.x&&t.y===this.y||(this.value=t.value,this.x=t.x,this.y=t.y,e.emit(this.control,t,this))}}])&&$(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Joystick:function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.control=e,this.x=0,this.y=0}var e,n;return e=t,(n=[{key:"update",value:function(t,e){t.x===this.x&&t.y===this.y||(this.x=t.x,this.y=t.y,e.emit(this.control,t,this))}}])&&X(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()};function tt(t){return tt="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},tt(t)}function et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function nt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?et(Object(n),!0).forEach(function(e){rt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function rt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ot(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function it(t,e){return it=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},it(t,e)}function at(t){return at=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},at(t)}var ut=new Set(["mouse","touch","pen"]),ct=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&it(t,e)}(a,t);var e,n,r,o,i=(r=a,o=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}}(),function(){var t,e=at(r);if(o){var n=at(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===tt(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)}(this,t)});function a(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this)).devices=[],t.controls={},t.inputPrecedence=[],t.controlMap=nt(nt({},Q),n),e.forEach(function(e){return t.addDevice(e)}),t}return e=a,(n=[{key:"preferredInput",get:function(){return this.inputPrecedence[0]||null}},{key:"noteInput",value:function(t){if(t&&t!==this.inputPrecedence[0]){var e=this.inputPrecedence.indexOf(t);e>0&&this.inputPrecedence.splice(e,1),this.inputPrecedence.unshift(t),this.emit("input-precedence-updated",this.inputPrecedence)}}},{key:"addControl",value:function(t,e){var n=this.controlMap[e];if(n)return this.controls[t]=new n(t);var r=this.controls[t]=new this.controlMap.Data(t);return console.warn("".concat(t,': "').concat(e,"\" has no associated control class. Using 'Data'.")),r}},{key:"addDevice",value:function(t){var e=this;this.devices.push(t),t.on("input-activity",function(t){e.noteInput(t)}),t.on("updated",function(n){var r=function(t,e){if(null!=e&&e.inputMethod)return e.inputMethod;var n=null==t?void 0:t.inputMethod;if("pointer"===n){var r,o=null==e||null===(r=e.event)||void 0===r?void 0:r.pointerType;return ut.has(o)?o:"pointer"}return n||null}(t,n);r&&e.noteInput(r);var o=n.control,i=e.controls[o];(i||(i=e.addControl(o,n.type)))&&i.update(n,e)})}},{key:"getControl",value:function(t,e){var n=this.controls[t];return!n&&e&&(n=this.addControl(t,e)),n}},{key:"poll",value:function(t){var e,n;return null===(e=this.controls[t])||void 0===e||null===(n=e.poll)||void 0===n?void 0:n.call(e)}}])&&ot(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o());const st=ct;function ft(t){return ft="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},ft(t)}function lt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ht(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function pt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(t,e)||ht(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ht(t,e){if(t){if("string"==typeof t)return vt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vt(t,e):void 0}}function vt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function dt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yt(t,e){return yt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},yt(t,e)}function bt(t){return bt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},bt(t)}function gt(t){return"string"==typeof t?{control:t,data:void 0}:{control:t.control,data:t.data}}const mt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yt(t,e)}(a,t);var e,n,r,o,i=(r=a,o=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}}(),function(){var t,e=bt(r);if(o){var n=bt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ft(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)}(this,t)});function a(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),(e=i.call(this)).controller=t,e.enabled="function"==typeof r.enabled?r.enabled:function(){return!0},e.preventDefault=!1!==r.preventDefault,e.autoTick=!1!==r.autoTick,e._bindings=new Map,e._controlIndex=new Map,e._heldByAction=new Map,e._lastEvent=new Map,e._listeners=[],e._disposed=!1,e._wasEnabled=!0,e._raf=0,e._applyBindings(n),e.preventDefault&&(e._onKeyDownCapture=function(t){e.enabled()&&e._keyboardCodes.has(t.code)&&t.preventDefault()},window.addEventListener("keydown",e._onKeyDownCapture,!0)),e._onBlur=function(){e.clearHeld()},window.addEventListener("blur",e._onBlur),e.autoTick&&(e._raf=requestAnimationFrame(function t(){e._disposed||(e._raf=requestAnimationFrame(t),e._tick())})),e}return e=a,(n=[{key:"_applyBindings",value:function(t){var e=this;this._keyboardCodes=new Set;for(var n=0,r=Object.entries(t);n<r.length;n++){var o=pt(r[n],2),i=o[0],a=(o[1]||[]).map(gt);this._bindings.set(i,a),this._heldByAction.set(i,new Set);var u,c=lt(a);try{var s=function(){var t,n=u.value;((t=n.control).startsWith("Key")||t.startsWith("Arrow")||t.startsWith("Digit")||t.startsWith("Numpad")||"Space"===t||"Enter"===t||"Escape"===t||"Tab"===t||"Backspace"===t||"ShiftLeft"===t||"ShiftRight"===t||"ControlLeft"===t||"ControlRight"===t||"AltLeft"===t||"AltRight"===t)&&e._keyboardCodes.add(n.control);var r=e._controlIndex.get(n.control);r||(r=[],e._controlIndex.set(n.control,r)),r.push({action:i,data:n.data});var o=function(t){return e._onPhysicalPressed(n.control,t)},a=function(t){return e._onPhysicalReleased(n.control,t)};e.controller.on("".concat(n.control,":pressed"),o),e.controller.on("".concat(n.control,":released"),a),e._listeners.push({event:"".concat(n.control,":pressed"),fn:o},{event:"".concat(n.control,":released"),fn:a})};for(c.s();!(u=c.n()).done;)s()}catch(t){c.e(t)}finally{c.f()}}}},{key:"_isEnabled",value:function(){var t=this.enabled();return this._wasEnabled&&!t&&this.clearHeld(),this._wasEnabled=t,t}},{key:"_onPhysicalPressed",value:function(t,e){if(this._isEnabled()){var n=this._controlIndex.get(t);if(n){var r,o=lt(n);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=i.action,u=i.data,c=this._heldByAction.get(a),s=0===c.size;c.add(t);var f={action:a,control:t,data:u,device:null==e?void 0:e.device,raw:e};this._lastEvent.set(a,f),s&&this.emit("".concat(a,":pressed"),f),this.emit(a,f)}}catch(t){o.e(t)}finally{o.f()}}}}},{key:"_onPhysicalReleased",value:function(t,e){var n=this._controlIndex.get(t);if(n){var r,o=lt(n);try{for(o.s();!(r=o.n()).done;){var i=r.value,a=i.action,u=i.data,c=this._heldByAction.get(a);if(c.has(t)){c.delete(t);var s={action:a,control:t,data:u,device:null==e?void 0:e.device,raw:e};if(0===c.size)this._lastEvent.delete(a),this.emit("".concat(a,":released"),s);else{var f,l=lt(this._bindings.get(a)||[]);try{for(l.s();!(f=l.n()).done;){var p=f.value;if(c.has(p.control)){this._lastEvent.set(a,{action:a,control:p.control,data:p.data,device:null==e?void 0:e.device,raw:e});break}}}catch(t){l.e(t)}finally{l.f()}}}}}catch(t){o.e(t)}finally{o.f()}}}},{key:"_tick",value:function(){if(this._isEnabled()){var t,e=lt(this._heldByAction);try{for(e.s();!(t=e.n()).done;){var n=pt(t.value,2),r=n[0];if(0!==n[1].size){var o=this._lastEvent.get(r);o&&this.emit("".concat(r,":held"),o)}}}catch(t){e.e(t)}finally{e.f()}}}},{key:"held",value:function(t){var e=this._heldByAction.get(t);return Boolean(e&&e.size>0)}},{key:"heldEvent",value:function(t){return this.held(t)&&this._lastEvent.get(t)||null}},{key:"clearHeld",value:function(){var t,e=lt(this._heldByAction);try{for(e.s();!(t=e.n()).done;){var n=pt(t.value,2),r=n[0],o=n[1];if(0!==o.size){var i=this._lastEvent.get(r);o.clear(),this._lastEvent.delete(r),this.emit("".concat(r,":released"),i||{action:r,control:null,data:void 0})}}}catch(t){e.e(t)}finally{e.f()}}},{key:"dispose",value:function(){if(!this._disposed){this._disposed=!0,cancelAnimationFrame(this._raf);var t,e=lt(this._listeners);try{for(e.s();!(t=e.n()).done;){var n=t.value,r=n.event,o=n.fn;this.controller.off(r,o)}}catch(t){e.e(t)}finally{e.f()}this._listeners.length=0,this._onKeyDownCapture&&window.removeEventListener("keydown",this._onKeyDownCapture,!0),window.removeEventListener("blur",this._onBlur),this.removeAllListeners()}}}])&&dt(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o()),_t=JSON.parse('{"00002a7e-0000-1000-8000-00805f9b34fb":"aerobic_heart_rate_lower_limit","00002a84-0000-1000-8000-00805f9b34fb":"aerobic_heart_rate_upper_limit","00002a7f-0000-1000-8000-00805f9b34fb":"aerobic_threshold","00002a80-0000-1000-8000-00805f9b34fb":"age","00002a5a-0000-1000-8000-00805f9b34fb":"aggregate","00002a43-0000-1000-8000-00805f9b34fb":"alert_category_id","00002a42-0000-1000-8000-00805f9b34fb":"alert_category_id_bit_mask","00002a06-0000-1000-8000-00805f9b34fb":"alert_level","00002a44-0000-1000-8000-00805f9b34fb":"alert_notification_control_point","00002a3f-0000-1000-8000-00805f9b34fb":"alert_status","00002ab3-0000-1000-8000-00805f9b34fb":"altitude","00002a81-0000-1000-8000-00805f9b34fb":"anaerobic_heart_rate_lower_limit","00002a82-0000-1000-8000-00805f9b34fb":"anaerobic_heart_rate_upper_limit","00002a83-0000-1000-8000-00805f9b34fb":"anaerobic_threshold","00002a58-0000-1000-8000-00805f9b34fb":"analog","00002a73-0000-1000-8000-00805f9b34fb":"apparent_wind_direction","00002a72-0000-1000-8000-00805f9b34fb":"apparent_wind_speed","00002a01-0000-1000-8000-00805f9b34fb":"gap.appearance","00002aa3-0000-1000-8000-00805f9b34fb":"barometric_pressure_trend","00002a19-0000-1000-8000-00805f9b34fb":"battery_level","00002a49-0000-1000-8000-00805f9b34fb":"blood_pressure_feature","00002a35-0000-1000-8000-00805f9b34fb":"blood_pressure_measurement","00002a9b-0000-1000-8000-00805f9b34fb":"body_composition_feature","00002a9c-0000-1000-8000-00805f9b34fb":"body_composition_measurement","00002a38-0000-1000-8000-00805f9b34fb":"body_sensor_location","00002aa4-0000-1000-8000-00805f9b34fb":"bond_management_control_point","00002aa5-0000-1000-8000-00805f9b34fb":"bond_management_feature","00002a22-0000-1000-8000-00805f9b34fb":"boot_keyboard_input_report","00002a32-0000-1000-8000-00805f9b34fb":"boot_keyboard_output_report","00002a33-0000-1000-8000-00805f9b34fb":"boot_mouse_input_report","00002aa6-0000-1000-8000-00805f9b34fb":"gap.central_address_resolution_support","00002aa8-0000-1000-8000-00805f9b34fb":"cgm_feature","00002aa7-0000-1000-8000-00805f9b34fb":"cgm_measurement","00002aab-0000-1000-8000-00805f9b34fb":"cgm_session_run_time","00002aaa-0000-1000-8000-00805f9b34fb":"cgm_session_start_time","00002aac-0000-1000-8000-00805f9b34fb":"cgm_specific_ops_control_point","00002aa9-0000-1000-8000-00805f9b34fb":"cgm_status","00002a5c-0000-1000-8000-00805f9b34fb":"csc_feature","00002a5b-0000-1000-8000-00805f9b34fb":"csc_measurement","00002a2b-0000-1000-8000-00805f9b34fb":"current_time","00002a66-0000-1000-8000-00805f9b34fb":"cycling_power_control_point","00002a65-0000-1000-8000-00805f9b34fb":"cycling_power_feature","00002a63-0000-1000-8000-00805f9b34fb":"cycling_power_measurement","00002a64-0000-1000-8000-00805f9b34fb":"cycling_power_vector","00002a99-0000-1000-8000-00805f9b34fb":"database_change_increment","00002a85-0000-1000-8000-00805f9b34fb":"date_of_birth","00002a86-0000-1000-8000-00805f9b34fb":"date_of_threshold_assessment","00002a08-0000-1000-8000-00805f9b34fb":"date_time","00002a0a-0000-1000-8000-00805f9b34fb":"day_date_time","00002a09-0000-1000-8000-00805f9b34fb":"day_of_week","00002a7d-0000-1000-8000-00805f9b34fb":"descriptor_value_changed","00002a00-0000-1000-8000-00805f9b34fb":"gap.device_name","00002a7b-0000-1000-8000-00805f9b34fb":"dew_point","00002a56-0000-1000-8000-00805f9b34fb":"digital","00002a0d-0000-1000-8000-00805f9b34fb":"dst_offset","00002a6c-0000-1000-8000-00805f9b34fb":"elevation","00002a87-0000-1000-8000-00805f9b34fb":"email_address","00002a0c-0000-1000-8000-00805f9b34fb":"exact_time_256","00002a88-0000-1000-8000-00805f9b34fb":"fat_burn_heart_rate_lower_limit","00002a89-0000-1000-8000-00805f9b34fb":"fat_burn_heart_rate_upper_limit","00002a26-0000-1000-8000-00805f9b34fb":"firmware_revision_string","00002a8a-0000-1000-8000-00805f9b34fb":"first_name","00002a8b-0000-1000-8000-00805f9b34fb":"five_zone_heart_rate_limits","00002ab2-0000-1000-8000-00805f9b34fb":"floor_number","00002a8c-0000-1000-8000-00805f9b34fb":"gender","00002a51-0000-1000-8000-00805f9b34fb":"glucose_feature","00002a18-0000-1000-8000-00805f9b34fb":"glucose_measurement","00002a34-0000-1000-8000-00805f9b34fb":"glucose_measurement_context","00002a74-0000-1000-8000-00805f9b34fb":"gust_factor","00002a27-0000-1000-8000-00805f9b34fb":"hardware_revision_string","00002a39-0000-1000-8000-00805f9b34fb":"heart_rate_control_point","00002a8d-0000-1000-8000-00805f9b34fb":"heart_rate_max","00002a37-0000-1000-8000-00805f9b34fb":"heart_rate_measurement","00002a7a-0000-1000-8000-00805f9b34fb":"heat_index","00002a8e-0000-1000-8000-00805f9b34fb":"height","00002a4c-0000-1000-8000-00805f9b34fb":"hid_control_point","00002a4a-0000-1000-8000-00805f9b34fb":"hid_information","00002a8f-0000-1000-8000-00805f9b34fb":"hip_circumference","00002a6f-0000-1000-8000-00805f9b34fb":"humidity","00002aad-0000-1000-8000-00805f9b34fb":"indoor_positioning_configuration","00002a1e-0000-1000-8000-00805f9b34fb":"intermediate_temperature","00002a77-0000-1000-8000-00805f9b34fb":"irradiance","00002aa2-0000-1000-8000-00805f9b34fb":"language","00002a90-0000-1000-8000-00805f9b34fb":"last_name","00002aae-0000-1000-8000-00805f9b34fb":"latitude","00002a6b-0000-1000-8000-00805f9b34fb":"ln_control_point","00002a6a-0000-1000-8000-00805f9b34fb":"ln_feature","00002ab0-0000-1000-8000-00805f9b34fb":"local_north_coordinate","00002a0f-0000-1000-8000-00805f9b34fb":"local_time_information","00002a67-0000-1000-8000-00805f9b34fb":"location_and_speed","00002ab5-0000-1000-8000-00805f9b34fb":"location_name","00002aaf-0000-1000-8000-00805f9b34fb":"longitude","00002a2c-0000-1000-8000-00805f9b34fb":"magnetic_declination","00002aa0-0000-1000-8000-00805f9b34fb":"magnetic_flux_density_2D","00002aa1-0000-1000-8000-00805f9b34fb":"magnetic_flux_density_3D","00002a29-0000-1000-8000-00805f9b34fb":"manufacturer_name_string","00002a91-0000-1000-8000-00805f9b34fb":"maximum_recommended_heart_rate","00002a21-0000-1000-8000-00805f9b34fb":"measurement_interval","00002a24-0000-1000-8000-00805f9b34fb":"model_number_string","00002a68-0000-1000-8000-00805f9b34fb":"navigation","00002a46-0000-1000-8000-00805f9b34fb":"new_alert","00002a04-0000-1000-8000-00805f9b34fb":"gap.peripheral_preferred_connection_parameters","00002a02-0000-1000-8000-00805f9b34fb":"gap.peripheral_privacy_flag","00002a5f-0000-1000-8000-00805f9b34fb":"plx_continuous_measurement","00002a60-0000-1000-8000-00805f9b34fb":"plx_features","00002a5e-0000-1000-8000-00805f9b34fb":"plx_spot_check_measurement","00002a50-0000-1000-8000-00805f9b34fb":"pnp_id","00002a75-0000-1000-8000-00805f9b34fb":"pollen_concentration","00002a69-0000-1000-8000-00805f9b34fb":"position_quality","00002a6d-0000-1000-8000-00805f9b34fb":"pressure","00002a4e-0000-1000-8000-00805f9b34fb":"protocol_mode","00002a78-0000-1000-8000-00805f9b34fb":"rainfall","00002a03-0000-1000-8000-00805f9b34fb":"gap.reconnection_address","00002a52-0000-1000-8000-00805f9b34fb":"record_access_control_point","00002a14-0000-1000-8000-00805f9b34fb":"reference_time_information","00002a4d-0000-1000-8000-00805f9b34fb":"report","00002a4b-0000-1000-8000-00805f9b34fb":"report_map","00002a92-0000-1000-8000-00805f9b34fb":"resting_heart_rate","00002a40-0000-1000-8000-00805f9b34fb":"ringer_control_point","00002a41-0000-1000-8000-00805f9b34fb":"ringer_setting","00002a54-0000-1000-8000-00805f9b34fb":"rsc_feature","00002a53-0000-1000-8000-00805f9b34fb":"rsc_measurement","00002a55-0000-1000-8000-00805f9b34fb":"sc_control_point","00002a4f-0000-1000-8000-00805f9b34fb":"scan_interval_window","00002a31-0000-1000-8000-00805f9b34fb":"scan_refresh","00002a5d-0000-1000-8000-00805f9b34fb":"sensor_location","00002a25-0000-1000-8000-00805f9b34fb":"serial_number_string","00002a05-0000-1000-8000-00805f9b34fb":"gatt.service_changed","00002a28-0000-1000-8000-00805f9b34fb":"software_revision_string","00002a93-0000-1000-8000-00805f9b34fb":"sport_type_for_aerobic_and_anaerobic_thresholds","00002a47-0000-1000-8000-00805f9b34fb":"supported_new_alert_category","00002a48-0000-1000-8000-00805f9b34fb":"supported_unread_alert_category","00002a23-0000-1000-8000-00805f9b34fb":"system_id","00002a6e-0000-1000-8000-00805f9b34fb":"temperature","00002a1c-0000-1000-8000-00805f9b34fb":"temperature_measurement","00002a1d-0000-1000-8000-00805f9b34fb":"temperature_type","00002a94-0000-1000-8000-00805f9b34fb":"three_zone_heart_rate_limits","00002a12-0000-1000-8000-00805f9b34fb":"time_accuracy","00002a13-0000-1000-8000-00805f9b34fb":"time_source","00002a16-0000-1000-8000-00805f9b34fb":"time_update_control_point","00002a17-0000-1000-8000-00805f9b34fb":"time_update_state","00002a11-0000-1000-8000-00805f9b34fb":"time_with_dst","00002a0e-0000-1000-8000-00805f9b34fb":"time_zone","00002a71-0000-1000-8000-00805f9b34fb":"true_wind_direction","00002a70-0000-1000-8000-00805f9b34fb":"true_wind_speed","00002a95-0000-1000-8000-00805f9b34fb":"two_zone_heart_rate_limit","00002a07-0000-1000-8000-00805f9b34fb":"tx_power_level","00002ab4-0000-1000-8000-00805f9b34fb":"uncertainty","00002a45-0000-1000-8000-00805f9b34fb":"unread_alert_status","00002a9f-0000-1000-8000-00805f9b34fb":"user_control_point","00002a9a-0000-1000-8000-00805f9b34fb":"user_index","00002a76-0000-1000-8000-00805f9b34fb":"uv_index","00002a96-0000-1000-8000-00805f9b34fb":"vo2_max","00002a97-0000-1000-8000-00805f9b34fb":"waist_circumference","00002a98-0000-1000-8000-00805f9b34fb":"weight","00002a9d-0000-1000-8000-00805f9b34fb":"weight_measurement","00002a9e-0000-1000-8000-00805f9b34fb":"weight_scale_feature","00002a79-0000-1000-8000-00805f9b34fb":"wind_chill"}'),wt={default:{convert:function(t){return t.byteLength?t:null}},"00002901-0000-1000-8000-00805f9b34fb":{convert:function(t){return new TextDecoder("utf-8").decode(t)}},"00002904-0000-1000-8000-00805f9b34fb":{convert:function(t){return t.getUint8()}}},xt=[{description:"Reserved For Future Use",convert:function(t){return t.byteLength?t:null}},{description:"Boolean",convert:function(t){return t.getInt8()}},{description:"unsigned 2-bit integer",convert:function(t){return t.getUint8()}},{description:"unsigned 4-bit integer",convert:function(t){return t.getUint8()}},{description:"unsigned 8-bit integer",convert:function(t){return t.getUint8()}},{description:"unsigned 12-bit integer",convert:function(t){return t.getUint16()}},{description:"unsigned 16-bit integer",convert:function(t){return t.getUint16()}},{description:"unsigned 24-bit integer",convert:function(t){return t.getUint32()}},{description:"unsigned 32-bit integer",convert:function(t){return t.getUint32()}},{description:"unsigned 48-bit integer",convert:function(t){return t.getBigUint64()}},{description:"unsigned 64-bit integer",convert:function(t){return t.getBigUint64()}},{description:"unsigned 128-bit integer",convert:function(t){return[t.getBigUint64(),t.getBigUint64(8)]}},{description:"signed 8-bit integer",convert:function(t){return t.getInt8()}},{description:"signed 12-bit integer",convert:function(t){return t.getInt16()}},{description:"signed 16-bit integer",convert:function(t){return t.getInt16()}},{description:"signed 24-bit integer",convert:function(t){return t.getInt32()}},{description:"signed 32-bit integer",convert:function(t){return t.getInt32()}},{description:"signed 48-bit integer",convert:function(t){return t.getBigInt64()}},{description:"signed 64-bit integer",convert:function(t){return t.getBigInt64()}},{description:"signed 128-bit integer",convert:function(t){return[t.getBigInt64(),t.getBigInt64(8)]}},{description:"IEEE-754 32-bit floating point",convert:function(t){return t.getFloat32()}},{description:"IEEE-754 64-bit floating point",convert:function(t){return t.getFloat64()}},{description:"IEEE-11073 16-bit SFLOAT",convert:function(t){return t}},{description:"IEEE-11073 32-bit FLOAT",convert:function(t){return t}},{description:"IEEE-20601 format",convert:function(t){return t}},{description:"UTF-8 string",convert:function(t){return new TextDecoder("utf-8").decode(t)}},{description:"UTF-16 string",convert:function(t){return new TextDecoder("utf-16").decode(t)}},{description:"Opaque Structure",convert:function(t){return t}}];function St(t){return St="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},St(t)}function Ot(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Pt(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){Ot(i,r,o,a,u,"next",t)}function u(t){Ot(i,r,o,a,u,"throw",t)}a(void 0)})}}function Et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function jt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Et(Object(n),!0).forEach(function(e){kt(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function kt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Tt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Rt(t,e,n){return e&&Mt(t.prototype,e),n&&Mt(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Lt(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&&At(t,e)}function At(t,e){return At=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},At(t,e)}function Ft(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 n,r=It(t);if(e){var o=It(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===St(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)}(this,n)}}function It(t){return It=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},It(t)}var Ct=function(t,e){var n=null==e?void 0:e.descriptors;if(n){var r=n.find(function(e){return e.uuid===t});if(r)return r.value}return null},Dt=function(t){return"string"==typeof t?t:Ct("2901",t)||Ct("00002904-0000-1000-8000-00805f9b34fb",t)},Nt=Ct.bind(null,"2904"),Bt=function(t){var e=t.description,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CustomType";switch(e){case"Reserved For Future Use":case"Opaque Structure":return n;case"Boolean":return"Button";case"UTF-8 string":case"UTF-16 string":return"Text";default:return"Amount"}},Ut=null,Wt=null;try{Ut=window.ble||window.top.ble,Wt=window.cordova||window.top.cordova}catch(t){}var Gt=function(t){Lt(r,t);var e,n=Ft(r);function r(){var t,e,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{acceptAllDevices:!0},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BLEDevice",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Tt(this,r),(e=n.call(this)).deviceName=i,e.uuidMap=jt(jt({},_t),a),e.ble=null!==(t=window.ble)&&void 0!==t?t:window.top.ble,e.writes={},null!=o&&o.id?(e.device=o,e.options=null):(e.device=null,e.options=o),e}return Rt(r,[{key:"initialize",value:(e=Pt(regeneratorRuntime.mark(function t(e){var n,r,o=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.device){t.next=6;break}return t.next=3,this.requestDevice(e||this.options);case 3:if(this.device=t.sent,this.device){t.next=6;break}throw"No device selected.";case 6:return t.next=8,this.connect();case 8:(n=t.sent)&&(r=n.characteristics,this.device=n,r.forEach(function(){var t=Pt(regeneratorRuntime.mark(function t(e){var r,i,a,u,c,s,f,l;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.properties,i=e.characteristic.toLowerCase(),a=o.uuidMap[i],u=Dt(a)||i,c=e.descriptors||[],s=xt[Nt(a)||27],console.log(u,e),c.forEach(function(t){console.log("".concat(t.uuid," | ").concat(u),t)}),r.indexOf("Read"),!(r.indexOf("Write")>=0)){t.next=8;break}if(!o.writes[u]){t.next=7;break}throw new Error('There is already a writable characteristic named "'.concat(u,'".'));case 7:o.writes[u]=function(t){var r;return o.ble.withPromises.write(n.id,e.service,e.characteristic,null!==(r=t.buffer)&&void 0!==r?r:t)};case 8:r.indexOf("Notify")>=0&&(f=Bt(s,u),l=null,o.ble.startNotification(n.id,e.service,e.characteristic,function(t,e){var n=s.convert(new DataView(t));l!==n&&(l=n,o.emit("updated",{control:u,device:o.deviceName,type:f,value:n}))},function(t){throw t}));case 9:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()));case 10:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})},{key:"requestDevice",value:function(t){var e=this;return console.log("Requesting Device..."),new Promise(function(n,r){var o;console.log("Starting Scan... "),"ios"!==Wt.platformId&&e.ble.isLocationEnabled(function(){console.log("Location is enabled")},function(){console.log("Location is disabled")}),e.ble.startScan("ios"===Wt.platformId&&null!==(o=null==t?void 0:t.optionalServices)&&void 0!==o?o:[],function(r){var o,i=null!==(o=null==t?void 0:t.optionalServices)&&void 0!==o?o:[],a=null;if(console.log("Found",r),"ios"===Wt.platformId)a=r;else{var u=new Uint8Array(r.advertising),c=Array.prototype.map.call(u,function(t){return("00"+t.toString(16)).slice(-2)}).join("");console.log(c.match(/[a-fA-F0-9]{4}/g).join("-")),i.forEach(function(t){var e=t.replace(/\-/g,"");c.match(/[a-fA-F0-9]{2}/g).reverse().join("").indexOf(e)>=0&&(a=r,console.log("Found a match! ".concat(t)))})}a&&(e.ble.stopScan(),n(a))},function(t){console.log("Error",t),e.ble.stopScan(),r(t)})})}},{key:"connect",value:function(){var t=this;return new Promise(function(e,n){if(!t.device)throw n(),"No device selected.";t.ble.connect(t.device.id,function(n){t.emit("updated",{control:"".concat(t.deviceName,"Connection"),device:t.deviceName,target:n,type:"Button",value:1}),e(n)},function(){console.log("".concat(t.deviceName," disconnected.")),t.emit("updated",{control:"".concat(t.deviceName,"Connection"),device:t.deviceName,type:"Button",value:0}),t.writes={}})})}},{key:"disconnect",value:function(){var t=this;this.ble.isConnected(this.device.id,function(){t.ble.disconnect(t.device.id)},function(){throw"Device not connected."})}},{key:"write",value:function(t,e){if(!this.writes[t])throw new Error('No writable characteristic "'.concat(t,'".'));return this.writes[t](e)}}]),r}(o()),Vt=function(t){Lt(o,t);var e,n,r=Ft(o);function o(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{acceptAllDevices:!0},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BLEDevice",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Tt(this,o),(t=r.call(this)).deviceName=n,t.uuidMap=jt(jt({},_t),i),t.writes={},null!=e&&e.gatt?(t.device=e,t.options=null):(t.device=null,t.options=e),t}return Rt(o,[{key:"initialize",value:(n=Pt(regeneratorRuntime.mark(function t(e){var n,r,o,i,a=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=!!this.device){t.next=9;break}if(navigator.bluetooth){t.next=4;break}throw"This web browser does not support Bluetooth.";case 4:return t.next=6,navigator.bluetooth.requestDevice(e||this.options);case 6:if(this.device=t.sent,this.device){t.next=9;break}throw"No device selected.";case 9:return this.device.addEventListener("gattserverdisconnected",function(){console.log("".concat(a.deviceName," disconnected.")),a.emit("updated",{control:"".concat(a.deviceName,"Connection"),device:a.deviceName,type:"Button",value:0}),a.writes={}}),t.prev=10,t.next=13,this.connect();case 13:if(!t.sent){t.next=22;break}return r=this.device.gatt,t.next=17,r.getPrimaryServices();case 17:t.sent.forEach(function(){var t=Pt(regeneratorRuntime.mark(function t(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getCharacteristics();case 2:t.sent.forEach(function(){var t=Pt(regeneratorRuntime.mark(function t(e){var n,r,o,i,u,c,s,f,l,p;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.properties,r=a.uuidMap[e.uuid],o=Dt(r)||e.uuid,i=xt[27],console.log(o,e),t.prev=3,t.next=6,e.getDescriptors();case 6:u=t.sent,c=!1,u.forEach(function(){var t=Pt(regeneratorRuntime.mark(function t(e){var n,r;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.t0=null!==(n=wt[e.uuid])&&void 0!==n?n:wt.default,t.next=4,e.readValue();case 4:t.t1=t.sent,r=t.t0.convert.call(t.t0,t.t1),"00002904-0000-1000-8000-00805f9b34fb"===e.uuid&&(i=xt[r]||xt[0],c=!0),console.log("".concat(e.uuid," | ").concat(o),r),t.next=13;break;case 10:t.prev=10,t.t2=t.catch(0),console.warn('Error converting data from descriptor "'.concat(e.uuid,'".'),t.t2);case 13:case"end":return t.stop()}},t,null,[[0,10]])}));return function(e){return t.apply(this,arguments)}}()),c||(s=Nt(r))&&(i=xt[s]),t.next=14;break;case 12:t.prev=12,t.t0=t.catch(3);case 14:if(n.read,!n.write){t.next=19;break}if(!a.writes[o]){t.next=18;break}throw new Error('There is already a writable characteristic named "'.concat(o,'".'));case 18:a.writes[o]=function(t){var n,r=t instanceof DataView?t:new DataView(null!==(n=t.buffer)&&void 0!==n?n:t);return e.writeValueWithResponse(r)};case 19:if(!n.notify){t.next=25;break}return f=function(t){var e=t.currentTarget,n=i.convert(e.value);p!==n&&(p=n,a.emit("updated",{control:o,device:a.deviceName,type:l,value:n}))},l=Bt(i,o),p=null,t.next=24,e.startNotifications();case 24:e.addEventListener("characteristicvaluechanged",f);case 25:case"end":return t.stop()}},t,null,[[3,12]])}));return function(e){return t.apply(this,arguments)}}());case 4:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}()),t.next=23;break;case 22:throw"Not able to connect to device.";case 23:t.next=29;break;case 25:throw t.prev=25,t.t0=t.catch(10),n||(null!==(o=this.device)&&void 0!==o&&null!==(i=o.gatt)&&void 0!==i&&i.connected&&this.device.gatt.disconnect(),this.device=null),t.t0;case 29:case"end":return t.stop()}},t,this,[[10,25]])})),function(t){return n.apply(this,arguments)})},{key:"connect",value:(e=Pt(regeneratorRuntime.mark(function t(){var e;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this.device){t.next=4;break}throw"No device selected.";case 4:return e=this.device.gatt,t.next=7,e.connect();case 7:if(!e.connected){t.next=12;break}return this.emit("updated",{control:"".concat(this.deviceName,"Connection"),device:this.deviceName,target:this.device,type:"Button",value:1}),t.abrupt("return",!0);case 12:return t.abrupt("return",!1);case 13:case"end":return t.stop()}},t,this)})),function(){return e.apply(this,arguments)})},{key:"disconnect",value:function(){var t,e;if(null!==(t=this.device)&&void 0!==t&&null!==(e=t.gatt)&&void 0!==e&&e.connected)return this.device.gatt.disconnect();throw"Device not connected."}},{key:"write",value:function(t,e){if(!this.writes[t])throw new Error('No writable characteristic "'.concat(t,'".'));return this.writes[t](e)}}]),o}(o());const zt=Ut?Gt:Vt;function qt(t){return qt="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},qt(t)}function Jt(t,e){return Jt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Jt(t,e)}function Kt(t){return Kt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Kt(t)}const Zt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jt(t,e)}(i,t);var e,n,r,o=(n=i,r=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}}(),function(){var t,e=Kt(n);if(r){var o=Kt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===qt(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)}(this,t)});function i(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"FabricDevice";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).inputMethod="pointer",e.pressed=0,t.on("mousedown",function(r){e.pressed=1,e.emit("updated",{control:"FabricPointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.pointer.x,y:r.pointer.y})}),t.on("mousemove",function(r){e.emit("updated",{control:"FabricPointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.pointer.x,y:r.pointer.y})}),t.on("mouseup",function(r){e.pressed=0,e.emit("updated",{control:"FabricPointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.pointer.x,y:r.pointer.y})}),t.on("dropped",function(r){e.emit("updated",{control:"FabricDrop",device:n,event:r,target:t,type:"Drop",value:r.dropZone?r.dropZone.dropZone:"",x:r.dropZone?r.dropZoneX:r.x,y:r.dropZone?r.dropZoneY:r.y}),r.stopPropagation()}),t.on("dragover",function(r){e.emit("updated",{control:"FabricDrag",device:n,event:r,target:t,type:"Drop",value:r.dropZone?r.dropZone.dropZone:"",x:r.dropZone?r.dropZoneX:r.x,y:r.dropZone?r.dropZoneY:r.y}),r.stopPropagation()}),t.on("rotating",function(r){e.emit("updated",{control:"FabricDial",device:n,event:r,target:t,type:"Dial",value:t.angle/360})}),e}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(o());function Ht(t){return Ht="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},Ht(t)}function Yt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Xt(t,e,n){return e&&$t(t.prototype,e),n&&$t(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Qt(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&&te(t,e)}function te(t,e){return te=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},te(t,e)}function ee(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 n,r=ne(t);if(e){var o=ne(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===Ht(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)}(this,n)}}function ne(t){return ne=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ne(t)}function re(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var oe=function(t,e){var n=t.x,r=t.y,o=Math.sqrt(n*n+r*r);if(o>1)t.x*=1/o,t.y*=1/o;else if(o<e)t.x=0,t.y=0;else{var i=1-e;t.x=(n-e)/i,t.y=(r-e)/i}return t},ie=function t(){for(var e=function(t){if(Array.isArray(t))return re(t)}(i=window.navigator.getGamepads())||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return re(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?re(t,e):void 0}}(i)||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.")}(),n=0;n<e.length;n++){var r=e[n];if(r){var o=ce[r.index];o?o.update(r):ce[r.index]=new se(r)}}var i;window.requestAnimationFrame(t)},ae={duration:500,startDelay:0,strongMagnitude:1,weakMagnitude:1},ue={a0:"LeftStick",a1:"RightStick",b0:"AButton",b1:"BButton",b2:"XButton",b3:"YButton",b4:"LeftBumper",b5:"RightBumper",b6:"LeftTrigger",b7:"RightTrigger",b8:"BackButton",b9:"StartButton",b10:"LeftStickButton",b11:"RightStickButton",b12:"UpDPad",b13:"DownDPad",b14:"LeftDPad",b15:"RightDPad"},ce=[];window.addEventListener("gamepadconnected",function(){ie()});var se=function(t){Qt(n,t);var e=ee(n);function n(t){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1;Yt(this,n),(r=e.call(this)).source=t,r.deadzone=i,r.axes=[];for(var a=0;a<t.axes.length>>1;a++)r.axes.push(oe({x:t.axes[2*a],y:t.axes[2*a+1]},i));r.buttons=[];for(var u=0;u<t.buttons.length;u++)r.buttons.push(t.buttons[u].value);return r.id=o||"".concat(t.id," - ").concat(t.index),r}return Xt(n,[{key:"dualRumble",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;ae.duration=t,ae.startDelay=e,ae.strongMagnitude=n,ae.weakMagnitude=r,this.source.vibrationActuator.playEffect("dual-rumble",ae)}},{key:"update",value:function(t){for(var e=this.axes,n=this.buttons,r=0;r<e.length;r++){var o=e[r],i=oe({x:t.axes[2*r],y:t.axes[2*r+1]},this.deadzone);if(o.x!==i.x||o.y!==i.y){var a=i.x,u=i.y;o.x=a,o.y=u,this.emit("updated",{control:ue["a".concat(r)],device:this.id,target:this,type:"Joystick",x:a,y:u})}}for(var c=0;c<t.buttons.length;c++){var s=t.buttons[c].value;s!==n[c]&&(n[c]=s,this.emit("updated",{control:ue["b".concat(c)],device:this.id,target:this,type:"Button",value:s}))}}}]),n}(o());const fe=function(t){Qt(n,t);var e=ee(n);function n(){var t;return Yt(this,n),(t=e.call(this)).inputMethod="gamepad",t.eventHandlers=[],window.addEventListener("gamepadconnected",function(){t.emit("input-activity","gamepad"),t.updateGamepads()}),t.updateGamepads(),t}return Xt(n,[{key:"updateGamepads",value:function(){for(var t=this,e=0;e<this.eventHandlers.length;e++)this.eventHandlers[e].gamepad.off("updated",this.eventHandlers[e].handler);this.eventHandlers.length=0;for(var n=0;n<ce.length;n++){var r=function(e){t.emit("updated",e)};ce[n].on("updated",r),this.eventHandlers.push({gamepad:ce[n],handler:r})}}}]),n}(o());function le(t){return le="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},le(t)}function pe(t,e){return pe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},pe(t,e)}function he(t){return he=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},he(t)}const ve=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pe(t,e)}(i,t);var e,n,r,o=(n=i,r=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}}(),function(){var t,e=he(n);if(r){var o=he(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===le(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)}(this,t)});function i(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Keyboard";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).inputMethod="keyboard",window.addEventListener("keydown",function(n){t.emit("updated",{control:n.code,device:e,event:n,type:"Button",value:1})}),window.addEventListener("keyup",function(n){t.emit("updated",{control:n.code,device:e,event:n,type:"Button",value:0})}),t}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(o());function de(t){return de="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},de(t)}function ye(t,e){return ye=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ye(t,e)}function be(t){return be=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},be(t)}const ge=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ye(t,e)}(i,t);var e,n,r,o=(n=i,r=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}}(),function(){var t,e=be(n);if(r){var o=be(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===de(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)}(this,t)});function i(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"PageDevice";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).channel=new W(e),t.channel.addEventListener("message",function(e){t.emit("updated",e)}),t}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(o());function me(t){return me="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},me(t)}function _e(t,e){return _e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},_e(t,e)}function we(t){return we=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},we(t)}const xe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_e(t,e)}(i,t);var e,n,r,o=(n=i,r=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}}(),function(){var t,e=we(n);if(r){var o=we(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===me(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)}(this,t)});function i(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"PixiDevice";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).inputMethod="pointer",e.pressed=0,t.on("pointerdown",function(r){e.pressed=1,e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.x,y:r.y})}),t.on("pointermove",function(r){e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.x,y:r.y})}),t.on("pointerup",function(r){e.pressed=0,e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:r.x,y:r.y})}),e}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(o());function Se(t){return Se="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},Se(t)}function Oe(t,e){return Oe=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Oe(t,e)}function Pe(t){return Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Pe(t)}const Ee=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oe(t,e)}(i,t);var e,n,r,o=(n=i,r=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}}(),function(){var t,e=Pe(n);if(r){var o=Pe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Se(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)}(this,t)});function i(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"PointerDevice";return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this)).inputMethod="pointer",e.pressed=0,t.addEventListener("pointerdown",function(r){var o,i,a,u;e.pressed=1,e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:null!==(o=r.x)&&void 0!==o?o:null===(i=r.pointer)||void 0===i?void 0:i.x,y:null!==(a=r.y)&&void 0!==a?a:null===(u=r.pointer)||void 0===u?void 0:u.y})}),t.addEventListener("pointermove",function(r){var o,i,a,u;e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:null!==(o=r.x)&&void 0!==o?o:null===(i=r.pointer)||void 0===i?void 0:i.x,y:null!==(a=r.y)&&void 0!==a?a:null===(u=r.pointer)||void 0===u?void 0:u.y})}),t.addEventListener("pointerup",function(r){var o,i,a,u;e.pressed=0,e.emit("updated",{control:"Pointer",device:n,event:r,target:t,type:"Pointer",value:e.pressed,x:null!==(o=r.x)&&void 0!==o?o:null===(i=r.pointer)||void 0===i?void 0:i.x,y:null!==(a=r.y)&&void 0!==a?a:null===(u=r.pointer)||void 0===u?void 0:u.y})}),e}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(o());function je(t){return je="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},je(t)}function ke(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function Te(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Me(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Me(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Re(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Le(t,e){return Le=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Le(t,e)}function Ae(t){return Ae=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ae(t)}var Fe=[250,500,1e3,2e3];function Ie(){return"undefined"==typeof window?null:window.SpeechRecognition||window.webkitSpeechRecognition||null}function Ce(t){return String(null!=t?t:"").replace(/\s+/g," ").trim().toLowerCase()}function De(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?t.filter(function(t){return t&&"string"==typeof t.control&&t.type&&Array.isArray(t.phrases)}).map(function(t){return{control:t.control,type:t.type,phrases:t.phrases.map(Ce).filter(Boolean),value:t.value,x:t.x,y:t.y,releaseMs:"number"==typeof t.releaseMs?t.releaseMs:null}}).filter(function(t){return t.phrases.length>0}):[]}var Ne=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Le(t,e)}(s,t);var e,n,r,o,i,a,u,c=(a=s,u=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}}(),function(){var t,e=Ae(a);if(u){var n=Ae(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===je(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)}(this,t)});function s(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),"string"==typeof e&&(e={device:e}),(t=c.call(this)).device=e.device||"Speech",t.inputMethod="speech",t.transcriptControl=e.transcriptControl||"SpeechTranscript",t.lang=e.lang||"en-US",t.interimResults=Boolean(e.interimResults),t.cooldownMs="number"==typeof e.cooldownMs?e.cooldownMs:800,t._Ctor=Ie(),t._mappings=De(e.mappings),t._cooldownUntil=new Map,t._releaseTimers=new Map,t._recognition=null,t._active=!1,t._listening=!1,t._starting=!1,t._recovering=!1,t._intentionalStop=!1,t._failCount=0,t._destroyed=!1,t._restartTimer=null,t._stopWaitTimer=null,t._startWatchTimer=null,t._warmResult=null,t._warmPromise=null,t._onBlur=function(){t.setActive(!1)},"undefined"!=typeof window&&window.addEventListener("blur",t._onBlur),t}return e=s,n=[{key:"setMappings",value:function(t){this._mappings=De(t)}},{key:"setActive",value:function(t){var e=Boolean(t);if(this._active!==e){if(this._active=e,!e)return this._failCount=0,void this._stopRecognition();this.emit("input-activity","speech"),this._shouldListen()&&this._scheduleStart(0)}}},{key:"start",value:function(){this.setActive(!0)}},{key:"stop",value:function(){this.setActive(!1)}},{key:"destroy",value:function(){this._destroyed=!0,"undefined"!=typeof window&&window.removeEventListener("blur",this._onBlur),this._clearRestartTimer(),this._clearStopWaitTimer(),this._clearStartWatchTimer(),this._clearAllReleaseTimers(),this.setActive(!1),this.removeAllListeners()}},{key:"_shouldListen",value:function(){return this._active&&!this._destroyed&&null!=this._Ctor}},{key:"_clearRestartTimer",value:function(){null!=this._restartTimer&&(clearTimeout(this._restartTimer),this._restartTimer=null)}},{key:"_clearStopWaitTimer",value:function(){null!=this._stopWaitTimer&&(clearTimeout(this._stopWaitTimer),this._stopWaitTimer=null)}},{key:"_clearStartWatchTimer",value:function(){null!=this._startWatchTimer&&(clearTimeout(this._startWatchTimer),this._startWatchTimer=null)}},{key:"_clearAllReleaseTimers",value:function(){var t,e=Te(this._releaseTimers.values());try{for(e.s();!(t=e.n()).done;){var n=t.value;clearTimeout(n)}}catch(t){e.e(t)}finally{e.f()}this._releaseTimers.clear()}},{key:"_clearReleaseTimer",value:function(t){var e=this._releaseTimers.get(t);null!=e&&(clearTimeout(e),this._releaseTimers.delete(t))}},{key:"_detach",value:function(t){t.onstart=null,t.onresult=null,t.onerror=null,t.onend=null}},{key:"_scheduleStart",value:function(t){var e=this;this._clearRestartTimer(),this._shouldListen()&&(this._restartTimer=setTimeout(function(){e._restartTimer=null,e._startRecognition()},t))}},{key:"_noteRecoverableFailure",value:function(){var t;if(this._failCount+=1,this._starting=!1,this._listening=!1,this._shouldListen()){if(this._failCount>Fe.length)return this._recovering=!1,void this.setActive(!1);this._recovering=!0;var e=null!==(t=Fe[this._failCount-1])&&void 0!==t?t:Fe[Fe.length-1];this._scheduleStart(e)}else this._recovering=!1}},{key:"_warmCapture",value:function(){var t=this;if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this._warmResult=null),null!=this._warmResult)return Promise.resolve(this._warmResult);if(this._warmPromise)return this._warmPromise;var e="undefined"!=typeof navigator?navigator.mediaDevices:null;if(null==e||!e.getUserMedia)return this._warmResult=!0,Promise.resolve(!0);var n=e.getUserMedia({audio:!0}).then(function(e){var n,r=Te(e.getTracks());try{for(r.s();!(n=r.n()).done;)n.value.stop()}catch(t){r.e(t)}finally{r.f()}return t._warmResult=!0,!0}).catch(function(){return t._warmResult=!1,!1}),r=Promise.race([n,new Promise(function(e){setTimeout(function(){var n;return e(null!==(n=t._warmResult)&&void 0!==n&&n)},1500)})]);return this._warmPromise=r.finally(function(){t._warmPromise=null}),this._warmPromise}},{key:"_stopRecognition",value:function(){var t=this;this._clearRestartTimer(),this._clearStartWatchTimer(),this._starting=!1,this._recovering=!1;var e=this._recognition;if(!e)return this._intentionalStop=!1,this._clearStopWaitTimer(),void(this._listening=!1);this._intentionalStop=!0;try{e.stop()}catch(t){try{e.abort()}catch(t){}}this._clearStopWaitTimer(),this._stopWaitTimer=setTimeout(function(){t._stopWaitTimer=null,t._recognition===e&&(t._recognition=null,t._detach(e)),t._intentionalStop=!1,t._listening=!1,t._shouldListen()&&t._scheduleStart(250)},500)}},{key:"_startRecognition",value:(o=regeneratorRuntime.mark(function t(){var e,n=this;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(this._shouldListen()&&!this._listening&&!this._starting&&!this._recognition){t.next=2;break}return t.abrupt("return");case 2:if(this._clearRestartTimer(),this._starting=!0,!(null==this._warmResult||this._failCount>0)){t.next=10;break}return t.next=7,this._warmCapture(this._failCount>0);case 7:if(this._shouldListen()&&!this._listening&&!this._recognition){t.next=10;break}return this._starting=!1,t.abrupt("return");case 10:e=new this._Ctor,this._recognition=e,e.continuous=!0,e.interimResults=!0,e.lang=this.lang,e.onstart=function(){n._recognition===e&&(n._clearStartWatchTimer(),n._starting=!1,n._failCount=0,n._recovering=!1,n._listening=!0)},e.onresult=function(t){n._recognition===e&&n._handleResult(t)},e.onerror=function(t){if(n._recognition===e){var r=t.error||"";if("aborted"!==r&&"no-speech"!==r){if(n._clearStartWatchTimer(),n._recognition=null,n._detach(e),n._starting=!1,n._listening=!1,"not-allowed"===r||"service-not-allowed"===r)return n._intentionalStop=!1,n._clearStopWaitTimer(),n._recovering=!1,void n.setActive(!1);n._intentionalStop||("audio-capture"===r&&(n._warmResult=null),n._noteRecoverableFailure())}}},e.onend=function(){n._clearStartWatchTimer(),n._recognition===e&&(n._recognition=null,n._detach(e)),n._starting=!1,n._listening=!1,n._intentionalStop=!1,n._clearStopWaitTimer(),n._shouldListen()&&n._scheduleStart(250)};try{e.start(),this._clearStartWatchTimer(),this._startWatchTimer=setTimeout(function(){if(n._startWatchTimer=null,n._recognition===e&&!n._listening){try{e.abort()}catch(t){}n._recognition===e&&(n._recognition=null,n._detach(e),n._noteRecoverableFailure())}},3e3)}catch(t){this._clearStartWatchTimer(),this._recognition=null,this._detach(e),this._noteRecoverableFailure()}case 20:case"end":return t.stop()}},t,this)}),i=function(){var t=this,e=arguments;return new Promise(function(n,r){var i=o.apply(t,e);function a(t){ke(i,n,r,a,u,"next",t)}function u(t){ke(i,n,r,a,u,"throw",t)}a(void 0)})},function(){return i.apply(this,arguments)})},{key:"_handleResult",value:function(t){for(var e=Date.now(),n=t.resultIndex;n<t.results.length;n++){var r,o=t.results[n];if(o){var i=o[0],a=null!==(r=null==i?void 0:i.transcript)&&void 0!==r?r:"",u=String(a).replace(/\s+/g," ").trim();if(u){var c=Boolean(o.isFinal),s="number"==typeof(null==i?void 0:i.confidence)?i.confidence:void 0;if(c){var f,l=Ce(u),p=[],h=[],v=new Set,d=Te(this._mappings);try{for(d.s();!(f=d.n()).done;){var y=f.value;y.phrases.includes(l)&&(e<(this._cooldownUntil.get(y.control)||0)||(p.push(y),v.has(y.control)||(v.add(y.control),h.push(y.control))))}}catch(t){d.e(t)}finally{d.f()}this.emit("updated",{control:this.transcriptControl,device:this.device,type:"Data",value:{text:u,isFinal:!0,confidence:s,matchedControls:h},event:t});for(var b=0,g=p;b<g.length;b++){var m=g[b];this._cooldownUntil.set(m.control,e+this.cooldownMs),this._emitMapping(m,t)}}else this.interimResults&&this.emit("updated",{control:this.transcriptControl,device:this.device,type:"Data",value:{text:u,isFinal:!1,confidence:s,matchedControls:[]},event:t})}}}}},{key:"_emitMapping",value:function(t,e){var n=this;this._clearReleaseTimer(t.control);var r=t.type;if("Button"===r)return this.emit("updated",{control:t.control,device:this.device,type:"Button",value:1,event:e}),void queueMicrotask(function(){n._destroyed||n.emit("updated",{control:t.control,device:n.device,type:"Button",value:0,event:e})});if("Joystick"===r){var o="number"==typeof t.x?t.x:0,i="number"==typeof t.y?t.y:0;return this.emit("updated",{control:t.control,device:this.device,type:"Joystick",x:o,y:i,event:e}),void(null!=t.releaseMs&&this._releaseTimers.set(t.control,setTimeout(function(){n._releaseTimers.delete(t.control),n._destroyed||n.emit("updated",{control:t.control,device:n.device,type:"Joystick",x:0,y:0,event:e})},t.releaseMs)))}var a=t.value;this.emit("updated",{control:t.control,device:this.device,type:r,value:a,event:e}),null==t.releaseMs||"Amount"!==r&&"Dial"!==r||this._releaseTimers.set(t.control,setTimeout(function(){n._releaseTimers.delete(t.control),n._destroyed||n.emit("updated",{control:t.control,device:n.device,type:r,value:0,event:e})},t.releaseMs))}}],r=[{key:"supported",value:function(){return null!=Ie()}}],n&&Re(e.prototype,n),r&&Re(e,r),Object.defineProperty(e,"prototype",{writable:!1}),s}(o());const Be={BLEDevice:zt,FabricDevice:Zt,GamepadDevice:fe,KeyboardDevice:ve,PageDevice:ge,PixiDevice:xe,PointerDevice:Ee,SpeechDevice:Ne};window.engagefully={Controller:st,ActionMap:mt,actions:Q,devices:Be,quantizeStick:function(t,e){var n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=null!==(n=i.sectors)&&void 0!==n?n:8,u=null!==(r=i.deadzone)&&void 0!==r?r:.35,c=null!==(o=i.forward)&&void 0!==o?o:"-y";if(Math.hypot(t,e)<u||a<1)return null;var s="+y"===c?e:-e,f=Math.atan2(t,s);return{sector:(Math.round(f/(2*Math.PI/a))%a+a)%a}},focusGate:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e="function"==typeof t.extra?t.extra:function(){return!1};return function(){if(e())return!1;var t="undefined"!=typeof document?document.activeElement:null;if(!t||t===document.body)return!0;var n=t.tagName;return"INPUT"!==n&&"TEXTAREA"!==n&&"SELECT"!==n&&!t.isContentEditable}}}},6266:(t,e,n)=>{n(5767),n(8132),n(8388),n(7470),n(4882),n(1520),n(7476),n(9622),n(9375),n(3533),n(4672),n(4157),n(5095),n(9892),n(5115),n(9176),n(8838),n(6253),n(9730),n(6059),n(8377),n(1084),n(4299),n(1246),n(726),n(1901),n(5972),n(3403),n(2516),n(9371),n(6479),n(1736),n(1889),n(5177),n(6943),n(6503),n(6786),n(932),n(7526),n(1591),n(9073),n(347),n(579),n(4669),n(7710),n(5789),n(3514),n(9978),n(8472),n(6946),n(5068),n(413),n(191),n(8306),n(4564),n(9115),n(9539),n(6620),n(2850),n(823),n(7732),n(856),n(703),n(1539),n(5292),n(6629),n(3694),n(7648),n(7795),n(4531),n(3605),n(6780),n(9937),n(511),n(1822),n(9977),n(1031),n(6331),n(1560),n(774),n(522),n(8295),n(7842),n(110),n(75),n(4336),n(1802),n(8837),n(6773),n(5745),n(3057),n(3750),n(3369),n(9564),n(2e3),n(8977),n(2310),n(4899),n(1842),n(6997),n(3946),n(8269),n(6108),n(6774),n(1466),n(9357),n(6142),n(1876),n(851),n(8416),n(8184),n(147),n(9192),n(142),n(1786),n(5368),n(6964),n(2152),n(4821),n(9103),n(1303),n(3318),n(162),n(3834),n(1572),n(2139),n(685),n(5535),n(7347),n(3049),n(6633),n(8989),n(8270),n(4510),n(3984),n(5769),n(55),n(6014),t.exports=n(5645)},911:(t,e,n)=>{n(1268),t.exports=n(5645).Array.flatMap},990:(t,e,n)=>{n(2773),t.exports=n(5645).Array.includes},5434:(t,e,n)=>{n(3276),t.exports=n(5645).Object.entries},8051:(t,e,n)=>{n(8351),t.exports=n(5645).Object.getOwnPropertyDescriptors},8250:(t,e,n)=>{n(6409),t.exports=n(5645).Object.values},4952:(t,e,n)=>{"use strict";n(851),n(9865),t.exports=n(5645).Promise.finally},6197:(t,e,n)=>{n(2770),t.exports=n(5645).String.padEnd},4160:(t,e,n)=>{n(1784),t.exports=n(5645).String.padStart},4039:(t,e,n)=>{n(4325),t.exports=n(5645).String.trimRight},6728:(t,e,n)=>{n(5869),t.exports=n(5645).String.trimLeft},3568:(t,e,n)=>{n(9665),t.exports=n(8787).f("asyncIterator")},115:(t,e,n)=>{n(4579),t.exports=n(1327).global},5663:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},2159:(t,e,n)=>{var r=n(6727);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},1327:t=>{var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},9216:(t,e,n)=>{var r=n(5663);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},9666:(t,e,n)=>{t.exports=!n(7929)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},7467:(t,e,n)=>{var r=n(6727),o=n(3938).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},3856:(t,e,n)=>{var r=n(3938),o=n(1327),i=n(9216),a=n(1818),u=n(7069),c="prototype",s=function(t,e,n){var f,l,p,h=t&s.F,v=t&s.G,d=t&s.S,y=t&s.P,b=t&s.B,g=t&s.W,m=v?o:o[e]||(o[e]={}),_=m[c],w=v?r:d?r[e]:(r[e]||{})[c];for(f in v&&(n=e),n)(l=!h&&w&&void 0!==w[f])&&u(m,f)||(p=l?w[f]:n[f],m[f]=v&&"function"!=typeof w[f]?n[f]:b&&l?i(p,r):g&&w[f]==p?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[c]=t[c],e}(p):y&&"function"==typeof p?i(Function.call,p):p,y&&((m.virtual||(m.virtual={}))[f]=p,t&s.R&&_&&!_[f]&&a(_,f,p)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},7929:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},3938:t=>{var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},7069:t=>{var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},1818:(t,e,n)=>{var r=n(4743),o=n(3101);t.exports=n(9666)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},3758:(t,e,n)=>{t.exports=!n(9666)&&!n(7929)(function(){return 7!=Object.defineProperty(n(7467)("div"),"a",{get:function(){return 7}}).a})},6727:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},4743:(t,e,n)=>{var r=n(2159),o=n(3758),i=n(3206),a=Object.defineProperty;e.f=n(9666)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},3101:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},3206:(t,e,n)=>{var r=n(6727);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},4579:(t,e,n)=>{var r=n(3856);r(r.G,{global:n(3938)})},4963:t=>{t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},3365:(t,e,n)=>{var r=n(2032);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=r(t))throw TypeError(e);return+t}},7722:(t,e,n)=>{var r=n(6314)("unscopables"),o=Array.prototype;null==o[r]&&n(7728)(o,r,{}),t.exports=function(t){o[r][t]=!0}},6793:(t,e,n)=>{"use strict";var r=n(4496)(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},3328:t=>{t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},7007:(t,e,n)=>{var r=n(5286);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},5216:(t,e,n)=>{"use strict";var r=n(508),o=n(2337),i=n(875);t.exports=[].copyWithin||function(t,e){var n=r(this),a=i(n.length),u=o(t,a),c=o(e,a),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?a:o(s,a))-c,a-u),l=1;for(c<u&&u<c+f&&(l=-1,c+=f-1,u+=f-1);f-- >0;)c in n?n[u]=n[c]:delete n[u],u+=l,c+=l;return n}},6852:(t,e,n)=>{"use strict";var r=n(508),o=n(2337),i=n(875);t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,u=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,s=void 0===c?n:o(c,n);s>u;)e[u++]=t;return e}},9315:(t,e,n)=>{var r=n(2110),o=n(875),i=n(2337);t.exports=function(t){return function(e,n,a){var u,c=r(e),s=o(c.length),f=i(a,s);if(t&&n!=n){for(;s>f;)if((u=c[f++])!=u)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},50:(t,e,n)=>{var r=n(741),o=n(9797),i=n(508),a=n(875),u=n(6886);t.exports=function(t,e){var n=1==t,c=2==t,s=3==t,f=4==t,l=6==t,p=5==t||l,h=e||u;return function(e,u,v){for(var d,y,b=i(e),g=o(b),m=r(u,v,3),_=a(g.length),w=0,x=n?h(e,_):c?h(e,0):void 0;_>w;w++)if((p||w in g)&&(y=m(d=g[w],w,b),t))if(n)x[w]=y;else if(y)switch(t){case 3:return!0;case 5:return d;case 6:return w;case 2:x.push(d)}else if(f)return!1;return l?-1:s||f?f:x}}},7628:(t,e,n)=>{var r=n(4963),o=n(508),i=n(9797),a=n(875);t.exports=function(t,e,n,u,c){r(e);var s=o(t),f=i(s),l=a(s.length),p=c?l-1:0,h=c?-1:1;if(n<2)for(;;){if(p in f){u=f[p],p+=h;break}if(p+=h,c?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;c?p>=0:l>p;p+=h)p in f&&(u=e(u,f[p],p,s));return u}},2736:(t,e,n)=>{var r=n(5286),o=n(4302),i=n(6314)("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)||(e=void 0),r(e)&&null===(e=e[i])&&(e=void 0)),void 0===e?Array:e}},6886:(t,e,n)=>{var r=n(2736);t.exports=function(t,e){return new(r(t))(e)}},4398:(t,e,n)=>{"use strict";var r=n(4963),o=n(5286),i=n(7242),a=[].slice,u={};t.exports=Function.bind||function(t){var e=r(this),n=a.call(arguments,1),c=function(){var r=n.concat(a.call(arguments));return this instanceof c?function(t,e,n){if(!(e in u)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";u[e]=Function("F,a","return new F("+r.join(",")+")")}return u[e](t,n)}(e,r.length,r):i(e,r,t)};return o(e.prototype)&&(c.prototype=e.prototype),c}},1488:(t,e,n)=>{var r=n(2032),o=n(6314)("toStringTag"),i="Arguments"==r(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:i?r(e):"Object"==(a=r(e))&&"function"==typeof e.callee?"Arguments":a}},2032:t=>{var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},9824:(t,e,n)=>{"use strict";var r=n(9275).f,o=n(2503),i=n(4408),a=n(741),u=n(3328),c=n(3531),s=n(2923),f=n(5436),l=n(2974),p=n(7057),h=n(4728).fastKey,v=n(1616),d=p?"_s":"size",y=function(t,e){var n,r=h(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,s){var f=t(function(t,r){u(t,f,e,"_i"),t._t=e,t._i=o(null),t._f=void 0,t._l=void 0,t[d]=0,null!=r&&c(r,n,t[s],t)});return i(f.prototype,{clear:function(){for(var t=v(this,e),n=t._i,r=t._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];t._f=t._l=void 0,t[d]=0},delete:function(t){var n=v(this,e),r=y(n,t);if(r){var o=r.n,i=r.p;delete n._i[r.i],r.r=!0,i&&(i.n=o),o&&(o.p=i),n._f==r&&(n._f=o),n._l==r&&(n._l=i),n[d]--}return!!r},forEach:function(t){v(this,e);for(var n,r=a(t,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(t){return!!y(v(this,e),t)}}),p&&r(f.prototype,"size",{get:function(){return v(this,e)[d]}}),f},def:function(t,e,n){var r,o,i=y(t,e);return i?i.v=n:(t._l=i={i:o=h(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[d]++,"F"!==o&&(t._i[o]=i)),t},getEntry:y,setStrong:function(t,e,n){s(t,e,function(t,n){this._t=v(t,e),this._k=n,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?f(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,f(1))},n?"entries":"values",!n,!0),l(e)}}},3657:(t,e,n)=>{"use strict";var r=n(4408),o=n(4728).getWeak,i=n(7007),a=n(5286),u=n(3328),c=n(3531),s=n(50),f=n(9181),l=n(1616),p=s(5),h=s(6),v=0,d=function(t){return t._l||(t._l=new y)},y=function(){this.a=[]},b=function(t,e){return p(t.a,function(t){return t[0]===e})};y.prototype={get:function(t){var e=b(this,t);if(e)return e[1]},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,i){var s=t(function(t,r){u(t,s,e,"_i"),t._t=e,t._i=v++,t._l=void 0,null!=r&&c(r,n,t[i],t)});return r(s.prototype,{delete:function(t){if(!a(t))return!1;var n=o(t);return!0===n?d(l(this,e)).delete(t):n&&f(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=o(t);return!0===n?d(l(this,e)).has(t):n&&f(n,this._i)}}),s},def:function(t,e,n){var r=o(i(e),!0);return!0===r?d(t).set(e,n):r[t._i]=n,t},ufstore:d}},5795:(t,e,n)=>{"use strict";var r=n(3816),o=n(2985),i=n(7234),a=n(4408),u=n(4728),c=n(3531),s=n(3328),f=n(5286),l=n(4253),p=n(7462),h=n(2943),v=n(266);t.exports=function(t,e,n,d,y,b){var g=r[t],m=g,_=y?"set":"add",w=m&&m.prototype,x={},S=function(t){var e=w[t];i(w,t,"delete"==t||"has"==t?function(t){return!(b&&!f(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return b&&!f(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof m&&(b||w.forEach&&!l(function(){(new m).entries().next()}))){var O=new m,P=O[_](b?{}:-0,1)!=O,E=l(function(){O.has(1)}),j=p(function(t){new m(t)}),k=!b&&l(function(){for(var t=new m,e=5;e--;)t[_](e,e);return!t.has(-0)});j||((m=e(function(e,n){s(e,m,t);var r=v(new g,e,m);return null!=n&&c(n,y,r[_],r),r})).prototype=w,w.constructor=m),(E||k)&&(S("delete"),S("has"),y&&S("get")),(k||P)&&S(_),b&&w.clear&&delete w.clear}else m=d.getConstructor(e,t,y,_),a(m.prototype,n),u.NEED=!0;return h(m,t),x[t]=m,o(o.G+o.W+o.F*(m!=g),x),b||d.setStrong(m,t,y),m}},5645:t=>{var e=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=e)},2811:(t,e,n)=>{"use strict";var r=n(9275),o=n(681);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},741:(t,e,n)=>{var r=n(4963);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},3537:(t,e,n)=>{"use strict";var r=n(4253),o=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=r(function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))})||!r(function(){i.call(new Date(NaN))})?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),r=e<0?"-":e>9999?"+":"";return r+("00000"+Math.abs(e)).slice(r?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},870:(t,e,n)=>{"use strict";var r=n(7007),o=n(1689),i="number";t.exports=function(t){if("string"!==t&&t!==i&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),t!=i)}},1355:t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},7057:(t,e,n)=>{t.exports=!n(4253)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},2457:(t,e,n)=>{var r=n(5286),o=n(3816).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},4430:t=>{t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},5541:(t,e,n)=>{var r=n(7184),o=n(4548),i=n(4682);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var a,u=n(t),c=i.f,s=0;u.length>s;)c.call(t,a=u[s++])&&e.push(a);return e}},2985:(t,e,n)=>{var r=n(3816),o=n(5645),i=n(7728),a=n(7234),u=n(741),c="prototype",s=function(t,e,n){var f,l,p,h,v=t&s.F,d=t&s.G,y=t&s.S,b=t&s.P,g=t&s.B,m=d?r:y?r[e]||(r[e]={}):(r[e]||{})[c],_=d?o:o[e]||(o[e]={}),w=_[c]||(_[c]={});for(f in d&&(n=e),n)p=((l=!v&&m&&void 0!==m[f])?m:n)[f],h=g&&l?u(p,r):b&&"function"==typeof p?u(Function.call,p):p,m&&a(m,f,p,t&s.U),_[f]!=p&&i(_,f,h),b&&w[f]!=p&&(w[f]=p)};r.core=o,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},8852:(t,e,n)=>{var r=n(6314)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(t){}}return!0}},4253:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},8082:(t,e,n)=>{"use strict";n(8269);var r=n(7234),o=n(7728),i=n(4253),a=n(1355),u=n(6314),c=n(1165),s=u("species"),f=!i(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var p=u(t),h=!i(function(){var e={};return e[p]=function(){return 7},7!=""[t](e)}),v=h?!i(function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[s]=function(){return n}),n[p](""),!e}):void 0;if(!h||!v||"replace"===t&&!f||"split"===t&&!l){var d=/./[p],y=n(a,p,""[t],function(t,e,n,r,o){return e.exec===c?h&&!o?{done:!0,value:d.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),b=y[0],g=y[1];r(String.prototype,t,b),o(RegExp.prototype,p,2==e?function(t,e){return g.call(t,this,e)}:function(t){return g.call(t,this)})}}},3218:(t,e,n)=>{"use strict";var r=n(7007);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},3325:(t,e,n)=>{"use strict";var r=n(4302),o=n(5286),i=n(875),a=n(741),u=n(6314)("isConcatSpreadable");t.exports=function t(e,n,c,s,f,l,p,h){for(var v,d,y=f,b=0,g=!!p&&a(p,h,3);b<s;){if(b in c){if(v=g?g(c[b],b,n):c[b],d=!1,o(v)&&(d=void 0!==(d=v[u])?!!d:r(v)),d&&l>0)y=t(e,n,v,i(v.length),y,l-1)-1;else{if(y>=9007199254740991)throw TypeError();e[y]=v}y++}b++}return y}},3531:(t,e,n)=>{var r=n(741),o=n(8851),i=n(6555),a=n(7007),u=n(875),c=n(9002),s={},f={},l=t.exports=function(t,e,n,l,p){var h,v,d,y,b=p?function(){return t}:c(t),g=r(n,l,e?2:1),m=0;if("function"!=typeof b)throw TypeError(t+" is not iterable!");if(i(b)){for(h=u(t.length);h>m;m++)if((y=e?g(a(v=t[m])[0],v[1]):g(t[m]))===s||y===f)return y}else for(d=b.call(t);!(v=d.next()).done;)if((y=o(d,g,v.value,e))===s||y===f)return y};l.BREAK=s,l.RETURN=f},18:(t,e,n)=>{t.exports=n(3825)("native-function-to-string",Function.toString)},3816:t=>{var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)},9181:t=>{var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},7728:(t,e,n)=>{var r=n(9275),o=n(681);t.exports=n(7057)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},639:(t,e,n)=>{var r=n(3816).document;t.exports=r&&r.documentElement},1734:(t,e,n)=>{t.exports=!n(7057)&&!n(4253)(function(){return 7!=Object.defineProperty(n(2457)("div"),"a",{get:function(){return 7}}).a})},266:(t,e,n)=>{var r=n(5286),o=n(7375).set;t.exports=function(t,e,n){var i,a=e.constructor;return a!==n&&"function"==typeof a&&(i=a.prototype)!==n.prototype&&r(i)&&o&&o(t,i),t}},7242:t=>{t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},9797:(t,e,n)=>{var r=n(2032);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},6555:(t,e,n)=>{var r=n(2803),o=n(6314)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},4302:(t,e,n)=>{var r=n(2032);t.exports=Array.isArray||function(t){return"Array"==r(t)}},8367:(t,e,n)=>{var r=n(5286),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},5286:t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},5364:(t,e,n)=>{var r=n(5286),o=n(2032),i=n(6314)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},8851:(t,e,n)=>{var r=n(7007);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(e){var i=t.return;throw void 0!==i&&r(i.call(t)),e}}},9988:(t,e,n)=>{"use strict";var r=n(2503),o=n(681),i=n(2943),a={};n(7728)(a,n(6314)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=r(a,{next:o(1,n)}),i(t,e+" Iterator")}},2923:(t,e,n)=>{"use strict";var r=n(4461),o=n(2985),i=n(7234),a=n(7728),u=n(2803),c=n(9988),s=n(2943),f=n(468),l=n(6314)("iterator"),p=!([].keys&&"next"in[].keys()),h="keys",v="values",d=function(){return this};t.exports=function(t,e,n,y,b,g,m){c(n,e,y);var _,w,x,S=function(t){if(!p&&t in j)return j[t];switch(t){case h:case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",P=b==v,E=!1,j=t.prototype,k=j[l]||j["@@iterator"]||b&&j[b],T=k||S(b),M=b?P?S("entries"):T:void 0,R="Array"==e&&j.entries||k;if(R&&(x=f(R.call(new t)))!==Object.prototype&&x.next&&(s(x,O,!0),r||"function"==typeof x[l]||a(x,l,d)),P&&k&&k.name!==v&&(E=!0,T=function(){return k.call(this)}),r&&!m||!p&&!E&&j[l]||a(j,l,T),u[e]=T,u[O]=d,b)if(_={values:P?T:S(v),keys:g?T:S(h),entries:M},m)for(w in _)w in j||i(j,w,_[w]);else o(o.P+o.F*(p||E),e,_);return _}},7462:(t,e,n)=>{var r=n(6314)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,function(){throw 2})}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],a=i[r]();a.next=function(){return{done:n=!0}},i[r]=function(){return a},t(i)}catch(t){}return n}},5436:t=>{t.exports=function(t,e){return{value:e,done:!!t}}},2803:t=>{t.exports={}},4461:t=>{t.exports=!1},3086:t=>{var e=Math.expm1;t.exports=!e||e(10)>22025.465794806718||e(10)<22025.465794806718||-2e-17!=e(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:e},4934:(t,e,n)=>{var r=n(1801),o=Math.pow,i=o(2,-52),a=o(2,-23),u=o(2,127)*(2-a),c=o(2,-126);t.exports=Math.fround||function(t){var e,n,o=Math.abs(t),s=r(t);return o<c?s*(o/c/a+1/i-1/i)*c*a:(n=(e=(1+a/i)*o)-(e-o))>u||n!=n?s*(1/0):s*n}},6206:t=>{t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},1801:t=>{t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},4728:(t,e,n)=>{var r=n(3953)("meta"),o=n(5286),i=n(9181),a=n(9275).f,u=0,c=Object.isExtensible||function(){return!0},s=!n(4253)(function(){return c(Object.preventExtensions({}))}),f=function(t){a(t,r,{value:{i:"O"+ ++u,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";f(t)}return t[r].i},getWeak:function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;f(t)}return t[r].w},onFreeze:function(t){return s&&l.NEED&&c(t)&&!i(t,r)&&f(t),t}}},4351:(t,e,n)=>{var r=n(3816),o=n(4193).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,u=r.Promise,c="process"==n(2032)(a);t.exports=function(){var t,e,n,s=function(){var r,o;for(c&&(r=a.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?n():e=void 0,r}}e=void 0,r&&r.enter()};if(c)n=function(){a.nextTick(s)};else if(!i||r.navigator&&r.navigator.standalone)if(u&&u.resolve){var f=u.resolve(void 0);n=function(){f.then(s)}}else n=function(){o.call(r,s)};else{var l=!0,p=document.createTextNode("");new i(s).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},3499:(t,e,n)=>{"use strict";var r=n(4963);function o(t){var e,n;this.promise=new t(function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r}),this.resolve=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},5345:(t,e,n)=>{"use strict";var r=n(7057),o=n(7184),i=n(4548),a=n(4682),u=n(508),c=n(9797),s=Object.assign;t.exports=!s||n(4253)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=s({},t)[n]||Object.keys(s({},e)).join("")!=r})?function(t,e){for(var n=u(t),s=arguments.length,f=1,l=i.f,p=a.f;s>f;)for(var h,v=c(arguments[f++]),d=l?o(v).concat(l(v)):o(v),y=d.length,b=0;y>b;)h=d[b++],r&&!p.call(v,h)||(n[h]=v[h]);return n}:s},2503:(t,e,n)=>{var r=n(7007),o=n(5588),i=n(4430),a=n(9335)("IE_PROTO"),u=function(){},c="prototype",s=function(){var t,e=n(2457)("iframe"),r=i.length;for(e.style.display="none",n(639).appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),s=t.F;r--;)delete s[c][i[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(u[c]=r(t),n=new u,u[c]=null,n[a]=t):n=s(),void 0===e?n:o(n,e)}},9275:(t,e,n)=>{var r=n(7007),o=n(1734),i=n(1689),a=Object.defineProperty;e.f=n(7057)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},5588:(t,e,n)=>{var r=n(9275),o=n(7007),i=n(7184);t.exports=n(7057)?Object.defineProperties:function(t,e){o(t);for(var n,a=i(e),u=a.length,c=0;u>c;)r.f(t,n=a[c++],e[n]);return t}},8693:(t,e,n)=>{var r=n(4682),o=n(681),i=n(2110),a=n(1689),u=n(9181),c=n(1734),s=Object.getOwnPropertyDescriptor;e.f=n(7057)?s:function(t,e){if(t=i(t),e=a(e,!0),c)try{return s(t,e)}catch(t){}if(u(t,e))return o(!r.f.call(t,e),t[e])}},9327:(t,e,n)=>{var r=n(2110),o=n(616).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},616:(t,e,n)=>{var r=n(189),o=n(4430).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},4548:(t,e)=>{e.f=Object.getOwnPropertySymbols},468:(t,e,n)=>{var r=n(9181),o=n(508),i=n(9335)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},189:(t,e,n)=>{var r=n(9181),o=n(2110),i=n(9315)(!1),a=n(9335)("IE_PROTO");t.exports=function(t,e){var n,u=o(t),c=0,s=[];for(n in u)n!=a&&r(u,n)&&s.push(n);for(;e.length>c;)r(u,n=e[c++])&&(~i(s,n)||s.push(n));return s}},7184:(t,e,n)=>{var r=n(189),o=n(4430);t.exports=Object.keys||function(t){return r(t,o)}},4682:(t,e)=>{e.f={}.propertyIsEnumerable},3160:(t,e,n)=>{var r=n(2985),o=n(5645),i=n(4253);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*i(function(){n(1)}),"Object",a)}},1131:(t,e,n)=>{var r=n(7057),o=n(7184),i=n(2110),a=n(4682).f;t.exports=function(t){return function(e){for(var n,u=i(e),c=o(u),s=c.length,f=0,l=[];s>f;)n=c[f++],r&&!a.call(u,n)||l.push(t?[n,u[n]]:u[n]);return l}}},7643:(t,e,n)=>{var r=n(616),o=n(4548),i=n(7007),a=n(3816).Reflect;t.exports=a&&a.ownKeys||function(t){var e=r.f(i(t)),n=o.f;return n?e.concat(n(t)):e}},7743:(t,e,n)=>{var r=n(3816).parseFloat,o=n(9599).trim;t.exports=1/r(n(4644)+"-0")!=-1/0?function(t){var e=o(String(t),3),n=r(e);return 0===n&&"-"==e.charAt(0)?-0:n}:r},5960:(t,e,n)=>{var r=n(3816).parseInt,o=n(9599).trim,i=n(4644),a=/^[-+]?0[xX]/;t.exports=8!==r(i+"08")||22!==r(i+"0x16")?function(t,e){var n=o(String(t),3);return r(n,e>>>0||(a.test(n)?16:10))}:r},188:t=>{t.exports=function(t){try{return{e:!1,v:t()}}catch(t){return{e:!0,v:t}}}},94:(t,e,n)=>{var r=n(7007),o=n(5286),i=n(3499);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},681:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4408:(t,e,n)=>{var r=n(7234);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},7234:(t,e,n)=>{var r=n(3816),o=n(7728),i=n(9181),a=n(3953)("src"),u=n(18),c="toString",s=(""+u).split(c);n(5645).inspectSource=function(t){return u.call(t)},(t.exports=function(t,e,n,u){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,a)||o(n,a,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:u?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,c,function(){return"function"==typeof this&&this[a]||u.call(this)})},7787:(t,e,n)=>{"use strict";var r=n(1488),o=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var i=n.call(t,e);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(t,e)}},1165:(t,e,n)=>{"use strict";var r,o,i=n(3218),a=RegExp.prototype.exec,u=String.prototype.replace,c=a,s="lastIndex",f=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r[s]||0!==o[s]),l=void 0!==/()??/.exec("")[1];(f||l)&&(c=function(t){var e,n,r,o,c=this;return l&&(n=new RegExp("^"+c.source+"$(?!\\s)",i.call(c))),f&&(e=c[s]),r=a.call(c,t),f&&r&&(c[s]=c.global?r.index+r[0].length:e),l&&r&&r.length>1&&u.call(r[0],n,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)}),r}),t.exports=c},7195:t=>{t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},7375:(t,e,n)=>{var r=n(5286),o=n(7007),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{(r=n(741)(Function.call,n(8693).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},2974:(t,e,n)=>{"use strict";var r=n(3816),o=n(9275),i=n(7057),a=n(6314)("species");t.exports=function(t){var e=r[t];i&&e&&!e[a]&&o.f(e,a,{configurable:!0,get:function(){return this}})}},2943:(t,e,n)=>{var r=n(9275).f,o=n(9181),i=n(6314)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},9335:(t,e,n)=>{var r=n(3825)("keys"),o=n(3953);t.exports=function(t){return r[t]||(r[t]=o(t))}},3825:(t,e,n)=>{var r=n(5645),o=n(3816),i="__core-js_shared__",a=o[i]||(o[i]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(4461)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},8364:(t,e,n)=>{var r=n(7007),o=n(4963),i=n(6314)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},7717:(t,e,n)=>{"use strict";var r=n(4253);t.exports=function(t,e){return!!t&&r(function(){e?t.call(null,function(){},1):t.call(null)})}},4496:(t,e,n)=>{var r=n(1467),o=n(1355);t.exports=function(t){return function(e,n){var i,a,u=String(o(e)),c=r(n),s=u.length;return c<0||c>=s?t?"":void 0:(i=u.charCodeAt(c))<55296||i>56319||c+1===s||(a=u.charCodeAt(c+1))<56320||a>57343?t?u.charAt(c):i:t?u.slice(c,c+2):a-56320+(i-55296<<10)+65536}}},2094:(t,e,n)=>{var r=n(5364),o=n(1355);t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(o(t))}},9395:(t,e,n)=>{var r=n(2985),o=n(4253),i=n(1355),a=/"/g,u=function(t,e,n,r){var o=String(i(t)),u="<"+e;return""!==n&&(u+=" "+n+'="'+String(r).replace(a,""")+'"'),u+">"+o+"</"+e+">"};t.exports=function(t,e){var n={};n[t]=e(u),r(r.P+r.F*o(function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}),"String",n)}},5442:(t,e,n)=>{var r=n(875),o=n(8595),i=n(1355);t.exports=function(t,e,n,a){var u=String(i(t)),c=u.length,s=void 0===n?" ":String(n),f=r(e);if(f<=c||""==s)return u;var l=f-c,p=o.call(s,Math.ceil(l/s.length));return p.length>l&&(p=p.slice(0,l)),a?p+u:u+p}},8595:(t,e,n)=>{"use strict";var r=n(1467),o=n(1355);t.exports=function(t){var e=String(o(this)),n="",i=r(t);if(i<0||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},9599:(t,e,n)=>{var r=n(2985),o=n(1355),i=n(4253),a=n(4644),u="["+a+"]",c=RegExp("^"+u+u+"*"),s=RegExp(u+u+"*$"),f=function(t,e,n){var o={},u=i(function(){return!!a[t]()||"
"!="
"[t]()}),c=o[t]=u?e(l):a[t];n&&(o[n]=c),r(r.P+r.F*u,"String",o)},l=f.trim=function(t,e){return t=String(o(t)),1&e&&(t=t.replace(c,"")),2&e&&(t=t.replace(s,"")),t};t.exports=f},4644:t=>{t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},4193:(t,e,n)=>{var r,o,i,a=n(741),u=n(7242),c=n(639),s=n(2457),f=n(3816),l=f.process,p=f.setImmediate,h=f.clearImmediate,v=f.MessageChannel,d=f.Dispatch,y=0,b={},g="onreadystatechange",m=function(){var t=+this;if(b.hasOwnProperty(t)){var e=b[t];delete b[t],e()}},_=function(t){m.call(t.data)};p&&h||(p=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return b[++y]=function(){u("function"==typeof t?t:Function(t),e)},r(y),y},h=function(t){delete b[t]},"process"==n(2032)(l)?r=function(t){l.nextTick(a(m,t,1))}:d&&d.now?r=function(t){d.now(a(m,t,1))}:v?(i=(o=new v).port2,o.port1.onmessage=_,r=a(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",_,!1)):r=g in s("script")?function(t){c.appendChild(s("script"))[g]=function(){c.removeChild(this),m.call(t)}}:function(t){setTimeout(a(m,t,1),0)}),t.exports={set:p,clear:h}},2337:(t,e,n)=>{var r=n(1467),o=Math.max,i=Math.min;t.exports=function(t,e){return(t=r(t))<0?o(t+e,0):i(t,e)}},4843:(t,e,n)=>{var r=n(1467),o=n(875);t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=o(e);if(e!==n)throw RangeError("Wrong length!");return n}},1467:t=>{var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},2110:(t,e,n)=>{var r=n(9797),o=n(1355);t.exports=function(t){return r(o(t))}},875:(t,e,n)=>{var r=n(1467),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},508:(t,e,n)=>{var r=n(1355);t.exports=function(t){return Object(r(t))}},1689:(t,e,n)=>{var r=n(5286);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},8440:(t,e,n)=>{"use strict";if(n(7057)){var r=n(4461),o=n(3816),i=n(4253),a=n(2985),u=n(9383),c=n(1125),s=n(741),f=n(3328),l=n(681),p=n(7728),h=n(4408),v=n(1467),d=n(875),y=n(4843),b=n(2337),g=n(1689),m=n(9181),_=n(1488),w=n(5286),x=n(508),S=n(6555),O=n(2503),P=n(468),E=n(616).f,j=n(9002),k=n(3953),T=n(6314),M=n(50),R=n(9315),L=n(8364),A=n(6997),F=n(2803),I=n(7462),C=n(2974),D=n(6852),N=n(5216),B=n(9275),U=n(8693),W=B.f,G=U.f,V=o.RangeError,z=o.TypeError,q=o.Uint8Array,J="ArrayBuffer",K="Shared"+J,Z="BYTES_PER_ELEMENT",H="prototype",Y=Array[H],$=c.ArrayBuffer,X=c.DataView,Q=M(0),tt=M(2),et=M(3),nt=M(4),rt=M(5),ot=M(6),it=R(!0),at=R(!1),ut=A.values,ct=A.keys,st=A.entries,ft=Y.lastIndexOf,lt=Y.reduce,pt=Y.reduceRight,ht=Y.join,vt=Y.sort,dt=Y.slice,yt=Y.toString,bt=Y.toLocaleString,gt=T("iterator"),mt=T("toStringTag"),_t=k("typed_constructor"),wt=k("def_constructor"),xt=u.CONSTR,St=u.TYPED,Ot=u.VIEW,Pt="Wrong length!",Et=M(1,function(t,e){return Rt(L(t,t[wt]),e)}),jt=i(function(){return 1===new q(new Uint16Array([1]).buffer)[0]}),kt=!!q&&!!q[H].set&&i(function(){new q(1).set({})}),Tt=function(t,e){var n=v(t);if(n<0||n%e)throw V("Wrong offset!");return n},Mt=function(t){if(w(t)&&St in t)return t;throw z(t+" is not a typed array!")},Rt=function(t,e){if(!w(t)||!(_t in t))throw z("It is not a typed array constructor!");return new t(e)},Lt=function(t,e){return At(L(t,t[wt]),e)},At=function(t,e){for(var n=0,r=e.length,o=Rt(t,r);r>n;)o[n]=e[n++];return o},Ft=function(t,e,n){W(t,e,{get:function(){return this._d[n]}})},It=function(t){var e,n,r,o,i,a,u=x(t),c=arguments.length,f=c>1?arguments[1]:void 0,l=void 0!==f,p=j(u);if(null!=p&&!S(p)){for(a=p.call(u),r=[],e=0;!(i=a.next()).done;e++)r.push(i.value);u=r}for(l&&c>2&&(f=s(f,arguments[2],2)),e=0,n=d(u.length),o=Rt(this,n);n>e;e++)o[e]=l?f(u[e],e):u[e];return o},Ct=function(){for(var t=0,e=arguments.length,n=Rt(this,e);e>t;)n[t]=arguments[t++];return n},Dt=!!q&&i(function(){bt.call(new q(1))}),Nt=function(){return bt.apply(Dt?dt.call(Mt(this)):Mt(this),arguments)},Bt={copyWithin:function(t,e){return N.call(Mt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Mt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return D.apply(Mt(this),arguments)},filter:function(t){return Lt(this,tt(Mt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Mt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return ot(Mt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Mt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Mt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return it(Mt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ht.apply(Mt(this),arguments)},lastIndexOf:function(t){return ft.apply(Mt(this),arguments)},map:function(t){return Et(Mt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return lt.apply(Mt(this),arguments)},reduceRight:function(t){return pt.apply(Mt(this),arguments)},reverse:function(){for(var t,e=this,n=Mt(e).length,r=Math.floor(n/2),o=0;o<r;)t=e[o],e[o++]=e[--n],e[n]=t;return e},some:function(t){return et(Mt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return vt.call(Mt(this),t)},subarray:function(t,e){var n=Mt(this),r=n.length,o=b(t,r);return new(L(n,n[wt]))(n.buffer,n.byteOffset+o*n.BYTES_PER_ELEMENT,d((void 0===e?r:b(e,r))-o))}},Ut=function(t,e){return Lt(this,dt.call(Mt(this),t,e))},Wt=function(t){Mt(this);var e=Tt(arguments[1],1),n=this.length,r=x(t),o=d(r.length),i=0;if(o+e>n)throw V(Pt);for(;i<o;)this[e+i]=r[i++]},Gt={entries:function(){return st.call(Mt(this))},keys:function(){return ct.call(Mt(this))},values:function(){return ut.call(Mt(this))}},Vt=function(t,e){return w(t)&&t[St]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},zt=function(t,e){return Vt(t,e=g(e,!0))?l(2,t[e]):G(t,e)},qt=function(t,e,n){return!(Vt(t,e=g(e,!0))&&w(n)&&m(n,"value"))||m(n,"get")||m(n,"set")||n.configurable||m(n,"writable")&&!n.writable||m(n,"enumerable")&&!n.enumerable?W(t,e,n):(t[e]=n.value,t)};xt||(U.f=zt,B.f=qt),a(a.S+a.F*!xt,"Object",{getOwnPropertyDescriptor:zt,defineProperty:qt}),i(function(){yt.call({})})&&(yt=bt=function(){return ht.call(this)});var Jt=h({},Bt);h(Jt,Gt),p(Jt,gt,Gt.values),h(Jt,{slice:Ut,set:Wt,constructor:function(){},toString:yt,toLocaleString:Nt}),Ft(Jt,"buffer","b"),Ft(Jt,"byteOffset","o"),Ft(Jt,"byteLength","l"),Ft(Jt,"length","e"),W(Jt,mt,{get:function(){return this[St]}}),t.exports=function(t,e,n,c){var s=t+((c=!!c)?"Clamped":"")+"Array",l="get"+t,h="set"+t,v=o[s],b=v||{},g=v&&P(v),m=!v||!u.ABV,x={},S=v&&v[H],j=function(t,n){W(t,n,{get:function(){return function(t,n){var r=t._d;return r.v[l](n*e+r.o,jt)}(this,n)},set:function(t){return function(t,n,r){var o=t._d;c&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),o.v[h](n*e+o.o,r,jt)}(this,n,t)},enumerable:!0})};m?(v=n(function(t,n,r,o){f(t,v,s,"_d");var i,a,u,c,l=0,h=0;if(w(n)){if(!(n instanceof $||(c=_(n))==J||c==K))return St in n?At(v,n):It.call(v,n);i=n,h=Tt(r,e);var b=n.byteLength;if(void 0===o){if(b%e)throw V(Pt);if((a=b-h)<0)throw V(Pt)}else if((a=d(o)*e)+h>b)throw V(Pt);u=a/e}else u=y(n),i=new $(a=u*e);for(p(t,"_d",{b:i,o:h,l:a,e:u,v:new X(i)});l<u;)j(t,l++)}),S=v[H]=O(Jt),p(S,"constructor",v)):i(function(){v(1)})&&i(function(){new v(-1)})&&I(function(t){new v,new v(null),new v(1.5),new v(t)},!0)||(v=n(function(t,n,r,o){var i;return f(t,v,s),w(n)?n instanceof $||(i=_(n))==J||i==K?void 0!==o?new b(n,Tt(r,e),o):void 0!==r?new b(n,Tt(r,e)):new b(n):St in n?At(v,n):It.call(v,n):new b(y(n))}),Q(g!==Function.prototype?E(b).concat(E(g)):E(b),function(t){t in v||p(v,t,b[t])}),v[H]=S,r||(S.constructor=v));var k=S[gt],T=!!k&&("values"==k.name||null==k.name),M=Gt.values;p(v,_t,!0),p(S,St,s),p(S,Ot,!0),p(S,wt,v),(c?new v(1)[mt]==s:mt in S)||W(S,mt,{get:function(){return s}}),x[s]=v,a(a.G+a.W+a.F*(v!=b),x),a(a.S,s,{BYTES_PER_ELEMENT:e}),a(a.S+a.F*i(function(){b.of.call(v,1)}),s,{from:It,of:Ct}),Z in S||p(S,Z,e),a(a.P,s,Bt),C(s),a(a.P+a.F*kt,s,{set:Wt}),a(a.P+a.F*!T,s,Gt),r||S.toString==yt||(S.toString=yt),a(a.P+a.F*i(function(){new v(1).slice()}),s,{slice:Ut}),a(a.P+a.F*(i(function(){return[1,2].toLocaleString()!=new v([1,2]).toLocaleString()})||!i(function(){S.toLocaleString.call([1,2])})),s,{toLocaleString:Nt}),F[s]=T?k:M,r||T||p(S,gt,M)}}else t.exports=function(){}},1125:(t,e,n)=>{"use strict";var r=n(3816),o=n(7057),i=n(4461),a=n(9383),u=n(7728),c=n(4408),s=n(4253),f=n(3328),l=n(1467),p=n(875),h=n(4843),v=n(616).f,d=n(9275).f,y=n(6852),b=n(2943),g="ArrayBuffer",m="DataView",_="prototype",w="Wrong index!",x=r[g],S=r[m],O=r.Math,P=r.RangeError,E=r.Infinity,j=x,k=O.abs,T=O.pow,M=O.floor,R=O.log,L=O.LN2,A="buffer",F="byteLength",I="byteOffset",C=o?"_b":A,D=o?"_l":F,N=o?"_o":I;function B(t,e,n){var r,o,i,a=new Array(n),u=8*n-e-1,c=(1<<u)-1,s=c>>1,f=23===e?T(2,-24)-T(2,-77):0,l=0,p=t<0||0===t&&1/t<0?1:0;for((t=k(t))!=t||t===E?(o=t!=t?1:0,r=c):(r=M(R(t)/L),t*(i=T(2,-r))<1&&(r--,i*=2),(t+=r+s>=1?f/i:f*T(2,1-s))*i>=2&&(r++,i/=2),r+s>=c?(o=0,r=c):r+s>=1?(o=(t*i-1)*T(2,e),r+=s):(o=t*T(2,s-1)*T(2,e),r=0));e>=8;a[l++]=255&o,o/=256,e-=8);for(r=r<<e|o,u+=e;u>0;a[l++]=255&r,r/=256,u-=8);return a[--l]|=128*p,a}function U(t,e,n){var r,o=8*n-e-1,i=(1<<o)-1,a=i>>1,u=o-7,c=n-1,s=t[c--],f=127&s;for(s>>=7;u>0;f=256*f+t[c],c--,u-=8);for(r=f&(1<<-u)-1,f>>=-u,u+=e;u>0;r=256*r+t[c],c--,u-=8);if(0===f)f=1-a;else{if(f===i)return r?NaN:s?-E:E;r+=T(2,e),f-=a}return(s?-1:1)*r*T(2,f-e)}function W(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function G(t){return[255&t]}function V(t){return[255&t,t>>8&255]}function z(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function q(t){return B(t,52,8)}function J(t){return B(t,23,4)}function K(t,e,n){d(t[_],e,{get:function(){return this[n]}})}function Z(t,e,n,r){var o=h(+n);if(o+e>t[D])throw P(w);var i=t[C]._b,a=o+t[N],u=i.slice(a,a+e);return r?u:u.reverse()}function H(t,e,n,r,o,i){var a=h(+n);if(a+e>t[D])throw P(w);for(var u=t[C]._b,c=a+t[N],s=r(+o),f=0;f<e;f++)u[c+f]=s[i?f:e-f-1]}if(a.ABV){if(!s(function(){x(1)})||!s(function(){new x(-1)})||s(function(){return new x,new x(1.5),new x(NaN),x.name!=g})){for(var Y,$=(x=function(t){return f(this,x),new j(h(t))})[_]=j[_],X=v(j),Q=0;X.length>Q;)(Y=X[Q++])in x||u(x,Y,j[Y]);i||($.constructor=x)}var tt=new S(new x(2)),et=S[_].setInt8;tt.setInt8(0,2147483648),tt.setInt8(1,2147483649),!tt.getInt8(0)&&tt.getInt8(1)||c(S[_],{setInt8:function(t,e){et.call(this,t,e<<24>>24)},setUint8:function(t,e){et.call(this,t,e<<24>>24)}},!0)}else x=function(t){f(this,x,g);var e=h(t);this._b=y.call(new Array(e),0),this[D]=e},S=function(t,e,n){f(this,S,m),f(t,x,m);var r=t[D],o=l(e);if(o<0||o>r)throw P("Wrong offset!");if(o+(n=void 0===n?r-o:p(n))>r)throw P("Wrong length!");this[C]=t,this[N]=o,this[D]=n},o&&(K(x,F,"_l"),K(S,A,"_b"),K(S,F,"_l"),K(S,I,"_o")),c(S[_],{getInt8:function(t){return Z(this,1,t)[0]<<24>>24},getUint8:function(t){return Z(this,1,t)[0]},getInt16:function(t){var e=Z(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=Z(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return W(Z(this,4,t,arguments[1]))},getUint32:function(t){return W(Z(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return U(Z(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return U(Z(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){H(this,1,t,G,e)},setUint8:function(t,e){H(this,1,t,G,e)},setInt16:function(t,e){H(this,2,t,V,e,arguments[2])},setUint16:function(t,e){H(this,2,t,V,e,arguments[2])},setInt32:function(t,e){H(this,4,t,z,e,arguments[2])},setUint32:function(t,e){H(this,4,t,z,e,arguments[2])},setFloat32:function(t,e){H(this,4,t,J,e,arguments[2])},setFloat64:function(t,e){H(this,8,t,q,e,arguments[2])}});b(x,g),b(S,m),u(S[_],a.VIEW,!0),e[g]=x,e[m]=S},9383:(t,e,n)=>{for(var r,o=n(3816),i=n(7728),a=n(3953),u=a("typed_array"),c=a("view"),s=!(!o.ArrayBuffer||!o.DataView),f=s,l=0,p="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");l<9;)(r=o[p[l++]])?(i(r.prototype,u,!0),i(r.prototype,c,!0)):f=!1;t.exports={ABV:s,CONSTR:f,TYPED:u,VIEW:c}},3953:t=>{var e=0,n=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++e+n).toString(36))}},575:(t,e,n)=>{var r=n(3816).navigator;t.exports=r&&r.userAgent||""},1616:(t,e,n)=>{var r=n(5286);t.exports=function(t,e){if(!r(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},6074:(t,e,n)=>{var r=n(3816),o=n(5645),i=n(4461),a=n(8787),u=n(9275).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=i?{}:r.Symbol||{});"_"==t.charAt(0)||t in e||u(e,t,{value:a.f(t)})}},8787:(t,e,n)=>{e.f=n(6314)},6314:(t,e,n)=>{var r=n(3825)("wks"),o=n(3953),i=n(3816).Symbol,a="function"==typeof i;(t.exports=function(t){return r[t]||(r[t]=a&&i[t]||(a?i:o)("Symbol."+t))}).store=r},9002:(t,e,n)=>{var r=n(1488),o=n(6314)("iterator"),i=n(2803);t.exports=n(5645).getIteratorMethod=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},2e3:(t,e,n)=>{var r=n(2985);r(r.P,"Array",{copyWithin:n(5216)}),n(7722)("copyWithin")},5745:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(4);r(r.P+r.F*!n(7717)([].every,!0),"Array",{every:function(t){return o(this,t,arguments[1])}})},8977:(t,e,n)=>{var r=n(2985);r(r.P,"Array",{fill:n(6852)}),n(7722)("fill")},8837:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(2);r(r.P+r.F*!n(7717)([].filter,!0),"Array",{filter:function(t){return o(this,t,arguments[1])}})},4899:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(6),i="findIndex",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(7722)(i)},2310:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(5),i="find",a=!0;i in[]&&Array(1)[i](function(){a=!1}),r(r.P+r.F*a,"Array",{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(7722)(i)},4336:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(0),i=n(7717)([].forEach,!0);r(r.P+r.F*!i,"Array",{forEach:function(t){return o(this,t,arguments[1])}})},522:(t,e,n)=>{"use strict";var r=n(741),o=n(2985),i=n(508),a=n(8851),u=n(6555),c=n(875),s=n(2811),f=n(9002);o(o.S+o.F*!n(7462)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,l,p=i(t),h="function"==typeof this?this:Array,v=arguments.length,d=v>1?arguments[1]:void 0,y=void 0!==d,b=0,g=f(p);if(y&&(d=r(d,v>2?arguments[2]:void 0,2)),null==g||h==Array&&u(g))for(n=new h(e=c(p.length));e>b;b++)s(n,b,y?d(p[b],b):p[b]);else for(l=g.call(p),n=new h;!(o=l.next()).done;b++)s(n,b,y?a(l,d,[o.value,b],!0):o.value);return n.length=b,n}})},3369:(t,e,n)=>{"use strict";var r=n(2985),o=n(9315)(!1),i=[].indexOf,a=!!i&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(a||!n(7717)(i)),"Array",{indexOf:function(t){return a?i.apply(this,arguments)||0:o(this,t,arguments[1])}})},774:(t,e,n)=>{var r=n(2985);r(r.S,"Array",{isArray:n(4302)})},6997:(t,e,n)=>{"use strict";var r=n(7722),o=n(5436),i=n(2803),a=n(2110);t.exports=n(2923)(Array,"Array",function(t,e){this._t=a(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},7842:(t,e,n)=>{"use strict";var r=n(2985),o=n(2110),i=[].join;r(r.P+r.F*(n(9797)!=Object||!n(7717)(i)),"Array",{join:function(t){return i.call(o(this),void 0===t?",":t)}})},9564:(t,e,n)=>{"use strict";var r=n(2985),o=n(2110),i=n(1467),a=n(875),u=[].lastIndexOf,c=!!u&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(c||!n(7717)(u)),"Array",{lastIndexOf:function(t){if(c)return u.apply(this,arguments)||0;var e=o(this),n=a(e.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,i(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in e&&e[r]===t)return r||0;return-1}})},1802:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(1);r(r.P+r.F*!n(7717)([].map,!0),"Array",{map:function(t){return o(this,t,arguments[1])}})},8295:(t,e,n)=>{"use strict";var r=n(2985),o=n(2811);r(r.S+r.F*n(4253)(function(){function t(){}return!(Array.of.call(t)instanceof t)}),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)o(n,t,arguments[t++]);return n.length=e,n}})},3750:(t,e,n)=>{"use strict";var r=n(2985),o=n(7628);r(r.P+r.F*!n(7717)([].reduceRight,!0),"Array",{reduceRight:function(t){return o(this,t,arguments.length,arguments[1],!0)}})},3057:(t,e,n)=>{"use strict";var r=n(2985),o=n(7628);r(r.P+r.F*!n(7717)([].reduce,!0),"Array",{reduce:function(t){return o(this,t,arguments.length,arguments[1],!1)}})},110:(t,e,n)=>{"use strict";var r=n(2985),o=n(639),i=n(2032),a=n(2337),u=n(875),c=[].slice;r(r.P+r.F*n(4253)(function(){o&&c.call(o)}),"Array",{slice:function(t,e){var n=u(this.length),r=i(this);if(e=void 0===e?n:e,"Array"==r)return c.call(this,t,e);for(var o=a(t,n),s=a(e,n),f=u(s-o),l=new Array(f),p=0;p<f;p++)l[p]="String"==r?this.charAt(o+p):this[o+p];return l}})},6773:(t,e,n)=>{"use strict";var r=n(2985),o=n(50)(3);r(r.P+r.F*!n(7717)([].some,!0),"Array",{some:function(t){return o(this,t,arguments[1])}})},75:(t,e,n)=>{"use strict";var r=n(2985),o=n(4963),i=n(508),a=n(4253),u=[].sort,c=[1,2,3];r(r.P+r.F*(a(function(){c.sort(void 0)})||!a(function(){c.sort(null)})||!n(7717)(u)),"Array",{sort:function(t){return void 0===t?u.call(i(this)):u.call(i(this),o(t))}})},1842:(t,e,n)=>{n(2974)("Array")},1822:(t,e,n)=>{var r=n(2985);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},1031:(t,e,n)=>{var r=n(2985),o=n(3537);r(r.P+r.F*(Date.prototype.toISOString!==o),"Date",{toISOString:o})},9977:(t,e,n)=>{"use strict";var r=n(2985),o=n(508),i=n(1689);r(r.P+r.F*n(4253)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function(t){var e=o(this),n=i(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},1560:(t,e,n)=>{var r=n(6314)("toPrimitive"),o=Date.prototype;r in o||n(7728)(o,r,n(870))},6331:(t,e,n)=>{var r=Date.prototype,o="Invalid Date",i="toString",a=r[i],u=r.getTime;new Date(NaN)+""!=o&&n(7234)(r,i,function(){var t=u.call(this);return t==t?a.call(this):o})},9730:(t,e,n)=>{var r=n(2985);r(r.P,"Function",{bind:n(4398)})},8377:(t,e,n)=>{"use strict";var r=n(5286),o=n(468),i=n(6314)("hasInstance"),a=Function.prototype;i in a||n(9275).f(a,i,{value:function(t){if("function"!=typeof this||!r(t))return!1;if(!r(this.prototype))return t instanceof this;for(;t=o(t);)if(this.prototype===t)return!0;return!1}})},6059:(t,e,n)=>{var r=n(9275).f,o=Function.prototype,i=/^\s*function ([^ (]*)/,a="name";a in o||n(7057)&&r(o,a,{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(t){return""}}})},8416:(t,e,n)=>{"use strict";var r=n(9824),o=n(1616),i="Map";t.exports=n(5795)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{get:function(t){var e=r.getEntry(o(this,i),t);return e&&e.v},set:function(t,e){return r.def(o(this,i),0===t?0:t,e)}},r,!0)},6503:(t,e,n)=>{var r=n(2985),o=n(6206),i=Math.sqrt,a=Math.acosh;r(r.S+r.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:o(t-1+i(t-1)*i(t+1))}})},6786:(t,e,n)=>{var r=n(2985),o=Math.asinh;r(r.S+r.F*!(o&&1/o(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},932:(t,e,n)=>{var r=n(2985),o=Math.atanh;r(r.S+r.F*!(o&&1/o(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},7526:(t,e,n)=>{var r=n(2985),o=n(1801);r(r.S,"Math",{cbrt:function(t){return o(t=+t)*Math.pow(Math.abs(t),1/3)}})},1591:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},9073:(t,e,n)=>{var r=n(2985),o=Math.exp;r(r.S,"Math",{cosh:function(t){return(o(t=+t)+o(-t))/2}})},347:(t,e,n)=>{var r=n(2985),o=n(3086);r(r.S+r.F*(o!=Math.expm1),"Math",{expm1:o})},579:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{fround:n(4934)})},4669:(t,e,n)=>{var r=n(2985),o=Math.abs;r(r.S,"Math",{hypot:function(t,e){for(var n,r,i=0,a=0,u=arguments.length,c=0;a<u;)c<(n=o(arguments[a++]))?(i=i*(r=c/n)*r+1,c=n):i+=n>0?(r=n/c)*r:n;return c===1/0?1/0:c*Math.sqrt(i)}})},7710:(t,e,n)=>{var r=n(2985),o=Math.imul;r(r.S+r.F*n(4253)(function(){return-5!=o(4294967295,5)||2!=o.length}),"Math",{imul:function(t,e){var n=65535,r=+t,o=+e,i=n&r,a=n&o;return 0|i*a+((n&r>>>16)*a+i*(n&o>>>16)<<16>>>0)}})},5789:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},3514:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{log1p:n(6206)})},9978:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},8472:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{sign:n(1801)})},6946:(t,e,n)=>{var r=n(2985),o=n(3086),i=Math.exp;r(r.S+r.F*n(4253)(function(){return-2e-17!=!Math.sinh(-2e-17)}),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(o(t)-o(-t))/2:(i(t-1)-i(-t-1))*(Math.E/2)}})},5068:(t,e,n)=>{var r=n(2985),o=n(3086),i=Math.exp;r(r.S,"Math",{tanh:function(t){var e=o(t=+t),n=o(-t);return e==1/0?1:n==1/0?-1:(e-n)/(i(t)+i(-t))}})},413:(t,e,n)=>{var r=n(2985);r(r.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},1246:(t,e,n)=>{"use strict";var r=n(3816),o=n(9181),i=n(2032),a=n(266),u=n(1689),c=n(4253),s=n(616).f,f=n(8693).f,l=n(9275).f,p=n(9599).trim,h="Number",v=r[h],d=v,y=v.prototype,b=i(n(2503)(y))==h,g="trim"in String.prototype,m=function(t){var e=u(t,!1);if("string"==typeof e&&e.length>2){var n,r,o,i=(e=g?e.trim():p(e,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(e.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+e}for(var a,c=e.slice(2),s=0,f=c.length;s<f;s++)if((a=c.charCodeAt(s))<48||a>o)return NaN;return parseInt(c,r)}}return+e};if(!v(" 0o1")||!v("0b1")||v("+0x1")){v=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof v&&(b?c(function(){y.valueOf.call(n)}):i(n)!=h)?a(new d(m(e)),n,v):m(e)};for(var _,w=n(7057)?s(d):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;w.length>x;x++)o(d,_=w[x])&&!o(v,_)&&l(v,_,f(d,_));v.prototype=y,y.constructor=v,n(7234)(r,h,v)}},5972:(t,e,n)=>{var r=n(2985);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},3403:(t,e,n)=>{var r=n(2985),o=n(3816).isFinite;r(r.S,"Number",{isFinite:function(t){return"number"==typeof t&&o(t)}})},2516:(t,e,n)=>{var r=n(2985);r(r.S,"Number",{isInteger:n(8367)})},9371:(t,e,n)=>{var r=n(2985);r(r.S,"Number",{isNaN:function(t){return t!=t}})},6479:(t,e,n)=>{var r=n(2985),o=n(8367),i=Math.abs;r(r.S,"Number",{isSafeInteger:function(t){return o(t)&&i(t)<=9007199254740991}})},1736:(t,e,n)=>{var r=n(2985);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},1889:(t,e,n)=>{var r=n(2985);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},5177:(t,e,n)=>{var r=n(2985),o=n(7743);r(r.S+r.F*(Number.parseFloat!=o),"Number",{parseFloat:o})},6943:(t,e,n)=>{var r=n(2985),o=n(5960);r(r.S+r.F*(Number.parseInt!=o),"Number",{parseInt:o})},726:(t,e,n)=>{"use strict";var r=n(2985),o=n(1467),i=n(3365),a=n(8595),u=1..toFixed,c=Math.floor,s=[0,0,0,0,0,0],f="Number.toFixed: incorrect invocation!",l="0",p=function(t,e){for(var n=-1,r=e;++n<6;)r+=t*s[n],s[n]=r%1e7,r=c(r/1e7)},h=function(t){for(var e=6,n=0;--e>=0;)n+=s[e],s[e]=c(n/t),n=n%t*1e7},v=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==s[t]){var n=String(s[t]);e=""===e?n:e+a.call(l,7-n.length)+n}return e},d=function(t,e,n){return 0===e?n:e%2==1?d(t,e-1,n*t):d(t*t,e/2,n)};r(r.P+r.F*(!!u&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(4253)(function(){u.call({})})),"Number",{toFixed:function(t){var e,n,r,u,c=i(this,f),s=o(t),y="",b=l;if(s<0||s>20)throw RangeError(f);if(c!=c)return"NaN";if(c<=-1e21||c>=1e21)return String(c);if(c<0&&(y="-",c=-c),c>1e-21)if(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(c*d(2,69,1))-69,n=e<0?c*d(2,-e,1):c/d(2,e,1),n*=4503599627370496,(e=52-e)>0){for(p(0,n),r=s;r>=7;)p(1e7,0),r-=7;for(p(d(10,r,1),0),r=e-1;r>=23;)h(1<<23),r-=23;h(1<<r),p(1,1),h(2),b=v()}else p(0,n),p(1<<-e,0),b=v()+a.call(l,s);return s>0?y+((u=b.length)<=s?"0."+a.call(l,s-u)+b:b.slice(0,u-s)+"."+b.slice(u-s)):y+b}})},1901:(t,e,n)=>{"use strict";var r=n(2985),o=n(4253),i=n(3365),a=1..toPrecision;r(r.P+r.F*(o(function(){return"1"!==a.call(1,void 0)})||!o(function(){a.call({})})),"Number",{toPrecision:function(t){var e=i(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},5115:(t,e,n)=>{var r=n(2985);r(r.S+r.F,"Object",{assign:n(5345)})},8132:(t,e,n)=>{var r=n(2985);r(r.S,"Object",{create:n(2503)})},7470:(t,e,n)=>{var r=n(2985);r(r.S+r.F*!n(7057),"Object",{defineProperties:n(5588)})},8388:(t,e,n)=>{var r=n(2985);r(r.S+r.F*!n(7057),"Object",{defineProperty:n(9275).f})},9375:(t,e,n)=>{var r=n(5286),o=n(4728).onFreeze;n(3160)("freeze",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},4882:(t,e,n)=>{var r=n(2110),o=n(8693).f;n(3160)("getOwnPropertyDescriptor",function(){return function(t,e){return o(r(t),e)}})},9622:(t,e,n)=>{n(3160)("getOwnPropertyNames",function(){return n(9327).f})},1520:(t,e,n)=>{var r=n(508),o=n(468);n(3160)("getPrototypeOf",function(){return function(t){return o(r(t))}})},9892:(t,e,n)=>{var r=n(5286);n(3160)("isExtensible",function(t){return function(e){return!!r(e)&&(!t||t(e))}})},4157:(t,e,n)=>{var r=n(5286);n(3160)("isFrozen",function(t){return function(e){return!r(e)||!!t&&t(e)}})},5095:(t,e,n)=>{var r=n(5286);n(3160)("isSealed",function(t){return function(e){return!r(e)||!!t&&t(e)}})},9176:(t,e,n)=>{var r=n(2985);r(r.S,"Object",{is:n(7195)})},7476:(t,e,n)=>{var r=n(508),o=n(7184);n(3160)("keys",function(){return function(t){return o(r(t))}})},4672:(t,e,n)=>{var r=n(5286),o=n(4728).onFreeze;n(3160)("preventExtensions",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},3533:(t,e,n)=>{var r=n(5286),o=n(4728).onFreeze;n(3160)("seal",function(t){return function(e){return t&&r(e)?t(o(e)):e}})},8838:(t,e,n)=>{var r=n(2985);r(r.S,"Object",{setPrototypeOf:n(7375).set})},6253:(t,e,n)=>{"use strict";var r=n(1488),o={};o[n(6314)("toStringTag")]="z",o+""!="[object z]"&&n(7234)(Object.prototype,"toString",function(){return"[object "+r(this)+"]"},!0)},4299:(t,e,n)=>{var r=n(2985),o=n(7743);r(r.G+r.F*(parseFloat!=o),{parseFloat:o})},1084:(t,e,n)=>{var r=n(2985),o=n(5960);r(r.G+r.F*(parseInt!=o),{parseInt:o})},851:(t,e,n)=>{"use strict";var r,o,i,a,u=n(4461),c=n(3816),s=n(741),f=n(1488),l=n(2985),p=n(5286),h=n(4963),v=n(3328),d=n(3531),y=n(8364),b=n(4193).set,g=n(4351)(),m=n(3499),_=n(188),w=n(575),x=n(94),S="Promise",O=c.TypeError,P=c.process,E=P&&P.versions,j=E&&E.v8||"",k=c[S],T="process"==f(P),M=function(){},R=o=m.f,L=!!function(){try{var t=k.resolve(1),e=(t.constructor={})[n(6314)("species")]=function(t){t(M,M)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(M)instanceof e&&0!==j.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(t){}}(),A=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},F=function(t,e){if(!t._n){t._n=!0;var n=t._c;g(function(){for(var r=t._v,o=1==t._s,i=0,a=function(e){var n,i,a,u=o?e.ok:e.fail,c=e.resolve,s=e.reject,f=e.domain;try{u?(o||(2==t._h&&D(t),t._h=1),!0===u?n=r:(f&&f.enter(),n=u(r),f&&(f.exit(),a=!0)),n===e.promise?s(O("Promise-chain cycle")):(i=A(n))?i.call(n,c,s):c(n)):s(r)}catch(t){f&&!a&&f.exit(),s(t)}};n.length>i;)a(n[i++]);t._c=[],t._n=!1,e&&!t._h&&I(t)})}},I=function(t){b.call(c,function(){var e,n,r,o=t._v,i=C(t);if(i&&(e=_(function(){T?P.emit("unhandledRejection",o,t):(n=c.onunhandledrejection)?n({promise:t,reason:o}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",o)}),t._h=T||C(t)?2:1),t._a=void 0,i&&e.e)throw e.v})},C=function(t){return 1!==t._h&&0===(t._a||t._c).length},D=function(t){b.call(c,function(){var e;T?P.emit("rejectionHandled",t):(e=c.onrejectionhandled)&&e({promise:t,reason:t._v})})},N=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),F(e,!0))},B=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw O("Promise can't be resolved itself");(e=A(t))?g(function(){var r={_w:n,_d:!1};try{e.call(t,s(B,r,1),s(N,r,1))}catch(t){N.call(r,t)}}):(n._v=t,n._s=1,F(n,!1))}catch(t){N.call({_w:n,_d:!1},t)}}};L||(k=function(t){v(this,k,S,"_h"),h(t),r.call(this);try{t(s(B,this,1),s(N,this,1))}catch(t){N.call(this,t)}},(r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(4408)(k.prototype,{then:function(t,e){var n=R(y(this,k));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=T?P.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&F(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=s(B,t,1),this.reject=s(N,t,1)},m.f=R=function(t){return t===k||t===a?new i(t):o(t)}),l(l.G+l.W+l.F*!L,{Promise:k}),n(2943)(k,S),n(2974)(S),a=n(5645)[S],l(l.S+l.F*!L,S,{reject:function(t){var e=R(this);return(0,e.reject)(t),e.promise}}),l(l.S+l.F*(u||!L),S,{resolve:function(t){return x(u&&this===a?k:this,t)}}),l(l.S+l.F*!(L&&n(7462)(function(t){k.all(t).catch(M)})),S,{all:function(t){var e=this,n=R(e),r=n.resolve,o=n.reject,i=_(function(){var n=[],i=0,a=1;d(t,!1,function(t){var u=i++,c=!1;n.push(void 0),a++,e.resolve(t).then(function(t){c||(c=!0,n[u]=t,--a||r(n))},o)}),--a||r(n)});return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=R(e),r=n.reject,o=_(function(){d(t,!1,function(t){e.resolve(t).then(n.resolve,r)})});return o.e&&r(o.v),n.promise}})},1572:(t,e,n)=>{var r=n(2985),o=n(4963),i=n(7007),a=(n(3816).Reflect||{}).apply,u=Function.apply;r(r.S+r.F*!n(4253)(function(){a(function(){})}),"Reflect",{apply:function(t,e,n){var r=o(t),c=i(n);return a?a(r,e,c):u.call(r,e,c)}})},2139:(t,e,n)=>{var r=n(2985),o=n(2503),i=n(4963),a=n(7007),u=n(5286),c=n(4253),s=n(4398),f=(n(3816).Reflect||{}).construct,l=c(function(){function t(){}return!(f(function(){},[],t)instanceof t)}),p=!c(function(){f(function(){})});r(r.S+r.F*(l||p),"Reflect",{construct:function(t,e){i(t),a(e);var n=arguments.length<3?t:i(arguments[2]);if(p&&!l)return f(t,e,n);if(t==n){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 r=[null];return r.push.apply(r,e),new(s.apply(t,r))}var c=n.prototype,h=o(u(c)?c:Object.prototype),v=Function.apply.call(t,h,e);return u(v)?v:h}})},685:(t,e,n)=>{var r=n(9275),o=n(2985),i=n(7007),a=n(1689);o(o.S+o.F*n(4253)(function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function(t,e,n){i(t),e=a(e,!0),i(n);try{return r.f(t,e,n),!0}catch(t){return!1}}})},5535:(t,e,n)=>{var r=n(2985),o=n(8693).f,i=n(7007);r(r.S,"Reflect",{deleteProperty:function(t,e){var n=o(i(t),e);return!(n&&!n.configurable)&&delete t[e]}})},7347:(t,e,n)=>{"use strict";var r=n(2985),o=n(7007),i=function(t){this._t=o(t),this._i=0;var e,n=this._k=[];for(e in t)n.push(e)};n(9988)(i,"Object",function(){var t,e=this,n=e._k;do{if(e._i>=n.length)return{value:void 0,done:!0}}while(!((t=n[e._i++])in e._t));return{value:t,done:!1}}),r(r.S,"Reflect",{enumerate:function(t){return new i(t)}})},6633:(t,e,n)=>{var r=n(8693),o=n(2985),i=n(7007);o(o.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return r.f(i(t),e)}})},8989:(t,e,n)=>{var r=n(2985),o=n(468),i=n(7007);r(r.S,"Reflect",{getPrototypeOf:function(t){return o(i(t))}})},3049:(t,e,n)=>{var r=n(8693),o=n(468),i=n(9181),a=n(2985),u=n(5286),c=n(7007);a(a.S,"Reflect",{get:function t(e,n){var a,s,f=arguments.length<3?e:arguments[2];return c(e)===f?e[n]:(a=r.f(e,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(f):void 0:u(s=o(e))?t(s,n,f):void 0}})},8270:(t,e,n)=>{var r=n(2985);r(r.S,"Reflect",{has:function(t,e){return e in t}})},4510:(t,e,n)=>{var r=n(2985),o=n(7007),i=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(t){return o(t),!i||i(t)}})},3984:(t,e,n)=>{var r=n(2985);r(r.S,"Reflect",{ownKeys:n(7643)})},5769:(t,e,n)=>{var r=n(2985),o=n(7007),i=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(t){o(t);try{return i&&i(t),!0}catch(t){return!1}}})},6014:(t,e,n)=>{var r=n(2985),o=n(7375);o&&r(r.S,"Reflect",{setPrototypeOf:function(t,e){o.check(t,e);try{return o.set(t,e),!0}catch(t){return!1}}})},55:(t,e,n)=>{var r=n(9275),o=n(8693),i=n(468),a=n(9181),u=n(2985),c=n(681),s=n(7007),f=n(5286);u(u.S,"Reflect",{set:function t(e,n,u){var l,p,h=arguments.length<4?e:arguments[3],v=o.f(s(e),n);if(!v){if(f(p=i(e)))return t(p,n,u,h);v=c(0)}if(a(v,"value")){if(!1===v.writable||!f(h))return!1;if(l=o.f(h,n)){if(l.get||l.set||!1===l.writable)return!1;l.value=u,r.f(h,n,l)}else r.f(h,n,c(0,u));return!0}return void 0!==v.set&&(v.set.call(h,u),!0)}})},3946:(t,e,n)=>{var r=n(3816),o=n(266),i=n(9275).f,a=n(616).f,u=n(5364),c=n(3218),s=r.RegExp,f=s,l=s.prototype,p=/a/g,h=/a/g,v=new s(p)!==p;if(n(7057)&&(!v||n(4253)(function(){return h[n(6314)("match")]=!1,s(p)!=p||s(h)==h||"/a/i"!=s(p,"i")}))){s=function(t,e){var n=this instanceof s,r=u(t),i=void 0===e;return!n&&r&&t.constructor===s&&i?t:o(v?new f(r&&!i?t.source:t,e):f((r=t instanceof s)?t.source:t,r&&i?c.call(t):e),n?this:l,s)};for(var d=function(t){t in s||i(s,t,{configurable:!0,get:function(){return f[t]},set:function(e){f[t]=e}})},y=a(f),b=0;y.length>b;)d(y[b++]);l.constructor=s,s.prototype=l,n(7234)(r,"RegExp",s)}n(2974)("RegExp")},8269:(t,e,n)=>{"use strict";var r=n(1165);n(2985)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},6774:(t,e,n)=>{n(7057)&&"g"!=/./g.flags&&n(9275).f(RegExp.prototype,"flags",{configurable:!0,get:n(3218)})},1466:(t,e,n)=>{"use strict";var r=n(7007),o=n(875),i=n(6793),a=n(7787);n(8082)("match",1,function(t,e,n,u){return[function(n){var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=u(n,t,this);if(e.done)return e.value;var c=r(t),s=String(this);if(!c.global)return a(c,s);var f=c.unicode;c.lastIndex=0;for(var l,p=[],h=0;null!==(l=a(c,s));){var v=String(l[0]);p[h]=v,""===v&&(c.lastIndex=i(s,o(c.lastIndex),f)),h++}return 0===h?null:p}]})},9357:(t,e,n)=>{"use strict";var r=n(7007),o=n(508),i=n(875),a=n(1467),u=n(6793),c=n(7787),s=Math.max,f=Math.min,l=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g,v=function(t){return void 0===t?t:String(t)};n(8082)("replace",2,function(t,e,n,d){return[function(r,o){var i=t(this),a=null==r?void 0:r[e];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(t,e){var o=d(n,t,this,e);if(o.done)return o.value;var l=r(t),p=String(this),h="function"==typeof e;h||(e=String(e));var b=l.global;if(b){var g=l.unicode;l.lastIndex=0}for(var m=[];;){var _=c(l,p);if(null===_)break;if(m.push(_),!b)break;""===String(_[0])&&(l.lastIndex=u(p,i(l.lastIndex),g))}for(var w="",x=0,S=0;S<m.length;S++){_=m[S];for(var O=String(_[0]),P=s(f(a(_.index),p.length),0),E=[],j=1;j<_.length;j++)E.push(v(_[j]));var k=_.groups;if(h){var T=[O].concat(E,P,p);void 0!==k&&T.push(k);var M=String(e.apply(void 0,T))}else M=y(O,p,P,E,k,e);P>=x&&(w+=p.slice(x,P)+M,x=P+O.length)}return w+p.slice(x)}];function y(t,e,r,i,a,u){var c=r+t.length,s=i.length,f=h;return void 0!==a&&(a=o(a),f=p),n.call(u,f,function(n,o){var u;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(c);case"<":u=a[o.slice(1,-1)];break;default:var f=+o;if(0===f)return n;if(f>s){var p=l(f/10);return 0===p?n:p<=s?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}u=i[f-1]}return void 0===u?"":u})}})},6142:(t,e,n)=>{"use strict";var r=n(7007),o=n(7195),i=n(7787);n(8082)("search",1,function(t,e,n,a){return[function(n){var r=t(this),o=null==n?void 0:n[e];return void 0!==o?o.call(n,r):new RegExp(n)[e](String(r))},function(t){var e=a(n,t,this);if(e.done)return e.value;var u=r(t),c=String(this),s=u.lastIndex;o(s,0)||(u.lastIndex=0);var f=i(u,c);return o(u.lastIndex,s)||(u.lastIndex=s),null===f?-1:f.index}]})},1876:(t,e,n)=>{"use strict";var r=n(5364),o=n(7007),i=n(8364),a=n(6793),u=n(875),c=n(7787),s=n(1165),f=n(4253),l=Math.min,p=[].push,h="split",v="length",d="lastIndex",y=4294967295,b=!f(function(){RegExp(y,"y")});n(8082)("split",2,function(t,e,n,f){var g;return g="c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[v]||2!="ab"[h](/(?:ab)*/)[v]||4!="."[h](/(.?)(.?)/)[v]||"."[h](/()()/)[v]>1||""[h](/.?/)[v]?function(t,e){var o=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(o,t,e);for(var i,a,u,c=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,h=void 0===e?y:e>>>0,b=new RegExp(t.source,f+"g");(i=s.call(b,o))&&!((a=b[d])>l&&(c.push(o.slice(l,i.index)),i[v]>1&&i.index<o[v]&&p.apply(c,i.slice(1)),u=i[0][v],l=a,c[v]>=h));)b[d]===i.index&&b[d]++;return l===o[v]?!u&&b.test("")||c.push(""):c.push(o.slice(l)),c[v]>h?c.slice(0,h):c}:"0"[h](void 0,0)[v]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var o=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):g.call(String(o),n,r)},function(t,e){var r=f(g,t,this,e,g!==n);if(r.done)return r.value;var s=o(t),p=String(this),h=i(s,RegExp),v=s.unicode,d=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(b?"y":"g"),m=new h(b?s:"^(?:"+s.source+")",d),_=void 0===e?y:e>>>0;if(0===_)return[];if(0===p.length)return null===c(m,p)?[p]:[];for(var w=0,x=0,S=[];x<p.length;){m.lastIndex=b?x:0;var O,P=c(m,b?p:p.slice(x));if(null===P||(O=l(u(m.lastIndex+(b?0:x)),p.length))===w)x=a(p,x,v);else{if(S.push(p.slice(w,x)),S.length===_)return S;for(var E=1;E<=P.length-1;E++)if(S.push(P[E]),S.length===_)return S;x=w=O}}return S.push(p.slice(w)),S}]})},6108:(t,e,n)=>{"use strict";n(6774);var r=n(7007),o=n(3218),i=n(7057),a="toString",u=/./[a],c=function(t){n(7234)(RegExp.prototype,a,t,!0)};n(4253)(function(){return"/a/b"!=u.call({source:"a",flags:"b"})})?c(function(){var t=r(this);return"/".concat(t.source,"/","flags"in t?t.flags:!i&&t instanceof RegExp?o.call(t):void 0)}):u.name!=a&&c(function(){return u.call(this)})},8184:(t,e,n)=>{"use strict";var r=n(9824),o=n(1616);t.exports=n(5795)("Set",function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,"Set"),t=0===t?0:t,t)}},r)},856:(t,e,n)=>{"use strict";n(9395)("anchor",function(t){return function(e){return t(this,"a","name",e)}})},703:(t,e,n)=>{"use strict";n(9395)("big",function(t){return function(){return t(this,"big","","")}})},1539:(t,e,n)=>{"use strict";n(9395)("blink",function(t){return function(){return t(this,"blink","","")}})},5292:(t,e,n)=>{"use strict";n(9395)("bold",function(t){return function(){return t(this,"b","","")}})},9539:(t,e,n)=>{"use strict";var r=n(2985),o=n(4496)(!1);r(r.P,"String",{codePointAt:function(t){return o(this,t)}})},6620:(t,e,n)=>{"use strict";var r=n(2985),o=n(875),i=n(2094),a="endsWith",u=""[a];r(r.P+r.F*n(8852)(a),"String",{endsWith:function(t){var e=i(this,t,a),n=arguments.length>1?arguments[1]:void 0,r=o(e.length),c=void 0===n?r:Math.min(o(n),r),s=String(t);return u?u.call(e,s,c):e.slice(c-s.length,c)===s}})},6629:(t,e,n)=>{"use strict";n(9395)("fixed",function(t){return function(){return t(this,"tt","","")}})},3694:(t,e,n)=>{"use strict";n(9395)("fontcolor",function(t){return function(e){return t(this,"font","color",e)}})},7648:(t,e,n)=>{"use strict";n(9395)("fontsize",function(t){return function(e){return t(this,"font","size",e)}})},191:(t,e,n)=>{var r=n(2985),o=n(2337),i=String.fromCharCode,a=String.fromCodePoint;r(r.S+r.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],r=arguments.length,a=0;r>a;){if(e=+arguments[a++],o(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?i(e):i(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},2850:(t,e,n)=>{"use strict";var r=n(2985),o=n(2094),i="includes";r(r.P+r.F*n(8852)(i),"String",{includes:function(t){return!!~o(this,t,i).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},7795:(t,e,n)=>{"use strict";n(9395)("italics",function(t){return function(){return t(this,"i","","")}})},9115:(t,e,n)=>{"use strict";var r=n(4496)(!0);n(2923)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},4531:(t,e,n)=>{"use strict";n(9395)("link",function(t){return function(e){return t(this,"a","href",e)}})},8306:(t,e,n)=>{var r=n(2985),o=n(2110),i=n(875);r(r.S,"String",{raw:function(t){for(var e=o(t.raw),n=i(e.length),r=arguments.length,a=[],u=0;n>u;)a.push(String(e[u++])),u<r&&a.push(String(arguments[u]));return a.join("")}})},823:(t,e,n)=>{var r=n(2985);r(r.P,"String",{repeat:n(8595)})},3605:(t,e,n)=>{"use strict";n(9395)("small",function(t){return function(){return t(this,"small","","")}})},7732:(t,e,n)=>{"use strict";var r=n(2985),o=n(875),i=n(2094),a="startsWith",u=""[a];r(r.P+r.F*n(8852)(a),"String",{startsWith:function(t){var e=i(this,t,a),n=o(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return u?u.call(e,r,n):e.slice(n,n+r.length)===r}})},6780:(t,e,n)=>{"use strict";n(9395)("strike",function(t){return function(){return t(this,"strike","","")}})},9937:(t,e,n)=>{"use strict";n(9395)("sub",function(t){return function(){return t(this,"sub","","")}})},511:(t,e,n)=>{"use strict";n(9395)("sup",function(t){return function(){return t(this,"sup","","")}})},4564:(t,e,n)=>{"use strict";n(9599)("trim",function(t){return function(){return t(this,3)}})},5767:(t,e,n)=>{"use strict";var r=n(3816),o=n(9181),i=n(7057),a=n(2985),u=n(7234),c=n(4728).KEY,s=n(4253),f=n(3825),l=n(2943),p=n(3953),h=n(6314),v=n(8787),d=n(6074),y=n(5541),b=n(4302),g=n(7007),m=n(5286),_=n(508),w=n(2110),x=n(1689),S=n(681),O=n(2503),P=n(9327),E=n(8693),j=n(4548),k=n(9275),T=n(7184),M=E.f,R=k.f,L=P.f,A=r.Symbol,F=r.JSON,I=F&&F.stringify,C="prototype",D=h("_hidden"),N=h("toPrimitive"),B={}.propertyIsEnumerable,U=f("symbol-registry"),W=f("symbols"),G=f("op-symbols"),V=Object[C],z="function"==typeof A&&!!j.f,q=r.QObject,J=!q||!q[C]||!q[C].findChild,K=i&&s(function(){return 7!=O(R({},"a",{get:function(){return R(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=M(V,e);r&&delete V[e],R(t,e,n),r&&t!==V&&R(V,e,r)}:R,Z=function(t){var e=W[t]=O(A[C]);return e._k=t,e},H=z&&"symbol"==typeof A.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof A},Y=function(t,e,n){return t===V&&Y(G,e,n),g(t),e=x(e,!0),g(n),o(W,e)?(n.enumerable?(o(t,D)&&t[D][e]&&(t[D][e]=!1),n=O(n,{enumerable:S(0,!1)})):(o(t,D)||R(t,D,S(1,{})),t[D][e]=!0),K(t,e,n)):R(t,e,n)},$=function(t,e){g(t);for(var n,r=y(e=w(e)),o=0,i=r.length;i>o;)Y(t,n=r[o++],e[n]);return t},X=function(t){var e=B.call(this,t=x(t,!0));return!(this===V&&o(W,t)&&!o(G,t))&&(!(e||!o(this,t)||!o(W,t)||o(this,D)&&this[D][t])||e)},Q=function(t,e){if(t=w(t),e=x(e,!0),t!==V||!o(W,e)||o(G,e)){var n=M(t,e);return!n||!o(W,e)||o(t,D)&&t[D][e]||(n.enumerable=!0),n}},tt=function(t){for(var e,n=L(w(t)),r=[],i=0;n.length>i;)o(W,e=n[i++])||e==D||e==c||r.push(e);return r},et=function(t){for(var e,n=t===V,r=L(n?G:w(t)),i=[],a=0;r.length>a;)!o(W,e=r[a++])||n&&!o(V,e)||i.push(W[e]);return i};z||(u((A=function(){if(this instanceof A)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===V&&e.call(G,n),o(this,D)&&o(this[D],t)&&(this[D][t]=!1),K(this,t,S(1,n))};return i&&J&&K(V,t,{configurable:!0,set:e}),Z(t)})[C],"toString",function(){return this._k}),E.f=Q,k.f=Y,n(616).f=P.f=tt,n(4682).f=X,j.f=et,i&&!n(4461)&&u(V,"propertyIsEnumerable",X,!0),v.f=function(t){return Z(h(t))}),a(a.G+a.W+a.F*!z,{Symbol:A});for(var nt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),rt=0;nt.length>rt;)h(nt[rt++]);for(var ot=T(h.store),it=0;ot.length>it;)d(ot[it++]);a(a.S+a.F*!z,"Symbol",{for:function(t){return o(U,t+="")?U[t]:U[t]=A(t)},keyFor:function(t){if(!H(t))throw TypeError(t+" is not a symbol!");for(var e in U)if(U[e]===t)return e},useSetter:function(){J=!0},useSimple:function(){J=!1}}),a(a.S+a.F*!z,"Object",{create:function(t,e){return void 0===e?O(t):$(O(t),e)},defineProperty:Y,defineProperties:$,getOwnPropertyDescriptor:Q,getOwnPropertyNames:tt,getOwnPropertySymbols:et});var at=s(function(){j.f(1)});a(a.S+a.F*at,"Object",{getOwnPropertySymbols:function(t){return j.f(_(t))}}),F&&a(a.S+a.F*(!z||s(function(){var t=A();return"[null]"!=I([t])||"{}"!=I({a:t})||"{}"!=I(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);if(n=e=r[1],(m(e)||void 0!==t)&&!H(t))return b(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!H(e))return e}),r[1]=e,I.apply(F,r)}}),A[C][N]||n(7728)(A[C],N,A[C].valueOf),l(A,"Symbol"),l(Math,"Math",!0),l(r.JSON,"JSON",!0)},142:(t,e,n)=>{"use strict";var r=n(2985),o=n(9383),i=n(1125),a=n(7007),u=n(2337),c=n(875),s=n(5286),f=n(3816).ArrayBuffer,l=n(8364),p=i.ArrayBuffer,h=i.DataView,v=o.ABV&&f.isView,d=p.prototype.slice,y=o.VIEW,b="ArrayBuffer";r(r.G+r.W+r.F*(f!==p),{ArrayBuffer:p}),r(r.S+r.F*!o.CONSTR,b,{isView:function(t){return v&&v(t)||s(t)&&y in t}}),r(r.P+r.U+r.F*n(4253)(function(){return!new p(2).slice(1,void 0).byteLength}),b,{slice:function(t,e){if(void 0!==d&&void 0===e)return d.call(a(this),t);for(var n=a(this).byteLength,r=u(t,n),o=u(void 0===e?n:e,n),i=new(l(this,p))(c(o-r)),s=new h(this),f=new h(i),v=0;r<o;)f.setUint8(v++,s.getUint8(r++));return i}}),n(2974)(b)},1786:(t,e,n)=>{var r=n(2985);r(r.G+r.W+r.F*!n(9383).ABV,{DataView:n(1125).DataView})},162:(t,e,n)=>{n(8440)("Float32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},3834:(t,e,n)=>{n(8440)("Float64",8,function(t){return function(e,n,r){return t(this,e,n,r)}})},4821:(t,e,n)=>{n(8440)("Int16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},1303:(t,e,n)=>{n(8440)("Int32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},5368:(t,e,n)=>{n(8440)("Int8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},9103:(t,e,n)=>{n(8440)("Uint16",2,function(t){return function(e,n,r){return t(this,e,n,r)}})},3318:(t,e,n)=>{n(8440)("Uint32",4,function(t){return function(e,n,r){return t(this,e,n,r)}})},6964:(t,e,n)=>{n(8440)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}})},2152:(t,e,n)=>{n(8440)("Uint8",1,function(t){return function(e,n,r){return t(this,e,n,r)}},!0)},147:(t,e,n)=>{"use strict";var r,o=n(3816),i=n(50)(0),a=n(7234),u=n(4728),c=n(5345),s=n(3657),f=n(5286),l=n(1616),p=n(1616),h=!o.ActiveXObject&&"ActiveXObject"in o,v="WeakMap",d=u.getWeak,y=Object.isExtensible,b=s.ufstore,g=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(t){if(f(t)){var e=d(t);return!0===e?b(l(this,v)).get(t):e?e[this._i]:void 0}},set:function(t,e){return s.def(l(this,v),t,e)}},_=t.exports=n(5795)(v,g,m,s,!0,!0);p&&h&&(c((r=s.getConstructor(g,v)).prototype,m),u.NEED=!0,i(["delete","has","get","set"],function(t){var e=_.prototype,n=e[t];a(e,t,function(e,o){if(f(e)&&!y(e)){this._f||(this._f=new r);var i=this._f[t](e,o);return"set"==t?this:i}return n.call(this,e,o)})}))},9192:(t,e,n)=>{"use strict";var r=n(3657),o=n(1616),i="WeakSet";n(5795)(i,function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},{add:function(t){return r.def(o(this,i),t,!0)}},r,!1,!0)},1268:(t,e,n)=>{"use strict";var r=n(2985),o=n(3325),i=n(508),a=n(875),u=n(4963),c=n(6886);r(r.P,"Array",{flatMap:function(t){var e,n,r=i(this);return u(t),e=a(r.length),n=c(r,0),o(n,r,r,e,0,1,t,arguments[1]),n}}),n(7722)("flatMap")},2773:(t,e,n)=>{"use strict";var r=n(2985),o=n(9315)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(7722)("includes")},3276:(t,e,n)=>{var r=n(2985),o=n(1131)(!0);r(r.S,"Object",{entries:function(t){return o(t)}})},8351:(t,e,n)=>{var r=n(2985),o=n(7643),i=n(2110),a=n(8693),u=n(2811);r(r.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,r=i(t),c=a.f,s=o(r),f={},l=0;s.length>l;)void 0!==(n=c(r,e=s[l++]))&&u(f,e,n);return f}})},6409:(t,e,n)=>{var r=n(2985),o=n(1131)(!1);r(r.S,"Object",{values:function(t){return o(t)}})},9865:(t,e,n)=>{"use strict";var r=n(2985),o=n(5645),i=n(3816),a=n(8364),u=n(94);r(r.P+r.R,"Promise",{finally:function(t){var e=a(this,o.Promise||i.Promise),n="function"==typeof t;return this.then(n?function(n){return u(e,t()).then(function(){return n})}:t,n?function(n){return u(e,t()).then(function(){throw n})}:t)}})},2770:(t,e,n)=>{"use strict";var r=n(2985),o=n(5442),i=n(575),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*a,"String",{padEnd:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},1784:(t,e,n)=>{"use strict";var r=n(2985),o=n(5442),i=n(575),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);r(r.P+r.F*a,"String",{padStart:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},5869:(t,e,n)=>{"use strict";n(9599)("trimLeft",function(t){return function(){return t(this,1)}},"trimStart")},4325:(t,e,n)=>{"use strict";n(9599)("trimRight",function(t){return function(){return t(this,2)}},"trimEnd")},9665:(t,e,n)=>{n(6074)("asyncIterator")},1181:(t,e,n)=>{for(var r=n(6997),o=n(7184),i=n(7234),a=n(3816),u=n(7728),c=n(2803),s=n(6314),f=s("iterator"),l=s("toStringTag"),p=c.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},v=o(h),d=0;d<v.length;d++){var y,b=v[d],g=h[b],m=a[b],_=m&&m.prototype;if(_&&(_[f]||u(_,f,p),_[l]||u(_,l,b),c[b]=p,g))for(y in r)_[y]||i(_,y,r[y],!0)}},4633:(t,e,n)=>{var r=n(2985),o=n(4193);r(r.G+r.B,{setImmediate:o.set,clearImmediate:o.clear})},2564:(t,e,n)=>{var r=n(3816),o=n(2985),i=n(575),a=[].slice,u=/MSIE .\./.test(i),c=function(t){return function(e,n){var r=arguments.length>2,o=!!r&&a.call(arguments,2);return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};o(o.G+o.B+o.F*u,{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},6337:(t,e,n)=>{n(2564),n(4633),n(1181),t.exports=n(5645)},7187:t=>{"use strict";var e,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};e=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function i(){i.init.call(this)}t.exports=i,t.exports.once=function(t,e){return new Promise(function(n,r){function o(n){t.removeListener(e,i),r(n)}function i(){"function"==typeof t.removeListener&&t.removeListener("error",o),n([].slice.call(arguments))}d(t,e,i,{once:!0}),"error"!==e&&function(t,e){"function"==typeof t.on&&d(t,"error",e,{once:!0})}(t,o)})},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var a=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t._maxListeners?i.defaultMaxListeners:t._maxListeners}function s(t,e,n,r){var o,i,a,s;if(u(n),void 0===(i=t._events)?(i=t._events=Object.create(null),t._eventsCount=0):(void 0!==i.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),i=t._events),a=i[e]),void 0===a)a=i[e]=n,++t._eventsCount;else if("function"==typeof a?a=i[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(t))>0&&a.length>o&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=a.length,s=f,console&&console.warn&&console.warn(s)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},o=f.bind(r);return o.listener=n,r.wrapFn=o,o}function p(t,e,n){var r=t._events;if(void 0===r)return[];var o=r[e];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(o):v(o,o.length)}function h(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}function d(t,e,n,r){if("function"==typeof t.on)r.once?t.once(e,n):t.on(e,n);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,function o(i){r.once&&t.removeEventListener(e,o),n(i)})}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");a=t}}),i.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},i.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var o="error"===t,i=this._events;if(void 0!==i)o=o&&void 0===i.error;else if(!o)return!1;if(o){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var u=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw u.context=a,u}var c=i[t];if(void 0===c)return!1;if("function"==typeof c)r(c,this,e);else{var s=c.length,f=v(c,s);for(n=0;n<s;++n)r(f[n],this,e)}return!0},i.prototype.addListener=function(t,e){return s(this,t,e,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(t,e){return s(this,t,e,!0)},i.prototype.once=function(t,e){return u(e),this.on(t,l(this,t,e)),this},i.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,l(this,t,e)),this},i.prototype.removeListener=function(t,e){var n,r,o,i,a;if(u(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===e||n[i].listener===e){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,o),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,a||e)}return this},i.prototype.off=i.prototype.removeListener,i.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},i.prototype.listeners=function(t){return p(this,t,!0)},i.prototype.rawListeners=function(t){return p(this,t,!1)},i.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):h.call(t,e)},i.prototype.listenerCount=h,i.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},5666:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function s(t,e,n,r){var o=e&&e.prototype instanceof y?e:y,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(t,e,n){var r=l;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===v){if("throw"===o)throw i;return M()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=P(a,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var c=f(t,e,n);if("normal"===c.type){if(r=n.done?v:p,c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=v,n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var l="suspendedStart",p="suspendedYield",h="executing",v="completed",d={};function y(){}function b(){}function g(){}var m={};c(m,i,function(){return this});var _=Object.getPrototypeOf,w=_&&_(_(T([])));w&&w!==n&&r.call(w,i)&&(m=w);var x=g.prototype=y.prototype=Object.create(m);function S(t){["next","throw","return"].forEach(function(e){c(t,e,function(t){return this._invoke(e,t)})})}function O(t,e){function n(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then(function(t){n("next",t,a,u)},function(t){n("throw",t,a,u)}):e.resolve(l).then(function(t){s.value=t,a(s)},function(t){return n("throw",t,a,u)})}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e(function(e,o){n(t,r,e,o)})}return o=o?o.then(i,i):i()}}function P(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method))return d;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var o=f(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,d;var i=o.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function E(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 j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function T(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o<t.length;)if(r.call(t,o))return n.value=t[o],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}return{next:M}}function M(){return{value:e,done:!0}}return b.prototype=g,c(x,"constructor",g),c(g,"constructor",b),b.displayName=c(g,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},S(O.prototype),c(O.prototype,a,function(){return this}),t.AsyncIterator=O,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new O(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then(function(t){return t.done?t.value:a.next()})},S(x),c(x,u,"Generator"),c(x,i,function(){return this}),c(x,"toString",function(){return"[object Generator]"}),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=T,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(j),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},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 n=this;function o(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(c&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),j(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;j(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:T(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n(6981),n(9009)})();
|
package/package.json
CHANGED
package/src/Controller.js
CHANGED
|
@@ -1,12 +1,34 @@
|
|
|
1
1
|
import EventEmitter from 'events';
|
|
2
2
|
import controlMap from "./actions/index";
|
|
3
3
|
|
|
4
|
+
const POINTER_TYPES = new Set(['mouse', 'touch', 'pen']);
|
|
5
|
+
|
|
6
|
+
function resolveInputMethod (device, event) {
|
|
7
|
+
if (event?.inputMethod) {
|
|
8
|
+
return event.inputMethod;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const deviceMethod = device?.inputMethod;
|
|
12
|
+
|
|
13
|
+
if (deviceMethod === 'pointer') {
|
|
14
|
+
const pointerType = event?.event?.pointerType;
|
|
15
|
+
if (POINTER_TYPES.has(pointerType)) {
|
|
16
|
+
return pointerType;
|
|
17
|
+
}
|
|
18
|
+
return 'pointer';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return deviceMethod || null;
|
|
22
|
+
}
|
|
23
|
+
|
|
4
24
|
class Controller extends EventEmitter {
|
|
5
25
|
constructor (devices = [], controlClasses = {}) {
|
|
6
26
|
super();
|
|
7
27
|
|
|
8
28
|
this.devices = [];
|
|
9
29
|
this.controls = {};
|
|
30
|
+
/** @type {string[]} Most recent input method at index 0. */
|
|
31
|
+
this.inputPrecedence = [];
|
|
10
32
|
|
|
11
33
|
// Set up control map with type to class conversions
|
|
12
34
|
this.controlMap = {
|
|
@@ -16,6 +38,28 @@ class Controller extends EventEmitter {
|
|
|
16
38
|
|
|
17
39
|
devices.forEach((device) => this.addDevice(device));
|
|
18
40
|
}
|
|
41
|
+
|
|
42
|
+
get preferredInput () {
|
|
43
|
+
return this.inputPrecedence[0] || null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Move an input method to the front of inputPrecedence.
|
|
48
|
+
* Emits `input-precedence-updated` only when preferred (index 0) changes.
|
|
49
|
+
* @param {string} method
|
|
50
|
+
*/
|
|
51
|
+
noteInput (method) {
|
|
52
|
+
if (!method || method === this.inputPrecedence[0]) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const was = this.inputPrecedence.indexOf(method);
|
|
57
|
+
if (was > 0) {
|
|
58
|
+
this.inputPrecedence.splice(was, 1);
|
|
59
|
+
}
|
|
60
|
+
this.inputPrecedence.unshift(method);
|
|
61
|
+
this.emit('input-precedence-updated', this.inputPrecedence);
|
|
62
|
+
}
|
|
19
63
|
|
|
20
64
|
addControl (id, type) {
|
|
21
65
|
const
|
|
@@ -39,7 +83,16 @@ class Controller extends EventEmitter {
|
|
|
39
83
|
addDevice (device) {
|
|
40
84
|
this.devices.push(device);
|
|
41
85
|
|
|
86
|
+
device.on('input-activity', (method) => {
|
|
87
|
+
this.noteInput(method);
|
|
88
|
+
});
|
|
89
|
+
|
|
42
90
|
device.on('updated', (event) => {
|
|
91
|
+
const method = resolveInputMethod(device, event);
|
|
92
|
+
if (method) {
|
|
93
|
+
this.noteInput(method);
|
|
94
|
+
}
|
|
95
|
+
|
|
43
96
|
const
|
|
44
97
|
key = event.control;
|
|
45
98
|
let control = this.controls[key];
|
|
@@ -71,4 +124,4 @@ class Controller extends EventEmitter {
|
|
|
71
124
|
}
|
|
72
125
|
};
|
|
73
126
|
|
|
74
|
-
export default Controller;
|
|
127
|
+
export default Controller;
|
|
@@ -159,9 +159,11 @@ class GamepadDevice extends EventEmitter {
|
|
|
159
159
|
constructor () {
|
|
160
160
|
super();
|
|
161
161
|
|
|
162
|
+
this.inputMethod = 'gamepad';
|
|
162
163
|
this.eventHandlers = [];
|
|
163
164
|
|
|
164
165
|
window.addEventListener("gamepadconnected", () => {
|
|
166
|
+
this.emit('input-activity', 'gamepad');
|
|
165
167
|
this.updateGamepads();
|
|
166
168
|
});
|
|
167
169
|
|
|
@@ -67,6 +67,7 @@ class SpeechDevice extends EventEmitter {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
this.device = options.device || 'Speech';
|
|
70
|
+
this.inputMethod = 'speech';
|
|
70
71
|
this.transcriptControl = options.transcriptControl || DEFAULT_TRANSCRIPT_CONTROL;
|
|
71
72
|
this.lang = options.lang || 'en-US';
|
|
72
73
|
this.interimResults = Boolean(options.interimResults);
|
|
@@ -123,6 +124,9 @@ class SpeechDevice extends EventEmitter {
|
|
|
123
124
|
return;
|
|
124
125
|
}
|
|
125
126
|
|
|
127
|
+
// Mic arm counts as speech preference for UI/VO (before first utterance).
|
|
128
|
+
this.emit('input-activity', 'speech');
|
|
129
|
+
|
|
126
130
|
if (this._shouldListen()) {
|
|
127
131
|
this._scheduleStart(0);
|
|
128
132
|
}
|