"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[539],{539(s,i,e){e.d(i,{loadCanvasMaskPlugin:()=>d});var t=e(3199);class a{color=!0;opacity=!1;load(s){(0,t.kZJ)(s)||((0,t.kBH)(this,"color",s.color),(0,t.kBH)(this,"opacity",s.opacity))}}class l{offset=4;filter=s=>s.a>0;load(s){if(!(0,t.kZJ)(s)){if(void 0!==s.filter)if((0,t.KgX)(s.filter)){if(s.filter in globalThis){const i=globalThis[s.filter];(0,t.Tnt)(i)&&(this.filter=i)}}else this.filter=s.filter;(0,t.kBH)(this,"offset",s.offset)}}}class n{src="";load(s){(0,t.kZJ)(s)||(0,t.kBH)(this,"src",s.src)}}class o{family="sans-serif";size=100;style="";variant="";weight="";load(s){(0,t.kZJ)(s)||((0,t.kBH)(this,"family",s.family),(0,t.kBH)(this,"size",s.size),(0,t.kBH)(this,"style",s.style),(0,t.kBH)(this,"variant",s.variant),(0,t.kBH)(this,"weight",s.weight))}}class r{separator="\n";spacing=10;load(s){(0,t.kZJ)(s)||((0,t.kBH)(this,"separator",s.separator),(0,t.kBH)(this,"spacing",s.spacing))}}class c{color="#000000";fill=!0;font=new o;lines=new r;text="";load(s){(0,t.kZJ)(s)||((0,t.kBH)(this,"color",s.color),(0,t.kBH)(this,"fill",s.fill),this.font.load(s.font),this.lines.load(s.lines),(0,t.kBH)(this,"text",s.text))}}class h{element;enable=!1;image;override=new a;pixels=new l;position;scale=1;selector;text;constructor(){this.position={x:50,y:50}}load(s){(0,t.kZJ)(s)||(void 0!==s.element&&s.element instanceof HTMLCanvasElement&&(this.element=s.element),(0,t.kBH)(this,"enable",s.enable),s.image&&(this.image??=new n,this.image.load(s.image)),this.pixels.load(s.pixels),s.position&&(this.position={x:s.position.x??this.position.x,y:s.position.y??this.position.y}),this.override.load(s.override),(0,t.kBH)(this,"scale",s.scale),(0,t.kBH)(this,"selector",s.selector),s.text&&(this.text??=new c,this.text.load(s.text)))}}class k{id="canvas-mask";async getPlugin(s){const{CanvasMaskPluginInstance:i}=await e.e(9032).then(e.bind(e,9032));return new i(s)}loadOptions(s,i,e){if(!this.needsPlugin(i)&&!this.needsPlugin(e))return;let t=i.canvasMask;void 0===t?.load&&(i.canvasMask=t=new h),t.load(e?.canvasMask)}needsPlugin(s){return s?.canvasMask?.enable??!1}}async function d(s){s.checkVersion("4.1.3"),await s.pluginManager.register(s=>{s.pluginManager.addPlugin(new k)})}}}]);