var e,t;e=void 0,t=function(){const e="#ifdef GL_FRAGMENT_PRECISION_HIGH\n#define highmedp highp\n#else\n#define highmedp mediump\n#endif\nprecision highmedp float;\n\n// Scene buffer\nuniform sampler2D uMainSampler; \nvarying vec2 outTexCoord;\n\n// Effect parameters\nuniform vec2 texSize;\nuniform float thickness;\nuniform vec3 outlineColor;\n\nconst float DOUBLE_PI = 3.14159265358979323846264 * 2.;\n\nvoid main() {\n vec4 front = texture2D(uMainSampler, outTexCoord);\n\n if (thickness > 0.0) {\n vec2 mag = vec2(thickness/texSize.x, thickness/texSize.y);\n vec4 curColor;\n float maxAlpha = front.a;\n vec2 offset;\n for (float angle = 0.; angle < DOUBLE_PI; angle += #{angleStep}) {\n offset = vec2(mag.x * cos(angle), mag.y * sin(angle)); \n curColor = texture2D(uMainSampler, outTexCoord + offset);\n maxAlpha = max(maxAlpha, curColor.a);\n }\n vec3 resultColor = front.rgb + (outlineColor.rgb * (1. - front.a)) * maxAlpha;\n gl_FragColor = vec4(resultColor, maxAlpha);\n } else {\n gl_FragColor = front;\n }\n}\n";var t=function(t){void 0===t&&(t=.1);var n=Math.max(100*t,1),i=(2*Math.PI/n).toFixed(7);return e.replace(/\#\{angleStep\}/,i)};const n=Phaser.Renderer.WebGL.Pipelines.PostFXPipeline,i=Phaser.Utils.Objects.GetValue,s=Phaser.Display.Color.IntegerToRGB,o=Phaser.Display.Color;var r=.1,l=t(r);class a extends n{constructor(e){super({name:"rexOutlinePostFx",game:e,renderTarget:!0,fragShader:l}),this.thickness=0,this._outlineColor=new o}resetFromJSON(e){return this.setThickness(i(e,"thickness",3)),this.setOutlineColor(i(e,"outlineColor",16777215)),this}onPreRender(){this.set1f("thickness",this.thickness),this.set3f("outlineColor",this._outlineColor.redGL,this._outlineColor.greenGL,this._outlineColor.blueGL),this.set2f("texSize",this.renderer.width,this.renderer.height)}setThickness(e){return this.thickness=e,this}get outlineColor(){return this._outlineColor}set outlineColor(e){"number"==typeof e&&(e=s(e)),this._outlineColor.setFromRGB(e)}setOutlineColor(e){return this.outlineColor=e,this}static setQuality(e){r!==e&&(r=e,l=t(e))}static getQuality(){return r}}const u=Phaser.Game;var h=function(e){return e instanceof u};const f=Phaser.Scene;var p=function(e){return e instanceof f},c=function(e,t,n){var i;(i=e,null==i||"object"!=typeof i?null:h(i)?i:h(i.game)?i.game:p(i)?i.sys.game:p(i.scene)?i.scene.sys.game:void 0).renderer.pipelines.addPostPipeline(t,n)};const d=Phaser.Utils.Array.SpliceOne;class g extends Phaser.Plugins.BasePlugin{setPostPipelineClass(e,t){return this.PostFxPipelineClass=e,this.postFxPipelineName=t,this}start(){this.game.events.once("destroy",this.destroy,this),c(this.game,this.postFxPipelineName,this.PostFxPipelineClass)}add(e,t){return function(e,t,n){void 0===n&&(n={}),e.setPostPipeline(t);var i=e.postPipelines[e.postPipelines.length-1];return i.resetFromJSON(n),n.name&&(i.name=n.name),i}(e,this.PostFxPipelineClass,t)}remove(e,t){return function(e,t,n){if(void 0===n)for(var i=(s=e.postPipelines).length-1;i>=0;i--)(r=s[i])instanceof t&&(r.destroy(),d(s,i));else{i=0;for(var s,o=(s=e.postPipelines).length;i0}(e,this.PostFxPipelineClass,t),this}get(e,t){return function(e,t,n){if(void 0===n){for(var i=[],s=0,o=(r=e.postPipelines).length;s