(self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[9109],{79109:(t,a,e)=>{"use strict";e.r(a),e.d(a,{default:()=>n});var s=e(69438),i=e.n(s);e(9680);i().Interaction.modes.neareach=function(t,a,e){const s={x:(t,a)=>Math.abs(t.x-a.x),y:(t,a)=>Math.abs(t.y-a.y),xy:(t,a)=>Math.pow(t.x-a.x,2)+Math.pow(t.y-a.y,2)};let n;n=a.native?{x:a.x,y:a.y}:i().helpers.getRelativePosition(a,t);const o=[],x=[],h=t.data.datasets;let r;e.axis=e.axis||"xy";const d=s[e.axis],l={x:t=>t,y:t=>t,xy:t=>t*t}[e.axis];for(let a=0,e=h.length;a<e;++a)if(t.isDatasetVisible(a)){r=t.getDatasetMeta(a);for(let t=0,e=r.data.length;t<e;++t){const e=r.data[t];if(!e._view.skip){const t=e._view,s=d(t,n),i=x[a];s<l(t.radius+t.hitRadius)&&(void 0===i||i>s)&&(x[a]=s,o[a]=e)}}}return o.filter((t=>void 0!==t))};const n=i()}}]);
//# sourceMappingURL=chunk.7d5ab464c57dda9ccbb8.js.map