"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[99881],{36656:function(i,e,t){t.r(e),t.d(e,{LinkInstance:function(){return g}});var n=t(61051),l=t(57567),a=t(25979),o=(t(28706),t(33771),t(23792),t(62062),t(18111),t(61701),t(36033),t(45367),t(92731),t(26099),t(3362),t(31415),t(17642),t(58004),t(33853),t(45876),t(32475),t(15024),t(31698),t(47764),t(62953),t(88192)),s=t(12694),r=t(80061),c=t(74512);t(26910);function h(i,e){var t,n=(t=i.map(function(i){return i.id}),(0,c.A)(t).sort(function(i,e){return i-e}).join("_")),l=e.get(n);return void 0===l&&(l=(0,r.G0i)(),e.set(n,l)),l}var u=(0,s._)("_colorCache"),d=(0,s._)("_container"),v=(0,s._)("_freqs"),f=(0,s._)("_pluginManager"),_=(0,s._)("_drawTriangles"),y=(0,s._)("_getCachedStyle"),p=(0,s._)("_getLinkFrequency"),k=(0,s._)("_getTriangleFrequency"),g=function(){return(0,a.A)(function i(e,t){(0,l.A)(this,i),Object.defineProperty(this,_,{value:b}),Object.defineProperty(this,y,{value:x}),Object.defineProperty(this,p,{value:P}),Object.defineProperty(this,k,{value:w}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,d,{writable:!0,value:void 0}),Object.defineProperty(this,v,{writable:!0,value:void 0}),Object.defineProperty(this,f,{writable:!0,value:void 0}),(0,o._)(this,u)[u]=new Map,(0,o._)(this,f)[f]=e,(0,o._)(this,d)[d]=t,(0,o._)(this,v)[v]={links:new Map,triangles:new Map}},[{key:"drawParticle",value:function(i,e){var t,l,a=e.links,s=e.options;if(null!=a&&a.length&&s.links){var c,h=s.links,u=null!==(t=e.retina.linksWidth)&&void 0!==t?t:0,v=e.getPosition(),k=null===(l=e.options.twinkle)||void 0===l?void 0:l.links,g=h.triangles.enable,b=g?new Set(a.map(function(i){return i.destination.id})):null,x=i.globalAlpha,P="",w=-1,T=-1,A=!1,j=function(){A&&(i.stroke(),A=!1)},m=(0,n.A)(a);try{for(m.s();!(c=m.n()).done;){var M=c.value;if(!(h.frequency<1&&(0,o._)(this,p)[p](e,M.destination)>h.frequency)){var q=M.destination.getPosition();if(g&&!M.isWarped&&b&&(j(),(0,o._)(this,_)[_](s,e,M,b,v,q,i)),!(M.opacity<=0||u<=0)&&h.enable){var O=M.opacity,W=M.color,C=null!=k&&k.enable&&(0,r.G0i)()<k.frequency?(0,r.BN0)((0,o._)(this,f)[f],k.color):void 0;if(k&&C&&(W=C,O=(0,r.VGA)(k.opacity)),!W){var D=void 0!==h.id?(0,o._)(this,d)[d].particles.linksColors.get(h.id):(0,o._)(this,d)[d].particles.linksColor;W=(0,r._hh)(e,M.destination,D)}if(W){var S=(0,o._)(this,y)[y](W);if(S===P&&u===w&&O===T||(j(),i.strokeStyle=S,i.lineWidth=u,i.globalAlpha=O,P=S,w=u,T=O,i.beginPath(),A=!0),M.isWarped){var G=(0,o._)(this,d)[d].canvas.size,I=q.x-v.x,X=q.y-v.y,z=r.boI.x,B=r.boI.y;Math.abs(I)>G.width*r.MXx&&(z=I>0?-G.width:G.width),Math.abs(X)>G.height*r.MXx&&(B=X>0?-G.height:G.height),i.moveTo(v.x,v.y),i.lineTo(q.x+z,q.y+B),i.moveTo(v.x-z,v.y-B),i.lineTo(q.x,q.y)}else i.moveTo(v.x,v.y),i.lineTo(q.x,q.y)}}}}}catch(F){m.e(F)}finally{m.f()}j(),i.globalAlpha=x}}},{key:"init",value:function(){return(0,o._)(this,v)[v].links.clear(),(0,o._)(this,v)[v].triangles.clear(),(0,o._)(this,u)[u].clear(),Promise.resolve()}},{key:"particleCreated",value:function(i){if(i.links=[],i.options.links){i.linksDistance=i.options.links.distance,i.linksWidth=i.options.links.width;var e=(0,o._)(this,d)[d].retina.pixelRatio;i.retina.linksDistance=i.linksDistance*e,i.retina.linksWidth=i.linksWidth*e}}},{key:"particleDestroyed",value:function(i){i.links=[]}}])}();function b(i,e,t,l,a,s,c){var h,u,d=t.destination,v=null===(h=i.links)||void 0===h?void 0:h.triangles;if(null!=v&&v.enable&&null!==(u=d.options.links)&&void 0!==u&&u.triangles.enable){var _=d.links;if(null!=_&&_.length){var g,b=(0,n.A)(_);try{for(b.s();!(g=b.n()).done;){var x,P,w,T,A=g.value;if(!(A.isWarped||(0,o._)(this,p)[p](d,A.destination)>d.options.links.frequency)&&l.has(A.destination.id)){var j=A.destination;if(!((0,o._)(this,k)[k](e,d,j)>(null!==(x=null===(P=i.links)||void 0===P?void 0:P.triangles.frequency)&&void 0!==x?x:0))){var m=null!==(w=v.opacity)&&void 0!==w?w:(t.opacity+A.opacity)*r.MXx,M=null!==(T=(0,r.BN0)((0,o._)(this,f)[f],v.color))&&void 0!==T?T:t.color;if(M&&!(m<=0)){var q=j.getPosition();c.save(),c.fillStyle=(0,o._)(this,y)[y](M),c.globalAlpha=m,c.beginPath(),c.moveTo(a.x,a.y),c.lineTo(s.x,s.y),c.lineTo(q.x,q.y),c.closePath(),c.fill(),c.restore()}}}}}catch(O){b.e(O)}finally{b.f()}}}}function x(i){var e="".concat(i.r,",").concat(i.g,",").concat(i.b),t=(0,o._)(this,u)[u].get(e);return t||(t=(0,r.xxz)(i,(0,o._)(this,d)[d].hdr),(0,o._)(this,u)[u].set(e,t)),t}function P(i,e){return h([i,e],(0,o._)(this,v)[v].links)}function w(i,e,t){return h([i,e,t],(0,o._)(this,v)[v].triangles)}}}]);
//# sourceMappingURL=99881.58390e3402497455.js.map