1const C=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function L(e,t,i,n){e.addEventListener?e.addEventListener(t,i,n):e.attachEvent&&e.attachEvent("on".concat(t),i)}function E(e,t,i,n){e.removeEventListener?e.removeEventListener(t,i,n):e.detachEvent&&e.detachEvent("on".concat(t),i)}function U(e,t){const i=t.slice(0,t.length-1);for(let n=0;n<i.length;n++)i[n]=e[i[n].toLowerCase()];return i}function I(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");const t=e.split(",");let i=t.lastIndexOf("");for(;i>=0;)t[i-1]+=",",t.splice(i,1),i=t.lastIndexOf("");return t}function z(e,t){const i=e.length>=t.length?e:t,n=e.length>=t.length?t:e;let s=!0;for(let r=0;r<i.length;r++)n.indexOf(i[r])===-1&&(s=!1);return s}const K={backspace:8,"â«":8,tab:9,clear:12,enter:13,"â©":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"âª":20,",":188,".":190,"/":191,"`":192,"-":C?173:189,"=":C?61:187,";":C?59:186,"'":222,"[":219,"]":221,"\\":220},b={"â§":16,shift:16,"â¥":18,alt:18,option:18,"â":17,ctrl:17,control:17,"â":91,cmd:91,command:91},S={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},h={16:!1,18:!1,17:!1,91:!1},u={};for(let e=1;e<20;e++)K["f".concat(e)]=111+e;let l=[],k=null,B="all";const w=new Map,x=e=>K[e.toLowerCase()]||b[e.toLowerCase()]||e.toUpperCase().charCodeAt(0),F=e=>Object.keys(K).find(t=>K[t]===e),N=e=>Object.keys(b).find(t=>b[t]===e);function H(e){B=e||"all"}function v(){return B||"all"}function G(){return l.slice(0)}function R(){return l.map(e=>F(e)||N(e)||String.fromCharCode(e))}function V(){const e=[];return Object.keys(u).forEach(t=>{u[t].forEach(i=>{let{key:n,scope:s,mods:r,shortcut:f}=i;e.push({scope:s,shortcut:f,mods:r,keys:n.split("+").map(o=>x(o))})})}),e}function X(e){const t=e.target||e.srcElement,{tagName:i}=t;let n=!0;const s=i==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(s||i==="TEXTAREA"||i==="SELECT")&&!t.readOnly)&&(n=!1),n}function q(e){return typeof e=="string"&&(e=x(e)),l.indexOf(e)!==-1}function J(e,t){let i,n;e||(e=v());for(const s in u)if(Object.prototype.hasOwnProperty.call(u,s))for(i=u[s],n=0;n<i.length;)i[n].scope===e?i.splice(n,1).forEach(f=>{let{element:o}=f;return A(o)}):n++;v()===e&&H(t||"all")}function Q(e){let t=e.keyCode||e.which||e.charCode;const i=l.indexOf(t);if(i>=0&&l.splice(i,1),e.key&&e.key.toLowerCase()==="meta"&&l.splice(0,l.length),(t===93||t===224)&&(t=91),t in h){h[t]=!1;for(const n in b)b[n]===t&&(m[n]=!1)}}function T(e){if(typeof e>"u")Object.keys(u).forEach(s=>{Array.isArray(u[s])&&u[s].forEach(r=>_(r)),delete u[s]}),A(null);else if(Array.isArray(e))e.forEach(s=>{s.key&&_(s)});else if(typeof e=="object")e.key&&_(e);else if(typeof e=="string"){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];let[s,r]=i;typeof s=="function"&&(r=s,s=""),_({key:e,scope:s,method:r,splitKey:"+"})}}const _=e=>{let{key:t,scope:i,method:n,splitKey:s="+"}=e;I(t).forEach(f=>{const o=f.split(s),c=o.length,a=o[c-1],d=a==="*"?"*":x(a);if(!u[d])return;i||(i=v());const p=c>1?U(b,o):[],y=[];u[d]=u[d].filter(g=>{const O=(n?g.method===n:!0)&&g.scope===i&&z(g.mods,p);return O&&y.push(g.element),!O}),y.forEach(g=>A(g))})};function $(e,t,i,n){if(t.element!==n)return;let s;if(t.scope===i||t.scope==="all"){s=t.mods.length>0;for(const r in h)Object.prototype.hasOwnProperty.call(h,r)&&(!h[r]&&t.mods.indexOf(+r)>-1||h[r]&&t.mods.indexOf(+r)===-1)&&(s=!1);(t.mods.length===0&&!h[16]&&!h[18]&&!h[17]&&!h[91]||s||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(l),t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function D(e,t){const i=u["*"];let n=e.keyCode||e.which||e.charCode;if(!m.filter.call(this,e))return;if((n===93||n===224)&&(n=91),l.indexOf(n)===-1&&n!==229&&l.push(n),["ctrlKey","altKey","shiftKey","metaKey"].forEach(o=>{const c=S[o];e[o]&&l.indexOf(c)===-1?l.push(c):!e[o]&&l.indexOf(c)>-1?l.splice(l.indexOf(c),1):o==="metaKey"&&e[o]&&l.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(l=l.slice(l.indexOf(c))))}),n in h){h[n]=!0;for(const o in b)b[o]===n&&(m[o]=!0);if(!i)return}for(const o in h)Object.prototype.hasOwnProperty.call(h,o)&&(h[o]=e[S[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(l.indexOf(17)===-1&&l.push(17),l.
1indexOf(18)===-1&&l.push(18),h[17]=!0,h[18]=!0);const s=v();if(i)for(let o=0;o<i.length;o++)i[o].scope===s&&(e.type==="keydown"&&i[o].keydown||e.type==="keyup"&&i[o].keyup)&&$(e,i[o],s,t);if(!(n in u))return;const r=u[n],f=r.length;for(let o=0;o<f;o++)if((e.type==="keydown"&&r[o].keydown||e.type==="keyup"&&r[o].keyup)&&r[o].key){const c=r[o],{splitKey:a}=c,d=c.key.split(a),p=[];for(let y=0;y<d.length;y++)p.push(x(d[y]));p.sort().join("")===l.sort().join("")&&$(e,c,s,t)}}function m(e,t,i){l=[];const n=I(e);let s=[],r="all",f=document,o=0,c=!1,a=!0,d="+",p=!1,y=!1;for(i===void 0&&typeof t=="function"&&(i=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(r=t.scope),t.element&&(f=t.element),t.keyup&&(c=t.keyup),t.keydown!==void 0&&(a=t.keydown),t.capture!==void 0&&(p=t.capture),typeof t.splitKey=="string"&&(d=t.splitKey),t.single===!0&&(y=!0)),typeof t=="string"&&(r=t),y&&T(e,r);o<n.length;o++)e=n[o].split(d),s=[],e.length>1&&(s=U(b,e)),e=e[e.length-1],e=e==="*"?"*":x(e),e in u||(u[e]=[]),u[e].push({keyup:c,keydown:a,scope:r,mods:s,shortcut:n[o],method:i,key:n[o],splitKey:d,element:f});if(typeof f<"u"&&window){if(!w.has(f)){const g=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return D(O,f)},j=function(){let O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;D(O,f),Q(O)};w.set(f,{keydownListener:g,keyupListenr:j,capture:p}),L(f,"keydown",g,p),L(f,"keyup",j,p)}if(!k){const g=()=>{l=[]};k={listener:g,capture:p},L(window,"focus",g,p)}}}function W(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(u).forEach(i=>{u[i].filter(s=>s.scope===t&&s.shortcut===e).forEach(s=>{s&&s.method&&s.method()})})}function A(e){const t=Object.values(u).flat();if(t.findIndex(n=>{let{element:s}=n;return s===e})<0){const{keydownListener:n,keyupListenr:s,capture:r}=w.get(e)||{};n&&s&&(E(e,"keyup",s,r),E(e,"keydown",n,r),w.delete(e))}
1if((t.length<=0||w.size<=0)&&(Object.keys(w).forEach(s=>{const{keydownListener:r,keyupListenr:f,capture:o}=w.get(s)||{};r&&f&&(E(s,"keyup",f,o),E(s,"keydown",r,o),w.delete(s))}),w.clear(),Object.keys(u).forEach(s=>delete u[s]),k)){const{listener:s,capture:r}=k;E(window,"focus",s,r),k=null}}const P={getPressedKeyString:R,setScope:H,getScope:v,deleteScope:J,getPressedKeyCodes:G,getAllKeyCodes:V,isPressed:q,filter:X,trigger:W,unbind:T,keyMap:K,modifier:b,modifierMap:S};for(const e in P)Object.prototype.hasOwnProperty.call(P,e)&&(m[e]=P[e]);if(typeof window<"u"){const e=window.hotkeys;m.noConflict=t=>(t&&window.hotkeys===m&&(window.hotkeys=e),m),window.hotkeys=m}function Y(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(i[n[s]]=e[n[s]]);return i}const M={debug:!1,logger:console,dispatchEvent:!0,eventPrefix:!0};class Z{constructor(t,i={}){var n,s,r;this.log=(c,a)=>{this.debug&&(this.logger.groupCollapsed(`%c${this.controller.identifier} %c#${c}`,"color: #3B82F6","color: unset"),this.logger.log(Object.assign({controllerId:this.controllerId},a)),this.logger.groupEnd())},this.warn=c=>{this.logger.warn(`%c${this.controller.identifier} %c${c}`,"color: #3B82F6; font-weight: bold","color: unset")},this.dispatch=(c,a={})=>{if(this.dispatchEvent){const{event:d}=a,p=Y(a,["event"]),y=this.extendedEvent(c,d||null,p);this.targetElement.dispatchEvent(y),this.log("dispatchEvent",Object.assign({eventName:y.type},p))}},this.call=(c,a={})=>{const d=this.controller[c];if(typeof d=="function")return d.call(this.controller,a)},this.extendedEvent=(c,a,d)=>{const{bubbles:p,cancelable:y,composed:g}=a||{bubbles:!0,cancelable:!0,composed:!0};return a&&Object.assign(d,{originalEvent:a}),new CustomEvent(this.composeEventName(c),{bubbles:p,cancelable:y,composed:g,detail:d})},this.composeEventName=c=>{let a=c;return this.eventPrefix===!0?a=`${this.controller.identifier}:${c}`:typeof this.eventPrefix=="string"&&(a=`${this.eventPrefix}:${c}`),a},this.debug=(s=(n=i==null?void 0:i.debug)!==null&&n!==void 0?n:t.application.stimulusUseDebug)!==null&&s!==void 0?s:M.debug,this.logger=(r=i==null?void 0:i.logger)!==null&&r!==void 0?r:M.logger,this.controller=t,this.controllerId=t.element.id||t.element.dataset.id,this.targetElement=(i==null?void 0:i.element)||t.element;const{dispatchEvent:f,eventPrefix:o}=Object.assign({},M,i);Object.assign(this,{dispatchEvent:f,eventPrefix:o}),this.controllerInitialize=t.initialize.bind(t),this.controllerConnect=t.connect.bind(t),this.controllerDisconnect=t.disconnect.bind(t)}}class ee extends Z{constructor(t,i){super(t,i),this.bind=()=>{for(const[n,s]of Object.entries(this.hotkeysOptions.hotkeys)){const r=s.handler.bind(this.controller);m(n,s.options,f=>r(f,f))}},this.unbind=()=>{for(const n in this.hotkeysOptions.hotkeys)m.unbind(n)},this.controller=t,this.hotkeysOptions=i,this.enhanceController(),this.bind()}enhanceController(){this.hotkeysOptions.filter&&(m.filter=this.hotkeysOptions.filter);const t=this.controller.disconnect.bind(this.controller),i=()=>{this.unbind(),t()};Object.assign(this.controller,{disconnect:i})}}const te=e=>({handler:e[0],options:{element:e[1]}}),ne=e=>{if(!e.hotkeys){const t={};Object.entries(e).forEach(([i,n])=>{Object.defineProperty(t,i,{value:te(n),writable:!1,enumerable:!0})}),e={hotkeys:t}}return e},ie=(e,t)=>new ee(e,ne(t));export{ie as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.