tencentcloud-webar 1.0.23-8 → 1.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- var self = wx;(self.webpackChunktencentcloud_webar=self.webpackChunktencentcloud_webar||[]).push([[647],{1206:(t,e,r)=>{r.r(e),r.d(e,{ALPHA_MODES:()=>lt.iw,AbstractBatchRenderer:()=>h.AbstractBatchRenderer,AbstractMultiResource:()=>h.AbstractMultiResource,AbstractRenderer:()=>h.AbstractRenderer,AccessibilityManager:()=>It,AnimatedSprite:()=>Mt,AppLoaderPlugin:()=>F,Application:()=>u,ArrayResource:()=>h.ArrayResource,Attribute:()=>h.Attribute,BLEND_MODES:()=>lt.T$,BUFFER_BITS:()=>lt.V0,BUFFER_TYPE:()=>lt.mr,BaseImageResource:()=>h.BaseImageResource,BasePrepare:()=>Z,BaseRenderTexture:()=>h.BaseRenderTexture,BaseTexture:()=>h.BaseTexture,BatchDrawCall:()=>h.BatchDrawCall,BatchGeometry:()=>h.BatchGeometry,BatchPluginFactory:()=>h.BatchPluginFactory,BatchRenderer:()=>h.BatchRenderer,BatchShaderGenerator:()=>h.BatchShaderGenerator,BatchSystem:()=>h.BatchSystem,BatchTextureArray:()=>h.BatchTextureArray,Bounds:()=>a.YZ,Buffer:()=>h.Buffer,BufferResource:()=>h.BufferResource,CLEAR_MODES:()=>lt.yl,CanvasResource:()=>h.CanvasResource,Circle:()=>f.Cd,Container:()=>a.W2,ContextSystem:()=>h.ContextSystem,CountLimiter:()=>X,CubeResource:()=>h.CubeResource,DEG_TO_RAD:()=>f.ZX,DRAW_MODES:()=>lt.lg,DisplayObject:()=>a.s$,ENV:()=>lt.Vi,Ellipse:()=>f.Pj,Extract:()=>p,FORMATS:()=>lt.I2,FillStyle:()=>k.ft,Filter:()=>h.Filter,FilterState:()=>h.FilterState,FilterSystem:()=>h.FilterSystem,Framebuffer:()=>h.Framebuffer,FramebufferSystem:()=>h.FramebufferSystem,GC_MODES:()=>lt.UN,GLFramebuffer:()=>h.GLFramebuffer,GLProgram:()=>h.GLProgram,GLTexture:()=>h.GLTexture,GRAPHICS_CURVES:()=>k.wA,Geometry:()=>h.Geometry,GeometrySystem:()=>h.GeometrySystem,Graphics:()=>k.TC,GraphicsData:()=>k.iM,GraphicsGeometry:()=>k.RB,IGLUniformData:()=>h.IGLUniformData,INSTALLED:()=>h.INSTALLED,ImageBitmapResource:()=>h.ImageBitmapResource,ImageResource:()=>h.ImageResource,LINE_CAP:()=>k.$o,LINE_JOIN:()=>k.S,LineStyle:()=>k.TD,Loader:()=>N,LoaderResource:()=>O,MASK_TYPES:()=>lt.A7,MIPMAP_MODES:()=>lt.WB,MSAA_QUALITY:()=>lt.G5,MaskData:()=>h.MaskData,MaskSystem:()=>h.MaskSystem,Matrix:()=>f.y3,Mesh:()=>Pt.Kj,MeshBatchUvs:()=>Pt.wQ,MeshGeometry:()=>Pt.xc,MeshMaterial:()=>Pt.rY,ObjectRenderer:()=>h.ObjectRenderer,ObservablePoint:()=>f.AB,PI_2:()=>f._b,PRECISION:()=>lt.cB,Point:()=>f.E9,Polygon:()=>f.mg,Prepare:()=>rt,Program:()=>h.Program,ProjectionSystem:()=>h.ProjectionSystem,Quad:()=>h.Quad,QuadUv:()=>h.QuadUv,RAD_TO_DEG:()=>f.jl,RENDERER_TYPE:()=>lt.N3,Rectangle:()=>f.Ae,RenderTexture:()=>h.RenderTexture,RenderTexturePool:()=>h.RenderTexturePool,RenderTextureSystem:()=>h.RenderTextureSystem,Renderer:()=>h.Renderer,Resource:()=>h.Resource,RoundedRectangle:()=>f.c9,Runner:()=>Ct.R,SAMPLER_TYPES:()=>lt.oT,SCALE_MODES:()=>lt.aH,SHAPES:()=>f.HS,SVGResource:()=>h.SVGResource,ScissorSystem:()=>h.ScissorSystem,Shader:()=>h.Shader,ShaderSystem:()=>h.ShaderSystem,Sprite:()=>_t.j,SpriteMaskFilter:()=>h.SpriteMaskFilter,Spritesheet:()=>nt,SpritesheetLoader:()=>st,State:()=>h.State,StateSystem:()=>h.StateSystem,StencilSystem:()=>h.StencilSystem,System:()=>h.System,TARGETS:()=>lt.sp,TYPES:()=>lt.vK,TemporaryDisplayObject:()=>a.Ql,Texture:()=>h.Texture,TextureGCSystem:()=>h.TextureGCSystem,TextureLoader:()=>B,TextureMatrix:()=>h.TextureMatrix,TextureSystem:()=>h.TextureSystem,TextureUvs:()=>h.TextureUvs,Ticker:()=>j.vB,TickerPlugin:()=>j.Sb,TimeLimiter:()=>it,Transform:()=>f.wx,UPDATE_PRIORITY:()=>j.uF,UniformGroup:()=>h.UniformGroup,VERSION:()=>Dt,VideoResource:()=>h.VideoResource,ViewableBuffer:()=>h.ViewableBuffer,WRAP_MODES:()=>lt.Nt,accessibleTarget:()=>bt,autoDetectRenderer:()=>h.autoDetectRenderer,autoDetectResource:()=>h.autoDetectResource,checkMaxIfStatementsInShader:()=>h.checkMaxIfStatementsInShader,clearContext:()=>n,createUBOElements:()=>h.createUBOElements,defaultFilterVertex:()=>h.defaultFilterVertex,defaultVertex:()=>h.defaultVertex,filters:()=>Lt,generateProgram:()=>h.generateProgram,generateUniformBufferSync:()=>h.generateUniformBufferSync,getTestContext:()=>h.getTestContext,getUBOData:()=>h.getUBOData,graphicsUtils:()=>k.yR,groupD8:()=>f.Lv,isMobile:()=>U.t,refreshContext:()=>o,resources:()=>h.resources,settings:()=>U.X,systems:()=>h.systems,uniformParsers:()=>h.uniformParsers,utils:()=>s});var i=r(1615);function n(){wx.window=null}function o(){var t={};console.log("refreshContext");var e=wx.createOffscreenCanvas({type:"webgl",width:200,height:200}),r=wx.createOffscreenCanvas({type:"2d",width:200,height:200});wx.createCanvas=function(t){return"2d"===t?r:e},(0,i.Z)(t),t.HTMLImageElement=e.createImage;var n=Date.now();t.performance={now:function(){return Date.now()-n}};var o=t;o.document,o.navigator,o.HTMLVideoElement,o.HTMLCanvasElement,o.HTMLImageElement,o.Image,o.XMLHttpRequest,o.TouchEvent,o.MouseEvent,o.performance,o.requestAnimationFrame,o.cancelAnimationFrame;wx.window=t}o();var s=r(2202),a=r(519),h=r(9043),u=function(){function t(e){var r=this;this.stage=new a.W2,e=Object.assign({forceCanvas:!1},e),this.renderer=(0,h.autoDetectRenderer)(e),t._plugins.forEach((function(t){t.init.call(r,e)}))}return t.registerPlugin=function(e){t._plugins.push(e)},t.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(t.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),t.prototype.destroy=function(e,r){var i=this,n=t._plugins.slice(0);n.reverse(),n.forEach((function(t){t.destroy.call(i)})),this.stage.destroy(r),this.stage=null,this.renderer.destroy(e),this.renderer=null},t._plugins=[],t}(),c=wx.window,l=function(){function t(){}return t.init=function(t){var e=this;Object.defineProperty(this,"resizeTo",{set:function(t){c.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(c.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){e._resizeTo&&(e.cancelResize(),e._resizeId=requestAnimationFrame((function(){return e.resize()})))},this.cancelResize=function(){e._resizeId&&(cancelAnimationFrame(e._resizeId),e._resizeId=null)},this.resize=function(){if(e._resizeTo){var t,r;if(e.cancelResize(),e._resizeTo===c)t=c.innerWidth,r=c.innerHeight;else{var i=e._resizeTo;t=i.clientWidth,r=i.clientHeight}e.renderer.resize(t,r)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null},t.destroy=function(){c.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},t}();u.registerPlugin(l);var f=r(1893),d=new f.Ae,p=function(){function t(t){this.renderer=t}return t.prototype.image=function(t,e,r){var i=new Image;return i.src=this.base64(t,e,r),i},t.prototype.base64=function(t,e,r){return this.canvas(t).toDataURL(e,r)},t.prototype.canvas=function(e){var r,i,n,o=this.renderer,a=!1,u=!1;e&&(e instanceof h.RenderTexture?n=e:(n=this.renderer.generateTexture(e),u=!0)),n?(r=n.baseTexture.resolution,i=n.frame,a=!1,o.renderTexture.bind(n)):(r=this.renderer.resolution,a=!0,(i=d).width=this.renderer.width,i.height=this.renderer.height,o.renderTexture.bind(null));var c=Math.floor(i.width*r+1e-4),l=Math.floor(i.height*r+1e-4),f=new s.CanvasRenderTarget(c,l,1),p=new Uint8Array(4*c*l),y=o.gl;y.readPixels(i.x*r,i.y*r,c,l,y.RGBA,y.UNSIGNED_BYTE,p);var m=f.context.getImageData(0,0,c,l);if(t.arrayPostDivide(p,m.data),f.context.putImageData(m,0,0),a){var v=new s.CanvasRenderTarget(f.width,f.height,1);v.context.scale(1,-1),v.context.drawImage(f.canvas,0,-l),f.destroy(),f=v}return u&&n.destroy(!0),f.canvas},t.prototype.pixels=function(e){var r,i,n,o=this.renderer,s=!1;e&&(e instanceof h.RenderTexture?n=e:(n=this.renderer.generateTexture(e),s=!0)),n?(r=n.baseTexture.resolution,i=n.frame,o.renderTexture.bind(n)):(r=o.resolution,(i=d).width=o.width,i.height=o.height,o.renderTexture.bind(null));var a=i.width*r,u=i.height*r,c=new Uint8Array(4*a*u),l=o.gl;return l.readPixels(i.x*r,i.y*r,a,u,l.RGBA,l.UNSIGNED_BYTE,c),s&&n.destroy(!0),t.arrayPostDivide(c,c),c},t.prototype.destroy=function(){this.renderer=null},t.arrayPostDivide=function(t,e){for(var r=0;r<t.length;r+=4){var i=e[r+3]=t[r+3];0!==i?(e[r]=Math.round(Math.min(255*t[r]/i,255)),e[r+1]=Math.round(Math.min(255*t[r+1]/i,255)),e[r+2]=Math.round(Math.min(255*t[r+2]/i,255))):(e[r]=t[r],e[r+1]=t[r+1],e[r+2]=t[r+2])}},t}(),y=function(){function t(t,e,r){void 0===e&&(e=!1),this._fn=t,this._once=e,this._thisArg=r,this._next=this._prev=this._owner=null}return t.prototype.detach=function(){return null!==this._owner&&(this._owner.detach(this),!0)},t}();function m(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var v=function(){function t(){this._head=this._tail=void 0}return t.prototype.handlers=function(t){void 0===t&&(t=!1);var e=this._head;if(t)return!!e;for(var r=[];e;)r.push(e),e=e._next;return r},t.prototype.has=function(t){if(!(t instanceof y))throw new Error("MiniSignal#has(): First arg must be a SignalBinding object.");return t._owner===this},t.prototype.dispatch=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this._head;if(!r)return!1;for(;r;)r._once&&this.detach(r),r._fn.apply(r._thisArg,t),r=r._next;return!0},t.prototype.add=function(t,e){if(void 0===e&&(e=null),"function"!=typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return m(this,new y(t,!1,e))},t.prototype.once=function(t,e){if(void 0===e&&(e=null),"function"!=typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return m(this,new y(t,!0,e))},t.prototype.detach=function(t){if(!(t instanceof y))throw new Error("MiniSignal#detach(): First arg must be a SignalBinding object.");return t._owner!==this||(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null),this},t.prototype.detachAll=function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this},t}();function _(t,e){e=e||{};for(var r={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},i=r.parser[e.strictMode?"strict":"loose"].exec(t),n={},o=14;o--;)n[r.key[o]]=i[o]||"";return n[r.q.name]={},n[r.key[12]].replace(r.q.parser,(function(t,e,i){e&&(n[r.q.name][e]=i)})),n}var g=wx.window,x=g.document,b=g,T=b.Image,E=null;function w(){}function S(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function A(t){return t.toString().replace("object ","")}var O=function(){function t(e,r,i){if(this._dequeue=w,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=null,this._boundOnError=null,this._boundOnProgress=null,this._boundOnTimeout=null,this._boundXhrOnError=null,this._boundXhrOnTimeout=null,this._boundXhrOnAbort=null,this._boundXhrOnLoad=null,"string"!=typeof e||"string"!=typeof r)throw new Error("Both name and url are required for constructing a resource.");i=i||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===r.indexOf("data:")),this.name=e,this.url=r,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===i.crossOrigin?"anonymous":i.crossOrigin,this.timeout=i.timeout||0,this.loadType=i.loadType||this._determineLoadType(),this.xhrType=i.xhrType,this.metadata=i.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=w,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new v,this.onProgress=new v,this.onComplete=new v,this.onAfterMiddleware=new v}return t.setExtensionLoadType=function(e,r){S(t._loadTypeMap,e,r)},t.setExtensionXhrType=function(e,r){S(t._xhrTypeMap,e,r)},Object.defineProperty(t.prototype,"isDataUrl",{get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isComplete",{get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLoading",{get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)},enumerable:!1,configurable:!0}),t.prototype.complete=function(){this._clearEvents(),this._finish()},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this._finish()}},t.prototype.load=function(e){var r=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout((function(){return e(r)}),1);else switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:this._loadXhr()}},t.prototype._hasFlag=function(t){return 0!=(this._flags&t)},t.prototype._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},t.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},t.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype._loadElement=function(t){var e=this;this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==b.Image?this.data=new T:this.data=void 0!==x?x.createElement(t):new OffscreenCanvas(1,1),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.data.onerror=this._boundOnError,this.data.onload=function(){e._boundComplete()},this.data.onprogress=this._boundOnProgress,this.metadata.skipSource||(this.data.src=this.url),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},t.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==b.Audio?this.data=new Audio:this.data=x.createElement(t),null!==this.data){if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,r=0;r<this.url.length;++r)this.data.appendChild(this._createSource(t,this.url[r],Array.isArray(e)?e[r]:e));else{e=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(e)?e[0]:e))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: ".concat(t))},t.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),e.timeout=this.timeout,this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},t.prototype._loadXdr=function(){},t.prototype._createSource=function(t,e,r){r||(r="".concat(t,"/").concat(this._getExtension(e)));var i=x.createElement("source");return i.src=e,i.type=r,i},t.prototype._onError=function(t){this.abort("Failed to load element using: ".concat(t.target.nodeName))},t.prototype._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},t.prototype._onTimeout=function(){this.abort("Load timed out.")},t.prototype._xhrOnError=function(){var t=this.xhr;this.abort("".concat(A(t)," Request failed. Status: ").concat(t.status,', text: "').concat(t.statusText,'"'))},t.prototype._xhrOnTimeout=function(){var t=this.xhr;this.abort("".concat(A(t)," Request timed out."))},t.prototype._xhrOnAbort=function(){var t=this.xhr;this.abort("".concat(A(t)," Request was aborted by the user."))},t.prototype._xhrOnLoad=function(){var e=this.xhr,r="",i=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(r=e.responseText),0===i&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?i=200:1223===i&&(i=204),2===(i/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: ".concat(t))}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(b.DOMParser){var n=new DOMParser;this.data=n.parseFromString(r,"text/xml")}else{var o=x.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: ".concat(t))}else this.data=e.response||r;this.complete()}else this.abort("[".concat(e.status,"] ").concat(e.statusText,": ").concat(e.responseURL))},t.prototype._determineCrossOrigin=function(t,e){if(void 0===x)return"anonymous";if(0===t.indexOf("data:"))return"";if(b.origin!==b.location.origin)return"anonymous";e=e||b.location,E||(E=x.createElement("a")),E.href=t;var r=_(E.href,{strictMode:!0}),i=!r.port&&""===e.port||r.port===e.port,n=r.protocol?"".concat(r.protocol,":"):"";return r.host===e.hostname&&i&&n===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(t){void 0===t&&(t=this.url);var e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?"),n=t.indexOf("#"),o=Math.min(i>-1?i:t.length,n>-1?n:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},t}();!function(t){!function(t){t[t.NONE=0]="NONE",t[t.DATA_URL=1]="DATA_URL",t[t.COMPLETE=2]="COMPLETE",t[t.LOADING=4]="LOADING"}(t.STATUS_FLAGS||(t.STATUS_FLAGS={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.JSON=1]="JSON",t[t.XML=2]="XML",t[t.IMAGE=3]="IMAGE",t[t.AUDIO=4]="AUDIO",t[t.VIDEO=5]="VIDEO",t[t.TEXT=6]="TEXT"}(t.TYPE||(t.TYPE={})),function(t){t[t.XHR=1]="XHR",t[t.IMAGE=2]="IMAGE",t[t.AUDIO=3]="AUDIO",t[t.VIDEO=4]="VIDEO"}(t.LOAD_TYPE||(t.LOAD_TYPE={})),function(t){t.DEFAULT="text",t.BUFFER="arraybuffer",t.BLOB="blob",t.DOCUMENT="document",t.JSON="json",t.TEXT="text"}(t.XHR_RESPONSE_TYPE||(t.XHR_RESPONSE_TYPE={})),t._loadTypeMap={gif:t.LOAD_TYPE.IMAGE,png:t.LOAD_TYPE.IMAGE,bmp:t.LOAD_TYPE.IMAGE,jpg:t.LOAD_TYPE.IMAGE,jpeg:t.LOAD_TYPE.IMAGE,tif:t.LOAD_TYPE.IMAGE,tiff:t.LOAD_TYPE.IMAGE,webp:t.LOAD_TYPE.IMAGE,tga:t.LOAD_TYPE.IMAGE,svg:t.LOAD_TYPE.IMAGE,"svg+xml":t.LOAD_TYPE.IMAGE,mp3:t.LOAD_TYPE.AUDIO,ogg:t.LOAD_TYPE.AUDIO,wav:t.LOAD_TYPE.AUDIO,mp4:t.LOAD_TYPE.VIDEO,webm:t.LOAD_TYPE.VIDEO},t._xhrTypeMap={xhtml:t.XHR_RESPONSE_TYPE.DOCUMENT,html:t.XHR_RESPONSE_TYPE.DOCUMENT,htm:t.XHR_RESPONSE_TYPE.DOCUMENT,xml:t.XHR_RESPONSE_TYPE.DOCUMENT,tmx:t.XHR_RESPONSE_TYPE.DOCUMENT,svg:t.XHR_RESPONSE_TYPE.DOCUMENT,tsx:t.XHR_RESPONSE_TYPE.DOCUMENT,gif:t.XHR_RESPONSE_TYPE.BLOB,png:t.XHR_RESPONSE_TYPE.BLOB,bmp:t.XHR_RESPONSE_TYPE.BLOB,jpg:t.XHR_RESPONSE_TYPE.BLOB,jpeg:t.XHR_RESPONSE_TYPE.BLOB,tif:t.XHR_RESPONSE_TYPE.BLOB,tiff:t.XHR_RESPONSE_TYPE.BLOB,webp:t.XHR_RESPONSE_TYPE.BLOB,tga:t.XHR_RESPONSE_TYPE.BLOB,json:t.XHR_RESPONSE_TYPE.JSON,text:t.XHR_RESPONSE_TYPE.TEXT,txt:t.XHR_RESPONSE_TYPE.TEXT,ttf:t.XHR_RESPONSE_TYPE.BUFFER,otf:t.XHR_RESPONSE_TYPE.BUFFER},t.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="}(O||(O={}));var I=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s},P=function(t,e,r){if(r||2===arguments.length)for(var i,n=0,o=e.length;n<o;n++)!i&&n in e||(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))};function C(){}function R(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(null===t)throw new Error("Callback was already called.");var i=t;t=null,i.apply(this,e)}}var M=function(t,e){this.data=t,this.callback=e},D=function(){function t(t,e){void 0===e&&(e=1);var r=this;if(this.workers=0,this.saturated=C,this.unsaturated=C,this.empty=C,this.drain=C,this.error=C,this.started=!1,this.paused=!1,this._tasks=[],this._insert=function(t,e,i){if(i&&"function"!=typeof i)throw new Error("task callback must be a function");if(r.started=!0,null==t&&r.idle())setTimeout((function(){return r.drain()}),1);else{var n=new M(t,"function"==typeof i?i:C);e?r._tasks.unshift(n):r._tasks.push(n),setTimeout(r.process,1)}},this.process=function(){for(;!r.paused&&r.workers<r.concurrency&&r._tasks.length;){var t=r._tasks.shift();0===r._tasks.length&&r.empty(),r.workers+=1,r.workers===r.concurrency&&r.saturated(),r._worker(t.data,R(r._next(t)))}},this._worker=t,0===e)throw new Error("Concurrency must not be zero");this.concurrency=e,this.buffer=e/4}return t.prototype._next=function(t){var e=this;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];e.workers-=1,t.callback.apply(t,P([],I(r),!1)),null!=r[0]&&e.error(r[0],t.data),e.workers<=e.concurrency-e.buffer&&e.unsaturated(),e.idle()&&e.drain(),e.process()}},t.prototype.push=function(t,e){this._insert(t,!1,e)},t.prototype.kill=function(){this.workers=0,this.drain=C,this.started=!1,this._tasks=[]},t.prototype.unshift=function(t,e){this._insert(t,!0,e)},t.prototype.length=function(){return this._tasks.length},t.prototype.running=function(){return this.workers},t.prototype.idle=function(){return this._tasks.length+this.workers===0},t.prototype.pause=function(){!0!==this.paused&&(this.paused=!0)},t.prototype.resume=function(){if(!1!==this.paused){this.paused=!1;for(var t=1;t<=this.concurrency;t++)this.process()}},t.eachSeries=function(t,e,r,i){var n=0,o=t.length;!function s(a){a||n===o?r&&r(a):i?setTimeout((function(){e(t[n++],s)}),1):e(t[n++],s)}()},t.queue=function(e,r){return new t(e,r)},t}(),L=/(#[\w-]+)?$/,N=function(){function t(e,r){void 0===e&&(e=""),void 0===r&&(r=10);var i=this;this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,e){return i._loadResource(t,e)},this.resources={},this.baseUrl=e,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,e){return i._loadResource(t,e)},this._queue=D.queue(this._boundLoadResource,r),this._queue.pause(),this.resources={},this.onProgress=new v,this.onError=new v,this.onLoad=new v,this.onStart=new v,this.onComplete=new v;for(var n=0;n<t._plugins.length;++n){var o=t._plugins[n],s=o.pre,a=o.use;s&&this.pre(s),a&&this.use(a)}this._protected=!1}return t.prototype._add=function(t,e,r,i){if(this.loading&&(!r||!r.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'.concat(t,'" already exists.'));if(e=this._prepareUrl(e),this.resources[t]=new O(t,e,r),"function"==typeof i&&this.resources[t].onAfterMiddleware.once(i),this.loading){for(var n=r.parentResource,o=[],s=0;s<n.children.length;++s)n.children[s].isComplete||o.push(n.children[s]);var a=n.progressChunk*(o.length+1)/(o.length+2);n.children.push(this.resources[t]),n.progressChunk=a;for(s=0;s<o.length;++s)o[s].progressChunk=a;this.resources[t].progressChunk=a}return this._queue.push(this.resources[t]),this},t.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},t.prototype.use=function(t){return this._afterMiddleware.push(t),this},t.prototype.reset=function(){for(var t in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort("loader reset")}return this.resources={},this},t.prototype.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var e=100/this._queue._tasks.length,r=0;r<this._queue._tasks.length;++r)this._queue._tasks[r].data.progressChunk=e;this._onStart(),this._queue.resume()}return this},Object.defineProperty(t.prototype,"concurrency",{get:function(){return this._queue.concurrency},set:function(t){this._queue.concurrency=t},enumerable:!1,configurable:!0}),t.prototype._prepareUrl=function(t){var e,r=_(t,{strictMode:!0});if(e=r.protocol||!r.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?"".concat(this.baseUrl,"/").concat(t):this.baseUrl+t,this.defaultQueryString){var i=L.exec(e)[0];-1!==(e=e.substr(0,e.length-i.length)).indexOf("?")?e+="&".concat(this.defaultQueryString):e+="?".concat(this.defaultQueryString),e+=i}return e},t.prototype._loadResource=function(t,e){var r=this;t._dequeue=e,D.eachSeries(this._beforeMiddleware,(function(e,i){e.call(r,t,(function(){i(t.isComplete?{}:null)}))}),(function(){t.isComplete?r._onLoad(t):(t._onLoadBinding=t.onComplete.once(r._onLoad,r),t.load())}),!0)},t.prototype._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},t.prototype._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),D.eachSeries(this._afterMiddleware,(function(r,i){r.call(e,t,i)}),(function(){t.onAfterMiddleware.dispatch(t),e.progress=Math.min(100,e.progress+t.progressChunk),e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&e._onComplete()}),!0)},t.prototype.destroy=function(){this._protected||this.reset()},Object.defineProperty(t,"shared",{get:function(){var e=t._shared;return e||((e=new t)._protected=!0,t._shared=e),e},enumerable:!1,configurable:!0}),t.registerPlugin=function(e){return t._plugins.push(e),e.add&&e.add(),t},t._plugins=[],t}();N.prototype.add=function(t,e,r,i){if(Array.isArray(t)){for(var n=0;n<t.length;++n)this.add(t[n]);return this}if("object"==typeof t&&(r=t,i=e||r.callback||r.onComplete,e=r.url,t=r.name||r.key||r.url),"string"!=typeof e&&(i=r,r=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");return"function"==typeof r&&(i=r,r=null),this._add(t,e,r,i)};var F=function(){function t(){}return t.init=function(t){t=Object.assign({sharedLoader:!1},t),this.loader=t.sharedLoader?N.shared:new N},t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t}(),B=function(){function t(){}return t.add=function(){O.setExtensionLoadType("svg",O.LOAD_TYPE.XHR),O.setExtensionXhrType("svg",O.XHR_RESPONSE_TYPE.TEXT)},t.use=function(t,e){if(!t.data||t.type!==O.TYPE.IMAGE&&"svg"!==t.extension)e();else{var r=t.data,i=t.url,n=t.name,o=t.metadata;h.Texture.fromLoader(r,i,n,o).then((function(r){t.texture=r,e()})).catch(e)}},t}();N.registerPlugin(B);var U=r(6787);U.X.UPLOADS_PER_FRAME=4;var k=r(4775),j=r(2901),G=r(2794),X=function(){function t(t){this.maxItemsPerFrame=t,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();function H(t,e){var r=!1;if(t&&t._textures&&t._textures.length)for(var i=0;i<t._textures.length;i++)if(t._textures[i]instanceof h.Texture){var n=t._textures[i].baseTexture;-1===e.indexOf(n)&&(e.push(n),r=!0)}return r}function Y(t,e){if(t.baseTexture instanceof h.BaseTexture){var r=t.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function V(t,e){if(t._texture&&t._texture instanceof h.Texture){var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function z(t,e){return e instanceof G.xv&&(e.updateText(!0),!0)}function W(t,e){if(e instanceof G.pn){var r=e.toFontString();return G._A.measureFont(r),!0}return!1}function q(t,e){if(t instanceof G.xv){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function $(t,e){return t instanceof G.pn&&(-1===e.indexOf(t)&&e.push(t),!0)}var K,Z=function(){function t(t){var e=this;this.limiter=new X(U.X.UPLOADS_PER_FRAME),this.renderer=t,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){e.queue&&e.prepareItems()},this.registerFindHook(q),this.registerFindHook($),this.registerFindHook(H),this.registerFindHook(Y),this.registerFindHook(V),this.registerUploadHook(z),this.registerUploadHook(W)}return t.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,j.vB.system.addOnce(this.tick,this,j.uF.UTILITY))):e&&e()},t.prototype.tick=function(){setTimeout(this.delayedTick,0)},t.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var r=0,i=this.uploadHooks.length;r<i;r++)if(this.uploadHooks[r](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)j.vB.system.addOnce(this.tick,this,j.uF.UTILITY);else{this.ticking=!1;var n=this.completes.slice(0);this.completes.length=0;for(r=0,i=n.length;r<i;r++)n[r]()}},t.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},t.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},t.prototype.add=function(t){for(var e=0,r=this.addHooks.length;e<r&&!this.addHooks[e](t,this.queue);e++);if(t instanceof a.W2)for(e=t.children.length-1;e>=0;e--)this.add(t.children[e]);return this},t.prototype.destroy=function(){this.ticking&&j.vB.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}(),Q=(K=function(t,e){return K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},K(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}K(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function J(t,e){return e instanceof h.BaseTexture&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function tt(t,e){if(!(e instanceof k.TC))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var i=r.batches,n=0;n<i.length;n++){var o=i[n].style.texture;o&&J(t,o.baseTexture)}return r.batchable||t.geometry.bind(r,e._resolveDirectShader(t)),!0}function et(t,e){return t instanceof k.TC&&(e.push(t),!0)}var rt=function(t){function e(e){var r=t.call(this,e)||this;return r.uploadHookHelper=r.renderer,r.registerFindHook(et),r.registerUploadHook(J),r.registerUploadHook(tt),r}return Q(e,t),e}(Z),it=function(){function t(t){this.maxMilliseconds=t,this.frameStart=0}return t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds},t}(),nt=function(){function t(t,e,r){void 0===r&&(r=null),this._texture=t instanceof h.Texture?t:null,this.baseTexture=t instanceof h.BaseTexture?t:this._texture.baseTexture,this.textures={},this.animations={},this.data=e;var i=this.baseTexture.resource;this.resolution=this._updateResolution(r||(i?i.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return t.prototype._updateResolution=function(t){void 0===t&&(t=null);var e=this.data.meta.scale,r=(0,s.getResolutionOfUrl)(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&this.baseTexture.setResolution(r),r},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var r=e,i=t.BATCH_SIZE;r-e<i&&r<this._frameKeys.length;){var n=this._frameKeys[r],o=this._frames[n],s=o.frame;if(s){var a=null,u=null,c=!1!==o.trimmed&&o.sourceSize?o.sourceSize:o.frame,l=new f.Ae(0,0,Math.floor(c.w)/this.resolution,Math.floor(c.h)/this.resolution);a=o.rotated?new f.Ae(Math.floor(s.x)/this.resolution,Math.floor(s.y)/this.resolution,Math.floor(s.h)/this.resolution,Math.floor(s.w)/this.resolution):new f.Ae(Math.floor(s.x)/this.resolution,Math.floor(s.y)/this.resolution,Math.floor(s.w)/this.resolution,Math.floor(s.h)/this.resolution),!1!==o.trimmed&&o.spriteSourceSize&&(u=new f.Ae(Math.floor(o.spriteSourceSize.x)/this.resolution,Math.floor(o.spriteSourceSize.y)/this.resolution,Math.floor(s.w)/this.resolution,Math.floor(s.h)/this.resolution)),this.textures[n]=new h.Texture(this.baseTexture,a,l,u,o.rotated?2:0,o.anchor),h.Texture.addToCache(this.textures[n],n)}r++}},t.prototype._processAnimations=function(){var t=this.data.animations||{};for(var e in t){this.animations[e]=[];for(var r=0;r<t[e].length;r++){var i=t[e][r];this.animations[e].push(this.textures[i])}}},t.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},t.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout((function(){e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch():(e._processAnimations(),e._parseComplete())}),0)},t.prototype.destroy=function(t){var e;for(var r in void 0===t&&(t=!1),this.textures)this.textures[r].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&(null===(e=this._texture)||void 0===e||e.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null},t.BATCH_SIZE=1e3,t}(),ot=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},st=function(){function t(){}return t.use=function(e,r){var i,n,o,a,h=this,u="".concat(e.name,"_image");if(e.data&&e.type===O.TYPE.JSON&&e.data.frames&&!h.resources[u]){var c=null===(a=null===(o=e.data)||void 0===o?void 0:o.meta)||void 0===a?void 0:a.related_multi_packs;if(Array.isArray(c)){var l=function(t){if("string"!=typeof t)return"continue";var r=t.replace(".json",""),i=s.url.resolve(e.url.replace(h.baseUrl,""),t);if(h.resources[r]||Object.values(h.resources).some((function(t){return s.url.format(s.url.parse(t.url))===i})))return"continue";var n={crossOrigin:e.crossOrigin,loadType:O.LOAD_TYPE.XHR,xhrType:O.XHR_RESPONSE_TYPE.JSON,parentResource:e,metadata:e.metadata};h.add(r,i,n)};try{for(var f=ot(c),d=f.next();!d.done;d=f.next()){l(d.value)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}var p={crossOrigin:e.crossOrigin,metadata:e.metadata.imageMetadata,parentResource:e},y=t.getResourcePath(e,h.baseUrl);h.add(u,y,p,(function(t){if(t.error)r(t.error);else{var i=new nt(t.texture,e.data,e.url);i.parse((function(){e.spritesheet=i,e.textures=i.textures,r()}))}}))}else r()},t.getResourcePath=function(t,e){return t.isDataUrl?t.data.meta.image:s.url.resolve(t.url.replace(e,""),t.data.meta.image)},t}();var at=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ht=function(t){function e(e){void 0===e&&(e=1);var r=t.call(this,h.defaultVertex,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n",{uAlpha:1})||this;return r.alpha=e,r}return at(e,t),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(h.Filter);var ut={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},ct=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n");var lt=r(7659),ft=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),dt=function(t){function e(e,r,i,n,o){void 0===r&&(r=8),void 0===i&&(i=4),void 0===n&&(n=U.X.FILTER_RESOLUTION),void 0===o&&(o=5);var s=this,a=function(t,e){var r,i=Math.ceil(t/2),n="\n attribute vec2 aVertexPosition;\n\n uniform mat3 projectionMatrix;\n\n uniform float strength;\n\n varying vec2 vBlurTexCoords[%size%];\n\n uniform vec4 inputSize;\n uniform vec4 outputFrame;\n\n vec4 filterVertexPosition( void )\n {\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n }\n\n vec2 filterTextureCoord( void )\n {\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n }\n\n void main(void)\n {\n gl_Position = filterVertexPosition();\n\n vec2 textureCoord = filterTextureCoord();\n %blur%\n }",o="";r=e?"vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;s<t;s++){var a=r.replace("%index%",s.toString());o+=a=a.replace("%sampleIndex%","".concat(s-(i-1),".0")),o+="\n"}return(n=n.replace("%blur%",o)).replace("%size%",t.toString())}(o,e),h=function(t){for(var e,r=ut[t],i=r.length,n=ct,o="",s=0;s<t;s++){var a="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",s.toString());e=s,s>=i&&(e=t-s-1),o+=a=a.replace("%value%",r[e].toString()),o+="\n"}return(n=n.replace("%blur%",o)).replace("%size%",t.toString())}(o);return(s=t.call(this,a,h)||this).horizontal=e,s.resolution=n,s._quality=0,s.quality=i,s.blur=r,s}return ft(e,t),e.prototype.apply=function(t,e,r,i){if(r?this.horizontal?this.uniforms.strength=1/r.width*(r.width/e.width):this.uniforms.strength=1/r.height*(r.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,i);else{var n=t.getFilterTexture(),o=t.renderer,s=e,a=n;this.state.blend=!1,t.applyFilter(this,s,a,lt.yl.CLEAR);for(var h=1;h<this.passes-1;h++){t.bindAndClear(s,lt.yl.BLIT),this.uniforms.uSampler=a;var u=a;a=s,s=u,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,t.applyFilter(this,a,r,i),t.returnFilterTexture(n)}},Object.defineProperty(e.prototype,"blur",{get:function(){return this.strength},set:function(t){this.padding=1+2*Math.abs(t),this.strength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t},enumerable:!1,configurable:!0}),e}(h.Filter),pt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),yt=function(t){function e(e,r,i,n){void 0===e&&(e=8),void 0===r&&(r=4),void 0===i&&(i=U.X.FILTER_RESOLUTION),void 0===n&&(n=5);var o=t.call(this)||this;return o.blurXFilter=new dt(!0,e,r,i,n),o.blurYFilter=new dt(!1,e,r,i,n),o.resolution=i,o.quality=r,o.blur=e,o.repeatEdgePixels=!1,o}return pt(e,t),e.prototype.apply=function(t,e,r,i){var n=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(n&&o){var s=t.getFilterTexture();this.blurXFilter.apply(t,e,s,lt.yl.CLEAR),this.blurYFilter.apply(t,s,r,i),t.returnFilterTexture(s)}else o?this.blurYFilter.apply(t,e,r,i):this.blurXFilter.apply(t,e,r,i)},e.prototype.updatePadding=function(){this._repeatEdgePixels?this.padding=0:this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))},Object.defineProperty(e.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.blurYFilter.blendMode},set:function(t){this.blurYFilter.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"repeatEdgePixels",{get:function(){return this._repeatEdgePixels},set:function(t){this._repeatEdgePixels=t,this.updatePadding()},enumerable:!1,configurable:!0}),e}(h.Filter),mt={float:function(t,e,r,i){r!==i&&(r.v=i,t.uniform1f(e,i))},vec2:function(t,e,r,i){r[0]===i[0]&&r[1]===i[1]||(r[0]=i[0],r[1]=i[1],t.uniform2f(e,i[0],i[1]))},vec3:function(t,e,r,i){r[0]===i[0]&&r[1]===i[1]&&r[2]===i[2]||(r[0]=i[0],r[1]=i[1],r[2]=i[2],t.uniform3f(e,i[0],i[1],i[2]))},int:function(t,e,r,i){t.uniform1i(e,i)},ivec2:function(t,e,r,i){t.uniform2i(e,i[0],i[1])},ivec3:function(t,e,r,i){t.uniform3i(e,i[0],i[1],i[2])},ivec4:function(t,e,r,i){t.uniform4i(e,i[0],i[1],i[2],i[3])},uint:function(t,e,r,i){t.uniform1ui(e,i)},uvec2:function(t,e,r,i){t.uniform2ui(e,i[0],i[1])},uvec3:function(t,e,r,i){t.uniform3ui(e,i[0],i[1],i[2])},uvec4:function(t,e,r,i){t.uniform4ui(e,i[0],i[1],i[2],i[3])},bool:function(t,e,r,i){r!==i&&(r.v=i,t.uniform1i(e,Number(i)))},bvec2:function(t,e,r,i){t.uniform2i(e,i[0],i[1])},bvec3:function(t,e,r,i){t.uniform3i(e,i[0],i[1],i[2])},bvec4:function(t,e,r,i){t.uniform4i(e,i[0],i[1],i[2],i[3])},mat2:function(t,e,r,i){t.uniformMatrix2fv(e,!1,i)},mat3:function(t,e,r,i){t.uniformMatrix3fv(e,!1,i)},mat4:function(t,e,r,i){t.uniformMatrix4fv(e,!1,i)},sampler2D:function(t,e,r,i){t.uniform1i(e,i)},samplerCube:function(t,e,r,i){t.uniform1i(e,i)},sampler2DArray:function(t,e,r,i){t.uniform1i(e,i)}},vt={float:function(t,e,r,i){t.uniform1fv(e,i)},vec2:function(t,e,r,i){t.uniform2fv(e,i)},vec3:function(t,e,r,i){t.uniform3fv(e,i)},vec4:function(t,e,r,i){t.uniform4fv(e,i)},int:function(t,e,r,i){t.uniform1iv(e,i)},ivec2:function(t,e,r,i){t.uniform2iv(e,i)},ivec3:function(t,e,r,i){t.uniform3iv(e,i)},ivec4:function(t,e,r,i){t.uniform4iv(e,i)},uint:function(t,e,r,i){t.uniform1uiv(e,i)},uvec2:function(t,e,r,i){t.uniform2uiv(e,i)},uvec3:function(t,e,r,i){t.uniform3uiv(e,i)},uvec4:function(t,e,r,i){t.uniform4uiv(e,i)},bool:function(t,e,r,i){t.uniform1iv(e,i)},bvec2:function(t,e,r,i){t.uniform2iv(e,i)},bvec3:function(t,e,r,i){t.uniform3iv(e,i)},bvec4:function(t,e,r,i){t.uniform4iv(e,i)},sampler2D:function(t,e,r,i){t.uniform1iv(e,i)},samplerCube:function(t,e,r,i){t.uniform1iv(e,i)},sampler2DArray:function(t,e,r,i){t.uniform1iv(e,i)}};var _t=r(1961),gt=new f.y3;a.s$.prototype._cacheAsBitmap=!1,a.s$.prototype._cacheData=null,a.s$.prototype._cacheAsBitmapResolution=null,a.s$.prototype._cacheAsBitmapMultisample=lt.G5.NONE;var xt=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null};Object.defineProperties(a.s$.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new xt),(e=this._cacheData).originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),a.s$.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},a.s$.prototype._initCachedDisplayObject=function(t){var e;if(!this._cacheData||!this._cacheData.sprite){var r=this.alpha;this.alpha=1,t.batch.flush();var i=this.getLocalBounds(null,!0).clone();if(this.filters){var n=this.filters[0].padding;i.pad(n)}i.ceil(U.X.RESOLUTION);var o=t.renderTexture.current,a=t.renderTexture.sourceFrame.clone(),u=t.renderTexture.destinationFrame.clone(),c=t.projection.transform,l=h.RenderTexture.create({width:i.width,height:i.height,resolution:this.cacheAsBitmapResolution||t.resolution,multisample:null!==(e=this.cacheAsBitmapMultisample)&&void 0!==e?e:t.multisample}),f="cacheAsBitmap_".concat((0,s.uid)());this._cacheData.textureCacheId=f,h.BaseTexture.addToCache(l.baseTexture,f),h.Texture.addToCache(l,f);var d=this.transform.localTransform.copyTo(gt).invert().translate(-i.x,-i.y);this.render=this._cacheData.originalRender,t.render(this,{renderTexture:l,clear:!0,transform:d,skipUpdateTransform:!1}),t.framebuffer.blit(),t.projection.transform=c,t.renderTexture.bind(o,a,u),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=r;var p=new _t.j(l);p.transform.worldTransform=this.transform.worldTransform,p.anchor.x=-i.x/i.width,p.anchor.y=-i.y/i.height,p.alpha=r,p._bounds=this._bounds,this._cacheData.sprite=p,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=p.containsPoint.bind(p)}},a.s$.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},a.s$.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(null,!0),r=this.alpha;this.alpha=1;var i=t.context,n=t._projTransform;e.ceil(U.X.RESOLUTION);var o=h.RenderTexture.create({width:e.width,height:e.height}),a="cacheAsBitmap_".concat((0,s.uid)());this._cacheData.textureCacheId=a,h.BaseTexture.addToCache(o.baseTexture,a),h.Texture.addToCache(o,a);var u=gt;this.transform.localTransform.copyTo(u),u.invert(),u.tx-=e.x,u.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,{renderTexture:o,clear:!0,transform:u,skipUpdateTransform:!1}),t.context=i,t._projTransform=n,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=r;var c=new _t.j(o);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-e.x/e.width,c.anchor.y=-e.y/e.height,c.alpha=r,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=c.containsPoint.bind(c)}},a.s$.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},a.s$.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},a.s$.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,h.BaseTexture.removeFromCache(this._cacheData.textureCacheId),h.Texture.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},a.s$.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},a.s$.prototype.name=null,a.W2.prototype.getChildByName=function(t,e){for(var r=0,i=this.children.length;r<i;r++)if(this.children[r].name===t)return this.children[r];if(e)for(r=0,i=this.children.length;r<i;r++){if(this.children[r].getChildByName){var n=this.children[r].getChildByName(t,!0);if(n)return n}}return null},a.s$.prototype.getGlobalPosition=function(t,e){return void 0===t&&(t=new f.E9),void 0===e&&(e=!1),this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t};var bt={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1},Tt=wx.window,Et=Tt.document;console.log("document",Et);var wt=Tt,St=Tt.performance,At=Tt.navigator;a.s$.mixin(bt);var Ot=100,It=function(){function t(t){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(s.isMobile.tablet||s.isMobile.phone)&&this.createTouchHook();var e=Et.createElement("div");e.style.width="".concat(Ot,"px"),e.style.height="".concat(Ot,"px"),e.style.position="absolute",e.style.top="".concat(0,"px"),e.style.left="".concat(0,"px"),e.style.zIndex=2..toString(),this.div=e,this.renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),wt.addEventListener("keydown",this._onKeyDown,!1)}return Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileAccessibility",{get:function(){return this._isMobileAccessibility},enumerable:!1,configurable:!0}),t.prototype.createTouchHook=function(){var t=this,e=Et.createElement("button");e.style.width="".concat(1,"px"),e.style.height="".concat(1,"px"),e.style.position="absolute",e.style.top="".concat(-1e3,"px"),e.style.left="".concat(-1e3,"px"),e.style.zIndex=2..toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",(function(){t._isMobileAccessibility=!0,t.activate(),t.destroyTouchHook()})),Et.body.appendChild(e),this._hookDiv=e},t.prototype.destroyTouchHook=function(){this._hookDiv&&(Et.body.removeChild(this._hookDiv),this._hookDiv=null)},t.prototype.activate=function(){var t;this._isActive||(this._isActive=!0,wt.document.addEventListener("mousemove",this._onMouseMove,!0),wt.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),null===(t=this.renderer.view.parentNode)||void 0===t||t.appendChild(this.div))},t.prototype.deactivate=function(){var t;this._isActive&&!this._isMobileAccessibility&&(this._isActive=!1,wt.document.removeEventListener("mousemove",this._onMouseMove,!0),wt.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),null===(t=this.div.parentNode)||void 0===t||t.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(t){if(t.visible&&t.accessibleChildren){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);var e=t.children;if(e)for(var r=0;r<e.length;r++)this.updateAccessibleObjects(e[r])}},t.prototype.update=function(){var t=St.now();if(!(s.isMobile.android.device&&t<this.androidUpdateCount)&&(this.androidUpdateCount=t+this.androidUpdateFrequency,this.renderer.renderingToScreen)){this.renderer._lastObjectRendered&&this.updateAccessibleObjects(this.renderer._lastObjectRendered);var e=this.renderer.view.getBoundingClientRect(),r=e.left,i=e.top,n=e.width,o=e.height,a=this.renderer,h=a.width,u=a.height,c=a.resolution,l=n/h*c,f=o/u*c,d=this.div;d.style.left="".concat(r,"px"),d.style.top="".concat(i,"px"),d.style.width="".concat(h,"px"),d.style.height="".concat(u,"px");for(var p=0;p<this.children.length;p++){var y=this.children[p];if(y.renderId!==this.renderId)y._accessibleActive=!1,(0,s.removeItems)(this.children,p,1),this.div.removeChild(y._accessibleDiv),this.pool.push(y._accessibleDiv),y._accessibleDiv=null,p--;else{d=y._accessibleDiv;var m=y.hitArea,v=y.worldTransform;y.hitArea?(d.style.left="".concat((v.tx+m.x*v.a)*l,"px"),d.style.top="".concat((v.ty+m.y*v.d)*f,"px"),d.style.width="".concat(m.width*v.a*l,"px"),d.style.height="".concat(m.height*v.d*f,"px")):(m=y.getBounds(),this.capHitArea(m),d.style.left="".concat(m.x*l,"px"),d.style.top="".concat(m.y*f,"px"),d.style.width="".concat(m.width*l,"px"),d.style.height="".concat(m.height*f,"px"),d.title!==y.accessibleTitle&&null!==y.accessibleTitle&&(d.title=y.accessibleTitle),d.getAttribute("aria-label")!==y.accessibleHint&&null!==y.accessibleHint&&d.setAttribute("aria-label",y.accessibleHint)),y.accessibleTitle===d.title&&y.tabIndex===d.tabIndex||(d.title=y.accessibleTitle,d.tabIndex=y.tabIndex,this.debug&&this.updateDebugHTML(d))}}this.renderId++}},t.prototype.updateDebugHTML=function(t){t.innerHTML="type: ".concat(t.type,"</br> title : ").concat(t.title,"</br> tabIndex: ").concat(t.tabIndex)},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);var e=this.renderer,r=e.width,i=e.height;t.x+t.width>r&&(t.width=r-t.x),t.y+t.height>i&&(t.height=i-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=Et.createElement("button")).style.width="".concat(Ot,"px"),e.style.height="".concat(Ot,"px"),e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2..toString(),e.style.borderStyle="none",At.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),At.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject ".concat(t.tabIndex)),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction,r=t.target.displayObject,i=e.eventData;e.dispatchEvent(r,"click",i),e.dispatchEvent(r,"pointertap",i),e.dispatchEvent(r,"tap",i)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction,r=t.target.displayObject,i=e.eventData;e.dispatchEvent(r,"mouseover",i)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction,r=t.target.displayObject,i=e.eventData;e.dispatchEvent(r,"mouseout",i)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,wt.document.removeEventListener("mousemove",this._onMouseMove,!0),wt.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}(),Pt=r(8141),Ct=r(2846),Rt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Mt=function(t){function e(e,r){void 0===r&&(r=!0);var i=t.call(this,e[0]instanceof h.Texture?e[0]:e[0].texture)||this;return i._textures=null,i._durations=null,i._autoUpdate=r,i._isConnectedToTicker=!1,i.animationSpeed=1,i.loop=!0,i.updateAnchor=!1,i.onComplete=null,i.onFrameChange=null,i.onLoop=null,i._currentTime=0,i._playing=!1,i._previousFrame=null,i.textures=e,i}return Rt(e,t),e.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(j.vB.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(j.vB.shared.add(this.update,this,j.uF.HIGH),this._isConnectedToTicker=!0))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){if(this._playing){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var n=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<r||this.animationSpeed<0&&this.currentFrame>r)&&this.onLoop(),this.updateTexture())}},e.prototype.updateTexture=function(){var t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(t){for(var r=[],i=0;i<t.length;++i)r.push(h.Texture.from(t[i]));return new e(r)},e.fromImages=function(t){for(var r=[],i=0;i<t.length;++i)r.push(h.Texture.from(t[i]));return new e(r)},Object.defineProperty(e.prototype,"totalFrames",{get:function(){return this._textures.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textures",{get:function(){return this._textures},set:function(t){if(t[0]instanceof h.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentFrame",{get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playing",{get:function(){return this._playing},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(j.vB.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(j.vB.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),e}(_t.j);!function(t){var e=t.ShaderSystem;if(!e)throw new Error("Unable to patch ShaderSystem, class not found.");Object.assign(e.prototype,{systemCheck:function(){},syncUniforms:function(t,e){var r=this.shader,i=this.renderer;!function(t,e,r,i,n){var o=0,s=null,a=null,h=n.gl;for(var u in t.uniforms){var c=e[u],l=i[u],f=r[u],d=t.uniforms[u];c?"float"===c.type&&1===c.size?l!==f.value&&(f.value=l,h.uniform1f(f.location,l)):"sampler2D"!==c.type&&"samplerCube"!==c.type&&"sampler2DArray"!==c.type||1!==c.size||c.isArray?"mat3"===c.type&&1===c.size?void 0!==d.a?h.uniformMatrix3fv(f.location,!1,l.toArray(!0)):h.uniformMatrix3fv(f.location,!1,l):"vec2"===c.type&&1===c.size?void 0!==d.x?(s=l,(a=f.value)[0]===s.x&&a[1]===s.y||(a[0]=s.x,a[1]=s.y,h.uniform2f(f.location,s.x,s.y))):(s=l,(a=f.value)[0]===s[0]&&a[1]===s[1]||(a[0]=s[0],a[1]=s[1],h.uniform2f(f.location,s[0],s[1]))):"vec4"===c.type&&1===c.size?void 0!==d.width?(s=l,(a=f.value)[0]===s.x&&a[1]===s.y&&a[2]===s.width&&a[3]===s.height||(a[0]=s.x,a[1]=s.y,a[2]=s.width,a[3]=s.height,h.uniform4f(f.location,s.x,s.y,s.width,s.height))):(s=l,(a=f.value)[0]===s[0]&&a[1]===s[1]&&a[2]===s[2]&&a[3]===s[3]||(a[0]=s[0],a[1]=s[1],a[2]=s[2],a[3]=s[3],h.uniform4f(f.location,s[0],s[1],s[2],s[3]))):(1===c.size?mt:vt)[c.type].call(null,h,f.location,f.value,l):(n.texture.bind(l,o),f.value!==o&&(f.value=o,h.uniform1i(f.location,o)),o++):d.group&&n.shader.syncUniformGroup(l)}}(t,r.program.uniformData,e.uniformData,t.uniforms,i)}})}(h),h.Renderer.registerPlugin("extract",p),h.Renderer.registerPlugin("prepare",rt),h.Renderer.registerPlugin("batch",h.BatchRenderer),N.registerPlugin(st),u.registerPlugin(j.Sb),u.registerPlugin(F);var Dt="$_VERSION",Lt={AlphaFilter:ht,BlurFilter:yt}},7659:(t,e,r)=>{var i,n,o,s,a,h,u,c,l,f,d,p,y,m,v,_,g,x,b;r.d(e,{A7:()=>g,G5:()=>x,I2:()=>h,N3:()=>n,Nt:()=>d,T$:()=>s,UN:()=>v,V0:()=>o,Vi:()=>i,WB:()=>p,aH:()=>f,cB:()=>_,iw:()=>y,lg:()=>a,mr:()=>b,oT:()=>l,sp:()=>u,vK:()=>c,yl:()=>m}),function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(i||(i={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(n||(n={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(o||(o={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(s||(s={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(a||(a={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(h||(h={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(u||(u={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(c||(c={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(l||(l={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(f||(f={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(d||(d={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(p||(p={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"}(y||(y={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(m||(m={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(v||(v={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(_||(_={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(g||(g={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(x||(x={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(b||(b={}))},9043:(t,e,r)=>{r.r(e),r.d(e,{AbstractBatchRenderer:()=>Je,AbstractMultiResource:()=>A,AbstractRenderer:()=>je,ArrayResource:()=>I,Attribute:()=>tt,BaseImageResource:()=>m,BaseRenderTexture:()=>Y,BaseTexture:()=>w,BatchDrawCall:()=>$e,BatchGeometry:()=>rr,BatchPluginFactory:()=>sr,BatchRenderer:()=>ar,BatchShaderGenerator:()=>tr,BatchSystem:()=>gt,BatchTextureArray:()=>Ke,Buffer:()=>rt,BufferResource:()=>p,CanvasResource:()=>C,ContextSystem:()=>bt,CubeResource:()=>M,Filter:()=>te,FilterState:()=>pt,FilterSystem:()=>vt,Framebuffer:()=>X,FramebufferSystem:()=>wt,GLFramebuffer:()=>Tt,GLProgram:()=>Ee,GLTexture:()=>De,Geometry:()=>at,GeometrySystem:()=>At,IGLUniformData:()=>Te,INSTALLED:()=>a,ImageBitmapResource:()=>k,ImageResource:()=>b,MaskData:()=>Ot,MaskSystem:()=>oe,ObjectRenderer:()=>_t,Program:()=>Kt,ProjectionSystem:()=>fe,Quad:()=>ut,QuadUv:()=>lt,RenderTexture:()=>Q,RenderTexturePool:()=>J,RenderTextureSystem:()=>ye,Renderer:()=>Ye,Resource:()=>l,SVGResource:()=>L,ScissorSystem:()=>ue,Shader:()=>Zt,ShaderSystem:()=>Ce,SpriteMaskFilter:()=>ne,State:()=>Qt,StateSystem:()=>Re,StencilSystem:()=>le,System:()=>qe,Texture:()=>$,TextureGCSystem:()=>Me,TextureMatrix:()=>re,TextureSystem:()=>Le,TextureUvs:()=>z,UniformGroup:()=>dt,VideoResource:()=>B,ViewableBuffer:()=>Ze,autoDetectRenderer:()=>Ve,autoDetectResource:()=>h,checkMaxIfStatementsInShader:()=>Wt,createUBOElements:()=>ge,defaultFilterVertex:()=>We,defaultVertex:()=>ze,generateProgram:()=>Oe,generateUniformBufferSync:()=>be,getTestContext:()=>Lt,getUBOData:()=>xe,resources:()=>hr,systems:()=>lr,uniformParsers:()=>Gt});var i={};r.r(i),r.d(i,{AbstractMultiResource:()=>A,ArrayResource:()=>I,BaseImageResource:()=>m,BufferResource:()=>p,CanvasResource:()=>C,CubeResource:()=>M,INSTALLED:()=>a,ImageBitmapResource:()=>k,ImageResource:()=>b,Resource:()=>l,SVGResource:()=>L,VideoResource:()=>B,autoDetectResource:()=>h});var n={};r.r(n),r.d(n,{BatchSystem:()=>gt,ContextSystem:()=>bt,FilterSystem:()=>vt,FramebufferSystem:()=>wt,GeometrySystem:()=>At,MaskSystem:()=>oe,ProjectionSystem:()=>fe,RenderTextureSystem:()=>ye,ScissorSystem:()=>ue,ShaderSystem:()=>Ce,StateSystem:()=>Re,StencilSystem:()=>le,TextureGCSystem:()=>Me,TextureSystem:()=>Le});var o=r(6787),s=r(7659);o.X.PREFER_ENV=s.Vi.WEBGL2,o.X.STRICT_TEXTURE_CACHE=!1;var a=[];function h(t,e){if(!t)return null;var r="";if("string"==typeof t){var i=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);i&&(r=i[1].toLowerCase())}for(var n=a.length-1;n>=0;--n){var o=a[n];if(o.test&&o.test(t,r))return new o(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var u,c=r(2846),l=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new c.R("setRealSize"),this.onUpdate=new c.R("update"),this.onError=new c.R("onError")}return t.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},t.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},t.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.emit(t,e))},Object.defineProperty(t.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.destroyed||this.onUpdate.emit()},t.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),t.prototype.style=function(t,e,r){return!1},t.prototype.dispose=function(){},t.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},t.test=function(t,e){return!1},t}(),f=r(2202),d=(u=function(t,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},u(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),p=function(t){function e(e,r){var i=this,n=r||{},o=n.width,s=n.height;if(!o||!s)throw new Error("BufferResource width or height invalid");return(i=t.call(this,o,s)||this).data=e,i}return d(e,t),e.prototype.upload=function(t,e,r){var i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===s.iw.UNPACK);var n=e.realWidth,o=e.realHeight;return r.width===n&&r.height===o?i.texSubImage2D(e.target,0,0,0,n,o,e.format,r.type,this.data):(r.width=n,r.height=o,i.texImage2D(e.target,0,r.internalFormat,n,o,0,e.format,r.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(l),y=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),m=function(t){function e(e){var r=this,i=e,n=i.naturalWidth||i.videoWidth||i.width,o=i.naturalHeight||i.videoHeight||i.height;return(r=t.call(this,n,o)||this).source=e,r.noSubImage=!1,r}return y(e,t),e.crossOrigin=function(t,e,r){void 0===r&&0!==e.indexOf("data:")?t.crossOrigin=(0,f.determineCrossOrigin)(e):!1!==r&&(t.crossOrigin="string"==typeof r?r:"anonymous")},e.prototype.upload=function(t,e,r,i){var n=t.gl,o=e.realWidth,a=e.realHeight;if(i=i||this.source,n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===s.iw.UNPACK),this.noSubImage||e.target!==n.TEXTURE_2D||r.width!==o||r.height!==a){if(r.width=o,r.height=a,"undefined"!=typeof HTMLVideoElement&&i instanceof HTMLVideoElement&&!(i.currentTime>0&&!i.paused&&!i.ended&&i.readyState>2))return console.log("video not playing"),!0;n.texImage2D(e.target,0,r.internalFormat,e.format,r.type,i)}else n.texSubImage2D(n.TEXTURE_2D,0,0,0,e.format,r.type,i);return!0},e.prototype.update=function(){if(!this.destroyed){var e=this.source,r=e.naturalWidth||e.videoWidth||e.width,i=e.naturalHeight||e.videoHeight||e.height;this.resize(r,i),t.prototype.update.call(this)}},e.prototype.dispose=function(){this.source=null},e}(l),v=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),_=wx.window,g=wx.window.HTMLImageElement,x=wx.window.Image,b=function(t){function e(e,r){var i=this;if(r=r||{},"string"==typeof e){var n=new x;n.src=e,e=n}return i=t.call(this,e)||this,!e.complete&&i._width&&i._height&&(i._width=0,i._height=0),i.url=e.src,i._process=null,i.preserveBitmap=!1,i.createBitmap=(void 0!==r.createBitmap?r.createBitmap:o.X.CREATE_IMAGE_BITMAP)&&!!_.createImageBitmap,i.alphaMode="number"==typeof r.alphaMode?r.alphaMode:null,i.bitmap=null,i._load=null,!1!==r.autoLoad&&i.load(),i}return v(e,t),e.prototype.load=function(t){var e=this;return this._load||(void 0!==t&&(this.createBitmap=t),this._load=new Promise((function(t,r){var i=e.source;e.url=i.src;var n=function(){e.destroyed||(i.onload=null,i.onerror=null,e.resize(i.width,i.height),e._load=null,e.createBitmap?t(e.process()):t(e))};i.complete&&i.src?n():(i.onload=n,i.onerror=function(t){r(t),e.onError.emit(t)})}))),this._load},e.prototype.process=function(){var t=this,e=this.source;if(null!==this._process)return this._process;if(null!==this.bitmap||!_.createImageBitmap)return Promise.resolve(this);var r=_.createImageBitmap,i=!e.crossOrigin||"anonymous"===e.crossOrigin;return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then((function(t){return t.blob()})).then((function(i){return r(i,0,0,e.width,e.height,{premultiplyAlpha:t.alphaMode===s.iw.UNPACK?"premultiply":"none"})})).then((function(e){return t.destroyed?Promise.reject():(t.bitmap=e,t.update(),t._process=null,Promise.resolve(t))})),this._process},e.prototype.upload=function(e,r,i){if("number"==typeof this.alphaMode&&(r.alphaMode=this.alphaMode),!this.createBitmap)return t.prototype.upload.call(this,e,r,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(t.prototype.upload.call(this,e,r,i,this.bitmap),!this.preserveBitmap){var n=!0,o=r._glTextures;for(var s in o){var a=o[s];if(a!==i&&a.dirtyId!==r.dirtyId){n=!1;break}}n&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},e.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,t.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},e.test=function(t){return"string"==typeof t||t instanceof g},e}(m),T=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),E={scaleMode:s.aH.NEAREST,format:s.I2.RGBA,alphaMode:s.iw.NPM},w=function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=null);var i=t.call(this)||this,n=(r=r||{}).alphaMode,a=r.mipmap,u=r.anisotropicLevel,c=r.scaleMode,d=r.width,p=r.height,y=r.wrapMode,m=r.format,v=r.type,_=r.target,g=r.resolution,x=r.resourceOptions;if(e&&!(e instanceof l)){try{e=h(e,x)}catch(t){e=new b(e,x)}e.internal=!0}return i.resolution=g||o.X.RESOLUTION,i.width=Math.round((d||0)*i.resolution)/i.resolution,i.height=Math.round((p||0)*i.resolution)/i.resolution,i._mipmap=void 0!==a?a:o.X.MIPMAP_TEXTURES,i.anisotropicLevel=void 0!==u?u:o.X.ANISOTROPIC_LEVEL,i._wrapMode=y||o.X.WRAP_MODE,i._scaleMode=void 0!==c?c:o.X.SCALE_MODE,i.format=m||s.I2.RGBA,i.type=v||s.vK.UNSIGNED_BYTE,i.target=_||s.sp.TEXTURE_2D,i.alphaMode=void 0!==n?n:s.iw.UNPACK,i.uid=(0,f.uid)(),i.touched=0,i.isPowerOfTwo=!1,i._refreshPOT(),i._glTextures={},i.dirtyId=0,i.dirtyStyleId=0,i.cacheId=null,i.valid=d>0&&p>0,i.textureCacheIds=[],i.destroyed=!1,i.resource=null,i._batchEnabled=0,i._batchLocation=0,i.parentTextureArray=null,i.setResource(e),i}return T(e,t),Object.defineProperty(e.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mipmap",{get:function(){return this._mipmap},set:function(t){this._mipmap!==t&&(this._mipmap=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(t){this._scaleMode!==t&&(this._scaleMode=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(t){this._wrapMode!==t&&(this._wrapMode=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(t,e){var r;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,e,r){return r=r||this.resolution,this.setRealSize(t*r,e*r,r)},e.prototype.setRealSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=Math.round(t)/this.resolution,this.height=Math.round(e)/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=(0,f.isPow2)(this.realWidth)&&(0,f.isPow2)(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t||(this.resolution=t,this.valid&&(this.width=Math.round(this.width*e)/t,this.height=Math.round(this.height*e)/t,this.emit("update",this)),this._refreshPOT()),this},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete f.BaseTextureCache[this.cacheId],delete f.TextureCache[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(t,r,i){void 0===i&&(i=o.X.STRICT_TEXTURE_CACHE);var n="string"==typeof t,s=null;if(n)s=t;else{if(!t._pixiId){var a=r&&r.pixiIdPrefix||"pixiid";t._pixiId="".concat(a,"_").concat((0,f.uid)())}s=t._pixiId}var h=f.BaseTextureCache[s];if(n&&i&&!h)throw new Error('The cacheId "'.concat(s,'" does not exist in BaseTextureCache.'));return h||((h=new e(t,r)).cacheId=s,e.addToCache(h,s)),h},e.fromBuffer=function(t,r,i,n){t=t||new Float32Array(r*i*4);var o=new p(t,{width:r,height:i}),a=t instanceof Float32Array?s.vK.FLOAT:s.vK.UNSIGNED_BYTE;return new e(o,Object.assign(E,n||{width:r,height:i,type:a}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),f.BaseTextureCache[e]&&console.warn("BaseTexture added to the cache with an id [".concat(e,"] that already had an entry")),f.BaseTextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=f.BaseTextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete f.BaseTextureCache[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)delete f.BaseTextureCache[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},e._globalBatch=0,e}(f.EventEmitter),S=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),A=function(t){function e(e,r){var i=this,n=r||{},o=n.width,s=n.height;(i=t.call(this,o,s)||this).items=[],i.itemDirtyIds=[];for(var a=0;a<e;a++){var h=new w;i.items.push(h),i.itemDirtyIds.push(-2)}return i.length=e,i._load=null,i.baseTexture=null,i}return S(e,t),e.prototype.initFromArray=function(t,e){for(var r=0;r<this.length;r++)t[r]&&(t[r].castToBaseTexture?this.addBaseTextureAt(t[r].castToBaseTexture(),r):t[r]instanceof l?this.addResourceAt(t[r],r):this.addResourceAt(h(t[r],e),r))},e.prototype.dispose=function(){for(var t=0,e=this.length;t<e;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},e.prototype.addResourceAt=function(t,e){if(!this.items[e])throw new Error("Index ".concat(e," is out of bounds"));return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[e].setResource(t),this},e.prototype.bind=function(e){if(null!==this.baseTexture)throw new Error("Only one base texture per TextureArray is allowed");t.prototype.bind.call(this,e);for(var r=0;r<this.length;r++)this.items[r].parentTextureArray=e,this.items[r].on("update",e.update,e)},e.prototype.unbind=function(e){t.prototype.unbind.call(this,e);for(var r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",e.update,e)},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.items.map((function(t){return t.resource})).filter((function(t){return t})).map((function(t){return t.load()}));return this._load=Promise.all(e).then((function(){var e=t.items[0],r=e.realWidth,i=e.realHeight;return t.resize(r,i),Promise.resolve(t)})),this._load},e}(l),O=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),I=function(t){function e(e,r){var i,n,o=this,s=r||{},a=s.width,h=s.height;return Array.isArray(e)?(i=e,n=e.length):n=e,o=t.call(this,n,{width:a,height:h})||this,i&&o.initFromArray(i,r),o}return O(e,t),e.prototype.addBaseTextureAt=function(t,e){if(!t.resource)throw new Error("ArrayResource does not support RenderTexture");return this.addResourceAt(t.resource,e),this},e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=s.sp.TEXTURE_2D_ARRAY},e.prototype.upload=function(t,e,r){var i=this,n=i.length,o=i.itemDirtyIds,s=i.items,a=t.gl;r.dirtyId<0&&a.texImage3D(a.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,n,0,e.format,r.type,null);for(var h=0;h<n;h++){var u=s[h];o[h]<u.dirtyId&&(o[h]=u.dirtyId,u.valid&&a.texSubImage3D(a.TEXTURE_2D_ARRAY,0,0,0,h,u.resource.width,u.resource.height,1,e.format,r.type,u.resource.source))}return!0},e}(A),P=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),C=function(t){function e(e){return t.call(this,e)||this}return P(e,t),e.test=function(t){var e=self.OffscreenCanvas;return!!(e&&t instanceof e)||(wx&&"undefined"!=typeof wx&&t._canvasId?(console.log("CanvasResource test: is canvasRes"),!0):self.HTMLCanvasElement&&t instanceof HTMLCanvasElement)},e}(m),R=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),M=function(t){function e(r,i){var n=this,o=i||{},a=o.width,h=o.height,u=o.autoLoad,c=o.linkBaseTexture;if(r&&r.length!==e.SIDES)throw new Error("Invalid length. Got ".concat(r.length,", expected 6"));n=t.call(this,6,{width:a,height:h})||this;for(var l=0;l<e.SIDES;l++)n.items[l].target=s.sp.TEXTURE_CUBE_MAP_POSITIVE_X+l;return n.linkBaseTexture=!1!==c,r&&n.initFromArray(r,i),!1!==u&&n.load(),n}return R(e,t),e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=s.sp.TEXTURE_CUBE_MAP},e.prototype.addBaseTextureAt=function(t,e,r){if(void 0===r&&(r=this.linkBaseTexture),!this.items[e])throw new Error("Index ".concat(e," is out of bounds"));if(!this.linkBaseTexture||t.parentTextureArray||Object.keys(t._glTextures).length>0){if(!t.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(t.resource,e)}else t.target=s.sp.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this},e.prototype.upload=function(t,r,i){for(var n=this.itemDirtyIds,o=0;o<e.SIDES;o++){var s=this.items[o];n[o]<s.dirtyId&&(s.valid&&s.resource?(s.resource.upload(t,s,i),n[o]=s.dirtyId):n[o]<-1&&(t.gl.texImage2D(s.target,0,i.internalFormat,r.realWidth,r.realHeight,0,r.format,i.type,null),n[o]=-1))}return!0},e.test=function(t){return Array.isArray(t)&&t.length===e.SIDES},e.SIDES=6,e}(A),D=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),L=function(t){function e(e,r){var i=this;return r=r||{},(i=t.call(this,document&&document.createElement("canvas"))||this)._width=0,i._height=0,i.svg=e,i.scale=r.scale||1,i._overrideWidth=r.width,i._overrideHeight=r.height,i._resolve=null,i._crossorigin=r.crossorigin,i._load=null,!1!==r.autoLoad&&i.load(),i}return D(e,t),e.prototype.load=function(){var t=this;return this._load||(this._load=new Promise((function(r){if(t._resolve=function(){t.resize(t.source.width,t.source.height),r(t)},e.SVG_XML.test(t.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");t.svg="data:image/svg+xml;base64,".concat(btoa(unescape(encodeURIComponent(t.svg))))}t._loadSvg()}))),this._load},e.prototype._loadSvg=function(){var t=this,e=new Image;m.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=function(r){t._resolve&&(e.onerror=null,t.onError.emit(r))},e.onload=function(){if(t._resolve){var r=e.width,i=e.height;if(!r||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var n=r*t.scale,o=i*t.scale;(t._overrideWidth||t._overrideHeight)&&(n=t._overrideWidth||t._overrideHeight/i*r,o=t._overrideHeight||t._overrideWidth/r*i),n=Math.round(n),o=Math.round(o);var s=t.source;s.width=n,s.height=o,s._pixiId="canvas_".concat((0,f.uid)()),s.getContext("2d").drawImage(e,0,0,r,i,0,0,n,o),t._resolve(),t._resolve=null}}},e.getSize=function(t){var r=e.SVG_SIZE.exec(t),i={};return r&&(i[r[1]]=Math.round(parseFloat(r[3])),i[r[5]]=Math.round(parseFloat(r[7]))),i},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},e.test=function(t,r){return"svg"===r||"string"==typeof t&&/^data:image\/svg\+xml(;(charset=utf8|utf8))?;base64/.test(t)||"string"==typeof t&&e.SVG_XML.test(t)},e.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,e.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(m),N=r(2901),F=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),B=function(t){function e(r,i){var n=this;if(i=i||{},!(r instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),"string"==typeof r&&(r=[r]);var s=r[0].src||r[0];m.crossOrigin(o,s,i.crossorigin);for(var a=0;a<r.length;++a){var h=document.createElement("source"),u=r[a],c=u.src,l=u.mime,f=(c=c||r[a]).split("?").shift().toLowerCase(),d=f.substr(f.lastIndexOf(".")+1);l=l||e.MIME_TYPES[d]||"video/".concat(d),h.src=c,h.type=l,o.appendChild(h)}r=o}return(n=t.call(this,r)||this).noSubImage=!0,n._autoUpdate=!0,n._isConnectedToTicker=!1,n._updateFPS=i.updateFPS||0,n._msToNextUpdate=0,n.autoPlay=!1!==i.autoPlay,n._load=null,n._resolve=null,n._onCanPlay=n._onCanPlay.bind(n),n._onError=n._onError.bind(n),!1!==i.autoLoad&&n.load(),n}return F(e,t),e.prototype.update=function(e){if(void 0===e&&(e=0),!this.destroyed){var r=N.vB.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-r),(!this._updateFPS||this._msToNextUpdate<=0)&&(t.prototype.update.call(this),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise((function(r){t.valid?r(t):(t._resolve=r,e.load())})),this._load},e.prototype._onError=function(t){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(t)},e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){var t=this.source;return 3===t.readyState||4===t.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(N.vB.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(N.vB.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&(N.vB.shared.remove(this.update,this),this._isConnectedToTicker=!1);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(N.vB.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(N.vB.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,r){return self.HTMLVideoElement&&t instanceof HTMLVideoElement||e.TYPES.indexOf(r)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(m),U=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),k=function(t){function e(e){return t.call(this,e)||this}return U(e,t),e.test=function(t){return!!self.createImageBitmap&&t instanceof ImageBitmap},e}(m);a.push(b,k,C,B,L,p,M,I);var j=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.upload=function(t,e,r){var i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===s.iw.UNPACK);var n=e.realWidth,o=e.realHeight;return r.width===n&&r.height===o?i.texSubImage2D(e.target,0,0,0,n,o,e.format,r.type,this.data):(r.width=n,r.height=o,i.texImage2D(e.target,0,r.internalFormat,n,o,0,e.format,r.type,this.data)),!0},e}(p),X=function(){function t(t,e){this.width=Math.round(t||100),this.height=Math.round(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new c.R("disposeFramebuffer"),this.multisample=s.G5.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new w(null,{scaleMode:s.aH.NEAREST,resolution:1,mipmap:s.WB.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(t){return this.depthTexture=t||new w(new G(null,{width:this.width,height:this.height}),{scaleMode:s.aH.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:s.WB.OFF,format:s.I2.DEPTH_COMPONENT,type:s.vK.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(t,e){if(t=Math.round(t),e=Math.round(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var r=0;r<this.colorTextures.length;r++){var i=this.colorTextures[r],n=i.resolution;i.setSize(t/n,e/n)}if(this.depthTexture){n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,e/n)}}},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroyDepthTexture=function(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)},t}(),H=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Y=function(t){function e(e){var r=this;if("number"==typeof e){var i=arguments[0],n=arguments[1],o=arguments[2],a=arguments[3];e={width:i,height:n,scaleMode:o,resolution:a}}return e.width=e.width||100,e.height=e.height||100,e.multisample=void 0!==e.multisample?e.multisample:s.G5.NONE,(r=t.call(this,null,e)||this).mipmap=s.WB.OFF,r.valid=!0,r.clearColor=[0,0,0,0],r.framebuffer=new X(r.realWidth,r.realHeight).addColorTexture(0,r),r.framebuffer.multisample=e.multisample,r.maskStack=[],r.filterStack=[{}],r}return H(e,t),e.prototype.resize=function(t,e){this.framebuffer.resize(t*this.resolution,e*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)},e.prototype.dispose=function(){this.framebuffer.dispose(),t.prototype.dispose.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.framebuffer.destroyDepthTexture(),this.framebuffer=null},e}(w),V=r(1893),z=function(){function t(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}return t.prototype.set=function(t,e,r){var i=e.width,n=e.height;if(r){var o=t.width/2/i,s=t.height/2/n,a=t.x/i+o,h=t.y/n+s;r=V.Lv.add(r,V.Lv.NW),this.x0=a+o*V.Lv.uX(r),this.y0=h+s*V.Lv.uY(r),r=V.Lv.add(r,2),this.x1=a+o*V.Lv.uX(r),this.y1=h+s*V.Lv.uY(r),r=V.Lv.add(r,2),this.x2=a+o*V.Lv.uX(r),this.y2=h+s*V.Lv.uY(r),r=V.Lv.add(r,2),this.x3=a+o*V.Lv.uX(r),this.y3=h+s*V.Lv.uY(r)}else this.x0=t.x/i,this.y0=t.y/n,this.x1=(t.x+t.width)/i,this.y1=t.y/n,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/n,this.x3=t.x/i,this.y3=(t.y+t.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3},t.prototype.toString=function(){return"[@pixi/core:TextureUvs "+"x0=".concat(this.x0," y0=").concat(this.y0," ")+"x1=".concat(this.x1," y1=").concat(this.y1," x2=").concat(this.x2," ")+"y2=".concat(this.y2," x3=").concat(this.x3," y3=").concat(this.y3)+"]"},t}(),W=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),q=new z,$=function(t){function e(r,i,n,o,s,a){var h=t.call(this)||this;if(h.noFrame=!1,i||(h.noFrame=!0,i=new V.Ae(0,0,1,1)),r instanceof e&&(r=r.baseTexture),h.baseTexture=r,h._frame=i,h.trim=o,h.valid=!1,h._uvs=q,h.uvMatrix=null,h.orig=n||i,h._rotate=Number(s||0),!0===s)h._rotate=2;else if(h._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return h.defaultAnchor=a?new V.E9(a.x,a.y):new V.E9(0,0),h._updateID=0,h.textureCacheIds=[],r.valid?h.noFrame?r.valid&&h.onBaseTextureUpdated(r):h.frame=i:r.once("loaded",h.onBaseTextureUpdated,h),h.noFrame&&r.on("update",h.onBaseTextureUpdated,h),h}return W(e,t),e.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},e.prototype.onBaseTextureUpdated=function(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},e.prototype.destroy=function(t){if(this.baseTexture){if(t){var r=this.baseTexture.resource;r&&r.url&&f.TextureCache[r.url]&&e.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){var t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),i=new e(this.baseTexture,!this.noFrame&&t,r,this.trim&&this.trim.clone(),this.rotate,this.defaultAnchor);return this.noFrame&&(i._frame=t),i},e.prototype.updateUvs=function(){this._uvs===q&&(this._uvs=new z),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.from=function(t,r,i){void 0===r&&(r={}),void 0===i&&(i=o.X.STRICT_TEXTURE_CACHE);var n="string"==typeof t,s=null;if(n)s=t;else if(t instanceof w){if(!t.cacheId){var a=r&&r.pixiIdPrefix||"pixiid";t.cacheId="".concat(a,"-").concat((0,f.uid)()),w.addToCache(t,t.cacheId)}s=t.cacheId}else{if(!t._pixiId){a=r&&r.pixiIdPrefix||"pixiid";t._pixiId="".concat(a,"_").concat((0,f.uid)())}s=t._pixiId}var h=f.TextureCache[s];if(n&&i&&!h)throw new Error('The cacheId "'.concat(s,'" does not exist in TextureCache.'));return h||t instanceof w?!h&&t instanceof w&&(h=new e(t),e.addToCache(h,s)):(r.resolution||(r.resolution=(0,f.getResolutionOfUrl)(t)),(h=new e(new w(t,r))).baseTexture.cacheId=s,w.addToCache(h.baseTexture,s),e.addToCache(h,s)),h},e.fromURL=function(t,r){var i=Object.assign({autoLoad:!1},null==r?void 0:r.resourceOptions),n=e.from(t,Object.assign({resourceOptions:i},r),!1),o=n.baseTexture.resource;return n.baseTexture.valid?Promise.resolve(n):o.load().then((function(){return Promise.resolve(n)}))},e.fromBuffer=function(t,r,i,n){return new e(w.fromBuffer(t,r,i,n))},e.fromLoader=function(t,r,i,n){var s=new w(t,Object.assign({scaleMode:o.X.SCALE_MODE,resolution:(0,f.getResolutionOfUrl)(r)},n)),a=s.resource;a instanceof b&&(a.url=r);var h=new e(s);return i||(i=r),w.addToCache(h.baseTexture,i),e.addToCache(h,i),i!==r&&(w.addToCache(h.baseTexture,r),e.addToCache(h,r)),h.baseTexture.valid?Promise.resolve(h):new Promise((function(t){h.baseTexture.once("loaded",(function(){return t(h)}))}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),f.TextureCache[e]&&console.warn("Texture added to the cache with an id [".concat(e,"] that already had an entry")),f.TextureCache[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=f.TextureCache[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete f.TextureCache[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)f.TextureCache[t.textureCacheIds[i]]===t&&delete f.TextureCache[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},Object.defineProperty(e.prototype,"resolution",{get:function(){return this.baseTexture.resolution},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frame",{get:function(){return this._frame},set:function(t){this._frame=t,this.noFrame=!1;var e=t.x,r=t.y,i=t.width,n=t.height,o=e+i>this.baseTexture.width,s=r+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",h="X: ".concat(e," + ").concat(i," = ").concat(e+i," > ").concat(this.baseTexture.width),u="Y: ".concat(r," + ").concat(n," = ").concat(r+n," > ").concat(this.baseTexture.height);throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+"".concat(h," ").concat(a," ").concat(u))}this.valid=i&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},e}(f.EventEmitter);function K(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}$.EMPTY=new $(new w),K($.EMPTY),K($.EMPTY.baseTexture),$.WHITE=function(){for(var t=new Uint8Array(1024),e=0;e<256;e++)t[4*e]=255,t[4*e+1]=255,t[4*e+2]=255,t[4*e+3]=255;return $.fromBuffer(t,16,16)}(),K($.WHITE),K($.WHITE.baseTexture);var Z=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Q=function(t){function e(e,r){var i=t.call(this,e,r)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Z(e,t),Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(t){this.framebuffer.multisample=t},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e,r){void 0===r&&(r=!0);var i=this.baseTexture.resolution,n=Math.round(t*i)/i,o=Math.round(e*i)/i;this.valid=n>0&&o>0,this._frame.width=this.orig.width=n,this._frame.height=this.orig.height=o,r&&this.baseTexture.resize(n,o),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return"number"==typeof t&&((0,f.deprecation)("6.0.0","Arguments (width, height, scaleMode, resolution) have been deprecated."),t={width:t,height:r[0],scaleMode:r[1],resolution:r[2]}),new e(new Y(t))},e}($),J=function(){function t(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return t.prototype.createTexture=function(t,e,r){void 0===r&&(r=s.G5.NONE);var i=new Y(Object.assign({width:t,height:e,resolution:1,multisample:r},this.textureOptions));return new Q(i)},t.prototype.getOptimalTexture=function(t,e,r,i){var n;void 0===r&&(r=1),void 0===i&&(i=s.G5.NONE),t=Math.ceil(t*r),e=Math.ceil(e*r),this.enableFullScreen&&t===this._pixelsWidth&&e===this._pixelsHeight?n=i>1?-i:-1:(n=((65535&(t=(0,f.nextPow2)(t)))<<16|65535&(e=(0,f.nextPow2)(e)))>>>0,i>1&&(n+=4294967296*i)),this.texturePool[n]||(this.texturePool[n]=[]);var o=this.texturePool[n].pop();return o||(o=this.createTexture(t,e,i)),o.filterPoolKey=n,o.setResolution(r),o},t.prototype.getFilterTexture=function(t,e,r){var i=this.getOptimalTexture(t.width,t.height,e||t.resolution,r||s.G5.NONE);return i.filterFrame=t.filterFrame,i},t.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},t.prototype.returnFilterTexture=function(t){this.returnTexture(t)},t.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var r=this.texturePool[e];if(r)for(var i=0;i<r.length;i++)r[i].destroy(!0)}this.texturePool={}},t.prototype.setScreenSize=function(t){if(t.width!==this._pixelsWidth||t.height!==this._pixelsHeight){for(var e in this.enableFullScreen=t.width>0&&t.height>0,this.texturePool)if(Number(e)<0){var r=this.texturePool[e];if(r)for(var i=0;i<r.length;i++)r[i].destroy(!0);this.texturePool[e]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}},t.SCREEN_KEY=-1,t}(),tt=function(){function t(t,e,r,i,n,o,a){void 0===e&&(e=0),void 0===r&&(r=!1),void 0===i&&(i=s.vK.FLOAT),this.buffer=t,this.size=e,this.normalized=r,this.type=i,this.stride=n,this.start=o,this.instance=a}return t.prototype.destroy=function(){this.buffer=null},t.from=function(e,r,i,n,o){return new t(e,r,i,n,o)},t}(),et=0,rt=function(){function t(t,e,r){void 0===e&&(e=!0),void 0===r&&(r=!1),this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=r,this.static=e,this.id=et++,this.disposeRunner=new c.R("disposeBuffer")}return t.prototype.update=function(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroy=function(){this.dispose(),this.data=null},Object.defineProperty(t.prototype,"index",{get:function(){return this.type===s.mr.ELEMENT_ARRAY_BUFFER},set:function(t){this.type=t?s.mr.ELEMENT_ARRAY_BUFFER:s.mr.ARRAY_BUFFER},enumerable:!1,configurable:!0}),t.from=function(e){return e instanceof Array&&(e=new Float32Array(e)),new t(e)},t}(),it={Float32Array,Uint32Array,Int32Array,Uint8Array};var nt={5126:4,5123:2,5121:1},ot=0,st={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array},at=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this.buffers=t,this.indexBuffer=null,this.attributes=e,this.glVertexArrayObjects={},this.id=ot++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new c.R("disposeGeometry"),this.refCount=0}return t.prototype.addAttribute=function(t,e,r,i,n,o,s,a){if(void 0===r&&(r=0),void 0===i&&(i=!1),void 0===a&&(a=!1),!e)throw new Error("You must pass a buffer when creating an attribute");e instanceof rt||(e instanceof Array&&(e=new Float32Array(e)),e=new rt(e));var h=t.split("|");if(h.length>1){for(var u=0;u<h.length;u++)this.addAttribute(h[u],e,r,i,n);return this}var c=this.buffers.indexOf(e);return-1===c&&(this.buffers.push(e),c=this.buffers.length-1),this.attributes[t]=new tt(c,r,i,n,o,s,a),this.instanced=this.instanced||a,this},t.prototype.getAttribute=function(t){return this.attributes[t]},t.prototype.getBuffer=function(t){return this.buffers[this.getAttribute(t).buffer]},t.prototype.addIndex=function(t){return t instanceof rt||(t instanceof Array&&(t=new Uint16Array(t)),t=new rt(t)),t.type=s.mr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,-1===this.buffers.indexOf(t)&&this.buffers.push(t),this},t.prototype.getIndex=function(){return this.indexBuffer},t.prototype.interleave=function(){if(1===this.buffers.length||2===this.buffers.length&&this.indexBuffer)return this;var t,e=[],r=[],i=new rt;for(t in this.attributes){var n=this.attributes[t],o=this.buffers[n.buffer];e.push(o.data),r.push(n.size*nt[n.type]/4),n.buffer=0}for(i.data=function(t,e){for(var r=0,i=0,n={},o=0;o<t.length;o++)i+=e[o],r+=t[o].length;var s=new ArrayBuffer(4*r),a=null,h=0;for(o=0;o<t.length;o++){var u=e[o],c=t[o],l=(0,f.getBufferType)(c);n[l]||(n[l]=new it[l](s)),a=n[l];for(var d=0;d<c.length;d++)a[(d/u|0)*i+h+d%u]=c[d];h+=u}return new Float32Array(s)}(e,r),t=0;t<this.buffers.length;t++)this.buffers[t]!==this.indexBuffer&&this.buffers[t].destroy();return this.buffers=[i],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},t.prototype.getSize=function(){for(var t in this.attributes){var e=this.attributes[t];return this.buffers[e.buffer].data.length/(e.stride/4||e.size)}return 0},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null},t.prototype.clone=function(){for(var e=new t,r=0;r<this.buffers.length;r++)e.buffers[r]=new rt(this.buffers[r].data.slice(0));for(var r in this.attributes){var i=this.attributes[r];e.attributes[r]=new tt(i.buffer,i.size,i.normalized,i.type,i.stride,i.start,i.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=s.mr.ELEMENT_ARRAY_BUFFER),e},t.merge=function(e){for(var r,i=new t,n=[],o=[],a=[],h=0;h<e.length;h++){r=e[h];for(var u=0;u<r.buffers.length;u++)o[u]=o[u]||0,o[u]+=r.buffers[u].data.length,a[u]=0}for(h=0;h<r.buffers.length;h++)n[h]=new(st[(0,f.getBufferType)(r.buffers[h].data)])(o[h]),i.buffers[h]=new rt(n[h]);for(h=0;h<e.length;h++){r=e[h];for(u=0;u<r.buffers.length;u++)n[u].set(r.buffers[u].data,a[u]),a[u]+=r.buffers[u].data.length}if(i.attributes=r.attributes,r.indexBuffer){i.indexBuffer=i.buffers[r.buffers.indexOf(r.indexBuffer)],i.indexBuffer.type=s.mr.ELEMENT_ARRAY_BUFFER;var c=0,l=0,d=0,p=0;for(h=0;h<r.buffers.length;h++)if(r.buffers[h]!==r.indexBuffer){p=h;break}for(var h in r.attributes){var y=r.attributes[h];(0|y.buffer)===p&&(l+=y.size*nt[y.type]/4)}for(h=0;h<e.length;h++){var m=e[h].indexBuffer.data;for(u=0;u<m.length;u++)i.indexBuffer.data[u+d]+=c;c+=e[h].buffers[p].data.length/l,d+=m.length}}return i},t}(),ht=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ut=function(t){function e(){var e=t.call(this)||this;return e.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2]),e}return ht(e,t),e}(at),ct=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),lt=function(t){function e(){var e=t.call(this)||this;return e.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),e.uvs=new Float32Array([0,0,1,0,1,1,0,1]),e.vertexBuffer=new rt(e.vertices),e.uvBuffer=new rt(e.uvs),e.addAttribute("aVertexPosition",e.vertexBuffer).addAttribute("aTextureCoord",e.uvBuffer).addIndex([0,1,2,0,2,3]),e}return ct(e,t),e.prototype.map=function(t,e){var r=0,i=0;return this.uvs[0]=r,this.uvs[1]=i,this.uvs[2]=r+e.width/t.width,this.uvs[3]=i,this.uvs[4]=r+e.width/t.width,this.uvs[5]=i+e.height/t.height,this.uvs[6]=r,this.uvs[7]=i+e.height/t.height,r=e.x,i=e.y,this.vertices[0]=r,this.vertices[1]=i,this.vertices[2]=r+e.width,this.vertices[3]=i,this.vertices[4]=r+e.width,this.vertices[5]=i+e.height,this.vertices[6]=r,this.vertices[7]=i+e.height,this.invalidate(),this},e.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},e}(at),ft=0,dt=function(){function t(t,e,r){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=ft++,this.static=!!e,this.ubo=!!r,t instanceof rt?(this.buffer=t,this.buffer.type=s.mr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new rt(new Float32Array(1)),this.buffer.type=s.mr.UNIFORM_BUFFER,this.autoManage=!0))}return t.prototype.update=function(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()},t.prototype.add=function(e,r,i){if(this.ubo)throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them");this.uniforms[e]=new t(r,i)},t.from=function(e,r,i){return new t(e,r,i)},t.uboFrom=function(e,r){return new t(e,null==r||r,!0)},t}(),pt=function(){function t(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=s.G5.NONE,this.sourceFrame=new V.Ae,this.destinationFrame=new V.Ae,this.bindingSourceFrame=new V.Ae,this.bindingDestinationFrame=new V.Ae,this.filters=[],this.transform=null}return t.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null},t}(),yt=[new V.E9,new V.E9,new V.E9,new V.E9],mt=new V.y3,vt=function(){function t(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new J,this.texturePool.setScreenSize(t.view),this.statePool=[],this.quad=new ut,this.quadUv=new lt,this.tempRect=new V.Ae,this.activeState={},this.globalUniforms=new dt({outputFrame:new V.Ae,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}return t.prototype.push=function(t,e){for(var r=this.renderer,i=this.defaultFilterStack,n=this.statePool.pop()||new pt,o=this.renderer.renderTexture,s=e[0].resolution,a=e[0].multisample,h=e[0].padding,u=e[0].autoFit,c=e[0].legacy,l=1;l<e.length;l++){var f=e[l];s=Math.min(s,f.resolution),a=Math.min(a,f.multisample),h=this.useMaxPadding?Math.max(h,f.padding):h+f.padding,u=u&&f.autoFit,c=c||f.legacy}if(1===i.length&&(this.defaultFilterStack[0].renderTexture=o.current),i.push(n),n.resolution=s,n.multisample=a,n.legacy=c,n.target=t,n.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),n.sourceFrame.pad(h),u){var d=this.tempRect.copyFrom(o.sourceFrame);r.projection.transform&&this.transformAABB(mt.copyFrom(r.projection.transform).invert(),d),n.sourceFrame.fit(d)}this.roundFrame(n.sourceFrame,o.current?o.current.resolution:r.resolution,o.sourceFrame,o.destinationFrame,r.projection.transform),n.renderTexture=this.getOptimalFilterTexture(n.sourceFrame.width,n.sourceFrame.height,s,a),n.filters=e,n.destinationFrame.width=n.renderTexture.width,n.destinationFrame.height=n.renderTexture.height;var p=this.tempRect;p.x=0,p.y=0,p.width=n.sourceFrame.width,p.height=n.sourceFrame.height,n.renderTexture.filterFrame=n.sourceFrame,n.bindingSourceFrame.copyFrom(o.sourceFrame),n.bindingDestinationFrame.copyFrom(o.destinationFrame),n.transform=r.projection.transform,r.projection.transform=null,o.bind(n.renderTexture,n.sourceFrame,p),r.framebuffer.clear(0,0,0,0)},t.prototype.pop=function(){var t=this.defaultFilterStack,e=t.pop(),r=e.filters;this.activeState=e;var i=this.globalUniforms.uniforms;i.outputFrame=e.sourceFrame,i.resolution=e.resolution;var n=i.inputSize,o=i.inputPixel,a=i.inputClamp;if(n[0]=e.destinationFrame.width,n[1]=e.destinationFrame.height,n[2]=1/n[0],n[3]=1/n[1],o[0]=Math.round(n[0]*e.resolution),o[1]=Math.round(n[1]*e.resolution),o[2]=1/o[0],o[3]=1/o[1],a[0]=.5*o[2],a[1]=.5*o[3],a[2]=e.sourceFrame.width*n[2]-.5*o[2],a[3]=e.sourceFrame.height*n[3]-.5*o[3],e.legacy){var h=i.filterArea;h[0]=e.destinationFrame.width,h[1]=e.destinationFrame.height,h[2]=e.sourceFrame.x,h[3]=e.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();var u=t[t.length-1];if(this.renderer.framebuffer.blit(),1===r.length)r[0].apply(this,e.renderTexture,u.renderTexture,s.yl.BLEND,e),this.returnFilterTexture(e.renderTexture);else{var c=e.renderTexture,l=this.getOptimalFilterTexture(c.width,c.height,e.resolution);l.filterFrame=c.filterFrame;var f=0;for(f=0;f<r.length-1;++f){1===f&&e.multisample>1&&((l=this.getOptimalFilterTexture(c.width,c.height,e.resolution)).filterFrame=c.filterFrame),r[f].apply(this,c,l,s.yl.CLEAR,e);var d=c;c=l,l=d}r[f].apply(this,c,u.renderTexture,s.yl.BLEND,e),f>1&&e.multisample>1&&this.returnFilterTexture(e.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(l)}e.clear(),this.statePool.push(e)},t.prototype.bindAndClear=function(t,e){void 0===e&&(e=s.yl.CLEAR);var r=this.renderer,i=r.renderTexture,n=r.state;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t&&t.filterFrame){var o=this.tempRect;o.x=0,o.y=0,o.width=t.filterFrame.width,o.height=t.filterFrame.height,i.bind(t,t.filterFrame,o)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var a=1&n.stateId||this.forceClear;(e===s.yl.CLEAR||e===s.yl.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)},t.prototype.applyFilter=function(t,e,r,i){var n=this.renderer;n.state.set(t.state),this.bindAndClear(r,i),t.uniforms.uSampler=e,t.uniforms.filterGlobals=this.globalUniforms,n.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(e._frame,e.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(s.lg.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(s.lg.TRIANGLE_STRIP))},t.prototype.calculateSpriteMatrix=function(t,e){var r=this.activeState,i=r.sourceFrame,n=r.destinationFrame,o=e._texture.orig,s=t.set(n.width,0,0,n.height,i.x,i.y),a=e.worldTransform.copyTo(V.y3.TEMP_MATRIX);return a.invert(),s.prepend(a),s.scale(1/o.width,1/o.height),s.translate(e.anchor.x,e.anchor.y),s},t.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},t.prototype.getOptimalFilterTexture=function(t,e,r,i){return void 0===r&&(r=1),void 0===i&&(i=s.G5.NONE),this.texturePool.getOptimalTexture(t,e,r,i)},t.prototype.getFilterTexture=function(t,e,r){if("number"==typeof t){var i=t;t=e,e=i}t=t||this.activeState.renderTexture;var n=this.texturePool.getOptimalTexture(t.width,t.height,e||t.resolution,r||s.G5.NONE);return n.filterFrame=t.filterFrame,n},t.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},t.prototype.emptyPool=function(){this.texturePool.clear(!0)},t.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},t.prototype.transformAABB=function(t,e){var r=yt[0],i=yt[1],n=yt[2],o=yt[3];r.set(e.left,e.top),i.set(e.left,e.bottom),n.set(e.right,e.top),o.set(e.right,e.bottom),t.apply(r,r),t.apply(i,i),t.apply(n,n),t.apply(o,o);var s=Math.min(r.x,i.x,n.x,o.x),a=Math.min(r.y,i.y,n.y,o.y),h=Math.max(r.x,i.x,n.x,o.x),u=Math.max(r.y,i.y,n.y,o.y);e.x=s,e.y=a,e.width=h-s,e.height=u-a},t.prototype.roundFrame=function(t,e,r,i,n){if(n){var o=n.a,s=n.b,a=n.c,h=n.d;if((Math.abs(s)>1e-4||Math.abs(a)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(h)>1e-4))return}(n=n?mt.copyFrom(n):mt.identity()).translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.transformAABB(n,t),t.ceil(e),this.transformAABB(n.invert(),t)},t}(),_t=function(){function t(t){this.renderer=t}return t.prototype.flush=function(){},t.prototype.destroy=function(){this.renderer=null},t.prototype.start=function(){},t.prototype.stop=function(){this.flush()},t.prototype.render=function(t){},t}(),gt=function(){function t(t){this.renderer=t,this.emptyRenderer=new _t(t),this.currentRenderer=this.emptyRenderer}return t.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},t.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.copyBoundTextures=function(t,e){for(var r=this.renderer.texture.boundTextures,i=e-1;i>=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)},t.prototype.boundArray=function(t,e,r,i){for(var n=t.elements,o=t.ids,s=t.count,a=0,h=0;h<s;h++){var u=n[h],c=u._batchLocation;if(c>=0&&c<i&&e[c]===u)o[h]=c;else for(;a<i;){var l=e[a];if(!l||l._batchEnabled!==r||l._batchLocation!==a){o[h]=a,u._batchLocation=a,e[a]=u;break}a++}}},t.prototype.destroy=function(){this.renderer=null},t}(),xt=(wx.window,0),bt=function(){function t(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),t.view.addEventListener("webglcontextlost",this.handleContextLost,!1),t.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}return Object.defineProperty(t.prototype,"isLost",{get:function(){return!this.gl||this.gl.isContextLost()},enumerable:!1,configurable:!0}),t.prototype.contextChange=function(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=xt++,t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext()},t.prototype.initFromContext=function(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=xt++,this.renderer.runners.contextChange.emit(t)},t.prototype.initFromOptions=function(t){var e=this.createContext(this.renderer.view,t);this.initFromContext(e)},t.prototype.createContext=function(t,e){var r;return r=t.getContext("webgl",e),this.gl=r,this.getExtensions(),this.gl},t.prototype.getExtensions=function(){var t=this.gl,e={anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};1===this.webGLVersion?Object.assign(this.extensions,e,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,e,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})},t.prototype.handleContextLost=function(t){t.preventDefault()},t.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},t.prototype.destroy=function(){var t=this.renderer.view;this.renderer=null,t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},t.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},t.prototype.validateContext=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var e=!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=e,e||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},t}(),Tt=function(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=s.G5.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0},Et=new V.Ae,wt=function(){function t(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new X(10,10),this.msaaSamples=null}return t.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new V.Ae,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;o.X.PREFER_ENV===s.Vi.WEBGL_LEGACY&&(e=null,r=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},t.prototype.bind=function(t,e,r){void 0===r&&(r=0);var i=this.gl;if(t){var n=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==r&&(t.dirtyId++,t.dirtyFormat++,n.mipLevel=r),n.dirtyId!==t.dirtyId&&(n.dirtyId=t.dirtyId,n.dirtyFormat!==t.dirtyFormat?(n.dirtyFormat=t.dirtyFormat,n.dirtySize=t.dirtySize,this.updateFramebuffer(t,r)):n.dirtySize!==t.dirtySize&&(n.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var o=0;o<t.colorTextures.length;o++){var s=t.colorTextures[o];this.renderer.texture.unbind(s.parentTextureArray||s)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),e){var a=e.width>>r,h=e.height>>r,u=a/e.width;this.setViewport(e.x*u,e.y*u,a,h)}else{a=t.width>>r,h=t.height>>r;this.setViewport(0,0,a,h)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},t.prototype.setViewport=function(t,e,r,i){var n=this.viewport;t=Math.round(t),e=Math.round(e),r=Math.round(r),i=Math.round(i),n.width===r&&n.height===i&&n.x===t&&n.y===e||(n.x=t,n.y=e,n.width=r,n.height=i,this.gl.viewport(t,e,r,i))},Object.defineProperty(t.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),t.prototype.clear=function(t,e,r,i,n){void 0===n&&(n=s.V0.COLOR|s.V0.DEPTH);var o=this.gl;o.clearColor(t,e,r,i),o.clear(n)},t.prototype.initFramebuffer=function(t){var e=this.gl,r=new Tt(e.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r},t.prototype.resizeFramebuffer=function(t){var e=this.gl,r=t.glFramebuffers[this.CONTEXT_UID];r.msaaBuffer&&(e.bindRenderbuffer(e.RENDERBUFFER,r.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,r.multisample,e.RGBA8,t.width,t.height)),r.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,r.stencil),r.msaaBuffer?e.renderbufferStorageMultisample(e.RENDERBUFFER,r.multisample,e.DEPTH24_STENCIL8,t.width,t.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height));var i=t.colorTextures,n=i.length;e.drawBuffers||(n=Math.min(n,1));for(var o=0;o<n;o++){var s=i[o],a=s.parentTextureArray||s;this.renderer.texture.bind(a,0)}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)},t.prototype.updateFramebuffer=function(t,e){var r=this.gl,i=t.glFramebuffers[this.CONTEXT_UID],n=t.colorTextures,o=n.length;r.drawBuffers||(o=Math.min(o,1)),i.multisample>1&&this.canMultisampleFramebuffer(t)?(i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.RGBA8,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var s=[],a=0;a<o;a++){var h=n[a],u=h.parentTextureArray||h;this.renderer.texture.bind(u,0),0===a&&i.msaaBuffer||(r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+a,h.target,u._glTextures[this.CONTEXT_UID].texture,e),s.push(r.COLOR_ATTACHMENT0+a))}if((s.length>1&&r.drawBuffers(s),t.depthTexture)&&this.writeDepthTexture){var c=t.depthTexture;this.renderer.texture.bind(c,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,c._glTextures[this.CONTEXT_UID].texture,e)}!t.stencil&&!t.depth||t.depthTexture&&this.writeDepthTexture?i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null):(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil))},t.prototype.canMultisampleFramebuffer=function(t){return 1!==this.renderer.context.webGLVersion&&t.colorTextures.length<=1&&!t.depthTexture},t.prototype.detectSamples=function(t){var e=this.msaaSamples,r=s.G5.NONE;if(t<=1||null===e)return r;for(var i=0;i<e.length;i++)if(e[i]<=t){r=e[i];break}return 1===r&&(r=s.G5.NONE),r},t.prototype.blit=function(t,e,r){var i=this,n=i.current,o=i.renderer,s=i.gl,a=i.CONTEXT_UID;if(2===o.context.webGLVersion&&n){var h=n.glFramebuffers[a];if(h){if(!t){if(!h.msaaBuffer)return;var u=n.colorTextures[0];if(!u)return;h.blitFramebuffer||(h.blitFramebuffer=new X(n.width,n.height),h.blitFramebuffer.addColorTexture(0,u)),(t=h.blitFramebuffer).colorTextures[0]!==u&&(t.colorTextures[0]=u,t.dirtyId++,t.dirtyFormat++),t.width===n.width&&t.height===n.height||(t.width=n.width,t.height=n.height,t.dirtyId++,t.dirtySize++)}e||((e=Et).width=n.width,e.height=n.height),r||(r=e);var c=e.width===r.width&&e.height===r.height;this.bind(t),s.bindFramebuffer(s.READ_FRAMEBUFFER,h.framebuffer),s.blitFramebuffer(e.x,e.y,e.width,e.height,r.x,r.y,r.width,r.height,s.COLOR_BUFFER_BIT,c?s.NEAREST:s.LINEAR)}}},t.prototype.disposeFramebuffer=function(t,e){var r=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(r){delete t.glFramebuffers[this.CONTEXT_UID];var n=this.managedFramebuffers.indexOf(t);n>=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),e||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&r.blitFramebuffer.dispose()}},t.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r<e.length;r++)this.disposeFramebuffer(e[r],t)},t.prototype.forceStencil=function(){var t=this.current;if(t){var e=t.glFramebuffers[this.CONTEXT_UID];if(e&&!e.stencil){t.stencil=!0;var r=t.width,i=t.height,n=this.gl,o=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,o),e.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,e.multisample,n.DEPTH24_STENCIL8,r,i):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,r,i),e.stencil=o,n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,o)}}},t.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new V.Ae},t.prototype.destroy=function(){this.renderer=null},t}(),St={5126:4,5123:2,5121:1},At=function(){function t(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}return t.prototype.contextChange=function(){this.disposeAll(!0);var t=this.gl=this.renderer.gl,e=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,2!==e.webGLVersion){var r=this.renderer.context.extensions.vertexArrayObject;o.X.PREFER_ENV===s.Vi.WEBGL_LEGACY&&(r=null),r?(t.createVertexArray=function(){return r.createVertexArrayOES()},t.bindVertexArray=function(t){return r.bindVertexArrayOES(t)},t.deleteVertexArray=function(t){return r.deleteVertexArrayOES(t)}):(this.hasVao=!1,t.createVertexArray=function(){return null},t.bindVertexArray=function(){return null},t.deleteVertexArray=function(){return null})}if(2!==e.webGLVersion){var i=t.getExtension("ANGLE_instanced_arrays");i?(t.vertexAttribDivisor=function(t,e){return i.vertexAttribDivisorANGLE(t,e)},t.drawElementsInstanced=function(t,e,r,n,o){return i.drawElementsInstancedANGLE(t,e,r,n,o)},t.drawArraysInstanced=function(t,e,r,n){return i.drawArraysInstancedANGLE(t,e,r,n)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===e.webGLVersion||!!e.extensions.uint32ElementIndex},t.prototype.bind=function(t,e){e=e||this.renderer.shader.shader;var r=this.gl,i=t.glVertexArrayObjects[this.CONTEXT_UID],n=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},n=!0);var o=i[e.program.id]||this.initGeometryVao(t,e,n);this._activeGeometry=t,this._activeVao!==o&&(this._activeVao=o,this.hasVao?r.bindVertexArray(o):this.activateVao(t,e.program)),this.updateBuffers()},t.prototype.reset=function(){this.unbind()},t.prototype.updateBuffers=function(){for(var t=this._activeGeometry,e=this.renderer.buffer,r=0;r<t.buffers.length;r++){var i=t.buffers[r];e.update(i)}},t.prototype.checkCompatibility=function(t,e){var r=t.attributes,i=e.attributeData;for(var n in i)if(!r[n])throw new Error('shader and geometry incompatible, geometry missing the "'.concat(n,'" attribute'))},t.prototype.getSignature=function(t,e){var r=t.attributes,i=e.attributeData,n=["g",t.id];for(var o in r)i[o]&&n.push(o);return n.join("-")},t.prototype.initGeometryVao=function(t,e,r){void 0===r&&(r=!0);var i=this.gl,n=this.CONTEXT_UID,o=this.renderer.buffer,s=e.program;s.glPrograms[n]||this.renderer.shader.generateProgram(e),this.checkCompatibility(t,s);var a=this.getSignature(t,s),h=t.glVertexArrayObjects[this.CONTEXT_UID],u=h[a];if(u)return h[s.id]=u,u;var c=t.buffers,l=t.attributes,f={},d={};for(var p in c)f[p]=0,d[p]=0;for(var p in l)!l[p].size&&s.attributeData[p]?l[p].size=s.attributeData[p].size:l[p].size||console.warn("PIXI Geometry attribute '".concat(p,"' size cannot be determined (likely the bound shader does not have the attribute)")),f[l[p].buffer]+=l[p].size*St[l[p].type];for(var p in l){var y=l[p],m=y.size;void 0===y.stride&&(f[y.buffer]===m*St[y.type]?y.stride=0:y.stride=f[y.buffer]),void 0===y.start&&(y.start=d[y.buffer],d[y.buffer]+=m*St[y.type])}u=i.createVertexArray(),i.bindVertexArray(u);for(var v=0;v<c.length;v++){var _=c[v];o.bind(_),r&&_._glBuffers[n].refCount++}return this.activateVao(t,s),this._activeVao=u,h[s.id]=u,h[a]=u,u},t.prototype.disposeGeometry=function(t,e){var r;if(this.managedGeometries[t.id]){delete this.managedGeometries[t.id];var i=t.glVertexArrayObjects[this.CONTEXT_UID],n=this.gl,o=t.buffers,s=null===(r=this.renderer)||void 0===r?void 0:r.buffer;if(t.disposeRunner.remove(this),i){if(s)for(var a=0;a<o.length;a++){var h=o[a]._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,0!==h.refCount||e||s.dispose(o[a],e))}if(!e)for(var u in i)if("g"===u[0]){var c=i[u];this._activeVao===c&&this.unbind(),n.deleteVertexArray(c)}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}},t.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedGeometries),r=0;r<e.length;r++)this.disposeGeometry(this.managedGeometries[e[r]],t)},t.prototype.activateVao=function(t,e){var r=this.gl,i=this.CONTEXT_UID,n=this.renderer.buffer,o=t.buffers,s=t.attributes;t.indexBuffer&&n.bind(t.indexBuffer);var a=null;for(var h in s){var u=s[h],c=o[u.buffer],l=c._glBuffers[i];if(e.attributeData[h]){a!==l&&(n.bind(c),a=l);var f=e.attributeData[h].location;if(r.enableVertexAttribArray(f),r.vertexAttribPointer(f,u.size,u.type||r.FLOAT,u.normalized,u.stride,u.start),u.instance){if(!this.hasInstance)throw new Error("geometry error, GPU Instancing is not supported on this device");r.vertexAttribDivisor(f,1)}}}},t.prototype.draw=function(t,e,r,i){var n=this.gl,o=this._activeGeometry;if(o.indexBuffer){var s=o.indexBuffer.data.BYTES_PER_ELEMENT,a=2===s?n.UNSIGNED_SHORT:n.UNSIGNED_INT;2===s||4===s&&this.canUseUInt32ElementIndex?o.instanced?n.drawElementsInstanced(t,e||o.indexBuffer.data.length,a,(r||0)*s,i||1):n.drawElements(t,e||o.indexBuffer.data.length,a,(r||0)*s):console.warn("unsupported index buffer type: uint32")}else o.instanced?n.drawArraysInstanced(t,r,e||o.getSize(),i||1):n.drawArrays(t,r,e||o.getSize());return this},t.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},t.prototype.destroy=function(){this.renderer=null},t}(),Ot=function(){function t(t){void 0===t&&(t=null),this.type=s.A7.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=o.X.FILTER_MULTISAMPLE,this.enabled=!0,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._target=null}return Object.defineProperty(t.prototype,"filter",{get:function(){return this._filters?this._filters[0]:null},set:function(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.pooled&&(this.maskObject=null,this.type=s.A7.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null},t.prototype.copyCountersOrReset=function(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)},t}(),It=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s},Pt=function(t,e,r){if(r||2===arguments.length)for(var i,n=0,o=e.length;n<o;n++)!i&&n in e||(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))};function Ct(t,e){var r=t.getShaderSource(e).split("\n").map((function(t,e){return"".concat(e,": ").concat(t)})),i=t.getShaderInfoLog(e),n=i.split("\n"),o={},s=n.map((function(t){return parseFloat(t.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))})).filter((function(t){return!(!t||o[t])&&(o[t]=!0,!0)})),a=[""];s.forEach((function(t){r[t-1]="%c".concat(r[t-1],"%c"),a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")}));var h=r.join("\n");a[0]=h,console.error(i),console.warn.apply(console,Pt([],It(a),!1)),console.groupEnd()}var Rt,Mt={},Dt=Mt;function Lt(){if(Dt===Mt||Dt&&Dt.isContextLost()){var t=void 0;"undefined"!=typeof document?t=document&&document.createElement("canvas"):"undefined"!=typeof OffscreenCanvas&&(t=new OffscreenCanvas(1,1)),wx&&"undefined"!=typeof wx&&(t=wx.createCanvas("webgl"));var e=void 0;e||((e=t.getContext("webgl",{}))?e.getExtension("WEBGL_draw_buffers"):e=null),Dt=e}return Dt}function Nt(t,e,r){if("precision"!==t.substring(0,9)){var i=e;return e===s.cB.HIGH&&r!==s.cB.HIGH&&(i=s.cB.MEDIUM),"precision ".concat(i," float;\n").concat(t)}return r!==s.cB.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var Ft={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Bt(t){return Ft[t]}var Ut=null,kt={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function jt(t,e){if(!Ut){var r=Object.keys(kt);Ut={};for(var i=0;i<r.length;++i){var n=r[i];Ut[t[n]]=kt[n]}}return Ut[e]}var Gt=[{test:function(t){return"float"===t.type&&1===t.size},code:function(t){return'\n if(uv["'.concat(t,'"] !== ud["').concat(t,'"].value)\n {\n ud["').concat(t,'"].value = uv["').concat(t,'"]\n gl.uniform1f(ud["').concat(t,'"].location, uv["').concat(t,'"])\n }\n ')}},{test:function(t){return("sampler2D"===t.type||"samplerCube"===t.type||"sampler2DArray"===t.type)&&1===t.size&&!t.isArray},code:function(t){return't = syncData.textureCount++;\n\n renderer.texture.bind(uv["'.concat(t,'"], t);\n\n if(ud["').concat(t,'"].value !== t)\n {\n ud["').concat(t,'"].value = t;\n gl.uniform1i(ud["').concat(t,'"].location, t);\n; // eslint-disable-line max-len\n }')}},{test:function(t,e){return"mat3"===t.type&&1===t.size&&void 0!==e.a},code:function(t){return'\n gl.uniformMatrix3fv(ud["'.concat(t,'"].location, false, uv["').concat(t,'"].toArray(true));\n ')},codeUbo:function(t){return"\n var ".concat(t,"_matrix = uv.").concat(t,".toArray(true);\n\n data[offset] = ").concat(t,"_matrix[0];\n data[offset+1] = ").concat(t,"_matrix[1];\n data[offset+2] = ").concat(t,"_matrix[2];\n \n data[offset + 4] = ").concat(t,"_matrix[3];\n data[offset + 5] = ").concat(t,"_matrix[4];\n data[offset + 6] = ").concat(t,"_matrix[5];\n \n data[offset + 8] = ").concat(t,"_matrix[6];\n data[offset + 9] = ").concat(t,"_matrix[7];\n data[offset + 10] = ").concat(t,"_matrix[8];\n ")}},{test:function(t,e){return"vec2"===t.type&&1===t.size&&void 0!==e.x},code:function(t){return'\n cv = ud["'.concat(t,'"].value;\n v = uv["').concat(t,'"];\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud["').concat(t,'"].location, v.x, v.y);\n }')},codeUbo:function(t){return"\n v = uv.".concat(t,";\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n ")}},{test:function(t){return"vec2"===t.type&&1===t.size},code:function(t){return'\n cv = ud["'.concat(t,'"].value;\n v = uv["').concat(t,'"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud["').concat(t,'"].location, v[0], v[1]);\n }\n ')}},{test:function(t,e){return"vec4"===t.type&&1===t.size&&void 0!==e.width},code:function(t){return'\n cv = ud["'.concat(t,'"].value;\n v = uv["').concat(t,'"];\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud["').concat(t,'"].location, v.x, v.y, v.width, v.height)\n }')},codeUbo:function(t){return"\n v = uv.".concat(t,";\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n data[offset+2] = v.width;\n data[offset+3] = v.height;\n ")}},{test:function(t){return"vec4"===t.type&&1===t.size},code:function(t){return'\n cv = ud["'.concat(t,'"].value;\n v = uv["').concat(t,'"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud["').concat(t,'"].location, v[0], v[1], v[2], v[3])\n }')}}],Xt={float:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1f(location, v);\n }",vec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2f(location, v[0], v[1])\n }",vec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }",vec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(location, v[0], v[1], v[2], v[3]);\n }",int:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",ivec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",ivec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }",ivec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",uint:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1ui(location, v);\n }",uvec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2ui(location, v[0], v[1]);\n }",uvec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3ui(location, v[0], v[1], v[2]);\n }",uvec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4ui(location, v[0], v[1], v[2], v[3]);\n }",bool:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1i(location, v);\n }",bvec2:"\n if (cv[0] != v[0] || cv[1] != v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",bvec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }",bvec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},Ht={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};var Yt,Vt=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function zt(t){for(var e="",r=0;r<t;++r)r>0&&(e+="\nelse "),r<t-1&&(e+="if(test == ".concat(r,".0){}"));return e}function Wt(t,e){if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var r=e.createShader(e.FRAGMENT_SHADER);;){var i=Vt.replace(/%forloop%/gi,zt(t));if(e.shaderSource(r,i),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS))break;t=t/2|0}return t}var qt=0,$t={},Kt=function(){function t(e,r,i){void 0===i&&(i="pixi-shader"),this.id=qt++,this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=r||t.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),"#version"!==this.vertexSrc.substring(0,8)&&(i=i.replace(/\s+/g,"-"),$t[i]?($t[i]++,i+="-".concat($t[i])):$t[i]=1,this.vertexSrc="#define SHADER_NAME ".concat(i,"\n").concat(this.vertexSrc),this.fragmentSrc="#define SHADER_NAME ".concat(i,"\n").concat(this.fragmentSrc),this.vertexSrc=Nt(this.vertexSrc,o.X.PRECISION_VERTEX,s.cB.HIGH),this.fragmentSrc=Nt(this.fragmentSrc,o.X.PRECISION_FRAGMENT,function(){if(!Rt){Rt=s.cB.MEDIUM;var t=Lt();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);Rt=e.precision?s.cB.HIGH:s.cB.MEDIUM}}return Rt}())),this.glPrograms={},this.syncUniforms=null}return Object.defineProperty(t,"defaultVertexSrc",{get:function(){return"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n"},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentSrc",{get:function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}"},enumerable:!1,configurable:!0}),t.from=function(e,r,i){var n=e+r,o=f.ProgramCache[n];return o||(f.ProgramCache[n]=o=new t(e,r,i)),o},t}(),Zt=function(){function t(t,e){this.uniformBindCount=0,this.program=t,this.uniformGroup=e?e instanceof dt?e:new dt(e):new dt({})}return t.prototype.checkUniformExists=function(t,e){if(e.uniforms[t])return!0;for(var r in e.uniforms){var i=e.uniforms[r];if(i.group&&this.checkUniformExists(t,i))return!0}return!1},t.prototype.destroy=function(){this.uniformGroup=null},Object.defineProperty(t.prototype,"uniforms",{get:function(){return this.uniformGroup.uniforms},enumerable:!1,configurable:!0}),t.from=function(e,r,i){return new t(Kt.from(e,r),i)},t}(),Qt=function(){function t(){this.data=0,this.blendMode=s.T$.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}return Object.defineProperty(t.prototype,"blend",{get:function(){return!!(1&this.data)},set:function(t){!!(1&this.data)!==t&&(this.data^=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsets",{get:function(){return!!(2&this.data)},set:function(t){!!(2&this.data)!==t&&(this.data^=2)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"culling",{get:function(){return!!(4&this.data)},set:function(t){!!(4&this.data)!==t&&(this.data^=4)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthTest",{get:function(){return!!(8&this.data)},set:function(t){!!(8&this.data)!==t&&(this.data^=8)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthMask",{get:function(){return!!(32&this.data)},set:function(t){!!(32&this.data)!==t&&(this.data^=32)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clockwiseFrontFace",{get:function(){return!!(16&this.data)},set:function(t){!!(16&this.data)!==t&&(this.data^=16)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){this.blend=t!==s.T$.NONE,this._blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"polygonOffset",{get:function(){return this._polygonOffset},set:function(t){this.offsets=!!t,this._polygonOffset=t},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"[@pixi/core:State "+"blendMode=".concat(this.blendMode," ")+"clockwiseFrontFace=".concat(this.clockwiseFrontFace," ")+"culling=".concat(this.culling," ")+"depthMask=".concat(this.depthMask," ")+"polygonOffset=".concat(this.polygonOffset)+"]"},t.for2d=function(){var e=new t;return e.depthTest=!1,e.blend=!0,e},t}();var Jt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),te=function(t){function e(r,i,n){var s=this,a=Kt.from(r||e.defaultVertexSrc,i||e.defaultFragmentSrc);return(s=t.call(this,a,n)||this).padding=0,s.resolution=o.X.FILTER_RESOLUTION,s.multisample=o.X.FILTER_MULTISAMPLE,s.enabled=!0,s.autoFit=!0,s.state=new Qt,s}return Jt(e,t),e.prototype.apply=function(t,e,r,i,n){t.applyFilter(this,e,r,i)},Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(t){this._resolution=t},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultVertexSrc",{get:function(){return"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n"},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultFragmentSrc",{get:function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"},enumerable:!1,configurable:!0}),e}(Zt);var ee=new V.y3,re=function(){function t(t,e){this._texture=t,this.mapCoord=new V.y3,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=void 0===e?.5:e,this.isSimple=!1}return Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture=t,this._textureID=-1},enumerable:!1,configurable:!0}),t.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var r=this.mapCoord,i=0;i<t.length;i+=2){var n=t[i],o=t[i+1];e[i]=n*r.a+o*r.c+r.tx,e[i+1]=n*r.b+o*r.d+r.ty}return e},t.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._textureID===e._updateID)return!1;this._textureID=e._updateID,this._updateID++;var r=e._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var i=e.orig,n=e.trim;n&&(ee.set(i.width/n.width,0,0,i.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(ee));var o=e.baseTexture,s=this.uClampFrame,a=this.clampMargin/o.resolution,h=this.clampOffset;return s[0]=(e._frame.x+a+h)/o.width,s[1]=(e._frame.y+a+h)/o.height,s[2]=(e._frame.x+e._frame.width-a+h)/o.width,s[3]=(e._frame.y+e._frame.height-a+h)/o.height,this.uClampOffset[0]=h/o.realWidth,this.uClampOffset[1]=h/o.realHeight,this.isSimple=e._frame.width===o.width&&e._frame.height===o.height&&0===e.rotate,!0},t}(),ie=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ne=function(t){function e(e,r,i){var n=this,o=null;return"string"!=typeof e&&void 0===r&&void 0===i&&(o=e,e=void 0,r=void 0,i=void 0),(n=t.call(this,e||"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n",r||"varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n\n vec4 masky = texture2D(mask, vMaskCoord);\n \n float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n original *= (alphaMul * masky.r * alpha * clip);\n\n gl_FragColor = original;\n}\n",i)||this).maskSprite=o,n.maskMatrix=new V.y3,n}return ie(e,t),Object.defineProperty(e.prototype,"maskSprite",{get:function(){return this._maskSprite},set:function(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)},enumerable:!1,configurable:!0}),e.prototype.apply=function(t,e,r,i){var n=this._maskSprite,o=n._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new re(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,t.applyFilter(this,e,r,i))},e}(te),oe=function(){function t(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return t.prototype.setMaskStack=function(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)},t.prototype.push=function(t,e){var r=e;if(!r.isMaskData){var i=this.maskDataPool.pop()||new Ot;i.pooled=!0,i.maskObject=e,r=i}var n=0!==this.maskStack.length?this.maskStack[this.maskStack.length-1]:null;if(r.copyCountersOrReset(n),r.autoDetect&&this.detect(r),r._target=t,r.type!==s.A7.SPRITE&&this.maskStack.push(r),r.enabled)switch(r.type){case s.A7.SCISSOR:this.renderer.scissor.push(r);break;case s.A7.STENCIL:this.renderer.stencil.push(r);break;case s.A7.SPRITE:r.copyCountersOrReset(null),this.pushSpriteMask(r)}r.type===s.A7.SPRITE&&this.maskStack.push(r)},t.prototype.pop=function(t){var e=this.maskStack.pop();if(e&&e._target===t){if(e.enabled)switch(e.type){case s.A7.SCISSOR:this.renderer.scissor.pop();break;case s.A7.STENCIL:this.renderer.stencil.pop(e.maskObject);break;case s.A7.SPRITE:this.popSpriteMask(e)}if(e.reset(),e.pooled&&this.maskDataPool.push(e),0!==this.maskStack.length){var r=this.maskStack[this.maskStack.length-1];r.type===s.A7.SPRITE&&r._filters&&(r._filters[0].maskSprite=r.maskObject)}}},t.prototype.detect=function(t){t.maskObject.isSprite?t.type=s.A7.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=s.A7.SCISSOR:t.type=s.A7.STENCIL},t.prototype.pushSpriteMask=function(t){var e,r,i=t.maskObject,n=t._target,o=t._filters;o||(o=this.alphaMaskPool[this.alphaMaskIndex])||(o=this.alphaMaskPool[this.alphaMaskIndex]=[new ne]);var s,a,h=this.renderer,u=h.renderTexture;if(u.current){var c=u.current;s=t.resolution||c.resolution,a=null!==(e=t.multisample)&&void 0!==e?e:c.multisample}else s=t.resolution||h.resolution,a=null!==(r=t.multisample)&&void 0!==r?r:h.multisample;o[0].resolution=s,o[0].multisample=a,o[0].maskSprite=i;var l=n.filterArea;n.filterArea=i.getBounds(!0),h.filter.push(n,o),n.filterArea=l,t._filters||this.alphaMaskIndex++},t.prototype.popSpriteMask=function(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)},t.prototype.destroy=function(){this.renderer=null},t}(),se=function(){function t(t){this.renderer=t,this.maskStack=[],this.glConst=0}return t.prototype.getStackLength=function(){return this.maskStack.length},t.prototype.setMaskStack=function(t){var e=this.renderer.gl,r=this.getStackLength();this.maskStack=t;var i=this.getStackLength();i!==r&&(0===i?e.disable(this.glConst):(e.enable(this.glConst),this._useCurrent()))},t.prototype._useCurrent=function(){},t.prototype.destroy=function(){this.renderer=null,this.maskStack=null},t}(),ae=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),he=new V.y3,ue=function(t){function e(e){return t.call(this,e)||this}return ae(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0},e.prototype.calcScissorRect=function(t){if(!t._scissorRectLocal){var e=t._scissorRect,r=t.maskObject,i=this.renderer,n=i.renderTexture;r.renderable=!0;var o=r.getBounds();this.roundFrameToPixels(o,n.current?n.current.resolution:i.resolution,n.sourceFrame,n.destinationFrame,i.projection.transform),r.renderable=!1,e&&o.fit(e),t._scissorRectLocal=o}},e.isMatrixRotated=function(t){if(!t)return!1;var e=t.a,r=t.b,i=t.c,n=t.d;return(Math.abs(r)>1e-4||Math.abs(i)>1e-4)&&(Math.abs(e)>1e-4||Math.abs(n)>1e-4)},e.prototype.testScissor=function(t){var r=t.maskObject;if(!r.isFastRect||!r.isFastRect())return!1;if(e.isMatrixRotated(r.worldTransform))return!1;if(e.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(t);var i=t._scissorRectLocal;return i.width>0&&i.height>0},e.prototype.roundFrameToPixels=function(t,r,i,n,o){e.isMatrixRotated(o)||((o=o?he.copyFrom(o):he.identity()).translate(-i.x,-i.y).scale(n.width/i.width,n.height/i.height).translate(n.x,n.y),this.renderer.filter.transformAABB(o,t),t.fit(n),t.x=Math.round(t.x*r),t.y=Math.round(t.y*r),t.width=Math.round(t.width*r),t.height=Math.round(t.height*r))},e.prototype.push=function(t){t._scissorRectLocal||this.calcScissorRect(t);var e=this.renderer.gl;t._scissorRect||e.enable(e.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=t._scissorRectLocal,this._useCurrent()},e.prototype.pop=function(){var t=this.renderer.gl;this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t,e=this.maskStack[this.maskStack.length-1]._scissorRect;t=this.renderer.renderTexture.current?e.y:this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)},e}(se),ce=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),le=function(t){function e(e){return t.call(this,e)||this}return ce(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,r=this.renderer.gl,i=t._stencilCounter;0===i&&(this.renderer.framebuffer.forceStencil(),r.enable(r.STENCIL_TEST)),t._stencilCounter++,r.colorMask(!1,!1,!1,!1),r.stencilFunc(r.EQUAL,i,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clearStencil(0),e.clear(e.STENCIL_BUFFER_BIT)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e}(se),fe=function(){function t(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new V.y3,this.transform=null}return t.prototype.update=function(t,e,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);var n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)},t.prototype.calculateProjection=function(t,e,r,i){var n=this.projectionMatrix,o=i?-1:1;n.identity(),n.a=1/e.width*2,n.d=o*(1/e.height*2),n.tx=-1-e.x*n.a,n.ty=-o-e.y*n.d},t.prototype.setTransform=function(t){},t.prototype.destroy=function(){this.renderer=null},t}(),de=new V.Ae,pe=new V.Ae,ye=function(){function t(t){this.renderer=t,this.clearColor=t._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new V.Ae,this.destinationFrame=new V.Ae,this.viewportFrame=new V.Ae}return t.prototype.bind=function(t,e,r){void 0===t&&(t=null);var i,n,o,s=this.renderer;this.current=t,t?(o=(i=t.baseTexture).resolution,e||(de.width=t.frame.width,de.height=t.frame.height,e=de),r||(pe.x=t.frame.x,pe.y=t.frame.y,pe.width=e.width,pe.height=e.height,r=pe),n=i.framebuffer):(o=s.resolution,e||(de.width=s.screen.width,de.height=s.screen.height,e=de),r||((r=de).width=e.width,r.height=e.height));var a=this.viewportFrame;a.x=r.x*o,a.y=r.y*o,a.width=r.width*o,a.height=r.height*o,t||(a.y=s.view.height-(a.y+a.height)),a.ceil(),this.renderer.framebuffer.bind(n,a),this.renderer.projection.update(r,e,o,!n),t?this.renderer.mask.setMaskStack(i.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(e),this.destinationFrame.copyFrom(r)},t.prototype.clear=function(t,e){t=this.current?t||this.current.baseTexture.clearColor:t||this.clearColor;var r=this.destinationFrame,i=this.current?this.current.baseTexture:this.renderer.screen,n=r.width!==i.width||r.height!==i.height;if(n){var o=this.viewportFrame,s=o.x,a=o.y,h=o.width,u=o.height;s=Math.round(s),a=Math.round(a),h=Math.round(h),u=Math.round(u),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(s,a,h,u)}this.renderer.framebuffer.clear(t[0],t[1],t[2],t[3],e),n&&this.renderer.scissor.pop()},t.prototype.resize=function(){this.bind(null)},t.prototype.reset=function(){this.bind(null)},t.prototype.destroy=function(){this.renderer=null},t}();function me(t,e,r,i,n){r.buffer.update(n)}var ve={float:"\n data[offset] = v;\n ",vec2:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n ",vec3:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n\n ",vec4:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n data[offset+3] = v[3];\n ",mat2:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n\n data[offset+4] = v[2];\n data[offset+5] = v[3];\n ",mat3:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n\n data[offset + 4] = v[3];\n data[offset + 5] = v[4];\n data[offset + 6] = v[5];\n\n data[offset + 8] = v[6];\n data[offset + 9] = v[7];\n data[offset + 10] = v[8];\n ",mat4:"\n for(var i = 0; i < 16; i++)\n {\n data[offset + i] = v[i];\n }\n "},_e={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function ge(t){for(var e=t.map((function(t){return{data:t,offset:0,dataLen:0,dirty:0}})),r=0,i=0,n=0,o=0;o<e.length;o++){var s=e[o];if(r=_e[s.data.type],s.data.size>1&&(r=Math.max(r,16)*s.data.size),s.dataLen=r,i%r!=0&&i<16){var a=i%r%16;i+=a,n+=a}i+r>16?(n=16*Math.ceil(n/16),s.offset=n,n+=r,i=r):(s.offset=n,i+=r,n+=r)}return{uboElements:e,size:n=16*Math.ceil(n/16)}}function xe(t,e){var r=[];for(var i in t)e[i]&&r.push(e[i]);return r.sort((function(t,e){return t.index-e.index})),r}function be(t,e){if(!t.autoManage)return{size:0,syncFunc:me};for(var r=ge(xe(t.uniforms,e)),i=r.uboElements,n=r.size,o=["\n var v = null;\n var v2 = null;\n var cv = null;\n var t = 0;\n var gl = renderer.gl\n var index = 0;\n var data = buffer.data;\n "],s=0;s<i.length;s++){for(var a=i[s],h=t.uniforms[a.data.name],u=a.data.name,c=!1,l=0;l<Gt.length;l++){var f=Gt[l];if(f.codeUbo&&f.test(a.data,h)){o.push("offset = ".concat(a.offset/4,";"),Gt[l].codeUbo(a.data.name,h)),c=!0;break}}if(!c)if(a.data.size>1){var d=Bt(a.data.type),p=Math.max(_e[a.data.type]/16,1),y=d/p,m=(4-y%4)%4;o.push("\n cv = ud.".concat(u,".value;\n v = uv.").concat(u,";\n offset = ").concat(a.offset/4,";\n\n t = 0;\n\n for(var i=0; i < ").concat(a.data.size*p,"; i++)\n {\n for(var j = 0; j < ").concat(y,"; j++)\n {\n data[offset++] = v[t++];\n }\n offset += ").concat(m,";\n }\n\n "))}else{var v=ve[a.data.type];o.push("\n cv = ud.".concat(u,".value;\n v = uv.").concat(u,";\n offset = ").concat(a.offset/4,";\n ").concat(v,";\n "))}}return o.push("\n renderer.buffer.update(buffer);\n "),{size:n,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join("\n"))}}var Te=function(){},Ee=function(){function t(t,e){this.program=t,this.uniformData=e,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return t.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},t}();function we(t,e,r){var i=t.createShader(e);return t.shaderSource(i,r),t.compileShader(i),i}function Se(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e}function Ae(t,e){switch(t){case"float":case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return Se(2*e);case"bvec3":return Se(3*e);case"bvec4":return Se(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}function Oe(t,e){var r=we(t,t.VERTEX_SHADER,e.vertexSrc),i=we(t,t.FRAGMENT_SHADER,e.fragmentSrc),n=t.createProgram();if(t.attachShader(n,r),t.attachShader(n,i),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)||function(t,e,r,i){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||Ct(t,r),t.getShaderParameter(i,t.COMPILE_STATUS)||Ct(t,i),console.error("PixiJS Error: Could not initialize shader."),""!==t.getProgramInfoLog(e)&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}(t,n,r,i),e.attributeData=function(t,e){for(var r={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),n=0;n<i;n++){var o=e.getActiveAttrib(t,n);if(0!==o.name.indexOf("gl_")){var s=jt(e,o.type),a={type:s,name:o.name,size:Bt(s),location:e.getAttribLocation(t,o.name)};r[o.name]=a}}return r}(n,t),e.uniformData=function(t,e){for(var r={},i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),n=0;n<i;n++){var o=e.getActiveUniform(t,n),s=o.name.replace(/\[.*?\]$/,""),a=!!o.name.match(/\[.*?\]$/),h=jt(e,o.type);r[s]={name:s,index:n,type:h,size:o.size,isArray:a,value:Ae(h,o.size)}}return r}(n,t),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){var o=Object.keys(e.attributeData);o.sort((function(t,e){return t>e?1:-1}));for(var s=0;s<o.length;s++)e.attributeData[o[s]].location=s,t.bindAttribLocation(n,s,o[s]);t.linkProgram(n)}t.deleteShader(r),t.deleteShader(i);var a={};for(var s in e.uniformData){var h=e.uniformData[s];a[s]={location:t.getUniformLocation(n,s),value:Ae(h.type,h.size)}}return new Ee(n,a)}var Ie=0,Pe={textureCount:0,uboCount:0},Ce=function(){function t(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Ie++}return t.prototype.systemCheck=function(){if(!function(){if("boolean"==typeof Yt)return Yt;try{var t=new Function("param1","param2","param3","return param1[param2] === param3;");Yt=!0===t({a:"b"},"a","b")}catch(t){Yt=!1}return Yt}())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},t.prototype.contextChange=function(t){this.gl=t,this.reset()},t.prototype.bind=function(t,e){t.uniforms.globals=this.renderer.globalUniforms;var r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),e||(Pe.textureCount=0,Pe.uboCount=0,this.syncUniformGroup(t.uniformGroup,Pe)),i},t.prototype.setUniforms=function(t){var e=this.shader.program,r=e.glPrograms[this.renderer.CONTEXT_UID];e.syncUniforms(r.uniformData,t,this.renderer)},t.prototype.syncUniformGroup=function(t,e){var r=this.getGlProgram();t.static&&t.dirtyId===r.uniformDirtyGroups[t.id]||(r.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,r,e))},t.prototype.syncUniforms=function(t,e,r){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(e.uniformData,t.uniforms,this.renderer,r)},t.prototype.createSyncGroups=function(t){var e=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[e]||(this.cache[e]=function(t,e){var r,i=["\n var v = null;\n var cv = null;\n var cu = null;\n var t = 0;\n var gl = renderer.gl;\n "];for(var n in t.uniforms){var o=e[n];if(o){for(var s=t.uniforms[n],a=!1,h=0;h<Gt.length;h++)if(Gt[h].test(o,s)){i.push(Gt[h].code(n,s)),a=!0;break}if(!a){var u=(1===o.size?Xt:Ht)[o.type].replace("location",'ud["'.concat(n,'"].location'));i.push('\n cu = ud["'.concat(n,'"];\n cv = cu.value;\n v = uv["').concat(n,'"];\n ').concat(u,";"))}}else(null===(r=t.uniforms[n])||void 0===r?void 0:r.group)&&(t.uniforms[n].ubo?i.push("\n renderer.shader.syncUniformBufferGroup(uv.".concat(n,", '").concat(n,"');\n ")):i.push("\n renderer.shader.syncUniformGroup(uv.".concat(n,", syncData);\n ")))}return new Function("ud","uv","renderer","syncData",i.join("\n"))}(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[e],t.syncUniforms[this.shader.program.id]},t.prototype.syncUniformBufferGroup=function(t,e){var r=this.getGlProgram();if(!t.static||0!==t.dirtyId||!r.uniformGroups[t.id]){t.dirtyId=0;var i=r.uniformGroups[t.id]||this.createSyncBufferGroup(t,r,e);t.buffer.update(),i(r.uniformData,t.uniforms,this.renderer,Pe,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[e])},t.prototype.createSyncBufferGroup=function(t,e,r){var i=this.renderer.gl;this.renderer.buffer.bind(t.buffer);var n=this.gl.getUniformBlockIndex(e.program,r);e.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(e.program,n,this.shader.uniformBindCount),this.shader.uniformBindCount++;var o=this.getSignature(t,this.shader.program.uniformData,"ubo"),s=this._uboCache[o];if(s||(s=this._uboCache[o]=be(t,this.shader.program.uniformData)),t.autoManage){var a=new Float32Array(s.size/4);t.buffer.update(a)}return e.uniformGroups[t.id]=s.syncFunc,e.uniformGroups[t.id]},t.prototype.getSignature=function(t,e,r){var i=t.uniforms,n=["".concat(r,"-")];for(var o in i)n.push(o),e[o]&&n.push(e[o].type);return n.join("-")},t.prototype.getGlProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},t.prototype.generateProgram=function(t){var e=this.gl,r=t.program,i=Oe(e,r);return r.glPrograms[this.renderer.CONTEXT_UID]=i,i},t.prototype.reset=function(){this.program=null,this.shader=null},t.prototype.destroy=function(){this.renderer=null,this.destroyed=!0},t}();var Re=function(){function t(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=s.T$.NONE,this._blendEq=!1,this.map=[],this.map[0]=this.setBlend,this.map[1]=this.setOffset,this.map[2]=this.setCullFace,this.map[3]=this.setDepthTest,this.map[4]=this.setFrontFace,this.map[5]=this.setDepthMask,this.checks=[],this.defaultState=new Qt,this.defaultState.blend=!0}return t.prototype.contextChange=function(t){this.gl=t,this.blendModes=function(t,e){return void 0===e&&(e=[]),e[s.T$.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.ADD]=[t.ONE,t.ONE],e[s.T$.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.NONE]=[0,0],e[s.T$.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[s.T$.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[s.T$.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[s.T$.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[s.T$.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[s.T$.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[s.T$.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[s.T$.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[s.T$.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[s.T$.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}(t),this.set(this.defaultState),this.reset()},t.prototype.set=function(t){if(t=t||this.defaultState,this.stateId!==t.data){for(var e=this.stateId^t.data,r=0;e;)1&e&&this.map[r].call(this,!!(t.data&1<<r)),e>>=1,r++;this.stateId=t.data}for(r=0;r<this.checks.length;r++)this.checks[r](this,t)},t.prototype.forceState=function(t){t=t||this.defaultState;for(var e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data},t.prototype.setBlend=function(e){this.updateCheck(t.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)},t.prototype.setOffset=function(e){this.updateCheck(t.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},t.prototype.setDepthTest=function(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)},t.prototype.setDepthMask=function(t){this.gl.depthMask(t)},t.prototype.setCullFace=function(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)},t.prototype.setFrontFace=function(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])},t.prototype.setBlendMode=function(t){if(t!==this.blendMode){this.blendMode=t;var e=this.blendModes[t],r=this.gl;2===e.length?r.blendFunc(e[0],e[1]):r.blendFuncSeparate(e[0],e[1],e[2],e[3]),6===e.length?(this._blendEq=!0,r.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}},t.prototype.setPolygonOffset=function(t,e){this.gl.polygonOffset(t,e)},t.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},t.prototype.updateCheck=function(t,e){var r=this.checks.indexOf(t);e&&-1===r?this.checks.push(t):e||-1===r||this.checks.splice(r,1)},t.checkBlendMode=function(t,e){t.setBlendMode(e.blendMode)},t.checkPolygonOffset=function(t,e){t.setPolygonOffset(1,e.polygonOffset)},t.prototype.destroy=function(){this.gl=null},t}(),Me=function(){function t(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=o.X.GC_MAX_IDLE,this.checkCountMax=o.X.GC_MAX_CHECK_COUNT,this.mode=o.X.GC_MODE}return t.prototype.postrender=function(){this.renderer.renderingToScreen&&(this.count++,this.mode!==s.UN.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))},t.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,r=!1,i=0;i<e.length;i++){var n=e[i];!n.framebuffer&&this.count-n.touched>this.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){var o=0;for(i=0;i<e.length;i++)null!==e[i]&&(e[o++]=e[i]);e.length=o}},t.prototype.unload=function(t){var e=this.renderer.texture,r=t._texture;r&&!r.framebuffer&&e.destroyTexture(r);for(var i=t.children.length-1;i>=0;i--)this.unload(t.children[i])},t.prototype.destroy=function(){this.renderer=null},t}();var De=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=s.vK.UNSIGNED_BYTE,this.internalFormat=s.I2.RGBA,this.samplerType=0},Le=function(){function t(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new w,this.hasIntegerTextures=!1}return t.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=function(t){var e,r,i,n,o;return(e={})[s.vK.UNSIGNED_BYTE]=((r={})[s.I2.RGBA]=t.RGBA,r[s.I2.RGB]=t.RGB,r[s.I2.ALPHA]=t.ALPHA,r[s.I2.LUMINANCE]=t.LUMINANCE,r[s.I2.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,r),e[s.vK.UNSIGNED_SHORT_5_6_5]=((i={})[s.I2.RGB]=t.RGB,i),e[s.vK.UNSIGNED_SHORT_4_4_4_4]=((n={})[s.I2.RGBA]=t.RGBA,n),e[s.vK.UNSIGNED_SHORT_5_5_5_1]=((o={})[s.I2.RGBA]=t.RGBA,o),e}(t);var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var r=0;r<e;r++)this.boundTextures[r]=null;this.emptyTextures={};var i=new De(t.createTexture());t.bindTexture(t.TEXTURE_2D,i.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=i,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new De(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(r=0;r<6;r++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(r=0;r<this.boundTextures.length;r++)this.bind(null,r)},t.prototype.bind=function(t,e){void 0===e&&(e=0);var r=this.gl;if((t=null==t?void 0:t.castToBaseTexture())&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;var i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[e]!==t&&(this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),r.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId&&(this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),this.updateTexture(t)),this.boundTextures[e]=t}else this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),r.bindTexture(r.TEXTURE_2D,this.emptyTextures[r.TEXTURE_2D].texture),this.boundTextures[e]=null},t.prototype.reset=function(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture},t.prototype.unbind=function(t){var e=this.gl,r=this.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var i=0;i<r.length;i++)r[i]===this.unknownTexture&&this.bind(null,i)}for(i=0;i<r.length;i++)r[i]===t&&(this.currentLocation!==i&&(e.activeTexture(e.TEXTURE0+i),this.currentLocation=i),e.bindTexture(t.target,this.emptyTextures[t.target].texture),r[i]=null)},t.prototype.ensureSamplerType=function(t){var e=this,r=e.boundTextures,i=e.hasIntegerTextures,n=e.CONTEXT_UID;if(i)for(var o=t-1;o>=0;--o){var a=r[o];if(a)a._glTextures[n].samplerType!==s.oT.FLOAT&&this.renderer.texture.unbind(a)}},t.prototype.initTexture=function(t){var e=new De(this.gl.createTexture());return e.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=e,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),e},t.prototype.initTextureType=function(t,e){var r,i;e.internalFormat=null!==(i=null===(r=this.internalFormats[t.type])||void 0===r?void 0:r[t.format])&&void 0!==i?i:t.format,2===this.webGLVersion&&t.type===s.vK.HALF_FLOAT?e.type=this.gl.HALF_FLOAT:e.type=t.type},t.prototype.updateTexture=function(t){var e=t._glTextures[this.CONTEXT_UID];if(e){var r=this.renderer;if(this.initTextureType(t,e),t.resource&&t.resource.upload(r,t,e))e.samplerType!==s.oT.FLOAT&&(this.hasIntegerTextures=!0);else{var i=t.realWidth,n=t.realHeight,o=r.gl;(e.width!==i||e.height!==n||e.dirtyId<0)&&(e.width=i,e.height=n,o.texImage2D(t.target,0,e.internalFormat,i,n,0,t.format,e.type,null))}t.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(t),e.dirtyId=t.dirtyId}},t.prototype.destroyTexture=function(t,e){var r=this.gl;if((t=t.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!e)){var i=this.managedTextures.indexOf(t);-1!==i&&(0,f.removeItems)(this.managedTextures,i,1)}},t.prototype.updateTextureStyle=function(t){var e=t._glTextures[this.CONTEXT_UID];e&&(t.mipmap!==s.WB.POW2&&2===this.webGLVersion||t.isPowerOfTwo?e.mipmap=t.mipmap>=1:e.mipmap=!1,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=s.Nt.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},t.prototype.setStyle=function(t,e){var r=this.gl;if(e.mipmap&&t.mipmap!==s.WB.ON_MANUAL&&r.generateMipmap(t.target),r.texParameteri(t.target,r.TEXTURE_WRAP_S,e.wrapMode),r.texParameteri(t.target,r.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===s.aH.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===s.aH.LINEAR){var n=Math.min(t.anisotropicLevel,r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));r.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===s.aH.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===s.aH.LINEAR?r.LINEAR:r.NEAREST)},t.prototype.destroy=function(){this.renderer=null},t}(),Ne=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Fe=function(){return Fe=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},Fe.apply(this,arguments)},Be=function(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]])}return r},Ue=wx.window.document,ke=new V.y3,je=function(t){function e(e,r){void 0===e&&(e=s.N3.UNKNOWN);var i=t.call(this)||this;return r=Object.assign({},o.X.RENDER_OPTIONS,r),i.options=r,i.type=e,i.screen=new V.Ae(0,0,r.width,r.height),i.view=r.view||Ue.createElement("canvas"),i.resolution=r.resolution||o.X.RESOLUTION,i.useContextAlpha=r.useContextAlpha,i.autoDensity=!!r.autoDensity,i.preserveDrawingBuffer=r.preserveDrawingBuffer,i.clearBeforeRender=r.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,1],i._backgroundColorString="#000000",i.backgroundColor=r.backgroundColor||i._backgroundColor,i.backgroundAlpha=r.backgroundAlpha,void 0!==r.transparent&&((0,f.deprecation)("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),i.useContextAlpha=r.transparent,i.backgroundAlpha=r.transparent?0:1),i._lastObjectRendered=null,i.plugins={},i}return Ne(e,t),e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e){this.view.width=Math.round(t*this.resolution),this.view.height=Math.round(e*this.resolution);var r=this.view.width/this.resolution,i=this.view.height/this.resolution;this.screen.width=r,this.screen.height=i,this.autoDensity&&(this.view.style.width="".concat(r,"px"),this.view.style.height="".concat(i,"px")),this.emit("resize",r,i)},e.prototype.generateTexture=function(t,e,r,i){void 0===e&&(e={}),"number"==typeof e&&((0,f.deprecation)("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),e={scaleMode:e,resolution:r,region:i});var n=e.region,o=Be(e,["region"]);0===(i=n||t.getLocalBounds(null,!0)).width&&(i.width=1),0===i.height&&(i.height=1);var s=Q.create(Fe({width:i.width,height:i.height},o));return ke.tx=-i.x,ke.ty=-i.y,this.render(t,{renderTexture:s,clear:!1,transform:ke,skipUpdateTransform:!!t.parent}),s},e.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var r=this;r.plugins=null,r.type=s.N3.UNKNOWN,r.view=null,r.screen=null,r._tempDisplayObjectParent=null,r.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=(0,f.hex2string)(t),(0,f.hex2rgb)(t,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(t){this._backgroundColorRgba[3]=t},enumerable:!1,configurable:!0}),e}(f.EventEmitter),Ge=function(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0},Xe=function(){function t(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}return t.prototype.destroy=function(){this.renderer=null},t.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},t.prototype.bind=function(t){var e=this.gl,r=this.CONTEXT_UID,i=t._glBuffers[r]||this.createGLBuffer(t);e.bindBuffer(t.type,i.buffer)},t.prototype.bindBufferBase=function(t,e){var r=this.gl,i=this.CONTEXT_UID;if(this.boundBufferBases[e]!==t){var n=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[e]=t,r.bindBufferBase(r.UNIFORM_BUFFER,e,n.buffer)}},t.prototype.bindBufferRange=function(t,e,r){var i=this.gl,n=this.CONTEXT_UID;r=r||0;var o=t._glBuffers[n]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,e||0,o.buffer,256*r,256)},t.prototype.update=function(t){var e=this.gl,r=this.CONTEXT_UID,i=t._glBuffers[r];if(t._updateID!==i.updateID)if(i.updateID=t._updateID,e.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)e.bufferSubData(t.type,0,t.data);else{var n=t.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,e.bufferData(t.type,t.data,n)}},t.prototype.dispose=function(t,e){if(this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var r=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),r&&(e||i.deleteBuffer(r.buffer),delete t._glBuffers[this.CONTEXT_UID])}},t.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedBuffers),r=0;r<e.length;r++)this.dispose(this.managedBuffers[e[r]],t)},t.prototype.createGLBuffer=function(t){var e=this.CONTEXT_UID,r=this.gl;return t._glBuffers[e]=new Ge(r.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[e]},t}(),He=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ye=function(t){function e(r){var i=t.call(this,s.N3.WEBGL,r)||this;return r=i.options,i.gl=null,i.CONTEXT_UID=0,i.runners={destroy:new c.R("destroy"),contextChange:new c.R("contextChange"),reset:new c.R("reset"),update:new c.R("update"),postrender:new c.R("postrender"),prerender:new c.R("prerender"),resize:new c.R("resize")},i.runners.contextChange.add(i),i.globalUniforms=new dt({projectionMatrix:new V.y3},!0),i.addSystem(oe,"mask").addSystem(bt,"context").addSystem(Re,"state").addSystem(Ce,"shader").addSystem(Le,"texture").addSystem(Xe,"buffer").addSystem(At,"geometry").addSystem(wt,"framebuffer").addSystem(ue,"scissor").addSystem(le,"stencil").addSystem(fe,"projection").addSystem(Me,"textureGC").addSystem(vt,"filter").addSystem(ye,"renderTexture").addSystem(gt,"batch"),i.initPlugins(e.__plugins),i.multisample=void 0,r.context?i.context.initFromContext(r.context):i.context.initFromOptions({alpha:!!i.useContextAlpha,antialias:r.antialias,premultipliedAlpha:i.useContextAlpha&&"notMultiplied"!==i.useContextAlpha,stencil:!0,preserveDrawingBuffer:r.preserveDrawingBuffer,powerPreference:i.options.powerPreference}),i.renderingToScreen=!0,(0,f.sayHello)(2===i.context.webGLVersion?"WebGL 2":"WebGL 1"),i.resize(i.options.width,i.options.height),i}return He(e,t),e.create=function(t){if((0,f.isWebGLSupported)())return new e(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.contextChange=function(){var t,e=this.gl;if(1===this.context.webGLVersion){var r=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,r)}else{r=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,r)}t>=s.G5.HIGH?this.multisample=s.G5.HIGH:t>=s.G5.MEDIUM?this.multisample=s.G5.MEDIUM:t>=s.G5.LOW?this.multisample=s.G5.LOW:this.multisample=s.G5.NONE},e.prototype.addSystem=function(t,e){var r=new t(this);if(this[e])throw new Error('Whoops! The name "'.concat(e,'" is already in use'));for(var i in this[e]=r,this.runners)this.runners[i].add(r);return this},e.prototype.render=function(t,e){var r,i,n,o;if(e&&(e instanceof Q?((0,f.deprecation)("6.0.0","Renderer#render arguments changed, use options instead."),r=e,i=arguments[2],n=arguments[3],o=arguments[4]):(r=e.renderTexture,i=e.clear,n=e.transform,o=e.skipUpdateTransform)),this.renderingToScreen=!r,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=n,!this.context.isLost){if(r||(this._lastObjectRendered=t),!o){var s=t.enableTempParent();t.updateTransform(),t.disableTempParent(s)}this.renderTexture.bind(r),this.batch.currentRenderer.start(),(void 0!==i?i:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),r&&r.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.generateTexture=function(e,r,i,n){void 0===r&&(r={});var o=t.prototype.generateTexture.call(this,e,r,i,n);return this.framebuffer.blit(),o},e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this.runners.resize.emit(this.screen.height,this.screen.width)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(e){for(var r in this.runners.destroy.emit(),this.runners)this.runners[r].destroy();t.prototype.destroy.call(this,e),this.gl=null},Object.defineProperty(e.prototype,"extract",{get:function(){return(0,f.deprecation)("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),e.registerPlugin=function(t,r){e.__plugins=e.__plugins||{},e.__plugins[t]=r},e}(je);function Ve(t){return Ye.create(t)}var ze="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",We="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n",qe=function(){function t(t){(0,f.deprecation)("6.1.0","System class is deprecated, implemement ISystem interface instead."),this.renderer=t}return t.prototype.destroy=function(){this.renderer=null},t}(),$e=function(){this.texArray=null,this.blend=0,this.type=s.lg.TRIANGLES,this.start=0,this.size=0,this.data=null},Ke=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var t=0;t<this.count;t++)this.elements[t]=null;this.count=0},t}(),Ze=function(){function t(t){"number"==typeof t?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}return Object.defineProperty(t.prototype,"int8View",{get:function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uint8View",{get:function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"int16View",{get:function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uint16View",{get:function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"int32View",{get:function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},enumerable:!1,configurable:!0}),t.prototype.view=function(t){return this["".concat(t,"View")]},t.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},t.sizeOf=function(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error("".concat(t," isn't a valid view type"))}},t}(),Qe=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Je=function(t){function e(e){var r=t.call(this,e)||this;return r.shaderGenerator=null,r.geometryClass=null,r.vertexSize=null,r.state=Qt.for2d(),r.size=4*o.X.SPRITE_BATCH_SIZE,r._vertexCount=0,r._indexCount=0,r._bufferedElements=[],r._bufferedTextures=[],r._bufferSize=0,r._shader=null,r._packedGeometries=[],r._packedGeometryPoolSize=2,r._flushId=0,r._aBuffers={},r._iBuffers={},r.MAX_TEXTURES=1,r.renderer.on("prerender",r.onPrerender,r),e.runners.contextChange.add(r),r._dcIndex=0,r._aIndex=0,r._iIndex=0,r._attributeBuffer=null,r._indexBuffer=null,r._tempBoundTextures=[],r}return Qe(e,t),e.prototype.contextChange=function(){var t=this.renderer.gl;o.X.PREFER_ENV===s.Vi.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),o.X.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=Wt(this.MAX_TEXTURES,t)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()},e.prototype.initFlushBuffers=function(){for(var t=e._drawCallPool,r=e._textureArrayPool,i=this.size/4,n=Math.floor(i/this.MAX_TEXTURES)+1;t.length<i;)t.push(new $e);for(;r.length<n;)r.push(new Ke);for(var o=0;o<this.MAX_TEXTURES;o++)this._tempBoundTextures[o]=null},e.prototype.onPrerender=function(){this._flushId=0},e.prototype.render=function(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},e.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,r=this.MAX_TEXTURES,i=e._textureArrayPool,n=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,a=++w._globalBatch,h=0,u=i[0],c=0;n.copyBoundTextures(o,r);for(var l=0;l<this._bufferSize;++l){var f=t[l];t[l]=null,f._batchEnabled!==a&&(u.count>=r&&(n.boundArray(u,o,a,r),this.buildDrawCalls(u,c,l),c=l,u=i[++h],++a),f._batchEnabled=a,f.touched=s,u.elements[u.count++]=f)}u.count>0&&(n.boundArray(u,o,a,r),this.buildDrawCalls(u,c,this._bufferSize),++h,++a);for(l=0;l<o.length;l++)o[l]=null;w._globalBatch=a},e.prototype.buildDrawCalls=function(t,r,i){var n=this,o=n._bufferedElements,s=n._attributeBuffer,a=n._indexBuffer,h=n.vertexSize,u=e._drawCallPool,c=this._dcIndex,l=this._aIndex,d=this._iIndex,p=u[c];p.start=this._iIndex,p.texArray=t;for(var y=r;y<i;++y){var m=o[y],v=m._texture.baseTexture,_=f.premultiplyBlendMode[v.alphaMode?1:0][m.blendMode];o[y]=null,r<y&&p.blend!==_&&(p.size=d-p.start,r=y,(p=u[++c]).texArray=t,p.start=d),this.packInterleavedGeometry(m,s,a,l,d),l+=m.vertexData.length/2*h,d+=m.indices.length,p.blend=_}r<i&&(p.size=d-p.start,++c),this._dcIndex=c,this._aIndex=l,this._iIndex=d},e.prototype.bindAndClearTexArray=function(t){for(var e=this.renderer.texture,r=0;r<t.count;r++)e.bind(t.elements[r],t.ids[r]),t.elements[r]=null;t.count=0},e.prototype.updateGeometry=function(){var t=this,e=t._packedGeometries,r=t._attributeBuffer,i=t._indexBuffer;o.X.CAN_UPLOAD_SAME_BUFFER?(e[this._flushId]._buffer.update(r.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(r.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)},e.prototype.drawBatches=function(){for(var t=this._dcIndex,r=this.renderer,i=r.gl,n=r.state,o=e._drawCallPool,s=null,a=0;a<t;a++){var h=o[a],u=h.texArray,c=h.type,l=h.size,f=h.start,d=h.blend;s!==u&&(s=u,this.bindAndClearTexArray(u)),this.state.blendMode=d,n.set(this.state),i.drawElements(c,l,i.UNSIGNED_SHORT,2*f)}},e.prototype.flush=function(){0!==this._vertexCount&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)},e.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.MAX_TEXTURES),this.renderer.shader.bind(this._shader),o.X.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),t.prototype.destroy.call(this)},e.prototype.getAttributeBuffer=function(t){var e=(0,f.nextPow2)(Math.ceil(t/8)),r=(0,f.log2)(e),i=8*e;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);var n=this._aBuffers[i];return n||(this._aBuffers[i]=n=new Ze(i*this.vertexSize*4)),n},e.prototype.getIndexBuffer=function(t){var e=(0,f.nextPow2)(Math.ceil(t/12)),r=(0,f.log2)(e),i=12*e;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);var n=this._iBuffers[r];return n||(this._iBuffers[r]=n=new Uint16Array(i)),n},e.prototype.packInterleavedGeometry=function(t,e,r,i,n){for(var o=e.uint32View,s=e.float32View,a=i/this.vertexSize,h=t.uvs,u=t.indices,c=t.vertexData,l=t._texture.baseTexture._batchLocation,d=Math.min(t.worldAlpha,1),p=d<1&&t._texture.baseTexture.alphaMode?(0,f.premultiplyTint)(t._tintRGB,d):t._tintRGB+(255*d<<24),y=0;y<c.length;y+=2)s[i++]=c[y],s[i++]=c[y+1],s[i++]=h[y],s[i++]=h[y+1],o[i++]=p,s[i++]=l;for(y=0;y<u.length;y++)r[n++]=a+u[y]},e._drawCallPool=[],e._textureArrayPool=[],e}(_t),tr=function(){function t(t,e){if(this.vertexSrc=t,this.fragTemplate=e,this.programCache={},this.defaultGroupCache={},e.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(e.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')}return t.prototype.generateShader=function(t){if(!this.programCache[t]){for(var e=new Int32Array(t),r=0;r<t;r++)e[r]=r;this.defaultGroupCache[t]=dt.from({uSamplers:e},!0);var i=this.fragTemplate;i=(i=i.replace(/%count%/gi,"".concat(t))).replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new Kt(this.vertexSrc,i)}var n={tint:new Float32Array([1,1,1,1]),translationMatrix:new V.y3,default:this.defaultGroupCache[t]};return new Zt(this.programCache[t],n)},t.prototype.generateSampleSrc=function(t){var e="";e+="\n",e+="\n";for(var r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(vTextureId < ".concat(r,".5)")),e+="\n{",e+="\n\tcolor = texture2D(uSamplers[".concat(r,"], vTextureCoord);"),e+="\n}";return e+="\n",e+="\n"},t}(),er=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),rr=function(t){function e(e){void 0===e&&(e=!1);var r=t.call(this)||this;return r._buffer=new rt(null,e,!1),r._indexBuffer=new rt(null,e,!0),r.addAttribute("aVertexPosition",r._buffer,2,!1,s.vK.FLOAT).addAttribute("aTextureCoord",r._buffer,2,!1,s.vK.FLOAT).addAttribute("aColor",r._buffer,4,!0,s.vK.UNSIGNED_BYTE).addAttribute("aTextureId",r._buffer,1,!0,s.vK.FLOAT).addIndex(r._indexBuffer),r}return er(e,t),e}(at);const ir="precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor * tint;\n}\n",nr="varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n vec4 color;\n %forloop%\n gl_FragColor = color * vColor;\n}\n";var or=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),sr=function(){function t(){}return t.create=function(t){var e=Object.assign({vertex:ir,fragment:nr,geometryClass:rr,vertexSize:6},t),r=e.vertex,i=e.fragment,n=e.vertexSize,o=e.geometryClass;return function(t){function e(e){var s=t.call(this,e)||this;return s.shaderGenerator=new tr(r,i),s.geometryClass=o,s.vertexSize=n,s}return or(e,t),e}(Je)},Object.defineProperty(t,"defaultVertexSrc",{get:function(){return ir},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentTemplate",{get:function(){return nr},enumerable:!1,configurable:!0}),t}(),ar=sr.create(),hr={},ur=function(t){Object.defineProperty(hr,t,{get:function(){return(0,f.deprecation)("6.0.0","PIXI.systems.".concat(t," has moved to PIXI.").concat(t)),i[t]}})};for(var cr in i)ur(cr);var lr={},fr=function(t){Object.defineProperty(lr,t,{get:function(){return(0,f.deprecation)("6.0.0","PIXI.resources.".concat(t," has moved to PIXI.").concat(t)),n[t]}})};for(var cr in n)fr(cr)},519:(t,e,r)=>{r.d(e,{YZ:()=>s,W2:()=>p,s$:()=>u,Ql:()=>c});var i=r(6787);i.X.SORTABLE_CHILDREN=!1;var n,o=r(1893),s=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?o.Ae.EMPTY:((t=t||new o.Ae(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addPointMatrix=function(t,e){var r=t.a,i=t.b,n=t.c,o=t.d,s=t.tx,a=t.ty,h=r*e.x+n*e.y+s,u=i*e.x+o*e.y+a;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,u),this.maxY=Math.max(this.maxY,u)},t.prototype.addQuad=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=t[0],s=t[1];e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[2])<e?o:e,r=(s=t[3])<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[4])<e?o:e,r=(s=t[5])<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[6])<e?o:e,r=(s=t[7])<r?s:r,i=o>i?o:i,n=s>n?s:n,this.minX=e,this.minY=r,this.maxX=i,this.maxY=n},t.prototype.addFrame=function(t,e,r,i,n){this.addFrameMatrix(t.worldTransform,e,r,i,n)},t.prototype.addFrameMatrix=function(t,e,r,i,n){var o=t.a,s=t.b,a=t.c,h=t.d,u=t.tx,c=t.ty,l=this.minX,f=this.minY,d=this.maxX,p=this.maxY,y=o*e+a*r+u,m=s*e+h*r+c;l=y<l?y:l,f=m<f?m:f,d=y>d?y:d,p=m>p?m:p,l=(y=o*i+a*r+u)<l?y:l,f=(m=s*i+h*r+c)<f?m:f,d=y>d?y:d,p=m>p?m:p,l=(y=o*e+a*n+u)<l?y:l,f=(m=s*e+h*n+c)<f?m:f,d=y>d?y:d,p=m>p?m:p,l=(y=o*i+a*n+u)<l?y:l,f=(m=s*i+h*n+c)<f?m:f,d=y>d?y:d,p=m>p?m:p,this.minX=l,this.minY=f,this.maxX=d,this.maxY=p},t.prototype.addVertexData=function(t,e,r){for(var i=this.minX,n=this.minY,o=this.maxX,s=this.maxY,a=e;a<r;a+=2){var h=t[a],u=t[a+1];i=h<i?h:i,n=u<n?u:n,o=h>o?h:o,s=u>s?u:s}this.minX=i,this.minY=n,this.maxX=o,this.maxY=s},t.prototype.addVertices=function(t,e,r,i){this.addVerticesMatrix(t.worldTransform,e,r,i)},t.prototype.addVerticesMatrix=function(t,e,r,i,n,o){void 0===n&&(n=0),void 0===o&&(o=n);for(var s=t.a,a=t.b,h=t.c,u=t.d,c=t.tx,l=t.ty,f=this.minX,d=this.minY,p=this.maxX,y=this.maxY,m=r;m<i;m+=2){var v=e[m],_=e[m+1],g=s*v+h*_+c,x=u*_+a*v+l;f=Math.min(f,g-n),p=Math.max(p,g+n),d=Math.min(d,x-o),y=Math.max(y,x+o)}this.minX=f,this.minY=d,this.maxX=p,this.maxY=y},t.prototype.addBounds=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n},t.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,i=t.minY>e.minY?t.minY:e.minY,n=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(r<=n&&i<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<s?r:s,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,i=t.minY>e.y?t.minY:e.y,n=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(r<=n&&i<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<s?r:s,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,r,i,n,o){t-=n,e-=o,r+=n,i+=o,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>r?this.maxX:r,this.minY=this.minY<e?this.minY:e,this.maxY=this.maxY>i?this.maxY:i},t}(),a=r(2202),h=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new o.wx,e.alpha=1,e.visible=!0,e.renderable=!0,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new s,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._maskRefCount=0,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return h(e,t),e.mixin=function(t){for(var r=Object.keys(t),i=0;i<r.length;++i){var n=r[i];Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new o.Ae),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new o.Ae),t=this._localBoundsRect),this._localBounds||(this._localBounds=new s);var e=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var i=this._bounds,n=this._boundsID;this._bounds=this._localBounds;var a=this.getBounds(!1,t);return this.parent=r,this.transform=e,this._bounds=i,this._bounds.updateID+=this._boundsID-n,a},e.prototype.toGlobal=function(t,e,r){return void 0===r&&(r=!1),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,r,i){return e&&(t=e.toGlobal(t,r,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=1),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=e,this.scale.x=r||1,this.scale.y=i||1,this.rotation=n,this.skew.x=o,this.skew.y=s,this.pivot.x=a,this.pivot.y=h,this},e.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this.emit("destroyed"),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},Object.defineProperty(e.prototype,"_tempDisplayObjectParent",{get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new c),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),e.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},e.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(e.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.transform.rotation*o.jl},set:function(t){this.transform.rotation=t*o.ZX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(t){if(this._mask!==t){var e;if(this._mask)(e=this._mask.maskObject||this._mask)._maskRefCount--,0===e._maskRefCount&&(e.renderable=!0,e.isMask=!1);if(this._mask=t,this._mask)0===(e=this._mask.maskObject||this._mask)._maskRefCount&&(e.renderable=!1,e.isMask=!0),e._maskRefCount++}},enumerable:!1,configurable:!0}),e}(a.EventEmitter),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sortDirty=null,e}return h(e,t),e}(u);u.prototype.displayObjectUpdateTransform=u.prototype.updateTransform;var l=r(7659),f=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function d(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}var p=function(t){function e(){var e=t.call(this)||this;return e.children=[],e.sortableChildren=i.X.SORTABLE_CHILDREN,e.sortDirty=!1,e}return f(e,t),e.prototype.onChildrenChange=function(t){},e.prototype.addChild=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length>1)for(var r=0;r<t.length;r++)this.addChild(t[r]);else{var i=t[0];i.parent&&i.parent.removeChild(i),i.parent=this,this.sortDirty=!0,i.transform._parentID=-1,this.children.push(i),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",i,this,this.children.length-1),i.emit("added",this)}return t[0]},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error("".concat(t,"addChildAt: The index ").concat(e," supplied is out of bounds ").concat(this.children.length));return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),i=this.getChildIndex(e);this.children[r]=e,this.children[i]=t,this.onChildrenChange(r<i?r:i)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index ".concat(e," supplied is out of bounds ").concat(this.children.length));var r=this.getChildIndex(t);(0,a.removeItems)(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index (".concat(t,") does not exist."));return this.children[t]},e.prototype.removeChild=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length>1)for(var r=0;r<t.length;r++)this.removeChild(t[r]);else{var i=t[0],n=this.children.indexOf(i);if(-1===n)return null;i.parent=null,i.transform._parentID=-1,(0,a.removeItems)(this.children,n,1),this._boundsID++,this.onChildrenChange(n),i.emit("removed",this),this.emit("childRemoved",i,this,n)}return t[0]},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,(0,a.removeItems)(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e},e.prototype.removeChildren=function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.children.length);var r,i=t,n=e-i;if(n>0&&n<=e){r=this.children.splice(i,n);for(var o=0;o<r.length;++o)r[o].parent=null,r[o].transform&&(r[o].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(o=0;o<r.length;++o)r[o].emit("removed",this),this.emit("childRemoved",r[o],this,o);return r}if(0===n&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,e=0,r=this.children.length;e<r;++e){var i=this.children[e];i._lastSortedIndex=e,t||0===i.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(d),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var r=this.children[t];r.visible&&r.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];if(e.visible&&e.renderable)if(e.calculateBounds(),e._mask){var r=e._mask.maskObject||e._mask;r.calculateBounds(),this._bounds.addBoundsMask(e._bounds,r._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(e,r){void 0===r&&(r=!1);var i=t.prototype.getLocalBounds.call(this,e);if(!r)for(var n=0,o=this.children.length;n<o;++n){var s=this.children[n];s.visible&&s.updateTransform()}return i},e.prototype._calculateBounds=function(){},e.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else{this._render(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].render(t)}},e.prototype.renderAdvanced=function(t){var e=this.filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var i=0;i<e.length;i++)e[i].enabled&&this._enabledFilters.push(e[i])}var n=e&&this._enabledFilters&&this._enabledFilters.length||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==l.A7.NONE));n&&t.batch.flush(),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.push(this,this._enabledFilters),r&&t.mask.push(this,this._mask),this._render(t);i=0;for(var o=this.children.length;i<o;i++)this.children[i].render(t);n&&t.batch.flush(),r&&t.mask.pop(this),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(e){t.prototype.destroy.call(this),this.sortDirty=!1;var r="boolean"==typeof e?e:e&&e.children,i=this.removeChildren(0,this.children.length);if(r)for(var n=0;n<i.length;++n)i[n].destroy(e)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t},enumerable:!1,configurable:!0}),e}(u);p.prototype.containerUpdateTransform=p.prototype.updateTransform},4775:(t,e,r)=>{var i,n;r.d(e,{ft:()=>a,wA:()=>o,TC:()=>G,iM:()=>C,RB:()=>N,$o:()=>n,S:()=>i,TD:()=>B,yR:()=>X}),function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"}(i||(i={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(n||(n={}));var o={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive||!t||isNaN(t))return e;var r=Math.ceil(t/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}},s=r(9043),a=function(){function t(){this.color=16777215,this.alpha=1,this.texture=s.Texture.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=s.Texture.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}(),h=r(1893),u=r(2202),c={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var r=t.points,i=t.holes,n=e.points,o=e.indices;if(r.length>=6){for(var s=[],a=0;a<i.length;a++){var h=i[a];s.push(r.length/2),r=r.concat(h.points)}var c=(0,u.earcut)(r,s,2);if(!c)return;var l=n.length/2;for(a=0;a<c.length;a+=3)o.push(c[a]+l),o.push(c[a+1]+l),o.push(c[a+2]+l);for(a=0;a<r.length;a++)n.push(r[a])}}},l={build:function(t){var e,r,i=t.shape,n=t.points,o=i.x,s=i.y;if(n.length=0,t.type===h.HS.CIRC)e=i.radius,r=i.radius;else{var a=t.shape;e=a.width,r=a.height}if(0!==e&&0!==r){var u=Math.floor(30*Math.sqrt(i.radius))||Math.floor(15*Math.sqrt(e+r));u/=2.3;for(var c=2*Math.PI/u,l=0;l<u-.5;l++)n.push(o+Math.sin(-c*l)*e,s+Math.cos(-c*l)*r);n.push(n[0],n[1])}},triangulate:function(t,e){var r=t.points,i=e.points,n=e.indices,o=i.length/2,s=o,a=t.shape,h=t.matrix,u=a.x,c=a.y;i.push(t.matrix?h.a*u+h.c*c+h.tx:u,t.matrix?h.b*u+h.d*c+h.ty:c);for(var l=0;l<r.length;l+=2)i.push(r[l],r[l+1]),n.push(o++,s,o)}},f={build:function(t){var e=t.shape,r=e.x,i=e.y,n=e.width,o=e.height,s=t.points;s.length=0,s.push(r,i,r+n,i,r+n,i+o,r,i+o)},triangulate:function(t,e){var r=t.points,i=e.points,n=i.length/2;i.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(n,n+1,n+2,n+1,n+2,n+3)}};function d(t,e,r){return t+(e-t)*r}function p(t,e,r,i,n,o,s){void 0===s&&(s=[]);for(var a=s,h=0,u=0,c=0,l=0,f=0,p=0,y=0,m=0;y<=20;++y)h=d(t,r,m=y/20),u=d(e,i,m),c=d(r,n,m),l=d(i,o,m),f=d(h,c,m),p=d(u,l,m),0===y&&a[a.length-2]===f&&a[a.length-1]===p||a.push(f,p);return a}var y={build:function(t){var e=t.shape,r=t.points,i=e.x,n=e.y,o=e.width,s=e.height,a=Math.max(0,Math.min(e.radius,Math.min(o,s)/2));r.length=0,a?(p(i,n+a,i,n,i+a,n,r),p(i+o-a,n,i+o,n,i+o,n+a,r),p(i+o,n+s-a,i+o,n+s,i+o-a,n+s,r),p(i+a,n+s,i,n+s,i,n+s-a,r)):r.push(i,n,i+o,n,i+o,n+s,i,n+s)},triangulate:function(t,e){for(var r=t.points,i=e.points,n=e.indices,o=i.length/2,s=(0,u.earcut)(r,null,2),a=0,h=s.length;a<h;a+=3)n.push(s[a]+o),n.push(s[a+1]+o),n.push(s[a+2]+o);for(a=0,h=r.length;a<h;a++)i.push(r[a],r[++a])}};function m(t,e,r,i,n,o,s,a){var h,u;s?(h=i,u=-r):(h=-i,u=r);var c=t-r*n+h,l=e-i*n+u,f=t+r*o+h,d=e+i*o+u;return a.push(c,l),a.push(f,d),2}function v(t,e,r,i,n,o,s,a){var h=r-t,u=i-e,c=Math.atan2(h,u),l=Math.atan2(n-t,o-e);a&&c<l?c+=2*Math.PI:!a&&c>l&&(l+=2*Math.PI);var f=c,d=l-c,p=Math.abs(d),y=Math.sqrt(h*h+u*u),m=1+(15*p*Math.sqrt(y)/Math.PI>>0),v=d/m;if(f+=v,a){s.push(t,e),s.push(r,i);for(var _=1,g=f;_<m;_++,g+=v)s.push(t,e),s.push(t+Math.sin(g)*y,e+Math.cos(g)*y);s.push(t,e),s.push(n,o)}else{s.push(r,i),s.push(t,e);for(_=1,g=f;_<m;_++,g+=v)s.push(t+Math.sin(g)*y,e+Math.cos(g)*y),s.push(t,e);s.push(n,o),s.push(t,e)}return 2*m}function _(t,e){t.lineStyle.native?function(t,e){var r=0,i=t.shape,n=t.points||i.points,o=i.type!==h.HS.POLY||i.closeStroke;if(0!==n.length){var s=e.points,a=e.indices,u=n.length/2,c=s.length/2,l=c;for(s.push(n[0],n[1]),r=1;r<u;r++)s.push(n[2*r],n[2*r+1]),a.push(l,l+1),l++;o&&a.push(l,c)}}(t,e):function(t,e){var r=t.shape,s=t.points||r.points.slice(),a=e.closePointEps;if(0!==s.length){var u=t.lineStyle,c=new h.E9(s[0],s[1]),l=new h.E9(s[s.length-2],s[s.length-1]),f=r.type!==h.HS.POLY||r.closeStroke,d=Math.abs(c.x-l.x)<a&&Math.abs(c.y-l.y)<a;if(f){s=s.slice(),d&&(s.pop(),s.pop(),l.set(s[s.length-2],s[s.length-1]));var p=.5*(c.x+l.x),y=.5*(l.y+c.y);s.unshift(p,y),s.push(p,y)}var _=e.points,g=s.length/2,x=s.length,b=_.length/2,T=u.width/2,E=T*T,w=u.miterLimit*u.miterLimit,S=s[0],A=s[1],O=s[2],I=s[3],P=0,C=0,R=-(A-I),M=S-O,D=0,L=0,N=Math.sqrt(R*R+M*M);R/=N,M/=N,R*=T,M*=T;var F=u.alignment,B=2*(1-F),U=2*F;f||(u.cap===n.ROUND?x+=v(S-R*(B-U)*.5,A-M*(B-U)*.5,S-R*B,A-M*B,S+R*U,A+M*U,_,!0)+2:u.cap===n.SQUARE&&(x+=m(S,A,R,M,B,U,!0,_))),_.push(S-R*B,A-M*B),_.push(S+R*U,A+M*U);for(var k=1;k<g-1;++k){S=s[2*(k-1)],A=s[2*(k-1)+1],O=s[2*k],I=s[2*k+1],P=s[2*(k+1)],C=s[2*(k+1)+1],R=-(A-I),M=S-O,R/=N=Math.sqrt(R*R+M*M),M/=N,R*=T,M*=T,D=-(I-C),L=O-P,D/=N=Math.sqrt(D*D+L*L),L/=N,D*=T,L*=T;var j=O-S,G=A-I,X=O-P,H=C-I,Y=G*X-H*j,V=Y<0;if(Math.abs(Y)<.1)_.push(O-R*B,I-M*B),_.push(O+R*U,I+M*U);else{var z=(-R+S)*(-M+I)-(-R+O)*(-M+A),W=(-D+P)*(-L+I)-(-D+O)*(-L+C),q=(j*W-X*z)/Y,$=(H*z-G*W)/Y,K=(q-O)*(q-O)+($-I)*($-I),Z=O+(q-O)*B,Q=I+($-I)*B,J=O-(q-O)*U,tt=I-($-I)*U,et=V?B:U;K<=Math.min(j*j+G*G,X*X+H*H)+et*et*E?u.join===i.BEVEL||K/E>w?(V?(_.push(Z,Q),_.push(O+R*U,I+M*U),_.push(Z,Q),_.push(O+D*U,I+L*U)):(_.push(O-R*B,I-M*B),_.push(J,tt),_.push(O-D*B,I-L*B),_.push(J,tt)),x+=2):u.join===i.ROUND?V?(_.push(Z,Q),_.push(O+R*U,I+M*U),x+=v(O,I,O+R*U,I+M*U,O+D*U,I+L*U,_,!0)+4,_.push(Z,Q),_.push(O+D*U,I+L*U)):(_.push(O-R*B,I-M*B),_.push(J,tt),x+=v(O,I,O-R*B,I-M*B,O-D*B,I-L*B,_,!1)+4,_.push(O-D*B,I-L*B),_.push(J,tt)):(_.push(Z,Q),_.push(J,tt)):(_.push(O-R*B,I-M*B),_.push(O+R*U,I+M*U),u.join===i.BEVEL||K/E>w||(u.join===i.ROUND?x+=V?v(O,I,O+R*U,I+M*U,O+D*U,I+L*U,_,!0)+2:v(O,I,O-R*B,I-M*B,O-D*B,I-L*B,_,!1)+2:(V?(_.push(J,tt),_.push(J,tt)):(_.push(Z,Q),_.push(Z,Q)),x+=2)),_.push(O-D*B,I-L*B),_.push(O+D*U,I+L*U),x+=2)}}S=s[2*(g-2)],A=s[2*(g-2)+1],O=s[2*(g-1)],R=-(A-(I=s[2*(g-1)+1])),M=S-O,R/=N=Math.sqrt(R*R+M*M),M/=N,R*=T,M*=T,_.push(O-R*B,I-M*B),_.push(O+R*U,I+M*U),f||(u.cap===n.ROUND?x+=v(O-R*(B-U)*.5,I-M*(B-U)*.5,O-R*B,I-M*B,O+R*U,I+M*U,_,!1)+2:u.cap===n.SQUARE&&(x+=m(O,I,R,M,B,U,!1,_)));var rt=e.indices,it=o.epsilon*o.epsilon;for(k=b;k<x+b-2;++k)S=_[2*k],A=_[2*k+1],O=_[2*(k+1)],I=_[2*(k+1)+1],P=_[2*(k+2)],C=_[2*(k+2)+1],Math.abs(S*(I-C)+O*(C-A)+P*(A-I))<it||rt.push(k,k+1,k+2)}}(t,e)}var g,x=function(){function t(){}return t.curveTo=function(t,e,r,i,n,o){var s=o[o.length-2],a=o[o.length-1]-e,h=s-t,u=i-e,c=r-t,l=Math.abs(a*c-h*u);if(l<1e-8||0===n)return o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e),null;var f=a*a+h*h,d=u*u+c*c,p=a*u+h*c,y=n*Math.sqrt(f)/l,m=n*Math.sqrt(d)/l,v=y*p/f,_=m*p/d,g=y*c+m*h,x=y*u+m*a,b=h*(m+v),T=a*(m+v),E=c*(y+_),w=u*(y+_);return{cx:g+t,cy:x+e,radius:n,startAngle:Math.atan2(T-x,b-g),endAngle:Math.atan2(w-x,E-g),anticlockwise:h*u>c*a}},t.arc=function(t,e,r,i,n,s,a,u,c){for(var l=a-s,f=o._segmentsCount(Math.abs(l)*n,40*Math.ceil(Math.abs(l)/h._b)),d=l/(2*f),p=2*d,y=Math.cos(d),m=Math.sin(d),v=f-1,_=v%1/v,g=0;g<=v;++g){var x=d+s+p*(g+_*g),b=Math.cos(x),T=-Math.sin(x);c.push((y*b+m*T)*n+r,(y*-T+m*b)*n+i)}},t}(),b=function(){function t(){}return t.curveLength=function(t,e,r,i,n,o,s,a){for(var h=0,u=0,c=0,l=0,f=0,d=0,p=0,y=0,m=0,v=0,_=0,g=t,x=e,b=1;b<=10;++b)v=g-(y=(p=(d=(f=1-(u=b/10))*f)*f)*t+3*d*u*r+3*f*(c=u*u)*n+(l=c*u)*s),_=x-(m=p*e+3*d*u*i+3*f*c*o+l*a),g=y,x=m,h+=Math.sqrt(v*v+_*_);return h},t.curveTo=function(e,r,i,n,s,a,h){var u=h[h.length-2],c=h[h.length-1];h.length-=2;var l=o._segmentsCount(t.curveLength(u,c,e,r,i,n,s,a)),f=0,d=0,p=0,y=0,m=0;h.push(u,c);for(var v=1,_=0;v<=l;++v)p=(d=(f=1-(_=v/l))*f)*f,m=(y=_*_)*_,h.push(p*u+3*d*_*e+3*f*y*i+m*s,p*c+3*d*_*r+3*f*y*n+m*a)},t}(),T=function(){function t(){}return t.curveLength=function(t,e,r,i,n,o){var s=t-2*r+n,a=e-2*i+o,h=2*r-2*t,u=2*i-2*e,c=4*(s*s+a*a),l=4*(s*h+a*u),f=h*h+u*u,d=2*Math.sqrt(c+l+f),p=Math.sqrt(c),y=2*c*p,m=2*Math.sqrt(f),v=l/p;return(y*d+p*l*(d-m)+(4*f*c-l*l)*Math.log((2*p+v+d)/(v+m)))/(4*y)},t.curveTo=function(e,r,i,n,s){for(var a=s[s.length-2],h=s[s.length-1],u=o._segmentsCount(t.curveLength(a,h,e,r,i,n)),c=0,l=0,f=1;f<=u;++f){var d=f/u;c=a+(e-a)*d,l=h+(r-h)*d,s.push(c+(e+(i-e)*d-c)*d,l+(r+(n-r)*d-l)*d)}},t}(),E=function(){function t(){this.reset()}return t.prototype.begin=function(t,e,r){this.reset(),this.style=t,this.start=e,this.attribStart=r},t.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),w=((g={})[h.HS.POLY]=c,g[h.HS.CIRC]=l,g[h.HS.ELIP]=l,g[h.HS.RECT]=f,g[h.HS.RREC]=y,g),S=[],A=[];function O(t){for(var e=t.points,r=0,i=0;i<e.length-2;i+=2)r+=(e[i+2]-e[i])*(e[i+3]+e[i+1]);return r>0}var I,P=r(7659),C=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null),this.points=[],this.holes=[],this.shape=t,this.lineStyle=r,this.fillStyle=e,this.matrix=i,this.type=t.type}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),R=r(519),M=(I=function(t,e){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},I(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),D=new h.E9,L=new R.YZ,N=function(t){function e(){var e=t.call(this)||this;return e.closePointEps=1e-4,e.boundsPadding=0,e.uvsFloat32=null,e.indicesUint16=null,e.batchable=!1,e.points=[],e.colors=[],e.uvs=[],e.indices=[],e.textureIds=[],e.graphicsData=[],e.drawCalls=[],e.batchDirty=-1,e.batches=[],e.dirty=0,e.cacheDirty=-1,e.clearDirty=0,e.shapeIndex=0,e._bounds=new R.YZ,e.boundsDirty=-1,e}return M(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t<this.drawCalls.length;t++)this.drawCalls[t].texArray.clear(),A.push(this.drawCalls[t]);this.drawCalls.length=0;for(t=0;t<this.batches.length;t++){var e=this.batches[t];e.reset(),S.push(e)}this.batches.length=0},e.prototype.clear=function(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null);var n=new C(t,e,r,i);return this.graphicsData.push(n),this.dirty++,this},e.prototype.drawHole=function(t,e){if(void 0===e&&(e=null),!this.graphicsData.length)return null;var r=new C(t,null,null,e),i=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=i.lineStyle,i.holes.push(r),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null},e.prototype.containsPoint=function(t){for(var e=this.graphicsData,r=0;r<e.length;++r){var i=e[r];if(i.fillStyle.visible&&(i.shape&&(i.matrix?i.matrix.applyInverse(t,D):D.copyFrom(t),i.shape.contains(D.x,D.y)))){var n=!1;if(i.holes)for(var o=0;o<i.holes.length;o++){if(i.holes[o].shape.contains(D.x,D.y)){n=!0;break}}if(!n)return!0}}return!1},e.prototype.updateBatches=function(t){if(this.graphicsData.length){if(this.validateBatching()){this.cacheDirty=this.dirty;var e=this.uvs,r=this.graphicsData,i=null,n=null;this.batches.length>0&&(n=(i=this.batches[this.batches.length-1]).style);for(var o=this.shapeIndex;o<r.length;o++){this.shapeIndex++;var s=r[o],a=s.fillStyle,h=s.lineStyle;w[s.type].build(s),s.matrix&&this.transformPoints(s.points,s.matrix);for(var u=0;u<2;u++){var c=0===u?a:h;if(c.visible){var l=c.texture.baseTexture,f=this.indices.length,d=this.points.length/2;l.wrapMode=P.Nt.REPEAT,0===u?this.processFill(s):this.processLine(s);var p=this.points.length/2-d;0!==p&&(i&&!this._compareStyles(n,c)&&(i.end(f,d),i=null),i||((i=S.pop()||new E).begin(c,f,d),this.batches.push(i),n=c),this.addUvs(this.points,e,c.texture,d,p,c.matrix))}}}var y=this.indices.length,m=this.points.length/2;if(i&&i.end(y,m),0!==this.batches.length){if(this.indicesUint16&&this.indices.length===this.indicesUint16.length)this.indicesUint16.set(this.indices);else{var v=m>65535&&t;this.indicesUint16=v?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},e.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native==!!e.native))},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t<e;t++){var r=this.graphicsData[t],i=r.fillStyle,n=r.lineStyle;if(i&&!i.texture.baseTexture.valid)return!1;if(n&&!n.texture.baseTexture.valid)return!1}return!0},e.prototype.packBatches=function(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);for(var t=this.batches,e=0,r=t.length;e<r;e++)for(var i=t[e],n=0;n<i.size;n++){var o=i.start+n;this.indicesUint16[o]=this.indicesUint16[o]-i.attribStart}},e.prototype.isBatchable=function(){if(this.points.length>131070)return!1;for(var t=this.batches,r=0;r<t.length;r++)if(t[r].style.native)return!1;return this.points.length<2*e.BATCHABLE_SIZE},e.prototype.buildDrawCalls=function(){for(var t=++s.BaseTexture._globalBatch,e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),A.push(this.drawCalls[e]);this.drawCalls.length=0;var r=this.colors,i=this.textureIds,n=A.pop();n||((n=new s.BatchDrawCall).texArray=new s.BatchTextureArray),n.texArray.count=0,n.start=0,n.size=0,n.type=P.lg.TRIANGLES;var o=0,a=null,h=0,u=!1,c=P.lg.TRIANGLES,l=0;this.drawCalls.push(n);for(e=0;e<this.batches.length;e++){var f=this.batches[e],d=f.style,p=d.texture.baseTexture;u!==!!d.native&&(c=(u=!!d.native)?P.lg.LINES:P.lg.TRIANGLES,a=null,o=8,t++),a!==p&&(a=p,p._batchEnabled!==t&&(8===o&&(t++,o=0,n.size>0&&((n=A.pop())||((n=new s.BatchDrawCall).texArray=new s.BatchTextureArray),this.drawCalls.push(n)),n.start=l,n.size=0,n.texArray.count=0,n.type=c),p.touched=1,p._batchEnabled=t,p._batchLocation=o,p.wrapMode=P.Nt.REPEAT,n.texArray.elements[n.texArray.count++]=p,o++)),n.size+=f.size,l+=f.size,h=p._batchLocation,this.addColors(r,d.color,d.alpha,f.attribSize,f.attribStart),this.addTextureIds(i,h,f.attribSize,f.attribStart)}s.BaseTexture._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,r=this.colors,i=this.textureIds,n=new ArrayBuffer(3*t.length*4),o=new Float32Array(n),s=new Uint32Array(n),a=0,h=0;h<t.length/2;h++)o[a++]=t[2*h],o[a++]=t[2*h+1],o[a++]=e[2*h],o[a++]=e[2*h+1],s[a++]=r[h],o[a++]=i[h];this._buffer.update(n),this._indexBuffer.update(this.indicesUint16)},e.prototype.processFill=function(t){t.holes.length?(this.processHoles(t.holes),c.triangulate(t,this)):w[t.type].triangulate(t,this)},e.prototype.processLine=function(t){_(t,this);for(var e=0;e<t.holes.length;e++)_(t.holes[e],this)},e.prototype.processHoles=function(t){for(var e=0;e<t.length;e++){var r=t[e];w[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}},e.prototype.calculateBounds=function(){var t=this._bounds,e=L,r=h.y3.IDENTITY;this._bounds.clear(),e.clear();for(var i=0;i<this.graphicsData.length;i++){var n=this.graphicsData[i],o=n.shape,s=n.type,a=n.lineStyle,u=n.matrix||h.y3.IDENTITY,c=0;if(a&&a.visible){var l=a.alignment;c=a.width,s===h.HS.POLY?O(o)?c*=1-l:c*=l:c*=Math.max(0,l)}if(r!==u&&(e.isEmpty()||(t.addBoundsMatrix(e,r),e.clear()),r=u),s===h.HS.RECT||s===h.HS.RREC){var f=o;e.addFramePad(f.x,f.y,f.x+f.width,f.y+f.height,c,c)}else if(s===h.HS.CIRC){var d=o;e.addFramePad(d.x,d.y,d.x,d.y,d.radius+c,d.radius+c)}else if(s===h.HS.ELIP){var p=o;e.addFramePad(p.x,p.y,p.x,p.y,p.width+c,p.height+c)}else{var y=o;t.addVerticesMatrix(r,y.points,0,y.points.length,c,c)}}e.isEmpty()||t.addBoundsMatrix(e,r),t.pad(this.boundsPadding,this.boundsPadding)},e.prototype.transformPoints=function(t,e){for(var r=0;r<t.length/2;r++){var i=t[2*r],n=t[2*r+1];t[2*r]=e.a*i+e.c*n+e.tx,t[2*r+1]=e.b*i+e.d*n+e.ty}},e.prototype.addColors=function(t,e,r,i,n){void 0===n&&(n=0);var o=(e>>16)+(65280&e)+((255&e)<<16),s=(0,u.premultiplyTint)(o,r);t.length=Math.max(t.length,n+i);for(var a=0;a<i;a++)t[n+a]=s},e.prototype.addTextureIds=function(t,e,r,i){void 0===i&&(i=0),t.length=Math.max(t.length,i+r);for(var n=0;n<r;n++)t[i+n]=e},e.prototype.addUvs=function(t,e,r,i,n,o){void 0===o&&(o=null);for(var s=0,a=e.length,h=r.frame;s<n;){var u=t[2*(i+s)],c=t[2*(i+s)+1];if(o){var l=o.a*u+o.c*c+o.tx;c=o.b*u+o.d*c+o.ty,u=l}s++,e.push(u/h.width,c/h.height)}var f=r.baseTexture;(h.width<f.width||h.height<f.height)&&this.adjustUvs(e,r,a,n)},e.prototype.adjustUvs=function(t,e,r,i){for(var n=e.baseTexture,o=1e-6,s=r+2*i,a=e.frame,h=a.width/n.width,u=a.height/n.height,c=a.x/a.width,l=a.y/a.height,f=Math.floor(t[r]+o),d=Math.floor(t[r+1]+o),p=r+2;p<s;p+=2)f=Math.min(f,Math.floor(t[p]+o)),d=Math.min(d,Math.floor(t[p+1]+o));c-=f,l-=d;for(p=r;p<s;p+=2)t[p]=(t[p]+c)*h,t[p+1]=(t[p+1]+l)*u},e.BATCHABLE_SIZE=100,e}(s.BatchGeometry),F=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),B=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.width=0,e.alignment=.5,e.native=!1,e.cap=n.BUTT,e.join=i.MITER,e.miterLimit=10,e}return F(e,t),e.prototype.clone=function(){var t=new e;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t},e.prototype.reset=function(){t.prototype.reset.call(this),this.color=0,this.alignment=.5,this.width=0,this.native=!1},e}(a),U=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),k=new Float32Array(3),j={},G=function(t){function e(e){void 0===e&&(e=null);var r=t.call(this)||this;return r.shader=null,r.pluginName="batch",r.currentPath=null,r.batches=[],r.batchTint=-1,r.batchDirty=-1,r.vertexData=null,r._fillStyle=new a,r._lineStyle=new B,r._matrix=null,r._holeMode=!1,r.state=s.State.for2d(),r._geometry=e||new N,r._geometry.refCount++,r._transformID=-1,r.tint=16777215,r.blendMode=P.T$.NORMAL,r}return U(e,t),Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return this.finishPoly(),new e(this._geometry)},Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fill",{get:function(){return this._fillStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"line",{get:function(){return this._lineStyle},enumerable:!1,configurable:!0}),e.prototype.lineStyle=function(t,e,r,i,n){return void 0===t&&(t=null),void 0===e&&(e=0),void 0===r&&(r=1),void 0===i&&(i=.5),void 0===n&&(n=!1),"number"==typeof t&&(t={width:t,color:e,alpha:r,alignment:i,native:n}),this.lineTextureStyle(t)},e.prototype.lineTextureStyle=function(t){t=Object.assign({width:0,texture:s.Texture.WHITE,color:t&&t.texture?16777215:0,alpha:1,matrix:null,alignment:.5,native:!1,cap:n.BUTT,join:i.MITER,miterLimit:10},t),this.currentPath&&this.startPoly();var e=t.width>0&&t.alpha>0;return e?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:e},t)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new h.mg,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new h.mg,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},e.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var r=this.currentPath.points,i=r[r.length-2],n=r[r.length-1];return i===t&&n===e||r.push(t,e),this},e.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},e.prototype.quadraticCurveTo=function(t,e,r,i){this._initCurve();var n=this.currentPath.points;return 0===n.length&&this.moveTo(0,0),T.curveTo(t,e,r,i,n),this},e.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._initCurve(),b.curveTo(t,e,r,i,n,o,this.currentPath.points),this},e.prototype.arcTo=function(t,e,r,i,n){this._initCurve(t,e);var o=this.currentPath.points,s=x.curveTo(t,e,r,i,n,o);if(s){var a=s.cx,h=s.cy,u=s.radius,c=s.startAngle,l=s.endAngle,f=s.anticlockwise;this.arc(a,h,u,c,l,f)}return this},e.prototype.arc=function(t,e,r,i,n,o){if(void 0===o&&(o=!1),i===n)return this;if(!o&&n<=i?n+=h._b:o&&i<=n&&(i+=h._b),0===n-i)return this;var s=t+Math.cos(i)*r,a=e+Math.sin(i)*r,u=this._geometry.closePointEps,c=this.currentPath?this.currentPath.points:null;if(c){var l=Math.abs(c[c.length-2]-s),f=Math.abs(c[c.length-1]-a);l<u&&f<u||c.push(s,a)}else this.moveTo(s,a),c=this.currentPath.points;return x.arc(s,a,t,e,r,i,n,o,c),this},e.prototype.beginFill=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=1),this.beginTextureFill({texture:s.Texture.WHITE,color:t,alpha:e})},e.prototype.beginTextureFill=function(t){t=Object.assign({texture:s.Texture.WHITE,color:16777215,alpha:1,matrix:null},t),this.currentPath&&this.startPoly();var e=t.alpha>0;return e?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:e},t)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,e,r,i){return this.drawShape(new h.Ae(t,e,r,i))},e.prototype.drawRoundedRect=function(t,e,r,i,n){return this.drawShape(new h.c9(t,e,r,i,n))},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new h.Cd(t,e,r))},e.prototype.drawEllipse=function(t,e,r,i){return this.drawShape(new h.Pj(t,e,r,i))},e.prototype.drawPolygon=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var i=!0,n=e[0];n.points?(i=n.closeStroke,t=n.points):t=Array.isArray(e[0])?e[0]:e;var o=new h.mg(t);return o.closeStroke=i,this.drawShape(o),this},e.prototype.drawShape=function(t){return this._holeMode?this._geometry.drawHole(t,this._matrix):this._geometry.drawShape(t,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this},e.prototype.clear=function(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this},e.prototype.isFastRect=function(){var t=this._geometry.graphicsData;return!(1!==t.length||t[0].shape.type!==h.HS.RECT||t[0].holes.length||t[0].lineStyle.visible&&t[0].lineStyle.width)},e.prototype._render=function(t){this.finishPoly();var e=this._geometry,r=t.context.supports.uint32Indices;e.updateBatches(r),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(t)):(t.batch.flush(),this._renderDirect(t))},e.prototype._populateBatches=function(){var t=this._geometry,e=this.blendMode,r=t.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=t.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(t.points);for(var i=0;i<r;i++){var n=t.batches[i],o=n.style.color,s=new Float32Array(this.vertexData.buffer,4*n.attribStart*2,2*n.attribSize),a=new Float32Array(t.uvsFloat32.buffer,4*n.attribStart*2,2*n.attribSize),h={vertexData:s,blendMode:e,indices:new Uint16Array(t.indicesUint16.buffer,2*n.start,n.size),uvs:a,_batchRGB:(0,u.hex2rgb)(o),_tintRGB:o,_texture:n.style.texture,alpha:n.style.alpha,worldAlpha:1};this.batches[i]=h}},e.prototype._renderBatched=function(t){if(this.batches.length){t.batch.setObjectRenderer(t.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(var e=0,r=this.batches.length;e<r;e++){var i=this.batches[e];i.worldAlpha=this.worldAlpha*i.alpha,t.plugins[this.pluginName].render(i)}}},e.prototype._renderDirect=function(t){var e=this._resolveDirectShader(t),r=this._geometry,i=this.tint,n=this.worldAlpha,o=e.uniforms,s=r.drawCalls;o.translationMatrix=this.transform.worldTransform,o.tint[0]=(i>>16&255)/255*n,o.tint[1]=(i>>8&255)/255*n,o.tint[2]=(255&i)/255*n,o.tint[3]=n,t.shader.bind(e),t.geometry.bind(r,e),t.state.set(this.state);for(var a=0,h=s.length;a<h;a++)this._renderDrawCallDirect(t,r.drawCalls[a])},e.prototype._renderDrawCallDirect=function(t,e){for(var r=e.texArray,i=e.type,n=e.size,o=e.start,s=r.count,a=0;a<s;a++)t.texture.bind(r.elements[a],a);t.geometry.draw(i,n,o)},e.prototype._resolveDirectShader=function(t){var e=this.shader,r=this.pluginName;if(!e){if(!j[r]){for(var i=t.plugins.batch.MAX_TEXTURES,n=new Int32Array(i),o=0;o<i;o++)n[o]=o;var a={tint:new Float32Array([1,1,1,1]),translationMatrix:new h.y3,default:s.UniformGroup.from({uSamplers:n},!0)},u=t.plugins[r]._shader.program;j[r]=new s.Shader(u,a)}e=j[r]}return e},e.prototype._calculateBounds=function(){this.finishPoly();var t=this._geometry;if(t.graphicsData.length){var e=t.bounds,r=e.minX,i=e.minY,n=e.maxX,o=e.maxY;this._bounds.addFrame(this.transform,r,i,n,o)}},e.prototype.containsPoint=function(t){return this.worldTransform.applyInverse(t,e._TEMP_POINT),this._geometry.containsPoint(e._TEMP_POINT)},e.prototype.calculateTints=function(){if(this.batchTint!==this.tint){this.batchTint=this.tint;for(var t=(0,u.hex2rgb)(this.tint,k),e=0;e<this.batches.length;e++){var r=this.batches[e],i=r._batchRGB,n=(t[0]*i[0]*255<<16)+(t[1]*i[1]*255<<8)+(0|t[2]*i[2]*255);r._tintRGB=(n>>16)+(65280&n)+((255&n)<<16)}}},e.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,h=this._geometry.points,u=this.vertexData,c=0,l=0;l<h.length;l+=2){var f=h[l],d=h[l+1];u[c++]=r*f+n*d+s,u[c++]=o*d+i*f+a}}},e.prototype.closePath=function(){var t=this.currentPath;return t&&(t.closeStroke=!0,this.finishPoly()),this},e.prototype.setMatrix=function(t){return this._matrix=t,this},e.prototype.beginHole=function(){return this.finishPoly(),this._holeMode=!0,this},e.prototype.endHole=function(){return this.finishPoly(),this._holeMode=!1,this},e.prototype.destroy=function(e){this._geometry.refCount--,0===this._geometry.refCount&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,t.prototype.destroy.call(this,e)},e._TEMP_POINT=new h.E9,e}(R.W2),X={buildPoly:c,buildCircle:l,buildRectangle:f,buildRoundedRectangle:y,buildLine:_,ArcUtils:x,BezierUtils:b,QuadraticUtils:T,BatchPart:E,FILL_COMMANDS:w,BATCH_POOL:S,DRAW_CALL_POOL:A}},1893:(t,e,r)=>{r.d(e,{Cd:()=>h,ZX:()=>s,Pj:()=>u,y3:()=>p,AB:()=>d,_b:()=>n,E9:()=>f,mg:()=>c,jl:()=>o,Ae:()=>a,c9:()=>l,HS:()=>i,wx:()=>E,Lv:()=>T});var i,n=2*Math.PI,o=180/Math.PI,s=Math.PI/180;!function(t){t[t.POLY=0]="POLY",t[t.RECT=1]="RECT",t[t.CIRC=2]="CIRC",t[t.ELIP=3]="ELIP",t[t.RREC=4]="RREC"}(i||(i={}));var a=function(){function t(t,e,r,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),this.x=Number(t),this.y=Number(e),this.width=Number(r),this.height=Number(n),this.type=i.RECT}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t,"EMPTY",{get:function(){return new t(0,0,0,0)},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e,this},t.prototype.fit=function(t){var e=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(r-e,0),this.y=i,this.height=Math.max(n-i,0),this},t.prototype.ceil=function(t,e){void 0===t&&(t=1),void 0===e&&(e=.001);var r=Math.ceil((this.x+this.width-e)*t)/t,i=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=r-this.x,this.height=i-this.y,this},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=r-e,this.y=i,this.height=n-i,this},t.prototype.toString=function(){return"[@pixi/math:Rectangle x=".concat(this.x," y=").concat(this.y," width=").concat(this.width," height=").concat(this.height,"]")},t}(),h=function(){function t(t,e,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),this.x=t,this.y=e,this.radius=r,this.type=i.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var r=this.radius*this.radius,i=this.x-t,n=this.y-e;return(i*=i)+(n*=n)<=r},t.prototype.getBounds=function(){return new a(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t.prototype.toString=function(){return"[@pixi/math:Circle x=".concat(this.x," y=").concat(this.y," radius=").concat(this.radius,"]")},t}(),u=function(){function t(t,e,r,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=r,this.height=n,this.type=i.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var r=(t-this.x)/this.width,i=(e-this.y)/this.height;return(r*=r)+(i*=i)<=1},t.prototype.getBounds=function(){return new a(this.x-this.width,this.y-this.height,this.width,this.height)},t.prototype.toString=function(){return"[@pixi/math:Ellipse x=".concat(this.x," y=").concat(this.y," width=").concat(this.width," height=").concat(this.height,"]")},t}(),c=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Array.isArray(t[0])?t[0]:t;if("number"!=typeof r[0]){for(var n=[],o=0,s=r.length;o<s;o++)n.push(r[o].x,r[o].y);r=n}this.points=r,this.type=i.POLY,this.closeStroke=!0}return t.prototype.clone=function(){var e=new t(this.points.slice());return e.closeStroke=this.closeStroke,e},t.prototype.contains=function(t,e){for(var r=!1,i=this.points.length/2,n=0,o=i-1;n<i;o=n++){var s=this.points[2*n],a=this.points[2*n+1],h=this.points[2*o],u=this.points[2*o+1];a>e!=u>e&&t<(e-a)/(u-a)*(h-s)+s&&(r=!r)}return r},t.prototype.toString=function(){return"[@pixi/math:Polygon"+"closeStroke=".concat(this.closeStroke)+"points=".concat(this.points.reduce((function(t,e){return"".concat(t,", ").concat(e)}),""),"]")},t}(),l=function(){function t(t,e,r,n,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===o&&(o=20),this.x=t,this.y=e,this.width=r,this.height=n,this.radius=o,this.type=i.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var r=t-(this.x+this.radius),i=e-(this.y+this.radius),n=this.radius*this.radius;if(r*r+i*i<=n)return!0;if((r=t-(this.x+this.width-this.radius))*r+i*i<=n)return!0;if(r*r+(i=e-(this.y+this.height-this.radius))*i<=n)return!0;if((r=t-(this.x+this.radius))*r+i*i<=n)return!0}return!1},t.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x=".concat(this.x," y=").concat(this.y)+"width=".concat(this.width," height=").concat(this.height," radius=").concat(this.radius,"]")},t}(),f=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this},t.prototype.toString=function(){return"[@pixi/math:Point x=".concat(this.x," y=").concat(this.y,"]")},t}(),d=function(){function t(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),this._x=r,this._y=i,this.cb=t,this.scope=e}return t.prototype.clone=function(e,r){return void 0===e&&(e=this.cb),void 0===r&&(r=this.scope),new t(e,r,this._x,this._y)},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._x===t&&this._y===e||(this._x=t,this._y=e,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},t.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=".concat(0," y=").concat(0," scope=").concat(this.scope,"]")},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}(),p=function(){function t(t,e,r,i,n,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),this.array=null,this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,r,i,n,o){return this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new f;var r=t.x,i=t.y;return e.x=this.a*r+this.c*i+this.tx,e.y=this.b*r+this.d*i+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new f;var r=1/(this.a*this.d+this.c*-this.b),i=t.x,n=t.y;return e.x=this.d*r*i+-this.c*r*n+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*n+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),i=this.a,n=this.c,o=this.tx;return this.a=i*e-this.b*r,this.b=i*r+this.b*e,this.c=n*e-this.d*r,this.d=n*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*r+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*r+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*n+this.ty,this},t.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return this.a=Math.cos(s+h)*n,this.b=Math.sin(s+h)*n,this.c=-Math.sin(s-a)*o,this.d=Math.cos(s-a)*o,this.tx=t-(r*this.a+i*this.c),this.ty=e-(r*this.b+i*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,r=this.b,i=this.c,o=this.d,s=t.pivot,a=-Math.atan2(-i,o),h=Math.atan2(r,e),u=Math.abs(a+h);return u<1e-5||Math.abs(n-u)<1e-5?(t.rotation=h,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=h),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(s.x*e+s.y*i),t.position.y=this.ty+(s.x*r+s.y*o),t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.tx,o=t*i-e*r;return this.a=i/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-i*n)/o,this.ty=-(t*this.ty-e*n)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},t.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},t.prototype.toString=function(){return"[@pixi/math:Matrix a=".concat(this.a," b=").concat(this.b," c=").concat(this.c," d=").concat(this.d," tx=").concat(this.tx," ty=").concat(this.ty,"]")},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t}(),y=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],m=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],v=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],_=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],g=[],x=[],b=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];g.push(e);for(var r=0;r<16;r++)for(var i=b(y[t]*y[r]+v[t]*m[r]),n=b(m[t]*y[r]+_[t]*m[r]),o=b(y[t]*v[r]+v[t]*_[r]),s=b(m[t]*v[r]+_[t]*_[r]),a=0;a<16;a++)if(y[a]===i&&m[a]===n&&v[a]===o&&_[a]===s){e.push(a);break}}for(t=0;t<16;t++){var h=new p;h.set(y[t],m[t],v[t],_[t],0,0),x.push(h)}}();var T={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return y[t]},uY:function(t){return m[t]},vX:function(t){return v[t]},vY:function(t){return _[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return g[t][e]},sub:function(t,e){return g[t][T.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?T.S:T.N:2*Math.abs(e)<=Math.abs(t)?t>0?T.E:T.W:e>0?t>0?T.SE:T.SW:t>0?T.NE:T.NW},matrixAppendRotationInv:function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var n=x[T.inv(e)];n.tx=r,n.ty=i,t.append(n)}},E=function(){function t(){this.worldTransform=new p,this.localTransform=new p,this.position=new d(this.onChange,this,0,0),this.scale=new d(this.onChange,this,1,1),this.pivot=new d(this.onChange,this,0,0),this.skew=new d(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.toString=function(){return"[@pixi/math:Transform "+"position=(".concat(this.position.x,", ").concat(this.position.y,") ")+"rotation=".concat(this.rotation," ")+"scale=(".concat(this.scale.x,", ").concat(this.scale.y,") ")+"skew=(".concat(this.skew.x,", ").concat(this.skew.y,") ")+"]"},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,i=this.worldTransform;i.a=e.a*r.a+e.b*r.c,i.b=e.a*r.b+e.b*r.d,i.c=e.c*r.a+e.d*r.c,i.d=e.c*r.b+e.d*r.d,i.tx=e.tx*r.a+e.ty*r.c+r.tx,i.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),t.IDENTITY=new t,t}()},6340:(t,e,r)=>{r.d(e,{AL:()=>m,IE:()=>l});var i,n=r(8141),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=function(t){function e(e,r,i,n){void 0===e&&(e=100),void 0===r&&(r=100),void 0===i&&(i=10),void 0===n&&(n=10);var o=t.call(this)||this;return o.segWidth=i,o.segHeight=n,o.width=e,o.height=r,o.build(),o}return o(e,t),e.prototype.build=function(){for(var t=this.segWidth*this.segHeight,e=[],r=[],i=[],n=this.segWidth-1,o=this.segHeight-1,s=this.width/n,a=this.height/o,h=0;h<t;h++){var u=h%this.segWidth,c=h/this.segWidth|0;e.push(u*s,c*a),r.push(u/n,c/o)}var l=n*o;for(h=0;h<l;h++){var f=h%n,d=h/n|0,p=d*this.segWidth+f,y=d*this.segWidth+f+1,m=(d+1)*this.segWidth+f,v=(d+1)*this.segWidth+f+1;i.push(p,y,m,y,v,m)}this.buffers[0].data=new Float32Array(e),this.buffers[1].data=new Float32Array(r),this.indexBuffer.data=new Uint16Array(i),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()},e}(n.xc),a=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),h=function(t){function e(e,r,i){void 0===e&&(e=200),void 0===i&&(i=0);var n=t.call(this,new Float32Array(4*r.length),new Float32Array(4*r.length),new Uint16Array(6*(r.length-1)))||this;return n.points=r,n._width=e,n.textureScale=i,n.build(),n}return a(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),e.prototype.build=function(){var t=this.points;if(t){var e=this.getBuffer("aVertexPosition"),r=this.getBuffer("aTextureCoord"),i=this.getIndex();if(!(t.length<1)){e.data.length/4!==t.length&&(e.data=new Float32Array(4*t.length),r.data=new Float32Array(4*t.length),i.data=new Uint16Array(6*(t.length-1)));var n=r.data,o=i.data;n[0]=0,n[1]=0,n[2]=0,n[3]=1;for(var s=0,a=t[0],h=this._width*this.textureScale,u=t.length,c=0;c<u;c++){var l=4*c;if(this.textureScale>0){var f=a.x-t[c].x,d=a.y-t[c].y,p=Math.sqrt(f*f+d*d);a=t[c],s+=p/h}else s=c/(u-1);n[l]=s,n[l+1]=0,n[l+2]=s,n[l+3]=1}var y=0;for(c=0;c<u-1;c++){l=2*c;o[y++]=l,o[y++]=l+1,o[y++]=l+2,o[y++]=l+2,o[y++]=l+1,o[y++]=l+3}r.update(),i.update(),this.updateVertices()}}},e.prototype.updateVertices=function(){var t=this.points;if(!(t.length<1)){for(var e,r=t[0],i=0,n=0,o=this.buffers[0].data,s=t.length,a=0;a<s;a++){var h=t[a],u=4*a;n=-((e=a<t.length-1?t[a+1]:h).x-r.x),i=e.y-r.y;var c=10*(1-a/(s-1));c>1&&(c=1);var l=Math.sqrt(i*i+n*n),f=this.textureScale>0?this.textureScale*this._width/2:this._width/2;i/=l,n/=l,i*=f,n*=f,o[u]=h.x+i,o[u+1]=h.y+n,o[u+2]=h.x-i,o[u+3]=h.y-n,r=h}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(n.xc),u=r(7659),c=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),l=function(t){function e(e,r,i){void 0===i&&(i=0);var o=this,s=new h(e.height,r,i),a=new n.rY(e);return i>0&&(e.baseTexture.wrapMode=u.Nt.REPEAT),(o=t.call(this,s,a)||this).autoUpdate=!0,o}return c(e,t),e.prototype._render=function(e){var r=this.geometry;(this.autoUpdate||r._width!==this.shader.texture.height)&&(r._width=this.shader.texture.height,r.update()),t.prototype._render.call(this,e)},e}(n.Kj),f=r(9043),d=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),p=function(t){function e(e,r,i){var o=this,a=new s(e.width,e.height,r,i),h=new n.rY(f.Texture.WHITE);return(o=t.call(this,a,h)||this).texture=e,o.autoResize=!0,o}return d(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry,e=this.shader.texture,r=e.width,i=e.height;!this.autoResize||t.width===r&&t.height===i||(t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build())},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},e.prototype.destroy=function(e){this.shader.texture.off("update",this.textureUpdated,this),t.prototype.destroy.call(this,e)},e}(n.Kj),y=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),m=function(t){function e(e,r,i,o,s){void 0===e&&(e=f.Texture.EMPTY);var a=this,h=new n.xc(r,i,o);h.getBuffer("aVertexPosition").static=!1;var u=new n.rY(e);return(a=t.call(this,h,u,null,s)||this).autoUpdate=!0,a}return y(e,t),Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)},e}(n.Kj),v=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();!function(t){function e(e,r,i,n,o){void 0===r&&(r=10),void 0===i&&(i=10),void 0===n&&(n=10),void 0===o&&(o=10);var s=t.call(this,f.Texture.WHITE,4,4)||this;return s._origWidth=e.orig.width,s._origHeight=e.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=r,s._rightWidth=n,s._topHeight=i,s._bottomHeight=o,s.texture=e,s}v(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._getMinScale();t[9]=t[11]=t[13]=t[15]=this._topHeight*e,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*e,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._getMinScale();t[2]=t[10]=t[18]=t[26]=this._leftWidth*e,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*e,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._getMinScale=function(){var t=this._leftWidth+this._rightWidth,e=this._width>t?1:this._width/t,r=this._topHeight+this._bottomHeight,i=this._height>r?1:this._height/r;return Math.min(e,i)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var r=1/this._origWidth,i=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=r*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-r*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}(p)},8141:(t,e,r)=>{r.d(e,{Kj:()=>d,wQ:()=>u,xc:()=>_,rY:()=>m});var i,n=r(9043),o=r(1893),s=r(7659),a=r(519),h=r(6787),u=function(){function t(t,e){this.uvBuffer=t,this.uvMatrix=e,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return t.prototype.update=function(t){if(t||this._bufferUpdateId!==this.uvBuffer._updateID||this._textureUpdateId!==this.uvMatrix._updateID){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var e=this.uvBuffer.data;this.data&&this.data.length===e.length||(this.data=new Float32Array(e.length)),this.uvMatrix.multiplyUvs(e,this.data),this._updateID++}},t}(),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),l=new o.E9,f=new o.mg,d=function(t){function e(e,r,i,o){void 0===o&&(o=s.lg.TRIANGLES);var a=t.call(this)||this;return a.geometry=e,a.shader=r,a.state=i||n.State.for2d(),a.drawMode=o,a.start=0,a.size=0,a.uvs=null,a.indices=null,a.vertexData=new Float32Array(1),a.vertexDirty=-1,a._transformID=-1,a._roundPixels=h.X.ROUND_PIXELS,a.batchUvs=null,a}return c(e,t),Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},set:function(t){this._geometry!==t&&(this._geometry&&(this._geometry.refCount--,0===this._geometry.refCount&&this._geometry.dispose()),this._geometry=t,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return this.shader},set:function(t){this.shader=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return"tint"in this.shader?this.shader.tint:null},set:function(t){this.shader.tint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return"texture"in this.shader?this.shader.texture:null},set:function(t){this.shader.texture=t},enumerable:!1,configurable:!0}),e.prototype._render=function(t){var r=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===s.lg.TRIANGLES&&r.length<2*e.BATCHABLE_SIZE?this._renderToBatch(t):this._renderDefault(t)},e.prototype._renderDefault=function(t){var e=this.shader;e.alpha=this.worldAlpha,e.update&&e.update(),t.batch.flush(),e.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),t.shader.bind(e),t.state.set(this.state),t.geometry.bind(this.geometry,e),t.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},e.prototype._renderToBatch=function(t){var e=this.geometry,r=this.shader;r.uvMatrix&&(r.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=e.indexBuffer.data,this._tintRGB=r._tintRGB,this._texture=r.texture;var i=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[i]),t.plugins[i].render(this)},e.prototype.calculateVertices=function(){var t=this.geometry.buffers[0],e=t.data,r=t._updateID;if(r!==this.vertexDirty||this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID,this.vertexData.length!==e.length&&(this.vertexData=new Float32Array(e.length));for(var i=this.transform.worldTransform,n=i.a,o=i.b,s=i.c,a=i.d,u=i.tx,c=i.ty,l=this.vertexData,f=0;f<l.length/2;f++){var d=e[2*f],p=e[2*f+1];l[2*f]=n*d+s*p+u,l[2*f+1]=o*d+a*p+c}if(this._roundPixels){var y=h.X.RESOLUTION;for(f=0;f<l.length;++f)l[f]=Math.round((l[f]*y|0)/y)}this.vertexDirty=r}},e.prototype.calculateUvs=function(){var t=this.geometry.buffers[1],e=this.shader;e.uvMatrix.isSimple?this.uvs=t.data:(this.batchUvs||(this.batchUvs=new u(t,e.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)},e.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,l);for(var e=this.geometry.getBuffer("aVertexPosition").data,r=f.points,i=this.geometry.getIndex().data,n=i.length,o=4===this.drawMode?3:1,s=0;s+2<n;s+=o){var a=2*i[s],h=2*i[s+1],u=2*i[s+2];if(r[0]=e[a],r[1]=e[a+1],r[2]=e[h],r[3]=e[h+1],r[4]=e[u],r[5]=e[u+1],f.contains(l.x,l.y))return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null},e.BATCHABLE_SIZE=100,e}(a.W2),p=r(2202);var y=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),m=function(t){function e(e,r){var i=this,s={uSampler:e,alpha:1,uTextureMatrix:o.y3.IDENTITY,uColor:new Float32Array([1,1,1,1])};return(r=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},r)).uniforms&&Object.assign(s,r.uniforms),(i=t.call(this,r.program||n.Program.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n"),s)||this)._colorDirty=!1,i.uvMatrix=new n.TextureMatrix(e),i.batchable=void 0===r.program,i.pluginName=r.pluginName,i.tint=r.tint,i.alpha=r.alpha,i}return y(e,t),Object.defineProperty(e.prototype,"texture",{get:function(){return this.uniforms.uSampler},set:function(t){this.uniforms.uSampler!==t&&(this.uniforms.uSampler=t,this.uvMatrix.texture=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){t!==this._tint&&(this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;(0,p.premultiplyTintToRgba)(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(n.Shader),v=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),_=function(t){function e(e,r,i){var o=t.call(this)||this,a=new n.Buffer(e),h=new n.Buffer(r,!0),u=new n.Buffer(i,!0,!0);return o.addAttribute("aVertexPosition",a,2,!1,s.vK.FLOAT).addAttribute("aTextureCoord",h,2,!1,s.vK.FLOAT).addIndex(u),o._updateId=-1,o}return v(e,t),Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(n.Geometry)},2846:(t,e,r)=>{r.d(e,{R:()=>i});var i=function(){function t(t){this.items=[],this._name=t,this._aliasCount=0}return t.prototype.emit=function(t,e,r,i,n,o,s,a){if(arguments.length>8)throw new Error("max arguments reached");var h=this,u=h.name,c=h.items;this._aliasCount++;for(var l=0,f=c.length;l<f;l++)c[l][u](t,e,r,i,n,o,s,a);return c===this.items&&this._aliasCount--,this},t.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();Object.defineProperties(i.prototype,{dispatch:{value:i.prototype.emit},run:{value:i.prototype.emit}})},6787:(t,e,r)=>{r.d(e,{t:()=>g,X:()=>b});var i=/iPhone/i,n=/iPod/i,o=/iPad/i,s=/\biOS-universal(?:.+)Mac\b/i,a=/\bAndroid(?:.+)Mobile\b/i,h=/Android/i,u=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,c=/Silk/i,l=/Windows Phone/i,f=/\bWindows(?:.+)ARM\b/i,d=/BlackBerry/i,p=/BB10/i,y=/Opera Mini/i,m=/\b(CriOS|Chrome)(?:.+)Mobile/i,v=/Mobile(?:.+)Firefox\b/i,_=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};var g=function(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var r=e.userAgent,g=r.split("[FBAN");void 0!==g[1]&&(r=g[0]),void 0!==(g=r.split("Twitter"))[1]&&(r=g[0]);var x=function(t){return function(e){return e.test(t)}}(r),b={apple:{phone:x(i)&&!x(l),ipod:x(n),tablet:!x(i)&&(x(o)||_(e))&&!x(l),universal:x(s),device:(x(i)||x(n)||x(o)||x(s)||_(e))&&!x(l)},amazon:{phone:x(u),tablet:!x(u)&&x(c),device:x(u)||x(c)},android:{phone:!x(l)&&x(u)||!x(l)&&x(a),tablet:!x(l)&&!x(u)&&!x(a)&&(x(c)||x(h)),device:!x(l)&&(x(u)||x(c)||x(a)||x(h))||x(/\bokhttp\b/i)},windows:{phone:x(l),tablet:x(f),device:x(l)||x(f)},other:{blackberry:x(d),blackberry10:x(p),opera:x(y),firefox:x(v),chrome:x(m),device:x(d)||x(p)||x(y)||x(v)||x(m)},any:!1,phone:!1,tablet:!1};return b.any=b.apple.device||b.android.device||b.windows.device||b.other.device,b.phone=b.apple.phone||b.android.phone||b.windows.phone,b.tablet=b.apple.tablet||b.android.tablet||b.windows.tablet,b}("undefined"==typeof window?navigator:window.navigator);var x=r(7659),b={MIPMAP_TEXTURES:x.WB.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:x.G5.NONE,SPRITE_MAX_TEXTURES:function(t){if(wx)return 4;var e=!0;if(g.tablet||g.phone){var r;if(g.apple.device)if(r=navigator.userAgent.match(/OS (\d+)_(\d+)?/))parseInt(r[1],10)<11&&(e=!1);if(g.android.device)if(r=navigator.userAgent.match(/Android\s([0-9.]*)/))parseInt(r[1],10)<7&&(e=!1)}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:x.UN.AUTO,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:x.Nt.CLAMP,SCALE_MODE:x.aH.LINEAR,PRECISION_VERTEX:x.cB.HIGH,PRECISION_FRAGMENT:g.apple.device?x.cB.HIGH:x.cB.MEDIUM,CAN_UPLOAD_SAME_BUFFER:!g.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1}},2064:(t,e,r)=>{r.d(e,{o:()=>u});var i,n=r(9043),o=r(1893),s=r(1961),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),h=new o.E9,u=function(t){function e(e,r,i){void 0===r&&(r=100),void 0===i&&(i=100);var s=t.call(this,e)||this;return s.tileTransform=new o.wx,s._width=r,s._height=i,s.uvMatrix=s.texture.uvMatrix||new n.TextureMatrix(e),s.pluginName="tilingSprite",s.uvRespectAnchor=!1,s}return a(e,t),Object.defineProperty(e.prototype,"clampMargin",{get:function(){return this.uvMatrix.clampMargin},set:function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileScale",{get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tilePosition",{get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copyFrom(t)},enumerable:!1,configurable:!0}),e.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},e.prototype._render=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,r=this._width*(1-this._anchor._x),i=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,r,i)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new o.Ae),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,h);var e=this._width,r=this._height,i=-e*this.anchor._x;if(h.x>=i&&h.x<i+e){var n=-r*this.anchor._y;if(h.y>=n&&h.y<n+r)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvMatrix=null},e.from=function(t,r){return new e(t instanceof n.Texture?t:n.Texture.from(t,r),r.width,r.height)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0}),e}(s.j),c=r(7659),l=r(2202);const f="#version 100\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n";var d=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),p=new o.y3;!function(t){function e(e){var r=t.call(this,e)||this;return e.runners.contextChange.add(r),r.quad=new n.QuadUv,r.state=n.State.for2d(),r}d(e,t),e.prototype.contextChange=function(){var t=this.renderer,e={globals:t.globalUniforms};this.simpleShader=n.Shader.from(f,"#version 100\n#define SHADER_NAME Tiling-Sprite-Simple-100\n\nprecision lowp float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 texSample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = texSample * uColor;\n}\n",e),this.shader=t.context.webGLVersion>1?n.Shader.from("#version 300 es\n#define SHADER_NAME Tiling-Sprite-300\n\nprecision lowp float;\n\nin vec2 aVertexPosition;\nin vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nout vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","#version 300 es\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nin vec2 vTextureCoord;\n\nout vec4 fragmentColor;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n vec2 unclamped = coord;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture(uSampler, coord, unclamped == coord ? 0.0f : -32.0f);// lod-bias very negative to force lod 0\n\n fragmentColor = texSample * uColor;\n}\n",e):n.Shader.from(f,"#version 100\n#ifdef GL_EXT_shader_texture_lod\n #extension GL_EXT_shader_texture_lod : enable\n#endif\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n vec2 unclamped = coord;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n #ifdef GL_EXT_shader_texture_lod\n vec4 texSample = unclamped == coord\n ? texture2D(uSampler, coord) \n : texture2DLodEXT(uSampler, coord, 0);\n #else\n vec4 texSample = texture2D(uSampler, coord);\n #endif\n\n gl_FragColor = texSample * uColor;\n}\n",e)},e.prototype.render=function(t){var e=this.renderer,r=this.quad,i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y);var n=t.uvRespectAnchor?t.anchor.x:0,o=t.uvRespectAnchor?t.anchor.y:0;(i=r.uvs)[0]=i[6]=-n,i[1]=i[3]=-o,i[2]=i[4]=1-n,i[5]=i[7]=1-o,r.invalidate();var s=t._texture,a=s.baseTexture,h=t.tileTransform.localTransform,u=t.uvMatrix,f=a.isPowerOfTwo&&s.frame.width===a.width&&s.frame.height===a.height;f&&(a._glTextures[e.CONTEXT_UID]?f=a.wrapMode!==c.Nt.CLAMP:a.wrapMode===c.Nt.CLAMP&&(a.wrapMode=c.Nt.REPEAT));var d=f?this.simpleShader:this.shader,y=s.width,m=s.height,v=t._width,_=t._height;p.set(h.a*y/v,h.b*y/_,h.c*m/v,h.d*m/_,h.tx/v,h.ty/_),p.invert(),f?p.prepend(u.mapCoord):(d.uniforms.uMapCoord=u.mapCoord.toArray(!0),d.uniforms.uClampFrame=u.uClampFrame,d.uniforms.uClampOffset=u.uClampOffset),d.uniforms.uTransform=p.toArray(!0),d.uniforms.uColor=(0,l.premultiplyTintToRgba)(t.tint,t.worldAlpha,d.uniforms.uColor,a.alphaMode),d.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),d.uniforms.uSampler=s,e.shader.bind(d),e.geometry.bind(r),this.state.blendMode=(0,l.correctBlendMode)(t.blendMode,a.alphaMode),e.state.set(this.state),e.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}(n.ObjectRenderer)},1961:(t,e,r)=>{r.d(e,{j:()=>d});var i,n=r(7659),o=r(9043),s=r(519),a=r(1893),h=r(6787),u=r(2202),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),l=new a.E9,f=new Uint16Array([0,1,2,0,2,3]),d=function(t){function e(e){var r=t.call(this)||this;return r._anchor=new a.AB(r._onAnchorUpdate,r,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),r._texture=null,r._width=0,r._height=0,r._tint=null,r._tintRGB=null,r.tint=16777215,r.blendMode=n.T$.NORMAL,r._cachedTint=16777215,r.uvs=null,r.texture=e||o.Texture.EMPTY,r.vertexData=new Float32Array(8),r.vertexTrimmedData=null,r._transformID=-1,r._textureID=-1,r._transformTrimmedID=-1,r._textureTrimmedID=-1,r.indices=f,r.pluginName="batch",r.isSprite=!0,r._roundPixels=h.X.ROUND_PIXELS,r}return c(e,t),e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=(0,u.sign)(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=(0,u.sign)(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){var t=this._texture;if(this._transformID!==this.transform._worldID||this._textureID!==t._updateID){this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;var e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,u=this.vertexData,c=t.trim,l=t.orig,f=this._anchor,d=0,p=0,y=0,m=0;if(c?(d=(p=c.x-f._x*l.width)+c.width,y=(m=c.y-f._y*l.height)+c.height):(d=(p=-f._x*l.width)+l.width,y=(m=-f._y*l.height)+l.height),u[0]=r*p+n*m+s,u[1]=o*m+i*p+a,u[2]=r*d+n*m+s,u[3]=o*m+i*d+a,u[4]=r*d+n*y+s,u[5]=o*y+i*d+a,u[6]=r*p+n*y+s,u[7]=o*y+i*p+a,this._roundPixels)for(var v=h.X.RESOLUTION,_=0;_<u.length;++_)u[_]=Math.round((u[_]*v|0)/v)}},e.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,r=t.orig,i=this._anchor,n=this.transform.worldTransform,o=n.a,s=n.b,a=n.c,h=n.d,u=n.tx,c=n.ty,l=-i._x*r.width,f=l+r.width,d=-i._y*r.height,p=d+r.height;e[0]=o*l+a*d+u,e[1]=h*d+s*l+c,e[2]=o*f+a*d+u,e[3]=h*d+s*f+c,e[4]=o*f+a*p+u,e[5]=h*p+s*f+c,e[6]=o*l+a*p+u,e[7]=h*p+s*l+c},e.prototype._render=function(t){this.calculateVertices(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new a.Ae),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,l);var e=this._texture.orig.width,r=this._texture.orig.height,i=-e*this.anchor.x,n=0;return l.x>=i&&l.x<i+e&&(n=-r*this.anchor.y,l.y>=n&&l.y<n+r)},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,"boolean"==typeof e?e:e&&e.texture){var r="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!r)}this._texture=null},e.from=function(t,r){return new e(t instanceof o.Texture?t:o.Texture.from(t,r))},Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=(0,u.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=(0,u.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchor",{get:function(){return this._anchor},set:function(t){this._anchor.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||o.Texture.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(s.W2)},2794:(t,e,r)=>{r.d(e,{xv:()=>b,_A:()=>y,pn:()=>l});var i,n=r(1961),o=r(9043),s=r(6787),a=r(1893),h=r(2202);!function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"}(i||(i={}));var u={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:i.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},c=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],l=function(){function t(t){this.styleID=0,this.reset(),p(this,t,t)}return t.prototype.clone=function(){var e={};return p(e,this,u),new t(e)},t.prototype.reset=function(){p(this,u,u)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var e=d(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(t){var e=d(t);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0})(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leading",{get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return this._stroke},set:function(t){var e=d(t);this._stroke!==e&&(this._stroke=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trim",{get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)},enumerable:!1,configurable:!0}),t.prototype.toFontString=function(){var t="number"==typeof this.fontSize?"".concat(this.fontSize,"px"):this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var r=e.length-1;r>=0;r--){var i=e[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&c.indexOf(i)<0&&(i='"'.concat(i,'"')),e[r]=i}return wx&&"undefined"!=typeof wx?this.fontStyle+" "+t+" "+e.join(","):"".concat(this.fontStyle," ").concat(this.fontVariant," ").concat(this.fontWeight," ").concat(t," ").concat(e.join(","))},t}();function f(t){return"number"==typeof t?(0,h.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function d(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=f(t[e]);return t}return f(t)}function p(t,e,r){for(var i in r)Array.isArray(e[i])?t[i]=e[i].slice():t[i]=e[i]}var y=function(){function t(t,e,r,i,n,o,s,a,h){this.text=t,this.style=e,this.width=r,this.height=i,this.lines=n,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=h}return t.measureText=function(e,r,i,n){void 0===n&&(n=t._canvas),i=null==i?r.wordWrap:i;var o=r.toFontString(),s=t.measureFont(o);0===s.fontSize&&(s.fontSize=r.fontSize,s.ascent=r.fontSize);var a=n.getContext("2d");a.font=o;for(var h=(i?t.wordWrap(e,r,n):e).split(/(?:\r\n|\r|\n)/),u=new Array(h.length),c=0,l=0;l<h.length;l++){var f=a.measureText(h[l]).width+(h[l].length-1)*r.letterSpacing;u[l]=f,c=Math.max(c,f)}var d=c+r.strokeThickness;r.dropShadow&&(d+=r.dropShadowDistance);var p=r.lineHeight||s.fontSize+r.strokeThickness,y=Math.max(p,s.fontSize+r.strokeThickness)+(h.length-1)*(p+r.leading);return r.dropShadow&&(y+=r.dropShadowDistance),new t(e,r,d,y,h,u,p+r.leading,c,s)},t.wordWrap=function(e,r,i){void 0===i&&(i=t._canvas);for(var n=i.getContext("2d"),o=0,s="",a="",h=Object.create(null),u=r.letterSpacing,c=r.whiteSpace,l=t.collapseSpaces(c),f=t.collapseNewlines(c),d=!l,p=r.wordWrapWidth+u,y=t.tokenize(e),m=0;m<y.length;m++){var v=y[m];if(t.isNewline(v)){if(!f){a+=t.addLine(s),d=!l,s="",o=0;continue}v=" "}if(l){var _=t.isBreakingSpace(v),g=t.isBreakingSpace(s[s.length-1]);if(_&&g)continue}var x=t.getFromCache(v,u,h,n);if(x>p)if(""!==s&&(a+=t.addLine(s),s="",o=0),t.canBreakWords(v,r.breakWords))for(var b=t.wordWrapSplit(v),T=0;T<b.length;T++){for(var E=b[T],w=1;b[T+w];){var S=b[T+w],A=E[E.length-1];if(t.canBreakChars(A,S,v,T,r.breakWords))break;E+=S,w++}T+=E.length-1;var O=t.getFromCache(E,u,h,n);O+o>p&&(a+=t.addLine(s),d=!1,s="",o=0),s+=E,o+=O}else{s.length>0&&(a+=t.addLine(s),s="",o=0);var I=m===y.length-1;a+=t.addLine(v,!I),d=!1,s="",o=0}else x+o>p&&(d=!1,a+=t.addLine(s),s="",o=0),(s.length>0||!t.isBreakingSpace(v)||d)&&(s+=v,o+=x)}return a+=t.addLine(s,!1)},t.addLine=function(e,r){return void 0===r&&(r=!0),e=t.trimRight(e),e=r?"".concat(e,"\n"):e},t.getFromCache=function(t,e,r,i){var n=r[t];if("number"!=typeof n){var o=t.length*e;n=i.measureText(t).width+o,r[t]=n}return n},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!=typeof e)return"";for(var r=e.length-1;r>=0;r--){var i=e[r];if(!t.isBreakingSpace(i))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"==typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e,r){return"string"==typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],i="";if("string"!=typeof e)return r;for(var n=0;n<e.length;n++){var o=e[n],s=e[n+1];t.isBreakingSpace(o,s)||t.isNewline(o)?(""!==i&&(r.push(i),i=""),r.push(o)):i+=o}return""!==i&&r.push(i),r},t.canBreakWords=function(t,e){return e},t.canBreakChars=function(t,e,r,i,n){return!0},t.wordWrapSplit=function(t){return t.split("")},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var r={ascent:0,descent:0,fontSize:0},i=t._canvas,n=t._context;n.font=e;var o=t.METRICS_STRING+t.BASELINE_SYMBOL,s=Math.ceil(n.measureText(o).width),a=Math.ceil(n.measureText(t.BASELINE_SYMBOL).width),h=Math.ceil(t.HEIGHT_MULTIPLIER*a);a=a*t.BASELINE_MULTIPLIER|0,i.width=s,i.height=h,n.fillStyle="#f00",n.fillRect(0,0,s,h),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(o,0,a);var u=n.getImageData(0,0,s,h).data,c=u.length,l=4*s,f=0,d=0,p=!1;for(f=0;f<a;++f){for(var y=0;y<l;y+=4)if(255!==u[d+y]){p=!0;break}if(p)break;d+=l}for(r.ascent=a-f,d=c-l,p=!1,f=h;f>a;--f){for(y=0;y<l;y+=4)if(255!==u[d+y]){p=!0;break}if(p)break;d-=l}return r.descent=f-a,r.fontSize=r.ascent+r.descent,t._fonts[e]=r,r},t.clearMetrics=function(e){void 0===e&&(e=""),e?delete t._fonts[e]:t._fonts={}},t}(),m=function(){try{var t=new OffscreenCanvas(0,0),e=t.getContext("2d");return e&&e.measureText?t:document&&document.createElement("canvas")}catch(t){return wx?wx.createCanvas("2d"):document&&document.createElement("canvas")}}();m.width=m.height=10,y._canvas=m,y._context=m.getContext("2d"),y._fonts={},y.METRICS_STRING="|ÉqÅ",y.BASELINE_SYMBOL="M",y.BASELINE_MULTIPLIER=1.4,y.HEIGHT_MULTIPLIER=2,y._newlines=[10,13],y._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var v,_=(v=function(t,e){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},v(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),g=wx.window.document,x={texture:!0,children:!1,baseTexture:!0},b=function(t){function e(e,r,i){var n=this,h=!1;i||(i=g.createElement("canvas"),h=!0),wx&&"undefined"!=typeof wx&&(i=wx.createCanvas("2d")),i.width=3,i.height=3;var u=o.Texture.from(i);return u.orig=new a.Ae,u.trim=new a.Ae,(n=t.call(this,u)||this)._ownCanvas=h,n.canvas=i,n.context=n.canvas.getContext("2d"),n._resolution=s.X.RESOLUTION,n._autoResolution=!0,n._text=null,n._style=null,n._styleListener=null,n._font="",n.text=e,n.style=r,n.localStyleID=-1,n}return _(e,t),e.prototype.updateText=function(t){var r=this._style;if(this.localStyleID!==r.styleID&&(this.dirty=!0,this.localStyleID=r.styleID),this.dirty||!t){this._font=this._style.toFontString();var i,n,o=this.context,s=y.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),a=s.width,u=s.height,c=s.lines,l=s.lineHeight,f=s.lineWidths,d=s.maxLineWidth,p=s.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,a)+2*r.padding)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,u)+2*r.padding)*this._resolution),o.scale(this._resolution,this._resolution),o.clearRect(0,0,this.canvas.width,this.canvas.height),o.font=this._font,o.lineWidth=r.strokeThickness,o.textBaseline=r.textBaseline,o.lineJoin=r.lineJoin,o.miterLimit=r.miterLimit;for(var m=r.dropShadow?2:1,v=0;v<m;++v){var _=r.dropShadow&&0===v,g=_?Math.ceil(Math.max(1,u)+2*r.padding):0,x=g*this._resolution;if(_){o.fillStyle="black",o.strokeStyle="black";var b=r.dropShadowColor,T=(0,h.hex2rgb)("number"==typeof b?b:(0,h.string2hex)(b));o.shadowColor="rgba(".concat(255*T[0],",").concat(255*T[1],",").concat(255*T[2],",").concat(r.dropShadowAlpha,")"),o.shadowBlur=r.dropShadowBlur,o.shadowOffsetX=Math.cos(r.dropShadowAngle)*r.dropShadowDistance,o.shadowOffsetY=Math.sin(r.dropShadowAngle)*r.dropShadowDistance+x}else o.fillStyle=this._generateFillStyle(r,c,s),o.strokeStyle=r.stroke,o.shadowColor="black",o.shadowBlur=0,o.shadowOffsetX=0,o.shadowOffsetY=0;var E=(l-p.fontSize)/2;(!e.nextLineHeightBehavior||l-p.fontSize<0)&&(E=0);for(var w=0;w<c.length;w++)i=r.strokeThickness/2,n=r.strokeThickness/2+w*l+p.ascent+E,"right"===r.align?i+=d-f[w]:"center"===r.align&&(i+=(d-f[w])/2),r.stroke&&r.strokeThickness&&this.drawLetterSpacing(c[w],i+r.padding,n+r.padding-g,!0),r.fill&&this.drawLetterSpacing(c[w],i+r.padding,n+r.padding-g)}this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,r,i){void 0===i&&(i=!1);var n=this._style.letterSpacing;if(0!==n)for(var o=e,s=Array.from?Array.from(t):t.split(""),a=this.context.measureText(t).width,h=0,u=0;u<s.length;++u){var c=s[u];i?this.context.strokeText(c,o,r):this.context.fillText(c,o,r),o+=a-(h=this.context.measureText(t.substring(u+1)).width)+n,a=h}else i?this.context.strokeText(t,e,r):this.context.fillText(t,e,r)},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=(0,h.trimCanvas)(t);e.data&&(t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0))}var r=this._texture,i=this._style,n=i.trim?0:i.padding,s=r.baseTexture;if(r.trim.width=r._frame.width=t.width/this._resolution,r.trim.height=r._frame.height=t.height/this._resolution,r.trim.x=-n,r.trim.y=-n,r.orig.width=r._frame.width-2*n,r.orig.height=r._frame.height-2*n,wx&&"undefined"!=typeof wx){var a=this.context.getImageData(0,0,r.trim.width,r.trim.height).data.buffer,u=new Uint8Array(a),c=o.Texture.fromBuffer(u,r.trim.width,r.trim.height);r.baseTexture=c.baseTexture}this._onTextureUpdate(),s.setRealSize(t.width,t.height,this._resolution),r.updateUvs(),this._recursivePostUpdateTransform(),this.dirty=!1},e.prototype._render=function(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._render.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._generateFillStyle=function(t,e,r){var n,o=t.fill;if(!Array.isArray(o))return o;if(1===o.length)return o[0];var s=t.dropShadow?t.dropShadowDistance:0,a=t.padding||0,h=this.canvas.width/this._resolution-s-2*a,u=this.canvas.height/this._resolution-s-2*a,c=o.slice(),l=t.fillGradientStops.slice();if(!l.length)for(var f=c.length+1,d=1;d<f;++d)l.push(d/f);if(c.unshift(o[0]),l.unshift(0),c.push(o[o.length-1]),l.push(1),t.fillGradientType===i.LINEAR_VERTICAL){n=this.context.createLinearGradient(h/2,a,h/2,u+a);var p=r.fontProperties.fontSize+t.strokeThickness;for(d=0;d<e.length;d++){var y=r.lineHeight*(d-1)+p,m=r.lineHeight*d,v=m;d>0&&y>m&&(v=(m+y)/2);var _=m+p,g=r.lineHeight*(d+1),x=_;d+1<e.length&&g<_&&(x=(_+g)/2);for(var b=(x-v)/u,T=0;T<c.length;T++){var E=0;E="number"==typeof l[T]?l[T]:T/c.length;var w=Math.min(1,Math.max(0,v/u+E*b));w=Number(w.toFixed(5)),n.addColorStop(w,c[T])}}}else{n=this.context.createLinearGradient(a,u/2,h+a,u/2);var S=c.length+1,A=1;for(d=0;d<c.length;d++){var O=void 0;O="number"==typeof l[d]?l[d]:A/S,n.addColorStop(O,c[d]),A++}}return n},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},x,e),t.prototype.destroy.call(this,e),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){this.updateText(!0);var e=(0,h.sign)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=(0,h.sign)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},set:function(t){t=t||{},this._style=t instanceof l?t:new l(t),this.localStyleID=-1,this.dirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(t){this._autoResolution=!1,this._resolution!==t&&(this._resolution=t,this.dirty=!0)},enumerable:!1,configurable:!0}),e.nextLineHeightBehavior=!1,e}(n.j)},2901:(t,e,r)=>{r.d(e,{vB:()=>a,Sb:()=>h,uF:()=>i});var i,n=r(6787);n.X.TARGET_FPMS=.06,function(t){t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY"}(i||(i={}));var o=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=0),void 0===i&&(i=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=e,this.priority=r,this.once=i}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),s=wx.window.performance,a=function(){function t(){var t=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new o(null,null,1/0),this.deltaMS=1/n.X.TARGET_FPMS,this.elapsedMS=1/n.X.TARGET_FPMS,this._tick=function(e){t._requestId=null;var r=wx.requestAnimationFrame;t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=r(t._tick)))}}return t.prototype._requestIfNeeded=function(){var t=wx.requestAnimationFrame;null===this._requestId&&this._head.next&&(this.lastTime=s.now(),this._lastFrame=this.lastTime,this._requestId=t(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(wx.cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e,r){return void 0===r&&(r=i.NORMAL),this._addListener(new o(t,e,r))},t.prototype.addOnce=function(t,e,r){return void 0===r&&(r=i.NORMAL),this._addListener(new o(t,e,r,!0))},t.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(t.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},t.prototype.update=function(t){var e;if(void 0===t&&(t=s.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){this._lastFrame=this._lastFrame||0;var r=t-this._lastFrame;if(r<this._minElapsedMS)return;this._lastFrame=t-r%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*n.X.TARGET_FPMS;for(var i=this._head,o=i.next;o;)o=o.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(t.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,e)/1e3,n.X.TARGET_FPMS);this._maxElapsedMS=1/r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(0===t)this._minElapsedMS=0;else{var e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"shared",{get:function(){if(!t._shared){var e=t._shared=new t;e.autoStart=!0,e._protected=!0}return t._shared},enumerable:!1,configurable:!0}),Object.defineProperty(t,"system",{get:function(){if(!t._system){var e=t._system=new t;e.autoStart=!0,e._protected=!0}return t._system},enumerable:!1,configurable:!0}),t}(),h=function(){function t(){}return t.init=function(t){var e=this;t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,i.LOW)},get:function(){return this._ticker}}),this.stop=function(){e._ticker.stop()},this.start=function(){e._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?a.shared:new a,t.autoStart&&this.start()},t.destroy=function(){if(this._ticker){var t=this._ticker;this.ticker=null,t.destroy()}},t}()},2202:(t,e,r)=>{r.r(e),r.d(e,{BaseTextureCache:()=>j,CanvasRenderTarget:()=>Y,DATA_URI:()=>W,EventEmitter:()=>o(),ProgramCache:()=>U,TextureCache:()=>k,clearTextureCache:()=>X,correctBlendMode:()=>b,createIndicesForQuads:()=>S,decomposeDataUri:()=>q,deprecation:()=>B,destroyTextureCache:()=>G,determineCrossOrigin:()=>$,earcut:()=>a(),getBufferType:()=>A,getResolutionOfUrl:()=>K,hex2rgb:()=>y,hex2string:()=>m,interleaveTypedArrays:()=>I,isMobile:()=>i.t,isPow2:()=>C,isWebGLSupported:()=>d,log2:()=>R,nextPow2:()=>P,premultiplyBlendMode:()=>x,premultiplyRgba:()=>T,premultiplyTint:()=>E,premultiplyTintToRgba:()=>w,removeItems:()=>M,rgb2hex:()=>_,sayHello:()=>f,sign:()=>D,skipHello:()=>l,string2hex:()=>v,trimCanvas:()=>V,uid:()=>N,url:()=>u});var i=r(6787),n=r(2338),o=r.n(n),s=r(4305),a=r.n(s),h=r(920),u={parse:h.Qc,format:h.WU,resolve:h.DB};i.X.RETINA_PREFIX=/@([0-9\.]+)x/,i.X.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var c;function l(){!0}function f(t){}function d(){return!(!wx||"undefined"==typeof wx)||(void 0===c&&(c=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:i.X.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!self.WebGLRenderingContext)return!1;var e=void 0;document&&(e=document.createElement("canvas")),wx&&"undefined"!=typeof wx&&(e=wx.createCanvas("webgl"));var r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),n=!(!r||!r.getContextAttributes().stencil);if(r){var o=r.getExtension("WEBGL_lose_context");o&&o.loseContext()}return r=null,n}catch(t){return!1}}()),c)}const p=JSON.parse('{"aliceblue":"#f0f8ff","antiquewhite":"#faebd7","aqua":"#00ffff","aquamarine":"#7fffd4","azure":"#f0ffff","beige":"#f5f5dc","bisque":"#ffe4c4","black":"#000000","blanchedalmond":"#ffebcd","blue":"#0000ff","blueviolet":"#8a2be2","brown":"#a52a2a","burlywood":"#deb887","cadetblue":"#5f9ea0","chartreuse":"#7fff00","chocolate":"#d2691e","coral":"#ff7f50","cornflowerblue":"#6495ed","cornsilk":"#fff8dc","crimson":"#dc143c","cyan":"#00ffff","darkblue":"#00008b","darkcyan":"#008b8b","darkgoldenrod":"#b8860b","darkgray":"#a9a9a9","darkgreen":"#006400","darkgrey":"#a9a9a9","darkkhaki":"#bdb76b","darkmagenta":"#8b008b","darkolivegreen":"#556b2f","darkorange":"#ff8c00","darkorchid":"#9932cc","darkred":"#8b0000","darksalmon":"#e9967a","darkseagreen":"#8fbc8f","darkslateblue":"#483d8b","darkslategray":"#2f4f4f","darkslategrey":"#2f4f4f","darkturquoise":"#00ced1","darkviolet":"#9400d3","deeppink":"#ff1493","deepskyblue":"#00bfff","dimgray":"#696969","dimgrey":"#696969","dodgerblue":"#1e90ff","firebrick":"#b22222","floralwhite":"#fffaf0","forestgreen":"#228b22","fuchsia":"#ff00ff","gainsboro":"#dcdcdc","ghostwhite":"#f8f8ff","goldenrod":"#daa520","gold":"#ffd700","gray":"#808080","green":"#008000","greenyellow":"#adff2f","grey":"#808080","honeydew":"#f0fff0","hotpink":"#ff69b4","indianred":"#cd5c5c","indigo":"#4b0082","ivory":"#fffff0","khaki":"#f0e68c","lavenderblush":"#fff0f5","lavender":"#e6e6fa","lawngreen":"#7cfc00","lemonchiffon":"#fffacd","lightblue":"#add8e6","lightcoral":"#f08080","lightcyan":"#e0ffff","lightgoldenrodyellow":"#fafad2","lightgray":"#d3d3d3","lightgreen":"#90ee90","lightgrey":"#d3d3d3","lightpink":"#ffb6c1","lightsalmon":"#ffa07a","lightseagreen":"#20b2aa","lightskyblue":"#87cefa","lightslategray":"#778899","lightslategrey":"#778899","lightsteelblue":"#b0c4de","lightyellow":"#ffffe0","lime":"#00ff00","limegreen":"#32cd32","linen":"#faf0e6","magenta":"#ff00ff","maroon":"#800000","mediumaquamarine":"#66cdaa","mediumblue":"#0000cd","mediumorchid":"#ba55d3","mediumpurple":"#9370db","mediumseagreen":"#3cb371","mediumslateblue":"#7b68ee","mediumspringgreen":"#00fa9a","mediumturquoise":"#48d1cc","mediumvioletred":"#c71585","midnightblue":"#191970","mintcream":"#f5fffa","mistyrose":"#ffe4e1","moccasin":"#ffe4b5","navajowhite":"#ffdead","navy":"#000080","oldlace":"#fdf5e6","olive":"#808000","olivedrab":"#6b8e23","orange":"#ffa500","orangered":"#ff4500","orchid":"#da70d6","palegoldenrod":"#eee8aa","palegreen":"#98fb98","paleturquoise":"#afeeee","palevioletred":"#db7093","papayawhip":"#ffefd5","peachpuff":"#ffdab9","peru":"#cd853f","pink":"#ffc0cb","plum":"#dda0dd","powderblue":"#b0e0e6","purple":"#800080","rebeccapurple":"#663399","red":"#ff0000","rosybrown":"#bc8f8f","royalblue":"#4169e1","saddlebrown":"#8b4513","salmon":"#fa8072","sandybrown":"#f4a460","seagreen":"#2e8b57","seashell":"#fff5ee","sienna":"#a0522d","silver":"#c0c0c0","skyblue":"#87ceeb","slateblue":"#6a5acd","slategray":"#708090","slategrey":"#708090","snow":"#fffafa","springgreen":"#00ff7f","steelblue":"#4682b4","tan":"#d2b48c","teal":"#008080","thistle":"#d8bfd8","tomato":"#ff6347","turquoise":"#40e0d0","violet":"#ee82ee","wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5","yellow":"#ffff00","yellowgreen":"#9acd32"}');function y(t,e){return void 0===e&&(e=[]),e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function m(t){var e=t.toString(16);return e="000000".substr(0,6-e.length)+e,"#".concat(e)}function v(t){return"string"==typeof t&&"#"===(t=p[t.toLowerCase()]||t)[0]&&(t=t.substr(1)),parseInt(t,16)}function _(t){return(255*t[0]<<16)+(255*t[1]<<8)+(255*t[2]|0)}var g=r(7659);var x=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[g.T$.NORMAL_NPM]=g.T$.NORMAL,t[g.T$.ADD_NPM]=g.T$.ADD,t[g.T$.SCREEN_NPM]=g.T$.SCREEN,e[g.T$.NORMAL]=g.T$.NORMAL_NPM,e[g.T$.ADD]=g.T$.ADD_NPM,e[g.T$.SCREEN]=g.T$.SCREEN_NPM;var i=[];return i.push(e),i.push(t),i}();function b(t,e){return x[e?1:0][t]}function T(t,e,r,i){return r=r||new Float32Array(4),i||void 0===i?(r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e):(r[0]=t[0],r[1]=t[1],r[2]=t[2]),r[3]=e,r}function E(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,i=t>>8&255,n=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((i=i*e+.5|0)<<8)+(n=n*e+.5|0)}function w(t,e,r,i){return(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(i||void 0===i)&&(r[0]*=e,r[1]*=e,r[2]*=e),r[3]=e,r}function S(t,e){void 0===e&&(e=null);var r=6*t;if((e=e||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got ".concat(e.length," and expected ").concat(r));for(var i=0,n=0;i<r;i+=6,n+=4)e[i+0]=n+0,e[i+1]=n+1,e[i+2]=n+2,e[i+3]=n+0,e[i+4]=n+2,e[i+5]=n+3;return e}function A(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}var O={Float32Array,Uint32Array,Int32Array,Uint8Array};function I(t,e){for(var r=0,i=0,n={},o=0;o<t.length;o++)i+=e[o],r+=t[o].length;var s=new ArrayBuffer(4*r),a=null,h=0;for(o=0;o<t.length;o++){var u=e[o],c=t[o],l=A(c);n[l]||(n[l]=new O[l](s)),a=n[l];for(var f=0;f<c.length;f++){a[(f/u|0)*i+h+f%u]=c[f]}h+=u}return new Float32Array(s)}function P(t){return t+=0===t?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function C(t){return!(t&t-1||!t)}function R(t){var e=(t>65535?1:0)<<4,r=((t>>>=e)>255?1:0)<<3;return e|=r,e|=r=((t>>>=r)>15?1:0)<<2,(e|=r=((t>>>=r)>3?1:0)<<1)|(t>>>=r)>>1}function M(t,e,r){var i,n=t.length;if(!(e>=n||0===r)){var o=n-(r=e+r>n?n-e:r);for(i=e;i<o;++i)t[i]=t[i+r];t.length=o}}function D(t){return 0===t?0:t<0?-1:1}var L=0;function N(){return++L}var F={};function B(t,e,r){if(void 0===r&&(r=3),!F[e]){var i=(new Error).stack;void 0===i?console.warn("PixiJS Deprecation Warning: ","".concat(e,"\nDeprecated since v").concat(t)):(i=i.split("\n").splice(r).join("\n"),console.warn("PixiJS Deprecation Warning: ","".concat(e,"\nDeprecated since v").concat(t)),console.warn(i)),F[e]=!0}}var U={},k=Object.create(null),j=Object.create(null);function G(){var t;for(t in k)k[t].destroy();for(t in j)j[t].destroy()}function X(){var t;for(t in k)delete k[t];for(t in j)delete j[t]}var H=wx.window.document,Y=function(){function t(t,e,r){this.canvas=H.createElement("canvas"),wx&&"undefined"!=typeof wx&&(this.canvas=wx.createCanvas("2d")),this.context=this.canvas.getContext("2d"),this.resolution=r||i.X.RESOLUTION,this.resize(t,e)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=Math.round(t*this.resolution),this.canvas.height=Math.round(e*this.resolution)},t.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(t.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=Math.round(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=Math.round(t)},enumerable:!1,configurable:!0}),t}();function V(t){var e,r,i,n=t.width,o=t.height,s=t.getContext("2d"),a=s.getImageData(0,0,n,o).data,h=a.length,u={top:null,left:null,right:null,bottom:null},c=null;for(e=0;e<h;e+=4)0!==a[e+3]&&(r=e/4%n,i=~~(e/4/n),null===u.top&&(u.top=i),(null===u.left||r<u.left)&&(u.left=r),(null===u.right||u.right<r)&&(u.right=r+1),(null===u.bottom||u.bottom<i)&&(u.bottom=i));return null!==u.top&&(n=u.right-u.left,o=u.bottom-u.top+1,c=s.getImageData(u.left,u.top,n,o)),{height:o,width:n,data:c}}var z,W=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function q(t){var e=W.exec(t);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]}}function $(t,e){if(void 0===e&&(e=self.location),0===t.indexOf("data:"))return"";e=e||self.location,z||(z=document&&document.createElement("a")),z.href=t;var r=u.parse(z.href),i=!r.port&&""===e.port||r.port===e.port;return r.hostname===e.hostname&&i&&r.protocol===e.protocol?"":"anonymous"}function K(t,e){var r=i.X.RETINA_PREFIX.exec(t);return r?parseFloat(r[1]):void 0!==e?e:1}},4305:t=>{function e(t,e,o){o=o||2;var s,a,h,l,f,p,y,m=e&&e.length,v=m?e[0]*o:t.length,_=r(t,0,v,o,!0),g=[];if(!_||_.next===_.prev)return g;if(m&&(_=function(t,e,n,o){var s,a,h,l=[];for(s=0,a=e.length;s<a;s++)(h=r(t,e[s]*o,s<a-1?e[s+1]*o:t.length,o,!1))===h.next&&(h.steiner=!0),l.push(d(h));for(l.sort(u),s=0;s<l.length;s++)c(l[s],n),n=i(n,n.next);return n}(t,e,_,o)),t.length>80*o){s=h=t[0],a=l=t[1];for(var x=o;x<v;x+=o)(f=t[x])<s&&(s=f),(p=t[x+1])<a&&(a=p),f>h&&(h=f),p>l&&(l=p);y=0!==(y=Math.max(h-s,l-a))?1/y:0}return n(_,g,o,s,a,y),g}function r(t,e,r,i,n){var o,s;if(n===A(t,e,r,i)>0)for(o=e;o<r;o+=i)s=E(o,t[o],t[o+1],s);else for(o=r-i;o>=e;o-=i)s=E(o,t[o],t[o+1],s);return s&&v(s,s.next)&&(w(s),s=s.next),s}function i(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!v(i,i.next)&&0!==m(i.prev,i,i.next))i=i.next;else{if(w(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function n(t,e,r,u,c,l,d){if(t){!d&&l&&function(t,e,r,i){var n=t;do{null===n.z&&(n.z=f(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,o,s,a,h,u=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,i=r,a=0,e=0;e<u&&(a++,i=i.nextZ);e++);for(h=u;a>0||h>0&&i;)0!==a&&(0===h||!i||r.z<=i.z)?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,h--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(s>1)}(n)}(t,u,c,l);for(var p,y,m=t;t.prev!==t.next;)if(p=t.prev,y=t.next,l?s(t,u,c,l):o(t))e.push(p.i/r),e.push(t.i/r),e.push(y.i/r),w(t),t=y.next,m=y.next;else if((t=y)===m){d?1===d?n(t=a(i(t),e,r),e,r,u,c,l,2):2===d&&h(t,e,r,u,c,l):n(i(t),e,r,u,c,l,1);break}}}function o(t){var e=t.prev,r=t,i=t.next;if(m(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(p(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&m(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function s(t,e,r,i){var n=t.prev,o=t,s=t.next;if(m(n,o,s)>=0)return!1;for(var a=n.x<o.x?n.x<s.x?n.x:s.x:o.x<s.x?o.x:s.x,h=n.y<o.y?n.y<s.y?n.y:s.y:o.y<s.y?o.y:s.y,u=n.x>o.x?n.x>s.x?n.x:s.x:o.x>s.x?o.x:s.x,c=n.y>o.y?n.y>s.y?n.y:s.y:o.y>s.y?o.y:s.y,l=f(a,h,e,r,i),d=f(u,c,e,r,i),y=t.prevZ,v=t.nextZ;y&&y.z>=l&&v&&v.z<=d;){if(y!==t.prev&&y!==t.next&&p(n.x,n.y,o.x,o.y,s.x,s.y,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,v!==t.prev&&v!==t.next&&p(n.x,n.y,o.x,o.y,s.x,s.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;y&&y.z>=l;){if(y!==t.prev&&y!==t.next&&p(n.x,n.y,o.x,o.y,s.x,s.y,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&p(n.x,n.y,o.x,o.y,s.x,s.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function a(t,e,r){var n=t;do{var o=n.prev,s=n.next.next;!v(o,s)&&_(o,n,n.next,s)&&b(o,s)&&b(s,o)&&(e.push(o.i/r),e.push(n.i/r),e.push(s.i/r),w(n),w(n.next),n=t=s),n=n.next}while(n!==t);return i(n)}function h(t,e,r,o,s,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&y(h,u)){var c=T(h,u);return h=i(h,h.next),c=i(c,c.next),n(h,e,r,o,s,a),void n(c,e,r,o,s,a)}u=u.next}h=h.next}while(h!==t)}function u(t,e){return t.x-e.x}function c(t,e){if(e=function(t,e){var r,i=e,n=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&a>s){if(s=a,a===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===s)return r;var h,u=r,c=r.x,f=r.y,d=1/0;i=r;do{n>=i.x&&i.x>=c&&n!==i.x&&p(o<f?n:s,o,c,f,o<f?s:n,o,i.x,i.y)&&(h=Math.abs(o-i.y)/(n-i.x),b(i,t)&&(h<d||h===d&&(i.x>r.x||i.x===r.x&&l(r,i)))&&(r=i,d=h)),i=i.next}while(i!==u);return r}(t,e),e){var r=T(e,t);i(e,e.next),i(r,r.next)}}function l(t,e){return m(t.prev,t,e.prev)<0&&m(e.next,t,t.next)<0}function f(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function p(t,e,r,i,n,o,s,a){return(n-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(i-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(n-s)*(i-a)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&_(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)&&(m(t.prev,t,e.prev)||m(t,e.prev,e))||v(t,e)&&m(t.prev,t,t.next)>0&&m(e.prev,e,e.next)>0)}function m(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function _(t,e,r,i){var n=x(m(t,e,r)),o=x(m(t,e,i)),s=x(m(r,i,t)),a=x(m(r,i,e));return n!==o&&s!==a||(!(0!==n||!g(t,r,e))||(!(0!==o||!g(t,i,e))||(!(0!==s||!g(r,t,i))||!(0!==a||!g(r,e,i)))))}function g(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function x(t){return t>0?1:t<0?-1:0}function b(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function T(t,e){var r=new S(t.i,t.x,t.y),i=new S(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function E(t,e,r,i){var n=new S(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function w(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,i){for(var n=0,o=e,s=r-i;o<r;o+=i)n+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return n}t.exports=e,t.exports.default=e,e.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,s=Math.abs(A(t,0,o,r));if(n)for(var a=0,h=e.length;a<h;a++){var u=e[a]*r,c=a<h-1?e[a+1]*r:t.length;s-=Math.abs(A(t,u,c,r))}var l=0;for(a=0;a<i.length;a+=3){var f=i[a]*r,d=i[a+1]*r,p=i[a+2]*r;l+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===s&&0===l?0:Math.abs((l-s)/s)},e.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[n][o][s]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r}},2338:t=>{var e=Object.prototype.hasOwnProperty,r="~";function i(){}function n(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,i,o,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new n(i,o||t,s),h=r?r+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,i,n=[];if(0===this._eventsCount)return n;for(i in t=this._events)e.call(t,i)&&n.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=r?r+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,s=new Array(o);n<o;n++)s[n]=i[n].fn;return s},a.prototype.listenerCount=function(t){var e=r?r+t:t,i=this._events[e];return i?i.fn?1:i.length:0},a.prototype.emit=function(t,e,i,n,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var h,u,c=this._events[a],l=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,i),!0;case 4:return c.fn.call(c.context,e,i,n),!0;case 5:return c.fn.call(c.context,e,i,n,o),!0;case 6:return c.fn.call(c.context,e,i,n,o,s),!0}for(u=1,h=new Array(l-1);u<l;u++)h[u-1]=arguments[u];c.fn.apply(c.context,h)}else{var f,d=c.length;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,i);break;case 4:c[u].fn.call(c[u].context,e,i,n);break;default:if(!h)for(f=1,h=new Array(l-1);f<l;f++)h[f-1]=arguments[f];c[u].fn.apply(c[u].context,h)}}return!0},a.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,i,n){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||n&&!a.once||i&&a.context!==i||s(this,o);else{for(var h=0,u=[],c=a.length;h<c;h++)(a[h].fn!==e||n&&!a[h].once||i&&a[h].context!==i)&&u.push(a[h]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,t.exports=a},2520:t=>{function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,r,i,n){r=r||"&",i=i||"=";var o={};if("string"!=typeof t||0===t.length)return o;var s=/\+/g;t=t.split(r);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var h=t.length;a>0&&h>a&&(h=a);for(var u=0;u<h;++u){var c,l,f,d,p=t[u].replace(s,"%20"),y=p.indexOf(i);y>=0?(c=p.substr(0,y),l=p.substr(y+1)):(c=p,l=""),f=decodeURIComponent(c),d=decodeURIComponent(l),e(o,f)?Array.isArray(o[f])?o[f].push(d):o[f]=[o[f],d]:o[f]=d}return o}},2418:t=>{var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,r,i,n){return r=r||"&",i=i||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(n){var o=encodeURIComponent(e(n))+i;return Array.isArray(t[n])?t[n].map((function(t){return o+encodeURIComponent(e(t))})).join(r):o+encodeURIComponent(e(t[n]))})).join(r):n?encodeURIComponent(e(n))+i+encodeURIComponent(e(t)):""}},2072:(t,e,r)=>{e.decode=e.parse=r(2520),e.encode=e.stringify=r(2418)},2065:function(t,e,r){var i;/*! https://mths.be/punycode v1.3.2 by @mathias */t=r.nmd(t),function(n){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,h=36,u=/^xn--/,c=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function y(t){throw RangeError(f[t])}function m(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function v(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+m((t=t.replace(l,".")).split("."),e).join(".")}function _(t){for(var e,r,i=[],n=0,o=t.length;n<o;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<o?56320==(64512&(r=t.charCodeAt(n++)))?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--):i.push(e);return i}function g(t){return m(t,(function(t){var e="";return t>65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function b(t,e,r){var i=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;i+=h)t=d(t/35);return d(i+36*t/(t+38))}function T(t){var e,r,i,n,o,s,u,c,l,f,p,m=[],v=t.length,_=0,x=128,T=72;for((r=t.lastIndexOf("-"))<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&y("not-basic"),m.push(t.charCodeAt(i));for(n=r>0?r+1:0;n<v;){for(o=_,s=1,u=h;n>=v&&y("invalid-input"),((c=(p=t.charCodeAt(n++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:h)>=h||c>d((a-_)/s))&&y("overflow"),_+=c*s,!(c<(l=u<=T?1:u>=T+26?26:u-T));u+=h)s>d(a/(f=h-l))&&y("overflow"),s*=f;T=b(_-o,e=m.length+1,0==o),d(_/e)>a-x&&y("overflow"),x+=d(_/e),_%=e,m.splice(_++,0,x)}return g(m)}function E(t){var e,r,i,n,o,s,u,c,l,f,m,v,g,T,E,w=[];for(v=(t=_(t)).length,e=128,r=0,o=72,s=0;s<v;++s)(m=t[s])<128&&w.push(p(m));for(i=n=w.length,n&&w.push("-");i<v;){for(u=a,s=0;s<v;++s)(m=t[s])>=e&&m<u&&(u=m);for(u-e>d((a-r)/(g=i+1))&&y("overflow"),r+=(u-e)*g,e=u,s=0;s<v;++s)if((m=t[s])<e&&++r>a&&y("overflow"),m==e){for(c=r,l=h;!(c<(f=l<=o?1:l>=o+26?26:l-o));l+=h)E=c-f,T=h-f,w.push(p(x(f+E%T,0))),c=d(E/T);w.push(p(x(c,0))),o=b(r,g,i==n),r=0,++i}++r,++e}return w.join("")}s={version:"1.3.2",ucs2:{decode:_,encode:g},decode:T,encode:E,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+E(t):t}))},toUnicode:function(t){return v(t,(function(t){return u.test(t)?T(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return s}.call(e,r,e,t))||(t.exports=i)}()},920:(t,e,r)=>{var i=r(2065),n=r(884);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.Qc=g,e.DB=function(t,e){return g(t,!1,!0).resolve(e)},e.WU=function(t){n.isString(t)&&(t=g(t));return t instanceof o?t.format():o.prototype.format.call(t)};var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),l=["%","/","?",";","#"].concat(c),f=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=r(2072);function g(t,e,r){if(t&&n.isObject(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,r),i}o.prototype.parse=function(t,e,r){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",u=t.split(a);u[0]=u[0].replace(/\\/g,"/");var g=t=u.join(a);if(g=g.trim(),!r&&1===t.split("#").length){var x=h.exec(g);if(x)return this.path=g,this.href=g,this.pathname=x[1],x[2]?(this.search=x[2],this.query=e?_.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var b=s.exec(g);if(b){var T=(b=b[0]).toLowerCase();this.protocol=T,g=g.substr(b.length)}if(r||b||g.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===g.substr(0,2);!E||b&&m[b]||(g=g.substr(2),this.slashes=!0)}if(!m[b]&&(E||b&&!v[b])){for(var w,S,A=-1,O=0;O<f.length;O++){-1!==(I=g.indexOf(f[O]))&&(-1===A||I<A)&&(A=I)}-1!==(S=-1===A?g.lastIndexOf("@"):g.lastIndexOf("@",A))&&(w=g.slice(0,S),g=g.slice(S+1),this.auth=decodeURIComponent(w)),A=-1;for(O=0;O<l.length;O++){var I;-1!==(I=g.indexOf(l[O]))&&(-1===A||I<A)&&(A=I)}-1===A&&(A=g.length),this.host=g.slice(0,A),g=g.slice(A),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var C=this.hostname.split(/\./),R=(O=0,C.length);O<R;O++){var M=C[O];if(M&&!M.match(d)){for(var D="",L=0,N=M.length;L<N;L++)M.charCodeAt(L)>127?D+="x":D+=M[L];if(!D.match(d)){var F=C.slice(0,O),B=C.slice(O+1),U=M.match(p);U&&(F.push(U[1]),B.unshift(U[2])),B.length&&(g="/"+B.join(".")+g),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=i.toASCII(this.hostname));var k=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+k,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!y[T])for(O=0,R=c.length;O<R;O++){var G=c[O];if(-1!==g.indexOf(G)){var X=encodeURIComponent(G);X===G&&(X=escape(G)),g=g.split(G).join(X)}}var H=g.indexOf("#");-1!==H&&(this.hash=g.substr(H),g=g.slice(0,H));var Y=g.indexOf("?");if(-1!==Y?(this.search=g.substr(Y),this.query=g.substr(Y+1),e&&(this.query=_.parse(this.query)),g=g.slice(0,Y)):e&&(this.search="",this.query={}),g&&(this.pathname=g),v[T]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var V=this.search||"";this.path=k+V}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(s=_.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||v[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(t){return this.resolveObject(g(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(n.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,i=Object.keys(this),s=0;s<i.length;s++){var a=i[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var h=Object.keys(t),u=0;u<h.length;u++){var c=h[u];"protocol"!==c&&(r[c]=t[c])}return v[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!v[t.protocol]){for(var l=Object.keys(t),f=0;f<l.length;f++){var d=l[f];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||m[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var y=r.pathname||"",_=r.search||"";r.path=y+_}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var g=r.pathname&&"/"===r.pathname.charAt(0),x=t.host||t.pathname&&"/"===t.pathname.charAt(0),b=x||g||r.host&&t.pathname,T=b,E=r.pathname&&r.pathname.split("/")||[],w=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!v[r.protocol]);if(w&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),b=b&&(""===p[0]||""===E[0])),x)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),r.search=t.search,r.query=t.query;else if(!n.isNullOrUndefined(t.search)){if(w)r.hostname=r.host=E.shift(),(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift());return r.search=t.search,r.query=t.query,n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=E.slice(-1)[0],A=(r.host||t.host||E.length>1)&&("."===S||".."===S)||""===S,O=0,I=E.length;I>=0;I--)"."===(S=E[I])?E.splice(I,1):".."===S?(E.splice(I,1),O++):O&&(E.splice(I,1),O--);if(!b&&!T)for(;O--;O)E.unshift("..");!b||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),A&&"/"!==E.join("/").substr(-1)&&E.push("");var P,C=""===E[0]||E[0]&&"/"===E[0].charAt(0);w&&(r.hostname=r.host=C?"":E.length?E.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift()));return(b=b||r.host&&E.length)&&!C&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},884:t=>{t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}}}]);
1
+ var self = wx;(self.webpackChunktencentcloud_webar=self.webpackChunktencentcloud_webar||[]).push([[647],{1206:(t,e,r)=>{r.d(e,{iw:()=>ut.iw,jd:()=>h.BaseRenderTexture,VL:()=>h.BaseTexture,W2:()=>a.W2,wn:()=>h.Filter,wG:()=>h.Geometry,TC:()=>k.TC,aN:()=>L,KI:()=>ut.WB,Kj:()=>wt.Kj,TI:()=>h.RenderTexture,Th:()=>h.Renderer,aH:()=>ut.aH,ex:()=>h.Shader,jy:()=>yt.j,c2:()=>it,xE:()=>h.Texture,vB:()=>j.vB,Ep:()=>n,U1:()=>o,Xd:()=>U.X,P6:()=>s});var i=r(1615);function n(){wx.window=null}function o(){var t={};console.log("refreshContext");var e=wx.createOffscreenCanvas({type:"webgl",width:200,height:200}),r=wx.createOffscreenCanvas({type:"2d",width:200,height:200});wx.createCanvas=function(t){return"2d"===t?r:e},(0,i.Z)(t),t.HTMLImageElement=e.createImage;var n=Date.now();t.performance={now:function(){return Date.now()-n}};var o=t;o.document,o.navigator,o.HTMLVideoElement,o.HTMLCanvasElement,o.HTMLImageElement,o.Image,o.XMLHttpRequest,o.TouchEvent,o.MouseEvent,o.performance,o.requestAnimationFrame,o.cancelAnimationFrame;wx.window=t}o();var s=r(8306),a=r(519),h=r(9043),u=function(){function t(e){var r=this;this.stage=new a.W2,e=Object.assign({forceCanvas:!1},e),this.renderer=(0,h.autoDetectRenderer)(e),t._plugins.forEach((function(t){t.init.call(r,e)}))}return t.registerPlugin=function(e){t._plugins.push(e)},t.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(t.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),t.prototype.destroy=function(e,r){var i=this,n=t._plugins.slice(0);n.reverse(),n.forEach((function(t){t.destroy.call(i)})),this.stage.destroy(r),this.stage=null,this.renderer.destroy(e),this.renderer=null},t._plugins=[],t}(),c=wx.window,l=function(){function t(){}return t.init=function(t){var e=this;Object.defineProperty(this,"resizeTo",{set:function(t){c.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(c.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){e._resizeTo&&(e.cancelResize(),e._resizeId=requestAnimationFrame((function(){return e.resize()})))},this.cancelResize=function(){e._resizeId&&(cancelAnimationFrame(e._resizeId),e._resizeId=null)},this.resize=function(){if(e._resizeTo){var t,r;if(e.cancelResize(),e._resizeTo===c)t=c.innerWidth,r=c.innerHeight;else{var i=e._resizeTo;t=i.clientWidth,r=i.clientHeight}e.renderer.resize(t,r)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null},t.destroy=function(){c.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},t}();u.registerPlugin(l);var f=r(1893),d=new f.Ae,p=function(){function t(t){this.renderer=t}return t.prototype.image=function(t,e,r){var i=new Image;return i.src=this.base64(t,e,r),i},t.prototype.base64=function(t,e,r){return this.canvas(t).toDataURL(e,r)},t.prototype.canvas=function(e){var r,i,n,o=this.renderer,a=!1,u=!1;e&&(e instanceof h.RenderTexture?n=e:(n=this.renderer.generateTexture(e),u=!0)),n?(r=n.baseTexture.resolution,i=n.frame,a=!1,o.renderTexture.bind(n)):(r=this.renderer.resolution,a=!0,(i=d).width=this.renderer.width,i.height=this.renderer.height,o.renderTexture.bind(null));var c=Math.floor(i.width*r+1e-4),l=Math.floor(i.height*r+1e-4),f=new s.qU(c,l,1),p=new Uint8Array(4*c*l),y=o.gl;y.readPixels(i.x*r,i.y*r,c,l,y.RGBA,y.UNSIGNED_BYTE,p);var m=f.context.getImageData(0,0,c,l);if(t.arrayPostDivide(p,m.data),f.context.putImageData(m,0,0),a){var v=new s.qU(f.width,f.height,1);v.context.scale(1,-1),v.context.drawImage(f.canvas,0,-l),f.destroy(),f=v}return u&&n.destroy(!0),f.canvas},t.prototype.pixels=function(e){var r,i,n,o=this.renderer,s=!1;e&&(e instanceof h.RenderTexture?n=e:(n=this.renderer.generateTexture(e),s=!0)),n?(r=n.baseTexture.resolution,i=n.frame,o.renderTexture.bind(n)):(r=o.resolution,(i=d).width=o.width,i.height=o.height,o.renderTexture.bind(null));var a=i.width*r,u=i.height*r,c=new Uint8Array(4*a*u),l=o.gl;return l.readPixels(i.x*r,i.y*r,a,u,l.RGBA,l.UNSIGNED_BYTE,c),s&&n.destroy(!0),t.arrayPostDivide(c,c),c},t.prototype.destroy=function(){this.renderer=null},t.arrayPostDivide=function(t,e){for(var r=0;r<t.length;r+=4){var i=e[r+3]=t[r+3];0!==i?(e[r]=Math.round(Math.min(255*t[r]/i,255)),e[r+1]=Math.round(Math.min(255*t[r+1]/i,255)),e[r+2]=Math.round(Math.min(255*t[r+2]/i,255))):(e[r]=t[r],e[r+1]=t[r+1],e[r+2]=t[r+2])}},t}(),y=function(){function t(t,e,r){void 0===e&&(e=!1),this._fn=t,this._once=e,this._thisArg=r,this._next=this._prev=this._owner=null}return t.prototype.detach=function(){return null!==this._owner&&(this._owner.detach(this),!0)},t}();function m(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var v=function(){function t(){this._head=this._tail=void 0}return t.prototype.handlers=function(t){void 0===t&&(t=!1);var e=this._head;if(t)return!!e;for(var r=[];e;)r.push(e),e=e._next;return r},t.prototype.has=function(t){if(!(t instanceof y))throw new Error("MiniSignal#has(): First arg must be a SignalBinding object.");return t._owner===this},t.prototype.dispatch=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this._head;if(!r)return!1;for(;r;)r._once&&this.detach(r),r._fn.apply(r._thisArg,t),r=r._next;return!0},t.prototype.add=function(t,e){if(void 0===e&&(e=null),"function"!=typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return m(this,new y(t,!1,e))},t.prototype.once=function(t,e){if(void 0===e&&(e=null),"function"!=typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return m(this,new y(t,!0,e))},t.prototype.detach=function(t){if(!(t instanceof y))throw new Error("MiniSignal#detach(): First arg must be a SignalBinding object.");return t._owner!==this||(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null),this},t.prototype.detachAll=function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this},t}();function _(t,e){e=e||{};for(var r={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},i=r.parser[e.strictMode?"strict":"loose"].exec(t),n={},o=14;o--;)n[r.key[o]]=i[o]||"";return n[r.q.name]={},n[r.key[12]].replace(r.q.parser,(function(t,e,i){e&&(n[r.q.name][e]=i)})),n}var g=wx.window,x=g.document,b=g,T=b.Image,E=null;function w(){}function S(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function A(t){return t.toString().replace("object ","")}var O=function(){function t(e,r,i){if(this._dequeue=w,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=null,this._boundOnError=null,this._boundOnProgress=null,this._boundOnTimeout=null,this._boundXhrOnError=null,this._boundXhrOnTimeout=null,this._boundXhrOnAbort=null,this._boundXhrOnLoad=null,"string"!=typeof e||"string"!=typeof r)throw new Error("Both name and url are required for constructing a resource.");i=i||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===r.indexOf("data:")),this.name=e,this.url=r,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===i.crossOrigin?"anonymous":i.crossOrigin,this.timeout=i.timeout||0,this.loadType=i.loadType||this._determineLoadType(),this.xhrType=i.xhrType,this.metadata=i.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=w,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new v,this.onProgress=new v,this.onComplete=new v,this.onAfterMiddleware=new v}return t.setExtensionLoadType=function(e,r){S(t._loadTypeMap,e,r)},t.setExtensionXhrType=function(e,r){S(t._xhrTypeMap,e,r)},Object.defineProperty(t.prototype,"isDataUrl",{get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isComplete",{get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLoading",{get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)},enumerable:!1,configurable:!0}),t.prototype.complete=function(){this._clearEvents(),this._finish()},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this._finish()}},t.prototype.load=function(e){var r=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout((function(){return e(r)}),1);else switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:this._loadXhr()}},t.prototype._hasFlag=function(t){return 0!=(this._flags&t)},t.prototype._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},t.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},t.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype._loadElement=function(t){var e=this;this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==b.Image?this.data=new T:this.data=void 0!==x?x.createElement(t):new OffscreenCanvas(1,1),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.data.onerror=this._boundOnError,this.data.onload=function(){e._boundComplete()},this.data.onprogress=this._boundOnProgress,this.metadata.skipSource||(this.data.src=this.url),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},t.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==b.Audio?this.data=new Audio:this.data=x.createElement(t),null!==this.data){if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,r=0;r<this.url.length;++r)this.data.appendChild(this._createSource(t,this.url[r],Array.isArray(e)?e[r]:e));else{e=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(e)?e[0]:e))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: ".concat(t))},t.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),e.timeout=this.timeout,this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},t.prototype._loadXdr=function(){},t.prototype._createSource=function(t,e,r){r||(r="".concat(t,"/").concat(this._getExtension(e)));var i=x.createElement("source");return i.src=e,i.type=r,i},t.prototype._onError=function(t){this.abort("Failed to load element using: ".concat(t.target.nodeName))},t.prototype._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},t.prototype._onTimeout=function(){this.abort("Load timed out.")},t.prototype._xhrOnError=function(){var t=this.xhr;this.abort("".concat(A(t)," Request failed. Status: ").concat(t.status,', text: "').concat(t.statusText,'"'))},t.prototype._xhrOnTimeout=function(){var t=this.xhr;this.abort("".concat(A(t)," Request timed out."))},t.prototype._xhrOnAbort=function(){var t=this.xhr;this.abort("".concat(A(t)," Request was aborted by the user."))},t.prototype._xhrOnLoad=function(){var e=this.xhr,r="",i=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(r=e.responseText),0===i&&(r.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?i=200:1223===i&&(i=204),2===(i/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=r,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(r),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: ".concat(t))}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(b.DOMParser){var n=new DOMParser;this.data=n.parseFromString(r,"text/xml")}else{var o=x.createElement("div");o.innerHTML=r,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: ".concat(t))}else this.data=e.response||r;this.complete()}else this.abort("[".concat(e.status,"] ").concat(e.statusText,": ").concat(e.responseURL))},t.prototype._determineCrossOrigin=function(t,e){if(void 0===x)return"anonymous";if(0===t.indexOf("data:"))return"";if(b.origin!==b.location.origin)return"anonymous";e=e||b.location,E||(E=x.createElement("a")),E.href=t;var r=_(E.href,{strictMode:!0}),i=!r.port&&""===e.port||r.port===e.port,n=r.protocol?"".concat(r.protocol,":"):"";return r.host===e.hostname&&i&&n===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(t){void 0===t&&(t=this.url);var e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?"),n=t.indexOf("#"),o=Math.min(i>-1?i:t.length,n>-1?n:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},t}();!function(t){!function(t){t[t.NONE=0]="NONE",t[t.DATA_URL=1]="DATA_URL",t[t.COMPLETE=2]="COMPLETE",t[t.LOADING=4]="LOADING"}(t.STATUS_FLAGS||(t.STATUS_FLAGS={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.JSON=1]="JSON",t[t.XML=2]="XML",t[t.IMAGE=3]="IMAGE",t[t.AUDIO=4]="AUDIO",t[t.VIDEO=5]="VIDEO",t[t.TEXT=6]="TEXT"}(t.TYPE||(t.TYPE={})),function(t){t[t.XHR=1]="XHR",t[t.IMAGE=2]="IMAGE",t[t.AUDIO=3]="AUDIO",t[t.VIDEO=4]="VIDEO"}(t.LOAD_TYPE||(t.LOAD_TYPE={})),function(t){t.DEFAULT="text",t.BUFFER="arraybuffer",t.BLOB="blob",t.DOCUMENT="document",t.JSON="json",t.TEXT="text"}(t.XHR_RESPONSE_TYPE||(t.XHR_RESPONSE_TYPE={})),t._loadTypeMap={gif:t.LOAD_TYPE.IMAGE,png:t.LOAD_TYPE.IMAGE,bmp:t.LOAD_TYPE.IMAGE,jpg:t.LOAD_TYPE.IMAGE,jpeg:t.LOAD_TYPE.IMAGE,tif:t.LOAD_TYPE.IMAGE,tiff:t.LOAD_TYPE.IMAGE,webp:t.LOAD_TYPE.IMAGE,tga:t.LOAD_TYPE.IMAGE,svg:t.LOAD_TYPE.IMAGE,"svg+xml":t.LOAD_TYPE.IMAGE,mp3:t.LOAD_TYPE.AUDIO,ogg:t.LOAD_TYPE.AUDIO,wav:t.LOAD_TYPE.AUDIO,mp4:t.LOAD_TYPE.VIDEO,webm:t.LOAD_TYPE.VIDEO},t._xhrTypeMap={xhtml:t.XHR_RESPONSE_TYPE.DOCUMENT,html:t.XHR_RESPONSE_TYPE.DOCUMENT,htm:t.XHR_RESPONSE_TYPE.DOCUMENT,xml:t.XHR_RESPONSE_TYPE.DOCUMENT,tmx:t.XHR_RESPONSE_TYPE.DOCUMENT,svg:t.XHR_RESPONSE_TYPE.DOCUMENT,tsx:t.XHR_RESPONSE_TYPE.DOCUMENT,gif:t.XHR_RESPONSE_TYPE.BLOB,png:t.XHR_RESPONSE_TYPE.BLOB,bmp:t.XHR_RESPONSE_TYPE.BLOB,jpg:t.XHR_RESPONSE_TYPE.BLOB,jpeg:t.XHR_RESPONSE_TYPE.BLOB,tif:t.XHR_RESPONSE_TYPE.BLOB,tiff:t.XHR_RESPONSE_TYPE.BLOB,webp:t.XHR_RESPONSE_TYPE.BLOB,tga:t.XHR_RESPONSE_TYPE.BLOB,json:t.XHR_RESPONSE_TYPE.JSON,text:t.XHR_RESPONSE_TYPE.TEXT,txt:t.XHR_RESPONSE_TYPE.TEXT,ttf:t.XHR_RESPONSE_TYPE.BUFFER,otf:t.XHR_RESPONSE_TYPE.BUFFER},t.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="}(O||(O={}));var I=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s},P=function(t,e,r){if(r||2===arguments.length)for(var i,n=0,o=e.length;n<o;n++)!i&&n in e||(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))};function C(){}function R(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(null===t)throw new Error("Callback was already called.");var i=t;t=null,i.apply(this,e)}}var M=function(t,e){this.data=t,this.callback=e},D=function(){function t(t,e){void 0===e&&(e=1);var r=this;if(this.workers=0,this.saturated=C,this.unsaturated=C,this.empty=C,this.drain=C,this.error=C,this.started=!1,this.paused=!1,this._tasks=[],this._insert=function(t,e,i){if(i&&"function"!=typeof i)throw new Error("task callback must be a function");if(r.started=!0,null==t&&r.idle())setTimeout((function(){return r.drain()}),1);else{var n=new M(t,"function"==typeof i?i:C);e?r._tasks.unshift(n):r._tasks.push(n),setTimeout(r.process,1)}},this.process=function(){for(;!r.paused&&r.workers<r.concurrency&&r._tasks.length;){var t=r._tasks.shift();0===r._tasks.length&&r.empty(),r.workers+=1,r.workers===r.concurrency&&r.saturated(),r._worker(t.data,R(r._next(t)))}},this._worker=t,0===e)throw new Error("Concurrency must not be zero");this.concurrency=e,this.buffer=e/4}return t.prototype._next=function(t){var e=this;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];e.workers-=1,t.callback.apply(t,P([],I(r),!1)),null!=r[0]&&e.error(r[0],t.data),e.workers<=e.concurrency-e.buffer&&e.unsaturated(),e.idle()&&e.drain(),e.process()}},t.prototype.push=function(t,e){this._insert(t,!1,e)},t.prototype.kill=function(){this.workers=0,this.drain=C,this.started=!1,this._tasks=[]},t.prototype.unshift=function(t,e){this._insert(t,!0,e)},t.prototype.length=function(){return this._tasks.length},t.prototype.running=function(){return this.workers},t.prototype.idle=function(){return this._tasks.length+this.workers===0},t.prototype.pause=function(){!0!==this.paused&&(this.paused=!0)},t.prototype.resume=function(){if(!1!==this.paused){this.paused=!1;for(var t=1;t<=this.concurrency;t++)this.process()}},t.eachSeries=function(t,e,r,i){var n=0,o=t.length;!function s(a){a||n===o?r&&r(a):i?setTimeout((function(){e(t[n++],s)}),1):e(t[n++],s)}()},t.queue=function(e,r){return new t(e,r)},t}(),N=/(#[\w-]+)?$/,L=function(){function t(e,r){void 0===e&&(e=""),void 0===r&&(r=10);var i=this;this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,e){return i._loadResource(t,e)},this.resources={},this.baseUrl=e,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,e){return i._loadResource(t,e)},this._queue=D.queue(this._boundLoadResource,r),this._queue.pause(),this.resources={},this.onProgress=new v,this.onError=new v,this.onLoad=new v,this.onStart=new v,this.onComplete=new v;for(var n=0;n<t._plugins.length;++n){var o=t._plugins[n],s=o.pre,a=o.use;s&&this.pre(s),a&&this.use(a)}this._protected=!1}return t.prototype._add=function(t,e,r,i){if(this.loading&&(!r||!r.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'.concat(t,'" already exists.'));if(e=this._prepareUrl(e),this.resources[t]=new O(t,e,r),"function"==typeof i&&this.resources[t].onAfterMiddleware.once(i),this.loading){for(var n=r.parentResource,o=[],s=0;s<n.children.length;++s)n.children[s].isComplete||o.push(n.children[s]);var a=n.progressChunk*(o.length+1)/(o.length+2);n.children.push(this.resources[t]),n.progressChunk=a;for(s=0;s<o.length;++s)o[s].progressChunk=a;this.resources[t].progressChunk=a}return this._queue.push(this.resources[t]),this},t.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},t.prototype.use=function(t){return this._afterMiddleware.push(t),this},t.prototype.reset=function(){for(var t in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort("loader reset")}return this.resources={},this},t.prototype.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var e=100/this._queue._tasks.length,r=0;r<this._queue._tasks.length;++r)this._queue._tasks[r].data.progressChunk=e;this._onStart(),this._queue.resume()}return this},Object.defineProperty(t.prototype,"concurrency",{get:function(){return this._queue.concurrency},set:function(t){this._queue.concurrency=t},enumerable:!1,configurable:!0}),t.prototype._prepareUrl=function(t){var e,r=_(t,{strictMode:!0});if(e=r.protocol||!r.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?"".concat(this.baseUrl,"/").concat(t):this.baseUrl+t,this.defaultQueryString){var i=N.exec(e)[0];-1!==(e=e.substr(0,e.length-i.length)).indexOf("?")?e+="&".concat(this.defaultQueryString):e+="?".concat(this.defaultQueryString),e+=i}return e},t.prototype._loadResource=function(t,e){var r=this;t._dequeue=e,D.eachSeries(this._beforeMiddleware,(function(e,i){e.call(r,t,(function(){i(t.isComplete?{}:null)}))}),(function(){t.isComplete?r._onLoad(t):(t._onLoadBinding=t.onComplete.once(r._onLoad,r),t.load())}),!0)},t.prototype._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},t.prototype._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),D.eachSeries(this._afterMiddleware,(function(r,i){r.call(e,t,i)}),(function(){t.onAfterMiddleware.dispatch(t),e.progress=Math.min(100,e.progress+t.progressChunk),e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&e._onComplete()}),!0)},t.prototype.destroy=function(){this._protected||this.reset()},Object.defineProperty(t,"shared",{get:function(){var e=t._shared;return e||((e=new t)._protected=!0,t._shared=e),e},enumerable:!1,configurable:!0}),t.registerPlugin=function(e){return t._plugins.push(e),e.add&&e.add(),t},t._plugins=[],t}();L.prototype.add=function(t,e,r,i){if(Array.isArray(t)){for(var n=0;n<t.length;++n)this.add(t[n]);return this}if("object"==typeof t&&(r=t,i=e||r.callback||r.onComplete,e=r.url,t=r.name||r.key||r.url),"string"!=typeof e&&(i=r,r=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");return"function"==typeof r&&(i=r,r=null),this._add(t,e,r,i)};var F=function(){function t(){}return t.init=function(t){t=Object.assign({sharedLoader:!1},t),this.loader=t.sharedLoader?L.shared:new L},t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t}(),B=function(){function t(){}return t.add=function(){O.setExtensionLoadType("svg",O.LOAD_TYPE.XHR),O.setExtensionXhrType("svg",O.XHR_RESPONSE_TYPE.TEXT)},t.use=function(t,e){if(!t.data||t.type!==O.TYPE.IMAGE&&"svg"!==t.extension)e();else{var r=t.data,i=t.url,n=t.name,o=t.metadata;h.Texture.fromLoader(r,i,n,o).then((function(r){t.texture=r,e()})).catch(e)}},t}();L.registerPlugin(B);var U=r(6787);U.X.UPLOADS_PER_FRAME=4;var k=r(4775),j=r(2901),G=r(2794),X=function(){function t(t){this.maxItemsPerFrame=t,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();function H(t,e){var r=!1;if(t&&t._textures&&t._textures.length)for(var i=0;i<t._textures.length;i++)if(t._textures[i]instanceof h.Texture){var n=t._textures[i].baseTexture;-1===e.indexOf(n)&&(e.push(n),r=!0)}return r}function Y(t,e){if(t.baseTexture instanceof h.BaseTexture){var r=t.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function V(t,e){if(t._texture&&t._texture instanceof h.Texture){var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function z(t,e){return e instanceof G.xv&&(e.updateText(!0),!0)}function W(t,e){if(e instanceof G.pn){var r=e.toFontString();return G._A.measureFont(r),!0}return!1}function q(t,e){if(t instanceof G.xv){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var r=t._texture.baseTexture;return-1===e.indexOf(r)&&e.push(r),!0}return!1}function K(t,e){return t instanceof G.pn&&(-1===e.indexOf(t)&&e.push(t),!0)}var $,Z=function(){function t(t){var e=this;this.limiter=new X(U.X.UPLOADS_PER_FRAME),this.renderer=t,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){e.queue&&e.prepareItems()},this.registerFindHook(q),this.registerFindHook(K),this.registerFindHook(H),this.registerFindHook(Y),this.registerFindHook(V),this.registerUploadHook(z),this.registerUploadHook(W)}return t.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,j.vB.system.addOnce(this.tick,this,j.uF.UTILITY))):e&&e()},t.prototype.tick=function(){setTimeout(this.delayedTick,0)},t.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var r=0,i=this.uploadHooks.length;r<i;r++)if(this.uploadHooks[r](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)j.vB.system.addOnce(this.tick,this,j.uF.UTILITY);else{this.ticking=!1;var n=this.completes.slice(0);this.completes.length=0;for(r=0,i=n.length;r<i;r++)n[r]()}},t.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},t.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},t.prototype.add=function(t){for(var e=0,r=this.addHooks.length;e<r&&!this.addHooks[e](t,this.queue);e++);if(t instanceof a.W2)for(e=t.children.length-1;e>=0;e--)this.add(t.children[e]);return this},t.prototype.destroy=function(){this.ticking&&j.vB.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}(),Q=($=function(t,e){return $=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},$(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}$(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});function J(t,e){return e instanceof h.BaseTexture&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function tt(t,e){if(!(e instanceof k.TC))return!1;var r=e.geometry;e.finishPoly(),r.updateBatches();for(var i=r.batches,n=0;n<i.length;n++){var o=i[n].style.texture;o&&J(t,o.baseTexture)}return r.batchable||t.geometry.bind(r,e._resolveDirectShader(t)),!0}function et(t,e){return t instanceof k.TC&&(e.push(t),!0)}var rt=function(t){function e(e){var r=t.call(this,e)||this;return r.uploadHookHelper=r.renderer,r.registerFindHook(et),r.registerUploadHook(J),r.registerUploadHook(tt),r}return Q(e,t),e}(Z),it=(function(){function t(t){this.maxMilliseconds=t,this.frameStart=0}t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds}}(),function(){function t(t,e,r){void 0===r&&(r=null),this._texture=t instanceof h.Texture?t:null,this.baseTexture=t instanceof h.BaseTexture?t:this._texture.baseTexture,this.textures={},this.animations={},this.data=e;var i=this.baseTexture.resource;this.resolution=this._updateResolution(r||(i?i.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return t.prototype._updateResolution=function(t){void 0===t&&(t=null);var e=this.data.meta.scale,r=(0,s.fL)(t,null);return null===r&&(r=void 0!==e?parseFloat(e):1),1!==r&&this.baseTexture.setResolution(r),r},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){console.log("this.resolution",this.resolution);for(var r=e,i=t.BATCH_SIZE;r-e<i&&r<this._frameKeys.length;){var n=this._frameKeys[r],o=this._frames[n],s=o.frame;if(s){var a=null,u=null,c=!1!==o.trimmed&&o.sourceSize?o.sourceSize:o.frame,l=new f.Ae(0,0,Math.floor(c.w)/this.resolution,Math.floor(c.h)/this.resolution);a=o.rotated?new f.Ae(Math.floor(s.x)/this.resolution,Math.floor(s.y)/this.resolution,Math.floor(s.h)/this.resolution,Math.floor(s.w)/this.resolution):new f.Ae(Math.floor(s.x)/this.resolution,Math.floor(s.y)/this.resolution,Math.floor(s.w)/this.resolution,Math.floor(s.h)/this.resolution),!1!==o.trimmed&&o.spriteSourceSize&&(u=new f.Ae(Math.floor(o.spriteSourceSize.x)/this.resolution,Math.floor(o.spriteSourceSize.y)/this.resolution,Math.floor(s.w)/this.resolution,Math.floor(s.h)/this.resolution)),this.textures[n]=new h.Texture(this.baseTexture,a,l,u,o.rotated?2:0,o.anchor),h.Texture.addToCache(this.textures[n],n)}r++}},t.prototype._processAnimations=function(){var t=this.data.animations||{};for(var e in t){this.animations[e]=[];for(var r=0;r<t[e].length;r++){var i=t[e][r];this.animations[e].push(this.textures[i])}}},t.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},t.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout((function(){e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch():(e._processAnimations(),e._parseComplete())}),0)},t.prototype.destroy=function(t){var e;for(var r in void 0===t&&(t=!1),this.textures)this.textures[r].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&(null===(e=this._texture)||void 0===e||e.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null},t.BATCH_SIZE=1e3,t}()),nt=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ot=function(){function t(){}return t.use=function(e,r){var i,n,o,a,h=this,u="".concat(e.name,"_image");if(e.data&&e.type===O.TYPE.JSON&&e.data.frames&&!h.resources[u]){var c=null===(a=null===(o=e.data)||void 0===o?void 0:o.meta)||void 0===a?void 0:a.related_multi_packs;if(Array.isArray(c)){var l=function(t){if("string"!=typeof t)return"continue";var r=t.replace(".json",""),i=s.HQ.resolve(e.url.replace(h.baseUrl,""),t);if(h.resources[r]||Object.values(h.resources).some((function(t){return s.HQ.format(s.HQ.parse(t.url))===i})))return"continue";var n={crossOrigin:e.crossOrigin,loadType:O.LOAD_TYPE.XHR,xhrType:O.XHR_RESPONSE_TYPE.JSON,parentResource:e,metadata:e.metadata};h.add(r,i,n)};try{for(var f=nt(c),d=f.next();!d.done;d=f.next()){l(d.value)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(i)throw i.error}}}var p={crossOrigin:e.crossOrigin,metadata:e.metadata.imageMetadata,parentResource:e},y=t.getResourcePath(e,h.baseUrl);h.add(u,y,p,(function(t){if(t.error)r(t.error);else{var i=new it(t.texture,e.data,e.url);i.parse((function(){e.spritesheet=i,e.textures=i.textures,r()}))}}))}else r()},t.getResourcePath=function(t,e){return t.isDataUrl?t.data.meta.image:s.HQ.resolve(t.url.replace(e,""),t.data.meta.image)},t}();var st=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();!function(t){function e(e){void 0===e&&(e=1);var r=t.call(this,h.defaultVertex,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n",{uAlpha:1})||this;return r.alpha=e,r}st(e,t),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0})}(h.Filter);var at={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},ht=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join("\n");var ut=r(7659),ct=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),lt=function(t){function e(e,r,i,n,o){void 0===r&&(r=8),void 0===i&&(i=4),void 0===n&&(n=U.X.FILTER_RESOLUTION),void 0===o&&(o=5);var s=this,a=function(t,e){var r,i=Math.ceil(t/2),n="\n attribute vec2 aVertexPosition;\n\n uniform mat3 projectionMatrix;\n\n uniform float strength;\n\n varying vec2 vBlurTexCoords[%size%];\n\n uniform vec4 inputSize;\n uniform vec4 outputFrame;\n\n vec4 filterVertexPosition( void )\n {\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n }\n\n vec2 filterTextureCoord( void )\n {\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n }\n\n void main(void)\n {\n gl_Position = filterVertexPosition();\n\n vec2 textureCoord = filterTextureCoord();\n %blur%\n }",o="";r=e?"vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;s<t;s++){var a=r.replace("%index%",s.toString());o+=a=a.replace("%sampleIndex%","".concat(s-(i-1),".0")),o+="\n"}return(n=n.replace("%blur%",o)).replace("%size%",t.toString())}(o,e),h=function(t){for(var e,r=at[t],i=r.length,n=ht,o="",s=0;s<t;s++){var a="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",s.toString());e=s,s>=i&&(e=t-s-1),o+=a=a.replace("%value%",r[e].toString()),o+="\n"}return(n=n.replace("%blur%",o)).replace("%size%",t.toString())}(o);return(s=t.call(this,a,h)||this).horizontal=e,s.resolution=n,s._quality=0,s.quality=i,s.blur=r,s}return ct(e,t),e.prototype.apply=function(t,e,r,i){if(r?this.horizontal?this.uniforms.strength=1/r.width*(r.width/e.width):this.uniforms.strength=1/r.height*(r.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,i);else{var n=t.getFilterTexture(),o=t.renderer,s=e,a=n;this.state.blend=!1,t.applyFilter(this,s,a,ut.yl.CLEAR);for(var h=1;h<this.passes-1;h++){t.bindAndClear(s,ut.yl.BLIT),this.uniforms.uSampler=a;var u=a;a=s,s=u,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,t.applyFilter(this,a,r,i),t.returnFilterTexture(n)}},Object.defineProperty(e.prototype,"blur",{get:function(){return this.strength},set:function(t){this.padding=1+2*Math.abs(t),this.strength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t},enumerable:!1,configurable:!0}),e}(h.Filter),ft=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),dt=(function(t){function e(e,r,i,n){void 0===e&&(e=8),void 0===r&&(r=4),void 0===i&&(i=U.X.FILTER_RESOLUTION),void 0===n&&(n=5);var o=t.call(this)||this;return o.blurXFilter=new lt(!0,e,r,i,n),o.blurYFilter=new lt(!1,e,r,i,n),o.resolution=i,o.quality=r,o.blur=e,o.repeatEdgePixels=!1,o}ft(e,t),e.prototype.apply=function(t,e,r,i){var n=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(n&&o){var s=t.getFilterTexture();this.blurXFilter.apply(t,e,s,ut.yl.CLEAR),this.blurYFilter.apply(t,s,r,i),t.returnFilterTexture(s)}else o?this.blurYFilter.apply(t,e,r,i):this.blurXFilter.apply(t,e,r,i)},e.prototype.updatePadding=function(){this._repeatEdgePixels?this.padding=0:this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))},Object.defineProperty(e.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.blurYFilter.blendMode},set:function(t){this.blurYFilter.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"repeatEdgePixels",{get:function(){return this._repeatEdgePixels},set:function(t){this._repeatEdgePixels=t,this.updatePadding()},enumerable:!1,configurable:!0})}(h.Filter),{float:function(t,e,r,i){r!==i&&(r.v=i,t.uniform1f(e,i))},vec2:function(t,e,r,i){r[0]===i[0]&&r[1]===i[1]||(r[0]=i[0],r[1]=i[1],t.uniform2f(e,i[0],i[1]))},vec3:function(t,e,r,i){r[0]===i[0]&&r[1]===i[1]&&r[2]===i[2]||(r[0]=i[0],r[1]=i[1],r[2]=i[2],t.uniform3f(e,i[0],i[1],i[2]))},int:function(t,e,r,i){t.uniform1i(e,i)},ivec2:function(t,e,r,i){t.uniform2i(e,i[0],i[1])},ivec3:function(t,e,r,i){t.uniform3i(e,i[0],i[1],i[2])},ivec4:function(t,e,r,i){t.uniform4i(e,i[0],i[1],i[2],i[3])},uint:function(t,e,r,i){t.uniform1ui(e,i)},uvec2:function(t,e,r,i){t.uniform2ui(e,i[0],i[1])},uvec3:function(t,e,r,i){t.uniform3ui(e,i[0],i[1],i[2])},uvec4:function(t,e,r,i){t.uniform4ui(e,i[0],i[1],i[2],i[3])},bool:function(t,e,r,i){r!==i&&(r.v=i,t.uniform1i(e,Number(i)))},bvec2:function(t,e,r,i){t.uniform2i(e,i[0],i[1])},bvec3:function(t,e,r,i){t.uniform3i(e,i[0],i[1],i[2])},bvec4:function(t,e,r,i){t.uniform4i(e,i[0],i[1],i[2],i[3])},mat2:function(t,e,r,i){t.uniformMatrix2fv(e,!1,i)},mat3:function(t,e,r,i){t.uniformMatrix3fv(e,!1,i)},mat4:function(t,e,r,i){t.uniformMatrix4fv(e,!1,i)},sampler2D:function(t,e,r,i){t.uniform1i(e,i)},samplerCube:function(t,e,r,i){t.uniform1i(e,i)},sampler2DArray:function(t,e,r,i){t.uniform1i(e,i)}}),pt={float:function(t,e,r,i){t.uniform1fv(e,i)},vec2:function(t,e,r,i){t.uniform2fv(e,i)},vec3:function(t,e,r,i){t.uniform3fv(e,i)},vec4:function(t,e,r,i){t.uniform4fv(e,i)},int:function(t,e,r,i){t.uniform1iv(e,i)},ivec2:function(t,e,r,i){t.uniform2iv(e,i)},ivec3:function(t,e,r,i){t.uniform3iv(e,i)},ivec4:function(t,e,r,i){t.uniform4iv(e,i)},uint:function(t,e,r,i){t.uniform1uiv(e,i)},uvec2:function(t,e,r,i){t.uniform2uiv(e,i)},uvec3:function(t,e,r,i){t.uniform3uiv(e,i)},uvec4:function(t,e,r,i){t.uniform4uiv(e,i)},bool:function(t,e,r,i){t.uniform1iv(e,i)},bvec2:function(t,e,r,i){t.uniform2iv(e,i)},bvec3:function(t,e,r,i){t.uniform3iv(e,i)},bvec4:function(t,e,r,i){t.uniform4iv(e,i)},sampler2D:function(t,e,r,i){t.uniform1iv(e,i)},samplerCube:function(t,e,r,i){t.uniform1iv(e,i)},sampler2DArray:function(t,e,r,i){t.uniform1iv(e,i)}};var yt=r(1961),mt=new f.y3;a.s$.prototype._cacheAsBitmap=!1,a.s$.prototype._cacheData=null,a.s$.prototype._cacheAsBitmapResolution=null,a.s$.prototype._cacheAsBitmapMultisample=ut.G5.NONE;var vt=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null};Object.defineProperties(a.s$.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new vt),(e=this._cacheData).originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),a.s$.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},a.s$.prototype._initCachedDisplayObject=function(t){var e;if(!this._cacheData||!this._cacheData.sprite){var r=this.alpha;this.alpha=1,t.batch.flush();var i=this.getLocalBounds(null,!0).clone();if(this.filters){var n=this.filters[0].padding;i.pad(n)}i.ceil(U.X.RESOLUTION);var o=t.renderTexture.current,a=t.renderTexture.sourceFrame.clone(),u=t.renderTexture.destinationFrame.clone(),c=t.projection.transform,l=h.RenderTexture.create({width:i.width,height:i.height,resolution:this.cacheAsBitmapResolution||t.resolution,multisample:null!==(e=this.cacheAsBitmapMultisample)&&void 0!==e?e:t.multisample}),f="cacheAsBitmap_".concat((0,s.hQ)());this._cacheData.textureCacheId=f,h.BaseTexture.addToCache(l.baseTexture,f),h.Texture.addToCache(l,f);var d=this.transform.localTransform.copyTo(mt).invert().translate(-i.x,-i.y);this.render=this._cacheData.originalRender,t.render(this,{renderTexture:l,clear:!0,transform:d,skipUpdateTransform:!1}),t.framebuffer.blit(),t.projection.transform=c,t.renderTexture.bind(o,a,u),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=r;var p=new yt.j(l);p.transform.worldTransform=this.transform.worldTransform,p.anchor.x=-i.x/i.width,p.anchor.y=-i.y/i.height,p.alpha=r,p._bounds=this._bounds,this._cacheData.sprite=p,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=p.containsPoint.bind(p)}},a.s$.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},a.s$.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(null,!0),r=this.alpha;this.alpha=1;var i=t.context,n=t._projTransform;e.ceil(U.X.RESOLUTION);var o=h.RenderTexture.create({width:e.width,height:e.height}),a="cacheAsBitmap_".concat((0,s.hQ)());this._cacheData.textureCacheId=a,h.BaseTexture.addToCache(o.baseTexture,a),h.Texture.addToCache(o,a);var u=mt;this.transform.localTransform.copyTo(u),u.invert(),u.tx-=e.x,u.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,{renderTexture:o,clear:!0,transform:u,skipUpdateTransform:!1}),t.context=i,t._projTransform=n,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=r;var c=new yt.j(o);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-e.x/e.width,c.anchor.y=-e.y/e.height,c.alpha=r,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=c.containsPoint.bind(c)}},a.s$.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},a.s$.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},a.s$.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,h.BaseTexture.removeFromCache(this._cacheData.textureCacheId),h.Texture.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},a.s$.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},a.s$.prototype.name=null,a.W2.prototype.getChildByName=function(t,e){for(var r=0,i=this.children.length;r<i;r++)if(this.children[r].name===t)return this.children[r];if(e)for(r=0,i=this.children.length;r<i;r++){if(this.children[r].getChildByName){var n=this.children[r].getChildByName(t,!0);if(n)return n}}return null},a.s$.prototype.getGlobalPosition=function(t,e){return void 0===t&&(t=new f.E9),void 0===e&&(e=!1),this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t};var _t=wx.window,gt=_t.document;console.log("document",gt);var xt=_t,bt=_t.performance,Tt=_t.navigator;a.s$.mixin({accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1});var Et=100,wt=(function(){function t(t){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(s.tq.tablet||s.tq.phone)&&this.createTouchHook();var e=gt.createElement("div");e.style.width="".concat(Et,"px"),e.style.height="".concat(Et,"px"),e.style.position="absolute",e.style.top="".concat(0,"px"),e.style.left="".concat(0,"px"),e.style.zIndex=2..toString(),this.div=e,this.renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),xt.addEventListener("keydown",this._onKeyDown,!1)}Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileAccessibility",{get:function(){return this._isMobileAccessibility},enumerable:!1,configurable:!0}),t.prototype.createTouchHook=function(){var t=this,e=gt.createElement("button");e.style.width="".concat(1,"px"),e.style.height="".concat(1,"px"),e.style.position="absolute",e.style.top="".concat(-1e3,"px"),e.style.left="".concat(-1e3,"px"),e.style.zIndex=2..toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",(function(){t._isMobileAccessibility=!0,t.activate(),t.destroyTouchHook()})),gt.body.appendChild(e),this._hookDiv=e},t.prototype.destroyTouchHook=function(){this._hookDiv&&(gt.body.removeChild(this._hookDiv),this._hookDiv=null)},t.prototype.activate=function(){var t;this._isActive||(this._isActive=!0,xt.document.addEventListener("mousemove",this._onMouseMove,!0),xt.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),null===(t=this.renderer.view.parentNode)||void 0===t||t.appendChild(this.div))},t.prototype.deactivate=function(){var t;this._isActive&&!this._isMobileAccessibility&&(this._isActive=!1,xt.document.removeEventListener("mousemove",this._onMouseMove,!0),xt.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),null===(t=this.div.parentNode)||void 0===t||t.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(t){if(t.visible&&t.accessibleChildren){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);var e=t.children;if(e)for(var r=0;r<e.length;r++)this.updateAccessibleObjects(e[r])}},t.prototype.update=function(){var t=bt.now();if(!(s.tq.android.device&&t<this.androidUpdateCount)&&(this.androidUpdateCount=t+this.androidUpdateFrequency,this.renderer.renderingToScreen)){this.renderer._lastObjectRendered&&this.updateAccessibleObjects(this.renderer._lastObjectRendered);var e=this.renderer.view.getBoundingClientRect(),r=e.left,i=e.top,n=e.width,o=e.height,a=this.renderer,h=a.width,u=a.height,c=a.resolution,l=n/h*c,f=o/u*c,d=this.div;d.style.left="".concat(r,"px"),d.style.top="".concat(i,"px"),d.style.width="".concat(h,"px"),d.style.height="".concat(u,"px");for(var p=0;p<this.children.length;p++){var y=this.children[p];if(y.renderId!==this.renderId)y._accessibleActive=!1,(0,s.Er)(this.children,p,1),this.div.removeChild(y._accessibleDiv),this.pool.push(y._accessibleDiv),y._accessibleDiv=null,p--;else{d=y._accessibleDiv;var m=y.hitArea,v=y.worldTransform;y.hitArea?(d.style.left="".concat((v.tx+m.x*v.a)*l,"px"),d.style.top="".concat((v.ty+m.y*v.d)*f,"px"),d.style.width="".concat(m.width*v.a*l,"px"),d.style.height="".concat(m.height*v.d*f,"px")):(m=y.getBounds(),this.capHitArea(m),d.style.left="".concat(m.x*l,"px"),d.style.top="".concat(m.y*f,"px"),d.style.width="".concat(m.width*l,"px"),d.style.height="".concat(m.height*f,"px"),d.title!==y.accessibleTitle&&null!==y.accessibleTitle&&(d.title=y.accessibleTitle),d.getAttribute("aria-label")!==y.accessibleHint&&null!==y.accessibleHint&&d.setAttribute("aria-label",y.accessibleHint)),y.accessibleTitle===d.title&&y.tabIndex===d.tabIndex||(d.title=y.accessibleTitle,d.tabIndex=y.tabIndex,this.debug&&this.updateDebugHTML(d))}}this.renderId++}},t.prototype.updateDebugHTML=function(t){t.innerHTML="type: ".concat(t.type,"</br> title : ").concat(t.title,"</br> tabIndex: ").concat(t.tabIndex)},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);var e=this.renderer,r=e.width,i=e.height;t.x+t.width>r&&(t.width=r-t.x),t.y+t.height>i&&(t.height=i-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=gt.createElement("button")).style.width="".concat(Et,"px"),e.style.height="".concat(Et,"px"),e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2..toString(),e.style.borderStyle="none",Tt.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),Tt.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject ".concat(t.tabIndex)),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction,r=t.target.displayObject,i=e.eventData;e.dispatchEvent(r,"click",i),e.dispatchEvent(r,"pointertap",i),e.dispatchEvent(r,"tap",i)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction,r=t.target.displayObject,i=e.eventData;e.dispatchEvent(r,"mouseover",i)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction,r=t.target.displayObject,i=e.eventData;e.dispatchEvent(r,"mouseout",i)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,xt.document.removeEventListener("mousemove",this._onMouseMove,!0),xt.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}}(),r(8141)),St=(r(2846),function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}());!function(t){function e(e,r){void 0===r&&(r=!0);var i=t.call(this,e[0]instanceof h.Texture?e[0]:e[0].texture)||this;return i._textures=null,i._durations=null,i._autoUpdate=r,i._isConnectedToTicker=!1,i.animationSpeed=1,i.loop=!0,i.updateAnchor=!1,i.onComplete=null,i.onFrameChange=null,i.onLoop=null,i._currentTime=0,i._playing=!1,i._previousFrame=null,i.textures=e,i}St(e,t),e.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(j.vB.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(j.vB.shared.add(this.update,this,j.uF.HIGH),this._isConnectedToTicker=!0))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){if(this._playing){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var n=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*n,this._currentTime+=n;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<r||this.animationSpeed<0&&this.currentFrame>r)&&this.onLoop(),this.updateTexture())}},e.prototype.updateTexture=function(){var t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(t){for(var r=[],i=0;i<t.length;++i)r.push(h.Texture.from(t[i]));return new e(r)},e.fromImages=function(t){for(var r=[],i=0;i<t.length;++i)r.push(h.Texture.from(t[i]));return new e(r)},Object.defineProperty(e.prototype,"totalFrames",{get:function(){return this._textures.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textures",{get:function(){return this._textures},set:function(t){if(t[0]instanceof h.Texture)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentFrame",{get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playing",{get:function(){return this._playing},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(j.vB.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(j.vB.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0})}(yt.j);!function(t){var e=t.ShaderSystem;if(!e)throw new Error("Unable to patch ShaderSystem, class not found.");Object.assign(e.prototype,{systemCheck:function(){},syncUniforms:function(t,e){var r=this.shader,i=this.renderer;!function(t,e,r,i,n){var o=0,s=null,a=null,h=n.gl;for(var u in t.uniforms){var c=e[u],l=i[u],f=r[u],d=t.uniforms[u];c?"float"===c.type&&1===c.size?l!==f.value&&(f.value=l,h.uniform1f(f.location,l)):"sampler2D"!==c.type&&"samplerCube"!==c.type&&"sampler2DArray"!==c.type||1!==c.size||c.isArray?"mat3"===c.type&&1===c.size?void 0!==d.a?h.uniformMatrix3fv(f.location,!1,l.toArray(!0)):h.uniformMatrix3fv(f.location,!1,l):"vec2"===c.type&&1===c.size?void 0!==d.x?(s=l,(a=f.value)[0]===s.x&&a[1]===s.y||(a[0]=s.x,a[1]=s.y,h.uniform2f(f.location,s.x,s.y))):(s=l,(a=f.value)[0]===s[0]&&a[1]===s[1]||(a[0]=s[0],a[1]=s[1],h.uniform2f(f.location,s[0],s[1]))):"vec4"===c.type&&1===c.size?void 0!==d.width?(s=l,(a=f.value)[0]===s.x&&a[1]===s.y&&a[2]===s.width&&a[3]===s.height||(a[0]=s.x,a[1]=s.y,a[2]=s.width,a[3]=s.height,h.uniform4f(f.location,s.x,s.y,s.width,s.height))):(s=l,(a=f.value)[0]===s[0]&&a[1]===s[1]&&a[2]===s[2]&&a[3]===s[3]||(a[0]=s[0],a[1]=s[1],a[2]=s[2],a[3]=s[3],h.uniform4f(f.location,s[0],s[1],s[2],s[3]))):(1===c.size?dt:pt)[c.type].call(null,h,f.location,f.value,l):(n.texture.bind(l,o),f.value!==o&&(f.value=o,h.uniform1i(f.location,o)),o++):d.group&&n.shader.syncUniformGroup(l)}}(t,r.program.uniformData,e.uniformData,t.uniforms,i)}})}(h),h.Renderer.registerPlugin("extract",p),h.Renderer.registerPlugin("prepare",rt),h.Renderer.registerPlugin("batch",h.BatchRenderer),L.registerPlugin(ot),u.registerPlugin(j.Sb),u.registerPlugin(F)},7659:(t,e,r)=>{var i,n,o,s,a,h,u,c,l,f,d,p,y,m,v,_,g,x,b;r.d(e,{A7:()=>g,G5:()=>x,I2:()=>h,N3:()=>n,Nt:()=>d,T$:()=>s,UN:()=>v,V0:()=>o,Vi:()=>i,WB:()=>p,aH:()=>f,cB:()=>_,iw:()=>y,lg:()=>a,mr:()=>b,oT:()=>l,sp:()=>u,vK:()=>c,yl:()=>m}),function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(i||(i={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(n||(n={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(o||(o={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(s||(s={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(a||(a={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(h||(h={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(u||(u={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(c||(c={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(l||(l={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(f||(f={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(d||(d={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(p||(p={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA",t[t.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA"}(y||(y={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(m||(m={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(v||(v={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(_||(_={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(g||(g={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(x||(x={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(b||(b={}))},9043:(t,e,r)=>{r.r(e),r.d(e,{AbstractBatchRenderer:()=>Je,AbstractMultiResource:()=>A,AbstractRenderer:()=>je,ArrayResource:()=>I,Attribute:()=>tt,BaseImageResource:()=>m,BaseRenderTexture:()=>Y,BaseTexture:()=>w,BatchDrawCall:()=>Ke,BatchGeometry:()=>rr,BatchPluginFactory:()=>sr,BatchRenderer:()=>ar,BatchShaderGenerator:()=>tr,BatchSystem:()=>gt,BatchTextureArray:()=>$e,Buffer:()=>rt,BufferResource:()=>p,CanvasResource:()=>C,ContextSystem:()=>bt,CubeResource:()=>M,Filter:()=>te,FilterState:()=>pt,FilterSystem:()=>vt,Framebuffer:()=>X,FramebufferSystem:()=>wt,GLFramebuffer:()=>Tt,GLProgram:()=>Ee,GLTexture:()=>De,Geometry:()=>at,GeometrySystem:()=>At,IGLUniformData:()=>Te,INSTALLED:()=>a,ImageBitmapResource:()=>k,ImageResource:()=>b,MaskData:()=>Ot,MaskSystem:()=>oe,ObjectRenderer:()=>_t,Program:()=>$t,ProjectionSystem:()=>fe,Quad:()=>ut,QuadUv:()=>lt,RenderTexture:()=>Q,RenderTexturePool:()=>J,RenderTextureSystem:()=>ye,Renderer:()=>Ye,Resource:()=>l,SVGResource:()=>N,ScissorSystem:()=>ue,Shader:()=>Zt,ShaderSystem:()=>Ce,SpriteMaskFilter:()=>ne,State:()=>Qt,StateSystem:()=>Re,StencilSystem:()=>le,System:()=>qe,Texture:()=>K,TextureGCSystem:()=>Me,TextureMatrix:()=>re,TextureSystem:()=>Ne,TextureUvs:()=>z,UniformGroup:()=>dt,VideoResource:()=>B,ViewableBuffer:()=>Ze,autoDetectRenderer:()=>Ve,autoDetectResource:()=>h,checkMaxIfStatementsInShader:()=>Wt,createUBOElements:()=>ge,defaultFilterVertex:()=>We,defaultVertex:()=>ze,generateProgram:()=>Oe,generateUniformBufferSync:()=>be,getTestContext:()=>Nt,getUBOData:()=>xe,resources:()=>hr,systems:()=>lr,uniformParsers:()=>Gt});var i={};r.r(i),r.d(i,{AbstractMultiResource:()=>A,ArrayResource:()=>I,BaseImageResource:()=>m,BufferResource:()=>p,CanvasResource:()=>C,CubeResource:()=>M,INSTALLED:()=>a,ImageBitmapResource:()=>k,ImageResource:()=>b,Resource:()=>l,SVGResource:()=>N,VideoResource:()=>B,autoDetectResource:()=>h});var n={};r.r(n),r.d(n,{BatchSystem:()=>gt,ContextSystem:()=>bt,FilterSystem:()=>vt,FramebufferSystem:()=>wt,GeometrySystem:()=>At,MaskSystem:()=>oe,ProjectionSystem:()=>fe,RenderTextureSystem:()=>ye,ScissorSystem:()=>ue,ShaderSystem:()=>Ce,StateSystem:()=>Re,StencilSystem:()=>le,TextureGCSystem:()=>Me,TextureSystem:()=>Ne});var o=r(6787),s=r(7659);o.X.PREFER_ENV=s.Vi.WEBGL2,o.X.STRICT_TEXTURE_CACHE=!1;var a=[];function h(t,e){if(!t)return null;var r="";if("string"==typeof t){var i=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);i&&(r=i[1].toLowerCase())}for(var n=a.length-1;n>=0;--n){var o=a[n];if(o.test&&o.test(t,r))return new o(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var u,c=r(2846),l=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new c.R("setRealSize"),this.onUpdate=new c.R("update"),this.onError=new c.R("onError")}return t.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},t.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},t.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.emit(t,e))},Object.defineProperty(t.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.destroyed||this.onUpdate.emit()},t.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),t.prototype.style=function(t,e,r){return!1},t.prototype.dispose=function(){},t.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},t.test=function(t,e){return!1},t}(),f=r(8306),d=(u=function(t,e){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},u(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}u(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),p=function(t){function e(e,r){var i=this,n=r||{},o=n.width,s=n.height;if(!o||!s)throw new Error("BufferResource width or height invalid");return(i=t.call(this,o,s)||this).data=e,i}return d(e,t),e.prototype.upload=function(t,e,r){var i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===s.iw.UNPACK);var n=e.realWidth,o=e.realHeight;return r.width===n&&r.height===o?i.texSubImage2D(e.target,0,0,0,n,o,e.format,r.type,this.data):(r.width=n,r.height=o,i.texImage2D(e.target,0,r.internalFormat,n,o,0,e.format,r.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(l),y=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),m=function(t){function e(e){var r=this,i=e,n=i.naturalWidth||i.videoWidth||i.width,o=i.naturalHeight||i.videoHeight||i.height;return(r=t.call(this,n,o)||this).source=e,r.noSubImage=!1,r}return y(e,t),e.crossOrigin=function(t,e,r){void 0===r&&0!==e.indexOf("data:")?t.crossOrigin=(0,f.Qq)(e):!1!==r&&(t.crossOrigin="string"==typeof r?r:"anonymous")},e.prototype.upload=function(t,e,r,i){var n=t.gl,o=e.realWidth,a=e.realHeight;if(i=i||this.source,n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===s.iw.UNPACK),this.noSubImage||e.target!==n.TEXTURE_2D||r.width!==o||r.height!==a){if(r.width=o,r.height=a,"undefined"!=typeof HTMLVideoElement&&i instanceof HTMLVideoElement&&!(i.currentTime>0&&!i.paused&&!i.ended&&i.readyState>2))return!0;n.texImage2D(e.target,0,r.internalFormat,e.format,r.type,i)}else n.texSubImage2D(n.TEXTURE_2D,0,0,0,e.format,r.type,i);return!0},e.prototype.update=function(){if(!this.destroyed){var e=this.source,r=e.naturalWidth||e.videoWidth||e.width,i=e.naturalHeight||e.videoHeight||e.height;this.resize(r,i),t.prototype.update.call(this)}},e.prototype.dispose=function(){this.source=null},e}(l),v=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),_=wx.window,g=wx.window.HTMLImageElement,x=wx.window.Image,b=function(t){function e(e,r){var i=this;if(r=r||{},"string"==typeof e){var n=new x;n.src=e,e=n}return i=t.call(this,e)||this,!e.complete&&i._width&&i._height&&(i._width=0,i._height=0),i.url=e.src,i._process=null,i.preserveBitmap=!1,i.createBitmap=(void 0!==r.createBitmap?r.createBitmap:o.X.CREATE_IMAGE_BITMAP)&&!!_.createImageBitmap,i.alphaMode="number"==typeof r.alphaMode?r.alphaMode:null,i.bitmap=null,i._load=null,!1!==r.autoLoad&&i.load(),i}return v(e,t),e.prototype.load=function(t){var e=this;return this._load||(void 0!==t&&(this.createBitmap=t),this._load=new Promise((function(t,r){var i=e.source;e.url=i.src;var n=function(){e.destroyed||(i.onload=null,i.onerror=null,e.resize(i.width,i.height),e._load=null,e.createBitmap?t(e.process()):t(e))};i.complete&&i.src?n():(i.onload=n,i.onerror=function(t){r(t),e.onError.emit(t)})}))),this._load},e.prototype.process=function(){var t=this,e=this.source;if(null!==this._process)return this._process;if(null!==this.bitmap||!_.createImageBitmap)return Promise.resolve(this);var r=_.createImageBitmap,i=!e.crossOrigin||"anonymous"===e.crossOrigin;return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then((function(t){return t.blob()})).then((function(i){return r(i,0,0,e.width,e.height,{premultiplyAlpha:t.alphaMode===s.iw.UNPACK?"premultiply":"none"})})).then((function(e){return t.destroyed?Promise.reject():(t.bitmap=e,t.update(),t._process=null,Promise.resolve(t))})),this._process},e.prototype.upload=function(e,r,i){if("number"==typeof this.alphaMode&&(r.alphaMode=this.alphaMode),!this.createBitmap)return t.prototype.upload.call(this,e,r,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(t.prototype.upload.call(this,e,r,i,this.bitmap),!this.preserveBitmap){var n=!0,o=r._glTextures;for(var s in o){var a=o[s];if(a!==i&&a.dirtyId!==r.dirtyId){n=!1;break}}n&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},e.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,t.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},e.test=function(t){return"string"==typeof t||t instanceof g},e}(m),T=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),E={scaleMode:s.aH.NEAREST,format:s.I2.RGBA,alphaMode:s.iw.NPM},w=function(t){function e(e,r){void 0===e&&(e=null),void 0===r&&(r=null);var i=t.call(this)||this,n=(r=r||{}).alphaMode,a=r.mipmap,u=r.anisotropicLevel,c=r.scaleMode,d=r.width,p=r.height,y=r.wrapMode,m=r.format,v=r.type,_=r.target,g=r.resolution,x=r.resourceOptions;if(e&&!(e instanceof l)){try{e=h(e,x)}catch(t){e=new b(e,x)}e.internal=!0}return i.resolution=g||o.X.RESOLUTION,i.width=Math.round((d||0)*i.resolution)/i.resolution,i.height=Math.round((p||0)*i.resolution)/i.resolution,i._mipmap=void 0!==a?a:o.X.MIPMAP_TEXTURES,i.anisotropicLevel=void 0!==u?u:o.X.ANISOTROPIC_LEVEL,i._wrapMode=y||o.X.WRAP_MODE,i._scaleMode=void 0!==c?c:o.X.SCALE_MODE,i.format=m||s.I2.RGBA,i.type=v||s.vK.UNSIGNED_BYTE,i.target=_||s.sp.TEXTURE_2D,i.alphaMode=void 0!==n?n:s.iw.UNPACK,i.uid=(0,f.hQ)(),i.touched=0,i.isPowerOfTwo=!1,i._refreshPOT(),i._glTextures={},i.dirtyId=0,i.dirtyStyleId=0,i.cacheId=null,i.valid=d>0&&p>0,i.textureCacheIds=[],i.destroyed=!1,i.resource=null,i._batchEnabled=0,i._batchLocation=0,i.parentTextureArray=null,i.setResource(e),i}return T(e,t),Object.defineProperty(e.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mipmap",{get:function(){return this._mipmap},set:function(t){this._mipmap!==t&&(this._mipmap=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(t){this._scaleMode!==t&&(this._scaleMode=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(t){this._wrapMode!==t&&(this._wrapMode=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(t,e){var r;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,e,r){return r=r||this.resolution,this.setRealSize(t*r,e*r,r)},e.prototype.setRealSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=Math.round(t)/this.resolution,this.height=Math.round(e)/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=(0,f.wv)(this.realWidth)&&(0,f.wv)(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t||(this.resolution=t,this.valid&&(this.width=Math.round(this.width*e)/t,this.height=Math.round(this.height*e)/t,this.emit("update",this)),this._refreshPOT()),this},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete f.V8[this.cacheId],delete f.kN[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(t,r,i){void 0===i&&(i=o.X.STRICT_TEXTURE_CACHE);var n="string"==typeof t,s=null;if(n)s=t;else{if(!t._pixiId){var a=r&&r.pixiIdPrefix||"pixiid";t._pixiId="".concat(a,"_").concat((0,f.hQ)())}s=t._pixiId}var h=f.V8[s];if(n&&i&&!h)throw new Error('The cacheId "'.concat(s,'" does not exist in BaseTextureCache.'));return h||((h=new e(t,r)).cacheId=s,e.addToCache(h,s)),h},e.fromBuffer=function(t,r,i,n){t=t||new Float32Array(r*i*4);var o=new p(t,{width:r,height:i}),a=t instanceof Float32Array?s.vK.FLOAT:s.vK.UNSIGNED_BYTE;return new e(o,Object.assign(E,n||{width:r,height:i,type:a}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),f.V8[e]&&console.warn("BaseTexture added to the cache with an id [".concat(e,"] that already had an entry")),f.V8[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=f.V8[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete f.V8[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)delete f.V8[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},e._globalBatch=0,e}(f.vp),S=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),A=function(t){function e(e,r){var i=this,n=r||{},o=n.width,s=n.height;(i=t.call(this,o,s)||this).items=[],i.itemDirtyIds=[];for(var a=0;a<e;a++){var h=new w;i.items.push(h),i.itemDirtyIds.push(-2)}return i.length=e,i._load=null,i.baseTexture=null,i}return S(e,t),e.prototype.initFromArray=function(t,e){for(var r=0;r<this.length;r++)t[r]&&(t[r].castToBaseTexture?this.addBaseTextureAt(t[r].castToBaseTexture(),r):t[r]instanceof l?this.addResourceAt(t[r],r):this.addResourceAt(h(t[r],e),r))},e.prototype.dispose=function(){for(var t=0,e=this.length;t<e;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},e.prototype.addResourceAt=function(t,e){if(!this.items[e])throw new Error("Index ".concat(e," is out of bounds"));return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[e].setResource(t),this},e.prototype.bind=function(e){if(null!==this.baseTexture)throw new Error("Only one base texture per TextureArray is allowed");t.prototype.bind.call(this,e);for(var r=0;r<this.length;r++)this.items[r].parentTextureArray=e,this.items[r].on("update",e.update,e)},e.prototype.unbind=function(e){t.prototype.unbind.call(this,e);for(var r=0;r<this.length;r++)this.items[r].parentTextureArray=null,this.items[r].off("update",e.update,e)},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.items.map((function(t){return t.resource})).filter((function(t){return t})).map((function(t){return t.load()}));return this._load=Promise.all(e).then((function(){var e=t.items[0],r=e.realWidth,i=e.realHeight;return t.resize(r,i),Promise.resolve(t)})),this._load},e}(l),O=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),I=function(t){function e(e,r){var i,n,o=this,s=r||{},a=s.width,h=s.height;return Array.isArray(e)?(i=e,n=e.length):n=e,o=t.call(this,n,{width:a,height:h})||this,i&&o.initFromArray(i,r),o}return O(e,t),e.prototype.addBaseTextureAt=function(t,e){if(!t.resource)throw new Error("ArrayResource does not support RenderTexture");return this.addResourceAt(t.resource,e),this},e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=s.sp.TEXTURE_2D_ARRAY},e.prototype.upload=function(t,e,r){var i=this,n=i.length,o=i.itemDirtyIds,s=i.items,a=t.gl;r.dirtyId<0&&a.texImage3D(a.TEXTURE_2D_ARRAY,0,r.internalFormat,this._width,this._height,n,0,e.format,r.type,null);for(var h=0;h<n;h++){var u=s[h];o[h]<u.dirtyId&&(o[h]=u.dirtyId,u.valid&&a.texSubImage3D(a.TEXTURE_2D_ARRAY,0,0,0,h,u.resource.width,u.resource.height,1,e.format,r.type,u.resource.source))}return!0},e}(A),P=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),C=function(t){function e(e){return t.call(this,e)||this}return P(e,t),e.test=function(t){var e=self.OffscreenCanvas;return!!(e&&t instanceof e)||(wx&&"undefined"!=typeof wx&&t._canvasId?(console.log("CanvasResource test: is canvasRes"),!0):self.HTMLCanvasElement&&t instanceof HTMLCanvasElement)},e}(m),R=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),M=function(t){function e(r,i){var n=this,o=i||{},a=o.width,h=o.height,u=o.autoLoad,c=o.linkBaseTexture;if(r&&r.length!==e.SIDES)throw new Error("Invalid length. Got ".concat(r.length,", expected 6"));n=t.call(this,6,{width:a,height:h})||this;for(var l=0;l<e.SIDES;l++)n.items[l].target=s.sp.TEXTURE_CUBE_MAP_POSITIVE_X+l;return n.linkBaseTexture=!1!==c,r&&n.initFromArray(r,i),!1!==u&&n.load(),n}return R(e,t),e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=s.sp.TEXTURE_CUBE_MAP},e.prototype.addBaseTextureAt=function(t,e,r){if(void 0===r&&(r=this.linkBaseTexture),!this.items[e])throw new Error("Index ".concat(e," is out of bounds"));if(!this.linkBaseTexture||t.parentTextureArray||Object.keys(t._glTextures).length>0){if(!t.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(t.resource,e)}else t.target=s.sp.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this},e.prototype.upload=function(t,r,i){for(var n=this.itemDirtyIds,o=0;o<e.SIDES;o++){var s=this.items[o];n[o]<s.dirtyId&&(s.valid&&s.resource?(s.resource.upload(t,s,i),n[o]=s.dirtyId):n[o]<-1&&(t.gl.texImage2D(s.target,0,i.internalFormat,r.realWidth,r.realHeight,0,r.format,i.type,null),n[o]=-1))}return!0},e.test=function(t){return Array.isArray(t)&&t.length===e.SIDES},e.SIDES=6,e}(A),D=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),N=function(t){function e(e,r){var i=this;return r=r||{},(i=t.call(this,document&&document.createElement("canvas"))||this)._width=0,i._height=0,i.svg=e,i.scale=r.scale||1,i._overrideWidth=r.width,i._overrideHeight=r.height,i._resolve=null,i._crossorigin=r.crossorigin,i._load=null,!1!==r.autoLoad&&i.load(),i}return D(e,t),e.prototype.load=function(){var t=this;return this._load||(this._load=new Promise((function(r){if(t._resolve=function(){t.resize(t.source.width,t.source.height),r(t)},e.SVG_XML.test(t.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");t.svg="data:image/svg+xml;base64,".concat(btoa(unescape(encodeURIComponent(t.svg))))}t._loadSvg()}))),this._load},e.prototype._loadSvg=function(){var t=this,e=new Image;m.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=function(r){t._resolve&&(e.onerror=null,t.onError.emit(r))},e.onload=function(){if(t._resolve){var r=e.width,i=e.height;if(!r||!i)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var n=r*t.scale,o=i*t.scale;(t._overrideWidth||t._overrideHeight)&&(n=t._overrideWidth||t._overrideHeight/i*r,o=t._overrideHeight||t._overrideWidth/r*i),n=Math.round(n),o=Math.round(o);var s=t.source;s.width=n,s.height=o,s._pixiId="canvas_".concat((0,f.hQ)()),s.getContext("2d").drawImage(e,0,0,r,i,0,0,n,o),t._resolve(),t._resolve=null}}},e.getSize=function(t){var r=e.SVG_SIZE.exec(t),i={};return r&&(i[r[1]]=Math.round(parseFloat(r[3])),i[r[5]]=Math.round(parseFloat(r[7]))),i},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},e.test=function(t,r){return"svg"===r||"string"==typeof t&&/^data:image\/svg\+xml(;(charset=utf8|utf8))?;base64/.test(t)||"string"==typeof t&&e.SVG_XML.test(t)},e.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,e.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(m),L=r(2901),F=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),B=function(t){function e(r,i){var n=this;if(i=i||{},!(r instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),"string"==typeof r&&(r=[r]);var s=r[0].src||r[0];m.crossOrigin(o,s,i.crossorigin);for(var a=0;a<r.length;++a){var h=document.createElement("source"),u=r[a],c=u.src,l=u.mime,f=(c=c||r[a]).split("?").shift().toLowerCase(),d=f.substr(f.lastIndexOf(".")+1);l=l||e.MIME_TYPES[d]||"video/".concat(d),h.src=c,h.type=l,o.appendChild(h)}r=o}return(n=t.call(this,r)||this).noSubImage=!0,n._autoUpdate=!0,n._isConnectedToTicker=!1,n._updateFPS=i.updateFPS||0,n._msToNextUpdate=0,n.autoPlay=!1!==i.autoPlay,n._load=null,n._resolve=null,n._onCanPlay=n._onCanPlay.bind(n),n._onError=n._onError.bind(n),!1!==i.autoLoad&&n.load(),n}return F(e,t),e.prototype.update=function(e){if(void 0===e&&(e=0),!this.destroyed){var r=L.vB.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-r),(!this._updateFPS||this._msToNextUpdate<=0)&&(t.prototype.update.call(this),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise((function(r){t.valid?r(t):(t._resolve=r,e.load())})),this._load},e.prototype._onError=function(t){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(t)},e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){var t=this.source;return 3===t.readyState||4===t.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(L.vB.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(L.vB.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&(L.vB.shared.remove(this.update,this),this._isConnectedToTicker=!1);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(L.vB.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(L.vB.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,r){return self.HTMLVideoElement&&t instanceof HTMLVideoElement||e.TYPES.indexOf(r)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(m),U=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),k=function(t){function e(e){return t.call(this,e)||this}return U(e,t),e.test=function(t){return!!self.createImageBitmap&&t instanceof ImageBitmap},e}(m);a.push(b,k,C,B,N,p,M,I);var j=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return j(e,t),e.prototype.upload=function(t,e,r){var i=t.gl;i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===s.iw.UNPACK);var n=e.realWidth,o=e.realHeight;return r.width===n&&r.height===o?i.texSubImage2D(e.target,0,0,0,n,o,e.format,r.type,this.data):(r.width=n,r.height=o,i.texImage2D(e.target,0,r.internalFormat,n,o,0,e.format,r.type,this.data)),!0},e}(p),X=function(){function t(t,e){this.width=Math.round(t||100),this.height=Math.round(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new c.R("disposeFramebuffer"),this.multisample=s.G5.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new w(null,{scaleMode:s.aH.NEAREST,resolution:1,mipmap:s.WB.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(t){return this.depthTexture=t||new w(new G(null,{width:this.width,height:this.height}),{scaleMode:s.aH.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:s.WB.OFF,format:s.I2.DEPTH_COMPONENT,type:s.vK.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(t,e){if(t=Math.round(t),e=Math.round(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var r=0;r<this.colorTextures.length;r++){var i=this.colorTextures[r],n=i.resolution;i.setSize(t/n,e/n)}if(this.depthTexture){n=this.depthTexture.resolution;this.depthTexture.setSize(t/n,e/n)}}},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroyDepthTexture=function(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)},t}(),H=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Y=function(t){function e(e){var r=this;if("number"==typeof e){var i=arguments[0],n=arguments[1],o=arguments[2],a=arguments[3];e={width:i,height:n,scaleMode:o,resolution:a}}return e.width=e.width||100,e.height=e.height||100,e.multisample=void 0!==e.multisample?e.multisample:s.G5.NONE,(r=t.call(this,null,e)||this).mipmap=s.WB.OFF,r.valid=!0,r.clearColor=[0,0,0,0],r.framebuffer=new X(r.realWidth,r.realHeight).addColorTexture(0,r),r.framebuffer.multisample=e.multisample,r.maskStack=[],r.filterStack=[{}],r}return H(e,t),e.prototype.resize=function(t,e){this.framebuffer.resize(t*this.resolution,e*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)},e.prototype.dispose=function(){this.framebuffer.dispose(),t.prototype.dispose.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.framebuffer.destroyDepthTexture(),this.framebuffer=null},e}(w),V=r(1893),z=function(){function t(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}return t.prototype.set=function(t,e,r){var i=e.width,n=e.height;if(r){var o=t.width/2/i,s=t.height/2/n,a=t.x/i+o,h=t.y/n+s;r=V.Lv.add(r,V.Lv.NW),this.x0=a+o*V.Lv.uX(r),this.y0=h+s*V.Lv.uY(r),r=V.Lv.add(r,2),this.x1=a+o*V.Lv.uX(r),this.y1=h+s*V.Lv.uY(r),r=V.Lv.add(r,2),this.x2=a+o*V.Lv.uX(r),this.y2=h+s*V.Lv.uY(r),r=V.Lv.add(r,2),this.x3=a+o*V.Lv.uX(r),this.y3=h+s*V.Lv.uY(r)}else this.x0=t.x/i,this.y0=t.y/n,this.x1=(t.x+t.width)/i,this.y1=t.y/n,this.x2=(t.x+t.width)/i,this.y2=(t.y+t.height)/n,this.x3=t.x/i,this.y3=(t.y+t.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3},t.prototype.toString=function(){return"[@pixi/core:TextureUvs "+"x0=".concat(this.x0," y0=").concat(this.y0," ")+"x1=".concat(this.x1," y1=").concat(this.y1," x2=").concat(this.x2," ")+"y2=".concat(this.y2," x3=").concat(this.x3," y3=").concat(this.y3)+"]"},t}(),W=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),q=new z,K=function(t){function e(r,i,n,o,s,a){var h=t.call(this)||this;if(h.noFrame=!1,i||(h.noFrame=!0,i=new V.Ae(0,0,1,1)),r instanceof e&&(r=r.baseTexture),h.baseTexture=r,h._frame=i,h.trim=o,h.valid=!1,h._uvs=q,h.uvMatrix=null,h.orig=n||i,h._rotate=Number(s||0),!0===s)h._rotate=2;else if(h._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return h.defaultAnchor=a?new V.E9(a.x,a.y):new V.E9(0,0),h._updateID=0,h.textureCacheIds=[],r.valid?h.noFrame?r.valid&&h.onBaseTextureUpdated(r):h.frame=i:r.once("loaded",h.onBaseTextureUpdated,h),h.noFrame&&r.on("update",h.onBaseTextureUpdated,h),h}return W(e,t),e.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},e.prototype.onBaseTextureUpdated=function(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},e.prototype.destroy=function(t){if(this.baseTexture){if(t){var r=this.baseTexture.resource;r&&r.url&&f.kN[r.url]&&e.removeFromCache(r.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){var t=this._frame.clone(),r=this._frame===this.orig?t:this.orig.clone(),i=new e(this.baseTexture,!this.noFrame&&t,r,this.trim&&this.trim.clone(),this.rotate,this.defaultAnchor);return this.noFrame&&(i._frame=t),i},e.prototype.updateUvs=function(){this._uvs===q&&(this._uvs=new z),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.from=function(t,r,i){void 0===r&&(r={}),void 0===i&&(i=o.X.STRICT_TEXTURE_CACHE);var n="string"==typeof t,s=null;if(n)s=t;else if(t instanceof w){if(!t.cacheId){var a=r&&r.pixiIdPrefix||"pixiid";t.cacheId="".concat(a,"-").concat((0,f.hQ)()),w.addToCache(t,t.cacheId)}s=t.cacheId}else{if(!t._pixiId){a=r&&r.pixiIdPrefix||"pixiid";t._pixiId="".concat(a,"_").concat((0,f.hQ)())}s=t._pixiId}var h=f.kN[s];if(n&&i&&!h)throw new Error('The cacheId "'.concat(s,'" does not exist in TextureCache.'));return h||t instanceof w?!h&&t instanceof w&&(h=new e(t),e.addToCache(h,s)):(r.resolution||(r.resolution=(0,f.fL)(t)),(h=new e(new w(t,r))).baseTexture.cacheId=s,w.addToCache(h.baseTexture,s),e.addToCache(h,s)),h},e.fromURL=function(t,r){var i=Object.assign({autoLoad:!1},null==r?void 0:r.resourceOptions),n=e.from(t,Object.assign({resourceOptions:i},r),!1),o=n.baseTexture.resource;return n.baseTexture.valid?Promise.resolve(n):o.load().then((function(){return Promise.resolve(n)}))},e.fromBuffer=function(t,r,i,n){return new e(w.fromBuffer(t,r,i,n))},e.fromLoader=function(t,r,i,n){var s=new w(t,Object.assign({scaleMode:o.X.SCALE_MODE,resolution:(0,f.fL)(r)},n)),a=s.resource;a instanceof b&&(a.url=r);var h=new e(s);return i||(i=r),w.addToCache(h.baseTexture,i),e.addToCache(h,i),i!==r&&(w.addToCache(h.baseTexture,r),e.addToCache(h,r)),h.baseTexture.valid?Promise.resolve(h):new Promise((function(t){h.baseTexture.once("loaded",(function(){return t(h)}))}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),f.kN[e]&&console.warn("Texture added to the cache with an id [".concat(e,"] that already had an entry")),f.kN[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=f.kN[t];if(e){var r=e.textureCacheIds.indexOf(t);return r>-1&&e.textureCacheIds.splice(r,1),delete f.kN[t],e}}else if(t&&t.textureCacheIds){for(var i=0;i<t.textureCacheIds.length;++i)f.kN[t.textureCacheIds[i]]===t&&delete f.kN[t.textureCacheIds[i]];return t.textureCacheIds.length=0,t}return null},Object.defineProperty(e.prototype,"resolution",{get:function(){return this.baseTexture.resolution},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frame",{get:function(){return this._frame},set:function(t){this._frame=t,this.noFrame=!1;var e=t.x,r=t.y,i=t.width,n=t.height,o=e+i>this.baseTexture.width,s=r+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",h="X: ".concat(e," + ").concat(i," = ").concat(e+i," > ").concat(this.baseTexture.width),u="Y: ".concat(r," + ").concat(n," = ").concat(r+n," > ").concat(this.baseTexture.height);throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+"".concat(h," ").concat(a," ").concat(u))}this.valid=i&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},e}(f.vp);function $(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}K.EMPTY=new K(new w),$(K.EMPTY),$(K.EMPTY.baseTexture),K.WHITE=function(){for(var t=new Uint8Array(1024),e=0;e<256;e++)t[4*e]=255,t[4*e+1]=255,t[4*e+2]=255,t[4*e+3]=255;return K.fromBuffer(t,16,16)}(),$(K.WHITE),$(K.WHITE.baseTexture);var Z=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Q=function(t){function e(e,r){var i=t.call(this,e,r)||this;return i.valid=!0,i.filterFrame=null,i.filterPoolKey=null,i.updateUvs(),i}return Z(e,t),Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(t){this.framebuffer.multisample=t},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e,r){void 0===r&&(r=!0);var i=this.baseTexture.resolution,n=Math.round(t*i)/i,o=Math.round(e*i)/i;this.valid=n>0&&o>0,this._frame.width=this.orig.width=n,this._frame.height=this.orig.height=o,r&&this.baseTexture.resize(n,o),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){for(var r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];return"number"==typeof t&&((0,f.a1)("6.0.0","Arguments (width, height, scaleMode, resolution) have been deprecated."),t={width:t,height:r[0],scaleMode:r[1],resolution:r[2]}),new e(new Y(t))},e}(K),J=function(){function t(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return t.prototype.createTexture=function(t,e,r){void 0===r&&(r=s.G5.NONE);var i=new Y(Object.assign({width:t,height:e,resolution:1,multisample:r},this.textureOptions));return new Q(i)},t.prototype.getOptimalTexture=function(t,e,r,i){var n;void 0===r&&(r=1),void 0===i&&(i=s.G5.NONE),t=Math.ceil(t*r),e=Math.ceil(e*r),this.enableFullScreen&&t===this._pixelsWidth&&e===this._pixelsHeight?n=i>1?-i:-1:(n=((65535&(t=(0,f.a9)(t)))<<16|65535&(e=(0,f.a9)(e)))>>>0,i>1&&(n+=4294967296*i)),this.texturePool[n]||(this.texturePool[n]=[]);var o=this.texturePool[n].pop();return o||(o=this.createTexture(t,e,i)),o.filterPoolKey=n,o.setResolution(r),o},t.prototype.getFilterTexture=function(t,e,r){var i=this.getOptimalTexture(t.width,t.height,e||t.resolution,r||s.G5.NONE);return i.filterFrame=t.filterFrame,i},t.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},t.prototype.returnFilterTexture=function(t){this.returnTexture(t)},t.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var r=this.texturePool[e];if(r)for(var i=0;i<r.length;i++)r[i].destroy(!0)}this.texturePool={}},t.prototype.setScreenSize=function(t){if(t.width!==this._pixelsWidth||t.height!==this._pixelsHeight){for(var e in this.enableFullScreen=t.width>0&&t.height>0,this.texturePool)if(Number(e)<0){var r=this.texturePool[e];if(r)for(var i=0;i<r.length;i++)r[i].destroy(!0);this.texturePool[e]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}},t.SCREEN_KEY=-1,t}(),tt=function(){function t(t,e,r,i,n,o,a){void 0===e&&(e=0),void 0===r&&(r=!1),void 0===i&&(i=s.vK.FLOAT),this.buffer=t,this.size=e,this.normalized=r,this.type=i,this.stride=n,this.start=o,this.instance=a}return t.prototype.destroy=function(){this.buffer=null},t.from=function(e,r,i,n,o){return new t(e,r,i,n,o)},t}(),et=0,rt=function(){function t(t,e,r){void 0===e&&(e=!0),void 0===r&&(r=!1),this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=r,this.static=e,this.id=et++,this.disposeRunner=new c.R("disposeBuffer")}return t.prototype.update=function(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroy=function(){this.dispose(),this.data=null},Object.defineProperty(t.prototype,"index",{get:function(){return this.type===s.mr.ELEMENT_ARRAY_BUFFER},set:function(t){this.type=t?s.mr.ELEMENT_ARRAY_BUFFER:s.mr.ARRAY_BUFFER},enumerable:!1,configurable:!0}),t.from=function(e){return e instanceof Array&&(e=new Float32Array(e)),new t(e)},t}(),it={Float32Array,Uint32Array,Int32Array,Uint8Array};var nt={5126:4,5123:2,5121:1},ot=0,st={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array},at=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this.buffers=t,this.indexBuffer=null,this.attributes=e,this.glVertexArrayObjects={},this.id=ot++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new c.R("disposeGeometry"),this.refCount=0}return t.prototype.addAttribute=function(t,e,r,i,n,o,s,a){if(void 0===r&&(r=0),void 0===i&&(i=!1),void 0===a&&(a=!1),!e)throw new Error("You must pass a buffer when creating an attribute");e instanceof rt||(e instanceof Array&&(e=new Float32Array(e)),e=new rt(e));var h=t.split("|");if(h.length>1){for(var u=0;u<h.length;u++)this.addAttribute(h[u],e,r,i,n);return this}var c=this.buffers.indexOf(e);return-1===c&&(this.buffers.push(e),c=this.buffers.length-1),this.attributes[t]=new tt(c,r,i,n,o,s,a),this.instanced=this.instanced||a,this},t.prototype.getAttribute=function(t){return this.attributes[t]},t.prototype.getBuffer=function(t){return this.buffers[this.getAttribute(t).buffer]},t.prototype.addIndex=function(t){return t instanceof rt||(t instanceof Array&&(t=new Uint16Array(t)),t=new rt(t)),t.type=s.mr.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,-1===this.buffers.indexOf(t)&&this.buffers.push(t),this},t.prototype.getIndex=function(){return this.indexBuffer},t.prototype.interleave=function(){if(1===this.buffers.length||2===this.buffers.length&&this.indexBuffer)return this;var t,e=[],r=[],i=new rt;for(t in this.attributes){var n=this.attributes[t],o=this.buffers[n.buffer];e.push(o.data),r.push(n.size*nt[n.type]/4),n.buffer=0}for(i.data=function(t,e){for(var r=0,i=0,n={},o=0;o<t.length;o++)i+=e[o],r+=t[o].length;var s=new ArrayBuffer(4*r),a=null,h=0;for(o=0;o<t.length;o++){var u=e[o],c=t[o],l=(0,f.u7)(c);n[l]||(n[l]=new it[l](s)),a=n[l];for(var d=0;d<c.length;d++)a[(d/u|0)*i+h+d%u]=c[d];h+=u}return new Float32Array(s)}(e,r),t=0;t<this.buffers.length;t++)this.buffers[t]!==this.indexBuffer&&this.buffers[t].destroy();return this.buffers=[i],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},t.prototype.getSize=function(){for(var t in this.attributes){var e=this.attributes[t];return this.buffers[e.buffer].data.length/(e.stride/4||e.size)}return 0},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null},t.prototype.clone=function(){for(var e=new t,r=0;r<this.buffers.length;r++)e.buffers[r]=new rt(this.buffers[r].data.slice(0));for(var r in this.attributes){var i=this.attributes[r];e.attributes[r]=new tt(i.buffer,i.size,i.normalized,i.type,i.stride,i.start,i.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=s.mr.ELEMENT_ARRAY_BUFFER),e},t.merge=function(e){for(var r,i=new t,n=[],o=[],a=[],h=0;h<e.length;h++){r=e[h];for(var u=0;u<r.buffers.length;u++)o[u]=o[u]||0,o[u]+=r.buffers[u].data.length,a[u]=0}for(h=0;h<r.buffers.length;h++)n[h]=new(st[(0,f.u7)(r.buffers[h].data)])(o[h]),i.buffers[h]=new rt(n[h]);for(h=0;h<e.length;h++){r=e[h];for(u=0;u<r.buffers.length;u++)n[u].set(r.buffers[u].data,a[u]),a[u]+=r.buffers[u].data.length}if(i.attributes=r.attributes,r.indexBuffer){i.indexBuffer=i.buffers[r.buffers.indexOf(r.indexBuffer)],i.indexBuffer.type=s.mr.ELEMENT_ARRAY_BUFFER;var c=0,l=0,d=0,p=0;for(h=0;h<r.buffers.length;h++)if(r.buffers[h]!==r.indexBuffer){p=h;break}for(var h in r.attributes){var y=r.attributes[h];(0|y.buffer)===p&&(l+=y.size*nt[y.type]/4)}for(h=0;h<e.length;h++){var m=e[h].indexBuffer.data;for(u=0;u<m.length;u++)i.indexBuffer.data[u+d]+=c;c+=e[h].buffers[p].data.length/l,d+=m.length}}return i},t}(),ht=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ut=function(t){function e(){var e=t.call(this)||this;return e.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2]),e}return ht(e,t),e}(at),ct=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),lt=function(t){function e(){var e=t.call(this)||this;return e.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),e.uvs=new Float32Array([0,0,1,0,1,1,0,1]),e.vertexBuffer=new rt(e.vertices),e.uvBuffer=new rt(e.uvs),e.addAttribute("aVertexPosition",e.vertexBuffer).addAttribute("aTextureCoord",e.uvBuffer).addIndex([0,1,2,0,2,3]),e}return ct(e,t),e.prototype.map=function(t,e){var r=0,i=0;return this.uvs[0]=r,this.uvs[1]=i,this.uvs[2]=r+e.width/t.width,this.uvs[3]=i,this.uvs[4]=r+e.width/t.width,this.uvs[5]=i+e.height/t.height,this.uvs[6]=r,this.uvs[7]=i+e.height/t.height,r=e.x,i=e.y,this.vertices[0]=r,this.vertices[1]=i,this.vertices[2]=r+e.width,this.vertices[3]=i,this.vertices[4]=r+e.width,this.vertices[5]=i+e.height,this.vertices[6]=r,this.vertices[7]=i+e.height,this.invalidate(),this},e.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},e}(at),ft=0,dt=function(){function t(t,e,r){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=ft++,this.static=!!e,this.ubo=!!r,t instanceof rt?(this.buffer=t,this.buffer.type=s.mr.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new rt(new Float32Array(1)),this.buffer.type=s.mr.UNIFORM_BUFFER,this.autoManage=!0))}return t.prototype.update=function(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()},t.prototype.add=function(e,r,i){if(this.ubo)throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them");this.uniforms[e]=new t(r,i)},t.from=function(e,r,i){return new t(e,r,i)},t.uboFrom=function(e,r){return new t(e,null==r||r,!0)},t}(),pt=function(){function t(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=s.G5.NONE,this.sourceFrame=new V.Ae,this.destinationFrame=new V.Ae,this.bindingSourceFrame=new V.Ae,this.bindingDestinationFrame=new V.Ae,this.filters=[],this.transform=null}return t.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null},t}(),yt=[new V.E9,new V.E9,new V.E9,new V.E9],mt=new V.y3,vt=function(){function t(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new J,this.texturePool.setScreenSize(t.view),this.statePool=[],this.quad=new ut,this.quadUv=new lt,this.tempRect=new V.Ae,this.activeState={},this.globalUniforms=new dt({outputFrame:new V.Ae,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}return t.prototype.push=function(t,e){for(var r=this.renderer,i=this.defaultFilterStack,n=this.statePool.pop()||new pt,o=this.renderer.renderTexture,s=e[0].resolution,a=e[0].multisample,h=e[0].padding,u=e[0].autoFit,c=e[0].legacy,l=1;l<e.length;l++){var f=e[l];s=Math.min(s,f.resolution),a=Math.min(a,f.multisample),h=this.useMaxPadding?Math.max(h,f.padding):h+f.padding,u=u&&f.autoFit,c=c||f.legacy}if(1===i.length&&(this.defaultFilterStack[0].renderTexture=o.current),i.push(n),n.resolution=s,n.multisample=a,n.legacy=c,n.target=t,n.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),n.sourceFrame.pad(h),u){var d=this.tempRect.copyFrom(o.sourceFrame);r.projection.transform&&this.transformAABB(mt.copyFrom(r.projection.transform).invert(),d),n.sourceFrame.fit(d)}this.roundFrame(n.sourceFrame,o.current?o.current.resolution:r.resolution,o.sourceFrame,o.destinationFrame,r.projection.transform),n.renderTexture=this.getOptimalFilterTexture(n.sourceFrame.width,n.sourceFrame.height,s,a),n.filters=e,n.destinationFrame.width=n.renderTexture.width,n.destinationFrame.height=n.renderTexture.height;var p=this.tempRect;p.x=0,p.y=0,p.width=n.sourceFrame.width,p.height=n.sourceFrame.height,n.renderTexture.filterFrame=n.sourceFrame,n.bindingSourceFrame.copyFrom(o.sourceFrame),n.bindingDestinationFrame.copyFrom(o.destinationFrame),n.transform=r.projection.transform,r.projection.transform=null,o.bind(n.renderTexture,n.sourceFrame,p),r.framebuffer.clear(0,0,0,0)},t.prototype.pop=function(){var t=this.defaultFilterStack,e=t.pop(),r=e.filters;this.activeState=e;var i=this.globalUniforms.uniforms;i.outputFrame=e.sourceFrame,i.resolution=e.resolution;var n=i.inputSize,o=i.inputPixel,a=i.inputClamp;if(n[0]=e.destinationFrame.width,n[1]=e.destinationFrame.height,n[2]=1/n[0],n[3]=1/n[1],o[0]=Math.round(n[0]*e.resolution),o[1]=Math.round(n[1]*e.resolution),o[2]=1/o[0],o[3]=1/o[1],a[0]=.5*o[2],a[1]=.5*o[3],a[2]=e.sourceFrame.width*n[2]-.5*o[2],a[3]=e.sourceFrame.height*n[3]-.5*o[3],e.legacy){var h=i.filterArea;h[0]=e.destinationFrame.width,h[1]=e.destinationFrame.height,h[2]=e.sourceFrame.x,h[3]=e.sourceFrame.y,i.filterClamp=i.inputClamp}this.globalUniforms.update();var u=t[t.length-1];if(this.renderer.framebuffer.blit(),1===r.length)r[0].apply(this,e.renderTexture,u.renderTexture,s.yl.BLEND,e),this.returnFilterTexture(e.renderTexture);else{var c=e.renderTexture,l=this.getOptimalFilterTexture(c.width,c.height,e.resolution);l.filterFrame=c.filterFrame;var f=0;for(f=0;f<r.length-1;++f){1===f&&e.multisample>1&&((l=this.getOptimalFilterTexture(c.width,c.height,e.resolution)).filterFrame=c.filterFrame),r[f].apply(this,c,l,s.yl.CLEAR,e);var d=c;c=l,l=d}r[f].apply(this,c,u.renderTexture,s.yl.BLEND,e),f>1&&e.multisample>1&&this.returnFilterTexture(e.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(l)}e.clear(),this.statePool.push(e)},t.prototype.bindAndClear=function(t,e){void 0===e&&(e=s.yl.CLEAR);var r=this.renderer,i=r.renderTexture,n=r.state;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t&&t.filterFrame){var o=this.tempRect;o.x=0,o.y=0,o.width=t.filterFrame.width,o.height=t.filterFrame.height,i.bind(t,t.filterFrame,o)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var a=1&n.stateId||this.forceClear;(e===s.yl.CLEAR||e===s.yl.BLIT&&a)&&this.renderer.framebuffer.clear(0,0,0,0)},t.prototype.applyFilter=function(t,e,r,i){var n=this.renderer;n.state.set(t.state),this.bindAndClear(r,i),t.uniforms.uSampler=e,t.uniforms.filterGlobals=this.globalUniforms,n.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(e._frame,e.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(s.lg.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(s.lg.TRIANGLE_STRIP))},t.prototype.calculateSpriteMatrix=function(t,e){var r=this.activeState,i=r.sourceFrame,n=r.destinationFrame,o=e._texture.orig,s=t.set(n.width,0,0,n.height,i.x,i.y),a=e.worldTransform.copyTo(V.y3.TEMP_MATRIX);return a.invert(),s.prepend(a),s.scale(1/o.width,1/o.height),s.translate(e.anchor.x,e.anchor.y),s},t.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},t.prototype.getOptimalFilterTexture=function(t,e,r,i){return void 0===r&&(r=1),void 0===i&&(i=s.G5.NONE),this.texturePool.getOptimalTexture(t,e,r,i)},t.prototype.getFilterTexture=function(t,e,r){if("number"==typeof t){var i=t;t=e,e=i}t=t||this.activeState.renderTexture;var n=this.texturePool.getOptimalTexture(t.width,t.height,e||t.resolution,r||s.G5.NONE);return n.filterFrame=t.filterFrame,n},t.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},t.prototype.emptyPool=function(){this.texturePool.clear(!0)},t.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},t.prototype.transformAABB=function(t,e){var r=yt[0],i=yt[1],n=yt[2],o=yt[3];r.set(e.left,e.top),i.set(e.left,e.bottom),n.set(e.right,e.top),o.set(e.right,e.bottom),t.apply(r,r),t.apply(i,i),t.apply(n,n),t.apply(o,o);var s=Math.min(r.x,i.x,n.x,o.x),a=Math.min(r.y,i.y,n.y,o.y),h=Math.max(r.x,i.x,n.x,o.x),u=Math.max(r.y,i.y,n.y,o.y);e.x=s,e.y=a,e.width=h-s,e.height=u-a},t.prototype.roundFrame=function(t,e,r,i,n){if(n){var o=n.a,s=n.b,a=n.c,h=n.d;if((Math.abs(s)>1e-4||Math.abs(a)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(h)>1e-4))return}(n=n?mt.copyFrom(n):mt.identity()).translate(-r.x,-r.y).scale(i.width/r.width,i.height/r.height).translate(i.x,i.y),this.transformAABB(n,t),t.ceil(e),this.transformAABB(n.invert(),t)},t}(),_t=function(){function t(t){this.renderer=t}return t.prototype.flush=function(){},t.prototype.destroy=function(){this.renderer=null},t.prototype.start=function(){},t.prototype.stop=function(){this.flush()},t.prototype.render=function(t){},t}(),gt=function(){function t(t){this.renderer=t,this.emptyRenderer=new _t(t),this.currentRenderer=this.emptyRenderer}return t.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},t.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.copyBoundTextures=function(t,e){for(var r=this.renderer.texture.boundTextures,i=e-1;i>=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)},t.prototype.boundArray=function(t,e,r,i){for(var n=t.elements,o=t.ids,s=t.count,a=0,h=0;h<s;h++){var u=n[h],c=u._batchLocation;if(c>=0&&c<i&&e[c]===u)o[h]=c;else for(;a<i;){var l=e[a];if(!l||l._batchEnabled!==r||l._batchLocation!==a){o[h]=a,u._batchLocation=a,e[a]=u;break}a++}}},t.prototype.destroy=function(){this.renderer=null},t}(),xt=(wx.window,0),bt=function(){function t(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),t.view.addEventListener("webglcontextlost",this.handleContextLost,!1),t.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}return Object.defineProperty(t.prototype,"isLost",{get:function(){return!this.gl||this.gl.isContextLost()},enumerable:!1,configurable:!0}),t.prototype.contextChange=function(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=xt++,t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext()},t.prototype.initFromContext=function(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=xt++,this.renderer.runners.contextChange.emit(t)},t.prototype.initFromOptions=function(t){var e=this.createContext(this.renderer.view,t);this.initFromContext(e)},t.prototype.createContext=function(t,e){var r;return r=t.getContext("webgl",e),this.gl=r,this.getExtensions(),this.gl},t.prototype.getExtensions=function(){var t=this.gl,e={anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};1===this.webGLVersion?Object.assign(this.extensions,e,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,e,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})},t.prototype.handleContextLost=function(t){t.preventDefault()},t.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},t.prototype.destroy=function(){var t=this.renderer.view;this.renderer=null,t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},t.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},t.prototype.validateContext=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var e=!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=e,e||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},t}(),Tt=function(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=s.G5.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0},Et=new V.Ae,wt=function(){function t(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new X(10,10),this.msaaSamples=null}return t.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new V.Ae,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,r=this.renderer.context.extensions.depthTexture;o.X.PREFER_ENV===s.Vi.WEBGL_LEGACY&&(e=null,r=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),r||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},t.prototype.bind=function(t,e,r){void 0===r&&(r=0);var i=this.gl;if(t){var n=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,i.bindFramebuffer(i.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==r&&(t.dirtyId++,t.dirtyFormat++,n.mipLevel=r),n.dirtyId!==t.dirtyId&&(n.dirtyId=t.dirtyId,n.dirtyFormat!==t.dirtyFormat?(n.dirtyFormat=t.dirtyFormat,n.dirtySize=t.dirtySize,this.updateFramebuffer(t,r)):n.dirtySize!==t.dirtySize&&(n.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var o=0;o<t.colorTextures.length;o++){var s=t.colorTextures[o];this.renderer.texture.unbind(s.parentTextureArray||s)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),e){var a=e.width>>r,h=e.height>>r,u=a/e.width;this.setViewport(e.x*u,e.y*u,a,h)}else{a=t.width>>r,h=t.height>>r;this.setViewport(0,0,a,h)}}else this.current&&(this.current=null,i.bindFramebuffer(i.FRAMEBUFFER,null)),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},t.prototype.setViewport=function(t,e,r,i){var n=this.viewport;t=Math.round(t),e=Math.round(e),r=Math.round(r),i=Math.round(i),n.width===r&&n.height===i&&n.x===t&&n.y===e||(n.x=t,n.y=e,n.width=r,n.height=i,this.gl.viewport(t,e,r,i))},Object.defineProperty(t.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),t.prototype.clear=function(t,e,r,i,n){void 0===n&&(n=s.V0.COLOR|s.V0.DEPTH);var o=this.gl;o.clearColor(t,e,r,i),o.clear(n)},t.prototype.initFramebuffer=function(t){var e=this.gl,r=new Tt(e.createFramebuffer());return r.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=r,this.managedFramebuffers.push(t),t.disposeRunner.add(this),r},t.prototype.resizeFramebuffer=function(t){var e=this.gl,r=t.glFramebuffers[this.CONTEXT_UID];r.msaaBuffer&&(e.bindRenderbuffer(e.RENDERBUFFER,r.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,r.multisample,e.RGBA8,t.width,t.height)),r.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,r.stencil),r.msaaBuffer?e.renderbufferStorageMultisample(e.RENDERBUFFER,r.multisample,e.DEPTH24_STENCIL8,t.width,t.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height));var i=t.colorTextures,n=i.length;e.drawBuffers||(n=Math.min(n,1));for(var o=0;o<n;o++){var s=i[o],a=s.parentTextureArray||s;this.renderer.texture.bind(a,0)}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)},t.prototype.updateFramebuffer=function(t,e){var r=this.gl,i=t.glFramebuffers[this.CONTEXT_UID],n=t.colorTextures,o=n.length;r.drawBuffers||(o=Math.min(o,1)),i.multisample>1&&this.canMultisampleFramebuffer(t)?(i.msaaBuffer=i.msaaBuffer||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.msaaBuffer),r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.RGBA8,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,i.msaaBuffer)):i.msaaBuffer&&(r.deleteRenderbuffer(i.msaaBuffer),i.msaaBuffer=null,i.blitFramebuffer&&(i.blitFramebuffer.dispose(),i.blitFramebuffer=null));for(var s=[],a=0;a<o;a++){var h=n[a],u=h.parentTextureArray||h;this.renderer.texture.bind(u,0),0===a&&i.msaaBuffer||(r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+a,h.target,u._glTextures[this.CONTEXT_UID].texture,e),s.push(r.COLOR_ATTACHMENT0+a))}if((s.length>1&&r.drawBuffers(s),t.depthTexture)&&this.writeDepthTexture){var c=t.depthTexture;this.renderer.texture.bind(c,0),r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,c._glTextures[this.CONTEXT_UID].texture,e)}!t.stencil&&!t.depth||t.depthTexture&&this.writeDepthTexture?i.stencil&&(r.deleteRenderbuffer(i.stencil),i.stencil=null):(i.stencil=i.stencil||r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,i.stencil),i.msaaBuffer?r.renderbufferStorageMultisample(r.RENDERBUFFER,i.multisample,r.DEPTH24_STENCIL8,t.width,t.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,t.width,t.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,i.stencil))},t.prototype.canMultisampleFramebuffer=function(t){return 1!==this.renderer.context.webGLVersion&&t.colorTextures.length<=1&&!t.depthTexture},t.prototype.detectSamples=function(t){var e=this.msaaSamples,r=s.G5.NONE;if(t<=1||null===e)return r;for(var i=0;i<e.length;i++)if(e[i]<=t){r=e[i];break}return 1===r&&(r=s.G5.NONE),r},t.prototype.blit=function(t,e,r){var i=this,n=i.current,o=i.renderer,s=i.gl,a=i.CONTEXT_UID;if(2===o.context.webGLVersion&&n){var h=n.glFramebuffers[a];if(h){if(!t){if(!h.msaaBuffer)return;var u=n.colorTextures[0];if(!u)return;h.blitFramebuffer||(h.blitFramebuffer=new X(n.width,n.height),h.blitFramebuffer.addColorTexture(0,u)),(t=h.blitFramebuffer).colorTextures[0]!==u&&(t.colorTextures[0]=u,t.dirtyId++,t.dirtyFormat++),t.width===n.width&&t.height===n.height||(t.width=n.width,t.height=n.height,t.dirtyId++,t.dirtySize++)}e||((e=Et).width=n.width,e.height=n.height),r||(r=e);var c=e.width===r.width&&e.height===r.height;this.bind(t),s.bindFramebuffer(s.READ_FRAMEBUFFER,h.framebuffer),s.blitFramebuffer(e.x,e.y,e.width,e.height,r.x,r.y,r.width,r.height,s.COLOR_BUFFER_BIT,c?s.NEAREST:s.LINEAR)}}},t.prototype.disposeFramebuffer=function(t,e){var r=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(r){delete t.glFramebuffers[this.CONTEXT_UID];var n=this.managedFramebuffers.indexOf(t);n>=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),e||(i.deleteFramebuffer(r.framebuffer),r.msaaBuffer&&i.deleteRenderbuffer(r.msaaBuffer),r.stencil&&i.deleteRenderbuffer(r.stencil)),r.blitFramebuffer&&r.blitFramebuffer.dispose()}},t.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r<e.length;r++)this.disposeFramebuffer(e[r],t)},t.prototype.forceStencil=function(){var t=this.current;if(t){var e=t.glFramebuffers[this.CONTEXT_UID];if(e&&!e.stencil){t.stencil=!0;var r=t.width,i=t.height,n=this.gl,o=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,o),e.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,e.multisample,n.DEPTH24_STENCIL8,r,i):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,r,i),e.stencil=o,n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,o)}}},t.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new V.Ae},t.prototype.destroy=function(){this.renderer=null},t}(),St={5126:4,5123:2,5121:1},At=function(){function t(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}return t.prototype.contextChange=function(){this.disposeAll(!0);var t=this.gl=this.renderer.gl,e=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,2!==e.webGLVersion){var r=this.renderer.context.extensions.vertexArrayObject;o.X.PREFER_ENV===s.Vi.WEBGL_LEGACY&&(r=null),r?(t.createVertexArray=function(){return r.createVertexArrayOES()},t.bindVertexArray=function(t){return r.bindVertexArrayOES(t)},t.deleteVertexArray=function(t){return r.deleteVertexArrayOES(t)}):(this.hasVao=!1,t.createVertexArray=function(){return null},t.bindVertexArray=function(){return null},t.deleteVertexArray=function(){return null})}if(2!==e.webGLVersion){var i=t.getExtension("ANGLE_instanced_arrays");i?(t.vertexAttribDivisor=function(t,e){return i.vertexAttribDivisorANGLE(t,e)},t.drawElementsInstanced=function(t,e,r,n,o){return i.drawElementsInstancedANGLE(t,e,r,n,o)},t.drawArraysInstanced=function(t,e,r,n){return i.drawArraysInstancedANGLE(t,e,r,n)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===e.webGLVersion||!!e.extensions.uint32ElementIndex},t.prototype.bind=function(t,e){e=e||this.renderer.shader.shader;var r=this.gl,i=t.glVertexArrayObjects[this.CONTEXT_UID],n=!1;i||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=i={},n=!0);var o=i[e.program.id]||this.initGeometryVao(t,e,n);this._activeGeometry=t,this._activeVao!==o&&(this._activeVao=o,this.hasVao?r.bindVertexArray(o):this.activateVao(t,e.program)),this.updateBuffers()},t.prototype.reset=function(){this.unbind()},t.prototype.updateBuffers=function(){for(var t=this._activeGeometry,e=this.renderer.buffer,r=0;r<t.buffers.length;r++){var i=t.buffers[r];e.update(i)}},t.prototype.checkCompatibility=function(t,e){var r=t.attributes,i=e.attributeData;for(var n in i)if(!r[n])throw new Error('shader and geometry incompatible, geometry missing the "'.concat(n,'" attribute'))},t.prototype.getSignature=function(t,e){var r=t.attributes,i=e.attributeData,n=["g",t.id];for(var o in r)i[o]&&n.push(o);return n.join("-")},t.prototype.initGeometryVao=function(t,e,r){void 0===r&&(r=!0);var i=this.gl,n=this.CONTEXT_UID,o=this.renderer.buffer,s=e.program;s.glPrograms[n]||this.renderer.shader.generateProgram(e),this.checkCompatibility(t,s);var a=this.getSignature(t,s),h=t.glVertexArrayObjects[this.CONTEXT_UID],u=h[a];if(u)return h[s.id]=u,u;var c=t.buffers,l=t.attributes,f={},d={};for(var p in c)f[p]=0,d[p]=0;for(var p in l)!l[p].size&&s.attributeData[p]?l[p].size=s.attributeData[p].size:l[p].size||console.warn("PIXI Geometry attribute '".concat(p,"' size cannot be determined (likely the bound shader does not have the attribute)")),f[l[p].buffer]+=l[p].size*St[l[p].type];for(var p in l){var y=l[p],m=y.size;void 0===y.stride&&(f[y.buffer]===m*St[y.type]?y.stride=0:y.stride=f[y.buffer]),void 0===y.start&&(y.start=d[y.buffer],d[y.buffer]+=m*St[y.type])}u=i.createVertexArray(),i.bindVertexArray(u);for(var v=0;v<c.length;v++){var _=c[v];o.bind(_),r&&_._glBuffers[n].refCount++}return this.activateVao(t,s),this._activeVao=u,h[s.id]=u,h[a]=u,u},t.prototype.disposeGeometry=function(t,e){var r;if(this.managedGeometries[t.id]){delete this.managedGeometries[t.id];var i=t.glVertexArrayObjects[this.CONTEXT_UID],n=this.gl,o=t.buffers,s=null===(r=this.renderer)||void 0===r?void 0:r.buffer;if(t.disposeRunner.remove(this),i){if(s)for(var a=0;a<o.length;a++){var h=o[a]._glBuffers[this.CONTEXT_UID];h&&(h.refCount--,0!==h.refCount||e||s.dispose(o[a],e))}if(!e)for(var u in i)if("g"===u[0]){var c=i[u];this._activeVao===c&&this.unbind(),n.deleteVertexArray(c)}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}},t.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedGeometries),r=0;r<e.length;r++)this.disposeGeometry(this.managedGeometries[e[r]],t)},t.prototype.activateVao=function(t,e){var r=this.gl,i=this.CONTEXT_UID,n=this.renderer.buffer,o=t.buffers,s=t.attributes;t.indexBuffer&&n.bind(t.indexBuffer);var a=null;for(var h in s){var u=s[h],c=o[u.buffer],l=c._glBuffers[i];if(e.attributeData[h]){a!==l&&(n.bind(c),a=l);var f=e.attributeData[h].location;if(r.enableVertexAttribArray(f),r.vertexAttribPointer(f,u.size,u.type||r.FLOAT,u.normalized,u.stride,u.start),u.instance){if(!this.hasInstance)throw new Error("geometry error, GPU Instancing is not supported on this device");r.vertexAttribDivisor(f,1)}}}},t.prototype.draw=function(t,e,r,i){var n=this.gl,o=this._activeGeometry;if(o.indexBuffer){var s=o.indexBuffer.data.BYTES_PER_ELEMENT,a=2===s?n.UNSIGNED_SHORT:n.UNSIGNED_INT;2===s||4===s&&this.canUseUInt32ElementIndex?o.instanced?n.drawElementsInstanced(t,e||o.indexBuffer.data.length,a,(r||0)*s,i||1):n.drawElements(t,e||o.indexBuffer.data.length,a,(r||0)*s):console.warn("unsupported index buffer type: uint32")}else o.instanced?n.drawArraysInstanced(t,r,e||o.getSize(),i||1):n.drawArrays(t,r,e||o.getSize());return this},t.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},t.prototype.destroy=function(){this.renderer=null},t}(),Ot=function(){function t(t){void 0===t&&(t=null),this.type=s.A7.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=o.X.FILTER_MULTISAMPLE,this.enabled=!0,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._target=null}return Object.defineProperty(t.prototype,"filter",{get:function(){return this._filters?this._filters[0]:null},set:function(t){t?this._filters?this._filters[0]=t:this._filters=[t]:this._filters=null},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.pooled&&(this.maskObject=null,this.type=s.A7.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null},t.prototype.copyCountersOrReset=function(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)},t}(),It=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s},Pt=function(t,e,r){if(r||2===arguments.length)for(var i,n=0,o=e.length;n<o;n++)!i&&n in e||(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))};function Ct(t,e){var r=t.getShaderSource(e).split("\n").map((function(t,e){return"".concat(e,": ").concat(t)})),i=t.getShaderInfoLog(e),n=i.split("\n"),o={},s=n.map((function(t){return parseFloat(t.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))})).filter((function(t){return!(!t||o[t])&&(o[t]=!0,!0)})),a=[""];s.forEach((function(t){r[t-1]="%c".concat(r[t-1],"%c"),a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")}));var h=r.join("\n");a[0]=h,console.error(i),console.warn.apply(console,Pt([],It(a),!1)),console.groupEnd()}var Rt,Mt={},Dt=Mt;function Nt(){if(Dt===Mt||Dt&&Dt.isContextLost()){var t=void 0;"undefined"!=typeof document?t=document&&document.createElement("canvas"):"undefined"!=typeof OffscreenCanvas&&(t=new OffscreenCanvas(1,1)),wx&&"undefined"!=typeof wx&&(t=wx.createCanvas("webgl"));var e=void 0;e||((e=t.getContext("webgl",{}))?e.getExtension("WEBGL_draw_buffers"):e=null),Dt=e}return Dt}function Lt(t,e,r){if("precision"!==t.substring(0,9)){var i=e;return e===s.cB.HIGH&&r!==s.cB.HIGH&&(i=s.cB.MEDIUM),"precision ".concat(i," float;\n").concat(t)}return r!==s.cB.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var Ft={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Bt(t){return Ft[t]}var Ut=null,kt={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function jt(t,e){if(!Ut){var r=Object.keys(kt);Ut={};for(var i=0;i<r.length;++i){var n=r[i];Ut[t[n]]=kt[n]}}return Ut[e]}var Gt=[{test:function(t){return"float"===t.type&&1===t.size},code:function(t){return'\n if(uv["'.concat(t,'"] !== ud["').concat(t,'"].value)\n {\n ud["').concat(t,'"].value = uv["').concat(t,'"]\n gl.uniform1f(ud["').concat(t,'"].location, uv["').concat(t,'"])\n }\n ')}},{test:function(t){return("sampler2D"===t.type||"samplerCube"===t.type||"sampler2DArray"===t.type)&&1===t.size&&!t.isArray},code:function(t){return't = syncData.textureCount++;\n\n renderer.texture.bind(uv["'.concat(t,'"], t);\n\n if(ud["').concat(t,'"].value !== t)\n {\n ud["').concat(t,'"].value = t;\n gl.uniform1i(ud["').concat(t,'"].location, t);\n; // eslint-disable-line max-len\n }')}},{test:function(t,e){return"mat3"===t.type&&1===t.size&&void 0!==e.a},code:function(t){return'\n gl.uniformMatrix3fv(ud["'.concat(t,'"].location, false, uv["').concat(t,'"].toArray(true));\n ')},codeUbo:function(t){return"\n var ".concat(t,"_matrix = uv.").concat(t,".toArray(true);\n\n data[offset] = ").concat(t,"_matrix[0];\n data[offset+1] = ").concat(t,"_matrix[1];\n data[offset+2] = ").concat(t,"_matrix[2];\n \n data[offset + 4] = ").concat(t,"_matrix[3];\n data[offset + 5] = ").concat(t,"_matrix[4];\n data[offset + 6] = ").concat(t,"_matrix[5];\n \n data[offset + 8] = ").concat(t,"_matrix[6];\n data[offset + 9] = ").concat(t,"_matrix[7];\n data[offset + 10] = ").concat(t,"_matrix[8];\n ")}},{test:function(t,e){return"vec2"===t.type&&1===t.size&&void 0!==e.x},code:function(t){return'\n cv = ud["'.concat(t,'"].value;\n v = uv["').concat(t,'"];\n\n if(cv[0] !== v.x || cv[1] !== v.y)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n gl.uniform2f(ud["').concat(t,'"].location, v.x, v.y);\n }')},codeUbo:function(t){return"\n v = uv.".concat(t,";\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n ")}},{test:function(t){return"vec2"===t.type&&1===t.size},code:function(t){return'\n cv = ud["'.concat(t,'"].value;\n v = uv["').concat(t,'"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n gl.uniform2f(ud["').concat(t,'"].location, v[0], v[1]);\n }\n ')}},{test:function(t,e){return"vec4"===t.type&&1===t.size&&void 0!==e.width},code:function(t){return'\n cv = ud["'.concat(t,'"].value;\n v = uv["').concat(t,'"];\n\n if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n {\n cv[0] = v.x;\n cv[1] = v.y;\n cv[2] = v.width;\n cv[3] = v.height;\n gl.uniform4f(ud["').concat(t,'"].location, v.x, v.y, v.width, v.height)\n }')},codeUbo:function(t){return"\n v = uv.".concat(t,";\n\n data[offset] = v.x;\n data[offset+1] = v.y;\n data[offset+2] = v.width;\n data[offset+3] = v.height;\n ")}},{test:function(t){return"vec4"===t.type&&1===t.size},code:function(t){return'\n cv = ud["'.concat(t,'"].value;\n v = uv["').concat(t,'"];\n\n if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(ud["').concat(t,'"].location, v[0], v[1], v[2], v[3])\n }')}}],Xt={float:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1f(location, v);\n }",vec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2f(location, v[0], v[1])\n }",vec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3f(location, v[0], v[1], v[2])\n }",vec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4f(location, v[0], v[1], v[2], v[3]);\n }",int:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1i(location, v);\n }",ivec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",ivec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }",ivec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",uint:"\n if (cv !== v)\n {\n cu.value = v;\n\n gl.uniform1ui(location, v);\n }",uvec2:"\n if (cv[0] !== v[0] || cv[1] !== v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2ui(location, v[0], v[1]);\n }",uvec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3ui(location, v[0], v[1], v[2]);\n }",uvec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4ui(location, v[0], v[1], v[2], v[3]);\n }",bool:"\n if (cv !== v)\n {\n cu.value = v;\n gl.uniform1i(location, v);\n }",bvec2:"\n if (cv[0] != v[0] || cv[1] != v[1])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n\n gl.uniform2i(location, v[0], v[1]);\n }",bvec3:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n\n gl.uniform3i(location, v[0], v[1], v[2]);\n }",bvec4:"\n if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n {\n cv[0] = v[0];\n cv[1] = v[1];\n cv[2] = v[2];\n cv[3] = v[3];\n\n gl.uniform4i(location, v[0], v[1], v[2], v[3]);\n }",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},Ht={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};var Yt,Vt=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function zt(t){for(var e="",r=0;r<t;++r)r>0&&(e+="\nelse "),r<t-1&&(e+="if(test == ".concat(r,".0){}"));return e}function Wt(t,e){if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var r=e.createShader(e.FRAGMENT_SHADER);;){var i=Vt.replace(/%forloop%/gi,zt(t));if(e.shaderSource(r,i),e.compileShader(r),e.getShaderParameter(r,e.COMPILE_STATUS))break;t=t/2|0}return t}var qt=0,Kt={},$t=function(){function t(e,r,i){void 0===i&&(i="pixi-shader"),this.id=qt++,this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=r||t.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),"#version"!==this.vertexSrc.substring(0,8)&&(i=i.replace(/\s+/g,"-"),Kt[i]?(Kt[i]++,i+="-".concat(Kt[i])):Kt[i]=1,this.vertexSrc="#define SHADER_NAME ".concat(i,"\n").concat(this.vertexSrc),this.fragmentSrc="#define SHADER_NAME ".concat(i,"\n").concat(this.fragmentSrc),this.vertexSrc=Lt(this.vertexSrc,o.X.PRECISION_VERTEX,s.cB.HIGH),this.fragmentSrc=Lt(this.fragmentSrc,o.X.PRECISION_FRAGMENT,function(){if(!Rt){Rt=s.cB.MEDIUM;var t=Nt();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);Rt=e.precision?s.cB.HIGH:s.cB.MEDIUM}}return Rt}())),this.glPrograms={},this.syncUniforms=null}return Object.defineProperty(t,"defaultVertexSrc",{get:function(){return"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}\n"},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentSrc",{get:function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}"},enumerable:!1,configurable:!0}),t.from=function(e,r,i){var n=e+r,o=f.GG[n];return o||(f.GG[n]=o=new t(e,r,i)),o},t}(),Zt=function(){function t(t,e){this.uniformBindCount=0,this.program=t,this.uniformGroup=e?e instanceof dt?e:new dt(e):new dt({})}return t.prototype.checkUniformExists=function(t,e){if(e.uniforms[t])return!0;for(var r in e.uniforms){var i=e.uniforms[r];if(i.group&&this.checkUniformExists(t,i))return!0}return!1},t.prototype.destroy=function(){this.uniformGroup=null},Object.defineProperty(t.prototype,"uniforms",{get:function(){return this.uniformGroup.uniforms},enumerable:!1,configurable:!0}),t.from=function(e,r,i){return new t($t.from(e,r),i)},t}(),Qt=function(){function t(){this.data=0,this.blendMode=s.T$.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}return Object.defineProperty(t.prototype,"blend",{get:function(){return!!(1&this.data)},set:function(t){!!(1&this.data)!==t&&(this.data^=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsets",{get:function(){return!!(2&this.data)},set:function(t){!!(2&this.data)!==t&&(this.data^=2)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"culling",{get:function(){return!!(4&this.data)},set:function(t){!!(4&this.data)!==t&&(this.data^=4)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthTest",{get:function(){return!!(8&this.data)},set:function(t){!!(8&this.data)!==t&&(this.data^=8)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthMask",{get:function(){return!!(32&this.data)},set:function(t){!!(32&this.data)!==t&&(this.data^=32)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clockwiseFrontFace",{get:function(){return!!(16&this.data)},set:function(t){!!(16&this.data)!==t&&(this.data^=16)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){this.blend=t!==s.T$.NONE,this._blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"polygonOffset",{get:function(){return this._polygonOffset},set:function(t){this.offsets=!!t,this._polygonOffset=t},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"[@pixi/core:State "+"blendMode=".concat(this.blendMode," ")+"clockwiseFrontFace=".concat(this.clockwiseFrontFace," ")+"culling=".concat(this.culling," ")+"depthMask=".concat(this.depthMask," ")+"polygonOffset=".concat(this.polygonOffset)+"]"},t.for2d=function(){var e=new t;return e.depthTest=!1,e.blend=!0,e},t}();var Jt=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),te=function(t){function e(r,i,n){var s=this,a=$t.from(r||e.defaultVertexSrc,i||e.defaultFragmentSrc);return(s=t.call(this,a,n)||this).padding=0,s.resolution=o.X.FILTER_RESOLUTION,s.multisample=o.X.FILTER_MULTISAMPLE,s.enabled=!0,s.autoFit=!0,s.state=new Qt,s}return Jt(e,t),e.prototype.apply=function(t,e,r,i,n){t.applyFilter(this,e,r,i)},Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(t){this._resolution=t},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultVertexSrc",{get:function(){return"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n"},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultFragmentSrc",{get:function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"},enumerable:!1,configurable:!0}),e}(Zt);var ee=new V.y3,re=function(){function t(t,e){this._texture=t,this.mapCoord=new V.y3,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=void 0===e?.5:e,this.isSimple=!1}return Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture=t,this._textureID=-1},enumerable:!1,configurable:!0}),t.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var r=this.mapCoord,i=0;i<t.length;i+=2){var n=t[i],o=t[i+1];e[i]=n*r.a+o*r.c+r.tx,e[i+1]=n*r.b+o*r.d+r.ty}return e},t.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._textureID===e._updateID)return!1;this._textureID=e._updateID,this._updateID++;var r=e._uvs;this.mapCoord.set(r.x1-r.x0,r.y1-r.y0,r.x3-r.x0,r.y3-r.y0,r.x0,r.y0);var i=e.orig,n=e.trim;n&&(ee.set(i.width/n.width,0,0,i.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(ee));var o=e.baseTexture,s=this.uClampFrame,a=this.clampMargin/o.resolution,h=this.clampOffset;return s[0]=(e._frame.x+a+h)/o.width,s[1]=(e._frame.y+a+h)/o.height,s[2]=(e._frame.x+e._frame.width-a+h)/o.width,s[3]=(e._frame.y+e._frame.height-a+h)/o.height,this.uClampOffset[0]=h/o.realWidth,this.uClampOffset[1]=h/o.realHeight,this.isSimple=e._frame.width===o.width&&e._frame.height===o.height&&0===e.rotate,!0},t}(),ie=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),ne=function(t){function e(e,r,i){var n=this,o=null;return"string"!=typeof e&&void 0===r&&void 0===i&&(o=e,e=void 0,r=void 0,i=void 0),(n=t.call(this,e||"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;\n}\n",r||"varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\n\nvoid main(void)\n{\n float clip = step(3.5,\n step(maskClamp.x, vMaskCoord.x) +\n step(maskClamp.y, vMaskCoord.y) +\n step(vMaskCoord.x, maskClamp.z) +\n step(vMaskCoord.y, maskClamp.w));\n\n vec4 original = texture2D(uSampler, vTextureCoord);\n\n vec4 masky = texture2D(mask, vMaskCoord);\n \n float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n original *= (alphaMul * masky.r * alpha * clip);\n\n gl_FragColor = original;\n}\n",i)||this).maskSprite=o,n.maskMatrix=new V.y3,n}return ie(e,t),Object.defineProperty(e.prototype,"maskSprite",{get:function(){return this._maskSprite},set:function(t){this._maskSprite=t,this._maskSprite&&(this._maskSprite.renderable=!1)},enumerable:!1,configurable:!0}),e.prototype.apply=function(t,e,r,i){var n=this._maskSprite,o=n._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new re(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,n).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,t.applyFilter(this,e,r,i))},e}(te),oe=function(){function t(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return t.prototype.setMaskStack=function(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)},t.prototype.push=function(t,e){var r=e;if(!r.isMaskData){var i=this.maskDataPool.pop()||new Ot;i.pooled=!0,i.maskObject=e,r=i}var n=0!==this.maskStack.length?this.maskStack[this.maskStack.length-1]:null;if(r.copyCountersOrReset(n),r.autoDetect&&this.detect(r),r._target=t,r.type!==s.A7.SPRITE&&this.maskStack.push(r),r.enabled)switch(r.type){case s.A7.SCISSOR:this.renderer.scissor.push(r);break;case s.A7.STENCIL:this.renderer.stencil.push(r);break;case s.A7.SPRITE:r.copyCountersOrReset(null),this.pushSpriteMask(r)}r.type===s.A7.SPRITE&&this.maskStack.push(r)},t.prototype.pop=function(t){var e=this.maskStack.pop();if(e&&e._target===t){if(e.enabled)switch(e.type){case s.A7.SCISSOR:this.renderer.scissor.pop();break;case s.A7.STENCIL:this.renderer.stencil.pop(e.maskObject);break;case s.A7.SPRITE:this.popSpriteMask(e)}if(e.reset(),e.pooled&&this.maskDataPool.push(e),0!==this.maskStack.length){var r=this.maskStack[this.maskStack.length-1];r.type===s.A7.SPRITE&&r._filters&&(r._filters[0].maskSprite=r.maskObject)}}},t.prototype.detect=function(t){t.maskObject.isSprite?t.type=s.A7.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(t)?t.type=s.A7.SCISSOR:t.type=s.A7.STENCIL},t.prototype.pushSpriteMask=function(t){var e,r,i=t.maskObject,n=t._target,o=t._filters;o||(o=this.alphaMaskPool[this.alphaMaskIndex])||(o=this.alphaMaskPool[this.alphaMaskIndex]=[new ne]);var s,a,h=this.renderer,u=h.renderTexture;if(u.current){var c=u.current;s=t.resolution||c.resolution,a=null!==(e=t.multisample)&&void 0!==e?e:c.multisample}else s=t.resolution||h.resolution,a=null!==(r=t.multisample)&&void 0!==r?r:h.multisample;o[0].resolution=s,o[0].multisample=a,o[0].maskSprite=i;var l=n.filterArea;n.filterArea=i.getBounds(!0),h.filter.push(n,o),n.filterArea=l,t._filters||this.alphaMaskIndex++},t.prototype.popSpriteMask=function(t){this.renderer.filter.pop(),t._filters?t._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)},t.prototype.destroy=function(){this.renderer=null},t}(),se=function(){function t(t){this.renderer=t,this.maskStack=[],this.glConst=0}return t.prototype.getStackLength=function(){return this.maskStack.length},t.prototype.setMaskStack=function(t){var e=this.renderer.gl,r=this.getStackLength();this.maskStack=t;var i=this.getStackLength();i!==r&&(0===i?e.disable(this.glConst):(e.enable(this.glConst),this._useCurrent()))},t.prototype._useCurrent=function(){},t.prototype.destroy=function(){this.renderer=null,this.maskStack=null},t}(),ae=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),he=new V.y3,ue=function(t){function e(e){return t.call(this,e)||this}return ae(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0},e.prototype.calcScissorRect=function(t){if(!t._scissorRectLocal){var e=t._scissorRect,r=t.maskObject,i=this.renderer,n=i.renderTexture;r.renderable=!0;var o=r.getBounds();this.roundFrameToPixels(o,n.current?n.current.resolution:i.resolution,n.sourceFrame,n.destinationFrame,i.projection.transform),r.renderable=!1,e&&o.fit(e),t._scissorRectLocal=o}},e.isMatrixRotated=function(t){if(!t)return!1;var e=t.a,r=t.b,i=t.c,n=t.d;return(Math.abs(r)>1e-4||Math.abs(i)>1e-4)&&(Math.abs(e)>1e-4||Math.abs(n)>1e-4)},e.prototype.testScissor=function(t){var r=t.maskObject;if(!r.isFastRect||!r.isFastRect())return!1;if(e.isMatrixRotated(r.worldTransform))return!1;if(e.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(t);var i=t._scissorRectLocal;return i.width>0&&i.height>0},e.prototype.roundFrameToPixels=function(t,r,i,n,o){e.isMatrixRotated(o)||((o=o?he.copyFrom(o):he.identity()).translate(-i.x,-i.y).scale(n.width/i.width,n.height/i.height).translate(n.x,n.y),this.renderer.filter.transformAABB(o,t),t.fit(n),t.x=Math.round(t.x*r),t.y=Math.round(t.y*r),t.width=Math.round(t.width*r),t.height=Math.round(t.height*r))},e.prototype.push=function(t){t._scissorRectLocal||this.calcScissorRect(t);var e=this.renderer.gl;t._scissorRect||e.enable(e.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=t._scissorRectLocal,this._useCurrent()},e.prototype.pop=function(){var t=this.renderer.gl;this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t,e=this.maskStack[this.maskStack.length-1]._scissorRect;t=this.renderer.renderTexture.current?e.y:this.renderer.height-e.height-e.y,this.renderer.gl.scissor(e.x,t,e.width,e.height)},e}(se),ce=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),le=function(t){function e(e){return t.call(this,e)||this}return ce(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,r=this.renderer.gl,i=t._stencilCounter;0===i&&(this.renderer.framebuffer.forceStencil(),r.enable(r.STENCIL_TEST)),t._stencilCounter++,r.colorMask(!1,!1,!1,!1),r.stencilFunc(r.EQUAL,i,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clearStencil(0),e.clear(e.STENCIL_BUFFER_BIT)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e}(se),fe=function(){function t(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new V.y3,this.transform=null}return t.prototype.update=function(t,e,r,i){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,r,i),this.transform&&this.projectionMatrix.append(this.transform);var n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)},t.prototype.calculateProjection=function(t,e,r,i){var n=this.projectionMatrix,o=i?-1:1;n.identity(),n.a=1/e.width*2,n.d=o*(1/e.height*2),n.tx=-1-e.x*n.a,n.ty=-o-e.y*n.d},t.prototype.setTransform=function(t){},t.prototype.destroy=function(){this.renderer=null},t}(),de=new V.Ae,pe=new V.Ae,ye=function(){function t(t){this.renderer=t,this.clearColor=t._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new V.Ae,this.destinationFrame=new V.Ae,this.viewportFrame=new V.Ae}return t.prototype.bind=function(t,e,r){void 0===t&&(t=null);var i,n,o,s=this.renderer;this.current=t,t?(o=(i=t.baseTexture).resolution,e||(de.width=t.frame.width,de.height=t.frame.height,e=de),r||(pe.x=t.frame.x,pe.y=t.frame.y,pe.width=e.width,pe.height=e.height,r=pe),n=i.framebuffer):(o=s.resolution,e||(de.width=s.screen.width,de.height=s.screen.height,e=de),r||((r=de).width=e.width,r.height=e.height));var a=this.viewportFrame;a.x=r.x*o,a.y=r.y*o,a.width=r.width*o,a.height=r.height*o,t||(a.y=s.view.height-(a.y+a.height)),a.ceil(),this.renderer.framebuffer.bind(n,a),this.renderer.projection.update(r,e,o,!n),t?this.renderer.mask.setMaskStack(i.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(e),this.destinationFrame.copyFrom(r)},t.prototype.clear=function(t,e){t=this.current?t||this.current.baseTexture.clearColor:t||this.clearColor;var r=this.destinationFrame,i=this.current?this.current.baseTexture:this.renderer.screen,n=r.width!==i.width||r.height!==i.height;if(n){var o=this.viewportFrame,s=o.x,a=o.y,h=o.width,u=o.height;s=Math.round(s),a=Math.round(a),h=Math.round(h),u=Math.round(u),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(s,a,h,u)}this.renderer.framebuffer.clear(t[0],t[1],t[2],t[3],e),n&&this.renderer.scissor.pop()},t.prototype.resize=function(){this.bind(null)},t.prototype.reset=function(){this.bind(null)},t.prototype.destroy=function(){this.renderer=null},t}();function me(t,e,r,i,n){r.buffer.update(n)}var ve={float:"\n data[offset] = v;\n ",vec2:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n ",vec3:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n\n ",vec4:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n data[offset+3] = v[3];\n ",mat2:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n\n data[offset+4] = v[2];\n data[offset+5] = v[3];\n ",mat3:"\n data[offset] = v[0];\n data[offset+1] = v[1];\n data[offset+2] = v[2];\n\n data[offset + 4] = v[3];\n data[offset + 5] = v[4];\n data[offset + 6] = v[5];\n\n data[offset + 8] = v[6];\n data[offset + 9] = v[7];\n data[offset + 10] = v[8];\n ",mat4:"\n for(var i = 0; i < 16; i++)\n {\n data[offset + i] = v[i];\n }\n "},_e={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function ge(t){for(var e=t.map((function(t){return{data:t,offset:0,dataLen:0,dirty:0}})),r=0,i=0,n=0,o=0;o<e.length;o++){var s=e[o];if(r=_e[s.data.type],s.data.size>1&&(r=Math.max(r,16)*s.data.size),s.dataLen=r,i%r!=0&&i<16){var a=i%r%16;i+=a,n+=a}i+r>16?(n=16*Math.ceil(n/16),s.offset=n,n+=r,i=r):(s.offset=n,i+=r,n+=r)}return{uboElements:e,size:n=16*Math.ceil(n/16)}}function xe(t,e){var r=[];for(var i in t)e[i]&&r.push(e[i]);return r.sort((function(t,e){return t.index-e.index})),r}function be(t,e){if(!t.autoManage)return{size:0,syncFunc:me};for(var r=ge(xe(t.uniforms,e)),i=r.uboElements,n=r.size,o=["\n var v = null;\n var v2 = null;\n var cv = null;\n var t = 0;\n var gl = renderer.gl\n var index = 0;\n var data = buffer.data;\n "],s=0;s<i.length;s++){for(var a=i[s],h=t.uniforms[a.data.name],u=a.data.name,c=!1,l=0;l<Gt.length;l++){var f=Gt[l];if(f.codeUbo&&f.test(a.data,h)){o.push("offset = ".concat(a.offset/4,";"),Gt[l].codeUbo(a.data.name,h)),c=!0;break}}if(!c)if(a.data.size>1){var d=Bt(a.data.type),p=Math.max(_e[a.data.type]/16,1),y=d/p,m=(4-y%4)%4;o.push("\n cv = ud.".concat(u,".value;\n v = uv.").concat(u,";\n offset = ").concat(a.offset/4,";\n\n t = 0;\n\n for(var i=0; i < ").concat(a.data.size*p,"; i++)\n {\n for(var j = 0; j < ").concat(y,"; j++)\n {\n data[offset++] = v[t++];\n }\n offset += ").concat(m,";\n }\n\n "))}else{var v=ve[a.data.type];o.push("\n cv = ud.".concat(u,".value;\n v = uv.").concat(u,";\n offset = ").concat(a.offset/4,";\n ").concat(v,";\n "))}}return o.push("\n renderer.buffer.update(buffer);\n "),{size:n,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join("\n"))}}var Te=function(){},Ee=function(){function t(t,e){this.program=t,this.uniformData=e,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return t.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},t}();function we(t,e,r){var i=t.createShader(e);return t.shaderSource(i,r),t.compileShader(i),i}function Se(t){for(var e=new Array(t),r=0;r<e.length;r++)e[r]=!1;return e}function Ae(t,e){switch(t){case"float":case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return Se(2*e);case"bvec3":return Se(3*e);case"bvec4":return Se(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}function Oe(t,e){var r=we(t,t.VERTEX_SHADER,e.vertexSrc),i=we(t,t.FRAGMENT_SHADER,e.fragmentSrc),n=t.createProgram();if(t.attachShader(n,r),t.attachShader(n,i),t.linkProgram(n),t.getProgramParameter(n,t.LINK_STATUS)||function(t,e,r,i){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(r,t.COMPILE_STATUS)||Ct(t,r),t.getShaderParameter(i,t.COMPILE_STATUS)||Ct(t,i),console.error("PixiJS Error: Could not initialize shader."),""!==t.getProgramInfoLog(e)&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}(t,n,r,i),e.attributeData=function(t,e){for(var r={},i=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),n=0;n<i;n++){var o=e.getActiveAttrib(t,n);if(0!==o.name.indexOf("gl_")){var s=jt(e,o.type),a={type:s,name:o.name,size:Bt(s),location:e.getAttribLocation(t,o.name)};r[o.name]=a}}return r}(n,t),e.uniformData=function(t,e){for(var r={},i=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),n=0;n<i;n++){var o=e.getActiveUniform(t,n),s=o.name.replace(/\[.*?\]$/,""),a=!!o.name.match(/\[.*?\]$/),h=jt(e,o.type);r[s]={name:s,index:n,type:h,size:o.size,isArray:a,value:Ae(h,o.size)}}return r}(n,t),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){var o=Object.keys(e.attributeData);o.sort((function(t,e){return t>e?1:-1}));for(var s=0;s<o.length;s++)e.attributeData[o[s]].location=s,t.bindAttribLocation(n,s,o[s]);t.linkProgram(n)}t.deleteShader(r),t.deleteShader(i);var a={};for(var s in e.uniformData){var h=e.uniformData[s];a[s]={location:t.getUniformLocation(n,s),value:Ae(h.type,h.size)}}return new Ee(n,a)}var Ie=0,Pe={textureCount:0,uboCount:0},Ce=function(){function t(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Ie++}return t.prototype.systemCheck=function(){if(!function(){if("boolean"==typeof Yt)return Yt;try{var t=new Function("param1","param2","param3","return param1[param2] === param3;");Yt=!0===t({a:"b"},"a","b")}catch(t){Yt=!1}return Yt}())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},t.prototype.contextChange=function(t){this.gl=t,this.reset()},t.prototype.bind=function(t,e){t.uniforms.globals=this.renderer.globalUniforms;var r=t.program,i=r.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==r&&(this.program=r,this.gl.useProgram(i.program)),e||(Pe.textureCount=0,Pe.uboCount=0,this.syncUniformGroup(t.uniformGroup,Pe)),i},t.prototype.setUniforms=function(t){var e=this.shader.program,r=e.glPrograms[this.renderer.CONTEXT_UID];e.syncUniforms(r.uniformData,t,this.renderer)},t.prototype.syncUniformGroup=function(t,e){var r=this.getGlProgram();t.static&&t.dirtyId===r.uniformDirtyGroups[t.id]||(r.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,r,e))},t.prototype.syncUniforms=function(t,e,r){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(e.uniformData,t.uniforms,this.renderer,r)},t.prototype.createSyncGroups=function(t){var e=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[e]||(this.cache[e]=function(t,e){var r,i=["\n var v = null;\n var cv = null;\n var cu = null;\n var t = 0;\n var gl = renderer.gl;\n "];for(var n in t.uniforms){var o=e[n];if(o){for(var s=t.uniforms[n],a=!1,h=0;h<Gt.length;h++)if(Gt[h].test(o,s)){i.push(Gt[h].code(n,s)),a=!0;break}if(!a){var u=(1===o.size?Xt:Ht)[o.type].replace("location",'ud["'.concat(n,'"].location'));i.push('\n cu = ud["'.concat(n,'"];\n cv = cu.value;\n v = uv["').concat(n,'"];\n ').concat(u,";"))}}else(null===(r=t.uniforms[n])||void 0===r?void 0:r.group)&&(t.uniforms[n].ubo?i.push("\n renderer.shader.syncUniformBufferGroup(uv.".concat(n,", '").concat(n,"');\n ")):i.push("\n renderer.shader.syncUniformGroup(uv.".concat(n,", syncData);\n ")))}return new Function("ud","uv","renderer","syncData",i.join("\n"))}(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[e],t.syncUniforms[this.shader.program.id]},t.prototype.syncUniformBufferGroup=function(t,e){var r=this.getGlProgram();if(!t.static||0!==t.dirtyId||!r.uniformGroups[t.id]){t.dirtyId=0;var i=r.uniformGroups[t.id]||this.createSyncBufferGroup(t,r,e);t.buffer.update(),i(r.uniformData,t.uniforms,this.renderer,Pe,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,r.uniformBufferBindings[e])},t.prototype.createSyncBufferGroup=function(t,e,r){var i=this.renderer.gl;this.renderer.buffer.bind(t.buffer);var n=this.gl.getUniformBlockIndex(e.program,r);e.uniformBufferBindings[r]=this.shader.uniformBindCount,i.uniformBlockBinding(e.program,n,this.shader.uniformBindCount),this.shader.uniformBindCount++;var o=this.getSignature(t,this.shader.program.uniformData,"ubo"),s=this._uboCache[o];if(s||(s=this._uboCache[o]=be(t,this.shader.program.uniformData)),t.autoManage){var a=new Float32Array(s.size/4);t.buffer.update(a)}return e.uniformGroups[t.id]=s.syncFunc,e.uniformGroups[t.id]},t.prototype.getSignature=function(t,e,r){var i=t.uniforms,n=["".concat(r,"-")];for(var o in i)n.push(o),e[o]&&n.push(e[o].type);return n.join("-")},t.prototype.getGlProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},t.prototype.generateProgram=function(t){var e=this.gl,r=t.program,i=Oe(e,r);return r.glPrograms[this.renderer.CONTEXT_UID]=i,i},t.prototype.reset=function(){this.program=null,this.shader=null},t.prototype.destroy=function(){this.renderer=null,this.destroyed=!0},t}();var Re=function(){function t(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=s.T$.NONE,this._blendEq=!1,this.map=[],this.map[0]=this.setBlend,this.map[1]=this.setOffset,this.map[2]=this.setCullFace,this.map[3]=this.setDepthTest,this.map[4]=this.setFrontFace,this.map[5]=this.setDepthMask,this.checks=[],this.defaultState=new Qt,this.defaultState.blend=!0}return t.prototype.contextChange=function(t){this.gl=t,this.blendModes=function(t,e){return void 0===e&&(e=[]),e[s.T$.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.ADD]=[t.ONE,t.ONE],e[s.T$.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.NONE]=[0,0],e[s.T$.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[s.T$.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[s.T$.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[s.T$.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[s.T$.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[s.T$.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[s.T$.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[s.T$.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[s.T$.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[s.T$.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[s.T$.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}(t),this.set(this.defaultState),this.reset()},t.prototype.set=function(t){if(t=t||this.defaultState,this.stateId!==t.data){for(var e=this.stateId^t.data,r=0;e;)1&e&&this.map[r].call(this,!!(t.data&1<<r)),e>>=1,r++;this.stateId=t.data}for(r=0;r<this.checks.length;r++)this.checks[r](this,t)},t.prototype.forceState=function(t){t=t||this.defaultState;for(var e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data},t.prototype.setBlend=function(e){this.updateCheck(t.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)},t.prototype.setOffset=function(e){this.updateCheck(t.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},t.prototype.setDepthTest=function(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)},t.prototype.setDepthMask=function(t){this.gl.depthMask(t)},t.prototype.setCullFace=function(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)},t.prototype.setFrontFace=function(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])},t.prototype.setBlendMode=function(t){if(t!==this.blendMode){this.blendMode=t;var e=this.blendModes[t],r=this.gl;2===e.length?r.blendFunc(e[0],e[1]):r.blendFuncSeparate(e[0],e[1],e[2],e[3]),6===e.length?(this._blendEq=!0,r.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,r.blendEquationSeparate(r.FUNC_ADD,r.FUNC_ADD))}},t.prototype.setPolygonOffset=function(t,e){this.gl.polygonOffset(t,e)},t.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},t.prototype.updateCheck=function(t,e){var r=this.checks.indexOf(t);e&&-1===r?this.checks.push(t):e||-1===r||this.checks.splice(r,1)},t.checkBlendMode=function(t,e){t.setBlendMode(e.blendMode)},t.checkPolygonOffset=function(t,e){t.setPolygonOffset(1,e.polygonOffset)},t.prototype.destroy=function(){this.gl=null},t}(),Me=function(){function t(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=o.X.GC_MAX_IDLE,this.checkCountMax=o.X.GC_MAX_CHECK_COUNT,this.mode=o.X.GC_MODE}return t.prototype.postrender=function(){this.renderer.renderingToScreen&&(this.count++,this.mode!==s.UN.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))},t.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,r=!1,i=0;i<e.length;i++){var n=e[i];!n.framebuffer&&this.count-n.touched>this.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){var o=0;for(i=0;i<e.length;i++)null!==e[i]&&(e[o++]=e[i]);e.length=o}},t.prototype.unload=function(t){var e=this.renderer.texture,r=t._texture;r&&!r.framebuffer&&e.destroyTexture(r);for(var i=t.children.length-1;i>=0;i--)this.unload(t.children[i])},t.prototype.destroy=function(){this.renderer=null},t}();var De=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=s.vK.UNSIGNED_BYTE,this.internalFormat=s.I2.RGBA,this.samplerType=0},Ne=function(){function t(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new w,this.hasIntegerTextures=!1}return t.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=function(t){var e,r,i,n,o;return(e={})[s.vK.UNSIGNED_BYTE]=((r={})[s.I2.RGBA]=t.RGBA,r[s.I2.RGB]=t.RGB,r[s.I2.ALPHA]=t.ALPHA,r[s.I2.LUMINANCE]=t.LUMINANCE,r[s.I2.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,r),e[s.vK.UNSIGNED_SHORT_5_6_5]=((i={})[s.I2.RGB]=t.RGB,i),e[s.vK.UNSIGNED_SHORT_4_4_4_4]=((n={})[s.I2.RGBA]=t.RGBA,n),e[s.vK.UNSIGNED_SHORT_5_5_5_1]=((o={})[s.I2.RGBA]=t.RGBA,o),e}(t);var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var r=0;r<e;r++)this.boundTextures[r]=null;this.emptyTextures={};var i=new De(t.createTexture());t.bindTexture(t.TEXTURE_2D,i.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=i,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new De(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(r=0;r<6;r++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(r=0;r<this.boundTextures.length;r++)this.bind(null,r)},t.prototype.bind=function(t,e){void 0===e&&(e=0);var r=this.gl;if((t=null==t?void 0:t.castToBaseTexture())&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;var i=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[e]!==t&&(this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),r.bindTexture(t.target,i.texture)),i.dirtyId!==t.dirtyId&&(this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),this.updateTexture(t)),this.boundTextures[e]=t}else this.currentLocation!==e&&(this.currentLocation=e,r.activeTexture(r.TEXTURE0+e)),r.bindTexture(r.TEXTURE_2D,this.emptyTextures[r.TEXTURE_2D].texture),this.boundTextures[e]=null},t.prototype.reset=function(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture},t.prototype.unbind=function(t){var e=this.gl,r=this.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var i=0;i<r.length;i++)r[i]===this.unknownTexture&&this.bind(null,i)}for(i=0;i<r.length;i++)r[i]===t&&(this.currentLocation!==i&&(e.activeTexture(e.TEXTURE0+i),this.currentLocation=i),e.bindTexture(t.target,this.emptyTextures[t.target].texture),r[i]=null)},t.prototype.ensureSamplerType=function(t){var e=this,r=e.boundTextures,i=e.hasIntegerTextures,n=e.CONTEXT_UID;if(i)for(var o=t-1;o>=0;--o){var a=r[o];if(a)a._glTextures[n].samplerType!==s.oT.FLOAT&&this.renderer.texture.unbind(a)}},t.prototype.initTexture=function(t){var e=new De(this.gl.createTexture());return e.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=e,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),e},t.prototype.initTextureType=function(t,e){var r,i;e.internalFormat=null!==(i=null===(r=this.internalFormats[t.type])||void 0===r?void 0:r[t.format])&&void 0!==i?i:t.format,2===this.webGLVersion&&t.type===s.vK.HALF_FLOAT?e.type=this.gl.HALF_FLOAT:e.type=t.type},t.prototype.updateTexture=function(t){var e=t._glTextures[this.CONTEXT_UID];if(e){var r=this.renderer;if(this.initTextureType(t,e),t.resource&&t.resource.upload(r,t,e))e.samplerType!==s.oT.FLOAT&&(this.hasIntegerTextures=!0);else{var i=t.realWidth,n=t.realHeight,o=r.gl;(e.width!==i||e.height!==n||e.dirtyId<0)&&(e.width=i,e.height=n,o.texImage2D(t.target,0,e.internalFormat,i,n,0,t.format,e.type,null))}t.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(t),e.dirtyId=t.dirtyId}},t.prototype.destroyTexture=function(t,e){var r=this.gl;if((t=t.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(t),r.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!e)){var i=this.managedTextures.indexOf(t);-1!==i&&(0,f.Er)(this.managedTextures,i,1)}},t.prototype.updateTextureStyle=function(t){var e=t._glTextures[this.CONTEXT_UID];e&&(t.mipmap!==s.WB.POW2&&2===this.webGLVersion||t.isPowerOfTwo?e.mipmap=t.mipmap>=1:e.mipmap=!1,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=s.Nt.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},t.prototype.setStyle=function(t,e){var r=this.gl;if(e.mipmap&&t.mipmap!==s.WB.ON_MANUAL&&r.generateMipmap(t.target),r.texParameteri(t.target,r.TEXTURE_WRAP_S,e.wrapMode),r.texParameteri(t.target,r.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===s.aH.LINEAR?r.LINEAR_MIPMAP_LINEAR:r.NEAREST_MIPMAP_NEAREST);var i=this.renderer.context.extensions.anisotropicFiltering;if(i&&t.anisotropicLevel>0&&t.scaleMode===s.aH.LINEAR){var n=Math.min(t.anisotropicLevel,r.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT));r.texParameterf(t.target,i.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else r.texParameteri(t.target,r.TEXTURE_MIN_FILTER,t.scaleMode===s.aH.LINEAR?r.LINEAR:r.NEAREST);r.texParameteri(t.target,r.TEXTURE_MAG_FILTER,t.scaleMode===s.aH.LINEAR?r.LINEAR:r.NEAREST)},t.prototype.destroy=function(){this.renderer=null},t}(),Le=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Fe=function(){return Fe=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},Fe.apply(this,arguments)},Be=function(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(r[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(t);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(t,i[n])&&(r[i[n]]=t[i[n]])}return r},Ue=wx.window.document,ke=new V.y3,je=function(t){function e(e,r){void 0===e&&(e=s.N3.UNKNOWN);var i=t.call(this)||this;return r=Object.assign({},o.X.RENDER_OPTIONS,r),i.options=r,i.type=e,i.screen=new V.Ae(0,0,r.width,r.height),i.view=r.view||Ue.createElement("canvas"),i.resolution=r.resolution||o.X.RESOLUTION,i.useContextAlpha=r.useContextAlpha,i.autoDensity=!!r.autoDensity,i.preserveDrawingBuffer=r.preserveDrawingBuffer,i.clearBeforeRender=r.clearBeforeRender,i._backgroundColor=0,i._backgroundColorRgba=[0,0,0,1],i._backgroundColorString="#000000",i.backgroundColor=r.backgroundColor||i._backgroundColor,i.backgroundAlpha=r.backgroundAlpha,void 0!==r.transparent&&((0,f.a1)("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),i.useContextAlpha=r.transparent,i.backgroundAlpha=r.transparent?0:1),i._lastObjectRendered=null,i.plugins={},i}return Le(e,t),e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e){this.view.width=Math.round(t*this.resolution),this.view.height=Math.round(e*this.resolution);var r=this.view.width/this.resolution,i=this.view.height/this.resolution;this.screen.width=r,this.screen.height=i,this.autoDensity&&(this.view.style.width="".concat(r,"px"),this.view.style.height="".concat(i,"px")),this.emit("resize",r,i)},e.prototype.generateTexture=function(t,e,r,i){void 0===e&&(e={}),"number"==typeof e&&((0,f.a1)("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),e={scaleMode:e,resolution:r,region:i});var n=e.region,o=Be(e,["region"]);0===(i=n||t.getLocalBounds(null,!0)).width&&(i.width=1),0===i.height&&(i.height=1);var s=Q.create(Fe({width:i.width,height:i.height},o));return ke.tx=-i.x,ke.ty=-i.y,this.render(t,{renderTexture:s,clear:!1,transform:ke,skipUpdateTransform:!!t.parent}),s},e.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var r=this;r.plugins=null,r.type=s.N3.UNKNOWN,r.view=null,r.screen=null,r._tempDisplayObjectParent=null,r.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=(0,f.XN)(t),(0,f.wK)(t,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(t){this._backgroundColorRgba[3]=t},enumerable:!1,configurable:!0}),e}(f.vp),Ge=function(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0},Xe=function(){function t(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}return t.prototype.destroy=function(){this.renderer=null},t.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},t.prototype.bind=function(t){var e=this.gl,r=this.CONTEXT_UID,i=t._glBuffers[r]||this.createGLBuffer(t);e.bindBuffer(t.type,i.buffer)},t.prototype.bindBufferBase=function(t,e){var r=this.gl,i=this.CONTEXT_UID;if(this.boundBufferBases[e]!==t){var n=t._glBuffers[i]||this.createGLBuffer(t);this.boundBufferBases[e]=t,r.bindBufferBase(r.UNIFORM_BUFFER,e,n.buffer)}},t.prototype.bindBufferRange=function(t,e,r){var i=this.gl,n=this.CONTEXT_UID;r=r||0;var o=t._glBuffers[n]||this.createGLBuffer(t);i.bindBufferRange(i.UNIFORM_BUFFER,e||0,o.buffer,256*r,256)},t.prototype.update=function(t){var e=this.gl,r=this.CONTEXT_UID,i=t._glBuffers[r];if(t._updateID!==i.updateID)if(i.updateID=t._updateID,e.bindBuffer(t.type,i.buffer),i.byteLength>=t.data.byteLength)e.bufferSubData(t.type,0,t.data);else{var n=t.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;i.byteLength=t.data.byteLength,e.bufferData(t.type,t.data,n)}},t.prototype.dispose=function(t,e){if(this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var r=t._glBuffers[this.CONTEXT_UID],i=this.gl;t.disposeRunner.remove(this),r&&(e||i.deleteBuffer(r.buffer),delete t._glBuffers[this.CONTEXT_UID])}},t.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedBuffers),r=0;r<e.length;r++)this.dispose(this.managedBuffers[e[r]],t)},t.prototype.createGLBuffer=function(t){var e=this.CONTEXT_UID,r=this.gl;return t._glBuffers[e]=new Ge(r.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[e]},t}(),He=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Ye=function(t){function e(r){var i=t.call(this,s.N3.WEBGL,r)||this;return r=i.options,i.gl=null,i.CONTEXT_UID=0,i.runners={destroy:new c.R("destroy"),contextChange:new c.R("contextChange"),reset:new c.R("reset"),update:new c.R("update"),postrender:new c.R("postrender"),prerender:new c.R("prerender"),resize:new c.R("resize")},i.runners.contextChange.add(i),i.globalUniforms=new dt({projectionMatrix:new V.y3},!0),i.addSystem(oe,"mask").addSystem(bt,"context").addSystem(Re,"state").addSystem(Ce,"shader").addSystem(Ne,"texture").addSystem(Xe,"buffer").addSystem(At,"geometry").addSystem(wt,"framebuffer").addSystem(ue,"scissor").addSystem(le,"stencil").addSystem(fe,"projection").addSystem(Me,"textureGC").addSystem(vt,"filter").addSystem(ye,"renderTexture").addSystem(gt,"batch"),i.initPlugins(e.__plugins),i.multisample=void 0,r.context?i.context.initFromContext(r.context):i.context.initFromOptions({alpha:!!i.useContextAlpha,antialias:r.antialias,premultipliedAlpha:i.useContextAlpha&&"notMultiplied"!==i.useContextAlpha,stencil:!0,preserveDrawingBuffer:r.preserveDrawingBuffer,powerPreference:i.options.powerPreference}),i.renderingToScreen=!0,(0,f.DE)(2===i.context.webGLVersion?"WebGL 2":"WebGL 1"),i.resize(i.options.width,i.options.height),i}return He(e,t),e.create=function(t){if((0,f.HR)())return new e(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.contextChange=function(){var t,e=this.gl;if(1===this.context.webGLVersion){var r=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,r)}else{r=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,r)}t>=s.G5.HIGH?this.multisample=s.G5.HIGH:t>=s.G5.MEDIUM?this.multisample=s.G5.MEDIUM:t>=s.G5.LOW?this.multisample=s.G5.LOW:this.multisample=s.G5.NONE},e.prototype.addSystem=function(t,e){var r=new t(this);if(this[e])throw new Error('Whoops! The name "'.concat(e,'" is already in use'));for(var i in this[e]=r,this.runners)this.runners[i].add(r);return this},e.prototype.render=function(t,e){var r,i,n,o;if(e&&(e instanceof Q?((0,f.a1)("6.0.0","Renderer#render arguments changed, use options instead."),r=e,i=arguments[2],n=arguments[3],o=arguments[4]):(r=e.renderTexture,i=e.clear,n=e.transform,o=e.skipUpdateTransform)),this.renderingToScreen=!r,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=n,!this.context.isLost){if(r||(this._lastObjectRendered=t),!o){var s=t.enableTempParent();t.updateTransform(),t.disableTempParent(s)}this.renderTexture.bind(r),this.batch.currentRenderer.start(),(void 0!==i?i:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),r&&r.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.generateTexture=function(e,r,i,n){void 0===r&&(r={});var o=t.prototype.generateTexture.call(this,e,r,i,n);return this.framebuffer.blit(),o},e.prototype.resize=function(e,r){t.prototype.resize.call(this,e,r),this.runners.resize.emit(this.screen.height,this.screen.width)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(e){for(var r in this.runners.destroy.emit(),this.runners)this.runners[r].destroy();t.prototype.destroy.call(this,e),this.gl=null},Object.defineProperty(e.prototype,"extract",{get:function(){return(0,f.a1)("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),e.registerPlugin=function(t,r){e.__plugins=e.__plugins||{},e.__plugins[t]=r},e}(je);function Ve(t){return Ye.create(t)}var ze="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",We="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n",qe=function(){function t(t){(0,f.a1)("6.1.0","System class is deprecated, implemement ISystem interface instead."),this.renderer=t}return t.prototype.destroy=function(){this.renderer=null},t}(),Ke=function(){this.texArray=null,this.blend=0,this.type=s.lg.TRIANGLES,this.start=0,this.size=0,this.data=null},$e=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var t=0;t<this.count;t++)this.elements[t]=null;this.count=0},t}(),Ze=function(){function t(t){"number"==typeof t?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}return Object.defineProperty(t.prototype,"int8View",{get:function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uint8View",{get:function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"int16View",{get:function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uint16View",{get:function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"int32View",{get:function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},enumerable:!1,configurable:!0}),t.prototype.view=function(t){return this["".concat(t,"View")]},t.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},t.sizeOf=function(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error("".concat(t," isn't a valid view type"))}},t}(),Qe=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),Je=function(t){function e(e){var r=t.call(this,e)||this;return r.shaderGenerator=null,r.geometryClass=null,r.vertexSize=null,r.state=Qt.for2d(),r.size=4*o.X.SPRITE_BATCH_SIZE,r._vertexCount=0,r._indexCount=0,r._bufferedElements=[],r._bufferedTextures=[],r._bufferSize=0,r._shader=null,r._packedGeometries=[],r._packedGeometryPoolSize=2,r._flushId=0,r._aBuffers={},r._iBuffers={},r.MAX_TEXTURES=1,r.renderer.on("prerender",r.onPrerender,r),e.runners.contextChange.add(r),r._dcIndex=0,r._aIndex=0,r._iIndex=0,r._attributeBuffer=null,r._indexBuffer=null,r._tempBoundTextures=[],r}return Qe(e,t),e.prototype.contextChange=function(){var t=this.renderer.gl;o.X.PREFER_ENV===s.Vi.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),o.X.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=Wt(this.MAX_TEXTURES,t)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()},e.prototype.initFlushBuffers=function(){for(var t=e._drawCallPool,r=e._textureArrayPool,i=this.size/4,n=Math.floor(i/this.MAX_TEXTURES)+1;t.length<i;)t.push(new Ke);for(;r.length<n;)r.push(new $e);for(var o=0;o<this.MAX_TEXTURES;o++)this._tempBoundTextures[o]=null},e.prototype.onPrerender=function(){this._flushId=0},e.prototype.render=function(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},e.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,r=this.MAX_TEXTURES,i=e._textureArrayPool,n=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,a=++w._globalBatch,h=0,u=i[0],c=0;n.copyBoundTextures(o,r);for(var l=0;l<this._bufferSize;++l){var f=t[l];t[l]=null,f._batchEnabled!==a&&(u.count>=r&&(n.boundArray(u,o,a,r),this.buildDrawCalls(u,c,l),c=l,u=i[++h],++a),f._batchEnabled=a,f.touched=s,u.elements[u.count++]=f)}u.count>0&&(n.boundArray(u,o,a,r),this.buildDrawCalls(u,c,this._bufferSize),++h,++a);for(l=0;l<o.length;l++)o[l]=null;w._globalBatch=a},e.prototype.buildDrawCalls=function(t,r,i){var n=this,o=n._bufferedElements,s=n._attributeBuffer,a=n._indexBuffer,h=n.vertexSize,u=e._drawCallPool,c=this._dcIndex,l=this._aIndex,d=this._iIndex,p=u[c];p.start=this._iIndex,p.texArray=t;for(var y=r;y<i;++y){var m=o[y],v=m._texture.baseTexture,_=f.YA[v.alphaMode?1:0][m.blendMode];o[y]=null,r<y&&p.blend!==_&&(p.size=d-p.start,r=y,(p=u[++c]).texArray=t,p.start=d),this.packInterleavedGeometry(m,s,a,l,d),l+=m.vertexData.length/2*h,d+=m.indices.length,p.blend=_}r<i&&(p.size=d-p.start,++c),this._dcIndex=c,this._aIndex=l,this._iIndex=d},e.prototype.bindAndClearTexArray=function(t){for(var e=this.renderer.texture,r=0;r<t.count;r++)e.bind(t.elements[r],t.ids[r]),t.elements[r]=null;t.count=0},e.prototype.updateGeometry=function(){var t=this,e=t._packedGeometries,r=t._attributeBuffer,i=t._indexBuffer;o.X.CAN_UPLOAD_SAME_BUFFER?(e[this._flushId]._buffer.update(r.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,e[this._flushId]=new this.geometryClass),e[this._flushId]._buffer.update(r.rawBinaryData),e[this._flushId]._indexBuffer.update(i),this.renderer.geometry.bind(e[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)},e.prototype.drawBatches=function(){for(var t=this._dcIndex,r=this.renderer,i=r.gl,n=r.state,o=e._drawCallPool,s=null,a=0;a<t;a++){var h=o[a],u=h.texArray,c=h.type,l=h.size,f=h.start,d=h.blend;s!==u&&(s=u,this.bindAndClearTexArray(u)),this.state.blendMode=d,n.set(this.state),i.drawElements(c,l,i.UNSIGNED_SHORT,2*f)}},e.prototype.flush=function(){0!==this._vertexCount&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)},e.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.MAX_TEXTURES),this.renderer.shader.bind(this._shader),o.X.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),t.prototype.destroy.call(this)},e.prototype.getAttributeBuffer=function(t){var e=(0,f.a9)(Math.ceil(t/8)),r=(0,f.k3)(e),i=8*e;this._aBuffers.length<=r&&(this._iBuffers.length=r+1);var n=this._aBuffers[i];return n||(this._aBuffers[i]=n=new Ze(i*this.vertexSize*4)),n},e.prototype.getIndexBuffer=function(t){var e=(0,f.a9)(Math.ceil(t/12)),r=(0,f.k3)(e),i=12*e;this._iBuffers.length<=r&&(this._iBuffers.length=r+1);var n=this._iBuffers[r];return n||(this._iBuffers[r]=n=new Uint16Array(i)),n},e.prototype.packInterleavedGeometry=function(t,e,r,i,n){for(var o=e.uint32View,s=e.float32View,a=i/this.vertexSize,h=t.uvs,u=t.indices,c=t.vertexData,l=t._texture.baseTexture._batchLocation,d=Math.min(t.worldAlpha,1),p=d<1&&t._texture.baseTexture.alphaMode?(0,f.rA)(t._tintRGB,d):t._tintRGB+(255*d<<24),y=0;y<c.length;y+=2)s[i++]=c[y],s[i++]=c[y+1],s[i++]=h[y],s[i++]=h[y+1],o[i++]=p,s[i++]=l;for(y=0;y<u.length;y++)r[n++]=a+u[y]},e._drawCallPool=[],e._textureArrayPool=[],e}(_t),tr=function(){function t(t,e){if(this.vertexSrc=t,this.fragTemplate=e,this.programCache={},this.defaultGroupCache={},e.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(e.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')}return t.prototype.generateShader=function(t){if(!this.programCache[t]){for(var e=new Int32Array(t),r=0;r<t;r++)e[r]=r;this.defaultGroupCache[t]=dt.from({uSamplers:e},!0);var i=this.fragTemplate;i=(i=i.replace(/%count%/gi,"".concat(t))).replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new $t(this.vertexSrc,i)}var n={tint:new Float32Array([1,1,1,1]),translationMatrix:new V.y3,default:this.defaultGroupCache[t]};return new Zt(this.programCache[t],n)},t.prototype.generateSampleSrc=function(t){var e="";e+="\n",e+="\n";for(var r=0;r<t;r++)r>0&&(e+="\nelse "),r<t-1&&(e+="if(vTextureId < ".concat(r,".5)")),e+="\n{",e+="\n\tcolor = texture2D(uSamplers[".concat(r,"], vTextureCoord);"),e+="\n}";return e+="\n",e+="\n"},t}(),er=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),rr=function(t){function e(e){void 0===e&&(e=!1);var r=t.call(this)||this;return r._buffer=new rt(null,e,!1),r._indexBuffer=new rt(null,e,!0),r.addAttribute("aVertexPosition",r._buffer,2,!1,s.vK.FLOAT).addAttribute("aTextureCoord",r._buffer,2,!1,s.vK.FLOAT).addAttribute("aColor",r._buffer,4,!0,s.vK.UNSIGNED_BYTE).addAttribute("aTextureId",r._buffer,1,!0,s.vK.FLOAT).addIndex(r._indexBuffer),r}return er(e,t),e}(at);const ir="precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vTextureId = aTextureId;\n vColor = aColor * tint;\n}\n",nr="varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n vec4 color;\n %forloop%\n gl_FragColor = color * vColor;\n}\n";var or=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),sr=function(){function t(){}return t.create=function(t){var e=Object.assign({vertex:ir,fragment:nr,geometryClass:rr,vertexSize:6},t),r=e.vertex,i=e.fragment,n=e.vertexSize,o=e.geometryClass;return function(t){function e(e){var s=t.call(this,e)||this;return s.shaderGenerator=new tr(r,i),s.geometryClass=o,s.vertexSize=n,s}return or(e,t),e}(Je)},Object.defineProperty(t,"defaultVertexSrc",{get:function(){return ir},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentTemplate",{get:function(){return nr},enumerable:!1,configurable:!0}),t}(),ar=sr.create(),hr={},ur=function(t){Object.defineProperty(hr,t,{get:function(){return(0,f.a1)("6.0.0","PIXI.systems.".concat(t," has moved to PIXI.").concat(t)),i[t]}})};for(var cr in i)ur(cr);var lr={},fr=function(t){Object.defineProperty(lr,t,{get:function(){return(0,f.a1)("6.0.0","PIXI.resources.".concat(t," has moved to PIXI.").concat(t)),n[t]}})};for(var cr in n)fr(cr)},519:(t,e,r)=>{r.d(e,{YZ:()=>s,W2:()=>p,s$:()=>u});var i=r(6787);i.X.SORTABLE_CHILDREN=!1;var n,o=r(1893),s=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?o.Ae.EMPTY:((t=t||new o.Ae(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addPointMatrix=function(t,e){var r=t.a,i=t.b,n=t.c,o=t.d,s=t.tx,a=t.ty,h=r*e.x+n*e.y+s,u=i*e.x+o*e.y+a;this.minX=Math.min(this.minX,h),this.maxX=Math.max(this.maxX,h),this.minY=Math.min(this.minY,u),this.maxY=Math.max(this.maxY,u)},t.prototype.addQuad=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY,o=t[0],s=t[1];e=o<e?o:e,r=s<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[2])<e?o:e,r=(s=t[3])<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[4])<e?o:e,r=(s=t[5])<r?s:r,i=o>i?o:i,n=s>n?s:n,e=(o=t[6])<e?o:e,r=(s=t[7])<r?s:r,i=o>i?o:i,n=s>n?s:n,this.minX=e,this.minY=r,this.maxX=i,this.maxY=n},t.prototype.addFrame=function(t,e,r,i,n){this.addFrameMatrix(t.worldTransform,e,r,i,n)},t.prototype.addFrameMatrix=function(t,e,r,i,n){var o=t.a,s=t.b,a=t.c,h=t.d,u=t.tx,c=t.ty,l=this.minX,f=this.minY,d=this.maxX,p=this.maxY,y=o*e+a*r+u,m=s*e+h*r+c;l=y<l?y:l,f=m<f?m:f,d=y>d?y:d,p=m>p?m:p,l=(y=o*i+a*r+u)<l?y:l,f=(m=s*i+h*r+c)<f?m:f,d=y>d?y:d,p=m>p?m:p,l=(y=o*e+a*n+u)<l?y:l,f=(m=s*e+h*n+c)<f?m:f,d=y>d?y:d,p=m>p?m:p,l=(y=o*i+a*n+u)<l?y:l,f=(m=s*i+h*n+c)<f?m:f,d=y>d?y:d,p=m>p?m:p,this.minX=l,this.minY=f,this.maxX=d,this.maxY=p},t.prototype.addVertexData=function(t,e,r){for(var i=this.minX,n=this.minY,o=this.maxX,s=this.maxY,a=e;a<r;a+=2){var h=t[a],u=t[a+1];i=h<i?h:i,n=u<n?u:n,o=h>o?h:o,s=u>s?u:s}this.minX=i,this.minY=n,this.maxX=o,this.maxY=s},t.prototype.addVertices=function(t,e,r,i){this.addVerticesMatrix(t.worldTransform,e,r,i)},t.prototype.addVerticesMatrix=function(t,e,r,i,n,o){void 0===n&&(n=0),void 0===o&&(o=n);for(var s=t.a,a=t.b,h=t.c,u=t.d,c=t.tx,l=t.ty,f=this.minX,d=this.minY,p=this.maxX,y=this.maxY,m=r;m<i;m+=2){var v=e[m],_=e[m+1],g=s*v+h*_+c,x=u*_+a*v+l;f=Math.min(f,g-n),p=Math.max(p,g+n),d=Math.min(d,x-o),y=Math.max(y,x+o)}this.minX=f,this.minY=d,this.maxX=p,this.maxY=y},t.prototype.addBounds=function(t){var e=this.minX,r=this.minY,i=this.maxX,n=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<r?t.minY:r,this.maxX=t.maxX>i?t.maxX:i,this.maxY=t.maxY>n?t.maxY:n},t.prototype.addBoundsMask=function(t,e){var r=t.minX>e.minX?t.minX:e.minX,i=t.minY>e.minY?t.minY:e.minY,n=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(r<=n&&i<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<s?r:s,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var r=t.minX>e.x?t.minX:e.x,i=t.minY>e.y?t.minY:e.y,n=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(r<=n&&i<=o){var s=this.minX,a=this.minY,h=this.maxX,u=this.maxY;this.minX=r<s?r:s,this.minY=i<a?i:a,this.maxX=n>h?n:h,this.maxY=o>u?o:u}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,r,i,n,o){t-=n,e-=o,r+=n,i+=o,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>r?this.maxX:r,this.minY=this.minY<e?this.minY:e,this.maxY=this.maxY>i?this.maxY:i},t}(),a=r(8306),h=(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),u=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new o.wx,e.alpha=1,e.visible=!0,e.renderable=!0,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new s,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._maskRefCount=0,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return h(e,t),e.mixin=function(t){for(var r=Object.keys(t),i=0;i<r.length;++i){var n=r[i];Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(t,n))}},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new o.Ae),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new o.Ae),t=this._localBoundsRect),this._localBounds||(this._localBounds=new s);var e=this.transform,r=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var i=this._bounds,n=this._boundsID;this._bounds=this._localBounds;var a=this.getBounds(!1,t);return this.parent=r,this.transform=e,this._bounds=i,this._bounds.updateID+=this._boundsID-n,a},e.prototype.toGlobal=function(t,e,r){return void 0===r&&(r=!1),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,r,i){return e&&(t=e.toGlobal(t,r,i)),i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,r)},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=1),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===h&&(h=0),this.position.x=t,this.position.y=e,this.scale.x=r||1,this.scale.y=i||1,this.rotation=n,this.skew.x=o,this.skew.y=s,this.pivot.x=a,this.pivot.y=h,this},e.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this.emit("destroyed"),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},Object.defineProperty(e.prototype,"_tempDisplayObjectParent",{get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new c),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),e.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},e.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(e.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.transform.rotation*o.jl},set:function(t){this.transform.rotation=t*o.ZX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(t){if(this._mask!==t){var e;if(this._mask)(e=this._mask.maskObject||this._mask)._maskRefCount--,0===e._maskRefCount&&(e.renderable=!0,e.isMask=!1);if(this._mask=t,this._mask)0===(e=this._mask.maskObject||this._mask)._maskRefCount&&(e.renderable=!1,e.isMask=!0),e._maskRefCount++}},enumerable:!1,configurable:!0}),e}(a.vp),c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sortDirty=null,e}return h(e,t),e}(u);u.prototype.displayObjectUpdateTransform=u.prototype.updateTransform;var l=r(7659),f=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();function d(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}var p=function(t){function e(){var e=t.call(this)||this;return e.children=[],e.sortableChildren=i.X.SORTABLE_CHILDREN,e.sortDirty=!1,e}return f(e,t),e.prototype.onChildrenChange=function(t){},e.prototype.addChild=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length>1)for(var r=0;r<t.length;r++)this.addChild(t[r]);else{var i=t[0];i.parent&&i.parent.removeChild(i),i.parent=this,this.sortDirty=!0,i.transform._parentID=-1,this.children.push(i),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",i,this,this.children.length-1),i.emit("added",this)}return t[0]},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error("".concat(t,"addChildAt: The index ").concat(e," supplied is out of bounds ").concat(this.children.length));return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var r=this.getChildIndex(t),i=this.getChildIndex(e);this.children[r]=e,this.children[i]=t,this.onChildrenChange(r<i?r:i)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index ".concat(e," supplied is out of bounds ").concat(this.children.length));var r=this.getChildIndex(t);(0,a.Er)(this.children,r,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index (".concat(t,") does not exist."));return this.children[t]},e.prototype.removeChild=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length>1)for(var r=0;r<t.length;r++)this.removeChild(t[r]);else{var i=t[0],n=this.children.indexOf(i);if(-1===n)return null;i.parent=null,i.transform._parentID=-1,(0,a.Er)(this.children,n,1),this._boundsID++,this.onChildrenChange(n),i.emit("removed",this),this.emit("childRemoved",i,this,n)}return t[0]},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,(0,a.Er)(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e},e.prototype.removeChildren=function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.children.length);var r,i=t,n=e-i;if(n>0&&n<=e){r=this.children.splice(i,n);for(var o=0;o<r.length;++o)r[o].parent=null,r[o].transform&&(r[o].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(o=0;o<r.length;++o)r[o].emit("removed",this),this.emit("childRemoved",r[o],this,o);return r}if(0===n&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,e=0,r=this.children.length;e<r;++e){var i=this.children[e];i._lastSortedIndex=e,t||0===i.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(d),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var r=this.children[t];r.visible&&r.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];if(e.visible&&e.renderable)if(e.calculateBounds(),e._mask){var r=e._mask.maskObject||e._mask;r.calculateBounds(),this._bounds.addBoundsMask(e._bounds,r._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(e,r){void 0===r&&(r=!1);var i=t.prototype.getLocalBounds.call(this,e);if(!r)for(var n=0,o=this.children.length;n<o;++n){var s=this.children[n];s.visible&&s.updateTransform()}return i},e.prototype._calculateBounds=function(){},e.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else{this._render(t);for(var e=0,r=this.children.length;e<r;++e)this.children[e].render(t)}},e.prototype.renderAdvanced=function(t){var e=this.filters,r=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var i=0;i<e.length;i++)e[i].enabled&&this._enabledFilters.push(e[i])}var n=e&&this._enabledFilters&&this._enabledFilters.length||r&&(!r.isMaskData||r.enabled&&(r.autoDetect||r.type!==l.A7.NONE));n&&t.batch.flush(),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.push(this,this._enabledFilters),r&&t.mask.push(this,this._mask),this._render(t);i=0;for(var o=this.children.length;i<o;i++)this.children[i].render(t);n&&t.batch.flush(),r&&t.mask.pop(this),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(e){t.prototype.destroy.call(this),this.sortDirty=!1;var r="boolean"==typeof e?e:e&&e.children,i=this.removeChildren(0,this.children.length);if(r)for(var n=0;n<i.length;++n)i[n].destroy(e)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t},enumerable:!1,configurable:!0}),e}(u);p.prototype.containerUpdateTransform=p.prototype.updateTransform},4775:(t,e,r)=>{var i,n;r.d(e,{TC:()=>G}),function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"}(i||(i={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(n||(n={}));var o={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive||!t||isNaN(t))return e;var r=Math.ceil(t/this.maxLength);return r<this.minSegments?r=this.minSegments:r>this.maxSegments&&(r=this.maxSegments),r}},s=r(9043),a=function(){function t(){this.color=16777215,this.alpha=1,this.texture=s.Texture.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=s.Texture.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}(),h=r(1893),u=r(8306),c={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var r=t.points,i=t.holes,n=e.points,o=e.indices;if(r.length>=6){for(var s=[],a=0;a<i.length;a++){var h=i[a];s.push(r.length/2),r=r.concat(h.points)}var c=(0,u.OT)(r,s,2);if(!c)return;var l=n.length/2;for(a=0;a<c.length;a+=3)o.push(c[a]+l),o.push(c[a+1]+l),o.push(c[a+2]+l);for(a=0;a<r.length;a++)n.push(r[a])}}},l={build:function(t){var e,r,i=t.shape,n=t.points,o=i.x,s=i.y;if(n.length=0,t.type===h.HS.CIRC)e=i.radius,r=i.radius;else{var a=t.shape;e=a.width,r=a.height}if(0!==e&&0!==r){var u=Math.floor(30*Math.sqrt(i.radius))||Math.floor(15*Math.sqrt(e+r));u/=2.3;for(var c=2*Math.PI/u,l=0;l<u-.5;l++)n.push(o+Math.sin(-c*l)*e,s+Math.cos(-c*l)*r);n.push(n[0],n[1])}},triangulate:function(t,e){var r=t.points,i=e.points,n=e.indices,o=i.length/2,s=o,a=t.shape,h=t.matrix,u=a.x,c=a.y;i.push(t.matrix?h.a*u+h.c*c+h.tx:u,t.matrix?h.b*u+h.d*c+h.ty:c);for(var l=0;l<r.length;l+=2)i.push(r[l],r[l+1]),n.push(o++,s,o)}},f={build:function(t){var e=t.shape,r=e.x,i=e.y,n=e.width,o=e.height,s=t.points;s.length=0,s.push(r,i,r+n,i,r+n,i+o,r,i+o)},triangulate:function(t,e){var r=t.points,i=e.points,n=i.length/2;i.push(r[0],r[1],r[2],r[3],r[6],r[7],r[4],r[5]),e.indices.push(n,n+1,n+2,n+1,n+2,n+3)}};function d(t,e,r){return t+(e-t)*r}function p(t,e,r,i,n,o,s){void 0===s&&(s=[]);for(var a=s,h=0,u=0,c=0,l=0,f=0,p=0,y=0,m=0;y<=20;++y)h=d(t,r,m=y/20),u=d(e,i,m),c=d(r,n,m),l=d(i,o,m),f=d(h,c,m),p=d(u,l,m),0===y&&a[a.length-2]===f&&a[a.length-1]===p||a.push(f,p);return a}var y={build:function(t){var e=t.shape,r=t.points,i=e.x,n=e.y,o=e.width,s=e.height,a=Math.max(0,Math.min(e.radius,Math.min(o,s)/2));r.length=0,a?(p(i,n+a,i,n,i+a,n,r),p(i+o-a,n,i+o,n,i+o,n+a,r),p(i+o,n+s-a,i+o,n+s,i+o-a,n+s,r),p(i+a,n+s,i,n+s,i,n+s-a,r)):r.push(i,n,i+o,n,i+o,n+s,i,n+s)},triangulate:function(t,e){for(var r=t.points,i=e.points,n=e.indices,o=i.length/2,s=(0,u.OT)(r,null,2),a=0,h=s.length;a<h;a+=3)n.push(s[a]+o),n.push(s[a+1]+o),n.push(s[a+2]+o);for(a=0,h=r.length;a<h;a++)i.push(r[a],r[++a])}};function m(t,e,r,i,n,o,s,a){var h,u;s?(h=i,u=-r):(h=-i,u=r);var c=t-r*n+h,l=e-i*n+u,f=t+r*o+h,d=e+i*o+u;return a.push(c,l),a.push(f,d),2}function v(t,e,r,i,n,o,s,a){var h=r-t,u=i-e,c=Math.atan2(h,u),l=Math.atan2(n-t,o-e);a&&c<l?c+=2*Math.PI:!a&&c>l&&(l+=2*Math.PI);var f=c,d=l-c,p=Math.abs(d),y=Math.sqrt(h*h+u*u),m=1+(15*p*Math.sqrt(y)/Math.PI>>0),v=d/m;if(f+=v,a){s.push(t,e),s.push(r,i);for(var _=1,g=f;_<m;_++,g+=v)s.push(t,e),s.push(t+Math.sin(g)*y,e+Math.cos(g)*y);s.push(t,e),s.push(n,o)}else{s.push(r,i),s.push(t,e);for(_=1,g=f;_<m;_++,g+=v)s.push(t+Math.sin(g)*y,e+Math.cos(g)*y),s.push(t,e);s.push(n,o),s.push(t,e)}return 2*m}function _(t,e){t.lineStyle.native?function(t,e){var r=0,i=t.shape,n=t.points||i.points,o=i.type!==h.HS.POLY||i.closeStroke;if(0!==n.length){var s=e.points,a=e.indices,u=n.length/2,c=s.length/2,l=c;for(s.push(n[0],n[1]),r=1;r<u;r++)s.push(n[2*r],n[2*r+1]),a.push(l,l+1),l++;o&&a.push(l,c)}}(t,e):function(t,e){var r=t.shape,s=t.points||r.points.slice(),a=e.closePointEps;if(0!==s.length){var u=t.lineStyle,c=new h.E9(s[0],s[1]),l=new h.E9(s[s.length-2],s[s.length-1]),f=r.type!==h.HS.POLY||r.closeStroke,d=Math.abs(c.x-l.x)<a&&Math.abs(c.y-l.y)<a;if(f){s=s.slice(),d&&(s.pop(),s.pop(),l.set(s[s.length-2],s[s.length-1]));var p=.5*(c.x+l.x),y=.5*(l.y+c.y);s.unshift(p,y),s.push(p,y)}var _=e.points,g=s.length/2,x=s.length,b=_.length/2,T=u.width/2,E=T*T,w=u.miterLimit*u.miterLimit,S=s[0],A=s[1],O=s[2],I=s[3],P=0,C=0,R=-(A-I),M=S-O,D=0,N=0,L=Math.sqrt(R*R+M*M);R/=L,M/=L,R*=T,M*=T;var F=u.alignment,B=2*(1-F),U=2*F;f||(u.cap===n.ROUND?x+=v(S-R*(B-U)*.5,A-M*(B-U)*.5,S-R*B,A-M*B,S+R*U,A+M*U,_,!0)+2:u.cap===n.SQUARE&&(x+=m(S,A,R,M,B,U,!0,_))),_.push(S-R*B,A-M*B),_.push(S+R*U,A+M*U);for(var k=1;k<g-1;++k){S=s[2*(k-1)],A=s[2*(k-1)+1],O=s[2*k],I=s[2*k+1],P=s[2*(k+1)],C=s[2*(k+1)+1],R=-(A-I),M=S-O,R/=L=Math.sqrt(R*R+M*M),M/=L,R*=T,M*=T,D=-(I-C),N=O-P,D/=L=Math.sqrt(D*D+N*N),N/=L,D*=T,N*=T;var j=O-S,G=A-I,X=O-P,H=C-I,Y=G*X-H*j,V=Y<0;if(Math.abs(Y)<.1)_.push(O-R*B,I-M*B),_.push(O+R*U,I+M*U);else{var z=(-R+S)*(-M+I)-(-R+O)*(-M+A),W=(-D+P)*(-N+I)-(-D+O)*(-N+C),q=(j*W-X*z)/Y,K=(H*z-G*W)/Y,$=(q-O)*(q-O)+(K-I)*(K-I),Z=O+(q-O)*B,Q=I+(K-I)*B,J=O-(q-O)*U,tt=I-(K-I)*U,et=V?B:U;$<=Math.min(j*j+G*G,X*X+H*H)+et*et*E?u.join===i.BEVEL||$/E>w?(V?(_.push(Z,Q),_.push(O+R*U,I+M*U),_.push(Z,Q),_.push(O+D*U,I+N*U)):(_.push(O-R*B,I-M*B),_.push(J,tt),_.push(O-D*B,I-N*B),_.push(J,tt)),x+=2):u.join===i.ROUND?V?(_.push(Z,Q),_.push(O+R*U,I+M*U),x+=v(O,I,O+R*U,I+M*U,O+D*U,I+N*U,_,!0)+4,_.push(Z,Q),_.push(O+D*U,I+N*U)):(_.push(O-R*B,I-M*B),_.push(J,tt),x+=v(O,I,O-R*B,I-M*B,O-D*B,I-N*B,_,!1)+4,_.push(O-D*B,I-N*B),_.push(J,tt)):(_.push(Z,Q),_.push(J,tt)):(_.push(O-R*B,I-M*B),_.push(O+R*U,I+M*U),u.join===i.BEVEL||$/E>w||(u.join===i.ROUND?x+=V?v(O,I,O+R*U,I+M*U,O+D*U,I+N*U,_,!0)+2:v(O,I,O-R*B,I-M*B,O-D*B,I-N*B,_,!1)+2:(V?(_.push(J,tt),_.push(J,tt)):(_.push(Z,Q),_.push(Z,Q)),x+=2)),_.push(O-D*B,I-N*B),_.push(O+D*U,I+N*U),x+=2)}}S=s[2*(g-2)],A=s[2*(g-2)+1],O=s[2*(g-1)],R=-(A-(I=s[2*(g-1)+1])),M=S-O,R/=L=Math.sqrt(R*R+M*M),M/=L,R*=T,M*=T,_.push(O-R*B,I-M*B),_.push(O+R*U,I+M*U),f||(u.cap===n.ROUND?x+=v(O-R*(B-U)*.5,I-M*(B-U)*.5,O-R*B,I-M*B,O+R*U,I+M*U,_,!1)+2:u.cap===n.SQUARE&&(x+=m(O,I,R,M,B,U,!1,_)));var rt=e.indices,it=o.epsilon*o.epsilon;for(k=b;k<x+b-2;++k)S=_[2*k],A=_[2*k+1],O=_[2*(k+1)],I=_[2*(k+1)+1],P=_[2*(k+2)],C=_[2*(k+2)+1],Math.abs(S*(I-C)+O*(C-A)+P*(A-I))<it||rt.push(k,k+1,k+2)}}(t,e)}var g,x=function(){function t(){}return t.curveTo=function(t,e,r,i,n,o){var s=o[o.length-2],a=o[o.length-1]-e,h=s-t,u=i-e,c=r-t,l=Math.abs(a*c-h*u);if(l<1e-8||0===n)return o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e),null;var f=a*a+h*h,d=u*u+c*c,p=a*u+h*c,y=n*Math.sqrt(f)/l,m=n*Math.sqrt(d)/l,v=y*p/f,_=m*p/d,g=y*c+m*h,x=y*u+m*a,b=h*(m+v),T=a*(m+v),E=c*(y+_),w=u*(y+_);return{cx:g+t,cy:x+e,radius:n,startAngle:Math.atan2(T-x,b-g),endAngle:Math.atan2(w-x,E-g),anticlockwise:h*u>c*a}},t.arc=function(t,e,r,i,n,s,a,u,c){for(var l=a-s,f=o._segmentsCount(Math.abs(l)*n,40*Math.ceil(Math.abs(l)/h._b)),d=l/(2*f),p=2*d,y=Math.cos(d),m=Math.sin(d),v=f-1,_=v%1/v,g=0;g<=v;++g){var x=d+s+p*(g+_*g),b=Math.cos(x),T=-Math.sin(x);c.push((y*b+m*T)*n+r,(y*-T+m*b)*n+i)}},t}(),b=function(){function t(){}return t.curveLength=function(t,e,r,i,n,o,s,a){for(var h=0,u=0,c=0,l=0,f=0,d=0,p=0,y=0,m=0,v=0,_=0,g=t,x=e,b=1;b<=10;++b)v=g-(y=(p=(d=(f=1-(u=b/10))*f)*f)*t+3*d*u*r+3*f*(c=u*u)*n+(l=c*u)*s),_=x-(m=p*e+3*d*u*i+3*f*c*o+l*a),g=y,x=m,h+=Math.sqrt(v*v+_*_);return h},t.curveTo=function(e,r,i,n,s,a,h){var u=h[h.length-2],c=h[h.length-1];h.length-=2;var l=o._segmentsCount(t.curveLength(u,c,e,r,i,n,s,a)),f=0,d=0,p=0,y=0,m=0;h.push(u,c);for(var v=1,_=0;v<=l;++v)p=(d=(f=1-(_=v/l))*f)*f,m=(y=_*_)*_,h.push(p*u+3*d*_*e+3*f*y*i+m*s,p*c+3*d*_*r+3*f*y*n+m*a)},t}(),T=function(){function t(){}return t.curveLength=function(t,e,r,i,n,o){var s=t-2*r+n,a=e-2*i+o,h=2*r-2*t,u=2*i-2*e,c=4*(s*s+a*a),l=4*(s*h+a*u),f=h*h+u*u,d=2*Math.sqrt(c+l+f),p=Math.sqrt(c),y=2*c*p,m=2*Math.sqrt(f),v=l/p;return(y*d+p*l*(d-m)+(4*f*c-l*l)*Math.log((2*p+v+d)/(v+m)))/(4*y)},t.curveTo=function(e,r,i,n,s){for(var a=s[s.length-2],h=s[s.length-1],u=o._segmentsCount(t.curveLength(a,h,e,r,i,n)),c=0,l=0,f=1;f<=u;++f){var d=f/u;c=a+(e-a)*d,l=h+(r-h)*d,s.push(c+(e+(i-e)*d-c)*d,l+(r+(n-r)*d-l)*d)}},t}(),E=function(){function t(){this.reset()}return t.prototype.begin=function(t,e,r){this.reset(),this.style=t,this.start=e,this.attribStart=r},t.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),w=((g={})[h.HS.POLY]=c,g[h.HS.CIRC]=l,g[h.HS.ELIP]=l,g[h.HS.RECT]=f,g[h.HS.RREC]=y,g),S=[],A=[];function O(t){for(var e=t.points,r=0,i=0;i<e.length-2;i+=2)r+=(e[i+2]-e[i])*(e[i+3]+e[i+1]);return r>0}var I,P=r(7659),C=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null),this.points=[],this.holes=[],this.shape=t,this.lineStyle=r,this.fillStyle=e,this.matrix=i,this.type=t.type}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),R=r(519),M=(I=function(t,e){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},I(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}I(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),D=new h.E9,N=new R.YZ,L=function(t){function e(){var e=t.call(this)||this;return e.closePointEps=1e-4,e.boundsPadding=0,e.uvsFloat32=null,e.indicesUint16=null,e.batchable=!1,e.points=[],e.colors=[],e.uvs=[],e.indices=[],e.textureIds=[],e.graphicsData=[],e.drawCalls=[],e.batchDirty=-1,e.batches=[],e.dirty=0,e.cacheDirty=-1,e.clearDirty=0,e.shapeIndex=0,e._bounds=new R.YZ,e.boundsDirty=-1,e}return M(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t<this.drawCalls.length;t++)this.drawCalls[t].texArray.clear(),A.push(this.drawCalls[t]);this.drawCalls.length=0;for(t=0;t<this.batches.length;t++){var e=this.batches[t];e.reset(),S.push(e)}this.batches.length=0},e.prototype.clear=function(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=null),void 0===i&&(i=null);var n=new C(t,e,r,i);return this.graphicsData.push(n),this.dirty++,this},e.prototype.drawHole=function(t,e){if(void 0===e&&(e=null),!this.graphicsData.length)return null;var r=new C(t,null,null,e),i=this.graphicsData[this.graphicsData.length-1];return r.lineStyle=i.lineStyle,i.holes.push(r),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null},e.prototype.containsPoint=function(t){for(var e=this.graphicsData,r=0;r<e.length;++r){var i=e[r];if(i.fillStyle.visible&&(i.shape&&(i.matrix?i.matrix.applyInverse(t,D):D.copyFrom(t),i.shape.contains(D.x,D.y)))){var n=!1;if(i.holes)for(var o=0;o<i.holes.length;o++){if(i.holes[o].shape.contains(D.x,D.y)){n=!0;break}}if(!n)return!0}}return!1},e.prototype.updateBatches=function(t){if(this.graphicsData.length){if(this.validateBatching()){this.cacheDirty=this.dirty;var e=this.uvs,r=this.graphicsData,i=null,n=null;this.batches.length>0&&(n=(i=this.batches[this.batches.length-1]).style);for(var o=this.shapeIndex;o<r.length;o++){this.shapeIndex++;var s=r[o],a=s.fillStyle,h=s.lineStyle;w[s.type].build(s),s.matrix&&this.transformPoints(s.points,s.matrix);for(var u=0;u<2;u++){var c=0===u?a:h;if(c.visible){var l=c.texture.baseTexture,f=this.indices.length,d=this.points.length/2;l.wrapMode=P.Nt.REPEAT,0===u?this.processFill(s):this.processLine(s);var p=this.points.length/2-d;0!==p&&(i&&!this._compareStyles(n,c)&&(i.end(f,d),i=null),i||((i=S.pop()||new E).begin(c,f,d),this.batches.push(i),n=c),this.addUvs(this.points,e,c.texture,d,p,c.matrix))}}}var y=this.indices.length,m=this.points.length/2;if(i&&i.end(y,m),0!==this.batches.length){if(this.indicesUint16&&this.indices.length===this.indicesUint16.length)this.indicesUint16.set(this.indices);else{var v=m>65535&&t;this.indicesUint16=v?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},e.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native==!!e.native))},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t<e;t++){var r=this.graphicsData[t],i=r.fillStyle,n=r.lineStyle;if(i&&!i.texture.baseTexture.valid)return!1;if(n&&!n.texture.baseTexture.valid)return!1}return!0},e.prototype.packBatches=function(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);for(var t=this.batches,e=0,r=t.length;e<r;e++)for(var i=t[e],n=0;n<i.size;n++){var o=i.start+n;this.indicesUint16[o]=this.indicesUint16[o]-i.attribStart}},e.prototype.isBatchable=function(){if(this.points.length>131070)return!1;for(var t=this.batches,r=0;r<t.length;r++)if(t[r].style.native)return!1;return this.points.length<2*e.BATCHABLE_SIZE},e.prototype.buildDrawCalls=function(){for(var t=++s.BaseTexture._globalBatch,e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),A.push(this.drawCalls[e]);this.drawCalls.length=0;var r=this.colors,i=this.textureIds,n=A.pop();n||((n=new s.BatchDrawCall).texArray=new s.BatchTextureArray),n.texArray.count=0,n.start=0,n.size=0,n.type=P.lg.TRIANGLES;var o=0,a=null,h=0,u=!1,c=P.lg.TRIANGLES,l=0;this.drawCalls.push(n);for(e=0;e<this.batches.length;e++){var f=this.batches[e],d=f.style,p=d.texture.baseTexture;u!==!!d.native&&(c=(u=!!d.native)?P.lg.LINES:P.lg.TRIANGLES,a=null,o=8,t++),a!==p&&(a=p,p._batchEnabled!==t&&(8===o&&(t++,o=0,n.size>0&&((n=A.pop())||((n=new s.BatchDrawCall).texArray=new s.BatchTextureArray),this.drawCalls.push(n)),n.start=l,n.size=0,n.texArray.count=0,n.type=c),p.touched=1,p._batchEnabled=t,p._batchLocation=o,p.wrapMode=P.Nt.REPEAT,n.texArray.elements[n.texArray.count++]=p,o++)),n.size+=f.size,l+=f.size,h=p._batchLocation,this.addColors(r,d.color,d.alpha,f.attribSize,f.attribStart),this.addTextureIds(i,h,f.attribSize,f.attribStart)}s.BaseTexture._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,r=this.colors,i=this.textureIds,n=new ArrayBuffer(3*t.length*4),o=new Float32Array(n),s=new Uint32Array(n),a=0,h=0;h<t.length/2;h++)o[a++]=t[2*h],o[a++]=t[2*h+1],o[a++]=e[2*h],o[a++]=e[2*h+1],s[a++]=r[h],o[a++]=i[h];this._buffer.update(n),this._indexBuffer.update(this.indicesUint16)},e.prototype.processFill=function(t){t.holes.length?(this.processHoles(t.holes),c.triangulate(t,this)):w[t.type].triangulate(t,this)},e.prototype.processLine=function(t){_(t,this);for(var e=0;e<t.holes.length;e++)_(t.holes[e],this)},e.prototype.processHoles=function(t){for(var e=0;e<t.length;e++){var r=t[e];w[r.type].build(r),r.matrix&&this.transformPoints(r.points,r.matrix)}},e.prototype.calculateBounds=function(){var t=this._bounds,e=N,r=h.y3.IDENTITY;this._bounds.clear(),e.clear();for(var i=0;i<this.graphicsData.length;i++){var n=this.graphicsData[i],o=n.shape,s=n.type,a=n.lineStyle,u=n.matrix||h.y3.IDENTITY,c=0;if(a&&a.visible){var l=a.alignment;c=a.width,s===h.HS.POLY?O(o)?c*=1-l:c*=l:c*=Math.max(0,l)}if(r!==u&&(e.isEmpty()||(t.addBoundsMatrix(e,r),e.clear()),r=u),s===h.HS.RECT||s===h.HS.RREC){var f=o;e.addFramePad(f.x,f.y,f.x+f.width,f.y+f.height,c,c)}else if(s===h.HS.CIRC){var d=o;e.addFramePad(d.x,d.y,d.x,d.y,d.radius+c,d.radius+c)}else if(s===h.HS.ELIP){var p=o;e.addFramePad(p.x,p.y,p.x,p.y,p.width+c,p.height+c)}else{var y=o;t.addVerticesMatrix(r,y.points,0,y.points.length,c,c)}}e.isEmpty()||t.addBoundsMatrix(e,r),t.pad(this.boundsPadding,this.boundsPadding)},e.prototype.transformPoints=function(t,e){for(var r=0;r<t.length/2;r++){var i=t[2*r],n=t[2*r+1];t[2*r]=e.a*i+e.c*n+e.tx,t[2*r+1]=e.b*i+e.d*n+e.ty}},e.prototype.addColors=function(t,e,r,i,n){void 0===n&&(n=0);var o=(e>>16)+(65280&e)+((255&e)<<16),s=(0,u.rA)(o,r);t.length=Math.max(t.length,n+i);for(var a=0;a<i;a++)t[n+a]=s},e.prototype.addTextureIds=function(t,e,r,i){void 0===i&&(i=0),t.length=Math.max(t.length,i+r);for(var n=0;n<r;n++)t[i+n]=e},e.prototype.addUvs=function(t,e,r,i,n,o){void 0===o&&(o=null);for(var s=0,a=e.length,h=r.frame;s<n;){var u=t[2*(i+s)],c=t[2*(i+s)+1];if(o){var l=o.a*u+o.c*c+o.tx;c=o.b*u+o.d*c+o.ty,u=l}s++,e.push(u/h.width,c/h.height)}var f=r.baseTexture;(h.width<f.width||h.height<f.height)&&this.adjustUvs(e,r,a,n)},e.prototype.adjustUvs=function(t,e,r,i){for(var n=e.baseTexture,o=1e-6,s=r+2*i,a=e.frame,h=a.width/n.width,u=a.height/n.height,c=a.x/a.width,l=a.y/a.height,f=Math.floor(t[r]+o),d=Math.floor(t[r+1]+o),p=r+2;p<s;p+=2)f=Math.min(f,Math.floor(t[p]+o)),d=Math.min(d,Math.floor(t[p+1]+o));c-=f,l-=d;for(p=r;p<s;p+=2)t[p]=(t[p]+c)*h,t[p+1]=(t[p+1]+l)*u},e.BATCHABLE_SIZE=100,e}(s.BatchGeometry),F=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),B=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.width=0,e.alignment=.5,e.native=!1,e.cap=n.BUTT,e.join=i.MITER,e.miterLimit=10,e}return F(e,t),e.prototype.clone=function(){var t=new e;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t},e.prototype.reset=function(){t.prototype.reset.call(this),this.color=0,this.alignment=.5,this.width=0,this.native=!1},e}(a),U=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),k=new Float32Array(3),j={},G=function(t){function e(e){void 0===e&&(e=null);var r=t.call(this)||this;return r.shader=null,r.pluginName="batch",r.currentPath=null,r.batches=[],r.batchTint=-1,r.batchDirty=-1,r.vertexData=null,r._fillStyle=new a,r._lineStyle=new B,r._matrix=null,r._holeMode=!1,r.state=s.State.for2d(),r._geometry=e||new L,r._geometry.refCount++,r._transformID=-1,r.tint=16777215,r.blendMode=P.T$.NORMAL,r}return U(e,t),Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return this.finishPoly(),new e(this._geometry)},Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fill",{get:function(){return this._fillStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"line",{get:function(){return this._lineStyle},enumerable:!1,configurable:!0}),e.prototype.lineStyle=function(t,e,r,i,n){return void 0===t&&(t=null),void 0===e&&(e=0),void 0===r&&(r=1),void 0===i&&(i=.5),void 0===n&&(n=!1),"number"==typeof t&&(t={width:t,color:e,alpha:r,alignment:i,native:n}),this.lineTextureStyle(t)},e.prototype.lineTextureStyle=function(t){t=Object.assign({width:0,texture:s.Texture.WHITE,color:t&&t.texture?16777215:0,alpha:1,matrix:null,alignment:.5,native:!1,cap:n.BUTT,join:i.MITER,miterLimit:10},t),this.currentPath&&this.startPoly();var e=t.width>0&&t.alpha>0;return e?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:e},t)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new h.mg,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new h.mg,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},e.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var r=this.currentPath.points,i=r[r.length-2],n=r[r.length-1];return i===t&&n===e||r.push(t,e),this},e.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},e.prototype.quadraticCurveTo=function(t,e,r,i){this._initCurve();var n=this.currentPath.points;return 0===n.length&&this.moveTo(0,0),T.curveTo(t,e,r,i,n),this},e.prototype.bezierCurveTo=function(t,e,r,i,n,o){return this._initCurve(),b.curveTo(t,e,r,i,n,o,this.currentPath.points),this},e.prototype.arcTo=function(t,e,r,i,n){this._initCurve(t,e);var o=this.currentPath.points,s=x.curveTo(t,e,r,i,n,o);if(s){var a=s.cx,h=s.cy,u=s.radius,c=s.startAngle,l=s.endAngle,f=s.anticlockwise;this.arc(a,h,u,c,l,f)}return this},e.prototype.arc=function(t,e,r,i,n,o){if(void 0===o&&(o=!1),i===n)return this;if(!o&&n<=i?n+=h._b:o&&i<=n&&(i+=h._b),0===n-i)return this;var s=t+Math.cos(i)*r,a=e+Math.sin(i)*r,u=this._geometry.closePointEps,c=this.currentPath?this.currentPath.points:null;if(c){var l=Math.abs(c[c.length-2]-s),f=Math.abs(c[c.length-1]-a);l<u&&f<u||c.push(s,a)}else this.moveTo(s,a),c=this.currentPath.points;return x.arc(s,a,t,e,r,i,n,o,c),this},e.prototype.beginFill=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=1),this.beginTextureFill({texture:s.Texture.WHITE,color:t,alpha:e})},e.prototype.beginTextureFill=function(t){t=Object.assign({texture:s.Texture.WHITE,color:16777215,alpha:1,matrix:null},t),this.currentPath&&this.startPoly();var e=t.alpha>0;return e?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:e},t)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,e,r,i){return this.drawShape(new h.Ae(t,e,r,i))},e.prototype.drawRoundedRect=function(t,e,r,i,n){return this.drawShape(new h.c9(t,e,r,i,n))},e.prototype.drawCircle=function(t,e,r){return this.drawShape(new h.Cd(t,e,r))},e.prototype.drawEllipse=function(t,e,r,i){return this.drawShape(new h.Pj(t,e,r,i))},e.prototype.drawPolygon=function(){for(var t,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var i=!0,n=e[0];n.points?(i=n.closeStroke,t=n.points):t=Array.isArray(e[0])?e[0]:e;var o=new h.mg(t);return o.closeStroke=i,this.drawShape(o),this},e.prototype.drawShape=function(t){return this._holeMode?this._geometry.drawHole(t,this._matrix):this._geometry.drawShape(t,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this},e.prototype.clear=function(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this},e.prototype.isFastRect=function(){var t=this._geometry.graphicsData;return!(1!==t.length||t[0].shape.type!==h.HS.RECT||t[0].holes.length||t[0].lineStyle.visible&&t[0].lineStyle.width)},e.prototype._render=function(t){this.finishPoly();var e=this._geometry,r=t.context.supports.uint32Indices;e.updateBatches(r),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(t)):(t.batch.flush(),this._renderDirect(t))},e.prototype._populateBatches=function(){var t=this._geometry,e=this.blendMode,r=t.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=t.batchDirty,this.batches.length=r,this.vertexData=new Float32Array(t.points);for(var i=0;i<r;i++){var n=t.batches[i],o=n.style.color,s=new Float32Array(this.vertexData.buffer,4*n.attribStart*2,2*n.attribSize),a=new Float32Array(t.uvsFloat32.buffer,4*n.attribStart*2,2*n.attribSize),h={vertexData:s,blendMode:e,indices:new Uint16Array(t.indicesUint16.buffer,2*n.start,n.size),uvs:a,_batchRGB:(0,u.wK)(o),_tintRGB:o,_texture:n.style.texture,alpha:n.style.alpha,worldAlpha:1};this.batches[i]=h}},e.prototype._renderBatched=function(t){if(this.batches.length){t.batch.setObjectRenderer(t.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(var e=0,r=this.batches.length;e<r;e++){var i=this.batches[e];i.worldAlpha=this.worldAlpha*i.alpha,t.plugins[this.pluginName].render(i)}}},e.prototype._renderDirect=function(t){var e=this._resolveDirectShader(t),r=this._geometry,i=this.tint,n=this.worldAlpha,o=e.uniforms,s=r.drawCalls;o.translationMatrix=this.transform.worldTransform,o.tint[0]=(i>>16&255)/255*n,o.tint[1]=(i>>8&255)/255*n,o.tint[2]=(255&i)/255*n,o.tint[3]=n,t.shader.bind(e),t.geometry.bind(r,e),t.state.set(this.state);for(var a=0,h=s.length;a<h;a++)this._renderDrawCallDirect(t,r.drawCalls[a])},e.prototype._renderDrawCallDirect=function(t,e){for(var r=e.texArray,i=e.type,n=e.size,o=e.start,s=r.count,a=0;a<s;a++)t.texture.bind(r.elements[a],a);t.geometry.draw(i,n,o)},e.prototype._resolveDirectShader=function(t){var e=this.shader,r=this.pluginName;if(!e){if(!j[r]){for(var i=t.plugins.batch.MAX_TEXTURES,n=new Int32Array(i),o=0;o<i;o++)n[o]=o;var a={tint:new Float32Array([1,1,1,1]),translationMatrix:new h.y3,default:s.UniformGroup.from({uSamplers:n},!0)},u=t.plugins[r]._shader.program;j[r]=new s.Shader(u,a)}e=j[r]}return e},e.prototype._calculateBounds=function(){this.finishPoly();var t=this._geometry;if(t.graphicsData.length){var e=t.bounds,r=e.minX,i=e.minY,n=e.maxX,o=e.maxY;this._bounds.addFrame(this.transform,r,i,n,o)}},e.prototype.containsPoint=function(t){return this.worldTransform.applyInverse(t,e._TEMP_POINT),this._geometry.containsPoint(e._TEMP_POINT)},e.prototype.calculateTints=function(){if(this.batchTint!==this.tint){this.batchTint=this.tint;for(var t=(0,u.wK)(this.tint,k),e=0;e<this.batches.length;e++){var r=this.batches[e],i=r._batchRGB,n=(t[0]*i[0]*255<<16)+(t[1]*i[1]*255<<8)+(0|t[2]*i[2]*255);r._tintRGB=(n>>16)+(65280&n)+((255&n)<<16)}}},e.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,h=this._geometry.points,u=this.vertexData,c=0,l=0;l<h.length;l+=2){var f=h[l],d=h[l+1];u[c++]=r*f+n*d+s,u[c++]=o*d+i*f+a}}},e.prototype.closePath=function(){var t=this.currentPath;return t&&(t.closeStroke=!0,this.finishPoly()),this},e.prototype.setMatrix=function(t){return this._matrix=t,this},e.prototype.beginHole=function(){return this.finishPoly(),this._holeMode=!0,this},e.prototype.endHole=function(){return this.finishPoly(),this._holeMode=!1,this},e.prototype.destroy=function(e){this._geometry.refCount--,0===this._geometry.refCount&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,t.prototype.destroy.call(this,e)},e._TEMP_POINT=new h.E9,e}(R.W2)},1893:(t,e,r)=>{r.d(e,{Cd:()=>h,ZX:()=>s,Pj:()=>u,y3:()=>p,AB:()=>d,_b:()=>n,E9:()=>f,mg:()=>c,jl:()=>o,Ae:()=>a,c9:()=>l,HS:()=>i,wx:()=>E,Lv:()=>T});var i,n=2*Math.PI,o=180/Math.PI,s=Math.PI/180;!function(t){t[t.POLY=0]="POLY",t[t.RECT=1]="RECT",t[t.CIRC=2]="CIRC",t[t.ELIP=3]="ELIP",t[t.RREC=4]="RREC"}(i||(i={}));var a=function(){function t(t,e,r,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),this.x=Number(t),this.y=Number(e),this.width=Number(r),this.height=Number(n),this.type=i.RECT}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t,"EMPTY",{get:function(){return new t(0,0,0,0)},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e,this},t.prototype.fit=function(t){var e=Math.max(this.x,t.x),r=Math.min(this.x+this.width,t.x+t.width),i=Math.max(this.y,t.y),n=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(r-e,0),this.y=i,this.height=Math.max(n-i,0),this},t.prototype.ceil=function(t,e){void 0===t&&(t=1),void 0===e&&(e=.001);var r=Math.ceil((this.x+this.width-e)*t)/t,i=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=r-this.x,this.height=i-this.y,this},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),r=Math.max(this.x+this.width,t.x+t.width),i=Math.min(this.y,t.y),n=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=r-e,this.y=i,this.height=n-i,this},t.prototype.toString=function(){return"[@pixi/math:Rectangle x=".concat(this.x," y=").concat(this.y," width=").concat(this.width," height=").concat(this.height,"]")},t}(),h=function(){function t(t,e,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),this.x=t,this.y=e,this.radius=r,this.type=i.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var r=this.radius*this.radius,i=this.x-t,n=this.y-e;return(i*=i)+(n*=n)<=r},t.prototype.getBounds=function(){return new a(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t.prototype.toString=function(){return"[@pixi/math:Circle x=".concat(this.x," y=").concat(this.y," radius=").concat(this.radius,"]")},t}(),u=function(){function t(t,e,r,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),this.x=t,this.y=e,this.width=r,this.height=n,this.type=i.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var r=(t-this.x)/this.width,i=(e-this.y)/this.height;return(r*=r)+(i*=i)<=1},t.prototype.getBounds=function(){return new a(this.x-this.width,this.y-this.height,this.width,this.height)},t.prototype.toString=function(){return"[@pixi/math:Ellipse x=".concat(this.x," y=").concat(this.y," width=").concat(this.width," height=").concat(this.height,"]")},t}(),c=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Array.isArray(t[0])?t[0]:t;if("number"!=typeof r[0]){for(var n=[],o=0,s=r.length;o<s;o++)n.push(r[o].x,r[o].y);r=n}this.points=r,this.type=i.POLY,this.closeStroke=!0}return t.prototype.clone=function(){var e=new t(this.points.slice());return e.closeStroke=this.closeStroke,e},t.prototype.contains=function(t,e){for(var r=!1,i=this.points.length/2,n=0,o=i-1;n<i;o=n++){var s=this.points[2*n],a=this.points[2*n+1],h=this.points[2*o],u=this.points[2*o+1];a>e!=u>e&&t<(e-a)/(u-a)*(h-s)+s&&(r=!r)}return r},t.prototype.toString=function(){return"[@pixi/math:Polygon"+"closeStroke=".concat(this.closeStroke)+"points=".concat(this.points.reduce((function(t,e){return"".concat(t,", ").concat(e)}),""),"]")},t}(),l=function(){function t(t,e,r,n,o){void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===o&&(o=20),this.x=t,this.y=e,this.width=r,this.height=n,this.radius=o,this.type=i.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var r=t-(this.x+this.radius),i=e-(this.y+this.radius),n=this.radius*this.radius;if(r*r+i*i<=n)return!0;if((r=t-(this.x+this.width-this.radius))*r+i*i<=n)return!0;if(r*r+(i=e-(this.y+this.height-this.radius))*i<=n)return!0;if((r=t-(this.x+this.radius))*r+i*i<=n)return!0}return!1},t.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x=".concat(this.x," y=").concat(this.y)+"width=".concat(this.width," height=").concat(this.height," radius=").concat(this.radius,"]")},t}(),f=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this},t.prototype.toString=function(){return"[@pixi/math:Point x=".concat(this.x," y=").concat(this.y,"]")},t}(),d=function(){function t(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0),this._x=r,this._y=i,this.cb=t,this.scope=e}return t.prototype.clone=function(e,r){return void 0===e&&(e=this.cb),void 0===r&&(r=this.scope),new t(e,r,this._x,this._y)},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._x===t&&this._y===e||(this._x=t,this._y=e,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},t.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=".concat(0," y=").concat(0," scope=").concat(this.scope,"]")},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}(),p=function(){function t(t,e,r,i,n,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=1),void 0===n&&(n=0),void 0===o&&(o=0),this.array=null,this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,r,i,n,o){return this.a=t,this.b=e,this.c=r,this.d=i,this.tx=n,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var r=e||this.array;return t?(r[0]=this.a,r[1]=this.b,r[2]=0,r[3]=this.c,r[4]=this.d,r[5]=0,r[6]=this.tx,r[7]=this.ty,r[8]=1):(r[0]=this.a,r[1]=this.c,r[2]=this.tx,r[3]=this.b,r[4]=this.d,r[5]=this.ty,r[6]=0,r[7]=0,r[8]=1),r},t.prototype.apply=function(t,e){e=e||new f;var r=t.x,i=t.y;return e.x=this.a*r+this.c*i+this.tx,e.y=this.b*r+this.d*i+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new f;var r=1/(this.a*this.d+this.c*-this.b),i=t.x,n=t.y;return e.x=this.d*r*i+-this.c*r*n+(this.ty*this.c-this.tx*this.d)*r,e.y=this.a*r*n+-this.b*r*i+(-this.ty*this.a+this.tx*this.b)*r,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),r=Math.sin(t),i=this.a,n=this.c,o=this.tx;return this.a=i*e-this.b*r,this.b=i*r+this.b*e,this.c=n*e-this.d*r,this.d=n*r+this.d*e,this.tx=o*e-this.ty*r,this.ty=o*r+this.ty*e,this},t.prototype.append=function(t){var e=this.a,r=this.b,i=this.c,n=this.d;return this.a=t.a*e+t.b*i,this.b=t.a*r+t.b*n,this.c=t.c*e+t.d*i,this.d=t.c*r+t.d*n,this.tx=t.tx*e+t.ty*i+this.tx,this.ty=t.tx*r+t.ty*n+this.ty,this},t.prototype.setTransform=function(t,e,r,i,n,o,s,a,h){return this.a=Math.cos(s+h)*n,this.b=Math.sin(s+h)*n,this.c=-Math.sin(s-a)*o,this.d=Math.cos(s-a)*o,this.tx=t-(r*this.a+i*this.c),this.ty=e-(r*this.b+i*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var r=this.a,i=this.c;this.a=r*t.a+this.b*t.c,this.b=r*t.b+this.b*t.d,this.c=i*t.a+this.d*t.c,this.d=i*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,r=this.b,i=this.c,o=this.d,s=t.pivot,a=-Math.atan2(-i,o),h=Math.atan2(r,e),u=Math.abs(a+h);return u<1e-5||Math.abs(n-u)<1e-5?(t.rotation=h,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=a,t.skew.y=h),t.scale.x=Math.sqrt(e*e+r*r),t.scale.y=Math.sqrt(i*i+o*o),t.position.x=this.tx+(s.x*e+s.y*i),t.position.y=this.ty+(s.x*r+s.y*o),t},t.prototype.invert=function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.tx,o=t*i-e*r;return this.a=i/o,this.b=-e/o,this.c=-r/o,this.d=t/o,this.tx=(r*this.ty-i*n)/o,this.ty=-(t*this.ty-e*n)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},t.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},t.prototype.toString=function(){return"[@pixi/math:Matrix a=".concat(this.a," b=").concat(this.b," c=").concat(this.c," d=").concat(this.d," tx=").concat(this.tx," ty=").concat(this.ty,"]")},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t}(),y=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],m=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],v=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],_=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],g=[],x=[],b=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];g.push(e);for(var r=0;r<16;r++)for(var i=b(y[t]*y[r]+v[t]*m[r]),n=b(m[t]*y[r]+_[t]*m[r]),o=b(y[t]*v[r]+v[t]*_[r]),s=b(m[t]*v[r]+_[t]*_[r]),a=0;a<16;a++)if(y[a]===i&&m[a]===n&&v[a]===o&&_[a]===s){e.push(a);break}}for(t=0;t<16;t++){var h=new p;h.set(y[t],m[t],v[t],_[t],0,0),x.push(h)}}();var T={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return y[t]},uY:function(t){return m[t]},vX:function(t){return v[t]},vY:function(t){return _[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return g[t][e]},sub:function(t,e){return g[t][T.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?T.S:T.N:2*Math.abs(e)<=Math.abs(t)?t>0?T.E:T.W:e>0?t>0?T.SE:T.SW:t>0?T.NE:T.NW},matrixAppendRotationInv:function(t,e,r,i){void 0===r&&(r=0),void 0===i&&(i=0);var n=x[T.inv(e)];n.tx=r,n.ty=i,t.append(n)}},E=function(){function t(){this.worldTransform=new p,this.localTransform=new p,this.position=new d(this.onChange,this,0,0),this.scale=new d(this.onChange,this,1,1),this.pivot=new d(this.onChange,this,0,0),this.skew=new d(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.toString=function(){return"[@pixi/math:Transform "+"position=(".concat(this.position.x,", ").concat(this.position.y,") ")+"rotation=".concat(this.rotation," ")+"scale=(".concat(this.scale.x,", ").concat(this.scale.y,") ")+"skew=(".concat(this.skew.x,", ").concat(this.skew.y,") ")+"]"},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var r=t.worldTransform,i=this.worldTransform;i.a=e.a*r.a+e.b*r.c,i.b=e.a*r.b+e.b*r.d,i.c=e.c*r.a+e.d*r.c,i.d=e.c*r.b+e.d*r.d,i.tx=e.tx*r.a+e.ty*r.c+r.tx,i.ty=e.tx*r.b+e.ty*r.d+r.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),t.IDENTITY=new t,t}()},6340:(t,e,r)=>{r.d(e,{AL:()=>m,IE:()=>l});var i,n=r(8141),o=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),s=function(t){function e(e,r,i,n){void 0===e&&(e=100),void 0===r&&(r=100),void 0===i&&(i=10),void 0===n&&(n=10);var o=t.call(this)||this;return o.segWidth=i,o.segHeight=n,o.width=e,o.height=r,o.build(),o}return o(e,t),e.prototype.build=function(){for(var t=this.segWidth*this.segHeight,e=[],r=[],i=[],n=this.segWidth-1,o=this.segHeight-1,s=this.width/n,a=this.height/o,h=0;h<t;h++){var u=h%this.segWidth,c=h/this.segWidth|0;e.push(u*s,c*a),r.push(u/n,c/o)}var l=n*o;for(h=0;h<l;h++){var f=h%n,d=h/n|0,p=d*this.segWidth+f,y=d*this.segWidth+f+1,m=(d+1)*this.segWidth+f,v=(d+1)*this.segWidth+f+1;i.push(p,y,m,y,v,m)}this.buffers[0].data=new Float32Array(e),this.buffers[1].data=new Float32Array(r),this.indexBuffer.data=new Uint16Array(i),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()},e}(n.xc),a=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),h=function(t){function e(e,r,i){void 0===e&&(e=200),void 0===i&&(i=0);var n=t.call(this,new Float32Array(4*r.length),new Float32Array(4*r.length),new Uint16Array(6*(r.length-1)))||this;return n.points=r,n._width=e,n.textureScale=i,n.build(),n}return a(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),e.prototype.build=function(){var t=this.points;if(t){var e=this.getBuffer("aVertexPosition"),r=this.getBuffer("aTextureCoord"),i=this.getIndex();if(!(t.length<1)){e.data.length/4!==t.length&&(e.data=new Float32Array(4*t.length),r.data=new Float32Array(4*t.length),i.data=new Uint16Array(6*(t.length-1)));var n=r.data,o=i.data;n[0]=0,n[1]=0,n[2]=0,n[3]=1;for(var s=0,a=t[0],h=this._width*this.textureScale,u=t.length,c=0;c<u;c++){var l=4*c;if(this.textureScale>0){var f=a.x-t[c].x,d=a.y-t[c].y,p=Math.sqrt(f*f+d*d);a=t[c],s+=p/h}else s=c/(u-1);n[l]=s,n[l+1]=0,n[l+2]=s,n[l+3]=1}var y=0;for(c=0;c<u-1;c++){l=2*c;o[y++]=l,o[y++]=l+1,o[y++]=l+2,o[y++]=l+2,o[y++]=l+1,o[y++]=l+3}r.update(),i.update(),this.updateVertices()}}},e.prototype.updateVertices=function(){var t=this.points;if(!(t.length<1)){for(var e,r=t[0],i=0,n=0,o=this.buffers[0].data,s=t.length,a=0;a<s;a++){var h=t[a],u=4*a;n=-((e=a<t.length-1?t[a+1]:h).x-r.x),i=e.y-r.y;var c=10*(1-a/(s-1));c>1&&(c=1);var l=Math.sqrt(i*i+n*n),f=this.textureScale>0?this.textureScale*this._width/2:this._width/2;i/=l,n/=l,i*=f,n*=f,o[u]=h.x+i,o[u+1]=h.y+n,o[u+2]=h.x-i,o[u+3]=h.y-n,r=h}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(n.xc),u=r(7659),c=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),l=function(t){function e(e,r,i){void 0===i&&(i=0);var o=this,s=new h(e.height,r,i),a=new n.rY(e);return i>0&&(e.baseTexture.wrapMode=u.Nt.REPEAT),(o=t.call(this,s,a)||this).autoUpdate=!0,o}return c(e,t),e.prototype._render=function(e){var r=this.geometry;(this.autoUpdate||r._width!==this.shader.texture.height)&&(r._width=this.shader.texture.height,r.update()),t.prototype._render.call(this,e)},e}(n.Kj),f=r(9043),d=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),p=function(t){function e(e,r,i){var o=this,a=new s(e.width,e.height,r,i),h=new n.rY(f.Texture.WHITE);return(o=t.call(this,a,h)||this).texture=e,o.autoResize=!0,o}return d(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry,e=this.shader.texture,r=e.width,i=e.height;!this.autoResize||t.width===r&&t.height===i||(t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build())},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},e.prototype.destroy=function(e){this.shader.texture.off("update",this.textureUpdated,this),t.prototype.destroy.call(this,e)},e}(n.Kj),y=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),m=function(t){function e(e,r,i,o,s){void 0===e&&(e=f.Texture.EMPTY);var a=this,h=new n.xc(r,i,o);h.getBuffer("aVertexPosition").static=!1;var u=new n.rY(e);return(a=t.call(this,h,u,null,s)||this).autoUpdate=!0,a}return y(e,t),Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)},e}(n.Kj),v=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}();!function(t){function e(e,r,i,n,o){void 0===r&&(r=10),void 0===i&&(i=10),void 0===n&&(n=10),void 0===o&&(o=10);var s=t.call(this,f.Texture.WHITE,4,4)||this;return s._origWidth=e.orig.width,s._origHeight=e.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=r,s._rightWidth=n,s._topHeight=i,s._bottomHeight=o,s.texture=e,s}v(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._getMinScale();t[9]=t[11]=t[13]=t[15]=this._topHeight*e,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*e,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._getMinScale();t[2]=t[10]=t[18]=t[26]=this._leftWidth*e,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*e,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._getMinScale=function(){var t=this._leftWidth+this._rightWidth,e=this._width>t?1:this._width/t,r=this._topHeight+this._bottomHeight,i=this._height>r?1:this._height/r;return Math.min(e,i)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var r=1/this._origWidth,i=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=r*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-r*this._rightWidth,e[9]=e[11]=e[13]=e[15]=i*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-i*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}(p)},8141:(t,e,r)=>{r.d(e,{Kj:()=>d,xc:()=>_,rY:()=>m});var i,n=r(9043),o=r(1893),s=r(7659),a=r(519),h=r(6787),u=function(){function t(t,e){this.uvBuffer=t,this.uvMatrix=e,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return t.prototype.update=function(t){if(t||this._bufferUpdateId!==this.uvBuffer._updateID||this._textureUpdateId!==this.uvMatrix._updateID){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var e=this.uvBuffer.data;this.data&&this.data.length===e.length||(this.data=new Float32Array(e.length)),this.uvMatrix.multiplyUvs(e,this.data),this._updateID++}},t}(),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),l=new o.E9,f=new o.mg,d=function(t){function e(e,r,i,o){void 0===o&&(o=s.lg.TRIANGLES);var a=t.call(this)||this;return a.geometry=e,a.shader=r,a.state=i||n.State.for2d(),a.drawMode=o,a.start=0,a.size=0,a.uvs=null,a.indices=null,a.vertexData=new Float32Array(1),a.vertexDirty=-1,a._transformID=-1,a._roundPixels=h.X.ROUND_PIXELS,a.batchUvs=null,a}return c(e,t),Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},set:function(t){this._geometry!==t&&(this._geometry&&(this._geometry.refCount--,0===this._geometry.refCount&&this._geometry.dispose()),this._geometry=t,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return this.shader},set:function(t){this.shader=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return"tint"in this.shader?this.shader.tint:null},set:function(t){this.shader.tint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return"texture"in this.shader?this.shader.texture:null},set:function(t){this.shader.texture=t},enumerable:!1,configurable:!0}),e.prototype._render=function(t){var r=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===s.lg.TRIANGLES&&r.length<2*e.BATCHABLE_SIZE?this._renderToBatch(t):this._renderDefault(t)},e.prototype._renderDefault=function(t){var e=this.shader;e.alpha=this.worldAlpha,e.update&&e.update(),t.batch.flush(),e.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),t.shader.bind(e),t.state.set(this.state),t.geometry.bind(this.geometry,e),t.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},e.prototype._renderToBatch=function(t){var e=this.geometry,r=this.shader;r.uvMatrix&&(r.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=e.indexBuffer.data,this._tintRGB=r._tintRGB,this._texture=r.texture;var i=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[i]),t.plugins[i].render(this)},e.prototype.calculateVertices=function(){var t=this.geometry.buffers[0],e=t.data,r=t._updateID;if(r!==this.vertexDirty||this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID,this.vertexData.length!==e.length&&(this.vertexData=new Float32Array(e.length));for(var i=this.transform.worldTransform,n=i.a,o=i.b,s=i.c,a=i.d,u=i.tx,c=i.ty,l=this.vertexData,f=0;f<l.length/2;f++){var d=e[2*f],p=e[2*f+1];l[2*f]=n*d+s*p+u,l[2*f+1]=o*d+a*p+c}if(this._roundPixels){var y=h.X.RESOLUTION;for(f=0;f<l.length;++f)l[f]=Math.round((l[f]*y|0)/y)}this.vertexDirty=r}},e.prototype.calculateUvs=function(){var t=this.geometry.buffers[1],e=this.shader;e.uvMatrix.isSimple?this.uvs=t.data:(this.batchUvs||(this.batchUvs=new u(t,e.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)},e.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,l);for(var e=this.geometry.getBuffer("aVertexPosition").data,r=f.points,i=this.geometry.getIndex().data,n=i.length,o=4===this.drawMode?3:1,s=0;s+2<n;s+=o){var a=2*i[s],h=2*i[s+1],u=2*i[s+2];if(r[0]=e[a],r[1]=e[a+1],r[2]=e[h],r[3]=e[h+1],r[4]=e[u],r[5]=e[u+1],f.contains(l.x,l.y))return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null},e.BATCHABLE_SIZE=100,e}(a.W2),p=r(8306);var y=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),m=function(t){function e(e,r){var i=this,s={uSampler:e,alpha:1,uTextureMatrix:o.y3.IDENTITY,uColor:new Float32Array([1,1,1,1])};return(r=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},r)).uniforms&&Object.assign(s,r.uniforms),(i=t.call(this,r.program||n.Program.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n"),s)||this)._colorDirty=!1,i.uvMatrix=new n.TextureMatrix(e),i.batchable=void 0===r.program,i.pluginName=r.pluginName,i.tint=r.tint,i.alpha=r.alpha,i}return y(e,t),Object.defineProperty(e.prototype,"texture",{get:function(){return this.uniforms.uSampler},set:function(t){this.uniforms.uSampler!==t&&(this.uniforms.uSampler=t,this.uvMatrix.texture=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){t!==this._tint&&(this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;(0,p.GT)(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(n.Shader),v=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),_=function(t){function e(e,r,i){var o=t.call(this)||this,a=new n.Buffer(e),h=new n.Buffer(r,!0),u=new n.Buffer(i,!0,!0);return o.addAttribute("aVertexPosition",a,2,!1,s.vK.FLOAT).addAttribute("aTextureCoord",h,2,!1,s.vK.FLOAT).addIndex(u),o._updateId=-1,o}return v(e,t),Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(n.Geometry)},2846:(t,e,r)=>{r.d(e,{R:()=>i});var i=function(){function t(t){this.items=[],this._name=t,this._aliasCount=0}return t.prototype.emit=function(t,e,r,i,n,o,s,a){if(arguments.length>8)throw new Error("max arguments reached");var h=this,u=h.name,c=h.items;this._aliasCount++;for(var l=0,f=c.length;l<f;l++)c[l][u](t,e,r,i,n,o,s,a);return c===this.items&&this._aliasCount--,this},t.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();Object.defineProperties(i.prototype,{dispatch:{value:i.prototype.emit},run:{value:i.prototype.emit}})},6787:(t,e,r)=>{r.d(e,{t:()=>g,X:()=>b});var i=/iPhone/i,n=/iPod/i,o=/iPad/i,s=/\biOS-universal(?:.+)Mac\b/i,a=/\bAndroid(?:.+)Mobile\b/i,h=/Android/i,u=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,c=/Silk/i,l=/Windows Phone/i,f=/\bWindows(?:.+)ARM\b/i,d=/BlackBerry/i,p=/BB10/i,y=/Opera Mini/i,m=/\b(CriOS|Chrome)(?:.+)Mobile/i,v=/Mobile(?:.+)Firefox\b/i,_=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};var g=function(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var r=e.userAgent,g=r.split("[FBAN");void 0!==g[1]&&(r=g[0]),void 0!==(g=r.split("Twitter"))[1]&&(r=g[0]);var x=function(t){return function(e){return e.test(t)}}(r),b={apple:{phone:x(i)&&!x(l),ipod:x(n),tablet:!x(i)&&(x(o)||_(e))&&!x(l),universal:x(s),device:(x(i)||x(n)||x(o)||x(s)||_(e))&&!x(l)},amazon:{phone:x(u),tablet:!x(u)&&x(c),device:x(u)||x(c)},android:{phone:!x(l)&&x(u)||!x(l)&&x(a),tablet:!x(l)&&!x(u)&&!x(a)&&(x(c)||x(h)),device:!x(l)&&(x(u)||x(c)||x(a)||x(h))||x(/\bokhttp\b/i)},windows:{phone:x(l),tablet:x(f),device:x(l)||x(f)},other:{blackberry:x(d),blackberry10:x(p),opera:x(y),firefox:x(v),chrome:x(m),device:x(d)||x(p)||x(y)||x(v)||x(m)},any:!1,phone:!1,tablet:!1};return b.any=b.apple.device||b.android.device||b.windows.device||b.other.device,b.phone=b.apple.phone||b.android.phone||b.windows.phone,b.tablet=b.apple.tablet||b.android.tablet||b.windows.tablet,b}("undefined"==typeof window?navigator:window.navigator);var x=r(7659),b={MIPMAP_TEXTURES:x.WB.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:x.G5.NONE,SPRITE_MAX_TEXTURES:function(t){if(wx)return 4;var e=!0;if(g.tablet||g.phone){var r;if(g.apple.device)if(r=navigator.userAgent.match(/OS (\d+)_(\d+)?/))parseInt(r[1],10)<11&&(e=!1);if(g.android.device)if(r=navigator.userAgent.match(/Android\s([0-9.]*)/))parseInt(r[1],10)<7&&(e=!1)}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:x.UN.AUTO,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:x.Nt.CLAMP,SCALE_MODE:x.aH.LINEAR,PRECISION_VERTEX:x.cB.HIGH,PRECISION_FRAGMENT:g.apple.device?x.cB.HIGH:x.cB.MEDIUM,CAN_UPLOAD_SAME_BUFFER:!g.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1}},2064:(t,e,r)=>{r.d(e,{o:()=>u});var i,n=r(9043),o=r(1893),s=r(1961),a=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),h=new o.E9,u=function(t){function e(e,r,i){void 0===r&&(r=100),void 0===i&&(i=100);var s=t.call(this,e)||this;return s.tileTransform=new o.wx,s._width=r,s._height=i,s.uvMatrix=s.texture.uvMatrix||new n.TextureMatrix(e),s.pluginName="tilingSprite",s.uvRespectAnchor=!1,s}return a(e,t),Object.defineProperty(e.prototype,"clampMargin",{get:function(){return this.uvMatrix.clampMargin},set:function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileScale",{get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tilePosition",{get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copyFrom(t)},enumerable:!1,configurable:!0}),e.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},e.prototype._render=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,r=this._width*(1-this._anchor._x),i=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,r,i)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new o.Ae),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,h);var e=this._width,r=this._height,i=-e*this.anchor._x;if(h.x>=i&&h.x<i+e){var n=-r*this.anchor._y;if(h.y>=n&&h.y<n+r)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvMatrix=null},e.from=function(t,r){return new e(t instanceof n.Texture?t:n.Texture.from(t,r),r.width,r.height)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0}),e}(s.j),c=r(7659),l=r(8306);const f="#version 100\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n";var d=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),p=new o.y3;!function(t){function e(e){var r=t.call(this,e)||this;return e.runners.contextChange.add(r),r.quad=new n.QuadUv,r.state=n.State.for2d(),r}d(e,t),e.prototype.contextChange=function(){var t=this.renderer,e={globals:t.globalUniforms};this.simpleShader=n.Shader.from(f,"#version 100\n#define SHADER_NAME Tiling-Sprite-Simple-100\n\nprecision lowp float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n vec4 texSample = texture2D(uSampler, vTextureCoord);\n gl_FragColor = texSample * uColor;\n}\n",e),this.shader=t.context.webGLVersion>1?n.Shader.from("#version 300 es\n#define SHADER_NAME Tiling-Sprite-300\n\nprecision lowp float;\n\nin vec2 aVertexPosition;\nin vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nout vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n","#version 300 es\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nin vec2 vTextureCoord;\n\nout vec4 fragmentColor;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n vec2 unclamped = coord;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n vec4 texSample = texture(uSampler, coord, unclamped == coord ? 0.0f : -32.0f);// lod-bias very negative to force lod 0\n\n fragmentColor = texSample * uColor;\n}\n",e):n.Shader.from(f,"#version 100\n#ifdef GL_EXT_shader_texture_lod\n #extension GL_EXT_shader_texture_lod : enable\n#endif\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n coord = (uMapCoord * vec3(coord, 1.0)).xy;\n vec2 unclamped = coord;\n coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n #ifdef GL_EXT_shader_texture_lod\n vec4 texSample = unclamped == coord\n ? texture2D(uSampler, coord) \n : texture2DLodEXT(uSampler, coord, 0);\n #else\n vec4 texSample = texture2D(uSampler, coord);\n #endif\n\n gl_FragColor = texSample * uColor;\n}\n",e)},e.prototype.render=function(t){var e=this.renderer,r=this.quad,i=r.vertices;i[0]=i[6]=t._width*-t.anchor.x,i[1]=i[3]=t._height*-t.anchor.y,i[2]=i[4]=t._width*(1-t.anchor.x),i[5]=i[7]=t._height*(1-t.anchor.y);var n=t.uvRespectAnchor?t.anchor.x:0,o=t.uvRespectAnchor?t.anchor.y:0;(i=r.uvs)[0]=i[6]=-n,i[1]=i[3]=-o,i[2]=i[4]=1-n,i[5]=i[7]=1-o,r.invalidate();var s=t._texture,a=s.baseTexture,h=t.tileTransform.localTransform,u=t.uvMatrix,f=a.isPowerOfTwo&&s.frame.width===a.width&&s.frame.height===a.height;f&&(a._glTextures[e.CONTEXT_UID]?f=a.wrapMode!==c.Nt.CLAMP:a.wrapMode===c.Nt.CLAMP&&(a.wrapMode=c.Nt.REPEAT));var d=f?this.simpleShader:this.shader,y=s.width,m=s.height,v=t._width,_=t._height;p.set(h.a*y/v,h.b*y/_,h.c*m/v,h.d*m/_,h.tx/v,h.ty/_),p.invert(),f?p.prepend(u.mapCoord):(d.uniforms.uMapCoord=u.mapCoord.toArray(!0),d.uniforms.uClampFrame=u.uClampFrame,d.uniforms.uClampOffset=u.uClampOffset),d.uniforms.uTransform=p.toArray(!0),d.uniforms.uColor=(0,l.GT)(t.tint,t.worldAlpha,d.uniforms.uColor,a.alphaMode),d.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),d.uniforms.uSampler=s,e.shader.bind(d),e.geometry.bind(r),this.state.blendMode=(0,l.D)(t.blendMode,a.alphaMode),e.state.set(this.state),e.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}}(n.ObjectRenderer)},1961:(t,e,r)=>{r.d(e,{j:()=>d});var i,n=r(7659),o=r(9043),s=r(519),a=r(1893),h=r(6787),u=r(8306),c=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),l=new a.E9,f=new Uint16Array([0,1,2,0,2,3]),d=function(t){function e(e){var r=t.call(this)||this;return r._anchor=new a.AB(r._onAnchorUpdate,r,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),r._texture=null,r._width=0,r._height=0,r._tint=null,r._tintRGB=null,r.tint=16777215,r.blendMode=n.T$.NORMAL,r._cachedTint=16777215,r.uvs=null,r.texture=e||o.Texture.EMPTY,r.vertexData=new Float32Array(8),r.vertexTrimmedData=null,r._transformID=-1,r._textureID=-1,r._transformTrimmedID=-1,r._textureTrimmedID=-1,r.indices=f,r.pluginName="batch",r.isSprite=!0,r._roundPixels=h.X.ROUND_PIXELS,r}return c(e,t),e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=(0,u.Xx)(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=(0,u.Xx)(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){var t=this._texture;if(this._transformID!==this.transform._worldID||this._textureID!==t._updateID){this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;var e=this.transform.worldTransform,r=e.a,i=e.b,n=e.c,o=e.d,s=e.tx,a=e.ty,u=this.vertexData,c=t.trim,l=t.orig,f=this._anchor,d=0,p=0,y=0,m=0;if(c?(d=(p=c.x-f._x*l.width)+c.width,y=(m=c.y-f._y*l.height)+c.height):(d=(p=-f._x*l.width)+l.width,y=(m=-f._y*l.height)+l.height),u[0]=r*p+n*m+s,u[1]=o*m+i*p+a,u[2]=r*d+n*m+s,u[3]=o*m+i*d+a,u[4]=r*d+n*y+s,u[5]=o*y+i*d+a,u[6]=r*p+n*y+s,u[7]=o*y+i*p+a,this._roundPixels)for(var v=h.X.RESOLUTION,_=0;_<u.length;++_)u[_]=Math.round((u[_]*v|0)/v)}},e.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,r=t.orig,i=this._anchor,n=this.transform.worldTransform,o=n.a,s=n.b,a=n.c,h=n.d,u=n.tx,c=n.ty,l=-i._x*r.width,f=l+r.width,d=-i._y*r.height,p=d+r.height;e[0]=o*l+a*d+u,e[1]=h*d+s*l+c,e[2]=o*f+a*d+u,e[3]=h*d+s*f+c,e[4]=o*f+a*p+u,e[5]=h*p+s*f+c,e[6]=o*l+a*p+u,e[7]=h*p+s*l+c},e.prototype._render=function(t){this.calculateVertices(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new a.Ae),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,l);var e=this._texture.orig.width,r=this._texture.orig.height,i=-e*this.anchor.x,n=0;return l.x>=i&&l.x<i+e&&(n=-r*this.anchor.y,l.y>=n&&l.y<n+r)},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,"boolean"==typeof e?e:e&&e.texture){var r="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!r)}this._texture=null},e.from=function(t,r){return new e(t instanceof o.Texture?t:o.Texture.from(t,r))},Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=(0,u.Xx)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=(0,u.Xx)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchor",{get:function(){return this._anchor},set:function(t){this._anchor.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||o.Texture.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(s.W2)},2794:(t,e,r)=>{r.d(e,{xv:()=>b,_A:()=>y,pn:()=>l});var i,n=r(1961),o=r(9043),s=r(6787),a=r(1893),h=r(8306);!function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"}(i||(i={}));var u={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:i.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},c=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],l=function(){function t(t){this.styleID=0,this.reset(),p(this,t,t)}return t.prototype.clone=function(){var e={};return p(e,this,u),new t(e)},t.prototype.reset=function(){p(this,u,u)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var e=d(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(t){var e=d(t);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var r=0;r<t.length;++r)if(t[r]!==e[r])return!1;return!0})(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leading",{get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return this._stroke},set:function(t){var e=d(t);this._stroke!==e&&(this._stroke=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trim",{get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)},enumerable:!1,configurable:!0}),t.prototype.toFontString=function(){var t="number"==typeof this.fontSize?"".concat(this.fontSize,"px"):this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var r=e.length-1;r>=0;r--){var i=e[r].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&c.indexOf(i)<0&&(i='"'.concat(i,'"')),e[r]=i}return wx&&"undefined"!=typeof wx?this.fontStyle+" "+t+" "+e.join(","):"".concat(this.fontStyle," ").concat(this.fontVariant," ").concat(this.fontWeight," ").concat(t," ").concat(e.join(","))},t}();function f(t){return"number"==typeof t?(0,h.XN)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function d(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=f(t[e]);return t}return f(t)}function p(t,e,r){for(var i in r)Array.isArray(e[i])?t[i]=e[i].slice():t[i]=e[i]}var y=function(){function t(t,e,r,i,n,o,s,a,h){this.text=t,this.style=e,this.width=r,this.height=i,this.lines=n,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=h}return t.measureText=function(e,r,i,n){void 0===n&&(n=t._canvas),i=null==i?r.wordWrap:i;var o=r.toFontString(),s=t.measureFont(o);0===s.fontSize&&(s.fontSize=r.fontSize,s.ascent=r.fontSize);var a=n.getContext("2d");a.font=o;for(var h=(i?t.wordWrap(e,r,n):e).split(/(?:\r\n|\r|\n)/),u=new Array(h.length),c=0,l=0;l<h.length;l++){var f=a.measureText(h[l]).width+(h[l].length-1)*r.letterSpacing;u[l]=f,c=Math.max(c,f)}var d=c+r.strokeThickness;r.dropShadow&&(d+=r.dropShadowDistance);var p=r.lineHeight||s.fontSize+r.strokeThickness,y=Math.max(p,s.fontSize+r.strokeThickness)+(h.length-1)*(p+r.leading);return r.dropShadow&&(y+=r.dropShadowDistance),new t(e,r,d,y,h,u,p+r.leading,c,s)},t.wordWrap=function(e,r,i){void 0===i&&(i=t._canvas);for(var n=i.getContext("2d"),o=0,s="",a="",h=Object.create(null),u=r.letterSpacing,c=r.whiteSpace,l=t.collapseSpaces(c),f=t.collapseNewlines(c),d=!l,p=r.wordWrapWidth+u,y=t.tokenize(e),m=0;m<y.length;m++){var v=y[m];if(t.isNewline(v)){if(!f){a+=t.addLine(s),d=!l,s="",o=0;continue}v=" "}if(l){var _=t.isBreakingSpace(v),g=t.isBreakingSpace(s[s.length-1]);if(_&&g)continue}var x=t.getFromCache(v,u,h,n);if(x>p)if(""!==s&&(a+=t.addLine(s),s="",o=0),t.canBreakWords(v,r.breakWords))for(var b=t.wordWrapSplit(v),T=0;T<b.length;T++){for(var E=b[T],w=1;b[T+w];){var S=b[T+w],A=E[E.length-1];if(t.canBreakChars(A,S,v,T,r.breakWords))break;E+=S,w++}T+=E.length-1;var O=t.getFromCache(E,u,h,n);O+o>p&&(a+=t.addLine(s),d=!1,s="",o=0),s+=E,o+=O}else{s.length>0&&(a+=t.addLine(s),s="",o=0);var I=m===y.length-1;a+=t.addLine(v,!I),d=!1,s="",o=0}else x+o>p&&(d=!1,a+=t.addLine(s),s="",o=0),(s.length>0||!t.isBreakingSpace(v)||d)&&(s+=v,o+=x)}return a+=t.addLine(s,!1)},t.addLine=function(e,r){return void 0===r&&(r=!0),e=t.trimRight(e),e=r?"".concat(e,"\n"):e},t.getFromCache=function(t,e,r,i){var n=r[t];if("number"!=typeof n){var o=t.length*e;n=i.measureText(t).width+o,r[t]=n}return n},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!=typeof e)return"";for(var r=e.length-1;r>=0;r--){var i=e[r];if(!t.isBreakingSpace(i))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"==typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e,r){return"string"==typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var r=[],i="";if("string"!=typeof e)return r;for(var n=0;n<e.length;n++){var o=e[n],s=e[n+1];t.isBreakingSpace(o,s)||t.isNewline(o)?(""!==i&&(r.push(i),i=""),r.push(o)):i+=o}return""!==i&&r.push(i),r},t.canBreakWords=function(t,e){return e},t.canBreakChars=function(t,e,r,i,n){return!0},t.wordWrapSplit=function(t){return t.split("")},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var r={ascent:0,descent:0,fontSize:0},i=t._canvas,n=t._context;n.font=e;var o=t.METRICS_STRING+t.BASELINE_SYMBOL,s=Math.ceil(n.measureText(o).width),a=Math.ceil(n.measureText(t.BASELINE_SYMBOL).width),h=Math.ceil(t.HEIGHT_MULTIPLIER*a);a=a*t.BASELINE_MULTIPLIER|0,i.width=s,i.height=h,n.fillStyle="#f00",n.fillRect(0,0,s,h),n.font=e,n.textBaseline="alphabetic",n.fillStyle="#000",n.fillText(o,0,a);var u=n.getImageData(0,0,s,h).data,c=u.length,l=4*s,f=0,d=0,p=!1;for(f=0;f<a;++f){for(var y=0;y<l;y+=4)if(255!==u[d+y]){p=!0;break}if(p)break;d+=l}for(r.ascent=a-f,d=c-l,p=!1,f=h;f>a;--f){for(y=0;y<l;y+=4)if(255!==u[d+y]){p=!0;break}if(p)break;d-=l}return r.descent=f-a,r.fontSize=r.ascent+r.descent,t._fonts[e]=r,r},t.clearMetrics=function(e){void 0===e&&(e=""),e?delete t._fonts[e]:t._fonts={}},t}(),m=function(){try{var t=new OffscreenCanvas(0,0),e=t.getContext("2d");return e&&e.measureText?t:document&&document.createElement("canvas")}catch(t){return wx?wx.createCanvas("2d"):document&&document.createElement("canvas")}}();m.width=m.height=10,y._canvas=m,y._context=m.getContext("2d"),y._fonts={},y.METRICS_STRING="|ÉqÅ",y.BASELINE_SYMBOL="M",y.BASELINE_MULTIPLIER=1.4,y.HEIGHT_MULTIPLIER=2,y._newlines=[10,13],y._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var v,_=(v=function(t,e){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},v(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}v(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),g=wx.window.document,x={texture:!0,children:!1,baseTexture:!0},b=function(t){function e(e,r,i){var n=this,h=!1;i||(i=g.createElement("canvas"),h=!0),wx&&"undefined"!=typeof wx&&(i=wx.createCanvas("2d")),i.width=3,i.height=3;var u=o.Texture.from(i);return u.orig=new a.Ae,u.trim=new a.Ae,(n=t.call(this,u)||this)._ownCanvas=h,n.canvas=i,n.context=n.canvas.getContext("2d"),n._resolution=s.X.RESOLUTION,n._autoResolution=!0,n._text=null,n._style=null,n._styleListener=null,n._font="",n.text=e,n.style=r,n.localStyleID=-1,n}return _(e,t),e.prototype.updateText=function(t){var r=this._style;if(this.localStyleID!==r.styleID&&(this.dirty=!0,this.localStyleID=r.styleID),this.dirty||!t){this._font=this._style.toFontString();var i,n,o=this.context,s=y.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),a=s.width,u=s.height,c=s.lines,l=s.lineHeight,f=s.lineWidths,d=s.maxLineWidth,p=s.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,a)+2*r.padding)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,u)+2*r.padding)*this._resolution),o.scale(this._resolution,this._resolution),o.clearRect(0,0,this.canvas.width,this.canvas.height),o.font=this._font,o.lineWidth=r.strokeThickness,o.textBaseline=r.textBaseline,o.lineJoin=r.lineJoin,o.miterLimit=r.miterLimit;for(var m=r.dropShadow?2:1,v=0;v<m;++v){var _=r.dropShadow&&0===v,g=_?Math.ceil(Math.max(1,u)+2*r.padding):0,x=g*this._resolution;if(_){o.fillStyle="black",o.strokeStyle="black";var b=r.dropShadowColor,T=(0,h.wK)("number"==typeof b?b:(0,h.qm)(b));o.shadowColor="rgba(".concat(255*T[0],",").concat(255*T[1],",").concat(255*T[2],",").concat(r.dropShadowAlpha,")"),o.shadowBlur=r.dropShadowBlur,o.shadowOffsetX=Math.cos(r.dropShadowAngle)*r.dropShadowDistance,o.shadowOffsetY=Math.sin(r.dropShadowAngle)*r.dropShadowDistance+x}else o.fillStyle=this._generateFillStyle(r,c,s),o.strokeStyle=r.stroke,o.shadowColor="black",o.shadowBlur=0,o.shadowOffsetX=0,o.shadowOffsetY=0;var E=(l-p.fontSize)/2;(!e.nextLineHeightBehavior||l-p.fontSize<0)&&(E=0);for(var w=0;w<c.length;w++)i=r.strokeThickness/2,n=r.strokeThickness/2+w*l+p.ascent+E,"right"===r.align?i+=d-f[w]:"center"===r.align&&(i+=(d-f[w])/2),r.stroke&&r.strokeThickness&&this.drawLetterSpacing(c[w],i+r.padding,n+r.padding-g,!0),r.fill&&this.drawLetterSpacing(c[w],i+r.padding,n+r.padding-g)}this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,r,i){void 0===i&&(i=!1);var n=this._style.letterSpacing;if(0!==n)for(var o=e,s=Array.from?Array.from(t):t.split(""),a=this.context.measureText(t).width,h=0,u=0;u<s.length;++u){var c=s[u];i?this.context.strokeText(c,o,r):this.context.fillText(c,o,r),o+=a-(h=this.context.measureText(t.substring(u+1)).width)+n,a=h}else i?this.context.strokeText(t,e,r):this.context.fillText(t,e,r)},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=(0,h.yA)(t);e.data&&(t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0))}var r=this._texture,i=this._style,n=i.trim?0:i.padding,s=r.baseTexture;if(r.trim.width=r._frame.width=t.width/this._resolution,r.trim.height=r._frame.height=t.height/this._resolution,r.trim.x=-n,r.trim.y=-n,r.orig.width=r._frame.width-2*n,r.orig.height=r._frame.height-2*n,wx&&"undefined"!=typeof wx){var a=this.context.getImageData(0,0,r.trim.width,r.trim.height).data.buffer,u=new Uint8Array(a),c=o.Texture.fromBuffer(u,r.trim.width,r.trim.height);r.baseTexture=c.baseTexture}this._onTextureUpdate(),s.setRealSize(t.width,t.height,this._resolution),r.updateUvs(),this._recursivePostUpdateTransform(),this.dirty=!1},e.prototype._render=function(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._render.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._generateFillStyle=function(t,e,r){var n,o=t.fill;if(!Array.isArray(o))return o;if(1===o.length)return o[0];var s=t.dropShadow?t.dropShadowDistance:0,a=t.padding||0,h=this.canvas.width/this._resolution-s-2*a,u=this.canvas.height/this._resolution-s-2*a,c=o.slice(),l=t.fillGradientStops.slice();if(!l.length)for(var f=c.length+1,d=1;d<f;++d)l.push(d/f);if(c.unshift(o[0]),l.unshift(0),c.push(o[o.length-1]),l.push(1),t.fillGradientType===i.LINEAR_VERTICAL){n=this.context.createLinearGradient(h/2,a,h/2,u+a);var p=r.fontProperties.fontSize+t.strokeThickness;for(d=0;d<e.length;d++){var y=r.lineHeight*(d-1)+p,m=r.lineHeight*d,v=m;d>0&&y>m&&(v=(m+y)/2);var _=m+p,g=r.lineHeight*(d+1),x=_;d+1<e.length&&g<_&&(x=(_+g)/2);for(var b=(x-v)/u,T=0;T<c.length;T++){var E=0;E="number"==typeof l[T]?l[T]:T/c.length;var w=Math.min(1,Math.max(0,v/u+E*b));w=Number(w.toFixed(5)),n.addColorStop(w,c[T])}}}else{n=this.context.createLinearGradient(a,u/2,h+a,u/2);var S=c.length+1,A=1;for(d=0;d<c.length;d++){var O=void 0;O="number"==typeof l[d]?l[d]:A/S,n.addColorStop(O,c[d]),A++}}return n},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},x,e),t.prototype.destroy.call(this,e),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){this.updateText(!0);var e=(0,h.Xx)(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=(0,h.Xx)(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},set:function(t){t=t||{},this._style=t instanceof l?t:new l(t),this.localStyleID=-1,this.dirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(t){this._autoResolution=!1,this._resolution!==t&&(this._resolution=t,this.dirty=!0)},enumerable:!1,configurable:!0}),e.nextLineHeightBehavior=!1,e}(n.j)},2901:(t,e,r)=>{r.d(e,{vB:()=>a,Sb:()=>h,uF:()=>i});var i,n=r(6787);n.X.TARGET_FPMS=.06,function(t){t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY"}(i||(i={}));var o=function(){function t(t,e,r,i){void 0===e&&(e=null),void 0===r&&(r=0),void 0===i&&(i=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=e,this.priority=r,this.once=i}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),s=wx.window.performance,a=function(){function t(){var t=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new o(null,null,1/0),this.deltaMS=1/n.X.TARGET_FPMS,this.elapsedMS=1/n.X.TARGET_FPMS,this._tick=function(e){t._requestId=null;var r=wx.requestAnimationFrame;t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=r(t._tick)))}}return t.prototype._requestIfNeeded=function(){var t=wx.requestAnimationFrame;null===this._requestId&&this._head.next&&(this.lastTime=s.now(),this._lastFrame=this.lastTime,this._requestId=t(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(wx.cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e,r){return void 0===r&&(r=i.NORMAL),this._addListener(new o(t,e,r))},t.prototype.addOnce=function(t,e,r){return void 0===r&&(r=i.NORMAL),this._addListener(new o(t,e,r,!0))},t.prototype._addListener=function(t){var e=this._head.next,r=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(r);break}r=e,e=e.next}t.previous||t.connect(r)}else t.connect(r);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var r=this._head.next;r;)r=r.match(t,e)?r.destroy():r.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(t.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},t.prototype.update=function(t){var e;if(void 0===t&&(t=s.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){this._lastFrame=this._lastFrame||0;var r=t-this._lastFrame;if(r<this._minElapsedMS)return;this._lastFrame=t-r%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*n.X.TARGET_FPMS;for(var i=this._head,o=i.next;o;)o=o.emit(this.deltaTime);i.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(t.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(this.maxFPS,t),r=Math.min(Math.max(0,e)/1e3,n.X.TARGET_FPMS);this._maxElapsedMS=1/r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(0===t)this._minElapsedMS=0;else{var e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"shared",{get:function(){if(!t._shared){var e=t._shared=new t;e.autoStart=!0,e._protected=!0}return t._shared},enumerable:!1,configurable:!0}),Object.defineProperty(t,"system",{get:function(){if(!t._system){var e=t._system=new t;e.autoStart=!0,e._protected=!0}return t._system},enumerable:!1,configurable:!0}),t}(),h=function(){function t(){}return t.init=function(t){var e=this;t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,i.LOW)},get:function(){return this._ticker}}),this.stop=function(){e._ticker.stop()},this.start=function(){e._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?a.shared:new a,t.autoStart&&this.start()},t.destroy=function(){if(this._ticker){var t=this._ticker;this.ticker=null,t.destroy()}},t}()},8306:(t,e,r)=>{r.d(e,{V8:()=>N,qU:()=>B,vp:()=>o(),GG:()=>M,kN:()=>D,D:()=>g,a1:()=>R,Qq:()=>k,OT:()=>a(),u7:()=>T,fL:()=>j,wK:()=>p,XN:()=>y,tq:()=>i.t,wv:()=>w,HR:()=>f,k3:()=>S,a9:()=>E,YA:()=>_,rA:()=>x,GT:()=>b,Er:()=>A,DE:()=>l,Xx:()=>O,qm:()=>m,yA:()=>U,hQ:()=>P,HQ:()=>u});var i=r(6787),n=r(2338),o=r.n(n),s=r(4305),a=r.n(s),h=r(920),u={parse:h.Qc,format:h.WU,resolve:h.DB};i.X.RETINA_PREFIX=/@([0-9\.]+)x/,i.X.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var c;function l(t){}function f(){return!(!wx||"undefined"==typeof wx)||(void 0===c&&(c=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:i.X.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!self.WebGLRenderingContext)return!1;var e=void 0;document&&(e=document.createElement("canvas")),wx&&"undefined"!=typeof wx&&(e=wx.createCanvas("webgl"));var r=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),n=!(!r||!r.getContextAttributes().stencil);if(r){var o=r.getExtension("WEBGL_lose_context");o&&o.loseContext()}return r=null,n}catch(t){return!1}}()),c)}const d=JSON.parse('{"aliceblue":"#f0f8ff","antiquewhite":"#faebd7","aqua":"#00ffff","aquamarine":"#7fffd4","azure":"#f0ffff","beige":"#f5f5dc","bisque":"#ffe4c4","black":"#000000","blanchedalmond":"#ffebcd","blue":"#0000ff","blueviolet":"#8a2be2","brown":"#a52a2a","burlywood":"#deb887","cadetblue":"#5f9ea0","chartreuse":"#7fff00","chocolate":"#d2691e","coral":"#ff7f50","cornflowerblue":"#6495ed","cornsilk":"#fff8dc","crimson":"#dc143c","cyan":"#00ffff","darkblue":"#00008b","darkcyan":"#008b8b","darkgoldenrod":"#b8860b","darkgray":"#a9a9a9","darkgreen":"#006400","darkgrey":"#a9a9a9","darkkhaki":"#bdb76b","darkmagenta":"#8b008b","darkolivegreen":"#556b2f","darkorange":"#ff8c00","darkorchid":"#9932cc","darkred":"#8b0000","darksalmon":"#e9967a","darkseagreen":"#8fbc8f","darkslateblue":"#483d8b","darkslategray":"#2f4f4f","darkslategrey":"#2f4f4f","darkturquoise":"#00ced1","darkviolet":"#9400d3","deeppink":"#ff1493","deepskyblue":"#00bfff","dimgray":"#696969","dimgrey":"#696969","dodgerblue":"#1e90ff","firebrick":"#b22222","floralwhite":"#fffaf0","forestgreen":"#228b22","fuchsia":"#ff00ff","gainsboro":"#dcdcdc","ghostwhite":"#f8f8ff","goldenrod":"#daa520","gold":"#ffd700","gray":"#808080","green":"#008000","greenyellow":"#adff2f","grey":"#808080","honeydew":"#f0fff0","hotpink":"#ff69b4","indianred":"#cd5c5c","indigo":"#4b0082","ivory":"#fffff0","khaki":"#f0e68c","lavenderblush":"#fff0f5","lavender":"#e6e6fa","lawngreen":"#7cfc00","lemonchiffon":"#fffacd","lightblue":"#add8e6","lightcoral":"#f08080","lightcyan":"#e0ffff","lightgoldenrodyellow":"#fafad2","lightgray":"#d3d3d3","lightgreen":"#90ee90","lightgrey":"#d3d3d3","lightpink":"#ffb6c1","lightsalmon":"#ffa07a","lightseagreen":"#20b2aa","lightskyblue":"#87cefa","lightslategray":"#778899","lightslategrey":"#778899","lightsteelblue":"#b0c4de","lightyellow":"#ffffe0","lime":"#00ff00","limegreen":"#32cd32","linen":"#faf0e6","magenta":"#ff00ff","maroon":"#800000","mediumaquamarine":"#66cdaa","mediumblue":"#0000cd","mediumorchid":"#ba55d3","mediumpurple":"#9370db","mediumseagreen":"#3cb371","mediumslateblue":"#7b68ee","mediumspringgreen":"#00fa9a","mediumturquoise":"#48d1cc","mediumvioletred":"#c71585","midnightblue":"#191970","mintcream":"#f5fffa","mistyrose":"#ffe4e1","moccasin":"#ffe4b5","navajowhite":"#ffdead","navy":"#000080","oldlace":"#fdf5e6","olive":"#808000","olivedrab":"#6b8e23","orange":"#ffa500","orangered":"#ff4500","orchid":"#da70d6","palegoldenrod":"#eee8aa","palegreen":"#98fb98","paleturquoise":"#afeeee","palevioletred":"#db7093","papayawhip":"#ffefd5","peachpuff":"#ffdab9","peru":"#cd853f","pink":"#ffc0cb","plum":"#dda0dd","powderblue":"#b0e0e6","purple":"#800080","rebeccapurple":"#663399","red":"#ff0000","rosybrown":"#bc8f8f","royalblue":"#4169e1","saddlebrown":"#8b4513","salmon":"#fa8072","sandybrown":"#f4a460","seagreen":"#2e8b57","seashell":"#fff5ee","sienna":"#a0522d","silver":"#c0c0c0","skyblue":"#87ceeb","slateblue":"#6a5acd","slategray":"#708090","slategrey":"#708090","snow":"#fffafa","springgreen":"#00ff7f","steelblue":"#4682b4","tan":"#d2b48c","teal":"#008080","thistle":"#d8bfd8","tomato":"#ff6347","turquoise":"#40e0d0","violet":"#ee82ee","wheat":"#f5deb3","white":"#ffffff","whitesmoke":"#f5f5f5","yellow":"#ffff00","yellowgreen":"#9acd32"}');function p(t,e){return void 0===e&&(e=[]),e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function y(t){var e=t.toString(16);return e="000000".substr(0,6-e.length)+e,"#".concat(e)}function m(t){return"string"==typeof t&&"#"===(t=d[t.toLowerCase()]||t)[0]&&(t=t.substr(1)),parseInt(t,16)}var v=r(7659);var _=function(){for(var t=[],e=[],r=0;r<32;r++)t[r]=r,e[r]=r;t[v.T$.NORMAL_NPM]=v.T$.NORMAL,t[v.T$.ADD_NPM]=v.T$.ADD,t[v.T$.SCREEN_NPM]=v.T$.SCREEN,e[v.T$.NORMAL]=v.T$.NORMAL_NPM,e[v.T$.ADD]=v.T$.ADD_NPM,e[v.T$.SCREEN]=v.T$.SCREEN_NPM;var i=[];return i.push(e),i.push(t),i}();function g(t,e){return _[e?1:0][t]}function x(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var r=t>>16&255,i=t>>8&255,n=255&t;return(255*e<<24)+((r=r*e+.5|0)<<16)+((i=i*e+.5|0)<<8)+(n=n*e+.5|0)}function b(t,e,r,i){return(r=r||new Float32Array(4))[0]=(t>>16&255)/255,r[1]=(t>>8&255)/255,r[2]=(255&t)/255,(i||void 0===i)&&(r[0]*=e,r[1]*=e,r[2]*=e),r[3]=e,r}function T(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}Float32Array,Uint32Array,Int32Array,Uint8Array;function E(t){return t+=0===t?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function w(t){return!(t&t-1||!t)}function S(t){var e=(t>65535?1:0)<<4,r=((t>>>=e)>255?1:0)<<3;return e|=r,e|=r=((t>>>=r)>15?1:0)<<2,(e|=r=((t>>>=r)>3?1:0)<<1)|(t>>>=r)>>1}function A(t,e,r){var i,n=t.length;if(!(e>=n||0===r)){var o=n-(r=e+r>n?n-e:r);for(i=e;i<o;++i)t[i]=t[i+r];t.length=o}}function O(t){return 0===t?0:t<0?-1:1}var I=0;function P(){return++I}var C={};function R(t,e,r){if(void 0===r&&(r=3),!C[e]){var i=(new Error).stack;void 0===i?console.warn("PixiJS Deprecation Warning: ","".concat(e,"\nDeprecated since v").concat(t)):(i=i.split("\n").splice(r).join("\n"),console.warn("PixiJS Deprecation Warning: ","".concat(e,"\nDeprecated since v").concat(t)),console.warn(i)),C[e]=!0}}var M={},D=Object.create(null),N=Object.create(null);var L,F=wx.window.document,B=function(){function t(t,e,r){this.canvas=F.createElement("canvas"),wx&&"undefined"!=typeof wx&&(this.canvas=wx.createCanvas("2d")),this.context=this.canvas.getContext("2d"),this.resolution=r||i.X.RESOLUTION,this.resize(t,e)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=Math.round(t*this.resolution),this.canvas.height=Math.round(e*this.resolution)},t.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(t.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=Math.round(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=Math.round(t)},enumerable:!1,configurable:!0}),t}();function U(t){var e,r,i,n=t.width,o=t.height,s=t.getContext("2d"),a=s.getImageData(0,0,n,o).data,h=a.length,u={top:null,left:null,right:null,bottom:null},c=null;for(e=0;e<h;e+=4)0!==a[e+3]&&(r=e/4%n,i=~~(e/4/n),null===u.top&&(u.top=i),(null===u.left||r<u.left)&&(u.left=r),(null===u.right||u.right<r)&&(u.right=r+1),(null===u.bottom||u.bottom<i)&&(u.bottom=i));return null!==u.top&&(n=u.right-u.left,o=u.bottom-u.top+1,c=s.getImageData(u.left,u.top,n,o)),{height:o,width:n,data:c}}function k(t,e){if(void 0===e&&(e=self.location),0===t.indexOf("data:"))return"";e=e||self.location,L||(L=document&&document.createElement("a")),L.href=t;var r=u.parse(L.href),i=!r.port&&""===e.port||r.port===e.port;return r.hostname===e.hostname&&i&&r.protocol===e.protocol?"":"anonymous"}function j(t,e){var r=i.X.RETINA_PREFIX.exec(t);return r?parseFloat(r[1]):void 0!==e?e:1}},4305:t=>{function e(t,e,o){o=o||2;var s,a,h,l,f,p,y,m=e&&e.length,v=m?e[0]*o:t.length,_=r(t,0,v,o,!0),g=[];if(!_||_.next===_.prev)return g;if(m&&(_=function(t,e,n,o){var s,a,h,l=[];for(s=0,a=e.length;s<a;s++)(h=r(t,e[s]*o,s<a-1?e[s+1]*o:t.length,o,!1))===h.next&&(h.steiner=!0),l.push(d(h));for(l.sort(u),s=0;s<l.length;s++)c(l[s],n),n=i(n,n.next);return n}(t,e,_,o)),t.length>80*o){s=h=t[0],a=l=t[1];for(var x=o;x<v;x+=o)(f=t[x])<s&&(s=f),(p=t[x+1])<a&&(a=p),f>h&&(h=f),p>l&&(l=p);y=0!==(y=Math.max(h-s,l-a))?1/y:0}return n(_,g,o,s,a,y),g}function r(t,e,r,i,n){var o,s;if(n===A(t,e,r,i)>0)for(o=e;o<r;o+=i)s=E(o,t[o],t[o+1],s);else for(o=r-i;o>=e;o-=i)s=E(o,t[o],t[o+1],s);return s&&v(s,s.next)&&(w(s),s=s.next),s}function i(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!v(i,i.next)&&0!==m(i.prev,i,i.next))i=i.next;else{if(w(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function n(t,e,r,u,c,l,d){if(t){!d&&l&&function(t,e,r,i){var n=t;do{null===n.z&&(n.z=f(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,o,s,a,h,u=1;do{for(r=t,t=null,o=null,s=0;r;){for(s++,i=r,a=0,e=0;e<u&&(a++,i=i.nextZ);e++);for(h=u;a>0||h>0&&i;)0!==a&&(0===h||!i||r.z<=i.z)?(n=r,r=r.nextZ,a--):(n=i,i=i.nextZ,h--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(s>1)}(n)}(t,u,c,l);for(var p,y,m=t;t.prev!==t.next;)if(p=t.prev,y=t.next,l?s(t,u,c,l):o(t))e.push(p.i/r),e.push(t.i/r),e.push(y.i/r),w(t),t=y.next,m=y.next;else if((t=y)===m){d?1===d?n(t=a(i(t),e,r),e,r,u,c,l,2):2===d&&h(t,e,r,u,c,l):n(i(t),e,r,u,c,l,1);break}}}function o(t){var e=t.prev,r=t,i=t.next;if(m(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(p(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&m(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function s(t,e,r,i){var n=t.prev,o=t,s=t.next;if(m(n,o,s)>=0)return!1;for(var a=n.x<o.x?n.x<s.x?n.x:s.x:o.x<s.x?o.x:s.x,h=n.y<o.y?n.y<s.y?n.y:s.y:o.y<s.y?o.y:s.y,u=n.x>o.x?n.x>s.x?n.x:s.x:o.x>s.x?o.x:s.x,c=n.y>o.y?n.y>s.y?n.y:s.y:o.y>s.y?o.y:s.y,l=f(a,h,e,r,i),d=f(u,c,e,r,i),y=t.prevZ,v=t.nextZ;y&&y.z>=l&&v&&v.z<=d;){if(y!==t.prev&&y!==t.next&&p(n.x,n.y,o.x,o.y,s.x,s.y,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;if(y=y.prevZ,v!==t.prev&&v!==t.next&&p(n.x,n.y,o.x,o.y,s.x,s.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;y&&y.z>=l;){if(y!==t.prev&&y!==t.next&&p(n.x,n.y,o.x,o.y,s.x,s.y,y.x,y.y)&&m(y.prev,y,y.next)>=0)return!1;y=y.prevZ}for(;v&&v.z<=d;){if(v!==t.prev&&v!==t.next&&p(n.x,n.y,o.x,o.y,s.x,s.y,v.x,v.y)&&m(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function a(t,e,r){var n=t;do{var o=n.prev,s=n.next.next;!v(o,s)&&_(o,n,n.next,s)&&b(o,s)&&b(s,o)&&(e.push(o.i/r),e.push(n.i/r),e.push(s.i/r),w(n),w(n.next),n=t=s),n=n.next}while(n!==t);return i(n)}function h(t,e,r,o,s,a){var h=t;do{for(var u=h.next.next;u!==h.prev;){if(h.i!==u.i&&y(h,u)){var c=T(h,u);return h=i(h,h.next),c=i(c,c.next),n(h,e,r,o,s,a),void n(c,e,r,o,s,a)}u=u.next}h=h.next}while(h!==t)}function u(t,e){return t.x-e.x}function c(t,e){if(e=function(t,e){var r,i=e,n=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=n&&a>s){if(s=a,a===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===s)return r;var h,u=r,c=r.x,f=r.y,d=1/0;i=r;do{n>=i.x&&i.x>=c&&n!==i.x&&p(o<f?n:s,o,c,f,o<f?s:n,o,i.x,i.y)&&(h=Math.abs(o-i.y)/(n-i.x),b(i,t)&&(h<d||h===d&&(i.x>r.x||i.x===r.x&&l(r,i)))&&(r=i,d=h)),i=i.next}while(i!==u);return r}(t,e),e){var r=T(e,t);i(e,e.next),i(r,r.next)}}function l(t,e){return m(t.prev,t,e.prev)<0&&m(e.next,t,t.next)<0}function f(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function p(t,e,r,i,n,o,s,a){return(n-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(i-a)-(r-s)*(e-a)>=0&&(r-s)*(o-a)-(n-s)*(i-a)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&_(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(b(t,e)&&b(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)&&(m(t.prev,t,e.prev)||m(t,e.prev,e))||v(t,e)&&m(t.prev,t,t.next)>0&&m(e.prev,e,e.next)>0)}function m(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function _(t,e,r,i){var n=x(m(t,e,r)),o=x(m(t,e,i)),s=x(m(r,i,t)),a=x(m(r,i,e));return n!==o&&s!==a||(!(0!==n||!g(t,r,e))||(!(0!==o||!g(t,i,e))||(!(0!==s||!g(r,t,i))||!(0!==a||!g(r,e,i)))))}function g(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function x(t){return t>0?1:t<0?-1:0}function b(t,e){return m(t.prev,t,t.next)<0?m(t,e,t.next)>=0&&m(t,t.prev,e)>=0:m(t,e,t.prev)<0||m(t,t.next,e)<0}function T(t,e){var r=new S(t.i,t.x,t.y),i=new S(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function E(t,e,r,i){var n=new S(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function w(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function A(t,e,r,i){for(var n=0,o=e,s=r-i;o<r;o+=i)n+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return n}t.exports=e,t.exports.default=e,e.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,s=Math.abs(A(t,0,o,r));if(n)for(var a=0,h=e.length;a<h;a++){var u=e[a]*r,c=a<h-1?e[a+1]*r:t.length;s-=Math.abs(A(t,u,c,r))}var l=0;for(a=0;a<i.length;a+=3){var f=i[a]*r,d=i[a+1]*r,p=i[a+2]*r;l+=Math.abs((t[f]-t[p])*(t[d+1]-t[f+1])-(t[f]-t[d])*(t[p+1]-t[f+1]))}return 0===s&&0===l?0:Math.abs((l-s)/s)},e.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var s=0;s<e;s++)r.vertices.push(t[n][o][s]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r}},2338:t=>{var e=Object.prototype.hasOwnProperty,r="~";function i(){}function n(t,e,r){this.fn=t,this.context=e,this.once=r||!1}function o(t,e,i,o,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var a=new n(i,o||t,s),h=r?r+e:e;return t._events[h]?t._events[h].fn?t._events[h]=[t._events[h],a]:t._events[h].push(a):(t._events[h]=a,t._eventsCount++),t}function s(t,e){0==--t._eventsCount?t._events=new i:delete t._events[e]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),(new i).__proto__||(r=!1)),a.prototype.eventNames=function(){var t,i,n=[];if(0===this._eventsCount)return n;for(i in t=this._events)e.call(t,i)&&n.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=r?r+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,s=new Array(o);n<o;n++)s[n]=i[n].fn;return s},a.prototype.listenerCount=function(t){var e=r?r+t:t,i=this._events[e];return i?i.fn?1:i.length:0},a.prototype.emit=function(t,e,i,n,o,s){var a=r?r+t:t;if(!this._events[a])return!1;var h,u,c=this._events[a],l=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,i),!0;case 4:return c.fn.call(c.context,e,i,n),!0;case 5:return c.fn.call(c.context,e,i,n,o),!0;case 6:return c.fn.call(c.context,e,i,n,o,s),!0}for(u=1,h=new Array(l-1);u<l;u++)h[u-1]=arguments[u];c.fn.apply(c.context,h)}else{var f,d=c.length;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,e);break;case 3:c[u].fn.call(c[u].context,e,i);break;case 4:c[u].fn.call(c[u].context,e,i,n);break;default:if(!h)for(f=1,h=new Array(l-1);f<l;f++)h[f-1]=arguments[f];c[u].fn.apply(c[u].context,h)}}return!0},a.prototype.on=function(t,e,r){return o(this,t,e,r,!1)},a.prototype.once=function(t,e,r){return o(this,t,e,r,!0)},a.prototype.removeListener=function(t,e,i,n){var o=r?r+t:t;if(!this._events[o])return this;if(!e)return s(this,o),this;var a=this._events[o];if(a.fn)a.fn!==e||n&&!a.once||i&&a.context!==i||s(this,o);else{for(var h=0,u=[],c=a.length;h<c;h++)(a[h].fn!==e||n&&!a[h].once||i&&a[h].context!==i)&&u.push(a[h]);u.length?this._events[o]=1===u.length?u[0]:u:s(this,o)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&s(this,e)):(this._events=new i,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,t.exports=a},2520:t=>{function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,r,i,n){r=r||"&",i=i||"=";var o={};if("string"!=typeof t||0===t.length)return o;var s=/\+/g;t=t.split(r);var a=1e3;n&&"number"==typeof n.maxKeys&&(a=n.maxKeys);var h=t.length;a>0&&h>a&&(h=a);for(var u=0;u<h;++u){var c,l,f,d,p=t[u].replace(s,"%20"),y=p.indexOf(i);y>=0?(c=p.substr(0,y),l=p.substr(y+1)):(c=p,l=""),f=decodeURIComponent(c),d=decodeURIComponent(l),e(o,f)?Array.isArray(o[f])?o[f].push(d):o[f]=[o[f],d]:o[f]=d}return o}},2418:t=>{var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,r,i,n){return r=r||"&",i=i||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(n){var o=encodeURIComponent(e(n))+i;return Array.isArray(t[n])?t[n].map((function(t){return o+encodeURIComponent(e(t))})).join(r):o+encodeURIComponent(e(t[n]))})).join(r):n?encodeURIComponent(e(n))+i+encodeURIComponent(e(t)):""}},2072:(t,e,r)=>{e.decode=e.parse=r(2520),e.encode=e.stringify=r(2418)},2065:function(t,e,r){var i;t=r.nmd(t),function(n){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,h=36,u=/^xn--/,c=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function y(t){throw RangeError(f[t])}function m(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function v(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+m((t=t.replace(l,".")).split("."),e).join(".")}function _(t){for(var e,r,i=[],n=0,o=t.length;n<o;)(e=t.charCodeAt(n++))>=55296&&e<=56319&&n<o?56320==(64512&(r=t.charCodeAt(n++)))?i.push(((1023&e)<<10)+(1023&r)+65536):(i.push(e),n--):i.push(e);return i}function g(t){return m(t,(function(t){var e="";return t>65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function x(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function b(t,e,r){var i=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;i+=h)t=d(t/35);return d(i+36*t/(t+38))}function T(t){var e,r,i,n,o,s,u,c,l,f,p,m=[],v=t.length,_=0,x=128,T=72;for((r=t.lastIndexOf("-"))<0&&(r=0),i=0;i<r;++i)t.charCodeAt(i)>=128&&y("not-basic"),m.push(t.charCodeAt(i));for(n=r>0?r+1:0;n<v;){for(o=_,s=1,u=h;n>=v&&y("invalid-input"),((c=(p=t.charCodeAt(n++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:h)>=h||c>d((a-_)/s))&&y("overflow"),_+=c*s,!(c<(l=u<=T?1:u>=T+26?26:u-T));u+=h)s>d(a/(f=h-l))&&y("overflow"),s*=f;T=b(_-o,e=m.length+1,0==o),d(_/e)>a-x&&y("overflow"),x+=d(_/e),_%=e,m.splice(_++,0,x)}return g(m)}function E(t){var e,r,i,n,o,s,u,c,l,f,m,v,g,T,E,w=[];for(v=(t=_(t)).length,e=128,r=0,o=72,s=0;s<v;++s)(m=t[s])<128&&w.push(p(m));for(i=n=w.length,n&&w.push("-");i<v;){for(u=a,s=0;s<v;++s)(m=t[s])>=e&&m<u&&(u=m);for(u-e>d((a-r)/(g=i+1))&&y("overflow"),r+=(u-e)*g,e=u,s=0;s<v;++s)if((m=t[s])<e&&++r>a&&y("overflow"),m==e){for(c=r,l=h;!(c<(f=l<=o?1:l>=o+26?26:l-o));l+=h)E=c-f,T=h-f,w.push(p(x(f+E%T,0))),c=d(E/T);w.push(p(x(c,0))),o=b(r,g,i==n),r=0,++i}++r,++e}return w.join("")}s={version:"1.3.2",ucs2:{decode:_,encode:g},decode:T,encode:E,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+E(t):t}))},toUnicode:function(t){return v(t,(function(t){return u.test(t)?T(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return s}.call(e,r,e,t))||(t.exports=i)}()},920:(t,e,r)=>{var i=r(2065),n=r(884);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.Qc=g,e.DB=function(t,e){return g(t,!1,!0).resolve(e)},e.WU=function(t){n.isString(t)&&(t=g(t));return t instanceof o?t.format():o.prototype.format.call(t)};var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,h=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),c=["'"].concat(u),l=["%","/","?",";","#"].concat(c),f=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},v={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=r(2072);function g(t,e,r){if(t&&n.isObject(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,r),i}o.prototype.parse=function(t,e,r){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",u=t.split(a);u[0]=u[0].replace(/\\/g,"/");var g=t=u.join(a);if(g=g.trim(),!r&&1===t.split("#").length){var x=h.exec(g);if(x)return this.path=g,this.href=g,this.pathname=x[1],x[2]?(this.search=x[2],this.query=e?_.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var b=s.exec(g);if(b){var T=(b=b[0]).toLowerCase();this.protocol=T,g=g.substr(b.length)}if(r||b||g.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===g.substr(0,2);!E||b&&m[b]||(g=g.substr(2),this.slashes=!0)}if(!m[b]&&(E||b&&!v[b])){for(var w,S,A=-1,O=0;O<f.length;O++){-1!==(I=g.indexOf(f[O]))&&(-1===A||I<A)&&(A=I)}-1!==(S=-1===A?g.lastIndexOf("@"):g.lastIndexOf("@",A))&&(w=g.slice(0,S),g=g.slice(S+1),this.auth=decodeURIComponent(w)),A=-1;for(O=0;O<l.length;O++){var I;-1!==(I=g.indexOf(l[O]))&&(-1===A||I<A)&&(A=I)}-1===A&&(A=g.length),this.host=g.slice(0,A),g=g.slice(A),this.parseHost(),this.hostname=this.hostname||"";var P="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!P)for(var C=this.hostname.split(/\./),R=(O=0,C.length);O<R;O++){var M=C[O];if(M&&!M.match(d)){for(var D="",N=0,L=M.length;N<L;N++)M.charCodeAt(N)>127?D+="x":D+=M[N];if(!D.match(d)){var F=C.slice(0,O),B=C.slice(O+1),U=M.match(p);U&&(F.push(U[1]),B.unshift(U[2])),B.length&&(g="/"+B.join(".")+g),this.hostname=F.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=i.toASCII(this.hostname));var k=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+k,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==g[0]&&(g="/"+g))}if(!y[T])for(O=0,R=c.length;O<R;O++){var G=c[O];if(-1!==g.indexOf(G)){var X=encodeURIComponent(G);X===G&&(X=escape(G)),g=g.split(G).join(X)}}var H=g.indexOf("#");-1!==H&&(this.hash=g.substr(H),g=g.slice(0,H));var Y=g.indexOf("?");if(-1!==Y?(this.search=g.substr(Y),this.query=g.substr(Y+1),e&&(this.query=_.parse(this.query)),g=g.slice(0,Y)):e&&(this.search="",this.query={}),g&&(this.pathname=g),v[T]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){k=this.pathname||"";var V=this.search||"";this.path=k+V}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",i=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&n.isObject(this.query)&&Object.keys(this.query).length&&(s=_.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||v[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),i&&"#"!==i.charAt(0)&&(i="#"+i),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+i},o.prototype.resolve=function(t){return this.resolveObject(g(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(n.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,i=Object.keys(this),s=0;s<i.length;s++){var a=i[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var h=Object.keys(t),u=0;u<h.length;u++){var c=h[u];"protocol"!==c&&(r[c]=t[c])}return v[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!v[t.protocol]){for(var l=Object.keys(t),f=0;f<l.length;f++){var d=l[f];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||m[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var y=r.pathname||"",_=r.search||"";r.path=y+_}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var g=r.pathname&&"/"===r.pathname.charAt(0),x=t.host||t.pathname&&"/"===t.pathname.charAt(0),b=x||g||r.host&&t.pathname,T=b,E=r.pathname&&r.pathname.split("/")||[],w=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!v[r.protocol]);if(w&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),b=b&&(""===p[0]||""===E[0])),x)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,E=p;else if(p.length)E||(E=[]),E.pop(),E=E.concat(p),r.search=t.search,r.query=t.query;else if(!n.isNullOrUndefined(t.search)){if(w)r.hostname=r.host=E.shift(),(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift());return r.search=t.search,r.query=t.query,n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var S=E.slice(-1)[0],A=(r.host||t.host||E.length>1)&&("."===S||".."===S)||""===S,O=0,I=E.length;I>=0;I--)"."===(S=E[I])?E.splice(I,1):".."===S?(E.splice(I,1),O++):O&&(E.splice(I,1),O--);if(!b&&!T)for(;O--;O)E.unshift("..");!b||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),A&&"/"!==E.join("/").substr(-1)&&E.push("");var P,C=""===E[0]||E[0]&&"/"===E[0].charAt(0);w&&(r.hostname=r.host=C?"":E.length?E.shift():"",(P=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=P.shift(),r.host=r.hostname=P.shift()));return(b=b||r.host&&E.length)&&!C&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},884:t=>{t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}}}]);