"use strict";(self.webpackChunkwordpress_particles=self.webpackChunkwordpress_particles||[]).push([[3985],{3985:function(t,a,n){n.r(a),n.d(a,{loadTextShape:function(){return i}});var e=n(3563);const o=["text","character","char"];class s{draw(t,a,n,o){var s,i,l;const r=a.shapeData;if(void 0===r)return;const c=r.value;if(void 0===c)return;const p=a;void 0===p.text&&(p.text=(0,e.wA)(c,a.randomIndexData));const d=p.text,u=null!==(s=r.style)&&void 0!==s?s:"",f=null!==(i=r.weight)&&void 0!==i?i:"400",h=2*Math.round(n),x=null!==(l=r.font)&&void 0!==l?l:"Verdana",w=a.fill,v=d.length*n/2;t.font=`${u} ${f} ${h}px "${x}"`;const y={x:-v,y:n/2};t.globalAlpha=o,w?t.fillText(d,y.x,y.y):t.strokeText(d,y.x,y.y),t.globalAlpha=1}getSidesCount(){return 12}async init(t){const a=t.actualOptions;if(o.find((t=>(0,e.dB)(t,a.particles.shape.type)))){const t=o.map((t=>a.particles.shape.options[t])).find((t=>!!t)),n=[];(0,e.KH)(t,(t=>{n.push((0,e.mx)(t.font,t.weight))})),await Promise.all(n)}}}async function i(t){const a=new s;for(const n of o)await t.addShape(n,a)}}}]);