Move generic packages from frc971/analysis to aos

To eliminate a dependency of aos on frc971.

Signed-off-by: Stephan Pleines <pleines.stephan@gmail.com>
Change-Id: Ic4a8f75da29f8e8c6675d96f02824cd08a9b99be
diff --git a/aos/analysis/cpp_plot/BUILD b/aos/analysis/cpp_plot/BUILD
new file mode 100644
index 0000000..7286aaf
--- /dev/null
+++ b/aos/analysis/cpp_plot/BUILD
@@ -0,0 +1,42 @@
+load("//tools/build_rules:js.bzl", "rollup_bundle", "ts_project")
+
+package(default_visibility = ["//visibility:public"])
+
+ts_project(
+    name = "cpp_plot",
+    srcs = ["cpp_plot.ts"],
+    target_compatible_with = ["@platforms//os:linux"],
+    deps = [
+        "//aos:configuration_ts_fbs",
+        "//aos/analysis:plot_data_utils",
+        "//aos/network/www:proxy",
+    ],
+)
+
+rollup_bundle(
+    name = "cpp_plot_bundle",
+    entry_point = "cpp_plot.ts",
+    target_compatible_with = ["@platforms//os:linux"],
+    deps = [
+        ":cpp_plot",
+    ],
+)
+
+genrule(
+    name = "copy_css",
+    srcs = [
+        "//aos/network/www:styles.css",
+    ],
+    outs = ["styles.css"],
+    cmd = "cp $< $@",
+)
+
+filegroup(
+    name = "cpp_plot_files",
+    srcs = [
+        "cpp_plot_bundle.js",
+        "cpp_plot_bundle.min.js",
+        "index.html",
+        "styles.css",
+    ],
+)