1!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="f9e561b8-a1eb-42e5-bffb-a2b9a18cc764",t._sentryDebugIdIdentifier="sentry-dbid-f9e561b8-a1eb-42e5-bffb-a2b9a18cc764")}catch(t){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4289],{16745:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Animation=void 0;let r=n(54417),i=n(68588),a=r.glob.performance&&r.glob.performance.now?function(){return r.glob.performance.now()}:function(){return new Date().getTime()};class o{constructor(t,e){this.id=o.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:a(),frameRate:0},this.func=t,this.setLayers(e)}setLayers(t){let e=[];return t&&(e=Array.isArray(t)?t:[t]),this.layers=e,this}getLayers(){return this.layers}addLayer(t){let e=this.layers,n=e.length;for(let r=0;r<n;r++)if(e[r]._id===t._id)return!1;return this.layers.push(t),!0}isRunning(){let t=o.animations,e=t.length;for(let n=0;n<e;n++)if(t[n].id===this.id)return!0;return!1}start(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=a(),o._addAnimation(this),this}stop(){return o._removeAnimation(this),this}_updateFrameObject(t){this.frame.timeDiff=t-this.frame.lastTime,this.frame.lastTime=t,this.frame.time+=this.frame.timeDiff,this.frame.frameRate=1e3/this.frame.timeDiff}static _addAnimation(t){this.animations.push(t),this._handleAnimation()}static _removeAnimation(t){let e=t.id,n=this.animations,r=n.length;for(let t=0;t<r;t++)if(n[t].id===e){this.animations.splice(t,1);break}}static _runFrames(){let t={},e=this.animations;for(let n=0;n<e.length;n++){let r=e[n],i=r.layers,o=r.func;r._updateFrameObject(a());let s=i.length;if(!o||!1!==o.call(r,r.frame))for(let e=0;e<s;e++){let n=i[e];void 0!==n._id&&(t[n._id]=n)}}for(let e in t)t.hasOwnProperty(e)&&t[e].batchDraw()}static _animationLoop(){o.animations.length?(o._runFrames(),i.Util.requestAnimFrame(o._animationLoop)):o.animRunning=!1}static _handleAnimation(){this.animRunning||(this.animRunning=!0,i.Util.requestAnimFrame(this._animationLoop))}}e.Animation=o,o.animations=[],o.animIdCounter=0,o.animRunning=!1},54135:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.getQuadraticArcLength=e.getCubicArcLength=e.binomialCoefficients=e.cValues=e.tValues=void 0,e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,
1-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.122555206
171147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]],e.getCubicArcLength=(t,r,i)=>{let a,o;let s=i/2;a=0;for(let i=0;i<20;i++)o=s*e.tValues[20][i]+s,a+=e.cValues[20][i]*function(t,e,r){let i=n(1,r,t),a=n(1,r,e);return Math.sqrt(i*i+a*a)}(t,r,o);return s*a},e.getQuadraticArcLength=(t,e,n)=>{void 0===n&&(n=1);let r=t[0]-2*t[1]+t[2],i=e[0]-2*e[1]+e[2],a=2*t[1]-2*t[0],o=2*e[1]-2*e[0],s=4*(r*r+i*i);if(0===s)return n*Math.sqrt(Math.pow(t[2]-t[0],2)+Math.pow(e[2]-e[0],2));let l=4*(r*a+i*o)/(2*s),h=n+l,u=(a*a+o*o)/s-l*l,d=h*h+u>0?Math.sqrt(h*h+u):0,c=l*l+u>0?Math.sqrt(l*l+u):0;return Math.sqrt(s)/2*(h*d-l*c+(l+Math.sqrt(l*l+u)!==0?u*Math.log(Math.abs((h+d)/(l+c))):0))};let n=(t,r,i)=>{let a,o;let s=i.length-1;if(0===s)return 0;if(0===t){o=0;for(let t=0;t<=s;t++)o+=e.binomialCoefficients[s][t]*Math.pow(1-r,s-t)*Math.pow(r,t)*i[t];return o}a=Array(s);for(let t=0;t<s;t++)a[t]=s*(i[t+1]-i[t]);return n(t-1,r,a)};e.t2length=(t,e,n)=>{let r=1,i=t/e,a=(t-n(i))/e,o=0;for(;r>.001;){let s=Math.abs(t-n(i+a))/e;if(s<r)r=s,i+=a;else{let o=Math.abs(t-n(i-a))/e;o<r?(r=o,i-=a):a/=2}if(++o>500)break}return i}},34842:function(t,e,n){"use strict";let r;Object.defineProperty(e,"__esModule",{value:!0}),e.HitCanvas=e.SceneCanvas=e.Canvas=void 0;let i=n(68588),a=n(23442),o=n(54417),s=n(1455),l=n(53774);class h{constructor(t){this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;let e=(t||{}).pixelRatio||o.Konva.pixelRatio||function(){if(r)return r;let t=i.Util.createCanvasElement(),e=t.getContext("2d");return r=(o.Konva._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),i.Util.releaseCanvas(t),r}();this.pixelRatio=e,this._canvas=i.Util.createCanvasElement(),this._canvas.style.padding="0",this._canvas.style.margin="0",this._canvas.style.border="0",this._canvas.style.background="transparent",this._canvas.style.position="absolute",this._canvas.style.top="0",this._canvas.style.left="0"}getContext(){return this.context}getPixelRatio(){return this.pixelRatio}setPixelRatio(t){let e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)}setWidth(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";let e=this.pixelRatio;this.getContext()._context.scale(e,e)}setHeight(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";let e=this.pixelRatio;this.getContext()._context.scale(e,e)}getWidth(){return this.width}
1getHeight(){return this.height}setSize(t,e){this.setWidth(t||0),this.setHeight(e||0)}toDataURL(t,e){try{return this._canvas.toDataURL(t,e)}catch(t){try{return this._canvas.toDataURL()}catch(t){return i.Util.error("Unable to get data URL. "+t.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}e.Canvas=h,s.Factory.addGetterSetter(h,"pixelRatio",void 0,(0,l.getNumberValidator)());class u extends h{constructor(t={width:0,height:0,willReadFrequently:!1}){super(t),this.context=new a.SceneContext(this,{willReadFrequently:t.willReadFrequently}),this.setSize(t.width,t.height)}}e.SceneCanvas=u;class d extends h{constructor(t={width:0,height:0}){super(t),this.hitCanvas=!0,this.context=new a.HitContext(this),this.setSize(t.width,t.height)}}e.HitCanvas=d},28783:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;let r=n(1455),i=n(77939),a=n(53774);class o extends i.Node{constructor(){super(...arguments),this.children=[]}getChildren(t){if(!t)return this.children||[];let e=this.children||[],n=[];return e.forEach(function(e){t(e)&&n.push(e)}),n}hasChildren(){return this.getChildren().length>0}
1removeChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.remove()}),this.children=[],this._requestDraw(),this}destroyChildren(){return this.getChildren().forEach(t=>{t.parent=null,t.index=0,t.destroy()}),this.children=[],this._requestDraw(),this}add(...t){if(0===t.length)return this;if(t.length>1){for(let e=0;e<t.length;e++)this.add(t[e]);return this}let e=t[0];return e.getParent()?e.moveTo(this):(this._validateAdd(e),e.index=this.getChildren().length,e.parent=this,e._clearCaches(),this.getChildren().push(e),this._fire("add",{child:e}),this._requestDraw()),this}destroy(){return this.hasChildren()&&this.destroyChildren(),super.destroy(),this}find(t){return this._generalFind(t,!1)}findOne(t){let e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}_generalFind(t,e){let n=[];return this._descendants(r=>{let i=r._isMatch(t);return i&&n.push(r),!!i&&!!e}),n}_descendants(t){for(let e of this.getChildren())if(t(e)||e.hasChildren()&&e._descendants(t))return!0;return!1}toObject(){let t=i.Node.prototype.toObject.call(this);
1return t.children=[],this.getChildren().forEach(e=>{t.children.push(e.toObject())}),t}isAncestorOf(t){let e=t.getParent();for(;e;){if(e._id===this._id)return!0;e=e.getParent()}return!1}clone(t){let e=i.Node.prototype.clone.call(this,t);return this.getChildren().forEach(function(t){e.add(t.clone())}),e}getAllIntersections(t){let e=[];return this.find("Shape").forEach(n=>{n.isVisible()&&n.intersects(t)&&e.push(n)}),e}_clearSelfAndDescendantCache(t){var e;super._clearSelfAndDescendantCache(t),this.isCached()||null===(e=this.children)||void 0===e||e.forEach(function(e){e._clearSelfAndDescendantCache(t)})}_setChildrenIndices(){var t;null===(t=this.children)||void 0===t||t.forEach(function(t,e){t.index=e}),this._requestDraw()}drawScene(t,e,n){let r=this.getLayer(),i=t||r&&r.getCanvas(),a=i&&i.getContext(),o=this._getCanvasCache(),s=o&&o.scene,l=i&&i.isCache;if(!this.isVisible()&&!l)return this;if(s){a.save();let t=this.getAbsoluteTransform(e).getMatrix();a.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedSceneCanvas(a),a.restore()}else this._drawChildren("drawScene",i,e,n);return this}drawHit(t,e){if(!this.shouldDrawHit(e))return this;let n=this.getLayer(),r=t||n&&n.hitCanvas,i=r&&r.getContext(),a=this._getCanvasCache();if(a&&a.hit){i.save();let t=this.getAbsoluteTransform(e).getMatrix();i.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedHitCanvas(i),i.restore()}else this._drawChildren("drawHit",r,e);return this}_drawChildren(t,e,n,r){var i;let a=e&&e.getContext(),o=this.clipWidth(),s=this.clipHeight(),l=this.clipFunc(),h="number"==typeof o&&"number"==typeof s||l,u=n===this;if(h){let t;a.save();let e=this.getAbsoluteTransform(n),r=e.getMatrix();if(a.transform(r[0],r[1],r[2],r[3],r[4],r[5]),a.beginPath(),l)t=l.call(this,a,this);else{let t=this.clipX(),e=this.clipY();a.rect(t||0,e||0,o,s)}a.clip.apply(a,t),r=e.copy().invert().getMatrix(),a.transform(r[0],r[1],r[2],r[3],r[4],r[5])}let d=!u&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===t;d&&(a.save(),a._applyGlobalCompositeOperation(this)),null===(i=this.children)||void 0===i||i.forEach(function(i){i[t](e,n,r)}),d&&a.restore(),h&&a.restore()}getClientRect(t={}){var e;let n,r,i,a;let o=t.skipTransform,s=t.relativeTo,l={x:1/0,y:1/0,width:0,height:0},h=this;null===(e=this.children)||void 0===e||e.forEach(function(e){if(!e.visible())return;let o=e.getClientRect({relativeTo:h,skipShadow:t.skipShadow,skipStroke:t.skipStroke});(0!==o.width||0!==o.height)&&(void 0===n?(n=o.x,r=o.y,i=o.x+o.width,a=o.y+o.height):(n=Math.min(n,o.x),r=Math.min(r,o.y),i=Math.max(i,o.x+o.width),a=Math.max(a,o.y+o.height)))});let u=this.find("Shape"),d=!1;for(let t=0;t<u.length;t++)if(u[t]._isVisible(this)){d=!0;break}return(l=d&&void 0!==n?{x:n,y:r,width:i-n,height:a-r}:{x:0,y:0,width:0,height:0},o)?l:this._transformedRect(l,s)}}e.Container=o,r.Factory.addComponentsGetterSetter(o,"clip",["x","y","width","height"]),r.Factory.addGetterSetter(o,"clipX",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"clipY",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"clipWidth",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"clipHeight",void 0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(o,"clipFunc")},23442:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HitContext=e.SceneContext=e.Context=void 0;let r=n(68588),i=n(54417),a=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","roundRect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"];class o{constructor(t){this.canvas=t,i.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}fillShape(t){t.fillEnabled()&&this._fill(t)}_fill(t){}strokeShape(t){t.hasStroke()&&this._stroke(t)}_stroke(t){}fillStrokeShape(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}getTrace(t,e){let n=this.traceArr,i=n.length,a="",o,s,l,h;for(o=0;o<i;o++)(l=(s=n[o]).method)?(h=s.args,a+=l,t?a+="()":r.Util._isArray(h[0])?a+="(["+h.join(",")+"])":(e&&(h=h.map(t=>"number"==typeof t?Math.floor(t):t)),a+="("+h.join(",")+")")):(a+=s.property,t||(a+="="+s.val)),a+=";";return a}clearTrace(){this.traceArr=[]}_trace(t){let e=this.traceArr;e.push(t),e.length>=100&&e.shift()}reset(){let t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}getCanvas(){return this.canvas}clear(t){let e=this.getCanvas();t?this.clearRect(t.x||0,t.y||0,t.width||0,t.height||0):this.clearRect(0,0,e.getWidth()/e.pixelRatio,e.getHeight()/e.pixelRatio)}_applyLineCap(t){let e=t.attrs.lineCap;e&&this.setAttr("lineCap",e)}_applyOpacity(t){let e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)}_applyLineJoin(t){let e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}setAttr(t,e){this._context[t]=e}arc(t,e,n,r,i,a){this._context.arc(t,e,n,r,i,a)}arcTo(t,e,n,r,i){this._context.arcTo(t,e,n,r,i)}beginPath(){this._context.beginPath()}bezierCurveTo(t,e,n,r,i,a){this._context.bezierCurveTo(t,e,n,r,i,a)}clearRect(t,e,n,r){this._context.clearRect(t,e,n,r)}clip(...t){this._context.clip.apply(this._context,t)}closePath(){this._context.closePath()}createImageData(t,e){let n=arguments;return 2===n.length?this._context.createImageData(t,e):1===n.length?this._context.createImageData(t):void 0}createLinearGradient(t,e,n,r){return this._context.createLinearGradient(t,e,n,r)}createPattern(t,e){return this._context.createPattern(t,e)}createRadialGradient(t,e,n,r,i,a){return this._context.createRadialGradient(t,e,n,r,i,a)}drawImage(t,e,n,r,i,a,o,s,l){let h=arguments,u=this._context;3===h.length?u.drawImage(t,e,n):5===h.length?u.drawImage(t,e,n,r,i):9===h.length&&u.drawImage(t,e,n,r,i,a,o,s,l)}ellipse(t,e,n,r,i,a,o,s){this._context.ellipse(t,e,n,r,i,a,o,s)}
1isPointInPath(t,e,n,r){return n?this._context.isPointInPath(n,t,e,r):this._context.isPointInPath(t,e,r)}fill(...t){this._context.fill.apply(this._context,t)}fillRect(t,e,n,r){this._context.fillRect(t,e,n,r)}strokeRect(t,e,n,r){this._context.strokeRect(t,e,n,r)}fillText(t,e,n,r){r?this._context.fillText(t,e,n,r):this._context.fillText(t,e,n)}measureText(t){return this._context.measureText(t)}getImageData(t,e,n,r){return this._context.getImageData(t,e,n,r)}lineTo(t,e){this._context.lineTo(t,e)}moveTo(t,e){this._context.moveTo(t,e)}rect(t,e,n,r){this._context.rect(t,e,n,r)}roundRect(t,e,n,r,i){this._context.roundRect(t,e,n,r,i)}putImageData(t,e,n){this._context.putImageData(t,e,n)}quadraticCurveTo(t,e,n,r){this._context.quadraticCurveTo(t,e,n,r)}restore(){this._context.restore()}rotate(t){this._context.rotate(t)}save(){this._context.save()}scale(t,e){this._context.scale(t,e)}setLineDash(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}getLineDash(){return this._context.getLineDash()}setTransform(t,e,n,r,i,a){this._context.setTransform(t,e,n,r,i,a)}stroke(t){t?this._context.stroke(t):this._context.stroke()}strokeText(t,e,n,r){this._context.strokeText(t,e,n,r)}transform(t,e,n,r,i,a){this._context.transform(t,e,n,r,i,a)}translate(t,e){this._context.translate(t,e)}_enableTrace(){let t=this,e=a.length,n=this.setAttr,i,o,s=function(e){let n=t[e],i;t[e]=function(){return o=function(t){let e=[],n=t.length,i=r.Util;for(let r=0;r<n;r++){let n=t[r];i._isNumber(n)?n=Math.round(1e3*n)/1e3:i._isString(n)||(n+=""),e.push(n)}return e}(Array.prototype.slice.call(arguments,0)),i=n.apply(t,arguments),t._trace({method:e,args:o}),i}};for(i=0;i<e;i++)s(a[i]);t.setAttr=function(){n.apply(t,arguments);let e=arguments[0],r=arguments[1];("shadowOffsetX"===e||"shadowOffsetY"===e||"shadowBlur"===e)&&(r/=this.canvas.getPixelRatio()),t._trace({property:e,val:r})}}_applyGlobalCompositeOperation(t){let e=t.attrs.globalCompositeOperation;e&&"source-over"!==e&&this.setAttr("globalCompositeOperation",e)}}e.Context=o,["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","letterSpacing","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","direction","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"].forEach(function(t){Object.defineProperty(o.prototype,t,{get(){return this._context[t]},set(e){this._context[t]=e}})});class s extends o{constructor(t,{willReadFrequently:e=!1}={}){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:e})}_fillColor(t){let e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}_fillPattern(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}_fillLinearGradient(t){let e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fillRadialGradient(t){let e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}_fill(t){let e=t.fill(),n=t.getFillPriority();if(e&&"color"===n){this._fillColor(t);return}let r=t.getFillPatternImage();if(r&&"pattern"===n){this._fillPattern(t);return}let i=t.getFillLinearGradientColorStops();if(i&&"linear-gradient"===n){this._fillLinearGradient(t);return}let a=t.getFillRadialGradientColorStops();if(a&&"radial-gradient"===n){this._fillRadialGradient(t);return}e?this._fillColor(t):r?this._fillPattern(t):i?this._fillLinearGradient(t):a&&this._fillRadialGradient(t)}_strokeLinearGradient(t){let e=t.getStrokeLinearGradientStartPoint(),n=t.getStrokeLinearGradientEndPoint(),r=t.getStrokeLinearGradientColorStops(),i=this.createLinearGradient(e.x,e.y,n.x,n.y);if(r){for(let t=0;t<r.length;t+=2)i.addColorStop(r[t],r[t+1]);this.setAttr("strokeStyle",i)}}_stroke(t){let e=t.dash(),n=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!n){this.save();let t=this.getCanvas().getPixelRatio();this.setTransform(t,0,0,t,0,0)}this._applyLineCap(t),e&&t.dashEnabled()&&(this.setLineDash(e),this.setAttr("lineDashOffset",t.dashOffset())),this.setAttr("lineWidth",t.strokeWidth()),t.getShadowForStrokeEnabled()||this.setAttr("shadowColor","rgba(0,0,0,0)"),t.getStrokeLinearGradientColorStops()?this._strokeLinearGradient(t):this.setAttr("strokeStyle",t.stroke()),t._strokeFunc(this),n||this.restore(
1)}}_applyShadow(t){var e,n,r;let i=null!==(e=t.getShadowRGBA())&&void 0!==e?e:"black",a=null!==(n=t.getShadowBlur())&&void 0!==n?n:5,o=null!==(r=t.getShadowOffset())&&void 0!==r?r:{x:0,y:0},s=t.getAbsoluteScale(),l=this.canvas.getPixelRatio(),h=s.x*l,u=s.y*l;this.setAttr("shadowColor",i),this.setAttr("shadowBlur",a*Math.min(Math.abs(h),Math.abs(u))),this.setAttr("shadowOffsetX",o.x*h),this.setAttr("shadowOffsetY",o.y*u)}}e.SceneContext=s;class l extends o{constructor(t){super(t),this._context=t._canvas.getContext("2d",{willReadFrequently:!0})}_fill(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}strokeShape(t){t.hasHitStroke()&&this._stroke(t)}_stroke(t){if(t.hasHitStroke()){let e=t.getStrokeScaleEnabled();if(!e){this.save();let t=this.getCanvas().getPixelRatio();this.setTransform(t,0,0,t,0,0)}this._applyLineCap(t);let n=t.hitStrokeWidth(),r="auto"===n?t.strokeWidth():n;this.setAttr("lineWidth",r),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),e||this.restore()}}}e.HitContext=l},87185:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;var r=n(3986);Object.defineProperty(e,"Konva",{enumerable:!0,get:function(){return r.Konva}});let i=n(3986);t.exports=i.Konva},70210:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;let r=n(54417),i=n(68588);e.DD={get isDragging(){let t=!1;return e.DD._dragElements.forEach(e=>{"dragging"===e.dragStatus&&(t=!0)}),t},justDragged:!1,get node(){let t;return e.DD._dragElements.forEach(e=>{t=e.node}),t},_dragElements:new Map,_drag(t){let n=[];e.DD._dragElements.forEach((e,r)=>{let{node:a}=e,o=a.getStage();o.setPointersPositions(t),void 0===e.pointerId&&(e.pointerId=i.Util._getFirstPointerId(t));let s=o._changedPointerPositions.find(t=>t.id===e.pointerId);if(s){if("dragging"!==e.dragStatus){let n=a.dragDistance();if(Math.max(Math.abs(s.x-e.startPointerPos.x),Math.abs(s.y-e.startPointerPos.y))<n||(a.startDrag({evt:t}),!a.isDragging()))return}a._setDragPosition(t,e),n.push(a)}}),n.forEach(e=>{e.fire("dragmove",{type:"dragmove",target:e,evt:t},!0)})},_endDragBefore(t){let n=[];e.DD._dragElements.forEach(i=>{let{node:a}=i,o=a.getStage();if(t&&o.setPointersPositions(t),!o._changedPointerPositions.find(t=>t.id===i.pointerId))return;("dragging"===i.dragStatus||"stopped"===i.dragStatus)&&(e.DD.justDragged=!0,r.Konva._mouseListenClick=!1,r.Konva._touchListenClick=!1,r.Konva._pointerListenClick=!1,i.dragStatus="stopped");let s=i.node.getLayer()||i.node instanceof r.Konva.Stage&&i.node;s&&-1===n.indexOf(s)&&n.push(s)}),n.forEach(t=>{t.draw()})},_endDragAfter(t){e.DD._dragElements.forEach((n,r)=>{"stopped"===n.dragStatus&&n.node.fire("dragend",{type:"dragend",target:n.node,evt:t},!0),"dragging"!==n.dragStatus&&e.DD._dragElements.delete(r)})}},r.Konva.isBrowser&&(window.addEventListener("mouseup",e.DD._endDragBefore,!0),window.addEventListener("touchend",e.DD._endDragBefore,!0),window.addEventListener("touchcancel",e.DD._endDragBefore,!0),window.addEventListener("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1),window.addEventListener("touchcancel",e.DD._endDragAfter,!1))},1455:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;let r=n(68588),i=n(53774);e.Factory={addGetterSetter(t,n,r,i,a){e.Factory.addGetter(t,n,r),e.Factory.addSetter(t,n,i,a),e.Factory.addOverloadedGetterSetter(t,n)},addGetter(t,e,n){var i="get"+r.Util._capitalize(e);t.prototype[i]=t.prototype[i]||function(){let t=this.attrs[e];return void 0===t?n:t}},addSetter(t,n,i,a){var o="set"+r.Util._capitalize(n);t.prototype[o]||e.Factory.overWriteSetter(t,n,i,a)},overWriteSetter(t,e,n,i){var a="set"+r.Util._capitalize(e);t.prototype[a]=function(t){return n&&null!=t&&(t=n.call(this,t,e)),this._setAttr(e,t),i&&i.call(this),this}},addComponentsGetterSetter(t,n,a,o,s){let l=a.length,h=r.Util._capitalize,u="get"+h(n),d="set"+h(n);t.prototype[u]=function(){let t={};for(let e=0;e<l;e++){let r=a[e];t[r]=this.getAttr(n+h(r))}return t};let c=(0,i.getComponentValidator)(a);t.prototype[d]=function(t){let e=this.attrs[n];for(let e in o&&(t=o.call(this,t,n)),c&&c.call(this,t,n),t)t.hasOwnProperty(e)&&this._setAttr(n+h(e),t[e]);return t||a.forEach(t=>{this._setAttr(n+h(t),void 0)}),this._fireChangeEvent(n,e,t),s&&s.call(this),this},e.Factory.addOverloadedGetterSetter(t,n)}
1,addOverloadedGetterSetter(t,e){var n=r.Util._capitalize(e),i="set"+n,a="get"+n;t.prototype[e]=function(){return arguments.length?(this[i](arguments[0]),this):this[a]()}},addDeprecatedGetterSetter(t,n,i,a){r.Util.error("Adding deprecated "+n);let o="get"+r.Util._capitalize(n),s=n+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[o]=function(){r.Util.error(s);let t=this.attrs[n];return void 0===t?i:t},e.Factory.addSetter(t,n,a,function(){r.Util.error(s)}),e.Factory.addOverloadedGetterSetter(t,n)},backCompat(t,e){r.Util.each(e,function(e,n){let i=t.prototype[n],a="get"+r.Util._capitalize(e),o="set"+r.Util._capitalize(e);function s(){i.apply(this,arguments),r.Util.error('"'+e+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}t.prototype[e]=s,t.prototype[a]=s,t.prototype[o]=s})},afterSetFilter(){this._filterUpToDate=!1}}},73980:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastLayer=void 0;let r=n(68588),i=n(44415),a=n(54417);class o extends i.Layer{constructor(t){super(t),this.listening(!1),r.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.')}}e.FastLayer=o,o.prototype.nodeType="FastLayer",(0,a._registerNode)(o)},54417:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;let r=Math.PI/180;e.glob=void 0!==n.g?n.g:"undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:{},e.Konva={_global:e.glob,version:"9.3.18",isBrowser:"undefined"!=typeof window&&("[object Window]"===({}).toString.call(window)||"[object global]"===({}).toString.call(window)),isUnminified:/param/.test((function(t){}).toString()),dblClickWindow:400,getAngle:t=>e.Konva.angleDeg?t*r:t,enableTrace:!1,pointerEventsEnabled:!0,autoDrawEnabled:!0,hitOnDragEnabled:!1,capturePointerEventsEnabled:!1,_mouseListenClick:!1,_touchListenClick:!1,_pointerListenClick:!1,_mouseInDblClickWindow:!1,_touchInDblClickWindow:!1,_pointerInDblClickWindow:!1,_mouseDblClickPointerId:null,_touchDblClickPointerId:null,_pointerDblClickPointerId:null,_fixTextRendering:!1,pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:()=>e.Konva.DD.isDragging,isTransforming(){var t;return null===(t=e.Konva.Transformer)||void 0===t?void 0:t.isTransforming()},isDragReady:()=>!!e.Konva.DD.node,releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal(t){e.glob.Konva=t}},e._registerNode=t=>{e.Konva[t.prototype.getClassName()]=t},e.Konva._injectGlobal(e.Konva)},58985:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;let r=n(68588),i=n(28783),a=n(54417);class o extends i.Container{_validateAdd(t){let e=t.getType();"Group"!==e&&"Shape"!==e&&r.Util.throw("You may only add groups and shapes to groups.")}}e.Group=o,o.prototype.nodeType="Group",(0,a._registerNode)(o)},44415:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Layer=void 0;let r=n(68588),i=n(28783),a=n(77939),o=n(1455),s=n(34842),l=n(53774),h=n(97955),u=n(54417),d=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],c=d.length;
1class f extends i.Container{constructor(t){super(t),this.canvas=new s.SceneCanvas,this.hitCanvas=new s.HitCanvas({pixelRatio:1}),this._waitingForDraw=!1,this.on("visibleChange.konva",this._checkVisibility),this._checkVisibility(),this.on("imageSmoothingEnabledChange.konva",this._setSmoothEnabled),this._setSmoothEnabled()}createPNGStream(){return this.canvas._canvas.createPNGStream()}getCanvas(){return this.canvas}getNativeCanvasElement(){return this.canvas._canvas}getHitCanvas(){return this.hitCanvas}getContext(){return this.getCanvas().getContext()}clear(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}setZIndex(t){super.setZIndex(t);let e=this.getStage();return e&&e.content&&(e.content.removeChild(this.getNativeCanvasElement()),t<e.children.length-1?e.content.insertBefore(this.getNativeCanvasElement(),e.children[t+1].getCanvas()._canvas):e.content.appendChild(this.getNativeCanvasElement())),this}moveToTop(){a.Node.prototype.moveToTop.call(this);let t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}moveUp(){if(!a.Node.prototype.moveUp.call(this))return!1;let t=this.getStage();return!!t&&!!t.content&&(t.content.removeChild(this.getNativeCanvasElement()),this.index<t.children.length-1?t.content.insertBefore(this.getNativeCanvasElement(),t.children[this.index+1].getCanvas()._canvas):t.content.appendChild(this.getNativeCanvasElement()),!0)}moveDown(){if(a.Node.prototype.moveDown.call(this)){let t=this.getStage();if(t){let e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[this.index+1].getCanvas()._canvas))}return!0}return!1}moveToBottom(){if(a.Node.prototype.moveToBottom.call(this)){let t=this.getStage();if(t){let e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[1].getCanvas()._canvas))}return!0}return!1}getLayer(){return this}remove(){let t=this.getNativeCanvasElement();return a.Node.prototype.remove.call(this),t&&t.parentNode&&r.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}getStage(){return this.parent}setSize({width:t,height:e}){return this.canvas.setSize(t,e),this.hitCanvas.setSize(t,e),this._setSmoothEnabled(),this}_validateAdd(t){let e=t.getType();"Group"!==e&&"Shape"!==e&&r.Util.throw("You may only add groups and shapes to a layer.")}_toKonvaCanvas(t){return(t=t||{}).width=t.width||this.getWidth(),t.height=t.height||this.getHeight(),t.x=void 0!==t.x?t.x:this.x(),t.y=void 0!==t.y?t.y:this.y(),a.Node.prototype._toKonvaCanvas.call(this,t)}_checkVisibility(){this.visible()?this.canvas._canvas.style.display="block":this.canvas._canvas.style.display="none"}_setSmoothEnabled(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}getWidth(){if(this.parent)return this.parent.width()}setWidth(){r.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}getHeight(){if(this.parent)return this.parent.height()}setHeight(){r.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}batchDraw(){return this._waitingForDraw||(this._waitingForDraw=!0,r.Util.requestAnimFrame(()=>{this.draw(),this._waitingForDraw=!1})),this}getIntersection(t){if(!this.isListening()||!this.isVisible())return null;let e=1,n=!1;for(;;){for(let r=0;r<c;r++){let i=d[r],a=this._getIntersection({x:t.x+i.x*e,y:t.y+i.y*e}),o=a.shape;if(o)return o;if(n=!!a.antialiased,!a.antialiased)break}if(!n)return null;e+=1}}_getIntersection(t){let e=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,i=n[3];if(255===i){let t=r.Util._rgbToHex(n[0],n[1],n[2]),e=h.shapes["#"+t];return e?{shape:e}:{antialiased:!0}}return i>0?{antialiased:!0}:{}}drawScene(t,e){let n=this.getLayer(),r=t||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),i.Container.prototype.drawScene.call(this,r,e),this._fire("draw",{node:this}),this}drawHit(t,e){let n=this.getLayer(),r=t||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),i.Container.prototype.drawHit.call(this,r,e),this}enableHitGraph(){return this.hitGraphEnabled(!0),this}disableHitGraph(){return this.hitGraphEnabled(!1),this}setHitGraphEnabled(t){r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}getHitGraphEnabled(t){return r.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}toggleHitCanvas(){if(!this.parent||!this.parent.content)return;let t=this.parent;this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}destroy(){return r.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),super.destroy()}}e.Layer=f,f.prototype.nodeType="Layer",(0,u._registerNode)(f),o.Factory.addGetterSetter(f,"imageSmoothingEnabled",!0),o.Factory.addGetterSetter(f,"clearBeforeDraw",!0),o.Factory.addGetterSetter(f,"hitGraphEnabled",!0,(0,l.getBooleanValidator)())},77939:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;let r=n(68588),i=n(1455),a=n(34842),o=n(54417),s=n(70210),l=n(53774),h="absoluteOpacity",u="allEventListeners",d="absoluteTransform",c="absoluteScale",f="canvas",g="listening",p="mouseenter",m="mouseleave",y="Shape",v="stage",b="transform",_="visible",S=1;class x{constructor(t){this._id=S++,this.eventListeners={},this.attrs={},this.index=0,this._allEventListeners=null,this.parent=null,this._cache=new Map,this._attachedDepsListeners=new Map,this._lastPos=null,this._batchingTransformChange=!1,this._needClearTransformCache=!1,this._filterUpToDate=!1,this._isUnderCache=!1,this._dragEventId=null,this._shouldFireChangeEvents=!1,this.setAttrs(t),this._shouldFireChangeEvents=!0}hasChildren(){return!1}_clearCache(t){(t===b||t===d)&&this._cache.get(t)?this._cache.get(t).dirty=!0:t?this._cache.delete(t):this._cache.clear()}_getCache(t,e){let n=this._cache.get(t),r=t===b||t===d;return(void 0===n||r&&!0===n.dirty)&&(n=e.call(this),this._cache.set(t,n)),n}_calculate(t,e,n){if(!this._attachedDepsListeners.get(t)){let n=e.map(t=>t+"Change.konva").join(" ");this.on(n,()=>{this._clearCache(t)}),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,n)}_getCanvasCache(){return this._cache.get(f)}_clearSelfAndDescendantCache(t){this._clearCache(t),t===d&&this.fire("absoluteTransformChange")}clearCache(){if(this._cache.has(f)){let{scene:t,filter:e,hit:n}=this._cache.get(f);r.Util.releaseCanvas(t,e,n),this._cache.delete(f)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}cache(t){let e=t||{},n={};(void 0===e.x||void 0===e.y||void 0===e.width||void 0===e.height)&&(n=this.getClientRect({skipTransform:!0,relativeTo:this.getParent()||void 0}));let i=Math.ceil(e.width||n.width),o=Math.ceil(e.height||n.height),s=e.pixelRatio,l=void 0===e.x?Math.floor(n.x):e.x,u=void 0===e.y?Math.floor(n.y):e.y,d=e.offset||0,g=e.drawBorder||!1,p=e.hitCanvasPixelRatio||1;if(!i||!o){r.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.");return}let m=Math.abs(Math.round(n.x)-l)>.5?1:0,y=Math.abs(Math.round(n.y)-u)>.5?1:0;i+=2*d+m,o+=2*d+y,l-=d,u-=d;let v=new a.SceneCanvas({pixelRatio:s,width:i,height:o}),b=new a.SceneCanvas({pixelRatio:s,width:0,height:0,willReadFrequently:!0}),_=new a.HitCanvas({pixelRatio:p,width:i,height:o}),S=v.getContext(),x=_.getContext();return _.isCache=!0,v.isCache=!0,this._cache.delete(f),this._filterUpToDate=!1,!1===e.imageSmoothingEnabled&&(v.getContext()._context.imageSmoothingEnabled=!1,b.getContext()._context.imageSmoothingEnabled=!1),S.save(),x.save(),S.translate(-l,-u),x.translate(-l,-u),this._isUnderCache=!0,this._clearSelfAndDescendantCache(h),this._clearSelfAndDescendantCache(c),this.drawScene(v,this),this.drawHit(_,this),this._isUnderCache=!1,S.restore(),x.restore(),g&&(S.save(),S.beginPath(),S.rect(0,0,i,o),S.closePath(),S.setAttr("strokeStyle","red"),S.setAttr("lineWidth",5),S.stroke(),S.restore()),this._cache.set(f,{scene:v,filter:b,hit:_,x:l,y:u}),this._requestDraw(),this}isCached(){return this._cache.has(f)}getClientRect(t){throw Error('abstract "getClientRect" method call')}_transformedRect(t,e){let n=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x+t.width,y:t.y+t.height},{x:t.x,y:t.y+t.height}],r=1/0,i=1/0,a=-1/0,o=-1/0,s=this.getAbsoluteTransform(e);return n.forEach(function(t){let e=s.point(t);void 0===r&&(r=a=e.x,i=o=e.y),r=Math.min(r,e.x),i=Math.min(i,e.y),a=Math.max(a,e.x),o=Math.max(o,e.y)}),{x:r,y:i,width:a-r,height:o-i}}_drawCachedSceneCanvas(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);let e=this._getCanvasCache();t.translate(e.x,e.y);let n=this._getCachedSceneCanvas(),r=n.pixelRatio;t.drawImage(n._canvas,0,0,n.width/r,n.height/r),t.restore()}_drawCachedHitCanvas(t){let e=this._getCanvasCache(),n=e.hit;t.save(),t.translate(e.x,e.y),t.drawImage(n._canvas,0,0,n.width/n.pixelRatio,n.height/n.pixelRatio),t.restore()}_getCachedSceneCanvas(){let t=this.filters(),e=this._getCanvasCache(),n=e.scene,i=e.filter,a=i.getContext(),o,s,l,h;if(t){if(!this._filterUpToDate){let e=n.pixelRatio;i.setSize(n.width/n.pixelRatio,n.height/n.pixelRatio);try{for(o=t.length,a.clear(),a.drawImage(n._canvas,0,0,n.getWidth()/e,n.getHeight()/e),s=a.getImageData(0,0,i.getWidth(),i.getHeight()),l=0;l<o;l++){if(h=t[l],"function"!=typeof h){r.Util.error("Filter should be type of function, but got "+typeof h+" instead. Please check correct filters");continue}h.call(this,s),a.putImageData(s,0,0)}}catch(t){r.Util.error("Unable to apply filter. "+t.message+" This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.")}this._filterUpToDate=!0}return i}return n}on(t,e){if(this._cache&&this._cache.delete(u),3==arguments.length)return this._delegate.apply(this,arguments);let n=t.split(" "),r=n.length,i,a,o,s;for(i=0;i<r;i++)o=(a=n[i].split("."))[0],s=a[1]||"",this.eventListeners[o]||(this.eventListeners[o]=[]),this.eventListeners[o].push({name:s,handler:e});return this}off(t,e){let n=(t||"").split(" "),r=n.length,i,a,o,s,l;if(this._cache&&this._cache.delete(u),!t)for(a in this.eventListeners)this._off(a);for(i=0;i<r;i++)if(s=(o=n[i].split("."))[0],l=o[1],s)this.eventListeners[s]&&this._off(s,l,e);else for(a in this.eventListeners)this._off(a,l,e);return this}
1dispatchEvent(t){let e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}addEventListener(t,e){return this.on(t,function(t){e.call(this,t.evt)}),this}removeEventListener(t){return this.off(t),this}_delegate(t,e,n){let i=this;this.on(t,function(t){let a=t.target.findAncestors(e,!0,i);for(let e=0;e<a.length;e++)(t=r.Util.cloneObject(t)).currentTarget=a[e],n.call(a[e],t)})}remove(){return this.isDragging()&&this.stopDrag(),s.DD._dragElements.delete(this._id),this._remove(),this}_clearCaches(){this._clearSelfAndDescendantCache(d),this._clearSelfAndDescendantCache(h),this._clearSelfAndDescendantCache(c),this._clearSelfAndDescendantCache(v),this._clearSelfAndDescendantCache(_),this._clearSelfAndDescendantCache(g)}_remove(){this._clearCaches();let t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}destroy(){return this.remove(),this.clearCache(),this}getAttr(t){let e="get"+r.Util._capitalize(t);return r.Util._isFunction(this[e])?this[e]():this.attrs[t]}getAncestors(){let t=this.getParent(),e=[];for(;t;)e.push(t),t=t.getParent();return e}getAttrs(){return this.attrs||{}}setAttrs(t){return this._batchTransformChanges(()=>{let e,n;if(!t)return this;for(e in t)"children"!==e&&(n="set"+r.Util._capitalize(e),r.Util._isFunction(this[n])?this[n](t[e]):this._setAttr(e,t[e]))}),this}isListening(){return this._getCache(g,this._isListening)}_isListening(t){if(!this.listening())return!1;let e=this.getParent();return!e||e===t||this===t||e._isListening(t)}isVisible(){return this._getCache(_,this._isVisible)}_isVisible(t){if(!this.visible())return!1;let e=this.getParent();return!e||e===t||this===t||e._isVisible(t)}shouldDrawHit(t,e=!1){if(t)return this._isVisible(t)&&this._isListening(t);let n=this.getLayer(),r=!1;s.DD._dragElements.forEach(t=>{"dragging"===t.dragStatus&&("Stage"===t.node.nodeType?r=!0:t.node.getLayer()===n&&(r=!0))});let i=!e&&!o.Konva.hitOnDragEnabled&&(r||o.Konva.isTransforming());return this.isListening()&&this.isVisible()&&!i}show(){return this.visible(!0),this}hide(){return this.visible(!1),this}getZIndex(){return this.index||0}getAbsoluteZIndex(){let t=this.getDepth(),e=this,n=0,r,i,a,o,s=this.getStage();return"Stage"!==e.nodeType&&s&&function s(l){for(a=0,r=[],i=l.length;a<i;a++)o=l[a],n++,o.nodeType!==y&&(r=r.concat(o.getChildren().slice())),o._id===e._id&&(a=i);r.length>0&&r[0].getDepth()<=t&&s(r)}(s.getChildren()),n}getDepth(){let t=0,e=this.parent;for(;e;)t++,e=e.parent;return t}_batchTransformChanges(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(b),this._clearSelfAndDescendantCache(d)),this._needClearTransformCache=!1}setPosition(t){return this._batchTransformChanges(()=>{this.x(t.x),this.y(t.y)}),this}getPosition(){return{x:this.x(),y:this.y()}}getRelativePointerPosition(){let t=this.getStage();if(!t)return null;let e=t.getPointerPosition();if(!e)return null;let n=this.getAbsoluteTransform().copy();return n.invert(),n.point(e)}getAbsolutePosition(t){let e=!1,n=this.parent;for(;n;){if(n.isCached()){e=!0;break}n=n.parent}e&&!t&&(t=!0);let i=this.getAbsoluteTransform(t).getMatrix(),a=new r.Transform,o=this.offset();return a.m=i.slice(),a.translate(o.x,o.y),a.getTranslation()}setAbsolutePosition(t){let{x:e,y:n,...r}=this._clearTransform();this.attrs.x=e,this.attrs.y=n,this._clearCache(b);let i=this._getAbsoluteTransform().copy();return i.invert(),i.translate(t.x,t.y),t={x:this.attrs.x+i.getTranslation().x,y:this.attrs.y+i.getTranslation().y},this._setTransform(r),this.setPosition({x:t.x,y:t.y}),this._clearCache(b),this._clearSelfAndDescendantCache(d),this}_setTransform(t){let e;for(e in t)this.attrs[e]=t[e]}_clearTransform(){let t={x:this.x(),y:this.y(),rotation:this.rotation(),scaleX:this.scaleX(),scaleY:this.scaleY(),offsetX:this.offsetX(),offsetY:this.offsetY(),skewX:this.skewX(),skewY:this.skewY()};return this.attrs.x=0,this.attrs.y=0,this.attrs.rotation=0,this.attrs.scaleX=1,this.attrs.scaleY=1,this.attrs.offsetX=0,this.attrs.offsetY=0,this.attrs.skewX=0,this.attrs.skewY=0,t}move(t){let e=t.x,n=t.y,r=this.x(),i=this.y();return void 0!==e&&(r+=e),void 0!==n&&(i+=n),this.setPosition({x:r,y:i}),this}_eachAncestorReverse(t,e){let n=[],r=this.getParent(),i,a;if(!e||e._id!==this._id){for(n.unshift(this);r&&(!e||r._id!==e._id);)n.unshift(r),r=r.parent;for(a=0,i=n.length;a<i;a++)t(n[a])}}rotate(t){return this.rotation(this.rotation()+t),this}moveToTop(){if(!this.parent)return r.Util.warn("Node has no parent. moveToTop function is ignored."),!1;let t=this.index;return t<this.parent.getChildren().length-1&&(this.parent.children.splice(t,1),this.parent.children.push(this),this.parent._setChildrenIndices(),!0)}moveUp(){if(!this.parent)return r.Util.warn("Node has no parent. moveUp function is ignored."),!1;let t=this.index;return t<this.parent.getChildren().length-1&&(this.parent.children.splice(t,1),this.parent.children.splice(t+1,0,this),this.parent._setChildrenIndices(),!0)}moveDown(){if(!this.parent)return r.Util.warn("Node has no parent. moveDown function is ignored."),!1;let t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0)}moveToBottom(){if(!this.parent)return r.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;let t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}setZIndex(t){if(!this.parent)return r.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&r.Util.warn("Unexpected value "+t+" for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to "+(this.parent.children.length-1)+".");let e=this.index;return this.parent.children.splice(e,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}getAbsoluteOpacity(){return this._getCache(h,this._getAbsoluteOpacity)}_getAbsoluteOpacity(){let t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}moveTo(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}toObject(){let t=this.getAttrs(),e,n,i,a,o={attrs:{},className:this.getClassName()};for(e in t)n=t[e],(!r.Util.isObject(n)||r.Util._isPlainObject(n)||r.Util._isArray(n))&&(i="function"==typeof this[e]&&this[e],delete t[e],a=i?i.c
1all(this):null,t[e]=n,a!==n&&(o.attrs[e]=n));return r.Util._prepareToStringify(o)}toJSON(){return JSON.stringify(this.toObject())}getParent(){return this.parent}findAncestors(t,e,n){let r=[];e&&this._isMatch(t)&&r.push(this);let i=this.parent;for(;i&&i!==n;)i._isMatch(t)&&r.push(i),i=i.parent;return r}isAncestorOf(t){return!1}findAncestor(t,e,n){return this.findAncestors(t,e,n)[0]}_isMatch(t){if(!t)return!1;if("function"==typeof t)return t(this);let e=t.replace(/ /g,"").split(","),n=e.length,i,a;for(i=0;i<n;i++)if(a=e[i],r.Util.isValidSelector(a)||(r.Util.warn('Selector "'+a+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),r.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),r.Util.warn("Konva is awesome, right?")),"#"===a.charAt(0)){if(this.id()===a.slice(1))return!0}else if("."===a.charAt(0)){if(this.hasName(a.slice(1)))return!0}else if(this.className===a||this.nodeType===a)return!0;return!1}getLayer(){let t=this.getParent();return t?t.getLayer():null}getStage(){return this._getCache(v,this._getStage)}_getStage(){let t=this.getParent();return t?t.getStage():null}fire(t,e={},n){return e.target=e.target||this,n?this._fireAndBubble(t,e):this._fire(t,e),this}getAbsoluteTransform(t){return t?this._getAbsoluteTransform(t):this._getCache(d,this._getAbsoluteTransform)}_getAbsoluteTransform(t){let e;if(t)return e=new r.Transform,this._eachAncestorReverse(function(t){let n=t.transformsEnabled();"all"===n?e.multiply(t.getTransform()):"position"===n&&e.translate(t.x()-t.offsetX(),t.y()-t.offsetY())},t),e;{e=this._cache.get(d)||new r.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();let t=this.transformsEnabled();if("all"===t)e.multiply(this.getTransform());else if("position"===t){let t=this.attrs.x||0,n=this.attrs.y||0,r=this.attrs.offsetX||0,i=this.attrs.offsetY||0;e.translate(t-r,n-i)}return e.dirty=!1,e}}getAbsoluteScale(t){let e=this;for(;e;)e._isUnderCache&&(t=e),e=e.getParent();let n=this.getAbsoluteTransform(t).decompose();return{x:n.scaleX,y:n.scaleY}}getAbsoluteRotation(){return this.getAbsoluteTransform().decompose().rotation}getTransform(){return this._getCache(b,this._getTransform)}_getTransform(){var t,e;let n=this._cache.get(b)||new r.Transform;n.reset();let i=this.x(),a=this.y(),s=o.Konva.getAngle(this.rotation()),l=null!==(t=this.attrs.scaleX)&&void 0!==t?t:1,h=null!==(e=this.attrs.scaleY)&&void 0!==e?e:1,u=this.attrs.skewX||0,d=this.attrs.skewY||0,c=this.attrs.offsetX||0,f=this.attrs.offsetY||0;return(0!==i||0!==a)&&n.translate(i,a),0!==s&&n.rotate(s),(0!==u||0!==d)&&n.skew(u,d),(1!==l||1!==h)&&n.scale(l,h),(0!==c||0!==f)&&n.translate(-1*c,-1*f),n.dirty=!1,n}clone(t){let e=r.Util.cloneObject(this.attrs),n,i,a,o,s;for(n in t)e[n]=t[n];let l=new this.constructor(e);for(n in this.eventListeners)for(o=0,a=(i=this.eventListeners[n]).length;o<a;o++)0>(s=i[o]).name.indexOf("konva")&&(l.eventListeners[n]||(l.eventListeners[n]=[]),l.eventListeners[n].push(s));return l}_toKonvaCanvas(t){t=t||{};let e=this.getClientRect(),n=this.getStage(),r=void 0!==t.x?t.x:Math.floor(e.x),i=void 0!==t.y?t.y:Math.floor(e.y),o=t.pixelRatio||1,s=new a.SceneCanvas({width:t.width||Math.ceil(e.width)||(n?n.width():0),height:t.height||Math.ceil(e.height)||(n?n.height():0),pixelRatio:o}),l=s.getContext(),h=new a.SceneCanvas({width:s.width/s.pixelRatio+Math.abs(r),height:s.height/s.pixelRatio+Math.abs(i),pixelRatio:s.pixelRatio});return!1===t.imageSmoothingEnabled&&(l._context.imageSmoothingEnabled=!1),l.save(),(r||i)&&l.translate(-1*r,-1*i),this.drawScene(s,void 0,h),l.restore(),s}toCanvas(t){return this._toKonvaCanvas(t)._canvas}toDataURL(t){let e=(t=t||{}).mimeType||null,n=t.quality||null,r=this._toKonvaCanvas(t).toDataURL(e,n);return t.callback&&t.callback(r),r}toImage(t){return new Promise((e,n)=>{try{let n=null==t?void 0:t.callback;n&&delete t.callback,r.Util._urlToImage(this.toDataURL(t),function(t){e(t),null==n||n(t)})}catch(t){n(t)}})}toBlob(t){return new Promise((e,n)=>{try{let n=null==t?void 0:t.callback;n&&delete t.callback,this.toCanvas(t).toBlob(t=>{e(t),null==n||n(t)},null==t?void 0:t.mimeType,null==t?void 0:t.quality)}catch(t){n(t)}})}setSize(t){return this.width(t.width),this.height(t.height),this}getSize(){return{width:this.width(),height:this.height()}}getClassName(){return this.className||this.nodeType}getType(){return this.nodeType}getDragDistance(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():o.Konva.dragDistance}_off(t,e,n){let r=this.eventListeners[t],i,a,o;for(i=0;i<r.length;
1i++)if(a=r[i].name,o=r[i].handler,("konva"!==a||"konva"===e)&&(!e||a===e)&&(!n||n===o)){if(r.splice(i,1),0===r.length){delete this.eventListeners[t];break}i--}}_fireChangeEvent(t,e,n){this._fire(t+"Change",{oldVal:e,newVal:n})}addName(t){if(!this.hasName(t)){let e=this.name();this.name(e?e+" "+t:t)}return this}hasName(t){if(!t)return!1;let e=this.name();return!!e&&-1!==(e||"").split(/\s/g).indexOf(t)}removeName(t){let e=(this.name()||"").split(/\s/g),n=e.indexOf(t);return -1!==n&&(e.splice(n,1),this.name(e.join(" "))),this}setAttr(t,e){let n=this["set"+r.Util._capitalize(t)];return r.Util._isFunction(n)?n.call(this,e):this._setAttr(t,e),this}_requestDraw(){if(o.Konva.autoDrawEnabled){let t=this.getLayer()||this.getStage();null==t||t.batchDraw()}}_setAttr(t,e){let n=this.attrs[t];(n!==e||r.Util.isObject(e))&&(null==e?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,n,e),this._requestDraw())}_setComponentAttr(t,e,n){let r;void 0!==n&&((r=this.attrs[t])||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=n,this._fireChangeEvent(t,r,n))}_fireAndBubble(t,e,n){if(e&&this.nodeType===y&&(e.target=this),!((t===p||t===m)&&(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||"Stage"===this.nodeType&&!n))){this._fire(t,e);let r=(t===p||t===m)&&n&&n.isAncestorOf&&n.isAncestorOf(this)&&!n.isAncestorOf(this.parent);(e&&!e.cancelBubble||!e)&&this.parent&&this.parent.isListening()&&!r&&(n&&n.parent?this._fireAndBubble.call(this.parent,t,e,n):this._fireAndBubble.call(this.parent,t,e))}}_getProtoListeners(t){var e,n,r;let i=null!==(e=this._cache.get(u))&&void 0!==e?e:{},a=null==i?void 0:i[t];if(void 0===a){a=[];let e=Object.getPrototypeOf(this);for(;e;){let i=null!==(r=null===(n=e.eventListeners)||void 0===n?void 0:n[t])&&void 0!==r?r:[];a.push(...i),e=Object.getPrototypeOf(e)}i[t]=a,this._cache.set(u,i)}return a}_fire(t,e){(e=e||{}).currentTarget=this,e.type=t;let n=this._getProtoListeners(t);if(n)for(var r=0;r<n.length;r++)n[r].handler.call(this,e);let i=this.eventListeners[t];if(i)for(var r=0;r<i.length;r++)i[r].handler.call(this,e)}draw(){return this.drawScene(),this.drawHit(),this}_createDragElement(t){let e=t?t.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition();if(!n)return;let i=n._getPointerById(e)||n._changedPointerPositions[0]||r;s.DD._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-r.x,y:i.y-r.y},dragStatus:"ready",pointerId:e})}startDrag(t,e=!0){s.DD._dragElements.has(this._id)||this._createDragElement(t),s.DD._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}_setDragPosition(t,e){let n=this.getStage()._getPointerById(e.pointerId);if(!n)return;let i={x:n.x-e.offset.x,y:n.y-e.offset.y},a=this.dragBoundFunc();if(void 0!==a){let e=a.call(this,i,t);e?i=e:r.Util.warn("dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.")}this._lastPos&&this._lastPos.x===i.x&&this._lastPos.y===i.y||(this.setAbsolutePosition(i),this._requestDraw()),this._lastPos=i}stopDrag(t){let e=s.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),s.DD._endDragBefore(t),s.DD._endDragAfter(t)}setDraggable(t){this._setAttr("draggable",t),this._dragChange()}isDragging(){let t=s.DD._dragElements.get(this._id);return!!t&&"dragging"===t.dragStatus}_listenDrag(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",function(t){if(!(!(void 0!==t.evt.button)||o.Konva.dragButtons.indexOf(t.evt.button)>=0)||this.isDragging())return;let e=!1;s.DD._dragElements.forEach(t=>{this.isAncestorOf(t.node)&&(e=!0)}),e||this._createDragElement(t)})}_dragChange(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;let t=s.DD._dragElements.get(this._id),e=t&&"dragging"===t.dragStatus,n=t&&"ready"===t.dragStatus;
1e?this.stopDrag():n&&s.DD._dragElements.delete(this._id)}}_dragCleanup(){this.off("mousedown.konva"),this.off("touchstart.konva")}isClientRectOnScreen(t={x:0,y:0}){let e=this.getStage();if(!e)return!1;let n={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return r.Util.haveIntersection(n,this.getClientRect())}static create(t,e){return r.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}static _createNode(t,e){let n=x.prototype.getClassName.call(t),i=t.children,a,s,l;if(e&&(t.attrs.container=e),o.Konva[n]||(r.Util.warn('Can not find a node with class name "'+n+'". Fallback to "Shape".'),n="Shape"),a=new o.Konva[n](t.attrs),i)for(l=0,s=i.length;l<s;l++)a.add(x._createNode(i[l]));return a}}e.Node=x,x.prototype.nodeType="Node",x.prototype._attrsAffectingSize=[],x.prototype.eventListeners={},x.prototype.on.call(x.prototype,"xChange.konva yChange.konva scaleXChange.konva scaleYChange.konva skewXChange.konva skewYChange.konva rotationChange.konva offsetXChange.konva offsetYChange.konva transformsEnabledChange.konva",function(){if(this._batchingTransformChange){this._needClearTransformCache=!0;return}this._clearCache(b),this._clearSelfAndDescendantCache(d)}),x.prototype.on.call(x.prototype,"visibleChange.konva",function(){this._clearSelfAndDescendantCache(_)}),x.prototype.on.call(x.prototype,"listeningChange.konva",function(){this._clearSelfAndDescendantCache(g)}),x.prototype.on.call(x.prototype,"opacityChange.konva",function(){this._clearSelfAndDescendantCache(h)});let w=i.Factory.addGetterSetter;w(x,"zIndex"),w(x,"absolutePosition"),w(x,"position"),w(x,"x",0,(0,l.getNumberValidator)()),w(x,"y",0,(0,l.getNumberValidator)()),w(x,"globalCompositeOperation","source-over",(0,l.getStringValidator)()),w(x,"opacity",1,(0,l.getNumberValidator)()),w(x,"name","",(0,l.getStringValidator)()),w(x,"id","",(0,l.getStringValidator)()),w(x,"rotation",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(x,"scale",["x","y"]),w(x,"scaleX",1,(0,l.getNumberValidator)()),w(x,"scaleY",1,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(x,"skew",["x","y"]),w(x,"skewX",0,(0,l.getNumberValidator)()),w(x,"skewY",0,(0,l.getNumberValidator)()),i.Factory.addComponentsGetterSetter(x,"offset",["x","y"]),w(x,"offsetX",0,(0,l.getNumberValidator)()),w(x,"offsetY",0,(0,l.getNumberValidator)()),w(x,"dragDistance",void 0,(0,l.getNumberValidator)()),w(x,"width",0,(0,l.getNumberValidator)()),w(x,"height",0,(0,l.getNumberValidator)()),w(x,"listening",!0,(0,l.getBooleanValidator)()),w(x,"preventDefault",!0,(0,l.getBooleanValidator)()),w(x,"filters",void 0,function(t){return this._filterUpToDate=!1,t}),w(x,"visible",!0,(0,l.getBooleanValidator)()),w(x,"transformsEnabled","all",(0,l.getStringValidator)()),w(x,"size"),w(x,"dragBoundFunc"),w(x,"draggable",!1,(0,l.getBooleanValidator)()),i.Factory.backCompat(x,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"})},98479:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCapturedShape=function(t){return i.get(t)},e.createEvent=o,e.hasPointerCapture=function(t,e){return i.get(t)===e},e.setPointerCapture=function(t,e){s(t),e.getStage()&&(i.set(t,e),a&&e._fire("gotpointercapture",o(new PointerEvent("gotpointercapture"))))},e.releaseCapture=s;let r=n(54417),i=new Map,a=void 0!==r.Konva._global.PointerEvent;function o(t){return{evt:t,pointerId:t.pointerId}}function s(t,e){let n=i.get(t);if(!n)return;let r=n.getStage();r&&r.content,i.delete(t),a&&n._fire("lostpointercapture",o(new PointerEvent("lostpointercapture")))}},97955:function(t,e,n){"use strict";let r;Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;let i=n(54417),a=n(68588),o=n(1455),s=n(77939),l=n(53774),h=n(54417),u=n(98479),d="hasShadow",c="shadowRGBA",f="patternImage",g="linearGradient",p="radialGradient";function m(){return r||(r=a.Util.createCanvasElement().getContext("2d"))}e.shapes={};class y extends s.Node{constructor(t){let n;for(super(t);!(n=a.Util.getRandomColor())||(n in e.shapes););this.colorKey=n,e.shapes[n]=this}getContext(){return a.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}getCanvas(){return a.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}getSceneFunc(){return this.attrs.sceneFunc||this._sceneFunc}getHitFunc(){return this.attrs.hitFunc||this._hitFunc}hasShadow(){return this._getCache(d,this._hasShadow)}
1_hasShadow(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}_getFillPattern(){return this._getCache(f,this.__getFillPattern)}__getFillPattern(){if(this.fillPatternImage()){let t=m().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(t&&t.setTransform){let e=new a.Transform;e.translate(this.fillPatternX(),this.fillPatternY()),e.rotate(i.Konva.getAngle(this.fillPatternRotation())),e.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),e.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());let n=e.getMatrix(),r="undefined"==typeof DOMMatrix?{a:n[0],b:n[1],c:n[2],d:n[3],e:n[4],f:n[5]}:new DOMMatrix(n);t.setTransform(r)}return t}}_getLinearGradient(){return this._getCache(g,this.__getLinearGradient)}__getLinearGradient(){let t=this.fillLinearGradientColorStops();if(t){let e=m(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=e.createLinearGradient(n.x,n.y,r.x,r.y);for(let e=0;e<t.length;e+=2)i.addColorStop(t[e],t[e+1]);return i}}_getRadialGradient(){return this._getCache(p,this.__getRadialGradient)}__getRadialGradient(){let t=this.fillRadialGradientColorStops();if(t){let e=m(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),i=e.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius());for(let e=0;e<t.length;e+=2)i.addColorStop(t[e],t[e+1]);return i}}getShadowRGBA(){return this._getCache(c,this._getShadowRGBA)}_getShadowRGBA(){if(!this.hasShadow())return;let t=a.Util.colorToRGBA(this.shadowColor());if(t)return"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")"}hasFill(){return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],()=>this.fillEnabled()&&!!(this.fill()||this.fillPatternImage()||this.fillLinearGradientColorStops()||this.fillRadialGradientColorStops()))}hasStroke(){return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],()=>this.strokeEnabled()&&this.strokeWidth()&&!!(this.stroke()||this.strokeLinearGradientColorStops()))}hasHitStroke(){let t=this.hitStrokeWidth();return"auto"===t?this.hasStroke():this.strokeEnabled()&&!!t}intersects(t){let e=this.getStage();if(!e)return!1;let n=e.bufferHitCanvas;return n.getContext().clear(),this.drawHit(n,void 0,!0),n.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}destroy(){return s.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}_useBufferCanvas(t){var e;if(!(null===(e=this.attrs.perfectDrawEnabled)||void 0===e||e))return!1;let n=t||this.hasFill(),r=this.hasStroke(),i=1!==this.getAbsoluteOpacity();if(n&&r&&i)return!0;let a=this.hasShadow(),o=this.shadowForStrokeEnabled();return!!n&&!!r&&!!a&&!!o}setStrokeHitEnabled(t){a.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}getStrokeHitEnabled(){return 0!==this.hitStrokeWidth()}getSelfRect(){let t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}getClientRect(t={}){let e=!1,n=this.getParent();for(;n;){if(n.isCached()){e=!0;break}n=n.getParent()}let r=t.skipTransform,i=t.relativeTo||e&&this.getStage()||void 0,a=this.getSelfRect(),o=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,s=a.width+o,l=a.height+o,h=!t.skipShadow&&this.hasShadow(),u=h?this.shadowOffsetX():0,d=h?this.shadowOffsetY():0,c=h&&this.shadowBlur()||0,f={width:s+Math.abs(u)+2*c,height:l+Math.abs(d)+2*c,x:-(o/2+c)+Math.min(u,0)+a.x,y:-(o/2+c)+Math.min(d,0)+a.y};
1return r?f:this._transformedRect(f,i)}drawScene(t,e,n){let r=this.getLayer(),i=t||r.getCanvas(),a=i.getContext(),o=this._getCanvasCache(),s=this.getSceneFunc(),l=this.hasShadow(),h,u,d=i.isCache,c=e===this;if(!this.isVisible()&&!c)return this;if(o){a.save();let t=this.getAbsoluteTransform(e).getMatrix();return a.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),this._useBufferCanvas()&&!d){h=this.getStage();let t=n||h.bufferCanvas;(u=t.getContext()).clear(),u.save(),u._applyLineJoin(this);var f=this.getAbsoluteTransform(e).getMatrix();u.transform(f[0],f[1],f[2],f[3],f[4],f[5]),s.call(this,u,this),u.restore();let r=t.pixelRatio;l&&a._applyShadow(this),a._applyOpacity(this),a._applyGlobalCompositeOperation(this),a.drawImage(t._canvas,0,0,t.width/r,t.height/r)}else{if(a._applyLineJoin(this),!c){var f=this.getAbsoluteTransform(e).getMatrix();a.transform(f[0],f[1],f[2],f[3],f[4],f[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)}l&&a._applyShadow(this),s.call(this,a,this)}
1return a.restore(),this}drawHit(t,e,n=!1){if(!this.shouldDrawHit(e,n))return this;let r=this.getLayer(),i=t||r.hitCanvas,o=i&&i.getContext(),s=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),h=l&&l.hit;if(this.colorKey||a.Util.warn("Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()"),h){o.save();let t=this.getAbsoluteTransform(e).getMatrix();return o.transform(t[0],t[1],t[2],t[3],t[4],t[5]),this._drawCachedHitCanvas(o),o.restore(),this}if(!s)return this;if(o.save(),o._applyLineJoin(this),this!==e){let t=this.getAbsoluteTransform(e).getMatrix();o.transform(t[0],t[1],t[2],t[3],t[4],t[5])}return s.call(this,o,this),o.restore(),this}drawHitFromCache(t=0){let e=this._getCanvasCache(),n=this._getCachedSceneCanvas(),r=e.hit,i=r.getContext(),o=r.getWidth(),s=r.getHeight();i.clear(),i.drawImage(n._canvas,0,0,o,s);try{let e=i.getImageData(0,0,o,s),n=e.data,r=n.length,l=a.Util._hexToRgb(this.colorKey);for(let e=0;e<r;e+=4)n[e+3]>t?(n[e]=l.r,n[e+1]=l.g,n[e+2]=l.b,n[e+3]=255):n[e+3]=0;i.putImageData(e,0,0)}catch(t){a.Util.error("Unable to draw hit graph from cached scene canvas. "+t.message)}return this}hasPointerCapture(t){return u.hasPointerCapture(t,this)}setPointerCapture(t){u.setPointerCapture(t,this)}releaseCapture(t){u.releaseCapture(t,this)}}e.Shape=y,y.prototype._fillFunc=function(t){let e=this.attrs.fillRule;e?t.fill(e):t.fill()},y.prototype._strokeFunc=function(t){t.stroke()},y.prototype._fillFuncHit=function(t){let e=this.attrs.fillRule;e?t.fill(e):t.fill()},y.prototype._strokeFuncHit=function(t){t.stroke()},y.prototype._centroid=!1,y.prototype.nodeType="Shape",(0,h._registerNode)(y),y.prototype.eventListeners={},y.prototype.on.call(y.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(d)}),y.prototype.on.call(y.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",function(){this._clearCache(c)}),y.prototype.on.call(y.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",function(){this._clearCache(f)}),y.prototype.on.call(y.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",function(){this._clearCache(g)}),y.prototype.on.call(y.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",function(){this._clearCache(p)}),o.Factory.addGetterSetter(y,"stroke",void 0,(0,l.getStringOrGradientValidator)()),o.Factory.addGetterSetter(y,"strokeWidth",2,(0,l.getNumberValidator)()),o.Factory.addGetterSetter(y,"fillAfterStrokeEnabled",!1),o.Factory.addGetterSetter(y,"hitStrokeWidth","auto",(0,l.getNumberOrAutoValidator)()),o.Factory.addGetterSetter(y,"strokeHitEnabled",!0,(0,l.getBooleanValidator)()),o.Factory.addGetterSetter(y,"perfectDrawEnabled",!0,(0,l.getBooleanValidator)()),o.Factory.addGetterSetter(y,"shadowForStrokeEnabled",!0,(0,l.getBooleanValidator)()),o.Factory.addGetterSetter(y,"lineJoin"),o.Factory.addGetterSetter(y,"lineCap"),o.Factory.addGetterSetter(y,"sceneFunc"),o.Factory.addGetterSetter(y,"hitFunc"),o.Factory.addGetterSetter(y,"dash"),o.Factory.addGetterSetter(y,"dashOffset",0,(0,l.getNumberValidator)()),o.Factory.addGetterSetter(y,"shadowColor",void 0,(0,l.getStringValidator)()),o.Factory.addGetterSetter(y,"shadowBlur",0,(0,l.getNumberValidator)()),o.Factory.addGetterSetter(y,"shadowOpacity",1,(0,l.getNumberValidator)()),o.Factory.addComponentsGetterSetter(y,"shadowOffset",["x","y"]),o.Factory.addGetterSetter(y,"shadowOffsetX",0,(0,l.getNumberValidator)()),o.Factory.addGetterSetter(y,"shadowOffsetY",0,(0,l.getNumberValidator)()),o.Factory.addGetterSetter(y,"fillPatternImage"),o.Factory.addGetterSetter(y,"fill",void 0,(0,l.getStringOrGradientValidator)()),o.Factory.addGetterSetter(y,"fillPatternX",0,(0,l.getNumberValidator)()),o.Factory.addGetterSetter(y,"fillPatternY",0,(0,l.getNumberValidator)()),o.Factory.addGetterSetter(y,"fillLinearGradientColorStops"),o.Factory.addGetterSetter(y,"strokeLinearGradientColorStops"),o.Factory.addGetterSetter(y,"fillRadialGradientStartRadius",0),o.Factory.addGetterSetter(y,"fillRadialGradientEndRadius",0),o.Factory.addGetterSetter(y,"fillRadialGradientColorStops"),o.Factory.addGetterSetter(y,"fillPatternRepeat","repeat"),o.Factory.addGetterSetter(y,"fillEnabled",!0),o.Factory.addGetterSetter(y,"strokeEnabled",!0),o.Factory.addGetterSetter(y,"shadowEnabled",!0),o.Factory.addGetterSetter(y,"dashEnabled",!0),o.Factory.addGetterSetter(y,"strokeScaleEnabled",!0),o.Factory.addGetterSetter(y,"fillPriority","color"),o.Factory.addComponentsGetterSetter(y,"fillPatternOffset",["x","y"]),o.Factory.addGetterSetter(y,"fillPatternOffsetX",0,(0,l.getNumberValidator)()),o.Factory.addGetterSetter(y,"fillPatternOffsetY",0,(0,l.getNumberValidator)()),o.Factory.addComponentsGetterSetter(y,"fillPatternScale",["x","y"]),o.Factory.addGetterSetter(y,"fillPatternScaleX",1,(0,l.getNumberValidator)()),o.Factory.addGetterSetter(y,"fillPatternScaleY",1,(0,l.getNumberValidator)()),o.Factory.addComponentsGetterSetter(y,"fillLinearGradientStartPoint",["x","y"]),o.Factory.addComponentsGetterSetter(y,"strokeLinearGradientStartPoint",["x","y"]),o.Factory.addGetterSetter(y,"fillLinearGradientStartPointX",0),o.Factory.addGetterSetter(y,"strokeLinearGradientStartPointX",0),o.Factory.addGetterSetter(y,"fillLinearGradientStartPointY",0),o.Factory.addGetterSetter(y,"strokeLinearGradientStartPointY",0),o.Factory.addComponentsGetterSetter(y,"fillLinearGradientEndPoint",["x","y"]),o.Factory.addComponentsGetterSetter(y,"strokeLinearGradientEndPoint",["x","y"]),o.Factory.addGetterSetter(y,"fillLinearGradientEndPointX",0),o.Factory.addGetterSetter(y,"strokeLinearGradientEndPointX",0),o.Factory.addGetterSetter(y,"fillLinearGradientEndPointY",0),o.Factory.addGetterSetter(y,"strokeLinearGradientEndPointY",0),o.Factory.addComponentsGetterSetter(y,"fillRadialGradientStartPoint",["x","y"]),o.Factory.addGetterSetter(y,"fillRadialGradientStartPointX",0),o.Factory.addGetterSetter(y,"fillRadialGradientStartPointY",0),o.Factory.addComponentsGetterSetter(y,"fillRadialGradientEndPoint",["x","y"]),o.Factory.addGetterSetter(y,"fillRadialGradientEndPointX",0),o.Factory.addGetterSetter(y,"fillRadialGradientEndPointY",0),o.Factory.addGetterSetter(y,"fillPatternRotation",0),o.Factory.addGetterSetter(y,"fillRule",void 0,(0,l.getStringValidator)()),o.Factory.backCompat(y,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})},28342:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;let r=n(68588),i=n(1455),a=n(28783),o=n(54417),s=n(34842),l=n(70210),h=n(54417),u=n(98479),d="mouseleave",c="mouseover",f="mouseenter",g="mousemove",p="mousedown",m="mouseup",y="pointermove",v="pointerdown",b="pointerup",_="pointercancel",S="pointerout",x="pointerleave",w="pointerover",C="pointerenter",k="contextmenu",P="touchstart",T="touchend",E="touchmove",F="touchcancel",M="wheel",N=[[f,"_pointerenter"],[p,"_pointerdown"],[g,"_pointermove"],[m,"_pointerup"],[d,"_pointerleave"],[P,"_pointerdown"],[E,"_pointermove"],[T,"_pointerup"],[F,"_pointercancel"],[c,"_pointerover"],[M,"_wheel"],[k,"_contextmenu"],[v,"_pointerdown"],[y,"_pointermove"],[b,"_pointerup"],[_,"_pointercancel"],["lostpointercapture","_lostpointercapture"]],A={mouse:{[S]:"mouseout",[x]:d,[w]:c,[C]:f,[y]:g,[v]:p,[b]:m,[_]:"mousecancel",pointerclick:"click",pointerdblclick:"dblclick"},touch:{[S]:"touchout",[x]:"touchleave",[w]:"touchover",[C]:"touchenter",[y]:E,[v]:P,[b]:T,[_]:F,pointerclick:"tap",pointerdblclick:"dbltap"},pointer:{[S]:S,[x]:x,[w]:w,[C]:C,[y]:y,[v]:v,[b]:b,[_]:_,pointerclick:"pointerclick",pointerdblclick:"pointerdblclick"}},R=t=>t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse",D=t=>{let e=R(t);return"pointer"===e?o.Konva.pointerEventsEnabled&&A.pointer:"touch"===e?A.touch:"mouse"===e?A.mouse:void 0};function L(t={}){return(t.clipFunc||t.clipWidth||t.clipHeight)&&r.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}e.stages=[];
1class I extends a.Container{constructor(t){super(L(t)),this._pointerPositions=[],this._changedPointerPositions=[],this._buildDOM(),this._bindContentEvents(),e.stages.push(this),this.on("widthChange.konva heightChange.konva",this._resizeDOM),this.on("visibleChange.konva",this._checkVisibility),this.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",()=>{L(this.attrs)}),this._checkVisibility()}_validateAdd(t){let e="Layer"===t.getType(),n="FastLayer"===t.getType();e||n||r.Util.throw("You may only add layers to the stage.")}_checkVisibility(){if(!this.content)return;let t=this.visible()?"":"none";this.content.style.display=t}setContainer(t){if("string"==typeof t){if("."===t.charAt(0)){let e=t.slice(1);t=document.getElementsByClassName(e)[0]}else{var e;e="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(e)}if(!t)throw"Can not find container in document with id "+e}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}shouldDrawHit(){return!0}clear(){let t=this.children,e=t.length;for(let n=0;n<e;n++)t[n].clear();return this}clone(t){return t||(t={}),t.container="undefined"!=typeof document&&document.createElement("div"),a.Container.prototype.clone.call(this,t)}destroy(){super.destroy();let t=this.content;t&&r.Util._isInDocument(t)&&this.container().removeChild(t);let n=e.stages.indexOf(this);return n>-1&&e.stages.splice(n,1),r.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}getPointerPosition(){let t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(r.Util.warn("Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);"),null)}_getPointerById(t){return this._pointerPositions.find(e=>e.id===t)}getPointersPositions(){return this._pointerPositions}getStage(){return this}getContent(){return this.content}_toKonvaCanvas(t){(t=t||{}).x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();let e=new s.SceneCanvas({width:t.width,height:t.height,pixelRatio:t.pixelRatio||1}),n=e.getContext()._context,r=this.children;return(t.x||t.y)&&n.translate(-1*t.x,-1*t.y),r.forEach(function(e){if(!e.isVisible())return;let r=e._toKonvaCanvas(t);n.drawImage(r._canvas,t.x,t.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}),e}getIntersection(t){if(!t)return null;let e=this.children,n=e.length-1;for(let r=n;r>=0;r--){let n=e[r].getIntersection(t);if(n)return n}return null}_resizeDOM(){let t=this.width(),e=this.height();this.content&&(this.content.style.width=t+"px",this.content.style.height=e+"px"),this.bufferCanvas.setSize(t,e),this.bufferHitCanvas.setSize(t,e),this.children.forEach(n=>{n.setSize({width:t,height:e}),n.draw()})}add(t,...e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}super.add(t);let n=this.children.length;return n>5&&r.Util.warn("The stage has "+n+" layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group."),t.setSize({width:this.width(),height:this.height()}),t.draw(),o.Konva.isBrowser&&this.content.appendChild(t.canvas._canvas),this}getParent(){return null}getLayer(){return null}hasPointerCapture(t){return u.hasPointerCapture(t,this)}setPointerCapture(t){u.setPointerCapture(t,this)}releaseCapture(t){u.releaseCapture(t,this)}getLayers(){return this.children}_bindContentEvents(){o.Konva.isBrowser&&N.forEach(([t,e])=>{this.content.addEventListener(t,t=>{this[e](t)},{passive:!1})})}_pointerenter(t){this.setPointersPositions(t);let e=D(t.type);e&&this._fire(e.pointerenter,{evt:t,target:this,currentTarget:this})}_pointerover(t){this.setPointersPositions(t);let e=D(t.type);e&&this._fire(e.pointerover,{evt:t,target:this,currentTarget:this})}_getTargetShape(t){let e=this[t+"targetShape"];return e&&!e.getStage()&&(e=null),e}_pointerleave(t){let e=D(t.type),n=R(t.type);if(!e)return;this.setPointersPositions(t);let r=this._getTargetShape(n),i=!(o.Konva.isDragging()||o.Konva.isTransforming())||o.Konva.hitOnDragEnabled;r&&i?(r._fireAndBubble(e.pointerout,{evt:t}),r._fireAndBubble(e.pointerleave,{evt:t}),this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this[n+"targetShape"]=null):i&&(this._fire(e.pointerleave,{evt:t,target:this,currentTarget:this}),this._fire(e.pointerout,{evt:t,target:this,currentTarget:this})),this.pointerPos=null,this._pointerPositions=[]}_pointerdown(t){let e=D(t.type),n=R(t.type);if(!e)return;this.setPointersPositions(t);let r=!1;this._changedPointerPositions.forEach(i=>
1{let a=this.getIntersection(i);if(l.DD.justDragged=!1,o.Konva["_"+n+"ListenClick"]=!0,!a||!a.isListening()){this[n+"ClickStartShape"]=void 0;return}o.Konva.capturePointerEventsEnabled&&a.setPointerCapture(i.id),this[n+"ClickStartShape"]=a,a._fireAndBubble(e.pointerdown,{evt:t,pointerId:i.id}),r=!0;let s=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&s&&t.preventDefault()}),r||this._fire(e.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}_pointermove(t){let e=D(t.type),n=R(t.type);if(!e||(o.Konva.isDragging()&&l.DD.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t),!(!(o.Konva.isDragging()||o.Konva.isTransforming())||o.Konva.hitOnDragEnabled)))return;let r={},i=!1,a=this._getTargetShape(n);this._changedPointerPositions.forEach(o=>{let s=u.getCapturedShape(o.id)||this.getIntersection(o),l=o.id,h={evt:t,pointerId:l},d=a!==s;if(d&&a&&(a._fireAndBubble(e.pointerout,{...h},s),a._fireAndBubble(e.pointerleave,{...h},s)),s){if(r[s._id])return;r[s._id]=!0}s&&s.isListening()?(i=!0,d&&(s._fireAndBubble(e.pointerover,{...h},a),s._fireAndBubble(e.pointerenter,{...h},a),this[n+"targetShape"]=s),s._fireAndBubble(e.pointermove,{...h})):a&&(this._fire(e.pointerover,{evt:t,target:this,currentTarget:this,pointerId:l}),this[n+"targetShape"]=null)}),i||this._fire(e.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}_pointerup(t){let e=D(t.type),n=R(t.type);if(!e)return;this.setPointersPositions(t);let r=this[n+"ClickStartShape"],i=this[n+"ClickEndShape"],a={},s=!1;this._changedPointerPositions.forEach(h=>{let d=u.getCapturedShape(h.id)||this.getIntersection(h);if(d){if(d.releaseCapture(h.id),a[d._id])return;a[d._id]=!0}let c=h.id,f={evt:t,pointerId:c},g=!1;o.Konva["_"+n+"InDblClickWindow"]?(g=!0,clearTimeout(this[n+"DblTimeout"])):l.DD.justDragged||(o.Konva["_"+n+"InDblClickWindow"]=!0,clearTimeout(this[n+"DblTimeout"])),this[n+"DblTimeout"]=setTimeout(function(){o.Konva["_"+n+"InDblClickWindow"]=!1},o.Konva.dblClickWindow),d&&d.isListening()?(s=!0,this[n+"ClickEndShape"]=d,d._fireAndBubble(e.pointerup,{...f}),o.Konva["_"+n+"ListenClick"]&&r&&r===d&&(d._fireAndBubble(e.pointerclick,{...f}),g&&i&&i===d&&d._fireAndBubble(e.pointerdblclick,{...f}))):(this[n+"ClickEndShape"]=null,o.Konva["_"+n+"ListenClick"]&&this._fire(e.pointerclick,{evt:t,target:this,currentTarget:this,pointerId:c}),g&&this._fire(e.pointerdblclick,{evt:t,target:this,currentTarget:this,pointerId:c}))}),s||this._fire(e.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),o.Konva["_"+n+"ListenClick"]=!1,t.cancelable&&"touch"!==n&&"pointer"!==n&&t.preventDefault()}_contextmenu(t){this.setPointersPositions(t);let e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(k,{evt:t}):this._fire(k,{evt:t,target:this,currentTarget:this})}_wheel(t){this.setPointersPositions(t);let e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(M,{evt:t}):this._fire(M,{evt:t,target:this,currentTarget:this})}_pointercancel(t){this.setPointersPositions(t);let e=u.getCapturedShape(t.pointerId)||this.getIntersection(this.getPointerPosition());e&&e._fireAndBubble(b,u.createEvent(t)),u.releaseCapture(t.pointerId)}_lostpointercapture(t){u.releaseCapture(t.pointerId)}setPointersPositions(t){let e=this._getContentPosition(),n=null,i=null;void 0!==(t=t||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,t=>{this._pointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})}),Array.prototype.forEach.call(t.changedTouches||t.touches,t=>{this._changedPointerPositions.push({id:t.identifier,x:(t.clientX-e.left)/e.scaleX,y:(t.clientY-e.top)/e.scaleY})})):(n=(t.clientX-e.left)/e.scaleX,i=(t.clientY-e.top)/e.scaleY,this.pointerPos={x:n,y:i},this._pointerPositions=[{x:n,y:i,id:r.Util._getFirstPointerId(t)}],this._changedPointerPositions=[{x:n,y:i,id:r.Util._getFirstPointerId(t)}])}_setPointerPosition(t){r.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}_getContentPosition(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};let t=this.content.getBoundingClientRect();
1return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}_buildDOM(){if(this.bufferCanvas=new s.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new s.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),!o.Konva.isBrowser)return;let t=this.container();if(!t)throw"Stage has no container. A container is required.";t.innerHTML="",this.content=document.createElement("div"),this.content.style.position="relative",this.content.style.userSelect="none",this.content.className="konvajs-content",this.content.setAttribute("role","presentation"),t.appendChild(this.content),this._resizeDOM()}cache(){return r.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}clearCache(){return this}batchDraw(){return this.getChildren().forEach(function(t){t.batchDraw()}),this}}e.Stage=I,I.prototype.nodeType="Stage",(0,h._registerNode)(I),i.Factory.addGetterSetter(I,"container"),o.Konva.isBrowser&&document.addEventListener("visibilitychange",()=>
1{e.stages.forEach(t=>{t.batchDraw()})})},48017:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;let r=n(68588),i=n(16745),a=n(77939),o=n(54417),s={node:1,duration:1,easing:1,onFinish:1,yoyo:1},l=["fill","stroke","shadowColor"],h=0;class u{constructor(t,e,n,r,i,a,o){this.prop=t,this.propFunc=e,this.begin=r,this._pos=r,this.duration=a,this._change=0,this.prevPos=0,this.yoyo=o,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=n,this._change=i-this.begin,this.pause()}fire(t){let e=this[t];e&&e()}setTime(t){t>this.duration?this.yoyo?(this._time=this.duration,this.reverse()):this.finish():t<0?this.yoyo?(this._time=0,this.play()):this.reset():(this._time=t,this.update())}getTime(){return this._time}setPosition(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}getPosition(t){return void 0===t&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}play(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}reverse(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}seek(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}reset(){this.pause(),this._time=0,this.update(),this.fire("onReset")}finish(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}update(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}onEnterFrame(){let t=this.getTimer()-this._startTime;2===this.state?this.setTime(t):3===this.state&&this.setTime(this.duration-t)}pause(){this.state=1,this.fire("onPause")}getTimer(){return new Date().getTime()}}class d{constructor(t){let n,a;let l=this,c=t.node,f=c._id,g=t.easing||e.Easings.Linear,p=!!t.yoyo;n=void 0===t.duration?.3:0===t.duration?.001:t.duration,this.node=c,this._id=h++;let m=c.getLayer()||(c instanceof o.Konva.Stage?c.getLayers():null);for(a in m||r.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new i.Animation(function(){l.tween.onEnterFrame()},m),this.tween=new u(a,function(t){l._tweenFunc(t)},g,0,1,1e3*n,p),this._addListeners(),d.attrs[f]||(d.attrs[f]={}),d.attrs[f][this._id]||(d.attrs[f][this._id]={}),d.tweens[f]||(d.tweens[f]={}),t)void 0===s[a]&&this._addAttr(a,t[a]);this.reset(),this.onFinish=t.onFinish,this.onReset=t.onReset,this.onUpdate=t.onUpdate}_addAttr(t,e){let n,i,a,o,s;let h=this.node,u=h._id,c=d.tweens[u][t];c&&delete d.attrs[u][c][t];let f=h.getAttr(t);if(r.Util._isArray(e)){if(n=[],i=Math.max(e.length,f.length),"points"===t&&e.length!==f.length&&(e.length>f.length?(o=f,f=r.Util._prepareArrayForTween(f,e,h.closed())):(a=e,e=r.Util._prepareArrayForTween(e,f,h.closed()))),0===t.indexOf("fill"))for(let t=0;t<i;t++)if(t%2==0)n.push(e[t]-f[t]);else{let i=r.Util.colorToRGBA(f[t]);s=r.Util.colorToRGBA(e[t]),f[t]=i,n.push({r:s.r-i.r,g:s.g-i.g,b:s.b-i.b,a:s.a-i.a})}else for(let t=0;t<i;t++)n.push(e[t]-f[t])}else -1!==l.indexOf(t)?(f=r.Util.colorToRGBA(f),n={r:(s=r.Util.colorToRGBA(e)).r-f.r,g:s.g-f.g,b:s.b-f.b,a:s.a-f.a}):n=e-f;d.attrs[u][this._id][t]={start:f,diff:n,end:e,trueEnd:a,trueStart:o},d.tweens[u][t]=this._id}_tweenFunc(t){let e,n,i,a,o,s,h,u;let c=this.node,f=d.attrs[c._id][this._id];for(e in f){if(i=(n=f[e]).start,a=n.diff,u=n.end,r.Util._isArray(i)){if(o=[],h=Math.max(i.length,u.length),0===e.indexOf("fill"))for(s=0;s<h;s++)s%2==0?o.push((i[s]||0)+a[s]*t):o.push("rgba("+Math.round(i[s].r+a[s].r*t)+","+Math.round(i[s].g+a[s].g*t)+","+Math.round(i[s].b+a[s].b*t)+","+(i[s].a+a[s].a*t)+")");else for(s=0;s<h;s++)o.push((i[s]||0)+a[s]*t)}else o=-1!==l.indexOf(e)?"rgba("+Math.round(i.r+a.r*t)+","+Math.round(i.g+a.g*t)+","+Math.round(i.b+a.b*t)+","+(i.a+a.a*t)+")":i+a*t;c.setAttr(e,o)}}_addListeners(){this.tween.onPlay=()=>{this.anim.start()},this.tween.onReverse=()=>{this.anim.start()},this.tween.onPause=()=>{this.anim.stop()},this.tween.onFinish=()=>{let t=this.node,e=d.attrs[t._id][this._id];e.points&&e.points.trueEnd&&t.setAttr("points",e.points.trueEnd),this.onFinish&&this.onFinish.call(this)},this.tween.onReset=()=>{let t=this.node,e=d.attrs[t._id][this._id];e.points&&e.points.trueStart&&t.points(e.points.trueStart),this.onReset&&this.onReset()}
1,this.tween.onUpdate=()=>{this.onUpdate&&this.onUpdate.call(this)}}play(){return this.tween.play(),this}reverse(){return this.tween.reverse(),this}reset(){return this.tween.reset(),this}seek(t){return this.tween.seek(1e3*t),this}pause(){return this.tween.pause(),this}finish(){return this.tween.finish(),this}destroy(){let t=this.node._id,e=this._id,n=d.tweens[t];for(let e in this.pause(),n)delete d.tweens[t][e];delete d.attrs[t][e]}}e.Tween=d,d.attrs={},d.tweens={},a.Node.prototype.to=function(t){let e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()},new d(t).play()},e.Easings={BackEaseIn:(t,e,n,r)=>n*(t/=r)*t*(2.70158*t-1.70158)+e,BackEaseOut:(t,e,n,r)=>n*((t=t/r-1)*t*(2.70158*t+1.70158)+1)+e,BackEaseInOut(t,e,n,r){let i=1.70158;return(t/=r/2)<1?n/2*(t*t*(((i*=1.525)+1)*t-i))+e:n/2*((t-=2)*t*(((i*=1.525)+1)*t+i)+2)+e},ElasticEaseIn(t,e,n,r,i,a){let o=0;return 0===t?e:1==(t/=r)?e+n:(a||(a=.3*r),!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),-(i*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t*r-o)/a))+e)},ElasticEaseOut(t,e,n,r,i,a){let o=0;return 0===t?e:1==(t/=r)?e+n:(a||(a=.3*r),!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*t)*Math.sin(2*Math.PI*(t*r-o)/a)+n+e)},ElasticEaseInOut(t,e,n,r,i,a){let o=0;return 0===t?e:2==(t/=r/2)?e+n:(a||(a=.3*1.5*r),!i||i<Math.abs(n)?(i=n,o=a/4):o=a/(2*Math.PI)*Math.asin(n/i),t<1)?-(i*Math.pow(2,10*(t-=1))*Math.sin(2*Math.PI*(t*r-o)/a)*.5)+e:i*Math.pow(2,-10*(t-=1))*Math.sin(2*Math.PI*(t*r-o)/a)*.5+n+e},BounceEaseOut:(t,e,n,r)=>(t/=r)<1/2.75?7.5625*t*t*n+e:t<2/2.75?n*(7.5625*(t-=1.5/2.75)*t+.75)+e:t<2.5/2.75?n*(7.5625*(t-=2.25/2.75)*t+.9375)+e:n*(7.5625*(t-=2.625/2.75)*t+.984375)+e,BounceEaseIn:(t,n,r,i)=>r-e.Easings.BounceEaseOut(i-t,0,r,i)+n,BounceEaseInOut:(t,n,r,i)=>t<i/2?.5*e.Easings.BounceEaseIn(2*t,0,r,i)+n:.5*e.Easings.BounceEaseOut(2*t-i,0,r,i)+.5*r+n,EaseIn:(t,e,n,r)=>n*(t/=r)*t+e,EaseOut:(t,e,n,r)=>-n*(t/=r)*(t-2)+e,EaseInOut:(t,e,n,r)=>(t/=r/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e,StrongEaseIn:(t,e,n,r)=>n*(t/=r)*t*t*t*t+e,StrongEaseOut:(t,e,n,r)=>n*((t=t/r-1)*t*t*t*t+1)+e,StrongEaseInOut:(t,e,n,r)=>(t/=r/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e,Linear:(t,e,n,r)=>n*t/r+e}},68588:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;let r=n(54417);class i{constructor(t=[1,0,0,1,0,0]){this.dirty=!1,this.m=t&&t.slice()||[1,0,0,1,0,0]}reset(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}copy(){return new i(this.m)}copyInto(t){t.m[0]=this.m[0],t.m[1]=this.m[1],t.m[2]=this.m[2],t.m[3]=this.m[3],t.m[4]=this.m[4],t.m[5]=this.m[5]}point(t){let e=this.m;return{x:e[0]*t.x+e[2]*t.y+e[4],y:e[1]*t.x+e[3]*t.y+e[5]}}translate(t,e){return this.m[4]+=this.m[0]*t+this.m[2]*e,this.m[5]+=this.m[1]*t+this.m[3]*e,this}scale(t,e){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=e,this.m[3]*=e,this}rotate(t){let e=Math.cos(t),n=Math.sin(t),r=this.m[0]*e+this.m[2]*n,i=this.m[1]*e+this.m[3]*n,a=-(this.m[0]*n)+this.m[2]*e,o=-(this.m[1]*n)+this.m[3]*e;return this.m[0]=r,this.m[1]=i,this.m[2]=a,this.m[3]=o,this}getTranslation(){return{x:this.m[4],y:this.m[5]}}skew(t,e){let n=this.m[0]+this.m[2]*e,r=this.m[1]+this.m[3]*e,i=this.m[2]+this.m[0]*t,a=this.m[3]+this.m[1]*t;return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=a,this}multiply(t){let e=this.m[0]*t.m[0]+this.m[2]*t.m[1],n=this.m[1]*t.m[0]+this.m[3]*t.m[1],r=this.m[0]*t.m[2]+this.m[2]*t.m[3],i=this.m[1]*t.m[2]+this.m[3]*t.m[3],a=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],o=this.m[1]*t.m[4]+this.m[3]*t.m[5]+this.m[5];return this.m[0]=e,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}invert(){let t=1/(this.m[0]*this.m[3]-this.m[1]*this.m[2]),e=this.m[3]*t,n=-this.m[1]*t,r=-this.m[2]*t,i=this.m[0]*t,a=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),o=t*(this.m[1]*this.m[4]-this.m[0]*this.m[5]);return this.m[0]=e,this.m[1]=n,this.m[2]=r,this.m[3]=i,this.m[4]=a,this.m[5]=o,this}getMatrix(){return this.m}decompose(){let t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],a=this.m[4],o=this.m[5],s=t*i-n*r,l={x:a,y:o,rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=t||0!=n){let e=Math.sqrt(t*t+n*n);l.rotation=n>0?Math.acos(t/e):-Math.acos(t/e),l.scaleX=e,l.scaleY=s/e,l.skewX=(t*r+n*i)/s,l.skewY=0}else if(0!=r||0!=i){let e=Math.sqrt(r*r+i*i);l.rotation=Math.PI/2-(i>0?Math.acos(-r/e):-Math.acos(r/e)),l.scaleX=s/e,l.scaleY=e,l.skewX=0,l.skewY=(t*r+n*i)/s}return l.rotation=e.Util._getRotation(l.rotation),l}}e.Transform=i;let a=Math.PI/180,o=180/Math.PI,s="Konva error: ",l={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,132,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,255,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],ol
1ive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,203],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[119,128,144],slategrey:[119,128,144],snow:[255,255,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],transparent:[255,255,255,0],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,5]},h=/rgb\((\d{1,3}),(\d{1,3}),(\d{1,3})\)/,u=[],d="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(t){setTimeout(t,60)};e.Util={_isElement:t=>!!(t&&1==t.nodeType),_isFunction:t=>!!(t&&t.constructor&&t.call&&t.apply),_isPlainObject:t=>!!t&&t.constructor===Object,_isArray:t=>"[object Array]"===Object.prototype.toString.call(t),_isNumber:t=>"[object Number]"===Object.prototype.toString.call(t)&&!isNaN(t)&&isFinite(t),_isString:t=>"[object String]"===Object.prototype.toString.call(t),_isBoolean:t=>"[object Boolean]"===Object.prototype.toString.call(t),isObject:t=>t instanceof Object,isValidSelector(t){if("string"!=typeof t)return!1;let e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},_sign:t=>0===t?1:t>0?1:-1,requestAnimFrame(t){u.push(t),1===u.length&&d(function(){let t=u;u=[],t.forEach(function(t){t()})})},createCanvasElement(){let t=document.createElement("canvas");try{t.style=t.style||{}}catch(t){}return t},createImageElement:()=>document.createElement("img"),_isInDocument(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage(t,n){let r=e.Util.createImageElement();r.onload=function(){n(r)},r.src=t},_rgbToHex:(t,e,n)=>(16777216+(t<<16)+(e<<8)+n).toString(16).slice(1),_hexToRgb(t){let e=parseInt(t=t.replace("#",""),16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor(){let t=(16777215*Math.random()<<0).toString(16);for(;t.length<6;)t="0"+t;return"#"+t},getRGB(t){let e;return t in l?{r:(e=l[t])[0],g:e[1],b:e[2]}:"#"===t[0]?this._hexToRgb(t.substring(1)):"rgb("===t.substr(0,4)?{r:parseInt((e=h.exec(t.replace(/ /g,"")))[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}:{r:0,g:0,b:0}},colorToRGBA:t=>(t=t||"black",e.Util._namedColorToRBA(t)||e.Util._hex3ColorToRGBA(t)||e.Util._hex4ColorToRGBA(t)||e.Util._hex6ColorToRGBA(t)||e.Util._hex8ColorToRGBA(t)||e.Util._rgbColorToRGBA(t)||e.Util._rgbaColorToRGBA(t)||e.Util._hslColorToRGBA(t)),_namedColorToRBA(t){let e=l[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA(t){if(0===t.indexOf("rgb(")){let e=(t=t.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA(t){if(0===t.indexOf("rgba(")){let e=(t=t.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map((t,e)=>"%"===t.slice(-1)?3===e?parseInt(t)/100:parseInt(t)/100*255:Number(t));return{r:e[0],g:e[1],b:e[2],a:e[3]}}},_hex8ColorToRGBA(t){if("#"===t[0]&&9===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:parseInt(t.slice(7,9),16)/255}},_hex6ColorToRGBA(t){if("#"===t[0]&&7===t.length)return{r:parseInt(t.slice(1,3),16),g:parseInt(t.slice(3,5),16),b:parseInt(t.slice(5,7),16),a:1}},_hex4ColorToRGBA(t){if("#"===t[0]&&5===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:parseInt(t[4]+t[4],16)/255}},_hex3ColorToRGBA(t){if("#"===t[0]&&4===t.length)return{r:parseInt(t[1]+t[1],16),g:parseInt(t[2]+t[2],16),b:parseInt(t[3]+t[3],16),a:1}},_hslColorToRGBA(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){let e,n,r;let[i,...a]=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t),o=Number(a[0])/360,s=Number(a[1])/100,l=Number(a[2])/100;if(0===s)return{r:Math.round(r=255*l),g:Math.round(r),b:Math.round(r),a:1};e=l<.5?l*(1+s):l+s-l*s;let h=2*l-e,u=[0,0,0];for(let t=0;t<3;t++)(n=o+-(1/3*(t-1)))<0&&n++,n>1&&n--,r=6*n<1?h+(e-h)*6*n:2*n<1?e:3*n<2?h+(e-h)*(2/3-n)*6:h,u[t]=255*r;return{r:Math.round(u[0]),g:Math.round(u[1]),b:Math.round(u[2]),a:1}}},haveIntersection:(t,e)=>!(e.x>t.x+t.width||e.x+e.width<t.x||e.y>t.y+t.height||e.y+e.height<t.y),cloneObject(t){let e={};for(let n in t)this._isPlainObject(t[n])?e[n]=this.cloneObject(t[n]):this._isArray(t[n])?e[n]=this.cloneArray(t[n]):e[n]=t[n];return e},cloneArray:t=>t.slice(0),degToRad:t=>t*a,radToDeg:t=>t*o,_degToRad:t=>(e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(t)),_radToDeg:t=>(e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(t)),_getRotation:t=>r.Konva.angleDeg?e.Util.radToDeg(t):t,_capitalize:t=>t.charAt(0).toUpperCase()+t.slice(1),throw(t){throw Error(s+t)},error(t){console.error(s+t)},warn(t){r.Konva.showWarnings&&console.warn("Konva warning: "+t)},each(t,e){for(let n in t)e(n,t[n])},_inRange:(t,e,n)=>e<=t&&t<n,_getProjectionToSegment(t,e,n,r,i,a){let o,s,l;let h=(t-n)*(t-n)+(e-r)*(e-r);if(0==h)o=t,s=e,l=(i-n)*(i-n)+(a-r)*(a-r);else{let u=((i-t)*(n-t)+(a-e)*(r-e))/h;u<0?(o=t,s=e,l=(t-i)*(t-i)+(e-a)*(e-a)):u>1?(o=n,s=r,l=(n-i)*(n-i)+(r-a)*(r-a)):l=((o=t+u*(n-t))-i)*(o-i)+((s=e+u*(r-e))-a)*(s-a)}return[o,s,l]},_getProjectionToLine(t,n,r){let i=e.Util.cloneObject(t),a=Number.MAX_VALUE;
1return n.forEach(function(o,s){if(!r&&s===n.length-1)return;let l=n[(s+1)%n.length],h=e.Util._getProjectionToSegment(o.x,o.y,l.x,l.y,t.x,t.y),u=h[0],d=h[1],c=h[2];c<a&&(i.x=u,i.y=d,a=c)}),i},_prepareArrayForTween(t,n,r){let i=[],a=[];if(t.length>n.length){let e=n;n=t,t=e}for(let e=0;e<t.length;e+=2)i.push({x:t[e],y:t[e+1]});for(let t=0;t<n.length;t+=2)a.push({x:n[t],y:n[t+1]});let o=[];return a.forEach(function(t){let n=e.Util._getProjectionToLine(t,i,r);o.push(n.x),o.push(n.y)}),o},_prepareToStringify(t){let n;for(let r in t.visitedByCircularReferenceRemoval=!0,t)if(t.hasOwnProperty(r)&&t[r]&&"object"==typeof t[r]){if(n=Object.getOwnPropertyDescriptor(t,r),t[r].visitedByCircularReferenceRemoval||e.Util._isElement(t[r])){if(!n.configurable)return null;delete t[r]}else if(null===e.Util._prepareToStringify(t[r])){if(!n.configurable)return null;delete t[r]}}return delete t.visitedByCircularReferenceRemoval,t},_assign(t,e){for(let n in e)t[n]=e[n];return t},_getFirstPointerId:t=>t.touches?t.changedTouches[0].identifier:t.pointerId||999,releaseCanvas(...t){r.Konva.releaseCanvasOnDestroy&&t.forEach(t=>{t.width=0,t.height=0})},drawRoundedRectPath(t,e,n,r){let i=0,a=0,o=0,s=0;"number"==typeof r?i=a=o=s=Math.min(r,e/2,n/2):(i=Math.min(r[0]||0,e/2,n/2),a=Math.min(r[1]||0,e/2,n/2),s=Math.min(r[2]||0,e/2,n/2),o=Math.min(r[3]||0,e/2,n/2)),t.moveTo(i,0),t.lineTo(e-a,0),t.arc(e-a,a,a,3*Math.PI/2,0,!1),t.lineTo(e,n-s),t.arc(e-s,n-s,s,0,Math.PI/2,!1),t.lineTo(o,n),t.arc(o,n-o,o,Math.PI/2,Math.PI,!1),t.lineTo(0,i),t.arc(i,i,i,Math.PI,3*Math.PI/2,!1)}}},53774:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBComponent=function(t){return t>255?255:t<0?0:Math.round(t)},e.alphaComponent=function(t){return t>1?1:t<1e-4?1e-4:t},e.getNumberValidator=function(){if(r.Konva.isUnminified)return function(t,e){return i.Util._isNumber(t)||i.Util.warn(a(t)+' is a not val
1id value for "'+e+'" attribute. The value should be a number.'),t}},e.getNumberOrArrayOfNumbersValidator=function(t){if(r.Konva.isUnminified)return function(e,n){let r=i.Util._isNumber(e),o=i.Util._isArray(e)&&e.length==t;return r||o||i.Util.warn(a(e)+' is a not valid value for "'+n+'" attribute. The value should be a number or Array<number>('+t+")"),e}},e.getNumberOrAutoValidator=function(){if(r.Konva.isUnminified)return function(t,e){var n=i.Util._isNumber(t),r="auto"===t;return n||r||i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a number or "auto".'),t}},e.getStringValidator=function(){if(r.Konva.isUnminified)return function(t,e){return i.Util._isString(t)||i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a string.'),t}},e.getStringOrGradientValidator=function(){if(r.Konva.isUnminified)return function(t,e){let n=i.Util._isString(t),r="[object CanvasGradient]"===Object.prototype.toString.call(t)||t&&t.addColorStop;return n||r||i.Util.warn(a(t)+' is a not val
1id value for "'+e+'" attribute. The value should be a string or a native gradient.'),t}},e.getFunctionValidator=function(){if(r.Konva.isUnminified)return function(t,e){return i.Util._isFunction(t)||i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a function.'),t}},e.getNumberArrayValidator=function(){if(r.Konva.isUnminified)return function(t,e){let n=Int8Array?Object.getPrototypeOf(Int8Array):null;return n&&t instanceof n||(i.Util._isArray(t)?t.forEach(function(t){i.Util._isNumber(t)||i.Util.warn('"'+e+'" attribute has non numeric element '+t+". Make sure that all elements are numbers.")}):i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a array of numbers.')),t}},e.getBooleanValidator=function(){if(r.Konva.isUnminified)return function(t,e){return!0===t||!1===t||i.Util.warn(a(t)+' is a not valid value for "'+e+'" attribute. The value should be a boolean.'),t}},e.getComponentValidator=function(t){if(r.Konva.isUnminified)return function(e,n){return null==e||i.Util.isObject(e)||i.Util.warn(a(e)+' is a not val
1id value for "'+n+'" attribute. The value should be an object with properties '+t),e}};let r=n(54417),i=n(68588);function a(t){return i.Util._isString(t)?'"'+t+'"':"[object Number]"===Object.prototype.toString.call(t)||i.Util._isBoolean(t)?t:Object.prototype.toString.call(t)}},3986:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;let r=n(54417),i=n(68588),a=n(77939),o=n(28783),s=n(28342),l=n(44415),h=n(73980),u=n(58985),d=n(70210),c=n(97955),f=n(16745),g=n(48017),p=n(23442),m=n(34842);e.Konva=i.Util._assign(r.Konva,{Util:i.Util,Transform:i.Transform,Node:a.Node,Container:o.Container,Stage:s.Stage,stages:s.stages,Layer:l.Layer,FastLayer:h.FastLayer,Group:u.Group,DD:d.DD,Shape:c.Shape,shapes:c.shapes,Animation:f.Animation,Tween:g.Tween,Easings:g.Easings,Context:p.Context,Canvas:m.Canvas}),e.default=e.Konva},52076:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;let r=n(3986),i=n(90119),a=n(22064),o=n(7643),s=n(30535),l=n(71298),h=n(56067),u=n(27149),d=n(87339),c=n(75244),f=n(31785),g=n(60657),p=n(88986),m=n(71964),y=n(70972),v=n(82831),b=n(29516),_=n(29846),S=n(52527),x=n(6672),w=n(35309),C=n(71695),k=n(89621),P=n(61179),T=n(67194),E=n(3925),F=n(15751),M=n(66588),N=n(73565),A=n(25929),R=n(47233),D=n(34181),L=n(18280),I=n(3438),G=n(36703),O=n(71665),z=n(31863);e.Konva=r.Konva.Util._assign(r.Konva,{Arc:i.Arc,Arrow:a.Arrow,Circle:o.Circle,Ellipse:s.Ellipse,Image:l.Image,Label:h.Label,Tag:h.Tag,Line:u.Line,Path:d.Path,Rect:c.Rect,RegularPolygon:f.RegularPolygon,Ring:g.Ring,Sprite:p.Sprite,Star:m.Star,Text:y.Text,TextPath:v.TextPath,Transformer:b.Transformer,Wedge:_.Wedge,Filters:{Blur:S.Blur,Brighten:x.Brighten,Contrast:w.Contrast,Emboss:C.Emboss,Enhance:k.Enhance,Grayscale:P.Grayscale,HSL:T.HSL,HSV:E.HSV,Invert:F.Invert,Kaleidoscope:M.Kaleidoscope,Mask:N.Mask,Noise:A.Noise,Pixelate:R.Pixelate,Posterize:D.Posterize,RGB:L.RGB,RGBA:I.RGBA,Sepia:G.Sepia,Solarize:O.Solarize,Threshold:z.Threshold}})},52527:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Blur=void 0;let r=n(1455),i=n(77939),a=n(53774);function o(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}let s=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,39
16,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],l=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];e.Blur=function(t){let e=Math.round(this.blurRadius());e>0&&function(t,e){let n,r,i,a,h,u,d,c,f,g,p,m,y,v,b,_,S,x,w,C,k,P,T,E;let F=t.data,M=t.width,N=t.height,A=e+e+1,R=M-1,D=N-1,L=e+1,I=L*(L+1)/2,G=new o,O=s[e],z=l[e],U=null,B=G,H=null,V=null;for(i=1;i<A;i++)B=B.next=new o,i===L&&(U=B);for(r=0,B.next=G,d=u=0;r<N;r++){for(_=S=x=w=c=f=g=p=0,m=L*(C=F[u]),y=L*(k=F[u+1]),v=L*(P=F[u+2]),b=L*(T=F[u+3]),c+=I*C,f+=I*k,g+=I*P,p+=I*T,B=G,i=0;i<L;i++)B.r=C,B.g=k,B.b=P,B.a=T,B=B.next;for(i=1;i<L;i++)a=u+((R<i?R:i)<<2),c+=(B.r=C=F[a])*(E=L-i),f+=(B.g=k=F[a+1])*E,g+=(B.b=P=F[a+2])*E,p+=(B.a=T=F[a+3])*E,_+=C,S+=k,x+=P,w+=T,B=B.next;for(n=0,H=G,V=U;n<M;n++)F[u+3]=T=p*O>>z,0!==T?(T=255/T,F[u]=(c*O>>z)*T,F[u+1]=(f*O>>z)*T,F[u+2]=(g*O>>z)*T):F[u]=F[u+1]=F[u+2]=0,c-=m,f-=y,g-=v,p-=b,m-=H.r,y-=H.g,v-=H.b,b-=H.a,a=d+((a=n+e+1)<R?a:R)<<2,_+=H.r=F[a],S+=H.g=F[a+1],x+=H.b=F[a+2],w+=H.a=F[a+3],c+=_,f+=S,g+=x,p+=w,H=H.next,m+=C=V.r,y+=k=V.g,v+=P=V.b,b+=T=V.a,_-=C,S-=k,x-=P,w-=T,V=V.next,u+=4;d+=M}for(n=0;n<M;n++){for(S=x=w=_=f=g=p=c=0,m=L*(C=F[u=n<<2]),y=L*(k=F[u+1]),v=L*(P=F[u+2]),b=L*(T=F[u+3]),c+=I*C,f+=I*k,g+=I*P,p+=I*T,B=G,i=0;i<L;i++)B.r=C,B.g=k,B.b=P,B.a=T,B=B.next;for(i=1,h=M;i<=e;i++)u=h+n<<2,c+=(B.r=C=F[u])*(E=L-i),f+=(B.g=k=F[u+1])*E,g+=(B.b=P=F[u+2])*E,p+=(B.a=T=F[u+3])*E,_+=C,S+=k,x+=P,w+=T,B=B.next,i<D&&(h+=M);for(r=0,u=n,H=G,V=U;r<N;r++)F[(a=u<<2)+3]=T=p*O>>z,T>0?(T=255/T,F[a]=(c*O>>z)*T,F[a+1]=(f*O>>z)*T,F[a+2]=(g*O>>z)*T):F[a]=F[a+1]=F[a+2]=0,c-=m,f-=y,g-=v,p-=b,m-=H.r,y-=H.g,v-=H.b,b-=H.a,a=n+((a=r+L)<D?a:D)*M<<2,c+=_+=H.r=F[a],f+=S+=H.g=F[a+1],g+=x+=H.b=F[a+2],p+=w+=H.a=F[a+3],H=H.next,m+=C=V.r,y+=k=V.g,v+=P=V.b,b+=T=V.a,_-=C,S-=k,x-=P,w-=T,V=V.next,u+=M}}(t,e)},r.Factory.addGetterSetter(i.Node,"blurRadius",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},6672:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Brighten=void 0;let r=n(1455),i=n(77939),a=n(53774);e.Brighten=function(t){let e=255*this.brightness(),n=t.data,r=n.length;for(let t=0;t<r;t+=4)n[t]+=e,n[t+1]+=e,n[t+2]+=e},r.Factory.addGetterSetter(i.Node,"brightness",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},35309:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Contrast=void 0;let r=n(1455),i=n(77939),a=n(53774);e.Contrast=function(t){let e=Math.pow((this.contrast()+100)/100,2),n=t.data,r=n.length,i=150,a=150,o=150;for(let t=0;t<r;t+=4)i=n[t],a=n[t+1],o=n[t+2],i/=255,i-=.5,i*=e,i+=.5,i*=255,a/=255,a-=.5,a*=e,a+=.5,a*=255,o/=255,o-=.5,o*=e,o+=.5,o*=255,i=i<0?0:i>255?255:i,a=a<0?0:a>255?255:a,o=o<0?0:o>255?255:o,n[t]=i,n[t+1]=a,n[t+2]=o},r.Factory.addGetterSetter(i.Node,"contrast",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},71695:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emboss=void 0;let r=n(1455),i=n(77939),a=n(68588),o=n(53774);e.Emboss=function(t){let e=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),i=this.embossBlend(),o=t.data,s=t.width,l=t.height,h=4*s,u=0,d=0,c=l;switch(r){case"top-left":u=-1,d=-1;break;case"top":u=-1,d=0;break;case"top-right":u=-1,d=1;break;case"right":u=0,d=1;break;case"bottom-right":u=1,d=1;break;case"bottom":u=1,d=0;break;case"bottom-left":u=1,d=-1;break;case"left":u=0,d=-1;break;default:a.Util.error("Unknown emboss direction: "+r)}do{let t=(c-1)*h,r=u;c+r<1&&(r=0),c+r>l&&(r=0);let a=(c-1+r)*s*4,f=s;do{let r=t+(f-1)*4,l=d;f+l<1&&(l=0),f+l>s&&(l=0);let h=a+(f-1+l)*4,u=o[r]-o[h],c=o[r+1]-o[h+1],g=o[r+2]-o[h+2],p=u,m=p>0?p:-p,y=g>0?g:-g;if((c>0?c:-c)>m&&(p=c),y>
1m&&(p=g),p*=e,i){let t=o[r]+p,e=o[r+1]+p,n=o[r+2]+p;o[r]=t>255?255:t<0?0:t,o[r+1]=e>255?255:e<0?0:e,o[r+2]=n>255?255:n<0?0:n}else{let t=n-p;t<0?t=0:t>255&&(t=255),o[r]=o[r+1]=o[r+2]=t}}while(--f)}while(--c)},r.Factory.addGetterSetter(i.Node,"embossStrength",.5,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossWhiteLevel",.5,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossDirection","top-left",void 0,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossBlend",!1,void 0,r.Factory.afterSetFilter)},89621:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Enhance=void 0;let r=n(1455),i=n(77939),a=n(53774);function o(t,e,n,r,i){let a=n-e,o=i-r;return 0===a?r+o/2:0===o?r:(t-e)/a*o+r}e.Enhance=function(t){let e,n,r,i,a,s,l,h,u;let d=t.data,c=d.length,f=d[0],g=f,p,m=d[1],y=m,v,b=d[2],_=b,S,x=this.enhance();if(0!==x){for(let t=0;t<c;t+=4)(p=d[t+0])<f?f=p:p>g&&(g=p),(v=d[t+1])<m?m=v:v>y&&(y=v),(S=d[t+2])<b?b=S:S>_&&(_=S);g===f&&(g=255,f=0),y===m&&(y=255,m=0),_===b&&(_=255,b=0),x>0?(n=g+x*(255-g),r=f-x*(f-0),a=y+x*(255-y),s=m-x*(m-0),h=_+x*(255-_),u=b-x*(b-0)):(e=(g+f)*.5,n=g+x*(g-e),r=f+x*(f-e),i=(y+m)*.5,a=y+x*(y-i),s=m+x*(m-i),l=(_+b)*.5,h=_+x*(_-l),u=b+x*(b-l));for(let t=0;t<c;t+=4)d[t+0]=o(d[t+0],f,g,r,n),d[t+1]=o(d[t+1],m,y,s,a),d[t+2]=o(d[t+2],b,_,u,h)}},r.Factory.addGetterSetter(i.Node,"enhance",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},61179:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Grayscale=void 0,e.Grayscale=function(t){let e=t.data,n=e.length;for(let t=0;t<n;t+=4){let n=.34*e[t]+.5*e[t+1]+.16*e[t+2];e[t]=n,e[t+1]=n,e[t+2]=n}}},67194:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HSL=void 0;let r=n(1455),i=n(77939),a=n(53774);r.Factory.addGetterSetter(i.Node,"hue",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"saturation",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"luminance",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),e.HSL=function(t){let e,n,r,i;let a=t.data,o=a.length,s=Math.pow(2,this.saturation()),l=Math.abs(this.hue()+360)%360,h=127*this.luminance(),u=1*s*Math.cos(l*Math.PI/180),d=1*s*
1Math.sin(l*Math.PI/180),c=.299+.701*u+.167*d,f=.587-.587*u+.33*d,g=.114-.114*u-.497*d,p=.299-.299*u-.328*d,m=.587+.413*u+.035*d,y=.114-.114*u+.293*d,v=.299-.3*u+1.25*d,b=.587-.586*u-1.05*d,_=.114+.886*u-.2*d;for(let t=0;t<o;t+=4)e=a[t+0],n=a[t+1],r=a[t+2],i=a[t+3],a[t+0]=c*e+f*n+g*r+h,a[t+1]=p*e+m*n+y*r+h,a[t+2]=v*e+b*n+_*r+h,a[t+3]=i}},3925:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HSV=void 0;let r=n(1455),i=n(77939),a=n(53774);e.HSV=function(t){let e,n,r,i;let a=t.data,o=a.length,s=Math.pow(2,this.value()),l=Math.pow(2,this.saturation()),h=Math.abs(this.hue()+360)%360,u=s*l*Math.cos(h*Math.PI/180),d=s*l*Math.sin(h*Math.PI/180),c=.299*s+.701*u+.167*d,f=.587*s-.587*u+.33*d,g=.114*s-.114*u-.497*d,p=.299*s-.299*u-.328*d,m=.587*s+.413*u+.035*d,y=.114*s-.114*u+.293*d,v=.299*s-.3*u+1.25*d,b=.587*s-.586*u-1.05*d,_=.114*s+.886*u-.2*d;for(let t=0;t<o;t+=4)e=a[t+0],n=a[t+1],r=a[t+2],i=a[t+3],a[t+0]=c*e+f*n+g*r,a[t+1]=p*e+m*n+y*r,a[t+2]=v*e+b*n+_*r,a[t+3]=i},r.Factory.addGetterSetter(i.Node,"hue",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"saturation",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"value",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},15751:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Invert=void 0,e.Invert=function(t){let e=t.data,n=e.length;for(let t=0;t<n;t+=4)e[t]=255-e[t],e[t+1]=255-e[t+1],e[t+2]=255-e[t+2]}},66588:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Kaleidoscope=void 0;let r=n(1455),i=n(77939),a=n(68588),o=n(53774),s=function(t,e,n){let r=t.data,i=e.data,a=t.width,o=t.height,s=n.polarCenterX||a/2,l=n.polarCenterY||o/2,h=Math.sqrt(s*s+l*l),u=a-s,d=o-l,c=Math.sqrt(u*u+d*d);h=c>h?c:h;let f=360/a*Math.PI/180;for(let t=0;t<a;t+=1){let e=Math.sin(t*f),n=Math.cos(t*f);for(let c=0;c<o;c+=1){u=Math.floor(s+h*c/o*n);let f=((d=Math.floor(l+h*c/o*e))*a+u)*4,g=r[f+0],p=r[f+1],m=r[f+2],y=r[f+3];i[(f=(t+c*a)*4)+0]=g,i[f+1]=p,i[f+2]=m,i[f+3]=y}}},l=function(t,e,n){let r;let i=t.data,a=e.data,o=t.width,s=t.height,l=n.polarCenterX||o/2,h=n.polarCenterY||s/2,u=Math.sqrt(l*l+h*h),d=o-l,c=s-h,f=Math.sqrt(d*d+c*c);u=f>u?f:u;let g=n.polarRotation||0;for(d=0;d<o;d+=1)for(c=0;c<s;c+=1){let t=d-l,e=c-h,n=Math.sqrt(t*t+e*e)*s/u,f=(180*Math.atan2(e,t)/Math.PI+360+g)%360;r=Math.floor(f=f*o/360);let p=(Math.floor(n)*o+r)*4,m=i[p+0],y=i[p+1],v=i[p+2],b=i[p+3];a[(p=(c*o+d)*4)+0]=m,a[p+1]=y,a[p+2]=v,a[p+3]=b}};e.Kaleidoscope=function(t){let e,n,r,i,o,h,u,d,c,f;let g=t.width,p=t.height,m=Math.round(this.kaleidoscopePower()),y=Math.floor(Math.round(this.kaleidoscopeAngle())%360*g/360);if(m<1)return;let v=a.Util.createCanvasElement();v.width=g,v.height=p;let b=v.getContext("2d").getImageData(0,0,g,p);a.Util.releaseCanvas(v),s(t,b,{polarCenterX:g/2,polarCenterY:p/2});let _=g/Math.pow(2,m);for(;_<=8;)_*=2,m-=1;let S=_=Math.ceil(_),x=0,w=S,C=1;for(y+_>g&&(x=S,w=0,C=-1),n=0;n<p;n+=1)for(e=x;e!==w;e+=C)r=Math.round(e+y)%g,c=(g*n+r)*4,o=b.data[c+0],h=b.data[c+1],u=b.data[c+2],d=b.data[c+3],f=(g*n+e)*4,b.data[f+0]=o,b.data[f+1]=h,b.data[f+2]=u,b.data[f+3]=d;for(n=0;n<p;n+=1)for(i=0,S=Math.floor(_);i<m;i+=1){for(e=0;e<S+1;e+=1)c=(g*n+e)*4,o=b.data[c+0],h=b.data[c+1],u=b.data[c+2],d=b.data[c+3],f=(g*n+2*S-e-1)*4,b.data[f+0]=o,b.data[f+1]=h,b.data[f+2]=u,b.data[f+3]=d;S*=2}l(b,t,{polarRotation:0})},r.Factory.addGetterSetter(i.Node,"kaleidoscopePower",2,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"kaleidoscopeAngle",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},73565:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Mask=void 0;let r=n(1455),i=n(77939),a=n(53774);function o(t,e,n){let r=(n*t.width+e)*4,i=[];return i.push(t.data[r++],t.data[r++],t.data[r++],t.data[r++]),i}function s(t,e){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)+Math.pow(t[2]-e[2],2))}e.Mask=function(t){let e=function(t,e){let n=o(t,0,0),r=o(t,t.width-1,0),i=o(t,0,t.height-1),a=o(t,t.width-1,t.height-1),l=e||10;if(s(n,r)<l&&s(r,a)<l&&s(a,i)<l&&s(i,n)<l){let e=function(t){let e=[0,0,0];for(let n=0;n<t.length;n++)e[0]+=t[n][0],e[1]+=t[n][1],e[2]+=t[n][2];return e[0]/=t.length,e[1]/=t.length,e[2]/=t.length,e}([r,n,a,i]),o=[];for(let n=0;n<t.width*t.height;n++){let r=s(e,[t.data[4*n],t.data[4*n+1],t.data[4*n+2]]);o[n]=r<l?0:255}return o}}(t,this.threshold());return e&&(e=function(t,e,n){let r=[1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[];for(let s=0;s<n;s++)for(let l=0;l<e;l++){let h=s*e+l,u=0;for(let o=0;o<i;o++)for(let h=0;h<i;h++){let d=s+o-a,c=l+h-a;if(d>=0&&d<n&&c>=0&&c<e){let n=d*e+c,a=r[o*i+h];u+=t[n]*a}}o[h]=u}return o}(e=function(t,e,n){let r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[];for(let s=0;s<n;s++)for(let l=0;l<e;l++){let h=s*e+l,u=0;for(let o=0;o<i;o++)for(let h=0;h<i;h++){let d=s+o-a,c=l+h-a;if(d>=0&&d<n&&c>=0&&c<e){let n=d*e+c,a=r[o*i+h];u+=t[n]*a}}o[h]=u>=1020?255:0}return o}(e=function(t,e,n){let r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),a=Math.floor(i/2),o=[];for(let s=0;s<n;s++)for(let l=0;l<e;l++){let h=s*e+l,u=0;for(let o=0;o<i;o++)for(let h=0;h<i;h++){let d=s+o-a,c=l+h-a;if(d>=0&&d<n&&c>=0&&c<e){let n=d*e+c,a=r[o*i+h];u+=t[n]*a}}o[h]=2040===u?255:0}return o}(e,t.width,t.height),t.width,t.height),t.width,t.height),function(t,e){for(let n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}(t,e)),t},r.Factory.addGetterSetter(i.Node,"threshold",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},25929:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Noise=void 0;let r=n(1455),i=n(77939),a=n(53774);e.Noise=function(t){let e=255*this.noise(),n=t.data,r=n.length,i=e/2;for(let t=0;t<r;t+=4)n[t+0]+=i-2*i*Math.random(),n[t+1]+=i-2*i*Math.random(),n[t+2]+=i-2*i*Math.random()},r.Factory.addGetterSetter(i.Node,"noise",.2,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},47233:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pixelate=void 0;let r=n(1455),i=n(68588),a=n(77939),o=n(53774);e.Pixelate=function(t){let e=Math.ceil(this.pixelSize()),n=t.width,r=t.height,a,o,s,l,h,u,d,c=Math.ceil(n/e),f=Math.ceil(r/e),g,p,m,y,v,b,_,S=t.data;if(e<=0){i.Util.error("pixelSize value can not be <= 0");return}for(v=0;v<c;v+=1)for(b=0;b<f;b+=1){for(l=0,h=0,u=0,d=0,p=(g=v*e)+e,y=(m=b*e)+e,_=0,a=g;a<p;a+=1)if(!(a>=n))for(o=m;o<y;o+=1)o>=r||(l+=S[(s=(n*o+a)*4)+0],h+=S[s+1],u+=S[s+2],d+=S[s+3],_+=1);for(l/=_,h/=_,u/=_,d/=_,a=g;a<p;a+=1)if(!(a>=n))for(o=m;o<y;o+=1)o>=r||(S[(s=(n*o+a)*4)+0]=l,S[s+1]=h,S[s+2]=u,S[s+3]=d)}},r.Factory.addGetterSetter(a.Node,"pixelSize",8,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},34181:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Posterize=void 0;let r=n(1455),i=n(77939),a=n(53774);e.Posterize=function(t){let e=Math.round(254*this.levels())+1,n=t.data,r=n.length,i=255/e;for(let t=0;t<r;t+=1)n[t]=Math.floor(n[t]/i)*i},r.Factory.addGetterSetter(i.Node,"levels",.5,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},18280:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGB=void 0;let r=n(1455),i=n(77939),a=n(53774);e.RGB=function(t){let e=t.data,n=e.length,r=this.red(),i=this.green(),a=this.blue();for(let t=0;t<n;t+=4){let n=(.34*e[t]+.5*e[t+1]+.16*e[t+2])/255;e[t]=n*r,e[t+1]=n*i,e[t+2]=n*a,e[t+3]=e[t+3]}},r.Factory.addGetterSetter(i.Node,"red",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(i.Node,"green",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(i.Node,"blue",0,a.RGBComponent,r.Factory.afterSetFilter)},3438:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA=void 0;let r=n(1455),i=n(77939),a=n(53774);e.RGBA=function(t){let e=t.data,n=e.length,r=this.red(),i=this.green(),a=this.blue(),o=this.alpha();for(let t=0;t<n;t+=4){let n=1-o;e[t]=r*o+e[t]*n,e[t+1]=i*o+e[t+1]*n,e[t+2]=a*o+e[t+2]*n}},r.Factory.addGetterSetter(i.Node,"red",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(i.Node,"green",0,function(t){return(this._filterUpToDate=!1,t>255)?255:t<0?0:Math.round(t)}),r.Factory.addGetterSetter(i.Node,"blue",0,a.RGBComponent,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"alpha",1,function(t){return(this._filterUpToDate=!1,t>1)?1:t<0?0:t})},36703:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sepia=void 0,e.Sepia=function(t){let e=t.data,n=e.length;for(let t=0;t<n;t+=4){let n=e[t+0],r=e[t+1],i=e[t+2];e[t+0]=Math.min(255,.393*n+.769*r+.189*i),e[t+1]=Math.min(255,.349*n+.686*r+.168*i),e[t+2]=Math.min(255,.272*n+.534*r+.131*i)}}},71665:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Solarize=void 0,e.Solarize=function(t){let e=t.data,n=t.width,r=t.height,i=4*n,a=r;do{let t=(a-1)*i,r=n;do{let n=t+(r-1)*4,i=e[n],a=e[n+1],o=e[n+2];i>127&&(i=255-i),a>127&&(a=255-a),o>127&&(o=255-o),e[n]=i,e[n+1]=a,e[n+2]=o}while(--r)}while(--a)}},31863:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Threshold=void 0;let r=n(1455),i=n(77939),a=n(53774);e.Threshold=function(t){let e=255*this.threshold(),n=t.data,r=n.length;for(let t=0;t<r;t+=1)n[t]=n[t]<e?0:255},r.Factory.addGetterSetter(i.Node,"threshold",.5,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},20185:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let r=n(52076);t.exports=r.Konva},90119:function(t,e,n){"use strict";
1Object.defineProperty(e,"__esModule",{value:!0}),e.Arc=void 0;let r=n(1455),i=n(97955),a=n(54417),o=n(53774),s=n(54417);class l extends i.Shape{_sceneFunc(t){let e=a.Konva.getAngle(this.angle()),n=this.clockwise();t.beginPath(),t.arc(0,0,this.outerRadius(),0,e,n),t.arc(0,0,this.innerRadius(),e,0,!n),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}getSelfRect(){let t=this.innerRadius(),e=this.outerRadius(),n=this.clockwise(),r=a.Konva.getAngle(n?360-this.angle():this.angle()),i=Math.cos(Math.min(r,Math.PI)),o=Math.sin(Math.min(Math.max(Math.PI,r),3*Math.PI/2)),s=Math.sin(Math.min(r,Math.PI/2)),l=i*(i>0?t:e),h=o*(o>0?t:e),u=s*(s>0?e:t);return{x:l,y:n?-1*u:h,width:1*e-l,height:u-h}}}e.Arc=l,l.prototype._centroid=!0,l.prototype.className="Arc",l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,s._registerNode)(l),r.Factory.addGetterSetter(l,"innerRadius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"outerRadius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"angle",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"clockwise",!1,(0,o.getBooleanValidator)())},22064:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Arrow=void 0;let r=n(1455),i=n(27149),a=n(53774),o=n(54417),s=n(87339);class l extends i.Line{_sceneFunc(t){let e,n;super._sceneFunc(t);let r=2*Math.PI,i=this.points(),a=i,o=0!==this.tension()&&i.length>4;o&&(a=this.getTensionPoints());let l=this.pointerLength(),h=i.length;if(o){let t=[a[a.length-4],a[a.length-3],a[a.length-2],a[a.length-1],i[h-2],i[h-1]],r=s.Path.calcLength(a[a.length-4],a[a.length-3],"C",t),o=s.Path.getPointOnQuadraticBezier(Math.min(1,1-l/r),t[0],t[1],t[2],t[3],t[4],t[5]);e=i[h-2]-o.x,n=i[h-1]-o.y}else e=i[h-2]-i[h-4],n=i[h-1]-i[h-3];let u=(Math.atan2(n,e)+r)%r,d=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(i[h-2],i[h-1]),t.rotate(u),t.moveTo(0,0),t.lineTo(-l,d/2),t.lineTo(-l,-d/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(i[0],i[1]),o?(e=(a[0]+a[2])/2-i[0],n=(a[1]+a[3])/2-i[1]):(e=i[2]-i[0],n=i[3]-i[1]),t.rotate((Math.atan2(-n,-e)+r)%r),t.moveTo(0,0),t.lineTo(-l,d/2),t.lineTo(-l,-d/2),t.closePath(),t.restore(),this.__fillStroke(t))}__fillStroke(t){let e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}getSelfRect(){let t=super.getSelfRect(),e=this.pointerWidth()/2;return{x:t.x,y:t.y-e,width:t.width,height:t.height+2*e}}}e.Arrow=l,l.prototype.className="Arrow",(0,o._registerNode)(l),r.Factory.addGetterSetter(l,"pointerLength",10,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(l,"pointerWidth",10,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(l,"pointerAtBeginning",!1),r.Factory.addGetterSetter(l,"pointerAtEnding",!0)},7643:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Circle=void 0;let r=n(1455),i=n(97955),a=n(53774),o=n(54417);class s extends i.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius()!==t/2&&this.radius(t/2)}setHeight(t){this.radius()!==t/2&&this.radius(t/2)}}e.Circle=s,s.prototype._centroid=!0,s.prototype.className="Circle",s.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"radius",0,(0,a.getNumberValidator)())},30535:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ellipse=void 0;let r=n(1455),i=n(97955),a=n(53774),o=n(54417);class s extends i.Shape{_sceneFunc(t){let e=this.radiusX(),n=this.radiusY();t.beginPath(),t.save(),e!==n&&t.scale(1,n/e),t.arc(0,0,e,0,2*Math.PI,!1),t.restore(),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radiusX()}getHeight(){return 2*this.radiusY()}setWidth(t){this.radiusX(t/2)}setHeight(t){this.radiusY(t/2)}}e.Ellipse=s,s.prototype.className="Ellipse",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radiu
1sX","radiusY"],(0,o._registerNode)(s),r.Factory.addComponentsGetterSetter(s,"radius",["x","y"]),r.Factory.addGetterSetter(s,"radiusX",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"radiusY",0,(0,a.getNumberValidator)())},71298:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Image=void 0;let r=n(68588),i=n(1455),a=n(97955),o=n(54417),s=n(53774);class l extends a.Shape{constructor(t){super(t),this.on("imageChange.konva",()=>{this._setImageLoad()}),this._setImageLoad()}_setImageLoad(){let t=this.image();t&&t.complete||t&&4===t.readyState||!t||!t.addEventListener||t.addEventListener("load",()=>{this._requestDraw()})}_useBufferCanvas(){let t=!!this.cornerRadius(),e=this.hasShadow();return!!t&&!!e||super._useBufferCanvas(!0)}_sceneFunc(t){let e;let n=this.getWidth(),i=this.getHeight(),a=this.cornerRadius(),o=this.attrs.image;if(o){let t=this.attrs.cropWidth,r=this.attrs.cropHeight;e=t&&r?[o,this.cropX(),this.cropY(),t,r,0,0,n,i]:[o,0,0,n,i]}(this.hasFill()||this.hasStroke()||a)&&(t.beginPath(),a?r.Util.drawRoundedRectPath(t,n,i,a):t.rect(0,0,n,i),t.closePath(),t.fillStrokeShape(this)),o&&(a&&t.clip(),t.drawImage.apply(t,e))}_hitFunc(t){let e=this.width(),n=this.height(),i=this.cornerRadius();t.beginPath(),i?r.Util.drawRoundedRectPath(t,e,n,i):t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}getWidth(){var t,e;return null!==(t=this.attrs.width)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.width}getHeight(){var t,e;return null!==(t=this.attrs.height)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.height}static fromURL(t,e,n=null){let i=r.Util.createImageElement();i.onload=function(){e(new l({image:i}))},i.onerror=n,i.crossOrigin="Anonymous",i.src=t}}e.Image=l,l.prototype.className="Image",(0,o._registerNode)(l),i.Factory.addGetterSetter(l,"cornerRadius",0,(0,s.getNumberOrArrayOfNumbersValidator)(4)),i.Factory.addGetterSetter(l,"image"),i.Factory.addComponentsGetterSetter(l,"crop",["x","y","width","height"]),i.Factory.addGetterSetter(l,"cropX",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropY",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropWidth",0,(0,s.getNumberValidator)()),i.Factory.addGetterSetter(l,"cropHeight",0,(0,s.getNumberValidator)())},56067:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tag=e.Label=void 0;let r=n(1455),i=n(97955),a=n(58985),o=n(53774),s=n(54417),l=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],h="right",u="down",d="left",c=l.length;class f extends a.Group{constructor(t){super(t),this.on("add.konva",function(t){this._addListeners(t.child),this._sync()})}getText(){return this.find("Text")[0]}getTag(){return this.find("Tag")[0]}_addListeners(t){let e=this,n,r=function(){e._sync()};for(n=0;n<c;n++)t.on(l[n]+"Change.konva",r)}getWidth(){return this.getText().width()}getHeight(){return this.getText().height()}_sync(){let t=this.getText(),e=this.getTag(),n,r,i,a,o,s,l;if(t&&e){switch(n=t.width(),r=t.height(),i=e.pointerDirection(),a=e.pointerWidth(),l=e.pointerHeight(),o=0,s=0,i){case"up":o=n/2,s=-1*l;break;case h:o=n+a,s=r/2;break;case u:o=n/2,s=r+l;break;case d:o=-1*a,s=r/2}e.setAttrs({x:-1*o,y:-1*s,width:n,height:r}),t.setAttrs({x:-1*o,y:-1*s})}}}e.Label=f,f.prototype.className="Label",(0,s._registerNode)(f);class g extends i.Shape{_sceneFunc(t){let e=this.width(),n=this.height(),r=this.pointerDirection(),i=this.pointerWidth(),a=this.pointerHeight(),o=this.cornerRadius(),s=0,l=0,c=0,f=0;"number"==typeof o?s=l=c=f=Math.min(o,e/2,n/2):(s=Math.min(o[0]||0,e/2,n/2),l=Math.min(o[1]||0,e/2,n/2),f=Math.min(o[2]||0,e/2,n/2),c=Math.min(o[3]||0,e/2,n/2)),t.beginPath(),t.moveTo(s,0),"up"===r&&(t.lineTo((e-i)/2,0),t.lineTo(e/2,-1*a),t.lineTo((e+i)/2,0)
1),t.lineTo(e-l,0),t.arc(e-l,l,l,3*Math.PI/2,0,!1),r===h&&(t.lineTo(e,(n-a)/2),t.lineTo(e+i,n/2),t.lineTo(e,(n+a)/2)),t.lineTo(e,n-f),t.arc(e-f,n-f,f,0,Math.PI/2,!1),r===u&&(t.lineTo((e+i)/2,n),t.lineTo(e/2,n+a),t.lineTo((e-i)/2,n)),t.lineTo(c,n),t.arc(c,n-c,c,Math.PI/2,Math.PI,!1),r===d&&(t.lineTo(0,(n+a)/2),t.lineTo(-1*i,n/2),t.lineTo(0,(n-a)/2)),t.lineTo(0,s),t.arc(s,s,s,Math.PI,3*Math.PI/2,!1),t.closePath(),t.fillStrokeShape(this)}getSelfRect(){let t=0,e=0,n=this.pointerWidth(),r=this.pointerHeight(),i=this.pointerDirection(),a=this.width(),o=this.height();return"up"===i?(e-=r,o+=r):i===u?o+=r:i===d?(t-=1.5*n,a+=n):i===h&&(a+=1.5*n),{x:t,y:e,width:a,height:o}}}e.Tag=g,g.prototype.className="Tag",(0,s._registerNode)(g),r.Factory.addGetterSetter(g,"pointerDirection","none"),r.Factory.addGetterSetter(g,"pointerWidth",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(g,"pointerHeight",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(g,"cornerRadius",0,(0,o.getNumberOrArrayOfNumbersValidator)(4))},27149:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Line=void 0;let r=n(1455),i=n(54417),a=n(97955),o=n(53774);function s(t,e,n,r,i,a,o){let s=Math.sqrt(Math.pow(n-t,2)+Math.pow(r-e,2)),l=Math.sqrt(Math.pow(i-n,2)+Math.pow(a-r,2)),h=o*s/(s+l),u=o*l/(s+l);return[n-h*(i-t),r-h*(a-e),n+u*(i-t),r+u*(a-e)]}function l(t,e){let n=t.length,r=[];for(let i=2;i<n-2;i+=2){let n=s(t[i-2],t[i-1],t[i],t[i+1],t[i+2],t[i+3],e);isNaN(n[0])||(r.push(n[0]),r.push(n[1]),r.push(t[i]),r.push(t[i+1]),r.push(n[2]),r.push(n[3]))}return r}class h extends a.Shape{constructor(t){super(t),this.on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",function(){this._clearCache("tensionPoints")})}_sceneFunc(t){let e=this.points(),n=e.length,r=this.tension(),i=this.closed(),a=this.bezier(),o,s,l;if(n){if(t.beginPath(),t.moveTo(e[0],e[1]),0!==r&&n>4){for(s=(o=this.getTensionPoints()).length,l=i?0:4,i||t.quadraticCurveTo(o[0],o[1],o[2],o[3]);l<s-2;)t.bezierCurveTo(o[l++],o[l++],o[l++],o[l++],o[l++],o[l++]);i||t.quadraticCurveTo(o[s-2],o[s-1],e[n-2],e[n-1])}else if(a)for(l=2;l<n;)t.bezierCurveTo(e[l++],e[l++],e[l++],e[l++],e[l++],e[l++]);else for(l=2;l<n;l+=2)t.lineTo(e[l],e[l+1]);i?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}getTensionPoints(){return this._getCache("tensionPoints",this._getTensionPoints)}_getTensionPoints(){return this.closed()?this._getTensionPointsClosed():l(this.points(),this.tension())}_getTensionPointsClosed(){let t=this.points(),e=t.length,n=this.tension(),r=s(t[e-2],t[e-1],t[0],t[1],t[2],t[3],n),i=s(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],n),a=l(t,n);return[r[2],r[3]].concat(a).concat([i[0],i[1],t[e-2],t[e-1],i[2],i[3],r[0],r[1],t[0],t[1]])}getWidth(){return this.getSelfRect().width}getHeight(){return this.getSelfRect().height}getSelfRect(){let t,e,n=this.points();if(n.length<4)return{x:n[0]||0,y:n[1]||0,width:0,height:0};let r=(n=0!==this.tension()?[n[0],n[1],...this._getTensionPoints(),n[n.length-2],n[n.length-1]]:this.points())[0],i=n[0],a=n[1],o=n[1];for(let s=0;s<n.length/2;s++)t=n[2*s],e=n[2*s+1],r=Math.min(r,t),i=Math.max(i,t),a=Math.min(a,e),o=Math.max(o,e);return{x:r,y:a,width:i-r,height:o-a}}}e.Line=h,h.prototype.className="Line",h.prototype._attrsAffectingSize=["points","bezier","tension"],(0,i._registerNode)(h),r.Factory.addGetterSetter(h,"closed",!1),r.Factory.addGetterSetter(h,"bezier",!1),r.Factory.addGetterSetter(h,"tension",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(h,"points",[],(0,o.getNumberArrayValidator)())},87339:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Path=void 0;let r=n(1455),i=n(97955),a=n(54417),o=n(54135);class s extends i.Shape{constructor(t){super(t),this.dataArray=[],this.pathLength=0,this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute()})}_readDataAttribute(){this.dataArray=s.parsePathData(this.data()),this.pathLength=s.getPathLength(this.dataArray)}_sceneFunc(t){let e=this.dataArray;t.beginPath();let n=!1;for(let g=0;g<e.length;g++){let p=e[g].command,m=e[g].points;switch(p){case"L":t.lineTo(m[0],m[1]);break;case"M":t.moveTo(m[0],m[1]);break;case"C":t.bezierCurveTo(m[0],m[1],m[2],m[3],m[4],m[5]);break;case"Q":t.quadraticCurveTo(m[0],m[1],m[2],m[3]);break;case"A":var r=m[0],i=m[1],a=m[2],o=m[3],s=m[4],l=m[5],h=m[6],u=m[7],d=a>o?a:o,c=a>o?1:a/o,f=a>o?o/a:1;t.translate(r,i),t.rotate(h),t.scale(c,f),t.arc(0,0,d,s,s+l,1-u),t.scale(1/c,1/f),t.rotate(-h),t.translate(-r,-i);break;case"z":n=!0,t.closePath()}}n||this.hasFill()?t.fillStrokeShape(this):t.strokeShape(this)}getSelfRect(){let t,e,n=[];this.dataArray.forEach(function(t){if("A"===t.command){let e=t.points[4],r=t.points[5],i=t.points[4]+r,a=Math.PI/180;
1if(Math.abs(e-i)<a&&(a=Math.abs(e-i)),r<0)for(let r=e-a;r>i;r-=a){let e=s.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);n.push(e.x,e.y)}else for(let r=e+a;r<i;r+=a){let e=s.getPointOnEllipticalArc(t.points[0],t.points[1],t.points[2],t.points[3],r,0);n.push(e.x,e.y)}}else if("C"===t.command)for(let e=0;e<=1;e+=.01){let r=s.getPointOnCubicBezier(e,t.start.x,t.start.y,t.points[0],t.points[1],t.points[2],t.points[3],t.points[4],t.points[5]);n.push(r.x,r.y)}else n=n.concat(t.points)});let r=n[0],i=n[0],a=n[1],o=n[1];for(let s=0;s<n.length/2;s++)t=n[2*s],e=n[2*s+1],isNaN(t)||(r=Math.min(r,t),i=Math.max(i,t)),isNaN(e)||(a=Math.min(a,e),o=Math.max(o,e));return{x:r,y:a,width:i-r,height:o-a}}getLength(){return this.pathLength}getPointAtLength(t){return s.getPointAtLengthOfDataArray(t,this.dataArray)}static getLineLength(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}static getPathLength(t){let e=0;for(let n=0;n<t.length;++n)e+=t[n].pathLength;return e}static getPointAtLengthOfDataArray(t,e){let n,r=0,i=e.length;if(!i)return null;for(;r<i&&t>e[r].pathLength;)t-=e[r].pathLength,++r;if(r===i)return{x:(n=e[r-1].points.slice(-2))[0],y:n[1]};if(t<.01)return{x:(n=e[r].points.slice(0,2))[0],y:n[1]};let a=e[r],l=a.points;switch(a.command){case"L":return s.getPointOnLine(t,a.start.x,a.start.y,l[0],l[1]);case"C":return s.getPointOnCubicBezier((0,o.t2length)(t,s.getPathLength(e),t=>(0,o.getCubicArcLength)([a.start.x,l[0],l[2],l[4]],[a.start.y,l[1],l[3],l[5]],t)),a.start.x,a.start.y,l[0],l[1],l[2],l[3],l[4],l[5]);case"Q":return s.getPointOnQuadraticBezier((0,o.t2length)(t,s.getPathLength(e),t=>(0,o.getQuadraticArcLength)([a.start.x,l[0],l[2]],[a.start.y,l[1],l[3]],t)),a.start.x,a.start.y,l[0],l[1],l[2],l[3]);case"A":var h=l[0],u=l[1],d=l[2],c=l[3],f=l[4],g=l[5],p=l[6];return f+=g*t/a.pathLength,s.getPointOnEllipticalArc(h,u,d,c,f,p)}return null}static getPointOnLine(t,e,n,r,i,a,o){a=null!=a?a:e,o=null!=o?o:n;let s=this.getLineLength(e,n,r,i);if(s<1e-10)return{x:e,y:n};if(r===e)return{x:a,y:o+(i>n?t:-t)};let l=(i-n)/(r-e),h=Math.sqrt(t*t/(1+l*l))*(r<e?-1:1);if(1e-10>Math.abs(o-n-l*(a-e)))return{x:a+h,y:o+l*h};let u=((a-e)*(r-e)+(o-n)*(i-n))/(s*s),d=e+u*(r-e),c=n+u*(i-n),f=this.getLineLength(a,o,d,c),g=Math.sqrt(t*t-f*f),p=Math.sqrt(g*g/(1+l*l))*(r<e?-1:1);return{x:d+p,y:c+l*p}}static getPointOnCubicBezier(t,e,n,r,i,a,o,s,l){function h(t){return 3*t*(1-t)*(1-t)}return{x:t*t*t*s+3*t*t*(1-t)*a+r*h(t)+(1-t)*(1-t)*(1-t)*e,y:t*t*t*l+3*t*t*(1-t)*o+i*h(t)+(1-t)*(1-t)*(1-t)*n}}static getPointOnQuadraticBezier(t,e,n,r,i,a,o){return{x:t*t*a+2*t*(1-t)*r+(1-t)*(1-t)*e,y:t*t*o+2*t*(1-t)*i+(1-t)*(1-t)*n}}static getPointOnEllipticalArc(t,e,n,r,i,a){let o=Math.cos(a),s=Math.sin(a),l={x:n*Math.cos(i),y:r*Math.sin(i)};return{x:t+(l.x*o-l.y*s),y:e+(l.x*s+l.y*o)}}static parsePathData(t){let e;if(!t)return[];let n=t,r=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];n=n.replace(RegExp(" ","g"),",");for(var i=0;i<r.length;i++)n=n.replace(RegExp(r[i],"g"),"|"+r[i]);let a=n.split("|"),o=[],s=[],l=0,h=0,u=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(i=1;i<a.length;i++){let t=a[i],n=t.charAt(0);for(t=t.slice(1),s.length=0;e=u.exec(t);)s.push(e[0]);let r=[];for(let t=0,e=s.length;t<e;t++){if("00"===s[t]){r.push(0,0);continue}let e=parseFloat(s[t]);isNaN(e)?r.push(0):r.push(e)}for(;r.length>0&&!isNaN(r[0]);){let t="",e=[],i=l,a=h;switch(n){case"l":l+=r.shift(),h+=r.shift(),t="L",e.push(l,h);break;case"L":l=r.shift(),h=r.shift(),e.push(l,h);break;case"m":var d,c,f,g,p,m,y,v,b,_,S=r.shift(),x=r.shift();if(l+=S,h+=x,t="M",o.length>2&&"z"===o[o.length-1].command){for(let t=o.length-2;t>=0;t--)if("M"===o[t].command){l=o[t].points[0]+S,h=o[t].points[1]+x;break}}e.push(l,h),n="l";break;case"M":l=r.shift(),h=r.shift(),t="M",e.push(l,h),n="L";break;case"h":l+=r.shift(),t="L",e.push(l,h);break;case"H":l=r.shift(),t="L",e.push(l,h);break;case"v":h+=r.shift(),t="L",e.push(l,h);break;case"V":h=r.shift(),t="L",e.push(l,h);break;case"C":e.push(r.shift(),r.shift(),r.shift(),r.shift()),l=r.shift(),h=r.shift(),e.push(l,h);break;case"c":e.push(l+r.shift(),h+r.shift(),l+r.shift(),h+r.shift()),l+=r.shift(),h+=r.shift(),t="C",e.push(l,h);break;case"S":c=l,f=h,"C"===(d=o[o.length-1]).command&&(c=l+(l-d.points[2]),f=h+(h-d.points[3])),e.push(c,f,r.shift(),r.shift()),l=r.shift(),h=r.shift(),t="C",e.push(l,h);break;case"s":c=l,f=h,"C"===(d=o[o.length-1]).command&&(c=l+(l-d.points[2]),f=h+(h-d.points[3])),e.push(c,f,l+r.shift(),h+r.shift()),l+=r.shift(),h+=r.shift(),t="C",e.push(l,h);break;case"Q":e.push(r.shift(),r.shift()),l=r.shift(),h=r.shift(),e.push(l,h);break;case"q":e.push(l+r.shift(),h+r.shift()),l+=r.shift(),h+=r.shift(),t="Q",e.push(l,h);break;case"T":c=l,f=h,"Q"===(d=o[o.length-1]).command&&(c=l+(l-d.points[0]),f=h+(h-d.points[1])),l=r.shift(),h=r.shift(),t="Q",e.push(c,f,l,h);break;case"t":c=l,f=h,"Q"===(d=o[o.length-1]).command&&(c=l+(l-d.points[0]),f=h+(h-d.points[1])),l+=r.shift(),h+=r.shift(),t="Q",e.push(c,f,l,h);break;case"A":g=r.shift(),p=r.shift(),m=r.shift(),y=r.shift(),v=r.shift(),b=l,_=h,l=r.shift(),h=r.shift(),t="A",e=this.convertEndpointToCenterParameterization(b,_,l,h,y,v,g,p,m);break;case"a":g=r.shift(),p=r.shift(),m=r.shift(),y=r.shift(),v=r.shift(),b=l,_=h,l+=r.shift(),h+=r.shift(),t="A",e=this.convertEndpointToCenterParameterization(b,_,l,h,y,v,g,p,m)}o.push({command:t||n,points:e,start:{x:i,y:a},pathLength:this.calcLength(i,a,t||n,e)})}("z"===n||"Z"===n)&&o.push({command:"z",points:[],start:void 0,pathLength:0})}return o}static calcLength(t,e,n,r){let i,a,l,h;switch(n){case"L":return s.getLineLength(t,e,r[0],r[1]);case"C":return(0,o.getCubicArcLength)([t,r[0],r[2],r[4]],[e,r[1],r[3],r[5]],1);case"Q":return(0,o.getQuadraticArcLength)([t,r[0],r[2]],[e,r[1],r[3]],1);case"A":i=0;var u=r[4],d=r[5],c=r[4]+d,f=Math.PI/180;
1if(Math.abs(u-c)<f&&(f=Math.abs(u-c)),a=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],u,0),d<0)for(h=u-f;h>c;h-=f)l=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),i+=s.getLineLength(a.x,a.y,l.x,l.y),a=l;else for(h=u+f;h<c;h+=f)l=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],h,0),i+=s.getLineLength(a.x,a.y,l.x,l.y),a=l;return l=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],c,0),i+=s.getLineLength(a.x,a.y,l.x,l.y)}return 0}static convertEndpointToCenterParameterization(t,e,n,r,i,a,o,s,l){let h=Math.PI/180*l,u=Math.cos(h)*(t-n)/2+Math.sin(h)*(e-r)/2,d=-1*Math.sin(h)*(t-n)/2+Math.cos(h)*(e-r)/2,c=u*u/(o*o)+d*d/(s*s);c>1&&(o*=Math.sqrt(c),s*=Math.sqrt(c));let f=Math.sqrt((o*o*(s*s)-o*o*(d*d)-s*s*(u*u))/(o*o*(d*d)+s*s*(u*u)));i===a&&(f*=-1),isNaN(f)&&(f=0);let g=f*o*d/s,p=-(f*s)*u/o,m=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},y=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(m(t)*m(e))},v=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(y(t,e))},b=v([1,0],[(u-g)/o,(d-p)/s]),_=[(u-g)/o,(d-p)/s],S=[(-1*u-g)/o,(-1*d-p)/s],x=v(_,S);return -1>=y(_,S)&&(x=Math.PI),y(_,S)>=1&&(x=0),0===a&&x>0&&(x-=2*Math.PI),1===a&&x<0&&(x+=2*Math.PI),[(t+n)/2+Math.cos(h)*g-Math.sin(h)*p,(e+r)/2+Math.sin(h)*g+Math.cos(h)*p,o,s,b,x,h,a]}}e.Path=s,s.prototype.className="Path",s.prototype._attrsAffectingSize=["data"],(0,a._registerNode)(s),r.Factory.addGetterSetter(s,"data")},75244:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Rect=void 0;let r=n(1455),i=n(97955),a=n(54417),o=n(68588),s=n(53774);class l extends i.Shape{_sceneFunc(t){let e=this.cornerRadius(),n=this.width(),r=this.height();t.beginPath(),e?o.Util.drawRoundedRectPath(t,n,r,e):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}}e.Rect=l,l.prototype.className="Rect",(0,a._registerNode)(l),r.Factory.addGetterSetter(l,"cornerRadius",0,(0,s.getNumberOrArrayOfNumbersValidator)(4))},31785:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegularPolygon=void 0;let r=n(1455),i=n(97955),a=n(53774),o=n(54417);class s extends i.Shape{_sceneFunc(t){let e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(let n=1;n<e.length;n++)t.lineTo(e[n].x,e[n].y);t.closePath(),t.fillStrokeShape(this)}_getPoints(){let t=this.attrs.sides,e=this.attrs.radius||0,n=[];for(let r=0;r<t;r++)n.push({x:e*Math.sin(2*r*Math.PI/t),y:-1*e*Math.cos(2*r*Math.PI/t)});return n}getSelfRect(){let t=this._getPoints(),e=t[0].x,n=t[0].y,r=t[0].x,i=t[0].y;return t.forEach(t=>{e=Math.min(e,t.x),n=Math.max(n,t.x),r=Math.min(r,t.y),i=Math.max(i,t.y)}),{x:e,y:r,width:n-e,height:i-r}}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}e.RegularPolygon=s,s.prototype.className="RegularPolygon",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["radius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"radius",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"sides",0,(0,a.getNumberValidator)())},60657:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Ring=void 0;let r=n(1455),i=n(97955),a=n(53774),o=n(54417),s=2*Math.PI;class l extends i.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,s,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),s,0,!0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}e.Ring=l,l.prototype.className="Ring",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(l),r.Factory.addGetterSetter(l,"innerRadius",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(l,"outerRadius",0,(0,a.getNumberValidator)())},88986:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sprite=void 0;let r=n(1455),i=n(97955),a=n(16745),o=n(53774),s=n(54417);class l extends i.Shape{constructor(t){super(t),this._updated=!0,this.anim=new a.Animation(()=>{let t=this._updated;return this._updated=!1,t}),this.on("animationChange.konva",function(){this.frameIndex(0)}),this.on("frameIndexChange.konva",function(){this._updated=!0}),this.on("frameRateChange.konva",function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})}_sceneFunc(t){let e=this.animation(),n=this.frameIndex(),r=4*n,i=this.animations()[e],a=this.frameOffsets(),o=i[r+0],s=i[r+1],l=i[r+2],h=i[r+3],u=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,l,h),t.closePath(),t.fillStrokeShape(this)),u){if(a){let r=a[e],i=2*n;t.drawImage(u,o,s,l,h,r[i+0],r[i+1],l,h)}else t.drawImage(u,o,s,l,h,0,0,l,h)}}_hitFunc(t){let e=this.animation(),n=this.frameIndex(),r=4*n,i=this.animations()[e],a=this.frameOffsets(),o=i[r+2],s=i[r+3];if(t.beginPath(),a){let r=a[e],i=2*n;t.rect(r[i+0],r[i+1],o,s)}else t.rect(0,0,o,s);t.closePath(),t.fillShape(this)}_useBufferCanvas(){return super._useBufferCanvas(!0)}_setInterval(){let t=this;this.interval=setInterval(function(){t._updateIndex()},1e3/this.frameRate())}
1start(){if(this.isRunning())return;let t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}stop(){this.anim.stop(),clearInterval(this.interval)}isRunning(){return this.anim.isRunning()}_updateIndex(){let t=this.frameIndex(),e=this.animation();t<this.animations()[e].length/4-1?this.frameIndex(t+1):this.frameIndex(0)}}e.Sprite=l,l.prototype.className="Sprite",(0,s._registerNode)(l),r.Factory.addGetterSetter(l,"animation"),r.Factory.addGetterSetter(l,"animations"),r.Factory.addGetterSetter(l,"frameOffsets"),r.Factory.addGetterSetter(l,"image"),r.Factory.addGetterSetter(l,"frameIndex",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"frameRate",17,(0,o.getNumberValidator)()),r.Factory.backCompat(l,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"})},71964:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Star=void 0;let r=n(1455),i=n(97955),a=n(53774),o=n(54417);class s extends i.Shape{_sceneFunc(t){let e=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(let i=1;i<2*r;i++){let a=i%2==0?n:e,o=a*Math.sin(i*Math.PI/r),s=-1*a*Math.cos(i*Math.PI/r);t.lineTo(o,s)}t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.outerRadius()}getHeight(){return 2*this.outerRadius()}setWidth(t){this.outerRadius(t/2)}setHeight(t){this.outerRadius(t/2)}}e.Star=s,s.prototype.className="Star",s.prototype._centroid=!0,s.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,o._registerNode)(s),r.Factory.addGetterSetter(s,"numPoints",5,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"innerRadius",0,(0,a.getNumberValidator)()),r.Factory.addGetterSetter(s,"outerRadius",0,(0,a.getNumberValidator)())},70972:function(t,e,n){"use strict";let r;Object.defineProperty(e,"__esModule",{value:!0}),e.Text=void 0,e.stringToArray=u;let i=n(68588),a=n(1455),o=n(97955),s=n(54417),l=n(53774),h=n(54417);function u(t){return[...t].reduce((t,e,n,r)=>{if(/\p{Emoji}/u.test(e)){let i=r[n+1];i&&/\p{Emoji_Modifier}|\u200D/u.test(i)?(t.push(e+i),r[n+1]=""):t.push(e)}else/\p{Regional_Indicator}{2}/u.test(e+(r[n+1]||""))?t.push(e+r[n+1]):n>0&&/\p{Mn}|\p{Me}|\p{Mc}/u.test(e)?t[t.length-1]+=e:e&&t.push(e);return t},[])}let d="auto",c="inherit",f="justify",g="left",p="middle",m="normal",y="none",v=["direction","fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],b=v.length;function _(){return r||(r=i.Util.createCanvasElement().getContext("2d"))}class S extends o.Shape{constructor(t){var e;super(((e=(e=t)||{}).fillLinearGradientColorStops||e.fillRadialGradientColorStops||e.fillPatternImage||(e.fill=e.fill||"black"),e)),this._partialTextX=0,this._partialTextY=0;for(let t=0;t<b;t++)this.on(v[t]+"Change.konva",this._setTextData);this._setTextData()}_sceneFunc(t){let e=this.textArr,n=e.length;if(!this.text())return;let r=this.padding(),i=this.fontSize(),a=this.lineHeight()*i,o=this.verticalAlign(),l=this.direction(),h=0,d=this.align(),m=this.getWidth(),y=this.letterSpacing(),v=this.fill(),b=this.textDecoration(),_=-1!==b.indexOf("underline"),S=-1!==b.indexOf("line-through"),x;l=l===c?t.direction:l;let w=a/2,C=p;if(s.Konva._fixTextRendering){let t=this.measureSize("M");C="alphabetic",w=(t.fontBoundingBoxAscent-t.fontBoundingBoxDescent)/2+a/2}var k=0,P=0;for("rtl"===l&&t.setAttr("direction",l),t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",C),t.setAttr("textAlign",g),o===p?h=(this.getHeight()-n*a-2*r)/2:"bottom"===o&&(h=this.getHeight()-n*a-2*r),t.translate(r,h+r),x=0;x<n;x++){var T,E,k=0,P=0,F=e[x],M=F.text,N=F.width,A=F.lastInParagraph;if(t.save(),"right"===d?k+=m-N-2*r:"center"===d&&(k+=(m-N-2*r)/2),_){t.save(),t.beginPath();let e=s.Konva._fixTextRendering?Math.round(i/4):Math.round(i/2),n=k,a=w+P+e;t.moveTo(n,a),T=M.split(" ").length-1,E=d!==f||A?N:m-2*r,t.lineTo(n+Math.round(E),a),t.lineWidth=i/15;let o=this._getLinearGradient();t.strokeStyle=o||v,t.stroke(),t.restore()}if(S){t.save(),t.beginPath();let e=s.Konva._fixTextRendering?-Math.round(i/4):0;t.moveTo(k,w+P+e),T=M.split(" ").length-1,E=d!==f||A?N:m-2*r,t.lineTo(k+Math.round(E),w+P+e),t.lineWidth=i/15;let n=this._getLinearGradient();
1t.strokeStyle=n||v,t.stroke(),t.restore()}if("rtl"!==l&&(0!==y||d===f)){T=M.split(" ").length-1;let e=u(M);for(let n=0;n<e.length;n++){let i=e[n];" "!==i||A||d!==f||(k+=(m-2*r-N)/T),this._partialTextX=k,this._partialTextY=w+P,this._partialText=i,t.fillStrokeShape(this),k+=this.measureSize(i).width+y}}else 0!==y&&t.setAttr("letterSpacing",`${y}px`),this._partialTextX=k,this._partialTextY=w+P,this._partialText=M,t.fillStrokeShape(this);t.restore(),n>1&&(w+=a)}}_hitFunc(t){let e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}setText(t){let e=i.Util._isString(t)?t:null==t?"":t+"";return this._setAttr("text",e),this}getWidth(){return this.attrs.width===d||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}getHeight(){return this.attrs.height===d||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}getTextWidth(){return this.textWidth}getTextHeight(){return i.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}measureSize(t){var e,n,r,i,a,o,s,l,h,u,d;let c=_(),f=this.fontSize(),g;c.save(),c.font=this._getContextFont(),g=c.measureText(t),c.restore();let p=f/100;return{actualBoundingBoxAscent:null!==(e=g.actualBoundingBoxAscent)&&void 0!==e?e:71.58203125*p,actualBoundingBoxDescent:null!==(n=g.actualBoundingBoxDescent)&&void 0!==n?n:0,actualBoundingBoxLeft:null!==(r=g.actualBoundingBoxLeft)&&void 0!==r?r:-7.421875*p,actualBoundingBoxRight:null!==(i=g.actualBoundingBoxRight)&&void 0!==i?i:75.732421875*p,alphabeticBaseline:null!==(a=g.alphabeticBaseline)&&void 0!==a?a:0,emHeightAscent:null!==(o=g.emHeightAscent)&&void 0!==o?o:100*p,emHeightDescent:null!==(s=g.emHeightDescent)&&void 0!==s?s:-20*p,fontBoundingBoxAscent:null!==(l=g.fontBoundingBoxAscent)&&void 0!==l?l:91*p,fontBoundingBoxDescent:null!==(h=g.fontBoundingBoxDescent)&&void 0!==h?h:21*p,hangingBaseline:null!==(u=g.hangingBaseline)&&void 0!==u?u:72.80000305175781*p,ideographicBaseline:null!==(d=g.ideographicBaseline)&&void 0!==d?d:-21*p,width:g.width,height:f}}_getContextFont(){return this.fontStyle()+" "+this.fontVariant()+" "+this.fontSize()+"px "+this.fontFamily().split(",").map(t=>{let e=(t=t.trim()).indexOf(" ")>=0,n=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!n&&(t=`"${t}"`),t}).join(", ")}_addTextLine(t){this.align()===f&&(t=t.trim());let e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}_getTextWidth(t){let e=this.letterSpacing(),n=t.length;return _().measureText(t).width+e*n}_setTextData(){let t=this.text().split("\n"),e=+this.fontSize(),n=0,r=this.lineHeight()*e,i=this.attrs.width,a=this.attrs.height,o=i!==d&&void 0!==i,s=a!==d&&void 0!==a,l=this.padding(),h=i-2*l,c=a-2*l,f=0,g=this.wrap(),p="char"!==g&&g!==y,m=this.ellipsis();this.textArr=[],_().font=this._getContextFont();let v=m?this._getTextWidth("…"):0;for(let e=0,i=t.length;e<i;++e){let a=t[e],l=this._getTextWidth(a);if(o&&l>h)for(;a.length>0;){let t=0,e=u(a).length,i="",o=0;for(;t<e;){let n=t+e>>>1,r=u(a).slice(0,n+1).join(""),s=this._getTextWidth(r)+v;s<=h?(t=n+1,i=r,o=s):e=n}if(i){if(p){let e;let n=u(a),r=u(i),s=n[r.length];(e=(" "===s||"-"===s)&&o<=h?r.length:Math.max(r.lastIndexOf(" "),r.lastIndexOf("-"))+1)>0&&(t=e,i=n.slice(0,t).join(""),o=this._getTextWidth(i))}if(i=i.trimRight(),this._addTextLine(i),n=Math.max(n,o),f+=r,this._shouldHandleEllipsis(f)){this._tryToAddEllipsisToLastLine();break}if((a=u(a).slice(t).join("").trimLeft()).length>0&&(l=this._getTextWidth(a))<=h){this._addTextLine(a),f+=r,n=Math.max(n,l);break}}else break}else this._addTextLine(a),f+=r,n=Math.max(n,l),this._shouldHandleEllipsis(f)&&e<i-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),s&&f+r>c)break}this.textHeight=e,this.textWidth=n}_shouldHandleEllipsis(t){let e=+this.fontSize(),n=this.lineHeight()*e,r=this.attrs.height,i=this.padding();return!(this.wrap()!==y)||r!==d&&void 0!==r&&t+n>r-2*i}_tryToAddEllipsisToLastLine(){let t=this.attrs.width,e=this.padding(),n=this.ellipsis(),r=this.textArr[this.textArr.length-1];r&&n&&(t===d||void 0===t||this._getTextWidth(r.text+"…")<t-2*e||(r.text=r.text.slice(0,r.text.length-3)),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(r.text
1+"…"))}getStrokeScaleEnabled(){return!0}_useBufferCanvas(){let t=-1!==this.textDecoration().indexOf("underline")||-1!==this.textDecoration().indexOf("line-through"),e=this.hasShadow();return!!t&&!!e||super._useBufferCanvas()}}e.Text=S,S.prototype._fillFunc=function(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)},S.prototype._strokeFunc=function(t){t.setAttr("miterLimit",2),t.strokeText(this._partialText,this._partialTextX,this._partialTextY)},S.prototype.className="Text",S.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,h._registerNode)(S),a.Factory.overWriteSetter(S,"width",(0,l.getNumberOrAutoValidator)()),a.Factory.overWriteSetter(S,"height",(0,l.getNumberOrAutoValidator)()),a.Factory.addGetterSetter(S,"direction",c),a.Factory.addGetterSetter(S,"fontFamily","Arial"),a.Factory.addGetterSetter(S,"fontSize",12,(0,l.getNumberValidator)()),a.Factory.addGetterSetter(S,"fontStyle",m),a.Factory.addGetterSetter(S,"fontVariant",m),a.Factory.addGetterSetter(S,"padding",0,(0,l.getNumberValidator)()),a.Factory.addGetterSetter(S,"align",g),a.Factory.addGetterSetter(S,"verticalAlign","top"),a.Factory.addGetterSetter(S,"lineHeight",1,(0,l.getNumberValidator)()),a.Factory.addGetterSetter(S,"wrap","word"),a.Factory.addGetterSetter(S,"ellipsis",!1,(0,l.getBooleanValidator)()),a.Factory.addGetterSetter(S,"letterSpacing",0,(0,l.getNumberValidator)()),a.Factory.addGetterSetter(S,"text","",(0,l.getStringValidator)()),a.Factory.addGetterSetter(S,"textDecoration","")},82831:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextPath=void 0;let r=n(68588),i=n(1455),a=n(97955),o=n(87339),s=n(70972),l=n(53774),h=n(54417),u="normal";function d(t){t.fillText(this.partialText,0,0)}function c(t){t.strokeText(this.partialText,0,0)}class f extends a.Shape{constructor(t){super(t),this.dummyCanvas=r.Util.createCanvasElement(),this.dataArray=[],this._readDataAttribute(),this.on("dataChange.konva",function(){this._readDataAttribute(),this._setTextData()}),this.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncCh
1ange.konva fontSizeChange.konva fontFamilyChange.konva",this._setTextData),this._setTextData()}_getTextPathLength(){return o.Path.getPathLength(this.dataArray)}_getPointAtLength(t){return!this.attrs.data||t-1>this.pathLength?null:o.Path.getPointAtLengthOfDataArray(t,this.dataArray)}_readDataAttribute(){this.dataArray=o.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}_sceneFunc(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();let e=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo;"underline"===e&&t.beginPath();for(let n=0;n<i.length;n++){t.save();let a=i[n].p0;t.translate(a.x,a.y),t.rotate(i[n].rotation),this.partialText=i[n].text,t.fillStrokeShape(this),"underline"===e&&(0===n&&t.moveTo(0,r/2+1),t.lineTo(r,r/2+1)),t.restore()}"underline"===e&&(t.strokeStyle=n,t.lineWidth=r/20,t.stroke()),t.restore()}_hitFunc(t){t.beginPath();let e=this.glyphInfo;if(e.length>=1){let n=e[0].p0;t.moveTo(n.x,n.y)}for(let n=0;n<e.length;n++){let r=e[n].p1;t.lineTo(r.x,r.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}getTextWidth(){return this.textWidth}getTextHeight(){return r.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}setText(t){return s.Text.prototype.setText.call(this,t)}_getContextFont(){return s.Text.prototype._getContextFont.call(this)}_getTextSize(t){let e=this.dummyCanvas.getContext("2d");e.save(),e.font=this._getContextFont();let n=e.measureText(t);return e.restore(),{width:n.width,height:parseInt(`${this.fontSize()}`,10)}}_setTextData(){let{width:t,height:e}=this._getTextSize(this.attrs.text);if(this.textWidth=t,this.textHeight=e,this.glyphInfo=[],!this.attrs.data)return null;let n=this.letterSpacing(),r=this.align(),i=this.kerningFunc(),a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*n,0),l=0;"center"===r&&(l=Math.max(0,this.pathLength/2-a/2)),"right"===r&&(l=Math.max(0,this.pathLength-a));let h=(0,s.stringToArray)(this.text()),u=l;for(let t=0;t<h.length;t++){let e=this._getPointAtLength(u);if(!e)return;let s=this._getTextSize(h[t]).width+n;if(" "===h[t]&&"justify"===r){let t=this.text().split(" ").length-1;s+=(this.pathLength-a)/t}let l=this._getPointAtLength(u+s);if(!l)return;let d=o.Path.getLineLength(e.x,e.y,l.x,l.y),c=0;if(i)try{c=i(h[t-1],h[t])*this.fontSize()}catch(t){c=0}e.x+=c,l.x+=c,this.textWidth+=c;let f=o.Path.getPointOnLine(c+d/2,e.x,e.y,l.x,l.y),g=Math.atan2(l.y-e.y,l.x-e.x);this.glyphInfo.push({transposeX:f.x,transposeY:f.y,text:h[t],rotation:g,p0:e,p1:l}),u+=s}}getSelfRect(){let t,e;if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};let n=[];this.glyphInfo.forEach(function(t){n.push(t.p0.x),n.push(t.p0.y),n.push(t.p1.x),n.push(t.p1.y)});let r=n[0]||0,i=n[0]||0,a=n[1]||0,o=n[1]||0;for(let s=0;s<n.length/2;s++)t=n[2*s],e=n[2*s+1],r=Math.min(r,t),i=Math.max(i,t),a=Math.min(a,e),o=Math.max(o,e);let s=this.fontSize();return{x:r-s/2,y:a-s/2,width:i-r+s,height:o-a+s}}destroy(){return r.Util.releaseCanvas(this.dummyCanvas),super.destroy()}}e.TextPath=f,f.prototype._fillFunc=d,f.prototype._strokeFunc=c,f.prototype._fillFuncHit=d,f.prototype._strokeFuncHit=c,f.prototype.className="TextPath",f.prototype._attrsAffectingSize=["text","fontSize","data"],(0,h._registerNode)(f),i.Factory.addGetterSetter(f,"data"),i.Factory.addGetterSetter(f,"fontFamily","Arial"),i.Factory.addGetterSetter(f,"fontSize",12,(0,l.getNumberValidator)()),i.Factory.addGetterSetter(f,"fontStyle",u),i.Factory.addGetterSetter(f,"align","left"),i.Factory.addGetterSetter(f,"letterSpacing",0,(0,l.getNumberValidator)()),i.Factory.addGetterSetter(f,"textBaseline","middle"),i.Factory.addGetterSetter(f,"fontVariant",u),i.Factory.addGetterSetter(f,"text",""),i.Factory.addGetterSetter(f,"textDecoration",""),i.Factory.addGetterSetter(f,"kerningFunc",void 0)},29516:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Transformer=void 0;let r=n(68588),i=n(1455),a=n(77939),o=n(97955),s=n(75244),l=n(58985),h=n(54417),u=n(53774),d=n(54417),c="tr-konva",f=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange","anchorStyleFuncChange"].map(t=>t+`.${c}`).join(" "),g="nodesRect",p=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],m={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},y="ontouchstart"in h.Konva._global,v=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];
1function b(t,e,n){let r=n.x+(t.x-n.x)*Math.cos(e)-(t.y-n.y)*Math.sin(e),i=n.y+(t.x-n.x)*Math.sin(e)+(t.y-n.y)*Math.cos(e);return{...t,rotation:t.rotation+e,x:r,y:i}}let _=0;class S extends l.Group{constructor(t){super(t),this._movingAnchorName=null,this._transforming=!1,this._createElements(),this._handleMouseMove=this._handleMouseMove.bind(this),this._handleMouseUp=this._handleMouseUp.bind(this),this.update=this.update.bind(this),this.on(f,this.update),this.getNode()&&this.update()}attachTo(t){return this.setNode(t),this}setNode(t){return r.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}getNode(){return this._nodes&&this._nodes[0]}_getEventNamespace(){return c+this._id}setNodes(t=[]){this._nodes&&this._nodes.length&&this.detach();let e=t.filter(t=>!t.isAncestorOf(this)||(r.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1));return this._nodes=t=e,1===t.length&&this.useSingleNodeRotation()?this.rotation(t[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach(t=>{let e=()=>{1===this.nodes().length&&this.useSingleNodeRotation()&&this.rotation(this.nodes()[0].getAbsoluteRotation()),this._resetTransformCache(),this._transforming||this.isDragging()||this.update()},n=t._attrsAffectingSize.map(t=>t+"Change."+this._getEventNamespace()).join(" ");t.on(n,e),t.on(p.map(t=>t+`.${this._getEventNamespace()}`).join(" "),e),t.on(`absoluteTransformChange.${this._getEventNamespace()}`,e),this._proxyDrag(t)}),this._resetTransformCache(),this.findOne(".top-left")&&this.update(),this}_proxyDrag(t){let e;t.on(`dragstart.${this._getEventNamespace()}`,n=>{e=t.getAbsolutePosition(),this.isDragging()||t===this.findOne(".back")||this.startDrag(n,!1)}),t.on(`dragmove.${this._getEventNamespace()}`,n=>{if(!e)return;let r=t.getAbsolutePosition(),i=r.x-e.x,a=r.y-e.y;this.nodes().forEach(e=>{if(e===t||e.isDragging())return;let r=e.getAbsolutePosition();e.setAbsolutePosition({x:r.x+i,y:r.y+a}),e.startDrag(n)}),e=null})}getNodes(){return this._nodes||[]}getActiveAnchor(){return this._movingAnchorName}detach(){this._nodes&&this._nodes.forEach(t=>{t.off("."+this._getEventNamespace())}),this._nodes=[],this._resetTransformCache()}_resetTransformCache(){this._clearCache(g),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}_getNodeRect(){return this._getCache(g,this.__getNodeRect)}__getNodeShape(t,e=this.rotation(),n){let r=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),i=t.getAbsoluteScale(n),a=t.getAbsolutePosition(n),o=r.x*i.x-t.offsetX()*i.x,s=r.y*i.y-t.offsetY()*i.y,l=(h.Konva.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return b({x:a.x+o*Math.cos(l)+s*Math.sin(-l),y:a.y+s*Math.cos(l)+o*Math.sin(l),width:r.width*i.x,height:r.height*i.y,rotation:l},-h.Konva.getAngle(e),{x:0,y:0})}__getNodeRect(){if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};let t=[];this.nodes().map(e=>{let n=e.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),r=[{x:n.x,y:n.y},{x:n.x+n.width,y:n.y},{x:n.x+n.width,y:n.y+n.height},{x:n.x,y:n.y+n.height}],i=e.getAbsoluteTransform();r.forEach(function(e){let n=i.point(e);t.push(n)})});let e=new r.Transform;e.rotate(-h.Konva.getAngle(this.rotation()));let n=1/0,i=1/0,a=-1/0,o=-1/0;t.forEach(function(t){let r=e.point(t);void 0===n&&(n=a=r.x,i=o=r.y),n=Math.min(n,r.x),i=Math.min(i,r.y),a=Math.max(a,r.x),o=Math.max(o,r.y)}),e.invert();let s=e.point({x:n,y:i});return{x:s.x,y:s.y,width:a-n,height:o-i,rotation:h.Konva.getAngle(this.rotation())}}getX(){return this._getNodeRect().x}getY(){return this._getNodeRect().y}getWidth(){return this._getNodeRect().width}getHeight(){return this._getNodeRect().height}_createElements(){this._createBack(),v.forEach(t=>{this._createAnchor(t)}),this._createAnchor("rotater")}_createAnchor(t){let e=new s.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:y?10:"auto"}),n=this;e.on("mousedown touchstart",function(t){n._handleMouseDown(t)}),e.on("dragstart",t=>
1{e.stopDrag(),t.cancelBubble=!0}),e.on("dragend",t=>{t.cancelBubble=!0}),e.on("mouseenter",()=>{let n=function(t,e,n){if("rotater"===t)return n;e+=r.Util.degToRad(m[t]||0);let i=(r.Util.radToDeg(e)%360+360)%360;if(r.Util._inRange(i,337.5,360)||r.Util._inRange(i,0,22.5))return"ns-resize";if(r.Util._inRange(i,22.5,67.5))return"nesw-resize";if(r.Util._inRange(i,67.5,112.5))return"ew-resize";if(r.Util._inRange(i,112.5,157.5))return"nwse-resize";if(r.Util._inRange(i,157.5,202.5))return"ns-resize";if(r.Util._inRange(i,202.5,247.5))return"nesw-resize";if(r.Util._inRange(i,247.5,292.5))return"ew-resize";else if(r.Util._inRange(i,292.5,337.5))return"nwse-resize";else return r.Util.error("Transformer has unknown angle for cursor detection: "+i),"pointer"}(t,h.Konva.getAngle(this.rotation()),this.rotateAnchorCursor());e.getStage().content&&(e.getStage().content.style.cursor=n),this._cursorChange=!0}),e.on("mouseout",()=>{e.getStage().content&&(e.getStage().content.style.cursor=""),this._cursorChange=!1}),this.add(e)}_createBack(){let t=new o.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc(t,e){let n=e.getParent(),i=n.padding();t.beginPath(),t.rect(-i,-i,e.width()+2*i,e.height()+2*i),t.moveTo(e.width()/2,-i),n.rotateEnabled()&&n.rotateLineVisible()&&t.lineTo(e.width()/2,-n.rotateAnchorOffset()*r.Util._sign(e.height())-i),t.fillStrokeShape(e)},hitFunc:(t,e)=>{if(!this.shouldOverdrawWholeArea())return;let n=this.padding();t.beginPath(),t.rect(-n,-n,e.width()+2*n,e.height()+2*n),t.fillStrokeShape(e)}});this.add(t),this._proxyDrag(t),t.on("dragstart",t=>{t.cancelBubble=!0}),t.on("dragmove",t=>{t.cancelBubble=!0}),t.on("dragend",t=>{t.cancelBubble=!0}),this.on("dragmove",t=>{this.update()})}_handleMouseDown(t){if(this._transforming)return;this._movingAnchorName=t.target.name().split(" ")[0];let e=this._getNodeRect(),n=e.width,r=e.height,i=Math.sqrt(Math.pow(n,2)+Math.pow(r,2));this.sin=Math.abs(r/i),this.cos=Math.abs(n/i),"undefined"!=typeof window&&(window.addEventListener("mousemove",this._handleMouseMove),window.addEventListener("touchmove",this._handleMouseMove),window.addEventListener("mouseup",this._handleMouseUp,!0),window.addEventListener("touchend",this._handleMouseUp,!0)),this._transforming=!0;let a=t.target.getAbsolutePosition(),o=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:o.x-a.x,y:o.y-a.y},_++,this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach(e=>{e._fire("transformstart",{evt:t.evt,target:e})})}_handleMouseMove(t){let e,n,r,i;let a=this.findOne("."+this._movingAnchorName),o=a.getStage();o.setPointersPositions(t);let s=o.getPointerPosition(),l={x:s.x-this._anchorDragOffset.x,y:s.y-this._anchorDragOffset.y},u=a.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(u,l,t)),a.setAbsolutePosition(l);let d=a.getAbsolutePosition();if(u.x===d.x&&u.y===d.y)return;if("rotater"===this._movingAnchorName){let r=this._getNodeRect();e=a.x()-r.width/2;let i=Math.atan2(-(n=-a.y()+r.height/2),e)+Math.PI/2;r.height<0&&(i-=Math.PI);let o=h.Konva.getAngle(this.rotation())+i,s=h.Konva.getAngle(this.rotationSnapTolerance()),l=function(t,e,n){let r=e;for(let i=0;i<t.length;i++){let a=h.Konva.getAngle(t[i]),o=Math.abs(a-e)%(2*Math.PI);Math.min(o,2*Math.PI-o)<n&&(r=a)}return r}(this.rotationSnaps(),o,s)-r.rotation,u=function(t,e){let n={x:t.x+t.width/2*Math.cos(t.rotation)+t.height/2*Math.sin(-t.rotation),y:t.y+t.height/2*Math.cos(t.rotation)+t.width/2*Math.sin(t.rotation)};return b(t,e,n)}(r,l);this._fitNodesInto(u,t);return}let c=this.shiftBehavior();i="inverted"===c?this.keepRatio()&&!t.shiftKey:"none"===c?this.keepRatio():this.keepRatio()||t.shiftKey;var f=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(i){var g=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-right").x(),y:this.findOne(".bottom-right").y()};r=Math.sqrt(Math.pow(g.x-a.x(),2)+Math.pow(g.y-a.y(),2));var p=this.findOne(".top-left").x()>g.x?-1:1,m=this.findOne(".top-left").y()>g.y?-1:1;e=r*this.cos*p,n=r*this.sin*m,this.findOne(".top-left").x(g.x-e),this.findOne(".top-left").y(g.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(a.y());else if("top-right"===this._movingAnchorName){if(i){var g=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".bottom-left").x(),y:this.findOne(".bottom-left").y()};r=Math.sqrt(Math.pow(a.x()-g.x,2)+Math.pow(g.y-a.y(),2));var p=this.findOne(".top-right").x()<g.x?-1:1,m=this.findOne(".top-right").y()>g.y?-1:1;e=r*this.cos*p,n=r*this.sin*m,this.findOne(".top-right").x(g.x+e),this.findOne(".top-right").y(g.y-n)}var y=a.position();this.findOne(".top-left").y(y.y),this.findOne(".bottom-right").x(y.x)}else if("middle-left"===this._movingAnchorName)this.findOne(".top-left").x(a.x());else if("middle-right"===this._movingAnchorName)this.findOne(".bottom-right").x(a.x());else if("bottom-left"===this._movingAnchorName){if(i){var g=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-right").x(),y:this.findOne(".top-right").y()};r=Math.sqrt(Math.pow(g.x-a.x(),2)+Math.pow(a.y()-g.y,2));var p=g.x<a.x()?-1:1,m=a.y()<g.y?-1:1;e=r*this.cos*p,n=r*this.sin*m,a.x(g.x-e),a.y(g.y+n)}y=a.position(),this.findOne(".top-left").x(y.x),this.findOne(".bottom-right").y(y.y)}else if("bottom-center"===this._movingAnchorName)this.findOne(".bottom-right").y(a.y());else if("bottom-right"===this._movingAnchorName){if(i){var g=f?{x:this.width()/2,y:this.height()/2}:{x:this.findOne(".top-left").x(),y:this.findOne(".top-left").y()};r=Math.sqrt(Math.pow(a.x()-g.x,2)+Math.pow(a.y()-g.y,2));var p=this.findOne(".bottom-right").x()<g.x?-1:1,m=this.findOne(".bottom-right").y()<g.y?-1:1;e=r*this.cos*p,n=r*this.sin*m,this.findOne(".bottom-right").x(g.x+e),this.findOne(".bottom-right").y(g.y+n)}}else console.error(Error("Wrong position argument of selection resizer: "+this._movingAnchorName));var f=this.centeredScaling()||t.altKey;if(f){let t=this.findOne(".top-left"),e=this.findOne(".bottom-right"),n=t.x(),r=t.y(),i=this.getWidth()-e.x(),a=this.getHeight()-e.y();e.move({x:-n,y:-r}),t.move({x:i,y:a})}let v=this.findOne(".top-left").getAbsolutePosition();e=v.x,n=v.y;let _=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),S=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:n,width:_,height:S,rotation:h.Konva.getAngle(this.rotation())},t)}_handleMouseUp(t){this._removeEvents(t)}getAbsoluteTransform(){return this.getTransform()}_removeEvents(t){var e;if(this._transforming){this._transforming=!1,"undefined"!=typeof window&&(window.removeEventListener("mousemove",this._handleMouseMove),window.removeEventListener("touchmove",this._handleMouseMove),window.removeEventListener("mouseup",this._handleMouseUp,!0),window.removeEventListener("touchend",this._handleMouseUp,!0));let n=this.getNode();_--,this._fire("transformend",{evt:t,target:n}),null===(e=this.getLayer())||void 0===e||e.batchDraw(),n&&this._nodes.forEac
1h(e=>{var n;e._fire("transformend",{evt:t,target:e}),null===(n=e.getLayer())||void 0===n||n.batchDraw()}),this._movingAnchorName=null}}_fitNodesInto(t,e){let n=this._getNodeRect();if(r.Util._inRange(t.width,-(2*this.padding())-1,1)||r.Util._inRange(t.height,-(2*this.padding())-1,1)){this.update();return}let i=new r.Transform;if(i.rotate(h.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){let e=i.point({x:-(2*this.padding()),y:0});t.x+=e.x,t.y+=e.y,t.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){let e=i.point({x:2*this.padding(),y:0});this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.width+=2*this.padding()}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){let e=i.point({x:0,y:-(2*this.padding())});t.x+=e.x,t.y+=e.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding()}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){let e=i.point({x:0,y:2*this.padding()});this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=e.x,this._anchorDragOffset.y-=e.y,t.height+=2*this.padding()}if(this.boundBoxFunc()){let e=this.boundBoxFunc()(n,t);e?t=e:r.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}let a=new r.Transform;a.translate(n.x,n.y),a.rotate(n.rotation),a.scale(n.width/1e7,n.height/1e7);let o=new r.Transform,s=t.width/1e7,l=t.height/1e7;!1===this.flipEnabled()?(o.translate(t.x,t.y),o.rotate(t.rotation),o.translate(t.width<0?t.width:0,t.height<0?t.height:0),o.scale(Math.abs(s),Math.abs(l))):(o.translate(t.x,t.y),o.rotate(t.rotation),o.scale(s,l));let u=o.multiply(a.invert());this._nodes.forEach(t=>{var e;let n=t.getParent().getAbsoluteTransform(),i=t.getTransform().copy();i.translate(t.offsetX(),t.offsetY());let a=new r.Transform;a.multiply(n.copy().invert()).multiply(u).multiply(n).multiply(i);let o=a.decompose();t.setAttrs(o),null===(e=t.getLayer())||void 0===e||e.batchDraw()}),this.rotation(r.Util._getRotation(t.rotation)),this._nodes.forEach(t=>{this._fire("transform",{evt:e,target:t}),t._fire("transform",{evt:e,target:t})}),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}forceUpdate(){this._resetTransformCache(),this.update()}_batchChangeChild(t,e){this.findOne(t).setAttrs(e)}update(){var t;let e=this._getNodeRect();this.rotation(r.Util._getRotation(e.rotation));let n=e.width,i=e.height,a=this.enabledAnchors(),o=this.resizeEnabled(),s=this.padding(),l=this.anchorSize(),h=this.find("._anchor");h.forEach(t=>{t.setAttrs({width:l,height:l,offsetX:l/2,offsetY:l/2,stroke:this.anchorStroke(),strokeWidth:this.anchorStrokeWidth(),fill:this.anchorFill(),cornerRadius:this.anchorCornerRadius()})}),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:l/2+s,offsetY:l/2+s,visible:o&&a.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:n/2,y:0,offsetY:l/2+s,visible:o&&a.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:n,y:0,offsetX:l/2-s,offsetY:l/2+s,visible:o&&a.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:l/2+s,visible:o&&a.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:n,y:i/2,offsetX:l/2-s,visible:o&&a.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:l/2+s,offsetY:l/2-s,visible:o&&a.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:n/2,y:i,offsetY:l/2-s,visible:o&&a.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:n,y:i,offsetX:l/2-s,offsetY:l/2-s,visible:o&&a.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:n/2,y:-this.rotateAnchorOffset()*r.Util._sign(i)-s,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:n,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0});let u=this.anchorStyleFunc();u&&h.forEach(t=>{u(t)}),null===(t=this.getLayer())||void 0===t||t.batchDraw()}isTransforming(){return this._transforming}stopTransform(){if(this._transforming){this._removeEvents();let t=this.findOne("."+this._movingAnchorName);
1t&&t.stopDrag()}}destroy(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),l.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}toObject(){return a.Node.prototype.toObject.call(this)}clone(t){return a.Node.prototype.clone.call(this,t)}getClientRect(){return this.nodes().length>0?super.getClientRect():{x:0,y:0,width:0,height:0}}}e.Transformer=S,S.isTransforming=()=>_>0,S.prototype.className="Transformer",(0,d._registerNode)(S),i.Factory.addGetterSetter(S,"enabledAnchors",v,function(t){return t instanceof Array||r.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach(function(t){-1===v.indexOf(t)&&r.Util.warn("Unknown anchor name: "+t+". Available names are: "+v.join(", "))}),t||[]}),i.Factory.addGetterSetter(S,"flipEnabled",!0,(0,u.getBooleanValidator)()),i.Factory.addGetterSetter(S,"resizeEnabled",!0),i.Factory.addGetterSetter(S,"anchorSize",10,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"rotateEnabled",!0),i.Factory.addGetterSetter(S,"rotateLineVisible",!0),i.Factory.addGetterSetter(S,"rotationSnaps",[]),i.Factory.addGetterSetter(S,"rotateAnchorOffset",50,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"rotateAnchorCursor","crosshair"),i.Factory.addGetterSetter(S,"rotationSnapTolerance",5,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"borderEnabled",!0),i.Factory.addGetterSetter(S,"anchorStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(S,"anchorStrokeWidth",1,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"anchorFill","white"),i.Factory.addGetterSetter(S,"anchorCornerRadius",0,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"borderStroke","rgb(0, 161, 255)"),i.Factory.addGetterSetter(S,"borderStrokeWidth",1,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"borderDash"),i.Factory.addGetterSetter(S,"keepRatio",!0),i.Factory.addGetterSetter(S,"shiftBehavior","default"),i.Factory.addGetterSetter(S,"centeredScaling",!1),i.Factory.addGetterSetter(S,"ignoreStroke",!1),i.Factory.addGetterSetter(S,"padding",0,(0,u.getNumberValidator)()),i.Factory.addGetterSetter(S,"nodes"),i.Factory.addGetterSetter(S,"node"),i.Factory.addGetterSetter(S,"boundBoxFunc"),i.Factory.addGetterSetter(S,"anchorDragBoundFunc"),i.Factory.addGetterSetter(S,"anchorStyleFunc"),i.Factory.addGetterSetter(S,"shouldOverdrawWholeArea",!1),i.Factory.addGetterSetter(S,"useSingleNodeRotation",!0),i.Factory.backCompat(S,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledH
1andlers:"enabledAnchors"})},29846:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Wedge=void 0;let r=n(1455),i=n(97955),a=n(54417),o=n(53774),s=n(54417);class l extends i.Shape{_sceneFunc(t){t.beginPath(),t.arc(0,0,this.radius(),0,a.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}getWidth(){return 2*this.radius()}getHeight(){return 2*this.radius()}setWidth(t){this.radius(t/2)}setHeight(t){this.radius(t/2)}}e.Wedge=l,l.prototype.className="Wedge",l.prototype._centroid=!0,l.prototype._attrsAffectingSize=["radius"],(0,s._registerNode)(l),r.Factory.addGetterSetter(l,"radius",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"angle",0,(0,o.getNumberValidator)()),r.Factory.addGetterSetter(l,"clockwise",!1),r.Factory.backCompat(l,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})},32237:function(t,e,n){"use strict";n.d(e,{Cd:function(){return tC},ZA:function(){return tx},Ee:function(){return tk},mh:function(){return tS},UL:function(){return tw},Hf:function(){return tF},xv:function(){return tP},$T:function(){return tT}});var r,i,a={};n.r(a),n.d(a,{appendChild:function(){return W},appendChildToContainer:function(){return K},appendInitialChild:function(){return k},cancelTimeout:function(){return z},clearContainer:function(){return ti},commitMount:function(){return J},commitTextUpdate:function(){return $},commitUpdate:function(){return Z},createInstance:function(){return P},createTextInstance:function(){return T},detachDeletedInstance:function(){return ta},finalizeInitialChildren:function(){return E},getChildHostContext:function(){return G},getCurrentEventPriority:function(){return to},getPublicInstance:function(){return F},getRootHostContext:function(){return I},hideInstance:function(){return tt},hideTextInstance:function(){return te},idlePriority:function(){return x.unstable_IdlePriority},insertBefore:function(){return Y},insertInContainerBefore:function(){return X},isPrimaryRenderer:function(){return H},noTimeout:function(){return U},now:function(){return x.unstable_now},prepareForCommit:function(){return M},preparePortalMount:function(){return N},prepareUpdate:function(){return A},removeChild:function(){return q},removeChildFromContainer:function(){return Q},resetAfterCommit:function(){return R},resetTextContent:function(){return D},run:function(){return x.unstable_runWithPriority},scheduleTimeout:function(){return O},shouldDeprioritizeSubtree:function(){return L},shouldSetTextContent:function(){return B},supportsMutation:function(){return j},unhideInstance:function(){return tn},unhideTextInstance:function(){return tr},warnsIfNotActing:function(){return V}}),n(20185);var o=n(67294),s=n(87185),l=n.n(s),h=n(76525),u=n.n(h),d=n(32576),c=n(54417);let f={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0},g=!1,p=!1,m=".react-konva-event",y=`ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled. 2Position of a node will be changed during drag&drop, so you should update state of the react app as well. 3Consider to add onDragMove or onDragEnd events. 4For more info see: https://github.com/konvajs/react-konva/issues/256 5`,v=`ReactKonva: You are using "zIndex" attribute for a Konva node. 6react-konva may get confused with ordering. Just define correct order of elements in your render function of a component. 7For more info see: https://github.com/konvajs/react-konva/issues/194 8`,b={};function _(t,e,n=b){if(!g&&"zIndex"in e&&(console.warn(v),g=!0),!p&&e.draggable){var r=void 0!==e.x||void 0!==e.y,i=e.onDragEnd||e.onDragMove;r&&!i&&(console.warn(y),p=!0)}for(var a in n)if(!f[a]){var o="on"===a.slice(0,2),s=n[a]!==e[a];if(o&&s){var l=a.substr(2).toLowerCase();"content"===l.substr(0,7)&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),t.off(l,n[a])}e.hasOwnProperty(a)||t.setAttr(a,void 0)}var h=e._useStrictMode,u={},d=!1;let c={};for(var a in e)if(!f[a]){var o="on"===a.slice(0,2),_=n[a]!==e[a];if(o&&_){var l=a.substr(2).toLowerCase();"content"===l.substr(0,7)&&(l="content"+l.substr(7,1).toUpperCase()+l.substr(8)),e[a]&&(c[l]=e[a])}!o&&(e[a]!==n[a]||h&&e[a]!==t.getAttr(a))&&(d=!0,u[a]=e[a])}for(var l in d&&(t.setAttrs(u),S(t)),c)t.on(l+m,c[l])}function S(t){if(!c.Konva.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}var x=n(63840);let w={},C={};function k(t,e){if("string"==typeof e){console.error(`Do not use plain text as child of Konva.Node. You are using text: ${e}`);return}t.add(e),S(t)}function P(t,e,n){let r=l()[t];r||(console.error(`Konva has no node with the type ${t}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/${t}" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`),r=l().Group);let i={},a={};for(var o in e)"on"===o.slice(0,2)?a[o]=e[o]:i[o]=e[o];let s=new r(i);return _(s,a),s}function T(t,e,n){console.error(`Text components are not supported for now in ReactKonva. Your text is: "${t}"`)}function E(t,e,n){return!1}function F(t){return t}function M(){return null}function N(){return null}function A(t,e,n,r){return C}function R(){}function D(t){}function L(t,e){return!1}function I(){return w}function G(){return w}l().Node.prototype._applyProps=_;let O=setTimeout,z=clearTimeout,U=-1;function B(t,e){return!1}let H=!1,V=!0,j=!0;function W(t,e){e.parent===t?e.moveToTop():t.add(e),S(t)}function K(t,e){e.parent===t?e.moveToTop():t.add(e),S(t)}function Y(t,e,n){e._remove(),t.add(e),e.setZIndex(n.getZIndex()),S(t)}function X(t,e,n){Y(t,e,n)}function q(t,e){e.destroy(),e.off(m),S(t)}function Q(t,e){e.destroy(),e.off(m),S(t)}function $(t,e,n){console.error(`Text components are not yet supported in ReactKonva. You text is: "${n}"`)}function J(t,e,n){}function Z(t,e,n,r,i){_(t,i,r)}function tt(t){t.hide(),S(t)}function te(t){}function tn(t,e){(null==e.visible||e.visible)&&t.show()}function tr(t,e){}function ti(t){}function ta(){}let to=()=>d.DefaultEventPriority;var ts=Object.defineProperty,tl=Object.defineProperties,th=Object.getOwnPropertyDescriptors,tu=Object.getOwnPropertySymbols,td=Object.prototype.hasOwnProperty,tc=Object.prototype.propertyIsEnumerable,tf=(t,e,n)=>e in t?ts(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,tg=(t,e)=>{for(var n in e||(e={}))td.call(e,n)&&tf(t,n,e[n]);if(tu)for(var n of tu(e))tc.call(e,n)&&tf(t,n,e[n]);return t},tp=(t,e)=>tl(t,th(e));function tm(t){try{return Object.defineProperties(t,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(e){return t}}"undefined"!=typeof window&&((null==(r=window.document)?void 0:r.createElement)||(null==(i=window.navigator)?void 0:i.product)==="ReactNative")?o.useLayoutEffect:o.useEffect;let ty=console.error;console.error=function(){let t=[...arguments].join("");if((null==t?void 0:t.startsWith("Warning:"))&&t.includes("useContext")){console.error=ty;return}return ty.apply(this,arguments)};let tv=tm(o.createContext(null));class tb extends o.Component{render(){return o.createElement(tv.Provider,{value:this._reactInternals},this.props.children)}}let t_=t=>{let e=o.useRef(),n=o.useRef(),r=o.useRef(),i=function(t){let e=o.useRef({});return o.useLayoutEffect(()=>{e.current=t}),o.useLayoutEffect(()=>()=>{e.current={}},[]),e.current}
8(t),a=function(){let t=function(){let t=function(){let t=o.useContext(tv);if(null===t)throw Error("its-fine: useFiber must be called within a <FiberProvider />!");let e=o.useId();return o.useMemo(()=>{for(let n of[t,null==t?void 0:t.alternate]){if(!n)continue;let t=function t(e,n,r){if(!e)return;if(!0===r(e))return e;let i=n?e.return:e.child;for(;i;){let e=t(i,n,r);if(e)return e;i=n?null:i.sibling}}(n,!1,t=>{let n=t.memoizedState;for(;n;){if(n.memoizedState===e)return!0;n=n.next}});if(t)return t}},[t,e])}(),[e]=o.useState(()=>new Map);e.clear();let n=t;for(;n;){if(n.type&&"object"==typeof n.type){let t=void 0===n.type._context&&n.type.Provider===n.type?n.type:n.type._context;t&&t!==tv&&!e.has(t)&&e.set(t,o.useContext(tm(t)))}n=n.return}return e}();return o.useMemo(()=>Array.from(t.keys()).reduce((e,n)=>r=>o.createElement(e,null,o.createElement(n.Provider,tp(tg({},r),{value:t.get(n)}))),t=>o.createElement(tb,tg({},t))),[t])}(),s=e=>{let{forwardedRef:n}=t;n&&("function"==typeof n?n(e):n.current=e)};return o.useLayoutEffect(()=>(n.current=new(l()).Stage({width:t.width,height:t.height,container:e.current}),s(n.current),r.current=tE.createContainer(n.current,d.LegacyRoot,!1,null),tE.updateContainer(o.createElement(a,{},t.children),r.current),()=>{l().isBrowser&&(s(null),tE.updateContainer(null,r.current,null),n.current.destroy())}),[]),o.useLayoutEffect(()=>{s(n.current),_(n.current,t,i),tE.updateContainer(o.createElement(a,{},t.children),r.current,null)}),o.createElement("div",{ref:e,id:t.id,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})},tS="Layer",tx="Group",tw="Rect",tC="Circle",tk="Image",tP="Text",tT="Transformer",tE=u()(a);tE.injectIntoDevTools({findHostInstanceByFiber:()=>null,bundleType:0,version:o.version,rendererPackageName:"react-konva"});let tF=o.forwardRef((t,e)=>o.createElement(tb,{},o.createElement(t_,{...t,forwardedRef:e})))},46511:function(t,e){"use strict";e.DefaultEventPriority=16,e.LegacyRoot=0},67287:function(t,e,n){t.exports=function(t){"use strict";var e,r,i,a,o,s={},l=n(67294),h=n(63840),u=Object.assign;function d(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var c=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,f=Symbol.for("react.element"),g=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),v=Symbol.for("react.provider"),b=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),C=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var k=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var P=Symbol.iterator;function T(t){return null===t||"object"!=typeof t?null:"function"==typeof(t=P&&t[P]||t["@@iterator"])?t:null}function E(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case p:return"Fragment";case g:return"Portal";case y:return"Profiler";case m:return"StrictMode";case S:return"Suspense";case x:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case b:return(t.displayName||"Context")+".Consumer";case v:return(t._context.displayName||"Context")+".Provider";case _:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case w:return null!==(e=t.displayName||null)?e:E(t.type)||"Memo";case C:e=t._payload,t=t._init;try{return E(t(e))}catch(t){}}return null}function F(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do 0!=(4098&(e=t).flags)&&(n=e.return),t=e.return;while(t)}return 3===e.tag?n:null}function M(t){if(F(t)!==t)throw Error(d(188))}function N(t){var e=t.alternate;if(!e){if(null===(e=F(t)))throw Error(d(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return M(i),t;if(a===r)return M(i),e;a=a.sibling}throw Error(d(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o)throw Error(d(189))}}if(n.alternate!==r)throw Error(d(190))}if(3!==n.tag)throw Error(d(188));return n.stateNode.current===n?t:e}function A(t){return null!==(t=N(t))?function t(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var n=t(e);if(null!==n)return n;e=e.sibling}return null}(t):null}var R,D=Array.isArray,L=t.getPublicInstance,I=t.getRootHostContext,G=t.getChildHostContext,O=t.prepareForCommit,z=t.resetAfterCommit,U=t.createInstance,B=t.appendInitialChild,H=t.finalizeInitialChildren,V=t.prepareUpdate,j=t.shouldSetTextContent,W=t.createTextInstance,K=t.scheduleTimeout,Y=t.cancelTimeout,X=t.noTimeout,q=t.isPrimaryRenderer,Q=t.supportsMutation,$=t.supp
vendor: 4,697 bytes, line 8
8ortsPersistence,J=t.supportsHydration,Z=t.getInstanceFromNode,tt=t.preparePortalMount,te=t.getCurrentEventPriority,tn=t.detachDeletedInstance,tr=t.supportsMicrotasks,ti=t.scheduleMicrotask,ta=t.supportsTestSelectors,to=t.findFiberRoot,ts=t.getBoundingRect,tl=t.getTextContent,th=t.isHiddenSubtree,tu=t.matchAccessibilityRole,td=t.setFocusIfFocusable,tc=t.setupIntersectionObserver,tf=t.appendChild,tg=t.appendChildToContainer,tp=t.commitTextUpdate,tm=t.commitMount,ty=t.commitUpdate,tv=t.insertBefore,tb=t.insertInContainerBefore,t_=t.removeChild,tS=t.removeChildFromContainer,tx=t.resetTextContent,tw=t.hideInstance,tC=t.hideTextInstance,tk=t.unhideInstance,tP=t.unhideTextInstance,tT=t.clearContainer,tE=t.cloneInstance,tF=t.createContainerChildSet,tM=t.appendChildToContainerChildSet,tN=t.finalizeContainerChildren,tA=t.replaceContainerChildren,tR=t.cloneHiddenInstance,tD=t.cloneHiddenTextInstance,tL=t.canHydrateInstance,tI=t.canHydrateTextInstance,tG=t.canHydrateSuspenseInstance,tO=t.isSuspenseInstancePending,tz=t.isSuspenseInstanceFallback,tU=t.getSuspenseInstanceFallbackErrorDetails,tB=t.registerSuspenseInstanceRetry,tH=t.getNextHydratableSibling,tV=t.getFirstHydratableChild,tj=t.getFirstHydratableChildWithinContainer,tW=t.getFirstHydratableChildWithinSuspenseInstance,tK=t.hydrateInstance,tY=t.hydrateTextInstance,tX=t.hydrateSuspenseInstance,tq=t.getNextHydratableInstanceAfterSuspenseInstance,tQ=t.commitHydratedContainer,t$=t.commitHydratedSuspenseInstance,tJ=t.clearSuspenseBoundary,tZ=t.clearSuspenseBoundaryFromContainer,t0=t.shouldDeleteUnhydratedTailInstances,t1=t.didNotMatchHydratedContainerTextInstance,t2=t.didNotMatchHydratedTextInstance;function t5(t){if(void 0===R)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);R=e&&e[1]||""}return"\n"+R+t}var t4=!1;function t3(t,e){if(!t||t4)return"";t4=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e){if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(e,[])}catch(t){var r=t}Reflect.construct(t,[],e)}else{try{e.call()}catch(t){r=t}t.call(e.prototype)}}else{try{throw Error()}catch(t){r=t}t()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var i=e.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do if(o--,0>--s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=o&&0<=s);break}}}finally{t4=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?t5(t):""}var t8=Object.prototype.hasOwnProperty,t6=[],t7=-1;function t9(t){return{current:t}}function et(t){0>t7||(t.current=t6[t7],t6[t7]=null,t7--)}function ee(t,e){t6[++t7]=t.current,t.current=e}var en={},er=t9(en),ei=t9(!1),ea=en;function eo(t,e){var n=t.type.contextTypes;if(!n)return en;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=a),a}function es(t){return null!=(t=t.childContextTypes)}function el(){et(ei),et(er)}function eh(t,e,n){if(er.current!==en)throw Error(d(168));ee(er,e),ee(ei,n)}function eu(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(d(108,function(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=(t=e.render).displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return E(e);case 8:return e===m?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e}return null}(t)||"Unknown",i));return u({},n,r)}function ed(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||en,ea=er.current,ee(er,t),ee(ei,ei.current),!0}function ec(t,e,n){var r=t.stateNode;if(!r)throw Error(d(169));n?(t=eu(t,e,ea),r.__reactInternalMemoizedMergedChildContext=t,et(ei
8),et(er),ee(er,t)):et(ei),ee(ei,n)}var ef=Math.clz32?Math.clz32:function(t){return 0==(t>>>=0)?32:31-(eg(t)/ep|0)|0},eg=Math.log,ep=Math.LN2,em=64,ey=4194304;function ev(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&t;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&t;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function eb(t,e){var n=t.pendingLanes;if(0===n)return 0;var r=0,i=t.suspendedLanes,a=t.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=ev(s):0!=(a&=o)&&(r=ev(a))}else 0!=(o=n&~i)?r=ev(o):0!==a&&(r=ev(a));if(0===r)return 0;if(0!==e&&e!==r&&0==(e&i)&&((i=r&-r)>=(a=e&-e)||16===i&&0!=(4194240&a)))return e;if(0!=(4&r)&&(r|=16&n),0!==(e=t.entangledLanes))for(t=t.entanglements,e&=r;0<e;)i=1<<(n=31-ef(e)),r|=t[n],e&=~i;return r}function e_(t){return 0!=(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function eS(){var t=em;return 0==(4194240&(em<<=1))&&(em=64),t}function ex(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ew(t,e,n){t.pendingLanes|=e,536870912!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-ef(e)]=n}function eC(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-ef(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var ek=0;function eP(t){return 1<(t&=-t)?4<t?0!=(268435455&t)?16:536870912:4:1}var eT=h.unstable_scheduleCallback,eE=h.unstable_cancelCallback,eF=h.unstable_shouldYield,eM=h.unstable_requestPaint,eN=h.unstable_now,eA=h.unstable_ImmediatePriority,eR=h.unstable_UserBlockingPriority,eD=h.unstable_NormalPriority,eL=h.unstable_IdlePriority,eI=null,eG=null,eO="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},ez=null,eU=!1,eB=!1;function eH(t){null===ez?ez=[t]:ez.push(t)}function eV(){if(!eB&&null!==ez){eB=!0;var t=0,e=ek;try{var n=ez;for(ek=1;t<n.length;t++){var r=n[t];do r=r(!0);while(null!==r)}ez=null,eU=!1}catch(e){throw null!==ez&&(ez=ez.slice(t+1)),eT(eA,eV),e}finally{ek=e,eB=!1}}return null}var ej=[],eW=0,eK=null,eY=0,eX=[],eq=0,eQ=null,e$=1,eJ="";function eZ(t,e){ej[eW++]=eY,ej[eW++]=eK,eK=t,eY=e}function e0(t,e,n){eX[eq++]=e$,eX[eq++]=eJ,eX[eq++]=eQ,eQ=t;var r=e$;t=eJ;var i=32-ef(r)-1;r&=~(1<<i),n+=1;var a=32-ef(e)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,e$=1<<32-ef(e)+i|n<<i|r,eJ=a+t}else e$=1<<a|n<<i|r,eJ=t}function e1(t){null!==t.return&&(eZ(t,1),e0(t,1,0))}function e2(t){for(;t===eK;)eK=ej[--eW],ej[eW]=null,eY=ej[--eW],ej[eW]=null;for(;t===eQ;)eQ=eX[--eq],eX[eq]=null,eJ=eX[--eq],eX[eq]=null,e$=eX[--eq],eX[eq]=null}var e5=null,e4=null,e3=!1,e8=!1,e6=null;function e7(t,e){var n=aq(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,null===(e=t.deletions)?(t.deletions=[n],t.flags|=16):e.push(n)}function e9(t,e){switch(t.tag){case 5:return null!==(e=tL(e,t.type,t.pendingProps))&&(t.stateNode=e,e5=t,e4=tV(e),!0);case 6:return null!==(e=tI(e,t.pendingProps))&&(t.stateNode=e,e5=t,e4=null,!0);case 13:if(null!==(e=tG(e))){var n=null!==eQ?{id:e$,overflow:eJ}:null;return t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},(n=aq(18,null,null,0)).stateNode=e,n.return=t,t.child=n,e5=t,e4=null,!0}return!1;default:return!1}}function nt(t){return 0!=(1&t.mode)&&0==(128&t.flags)}function ne(t){if(e3){var e=e4;if(e){var n=e;if(!e9(t,e)){if(nt(t))throw Error(d(418));e=tH(n);var r=e5;e&&e9(t,e)?e7(r,n):(t.flags=-4097&t.flags|2,e3=!1,e5=t)}}else{if(nt(t))throw Error(d(418));t.flags=-4097&t.flags|2,e3=!1,e5=t}}}function nn(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;e5=t}function nr(t){if(!J||t!==e5)return!1;if(!e3)return nn(t),e3=!0,!1;if(3!==t.tag&&(5!==t.tag||t0(t.type)&&!j(t.type,t.memoizedProps))){var e=e4;if(e){if(nt(t))throw ni(),Error(d(418));for(;e;)e7(t,e),e=tH(e)}}if(nn(t),13===t.tag){if(!J)throw Error(d(316));if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(d(317));e4=tq(t)}else e4=e5?tH(t.stateNode):null;return!0}function ni(){for(var t=e4;t;)t=tH(t)}function na(){J&&(e4=e5=null,e8=e3=!1)}function no(t){null===e6?e6=[t]:e6.push(t)}var ns=c.ReactCurrentBatchConfig;function nl(t,e){if(eO(t,e))return!0;
vendor: 5,122 bytes, line 8
8if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!t8.call(e,i)||!eO(t[i],e[i]))return!1}return!0}function nh(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!=typeof t){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(d(309));var r=n.stateNode}if(!r)throw Error(d(147,t));var i=r,a=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===a?e.ref:((e=function(t){var e=i.refs;null===t?delete e[a]:e[a]=t})._stringRef=a,e)}if("string"!=typeof t)throw Error(d(284));if(!n._owner)throw Error(d(290,t))}return t}function nu(t,e){throw Error(d(31,"[object Object]"===(t=Object.prototype.toString.call(e))?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function nd(t){return(0,t._init)(t._payload)}function nc(t){function e(e,n){if(t){var r=e.deletions;null===r?(e.deletions=[n],e.flags|=16):r.push(n)}}function n(n,r){if(!t)return null;for(;null!==r;)e(n,r),r=r.sibling;return null}function r(t,e){for(t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function i(t,e){return(t=a$(t,e)).index=0,t.sibling=null,t}function a(e,n,r){return(e.index=r,t)?null!==(r=e.alternate)?(r=r.index)<n?(e.flags|=2,n):r:(e.flags|=2,n):(e.flags|=1048576,n)}function o(e){return t&&null===e.alternate&&(e.flags|=2),e}function s(t,e,n,r){return null===e||6!==e.tag?(e=a1(n,t.mode,r)).return=t:(e=i(e,n)).return=t,e}function l(t,e,n,r){var a=n.type;return a===p?u(t,e,n.props.children,r,n.key):(null!==e&&(e.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===C&&nd(a)===e.type)?(r=i(e,n.props)).ref=nh(t,e,n):(r=aJ(n.type,n.key,n.props,null,t.mode,r)).ref=nh(t,e,n),r.return=t,r)}function h(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?(e=a2(n,t.mode,r)).return=t:(e=i(e,n.children||[])).return=t,e}function u(t,e,n,r,a){return null===e||7!==e.tag?(e=aZ(n,t.mode,r,a)).return=t:(e=i(e,n)).return=t,e}function c(t,e,n){if("string"==typeof e&&""!==e||"number"==typeof e)return(e=a1(""+e,t.mode,n)).return=t,e;if("object"==typeof e&&null!==e){switch(e.$$typeof){case f:return(n=aJ(e.type,e.key,e.props,null,t.mode,n)).ref=nh(t,null,e),n.return=t,n;case g:return(e=a2(e,t.mode,n)).return=t,e;case C:return c(t,(0,e._init)(e._payload),n)}if(D(e)||T(e))return(e=aZ(e,t.mode,n,null)).return=t,e;nu(t,e)}return null}function m(t,e,n,r){var i=null!==e?e.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:s(t,e,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case f:return n.key===i?l(t,e,n,r):null;case g:return n.key===i?h(t,e,n,r):null;case C:return m(t,e,(i=n._init)(n._payload),r)}if(D(n)||T(n))return null!==i?null:u(t,e,n,r,null);nu(t,n)}return null}function y(t,e,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return s(e,t=t.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case f:return l(e,t=t.get(null===r.key?n:r.key)||null,r,i);case g:return h(e,t=t.get(null===r.key?n:r.key)||null,r,i);case C:return y(t,e,n,(0,r._init)(r._payload),i)}if(D(r)||T(r))return u(e,t=t.get(n)||null,r,i,null);nu(e,r)}return null}return function s(l,h,u,v){if("object"==typeof u&&null!==u&&u.type===p&&null===u.key&&(u=u.props.children),"object"==typeof u&&null!==u){switch(u.$$typeof){case f:t:{for(var b=u.key,_=h;null!==_;){if(_.key===b){if((b=u.type)===p){if(7===_.tag){n(l,_.sibling),(h=i(_,u.props.children)).return=l,l=h;break t}}else if(_.elementType===b||"object"==typeof b&&null!==b&&b.$$typeof===C&&nd(b)===_.type){n(l,_.sibling),(h=i(_,u.props)).ref=nh(l,_,u),h.return=l,l=h;break t}n(l,_);break}e(l,_),_=_.sibling}u.type===p?((h=aZ(u.props.children,l.mode,v,u.key)).return=l,l=h):((v=aJ(u.type,u.key,u.props,null,l.mode,v)).ref=nh(l,h,u),v.return=l,l=v)}return o(l);case g:t:{for(_=u.key;null!==h;){if(h.key===_){if(4===h.tag&&h.stateNode.containerInfo===u.containerInfo&&h.stateNode.implementation===u.implementation){n(l,h.sibling),(h=i(h,u.children||[])).return=l,l=h;break t}n(l,h);break}e(l,h),h=h.sibling}(h=a2(u,l.mode,v)).return=l,l=h}return o(l);case C:return s(l,h,(_=u._init)(u._payload),v)}if(D(u))return function(i,o,s,l){for(var h=null,u=null,d=o,f=o=0,g=null;null!==d&&f<s.length;f++){d.index>f?(g=d,d=null):g=d.sibling;var p=m(i,d,s[f],l);if(null===p){null===d&&(d=g);break}t&&d&&null===p.alternate&&e(i,d),o=a(p,o,f),null===u?h=p:u.sibling=p,u=p,d=g}if(f===s.length)return n(i,d),e3&&eZ(i,f),h;if(null===d){for(;f<s.length;f++)null!==(d=c(i,s[f],l))&&(o=a(d,o,f),null===u?h=d:u.sibling=d,u=d);return e3&&eZ(i,f),h}for(d=r(i,d);f<s.length;f++)null!==(g=y(d,i,f,s[f],l))&&(t&&null!==g.alternate&&d.delete(null===g.key?f:g.key),o=a(g,o,f),null===u?h=g:u.sibling=g,u=g);return t&&d.forEach(function(t){return e(i,t)}),e3&&eZ(i,f),h}(l,h,u,v);if(T(u))return function(i,o,s,l){var h=T(s);if("function"!=typeof h)throw Error(d(150));if(null==(s=h.call(s)))throw Error(d(151));for(var u=h=null,f=o,g=o=0,p=null,v=s.next();null!==f&&!v.done;g++,v=s.next()){f.index>
8g?(p=f,f=null):p=f.sibling;var b=m(i,f,v.value,l);if(null===b){null===f&&(f=p);break}t&&f&&null===b.alternate&&e(i,f),o=a(b,o,g),null===u?h=b:u.sibling=b,u=b,f=p}if(v.done)return n(i,f),e3&&eZ(i,g),h;if(null===f){for(;!v.done;g++,v=s.next())null!==(v=c(i,v.value,l))&&(o=a(v,o,g),null===u?h=v:u.sibling=v,u=v);return e3&&eZ(i,g),h}for(f=r(i,f);!v.done;g++,v=s.next())null!==(v=y(f,i,g,v.value,l))&&(t&&null!==v.alternate&&f.delete(null===v.key?g:v.key),o=a(v,o,g),null===u?h=v:u.sibling=v,u=v);return t&&f.forEach(function(t){return e(i,t)}),e3&&eZ(i,g),h}(l,h,u,v);nu(l,u)}return"string"==typeof u&&""!==u||"number"==typeof u?(u=""+u,null!==h&&6===h.tag?(n(l,h.sibling),(h=i(h,u)).return=l):(n(l,h),(h=a1(u,l.mode,v)).return=l),o(l=h)):n(l,h)}}var nf=nc(!0),ng=nc(!1),np=t9(null),nm=null,ny=null,nv=null;function nb(){nv=ny=nm=null}function n_(t,e,n){q?(ee(np,e._currentValue),e._currentValue=n):(ee(np,e._currentValue2),e._currentValue2=n)}function nS(t){var e=np.current;et(np),q?t._currentValue=e:t._currentValue2=e}function nx(t,e,n){for(;null!==t;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,null!==r&&(r.childLanes|=e)):null!==r&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function nw(t,e){nm=t,nv=ny=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!=(t.lanes&e)&&(r2=!0),t.firstContext=null)}function nC(t){var e=q?t._currentValue:t._currentValue2;if(nv!==t){if(t={context:t,memoizedValue:e,next:null},null===ny){if(null===nm)throw Error(d(308));
vendor: 25,452 bytes, line 8
8ny=t,nm.dependencies={lanes:0,firstContext:t}}else ny=ny.next=t}return e}var nk=null;function nP(t){null===nk?nk=[t]:nk.push(t)}function nT(t,e,n,r){var i=e.interleaved;return null===i?(n.next=n,nP(e)):(n.next=i.next,i.next=n),e.interleaved=n,nE(t,r)}function nE(t,e){t.lanes|=e;var n=t.alternate;for(null!==n&&(n.lanes|=e),n=t,t=t.return;null!==t;)t.childLanes|=e,null!==(n=t.alternate)&&(n.childLanes|=e),n=t,t=t.return;return 3===n.tag?n.stateNode:null}var nF=!1;function nM(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nN(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function nA(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function nR(t,e,n){var r=t.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&i3)){var i=r.pending;return null===i?e.next=e:(e.next=i.next,i.next=e),r.pending=e,nE(t,n)}return null===(i=r.interleaved)?(e.next=e,nP(r)):(e.next=i.next,i.next=e),r.interleaved=e,nE(t,n)}function nD(t,e,n){if(null!==(e=e.updateQueue)&&(e=e.shared,0!=(4194240&n))){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,eC(t,n)}}function nL(t,e){var n=t.updateQueue,r=t.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=e:a=a.next=e}else i=a=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},t.updateQueue=n;return}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function nI(t,e,n,r){var i=t.updateQueue;nF=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,h=l.next;l.next=null,null===o?a=h:o.next=h,o=l;var d=t.alternate;null!==d&&(s=(d=d.updateQueue).lastBaseUpdate)!==o&&(null===s?d.firstBaseUpdate=h:s.next=h,d.lastBaseUpdate=l)}if(null!==a){var c=i.baseState;for(o=0,d=h=l=null,s=a;;){var f=s.lane,g=s.eventTime;if((r&f)===f){null!==d&&(d=d.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});t:{var p=t,m=s;switch(f=e,g=n,m.tag){case 1:if("function"==typeof(p=m.payload)){c=p.call(g,c,f);break t}c=p;break t;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(f="function"==typeof(p=m.payload)?p.call(g,c,f):p))break t;c=u({},c,f);break t;case 2:nF=!0}}null!==s.callback&&0!==s.lane&&(t.flags|=64,null===(f=i.effects)?i.effects=[s]:f.push(s))}else g={eventTime:g,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===d?(h=d=g,l=c):d=d.next=g,o|=f;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(f=s).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===d&&(l=c),i.baseState=l,i.firstBaseUpdate=h,i.lastBaseUpdate=d,null!==(e=i.shared.interleaved)){i=e;do o|=i.lane,i=i.next;while(i!==e)}else null===a&&(i.shared.lanes=0);ar|=o,t.lanes=o,t.memoizedState=c}}function nG(t,e,n){if(t=e.effects,e.effects=null,null!==t)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(d(191,i));i.call(r)}}}var nO={},nz=t9(nO),nU=t9(nO),nB=t9(nO);function nH(t){if(t===nO)throw Error(d(174));return t}function nV(t,e){ee(nB,e),ee(nU,t),ee(nz,nO),t=I(e),et(nz),ee(nz,t)}function nj(){et(nz),et(nU),et(nB)}function nW(t){var e=nH(nB.current),n=nH(nz.current);e=G(n,t.type,e),n!==e&&(ee(nU,t),ee(nz,e))}function nK(t){nU.current===t&&(et(nz),et(nU))}var nY=t9(0);function nX(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||tO(n)||tz(n)))return e}else if(19===e.tag&&void 0!==e.memoizedProps.revealOrder){if(0!=(128&e.flags))return e}else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var nq=[];function nQ(){for(var t=0;t<nq.length;t++){var e=nq[t];q?e._workInProgressVersionPrimary=null:e._workInProgressVersionSecondary=null}nq.length=0}var n$=c.ReactCurrentDispatcher,nJ=c.ReactCurrentBatchConfig,nZ=0,n0=null,n1=null,n2=null,n5=!1,n4=!1,n3=0,n8=0;function n6(){throw Error(d(321))}function n7(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!eO(t[n],e[n]))return!1;return!0}function n9(t,e,n,r,i,a){if(nZ=a,n0=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,n$.current=null===t||null===t.memoizedState?rI:rG,t=n(r,i),n4){a=0;do{if(n4=!1,n3=0,25<=a)throw Error(d(301));a+=1,n2=n1=null,e.updateQueue=null,n$.current=rO,t=n(r,i)}while(n4)}if(n$.current=rL,e=null!==n1&&null!==n1.next,nZ=0,n2=n1=n0=null,n5=!1,e)throw Error(d(300));return t}function rt(){var t=0!==n3;return n3=0,t}function re(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===n2?n0.memoizedState=n2=t:n2=n2.next=t,n2}function rn(){if(null===n1){var t=n0.alternate;t=null!==t?t.memoizedState:null}else t=n1.next;var e=null===n2?n0.memoizedState:n2.next;if(null!==e)n2=e,n1=t;else{if(null===t)throw Error(d(310));t={memoizedState:(n1=t).memoizedState,baseState:n1.baseState,baseQueue:n1.baseQueue,queue:n1.queue,next:null},null===n2?n0.memoizedState=n2=t:n2=n2.next=t}return n2}function rr(t,e){return"function"==typeof e?e(t):e}function ri(t){var e=rn(),n=e.queue;if(null===n)throw Error(d(311));n.lastRenderedReducer=t;var r=n1,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var s=o=null,l=null,h=a;do{var u=h.lane;if((nZ&u)===u)null!==l&&(l=l.next={lane:0,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null}),r=h.hasEagerState?h.eagerState:t(r,h.action);else{var c={lane:u,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null};null===l?(s=l=c,o=r):l=l.next=c,n0.lanes|=u,ar|=u}h=h.next}while(null!==h&&h!==a);null===l?o=r:l.next=s,eO(r,e.memoizedState)||(r2=!0),e.memoizedState=r,e.baseState=o,e.baseQueue=l,n.lastRenderedState=r}if(null!==(t=n.interleaved)){i=t;do a=i.lane,n0.lanes|=a,ar|=a,i=i.next;while(i!==t)}else null===i&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function ra(t){var e=rn(),n=e.queue;if(null===n)throw Error(d(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,a=e.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do a=t(a,o.action),o=o.next;while(o!==i);eO(a,e.memoizedState)||(r2=!0),e.memoizedState=a,null===e.baseQueue&&(e.baseState=a),n.lastRenderedState=a}return[a,r]}function ro(){}function rs(t,e){var n=n0,r=rn(),i=e(),a=!eO(r.memoizedState,i);if(a&&(r.memoizedState=i,r2=!0),r=r.queue,rb(ru.bind(null,n,r,t),[t]),r.getSnapshot!==e||a||null!==n2&&1&n2.memoizedState.tag){if(n.flags|=2048,rg(9,rh.bind(null,n,r,i,e),void 0,null),null===i8)throw Error(d(349));0!=(30&nZ)||rl(n,e,i)}return i}function rl(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},null===(e=n0.updateQueue)?(e={lastEffect:null,stores:null},n0.updateQueue=e,e.stores=[t]):null===(n=e.stores)?e.stores=[t]:n.push(t)}function rh(t,e,n,r){e.value=n,e.getSnapshot=r,rd(e)&&rc(t)}function ru(t,e,n){return n(function(){rd(e)&&rc(t)})}function rd(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!eO(t,n)}catch(t){return!0}}function rc(t){var e=nE(t,1);null!==e&&aC(e,t,1,-1)}function rf(t){var e=re();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:rr,lastRenderedState:t},e.queue=t,t=t.dispatch=rN.bind(null,n0,t),[e.memoizedState,t]}function rg(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=n0.updateQueue)?(e={lastEffect:null,stores:null},n0.updateQueue=e,e.lastEffect=t.next=t):null===(n=e.lastEffect)?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t),t}function rp(){return rn().memoizedState}function rm(t,e,n,r){var i=re();n0.flags|=t,i.memoizedState=rg(1|e,n,void 0,void 0===r?null:r)}function ry(t,e,n,r){var i=rn();r=void 0===r?null:r;var a=void 0;if(null!==n1){var o=n1.memoizedState;if(a=o.destroy,null!==r&&n7(r,o.deps)){i.memoizedState=rg(e,n,a,r);return}}n0.flags|=t,i.memoizedState=rg(1|e,n,a,r)}function rv(t,e){return rm(8390656,8,t,e)}function rb(t,e){return ry(2048,8,t,e)}function r_(t,e){return ry(4,2,t,e)}function rS(t,e){return ry(4,4,t,e)}function rx(t,e){return"function"==typeof e?(e(t=t()),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function rw(t,e,n){return n=null!=n?n.concat([t]):null,ry(4,4,rx.bind(null,e,t),n)}function rC(){}function rk(t,e){var n=rn();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&n7(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function rP(t,e){var n=rn();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&n7(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function rT(t,e,n){return 0==(21&nZ)?(t.baseState&&(t.baseState=!1,r2=!0),t.memoizedState=n):(eO(n,e)||(n=eS(),n0.lanes|=n,ar|=n,t.baseState=!0),e)}function rE(t,e){var n=ek;ek=0!==n&&4>n?n:4,t(!0);var r=nJ.transition;nJ.transition={};try{t(!1),e()}finally{ek=n,nJ.transition=r}}function rF(){return rn().memoizedState}function rM(t,e,n){var r=aw(t);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},rA(t)?rR(e,n):null!==(n=nT(t,e,n,r))&&(aC(n,t,r,ax()),rD(n,e,r))}function rN(t,e,n){var r=aw(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(rA(t))rR(e,i);else{var a=t.alternate;if(0===t.lanes&&(null===a||0===a.lanes)&&null!==(a=e.lastRenderedReducer))try{var o=e.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,eO(s,o)){var l=e.interleaved;null===l?(i.next=i,nP(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch(t){}finally{}null!==(n=nT(t,e,i,r))&&(aC(n,t,r,i=ax()),rD(n,e,r))}}function rA(t){var e=t.alternate;return t===n0||null!==e&&e===n0}function rR(t,e){n4=n5=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function rD(t,e,n){if(0!=(4194240&n)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,eC(t,n)}}var rL={readContext:nC,useCallback:n6,useContext:n6,useEffect:n6,useImperativeHandle:n6,useInsertionEffect:n6,useLayoutEffect:n6,useMemo:n6,useReducer:n6,useRef:n6,useState:n6,useDebugValue:n6,useDeferredValue:n6,useTransition:n6,useMutableSource:n6,useSyncExternalStore:n6,useId:n6,unstable_isNewReconciler:!1},rI={readContext:nC,useCallback:function(t,e){return re().memoizedState=[t,void 0===e?null:e],t},useContext:nC,useEffect:rv,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,rm(4194308,4,rx.bind(null,e,t),n)},useLayoutEffect:function(t,e){return rm(4194308,4,t,e)},useInsertionEffect:function(t,e){return rm(4,2,t,e)},useMemo:function(t,e){var n=re();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=re();return e=void 0!==n?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=rM.bind(null,n0,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},re().memoizedState=t},useState:rf,useDebugValue:rC,useDeferredValue:function(t){return re().memoizedState=t},useTransition:function(){var t=rf(!1),e=t[0];return t=rE.bind(null,t[1]),re().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=n0,i=re();if(e3){if(void 0===n)throw Error(d(407));n=n()}else{if(n=e(),null===i8)throw Error(d(349));0!=(30&nZ)||rl(r,e,n)}i.memoizedState=n;var a={value:n,getSnapshot:e};return i.queue=a,rv(ru.bind(null,r,a,t),[t]),r.flags|=2048,rg(9,rh.bind(null,r,a,n,e),void 0,null),n},useId:function(){var t=re(),e=i8.identifierPrefix;if(e3){var n=eJ,r=e$;e=":"+e+"R"+(n=(r&~(1<<32-ef(r)-1)).toString(32)+n),0<(n=n3++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=n8++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},rG={readContext:nC,useCallback:rk,useContext:nC,useEffect:rb,useImperativeHandle:rw,useInsertionEffect:r_,useLayoutEffect:rS,useMemo:rP,useReducer:ri,useRef:rp,useState:function(){return ri(rr)},useDebugValue:rC,useDeferredValue:function(t){return rT(rn(),n1.memoizedState,t)},useTransition:function(){return[ri(rr)[0],rn().memoizedState]},useMutableSource:ro,useSyncExternalStore:rs,useId:rF,unstable_isNewReconciler:!1},rO={readContext:nC,useCallback:rk,useContext:nC,useEffect:rb,useImperativeHandle:rw,useInsertionEffect:r_,useLayoutEffect:rS,useMemo:rP,useReducer:ra,useRef:rp,useState:function(){return ra(rr)},useDebugValue:rC,useDeferredValue:function(t){var e=rn();return null===n1?e.memoizedState=t:rT(e,n1.memoizedState,t)},useTransition:function(){return[ra(rr)[0],rn().memoizedState]},useMutableSource:ro,useSyncExternalStore:rs,useId:rF,unstable_isNewReconciler:!1};function rz(t,e){if(t&&t.defaultProps)for(var n in e=u({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}function rU(t,e,n,r){n=null==(n=n(r,e=t.memoizedState))?e:u({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var rB={isMounted:function(t){return!!(t=t._reactInternals)&&F(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=ax(),i=aw(t),a=nA(r,i);a.payload=e,null!=n&&(a.callback=n),null!==(e=nR(t,a,i))&&(aC(e,t,i,r),nD(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=ax(),i=aw(t),a=nA(r,i);a.tag=1,a.payload=e,null!=n&&(a.callback=n),null!==(e=nR(t,a,i))&&(aC(e,t,i,r),nD(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=ax(),r=aw(t),i=nA(n,r);i.tag=2,null!=e&&(i.callback=e),null!==(e=nR(t,i,r))&&(aC(e,t,r,n),nD(e,t,r))}};function rH(t,e,n,r,i,a,o){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,a,o):!e.prototype||!e.prototype.isPureReactComponent||!nl(n,r)||!nl(i,a)}function rV(t,e,n){var r=!1,i=en,a=e.contextType;return"object"==typeof a&&null!==a?a=nC(a):(i=es(e)?ea:er.current,a=(r=null!=(r=e.contextTypes))?eo(t,i):en),e=new e(n,a),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=rB,t.stateNode=e,e._reactInternals=t,r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=a),e}function rj(t,e,n,r){t=e.state,"function"==typeof e.componentWillReceiveProps&&e.componentWillReceiveProps(n,r),"function"==typeof e.UNSAFE_componentWillReceiveProps&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&rB.enqueueReplaceState(e,e.state,null)}function rW(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},nM(t);var a=e.contextType;"object"==typeof a&&null!==a?i.context=nC(a):(a=es(e)?ea:er.current,i.context=eo(t,a)),i.state=t.memoizedState,"function"==typeof(a=e.getDerivedStateFromProps)&&(rU(t,e,a,n),i.state=t.memoizedState),"function"==typeof e.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(e=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),e!==i.state&&rB.enqueueReplaceState(i,i.state,null),nI(t,n,i,r),i.state=t.memoizedState),"function"==typeof i.componentDidMount&&(t.flags|=4194308)}function rK(t,e){try{var n="",r=e;do n+=function(t){switch(t.tag){case 5:return t5(t.type);case 16:return t5("Lazy");case 13:return t5("Suspense");case 19:return t5("SuspenseList");case 0:case 2:case 15:return t=t3(t.type,!1);case 11:return t=t3(t.type.render,!1);case 1:return t=t3(t.type,!0);default:return""}}(r),r=r.return;while(r);var i=n}catch(t){i="\nError generating stack: "+t.message+"\n"+t.stack}return{value:t,source:e,stack:i,digest:null}}function rY(t,e,n){return{value:t,source:null,stack:null!=n?n:null,digest:null!=e?e:null}}function rX(t,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var rq="function"==typeof WeakMap?WeakMap:Map;function rQ(t,e,n){(n=nA(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){ac||(ac=!0,af=r),rX(t,e)},n}function r$(t,e,n){(n=nA(-1,n)).tag=3;var r=t.type.getDerivedStateFromError;if("function"==typeof r){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){rX(t,e)}}var a=t.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){rX(t,e),"function"!=typeof r&&(null===ag?ag=new Set([this]):ag.add(this));var n=e.stack;this.componentDidCatch(e.value,{componentStack:null!==n?n:""})}),n}function rJ(t,e,n){var r=t.pingCache;if(null===r){r=t.pingCache=new rq;var i=new Set;r.set(e,i)}else void 0===(i=r.get(e))&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=aj.bind(null,t,e,n),e.then(t,t))}function rZ(t){do{var e;if((e=13===t.tag)&&(e=null===(e=t.memoizedState)||null!==e.dehydrated),e)return t;t=t.return}while(null!==t);return null}function r0(t,e,n,r,i){return 0==(1&t.mode)?t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((e=nA(-1,1)).tag=2,nR(n,e,1))),n.lanes|=1):(t.flags|=65536,t.lanes=i),t}var r1=c.ReactCurrentOwner,r2=!1;function r5(t,e,n,r){e.child=null===t?ng(e,null,n,r):nf(e,t.child,n,r)}function r4(t,e,n,r,i){n=n.render;var a=e.ref;return(nw(e,i),r=n9(t,e,n,r,a,i),n=rt(),null===t||r2)?(e3&&n&&e1(e),e.flags|=1,r5(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ip(t,e,i))}function r3(t,e,n,r,i){if(null===t){var a=n.type;return"function"!=typeof a||aQ(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=aJ(n.type,null,r,e,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=a,r8(t,e,a,r,i))}if(a=t.child,0==(t.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:nl)(o,r)&&t.ref===e.ref)return ip(t,e,i)}return e.flags|=1,(t=a$(a,r)).ref=e.ref,t.return=e,e.child=t}function r8(t,e,n,r,i){if(null!==t){var a=t.memoizedProps;if(nl(a,r)&&t.ref===e.ref){if(r2=!1,e.pendingProps=r=a,0==(t.lanes&i))return e.lanes=t.lanes,ip(t,e,i);0!=(131072&t.flags)&&(r2=!0)}}return r9(t,e,n,r,i)}function r6(t,e,n){var r=e.pendingProps,i=r.children,a=null!==t?t.memoizedState:null;if("hidden"===r.mode){if(0==(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ee(at,i9),i9|=n;else{if(0==(1073741824&n))return t=null!==a?a.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ee(at,i9),i9|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,ee(at,i9),i9|=r}}else null!==a?(r=a.baseLanes|n,e.memoizedState=null):r=n,ee(at,i9),i9|=r;return r5(t,e,i,n),e.child}function r7(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function r9(t,e,n,r,i){var a=es(n)?ea:er.current;return(a=eo(e,a),nw(e,i),n=n9(t,e,n,r,a,i),r=rt(),null===t||r2)?(e3&&r&&e1(e),e.flags|=1,r5(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ip(t,e,i))}function it(t,e,n,r,i){if(es(n)){var a=!0;ed(e)}else a=!1;if(nw(e,i),null===e.stateNode)ig(t,e),rV(e,n,r),rW(e,n,r,i),r=!0;else if(null===t){var o=e.stateNode,s=e.memoizedProps;o.props=s;var l=o.context,h=n.contextType;h="object"==typeof h&&null!==h?nC(h):eo(e,h=es(n)?ea:er.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==h)&&rj(e,o,r,h),nF=!1;var c=e.memoizedState;o.state=c,nI(e,r,o,i),l=e.memoizedState,s!==r||c!==l||ei.current||nF?("function"==typeof u&&(rU(e,n,u,r),l=e.memoizedState),(s=nF||rH(e,n,s,r,c,l,h))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(e.flags|=4194308)):("function"==typeof o.componentDidMount&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),o.props=r,o.state=l,o.context=h,r=s):("function"==typeof o.componentDidMount&&(e.flags|=4194308),r=!1)}else{o=e.stateNode,nN(t,e),s=e.memoizedProps,h=e.type===e.elementType?s:rz(e.type,s),o.props=h,d=e.pendingProps,c=o.context,l="object"==typeof(l=n.contextType)&&null!==l?nC(l):eo(e,l=es(n)?ea:er.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||c!==l)&&rj(e,o,r,l),nF=!1,c=e.memoizedState,o.state=c,nI(e,r,o,i);var g=e.memoizedState;s!==d||c!==g||ei.current||nF?("function"==typeof f&&(rU(e,n,f,r),g=e.memoizedState),(h=nF||rH(e,n,h,r,c,g,l)||!1)?(u||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,g,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,g,l)),"function"==typeof o.componentDidUpdate&&(e.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!=typeof o.componentDidUpdate||s===t.memoizedProps&&c===t.memoizedState||(e.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===t.memoizedProps&&c===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=g),o.props=r,o.state=g,o.context=l,r=h):("function"!=typeof o.componentDidUpdate||s===t.memoizedProps&&c===t.memoizedState||(e.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===t.memoizedProps&&c===t.memoizedState||(e.flags|=1024),r=!1)}return ie(t,e,n,r,a,i)}function ie(t,e,n,r,i,a){r7(t,e);var o=0!=(128&e.flags);if(!r&&!o)return i&&ec(e,n,!1),ip(t,e,a);r=e.stateNode,r1.current=e;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&o?(e.child=nf(e,t.child,null,a),e.child=nf(e,null,s,a)):r5(t,e,s,a),e.memoizedState=r.state,i&&ec(e,n,!0),e.child}function ir(t){var e=t.stateNode;e.pendingContext?eh(t,e.pendingContext,e.pendingContext!==e.context):e.context&&eh(t,e.context,!1),nV(t,e.containerInfo)}function ii(t,e,n,r,i){return na(),no(i),e.flags|=256,r5(t,e,n,r),e.child}var ia={dehydrated:null,treeContext:null,retryLane:0};function io(t){return{baseLanes:t,cachePool:null,transitions:null}}function is(t,e,n){var r,i=e.pendingProps,a=nY.current,o=!1,s=0!=(128&e.flags);if((r=s)||(r=(null===t||null!==t.memoizedState)&&0!=(2&a)),r?(o=!0,e.flags&=-129):(null===t||null!==t.memoizedState)&&(a|=1),ee(nY,1&a),null===t)return(ne(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated))?(0==(1&e.mode)?e.lanes=1:tz(t)?e.lanes=8:e.lanes=1073741824,null):(s=i.children,t=i.fallback,o?(i=e.mode,o=e.child,s={mode:"hidden",children:s},0==(1&i)&&null!==o?(o.childLanes=0,o.pendingProps=s):o=a0(s,i,0,null),t=aZ(t,i,n,null),o.return=e,t.return=e,o.sibling=t,e.child=o,e.child.memoizedState=io(n),e.memoizedState=ia,t):il(e,s));if(null!==(a=t.memoizedState)&&null!==(r=a.dehydrated))return function(t,e,n,r,i,a,o){if(n)return 256&e.flags?(e.flags&=-257,ih(t,e,o,r=rY(Error(d(422))))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(a=r.fallback,i=e.mode,r=a0({mode:"visible",children:r.children},i,0,null),a=aZ(a,i,o,null),a.flags|=2,r.return=e,a.return=e,r.sibling=a,e.child=r,0!=(1&e.mode)&&nf(e,t.child,null,o),e.child.memoizedState=io(o),e.memoizedState=ia,a);if(0==(1&e.mode))return ih(t,e,o,null);if(tz(i))return r=tU(i).digest,ih(t,e,o,r=rY(a=Error(d(419)),r,void 0));if(n=0!=(o&t.childLanes),r2||n){if(null!==(r=i8)){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|o))?0:i)&&i!==a.retryLane&&(a.retryLane=i,nE(t,i),aC(r,t,i,-1))}return aI(),ih(t,e,o,r=rY(Error(d(421))))}return tO(i)?(e.flags|=128,e.child=t.child,tB(i,e=aK.bind(null,t)),null):(t=a.treeContext,J&&(e4=tW(i),e5=e,e3=!0,e6=null,e8=!1,null!==t&&(eX[eq++]=e$,eX[eq++]=eJ,eX[eq++]=eQ,e$=t.id,eJ=t.overflow,eQ=e)),e=il(e,r.children),e.flags|=4096,e)}(t,e,s,i,r,a,n);if(o){o=i.fallback,s=e.mode,r=(a=t.child).sibling;var l={mode:"hidden",children:i.children};return 0==(1&s)&&e.child!==a?((i=e.child).childLanes=0,i.pendingProps=l,e.deletions=null):(i=a$(a,l)).subtreeFlags=14680064&a.subtreeFlags,null!==r?o=a$(r,o):(o=aZ(o,s,n,null),o.flags|=2),o.return=e,i.return=e,i.sibling=o,e.child=i,i=o,o=e.child,s=null===(s=t.child.memoizedState)?io(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=t.childLanes&~n,e.memoizedState=ia,i}return t=(o=t.child).sibling,i=a$(o,{mode:"visible",children:i.children}),0==(1&e.mode)&&(i.lanes=n),i.return=e,i.sibling=null,null!==t&&(null===(n=e.deletions)?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=i,e.memoizedState=null,i}function il(t,e){return(e=a0({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function ih(t,e,n,r){return null!==r&&no(r),nf(e,t.child,null,n),t=il(e,e.pen
8dingProps.children),t.flags|=2,e.memoizedState=null,t}function iu(t,e,n){t.lanes|=e;var r=t.alternate;null!==r&&(r.lanes|=e),nx(t.return,e,n)}function id(t,e,n,r,i){var a=t.memoizedState;null===a?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=e,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function ic(t,e,n){var r=e.pendingProps,i=r.revealOrder,a=r.tail;if(r5(t,e,r.children,n),0!=(2&(r=nY.current)))r=1&r|2,e.flags|=128;else{if(null!==t&&0!=(128&t.flags))t:for(t=e.child;null!==t;){if(13===t.tag)null!==t.memoizedState&&iu(t,n,e);else if(19===t.tag)iu(t,n,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(ee(nY,r),0==(1&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(i=null,n=e.child;null!==n;)null!==(t=n.alternate)&&null===nX(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),id(e,!1,i,n,a);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===nX(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}id(e,!0,n,null,a);break;case"together":id(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ig(t,e){0==(1&e.mode)&&null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ip(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),ar|=e.lanes,0==(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(d(153));if(null!==e.child){for(n=a$(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=a$(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function im(t){t.flags|=4}function iy(t,e){if(null!==t&&t.child===e.child)return!0;if(0!=(16&e.flags))return!1;for(t=e.child;null!==t;){if(0!=(12854&t.flags)||0!=(12854&t.subtreeFlags))return!1;t=t.sibling}return!0}if(Q)e=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)B(t,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},r=function(){},i=function(t,e,n,r,i){(t=t.memoizedProps)!==r&&(n=V(e.stateNode,n,t,r,i,nH(nz.current)),(e.updateQueue=n)&&im(e))},a=function(t,e,n,r){n!==r&&im(e)};else if($){e=function(t,n,r,i){for(var a=n.child;null!==a;){if(5===a.tag){var o=a.stateNode;r&&i&&(o=tR(o,a.type,a.memoizedProps,a)),B(t,o)}else if(6===a.tag)o=a.stateNode,r&&i&&(o=tD(o,a.memoizedProps,a)),B(t,o);else if(4!==a.tag){if(22===a.tag&&null!==a.memoizedState)null!==(o=a.child)&&(o.return=a),e(t,a,!0,!0);else if(null!==a.child){a.child.return=a,a=a.child;continue}}if(a===n)break;for(;null===a.sibling;){if(null===a.return||a.return===n)return;a=a.return}a.sibling.return=a.return,a=a.sibling}};var iv=function(t,e,n,r){for(var i=e.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=tR(a,i.type,i.memoizedProps,i)),tM(t,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=tD(a,i.memoizedProps,i)),tM(t,a);else if(4!==i.tag){if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),iv(t,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};r=function(t,e){var n=e.stateNode;if(!iy(t,e)){var r=tF(t=n.containerInfo);iv(r,e,!1,!1),n.pendingChildren=r,im(e),tN(t,r)}},i=function(t,n,r,i,a){var o=t.stateNode,s=t.memoizedProps;if((t=iy(t,n))&&s===i)n.stateNode=o;else{var l=n.stateNode,h=nH(nz.current),u=null;s!==i&&(u=V(l,r,s,i,a,h)),t&&null===u?n.stateNode=o:(H(o=tE(o,u,r,s,i,n,t,l),r,i,a,h)&&im(n),n.stateNode=o,t?im(n):e(o,n,!1,!1))}},a=function(t,e,n,r){n!==r?(t=nH(nB.current),n=nH(nz.current),e.stateNode=W(r,t,n,e),im(e)):e.stateNode=t.stateNode}}else r=function(){},i=function(){},a=function(){};function ib(t,e){if(!e3)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;
8null===n?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?e||null===t.tail?t.tail=null:t.tail.sibling=null:r.sibling=null}}function i_(t){var e=null!==t.alternate&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=t,i=i.sibling;else for(i=t.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}var iS=!1,ix=!1,iw="function"==typeof WeakSet?WeakSet:Set,iC=null;function ik(t,e){var n=t.ref;if(null!==n){if("function"==typeof n)try{n(null)}catch(n){aV(t,e,n)}else n.current=null}}function iP(t,e,n){try{n()}catch(n){aV(t,e,n)}}var iT=!1;function iE(t,e,n){var r=e.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&t)===t){var a=i.destroy;i.destroy=void 0,void 0!==a&&iP(e,n,a)}i=i.next}while(i!==r)}}function iF(t,e){if(null!==(e=null!==(e=e.updateQueue)?e.lastEffect:null)){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function iM(t){var e=t.ref;if(null!==e){var n=t.stateNode;t=5===t.tag?L(n):n,"function"==typeof e?e(t):e.current=t}}function iN(t){return 5===t.tag||3===t.tag||4===t.tag}function iA(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||iN(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;5!==t.tag&&6!==t.tag&&18!==t.tag;){if(2&t.flags||null===t.child||4===t.tag)continue t;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}var iR=null,iD=!1;function iL(t,e,n){for(n=n.child;null!==n;)iI(t,e,n),n=n.sibling}function iI(t,e,n){if(eG&&"function"==typeof eG.onCommitFiberUnmount)try{eG.onCommitFiberUnmount(eI,n)}catch(t){}switch(n.tag){case 5:ix||ik(n,e);case 6:if(Q){var r=iR,i=iD;iR=null,iL(t,e,n),iR=r,iD=i,null!==iR&&(iD?tS(iR,n.stateNode):t_(iR,n.stateNode))}else iL(t,e,n);break;case 18:Q&&null!==iR&&(iD?tZ(iR,n.stateNode):tJ(iR,n.stateNode));break;case 4:Q?(r=iR,i=iD,iR=n.stateNode.containerInfo,iD=!0,iL(t,e,n),iR=r,iD=i):($&&(i=tF(r=n.stateNode.containerInfo),tA(r,i)),iL(t,e,n));break;case 0:case 11:case 14:case 15:if(!ix&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!=(2&a)?iP(n,e,o):0!=(4&a)&&iP(n,e,o)),i=i.next}while(i!==r)}iL(t,e,n);break;case 1:if(!ix&&(ik(n,e),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(t){aV(n,e,t)}iL(t,e,n);break;case 21:default:iL(t,e,n);break;case 22:1&n.mode?(ix=(r=ix)||null!==n.memoizedState,iL(t,e,n),ix=r):iL(t,e,n)}}function iG(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new iw),e.forEach(function(e){var r=aY.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))})}}function iO(t,e){var n=e.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e;if(Q){var o=a;t:for(;null!==o;){switch(o.tag){case 5:iR=o.stateNode,iD=!1;break t;case 3:case 4:iR=o.stateNode.containerInfo,iD=!0;break t}o=o.return}if(null===iR)throw Error(d(160));iI(t,a,i),iR=null,iD=!1}else iI(t,a,i);var s=i.alternate;null!==s&&(s.return=null),i.return=null}catch(t){aV(i,e,t)}}if(12854&e.subtreeFlags)for(e=e.child;null!==e;)iz(e,t),e=e.sibling}function iz(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(iO(e,t),iU(t),4&r){try{iE(3,t,t.return),iF(3,t)}catch(e){aV(t,t.return,e)}try{iE(5,t,t.return)}catch(e){aV(t,t.return,e)}}break;case 1:iO(e,t),iU(t),512&r&&null!==n&&ik(n,n.return);break;case 5:if(iO(e,t),iU(t),512&r&&null!==n&&ik(n,n.return),Q){if(32&t.flags){var i=t.stateNode;try{tx(i)}catch(e){aV(t,t.return,e)}}if(4&r&&null!=(i=t.stateNode)){var a=t.memoizedProps;if(n=null!==n?n.memoizedProps:a,r=t.type,e=t.updateQueue,t.updateQueue=null,null!==e)try{ty(i,e,r,n,a,t)}catch(e){aV(t,t.return,e)}}}break;case 6:if(iO(e,t),iU(t),4&r&&Q){if(null===t.stateNode)throw Error(d(162));i=t.stateNode,a=t.memoizedProps,n=null!==n?n.memoizedProps:a;try{tp(i,n,a)}catch(e){aV(t,t.return,e)}}break;case 3:if(iO(e,t),iU(t),4&r){if(Q&&J&&null!==n&&n.memoizedState.isDehydrated)try{tQ(e.containerInfo)}catch(e){aV(t,t.return,e)}if($){i=e.containerInfo,a=e.pendingChildren;try{tA(i,a)}catch(e){aV(t,t.return,e)}}}break;case 4:if(iO(e,t),iU(t),4&r&&$){i=(a=t.stateNode).containerInfo,a=a.pendingChildren;try{tA(i,a)}catch(e){aV(t,t.return,e)}}break;case 13:iO(e,t),iU(t),8192&(i=t.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,a&&(null===i.alternate||null===i.alternate.memoizedState)&&(al=eN())),4&r&&iG(t);break;case 22:var o=null!==n&&null!==n.memoizedState;if(1&t.mode?(ix=(n=ix)||o,iO(e,t),ix=n):iO(e,t),iU(t),8192&r){if(n=null!==t.memoizedState,(t.stateNode.isHidden=n)&&!o&&0!=(1&t.mode))for(iC=t,r=t.child;null!==r;){for(e=iC=r;null!==iC;){var s=(o=iC).child;switch(o.tag){case 0:case 11:case 14:case 15:iE(4,o,o.return);break;case 1:ik(o,o.return);var l=o.stateNode;if("function"==typeof l.componentWillUnmount){var h=o,u=o.return;try{l.props=h.memoizedProps,l.state=h.memoizedState,l.componentWillUnmount()}catch(t){aV(h,u,t)}}break;case 5:ik(o,o.return);break;case 22:if(null!==o.memoizedState){iH(e);continue}}null!==s?(s.return=o,iC=s):iH(e)}r=r.sibling}if(Q){t:if(r=null,Q)for(e=t;;){if(5===e.tag){if(null===r){r=e;try{i=e.stateNode,n?tw(i):tk(e.stateNode,e.memoizedProps)}catch(e){aV(t,t.return,e)}}}else if(6===e.tag){if(null===r)try{a=e.stateNode,n?tC(a):tP(a,e.memoizedProps)}catch(e){aV(t,t.return,e)}}else if((22!==e.tag&&23!==e.tag||null===e.memoizedState||e===t)&&null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;null===e.sibling;){if(null===e.return||e.return===t)break t;r===e&&(r=null),e=e.return}r===e&&(r=null),e.sibling.return=e.return,e=e.sibling}}}break;case 19:iO(e,t),iU(t),4&r&&iG(t);break;case 21:break;default:iO(e,t),iU(t)}}function iU(t){var e=t.flags;if(2&e){try{if(Q){e:{for(var n=t.return;null!==n;){if(iN(n)){var r=n;break e}n=n.return}throw Error(d(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(tx(i),r.flags&=-33);var a=iA(t);!function t(e,n,r){var i=e.tag;if(5===i||6===i)e=e.stateNode,n?tv(r,e,n):tf(r,e);else if(4!==i&&null!==(e=e.child))for(t(e,n,r),e=e.sibling;null!==e;)t(e,n,r),e=e.sibling}(t,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,s=iA(t);!function t(e,n,r){var i=e.tag;if(5===i||6===i)e=e.stateNode,n?tb(r,e,n):tg(r,e);else if(4!==i&&null!==(e=e.child))for(t(e,n,r),e=e.sibling;null!==e;)t(e,n,r),e=e.sibling}(t,s,o);break;default:throw Error(d(161))}}}catch(e){aV(t,t.return,e)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function iB(t){for(;null!==iC;){var e=iC;if(0!=(8772&e.flags)){var n=e.alternate;try{if(0!=(8772&e.flags))switch(e.tag){case 0:case 11:case 15:ix||iF(5,e);break;case 1:var r=e.stateNode;if(4&e.flags&&!ix){if(null===n)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:rz(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}}var a=e.updateQueue;null!==a&&nG(e,a,r);break;case 3:var o=e.updateQueue;if(null!==o){if(n=null,null!==e.child)switch(e.child.tag){case 5:n=L(e.child.stateNode);break;case 1:n=e.child.stateNode}nG(e,o,n)}break;case 5:var s=e.stateNode;null===n&&4&e.flags&&tm(s,e.type,e.memoizedProps,e);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(J&&null===e.memoizedState){var l=e.alternate;if(null!==l){var h=l.memoizedState;if(null!==h){var u=h.dehydrated;null!==u&&t$(u)}}}break;default:throw Error(d(163))}ix||512&e.flags&&iM(e)}catch(t){aV(e,e.return,t)}}if(e===t){iC=null;break}if(null!==(n=e.sibling)){n.return=e.return,iC=n;break}iC=e.return}}function iH(t){for(;null!==iC;){var e=iC;if(e===t){iC=null;break}var n=e.sibling;if(null!==n){n.return=e.return,iC=n;break}iC=e.return}}function iV(t){for(;null!==iC;){var e=iC;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{iF(4,e)}catch(t){aV(e,n,t)}break;case 1:var r=e.stateNode;if("function"==typeof r.componentDidMount){var i=e.return;try{r.componentDidMount()}catch(t){aV(e,i,t)}}var a=e.return;try{iM(e)}catch(t){aV(e,a,t)}break;case 5:var o=e.return;try{iM(e)}catch(t){aV(e,o,t)}}}catch(t){aV(e,e.return,t)}if(e===t){iC=null;break}var s=e.sibling;if(null!==s){s.return=e.return,iC=s;break}iC=e.return}}var ij=0,iW=1,iK=2,iY=3,iX=4;if("function"==typeof Symbol&&Symbol.for){var iq=Symbol.for;ij=iq("selector.component"),iW=iq("selector.has_pseudo_class"),iK=iq("selector.role"),iY=iq("selector.test_id"),iX=iq("selector.text")}function iQ(t){var e=Z(t);if(null!=e){if("string"!=typeof e.memoizedProps["data-testname"])throw Error(d(364));return e}if(null===(t=to(t)))throw Error(d(362));return t.stateNode.current}function i$(t,e){switch(e.$$typeof){case ij:if(t.type===e.value)return!0;break;case iW:t:{e=e.value,t=[t,0];for(var n=0;n<t.length;){var r=t[n++],i=t[n++],a=e[i];if(5!==r.tag||!th(r)){for(;null!=a&&i$(r,a);)a=e[++i];if(i===e.length){e=!0;break t}for(r=r.child;null!==r;)t.push(r,i),r=r.sibling}}e=!1}return e;case iK:if(5===t.tag&&tu(t.stateNode,e.value))return!0;break;case iX:if((5===t.tag||6===t.tag)&&null!==(t=tl(t))&&0<=t.indexOf(e.value))return!0;break;case iY:if(5===t.tag&&"string"==typeof(t=t.memoizedProps["data-testname"])&&t.toLowerCase()===e.value.toLowerCase())return!0;break;default:throw Error(d(365))}return!1}function iJ(t){switch(t.$$typeof){case ij:return"<"+(E(t.value)||"Unknown")+">";case iW:return":has("+(iJ(t)||"")+")";case iK:return'[role="'+t.value+'"]';
8case iX:return'"'+t.value+'"';case iY:return'[data-testname="'+t.value+'"]';default:throw Error(d(365))}}function iZ(t,e){var n=[];t=[t,0];for(var r=0;r<t.length;){var i=t[r++],a=t[r++],o=e[a];if(5!==i.tag||!th(i)){for(;null!=o&&i$(i,o);)o=e[++a];if(a===e.length)n.push(i);else for(i=i.child;null!==i;)t.push(i,a),i=i.sibling}}return n}function i0(t,e){if(!ta)throw Error(d(363));t=iZ(t=iQ(t),e),e=[],t=Array.from(t);for(var n=0;n<t.length;){var r=t[n++];if(5===r.tag)th(r)||e.push(r.stateNode);else for(r=r.child;null!==r;)t.push(r),r=r.sibling}return e}var i1=Math.ceil,i2=c.ReactCurrentDispatcher,i5=c.ReactCurrentOwner,i4=c.ReactCurrentBatchConfig,i3=0,i8=null,i6=null,i7=0,i9=0,at=t9(0),ae=0,an=null,ar=0,ai=0,aa=0,ao=null,as=null,al=0,ah=1/0,au=null;function ad(){ah=eN()+500}var ac=!1,af=null,ag=null,ap=!1,am=null,ay=0,av=0,ab=null,a_=-1,aS=0;function ax(){return 0!=(6&i3)?eN():-1!==a_?a_:a_=eN()}function aw(t){return 0==(1&t.mode)?1:0!=(2&i3)&&0!==i7?i7&-i7:null!==ns.transition?(0===aS&&(aS=eS()),aS):0!==(t=ek)?t:te()}function aC(t,e,n,r){if(50<av)throw av=0,ab=null,Error(d(185));ew(t,n,r),(0==(2&i3)||t!==i8)&&(t===i8&&(0==(2&i3)&&(ai|=n),4===ae&&aF(t,i7)),ak(t,r),1===n&&0===i3&&0==(1&e.mode)&&(ad(),eU&&eV()))}function ak(t,e){var n,r=t.callbackNode;!function(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,a=t.pendingLanes;0<a;){var o=31-ef(a),s=1<<o,l=i[o];-1===l?(0==(s&n)||0!=(s&r))&&(i[o]=function(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;default:return -1}}(s,e)):l<=e&&(t.expiredLanes|=s),a&=~s}}(t,e);var i=eb(t,t===i8?i7:0);if(0===i)null!==r&&eE(r),t.callbackNode=null,t.callbackPriority=0;else if(e=i&-i,t.callbackPriority!==e){if(null!=r&&eE(r),1===e)0===t.tag?(n=aM.bind(null,t),eU=!0,eH(n)):eH(aM.bind(null,t)),tr?ti(function(){0==(6&i3)&&eV()}):eT(eA,eV),r=null;else{switch(eP(i)){case 1:r=eA;break;case 4:r=eR;break;case 16:default:r=eD;break;case 536870912:r=eL}r=eT(r,aP.bind(null,t))}t.callbackPriority=e,t.callbackNode=r}}function aP(t,e){if(a_=-1,aS=0,0!=(6&i3))throw Error(d(327));var n=t.callbackNode;if(aB()&&t.callbackNode!==n)return null;var r=eb(t,t===i8?i7:0);if(0===r)return null;if(0!=(30&r)||0!=(r&t.expiredLanes)||e)e=aG(t,r);else{e=r;var i=i3;i3|=2;var a=aL();for((i8!==t||i7!==e)&&(au=null,ad(),aR(t,e));;)try{(function(){for(;null!==i6&&!eF();)aO(i6)})();break}catch(e){aD(t,e)}nb(),i2.current=a,i3=i,null!==i6?e=0:(i8=null,i7=0,e=ae)}if(0!==e){if(2===e&&0!==(i=e_(t))&&(r=i,e=aT(t,i)),1===e)throw n=an,aR(t,0),aF(t,r),ak(t,eN()),n;if(6===e)aF(t,r);else{if(i=t.current.alternate,0==(30&r)&&!function(t){for(var e=t;;){if(16384&e.flags){var n=e.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!eO(a(),i))return!1}catch(t){return!1}}}if(n=e.child,16384&e.subtreeFlags&&null!==n)n.return=e,e=n;else{if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}(i)&&(2===(e=aG(t,r))&&0!==(a=e_(t))&&(r=a,e=aT(t,a)),1===e))throw n=an,aR(t,0),aF(t,r),ak(t,eN()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(d(345));case 2:case 5:aU(t,as,au);break;case 3:if(aF(t,r),(130023424&r)===r&&10<(e=al+500-eN())){if(0!==eb(t,0))break;if(((i=t.suspendedLanes)&r)!==r){ax(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=K(aU.bind(null,t,as,au),e);break}aU(t,as,au);break;case 4:if(aF(t,r),(4194240&r)===r)break;for(i=-1,e=t.eventTimes;0<r;){var o=31-ef(r);a=1<<o,(o=e[o])>i&&(i=o),r&=~a}if(r=i,10<(r=(120>(r=eN()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*i1(r/1960))-r)){t.timeoutHandle=K(aU.bind(null,t,as,au),r);break}aU(t,as,au);break;default:throw Error(d(329))}}}return ak(t,eN()),t.callbackNode===n?aP.bind(null,t):null}function aT(t,e){var n=ao;return t.current.memoizedState.isDehydrated&&(aR(t,e).flags|=256),2!==(t=aG(t,e))&&(e=as,as=n,null!==e&&aE(e)),t}function aE(t){null===as?as=t:as.push.apply(as,t)}function aF(t,e){for(e&=~aa,e&=~ai,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-ef(e),r=1<<n;t[n]=-1,e&=~r}}function aM(t){if(0!=(6&i3))throw Error(d(327));aB();var e=eb(t,0);if(0==(1&e))return ak(t,eN()),null;var n=aG(t,e);if(0!==t.tag&&2===n){var r=e_(t);0!==r&&(e=r,n=aT(t,r))}if(1===n)throw n=an,aR(t,0),aF(t,e),ak(t,eN()),n;if(6===n)throw Error(d(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,aU(t,as,au),ak(t,eN()),null}function aN(t){null!==am&&0===am.tag&&0==(6&i3)&&aB();var e=i3;i3|=1;var n=i4.transition,r=ek;try{if(i4.transition=null,ek=1,t)return t()}finally{ek=r,i4.transition=n,0==(6&(i3=e))&&eV()}}function aA(){i9=at.current,et(at)}function aR(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==X&&(t.timeoutHandle=X,Y(n)),null!==i6)for(n=i6.return;null!==n;){var r=n;switch(e2(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&el();break;case 3:nj(),et(ei),et(er),nQ();break;case 5:nK(r);break;case 4:nj();break;case 13:case 19:et(nY);break;case 10:nS(r.type._context);break;case 22:case 23:aA()}n=n.return}if(i8=t,i6=t=a$(t.current,null),i7=i9=e,ae=0,an=null,aa=ai=ar=0,as=ao=null,null!==nk){for(e=0;e<nk.length;e++)if(null!==(r=(n=nk[e]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}nk=null}return t}function aD(t,e){for(;;){var n=i6;try{if(nb(),n$.current=rL,n5){for(var r=n0.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}n5=!1}if(nZ=0,n2=n1=n0=null,n4=!1,n3=0,i5.current=null,null===n||null===n.return){ae=1,an=e,i6=null;break}t:{var a=t,o=n.return,s=n,l=e;if(e=i7,s.flags|=32768,null!==l&&"object"==typeof l&&"function"==typeof l.then){var h=l,u=s,c=u.tag;
8if(0==(1&u.mode)&&(0===c||11===c||15===c)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var g=rZ(o);if(null!==g){g.flags&=-257,r0(g,o,s,a,e),1&g.mode&&rJ(a,h,e),e=g,l=h;var p=e.updateQueue;if(null===p){var m=new Set;m.add(l),e.updateQueue=m}else p.add(l);break t}if(0==(1&e)){rJ(a,h,e),aI();break t}l=Error(d(426))}else if(e3&&1&s.mode){var y=rZ(o);if(null!==y){0==(65536&y.flags)&&(y.flags|=256),r0(y,o,s,a,e),no(rK(l,s));break t}}a=l=rK(l,s),4!==ae&&(ae=2),null===ao?ao=[a]:ao.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,e&=-e,a.lanes|=e;var v=rQ(a,l,e);nL(a,v);break t;case 1:s=l;var b=a.type,_=a.stateNode;if(0==(128&a.flags)&&("function"==typeof b.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===ag||!ag.has(_)))){a.flags|=65536,e&=-e,a.lanes|=e;var S=r$(a,s,e);nL(a,S);break t}}a=a.return}while(null!==a)}az(n)}catch(t){e=t,i6===n&&null!==n&&(i6=n=n.return);continue}break}}function aL(){var t=i2.current;return i2.current=rL,null===t?rL:t}function aI(){(0===ae||3===ae||2===ae)&&(ae=4),null===i8||0==(268435455&ar)&&0==(268435455&ai)||aF(i8,i7)}function aG(t,e){var n=i3;i3|=2;var r=aL();for((i8!==t||i7!==e)&&(au=null,aR(t,e));;)try{(function(){for(;null!==i6;)aO(i6)})();break}catch(e){aD(t,e)}if(nb(),i3=n,i2.current=r,null!==i6)throw Error(d(261));return i8=null,i7=0,ae}function aO(t){var e=o(t.alternate,t,i9);t.memoizedProps=t.pendingProps,null===e?az(t):i6=e,i5.current=null}function az(t){var n=t;do{var o=n.alternate;if(t=n.return,0==(32768&n.flags)){if(null!==(o=function(t,n,o){var s=n.pendingProps;switch(e2(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return i_(n),null;case 1:case 17:return es(n.type)&&el(),i_(n),null;case 3:return o=n.stateNode,nj(),et(ei),et(er),nQ(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(null===t||null===t.child)&&(nr(n)?im(n):null===t||t.memoizedState.isDehydrated&&0==(256&n.flags)||(n.flags|=1024,null!==e6&&(aE(e6),e6=null))),r(t,n),i_(n),null;case 5:nK(n),o=nH(nB.current);var l=n.type;if(null!==t&&null!=n.stateNode)i(t,n,l,s,o),t.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!s){if(null===n.stateNode)throw Error(d(166));return i_(n),null}if(t=nH(nz.current),nr(n)){if(!J)throw Error(d(175));t=tK(n.stateNode,n.type,n.memoizedProps,o,t,n,!e8),n.updateQueue=t,null!==t&&im(n)}else{var h=U(l,s,o,t,n);e(h,n,!1,!1),n.stateNode=h,H(h,l,s,o,t)&&im(n)}null!==n.ref&&(n.flags|=512,n.flags|=2097152)}return i_(n),null;case 6:if(t&&null!=n.stateNode)a(t,n,t.memoizedProps,s);else{if("string"!=typeof s&&null===n.stateNode)throw Error(d(166));if(t=nH(nB.current),o=nH(nz.current),nr(n)){if(!J)throw Error(d(176));if((s=tY(t=n.stateNode,o=n.memoizedProps,n,!e8))&&null!==(l=e5))switch(l.tag){case 3:t1(l.stateNode.containerInfo,t,o,0!=(1&l.mode));break;case 5:t2(l.type,l.memoizedProps,l.stateNode,t,o,0!=(1&l.mode))}s&&im(n)}else n.stateNode=W(s,t,o,n)}return i_(n),null;case 13:if(et(nY),s=n.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(e3&&null!==e4&&0!=(1&n.mode)&&0==(128&n.flags))ni(),na(),n.flags|=98560,l=!1;else if(l=nr(n),null!==s&&null!==s.dehydrated){if(null===t){if(!l)throw Error(d(318));if(!J)throw Error(d(344));if(!(l=null!==(l=n.memoizedState)?l.dehydrated:null))throw Error(d(317));tX(l,n)}else na(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;i_(n),l=!1}else null!==e6&&(aE(e6),e6=null),l=!0;if(!l)return 65536&n.flags?n:null}if(0!=(128&n.flags))return n.lanes=o,n;return(o=null!==s)!=(null!==t&&null!==t.memoizedState)&&o&&(n.child.flags|=8192,0!=(1&n.mode)&&(null===t||0!=(1&nY.current)?0===ae&&(ae=3):aI())),null!==n.updateQueue&&(n.flags|=4),i_(n),null;case 4:return nj(),r(t,n),null===t&&tt(n.stateNode.containerInfo),i_(n),null;case 10:return nS(n.type._context),i_(n),null;case 19:if(et(nY),null===(l=n.memoizedState))return i_(n),null;if(s=0!=(128&n.flags),null===(h=l.rendering)){if(s)ib(l,!1);else{if(0!==ae||null!==t&&0!=(128&t.flags))for(t=n.child;null!==t;){if(null!==(h=nX(t))){for(n.flags|=128,ib(l,!1),null!==(t=h.updateQueue)&&(n.updateQueue=t,n.flags|=4),n.subtreeFlags=0,t=o,o=n.child;null!==o;)s=o,l=t,s.flags&=14680066,null===(h=s.alternate)?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,
8s.stateNode=null):(s.childLanes=h.childLanes,s.lanes=h.lanes,s.child=h.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=h.memoizedProps,s.memoizedState=h.memoizedState,s.updateQueue=h.updateQueue,s.type=h.type,l=h.dependencies,s.dependencies=null===l?null:{lanes:l.lanes,firstContext:l.firstContext}),o=o.sibling;return ee(nY,1&nY.current|2),n.child}t=t.sibling}null!==l.tail&&eN()>ah&&(n.flags|=128,s=!0,ib(l,!1),n.lanes=4194304)}}else{if(!s){if(null!==(t=nX(h))){if(n.flags|=128,s=!0,null!==(t=t.updateQueue)&&(n.updateQueue=t,n.flags|=4),ib(l,!0),null===l.tail&&"hidden"===l.tailMode&&!h.alternate&&!e3)return i_(n),null}else 2*eN()-l.renderingStartTime>ah&&1073741824!==o&&(n.flags|=128,s=!0,ib(l,!1),n.lanes=4194304)}l.isBackwards?(h.sibling=n.child,n.child=h):(null!==(t=l.last)?t.sibling=h:n.child=h,l.last=h)}if(null!==l.tail)return n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=eN(),n.sibling=null,t=nY.current,ee(nY,s?1&t|2:1&t),n;return i_(n),null;case 22:case 23:return aA(),o=null!==n.memoizedState,null!==t&&null!==t.memoizedState!==o&&(n.flags|=8192),o&&0!=(1&n.mode)?0!=(1073741824&i9)&&(i_(n),Q&&6&n.subtreeFlags&&(n.flags|=8192)):i_(n),null;case 24:case 25:return null}throw Error(d(156,n.tag))}(o,n,i9))){i6=o;return}}else{if(null!==(o=function(t,e){switch(e2(e),e.tag){case 1:return es(e.type)&&el(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return nj(),et(ei),et(er),nQ(),0!=(65536&(t=e.flags))&&0==(128&t)?(e.flags=-65537&t|128,e):null;case 5:return nK(e),null;case 13:if(et(nY),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(d(340));na()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return et(nY),null;case 4:return nj(),null;case 10:return nS(e.type._context),null;case 22:case 23:return aA(),null;default:return null}}(o,n))){o.flags&=32767,i6=o;return}if(null!==t)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{ae=6,i6=null;return}}if(null!==(n=n.sibling)){i6=n;return}i6=n=t}while(null!==n);0===ae&&(ae=5)}function aU(t,e,n){var r=ek,i=i4.transition;try{i4.transition=null,ek=1,function(t,e,n,r){do aB();while(null!==am);if(0!=(6&i3))throw Error(d(327));n=t.finishedWork;var i=t.finishedLanes;if(null!==n){if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(d(177));t.callbackNode=null,t.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-ef(n),a=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~a}}(t,a),t===i8&&(i6=i8=null,i7=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||ap||(ap=!0,o=eD,s=function(){return aB(),null},eT(o,s)),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=i4.transition,i4.transition=null;var o,s,l,h,u,c=ek;ek=1;var f=i3;i3|=4,i5.current=null,function(t,e){for(O(t.containerInfo),iC=e;null!==iC;)if(e=(t=iC).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,iC=e;else for(;null!==iC;){t=iC;try{var n=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==n){var r=n.memoizedProps,i=n.memoizedState,a=t.stateNode,o=a.getSnapshotBeforeUpdate(t.elementType===t.type?r:rz(t.type,r),i);a.__reactInternalSnapshotBeforeUpdate=o}break;case 3:Q&&tT(t.stateNode.containerInfo);break;default:throw Error(d(163))}}catch(e){aV(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,iC=e;break}iC=t.return}n=iT,iT=!1}(t,n),iz(n,t),z(t.containerInfo),t.current=n,l=n,h=t,u=i,iC=l,function t(e,n,r){for(var i=0!=(1&e.mode);null!==iC;){var a=iC,o=a.child;if(22===a.tag&&i){var s=null!==a.memoizedState||iS;if(!s){var l=a.alternate,h=null!==l&&null!==l.memoizedState||ix;l=iS;var u=ix;if(iS=s,(ix=h)&&!u)for(iC=a;null!==iC;)h=(s=iC).child,22===s.tag&&null!==s.memoizedState?iV(a):null!==h?(h.return=s,iC=h):iV(a);for(;null!==o;)iC=o,t(o,n,r),o=o.sibling;iC=a,iS=l,ix=u}iB(e,n,r)}else 0!=(8772&a.subtreeFlags)&&null!==o?(o.return=a,iC=o):iB(e,n,r)}}(l,h,u),eM(),i3=f,ek=c,i4.transition=a}else t.current=n;if(ap&&(ap=!1,am=t,ay=i),0===(a=t.pendingLanes)&&(ag=null),function(t){if(eG&&"function"==typeof eG.onCommitFiberRoot)try{eG.onCommitFiberRoot(eI,t,void 0,128==(128&t.current.flags))}catch(t){}}(n.stateNode,r),ak(t,eN()),null!==e)for(r=t.onRecoverableError,n=0;n<e.length;n++)r((i=e[n]).value,{componentStack:i.stack,digest:i.digest});if(ac)throw ac=!1,t=af,af=null,t;0!=(1&ay)&&0!==t.tag&&aB(),0!=(1&(a=t.pendingLanes))?t===ab?av++:(av=0,ab=t):av=0,eV()}}(t,e,n,r)}finally{i4.transition=i,ek=r}return null}function aB(){if(null!==am){var t=eP(ay),e=i4.transition,n=ek;try{if(i4.transition=null,ek=16>t?16:t,null===am)var r=!1;else{if(t=am,am=null,ay=0,0!=(6&i3))throw Error(d(331));var i=i3;for(i3|=4,iC=t.current;null!==iC;){var a=iC,o=a.child;
vendor: 8,974 bytes, line 8
8if(0!=(16&iC.flags)){var s=a.deletions;if(null!==s){for(var l=0;l<s.length;l++){var h=s[l];for(iC=h;null!==iC;){var u=iC;switch(u.tag){case 0:case 11:case 15:iE(8,u,a)}var c=u.child;if(null!==c)c.return=u,iC=c;else for(;null!==iC;){var f=(u=iC).sibling,g=u.return;if(function t(e){var n=e.alternate;null!==n&&(e.alternate=null,t(n)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(n=e.stateNode)&&tn(n),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}(u),u===h){iC=null;break}if(null!==f){f.return=g,iC=f;break}iC=g}}}var p=a.alternate;if(null!==p){var m=p.child;if(null!==m){p.child=null;do{var y=m.sibling;m.sibling=null,m=y}while(null!==m)}}iC=a}}if(0!=(2064&a.subtreeFlags)&&null!==o)o.return=a,iC=o;else for(;null!==iC;){if(a=iC,0!=(2048&a.flags))switch(a.tag){case 0:case 11:case 15:iE(9,a,a.return)}var v=a.sibling;if(null!==v){v.return=a.return,iC=v;break}iC=a.return}}var b=t.current;for(iC=b;null!==iC;){var _=(o=iC).child;if(0!=(2064&o.subtreeFlags)&&null!==_)_.return=o,iC=_;else for(o=b;null!==iC;){if(s=iC,0!=(2048&s.flags))try{switch(s.tag){case 0:case 11:case 15:iF(9,s)}}catch(t){aV(s,s.return,t)}if(s===o){iC=null;break}var S=s.sibling;if(null!==S){S.return=s.return,iC=S;break}iC=s.return}}if(i3=i,eV(),eG&&"function"==typeof eG.onPostCommitFiberRoot)try{eG.onPostCommitFiberRoot(eI,t)}catch(t){}r=!0}return r}finally{ek=n,i4.transition=e}}return!1}function aH(t,e,n){e=rQ(t,e=rK(n,e),1),t=nR(t,e,1),e=ax(),null!==t&&(ew(t,1,e),ak(t,e))}function aV(t,e,n){if(3===t.tag)aH(t,t,n);else for(;null!==e;){if(3===e.tag){aH(e,t,n);break}if(1===e.tag){var r=e.stateNode;if("function"==typeof e.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ag||!ag.has(r))){t=r$(e,t=rK(n,t),1),e=nR(e,t,1),t=ax(),null!==e&&(ew(e,1,t),ak(e,t));break}}e=e.return}}function aj(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=ax(),t.pingedLanes|=t.suspendedLanes&n,i8===t&&(i7&n)===n&&(4===ae||3===ae&&(130023424&i7)===i7&&500>eN()-al?aR(t,0):aa|=n),ak(t,e)}function aW(t,e){0===e&&(0==(1&t.mode)?e=1:(e=ey,0==(130023424&(ey<<=1))&&(ey=4194304)));var n=ax();null!==(t=nE(t,e))&&(ew(t,e,n),ak(t,n))}function aK(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),aW(t,n)}function aY(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(d(314))}null!==r&&r.delete(e),aW(t,n)}function aX(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function aq(t,e,n,r){return new aX(t,e,n,r)}function aQ(t){return!(!(t=t.prototype)||!t.isReactComponent)}function a$(t,e){var n=t.alternate;return null===n?((n=aq(t.tag,e,t.key,t.mode)).elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&t.flags,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function aJ(t,e,n,r,i,a){var o=2;if(r=t,"function"==typeof t)aQ(t)&&(o=1);else if("string"==typeof t)o=5;else t:switch(t){case p:return aZ(n.children,i,a,e);case m:o=8,i|=8;break;case y:return(t=aq(12,n,e,2|i)).elementType=y,t.lanes=a,t;case S:return(t=aq(13,n,e,i)).elementType=S,t.lanes=a,t;case x:return(t=aq(19,n,e,i)).elementType=x,t.lanes=a,t;case k:return a0(n,i,a,e);default:if("object"==typeof t&&null!==t)switch(t.$$typeof){case v:o=10;break t;case b:o=9;break t;case _:o=11;break t;case w:o=14;break t;case C:o=16,r=null;break t}throw Error(d(130,null==t?t:typeof t,""))}return(e=aq(o,n,e,i)).elementType=t,e.type=r,e.lanes=a,e}function aZ(t,e,n,r){return(t=aq(7,t,r,e)).lanes=n,t}function a0(t,e,n,r){return(t=aq(22,t,r,e)).elementType=k,t.lanes=n,t.stateNode={isHidden:!1},t}function a1(t,e,n){return(t=aq(6,t,null,e)).lanes=n,t}function a2(t,e,n){return(e=aq(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function a5(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=X,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ex(0),this.expirationTimes=ex(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ex(0),this.identifierPrefix=r,this.onRecoverableError=i,J&&(this.mutableSourceEagerHydrationData=null)}function a4(t,e,n,r,i,a,o,s,l){return t=new a5(t,e,n,s,l),1===e?(e=1,!0===a&&(e|=8)):e=0,a=aq(3,null,null,e),t.current=a,a.stateNode=t,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},nM(a),t}function a3(t){if(!t)return en;t=t._reactInternals;t:{if(F(t)!==t||1!==t.tag)throw Error(d(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break t;case 1:if(es(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}e=e.return}while(null!==e);throw Error(d(171))}if(1===t.tag){var n=t.type;if(es(n))return eu(t,n,e)}return e}function a8(t){var e=t._reactInternals;if(void 0===e){if("function"==typeof t.render)throw Error(d(188));throw Error(d(268,t=Object.keys(t).join(",")))}return null===(t=A(e))?null:t.stateNode}function a6(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function a7(t,e){a6(t,e),(t=t.alternate)&&a6(t,e)}function a9(t){return null===(t=A(t))?null:t.stateNode}function ot(){return null}return o=function(t,e,n){if(null!==t){if(t.memoizedProps!==e.pendingProps||ei.current)r2=!0;else{if(0==(t.lanes&n)&&0==(128&e.flags))return r2=!1,function(t,e,n){switch(e.tag){case 3:ir(e),na();break;case 5:nW(e);break;case 1:es(e.type)&&ed(e);break;case 4:nV(e,e.stateNode.containerInfo);break;case 10:n_(e,e.type._context,e.memoizedProps.value);break;case 13:var r=e.memoizedState;if(null!==r){if(null!==r.dehydrated)return ee(nY,1&nY.current),e.flags|=128,null;if(0!=(n&e.child.childLanes))return is(t,e,n);return ee(nY,1&nY.current),null!==(t=ip(t,e,n))?t.sibling:null}ee(nY,1&nY.current);break;case 19:if(r=0!=(n&e.childLanes),0!=(128&t.flags)){if(r)return ic(t,e,n);e.flags|=128}var i=e.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),ee(nY,nY.current),!r)return null;break;case 22:case 23:return e.lanes=0,r6(t,e,n)}return ip(t,e,n)}(t,e,n);r2=0!=(131072&t.flags)}}else r2=!1,e3&&0!=(1048576&e.flags)&&e0(e,eY,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ig(t,e),t=e.pendingProps;var i=eo(e,er.current);nw(e,n),i=n9(null,e,r,t,i,n);var a=rt();return e.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(e.tag=1,e.memoizedState=null,e.updateQueue=null,es(r)?(a=!0,ed(e)):a=!1,e.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,nM(e),i.updater=rB,e.stateNode=i,i._reactInternals=e,rW(e,r,t,n),e=ie(null,e,r,!0,a,n)):(e.tag=0,e3&&a&&e1(e),r5(null,e,i,n),e=e.child),e;case 16:r=e.elementType;t:{switch(ig(t,e),t=e.pendingProps,r=(i=r._init)(r._payload),e.type=r,i=e.tag=function(t){if("function"==typeof t)return aQ(t)?1:0;if(null!=t){if((t=t.$$typeof)===_)return 11;if(t===w)return 14}return 2}(r),t=rz(r,t),i){case 0:e=r9(null,e,r,t,n);break t;case 1:e=it(null,e,r,t,n);break t;case 11:e=r4(null,e,r,t,n);break t;case 14:e=r3(null,e,r,rz(r.type,t),n);break t}throw Error(d(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:rz(r,i),r9(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:rz(r,i),it(t,e,r,i,n);case 3:t:{if(ir(e),null===t)throw Error(d(387));r=e.pendingProps,i=(a=e.memoizedState).element,nN(t,e),nI(e,r,null,n);var o=e.memoizedState;if(r=o.element,J&&a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=a,e.memoizedState=a,256&e.flags){i=rK(Error(d(423)),e),e=ii(t,e,r,n,i);break t}if(r!==i){i=rK(Error(d(424)),e),e=ii(t,e,r,n,i);break t}for(J&&(e4=tj(e.stateNode.containerInfo),e5=e,e3=!0,e6=null,e8=!1),n=ng(e,null,r,n),e.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(na(),r===i){e=ip(t,e,n);break t}r5(t,e,r,n)}e=e.child}return e;case 5:return nW(e),null===t&&ne(e),r=e.type,i=e.pendingProps,a=null!==t?t.memoizedProps:null,o=i.children,j(r,
8i)?o=null:null!==a&&j(r,a)&&(e.flags|=32),r7(t,e),r5(t,e,o,n),e.child;case 6:return null===t&&ne(e),null;case 13:return is(t,e,n);case 4:return nV(e,e.stateNode.containerInfo),r=e.pendingProps,null===t?e.child=nf(e,null,r,n):r5(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:rz(r,i),r4(t,e,r,i,n);case 7:return r5(t,e,e.pendingProps,n),e.child;case 8:case 12:return r5(t,e,e.pendingProps.children,n),e.child;case 10:t:{if(r=e.type._context,i=e.pendingProps,a=e.memoizedProps,n_(e,r,o=i.value),null!==a){if(eO(a.value,o)){if(a.children===i.children&&!ei.current){e=ip(t,e,n);break t}}else for(null!==(a=e.child)&&(a.return=e);null!==a;){var s=a.dependencies;if(null!==s){o=a.child;for(var l=s.firstContext;null!==l;){if(l.context===r){if(1===a.tag){(l=nA(-1,n&-n)).tag=2;var h=a.updateQueue;if(null!==h){var u=(h=h.shared).pending;null===u?l.next=l:(l.next=u.next,u.next=l),h.pending=l}}a.lanes|=n,null!==(l=a.alternate)&&(l.lanes|=n),nx(a.return,n,e),s.lanes|=n;break}l=l.next}}else if(10===a.tag)o=a.type===e.type?null:a.child;else if(18===a.tag){if(null===(o=a.return))throw Error(d(341));o.lanes|=n,null!==(s=o.alternate)&&(s.lanes|=n),nx(o,n,e),o=a.sibling}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===e){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}}r5(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,nw(e,n),r=r(i=nC(i)),e.flags|=1,r5(t,e,r,n),e.child;case 14:return i=rz(r=e.type,e.pendingProps),i=rz(r.type,i),r3(t,e,r,i,n);case 15:return r8(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:rz(r,i),ig(t,e),e.tag=1,es(r)?(t=!0,ed(e)):t=!1,nw(e,n),rV(e,r,i),rW(e,r,i,n),ie(null,e,r,!0,t,n);case 19:return ic(t,e,n);case 22:return r6(t,e,n)}throw Error(d(156,e.tag))},s.attemptContinuousHydration=function(t){if(13===t.tag){var e=nE(t,134217728);null!==e&&aC(e,t,134217728,ax()),a7(t,134217728)}},s.attemptDiscreteHydration=function(t){if(13===t.tag){var e=nE(t,1);null!==e&&aC(e,t,1,ax()),a7(t,1)}},s.attemptHydrationAtCurrentPriority=function(t){if(13===t.tag){var e=aw(t),n=nE(t,e);null!==n&&aC(n,t,e,ax()),a7(t,e)}},s.attemptSynchronousHydration=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=ev(e.pendingLanes);0!==n&&(eC(e,1|n),ak(e,eN()),0==(6&i3)&&(ad(),eV()))}break;case 13:aN(function(){var e=nE(t,1);null!==e&&aC(e,t,1,ax())}),a7(t,1)}},s.batchedUpdates=function(t,e){var n=i3;i3|=1;try{return t(e)}finally{0===(i3=n)&&(ad(),eU&&eV())}},s.createComponentSelector=function(t){return{$$typeof:ij,value:t}},s.createContainer=function(t,e,n,r,i,a,o){return a4(t,e,!1,null,n,r,i,a,o)},s.createHasPseudoClassSelector=function(t){return{$$typeof:iW,value:t}},s.createHydrationContainer=function(t,e,n,r,i,a,o,s,l){return(t=a4(n,r,!0,t,i,a,o,s,l)).context=a3(null),n=t.current,(a=nA(r=ax(),i=aw(n))).callback=null!=e?e:null,nR(n,a,i),t.current.lanes=i,ew(t,i,r),ak(t,r),t},s.createPortal=function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:g,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}},s.createRoleSelector=function(t){return{$$typeof:iK,value:t}},s.createTestNameSelector=function(t){return{$$typeof:iY,value:t}},s.createTextSelector=function(t){return{$$typeof:iX,value:t}},s.deferredUpdates=function(t){var e=ek,n=i4.transition;try{return i4.transition=null,ek=16,t()}finally{ek=e,i4.transition=n}},s.discreteUpdates=function(t,e,n,r,i){var a=ek,o=i4.transition;try{return i4.transition=null,ek=1,t(e,n,r,i)}finally{ek=a,i4.transition=o,0===i3&&ad()}},s.findAllNodes=i0,s.findBoundingRects=function(t,e){if(!ta)throw Error(d(363));e=i0(t,e),t=[];for(var n=0;n<e.length;n++)t.push(ts(e[n]));for(e=t.length-1;0<e;e--){n=t[e];for(var r=n.x,i=r+n.width,a=n.y,o=a+n.height,s=e-1;0<=s;s--)if(e!==s){var l=t[s],h=l.x,u=h+l.width,c=l.y,f=c+l.height;if(r>=h&&a>=c&&i<=u&&o<=f){t.splice(e,1);break}if(r!==h||n.width!==l.width||f<a||c>o){if(!(a!==c||n.height!==l.height||u<r||h>i)){h>r&&(l.width+=h-r,l.x=r),u<i&&(l.width=i-h),t.splice(e,1);break}}else{c>a&&(l.height+=c-a,l.y=a),f<o&&(l.height=o-c),t.splice(e,1);break}}}return t},s.findHostInstance=a8,s.findHostInstanceWithNoPortals=function(t){return null===(t=null!==(t=N(t))?function t(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){if(4!==e.tag){var n=t(e);if(null!==n)return n}e=e.sibling}return null}(t):null)?null:t.stateNode},s.findHostInstanceWithWarning=function(t){return a8(t)},s.flushControlled=function(t){var e=i3;i3|=1;var n=i4.transition,r=ek;try{i4.transition=null,ek=1,t()}finally{ek=r,i4.transition=n,0===(i3=e)&&(ad(),eV())}},s.flushPassiveEffects=aB,s.flushSync=aN,s.focusWithin=function(t,e){if(!ta)throw Error(d(363));for(e=Array.from(e=iZ(t=iQ(t),e)),t=0;t<e.length;){var n=e[t++];if(!th(n)){if(5===n.tag&&td(n.stateNode))return!0;for(n=n.child;null!==n;)e.push(n),n=n.sibling}}return!1},s.getCurrentUpdatePriority=function(){return ek},s.getFindAllNodesFailureDescription=function(t,e){if(!ta)throw Error(d(363));var n=0,r=[];t=[iQ(t),0];for(var i=0;i<t.length;){var a=t[i++],o=t[i++],s=e[o];if((5!==a.tag||!th(a))&&(i$(a,s)&&(r.push(iJ(s)),++o>n&&(n=o)),o<e.length))for(a=a.child;null!==a;)t.push(a,o),a=a.sibling}if(n<e.length){for(t=[];n<e.length;n++)t.push(iJ(e[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+t.join(" > ")}return null},s.getPublicRootInstance=function(t){return(t=t.current).child?5===t.child.tag?L(t.child.stateNode):t.child.stateNode:null},s.injectIntoDevTools=function(t){if(t={bundleType:t.bundleType,version:t.version,rendererPackageName:t.rendererPackageName,rendererConfig:t.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:c.ReactCurrentDispatcher,findHostInstanceByFiber:a9,findFiberByHostInstance:t.findFiberByHostInstance||ot,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)t=!1;else{var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)t=!0;else{try{eI=e.inject(t),eG=e}catch(t){}t=!!e.checkDCE}}return t},s.isAlreadyRendering=function(){return!1},s.observeVisibleRects=function(t,e,n,r){if(!ta)throw Error(d(363));var i=tc(t=i0(t,e),n,r).disconnect;return{disconnect:function(){i()}}},s.registerMutableSourceForHydration=function(t,e){var n=e._getVersion;n=n(e._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[e,n]:t.mutableSourceEagerHydrationData.push(e,n)},s.runWithPriority=function(t,e){var n=ek;try{return ek=t,e()}finally{ek=n}},s.shouldError=function(){return null},s.shouldSuspend=function(){return!1},s.updateContainer=function(t,e,n,r){var i=e.current,a=ax(),o=aw(i);return n=a3(n),null===e.context?e.context=n:e.pendingContext=n,(e=nA(a,o)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),null!==(t=nR(i,e,o))&&(aC(t,i,o,a),nD(t,i,o)),o},s}},32576:function(t,e,n){"use strict";
8t.exports=n(46511)},76525:function(t,e,n){"use strict";t.exports=n(67287)},84420:function(t,e,n){var r=n(67294);t.exports=function(t,e,n){let i=r.useRef("loading"),a=r.useRef(),[o,s]=r.useState(0),l=r.useRef(),h=r.useRef(),u=r.useRef();return(l.current!==t||h.current!==e||u.current!==n)&&(i.current="loading",a.current=void 0,l.current=t,h.current=e,u.current=n),r.useLayoutEffect(function(){if(t){var r=document.createElement("img");return r.addEventListener("load",o),r.addEventListener("error",l),e&&(r.crossOrigin=e),n&&(r.referrerPolicy=n),r.src=t,function(){r.removeEventListener("load",o),r.removeEventListener("error",l)}}function o(){i.current="loaded",a.current=r,s(Math.random())}function l(){i.current="failed",a.current=void 0,s(Math.random())}},[t,e,n]),[a.current,i.current]}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.