(self.webpackChunknodebb=self.webpackChunknodebb||[]).push([[6411],{6411:(w,T,B)=>{var M;(function(q,b,N){if(!q)return;for(var h={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},L={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},m={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},x={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},k,p=1;p<20;++p)h[111+p]="f"+p;for(p=0;p<=9;++p)h[p+96]=p.toString();function K(r,e,n){if(r.addEventListener){r.addEventListener(e,n,!1);return}r.attachEvent("on"+e,n)}function D(r){if(r.type=="keypress"){var e=String.fromCharCode(r.which);return r.shiftKey||(e=e.toLowerCase()),e}return h[r.which]?h[r.which]:L[r.which]?L[r.which]:String.fromCharCode(r.which).toLowerCase()}function U(r,e){return r.sort().join(",")===e.sort().join(",")}function V(r){var e=[];return r.shiftKey&&e.push("shift"),r.altKey&&e.push("alt"),r.ctrlKey&&e.push("ctrl"),r.metaKey&&e.push("meta"),e}function H(r){if(r.preventDefault){r.preventDefault();return}r.returnValue=!1}function W(r){if(r.stopPropagation){r.stopPropagation();return}r.cancelBubble=!0}function C(r){return r=="shift"||r=="ctrl"||r=="alt"||r=="meta"}function X(){if(!k){k={};for(var r in h)r>95&&r<112||h.hasOwnProperty(r)&&(k[h[r]]=r)}return k}function Y(r,e,n){return n||(n=X()[r]?"keydown":"keypress"),n=="keypress"&&e.length&&(n="keydown"),n}function $(r){return r==="+"?["+"]:(r=r.replace(/\+{2}/g,"+plus"),r.split("+"))}function I(r,e){var n,o,_,y=[];for(n=$(r),_=0;_1){G(t,v,f,s);return}a=I(t,s),e._callbacks[a.key]=e._callbacks[a.key]||[],F(a.key,a.modifiers,{type:a.action},i,t,u),e._callbacks[a.key][i?"unshift":"push"]({callback:f,modifiers:a.modifiers,action:a.action,seq:i,level:u,combo:t})}e._bindMultiple=function(t,f,s){for(var i=0;i-1||R(e,n.target))return!1;if("composedPath"in r&&typeof r.composedPath=="function"){var o=r.composedPath()[0];o!==r.target&&(e=o)}return e.tagName=="INPUT"||e.tagName=="SELECT"||e.tagName=="TEXTAREA"||e.isContentEditable},l.prototype.handleKey=function(){var r=this;return r._handleKey.apply(r,arguments)},l.addKeycodes=function(r){for(var e in r)r.hasOwnProperty(e)&&(h[e]=r[e]);k=null},l.init=function(){var r=l(b);for(var e in r)e.charAt(0)!=="_"&&(l[e]=function(n){return function(){return r[n].apply(r,arguments)}}(e))},l.init(),q.Mousetrap=l,w.exports&&(w.exports=l),M=function(){return l}.call(T,B,T,w),M!==N&&(w.exports=M)})(typeof window<"u"?window:null,typeof window<"u"?document:null)}}]);