/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../../../../../chunks/_rollupPluginBabelHelpers","../../../../../webgl/enums","../../../../../webgl/FramebufferObject","../../../../../webgl/Texture"],(function(e,r,s,t){"use strict";function i(e,i,u){const o=new t.Texture(e,{target:r.TextureType.TEXTURE_2D,pixelFormat:r.PixelFormat.RGBA,dataType:r.PixelType.UNSIGNED_BYTE,wrapMode:r.TextureWrapMode.CLAMP_TO_EDGE,width:i,height:u,samplingMode:r.TextureSamplingMode.LINEAR});return[o,new s.FramebufferObject(e,{colorTarget:r.TargetType.TEXTURE,depthStencilTarget:r.DepthStencilTargetType.STENCIL_RENDER_BUFFER},o)]}return function(){function r(){this._width=void 0,this._height=void 0,this._resources=null}var s=r.prototype;return s.dispose=function(){this._resources&&(this._resources.sharedBlur1Tex.dispose(),this._resources.sharedBlur1Fbo.dispose(),this._resources.sharedBlur2Tex.dispose(),this._resources.sharedBlur2Fbo.dispose(),this._resources=null)},s._initialize=function(e,r,s){this._width=r,this._height=s;const[t,u]=i(e,r,s),[o,h]=i(e,r,s);this._resources={sharedBlur1Tex:t,sharedBlur1Fbo:u,sharedBlur2Tex:o,sharedBlur2Fbo:h}},s.setup=function(e,r,s){!this._resources||this._width===r&&this._height===s||this.dispose(),this._resources||this._initialize(e,r,s)},e._createClass(r,[{key:"sharedBlur1Tex",get:function(){return this._resources.sharedBlur1Tex}},{key:"sharedBlur1Fbo",get:function(){return this._resources.sharedBlur1Fbo}},{key:"sharedBlur2Tex",get:function(){return this._resources.sharedBlur2Tex}},{key:"sharedBlur2Fbo",get:function(){return this._resources.sharedBlur2Fbo}}]),r}()}));
