Tomi Cvetic %!s(int64=4) %!d(string=hai) anos
pai
achega
ff5dcb02a8

+ 890 - 0
frontend/corona1.ts

@@ -0,0 +1,890 @@
+import { ITraining } from './src/training/types'
+
+const data: { trainings: ITraining[]; polls: any } = {
+  trainings: [
+    {
+      id: 'training0',
+      title: 'Corona 1',
+      type: {
+        id: 'type0',
+        name: 'HIIT',
+        description: 'High Intensity Interval Training'
+      },
+      createdAt: '2020-03-25T21:13:43.284Z',
+      trainingDate: '2020-03-31T09:45:00.000Z',
+      location: 'At home',
+      registrations: [],
+      attendance: 0,
+      ratings: [],
+      published: true,
+      blocks: [
+        {
+          id: 'block0',
+          sequence: 0,
+          title: 'Drop Sets',
+          repetitions: 1,
+          rest: 25,
+          format: {
+            id: 'format0',
+            name: 'Sequence',
+            description: 'Sequence of exercises'
+          },
+          blocks: [
+            {
+              id: 'block1',
+              sequence: 0,
+              title: 'Lateral move with jumps',
+              repetitions: 1,
+              format: {
+                id: 'format0',
+                name: 'Drop Sets',
+                description:
+                  'During the exercise, the moves get easier. Keep the heart rate up by increasing the intensity!'
+              },
+              rest: 25,
+              blocks: [
+                {
+                  id: 'block2',
+                  duration: 40,
+                  video: '/media/block1-1.mp4',
+                  description:
+                    '4 lateral high knee steps, drop squat, a jump and a butt kick',
+                  exercises: [
+                    {
+                      id: 'exercise0',
+                      name: 'Lateral high knee run',
+                      repetitions: 4,
+                      description:
+                        'Jog pulling your knees up high while moving sideways',
+                      videos: ['https://www.youtube.com/watch?v=s5GanRixp6I'],
+                      pictures: [
+                        'https://media1.popsugar-assets.com/files/thumbor/xfgCQbEWOZpPDA_HTMSfgcOnYYE/fit-in/1024x1024/filters:format_auto-!!-:strip_icc-!!-/2015/06/26/981/n/1922729/a7719ba19ea7a1ae_lateral-run-and-hold/i/Tabata-One-Lateral-High-Knee-Run-Hold.jpg'
+                      ],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jog on the spot'
+                      }
+                    },
+                    {
+                      id: 'exercise1',
+                      name: 'Squat',
+                      repetitions: 1,
+                      description:
+                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Thighs', 'Glutes'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Squat'
+                      }
+                    },
+                    {
+                      id: 'exercise2',
+                      name: 'Block jump',
+                      repetitions: 1,
+                      description:
+                        'Jump up. Feet are at least hip-wide, land in a squat. Use your arms to add momentum.',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Thighs', 'Glutes'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    },
+                    {
+                      id: 'exercise3',
+                      name: 'Butt kick',
+                      repetitions: 1,
+                      description:
+                        'Jump up. While jumping, try to kick your butt with your heels.',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    }
+                  ]
+                },
+                {
+                  id: 'block3',
+                  duration: 30,
+                  video: '/media/block1-2.mp4',
+                  description: 'Drop squat, a jump and a butt kick.',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Squat',
+                      repetitions: 1,
+                      description:
+                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Thighs', 'Glutes'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Squat'
+                      }
+                    },
+                    {
+                      id: 'exercise2',
+                      name: 'Block jump',
+                      repetitions: 1,
+                      description:
+                        'Jump up. Feet are at least hip-wide, land in a squat. Use your arms to add momentum.',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Thighs', 'Glutes'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    },
+                    {
+                      id: 'exercise3',
+                      name: 'Butt kick',
+                      repetitions: 1,
+                      description:
+                        'Jump up. While jumping, try to kick your butt with your heels.',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    }
+                  ]
+                },
+                {
+                  id: 'block4',
+                  duration: 20,
+                  video: '/media/block1-3.mp4',
+                  description: 'Drop squat and a jump.',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Squat',
+                      repetitions: 1,
+                      description:
+                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Thighs', 'Glutes'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Squat'
+                      }
+                    },
+                    {
+                      id: 'exercise2',
+                      name: 'Block jump',
+                      repetitions: 1,
+                      description:
+                        'Jump up. Feet are at least hip-wide, land in a squat. Use your arms to add momentum.',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Thighs', 'Glutes'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    }
+                  ]
+                }
+              ]
+            },
+            {
+              id: 'block5',
+              sequence: 0,
+              title: 'Pushup with frog-jump and block jump',
+              repetitions: 1,
+              format: {
+                id: 'format0',
+                name: 'Drop Sets',
+                description:
+                  'During the exercise, the moves get easier. Keep the heart rate up by increasing the intensity!'
+              },
+              rest: 25,
+              blocks: [
+                {
+                  id: 'block6',
+                  duration: 40,
+                  video: '/media/block2-1.mp4',
+                  description: 'Pushup, frog jump and a jump.',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Squat',
+                      repetitions: 1,
+                      description:
+                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Thighs', 'Glutes'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Squat'
+                      }
+                    },
+                    {
+                      id: 'exercise4',
+                      name: 'Pushup',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Chest', 'Triceps'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Pushup'
+                      }
+                    },
+                    {
+                      id: 'exercise2',
+                      name: 'Frog jump',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Core', 'Quads'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Mountain climber'
+                      }
+                    },
+                    {
+                      id: 'exercise2',
+                      name: 'Block jump',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    }
+                  ]
+                },
+                {
+                  id: 'block7',
+                  duration: 30,
+                  video: '/media/block2-2.mp4',
+                  description: 'Pushup and a jump',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Squat',
+                      repetitions: 1,
+                      description:
+                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Thighs', 'Glutes'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Squat'
+                      }
+                    },
+                    {
+                      id: 'exercise4',
+                      name: 'Pushup',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Chest', 'Triceps'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Pushup'
+                      }
+                    },
+                    {
+                      id: 'exercise2',
+                      name: 'Block jump',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    }
+                  ]
+                },
+                {
+                  id: 'block8',
+                  duration: 20,
+                  video: '/media/burpee.mp4',
+                  description: 'Just a burpee.',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Squat',
+                      repetitions: 1,
+                      description:
+                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
+                      videos: [],
+                      pictures: [],
+                      targets: ['Thighs', 'Glutes'],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Squat'
+                      }
+                    },
+                    {
+                      id: 'exercise2',
+                      name: 'Block jump',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        },
+
+        {
+          id: 'block9',
+          sequence: 0,
+          title: 'Power Sets with Kicker',
+          repetitions: 2,
+          format: {
+            id: 'format0',
+            name: 'Sequence',
+            description: 'Sequence of exercises'
+          },
+          rest: 25,
+          blocks: [
+            {
+              id: 'block10',
+              sequence: 0,
+              title: 'Block A',
+              repetitions: 1,
+              format: {
+                id: 'format0',
+                name: 'Power Set',
+                description:
+                  'Sequence of exercises targeting different regions without rest in between.'
+              },
+              rest: 25,
+              blocks: [
+                {
+                  id: 'block11',
+                  duration: 25,
+                  video: '/media/block3-1.mp4',
+                  description: '',
+                  exercises: [
+                    {
+                      id: 'exercise6',
+                      name: 'Donkey kick',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Mountain climber'
+                      }
+                    },
+                    {
+                      id: 'exercise1',
+                      name: 'Plank walk',
+                      repetitions: 2,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Plank'
+                      }
+                    }
+                  ]
+                },
+                {
+                  id: 'block12',
+                  duration: 25,
+                  video: '/media/block3-2.mp4',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Long jump',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    },
+                    {
+                      id: 'exercise2',
+                      name: '180°',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    }
+                  ]
+                },
+                {
+                  id: 'block13',
+                  duration: 10,
+                  video: '/media/burpee.mp4',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Burpee',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Burpee'
+                      }
+                    }
+                  ]
+                }
+              ]
+            },
+
+            {
+              id: 'block14',
+              sequence: 0,
+              title: 'Block B',
+              repetitions: 1,
+              format: {
+                id: 'format0',
+                name: 'Power Set',
+                description:
+                  'Sequence of exercises targeting different regions without rest in between.'
+              },
+              rest: 25,
+              blocks: [
+                {
+                  id: 'block15',
+                  duration: 25,
+                  video: '/media/block4-1.mp4',
+                  exercises: [
+                    {
+                      id: 'exercise6',
+                      name: 'Side climber',
+                      repetitions: 2,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Mountain climber'
+                      }
+                    },
+                    {
+                      id: 'exercise1',
+                      name: 'Pushup',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Plank'
+                      }
+                    }
+                  ]
+                },
+                {
+                  id: 'block16',
+                  duration: 25,
+                  video: '/media/block4-2.mp4',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Power lunge',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Lunge'
+                      }
+                    }
+                  ]
+                },
+                {
+                  id: 'block17',
+                  duration: 20,
+                  video: '/media/burpee.mp4',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Burpee',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Burpee'
+                      }
+                    }
+                  ]
+                }
+              ]
+            },
+
+            {
+              id: 'block18',
+              sequence: 0,
+              title: 'Block C',
+              repetitions: 1,
+              format: {
+                id: 'format0',
+                name: 'Power Set',
+                description:
+                  'Sequence of exercises targeting different regions without rest in between.'
+              },
+              rest: 25,
+              blocks: [
+                {
+                  id: 'block19',
+                  duration: 25,
+                  video: '/media/block5-1.mp4',
+                  exercises: [
+                    {
+                      id: 'exercise6',
+                      name: 'Inch worm',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Plank'
+                      }
+                    },
+                    {
+                      id: 'exercise1',
+                      name: 'Block jump',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jump'
+                      }
+                    }
+                  ]
+                },
+                {
+                  id: 'block20',
+                  duration: 25,
+                  video: '/media/fastfeet.mp4',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Fast feet',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Jog on the spot'
+                      }
+                    }
+                  ]
+                },
+                {
+                  id: 'block1',
+                  duration: 30,
+                  video: '/media/burpee.mp4',
+                  exercises: [
+                    {
+                      id: 'exercise1',
+                      name: 'Burpee',
+                      repetitions: 1,
+                      description: '',
+                      videos: [],
+                      pictures: [],
+                      targets: [],
+                      baseExercise: {
+                        id: 'baseExercise1',
+                        name: 'Burpee'
+                      }
+                    }
+                  ]
+                }
+              ]
+            }
+          ]
+        },
+
+        {
+          id: 'block25',
+          sequence: 0,
+          title: 'Leg AMRAP',
+          repetitions: 3,
+          format: {
+            id: 'format0',
+            name: 'AMRAP',
+            description: 'As many rounds as possible'
+          },
+          rest: 25,
+          blocks: [
+            {
+              id: 'block0',
+              duration: 90,
+              video: '/media/block6-1.mp4',
+              description:
+                'Try to finish as many rounds as possible in 90 seconds! In the second round, finish the same number of rounds, but add the challenge (bear crawl) after each round. In the third round, finish the same number of rounds again, but add the challenge after every exercise. The target is 3 rounds.',
+              exercises: [
+                {
+                  id: 'exercise6',
+                  name: 'Leap/Jump',
+                  repetitions: 5,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Mountain climber'
+                  }
+                },
+                {
+                  id: 'exercise1',
+                  name: 'Low 180',
+                  repetitions: 10,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Plank'
+                  }
+                },
+                {
+                  id: 'exercise1',
+                  name: 'Ice skater',
+                  repetitions: 15,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Plank'
+                  }
+                },
+                {
+                  id: 'exercise1',
+                  name: 'Bear crawl',
+                  repetitions: 1,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Plank'
+                  }
+                }
+              ]
+            }
+          ]
+        },
+
+        {
+          id: 'block3',
+          sequence: 0,
+          title: '1 Minute Challenges',
+          repetitions: 1,
+          format: {
+            id: 'format0',
+            name: 'Sequence',
+            description: 'Sequence of exercises'
+          },
+          rest: 25,
+          blocks: [
+            {
+              id: 'block0',
+              duration: 60,
+              rest: 25,
+              video: '/media/block7-1.mp4',
+              description:
+                'Go fast on the dynamic exercise, and hold still on the static part, moving as little as possible!',
+              exercises: [
+                {
+                  id: 'exercise6',
+                  name: 'Single arm burpee',
+                  repetitions: 8,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Mountain climber'
+                  }
+                },
+                {
+                  id: 'exercise1',
+                  name: 'Single arm plank + Foot lift L/R',
+                  repetitions: 8,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Plank'
+                  }
+                }
+              ]
+            },
+
+            {
+              id: 'block0',
+              duration: 60,
+              rest: 25,
+              video: '/media/block8-1.mp4',
+              description:
+                'Go fast on the dynamic exercise, and hold still on the static part, moving as little as possible!',
+              exercises: [
+                {
+                  id: 'exercise6',
+                  name: 'Rotation drop squat + Jack',
+                  repetitions: 8,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Mountain climber'
+                  }
+                },
+                {
+                  id: 'exercise1',
+                  name: 'Hold squat + Step out L/R',
+                  repetitions: 8,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Plank'
+                  }
+                }
+              ]
+            }
+          ]
+        },
+
+        {
+          id: 'block2',
+          sequence: 0,
+          title: 'Core AMRAP',
+          repetitions: 1,
+          format: {
+            id: 'format0',
+            name: 'AMRAP',
+            description: 'As many rounds as possible'
+          },
+          rest: 25,
+          blocks: [
+            {
+              id: 'block0',
+              duration: 90,
+              video: '/media/block9-1.mp4',
+              description:
+                'Try to finish as many rounds as possible in 90 seconds! Keep the transitions short. The target is 3 rounds.',
+              exercises: [
+                {
+                  id: 'exercise6',
+                  name: 'C-Crunch',
+                  repetitions: 10,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Mountain climber'
+                  }
+                },
+                {
+                  id: 'exercise1',
+                  name: 'Bicycle crunch',
+                  repetitions: 10,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Plank'
+                  }
+                },
+                {
+                  id: 'exercise1',
+                  name: 'Mountain climber',
+                  repetitions: 10,
+                  description: '',
+                  videos: [],
+                  pictures: [],
+                  targets: [],
+                  baseExercise: {
+                    id: 'baseExercise1',
+                    name: 'Plank'
+                  }
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  polls: []
+}
+
+export default data

+ 346 - 780
frontend/initial-data.ts

@@ -1,890 +1,456 @@
-import { ITraining } from './src/training/types'
+import { ITraining } from "./src/training/types";
 
 const data: { trainings: ITraining[]; polls: any } = {
   trainings: [
     {
-      id: 'training0',
-      title: 'Corona 1',
+      id: "training0",
+      title: "Homework 1",
       type: {
-        id: 'type0',
-        name: 'HIIT',
-        description: 'High Intensity Interval Training'
+        id: "type0",
+        name: "Core + Legs",
+        description: "Some all time favorites.",
       },
-      createdAt: '2020-03-25T21:13:43.284Z',
-      trainingDate: '2020-03-31T09:45:00.000Z',
-      location: 'At home',
+      createdAt: "2020-04-07T21:13:43.284Z",
+      trainingDate: "2020-04-08T09:45:00.000Z",
+      location: "At home",
       registrations: [],
       attendance: 0,
       ratings: [],
       published: true,
       blocks: [
         {
-          id: 'block0',
+          id: "block0",
           sequence: 0,
-          title: 'Drop Sets',
+          title: "Work B**ch",
           repetitions: 1,
-          rest: 25,
+          rest: 90,
+          video: "/media/workbitch.mp4",
           format: {
-            id: 'format0',
-            name: 'Sequence',
-            description: 'Sequence of exercises'
+            id: "format0",
+            name: "Sequence",
+            description: "Sequence of exercises",
           },
           blocks: [
             {
-              id: 'block1',
-              sequence: 0,
-              title: 'Lateral move with jumps',
-              repetitions: 1,
-              format: {
-                id: 'format0',
-                name: 'Drop Sets',
-                description:
-                  'During the exercise, the moves get easier. Keep the heart rate up by increasing the intensity!'
-              },
-              rest: 25,
-              blocks: [
+              id: "block2",
+              duration: 16,
+              exercises: [
                 {
-                  id: 'block2',
-                  duration: 40,
-                  video: '/media/block1-1.mp4',
+                  id: "exercise0",
+                  name: "Pulsing crunch with high knees",
+                  repetitions: 1,
                   description:
-                    '4 lateral high knee steps, drop squat, a jump and a butt kick',
-                  exercises: [
-                    {
-                      id: 'exercise0',
-                      name: 'Lateral high knee run',
-                      repetitions: 4,
-                      description:
-                        'Jog pulling your knees up high while moving sideways',
-                      videos: ['https://www.youtube.com/watch?v=s5GanRixp6I'],
-                      pictures: [
-                        'https://media1.popsugar-assets.com/files/thumbor/xfgCQbEWOZpPDA_HTMSfgcOnYYE/fit-in/1024x1024/filters:format_auto-!!-:strip_icc-!!-/2015/06/26/981/n/1922729/a7719ba19ea7a1ae_lateral-run-and-hold/i/Tabata-One-Lateral-High-Knee-Run-Hold.jpg'
-                      ],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jog on the spot'
-                      }
-                    },
-                    {
-                      id: 'exercise1',
-                      name: 'Squat',
-                      repetitions: 1,
-                      description:
-                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Thighs', 'Glutes'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Squat'
-                      }
-                    },
-                    {
-                      id: 'exercise2',
-                      name: 'Block jump',
-                      repetitions: 1,
-                      description:
-                        'Jump up. Feet are at least hip-wide, land in a squat. Use your arms to add momentum.',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Thighs', 'Glutes'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    },
-                    {
-                      id: 'exercise3',
-                      name: 'Butt kick',
-                      repetitions: 1,
-                      description:
-                        'Jump up. While jumping, try to kick your butt with your heels.',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    }
-                  ]
-                },
-                {
-                  id: 'block3',
-                  duration: 30,
-                  video: '/media/block1-2.mp4',
-                  description: 'Drop squat, a jump and a butt kick.',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Squat',
-                      repetitions: 1,
-                      description:
-                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Thighs', 'Glutes'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Squat'
-                      }
-                    },
-                    {
-                      id: 'exercise2',
-                      name: 'Block jump',
-                      repetitions: 1,
-                      description:
-                        'Jump up. Feet are at least hip-wide, land in a squat. Use your arms to add momentum.',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Thighs', 'Glutes'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    },
-                    {
-                      id: 'exercise3',
-                      name: 'Butt kick',
-                      repetitions: 1,
-                      description:
-                        'Jump up. While jumping, try to kick your butt with your heels.',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    }
-                  ]
+                    "Jog pulling your knees up high while moving sideways",
+                  videos: ["https://www.youtube.com/watch?v=s5GanRixp6I"],
+                  pictures: [
+                    "https://media1.popsugar-assets.com/files/thumbor/xfgCQbEWOZpPDA_HTMSfgcOnYYE/fit-in/1024x1024/filters:format_auto-!!-:strip_icc-!!-/2015/06/26/981/n/1922729/a7719ba19ea7a1ae_lateral-run-and-hold/i/Tabata-One-Lateral-High-Knee-Run-Hold.jpg",
+                  ],
+                  targets: [],
+                  baseExercise: {
+                    id: "baseExercise1",
+                    name: "Jog on the spot",
+                  },
                 },
-                {
-                  id: 'block4',
-                  duration: 20,
-                  video: '/media/block1-3.mp4',
-                  description: 'Drop squat and a jump.',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Squat',
-                      repetitions: 1,
-                      description:
-                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Thighs', 'Glutes'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Squat'
-                      }
-                    },
-                    {
-                      id: 'exercise2',
-                      name: 'Block jump',
-                      repetitions: 1,
-                      description:
-                        'Jump up. Feet are at least hip-wide, land in a squat. Use your arms to add momentum.',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Thighs', 'Glutes'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    }
-                  ]
-                }
-              ]
+              ],
             },
             {
-              id: 'block5',
-              sequence: 0,
-              title: 'Pushup with frog-jump and block jump',
-              repetitions: 1,
-              format: {
-                id: 'format0',
-                name: 'Drop Sets',
-                description:
-                  'During the exercise, the moves get easier. Keep the heart rate up by increasing the intensity!'
-              },
-              rest: 25,
-              blocks: [
-                {
-                  id: 'block6',
-                  duration: 40,
-                  video: '/media/block2-1.mp4',
-                  description: 'Pushup, frog jump and a jump.',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Squat',
-                      repetitions: 1,
-                      description:
-                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Thighs', 'Glutes'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Squat'
-                      }
-                    },
-                    {
-                      id: 'exercise4',
-                      name: 'Pushup',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Chest', 'Triceps'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Pushup'
-                      }
-                    },
-                    {
-                      id: 'exercise2',
-                      name: 'Frog jump',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Core', 'Quads'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Mountain climber'
-                      }
-                    },
-                    {
-                      id: 'exercise2',
-                      name: 'Block jump',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    }
-                  ]
-                },
+              id: "block3",
+              duration: 30,
+              exercises: [
                 {
-                  id: 'block7',
-                  duration: 30,
-                  video: '/media/block2-2.mp4',
-                  description: 'Pushup and a jump',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Squat',
-                      repetitions: 1,
-                      description:
-                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Thighs', 'Glutes'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Squat'
-                      }
-                    },
-                    {
-                      id: 'exercise4',
-                      name: 'Pushup',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Chest', 'Triceps'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Pushup'
-                      }
-                    },
-                    {
-                      id: 'exercise2',
-                      name: 'Block jump',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    }
-                  ]
+                  id: "exercise1",
+                  name: "Oblique crunch - right",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
+                  videos: [],
+                  pictures: [],
+                  targets: ["Thighs", "Glutes"],
+                  baseExercise: {
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
-                {
-                  id: 'block8',
-                  duration: 20,
-                  video: '/media/burpee.mp4',
-                  description: 'Just a burpee.',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Squat',
-                      repetitions: 1,
-                      description:
-                        'Sit down backwards, hip about knee-high. Keep your knees behind the toes.',
-                      videos: [],
-                      pictures: [],
-                      targets: ['Thighs', 'Glutes'],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Squat'
-                      }
-                    },
-                    {
-                      id: 'exercise2',
-                      name: 'Block jump',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    }
-                  ]
-                }
-              ]
-            }
-          ]
-        },
-
-        {
-          id: 'block9',
-          sequence: 0,
-          title: 'Power Sets with Kicker',
-          repetitions: 2,
-          format: {
-            id: 'format0',
-            name: 'Sequence',
-            description: 'Sequence of exercises'
-          },
-          rest: 25,
-          blocks: [
+              ],
+            },
             {
-              id: 'block10',
-              sequence: 0,
-              title: 'Block A',
-              repetitions: 1,
-              format: {
-                id: 'format0',
-                name: 'Power Set',
-                description:
-                  'Sequence of exercises targeting different regions without rest in between.'
-              },
-              rest: 25,
-              blocks: [
+              id: "block4",
+              duration: 46,
+              exercises: [
                 {
-                  id: 'block11',
-                  duration: 25,
-                  video: '/media/block3-1.mp4',
-                  description: '',
-                  exercises: [
-                    {
-                      id: 'exercise6',
-                      name: 'Donkey kick',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Mountain climber'
-                      }
-                    },
-                    {
-                      id: 'exercise1',
-                      name: 'Plank walk',
-                      repetitions: 2,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Plank'
-                      }
-                    }
-                  ]
+                  id: "exercise1",
+                  name: "Bicycle crunch",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
+                  videos: [],
+                  pictures: [],
+                  targets: ["Thighs", "Glutes"],
+                  baseExercise: {
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
+              ],
+            },
+            {
+              id: "block4",
+              duration: 30,
+              exercises: [
                 {
-                  id: 'block12',
-                  duration: 25,
-                  video: '/media/block3-2.mp4',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Long jump',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    },
-                    {
-                      id: 'exercise2',
-                      name: '180°',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    }
-                  ]
+                  id: "exercise1",
+                  name: "Oblique crunch - left",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
+                  videos: [],
+                  pictures: [],
+                  targets: ["Thighs", "Glutes"],
+                  baseExercise: {
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
-                {
-                  id: 'block13',
-                  duration: 10,
-                  video: '/media/burpee.mp4',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Burpee',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Burpee'
-                      }
-                    }
-                  ]
-                }
-              ]
+              ],
             },
-
             {
-              id: 'block14',
-              sequence: 0,
-              title: 'Block B',
-              repetitions: 1,
-              format: {
-                id: 'format0',
-                name: 'Power Set',
-                description:
-                  'Sequence of exercises targeting different regions without rest in between.'
-              },
-              rest: 25,
-              blocks: [
+              id: "block4",
+              duration: 45,
+              exercises: [
                 {
-                  id: 'block15',
-                  duration: 25,
-                  video: '/media/block4-1.mp4',
-                  exercises: [
-                    {
-                      id: 'exercise6',
-                      name: 'Side climber',
-                      repetitions: 2,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Mountain climber'
-                      }
-                    },
-                    {
-                      id: 'exercise1',
-                      name: 'Pushup',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Plank'
-                      }
-                    }
-                  ]
+                  id: "exercise1",
+                  name: "Russian Twist",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
+                  videos: [],
+                  pictures: [],
+                  targets: ["Thighs", "Glutes"],
+                  baseExercise: {
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
+              ],
+            },
+            {
+              id: "block4",
+              duration: 18,
+              exercises: [
                 {
-                  id: 'block16',
-                  duration: 25,
-                  video: '/media/block4-2.mp4',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Power lunge',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Lunge'
-                      }
-                    }
-                  ]
+                  id: "exercise1",
+                  name: "Plank",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
+                  videos: [],
+                  pictures: [],
+                  targets: ["Thighs", "Glutes"],
+                  baseExercise: {
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
-                {
-                  id: 'block17',
-                  duration: 20,
-                  video: '/media/burpee.mp4',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Burpee',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Burpee'
-                      }
-                    }
-                  ]
-                }
-              ]
+              ],
             },
-
             {
-              id: 'block18',
-              sequence: 0,
-              title: 'Block C',
-              repetitions: 1,
-              format: {
-                id: 'format0',
-                name: 'Power Set',
-                description:
-                  'Sequence of exercises targeting different regions without rest in between.'
-              },
-              rest: 25,
-              blocks: [
+              id: "block4",
+              duration: 45,
+              exercises: [
                 {
-                  id: 'block19',
-                  duration: 25,
-                  video: '/media/block5-1.mp4',
-                  exercises: [
-                    {
-                      id: 'exercise6',
-                      name: 'Inch worm',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Plank'
-                      }
-                    },
-                    {
-                      id: 'exercise1',
-                      name: 'Block jump',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jump'
-                      }
-                    }
-                  ]
+                  id: "exercise1",
+                  name: "Plank with arm extension",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
+                  videos: [],
+                  pictures: [],
+                  targets: ["Thighs", "Glutes"],
+                  baseExercise: {
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
+              ],
+            },
+            {
+              id: "block4",
+              duration: 20,
+              exercises: [
                 {
-                  id: 'block20',
-                  duration: 25,
-                  video: '/media/fastfeet.mp4',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Fast feet',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Jog on the spot'
-                      }
-                    }
-                  ]
+                  id: "exercise1",
+                  name: "Plank with knee drops",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
+                  videos: [],
+                  pictures: [],
+                  targets: ["Thighs", "Glutes"],
+                  baseExercise: {
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
-                {
-                  id: 'block1',
-                  duration: 30,
-                  video: '/media/burpee.mp4',
-                  exercises: [
-                    {
-                      id: 'exercise1',
-                      name: 'Burpee',
-                      repetitions: 1,
-                      description: '',
-                      videos: [],
-                      pictures: [],
-                      targets: [],
-                      baseExercise: {
-                        id: 'baseExercise1',
-                        name: 'Burpee'
-                      }
-                    }
-                  ]
-                }
-              ]
-            }
-          ]
+              ],
+            },
+          ],
         },
-
         {
-          id: 'block25',
+          id: "block0",
           sequence: 0,
-          title: 'Leg AMRAP',
-          repetitions: 3,
+          title: "Sally",
+          repetitions: 1,
+          rest: 90,
+          video: "/media/flowers.mp4",
           format: {
-            id: 'format0',
-            name: 'AMRAP',
-            description: 'As many rounds as possible'
+            id: "format0",
+            name: "Sequence",
+            description: "Sequence of exercises",
           },
-          rest: 25,
           blocks: [
             {
-              id: 'block0',
-              duration: 90,
-              video: '/media/block6-1.mp4',
-              description:
-                'Try to finish as many rounds as possible in 90 seconds! In the second round, finish the same number of rounds, but add the challenge (bear crawl) after each round. In the third round, finish the same number of rounds again, but add the challenge after every exercise. The target is 3 rounds.',
+              id: "block4",
+              duration: 205,
               exercises: [
                 {
-                  id: 'exercise6',
-                  name: 'Leap/Jump',
-                  repetitions: 5,
-                  description: '',
+                  id: "exercise1",
+                  name: "Bring Sally up - bring Sally down",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
                   videos: [],
                   pictures: [],
-                  targets: [],
+                  targets: ["Thighs", "Glutes"],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Mountain climber'
-                  }
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
+              ],
+            },
+          ],
+        },
+        {
+          id: "block0",
+          sequence: 0,
+          title: "Killer",
+          repetitions: 1,
+          rest: 90,
+          video: "/media/killer.mp4",
+          format: {
+            id: "format0",
+            name: "Sequence",
+            description: "Sequence of exercises",
+          },
+          blocks: [
+            {
+              id: "block2",
+              duration: 15,
+              exercises: [
                 {
-                  id: 'exercise1',
-                  name: 'Low 180',
-                  repetitions: 10,
-                  description: '',
-                  videos: [],
-                  pictures: [],
+                  id: "exercise0",
+                  name: "Plank",
+                  repetitions: 1,
+                  description:
+                    "Jog pulling your knees up high while moving sideways",
+                  videos: ["https://www.youtube.com/watch?v=s5GanRixp6I"],
+                  pictures: [
+                    "https://media1.popsugar-assets.com/files/thumbor/xfgCQbEWOZpPDA_HTMSfgcOnYYE/fit-in/1024x1024/filters:format_auto-!!-:strip_icc-!!-/2015/06/26/981/n/1922729/a7719ba19ea7a1ae_lateral-run-and-hold/i/Tabata-One-Lateral-High-Knee-Run-Hold.jpg",
+                  ],
                   targets: [],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Plank'
-                  }
+                    id: "baseExercise1",
+                    name: "Jog on the spot",
+                  },
                 },
+              ],
+            },
+            {
+              id: "block3",
+              duration: 45,
+              exercises: [
                 {
-                  id: 'exercise1',
-                  name: 'Ice skater',
-                  repetitions: 15,
-                  description: '',
+                  id: "exercise1",
+                  name: "Plank combo 1: Arms, legs, knees",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
                   videos: [],
                   pictures: [],
-                  targets: [],
+                  targets: ["Thighs", "Glutes"],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Plank'
-                  }
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
+              ],
+            },
+            {
+              id: "block4",
+              duration: 45,
+              exercises: [
                 {
-                  id: 'exercise1',
-                  name: 'Bear crawl',
+                  id: "exercise1",
+                  name: "Plank combo 2: Pushup, hydrant",
                   repetitions: 1,
-                  description: '',
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
                   videos: [],
                   pictures: [],
-                  targets: [],
+                  targets: ["Thighs", "Glutes"],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Plank'
-                  }
-                }
-              ]
-            }
-          ]
-        },
-
-        {
-          id: 'block3',
-          sequence: 0,
-          title: '1 Minute Challenges',
-          repetitions: 1,
-          format: {
-            id: 'format0',
-            name: 'Sequence',
-            description: 'Sequence of exercises'
-          },
-          rest: 25,
-          blocks: [
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
+                },
+              ],
+            },
             {
-              id: 'block0',
-              duration: 60,
-              rest: 25,
-              video: '/media/block7-1.mp4',
-              description:
-                'Go fast on the dynamic exercise, and hold still on the static part, moving as little as possible!',
+              id: "block4",
+              duration: 15,
               exercises: [
                 {
-                  id: 'exercise6',
-                  name: 'Single arm burpee',
-                  repetitions: 8,
-                  description: '',
+                  id: "exercise1",
+                  name: "Transition to back, hold knees high",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
                   videos: [],
                   pictures: [],
-                  targets: [],
+                  targets: ["Thighs", "Glutes"],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Mountain climber'
-                  }
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
+              ],
+            },
+            {
+              id: "block4",
+              duration: 40,
+              exercises: [
                 {
-                  id: 'exercise1',
-                  name: 'Single arm plank + Foot lift L/R',
-                  repetitions: 8,
-                  description: '',
+                  id: "exercise1",
+                  name: "Crunch combo: center - left - center - right",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
                   videos: [],
                   pictures: [],
-                  targets: [],
+                  targets: ["Thighs", "Glutes"],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Plank'
-                  }
-                }
-              ]
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
+                },
+              ],
             },
-
             {
-              id: 'block0',
-              duration: 60,
-              rest: 25,
-              video: '/media/block8-1.mp4',
-              description:
-                'Go fast on the dynamic exercise, and hold still on the static part, moving as little as possible!',
+              id: "block4",
+              duration: 5,
               exercises: [
                 {
-                  id: 'exercise6',
-                  name: 'Rotation drop squat + Jack',
-                  repetitions: 8,
-                  description: '',
+                  id: "exercise1",
+                  name: "Quick transition",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
                   videos: [],
                   pictures: [],
-                  targets: [],
+                  targets: ["Thighs", "Glutes"],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Mountain climber'
-                  }
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
+              ],
+            },
+            {
+              id: "block4",
+              duration: 60,
+              exercises: [
                 {
-                  id: 'exercise1',
-                  name: 'Hold squat + Step out L/R',
-                  repetitions: 8,
-                  description: '',
+                  id: "exercise1",
+                  name: "Plank combo 1: Arms, legs, knees",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
                   videos: [],
                   pictures: [],
-                  targets: [],
+                  targets: ["Thighs", "Glutes"],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Plank'
-                  }
-                }
-              ]
-            }
-          ]
-        },
-
-        {
-          id: 'block2',
-          sequence: 0,
-          title: 'Core AMRAP',
-          repetitions: 1,
-          format: {
-            id: 'format0',
-            name: 'AMRAP',
-            description: 'As many rounds as possible'
-          },
-          rest: 25,
-          blocks: [
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
+                },
+              ],
+            },
             {
-              id: 'block0',
-              duration: 90,
-              video: '/media/block9-1.mp4',
-              description:
-                'Try to finish as many rounds as possible in 90 seconds! Keep the transitions short. The target is 3 rounds.',
+              id: "block4",
+              duration: 30,
               exercises: [
                 {
-                  id: 'exercise6',
-                  name: 'C-Crunch',
-                  repetitions: 10,
-                  description: '',
+                  id: "exercise1",
+                  name: "Plank combo 2: Pushup, hydrant",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
                   videos: [],
                   pictures: [],
-                  targets: [],
+                  targets: ["Thighs", "Glutes"],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Mountain climber'
-                  }
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
+              ],
+            },
+            {
+              id: "block4",
+              duration: 15,
+              exercises: [
                 {
-                  id: 'exercise1',
-                  name: 'Bicycle crunch',
-                  repetitions: 10,
-                  description: '',
+                  id: "exercise1",
+                  name: "Plank",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
                   videos: [],
                   pictures: [],
-                  targets: [],
+                  targets: ["Thighs", "Glutes"],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Plank'
-                  }
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
                 },
+              ],
+            },
+            {
+              id: "block4",
+              duration: 15,
+              exercises: [
                 {
-                  id: 'exercise1',
-                  name: 'Mountain climber',
-                  repetitions: 10,
-                  description: '',
+                  id: "exercise1",
+                  name: "Plank with fast knee drops",
+                  repetitions: 1,
+                  description:
+                    "Sit down backwards, hip about knee-high. Keep your knees behind the toes.",
                   videos: [],
                   pictures: [],
-                  targets: [],
+                  targets: ["Thighs", "Glutes"],
                   baseExercise: {
-                    id: 'baseExercise1',
-                    name: 'Plank'
-                  }
-                }
-              ]
-            }
-          ]
-        }
-      ]
-    }
+                    id: "baseExercise1",
+                    name: "Squat",
+                  },
+                },
+              ],
+            },
+          ],
+        },
+      ],
+    },
   ],
-  polls: []
-}
+  polls: [],
+};
 
-export default data
+export default data;

+ 69 - 69
frontend/src/timer/components/Timer.tsx

@@ -1,28 +1,28 @@
-import { useState, useEffect, useRef } from 'react'
-import { VideoJsPlayer } from 'video.js'
+import { useState, useEffect, useRef } from "react";
+import { VideoJsPlayer } from "video.js";
 
-import { ITraining } from '../../training/types'
-import { getExerciseList, getTrainingTime, getPosition } from '../utils'
+import { ITraining } from "../../training/types";
+import { getExerciseList, getTrainingTime, getPosition } from "../utils";
 
-import Countdown from './Countdown'
-import VideoPlayer from './VideoPlayer'
-import AudioPlayer from './AudioPlayer'
-import { IExerciseItem } from '../types'
-import { Howl } from 'howler'
-import { useTimer } from '../hooks'
-import theme from '../../styles/theme'
+import Countdown from "./Countdown";
+import VideoPlayer from "./VideoPlayer";
+import AudioPlayer from "./AudioPlayer";
+import { IExerciseItem } from "../types";
+import { Howl } from "howler";
+import { useTimer } from "../hooks";
+import theme from "../../styles/theme";
 
 const Timer = ({ training }: { training: ITraining }) => {
-  const [time, timer] = useTimer({ tickPeriod: 100 })
+  const [time, timer] = useTimer({ tickPeriod: 100 });
 
   const [state, setState] = useState({
     exerciseList: [] as IExerciseItem[],
-    totalTime: 0
-  })
+    totalTime: 0,
+  });
 
   const rosie = useRef(
     new Howl({
-      src: ['/media/ROSIE.mp3'],
+      src: ["/media/ROSIE.mp3"],
       sprite: {
         ttt: [114, 2956 - 114],
         five: [10211, 10883 - 10211],
@@ -34,19 +34,19 @@ const Timer = ({ training }: { training: ITraining }) => {
         rest: [18988, 19615 - 18988],
         ninety: [24418, 25540 - 24418],
         sixty: [25791, 26831 - 25791],
-        thirty: [27027, 28250 - 27027]
-      }
+        thirty: [27027, 28250 - 27027],
+      },
     })
-  )
+  );
 
   useEffect(() => {
     //console.log("effect 1");
-    rosie.current.play('ttt')
-    const exerciseList = getExerciseList(training.blocks)
-    console.log(exerciseList)
-    const totalTime = getTrainingTime(exerciseList)
-    setState({ ...state, exerciseList, totalTime })
-  }, [training])
+    //rosie.current.play("ttt");
+    const exerciseList = getExerciseList(training.blocks);
+    console.log(exerciseList);
+    const totalTime = getTrainingTime(exerciseList);
+    setState({ ...state, exerciseList, totalTime });
+  }, [training]);
 
   //console.log("is it over?", time, state.totalTime, trainingOver);
 
@@ -54,71 +54,71 @@ const Timer = ({ training }: { training: ITraining }) => {
     currentExercise,
     previousExercise,
     nextExercise,
-    exerciseTime
-  } = getPosition(state.exerciseList, timer.time)
+    exerciseTime,
+  } = getPosition(state.exerciseList, timer.time);
   //console.log("aaa", time, currentExercise);
 
   useEffect(() => {
-    if (time > state.totalTime) stopTimer()
-    const countdown = currentExercise
-      ? currentExercise.duration + currentExercise.offset - timer.intTime + 1
-      : 0
-    if (timer.running && rosie.current && !rosie.current.playing()) {
-      if (exerciseTime < 1) {
-        if (currentExercise && currentExercise.exercise !== 'Rest')
-          rosie.current.play('go')
-        else rosie.current.play('rest')
-      } else if (countdown === 90) rosie.current.play('ninety')
-      else if (countdown === 60) rosie.current.play('sixty')
-      else if (countdown === 30) rosie.current.play('thirty')
-      else if (countdown === 5) rosie.current.play('five')
-      else if (countdown === 4) rosie.current.play('four')
-      else if (countdown === 3) rosie.current.play('three')
-      else if (countdown === 2) rosie.current.play('two')
-      else if (countdown === 1) rosie.current.play('one')
-    }
-  }, [time, timer.running])
-
-  const video: { current: VideoJsPlayer | undefined } = useRef()
+    if (time > state.totalTime) stopTimer();
+    // const countdown = currentExercise
+    //   ? currentExercise.duration + currentExercise.offset - timer.intTime + 1
+    //   : 0;
+    // if (timer.running && rosie.current && !rosie.current.playing()) {
+    //   if (exerciseTime < 1) {
+    //     if (currentExercise && currentExercise.exercise !== "Rest")
+    //       rosie.current.play("go");
+    //     else rosie.current.play("rest");
+    //   } else if (countdown === 90) rosie.current.play("ninety");
+    //   else if (countdown === 60) rosie.current.play("sixty");
+    //   else if (countdown === 30) rosie.current.play("thirty");
+    //   else if (countdown === 5) rosie.current.play("five");
+    //   else if (countdown === 4) rosie.current.play("four");
+    //   else if (countdown === 3) rosie.current.play("three");
+    //   else if (countdown === 2) rosie.current.play("two");
+    //   else if (countdown === 1) rosie.current.play("one");
+    // }
+  }, [time, timer.running]);
+
+  const video: { current: VideoJsPlayer | undefined } = useRef();
   //const audio: { current: Howl | undefined } = useRef();
 
   function startTimer() {
-    if (time >= state.totalTime) return
-    timer.start()
-    if (video.current) video.current.play()
+    if (time >= state.totalTime) return;
+    timer.start();
+    if (video.current) video.current.play();
     //if (audio.current) audio.current.play();
     //console.log("Timer started.");
   }
 
   function stopTimer() {
-    timer.stop()
-    if (video.current) video.current.pause()
+    timer.stop();
+    if (video.current) video.current.pause();
     //if (audio.current) audio.current.pause();
     //console.log("stopped");
   }
 
   function forward() {
     if (nextExercise) {
-      timer.setTime(nextExercise.offset)
+      timer.setTime(nextExercise.offset);
     }
   }
 
   function back() {
     if (previousExercise) {
-      timer.setTime(previousExercise.offset)
+      timer.setTime(previousExercise.offset);
     }
   }
 
   const videoSrc =
     currentExercise && currentExercise.video
       ? currentExercise.video
-      : '/media/block0.mp4'
+      : "/media/block0.mp4";
   //console.log("current state:", currentExercise, state);
 
   return (
-    <div id='timer'>
-      <h1>{(currentExercise && currentExercise.toplevelBlock) || 'Torture'}</h1>
-      <div id='flow'>
+    <div id="timer">
+      <h1>{(currentExercise && currentExercise.toplevelBlock) || "Torture"}</h1>
+      <div id="flow">
         <Countdown
           seconds={
             currentExercise ? currentExercise.duration - exerciseTime : 0
@@ -129,36 +129,36 @@ const Timer = ({ training }: { training: ITraining }) => {
           }
           onClick={timer.running ? stopTimer : startTimer}
         />
-        <div id='controls'>
+        <div id="controls">
           {/*<label htmlFor="rest">Rest</label>
         <input type="number" min="25" max="60" step="5" defaultValue="25" />*/}
           <button onClick={back} disabled={timer.running}>
             back
           </button>
           <button onClick={timer.running ? stopTimer : startTimer}>
-            {timer.running ? 'stop' : 'start'}
+            {timer.running ? "stop" : "start"}
           </button>
           <button onClick={forward} disabled={timer.running}>
             forward
           </button>
         </div>
         <h2>current exercise</h2>
-        <p className='exercise'>
-          {currentExercise ? currentExercise.exercise : '😎'}
+        <p className="exercise">
+          {currentExercise ? currentExercise.exercise : "😎"}
         </p>
         <h2>next up</h2>
-        <p className='exercise'>
-          {nextExercise ? nextExercise.exercise : '😎'}
+        <p className="exercise">
+          {nextExercise ? nextExercise.exercise : "😎"}
         </p>
       </div>
-      <div id='description'>
+      <div id="description">
         <VideoPlayer
           src={videoSrc}
           getVideoHandle={(videoHandle: VideoJsPlayer) =>
             (video.current = videoHandle)
           }
         />
-        <p className='description'>
+        <p className="description">
           {currentExercise && currentExercise.description}
         </p>
       </div>
@@ -234,7 +234,7 @@ const Timer = ({ training }: { training: ITraining }) => {
         }
       `}</style>
     </div>
-  )
-}
+  );
+};
 
-export default Timer
+export default Timer;

+ 21 - 21
frontend/src/timer/components/VideoPlayer.tsx

@@ -1,14 +1,14 @@
-import { useRef, useEffect } from 'react'
-import videojs, { VideoJsPlayer } from 'video.js'
+import { useRef, useEffect } from "react";
+import videojs, { VideoJsPlayer } from "video.js";
 
 interface IVideoPlayer {
-  src: string
-  getVideoHandle: (videoHandle: VideoJsPlayer) => void
+  src: string;
+  getVideoHandle: (videoHandle: VideoJsPlayer) => void;
 }
 
 const VideoPlayer = ({ getVideoHandle, src }: IVideoPlayer) => {
-  const videoPlayerRef = useRef()
-  const video: { current: VideoJsPlayer | undefined } = useRef()
+  const videoPlayerRef = useRef();
+  const video: { current: VideoJsPlayer | undefined } = useRef();
 
   /**
    * Initial effect creates the player and returns a handle
@@ -19,33 +19,33 @@ const VideoPlayer = ({ getVideoHandle, src }: IVideoPlayer) => {
       width: 512,
       loop: true,
       controls: true,
-      muted: true
-    })
-    getVideoHandle(videoPlayer)
-    video.current = videoPlayer
+      muted: false,
+    });
+    getVideoHandle(videoPlayer);
+    video.current = videoPlayer;
     return () => {
-      if (videoPlayer) videoPlayer.dispose()
-    }
-  }, [])
+      if (videoPlayer) videoPlayer.dispose();
+    };
+  }, []);
 
   useEffect(() => {
     if (video.current) {
-      const paused = video.current.paused()
-      video.current.src(src)
-      if (!paused) video.current.play()
+      const paused = video.current.paused();
+      video.current.src(src);
+      if (!paused) video.current.play();
     }
-  }, [src])
+  }, [src]);
 
   return (
     <div data-vjs-player>
-      <video ref={videoPlayerRef as any} className='video-js vjs-16-9' />
+      <video ref={videoPlayerRef as any} className="video-js vjs-16-9" />
       <style jsx>{`
         div {
           max-width: 100vw;
         }
       `}</style>
     </div>
-  )
-}
+  );
+};
 
-export default VideoPlayer
+export default VideoPlayer;

+ 51 - 49
frontend/src/timer/utils.ts

@@ -1,6 +1,6 @@
-import { IBlock } from '../training/types'
-import { calculateDuration } from '../training/utils'
-import { IExerciseItem } from './types'
+import { IBlock } from "../training/types";
+import { calculateDuration } from "../training/utils";
+import { IExerciseItem } from "./types";
 
 /**
  * Find the right exercise given a certain time.
@@ -9,25 +9,25 @@ import { IExerciseItem } from './types'
  */
 export function getPosition(exerciseList: IExerciseItem[], time: number) {
   const index = exerciseList.findIndex(
-    exercise => time < exercise.offset + exercise.duration
-  )
+    (exercise) => time < exercise.offset + exercise.duration
+  );
 
-  const previousExercise = index >= 1 ? exerciseList[index - 1] : null
-  const currentExercise = index >= 0 ? exerciseList[index] : null
+  const previousExercise = index >= 1 ? exerciseList[index - 1] : null;
+  const currentExercise = index >= 0 ? exerciseList[index] : null;
   const nextExercise =
     index >= 0 && index < exerciseList.length - 1
       ? exerciseList[index + 1]
-      : null
+      : null;
   const values = {
     currentExercise,
     nextExercise,
     previousExercise,
-    exerciseTime: 0
-  }
+    exerciseTime: 0,
+  };
   if (currentExercise !== null) {
-    values.exerciseTime = Math.max(time - currentExercise.offset, 0)
+    values.exerciseTime = Math.max(time - currentExercise.offset, 0);
   }
-  return values
+  return values;
 }
 
 /**
@@ -38,69 +38,71 @@ export function getPosition(exerciseList: IExerciseItem[], time: number) {
 export function getExerciseList(
   blocks: IBlock[],
   initialOffset = 0,
-  toplevelBlock: undefined | string = undefined
+  toplevelBlock: undefined | string = undefined,
+  video?: undefined | string
 ): IExerciseItem[] {
-  let offset = initialOffset
+  let offset = initialOffset;
   return blocks
-    .map(block => {
+    .map((block) => {
       if (block.blocks) {
-        const blockArray = []
+        const blockArray = [];
         for (let i = 0; i < (block.repetitions || 1); i++) {
           const subBlocks = getExerciseList(
             block.blocks,
             offset,
-            toplevelBlock || block.title
-          )
-          const lastItem = subBlocks[subBlocks.length - 1]
-          offset = lastItem.offset + lastItem.duration
+            toplevelBlock || block.title,
+            video || block.video
+          );
+          const lastItem = subBlocks[subBlocks.length - 1];
+          offset = lastItem.offset + lastItem.duration;
           if (block.rest) {
-            if (lastItem.exercise === 'Rest') {
-              lastItem.duration += block.rest
-              offset += block.rest
+            if (lastItem.exercise === "Rest") {
+              lastItem.duration += block.rest;
+              offset += block.rest;
             } else {
               subBlocks.push({
-                exercise: 'Rest',
+                exercise: "Rest",
                 toplevelBlock: toplevelBlock || block.title,
                 duration: block.rest,
-                offset
-              })
-              offset += block.rest
+                offset,
+              });
+              offset += block.rest;
             }
           }
-          blockArray.push(subBlocks)
+          blockArray.push(subBlocks);
         }
-        return blockArray.flat()
+        return blockArray.flat();
       } else if (block.exercises) {
-        const blockArray: IExerciseItem[] = []
+        const blockArray: IExerciseItem[] = [];
         const newItem = {
           exercise: block.exercises
-            .map(exercise =>
+            .map((exercise) =>
               exercise.repetitions > 1
                 ? `${exercise.repetitions}x ${exercise.name}`
                 : exercise.name
             )
-            .join(' - '),
+            .join(" - "),
           duration: calculateDuration(block),
-          video: block.video,
+          video: video || block.video,
           description: block.description,
           toplevelBlock: toplevelBlock || block.title,
-          offset
-        }
+          offset,
+        };
         for (let i = 0; i < (block.repetitions || 1); i++) {
-          blockArray.push({ ...newItem, offset })
-          offset += newItem.duration
+          blockArray.push({ ...newItem, offset });
+          offset += newItem.duration;
         }
-        return blockArray.flat()
+        return blockArray.flat();
       }
     })
-    .flat()
+    .flat();
 }
 
 export function getTrainingTime(exercises: IExerciseItem[]) {
   return exercises.reduce(
     (accumulator, exercise) => accumulator + exercise.duration,
     0
-  )
+  );
 }
 
 export function polarToCartesian(
@@ -109,12 +111,12 @@ export function polarToCartesian(
   radius: number,
   angleInDegrees: number
 ) {
-  const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0
+  const angleInRadians = ((angleInDegrees - 90) * Math.PI) / 180.0;
 
   return {
     x: centerX + radius * Math.cos(angleInRadians),
-    y: centerY + radius * Math.sin(angleInRadians)
-  }
+    y: centerY + radius * Math.sin(angleInRadians),
+  };
 }
 
 export function describeArc(
@@ -124,16 +126,16 @@ export function describeArc(
   startAngle: number,
   endAngle: number
 ) {
-  const start = polarToCartesian(x, y, radius, endAngle)
-  const end = polarToCartesian(x, y, radius, startAngle)
+  const start = polarToCartesian(x, y, radius, endAngle);
+  const end = polarToCartesian(x, y, radius, startAngle);
 
-  const largeArcFlag = endAngle - startAngle <= 180 ? '0' : '1'
+  const largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
 
-  const arcString = `M ${start.x} ${start.y} A ${radius} ${radius} 0 ${largeArcFlag} 0 ${end.x} ${end.y}`
+  const arcString = `M ${start.x} ${start.y} A ${radius} ${radius} 0 ${largeArcFlag} 0 ${end.x} ${end.y}`;
 
-  return arcString
+  return arcString;
 }
 
 export function limit(value: number, min: number, max: number) {
-  return Math.min(Math.max(min, value), max)
+  return Math.min(Math.max(min, value), max);
 }