import{n as e}from"./rolldown-runtime-BG2f4sTM.js";import{Gw as t,Mft as n,O_t as r,Ww as i,evt as a,jft as o}from"./app-initial-BHB6SClA.js";function s(e,{activeDirection:t,enabled:n,event:r,executionStatus:a,mapping:o,previousActiveDirection:s}){if(!n)return l(e);if(r.distance<m)return e.visible?{...e,event:r}:e;let c=i(r,m);if(c==null)return e;let u=o[c];return t===c&&s!==c?{action:u,direction:c,event:r,status:u==null?`unassigned`:a??`unavailable`,visible:!0}:{action:u,direction:c,event:r,status:e.visible&&e.direction===c&&t===c&&s===c&&e.status!==`tracking`?e.status:`tracking`,visible:!0}}function c(e,t,n){return{action:null,direction:i(t,m)??e.direction,event:t,gameActivationProgress:Math.min(Math.max(n,0),1),status:`game-gesture`,visible:!0}}function l(e){return e.visible?{...e,visible:!1}:e}function u(e,t){let n=s(e.get(g),t);return e.set(g,n),n}function d(e,t,n){e.set(g,c(e.get(g),t,n))}function f(e){e.set(g,l)}function p(e){e.set(g,h)}var m,h,g,_=e((()=>{r(),t(),n(),m=.1,h={action:null,direction:`right`,event:{angle:0,distance:0},status:`tracking`,visible:!1},g=a(o,h)}));export{u as a,p as i,f as n,d as o,_ as r,g as t};
//# sourceMappingURL=codex-micro-joystick-feedback-CRZ9dV-Q.js.map