//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//
//       LottieGen version:
//           8.1.240821.1+077322fa26
//       
//       Command:
//           LottieGen -Language CSharp -Public -WinUIVersion 3.0 -InputFile Sidebar.json
//       
//       Input file:
//           Sidebar.json (60015 bytes created 16:27+02:00 Dec 16 2024)
//       
//       LottieGen source:
//           http://aka.ms/Lottie
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
// ____________________________________
// |       Object stats       | Count |
// |__________________________|_______|
// | All CompositionObjects   |    42 |
// |--------------------------+-------|
// | Expression animators     |     9 |
// | KeyFrame animators       |     5 |
// | Reference parameters     |     5 |
// | Expression operations    |     0 |
// |--------------------------+-------|
// | Animated brushes         |     - |
// | Animated gradient stops  |     - |
// | ExpressionAnimations     |     1 |
// | PathKeyFrameAnimations   |     1 |
// |--------------------------+-------|
// | ContainerVisuals         |     1 |
// | ShapeVisuals             |     1 |
// |--------------------------+-------|
// | ContainerShapes          |     - |
// | CompositionSpriteShapes  |     3 |
// |--------------------------+-------|
// | Brushes                  |     3 |
// | Gradient stops           |     - |
// | CompositionVisualSurface |     - |
// ------------------------------------
using Microsoft.Graphics;
using Microsoft.Graphics.Canvas.Geometry;
using Microsoft.UI.Composition;
using System;
using System.Collections.Generic;
using System.Numerics;
using Windows.UI;

namespace AnimatedVisuals
{
    // Name:        bursts
    // Frame rate:  24 fps
    // Frame count: 28
    // Duration:    1166.7 mS
    // _____________________________________________________________________________________________
    // |           Marker           |           Constant           | Frame |   mS   |   Progress   |
    // |____________________________|______________________________|_______|________|______________|
    // | NormalToPressed_Start      | M_NormalToPressed_Start      |     0 |    0.0 | 0F           |
    // | NormalToPressed_End        | M_NormalToPressed_End        |     9 |  375.0 | 0.323214293F |
    // | PointerOverToPressed_Start | M_PointerOverToPressed_Start |     9 |  375.0 | 0.323214293F |
    // | PointerOverToPressed_End   | M_PointerOverToPressed_End   |    19 |  791.7 | 0.680357158F |
    // | PressedToNormal_Start      | M_PressedToNormal_Start      |    20 |  833.3 | 0.716071427F |
    // | PressedToNormal_End        | M_PressedToNormal_End        |    28 | 1166.7 | 1F           |
    // | PressedToPointerOver_Start | M_PressedToPointerOver_Start |    28 | 1166.7 | 1F           |
    // | PressedToPointerOver_End   | M_PressedToPointerOver_End   |    28 | 1166.7 | 1F           |
    // ---------------------------------------------------------------------------------------------
    sealed partial class Sidebar
        : Microsoft.UI.Xaml.Controls.IAnimatedVisualSource
        , Microsoft.UI.Xaml.Controls.IAnimatedVisualSource2
    {
        // Animation duration: 1.167 seconds.
        internal const long c_durationTicks = 11666666;

        // Marker: NormalToPressed_Start.
        internal const float M_NormalToPressed_Start = 0F;

        // Marker: NormalToPressed_End.
        internal const float M_NormalToPressed_End = 0.323214293F;

        // Marker: PointerOverToPressed_Start.
        internal const float M_PointerOverToPressed_Start = 0.323214293F;

        // Marker: PointerOverToPressed_End.
        internal const float M_PointerOverToPressed_End = 0.680357158F;

        // Marker: PressedToNormal_Start.
        internal const float M_PressedToNormal_Start = 0.716071427F;

        // Marker: PressedToNormal_End.
        internal const float M_PressedToNormal_End = 1F;

        // Marker: PressedToPointerOver_Start.
        internal const float M_PressedToPointerOver_Start = 1F;

        // Marker: PressedToPointerOver_End.
        internal const float M_PressedToPointerOver_End = 1F;

        public Microsoft.UI.Xaml.Controls.IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor)
        {
            object ignored = null;
            return TryCreateAnimatedVisual(compositor, out ignored);
        }

        public Microsoft.UI.Xaml.Controls.IAnimatedVisual TryCreateAnimatedVisual(Compositor compositor, out object diagnostics)
        {
            diagnostics = null;

            var res =
                new Sidebar_AnimatedVisual(
                    compositor
                    );
            res.CreateAnimations();
            return res;
        }

        /// <summary>
        /// Gets the number of frames in the animation.
        /// </summary>
        public double FrameCount => 28d;

        /// <summary>
        /// Gets the frame rate of the animation.
        /// </summary>
        public double Framerate => 24d;

        /// <summary>
        /// Gets the duration of the animation.
        /// </summary>
        public TimeSpan Duration => TimeSpan.FromTicks(11666666);

        /// <summary>
        /// Converts a zero-based frame number to the corresponding progress value denoting the
        /// start of the frame.
        /// </summary>
        public double FrameToProgress(double frameNumber)
        {
            return frameNumber / 28d;
        }

        /// <summary>
        /// Returns a map from marker names to corresponding progress values.
        /// </summary>
        public IReadOnlyDictionary<string, double> Markers =>
            new Dictionary<string, double>
            {
                { "NormalToPressed_Start", 0d },
                { "NormalToPressed_End", 0.323214285714286 },
                { "PointerOverToPressed_Start", 0.323214285714286 },
                { "PointerOverToPressed_End", 0.680357142857143 },
                { "PressedToNormal_Start", 0.716071428571429 },
                { "PressedToNormal_End", 1d },
                { "PressedToPointerOver_Start", 1d },
                { "PressedToPointerOver_End", 1d },
            };

        /// <summary>
        /// Sets the color property with the given name, or does nothing if no such property
        /// exists.
        /// </summary>
        public void SetColorProperty(string propertyName, Color value)
        {
        }

        /// <summary>
        /// Sets the scalar property with the given name, or does nothing if no such property
        /// exists.
        /// </summary>
        public void SetScalarProperty(string propertyName, double value)
        {
        }

        sealed partial class Sidebar_AnimatedVisual
            : Microsoft.UI.Xaml.Controls.IAnimatedVisual
            , Microsoft.UI.Xaml.Controls.IAnimatedVisual2
        {
            const long c_durationTicks = 11666666;
            readonly Compositor _c;
            readonly ExpressionAnimation _reusableExpressionAnimation;
            AnimationController _animationController_0;
            CompositionPath _path;
            CompositionPathGeometry _pathGeometry_0;
            CompositionPathGeometry _pathGeometry_1;
            CompositionSpriteShape _spriteShape_0;
            CompositionSpriteShape _spriteShape_2;
            ContainerVisual _root;
            CubicBezierEasingFunction _cubicBezierEasingFunction_0;
            StepEasingFunction _holdThenStepEasingFunction;
            StepEasingFunction _stepThenHoldEasingFunction;

            void BindProperty(
                CompositionObject target,
                string animatedPropertyName,
                string expression,
                string referenceParameterName,
                CompositionObject referencedObject)
            {
                _reusableExpressionAnimation.ClearAllParameters();
                _reusableExpressionAnimation.Expression = expression;
                _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject);
                target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation);
            }

            PathKeyFrameAnimation CreatePathKeyFrameAnimation(float initialProgress, CompositionPath initialValue, CompositionEasingFunction initialEasingFunction)
            {
                var result = _c.CreatePathKeyFrameAnimation();
                result.Duration = TimeSpan.FromTicks(c_durationTicks);
                result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
                return result;
            }

            ScalarKeyFrameAnimation CreateScalarKeyFrameAnimation(float initialProgress, float initialValue, CompositionEasingFunction initialEasingFunction)
            {
                var result = _c.CreateScalarKeyFrameAnimation();
                result.Duration = TimeSpan.FromTicks(c_durationTicks);
                result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
                return result;
            }

            Vector2KeyFrameAnimation CreateVector2KeyFrameAnimation(float initialProgress, Vector2 initialValue, CompositionEasingFunction initialEasingFunction)
            {
                var result = _c.CreateVector2KeyFrameAnimation();
                result.Duration = TimeSpan.FromTicks(c_durationTicks);
                result.InsertKeyFrame(initialProgress, initialValue, initialEasingFunction);
                return result;
            }

            CompositionSpriteShape CreateSpriteShape(CompositionGeometry geometry, Matrix3x2 transformMatrix, CompositionBrush fillBrush)
            {
                var result = _c.CreateSpriteShape(geometry);
                result.TransformMatrix = transformMatrix;
                result.FillBrush = fillBrush;
                return result;
            }

            AnimationController AnimationController_0()
            {
                if (_animationController_0 != null) { return _animationController_0; }
                var result = _animationController_0 = _c.CreateAnimationController();
                result.Pause();
                BindProperty(_animationController_0, "Progress", "_.Progress", "_", _root);
                return result;
            }

            CanvasGeometry Geometry_0()
            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.SetFilledRegionDetermination(CanvasFilledRegionDetermination.Winding);
                    builder.BeginFigure(new Vector2(-12.3269997F, -6.2329998F));
                    builder.AddLine(new Vector2(11.6730003F, -14.5410004F));
                    builder.AddCubicBezier(new Vector2(12.3219995F, -14.7650003F), new Vector2(13F, -14.283F), new Vector2(13F, -13.5959997F));
                    builder.AddLine(new Vector2(13F, 5.28800011F));
                    builder.AddCubicBezier(new Vector2(13F, 5.71400023F), new Vector2(12.7299995F, 6.09399986F), new Vector2(12.3269997F, 6.2329998F));
                    builder.AddLine(new Vector2(-11.6730003F, 14.5410004F));
                    builder.AddCubicBezier(new Vector2(-12.3219995F, 14.7650003F), new Vector2(-13F, 14.283F), new Vector2(-13F, 13.5959997F));
                    builder.AddLine(new Vector2(-13F, -5.28800011F));
                    builder.AddCubicBezier(new Vector2(-13F, -5.71400023F), new Vector2(-12.7299995F, -6.09399986F), new Vector2(-12.3269997F, -6.2329998F));
                    builder.EndFigure(CanvasFigureLoop.Closed);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

            CanvasGeometry Geometry_1()
            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.SetFilledRegionDetermination(CanvasFilledRegionDetermination.Winding);
                    builder.BeginFigure(new Vector2(-12.3269997F, -6.2329998F));
                    builder.AddCubicBezier(new Vector2(-12.3269997F, -6.2329998F), new Vector2(11.6730003F, -14.5410004F), new Vector2(11.6730003F, -14.5410004F));
                    builder.AddCubicBezier(new Vector2(12.3219995F, -14.7650003F), new Vector2(13F, -14.283F), new Vector2(13F, -13.5959997F));
                    builder.AddCubicBezier(new Vector2(13F, -13.5959997F), new Vector2(13F, 5.28800011F), new Vector2(13F, 5.28800011F));
                    builder.AddCubicBezier(new Vector2(13F, 5.71400023F), new Vector2(12.7299995F, 6.09399986F), new Vector2(12.3269997F, 6.2329998F));
                    builder.AddCubicBezier(new Vector2(12.3269997F, 6.2329998F), new Vector2(-11.6730003F, 14.5410004F), new Vector2(-11.6730003F, 14.5410004F));
                    builder.AddCubicBezier(new Vector2(-12.3219995F, 14.7650003F), new Vector2(-13F, 14.283F), new Vector2(-13F, 13.5959997F));
                    builder.AddCubicBezier(new Vector2(-13F, 13.5959997F), new Vector2(-13F, -5.28800011F), new Vector2(-13F, -5.28800011F));
                    builder.AddCubicBezier(new Vector2(-13F, -5.71400023F), new Vector2(-12.7299995F, -6.09399986F), new Vector2(-12.3269997F, -6.2329998F));
                    builder.EndFigure(CanvasFigureLoop.Closed);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

            // - - - - Layer aggregator
            // - - -  Scale:4,4, Offset:<96, 92>
            // - Path
            CanvasGeometry Geometry_2()
            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.SetFilledRegionDetermination(CanvasFilledRegionDetermination.Winding);
                    builder.BeginFigure(new Vector2(-11.0769997F, -5.1079998F));
                    builder.AddCubicBezier(new Vector2(-11.0769997F, -5.1079998F), new Vector2(10.0480003F, -12.2910004F), new Vector2(10.0480003F, -12.2910004F));
                    builder.AddCubicBezier(new Vector2(10.6969995F, -12.5150003F), new Vector2(11.375F, -12.033F), new Vector2(11.375F, -11.3459997F));
                    builder.AddCubicBezier(new Vector2(11.375F, -11.3459997F), new Vector2(11.375F, 3.78800011F), new Vector2(11.375F, 3.78800011F));
                    builder.AddCubicBezier(new Vector2(11.375F, 4.21400023F), new Vector2(11.1049995F, 4.59399986F), new Vector2(10.7019997F, 4.7329998F));
                    builder.AddCubicBezier(new Vector2(10.7019997F, 4.7329998F), new Vector2(-10.4230003F, 11.9160004F), new Vector2(-10.4230003F, 11.9160004F));
                    builder.AddCubicBezier(new Vector2(-11.0719995F, 12.1400003F), new Vector2(-11.75F, 11.658F), new Vector2(-11.75F, 10.9709997F));
                    builder.AddCubicBezier(new Vector2(-11.75F, 10.9709997F), new Vector2(-11.75F, -4.16300011F), new Vector2(-11.75F, -4.16300011F));
                    builder.AddCubicBezier(new Vector2(-11.75F, -4.58900023F), new Vector2(-11.4799995F, -4.96899986F), new Vector2(-11.0769997F, -5.1079998F));
                    builder.EndFigure(CanvasFigureLoop.Closed);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

            // - - - - Layer aggregator
            // - - -  Scale:4,4, Offset:<96, 92>
            // - Path
            CanvasGeometry Geometry_3()
            {
                CanvasGeometry result;
                using (var builder = new CanvasPathBuilder(null))
                {
                    builder.SetFilledRegionDetermination(CanvasFilledRegionDetermination.Winding);
                    builder.BeginFigure(new Vector2(-14.3269997F, -8.8579998F));
                    builder.AddCubicBezier(new Vector2(-14.3269997F, -8.8579998F), new Vector2(12.6730003F, -18.2910004F), new Vector2(12.6730003F, -18.2910004F));
                    builder.AddCubicBezier(new Vector2(13.3219995F, -18.5149994F), new Vector2(14F, -18.0330009F), new Vector2(14F, -17.3460007F));
                    builder.AddCubicBezier(new Vector2(14F, -17.3460007F), new Vector2(14F, 6.03800011F), new Vector2(14F, 6.03800011F));
                    builder.AddCubicBezier(new Vector2(14F, 6.46400023F), new Vector2(13.7299995F, 6.84399986F), new Vector2(13.3269997F, 6.9829998F));
                    builder.AddCubicBezier(new Vector2(13.3269997F, 6.9829998F), new Vector2(-13.6730003F, 16.4160004F), new Vector2(-13.6730003F, 16.4160004F));
                    builder.AddCubicBezier(new Vector2(-14.3219995F, 16.6399994F), new Vector2(-15F, 16.1580009F), new Vector2(-15F, 15.4709997F));
                    builder.AddCubicBezier(new Vector2(-15F, 15.4709997F), new Vector2(-15F, -7.91300011F), new Vector2(-15F, -7.91300011F));
                    builder.AddCubicBezier(new Vector2(-15F, -8.33899975F), new Vector2(-14.7299995F, -8.71899986F), new Vector2(-14.3269997F, -8.8579998F));
                    builder.EndFigure(CanvasFigureLoop.Closed);
                    result = CanvasGeometry.CreatePath(builder);
                }
                return result;
            }

            // - Layer aggregator
            // ShapeGroup: Group 1
            CompositionColorBrush ColorBrush_AlmostDarkCyan_FF0D62AB()
            {
                return _c.CreateColorBrush(Color.FromArgb(0xFF, 0x0D, 0x62, 0xAB));
            }

            // - Layer aggregator
            // Scale:4,4, Offset:<96, 92>
            CompositionColorBrush ColorBrush_AlmostDodgerBlue_FF199BE2()
            {
                return _c.CreateColorBrush(Color.FromArgb(0xFF, 0x19, 0x9B, 0xE2));
            }

            // - Layer aggregator
            // ShapeGroup: Group 1
            CompositionColorBrush ColorBrush_AlmostTurquoise_FF50E6FF()
            {
                return _c.CreateColorBrush(Color.FromArgb(0xFF, 0x50, 0xE6, 0xFF));
            }

            CompositionPath Path()
            {
                if (_path != null) { return _path; }
                var result = _path = new CompositionPath(Geometry_1());
                return result;
            }

            CompositionPathGeometry PathGeometry_0()
            {
                return (_pathGeometry_0 == null)
                    ? _pathGeometry_0 = _c.CreatePathGeometry(new CompositionPath(Geometry_0()))
                    : _pathGeometry_0;
            }

            // - Layer aggregator
            // Scale:4,4, Offset:<96, 92>
            CompositionPathGeometry PathGeometry_1()
            {
                if (_pathGeometry_1 != null) { return _pathGeometry_1; }
                var result = _pathGeometry_1 = _c.CreatePathGeometry();
                return result;
            }

            // Layer aggregator
            // Path 1
            CompositionSpriteShape SpriteShape_0()
            {
                if (_spriteShape_0 != null) { return _spriteShape_0; }
                var result = _spriteShape_0 = _c.CreateSpriteShape(PathGeometry_0());
                result.Scale = new Vector2(4F, 4F);
                result.FillBrush = ColorBrush_AlmostTurquoise_FF50E6FF();
                return result;
            }

            // Layer aggregator
            // Path 1
            CompositionSpriteShape SpriteShape_1()
            {
                // Offset:<96, 92>, Scale:<4, 4>
                var geometry = PathGeometry_1();
                var result = CreateSpriteShape(geometry, new Matrix3x2(4F, 0F, 0F, 4F, 96F, 92F), ColorBrush_AlmostDodgerBlue_FF199BE2()); ;
                return result;
            }

            // Layer aggregator
            // Path 1
            CompositionSpriteShape SpriteShape_2()
            {
                if (_spriteShape_2 != null) { return _spriteShape_2; }
                var result = _spriteShape_2 = _c.CreateSpriteShape(PathGeometry_0());
                result.Scale = new Vector2(4F, 4F);
                result.FillBrush = ColorBrush_AlmostDarkCyan_FF0D62AB();
                return result;
            }

            // The root of the composition.
            ContainerVisual Root()
            {
                if (_root != null) { return _root; }
                var result = _root = _c.CreateContainerVisual();
                var propertySet = result.Properties;
                propertySet.InsertScalar("Progress", 0F);
                propertySet.InsertScalar("t0", 0F);
                propertySet.InsertScalar("t1", 0F);
                // Layer aggregator
                result.Children.InsertAtTop(ShapeVisual_0());
                return result;
            }

            CubicBezierEasingFunction CubicBezierEasingFunction_0()
            {
                return (_cubicBezierEasingFunction_0 == null)
                    ? _cubicBezierEasingFunction_0 = _c.CreateCubicBezierEasingFunction(new Vector2(0.333000004F, 0F), new Vector2(0.666999996F, 1F))
                    : _cubicBezierEasingFunction_0;
            }

            // - - Layer aggregator
            // -  Scale:4,4, Offset:<96, 92>
            // Path
            PathKeyFrameAnimation PathKeyFrameAnimation_0()
            {
                // Frame 0.
                var result = CreatePathKeyFrameAnimation(0F, Path(), StepThenHoldEasingFunction());
                // Frame 3.
                result.InsertKeyFrame(0.107142858F, Path(), HoldThenStepEasingFunction());
                // Frame 13.
                result.InsertKeyFrame(0.464285702F, new CompositionPath(Geometry_2()), CubicBezierEasingFunction_0());
                // Frame 18.
                result.InsertKeyFrame(0.642857134F, new CompositionPath(Geometry_3()), CubicBezierEasingFunction_0());
                // Frame 23.
                result.InsertKeyFrame(0.821428597F, Path(), CubicBezierEasingFunction_0());
                return result;
            }

            ScalarKeyFrameAnimation t0ScalarAnimation_0_to_1()
            {
                // Frame 0.
                var result = CreateScalarKeyFrameAnimation(0F, 0F, StepThenHoldEasingFunction());
                result.SetReferenceParameter("_", _root);
                // Frame 3.
                result.InsertKeyFrame(0.107142851F, 1F, CubicBezierEasingFunction_0());
                // Frame 3.
                result.InsertKeyFrame(0.107142858F, 0F, StepThenHoldEasingFunction());
                // Frame 13.
                result.InsertKeyFrame(0.464285672F, 1F, _c.CreateCubicBezierEasingFunction(new Vector2(0.638000011F, 0F), new Vector2(0.677999973F, 1F)));
                return result;
            }

            ScalarKeyFrameAnimation t1ScalarAnimation_0_to_1()
            {
                // Frame 13.
                var result = CreateScalarKeyFrameAnimation(0.464285702F, 0F, StepThenHoldEasingFunction());
                result.SetReferenceParameter("_", _root);
                // Frame 18.
                result.InsertKeyFrame(0.642857075F, 1F, CubicBezierEasingFunction_0());
                // Frame 18.
                result.InsertKeyFrame(0.642857134F, 0F, StepThenHoldEasingFunction());
                // Frame 23.
                result.InsertKeyFrame(0.821428537F, 1F, CubicBezierEasingFunction_0());
                return result;
            }

            // Layer aggregator
            ShapeVisual ShapeVisual_0()
            {
                var result = _c.CreateShapeVisual();
                result.Size = new Vector2(192F, 192F);
                var shapes = result.Shapes;
                // ShapeGroup: Group 1
                shapes.Add(SpriteShape_0());
                // Scale:4,4, Offset:<96, 92>
                shapes.Add(SpriteShape_1());
                // ShapeGroup: Group 1
                shapes.Add(SpriteShape_2());
                return result;
            }

            StepEasingFunction HoldThenStepEasingFunction()
            {
                if (_holdThenStepEasingFunction != null) { return _holdThenStepEasingFunction; }
                var result = _holdThenStepEasingFunction = _c.CreateStepEasingFunction();
                result.IsFinalStepSingleFrame = true;
                return result;
            }

            StepEasingFunction StepThenHoldEasingFunction()
            {
                if (_stepThenHoldEasingFunction != null) { return _stepThenHoldEasingFunction; }
                var result = _stepThenHoldEasingFunction = _c.CreateStepEasingFunction();
                result.IsInitialStepSingleFrame = true;
                return result;
            }

            // - Layer aggregator
            // ShapeGroup: Group 1
            // Offset
            Vector2KeyFrameAnimation OffsetVector2Animation_0()
            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(76F, 72F), HoldThenStepEasingFunction());
                result.SetReferenceParameter("_", _root);
                // Frame 3.
                result.InsertExpressionKeyFrame(0.107142851F, "Pow(1-_.t0,3)*Vector2(76,72)+(3*Square(1-_.t0)*_.t0*Vector2(77.75,73.5))+(3*(1-_.t0)*Square(_.t0)*Vector2(86.833,81.417))+(Pow(_.t0,3)*Vector2(86.5,81))", StepThenHoldEasingFunction());
                // Frame 13.
                result.InsertExpressionKeyFrame(0.464285672F, "Pow(1-_.t0,3)*Vector2(86.5,81)+(3*Square(1-_.t0)*_.t0*Vector2(86.167,80.583))+(3*(1-_.t0)*Square(_.t0)*Vector2(74,69.5))+(Pow(_.t0,3)*Vector2(74,69.5))", StepThenHoldEasingFunction());
                // Frame 18.
                result.InsertExpressionKeyFrame(0.642857075F, "Pow(1-_.t1,3)*Vector2(74,69.5)+(3*Square(1-_.t1)*_.t1*Vector2(74,69.5))+(3*(1-_.t1)*Square(_.t1)*Vector2(86.167,80.583))+(Pow(_.t1,3)*Vector2(86.5,81))", StepThenHoldEasingFunction());
                // Frame 23.
                result.InsertExpressionKeyFrame(0.821428537F, "Pow(1-_.t1,3)*Vector2(86.5,81)+(3*Square(1-_.t1)*_.t1*Vector2(86.833,81.417))+(3*(1-_.t1)*Square(_.t1)*Vector2(77.75,73.5))+(Pow(_.t1,3)*Vector2(76,72))", StepThenHoldEasingFunction());
                // Frame 23.
                result.InsertKeyFrame(0.821428597F, new Vector2(76F, 72F), StepThenHoldEasingFunction());
                return result;
            }

            // - Layer aggregator
            // ShapeGroup: Group 1
            // Offset
            Vector2KeyFrameAnimation OffsetVector2Animation_1()
            {
                // Frame 0.
                var result = CreateVector2KeyFrameAnimation(0F, new Vector2(116F, 112F), HoldThenStepEasingFunction());
                result.SetReferenceParameter("_", _root);
                // Frame 3.
                result.InsertExpressionKeyFrame(0.107142851F, "Pow(1-_.t0,3)*Vector2(116,112)+(3*Square(1-_.t0)*_.t0*Vector2(114.5,110.25))+(3*(1-_.t0)*Square(_.t0)*Vector2(106,100.833))+(Pow(_.t0,3)*Vector2(107,101.5))", StepThenHoldEasingFunction());
                // Frame 13.
                result.InsertExpressionKeyFrame(0.464285672F, "Pow(1-_.t0,3)*Vector2(107,101.5)+(3*Square(1-_.t0)*_.t0*Vector2(108,102.167))+(3*(1-_.t0)*Square(_.t0)*Vector2(122,116))+(Pow(_.t0,3)*Vector2(122,116))", StepThenHoldEasingFunction());
                // Frame 18.
                result.InsertExpressionKeyFrame(0.642857075F, "Pow(1-_.t1,3)*Vector2(122,116)+(3*Square(1-_.t1)*_.t1*Vector2(122,116))+(3*(1-_.t1)*Square(_.t1)*Vector2(108,102.167))+(Pow(_.t1,3)*Vector2(107,101.5))", StepThenHoldEasingFunction());
                // Frame 23.
                result.InsertExpressionKeyFrame(0.821428537F, "Pow(1-_.t1,3)*Vector2(107,101.5)+(3*Square(1-_.t1)*_.t1*Vector2(106,100.833))+(3*(1-_.t1)*Square(_.t1)*Vector2(114.5,110.25))+(Pow(_.t1,3)*Vector2(116,112))", StepThenHoldEasingFunction());
                // Frame 23.
                result.InsertKeyFrame(0.821428597F, new Vector2(116F, 112F), StepThenHoldEasingFunction());
                return result;
            }

            internal Sidebar_AnimatedVisual(
                Compositor compositor
                )
            {
                _c = compositor;
                _reusableExpressionAnimation = compositor.CreateExpressionAnimation();
                Root();
            }

            public Visual RootVisual => _root;
            public TimeSpan Duration => TimeSpan.FromTicks(c_durationTicks);
            public Vector2 Size => new Vector2(192F, 192F);
            void IDisposable.Dispose() => _root?.Dispose();

            public void CreateAnimations()
            {
                _pathGeometry_1.StartAnimation("Path", PathKeyFrameAnimation_0(), AnimationController_0());
                _spriteShape_0.StartAnimation("Offset", OffsetVector2Animation_0(), AnimationController_0());
                _spriteShape_2.StartAnimation("Offset", OffsetVector2Animation_1(), AnimationController_0());
                _root.Properties.StartAnimation("t0", t0ScalarAnimation_0_to_1(), AnimationController_0());
                _root.Properties.StartAnimation("t1", t1ScalarAnimation_0_to_1(), AnimationController_0());
            }

            public void DestroyAnimations()
            {
                _pathGeometry_1.StopAnimation("Path");
                _spriteShape_0.StopAnimation("Offset");
                _spriteShape_2.StopAnimation("Offset");
                _root.Properties.StopAnimation("t0");
                _root.Properties.StopAnimation("t1");
            }

        }
    }
}
