0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.136.18.192


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/20.99f7d304.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{1058:function(e,t,n){"use strict";n.r(t),n.d(t,"HotKeys",function(){return Ye}),n.d(t,"GlobalHotKeys",function(){return Xe}),n.d(t,"IgnoreKeys",function(){return tt}),n.d(t,"ObserveKeys",function(){return nt}),n.d(t,"withHotKeys",function(){return $e}),n.d(t,"withIgnoreKeys",function(){return ot}),n.d(t,"withObserveKeys",function(){return it}),n.d(t,"configure",function(){return rt}),n.d(t,"getApplicationKeyMap",function(){return st}),n.d(t,"recordKeyCombination",function(){return at});var o=n(4),i=n.n(o),r=n(2),s=n.n(r);function a(e){return(a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},o=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),o.forEach(function(t){d(e,t,n[t])})}return e}function y(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}}),t&&p(e,t)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e,t,n){return(g=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&p(i,n.prototype),i}).apply(null,arguments)}function m(e){var t="function"===typeof Map?new Map:void 0;return(m=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return g(e,arguments,v(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),p(o,e)})(e)}function _(e,t){if(null==e)return{};var n,o,i=function(e,t){if(null==e)return{};var n,o,i={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function k(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function b(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?k(e):t}function E(e,t,n){return(E="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var o=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(o){var i=Object.getOwnPropertyDescriptor(o,t);return i.get?i.get.call(n):i.value}})(e,t,n||e)}function K(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function C(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;return e.reduce(function(e,n){return e[n]=t||{value:n},e},{})}var I={logLevel:"warn",defaultKeyEvent:"keydown",defaultComponent:"div",defaultTabIndex:"-1",ignoreTags:["input","select","textarea"],enableHardSequences:!1,ignoreKeymapAndHandlerChangesByDefault:!0,ignoreEventsCondition:function(e){var t=e.target;if(t&&t.tagName){var n=t.tagName.toLowerCase();return w.option("_ignoreTagsDict")[n]||t.isContentEditable}return!1},ignoreRepeatedEventsWhenKeyHeldDown:!0,simulateMissingKeyPressEvents:!0,stopEventPropagationAfterHandling:!0,stopEventPropagationAfterIgnoring:!0,allowCombinationSubmatches:!1,customKeyCodes:{}},S=f({},I);S._ignoreTagsDict=C(S.ignoreTags,!0);var w=function(){function e(){u(this,e)}return l(e,null,[{key:"init",value:function(e){var t=this,n=e.ignoreTags,o=e.customKeyCodes;n&&(e._ignoreTagsDict=C(e.ignoreTags)),o&&(e._customKeyNamesDict=C(Object.values(e.customKeyCodes))),-1!==["verbose","debug","info"].indexOf(e.logLevel)&&console.warn("React HotKeys: You have requested log level '".concat(e.logLevel,"' but for performance reasons, logging below severity level 'warning' is disabled in production. Please use the development build for complete logs.")),Object.keys(e).forEach(function(n){t.set(n,e[n])})}},{key:"set",value:function(e,t){S[e]=t}},{key:"reset",value:function(e){S[e]=I[e]}},{key:"option",value:function(e){return S[e]}}]),e}(),P=function(){function e(){var t=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"warn";u(this,e),d(this,"verbose",this.noop),d(this,"debug",this.noop),d(this,"info",this.noop),d(this,"warn",this.noop),d(this,"error",this.noop),this.logLevel=this.constructor.levels[n],this.logLevel>=this.constructor.levels.error&&(this.error=console.error,this.logLevel>=this.constructor.levels.warn&&(this.warn=console.warn,["info","debug","verbose"].some(function(e){return!(t.logLevel>=t.constructor.levels[e])||(t[e]=console.log,!1)})))}return l(e,[{key:"noop",value:function(){}}]),e}();d(P,"logIcons",["\ud83d\udcd5","\ud83d\udcd7","\ud83d\udcd8","\ud83d\udcd9"]),d(P,"componentIcons",["\ud83d\udd3a","\u2b50\ufe0f","\ud83d\udd37","\ud83d\udd36","\u2b1b\ufe0f"]),d(P,"eventIcons",["\u2764\ufe0f","\ud83d\udc9a","\ud83d\udc99","\ud83d\udc9b","\ud83d\udc9c","\ud83e\udde1"]),d(P,"levels",{none:0,error:1,warn:2,info:3,debug:4,verbose:5});var O={keydown:0,keypress:1,keyup:2},M={Shift:["shiftKey"],Meta:["metaKey"],Control:["ctrlKey"],Alt:["altKey"]},T={"`":["~"],1:["!"],2:["@",'"'],3:["#","\xa3"],4:["$"],5:["%"],6:["^"],7:["&"],8:["*"],9:["("],0:[")"],"-":["_"],"=":["plus"],";":[":"],"'":['"',"@"],",":["<"],".":[">"],"/":["?"],"\\":["|"],"[":["{"],"]":["}"],"#":["~"]};function H(e){return T[e]||[1===e.length?e.toUpperCase():e]}function x(e,t){return e.hasOwnProperty(t)}function A(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(n,o){var i=e[o];return i.forEach(function(e){x(n,e)||(n[e]=[]),n[e].push(o)}),t.includeOriginal&&(!x(n,o)&&(n[o]=[]),n[o]=[].concat(K(n[o]),K(i))),n},{})}var L=A(T);function F(e){return L[e]||[1===e.length?e.toLowerCase():e]}var N=A({},{includeOriginal:!0});function D(e){return"string"==typeof e}var j={tab:"Tab",capslock:"CapsLock",shift:"Shift",meta:"Meta",alt:"Alt",ctrl:"Control",space:" ",spacebar:" ",escape:"Escape",esc:"Escape",left:"ArrowLeft",right:"ArrowRight",up:"ArrowUp",down:"ArrowDown",return:"Enter",del:"Delete",command:"Meta",option:"Alt",enter:"Enter",backspace:"Backspace",ins:"Insert",pageup:"PageUp",pagedown:"PageDown",end:"End",home:"Home",contextmenu:"ContextMenu",numlock:"Clear"},q={cmd:"Meta"};function R(e){var t=e.toLowerCase();return j[t]||q[t]||(e.match(/^f\d+$/)?e.toUpperCase():e)}var U={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},B=C(Object.values(U),!0);function G(e){return!!B[e]}function W(e){return G(e)||String.fromCharCode(e.charCodeAt(0))===e||function(e){return w.option("_customKeyNamesDict")[e]}(e)}var z=function(e){function t(){var e,n;u(this,t);for(var o=arguments.length,i=Array(o),r=0;r<o;r++)i[r]=arguments[r];return d(k(k(n=b(this,(e=v(t)).call.apply(e,[this].concat(i))))),"name","InvalidKeyNameError"),n}return y(t,m(Error)),t}();function J(e){return e.sort().join("+")}var V=function(){function e(){u(this,e)}return l(e,null,[{key:"parse",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=function(e){return D(e)?e.trim().replace(/\s+/g," "):e}(e).split(" ");try{var o=n.slice(0,n.length-1),i=n[n.length-1],r=o.map(function(e){var n=$(e,t);return J(Object.keys(n))}).join(" "),s=$(i,t),a={id:J(Object.keys(s)),keyDictionary:s,keyEventType:t.keyEventType,size:Object.keys(s).length};return{sequence:{prefix:r,size:o.length+1},combination:a}}catch(e){return{sequence:null,combination:null}}}}]),e}();function $(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return e.replace(/^\+|(\s|[^+]\+)\+/,"$1plus").split("+").reduce(function(e,n){var o=R(n);if(t.ensureValidKeys&&!W(o))throw new z;return e[o]=!0,e},{})}var Y={"`":["`"],1:["\xa1"],2:["\u2122"],3:["\xa3"],4:["\xa2"],5:["\u221e"],6:["\xa7"],7:["\xb6"],8:["\u2022"],9:["\xaa"],0:["\xba"],"-":["\u2013"],"=":["\u2260"],a:["\xe5"],b:["\u222b"],c:["\xe7"],d:["\u2202"],e:["\xb4"],f:["\u0192"],g:["\xa9"],h:["\u02d9"],i:["\u02c6"],j:["\u2206"],k:["\u02da"],l:["\xac"],m:["\xb5"],n:["\u02dc"],o:["\xf8"],p:["\u03c0"],q:["\u0153"],r:["\xae"],s:["\xdf"],t:["\u2020"],u:["\xa8"],v:["\u221a"],w:["\u2211"],x:["\u2248"],y:["\xa5"],z:["\u03a9"],"[":["\u201c"],"]":["\u2018"],"\\":["\xab"],"'":["\xe6"],";":["\u2026"],",":["\u2264"],".":["\u2265"],"/":["\xf7"]},Q=A(Y);function X(e){return Q[e]||[e]}function Z(e){return Y[e]||[e]}var ee={"`":["`"],1:["\u2044"],2:["\u20ac"],3:["\u2039"],4:["\u203a"],5:["\ufb01"],6:["\ufb02"],7:["\u2021"],8:["\xb0"],9:["\xb7"],0:["\u201a"],"-":["\u2014"],"=":["\xb1"],a:["\xc5"],b:["\u0131"],c:["\xc7"],d:["\xce"],e:["\xb4"],f:["\xcf"],g:["\u02dd"],h:["\xd3"],i:["\u02c6"],j:["\xd4"],k:["\uf8ff"],l:["\xd2"],m:["\xc2"],n:["\u02dc"],o:["\xd8"],p:["\u03c0"],q:["\u0152"],r:["\u2030"],s:["\xcd"],t:["\xce"],u:["\xa8"],v:["\u25ca"],w:["\u201e"],x:["\u02db"],y:["\xc1"],z:["\xb8"],"[":["\u201d"],"]":["\u2019"],"\\":["\xbb"],"'":["\xc6"],";":["\xda"],",":["\xaf"],".":["\u02d8"]},te=A(ee);function ne(e){return te[e]||F(e)}function oe(e){return ee[e]||[e]}var ie=function(){function e(){u(this,e)}return l(e,null,[{key:"serialize",value:function(e){var t=e.Shift,n=e.Alt,o={};return Object.keys(e).sort().forEach(function(e){var i=[];if(t)if(n){var r=ne(e),s=oe(e);i=[].concat(K(i),[e],K(r),K(s))}else{var a=F(e),u=H(e);i=[].concat(K(i),[e],K(a),K(u))}else if(n){var c=X(e),l=Z(e);i=[].concat(K(i),[e],K(c),K(l))}else{i.push(e);var h=N[e];h&&(i=[].concat(K(i),K(h)))}var y=Object.keys(o);0<y.length?y.forEach(function(e){i.forEach(function(t){o[e+"+".concat(t)]=f({},o[e],d({},t,!0))}),delete o[e]}):i.forEach(function(e){o[e]=d({},e,!0)})}),Object.values(o).map(function(e){return Object.keys(e).sort().join("+")})}},{key:"isValidKeySerialization",value:function(e){return!!(0<e.length)&&!!V.parse(e,{ensureValidKeys:!0}).combination}}]),e}(),re=0,se=1;function ae(e){return"undefined"==typeof e}var ue={unseen:0,seen:1,simulated:2},ce=function(){function e(){u(this,e)}return l(e,null,[{key:"newRecord",value:function(e,t){var n=[ue.unseen,ue.unseen,ue.unseen];if(!ae(e))for(var o=0;o<=e;o++)n[o]=t;return n}},{key:"setBit",value:function(e,t,n){return e[t]=n,e}},{key:"clone",value:function(e){for(var t=this.newRecord(),n=0;n<e.length;n++)t[n]=e[n];return t}}]),e}();function le(e){return!Array.isArray(e)&&"object"===a(e)&&null!==e}function de(e){return le(e)?0===Object.keys(e).length:!e||0===e.length}function he(e){return le(e)?Object.keys(e).length:e.length}var fe=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this._keys=t,this._includesKeyUp=!1,this._update()}return l(e,[{key:"getIds",value:function(){return this._ids}},{key:"getKeyAliases",value:function(){return this._keyAliases}},{key:"getNormalizedKeyName",value:function(e){if(this._keys[e])return e;var t=this._keyAliases[e];return t||e}},{key:"getNumberOfKeys",value:function(){return he(this._keys)}},{key:"any",value:function(){return 0<Object.keys(this._getKeyStates()).length}},{key:"isEnding",value:function(){return this._includesKeyUp}},{key:"hasEnded",value:function(){return de(this.keysStillPressedDict())}},{key:"addKey",value:function(e,t){this._setKeyState(e,[ce.newRecord(),ce.newRecord(O.keydown,t)])}},{key:"setKeyState",value:function(e,t,n){var o=this._getKeyState(e);if(this.isKeyIncluded(e)){var i=ce.clone(o[1]),r=ce.clone(i);ce.setBit(r,t,n),this._setKeyState(e,[i,r])}else this.addKey(e,n);t===O.keyup&&(this._includesKeyUp=!0)}},{key:"forEachKey",value:function(e){return Object.keys(this._keys).forEach(e)}},{key:"some",value:function(e){return Object.keys(this._keys).some(e)}},{key:"getKeyDictionary",value:function(){return C(Object.keys(this._getKeyStates()),!0)}},{key:"keysStillPressedDict",value:function(){var e=this;return Object.keys(this._keys).reduce(function(t,n){return e.isKeyStillPressed(n)&&(t[n]=e._getKeyState(n)),t},{})}},{key:"isKeyIncluded",value:function(e){return!!this._getKeyState(e)}},{key:"isKeyStillPressed",value:function(e){return this.isEventTriggered(e,O.keypress)&&!this.isKeyReleased(e)}},{key:"isKeyReleased",value:function(e){return this.isEventTriggered(e,O.keyup)}},{key:"isEventTriggered",value:function(e,t){return this._getKeyStateType(e,se,t)}},{key:"wasEventPreviouslyTriggered",value:function(e,t){return this._getKeyStateType(e,re,t)}},{key:"isKeyPressSimulated",value:function(e){return this._isKeyEventSimulated(e,O.keypress)}},{key:"isKeyUpSimulated",value:function(e){return this._isKeyEventSimulated(e,O.keyup)}},{key:"describe",value:function(){return this.getIds()[0]}},{key:"toJSON",value:function(){return{keys:this._getKeyStates(),ids:this.getIds(),keyAliases:this.getKeyAliases()}}},{key:"_getKeyStateType",value:function(e,t,n){var o=this._getKeyState(e);return o&&o[t][n]}},{key:"_update",value:function(){this._ids=ie.serialize(this._keys),this._keyAliases=function(e){return Object.keys(e).reduce(function(t,n){return function(e){return N[e]||[e]}(n).forEach(function(o){(function(e){if(e.Shift)return e.Alt?[oe,ne]:[H,F];if(e.Alt)return[Z,X];var t=function(e){return[e]};return[t,t]})(e).forEach(function(e){e(o).forEach(function(e){(e!==n||n!==o)&&(t[e]=n)})})}),t},{})}(this._keys)}},{key:"_isKeyEventSimulated",value:function(e,t){return this.isEventTriggered(e,t)===ue.simulated}},{key:"_getKeyStates",value:function(){return this._keys}},{key:"_getKeyState",value:function(e){var t=this._keys[e];if(t)return t;var n=this._keyAliases[e];return n?this._keys[n]:void 0}},{key:"_setKeyState",value:function(e,t){var n=this.getNormalizedKeyName(e);this._keys[n]=t,this._update()}}]),e}();var ye=function(){function e(t){var n=t.maxLength,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;u(this,e),this._records=[],this._maxLength=n,o?this._push(o):this._push(new fe)}return l(e,[{key:"getMostRecentCombinations",value:function(e){return this._records.slice(-e,-1)}},{key:"any",value:function(){return this._records.some(function(e){return e.any()})}},{key:"getLength",value:function(){return this._records.length}},{key:"getCurrentCombination",value:function(){return this._records[this.getLength()-1]}},{key:"addKeyToCurrentCombination",value:function(e,t,n){this._ensureInitialKeyCombination(),this.getCurrentCombination().setKeyState(e,t,n)}},{key:"setMaxLength",value:function(e){this._maxLength=e,this._trimHistory()}},{key:"startNewKeyCombination",value:function(e,t){this._ensureInitialKeyCombination();var n=new fe(this.getCurrentCombination().keysStillPressedDict());n.addKey(e,t),this._push(n)}},{key:"toJSON",value:function(){return this._records.map(function(e){return e.toJSON()})}},{key:"_ensureInitialKeyCombination",value:function(){0===this.getLength()&&this._push(new fe)}},{key:"_push",value:function(e){this._trimHistory(),this._records.push(e)}},{key:"_trimHistory",value:function(){for(;this.getLength()>this._maxLength;)this._shift()}},{key:"_shift",value:function(){this._records.shift()}}]),e}(),ve=function(){function e(){u(this,e),this._registry={}}return l(e,[{key:"get",value:function(e){return this._registry[e]}},{key:"set",value:function(e,t){this._registry[e]=t}},{key:"remove",value:function(e){delete this._registry[e]}},{key:"toJSON",value:function(){return this._registry}}]),e}();function pe(e){return Array.isArray(e)?e:e?[e]:[]}var ge=function(e){function t(){return u(this,t),b(this,v(t).apply(this,arguments))}return y(t,ve),l(t,[{key:"add",value:function(e,n){E(v(t.prototype),"set",this).call(this,e,{childIds:[],parentId:null,keyMap:n})}},{key:"update",value:function(e,n){var o=E(v(t.prototype),"get",this).call(this,e);E(v(t.prototype),"set",this).call(this,e,f({},o,{keyMap:n}))}},{key:"setParent",value:function(e,t){this.get(e).parentId=t,this._addChildId(t,e)}},{key:"remove",value:function(e){var n=this._getParentId(e);this._removeChildId(n,e),E(v(t.prototype),"remove",this).call(this,e)}},{key:"_getParentId",value:function(e){var t=this.get(e);return t&&t.parentId}},{key:"_addChildId",value:function(e,t){this.get(e).childIds.push(t)}},{key:"_removeChildId",value:function(e,t){var n=this.get(e);n&&(n.childIds=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=C(pe(t));return Array.isArray(e)?e.reduce(function(e,t){return o[t]&&(n.stringifyFirst||o[t].value===t)||e.push(t),e},[]):le(e)?Object.keys(e).reduce(function(t,n){return o[n]||(t[n]=e[n]),t},{}):e}(n.childIds,t))}}]),t}();var me=function(){function e(t){u(this,e),this._list=t,this._position=-1}return l(e,[{key:"getPosition",value:function(){return this._position}},{key:"getComponent",value:function(){return this._list.getAtPosition(this.getPosition())}},{key:"next",value:function(){return this.getPosition()+1<this._list.getLength()?(this._position++,this.getComponent()):null}}]),e}(),_e=function(){function e(){u(this,e),this._list=[],this._idToIndex={},this._longestSequence=1,this._longestSequenceComponentId=null,this._keyMapEventRecord=ce.newRecord()}return l(e,[{key:"getNewIterator",value:function(){return new me(this)}},{key:"add",value:function(e,t,n,o){if(this.containsId(e))return this.update(e,t,n,o);var i=this._build(e,t,n,o);this._list.push(i);var r=this._getLastIndex();return this._idToIndex[e]=r}},{key:"containsId",value:function(e){return!!this.get(e)}},{key:"get",value:function(e){return this.getAtPosition(this.getIndexById(e))}},{key:"getIndexById",value:function(e){return this._idToIndex[e]}},{key:"update",value:function(e,t,n,o){var i=this._isUpdatingComponentWithLongestSequence(e),r=this.getLongestSequence(),s=this._build(e,t,n,o);i&&s.sequenceLength!==r&&(s.sequenceLength>r?this._longestSequence=s.sequenceLength:this._recalculateLongestSequence()),this._list[this.getIndexById(e)]=s}},{key:"remove",value:function(e){var t=this._isUpdatingComponentWithLongestSequence(e);this.removeAtPosition(this.getIndexById(e)),t&&this._recalculateLongestSequence()}},{key:"any",value:function(){return 0!==this.getLength()}},{key:"isRoot",value:function(e){return this.getIndexById(e)>=this.getLength()-1}},{key:"getLongestSequence",value:function(){return this._longestSequence}},{key:"anyActionsForEventType",value:function(e){return!!this._keyMapEventRecord[e]}},{key:"getLength",value:function(){return this._list.length}},{key:"getAtPosition",value:function(e){return this._list[e]}},{key:"removeAtPosition",value:function(e){this._list=function(e,t){return[].concat(K(e.slice(0,t)),K(e.slice(t+1)))}(this._list,e);for(var t=e;t<this.getLength();)this._idToIndex[this.getAtPosition(t).componentId]=t,t++}},{key:"toJSON",value:function(){return this._list}},{key:"_getLastIndex",value:function(){return this.getLength()-1}},{key:"_build",value:function(e,t,n,o){var i=this._applyHardSequences(t,n),r=i.keyMap,s=i.handlers;return{actions:this._buildActionDictionary(f({},t,r),o,e),handlers:s,componentId:e,options:o}}},{key:"_isUpdatingComponentWithLongestSequence",value:function(e){return e===this._getLongestSequenceComponentId()}},{key:"_getLongestSequenceComponentId",value:function(){return this._longestSequenceComponentId}},{key:"_recalculateLongestSequence",value:function(){for(var e=this.getNewIterator();e.next();){var t=e.getComponent(),n=t.longestSequence,o=t.componentId;n>this.getLongestSequence()&&(this._longestSequenceComponentId=o,this._longestSequence=n)}}},{key:"_applyHardSequences",value:function(e,t){return w.option("enableHardSequences")?Object.keys(t).reduce(function(n,o){return!!!e[o]&&ie.isValidKeySerialization(o)&&(n.keyMap[o]=o),n.handlers[o]=t[o],n},{keyMap:{},handlers:{}}):{keyMap:e,handlers:t}}},{key:"_buildActionDictionary",value:function(e,t,n){var o=this;return Object.keys(e).reduce(function(i,r){var s=e[r];return(le(s)&&x(s,"sequences")?pe(s.sequences):pe(s)).forEach(function(e){var s=function(e,t){if(le(e)){var n=e.sequence,o=e.action;return{keySequence:n,keyEventType:ae(o)?O[t.defaultKeyEvent]:O[o]}}return{keySequence:e,keyEventType:O[t.defaultKeyEvent]}}(e,t),a=s.keySequence,u=s.keyEventType;o._addActionOptions(i,n,r,a,u)}),i},{})}},{key:"_addActionOptions",value:function(e,t,n,o,i){var r=V.parse(o,{keyEventType:i}),s=r.sequence,a=r.combination;s.size>this.getLongestSequence()&&(this._longestSequence=s.size,this._longestSequenceComponentId=t),this._keyMapEventRecord[i]=ue.seen,e[n]||(e[n]=[]),e[n].push(f({prefix:s.prefix,actionName:n,sequenceLength:s.size},a))}}]),e}();function ke(e,t){return e[e.length-(t+1)]}for(var be={Enter:!0,Backspace:!0,ArrowRight:!0,ArrowLeft:!0,ArrowUp:!0,ArrowDown:!0,CapsLock:!0},Ee=1;13>Ee;Ee++)be["F".concat(Ee)]=!0;function Ke(e){return 1===e.length||x(be,e)}var Ce=function(){function e(){u(this,e),this._actionConfigs={},this._order=null}return l(e,[{key:"addMatch",value:function(e,t){if(this._includesMatcherForCombination(e.id)){var n=e.keyEventType,o=e.actionName,i=e.id;this._addHandlerToActionConfig(i,{keyEventType:n,actionName:o,handler:t})}else this._addNewActionConfig(e,t)}},{key:"findMatch",value:function(e,t,n){this._order||this._setOrder();var o=!0,i=!1,r=void 0;try{for(var s,a=this._order[Symbol.iterator]();!(o=(s=a.next()).done);o=!0){var u=s.value,c=this._actionConfigs[u];if(this._matchesActionConfig(e,t,n,c))return c}}catch(e){i=!0,r=e}finally{try{o||null==a.return||a.return()}finally{if(i)throw r}}return null}},{key:"toJSON",value:function(){return{actionConfigs:this._actionConfigs,order:this._order}}},{key:"_matchesActionConfig",value:function(e,t,n,o){if(!function(e,t){var n=he(t.keyDictionary);return w.option("allowCombinationSubmatches")||function(e){return!!e.isKeyStillPressed("Meta")&&e.some(function(e){return Ke(e)})}(e)?e.getNumberOfKeys()>=n:e.getNumberOfKeys()===n}(e,o))return!1;if(!o.events[n])return!1;var i=!1;return Object.keys(o.keyDictionary).every(function(o){return!!e.isEventTriggered(o,n)&&(t&&t===e.getNormalizedKeyName(o)&&(i=!e.wasEventPreviouslyTriggered(o,n)),!0)})&&i}},{key:"_setOrder",value:function(){var e=Object.values(this._actionConfigs).reduce(function(e,t){var n=t.id,o=t.size;return e[o]||(e[o]=[]),e[o].push(n),e},{});this._order=Object.keys(e).sort(function(e,t){return t-e}).reduce(function(t,n){return t.concat(e[n])},[])}},{key:"_addNewActionConfig",value:function(e,t){var n=e.prefix,o=e.sequenceLength,i=e.id,r=e.keyDictionary,s=e.size,a=e.keyEventType,u=e.actionName;this._setCombinationMatcher(i,{prefix:n,sequenceLength:o,id:i,keyDictionary:r,size:s,events:{}}),this._addHandlerToActionConfig(i,{keyEventType:a,actionName:u,handler:t})}},{key:"_addHandlerToActionConfig",value:function(e,t){var n=t.keyEventType,o=t.actionName,i=t.handler,r=this._getCombinationMatcher(e);this._setCombinationMatcher(e,f({},r,{events:f({},r.events,d({},n,{actionName:o,handler:i}))}))}},{key:"_setCombinationMatcher",value:function(e,t){this._actionConfigs[e]=t}},{key:"_getCombinationMatcher",value:function(e){return this._actionConfigs[e]}},{key:"_includesMatcherForCombination",value:function(e){return!!this._getCombinationMatcher(e)}}]),e}();var Ie=function(){function e(){u(this,e),this._combinationMatchers={},this._eventRecord=ce.newRecord()}return l(e,[{key:"addMatch",value:function(e,t){this._getOrCreateCombinationMatcher(e.prefix).addMatch(e,t),ce.setBit(this._eventRecord,e.keyEventType,ue.seen),(!this._longestSequence||this._longestSequence<e.sequenceLength)&&(this._longestSequence=e.sequenceLength)}},{key:"findMatch",value:function(e,t,n){var o=this._findCombinationMatcher(e);return o?o.findMatch(e.getCurrentCombination(),e.getCurrentCombination().getNormalizedKeyName(t),n):null}},{key:"hasMatchesForEventType",value:function(e){return!!this._eventRecord[e]}},{key:"getLongestSequence",value:function(){return this._longestSequence}},{key:"toJSON",value:function(){var e=this;return Object.keys(this._combinationMatchers).reduce(function(t,n){var o=e._combinationMatchers[n];return t[n]=o.toJSON(),t},{})}},{key:"_getOrCreateCombinationMatcher",value:function(e){return this._combinationMatchers[e]||(this._combinationMatchers[e]=new Ce),this._combinationMatchers[e]}},{key:"_findCombinationMatcher",value:function(e){var t=e.getMostRecentCombinations(this.getLongestSequence());if(0===t.length)return this._combinationMatchers[""];for(var n=t.map(function(e){return e.getIds()}),o=n.map(function(e){return e.length}),i=Array(n.length).fill(0),r=!1;!r;){var s=i.map(function(e,t){return n[t][e]}).join(" ");if(this._combinationMatchers[s])return this._combinationMatchers[s];for(var a=0,u=!0;u&&a<i.length;){var c=(ke(i,a)+1)%(ke(o,a)||1);i[i.length-(a+1)]=c,(u=0==c)&&a++}r=a===i.length}}}]),e}(),Se=function(){function e(t){u(this,e),this._keyMapMatchers=[],this._unmatchedHandlerStatus=[],this._handlersDictionary={},this._keySequencesDictionary={};for(var n=t.getNewIterator();n.next();){var o=n.getComponent().handlers;this._unmatchedHandlerStatus.push([Object.keys(o).length,{}]),this._keyMapMatchers.push(new Ie)}this._componentList=t,this._componentListIterator=t.getNewIterator()}return l(e,[{key:"getKeyHistoryMatcher",value:function(e){if(this._componentHasUnmatchedHandlers(e))for(;this._componentListIterator.next();)this._addHandlersFromComponent(),this._addActionsFromComponent();return this._getKeyHistoryMatcher(e)}},{key:"componentHasActionsBoundToEventType",value:function(e,t){return this.getKeyHistoryMatcher(e).hasMatchesForEventType(t)}},{key:"findMatchingKeySequenceInComponent",value:function(e,t,n,o){return this.componentHasActionsBoundToEventType(e,o)?this.getKeyHistoryMatcher(e).findMatch(t,n,o):null}},{key:"_getKeyHistoryMatcher",value:function(e){return this._keyMapMatchers[e]}},{key:"_addActionsFromComponent",value:function(){var e=this,t=this._componentListIterator.getComponent().actions;Object.keys(t).forEach(function(n){var o=e._getHandlers(n);if(o){var i=o[0],r=e._componentList.getAtPosition(i).handlers[n],s=e._getKeyHistoryMatcher(i);t[n].forEach(function(t){var n=[t.prefix,t.id].join(" ");e._isClosestHandlerFound(n,t)||(s.addMatch(t,r),e._addKeySequence(n,[i,t.keyEventType]))}),o.forEach(function(t){var o=e._getUnmatchedHandlerStatus(t);o[1][n]||(o[1][n]=!0,o[0]--)})}})}},{key:"_getHandlers",value:function(e){return this._handlersDictionary[e]}},{key:"_addHandlersFromComponent",value:function(){var e=this,t=this._componentListIterator.getComponent().handlers;Object.keys(t).forEach(function(t){e._addHandler(t)})}},{key:"_addHandler",value:function(e){this._handlersDictionary[e]||(this._handlersDictionary[e]=[]),this._handlersDictionary[e].push(this._componentListIterator.getPosition())}},{key:"_addKeySequence",value:function(e,t){this._keySequencesDictionary[e]||(this._keySequencesDictionary[e]=[]),this._keySequencesDictionary[e].push(t)}},{key:"_componentHasUnmatchedHandlers",value:function(e){return 0<this._getUnmatchedHandlerStatus(e)[0]}},{key:"_getUnmatchedHandlerStatus",value:function(e){return this._unmatchedHandlerStatus[e]}},{key:"_isClosestHandlerFound",value:function(e,t){return this._keySequencesDictionary[e]&&this._keySequencesDictionary[e].some(function(e){return e[1]===t.keyEventType})}}]),e}();function we(e,t,n){return n.forEach(function(n){x(e,n)&&(t[n]=e[n])}),t}function Pe(e){switch(parseInt(e,10)){case 0:return"keydown";case 1:return"keypress";default:return"keyup"}}function Oe(e){return e.simulated?ue.simulated:ue.seen}var Me=["sequence","action"],Te=["name","description","group"],He=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length?arguments[1]:void 0;u(this,e),this.logger=t.logger||new P("warn"),this.componentId=-1,this.keyEventManager=n,this._componentTree=new ge,this.rootComponentId=null,this._reset(),this.resetKeyHistory()}return l(e,[{key:"_reset",value:function(){this.componentList=new _e,this._initHandlerResolutionState()}},{key:"_newKeyHistory",value:function(){return new ye({maxLength:this.componentList.getLongestSequence()})}},{key:"getKeyHistory",value:function(){return this._keyHistory?this._keyHistory:(this._keyHistory=this._newKeyHistory(),this._keyHistory)}},{key:"_initHandlerResolutionState",value:function(){this._actionResolver=null}},{key:"resetKeyHistory",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.keypressEventsToSimulate=[],this.keyupEventsToSimulate=[],this._keyHistory=this.getKeyHistory().any()&&!e.force?new ye({maxLength:this.componentList.getLongestSequence()},new fe(this.getCurrentCombination().keysStillPressedDict())):this._newKeyHistory()}},{key:"getApplicationKeyMap",value:function(){return null===this.rootComponentId?{}:this._buildApplicationKeyMap([this.rootComponentId],{})}},{key:"_buildApplicationKeyMap",value:function(e,t){var n=this;return e.forEach(function(e){var o=n._componentTree.get(e),i=o.childIds,r=o.keyMap;r&&Object.keys(r).forEach(function(e){var o=r[e];t[e]={},le(o)?x(o,"sequences")?(we(o,t[e],Te),t[e].sequences=n._createSequenceFromConfig(o.sequences)):(we(o,t[e],Te),t[e].sequences=[we(o,{},Me)]):t[e].sequences=n._createSequenceFromConfig(o)}),n._buildApplicationKeyMap(i,t)}),t}},{key:"_createSequenceFromConfig",value:function(e){return pe(e).map(function(e){return le(e)?we(e,{},Me):{sequence:e}})}},{key:"registerKeyMap",value:function(e){return this.componentId+=1,this._componentTree.add(this.componentId,e),this.componentId}},{key:"reregisterKeyMap",value:function(e,t){this._componentTree.update(e,t)}},{key:"registerComponentMount",value:function(e,t){ae(t)?this.rootComponentId=e:this._componentTree.setParent(e,t)}},{key:"deregisterKeyMap",value:function(e){this._componentTree.remove(e),e===this.rootComponentId&&(this.rootComponentId=null)}},{key:"_addComponent",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=3<arguments.length?arguments[3]:void 0;this.componentList.add(e,t,n,o),this.getKeyHistory().setMaxLength(this.componentList.getLongestSequence())}},{key:"_allKeysAreReleased",value:function(){return this.getCurrentCombination().hasEnded()}},{key:"getCurrentCombination",value:function(){return this.getKeyHistory().getCurrentCombination()}},{key:"_shouldSimulate",value:function(e,t){var n=function(e){return!G(e)}(t),o=this.getCurrentCombination();return e===O.keypress?!n||n&&o.isKeyStillPressed("Meta"):e===O.keyup&&Ke(t)&&o.isKeyReleased("Meta")}},{key:"_cloneAndMergeEvent",value:function(e,t){return f({},Object.keys(M).reduce(function(t,n){return t[n]=e[n],t},{}),t)}},{key:"_callClosestMatchingHandler",value:function(e,t,n,o,i){for(this._actionResolver||(this._actionResolver=new Se(this.componentList));i<=o;){this._actionResolver.getKeyHistoryMatcher(i);var r=this._actionResolver.findMatchingKeySequenceInComponent(i,this.getKeyHistory(),t,n);this.getCurrentCombination();if(r){var s=r.events[n];if(w.option("allowCombinationSubmatches"))ie.serialize(r.keyDictionary);return s.handler(e),this._stopEventPropagationAfterHandlingIfEnabled(e,i),!0}this._actionResolver.componentHasActionsBoundToEventType(i,n),i++}}},{key:"_stopEventPropagationAfterHandlingIfEnabled",value:function(e,t){return!!w.option("stopEventPropagationAfterHandling")&&(this._stopEventPropagation(e,t),!0)}},{key:"_stopEventPropagation",value:function(){throw new Error("_stopEventPropagation must be overridden by a subclass")}},{key:"_checkForModifierFlagDiscrepancies",value:function(e,t,n){var o=this;Object.keys(M).forEach(function(i){if(t!==i||n!==O.keyup){var r=o.getCurrentCombination(),s=r.isKeyStillPressed(i);M[i].forEach(function(t){!1===e[t]&&s&&r.setKeyState(i,O.keyup,Oe(e))})}})}},{key:"_logPrefix",value:function(){}}]),e}(),xe=function(){function e(){u(this,e)}return l(e,null,[{key:"getId",value:function(){return ae(this._id)&&(this._id=0),this._id}},{key:"incrementId",value:function(){this._id=this.getId()+1}}]),e}();var Ae={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"};function Le(e){var t=function(){var t=w.option("customKeyCodes"),n=e.keyCode||e.charCode;return x(t,n)?t[n]:e.nativeEvent?e.key:function(e){if(e.key){var t=Ae[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=function(e){var t,n=e.keyCode;return"charCode"in e?0===(t=e.charCode)&&13===n&&(t=13):t=n,10===t&&(t=13),32<=t||13===t?t:0}(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?U[e.keyCode]||"Unidentified":""}(e)}();return"+"===t?"plus":t}function Fe(e){return"Meta"===e}var Ne=0,De=1,je=2,qe=4,Re=function(){function e(t,n){var o=n.logger,i=n.logPrefix;u(this,e),this._componentList=t,this._previousPropagation=null,this.logger=o,this._logPrefix=i,this._reset()}return l(e,[{key:"_reset",value:function(){this._previousPosition=-1,this._position=-1,this._actionHandled=!1,this._ignoreEvent=!1,this._observeIgnoredEvents=!1,this._stopping=!1,this._componentId=null,this._key=null,this._type=null}},{key:"isFirstPropagationStep",value:function(){var e=this.getPreviousPosition();return-1===e||e>=this._position}},{key:"isForKey",value:function(e){return this._key===e}},{key:"isForEventType",value:function(e){return this._type===e}},{key:"startNewPropagationStep",value:function(e,t,n,o){return this._position=this._componentList.getIndexById(e),this._componentId=e,this.isFirstPropagationStep()&&(xe.incrementId(),this._key=t.key,this._type=o),!(t.repeat&&w.option("ignoreRepeatedEventsWhenKeyHeldDown"))||(this.ignoreEvent(t),!1)}},{key:"finishPropagationStep",value:function(){this.isStopped()||this._componentList.isRoot(this._componentId)?(this._previousPropagation=this._clone(),this._reset()):this._previousPosition=this._position}},{key:"getPreviousPropagation",value:function(){return this._previousPropagation||(this._previousPropagation=this._clone({copyState:!1})),this._previousPropagation}},{key:"getPreviousPosition",value:function(){return this._previousPosition}},{key:"observeIgnoredEvents",value:function(){this._observeIgnoredEvents=!0}},{key:"ignoreEvent",value:function(e){return this.setIgnoreEvent(!0),!(!this.isIgnoringEvent()||!w.option("stopEventPropagationAfterIgnoring"))&&(this.stop(e),this.finishPropagationStep(),!0)}},{key:"setIgnoreEvent",value:function(e){this._ignoreEvent=e}},{key:"isIgnoringEvent",value:function(){return!this._observeIgnoredEvents&&this._ignoreEvent}},{key:"isStopped",value:function(){return this._stopping}},{key:"stop",value:function(e){return!this.isStopped()&&(this._stopping=!0,e.simulated||e.stopPropagation(),!0)}},{key:"isPendingPropagation",value:function(){var e=this.getPreviousPosition();return-1!==e&&e+1<this._position}},{key:"isHandled",value:function(){return this._actionHandled}},{key:"setHandled",value:function(){this._actionHandled=!0}},{key:"_clone",value:function(){var t=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).copyState,n=new e(this._componentList,{logger:this.logger,logPrefix:this._logPrefix});return(void 0===t||t)&&Object.assign(n,this),n}}]),e}(),Ue=function(e){function t(){var e,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},o=1<arguments.length?arguments[1]:void 0;return u(this,t),(e=b(this,v(t).call(this,n,o))).focusTreeId=0,e}return y(t,He),l(t,[{key:"_reset",value:function(){E(v(t.prototype),"_reset",this).call(this),this.keypressEventsToSimulate=[],this.focusTreeId+=1,this.eventPropagator=new Re(this.componentList,{logger:this.logger,logPrefix:this._logPrefix.bind(this)})}},{key:"enableHotKeys",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=3<arguments.length?arguments[3]:void 0;if(this.resetOnNextFocus&&(this._reset(),this.resetOnNextFocus=!1),!this.componentList.containsId(e))return this._addComponent(e,t,n,o),this.focusTreeId}},{key:"updateEnabledHotKeys",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},i=4<arguments.length?arguments[4]:void 0;e===this.focusTreeId&&this.componentList.containsId(t)&&(this.componentList.update(t,n,o,i),this.getKeyHistory().setMaxLength(this.componentList.getLongestSequence()),this._initHandlerResolutionState())}},{key:"disableHotKeys",value:function(e,t){return this.resetOnNextFocus||(this.resetOnNextFocus=!0),this.eventPropagator.isPendingPropagation()}},{key:"handleKeydown",value:function(e,t,n){var o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},i=Le(e);if(t!==this.focusTreeId)return this.eventPropagator.ignoreEvent(e),!0;if(this.eventPropagator.startNewPropagationStep(n,e,i,O.keydown)){if(this._howToHandleKeyEvent(e,t,n,i,o,O.keydown)===qe){var r=Oe(e),s=this.getCurrentCombination();s.isKeyIncluded(i)||s.isEnding()?this._startAndLogNewKeyCombination(i,t,n,r):this._addToAndLogCurrentKeyCombination(i,O.keydown,t,n,r),this._callHandlerIfActionNotHandled(e,i,O.keydown,n,t)}return this._simulateKeyPressForNonPrintableKeys(e,i,t,n,o),this.eventPropagator.finishPropagationStep(),!1}}},{key:"_howToHandleKeyEvent",value:function(e,t,n,o,i,r){if(this.eventPropagator.isFirstPropagationStep()){if(i.ignoreEventsCondition(e)&&this.eventPropagator.ignoreEvent(e))return this._eventIsToBeIgnored(e,n,o,r);this._checkForModifierFlagDiscrepancies(e,o,r)}else if(this.eventPropagator.isIgnoringEvent())return this._eventIsToBeIgnored(e,n,o,r);return qe}},{key:"_eventIsToBeIgnored",value:function(e,t,n,o){return De}},{key:"handleKeyPress",value:function(e,t,n,o){var i=Le(e),r=this.getCurrentCombination();if(r.isKeyPressSimulated(i))return this.eventPropagator.ignoreEvent(e),!0;if(this.eventPropagator.startNewPropagationStep(n,e,i,O.keypress)){var s=t!==this.focusTreeId,a=this._howToHandleKeyEvent(e,t,n,i,o,O.keypress);return this.eventPropagator.isFirstPropagationStep(n)&&r.isKeyIncluded(i)&&this._addToAndLogCurrentKeyCombination(i,O.keypress,t,n,Oe(e)),a===qe&&this._callHandlerIfActionNotHandled(e,i,O.keypress,n,t),this.eventPropagator.finishPropagationStep(),s}}},{key:"handleKeyUp",value:function(e,t,n,o){var i=Le(e),r=this.getCurrentCombination();if(r.isKeyUpSimulated(i))return this.eventPropagator.ignoreEvent(e),!0;if(this.eventPropagator.startNewPropagationStep(n,e,i,O.keyup)){var s=t!==this.focusTreeId,a=this._howToHandleKeyEvent(e,t,n,i,o,O.keyup);return this.eventPropagator.isFirstPropagationStep(n)&&r.isKeyIncluded(i)&&this._addToAndLogCurrentKeyCombination(i,O.keyup,t,n,Oe(e)),a===qe&&this._callHandlerIfActionNotHandled(e,i,O.keyup,n,t),this._simulateKeyUpEventsHiddenByCmd(e,i,t,n,o),this.eventPropagator.finishPropagationStep(),s}}},{key:"closeHangingKeyCombination",value:function(e,t){var n=this.getCurrentCombination();n.isKeyIncluded(e)&&!n.isEventTriggered(e,t)&&n.setKeyState(e,t,ue.simulated)}},{key:"_simulateKeyPressForNonPrintableKeys",value:function(e,t,n,o,i){this._handleEventSimulation("keypressEventsToSimulate","simulatePendingKeyPressEvents",this._shouldSimulate(O.keypress,t),{event:e,key:t,focusTreeId:n,componentId:o,options:i})}},{key:"_simulateKeyUpEventsHiddenByCmd",value:function(e,t,n,o,i){var r=this;Fe(t)&&this.getCurrentCombination().forEachKey(function(t){Fe(t)||r._handleEventSimulation("keyupEventsToSimulate","simulatePendingKeyUpEvents",r._shouldSimulate(O.keyup,t),{event:e,key:t,focusTreeId:n,componentId:o,options:i})})}},{key:"_stopEventPropagation",value:function(e,t){this.eventPropagator.stop(e)}},{key:"getEventPropagator",value:function(){return this.eventPropagator}},{key:"_startAndLogNewKeyCombination",value:function(e,t,n,o){this.getKeyHistory().startNewKeyCombination(e,o)}},{key:"_addToAndLogCurrentKeyCombination",value:function(e,t,n,o,i){this.getKeyHistory().addKeyToCurrentCombination(e,t,i)}},{key:"_handleEventSimulation",value:function(e,t,n,o){var i=o.event,r=o.key,s=o.focusTreeId,a=o.componentId,u=o.options;if(n&&w.option("simulateMissingKeyPressEvents")){var c=this._cloneAndMergeEvent(i,{key:r,simulated:!0});this[e].push({event:c,focusTreeId:s,componentId:a,options:u})}(this.componentList.isRoot(a)||this.eventPropagator.isStopped())&&!this.keyEventManager.isGlobalListenersBound()&&this[t]()}},{key:"simulatePendingKeyPressEvents",value:function(){this._simulatePendingKeyEvents("keypressEventsToSimulate","handleKeyPress")}},{key:"simulatePendingKeyUpEvents",value:function(){this._simulatePendingKeyEvents("keyupEventsToSimulate","handleKeyUp")}},{key:"_simulatePendingKeyEvents",value:function(e,t){var n=this;0<this[e].length&&xe.incrementId(),this[e].forEach(function(e){var o=e.event,i=e.focusTreeId,r=e.componentId,s=e.options;n[t](o,i,r,s)}),this[e]=[]}},{key:"_callHandlerIfActionNotHandled",value:function(e,t,n,o,i){this.getCurrentCombination().describe();if(this.componentList.anyActionsForEventType(n))if(this.eventPropagator.isHandled());else{var r=this.eventPropagator.getPreviousPosition(),s=this.componentList.getIndexById(o);this._callClosestMatchingHandler(e,t,n,s,-1===r?0:r)&&this.eventPropagator.setHandled()}}},{key:"_logPrefix",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=P.logIcons,o=P.eventIcons,i=P.componentIcons,r="HotKeys (";if(!1!==t.focusTreeId){var s=ae(t.focusTreeId)?this.focusTreeId:t.focusTreeId;r+="F".concat(s).concat(n[s%n.length],"-")}if(!1!==t.eventId){var a=ae(t.eventId)?xe.getId():t.eventId;r+="E".concat(a).concat(o[a%o.length],"-")}r+="C".concat(e).concat(i[e%i.length]);var u=this.componentList.getIndexById(e);return ae(u)||(r+="-P".concat(u).concat(i[u%i.length],":")),"".concat(r,")")}}]),t}();function Be(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return Array.isArray(e)||D(e)?n.stringifyFirst?!ae(e.find(function(e){return e.toString()===t.toString()})):-1!==e.indexOf(t):le(e)?x(e,t):n.stringifyFirst?e.toString()===t.toString():e===t}function Ge(e){return e.replace(/\b\w/g,function(e){return e.toUpperCase()})}var We=function(e){function t(){var e,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},o=1<arguments.length?arguments[1]:void 0;return u(this,t),(e=b(this,v(t).call(this,n,o))).listenersBound=!1,e.eventOptions={ignoreEventsCondition:w.option("ignoreEventsCondition")},e.listeners={},e}return y(t,He),l(t,[{key:"enableHotKeys",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=3<arguments.length?arguments[3]:void 0,i=4<arguments.length?arguments[4]:void 0;this.eventOptions=i,this._addComponent(e,t,n,o),this._updateDocumentHandlers(),this._initHandlerResolutionState()}},{key:"updateEnabledHotKeys",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=3<arguments.length?arguments[3]:void 0,i=4<arguments.length?arguments[4]:void 0;this.eventOptions=i,this.componentList.update(e,t,n,o),this.getKeyHistory().setMaxLength(this.componentList.getLongestSequence()),this._updateDocumentHandlers(),this._initHandlerResolutionState()}},{key:"disableHotKeys",value:function(e){this.componentList.remove(e),this.getKeyHistory().setMaxLength(this.componentList.getLongestSequence()),this._updateDocumentHandlers(),this._initHandlerResolutionState()}},{key:"_updateDocumentHandlers",value:function(){var e=this,t=this._listenersShouldBeBound();!this.listenersBound&&t?(Object.values(O).forEach(function(t){var n=Pe(t);document["on".concat(n)]=function(t){e.keyEventManager["handleGlobal".concat(function(e){return"".concat(Ge(e.slice(0,3))).concat(Ge(e.slice(3)))}(n))](t)}}),this.listenersBound=!0):this.listenersBound&&!t&&(Object.values(O).forEach(function(e){var t=Pe(e);delete document["on".concat(t)]}),this.listenersBound=!1)}},{key:"_listenersShouldBeBound",value:function(){return this.componentList.any()||this.listeners.keyCombination}},{key:"handleKeydown",value:function(e){var t=Le(e);if(e.repeat&&w.option("ignoreRepeatedEventsWhenKeyHeldDown"))return!0;this._checkForModifierFlagDiscrepancies(e,t,O.keydown);var n=this._howReactAppRespondedTo(e,t,O.keydown);if(n!==Ne||!this.eventOptions.ignoreEventsCondition(e)){if(n!==De){var o=Oe(e),i=this.getCurrentCombination();i.isKeyIncluded(t)||i.isEnding()?this._startAndLogNewKeyCombination(t,o):this._addToAndLogCurrentKeyCombination(t,O.keydown,o)}Be([De,qe],n)||this._callHandlerIfExists(e,t,O.keydown),this._simulateKeyPressForNonPrintableKeys(e,t)}}},{key:"_howReactAppRespondedTo",value:function(e,t,n){var o=this.keyEventManager.reactAppHistoryWithEvent(t,n);return o===qe||(o===De||(o===je||xe.incrementId())),o}},{key:"handleKeyPress",value:function(e){var t=Le(e);if(e.repeat&&w.option("ignoreRepeatedEventsWhenKeyHeldDown"))return!0;var n=this.getCurrentCombination();if(n.isKeyPressSimulated(t))return!0;var o=this._howReactAppRespondedTo(e,t,O.keypress);return n.isKeyIncluded(t)&&this._addToAndLogCurrentKeyCombination(t,O.keypress,Oe(e)),o===Ne&&(this.keyEventManager.closeHangingKeyCombination(t,O.keypress),this.eventOptions.ignoreEventsCondition(e))?void 0:void(!Be([De,qe],o)&&this._callHandlerIfExists(e,t,O.keypress))}},{key:"handleKeyUp",value:function(e){var t=Le(e),n=this.getCurrentCombination();if(n.isKeyUpSimulated(t))return!0;var o=this._howReactAppRespondedTo(e,t,O.keyup);n.isKeyIncluded(t)&&this._addToAndLogCurrentKeyCombination(t,O.keyup,Oe(e)),o===Ne?(this.keyEventManager.closeHangingKeyCombination(t,O.keyup),this.eventOptions.ignoreEventsCondition(e)||!Be([De,qe],o)&&this._callHandlerIfExists(e,t,O.keyup)):!Be([De,qe],o)&&this._callHandlerIfExists(e,t,O.keyup),this._simulateKeyUpEventsHiddenByCmd(e,t),this.listeners.keyCombination&&this._allKeysAreReleased()&&this.listeners.keyCombination({keys:n.getKeyDictionary(),id:n.describe()})}},{key:"_simulateKeyPressForNonPrintableKeys",value:function(e,t){this.keyEventManager.simulatePendingKeyPressEvents(),this._handleEventSimulation("handleKeyPress",this._shouldSimulate(O.keypress,t),{event:e,key:t})}},{key:"_simulateKeyUpEventsHiddenByCmd",value:function(e,t){var n=this;Fe(t)&&(this.keyEventManager.simulatePendingKeyUpEvents(),this.getCurrentCombination().forEachKey(function(t){Fe(t)||n._handleEventSimulation("handleKeyUp",n._shouldSimulate(O.keyup,t),{event:e,key:t})}))}},{key:"_startAndLogNewKeyCombination",value:function(e,t){this.getKeyHistory().startNewKeyCombination(e,t)}},{key:"_addToAndLogCurrentKeyCombination",value:function(e,t,n){this.getKeyHistory().addKeyToCurrentCombination(e,t,n)}},{key:"_handleEventSimulation",value:function(e,t,n){var o=n.event,i=n.key;if(t&&w.option("simulateMissingKeyPressEvents")){var r=this._cloneAndMergeEvent(o,{key:i,simulated:!0});this[e](r)}}},{key:"_callHandlerIfExists",value:function(e,t,n){this.getCurrentCombination().describe();return this.componentList.anyActionsForEventType(n)?void this._callClosestMatchingHandler(e,t,n):void 0}},{key:"_callClosestMatchingHandler",value:function(e,n,o){for(var i=this.componentList.getNewIterator();i.next();)if(E(v(t.prototype),"_callClosestMatchingHandler",this).call(this,e,n,o,i.getPosition(),0))return}},{key:"_stopEventPropagation",value:function(e,t){e.simulated||e.stopPropagation()}},{key:"addKeyCombinationListener",value:function(e){var t=this,n=function(){delete t.listeners.keyCombination};return this.listeners.keyCombination=function(t){e(t),n()},this._updateDocumentHandlers(),n}},{key:"_logPrefix",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=P.eventIcons,o=P.componentIcons,i="HotKeys (GLOBAL";if(!1!==t.eventId){var r=ae(t.eventId)?xe.getId():t.eventId;i="".concat(i,"-E").concat(r).concat(n[r%n.length])}return ae(e)?"".concat(i,"):"):"".concat(i,"-C").concat(e).concat(o[e%o.length],"):")}}]),t}();function ze(e){return!ae(e)}var Je=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};u(this,e),this.logger=t.logger||new P(w.option("logLevel")),this._focusOnlyEventStrategy=new Ue({configuration:t,logger:this.logger},this),this._globalEventStrategy=new We({configuration:t,logger:this.logger},this),this.mountedComponentsCount=0}return l(e,null,[{key:"getInstance",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.instance||(this.instance=new e(t)),this.instance}},{key:"clear",value:function(){delete this.instance}}]),l(e,[{key:"getApplicationKeyMap",value:function(){return Object.assign(this._globalEventStrategy.getApplicationKeyMap(),this._focusOnlyEventStrategy.getApplicationKeyMap())}},{key:"registerKeyMap",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this._focusOnlyEventStrategy.registerKeyMap(e)}},{key:"reregisterKeyMap",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this._focusOnlyEventStrategy.reregisterKeyMap(e,t)}},{key:"deregisterKeyMap",value:function(e){this._focusOnlyEventStrategy.deregisterKeyMap(e)}},{key:"registerComponentMount",value:function(e,t){return this._incrementComponentCount(),this._focusOnlyEventStrategy.registerComponentMount(e,t)}},{key:"registerComponentUnmount",value:function(){this._decrementComponentCount()}},{key:"_incrementComponentCount",value:function(){var e=this,t=this.mountedComponentsCount;this.mountedComponentsCount+=1,0===t&&1===this.mountedComponentsCount&&(window.onblur=function(){return e._clearKeyHistory()})}},{key:"_decrementComponentCount",value:function(){var e=this.mountedComponentsCount;this.mountedComponentsCount-=1,1===e&&0===this.mountedComponentsCount&&delete window.onblur}},{key:"_clearKeyHistory",value:function(){this._focusOnlyEventStrategy.resetKeyHistory({force:!0}),this._globalEventStrategy.resetKeyHistory({force:!0})}},{key:"registerGlobalKeyMap",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this._globalEventStrategy.registerKeyMap(e)}},{key:"registerGlobalComponentUnmount",value:function(){this._decrementComponentCount()}},{key:"registerGlobalComponentMount",value:function(e,t){return this._incrementComponentCount(),this._globalEventStrategy.registerComponentMount(e,t)}},{key:"reregisterGlobalKeyMap",value:function(e,t){this._globalEventStrategy.reregisterKeyMap(e,t)}},{key:"deregisterGlobalKeyMap",value:function(e){this._globalEventStrategy.deregisterKeyMap(e)}},{key:"addKeyCombinationListener",value:function(e){return this._globalEventStrategy.addKeyCombinationListener(e)}},{key:"enableHotKeys",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=3<arguments.length?arguments[3]:void 0;return this._focusOnlyEventStrategy.enableHotKeys(e,t,n,o)}},{key:"updateEnabledHotKeys",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},i=4<arguments.length?arguments[4]:void 0;return this._focusOnlyEventStrategy.updateEnabledHotKeys(e,t,n,o,i)}},{key:"disableHotKeys",value:function(e,t){return this._focusOnlyEventStrategy.disableHotKeys(e,t)}},{key:"handleKeydown",value:function(e,t,n,o){if(ze(t))return this._focusOnlyEventStrategy.handleKeydown(e,t,n,o)}},{key:"handleKeyPress",value:function(e,t,n,o){if(ze(t))return this._focusOnlyEventStrategy.handleKeyPress(e,t,n,o)}},{key:"handleKeyUp",value:function(e,t,n,o){if(ze(t))return this._focusOnlyEventStrategy.handleKeyUp(e,t,n,o)}},{key:"enableGlobalHotKeys",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=3<arguments.length?arguments[3]:void 0,i=4<arguments.length?arguments[4]:void 0;return this._globalEventStrategy.enableHotKeys(e,t,n,o,i)}},{key:"updateEnabledGlobalHotKeys",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=3<arguments.length?arguments[3]:void 0,i=4<arguments.length?arguments[4]:void 0;return this._globalEventStrategy.updateEnabledHotKeys(e,t,n,o,i)}},{key:"disableGlobalHotKeys",value:function(e){return this._globalEventStrategy.disableHotKeys(e)}},{key:"handleGlobalKeyDown",value:function(e){return this._globalEventStrategy.handleKeydown(e)}},{key:"handleGlobalKeyPress",value:function(e){return this._globalEventStrategy.handleKeyPress(e)}},{key:"handleGlobalKeyUp",value:function(e){return this._globalEventStrategy.handleKeyUp(e)}},{key:"ignoreEvent",value:function(e){this._focusOnlyEventStrategy.getEventPropagator().ignoreEvent(e)}},{key:"observeIgnoredEvents",value:function(e){this._focusOnlyEventStrategy.getEventPropagator().observeIgnoredEvents(e)}},{key:"closeHangingKeyCombination",value:function(e,t){this._focusOnlyEventStrategy.closeHangingKeyCombination(e,t)}},{key:"reactAppHistoryWithEvent",value:function(e,t){var n=this._focusOnlyEventStrategy.eventPropagator.getPreviousPropagation();return n.isForKey(e)&&n.isForEventType(t)?n.isHandled()?qe:n.isIgnoringEvent()?De:je:Ne}},{key:"simulatePendingKeyPressEvents",value:function(){this._focusOnlyEventStrategy.simulatePendingKeyPressEvents()}},{key:"simulatePendingKeyUpEvents",value:function(){this._focusOnlyEventStrategy.simulatePendingKeyUpEvents()}},{key:"isGlobalListenersBound",value:function(){return this._globalEventStrategy.listenersBound}}]),e}();function Ve(e,t){var n=t.deprecatedAPI,o=n.contextTypes,i=n.childContextTypes,r=t.newAPI.contextType;if("undefined"==typeof s.a.createContext)e.contextTypes=o,e.childContextTypes=i,e.prototype.getChildContext=function(){return this._childContext};else{var a=s.a.createContext(r);e.contextType=a,e.prototype._originalRender=e.prototype.render,e.prototype.render=function(){var e=this._originalRender();return e?s.a.createElement(a.Provider,{value:this._childContext},e):null}}return e}function $e(e){function t(e,t){return f({},a[e]||{},t[e]||{})}function n(e){return t("handlers",e)}function o(e){return t("keyMap",e)}var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},c=function(t){function i(e){var t;return u(this,i),(t=b(this,v(i).call(this,e)))._handleFocus=t._handleFocus.bind(k(k(t))),t._handleBlur=t._handleBlur.bind(k(k(t))),t._handleKeyDown=t._handleKeyDown.bind(k(k(t))),t._handleKeyPress=t._handleKeyPress.bind(k(k(t))),t._handleKeyUp=t._handleKeyUp.bind(k(k(t))),t._componentIsFocused=t._componentIsFocused.bind(k(k(t))),t._id=Je.getInstance().registerKeyMap(e.keyMap),t._childContext={hotKeysParentId:t._id},t}return y(i,r["PureComponent"]),l(i,[{key:"render",value:function(){var t=this.props,n=(t.keyMap,t.handlers,t.allowChanges,t.root,_(t,["keyMap","handlers","allowChanges","root"])),o={onFocus:this._wrapFunction("onFocus",this._handleFocus),onBlur:this._wrapFunction("onBlur",this._handleBlur),tabIndex:w.option("defaultTabIndex")};return this._shouldBindKeyListeners()&&(o.onKeyDown=this._handleKeyDown,o.onKeyPress=this._handleKeyPress,o.onKeyUp=this._handleKeyUp),s.a.createElement(e,h({hotKeys:o},n))}},{key:"_shouldBindKeyListeners",value:function(){var e=o(this.props);return!de(e)||this.props.root||w.option("enableHardSequences")&&this._handlersIncludeHardSequences(e,n(this.props))}},{key:"_handlersIncludeHardSequences",value:function(e,t){return Object.keys(t).some(function(t){return!e[t]&&ie.isValidKeySerialization(t)})}},{key:"_wrapFunction",value:function(e,t){var n=this;return"function"==typeof this.props[e]?function(o){n.props[e](o),t(o)}:t}},{key:"_focusTreeIdsPush",value:function(e){this._focusTreeIds||(this._focusTreeIds=[]),this._focusTreeIds.push(e)}},{key:"_focusTreeIdsShift",value:function(){this._focusTreeIds&&this._focusTreeIds.shift()}},{key:"_getFocusTreeId",value:function(){if(this._focusTreeIds)return this._focusTreeIds[0]}},{key:"componentDidUpdate",value:function(){var e=Je.getInstance();if(e.reregisterKeyMap(this._id,this.props.keyMap),this._componentIsFocused()&&(this.props.allowChanges||!w.option("ignoreKeymapAndHandlerChangesByDefault"))){var t=this.props,n=t.keyMap,o=t.handlers;e.updateEnabledHotKeys(this._getFocusTreeId(),this._id,n,o,this._getComponentOptions())}}},{key:"_componentIsFocused",value:function(){return!0===this._focused}},{key:"componentDidMount",value:function(){var e=Je.getInstance(),t=this.context.hotKeysParentId;e.registerComponentMount(this._id,t)}},{key:"_handleFocus",value:function(){var e;this.props.onFocus&&(e=this.props).onFocus.apply(e,arguments);var t=Je.getInstance().enableHotKeys(this._id,o(this.props),n(this.props),this._getComponentOptions());ae(t)||this._focusTreeIdsPush(t),this._focused=!0}},{key:"componentWillUnmount",value:function(){var e=Je.getInstance();e.deregisterKeyMap(this._id),e.registerComponentUnmount(),this._handleBlur()}},{key:"_handleBlur",value:function(){var e;this.props.onBlur&&(e=this.props).onBlur.apply(e,arguments);Je.getInstance().disableHotKeys(this._getFocusTreeId(),this._id)||this._focusTreeIdsShift(),this._focused=!1}},{key:"_handleKeyDown",value:function(e){Je.getInstance().handleKeydown(e,this._getFocusTreeId(),this._id,this._getEventOptions())&&this._focusTreeIdsShift()}},{key:"_handleKeyPress",value:function(e){Je.getInstance().handleKeyPress(e,this._getFocusTreeId(),this._id,this._getEventOptions())&&this._focusTreeIdsShift()}},{key:"_handleKeyUp",value:function(e){Je.getInstance().handleKeyUp(e,this._getFocusTreeId(),this._id,this._getEventOptions())&&this._focusTreeIdsShift()}},{key:"_getComponentOptions",value:function(){return{defaultKeyEvent:w.option("defaultKeyEvent")}}},{key:"_getEventOptions",value:function(){return{ignoreEventsCondition:w.option("ignoreEventsCondition")}}}]),i}();return d(c,"propTypes",{keyMap:i.a.object,handlers:i.a.object,onFocus:i.a.func,onBlur:i.a.func,allowChanges:i.a.bool,root:i.a.bool}),Ve(c,{deprecatedAPI:{contextTypes:{hotKeysParentId:i.a.number},childContextTypes:{hotKeysParentId:i.a.number}},newAPI:{contextType:{hotKeysParentId:void 0}}})}var Ye=$e(function(e){function t(){return u(this,t),b(this,v(t).apply(this,arguments))}return y(t,r["Component"]),l(t,[{key:"render",value:function(){var e=this.props,t=e.hotKeys,n=e.innerRef,o=e.component,i=_(e,["hotKeys","innerRef","component"]),r=o||w.option("defaultComponent");return s.a.createElement(r,f({},t,{ref:n},i))}}]),t}());Ye.propTypes={innerRef:i.a.oneOfType([i.a.object,i.a.func])};var Qe=function(e){function t(e){var n;return u(this,t),(n=b(this,v(t).call(this,e)))._id=Je.getInstance().registerGlobalKeyMap(e.keyMap),n._childContext={globalHotKeysParentId:n._id},n}return y(t,r["Component"]),l(t,[{key:"render",value:function(){return this.props.children||null}},{key:"componentDidUpdate",value:function(){var e=Je.getInstance();if(e.reregisterGlobalKeyMap(this._id,this.props.keyMap),this.props.allowChanges||!w.option("ignoreKeymapAndHandlerChangesByDefault")){var t=this.props,n=t.keyMap,o=t.handlers;e.updateEnabledGlobalHotKeys(this._id,n,o,this._getComponentOptions(),this._getEventOptions())}}},{key:"componentDidMount",value:function(){var e=this.props,t=e.keyMap,n=e.handlers,o=this.context.globalHotKeysParentId,i=Je.getInstance();i.registerGlobalComponentMount(this._id,o),i.enableGlobalHotKeys(this._id,t,n,this._getComponentOptions(),this._getEventOptions())}},{key:"componentWillUnmount",value:function(){var e=Je.getInstance();e.deregisterGlobalKeyMap(this._id),e.disableGlobalHotKeys(this._id),e.registerGlobalComponentUnmount()}},{key:"_getComponentOptions",value:function(){return{defaultKeyEvent:w.option("defaultKeyEvent")}}},{key:"_getEventOptions",value:function(){return{ignoreEventsCondition:w.option("ignoreEventsCondition")}}}]),t}();d(Qe,"propTypes",{keyMap:i.a.object,handlers:i.a.object,allowChanges:i.a.bool});var Xe=Ve(Qe,{deprecatedAPI:{contextTypes:{globalHotKeysParentId:i.a.number},childContextTypes:{globalHotKeysParentId:i.a.number}},newAPI:{contextType:{globalHotKeysParentId:void 0}}});function Ze(e){var t,n,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{only:[],except:[]},a=2<arguments.length?arguments[2]:void 0;return n=t=function(t){function n(e){var t;return u(this,n),(t=b(this,v(n).call(this,e)))._handleKeyEvent=t._handleKeyEvent.bind(k(k(t))),t._reloadDictionaries=t._reloadDictionaries.bind(k(k(t))),t}return y(n,r["PureComponent"]),l(n,[{key:"render",value:function(){var t=this.props,n=(t.only,t.except,_(t,["only","except"])),o={onKeyDown:this._handleKeyEvent,onKeyPress:this._handleKeyEvent,onKeyUp:this._handleKeyEvent,onFocus:this._reloadDictionaries};return s.a.createElement(e,h({hotKeys:o},n))}},{key:"_reloadDictionaries",value:function(){var e=this.props,t=e.only,n=e.except;this._onlyDict=et(t),this._exceptDict=et(n)}},{key:"_shouldIgnoreEvent",value:function(e){var t=e.key;return de(this._onlyDict)?!!de(this._exceptDict)||!x(this._exceptDict,t):de(this._exceptDict)?x(this._onlyDict,t):x(this._onlyDict,t)&&!x(this._exceptDict,t)}},{key:"_handleKeyEvent",value:function(e){this._shouldIgnoreEvent(e)&&Je.getInstance()[a](e)}}]),n}(),d(t,"propTypes",{only:i.a.oneOfType([i.a.string,i.a.arrayOf(i.a.string)]),except:i.a.oneOfType([i.a.string,i.a.arrayOf(i.a.string)])}),d(t,"defaultProps",o),n}function et(e){return pe(e).reduce(function(e,t){var n=R(t);if(!W(n))throw new z(t);return[oe,ne,H,F,Z,X].forEach(function(t){e[t(n)]=!0}),e},{})}var tt=Ze(function(e){function t(){return u(this,t),b(this,v(t).apply(this,arguments))}return y(t,r["Component"]),l(t,[{key:"render",value:function(){var e=this.props,t=e.hotKeys,n=_(e,["hotKeys"]),o=n.component||w.option("defaultComponent");return s.a.createElement(o,f({},t,n))}}]),t}(),{},"ignoreEvent"),nt=Ze(function(e){function t(){return u(this,t),b(this,v(t).apply(this,arguments))}return y(t,r["Component"]),l(t,[{key:"render",value:function(){var e=this.props,t=e.hotKeys,n=_(e,["hotKeys"]),o=n.component||w.option("defaultComponent");return s.a.createElement(o,f({},t,n))}}]),t}(),{},"observeIgnoredEvents");function ot(e){return Ze(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{only:[],except:[]},"ignoreEvent")}function it(e){return Ze(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{only:[],except:[]},"observeIgnoredEvents")}function rt(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};w.init(e)}function st(){return Je.getInstance().getApplicationKeyMap()}function at(e){return Je.getInstance().addKeyCombinationListener(e)}},468:function(e,t,n){"use strict";var o=n(35),i=n(8),r=n(2),s=n.n(r);function a(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}var u=new WeakMap;function c(e,t){var n=function(e,t){var n=Object(r.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}(t||null,function(t){return e.forEach(function(e){return a(e,t)})});return r.useLayoutEffect(function(){var t=u.get(n);if(t){var o=new Set(t),i=new Set(e),r=n.current;o.forEach(function(e){i.has(e)||a(e,null)}),i.forEach(function(e){o.has(e)||a(e,r)})}u.set(n,e)},[e]),n}var l={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},d=function(e){var t=e.children,n=void 0===t?null:t;return r.createElement(r.Fragment,null,r.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:l}),n,n&&r.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:l}))};d.propTypes={};var h=function(){return(h=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.create;Object.create;"function"===typeof SuppressedError&&SuppressedError;function f(e){return e}function y(e,t){void 0===t&&(t=f);var n=[],o=!1;return{read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,o);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(o=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){o=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var r=function(){var n=t;t=[],n.forEach(e)},s=function(){return Promise.resolve().then(r)};s(),n={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),n}}}}}function v(e,t){return void 0===t&&(t=f),y(e,t)}var p=v({},function(e){return{target:e.target,currentTarget:e.currentTarget}}),g=v(),m=v(),_=function(e){void 0===e&&(e={});var t=y(null);return t.options=h({async:!0,ssr:!1},e),t}({async:!0,ssr:"undefined"!==typeof document}),k=Object(r.createContext)(void 0),b=[],E=r.forwardRef(function(e,t){var n,o=r.useState(),s=o[0],a=o[1],u=r.useRef(),d=r.useRef(!1),h=r.useRef(null),f=r.useState({})[1],y=e.children,v=e.disabled,m=void 0!==v&&v,E=e.noFocusGuards,K=void 0!==E&&E,C=e.persistentFocus,I=void 0!==C&&C,S=e.crossFrame,w=void 0===S||S,P=e.autoFocus,O=void 0===P||P,M=(e.allowTextSelection,e.group),T=e.className,H=e.whiteList,x=e.hasPositiveIndices,A=e.shards,L=void 0===A?b:A,F=e.as,N=void 0===F?"div":F,D=e.lockProps,j=void 0===D?{}:D,q=e.sideCar,R=e.returnFocus,U=void 0!==R&&R,B=e.focusOptions,G=e.onActivation,W=e.onDeactivation,z=r.useState({})[0],J=r.useCallback(function(e){var t=e.captureFocusRestore;if(!h.current){var n,o=null==(n=document)?void 0:n.activeElement;h.current=o,o!==document.body&&(h.current=t(o))}u.current&&G&&G(u.current),d.current=!0,f()},[G]),V=r.useCallback(function(){d.current=!1,W&&W(u.current),f()},[W]),$=r.useCallback(function(e){var t=h.current;if(t){var n=("function"===typeof t?t():t)||document.body,o="function"===typeof U?U(n):U;if(o){var i="object"===typeof o?o:void 0;h.current=null,e?Promise.resolve().then(function(){return n.focus(i)}):n.focus(i)}}},[U]),Y=r.useCallback(function(e){d.current&&p.useMedium(e)},[]),Q=g.useMedium,X=r.useCallback(function(e){u.current!==e&&(u.current=e,a(e))},[]);var Z=Object(i.a)(((n={})["data-focus-lock-disabled"]=m&&"disabled",n["data-focus-lock"]=M,n),j),ee=!0!==K,te=ee&&"tail"!==K,ne=c([t,X]),oe=r.useMemo(function(){return{observed:u,shards:L,enabled:!m,active:d.current}},[m,d.current,L,s]);return r.createElement(r.Fragment,null,ee&&[r.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:m?-1:0,style:l}),x?r.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:m?-1:1,style:l}):null],!m&&r.createElement(q,{id:z,sideCar:_,observed:s,disabled:m,persistentFocus:I,crossFrame:w,autoFocus:O,whiteList:H,shards:L,onActivation:J,onDeactivation:V,returnFocus:$,focusOptions:B}),r.createElement(N,Object(i.a)({ref:ne},Z,{className:T,onBlur:Q,onFocus:Y}),r.createElement(k.Provider,{value:oe},y)),te&&r.createElement("div",{"data-focus-guard":!0,tabIndex:m?-1:0,style:l}))});E.propTypes={};var K=E,C=n(50),I=n(110);var S=function(e,t){return function(n){var o,i=[];function a(){o=e(i.map(function(e){return e.props})),t(o)}var u=function(e){function t(){return e.apply(this,arguments)||this}Object(C.a)(t,e),t.peek=function(){return o};var r=t.prototype;return r.componentDidMount=function(){i.push(this),a()},r.componentDidUpdate=function(){a()},r.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),a()},r.render=function(){return s.a.createElement(n,this.props)},t}(r.PureComponent);return Object(I.a)(u,"displayName","SideEffect("+function(e){return e.displayName||e.name||"Component"}(n)+")"),u}},w=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},P=function(e){return Array.isArray(e)?e:[e]},O=function(e){return Array.isArray(e)?e[0]:e},M=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},T=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},H=function(e,t){return!e||T(e)||!function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!(!t||!t.getPropertyValue)&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility"))}(e)&&!function(e){return e.hasAttribute("inert")}(e)&&t(M(e))},x=function e(t,n){var o=t.get(n);if(void 0!==o)return o;var i=function(e,t){return!(e&&!T(e))||!!N(e)&&t(M(e))}(n,e.bind(void 0,t));return t.set(n,i),i},A=function(e){return e.dataset},L=function(e){return"INPUT"===e.tagName},F=function(e){return L(e)&&"radio"===e.type},N=function(e){var t=e.getAttribute("data-no-autofocus");return![!0,"true",""].includes(t)},D=function(e){var t;return Boolean(e&&(null===(t=A(e))||void 0===t?void 0:t.focusGuard))},j=function(e){return!D(e)},q=function(e){return Boolean(e)},R=function(e,t){var n=Math.max(0,e.tabIndex),o=Math.max(0,t.tabIndex),i=n-o,r=e.index-t.index;if(i){if(!n)return 1;if(!o)return-1}return i||r},U=function(e,t,n){return w(e).map(function(e,t){var o=function(e){return e.tabIndex<0&&!e.hasAttribute("tabindex")?0:e.tabIndex}(e);return{node:e,index:t,tabIndex:n&&-1===o?(e.dataset||{}).focusGuard?0:-1:o}}).filter(function(e){return!t||e.tabIndex>=0}).sort(R)},B=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),G="".concat(B,", [data-focus-guard]"),W=function(e,t){return e.reduce(function(e,n){var o,i=function e(t,n){return w((t.shadowRoot||t).children).reduce(function(t,o){return t.concat(o.matches(n?G:B)?[o]:[],e(o))},[])}(n,t),r=(o=[]).concat.apply(o,i.map(function(e){return function(e,t){var n;return e instanceof HTMLIFrameElement&&(null===(n=e.contentDocument)||void 0===n?void 0:n.body)?W([e.contentDocument.body],t):[e]}(e,t)}));return e.concat(r,n.parentNode?w(n.parentNode.querySelectorAll(B)).filter(function(e){return e===n}):[])},[])},z=function(e,t){return w(e).filter(function(e){return function e(t,n){var o=t.get(n);if(void 0!==o)return o;var i=H(n,e.bind(void 0,t));return t.set(n,i),i}(t,e)}).filter(function(e){return function(e){return!((L(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled))}(e)})},J=function(e,t){return void 0===t&&(t=new Map),w(e).filter(function(e){return x(t,e)})},V=function(e,t,n){return U(z(W(e,n),t),!0,n)},$=function(e,t){return U(z(W(e),t),!1)},Y=function(e,t){return z(function(e){var t=e.querySelectorAll("[".concat("data-autofocus-inside","]"));return w(t).map(function(e){return W([e])}).reduce(function(e,t){return e.concat(t)},[])}(e),t)},Q=function e(t,n){return t.shadowRoot?e(t.shadowRoot,n):!(void 0===Object.getPrototypeOf(t).contains||!Object.getPrototypeOf(t).contains.call(t,n))||w(t.children).some(function(t){var o;if(t instanceof HTMLIFrameElement){var i=null===(o=t.contentDocument)||void 0===o?void 0:o.body;return!!i&&e(i,n)}return e(t,n)})},X=function e(t){if(void 0===t&&(t=document),t&&t.activeElement){var n=t.activeElement;return n.shadowRoot?e(n.shadowRoot):n instanceof HTMLIFrameElement&&function(e){try{return e()}catch(t){return}}(function(){return n.contentWindow.document})?e(n.contentWindow.document):n}},Z=function(e){return P(e).filter(Boolean).reduce(function(e,t){var n=t.getAttribute("data-focus-lock");return e.push.apply(e,n?function(e){for(var t=new Set,n=e.length,o=0;o<n;o+=1)for(var i=o+1;i<n;i+=1){var r=e[o].compareDocumentPosition(e[i]);(r&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(r&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(o)}return e.filter(function(e,n){return!t.has(n)})}(w(function e(t){return t.parentNode?e(t.parentNode):t}(t).querySelectorAll("[".concat("data-focus-lock",'="').concat(n,'"]:not([').concat("data-focus-lock-disabled",'="disabled"])')))):[t]),e},[])},ee=function(e,t){return void 0===t&&(t=X(O(e).ownerDocument)),!(!t||t.dataset&&t.dataset.focusGuard)&&Z(e).some(function(e){return Q(e,t)||function(e,t){return Boolean(w(e.querySelectorAll("iframe")).some(function(e){return function(e,t){return e===t}(e,t)}))}(e,t)})},te=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},ne=function(e,t){return F(e)&&e.name?function(e,t){return t.filter(F).filter(function(t){return t.name===e.name}).filter(function(e){return e.checked})[0]||e}(e,t):e},oe=function(e){return e[0]&&e.length>1?ne(e[0],e):e[0]},ie=function(e,t){return e.indexOf(ne(t,e))},re=function(e,t,n,o,i){var r=e.length,s=e[0],a=e[r-1],u=D(o);if(!(o&&e.indexOf(o)>=0)){var c=void 0!==o?n.indexOf(o):-1,l=i?n.indexOf(i):c,d=i?e.indexOf(i):-1;if(-1===c)return-1!==d?d:"NEW_FOCUS";if(-1===d)return"NEW_FOCUS";var h=c-l,f=n.indexOf(s),y=n.indexOf(a),v=function(e){var t=new Set;return e.forEach(function(n){return t.add(ne(n,e))}),e.filter(function(e){return t.has(e)})}(n),p=(void 0!==o?v.indexOf(o):-1)-(i?v.indexOf(i):c);if(!h&&d>=0)return d;if(0===t.length)return d;var g=ie(e,t[0]),m=ie(e,t[t.length-1]);return c<=f&&u&&Math.abs(h)>1?m:c>=y&&u&&Math.abs(h)>1?g:h&&Math.abs(p)>1?d:c<=f?m:c>y?g:h?Math.abs(h)>1?d:(r+d+h)%r:void 0}},se=function(e,t,n){var o,i=e.map(function(e){return e.node}),r=J(i.filter((o=n,function(e){var t,n=null===(t=A(e))||void 0===t?void 0:t.autofocus;return e.autofocus||void 0!==n&&"false"!==n||o.indexOf(e)>=0})));return r&&r.length?oe(r):oe(J(t))},ae=function e(t,n){return void 0===n&&(n=[]),n.push(t),t.parentNode&&e(t.parentNode.host||t.parentNode,n),n},ue=function(e,t){for(var n=ae(e),o=ae(t),i=0;i<n.length;i+=1){var r=n[i];if(o.indexOf(r)>=0)return r}return!1},ce=function(e,t,n){var o=P(e),i=P(t),r=o[0],s=!1;return i.filter(Boolean).forEach(function(e){s=ue(s||e,e)||s,n.filter(Boolean).forEach(function(e){var t=ue(r,e);t&&(s=!s||Q(t,s)?t:ue(t,s))})}),s},le=function(e,t){return e.reduce(function(e,n){return e.concat(Y(n,t))},[])},de=function(e,t){var n=X(P(e).length>0?document:O(e).ownerDocument),o=Z(e).filter(j),i=ce(n||e,e,o),r=new Map,s=$(o,r),a=s.filter(function(e){var t=e.node;return j(t)});if(a[0]){var u=$([i],r).map(function(e){return e.node}),c=function(e,t){var n=new Map;return t.forEach(function(e){return n.set(e.node,e)}),e.map(function(e){return n.get(e)}).filter(q)}(u,a),l=c.map(function(e){return e.node}),d=c.filter(function(e){return e.tabIndex>=0}).map(function(e){return e.node}),h=re(l,d,u,n,t);if("NEW_FOCUS"===h){var f=se(s,d,le(o,r))||se(s,l,le(o,r));return f?{node:f}:void console.warn("focus-lock: cannot find any node to move focus into")}return void 0===h?h:c[h]}},he=0,fe=!1,ye=function(e,t,n){void 0===n&&(n={});var o=de(e,t);if(!fe&&o){if(he>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),fe=!0,void setTimeout(function(){fe=!1},1);he++,te(o.node,n.focusOptions),he--}},ve=function(e,t,n){void 0===t&&(t={});var o=function(e){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},e)}(t),i=function(e,t,n){if(!e||!t)return console.error("no element or scope given"),{};var o=P(t);if(o.every(function(t){return!Q(t,e)}))return console.error("Active element is not contained in the scope"),{};var i=n?V(o,new Map):$(o,new Map),r=i.findIndex(function(t){return t.node===e});return-1!==r?{prev:i[r-1],next:i[r+1],first:i[0],last:i[i.length-1]}:void 0}(e,o.scope,o.onlyTabbable);if(i){var r=n(i,o.cycle);r&&te(r.node,o.focusOptions)}},pe=function(e,t,n){var o,i=function(e,t){var n=t?V(P(e),new Map):$(P(e),new Map);return{first:n[0],last:n[n.length-1]}}(e,null===(o=t.onlyTabbable)||void 0===o||o)[n];i&&te(i.node,t.focusOptions)};function ge(e){if(!e)return null;var t=e?new WeakRef(e):null;return function(){return(null===t||void 0===t?void 0:t.deref())||null}}function me(e){setTimeout(e,1)}var _e=function(e){return e&&"current"in e?e.current:e},ke=function(){return document&&document.activeElement===document.body||function(e){void 0===e&&(e=document);var t=X(e);return!!t&&w(e.querySelectorAll("[".concat("data-no-focus-lock","]"))).some(function(e){return Q(e,t)})}()},be=null,Ee=null,Ke=null,Ce=!1;function Ie(e,t,n,o){var i=null,r=e;do{var s=o[r];if(s.guard)s.node.dataset.focusAutoGuard&&(i=s);else{if(!s.lockItem)break;if(r!==e)return;i=null}}while((r+=n)!==t);i&&(i.node.tabIndex=0)}var Se=function(){var e,t=!1;if(be){var n=be,o=n.observed,i=n.persistentFocus,r=n.autoFocus,s=n.shards,a=n.crossFrame,u=n.focusOptions,c=o||Ke&&Ke.portaledElement,l=document&&document.activeElement;if(c){var d=[c].concat(s.map(_e).filter(Boolean));if(l&&!function(e){return(be.whiteList||function(){return!0})(e)}(l)||(i||(a?Boolean(Ce):"meanwhile"===Ce)||!ke()||!Ee&&r)&&(c&&!(ee(d)||l&&function(e,t){return t.some(function(t){return function e(t,n,o){return n&&(n.host===t&&(!n.activeElement||o.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,o))}(e,t,t)})}(l,d)||(e=l,Ke&&Ke.portaledElement===e))&&(document&&!Ee&&l&&!r?(l.blur&&l.blur(),document.body.focus()):(t=ye(d,Ee,{focusOptions:u}),Ke={})),Ce=!1,Ee=document&&document.activeElement),document&&l!==document.activeElement&&document.querySelector("[data-focus-auto-guard]")){var h=document&&document.activeElement,f=function(e){var t=Z(e).filter(j),n=ce(e,e,t),o=U(W([n],!0),!0,!0),i=W(t,!1);return o.map(function(e){var t=e.node;return{node:t,index:e.index,lockItem:i.indexOf(t)>=0,guard:D(t)}})}(d),y=f.map(function(e){return e.node}).indexOf(h);y>-1&&(f.filter(function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard}).forEach(function(e){return e.node.removeAttribute("tabIndex")}),Ie(y,f.length,1,f),Ie(y,-1,-1,f))}}}return t},we=function(e){Se()&&e&&(e.stopPropagation(),e.preventDefault())},Pe=function(){return me(Se)},Oe=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||(Ke={observerNode:n,portaledElement:t})},Me=function(){Ce="just",me(function(){Ce="meanwhile"})},Te=function(){document.addEventListener("focusin",we),document.addEventListener("focusout",Pe),window.addEventListener("blur",Me)},He=function(){document.removeEventListener("focusin",we),document.removeEventListener("focusout",Pe),window.removeEventListener("blur",Me)};var xe={moveFocusInside:ye,focusInside:ee,focusNextElement:function(e,t){void 0===t&&(t={}),ve(e,t,function(e,t){var n=e.next,o=e.first;return n||t&&o})},focusPrevElement:function(e,t){void 0===t&&(t={}),ve(e,t,function(e,t){var n=e.prev,o=e.last;return n||t&&o})},focusFirstElement:function(e,t){void 0===t&&(t={}),pe(e,t,"first")},focusLastElement:function(e,t){void 0===t&&(t={}),pe(e,t,"last")},captureFocusRestore:function(e){var t=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:ge(n),parent:ge(n.parentElement),left:ge(n.previousElementSibling),right:ge(n.nextElementSibling)}),n=n.parentElement;return{element:ge(e),stack:t,ownerDocument:e.ownerDocument}}(e);return function(){return function(e){var t,n,o,i,r;if(e)for(var s=e.stack,a=e.ownerDocument,u=new Map,c=0,l=s;c<l.length;c++){var d=l[c],h=null===(t=d.parent)||void 0===t?void 0:t.call(d);if(h&&a.contains(h)){for(var f=null===(n=d.left)||void 0===n?void 0:n.call(d),y=d.current(),v=h.contains(y)?y:void 0,p=null===(o=d.right)||void 0===o?void 0:o.call(d),g=V([h],u),m=null!==(r=null!==(i=null!==v&&void 0!==v?v:null===f||void 0===f?void 0:f.nextElementSibling)&&void 0!==i?i:p)&&void 0!==r?r:f;m;){for(var _=0,k=g;_<k.length;_++){var b=k[_];if(null===m||void 0===m?void 0:m.contains(b.node))return b.node}m=m.nextElementSibling}if(g.length)return g[0].node}}}(t)}}};p.assignSyncMedium(Oe),g.assignMedium(Pe),m.assignMedium(function(e){return e(xe)});var Ae=S(function(e){return e.filter(function(e){return!e.disabled})},function(e){var t=e.slice(-1)[0];t&&!be&&Te();var n=be,o=n&&t&&t.id===n.id;be=t,n&&!o&&(n.onDeactivation(),e.filter(function(e){return e.id===n.id}).length||n.returnFocus(!t)),t?(Ee=null,o&&n.observed===t.observed||t.onActivation(xe),Se(!0),me(Se)):(He(),Ee=null)})(function(){return null}),Le=r.forwardRef(function(e,t){return r.createElement(K,Object(i.a)({sideCar:Ae,ref:t},e))}),Fe=K.propTypes||{};Fe.sideCar,Object(o.a)(Fe,["sideCar"]);Le.propTypes={};n(727)},689:function(e,t,n){"use strict";e.exports=n(1058)}}]);
//# sourceMappingURL=20.99f7d304.chunk.js.map