UNPKG

@zoom/meetingsdk

Version:
2 lines 5.55 MB
/*! For license information please see zoom-meeting-ui-6.2.0.min.js.LICENSE.txt */ (function(){var __webpack_modules__={367:function(e){"use strict";e.exports=Redux},594:function(e){"use strict";e.exports=React},621:function(e){"use strict";e.exports=ReduxThunk},893:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;module=__webpack_require__.nmd(module);var _excluded=["deviceId"],_excluded2=["deviceId"],_excluded3=["ptz","cameraDeviceId"],_excluded4=["isSameDevice","cameraDeviceId"],_excluded5=["dimension"],_excluded6=["isFromMainSession"],_excluded7=["imageId","cameraDeviceId"],_excluded8=["logCode","conID","serverErrorCode","exception"],_excluded9=["rate"],_excluded0=["data"],_excluded1=["rate"],_excluded10=["data"],_excluded11=["isActive","activeUserId"],_excluded12=["rate"],_excluded13=["data"],_excluded14=["recaptchaCode","invisibleRecaptcha"],_excluded15=["whoStart","whoStop"],_excluded16=["encoding","rate"],_excluded17=["encoding","rate"],_excluded18=["type"],_excluded19=["errorCode"],_excluded20=["encoding","rate"],_excluded21=["encoding","rate"],_excluded22=["errorCode","type"],_excluded23=["encoding","rate"],_excluded24=["encoding","rate"],_excluded25=["lastCopy"],_excluded26=["imageId","cameraDeviceId","ssid"],_excluded27=["isMaskConfigured","imageSrc"],_excluded28=["file","receiver"],_excluded29=["attendeeId"],_excluded30=["sn"],_excluded31=["sn"],_excluded32=["originFile"],_excluded33=["upload","download","originFile"],_excluded34=["uniqueId"],_excluded35=["highResTimeStampForIdentification"],_excluded36=["upload"],_excluded37=["highResTimeStampForIdentification"],_excluded38=["answers","jid"],_excluded39=["jid","isFromHostOrPanelist"],_excluded40=["transcriptionLang","translatedSetting"],_excluded41=["text"],_excluded42=["logTitle","commonEntity"],_excluded43=["logTitle","commonEntity"],_excluded44=["commonEntity","logTitle"],_excluded45=["tags"],_excluded46=["logEvent","l3Event"],_excluded47=["logEvent","l3Event"],_excluded48=["logEvent","l3Event"],_excluded49=["popoverContainer"],_excluded50=["clientRect"],_excluded51=["clientRect"],_excluded52=["delaySuggestionOnce","onSuggestionState","onSuggestion"],_excluded53=["popoverContainer","placement","popperComponent"],_excluded54=["className","spin","style","size","color","tabIndex","onClick"],_excluded55=["className","spin","style","size","color","tabIndex","onClick"],_excluded56=["className","spin","style","size","color","tabIndex","onClick"],_excluded57=["className","spin","style","size","color","tabIndex","onClick"],_excluded58=["className","spin","style","size","color","tabIndex","onClick"],_excluded59=["className","spin","style","size","color","tabIndex","onClick"],_excluded60=["className","spin","style","size","color","tabIndex","onClick"],_excluded61=["className","spin","style","size","color","tabIndex","onClick"],_excluded62=["className","spin","style","size","color","tabIndex","onClick"],_excluded63=["className","spin","style","size","color","tabIndex","onClick"],_excluded64=["className","spin","style","size","color","tabIndex","onClick"],_excluded65=["className","spin","style","size","color","tabIndex","onClick"],_excluded66=["className","spin","style","size","color","tabIndex","onClick"],_excluded67=["className","spin","style","size","color","tabIndex","onClick"],_excluded68=["className","spin","style","size","color","tabIndex","onClick"],_excluded69=["loading","type","size","disabled","className","children","icon","ghost","htmlType"],_excluded70=["scope","children"],_excluded71=["children"],_excluded72=["children"],_excluded73=["asChild"],_excluded74=["scope","children"],_excluded75=["disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss"],_excluded76=["loop","trapped","onMountAutoFocus","onUnmountAutoFocus"],_excluded77=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],_excluded78=["strategy"],_excluded79=["mainAxis","crossAxis","limiter"],_excluded80=["apply"],_excluded81=["children","width","height"],_excluded82=["__scopePopper","virtualRef"],_excluded83=["__scopePopper","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","onPlaced"],_excluded84=["__scopePopper"],_excluded85=["container"],_excluded86=["__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopId","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus"],_excluded87=["__scopeRovingFocusGroup","focusable","active","tabStopId"],_excluded88=["__scopeMenu"],_excluded89=["forceMount"],_excluded90=["__scopeMenu","loop","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEntryFocus","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","disableOutsideScroll"],_excluded91=["disabled","onSelect"],_excluded92=["__scopeMenu","disabled","textValue"],_excluded93=["__scopeMenu"],_excluded94=["forceMount"],_excluded95=["__scopeDropdownMenu"],_excluded96=["__scopeDropdownMenu","disabled"],_excluded97=["__scopeDropdownMenu"],_excluded98=["__scopeDropdownMenu"],_excluded99=["__scopeDropdownMenu"],_excluded100=["__scopeDropdownMenu"],_excluded101=["__scopeDropdownMenu"],_excluded102=["__scopePopover"],_excluded103=["forceMount"],_excluded104=["__scopePopover","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside"],_excluded105=["__scopePopover"],_excluded106=["children","content","trigger","className","defaultOpen","open","onOpenChange","modal","portalContainer","arrow","arrowClassName"],_excluded107=["decorative","orientation"],_excluded108=["__scopeToolbar","orientation","dir","loop"],_excluded109=["__scopeToolbar"],_excluded110=["__scopeToolbar"],_excluded111=["children","initialValue","onConfirm"],_excluded112=["extension","icon","text","operate","activated","disabled"],_excluded113=["separator"],_excluded114=["startpos","endpos"],_excluded115=["start"],_excluded116=["editor","className"],_excluded117=["lang","ref"],_excluded118=["content","jsonContent","extensions","configuration","mentionHighlight","onTextChanged","className"],_excluded119=["autoLoadResource","onResourceLoaded"],_excluded120=["extensions","editorProps"],_excluded121=["children","editor"],_excluded122=["editor","shown","disableExtensions","popoverClassName","popoverContainer"],_excluded123=["separator"],_excluded124=["lang"],_excluded125=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"],_excluded126=["format"],_excluded127=["children","count","parent","i18nKey","context","tOptions","values","defaults","components","ns","i18n","t","shouldUnescape"],t;function _toArray(e){return _arrayWithHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableRest()}function _regeneratorValues(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(_typeof(e)+" is not iterable")}function _superPropGet(e,t,n,r){var o=_get(_getPrototypeOf(1&r?e.prototype:e),t,n);return 2&r&&"function"==typeof o?function(e){return o.apply(n,e)}:o}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=_superPropBase(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},_get.apply(null,arguments)}function _superPropBase(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function asyncGeneratorStep(e,t,n,r,o,i,a){try{var s=e[i](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){asyncGeneratorStep(i,r,o,a,s,"next",e)}function s(e){asyncGeneratorStep(i,r,o,a,s,"throw",e)}a(void 0)})}}function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,o=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return _wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(n,e)},_wrapNativeSuper(e)}function _construct(e,t,n){if(_isNativeReflectConstruct())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&_setPrototypeOf(o,n.prototype),o}function _isNativeFunction(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){_defineProperty(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function _readOnlyError(e){throw new TypeError('"'+e+'" is read-only')}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _callSuper(e,t,n){return t=_getPrototypeOf(t),_possibleConstructorReturn(e,_isNativeReflectConstruct()?Reflect.construct(t,n||[],_getPrototypeOf(e).constructor):t.apply(e,n))}function _possibleConstructorReturn(e,t){if(t&&("object"==_typeof(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_isNativeReflectConstruct=function(){return!!e})()}function _getPrototypeOf(e){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_getPrototypeOf(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _createForOfIteratorHelper(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _regenerator(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var u=r&&r.prototype instanceof s?r:s,c=Object.create(u.prototype);return _regeneratorDefine2(c,"_invoke",function(n,r,o){var i,s,u,c=0,l=o||[],d=!1,f={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,s=0,u=e,f.n=n,a}};function p(n,r){for(s=n,u=r,t=0;!d&&c&&!o&&t<l.length;t++){var o,i=l[t],p=f.p,h=i[2];n>3?(o=h===r)&&(u=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&p<i[1])?(s=0,f.v=r,f.n=i[1]):p<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,f.n=h,s=0))}if(o||n>1)return a;throw d=!0,r}return function(o,l,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,h),s=l,u=h;(t=s<2?e:u)||!d;){i||(s?s<3?(s>1&&(f.n=-1),p(s,u)):f.n=u:f.v=u);try{if(c=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(t){i=e,s=1,u=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(_regeneratorDefine2(t={},r,function(){return this}),t),d=c.prototype=s.prototype=Object.create(l);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return u.prototype=c,_regeneratorDefine2(d,"constructor",c),_regeneratorDefine2(c,"constructor",u),u.displayName="GeneratorFunction",_regeneratorDefine2(c,o,"GeneratorFunction"),_regeneratorDefine2(d),_regeneratorDefine2(d,o,"Generator"),_regeneratorDefine2(d,r,function(){return this}),_regeneratorDefine2(d,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:i,m:f}})()}function _regeneratorDefine2(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_regeneratorDefine2=function(e,t,n,r){function i(t,n){_regeneratorDefine2(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},_regeneratorDefine2(e,t,n,r)}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_toPropertyKey(r.key),r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){var t=_toPrimitive(e,"string");return"symbol"==_typeof(t)?t:t+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _wrapAsyncGenerator(e){return function(){return new AsyncGenerator(e.apply(this,arguments))}}function AsyncGenerator(e){var t,n;function r(t,n){try{var i=e[t](n),a=i.value,s=a instanceof _OverloadYield;Promise.resolve(s?a.v:a).then(function(n){if(s){var u="return"===t?"return":"next";if(!a.k||n.done)return r(u,n);n=e[u](n).value}o(i.done?"return":"normal",n)},function(e){r("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise(function(i,a){var s={key:e,arg:o,resolve:i,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}function _awaitAsyncGenerator(e){return new _OverloadYield(e,0)}function _asyncGeneratorDelegate(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise(function(n){n(e[t](r))}),{done:!1,value:new _OverloadYield(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function _OverloadYield(e,t){this.v=e,this.k=t}function _asyncIterator(e){var t,n,r,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);o--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new AsyncFromSyncIterator(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function AsyncFromSyncIterator(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return AsyncFromSyncIterator=function(e){this.s=e,this.n=e.next},AsyncFromSyncIterator.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new AsyncFromSyncIterator(e)}AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},AsyncGenerator.prototype.next=function(e){return this._invoke("next",e)},AsyncGenerator.prototype.throw=function(e){return this._invoke("throw",e)},AsyncGenerator.prototype.return=function(e){return this._invoke("return",e)},self,t=function(__WEBPACK_EXTERNAL_MODULE__31099__,__WEBPACK_EXTERNAL_MODULE__42288__,__WEBPACK_EXTERNAL_MODULE__65071__){return function(){var __webpack_modules__={7995:function(e,t,n){e.exports=function(e,t,n,r,o,i,a,s,u,c,l,d){return function(){"use strict";var f={654:function(e,t,n){var r,o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},o.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},u=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.updateRtl=t.doesFocusableExist=t.getCurrentFocusKey=t.updateAllLayouts=t.resume=t.pause=t.navigateByDirection=t.setFocus=t.setKeyMap=t.destroy=t.setThrottle=t.init=t.SpatialNavigation=t.ROOT_FOCUS_KEY=void 0;var l=c(n(150)),d=c(n(117)),f=c(n(747)),p=c(n(23)),h=c(n(842)),_=c(n(682)),m=c(n(784)),v=c(n(432)),g=c(n(67)),y=c(n(35)),b=c(n(119)),E=s(n(964)),S="left",w="right",A="up",C="down",I="enter",T=((r={}).left=[37,"ArrowLeft"],r.up=[38,"ArrowUp"],r.right=[39,"ArrowRight"],r.down=[40,"ArrowDown"],r.enter=[13,"Enter"],r);t.ROOT_FOCUS_KEY="SN:ROOT";var O=["#0FF","#FF0","#F0F"],D={leading:!0,trailing:!1},R=function(){function e(){this.focusableComponents={},this.focusKey=null,this.parentsHavingFocusedChild=[],this.domNodeFocusOptions={},this.enabled=!1,this.nativeMode=!1,this.throttle=0,this.throttleKeypresses=!1,this.useGetBoundingClientRect=!1,this.shouldFocusDOMNode=!1,this.shouldUseNativeEvents=!1,this.writingDirection=b.default.LTR,this.pressedKeys={},this.paused=!1,this.keyDownEventListener=null,this.keyUpEventListener=null,this.keyMap=T,this.pause=this.pause.bind(this),this.resume=this.resume.bind(this),this.setFocus=this.setFocus.bind(this),this.updateAllLayouts=this.updateAllLayouts.bind(this),this.navigateByDirection=this.navigateByDirection.bind(this),this.init=this.init.bind(this),this.setThrottle=this.setThrottle.bind(this),this.destroy=this.destroy.bind(this),this.setKeyMap=this.setKeyMap.bind(this),this.getCurrentFocusKey=this.getCurrentFocusKey.bind(this),this.doesFocusableExist=this.doesFocusableExist.bind(this),this.updateRtl=this.updateRtl.bind(this),this.setFocusDebounced=(0,l.default)(this.setFocus,300,{leading:!1,trailing:!0}),this.debug=!1,this.visualDebugger=null,this.logIndex=0,this.distanceCalculationMethod="corners"}return e.getCutoffCoordinate=function(e,t,n,r,o){var i=e?r.top:o===b.default.LTR?r.left:r.right,a=e?r.bottom:o===b.default.LTR?r.right:r.left;return t?n?i:a:n?a:i},e.getRefCorners=function(e,t,n){var r={a:{x:0,y:0},b:{x:0,y:0}};switch(e){case A:var o=t?n.bottom:n.top;r.a={x:n.left,y:o},r.b={x:n.right,y:o};break;case C:o=t?n.top:n.bottom,r.a={x:n.left,y:o},r.b={x:n.right,y:o};break;case S:var i=t?n.right:n.left;r.a={x:i,y:n.top},r.b={x:i,y:n.bottom};break;case w:i=t?n.left:n.right,r.a={x:i,y:n.top},r.b={x:i,y:n.bottom}}return r},e.isAdjacentSlice=function(e,t,n){var r=e.a,o=e.b,i=t.a,a=t.b,s=n?"x":"y",u=r[s],c=o[s],l=i[s],d=a[s],f=.2*(c-u);return Math.max(0,Math.min(c,d)-Math.max(u,l))>=f},e.getPrimaryAxisDistance=function(e,t,n){var r=e.a,o=t.a,i=n?"y":"x";return Math.abs(o[i]-r[i])},e.getSecondaryAxisDistance=function(e,t,n,r,o){if(o)return o(e,t,n,r);var i=e.a,a=e.b,s=t.a,u=t.b,c=n?"x":"y",l=i[c],d=a[c],f=s[c],p=u[c];if("center"===r){var h=(l+d)/2,_=(f+p)/2;return Math.abs(h-_)}if("edges"===r){var m=Math.min(l,d),v=Math.min(f,p),g=Math.max(l,d),y=Math.max(f,p),b=Math.abs(m-v),E=Math.abs(g-y);return Math.min(b,E)}var S=[Math.abs(f-l),Math.abs(f-d),Math.abs(p-l),Math.abs(p-d)];return Math.min.apply(Math,S)},e.prototype.sortSiblingsByPriority=function(t,n,r,o){var i=this,a=r===C||r===A,s=e.getRefCorners(r,!1,n);return(0,v.default)(t,function(t){var n=e.getRefCorners(r,!0,t.layout),u=e.isAdjacentSlice(s,n,a),c=u?e.getPrimaryAxisDistance:e.getSecondaryAxisDistance,l=u?e.getSecondaryAxisDistance:e.getPrimaryAxisDistance,d=c(s,n,a,i.distanceCalculationMethod,i.customDistanceCalculationFunction),f=l(s,n,a,i.distanceCalculationMethod,i.customDistanceCalculationFunction),p=5*d+f,h=(p+1)/(u?5:1);return i.log("smartNavigate","distance (primary, secondary, total weighted) for ".concat(t.focusKey," relative to ").concat(o," is"),d,f,p),i.log("smartNavigate","priority for ".concat(t.focusKey," relative to ").concat(o," is"),h),i.visualDebugger&&(i.visualDebugger.drawPoint(n.a.x,n.a.y,"yellow",6),i.visualDebugger.drawPoint(n.b.x,n.b.y,"yellow",6)),h})},e.prototype.init=function(e){var t=this,n=void 0===e?{}:e,r=n.debug,o=void 0!==r&&r,i=n.visualDebug,a=void 0!==i&&i,s=n.nativeMode,u=void 0!==s&&s,c=n.throttle,l=void 0===c?0:c,d=n.throttleKeypresses,f=void 0!==d&&d,p=n.useGetBoundingClientRect,h=void 0!==p&&p,_=n.shouldFocusDOMNode,v=void 0!==_&&_,g=n.domNodeFocusOptions,E=void 0===g?{}:g,S=n.shouldUseNativeEvents,w=void 0!==S&&S,A=n.rtl,C=void 0!==A&&A,I=n.distanceCalculationMethod,T=void 0===I?"corners":I,O=n.customDistanceCalculationFunction,D=void 0===O?void 0:O;if(!this.enabled&&(this.domNodeFocusOptions=E,this.enabled=!0,this.nativeMode=u,this.throttleKeypresses=f,this.useGetBoundingClientRect=h,this.shouldFocusDOMNode=v&&!u,this.shouldUseNativeEvents=w,this.writingDirection=C?b.default.RTL:b.default.LTR,this.distanceCalculationMethod=T,this.customDistanceCalculationFunction=D,this.debug=o,!this.nativeMode&&(Number.isInteger(l)&&l>0&&(this.throttle=l),this.bindEventHandlers(),a))){this.visualDebugger=new y.default(this.writingDirection);var R=function(){requestAnimationFrame(function(){t.visualDebugger.clearLayouts(),(0,m.default)(t.focusableComponents,function(e,n){t.visualDebugger.drawLayout(e.layout,n,e.parentFocusKey)}),R()})};R()}},e.prototype.setThrottle=function(e){var t=void 0===e?{}:e,n=t.throttle,r=void 0===n?0:n,o=t.throttleKeypresses,i=void 0!==o&&o;this.throttleKeypresses=i,this.nativeMode||(this.unbindEventHandlers(),Number.isInteger(r)&&(this.throttle=r),this.bindEventHandlers())},e.prototype.destroy=function(){this.enabled&&(this.enabled=!1,this.nativeMode=!1,this.throttle=0,this.throttleKeypresses=!1,this.focusKey=null,this.parentsHavingFocusedChild=[],this.focusableComponents={},this.paused=!1,this.keyMap=T,this.unbindEventHandlers())},e.prototype.getEventType=function(e){return(0,p.default)(this.getKeyMap(),function(t){return t.includes(e)})},e.getKeyCode=function(e){return e.keyCode||e.code||e.key},e.prototype.bindEventHandlers=function(){var t=this;"undefined"!=typeof window&&window.addEventListener&&(this.keyDownEventListener=function(n){if(!0!==t.paused){t.debug&&(t.logIndex+=1);var r=e.getKeyCode(n),o=t.getEventType(r);if(o){t.pressedKeys[o]=t.pressedKeys[o]?t.pressedKeys[o]+1:1,t.shouldUseNativeEvents||(n.preventDefault(),n.stopPropagation());var i={pressedKeys:t.pressedKeys};if(o===I&&t.focusKey)t.onEnterPress(i);else{var a=!1===t.onArrowPress(o,i);if(t.visualDebugger&&t.visualDebugger.clear(),a)t.log("keyDownEventListener","default navigation prevented");else{var s=(0,p.default)(t.getKeyMap(),function(e){return e.includes(r)});t.smartNavigate(s,null,{event:n})}}}}},this.throttle&&(this.keyDownEventListenerThrottled=(0,g.default)(this.keyDownEventListener.bind(this),this.throttle,D)),this.keyUpEventListener=function(n){var r=e.getKeyCode(n),o=t.getEventType(r);delete t.pressedKeys[o],t.throttle&&!t.throttleKeypresses&&t.keyDownEventListenerThrottled.cancel(),o===I&&t.focusKey&&t.onEnterRelease(),!t.focusKey||o!==S&&o!==w&&o!==A&&o!==C||t.onArrowRelease(o)},window.addEventListener("keyup",this.keyUpEventListener),window.addEventListener("keydown",this.throttle?this.keyDownEventListenerThrottled:this.keyDownEventListener))},e.prototype.unbindEventHandlers=function(){if("undefined"!=typeof window&&window.removeEventListener){window.removeEventListener("keyup",this.keyUpEventListener),this.keyUpEventListener=null;var e=this.throttle?this.keyDownEventListenerThrottled:this.keyDownEventListener;window.removeEventListener("keydown",e),this.keyDownEventListener=null}},e.prototype.onEnterPress=function(e){var t=this.focusableComponents[this.focusKey];t?t.focusable?t.onEnterPress&&t.onEnterPress(e):this.log("onEnterPress","componentNotFocusable"):this.log("onEnterPress","noComponent")},e.prototype.onEnterRelease=function(){var e=this.focusableComponents[this.focusKey];e?e.focusable?e.onEnterRelease&&e.onEnterRelease():this.log("onEnterRelease","componentNotFocusable"):this.log("onEnterRelease","noComponent")},e.prototype.onArrowPress=function(e,t){var n=this.focusableComponents[this.focusKey];if(n)return n&&n.onArrowPress&&n.onArrowPress(e,t);this.log("onArrowPress","noComponent")},e.prototype.onArrowRelease=function(e){var t=this.focusableComponents[this.focusKey];t?t.focusable?t.onArrowRelease&&t.onArrowRelease(e):this.log("onArrowRelease","componentNotFocusable"):this.log("onArrowRelease","noComponent")},e.prototype.navigateByDirection=function(e,t){if(!0!==this.paused&&this.enabled&&!this.nativeMode){var n=[C,A,S,w];n.includes(e)?(this.log("navigateByDirection","direction",e),this.smartNavigate(e,null,t)):this.log("navigateByDirection","Invalid direction. You passed: `".concat(e,"`, but you can use only these: "),n)}},e.prototype.smartNavigate=function(t,n,r){var o=this;if(!this.nativeMode){var i=t===C||t===A,a=t===C||(this.writingDirection===b.default.LTR?t===w:t===S);this.log("smartNavigate","direction",t),this.log("smartNavigate","fromParentFocusKey",n),this.log("smartNavigate","this.focusKey",this.focusKey),n||(0,m.default)(this.focusableComponents,function(e){e.layoutUpdated=!1});var s=this.focusableComponents[n||this.focusKey];if(n||s){if(this.log("smartNavigate","currentComponent",s?s.focusKey:void 0,s?s.node:void 0,s),s){this.updateLayout(s.focusKey);var u=s.parentFocusKey,c=s.focusKey,l=s.layout,d=e.getCutoffCoordinate(i,a,!1,l,this.writingDirection),p=(0,f.default)(this.focusableComponents,function(t){if(t.parentFocusKey===u&&t.focusable){o.updateLayout(t.focusKey);var n=e.getCutoffCoordinate(i,a,!0,t.layout,o.writingDirection);return i||o.writingDirection===b.default.LTR?a?n>=d:n<=d:a?n<=d:n>=d}return!1});if(this.debug&&(this.log("smartNavigate","currentCutoffCoordinate",d),this.log("smartNavigate","siblings","".concat(p.length," elements:"),p.map(function(e){return e.focusKey}).join(", "),p.map(function(e){return e.node}),p.map(function(e){return e}))),this.visualDebugger){var _=e.getRefCorners(t,!1,l);this.visualDebugger.drawPoint(_.a.x,_.a.y),this.visualDebugger.drawPoint(_.b.x,_.b.y)}var v=this.sortSiblingsByPriority(p,l,t,c),g=(0,h.default)(v);if(this.log("smartNavigate","nextComponent",g?g.focusKey:void 0,g?g.node:void 0,g),g)this.setFocus(g.focusKey,r);else{var y=this.focusableComponents[u],E=(null==y?void 0:y.isFocusBoundary)?y.focusBoundaryDirections||[t]:[];y&&E.includes(t)||this.smartNavigate(t,u,r)}}}else this.setFocus(this.getForcedFocusKey())}},e.prototype.saveLastFocusedChildKey=function(e,t){e&&(this.log("saveLastFocusedChildKey","".concat(e.focusKey," lastFocusedChildKey set"),t),e.lastFocusedChildKey=t)},e.prototype.log=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];this.debug&&console.log.apply(console,u(["%c".concat(e,"%c").concat(t),"background: ".concat(O[this.logIndex%O.length],"; color: black; padding: 1px 5px;"),"background: #333; color: #BADA55; padding: 1px 5px;"],n,!1))},e.prototype.getCurrentFocusKey=function(){return this.focusKey},e.prototype.getForcedFocusKey=function(){var e,n=(0,f.default)(this.focusableComponents,function(e){return e.focusable&&e.forceFocus}),r=this.sortSiblingsByPriority(n,{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:null},"down",t.ROOT_FOCUS_KEY);return null===(e=(0,h.default)(r))||void 0===e?void 0:e.focusKey},e.prototype.getNextFocusKey=function(e){var t=this,n=this.focusableComponents[e];if(!n||this.nativeMode)return e;var r=(0,f.default)(this.focusableComponents,function(t){return t.parentFocusKey===e&&t.focusable});if(r.length>0){var o=n.lastFocusedChildKey,i=n.preferredChildFocusKey;if(this.log("getNextFocusKey","lastFocusedChildKey is",o),this.log("getNextFocusKey","preferredChildFocusKey is",i),o&&n.saveLastFocusedChild&&this.isParticipatingFocusableComponent(o))return this.log("getNextFocusKey","lastFocusedChildKey will be focused",o),this.getNextFocusKey(o);if(i&&this.isParticipatingFocusableComponent(i))return this.log("getNextFocusKey","preferredChildFocusKey will be focused",i),this.getNextFocusKey(i);r.forEach(function(e){return t.updateLayout(e.focusKey)});var a=function(e,t){var n=t===b.default.LTR?function(e){var t=e.layout;return Math.abs(t.left)+Math.abs(t.top)}:function(e){var t=e.layout;return Math.abs(window.innerWidth-t.right)+Math.abs(t.top)},r=(0,v.default)(e,n);return(0,h.default)(r)}(r,this.writingDirection).focusKey;return this.log("getNextFocusKey","childKey will be focused",a),this.getNextFocusKey(a)}return this.log("getNextFocusKey","targetFocusKey",e),e},e.prototype.addFocusable=function(e){var t=e.focusKey,n=e.node,r=e.parentFocusKey,o=e.onEnterPress,i=e.onEnterRelease,a=e.onArrowPress,s=e.onArrowRelease,u=e.onFocus,c=e.onBlur,l=e.saveLastFocusedChild,d=e.trackChildren,f=e.onUpdateFocus,p=e.onUpdateHasFocusedChild,h=e.preferredChildFocusKey,_=e.autoRestoreFocus,m=e.forceFocus,v=e.focusable,g=e.isFocusBoundary,y=e.focusBoundaryDirections;if(this.focusableComponents[t]={focusKey:t,node:n,parentFocusKey:r,onEnterPress:o,onEnterRelease:i,onArrowPress:a,onArrowRelease:s,onFocus:u,onBlur:c,onUpdateFocus:f,onUpdateHasFocusedChild:p,saveLastFocusedChild:l,trackChildren:d,preferredChildFocusKey:h,focusable:v,isFocusBoundary:g,focusBoundaryDirections:y,autoRestoreFocus:_,forceFocus:m,lastFocusedChildKey:null,layout:{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0,node:n},layoutUpdated:!1},n||console.warn('Component added without a node reference. This will result in its coordinates being empty and may cause lost focus. Check the "ref" passed to "useFocusable": ',this.focusableComponents[t]),!this.nativeMode){this.updateLayout(t),this.log("addFocusable","Component added: ",this.focusableComponents[t]),t===this.focusKey&&this.setFocus(h||t);for(var b=this.focusableComponents[this.focusKey];b;){if(b.parentFocusKey===t){this.updateParentsHasFocusedChild(this.focusKey,{}),this.updateParentsLastFocusedChild(this.focusKey);break}b=this.focusableComponents[b.parentFocusKey]}}},e.prototype.removeFocusable=function(e){var t=e.focusKey,n=this.focusableComponents[t];if(n){var r=n.parentFocusKey;(0,n.onUpdateFocus)(!1),this.log("removeFocusable","Component removed: ",n),delete this.focusableComponents[t];var o=this.parentsHavingFocusedChild.includes(t);this.parentsHavingFocusedChild=this.parentsHavingFocusedChild.filter(function(e){return e!==t});var i=this.focusableComponents[r],a=t===this.focusKey;if(i&&i.lastFocusedChildKey===t&&(i.lastFocusedChildKey=null),this.nativeMode)return;(a||o)&&i&&i.autoRestoreFocus&&(this.log("removeFocusable","Component removed: ",a?"Leaf component":"Container component","Auto restoring focus to: ",r),this.setFocusDebounced(r))}},e.prototype.getNodeLayoutByFocusKey=function(e){var t=this.focusableComponents[e];return t?(this.updateLayout(t.focusKey),t.layout):null},e.prototype.setCurrentFocusedKey=function(e,t){var n,r,o,i;if(this.isFocusableComponent(this.focusKey)&&e!==this.focusKey){var a=this.focusableComponents[this.focusKey];a.onUpdateFocus(!1),a.onBlur(this.getNodeLayoutByFocusKey(this.focusKey),t),null===(r=null===(n=a.node)||void 0===n?void 0:n.removeAttribute)||void 0===r||r.call(n,"data-focused"),this.log("setCurrentFocusedKey","onBlur",a)}if(this.focusKey=e,this.isFocusableComponent(this.focusKey)){var s=this.focusableComponents[this.focusKey];this.shouldFocusDOMNode&&s.node&&s.node.focus(this.domNodeFocusOptions),null===(i=null===(o=s.node)||void 0===o?void 0:o.setAttribute)||void 0===i||i.call(o,"data-focused","true"),s.onUpdateFocus(!0),s.onFocus(this.getNodeLayoutByFocusKey(this.focusKey),t),this.log("setCurrentFocusedKey","onFocus",s)}},e.prototype.updateParentsHasFocusedChild=function(e,t){for(var n=this,r=[],o=this.focusableComponents[e];o;){var i=o.parentFocusKey,a=this.focusableComponents[i];if(a){var s=a.focusKey;r.push(s)}o=a}var u=(0,d.default)(this.parentsHavingFocusedChild,r),c=(0,d.default)(r,this.parentsHavingFocusedChild);(0,_.default)(u,function(e){var r=n.focusableComponents[e];r&&r.trackChildren&&r.onUpdateHasFocusedChild(!1),n.onIntermediateNodeBecameBlurred(e,t)}),(0,_.default)(c,function(e){var r=n.focusableComponents[e];r&&r.trackChildren&&r.onUpdateHasFocusedChild(!0),n.onIntermediateNodeBecameFocused(e,t)}),this.parentsHavingFocusedChild=r},e.prototype.updateParentsLastFocusedChild=function(e){for(var t=this.focusableComponents[e];t;){var n=t.parentFocusKey,r=this.focusableComponents[n];r&&this.saveLastFocusedChildKey(r,t.focusKey),t=r}},e.prototype.getKeyMap=function(){return this.keyMap},e.prototype.setKeyMap=function(e){this.keyMap=o(o({},this.getKeyMap()),function(e){var t={};return Object.entries(e).forEach(function(e){var n=e[0],r=e[1];t[n]=Array.isArray(r)?r:[r]}),t}(e))},e.prototype.isFocusableComponent=function(e){return!!this.focusableComponents[e]},e.prototype.isParticipatingFocusableComponent=function(e){return this.isFocusableComponent(e)&&this.focusableComponents[e].focusable},e.prototype.onIntermediateNodeBecameFocused=function(e,t){this.isParticipatingFocusableComponent(e)&&this.focusableComponents[e].onFocus(this.getNodeLayoutByFocusKey(e),t)},e.prototype.onIntermediateNodeBecameBlurred=function(e,t){this.isParticipatingFocusableComponent(e)&&this.focusableComponents[e].onBlur(this.getNodeLayoutByFocusKey(e),t)},e.prototype.pause=function(){this.paused=!0},e.prototype.resume=function(){this.paused=!1},e.prototype.setFocus=function(e,n){if(void 0===n&&(n={}),this.setFocusDebounced.cancel(),this.enabled){this.log("setFocus","focusKey",e),e&&e!==t.ROOT_FOCUS_KEY||(e=this.getForcedFocusKey());var r=this.getNextFocusKey(e);this.log("setFocus","newFocusKey",r),this.setCurrentFocusedKey(r,n),this.updateParentsHasFocusedChild(r,n),this.updateParentsLastFocusedChild(r)}},e.prototype.updateAllLayouts=function(){var e=this;this.enabled&&!this.nativeMode&&(0,m.default)(this.focusableComponents,function(t,n){e.updateLayout(n)})},e.prototype.updateLayout=function(e){var t=this.focusableComponents[e];if(t&&!this.nativeMode&&!t.layoutUpdated){var n=t.node,r=this.useGetBoundingClientRect?(0,E.getBoundingClientRect)(n):(0,E.default)(n);t.layout=o(o({},r),{node:n})}},e.prototype.updateFocusable=function(e,t){var n=t.node,r=t.preferredChildFocusKey,o=t.focusable,i=t.isFocusBoundary,a=t.focusBoundaryDirections,s=t.onEnterPress,u=t.onEnterRelease,c=t.onArrowPress,l=t.onFocus,d=t.onBlur;if(!this.nativeMode){var f=this.focusableComponents[e];f&&(f.preferredChildFocusKey=r,f.focusable=o,f.isFocusBoundary=i,f.focusBoundaryDirections=a,f.onEnterPress=s,f.onEnterRelease=u,f.onArrowPress=c,f.onFocus=l,f.onBlur=d,n&&(f.node=n))}},e.prototype.isNativeMode=function(){return this.nativeMode},e.prototype.doesFocusableExist=function(e){return!!this.focusableComponents[e]},e.prototype.updateRtl=function(e){this.writingDirection=e?b.default.RTL:b.default.LTR},e}();t.SpatialNavigation=new R,t.init=t.SpatialNavigation.init,t.setThrottle=t.SpatialNavigation.setThrottle,t.destroy=t.SpatialNavigation.destroy,t.setKeyMap=t.SpatialNavigation.setKeyMap,t.setFocus=t.SpatialNavigation.setFocus,t.navigateByDirection=t.SpatialNavigation.navigateByDirection,t.pause=t.SpatialNavigation.pause,t.resume=t.SpatialNavigation.resume,t.updateAllLayouts=t.SpatialNavigation.updateAllLayouts,t.getCurrentFocusKey=t.SpatialNavigation.getCurrentFocusKey,t.doesFocusableExist=t.SpatialNavigation.doesFocusableExist,t.updateRtl=t.SpatialNavigation.updateRtl},35:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(n(119)),i="undefined"!=typeof window&&window.document,a=i?window.innerWidth:0,s=i?window.innerHeight:0,u=function(){function e(t){i&&(this.debugCtx=e.createCanvas("sn-debug","1010",t),this.layoutsCtx=e.createCanvas("sn-layouts","1000",t),this.writingDirection=t)}return e.createCanvas=function(e,t,n){var r=document.querySelector("#".concat(e))||document.createElement("canvas");r.setAttribute("id",e),r.setAttribute("dir",n===o.default.LTR?"ltr":"rtl");var i=r.getContext("2d");return r.style.zIndex=t,r.style.position="fixed",r.style.top="0",r.style.left="0",document.body.appendChild(r),r.width=a,r.height=s,i},e.prototype.clear=function(){i&&this.debugCtx.clearRect(0,0,a,s)},e.prototype.clearLayouts=function(){i&&this.layoutsCtx.clearRect(0,0,a,s)},e.prototype.drawLayout=function(e,t,n){if(i){this.layoutsCtx.strokeStyle="green",this.layoutsCtx.strokeRect(e.left,e.top,e.width,e.height),this.layoutsCtx.font="8px monospace",this.layoutsCtx.fillStyle="red";var r=this.writingDirection===o.default.LTR?"left":"right",a=e[r];this.layoutsCtx.fillText(t,a,e.top+10),this.layoutsCtx.fillText(n,a,e.top+25),this.layoutsCtx.fillText("".concat(r,": ").concat(a),a,e.top+40),this.layoutsCtx.fillText("top: ".concat(e.top),a,e.top+55)}},e.prototype.drawPoint=function(e,t,n,r){void 0===n&&(n="blue"),void 0===r&&(r=10),i&&(this.debugCtx.strokeStyle=n,this.debugCtx.lineWidth=3,this.debugCtx.strokeRect(e-r/2,t-r/2,r,r))},e}();t.default=u},119:function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(n||(n={})),t.default=n},607:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(79),t),o(n(445),t),o(n(654),t)},964:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getBoundingClientRect=void 0;var n=function(e){for(var t=e.offsetParent,n=e.offsetHeight,r=e.offsetWidth,o=e.offsetLeft,i=e.offsetTop;t&&1===t.nodeType;)o+=t.offsetLeft-t.scrollLeft,i+=t.offsetTop-t.scrollTop,t=t.offsetParent;return{height:n,left:o,top:i,width:r}};t.default=function(e){var t=e&&e.parentElement;if(e&&t){var r=n(t),o=n(e),i=o.height,a=o.left,s=o.top,u=o.width;return{x:a-r.left,y:s-r.top,width:u,height:i,left:a,top:s,get right(){return this.left+this.width},get bottom(){return this.top+this.height}}}return{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0}},t.getBoundingClientRect=function(e){if(e&&e.getBoundingClientRect){var t=e.getBoundingClientRect();return{x:t.x,y:t.y,width:t.width,height:t.height,left:t.left,top:t.top,get right(){return this.left+this.width},get bottom(){return this.top+this.height}}}return{x:0,y:0,width:0,height:0,left:0,top:0,right:0,bottom:0}}},445:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.useFocusContext=t.FocusContext=void 0;var r=n(156),o=n(654);t.FocusContext=(0,r.createContext)(o.ROOT_FOCUS_KEY),t.FocusContext.displayName="FocusContext",t.useFocusContext=function(){return(0,r.useContext)(t.FocusContext)}},79:function(e,t,n){var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useFocusable=void 0;var o=n(156),i=r(n(604)),a=r(n(461)),s=n(654),u=n(445);t.useFocusable=function(e){var t=void 0===e?{}:e,n=t.focusable,r=void 0===n||n,c=t.saveLastFocusedChild,l=void 0===c||c,d=t.trackChildren,f=void 0!==d&&d,p=t.autoRestoreFocus,h=void 0===p||p,_=t.forceFocus,m=void 0!==_&&_,v=t.isFocusBoundary,g=void 0!==v&&v,y=t.focusBoundaryDirections,b=t.focusKey,E=t.preferredChildFocusKey,S=t.onEnterPress,w=void 0===S?i.default:S,A=t.onEnterRelease,C=void 0===A?i.default:A,I=t.onArrowPress,T=void 0===I?function(){return!0}:I,O=t.onArrowRelease,D=void 0===O?i.default:O,R=t.onFocus,k=void 0===R?i.default:R,N=t.onBlur,P=void 0===N?i.default:N,M=t.extraProps,L=(0,o.useCallback)(function(e){w(M,e)},[w,M]),x=(0,o.useCallback)(function(){C(M)},[C,M]),B=(0,o.useCallback)(function(e,t){return T(e,M,t)},[M,T]),F=(0,o.useCallback)(function(e){D(e,M)},[D,M]),U=(0,o.useCallback)(function(e,t){k(e,M,t)},[M,k]),j=(0,o.useCallback)(function(e,t){P(e,M,t)},[M,P]),H=(0,o.useRef)(null),V=(0,o.useState)(!1),W=V[0],z=V[1],G=(0,o.useState)(!1),q=G[0],K=G[1],Z=(0,u.useFocusContext)(),Y=(0,o.useMemo)(function(){return b||(0,a.default)("sn:focusable-item-")},[b]),J=(0,o.useCallback)(function(e){void 0===e&&(e={}),s.SpatialNavigation.setFocus(Y,e)},[Y]);return(0,o.useEffect)(function(){var e=H.current;return s.SpatialNavigation.addFocusable({focusKey:Y,node:e,parentFocusKey:Z,preferredChildFocusKey:E,onEnterPress:L,onEnterRelease:x,onArrowPress:B,onArrowRelease:F,onFocus:U,onBlur:j,onUpdateFocus:function(e){return void 0===e&&(e=!1),z(e)},onUpdateHasFocusedChild:function(e){return void 0===e&&(e=!1),K(e)},saveLastFocusedChild:l,trackChildren:f,isFocusBoundary:g,focusBoundaryDirections:y,autoRestoreFocus:h,forceFocus:m,focusable:r}),function(){s.SpatialNavigation.removeFocusable({focusKey:Y})}},[]),(0,o.useEffect)(function(){var e=H.current;s.SpatialNavigation.updateFocusable(Y,{node:e,preferredChildFocusKey:E,focusable:r,isFocusBoundary:g,focusBoundaryDirections:y,onEnterPress:L,onEnterRelease:x,onArrowPress:B,onArrowRelease:F,onFocus:U,onBlur:j})},[Y,E,r,g,y,L,x,B,F,U,j]),{ref:H,focusSelf:J,focused:W,hasFocusedChild:q,focusKey:Y}}},150:function(t){t.exports=e},117:function(e){e.exports=t},747:function(e){e.exports=n},23:function(e){e.exports=r},842:function(e){e.exports=o},682:function(e){e.exports=i},784:function(e){e.exports=a},604:function(e){e.exports=s},432:function(e){e.exports=u},67:function(e){e.exports=c},461:function(e){e.exports=l},156:function(e){e.exports=d}},p={};return function e(t){var n=p[t];if(void 0!==n)return n.exports;var r=p[t]={exports:{}};return f[t].call(r.exports,r,r.exports,e),r.exports}(607)}()}(n(38221),n(66245),n(87612),n(20826),n(56170),n(39754),n(33215),n(63950),n(33031),n(7350),n(97200),n(31099))},18045:function(e){"use strict";e.exports=function(e,t){for(var n=new Array(arguments.length-1),r=0,o=2,i=!0;o<arguments.length;)n[r++]=arguments[o++];return new Promise(function(o,a){n[r]=function(e){if(i)if(i=!1,e)a(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];o.apply(null,t)}};try{e.apply(t||null,n)}catch(s){i&&(i=!1,a(s))}})}},8839:function(e,t){"use strict";var n=t;n.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var r=new Array(64),o=new Array(123),i=0;i<64;)o[r[i]=i<26?i+65:i<52?i+71:i<62?i-4:i-59|43]=i++;n.encode=function(e,t,n){for(var o,i=null,a=[],s=0,u=0;t<n;){var c=e[t++];switch(u){case 0:a[s++]=r[c>>2],o=(3&c)<<4,u=1;break;case 1:a[s++]=r[o|c>>4],o=(15&c)<<2,u=2;break;case 2:a[s++]=r[o|c>>6],a[s++]=r[63&c],u=0}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return u&&(a[s++]=r[o],a[s++]=61,1===u&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var a="invalid encoding";n.decode=function(e,t,n){for(var r,i=n,s=0,u=0;u<e.length;){var c=e.charCodeAt(u++);if(61===c&&s>1)break;if(void 0===(c=o[c]))throw Error(a);switch(s){case 0:r=c,s=1;break;case 1:t[n++]=r<<2|(48&c)>>4,r=c,s=2;break;case 2:t[n++]=(15&r)<<4|(60&c)>>2,r=c,s=3;break;case 3:t[n++]=(3&r)<<6|c,s=0}}if(1===s)throw Error(a);return n-i},n.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}},24358:function(e){"use strict";function t(){this._listeners={}}e.exports=t,t.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},t.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},t.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this}},49410:function(e){"use strict";function t(e){return"undefined"!==typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(e,r,o){t[0]=e,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function a(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function s