"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[2270],{2270:(e,t,n)=>{n.r(t),n.d(t,{loadGenericPolygonShape:()=>i,loadPolygonShape:()=>u,loadTriangleShape:()=>d});var a=n(5302);class o{draw(e,t,n){const a=this.getCenter(t,n),o=this.getSidesData(t,n),r=o.count.numerator*o.count.denominator,s=o.count.numerator/o.count.denominator,i=180*(s-2)/s,d=Math.PI-Math.PI*i/180;if(e){e.beginPath(),e.translate(a.x,a.y),e.moveTo(0,0);for(let t=0;t<r;t++)e.lineTo(o.length,0),e.translate(o.length,0),e.rotate(d)}}getSidesCount(e){const t=e.shapeData;return Math.round((0,a.Gu)(t?.sides??t?.nb_sides??5))}}class r extends o{getCenter(e,t){return{x:-t/(e.sides/3.5),y:-t/.76}}getSidesData(e,t){const n=e.sides;return{count:{denominator:1,numerator:n},length:2.66*t/(n/3)}}}class s extends o{getCenter(e,t){return{x:-t,y:t/1.66}}getSidesCount(){return 3}getSidesData(e,t){return{count:{denominator:2,numerator:3},length:2*t}}}async function i(e,t=!0){await e.addShape("polygon",new r,t)}async function d(e,t=!0){await e.addShape("triangle",new s,t)}async function u(e,t=!0){await i(e,t),await d(e,t)}}}]);