-
Notifications
You must be signed in to change notification settings - Fork 1
/
react-konva.js
2 lines (2 loc) · 370 KB
/
react-konva.js
1
2
/*! For license information please see react-konva.js.LICENSE.txt */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(self,(()=>(()=>{var t={9326:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.Animation=void 0;var o=n(867),a=n(773),l=o.glob.performance&&o.glob.performance.now?function(){return o.glob.performance.now()}:function(){return(new Date).getTime()},s=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=t.animIdCounter++,this.frame={time:0,timeDiff:0,lastTime:l(),frameRate:0},this.func=e,this.setLayers(n)}var e,n,r;return e=t,r=[{key:"_addAnimation",value:function(t){this.animations.push(t),this._handleAnimation()}},{key:"_removeAnimation",value:function(t){var e,n=t.id,r=this.animations,i=r.length;for(e=0;e<i;e++)if(r[e].id===n){this.animations.splice(e,1);break}}},{key:"_runFrames",value:function(){var t,e,n,r,i,o,a,s,u={},c=this.animations;for(r=0;r<c.length;r++)if(e=(t=c[r]).layers,n=t.func,t._updateFrameObject(l()),o=e.length,!n||!1!==n.call(t,t.frame))for(i=0;i<o;i++)void 0!==(a=e[i])._id&&(u[a._id]=a);for(s in u)u.hasOwnProperty(s)&&u[s].batchDraw()}},{key:"_animationLoop",value:function(){var e=t;e.animations.length?(e._runFrames(),a.Util.requestAnimFrame(e._animationLoop)):e.animRunning=!1}},{key:"_handleAnimation",value:function(){this.animRunning||(this.animRunning=!0,a.Util.requestAnimFrame(this._animationLoop))}}],(n=[{key:"setLayers",value:function(t){var e;return e=t?t.length>0?t:[t]:[],this.layers=e,this}},{key:"getLayers",value:function(){return this.layers}},{key:"addLayer",value:function(t){var e,n=this.layers,r=n.length;for(e=0;e<r;e++)if(n[e]._id===t._id)return!1;return this.layers.push(t),!0}},{key:"isRunning",value:function(){var e,n=t.animations,r=n.length;for(e=0;e<r;e++)if(n[e].id===this.id)return!0;return!1}},{key:"start",value:function(){return this.stop(),this.frame.timeDiff=0,this.frame.lastTime=l(),t._addAnimation(this),this}},{key:"stop",value:function(){return t._removeAnimation(this),this}},{key:"_updateFrameObject",value:function(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}}])&&i(e.prototype,n),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();s.animations=[],s.animIdCounter=0,s.animRunning=!1,e.Animation=s},1126:(t,e)=>{"use strict";function n(t,e,n){var i=r(1,n,t),o=r(1,n,e),a=i*i+o*o;return Math.sqrt(a)}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,-.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,.12255520671147846,.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=function(t,r,i){var o,a,l;o=i/2,a=0;for(var s=0;s<20;s++)l=o*e.tValues[20][s]+o,a+=e.cValues[20][s]*n(t,r,l);return o*a},e.getQuadraticArcLength=function(t,e,n){void 0===n&&(n=1);var r=t[0]-2*t[1]+t[2],i=e[0]-2*e[1]+e[2],o=2*t[1]-2*t[0],a=2*e[1]-2*e[0],l=4*(r*r+i*i),s=4*(r*o+i*a),u=o*o+a*a;if(0===l)return n*Math.sqrt(Math.pow(t[2]-t[0],2)+Math.pow(e[2]-e[0],2));var c=s/(2*l),f=n+c,h=u/l-c*c,d=f*f+h>0?Math.sqrt(f*f+h):0,p=c*c+h>0?Math.sqrt(c*c+h):0,y=c+Math.sqrt(c*c+h)!==0?h*Math.log(Math.abs((f+d)/(c+p))):0;return Math.sqrt(l)/2*(f*d-c*p+y)};var r=function t(n,r,i){var o,a,l=i.length-1;if(0===l)return 0;if(0===n){a=0;for(var s=0;s<=l;s++)a+=e.binomialCoefficients[l][s]*Math.pow(1-r,l-s)*Math.pow(r,s)*i[s];return a}o=new Array(l);for(var u=0;u<l;u++)o[u]=l*(i[u+1]-i[u]);return t(n-1,r,o)};e.t2length=function(t,e,n){for(var r=1,i=t/e,o=(t-n(i))/e,a=0;r>.001;){var l=n(i+o),s=Math.abs(t-l)/e;if(s<r)r=s,i+=o;else{var u=n(i-o),c=Math.abs(t-u)/e;c<r?(r=c,i-=o):o/=2}if(++a>500)break}return i}},3473:(t,e,n)=>{"use strict";function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function o(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=l(t);if(e){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}(this,n)}}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==s(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===s(i)?i:String(i)),r)}var i}function f(t,e,n){return e&&c(t.prototype,e),n&&c(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}Object.defineProperty(e,"__esModule",{value:!0}),e.HitCanvas=e.SceneCanvas=e.Canvas=void 0;var h,d=n(773),p=n(666),y=n(867),v=n(6473),g=n(6836),m=function(){function t(e){u(this,t),this.pixelRatio=1,this.width=0,this.height=0,this.isCache=!1;var n=(e||{}).pixelRatio||y.Konva.pixelRatio||function(){if(h)return h;var t=d.Util.createCanvasElement(),e=t.getContext("2d");return h=(y.Konva._global.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),d.Util.releaseCanvas(t),h}();this.pixelRatio=n,this._canvas=d.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"}return f(t,[{key:"getContext",value:function(){return this.context}},{key:"getPixelRatio",value:function(){return this.pixelRatio}},{key:"setPixelRatio",value:function(t){var e=this.pixelRatio;this.pixelRatio=t,this.setSize(this.getWidth()/e,this.getHeight()/e)}},{key:"setWidth",value:function(t){this.width=this._canvas.width=t*this.pixelRatio,this._canvas.style.width=t+"px";var e=this.pixelRatio;this.getContext()._context.scale(e,e)}},{key:"setHeight",value:function(t){this.height=this._canvas.height=t*this.pixelRatio,this._canvas.style.height=t+"px";var e=this.pixelRatio;this.getContext()._context.scale(e,e)}},{key:"getWidth",value:function(){return this.width}},{key:"getHeight",value:function(){return this.height}},{key:"setSize",value:function(t,e){this.setWidth(t||0),this.setHeight(e||0)}},{key:"toDataURL",value:function(t,e){try{return this._canvas.toDataURL(t,e)}catch(t){try{return this._canvas.toDataURL()}catch(t){return d.Util.error("Unable to get data URL. "+t.message+" For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html."),""}}}}]),t}();e.Canvas=m,v.Factory.addGetterSetter(m,"pixelRatio",void 0,(0,g.getNumberValidator)());var b=function(t){r(n,t);var e=o(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:0,height:0,willReadFrequently:!1};return u(this,n),(t=e.call(this,r)).context=new p.SceneContext(a(t),{willReadFrequently:r.willReadFrequently}),t.setSize(r.width,r.height),t}return f(n)}(m);e.SceneCanvas=b;var _=function(t){r(n,t);var e=o(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{width:0,height:0};return u(this,n),(t=e.call(this,r)).hitCanvas=!0,t.context=new p.HitContext(a(t)),t.setSize(r.width,r.height),t}return f(n)}(m);e.HitCanvas=_},8842:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function a(){return a="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},a.apply(this,arguments)}function l(t,e){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},l(t,e)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Container=void 0;var u=n(6473),c=n(6673),f=n(6836),h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(d,t);var e,n,u,f,h=(u=d,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=s(u);if(f){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function d(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),(t=h.apply(this,arguments)).children=[],t}return e=d,n=[{key:"getChildren",value:function(t){if(!t)return this.children||[];var e=this.children||[],n=[];return e.forEach((function(e){t(e)&&n.push(e)})),n}},{key:"hasChildren",value:function(){return this.getChildren().length>0}},{key:"removeChildren",value:function(){return this.getChildren().forEach((function(t){t.parent=null,t.index=0,t.remove()})),this.children=[],this._requestDraw(),this}},{key:"destroyChildren",value:function(){return this.getChildren().forEach((function(t){t.parent=null,t.index=0,t.destroy()})),this.children=[],this._requestDraw(),this}},{key:"add",value:function(){if(0===arguments.length)return this;if(arguments.length>1){for(var t=0;t<arguments.length;t++)this.add(t<0||arguments.length<=t?void 0:arguments[t]);return this}var e=arguments.length<=0?void 0:arguments[0];return e.getParent()?(e.moveTo(this),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)}},{key:"destroy",value:function(){return this.hasChildren()&&this.destroyChildren(),a(s(d.prototype),"destroy",this).call(this),this}},{key:"find",value:function(t){return this._generalFind(t,!1)}},{key:"findOne",value:function(t){var e=this._generalFind(t,!0);return e.length>0?e[0]:void 0}},{key:"_generalFind",value:function(t,e){var n=[];return this._descendants((function(r){var i=r._isMatch(t);return i&&n.push(r),!(!i||!e)})),n}},{key:"_descendants",value:function(t){var e,n=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}(this.getChildren());try{for(n.s();!(e=n.n()).done;){var r=e.value;if(t(r))return!0;if(r.hasChildren()&&r._descendants(t))return!0}}catch(t){n.e(t)}finally{n.f()}return!1}},{key:"toObject",value:function(){var t=c.Node.prototype.toObject.call(this);return t.children=[],this.getChildren().forEach((function(e){t.children.push(e.toObject())})),t}},{key:"isAncestorOf",value:function(t){for(var e=t.getParent();e;){if(e._id===this._id)return!0;e=e.getParent()}return!1}},{key:"clone",value:function(t){var e=c.Node.prototype.clone.call(this,t);return this.getChildren().forEach((function(t){e.add(t.clone())})),e}},{key:"getAllIntersections",value:function(t){var e=[];return this.find("Shape").forEach((function(n){n.isVisible()&&n.intersects(t)&&e.push(n)})),e}},{key:"_clearSelfAndDescendantCache",value:function(t){var e;a(s(d.prototype),"_clearSelfAndDescendantCache",this).call(this,t),this.isCached()||null===(e=this.children)||void 0===e||e.forEach((function(e){e._clearSelfAndDescendantCache(t)}))}},{key:"_setChildrenIndices",value:function(){var t;null===(t=this.children)||void 0===t||t.forEach((function(t,e){t.index=e})),this._requestDraw()}},{key:"drawScene",value:function(t,e){var n=this.getLayer(),r=t||n&&n.getCanvas(),i=r&&r.getContext(),o=this._getCanvasCache(),a=o&&o.scene,l=r&&r.isCache;if(!this.isVisible()&&!l)return this;if(a){i.save();var s=this.getAbsoluteTransform(e).getMatrix();i.transform(s[0],s[1],s[2],s[3],s[4],s[5]),this._drawCachedSceneCanvas(i),i.restore()}else this._drawChildren("drawScene",r,e);return this}},{key:"drawHit",value:function(t,e){if(!this.shouldDrawHit(e))return this;var n=this.getLayer(),r=t||n&&n.hitCanvas,i=r&&r.getContext(),o=this._getCanvasCache();if(o&&o.hit){i.save();var a=this.getAbsoluteTransform(e).getMatrix();i.transform(a[0],a[1],a[2],a[3],a[4],a[5]),this._drawCachedHitCanvas(i),i.restore()}else this._drawChildren("drawHit",r,e);return this}},{key:"_drawChildren",value:function(t,e,n){var r,i=e&&e.getContext(),o=this.clipWidth(),a=this.clipHeight(),l=this.clipFunc(),s=o&&a||l,u=n===this;if(s){i.save();var c=this.getAbsoluteTransform(n),f=c.getMatrix();if(i.transform(f[0],f[1],f[2],f[3],f[4],f[5]),i.beginPath(),l)l.call(this,i,this);else{var h=this.clipX(),d=this.clipY();i.rect(h,d,o,a)}i.clip(),f=c.copy().invert().getMatrix(),i.transform(f[0],f[1],f[2],f[3],f[4],f[5])}var p=!u&&"source-over"!==this.globalCompositeOperation()&&"drawScene"===t;p&&(i.save(),i._applyGlobalCompositeOperation(this)),null===(r=this.children)||void 0===r||r.forEach((function(r){r[t](e,n)})),p&&i.restore(),s&&i.restore()}},{key:"getClientRect",value:function(t){var e,n,r,i,o,a,l=(t=t||{}).skipTransform,s=t.relativeTo,u=this;null===(e=this.children)||void 0===e||e.forEach((function(e){if(e.visible()){var a=e.getClientRect({relativeTo:u,skipShadow:t.skipShadow,skipStroke:t.skipStroke});0===a.width&&0===a.height||(void 0===n?(n=a.x,r=a.y,i=a.x+a.width,o=a.y+a.height):(n=Math.min(n,a.x),r=Math.min(r,a.y),i=Math.max(i,a.x+a.width),o=Math.max(o,a.y+a.height)))}}));for(var c=this.find("Shape"),f=!1,h=0;h<c.length;h++)if(c[h]._isVisible(this)){f=!0;break}return a=f&&void 0!==n?{x:n,y:r,width:i-n,height:o-r}:{x:0,y:0,width:0,height:0},l?a:this._transformedRect(a,s)}}],n&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),d}(c.Node);e.Container=h,u.Factory.addComponentsGetterSetter(h,"clip",["x","y","width","height"]),u.Factory.addGetterSetter(h,"clipX",void 0,(0,f.getNumberValidator)()),u.Factory.addGetterSetter(h,"clipY",void 0,(0,f.getNumberValidator)()),u.Factory.addGetterSetter(h,"clipWidth",void 0,(0,f.getNumberValidator)()),u.Factory.addGetterSetter(h,"clipHeight",void 0,(0,f.getNumberValidator)()),u.Factory.addGetterSetter(h,"clipFunc")},666:(t,e,n)=>{"use strict";function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function o(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=a(t);if(e){var i=a(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,i=function(t,e){if("object"!==l(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===l(i)?i:String(i)),r)}var i}function c(t,e,n){return e&&u(t.prototype,e),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}Object.defineProperty(e,"__esModule",{value:!0}),e.HitContext=e.SceneContext=e.Context=void 0;var f=n(773),h=n(867),d=["arc","arcTo","beginPath","bezierCurveTo","clearRect","clip","closePath","createLinearGradient","createPattern","createRadialGradient","drawImage","ellipse","fill","fillText","getImageData","createImageData","lineTo","moveTo","putImageData","quadraticCurveTo","rect","restore","rotate","save","scale","setLineDash","setTransform","stroke","strokeText","transform","translate"],p=function(){function t(e){s(this,t),this.canvas=e,h.Konva.enableTrace&&(this.traceArr=[],this._enableTrace())}return c(t,[{key:"fillShape",value:function(t){t.fillEnabled()&&this._fill(t)}},{key:"_fill",value:function(t){}},{key:"strokeShape",value:function(t){t.hasStroke()&&this._stroke(t)}},{key:"_stroke",value:function(t){}},{key:"fillStrokeShape",value:function(t){t.attrs.fillAfterStrokeEnabled?(this.strokeShape(t),this.fillShape(t)):(this.fillShape(t),this.strokeShape(t))}},{key:"getTrace",value:function(t,e){var n,r,i,o,a=this.traceArr,l=a.length,s="";for(n=0;n<l;n++)(i=(r=a[n]).method)?(o=r.args,s+=i,t?s+="()":f.Util._isArray(o[0])?s+="(["+o.join(",")+"])":(e&&(o=o.map((function(t){return"number"==typeof t?Math.floor(t):t}))),s+="("+o.join(",")+")")):(s+=r.property,t||(s+="="+r.val)),s+=";";return s}},{key:"clearTrace",value:function(){this.traceArr=[]}},{key:"_trace",value:function(t){var e=this.traceArr;e.push(t),e.length>=100&&e.shift()}},{key:"reset",value:function(){var t=this.getCanvas().getPixelRatio();this.setTransform(1*t,0,0,1*t,0,0)}},{key:"getCanvas",value:function(){return this.canvas}},{key:"clear",value:function(t){var 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)}},{key:"_applyLineCap",value:function(t){var e=t.attrs.lineCap;e&&this.setAttr("lineCap",e)}},{key:"_applyOpacity",value:function(t){var e=t.getAbsoluteOpacity();1!==e&&this.setAttr("globalAlpha",e)}},{key:"_applyLineJoin",value:function(t){var e=t.attrs.lineJoin;e&&this.setAttr("lineJoin",e)}},{key:"setAttr",value:function(t,e){this._context[t]=e}},{key:"arc",value:function(t,e,n,r,i,o){this._context.arc(t,e,n,r,i,o)}},{key:"arcTo",value:function(t,e,n,r,i){this._context.arcTo(t,e,n,r,i)}},{key:"beginPath",value:function(){this._context.beginPath()}},{key:"bezierCurveTo",value:function(t,e,n,r,i,o){this._context.bezierCurveTo(t,e,n,r,i,o)}},{key:"clearRect",value:function(t,e,n,r){this._context.clearRect(t,e,n,r)}},{key:"clip",value:function(){this._context.clip()}},{key:"closePath",value:function(){this._context.closePath()}},{key:"createImageData",value:function(t,e){var n=arguments;return 2===n.length?this._context.createImageData(t,e):1===n.length?this._context.createImageData(t):void 0}},{key:"createLinearGradient",value:function(t,e,n,r){return this._context.createLinearGradient(t,e,n,r)}},{key:"createPattern",value:function(t,e){return this._context.createPattern(t,e)}},{key:"createRadialGradient",value:function(t,e,n,r,i,o){return this._context.createRadialGradient(t,e,n,r,i,o)}},{key:"drawImage",value:function(t,e,n,r,i,o,a,l,s){var u=arguments,c=this._context;3===u.length?c.drawImage(t,e,n):5===u.length?c.drawImage(t,e,n,r,i):9===u.length&&c.drawImage(t,e,n,r,i,o,a,l,s)}},{key:"ellipse",value:function(t,e,n,r,i,o,a,l){this._context.ellipse(t,e,n,r,i,o,a,l)}},{key:"isPointInPath",value:function(t,e,n,r){return n?this._context.isPointInPath(n,t,e,r):this._context.isPointInPath(t,e,r)}},{key:"fill",value:function(t){t?this._context.fill(t):this._context.fill()}},{key:"fillRect",value:function(t,e,n,r){this._context.fillRect(t,e,n,r)}},{key:"strokeRect",value:function(t,e,n,r){this._context.strokeRect(t,e,n,r)}},{key:"fillText",value:function(t,e,n,r){r?this._context.fillText(t,e,n,r):this._context.fillText(t,e,n)}},{key:"measureText",value:function(t){return this._context.measureText(t)}},{key:"getImageData",value:function(t,e,n,r){return this._context.getImageData(t,e,n,r)}},{key:"lineTo",value:function(t,e){this._context.lineTo(t,e)}},{key:"moveTo",value:function(t,e){this._context.moveTo(t,e)}},{key:"rect",value:function(t,e,n,r){this._context.rect(t,e,n,r)}},{key:"putImageData",value:function(t,e,n){this._context.putImageData(t,e,n)}},{key:"quadraticCurveTo",value:function(t,e,n,r){this._context.quadraticCurveTo(t,e,n,r)}},{key:"restore",value:function(){this._context.restore()}},{key:"rotate",value:function(t){this._context.rotate(t)}},{key:"save",value:function(){this._context.save()}},{key:"scale",value:function(t,e){this._context.scale(t,e)}},{key:"setLineDash",value:function(t){this._context.setLineDash?this._context.setLineDash(t):"mozDash"in this._context?this._context.mozDash=t:"webkitLineDash"in this._context&&(this._context.webkitLineDash=t)}},{key:"getLineDash",value:function(){return this._context.getLineDash()}},{key:"setTransform",value:function(t,e,n,r,i,o){this._context.setTransform(t,e,n,r,i,o)}},{key:"stroke",value:function(t){t?this._context.stroke(t):this._context.stroke()}},{key:"strokeText",value:function(t,e,n,r){this._context.strokeText(t,e,n,r)}},{key:"transform",value:function(t,e,n,r,i,o){this._context.transform(t,e,n,r,i,o)}},{key:"translate",value:function(t,e){this._context.translate(t,e)}},{key:"_enableTrace",value:function(){var t,e,n=this,r=d.length,i=this.setAttr,o=function(t){var r,i=n[t];n[t]=function(){return e=function(t){var e,n,r=[],i=t.length,o=f.Util;for(e=0;e<i;e++)n=t[e],o._isNumber(n)?n=Math.round(1e3*n)/1e3:o._isString(n)||(n+=""),r.push(n);return r}(Array.prototype.slice.call(arguments,0)),r=i.apply(n,arguments),n._trace({method:t,args:e}),r}};for(t=0;t<r;t++)o(d[t]);n.setAttr=function(){i.apply(n,arguments);var t=arguments[0],e=arguments[1];"shadowOffsetX"!==t&&"shadowOffsetY"!==t&&"shadowBlur"!==t||(e/=this.canvas.getPixelRatio()),n._trace({property:t,val:e})}}},{key:"_applyGlobalCompositeOperation",value:function(t){var e=t.attrs.globalCompositeOperation;!e||"source-over"===e||this.setAttr("globalCompositeOperation",e)}}]),t}();e.Context=p,["fillStyle","strokeStyle","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","lineCap","lineDashOffset","lineJoin","lineWidth","miterLimit","font","textAlign","textBaseline","globalAlpha","globalCompositeOperation","imageSmoothingEnabled"].forEach((function(t){Object.defineProperty(p.prototype,t,{get:function(){return this._context[t]},set:function(e){this._context[t]=e}})}));var y=function(t){r(n,t);var e=o(n);function n(t){var r,i=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).willReadFrequently,o=void 0!==i&&i;return s(this,n),(r=e.call(this,t))._context=t._canvas.getContext("2d",{willReadFrequently:o}),r}return c(n,[{key:"_fillColor",value:function(t){var e=t.fill();this.setAttr("fillStyle",e),t._fillFunc(this)}},{key:"_fillPattern",value:function(t){this.setAttr("fillStyle",t._getFillPattern()),t._fillFunc(this)}},{key:"_fillLinearGradient",value:function(t){var e=t._getLinearGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}},{key:"_fillRadialGradient",value:function(t){var e=t._getRadialGradient();e&&(this.setAttr("fillStyle",e),t._fillFunc(this))}},{key:"_fill",value:function(t){var e=t.fill(),n=t.getFillPriority();if(e&&"color"===n)this._fillColor(t);else{var r=t.getFillPatternImage();if(r&&"pattern"===n)this._fillPattern(t);else{var i=t.getFillLinearGradientColorStops();if(i&&"linear-gradient"===n)this._fillLinearGradient(t);else{var o=t.getFillRadialGradientColorStops();o&&"radial-gradient"===n?this._fillRadialGradient(t):e?this._fillColor(t):r?this._fillPattern(t):i?this._fillLinearGradient(t):o&&this._fillRadialGradient(t)}}}}},{key:"_strokeLinearGradient",value:function(t){var e=t.getStrokeLinearGradientStartPoint(),n=t.getStrokeLinearGradientEndPoint(),r=t.getStrokeLinearGradientColorStops(),i=this.createLinearGradient(e.x,e.y,n.x,n.y);if(r){for(var o=0;o<r.length;o+=2)i.addColorStop(r[o],r[o+1]);this.setAttr("strokeStyle",i)}}},{key:"_stroke",value:function(t){var e=t.dash(),n=t.getStrokeScaleEnabled();if(t.hasStroke()){if(!n){this.save();var r=this.getCanvas().getPixelRatio();this.setTransform(r,0,0,r,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()}}},{key:"_applyShadow",value:function(t){var e,n,r,i=null!==(e=t.getShadowRGBA())&&void 0!==e?e:"black",o=null!==(n=t.getShadowBlur())&&void 0!==n?n:5,a=null!==(r=t.getShadowOffset())&&void 0!==r?r:{x:0,y:0},l=t.getAbsoluteScale(),s=this.canvas.getPixelRatio(),u=l.x*s,c=l.y*s;this.setAttr("shadowColor",i),this.setAttr("shadowBlur",o*Math.min(Math.abs(u),Math.abs(c))),this.setAttr("shadowOffsetX",a.x*u),this.setAttr("shadowOffsetY",a.y*c)}}]),n}(p);e.SceneContext=y;var v=function(t){r(n,t);var e=o(n);function n(t){var r;return s(this,n),(r=e.call(this,t))._context=t._canvas.getContext("2d",{willReadFrequently:!0}),r}return c(n,[{key:"_fill",value:function(t){this.save(),this.setAttr("fillStyle",t.colorKey),t._fillFuncHit(this),this.restore()}},{key:"strokeShape",value:function(t){t.hasHitStroke()&&this._stroke(t)}},{key:"_stroke",value:function(t){if(t.hasHitStroke()){var e=t.getStrokeScaleEnabled();if(!e){this.save();var n=this.getCanvas().getPixelRatio();this.setTransform(n,0,0,n,0,0)}this._applyLineCap(t);var r=t.hitStrokeWidth(),i="auto"===r?t.strokeWidth():r;this.setAttr("lineWidth",i),this.setAttr("strokeStyle",t.colorKey),t._strokeFuncHit(this),e||this.restore()}}}]),n}(p);e.HitContext=v},753:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;var r=n(2056);Object.defineProperty(e,"Konva",{enumerable:!0,get:function(){return r.Konva}});var i=n(2056);t.exports=i.Konva},2208:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DD=void 0;var r=n(867),i=n(773);e.DD={get isDragging(){var t=!1;return e.DD._dragElements.forEach((function(e){"dragging"===e.dragStatus&&(t=!0)})),t},justDragged:!1,get node(){var t;return e.DD._dragElements.forEach((function(e){t=e.node})),t},_dragElements:new Map,_drag:function(t){var n=[];e.DD._dragElements.forEach((function(e,r){var o=e.node,a=o.getStage();a.setPointersPositions(t),void 0===e.pointerId&&(e.pointerId=i.Util._getFirstPointerId(t));var l=a._changedPointerPositions.find((function(t){return t.id===e.pointerId}));if(l){if("dragging"!==e.dragStatus){var s=o.dragDistance();if(Math.max(Math.abs(l.x-e.startPointerPos.x),Math.abs(l.y-e.startPointerPos.y))<s)return;if(o.startDrag({evt:t}),!o.isDragging())return}o._setDragPosition(t,e),n.push(o)}})),n.forEach((function(e){e.fire("dragmove",{type:"dragmove",target:e,evt:t},!0)}))},_endDragBefore:function(t){var n=[];e.DD._dragElements.forEach((function(i){var o=i.node.getStage();if(t&&o.setPointersPositions(t),o._changedPointerPositions.find((function(t){return t.id===i.pointerId}))){"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");var a=i.node.getLayer()||i.node instanceof r.Konva.Stage&&i.node;a&&-1===n.indexOf(a)&&n.push(a)}})),n.forEach((function(t){t.draw()}))},_endDragAfter:function(t){e.DD._dragElements.forEach((function(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("mousemove",e.DD._drag),window.addEventListener("touchmove",e.DD._drag),window.addEventListener("mouseup",e.DD._endDragAfter,!1),window.addEventListener("touchend",e.DD._endDragAfter,!1))},6473:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Factory=void 0;var r=n(773),i=n(6836),o="get",a="set";e.Factory={addGetterSetter:function(t,n,r,i,o){e.Factory.addGetter(t,n,r),e.Factory.addSetter(t,n,i,o),e.Factory.addOverloadedGetterSetter(t,n)},addGetter:function(t,e,n){var i=o+r.Util._capitalize(e);t.prototype[i]=t.prototype[i]||function(){var t=this.attrs[e];return void 0===t?n:t}},addSetter:function(t,n,i,o){var l=a+r.Util._capitalize(n);t.prototype[l]||e.Factory.overWriteSetter(t,n,i,o)},overWriteSetter:function(t,e,n,i){var o=a+r.Util._capitalize(e);t.prototype[o]=function(t){return n&&null!=t&&(t=n.call(this,t,e)),this._setAttr(e,t),i&&i.call(this),this}},addComponentsGetterSetter:function(t,n,l,s,u){var c,f,h=l.length,d=r.Util._capitalize,p=o+d(n),y=a+d(n);t.prototype[p]=function(){var t={};for(c=0;c<h;c++)t[f=l[c]]=this.getAttr(n+d(f));return t};var v=(0,i.getComponentValidator)(l);t.prototype[y]=function(t){var e,r=this,i=this.attrs[n];for(e in s&&(t=s.call(this,t)),v&&v.call(this,t,n),t)t.hasOwnProperty(e)&&this._setAttr(n+d(e),t[e]);return t||l.forEach((function(t){r._setAttr(n+d(t),void 0)})),this._fireChangeEvent(n,i,t),u&&u.call(this),this},e.Factory.addOverloadedGetterSetter(t,n)},addOverloadedGetterSetter:function(t,e){var n=r.Util._capitalize(e),i=a+n,l=o+n;t.prototype[e]=function(){return arguments.length?(this[i](arguments[0]),this):this[l]()}},addDeprecatedGetterSetter:function(t,n,i,a){r.Util.error("Adding deprecated "+n);var l=o+r.Util._capitalize(n),s=n+" property is deprecated and will be removed soon. Look at Konva change log for more information.";t.prototype[l]=function(){r.Util.error(s);var 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:function(t,e){r.Util.each(e,(function(e,n){var i=t.prototype[n],l=o+r.Util._capitalize(e),s=a+r.Util._capitalize(e);function u(){i.apply(this,arguments),r.Util.error('"'+e+'" method is deprecated and will be removed soon. Use ""'+n+'" instead.')}t.prototype[e]=u,t.prototype[l]=u,t.prototype[s]=u}))},afterSetFilter:function(){this._filterUpToDate=!1}}},5117:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},i(t,e)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.FastLayer=void 0;var a=n(773),l=n(7728),s=n(867),u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&i(t,e)}(u,t);var e,n,l,s=(n=u,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=o(n);if(l){var i=o(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=s.call(this,t)).listening(!1),a.Util.warn('Konva.Fast layer is deprecated. Please use "new Konva.Layer({ listening: false })" instead.'),e}return e=u,Object.defineProperty(e,"prototype",{writable:!1}),e}(l.Layer);e.FastLayer=u,u.prototype.nodeType="FastLayer",(0,s._registerNode)(u)},867:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._registerNode=e.Konva=e.glob=void 0;var 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.0.1",isBrowser:"undefined"!=typeof window&&("[object Window]"==={}.toString.call(window)||"[object global]"==={}.toString.call(window)),isUnminified:/param/.test(function(t){}.toString()),dblClickWindow:400,getAngle:function(t){return 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,pixelRatio:"undefined"!=typeof window&&window.devicePixelRatio||1,dragDistance:3,angleDeg:!0,showWarnings:!0,dragButtons:[0,1],isDragging:function(){return e.Konva.DD.isDragging},isDragReady:function(){return!!e.Konva.DD.node},releaseCanvasOnDestroy:!0,document:e.glob.document,_injectGlobal:function(t){e.glob.Konva=t}},e._registerNode=function(t){e.Konva[t.prototype.getClassName()]=t},e.Konva._injectGlobal(e.Konva)},8873:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Group=void 0;var l=n(773),s=n(8842),u=n(867),c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(f,t);var e,n,s,u,c=(s=f,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(s);if(u){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),c.apply(this,arguments)}return e=f,(n=[{key:"_validateAdd",value:function(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&l.Util.throw("You may only add groups and shapes to groups.")}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(s.Container);e.Group=c,c.prototype.nodeType="Group",(0,u._registerNode)(c)},7728:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},o.apply(this,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Layer=void 0;var s=n(773),u=n(8842),c=n(6673),f=n(6473),h=n(3473),d=n(6836),p=n(7427),y=n(867),v=[{x:0,y:0},{x:-1,y:-1},{x:1,y:-1},{x:1,y:1},{x:-1,y:1}],g=v.length,m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(m,t);var e,n,f,d,y=(f=m,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(f);if(d){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function m(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,m),(e=y.call(this,t)).canvas=new h.SceneCanvas,e.hitCanvas=new h.HitCanvas({pixelRatio:1}),e._waitingForDraw=!1,e.on("visibleChange.konva",e._checkVisibility),e._checkVisibility(),e.on("imageSmoothingEnabledChange.konva",e._setSmoothEnabled),e._setSmoothEnabled(),e}return e=m,(n=[{key:"createPNGStream",value:function(){return this.canvas._canvas.createPNGStream()}},{key:"getCanvas",value:function(){return this.canvas}},{key:"getNativeCanvasElement",value:function(){return this.canvas._canvas}},{key:"getHitCanvas",value:function(){return this.hitCanvas}},{key:"getContext",value:function(){return this.getCanvas().getContext()}},{key:"clear",value:function(t){return this.getContext().clear(t),this.getHitCanvas().getContext().clear(t),this}},{key:"setZIndex",value:function(t){o(l(m.prototype),"setZIndex",this).call(this,t);var 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}},{key:"moveToTop",value:function(){c.Node.prototype.moveToTop.call(this);var t=this.getStage();return t&&t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.appendChild(this.getNativeCanvasElement())),!0}},{key:"moveUp",value:function(){if(!c.Node.prototype.moveUp.call(this))return!1;var 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))}},{key:"moveDown",value:function(){if(c.Node.prototype.moveDown.call(this)){var t=this.getStage();if(t){var 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}},{key:"moveToBottom",value:function(){if(c.Node.prototype.moveToBottom.call(this)){var t=this.getStage();if(t){var e=t.children;t.content&&(t.content.removeChild(this.getNativeCanvasElement()),t.content.insertBefore(this.getNativeCanvasElement(),e[1].getCanvas()._canvas))}return!0}return!1}},{key:"getLayer",value:function(){return this}},{key:"remove",value:function(){var t=this.getNativeCanvasElement();return c.Node.prototype.remove.call(this),t&&t.parentNode&&s.Util._isInDocument(t)&&t.parentNode.removeChild(t),this}},{key:"getStage",value:function(){return this.parent}},{key:"setSize",value:function(t){var e=t.width,n=t.height;return this.canvas.setSize(e,n),this.hitCanvas.setSize(e,n),this._setSmoothEnabled(),this}},{key:"_validateAdd",value:function(t){var e=t.getType();"Group"!==e&&"Shape"!==e&&s.Util.throw("You may only add groups and shapes to a layer.")}},{key:"_toKonvaCanvas",value:function(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(),c.Node.prototype._toKonvaCanvas.call(this,t)}},{key:"_checkVisibility",value:function(){var t=this.visible();this.canvas._canvas.style.display=t?"block":"none"}},{key:"_setSmoothEnabled",value:function(){this.getContext()._context.imageSmoothingEnabled=this.imageSmoothingEnabled()}},{key:"getWidth",value:function(){if(this.parent)return this.parent.width()}},{key:"setWidth",value:function(){s.Util.warn('Can not change width of layer. Use "stage.width(value)" function instead.')}},{key:"getHeight",value:function(){if(this.parent)return this.parent.height()}},{key:"setHeight",value:function(){s.Util.warn('Can not change height of layer. Use "stage.height(value)" function instead.')}},{key:"batchDraw",value:function(){var t=this;return this._waitingForDraw||(this._waitingForDraw=!0,s.Util.requestAnimFrame((function(){t.draw(),t._waitingForDraw=!1}))),this}},{key:"getIntersection",value:function(t){if(!this.isListening()||!this.isVisible())return null;for(var e=1,n=!1;;){for(var r=0;r<g;r++){var i=v[r],o=this._getIntersection({x:t.x+i.x*e,y:t.y+i.y*e}),a=o.shape;if(a)return a;if(n=!!o.antialiased,!o.antialiased)break}if(!n)return null;e+=1}}},{key:"_getIntersection",value:function(t){var e=this.hitCanvas.pixelRatio,n=this.hitCanvas.context.getImageData(Math.round(t.x*e),Math.round(t.y*e),1,1).data,r=n[3];if(255===r){var i=s.Util._rgbToHex(n[0],n[1],n[2]),o=p.shapes["#"+i];return o?{shape:o}:{antialiased:!0}}return r>0?{antialiased:!0}:{}}},{key:"drawScene",value:function(t,e){var n=this.getLayer(),r=t||n&&n.getCanvas();return this._fire("beforeDraw",{node:this}),this.clearBeforeDraw()&&r.getContext().clear(),u.Container.prototype.drawScene.call(this,r,e),this._fire("draw",{node:this}),this}},{key:"drawHit",value:function(t,e){var n=this.getLayer(),r=t||n&&n.hitCanvas;return n&&n.clearBeforeDraw()&&n.getHitCanvas().getContext().clear(),u.Container.prototype.drawHit.call(this,r,e),this}},{key:"enableHitGraph",value:function(){return this.hitGraphEnabled(!0),this}},{key:"disableHitGraph",value:function(){return this.hitGraphEnabled(!1),this}},{key:"setHitGraphEnabled",value:function(t){s.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening(t)}},{key:"getHitGraphEnabled",value:function(t){return s.Util.warn("hitGraphEnabled method is deprecated. Please use layer.listening() instead."),this.listening()}},{key:"toggleHitCanvas",value:function(){if(this.parent&&this.parent.content){var t=this.parent;this.hitCanvas._canvas.parentNode?t.content.removeChild(this.hitCanvas._canvas):t.content.appendChild(this.hitCanvas._canvas)}}},{key:"destroy",value:function(){return s.Util.releaseCanvas(this.getNativeCanvasElement(),this.getHitCanvas()._canvas),o(l(m.prototype),"destroy",this).call(this)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),m}(u.Container);e.Layer=m,m.prototype.nodeType="Layer",(0,y._registerNode)(m),f.Factory.addGetterSetter(m,"imageSmoothingEnabled",!0),f.Factory.addGetterSetter(m,"clearBeforeDraw",!0),f.Factory.addGetterSetter(m,"hitGraphEnabled",!0,(0,d.getBooleanValidator)())},6673:(t,e,n)=>{"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===i(o)?o:String(o)),r)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.Node=void 0;var a=n(773),l=n(6473),s=n(3473),u=n(867),c=n(2208),f=n(6836),h="absoluteOpacity",d="allEventListeners",p="absoluteTransform",y="absoluteScale",v="canvas",g="listening",m="mouseenter",b="mouseleave",_="Shape",S=" ",w="stage",k="transform",x="visible",P=["xChange.konva","yChange.konva","scaleXChange.konva","scaleYChange.konva","skewXChange.konva","skewYChange.konva","rotationChange.konva","offsetXChange.konva","offsetYChange.konva","transformsEnabledChange.konva"].join(S),C=1,O=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._id=C++,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(e),this._shouldFireChangeEvents=!0}var e,n,l;return e=t,n=[{key:"hasChildren",value:function(){return!1}},{key:"_clearCache",value:function(t){t!==k&&t!==p||!this._cache.get(t)?t?this._cache.delete(t):this._cache.clear():this._cache.get(t).dirty=!0}},{key:"_getCache",value:function(t,e){var n=this._cache.get(t);return(void 0===n||(t===k||t===p)&&!0===n.dirty)&&(n=e.call(this),this._cache.set(t,n)),n}},{key:"_calculate",value:function(t,e,n){var r=this;if(!this._attachedDepsListeners.get(t)){var i=e.map((function(t){return t+"Change.konva"})).join(S);this.on(i,(function(){r._clearCache(t)})),this._attachedDepsListeners.set(t,!0)}return this._getCache(t,n)}},{key:"_getCanvasCache",value:function(){return this._cache.get(v)}},{key:"_clearSelfAndDescendantCache",value:function(t){this._clearCache(t),t===p&&this.fire("absoluteTransformChange")}},{key:"clearCache",value:function(){if(this._cache.has(v)){var t=this._cache.get(v),e=t.scene,n=t.filter,r=t.hit;a.Util.releaseCanvas(e,n,r),this._cache.delete(v)}return this._clearSelfAndDescendantCache(),this._requestDraw(),this}},{key:"cache",value:function(t){var 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()}));var r=Math.ceil(e.width||n.width),i=Math.ceil(e.height||n.height),o=e.pixelRatio,l=void 0===e.x?Math.floor(n.x):e.x,u=void 0===e.y?Math.floor(n.y):e.y,c=e.offset||0,f=e.drawBorder||!1,d=e.hitCanvasPixelRatio||1;if(r&&i){r+=2*c+1,i+=2*c+1,l-=c,u-=c;var p=new s.SceneCanvas({pixelRatio:o,width:r,height:i}),g=new s.SceneCanvas({pixelRatio:o,width:0,height:0,willReadFrequently:!0}),m=new s.HitCanvas({pixelRatio:d,width:r,height:i}),b=p.getContext(),_=m.getContext();return m.isCache=!0,p.isCache=!0,this._cache.delete(v),this._filterUpToDate=!1,!1===e.imageSmoothingEnabled&&(p.getContext()._context.imageSmoothingEnabled=!1,g.getContext()._context.imageSmoothingEnabled=!1),b.save(),_.save(),b.translate(-l,-u),_.translate(-l,-u),this._isUnderCache=!0,this._clearSelfAndDescendantCache(h),this._clearSelfAndDescendantCache(y),this.drawScene(p,this),this.drawHit(m,this),this._isUnderCache=!1,b.restore(),_.restore(),f&&(b.save(),b.beginPath(),b.rect(0,0,r,i),b.closePath(),b.setAttr("strokeStyle","red"),b.setAttr("lineWidth",5),b.stroke(),b.restore()),this._cache.set(v,{scene:p,filter:g,hit:m,x:l,y:u}),this._requestDraw(),this}a.Util.error("Can not cache the node. Width or height of the node equals 0. Caching is skipped.")}},{key:"isCached",value:function(){return this._cache.has(v)}},{key:"getClientRect",value:function(t){throw new Error('abstract "getClientRect" method call')}},{key:"_transformedRect",value:function(t,e){var n,r,i,o,a=[{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}],l=this.getAbsoluteTransform(e);return a.forEach((function(t){var e=l.point(t);void 0===n&&(n=i=e.x,r=o=e.y),n=Math.min(n,e.x),r=Math.min(r,e.y),i=Math.max(i,e.x),o=Math.max(o,e.y)})),{x:n,y:r,width:i-n,height:o-r}}},{key:"_drawCachedSceneCanvas",value:function(t){t.save(),t._applyOpacity(this),t._applyGlobalCompositeOperation(this);var e=this._getCanvasCache();t.translate(e.x,e.y);var n=this._getCachedSceneCanvas(),r=n.pixelRatio;t.drawImage(n._canvas,0,0,n.width/r,n.height/r),t.restore()}},{key:"_drawCachedHitCanvas",value:function(t){var 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()}},{key:"_getCachedSceneCanvas",value:function(){var t,e,n,r,o=this.filters(),l=this._getCanvasCache(),s=l.scene,u=l.filter,c=u.getContext();if(o){if(!this._filterUpToDate){var f=s.pixelRatio;u.setSize(s.width/s.pixelRatio,s.height/s.pixelRatio);try{for(t=o.length,c.clear(),c.drawImage(s._canvas,0,0,s.getWidth()/f,s.getHeight()/f),e=c.getImageData(0,0,u.getWidth(),u.getHeight()),n=0;n<t;n++)"function"==typeof(r=o[n])?(r.call(this,e),c.putImageData(e,0,0)):a.Util.error("Filter should be type of function, but got "+i(r)+" instead. Please check correct filters")}catch(t){a.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 u}return s}},{key:"on",value:function(t,e){if(this._cache&&this._cache.delete(d),3===arguments.length)return this._delegate.apply(this,arguments);var n,r,i,o,a=t.split(S),l=a.length;for(n=0;n<l;n++)i=(r=a[n].split("."))[0],o=r[1]||"",this.eventListeners[i]||(this.eventListeners[i]=[]),this.eventListeners[i].push({name:o,handler:e});return this}},{key:"off",value:function(t,e){var n,r,i,o,a,l=(t||"").split(S),s=l.length;if(this._cache&&this._cache.delete(d),!t)for(r in this.eventListeners)this._off(r);for(n=0;n<s;n++)if(o=(i=l[n].split("."))[0],a=i[1],o)this.eventListeners[o]&&this._off(o,a,e);else for(r in this.eventListeners)this._off(r,a,e);return this}},{key:"dispatchEvent",value:function(t){var e={target:this,type:t.type,evt:t};return this.fire(t.type,e),this}},{key:"addEventListener",value:function(t,e){return this.on(t,(function(t){e.call(this,t.evt)})),this}},{key:"removeEventListener",value:function(t){return this.off(t),this}},{key:"_delegate",value:function(t,e,n){var r=this;this.on(t,(function(t){for(var i=t.target.findAncestors(e,!0,r),o=0;o<i.length;o++)(t=a.Util.cloneObject(t)).currentTarget=i[o],n.call(i[o],t)}))}},{key:"remove",value:function(){return this.isDragging()&&this.stopDrag(),c.DD._dragElements.delete(this._id),this._remove(),this}},{key:"_clearCaches",value:function(){this._clearSelfAndDescendantCache(p),this._clearSelfAndDescendantCache(h),this._clearSelfAndDescendantCache(y),this._clearSelfAndDescendantCache(w),this._clearSelfAndDescendantCache(x),this._clearSelfAndDescendantCache(g)}},{key:"_remove",value:function(){this._clearCaches();var t=this.getParent();t&&t.children&&(t.children.splice(this.index,1),t._setChildrenIndices(),this.parent=null)}},{key:"destroy",value:function(){return this.remove(),this.clearCache(),this}},{key:"getAttr",value:function(t){var e="get"+a.Util._capitalize(t);return a.Util._isFunction(this[e])?this[e]():this.attrs[t]}},{key:"getAncestors",value:function(){for(var t=this.getParent(),e=[];t;)e.push(t),t=t.getParent();return e}},{key:"getAttrs",value:function(){return this.attrs||{}}},{key:"setAttrs",value:function(t){var e=this;return this._batchTransformChanges((function(){var n,r;if(!t)return e;for(n in t)"children"!==n&&(r="set"+a.Util._capitalize(n),a.Util._isFunction(e[r])?e[r](t[n]):e._setAttr(n,t[n]))})),this}},{key:"isListening",value:function(){return this._getCache(g,this._isListening)}},{key:"_isListening",value:function(t){if(!this.listening())return!1;var e=this.getParent();return!e||e===t||this===t||e._isListening(t)}},{key:"isVisible",value:function(){return this._getCache(x,this._isVisible)}},{key:"_isVisible",value:function(t){if(!this.visible())return!1;var e=this.getParent();return!e||e===t||this===t||e._isVisible(t)}},{key:"shouldDrawHit",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this._isVisible(t)&&this._isListening(t);var n=this.getLayer(),r=!1;c.DD._dragElements.forEach((function(t){"dragging"===t.dragStatus&&("Stage"===t.node.nodeType||t.node.getLayer()===n)&&(r=!0)}));var i=!e&&!u.Konva.hitOnDragEnabled&&r;return this.isListening()&&this.isVisible()&&!i}},{key:"show",value:function(){return this.visible(!0),this}},{key:"hide",value:function(){return this.visible(!1),this}},{key:"getZIndex",value:function(){return this.index||0}},{key:"getAbsoluteZIndex",value:function(){var t,e,n,r,i=this.getDepth(),o=this,a=0;return"Stage"!==o.nodeType&&function l(s){for(t=[],e=s.length,n=0;n<e;n++)r=s[n],a++,r.nodeType!==_&&(t=t.concat(r.getChildren().slice())),r._id===o._id&&(n=e);t.length>0&&t[0].getDepth()<=i&&l(t)}(o.getStage().getChildren()),a}},{key:"getDepth",value:function(){for(var t=0,e=this.parent;e;)t++,e=e.parent;return t}},{key:"_batchTransformChanges",value:function(t){this._batchingTransformChange=!0,t(),this._batchingTransformChange=!1,this._needClearTransformCache&&(this._clearCache(k),this._clearSelfAndDescendantCache(p)),this._needClearTransformCache=!1}},{key:"setPosition",value:function(t){var e=this;return this._batchTransformChanges((function(){e.x(t.x),e.y(t.y)})),this}},{key:"getPosition",value:function(){return{x:this.x(),y:this.y()}}},{key:"getRelativePointerPosition",value:function(){if(!this.getStage())return null;var t=this.getStage().getPointerPosition();if(!t)return null;var e=this.getAbsoluteTransform().copy();return e.invert(),e.point(t)}},{key:"getAbsolutePosition",value:function(t){for(var e=!1,n=this.parent;n;){if(n.isCached()){e=!0;break}n=n.parent}e&&!t&&(t=!0);var r=this.getAbsoluteTransform(t).getMatrix(),i=new a.Transform,o=this.offset();return i.m=r.slice(),i.translate(o.x,o.y),i.getTranslation()}},{key:"setAbsolutePosition",value:function(t){var e=this._clearTransform();this.attrs.x=e.x,this.attrs.y=e.y,delete e.x,delete e.y,this._clearCache(k);var n=this._getAbsoluteTransform().copy();return n.invert(),n.translate(t.x,t.y),t={x:this.attrs.x+n.getTranslation().x,y:this.attrs.y+n.getTranslation().y},this._setTransform(e),this.setPosition({x:t.x,y:t.y}),this._clearCache(k),this._clearSelfAndDescendantCache(p),this}},{key:"_setTransform",value:function(t){var e;for(e in t)this.attrs[e]=t[e]}},{key:"_clearTransform",value:function(){var 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}},{key:"move",value:function(t){var 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}},{key:"_eachAncestorReverse",value:function(t,e){var n,r,i=[],o=this.getParent();if(!e||e._id!==this._id){for(i.unshift(this);o&&(!e||o._id!==e._id);)i.unshift(o),o=o.parent;for(n=i.length,r=0;r<n;r++)t(i[r])}}},{key:"rotate",value:function(t){return this.rotation(this.rotation()+t),this}},{key:"moveToTop",value:function(){if(!this.parent)return a.Util.warn("Node has no parent. moveToTop function is ignored."),!1;var 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)}},{key:"moveUp",value:function(){if(!this.parent)return a.Util.warn("Node has no parent. moveUp function is ignored."),!1;var 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)}},{key:"moveDown",value:function(){if(!this.parent)return a.Util.warn("Node has no parent. moveDown function is ignored."),!1;var t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.splice(t-1,0,this),this.parent._setChildrenIndices(),!0)}},{key:"moveToBottom",value:function(){if(!this.parent)return a.Util.warn("Node has no parent. moveToBottom function is ignored."),!1;var t=this.index;return t>0&&(this.parent.children.splice(t,1),this.parent.children.unshift(this),this.parent._setChildrenIndices(),!0)}},{key:"setZIndex",value:function(t){if(!this.parent)return a.Util.warn("Node has no parent. zIndex parameter is ignored."),this;(t<0||t>=this.parent.children.length)&&a.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)+".");var e=this.index;return this.parent.children.splice(e,1),this.parent.children.splice(t,0,this),this.parent._setChildrenIndices(),this}},{key:"getAbsoluteOpacity",value:function(){return this._getCache(h,this._getAbsoluteOpacity)}},{key:"_getAbsoluteOpacity",value:function(){var t=this.opacity(),e=this.getParent();return e&&!e._isUnderCache&&(t*=e.getAbsoluteOpacity()),t}},{key:"moveTo",value:function(t){return this.getParent()!==t&&(this._remove(),t.add(this)),this}},{key:"toObject",value:function(){var t,e,n,r,i={},o=this.getAttrs();for(t in i.attrs={},o)e=o[t],a.Util.isObject(e)&&!a.Util._isPlainObject(e)&&!a.Util._isArray(e)||(n="function"==typeof this[t]&&this[t],delete o[t],r=n?n.call(this):null,o[t]=e,r!==e&&(i.attrs[t]=e));return i.className=this.getClassName(),a.Util._prepareToStringify(i)}},{key:"toJSON",value:function(){return JSON.stringify(this.toObject())}},{key:"getParent",value:function(){return this.parent}},{key:"findAncestors",value:function(t,e,n){var r=[];e&&this._isMatch(t)&&r.push(this);for(var i=this.parent;i;){if(i===n)return r;i._isMatch(t)&&r.push(i),i=i.parent}return r}},{key:"isAncestorOf",value:function(t){return!1}},{key:"findAncestor",value:function(t,e,n){return this.findAncestors(t,e,n)[0]}},{key:"_isMatch",value:function(t){if(!t)return!1;if("function"==typeof t)return t(this);var e,n,r=t.replace(/ /g,"").split(","),i=r.length;for(e=0;e<i;e++)if(n=r[e],a.Util.isValidSelector(n)||(a.Util.warn('Selector "'+n+'" is invalid. Allowed selectors examples are "#foo", ".bar" or "Group".'),a.Util.warn('If you have a custom shape with such className, please change it to start with upper letter like "Triangle".'),a.Util.warn("Konva is awesome, right?")),"#"===n.charAt(0)){if(this.id()===n.slice(1))return!0}else if("."===n.charAt(0)){if(this.hasName(n.slice(1)))return!0}else if(this.className===n||this.nodeType===n)return!0;return!1}},{key:"getLayer",value:function(){var t=this.getParent();return t?t.getLayer():null}},{key:"getStage",value:function(){return this._getCache(w,this._getStage)}},{key:"_getStage",value:function(){var t=this.getParent();return t?t.getStage():void 0}},{key:"fire",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return e.target=e.target||this,n?this._fireAndBubble(t,e):this._fire(t,e),this}},{key:"getAbsoluteTransform",value:function(t){return t?this._getAbsoluteTransform(t):this._getCache(p,this._getAbsoluteTransform)}},{key:"_getAbsoluteTransform",value:function(t){var e;if(t)return e=new a.Transform,this._eachAncestorReverse((function(t){var 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(p)||new a.Transform,this.parent?this.parent.getAbsoluteTransform().copyInto(e):e.reset();var n=this.transformsEnabled();if("all"===n)e.multiply(this.getTransform());else if("position"===n){var r=this.attrs.x||0,i=this.attrs.y||0,o=this.attrs.offsetX||0,l=this.attrs.offsetY||0;e.translate(r-o,i-l)}return e.dirty=!1,e}},{key:"getAbsoluteScale",value:function(t){for(var e=this;e;)e._isUnderCache&&(t=e),e=e.getParent();var n=this.getAbsoluteTransform(t).decompose();return{x:n.scaleX,y:n.scaleY}}},{key:"getAbsoluteRotation",value:function(){return this.getAbsoluteTransform().decompose().rotation}},{key:"getTransform",value:function(){return this._getCache(k,this._getTransform)}},{key:"_getTransform",value:function(){var t,e,n=this._cache.get(k)||new a.Transform;n.reset();var r=this.x(),i=this.y(),o=u.Konva.getAngle(this.rotation()),l=null!==(t=this.attrs.scaleX)&&void 0!==t?t:1,s=null!==(e=this.attrs.scaleY)&&void 0!==e?e:1,c=this.attrs.skewX||0,f=this.attrs.skewY||0,h=this.attrs.offsetX||0,d=this.attrs.offsetY||0;return 0===r&&0===i||n.translate(r,i),0!==o&&n.rotate(o),0===c&&0===f||n.skew(c,f),1===l&&1===s||n.scale(l,s),0===h&&0===d||n.translate(-1*h,-1*d),n.dirty=!1,n}},{key:"clone",value:function(t){var e,n,r,i,o,l=a.Util.cloneObject(this.attrs);for(e in t)l[e]=t[e];var s=new this.constructor(l);for(e in this.eventListeners)for(r=(n=this.eventListeners[e]).length,i=0;i<r;i++)(o=n[i]).name.indexOf("konva")<0&&(s.eventListeners[e]||(s.eventListeners[e]=[]),s.eventListeners[e].push(o));return s}},{key:"_toKonvaCanvas",value:function(t){t=t||{};var 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,a=new s.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=a.getContext();return!1===t.imageSmoothingEnabled&&(l._context.imageSmoothingEnabled=!1),l.save(),(r||i)&&l.translate(-1*r,-1*i),this.drawScene(a),l.restore(),a}},{key:"toCanvas",value:function(t){return this._toKonvaCanvas(t)._canvas}},{key:"toDataURL",value:function(t){var e=(t=t||{}).mimeType||null,n=t.quality||null,r=this._toKonvaCanvas(t).toDataURL(e,n);return t.callback&&t.callback(r),r}},{key:"toImage",value:function(t){var e=this;return new Promise((function(n,r){try{var i=null==t?void 0:t.callback;i&&delete t.callback,a.Util._urlToImage(e.toDataURL(t),(function(t){n(t),null==i||i(t)}))}catch(t){r(t)}}))}},{key:"toBlob",value:function(t){var e=this;return new Promise((function(n,r){try{var i=null==t?void 0:t.callback;i&&delete t.callback,e.toCanvas(t).toBlob((function(t){n(t),null==i||i(t)}))}catch(t){r(t)}}))}},{key:"setSize",value:function(t){return this.width(t.width),this.height(t.height),this}},{key:"getSize",value:function(){return{width:this.width(),height:this.height()}}},{key:"getClassName",value:function(){return this.className||this.nodeType}},{key:"getType",value:function(){return this.nodeType}},{key:"getDragDistance",value:function(){return void 0!==this.attrs.dragDistance?this.attrs.dragDistance:this.parent?this.parent.getDragDistance():u.Konva.dragDistance}},{key:"_off",value:function(t,e,n){var r,i,o,a=this.eventListeners[t];for(r=0;r<a.length;r++)if(i=a[r].name,o=a[r].handler,!("konva"===i&&"konva"!==e||e&&i!==e||n&&n!==o)){if(a.splice(r,1),0===a.length){delete this.eventListeners[t];break}r--}}},{key:"_fireChangeEvent",value:function(t,e,n){this._fire(t+"Change",{oldVal:e,newVal:n})}},{key:"addName",value:function(t){if(!this.hasName(t)){var e=this.name(),n=e?e+" "+t:t;this.name(n)}return this}},{key:"hasName",value:function(t){if(!t)return!1;var e=this.name();return!!e&&-1!==(e||"").split(/\s/g).indexOf(t)}},{key:"removeName",value:function(t){var e=(this.name()||"").split(/\s/g),n=e.indexOf(t);return-1!==n&&(e.splice(n,1),this.name(e.join(" "))),this}},{key:"setAttr",value:function(t,e){var n=this["set"+a.Util._capitalize(t)];return a.Util._isFunction(n)?n.call(this,e):this._setAttr(t,e),this}},{key:"_requestDraw",value:function(){if(u.Konva.autoDrawEnabled){var t=this.getLayer()||this.getStage();null==t||t.batchDraw()}}},{key:"_setAttr",value:function(t,e){var n=this.attrs[t];(n!==e||a.Util.isObject(e))&&(null==e?delete this.attrs[t]:this.attrs[t]=e,this._shouldFireChangeEvents&&this._fireChangeEvent(t,n,e),this._requestDraw())}},{key:"_setComponentAttr",value:function(t,e,n){var r;void 0!==n&&((r=this.attrs[t])||(this.attrs[t]=this.getAttr(t)),this.attrs[t][e]=n,this._fireChangeEvent(t,r,n))}},{key:"_fireAndBubble",value:function(t,e,n){if(e&&this.nodeType===_&&(e.target=this),t!==m&&t!==b||!(n&&(this===n||this.isAncestorOf&&this.isAncestorOf(n))||"Stage"===this.nodeType&&!n)){this._fire(t,e);var r=(t===m||t===b)&&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))}}},{key:"_getProtoListeners",value:function(t){var e,n,i,o,a=null!==(e=this._cache.get(d))&&void 0!==e?e:{},l=null==a?void 0:a[t];if(void 0===l){l=[];for(var s=Object.getPrototypeOf(this);s;){var u,c=null!==(i=null===(n=s.eventListeners)||void 0===n?void 0:n[t])&&void 0!==i?i:[];(u=l).push.apply(u,function(t){if(Array.isArray(t))return r(t)}(o=c)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(o)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=Object.getPrototypeOf(s)}a[t]=l,this._cache.set(d,a)}return l}},{key:"_fire",value:function(t,e){(e=e||{}).currentTarget=this,e.type=t;var n=this._getProtoListeners(t);if(n)for(var r=0;r<n.length;r++)n[r].handler.call(this,e);var i=this.eventListeners[t];if(i)for(r=0;r<i.length;r++)i[r].handler.call(this,e)}},{key:"draw",value:function(){return this.drawScene(),this.drawHit(),this}},{key:"_createDragElement",value:function(t){var e=t?t.pointerId:void 0,n=this.getStage(),r=this.getAbsolutePosition(),i=n._getPointerById(e)||n._changedPointerPositions[0]||r;c.DD._dragElements.set(this._id,{node:this,startPointerPos:i,offset:{x:i.x-r.x,y:i.y-r.y},dragStatus:"ready",pointerId:e})}},{key:"startDrag",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];c.DD._dragElements.has(this._id)||this._createDragElement(t),c.DD._dragElements.get(this._id).dragStatus="dragging",this.fire("dragstart",{type:"dragstart",target:this,evt:t&&t.evt},e)}},{key:"_setDragPosition",value:function(t,e){var n=this.getStage()._getPointerById(e.pointerId);if(n){var r={x:n.x-e.offset.x,y:n.y-e.offset.y},i=this.dragBoundFunc();if(void 0!==i){var o=i.call(this,r,t);o?r=o:a.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===r.x&&this._lastPos.y===r.y||(this.setAbsolutePosition(r),this._requestDraw()),this._lastPos=r}}},{key:"stopDrag",value:function(t){var e=c.DD._dragElements.get(this._id);e&&(e.dragStatus="stopped"),c.DD._endDragBefore(t),c.DD._endDragAfter(t)}},{key:"setDraggable",value:function(t){this._setAttr("draggable",t),this._dragChange()}},{key:"isDragging",value:function(){var t=c.DD._dragElements.get(this._id);return!!t&&"dragging"===t.dragStatus}},{key:"_listenDrag",value:function(){this._dragCleanup(),this.on("mousedown.konva touchstart.konva",(function(t){var e=this;if((void 0===t.evt.button||u.Konva.dragButtons.indexOf(t.evt.button)>=0)&&!this.isDragging()){var n=!1;c.DD._dragElements.forEach((function(t){e.isAncestorOf(t.node)&&(n=!0)})),n||this._createDragElement(t)}}))}},{key:"_dragChange",value:function(){if(this.attrs.draggable)this._listenDrag();else{if(this._dragCleanup(),!this.getStage())return;var t=c.DD._dragElements.get(this._id),e=t&&"dragging"===t.dragStatus,n=t&&"ready"===t.dragStatus;e?this.stopDrag():n&&c.DD._dragElements.delete(this._id)}}},{key:"_dragCleanup",value:function(){this.off("mousedown.konva"),this.off("touchstart.konva")}},{key:"isClientRectOnScreen",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0},e=this.getStage();if(!e)return!1;var n={x:-t.x,y:-t.y,width:e.width()+2*t.x,height:e.height()+2*t.y};return a.Util.haveIntersection(n,this.getClientRect())}}],l=[{key:"create",value:function(t,e){return a.Util._isString(t)&&(t=JSON.parse(t)),this._createNode(t,e)}},{key:"_createNode",value:function(e,n){var r,i,o,l=t.prototype.getClassName.call(e),s=e.children;if(n&&(e.attrs.container=n),u.Konva[l]||(a.Util.warn('Can not find a node with class name "'+l+'". Fallback to "Shape".'),l="Shape"),r=new(0,u.Konva[l])(e.attrs),s)for(i=s.length,o=0;o<i;o++)r.add(t._createNode(s[o]));return r}}],n&&o(e.prototype,n),l&&o(e,l),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.Node=O,O.prototype.nodeType="Node",O.prototype._attrsAffectingSize=[],O.prototype.eventListeners={},O.prototype.on.call(O.prototype,P,(function(){this._batchingTransformChange?this._needClearTransformCache=!0:(this._clearCache(k),this._clearSelfAndDescendantCache(p))})),O.prototype.on.call(O.prototype,"visibleChange.konva",(function(){this._clearSelfAndDescendantCache(x)})),O.prototype.on.call(O.prototype,"listeningChange.konva",(function(){this._clearSelfAndDescendantCache(g)})),O.prototype.on.call(O.prototype,"opacityChange.konva",(function(){this._clearSelfAndDescendantCache(h)}));var T=l.Factory.addGetterSetter;T(O,"zIndex"),T(O,"absolutePosition"),T(O,"position"),T(O,"x",0,(0,f.getNumberValidator)()),T(O,"y",0,(0,f.getNumberValidator)()),T(O,"globalCompositeOperation","source-over",(0,f.getStringValidator)()),T(O,"opacity",1,(0,f.getNumberValidator)()),T(O,"name","",(0,f.getStringValidator)()),T(O,"id","",(0,f.getStringValidator)()),T(O,"rotation",0,(0,f.getNumberValidator)()),l.Factory.addComponentsGetterSetter(O,"scale",["x","y"]),T(O,"scaleX",1,(0,f.getNumberValidator)()),T(O,"scaleY",1,(0,f.getNumberValidator)()),l.Factory.addComponentsGetterSetter(O,"skew",["x","y"]),T(O,"skewX",0,(0,f.getNumberValidator)()),T(O,"skewY",0,(0,f.getNumberValidator)()),l.Factory.addComponentsGetterSetter(O,"offset",["x","y"]),T(O,"offsetX",0,(0,f.getNumberValidator)()),T(O,"offsetY",0,(0,f.getNumberValidator)()),T(O,"dragDistance",null,(0,f.getNumberValidator)()),T(O,"width",0,(0,f.getNumberValidator)()),T(O,"height",0,(0,f.getNumberValidator)()),T(O,"listening",!0,(0,f.getBooleanValidator)()),T(O,"preventDefault",!0,(0,f.getBooleanValidator)()),T(O,"filters",null,(function(t){return this._filterUpToDate=!1,t})),T(O,"visible",!0,(0,f.getBooleanValidator)()),T(O,"transformsEnabled","all",(0,f.getStringValidator)()),T(O,"size"),T(O,"dragBoundFunc"),T(O,"draggable",!1,(0,f.getBooleanValidator)()),l.Factory.backCompat(O,{rotateDeg:"rotate",setRotationDeg:"setRotation",getRotationDeg:"getRotation"})},5984:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.releaseCapture=e.setPointerCapture=e.hasPointerCapture=e.createEvent=e.getCapturedShape=void 0;var r=n(867),i=new Map,o=void 0!==r.Konva._global.PointerEvent;function a(t){return{evt:t,pointerId:t.pointerId}}function l(t,e){var n=i.get(t);if(n){var r=n.getStage();r&&r.content,i.delete(t),o&&n._fire("lostpointercapture",a(new PointerEvent("lostpointercapture")))}}e.getCapturedShape=function(t){return i.get(t)},e.createEvent=a,e.hasPointerCapture=function(t,e){return i.get(t)===e},e.setPointerCapture=function(t,e){l(t),e.getStage()&&(i.set(t,e),o&&e._fire("gotpointercapture",a(new PointerEvent("gotpointercapture"))))},e.releaseCapture=l},7427:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Shape=e.shapes=void 0;var s,u=n(867),c=n(773),f=n(6473),h=n(6673),d=n(6836),p=n(867),y=n(5984),v="hasShadow",g="shadowRGBA",m="patternImage",b="linearGradient",_="radialGradient";function S(){return s||(s=c.Util.createCanvasElement().getContext("2d"))}e.shapes={};var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(w,t);var n,s,f,d,p=(f=w,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(f);if(d){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return a(t)}(this,t)});function w(t){var n,r;for(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,w),n=p.call(this,t);!(r=c.Util.getRandomColor())||r in e.shapes;);return n.colorKey=r,e.shapes[r]=a(n),n}return n=w,s=[{key:"getContext",value:function(){return c.Util.warn("shape.getContext() method is deprecated. Please do not use it."),this.getLayer().getContext()}},{key:"getCanvas",value:function(){return c.Util.warn("shape.getCanvas() method is deprecated. Please do not use it."),this.getLayer().getCanvas()}},{key:"getSceneFunc",value:function(){return this.attrs.sceneFunc||this._sceneFunc}},{key:"getHitFunc",value:function(){return this.attrs.hitFunc||this._hitFunc}},{key:"hasShadow",value:function(){return this._getCache(v,this._hasShadow)}},{key:"_hasShadow",value:function(){return this.shadowEnabled()&&0!==this.shadowOpacity()&&!!(this.shadowColor()||this.shadowBlur()||this.shadowOffsetX()||this.shadowOffsetY())}},{key:"_getFillPattern",value:function(){return this._getCache(m,this.__getFillPattern)}},{key:"__getFillPattern",value:function(){if(this.fillPatternImage()){var t=S().createPattern(this.fillPatternImage(),this.fillPatternRepeat()||"repeat");if(t&&t.setTransform){var e=new c.Transform;e.translate(this.fillPatternX(),this.fillPatternY()),e.rotate(u.Konva.getAngle(this.fillPatternRotation())),e.scale(this.fillPatternScaleX(),this.fillPatternScaleY()),e.translate(-1*this.fillPatternOffsetX(),-1*this.fillPatternOffsetY());var 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}}},{key:"_getLinearGradient",value:function(){return this._getCache(b,this.__getLinearGradient)}},{key:"__getLinearGradient",value:function(){var t=this.fillLinearGradientColorStops();if(t){for(var e=S(),n=this.fillLinearGradientStartPoint(),r=this.fillLinearGradientEndPoint(),i=e.createLinearGradient(n.x,n.y,r.x,r.y),o=0;o<t.length;o+=2)i.addColorStop(t[o],t[o+1]);return i}}},{key:"_getRadialGradient",value:function(){return this._getCache(_,this.__getRadialGradient)}},{key:"__getRadialGradient",value:function(){var t=this.fillRadialGradientColorStops();if(t){for(var e=S(),n=this.fillRadialGradientStartPoint(),r=this.fillRadialGradientEndPoint(),i=e.createRadialGradient(n.x,n.y,this.fillRadialGradientStartRadius(),r.x,r.y,this.fillRadialGradientEndRadius()),o=0;o<t.length;o+=2)i.addColorStop(t[o],t[o+1]);return i}}},{key:"getShadowRGBA",value:function(){return this._getCache(g,this._getShadowRGBA)}},{key:"_getShadowRGBA",value:function(){if(this.hasShadow()){var t=c.Util.colorToRGBA(this.shadowColor());return t?"rgba("+t.r+","+t.g+","+t.b+","+t.a*(this.shadowOpacity()||1)+")":void 0}}},{key:"hasFill",value:function(){var t=this;return this._calculate("hasFill",["fillEnabled","fill","fillPatternImage","fillLinearGradientColorStops","fillRadialGradientColorStops"],(function(){return t.fillEnabled()&&!!(t.fill()||t.fillPatternImage()||t.fillLinearGradientColorStops()||t.fillRadialGradientColorStops())}))}},{key:"hasStroke",value:function(){var t=this;return this._calculate("hasStroke",["strokeEnabled","strokeWidth","stroke","strokeLinearGradientColorStops"],(function(){return t.strokeEnabled()&&t.strokeWidth()&&!(!t.stroke()&&!t.strokeLinearGradientColorStops())}))}},{key:"hasHitStroke",value:function(){var t=this.hitStrokeWidth();return"auto"===t?this.hasStroke():this.strokeEnabled()&&!!t}},{key:"intersects",value:function(t){var e=this.getStage().bufferHitCanvas;return e.getContext().clear(),this.drawHit(e,null,!0),e.context.getImageData(Math.round(t.x),Math.round(t.y),1,1).data[3]>0}},{key:"destroy",value:function(){return h.Node.prototype.destroy.call(this),delete e.shapes[this.colorKey],delete this.colorKey,this}},{key:"_useBufferCanvas",value:function(t){var e;if(!this.getStage())return!1;if(null!==(e=this.attrs.perfectDrawEnabled)&&void 0!==e&&!e)return!1;var n=t||this.hasFill(),r=this.hasStroke(),i=1!==this.getAbsoluteOpacity();if(n&&r&&i)return!0;var o=this.hasShadow(),a=this.shadowForStrokeEnabled();return!!(n&&r&&o&&a)}},{key:"setStrokeHitEnabled",value:function(t){c.Util.warn("strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead."),t?this.hitStrokeWidth("auto"):this.hitStrokeWidth(0)}},{key:"getStrokeHitEnabled",value:function(){return 0!==this.hitStrokeWidth()}},{key:"getSelfRect",value:function(){var t=this.size();return{x:this._centroid?-t.width/2:0,y:this._centroid?-t.height/2:0,width:t.width,height:t.height}}},{key:"getClientRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.skipTransform,n=t.relativeTo,r=this.getSelfRect(),i=!t.skipStroke&&this.hasStroke()&&this.strokeWidth()||0,o=r.width+i,a=r.height+i,l=!t.skipShadow&&this.hasShadow(),s=l?this.shadowOffsetX():0,u=l?this.shadowOffsetY():0,c=o+Math.abs(s),f=a+Math.abs(u),h=l&&this.shadowBlur()||0,d={width:c+2*h,height:f+2*h,x:-(i/2+h)+Math.min(s,0)+r.x,y:-(i/2+h)+Math.min(u,0)+r.y};return e?d:this._transformedRect(d,n)}},{key:"drawScene",value:function(t,e){var n,r,i=this.getLayer(),o=t||i.getCanvas(),a=o.getContext(),l=this._getCanvasCache(),s=this.getSceneFunc(),u=this.hasShadow(),c=o.isCache,f=e===this;if(!this.isVisible()&&!f)return this;if(l){a.save();var h=this.getAbsoluteTransform(e).getMatrix();return a.transform(h[0],h[1],h[2],h[3],h[4],h[5]),this._drawCachedSceneCanvas(a),a.restore(),this}if(!s)return this;if(a.save(),this._useBufferCanvas()&&!c){(r=(n=this.getStage().bufferCanvas).getContext()).clear(),r.save(),r._applyLineJoin(this);var d=this.getAbsoluteTransform(e).getMatrix();r.transform(d[0],d[1],d[2],d[3],d[4],d[5]),s.call(this,r,this),r.restore();var p=n.pixelRatio;u&&a._applyShadow(this),a._applyOpacity(this),a._applyGlobalCompositeOperation(this),a.drawImage(n._canvas,0,0,n.width/p,n.height/p)}else a._applyLineJoin(this),f||(d=this.getAbsoluteTransform(e).getMatrix(),a.transform(d[0],d[1],d[2],d[3],d[4],d[5]),a._applyOpacity(this),a._applyGlobalCompositeOperation(this)),u&&a._applyShadow(this),s.call(this,a,this);return a.restore(),this}},{key:"drawHit",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.shouldDrawHit(e,n))return this;var r=this.getLayer(),i=t||r.hitCanvas,o=i&&i.getContext(),a=this.hitFunc()||this.sceneFunc(),l=this._getCanvasCache(),s=l&&l.hit;if(this.colorKey||c.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()"),s){o.save();var u=this.getAbsoluteTransform(e).getMatrix();return o.transform(u[0],u[1],u[2],u[3],u[4],u[5]),this._drawCachedHitCanvas(o),o.restore(),this}if(!a)return this;if(o.save(),o._applyLineJoin(this),this!==e){var f=this.getAbsoluteTransform(e).getMatrix();o.transform(f[0],f[1],f[2],f[3],f[4],f[5])}return a.call(this,o,this),o.restore(),this}},{key:"drawHitFromCache",value:function(){var t,e,n,r,i,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=this._getCanvasCache(),l=this._getCachedSceneCanvas(),s=a.hit,u=s.getContext(),f=s.getWidth(),h=s.getHeight();u.clear(),u.drawImage(l._canvas,0,0,f,h);try{for(n=(e=(t=u.getImageData(0,0,f,h)).data).length,r=c.Util._hexToRgb(this.colorKey),i=0;i<n;i+=4)e[i+3]>o?(e[i]=r.r,e[i+1]=r.g,e[i+2]=r.b,e[i+3]=255):e[i+3]=0;u.putImageData(t,0,0)}catch(t){c.Util.error("Unable to draw hit graph from cached scene canvas. "+t.message)}return this}},{key:"hasPointerCapture",value:function(t){return y.hasPointerCapture(t,this)}},{key:"setPointerCapture",value:function(t){y.setPointerCapture(t,this)}},{key:"releaseCapture",value:function(t){y.releaseCapture(t,this)}}],s&&i(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),w}(h.Node);e.Shape=w,w.prototype._fillFunc=function(t){t.fill()},w.prototype._strokeFunc=function(t){t.stroke()},w.prototype._fillFuncHit=function(t){t.fill()},w.prototype._strokeFuncHit=function(t){t.stroke()},w.prototype._centroid=!1,w.prototype.nodeType="Shape",(0,p._registerNode)(w),w.prototype.eventListeners={},w.prototype.on.call(w.prototype,"shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(v)})),w.prototype.on.call(w.prototype,"shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva",(function(){this._clearCache(g)})),w.prototype.on.call(w.prototype,"fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva",(function(){this._clearCache(m)})),w.prototype.on.call(w.prototype,"fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva",(function(){this._clearCache(b)})),w.prototype.on.call(w.prototype,"fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva",(function(){this._clearCache(_)})),f.Factory.addGetterSetter(w,"stroke",void 0,(0,d.getStringOrGradientValidator)()),f.Factory.addGetterSetter(w,"strokeWidth",2,(0,d.getNumberValidator)()),f.Factory.addGetterSetter(w,"fillAfterStrokeEnabled",!1),f.Factory.addGetterSetter(w,"hitStrokeWidth","auto",(0,d.getNumberOrAutoValidator)()),f.Factory.addGetterSetter(w,"strokeHitEnabled",!0,(0,d.getBooleanValidator)()),f.Factory.addGetterSetter(w,"perfectDrawEnabled",!0,(0,d.getBooleanValidator)()),f.Factory.addGetterSetter(w,"shadowForStrokeEnabled",!0,(0,d.getBooleanValidator)()),f.Factory.addGetterSetter(w,"lineJoin"),f.Factory.addGetterSetter(w,"lineCap"),f.Factory.addGetterSetter(w,"sceneFunc"),f.Factory.addGetterSetter(w,"hitFunc"),f.Factory.addGetterSetter(w,"dash"),f.Factory.addGetterSetter(w,"dashOffset",0,(0,d.getNumberValidator)()),f.Factory.addGetterSetter(w,"shadowColor",void 0,(0,d.getStringValidator)()),f.Factory.addGetterSetter(w,"shadowBlur",0,(0,d.getNumberValidator)()),f.Factory.addGetterSetter(w,"shadowOpacity",1,(0,d.getNumberValidator)()),f.Factory.addComponentsGetterSetter(w,"shadowOffset",["x","y"]),f.Factory.addGetterSetter(w,"shadowOffsetX",0,(0,d.getNumberValidator)()),f.Factory.addGetterSetter(w,"shadowOffsetY",0,(0,d.getNumberValidator)()),f.Factory.addGetterSetter(w,"fillPatternImage"),f.Factory.addGetterSetter(w,"fill",void 0,(0,d.getStringOrGradientValidator)()),f.Factory.addGetterSetter(w,"fillPatternX",0,(0,d.getNumberValidator)()),f.Factory.addGetterSetter(w,"fillPatternY",0,(0,d.getNumberValidator)()),f.Factory.addGetterSetter(w,"fillLinearGradientColorStops"),f.Factory.addGetterSetter(w,"strokeLinearGradientColorStops"),f.Factory.addGetterSetter(w,"fillRadialGradientStartRadius",0),f.Factory.addGetterSetter(w,"fillRadialGradientEndRadius",0),f.Factory.addGetterSetter(w,"fillRadialGradientColorStops"),f.Factory.addGetterSetter(w,"fillPatternRepeat","repeat"),f.Factory.addGetterSetter(w,"fillEnabled",!0),f.Factory.addGetterSetter(w,"strokeEnabled",!0),f.Factory.addGetterSetter(w,"shadowEnabled",!0),f.Factory.addGetterSetter(w,"dashEnabled",!0),f.Factory.addGetterSetter(w,"strokeScaleEnabled",!0),f.Factory.addGetterSetter(w,"fillPriority","color"),f.Factory.addComponentsGetterSetter(w,"fillPatternOffset",["x","y"]),f.Factory.addGetterSetter(w,"fillPatternOffsetX",0,(0,d.getNumberValidator)()),f.Factory.addGetterSetter(w,"fillPatternOffsetY",0,(0,d.getNumberValidator)()),f.Factory.addComponentsGetterSetter(w,"fillPatternScale",["x","y"]),f.Factory.addGetterSetter(w,"fillPatternScaleX",1,(0,d.getNumberValidator)()),f.Factory.addGetterSetter(w,"fillPatternScaleY",1,(0,d.getNumberValidator)()),f.Factory.addComponentsGetterSetter(w,"fillLinearGradientStartPoint",["x","y"]),f.Factory.addComponentsGetterSetter(w,"strokeLinearGradientStartPoint",["x","y"]),f.Factory.addGetterSetter(w,"fillLinearGradientStartPointX",0),f.Factory.addGetterSetter(w,"strokeLinearGradientStartPointX",0),f.Factory.addGetterSetter(w,"fillLinearGradientStartPointY",0),f.Factory.addGetterSetter(w,"strokeLinearGradientStartPointY",0),f.Factory.addComponentsGetterSetter(w,"fillLinearGradientEndPoint",["x","y"]),f.Factory.addComponentsGetterSetter(w,"strokeLinearGradientEndPoint",["x","y"]),f.Factory.addGetterSetter(w,"fillLinearGradientEndPointX",0),f.Factory.addGetterSetter(w,"strokeLinearGradientEndPointX",0),f.Factory.addGetterSetter(w,"fillLinearGradientEndPointY",0),f.Factory.addGetterSetter(w,"strokeLinearGradientEndPointY",0),f.Factory.addComponentsGetterSetter(w,"fillRadialGradientStartPoint",["x","y"]),f.Factory.addGetterSetter(w,"fillRadialGradientStartPointX",0),f.Factory.addGetterSetter(w,"fillRadialGradientStartPointY",0),f.Factory.addComponentsGetterSetter(w,"fillRadialGradientEndPoint",["x","y"]),f.Factory.addGetterSetter(w,"fillRadialGradientEndPointX",0),f.Factory.addGetterSetter(w,"fillRadialGradientEndPointY",0),f.Factory.addGetterSetter(w,"fillPatternRotation",0),f.Factory.backCompat(w,{dashArray:"dash",getDashArray:"getDash",setDashArray:"getDash",drawFunc:"sceneFunc",getDrawFunc:"getSceneFunc",setDrawFunc:"setSceneFunc",drawHitFunc:"hitFunc",getDrawHitFunc:"getHitFunc",setDrawHitFunc:"setHitFunc"})},1532:(t,e,n)=>{"use strict";var r,i,o;function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,p(r.key),r)}}function u(){return u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},u.apply(this,arguments)}function c(t,e){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},c(t,e)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function d(t,e,n){return(e=p(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function p(t){var e=function(t,e){if("object"!==l(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===l(e)?e:String(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.Stage=e.stages=void 0;var y=n(773),v=n(6473),g=n(8842),m=n(867),b=n(3473),_=n(2208),S=n(867),w=n(5984),k="mouseleave",x="mouseover",P="mouseenter",C="mousemove",O="mousedown",T="mouseup",E="pointermove",R="pointerdown",j="pointerup",A="pointercancel",M="pointerout",N="pointerleave",F="pointerover",D="pointerenter",I="contextmenu",L="touchstart",G="touchend",z="touchmove",U="touchcancel",B="wheel",H=[[P,"_pointerenter"],[O,"_pointerdown"],[C,"_pointermove"],[T,"_pointerup"],[k,"_pointerleave"],[L,"_pointerdown"],[z,"_pointermove"],[G,"_pointerup"],[U,"_pointercancel"],[x,"_pointerover"],[B,"_wheel"],[I,"_contextmenu"],[R,"_pointerdown"],[E,"_pointermove"],[j,"_pointerup"],[A,"_pointercancel"],["lostpointercapture","_lostpointercapture"]],V={mouse:(r={},d(r,M,"mouseout"),d(r,N,k),d(r,F,x),d(r,D,P),d(r,E,C),d(r,R,O),d(r,j,T),d(r,A,"mousecancel"),d(r,"pointerclick","click"),d(r,"pointerdblclick","dblclick"),r),touch:(i={},d(i,M,"touchout"),d(i,N,"touchleave"),d(i,F,"touchover"),d(i,D,"touchenter"),d(i,E,z),d(i,R,L),d(i,j,G),d(i,A,U),d(i,"pointerclick","tap"),d(i,"pointerdblclick","dbltap"),i),pointer:(o={},d(o,M,M),d(o,N,N),d(o,F,F),d(o,D,D),d(o,E,E),d(o,R,R),d(o,j,j),d(o,A,A),d(o,"pointerclick","pointerclick"),d(o,"pointerdblclick","pointerdblclick"),o)},W=function(t){return t.indexOf("pointer")>=0?"pointer":t.indexOf("touch")>=0?"touch":"mouse"},K=function(t){var e=W(t);return"pointer"===e?m.Konva.pointerEventsEnabled&&V.pointer:"touch"===e?V.touch:"mouse"===e?V.mouse:void 0};function Y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t.clipFunc||t.clipWidth||t.clipHeight)&&y.Util.warn("Stage does not support clipping. Please use clip for Layers or Groups."),t}e.stages=[];var q=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(p,t);var n,r,i,o,d=(i=p,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=h(i);if(o){var n=h(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}(this,t)});function p(t){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),(n=d.call(this,Y(t)))._pointerPositions=[],n._changedPointerPositions=[],n._buildDOM(),n._bindContentEvents(),e.stages.push(f(n)),n.on("widthChange.konva heightChange.konva",n._resizeDOM),n.on("visibleChange.konva",n._checkVisibility),n.on("clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva",(function(){Y(n.attrs)})),n._checkVisibility(),n}return n=p,r=[{key:"_validateAdd",value:function(t){var e="Layer"===t.getType(),n="FastLayer"===t.getType();e||n||y.Util.throw("You may only add layers to the stage.")}},{key:"_checkVisibility",value:function(){if(this.content){var t=this.visible()?"":"none";this.content.style.display=t}}},{key:"setContainer",value:function(t){if("string"===l(t)){if("."===t.charAt(0)){var e=t.slice(1);t=document.getElementsByClassName(e)[0]}else{var n;n="#"!==t.charAt(0)?t:t.slice(1),t=document.getElementById(n)}if(!t)throw"Can not find container in document with id "+n}return this._setAttr("container",t),this.content&&(this.content.parentElement&&this.content.parentElement.removeChild(this.content),t.appendChild(this.content)),this}},{key:"shouldDrawHit",value:function(){return!0}},{key:"clear",value:function(){var t,e=this.children,n=e.length;for(t=0;t<n;t++)e[t].clear();return this}},{key:"clone",value:function(t){return t||(t={}),t.container="undefined"!=typeof document&&document.createElement("div"),g.Container.prototype.clone.call(this,t)}},{key:"destroy",value:function(){u(h(p.prototype),"destroy",this).call(this);var t=this.content;t&&y.Util._isInDocument(t)&&this.container().removeChild(t);var n=e.stages.indexOf(this);return n>-1&&e.stages.splice(n,1),y.Util.releaseCanvas(this.bufferCanvas._canvas,this.bufferHitCanvas._canvas),this}},{key:"getPointerPosition",value:function(){var t=this._pointerPositions[0]||this._changedPointerPositions[0];return t?{x:t.x,y:t.y}:(y.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)}},{key:"_getPointerById",value:function(t){return this._pointerPositions.find((function(e){return e.id===t}))}},{key:"getPointersPositions",value:function(){return this._pointerPositions}},{key:"getStage",value:function(){return this}},{key:"getContent",value:function(){return this.content}},{key:"_toKonvaCanvas",value:function(t){(t=t||{}).x=t.x||0,t.y=t.y||0,t.width=t.width||this.width(),t.height=t.height||this.height();var e=new b.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()){var r=e._toKonvaCanvas(t);n.drawImage(r._canvas,t.x,t.y,r.getWidth()/r.getPixelRatio(),r.getHeight()/r.getPixelRatio())}})),e}},{key:"getIntersection",value:function(t){if(!t)return null;var e,n=this.children;for(e=n.length-1;e>=0;e--){var r=n[e].getIntersection(t);if(r)return r}return null}},{key:"_resizeDOM",value:function(){var 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((function(n){n.setSize({width:t,height:e}),n.draw()}))}},{key:"add",value:function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];if(arguments.length>1){for(var i=0;i<arguments.length;i++)this.add(arguments[i]);return this}u(h(p.prototype),"add",this).call(this,t);var o=this.children.length;return o>5&&y.Util.warn("The stage has "+o+" 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(),m.Konva.isBrowser&&this.content.appendChild(t.canvas._canvas),this}},{key:"getParent",value:function(){return null}},{key:"getLayer",value:function(){return null}},{key:"hasPointerCapture",value:function(t){return w.hasPointerCapture(t,this)}},{key:"setPointerCapture",value:function(t){w.setPointerCapture(t,this)}},{key:"releaseCapture",value:function(t){w.releaseCapture(t,this)}},{key:"getLayers",value:function(){return this.children}},{key:"_bindContentEvents",value:function(){var t=this;m.Konva.isBrowser&&H.forEach((function(e){var n,r,i=(r=2,function(t){if(Array.isArray(t))return t}(n=e)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(n,r)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],l=i[1];t.content.addEventListener(o,(function(e){t[l](e)}),{passive:!1})}))}},{key:"_pointerenter",value:function(t){this.setPointersPositions(t);var e=K(t.type);this._fire(e.pointerenter,{evt:t,target:this,currentTarget:this})}},{key:"_pointerover",value:function(t){this.setPointersPositions(t);var e=K(t.type);this._fire(e.pointerover,{evt:t,target:this,currentTarget:this})}},{key:"_getTargetShape",value:function(t){var e=this[t+"targetShape"];return e&&!e.getStage()&&(e=null),e}},{key:"_pointerleave",value:function(t){var e=K(t.type),n=W(t.type);if(e){this.setPointersPositions(t);var r=this._getTargetShape(n),i=!_.DD.isDragging||m.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=void 0,this._pointerPositions=[]}}},{key:"_pointerdown",value:function(t){var e=this,n=K(t.type),r=W(t.type);if(n){this.setPointersPositions(t);var i=!1;this._changedPointerPositions.forEach((function(o){var a=e.getIntersection(o);if(_.DD.justDragged=!1,m.Konva["_"+r+"ListenClick"]=!0,a&&a.isListening()){m.Konva.capturePointerEventsEnabled&&a.setPointerCapture(o.id),e[r+"ClickStartShape"]=a,a._fireAndBubble(n.pointerdown,{evt:t,pointerId:o.id}),i=!0;var l=t.type.indexOf("touch")>=0;a.preventDefault()&&t.cancelable&&l&&t.preventDefault()}})),i||this._fire(n.pointerdown,{evt:t,target:this,currentTarget:this,pointerId:this._pointerPositions[0].id})}}},{key:"_pointermove",value:function(t){var e=this,n=K(t.type),r=W(t.type);if(n&&(_.DD.isDragging&&_.DD.node.preventDefault()&&t.cancelable&&t.preventDefault(),this.setPointersPositions(t),!_.DD.isDragging||m.Konva.hitOnDragEnabled)){var i={},o=!1,a=this._getTargetShape(r);this._changedPointerPositions.forEach((function(l){var s=w.getCapturedShape(l.id)||e.getIntersection(l),u=l.id,c={evt:t,pointerId:u},f=a!==s;if(f&&a&&(a._fireAndBubble(n.pointerout,Object.assign({},c),s),a._fireAndBubble(n.pointerleave,Object.assign({},c),s)),s){if(i[s._id])return;i[s._id]=!0}s&&s.isListening()?(o=!0,f&&(s._fireAndBubble(n.pointerover,Object.assign({},c),a),s._fireAndBubble(n.pointerenter,Object.assign({},c),a),e[r+"targetShape"]=s),s._fireAndBubble(n.pointermove,Object.assign({},c))):a&&(e._fire(n.pointerover,{evt:t,target:e,currentTarget:e,pointerId:u}),e[r+"targetShape"]=null)})),o||this._fire(n.pointermove,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id})}}},{key:"_pointerup",value:function(t){var e=this,n=K(t.type),r=W(t.type);if(n){this.setPointersPositions(t);var i=this[r+"ClickStartShape"],o=this[r+"ClickEndShape"],a={},l=!1;this._changedPointerPositions.forEach((function(s){var u=w.getCapturedShape(s.id)||e.getIntersection(s);if(u){if(u.releaseCapture(s.id),a[u._id])return;a[u._id]=!0}var c=s.id,f={evt:t,pointerId:c},h=!1;m.Konva["_"+r+"InDblClickWindow"]?(h=!0,clearTimeout(e[r+"DblTimeout"])):_.DD.justDragged||(m.Konva["_"+r+"InDblClickWindow"]=!0,clearTimeout(e[r+"DblTimeout"])),e[r+"DblTimeout"]=setTimeout((function(){m.Konva["_"+r+"InDblClickWindow"]=!1}),m.Konva.dblClickWindow),u&&u.isListening()?(l=!0,e[r+"ClickEndShape"]=u,u._fireAndBubble(n.pointerup,Object.assign({},f)),m.Konva["_"+r+"ListenClick"]&&i&&i===u&&(u._fireAndBubble(n.pointerclick,Object.assign({},f)),h&&o&&o===u&&u._fireAndBubble(n.pointerdblclick,Object.assign({},f)))):(e[r+"ClickEndShape"]=null,m.Konva["_"+r+"ListenClick"]&&e._fire(n.pointerclick,{evt:t,target:e,currentTarget:e,pointerId:c}),h&&e._fire(n.pointerdblclick,{evt:t,target:e,currentTarget:e,pointerId:c}))})),l||this._fire(n.pointerup,{evt:t,target:this,currentTarget:this,pointerId:this._changedPointerPositions[0].id}),m.Konva["_"+r+"ListenClick"]=!1,t.cancelable&&"touch"!==r&&t.preventDefault()}}},{key:"_contextmenu",value:function(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(I,{evt:t}):this._fire(I,{evt:t,target:this,currentTarget:this})}},{key:"_wheel",value:function(t){this.setPointersPositions(t);var e=this.getIntersection(this.getPointerPosition());e&&e.isListening()?e._fireAndBubble(B,{evt:t}):this._fire(B,{evt:t,target:this,currentTarget:this})}},{key:"_pointercancel",value:function(t){this.setPointersPositions(t);var e=w.getCapturedShape(t.pointerId)||this.getIntersection(this.getPointerPosition());e&&e._fireAndBubble(j,w.createEvent(t)),w.releaseCapture(t.pointerId)}},{key:"_lostpointercapture",value:function(t){w.releaseCapture(t.pointerId)}},{key:"setPointersPositions",value:function(t){var e=this,n=this._getContentPosition(),r=null,i=null;void 0!==(t=t||window.event).touches?(this._pointerPositions=[],this._changedPointerPositions=[],Array.prototype.forEach.call(t.touches,(function(t){e._pointerPositions.push({id:t.identifier,x:(t.clientX-n.left)/n.scaleX,y:(t.clientY-n.top)/n.scaleY})})),Array.prototype.forEach.call(t.changedTouches||t.touches,(function(t){e._changedPointerPositions.push({id:t.identifier,x:(t.clientX-n.left)/n.scaleX,y:(t.clientY-n.top)/n.scaleY})}))):(r=(t.clientX-n.left)/n.scaleX,i=(t.clientY-n.top)/n.scaleY,this.pointerPos={x:r,y:i},this._pointerPositions=[{x:r,y:i,id:y.Util._getFirstPointerId(t)}],this._changedPointerPositions=[{x:r,y:i,id:y.Util._getFirstPointerId(t)}])}},{key:"_setPointerPosition",value:function(t){y.Util.warn('Method _setPointerPosition is deprecated. Use "stage.setPointersPositions(event)" instead.'),this.setPointersPositions(t)}},{key:"_getContentPosition",value:function(){if(!this.content||!this.content.getBoundingClientRect)return{top:0,left:0,scaleX:1,scaleY:1};var t=this.content.getBoundingClientRect();return{top:t.top,left:t.left,scaleX:t.width/this.content.clientWidth||1,scaleY:t.height/this.content.clientHeight||1}}},{key:"_buildDOM",value:function(){if(this.bufferCanvas=new b.SceneCanvas({width:this.width(),height:this.height()}),this.bufferHitCanvas=new b.HitCanvas({pixelRatio:1,width:this.width(),height:this.height()}),m.Konva.isBrowser){var 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()}}},{key:"cache",value:function(){return y.Util.warn("Cache function is not allowed for stage. You may use cache only for layers, groups and shapes."),this}},{key:"clearCache",value:function(){return this}},{key:"batchDraw",value:function(){return this.getChildren().forEach((function(t){t.batchDraw()})),this}}],r&&s(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),p}(g.Container);e.Stage=q,q.prototype.nodeType="Stage",(0,S._registerNode)(q),v.Factory.addGetterSetter(q,"container")},5053:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}Object.defineProperty(e,"__esModule",{value:!0}),e.Easings=e.Tween=void 0;var l=n(773),s=n(9326),u=n(6673),c=n(867),f={node:1,duration:1,easing:1,onFinish:1,yoyo:1},h=0,d=["fill","stroke","shadowColor"],p=function(){function t(e,n,r,o,a,l,s){i(this,t),this.prop=e,this.propFunc=n,this.begin=o,this._pos=o,this.duration=l,this._change=0,this.prevPos=0,this.yoyo=s,this._time=0,this._position=0,this._startTime=0,this._finish=0,this.func=r,this._change=a-this.begin,this.pause()}return a(t,[{key:"fire",value:function(t){var e=this[t];e&&e()}},{key:"setTime",value:function(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())}},{key:"getTime",value:function(){return this._time}},{key:"setPosition",value:function(t){this.prevPos=this._pos,this.propFunc(t),this._pos=t}},{key:"getPosition",value:function(t){return void 0===t&&(t=this._time),this.func(t,this.begin,this._change,this.duration)}},{key:"play",value:function(){this.state=2,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onPlay")}},{key:"reverse",value:function(){this.state=3,this._time=this.duration-this._time,this._startTime=this.getTimer()-this._time,this.onEnterFrame(),this.fire("onReverse")}},{key:"seek",value:function(t){this.pause(),this._time=t,this.update(),this.fire("onSeek")}},{key:"reset",value:function(){this.pause(),this._time=0,this.update(),this.fire("onReset")}},{key:"finish",value:function(){this.pause(),this._time=this.duration,this.update(),this.fire("onFinish")}},{key:"update",value:function(){this.setPosition(this.getPosition(this._time)),this.fire("onUpdate")}},{key:"onEnterFrame",value:function(){var t=this.getTimer()-this._startTime;2===this.state?this.setTime(t):3===this.state&&this.setTime(this.duration-t)}},{key:"pause",value:function(){this.state=1,this.fire("onPause")}},{key:"getTimer",value:function(){return(new Date).getTime()}}]),t}(),y=function(){function t(n){i(this,t);var r,o,a=this,u=n.node,d=u._id,y=n.easing||e.Easings.Linear,v=!!n.yoyo;r=void 0===n.duration?.3:0===n.duration?.001:n.duration,this.node=u,this._id=h++;var g=u.getLayer()||(u instanceof c.Konva.Stage?u.getLayers():null);for(o in g||l.Util.error("Tween constructor have `node` that is not in a layer. Please add node into layer first."),this.anim=new s.Animation((function(){a.tween.onEnterFrame()}),g),this.tween=new p(o,(function(t){a._tweenFunc(t)}),y,0,1,1e3*r,v),this._addListeners(),t.attrs[d]||(t.attrs[d]={}),t.attrs[d][this._id]||(t.attrs[d][this._id]={}),t.tweens[d]||(t.tweens[d]={}),n)void 0===f[o]&&this._addAttr(o,n[o]);this.reset(),this.onFinish=n.onFinish,this.onReset=n.onReset,this.onUpdate=n.onUpdate}return a(t,[{key:"_addAttr",value:function(e,n){var r,i,o,a,s,u,c,f,h=this.node,p=h._id;if((o=t.tweens[p][e])&&delete t.attrs[p][o][e],r=h.getAttr(e),l.Util._isArray(n))if(i=[],s=Math.max(n.length,r.length),"points"===e&&n.length!==r.length&&(n.length>r.length?(c=r,r=l.Util._prepareArrayForTween(r,n,h.closed())):(u=n,n=l.Util._prepareArrayForTween(n,r,h.closed()))),0===e.indexOf("fill"))for(a=0;a<s;a++)if(a%2==0)i.push(n[a]-r[a]);else{var y=l.Util.colorToRGBA(r[a]);f=l.Util.colorToRGBA(n[a]),r[a]=y,i.push({r:f.r-y.r,g:f.g-y.g,b:f.b-y.b,a:f.a-y.a})}else for(a=0;a<s;a++)i.push(n[a]-r[a]);else-1!==d.indexOf(e)?(r=l.Util.colorToRGBA(r),i={r:(f=l.Util.colorToRGBA(n)).r-r.r,g:f.g-r.g,b:f.b-r.b,a:f.a-r.a}):i=n-r;t.attrs[p][this._id][e]={start:r,diff:i,end:n,trueEnd:u,trueStart:c},t.tweens[p][e]=this._id}},{key:"_tweenFunc",value:function(e){var n,r,i,o,a,s,u,c,f=this.node,h=t.attrs[f._id][this._id];for(n in h){if(i=(r=h[n]).start,o=r.diff,c=r.end,l.Util._isArray(i))if(a=[],u=Math.max(i.length,c.length),0===n.indexOf("fill"))for(s=0;s<u;s++)s%2==0?a.push((i[s]||0)+o[s]*e):a.push("rgba("+Math.round(i[s].r+o[s].r*e)+","+Math.round(i[s].g+o[s].g*e)+","+Math.round(i[s].b+o[s].b*e)+","+(i[s].a+o[s].a*e)+")");else for(s=0;s<u;s++)a.push((i[s]||0)+o[s]*e);else a=-1!==d.indexOf(n)?"rgba("+Math.round(i.r+o.r*e)+","+Math.round(i.g+o.g*e)+","+Math.round(i.b+o.b*e)+","+(i.a+o.a*e)+")":i+o*e;f.setAttr(n,a)}}},{key:"_addListeners",value:function(){var e=this;this.tween.onPlay=function(){e.anim.start()},this.tween.onReverse=function(){e.anim.start()},this.tween.onPause=function(){e.anim.stop()},this.tween.onFinish=function(){var n=e.node,r=t.attrs[n._id][e._id];r.points&&r.points.trueEnd&&n.setAttr("points",r.points.trueEnd),e.onFinish&&e.onFinish.call(e)},this.tween.onReset=function(){var n=e.node,r=t.attrs[n._id][e._id];r.points&&r.points.trueStart&&n.points(r.points.trueStart),e.onReset&&e.onReset()},this.tween.onUpdate=function(){e.onUpdate&&e.onUpdate.call(e)}}},{key:"play",value:function(){return this.tween.play(),this}},{key:"reverse",value:function(){return this.tween.reverse(),this}},{key:"reset",value:function(){return this.tween.reset(),this}},{key:"seek",value:function(t){return this.tween.seek(1e3*t),this}},{key:"pause",value:function(){return this.tween.pause(),this}},{key:"finish",value:function(){return this.tween.finish(),this}},{key:"destroy",value:function(){var e,n=this.node._id,r=this._id,i=t.tweens[n];for(e in this.pause(),i)delete t.tweens[n][e];delete t.attrs[n][r]}}]),t}();y.attrs={},y.tweens={},e.Tween=y,u.Node.prototype.to=function(t){var e=t.onFinish;t.node=this,t.onFinish=function(){this.destroy(),e&&e()},new y(t).play()},e.Easings={BackEaseIn:function(t,e,n,r){var i=1.70158;return n*(t/=r)*t*((i+1)*t-i)+e},BackEaseOut:function(t,e,n,r){var i=1.70158;return n*((t=t/r-1)*t*((i+1)*t+i)+1)+e},BackEaseInOut:function(t,e,n,r){var i=1.70158;return(t/=r/2)<1?n/2*(t*t*((1+(i*=1.525))*t-i))+e:n/2*((t-=2)*t*((1+(i*=1.525))*t+i)+2)+e},ElasticEaseIn:function(t,e,n,r,i,o){var a=0;return 0===t?e:1==(t/=r)?e+n:(o||(o=.3*r),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t*r-a)*(2*Math.PI)/o)+e)},ElasticEaseOut:function(t,e,n,r,i,o){var a=0;return 0===t?e:1==(t/=r)?e+n:(o||(o=.3*r),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),i*Math.pow(2,-10*t)*Math.sin((t*r-a)*(2*Math.PI)/o)+n+e)},ElasticEaseInOut:function(t,e,n,r,i,o){var a=0;return 0===t?e:2==(t/=r/2)?e+n:(o||(o=r*(.3*1.5)),!i||i<Math.abs(n)?(i=n,a=o/4):a=o/(2*Math.PI)*Math.asin(n/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t*r-a)*(2*Math.PI)/o)*-.5+e:i*Math.pow(2,-10*(t-=1))*Math.sin((t*r-a)*(2*Math.PI)/o)*.5+n+e)},BounceEaseOut:function(t,e,n,r){return(t/=r)<1/2.75?n*(7.5625*t*t)+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:function(t,n,r,i){return r-e.Easings.BounceEaseOut(i-t,0,r,i)+n},BounceEaseInOut:function(t,n,r,i){return 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:function(t,e,n,r){return n*(t/=r)*t+e},EaseOut:function(t,e,n,r){return-n*(t/=r)*(t-2)+e},EaseInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e},StrongEaseIn:function(t,e,n,r){return n*(t/=r)*t*t*t*t+e},StrongEaseOut:function(t,e,n,r){return n*((t=t/r-1)*t*t*t*t+1)+e},StrongEaseInOut:function(t,e,n,r){return(t/=r/2)<1?n/2*t*t*t*t*t+e:n/2*((t-=2)*t*t*t*t+2)+e},Linear:function(t,e,n,r){return n*t/r+e}}},773:(t,e,n)=>{"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===i(o)?o:String(o)),r)}var o}Object.defineProperty(e,"__esModule",{value:!0}),e.Util=e.Transform=void 0;var a=n(867),l=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[1,0,0,1,0,0];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.dirty=!1,this.m=e&&e.slice()||[1,0,0,1,0,0]}var n,r;return n=t,(r=[{key:"reset",value:function(){this.m[0]=1,this.m[1]=0,this.m[2]=0,this.m[3]=1,this.m[4]=0,this.m[5]=0}},{key:"copy",value:function(){return new t(this.m)}},{key:"copyInto",value:function(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]}},{key:"point",value:function(t){var 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]}}},{key:"translate",value:function(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}},{key:"scale",value:function(t,e){return this.m[0]*=t,this.m[1]*=t,this.m[2]*=e,this.m[3]*=e,this}},{key:"rotate",value:function(t){var 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,o=this.m[0]*-n+this.m[2]*e,a=this.m[1]*-n+this.m[3]*e;return this.m[0]=r,this.m[1]=i,this.m[2]=o,this.m[3]=a,this}},{key:"getTranslation",value:function(){return{x:this.m[4],y:this.m[5]}}},{key:"skew",value:function(t,e){var n=this.m[0]+this.m[2]*e,r=this.m[1]+this.m[3]*e,i=this.m[2]+this.m[0]*t,o=this.m[3]+this.m[1]*t;return this.m[0]=n,this.m[1]=r,this.m[2]=i,this.m[3]=o,this}},{key:"multiply",value:function(t){var 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],o=this.m[0]*t.m[4]+this.m[2]*t.m[5]+this.m[4],a=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]=o,this.m[5]=a,this}},{key:"invert",value:function(){var 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,o=t*(this.m[2]*this.m[5]-this.m[3]*this.m[4]),a=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]=o,this.m[5]=a,this}},{key:"getMatrix",value:function(){return this.m}},{key:"decompose",value:function(){var t=this.m[0],n=this.m[1],r=this.m[2],i=this.m[3],o=t*i-n*r,a={x:this.m[4],y:this.m[5],rotation:0,scaleX:0,scaleY:0,skewX:0,skewY:0};if(0!=t||0!=n){var l=Math.sqrt(t*t+n*n);a.rotation=n>0?Math.acos(t/l):-Math.acos(t/l),a.scaleX=l,a.scaleY=o/l,a.skewX=(t*r+n*i)/o,a.skewY=0}else if(0!=r||0!=i){var s=Math.sqrt(r*r+i*i);a.rotation=Math.PI/2-(i>0?Math.acos(-r/s):-Math.acos(r/s)),a.scaleX=o/s,a.scaleY=s,a.skewX=0,a.skewY=(t*r+n*i)/o}return a.rotation=e.Util._getRotation(a.rotation),a}}])&&o(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();e.Transform=l;var s=Math.PI/180,u=180/Math.PI,c="Konva error: ",f={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],olive:[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})\)/,d=[],p="undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||function(t){setTimeout(t,60)};e.Util={_isElement:function(t){return!(!t||1!=t.nodeType)},_isFunction:function(t){return!!(t&&t.constructor&&t.call&&t.apply)},_isPlainObject:function(t){return!!t&&t.constructor===Object},_isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},_isNumber:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&!isNaN(t)&&isFinite(t)},_isString:function(t){return"[object String]"===Object.prototype.toString.call(t)},_isBoolean:function(t){return"[object Boolean]"===Object.prototype.toString.call(t)},isObject:function(t){return t instanceof Object},isValidSelector:function(t){if("string"!=typeof t)return!1;var e=t[0];return"#"===e||"."===e||e===e.toUpperCase()},_sign:function(t){return 0===t||t>0?1:-1},requestAnimFrame:function(t){d.push(t),1===d.length&&p((function(){var t=d;d=[],t.forEach((function(t){t()}))}))},createCanvasElement:function(){var t=document.createElement("canvas");try{t.style=t.style||{}}catch(t){}return t},createImageElement:function(){return document.createElement("img")},_isInDocument:function(t){for(;t=t.parentNode;)if(t==document)return!0;return!1},_urlToImage:function(t,n){var r=e.Util.createImageElement();r.onload=function(){n(r)},r.src=t},_rgbToHex:function(t,e,n){return((1<<24)+(t<<16)+(e<<8)+n).toString(16).slice(1)},_hexToRgb:function(t){t=t.replace("#","");var e=parseInt(t,16);return{r:e>>16&255,g:e>>8&255,b:255&e}},getRandomColor:function(){for(var t=(16777215*Math.random()<<0).toString(16);t.length<6;)t="0"+t;return"#"+t},getRGB:function(t){var e;return t in f?{r:(e=f[t])[0],g:e[1],b:e[2]}:"#"===t[0]?this._hexToRgb(t.substring(1)):"rgb("===t.substr(0,4)?(e=h.exec(t.replace(/ /g,"")),{r:parseInt(e[1],10),g:parseInt(e[2],10),b:parseInt(e[3],10)}):{r:0,g:0,b:0}},colorToRGBA:function(t){return 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:function(t){var e=f[t.toLowerCase()];return e?{r:e[0],g:e[1],b:e[2],a:1}:null},_rgbColorToRGBA:function(t){if(0===t.indexOf("rgb(")){var e=(t=t.match(/rgb\(([^)]+)\)/)[1]).split(/ *, */).map(Number);return{r:e[0],g:e[1],b:e[2],a:1}}},_rgbaColorToRGBA:function(t){if(0===t.indexOf("rgba(")){var e=(t=t.match(/rgba\(([^)]+)\)/)[1]).split(/ *, */).map((function(t,e){return"%"===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:function(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:function(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:function(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:function(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:function(t){if(/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.test(t)){var e,n,i,o=function(t){if(Array.isArray(t))return t}(d=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(t))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(d)||function(t,e){if(t){if("string"==typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=(o[0],o.slice(1)),l=Number(a[0])/360,s=Number(a[1])/100,u=Number(a[2])/100;if(0===s)return i=255*u,{r:Math.round(i),g:Math.round(i),b:Math.round(i),a:1};for(var c=2*u-(e=u<.5?u*(1+s):u+s-u*s),f=[0,0,0],h=0;h<3;h++)(n=l+1/3*-(h-1))<0&&n++,n>1&&n--,i=6*n<1?c+6*(e-c)*n:2*n<1?e:3*n<2?c+(e-c)*(2/3-n)*6:c,f[h]=255*i;return{r:Math.round(f[0]),g:Math.round(f[1]),b:Math.round(f[2]),a:1}}var d},haveIntersection:function(t,e){return!(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:function(t){var e={};for(var 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:function(t){return t.slice(0)},degToRad:function(t){return t*s},radToDeg:function(t){return t*u},_degToRad:function(t){return e.Util.warn("Util._degToRad is removed. Please use public Util.degToRad instead."),e.Util.degToRad(t)},_radToDeg:function(t){return e.Util.warn("Util._radToDeg is removed. Please use public Util.radToDeg instead."),e.Util.radToDeg(t)},_getRotation:function(t){return a.Konva.angleDeg?e.Util.radToDeg(t):t},_capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},throw:function(t){throw new Error(c+t)},error:function(t){console.error(c+t)},warn:function(t){a.Konva.showWarnings&&console.warn("Konva warning: "+t)},each:function(t,e){for(var n in t)e(n,t[n])},_inRange:function(t,e,n){return e<=t&&t<n},_getProjectionToSegment:function(t,e,n,r,i,o){var a,l,s,u=(t-n)*(t-n)+(e-r)*(e-r);if(0==u)a=t,l=e,s=(i-n)*(i-n)+(o-r)*(o-r);else{var c=((i-t)*(n-t)+(o-e)*(r-e))/u;c<0?(a=t,l=e,s=(t-i)*(t-i)+(e-o)*(e-o)):c>1?(a=n,l=r,s=(n-i)*(n-i)+(r-o)*(r-o)):s=((a=t+c*(n-t))-i)*(a-i)+((l=e+c*(r-e))-o)*(l-o)}return[a,l,s]},_getProjectionToLine:function(t,n,r){var i=e.Util.cloneObject(t),o=Number.MAX_VALUE;return n.forEach((function(a,l){if(r||l!==n.length-1){var s=n[(l+1)%n.length],u=e.Util._getProjectionToSegment(a.x,a.y,s.x,s.y,t.x,t.y),c=u[0],f=u[1],h=u[2];h<o&&(i.x=c,i.y=f,o=h)}})),i},_prepareArrayForTween:function(t,n,r){var i,o=[],a=[];if(t.length>n.length){var l=n;n=t,t=l}for(i=0;i<t.length;i+=2)o.push({x:t[i],y:t[i+1]});for(i=0;i<n.length;i+=2)a.push({x:n[i],y:n[i+1]});var s=[];return a.forEach((function(t){var n=e.Util._getProjectionToLine(t,o,r);s.push(n.x),s.push(n.y)})),s},_prepareToStringify:function(t){var n;for(var r in t.visitedByCircularReferenceRemoval=!0,t)if(t.hasOwnProperty(r)&&t[r]&&"object"==i(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:function(t,e){for(var n in e)t[n]=e[n];return t},_getFirstPointerId:function(t){return t.touches?t.changedTouches[0].identifier:t.pointerId||999},releaseCanvas:function(){if(a.Konva.releaseCanvasOnDestroy){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach((function(t){t.width=0,t.height=0}))}},drawRoundedRectPath:function(t,e,n,r){var i=0,o=0,a=0,l=0;"number"==typeof r?i=o=a=l=Math.min(r,e/2,n/2):(i=Math.min(r[0]||0,e/2,n/2),o=Math.min(r[1]||0,e/2,n/2),l=Math.min(r[2]||0,e/2,n/2),a=Math.min(r[3]||0,e/2,n/2)),t.moveTo(i,0),t.lineTo(e-o,0),t.arc(e-o,o,o,3*Math.PI/2,0,!1),t.lineTo(e,n-l),t.arc(e-l,n-l,l,0,Math.PI/2,!1),t.lineTo(a,n),t.arc(a,n-a,a,Math.PI/2,Math.PI,!1),t.lineTo(0,i),t.arc(i,i,i,Math.PI,3*Math.PI/2,!1)}}},6836:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getComponentValidator=e.getBooleanValidator=e.getNumberArrayValidator=e.getFunctionValidator=e.getStringOrGradientValidator=e.getStringValidator=e.getNumberOrAutoValidator=e.getNumberOrArrayOfNumbersValidator=e.getNumberValidator=e.alphaComponent=e.RGBComponent=void 0;var r=n(867),i=n(773);function o(t){return i.Util._isString(t)?'"'+t+'"':"[object Number]"===Object.prototype.toString.call(t)||i.Util._isBoolean(t)?t:Object.prototype.toString.call(t)}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(o(t)+' is a not valid value for "'+e+'" attribute. The value should be a number.'),t}},e.getNumberOrArrayOfNumbersValidator=function(t){if(r.Konva.isUnminified)return function(e,n){var r=i.Util._isNumber(e),a=i.Util._isArray(e)&&e.length==t;return r||a||i.Util.warn(o(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){return i.Util._isNumber(t)||"auto"===t||i.Util.warn(o(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(o(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){var n=i.Util._isString(t),r="[object CanvasGradient]"===Object.prototype.toString.call(t)||t&&t.addColorStop;return n||r||i.Util.warn(o(t)+' is a not valid 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(o(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){var 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(o(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(o(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(o(e)+' is a not valid value for "'+n+'" attribute. The value should be an object with properties '+t),e}}},2056:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;var r=n(867),i=n(773),o=n(6673),a=n(8842),l=n(1532),s=n(7728),u=n(5117),c=n(8873),f=n(2208),h=n(7427),d=n(9326),p=n(5053),y=n(666),v=n(3473);e.Konva=i.Util._assign(r.Konva,{Util:i.Util,Transform:i.Transform,Node:o.Node,Container:a.Container,Stage:l.Stage,stages:l.stages,Layer:s.Layer,FastLayer:u.FastLayer,Group:c.Group,DD:f.DD,Shape:h.Shape,shapes:h.shapes,Animation:d.Animation,Tween:p.Tween,Easings:p.Easings,Context:y.Context,Canvas:v.Canvas}),e.default=e.Konva},2061:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Konva=void 0;var r=n(2056),i=n(9486),o=n(1605),a=n(3457),l=n(9944),s=n(8359),u=n(9887),c=n(2046),f=n(9795),h=n(7725),d=n(8076),p=n(5304),y=n(6247),v=n(6251),g=n(1896),m=n(6262),b=n(7811),_=n(8334),S=n(7642),w=n(8387),k=n(1891),x=n(3747),P=n(2805),C=n(7156),O=n(2145),T=n(5089),E=n(6474),R=n(4213),j=n(7747),A=n(7546),M=n(7948),N=n(3113),F=n(2042),D=n(2409),I=n(9820),L=n(7414),G=n(5403);e.Konva=r.Konva.Util._assign(r.Konva,{Arc:i.Arc,Arrow:o.Arrow,Circle:a.Circle,Ellipse:l.Ellipse,Image:s.Image,Label:u.Label,Tag:u.Tag,Line:c.Line,Path:f.Path,Rect:h.Rect,RegularPolygon:d.RegularPolygon,Ring:p.Ring,Sprite:y.Sprite,Star:v.Star,Text:g.Text,TextPath:m.TextPath,Transformer:b.Transformer,Wedge:_.Wedge,Filters:{Blur:S.Blur,Brighten:w.Brighten,Contrast:k.Contrast,Emboss:x.Emboss,Enhance:P.Enhance,Grayscale:C.Grayscale,HSL:O.HSL,HSV:T.HSV,Invert:E.Invert,Kaleidoscope:R.Kaleidoscope,Mask:j.Mask,Noise:A.Noise,Pixelate:M.Pixelate,Posterize:N.Posterize,RGB:F.RGB,RGBA:D.RGBA,Sepia:I.Sepia,Solarize:L.Solarize,Threshold:G.Threshold}})},7642:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Blur=void 0;var r=n(6473),i=n(6673),o=n(6836);function a(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}var l=[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,396,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],s=[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){var e=Math.round(this.blurRadius());e>0&&function(t,e){var n,r,i,o,u,c,f,h,d,p,y,v,g,m,b,_,S,w,k,x,P,C,O,T,E=t.data,R=t.width,j=t.height,A=e+e+1,M=R-1,N=j-1,F=e+1,D=F*(F+1)/2,I=new a,L=null,G=I,z=null,U=null,B=l[e],H=s[e];for(i=1;i<A;i++)G=G.next=new a,i===F&&(L=G);for(G.next=I,f=c=0,r=0;r<j;r++){for(_=S=w=k=h=d=p=y=0,v=F*(x=E[c]),g=F*(P=E[c+1]),m=F*(C=E[c+2]),b=F*(O=E[c+3]),h+=D*x,d+=D*P,p+=D*C,y+=D*O,G=I,i=0;i<F;i++)G.r=x,G.g=P,G.b=C,G.a=O,G=G.next;for(i=1;i<F;i++)o=c+((M<i?M:i)<<2),h+=(G.r=x=E[o])*(T=F-i),d+=(G.g=P=E[o+1])*T,p+=(G.b=C=E[o+2])*T,y+=(G.a=O=E[o+3])*T,_+=x,S+=P,w+=C,k+=O,G=G.next;for(z=I,U=L,n=0;n<R;n++)E[c+3]=O=y*B>>H,0!==O?(O=255/O,E[c]=(h*B>>H)*O,E[c+1]=(d*B>>H)*O,E[c+2]=(p*B>>H)*O):E[c]=E[c+1]=E[c+2]=0,h-=v,d-=g,p-=m,y-=b,v-=z.r,g-=z.g,m-=z.b,b-=z.a,o=f+((o=n+e+1)<M?o:M)<<2,h+=_+=z.r=E[o],d+=S+=z.g=E[o+1],p+=w+=z.b=E[o+2],y+=k+=z.a=E[o+3],z=z.next,v+=x=U.r,g+=P=U.g,m+=C=U.b,b+=O=U.a,_-=x,S-=P,w-=C,k-=O,U=U.next,c+=4;f+=R}for(n=0;n<R;n++){for(S=w=k=_=d=p=y=h=0,v=F*(x=E[c=n<<2]),g=F*(P=E[c+1]),m=F*(C=E[c+2]),b=F*(O=E[c+3]),h+=D*x,d+=D*P,p+=D*C,y+=D*O,G=I,i=0;i<F;i++)G.r=x,G.g=P,G.b=C,G.a=O,G=G.next;for(u=R,i=1;i<=e;i++)c=u+n<<2,h+=(G.r=x=E[c])*(T=F-i),d+=(G.g=P=E[c+1])*T,p+=(G.b=C=E[c+2])*T,y+=(G.a=O=E[c+3])*T,_+=x,S+=P,w+=C,k+=O,G=G.next,i<N&&(u+=R);for(c=n,z=I,U=L,r=0;r<j;r++)E[3+(o=c<<2)]=O=y*B>>H,O>0?(O=255/O,E[o]=(h*B>>H)*O,E[o+1]=(d*B>>H)*O,E[o+2]=(p*B>>H)*O):E[o]=E[o+1]=E[o+2]=0,h-=v,d-=g,p-=m,y-=b,v-=z.r,g-=z.g,m-=z.b,b-=z.a,o=n+((o=r+F)<N?o:N)*R<<2,h+=_+=z.r=E[o],d+=S+=z.g=E[o+1],p+=w+=z.b=E[o+2],y+=k+=z.a=E[o+3],z=z.next,v+=x=U.r,g+=P=U.g,m+=C=U.b,b+=O=U.a,_-=x,S-=P,w-=C,k-=O,U=U.next,c+=R}}(t,e)},r.Factory.addGetterSetter(i.Node,"blurRadius",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},8387:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Brighten=void 0;var r=n(6473),i=n(6673),o=n(6836);e.Brighten=function(t){var e,n=255*this.brightness(),r=t.data,i=r.length;for(e=0;e<i;e+=4)r[e]+=n,r[e+1]+=n,r[e+2]+=n},r.Factory.addGetterSetter(i.Node,"brightness",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},1891:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Contrast=void 0;var r=n(6473),i=n(6673),o=n(6836);e.Contrast=function(t){var e,n=Math.pow((this.contrast()+100)/100,2),r=t.data,i=r.length,o=150,a=150,l=150;for(e=0;e<i;e+=4)o=r[e],a=r[e+1],l=r[e+2],o/=255,o-=.5,o*=n,o+=.5,a/=255,a-=.5,a*=n,a+=.5,l/=255,l-=.5,l*=n,l+=.5,o=(o*=255)<0?0:o>255?255:o,a=(a*=255)<0?0:a>255?255:a,l=(l*=255)<0?0:l>255?255:l,r[e]=o,r[e+1]=a,r[e+2]=l},r.Factory.addGetterSetter(i.Node,"contrast",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},3747:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emboss=void 0;var r=n(6473),i=n(6673),o=n(773),a=n(6836);e.Emboss=function(t){var e=10*this.embossStrength(),n=255*this.embossWhiteLevel(),r=this.embossDirection(),i=this.embossBlend(),a=0,l=0,s=t.data,u=t.width,c=t.height,f=4*u,h=c;switch(r){case"top-left":a=-1,l=-1;break;case"top":a=-1,l=0;break;case"top-right":a=-1,l=1;break;case"right":a=0,l=1;break;case"bottom-right":a=1,l=1;break;case"bottom":a=1,l=0;break;case"bottom-left":a=1,l=-1;break;case"left":a=0,l=-1;break;default:o.Util.error("Unknown emboss direction: "+r)}do{var d=(h-1)*f,p=a;h+p<1&&(p=0),h+p>c&&(p=0);var y=(h-1+p)*u*4,v=u;do{var g=d+4*(v-1),m=l;v+m<1&&(m=0),v+m>u&&(m=0);var b=y+4*(v-1+m),_=s[g]-s[b],S=s[g+1]-s[b+1],w=s[g+2]-s[b+2],k=_,x=k>0?k:-k;if((S>0?S:-S)>x&&(k=S),(w>0?w:-w)>x&&(k=w),k*=e,i){var P=s[g]+k,C=s[g+1]+k,O=s[g+2]+k;s[g]=P>255?255:P<0?0:P,s[g+1]=C>255?255:C<0?0:C,s[g+2]=O>255?255:O<0?0:O}else{var T=n-k;T<0?T=0:T>255&&(T=255),s[g]=s[g+1]=s[g+2]=T}}while(--v)}while(--h)},r.Factory.addGetterSetter(i.Node,"embossStrength",.5,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossWhiteLevel",.5,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossDirection","top-left",null,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"embossBlend",!1,null,r.Factory.afterSetFilter)},2805:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Enhance=void 0;var r=n(6473),i=n(6673),o=n(6836);function a(t,e,n,r,i){var o=n-e,a=i-r;return 0===o?r+a/2:0===a?r:a*((t-e)/o)+r}e.Enhance=function(t){var e,n,r,i,o=t.data,l=o.length,s=o[0],u=s,c=o[1],f=c,h=o[2],d=h,p=this.enhance();if(0!==p){for(i=0;i<l;i+=4)(e=o[i+0])<s?s=e:e>u&&(u=e),(n=o[i+1])<c?c=n:n>f&&(f=n),(r=o[i+2])<h?h=r:r>d&&(d=r);var y,v,g,m,b,_,S,w,k;for(u===s&&(u=255,s=0),f===c&&(f=255,c=0),d===h&&(d=255,h=0),p>0?(v=u+p*(255-u),g=s-p*(s-0),b=f+p*(255-f),_=c-p*(c-0),w=d+p*(255-d),k=h-p*(h-0)):(v=u+p*(u-(y=.5*(u+s))),g=s+p*(s-y),b=f+p*(f-(m=.5*(f+c))),_=c+p*(c-m),w=d+p*(d-(S=.5*(d+h))),k=h+p*(h-S)),i=0;i<l;i+=4)o[i+0]=a(o[i+0],s,u,g,v),o[i+1]=a(o[i+1],c,f,_,b),o[i+2]=a(o[i+2],h,d,k,w)}},r.Factory.addGetterSetter(i.Node,"enhance",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},7156:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Grayscale=void 0,e.Grayscale=function(t){var e,n,r=t.data,i=r.length;for(e=0;e<i;e+=4)n=.34*r[e]+.5*r[e+1]+.16*r[e+2],r[e]=n,r[e+1]=n,r[e+2]=n}},2145:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HSL=void 0;var r=n(6473),i=n(6673),o=n(6836);r.Factory.addGetterSetter(i.Node,"hue",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"saturation",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"luminance",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),e.HSL=function(t){var e,n,r,i,o,a=t.data,l=a.length,s=Math.pow(2,this.saturation()),u=Math.abs(this.hue()+360)%360,c=127*this.luminance(),f=1*s*Math.cos(u*Math.PI/180),h=1*s*Math.sin(u*Math.PI/180),d=.299+.701*f+.167*h,p=.587-.587*f+.33*h,y=.114-.114*f-.497*h,v=.299-.299*f-.328*h,g=.587+.413*f+.035*h,m=.114-.114*f+.293*h,b=.299-.3*f+1.25*h,_=.587-.586*f-1.05*h,S=.114+.886*f-.2*h;for(e=0;e<l;e+=4)n=a[e+0],r=a[e+1],i=a[e+2],o=a[e+3],a[e+0]=d*n+p*r+y*i+c,a[e+1]=v*n+g*r+m*i+c,a[e+2]=b*n+_*r+S*i+c,a[e+3]=o}},5089:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HSV=void 0;var r=n(6473),i=n(6673),o=n(6836);e.HSV=function(t){var e,n,r,i,o,a=t.data,l=a.length,s=Math.pow(2,this.value()),u=Math.pow(2,this.saturation()),c=Math.abs(this.hue()+360)%360,f=s*u*Math.cos(c*Math.PI/180),h=s*u*Math.sin(c*Math.PI/180),d=.299*s+.701*f+.167*h,p=.587*s-.587*f+.33*h,y=.114*s-.114*f-.497*h,v=.299*s-.299*f-.328*h,g=.587*s+.413*f+.035*h,m=.114*s-.114*f+.293*h,b=.299*s-.3*f+1.25*h,_=.587*s-.586*f-1.05*h,S=.114*s+.886*f-.2*h;for(e=0;e<l;e+=4)n=a[e+0],r=a[e+1],i=a[e+2],o=a[e+3],a[e+0]=d*n+p*r+y*i,a[e+1]=v*n+g*r+m*i,a[e+2]=b*n+_*r+S*i,a[e+3]=o},r.Factory.addGetterSetter(i.Node,"hue",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"saturation",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"value",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},6474:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Invert=void 0,e.Invert=function(t){var e,n=t.data,r=n.length;for(e=0;e<r;e+=4)n[e]=255-n[e],n[e+1]=255-n[e+1],n[e+2]=255-n[e+2]}},4213:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Kaleidoscope=void 0;var r=n(6473),i=n(6673),o=n(773),a=n(6836);e.Kaleidoscope=function(t){var e,n,r,i,a,l,s,u,c,f=t.width,h=t.height,d=Math.round(this.kaleidoscopePower()),p=Math.round(this.kaleidoscopeAngle()),y=Math.floor(f*(p%360)/360);if(!(d<1)){var v=o.Util.createCanvasElement();v.width=f,v.height=h;var g=v.getContext("2d").getImageData(0,0,f,h);o.Util.releaseCanvas(v),function(t,e,n){var r,i,o,a,l=t.data,s=e.data,u=t.width,c=t.height,f=n.polarCenterX||u/2,h=n.polarCenterY||c/2,d=0,p=0,y=0,v=0,g=Math.sqrt(f*f+h*h);i=u-f,o=c-h,g=(a=Math.sqrt(i*i+o*o))>g?a:g;var m,b,_,S,w=c,k=u,x=360/k*Math.PI/180;for(b=0;b<k;b+=1)for(_=Math.sin(b*x),S=Math.cos(b*x),m=0;m<w;m+=1)i=Math.floor(f+g*m/w*S),d=l[0+(r=4*((o=Math.floor(h+g*m/w*_))*u+i))],p=l[r+1],y=l[r+2],v=l[r+3],s[0+(r=4*(b+m*u))]=d,s[r+1]=p,s[r+2]=y,s[r+3]=v}(t,g,{polarCenterX:f/2,polarCenterY:h/2});for(var m=f/Math.pow(2,d);m<=8;)m*=2,d-=1;var b=m=Math.ceil(m),_=0,S=b,w=1;for(y+m>f&&(_=b,S=0,w=-1),n=0;n<h;n+=1)for(e=_;e!==S;e+=w)u=4*(f*n+Math.round(e+y)%f),i=g.data[u+0],a=g.data[u+1],l=g.data[u+2],s=g.data[u+3],c=4*(f*n+e),g.data[c+0]=i,g.data[c+1]=a,g.data[c+2]=l,g.data[c+3]=s;for(n=0;n<h;n+=1)for(b=Math.floor(m),r=0;r<d;r+=1){for(e=0;e<b+1;e+=1)u=4*(f*n+e),i=g.data[u+0],a=g.data[u+1],l=g.data[u+2],s=g.data[u+3],c=4*(f*n+2*b-e-1),g.data[c+0]=i,g.data[c+1]=a,g.data[c+2]=l,g.data[c+3]=s;b*=2}!function(t,e,n){var r,i,o,a,l,s,u=t.data,c=e.data,f=t.width,h=t.height,d=n.polarCenterX||f/2,p=n.polarCenterY||h/2,y=0,v=0,g=0,m=0,b=Math.sqrt(d*d+p*p);i=f-d,o=h-p,b=(s=Math.sqrt(i*i+o*o))>b?s:b;var _,S,w,k=h,x=f,P=n.polarRotation||0;for(i=0;i<f;i+=1)for(o=0;o<h;o+=1)a=i-d,l=o-p,_=Math.sqrt(a*a+l*l)*k/b,S=(S=(180*Math.atan2(l,a)/Math.PI+360+P)%360)*x/360,w=Math.floor(S),y=u[0+(r=4*(Math.floor(_)*f+w))],v=u[r+1],g=u[r+2],m=u[r+3],c[0+(r=4*(o*f+i))]=y,c[r+1]=v,c[r+2]=g,c[r+3]=m}(g,t,{polarRotation:0})}},r.Factory.addGetterSetter(i.Node,"kaleidoscopePower",2,(0,a.getNumberValidator)(),r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"kaleidoscopeAngle",0,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},7747:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Mask=void 0;var r=n(6473),i=n(6673),o=n(6836);function a(t,e,n){var r=4*(n*t.width+e),i=[];return i.push(t.data[r++],t.data[r++],t.data[r++],t.data[r++]),i}function l(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){var e=function(t,e){var n=a(t,0,0),r=a(t,t.width-1,0),i=a(t,0,t.height-1),o=a(t,t.width-1,t.height-1),s=e||10;if(l(n,r)<s&&l(r,o)<s&&l(o,i)<s&&l(i,n)<s){for(var u=function(t){for(var e=[0,0,0],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,o,i]),c=[],f=0;f<t.width*t.height;f++){var h=l(u,[t.data[4*f],t.data[4*f+1],t.data[4*f+2]]);c[f]=h<s?0:255}return c}}(t,this.threshold());return e&&function(t,e){for(var n=0;n<t.width*t.height;n++)t.data[4*n+3]=e[n]}(t,e=function(t,e,n){for(var 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)),o=Math.floor(i/2),a=[],l=0;l<n;l++)for(var s=0;s<e;s++){for(var u=l*e+s,c=0,f=0;f<i;f++)for(var h=0;h<i;h++){var d=l+f-o,p=s+h-o;if(d>=0&&d<n&&p>=0&&p<e){var y=r[f*i+h];c+=t[d*e+p]*y}}a[u]=c}return a}(e=function(t,e,n){for(var r=[1,1,1,1,1,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],l=0;l<n;l++)for(var s=0;s<e;s++){for(var u=l*e+s,c=0,f=0;f<i;f++)for(var h=0;h<i;h++){var d=l+f-o,p=s+h-o;if(d>=0&&d<n&&p>=0&&p<e){var y=r[f*i+h];c+=t[d*e+p]*y}}a[u]=c>=1020?255:0}return a}(e=function(t,e,n){for(var r=[1,1,1,1,0,1,1,1,1],i=Math.round(Math.sqrt(r.length)),o=Math.floor(i/2),a=[],l=0;l<n;l++)for(var s=0;s<e;s++){for(var u=l*e+s,c=0,f=0;f<i;f++)for(var h=0;h<i;h++){var d=l+f-o,p=s+h-o;if(d>=0&&d<n&&p>=0&&p<e){var y=r[f*i+h];c+=t[d*e+p]*y}}a[u]=2040===c?255:0}return a}(e,t.width,t.height),t.width,t.height),t.width,t.height)),t},r.Factory.addGetterSetter(i.Node,"threshold",0,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},7546:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Noise=void 0;var r=n(6473),i=n(6673),o=n(6836);e.Noise=function(t){var e,n=255*this.noise(),r=t.data,i=r.length,o=n/2;for(e=0;e<i;e+=4)r[e+0]+=o-2*o*Math.random(),r[e+1]+=o-2*o*Math.random(),r[e+2]+=o-2*o*Math.random()},r.Factory.addGetterSetter(i.Node,"noise",.2,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},7948:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Pixelate=void 0;var r=n(6473),i=n(773),o=n(6673),a=n(6836);e.Pixelate=function(t){var e,n,r,o,a,l,s,u,c,f,h,d,p,y,v=Math.ceil(this.pixelSize()),g=t.width,m=t.height,b=Math.ceil(g/v),_=Math.ceil(m/v),S=t.data;if(v<=0)i.Util.error("pixelSize value can not be <= 0");else for(d=0;d<b;d+=1)for(p=0;p<_;p+=1){for(o=0,a=0,l=0,s=0,c=(u=d*v)+v,h=(f=p*v)+v,y=0,e=u;e<c;e+=1)if(!(e>=g))for(n=f;n<h;n+=1)n>=m||(o+=S[0+(r=4*(g*n+e))],a+=S[r+1],l+=S[r+2],s+=S[r+3],y+=1);for(o/=y,a/=y,l/=y,s/=y,e=u;e<c;e+=1)if(!(e>=g))for(n=f;n<h;n+=1)n>=m||(S[0+(r=4*(g*n+e))]=o,S[r+1]=a,S[r+2]=l,S[r+3]=s)}},r.Factory.addGetterSetter(o.Node,"pixelSize",8,(0,a.getNumberValidator)(),r.Factory.afterSetFilter)},3113:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Posterize=void 0;var r=n(6473),i=n(6673),o=n(6836);e.Posterize=function(t){var e,n=Math.round(254*this.levels())+1,r=t.data,i=r.length,o=255/n;for(e=0;e<i;e+=1)r[e]=Math.floor(r[e]/o)*o},r.Factory.addGetterSetter(i.Node,"levels",.5,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},2042:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGB=void 0;var r=n(6473),i=n(6673),o=n(6836);e.RGB=function(t){var e,n,r=t.data,i=r.length,o=this.red(),a=this.green(),l=this.blue();for(e=0;e<i;e+=4)n=(.34*r[e]+.5*r[e+1]+.16*r[e+2])/255,r[e]=n*o,r[e+1]=n*a,r[e+2]=n*l,r[e+3]=r[e+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,o.RGBComponent,r.Factory.afterSetFilter)},2409:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA=void 0;var r=n(6473),i=n(6673),o=n(6836);e.RGBA=function(t){var e,n,r=t.data,i=r.length,o=this.red(),a=this.green(),l=this.blue(),s=this.alpha();for(e=0;e<i;e+=4)n=1-s,r[e]=o*s+r[e]*n,r[e+1]=a*s+r[e+1]*n,r[e+2]=l*s+r[e+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,o.RGBComponent,r.Factory.afterSetFilter),r.Factory.addGetterSetter(i.Node,"alpha",1,(function(t){return this._filterUpToDate=!1,t>1?1:t<0?0:t}))},9820:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sepia=void 0,e.Sepia=function(t){var e,n,r,i,o=t.data,a=o.length;for(e=0;e<a;e+=4)n=o[e+0],r=o[e+1],i=o[e+2],o[e+0]=Math.min(255,.393*n+.769*r+.189*i),o[e+1]=Math.min(255,.349*n+.686*r+.168*i),o[e+2]=Math.min(255,.272*n+.534*r+.131*i)}},7414:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Solarize=void 0,e.Solarize=function(t){var e=t.data,n=t.width,r=4*n,i=t.height;do{var o=(i-1)*r,a=n;do{var l=o+4*(a-1),s=e[l],u=e[l+1],c=e[l+2];s>127&&(s=255-s),u>127&&(u=255-u),c>127&&(c=255-c),e[l]=s,e[l+1]=u,e[l+2]=c}while(--a)}while(--i)}},5403:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Threshold=void 0;var r=n(6473),i=n(6673),o=n(6836);e.Threshold=function(t){var e,n=255*this.threshold(),r=t.data,i=r.length;for(e=0;e<i;e+=1)r[e]=r[e]<n?0:255},r.Factory.addGetterSetter(i.Node,"threshold",.5,(0,o.getNumberValidator)(),r.Factory.afterSetFilter)},4015:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(2061);t.exports=r.Konva},9486:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Arc=void 0;var l=n(6473),s=n(7427),u=n(867),c=n(6836),f=n(867),h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(f,t);var e,n,l,s,c=(l=f,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(l);if(s){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),c.apply(this,arguments)}return e=f,(n=[{key:"_sceneFunc",value:function(t){var e=u.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)}},{key:"getWidth",value:function(){return 2*this.outerRadius()}},{key:"getHeight",value:function(){return 2*this.outerRadius()}},{key:"setWidth",value:function(t){this.outerRadius(t/2)}},{key:"setHeight",value:function(t){this.outerRadius(t/2)}},{key:"getSelfRect",value:function(){var t=this.innerRadius(),e=this.outerRadius(),n=this.clockwise(),r=u.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)),a=Math.sin(Math.min(r,Math.PI/2)),l=i*(i>0?t:e),s=o*(o>0?t:e),c=a*(a>0?e:t);return{x:l,y:n?-1*c:s,width:1*e-l,height:c-s}}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(s.Shape);e.Arc=h,h.prototype._centroid=!0,h.prototype.className="Arc",h.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,f._registerNode)(h),l.Factory.addGetterSetter(h,"innerRadius",0,(0,c.getNumberValidator)()),l.Factory.addGetterSetter(h,"outerRadius",0,(0,c.getNumberValidator)()),l.Factory.addGetterSetter(h,"angle",0,(0,c.getNumberValidator)()),l.Factory.addGetterSetter(h,"clockwise",!1,(0,c.getBooleanValidator)())},1605:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},o.apply(this,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Arrow=void 0;var s=n(6473),u=n(2046),c=n(6836),f=n(867),h=n(9795),d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(f,t);var e,n,s,u,c=(s=f,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(s);if(u){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),c.apply(this,arguments)}return e=f,(n=[{key:"_sceneFunc",value:function(t){o(l(f.prototype),"_sceneFunc",this).call(this,t);var e=2*Math.PI,n=this.points(),r=n,i=0!==this.tension()&&n.length>4;i&&(r=this.getTensionPoints());var a,s,u=this.pointerLength(),c=n.length;if(i){var d=[r[r.length-4],r[r.length-3],r[r.length-2],r[r.length-1],n[c-2],n[c-1]],p=h.Path.calcLength(r[r.length-4],r[r.length-3],"C",d),y=h.Path.getPointOnQuadraticBezier(Math.min(1,1-u/p),d[0],d[1],d[2],d[3],d[4],d[5]);a=n[c-2]-y.x,s=n[c-1]-y.y}else a=n[c-2]-n[c-4],s=n[c-1]-n[c-3];var v=(Math.atan2(s,a)+e)%e,g=this.pointerWidth();this.pointerAtEnding()&&(t.save(),t.beginPath(),t.translate(n[c-2],n[c-1]),t.rotate(v),t.moveTo(0,0),t.lineTo(-u,g/2),t.lineTo(-u,-g/2),t.closePath(),t.restore(),this.__fillStroke(t)),this.pointerAtBeginning()&&(t.save(),t.beginPath(),t.translate(n[0],n[1]),i?(a=(r[0]+r[2])/2-n[0],s=(r[1]+r[3])/2-n[1]):(a=n[2]-n[0],s=n[3]-n[1]),t.rotate((Math.atan2(-s,-a)+e)%e),t.moveTo(0,0),t.lineTo(-u,g/2),t.lineTo(-u,-g/2),t.closePath(),t.restore(),this.__fillStroke(t))}},{key:"__fillStroke",value:function(t){var e=this.dashEnabled();e&&(this.attrs.dashEnabled=!1,t.setLineDash([])),t.fillStrokeShape(this),e&&(this.attrs.dashEnabled=!0)}},{key:"getSelfRect",value:function(){var t=o(l(f.prototype),"getSelfRect",this).call(this),e=this.pointerWidth()/2;return{x:t.x-e,y:t.y-e,width:t.width+2*e,height:t.height+2*e}}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(u.Line);e.Arrow=d,d.prototype.className="Arrow",(0,f._registerNode)(d),s.Factory.addGetterSetter(d,"pointerLength",10,(0,c.getNumberValidator)()),s.Factory.addGetterSetter(d,"pointerWidth",10,(0,c.getNumberValidator)()),s.Factory.addGetterSetter(d,"pointerAtBeginning",!1),s.Factory.addGetterSetter(d,"pointerAtEnding",!0)},3457:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Circle=void 0;var l=n(6473),s=n(7427),u=n(6836),c=n(867),f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(c,t);var e,n,l,s,u=(l=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(l);if(s){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),u.apply(this,arguments)}return e=c,(n=[{key:"_sceneFunc",value:function(t){t.beginPath(),t.arc(0,0,this.attrs.radius||0,0,2*Math.PI,!1),t.closePath(),t.fillStrokeShape(this)}},{key:"getWidth",value:function(){return 2*this.radius()}},{key:"getHeight",value:function(){return 2*this.radius()}},{key:"setWidth",value:function(t){this.radius()!==t/2&&this.radius(t/2)}},{key:"setHeight",value:function(t){this.radius()!==t/2&&this.radius(t/2)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(s.Shape);e.Circle=f,f.prototype._centroid=!0,f.prototype.className="Circle",f.prototype._attrsAffectingSize=["radius"],(0,c._registerNode)(f),l.Factory.addGetterSetter(f,"radius",0,(0,u.getNumberValidator)())},9944:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Ellipse=void 0;var l=n(6473),s=n(7427),u=n(6836),c=n(867),f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(c,t);var e,n,l,s,u=(l=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(l);if(s){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),u.apply(this,arguments)}return e=c,(n=[{key:"_sceneFunc",value:function(t){var 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)}},{key:"getWidth",value:function(){return 2*this.radiusX()}},{key:"getHeight",value:function(){return 2*this.radiusY()}},{key:"setWidth",value:function(t){this.radiusX(t/2)}},{key:"setHeight",value:function(t){this.radiusY(t/2)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(s.Shape);e.Ellipse=f,f.prototype.className="Ellipse",f.prototype._centroid=!0,f.prototype._attrsAffectingSize=["radiusX","radiusY"],(0,c._registerNode)(f),l.Factory.addComponentsGetterSetter(f,"radius",["x","y"]),l.Factory.addGetterSetter(f,"radiusX",0,(0,u.getNumberValidator)()),l.Factory.addGetterSetter(f,"radiusY",0,(0,u.getNumberValidator)())},8359:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},o.apply(this,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Image=void 0;var s=n(773),u=n(6473),c=n(7427),f=n(867),h=n(6836),d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(d,t);var e,n,u,c,f,h=(c=d,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(c);if(f){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function d(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),(e=h.call(this,t)).on("imageChange.konva",(function(){e._setImageLoad()})),e._setImageLoad(),e}return e=d,u=[{key:"fromURL",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=s.Util.createImageElement();r.onload=function(){var t=new d({image:r});e(t)},r.onerror=n,r.crossOrigin="Anonymous",r.src=t}}],(n=[{key:"_setImageLoad",value:function(){var t=this,e=this.image();e&&e.complete||e&&4===e.readyState||e&&e.addEventListener&&e.addEventListener("load",(function(){t._requestDraw()}))}},{key:"_useBufferCanvas",value:function(){return o(l(d.prototype),"_useBufferCanvas",this).call(this,!0)}},{key:"_sceneFunc",value:function(t){var e,n=this.getWidth(),r=this.getHeight(),i=this.cornerRadius(),o=this.attrs.image;if(o){var a=this.attrs.cropWidth,l=this.attrs.cropHeight;e=a&&l?[o,this.cropX(),this.cropY(),a,l,0,0,n,r]:[o,0,0,n,r]}(this.hasFill()||this.hasStroke()||i)&&(t.beginPath(),i?s.Util.drawRoundedRectPath(t,n,r,i):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)),o&&(i&&t.clip(),t.drawImage.apply(t,e))}},{key:"_hitFunc",value:function(t){var e=this.width(),n=this.height(),r=this.cornerRadius();t.beginPath(),r?s.Util.drawRoundedRectPath(t,e,n,r):t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}},{key:"getWidth",value:function(){var t,e;return null!==(t=this.attrs.width)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.width}},{key:"getHeight",value:function(){var t,e;return null!==(t=this.attrs.height)&&void 0!==t?t:null===(e=this.image())||void 0===e?void 0:e.height}}])&&i(e.prototype,n),u&&i(e,u),Object.defineProperty(e,"prototype",{writable:!1}),d}(c.Shape);e.Image=d,d.prototype.className="Image",(0,f._registerNode)(d),u.Factory.addGetterSetter(d,"cornerRadius",0,(0,h.getNumberOrArrayOfNumbersValidator)(4)),u.Factory.addGetterSetter(d,"image"),u.Factory.addComponentsGetterSetter(d,"crop",["x","y","width","height"]),u.Factory.addGetterSetter(d,"cropX",0,(0,h.getNumberValidator)()),u.Factory.addGetterSetter(d,"cropY",0,(0,h.getNumberValidator)()),u.Factory.addGetterSetter(d,"cropWidth",0,(0,h.getNumberValidator)()),u.Factory.addGetterSetter(d,"cropHeight",0,(0,h.getNumberValidator)())},9887:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function a(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function u(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,i=c(t);if(e){var o=c(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function c(t){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},c(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Tag=e.Label=void 0;var f=n(6473),h=n(7427),d=n(8873),p=n(6836),y=n(867),v=["fontFamily","fontSize","fontStyle","padding","lineHeight","text","width","height","pointerDirection","pointerWidth","pointerHeight"],g="up",m="right",b="down",_="left",S=v.length,w=function(t){l(n,t);var e=u(n);function n(t){var r;return i(this,n),(r=e.call(this,t)).on("add.konva",(function(t){this._addListeners(t.child),this._sync()})),r}return a(n,[{key:"getText",value:function(){return this.find("Text")[0]}},{key:"getTag",value:function(){return this.find("Tag")[0]}},{key:"_addListeners",value:function(t){var e,n=this,r=function(){n._sync()};for(e=0;e<S;e++)t.on(v[e]+"Change.konva",r)}},{key:"getWidth",value:function(){return this.getText().width()}},{key:"getHeight",value:function(){return this.getText().height()}},{key:"_sync",value:function(){var t,e,n,r,i,o,a,l=this.getText(),s=this.getTag();if(l&&s){switch(t=l.width(),e=l.height(),n=s.pointerDirection(),r=s.pointerWidth(),a=s.pointerHeight(),i=0,o=0,n){case g:i=t/2,o=-1*a;break;case m:i=t+r,o=e/2;break;case b:i=t/2,o=e+a;break;case _:i=-1*r,o=e/2}s.setAttrs({x:-1*i,y:-1*o,width:t,height:e}),l.setAttrs({x:-1*i,y:-1*o})}}}]),n}(d.Group);e.Label=w,w.prototype.className="Label",(0,y._registerNode)(w);var k=function(t){l(n,t);var e=u(n);function n(){return i(this,n),e.apply(this,arguments)}return a(n,[{key:"_sceneFunc",value:function(t){var e=this.width(),n=this.height(),r=this.pointerDirection(),i=this.pointerWidth(),o=this.pointerHeight(),a=this.cornerRadius(),l=0,s=0,u=0,c=0;"number"==typeof a?l=s=u=c=Math.min(a,e/2,n/2):(l=Math.min(a[0]||0,e/2,n/2),s=Math.min(a[1]||0,e/2,n/2),c=Math.min(a[2]||0,e/2,n/2),u=Math.min(a[3]||0,e/2,n/2)),t.beginPath(),t.moveTo(l,0),r===g&&(t.lineTo((e-i)/2,0),t.lineTo(e/2,-1*o),t.lineTo((e+i)/2,0)),t.lineTo(e-s,0),t.arc(e-s,s,s,3*Math.PI/2,0,!1),r===m&&(t.lineTo(e,(n-o)/2),t.lineTo(e+i,n/2),t.lineTo(e,(n+o)/2)),t.lineTo(e,n-c),t.arc(e-c,n-c,c,0,Math.PI/2,!1),r===b&&(t.lineTo((e+i)/2,n),t.lineTo(e/2,n+o),t.lineTo((e-i)/2,n)),t.lineTo(u,n),t.arc(u,n-u,u,Math.PI/2,Math.PI,!1),r===_&&(t.lineTo(0,(n+o)/2),t.lineTo(-1*i,n/2),t.lineTo(0,(n-o)/2)),t.lineTo(0,l),t.arc(l,l,l,Math.PI,3*Math.PI/2,!1),t.closePath(),t.fillStrokeShape(this)}},{key:"getSelfRect",value:function(){var t=0,e=0,n=this.pointerWidth(),r=this.pointerHeight(),i=this.pointerDirection(),o=this.width(),a=this.height();return i===g?(e-=r,a+=r):i===b?a+=r:i===_?(t-=1.5*n,o+=n):i===m&&(o+=1.5*n),{x:t,y:e,width:o,height:a}}}]),n}(h.Shape);e.Tag=k,k.prototype.className="Tag",(0,y._registerNode)(k),f.Factory.addGetterSetter(k,"pointerDirection","none"),f.Factory.addGetterSetter(k,"pointerWidth",0,(0,p.getNumberValidator)()),f.Factory.addGetterSetter(k,"pointerHeight",0,(0,p.getNumberValidator)()),f.Factory.addGetterSetter(k,"cornerRadius",0,(0,p.getNumberOrArrayOfNumbersValidator)(4))},2046:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Line=void 0;var s=n(6473),u=n(7427),c=n(6836),f=n(867);function h(t,e,n,r,i,o,a){var l=Math.sqrt(Math.pow(n-t,2)+Math.pow(r-e,2)),s=Math.sqrt(Math.pow(i-n,2)+Math.pow(o-r,2)),u=a*l/(l+s),c=a*s/(l+s);return[n-u*(i-t),r-u*(o-e),n+c*(i-t),r+c*(o-e)]}function d(t,e){var n,r,i=t.length,o=[];for(n=2;n<i-2;n+=2)r=h(t[n-2],t[n-1],t[n],t[n+1],t[n+2],t[n+3],e),isNaN(r[0])||(o.push(r[0]),o.push(r[1]),o.push(t[n]),o.push(t[n+1]),o.push(r[2]),o.push(r[3]));return o}var p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(f,t);var e,n,s,u,c=(s=f,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(s);if(u){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),(e=c.call(this,t)).on("pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva",(function(){this._clearCache("tensionPoints")})),e}return e=f,(n=[{key:"_sceneFunc",value:function(t){var e,n,r,i=this.points(),o=i.length,a=this.tension(),l=this.closed(),s=this.bezier();if(o){if(t.beginPath(),t.moveTo(i[0],i[1]),0!==a&&o>4){for(n=(e=this.getTensionPoints()).length,r=l?0:4,l||t.quadraticCurveTo(e[0],e[1],e[2],e[3]);r<n-2;)t.bezierCurveTo(e[r++],e[r++],e[r++],e[r++],e[r++],e[r++]);l||t.quadraticCurveTo(e[n-2],e[n-1],i[o-2],i[o-1])}else if(s)for(r=2;r<o;)t.bezierCurveTo(i[r++],i[r++],i[r++],i[r++],i[r++],i[r++]);else for(r=2;r<o;r+=2)t.lineTo(i[r],i[r+1]);l?(t.closePath(),t.fillStrokeShape(this)):t.strokeShape(this)}}},{key:"getTensionPoints",value:function(){return this._getCache("tensionPoints",this._getTensionPoints)}},{key:"_getTensionPoints",value:function(){return this.closed()?this._getTensionPointsClosed():d(this.points(),this.tension())}},{key:"_getTensionPointsClosed",value:function(){var t=this.points(),e=t.length,n=this.tension(),r=h(t[e-2],t[e-1],t[0],t[1],t[2],t[3],n),i=h(t[e-4],t[e-3],t[e-2],t[e-1],t[0],t[1],n),o=d(t,n);return[r[2],r[3]].concat(o).concat([i[0],i[1],t[e-2],t[e-1],i[2],i[3],r[0],r[1],t[0],t[1]])}},{key:"getWidth",value:function(){return this.getSelfRect().width}},{key:"getHeight",value:function(){return this.getSelfRect().height}},{key:"getSelfRect",value:function(){var t,e=this.points();if(e.length<4)return{x:e[0]||0,y:e[1]||0,width:0,height:0};for(var n,r,o=(e=0!==this.tension()?[e[0],e[1]].concat((t=this._getTensionPoints(),function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[e[e.length-2],e[e.length-1]]):this.points())[0],a=e[0],l=e[1],s=e[1],u=0;u<e.length/2;u++)n=e[2*u],r=e[2*u+1],o=Math.min(o,n),a=Math.max(a,n),l=Math.min(l,r),s=Math.max(s,r);return{x:o,y:l,width:a-o,height:s-l}}}])&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(u.Shape);e.Line=p,p.prototype.className="Line",p.prototype._attrsAffectingSize=["points","bezier","tension"],(0,f._registerNode)(p),s.Factory.addGetterSetter(p,"closed",!1),s.Factory.addGetterSetter(p,"bezier",!1),s.Factory.addGetterSetter(p,"tension",0,(0,c.getNumberValidator)()),s.Factory.addGetterSetter(p,"points",[],(0,c.getNumberArrayValidator)())},9795:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Path=void 0;var l=n(6473),s=n(7427),u=n(867),c=n(1126),f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(h,t);var e,n,l,s,u,f=(s=h,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(s);if(u){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function h(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(e=f.call(this,t)).dataArray=[],e.pathLength=0,e._readDataAttribute(),e.on("dataChange.konva",(function(){this._readDataAttribute()})),e}return e=h,l=[{key:"getLineLength",value:function(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}},{key:"getPathLength",value:function(t){for(var e=0,n=0;n<t.length;++n)e+=t[n].pathLength;return e}},{key:"getPointAtLengthOfDataArray",value:function(t,e){var 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]};var o=e[r],a=o.points;switch(o.command){case"L":return h.getPointOnLine(t,o.start.x,o.start.y,a[0],a[1]);case"C":return h.getPointOnCubicBezier((0,c.t2length)(t,h.getPathLength(e),(function(t){return(0,c.getCubicArcLength)([o.start.x,a[0],a[2],a[4]],[o.start.y,a[1],a[3],a[5]],t)})),o.start.x,o.start.y,a[0],a[1],a[2],a[3],a[4],a[5]);case"Q":return h.getPointOnQuadraticBezier((0,c.t2length)(t,h.getPathLength(e),(function(t){return(0,c.getQuadraticArcLength)([o.start.x,a[0],a[2]],[o.start.y,a[1],a[3]],t)})),o.start.x,o.start.y,a[0],a[1],a[2],a[3]);case"A":var l=a[0],s=a[1],u=a[2],f=a[3],d=a[4],p=a[5],y=a[6];return d+=p*t/o.pathLength,h.getPointOnEllipticalArc(l,s,u,f,d,y)}return null}},{key:"getPointOnLine",value:function(t,e,n,r,i,o,a){void 0===o&&(o=e),void 0===a&&(a=n);var l=(i-n)/(r-e+1e-8),s=Math.sqrt(t*t/(1+l*l));r<e&&(s*=-1);var u,c=l*s;if(r===e)u={x:o,y:a+c};else if((a-n)/(o-e+1e-8)===l)u={x:o+s,y:a+c};else{var f,h,d=this.getLineLength(e,n,r,i),p=(o-e)*(r-e)+(a-n)*(i-n);f=e+(p/=d*d)*(r-e),h=n+p*(i-n);var y=this.getLineLength(o,a,f,h),v=Math.sqrt(t*t-y*y);s=Math.sqrt(v*v/(1+l*l)),r<e&&(s*=-1),u={x:f+s,y:h+(c=l*s)}}return u}},{key:"getPointOnCubicBezier",value:function(t,e,n,r,i,o,a,l,s){function u(t){return t*t*t}function c(t){return 3*t*t*(1-t)}function f(t){return 3*t*(1-t)*(1-t)}function h(t){return(1-t)*(1-t)*(1-t)}return{x:l*u(t)+o*c(t)+r*f(t)+e*h(t),y:s*u(t)+a*c(t)+i*f(t)+n*h(t)}}},{key:"getPointOnQuadraticBezier",value:function(t,e,n,r,i,o,a){function l(t){return t*t}function s(t){return 2*t*(1-t)}function u(t){return(1-t)*(1-t)}return{x:o*l(t)+r*s(t)+e*u(t),y:a*l(t)+i*s(t)+n*u(t)}}},{key:"getPointOnEllipticalArc",value:function(t,e,n,r,i,o){var a=Math.cos(o),l=Math.sin(o),s=n*Math.cos(i),u=r*Math.sin(i);return{x:t+(s*a-u*l),y:e+(s*l+u*a)}}},{key:"parsePathData",value:function(t){if(!t)return[];var e=t,n=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"];e=e.replace(new RegExp(" ","g"),",");for(var r=0;r<n.length;r++)e=e.replace(new RegExp(n[r],"g"),"|"+n[r]);var i,o=e.split("|"),a=[],l=[],s=0,u=0,c=/([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:e[-+]?\d+)?)/gi;for(r=1;r<o.length;r++){var f=o[r],h=f.charAt(0);for(f=f.slice(1),l.length=0;i=c.exec(f);)l.push(i[0]);for(var d=[],p=0,y=l.length;p<y;p++)if("00"!==l[p]){var v=parseFloat(l[p]);isNaN(v)?d.push(0):d.push(v)}else d.push(0,0);for(;d.length>0&&!isNaN(d[0]);){var g,m,b,_,S,w,k,x,P,C,O=null,T=[],E=s,R=u;switch(h){case"l":s+=d.shift(),u+=d.shift(),O="L",T.push(s,u);break;case"L":s=d.shift(),u=d.shift(),T.push(s,u);break;case"m":var j=d.shift(),A=d.shift();if(s+=j,u+=A,O="M",a.length>2&&"z"===a[a.length-1].command)for(var M=a.length-2;M>=0;M--)if("M"===a[M].command){s=a[M].points[0]+j,u=a[M].points[1]+A;break}T.push(s,u),h="l";break;case"M":s=d.shift(),u=d.shift(),O="M",T.push(s,u),h="L";break;case"h":s+=d.shift(),O="L",T.push(s,u);break;case"H":s=d.shift(),O="L",T.push(s,u);break;case"v":u+=d.shift(),O="L",T.push(s,u);break;case"V":u=d.shift(),O="L",T.push(s,u);break;case"C":T.push(d.shift(),d.shift(),d.shift(),d.shift()),s=d.shift(),u=d.shift(),T.push(s,u);break;case"c":T.push(s+d.shift(),u+d.shift(),s+d.shift(),u+d.shift()),s+=d.shift(),u+=d.shift(),O="C",T.push(s,u);break;case"S":m=s,b=u,"C"===(g=a[a.length-1]).command&&(m=s+(s-g.points[2]),b=u+(u-g.points[3])),T.push(m,b,d.shift(),d.shift()),s=d.shift(),u=d.shift(),O="C",T.push(s,u);break;case"s":m=s,b=u,"C"===(g=a[a.length-1]).command&&(m=s+(s-g.points[2]),b=u+(u-g.points[3])),T.push(m,b,s+d.shift(),u+d.shift()),s+=d.shift(),u+=d.shift(),O="C",T.push(s,u);break;case"Q":T.push(d.shift(),d.shift()),s=d.shift(),u=d.shift(),T.push(s,u);break;case"q":T.push(s+d.shift(),u+d.shift()),s+=d.shift(),u+=d.shift(),O="Q",T.push(s,u);break;case"T":m=s,b=u,"Q"===(g=a[a.length-1]).command&&(m=s+(s-g.points[0]),b=u+(u-g.points[1])),s=d.shift(),u=d.shift(),O="Q",T.push(m,b,s,u);break;case"t":m=s,b=u,"Q"===(g=a[a.length-1]).command&&(m=s+(s-g.points[0]),b=u+(u-g.points[1])),s+=d.shift(),u+=d.shift(),O="Q",T.push(m,b,s,u);break;case"A":_=d.shift(),S=d.shift(),w=d.shift(),k=d.shift(),x=d.shift(),P=s,C=u,s=d.shift(),u=d.shift(),O="A",T=this.convertEndpointToCenterParameterization(P,C,s,u,k,x,_,S,w);break;case"a":_=d.shift(),S=d.shift(),w=d.shift(),k=d.shift(),x=d.shift(),P=s,C=u,s+=d.shift(),u+=d.shift(),O="A",T=this.convertEndpointToCenterParameterization(P,C,s,u,k,x,_,S,w)}a.push({command:O||h,points:T,start:{x:E,y:R},pathLength:this.calcLength(E,R,O||h,T)})}"z"!==h&&"Z"!==h||a.push({command:"z",points:[],start:void 0,pathLength:0})}return a}},{key:"calcLength",value:function(t,e,n,r){var i,o,a,l,s=h;switch(n){case"L":return s.getLineLength(t,e,r[0],r[1]);case"C":return(0,c.getCubicArcLength)([t,r[0],r[2],r[4]],[e,r[1],r[3],r[5]],1);case"Q":return(0,c.getQuadraticArcLength)([t,r[0],r[2]],[e,r[1],r[3]],1);case"A":i=0;var u=r[4],f=r[5],d=r[4]+f,p=Math.PI/180;if(Math.abs(u-d)<p&&(p=Math.abs(u-d)),o=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],u,0),f<0)for(l=u-p;l>d;l-=p)a=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),i+=s.getLineLength(o.x,o.y,a.x,a.y),o=a;else for(l=u+p;l<d;l+=p)a=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),i+=s.getLineLength(o.x,o.y,a.x,a.y),o=a;return a=s.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],d,0),i+s.getLineLength(o.x,o.y,a.x,a.y)}return 0}},{key:"convertEndpointToCenterParameterization",value:function(t,e,n,r,i,o,a,l,s){var u=s*(Math.PI/180),c=Math.cos(u)*(t-n)/2+Math.sin(u)*(e-r)/2,f=-1*Math.sin(u)*(t-n)/2+Math.cos(u)*(e-r)/2,h=c*c/(a*a)+f*f/(l*l);h>1&&(a*=Math.sqrt(h),l*=Math.sqrt(h));var d=Math.sqrt((a*a*(l*l)-a*a*(f*f)-l*l*(c*c))/(a*a*(f*f)+l*l*(c*c)));i===o&&(d*=-1),isNaN(d)&&(d=0);var p=d*a*f/l,y=d*-l*c/a,v=(t+n)/2+Math.cos(u)*p-Math.sin(u)*y,g=(e+r)/2+Math.sin(u)*p+Math.cos(u)*y,m=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},b=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(m(t)*m(e))},_=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(b(t,e))},S=_([1,0],[(c-p)/a,(f-y)/l]),w=[(c-p)/a,(f-y)/l],k=[(-1*c-p)/a,(-1*f-y)/l],x=_(w,k);return b(w,k)<=-1&&(x=Math.PI),b(w,k)>=1&&(x=0),0===o&&x>0&&(x-=2*Math.PI),1===o&&x<0&&(x+=2*Math.PI),[v,g,a,l,S,x,u,o]}}],(n=[{key:"_readDataAttribute",value:function(){this.dataArray=h.parsePathData(this.data()),this.pathLength=h.getPathLength(this.dataArray)}},{key:"_sceneFunc",value:function(t){var e=this.dataArray;t.beginPath();for(var n=!1,r=0;r<e.length;r++){var i=e[r].command,o=e[r].points;switch(i){case"L":t.lineTo(o[0],o[1]);break;case"M":t.moveTo(o[0],o[1]);break;case"C":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"Q":t.quadraticCurveTo(o[0],o[1],o[2],o[3]);break;case"A":var a=o[0],l=o[1],s=o[2],u=o[3],c=o[4],f=o[5],h=o[6],d=o[7],p=s>u?s:u,y=s>u?1:s/u,v=s>u?u/s:1;t.translate(a,l),t.rotate(h),t.scale(y,v),t.arc(0,0,p,c,c+f,1-d),t.scale(1/y,1/v),t.rotate(-h),t.translate(-a,-l);break;case"z":n=!0,t.closePath()}}n||this.hasFill()?t.fillStrokeShape(this):t.strokeShape(this)}},{key:"getSelfRect",value:function(){var t=[];this.dataArray.forEach((function(e){if("A"===e.command){var n=e.points[4],r=e.points[5],i=e.points[4]+r,o=Math.PI/180;if(Math.abs(n-i)<o&&(o=Math.abs(n-i)),r<0)for(var a=n-o;a>i;a-=o){var l=h.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],a,0);t.push(l.x,l.y)}else for(var s=n+o;s<i;s+=o){var u=h.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],s,0);t.push(u.x,u.y)}}else if("C"===e.command)for(var c=0;c<=1;c+=.01){var f=h.getPointOnCubicBezier(c,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3],e.points[4],e.points[5]);t.push(f.x,f.y)}else t=t.concat(e.points)}));for(var e,n,r=t[0],i=t[0],o=t[1],a=t[1],l=0;l<t.length/2;l++)e=t[2*l],n=t[2*l+1],isNaN(e)||(r=Math.min(r,e),i=Math.max(i,e)),isNaN(n)||(o=Math.min(o,n),a=Math.max(a,n));return{x:r,y:o,width:i-r,height:a-o}}},{key:"getLength",value:function(){return this.pathLength}},{key:"getPointAtLength",value:function(t){return h.getPointAtLengthOfDataArray(t,this.dataArray)}}])&&i(e.prototype,n),l&&i(e,l),Object.defineProperty(e,"prototype",{writable:!1}),h}(s.Shape);e.Path=f,f.prototype.className="Path",f.prototype._attrsAffectingSize=["data"],(0,u._registerNode)(f),l.Factory.addGetterSetter(f,"data")},7725:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Rect=void 0;var l=n(6473),s=n(7427),u=n(867),c=n(773),f=n(6836),h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(f,t);var e,n,l,s,u=(l=f,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(l);if(s){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),u.apply(this,arguments)}return e=f,(n=[{key:"_sceneFunc",value:function(t){var e=this.cornerRadius(),n=this.width(),r=this.height();t.beginPath(),e?c.Util.drawRoundedRectPath(t,n,r,e):t.rect(0,0,n,r),t.closePath(),t.fillStrokeShape(this)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(s.Shape);e.Rect=h,h.prototype.className="Rect",(0,u._registerNode)(h),l.Factory.addGetterSetter(h,"cornerRadius",0,(0,f.getNumberOrArrayOfNumbersValidator)(4))},8076:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.RegularPolygon=void 0;var l=n(6473),s=n(7427),u=n(6836),c=n(867),f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(c,t);var e,n,l,s,u=(l=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(l);if(s){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),u.apply(this,arguments)}return e=c,(n=[{key:"_sceneFunc",value:function(t){var e=this._getPoints();t.beginPath(),t.moveTo(e[0].x,e[0].y);for(var n=1;n<e.length;n++)t.lineTo(e[n].x,e[n].y);t.closePath(),t.fillStrokeShape(this)}},{key:"_getPoints",value:function(){for(var t=this.attrs.sides,e=this.attrs.radius||0,n=[],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}},{key:"getSelfRect",value:function(){var t=this._getPoints(),e=t[0].x,n=t[0].y,r=t[0].x,i=t[0].y;return t.forEach((function(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}}},{key:"getWidth",value:function(){return 2*this.radius()}},{key:"getHeight",value:function(){return 2*this.radius()}},{key:"setWidth",value:function(t){this.radius(t/2)}},{key:"setHeight",value:function(t){this.radius(t/2)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(s.Shape);e.RegularPolygon=f,f.prototype.className="RegularPolygon",f.prototype._centroid=!0,f.prototype._attrsAffectingSize=["radius"],(0,c._registerNode)(f),l.Factory.addGetterSetter(f,"radius",0,(0,u.getNumberValidator)()),l.Factory.addGetterSetter(f,"sides",0,(0,u.getNumberValidator)())},5304:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Ring=void 0;var l=n(6473),s=n(7427),u=n(6836),c=n(867),f=2*Math.PI,h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(c,t);var e,n,l,s,u=(l=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(l);if(s){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),u.apply(this,arguments)}return e=c,(n=[{key:"_sceneFunc",value:function(t){t.beginPath(),t.arc(0,0,this.innerRadius(),0,f,!1),t.moveTo(this.outerRadius(),0),t.arc(0,0,this.outerRadius(),f,0,!0),t.closePath(),t.fillStrokeShape(this)}},{key:"getWidth",value:function(){return 2*this.outerRadius()}},{key:"getHeight",value:function(){return 2*this.outerRadius()}},{key:"setWidth",value:function(t){this.outerRadius(t/2)}},{key:"setHeight",value:function(t){this.outerRadius(t/2)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(s.Shape);e.Ring=h,h.prototype.className="Ring",h.prototype._centroid=!0,h.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,c._registerNode)(h),l.Factory.addGetterSetter(h,"innerRadius",0,(0,u.getNumberValidator)()),l.Factory.addGetterSetter(h,"outerRadius",0,(0,u.getNumberValidator)())},6247:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},o.apply(this,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Sprite=void 0;var s=n(6473),u=n(7427),c=n(9326),f=n(6836),h=n(867),d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(h,t);var e,n,s,u,f=(s=h,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(s);if(u){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function h(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),(e=f.call(this,t))._updated=!0,e.anim=new c.Animation((function(){var t=e._updated;return e._updated=!1,t})),e.on("animationChange.konva",(function(){this.frameIndex(0)})),e.on("frameIndexChange.konva",(function(){this._updated=!0})),e.on("frameRateChange.konva",(function(){this.anim.isRunning()&&(clearInterval(this.interval),this._setInterval())})),e}return e=h,(n=[{key:"_sceneFunc",value:function(t){var e=this.animation(),n=this.frameIndex(),r=4*n,i=this.animations()[e],o=this.frameOffsets(),a=i[r+0],l=i[r+1],s=i[r+2],u=i[r+3],c=this.image();if((this.hasFill()||this.hasStroke())&&(t.beginPath(),t.rect(0,0,s,u),t.closePath(),t.fillStrokeShape(this)),c)if(o){var f=o[e],h=2*n;t.drawImage(c,a,l,s,u,f[h+0],f[h+1],s,u)}else t.drawImage(c,a,l,s,u,0,0,s,u)}},{key:"_hitFunc",value:function(t){var e=this.animation(),n=this.frameIndex(),r=4*n,i=this.animations()[e],o=this.frameOffsets(),a=i[r+2],l=i[r+3];if(t.beginPath(),o){var s=o[e],u=2*n;t.rect(s[u+0],s[u+1],a,l)}else t.rect(0,0,a,l);t.closePath(),t.fillShape(this)}},{key:"_useBufferCanvas",value:function(){return o(l(h.prototype),"_useBufferCanvas",this).call(this,!0)}},{key:"_setInterval",value:function(){var t=this;this.interval=setInterval((function(){t._updateIndex()}),1e3/this.frameRate())}},{key:"start",value:function(){if(!this.isRunning()){var t=this.getLayer();this.anim.setLayers(t),this._setInterval(),this.anim.start()}}},{key:"stop",value:function(){this.anim.stop(),clearInterval(this.interval)}},{key:"isRunning",value:function(){return this.anim.isRunning()}},{key:"_updateIndex",value:function(){var t=this.frameIndex(),e=this.animation();t<this.animations()[e].length/4-1?this.frameIndex(t+1):this.frameIndex(0)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),h}(u.Shape);e.Sprite=d,d.prototype.className="Sprite",(0,h._registerNode)(d),s.Factory.addGetterSetter(d,"animation"),s.Factory.addGetterSetter(d,"animations"),s.Factory.addGetterSetter(d,"frameOffsets"),s.Factory.addGetterSetter(d,"image"),s.Factory.addGetterSetter(d,"frameIndex",0,(0,f.getNumberValidator)()),s.Factory.addGetterSetter(d,"frameRate",17,(0,f.getNumberValidator)()),s.Factory.backCompat(d,{index:"frameIndex",getIndex:"getFrameIndex",setIndex:"setFrameIndex"})},6251:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Star=void 0;var l=n(6473),s=n(7427),u=n(6836),c=n(867),f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(c,t);var e,n,l,s,u=(l=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(l);if(s){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),u.apply(this,arguments)}return e=c,(n=[{key:"_sceneFunc",value:function(t){var e=this.innerRadius(),n=this.outerRadius(),r=this.numPoints();t.beginPath(),t.moveTo(0,0-n);for(var i=1;i<2*r;i++){var o=i%2==0?n:e,a=o*Math.sin(i*Math.PI/r),l=-1*o*Math.cos(i*Math.PI/r);t.lineTo(a,l)}t.closePath(),t.fillStrokeShape(this)}},{key:"getWidth",value:function(){return 2*this.outerRadius()}},{key:"getHeight",value:function(){return 2*this.outerRadius()}},{key:"setWidth",value:function(t){this.outerRadius(t/2)}},{key:"setHeight",value:function(t){this.outerRadius(t/2)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(s.Shape);e.Star=f,f.prototype.className="Star",f.prototype._centroid=!0,f.prototype._attrsAffectingSize=["innerRadius","outerRadius"],(0,c._registerNode)(f),l.Factory.addGetterSetter(f,"numPoints",5,(0,u.getNumberValidator)()),l.Factory.addGetterSetter(f,"innerRadius",0,(0,u.getNumberValidator)()),l.Factory.addGetterSetter(f,"outerRadius",0,(0,u.getNumberValidator)())},1896:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Text=e.stringToArray=void 0;var l=n(773),s=n(6473),u=n(7427),c=n(6836),f=n(867);function h(t){return Array.from(t)}e.stringToArray=h;var d,p="auto",y="justify",v="left",g="middle",m="normal",b=" ",_="none",S=["fontFamily","fontSize","fontStyle","fontVariant","padding","align","verticalAlign","lineHeight","text","width","height","wrap","ellipsis","letterSpacing"],w=S.length;function k(){return d||(d=l.Util.createCanvasElement().getContext("2d"))}var x=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(f,t);var e,n,s,u,c=(s=f,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(s);if(u){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),e=c.call(this,function(t){return(t=t||{}).fillLinearGradientColorStops||t.fillRadialGradientColorStops||t.fillPatternImage||(t.fill=t.fill||"black"),t}(t)),e._partialTextX=0,e._partialTextY=0;for(var n=0;n<w;n++)e.on(S[n]+"Change.konva",e._setTextData);return e._setTextData(),e}return e=f,(n=[{key:"_sceneFunc",value:function(t){var e=this.textArr,n=e.length;if(this.text()){var r,i=this.padding(),o=this.fontSize(),a=this.lineHeight()*o,l=this.verticalAlign(),s=0,u=this.align(),c=this.getWidth(),f=this.letterSpacing(),d=this.fill(),p=this.textDecoration(),m=-1!==p.indexOf("underline"),b=-1!==p.indexOf("line-through"),_=0,S=(_=a/2,0),w=0;for(t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",g),t.setAttr("textAlign",v),l===g?s=(this.getHeight()-n*a-2*i)/2:"bottom"===l&&(s=this.getHeight()-n*a-2*i),t.translate(i,s+i),r=0;r<n;r++){S=0,w=0;var k,x,P,C=e[r],O=C.text,T=C.width,E=C.lastInParagraph;if(t.save(),"right"===u?S+=c-T-2*i:"center"===u&&(S+=(c-T-2*i)/2),m){t.save(),t.beginPath(),t.moveTo(S,_+w+Math.round(o/2)),x=0==(k=O.split(" ").length-1),P=u!==y||E?T:c-2*i,t.lineTo(S+Math.round(P),_+w+Math.round(o/2)),t.lineWidth=o/15;var R=this._getLinearGradient();t.strokeStyle=R||d,t.stroke(),t.restore()}if(b){t.save(),t.beginPath(),t.moveTo(S,_+w),x=0==(k=O.split(" ").length-1),P=u===y&&E&&!x?c-2*i:T,t.lineTo(S+Math.round(P),_+w),t.lineWidth=o/15;var j=this._getLinearGradient();t.strokeStyle=j||d,t.stroke(),t.restore()}if(0!==f||u===y){k=O.split(" ").length-1;for(var A=h(O),M=0;M<A.length;M++){var N=A[M];" "!==N||E||u!==y||(S+=(c-2*i-T)/k),this._partialTextX=S,this._partialTextY=_+w,this._partialText=N,t.fillStrokeShape(this),S+=this.measureSize(N).width+f}}else this._partialTextX=S,this._partialTextY=_+w,this._partialText=O,t.fillStrokeShape(this);t.restore(),n>1&&(_+=a)}}}},{key:"_hitFunc",value:function(t){var e=this.getWidth(),n=this.getHeight();t.beginPath(),t.rect(0,0,e,n),t.closePath(),t.fillStrokeShape(this)}},{key:"setText",value:function(t){var e=l.Util._isString(t)?t:null==t?"":t+"";return this._setAttr("text",e),this}},{key:"getWidth",value:function(){return this.attrs.width===p||void 0===this.attrs.width?this.getTextWidth()+2*this.padding():this.attrs.width}},{key:"getHeight",value:function(){return this.attrs.height===p||void 0===this.attrs.height?this.fontSize()*this.textArr.length*this.lineHeight()+2*this.padding():this.attrs.height}},{key:"getTextWidth",value:function(){return this.textWidth}},{key:"getTextHeight",value:function(){return l.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}},{key:"measureSize",value:function(t){var e,n=k(),r=this.fontSize();return n.save(),n.font=this._getContextFont(),e=n.measureText(t),n.restore(),{width:e.width,height:r}}},{key:"_getContextFont",value:function(){return this.fontStyle()+b+this.fontVariant()+b+(this.fontSize()+"px ")+this.fontFamily().split(",").map((function(t){var e=(t=t.trim()).indexOf(" ")>=0,n=t.indexOf('"')>=0||t.indexOf("'")>=0;return e&&!n&&(t='"'.concat(t,'"')),t})).join(", ")}},{key:"_addTextLine",value:function(t){this.align()===y&&(t=t.trim());var e=this._getTextWidth(t);return this.textArr.push({text:t,width:e,lastInParagraph:!1})}},{key:"_getTextWidth",value:function(t){var e=this.letterSpacing(),n=t.length;return k().measureText(t).width+(n?e*(n-1):0)}},{key:"_setTextData",value:function(){var t=this.text().split("\n"),e=+this.fontSize(),n=0,r=this.lineHeight()*e,i=this.attrs.width,o=this.attrs.height,a=i!==p&&void 0!==i,l=o!==p&&void 0!==o,s=this.padding(),u=i-2*s,c=o-2*s,f=0,h=this.wrap(),d="char"!==h&&h!==_,y=this.ellipsis();this.textArr=[],k().font=this._getContextFont();for(var v=y?this._getTextWidth("…"):0,g=0,m=t.length;g<m;++g){var S=t[g],w=this._getTextWidth(S);if(a&&w>u)for(;S.length>0;){for(var x=0,P=S.length,C="",O=0;x<P;){var T=x+P>>>1,E=S.slice(0,T+1),R=this._getTextWidth(E)+v;R<=u?(x=T+1,C=E,O=R):P=T}if(!C)break;if(d){var j,A=S[C.length];(j=(A===b||"-"===A)&&O<=u?C.length:Math.max(C.lastIndexOf(b),C.lastIndexOf("-"))+1)>0&&(x=j,C=C.slice(0,x),O=this._getTextWidth(C))}if(C=C.trimRight(),this._addTextLine(C),n=Math.max(n,O),f+=r,this._shouldHandleEllipsis(f)){this._tryToAddEllipsisToLastLine();break}if((S=(S=S.slice(x)).trimLeft()).length>0&&(w=this._getTextWidth(S))<=u){this._addTextLine(S),f+=r,n=Math.max(n,w);break}}else this._addTextLine(S),f+=r,n=Math.max(n,w),this._shouldHandleEllipsis(f)&&g<m-1&&this._tryToAddEllipsisToLastLine();if(this.textArr[this.textArr.length-1]&&(this.textArr[this.textArr.length-1].lastInParagraph=!0),l&&f+r>c)break}this.textHeight=e,this.textWidth=n}},{key:"_shouldHandleEllipsis",value:function(t){var e=+this.fontSize(),n=this.lineHeight()*e,r=this.attrs.height,i=r!==p&&void 0!==r,o=r-2*this.padding();return!(this.wrap()!==_)||i&&t+n>o}},{key:"_tryToAddEllipsisToLastLine",value:function(){var t=this.attrs.width,e=t!==p&&void 0!==t,n=t-2*this.padding(),r=this.ellipsis(),i=this.textArr[this.textArr.length-1];i&&r&&(e&&(this._getTextWidth(i.text+"…")<n||(i.text=i.text.slice(0,i.text.length-3))),this.textArr.splice(this.textArr.length-1,1),this._addTextLine(i.text+"…"))}},{key:"getStrokeScaleEnabled",value:function(){return!0}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(u.Shape);e.Text=x,x.prototype._fillFunc=function(t){t.fillText(this._partialText,this._partialTextX,this._partialTextY)},x.prototype._strokeFunc=function(t){t.strokeText(this._partialText,this._partialTextX,this._partialTextY)},x.prototype.className="Text",x.prototype._attrsAffectingSize=["text","fontSize","padding","wrap","lineHeight","letterSpacing"],(0,f._registerNode)(x),s.Factory.overWriteSetter(x,"width",(0,c.getNumberOrAutoValidator)()),s.Factory.overWriteSetter(x,"height",(0,c.getNumberOrAutoValidator)()),s.Factory.addGetterSetter(x,"fontFamily","Arial"),s.Factory.addGetterSetter(x,"fontSize",12,(0,c.getNumberValidator)()),s.Factory.addGetterSetter(x,"fontStyle",m),s.Factory.addGetterSetter(x,"fontVariant",m),s.Factory.addGetterSetter(x,"padding",0,(0,c.getNumberValidator)()),s.Factory.addGetterSetter(x,"align",v),s.Factory.addGetterSetter(x,"verticalAlign","top"),s.Factory.addGetterSetter(x,"lineHeight",1,(0,c.getNumberValidator)()),s.Factory.addGetterSetter(x,"wrap","word"),s.Factory.addGetterSetter(x,"ellipsis",!1,(0,c.getBooleanValidator)()),s.Factory.addGetterSetter(x,"letterSpacing",0,(0,c.getNumberValidator)()),s.Factory.addGetterSetter(x,"text","",(0,c.getStringValidator)()),s.Factory.addGetterSetter(x,"textDecoration","")},6262:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},o.apply(this,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.TextPath=void 0;var s=n(773),u=n(6473),c=n(7427),f=n(9795),h=n(1896),d=n(6836),p=n(867),y="normal";function v(t){t.fillText(this.partialText,0,0)}function g(t){t.strokeText(this.partialText,0,0)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(p,t);var e,n,u,c,d=(u=p,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(u);if(c){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function p(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),(e=d.call(this,t)).dummyCanvas=s.Util.createCanvasElement(),e.dataArray=[],e._readDataAttribute(),e.on("dataChange.konva",(function(){this._readDataAttribute(),this._setTextData()})),e.on("textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva",e._setTextData),e._setTextData(),e}return e=p,(n=[{key:"_getTextPathLength",value:function(){return f.Path.getPathLength(this.dataArray)}},{key:"_getPointAtLength",value:function(t){return this.attrs.data?t-1>this.pathLength?null:f.Path.getPointAtLengthOfDataArray(t,this.dataArray):null}},{key:"_readDataAttribute",value:function(){this.dataArray=f.Path.parsePathData(this.attrs.data),this.pathLength=this._getTextPathLength()}},{key:"_sceneFunc",value:function(t){t.setAttr("font",this._getContextFont()),t.setAttr("textBaseline",this.textBaseline()),t.setAttr("textAlign","left"),t.save();var e=this.textDecoration(),n=this.fill(),r=this.fontSize(),i=this.glyphInfo;"underline"===e&&t.beginPath();for(var o=0;o<i.length;o++){t.save();var a=i[o].p0;t.translate(a.x,a.y),t.rotate(i[o].rotation),this.partialText=i[o].text,t.fillStrokeShape(this),"underline"===e&&(0===o&&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()}},{key:"_hitFunc",value:function(t){t.beginPath();var e=this.glyphInfo;if(e.length>=1){var n=e[0].p0;t.moveTo(n.x,n.y)}for(var r=0;r<e.length;r++){var i=e[r].p1;t.lineTo(i.x,i.y)}t.setAttr("lineWidth",this.fontSize()),t.setAttr("strokeStyle",this.colorKey),t.stroke()}},{key:"getTextWidth",value:function(){return this.textWidth}},{key:"getTextHeight",value:function(){return s.Util.warn("text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height."),this.textHeight}},{key:"setText",value:function(t){return h.Text.prototype.setText.call(this,t)}},{key:"_getContextFont",value:function(){return h.Text.prototype._getContextFont.call(this)}},{key:"_getTextSize",value:function(t){var e=this.dummyCanvas.getContext("2d");e.save(),e.font=this._getContextFont();var n=e.measureText(t);return e.restore(),{width:n.width,height:parseInt("".concat(this.fontSize()),10)}}},{key:"_setTextData",value:function(){var t=this._getTextSize(this.attrs.text),e=t.width,n=t.height;if(this.textWidth=e,this.textHeight=n,this.glyphInfo=[],!this.attrs.data)return null;var r=this.letterSpacing(),i=this.align(),o=this.kerningFunc(),a=Math.max(this.textWidth+((this.attrs.text||"").length-1)*r,0),l=0;"center"===i&&(l=Math.max(0,this.pathLength/2-a/2)),"right"===i&&(l=Math.max(0,this.pathLength-a));for(var s=(0,h.stringToArray)(this.text()),u=l,c=0;c<s.length;c++){var d=this._getPointAtLength(u);if(!d)return;var p=this._getTextSize(s[c]).width+r;if(" "===s[c]&&"justify"===i){var y=this.text().split(" ").length-1;p+=(this.pathLength-a)/y}var v=this._getPointAtLength(u+p);if(!v)return;var g=f.Path.getLineLength(d.x,d.y,v.x,v.y),m=0;if(o)try{m=o(s[c-1],s[c])*this.fontSize()}catch(t){m=0}d.x+=m,v.x+=m,this.textWidth+=m;var b=f.Path.getPointOnLine(m+g/2,d.x,d.y,v.x,v.y),_=Math.atan2(v.y-d.y,v.x-d.x);this.glyphInfo.push({transposeX:b.x,transposeY:b.y,text:s[c],rotation:_,p0:d,p1:v}),u+=p}}},{key:"getSelfRect",value:function(){if(!this.glyphInfo.length)return{x:0,y:0,width:0,height:0};var t=[];this.glyphInfo.forEach((function(e){t.push(e.p0.x),t.push(e.p0.y),t.push(e.p1.x),t.push(e.p1.y)}));for(var e,n,r=t[0]||0,i=t[0]||0,o=t[1]||0,a=t[1]||0,l=0;l<t.length/2;l++)e=t[2*l],n=t[2*l+1],r=Math.min(r,e),i=Math.max(i,e),o=Math.min(o,n),a=Math.max(a,n);var s=this.fontSize();return{x:r-s/2,y:o-s/2,width:i-r+s,height:a-o+s}}},{key:"destroy",value:function(){return s.Util.releaseCanvas(this.dummyCanvas),o(l(p.prototype),"destroy",this).call(this)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),p}(c.Shape);e.TextPath=m,m.prototype._fillFunc=v,m.prototype._strokeFunc=g,m.prototype._fillFuncHit=v,m.prototype._strokeFuncHit=g,m.prototype.className="TextPath",m.prototype._attrsAffectingSize=["text","fontSize","data"],(0,p._registerNode)(m),u.Factory.addGetterSetter(m,"data"),u.Factory.addGetterSetter(m,"fontFamily","Arial"),u.Factory.addGetterSetter(m,"fontSize",12,(0,d.getNumberValidator)()),u.Factory.addGetterSetter(m,"fontStyle",y),u.Factory.addGetterSetter(m,"align","left"),u.Factory.addGetterSetter(m,"letterSpacing",0,(0,d.getNumberValidator)()),u.Factory.addGetterSetter(m,"textBaseline","middle"),u.Factory.addGetterSetter(m,"fontVariant",y),u.Factory.addGetterSetter(m,"text",""),u.Factory.addGetterSetter(m,"textDecoration",null),u.Factory.addGetterSetter(m,"kerningFunc",null)},7811:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}},o.apply(this,arguments)}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Transformer=void 0;var u=n(773),c=n(6473),f=n(6673),h=n(7427),d=n(7725),p=n(8873),y=n(867),v=n(6836),g=n(867),m="tr-konva",b=["resizeEnabledChange","rotateAnchorOffsetChange","rotateEnabledChange","enabledAnchorsChange","anchorSizeChange","borderEnabledChange","borderStrokeChange","borderStrokeWidthChange","borderDashChange","anchorStrokeChange","anchorStrokeWidthChange","anchorFillChange","anchorCornerRadiusChange","ignoreStrokeChange"].map((function(t){return t+".".concat(m)})).join(" "),_="nodesRect",S=["widthChange","heightChange","scaleXChange","scaleYChange","skewXChange","skewYChange","rotationChange","offsetXChange","offsetYChange","transformsEnabledChange","strokeWidthChange"],w={"top-left":-45,"top-center":0,"top-right":45,"middle-right":-90,"middle-left":90,"bottom-left":-135,"bottom-center":180,"bottom-right":135},k="ontouchstart"in y.Konva._global,x=["top-left","top-center","top-right","middle-right","middle-left","bottom-left","bottom-center","bottom-right"];function P(t,e,n){var 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 Object.assign(Object.assign({},t),{rotation:t.rotation+e,x:r,y:i})}var C=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(C,t);var e,n,c,v,g=(c=C,v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=s(c);if(v){var n=s(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}(this,t)});function C(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,C),(e=g.call(this,t))._transforming=!1,e._createElements(),e._handleMouseMove=e._handleMouseMove.bind(l(e)),e._handleMouseUp=e._handleMouseUp.bind(l(e)),e.update=e.update.bind(l(e)),e.on(b,e.update),e.getNode()&&e.update(),e}return e=C,n=[{key:"attachTo",value:function(t){return this.setNode(t),this}},{key:"setNode",value:function(t){return u.Util.warn("tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead."),this.setNodes([t])}},{key:"getNode",value:function(){return this._nodes&&this._nodes[0]}},{key:"_getEventNamespace",value:function(){return m+this._id}},{key:"setNodes",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._nodes&&this._nodes.length&&this.detach();var n=e.filter((function(e){return!e.isAncestorOf(t)||(u.Util.error("Konva.Transformer cannot be an a child of the node you are trying to attach"),!1)}));return this._nodes=e=n,1===e.length&&this.useSingleNodeRotation()?this.rotation(e[0].getAbsoluteRotation()):this.rotation(0),this._nodes.forEach((function(e){var n=function(){1===t.nodes().length&&t.useSingleNodeRotation()&&t.rotation(t.nodes()[0].getAbsoluteRotation()),t._resetTransformCache(),t._transforming||t.isDragging()||t.update()},r=e._attrsAffectingSize.map((function(e){return e+"Change."+t._getEventNamespace()})).join(" ");e.on(r,n),e.on(S.map((function(e){return e+".".concat(t._getEventNamespace())})).join(" "),n),e.on("absoluteTransformChange.".concat(t._getEventNamespace()),n),t._proxyDrag(e)})),this._resetTransformCache(),!!this.findOne(".top-left")&&this.update(),this}},{key:"_proxyDrag",value:function(t){var e,n=this;t.on("dragstart.".concat(this._getEventNamespace()),(function(r){e=t.getAbsolutePosition(),n.isDragging()||t===n.findOne(".back")||n.startDrag(r,!1)})),t.on("dragmove.".concat(this._getEventNamespace()),(function(r){if(e){var i=t.getAbsolutePosition(),o=i.x-e.x,a=i.y-e.y;n.nodes().forEach((function(e){if(e!==t&&!e.isDragging()){var n=e.getAbsolutePosition();e.setAbsolutePosition({x:n.x+o,y:n.y+a}),e.startDrag(r)}})),e=null}}))}},{key:"getNodes",value:function(){return this._nodes||[]}},{key:"getActiveAnchor",value:function(){return this._movingAnchorName}},{key:"detach",value:function(){var t=this;this._nodes&&this._nodes.forEach((function(e){e.off("."+t._getEventNamespace())})),this._nodes=[],this._resetTransformCache()}},{key:"_resetTransformCache",value:function(){this._clearCache(_),this._clearCache("transform"),this._clearSelfAndDescendantCache("absoluteTransform")}},{key:"_getNodeRect",value:function(){return this._getCache(_,this.__getNodeRect)}},{key:"__getNodeShape",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rotation(),n=arguments.length>2?arguments[2]:void 0,r=t.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:this.ignoreStroke()}),i=t.getAbsoluteScale(n),o=t.getAbsolutePosition(n),a=r.x*i.x-t.offsetX()*i.x,l=r.y*i.y-t.offsetY()*i.y,s=(y.Konva.getAngle(t.getAbsoluteRotation())+2*Math.PI)%(2*Math.PI);return P({x:o.x+a*Math.cos(s)+l*Math.sin(-s),y:o.y+l*Math.cos(s)+a*Math.sin(s),width:r.width*i.x,height:r.height*i.y,rotation:s},-y.Konva.getAngle(e),{x:0,y:0})}},{key:"__getNodeRect",value:function(){var t=this;if(!this.getNode())return{x:-1e8,y:-1e8,width:0,height:0,rotation:0};var e=[];this.nodes().map((function(n){var r=n.getClientRect({skipTransform:!0,skipShadow:!0,skipStroke:t.ignoreStroke()}),i=[{x:r.x,y:r.y},{x:r.x+r.width,y:r.y},{x:r.x+r.width,y:r.y+r.height},{x:r.x,y:r.y+r.height}],o=n.getAbsoluteTransform();i.forEach((function(t){var n=o.point(t);e.push(n)}))}));var n,r,i,o,a=new u.Transform;a.rotate(-y.Konva.getAngle(this.rotation())),e.forEach((function(t){var e=a.point(t);void 0===n&&(n=i=e.x,r=o=e.y),n=Math.min(n,e.x),r=Math.min(r,e.y),i=Math.max(i,e.x),o=Math.max(o,e.y)})),a.invert();var l=a.point({x:n,y:r});return{x:l.x,y:l.y,width:i-n,height:o-r,rotation:y.Konva.getAngle(this.rotation())}}},{key:"getX",value:function(){return this._getNodeRect().x}},{key:"getY",value:function(){return this._getNodeRect().y}},{key:"getWidth",value:function(){return this._getNodeRect().width}},{key:"getHeight",value:function(){return this._getNodeRect().height}},{key:"_createElements",value:function(){this._createBack(),x.forEach(function(t){this._createAnchor(t)}.bind(this)),this._createAnchor("rotater")}},{key:"_createAnchor",value:function(t){var e=this,n=new d.Rect({stroke:"rgb(0, 161, 255)",fill:"white",strokeWidth:1,name:t+" _anchor",dragDistance:0,draggable:!0,hitStrokeWidth:k?10:"auto"}),r=this;n.on("mousedown touchstart",(function(t){r._handleMouseDown(t)})),n.on("dragstart",(function(t){n.stopDrag(),t.cancelBubble=!0})),n.on("dragend",(function(t){t.cancelBubble=!0})),n.on("mouseenter",(function(){var r=y.Konva.getAngle(e.rotation()),i=function(t,e){if("rotater"===t)return"crosshair";e+=u.Util.degToRad(w[t]||0);var n=(u.Util.radToDeg(e)%360+360)%360;return u.Util._inRange(n,337.5,360)||u.Util._inRange(n,0,22.5)?"ns-resize":u.Util._inRange(n,22.5,67.5)?"nesw-resize":u.Util._inRange(n,67.5,112.5)?"ew-resize":u.Util._inRange(n,112.5,157.5)?"nwse-resize":u.Util._inRange(n,157.5,202.5)?"ns-resize":u.Util._inRange(n,202.5,247.5)?"nesw-resize":u.Util._inRange(n,247.5,292.5)?"ew-resize":u.Util._inRange(n,292.5,337.5)?"nwse-resize":(u.Util.error("Transformer has unknown angle for cursor detection: "+n),"pointer")}(t,r);n.getStage().content&&(n.getStage().content.style.cursor=i),e._cursorChange=!0})),n.on("mouseout",(function(){n.getStage().content&&(n.getStage().content.style.cursor=""),e._cursorChange=!1})),this.add(n)}},{key:"_createBack",value:function(){var t=this,e=new h.Shape({name:"back",width:0,height:0,draggable:!0,sceneFunc:function(t){var e=this.getParent(),n=e.padding();t.beginPath(),t.rect(-n,-n,this.width()+2*n,this.height()+2*n),t.moveTo(this.width()/2,-n),e.rotateEnabled()&&t.lineTo(this.width()/2,-e.rotateAnchorOffset()*u.Util._sign(this.height())-n),t.fillStrokeShape(this)},hitFunc:function(e,n){if(t.shouldOverdrawWholeArea()){var r=t.padding();e.beginPath(),e.rect(-r,-r,n.width()+2*r,n.height()+2*r),e.fillStrokeShape(n)}}});this.add(e),this._proxyDrag(e),e.on("dragstart",(function(t){t.cancelBubble=!0})),e.on("dragmove",(function(t){t.cancelBubble=!0})),e.on("dragend",(function(t){t.cancelBubble=!0})),this.on("dragmove",(function(e){t.update()}))}},{key:"_handleMouseDown",value:function(t){this._movingAnchorName=t.target.name().split(" ")[0];var 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;var o=t.target.getAbsolutePosition(),a=t.target.getStage().getPointerPosition();this._anchorDragOffset={x:a.x-o.x,y:a.y-o.y},this._fire("transformstart",{evt:t.evt,target:this.getNode()}),this._nodes.forEach((function(e){e._fire("transformstart",{evt:t.evt,target:e})}))}},{key:"_handleMouseMove",value:function(t){var e,n,r,i=this.findOne("."+this._movingAnchorName),o=i.getStage();o.setPointersPositions(t);var a=o.getPointerPosition(),l={x:a.x-this._anchorDragOffset.x,y:a.y-this._anchorDragOffset.y},s=i.getAbsolutePosition();this.anchorDragBoundFunc()&&(l=this.anchorDragBoundFunc()(s,l,t)),i.setAbsolutePosition(l);var u=i.getAbsolutePosition();if(s.x!==u.x||s.y!==u.y)if("rotater"!==this._movingAnchorName){var c,f=this.shiftBehavior();c="inverted"===f?this.keepRatio()&&!t.shiftKey:"none"===f?this.keepRatio():this.keepRatio()||t.shiftKey;var h=this.centeredScaling()||t.altKey;if("top-left"===this._movingAnchorName){if(c){var d=h?{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(d.x-i.x(),2)+Math.pow(d.y-i.y(),2));var p=this.findOne(".top-left").x()>d.x?-1:1,v=this.findOne(".top-left").y()>d.y?-1:1;e=r*this.cos*p,n=r*this.sin*v,this.findOne(".top-left").x(d.x-e),this.findOne(".top-left").y(d.y-n)}}else if("top-center"===this._movingAnchorName)this.findOne(".top-left").y(i.y());else if("top-right"===this._movingAnchorName){c&&(d=h?{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(i.x()-d.x,2)+Math.pow(d.y-i.y(),2)),p=this.findOne(".top-right").x()<d.x?-1:1,v=this.findOne(".top-right").y()>d.y?-1:1,e=r*this.cos*p,n=r*this.sin*v,this.findOne(".top-right").x(d.x+e),this.findOne(".top-right").y(d.y-n));var g=i.position();this.findOne(".top-left").y(g.y),this.findOne(".bottom-right").x(g.x)}else"middle-left"===this._movingAnchorName?this.findOne(".top-left").x(i.x()):"middle-right"===this._movingAnchorName?this.findOne(".bottom-right").x(i.x()):"bottom-left"===this._movingAnchorName?(c&&(d=h?{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(d.x-i.x(),2)+Math.pow(i.y()-d.y,2)),p=d.x<i.x()?-1:1,v=i.y()<d.y?-1:1,e=r*this.cos*p,n=r*this.sin*v,i.x(d.x-e),i.y(d.y+n)),g=i.position(),this.findOne(".top-left").x(g.x),this.findOne(".bottom-right").y(g.y)):"bottom-center"===this._movingAnchorName?this.findOne(".bottom-right").y(i.y()):"bottom-right"===this._movingAnchorName?c&&(d=h?{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(i.x()-d.x,2)+Math.pow(i.y()-d.y,2)),p=this.findOne(".bottom-right").x()<d.x?-1:1,v=this.findOne(".bottom-right").y()<d.y?-1:1,e=r*this.cos*p,n=r*this.sin*v,this.findOne(".bottom-right").x(d.x+e),this.findOne(".bottom-right").y(d.y+n)):console.error(new Error("Wrong position argument of selection resizer: "+this._movingAnchorName));if(h=this.centeredScaling()||t.altKey){var m=this.findOne(".top-left"),b=this.findOne(".bottom-right"),_=m.x(),S=m.y(),w=this.getWidth()-b.x(),k=this.getHeight()-b.y();b.move({x:-_,y:-S}),m.move({x:w,y:k})}var x=this.findOne(".top-left").getAbsolutePosition();e=x.x,n=x.y;var C=this.findOne(".bottom-right").x()-this.findOne(".top-left").x(),O=this.findOne(".bottom-right").y()-this.findOne(".top-left").y();this._fitNodesInto({x:e,y:n,width:C,height:O,rotation:y.Konva.getAngle(this.rotation())},t)}else{var T=this._getNodeRect();e=i.x()-T.width/2,n=-i.y()+T.height/2;var E=Math.atan2(-n,e)+Math.PI/2;T.height<0&&(E-=Math.PI);var R=y.Konva.getAngle(this.rotation())+E,j=y.Konva.getAngle(this.rotationSnapTolerance()),A=function(t,e,n){for(var r=e,i=0;i<t.length;i++){var o=y.Konva.getAngle(t[i]),a=Math.abs(o-e)%(2*Math.PI);Math.min(a,2*Math.PI-a)<n&&(r=o)}return r}(this.rotationSnaps(),R,j),M=function(t,e){var n=function(t){return{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)}}(t);return P(t,e,n)}(T,A-T.rotation);this._fitNodesInto(M,t)}}},{key:"_handleMouseUp",value:function(t){this._removeEvents(t)}},{key:"getAbsoluteTransform",value:function(){return this.getTransform()}},{key:"_removeEvents",value:function(t){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));var e=this.getNode();this._fire("transformend",{evt:t,target:e}),e&&this._nodes.forEach((function(e){e._fire("transformend",{evt:t,target:e})})),this._movingAnchorName=null}}},{key:"_fitNodesInto",value:function(t,e){var n=this,r=this._getNodeRect();if(u.Util._inRange(t.width,2*-this.padding()-1,1))this.update();else if(u.Util._inRange(t.height,2*-this.padding()-1,1))this.update();else{var i=this.flipEnabled(),o=new u.Transform;if(o.rotate(y.Konva.getAngle(this.rotation())),this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("left")>=0){var a=o.point({x:2*-this.padding(),y:0});if(t.x+=a.x,t.y+=a.y,t.width+=2*this.padding(),this._movingAnchorName=this._movingAnchorName.replace("left","right"),this._anchorDragOffset.x-=a.x,this._anchorDragOffset.y-=a.y,!i)return void this.update()}else if(this._movingAnchorName&&t.width<0&&this._movingAnchorName.indexOf("right")>=0){var l=o.point({x:2*this.padding(),y:0});if(this._movingAnchorName=this._movingAnchorName.replace("right","left"),this._anchorDragOffset.x-=l.x,this._anchorDragOffset.y-=l.y,t.width+=2*this.padding(),!i)return void this.update()}if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("top")>=0){var s=o.point({x:0,y:2*-this.padding()});if(t.x+=s.x,t.y+=s.y,this._movingAnchorName=this._movingAnchorName.replace("top","bottom"),this._anchorDragOffset.x-=s.x,this._anchorDragOffset.y-=s.y,t.height+=2*this.padding(),!i)return void this.update()}else if(this._movingAnchorName&&t.height<0&&this._movingAnchorName.indexOf("bottom")>=0){var c=o.point({x:0,y:2*this.padding()});if(this._movingAnchorName=this._movingAnchorName.replace("bottom","top"),this._anchorDragOffset.x-=c.x,this._anchorDragOffset.y-=c.y,t.height+=2*this.padding(),!i)return void this.update()}if(this.boundBoxFunc()){var f=this.boundBoxFunc()(r,t);f?t=f:u.Util.warn("boundBoxFunc returned falsy. You should return new bound rect from it!")}var h=1e7,d=new u.Transform;d.translate(r.x,r.y),d.rotate(r.rotation),d.scale(r.width/h,r.height/h);var p=new u.Transform;p.translate(t.x,t.y),p.rotate(t.rotation),p.scale(t.width/h,t.height/h);var v=p.multiply(d.invert());this._nodes.forEach((function(t){var r,i=t.getParent().getAbsoluteTransform(),o=t.getTransform().copy();o.translate(t.offsetX(),t.offsetY());var a=new u.Transform;a.multiply(i.copy().invert()).multiply(v).multiply(i).multiply(o);var l=a.decompose();t.setAttrs(l),n._fire("transform",{evt:e,target:t}),t._fire("transform",{evt:e,target:t}),null===(r=t.getLayer())||void 0===r||r.batchDraw()})),this.rotation(u.Util._getRotation(t.rotation)),this._resetTransformCache(),this.update(),this.getLayer().batchDraw()}}},{key:"forceUpdate",value:function(){this._resetTransformCache(),this.update()}},{key:"_batchChangeChild",value:function(t,e){this.findOne(t).setAttrs(e)}},{key:"update",value:function(){var t,e=this,n=this._getNodeRect();this.rotation(u.Util._getRotation(n.rotation));var r=n.width,i=n.height,o=this.enabledAnchors(),a=this.resizeEnabled(),l=this.padding(),s=this.anchorSize();this.find("._anchor").forEach((function(t){t.setAttrs({width:s,height:s,offsetX:s/2,offsetY:s/2,stroke:e.anchorStroke(),strokeWidth:e.anchorStrokeWidth(),fill:e.anchorFill(),cornerRadius:e.anchorCornerRadius()})})),this._batchChangeChild(".top-left",{x:0,y:0,offsetX:s/2+l,offsetY:s/2+l,visible:a&&o.indexOf("top-left")>=0}),this._batchChangeChild(".top-center",{x:r/2,y:0,offsetY:s/2+l,visible:a&&o.indexOf("top-center")>=0}),this._batchChangeChild(".top-right",{x:r,y:0,offsetX:s/2-l,offsetY:s/2+l,visible:a&&o.indexOf("top-right")>=0}),this._batchChangeChild(".middle-left",{x:0,y:i/2,offsetX:s/2+l,visible:a&&o.indexOf("middle-left")>=0}),this._batchChangeChild(".middle-right",{x:r,y:i/2,offsetX:s/2-l,visible:a&&o.indexOf("middle-right")>=0}),this._batchChangeChild(".bottom-left",{x:0,y:i,offsetX:s/2+l,offsetY:s/2-l,visible:a&&o.indexOf("bottom-left")>=0}),this._batchChangeChild(".bottom-center",{x:r/2,y:i,offsetY:s/2-l,visible:a&&o.indexOf("bottom-center")>=0}),this._batchChangeChild(".bottom-right",{x:r,y:i,offsetX:s/2-l,offsetY:s/2-l,visible:a&&o.indexOf("bottom-right")>=0}),this._batchChangeChild(".rotater",{x:r/2,y:-this.rotateAnchorOffset()*u.Util._sign(i)-l,visible:this.rotateEnabled()}),this._batchChangeChild(".back",{width:r,height:i,visible:this.borderEnabled(),stroke:this.borderStroke(),strokeWidth:this.borderStrokeWidth(),dash:this.borderDash(),x:0,y:0}),null===(t=this.getLayer())||void 0===t||t.batchDraw()}},{key:"isTransforming",value:function(){return this._transforming}},{key:"stopTransform",value:function(){if(this._transforming){this._removeEvents();var t=this.findOne("."+this._movingAnchorName);t&&t.stopDrag()}}},{key:"destroy",value:function(){return this.getStage()&&this._cursorChange&&this.getStage().content&&(this.getStage().content.style.cursor=""),p.Group.prototype.destroy.call(this),this.detach(),this._removeEvents(),this}},{key:"toObject",value:function(){return f.Node.prototype.toObject.call(this)}},{key:"clone",value:function(t){return f.Node.prototype.clone.call(this,t)}},{key:"getClientRect",value:function(){return this.nodes().length>0?o(s(C.prototype),"getClientRect",this).call(this):{x:0,y:0,width:0,height:0}}}],n&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),C}(p.Group);e.Transformer=C,C.prototype.className="Transformer",(0,g._registerNode)(C),c.Factory.addGetterSetter(C,"enabledAnchors",x,(function(t){return t instanceof Array||u.Util.warn("enabledAnchors value should be an array"),t instanceof Array&&t.forEach((function(t){-1===x.indexOf(t)&&u.Util.warn("Unknown anchor name: "+t+". Available names are: "+x.join(", "))})),t||[]})),c.Factory.addGetterSetter(C,"flipEnabled",!0,(0,v.getBooleanValidator)()),c.Factory.addGetterSetter(C,"resizeEnabled",!0),c.Factory.addGetterSetter(C,"anchorSize",10,(0,v.getNumberValidator)()),c.Factory.addGetterSetter(C,"rotateEnabled",!0),c.Factory.addGetterSetter(C,"rotationSnaps",[]),c.Factory.addGetterSetter(C,"rotateAnchorOffset",50,(0,v.getNumberValidator)()),c.Factory.addGetterSetter(C,"rotationSnapTolerance",5,(0,v.getNumberValidator)()),c.Factory.addGetterSetter(C,"borderEnabled",!0),c.Factory.addGetterSetter(C,"anchorStroke","rgb(0, 161, 255)"),c.Factory.addGetterSetter(C,"anchorStrokeWidth",1,(0,v.getNumberValidator)()),c.Factory.addGetterSetter(C,"anchorFill","white"),c.Factory.addGetterSetter(C,"anchorCornerRadius",0,(0,v.getNumberValidator)()),c.Factory.addGetterSetter(C,"borderStroke","rgb(0, 161, 255)"),c.Factory.addGetterSetter(C,"borderStrokeWidth",1,(0,v.getNumberValidator)()),c.Factory.addGetterSetter(C,"borderDash"),c.Factory.addGetterSetter(C,"keepRatio",!0),c.Factory.addGetterSetter(C,"shiftBehavior","default"),c.Factory.addGetterSetter(C,"centeredScaling",!1),c.Factory.addGetterSetter(C,"ignoreStroke",!1),c.Factory.addGetterSetter(C,"padding",0,(0,v.getNumberValidator)()),c.Factory.addGetterSetter(C,"node"),c.Factory.addGetterSetter(C,"nodes"),c.Factory.addGetterSetter(C,"boundBoxFunc"),c.Factory.addGetterSetter(C,"anchorDragBoundFunc"),c.Factory.addGetterSetter(C,"shouldOverdrawWholeArea",!1),c.Factory.addGetterSetter(C,"useSingleNodeRotation",!0),c.Factory.backCompat(C,{lineEnabled:"borderEnabled",rotateHandlerOffset:"rotateAnchorOffset",enabledHandlers:"enabledAnchors"})},8334:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(i.key),"symbol"===r(o)?o:String(o)),i)}var o}function o(t,e){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},o(t,e)}function a(t){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},a(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.Wedge=void 0;var l=n(6473),s=n(7427),u=n(867),c=n(6836),f=n(867),h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&o(t,e)}(f,t);var e,n,l,s,c=(l=f,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=a(l);if(s){var n=a(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),c.apply(this,arguments)}return e=f,(n=[{key:"_sceneFunc",value:function(t){t.beginPath(),t.arc(0,0,this.radius(),0,u.Konva.getAngle(this.angle()),this.clockwise()),t.lineTo(0,0),t.closePath(),t.fillStrokeShape(this)}},{key:"getWidth",value:function(){return 2*this.radius()}},{key:"getHeight",value:function(){return 2*this.radius()}},{key:"setWidth",value:function(t){this.radius(t/2)}},{key:"setHeight",value:function(t){this.radius(t/2)}}])&&i(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(s.Shape);e.Wedge=h,h.prototype.className="Wedge",h.prototype._centroid=!0,h.prototype._attrsAffectingSize=["radius"],(0,f._registerNode)(h),l.Factory.addGetterSetter(h,"radius",0,(0,c.getNumberValidator)()),l.Factory.addGetterSetter(h,"angle",0,(0,c.getNumberValidator)()),l.Factory.addGetterSetter(h,"clockwise",!1),l.Factory.backCompat(h,{angleDeg:"angle",getAngleDeg:"getAngle",setAngleDeg:"setAngle"})},2636:function(t,e,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),n(4015),i(n(4025),e)},4025:function(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!==r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===r(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),u=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&l(e,t,n);return s(e,t),e},c=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.useStrictMode=e.Stage=e.KonvaRenderer=e.Transformer=e.Shape=e.Arrow=e.RegularPolygon=e.Path=e.Tag=e.Arc=e.Ring=e.Star=e.TextPath=e.Text=e.Image=e.Sprite=e.Line=e.Wedge=e.Ellipse=e.Circle=e.Rect=e.Label=e.Group=e.FastLayer=e.Layer=void 0;var f=c(n(440)),h=c(n(753)),d=c(n(3915)),p=n(9266),y=u(n(4779)),v=n(3112),g=n(9323),m=function(t){var n,r,i=f.default.useRef(),o=f.default.useRef(),a=f.default.useRef(),l=(n=t,r=f.default.useRef(),f.default.useLayoutEffect((function(){r.current=n})),r.current),s=(0,g.useContextBridge)(),u=function(e){var n=t.forwardedRef;n&&("function"==typeof n?n(e):n.current=e)};return f.default.useLayoutEffect((function(){return o.current=new h.default.Stage({width:t.width,height:t.height,container:i.current}),u(o.current),a.current=e.KonvaRenderer.createContainer(o.current,p.LegacyRoot,!1,null),e.KonvaRenderer.updateContainer(f.default.createElement(s,{},t.children),a.current),function(){h.default.isBrowser&&(u(null),e.KonvaRenderer.updateContainer(null,a.current,null),o.current.destroy())}}),[]),f.default.useLayoutEffect((function(){u(o.current),(0,v.applyNodeProps)(o.current,t,l),e.KonvaRenderer.updateContainer(f.default.createElement(s,{},t.children),a.current,null)})),f.default.createElement("div",{ref:i,accessKey:t.accessKey,className:t.className,role:t.role,style:t.style,tabIndex:t.tabIndex,title:t.title})};e.Layer="Layer",e.FastLayer="FastLayer",e.Group="Group",e.Label="Label",e.Rect="Rect",e.Circle="Circle",e.Ellipse="Ellipse",e.Wedge="Wedge",e.Line="Line",e.Sprite="Sprite",e.Image="Image",e.Text="Text",e.TextPath="TextPath",e.Star="Star",e.Ring="Ring",e.Arc="Arc",e.Tag="Tag",e.Path="Path",e.RegularPolygon="RegularPolygon",e.Arrow="Arrow",e.Shape="Shape",e.Transformer="Transformer",e.KonvaRenderer=(0,d.default)(y),e.KonvaRenderer.injectIntoDevTools({findHostInstanceByFiber:function(){return null},bundleType:0,version:f.default.version,rendererPackageName:"react-konva"}),e.Stage=f.default.forwardRef((function(t,e){return f.default.createElement(g.FiberProvider,{},f.default.createElement(m,o(o({},t),{},{forwardedRef:e})))})),e.useStrictMode=v.toggleStrictMode},4779:function(t,e,n){"use strict";var r=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.getCurrentEventPriority=e.detachDeletedInstance=e.clearContainer=e.unhideTextInstance=e.unhideInstance=e.hideTextInstance=e.hideInstance=e.commitUpdate=e.commitMount=e.commitTextUpdate=e.removeChildFromContainer=e.removeChild=e.insertInContainerBefore=e.insertBefore=e.appendChildToContainer=e.appendChild=e.supportsMutation=e.warnsIfNotActing=e.isPrimaryRenderer=e.shouldSetTextContent=e.noTimeout=e.cancelTimeout=e.scheduleTimeout=e.getChildHostContext=e.getRootHostContext=e.shouldDeprioritizeSubtree=e.resetTextContent=e.resetAfterCommit=e.prepareUpdate=e.preparePortalMount=e.prepareForCommit=e.getPublicInstance=e.finalizeInitialChildren=e.createTextInstance=e.createInstance=e.appendInitialChild=e.run=e.idlePriority=e.now=void 0;var i=r(n(753)),o=n(3112),a=n(2258);Object.defineProperty(e,"now",{enumerable:!0,get:function(){return a.unstable_now}}),Object.defineProperty(e,"idlePriority",{enumerable:!0,get:function(){return a.unstable_IdlePriority}}),Object.defineProperty(e,"run",{enumerable:!0,get:function(){return a.unstable_runWithPriority}});var l=n(9266),s={},u={};function c(t,e,n){e._remove(),t.add(e),e.setZIndex(n.getZIndex()),(0,o.updatePicture)(t)}i.default.Node.prototype._applyProps=o.applyNodeProps,e.appendInitialChild=function(t,e){"string"!=typeof e?(t.add(e),(0,o.updatePicture)(t)):console.error("Do not use plain text as child of Konva.Node. You are using text: ".concat(e))},e.createInstance=function(t,e,n){var r=i.default[t];r||(console.error("Konva has no node with the type ".concat(t,'. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: "import "konva/lib/shapes/').concat(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=i.default.Group);var a={},l={};for(var s in e)"on"===s.slice(0,2)?l[s]=e[s]:a[s]=e[s];var u=new r(a);return(0,o.applyNodeProps)(u,l),u},e.createTextInstance=function(t,e,n){console.error('Text components are not supported for now in ReactKonva. Your text is: "'.concat(t,'"'))},e.finalizeInitialChildren=function(t,e,n){return!1},e.getPublicInstance=function(t){return t},e.prepareForCommit=function(){return null},e.preparePortalMount=function(){return null},e.prepareUpdate=function(t,e,n,r){return u},e.resetAfterCommit=function(){},e.resetTextContent=function(t){},e.shouldDeprioritizeSubtree=function(t,e){return!1},e.getRootHostContext=function(){return s},e.getChildHostContext=function(){return s},e.scheduleTimeout=setTimeout,e.cancelTimeout=clearTimeout,e.noTimeout=-1,e.shouldSetTextContent=function(t,e){return!1},e.isPrimaryRenderer=!1,e.warnsIfNotActing=!0,e.supportsMutation=!0,e.appendChild=function(t,e){e.parent===t?e.moveToTop():t.add(e),(0,o.updatePicture)(t)},e.appendChildToContainer=function(t,e){e.parent===t?e.moveToTop():t.add(e),(0,o.updatePicture)(t)},e.insertBefore=c,e.insertInContainerBefore=function(t,e,n){c(t,e,n)},e.removeChild=function(t,e){e.destroy(),e.off(o.EVENTS_NAMESPACE),(0,o.updatePicture)(t)},e.removeChildFromContainer=function(t,e){e.destroy(),e.off(o.EVENTS_NAMESPACE),(0,o.updatePicture)(t)},e.commitTextUpdate=function(t,e,n){console.error('Text components are not yet supported in ReactKonva. You text is: "'.concat(n,'"'))},e.commitMount=function(t,e,n){},e.commitUpdate=function(t,e,n,r,i){(0,o.applyNodeProps)(t,i,r)},e.hideInstance=function(t){t.hide(),(0,o.updatePicture)(t)},e.hideTextInstance=function(t){},e.unhideInstance=function(t,e){(null==e.visible||e.visible)&&t.show()},e.unhideTextInstance=function(t,e){},e.clearContainer=function(t){},e.detachDeletedInstance=function(){},e.getCurrentEventPriority=function(){return l.DefaultEventPriority}},3112:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.updatePicture=e.applyNodeProps=e.toggleStrictMode=e.EVENTS_NAMESPACE=void 0;var r=n(867),i={children:!0,ref:!0,key:!0,style:!0,forwardedRef:!0,unstable_applyCache:!0,unstable_applyDrawHitFromCache:!0},o=!1,a=!1;e.EVENTS_NAMESPACE=".react-konva-event";var l=!1;e.toggleStrictMode=function(t){l=t};var s={};function u(t){if(!r.Konva.autoDrawEnabled){var e=t.getLayer()||t.getStage();e&&e.batchDraw()}}e.applyNodeProps=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s;if(!o&&"zIndex"in n&&(console.warn('ReactKonva: You are using "zIndex" attribute for a Konva node.\nreact-konva may get confused with ordering. Just define correct order of elements in your render function of a component.\nFor more info see: https://github.com/konvajs/react-konva/issues/194\n'),o=!0),!a&&n.draggable){var c=void 0!==n.x||void 0!==n.y,f=n.onDragEnd||n.onDragMove;c&&!f&&(console.warn("ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.\nPosition of a node will be changed during drag&drop, so you should update state of the react app as well.\nConsider to add onDragMove or onDragEnd events.\nFor more info see: https://github.com/konvajs/react-konva/issues/256\n"),a=!0)}for(var h in r)if(!i[h]){var d="on"===h.slice(0,2),p=r[h]!==n[h];d&&p&&("content"===(_=h.substr(2).toLowerCase()).substr(0,7)&&(_="content"+_.substr(7,1).toUpperCase()+_.substr(8)),t.off(_,r[h])),!n.hasOwnProperty(h)&&t.setAttr(h,void 0)}var y=l||n._useStrictMode,v={},g=!1,m={};for(var h in n)if(!i[h]){d="on"===h.slice(0,2);var b=r[h]!==n[h];d&&b&&("content"===(_=h.substr(2).toLowerCase()).substr(0,7)&&(_="content"+_.substr(7,1).toUpperCase()+_.substr(8)),n[h]&&(m[_]=n[h])),!d&&(n[h]!==r[h]||y&&n[h]!==t.getAttr(h))&&(g=!0,v[h]=n[h])}for(var _ in g&&(t.setAttrs(v),u(t)),m)t.on(_+e.EVENTS_NAMESPACE,m[_])},e.updatePicture=u},5489:(t,e)=>{"use strict";e.ConcurrentRoot=1,e.ContinuousEventPriority=4,e.DefaultEventPriority=16,e.DiscreteEventPriority=1,e.IdleEventPriority=536870912,e.LegacyRoot=0},1404:(t,e,n)=>{function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}t.exports=function(t){var e={},i=n(440),o=n(2258),a=Object.assign;function l(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 s=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u=Symbol.for("react.element"),c=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),y=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),b=Symbol.for("react.memo"),_=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var S=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var w=Symbol.iterator;function k(t){return null===t||"object"!==r(t)?null:"function"==typeof(t=w&&t[w]||t["@@iterator"])?t:null}function x(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 f:return"Fragment";case c:return"Portal";case d:return"Profiler";case h:return"StrictMode";case g:return"Suspense";case m:return"SuspenseList"}if("object"===r(t))switch(t.$$typeof){case y:return(t.displayName||"Context")+".Consumer";case p:return(t._context.displayName||"Context")+".Provider";case v:var e=t.render;return(t=t.displayName)||(t=""!==(t=e.displayName||e.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case b:return null!==(e=t.displayName||null)?e:x(t.type)||"Memo";case _:e=t._payload,t=t._init;try{return x(t(e))}catch(t){}}return null}function P(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 x(e);case 8:return e===h?"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}function C(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 O(t){if(C(t)!==t)throw Error(l(188))}function T(t){var e=t.alternate;if(!e){if(null===(e=C(t)))throw Error(l(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return O(i),t;if(o===r)return O(i),e;o=o.sibling}throw Error(l(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(l(189))}}if(n.alternate!==r)throw Error(l(190))}if(3!==n.tag)throw Error(l(188));return n.stateNode.current===n?t:e}function E(t){return null!==(t=T(t))?R(t):null}function R(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var e=R(t);if(null!==e)return e;t=t.sibling}return null}function j(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){if(4!==t.tag){var e=j(t);if(null!==e)return e}t=t.sibling}return null}var A,M=Array.isArray,N=t.getPublicInstance,F=t.getRootHostContext,D=t.getChildHostContext,I=t.prepareForCommit,L=t.resetAfterCommit,G=t.createInstance,z=t.appendInitialChild,U=t.finalizeInitialChildren,B=t.prepareUpdate,H=t.shouldSetTextContent,V=t.createTextInstance,W=t.scheduleTimeout,K=t.cancelTimeout,Y=t.noTimeout,q=t.isPrimaryRenderer,X=t.supportsMutation,Q=t.supportsPersistence,$=t.supportsHydration,J=t.getInstanceFromNode,Z=t.preparePortalMount,tt=t.getCurrentEventPriority,et=t.detachDeletedInstance,nt=t.supportsMicrotasks,rt=t.scheduleMicrotask,it=t.supportsTestSelectors,ot=t.findFiberRoot,at=t.getBoundingRect,lt=t.getTextContent,st=t.isHiddenSubtree,ut=t.matchAccessibilityRole,ct=t.setFocusIfFocusable,ft=t.setupIntersectionObserver,ht=t.appendChild,dt=t.appendChildToContainer,pt=t.commitTextUpdate,yt=t.commitMount,vt=t.commitUpdate,gt=t.insertBefore,mt=t.insertInContainerBefore,bt=t.removeChild,_t=t.removeChildFromContainer,St=t.resetTextContent,wt=t.hideInstance,kt=t.hideTextInstance,xt=t.unhideInstance,Pt=t.unhideTextInstance,Ct=t.clearContainer,Ot=t.cloneInstance,Tt=t.createContainerChildSet,Et=t.appendChildToContainerChildSet,Rt=t.finalizeContainerChildren,jt=t.replaceContainerChildren,At=t.cloneHiddenInstance,Mt=t.cloneHiddenTextInstance,Nt=t.canHydrateInstance,Ft=t.canHydrateTextInstance,Dt=t.canHydrateSuspenseInstance,It=t.isSuspenseInstancePending,Lt=t.isSuspenseInstanceFallback,Gt=t.getSuspenseInstanceFallbackErrorDetails,zt=t.registerSuspenseInstanceRetry,Ut=t.getNextHydratableSibling,Bt=t.getFirstHydratableChild,Ht=t.getFirstHydratableChildWithinContainer,Vt=t.getFirstHydratableChildWithinSuspenseInstance,Wt=t.hydrateInstance,Kt=t.hydrateTextInstance,Yt=t.hydrateSuspenseInstance,qt=t.getNextHydratableInstanceAfterSuspenseInstance,Xt=t.commitHydratedContainer,Qt=t.commitHydratedSuspenseInstance,$t=t.clearSuspenseBoundary,Jt=t.clearSuspenseBoundaryFromContainer,Zt=t.shouldDeleteUnhydratedTailInstances,te=t.didNotMatchHydratedContainerTextInstance,ee=t.didNotMatchHydratedTextInstance;function ne(t){if(void 0===A)try{throw Error()}catch(t){var e=t.stack.trim().match(/\n( *(at )?)/);A=e&&e[1]||""}return"\n"+A+t}var re=!1;function ie(t,e){if(!t||re)return"";re=!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"===("undefined"==typeof Reflect?"undefined":r(Reflect))&&Reflect.construct){try{Reflect.construct(e,[])}catch(t){var i=t}Reflect.construct(t,[],e)}else{try{e.call()}catch(t){i=t}t.call(e.prototype)}else{try{throw Error()}catch(t){i=t}t()}}catch(e){if(e&&i&&"string"==typeof e.stack){for(var o=e.stack.split("\n"),a=i.stack.split("\n"),l=o.length-1,s=a.length-1;1<=l&&0<=s&&o[l]!==a[s];)s--;for(;1<=l&&0<=s;l--,s--)if(o[l]!==a[s]){if(1!==l||1!==s)do{if(l--,0>--s||o[l]!==a[s]){var u="\n"+o[l].replace(" at new "," at ");return t.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",t.displayName)),u}}while(1<=l&&0<=s);break}}}finally{re=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?ne(t):""}var oe=Object.prototype.hasOwnProperty,ae=[],le=-1;function se(t){return{current:t}}function ue(t){0>le||(t.current=ae[le],ae[le]=null,le--)}function ce(t,e){le++,ae[le]=t.current,t.current=e}var fe={},he=se(fe),de=se(!1),pe=fe;function ye(t,e){var n=t.type.contextTypes;if(!n)return fe;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=e[i];return r&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=o),o}function ve(t){return null!=t.childContextTypes}function ge(){ue(de),ue(he)}function me(t,e,n){if(he.current!==fe)throw Error(l(168));ce(he,e),ce(de,n)}function be(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(l(108,P(t)||"Unknown",i));return a({},n,r)}function _e(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||fe,pe=he.current,ce(he,t),ce(de,de.current),!0}function Se(t,e,n){var r=t.stateNode;if(!r)throw Error(l(169));n?(t=be(t,e,pe),r.__reactInternalMemoizedMergedChildContext=t,ue(de),ue(he),ce(he,t)):ue(de),ce(de,n)}var we=Math.clz32?Math.clz32:function(t){return 0==(t>>>=0)?32:31-(ke(t)/xe|0)|0},ke=Math.log,xe=Math.LN2,Pe=64,Ce=4194304;function Oe(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 Te(t,e){var n=t.pendingLanes;if(0===n)return 0;var r=0,i=t.suspendedLanes,o=t.pingedLanes,a=268435455&n;if(0!==a){var l=a&~i;0!==l?r=Oe(l):0!=(o&=a)&&(r=Oe(o))}else 0!=(a=n&~i)?r=Oe(a):0!==o&&(r=Oe(o));if(0===r)return 0;if(0!==e&&e!==r&&0==(e&i)&&((i=r&-r)>=(o=e&-e)||16===i&&0!=(4194240&o)))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-we(e)),r|=t[n],e&=~i;return r}function Ee(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}}function Re(t){return 0!=(t=-1073741825&t.pendingLanes)?t:1073741824&t?1073741824:0}function je(){var t=Pe;return 0==(4194240&(Pe<<=1))&&(Pe=64),t}function Ae(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Me(t,e,n){t.pendingLanes|=e,536870912!==e&&(t.suspendedLanes=0,t.pingedLanes=0),(t=t.eventTimes)[e=31-we(e)]=n}function Ne(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-we(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var Fe=0;function De(t){return 1<(t&=-t)?4<t?0!=(268435455&t)?16:536870912:4:1}var Ie=o.unstable_scheduleCallback,Le=o.unstable_cancelCallback,Ge=o.unstable_shouldYield,ze=o.unstable_requestPaint,Ue=o.unstable_now,Be=o.unstable_ImmediatePriority,He=o.unstable_UserBlockingPriority,Ve=o.unstable_NormalPriority,We=o.unstable_IdlePriority,Ke=null,Ye=null,qe="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},Xe=null,Qe=!1,$e=!1;function Je(t){null===Xe?Xe=[t]:Xe.push(t)}function Ze(){if(!$e&&null!==Xe){$e=!0;var t=0,e=Fe;try{var n=Xe;for(Fe=1;t<n.length;t++){var r=n[t];do{r=r(!0)}while(null!==r)}Xe=null,Qe=!1}catch(e){throw null!==Xe&&(Xe=Xe.slice(t+1)),Ie(Be,Ze),e}finally{Fe=e,$e=!1}}return null}var tn=[],en=0,nn=null,rn=0,on=[],an=0,ln=null,sn=1,un="";function cn(t,e){tn[en++]=rn,tn[en++]=nn,nn=t,rn=e}function fn(t,e,n){on[an++]=sn,on[an++]=un,on[an++]=ln,ln=t;var r=sn;t=un;var i=32-we(r)-1;r&=~(1<<i),n+=1;var o=32-we(e)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,sn=1<<32-we(e)+i|n<<i|r,un=o+t}else sn=1<<o|n<<i|r,un=t}function hn(t){null!==t.return&&(cn(t,1),fn(t,1,0))}function dn(t){for(;t===nn;)nn=tn[--en],tn[en]=null,rn=tn[--en],tn[en]=null;for(;t===ln;)ln=on[--an],on[an]=null,un=on[--an],on[an]=null,sn=on[--an],on[an]=null}var pn=null,yn=null,vn=!1,gn=!1,mn=null;function bn(t,e){var n=sl(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 _n(t,e){switch(t.tag){case 5:return null!==(e=Nt(e,t.type,t.pendingProps))&&(t.stateNode=e,pn=t,yn=Bt(e),!0);case 6:return null!==(e=Ft(e,t.pendingProps))&&(t.stateNode=e,pn=t,yn=null,!0);case 13:if(null!==(e=Dt(e))){var n=null!==ln?{id:sn,overflow:un}:null;return t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},(n=sl(18,null,null,0)).stateNode=e,n.return=t,t.child=n,pn=t,yn=null,!0}return!1;default:return!1}}function Sn(t){return 0!=(1&t.mode)&&0==(128&t.flags)}function wn(t){if(vn){var e=yn;if(e){var n=e;if(!_n(t,e)){if(Sn(t))throw Error(l(418));e=Ut(n);var r=pn;e&&_n(t,e)?bn(r,n):(t.flags=-4097&t.flags|2,vn=!1,pn=t)}}else{if(Sn(t))throw Error(l(418));t.flags=-4097&t.flags|2,vn=!1,pn=t}}}function kn(t){for(t=t.return;null!==t&&5!==t.tag&&3!==t.tag&&13!==t.tag;)t=t.return;pn=t}function xn(t){if(!$||t!==pn)return!1;if(!vn)return kn(t),vn=!0,!1;if(3!==t.tag&&(5!==t.tag||Zt(t.type)&&!H(t.type,t.memoizedProps))){var e=yn;if(e){if(Sn(t))throw Pn(),Error(l(418));for(;e;)bn(t,e),e=Ut(e)}}if(kn(t),13===t.tag){if(!$)throw Error(l(316));if(!(t=null!==(t=t.memoizedState)?t.dehydrated:null))throw Error(l(317));yn=qt(t)}else yn=pn?Ut(t.stateNode):null;return!0}function Pn(){for(var t=yn;t;)t=Ut(t)}function Cn(){$&&(yn=pn=null,gn=vn=!1)}function On(t){null===mn?mn=[t]:mn.push(t)}var Tn=s.ReactCurrentBatchConfig;function En(t,e){if(qe(t,e))return!0;if("object"!==r(t)||null===t||"object"!==r(e)||null===e)return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var o=n[i];if(!oe.call(e,o)||!qe(t[o],e[o]))return!1}return!0}function Rn(t){switch(t.tag){case 5:return ne(t.type);case 16:return ne("Lazy");case 13:return ne("Suspense");case 19:return ne("SuspenseList");case 0:case 2:case 15:return ie(t.type,!1);case 11:return ie(t.type.render,!1);case 1:return ie(t.type,!0);default:return""}}function jn(t,e){if(t&&t.defaultProps){for(var n in e=a({},e),t=t.defaultProps)void 0===e[n]&&(e[n]=t[n]);return e}return e}var An=se(null),Mn=null,Nn=null,Fn=null;function Dn(){Fn=Nn=Mn=null}function In(t,e,n){q?(ce(An,e._currentValue),e._currentValue=n):(ce(An,e._currentValue2),e._currentValue2=n)}function Ln(t){var e=An.current;ue(An),q?t._currentValue=e:t._currentValue2=e}function Gn(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 zn(t,e){Mn=t,Fn=Nn=null,null!==(t=t.dependencies)&&null!==t.firstContext&&(0!=(t.lanes&e)&&(Fi=!0),t.firstContext=null)}function Un(t){var e=q?t._currentValue:t._currentValue2;if(Fn!==t)if(t={context:t,memoizedValue:e,next:null},null===Nn){if(null===Mn)throw Error(l(308));Nn=t,Mn.dependencies={lanes:0,firstContext:t}}else Nn=Nn.next=t;return e}var Bn=null;function Hn(t){null===Bn?Bn=[t]:Bn.push(t)}function Vn(t,e,n,r){var i=e.interleaved;return null===i?(n.next=n,Hn(e)):(n.next=i.next,i.next=n),e.interleaved=n,Wn(t,r)}function Wn(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 Kn=!1;function Yn(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qn(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 Xn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Qn(t,e,n){var r=t.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&ia)){var i=r.pending;return null===i?e.next=e:(e.next=i.next,i.next=e),r.pending=e,Wn(t,n)}return null===(i=r.interleaved)?(e.next=e,Hn(r)):(e.next=i.next,i.next=e),r.interleaved=e,Wn(t,n)}function $n(t,e,n){if(null!==(e=e.updateQueue)&&(e=e.shared,0!=(4194240&n))){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,Ne(t,n)}}function Jn(t,e){var n=t.updateQueue,r=t.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=e:o=o.next=e}else i=o=e;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(t.updateQueue=n)}null===(t=n.lastBaseUpdate)?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Zn(t,e,n,r){var i=t.updateQueue;Kn=!1;var o=i.firstBaseUpdate,l=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var u=s,c=u.next;u.next=null,null===l?o=c:l.next=c,l=u;var f=t.alternate;null!==f&&(s=(f=f.updateQueue).lastBaseUpdate)!==l&&(null===s?f.firstBaseUpdate=c:s.next=c,f.lastBaseUpdate=u)}if(null!==o){var h=i.baseState;for(l=0,f=c=u=null,s=o;;){var d=s.lane,p=s.eventTime;if((r&d)===d){null!==f&&(f=f.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});t:{var y=t,v=s;switch(d=e,p=n,v.tag){case 1:if("function"==typeof(y=v.payload)){h=y.call(p,h,d);break t}h=y;break t;case 3:y.flags=-65537&y.flags|128;case 0:if(null==(d="function"==typeof(y=v.payload)?y.call(p,h,d):y))break t;h=a({},h,d);break t;case 2:Kn=!0}}null!==s.callback&&0!==s.lane&&(t.flags|=64,null===(d=i.effects)?i.effects=[s]:d.push(s))}else p={eventTime:p,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===f?(c=f=p,u=h):f=f.next=p,l|=d;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(d=s).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===f&&(u=h),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=f,null!==(e=i.shared.interleaved)){i=e;do{l|=i.lane,i=i.next}while(i!==e)}else null===o&&(i.shared.lanes=0);ha|=l,t.lanes=l,t.memoizedState=h}}function tr(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(l(191,i));i.call(r)}}}var er=(new i.Component).refs;function nr(t,e,n,r){n=null==(n=n(r,e=t.memoizedState))?e:a({},e,n),t.memoizedState=n,0===t.lanes&&(t.updateQueue.baseState=n)}var rr={isMounted:function(t){return!!(t=t._reactInternals)&&C(t)===t},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Aa(),i=Ma(t),o=Xn(r,i);o.payload=e,null!=n&&(o.callback=n),null!==(e=Qn(t,o,i))&&(Na(e,t,i,r),$n(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Aa(),i=Ma(t),o=Xn(r,i);o.tag=1,o.payload=e,null!=n&&(o.callback=n),null!==(e=Qn(t,o,i))&&(Na(e,t,i,r),$n(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Aa(),r=Ma(t),i=Xn(n,r);i.tag=2,null!=e&&(i.callback=e),null!==(e=Qn(t,i,r))&&(Na(e,t,r,n),$n(e,t,r))}};function ir(t,e,n,r,i,o,a){return"function"==typeof(t=t.stateNode).shouldComponentUpdate?t.shouldComponentUpdate(r,o,a):!(e.prototype&&e.prototype.isPureReactComponent&&En(n,r)&&En(i,o))}function or(t,e,n){var i=!1,o=fe,a=e.contextType;return"object"===r(a)&&null!==a?a=Un(a):(o=ve(e)?pe:he.current,a=(i=null!=(i=e.contextTypes))?ye(t,o):fe),e=new e(n,a),t.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,e.updater=rr,t.stateNode=e,e._reactInternals=t,i&&((t=t.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,t.__reactInternalMemoizedMaskedChildContext=a),e}function ar(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&&rr.enqueueReplaceState(e,e.state,null)}function lr(t,e,n,i){var o=t.stateNode;o.props=n,o.state=t.memoizedState,o.refs=er,Yn(t);var a=e.contextType;"object"===r(a)&&null!==a?o.context=Un(a):(a=ve(e)?pe:he.current,o.context=ye(t,a)),o.state=t.memoizedState,"function"==typeof(a=e.getDerivedStateFromProps)&&(nr(t,e,a,n),o.state=t.memoizedState),"function"==typeof e.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(e=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),e!==o.state&&rr.enqueueReplaceState(o,o.state,null),Zn(t,n,o,i),o.state=t.memoizedState),"function"==typeof o.componentDidMount&&(t.flags|=4194308)}function sr(t,e,n){if(null!==(t=n.ref)&&"function"!=typeof t&&"object"!==r(t)){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(l(309));var i=n.stateNode}if(!i)throw Error(l(147,t));var o=i,a=""+t;return null!==e&&null!==e.ref&&"function"==typeof e.ref&&e.ref._stringRef===a?e.ref:(e=function(t){var e=o.refs;e===er&&(e=o.refs={}),null===t?delete e[a]:e[a]=t},e._stringRef=a,e)}if("string"!=typeof t)throw Error(l(284));if(!n._owner)throw Error(l(290,t))}return t}function ur(t,e){throw t=Object.prototype.toString.call(e),Error(l(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function cr(t){return(0,t._init)(t._payload)}function fr(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 i(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 o(t,e){return(t=cl(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 s(e){return t&&null===e.alternate&&(e.flags|=2),e}function h(t,e,n,r){return null===e||6!==e.tag?((e=pl(n,t.mode,r)).return=t,e):((e=o(e,n)).return=t,e)}function d(t,e,n,i){var a=n.type;return a===f?y(t,e,n.props.children,i,n.key):null!==e&&(e.elementType===a||"object"===r(a)&&null!==a&&a.$$typeof===_&&cr(a)===e.type)?((i=o(e,n.props)).ref=sr(t,e,n),i.return=t,i):((i=fl(n.type,n.key,n.props,null,t.mode,i)).ref=sr(t,e,n),i.return=t,i)}function p(t,e,n,r){return null===e||4!==e.tag||e.stateNode.containerInfo!==n.containerInfo||e.stateNode.implementation!==n.implementation?((e=yl(n,t.mode,r)).return=t,e):((e=o(e,n.children||[])).return=t,e)}function y(t,e,n,r,i){return null===e||7!==e.tag?((e=hl(n,t.mode,r,i)).return=t,e):((e=o(e,n)).return=t,e)}function v(t,e,n){if("string"==typeof e&&""!==e||"number"==typeof e)return(e=pl(""+e,t.mode,n)).return=t,e;if("object"===r(e)&&null!==e){switch(e.$$typeof){case u:return(n=fl(e.type,e.key,e.props,null,t.mode,n)).ref=sr(t,null,e),n.return=t,n;case c:return(e=yl(e,t.mode,n)).return=t,e;case _:return v(t,(0,e._init)(e._payload),n)}if(M(e)||k(e))return(e=hl(e,t.mode,n,null)).return=t,e;ur(t,e)}return null}function g(t,e,n,i){var o=null!==e?e.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==o?null:h(t,e,""+n,i);if("object"===r(n)&&null!==n){switch(n.$$typeof){case u:return n.key===o?d(t,e,n,i):null;case c:return n.key===o?p(t,e,n,i):null;case _:return g(t,e,(o=n._init)(n._payload),i)}if(M(n)||k(n))return null!==o?null:y(t,e,n,i,null);ur(t,n)}return null}function m(t,e,n,i,o){if("string"==typeof i&&""!==i||"number"==typeof i)return h(e,t=t.get(n)||null,""+i,o);if("object"===r(i)&&null!==i){switch(i.$$typeof){case u:return d(e,t=t.get(null===i.key?n:i.key)||null,i,o);case c:return p(e,t=t.get(null===i.key?n:i.key)||null,i,o);case _:return m(t,e,n,(0,i._init)(i._payload),o)}if(M(i)||k(i))return y(e,t=t.get(n)||null,i,o,null);ur(e,i)}return null}function b(r,o,l,s){for(var u=null,c=null,f=o,h=o=0,d=null;null!==f&&h<l.length;h++){f.index>h?(d=f,f=null):d=f.sibling;var p=g(r,f,l[h],s);if(null===p){null===f&&(f=d);break}t&&f&&null===p.alternate&&e(r,f),o=a(p,o,h),null===c?u=p:c.sibling=p,c=p,f=d}if(h===l.length)return n(r,f),vn&&cn(r,h),u;if(null===f){for(;h<l.length;h++)null!==(f=v(r,l[h],s))&&(o=a(f,o,h),null===c?u=f:c.sibling=f,c=f);return vn&&cn(r,h),u}for(f=i(r,f);h<l.length;h++)null!==(d=m(f,r,h,l[h],s))&&(t&&null!==d.alternate&&f.delete(null===d.key?h:d.key),o=a(d,o,h),null===c?u=d:c.sibling=d,c=d);return t&&f.forEach((function(t){return e(r,t)})),vn&&cn(r,h),u}function S(r,o,s,u){var c=k(s);if("function"!=typeof c)throw Error(l(150));if(null==(s=c.call(s)))throw Error(l(151));for(var f=c=null,h=o,d=o=0,p=null,y=s.next();null!==h&&!y.done;d++,y=s.next()){h.index>d?(p=h,h=null):p=h.sibling;var b=g(r,h,y.value,u);if(null===b){null===h&&(h=p);break}t&&h&&null===b.alternate&&e(r,h),o=a(b,o,d),null===f?c=b:f.sibling=b,f=b,h=p}if(y.done)return n(r,h),vn&&cn(r,d),c;if(null===h){for(;!y.done;d++,y=s.next())null!==(y=v(r,y.value,u))&&(o=a(y,o,d),null===f?c=y:f.sibling=y,f=y);return vn&&cn(r,d),c}for(h=i(r,h);!y.done;d++,y=s.next())null!==(y=m(h,r,d,y.value,u))&&(t&&null!==y.alternate&&h.delete(null===y.key?d:y.key),o=a(y,o,d),null===f?c=y:f.sibling=y,f=y);return t&&h.forEach((function(t){return e(r,t)})),vn&&cn(r,d),c}return function t(i,a,l,h){if("object"===r(l)&&null!==l&&l.type===f&&null===l.key&&(l=l.props.children),"object"===r(l)&&null!==l){switch(l.$$typeof){case u:t:{for(var d=l.key,p=a;null!==p;){if(p.key===d){if((d=l.type)===f){if(7===p.tag){n(i,p.sibling),(a=o(p,l.props.children)).return=i,i=a;break t}}else if(p.elementType===d||"object"===r(d)&&null!==d&&d.$$typeof===_&&cr(d)===p.type){n(i,p.sibling),(a=o(p,l.props)).ref=sr(i,p,l),a.return=i,i=a;break t}n(i,p);break}e(i,p),p=p.sibling}l.type===f?((a=hl(l.props.children,i.mode,h,l.key)).return=i,i=a):((h=fl(l.type,l.key,l.props,null,i.mode,h)).ref=sr(i,a,l),h.return=i,i=h)}return s(i);case c:t:{for(p=l.key;null!==a;){if(a.key===p){if(4===a.tag&&a.stateNode.containerInfo===l.containerInfo&&a.stateNode.implementation===l.implementation){n(i,a.sibling),(a=o(a,l.children||[])).return=i,i=a;break t}n(i,a);break}e(i,a),a=a.sibling}(a=yl(l,i.mode,h)).return=i,i=a}return s(i);case _:return t(i,a,(p=l._init)(l._payload),h)}if(M(l))return b(i,a,l,h);if(k(l))return S(i,a,l,h);ur(i,l)}return"string"==typeof l&&""!==l||"number"==typeof l?(l=""+l,null!==a&&6===a.tag?(n(i,a.sibling),(a=o(a,l)).return=i,i=a):(n(i,a),(a=pl(l,i.mode,h)).return=i,i=a),s(i)):n(i,a)}}var hr=fr(!0),dr=fr(!1),pr={},yr=se(pr),vr=se(pr),gr=se(pr);function mr(t){if(t===pr)throw Error(l(174));return t}function br(t,e){ce(gr,e),ce(vr,t),ce(yr,pr),t=F(e),ue(yr),ce(yr,t)}function _r(){ue(yr),ue(vr),ue(gr)}function Sr(t){var e=mr(gr.current),n=mr(yr.current);n!==(e=D(n,t.type,e))&&(ce(vr,t),ce(yr,e))}function wr(t){vr.current===t&&(ue(yr),ue(vr))}var kr=se(0);function xr(t){for(var e=t;null!==e;){if(13===e.tag){var n=e.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||It(n)||Lt(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 Pr=[];function Cr(){for(var t=0;t<Pr.length;t++){var e=Pr[t];q?e._workInProgressVersionPrimary=null:e._workInProgressVersionSecondary=null}Pr.length=0}var Or=s.ReactCurrentDispatcher,Tr=s.ReactCurrentBatchConfig,Er=0,Rr=null,jr=null,Ar=null,Mr=!1,Nr=!1,Fr=0,Dr=0;function Ir(){throw Error(l(321))}function Lr(t,e){if(null===e)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!qe(t[n],e[n]))return!1;return!0}function Gr(t,e,n,r,i,o){if(Er=o,Rr=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Or.current=null===t||null===t.memoizedState?wi:ki,t=n(r,i),Nr){o=0;do{if(Nr=!1,Fr=0,25<=o)throw Error(l(301));o+=1,Ar=jr=null,e.updateQueue=null,Or.current=xi,t=n(r,i)}while(Nr)}if(Or.current=Si,e=null!==jr&&null!==jr.next,Er=0,Ar=jr=Rr=null,Mr=!1,e)throw Error(l(300));return t}function zr(){var t=0!==Fr;return Fr=0,t}function Ur(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ar?Rr.memoizedState=Ar=t:Ar=Ar.next=t,Ar}function Br(){if(null===jr){var t=Rr.alternate;t=null!==t?t.memoizedState:null}else t=jr.next;var e=null===Ar?Rr.memoizedState:Ar.next;if(null!==e)Ar=e,jr=t;else{if(null===t)throw Error(l(310));t={memoizedState:(jr=t).memoizedState,baseState:jr.baseState,baseQueue:jr.baseQueue,queue:jr.queue,next:null},null===Ar?Rr.memoizedState=Ar=t:Ar=Ar.next=t}return Ar}function Hr(t,e){return"function"==typeof e?e(t):e}function Vr(t){var e=Br(),n=e.queue;if(null===n)throw Error(l(311));n.lastRenderedReducer=t;var r=jr,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var s=a=null,u=null,c=o;do{var f=c.lane;if((Er&f)===f)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var h={lane:f,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(s=u=h,a=r):u=u.next=h,Rr.lanes|=f,ha|=f}c=c.next}while(null!==c&&c!==o);null===u?a=r:u.next=s,qe(r,e.memoizedState)||(Fi=!0),e.memoizedState=r,e.baseState=a,e.baseQueue=u,n.lastRenderedState=r}if(null!==(t=n.interleaved)){i=t;do{o=i.lane,Rr.lanes|=o,ha|=o,i=i.next}while(i!==t)}else null===i&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function Wr(t){var e=Br(),n=e.queue;if(null===n)throw Error(l(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,o=e.memoizedState;if(null!==i){n.pending=null;var a=i=i.next;do{o=t(o,a.action),a=a.next}while(a!==i);qe(o,e.memoizedState)||(Fi=!0),e.memoizedState=o,null===e.baseQueue&&(e.baseState=o),n.lastRenderedState=o}return[o,r]}function Kr(){}function Yr(t,e){var n=Rr,r=Br(),i=e(),o=!qe(r.memoizedState,i);if(o&&(r.memoizedState=i,Fi=!0),r=r.queue,oi(Qr.bind(null,n,r,t),[t]),r.getSnapshot!==e||o||null!==Ar&&1&Ar.memoizedState.tag){if(n.flags|=2048,ti(9,Xr.bind(null,n,r,i,e),void 0,null),null===oa)throw Error(l(349));0!=(30&Er)||qr(n,e,i)}return i}function qr(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},null===(e=Rr.updateQueue)?(e={lastEffect:null,stores:null},Rr.updateQueue=e,e.stores=[t]):null===(n=e.stores)?e.stores=[t]:n.push(t)}function Xr(t,e,n,r){e.value=n,e.getSnapshot=r,$r(e)&&Jr(t)}function Qr(t,e,n){return n((function(){$r(e)&&Jr(t)}))}function $r(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!qe(t,n)}catch(t){return!0}}function Jr(t){var e=Wn(t,1);null!==e&&Na(e,t,1,-1)}function Zr(t){var e=Ur();return"function"==typeof t&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:t},e.queue=t,t=t.dispatch=gi.bind(null,Rr,t),[e.memoizedState,t]}function ti(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},null===(e=Rr.updateQueue)?(e={lastEffect:null,stores:null},Rr.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 ei(){return Br().memoizedState}function ni(t,e,n,r){var i=Ur();Rr.flags|=t,i.memoizedState=ti(1|e,n,void 0,void 0===r?null:r)}function ri(t,e,n,r){var i=Br();r=void 0===r?null:r;var o=void 0;if(null!==jr){var a=jr.memoizedState;if(o=a.destroy,null!==r&&Lr(r,a.deps))return void(i.memoizedState=ti(e,n,o,r))}Rr.flags|=t,i.memoizedState=ti(1|e,n,o,r)}function ii(t,e){return ni(8390656,8,t,e)}function oi(t,e){return ri(2048,8,t,e)}function ai(t,e){return ri(4,2,t,e)}function li(t,e){return ri(4,4,t,e)}function si(t,e){return"function"==typeof e?(t=t(),e(t),function(){e(null)}):null!=e?(t=t(),e.current=t,function(){e.current=null}):void 0}function ui(t,e,n){return n=null!=n?n.concat([t]):null,ri(4,4,si.bind(null,e,t),n)}function ci(){}function fi(t,e){var n=Br();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Lr(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function hi(t,e){var n=Br();e=void 0===e?null:e;var r=n.memoizedState;return null!==r&&null!==e&&Lr(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function di(t,e,n){return 0==(21&Er)?(t.baseState&&(t.baseState=!1,Fi=!0),t.memoizedState=n):(qe(n,e)||(n=je(),Rr.lanes|=n,ha|=n,t.baseState=!0),e)}function pi(t,e){var n=Fe;Fe=0!==n&&4>n?n:4,t(!0);var r=Tr.transition;Tr.transition={};try{t(!1),e()}finally{Fe=n,Tr.transition=r}}function yi(){return Br().memoizedState}function vi(t,e,n){var r=Ma(t);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},mi(t)?bi(e,n):null!==(n=Vn(t,e,n,r))&&(Na(n,t,r,Aa()),_i(n,e,r))}function gi(t,e,n){var r=Ma(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(mi(t))bi(e,i);else{var o=t.alternate;if(0===t.lanes&&(null===o||0===o.lanes)&&null!==(o=e.lastRenderedReducer))try{var a=e.lastRenderedState,l=o(a,n);if(i.hasEagerState=!0,i.eagerState=l,qe(l,a)){var s=e.interleaved;return null===s?(i.next=i,Hn(e)):(i.next=s.next,s.next=i),void(e.interleaved=i)}}catch(t){}null!==(n=Vn(t,e,i,r))&&(Na(n,t,r,i=Aa()),_i(n,e,r))}}function mi(t){var e=t.alternate;return t===Rr||null!==e&&e===Rr}function bi(t,e){Nr=Mr=!0;var n=t.pending;null===n?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function _i(t,e,n){if(0!=(4194240&n)){var r=e.lanes;n|=r&=t.pendingLanes,e.lanes=n,Ne(t,n)}}var Si={readContext:Un,useCallback:Ir,useContext:Ir,useEffect:Ir,useImperativeHandle:Ir,useInsertionEffect:Ir,useLayoutEffect:Ir,useMemo:Ir,useReducer:Ir,useRef:Ir,useState:Ir,useDebugValue:Ir,useDeferredValue:Ir,useTransition:Ir,useMutableSource:Ir,useSyncExternalStore:Ir,useId:Ir,unstable_isNewReconciler:!1},wi={readContext:Un,useCallback:function(t,e){return Ur().memoizedState=[t,void 0===e?null:e],t},useContext:Un,useEffect:ii,useImperativeHandle:function(t,e,n){return n=null!=n?n.concat([t]):null,ni(4194308,4,si.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ni(4194308,4,t,e)},useInsertionEffect:function(t,e){return ni(4,2,t,e)},useMemo:function(t,e){var n=Ur();return e=void 0===e?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Ur();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=vi.bind(null,Rr,t),[r.memoizedState,t]},useRef:function(t){return t={current:t},Ur().memoizedState=t},useState:Zr,useDebugValue:ci,useDeferredValue:function(t){return Ur().memoizedState=t},useTransition:function(){var t=Zr(!1),e=t[0];return t=pi.bind(null,t[1]),Ur().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Rr,i=Ur();if(vn){if(void 0===n)throw Error(l(407));n=n()}else{if(n=e(),null===oa)throw Error(l(349));0!=(30&Er)||qr(r,e,n)}i.memoizedState=n;var o={value:n,getSnapshot:e};return i.queue=o,ii(Qr.bind(null,r,o,t),[t]),r.flags|=2048,ti(9,Xr.bind(null,r,o,n,e),void 0,null),n},useId:function(){var t=Ur(),e=oa.identifierPrefix;if(vn){var n=un;e=":"+e+"R"+(n=(sn&~(1<<32-we(sn)-1)).toString(32)+n),0<(n=Fr++)&&(e+="H"+n.toString(32)),e+=":"}else e=":"+e+"r"+(n=Dr++).toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},ki={readContext:Un,useCallback:fi,useContext:Un,useEffect:oi,useImperativeHandle:ui,useInsertionEffect:ai,useLayoutEffect:li,useMemo:hi,useReducer:Vr,useRef:ei,useState:function(){return Vr(Hr)},useDebugValue:ci,useDeferredValue:function(t){return di(Br(),jr.memoizedState,t)},useTransition:function(){return[Vr(Hr)[0],Br().memoizedState]},useMutableSource:Kr,useSyncExternalStore:Yr,useId:yi,unstable_isNewReconciler:!1},xi={readContext:Un,useCallback:fi,useContext:Un,useEffect:oi,useImperativeHandle:ui,useInsertionEffect:ai,useLayoutEffect:li,useMemo:hi,useReducer:Wr,useRef:ei,useState:function(){return Wr(Hr)},useDebugValue:ci,useDeferredValue:function(t){var e=Br();return null===jr?e.memoizedState=t:di(e,jr.memoizedState,t)},useTransition:function(){return[Wr(Hr)[0],Br().memoizedState]},useMutableSource:Kr,useSyncExternalStore:Yr,useId:yi,unstable_isNewReconciler:!1};function Pi(t,e){try{var n="",r=e;do{n+=Rn(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 Ci(t,e,n){return{value:t,source:null,stack:null!=n?n:null,digest:null!=e?e:null}}function Oi(t,e){try{console.error(e.value)}catch(t){setTimeout((function(){throw t}))}}var Ti="function"==typeof WeakMap?WeakMap:Map;function Ei(t,e,n){(n=Xn(-1,n)).tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){wa||(wa=!0,ka=r),Oi(0,e)},n}function Ri(t,e,n){(n=Xn(-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(){Oi(0,e)}}var o=t.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){Oi(0,e),"function"!=typeof r&&(null===xa?xa=new Set([this]):xa.add(this));var t=e.stack;this.componentDidCatch(e.value,{componentStack:null!==t?t:""})}),n}function ji(t,e,n){var r=t.pingCache;if(null===r){r=t.pingCache=new Ti;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=nl.bind(null,t,e,n),e.then(t,t))}function Ai(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 Mi(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=Xn(-1,1)).tag=2,Qn(n,e,1))),n.lanes|=1),t):(t.flags|=65536,t.lanes=i,t)}var Ni=s.ReactCurrentOwner,Fi=!1;function Di(t,e,n,r){e.child=null===t?dr(e,null,n,r):hr(e,t.child,n,r)}function Ii(t,e,n,r,i){n=n.render;var o=e.ref;return zn(e,i),r=Gr(t,e,n,r,o,i),n=zr(),null===t||Fi?(vn&&n&&hn(e),e.flags|=1,Di(t,e,r,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ao(t,e,i))}function Li(t,e,n,r,i){if(null===t){var o=n.type;return"function"!=typeof o||ul(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((t=fl(n.type,null,r,e,e.mode,i)).ref=e.ref,t.return=e,e.child=t):(e.tag=15,e.type=o,Gi(t,e,o,r,i))}if(o=t.child,0==(t.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:En)(a,r)&&t.ref===e.ref)return ao(t,e,i)}return e.flags|=1,(t=cl(o,r)).ref=e.ref,t.return=e,e.child=t}function Gi(t,e,n,r,i){if(null!==t){var o=t.memoizedProps;if(En(o,r)&&t.ref===e.ref){if(Fi=!1,e.pendingProps=r=o,0==(t.lanes&i))return e.lanes=t.lanes,ao(t,e,i);0!=(131072&t.flags)&&(Fi=!0)}}return Bi(t,e,n,r,i)}function zi(t,e,n){var r=e.pendingProps,i=r.children,o=null!==t?t.memoizedState:null;if("hidden"===r.mode)if(0==(1&e.mode))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},ce(ua,sa),sa|=n;else{if(0==(1073741824&n))return t=null!==o?o.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,ce(ua,sa),sa|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,ce(ua,sa),sa|=r}else null!==o?(r=o.baseLanes|n,e.memoizedState=null):r=n,ce(ua,sa),sa|=r;return Di(t,e,i,n),e.child}function Ui(t,e){var n=e.ref;(null===t&&null!==n||null!==t&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function Bi(t,e,n,r,i){var o=ve(n)?pe:he.current;return o=ye(e,o),zn(e,i),n=Gr(t,e,n,r,o,i),r=zr(),null===t||Fi?(vn&&r&&hn(e),e.flags|=1,Di(t,e,n,i),e.child):(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,ao(t,e,i))}function Hi(t,e,n,i,o){if(ve(n)){var a=!0;_e(e)}else a=!1;if(zn(e,o),null===e.stateNode)oo(t,e),or(e,n,i),lr(e,n,i,o),i=!0;else if(null===t){var l=e.stateNode,s=e.memoizedProps;l.props=s;var u=l.context,c=n.contextType;c="object"===r(c)&&null!==c?Un(c):ye(e,c=ve(n)?pe:he.current);var f=n.getDerivedStateFromProps,h="function"==typeof f||"function"==typeof l.getSnapshotBeforeUpdate;h||"function"!=typeof l.UNSAFE_componentWillReceiveProps&&"function"!=typeof l.componentWillReceiveProps||(s!==i||u!==c)&&ar(e,l,i,c),Kn=!1;var d=e.memoizedState;l.state=d,Zn(e,i,l,o),u=e.memoizedState,s!==i||d!==u||de.current||Kn?("function"==typeof f&&(nr(e,n,f,i),u=e.memoizedState),(s=Kn||ir(e,n,s,i,d,u,c))?(h||"function"!=typeof l.UNSAFE_componentWillMount&&"function"!=typeof l.componentWillMount||("function"==typeof l.componentWillMount&&l.componentWillMount(),"function"==typeof l.UNSAFE_componentWillMount&&l.UNSAFE_componentWillMount()),"function"==typeof l.componentDidMount&&(e.flags|=4194308)):("function"==typeof l.componentDidMount&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=u),l.props=i,l.state=u,l.context=c,i=s):("function"==typeof l.componentDidMount&&(e.flags|=4194308),i=!1)}else{l=e.stateNode,qn(t,e),s=e.memoizedProps,c=e.type===e.elementType?s:jn(e.type,s),l.props=c,h=e.pendingProps,d=l.context,u="object"===r(u=n.contextType)&&null!==u?Un(u):ye(e,u=ve(n)?pe:he.current);var p=n.getDerivedStateFromProps;(f="function"==typeof p||"function"==typeof l.getSnapshotBeforeUpdate)||"function"!=typeof l.UNSAFE_componentWillReceiveProps&&"function"!=typeof l.componentWillReceiveProps||(s!==h||d!==u)&&ar(e,l,i,u),Kn=!1,d=e.memoizedState,l.state=d,Zn(e,i,l,o);var y=e.memoizedState;s!==h||d!==y||de.current||Kn?("function"==typeof p&&(nr(e,n,p,i),y=e.memoizedState),(c=Kn||ir(e,n,c,i,d,y,u)||!1)?(f||"function"!=typeof l.UNSAFE_componentWillUpdate&&"function"!=typeof l.componentWillUpdate||("function"==typeof l.componentWillUpdate&&l.componentWillUpdate(i,y,u),"function"==typeof l.UNSAFE_componentWillUpdate&&l.UNSAFE_componentWillUpdate(i,y,u)),"function"==typeof l.componentDidUpdate&&(e.flags|=4),"function"==typeof l.getSnapshotBeforeUpdate&&(e.flags|=1024)):("function"!=typeof l.componentDidUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof l.getSnapshotBeforeUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=y),l.props=i,l.state=y,l.context=u,i=c):("function"!=typeof l.componentDidUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),"function"!=typeof l.getSnapshotBeforeUpdate||s===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),i=!1)}return Vi(t,e,n,i,a,o)}function Vi(t,e,n,r,i,o){Ui(t,e);var a=0!=(128&e.flags);if(!r&&!a)return i&&Se(e,n,!1),ao(t,e,o);r=e.stateNode,Ni.current=e;var l=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return e.flags|=1,null!==t&&a?(e.child=hr(e,t.child,null,o),e.child=hr(e,null,l,o)):Di(t,e,l,o),e.memoizedState=r.state,i&&Se(e,n,!0),e.child}function Wi(t){var e=t.stateNode;e.pendingContext?me(0,e.pendingContext,e.pendingContext!==e.context):e.context&&me(0,e.context,!1),br(t,e.containerInfo)}function Ki(t,e,n,r,i){return Cn(),On(i),e.flags|=256,Di(t,e,n,r),e.child}var Yi,qi,Xi,Qi,$i={dehydrated:null,treeContext:null,retryLane:0};function Ji(t){return{baseLanes:t,cachePool:null,transitions:null}}function Zi(t,e,n){var r,i=e.pendingProps,o=kr.current,a=!1,s=0!=(128&e.flags);if((r=s)||(r=(null===t||null!==t.memoizedState)&&0!=(2&o)),r?(a=!0,e.flags&=-129):null!==t&&null===t.memoizedState||(o|=1),ce(kr,1&o),null===t)return wn(e),null!==(t=e.memoizedState)&&null!==(t=t.dehydrated)?(0==(1&e.mode)?e.lanes=1:Lt(t)?e.lanes=8:e.lanes=1073741824,null):(s=i.children,t=i.fallback,a?(i=e.mode,a=e.child,s={mode:"hidden",children:s},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=s):a=dl(s,i,0,null),t=hl(t,i,n,null),a.return=e,t.return=e,a.sibling=t,e.child=a,e.child.memoizedState=Ji(n),e.memoizedState=$i,t):to(e,s));if(null!==(o=t.memoizedState)&&null!==(r=o.dehydrated))return function(t,e,n,r,i,o,a){if(n)return 256&e.flags?(e.flags&=-257,eo(t,e,a,r=Ci(Error(l(422))))):null!==e.memoizedState?(e.child=t.child,e.flags|=128,null):(o=r.fallback,i=e.mode,r=dl({mode:"visible",children:r.children},i,0,null),(o=hl(o,i,a,null)).flags|=2,r.return=e,o.return=e,r.sibling=o,e.child=r,0!=(1&e.mode)&&hr(e,t.child,null,a),e.child.memoizedState=Ji(a),e.memoizedState=$i,o);if(0==(1&e.mode))return eo(t,e,a,null);if(Lt(i))return r=Gt(i).digest,eo(t,e,a,r=Ci(o=Error(l(419)),r,void 0));if(n=0!=(a&t.childLanes),Fi||n){if(null!==(r=oa)){switch(a&-a){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|a))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Wn(t,i),Na(r,t,i,-1))}return Ka(),eo(t,e,a,r=Ci(Error(l(421))))}return It(i)?(e.flags|=128,e.child=t.child,e=il.bind(null,t),zt(i,e),null):(t=o.treeContext,$&&(yn=Vt(i),pn=e,vn=!0,mn=null,gn=!1,null!==t&&(on[an++]=sn,on[an++]=un,on[an++]=ln,sn=t.id,un=t.overflow,ln=e)),(e=to(e,r.children)).flags|=4096,e)}(t,e,s,i,r,o,n);if(a){a=i.fallback,s=e.mode,r=(o=t.child).sibling;var u={mode:"hidden",children:i.children};return 0==(1&s)&&e.child!==o?((i=e.child).childLanes=0,i.pendingProps=u,e.deletions=null):(i=cl(o,u)).subtreeFlags=14680064&o.subtreeFlags,null!==r?a=cl(r,a):(a=hl(a,s,n,null)).flags|=2,a.return=e,i.return=e,i.sibling=a,e.child=i,i=a,a=e.child,s=null===(s=t.child.memoizedState)?Ji(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},a.memoizedState=s,a.childLanes=t.childLanes&~n,e.memoizedState=$i,i}return t=(a=t.child).sibling,i=cl(a,{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 to(t,e){return(e=dl({mode:"visible",children:e},t.mode,0,null)).return=t,t.child=e}function eo(t,e,n,r){return null!==r&&On(r),hr(e,t.child,null,n),(t=to(e,e.pendingProps.children)).flags|=2,e.memoizedState=null,t}function no(t,e,n){t.lanes|=e;var r=t.alternate;null!==r&&(r.lanes|=e),Gn(t.return,e,n)}function ro(t,e,n,r,i){var o=t.memoizedState;null===o?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function io(t,e,n){var r=e.pendingProps,i=r.revealOrder,o=r.tail;if(Di(t,e,r.children,n),0!=(2&(r=kr.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&&no(t,n,e);else if(19===t.tag)no(t,n,e);else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break t;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(ce(kr,r),0==(1&e.mode))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;null!==n;)null!==(t=n.alternate)&&null===xr(t)&&(i=n),n=n.sibling;null===(n=i)?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),ro(e,!1,i,n,o);break;case"backwards":for(n=null,i=e.child,e.child=null;null!==i;){if(null!==(t=i.alternate)&&null===xr(t)){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}ro(e,!0,n,null,o);break;case"together":ro(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function oo(t,e){0==(1&e.mode)&&null!==t&&(t.alternate=null,e.alternate=null,e.flags|=2)}function ao(t,e,n){if(null!==t&&(e.dependencies=t.dependencies),ha|=e.lanes,0==(n&e.childLanes))return null;if(null!==t&&e.child!==t.child)throw Error(l(153));if(null!==e.child){for(n=cl(t=e.child,t.pendingProps),e.child=n,n.return=e;null!==t.sibling;)t=t.sibling,(n=n.sibling=cl(t,t.pendingProps)).return=e;n.sibling=null}return e.child}function lo(t){t.flags|=4}function so(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(X)Yi=function(t,e){for(var n=e.child;null!==n;){if(5===n.tag||6===n.tag)z(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}},qi=function(){},Xi=function(t,e,n,r,i){if((t=t.memoizedProps)!==r){var o=e.stateNode,a=mr(yr.current);n=B(o,n,t,r,i,a),(e.updateQueue=n)&&lo(e)}},Qi=function(t,e,n,r){n!==r&&lo(e)};else if(Q){Yi=function(t,e,n,r){for(var i=e.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=At(o,i.type,i.memoizedProps,i)),z(t,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=Mt(o,i.memoizedProps,i)),z(t,o);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(o=i.child)&&(o.return=i),Yi(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}};var uo=function t(e,n,r,i){for(var o=n.child;null!==o;){if(5===o.tag){var a=o.stateNode;r&&i&&(a=At(a,o.type,o.memoizedProps,o)),Et(e,a)}else if(6===o.tag)a=o.stateNode,r&&i&&(a=Mt(a,o.memoizedProps,o)),Et(e,a);else if(4!==o.tag)if(22===o.tag&&null!==o.memoizedState)null!==(a=o.child)&&(a.return=o),t(e,o,!0,!0);else if(null!==o.child){o.child.return=o,o=o.child;continue}if(o===n)break;for(;null===o.sibling;){if(null===o.return||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}};qi=function(t,e){var n=e.stateNode;if(!so(t,e)){t=n.containerInfo;var r=Tt(t);uo(r,e,!1,!1),n.pendingChildren=r,lo(e),Rt(t,r)}},Xi=function(t,e,n,r,i){var o=t.stateNode,a=t.memoizedProps;if((t=so(t,e))&&a===r)e.stateNode=o;else{var l=e.stateNode,s=mr(yr.current),u=null;a!==r&&(u=B(l,n,a,r,i,s)),t&&null===u?e.stateNode=o:(o=Ot(o,u,n,a,r,e,t,l),U(o,n,r,i,s)&&lo(e),e.stateNode=o,t?lo(e):Yi(o,e,!1,!1))}},Qi=function(t,e,n,r){n!==r?(t=mr(gr.current),n=mr(yr.current),e.stateNode=V(r,t,n,e),lo(e)):e.stateNode=t.stateNode}}else qi=function(){},Xi=function(){},Qi=function(){};function co(t,e){if(!vn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;null!==e;)null!==e.alternate&&(n=e),e=e.sibling;null===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 fo(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}function ho(t,e,n){var r=e.pendingProps;switch(dn(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return fo(e),null;case 1:case 17:return ve(e.type)&&ge(),fo(e),null;case 3:return n=e.stateNode,_r(),ue(de),ue(he),Cr(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==t&&null!==t.child||(xn(e)?lo(e):null===t||t.memoizedState.isDehydrated&&0==(256&e.flags)||(e.flags|=1024,null!==mn&&(La(mn),mn=null))),qi(t,e),fo(e),null;case 5:wr(e),n=mr(gr.current);var i=e.type;if(null!==t&&null!=e.stateNode)Xi(t,e,i,r,n),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(null===e.stateNode)throw Error(l(166));return fo(e),null}if(t=mr(yr.current),xn(e)){if(!$)throw Error(l(175));t=Wt(e.stateNode,e.type,e.memoizedProps,n,t,e,!gn),e.updateQueue=t,null!==t&&lo(e)}else{var o=G(i,r,n,t,e);Yi(o,e,!1,!1),e.stateNode=o,U(o,i,r,n,t)&&lo(e)}null!==e.ref&&(e.flags|=512,e.flags|=2097152)}return fo(e),null;case 6:if(t&&null!=e.stateNode)Qi(t,e,t.memoizedProps,r);else{if("string"!=typeof r&&null===e.stateNode)throw Error(l(166));if(t=mr(gr.current),n=mr(yr.current),xn(e)){if(!$)throw Error(l(176));if(t=e.stateNode,n=e.memoizedProps,(r=Kt(t,n,e,!gn))&&null!==(i=pn))switch(i.tag){case 3:te(i.stateNode.containerInfo,t,n,0!=(1&i.mode));break;case 5:ee(i.type,i.memoizedProps,i.stateNode,t,n,0!=(1&i.mode))}r&&lo(e)}else e.stateNode=V(r,t,n,e)}return fo(e),null;case 13:if(ue(kr),r=e.memoizedState,null===t||null!==t.memoizedState&&null!==t.memoizedState.dehydrated){if(vn&&null!==yn&&0!=(1&e.mode)&&0==(128&e.flags))Pn(),Cn(),e.flags|=98560,i=!1;else if(i=xn(e),null!==r&&null!==r.dehydrated){if(null===t){if(!i)throw Error(l(318));if(!$)throw Error(l(344));if(!(i=null!==(i=e.memoizedState)?i.dehydrated:null))throw Error(l(317));Yt(i,e)}else Cn(),0==(128&e.flags)&&(e.memoizedState=null),e.flags|=4;fo(e),i=!1}else null!==mn&&(La(mn),mn=null),i=!0;if(!i)return 65536&e.flags?e:null}return 0!=(128&e.flags)?(e.lanes=n,e):((n=null!==r)!=(null!==t&&null!==t.memoizedState)&&n&&(e.child.flags|=8192,0!=(1&e.mode)&&(null===t||0!=(1&kr.current)?0===ca&&(ca=3):Ka())),null!==e.updateQueue&&(e.flags|=4),fo(e),null);case 4:return _r(),qi(t,e),null===t&&Z(e.stateNode.containerInfo),fo(e),null;case 10:return Ln(e.type._context),fo(e),null;case 19:if(ue(kr),null===(i=e.memoizedState))return fo(e),null;if(r=0!=(128&e.flags),null===(o=i.rendering))if(r)co(i,!1);else{if(0!==ca||null!==t&&0!=(128&t.flags))for(t=e.child;null!==t;){if(null!==(o=xr(t))){for(e.flags|=128,co(i,!1),null!==(t=o.updateQueue)&&(e.updateQueue=t,e.flags|=4),e.subtreeFlags=0,t=n,n=e.child;null!==n;)i=t,(r=n).flags&=14680066,null===(o=r.alternate)?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,i=o.dependencies,r.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext}),n=n.sibling;return ce(kr,1&kr.current|2),e.child}t=t.sibling}null!==i.tail&&Ue()>ma&&(e.flags|=128,r=!0,co(i,!1),e.lanes=4194304)}else{if(!r)if(null!==(t=xr(o))){if(e.flags|=128,r=!0,null!==(t=t.updateQueue)&&(e.updateQueue=t,e.flags|=4),co(i,!0),null===i.tail&&"hidden"===i.tailMode&&!o.alternate&&!vn)return fo(e),null}else 2*Ue()-i.renderingStartTime>ma&&1073741824!==n&&(e.flags|=128,r=!0,co(i,!1),e.lanes=4194304);i.isBackwards?(o.sibling=e.child,e.child=o):(null!==(t=i.last)?t.sibling=o:e.child=o,i.last=o)}return null!==i.tail?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Ue(),e.sibling=null,t=kr.current,ce(kr,r?1&t|2:1&t),e):(fo(e),null);case 22:case 23:return Ba(),n=null!==e.memoizedState,null!==t&&null!==t.memoizedState!==n&&(e.flags|=8192),n&&0!=(1&e.mode)?0!=(1073741824&sa)&&(fo(e),X&&6&e.subtreeFlags&&(e.flags|=8192)):fo(e),null;case 24:case 25:return null}throw Error(l(156,e.tag))}function po(t,e){switch(dn(e),e.tag){case 1:return ve(e.type)&&ge(),65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 3:return _r(),ue(de),ue(he),Cr(),0!=(65536&(t=e.flags))&&0==(128&t)?(e.flags=-65537&t|128,e):null;case 5:return wr(e),null;case 13:if(ue(kr),null!==(t=e.memoizedState)&&null!==t.dehydrated){if(null===e.alternate)throw Error(l(340));Cn()}return 65536&(t=e.flags)?(e.flags=-65537&t|128,e):null;case 19:return ue(kr),null;case 4:return _r(),null;case 10:return Ln(e.type._context),null;case 22:case 23:return Ba(),null;default:return null}}var yo=!1,vo=!1,go="function"==typeof WeakSet?WeakSet:Set,mo=null;function bo(t,e){var n=t.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){el(t,e,n)}else n.current=null}function _o(t,e,n){try{n()}catch(n){el(t,e,n)}}var So=!1;function wo(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 o=i.destroy;i.destroy=void 0,void 0!==o&&_o(e,n,o)}i=i.next}while(i!==r)}}function ko(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 xo(t){var e=t.ref;if(null!==e){var n=t.stateNode;t=5===t.tag?N(n):n,"function"==typeof e?e(t):e.current=t}}function Po(t){var e=t.alternate;null!==e&&(t.alternate=null,Po(e)),t.child=null,t.deletions=null,t.sibling=null,5===t.tag&&null!==(e=t.stateNode)&&et(e),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Co(t){return 5===t.tag||3===t.tag||4===t.tag}function Oo(t){t:for(;;){for(;null===t.sibling;){if(null===t.return||Co(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)continue t;if(null===t.child||4===t.tag)continue t;t.child.return=t,t=t.child}if(!(2&t.flags))return t.stateNode}}function To(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?mt(n,t,e):dt(n,t);else if(4!==r&&null!==(t=t.child))for(To(t,e,n),t=t.sibling;null!==t;)To(t,e,n),t=t.sibling}function Eo(t,e,n){var r=t.tag;if(5===r||6===r)t=t.stateNode,e?gt(n,t,e):ht(n,t);else if(4!==r&&null!==(t=t.child))for(Eo(t,e,n),t=t.sibling;null!==t;)Eo(t,e,n),t=t.sibling}var Ro=null,jo=!1;function Ao(t,e,n){for(n=n.child;null!==n;)Mo(t,e,n),n=n.sibling}function Mo(t,e,n){if(Ye&&"function"==typeof Ye.onCommitFiberUnmount)try{Ye.onCommitFiberUnmount(Ke,n)}catch(t){}switch(n.tag){case 5:vo||bo(n,e);case 6:if(X){var r=Ro,i=jo;Ro=null,Ao(t,e,n),jo=i,null!==(Ro=r)&&(jo?_t(Ro,n.stateNode):bt(Ro,n.stateNode))}else Ao(t,e,n);break;case 18:X&&null!==Ro&&(jo?Jt(Ro,n.stateNode):$t(Ro,n.stateNode));break;case 4:X?(r=Ro,i=jo,Ro=n.stateNode.containerInfo,jo=!0,Ao(t,e,n),Ro=r,jo=i):(Q&&(r=n.stateNode.containerInfo,i=Tt(r),jt(r,i)),Ao(t,e,n));break;case 0:case 11:case 14:case 15:if(!vo&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&_o(n,e,a),i=i.next}while(i!==r)}Ao(t,e,n);break;case 1:if(!vo&&(bo(n,e),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(t){el(n,e,t)}Ao(t,e,n);break;case 21:Ao(t,e,n);break;case 22:1&n.mode?(vo=(r=vo)||null!==n.memoizedState,Ao(t,e,n),vo=r):Ao(t,e,n);break;default:Ao(t,e,n)}}function No(t){var e=t.updateQueue;if(null!==e){t.updateQueue=null;var n=t.stateNode;null===n&&(n=t.stateNode=new go),e.forEach((function(e){var r=ol.bind(null,t,e);n.has(e)||(n.add(e),e.then(r,r))}))}}function Fo(t,e){var n=e.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=t,a=e;if(X){var s=a;t:for(;null!==s;){switch(s.tag){case 5:Ro=s.stateNode,jo=!1;break t;case 3:case 4:Ro=s.stateNode.containerInfo,jo=!0;break t}s=s.return}if(null===Ro)throw Error(l(160));Mo(o,a,i),Ro=null,jo=!1}else Mo(o,a,i);var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(t){el(i,e,t)}}if(12854&e.subtreeFlags)for(e=e.child;null!==e;)Do(e,t),e=e.sibling}function Do(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Fo(e,t),Io(t),4&r){try{wo(3,t,t.return),ko(3,t)}catch(e){el(t,t.return,e)}try{wo(5,t,t.return)}catch(e){el(t,t.return,e)}}break;case 1:Fo(e,t),Io(t),512&r&&null!==n&&bo(n,n.return);break;case 5:if(Fo(e,t),Io(t),512&r&&null!==n&&bo(n,n.return),X){if(32&t.flags){var i=t.stateNode;try{St(i)}catch(e){el(t,t.return,e)}}if(4&r&&null!=(i=t.stateNode)){var o=t.memoizedProps;if(n=null!==n?n.memoizedProps:o,r=t.type,e=t.updateQueue,t.updateQueue=null,null!==e)try{vt(i,e,r,n,o,t)}catch(e){el(t,t.return,e)}}}break;case 6:if(Fo(e,t),Io(t),4&r&&X){if(null===t.stateNode)throw Error(l(162));i=t.stateNode,o=t.memoizedProps,n=null!==n?n.memoizedProps:o;try{pt(i,n,o)}catch(e){el(t,t.return,e)}}break;case 3:if(Fo(e,t),Io(t),4&r){if(X&&$&&null!==n&&n.memoizedState.isDehydrated)try{Xt(e.containerInfo)}catch(e){el(t,t.return,e)}if(Q){i=e.containerInfo,o=e.pendingChildren;try{jt(i,o)}catch(e){el(t,t.return,e)}}}break;case 4:if(Fo(e,t),Io(t),4&r&&Q){i=(o=t.stateNode).containerInfo,o=o.pendingChildren;try{jt(i,o)}catch(e){el(t,t.return,e)}}break;case 13:Fo(e,t),Io(t),8192&(i=t.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(ga=Ue())),4&r&&No(t);break;case 22:var a=null!==n&&null!==n.memoizedState;if(1&t.mode?(vo=(n=vo)||a,Fo(e,t),vo=n):Fo(e,t),Io(t),8192&r){if(n=null!==t.memoizedState,(t.stateNode.isHidden=n)&&!a&&0!=(1&t.mode))for(mo=t,r=t.child;null!==r;){for(e=mo=r;null!==mo;){var s=(a=mo).child;switch(a.tag){case 0:case 11:case 14:case 15:wo(4,a,a.return);break;case 1:bo(a,a.return);var u=a.stateNode;if("function"==typeof u.componentWillUnmount){var c=a,f=a.return;try{var h=c;u.props=h.memoizedProps,u.state=h.memoizedState,u.componentWillUnmount()}catch(t){el(c,f,t)}}break;case 5:bo(a,a.return);break;case 22:if(null!==a.memoizedState){Uo(e);continue}}null!==s?(s.return=a,mo=s):Uo(e)}r=r.sibling}if(X)t:if(r=null,X)for(e=t;;){if(5===e.tag){if(null===r){r=e;try{i=e.stateNode,n?wt(i):xt(e.stateNode,e.memoizedProps)}catch(e){el(t,t.return,e)}}}else if(6===e.tag){if(null===r)try{o=e.stateNode,n?kt(o):Pt(o,e.memoizedProps)}catch(e){el(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:Fo(e,t),Io(t),4&r&&No(t);break;case 21:break;default:Fo(e,t),Io(t)}}function Io(t){var e=t.flags;if(2&e){try{if(X){t:{for(var n=t.return;null!==n;){if(Co(n)){var r=n;break t}n=n.return}throw Error(l(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(St(i),r.flags&=-33),Eo(t,Oo(t),i);break;case 3:case 4:var o=r.stateNode.containerInfo;To(t,Oo(t),o);break;default:throw Error(l(161))}}}catch(e){el(t,t.return,e)}t.flags&=-3}4096&e&&(t.flags&=-4097)}function Lo(t,e,n){mo=t,Go(t,e,n)}function Go(t,e,n){for(var r=0!=(1&t.mode);null!==mo;){var i=mo,o=i.child;if(22===i.tag&&r){var a=null!==i.memoizedState||yo;if(!a){var l=i.alternate,s=null!==l&&null!==l.memoizedState||vo;l=yo;var u=vo;if(yo=a,(vo=s)&&!u)for(mo=i;null!==mo;)s=(a=mo).child,22===a.tag&&null!==a.memoizedState?Bo(i):null!==s?(s.return=a,mo=s):Bo(i);for(;null!==o;)mo=o,Go(o,e,n),o=o.sibling;mo=i,yo=l,vo=u}zo(t)}else 0!=(8772&i.subtreeFlags)&&null!==o?(o.return=i,mo=o):zo(t)}}function zo(t){for(;null!==mo;){var e=mo;if(0!=(8772&e.flags)){var n=e.alternate;try{if(0!=(8772&e.flags))switch(e.tag){case 0:case 11:case 15:vo||ko(5,e);break;case 1:var r=e.stateNode;if(4&e.flags&&!vo)if(null===n)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:jn(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=e.updateQueue;null!==o&&tr(e,o,r);break;case 3:var a=e.updateQueue;if(null!==a){if(n=null,null!==e.child)switch(e.child.tag){case 5:n=N(e.child.stateNode);break;case 1:n=e.child.stateNode}tr(e,a,n)}break;case 5:var s=e.stateNode;null===n&&4&e.flags&&yt(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($&&null===e.memoizedState){var u=e.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var f=c.dehydrated;null!==f&&Qt(f)}}}break;default:throw Error(l(163))}vo||512&e.flags&&xo(e)}catch(t){el(e,e.return,t)}}if(e===t){mo=null;break}if(null!==(n=e.sibling)){n.return=e.return,mo=n;break}mo=e.return}}function Uo(t){for(;null!==mo;){var e=mo;if(e===t){mo=null;break}var n=e.sibling;if(null!==n){n.return=e.return,mo=n;break}mo=e.return}}function Bo(t){for(;null!==mo;){var e=mo;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{ko(4,e)}catch(t){el(e,n,t)}break;case 1:var r=e.stateNode;if("function"==typeof r.componentDidMount){var i=e.return;try{r.componentDidMount()}catch(t){el(e,i,t)}}var o=e.return;try{xo(e)}catch(t){el(e,o,t)}break;case 5:var a=e.return;try{xo(e)}catch(t){el(e,a,t)}}}catch(t){el(e,e.return,t)}if(e===t){mo=null;break}var l=e.sibling;if(null!==l){l.return=e.return,mo=l;break}mo=e.return}}var Ho=0,Vo=1,Wo=2,Ko=3,Yo=4;if("function"==typeof Symbol&&Symbol.for){var qo=Symbol.for;Ho=qo("selector.component"),Vo=qo("selector.has_pseudo_class"),Wo=qo("selector.role"),Ko=qo("selector.test_id"),Yo=qo("selector.text")}function Xo(t){var e=J(t);if(null!=e){if("string"!=typeof e.memoizedProps["data-testname"])throw Error(l(364));return e}if(null===(t=ot(t)))throw Error(l(362));return t.stateNode.current}function Qo(t,e){switch(e.$$typeof){case Ho:if(t.type===e.value)return!0;break;case Vo:t:{e=e.value,t=[t,0];for(var n=0;n<t.length;){var r=t[n++],i=t[n++],o=e[i];if(5!==r.tag||!st(r)){for(;null!=o&&Qo(r,o);)o=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 Wo:if(5===t.tag&&ut(t.stateNode,e.value))return!0;break;case Yo:if((5===t.tag||6===t.tag)&&null!==(t=lt(t))&&0<=t.indexOf(e.value))return!0;break;case Ko:if(5===t.tag&&"string"==typeof(t=t.memoizedProps["data-testname"])&&t.toLowerCase()===e.value.toLowerCase())return!0;break;default:throw Error(l(365))}return!1}function $o(t){switch(t.$$typeof){case Ho:return"<"+(x(t.value)||"Unknown")+">";case Vo:return":has("+($o(t)||"")+")";case Wo:return'[role="'+t.value+'"]';case Yo:return'"'+t.value+'"';case Ko:return'[data-testname="'+t.value+'"]';default:throw Error(l(365))}}function Jo(t,e){var n=[];t=[t,0];for(var r=0;r<t.length;){var i=t[r++],o=t[r++],a=e[o];if(5!==i.tag||!st(i)){for(;null!=a&&Qo(i,a);)a=e[++o];if(o===e.length)n.push(i);else for(i=i.child;null!==i;)t.push(i,o),i=i.sibling}}return n}function Zo(t,e){if(!it)throw Error(l(363));t=Jo(t=Xo(t),e),e=[],t=Array.from(t);for(var n=0;n<t.length;){var r=t[n++];if(5===r.tag)st(r)||e.push(r.stateNode);else for(r=r.child;null!==r;)t.push(r),r=r.sibling}return e}var ta=Math.ceil,ea=s.ReactCurrentDispatcher,na=s.ReactCurrentOwner,ra=s.ReactCurrentBatchConfig,ia=0,oa=null,aa=null,la=0,sa=0,ua=se(0),ca=0,fa=null,ha=0,da=0,pa=0,ya=null,va=null,ga=0,ma=1/0,ba=null;function _a(){ma=Ue()+500}var Sa,wa=!1,ka=null,xa=null,Pa=!1,Ca=null,Oa=0,Ta=0,Ea=null,Ra=-1,ja=0;function Aa(){return 0!=(6&ia)?Ue():-1!==Ra?Ra:Ra=Ue()}function Ma(t){return 0==(1&t.mode)?1:0!=(2&ia)&&0!==la?la&-la:null!==Tn.transition?(0===ja&&(ja=je()),ja):0!==(t=Fe)?t:tt()}function Na(t,e,n,r){if(50<Ta)throw Ta=0,Ea=null,Error(l(185));Me(t,n,r),0!=(2&ia)&&t===oa||(t===oa&&(0==(2&ia)&&(da|=n),4===ca&&Ga(t,la)),Fa(t,r),1===n&&0===ia&&0==(1&e.mode)&&(_a(),Qe&&Ze()))}function Fa(t,e){var n=t.callbackNode;!function(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,o=t.pendingLanes;0<o;){var a=31-we(o),l=1<<a,s=i[a];-1===s?0!=(l&n)&&0==(l&r)||(i[a]=Ee(l,e)):s<=e&&(t.expiredLanes|=l),o&=~l}}(t,e);var r=Te(t,t===oa?la:0);if(0===r)null!==n&&Le(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(null!=n&&Le(n),1===e)0===t.tag?function(t){Qe=!0,Je(t)}(za.bind(null,t)):Je(za.bind(null,t)),nt?rt((function(){0==(6&ia)&&Ze()})):Ie(Be,Ze),n=null;else{switch(De(r)){case 1:n=Be;break;case 4:n=He;break;case 16:default:n=Ve;break;case 536870912:n=We}n=al(n,Da.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Da(t,e){if(Ra=-1,ja=0,0!=(6&ia))throw Error(l(327));var n=t.callbackNode;if(Za()&&t.callbackNode!==n)return null;var r=Te(t,t===oa?la:0);if(0===r)return null;if(0!=(30&r)||0!=(r&t.expiredLanes)||e)e=Ya(t,r);else{e=r;var i=ia;ia|=2;var o=Wa();for(oa===t&&la===e||(ba=null,_a(),Ha(t,e));;)try{Xa();break}catch(e){Va(t,e)}Dn(),ea.current=o,ia=i,null!==aa?e=0:(oa=null,la=0,e=ca)}if(0!==e){if(2===e&&0!==(i=Re(t))&&(r=i,e=Ia(t,i)),1===e)throw n=fa,Ha(t,0),Ga(t,r),Fa(t,Ue()),n;if(6===e)Ga(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],o=i.getSnapshot;i=i.value;try{if(!qe(o(),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=Ya(t,r))&&0!==(o=Re(t))&&(r=o,e=Ia(t,o)),1===e))throw n=fa,Ha(t,0),Ga(t,r),Fa(t,Ue()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(l(345));case 2:case 5:Ja(t,va,ba);break;case 3:if(Ga(t,r),(130023424&r)===r&&10<(e=ga+500-Ue())){if(0!==Te(t,0))break;if(((i=t.suspendedLanes)&r)!==r){Aa(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=W(Ja.bind(null,t,va,ba),e);break}Ja(t,va,ba);break;case 4:if(Ga(t,r),(4194240&r)===r)break;for(e=t.eventTimes,i=-1;0<r;){var a=31-we(r);o=1<<a,(a=e[a])>i&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=Ue()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ta(r/1960))-r)){t.timeoutHandle=W(Ja.bind(null,t,va,ba),r);break}Ja(t,va,ba);break;default:throw Error(l(329))}}}return Fa(t,Ue()),t.callbackNode===n?Da.bind(null,t):null}function Ia(t,e){var n=ya;return t.current.memoizedState.isDehydrated&&(Ha(t,e).flags|=256),2!==(t=Ya(t,e))&&(e=va,va=n,null!==e&&La(e)),t}function La(t){null===va?va=t:va.push.apply(va,t)}function Ga(t,e){for(e&=~pa,e&=~da,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-we(e),r=1<<n;t[n]=-1,e&=~r}}function za(t){if(0!=(6&ia))throw Error(l(327));Za();var e=Te(t,0);if(0==(1&e))return Fa(t,Ue()),null;var n=Ya(t,e);if(0!==t.tag&&2===n){var r=Re(t);0!==r&&(e=r,n=Ia(t,r))}if(1===n)throw n=fa,Ha(t,0),Ga(t,e),Fa(t,Ue()),n;if(6===n)throw Error(l(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Ja(t,va,ba),Fa(t,Ue()),null}function Ua(t){null!==Ca&&0===Ca.tag&&0==(6&ia)&&Za();var e=ia;ia|=1;var n=ra.transition,r=Fe;try{if(ra.transition=null,Fe=1,t)return t()}finally{Fe=r,ra.transition=n,0==(6&(ia=e))&&Ze()}}function Ba(){sa=ua.current,ue(ua)}function Ha(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==Y&&(t.timeoutHandle=Y,K(n)),null!==aa)for(n=aa.return;null!==n;){var r=n;switch(dn(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&ge();break;case 3:_r(),ue(de),ue(he),Cr();break;case 5:wr(r);break;case 4:_r();break;case 13:case 19:ue(kr);break;case 10:Ln(r.type._context);break;case 22:case 23:Ba()}n=n.return}if(oa=t,aa=t=cl(t.current,null),la=sa=e,ca=0,fa=null,pa=da=ha=0,va=ya=null,null!==Bn){for(e=0;e<Bn.length;e++)if(null!==(r=(n=Bn[e]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}Bn=null}return t}function Va(t,e){for(;;){var n=aa;try{if(Dn(),Or.current=Si,Mr){for(var i=Rr.memoizedState;null!==i;){var o=i.queue;null!==o&&(o.pending=null),i=i.next}Mr=!1}if(Er=0,Ar=jr=Rr=null,Nr=!1,Fr=0,na.current=null,null===n||null===n.return){ca=1,fa=e,aa=null;break}t:{var a=t,s=n.return,u=n,c=e;if(e=la,u.flags|=32768,null!==c&&"object"===r(c)&&"function"==typeof c.then){var f=c,h=u,d=h.tag;if(0==(1&h.mode)&&(0===d||11===d||15===d)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var y=Ai(s);if(null!==y){y.flags&=-257,Mi(y,s,u,0,e),1&y.mode&&ji(a,f,e),c=f;var v=(e=y).updateQueue;if(null===v){var g=new Set;g.add(c),e.updateQueue=g}else v.add(c);break t}if(0==(1&e)){ji(a,f,e),Ka();break t}c=Error(l(426))}else if(vn&&1&u.mode){var m=Ai(s);if(null!==m){0==(65536&m.flags)&&(m.flags|=256),Mi(m,s,u,0,e),On(Pi(c,u));break t}}a=c=Pi(c,u),4!==ca&&(ca=2),null===ya?ya=[a]:ya.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,e&=-e,a.lanes|=e,Jn(a,Ei(0,c,e));break t;case 1:u=c;var b=a.type,_=a.stateNode;if(0==(128&a.flags)&&("function"==typeof b.getDerivedStateFromError||null!==_&&"function"==typeof _.componentDidCatch&&(null===xa||!xa.has(_)))){a.flags|=65536,e&=-e,a.lanes|=e,Jn(a,Ri(a,u,e));break t}}a=a.return}while(null!==a)}$a(n)}catch(t){e=t,aa===n&&null!==n&&(aa=n=n.return);continue}break}}function Wa(){var t=ea.current;return ea.current=Si,null===t?Si:t}function Ka(){0!==ca&&3!==ca&&2!==ca||(ca=4),null===oa||0==(268435455&ha)&&0==(268435455&da)||Ga(oa,la)}function Ya(t,e){var n=ia;ia|=2;var r=Wa();for(oa===t&&la===e||(ba=null,Ha(t,e));;)try{qa();break}catch(e){Va(t,e)}if(Dn(),ia=n,ea.current=r,null!==aa)throw Error(l(261));return oa=null,la=0,ca}function qa(){for(;null!==aa;)Qa(aa)}function Xa(){for(;null!==aa&&!Ge();)Qa(aa)}function Qa(t){var e=Sa(t.alternate,t,sa);t.memoizedProps=t.pendingProps,null===e?$a(t):aa=e,na.current=null}function $a(t){var e=t;do{var n=e.alternate;if(t=e.return,0==(32768&e.flags)){if(null!==(n=ho(n,e,sa)))return void(aa=n)}else{if(null!==(n=po(n,e)))return n.flags&=32767,void(aa=n);if(null===t)return ca=6,void(aa=null);t.flags|=32768,t.subtreeFlags=0,t.deletions=null}if(null!==(e=e.sibling))return void(aa=e);aa=e=t}while(null!==e);0===ca&&(ca=5)}function Ja(t,e,n){var r=Fe,i=ra.transition;try{ra.transition=null,Fe=1,function(t,e,n,r){do{Za()}while(null!==Ca);if(0!=(6&ia))throw Error(l(327));n=t.finishedWork;var i=t.finishedLanes;if(null===n)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(l(177));t.callbackNode=null,t.callbackPriority=0;var o=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-we(n),o=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~o}}(t,o),t===oa&&(aa=oa=null,la=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Pa||(Pa=!0,al(Ve,(function(){return Za(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=ra.transition,ra.transition=null;var a=Fe;Fe=1;var s=ia;ia|=4,na.current=null,function(t,e){for(I(t.containerInfo),mo=e;null!==mo;)if(e=(t=mo).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,mo=e;else for(;null!==mo;){t=mo;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,o=t.stateNode,a=o.getSnapshotBeforeUpdate(t.elementType===t.type?r:jn(t.type,r),i);o.__reactInternalSnapshotBeforeUpdate=a}break;case 3:X&&Ct(t.stateNode.containerInfo);break;default:throw Error(l(163))}}catch(e){el(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,mo=e;break}mo=t.return}n=So,So=!1}(t,n),Do(n,t),L(t.containerInfo),t.current=n,Lo(n,t,i),ze(),ia=s,Fe=a,ra.transition=o}else t.current=n;if(Pa&&(Pa=!1,Ca=t,Oa=i),0===(o=t.pendingLanes)&&(xa=null),function(t){if(Ye&&"function"==typeof Ye.onCommitFiberRoot)try{Ye.onCommitFiberRoot(Ke,t,void 0,128==(128&t.current.flags))}catch(t){}}(n.stateNode),Fa(t,Ue()),null!==e)for(r=t.onRecoverableError,n=0;n<e.length;n++)r((i=e[n]).value,{componentStack:i.stack,digest:i.digest});if(wa)throw wa=!1,t=ka,ka=null,t;0!=(1&Oa)&&0!==t.tag&&Za(),0!=(1&(o=t.pendingLanes))?t===Ea?Ta++:(Ta=0,Ea=t):Ta=0,Ze()}(t,e,n,r)}finally{ra.transition=i,Fe=r}return null}function Za(){if(null!==Ca){var t=De(Oa),e=ra.transition,n=Fe;try{if(ra.transition=null,Fe=16>t?16:t,null===Ca)var r=!1;else{if(t=Ca,Ca=null,Oa=0,0!=(6&ia))throw Error(l(331));var i=ia;for(ia|=4,mo=t.current;null!==mo;){var o=mo,a=o.child;if(0!=(16&mo.flags)){var s=o.deletions;if(null!==s){for(var u=0;u<s.length;u++){var c=s[u];for(mo=c;null!==mo;){var f=mo;switch(f.tag){case 0:case 11:case 15:wo(8,f,o)}var h=f.child;if(null!==h)h.return=f,mo=h;else for(;null!==mo;){var d=(f=mo).sibling,p=f.return;if(Po(f),f===c){mo=null;break}if(null!==d){d.return=p,mo=d;break}mo=p}}}var y=o.alternate;if(null!==y){var v=y.child;if(null!==v){y.child=null;do{var g=v.sibling;v.sibling=null,v=g}while(null!==v)}}mo=o}}if(0!=(2064&o.subtreeFlags)&&null!==a)a.return=o,mo=a;else t:for(;null!==mo;){if(0!=(2048&(o=mo).flags))switch(o.tag){case 0:case 11:case 15:wo(9,o,o.return)}var m=o.sibling;if(null!==m){m.return=o.return,mo=m;break t}mo=o.return}}var b=t.current;for(mo=b;null!==mo;){var _=(a=mo).child;if(0!=(2064&a.subtreeFlags)&&null!==_)_.return=a,mo=_;else t:for(a=b;null!==mo;){if(0!=(2048&(s=mo).flags))try{switch(s.tag){case 0:case 11:case 15:ko(9,s)}}catch(t){el(s,s.return,t)}if(s===a){mo=null;break t}var S=s.sibling;if(null!==S){S.return=s.return,mo=S;break t}mo=s.return}}if(ia=i,Ze(),Ye&&"function"==typeof Ye.onPostCommitFiberRoot)try{Ye.onPostCommitFiberRoot(Ke,t)}catch(t){}r=!0}return r}finally{Fe=n,ra.transition=e}}return!1}function tl(t,e,n){t=Qn(t,e=Ei(0,e=Pi(n,e),1),1),e=Aa(),null!==t&&(Me(t,1,e),Fa(t,e))}function el(t,e,n){if(3===t.tag)tl(t,t,n);else for(;null!==e;){if(3===e.tag){tl(e,t,n);break}if(1===e.tag){var r=e.stateNode;if("function"==typeof e.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===xa||!xa.has(r))){e=Qn(e,t=Ri(e,t=Pi(n,t),1),1),t=Aa(),null!==e&&(Me(e,1,t),Fa(e,t));break}}e=e.return}}function nl(t,e,n){var r=t.pingCache;null!==r&&r.delete(e),e=Aa(),t.pingedLanes|=t.suspendedLanes&n,oa===t&&(la&n)===n&&(4===ca||3===ca&&(130023424&la)===la&&500>Ue()-ga?Ha(t,0):pa|=n),Fa(t,e)}function rl(t,e){0===e&&(0==(1&t.mode)?e=1:(e=Ce,0==(130023424&(Ce<<=1))&&(Ce=4194304)));var n=Aa();null!==(t=Wn(t,e))&&(Me(t,e,n),Fa(t,n))}function il(t){var e=t.memoizedState,n=0;null!==e&&(n=e.retryLane),rl(t,n)}function ol(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(l(314))}null!==r&&r.delete(e),rl(t,n)}function al(t,e){return Ie(t,e)}function ll(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 sl(t,e,n,r){return new ll(t,e,n,r)}function ul(t){return!(!(t=t.prototype)||!t.isReactComponent)}function cl(t,e){var n=t.alternate;return null===n?((n=sl(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 fl(t,e,n,i,o,a){var s=2;if(i=t,"function"==typeof t)ul(t)&&(s=1);else if("string"==typeof t)s=5;else t:switch(t){case f:return hl(n.children,o,a,e);case h:s=8,o|=8;break;case d:return(t=sl(12,n,e,2|o)).elementType=d,t.lanes=a,t;case g:return(t=sl(13,n,e,o)).elementType=g,t.lanes=a,t;case m:return(t=sl(19,n,e,o)).elementType=m,t.lanes=a,t;case S:return dl(n,o,a,e);default:if("object"===r(t)&&null!==t)switch(t.$$typeof){case p:s=10;break t;case y:s=9;break t;case v:s=11;break t;case b:s=14;break t;case _:s=16,i=null;break t}throw Error(l(130,null==t?t:r(t),""))}return(e=sl(s,n,e,o)).elementType=t,e.type=i,e.lanes=a,e}function hl(t,e,n,r){return(t=sl(7,t,r,e)).lanes=n,t}function dl(t,e,n,r){return(t=sl(22,t,r,e)).elementType=S,t.lanes=n,t.stateNode={isHidden:!1},t}function pl(t,e,n){return(t=sl(6,t,null,e)).lanes=n,t}function yl(t,e,n){return(e=sl(4,null!==t.children?t.children:[],t.key,e)).lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function vl(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Y,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ae(0),this.expirationTimes=Ae(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ae(0),this.identifierPrefix=r,this.onRecoverableError=i,$&&(this.mutableSourceEagerHydrationData=null)}function gl(t,e,n,r,i,o,a,l,s){return t=new vl(t,e,n,l,s),1===e?(e=1,!0===o&&(e|=8)):e=0,o=sl(3,null,null,e),t.current=o,o.stateNode=t,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yn(o),t}function ml(t){if(!t)return fe;t:{if(C(t=t._reactInternals)!==t||1!==t.tag)throw Error(l(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break t;case 1:if(ve(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break t}}e=e.return}while(null!==e);throw Error(l(171))}if(1===t.tag){var n=t.type;if(ve(n))return be(t,n,e)}return e}function bl(t){var e=t._reactInternals;if(void 0===e){if("function"==typeof t.render)throw Error(l(188));throw t=Object.keys(t).join(","),Error(l(268,t))}return null===(t=E(e))?null:t.stateNode}function _l(t,e){if(null!==(t=t.memoizedState)&&null!==t.dehydrated){var n=t.retryLane;t.retryLane=0!==n&&n<e?n:e}}function Sl(t,e){_l(t,e),(t=t.alternate)&&_l(t,e)}function wl(t){return null===(t=E(t))?null:t.stateNode}function kl(){return null}return Sa=function(t,e,n){if(null!==t)if(t.memoizedProps!==e.pendingProps||de.current)Fi=!0;else{if(0==(t.lanes&n)&&0==(128&e.flags))return Fi=!1,function(t,e,n){switch(e.tag){case 3:Wi(e),Cn();break;case 5:Sr(e);break;case 1:ve(e.type)&&_e(e);break;case 4:br(e,e.stateNode.containerInfo);break;case 10:In(0,e.type._context,e.memoizedProps.value);break;case 13:var r=e.memoizedState;if(null!==r)return null!==r.dehydrated?(ce(kr,1&kr.current),e.flags|=128,null):0!=(n&e.child.childLanes)?Zi(t,e,n):(ce(kr,1&kr.current),null!==(t=ao(t,e,n))?t.sibling:null);ce(kr,1&kr.current);break;case 19:if(r=0!=(n&e.childLanes),0!=(128&t.flags)){if(r)return io(t,e,n);e.flags|=128}var i=e.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),ce(kr,kr.current),r)break;return null;case 22:case 23:return e.lanes=0,zi(t,e,n)}return ao(t,e,n)}(t,e,n);Fi=0!=(131072&t.flags)}else Fi=!1,vn&&0!=(1048576&e.flags)&&fn(e,rn,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;oo(t,e),t=e.pendingProps;var o=ye(e,he.current);zn(e,n),o=Gr(null,e,i,t,o,n);var a=zr();return e.flags|=1,"object"===r(o)&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ve(i)?(a=!0,_e(e)):a=!1,e.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,Yn(e),o.updater=rr,e.stateNode=o,o._reactInternals=e,lr(e,i,t,n),e=Vi(null,e,i,!0,a,n)):(e.tag=0,vn&&a&&hn(e),Di(null,e,o,n),e=e.child),e;case 16:i=e.elementType;t:{switch(oo(t,e),t=e.pendingProps,i=(o=i._init)(i._payload),e.type=i,o=e.tag=function(t){if("function"==typeof t)return ul(t)?1:0;if(null!=t){if((t=t.$$typeof)===v)return 11;if(t===b)return 14}return 2}(i),t=jn(i,t),o){case 0:e=Bi(null,e,i,t,n);break t;case 1:e=Hi(null,e,i,t,n);break t;case 11:e=Ii(null,e,i,t,n);break t;case 14:e=Li(null,e,i,jn(i.type,t),n);break t}throw Error(l(306,i,""))}return e;case 0:return i=e.type,o=e.pendingProps,Bi(t,e,i,o=e.elementType===i?o:jn(i,o),n);case 1:return i=e.type,o=e.pendingProps,Hi(t,e,i,o=e.elementType===i?o:jn(i,o),n);case 3:t:{if(Wi(e),null===t)throw Error(l(387));i=e.pendingProps,o=(a=e.memoizedState).element,qn(t,e),Zn(e,i,null,n);var s=e.memoizedState;if(i=s.element,$&&a.isDehydrated){if(a={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},e.updateQueue.baseState=a,e.memoizedState=a,256&e.flags){e=Ki(t,e,i,n,o=Pi(Error(l(423)),e));break t}if(i!==o){e=Ki(t,e,i,n,o=Pi(Error(l(424)),e));break t}for($&&(yn=Ht(e.stateNode.containerInfo),pn=e,vn=!0,mn=null,gn=!1),n=dr(e,null,i,n),e.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Cn(),i===o){e=ao(t,e,n);break t}Di(t,e,i,n)}e=e.child}return e;case 5:return Sr(e),null===t&&wn(e),i=e.type,o=e.pendingProps,a=null!==t?t.memoizedProps:null,s=o.children,H(i,o)?s=null:null!==a&&H(i,a)&&(e.flags|=32),Ui(t,e),Di(t,e,s,n),e.child;case 6:return null===t&&wn(e),null;case 13:return Zi(t,e,n);case 4:return br(e,e.stateNode.containerInfo),i=e.pendingProps,null===t?e.child=hr(e,null,i,n):Di(t,e,i,n),e.child;case 11:return i=e.type,o=e.pendingProps,Ii(t,e,i,o=e.elementType===i?o:jn(i,o),n);case 7:return Di(t,e,e.pendingProps,n),e.child;case 8:case 12:return Di(t,e,e.pendingProps.children,n),e.child;case 10:t:{if(i=e.type._context,o=e.pendingProps,a=e.memoizedProps,In(0,i,s=o.value),null!==a)if(qe(a.value,s)){if(a.children===o.children&&!de.current){e=ao(t,e,n);break t}}else for(null!==(a=e.child)&&(a.return=e);null!==a;){var u=a.dependencies;if(null!==u){s=a.child;for(var c=u.firstContext;null!==c;){if(c.context===i){if(1===a.tag){(c=Xn(-1,n&-n)).tag=2;var f=a.updateQueue;if(null!==f){var h=(f=f.shared).pending;null===h?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),Gn(a.return,n,e),u.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===e.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(l(341));s.lanes|=n,null!==(u=s.alternate)&&(u.lanes|=n),Gn(s,n,e),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===e){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}Di(t,e,o.children,n),e=e.child}return e;case 9:return o=e.type,i=e.pendingProps.children,zn(e,n),i=i(o=Un(o)),e.flags|=1,Di(t,e,i,n),e.child;case 14:return o=jn(i=e.type,e.pendingProps),Li(t,e,i,o=jn(i.type,o),n);case 15:return Gi(t,e,e.type,e.pendingProps,n);case 17:return i=e.type,o=e.pendingProps,o=e.elementType===i?o:jn(i,o),oo(t,e),e.tag=1,ve(i)?(t=!0,_e(e)):t=!1,zn(e,n),or(e,i,o),lr(e,i,o,n),Vi(null,e,i,!0,t,n);case 19:return io(t,e,n);case 22:return zi(t,e,n)}throw Error(l(156,e.tag))},e.attemptContinuousHydration=function(t){if(13===t.tag){var e=Wn(t,134217728);null!==e&&Na(e,t,134217728,Aa()),Sl(t,134217728)}},e.attemptDiscreteHydration=function(t){if(13===t.tag){var e=Wn(t,1);null!==e&&Na(e,t,1,Aa()),Sl(t,1)}},e.attemptHydrationAtCurrentPriority=function(t){if(13===t.tag){var e=Ma(t),n=Wn(t,e);null!==n&&Na(n,t,e,Aa()),Sl(t,e)}},e.attemptSynchronousHydration=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Oe(e.pendingLanes);0!==n&&(Ne(e,1|n),Fa(e,Ue()),0==(6&ia)&&(_a(),Ze()))}break;case 13:Ua((function(){var e=Wn(t,1);if(null!==e){var n=Aa();Na(e,t,1,n)}})),Sl(t,1)}},e.batchedUpdates=function(t,e){var n=ia;ia|=1;try{return t(e)}finally{0===(ia=n)&&(_a(),Qe&&Ze())}},e.createComponentSelector=function(t){return{$$typeof:Ho,value:t}},e.createContainer=function(t,e,n,r,i,o,a){return gl(t,e,!1,null,0,r,0,o,a)},e.createHasPseudoClassSelector=function(t){return{$$typeof:Vo,value:t}},e.createHydrationContainer=function(t,e,n,r,i,o,a,l,s){return(t=gl(n,r,!0,t,0,o,0,l,s)).context=ml(null),n=t.current,(o=Xn(r=Aa(),i=Ma(n))).callback=null!=e?e:null,Qn(n,o,i),t.current.lanes=i,Me(t,i,r),Fa(t,r),t},e.createPortal=function(t,e,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:c,key:null==r?null:""+r,children:t,containerInfo:e,implementation:n}},e.createRoleSelector=function(t){return{$$typeof:Wo,value:t}},e.createTestNameSelector=function(t){return{$$typeof:Ko,value:t}},e.createTextSelector=function(t){return{$$typeof:Yo,value:t}},e.deferredUpdates=function(t){var e=Fe,n=ra.transition;try{return ra.transition=null,Fe=16,t()}finally{Fe=e,ra.transition=n}},e.discreteUpdates=function(t,e,n,r,i){var o=Fe,a=ra.transition;try{return ra.transition=null,Fe=1,t(e,n,r,i)}finally{Fe=o,ra.transition=a,0===ia&&_a()}},e.findAllNodes=Zo,e.findBoundingRects=function(t,e){if(!it)throw Error(l(363));e=Zo(t,e),t=[];for(var n=0;n<e.length;n++)t.push(at(e[n]));for(e=t.length-1;0<e;e--)for(var r=(n=t[e]).x,i=r+n.width,o=n.y,a=o+n.height,s=e-1;0<=s;s--)if(e!==s){var u=t[s],c=u.x,f=c+u.width,h=u.y,d=h+u.height;if(r>=c&&o>=h&&i<=f&&a<=d){t.splice(e,1);break}if(!(r!==c||n.width!==u.width||d<o||h>a)){h>o&&(u.height+=h-o,u.y=o),d<a&&(u.height=a-h),t.splice(e,1);break}if(!(o!==h||n.height!==u.height||f<r||c>i)){c>r&&(u.width+=c-r,u.x=r),f<i&&(u.width=i-c),t.splice(e,1);break}}return t},e.findHostInstance=bl,e.findHostInstanceWithNoPortals=function(t){return null===(t=null!==(t=T(t))?j(t):null)?null:t.stateNode},e.findHostInstanceWithWarning=function(t){return bl(t)},e.flushControlled=function(t){var e=ia;ia|=1;var n=ra.transition,r=Fe;try{ra.transition=null,Fe=1,t()}finally{Fe=r,ra.transition=n,0===(ia=e)&&(_a(),Ze())}},e.flushPassiveEffects=Za,e.flushSync=Ua,e.focusWithin=function(t,e){if(!it)throw Error(l(363));for(e=Jo(t=Xo(t),e),e=Array.from(e),t=0;t<e.length;){var n=e[t++];if(!st(n)){if(5===n.tag&&ct(n.stateNode))return!0;for(n=n.child;null!==n;)e.push(n),n=n.sibling}}return!1},e.getCurrentUpdatePriority=function(){return Fe},e.getFindAllNodesFailureDescription=function(t,e){if(!it)throw Error(l(363));var n=0,r=[];t=[Xo(t),0];for(var i=0;i<t.length;){var o=t[i++],a=t[i++],s=e[a];if((5!==o.tag||!st(o))&&(Qo(o,s)&&(r.push($o(s)),++a>n&&(n=a)),a<e.length))for(o=o.child;null!==o;)t.push(o,a),o=o.sibling}if(n<e.length){for(t=[];n<e.length;n++)t.push($o(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},e.getPublicRootInstance=function(t){return(t=t.current).child?5===t.child.tag?N(t.child.stateNode):t.child.stateNode:null},e.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:s.ReactCurrentDispatcher,findHostInstanceByFiber:wl,findFiberByHostInstance:t.findFiberByHostInstance||kl,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)t=!1;else{var e=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(e.isDisabled||!e.supportsFiber)t=!0;else{try{Ke=e.inject(t),Ye=e}catch(t){}t=!!e.checkDCE}}return t},e.isAlreadyRendering=function(){return!1},e.observeVisibleRects=function(t,e,n,r){if(!it)throw Error(l(363));t=Zo(t,e);var i=ft(t,n,r).disconnect;return{disconnect:function(){i()}}},e.registerMutableSourceForHydration=function(t,e){var n=e._getVersion;n=n(e._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[e,n]:t.mutableSourceEagerHydrationData.push(e,n)},e.runWithPriority=function(t,e){var n=Fe;try{return Fe=t,e()}finally{Fe=n}},e.shouldError=function(){return null},e.shouldSuspend=function(){return!1},e.updateContainer=function(t,e,n,r){var i=e.current,o=Aa(),a=Ma(i);return n=ml(n),null===e.context?e.context=n:e.pendingContext=n,(e=Xn(o,a)).payload={element:t},null!==(r=void 0===r?null:r)&&(e.callback=r),null!==(t=Qn(i,e,a))&&(Na(t,i,a,o),$n(t,i,a)),a},e}},9266:(t,e,n)=>{"use strict";t.exports=n(5489)},3915:(t,e,n)=>{"use strict";t.exports=n(1404)},7507:(t,e)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t,e){var n=t.length;t.push(e);t:for(;0<n;){var r=n-1>>>1,i=t[r];if(!(0<a(i,e)))break t;t[r]=e,t[n]=i,n=r}}function i(t){return 0===t.length?null:t[0]}function o(t){if(0===t.length)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;t:for(var r=0,i=t.length,o=i>>>1;r<o;){var l=2*(r+1)-1,s=t[l],u=l+1,c=t[u];if(0>a(s,n))u<i&&0>a(c,s)?(t[r]=c,t[u]=n,r=u):(t[r]=s,t[l]=n,r=l);else{if(!(u<i&&0>a(c,n)))break t;t[r]=c,t[u]=n,r=u}}}return e}function a(t,e){var n=t.sortIndex-e.sortIndex;return 0!==n?n:t.id-e.id}if("object"===("undefined"==typeof performance?"undefined":n(performance))&&"function"==typeof performance.now){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],f=[],h=1,d=null,p=3,y=!1,v=!1,g=!1,m="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,_="undefined"!=typeof setImmediate?setImmediate:null;function S(t){for(var e=i(f);null!==e;){if(null===e.callback)o(f);else{if(!(e.startTime<=t))break;o(f),e.sortIndex=e.expirationTime,r(c,e)}e=i(f)}}function w(t){if(g=!1,S(t),!v)if(null!==i(c))v=!0,N(k);else{var e=i(f);null!==e&&F(w,e.startTime-t)}}function k(t,n){v=!1,g&&(g=!1,b(O),O=-1),y=!0;var r=p;try{for(S(n),d=i(c);null!==d&&(!(d.expirationTime>n)||t&&!R());){var a=d.callback;if("function"==typeof a){d.callback=null,p=d.priorityLevel;var l=a(d.expirationTime<=n);n=e.unstable_now(),"function"==typeof l?d.callback=l:d===i(c)&&o(c),S(n)}else o(c);d=i(c)}if(null!==d)var s=!0;else{var u=i(f);null!==u&&F(w,u.startTime-n),s=!1}return s}finally{d=null,p=r,y=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var x,P=!1,C=null,O=-1,T=5,E=-1;function R(){return!(e.unstable_now()-E<T)}function j(){if(null!==C){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?x():(P=!1,C=null)}}else P=!1}if("function"==typeof _)x=function(){_(j)};else if("undefined"!=typeof MessageChannel){var A=new MessageChannel,M=A.port2;A.port1.onmessage=j,x=function(){M.postMessage(null)}}else x=function(){m(j,0)};function N(t){C=t,P||(P=!0,x())}function F(t,n){O=m((function(){t(e.unstable_now())}),n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(t){t.callback=null},e.unstable_continueExecution=function(){v||y||(v=!0,N(k))},e.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<t?Math.floor(1e3/t):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return i(c)},e.unstable_next=function(t){switch(p){case 1:case 2:case 3:var e=3;break;default:e=p}var n=p;p=e;try{return t()}finally{p=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=p;p=t;try{return e()}finally{p=n}},e.unstable_scheduleCallback=function(t,o,a){var l=e.unstable_now();switch(a="object"===n(a)&&null!==a&&"number"==typeof(a=a.delay)&&0<a?l+a:l,t){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return t={id:h++,callback:o,priorityLevel:t,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>l?(t.sortIndex=a,r(f,t),null===i(c)&&t===i(f)&&(g?(b(O),O=-1):g=!0,F(w,a-l))):(t.sortIndex=s,r(c,t),v||y||(v=!0,N(k))),t},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(t){var e=p;return function(){var n=p;p=e;try{return t.apply(this,arguments)}finally{p=n}}}},2258:(t,e,n)=>{"use strict";t.exports=n(7507)},440:t=>{t.exports=function(){return this.React}()},9323:(t,e,n)=>{"use strict";n.r(e),n.d(e,{FiberProvider:()=>w,traverseFiber:()=>b,useContainer:()=>O,useContextBridge:()=>j,useContextMap:()=>R,useFiber:()=>C,useNearestChild:()=>T,useNearestParent:()=>E});var r=n(440);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==i(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===i(o)?o:String(o)),r)}var o}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var c=Object.defineProperty,f=Object.defineProperties,h=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,p=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,v=function(t,e,n){return e in t?c(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},g=function(t,e){for(var n in e||(e={}))p.call(e,n)&&v(t,n,e[n]);if(d){var r,i=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=s(t))){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}(d(e));try{for(i.s();!(r=i.n()).done;)n=r.value,y.call(e,n)&&v(t,n,e[n])}catch(t){i.e(t)}finally{i.f()}}return t},m=function(t,e){return f(t,h(e))};function b(t,e,n){if(t){if(!0===n(t))return t;for(var r=e?t.return:t.child;r;){var i=b(r,e,n);if(i)return i;r=e?null:r.sibling}}}function _(t){try{return Object.defineProperties(t,{_currentRenderer:{get:function(){return null},set:function(){}},_currentRenderer2:{get:function(){return null},set:function(){}}})}catch(e){return t}}var S=_(r.createContext(null)),w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(f,t);var e,n,s,u,c=(s=f,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=l(s);if(u){var n=l(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function f(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),c.apply(this,arguments)}return e=f,(n=[{key:"render",value:function(){return r.createElement(S.Provider,{value:this._reactInternals},this.props.children)}}])&&o(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(r.Component),k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=k.ReactCurrentOwner,P=k.ReactCurrentDispatcher;function C(){var t=r.useContext(S);if(null===t)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");var e=r.useId();return r.useMemo((function(){var n;return null!=(n=null==x?void 0:x.current)?n:b(t,!1,(function(t){for(var n=t.memoizedState;n;){if(n.memoizedState===e)return!0;n=n.next}}))}),[t,e])}function O(){var t=C(),e=r.useMemo((function(){return b(t,!0,(function(t){var e;return null!=(null==(e=t.stateNode)?void 0:e.containerInfo)}))}),[t]);return null==e?void 0:e.stateNode.containerInfo}function T(t){var e=C(),n=r.useRef();return r.useLayoutEffect((function(){var r;n.current=null==(r=b(e,!1,(function(e){return"string"==typeof e.type&&(void 0===t||e.type===t)})))?void 0:r.stateNode}),[e]),n}function E(t){var e=C(),n=r.useRef();return r.useLayoutEffect((function(){var r;n.current=null==(r=b(e,!0,(function(e){return"string"==typeof e.type&&(void 0===t||e.type===t)})))?void 0:r.stateNode}),[e]),n}function R(){var t,e,n,i,o=C(),a=(n=r.useState((function(){return new Map})),i=1,function(t){if(Array.isArray(t))return t}(n)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],s=!0,u=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){u=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw i}}return l}}(n,i)||s(n,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];a.clear();for(var l=o;l;){var u=null==(t=l.type)?void 0:t._context;u&&u!==S&&!a.has(u)&&a.set(u,null==(e=null==P?void 0:P.current)?void 0:e.readContext(_(u))),l=l.return}return a}function j(){var t=R();return r.useMemo((function(){return Array.from(t.keys()).reduce((function(e,n){return function(i){return r.createElement(e,null,r.createElement(n.Provider,m(g({},i),{value:t.get(n)})))}}),(function(t){return r.createElement(w,g({},t))}))}),[t])}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,n),o.exports}return n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(2636)})()));