i||s===r);s++);a=s-1}var l=Xr(e[a],e[a+1],i);return t[a](l)}}function Ei(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.clamp,i=void 0===r||r,a=n.ease,o=n.mixer,s=e.length;t.length,!a||!Array.isArray(a)||a.length,e[0]>e[s-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var l=ji(t,a,o),u=2===s?Ci(e,l):Pi(e,l);return i?function(t){return u(zr(e[0],e[s-1],t))}:u}var Mi,Ni=function(e){return function(t){return 1-e(1-t)}},Ti=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},Oi=function(e){return function(t){return t*t*((e+1)*t-e)}},Ai=function(e){return e},Di=(Mi=2,function(e){return Math.pow(e,Mi)}),Li=Ni(Di),Ri=Ti(Di),Ii=function(e){return 1-Math.sin(Math.acos(e))},Fi=Ni(Ii),zi=Ti(Fi),Vi=Oi(1.525),Bi=Ni(Vi),Wi=Ti(Vi),Ui=function(e){var t=Oi(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}}(1.525),Hi=function(e){if(1===e||0===e)return e;var t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},$i=Ni(Hi);function Yi(e,t){return e.map((function(){return t||Ri})).splice(0,e.length-1)}function qi(e){var t=e.from,n=void 0===t?0:t,r=e.to,i=void 0===r?1:r,a=e.ease,o=e.offset,s=e.duration,l=void 0===s?300:s,u={done:!1,value:n},c=Array.isArray(i)?i:[n,i],d=function(e,t){return e.map((function(e){return e*t}))}(o&&o.length===c.length?o:function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(c),l);function h(){return Ei(d,c,{ease:Array.isArray(a)?a:Yi(c,a)})}var f=h();return{next:function(e){return u.value=f(e),u.done=e>=l,u},flipTarget:function(){c.reverse(),f=h()}}}var Xi={keyframes:qi,spring:Yr,decay:function(e){var t=e.velocity,n=void 0===t?0:t,r=e.from,i=void 0===r?0:r,a=e.power,o=void 0===a?.8:a,s=e.timeConstant,l=void 0===s?350:s,u=e.restDelta,c=void 0===u?.5:u,d=e.modifyTarget,h={done:!1,value:i},f=o*n,p=i+f,v=void 0===d?p:d(p);return v!==p&&(f=v-i),{next:function(e){var t=-f*Math.exp(-e/l);return h.done=!(t>c||t<-c),h.value=h.done?v:v+t,h},flipTarget:function(){}}}};function Ki(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e-t-n}var Gi=function(e){var t=function(t){var n=t.delta;return e(n)};return{start:function(){return qe.update(t,!0)},stop:function(){return Be.update(t)}}};function Qi(e){var t,n,r,i,a,o=e.from,s=e.autoplay,l=void 0===s||s,u=e.driver,c=void 0===u?Gi:u,d=e.elapsed,h=void 0===d?0:d,f=e.repeat,p=void 0===f?0:f,v=e.repeatType,m=void 0===v?"loop":v,g=e.repeatDelay,y=void 0===g?0:g,b=e.onPlay,x=e.onStop,k=e.onComplete,_=e.onRepeat,w=e.onUpdate,S=Fr(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),j=S.to,C=0,P=S.duration,E=!1,M=!0,N=function(e){if(Array.isArray(e.to))return qi;if(Xi[e.type])return Xi[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?qi:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Yr:qi}(S);(null===(n=(t=N).needsInterpolation)||void 0===n?void 0:n.call(t,o,j))&&(a=Ei([0,100],[o,j],{clamp:!1}),o=0,j=100);var T=N(Object.assign(Object.assign({},S),{from:o,to:j}));function O(){C++,"reverse"===m?h=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?t-(e-t)+n:Ki(t+-e,t,n)}(h,P,y,M=C%2===0):(h=Ki(h,P,y),"mirror"===m&&T.flipTarget()),E=!1,_&&_()}function A(e){if(M||(e=-e),h+=e,!E){var t=T.next(Math.max(0,h));i=t.value,a&&(i=a(i)),E=M?t.done:h<=0}null===w||void 0===w||w(i),E&&(0===C&&(null!==P&&void 0!==P||(P=h)),C=t+n:e<=-n}(h,P,y,M)&&O():(r.stop(),k&&k()))}return l&&(null===b||void 0===b||b(),(r=c(A)).start()),{stop:function(){null===x||void 0===x||x(),r.stop()}}}function Ji(e,t){return t?e*(1e3/t):0}var Zi=function(e){return 1e3*e},ea=function(e,t){return 1-3*t+3*e},ta=function(e,t){return 3*t-6*e},na=function(e){return 3*e},ra=function(e,t,n){return((ea(t,n)*e+ta(t,n))*e+na(t))*e},ia=function(e,t,n){return 3*ea(t,n)*e*e+2*ta(t,n)*e+na(t)};var aa=.1;function oa(e,t,n,r){if(e===t&&n===r)return Ai;for(var i=new Float32Array(11),a=0;a<11;++a)i[a]=ra(a*aa,e,n);function o(t){for(var r=0,a=1;10!==a&&i[a]<=t;++a)r+=aa;--a;var o=r+(t-i[a])/(i[a+1]-i[a])*aa,s=ia(o,e,n);return s>=.001?function(e,t,n,r){for(var i=0;i<8;++i){var a=ia(t,n,r);if(0===a)return t;t-=(ra(t,n,r)-e)/a}return t}(t,o,e,n):0===s?o:function(e,t,n,r,i){var a,o,s=0;do{(a=ra(o=t+(n-t)/2,r,i)-e)>0?n=o:t=o}while(Math.abs(a)>1e-7&&++s<10);return o}(t,r,r+aa,e,n)}return function(e){return 0===e||1===e?e:ra(o(e),t,r)}}var sa={linear:Ai,easeIn:Di,easeInOut:Ri,easeOut:Li,circIn:Ii,circInOut:zi,circOut:Fi,backIn:Vi,backInOut:Wi,backOut:Bi,anticipate:Ui,bounceIn:$i,bounceInOut:function(e){return e<.5?.5*(1-Hi(1-2*e)):.5*Hi(2*e-1)+.5},bounceOut:Hi},la=function(e){if(Array.isArray(e)){e.length;var t=Me(e,4);return oa(t[0],t[1],t[2],t[3])}return"string"===typeof e?("Invalid easing type '".concat(e,"'"),sa[e]):e},ua=function(e,t){return"zIndex"!==e&&(!("number"!==typeof t&&!Array.isArray(t))||!("string"!==typeof t||!gi.test(t)||t.startsWith("url(")))},ca=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},da=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}},ha=function(){return{type:"keyframes",ease:"linear",duration:.3}},fa=function(e){return{type:"keyframes",duration:.8,values:e}},pa={x:ca,y:ca,z:ca,rotate:ca,rotateX:ca,rotateY:ca,rotateZ:ca,scaleX:da,scaleY:da,scale:da,opacity:ha,backgroundColor:ha,color:ha,default:da},va=new Set(["brightness","contrast","saturate","opacity"]);function ma(e){var t=Me(e.slice(0,-1).split("("),2),n=t[0],r=t[1];if("drop-shadow"===n)return e;var i=Me(r.match(rn)||[],1)[0];if(!i)return e;var a=r.replace(i,""),o=va.has(n)?1:0;return i!==r&&(o*=100),n+"("+o+a+")"}var ga=/([a-z-]*)\(.*?\)/g,ya=Object.assign(Object.assign({},gi),{getAnimatableNone:function(e){var t=e.match(ga);return t?t.map(ma).join(" "):e}}),ba=kt(kt({},bn),{},{color:ci,backgroundColor:ci,outlineColor:ci,fill:ci,stroke:ci,borderColor:ci,borderTopColor:ci,borderRightColor:ci,borderBottomColor:ci,borderLeftColor:ci,filter:ya,WebkitFilter:ya}),xa=function(e){return ba[e]};function ka(e,t){var n,r=xa(e);return r!==ya&&(r=gi),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}var _a=!1;function wa(e,t){var n=performance.now(),r=function r(i){var a=i.timestamp-n;a>=t&&(Be.read(r),e(a-t))};return qe.read(r,!0),function(){return Be.read(r)}}var Sa=["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"],ja=["ease","times","yoyo","flip","loop"];function Ca(e){var t=e.ease,n=e.times,r=e.yoyo,i=e.flip,a=e.loop,o=Nn(e,ja),s=kt({},o);return n&&(s.offset=n),o.duration&&(s.duration=Zi(o.duration)),o.repeatDelay&&(s.repeatDelay=Zi(o.repeatDelay)),t&&(s.ease=function(e){return Array.isArray(e)&&"number"!==typeof e[0]}(t)?t.map(la):la(t)),"tween"===o.type&&(s.type="keyframes"),(r||a||i)&&(!0,r?s.repeatType="reverse":a?s.repeatType="loop":i&&(s.repeatType="mirror"),s.repeat=a||r||i||o.repeat),"spring"!==o.type&&(s.type="keyframes"),s}function Pa(e,t){var n,r;return null!==(r=null!==(n=(Oa(e,t)||{}).delay)&&void 0!==n?n:e.delay)&&void 0!==r?r:0}function Ea(e,t,n){return Array.isArray(t.to)&&void 0===e.duration&&(e.duration=.8),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=Ne(e.to),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=Nn(e,Sa);return!!Object.keys(t).length}(e)||(e=kt(kt({},e),function(e,t){return kt({to:t},(Yn(t)?fa:pa[e]||pa.default)(t))}(n,t.to))),kt(kt({},t),Ca(e))}function Ma(e,t,n,r,i){var a=Oa(r,e)||{},o=void 0!==a.from?a.from:t.get(),s=ua(e,n);"none"===o&&s&&"string"===typeof n?o=ka(e,n):Na(o)&&"string"===typeof n?o=Ta(n):!Array.isArray(n)&&Na(n)&&"string"===typeof o&&(n=Ta(o));var l=ua(e,o);return"You are trying to animate ".concat(e,' from "').concat(o,'" to "').concat(n,'". ').concat(o," is not an animatable value - to enable this animation set ").concat(o," to a value animatable to ").concat(n," via the `style` property."),l&&s&&!1!==a.type?function(){var r={from:o,to:n,velocity:t.getVelocity(),onComplete:i,onUpdate:function(e){return t.set(e)}};return"inertia"===a.type||"decay"===a.type?function(e){var t,n=e.from,r=void 0===n?0:n,i=e.velocity,a=void 0===i?0:i,o=e.min,s=e.max,l=e.power,u=void 0===l?.8:l,c=e.timeConstant,d=void 0===c?750:c,h=e.bounceStiffness,f=void 0===h?500:h,p=e.bounceDamping,v=void 0===p?10:p,m=e.restDelta,g=void 0===m?1:m,y=e.modifyTarget,b=e.driver,x=e.onUpdate,k=e.onComplete,_=e.onStop;function w(e){return void 0!==o&&es}function S(e){return void 0===o?s:void 0===s||Math.abs(o-e)N||-1===T&&e3&&void 0!==arguments[3]?arguments[3]:{};return _a&&(r={type:!1}),t.start((function(i){var a,o,s=Ma(e,t,n,r,i),l=Pa(r,e),u=function(){return a=s()};return l?o=wa(u,Zi(l)):u(),function(){o&&o(),a&&a.stop()}}))}var Da=function(e){return/^0[^.\s]+$/.test(e)};function La(e,t){-1===e.indexOf(t)&&e.push(t)}function Ra(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var Ia=function(){function e(){et(this,e),this.subscriptions=[]}return nt(e,[{key:"add",value:function(e){var t=this;return La(this.subscriptions,e),function(){return Ra(t.subscriptions,e)}}},{key:"notify",value:function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var i=0;i1&&void 0!==arguments[1])||arguments[1];r.prev=r.current,r.current=e;var n=Ye(),i=n.delta,a=n.timestamp;r.lastUpdated!==a&&(r.timeDelta=i,r.lastUpdated=a,qe.postRender(r.scheduleVelocityCheck)),r.prev!==r.current&&r.updateSubscribers.notify(r.current),r.velocityUpdateSubscribers.getSize()&&r.velocityUpdateSubscribers.notify(r.getVelocity()),t&&r.renderSubscribers.notify(r.current)},this.scheduleVelocityCheck=function(){return qe.postRender(r.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==r.lastUpdated&&(r.prev=r.current,r.velocityUpdateSubscribers.notify(r.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n)))}return nt(e,[{key:"onChange",value:function(e){return this.updateSubscribers.add(e)}},{key:"clearListeners",value:function(){this.updateSubscribers.clear()}},{key:"onRenderRequest",value:function(e){return e(this.get()),this.renderSubscribers.add(e)}},{key:"attach",value:function(e){this.passiveEffect=e}},{key:"set",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}},{key:"get",value:function(){return this.current}},{key:"getPrevious",value:function(){return this.prev}},{key:"getVelocity",value:function(){return this.canTrackVelocity?Ji(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}},{key:"start",value:function(e){var t=this;return this.stop(),new Promise((function(n){t.hasAnimated=!0,t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))}},{key:"stop",value:function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}},{key:"isAnimating",value:function(){return!!this.stopAnimation}},{key:"clearAnimation",value:function(){this.stopAnimation=null}},{key:"destroy",value:function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()}}]),e}();function za(e){return new Fa(e)}var Va=function(e){return function(t){return t.test(e)}},Ba=[vn,dn,cn,un,fn,hn,{test:function(e){return"auto"===e},parse:function(e){return e}}],Wa=function(e){return Ba.find(Va(e))},Ua=[].concat(Ne(Ba),[ci,gi]),Ha=function(e){return Ua.find(Va(e))};function $a(e,t,n){var r=e.getProps();return $n(r,t,void 0!==n?n:r.custom,function(e){var t={};return e.values.forEach((function(e,n){return t[n]=e.get()})),t}(e),function(e){var t={};return e.values.forEach((function(e,n){return t[n]=e.getVelocity()})),t}(e))}var Ya=["transitionEnd","transition"];function qa(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,za(n))}function Xa(e,t){var n=$a(e,t),r=n?e.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,a=void 0===i?{}:i,o=(r.transition,Nn(r,Ya));for(var s in o=kt(kt({},o),a)){qa(e,s,qn(o[s]))}}function Ka(e,t){if(t)return(t[e]||t.default||t).from}function Ga(e){return Boolean(Gt(e)&&e.add)}var Qa=["transition","transitionEnd"];function Ja(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=$a(e,t,r.custom),a=i||{},o=a.transition,s=void 0===o?e.getDefaultTransition()||{}:o;r.transitionOverride&&(s=r.transitionOverride);var l=i?function(){return Za(e,i,r)}:function(){return Promise.resolve()},u=(null===(n=e.variantChildren)||void 0===n?void 0:n.size)?function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=s,a=i.delayChildren,o=void 0===a?0:a,l=i.staggerChildren,u=i.staggerDirection;return eo(e,t,o+n,l,u,r)}:function(){return Promise.resolve()},c=s,d=c.when;if(d){var h="beforeChildren"===d?[l,u]:[u,l],f=Me(h,2),p=f[0],v=f[1];return p().then(v)}return Promise.all([l(),u(r.delay)])}function Za(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.delay,a=void 0===i?0:i,o=r.transitionOverride,s=r.type,l=e.makeTargetAnimatable(t),u=l.transition,c=void 0===u?e.getDefaultTransition():u,d=l.transitionEnd,h=Nn(l,Qa),f=e.getValue("willChange");o&&(c=o);var p=[],v=s&&(null===(n=e.animationState)||void 0===n?void 0:n.getState()[s]),m=function(t){var n=e.getValue(t),r=h[t];if(!n||void 0===r||v&&no(v,t))return"continue";var i=kt({delay:a},c);e.shouldReduceMotion&&Xt.has(t)&&(i=kt(kt({},i),{},{type:!1,delay:0}));var o=Aa(t,n,r,i);Ga(f)&&(f.add(t),o=o.then((function(){return f.remove(t)}))),p.push(o)};for(var g in h)m(g);return Promise.all(p).then((function(){d&&Xa(e,d)}))}function eo(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5?arguments[5]:void 0,o=[],s=(e.variantChildren.size-1)*r,l=1===i?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e*r}:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return s-e*r};return Array.from(e.variantChildren).sort(to).forEach((function(e,r){o.push(Ja(e,t,kt(kt({},a),{},{delay:n+l(r)})).then((function(){return e.notify("AnimationComplete",t)})))})),Promise.all(o)}function to(e,t){return e.sortNodePosition(t)}function no(e,t){var n=e.protectedKeys,r=e.needsAnimating,i=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,i}var ro=["transition","transitionEnd"],io=[Jn.Animate,Jn.InView,Jn.Focus,Jn.Hover,Jn.Tap,Jn.Drag,Jn.Exit],ao=[].concat(io).reverse(),oo=io.length;function so(e){return function(t){return Promise.all(t.map((function(t){var n=t.animation,r=t.options;return function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.notify("AnimationStart",t),Array.isArray(t)){var i=t.map((function(t){return Ja(e,t,r)}));n=Promise.all(i)}else if("string"===typeof t)n=Ja(e,t,r);else{var a="function"===typeof t?$a(e,t,r.custom):t;n=Za(e,a,r)}return n.then((function(){return e.notify("AnimationComplete",t)}))}(e,n,r)})))}}function lo(e){var t=so(e),n=function(){var e;return bt(e={},Jn.Animate,uo(!0)),bt(e,Jn.InView,uo()),bt(e,Jn.Hover,uo()),bt(e,Jn.Tap,uo()),bt(e,Jn.Drag,uo()),bt(e,Jn.Focus,uo()),bt(e,Jn.Exit,uo()),e}(),r=!0,i=function(t,n){var r=$a(e,n);if(r){r.transition;var i=r.transitionEnd,a=Nn(r,ro);t=kt(kt(kt({},t),a),i)}return t};function a(a,o){for(var s,l=e.getProps(),u=e.getVariantContext(!0)||{},c=[],d=new Set,h={},f=1/0,p=function(t){var p=ao[t],v=n[p],m=null!==(s=l[p])&&void 0!==s?s:u[p],g=Pt(m),y=p===o?v.isActive:null;!1===y&&(f=t);var b=m===u[p]&&m!==l[p]&&g;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),v.protectedKeys=kt({},h),!v.isActive&&null===y||!m&&!v.prevProp||Et(m)||"boolean"===typeof m)return"continue";var x=function(e,t){if("string"===typeof t)return t!==e;if(Array.isArray(t))return!Ir(t,e);return!1}(v.prevProp,m),k=x||p===o&&v.isActive&&!b&&g||t>f&&g,_=Array.isArray(m)?m:[m],w=_.reduce(i,{});!1===y&&(w={});var S=v.prevResolvedValues,j=void 0===S?{}:S,C=kt(kt({},j),w),P=function(e){k=!0,d.delete(e),v.needsAnimating[e]=!0};for(var E in C){var M=w[E],N=j[E];h.hasOwnProperty(E)||(M!==N?Yn(M)&&Yn(N)?!Ir(M,N)||x?P(E):v.protectedKeys[E]=!0:void 0!==M?P(E):d.add(E):void 0!==M&&d.has(E)?P(E):v.protectedKeys[E]=!0)}v.prevProp=m,v.prevResolvedValues=w,v.isActive&&(h=kt(kt({},h),w)),r&&e.blockInitialAnimation&&(k=!1),k&&!b&&c.push.apply(c,Ne(_.map((function(e){return{animation:e,options:kt({type:p},a)}}))))},v=0;v0&&void 0!==arguments[0]&&arguments[0];return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var co={animation:Dr((function(t){var n=t.visualElement,r=t.animate;n.animationState||(n.animationState=lo(n)),Et(r)&&(0,e.useEffect)((function(){return r.subscribe(n)}),[r])})),exit:Dr((function(t){var n=t.custom,r=t.visualElement,i=Me(Rr(),2),a=i[0],o=i[1],s=(0,e.useContext)(Je);(0,e.useEffect)((function(){r.isPresent=a;var e=r.animationState&&r.animationState.setActive(Jn.Exit,!a,{custom:s&&s.custom||n});e&&!a&&e.then(o)}),[a])}))},ho=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},fo=function(e){return ho(e)&&e.hasOwnProperty("z")},po=function(e,t){return Math.abs(e-t)};function vo(e,t){if(yi(e)&&yi(t))return po(e,t);if(ho(e)&&ho(t)){var n=po(e.x,t.x),r=po(e.y,t.y),i=fo(e)&&fo(t)?po(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}var mo=function(){function e(t,n){var r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.transformPagePoint;if(et(this,e),this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=bo(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=vo(e.offset,{x:0,y:0})>=3;if(t||n){var i=e.point,a=Ye().timestamp;r.history.push(kt(kt({},i),{},{timestamp:a}));var o=r.handlers,s=o.onStart,l=o.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=go(t,r.transformPagePoint),rr(e)&&0===e.buttons?r.handlePointerUp(e,t):qe.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,i=n.onEnd,a=n.onSessionEnd,o=bo(go(t,r.transformPagePoint),r.history);r.startEvent&&i&&i(e,o),a&&a(e,o)},!(ir(t)&&t.touches.length>1)){this.handlers=n,this.transformPagePoint=a;var o=ur(t),s=go(o,this.transformPagePoint),l=s.point,u=Ye(),c=u.timestamp;this.history=[kt(kt({},l),{},{timestamp:c})];var d=n.onSessionStart;d&&d(t,bo(s,this.history)),this.removeListeners=Sr(pr(window,"pointermove",this.handlePointerMove),pr(window,"pointerup",this.handlePointerUp),pr(window,"pointercancel",this.handlePointerUp))}}return nt(e,[{key:"updateHandlers",value:function(e){this.handlers=e}},{key:"end",value:function(){this.removeListeners&&this.removeListeners(),Be.update(this.updatePoint)}}]),e}();function go(e,t){return t?{point:t(e.point)}:e}function yo(e,t){return{x:e.x-t.x,y:e.y-t.y}}function bo(e,t){var n=e.point;return{point:n,delta:yo(n,ko(t)),offset:yo(n,xo(t)),velocity:_o(t,.1)}}function xo(e){return e[0]}function ko(e){return e[e.length-1]}function _o(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,i=ko(e);n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Zi(t)));)n--;if(!r)return{x:0,y:0};var a=(i.timestamp-r.timestamp)/1e3;if(0===a)return{x:0,y:0};var o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function wo(e){return e.max-e.min}function So(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.01;return vo(e,t)3&&void 0!==arguments[3]?arguments[3]:.5;e.origin=r,e.originPoint=Kr(t.min,t.max,e.origin),e.scale=wo(n)/wo(t),(So(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Kr(n.min,n.max,e.origin)-e.originPoint,(So(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Co(e,t,n,r){jo(e.x,t.x,n.x,null===r||void 0===r?void 0:r.originX),jo(e.y,t.y,n.y,null===r||void 0===r?void 0:r.originY)}function Po(e,t,n){e.min=n.min+t.min,e.max=e.min+wo(t)}function Eo(e,t,n){e.min=t.min-n.min,e.max=e.min+wo(t)}function Mo(e,t,n){Eo(e.x,t.x,n.x),Eo(e.y,t.y,n.y)}function No(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function To(e,t){var n=t.min-e.min,r=t.max-e.max;if(t.max-t.min1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;e.min=Uo(e.min,t,n,r,i),e.max=Uo(e.max,t,n,r,i)}function $o(e,t){var n=t.x,r=t.y;Ho(e.x,n.translate,n.scale,n.originPoint),Ho(e.y,r.translate,r.scale,r.originPoint)}function Yo(e,t){e.min=e.min+t,e.max=e.max+t}function qo(e,t,n){var r=Me(n,3),i=r[0],a=r[1],o=r[2],s=void 0!==t[o]?t[o]:.5,l=Kr(e.min,e.max,s);Ho(e,t[i],t[a],l,t.scale)}var Xo=["x","scaleX","originX"],Ko=["y","scaleY","originY"];function Go(e,t){qo(e.x,t,Xo),qo(e.y,t,Ko)}function Qo(e,t){return Ro(function(e,t){if(!t)return e;var n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}var Jo=new WeakMap,Zo=function(){function e(t){et(this,e),this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}return nt(e,[{key:"start",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.snapToCursor,i=void 0!==r&&r;if(!1!==this.visualElement.isPresent){var a=function(e){t.stopAnimation(),i&&t.snapToCursor(ur(e,"page").point)},o=function(e,n){var r,i=t.getProps(),a=i.drag,o=i.dragPropagation,s=i.onDragStart;(!a||o||(t.openGlobalLock&&t.openGlobalLock(),t.openGlobalLock=br(a),t.openGlobalLock))&&(t.isDragging=!0,t.currentDirection=null,t.resolveConstraints(),t.visualElement.projection&&(t.visualElement.projection.isAnimationBlocked=!0,t.visualElement.projection.target=void 0),Lo((function(e){var n,r,i=t.getAxisMotionValue(e).get()||0;if(cn.test(i)){var a=null===(r=null===(n=t.visualElement.projection)||void 0===n?void 0:n.layout)||void 0===r?void 0:r.layoutBox[e];if(a)i=wo(a)*(parseFloat(i)/100)}t.originPoint[e]=i})),null===s||void 0===s||s(e,n),null===(r=t.visualElement.animationState)||void 0===r||r.setActive(Jn.Drag,!0))},s=function(e,n){var r=t.getProps(),i=r.dragPropagation,a=r.dragDirectionLock,o=r.onDirectionLock,s=r.onDrag;if(i||t.openGlobalLock){var l=n.offset;if(a&&null===t.currentDirection)return t.currentDirection=ts(l),void(null!==t.currentDirection&&(null===o||void 0===o||o(t.currentDirection)));t.updateAxis("x",n.point,l),t.updateAxis("y",n.point,l),t.visualElement.render(),null===s||void 0===s||s(e,n)}},l=function(e,n){return t.stop(e,n)};this.panSession=new mo(e,{onSessionStart:a,onStart:o,onMove:s,onSessionEnd:l},{transformPagePoint:this.visualElement.getTransformPagePoint()})}}},{key:"stop",value:function(e,t){var n=this.isDragging;if(this.cancel(),n){var r=t.velocity;this.startAnimation(r);var i=this.getProps().onDragEnd;null===i||void 0===i||i(e,t)}}},{key:"cancel",value:function(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Jn.Drag,!1)}},{key:"updateAxis",value:function(e,t,n){var r=this.getProps().drag;if(n&&es(e,r,this.currentDirection)){var i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,t,n){var r=t.min,i=t.max;return void 0!==r&&ei&&(e=n?Kr(i,e,n.max):Math.min(e,i)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}}},{key:"resolveConstraints",value:function(){var e=this,t=this.getProps(),n=t.dragConstraints,r=t.dragElastic,i=(this.visualElement.projection||{}).layout,a=this.constraints;n&&Ct(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!i)&&function(e,t){var n=t.top,r=t.left,i=t.bottom,a=t.right;return{x:No(e.x,r,a),y:No(e.y,n,i)}}(i.layoutBox,n),this.elastic=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Oo;return!1===e?e=0:!0===e&&(e=Oo),{x:Ao(e,"left","right"),y:Ao(e,"top","bottom")}}(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Lo((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(i.layoutBox[t],e.constraints[t]))}))}},{key:"resolveRefConstraints",value:function(){var e=this.getProps(),t=e.dragConstraints,n=e.onMeasureDragConstraints;if(!t||!Ct(t))return!1;var r=t.current,i=this.visualElement.projection;if(!i||!i.layout)return!1;var a=function(e,t,n){var r=Qo(e,n),i=t.scroll;return i&&(Yo(r.x,i.offset.x),Yo(r.y,i.offset.y)),r}(r,i.root,this.visualElement.getTransformPagePoint()),o=function(e,t){return{x:To(e.x,t.x),y:To(e.y,t.y)}}(i.layout.layoutBox,a);if(n){var s=n(function(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(o));this.hasMutatedConstraints=!!s,s&&(o=Ro(s))}return o}},{key:"startAnimation",value:function(e){var t=this,n=this.getProps(),r=n.drag,i=n.dragMomentum,a=n.dragElastic,o=n.dragTransition,s=n.dragSnapToOrigin,l=n.onDragTransitionEnd,u=this.constraints||{},c=Lo((function(n){var l;if(es(n,r,t.currentDirection)){var c=null!==(l=null===u||void 0===u?void 0:u[n])&&void 0!==l?l:{};s&&(c={min:0,max:0});var d=a?200:1e6,h=a?40:1e7,f=kt(kt({type:"inertia",velocity:i?e[n]:0,bounceStiffness:d,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10},o),c);return t.startAxisValueAnimation(n,f)}}));return Promise.all(c).then(l)}},{key:"startAxisValueAnimation",value:function(e,t){return Aa(e,this.getAxisMotionValue(e),0,t)}},{key:"stopAnimation",value:function(){var e=this;Lo((function(t){return e.getAxisMotionValue(t).stop()}))}},{key:"getAxisMotionValue",value:function(e){var t,n,r="_drag"+e.toUpperCase(),i=this.visualElement.getProps()[r];return i||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)}},{key:"snapToCursor",value:function(e){var t=this;Lo((function(n){if(es(n,t.getProps().drag,t.currentDirection)){var r=t.visualElement.projection,i=t.getAxisMotionValue(n);if(r&&r.layout){var a=r.layout.layoutBox[n],o=a.min,s=a.max;i.set(e[n]-Kr(o,s,.5))}}}))}},{key:"scalePositionWithinConstraints",value:function(){var e,t=this;if(this.visualElement.current){var n=this.getProps(),r=n.drag,i=n.dragConstraints,a=this.visualElement.projection;if(Ct(i)&&a&&this.constraints){this.stopAnimation();var o={x:0,y:0};Lo((function(e){var n=t.getAxisMotionValue(e);if(n){var r=n.get();o[e]=function(e,t){var n=.5,r=wo(e),i=wo(t);return i>r?n=Xr(t.min,t.max-r,e.min):r>i&&(n=Xr(e.min,e.max-i,t.min)),zr(0,1,n)}({min:r,max:r},t.constraints[e])}}));var s=this.visualElement.getProps().transformTemplate;this.visualElement.current.style.transform=s?s({},""):"none",null===(e=a.root)||void 0===e||e.updateScroll(),a.updateLayout(),this.resolveConstraints(),Lo((function(e){if(es(e,r,null)){var n=t.getAxisMotionValue(e),i=t.constraints[e],a=i.min,s=i.max;n.set(Kr(a,s,o[e]))}}))}}}},{key:"addListeners",value:function(){var e,t=this;if(this.visualElement.current){Jo.set(this.visualElement,this);var n=pr(this.visualElement.current,"pointerdown",(function(e){var n=t.getProps(),r=n.drag,i=n.dragListener;r&&(void 0===i||i)&&t.start(e)})),r=function(){Ct(t.getProps().dragConstraints)&&(t.constraints=t.resolveRefConstraints())},i=this.visualElement.projection,a=i.addEventListener("measure",r);i&&!i.layout&&(null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout()),r();var o=tr(window,"resize",(function(){return t.scalePositionWithinConstraints()})),s=i.addEventListener("didUpdate",(function(e){var n=e.delta,r=e.hasLayoutChanged;t.isDragging&&r&&(Lo((function(e){var r=t.getAxisMotionValue(e);r&&(t.originPoint[e]+=n[e].translate,r.set(r.get()+n[e].translate))})),t.visualElement.render())}));return function(){o(),n(),a(),null===s||void 0===s||s()}}}},{key:"getProps",value:function(){var e=this.visualElement.getProps(),t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,i=void 0!==r&&r,a=e.dragPropagation,o=void 0!==a&&a,s=e.dragConstraints,l=void 0!==s&&s,u=e.dragElastic,c=void 0===u?Oo:u,d=e.dragMomentum,h=void 0===d||d;return kt(kt({},e),{},{drag:n,dragDirectionLock:i,dragPropagation:o,dragConstraints:l,dragElastic:c,dragMomentum:h})}}]),e}();function es(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}function ts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}var ns={pan:Dr((function(t){var n=t.onPan,r=t.onPanStart,i=t.onPanEnd,a=t.onPanSessionStart,o=t.visualElement,s=n||r||i||a,l=(0,e.useRef)(null),u=(0,e.useContext)(_t).transformPagePoint,c={onSessionStart:a,onStart:r,onMove:n,onEnd:function(e,t){l.current=null,i&&i(e,t)}};(0,e.useEffect)((function(){null!==l.current&&l.current.updateHandlers(c)})),vr(o,"pointerdown",s&&function(e){l.current=new mo(e,c,{transformPagePoint:u})}),pt((function(){return l.current&&l.current.end()}))})),drag:Dr((function(t){var n=t.dragControls,r=t.visualElement,i=Ze((function(){return new Zo(r)}));(0,e.useEffect)((function(){return n&&n.subscribe(i)}),[i,n]),(0,e.useEffect)((function(){return i.addListeners()}),[i])}))};function rs(e){return"string"===typeof e&&e.startsWith("var(--")}var is=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function as(e){var t=is.exec(e);if(!t)return[,];var n=Me(t,3);return[n[1],n[2]]}function os(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.');var r=as(e),i=Me(r,2),a=i[0],o=i[1];if(a){var s=window.getComputedStyle(t).getPropertyValue(a);return s?s.trim():rs(o)?os(o,t,n+1):o}}function ss(e,t,n){var r=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(t),t)),i=e.current;if(!(i instanceof Element))return{target:r,transitionEnd:n};for(var a in n&&(n=kt({},n)),e.values.forEach((function(e){var t=e.get();if(rs(t)){var n=os(t,i);n&&e.set(n)}})),r){var o=r[a];if(rs(o)){var s=os(o,i);s&&(r[a]=s,n&&void 0===n[a]&&(n[a]=o))}}return{target:r,transitionEnd:n}}var ls,us=new Set(["width","height","top","left","right","bottom","x","y"]),cs=function(e){return us.has(e)},ds=function(e,t){e.set(t,!1),e.set(t)},hs=function(e){return e===vn||e===dn};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(ls||(ls={}));var fs=function(e,t){return parseFloat(e.split(", ")[t])},ps=function(e,t){return function(n,r){var i=r.transform;if("none"===i||!i)return 0;var a=i.match(/^matrix3d\((.+)\)$/);if(a)return fs(a[1],t);var o=i.match(/^matrix\((.+)\)$/);return o?fs(o[1],e):0}},vs=new Set(["x","y","z"]),ms=qt.filter((function(e){return!vs.has(e)}));function gs(e){var t=[];return ms.forEach((function(n){var r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}var ys={width:function(e,t){var n=e.x,r=t.paddingLeft,i=void 0===r?"0":r,a=t.paddingRight,o=void 0===a?"0":a;return n.max-n.min-parseFloat(i)-parseFloat(o)},height:function(e,t){var n=e.y,r=t.paddingTop,i=void 0===r?"0":r,a=t.paddingBottom,o=void 0===a?"0":a;return n.max-n.min-parseFloat(i)-parseFloat(o)},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:ps(4,13),y:ps(5,14)},bs=function(e,t,n){var r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),o=a.display,s={};"none"===o&&t.setStaticValue("display",e.display||"block"),n.forEach((function(e){s[e]=ys[e](r,a)})),t.render();var l=t.measureViewportBox();return n.forEach((function(n){var r=t.getValue(n);ds(r,s[n]),e[n]=ys[n](l,a)})),e};function xs(e,t,n,r){return function(e){return Object.keys(e).some(cs)}(t)?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};t=kt({},t),r=kt({},r);var i=Object.keys(t).filter(cs),a=[],o=!1,s=[];if(i.forEach((function(i){var l=e.getValue(i);if(e.hasValue(i)){var u,c=n[i],d=Wa(c),h=t[i];if(Yn(h)){var f=h.length,p=null===h[0]?1:0;c=h[p],d=Wa(c);for(var v=p;v=0?window.pageYOffset:null,u=bs(t,e,s);return a.length&&a.forEach((function(t){var n=Me(t,2),r=n[0],i=n[1];e.getValue(r).set(i)})),e.render(),Xe&&null!==l&&window.scrollTo({top:l}),{target:u,transitionEnd:r}}return{target:t,transitionEnd:r}}(e,t,n,r):{target:t,transitionEnd:r}}var ks={current:null},_s={current:!1};var ws=["willChange"],Ss=Object.keys(Lt),js=Ss.length,Cs=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ps=function(){function t(e){var n=this,r=e.parent,i=e.props,a=e.reducedMotionConfig,o=e.visualState,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};et(this,t),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=function(){return n.notify("Update",n.latestValues)},this.render=function(){n.current&&(n.triggerBuild(),n.renderInstance(n.current,n.renderState,n.props.style,n.projection))},this.scheduleRender=function(){return qe.render(n.render,!1,!0)};var l=o.latestValues,u=o.renderState;this.latestValues=l,this.baseTarget=kt({},l),this.initialValues=i.initial?kt({},l):{},this.renderState=u,this.parent=r,this.props=i,this.depth=r?r.depth+1:0,this.reducedMotionConfig=a,this.options=s,this.isControllingVariants=Nt(i),this.isVariantNode=Tt(i),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(r&&r.current);var c=this.scrapeMotionValuesFromProps(i),d=c.willChange,h=Nn(c,ws);for(var f in h){var p=h[f];void 0!==l[f]&&Gt(p)&&(p.set(l[f],!1),Ga(d)&&d.add(f))}}return nt(t,[{key:"scrapeMotionValuesFromProps",value:function(e){return{}}},{key:"mount",value:function(e){var t,n=this;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(t=this.parent)||void 0===t?void 0:t.addVariantChild(this)),this.values.forEach((function(e,t){return n.bindToMotionValue(t,e)})),_s.current||function(){if(_s.current=!0,Xe)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return ks.current=e.matches};e.addListener(t),t()}else ks.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ks.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}},{key:"unmount",value:function(){var e,t,n;for(var r in null===(e=this.projection)||void 0===e||e.unmount(),Be.update(this.notifyUpdate),Be.render(this.render),this.valueSubscriptions.forEach((function(e){return e()})),null===(t=this.removeFromVariantTree)||void 0===t||t.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this),this.events)this.events[r].clear();this.current=null}},{key:"bindToMotionValue",value:function(e,t){var n=this,r=Xt.has(e),i=t.onChange((function(t){n.latestValues[e]=t,n.props.onUpdate&&qe.update(n.notifyUpdate,!1,!0),r&&n.projection&&(n.projection.isProjectionDirty=!0)})),a=t.onRenderRequest(this.scheduleRender);this.valueSubscriptions.set(e,(function(){i(),a()}))}},{key:"sortNodePosition",value:function(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}},{key:"loadFeatures",value:function(t,n,r,i,a,o){var s=this,l=[];for(var u=0;u1&&void 0!==arguments[1])||arguments[1];return this.makeTargetAnimatableFromInstance(e,this.props,t)}},{key:"setProps",value:function(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=e;for(var t=0;t0&&void 0!==arguments[0]&&arguments[0];if(n)return null===(e=this.parent)||void 0===e?void 0:e.getVariantContext();if(!this.isControllingVariants){var r=(null===(t=this.parent)||void 0===t?void 0:t.getVariantContext())||{};return void 0!==this.props.initial&&(r.initial=this.props.initial),r}for(var i={},a=0;a1?r-1:0),a=1;a5)return i;var l=gi.createTransformer(e),u="number"!==typeof s[0]?1:0,c=r.x.scale*n.x,d=r.y.scale*n.y;s[0+u]/=c,s[1+u]/=d;var h=Kr(c,d,.5);"number"===typeof s[2+u]&&(s[2+u]/=h),"number"===typeof s[3+u]&&(s[3+u]/=h);var f=l(s);if(a){var p=0;f=f.replace(Is,(function(){var e=o[p];return p++,e}))}return f}},zs=function(e){rt(n,e);var t=lt(n);function n(){return et(this,n),t.apply(this,arguments)}return nt(n,[{key:"componentDidMount",value:function(){var e,t=this,n=this.props,r=n.visualElement,i=n.layoutGroup,a=n.switchLayoutGroup,o=n.layoutId,s=r.projection;e=Vs,Object.assign(Yt,e),s&&(i.group&&i.group.add(s),a&&a.register&&o&&a.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){t.safeToRemove()})),s.setOptions(kt(kt({},s.options),{},{onExitComplete:function(){return t.safeToRemove()}}))),Rt.hasEverUpdated=!0}},{key:"getSnapshotBeforeUpdate",value:function(e){var t=this,n=this.props,r=n.layoutDependency,i=n.visualElement,a=n.drag,o=n.isPresent,s=i.projection;return s?(s.isPresent=o,a||e.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||qe.postRender((function(){var e;(null===(e=s.getStack())||void 0===e?void 0:e.members.length)||t.safeToRemove()}))),null):null}},{key:"componentDidUpdate",value:function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.visualElement,n=e.layoutGroup,r=e.switchLayoutGroup,i=t.projection;i&&(i.scheduleCheckAfterUnmount(),(null===n||void 0===n?void 0:n.group)&&n.group.remove(i),(null===r||void 0===r?void 0:r.deregister)&&r.deregister(i))}},{key:"safeToRemove",value:function(){var e=this.props.safeToRemove;null===e||void 0===e||e()}},{key:"render",value:function(){return null}}]),n}(e.Component);var Vs={borderRadius:kt(kt({},Rs),{},{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Rs,borderTopRightRadius:Rs,borderBottomLeftRadius:Rs,borderBottomRightRadius:Rs,boxShadow:Fs},Bs={measureLayout:function(t){var n=Me(Rr(),2),r=n[0],i=n[1],a=(0,e.useContext)(ft);return e.createElement(zs,kt(kt({},t),{},{layoutGroup:a,switchLayoutGroup:(0,e.useContext)(zt),isPresent:r,safeToRemove:i}))}};function Ws(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Gt(e)?e:za(e);return Aa("",r,t,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var Us=["TopLeft","TopRight","BottomLeft","BottomRight"],Hs=Us.length,$s=function(e){return"string"===typeof e?parseFloat(e):e},Ys=function(e){return"number"===typeof e||dn.test(e)};function qs(e,t,n,r,i,a){var o,s,l,u;i?(e.opacity=Kr(0,null!==(o=n.opacity)&&void 0!==o?o:1,Ks(r)),e.opacityExit=Kr(null!==(s=t.opacity)&&void 0!==s?s:1,0,Gs(r))):a&&(e.opacity=Kr(null!==(l=t.opacity)&&void 0!==l?l:1,null!==(u=n.opacity)&&void 0!==u?u:1,r));for(var c=0;ct?1:n(Xr(e,t,r))}}function Js(e,t){e.min=t.min,e.max=t.max}function Zs(e,t){Js(e.x,t.x),Js(e.y,t.y)}function el(e,t,n,r,i){return e=Wo(e-=t,1/n,r),void 0!==i&&(e=Wo(e,1/i,r)),e}function tl(e,t,n,r,i){var a=Me(n,3),o=a[0],s=a[1],l=a[2];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:e;if(cn.test(t)){t=parseFloat(t),t=Kr(o.min,o.max,t/100)-o.min}if("number"===typeof t){var s=Kr(a.min,a.max,r);e===a&&(s-=t),e.min=el(e.min,t,n,s,i),e.max=el(e.max,t,n,s,i)}}(e,t[o],t[s],t[l],t.scale,r,i)}var nl=["x","scaleX","originX"],rl=["y","scaleY","originY"];function il(e,t,n,r){tl(e.x,t,nl,null===n||void 0===n?void 0:n.x,null===r||void 0===r?void 0:r.x),tl(e.y,t,rl,null===n||void 0===n?void 0:n.y,null===r||void 0===r?void 0:r.y)}function al(e){return 0===e.translate&&1===e.scale}function ol(e){return al(e.x)&&al(e.y)}function sl(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function ll(e){return wo(e.x)/wo(e.y)}var ul=function(){function e(){et(this,e),this.members=[]}return nt(e,[{key:"add",value:function(e){La(this.members,e),e.scheduleRender()}},{key:"remove",value:function(e){if(Ra(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}}},{key:"relegate",value:function(e){var t,n=this.members.findIndex((function(t){return e===t}));if(0===n)return!1;for(var r=n;r>=0;r--){var i=this.members[r];if(!1!==i.isPresent){t=i;break}}return!!t&&(this.promote(t),!0)}},{key:"promote",value:function(e,t){var n,r=this.lead;e!==r&&(this.prevLead=r,this.lead=e,e.show(),r&&(r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&r.hide()))}},{key:"exitAnimationComplete",value:function(){this.members.forEach((function(e){var t,n,r,i,a;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(a=null===(r=e.resumingFrom)||void 0===r?void 0:(i=r.options).onExitComplete)||void 0===a||a.call(i)}))}},{key:"scheduleRender",value:function(){this.members.forEach((function(e){e.instance&&e.scheduleRender(!1)}))}},{key:"removeLeadSnapshot",value:function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}]),e}();function cl(e,t,n){var r="",i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r="translate3d(".concat(i,"px, ").concat(a,"px, 0) ")),1===t.x&&1===t.y||(r+="scale(".concat(1/t.x,", ").concat(1/t.y,") ")),n){var o=n.rotate,s=n.rotateX,l=n.rotateY;o&&(r+="rotate(".concat(o,"deg) ")),s&&(r+="rotateX(".concat(s,"deg) ")),l&&(r+="rotateY(".concat(l,"deg) "))}var u=e.x.scale*t.x,c=e.y.scale*t.y;return 1===u&&1===c||(r+="scale(".concat(u,", ").concat(c,")")),r||"none"}var dl=function(e,t){return e.depth-t.depth},hl=function(){function e(){et(this,e),this.children=[],this.isDirty=!1}return nt(e,[{key:"add",value:function(e){La(this.children,e),this.isDirty=!0}},{key:"remove",value:function(e){Ra(this.children,e),this.isDirty=!0}},{key:"forEach",value:function(e){this.isDirty&&this.children.sort(dl),this.isDirty=!1,this.children.forEach(e)}}]),e}(),fl=["","X","Y","Z"],pl=0;function vl(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,i=e.checkIsScrollRoot,a=e.resetTransform;return function(){function e(t){var r=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null===n||void 0===n?void 0:n();et(this,e),this.id=pl++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){r.isUpdating&&(r.isUpdating=!1,r.clearAllSnapshots())},this.updateProjection=function(){r.nodes.forEach(_l),r.nodes.forEach(wl)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=t,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[].concat(Ne(a.path),[a]):[],this.parent=a,this.depth=a?a.depth+1:0,t&&this.root.registerPotentialNode(t,this);for(var o=0;o1?n-1:0),i=1;i1&&void 0!==arguments[1]&&arguments[1];if(!this.instance){this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;var a=this.options,o=a.layoutId,s=a.layout,l=a.visualElement;if(l&&!l.current&&l.mount(e),this.root.nodes.add(this),null===(n=this.parent)||void 0===n||n.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),i&&(s||o)&&(this.isLayoutDirty=!0),t){var u,c=function(){return r.root.updateBlockedByResize=!1};t(e,(function(){r.root.updateBlockedByResize=!0,u&&u(),u=wa(c,250),Rt.hasAnimatedSinceResize&&(Rt.hasAnimatedSinceResize=!1,r.nodes.forEach(kl))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&l&&(o||s)&&this.addEventListener("didUpdate",(function(e){var t,n,i,a,o,s=e.delta,u=e.hasLayoutChanged,c=e.hasRelativeTargetChanged,d=e.layout;if(r.isTreeAnimationBlocked())return r.target=void 0,void(r.relativeTarget=void 0);var h=null!==(n=null!==(t=r.options.transition)&&void 0!==t?t:l.getDefaultTransition())&&void 0!==n?n:Nl,f=l.getProps(),p=f.onLayoutAnimationStart,v=f.onLayoutAnimationComplete,m=!r.targetLayout||!sl(r.targetLayout,d)||c,g=!u&&c;if((null===(i=r.resumeFrom)||void 0===i?void 0:i.instance)||g||u&&(m||!r.currentAnimation)){r.resumeFrom&&(r.resumingFrom=r.resumeFrom,r.resumingFrom.resumingFrom=void 0),r.setAnimationOrigin(s,g);var y=kt(kt({},Oa(h,"layout")),{},{onPlay:p,onComplete:v});l.shouldReduceMotion&&(y.delay=0,y.type=!1),r.startAnimation(y)}else u||0!==r.animationProgress||kl(r),r.isLead()&&(null===(o=(a=r.options).onExitComplete)||void 0===o||o.call(a));r.targetLayout=d}))}}},{key:"unmount",value:function(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,Be.preRender(this.updateProjection)}},{key:"blockUpdate",value:function(){this.updateManuallyBlocked=!0}},{key:"unblockUpdate",value:function(){this.updateManuallyBlocked=!1}},{key:"isUpdateBlocked",value:function(){return this.updateManuallyBlocked||this.updateBlockedByResize}},{key:"isTreeAnimationBlocked",value:function(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1}},{key:"startUpdate",value:function(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(Sl),this.animationId++)}},{key:"willUpdate",value:function(){var e,t,n,r=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.root.isUpdateBlocked())null===(t=(e=this.options).onExitComplete)||void 0===t||t.call(e);else if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:"measure",t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:i(this.instance),offset:r(this.instance)})}},{key:"resetTransform",value:function(){var e;if(a){var t=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!ol(this.projectionDelta),r=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate,i=null===r||void 0===r?void 0:r(this.latestValues,""),o=i!==this.prevTransformTemplateValue;t&&(n||zo(this.latestValues)||o)&&(a(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}}},{key:"measure",value:function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=this.measurePageBox(),r=this.removeElementScroll(n);t&&(r=this.removeTransform(r)),Al(r);var i=null===(e=this.options.visualElement)||void 0===e?void 0:e.readValue("position"),a="fixed"===i||"sticky"===i?i:"static";return{animationId:this.root.animationId,measuredBox:n,layoutBox:r,latestValues:{},source:this.id,position:a}}},{key:"measurePageBox",value:function(){var e=this.options.visualElement;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};var t=e.measureViewportBox(),n=this.root.scroll;return n&&(Yo(t.x,n.offset.x),Yo(t.y,n.offset.y)),t}},{key:"removeElementScroll",value:function(e){var t={x:{min:0,max:0},y:{min:0,max:0}};Zs(t,e);for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n={x:{min:0,max:0},y:{min:0,max:0}};Zs(n,e);for(var r=0;r3&&void 0!==arguments[3]&&arguments[3],o=n.length;if(o){var s,l;t.x=t.y=1;for(var u=0;u0&&void 0!==arguments[0])||arguments[0];null===(t=(e=this.options).scheduleRender)||void 0===t||t.call(e),r&&(null===(n=this.getStack())||void 0===n||n.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}},{key:"setAnimationOrigin",value:function(e){var t,n,r=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=this.snapshot,o=(null===a||void 0===a?void 0:a.latestValues)||{},s=kt({},this.latestValues),l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!i;var u={x:{min:0,max:0},y:{min:0,max:0}},c=(null===a||void 0===a?void 0:a.source)!==(null===(t=this.layout)||void 0===t?void 0:t.source),d=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0)<=1,h=Boolean(c&&!d&&!0===this.options.crossfade&&!this.path.some(Ml));this.animationProgress=0,this.mixTargetDelta=function(t){var n,i=t/1e3;Cl(l.x,e.x,i),Cl(l.y,e.y,i),r.setTargetDelta(l),r.relativeTarget&&r.relativeTargetOrigin&&r.layout&&(null===(n=r.relativeParent)||void 0===n?void 0:n.layout)&&(Mo(u,r.layout.layoutBox,r.relativeParent.layout.layoutBox),El(r.relativeTarget,r.relativeTargetOrigin,u,i)),c&&(r.animationValues=s,qs(s,o,r.latestValues,i,h,d)),r.root.scheduleUpdateProjection(),r.scheduleRender(),r.animationProgress=i},this.mixTargetDelta(0)}},{key:"startAnimation",value:function(e){var t,n,r=this;this.notifyListeners("animationStart"),null===(t=this.currentAnimation)||void 0===t||t.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(Be.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=qe.update((function(){Rt.hasAnimatedSinceResize=!0,r.currentAnimation=Ws(0,1e3,kt(kt({},e),{},{onUpdate:function(t){var n;r.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:function(){var t;null===(t=e.onComplete)||void 0===t||t.call(e),r.completeAnimation()}})),r.resumingFrom&&(r.resumingFrom.currentAnimation=r.currentAnimation),r.pendingAnimation=void 0}))}},{key:"completeAnimation",value:function(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}},{key:"finishAnimation",value:function(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}},{key:"applyTransformsToTarget",value:function(){var e=this.getLead(),t=e.targetWithTransforms,n=e.target,r=e.layout,i=e.latestValues;if(t&&n&&r){if(this!==e&&this.layout&&r&&Dl(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};var a=wo(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+a;var o=wo(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+o}Zs(t,n),Go(t,i),Co(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}},{key:"registerSharedNode",value:function(e,t){var n,r,i;this.sharedNodes.has(e)||this.sharedNodes.set(e,new ul),this.sharedNodes.get(e).add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(i=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(r,t)})}},{key:"isLead",value:function(){var e=this.getStack();return!e||e.lead===this}},{key:"getLead",value:function(){var e;return this.options.layoutId&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}},{key:"getPrevLead",value:function(){var e;return this.options.layoutId?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}},{key:"getStack",value:function(){var e=this.options.layoutId;if(e)return this.root.sharedNodes.get(e)}},{key:"promote",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.needsReset,n=e.transition,r=e.preserveFollowOpacity,i=this.getStack();i&&i.promote(this,r),t&&(this.projectionDelta=void 0,this.needsReset=!0),n&&this.setOptions({transition:n})}},{key:"relegate",value:function(){var e=this.getStack();return!!e&&e.relegate(this)}},{key:"resetRotation",value:function(){var e=this.options.visualElement;if(e){var t=!1,n=e.latestValues;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),t){for(var r={},i=0;i0&&void 0!==arguments[0]?arguments[0]:{},i={};if(!this.instance||this.isSVG)return i;if(!this.isVisible)return{visibility:"hidden"};i.visibility="";var a=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=Xn(r.pointerEvents)||"",i.transform=a?a(this.latestValues,""):"none",i;var o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){var s={};return this.options.layoutId&&(s.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,s.pointerEvents=Xn(r.pointerEvents)||""),this.hasProjected&&!zo(this.latestValues)&&(s.transform=a?a({},""):"none",this.hasProjected=!1),s}var l=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=cl(this.projectionDeltaWithTransform,this.treeScale,l),a&&(i.transform=a(l,i.transform));var u=this.projectionDelta,c=u.x,d=u.y;for(var h in i.transformOrigin="".concat(100*c.origin,"% ").concat(100*d.origin,"% 0"),o.animationValues?i.opacity=o===this?null!==(n=null!==(t=l.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:i.opacity=o===this?void 0!==l.opacity?l.opacity:"":void 0!==l.opacityExit?l.opacityExit:0,Yt)if(void 0!==l[h]){var f=Yt[h],p=f.correct,v=f.applyTo,m=p(l[h],o);if(v)for(var g=v.length,y=0;y=0;r--)if(Boolean(e.path[r].instance)){n=e.path[r];break}var i=(n&&n!==e.root?n.instance:document).querySelector('[data-projection-id="'.concat(t,'"]'));i&&e.mount(i,!0)}function Ol(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Al(e){Ol(e.x),Ol(e.y)}function Dl(e,t,n){return"position"===e||"preserve-aspect"===e&&!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1;return vo(e,t)<=n}(ll(t),ll(n),.2)}var Ll=vl({attachResizeListener:function(e,t){return tr(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Rl={current:void 0},Il=vl({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!Rl.current){var e=new Ll(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Rl.current=e}return Rl.current},resetTransform:function(e,t){e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:function(e){return Boolean("fixed"===window.getComputedStyle(e).position)}}),Fl=kt(kt(kt(kt({},co),Lr),ns),Bs),zl=Ut((function(e,t){return function(e,t,n,r,i){var a=t.forwardMotionProps,o=void 0!==a&&a;return kt(kt({},$t(e)?Zn:er),{},{preloadedFeatures:n,useRender:Fn(o),createVisualElement:r,projectionNodeConstructor:i,Component:e})}(e,t,Fl,Ds,Il)}));var Vl=function(){var t=Me((0,e.useState)(!1),2),n=t[0],r=t[1],i={hidden:{opacity:0},show:{opacity:1}},a=ie();return e.useEffect((function(){r(!1)}),[a]),(0,je.jsxs)("div",{className:"navigation",children:[(0,je.jsx)("input",{onChange:function(){return r(!n)},type:"checkbox",className:"navigation-checkbox",id:"nav-toggle",checked:n}),(0,je.jsx)("label",{htmlFor:"nav-toggle",className:"navigation-button",children:(0,je.jsx)("div",{className:"nav-icon",children:(0,je.jsx)("span",{className:"material-symbols-outlined",children:"menu"})})}),(0,je.jsx)("div",{className:"navigation-background"}),(0,je.jsx)("nav",{className:"container-nav",role:"navigation",children:(0,je.jsx)(yt,{children:n&&(0,je.jsxs)(zl.ul,{variants:{hidden:{opacity:0,y:100},show:{opacity:1,y:0,transition:{type:"tween"}}},className:"nav-motion navigation-list",initial:"hidden",animate:"show",exit:{opacity:0,y:-200},children:[(0,je.jsx)(zl.li,{variants:i,className:"navigation-item",children:(0,je.jsx)(Se,{smooth:!0,to:"/#",className:"navigation-link",children:"Home"})}),(0,je.jsx)(zl.li,{variants:i,className:"navigation-item",children:(0,je.jsx)(Se,{smooth:!0,to:"/report#education",className:"navigation-link",children:"Education"})}),(0,je.jsx)(zl.li,{variants:i,className:"navigation-item",children:(0,je.jsx)(Se,{smooth:!0,to:"/report#tech",className:"navigation-link",children:"Tech"})}),(0,je.jsx)(zl.li,{variants:i,className:"navigation-item",children:(0,je.jsx)(Se,{smooth:!0,to:"/report#stakeholders",className:"navigation-link",children:"Stakeholders"})}),(0,je.jsx)(zl.li,{variants:i,className:"navigation-item",children:(0,je.jsx)(Se,{smooth:!0,to:"/report#community",className:"navigation-link",children:"Community"})}),(0,je.jsx)(zl.li,{variants:i,className:"navigation-item",children:(0,je.jsx)(Se,{smooth:!0,to:"/support#",className:"navigation-link",children:"Support"})}),(0,je.jsx)(zl.li,{variants:i,className:"navigation-item",children:(0,je.jsx)(Se,{smooth:!0,to:"/testimonials#",className:"navigation-link",children:"Testimonials"})})]})})})]})},Bl=function(){return(0,je.jsx)("header",{className:"header header__menu",children:(0,je.jsx)(Vl,{})})},Wl=function(){return(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(Ce,{}),(0,je.jsx)(Bl,{})]})},Ul=function(e){return(0,je.jsxs)("div",{className:"intro",children:[e.title?(0,je.jsx)("p",{className:"intro__title",children:e.title}):(0,je.jsx)(Se,{className:"btn btn__large",smooth:!0,to:e.link,children:e.titleButton}),(0,je.jsx)("span",{className:"intro__border"}),(0,je.jsx)("p",{className:"intro__bottom",children:e.text})]})},Hl=function(){return(0,je.jsxs)("div",{className:"jumbotron pdt128 pdt64-PL",children:[(0,je.jsx)("img",{className:"jumbotron__logo",src:"/records/first-five-years/img/logos/logo-scala-color.svg",alt:"logo scala color"}),(0,je.jsxs)("div",{children:[(0,je.jsxs)("h1",{className:"jumbotron__title",children:[(0,je.jsx)("span",{children:"5Y"}),(0,je.jsx)("span",{children:"impact"}),"report"]}),(0,je.jsxs)("p",{className:"jumbotron__text",children:["presented by ",(0,je.jsx)("span",{children:"scala"}),"center"]}),(0,je.jsx)("p",{className:"jumbotron__subtitle",children:"2016-2021"})]})]})},$l=function(e){return(0,je.jsx)("div",{className:"container ".concat(e.className),children:e.children})},Yl=function(t){var n=(0,e.useRef)(null);return(0,e.useEffect)((function(){var e;t.doScroll&&(null===(e=n.current)||void 0===e||e.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}))})),(0,je.jsxs)("div",{id:t.id,ref:n,className:"testimonial",children:[(0,je.jsx)("img",{className:"testimonial__quote",alt:"speech quotes",src:"/records/first-five-years/img/illustrations/illustration12.svg"}),(0,je.jsx)("p",{className:"testimonial__text",children:t.text}),(0,je.jsx)("p",{className:"testimonial__job",children:t.job}),(0,je.jsx)("p",{className:"testimonial__name",children:t.name})]})},ql=function(e){return(0,je.jsx)("div",{className:"achievement__category",children:(0,je.jsxs)("div",{className:"achievement__content",children:[(0,je.jsx)(de,{className:"achievement__subtitle",to:e.link,children:e.subtitle}),(0,je.jsx)("div",{className:"achievement__line"}),(0,je.jsx)("p",{className:"achievement__number",children:e.number}),(0,je.jsx)("p",{className:"achievement__text",children:e.text})]})})},Xl=function(e){return(0,je.jsx)("div",{className:"grid ".concat(e.className),children:e.children})},Kl=function(e){return(0,je.jsx)("h2",{children:e.title})},Gl=function(){return(0,je.jsxs)("div",{className:"achievement",children:[(0,je.jsx)(Kl,{title:"Our Achievements"}),(0,je.jsxs)(Xl,{children:[(0,je.jsx)(ql,{link:"/report#education",subtitle:"Vibrant job market",number:"800k+",text:"Learners globally"}),(0,je.jsx)(ql,{link:"/report#tech",subtitle:"Simplified user experience",number:"20+",text:"Tools developed & maintained"}),(0,je.jsx)(ql,{link:"/report#community",subtitle:"Growing community",number:"1M+",text:"Scala users globally"}),(0,je.jsx)(ql,{link:"/report#stakeholders",subtitle:"Responsible stakeholders",number:"15",text:"Advisory board members"}),(0,je.jsxs)("div",{className:"achievement__graph",children:[(0,je.jsxs)("p",{className:"achievement__uppercase",children:["Realising",(0,je.jsx)("br",{}),"Scala",(0,je.jsx)("br",{}),"FOSS",(0,je.jsx)("br",{}),"Full",(0,je.jsx)("br",{}),"Potential"]}),(0,je.jsxs)("p",{className:"achievement__price",children:[(0,je.jsx)("span",{children:"chf"}),"800k"]}),(0,je.jsx)("p",{className:"text__md",children:"Annual budget"}),(0,je.jsx)("img",{className:"achievement__icon",alt:"A laptop with a mortar board",src:"/records/first-five-years/img/illustrations/illustration1.svg"}),(0,je.jsx)("img",{className:"achievement__icon",alt:"A swiss army knife",src:"/records/first-five-years/img/illustrations/illustration2.svg"}),(0,je.jsx)("img",{className:"achievement__icon",alt:"A globe suspended in a stand",src:"/records/first-five-years/img/illustrations/illustration3.svg"}),(0,je.jsx)("img",{className:"achievement__icon",alt:"A selection of simplified figures, one stands out in orange",src:"/records/first-five-years/img/illustrations/illustration4.svg"})]})]})]})},Ql=function(e){return(0,je.jsxs)("div",{className:"workingEntity",children:[(0,je.jsxs)("div",{className:"workingEntity__desc",children:[(0,je.jsxs)("p",{className:"workingEntity__number",children:[e.number,(0,je.jsx)("span",{children:e.percent})]}),(0,je.jsx)("div",{className:"workingEntity__line"}),(0,je.jsx)("p",{className:"workingEntity__text",children:e.text})]}),(0,je.jsx)("div",{className:"workingEntity__dot ".concat(e.className)})]})},Jl=function(){return(0,je.jsxs)("div",{className:"working",children:[(0,je.jsx)(Kl,{title:"Inner Workings"}),(0,je.jsxs)("div",{className:"working__body",children:[(0,je.jsxs)("div",{className:"working__part",children:[(0,je.jsx)("p",{className:"working__subtitle",children:"Revenue Sources"}),(0,je.jsxs)("div",{className:"working__group",children:[(0,je.jsxs)("div",{className:"working__stat",children:[(0,je.jsx)(Ql,{number:"2",text:"Fundraising",percent:"%",className:"bg-beige"}),(0,je.jsx)(Ql,{number:"48",text:"Advisory Board",percent:"%",className:"bg-orange"}),(0,je.jsx)(Ql,{number:"50",text:"MOOCs",percent:"%",className:"bg-red"})]}),(0,je.jsxs)("div",{className:"working__graph",children:[(0,je.jsx)("img",{alt:"Scala Center logo as a chart showing percentage budget awarded from fundraising (5%), MOOCS (50%), and Advisory Board (45%)",src:"/records/first-five-years/img/illustrations/illustration5.svg"}),(0,je.jsxs)("div",{className:"working__meter",children:[(0,je.jsxs)("div",{children:[(0,je.jsx)("div",{}),(0,je.jsx)("div",{}),(0,je.jsx)("div",{}),(0,je.jsx)("div",{}),(0,je.jsx)("div",{}),(0,je.jsx)("div",{}),(0,je.jsx)("div",{}),(0,je.jsx)("div",{}),(0,je.jsx)("div",{}),(0,je.jsx)("div",{}),(0,je.jsx)("div",{})]}),(0,je.jsxs)("div",{children:[(0,je.jsx)("p",{children:"0"}),(0,je.jsx)("p",{children:"50"}),(0,je.jsx)("p",{children:"100"})]})]})]})]})]}),(0,je.jsxs)("div",{className:"working__part",children:[(0,je.jsx)("p",{className:"working__subtitle",children:"Staff Breakdown"}),(0,je.jsxs)("div",{className:"working__group",children:[(0,je.jsx)("div",{className:"working__graph",children:(0,je.jsx)("img",{alt:"chart showing distribution of focus for employees: education (1), admin (3), and engineers (6)",src:"/records/first-five-years/img/illustrations/illustration6.svg"})}),(0,je.jsxs)("div",{className:"working__stat",children:[(0,je.jsx)(Ql,{number:"1",text:"Education",className:"bg-beige"}),(0,je.jsx)(Ql,{number:"3",text:"Management",className:"bg-orange"}),(0,je.jsx)(Ql,{number:"6",text:"Engineers",className:"bg-red"})]})]})]})]})]})},Zl=function(){return(0,je.jsxs)("div",{className:"gearing",children:[(0,je.jsxs)("div",{className:"gearing__gen gearing__gen1",children:[(0,je.jsxs)("div",{className:"gearing__part",children:[(0,je.jsx)("p",{className:"gearing__text",children:"EPFL"}),(0,je.jsx)("div",{className:"gearing__line"}),(0,je.jsx)("div",{className:"gearing__line"}),(0,je.jsxs)("div",{className:"gearing__draw",children:[(0,je.jsx)("img",{className:"gearing__icon",alt:"gear outline",src:"/records/first-five-years/img/illustrations/illustration7a.svg"}),(0,je.jsx)("img",{className:"gearing__logo",alt:"EPFL logo",src:"/records/first-five-years/img/illustrations/illustration7b.svg"})]})]}),(0,je.jsxs)("div",{className:"gearing__part",children:[(0,je.jsxs)("p",{className:"gearing__text",children:["Industry",(0,je.jsx)("br",{}),"Partners"]}),(0,je.jsx)("div",{className:"gearing__line"}),(0,je.jsxs)("div",{className:"gearing__draw",children:[(0,je.jsx)("img",{className:"gearing__icon",alt:"gear outline",src:"/records/first-five-years/img/illustrations/illustration8a.svg"}),(0,je.jsx)("img",{className:"gearing__logo",alt:"office buldings",src:"/records/first-five-years/img/illustrations/illustration8b.svg"})]})]})]}),(0,je.jsxs)("div",{className:"gearing__gen gearing__gen2",children:[(0,je.jsx)("img",{className:"gearing__text",alt:"'Scala Center'",src:"/records/first-five-years/img/illustrations/illustration9c.svg"}),(0,je.jsx)("img",{className:"gearing__arrow",alt:"arrow left-to-right",src:"/records/first-five-years/img/illustrations/illustration9d.svg"}),(0,je.jsxs)("div",{className:"gearing__draw",children:[(0,je.jsx)("img",{className:"gearing__icon",alt:"gear outline",src:"/records/first-five-years/img/illustrations/illustration9a.svg"}),(0,je.jsx)("img",{className:"gearing__logo",alt:"the Scala Center logo",src:"/records/first-five-years/img/illustrations/illustration9b.svg"})]}),(0,je.jsx)("img",{className:"gearing__arrow",alt:"arrow left-to-right",src:"/records/first-five-years/img/illustrations/illustration9d.svg"})]}),(0,je.jsxs)("div",{className:"gearing__gen gearing__gen3",children:[(0,je.jsx)("p",{className:"gearing__text",children:"Community Rep"}),(0,je.jsx)("div",{className:"gearing__line"}),(0,je.jsx)("div",{className:"gearing__line"}),(0,je.jsxs)("div",{className:"gearing__draw",children:[(0,je.jsx)("img",{className:"gearing__icon",alt:"gear outline",src:"/records/first-five-years/img/illustrations/illustration10a.svg"}),(0,je.jsx)("img",{className:"gearing__logo",alt:"outline of a person's head and shoulders",src:"/records/first-five-years/img/illustrations/illustration10b.svg"})]})]}),(0,je.jsxs)("div",{className:"gearing__gen gearing__gen4",children:[(0,je.jsx)("p",{className:"gearing__text",children:"Community"}),(0,je.jsx)("div",{className:"gearing__line"}),(0,je.jsx)("div",{className:"gearing__line"}),(0,je.jsx)("div",{className:"gearing__line"}),(0,je.jsx)("div",{className:"gearing__line"}),(0,je.jsxs)("div",{className:"gearing__draw",children:[(0,je.jsx)("img",{className:"gearing__icon",alt:"gear outline",src:"/records/first-five-years/img/illustrations/illustration11a.svg"}),(0,je.jsx)("img",{className:"gearing__logo",alt:"outline of three peoples' heads and shoulders",src:"/records/first-five-years/img/illustrations/illustration11b.svg"})]}),(0,je.jsxs)("div",{className:"gearing__draw",children:[(0,je.jsx)("img",{className:"gearing__icon",alt:"gear outline",src:"/records/first-five-years/img/illustrations/illustration10a.svg"}),(0,je.jsx)("img",{className:"gearing__logo",alt:"outline of a person's head and shoulders",src:"/records/first-five-years/img/illustrations/illustration10b.svg"})]})]})]})},eu=function(){var t=ie(),n=(0,e.useRef)(null);return(0,e.useEffect)((function(){var e;if("#"===t.hash)return null===(e=n.current)||void 0===e?void 0:e.scrollIntoView()}),[n,t.hash]),(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(Wl,{}),(0,je.jsx)(Hl,{}),(0,je.jsx)("div",{ref:n}),(0,je.jsx)("img",{className:"body__homeBg1",alt:"background",src:"/records/first-five-years/img/background/body-bg.svg"}),(0,je.jsxs)($l,{className:"mw1150 mgt0 mgt-40-DUU mgt120-DU mgt128-D mgt256-T mgt80-PL mgt-40-PP",children:[(0,je.jsx)(Yl,{text:"Back in 2016 I was incessant about the need for a not-for-profit space for all of Scala's users, professional and hobbyist. I never could have imagined that the Scala Center would become what it is today \u2014 truly a common ground for everyone to come together & most importantly \u2014 an organization that gets things done!",job:"Founder of the Scala Center",name:"Heather Miller"}),(0,je.jsx)(Gl,{})]}),(0,je.jsx)("img",{className:"body__homeBg2",alt:"background",src:"/records/first-five-years/img/background/body-bg2.svg"}),(0,je.jsx)($l,{className:"mw950",children:(0,je.jsx)(Yl,{text:"Scala owes its stability and growth in the recent years to the outstanding job of the Scala Center staff. They work tirelessly with the community and industry partners to bring a polished experience to newcomers and experts alike.",job:"Scala Language Designer",name:"Martin Odersky"})}),(0,je.jsx)("img",{className:"body__homeLine1",alt:"line",src:"/records/first-five-years/img/line/line1.svg"}),(0,je.jsx)($l,{children:(0,je.jsx)(Jl,{})}),(0,je.jsx)("img",{className:"body__homeBg3",alt:"background",src:"/records/first-five-years/img/background/body-bg3.svg"}),(0,je.jsx)("img",{className:"body__homeBg4",alt:"background",src:"/records/first-five-years/img/background/body-bg4.svg"}),(0,je.jsx)($l,{children:(0,je.jsx)(Zl,{})}),(0,je.jsx)($l,{className:"mgt160 mgt270-D mgt160-PP",children:(0,je.jsx)(Ul,{titleButton:"Read the report",link:"/report#education",text:"We encourage you to read the report and see the breakdown of the Scala Center's achievements between 2016 and 2021."})})]})},tu=[{id:1,year:2016,user:8e5},{id:2,year:2017,user:835e3},{id:3,year:2018,user:995e3},{id:4,year:2019,user:1e6},{id:5,year:2020,user:98e4},{id:6,year:2021,user:1e6}],nu=function(){return(0,je.jsxs)("div",{className:"growing",children:[(0,je.jsxs)("h2",{className:"mgb160 mgb56-PL",children:["Growing Quality",(0,je.jsx)("br",{}),"Scala Talent"]}),(0,je.jsxs)("div",{className:"grid",children:[(0,je.jsxs)("div",{className:"growing__part",children:[(0,je.jsx)("p",{className:"growing__number",children:"9"}),(0,je.jsx)("p",{className:"growing__subtitle",children:"MOOCs"}),(0,je.jsx)("img",{className:"growing__graph",alt:"bar chart",src:"/records/first-five-years/img/illustrations/illustration13.svg"}),(0,je.jsxs)("div",{className:"growing__legend",children:[(0,je.jsxs)("div",{className:"growing__text",children:[(0,je.jsx)("span",{className:"bg-orange"}),(0,je.jsx)("p",{children:"Coursera"})]}),(0,je.jsxs)("div",{className:"growing__text",children:[(0,je.jsx)("span",{className:"bg-beige"}),(0,je.jsx)("p",{children:"edX"})]}),(0,je.jsxs)("div",{className:"growing__text",children:[(0,je.jsx)("span",{className:"bg-red"}),(0,je.jsx)("p",{children:"EPFL extension school"})]})]})]}),(0,je.jsxs)("div",{className:"growing__part",children:[(0,je.jsxs)("p",{className:"growing__number",children:["4.7",(0,je.jsx)("span",{className:"beige",children:"/"}),"5"]}),(0,je.jsx)("p",{className:"growing__subtitle",children:"RATING"}),(0,je.jsx)("img",{className:"growing__graph",alt:"dot plot",src:"/records/first-five-years/img/illustrations/illustration14.svg"}),(0,je.jsx)("div",{className:"growing__legend",children:(0,je.jsxs)("div",{className:"growing__text",children:[(0,je.jsx)("span",{className:"bg-orange"}),(0,je.jsx)("p",{children:"based on Coursera stats"})]})})]}),(0,je.jsxs)("div",{className:"growing__part",children:[(0,je.jsx)("p",{className:"growing__number",children:"800k+"}),(0,je.jsx)("p",{className:"growing__subtitle",children:"LEARNERS"}),(0,je.jsx)("img",{className:"growing__graph",alt:"dot plot",src:"/records/first-five-years/img/illustrations/illustration15.svg"}),(0,je.jsx)("div",{className:"growing__legend",children:(0,je.jsxs)("div",{className:"growing__text",children:[(0,je.jsx)("span",{className:"bg-red"}),(0,je.jsx)("p",{children:"10.000"})]})})]})]})]})},ru=function(e){return(0,je.jsxs)("div",{className:"cardEntity",children:[(0,je.jsx)("img",{className:"cardEntity__top",alt:"the scala center logo unfolding into a panel",src:"/records/first-five-years/img/testimonial-bg.svg"}),(0,je.jsxs)("div",{className:"cardEntity__bg",children:[(0,je.jsxs)("div",{className:"dflex fd-c",children:[(0,je.jsx)("img",{className:"cardEntity__quote",alt:"speech quotes",src:"/records/first-five-years/img/illustrations/illustration12.svg"}),(0,je.jsx)("p",{className:"cardEntity__text",children:e.text})]}),(0,je.jsxs)("div",{className:"dflex fd-c",children:[(0,je.jsx)("p",{className:"cardEntity__job",children:e.name}),(0,je.jsxs)("p",{className:"cardEntity__name",children:[e.class,(0,je.jsx)("br",{}),e.job]})]})]})]})},iu=function(){return(0,je.jsx)("div",{className:"card",children:(0,je.jsxs)("div",{className:"card__content",children:[(0,je.jsx)(ru,{text:"Probably the best course out there to learn Scala 3. Lectures were to the point and concepts were drilled in by challenging assignments every week. Would definitely recommend to all those who want to get started with this amazing language.",name:"Melburne R.",className:"Coursera Student",job:"Developer"}),(0,je.jsx)(ru,{text:"All the topics have practical applications, and are presented in a clear way. Many videos are devoted to code organization principles, and the emphasis is always on a functional programming style. The course also deals with practical topics that are often neglected by programming courses.",name:"Lanfranco S.",className:"Coursera Student",job:"Electronic Engineer"}),(0,je.jsx)(ru,{text:"I personally recommend this course to everyone: young developers that want to learn Scala 3 as well as more experienced ones willing to update their knowledge.",name:"Jules I.",className:"Senior Software Engineer",job:"Functional Programmer"})]})})},au=function(){return(0,je.jsxs)("div",{className:"circle",children:[(0,je.jsx)("h2",{children:"About our Learners"}),(0,je.jsxs)("div",{className:"circle__part",children:[(0,je.jsxs)("div",{className:"circle__stat",children:[(0,je.jsxs)("p",{className:"circle__number orange",children:["74",(0,je.jsx)("span",{children:"%"})]}),(0,je.jsx)("span",{className:"circle__line"}),(0,je.jsx)("p",{className:"circle__text",children:"Employed"})]}),(0,je.jsxs)("div",{className:"circle__stat",children:[(0,je.jsxs)("p",{className:"circle__number red",children:["14",(0,je.jsx)("span",{children:"%"})]}),(0,je.jsx)("span",{className:"circle__line"}),(0,je.jsx)("p",{className:"circle__text",children:"Unemployed"})]}),(0,je.jsxs)("div",{className:"circle__stat",children:[(0,je.jsxs)("p",{className:"circle__number beige",children:["12",(0,je.jsx)("span",{children:"%"})]}),(0,je.jsx)("span",{className:"circle__line"}),(0,je.jsx)("p",{className:"circle__text",children:"Student"})]}),(0,je.jsxs)("div",{className:"circle__graph",children:[(0,je.jsx)("img",{alt:"a pie chart",src:"/records/first-five-years/img/illustrations/illustration16.svg"}),(0,je.jsx)("p",{children:"Profile"})]})]}),(0,je.jsxs)("div",{className:"circle__part",children:[(0,je.jsxs)("div",{className:"circle__stat",children:[(0,je.jsxs)("p",{className:"circle__number orange",children:["72",(0,je.jsx)("span",{children:"%"})]}),(0,je.jsx)("span",{className:"circle__line"}),(0,je.jsx)("p",{className:"circle__text",children:"Free"})]}),(0,je.jsxs)("div",{className:"circle__stat",children:[(0,je.jsxs)("p",{className:"circle__number red",children:["25",(0,je.jsx)("span",{children:"%"})]}),(0,je.jsx)("span",{className:"circle__line"}),(0,je.jsx)("p",{className:"circle__text",children:"Paid"})]}),(0,je.jsxs)("div",{className:"circle__graph",children:[(0,je.jsx)("img",{alt:"a pie chart",src:"/records/first-five-years/img/illustrations/illustration17.svg"}),(0,je.jsx)("p",{children:"Course Model"})]}),(0,je.jsxs)("div",{className:"circle__stat",children:[(0,je.jsxs)("p",{className:"circle__number beige",children:["3",(0,je.jsx)("span",{children:"%"})]}),(0,je.jsx)("span",{className:"circle__line"}),(0,je.jsx)("p",{className:"circle__text",children:"Financial aid"})]})]}),(0,je.jsxs)("div",{className:"circle__part",children:[(0,je.jsxs)("div",{className:"circle__graph",children:[(0,je.jsx)("img",{alt:"a pie chart",src:"/records/first-five-years/img/illustrations/illustration18.svg"}),(0,je.jsx)("p",{children:"Gender"})]}),(0,je.jsxs)("div",{className:"circle__stat",children:[(0,je.jsxs)("p",{className:"circle__number orange",children:["86",(0,je.jsx)("span",{children:"%"})]}),(0,je.jsx)("span",{className:"circle__line"}),(0,je.jsx)("p",{className:"circle__text",children:"Male"})]}),(0,je.jsxs)("div",{className:"circle__stat",children:[(0,je.jsxs)("p",{className:"circle__number red",children:["11",(0,je.jsx)("span",{children:"%"})]}),(0,je.jsx)("span",{className:"circle__line"}),(0,je.jsx)("p",{className:"circle__text",children:"Female"})]}),(0,je.jsxs)("div",{className:"circle__stat",children:[(0,je.jsxs)("p",{className:"circle__number beige",children:["2",(0,je.jsx)("span",{children:"%"})]}),(0,je.jsx)("span",{className:"circle__line"}),(0,je.jsx)("p",{className:"circle__text",children:"Other"})]})]})]})},ou=function(e){return(0,je.jsxs)("div",{className:"post__entity",children:[(0,je.jsx)("img",{className:"post__img",alt:e.alt,src:e.img}),(0,je.jsxs)("div",{className:"post__content",children:[(0,je.jsxs)("div",{className:"post__head",children:[(0,je.jsx)("p",{className:"post__number",children:e.number}),(0,je.jsx)("p",{className:"post__subtitle",children:e.subtitle})]}),(0,je.jsx)("p",{className:"text__primary",children:e.text})]})]})},su=function(){return(0,je.jsxs)("div",{className:"post",children:[(0,je.jsx)("h2",{className:"post__title",children:"Keeping up to Date"}),(0,je.jsxs)("p",{className:"post__intro text__primary",children:["For a developer, learning is a continuous process that never truly ends. Practices evolve, new tools are written, and language features make their way into the language.",(0,je.jsx)("br",{}),"At the Scala Center, we create documentation for all Scala developers, using various media."]}),(0,je.jsx)(ou,{alt:"crew at Scala Days 2019",img:"/records/first-five-years/img/photos/photo1@2x.jpg",number:"42",subtitle:"Talks",text:"Industry conferences are prime venues to meet other developers, exchange ideas, and learn about the latest technologies and practices. As leaders of the community and maintainers of some of the core tools in the ecosystem, the Scala Center staff often gives talks at conferences, from everyday tips about the language to advanced features of our tools."}),(0,je.jsx)(ou,{alt:"YouTube thumbnail from the Let's Talk About Scala 3 video series",img:"/records/first-five-years/img/photos/photo2@2x.jpg",number:"13",subtitle:"Video tutorials",text:"Increasingly, developers enjoy learning through video tutorials. We regularly produce short video content, teaching about the language and our tools."}),(0,je.jsx)(ou,{alt:"attendees at a Scala Spree at Scala Days 2018 in Berlin",img:"/records/first-five-years/img/photos/photo3@2x.jpg",number:"19",subtitle:"Workshops",text:"Passive consumption of learning material such as documentation and videos can never be as effective as learning by doing. At meetups and conferences organized around Europe and the world, we organize introductory workshops to Scala. Through active practice under the guidance of our staff, learners can get started quickly."}),(0,je.jsx)(ou,{alt:"scala-lang.org homepage",img:"/records/first-five-years/img/photos/photo4@2x.png",number:"4",subtitle:"Websites",text:"For everyday development, good reference documentation remains essential. The Scala Center is one of the leading institutions maintaining the Scala main website and its documentation website. We strive to make them attractive and effective to beginners and experts alike."})]})},lu=function(e){return(0,je.jsxs)("div",{className:"map__stat",children:[(0,je.jsx)("div",{className:"map__square",children:(0,je.jsx)("div",{})}),(0,je.jsxs)("p",{className:"map__number",children:[e.percent,(0,je.jsx)("span",{children:"%"})]}),(0,je.jsx)("div",{className:"map__border"}),(0,je.jsxs)("p",{className:"map__text",children:[e.country,(0,je.jsx)("br",{}),e.number]})]})},uu=function(){return(0,je.jsxs)("div",{className:"map",children:[(0,je.jsx)("h2",{children:"Total Monthly Visits"}),(0,je.jsxs)("div",{className:"map__graph",children:[(0,je.jsxs)("div",{className:"map__circle",children:[(0,je.jsx)("img",{alt:"pie chart",src:"/records/first-five-years/img/illustrations/illustration19.svg"}),(0,je.jsxs)("p",{children:["WORLD",(0,je.jsx)("br",{}),(0,je.jsx)("span",{children:"290,224"})]})]}),(0,je.jsx)("img",{className:"map__draw",alt:"world map highlighting continents most visited",src:"/records/first-five-years/img/illustrations/illustration20.svg"})]}),(0,je.jsxs)("div",{className:"map__legend",children:[(0,je.jsx)("div",{className:"map__line"}),(0,je.jsx)("div",{className:"map__line"}),(0,je.jsx)("div",{className:"map__line"}),(0,je.jsxs)("div",{className:"map__bottom",children:[(0,je.jsx)(lu,{percent:"41",country:"Europe",number:"114,091"}),(0,je.jsx)(lu,{percent:"27",country:"Asia",number:"71,258"}),(0,je.jsx)(lu,{percent:"25",country:"N America",number:"77,248"}),(0,je.jsx)(lu,{percent:"3",country:"S America",number:"8,600"}),(0,je.jsx)(lu,{percent:"1",country:"Africa",number:"3,934"}),(0,je.jsx)(lu,{percent:"1",country:"Oceania",number:"3,220"}),(0,je.jsx)(lu,{percent:"0",country:"Antarctica",number:"1"})]})]})]})},cu=function(){return(0,je.jsxs)("div",{className:"arrow",children:[(0,je.jsx)("span",{className:"arrow__line"}),(0,je.jsx)("span",{className:"arrow__triangle"})]})},du=function(e){return(0,je.jsxs)("div",{className:"result",children:[(0,je.jsxs)("div",{className:"result__content",children:[(0,je.jsxs)("div",{className:"result__part",children:[(0,je.jsx)("p",{className:"result__title",children:"Impact"}),(0,je.jsx)("p",{className:"result__text",children:e.impact}),(0,je.jsxs)("div",{className:"result__attributed",children:[(0,je.jsx)("img",{className:"result__quote",alt:"speech quotes",src:"/records/first-five-years/img/illustrations/illustration12.svg"}),(0,je.jsx)("p",{className:"result__author",children:e.author})]})]}),(0,je.jsx)(cu,{}),(0,je.jsxs)("div",{className:"result__part",children:[(0,je.jsx)("p",{className:"result__title",children:"Purpose"}),(0,je.jsx)("p",{className:"result__text",children:e.purpose})]})]}),(0,je.jsx)(Ul,{title:"Result",text:e.result})]})},hu=function(e){return(0,je.jsx)("div",{className:"icon",children:(0,je.jsx)("div",{className:"icon__grid",children:e.children})})},fu=function(e){return(0,je.jsxs)("div",{className:"iconEntity__part",children:[(0,je.jsx)("img",{className:"iconEntity__img",alt:e.alt,src:e.img}),(0,je.jsx)("p",{className:"iconEntity__title",children:e.title}),(0,je.jsx)("p",{className:"iconEntity__number",children:e.number}),(0,je.jsx)("span",{className:"iconEntity__border"}),(0,je.jsx)("p",{className:"iconEntity__text",children:e.text})]})},pu=[{id:1,text:"The idea of engaging families was FANTASTIC. Although my family was not able to attend, it was great for the mood of the conference to see families walking together, children playing, etc.",job:"",name:"Anonymous Scala Days attendee"},{id:2,text:"I really appreciated the effort done for the diversity, moreover, I feel that the only way to go for the community. Thanks for the energy deployed and especially to Darja, she is incredible!",job:"",name:"Anonymous Scala Days attendee"},{id:3,text:"The Scala days I participated in were always a great experience, but Lausanne was the best! Now while reviewing the videos I get inspired again.",job:"",name:"Anonymous Scala Days attendee"},{id:4,text:"I just wanted to thank you and the whole team again for giving me (and I am pretty sure I am also talking on behalf of everyone else who attended the conference) the opportunity to attend Scaladays and the Typelevel summit through the Diversity program. It was an incredible experience: I have learnt a lot, made some new friends and somehow my goal of transitioning to finding a Scala job full-time may be on a good track now.",job:"",name:"Anonymous Scala Days attendee"},{id:5,text:"I have also realised the amount of work but also how hard you guys worked on making this conference safe by bringing talks related to how to build a diverse and inclusive community. I have been very sensitive to all these initiatives and I am really very optimistic about the future because of what you guys have done. I would like to congratulate you all for bringing the community one step further in the right direction and I hope I will be able to contribute ideas in the future to push it even more.",job:"",name:"Anonymous Scala Days attendee"},{id:6,text:"Been to ScalaDays every year, this year's was the best so far by a wiiide margin.",job:"",name:"Anonymous Scala Days attendee"}],vu=[{id:1,text:"Spring 2021, I was interested in spending more time on Scala devtools such as scalameta projects, and found that Google Summer of Code (GSoC) might be a good opportunity to start. I told them I'm interested in GSoC and asked if Scala Center was willing to join GSoC 2021. To be honest I wasn't expecting much. However, just a few hours later, the Scala Center promised that Scala will join GSoC 2021, and they did! Thanks to that, I could spend three months of GSoC focusing on the development of the Scala devtools.",job:"Tooling Developer",name:"Rikito Taniguchi"},{id:2,text:"I saw a tweet from Anatolii Kmetiuk, that got me interested in contributing to dotty. It's been a few months, have received really good support solving various issues, furthermore pairing with other contributors makes everything more interesting and worthwhile.",job:"Tooling Developer",name:"Gagandeep Kalra"},{id:3,text:"Scala is a fantastic language for teaching, as it is both pragmatic and powerful and you can contrast and illustrate different styles and solutions in the same program. The Scala Center has established a community for teachers and learners with a friendly environment for both students and professional learners.",job:"Professor",name:"Bj\xf6rn Regnell"},{id:4,text:"Adrien Piquerez was instrumental in taking my simple POC and making it into a fully functional dream! (scala-debug-adapter) I can't imagine this project being anywhere near as successful without the Scala Center's support. I am extremely grateful for the impact making even simple contributions to Scala Center's OSS projects has had on my career prospects. I have no doubt that the implicit credibility of the Scala Center, and being able to be a contributor [...] can also have a deep impact in other developers' careers.",job:"Principle Software Engineer",name:"Eric Peters"},{id:5,text:"The Scala Center is a major force behind moving the Scala ecosystem forward. I actually collaborated with the Scala Center on a couple of projects such as the \u201cLet's talk about Scala 3\u201d video series and the development of the \u201cEffective Scala\u201c course and in both cases, it was a great experience.",job:"CTO, Lunatech",name:"Eric Loots"},{id:6,text:"Maintaining and developing tools, spreading knowledge about Scala and making the language more accessible. I use Metals every day and I'm really happy with it!",job:"Lead Software Engineer",name:"Jakub Koz\u0142owski"},{id:7,text:"Scala Center has worked as the driving force behind Scala. Without the Scala Center, the Scala 3 compiler and the surrounding tools would not have been so actively developed. Also, it's great to see Scala Center is trying to boost the community through various events such as Scalacon, Scala Spree, and more recently the Scala 3 compiler academy youtube channel.",job:"Tooling Developer",name:"Rikito Taniguchi"},{id:8,text:"Coursera Scala MOOCs had a massive impact on my programming journey. It inspired me to strive for writing programs that look beautiful to human eyes. I got to learn how vast and powerful the Scala language is and there is always an alternate or better way of doing things.",job:"Software Engineer",name:"@GCDAI (GitHub)"},{id:9,text:"I've found the conferences in which the Scala Center was involved to be a very fun place to both teach and learn. Strangely, I'm using scastie quite a bit - maybe not on a daily basis, but it's been a great tool for sharing toy code used to exhibit interesting or complicated concepts. I don't think the Scala ecosystem would be the same without the Scala Center's efforts for making the language easier to learn and work with.",job:"Software Engineer",name:"Anonymous"},{id:10,text:"Lots of amazing and high quality tools that made my day-to-day work so much more enjoyable",job:"Software Engineer",name:"Anonymous"},{id:11,text:"The people from the Scala Center are a core group of people who both develop and maintain the language, technically and socially. They were super nice and helpful on my journey of contributing to the compiler and learning Scala in the process.",job:"Software Engineer",name:"Anonymous"},{id:12,text:"I think the most value added by Scala Center is the standardisation of the Scala ecosystem (BSP, Metals, Scaladex). Scastie + Scaladex are also very good for newcomers, and often helped me to test some libraries without needing to create a whole local project. I'm also a heavy user of BSP through Mill. I really like the standardisation provided by BSP, LSP, build tools etc... and it is in my opinion one of the greatest strengths of Scala.",job:"Software Engineer",name:"Anonymous"}],mu=function(e){var t=e.id,n=e.text,r=e.job,i=e.name,a=e.personIndex,o=e.index,s="nextSlide";return a===o&&(s="activeSlide"),(a===o-1||0===o&&a===vu.length-1)&&(s="lastSlide"),(0,je.jsxs)("div",{className:"slide "+s,children:[(0,je.jsxs)("div",{className:"slide__part",children:[(0,je.jsx)("img",{className:"slide__quote",alt:"speech quotes",src:"/records/first-five-years/img/illustrations/illustration12.svg"}),(0,je.jsx)("p",{className:"slide__text",children:n})]}),(0,je.jsxs)("div",{className:"slide__part",children:[(0,je.jsx)("p",{className:"slide__job",children:r}),(0,je.jsx)("p",{className:"slide__name",children:i})]})]},t)},gu=function(t){var n=Me((0,e.useState)({index:0,isCancelled:!1}),2),r=n[0],i=r.index,a=r.isCancelled,o=n[1];return(0,e.useEffect)((function(){var e=t.slide.length-1;i<0&&o({index:e,isCancelled:a}),i>e&&o({index:0,isCancelled:a})}),[i,a,t.slide]),(0,e.useEffect)((function(){if(!a){var e=setInterval((function(){o({index:i+1,isCancelled:a})}),9e3);return function(){return clearInterval(e)}}}),[i,a]),(0,je.jsxs)("div",{className:"slider",children:[(0,je.jsx)("button",{className:"slider__prev",onClick:function(){return o({index:i-1,isCancelled:!0})},children:(0,je.jsx)("span",{className:"material-symbols-outlined",children:"arrow_back_ios"})}),(0,je.jsx)("div",{className:"slider__view",children:t.slide.map((function(e,t){return(0,je.jsx)(mu,kt(kt({},e),{},{personIndex:t,index:i}),e.id)}))}),(0,je.jsx)("button",{className:"slider__next",onClick:function(){return o({index:i+1,isCancelled:!0})},children:(0,je.jsx)("span",{className:"material-symbols-outlined",children:"arrow_forward_ios"})})]})},yu=function(e){return(0,je.jsxs)("li",{className:"list__item",children:[(0,je.jsx)("span",{className:"list__circle",children:(0,je.jsx)("span",{className:"list__dot"})}),e.item]})},bu=function(e){return(0,je.jsx)("ul",{className:"list ".concat(e.className),children:e.children})},xu=function(t){var n=Me(e.useState(t.collapsed),2),r=n[0],i=n[1];return(0,je.jsxs)("div",{className:"article",children:[(0,je.jsx)("p",{className:"article__title",children:t.title}),(0,je.jsx)(bu,{children:t.listItems.map((function(e,t){return(0,je.jsx)(yu,{item:e},t)}))}),(0,je.jsx)("div",{className:r?"article__expanded":"article__collapsed","aria-expanded":r,children:t.children}),!("undefined"===typeof t.children)&&!(Array.isArray(t.children)&&0===t.children.length)&&(0,je.jsx)("div",{className:"flex jc-c",children:(0,je.jsxs)("button",{className:"btn",onClick:function(){return i(!r)},children:[r?"Less":"Continue"," Reading"]})})]})},ku=function(e){return(0,je.jsxs)("div",{className:"articleEntity",children:[(0,je.jsx)("p",{className:"text__primary mgb14",children:e.text}),e.callToAction&&(0,je.jsx)("a",{className:"text__calltoaction",href:e.link,target:"_blank",rel:"noreferrer",children:e.callToAction})]})},_u=function(e){return(0,je.jsx)("p",{className:"text__primary ".concat(e.className),children:e.content})},wu=function(e){return(0,je.jsxs)("div",{className:"community__stat",children:[(0,je.jsx)("p",{className:"community__number",children:e.number}),(0,je.jsx)("span",{className:"community__line"}),(0,je.jsx)("p",{className:"community__subtext",children:e.subtext})]})},Su=function(){return(0,je.jsxs)("div",{className:"community",children:[(0,je.jsxs)("div",{className:"community__top",children:[(0,je.jsx)("div",{className:"community__imgwrap",children:(0,je.jsx)("img",{className:"community__img",alt:"The Scala Center team September 2021",src:"/records/first-five-years/img/photos/photo1.jpg"})}),(0,je.jsxs)("div",{className:"community__text",children:[(0,je.jsx)("h2",{className:"ta-i mgb35 ta-c-D",children:"Community Support"}),(0,je.jsx)("p",{className:"text__primary",children:"We dedicate about 30% of our work time to creating meaningful events, leading discussions, gathering feedback, answering questions, mentoring developers and generally supporting our community. This is the less visible but essential part of our daily job, this is how we participate in building a more resilient Scala ecosystem and create new synergies with the community."})]})]}),(0,je.jsxs)("div",{className:"community__bottom",children:[(0,je.jsx)(wu,{number:"1.2k",subtext:"Hours of community Q&A"}),(0,je.jsx)(wu,{number:"4k",subtext:"Pull requests reviewed"}),(0,je.jsx)(wu,{number:"45k+",subtext:"Scala FOSS Contributors"})]})]})},ju=function(){return(0,je.jsxs)("div",{className:"scala3release",children:[(0,je.jsx)("h2",{className:"ta-i mgb35",children:"Scala 3 Release Coordination"}),(0,je.jsxs)("div",{className:"scala3release__top",children:[(0,je.jsxs)("div",{className:"scala3release__text",children:[(0,je.jsxs)("p",{className:"text__primary mgb8",children:["After 8 years of work, 28,000 commits, 7,400 pull requests, 4,100 closed issues \u2014 Scala 3 was finally released in May 2021. Since the first commit on December 6th 2012, ",(0,je.jsx)("span",{children:"more than a hundred people have contributed"})," to the project. Today, Scala 3 incorporates the latest research in type theory as well as the industry experience of Scala 2."]}),(0,je.jsxs)("p",{className:"text__primary ti50",children:["The Scala Center team was honored to help bring Scala 3 across the finish line. ",(0,je.jsx)("span",{children:"The Center led the SIP process"})," to approve over 60 features and changes, ",(0,je.jsx)("span",{children:"coordinated stakeholders and contributors"})," throughout the release period, ",(0,je.jsx)("span",{children:"created migration tools and guides"}),", and ",(0,je.jsx)("span",{children:"updated all the education material"})," (MOOCs, documentation websites, and more)."]})]}),(0,je.jsx)("div",{className:"scala3release__video",children:(0,je.jsx)("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/0yRAtLL18cY?vq=hd720",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0})})]})]})},Cu=function(){return(0,je.jsxs)("div",{className:"library",children:[(0,je.jsxs)("div",{className:"library__part",children:[(0,je.jsx)("h2",{className:"ta-i mgb48",children:"Scala Library"}),(0,je.jsx)("p",{className:"text__primary",children:"Scala would not be the same without its standard library. The Scala Center participates in improving the library for every developer to use. It was particularly involved in redesigning the collections for Scala 2.13."})]}),(0,je.jsx)("img",{className:"library__img",alt:"scala collections hierarchy as a tree",src:"/records/first-five-years/img/illustrations/illustration28.svg"})]})},Pu=function(){return(0,je.jsxs)("div",{className:"comparison",children:[(0,je.jsxs)("div",{className:"comparison__top",children:[(0,je.jsxs)("div",{children:[(0,je.jsx)("h2",{className:"ta-i mgb48",children:"Language Enhancement"}),(0,je.jsx)("p",{className:"text__primary",children:"The Scala Center stewards the Scala Improvement Process (SIP), the governing process for the evolution of the Scala language. "})]}),(0,je.jsx)("p",{className:"text__primary",children:"The process is instrumental to bringing innovation while preserving compatibility. It allows collaborative evolution, as developers submit and comment on proposals. In addition, the Scala Center participates in the development of some of the proposed extensions."})]}),(0,je.jsxs)("div",{className:"comparison__content",children:[(0,je.jsxs)("div",{children:[(0,je.jsx)("img",{alt:"Scala code pre 3.0.0",src:"/records/first-five-years/img/illustrations/illustration26.svg"}),(0,je.jsx)("p",{className:"comparison__subtitle",children:"before"})]}),(0,je.jsxs)("div",{children:[(0,je.jsx)("img",{alt:"Scala code post 3.0.0, with simpler syntax",src:"/records/first-five-years/img/illustrations/illustration27.svg"}),(0,je.jsx)("p",{className:"comparison__subtitle orange",children:"after"})]})]})]})},Eu=function(){return(0,je.jsxs)("div",{className:"variety",children:[(0,je.jsx)("h2",{className:"mgb90",children:"Variety of Platforms"}),(0,je.jsx)("p",{className:"variety__text text__primary",children:"While Scala was initially designed to target the JVM, it now supports two additional platforms: JavaScript and Native code. These platforms expand the reach and impact of Scala by giving it access to more ecosystems. They allow Scala developers to leverage their skills in a wide range of applications. Both platforms offer strong portability, interoperability, and performance characteristics. The Scala Center has been taking an active part in their maintenance and evolution."}),(0,je.jsxs)("div",{className:"variety__content",children:[(0,je.jsxs)("div",{className:"variety__part",children:[(0,je.jsx)("img",{alt:"Scala.js logo on a platform",src:"/records/first-five-years/img/illustrations/illustration24.svg"}),(0,je.jsx)("p",{className:"text__primary",children:"Scala.js targets any JavaScript environment, from browsers to Node.js servers to embedded devices. Using Scala.js, developers can leverage Scala, its libraries, as well as the JavaScript ecosystem, to develop robust applications that run anywhere."})]}),(0,je.jsxs)("div",{className:"variety__part",children:[(0,je.jsx)("img",{alt:"Scala Native logo on a platform",src:"/records/first-five-years/img/illustrations/illustration25.svg"}),(0,je.jsx)("p",{className:"text__primary",children:"Scala Native compiles Scala directly to executable machine code, on Windows, macOS and Linux. Applications written in Scala Native enjoy instant startup as well as good performance, while benefiting from the strengths of Scala."})]})]})]})},Mu=function(){return(0,je.jsxs)("div",{className:"tooling",children:[(0,je.jsx)("h2",{children:"Tooling Innovation"}),(0,je.jsxs)("div",{className:"grid ai-c-DU",children:[(0,je.jsxs)("div",{className:"tooling__part",children:[(0,je.jsxs)("div",{className:"tooling__content",children:[(0,je.jsx)("img",{className:"tooling__logo",alt:"Metals logo",src:"/records/first-five-years/img/logos/logo-metals.svg"}),(0,je.jsx)("p",{className:"tooling__text",children:"Be more productive with full-featured Scala support in code editors thanks to Metals, the Scala language server."})]}),(0,je.jsxs)("div",{className:"tooling__content",children:[(0,je.jsx)("img",{className:"tooling__logo",alt:"Scaladex logo",src:"/records/first-five-years/img/logos/logo-scaladex.svg"}),(0,je.jsx)("p",{className:"tooling__text",children:"Explore the rich Scala ecosystem in Scaladex, the web index of all Scala libraries, and find the right set of libraries for your need."})]}),(0,je.jsxs)("div",{className:"tooling__content",children:[(0,je.jsx)("img",{className:"tooling__logo",alt:"Scastie logo",src:"/records/first-five-years/img/logos/logo-scastie.svg"}),(0,je.jsx)("p",{className:"tooling__text",children:"Share code snippets and bug reports on the web with Scastie, the Scala code editor embedded in web browsers."})]})]}),(0,je.jsxs)("div",{className:"tooling__draw",children:[(0,je.jsxs)("div",{children:[(0,je.jsx)("img",{className:"tooling__line",alt:"linking line",src:"/records/first-five-years/img/draw-line1.svg"}),(0,je.jsx)("img",{className:"tooling__line",alt:"linking line",src:"/records/first-five-years/img/draw-line2.svg"}),(0,je.jsx)("img",{className:"tooling__line",alt:"linking line",src:"/records/first-five-years/img/draw-line3.svg"}),(0,je.jsx)("span",{className:"tooling__dot"}),(0,je.jsx)("span",{className:"tooling__dot"}),(0,je.jsx)("span",{className:"tooling__dot"})]}),(0,je.jsx)("img",{alt:"swiss army knife",src:"/records/first-five-years/img/draw12.svg"}),(0,je.jsxs)("div",{children:[(0,je.jsx)("img",{className:"tooling__line",alt:"linking line",src:"/records/first-five-years/img/draw-line4.svg"}),(0,je.jsx)("img",{className:"tooling__line",alt:"linking line",src:"/records/first-five-years/img/draw-line5.svg"}),(0,je.jsx)("img",{className:"tooling__line",alt:"linking line",src:"/records/first-five-years/img/draw-line6.svg"}),(0,je.jsx)("span",{className:"tooling__dot"}),(0,je.jsx)("span",{className:"tooling__dot"}),(0,je.jsx)("span",{className:"tooling__dot"})]})]}),(0,je.jsxs)("div",{className:"tooling__part",children:[(0,je.jsxs)("div",{className:"tooling__content",children:[(0,je.jsx)("img",{className:"tooling__logo",alt:"scala3-migrate logo",src:"/records/first-five-years/img/logos/logo-migrate.png"}),(0,je.jsx)("p",{className:"tooling__text",children:"Migrate your Scala 2 sbt project to Scala 3 with no hassle thanks to the scala3-migrate sbt plugin."})]}),(0,je.jsxs)("div",{className:"tooling__content",children:[(0,je.jsx)("img",{className:"tooling__logo",alt:"Bloop logo",src:"/records/first-five-years/img/logos/logo-bloop.png"}),(0,je.jsx)("p",{className:"tooling__text",children:"Speed up your compilation for a faster development feedback loop, with Bloop the Scala compile server that minimizes resource usage."})]}),(0,je.jsxs)("div",{className:"tooling__content",children:[(0,je.jsx)("img",{className:"tooling__logo",alt:"Scalafix logo",src:"/records/first-five-years/img/logos/logo-scalafix.png"}),(0,je.jsx)("p",{className:"tooling__text",children:"Use Scalafix, the linting and refactoring tool, to enforce a common Scala style for your project and your team with minimal effort."})]})]})]})]})},Nu=function(e){return(0,je.jsxs)("div",{className:"growing__part",children:[(0,je.jsx)("p",{className:"growing__number",children:e.number}),(0,je.jsx)("p",{className:"growing__subtitle",children:e.subtitle}),(0,je.jsx)("img",{className:"growing__graph",alt:e.alt,src:e.img})]})},Tu=function(){return(0,je.jsxs)("div",{className:"part",children:[(0,je.jsx)(Kl,{title:"Towards Sustainable Scala FOSS"}),(0,je.jsxs)("div",{className:"part__content",children:[(0,je.jsxs)("div",{className:"part__entity",children:[(0,je.jsx)("h3",{className:"part__subtitle",children:"Responsible Stakeholders"}),(0,je.jsx)(_u,{className:"mgb72 mgb32-PL",content:"An increasing number of Scala stakeholders promotes Scala FOSS sustainability"}),(0,je.jsxs)(bu,{children:[(0,je.jsx)(yu,{item:"Advisory board that engages with all interest groups"}),(0,je.jsx)(yu,{item:"Stop on \u201cdemand culture\u201d"}),(0,je.jsx)(yu,{item:"Awareness raised around the critical importance of contributing back"})]})]}),(0,je.jsx)("div",{className:"part__middle",children:(0,je.jsx)(cu,{})}),(0,je.jsxs)("div",{className:"part__entity",children:[(0,je.jsx)("h3",{className:"part__subtitle",children:"Sustainable Ecosystem"}),(0,je.jsx)(_u,{className:"mgb72 mgb32-PL",content:"A Scala ecosystem ever more resilient and reliable"}),(0,je.jsxs)(bu,{children:[(0,je.jsx)(yu,{item:"Major stakeholders engaged"}),(0,je.jsx)(yu,{item:"Contributors supported"}),(0,je.jsx)(yu,{item:"Investment in critical infrastructure"})]})]})]})]})},Ou=function(){return(0,je.jsxs)("div",{className:"members",children:[(0,je.jsxs)("div",{className:"members__part",children:[(0,je.jsx)("h3",{className:"members__title ta-i",children:"Current Advisory Board Members"}),(0,je.jsxs)("div",{className:"members__group jc-sb",children:[(0,je.jsx)("img",{alt:"EPFL logo",src:"/records/first-five-years/img/logos/logo-epfl.svg"}),(0,je.jsx)("img",{alt:"Goldman Sachs logo",src:"/records/first-five-years/img/logos/logo-goldman.svg"}),(0,je.jsx)("img",{alt:"Twitter logo",src:"/records/first-five-years/img/logos/logo-twitter2.svg"}),(0,je.jsx)("img",{alt:"Lightbend logo",src:"/records/first-five-years/img/logos/logo-lighbend.svg"}),(0,je.jsx)("img",{alt:"47 degrees logo",src:"/records/first-five-years/img/logos/logo-47.svg"}),(0,je.jsx)("img",{alt:"Spotify logo",src:"/records/first-five-years/img/logos/logo-spotify.svg"}),(0,je.jsx)("img",{alt:"Lunatech logo",src:"/records/first-five-years/img/logos/logo-lunatech.svg"}),(0,je.jsx)("img",{alt:"Virtuslab logo",src:"/records/first-five-years/img/logos/logo-virtuslab.svg"}),(0,je.jsx)("img",{alt:"Databricks logo",src:"/records/first-five-years/img/logos/logo-databricks.svg"})]})]}),(0,je.jsxs)("div",{className:"members__part",children:[(0,je.jsx)("h3",{className:"members__title ta-i",children:"Affiliate Members"}),(0,je.jsxs)("div",{className:"members__group",children:[(0,je.jsx)("img",{alt:"Swissborg logo",src:"/records/first-five-years/img/logos/logo-swissborg.svg"}),(0,je.jsx)("img",{alt:"Knoldus logo",src:"/records/first-five-years/img/logos/logo-knoldus.svg"})]})]}),(0,je.jsxs)("div",{className:"members__part",children:[(0,je.jsx)("h3",{className:"members__title ta-i",children:"Former Advisory Board Members"}),(0,je.jsxs)("div",{className:"members__group",children:[(0,je.jsx)("img",{alt:"IBM logo",src:"/records/first-five-years/img/logos/logo-ibm.svg"}),(0,je.jsx)("img",{alt:"SAP logo",src:"/records/first-five-years/img/logos/logo-sap.svg"}),(0,je.jsx)("img",{alt:"Tapad logo",src:"/records/first-five-years/img/logos/logo-tapad.svg"}),(0,je.jsx)("img",{alt:"Verizon logo",src:"/records/first-five-years/img/logos/logo-verizon.svg"})]})]})]})},Au=function(e){return(0,je.jsx)("div",{className:"member-entity",children:e.children})},Du=function(e){return(0,je.jsxs)("div",{className:"member-entity__item",children:[(0,je.jsx)("img",{className:"mgb14",alt:e.fullName,src:e.src}),(0,je.jsx)(_u,{className:"ta-c",content:e.fullName})]})};function Lu(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=it(e)););return e}function Ru(){return Ru="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Lu(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},Ru.apply(this,arguments)}function Iu(){}var Fu=function(){var e=0;return function(){return e++}}();function zu(e){return null===e||"undefined"===typeof e}function Vu(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.slice(0,7)&&"Array]"===t.slice(-6)}function Bu(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)}function Wu(e){return("number"===typeof e||e instanceof Number)&&isFinite(+e)}function Uu(e,t){return Wu(e)?e:t}function Hu(e,t){return"undefined"===typeof e?t:e}var $u=function(e,t){return"string"===typeof e&&e.endsWith("%")?parseFloat(e)/100*t:+e};function Yu(e,t,n){if(e&&"function"===typeof e.call)return e.apply(n,t)}function qu(e,t,n,r){var i,a,o;if(Vu(e))if(a=e.length,r)for(i=a-1;i>=0;i--)t.call(n,e[i],i);else for(i=0;il&&u3&&void 0!==arguments[3]?arguments[3]:1e-6;return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Oc(e,t,n){n=n||function(n){return e[n]1;)n(r=a+i>>1)?a=r:i=r;return{lo:a,hi:i}}var Ac=function(e,t,n,r){return Oc(e,n,r?function(r){var i=e[r][t];return i=n}))};var Lc=["push","pop","shift","splice","unshift"];function Rc(e,t){var n=e._chartjs;if(n){var r=n.listeners,i=r.indexOf(t);-1!==i&&r.splice(i,1),r.length>0||(Lc.forEach((function(t){delete e[t]})),delete e._chartjs)}}function Ic(e){var t,n,r=new Set;for(t=0,n=e.length;t=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){return Hc(e)?e:$c(e,.075,.3)},easeOutElastic:function(e){return Hc(e)?e:Yc(e,.075,.3)},easeInOutElastic:function(e){var t=.1125;return Hc(e)?e:e<.5?.5*$c(2*e,t,.45):.5+.5*Yc(2*e-1,t,.45)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-qc.easeOutBounce(1-e)},easeOutBounce:function(e){var t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*qc.easeInBounce(2*e):.5*qc.easeOutBounce(2*e-1)+.5}},Xc=qc;function Kc(e){return e+.5|0}var Gc=function(e,t,n){return Math.max(Math.min(e,n),t)};function Qc(e){return Gc(Kc(2.55*e),0,255)}function Jc(e){return Gc(Kc(255*e),0,255)}function Zc(e){return Gc(Kc(e/2.55)/100,0,1)}function ed(e){return Gc(Kc(100*e),0,100)}var td={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},nd=Ne("0123456789ABCDEF"),rd=function(e){return nd[15&e]},id=function(e){return nd[(240&e)>>4]+nd[15&e]},ad=function(e){return(240&e)>>4===(15&e)};function od(e){var t=function(e){return ad(e.r)&&ad(e.g)&&ad(e.b)&&ad(e.a)}(e)?rd:id;return e?"#"+t(e.r)+t(e.g)+t(e.b)+function(e,t){return e<255?t(e):""}(e.a,t):void 0}var sd=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function ld(e,t,n){var r=t*Math.min(n,1-n),i=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(t+e/30)%12;return n-r*Math.max(Math.min(i-3,9-i,1),-1)};return[i(0),i(8),i(4)]}function ud(e,t,n){var r=function(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(r+e/60)%6;return n-n*t*Math.max(Math.min(i,4-i,1),0)};return[r(5),r(3),r(1)]}function cd(e,t,n){var r,i=ld(e,1,.5);for(t+n>1&&(t*=r=1/(t+n),n*=r),r=0;r<3;r++)i[r]*=1-t-n,i[r]+=t;return i}function dd(e){var t,n,r,i=e.r/255,a=e.g/255,o=e.b/255,s=Math.max(i,a,o),l=Math.min(i,a,o),u=(s+l)/2;return s!==l&&(r=s-l,n=u>.5?r/(2-s-l):r/(s+l),t=function(e,t,n,r,i){return e===i?(t-n)/r+(t>16&255,n>>8&255,255&n]}return a}()).transparent=[0,0,0,0]);var t=md[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:4===t.length?t[3]:255}}var xd=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;var kd=function(e){return e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055},_d=function(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)};function wd(e,t,n){if(e){var r=dd(e);r[t]=Math.max(0,Math.min(r[t]+r[t]*n,0===t?360:1)),r=fd(r),e.r=r[0],e.g=r[1],e.b=r[2]}}function Sd(e,t){return e?Object.assign(t||{},e):e}function jd(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=Jc(e[3]))):(t=Sd(e,{r:0,g:0,b:0,a:1})).a=Jc(t.a),t}function Cd(e){return"r"===e.charAt(0)?function(e){var t,n,r,i=xd.exec(e),a=255;if(i){if(i[7]!==t){var o=+i[7];a=i[8]?Qc(o):Gc(255*o,0,255)}return t=+i[1],n=+i[3],r=+i[5],{r:t=255&(i[2]?Qc(t):Gc(t,0,255)),g:n=255&(i[4]?Qc(n):Gc(n,0,255)),b:r=255&(i[6]?Qc(r):Gc(r,0,255)),a:a}}}(e):vd(e)}var Pd=function(){function e(t){if(et(this,e),t instanceof e)return t;var n,r=typeof t;"object"===r?n=jd(t):"string"===r&&(n=function(e){var t,n=e.length;return"#"===e[0]&&(4===n||5===n?t={r:255&17*td[e[1]],g:255&17*td[e[2]],b:255&17*td[e[3]],a:5===n?17*td[e[4]]:255}:7!==n&&9!==n||(t={r:td[e[1]]<<4|td[e[2]],g:td[e[3]]<<4|td[e[4]],b:td[e[5]]<<4|td[e[6]],a:9===n?td[e[7]]<<4|td[e[8]]:255})),t}(t)||bd(t)||Cd(t)),this._rgb=n,this._valid=!!n}return nt(e,[{key:"valid",get:function(){return this._valid}},{key:"rgb",get:function(){var e=Sd(this._rgb);return e&&(e.a=Zc(e.a)),e},set:function(e){this._rgb=jd(e)}},{key:"rgbString",value:function(){return this._valid?(e=this._rgb)&&(e.a<255?"rgba(".concat(e.r,", ").concat(e.g,", ").concat(e.b,", ").concat(Zc(e.a),")"):"rgb(".concat(e.r,", ").concat(e.g,", ").concat(e.b,")")):void 0;var e}},{key:"hexString",value:function(){return this._valid?od(this._rgb):void 0}},{key:"hslString",value:function(){return this._valid?function(e){if(e){var t=dd(e),n=t[0],r=ed(t[1]),i=ed(t[2]);return e.a<255?"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(Zc(e.a),")"):"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)")}}(this._rgb):void 0}},{key:"mix",value:function(e,t){if(e){var n,r=this.rgb,i=e.rgb,a=t===n?.5:t,o=2*a-1,s=r.a-i.a,l=((o*s===-1?o:(o+s)/(1+o*s))+1)/2;n=1-l,r.r=255&l*r.r+n*i.r+.5,r.g=255&l*r.g+n*i.g+.5,r.b=255&l*r.b+n*i.b+.5,r.a=a*r.a+(1-a)*i.a,this.rgb=r}return this}},{key:"interpolate",value:function(e,t){return e&&(this._rgb=function(e,t,n){var r=_d(Zc(e.r)),i=_d(Zc(e.g)),a=_d(Zc(e.b));return{r:Jc(kd(r+n*(_d(Zc(t.r))-r))),g:Jc(kd(i+n*(_d(Zc(t.g))-i))),b:Jc(kd(a+n*(_d(Zc(t.b))-a))),a:e.a+n*(t.a-e.a)}}(this._rgb,e._rgb,t)),this}},{key:"clone",value:function(){return new e(this.rgb)}},{key:"alpha",value:function(e){return this._rgb.a=Jc(e),this}},{key:"clearer",value:function(e){return this._rgb.a*=1-e,this}},{key:"greyscale",value:function(){var e=this._rgb,t=Kc(.3*e.r+.59*e.g+.11*e.b);return e.r=e.g=e.b=t,this}},{key:"opaquer",value:function(e){return this._rgb.a*=1+e,this}},{key:"negate",value:function(){var e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}},{key:"lighten",value:function(e){return wd(this._rgb,2,e),this}},{key:"darken",value:function(e){return wd(this._rgb,2,-e),this}},{key:"saturate",value:function(e){return wd(this._rgb,1,e),this}},{key:"desaturate",value:function(e){return wd(this._rgb,1,-e),this}},{key:"rotate",value:function(e){return function(e,t){var n=dd(e);n[0]=pd(n[0]+t),n=fd(n),e.r=n[0],e.g=n[1],e.b=n[2]}(this._rgb,e),this}}]),e}();function Ed(e){return new Pd(e)}function Md(e){if(e&&"object"===typeof e){var t=e.toString();return"[object CanvasPattern]"===t||"[object CanvasGradient]"===t}return!1}function Nd(e){return Md(e)?e:Ed(e)}function Td(e){return Md(e)?e:Ed(e).saturate(.5).darken(.1).hexString()}var Od=["x","y","borderWidth","radius","tension"],Ad=["color","borderColor","backgroundColor"];var Dd=new Map;function Ld(e,t,n){return function(e,t){t=t||{};var n=e+JSON.stringify(t),r=Dd.get(n);return r||(r=new Intl.NumberFormat(e,t),Dd.set(n,r)),r}(t,n).format(e)}var Rd={values:function(e){return Vu(e)?e:""+e},numeric:function(e,t,n){if(0===e)return"0";var r,i=this.chart.options.locale,a=e;if(n.length>1){var o=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(o<1e-4||o>1e15)&&(r="scientific"),a=function(e,t){var n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e));return n}(e,n)}var s=mc(Math.abs(a)),l=Math.max(Math.min(-1*Math.floor(s),20),0),u={notation:r,minimumFractionDigits:l,maximumFractionDigits:l};return Object.assign(u,this.options.ticks.format),Ld(e,i,u)},logarithmic:function(e,t,n){if(0===e)return"0";var r=n[t].significand||e/Math.pow(10,Math.floor(mc(e)));return[1,2,3,5,10,15].includes(r)||t>.8*n.length?Rd.numeric.call(this,e,t,n):""}};var Id={formatters:Rd};var Fd=Object.create(null),zd=Object.create(null);function Vd(e,t){if(!t)return e;for(var n=t.split("."),r=0,i=n.length;rr&&(r=a),r}function $d(e,t,n,r){var i=(r=r||{}).data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.save(),e.font=t;var o,s,l,u,c,d=0,h=n.length;for(o=0;on.length){for(o=0;o0&&e.stroke()}}function Gd(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.xt.top-n&&e.y5&&void 0!==arguments[5]?arguments[5]:{},l=Vu(t)?t:[t],u=s.strokeWidth>0&&""!==s.strokeColor;for(e.save(),e.font=i.string,nh(e,s),a=0;a1&&void 0!==arguments[1]?arguments[1]:[""],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return e[0]};ac(i)||(i=Eh("_fallback",e));var o=(bt(t={},Symbol.toStringTag,"Object"),bt(t,"_cacheable",!0),bt(t,"_scopes",e),bt(t,"_rootScopes",r),bt(t,"_fallback",i),bt(t,"_getTarget",a),bt(t,"override",(function(t){return mh([t].concat(Ne(e)),n,r,i)})),t);return new Proxy(o,{deleteProperty:function(t,n){return delete t[n],delete t._keys,delete e[0][n],!0},get:function(t,r){return kh(t,r,(function(){return Ph(r,n,e,t)}))},getOwnPropertyDescriptor:function(e,t){return Reflect.getOwnPropertyDescriptor(e._scopes[0],t)},getPrototypeOf:function(){return Reflect.getPrototypeOf(e[0])},has:function(e,t){return Mh(e).includes(t)},ownKeys:function(e){return Mh(e)},set:function(e,t,n){var r=e._storage||(e._storage=a());return e[t]=r[t]=n,delete e._keys,!0}})}function gh(e,t,n,r){var i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:yh(e,r),setContext:function(t){return gh(e,t,n,r)},override:function(i){return gh(e.override(i),t,n,r)}};return new Proxy(i,{deleteProperty:function(t,n){return delete t[n],delete e[n],!0},get:function(e,t,n){return kh(e,t,(function(){return function(e,t,n){var r=e._proxy,i=e._context,a=e._subProxy,o=e._descriptors,s=r[t];oc(s)&&o.isScriptable(t)&&(s=function(e,t,n,r){var i=n._proxy,a=n._context,o=n._subProxy,s=n._stack;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e),t=t(a,o||r),s.delete(e),xh(e,t)&&(t=jh(i._scopes,i,e,t));return t}(t,s,e,n));Vu(s)&&s.length&&(s=function(e,t,n,r){var i=n._proxy,a=n._context,o=n._subProxy,s=n._descriptors;if(ac(a.index)&&r(e))t=t[a.index%t.length];else if(Bu(t[0])){var l=t,u=i._scopes.filter((function(e){return e!==l}));t=[];var c,d=Qe(l);try{for(d.s();!(c=d.n()).done;){var h=jh(u,i,e,c.value);t.push(gh(h,a,o&&o[e],s))}}catch(f){d.e(f)}finally{d.f()}}return t}(t,s,e,o.isIndexable));xh(t,s)&&(s=gh(s,i,a&&a[t],o));return s}(e,t,n)}))},getOwnPropertyDescriptor:function(t,n){return t._descriptors.allKeys?Reflect.has(e,n)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,n)},getPrototypeOf:function(){return Reflect.getPrototypeOf(e)},has:function(t,n){return Reflect.has(e,n)},ownKeys:function(){return Reflect.ownKeys(e)},set:function(t,n,r){return e[n]=r,delete t[n],!0}})}function yh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{scriptable:!0,indexable:!0},n=e._scriptable,r=void 0===n?t.scriptable:n,i=e._indexable,a=void 0===i?t.indexable:i,o=e._allKeys,s=void 0===o?t.allKeys:o;return{allKeys:s,scriptable:r,indexable:a,isScriptable:oc(r)?r:function(){return r},isIndexable:oc(a)?a:function(){return a}}}var bh=function(e,t){return e?e+ic(t):t},xh=function(e,t){return Bu(t)&&"adapters"!==e&&(null===Object.getPrototypeOf(t)||t.constructor===Object)};function kh(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t))return e[t];var r=n();return e[t]=r,r}function _h(e,t,n){return oc(e)?e(t,n):e}var wh=function(e,t){return!0===e?t:"string"===typeof e?rc(t,e):void 0};function Sh(e,t,n,r,i){var a,o=Qe(t);try{for(o.s();!(a=o.n()).done;){var s=a.value,l=wh(n,s);if(l){e.add(l);var u=_h(l._fallback,n,i);if(ac(u)&&u!==n&&u!==r)return u}else if(!1===l&&ac(r)&&n!==r)return null}}catch(c){o.e(c)}finally{o.f()}return!1}function jh(e,t,n,r){var i=t._rootScopes,a=_h(t._fallback,n,r),o=[].concat(Ne(e),Ne(i)),s=new Set;s.add(r);var l=Ch(s,o,n,a||n,r);return null!==l&&((!ac(a)||a===n||null!==(l=Ch(s,o,a,l,r)))&&mh(Array.from(s),[""],i,a,(function(){return function(e,t,n){var r=e._getTarget();t in r||(r[t]={});var i=r[t];if(Vu(i)&&Bu(n))return n;return i||{}}(t,n,r)})))}function Ch(e,t,n,r,i){for(;n;)n=Sh(e,t,n,r,i);return n}function Ph(e,t,n,r){var i,a,o=Qe(t);try{for(o.s();!(a=o.n()).done;){var s=a.value;if(i=Eh(bh(s,e),n),ac(i))return xh(e,i)?jh(n,r,e,i):i}}catch(l){o.e(l)}finally{o.f()}}function Eh(e,t){var n,r=Qe(t);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i){var a=i[e];if(ac(a))return a}}}catch(o){r.e(o)}finally{r.f()}}function Mh(e){var t=e._keys;return t||(t=e._keys=function(e){var t,n=new Set,r=Qe(e);try{for(r.s();!(t=r.n()).done;){var i,a=t.value,o=Qe(Object.keys(a).filter((function(e){return!e.startsWith("_")})));try{for(o.s();!(i=o.n()).done;){var s=i.value;n.add(s)}}catch(l){o.e(l)}finally{o.f()}}}catch(l){r.e(l)}finally{r.f()}return Array.from(n)}(e._scopes)),t}function Nh(e,t,n,r){var i,a,o,s,l=e.iScale,u=this._parsing.key,c=void 0===u?"r":u,d=new Array(r);for(i=0,a=r;i2&&void 0!==arguments[2]?arguments[2]:"x",o=Ah(a),s=e.length,l=Oh(e,0),u=0;u1&&void 0!==arguments[1]?arguments[1]:"x",a=Ah(i),o=e.length,s=Array(o).fill(0),l=Array(o),u=Oh(e,0);for(t=0;t0||t>0)&&(!n||!n.shadowRoot)}(o,s,e.target))n=o,r=s;else{var u=t.getBoundingClientRect();n=a.clientX-u.left,r=a.clientY-u.top,l=!0}return{x:n,y:r,box:l}}(e,n),u=l.x,c=l.y,d=l.box,h=o.left+(d&&s.left),f=o.top+(d&&s.top),p=t.width,v=t.height;return a&&(p-=o.width+s.width,v-=o.height+s.height),{x:Math.round((u-h)/p*n.width/r),y:Math.round((c-f)/v*n.height/r)}}var Yh=function(e){return Math.round(10*e)/10};function qh(e,t,n,r){var i=Wh(e),a=Hh(i,"margin"),o=Bh(i.maxWidth,e,"clientWidth")||dc,s=Bh(i.maxHeight,e,"clientHeight")||dc,l=function(e,t,n){var r,i;if(void 0===t||void 0===n){var a=Vh(e);if(a){var o=a.getBoundingClientRect(),s=Wh(a),l=Hh(s,"border","width"),u=Hh(s,"padding");t=o.width-u.width-l.width,n=o.height-u.height-l.height,r=Bh(s.maxWidth,a,"clientWidth"),i=Bh(s.maxHeight,a,"clientHeight")}else t=e.clientWidth,n=e.clientHeight}return{width:t,height:n,maxWidth:r||dc,maxHeight:i||dc}}(e,t,n),u=l.width,c=l.height;if("content-box"===i.boxSizing){var d=Hh(i,"border","width"),h=Hh(i,"padding");u-=h.width+d.width,c-=h.height+d.height}return u=Math.max(0,u-a.width),c=Math.max(0,r?Math.floor(u/r):c-a.height),u=Yh(Math.min(u,o,l.maxWidth)),c=Yh(Math.min(c,s,l.maxHeight)),u&&!c&&(c=Yh(u/2)),(void 0!==t||void 0!==n)&&r&&l.height&&c>l.height&&(c=l.height,u=Yh(Math.floor(c*r))),{width:u,height:c}}function Xh(e,t,n){var r=t||1,i=Math.floor(e.height*r),a=Math.floor(e.width*r);e.height=i/r,e.width=a/r;var o=e.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height="".concat(e.height,"px"),o.style.width="".concat(e.width,"px")),(e.currentDevicePixelRatio!==r||o.height!==i||o.width!==a)&&(e.currentDevicePixelRatio=r,o.height=i,o.width=a,e.ctx.setTransform(r,0,0,r,0,0),!0)}var Kh=function(){var e=!1;try{var t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(n){}return e}();function Gh(e,t){var n=function(e,t){return Wh(e).getPropertyValue(t)}(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Qh(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Jh(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:"middle"===r?n<.5?e.y:t.y:"after"===r?n<1?e.y:t.y:n>0?t.y:e.y}}function Zh(e,t,n,r){var i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=Qh(e,i,n),s=Qh(i,a,n),l=Qh(a,t,n),u=Qh(o,s,n),c=Qh(s,l,n);return Qh(u,c,n)}function ef(e,t,n){return e?function(e,t){return{x:function(n){return e+e+t-n},setWidth:function(e){t=e},textAlign:function(e){return"center"===e?e:"right"===e?"left":"right"},xPlus:function(e,t){return e-t},leftForLtr:function(e,t){return e-t}}}(t,n):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}}}function tf(e,t){var n,r;"ltr"!==t&&"rtl"!==t||(r=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function nf(e,t){void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function rf(e){return"angle"===e?{between:Mc,compare:Pc,normalize:Ec}:{between:Tc,compare:function(e,t){return e-t},normalize:function(e){return e}}}function af(e){var t=e.start,n=e.end,r=e.count;return{start:t%r,end:n%r,loop:e.loop&&(n-t+1)%r===0,style:e.style}}function of(e,t,n){if(!n)return[e];for(var r,i,a,o=n.property,s=n.start,l=n.end,u=t.length,c=rf(o),d=c.compare,h=c.between,f=c.normalize,p=function(e,t,n){var r,i,a=n.property,o=n.start,s=n.end,l=rf(a),u=l.between,c=l.normalize,d=t.length,h=e.start,f=e.end,p=e.loop;if(p){for(h+=d,f+=d,r=0,i=d;r0&&void 0!==arguments[0]?arguments[0]:Date.now(),n=0;this._charts.forEach((function(r,i){if(r.running&&r.items.length){for(var a,o=r.items,s=o.length-1,l=!1;s>=0;--s)(a=o[s])._active?(a._total>r.duration&&(r.duration=a._total),a.tick(t),l=!0):(o[s]=o[o.length-1],o.pop());l&&(i.draw(),e._notify(i,r,t,"progress")),o.length||(r.running=!1,e._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}})),this._lastDate=t,0===n&&(this._running=!1)}},{key:"_getAnims",value:function(e){var t=this._charts,n=t.get(e);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},t.set(e,n)),n}},{key:"listen",value:function(e,t,n){this._getAnims(e).listeners[t].push(n)}},{key:"add",value:function(e,t){var n;t&&t.length&&(n=this._getAnims(e).items).push.apply(n,Ne(t))}},{key:"has",value:function(e){return this._getAnims(e).items.length>0}},{key:"start",value:function(e){var t=this._charts.get(e);t&&(t.running=!0,t.start=Date.now(),t.duration=t.items.reduce((function(e,t){return Math.max(e,t._duration)}),0),this._refresh())}},{key:"running",value:function(e){if(!this._running)return!1;var t=this._charts.get(e);return!!(t&&t.running&&t.items.length)}},{key:"stop",value:function(e){var t=this._charts.get(e);if(t&&t.items.length){for(var n=t.items,r=n.length-1;r>=0;--r)n[r].cancel();t.items=[],this._notify(e,t,Date.now(),"complete")}}},{key:"remove",value:function(e){return this._charts.delete(e)}}]),e}(),hf=new df,ff="transparent",pf={boolean:function(e,t,n){return n>.5?t:e},color:function(e,t,n){var r=Nd(e||ff),i=r.valid&&Nd(t||ff);return i&&i.valid?i.mix(r,n).hexString():t},number:function(e,t,n){return e+(t-e)*n}},vf=function(){function e(t,n,r,i){et(this,e);var a=n[r];i=ph([t.to,i,a,t.from]);var o=ph([t.from,a,i]);this._active=!0,this._fn=t.fn||pf[t.type||typeof o],this._easing=Xc[t.easing]||Xc.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}return nt(e,[{key:"active",value:function(){return this._active}},{key:"update",value:function(e,t,n){if(this._active){this._notify(!1);var r=this._target[this._prop],i=n-this._start,a=this._duration-i;this._start=n,this._duration=Math.floor(Math.max(a,e.duration)),this._total+=i,this._loop=!!e.loop,this._to=ph([e.to,t,r,e.from]),this._from=ph([e.from,r,t])}}},{key:"cancel",value:function(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}},{key:"tick",value:function(e){var t,n=e-this._start,r=this._duration,i=this._prop,a=this._from,o=this._loop,s=this._to;if(this._active=a!==s&&(o||n1?2-t:t,t=this._easing(Math.min(1,Math.max(0,t))),this._target[i]=this._fn(a,s,t))}},{key:"wait",value:function(){var e=this._promises||(this._promises=[]);return new Promise((function(t,n){e.push({res:t,rej:n})}))}},{key:"_notify",value:function(e){for(var t=e?"res":"rej",n=this._promises||[],r=0;r=0;--n){var l=o[n];if("$"!==l.charAt(0))if("options"!==l){var u=t[l],c=a[l],d=r.get(l);if(c){if(d&&c.active()){c.update(d,u,s);continue}c.cancel()}d&&d.duration?(a[l]=c=new vf(d,e,l,u),i.push(c)):e[l]=u}else i.push.apply(i,Ne(this._animateOptions(e,t)))}return i}},{key:"update",value:function(e,t){if(0!==this._properties.size){var n=this._createAnimations(e,t);return n.length?(hf.add(this._chart,n),!0):void 0}Object.assign(e,t)}}]),e}();function gf(e,t){var n=e&&e.options||{},r=n.reverse,i=void 0===n.min?t:0,a=void 0===n.max?t:0;return{start:r?a:i,end:r?i:a}}function yf(e,t){var n,r,i=[],a=e._getSortedDatasetMetas(t);for(n=0,r=a.length;n3&&void 0!==arguments[3]?arguments[3]:{},l=e.keys,u="single"===s.mode;if(null!==t){for(r=0,i=l.length;r0||!n&&s<0)return o.index}}catch(l){a.e(l)}finally{a.f()}return null}function wf(e,t){for(var n,r=e.chart,i=e._cachedMeta,a=r._stacks||(r._stacks={}),o=i.iScale,s=i.vScale,l=i.index,u=o.axis,c=s.axis,d=function(e,t,n){return"".concat(e.id,".").concat(t.id,".").concat(n.stack||n.type)}(o,s,i),h=t.length,f=0;f0&&a._parsed[e-1];if(!1===this._parsing)a._parsed=o,a._sorted=!0,i=o;else{i=Vu(o[e])?this.parseArrayData(a,o,e,t):Bu(o[e])?this.parseObjectData(a,o,e,t):this.parsePrimitiveData(a,o,e,t);for(n=0;nt||f=0;--n)if(!p()){this.updateRangeFromParsed(c,e,r,u);break}return c}},{key:"getAllParsedValues",value:function(e){var t,n,r,i=this._cachedMeta._parsed,a=[];for(t=0,n=i.length;t=0&&e1&&void 0!==arguments[1]?arguments[1]:"default",r=arguments.length>2?arguments[2]:void 0,i="active"===n,a=this._cachedDataOpts,o=e+"-"+n,s=a[o],l=this.enableOptionSharing&&ac(r);if(s)return Pf(s,l);var u=this.chart.config,c=u.datasetElementScopeKeys(this._type,e),d=i?["".concat(e,"Hover"),"hover",e,""]:[e,""],h=u.getOptionScopes(this.getDataset(),c),f=Object.keys(Ud.elements[e]),p=function(){return t.getContext(r,i)},v=u.resolveNamedOptions(h,f,p,d);return v.$shared&&(v.$shared=l,a[o]=Object.freeze(Pf(v,l))),v}},{key:"_resolveAnimations",value:function(e,t,n){var r,i=this.chart,a=this._cachedDataOpts,o="animation-".concat(t),s=a[o];if(s)return s;if(!1!==i.options.animation){var l=this.chart.config,u=l.datasetAnimationScopeKeys(this._type,t),c=l.getOptionScopes(this.getDataset(),u);r=l.createResolver(c,this.getContext(e,n,t))}var d=new mf(i,r&&r.animations);return r&&r._cacheable&&(a[o]=Object.freeze(d)),d}},{key:"getSharedOptions",value:function(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}},{key:"includeOptions",value:function(e,t){return!t||Cf(e)||this.chart._animationsDisabled}},{key:"_getSharedOptions",value:function(e,t){var n=this.resolveDataElementOptions(e,t),r=this._sharedOptions,i=this.getSharedOptions(n),a=this.includeOptions(t,i)||i!==r;return this.updateSharedOptions(i,t,n),{sharedOptions:i,includeOptions:a}}},{key:"updateElement",value:function(e,t,n,r){Cf(r)?Object.assign(e,n):this._resolveAnimations(t,r).update(e,n)}},{key:"updateSharedOptions",value:function(e,t,n){e&&!Cf(t)&&this._resolveAnimations(void 0,t).update(e,n)}},{key:"_setStyle",value:function(e,t,n,r){e.active=r;var i=this.getStyle(t,r);this._resolveAnimations(t,n,r).update(e,{options:!r&&this.getSharedOptions(i)||i})}},{key:"removeHoverStyle",value:function(e,t,n){this._setStyle(e,n,"active",!1)}},{key:"setHoverStyle",value:function(e,t,n){this._setStyle(e,n,"active",!0)}},{key:"_removeDatasetHoverStyle",value:function(){var e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}},{key:"_setDatasetHoverStyle",value:function(){var e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}},{key:"_resyncElements",value:function(e){var t,n=this._data,r=this._cachedMeta.data,i=Qe(this._syncList);try{for(i.s();!(t=i.n()).done;){var a=Me(t.value,3),o=a[0],s=a[1],l=a[2];this[o](s,l)}}catch(h){i.e(h)}finally{i.f()}this._syncList=[];var u=r.length,c=n.length,d=Math.min(c,u);d&&this.parse(0,d),c>u?this._insertElements(u,c-u,e):c2&&void 0!==arguments[2])||arguments[2],i=this._cachedMeta,a=i.data,o=e+t,s=function(e){for(e.length+=t,n=e.length-1;n>=o;n--)e[n]=e[n-t]};for(s(a),n=e;nMath.abs(s)&&(l=s,u=o),t[n.axis]=u,t._custom={barStart:l,barEnd:u,start:i,end:a,min:o,max:s}}(e,t,n,r):t[n.axis]=n.parse(e,r),t}function Tf(e,t,n,r){var i,a,o,s,l=e.iScale,u=e.vScale,c=l.getLabels(),d=l===u,h=[];for(i=n,a=n+r;ie.x,n="left",r="right"):(t=e.base=n?1:-1)}(n,i,u)*l,f===u&&(g-=n/2);var y=i.getPixelForDecimal(0),b=i.getPixelForDecimal(1),x=Math.min(y,b),k=Math.max(y,b);t=(g=Math.max(Math.min(g,k),x))+n}if(g===i.getPixelForValue(u)){var _=gc(n)*i.getLineWidthForValue(u)/2;g+=_,n-=_}return{size:n,base:g,head:t,center:t+n/2}}},{key:"_calculateBarIndexPixels",value:function(e,t){var n,r,i=t.scale,a=this.options,o=a.skipNull,s=Hu(a.maxBarThickness,1/0);if(t.grouped){var l=o?this._getStackCount(e):t.stackCount,u="flex"===a.barThickness?function(e,t,n,r){var i=t.pixels,a=i[e],o=e>0?i[e-1]:null,s=e=0;--n)t=Math.max(t,e[n].size(this.resolveDataElementOptions(n))/2);return t>0&&t}},{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=this.chart.data.labels||[],r=t.xScale,i=t.yScale,a=this.getParsed(e),o=r.getLabelForValue(a.x),s=i.getLabelForValue(a.y),l=a._custom;return{label:n[e]||"",value:"("+o+", "+s+(l?", "+l:"")+")"}}},{key:"update",value:function(e){var t=this._cachedMeta.data;this.updateElements(t,0,t.length,e)}},{key:"updateElements",value:function(e,t,n,r){for(var i="reset"===r,a=this._cachedMeta,o=a.iScale,s=a.vScale,l=this._getSharedOptions(t,r),u=l.sharedOptions,c=l.includeOptions,d=o.axis,h=s.axis,f=t;f0&&!isNaN(e)?uc*(Math.abs(e)/t):0}},{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Ld(t._parsed[e],n.options.locale);return{label:r[e]||"",value:i}}},{key:"getMaxBorderWidth",value:function(e){var t,n,r,i,a,o=0,s=this.chart;if(!e)for(t=0,n=s.data.datasets.length;t0&&this.getParsed(t-1),w=0;w=x)j.skip=!0;else{var C=this.getParsed(w),P=zu(C[p]),E=j[f]=o.getPixelForValue(C[f],w),M=j[p]=i||P?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,C,l):C[p],w);j.skip=isNaN(E)||isNaN(M)||P,j.stop=w>0&&Math.abs(C[f]-_[f])>y,g&&(j.parsed=C,j.raw=u.data[w]),h&&(j.options=d||this.resolveDataElementOptions(w,S.active?"active":r)),b||this.updateElement(S,w,j,r),_=C}}}},{key:"getMaxOverflow",value:function(){var e=this._cachedMeta,t=e.dataset,n=t.options&&t.options.borderWidth||0,r=e.data||[];if(!r.length)return n;var i=r[0].size(this.resolveDataElementOptions(0)),a=r[r.length-1].size(this.resolveDataElementOptions(r.length-1));return Math.max(n,i,a)/2}},{key:"draw",value:function(){var e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),Ru(it(n.prototype),"draw",this).call(this)}}]),n}(Ef);bt(Vf,"id","line"),bt(Vf,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),bt(Vf,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});var Bf=function(e){rt(n,e);var t=lt(n);function n(e,r){var i;return et(this,n),(i=t.call(this,e,r)).innerRadius=void 0,i.outerRadius=void 0,i}return nt(n,[{key:"getLabelAndValue",value:function(e){var t=this._cachedMeta,n=this.chart,r=n.data.labels||[],i=Ld(t._parsed[e].r,n.options.locale);return{label:r[e]||"",value:i}}},{key:"parseObjectData",value:function(e,t,n,r){return Nh.bind(this)(e,t,n,r)}},{key:"update",value:function(e){var t=this._cachedMeta.data;this._updateRadius(),this.updateElements(t,0,t.length,e)}},{key:"getMinMax",value:function(){var e=this,t=this._cachedMeta,n={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((function(t,r){var i=e.getParsed(r).r;!isNaN(i)&&e.chart.getDataVisibility(r)&&(in.max&&(n.max=i))})),n}},{key:"_updateRadius",value:function(){var e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top),i=Math.max(r/2,0),a=(i-Math.max(n.cutoutPercentage?i/100*n.cutoutPercentage:1,0))/e.getVisibleDatasetCount();this.outerRadius=i-a*this.index,this.innerRadius=this.outerRadius-a}},{key:"updateElements",value:function(e,t,n,r){var i,a="reset"===r,o=this.chart,s=o.options.animation,l=this._cachedMeta.rScale,u=l.xCenter,c=l.yCenter,d=l.getIndexAngle(0)-.5*lc,h=d,f=360/this.countVisibleElements();for(i=0;i0&&this.getParsed(t-1),k=t;k0&&Math.abs(w[f]-x[f])>y,g&&(S.parsed=w,S.raw=u.data[k]),h&&(S.options=d||this.resolveDataElementOptions(k,_.active?"active":r)),b||this.updateElement(_,k,S,r),x=w}this.updateSharedOptions(d,r,c)}},{key:"getMaxOverflow",value:function(){var e=this._cachedMeta,t=e.data||[];if(!this.options.showLine){for(var n=0,r=t.length-1;r>=0;--r)n=Math.max(n,t[r].size(this.resolveDataElementOptions(r))/2);return n>0&&n}var i=e.dataset,a=i.options&&i.options.borderWidth||0;if(!t.length)return a;var o=t[0].size(this.resolveDataElementOptions(0)),s=t[t.length-1].size(this.resolveDataElementOptions(t.length-1));return Math.max(a,o,s)/2}}]),n}(Ef);bt(Hf,"id","scatter"),bt(Hf,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),bt(Hf,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var $f=Object.freeze({__proto__:null,BarController:If,BubbleController:Ff,DoughnutController:zf,LineController:Vf,PolarAreaController:Bf,PieController:Wf,RadarController:Uf,ScatterController:Hf});function Yf(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}var qf={_date:function(){function e(t){et(this,e),this.options=t||{}}return nt(e,[{key:"init",value:function(){}},{key:"formats",value:function(){return Yf()}},{key:"parse",value:function(){return Yf()}},{key:"format",value:function(){return Yf()}},{key:"add",value:function(){return Yf()}},{key:"diff",value:function(){return Yf()}},{key:"startOf",value:function(){return Yf()}},{key:"endOf",value:function(){return Yf()}}],[{key:"override",value:function(t){Object.assign(e.prototype,t)}}]),e}()};function Xf(e,t,n,r){var i=e.controller,a=e.data,o=e._sorted,s=i._cachedMeta.iScale;if(s&&t===s.axis&&"r"!==t&&o&&a.length){var l=s._reversePixels?Dc:Ac;if(!r)return l(a,t,n);if(i._sharedOptions){var u=a[0],c="function"===typeof u.getRange&&u.getRange(t);if(c){var d=l(a,t,n-c),h=l(a,t,n+c);return{lo:d.lo,hi:h.hi}}}}return{lo:0,hi:a.length-1}}function Kf(e,t,n,r,i){for(var a=e.getSortedVisibleDatasetMetas(),o=n[t],s=0,l=a.length;s0){var l=s[0].datasetIndex,u=e.getDatasetMeta(l).data;s=[];for(var c=0;ci)return function(e,t,n,r){var i,a=0,o=n[0];for(r=Math.ceil(r),i=0;ii)return l}return Math.max(i,1)}(a,t,i);if(o>0){var d,h,f=o>1?Math.round((l-s)/(o-1)):null;for(Lp(t,u,c,zu(f)?0:s-f,s),d=0,h=o-1;ds+l)))return u}function zp(e){return e.drawTicks?e.tickLength:0}function Vp(e,t){if(!e.display)return 0;var n=fh(e.font,t),r=hh(e.padding);return(Vu(e.text)?e.text.length:1)*n.lineHeight+r.height}function Bp(e,t,n){var r=Vc(e);return(n&&"right"!==t||!n&&"right"===t)&&(r=function(e){return"left"===e?"right":"right"===e?"left":e}(r)),r}var Wp=function(e){rt(n,e);var t=lt(n);function n(e){var r;return et(this,n),(r=t.call(this)).id=e.id,r.type=e.type,r.options=void 0,r.ctx=e.ctx,r.chart=e.chart,r.top=void 0,r.bottom=void 0,r.left=void 0,r.right=void 0,r.width=void 0,r.height=void 0,r._margins={left:0,right:0,top:0,bottom:0},r.maxWidth=void 0,r.maxHeight=void 0,r.paddingTop=void 0,r.paddingBottom=void 0,r.paddingLeft=void 0,r.paddingRight=void 0,r.axis=void 0,r.labelRotation=void 0,r.min=void 0,r.max=void 0,r._range=void 0,r.ticks=[],r._gridLineItems=null,r._labelItems=null,r._labelSizes=null,r._length=0,r._maxLength=0,r._longestTextCache={},r._startPixel=void 0,r._endPixel=void 0,r._reversePixels=!1,r._userMax=void 0,r._userMin=void 0,r._suggestedMax=void 0,r._suggestedMin=void 0,r._ticksLength=0,r._borderValue=0,r._cache={},r._dataLimitsCached=!1,r.$context=void 0,r}return nt(n,[{key:"init",value:function(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}},{key:"parse",value:function(e,t){return e}},{key:"getUserBounds",value:function(){var e=this._userMin,t=this._userMax,n=this._suggestedMin,r=this._suggestedMax;return e=Uu(e,Number.POSITIVE_INFINITY),t=Uu(t,Number.NEGATIVE_INFINITY),n=Uu(n,Number.POSITIVE_INFINITY),r=Uu(r,Number.NEGATIVE_INFINITY),{min:Uu(e,n),max:Uu(t,r),minDefined:Wu(e),maxDefined:Wu(t)}}},{key:"getMinMax",value:function(e){var t,n=this.getUserBounds(),r=n.min,i=n.max,a=n.minDefined,o=n.maxDefined;if(a&&o)return{min:r,max:i};for(var s=this.getMatchingVisibleMetas(),l=0,u=s.length;li?i:r,Uu(i=a&&r>i?r:i,r)),max:Uu(i,Uu(r,i))}}},{key:"getPadding",value:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}},{key:"getTicks",value:function(){return this.ticks}},{key:"getLabels",value:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}},{key:"beforeLayout",value:function(){this._cache={},this._dataLimitsCached=!1}},{key:"beforeUpdate",value:function(){Yu(this.options.beforeUpdate,[this])}},{key:"update",value:function(e,t,n){var r=this.options,i=r.beginAtZero,a=r.grace,o=r.ticks,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=t,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(e,t,n){var r=e.min,i=e.max,a=$u(t,(i-r)/2),o=function(e,t){return n&&0===e?0:e+t};return{min:o(r,-Math.abs(a)),max:o(i,a)}}(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();var l=s=s||a<=1||!this.isHorizontal())this.labelRotation=o;else{var u=this._getLabelSizes(),c=u.widest.width,d=u.highest.height,h=Nc(this.chart.width-c,0,this.maxWidth);c+6>(e=r.offset?this.maxWidth/a:h/(a-1))&&(e=h/(a-(r.offset?.5:1)),t=this.maxHeight-zp(r.grid)-i.padding-Vp(r.title,this.chart.options.font),n=Math.sqrt(c*c+d*d),l=wc(Math.min(Math.asin(Nc((u.highest.height+6)/e,-1,1)),Math.asin(Nc(t/n,-1,1))-Math.asin(Nc(d/n,-1,1)))),l=Math.max(o,Math.min(s,l))),this.labelRotation=l}}},{key:"afterCalculateLabelRotation",value:function(){Yu(this.options.afterCalculateLabelRotation,[this])}},{key:"afterAutoSkip",value:function(){}},{key:"beforeFit",value:function(){Yu(this.options.beforeFit,[this])}},{key:"fit",value:function(){var e={width:0,height:0},t=this.chart,n=this.options,r=n.ticks,i=n.title,a=n.grid,o=this._isVisible(),s=this.isHorizontal();if(o){var l=Vp(i,t.options.font);if(s?(e.width=this.maxWidth,e.height=zp(a)+l):(e.height=this.maxHeight,e.width=zp(a)+l),r.display&&this.ticks.length){var u=this._getLabelSizes(),c=u.first,d=u.last,h=u.widest,f=u.highest,p=2*r.padding,v=_c(this.labelRotation),m=Math.cos(v),g=Math.sin(v);if(s){var y=r.mirror?0:g*h.width+m*f.height;e.height=Math.min(this.maxHeight,e.height+y+p)}else{var b=r.mirror?0:m*h.width+g*f.height;e.width=Math.min(this.maxWidth,e.width+b+p)}this._calculatePadding(c,d,g,m)}}this._handleMargins(),s?(this.width=this._length=t.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=t.height-this._margins.top-this._margins.bottom)}},{key:"_calculatePadding",value:function(e,t,n,r){var i=this.options,a=i.ticks,o=a.align,s=a.padding,l=i.position,u=0!==this.labelRotation,c="top"!==l&&"x"===this.axis;if(this.isHorizontal()){var d=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1),f=0,p=0;u?c?(f=r*e.width,p=n*t.height):(f=n*e.height,p=r*t.width):"start"===o?p=t.width:"end"===o?f=e.width:"inner"!==o&&(f=e.width/2,p=t.width/2),this.paddingLeft=Math.max((f-d+s)*this.width/(this.width-d),0),this.paddingRight=Math.max((p-h+s)*this.width/(this.width-h),0)}else{var v=t.height/2,m=e.height/2;"start"===o?(v=0,m=e.height):"end"===o&&(v=t.height,m=0),this.paddingTop=v+s,this.paddingBottom=m+s}}},{key:"_handleMargins",value:function(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}},{key:"afterFit",value:function(){Yu(this.options.afterFit,[this])}},{key:"isHorizontal",value:function(){var e=this.options,t=e.axis,n=e.position;return"top"===n||"bottom"===n||"x"===t}},{key:"isFullSize",value:function(){return this.options.fullSize}},{key:"_convertTicksToLabels",value:function(e){var t,n;for(this.beforeTickToLabelConversion(),this.generateTickLabels(e),t=0,n=e.length;tt){for(n=0;nt.length-1?null:this.getPixelForValue(t[e].value)}},{key:"getPixelForDecimal",value:function(e){this._reversePixels&&(e=1-e);var t=this._startPixel+e*this._length;return Nc(this._alignToPixels?Yd(this.chart,t,0):t,-32768,32767)}},{key:"getDecimalForPixel",value:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t}},{key:"getBasePixel",value:function(){return this.getPixelForValue(this.getBaseValue())}},{key:"getBaseValue",value:function(){var e=this.min,t=this.max;return e<0&&t<0?t:e>0&&t>0?e:0}},{key:"getContext",value:function(e){var t=this.ticks||[];if(e>=0&&eo*r?o/n:s/r:s*r0}},{key:"_computeGridLineItems",value:function(e){var t,n,r,i,a,o,s,l,u,c,d,h,f=this.axis,p=this.chart,v=this.options,m=v.grid,g=v.position,y=v.border,b=m.offset,x=this.isHorizontal(),k=this.ticks.length+(b?1:0),_=zp(m),w=[],S=y.setContext(this.getContext()),j=S.display?S.width:0,C=j/2,P=function(e){return Yd(p,e,j)};if("top"===g)t=P(this.bottom),o=this.bottom-_,l=t-C,c=P(e.top)+C,h=e.bottom;else if("bottom"===g)t=P(this.top),c=e.top,h=P(e.bottom)-C,o=t+C,l=this.top+_;else if("left"===g)t=P(this.right),a=this.right-_,s=t-C,u=P(e.left)+C,d=e.right;else if("right"===g)t=P(this.left),u=e.left,d=P(e.right)-C,a=t+C,s=this.left+_;else if("x"===f){if("center"===g)t=P((e.top+e.bottom)/2+.5);else if(Bu(g)){var E=Object.keys(g)[0],M=g[E];t=P(this.chart.scales[E].getPixelForValue(M))}c=e.top,h=e.bottom,l=(o=t+C)+_}else if("y"===f){if("center"===g)t=P((e.left+e.right)/2);else if(Bu(g)){var N=Object.keys(g)[0],T=g[N];t=P(this.chart.scales[N].getPixelForValue(T))}s=(a=t-C)-_,u=e.left,d=e.right}var O=Hu(v.ticks.maxTicksLimit,k),A=Math.max(1,Math.ceil(k/O));for(n=0;n=0?t.setContext(this.getContext(n)).lineWidth:0}},{key:"drawGrid",value:function(e){var t,n,r=this.options.grid,i=this.ctx,a=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e)),o=function(e,t,n){n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(e.x,e.y),i.lineTo(t.x,t.y),i.stroke(),i.restore())};if(r.display)for(t=0,n=a.length;t1&&Gp(e[0].toLowerCase(),t))return e;throw new Error("Cannot determine type of '".concat(name,"' axis. Please provide 'axis' or 'position' option."))}function Qp(e){var t=e.options||(e.options={});t.plugins=Hu(t.plugins,{}),t.scales=function(e,t){var n=Fd[e.type]||{scales:{}},r=t.scales||{},i=Kp(e.type,t),a=Object.create(null);return Object.keys(r).forEach((function(e){var t=r[e];if(!Bu(t))return console.error("Invalid scale configuration for scale: ".concat(e));if(t._proxy)return console.warn("Ignoring resolver passed as options for scale: ".concat(e));var o=Gp(e,t),s=function(e,t){return e===t?"_index_":"_value_"}(o,i),l=n.scales||{};a[e]=Zu(Object.create(null),[{axis:o},t,l[o],l[s]])})),e.data.datasets.forEach((function(n){var i=n.type||e.type,o=n.indexAxis||Kp(i,t),s=(Fd[i]||{}).scales||{};Object.keys(s).forEach((function(e){var t=function(e,t){var n=e;return"_index_"===e?n=t:"_value_"===e&&(n="x"===t?"y":"x"),n}(e,o),i=n[t+"AxisID"]||t;a[i]=a[i]||Object.create(null),Zu(a[i],[{axis:t},r[i],s[e]])}))})),Object.keys(a).forEach((function(e){var t=a[e];Zu(t,[Ud.scales[t.type],Ud.scale])})),a}(e,t)}function Jp(e){return(e=e||{}).datasets=e.datasets||[],e.labels=e.labels||[],e}var Zp=new Map,ev=new Set;function tv(e,t){var n=Zp.get(e);return n||(n=t(),Zp.set(e,n),ev.add(n)),n}var nv=function(e,t,n){var r=rc(t,n);void 0!==r&&e.add(r)},rv=function(){function e(t){et(this,e),this._config=function(e){return(e=e||{}).data=Jp(e.data),Qp(e),e}(t),this._scopeCache=new Map,this._resolverCache=new Map}return nt(e,[{key:"platform",get:function(){return this._config.platform}},{key:"type",get:function(){return this._config.type},set:function(e){this._config.type=e}},{key:"data",get:function(){return this._config.data},set:function(e){this._config.data=Jp(e)}},{key:"options",get:function(){return this._config.options},set:function(e){this._config.options=e}},{key:"plugins",get:function(){return this._config.plugins}},{key:"update",value:function(){var e=this._config;this.clearCache(),Qp(e)}},{key:"clearCache",value:function(){this._scopeCache.clear(),this._resolverCache.clear()}},{key:"datasetScopeKeys",value:function(e){return tv(e,(function(){return[["datasets.".concat(e),""]]}))}},{key:"datasetAnimationScopeKeys",value:function(e,t){return tv("".concat(e,".transition.").concat(t),(function(){return[["datasets.".concat(e,".transitions.").concat(t),"transitions.".concat(t)],["datasets.".concat(e),""]]}))}},{key:"datasetElementScopeKeys",value:function(e,t){return tv("".concat(e,"-").concat(t),(function(){return[["datasets.".concat(e,".elements.").concat(t),"datasets.".concat(e),"elements.".concat(t),""]]}))}},{key:"pluginScopeKeys",value:function(e){var t=e.id,n=this.type;return tv("".concat(n,"-plugin-").concat(t),(function(){return[["plugins.".concat(t)].concat(Ne(e.additionalOptionScopes||[]))]}))}},{key:"_cachedScopes",value:function(e,t){var n=this._scopeCache,r=n.get(e);return r&&!t||(r=new Map,n.set(e,r)),r}},{key:"getOptionScopes",value:function(e,t,n){var r=this.options,i=this.type,a=this._cachedScopes(e,n),o=a.get(t);if(o)return o;var s=new Set;t.forEach((function(t){e&&(s.add(e),t.forEach((function(t){return nv(s,e,t)}))),t.forEach((function(e){return nv(s,r,e)})),t.forEach((function(e){return nv(s,Fd[i]||{},e)})),t.forEach((function(e){return nv(s,Ud,e)})),t.forEach((function(e){return nv(s,zd,e)}))}));var l=Array.from(s);return 0===l.length&&l.push(Object.create(null)),ev.has(t)&&a.set(t,l),l}},{key:"chartOptionScopes",value:function(){var e=this.options,t=this.type;return[e,Fd[t]||{},Ud.datasets[t]||{},{type:t},Ud,zd]}},{key:"resolveNamedOptions",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[""],i={$shared:!0},a=iv(this._resolverCache,e,r),o=a.resolver,s=a.subPrefixes,l=o;if(ov(o,t)){i.$shared=!1,n=oc(n)?n():n;var u=this.createResolver(e,n,s);l=gh(o,n,u)}var c,d=Qe(t);try{for(d.s();!(c=d.n()).done;){var h=c.value;i[h]=l[h]}}catch(f){d.e(f)}finally{d.f()}return i}},{key:"createResolver",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[""],r=arguments.length>3?arguments[3]:void 0,i=iv(this._resolverCache,e,n),a=i.resolver;return Bu(t)?gh(a,t,void 0,r):a}}]),e}();function iv(e,t,n){var r=e.get(t);r||(r=new Map,e.set(t,r));var i=n.join(),a=r.get(i);a||(a={resolver:mh(t,n),subPrefixes:n.filter((function(e){return!e.toLowerCase().includes("hover")}))},r.set(i,a));return a}var av=function(e){return Bu(e)&&Object.getOwnPropertyNames(e).reduce((function(t,n){return t||oc(e[n])}),!1)};function ov(e,t){var n,r=yh(e),i=r.isScriptable,a=r.isIndexable,o=Qe(t);try{for(o.s();!(n=o.n()).done;){var s=n.value,l=i(s),u=a(s),c=(u||l)&&e[s];if(l&&(oc(c)||av(c))||u&&Vu(c))return!0}}catch(d){o.e(d)}finally{o.f()}return!1}var sv=["top","bottom","left","right","chartArea"];function lv(e,t){return"top"===e||"bottom"===e||-1===sv.indexOf(e)&&"x"===t}function uv(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function cv(e){var t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),Yu(n&&n.onComplete,[e],t)}function dv(e){var t=e.chart,n=t.options.animation;Yu(n&&n.onProgress,[e],t)}function hv(e){return zh()&&"string"===typeof e?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}var fv={},pv=function(e){var t=hv(e);return Object.values(fv).filter((function(e){return e.canvas===t})).pop()};function vv(e,t,n){for(var r=0,i=Object.keys(e);r=t){var s=e[a];delete e[a],(n>0||o>t)&&(e[o+n]=s)}}}var mv=function(){function e(t,n){var r=this;et(this,e);var i=this.config=new rv(n),a=hv(t),o=pv(a);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");var s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(e){return!zh()||"undefined"!==typeof OffscreenCanvas&&e instanceof OffscreenCanvas?yp:Op}(a)),this.platform.updateConfig(i);var l=this.platform.acquireContext(a,s.aspectRatio),u=l&&l.canvas,c=u&&u.height,d=u&&u.width;this.id=Fu(),this.ctx=l,this.canvas=u,this.width=d,this.height=c,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Yp,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(e,t){var n;return function(){for(var r=arguments.length,i=new Array(r),a=0;at){for(var r=t;rn.length&&delete this._stacks,t.forEach((function(t,r){0===n.filter((function(e){return e===t._dataset})).length&&e._destroyDatasetMeta(r)}))}},{key:"buildOrUpdateControllers",value:function(){var e,t,n=[],r=this.data.datasets;for(this._removeUnreferencedMetasets(),e=0,t=r.length;e=0;--t)this._drawDataset(e[t]);this.notifyPlugins("afterDatasetsDraw")}}},{key:"_drawDataset",value:function(e){var t=this.ctx,n=e._clip,r=!n.disabled,i=function(e){var t=e.xScale,n=e.yScale;if(t&&n)return{left:t.left,right:t.right,top:n.top,bottom:n.bottom}}(e)||this.chartArea,a={meta:e,index:e.index,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetDraw",a)&&(r&&Qd(t,{left:!1===n.left?0:i.left-n.left,right:!1===n.right?this.width:i.right+n.right,top:!1===n.top?0:i.top-n.top,bottom:!1===n.bottom?this.height:i.bottom+n.bottom}),e.controller.draw(),r&&Jd(t),a.cancelable=!1,this.notifyPlugins("afterDatasetDraw",a))}},{key:"isPointInArea",value:function(e){return Gd(e,this.chartArea,this._minPadding)}},{key:"getElementsAtEventForMode",value:function(e,t,n,r){var i=ep.modes[t];return"function"===typeof i?i(this,e,n,r):[]}},{key:"getDatasetMeta",value:function(e){var t=this.data.datasets[e],n=this._metasets,r=n.filter((function(e){return e&&e._dataset===t})).pop();return r||(r={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t&&t.order||0,index:e,_dataset:t,_parsed:[],_sorted:!1},n.push(r)),r}},{key:"getContext",value:function(){return this.$context||(this.$context=vh(null,{chart:this,type:"chart"}))}},{key:"getVisibleDatasetCount",value:function(){return this.getSortedVisibleDatasetMetas().length}},{key:"isDatasetVisible",value:function(e){var t=this.data.datasets[e];if(!t)return!1;var n=this.getDatasetMeta(e);return"boolean"===typeof n.hidden?!n.hidden:!t.hidden}},{key:"setDatasetVisibility",value:function(e,t){this.getDatasetMeta(e).hidden=!t}},{key:"toggleDataVisibility",value:function(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}},{key:"getDataVisibility",value:function(e){return!this._hiddenIndices[e]}},{key:"_updateVisibility",value:function(e,t,n){var r=n?"show":"hide",i=this.getDatasetMeta(e),a=i.controller._resolveAnimations(void 0,r);ac(t)?(i.data[t].hidden=!n,this.update()):(this.setDatasetVisibility(e,n),a.update(i,{visible:n}),this.update((function(t){return t.datasetIndex===e?r:void 0})))}},{key:"hide",value:function(e,t){this._updateVisibility(e,t,!1)}},{key:"show",value:function(e,t){this._updateVisibility(e,t,!0)}},{key:"_destroyDatasetMeta",value:function(e){var t=this._metasets[e];t&&t.controller&&t.controller._destroy(),delete this._metasets[e]}},{key:"_stop",value:function(){var e,t;for(this.stop(),hf.remove(this),e=0,t=this.data.datasets.length;e0?c+r+n+u:0,f=0,p=i-l;if(r){var v=((c>0?c-r:0)+(d>0?d-r:0))/2;f=(p-(0!==v?p*v/(v+r):p))/2}var m=(p-Math.max(.001,p*d-n/lc)/d)/2,g=l+m+f,y=i-m-f,b=bv(t,h,d,y-g),x=b.outerStart,k=b.outerEnd,_=b.innerStart,w=b.innerEnd,S=d-x,j=d-k,C=g+x/S,P=y-k/j,E=h+_,M=h+w,N=g+_/E,T=y-w/M;if(e.beginPath(),a){var O=(C+P)/2;if(e.arc(o,s,d,C,O),e.arc(o,s,d,O,P),k>0){var A=xv(j,P,o,s);e.arc(A.x,A.y,k,P,y+fc)}var D=xv(M,y,o,s);if(e.lineTo(D.x,D.y),w>0){var L=xv(M,T,o,s);e.arc(L.x,L.y,w,y+fc,T+Math.PI)}var R=(y-w/h+(g+_/h))/2;if(e.arc(o,s,h,y-w/h,R,!0),e.arc(o,s,h,R,g+_/h,!0),_>0){var I=xv(E,N,o,s);e.arc(I.x,I.y,_,N+Math.PI,g-fc)}var F=xv(S,g,o,s);if(e.lineTo(F.x,F.y),x>0){var z=xv(S,C,o,s);e.arc(z.x,z.y,x,g-fc,C)}}else{e.moveTo(o,s);var V=Math.cos(C)*d+o,B=Math.sin(C)*d+s;e.lineTo(V,B);var W=Math.cos(P)*d+o,U=Math.sin(P)*d+s;e.lineTo(W,U)}e.closePath()}function _v(e,t,n,r,i){var a=t.fullCircles,o=t.startAngle,s=t.circumference,l=t.options,u=l.borderWidth,c=l.borderJoinStyle,d="inner"===l.borderAlign;if(u){d?(e.lineWidth=2*u,e.lineJoin=c||"round"):(e.lineWidth=u,e.lineJoin=c||"bevel");var h=t.endAngle;if(a){kv(e,t,n,r,h,i);for(var f=0;fi?(u=i/l,e.arc(a,o,l,n+u,r-u,!0)):e.arc(a,o,i,n+fc,r-fc),e.closePath(),e.clip()}(e,t,h),a||(kv(e,t,n,r,h,i),e.stroke())}}var wv=function(e){rt(n,e);var t=lt(n);function n(e){var r;return et(this,n),(r=t.call(this)).options=void 0,r.circumference=void 0,r.startAngle=void 0,r.endAngle=void 0,r.innerRadius=void 0,r.outerRadius=void 0,r.pixelMargin=0,r.fullCircles=0,e&&Object.assign(ot(r),e),r}return nt(n,[{key:"inRange",value:function(e,t,n){var r=jc(this.getProps(["x","y"],n),{x:e,y:t}),i=r.angle,a=r.distance,o=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),s=o.startAngle,l=o.endAngle,u=o.innerRadius,c=o.outerRadius,d=o.circumference,h=this.options.spacing/2,f=Hu(d,l-s)>=uc||Mc(i,s,l),p=Tc(a,u+h,c+h);return f&&p}},{key:"getCenterPoint",value:function(e){var t=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius","circumference"],e),n=t.x,r=t.y,i=t.startAngle,a=t.endAngle,o=t.innerRadius,s=t.outerRadius,l=this.options,u=l.offset,c=(i+a)/2,d=(o+s+l.spacing+u)/2;return{x:n+Math.cos(c)*d,y:r+Math.sin(c)*d}}},{key:"tooltipPosition",value:function(e){return this.getCenterPoint(e)}},{key:"draw",value:function(e){var t=this.options,n=this.circumference,r=(t.offset||0)/4,i=(t.spacing||0)/2,a=t.circular;if(this.pixelMargin="inner"===t.borderAlign?.33:0,this.fullCircles=n>uc?Math.floor(n/uc):0,!(0===n||this.innerRadius<0||this.outerRadius<0)){e.save();var o=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(o)*r,Math.sin(o)*r);var s=r*(1-Math.sin(Math.min(lc,n||0)));e.fillStyle=t.backgroundColor,e.strokeStyle=t.borderColor,function(e,t,n,r,i){var a=t.fullCircles,o=t.startAngle,s=t.circumference,l=t.endAngle;if(a){kv(e,t,n,r,l,i);for(var u=0;u2&&void 0!==arguments[2]?arguments[2]:t;e.lineCap=Hu(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Hu(n.borderDash,t.borderDash)),e.lineDashOffset=Hu(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Hu(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Hu(n.borderWidth,t.borderWidth),e.strokeStyle=Hu(n.borderColor,t.borderColor)}function jv(e,t,n){e.lineTo(n.x,n.y)}function Cv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.length,i=n.start,a=void 0===i?0:i,o=n.end,s=void 0===o?r-1:o,l=t.start,u=t.end,c=Math.max(a,l),d=Math.min(s,u),h=a