"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[38368],{521436:(t,e,i)=>{i.d(e,{setErrorTracker:()=>g,scaleModes:()=>y,MAX_SERIAL_DRAW_IMAGE:()=>v,PI_2:()=>w,RAD_TO_DEG:()=>C,DEG_TO_RAD:()=>x,RETINA_PREFIX:()=>T,LEFT_MOUSE_BUTTON:()=>b,MIDDLE_MOUSE_BUTTON:()=>_,RIGHT_MOUSE_BUTTON:()=>P,LONG_CLICK:()=>B,LEFT_CLICK:()=>O,RIGHT_CLICK:()=>E,ACTUAL_LEFT_MOUSE_DOWN:()=>R,LEFT_MOUSE_DOWN:()=>M,MIDDLE_MOUSE_DOWN:()=>A,RIGHT_MOUSE_DOWN:()=>L,BaseTextureCache:()=>I,BaseTextureCacheIdGenerator:()=>D,createCanvas:()=>S,setCreateCanvas:()=>j,createOffscreenCanvas:()=>U,setCreateOffscreenCanvas:()=>W,offscreenAvailable:()=>k,Polygon:()=>F,Circle:()=>H,Ellipse:()=>G,RoundedRectangle:()=>N,DisplayObject:()=>V,DisplayObjectContainer:()=>J,Sprite:()=>q,CanvasBuffer:()=>z,CanvasMaskManager:()=>Q,CanvasGraphics:()=>$,Graphics:()=>tt,getCurveSegmentsCount:()=>et,GraphicsData:()=>it,BaseTexture:()=>rt,TextureCache:()=>nt,clearTextureCache:()=>st,TextureCacheIdGenerator:()=>ot,Texture:()=>at,RenderTexture:()=>ht});var r,n=i(759312),s=i(471006),o=i(638664),a=i(673929),h=i(731695),c=i(437317),u=i(628788),d=i(28358),l=i(872676),p=i(452831),f=i(239945);function g(t){r=t}var y={DEFAULT:0,LINEAR:0,NEAREST:1},v=20,m=0,w=2*Math.PI,C=180/Math.PI,x=Math.PI/180,T="@2x",b=0,_=1,P=2,B="long_click",O="l_click",E="r_click",R="actual_l_mousedown",M="l_mousedown",A="m_mousedown",L="r_mousedown",I={},D=0;function S(t){return document.createElement("canvas")}function j(t){S=t}function U(t,e,i){return new OffscreenCanvas(e,i)}function W(t){U=t}var k=!1;try{new OffscreenCanvas(1,1).getContext("2d");k=!0}catch(t){}function F(t){this.bounds={left:1/0,top:1/0,right:-1/0,bottom:-1/0},this.lastX=void 0,this.lastY=void 0;for(var e=new Path2D,i=0,r=t.length;i=i&&t<=i+this.width){var r=this.y;if(e>=r&&e<=r+this.height)return!0}return!1},N.prototype.getPath2D=function(){if(!this._path){var t=new Path2D,e=this.x,i=this.y,r=this.width,n=this.height,s=this.radius,o=this.radiusTopRight,a=this.radiusBottomRight,h=this.radiusBottomLeft,c=Math.min(r,n)/2|0;s=s>c&&c||s,o=o>c&&c||o,a=a>c&&c||a,h=h>c&&c||h,t.moveTo(e+r-o,i),t.arcTo(e+r,i,e+r,i+o,o),t.lineTo(e+r,i+n-a),t.arcTo(e+r,i+n,e+r-a,i+n,a),t.lineTo(e+h,i+n),t.arcTo(e,i+n,e,i+n-h,h),t.lineTo(e,i+s),t.arcTo(e,i,e+s,i,s),t.closePath(),this._path=t}return this._path},N.prototype.constructor=N,V.prototype.constructor=V,Object.defineProperty(V.prototype,"stage",{get:function(){return this._stage}}),Object.defineProperty(V.prototype,"parent",{get:function(){return this._parent},set:function(t){if(t!==this._parent){var e=this._parent;this._parent=t,this.parentChanged(e)}}}),Object.defineProperty(V.prototype,"widgetRef",{get:function(){return this._widgetRef}}),Object.defineProperty(V.prototype,"hitArea",{get:function(){return this._hitArea},set:function(t){this._hitArea=t,this.hitAreaChanged()}}),Object.defineProperty(V.prototype,"canHitTest",{get:function(){return this._canHitTest},set:function(t){this._canHitTest=t,this.clearCache(["worldCanHitTest"])}}),Object.defineProperty(V.prototype,"interactive",{get:function(){return this._interactive},set:function(t){this._interactive=t,this.interactivityChanged(),this.stage&&(this.stage.dirty=!0)}}),Object.defineProperty(V.prototype,"trigRotation",{get:function(){return this.cache.get("trigRotation")}}),Object.defineProperty(V.prototype,"localTransform",{get:function(){return this.cache.get("localTransform")},configurable:!0}),Object.defineProperty(V.prototype,"worldTransform",{get:function(){return this.cache.get("worldTransform")},set:function(t){this.cache.set("worldTransform",t),this.worldPropertiesChanged()},configurable:!0}),Object.defineProperty(V.prototype,"worldVisible",{get:function(){return this.cache.get("worldVisible")},set:function(t){t!==this.worldVisible&&(this.cache.set("worldVisible",t),this.worldPropertiesChanged())},configurable:!0}),Object.defineProperty(V.prototype,"worldInteractive",{get:function(){return this.cache.get("worldInteractive")},set:function(t){this.cache.set("worldInteractive",t),this.interactivityChanged()},configurable:!0}),Object.defineProperty(V.prototype,"worldCanHitTest",{get:function(){return this.cache.get("worldCanHitTest")},set:function(t){this.cache.set("worldCanHitTest",t)},configurable:!0}),Object.defineProperty(V.prototype,"worldAlpha",{get:function(){return this.cache.get("worldAlpha")},set:function(t){t!==this.worldAlpha&&(this.cache.set("worldAlpha",t),this.worldPropertiesChanged())},configurable:!0}),Object.defineProperty(V.prototype,"worldScale",{get:function(){var t=this.worldTransform,e=t.a,i=t.b;return Math.sqrt(e*e+i*i)}}),Object.defineProperty(V.prototype,"bounds",{get:function(){return this.cache.get("bounds")},configurable:!0}),Object.defineProperty(V.prototype,"localBounds",{get:function(){return this.cache.get("localBounds")},configurable:!0}),Object.defineProperty(V.prototype,"worldBounds",{get:function(){return this.cache.get("worldBounds")},configurable:!0}),Object.defineProperty(V.prototype,"worldUseCamera",{get:function(){return this.cache.get("worldUseCamera")},configurable:!0}),Object.defineProperty(V.prototype,"hitBounds",{get:function(){return this.cache.get("hitBounds")},configurable:!0}),Object.defineProperty(V.prototype,"worldHitBounds",{get:function(){return this.cache.get("worldHitBounds")},configurable:!0}),Object.defineProperty(V.prototype,"mask",{get:function(){return this._mask},set:function(t){this._mask&&(this._mask.isMask=!1),this._mask=t,this._mask&&(this._mask.isMask=!0)}}),V.prototype.clearCache=function(t,e){var i;this.cache.clear(t,e),null===(i=this._mask)||void 0===i||i.all.forEach((function(e){return e.clearCache(t)}))},V.prototype.objectChanged=function(){this.stage&&(0,a.setNeedRender)(!0)},V.prototype.transformChanged=function(){this.objectChanged(),this.clearCache(["localTransform","worldTransform","localBounds","worldBounds","hitBounds","worldHitBounds"]),this.stage&&this.stage.objectBoundsHasChanged.dispatch(this)},V.prototype.visibilityChanged=function(){this.objectChanged(),this.clearCache(["localBounds","worldBounds","hitBounds","worldHitBounds"]),this.stage&&this.stage.objectBoundsHasChanged.dispatch(this)},V.prototype.worldPropertiesChanged=function(){this.objectChanged(),this.clearCache(["worldBounds","hitBounds","worldHitBounds"]),this.stage&&this.stage.objectBoundsHasChanged.dispatch(this)},V.prototype.hitAreaChanged=function(){this.clearCache(["hitBounds","worldHitBounds","worldInteractive"]),this.stage&&this.stage.objectBoundsHasChanged.dispatch(this)},V.prototype.interactivityChanged=function(){this.clearCache(["worldInteractive"]),this.stage&&this.stage.objectBoundsHasChanged.dispatch(this)},V.prototype.shapeChanged=function(){this.objectChanged(),this.dirty=!0,this.clearCache(["bounds","localBounds","worldBounds","hitBounds","worldHitBounds"]),this.stage&&this.stage.objectBoundsHasChanged.dispatch(this)},V.prototype.parentChanged=function(t){var e,i;this.objectChanged(),null===(e=this.parent)||void 0===e||e.objectChanged(),null===t||void 0===t||t.objectChanged(),this.clearCache(["worldTransform","worldVisible","worldAlpha","worldUseCamera","worldBounds","hitBounds","worldHitBounds"]),null===(i=this.parent)||void 0===i||i.clearCache(["localBounds","worldBounds","hitBounds","worldHitBounds"]),null===t||void 0===t||t.clearCache(["localBounds","worldBounds","hitBounds","worldHitBounds"]),this.stage&&(this.stage.objectBoundsHasChanged.dispatch(this),this.parent&&this.stage.objectBoundsHasChanged.dispatch(this.parent),t&&this.stage.objectBoundsHasChanged.dispatch(t))},V.prototype.updateTrigRotation=function(t){var e=t;return e.cos=Math.cos(this.rotation),e.sin=Math.sin(this.rotation),e},V.prototype.updateLocalTransform=function(t){var e=t;return e.compose(this.position,this.trigRotation,this.scale,this.pivot),e},V.prototype.updateWorldTransform=function(t){var e,i=t.copy(this.localTransform),r=null===(e=this.parent)||void 0===e?void 0:e.worldTransform;return r&&i.premultiply(r),i},V.prototype.updateWorldVisible=function(){var t,e;return this.visible&&(null===(e=null===(t=this.parent)||void 0===t?void 0:t.worldVisible)||void 0===e||e)},V.prototype.updateWorldInteractive=function(){var t,e,i,r=null===(e=null===(t=this.parent)||void 0===t?void 0:t.worldInteractive)||void 0===e||e,n=null==(null===(i=this.parent)||void 0===i?void 0:i.hitArea);return this.interactive||r&&n},V.prototype.updateWorldCanHitTest=function(){var t,e;return this.canHitTest||null!==(e=null===(t=this.parent)||void 0===t?void 0:t.worldCanHitTest)&&void 0!==e&&e},V.prototype.updateWorldAlpha=function(){var t,e;return this.alpha*(null!==(e=null===(t=this.parent)||void 0===t?void 0:t.worldAlpha)&&void 0!==e?e:1)},V.prototype.updateWorldUseCamera=function(){var t,e;return null!==(e=null===(t=this.parent)||void 0===t?void 0:t.worldUseCamera)&&void 0!==e?e:this.useCamera},V.prototype.updateBounds=function(t){return t.indefinite()},V.prototype.updateHitBounds=function(t){var e;return void 0!==(null===(e=this.hitArea)||void 0===e?void 0:e.getBounds)?t.copy(this.hitArea.getBounds()):t.empty(),t},V.prototype.updateLocalBounds=function(t){return void 0===this.worldUseCamera?t.indefinite():t.copy(this.bounds)},V.prototype.updateWorldBounds=function(t){return void 0!==this.worldUseCamera&&this.worldVisible&&0!==this.worldAlpha?this.mergeBounds(t.indefinite(),this.bounds,this.worldTransform):t.indefinite()},V.prototype.updateWorldHitBounds=function(t){var e=this.hitBounds;return e.width===1/0||e.height===1/0?e:this.mergeBounds(t.indefinite(),e,this.worldTransform)};var X=new d.Point,Z=new d.Point,Y=new d.Point,K=new d.Point;function J(){V.call(this),this.children=[],this.ownContentVisible=!0,this.roundPixels=!1}function q(t){J.call(this),this._anchor={x:0,y:0},this.texture=at.emptyTexture,this._width=0,this._height=0,this.onTextureUpdateWrapper=this.onTextureUpdate.bind(this),t&&this.setTexture(t),this._useCamera=!0,this.roundPixels=!1}function z(t,e,i,r){this.width=e,this.height=i,this.canvas=k&&r?U(t,e,i):S(t),this.context=this.canvas.getContext("2d"),this.canvas.width=e,this.canvas.height=i}function Q(){}function $(){}function tt(){J.call(this),this.fillAlpha=1,this.lineWidth=0,this.lineColor=0,this.preserveLineWidth=!1,this.lineDash=[],this.lineCap="butt",this.lineJoin="miter",this.graphicsData=[],this.currentPath=null,this.isMask=!1,this.boundsPadding=0,this._useCamera=!0,this.dirty=!0}function et(t,e,i,r){var n=i-t,s=r-e,o=Math.sqrt(n*n+s*s);return Math.min(Math.max(5,Math.round(o/5)),80)}function it(t,e,i,r,n,s,o,a,h,c,u){this.lineWidth=t,this.lineColor=e,this.lineAlpha=i,this.lineDash=r,this.lineCap=n,this.lineJoin=s,this.fillColor=o,this.fillAlpha=a,this.fill=h,this._fillColorStr="#"+("00000"+(0|o).toString(16)).substr(-6),this._lineColor="number"===typeof e?"#"+("00000"+(0|e).toString(16)).substr(-6):e,this.patternTransformMatrix=c,this.shape=u,this.type=u.type}function rt(t,e){this.resolution=1,this.width=100,this.height=100,this.scaleMode=e||y.DEFAULT,this.hasLoaded=!1,this.loadFailed=!1,this.imageUrl=null,this.source=void 0,t&&this.setSource(t)}V.prototype.mergeBounds=function(t,e,i){if(e.isFinite()){var r=X.set(e.left,e.top),n=Z.set(e.right,e.top),s=Y.set(e.left,e.bottom),o=K.set(e.right,e.bottom);void 0!==i&&(i.apply(r),i.apply(n),i.apply(s),i.apply(o)),t.left=Math.min(t.left,r.x,n.x,s.x,o.x),t.top=Math.min(t.top,r.y,n.y,s.y,o.y),t.right=Math.max(t.right,r.x,n.x,s.x,o.x),t.bottom=Math.max(t.bottom,r.y,n.y,s.y,o.y)}return t},V.prototype.setStageReference=function(t){this._stage=t,this._interactive&&(this.stage.dirty=!0)},V.prototype.removeStageReference=function(){this._interactive&&(this.stage.dirty=!0),this._stage=null},V.prototype.setWidgetReference=function(t){this._widgetRef=t},V.prototype.getWidgetReference=function(){return this._widgetRef},V.prototype.getFractionalZIndex=function(){return this.fractionalZIndex},V.prototype.setFractionalZIndex=function(t,e){this.fractionalZIndex=t,e&&(this.fractionalZIndexForInteraction=t)},V.prototype.generateTexture=function(t,e,i){var r=this.bounds,n=new ht("display_object_gen_texture",0|r.width,0|r.height,!1,i,e,t);return V._tempMatrix.identity(),V._tempMatrix.tx=-r.x,V._tempMatrix.ty=-r.y,n.render(this,V._tempMatrix),n},V.prototype.toGlobal=function(t,e){(this.worldTransform.apply(t),this.worldUseCamera)&&(null!==e&&void 0!==e?e:l.screenCamera).pointToCameraSpace(t);return t},V.prototype.toLocal=function(t,e){var i;this.worldUseCamera?i=(null!==e&&void 0!==e?e:l.screenCamera).matrixToCameraSpace(this.worldTransform):i=this.worldTransform;return i.applyInverse(t),t},V.prototype.isInViewport=function(t){if(!this.worldVisible)return!1;if(!a.frustumCullingEnabled&&this.offscreen)return!1;if(t.isRenderTexture)return!0;if(this.hasLod)return!1;if(!a.frustumCullingEnabled)return!0;if(void 0===this.worldUseCamera)return!0;if(!this.worldBounds.isFinite())return!0;var e=t.camera,i=t.cameraViewport,r=t.screenViewport,n=e&&this.worldUseCamera?i:r;return!n||n.intersects(this.worldBounds)},V.prototype.renderCanvas=function(t){},V.prototype._renderContent=function(t){},V.prototype.setMask=function(t,e){this._mask&&Q.setMaskFlag(this._mask.all,void 0),this._mask=null;var i=t&&t.length,r=e&&e.length;(i||r)&&(this._mask={all:[]},i&&(this._mask.all=this._mask.all.concat(t),this._mask.include=t),r&&(this._mask.all=this._mask.all.concat(e),this._mask.exclude=e),Q.setMaskFlag(this._mask.all,this)),this.transformChanged()},V._tempMatrix=new c.Matrix,V.prototype.initEventDispatcher=function(){p.EventTarget.call(this),this.interactive=!0,this.isEventTarget=!0},V.prototype.setPosition=function(t,e){var i=this._position;i.x===t&&i.y===e||(i.x=t,i.y=e,this.transformChanged())},V.prototype.setPositionX=function(t){var e=this._position;e.x!==t&&(e.x=t,this.transformChanged())},V.prototype.setPositionY=function(t){var e=this._position;e.y!==t&&(e.y=t,this.transformChanged())},V.prototype.setScale=function(t,e){var i=this._scale;i.x===t&&i.y===e||(i.x=t,i.y=e,this.transformChanged())},V.prototype.setScaleX=function(t){var e=this._scale;e.x!==t&&(e.x=t,this.transformChanged())},V.prototype.setScaleY=function(t){var e=this._scale;e.y!==t&&(e.y=t,this.transformChanged())},V.prototype.setScaleFactor=function(t){this.setScale(t,t)},V.prototype.setPivot=function(t,e){var i=this._pivot;i.x===t&&i.y===e||(i.x=t,i.y=e,this.transformChanged())},V.prototype.setPivotX=function(t){var e=this._pivot;e.x!==t&&(e.x=t,this.transformChanged())},V.prototype.setPivotY=function(t){var e=this._pivot;e.y!==t&&(e.y=t,this.transformChanged())},V.prototype.setRotation=function(t){this._rotation!==t&&(this._rotation=t,this.transformChanged(),this.clearCache(["trigRotation"]))},Object.defineProperty(V.prototype,"position",{get:function(){return this._position},set:function(t){this.setPosition(t.x,t.y)}}),Object.defineProperty(V.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this.setRotation(t)}}),Object.defineProperty(V.prototype,"scale",{get:function(){return this._scale},set:function(t){"number"===typeof t?this.setScaleFactor(t):this.setScale(t.x,t.y)}}),Object.defineProperty(V.prototype,"pivot",{get:function(){return this._pivot},set:function(t){this.setPivot(t.x,t.y)}}),Object.defineProperty(V.prototype,"alpha",{get:function(){return this._alpha},set:function(t){this._alpha!==t&&(this._alpha=t,this.visibilityChanged(),this.clearCache(["worldAlpha"]))}}),Object.defineProperty(V.prototype,"visible",{get:function(){return this._visible},set:function(t){this._visible!==t&&(this._visible=t,this.visibilityChanged(),this.clearCache(["worldVisible"]))}}),Object.defineProperty(V.prototype,"useCamera",{get:function(){return this._useCamera},set:function(t){this._useCamera!==t&&(this._useCamera=t,this.visibilityChanged(),this.clearCache(["worldUseCamera"]))}}),Object.defineProperty(V.prototype,"x",{get:function(){return this.position.x},set:function(t){this.setPositionX(t)}}),Object.defineProperty(V.prototype,"y",{get:function(){return this.position.y},set:function(t){this.setPositionY(t)}}),J.prototype=Object.create(V.prototype),J.prototype.constructor=J,Object.defineProperty(J.prototype,"width",{get:function(){return this.scale.x*Math.max(this.bounds.width,this.localBounds.width)},set:function(t){var e=t/this.localBounds.width;0!==e&&isFinite(e)?this.setScaleX(t/e):this.setScaleX(1),this._width=t},configurable:!0}),Object.defineProperty(J.prototype,"height",{get:function(){return this.scale.y*Math.max(this.bounds.height,this.localBounds.height)},set:function(t){var e=t/this.localBounds.height;0!==e&&isFinite(e)?this.setScaleY(t/e):this.setScaleY(1),this._height=t}}),J.prototype.addChild=function(t){-1===this.getChildIndex(t)&&this.addChildAt(t,this.children.length)},J.prototype.addChildAt=function(t,e){if(e>=0&&e<=this.children.length){if(t.parent===this){var i=this.getChildIndex(t);if(e===i)return;this.children.splice(i,1),this.objectChanged()}else t.parent&&t.parent.removeChild(t);if(this._widgetRef&&t.setWidgetReference(this._widgetRef),t.parent=this,this.children.splice(e,0,t),this.stage){var r=function(t){if(t.parent){var e,i=t.parent.children.indexOf(t);if(-1===i)throw new Error("Node have parent that doesn't have this node in children list.");if(--i>=0)for(e=t.parent.children[i];null!=e.children&&e.children.length>0;)e=e.children[e.children.length-1];else e=t.parent;return e}}(t),n=function(t){for(;t.parent;){var e=t.parent.children.indexOf(t);if(-1===e)throw new Error("Node have parent that doesn't have this node in children list.");if(++e!==t.parent.children.length)return t.parent.children[e];t=t.parent}}(t);t.setStageReference(this.stage,r,n)}return t}throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length)},J.prototype.getChildIndex=function(t){return this.children.indexOf(t)},J.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Supplied index "+t+" does not exist in the child list, or the supplied DisplayObject must be a child of the caller");return this.children[t]},J.prototype.removeChild=function(t){var e=this.getChildIndex(t);if(-1!==e)return this.removeChildAt(e)},J.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=void 0,this.children.splice(t,1),this.stage&&e.removeStageReference(),e},J.prototype.removeChildren=function(t,e){var i=t||0,r="number"===typeof e?e:this.children.length,n=r-i;if(n>0&&n<=r){for(var s=this.children.splice(i,n),o=0;o0&&e.mergeBounds(t,e.localBounds,e.localTransform)})),t)},J.prototype.updateWorldBounds=function(t){var e;return void 0!==this.worldUseCamera&&this.worldVisible&&0!==this.worldAlpha?(this.mergeBounds(t.indefinite(),this.bounds,this.worldTransform),null===(e=this.children)||void 0===e||e.forEach((function(e){return e.mergeBounds(t,e.worldBounds)})),t):t.indefinite()},J.prototype.setStageReference=function(t,e,i){this._stage=t,this.stage.fractionalZIndexing.nodeAdded(),this.stage.fractionalZIndexing.generateIndex(this,e,i),this.stage.objectAddedToTree.dispatch(this),this._interactive&&(this.stage.dirty=!0),e=this;for(var r=0,n=this.children.length;r0,e=this._height>0;t&&e?this.setScale(this._width/this.texture.frame.width,this._height/this.texture.frame.height):(t&&this.setScaleX(this._width/this.texture.frame.width),e&&this.setScaleY(this._height/this.texture.frame.height)),this.shapeChanged()},q.prototype.updateBounds=function(t){var e=this.texture.frame,i=e.width,r=e.height;return t.x=i*-this.anchor.x,t.y=r*-this.anchor.y,t.right=i*(1-this.anchor.x),t.bottom=r*(1-this.anchor.y),t},q.prototype._renderContent=function(t){if(this.texture.valid&&0!==this.worldAlpha){var e=t.context;e.globalAlpha=this.worldAlpha,t.smoothProperty&&t.scaleMode!==this.texture.baseTexture.scaleMode&&(t.scaleMode=this.texture.baseTexture.scaleMode,e[t.smoothProperty]=t.scaleMode===y.LINEAR);var i=this.texture.trim?this.texture.trim.x-this.anchor.x*this.texture.trim.width:this.anchor.x*-this.texture.frame.width,r=this.texture.trim?this.texture.trim.y-this.anchor.y*this.texture.trim.height:this.anchor.y*-this.texture.frame.height,n=this.worldTransform;t.camera&&this.worldUseCamera&&(n=t.camera.matrixToCameraSpace(n));var s=n.tx,o=n.ty;if(t.roundPixels||this.roundPixels){var a=this.worldTransform;t.originalCamera&&this.worldUseCamera&&(a=t.originalCamera.matrixToCameraSpace(a));var h=a.tx,c=a.ty;h<0?(s=Math.ceil(s),i=Math.ceil(i)):(s=Math.floor(s),i=Math.floor(i)),c<0?(o=Math.ceil(o),r=Math.ceil(r)):(o=Math.floor(o),r=Math.floor(r)),n=this.worldTransform,t.camera&&this.worldUseCamera&&(n=t.camera.matrixToCameraSpace(n))}e.setTransform(n.a,n.b,n.c,n.d,s,o);var u=this.texture.crop;if(e.webkitLineDash=[],e.drawImage(this.texture.baseTexture.source,u.x,u.y,u.width,u.height,i,r,u.width,u.height),this.color){var d=e.globalCompositeOperation;e.globalCompositeOperation="multiply",e.fillStyle=this.color,e.beginPath();var l=this.colorPath;if(l){e.moveTo(i+l[0],r+l[1]);for(var p=2;p=v&&(m=0,t.context.fillRect(0,0,.01,.01))}},q.fromFrame=function(t){var e=nt[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache'+this);return new q(e)},q.fromImage=function(t,e,i){return new q(at.fromImage(t,e,i))},z.prototype.constructor=z,z.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.width,this.height)},z.prototype.resize=function(t,e){this.width=this.canvas.width=t,this.height=this.canvas.height=e},Q.prototype.constructor=Q,Q.prototype.pushMask=function(t,e){var i=e.context,r=e.camera;i.save(),t.include&&t.include.forEach((function(t){var e=t.worldTransform;r&&t.worldUseCamera&&(e=r.matrixToCameraSpace(e)),i.setTransform(e.a,e.b,e.c,e.d,e.tx,e.ty);for(var n=0,s=t.graphicsData.length;n0&&(e.globalAlpha=v,e.fillStyle=o,e.fill(y));var m=n.lineAlpha*i*c;u&&m>0&&(e.lineWidth=u,e.globalAlpha=m,e.strokeStyle=h,e.stroke(y)),a.isWebKitEngine&&e.restore()}},tt.prototype=Object.create(J.prototype),tt.prototype.constructor=tt,tt.prototype.getBounds=function(){return this.bounds},tt.prototype.lineStyle=function(t,e,i){if(this.lineWidth=t||0,this.lineColor=e||0,this.lineAlpha=arguments.length<3?1:i,this.currentPath){if(!this.currentPath.shape.haveZeroArea())return this.drawShape(new F(this.currentPath.shape.getLastPoint())),this;this.currentPath.lineWidth=this.lineWidth,this.currentPath.lineColor=this.lineColor,this.currentPath.lineAlpha=this.lineAlpha}return this},tt.prototype.setLineDash=function(t){if(this.lineDash=t||[],this.currentPath){if(!this.currentPath.shape.haveZeroArea())return this.drawShape(new F(this.currentPath.shape.getLastPoint())),this;this.currentPath.lineDash=this.lineDash}return this},tt.prototype.setLineCap=function(t){if(this.lineCap=t||"butt",this.currentPath){if(!this.currentPath.shape.haveZeroArea())return this.drawShape(new F(this.currentPath.shape.getLastPoint())),this;this.currentPath.lineCap=this.lineCap}return this},tt.prototype.setLineJoin=function(t){if(this.lineJoin=t||"miter",this.currentPath){if(!this.currentPath.shape.haveZeroArea())return this.drawShape(new F(this.currentPath.shape.getLastPoint())),this;this.currentPath.lineJoin=this.lineJoin}return this},tt.prototype.moveTo=function(t,e){return this.drawShape(new F([t,e])),this},tt.prototype.lineTo=function(t,e){return this.currentPath.shape.path.lineTo(t,e),this.currentPath.shape.mergePointToBounds(t,e),this.shapeChanged(),this},tt.prototype.quadraticCurveTo=function(t,e,i,r,n){return this.currentPath||this.moveTo(0,0),this.currentPath.shape.path.quadraticCurveTo(t,e,i,r),this.currentPath.shape.mergePointToBounds(t,e),this.currentPath.shape.mergePointToBounds(i,r),this.shapeChanged(),this},tt.prototype.bezierCurveTo=function(t,e,i,r,n,s,o){return this.currentPath||this.moveTo(0,0),this.currentPath.shape.path.bezierCurveTo(t,e,i,r,n,s),this.currentPath.shape.mergePointToBounds(t,e),this.currentPath.shape.mergePointToBounds(i,r),this.currentPath.shape.mergePointToBounds(n,s),this.shapeChanged(),this},tt.prototype.arcTo=function(t,e,i,r,n){return this.currentPath||this.moveTo(t,e),this.currentPath.shape.path.arcTo(t,e,i,r,n),this.currentPath.shape.mergePointToBounds(t,e),this.currentPath.shape.mergePointToBounds(i,r),this.shapeChanged(),this},tt.prototype.arc=function(t,e,i,r,n,s){return this.currentPath||this.drawShape(new F([])),this.currentPath.shape.path.arc(t,e,i,r,n,s),this.currentPath.shape.mergePointToBounds(t-i,e-i),this.currentPath.shape.mergePointToBounds(t+i,e+i),this.shapeChanged(),this},tt.prototype.ellipse=function(t,e,i,r,n,s,o,a){return this.currentPath||this.drawShape(new F([])),this.currentPath.shape.path.ellipse(t,e,i,r,n,s,o,a),this.currentPath.shape.mergePointToBounds(t-i,e-r),this.currentPath.shape.mergePointToBounds(t+i,e+r),this.shapeChanged(),this},tt.prototype.beginFill=function(t,e){return this.filling=!0,this.fillColor=t||0,this.fillAlpha=void 0===e?1:e,this.currentPath&&this.currentPath.shape.haveZeroArea()&&(this.currentPath.fill=this.filling,this.currentPath.fillColor=this.fillColor,this.currentPath.fillAlpha=this.fillAlpha),this},tt.prototype.endFill=function(){return this.filling=!1,this.fillColor=null,this.fillAlpha=1,this},tt.prototype.closePath=function(){return this.currentPath&&this.currentPath.shape&&(this.currentPath.shape.closed=!0),this},tt.prototype.drawRect=function(t,e,i,r){return this.drawShape(new u.Rectangle(t,e,i,r)),this},tt.prototype.drawRoundedRect=function(t,e,i,n,s,o,a,h){return s<0||o<0||a<0||h<0?(r&&r.error(new Error("Negative radius in rounded rect"),{x:t,y:e,width:i,height:n,radiusTopLeft:s,radiusTopRight:o,radiusBottomRight:a,radiusBottomLeft:h}),this):(this.drawShape(new N(t,e,i,n,s,o,a,h)),this)},tt.prototype.drawCircle=function(t,e,i){return i<0?(r&&r.error(new Error("Negative radius in circle"),{x:t,y:e,radius:i}),this):(this.drawShape(new H(t,e,i)),this)},tt.prototype.drawEllipse=function(t,e,i,r){return this.drawShape(new G(t,e,i,r)),this},tt.prototype.drawPolygon=function(t){return t instanceof Array||(t=Array.prototype.slice.call(arguments)),this.drawShape(new F(t)),this},tt.prototype.clear=function(){return this.lineWidth=0,this.filling=!1,this.graphicsData=[],this.currentPath=null,this.shapeChanged(),this},tt.prototype.generateTexture=function(t,e){t=t||1;var i=this.worldBounds,r=new z("graphics_gen_texture",i.width*t,i.height*t),n=at.fromCanvas(r.canvas,e);return n.baseTexture.resolution=t,r.context.scale(t,t),r.context.translate(-i.x,-i.y),$.renderGraphics(this,r.context),n},tt.prototype._renderContent=function(t){if(this.graphicsData.length&&0!==this.worldAlpha){var e=t.context,i=this.worldTransform;t.camera&&this.worldUseCamera&&(i=t.camera.matrixToCameraSpace(i)),e.setTransform(i.a,i.b,i.c,i.d,i.tx,i.ty),$.renderGraphics(this,e),m=0}},tt.prototype.updateBounds=function(t){var e=1/0,i=-1/0,r=1/0,n=-1/0;if(this.graphicsData.length)for(var s,o,a,h,c,u,d=0;di?a+c:i,r=hn?h+u:n;else if(p===tt.CIRC)a=s.x,h=s.y,e=a-(c=s.radius+f/2)i?a+c:i,r=h-(u=s.radius+f/2)n?h+u:n;else if(p===tt.ELIP)a=s.x,h=s.y,e=a-(c=s.width+f/2)i?a+c:i,r=h-(u=s.height+f/2)n?h+u:n;else{o=[s.bounds.left,s.bounds.top,s.bounds.right,s.bounds.bottom];for(var g=0;gi?a+f:i,r=(h=o[g+1])-fn?h+f:n}}var y=this.boundsPadding;return t.x=e-y,t.width=i-e+2*y,t.y=r-y,t.height=n-r+2*y,t},tt.prototype.drawShape=function(t){this.currentPath&&this.currentPath.shape.haveZeroArea()&&this.graphicsData.pop(),this.currentPath=null;var e=new it(this.lineWidth,this.lineColor,this.lineAlpha,this.lineDash,this.lineCap,this.lineJoin,this.fillColor,this.fillAlpha,this.filling,this.patternTransformMatrix,t);return this.graphicsData.push(e),e.type===tt.POLY&&(e.shape.closed=this.filling,this.currentPath=e),this.shapeChanged(),e},tt.POLY=0,tt.RECT=1,tt.CIRC=2,tt.ELIP=3,tt.RREC=4,F.prototype.type=tt.POLY,u.Rectangle.prototype.type=tt.RECT,H.prototype.type=tt.CIRC,G.prototype.type=tt.ELIP,N.prototype.type=tt.RREC,rt.prototype.constructor=rt,p.EventTarget.mixin(rt.prototype),rt.prototype.destroy=function(){this.imageUrl?(delete I[this.imageUrl],delete nt[this.imageUrl],this.imageUrl=null,navigator.isCocoonJS||(this.source.src="")):this.source&&this.source._pixiId&&delete I[this.source._pixiId],this.source=null},rt.prototype.setSource=function(t){if(void 0!==this.source)throw new Error("Resetting the source for the BaseTexture is not supported");this.source=t;var e=this;t instanceof HTMLImageElement?t.complete&&t.width&&t.height?(this.hasLoaded=!0,this.width=this.source.width,this.height=this.source.height,e.dispatchEvent({type:"loaded",content:e})):(e.source.onload=function(){e.source&&(e.hasLoaded=!0,e.width=e.source.naturalWidth||e.source.width,e.height=e.source.naturalHeight||e.source.height,e.dispatchEvent({type:"loaded",content:e}))},e.source.onerror=function(){e.setLoadFailed()}):(t instanceof HTMLCanvasElement||window.ImageBitmap&&t instanceof window.ImageBitmap)&&(this.hasLoaded=!0,this.width=this.source.width,this.height=this.source.height,e.dispatchEvent({type:"loaded",content:e}))},rt.prototype.setLoadFailed=function(){this.loadFailed=!0,this.dispatchEvent({type:"error",content:this})},rt.prototype.onLoad=function(t){var e=this,i=function(){e.removeAllListeners("error"),e.removeEventListener("loaded",i),t(e)};return e.hasLoaded?window.__rafRequestOriginal((function(){t(e)})):e.addEventListener("loaded",i),e},rt.prototype.onLoadError=function(t){var e=this,i=function(){e.removeAllListeners("loaded"),e.removeEventListener("error",i),t(e)};return e.loadFailed?window.__rafRequestOriginal((function(){t(e)})):e.addEventListener("error",i),e},rt.fromImage=function(t,e,i){var r=I[t];if(!r){var n=new Image,s=t;e&&n.setAttribute("crossOrigin","anonymous"),n.src=s,(r=new rt(n,i)).imageUrl=t,I[t]=r}return r},rt.fromImageObject=function(t,e){var i=I[t.src];return i||((i=new rt(t,e)).imageUrl=t.src,I[t.src]=i),i},rt.fromImageBitmap=function(t,e,i){var r=I[t];return r||((r=new rt(e,i)).imageUrl=t,I[t]=r),r},rt.fromCanvas=function(t,e,i){t._pixiId||(t._pixiId="canvas_"+ot++);var r=t._pixiId;i&&(r=i);var n=I[r];return n||(n=new rt(t,e),i&&(n.imageUrl=i),I[r]=n),n};var nt={};function st(){nt={}}var ot=0;function at(t,e,i,r){this.noFrame=!1,e||(this.noFrame=!0,e=new u.Rectangle(0,0,1,1)),t instanceof at&&(t=t.baseTexture),this.baseTexture=t,this.frame=e,this.trim=r,this.valid=!1,this.width=0,this.height=0,this.crop=i||new u.Rectangle(0,0,1,1),this.onBaseTextureLoadedWrapper=this.onBaseTextureLoaded.bind(this),t.hasLoaded?(this.noFrame&&(e=new u.Rectangle(0,0,t.width,t.height)),this.setFrame(e)):t.addEventListener("loaded",this.onBaseTextureLoadedWrapper)}function ht(t,e,i,r,n,s,o,a){this.width=e||100,this.height=i||100,this.resolution=o||1,this.frame=new u.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.crop=new u.Rectangle(0,0,this.width*this.resolution,this.height*this.resolution),this.baseTexture=new rt,this.baseTexture.width=this.width*this.resolution,this.baseTexture.height=this.height*this.resolution,this.baseTexture._glTextures=[],this.baseTexture.resolution=this.resolution,this.baseTexture.scaleMode=s||y.DEFAULT,this.baseTexture.hasLoaded=!0,at.call(this,this.baseTexture,new u.Rectangle(0,0,this.width,this.height)),this.renderer=n||f.defaultRenderer,this.textureBuffer=a||new z(t,this.width*this.resolution,this.height*this.resolution,r),this.baseTexture.source=this.textureBuffer.canvas,this.valid=!0}at.prototype.constructor=at,p.EventTarget.mixin(at.prototype),at.prototype.onBaseTextureLoaded=function(){var t=this.baseTexture;t.removeEventListener("loaded",this.onBaseTextureLoadedWrapper),this.noFrame&&(this.frame=new u.Rectangle(0,0,t.width,t.height)),this.setFrame(this.frame),this.dispatchEvent({type:"update",content:this})},at.prototype.destroy=function(t){t&&this.baseTexture.destroy(),this.valid=!1},at.prototype.setFrame=function(t){this.noFrame=!1,this.frame=t,this.width=t.width,this.height=t.height,this.crop.x=t.x,this.crop.y=t.y,this.crop.width=t.width,this.crop.height=t.height,this.valid=t&&t.width&&t.height&&this.baseTexture.source&&this.baseTexture.hasLoaded,this.trim&&(this.width=this.trim.width,this.height=this.trim.height,this.frame.width=this.trim.width,this.frame.height=this.trim.height)},at.fromImage=function(t,e,i){var r=nt[t];return r||(r=new at(rt.fromImage(t,e,i)),nt[t]=r),r},at.fromFrame=function(t){var e=nt[t];if(!e)throw new Error('The frameId "'+t+'" does not exist in the texture cache ');return e},at.fromCanvas=function(t,e){return new at(rt.fromCanvas(t,e))},at.fromImageObject=function(t,e){var i=nt[t.src];return i||(i=new at(rt.fromImageObject(t,e)),nt[t.src]=i),i},at.fromImageWithoutCache=function(t,e,i){return new at(rt.fromImage(t,e,i))},at.prototype.onLoad=function(t){var e=this,i=function(){e.baseTexture.removeAllListeners("error"),e.baseTexture.removeEventListener("loaded",i),t(e)};return e.baseTexture.hasLoaded?window.__rafRequestOriginal((function(){t(e)})):e.baseTexture.addEventListener("loaded",i),e},at.prototype.onLoadError=function(t){var e=this,i=function(){e.baseTexture.removeAllListeners("loaded"),e.baseTexture.removeEventListener("error",i),t(e)};return e.baseTexture.loadFailed?window.__rafRequestOriginal((function(){t(e)})):e.baseTexture.addEventListener("error",i),e},at.addTextureToCache=function(t,e){nt[e]=t},at.removeTextureFromCache=function(t){var e=nt[t];return delete nt[t],delete I[t],e},at.emptyTexture=new at(new rt),ht.prototype=Object.create(at.prototype),ht.prototype.constructor=ht,ht.prototype.resize=function(t,e,i){t!==this.width||e!==this.height?(this.valid=t>0&&e>0,this.width=this.frame.width=this.crop.width=t,this.height=this.frame.height=this.crop.height=e,i&&(this.baseTexture.width=this.width,this.baseTexture.height=this.height),this.valid&&this.textureBuffer.resize(this.width*this.resolution,this.height*this.resolution)):this.textureBuffer.clear()},ht.prototype.clear=function(){this.valid&&this.textureBuffer.clear()},ht.prototype.destroy=function(){this.clear(),this.valid=!1},ht.prototype.render=function(t,e,i){if(this.valid){var r=t.worldTransform,s=t.worldVisible,o=t.worldAlpha;t.worldTransform=null!==e&&void 0!==e?e:new c.Matrix,t.worldVisible=!0,t.worldAlpha=1,i&&this.textureBuffer.clear();var a=(0,n.__assign)((0,n.__assign)({},this.renderer.renderSession),{context:this.textureBuffer.context,isRenderTexture:!0,camera:void 0});t.renderCanvas(a),t.worldTransform=r,t.worldVisible=s,t.worldAlpha=o}},ht.prototype.getImage=function(){var t=new Image;return t.src=this.getBase64(),t},ht.prototype.getBase64=function(){return this.getCanvas().toDataURL()},ht.prototype.getCanvas=function(){return this.textureBuffer.canvas},ht.tempMatrix=new c.Matrix},869865:(t,e,i)=>{i.d(e,{ACTUAL_LEFT_MOUSE_DOWN:()=>r.ACTUAL_LEFT_MOUSE_DOWN,BaseTexture:()=>r.BaseTexture,BaseTextureCache:()=>r.BaseTextureCache,BaseTextureCacheIdGenerator:()=>r.BaseTextureCacheIdGenerator,CanvasBuffer:()=>r.CanvasBuffer,CanvasGraphics:()=>r.CanvasGraphics,CanvasMaskManager:()=>r.CanvasMaskManager,Circle:()=>r.Circle,DEG_TO_RAD:()=>r.DEG_TO_RAD,DisplayObject:()=>r.DisplayObject,DisplayObjectContainer:()=>r.DisplayObjectContainer,Ellipse:()=>r.Ellipse,Graphics:()=>r.Graphics,GraphicsData:()=>r.GraphicsData,LEFT_CLICK:()=>r.LEFT_CLICK,LEFT_MOUSE_BUTTON:()=>r.LEFT_MOUSE_BUTTON,LEFT_MOUSE_DOWN:()=>r.LEFT_MOUSE_DOWN,LONG_CLICK:()=>r.LONG_CLICK,MAX_SERIAL_DRAW_IMAGE:()=>r.MAX_SERIAL_DRAW_IMAGE,MIDDLE_MOUSE_BUTTON:()=>r.MIDDLE_MOUSE_BUTTON,MIDDLE_MOUSE_DOWN:()=>r.MIDDLE_MOUSE_DOWN,PI_2:()=>r.PI_2,Polygon:()=>r.Polygon,RAD_TO_DEG:()=>r.RAD_TO_DEG,RETINA_PREFIX:()=>r.RETINA_PREFIX,RIGHT_CLICK:()=>r.RIGHT_CLICK,RIGHT_MOUSE_BUTTON:()=>r.RIGHT_MOUSE_BUTTON,RIGHT_MOUSE_DOWN:()=>r.RIGHT_MOUSE_DOWN,RenderTexture:()=>r.RenderTexture,RoundedRectangle:()=>r.RoundedRectangle,Sprite:()=>r.Sprite,Texture:()=>r.Texture,TextureCache:()=>r.TextureCache,TextureCacheIdGenerator:()=>r.TextureCacheIdGenerator,clearTextureCache:()=>r.clearTextureCache,createCanvas:()=>r.createCanvas,createOffscreenCanvas:()=>r.createOffscreenCanvas,getCurveSegmentsCount:()=>r.getCurveSegmentsCount,offscreenAvailable:()=>r.offscreenAvailable,scaleModes:()=>r.scaleModes,setCreateCanvas:()=>r.setCreateCanvas,setCreateOffscreenCanvas:()=>r.setCreateOffscreenCanvas,setErrorTracker:()=>r.setErrorTracker});var r=i(521436)}}]); //# sourceMappingURL=https://miro.com/app/static/vendorPIXI~Board.83ce9b3980efe67e.js.map