aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
l---------.direnv/flake-profile2
-rw-r--r--.direnv/flake-profile.rc8
-rw-r--r--flake.nix1
-rw-r--r--frontend/elm.json8
-rw-r--r--frontend/index.html14
-rw-r--r--frontend/main.js4743
-rw-r--r--frontend/src/Cart.elm7
-rw-r--r--frontend/src/Catalog.elm62
-rw-r--r--frontend/src/Checkout.elm7
-rw-r--r--frontend/src/Icons.elm15
-rw-r--r--frontend/src/Login.elm41
-rw-r--r--frontend/src/Main.elm125
-rw-r--r--frontend/src/Product.elm35
-rw-r--r--frontend/src/Signup.elm49
-rw-r--r--frontend/src/Styles.elm104
-rw-r--r--frontend/src/Utils.elm45
16 files changed, 4752 insertions, 514 deletions
diff --git a/.direnv/flake-profile b/.direnv/flake-profile
index 7aec4fe..3acfcc6 120000
--- a/.direnv/flake-profile
+++ b/.direnv/flake-profile
@@ -1 +1 @@
/nix/store/fmh668db3snwbcfmfwnnkmhi4y6kbxf9-furby-env \ No newline at end of file /nix/store/ck72qhxrnv0z2nahfid0f8nk8q9d92pl-furby-env \ No newline at end of file
diff --git a/.direnv/flake-profile.rc b/.direnv/flake-profile.rc
index a353053..cc4e338 100644
--- a/.direnv/flake-profile.rc
+++ b/.direnv/flake-profile.rc
@@ -16,7 +16,7 @@ export DETERMINISTIC_BUILD
16DIRSTACK=() 16DIRSTACK=()
17GROUPS=() 17GROUPS=()
18HOSTTYPE=x86_64 18HOSTTYPE=x86_64
19HOST_PATH=/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1/bin:/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1/bin:/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3/bin:/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3/bin:/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1/bin:/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2/bin:/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0/bin:/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84/bin:/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2/bin:/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin/bin:/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0/bin:/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2/bin:/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4/bin:/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0/bin:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/bin:/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin/bin:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/bin:/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17/bin:/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin/bin:/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0/bin:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/bin:/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/97vambzyvpvrd9wgrrw7i7svi0s8vny5-findutils-4.7.0/bin:/nix/store/dqq1bvpi3g0h4v05111b3i0ymqj4v5x1-diffutils-3.7/bin:/nix/store/p34p7ysy84579lndk7rbrz6zsfr03y71-gnused-4.8/bin:/nix/store/b0vjq4r4sp9z4l2gbkc5dyyw5qfgyi3r-gnugrep-3.4/bin:/nix/store/c8balm59sxfkw9ik1fqbkadsvjqhmbx4-gawk-5.0.1/bin:/nix/store/g7dr83wnkx4gxa5ykcljc5jg04416z60-gnutar-1.32/bin:/nix/store/kkvgr3avpp7yd5hzmc4syh43jqj03sgb-gzip-1.10/bin:/nix/store/rw96psqzgyqrcd12qr6ivk9yiskjm3ab-bzip2-1.0.6.0.1-bin/bin:/nix/store/dp6y0n9cba79wwc54n1brg7xbjsq5hka-gnumake-4.2.1/bin:/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin:/nix/store/xac1zfclx1xxgcd84vqb6hy3apl171n8-patch-2.7.6/bin:/nix/store/mm0w8jc58rn01c4kz2n9jvwd6bibcihs-xz-5.2.4-bin/bin 19HOST_PATH=/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1/bin:/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1/bin:/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3/bin:/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3/bin:/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1/bin:/nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2/bin:/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2/bin:/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0/bin:/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84/bin:/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2/bin:/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin/bin:/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0/bin:/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2/bin:/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4/bin:/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0/bin:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/bin:/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin/bin:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/bin:/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17/bin:/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin/bin:/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0/bin:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/bin:/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/97vambzyvpvrd9wgrrw7i7svi0s8vny5-findutils-4.7.0/bin:/nix/store/dqq1bvpi3g0h4v05111b3i0ymqj4v5x1-diffutils-3.7/bin:/nix/store/p34p7ysy84579lndk7rbrz6zsfr03y71-gnused-4.8/bin:/nix/store/b0vjq4r4sp9z4l2gbkc5dyyw5qfgyi3r-gnugrep-3.4/bin:/nix/store/c8balm59sxfkw9ik1fqbkadsvjqhmbx4-gawk-5.0.1/bin:/nix/store/g7dr83wnkx4gxa5ykcljc5jg04416z60-gnutar-1.32/bin:/nix/store/kkvgr3avpp7yd5hzmc4syh43jqj03sgb-gzip-1.10/bin:/nix/store/rw96psqzgyqrcd12qr6ivk9yiskjm3ab-bzip2-1.0.6.0.1-bin/bin:/nix/store/dp6y0n9cba79wwc54n1brg7xbjsq5hka-gnumake-4.2.1/bin:/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin:/nix/store/xac1zfclx1xxgcd84vqb6hy3apl171n8-patch-2.7.6/bin:/nix/store/mm0w8jc58rn01c4kz2n9jvwd6bibcihs-xz-5.2.4-bin/bin
20export HOST_PATH 20export HOST_PATH
21IFS=$' \t\n' 21IFS=$' \t\n'
22IN_NIX_SHELL=impure 22IN_NIX_SHELL=impure
@@ -57,7 +57,7 @@ export OBJDUMP
57OPTERR=1 57OPTERR=1
58OPTIND=1 58OPTIND=1
59OSTYPE=linux-gnu 59OSTYPE=linux-gnu
60PATH=/nix/store/71n1xcigc00w3z7yc836jqcx9cb2dys8-patchelf-0.9/bin:/nix/store/m6h7zh8w6s52clnyskffj5lbkakqgywn-gcc-wrapper-9.2.0/bin:/nix/store/b3zsk4ihlpiimv3vff86bb5bxghgdzb9-gcc-9.2.0/bin:/nix/store/0k65d30z9xsixil10yw3bwajbdk4yskv-glibc-2.30-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/n48b8n251dwwb04q7f3fwxdmirsakllz-binutils-wrapper-2.31.1/bin:/nix/store/hrkc2sf2883l16d5yq3zg0y339kfw4xv-binutils-2.31.1/bin:/nix/store/0k65d30z9xsixil10yw3bwajbdk4yskv-glibc-2.30-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1/bin:/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1/bin:/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3/bin:/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3/bin:/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1/bin:/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2/bin:/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0/bin:/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84/bin:/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2/bin:/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin/bin:/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0/bin:/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2/bin:/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4/bin:/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0/bin:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/bin:/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin/bin:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/bin:/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17/bin:/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin/bin:/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0/bin:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/bin:/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/97vambzyvpvrd9wgrrw7i7svi0s8vny5-findutils-4.7.0/bin:/nix/store/dqq1bvpi3g0h4v05111b3i0ymqj4v5x1-diffutils-3.7/bin:/nix/store/p34p7ysy84579lndk7rbrz6zsfr03y71-gnused-4.8/bin:/nix/store/b0vjq4r4sp9z4l2gbkc5dyyw5qfgyi3r-gnugrep-3.4/bin:/nix/store/c8balm59sxfkw9ik1fqbkadsvjqhmbx4-gawk-5.0.1/bin:/nix/store/g7dr83wnkx4gxa5ykcljc5jg04416z60-gnutar-1.32/bin:/nix/store/kkvgr3avpp7yd5hzmc4syh43jqj03sgb-gzip-1.10/bin:/nix/store/rw96psqzgyqrcd12qr6ivk9yiskjm3ab-bzip2-1.0.6.0.1-bin/bin:/nix/store/dp6y0n9cba79wwc54n1brg7xbjsq5hka-gnumake-4.2.1/bin:/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin:/nix/store/xac1zfclx1xxgcd84vqb6hy3apl171n8-patch-2.7.6/bin:/nix/store/mm0w8jc58rn01c4kz2n9jvwd6bibcihs-xz-5.2.4-bin/bin 60PATH=/nix/store/71n1xcigc00w3z7yc836jqcx9cb2dys8-patchelf-0.9/bin:/nix/store/m6h7zh8w6s52clnyskffj5lbkakqgywn-gcc-wrapper-9.2.0/bin:/nix/store/b3zsk4ihlpiimv3vff86bb5bxghgdzb9-gcc-9.2.0/bin:/nix/store/0k65d30z9xsixil10yw3bwajbdk4yskv-glibc-2.30-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/n48b8n251dwwb04q7f3fwxdmirsakllz-binutils-wrapper-2.31.1/bin:/nix/store/hrkc2sf2883l16d5yq3zg0y339kfw4xv-binutils-2.31.1/bin:/nix/store/0k65d30z9xsixil10yw3bwajbdk4yskv-glibc-2.30-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1/bin:/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1/bin:/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3/bin:/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3/bin:/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1/bin:/nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2/bin:/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2/bin:/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0/bin:/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84/bin:/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2/bin:/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin/bin:/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0/bin:/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2/bin:/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/bin:/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4/bin:/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0/bin:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/bin:/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin/bin:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/bin:/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17/bin:/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin/bin:/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0/bin:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/bin:/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin/bin:/nix/store/x0jla3hpxrwz76hy9yckg1iyc9hns81k-coreutils-8.31/bin:/nix/store/97vambzyvpvrd9wgrrw7i7svi0s8vny5-findutils-4.7.0/bin:/nix/store/dqq1bvpi3g0h4v05111b3i0ymqj4v5x1-diffutils-3.7/bin:/nix/store/p34p7ysy84579lndk7rbrz6zsfr03y71-gnused-4.8/bin:/nix/store/b0vjq4r4sp9z4l2gbkc5dyyw5qfgyi3r-gnugrep-3.4/bin:/nix/store/c8balm59sxfkw9ik1fqbkadsvjqhmbx4-gawk-5.0.1/bin:/nix/store/g7dr83wnkx4gxa5ykcljc5jg04416z60-gnutar-1.32/bin:/nix/store/kkvgr3avpp7yd5hzmc4syh43jqj03sgb-gzip-1.10/bin:/nix/store/rw96psqzgyqrcd12qr6ivk9yiskjm3ab-bzip2-1.0.6.0.1-bin/bin:/nix/store/dp6y0n9cba79wwc54n1brg7xbjsq5hka-gnumake-4.2.1/bin:/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin:/nix/store/xac1zfclx1xxgcd84vqb6hy3apl171n8-patch-2.7.6/bin:/nix/store/mm0w8jc58rn01c4kz2n9jvwd6bibcihs-xz-5.2.4-bin/bin
61export PATH 61export PATH
62PIPESTATUS=([0]="0") 62PIPESTATUS=([0]="0")
63PKG_CONFIG_PATH=/nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev/lib/pkgconfig:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/pkgconfig:/nix/store/jkdfz5x727qwbsc121xd95j01kx8c6v5-libffi-3.3-dev/lib/pkgconfig:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/lib/pkgconfig:/nix/store/12xzgyza4hb47vk9gw61z90spr6712lm-nghttp2-1.40.0-dev/lib/pkgconfig:/nix/store/fkbpg2lx585gr28fmcs610zk88jl9bd7-zlib-1.2.11-dev/lib/pkgconfig:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/lib/pkgconfig:/nix/store/6wqaybiqw6hcrlxwf9jrnjlci7kq0h6i-libssh2-1.9.0-dev/lib/pkgconfig:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/lib/pkgconfig 63PKG_CONFIG_PATH=/nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev/lib/pkgconfig:/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6/lib/pkgconfig:/nix/store/jkdfz5x727qwbsc121xd95j01kx8c6v5-libffi-3.3-dev/lib/pkgconfig:/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev/lib/pkgconfig:/nix/store/12xzgyza4hb47vk9gw61z90spr6712lm-nghttp2-1.40.0-dev/lib/pkgconfig:/nix/store/fkbpg2lx585gr28fmcs610zk88jl9bd7-zlib-1.2.11-dev/lib/pkgconfig:/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev/lib/pkgconfig:/nix/store/6wqaybiqw6hcrlxwf9jrnjlci7kq0h6i-libssh2-1.9.0-dev/lib/pkgconfig:/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5/lib/pkgconfig
@@ -84,7 +84,7 @@ export STRINGS
84STRIP=strip 84STRIP=strip
85export STRIP 85export STRIP
86_=export 86_=export
87buildInputs='/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1 /nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1 /nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3 /nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3 /nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1 /nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2 /nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0 /nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84 /nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2 /nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev /nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0 /nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev /nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0 /nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5 /nix/store/88lhpbmlgpan34a8j5kgzb07sc0zlb5y-jq-1.6-dev /nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6' 87buildInputs='/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1 /nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1 /nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3 /nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3 /nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1 /nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2 /nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2 /nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0 /nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84 /nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2 /nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev /nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0 /nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev /nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0 /nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5 /nix/store/88lhpbmlgpan34a8j5kgzb07sc0zlb5y-jq-1.6-dev /nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6'
88export buildInputs 88export buildInputs
89builder=/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin/bash 89builder=/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin/bash
90export builder 90export builder
@@ -141,7 +141,7 @@ patches=
141export patches 141export patches
142pkg=/nix/store/m6h7zh8w6s52clnyskffj5lbkakqgywn-gcc-wrapper-9.2.0 142pkg=/nix/store/m6h7zh8w6s52clnyskffj5lbkakqgywn-gcc-wrapper-9.2.0
143pkgsBuildHost=([0]="/nix/store/71n1xcigc00w3z7yc836jqcx9cb2dys8-patchelf-0.9" [1]="/nix/store/mjjy30kxz775bhhi6j9phw81qh6dsbrf-move-docs.sh" [2]="/nix/store/kxw6q8v6isaqjm702d71n2421cxamq68-make-symlinks-relative.sh" [3]="/nix/store/rvg5a5nwa7cihpmbzlwzh931w3g4q108-compress-man-pages.sh" [4]="/nix/store/4ygqr4w06zwcd2kcxa6w3441jijv0pvx-strip.sh" [5]="/nix/store/g6hzqyjd3ricwbs0bbx4806fiwg15vnc-patch-shebangs.sh" [6]="/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh" [7]="/nix/store/8zxndz5ag0p6s526c2xyllhk1nrn4c3i-audit-tmpdir.sh" [8]="/nix/store/aknix5zw9cj7hd1m3h1d6nnmncl1vkvn-multiple-outputs.sh" [9]="/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh" [10]="/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh" [11]="/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh" [12]="/nix/store/m6h7zh8w6s52clnyskffj5lbkakqgywn-gcc-wrapper-9.2.0" [13]="/nix/store/n48b8n251dwwb04q7f3fwxdmirsakllz-binutils-wrapper-2.31.1") 143pkgsBuildHost=([0]="/nix/store/71n1xcigc00w3z7yc836jqcx9cb2dys8-patchelf-0.9" [1]="/nix/store/mjjy30kxz775bhhi6j9phw81qh6dsbrf-move-docs.sh" [2]="/nix/store/kxw6q8v6isaqjm702d71n2421cxamq68-make-symlinks-relative.sh" [3]="/nix/store/rvg5a5nwa7cihpmbzlwzh931w3g4q108-compress-man-pages.sh" [4]="/nix/store/4ygqr4w06zwcd2kcxa6w3441jijv0pvx-strip.sh" [5]="/nix/store/g6hzqyjd3ricwbs0bbx4806fiwg15vnc-patch-shebangs.sh" [6]="/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh" [7]="/nix/store/8zxndz5ag0p6s526c2xyllhk1nrn4c3i-audit-tmpdir.sh" [8]="/nix/store/aknix5zw9cj7hd1m3h1d6nnmncl1vkvn-multiple-outputs.sh" [9]="/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh" [10]="/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh" [11]="/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh" [12]="/nix/store/m6h7zh8w6s52clnyskffj5lbkakqgywn-gcc-wrapper-9.2.0" [13]="/nix/store/n48b8n251dwwb04q7f3fwxdmirsakllz-binutils-wrapper-2.31.1")
144pkgsHostTarget=([0]="/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1" [1]="/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1" [2]="/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3" [3]="/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3" [4]="/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1" [5]="/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2" [6]="/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0" [7]="/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84" [8]="/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2" [9]="/nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev" [10]="/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin" [11]="/nix/store/0x3bf23q5lmdq77x5icr7c0ngvz25ms3-openssl-1.1.1g" [12]="/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0" [13]="/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2" [14]="/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16" [15]="/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6" [16]="/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6" [17]="/nix/store/a6xvh7znlpdipwyncxz44sprfbvg15fa-python3.7-requests-2.22.0" [18]="/nix/store/7jlkn8dz8gsv3h18sr772x3v9n9ac10i-python3.7-urllib3-1.25.8" [19]="/nix/store/qyp3bcn7qq5lryqimd1ddlbbmd6r57zr-python3.7-pyOpenSSL-19.1.0-dev" [20]="/nix/store/pb90x5cn1znp2hpb8jdgnlamv9qwg7za-python3.7-cryptography-2.8-dev" [21]="/nix/store/0bngdpmsypycaqcgs4jwxvnpzvgw68sn-python3.7-packaging-20.1" [22]="/nix/store/4cv3k9hb741kq5f161pvzlfmnx0198sx-python3.7-pyparsing-2.4.6" [23]="/nix/store/qcg29y1va5hsk882sh68w683zgm7ma00-python3.7-six-1.14.0" [24]="/nix/store/qcg29y1va5hsk882sh68w683zgm7ma00-python3.7-six-1.14.0" [25]="/nix/store/awck465fagj1rl9xgvfg9dnclw8i4w04-python3.7-cffi-1.13.2-dev" [26]="/nix/store/jkdfz5x727qwbsc121xd95j01kx8c6v5-libffi-3.3-dev" [27]="/nix/store/j2fdy70n25zaws892dc95yhj0gfhdxg6-libffi-3.3" [28]="/nix/store/j35bi1s8azhbvcmalmmjfaxp1w1y3k6y-python3.7-pycparser-2.19" [29]="/nix/store/8wz0jhcc13q3j5cx54fkg0n95s4srr8q-python3.7-cffi-1.13.2" [30]="/nix/store/j120qpj9y4hnhch85mxy20hjzc4nfi33-python3.7-cryptography-2.8" [31]="/nix/store/faga777zw6vbvm3n63c7kyvwzzlvpikn-python3.7-pyasn1-0.4.8" [32]="/nix/store/py5py6kkf8yc3284i6v1zh1lraym2nr4-python3.7-idna-2.8" [33]="/nix/store/2qjbjrhx2lqh8jj2r5f40b46y54ic0zk-python3.7-pyOpenSSL-19.1.0" [34]="/nix/store/wmy1bka21pkcvfj24rdp883yvf12fkhs-python3.7-certifi-2019.11.28" [35]="/nix/store/zalgg8wkgnsda8l88n64wzdpmgrf5sd1-python3.7-pysocks-1.7.1" [36]="/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4" [37]="/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0" [38]="/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev" [39]="/nix/store/12xzgyza4hb47vk9gw61z90spr6712lm-nghttp2-1.40.0-dev" [40]="/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin" [41]="/nix/store/qkpfyg67ff3c0wjsy68a61rx01f1cc31-nghttp2-1.40.0-lib" [42]="/nix/store/fkbpg2lx585gr28fmcs610zk88jl9bd7-zlib-1.2.11-dev" [43]="/nix/store/msp4hm62a75pdidlc3s2ymma2g5hsjjk-zlib-1.2.11" [44]="/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev" [45]="/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17" [46]="/nix/store/6wqaybiqw6hcrlxwf9jrnjlci7kq0h6i-libssh2-1.9.0-dev" [47]="/nix/store/fnn6zvyds5sy7mgvl4h2qslmlsaf0dc8-libssh2-1.9.0" [48]="/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin" [49]="/nix/store/bcqgqdzmhd9smr51snjcy2q2cbrwy47j-curl-7.70.0" [50]="/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0" [51]="/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5" [52]="/nix/store/88lhpbmlgpan34a8j5kgzb07sc0zlb5y-jq-1.6-dev" [53]="/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin" [54]="/nix/store/7cj4dviicvhga78l899arar4q5kggbc5-jq-1.6-lib") 144pkgsHostTarget=([0]="/nix/store/a2lib0a6hz63ws39jkrnazxz1yy5jmnd-tokei-10.1.1" [1]="/nix/store/603kisq28l3prqr92z5hffh7fmwwsc9f-elm-0.19.1" [2]="/nix/store/amj35xgl7bhifnih0mh39j8kbvsvg2xn-node__at_elm-tooling_slash_elm-language-server-1.6.3" [3]="/nix/store/hzxpv4ha44w9pg8ynkfsgjhi3kb13h27-elm-format-0.8.3" [4]="/nix/store/w3sh9aki5wrchcrq2wlg2xb394f8brh4-node_elm-oracle-1.1.1" [5]="/nix/store/i9yrws3iwvbr6w68810a7d8sf31fqw9n-node_elm-live-4.0.2" [6]="/nix/store/3yl8y2fkc1wsyqm008is2pdw5dja2icy-node_elm-test-0.19.1-revision2" [7]="/nix/store/p60x886haaibkxg99mkaby1hyc9dal7w-cargo-1.41.0" [8]="/nix/store/zgqj5vbrw9lq6dyczd5ixrvq8hcbrn6r-rust-1.50.0-nightly-2020-12-22-bb1fbbf84" [9]="/nix/store/6dacwd7ldb2jazc218d11v2w2g55hba8-pkg-config-0.29.2" [10]="/nix/store/jzfmcy71n7msc1jq9bixg7hw8dghl94b-openssl-1.1.1g-dev" [11]="/nix/store/cfkappcqwnk1kmnnqqwxrg73fjdsa2am-openssl-1.1.1g-bin" [12]="/nix/store/0x3bf23q5lmdq77x5icr7c0ngvz25ms3-openssl-1.1.1g" [13]="/nix/store/397rckak3lmv21878y58r6iyjmiwsq9a-httpie-2.0.0" [14]="/nix/store/wh1jpkqaj1jina7cbnl8vb3mfly5yllg-python3.7-Pygments-2.5.2" [15]="/nix/store/hdi0fgnjp73hcw03fjxqjxmdx0f0792x-python3.7-docutils-0.16" [16]="/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6" [17]="/nix/store/r94aa2gj4drkhfvkm2p4ab6cblb6kxlq-python3-3.7.6" [18]="/nix/store/a6xvh7znlpdipwyncxz44sprfbvg15fa-python3.7-requests-2.22.0" [19]="/nix/store/7jlkn8dz8gsv3h18sr772x3v9n9ac10i-python3.7-urllib3-1.25.8" [20]="/nix/store/qyp3bcn7qq5lryqimd1ddlbbmd6r57zr-python3.7-pyOpenSSL-19.1.0-dev" [21]="/nix/store/pb90x5cn1znp2hpb8jdgnlamv9qwg7za-python3.7-cryptography-2.8-dev" [22]="/nix/store/0bngdpmsypycaqcgs4jwxvnpzvgw68sn-python3.7-packaging-20.1" [23]="/nix/store/4cv3k9hb741kq5f161pvzlfmnx0198sx-python3.7-pyparsing-2.4.6" [24]="/nix/store/qcg29y1va5hsk882sh68w683zgm7ma00-python3.7-six-1.14.0" [25]="/nix/store/qcg29y1va5hsk882sh68w683zgm7ma00-python3.7-six-1.14.0" [26]="/nix/store/awck465fagj1rl9xgvfg9dnclw8i4w04-python3.7-cffi-1.13.2-dev" [27]="/nix/store/jkdfz5x727qwbsc121xd95j01kx8c6v5-libffi-3.3-dev" [28]="/nix/store/j2fdy70n25zaws892dc95yhj0gfhdxg6-libffi-3.3" [29]="/nix/store/j35bi1s8azhbvcmalmmjfaxp1w1y3k6y-python3.7-pycparser-2.19" [30]="/nix/store/8wz0jhcc13q3j5cx54fkg0n95s4srr8q-python3.7-cffi-1.13.2" [31]="/nix/store/j120qpj9y4hnhch85mxy20hjzc4nfi33-python3.7-cryptography-2.8" [32]="/nix/store/faga777zw6vbvm3n63c7kyvwzzlvpikn-python3.7-pyasn1-0.4.8" [33]="/nix/store/py5py6kkf8yc3284i6v1zh1lraym2nr4-python3.7-idna-2.8" [34]="/nix/store/2qjbjrhx2lqh8jj2r5f40b46y54ic0zk-python3.7-pyOpenSSL-19.1.0" [35]="/nix/store/wmy1bka21pkcvfj24rdp883yvf12fkhs-python3.7-certifi-2019.11.28" [36]="/nix/store/zalgg8wkgnsda8l88n64wzdpmgrf5sd1-python3.7-pysocks-1.7.1" [37]="/nix/store/8dmmabfb8g3xcpsacnh4ipflkmai2465-python3.7-chardet-3.0.4" [38]="/nix/store/lhc4xx6amd80ynbhz0a0xfz5s16dq98c-python3.7-setuptools-44.0.0" [39]="/nix/store/1x1xwd4dlp6p2ddh40qnxiv22mmc8pa2-curl-7.70.0-dev" [40]="/nix/store/12xzgyza4hb47vk9gw61z90spr6712lm-nghttp2-1.40.0-dev" [41]="/nix/store/k9f38hll2169jqqj72g7wx16nxavpw04-nghttp2-1.40.0-bin" [42]="/nix/store/qkpfyg67ff3c0wjsy68a61rx01f1cc31-nghttp2-1.40.0-lib" [43]="/nix/store/fkbpg2lx585gr28fmcs610zk88jl9bd7-zlib-1.2.11-dev" [44]="/nix/store/msp4hm62a75pdidlc3s2ymma2g5hsjjk-zlib-1.2.11" [45]="/nix/store/gnqgyxda6la4gw6hjh4gpmmlcnjbqn2a-libkrb5-1.17-dev" [46]="/nix/store/bxjyac4385pw8cwrlgm7d18bmmndf4p5-libkrb5-1.17" [47]="/nix/store/6wqaybiqw6hcrlxwf9jrnjlci7kq0h6i-libssh2-1.9.0-dev" [48]="/nix/store/fnn6zvyds5sy7mgvl4h2qslmlsaf0dc8-libssh2-1.9.0" [49]="/nix/store/6vv8yimyaa41iwhwki9y79z8xrl9zwca-curl-7.70.0-bin" [50]="/nix/store/bcqgqdzmhd9smr51snjcy2q2cbrwy47j-curl-7.70.0" [51]="/nix/store/cb0msm7sk8032nm850rnv4b23j50bbmx-diesel-cli-1.4.0" [52]="/nix/store/3kbd6k80dqs6v01agxi0f2bgsq16hi13-mariadb-connector-c-3.1.5" [53]="/nix/store/88lhpbmlgpan34a8j5kgzb07sc0zlb5y-jq-1.6-dev" [54]="/nix/store/pdg3mr2vsm7g8sh0q3ysac9dw0pl3c1i-jq-1.6-bin" [55]="/nix/store/7cj4dviicvhga78l899arar4q5kggbc5-jq-1.6-lib")
145postFixupHooks=([0]="_multioutPropagateDev") 145postFixupHooks=([0]="_multioutPropagateDev")
146postUnpackHooks=([0]="_updateSourceDateEpochFromSourceRoot") 146postUnpackHooks=([0]="_updateSourceDateEpochFromSourceRoot")
147preConfigureHooks=([0]="_multioutConfig") 147preConfigureHooks=([0]="_multioutConfig")
diff --git a/flake.nix b/flake.nix
index be3d328..f5843e0 100644
--- a/flake.nix
+++ b/flake.nix
@@ -24,6 +24,7 @@
24 elmPackages.elm-language-server 24 elmPackages.elm-language-server
25 elmPackages.elm-format 25 elmPackages.elm-format
26 nodePackages.elm-oracle 26 nodePackages.elm-oracle
27 elmPackages.elm-live
27 elmPackages.elm-test 28 elmPackages.elm-test
28 ]; 29 ];
29 backendPackages = with pkgs; [ 30 backendPackages = with pkgs; [
diff --git a/frontend/elm.json b/frontend/elm.json
index 64ee788..eec5f83 100644
--- a/frontend/elm.json
+++ b/frontend/elm.json
@@ -6,18 +6,22 @@
6 "elm-version": "0.19.1", 6 "elm-version": "0.19.1",
7 "dependencies": { 7 "dependencies": {
8 "direct": { 8 "direct": {
9 "1602/elm-feather": "2.3.5",
9 "elm/browser": "1.0.2", 10 "elm/browser": "1.0.2",
10 "elm/core": "1.0.5", 11 "elm/core": "1.0.5",
11 "elm/html": "1.0.0", 12 "elm/html": "1.0.0",
12 "elm/http": "2.0.0", 13 "elm/http": "2.0.0",
13 "elm/json": "1.1.3", 14 "elm/json": "1.1.3",
14 "elm/url": "1.0.0" 15 "elm/url": "1.0.0",
16 "rtfeldman/elm-css": "16.1.0"
15 }, 17 },
16 "indirect": { 18 "indirect": {
17 "elm/bytes": "1.0.8", 19 "elm/bytes": "1.0.8",
18 "elm/file": "1.0.5", 20 "elm/file": "1.0.5",
21 "elm/svg": "1.0.1",
19 "elm/time": "1.0.0", 22 "elm/time": "1.0.0",
20 "elm/virtual-dom": "1.0.2" 23 "elm/virtual-dom": "1.0.2",
24 "rtfeldman/elm-hex": "1.0.0"
21 } 25 }
22 }, 26 },
23 "test-dependencies": { 27 "test-dependencies": {
diff --git a/frontend/index.html b/frontend/index.html
index be32ef3..38203b9 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -3,18 +3,12 @@
3 <head> 3 <head>
4 <meta charset="utf-8"> 4 <meta charset="utf-8">
5 <title>hello-world</title> 5 <title>hello-world</title>
6 <script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>
7 <script src="main.js"></script>
6 </head> 8 </head>
7 <body> 9 <body>
8 <script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script> 10 <script>var app = Elm.Main.init();</script>
9 <div id="elm" />
10 <model-viewer
11 src="https://poly.googleusercontent.com/downloads/c/fp/1606938083820086/9ycLAR71SmR/7wwOehn8nNN/Bedroom.gltf"
12 ios-src="https://poly.googleusercontent.com/downloads/c/fp/1606938083820086/9ycLAR71SmR/cTuWg1jk4jo/Bedroom.usdz"
13 alt="Bedroom by Poly by Google"
14 background-color="##607d8b"
15 camera-controls
16 auto-rotate >
17 </model-viewer>
18 </body> 11 </body>
19</html> 12</html>
20 13
14
diff --git a/frontend/main.js b/frontend/main.js
index 8224ee0..931d7ae 100644
--- a/frontend/main.js
+++ b/frontend/main.js
@@ -4547,7 +4547,44 @@ function _Url_percentDecode(string)
4547 { 4547 {
4548 return $elm$core$Maybe$Nothing; 4548 return $elm$core$Maybe$Nothing;
4549 } 4549 }
4550}var $author$project$Main$LinkClicked = function (a) { 4550}
4551
4552
4553var _Bitwise_and = F2(function(a, b)
4554{
4555 return a & b;
4556});
4557
4558var _Bitwise_or = F2(function(a, b)
4559{
4560 return a | b;
4561});
4562
4563var _Bitwise_xor = F2(function(a, b)
4564{
4565 return a ^ b;
4566});
4567
4568function _Bitwise_complement(a)
4569{
4570 return ~a;
4571};
4572
4573var _Bitwise_shiftLeftBy = F2(function(offset, a)
4574{
4575 return a << offset;
4576});
4577
4578var _Bitwise_shiftRightBy = F2(function(offset, a)
4579{
4580 return a >> offset;
4581});
4582
4583var _Bitwise_shiftRightZfBy = F2(function(offset, a)
4584{
4585 return a >>> offset;
4586});
4587var $author$project$Main$LinkClicked = function (a) {
4551 return {$: 'LinkClicked', a: a}; 4588 return {$: 'LinkClicked', a: a};
4552}; 4589};
4553var $author$project$Main$UrlChanged = function (a) { 4590var $author$project$Main$UrlChanged = function (a) {
@@ -5343,9 +5380,9 @@ var $elm$core$Task$perform = F2(
5343 }); 5380 });
5344var $elm$browser$Browser$application = _Browser_application; 5381var $elm$browser$Browser$application = _Browser_application;
5345var $author$project$Main$HomePage = {$: 'HomePage'}; 5382var $author$project$Main$HomePage = {$: 'HomePage'};
5346var $author$project$Main$Model = F8( 5383var $author$project$Main$Model = F9(
5347 function (key, url, location, loginModel, catalogModel, productModel, signupModel, cartModel) { 5384 function (key, url, location, loginModel, catalogModel, productModel, signupModel, cartModel, checkoutModel) {
5348 return {cartModel: cartModel, catalogModel: catalogModel, key: key, location: location, loginModel: loginModel, productModel: productModel, signupModel: signupModel, url: url}; 5385 return {cartModel: cartModel, catalogModel: catalogModel, checkoutModel: checkoutModel, key: key, location: location, loginModel: loginModel, productModel: productModel, signupModel: signupModel, url: url};
5349 }); 5386 });
5350var $author$project$Cart$Model = F2( 5387var $author$project$Cart$Model = F2(
5351 function (pageStatus, products) { 5388 function (pageStatus, products) {
@@ -5353,12 +5390,29 @@ var $author$project$Cart$Model = F2(
5353 }); 5390 });
5354var $author$project$Cart$NotLoaded = {$: 'NotLoaded'}; 5391var $author$project$Cart$NotLoaded = {$: 'NotLoaded'};
5355var $author$project$Cart$init = A2($author$project$Cart$Model, $author$project$Cart$NotLoaded, _List_Nil); 5392var $author$project$Cart$init = A2($author$project$Cart$Model, $author$project$Cart$NotLoaded, _List_Nil);
5356var $author$project$Catalog$Model = F2( 5393var $author$project$Catalog$Model = F3(
5357 function (pageStatus, products) { 5394 function (pageStatus, products, filters) {
5358 return {pageStatus: pageStatus, products: products}; 5395 return {filters: filters, pageStatus: pageStatus, products: products};
5359 }); 5396 });
5360var $author$project$Catalog$NotLoaded = {$: 'NotLoaded'}; 5397var $author$project$Catalog$NotLoaded = {$: 'NotLoaded'};
5361var $author$project$Catalog$init = A2($author$project$Catalog$Model, $author$project$Catalog$NotLoaded, _List_Nil); 5398var $author$project$Catalog$Filters = F2(
5399 function (price, rating) {
5400 return {price: price, rating: rating};
5401 });
5402var $elm$core$Basics$negate = function (n) {
5403 return -n;
5404};
5405var $author$project$Catalog$defaultFilters = A2(
5406 $author$project$Catalog$Filters,
5407 _Utils_Tuple2(-1, 100000),
5408 _Utils_Tuple2(0, 5));
5409var $author$project$Catalog$init = A3($author$project$Catalog$Model, $author$project$Catalog$NotLoaded, _List_Nil, $author$project$Catalog$defaultFilters);
5410var $author$project$Checkout$Model = F3(
5411 function (pageStatus, paymentMode, cartTotal) {
5412 return {cartTotal: cartTotal, pageStatus: pageStatus, paymentMode: paymentMode};
5413 });
5414var $author$project$Checkout$NotLoaded = {$: 'NotLoaded'};
5415var $author$project$Checkout$init = A3($author$project$Checkout$Model, $author$project$Checkout$NotLoaded, 'Cash', 0);
5362var $author$project$Login$Model = F3( 5416var $author$project$Login$Model = F3(
5363 function (username, password, loginStatus) { 5417 function (username, password, loginStatus) {
5364 return {loginStatus: loginStatus, password: password, username: username}; 5418 return {loginStatus: loginStatus, password: password, username: username};
@@ -5371,14 +5425,11 @@ var $author$project$Product$Model = F6(
5371 }); 5425 });
5372var $author$project$Product$NotLoaded = {$: 'NotLoaded'}; 5426var $author$project$Product$NotLoaded = {$: 'NotLoaded'};
5373var $author$project$Product$NotSubmitted = {$: 'NotSubmitted'}; 5427var $author$project$Product$NotSubmitted = {$: 'NotSubmitted'};
5374var $author$project$Product$Product = F5( 5428var $author$project$Product$Product = F7(
5375 function (id, name, kind, price, description) { 5429 function (id, name, kind, price, description, src, iosSrc) {
5376 return {description: description, id: id, kind: kind, name: name, price: price}; 5430 return {description: description, id: id, iosSrc: iosSrc, kind: kind, name: name, price: price, src: src};
5377 }); 5431 });
5378var $elm$core$Basics$negate = function (n) { 5432var $author$project$Product$emptyProduct = A7($author$project$Product$Product, -1, '', $elm$core$Maybe$Nothing, 0, $elm$core$Maybe$Nothing, '', '');
5379 return -n;
5380};
5381var $author$project$Product$emptyProduct = A5($author$project$Product$Product, -1, '', $elm$core$Maybe$Nothing, 0, $elm$core$Maybe$Nothing);
5382var $author$project$Product$init = A6($author$project$Product$Model, $author$project$Product$NotLoaded, $author$project$Product$emptyProduct, _List_Nil, 0, '', $author$project$Product$NotSubmitted); 5433var $author$project$Product$init = A6($author$project$Product$Model, $author$project$Product$NotLoaded, $author$project$Product$emptyProduct, _List_Nil, 0, '', $author$project$Product$NotSubmitted);
5383var $author$project$Signup$Empty = {$: 'Empty'}; 5434var $author$project$Signup$Empty = {$: 'Empty'};
5384var $author$project$Signup$Model = F6( 5435var $author$project$Signup$Model = F6(
@@ -5394,10 +5445,11 @@ var $author$project$Main$init = F3(
5394 var signup = $author$project$Signup$init; 5445 var signup = $author$project$Signup$init;
5395 var product = $author$project$Product$init; 5446 var product = $author$project$Product$init;
5396 var login = $author$project$Login$init; 5447 var login = $author$project$Login$init;
5448 var checkout = $author$project$Checkout$init;
5397 var catalog = $author$project$Catalog$init; 5449 var catalog = $author$project$Catalog$init;
5398 var cart = $author$project$Cart$init; 5450 var cart = $author$project$Cart$init;
5399 return _Utils_Tuple2( 5451 return _Utils_Tuple2(
5400 A8($author$project$Main$Model, key, url, start, login, catalog, product, signup, cart), 5452 A9($author$project$Main$Model, key, url, start, login, catalog, product, signup, cart, checkout),
5401 $elm$core$Platform$Cmd$none); 5453 $elm$core$Platform$Cmd$none);
5402 }); 5454 });
5403var $elm$core$Platform$Sub$batch = _Platform_batch; 5455var $elm$core$Platform$Sub$batch = _Platform_batch;
@@ -5413,6 +5465,10 @@ var $author$project$Main$CatalogMessage = function (a) {
5413 return {$: 'CatalogMessage', a: a}; 5465 return {$: 'CatalogMessage', a: a};
5414}; 5466};
5415var $author$project$Main$CatalogPage = {$: 'CatalogPage'}; 5467var $author$project$Main$CatalogPage = {$: 'CatalogPage'};
5468var $author$project$Main$CheckoutMessage = function (a) {
5469 return {$: 'CheckoutMessage', a: a};
5470};
5471var $author$project$Main$CheckoutPage = {$: 'CheckoutPage'};
5416var $author$project$Main$LoginMessage = function (a) { 5472var $author$project$Main$LoginMessage = function (a) {
5417 return {$: 'LoginMessage', a: a}; 5473 return {$: 'LoginMessage', a: a};
5418}; 5474};
@@ -5426,44 +5482,9 @@ var $author$project$Main$ProductPage = function (a) {
5426var $author$project$Main$SignupMessage = function (a) { 5482var $author$project$Main$SignupMessage = function (a) {
5427 return {$: 'SignupMessage', a: a}; 5483 return {$: 'SignupMessage', a: a};
5428}; 5484};
5429var $author$project$Cart$CartLoaded = function (a) { 5485var $author$project$Checkout$AmountLoaded = function (a) {
5430 return {$: 'CartLoaded', a: a}; 5486 return {$: 'AmountLoaded', a: a};
5431};
5432var $author$project$Cart$Product = F5(
5433 function (id, name, kind, price, description) {
5434 return {description: description, id: id, kind: kind, name: name, price: price};
5435 });
5436var $elm$json$Json$Decode$field = _Json_decodeField;
5437var $elm$json$Json$Decode$float = _Json_decodeFloat;
5438var $elm$json$Json$Decode$int = _Json_decodeInt;
5439var $elm$json$Json$Decode$map5 = _Json_map5;
5440var $elm$json$Json$Decode$null = _Json_decodeNull;
5441var $elm$json$Json$Decode$oneOf = _Json_oneOf;
5442var $elm$json$Json$Decode$nullable = function (decoder) {
5443 return $elm$json$Json$Decode$oneOf(
5444 _List_fromArray(
5445 [
5446 $elm$json$Json$Decode$null($elm$core$Maybe$Nothing),
5447 A2($elm$json$Json$Decode$map, $elm$core$Maybe$Just, decoder)
5448 ]));
5449}; 5487};
5450var $elm$json$Json$Decode$string = _Json_decodeString;
5451var $author$project$Cart$decodeProduct = A6(
5452 $elm$json$Json$Decode$map5,
5453 $author$project$Cart$Product,
5454 A2($elm$json$Json$Decode$field, 'id', $elm$json$Json$Decode$int),
5455 A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string),
5456 A2(
5457 $elm$json$Json$Decode$field,
5458 'kind',
5459 $elm$json$Json$Decode$nullable($elm$json$Json$Decode$string)),
5460 A2($elm$json$Json$Decode$field, 'price', $elm$json$Json$Decode$float),
5461 A2(
5462 $elm$json$Json$Decode$field,
5463 'description',
5464 $elm$json$Json$Decode$nullable($elm$json$Json$Decode$string)));
5465var $elm$json$Json$Decode$list = _Json_decodeList;
5466var $author$project$Cart$decodeResponse = $elm$json$Json$Decode$list($author$project$Cart$decodeProduct);
5467var $elm$http$Http$BadStatus_ = F2( 5488var $elm$http$Http$BadStatus_ = F2(
5468 function (a, b) { 5489 function (a, b) {
5469 return {$: 'BadStatus_', a: a, b: b}; 5490 return {$: 'BadStatus_', a: a, b: b};
@@ -6079,7 +6100,7 @@ var $elm$http$Http$expectJson = F2(
6079 A2($elm$json$Json$Decode$decodeString, decoder, string)); 6100 A2($elm$json$Json$Decode$decodeString, decoder, string));
6080 })); 6101 }));
6081 }); 6102 });
6082var $elm$core$Debug$log = _Debug_log; 6103var $elm$json$Json$Decode$float = _Json_decodeFloat;
6083var $elm$http$Http$Request = function (a) { 6104var $elm$http$Http$Request = function (a) {
6084 return {$: 'Request', a: a}; 6105 return {$: 'Request', a: a};
6085}; 6106};
@@ -6248,6 +6269,63 @@ var $elm$http$Http$riskyRequest = function (r) {
6248 $elm$http$Http$Request( 6269 $elm$http$Http$Request(
6249 {allowCookiesFromOtherDomains: true, body: r.body, expect: r.expect, headers: r.headers, method: r.method, timeout: r.timeout, tracker: r.tracker, url: r.url})); 6270 {allowCookiesFromOtherDomains: true, body: r.body, expect: r.expect, headers: r.headers, method: r.method, timeout: r.timeout, tracker: r.tracker, url: r.url}));
6250}; 6271};
6272var $author$project$Checkout$fetchAmount = $elm$http$Http$riskyRequest(
6273 {
6274 body: $elm$http$Http$emptyBody,
6275 expect: A2($elm$http$Http$expectJson, $author$project$Checkout$AmountLoaded, $elm$json$Json$Decode$float),
6276 headers: _List_Nil,
6277 method: 'GET',
6278 timeout: $elm$core$Maybe$Nothing,
6279 tracker: $elm$core$Maybe$Nothing,
6280 url: 'http://127.0.0.1:7878/cart/total'
6281 });
6282var $author$project$Cart$CartLoaded = function (a) {
6283 return {$: 'CartLoaded', a: a};
6284};
6285var $author$project$Cart$CartListing = F2(
6286 function (productItem, quantity) {
6287 return {productItem: productItem, quantity: quantity};
6288 });
6289var $author$project$Cart$Product = F5(
6290 function (id, name, kind, price, description) {
6291 return {description: description, id: id, kind: kind, name: name, price: price};
6292 });
6293var $elm$json$Json$Decode$field = _Json_decodeField;
6294var $elm$json$Json$Decode$int = _Json_decodeInt;
6295var $elm$json$Json$Decode$map5 = _Json_map5;
6296var $elm$json$Json$Decode$null = _Json_decodeNull;
6297var $elm$json$Json$Decode$oneOf = _Json_oneOf;
6298var $elm$json$Json$Decode$nullable = function (decoder) {
6299 return $elm$json$Json$Decode$oneOf(
6300 _List_fromArray(
6301 [
6302 $elm$json$Json$Decode$null($elm$core$Maybe$Nothing),
6303 A2($elm$json$Json$Decode$map, $elm$core$Maybe$Just, decoder)
6304 ]));
6305};
6306var $elm$json$Json$Decode$string = _Json_decodeString;
6307var $author$project$Cart$decodeProduct = A6(
6308 $elm$json$Json$Decode$map5,
6309 $author$project$Cart$Product,
6310 A2($elm$json$Json$Decode$field, 'id', $elm$json$Json$Decode$int),
6311 A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string),
6312 A2(
6313 $elm$json$Json$Decode$field,
6314 'kind',
6315 $elm$json$Json$Decode$nullable($elm$json$Json$Decode$string)),
6316 A2($elm$json$Json$Decode$field, 'price', $elm$json$Json$Decode$float),
6317 A2(
6318 $elm$json$Json$Decode$field,
6319 'description',
6320 $elm$json$Json$Decode$nullable($elm$json$Json$Decode$string)));
6321var $elm$json$Json$Decode$list = _Json_decodeList;
6322var $author$project$Cart$decodeResponse = $elm$json$Json$Decode$list(
6323 A3(
6324 $elm$json$Json$Decode$map2,
6325 $author$project$Cart$CartListing,
6326 A2($elm$json$Json$Decode$field, 'product_item', $author$project$Cart$decodeProduct),
6327 A2($elm$json$Json$Decode$field, 'quantity', $elm$json$Json$Decode$int)));
6328var $elm$core$Debug$log = _Debug_log;
6251var $author$project$Cart$fetchCartItems = function () { 6329var $author$project$Cart$fetchCartItems = function () {
6252 var _v0 = A2($elm$core$Debug$log, 'cart', 'fetching cart items'); 6330 var _v0 = A2($elm$core$Debug$log, 'cart', 'fetching cart items');
6253 return $elm$http$Http$riskyRequest( 6331 return $elm$http$Http$riskyRequest(
@@ -6264,8 +6342,9 @@ var $author$project$Cart$fetchCartItems = function () {
6264var $author$project$Product$ListingLoaded = function (a) { 6342var $author$project$Product$ListingLoaded = function (a) {
6265 return {$: 'ListingLoaded', a: a}; 6343 return {$: 'ListingLoaded', a: a};
6266}; 6344};
6267var $author$project$Product$decodeProduct = A6( 6345var $elm$json$Json$Decode$map7 = _Json_map7;
6268 $elm$json$Json$Decode$map5, 6346var $author$project$Product$decodeProduct = A8(
6347 $elm$json$Json$Decode$map7,
6269 $author$project$Product$Product, 6348 $author$project$Product$Product,
6270 A2($elm$json$Json$Decode$field, 'id', $elm$json$Json$Decode$int), 6349 A2($elm$json$Json$Decode$field, 'id', $elm$json$Json$Decode$int),
6271 A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string), 6350 A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string),
@@ -6277,7 +6356,9 @@ var $author$project$Product$decodeProduct = A6(
6277 A2( 6356 A2(
6278 $elm$json$Json$Decode$field, 6357 $elm$json$Json$Decode$field,
6279 'description', 6358 'description',
6280 $elm$json$Json$Decode$nullable($elm$json$Json$Decode$string))); 6359 $elm$json$Json$Decode$nullable($elm$json$Json$Decode$string)),
6360 A2($elm$json$Json$Decode$field, 'src', $elm$json$Json$Decode$string),
6361 A2($elm$json$Json$Decode$field, 'ios_src', $elm$json$Json$Decode$string));
6281var $elm$http$Http$request = function (r) { 6362var $elm$http$Http$request = function (r) {
6282 return $elm$http$Http$command( 6363 return $elm$http$Http$command(
6283 $elm$http$Http$Request( 6364 $elm$http$Http$Request(
@@ -6301,12 +6382,13 @@ var $author$project$Product$fetchListing = function (id) {
6301var $author$project$Catalog$ProductsLoaded = function (a) { 6382var $author$project$Catalog$ProductsLoaded = function (a) {
6302 return {$: 'ProductsLoaded', a: a}; 6383 return {$: 'ProductsLoaded', a: a};
6303}; 6384};
6304var $author$project$Catalog$Product = F5( 6385var $author$project$Catalog$Product = F6(
6305 function (id, name, kind, price, description) { 6386 function (id, name, kind, price, description, averageRating) {
6306 return {description: description, id: id, kind: kind, name: name, price: price}; 6387 return {averageRating: averageRating, description: description, id: id, kind: kind, name: name, price: price};
6307 }); 6388 });
6308var $author$project$Catalog$decodeProduct = A6( 6389var $elm$json$Json$Decode$map6 = _Json_map6;
6309 $elm$json$Json$Decode$map5, 6390var $author$project$Catalog$decodeProduct = A7(
6391 $elm$json$Json$Decode$map6,
6310 $author$project$Catalog$Product, 6392 $author$project$Catalog$Product,
6311 A2($elm$json$Json$Decode$field, 'id', $elm$json$Json$Decode$int), 6393 A2($elm$json$Json$Decode$field, 'id', $elm$json$Json$Decode$int),
6312 A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string), 6394 A2($elm$json$Json$Decode$field, 'name', $elm$json$Json$Decode$string),
@@ -6318,7 +6400,11 @@ var $author$project$Catalog$decodeProduct = A6(
6318 A2( 6400 A2(
6319 $elm$json$Json$Decode$field, 6401 $elm$json$Json$Decode$field,
6320 'description', 6402 'description',
6321 $elm$json$Json$Decode$nullable($elm$json$Json$Decode$string))); 6403 $elm$json$Json$Decode$nullable($elm$json$Json$Decode$string)),
6404 A2(
6405 $elm$json$Json$Decode$field,
6406 'average_rating',
6407 $elm$json$Json$Decode$nullable($elm$json$Json$Decode$float)));
6322var $author$project$Catalog$decodeResponse = $elm$json$Json$Decode$list($author$project$Catalog$decodeProduct); 6408var $author$project$Catalog$decodeResponse = $elm$json$Json$Decode$list($author$project$Catalog$decodeProduct);
6323var $author$project$Catalog$fetchProducts = function () { 6409var $author$project$Catalog$fetchProducts = function () {
6324 var _v0 = A2($elm$core$Debug$log, 'err', 'fetching products'); 6410 var _v0 = A2($elm$core$Debug$log, 'err', 'fetching products');
@@ -6643,6 +6729,10 @@ var $author$project$Main$parseRoute = $elm$url$Url$Parser$oneOf(
6643 $elm$url$Url$Parser$s('signup')), 6729 $elm$url$Url$Parser$s('signup')),
6644 A2( 6730 A2(
6645 $elm$url$Url$Parser$map, 6731 $elm$url$Url$Parser$map,
6732 $author$project$Main$CheckoutPage,
6733 $elm$url$Url$Parser$s('checkout')),
6734 A2(
6735 $elm$url$Url$Parser$map,
6646 $author$project$Main$ProductPage, 6736 $author$project$Main$ProductPage,
6647 A2( 6737 A2(
6648 $elm$url$Url$Parser$slash, 6738 $elm$url$Url$Parser$slash,
@@ -6727,10 +6817,32 @@ var $author$project$Main$tryLogout = $elm$http$Http$riskyRequest(
6727 }); 6817 });
6728var $author$project$Cart$Loaded = {$: 'Loaded'}; 6818var $author$project$Cart$Loaded = {$: 'Loaded'};
6729var $author$project$Cart$Loading = {$: 'Loading'}; 6819var $author$project$Cart$Loading = {$: 'Loading'};
6820var $author$project$Cart$AddToCartSuccess = function (a) {
6821 return {$: 'AddToCartSuccess', a: a};
6822};
6823var $elm$http$Http$stringBody = _Http_pair;
6824var $author$project$Cart$addToCart = function (id) {
6825 var _v0 = A2(
6826 $elm$core$Debug$log,
6827 'err',
6828 'adding to cart: ' + $elm$core$String$fromInt(id));
6829 return $elm$http$Http$riskyRequest(
6830 {
6831 body: A2(
6832 $elm$http$Http$stringBody,
6833 'applcation/json',
6834 $elm$core$String$fromInt(id)),
6835 expect: $elm$http$Http$expectWhatever($author$project$Cart$AddToCartSuccess),
6836 headers: _List_Nil,
6837 method: 'POST',
6838 timeout: $elm$core$Maybe$Nothing,
6839 tracker: $elm$core$Maybe$Nothing,
6840 url: 'http://127.0.0.1:7878/cart/add'
6841 });
6842};
6730var $author$project$Cart$CartItemRemoved = function (a) { 6843var $author$project$Cart$CartItemRemoved = function (a) {
6731 return {$: 'CartItemRemoved', a: a}; 6844 return {$: 'CartItemRemoved', a: a};
6732}; 6845};
6733var $elm$http$Http$stringBody = _Http_pair;
6734var $author$project$Cart$removeProduct = function (id) { 6846var $author$project$Cart$removeProduct = function (id) {
6735 var _v0 = A2($elm$core$Debug$log, 'cart', 'fetching cart items'); 6847 var _v0 = A2($elm$core$Debug$log, 'cart', 'fetching cart items');
6736 return $elm$http$Http$riskyRequest( 6848 return $elm$http$Http$riskyRequest(
@@ -6779,6 +6891,17 @@ var $author$project$Cart$update = F2(
6779 model, 6891 model,
6780 {pageStatus: $author$project$Cart$Loading}), 6892 {pageStatus: $author$project$Cart$Loading}),
6781 $author$project$Cart$fetchCartItems); 6893 $author$project$Cart$fetchCartItems);
6894 case 'FetchCartItems':
6895 return _Utils_Tuple2(
6896 _Utils_update(
6897 model,
6898 {pageStatus: $author$project$Cart$Loading}),
6899 $author$project$Cart$fetchCartItems);
6900 case 'AddToCartPressed':
6901 var id = msg.a;
6902 return _Utils_Tuple2(
6903 model,
6904 $author$project$Cart$addToCart(id));
6782 default: 6905 default:
6783 return _Utils_Tuple2( 6906 return _Utils_Tuple2(
6784 _Utils_update( 6907 _Utils_update(
@@ -6789,32 +6912,174 @@ var $author$project$Cart$update = F2(
6789 }); 6912 });
6790var $author$project$Catalog$Loaded = {$: 'Loaded'}; 6913var $author$project$Catalog$Loaded = {$: 'Loaded'};
6791var $author$project$Catalog$Loading = {$: 'Loading'}; 6914var $author$project$Catalog$Loading = {$: 'Loading'};
6915var $elm$core$Basics$always = F2(
6916 function (a, _v0) {
6917 return a;
6918 });
6919var $elm$core$Tuple$mapFirst = F2(
6920 function (func, _v0) {
6921 var x = _v0.a;
6922 var y = _v0.b;
6923 return _Utils_Tuple2(
6924 func(x),
6925 y);
6926 });
6927var $elm$core$Tuple$mapSecond = F2(
6928 function (func, _v0) {
6929 var x = _v0.a;
6930 var y = _v0.b;
6931 return _Utils_Tuple2(
6932 x,
6933 func(y));
6934 });
6792var $author$project$Catalog$update = F2( 6935var $author$project$Catalog$update = F2(
6793 function (msg, model) { 6936 function (msg, model) {
6794 if (msg.$ === 'ProductsLoaded') { 6937 switch (msg.$) {
6795 var res = msg.a; 6938 case 'ProductsLoaded':
6796 if (res.$ === 'Ok') { 6939 var res = msg.a;
6797 var s = res.a; 6940 if (res.$ === 'Ok') {
6941 var s = res.a;
6942 return _Utils_Tuple2(
6943 _Utils_update(
6944 model,
6945 {pageStatus: $author$project$Catalog$Loaded, products: s}),
6946 $elm$core$Platform$Cmd$none);
6947 } else {
6948 var e = res.a;
6949 var _v2 = A2($elm$core$Debug$log, 'error', e);
6950 return _Utils_Tuple2(
6951 _Utils_update(
6952 model,
6953 {pageStatus: $author$project$Catalog$NotLoaded}),
6954 $elm$core$Platform$Cmd$none);
6955 }
6956 case 'FetchProducts':
6798 return _Utils_Tuple2( 6957 return _Utils_Tuple2(
6799 _Utils_update( 6958 _Utils_update(
6800 model, 6959 model,
6801 {pageStatus: $author$project$Catalog$Loaded, products: s}), 6960 {pageStatus: $author$project$Catalog$Loading}),
6961 $author$project$Catalog$fetchProducts);
6962 case 'ChangePriceLower':
6963 var v = msg.a;
6964 var fs = model.filters;
6965 var nfs = _Utils_update(
6966 fs,
6967 {
6968 price: A2(
6969 $elm$core$Tuple$mapFirst,
6970 $elm$core$Basics$always(v),
6971 fs.price)
6972 });
6973 return _Utils_Tuple2(
6974 _Utils_update(
6975 model,
6976 {filters: nfs}),
6802 $elm$core$Platform$Cmd$none); 6977 $elm$core$Platform$Cmd$none);
6803 } else { 6978 case 'ChangePriceUpper':
6804 var e = res.a; 6979 var v = msg.a;
6805 var _v2 = A2($elm$core$Debug$log, 'error', e); 6980 var fs = model.filters;
6981 var nfs = _Utils_update(
6982 fs,
6983 {
6984 price: A2(
6985 $elm$core$Tuple$mapSecond,
6986 $elm$core$Basics$always(v),
6987 fs.price)
6988 });
6806 return _Utils_Tuple2( 6989 return _Utils_Tuple2(
6807 _Utils_update( 6990 _Utils_update(
6808 model, 6991 model,
6809 {pageStatus: $author$project$Catalog$NotLoaded}), 6992 {filters: nfs}),
6810 $elm$core$Platform$Cmd$none); 6993 $elm$core$Platform$Cmd$none);
6811 } 6994 case 'ChangeRatingLower':
6812 } else { 6995 var v = msg.a;
6813 return _Utils_Tuple2( 6996 var fs = model.filters;
6814 _Utils_update( 6997 var nfs = _Utils_update(
6998 fs,
6999 {
7000 rating: A2(
7001 $elm$core$Tuple$mapFirst,
7002 $elm$core$Basics$always(v),
7003 fs.rating)
7004 });
7005 return _Utils_Tuple2(
7006 _Utils_update(
7007 model,
7008 {filters: nfs}),
7009 $elm$core$Platform$Cmd$none);
7010 default:
7011 var v = msg.a;
7012 var fs = model.filters;
7013 var nfs = _Utils_update(
7014 fs,
7015 {
7016 rating: A2(
7017 $elm$core$Tuple$mapSecond,
7018 $elm$core$Basics$always(v),
7019 fs.rating)
7020 });
7021 return _Utils_Tuple2(
7022 _Utils_update(
7023 model,
7024 {filters: nfs}),
7025 $elm$core$Platform$Cmd$none);
7026 }
7027 });
7028var $author$project$Checkout$Loading = {$: 'Loading'};
7029var $author$project$Checkout$CheckoutSuccessful = function (a) {
7030 return {$: 'CheckoutSuccessful', a: a};
7031};
7032var $author$project$Checkout$tryCheckout = function (pm) {
7033 return $elm$http$Http$riskyRequest(
7034 {
7035 body: A2($elm$http$Http$stringBody, 'application/json', pm),
7036 expect: $elm$http$Http$expectWhatever($author$project$Checkout$CheckoutSuccessful),
7037 headers: _List_Nil,
7038 method: 'POST',
7039 timeout: $elm$core$Maybe$Nothing,
7040 tracker: $elm$core$Maybe$Nothing,
7041 url: 'http://127.0.0.1:7878/transaction/checkout'
7042 });
7043};
7044var $author$project$Checkout$update = F2(
7045 function (msg, model) {
7046 switch (msg.$) {
7047 case 'CheckoutPressed':
7048 return _Utils_Tuple2(
6815 model, 7049 model,
6816 {pageStatus: $author$project$Catalog$Loading}), 7050 $author$project$Checkout$tryCheckout(model.paymentMode));
6817 $author$project$Catalog$fetchProducts); 7051 case 'CheckoutSuccessful':
7052 return _Utils_Tuple2(model, $elm$core$Platform$Cmd$none);
7053 case 'AmountLoaded':
7054 var res = msg.a;
7055 if (res.$ === 'Ok') {
7056 var v = res.a;
7057 return _Utils_Tuple2(
7058 _Utils_update(
7059 model,
7060 {cartTotal: v}),
7061 $elm$core$Platform$Cmd$none);
7062 } else {
7063 return _Utils_Tuple2(
7064 _Utils_update(
7065 model,
7066 {pageStatus: $author$project$Checkout$NotLoaded}),
7067 $elm$core$Platform$Cmd$none);
7068 }
7069 case 'FetchAmount':
7070 var _v2 = A2($elm$core$Debug$log, 'err', 'fetching checkout amount');
7071 return _Utils_Tuple2(
7072 _Utils_update(
7073 model,
7074 {pageStatus: $author$project$Checkout$Loading}),
7075 $author$project$Checkout$fetchAmount);
7076 default:
7077 var s = msg.a;
7078 return _Utils_Tuple2(
7079 _Utils_update(
7080 model,
7081 {paymentMode: s}),
7082 $elm$core$Platform$Cmd$none);
6818 } 7083 }
6819 }); 7084 });
6820var $author$project$Login$InvalidLogin = {$: 'InvalidLogin'}; 7085var $author$project$Login$InvalidLogin = {$: 'InvalidLogin'};
@@ -7309,7 +7574,9 @@ var $author$project$Main$update = F2(
7309 return _Utils_Tuple2(model, $author$project$Main$tryLogout); 7574 return _Utils_Tuple2(model, $author$project$Main$tryLogout);
7310 case 'LogoutSuccess': 7575 case 'LogoutSuccess':
7311 return _Utils_Tuple2( 7576 return _Utils_Tuple2(
7312 model, 7577 _Utils_update(
7578 model,
7579 {loginModel: $author$project$Login$init}),
7313 A2($elm$browser$Browser$Navigation$replaceUrl, model.key, '/login')); 7580 A2($elm$browser$Browser$Navigation$replaceUrl, model.key, '/login'));
7314 case 'UrlChanged': 7581 case 'UrlChanged':
7315 var url = msg.a; 7582 var url = msg.a;
@@ -7348,6 +7615,15 @@ var $author$project$Main$update = F2(
7348 model, 7615 model,
7349 {location: $author$project$Main$CartPage}), 7616 {location: $author$project$Main$CartPage}),
7350 cmd); 7617 cmd);
7618 case 'CheckoutPage':
7619 var _v5 = parsedUrl.a;
7620 var cmd = A2($elm$core$Platform$Cmd$map, $author$project$Main$CheckoutMessage, $author$project$Checkout$fetchAmount);
7621 var _v6 = A2($elm$core$Debug$log, 'err', 'loading checkout page ...');
7622 return _Utils_Tuple2(
7623 _Utils_update(
7624 model,
7625 {location: $author$project$Main$CheckoutPage}),
7626 cmd);
7351 default: 7627 default:
7352 var p = parsedUrl.a; 7628 var p = parsedUrl.a;
7353 return _Utils_Tuple2( 7629 return _Utils_Tuple2(
@@ -7365,12 +7641,12 @@ var $author$project$Main$update = F2(
7365 } 7641 }
7366 case 'LoginMessage': 7642 case 'LoginMessage':
7367 var lm = msg.a; 7643 var lm = msg.a;
7368 var _v5 = A2($author$project$Login$update, lm, model.loginModel); 7644 var _v7 = A2($author$project$Login$update, lm, model.loginModel);
7369 var lmn = _v5.a; 7645 var lmn = _v7.a;
7370 var cmd = _v5.b; 7646 var cmd = _v7.b;
7371 var redir = function () { 7647 var redir = function () {
7372 var _v6 = lmn.loginStatus; 7648 var _v8 = lmn.loginStatus;
7373 if (_v6.$ === 'LoggedIn') { 7649 if (_v8.$ === 'LoggedIn') {
7374 return A2($elm$browser$Browser$Navigation$replaceUrl, model.key, '/catalog'); 7650 return A2($elm$browser$Browser$Navigation$replaceUrl, model.key, '/catalog');
7375 } else { 7651 } else {
7376 return $elm$core$Platform$Cmd$none; 7652 return $elm$core$Platform$Cmd$none;
@@ -7388,12 +7664,12 @@ var $author$project$Main$update = F2(
7388 ]))); 7664 ])));
7389 case 'SignupMessage': 7665 case 'SignupMessage':
7390 var sm = msg.a; 7666 var sm = msg.a;
7391 var _v7 = A2($author$project$Signup$update, sm, model.signupModel); 7667 var _v9 = A2($author$project$Signup$update, sm, model.signupModel);
7392 var smn = _v7.a; 7668 var smn = _v9.a;
7393 var cmd = _v7.b; 7669 var cmd = _v9.b;
7394 var redir = function () { 7670 var redir = function () {
7395 var _v8 = smn.status; 7671 var _v10 = smn.status;
7396 if (_v8.$ === 'CreatedSuccessfully') { 7672 if (_v10.$ === 'CreatedSuccessfully') {
7397 return A2($elm$browser$Browser$Navigation$replaceUrl, model.key, '/login'); 7673 return A2($elm$browser$Browser$Navigation$replaceUrl, model.key, '/login');
7398 } else { 7674 } else {
7399 return $elm$core$Platform$Cmd$none; 7675 return $elm$core$Platform$Cmd$none;
@@ -7411,9 +7687,9 @@ var $author$project$Main$update = F2(
7411 ]))); 7687 ])));
7412 case 'CatalogMessage': 7688 case 'CatalogMessage':
7413 var cm = msg.a; 7689 var cm = msg.a;
7414 var _v9 = A2($author$project$Catalog$update, cm, model.catalogModel); 7690 var _v11 = A2($author$project$Catalog$update, cm, model.catalogModel);
7415 var cmn = _v9.a; 7691 var cmn = _v11.a;
7416 var cmd = _v9.b; 7692 var cmd = _v11.b;
7417 return _Utils_Tuple2( 7693 return _Utils_Tuple2(
7418 _Utils_update( 7694 _Utils_update(
7419 model, 7695 model,
@@ -7421,14 +7697,25 @@ var $author$project$Main$update = F2(
7421 A2($elm$core$Platform$Cmd$map, $author$project$Main$CatalogMessage, cmd)); 7697 A2($elm$core$Platform$Cmd$map, $author$project$Main$CatalogMessage, cmd));
7422 case 'CartMessage': 7698 case 'CartMessage':
7423 var cm = msg.a; 7699 var cm = msg.a;
7424 var _v10 = A2($author$project$Cart$update, cm, model.cartModel); 7700 var _v12 = A2($author$project$Cart$update, cm, model.cartModel);
7425 var cmn = _v10.a; 7701 var cmn = _v12.a;
7426 var cmd = _v10.b; 7702 var cmd = _v12.b;
7427 return _Utils_Tuple2( 7703 return _Utils_Tuple2(
7428 _Utils_update( 7704 _Utils_update(
7429 model, 7705 model,
7430 {cartModel: cmn}), 7706 {cartModel: cmn}),
7431 A2($elm$core$Platform$Cmd$map, $author$project$Main$CartMessage, cmd)); 7707 A2($elm$core$Platform$Cmd$map, $author$project$Main$CartMessage, cmd));
7708 case 'CheckoutMessage':
7709 var cm = msg.a;
7710 var _v13 = A2($author$project$Checkout$update, cm, model.checkoutModel);
7711 var cmn = _v13.a;
7712 var cmd = _v13.b;
7713 var _v14 = A2($elm$core$Debug$log, 'err', 'received checkout message ...');
7714 return _Utils_Tuple2(
7715 _Utils_update(
7716 model,
7717 {checkoutModel: cmn}),
7718 A2($elm$core$Platform$Cmd$map, $author$project$Main$CheckoutMessage, cmd));
7432 default: 7719 default:
7433 var pm = msg.a; 7720 var pm = msg.a;
7434 var redir = function () { 7721 var redir = function () {
@@ -7438,9 +7725,9 @@ var $author$project$Main$update = F2(
7438 return $elm$core$Platform$Cmd$none; 7725 return $elm$core$Platform$Cmd$none;
7439 } 7726 }
7440 }(); 7727 }();
7441 var _v11 = A2($author$project$Product$update, pm, model.productModel); 7728 var _v15 = A2($author$project$Product$update, pm, model.productModel);
7442 var pmn = _v11.a; 7729 var pmn = _v15.a;
7443 var cmd = _v11.b; 7730 var cmd = _v15.b;
7444 return _Utils_Tuple2( 7731 return _Utils_Tuple2(
7445 _Utils_update( 7732 _Utils_update(
7446 model, 7733 model,
@@ -7453,62 +7740,2986 @@ var $author$project$Main$update = F2(
7453 ]))); 7740 ])));
7454 } 7741 }
7455 }); 7742 });
7456var $elm$html$Html$a = _VirtualDom_node('a'); 7743var $rtfeldman$elm_css$VirtualDom$Styled$Node = F3(
7457var $elm$html$Html$b = _VirtualDom_node('b'); 7744 function (a, b, c) {
7458var $elm$html$Html$Attributes$stringProperty = F2( 7745 return {$: 'Node', a: a, b: b, c: c};
7459 function (key, string) { 7746 });
7747var $rtfeldman$elm_css$VirtualDom$Styled$node = $rtfeldman$elm_css$VirtualDom$Styled$Node;
7748var $rtfeldman$elm_css$Html$Styled$node = $rtfeldman$elm_css$VirtualDom$Styled$node;
7749var $rtfeldman$elm_css$Html$Styled$a = $rtfeldman$elm_css$Html$Styled$node('a');
7750var $rtfeldman$elm_css$Html$Styled$div = $rtfeldman$elm_css$Html$Styled$node('div');
7751var $rtfeldman$elm_css$VirtualDom$Styled$Attribute = F3(
7752 function (a, b, c) {
7753 return {$: 'Attribute', a: a, b: b, c: c};
7754 });
7755var $elm$virtual_dom$VirtualDom$property = F2(
7756 function (key, value) {
7460 return A2( 7757 return A2(
7461 _VirtualDom_property, 7758 _VirtualDom_property,
7759 _VirtualDom_noInnerHtmlOrFormAction(key),
7760 _VirtualDom_noJavaScriptOrHtmlUri(value));
7761 });
7762var $rtfeldman$elm_css$VirtualDom$Styled$property = F2(
7763 function (key, value) {
7764 return A3(
7765 $rtfeldman$elm_css$VirtualDom$Styled$Attribute,
7766 A2($elm$virtual_dom$VirtualDom$property, key, value),
7767 _List_Nil,
7768 '');
7769 });
7770var $rtfeldman$elm_css$Html$Styled$Attributes$stringProperty = F2(
7771 function (key, string) {
7772 return A2(
7773 $rtfeldman$elm_css$VirtualDom$Styled$property,
7462 key, 7774 key,
7463 $elm$json$Json$Encode$string(string)); 7775 $elm$json$Json$Encode$string(string));
7464 }); 7776 });
7465var $elm$html$Html$Attributes$href = function (url) { 7777var $rtfeldman$elm_css$Html$Styled$Attributes$href = function (url) {
7466 return A2( 7778 return A2($rtfeldman$elm_css$Html$Styled$Attributes$stringProperty, 'href', url);
7467 $elm$html$Html$Attributes$stringProperty, 7779};
7468 'href', 7780var $rtfeldman$elm_css$Html$Styled$li = $rtfeldman$elm_css$Html$Styled$node('li');
7469 _VirtualDom_noJavaScriptUri(url)); 7781var $rtfeldman$elm_css$VirtualDom$Styled$KeyedNode = F3(
7782 function (a, b, c) {
7783 return {$: 'KeyedNode', a: a, b: b, c: c};
7784 });
7785var $rtfeldman$elm_css$VirtualDom$Styled$KeyedNodeNS = F4(
7786 function (a, b, c, d) {
7787 return {$: 'KeyedNodeNS', a: a, b: b, c: c, d: d};
7788 });
7789var $rtfeldman$elm_css$VirtualDom$Styled$NodeNS = F4(
7790 function (a, b, c, d) {
7791 return {$: 'NodeNS', a: a, b: b, c: c, d: d};
7792 });
7793var $rtfeldman$elm_css$VirtualDom$Styled$Unstyled = function (a) {
7794 return {$: 'Unstyled', a: a};
7470}; 7795};
7471var $elm$virtual_dom$VirtualDom$map = _VirtualDom_map; 7796var $elm$virtual_dom$VirtualDom$map = _VirtualDom_map;
7472var $elm$html$Html$map = $elm$virtual_dom$VirtualDom$map; 7797var $elm$virtual_dom$VirtualDom$mapAttribute = _VirtualDom_mapAttribute;
7473var $elm$html$Html$div = _VirtualDom_node('div'); 7798var $rtfeldman$elm_css$VirtualDom$Styled$mapAttribute = F2(
7799 function (transform, _v0) {
7800 var prop = _v0.a;
7801 var styles = _v0.b;
7802 var classname = _v0.c;
7803 return A3(
7804 $rtfeldman$elm_css$VirtualDom$Styled$Attribute,
7805 A2($elm$virtual_dom$VirtualDom$mapAttribute, transform, prop),
7806 styles,
7807 classname);
7808 });
7809var $rtfeldman$elm_css$VirtualDom$Styled$map = F2(
7810 function (transform, vdomNode) {
7811 switch (vdomNode.$) {
7812 case 'Node':
7813 var elemType = vdomNode.a;
7814 var properties = vdomNode.b;
7815 var children = vdomNode.c;
7816 return A3(
7817 $rtfeldman$elm_css$VirtualDom$Styled$Node,
7818 elemType,
7819 A2(
7820 $elm$core$List$map,
7821 $rtfeldman$elm_css$VirtualDom$Styled$mapAttribute(transform),
7822 properties),
7823 A2(
7824 $elm$core$List$map,
7825 $rtfeldman$elm_css$VirtualDom$Styled$map(transform),
7826 children));
7827 case 'NodeNS':
7828 var ns = vdomNode.a;
7829 var elemType = vdomNode.b;
7830 var properties = vdomNode.c;
7831 var children = vdomNode.d;
7832 return A4(
7833 $rtfeldman$elm_css$VirtualDom$Styled$NodeNS,
7834 ns,
7835 elemType,
7836 A2(
7837 $elm$core$List$map,
7838 $rtfeldman$elm_css$VirtualDom$Styled$mapAttribute(transform),
7839 properties),
7840 A2(
7841 $elm$core$List$map,
7842 $rtfeldman$elm_css$VirtualDom$Styled$map(transform),
7843 children));
7844 case 'KeyedNode':
7845 var elemType = vdomNode.a;
7846 var properties = vdomNode.b;
7847 var children = vdomNode.c;
7848 return A3(
7849 $rtfeldman$elm_css$VirtualDom$Styled$KeyedNode,
7850 elemType,
7851 A2(
7852 $elm$core$List$map,
7853 $rtfeldman$elm_css$VirtualDom$Styled$mapAttribute(transform),
7854 properties),
7855 A2(
7856 $elm$core$List$map,
7857 function (_v1) {
7858 var key = _v1.a;
7859 var child = _v1.b;
7860 return _Utils_Tuple2(
7861 key,
7862 A2($rtfeldman$elm_css$VirtualDom$Styled$map, transform, child));
7863 },
7864 children));
7865 case 'KeyedNodeNS':
7866 var ns = vdomNode.a;
7867 var elemType = vdomNode.b;
7868 var properties = vdomNode.c;
7869 var children = vdomNode.d;
7870 return A4(
7871 $rtfeldman$elm_css$VirtualDom$Styled$KeyedNodeNS,
7872 ns,
7873 elemType,
7874 A2(
7875 $elm$core$List$map,
7876 $rtfeldman$elm_css$VirtualDom$Styled$mapAttribute(transform),
7877 properties),
7878 A2(
7879 $elm$core$List$map,
7880 function (_v2) {
7881 var key = _v2.a;
7882 var child = _v2.b;
7883 return _Utils_Tuple2(
7884 key,
7885 A2($rtfeldman$elm_css$VirtualDom$Styled$map, transform, child));
7886 },
7887 children));
7888 default:
7889 var vdom = vdomNode.a;
7890 return $rtfeldman$elm_css$VirtualDom$Styled$Unstyled(
7891 A2($elm$virtual_dom$VirtualDom$map, transform, vdom));
7892 }
7893 });
7894var $rtfeldman$elm_css$Html$Styled$map = $rtfeldman$elm_css$VirtualDom$Styled$map;
7895var $elm$core$List$singleton = function (value) {
7896 return _List_fromArray(
7897 [value]);
7898};
7899var $elm$core$List$isEmpty = function (xs) {
7900 if (!xs.b) {
7901 return true;
7902 } else {
7903 return false;
7904 }
7905};
7906var $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyles = F2(
7907 function (_v0, styles) {
7908 var newStyles = _v0.b;
7909 var classname = _v0.c;
7910 return $elm$core$List$isEmpty(newStyles) ? styles : A3($elm$core$Dict$insert, classname, newStyles, styles);
7911 });
7912var $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute = function (_v0) {
7913 var val = _v0.a;
7914 return val;
7915};
7916var $elm$virtual_dom$VirtualDom$keyedNode = function (tag) {
7917 return _VirtualDom_keyedNode(
7918 _VirtualDom_noScript(tag));
7919};
7920var $elm$virtual_dom$VirtualDom$keyedNodeNS = F2(
7921 function (namespace, tag) {
7922 return A2(
7923 _VirtualDom_keyedNodeNS,
7924 namespace,
7925 _VirtualDom_noScript(tag));
7926 });
7927var $elm$virtual_dom$VirtualDom$node = function (tag) {
7928 return _VirtualDom_node(
7929 _VirtualDom_noScript(tag));
7930};
7931var $elm$virtual_dom$VirtualDom$nodeNS = function (tag) {
7932 return _VirtualDom_nodeNS(
7933 _VirtualDom_noScript(tag));
7934};
7935var $rtfeldman$elm_css$VirtualDom$Styled$accumulateKeyedStyledHtml = F2(
7936 function (_v6, _v7) {
7937 var key = _v6.a;
7938 var html = _v6.b;
7939 var pairs = _v7.a;
7940 var styles = _v7.b;
7941 switch (html.$) {
7942 case 'Unstyled':
7943 var vdom = html.a;
7944 return _Utils_Tuple2(
7945 A2(
7946 $elm$core$List$cons,
7947 _Utils_Tuple2(key, vdom),
7948 pairs),
7949 styles);
7950 case 'Node':
7951 var elemType = html.a;
7952 var properties = html.b;
7953 var children = html.c;
7954 var combinedStyles = A3($elm$core$List$foldl, $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyles, styles, properties);
7955 var _v9 = A3(
7956 $elm$core$List$foldl,
7957 $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyledHtml,
7958 _Utils_Tuple2(_List_Nil, combinedStyles),
7959 children);
7960 var childNodes = _v9.a;
7961 var finalStyles = _v9.b;
7962 var vdom = A3(
7963 $elm$virtual_dom$VirtualDom$node,
7964 elemType,
7965 A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties),
7966 $elm$core$List$reverse(childNodes));
7967 return _Utils_Tuple2(
7968 A2(
7969 $elm$core$List$cons,
7970 _Utils_Tuple2(key, vdom),
7971 pairs),
7972 finalStyles);
7973 case 'NodeNS':
7974 var ns = html.a;
7975 var elemType = html.b;
7976 var properties = html.c;
7977 var children = html.d;
7978 var combinedStyles = A3($elm$core$List$foldl, $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyles, styles, properties);
7979 var _v10 = A3(
7980 $elm$core$List$foldl,
7981 $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyledHtml,
7982 _Utils_Tuple2(_List_Nil, combinedStyles),
7983 children);
7984 var childNodes = _v10.a;
7985 var finalStyles = _v10.b;
7986 var vdom = A4(
7987 $elm$virtual_dom$VirtualDom$nodeNS,
7988 ns,
7989 elemType,
7990 A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties),
7991 $elm$core$List$reverse(childNodes));
7992 return _Utils_Tuple2(
7993 A2(
7994 $elm$core$List$cons,
7995 _Utils_Tuple2(key, vdom),
7996 pairs),
7997 finalStyles);
7998 case 'KeyedNode':
7999 var elemType = html.a;
8000 var properties = html.b;
8001 var children = html.c;
8002 var combinedStyles = A3($elm$core$List$foldl, $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyles, styles, properties);
8003 var _v11 = A3(
8004 $elm$core$List$foldl,
8005 $rtfeldman$elm_css$VirtualDom$Styled$accumulateKeyedStyledHtml,
8006 _Utils_Tuple2(_List_Nil, combinedStyles),
8007 children);
8008 var childNodes = _v11.a;
8009 var finalStyles = _v11.b;
8010 var vdom = A3(
8011 $elm$virtual_dom$VirtualDom$keyedNode,
8012 elemType,
8013 A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties),
8014 $elm$core$List$reverse(childNodes));
8015 return _Utils_Tuple2(
8016 A2(
8017 $elm$core$List$cons,
8018 _Utils_Tuple2(key, vdom),
8019 pairs),
8020 finalStyles);
8021 default:
8022 var ns = html.a;
8023 var elemType = html.b;
8024 var properties = html.c;
8025 var children = html.d;
8026 var combinedStyles = A3($elm$core$List$foldl, $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyles, styles, properties);
8027 var _v12 = A3(
8028 $elm$core$List$foldl,
8029 $rtfeldman$elm_css$VirtualDom$Styled$accumulateKeyedStyledHtml,
8030 _Utils_Tuple2(_List_Nil, combinedStyles),
8031 children);
8032 var childNodes = _v12.a;
8033 var finalStyles = _v12.b;
8034 var vdom = A4(
8035 $elm$virtual_dom$VirtualDom$keyedNodeNS,
8036 ns,
8037 elemType,
8038 A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties),
8039 $elm$core$List$reverse(childNodes));
8040 return _Utils_Tuple2(
8041 A2(
8042 $elm$core$List$cons,
8043 _Utils_Tuple2(key, vdom),
8044 pairs),
8045 finalStyles);
8046 }
8047 });
8048var $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyledHtml = F2(
8049 function (html, _v0) {
8050 var nodes = _v0.a;
8051 var styles = _v0.b;
8052 switch (html.$) {
8053 case 'Unstyled':
8054 var vdomNode = html.a;
8055 return _Utils_Tuple2(
8056 A2($elm$core$List$cons, vdomNode, nodes),
8057 styles);
8058 case 'Node':
8059 var elemType = html.a;
8060 var properties = html.b;
8061 var children = html.c;
8062 var combinedStyles = A3($elm$core$List$foldl, $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyles, styles, properties);
8063 var _v2 = A3(
8064 $elm$core$List$foldl,
8065 $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyledHtml,
8066 _Utils_Tuple2(_List_Nil, combinedStyles),
8067 children);
8068 var childNodes = _v2.a;
8069 var finalStyles = _v2.b;
8070 var vdomNode = A3(
8071 $elm$virtual_dom$VirtualDom$node,
8072 elemType,
8073 A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties),
8074 $elm$core$List$reverse(childNodes));
8075 return _Utils_Tuple2(
8076 A2($elm$core$List$cons, vdomNode, nodes),
8077 finalStyles);
8078 case 'NodeNS':
8079 var ns = html.a;
8080 var elemType = html.b;
8081 var properties = html.c;
8082 var children = html.d;
8083 var combinedStyles = A3($elm$core$List$foldl, $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyles, styles, properties);
8084 var _v3 = A3(
8085 $elm$core$List$foldl,
8086 $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyledHtml,
8087 _Utils_Tuple2(_List_Nil, combinedStyles),
8088 children);
8089 var childNodes = _v3.a;
8090 var finalStyles = _v3.b;
8091 var vdomNode = A4(
8092 $elm$virtual_dom$VirtualDom$nodeNS,
8093 ns,
8094 elemType,
8095 A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties),
8096 $elm$core$List$reverse(childNodes));
8097 return _Utils_Tuple2(
8098 A2($elm$core$List$cons, vdomNode, nodes),
8099 finalStyles);
8100 case 'KeyedNode':
8101 var elemType = html.a;
8102 var properties = html.b;
8103 var children = html.c;
8104 var combinedStyles = A3($elm$core$List$foldl, $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyles, styles, properties);
8105 var _v4 = A3(
8106 $elm$core$List$foldl,
8107 $rtfeldman$elm_css$VirtualDom$Styled$accumulateKeyedStyledHtml,
8108 _Utils_Tuple2(_List_Nil, combinedStyles),
8109 children);
8110 var childNodes = _v4.a;
8111 var finalStyles = _v4.b;
8112 var vdomNode = A3(
8113 $elm$virtual_dom$VirtualDom$keyedNode,
8114 elemType,
8115 A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties),
8116 $elm$core$List$reverse(childNodes));
8117 return _Utils_Tuple2(
8118 A2($elm$core$List$cons, vdomNode, nodes),
8119 finalStyles);
8120 default:
8121 var ns = html.a;
8122 var elemType = html.b;
8123 var properties = html.c;
8124 var children = html.d;
8125 var combinedStyles = A3($elm$core$List$foldl, $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyles, styles, properties);
8126 var _v5 = A3(
8127 $elm$core$List$foldl,
8128 $rtfeldman$elm_css$VirtualDom$Styled$accumulateKeyedStyledHtml,
8129 _Utils_Tuple2(_List_Nil, combinedStyles),
8130 children);
8131 var childNodes = _v5.a;
8132 var finalStyles = _v5.b;
8133 var vdomNode = A4(
8134 $elm$virtual_dom$VirtualDom$keyedNodeNS,
8135 ns,
8136 elemType,
8137 A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties),
8138 $elm$core$List$reverse(childNodes));
8139 return _Utils_Tuple2(
8140 A2($elm$core$List$cons, vdomNode, nodes),
8141 finalStyles);
8142 }
8143 });
8144var $elm$core$Dict$singleton = F2(
8145 function (key, value) {
8146 return A5($elm$core$Dict$RBNode_elm_builtin, $elm$core$Dict$Black, key, value, $elm$core$Dict$RBEmpty_elm_builtin, $elm$core$Dict$RBEmpty_elm_builtin);
8147 });
8148var $rtfeldman$elm_css$VirtualDom$Styled$stylesFromPropertiesHelp = F2(
8149 function (candidate, properties) {
8150 stylesFromPropertiesHelp:
8151 while (true) {
8152 if (!properties.b) {
8153 return candidate;
8154 } else {
8155 var _v1 = properties.a;
8156 var styles = _v1.b;
8157 var classname = _v1.c;
8158 var rest = properties.b;
8159 if ($elm$core$String$isEmpty(classname)) {
8160 var $temp$candidate = candidate,
8161 $temp$properties = rest;
8162 candidate = $temp$candidate;
8163 properties = $temp$properties;
8164 continue stylesFromPropertiesHelp;
8165 } else {
8166 var $temp$candidate = $elm$core$Maybe$Just(
8167 _Utils_Tuple2(classname, styles)),
8168 $temp$properties = rest;
8169 candidate = $temp$candidate;
8170 properties = $temp$properties;
8171 continue stylesFromPropertiesHelp;
8172 }
8173 }
8174 }
8175 });
8176var $rtfeldman$elm_css$VirtualDom$Styled$stylesFromProperties = function (properties) {
8177 var _v0 = A2($rtfeldman$elm_css$VirtualDom$Styled$stylesFromPropertiesHelp, $elm$core$Maybe$Nothing, properties);
8178 if (_v0.$ === 'Nothing') {
8179 return $elm$core$Dict$empty;
8180 } else {
8181 var _v1 = _v0.a;
8182 var classname = _v1.a;
8183 var styles = _v1.b;
8184 return A2($elm$core$Dict$singleton, classname, styles);
8185 }
8186};
8187var $elm$virtual_dom$VirtualDom$text = _VirtualDom_text;
8188var $rtfeldman$elm_css$Css$Structure$compactHelp = F2(
8189 function (declaration, _v0) {
8190 var keyframesByName = _v0.a;
8191 var declarations = _v0.b;
8192 switch (declaration.$) {
8193 case 'StyleBlockDeclaration':
8194 var _v2 = declaration.a;
8195 var properties = _v2.c;
8196 return $elm$core$List$isEmpty(properties) ? _Utils_Tuple2(keyframesByName, declarations) : _Utils_Tuple2(
8197 keyframesByName,
8198 A2($elm$core$List$cons, declaration, declarations));
8199 case 'MediaRule':
8200 var styleBlocks = declaration.b;
8201 return A2(
8202 $elm$core$List$all,
8203 function (_v3) {
8204 var properties = _v3.c;
8205 return $elm$core$List$isEmpty(properties);
8206 },
8207 styleBlocks) ? _Utils_Tuple2(keyframesByName, declarations) : _Utils_Tuple2(
8208 keyframesByName,
8209 A2($elm$core$List$cons, declaration, declarations));
8210 case 'SupportsRule':
8211 var otherDeclarations = declaration.b;
8212 return $elm$core$List$isEmpty(otherDeclarations) ? _Utils_Tuple2(keyframesByName, declarations) : _Utils_Tuple2(
8213 keyframesByName,
8214 A2($elm$core$List$cons, declaration, declarations));
8215 case 'DocumentRule':
8216 return _Utils_Tuple2(
8217 keyframesByName,
8218 A2($elm$core$List$cons, declaration, declarations));
8219 case 'PageRule':
8220 var properties = declaration.b;
8221 return $elm$core$List$isEmpty(properties) ? _Utils_Tuple2(keyframesByName, declarations) : _Utils_Tuple2(
8222 keyframesByName,
8223 A2($elm$core$List$cons, declaration, declarations));
8224 case 'FontFace':
8225 var properties = declaration.a;
8226 return $elm$core$List$isEmpty(properties) ? _Utils_Tuple2(keyframesByName, declarations) : _Utils_Tuple2(
8227 keyframesByName,
8228 A2($elm$core$List$cons, declaration, declarations));
8229 case 'Keyframes':
8230 var record = declaration.a;
8231 return $elm$core$String$isEmpty(record.declaration) ? _Utils_Tuple2(keyframesByName, declarations) : _Utils_Tuple2(
8232 A3($elm$core$Dict$insert, record.name, record.declaration, keyframesByName),
8233 declarations);
8234 case 'Viewport':
8235 var properties = declaration.a;
8236 return $elm$core$List$isEmpty(properties) ? _Utils_Tuple2(keyframesByName, declarations) : _Utils_Tuple2(
8237 keyframesByName,
8238 A2($elm$core$List$cons, declaration, declarations));
8239 case 'CounterStyle':
8240 var properties = declaration.a;
8241 return $elm$core$List$isEmpty(properties) ? _Utils_Tuple2(keyframesByName, declarations) : _Utils_Tuple2(
8242 keyframesByName,
8243 A2($elm$core$List$cons, declaration, declarations));
8244 default:
8245 var tuples = declaration.a;
8246 return A2(
8247 $elm$core$List$all,
8248 function (_v4) {
8249 var properties = _v4.b;
8250 return $elm$core$List$isEmpty(properties);
8251 },
8252 tuples) ? _Utils_Tuple2(keyframesByName, declarations) : _Utils_Tuple2(
8253 keyframesByName,
8254 A2($elm$core$List$cons, declaration, declarations));
8255 }
8256 });
8257var $rtfeldman$elm_css$Css$Structure$Keyframes = function (a) {
8258 return {$: 'Keyframes', a: a};
8259};
8260var $rtfeldman$elm_css$Css$Structure$withKeyframeDeclarations = F2(
8261 function (keyframesByName, compactedDeclarations) {
8262 return A2(
8263 $elm$core$List$append,
8264 A2(
8265 $elm$core$List$map,
8266 function (_v0) {
8267 var name = _v0.a;
8268 var decl = _v0.b;
8269 return $rtfeldman$elm_css$Css$Structure$Keyframes(
8270 {declaration: decl, name: name});
8271 },
8272 $elm$core$Dict$toList(keyframesByName)),
8273 compactedDeclarations);
8274 });
8275var $rtfeldman$elm_css$Css$Structure$compactStylesheet = function (_v0) {
8276 var charset = _v0.charset;
8277 var imports = _v0.imports;
8278 var namespaces = _v0.namespaces;
8279 var declarations = _v0.declarations;
8280 var _v1 = A3(
8281 $elm$core$List$foldr,
8282 $rtfeldman$elm_css$Css$Structure$compactHelp,
8283 _Utils_Tuple2($elm$core$Dict$empty, _List_Nil),
8284 declarations);
8285 var keyframesByName = _v1.a;
8286 var compactedDeclarations = _v1.b;
8287 var finalDeclarations = A2($rtfeldman$elm_css$Css$Structure$withKeyframeDeclarations, keyframesByName, compactedDeclarations);
8288 return {charset: charset, declarations: finalDeclarations, imports: imports, namespaces: namespaces};
8289};
8290var $elm$core$Maybe$map = F2(
8291 function (f, maybe) {
8292 if (maybe.$ === 'Just') {
8293 var value = maybe.a;
8294 return $elm$core$Maybe$Just(
8295 f(value));
8296 } else {
8297 return $elm$core$Maybe$Nothing;
8298 }
8299 });
8300var $rtfeldman$elm_css$Css$Structure$Output$charsetToString = function (charset) {
8301 return A2(
8302 $elm$core$Maybe$withDefault,
8303 '',
8304 A2(
8305 $elm$core$Maybe$map,
8306 function (str) {
8307 return '@charset \"' + (str + '\"');
8308 },
8309 charset));
8310};
8311var $elm$core$List$filter = F2(
8312 function (isGood, list) {
8313 return A3(
8314 $elm$core$List$foldr,
8315 F2(
8316 function (x, xs) {
8317 return isGood(x) ? A2($elm$core$List$cons, x, xs) : xs;
8318 }),
8319 _List_Nil,
8320 list);
8321 });
8322var $rtfeldman$elm_css$Css$Structure$Output$mediaExpressionToString = function (expression) {
8323 return '(' + (expression.feature + (A2(
8324 $elm$core$Maybe$withDefault,
8325 '',
8326 A2(
8327 $elm$core$Maybe$map,
8328 $elm$core$Basics$append(': '),
8329 expression.value)) + ')'));
8330};
8331var $rtfeldman$elm_css$Css$Structure$Output$mediaTypeToString = function (mediaType) {
8332 switch (mediaType.$) {
8333 case 'Print':
8334 return 'print';
8335 case 'Screen':
8336 return 'screen';
8337 default:
8338 return 'speech';
8339 }
8340};
8341var $rtfeldman$elm_css$Css$Structure$Output$mediaQueryToString = function (mediaQuery) {
8342 var prefixWith = F3(
8343 function (str, mediaType, expressions) {
8344 return str + (' ' + A2(
8345 $elm$core$String$join,
8346 ' and ',
8347 A2(
8348 $elm$core$List$cons,
8349 $rtfeldman$elm_css$Css$Structure$Output$mediaTypeToString(mediaType),
8350 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Structure$Output$mediaExpressionToString, expressions))));
8351 });
8352 switch (mediaQuery.$) {
8353 case 'AllQuery':
8354 var expressions = mediaQuery.a;
8355 return A2(
8356 $elm$core$String$join,
8357 ' and ',
8358 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Structure$Output$mediaExpressionToString, expressions));
8359 case 'OnlyQuery':
8360 var mediaType = mediaQuery.a;
8361 var expressions = mediaQuery.b;
8362 return A3(prefixWith, 'only', mediaType, expressions);
8363 case 'NotQuery':
8364 var mediaType = mediaQuery.a;
8365 var expressions = mediaQuery.b;
8366 return A3(prefixWith, 'not', mediaType, expressions);
8367 default:
8368 var str = mediaQuery.a;
8369 return str;
8370 }
8371};
8372var $rtfeldman$elm_css$Css$Structure$Output$importMediaQueryToString = F2(
8373 function (name, mediaQuery) {
8374 return '@import \"' + (name + ($rtfeldman$elm_css$Css$Structure$Output$mediaQueryToString(mediaQuery) + '\"'));
8375 });
8376var $rtfeldman$elm_css$Css$Structure$Output$importToString = function (_v0) {
8377 var name = _v0.a;
8378 var mediaQueries = _v0.b;
8379 return A2(
8380 $elm$core$String$join,
8381 '\n',
8382 A2(
8383 $elm$core$List$map,
8384 $rtfeldman$elm_css$Css$Structure$Output$importMediaQueryToString(name),
8385 mediaQueries));
8386};
8387var $rtfeldman$elm_css$Css$Structure$Output$namespaceToString = function (_v0) {
8388 var prefix = _v0.a;
8389 var str = _v0.b;
8390 return '@namespace ' + (prefix + ('\"' + (str + '\"')));
8391};
8392var $rtfeldman$elm_css$Css$Structure$Output$spaceIndent = ' ';
8393var $rtfeldman$elm_css$Css$Structure$Output$indent = function (str) {
8394 return _Utils_ap($rtfeldman$elm_css$Css$Structure$Output$spaceIndent, str);
8395};
8396var $rtfeldman$elm_css$Css$Structure$Output$noIndent = '';
8397var $rtfeldman$elm_css$Css$Structure$Output$emitProperty = function (str) {
8398 return str + ';';
8399};
8400var $rtfeldman$elm_css$Css$Structure$Output$emitProperties = function (properties) {
8401 return A2(
8402 $elm$core$String$join,
8403 '\n',
8404 A2(
8405 $elm$core$List$map,
8406 A2($elm$core$Basics$composeL, $rtfeldman$elm_css$Css$Structure$Output$indent, $rtfeldman$elm_css$Css$Structure$Output$emitProperty),
8407 properties));
8408};
8409var $elm$core$String$append = _String_append;
8410var $rtfeldman$elm_css$Css$Structure$Output$pseudoElementToString = function (_v0) {
8411 var str = _v0.a;
8412 return '::' + str;
8413};
8414var $rtfeldman$elm_css$Css$Structure$Output$combinatorToString = function (combinator) {
8415 switch (combinator.$) {
8416 case 'AdjacentSibling':
8417 return '+';
8418 case 'GeneralSibling':
8419 return '~';
8420 case 'Child':
8421 return '>';
8422 default:
8423 return '';
8424 }
8425};
8426var $rtfeldman$elm_css$Css$Structure$Output$repeatableSimpleSelectorToString = function (repeatableSimpleSelector) {
8427 switch (repeatableSimpleSelector.$) {
8428 case 'ClassSelector':
8429 var str = repeatableSimpleSelector.a;
8430 return '.' + str;
8431 case 'IdSelector':
8432 var str = repeatableSimpleSelector.a;
8433 return '#' + str;
8434 case 'PseudoClassSelector':
8435 var str = repeatableSimpleSelector.a;
8436 return ':' + str;
8437 default:
8438 var str = repeatableSimpleSelector.a;
8439 return '[' + (str + ']');
8440 }
8441};
8442var $rtfeldman$elm_css$Css$Structure$Output$simpleSelectorSequenceToString = function (simpleSelectorSequence) {
8443 switch (simpleSelectorSequence.$) {
8444 case 'TypeSelectorSequence':
8445 var str = simpleSelectorSequence.a.a;
8446 var repeatableSimpleSelectors = simpleSelectorSequence.b;
8447 return A2(
8448 $elm$core$String$join,
8449 '',
8450 A2(
8451 $elm$core$List$cons,
8452 str,
8453 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Structure$Output$repeatableSimpleSelectorToString, repeatableSimpleSelectors)));
8454 case 'UniversalSelectorSequence':
8455 var repeatableSimpleSelectors = simpleSelectorSequence.a;
8456 return $elm$core$List$isEmpty(repeatableSimpleSelectors) ? '*' : A2(
8457 $elm$core$String$join,
8458 '',
8459 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Structure$Output$repeatableSimpleSelectorToString, repeatableSimpleSelectors));
8460 default:
8461 var str = simpleSelectorSequence.a;
8462 var repeatableSimpleSelectors = simpleSelectorSequence.b;
8463 return A2(
8464 $elm$core$String$join,
8465 '',
8466 A2(
8467 $elm$core$List$cons,
8468 str,
8469 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Structure$Output$repeatableSimpleSelectorToString, repeatableSimpleSelectors)));
8470 }
8471};
8472var $rtfeldman$elm_css$Css$Structure$Output$selectorChainToString = function (_v0) {
8473 var combinator = _v0.a;
8474 var sequence = _v0.b;
8475 return A2(
8476 $elm$core$String$join,
8477 ' ',
8478 _List_fromArray(
8479 [
8480 $rtfeldman$elm_css$Css$Structure$Output$combinatorToString(combinator),
8481 $rtfeldman$elm_css$Css$Structure$Output$simpleSelectorSequenceToString(sequence)
8482 ]));
8483};
8484var $rtfeldman$elm_css$Css$Structure$Output$selectorToString = function (_v0) {
8485 var simpleSelectorSequence = _v0.a;
8486 var chain = _v0.b;
8487 var pseudoElement = _v0.c;
8488 var segments = A2(
8489 $elm$core$List$cons,
8490 $rtfeldman$elm_css$Css$Structure$Output$simpleSelectorSequenceToString(simpleSelectorSequence),
8491 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Structure$Output$selectorChainToString, chain));
8492 var pseudoElementsString = A2(
8493 $elm$core$String$join,
8494 '',
8495 _List_fromArray(
8496 [
8497 A2(
8498 $elm$core$Maybe$withDefault,
8499 '',
8500 A2($elm$core$Maybe$map, $rtfeldman$elm_css$Css$Structure$Output$pseudoElementToString, pseudoElement))
8501 ]));
8502 return A2(
8503 $elm$core$String$append,
8504 A2(
8505 $elm$core$String$join,
8506 ' ',
8507 A2(
8508 $elm$core$List$filter,
8509 A2($elm$core$Basics$composeL, $elm$core$Basics$not, $elm$core$String$isEmpty),
8510 segments)),
8511 pseudoElementsString);
8512};
8513var $rtfeldman$elm_css$Css$Structure$Output$prettyPrintStyleBlock = F2(
8514 function (indentLevel, _v0) {
8515 var firstSelector = _v0.a;
8516 var otherSelectors = _v0.b;
8517 var properties = _v0.c;
8518 var selectorStr = A2(
8519 $elm$core$String$join,
8520 ', ',
8521 A2(
8522 $elm$core$List$map,
8523 $rtfeldman$elm_css$Css$Structure$Output$selectorToString,
8524 A2($elm$core$List$cons, firstSelector, otherSelectors)));
8525 return A2(
8526 $elm$core$String$join,
8527 '',
8528 _List_fromArray(
8529 [
8530 selectorStr,
8531 ' {\n',
8532 indentLevel,
8533 $rtfeldman$elm_css$Css$Structure$Output$emitProperties(properties),
8534 '\n',
8535 indentLevel,
8536 '}'
8537 ]));
8538 });
8539var $rtfeldman$elm_css$Css$Structure$Output$prettyPrintDeclaration = function (decl) {
8540 switch (decl.$) {
8541 case 'StyleBlockDeclaration':
8542 var styleBlock = decl.a;
8543 return A2($rtfeldman$elm_css$Css$Structure$Output$prettyPrintStyleBlock, $rtfeldman$elm_css$Css$Structure$Output$noIndent, styleBlock);
8544 case 'MediaRule':
8545 var mediaQueries = decl.a;
8546 var styleBlocks = decl.b;
8547 var query = A2(
8548 $elm$core$String$join,
8549 ',\n',
8550 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Structure$Output$mediaQueryToString, mediaQueries));
8551 var blocks = A2(
8552 $elm$core$String$join,
8553 '\n\n',
8554 A2(
8555 $elm$core$List$map,
8556 A2(
8557 $elm$core$Basics$composeL,
8558 $rtfeldman$elm_css$Css$Structure$Output$indent,
8559 $rtfeldman$elm_css$Css$Structure$Output$prettyPrintStyleBlock($rtfeldman$elm_css$Css$Structure$Output$spaceIndent)),
8560 styleBlocks));
8561 return '@media ' + (query + (' {\n' + (blocks + '\n}')));
8562 case 'SupportsRule':
8563 return 'TODO';
8564 case 'DocumentRule':
8565 return 'TODO';
8566 case 'PageRule':
8567 return 'TODO';
8568 case 'FontFace':
8569 return 'TODO';
8570 case 'Keyframes':
8571 var name = decl.a.name;
8572 var declaration = decl.a.declaration;
8573 return '@keyframes ' + (name + (' {\n' + (declaration + '\n}')));
8574 case 'Viewport':
8575 return 'TODO';
8576 case 'CounterStyle':
8577 return 'TODO';
8578 default:
8579 return 'TODO';
8580 }
8581};
8582var $rtfeldman$elm_css$Css$Structure$Output$prettyPrint = function (_v0) {
8583 var charset = _v0.charset;
8584 var imports = _v0.imports;
8585 var namespaces = _v0.namespaces;
8586 var declarations = _v0.declarations;
8587 return A2(
8588 $elm$core$String$join,
8589 '\n\n',
8590 A2(
8591 $elm$core$List$filter,
8592 A2($elm$core$Basics$composeL, $elm$core$Basics$not, $elm$core$String$isEmpty),
8593 _List_fromArray(
8594 [
8595 $rtfeldman$elm_css$Css$Structure$Output$charsetToString(charset),
8596 A2(
8597 $elm$core$String$join,
8598 '\n',
8599 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Structure$Output$importToString, imports)),
8600 A2(
8601 $elm$core$String$join,
8602 '\n',
8603 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Structure$Output$namespaceToString, namespaces)),
8604 A2(
8605 $elm$core$String$join,
8606 '\n\n',
8607 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Structure$Output$prettyPrintDeclaration, declarations))
8608 ])));
8609};
8610var $rtfeldman$elm_css$Css$Structure$CounterStyle = function (a) {
8611 return {$: 'CounterStyle', a: a};
8612};
8613var $rtfeldman$elm_css$Css$Structure$FontFace = function (a) {
8614 return {$: 'FontFace', a: a};
8615};
8616var $rtfeldman$elm_css$Css$Structure$PageRule = F2(
8617 function (a, b) {
8618 return {$: 'PageRule', a: a, b: b};
8619 });
8620var $rtfeldman$elm_css$Css$Structure$Selector = F3(
8621 function (a, b, c) {
8622 return {$: 'Selector', a: a, b: b, c: c};
8623 });
8624var $rtfeldman$elm_css$Css$Structure$StyleBlock = F3(
8625 function (a, b, c) {
8626 return {$: 'StyleBlock', a: a, b: b, c: c};
8627 });
8628var $rtfeldman$elm_css$Css$Structure$StyleBlockDeclaration = function (a) {
8629 return {$: 'StyleBlockDeclaration', a: a};
8630};
8631var $rtfeldman$elm_css$Css$Structure$SupportsRule = F2(
8632 function (a, b) {
8633 return {$: 'SupportsRule', a: a, b: b};
8634 });
8635var $rtfeldman$elm_css$Css$Structure$Viewport = function (a) {
8636 return {$: 'Viewport', a: a};
8637};
8638var $rtfeldman$elm_css$Css$Structure$MediaRule = F2(
8639 function (a, b) {
8640 return {$: 'MediaRule', a: a, b: b};
8641 });
8642var $rtfeldman$elm_css$Css$Structure$mapLast = F2(
8643 function (update, list) {
8644 if (!list.b) {
8645 return list;
8646 } else {
8647 if (!list.b.b) {
8648 var only = list.a;
8649 return _List_fromArray(
8650 [
8651 update(only)
8652 ]);
8653 } else {
8654 var first = list.a;
8655 var rest = list.b;
8656 return A2(
8657 $elm$core$List$cons,
8658 first,
8659 A2($rtfeldman$elm_css$Css$Structure$mapLast, update, rest));
8660 }
8661 }
8662 });
8663var $rtfeldman$elm_css$Css$Structure$withPropertyAppended = F2(
8664 function (property, _v0) {
8665 var firstSelector = _v0.a;
8666 var otherSelectors = _v0.b;
8667 var properties = _v0.c;
8668 return A3(
8669 $rtfeldman$elm_css$Css$Structure$StyleBlock,
8670 firstSelector,
8671 otherSelectors,
8672 _Utils_ap(
8673 properties,
8674 _List_fromArray(
8675 [property])));
8676 });
8677var $rtfeldman$elm_css$Css$Structure$appendProperty = F2(
8678 function (property, declarations) {
8679 if (!declarations.b) {
8680 return declarations;
8681 } else {
8682 if (!declarations.b.b) {
8683 switch (declarations.a.$) {
8684 case 'StyleBlockDeclaration':
8685 var styleBlock = declarations.a.a;
8686 return _List_fromArray(
8687 [
8688 $rtfeldman$elm_css$Css$Structure$StyleBlockDeclaration(
8689 A2($rtfeldman$elm_css$Css$Structure$withPropertyAppended, property, styleBlock))
8690 ]);
8691 case 'MediaRule':
8692 var _v1 = declarations.a;
8693 var mediaQueries = _v1.a;
8694 var styleBlocks = _v1.b;
8695 return _List_fromArray(
8696 [
8697 A2(
8698 $rtfeldman$elm_css$Css$Structure$MediaRule,
8699 mediaQueries,
8700 A2(
8701 $rtfeldman$elm_css$Css$Structure$mapLast,
8702 $rtfeldman$elm_css$Css$Structure$withPropertyAppended(property),
8703 styleBlocks))
8704 ]);
8705 default:
8706 return declarations;
8707 }
8708 } else {
8709 var first = declarations.a;
8710 var rest = declarations.b;
8711 return A2(
8712 $elm$core$List$cons,
8713 first,
8714 A2($rtfeldman$elm_css$Css$Structure$appendProperty, property, rest));
8715 }
8716 }
8717 });
8718var $rtfeldman$elm_css$Css$Structure$appendToLastSelector = F2(
8719 function (f, styleBlock) {
8720 if (!styleBlock.b.b) {
8721 var only = styleBlock.a;
8722 var properties = styleBlock.c;
8723 return _List_fromArray(
8724 [
8725 A3($rtfeldman$elm_css$Css$Structure$StyleBlock, only, _List_Nil, properties),
8726 A3(
8727 $rtfeldman$elm_css$Css$Structure$StyleBlock,
8728 f(only),
8729 _List_Nil,
8730 _List_Nil)
8731 ]);
8732 } else {
8733 var first = styleBlock.a;
8734 var rest = styleBlock.b;
8735 var properties = styleBlock.c;
8736 var newRest = A2($elm$core$List$map, f, rest);
8737 var newFirst = f(first);
8738 return _List_fromArray(
8739 [
8740 A3($rtfeldman$elm_css$Css$Structure$StyleBlock, first, rest, properties),
8741 A3($rtfeldman$elm_css$Css$Structure$StyleBlock, newFirst, newRest, _List_Nil)
8742 ]);
8743 }
8744 });
8745var $rtfeldman$elm_css$Css$Structure$applyPseudoElement = F2(
8746 function (pseudo, _v0) {
8747 var sequence = _v0.a;
8748 var selectors = _v0.b;
8749 return A3(
8750 $rtfeldman$elm_css$Css$Structure$Selector,
8751 sequence,
8752 selectors,
8753 $elm$core$Maybe$Just(pseudo));
8754 });
8755var $rtfeldman$elm_css$Css$Structure$appendPseudoElementToLastSelector = F2(
8756 function (pseudo, styleBlock) {
8757 return A2(
8758 $rtfeldman$elm_css$Css$Structure$appendToLastSelector,
8759 $rtfeldman$elm_css$Css$Structure$applyPseudoElement(pseudo),
8760 styleBlock);
8761 });
8762var $rtfeldman$elm_css$Css$Structure$CustomSelector = F2(
8763 function (a, b) {
8764 return {$: 'CustomSelector', a: a, b: b};
8765 });
8766var $rtfeldman$elm_css$Css$Structure$TypeSelectorSequence = F2(
8767 function (a, b) {
8768 return {$: 'TypeSelectorSequence', a: a, b: b};
8769 });
8770var $rtfeldman$elm_css$Css$Structure$UniversalSelectorSequence = function (a) {
8771 return {$: 'UniversalSelectorSequence', a: a};
8772};
8773var $rtfeldman$elm_css$Css$Structure$appendRepeatable = F2(
8774 function (selector, sequence) {
8775 switch (sequence.$) {
8776 case 'TypeSelectorSequence':
8777 var typeSelector = sequence.a;
8778 var list = sequence.b;
8779 return A2(
8780 $rtfeldman$elm_css$Css$Structure$TypeSelectorSequence,
8781 typeSelector,
8782 _Utils_ap(
8783 list,
8784 _List_fromArray(
8785 [selector])));
8786 case 'UniversalSelectorSequence':
8787 var list = sequence.a;
8788 return $rtfeldman$elm_css$Css$Structure$UniversalSelectorSequence(
8789 _Utils_ap(
8790 list,
8791 _List_fromArray(
8792 [selector])));
8793 default:
8794 var str = sequence.a;
8795 var list = sequence.b;
8796 return A2(
8797 $rtfeldman$elm_css$Css$Structure$CustomSelector,
8798 str,
8799 _Utils_ap(
8800 list,
8801 _List_fromArray(
8802 [selector])));
8803 }
8804 });
8805var $rtfeldman$elm_css$Css$Structure$appendRepeatableWithCombinator = F2(
8806 function (selector, list) {
8807 if (!list.b) {
8808 return _List_Nil;
8809 } else {
8810 if (!list.b.b) {
8811 var _v1 = list.a;
8812 var combinator = _v1.a;
8813 var sequence = _v1.b;
8814 return _List_fromArray(
8815 [
8816 _Utils_Tuple2(
8817 combinator,
8818 A2($rtfeldman$elm_css$Css$Structure$appendRepeatable, selector, sequence))
8819 ]);
8820 } else {
8821 var first = list.a;
8822 var rest = list.b;
8823 return A2(
8824 $elm$core$List$cons,
8825 first,
8826 A2($rtfeldman$elm_css$Css$Structure$appendRepeatableWithCombinator, selector, rest));
8827 }
8828 }
8829 });
8830var $rtfeldman$elm_css$Css$Structure$appendRepeatableSelector = F2(
8831 function (repeatableSimpleSelector, selector) {
8832 if (!selector.b.b) {
8833 var sequence = selector.a;
8834 var pseudoElement = selector.c;
8835 return A3(
8836 $rtfeldman$elm_css$Css$Structure$Selector,
8837 A2($rtfeldman$elm_css$Css$Structure$appendRepeatable, repeatableSimpleSelector, sequence),
8838 _List_Nil,
8839 pseudoElement);
8840 } else {
8841 var firstSelector = selector.a;
8842 var tuples = selector.b;
8843 var pseudoElement = selector.c;
8844 return A3(
8845 $rtfeldman$elm_css$Css$Structure$Selector,
8846 firstSelector,
8847 A2($rtfeldman$elm_css$Css$Structure$appendRepeatableWithCombinator, repeatableSimpleSelector, tuples),
8848 pseudoElement);
8849 }
8850 });
8851var $rtfeldman$elm_css$Css$Structure$appendRepeatableToLastSelector = F2(
8852 function (selector, styleBlock) {
8853 return A2(
8854 $rtfeldman$elm_css$Css$Structure$appendToLastSelector,
8855 $rtfeldman$elm_css$Css$Structure$appendRepeatableSelector(selector),
8856 styleBlock);
8857 });
8858var $rtfeldman$elm_css$Css$Preprocess$Resolve$collectSelectors = function (declarations) {
8859 collectSelectors:
8860 while (true) {
8861 if (!declarations.b) {
8862 return _List_Nil;
8863 } else {
8864 if (declarations.a.$ === 'StyleBlockDeclaration') {
8865 var _v1 = declarations.a.a;
8866 var firstSelector = _v1.a;
8867 var otherSelectors = _v1.b;
8868 var rest = declarations.b;
8869 return _Utils_ap(
8870 A2($elm$core$List$cons, firstSelector, otherSelectors),
8871 $rtfeldman$elm_css$Css$Preprocess$Resolve$collectSelectors(rest));
8872 } else {
8873 var rest = declarations.b;
8874 var $temp$declarations = rest;
8875 declarations = $temp$declarations;
8876 continue collectSelectors;
8877 }
8878 }
8879 }
8880};
8881var $rtfeldman$elm_css$Css$Structure$DocumentRule = F5(
8882 function (a, b, c, d, e) {
8883 return {$: 'DocumentRule', a: a, b: b, c: c, d: d, e: e};
8884 });
8885var $rtfeldman$elm_css$Css$Structure$concatMapLastStyleBlock = F2(
8886 function (update, declarations) {
8887 _v0$12:
8888 while (true) {
8889 if (!declarations.b) {
8890 return declarations;
8891 } else {
8892 if (!declarations.b.b) {
8893 switch (declarations.a.$) {
8894 case 'StyleBlockDeclaration':
8895 var styleBlock = declarations.a.a;
8896 return A2(
8897 $elm$core$List$map,
8898 $rtfeldman$elm_css$Css$Structure$StyleBlockDeclaration,
8899 update(styleBlock));
8900 case 'MediaRule':
8901 if (declarations.a.b.b) {
8902 if (!declarations.a.b.b.b) {
8903 var _v1 = declarations.a;
8904 var mediaQueries = _v1.a;
8905 var _v2 = _v1.b;
8906 var styleBlock = _v2.a;
8907 return _List_fromArray(
8908 [
8909 A2(
8910 $rtfeldman$elm_css$Css$Structure$MediaRule,
8911 mediaQueries,
8912 update(styleBlock))
8913 ]);
8914 } else {
8915 var _v3 = declarations.a;
8916 var mediaQueries = _v3.a;
8917 var _v4 = _v3.b;
8918 var first = _v4.a;
8919 var rest = _v4.b;
8920 var _v5 = A2(
8921 $rtfeldman$elm_css$Css$Structure$concatMapLastStyleBlock,
8922 update,
8923 _List_fromArray(
8924 [
8925 A2($rtfeldman$elm_css$Css$Structure$MediaRule, mediaQueries, rest)
8926 ]));
8927 if ((_v5.b && (_v5.a.$ === 'MediaRule')) && (!_v5.b.b)) {
8928 var _v6 = _v5.a;
8929 var newMediaQueries = _v6.a;
8930 var newStyleBlocks = _v6.b;
8931 return _List_fromArray(
8932 [
8933 A2(
8934 $rtfeldman$elm_css$Css$Structure$MediaRule,
8935 newMediaQueries,
8936 A2($elm$core$List$cons, first, newStyleBlocks))
8937 ]);
8938 } else {
8939 var newDeclarations = _v5;
8940 return newDeclarations;
8941 }
8942 }
8943 } else {
8944 break _v0$12;
8945 }
8946 case 'SupportsRule':
8947 var _v7 = declarations.a;
8948 var str = _v7.a;
8949 var nestedDeclarations = _v7.b;
8950 return _List_fromArray(
8951 [
8952 A2(
8953 $rtfeldman$elm_css$Css$Structure$SupportsRule,
8954 str,
8955 A2($rtfeldman$elm_css$Css$Structure$concatMapLastStyleBlock, update, nestedDeclarations))
8956 ]);
8957 case 'DocumentRule':
8958 var _v8 = declarations.a;
8959 var str1 = _v8.a;
8960 var str2 = _v8.b;
8961 var str3 = _v8.c;
8962 var str4 = _v8.d;
8963 var styleBlock = _v8.e;
8964 return A2(
8965 $elm$core$List$map,
8966 A4($rtfeldman$elm_css$Css$Structure$DocumentRule, str1, str2, str3, str4),
8967 update(styleBlock));
8968 case 'PageRule':
8969 var _v9 = declarations.a;
8970 return declarations;
8971 case 'FontFace':
8972 return declarations;
8973 case 'Keyframes':
8974 return declarations;
8975 case 'Viewport':
8976 return declarations;
8977 case 'CounterStyle':
8978 return declarations;
8979 default:
8980 return declarations;
8981 }
8982 } else {
8983 break _v0$12;
8984 }
8985 }
8986 }
8987 var first = declarations.a;
8988 var rest = declarations.b;
8989 return A2(
8990 $elm$core$List$cons,
8991 first,
8992 A2($rtfeldman$elm_css$Css$Structure$concatMapLastStyleBlock, update, rest));
8993 });
8994var $elm$core$String$cons = _String_cons;
8995var $rtfeldman$elm_css$ElmCssVendor$Murmur3$HashData = F4(
8996 function (shift, seed, hash, charsProcessed) {
8997 return {charsProcessed: charsProcessed, hash: hash, seed: seed, shift: shift};
8998 });
8999var $rtfeldman$elm_css$ElmCssVendor$Murmur3$c1 = 3432918353;
9000var $rtfeldman$elm_css$ElmCssVendor$Murmur3$c2 = 461845907;
9001var $elm$core$Bitwise$and = _Bitwise_and;
9002var $elm$core$Bitwise$shiftLeftBy = _Bitwise_shiftLeftBy;
9003var $elm$core$Bitwise$shiftRightZfBy = _Bitwise_shiftRightZfBy;
9004var $rtfeldman$elm_css$ElmCssVendor$Murmur3$multiplyBy = F2(
9005 function (b, a) {
9006 return ((a & 65535) * b) + ((((a >>> 16) * b) & 65535) << 16);
9007 });
9008var $elm$core$Bitwise$or = _Bitwise_or;
9009var $rtfeldman$elm_css$ElmCssVendor$Murmur3$rotlBy = F2(
9010 function (b, a) {
9011 return (a << b) | (a >>> (32 - b));
9012 });
9013var $elm$core$Bitwise$xor = _Bitwise_xor;
9014var $rtfeldman$elm_css$ElmCssVendor$Murmur3$finalize = function (data) {
9015 var acc = (!(!data.hash)) ? (data.seed ^ A2(
9016 $rtfeldman$elm_css$ElmCssVendor$Murmur3$multiplyBy,
9017 $rtfeldman$elm_css$ElmCssVendor$Murmur3$c2,
9018 A2(
9019 $rtfeldman$elm_css$ElmCssVendor$Murmur3$rotlBy,
9020 15,
9021 A2($rtfeldman$elm_css$ElmCssVendor$Murmur3$multiplyBy, $rtfeldman$elm_css$ElmCssVendor$Murmur3$c1, data.hash)))) : data.seed;
9022 var h0 = acc ^ data.charsProcessed;
9023 var h1 = A2($rtfeldman$elm_css$ElmCssVendor$Murmur3$multiplyBy, 2246822507, h0 ^ (h0 >>> 16));
9024 var h2 = A2($rtfeldman$elm_css$ElmCssVendor$Murmur3$multiplyBy, 3266489909, h1 ^ (h1 >>> 13));
9025 return (h2 ^ (h2 >>> 16)) >>> 0;
9026};
9027var $elm$core$String$foldl = _String_foldl;
9028var $rtfeldman$elm_css$ElmCssVendor$Murmur3$mix = F2(
9029 function (h1, k1) {
9030 return A2(
9031 $rtfeldman$elm_css$ElmCssVendor$Murmur3$multiplyBy,
9032 5,
9033 A2(
9034 $rtfeldman$elm_css$ElmCssVendor$Murmur3$rotlBy,
9035 13,
9036 h1 ^ A2(
9037 $rtfeldman$elm_css$ElmCssVendor$Murmur3$multiplyBy,
9038 $rtfeldman$elm_css$ElmCssVendor$Murmur3$c2,
9039 A2(
9040 $rtfeldman$elm_css$ElmCssVendor$Murmur3$rotlBy,
9041 15,
9042 A2($rtfeldman$elm_css$ElmCssVendor$Murmur3$multiplyBy, $rtfeldman$elm_css$ElmCssVendor$Murmur3$c1, k1))))) + 3864292196;
9043 });
9044var $rtfeldman$elm_css$ElmCssVendor$Murmur3$hashFold = F2(
9045 function (c, data) {
9046 var res = data.hash | ((255 & $elm$core$Char$toCode(c)) << data.shift);
9047 var _v0 = data.shift;
9048 if (_v0 === 24) {
9049 return {
9050 charsProcessed: data.charsProcessed + 1,
9051 hash: 0,
9052 seed: A2($rtfeldman$elm_css$ElmCssVendor$Murmur3$mix, data.seed, res),
9053 shift: 0
9054 };
9055 } else {
9056 return {charsProcessed: data.charsProcessed + 1, hash: res, seed: data.seed, shift: data.shift + 8};
9057 }
9058 });
9059var $rtfeldman$elm_css$ElmCssVendor$Murmur3$hashString = F2(
9060 function (seed, str) {
9061 return $rtfeldman$elm_css$ElmCssVendor$Murmur3$finalize(
9062 A3(
9063 $elm$core$String$foldl,
9064 $rtfeldman$elm_css$ElmCssVendor$Murmur3$hashFold,
9065 A4($rtfeldman$elm_css$ElmCssVendor$Murmur3$HashData, 0, seed, 0, 0),
9066 str));
9067 });
9068var $rtfeldman$elm_css$Hash$murmurSeed = 15739;
9069var $elm$core$String$fromList = _String_fromList;
9070var $elm$core$Basics$modBy = _Basics_modBy;
9071var $rtfeldman$elm_hex$Hex$unsafeToDigit = function (num) {
9072 unsafeToDigit:
9073 while (true) {
9074 switch (num) {
9075 case 0:
9076 return _Utils_chr('0');
9077 case 1:
9078 return _Utils_chr('1');
9079 case 2:
9080 return _Utils_chr('2');
9081 case 3:
9082 return _Utils_chr('3');
9083 case 4:
9084 return _Utils_chr('4');
9085 case 5:
9086 return _Utils_chr('5');
9087 case 6:
9088 return _Utils_chr('6');
9089 case 7:
9090 return _Utils_chr('7');
9091 case 8:
9092 return _Utils_chr('8');
9093 case 9:
9094 return _Utils_chr('9');
9095 case 10:
9096 return _Utils_chr('a');
9097 case 11:
9098 return _Utils_chr('b');
9099 case 12:
9100 return _Utils_chr('c');
9101 case 13:
9102 return _Utils_chr('d');
9103 case 14:
9104 return _Utils_chr('e');
9105 case 15:
9106 return _Utils_chr('f');
9107 default:
9108 var $temp$num = num;
9109 num = $temp$num;
9110 continue unsafeToDigit;
9111 }
9112 }
9113};
9114var $rtfeldman$elm_hex$Hex$unsafePositiveToDigits = F2(
9115 function (digits, num) {
9116 unsafePositiveToDigits:
9117 while (true) {
9118 if (num < 16) {
9119 return A2(
9120 $elm$core$List$cons,
9121 $rtfeldman$elm_hex$Hex$unsafeToDigit(num),
9122 digits);
9123 } else {
9124 var $temp$digits = A2(
9125 $elm$core$List$cons,
9126 $rtfeldman$elm_hex$Hex$unsafeToDigit(
9127 A2($elm$core$Basics$modBy, 16, num)),
9128 digits),
9129 $temp$num = (num / 16) | 0;
9130 digits = $temp$digits;
9131 num = $temp$num;
9132 continue unsafePositiveToDigits;
9133 }
9134 }
9135 });
9136var $rtfeldman$elm_hex$Hex$toString = function (num) {
9137 return $elm$core$String$fromList(
9138 (num < 0) ? A2(
9139 $elm$core$List$cons,
9140 _Utils_chr('-'),
9141 A2($rtfeldman$elm_hex$Hex$unsafePositiveToDigits, _List_Nil, -num)) : A2($rtfeldman$elm_hex$Hex$unsafePositiveToDigits, _List_Nil, num));
9142};
9143var $rtfeldman$elm_css$Hash$fromString = function (str) {
9144 return A2(
9145 $elm$core$String$cons,
9146 _Utils_chr('_'),
9147 $rtfeldman$elm_hex$Hex$toString(
9148 A2($rtfeldman$elm_css$ElmCssVendor$Murmur3$hashString, $rtfeldman$elm_css$Hash$murmurSeed, str)));
9149};
9150var $elm$core$List$head = function (list) {
9151 if (list.b) {
9152 var x = list.a;
9153 var xs = list.b;
9154 return $elm$core$Maybe$Just(x);
9155 } else {
9156 return $elm$core$Maybe$Nothing;
9157 }
9158};
9159var $rtfeldman$elm_css$Css$Preprocess$Resolve$last = function (list) {
9160 last:
9161 while (true) {
9162 if (!list.b) {
9163 return $elm$core$Maybe$Nothing;
9164 } else {
9165 if (!list.b.b) {
9166 var singleton = list.a;
9167 return $elm$core$Maybe$Just(singleton);
9168 } else {
9169 var rest = list.b;
9170 var $temp$list = rest;
9171 list = $temp$list;
9172 continue last;
9173 }
9174 }
9175 }
9176};
9177var $rtfeldman$elm_css$Css$Preprocess$Resolve$lastDeclaration = function (declarations) {
9178 lastDeclaration:
9179 while (true) {
9180 if (!declarations.b) {
9181 return $elm$core$Maybe$Nothing;
9182 } else {
9183 if (!declarations.b.b) {
9184 var x = declarations.a;
9185 return $elm$core$Maybe$Just(
9186 _List_fromArray(
9187 [x]));
9188 } else {
9189 var xs = declarations.b;
9190 var $temp$declarations = xs;
9191 declarations = $temp$declarations;
9192 continue lastDeclaration;
9193 }
9194 }
9195 }
9196};
9197var $rtfeldman$elm_css$Css$Preprocess$Resolve$oneOf = function (maybes) {
9198 oneOf:
9199 while (true) {
9200 if (!maybes.b) {
9201 return $elm$core$Maybe$Nothing;
9202 } else {
9203 var maybe = maybes.a;
9204 var rest = maybes.b;
9205 if (maybe.$ === 'Nothing') {
9206 var $temp$maybes = rest;
9207 maybes = $temp$maybes;
9208 continue oneOf;
9209 } else {
9210 return maybe;
9211 }
9212 }
9213 }
9214};
9215var $rtfeldman$elm_css$Css$Structure$FontFeatureValues = function (a) {
9216 return {$: 'FontFeatureValues', a: a};
9217};
9218var $rtfeldman$elm_css$Css$Preprocess$Resolve$resolveFontFeatureValues = function (tuples) {
9219 var expandTuples = function (tuplesToExpand) {
9220 if (!tuplesToExpand.b) {
9221 return _List_Nil;
9222 } else {
9223 var properties = tuplesToExpand.a;
9224 var rest = tuplesToExpand.b;
9225 return A2(
9226 $elm$core$List$cons,
9227 properties,
9228 expandTuples(rest));
9229 }
9230 };
9231 var newTuples = expandTuples(tuples);
9232 return _List_fromArray(
9233 [
9234 $rtfeldman$elm_css$Css$Structure$FontFeatureValues(newTuples)
9235 ]);
9236};
9237var $rtfeldman$elm_css$Css$Structure$styleBlockToMediaRule = F2(
9238 function (mediaQueries, declaration) {
9239 if (declaration.$ === 'StyleBlockDeclaration') {
9240 var styleBlock = declaration.a;
9241 return A2(
9242 $rtfeldman$elm_css$Css$Structure$MediaRule,
9243 mediaQueries,
9244 _List_fromArray(
9245 [styleBlock]));
9246 } else {
9247 return declaration;
9248 }
9249 });
9250var $elm$core$List$tail = function (list) {
9251 if (list.b) {
9252 var x = list.a;
9253 var xs = list.b;
9254 return $elm$core$Maybe$Just(xs);
9255 } else {
9256 return $elm$core$Maybe$Nothing;
9257 }
9258};
9259var $elm$core$List$takeReverse = F3(
9260 function (n, list, kept) {
9261 takeReverse:
9262 while (true) {
9263 if (n <= 0) {
9264 return kept;
9265 } else {
9266 if (!list.b) {
9267 return kept;
9268 } else {
9269 var x = list.a;
9270 var xs = list.b;
9271 var $temp$n = n - 1,
9272 $temp$list = xs,
9273 $temp$kept = A2($elm$core$List$cons, x, kept);
9274 n = $temp$n;
9275 list = $temp$list;
9276 kept = $temp$kept;
9277 continue takeReverse;
9278 }
9279 }
9280 }
9281 });
9282var $elm$core$List$takeTailRec = F2(
9283 function (n, list) {
9284 return $elm$core$List$reverse(
9285 A3($elm$core$List$takeReverse, n, list, _List_Nil));
9286 });
9287var $elm$core$List$takeFast = F3(
9288 function (ctr, n, list) {
9289 if (n <= 0) {
9290 return _List_Nil;
9291 } else {
9292 var _v0 = _Utils_Tuple2(n, list);
9293 _v0$1:
9294 while (true) {
9295 _v0$5:
9296 while (true) {
9297 if (!_v0.b.b) {
9298 return list;
9299 } else {
9300 if (_v0.b.b.b) {
9301 switch (_v0.a) {
9302 case 1:
9303 break _v0$1;
9304 case 2:
9305 var _v2 = _v0.b;
9306 var x = _v2.a;
9307 var _v3 = _v2.b;
9308 var y = _v3.a;
9309 return _List_fromArray(
9310 [x, y]);
9311 case 3:
9312 if (_v0.b.b.b.b) {
9313 var _v4 = _v0.b;
9314 var x = _v4.a;
9315 var _v5 = _v4.b;
9316 var y = _v5.a;
9317 var _v6 = _v5.b;
9318 var z = _v6.a;
9319 return _List_fromArray(
9320 [x, y, z]);
9321 } else {
9322 break _v0$5;
9323 }
9324 default:
9325 if (_v0.b.b.b.b && _v0.b.b.b.b.b) {
9326 var _v7 = _v0.b;
9327 var x = _v7.a;
9328 var _v8 = _v7.b;
9329 var y = _v8.a;
9330 var _v9 = _v8.b;
9331 var z = _v9.a;
9332 var _v10 = _v9.b;
9333 var w = _v10.a;
9334 var tl = _v10.b;
9335 return (ctr > 1000) ? A2(
9336 $elm$core$List$cons,
9337 x,
9338 A2(
9339 $elm$core$List$cons,
9340 y,
9341 A2(
9342 $elm$core$List$cons,
9343 z,
9344 A2(
9345 $elm$core$List$cons,
9346 w,
9347 A2($elm$core$List$takeTailRec, n - 4, tl))))) : A2(
9348 $elm$core$List$cons,
9349 x,
9350 A2(
9351 $elm$core$List$cons,
9352 y,
9353 A2(
9354 $elm$core$List$cons,
9355 z,
9356 A2(
9357 $elm$core$List$cons,
9358 w,
9359 A3($elm$core$List$takeFast, ctr + 1, n - 4, tl)))));
9360 } else {
9361 break _v0$5;
9362 }
9363 }
9364 } else {
9365 if (_v0.a === 1) {
9366 break _v0$1;
9367 } else {
9368 break _v0$5;
9369 }
9370 }
9371 }
9372 }
9373 return list;
9374 }
9375 var _v1 = _v0.b;
9376 var x = _v1.a;
9377 return _List_fromArray(
9378 [x]);
9379 }
9380 });
9381var $elm$core$List$take = F2(
9382 function (n, list) {
9383 return A3($elm$core$List$takeFast, 0, n, list);
9384 });
9385var $rtfeldman$elm_css$Css$Preprocess$Resolve$toDocumentRule = F5(
9386 function (str1, str2, str3, str4, declaration) {
9387 if (declaration.$ === 'StyleBlockDeclaration') {
9388 var structureStyleBlock = declaration.a;
9389 return A5($rtfeldman$elm_css$Css$Structure$DocumentRule, str1, str2, str3, str4, structureStyleBlock);
9390 } else {
9391 return declaration;
9392 }
9393 });
9394var $rtfeldman$elm_css$Css$Preprocess$Resolve$toMediaRule = F2(
9395 function (mediaQueries, declaration) {
9396 switch (declaration.$) {
9397 case 'StyleBlockDeclaration':
9398 var structureStyleBlock = declaration.a;
9399 return A2(
9400 $rtfeldman$elm_css$Css$Structure$MediaRule,
9401 mediaQueries,
9402 _List_fromArray(
9403 [structureStyleBlock]));
9404 case 'MediaRule':
9405 var newMediaQueries = declaration.a;
9406 var structureStyleBlocks = declaration.b;
9407 return A2(
9408 $rtfeldman$elm_css$Css$Structure$MediaRule,
9409 _Utils_ap(mediaQueries, newMediaQueries),
9410 structureStyleBlocks);
9411 case 'SupportsRule':
9412 var str = declaration.a;
9413 var declarations = declaration.b;
9414 return A2(
9415 $rtfeldman$elm_css$Css$Structure$SupportsRule,
9416 str,
9417 A2(
9418 $elm$core$List$map,
9419 $rtfeldman$elm_css$Css$Preprocess$Resolve$toMediaRule(mediaQueries),
9420 declarations));
9421 case 'DocumentRule':
9422 var str1 = declaration.a;
9423 var str2 = declaration.b;
9424 var str3 = declaration.c;
9425 var str4 = declaration.d;
9426 var structureStyleBlock = declaration.e;
9427 return A5($rtfeldman$elm_css$Css$Structure$DocumentRule, str1, str2, str3, str4, structureStyleBlock);
9428 case 'PageRule':
9429 return declaration;
9430 case 'FontFace':
9431 return declaration;
9432 case 'Keyframes':
9433 return declaration;
9434 case 'Viewport':
9435 return declaration;
9436 case 'CounterStyle':
9437 return declaration;
9438 default:
9439 return declaration;
9440 }
9441 });
9442var $rtfeldman$elm_css$Css$Preprocess$unwrapSnippet = function (_v0) {
9443 var declarations = _v0.a;
9444 return declarations;
9445};
9446var $rtfeldman$elm_css$Css$Preprocess$Resolve$applyNestedStylesToLast = F4(
9447 function (nestedStyles, rest, f, declarations) {
9448 var withoutParent = function (decls) {
9449 return A2(
9450 $elm$core$Maybe$withDefault,
9451 _List_Nil,
9452 $elm$core$List$tail(decls));
9453 };
9454 var nextResult = A2(
9455 $rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles,
9456 rest,
9457 A2(
9458 $elm$core$Maybe$withDefault,
9459 _List_Nil,
9460 $rtfeldman$elm_css$Css$Preprocess$Resolve$lastDeclaration(declarations)));
9461 var newDeclarations = function () {
9462 var _v14 = _Utils_Tuple2(
9463 $elm$core$List$head(nextResult),
9464 $rtfeldman$elm_css$Css$Preprocess$Resolve$last(declarations));
9465 if ((_v14.a.$ === 'Just') && (_v14.b.$ === 'Just')) {
9466 var nextResultParent = _v14.a.a;
9467 var originalParent = _v14.b.a;
9468 return _Utils_ap(
9469 A2(
9470 $elm$core$List$take,
9471 $elm$core$List$length(declarations) - 1,
9472 declarations),
9473 _List_fromArray(
9474 [
9475 (!_Utils_eq(originalParent, nextResultParent)) ? nextResultParent : originalParent
9476 ]));
9477 } else {
9478 return declarations;
9479 }
9480 }();
9481 var insertStylesToNestedDecl = function (lastDecl) {
9482 return $elm$core$List$concat(
9483 A2(
9484 $rtfeldman$elm_css$Css$Structure$mapLast,
9485 $rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles(nestedStyles),
9486 A2(
9487 $elm$core$List$map,
9488 $elm$core$List$singleton,
9489 A2($rtfeldman$elm_css$Css$Structure$concatMapLastStyleBlock, f, lastDecl))));
9490 };
9491 var initialResult = A2(
9492 $elm$core$Maybe$withDefault,
9493 _List_Nil,
9494 A2(
9495 $elm$core$Maybe$map,
9496 insertStylesToNestedDecl,
9497 $rtfeldman$elm_css$Css$Preprocess$Resolve$lastDeclaration(declarations)));
9498 return _Utils_ap(
9499 newDeclarations,
9500 _Utils_ap(
9501 withoutParent(initialResult),
9502 withoutParent(nextResult)));
9503 });
9504var $rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles = F2(
9505 function (styles, declarations) {
9506 if (!styles.b) {
9507 return declarations;
9508 } else {
9509 switch (styles.a.$) {
9510 case 'AppendProperty':
9511 var property = styles.a.a;
9512 var rest = styles.b;
9513 return A2(
9514 $rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles,
9515 rest,
9516 A2($rtfeldman$elm_css$Css$Structure$appendProperty, property, declarations));
9517 case 'ExtendSelector':
9518 var _v4 = styles.a;
9519 var selector = _v4.a;
9520 var nestedStyles = _v4.b;
9521 var rest = styles.b;
9522 return A4(
9523 $rtfeldman$elm_css$Css$Preprocess$Resolve$applyNestedStylesToLast,
9524 nestedStyles,
9525 rest,
9526 $rtfeldman$elm_css$Css$Structure$appendRepeatableToLastSelector(selector),
9527 declarations);
9528 case 'NestSnippet':
9529 var _v5 = styles.a;
9530 var selectorCombinator = _v5.a;
9531 var snippets = _v5.b;
9532 var rest = styles.b;
9533 var chain = F2(
9534 function (_v9, _v10) {
9535 var originalSequence = _v9.a;
9536 var originalTuples = _v9.b;
9537 var originalPseudoElement = _v9.c;
9538 var newSequence = _v10.a;
9539 var newTuples = _v10.b;
9540 var newPseudoElement = _v10.c;
9541 return A3(
9542 $rtfeldman$elm_css$Css$Structure$Selector,
9543 originalSequence,
9544 _Utils_ap(
9545 originalTuples,
9546 A2(
9547 $elm$core$List$cons,
9548 _Utils_Tuple2(selectorCombinator, newSequence),
9549 newTuples)),
9550 $rtfeldman$elm_css$Css$Preprocess$Resolve$oneOf(
9551 _List_fromArray(
9552 [newPseudoElement, originalPseudoElement])));
9553 });
9554 var expandDeclaration = function (declaration) {
9555 switch (declaration.$) {
9556 case 'StyleBlockDeclaration':
9557 var _v7 = declaration.a;
9558 var firstSelector = _v7.a;
9559 var otherSelectors = _v7.b;
9560 var nestedStyles = _v7.c;
9561 var newSelectors = A2(
9562 $elm$core$List$concatMap,
9563 function (originalSelector) {
9564 return A2(
9565 $elm$core$List$map,
9566 chain(originalSelector),
9567 A2($elm$core$List$cons, firstSelector, otherSelectors));
9568 },
9569 $rtfeldman$elm_css$Css$Preprocess$Resolve$collectSelectors(declarations));
9570 var newDeclarations = function () {
9571 if (!newSelectors.b) {
9572 return _List_Nil;
9573 } else {
9574 var first = newSelectors.a;
9575 var remainder = newSelectors.b;
9576 return _List_fromArray(
9577 [
9578 $rtfeldman$elm_css$Css$Structure$StyleBlockDeclaration(
9579 A3($rtfeldman$elm_css$Css$Structure$StyleBlock, first, remainder, _List_Nil))
9580 ]);
9581 }
9582 }();
9583 return A2($rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles, nestedStyles, newDeclarations);
9584 case 'MediaRule':
9585 var mediaQueries = declaration.a;
9586 var styleBlocks = declaration.b;
9587 return A2($rtfeldman$elm_css$Css$Preprocess$Resolve$resolveMediaRule, mediaQueries, styleBlocks);
9588 case 'SupportsRule':
9589 var str = declaration.a;
9590 var otherSnippets = declaration.b;
9591 return A2($rtfeldman$elm_css$Css$Preprocess$Resolve$resolveSupportsRule, str, otherSnippets);
9592 case 'DocumentRule':
9593 var str1 = declaration.a;
9594 var str2 = declaration.b;
9595 var str3 = declaration.c;
9596 var str4 = declaration.d;
9597 var styleBlock = declaration.e;
9598 return A2(
9599 $elm$core$List$map,
9600 A4($rtfeldman$elm_css$Css$Preprocess$Resolve$toDocumentRule, str1, str2, str3, str4),
9601 $rtfeldman$elm_css$Css$Preprocess$Resolve$expandStyleBlock(styleBlock));
9602 case 'PageRule':
9603 var str = declaration.a;
9604 var properties = declaration.b;
9605 return _List_fromArray(
9606 [
9607 A2($rtfeldman$elm_css$Css$Structure$PageRule, str, properties)
9608 ]);
9609 case 'FontFace':
9610 var properties = declaration.a;
9611 return _List_fromArray(
9612 [
9613 $rtfeldman$elm_css$Css$Structure$FontFace(properties)
9614 ]);
9615 case 'Viewport':
9616 var properties = declaration.a;
9617 return _List_fromArray(
9618 [
9619 $rtfeldman$elm_css$Css$Structure$Viewport(properties)
9620 ]);
9621 case 'CounterStyle':
9622 var properties = declaration.a;
9623 return _List_fromArray(
9624 [
9625 $rtfeldman$elm_css$Css$Structure$CounterStyle(properties)
9626 ]);
9627 default:
9628 var tuples = declaration.a;
9629 return $rtfeldman$elm_css$Css$Preprocess$Resolve$resolveFontFeatureValues(tuples);
9630 }
9631 };
9632 return $elm$core$List$concat(
9633 _Utils_ap(
9634 _List_fromArray(
9635 [
9636 A2($rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles, rest, declarations)
9637 ]),
9638 A2(
9639 $elm$core$List$map,
9640 expandDeclaration,
9641 A2($elm$core$List$concatMap, $rtfeldman$elm_css$Css$Preprocess$unwrapSnippet, snippets))));
9642 case 'WithPseudoElement':
9643 var _v11 = styles.a;
9644 var pseudoElement = _v11.a;
9645 var nestedStyles = _v11.b;
9646 var rest = styles.b;
9647 return A4(
9648 $rtfeldman$elm_css$Css$Preprocess$Resolve$applyNestedStylesToLast,
9649 nestedStyles,
9650 rest,
9651 $rtfeldman$elm_css$Css$Structure$appendPseudoElementToLastSelector(pseudoElement),
9652 declarations);
9653 case 'WithKeyframes':
9654 var str = styles.a.a;
9655 var rest = styles.b;
9656 var name = $rtfeldman$elm_css$Hash$fromString(str);
9657 var newProperty = 'animation-name:' + name;
9658 var newDeclarations = A2(
9659 $rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles,
9660 rest,
9661 A2($rtfeldman$elm_css$Css$Structure$appendProperty, newProperty, declarations));
9662 return A2(
9663 $elm$core$List$append,
9664 newDeclarations,
9665 _List_fromArray(
9666 [
9667 $rtfeldman$elm_css$Css$Structure$Keyframes(
9668 {declaration: str, name: name})
9669 ]));
9670 case 'WithMedia':
9671 var _v12 = styles.a;
9672 var mediaQueries = _v12.a;
9673 var nestedStyles = _v12.b;
9674 var rest = styles.b;
9675 var extraDeclarations = function () {
9676 var _v13 = $rtfeldman$elm_css$Css$Preprocess$Resolve$collectSelectors(declarations);
9677 if (!_v13.b) {
9678 return _List_Nil;
9679 } else {
9680 var firstSelector = _v13.a;
9681 var otherSelectors = _v13.b;
9682 return A2(
9683 $elm$core$List$map,
9684 $rtfeldman$elm_css$Css$Structure$styleBlockToMediaRule(mediaQueries),
9685 A2(
9686 $rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles,
9687 nestedStyles,
9688 $elm$core$List$singleton(
9689 $rtfeldman$elm_css$Css$Structure$StyleBlockDeclaration(
9690 A3($rtfeldman$elm_css$Css$Structure$StyleBlock, firstSelector, otherSelectors, _List_Nil)))));
9691 }
9692 }();
9693 return _Utils_ap(
9694 A2($rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles, rest, declarations),
9695 extraDeclarations);
9696 default:
9697 var otherStyles = styles.a.a;
9698 var rest = styles.b;
9699 return A2(
9700 $rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles,
9701 _Utils_ap(otherStyles, rest),
9702 declarations);
9703 }
9704 }
9705 });
9706var $rtfeldman$elm_css$Css$Preprocess$Resolve$expandStyleBlock = function (_v2) {
9707 var firstSelector = _v2.a;
9708 var otherSelectors = _v2.b;
9709 var styles = _v2.c;
9710 return A2(
9711 $rtfeldman$elm_css$Css$Preprocess$Resolve$applyStyles,
9712 styles,
9713 _List_fromArray(
9714 [
9715 $rtfeldman$elm_css$Css$Structure$StyleBlockDeclaration(
9716 A3($rtfeldman$elm_css$Css$Structure$StyleBlock, firstSelector, otherSelectors, _List_Nil))
9717 ]));
9718};
9719var $rtfeldman$elm_css$Css$Preprocess$Resolve$extract = function (snippetDeclarations) {
9720 if (!snippetDeclarations.b) {
9721 return _List_Nil;
9722 } else {
9723 var first = snippetDeclarations.a;
9724 var rest = snippetDeclarations.b;
9725 return _Utils_ap(
9726 $rtfeldman$elm_css$Css$Preprocess$Resolve$toDeclarations(first),
9727 $rtfeldman$elm_css$Css$Preprocess$Resolve$extract(rest));
9728 }
9729};
9730var $rtfeldman$elm_css$Css$Preprocess$Resolve$resolveMediaRule = F2(
9731 function (mediaQueries, styleBlocks) {
9732 var handleStyleBlock = function (styleBlock) {
9733 return A2(
9734 $elm$core$List$map,
9735 $rtfeldman$elm_css$Css$Preprocess$Resolve$toMediaRule(mediaQueries),
9736 $rtfeldman$elm_css$Css$Preprocess$Resolve$expandStyleBlock(styleBlock));
9737 };
9738 return A2($elm$core$List$concatMap, handleStyleBlock, styleBlocks);
9739 });
9740var $rtfeldman$elm_css$Css$Preprocess$Resolve$resolveSupportsRule = F2(
9741 function (str, snippets) {
9742 var declarations = $rtfeldman$elm_css$Css$Preprocess$Resolve$extract(
9743 A2($elm$core$List$concatMap, $rtfeldman$elm_css$Css$Preprocess$unwrapSnippet, snippets));
9744 return _List_fromArray(
9745 [
9746 A2($rtfeldman$elm_css$Css$Structure$SupportsRule, str, declarations)
9747 ]);
9748 });
9749var $rtfeldman$elm_css$Css$Preprocess$Resolve$toDeclarations = function (snippetDeclaration) {
9750 switch (snippetDeclaration.$) {
9751 case 'StyleBlockDeclaration':
9752 var styleBlock = snippetDeclaration.a;
9753 return $rtfeldman$elm_css$Css$Preprocess$Resolve$expandStyleBlock(styleBlock);
9754 case 'MediaRule':
9755 var mediaQueries = snippetDeclaration.a;
9756 var styleBlocks = snippetDeclaration.b;
9757 return A2($rtfeldman$elm_css$Css$Preprocess$Resolve$resolveMediaRule, mediaQueries, styleBlocks);
9758 case 'SupportsRule':
9759 var str = snippetDeclaration.a;
9760 var snippets = snippetDeclaration.b;
9761 return A2($rtfeldman$elm_css$Css$Preprocess$Resolve$resolveSupportsRule, str, snippets);
9762 case 'DocumentRule':
9763 var str1 = snippetDeclaration.a;
9764 var str2 = snippetDeclaration.b;
9765 var str3 = snippetDeclaration.c;
9766 var str4 = snippetDeclaration.d;
9767 var styleBlock = snippetDeclaration.e;
9768 return A2(
9769 $elm$core$List$map,
9770 A4($rtfeldman$elm_css$Css$Preprocess$Resolve$toDocumentRule, str1, str2, str3, str4),
9771 $rtfeldman$elm_css$Css$Preprocess$Resolve$expandStyleBlock(styleBlock));
9772 case 'PageRule':
9773 var str = snippetDeclaration.a;
9774 var properties = snippetDeclaration.b;
9775 return _List_fromArray(
9776 [
9777 A2($rtfeldman$elm_css$Css$Structure$PageRule, str, properties)
9778 ]);
9779 case 'FontFace':
9780 var properties = snippetDeclaration.a;
9781 return _List_fromArray(
9782 [
9783 $rtfeldman$elm_css$Css$Structure$FontFace(properties)
9784 ]);
9785 case 'Viewport':
9786 var properties = snippetDeclaration.a;
9787 return _List_fromArray(
9788 [
9789 $rtfeldman$elm_css$Css$Structure$Viewport(properties)
9790 ]);
9791 case 'CounterStyle':
9792 var properties = snippetDeclaration.a;
9793 return _List_fromArray(
9794 [
9795 $rtfeldman$elm_css$Css$Structure$CounterStyle(properties)
9796 ]);
9797 default:
9798 var tuples = snippetDeclaration.a;
9799 return $rtfeldman$elm_css$Css$Preprocess$Resolve$resolveFontFeatureValues(tuples);
9800 }
9801};
9802var $rtfeldman$elm_css$Css$Preprocess$Resolve$toStructure = function (_v0) {
9803 var charset = _v0.charset;
9804 var imports = _v0.imports;
9805 var namespaces = _v0.namespaces;
9806 var snippets = _v0.snippets;
9807 var declarations = $rtfeldman$elm_css$Css$Preprocess$Resolve$extract(
9808 A2($elm$core$List$concatMap, $rtfeldman$elm_css$Css$Preprocess$unwrapSnippet, snippets));
9809 return {charset: charset, declarations: declarations, imports: imports, namespaces: namespaces};
9810};
9811var $rtfeldman$elm_css$Css$Preprocess$Resolve$compileHelp = function (sheet) {
9812 return $rtfeldman$elm_css$Css$Structure$Output$prettyPrint(
9813 $rtfeldman$elm_css$Css$Structure$compactStylesheet(
9814 $rtfeldman$elm_css$Css$Preprocess$Resolve$toStructure(sheet)));
9815};
9816var $rtfeldman$elm_css$Css$Preprocess$Resolve$compile = function (styles) {
9817 return A2(
9818 $elm$core$String$join,
9819 '\n\n',
9820 A2($elm$core$List$map, $rtfeldman$elm_css$Css$Preprocess$Resolve$compileHelp, styles));
9821};
9822var $rtfeldman$elm_css$Css$Structure$ClassSelector = function (a) {
9823 return {$: 'ClassSelector', a: a};
9824};
9825var $rtfeldman$elm_css$Css$Preprocess$Snippet = function (a) {
9826 return {$: 'Snippet', a: a};
9827};
9828var $rtfeldman$elm_css$Css$Preprocess$StyleBlock = F3(
9829 function (a, b, c) {
9830 return {$: 'StyleBlock', a: a, b: b, c: c};
9831 });
9832var $rtfeldman$elm_css$Css$Preprocess$StyleBlockDeclaration = function (a) {
9833 return {$: 'StyleBlockDeclaration', a: a};
9834};
9835var $rtfeldman$elm_css$VirtualDom$Styled$makeSnippet = F2(
9836 function (styles, sequence) {
9837 var selector = A3($rtfeldman$elm_css$Css$Structure$Selector, sequence, _List_Nil, $elm$core$Maybe$Nothing);
9838 return $rtfeldman$elm_css$Css$Preprocess$Snippet(
9839 _List_fromArray(
9840 [
9841 $rtfeldman$elm_css$Css$Preprocess$StyleBlockDeclaration(
9842 A3($rtfeldman$elm_css$Css$Preprocess$StyleBlock, selector, _List_Nil, styles))
9843 ]));
9844 });
9845var $rtfeldman$elm_css$VirtualDom$Styled$snippetFromPair = function (_v0) {
9846 var classname = _v0.a;
9847 var styles = _v0.b;
9848 return A2(
9849 $rtfeldman$elm_css$VirtualDom$Styled$makeSnippet,
9850 styles,
9851 $rtfeldman$elm_css$Css$Structure$UniversalSelectorSequence(
9852 _List_fromArray(
9853 [
9854 $rtfeldman$elm_css$Css$Structure$ClassSelector(classname)
9855 ])));
9856};
9857var $rtfeldman$elm_css$Css$Preprocess$stylesheet = function (snippets) {
9858 return {charset: $elm$core$Maybe$Nothing, imports: _List_Nil, namespaces: _List_Nil, snippets: snippets};
9859};
9860var $rtfeldman$elm_css$VirtualDom$Styled$toDeclaration = function (dict) {
9861 return $rtfeldman$elm_css$Css$Preprocess$Resolve$compile(
9862 $elm$core$List$singleton(
9863 $rtfeldman$elm_css$Css$Preprocess$stylesheet(
9864 A2(
9865 $elm$core$List$map,
9866 $rtfeldman$elm_css$VirtualDom$Styled$snippetFromPair,
9867 $elm$core$Dict$toList(dict)))));
9868};
9869var $rtfeldman$elm_css$VirtualDom$Styled$toStyleNode = function (styles) {
9870 return A3(
9871 $elm$virtual_dom$VirtualDom$node,
9872 'style',
9873 _List_Nil,
9874 $elm$core$List$singleton(
9875 $elm$virtual_dom$VirtualDom$text(
9876 $rtfeldman$elm_css$VirtualDom$Styled$toDeclaration(styles))));
9877};
9878var $rtfeldman$elm_css$VirtualDom$Styled$unstyle = F3(
9879 function (elemType, properties, children) {
9880 var unstyledProperties = A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties);
9881 var initialStyles = $rtfeldman$elm_css$VirtualDom$Styled$stylesFromProperties(properties);
9882 var _v0 = A3(
9883 $elm$core$List$foldl,
9884 $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyledHtml,
9885 _Utils_Tuple2(_List_Nil, initialStyles),
9886 children);
9887 var childNodes = _v0.a;
9888 var styles = _v0.b;
9889 var styleNode = $rtfeldman$elm_css$VirtualDom$Styled$toStyleNode(styles);
9890 return A3(
9891 $elm$virtual_dom$VirtualDom$node,
9892 elemType,
9893 unstyledProperties,
9894 A2(
9895 $elm$core$List$cons,
9896 styleNode,
9897 $elm$core$List$reverse(childNodes)));
9898 });
9899var $rtfeldman$elm_css$VirtualDom$Styled$containsKey = F2(
9900 function (key, pairs) {
9901 containsKey:
9902 while (true) {
9903 if (!pairs.b) {
9904 return false;
9905 } else {
9906 var _v1 = pairs.a;
9907 var str = _v1.a;
9908 var rest = pairs.b;
9909 if (_Utils_eq(key, str)) {
9910 return true;
9911 } else {
9912 var $temp$key = key,
9913 $temp$pairs = rest;
9914 key = $temp$key;
9915 pairs = $temp$pairs;
9916 continue containsKey;
9917 }
9918 }
9919 }
9920 });
9921var $rtfeldman$elm_css$VirtualDom$Styled$getUnusedKey = F2(
9922 function (_default, pairs) {
9923 getUnusedKey:
9924 while (true) {
9925 if (!pairs.b) {
9926 return _default;
9927 } else {
9928 var _v1 = pairs.a;
9929 var firstKey = _v1.a;
9930 var rest = pairs.b;
9931 var newKey = '_' + firstKey;
9932 if (A2($rtfeldman$elm_css$VirtualDom$Styled$containsKey, newKey, rest)) {
9933 var $temp$default = newKey,
9934 $temp$pairs = rest;
9935 _default = $temp$default;
9936 pairs = $temp$pairs;
9937 continue getUnusedKey;
9938 } else {
9939 return newKey;
9940 }
9941 }
9942 }
9943 });
9944var $rtfeldman$elm_css$VirtualDom$Styled$toKeyedStyleNode = F2(
9945 function (allStyles, keyedChildNodes) {
9946 var styleNodeKey = A2($rtfeldman$elm_css$VirtualDom$Styled$getUnusedKey, '_', keyedChildNodes);
9947 var finalNode = $rtfeldman$elm_css$VirtualDom$Styled$toStyleNode(allStyles);
9948 return _Utils_Tuple2(styleNodeKey, finalNode);
9949 });
9950var $rtfeldman$elm_css$VirtualDom$Styled$unstyleKeyed = F3(
9951 function (elemType, properties, keyedChildren) {
9952 var unstyledProperties = A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties);
9953 var initialStyles = $rtfeldman$elm_css$VirtualDom$Styled$stylesFromProperties(properties);
9954 var _v0 = A3(
9955 $elm$core$List$foldl,
9956 $rtfeldman$elm_css$VirtualDom$Styled$accumulateKeyedStyledHtml,
9957 _Utils_Tuple2(_List_Nil, initialStyles),
9958 keyedChildren);
9959 var keyedChildNodes = _v0.a;
9960 var styles = _v0.b;
9961 var keyedStyleNode = A2($rtfeldman$elm_css$VirtualDom$Styled$toKeyedStyleNode, styles, keyedChildNodes);
9962 return A3(
9963 $elm$virtual_dom$VirtualDom$keyedNode,
9964 elemType,
9965 unstyledProperties,
9966 A2(
9967 $elm$core$List$cons,
9968 keyedStyleNode,
9969 $elm$core$List$reverse(keyedChildNodes)));
9970 });
9971var $rtfeldman$elm_css$VirtualDom$Styled$unstyleKeyedNS = F4(
9972 function (ns, elemType, properties, keyedChildren) {
9973 var unstyledProperties = A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties);
9974 var initialStyles = $rtfeldman$elm_css$VirtualDom$Styled$stylesFromProperties(properties);
9975 var _v0 = A3(
9976 $elm$core$List$foldl,
9977 $rtfeldman$elm_css$VirtualDom$Styled$accumulateKeyedStyledHtml,
9978 _Utils_Tuple2(_List_Nil, initialStyles),
9979 keyedChildren);
9980 var keyedChildNodes = _v0.a;
9981 var styles = _v0.b;
9982 var keyedStyleNode = A2($rtfeldman$elm_css$VirtualDom$Styled$toKeyedStyleNode, styles, keyedChildNodes);
9983 return A4(
9984 $elm$virtual_dom$VirtualDom$keyedNodeNS,
9985 ns,
9986 elemType,
9987 unstyledProperties,
9988 A2(
9989 $elm$core$List$cons,
9990 keyedStyleNode,
9991 $elm$core$List$reverse(keyedChildNodes)));
9992 });
9993var $rtfeldman$elm_css$VirtualDom$Styled$unstyleNS = F4(
9994 function (ns, elemType, properties, children) {
9995 var unstyledProperties = A2($elm$core$List$map, $rtfeldman$elm_css$VirtualDom$Styled$extractUnstyledAttribute, properties);
9996 var initialStyles = $rtfeldman$elm_css$VirtualDom$Styled$stylesFromProperties(properties);
9997 var _v0 = A3(
9998 $elm$core$List$foldl,
9999 $rtfeldman$elm_css$VirtualDom$Styled$accumulateStyledHtml,
10000 _Utils_Tuple2(_List_Nil, initialStyles),
10001 children);
10002 var childNodes = _v0.a;
10003 var styles = _v0.b;
10004 var styleNode = $rtfeldman$elm_css$VirtualDom$Styled$toStyleNode(styles);
10005 return A4(
10006 $elm$virtual_dom$VirtualDom$nodeNS,
10007 ns,
10008 elemType,
10009 unstyledProperties,
10010 A2(
10011 $elm$core$List$cons,
10012 styleNode,
10013 $elm$core$List$reverse(childNodes)));
10014 });
10015var $rtfeldman$elm_css$VirtualDom$Styled$toUnstyled = function (vdom) {
10016 switch (vdom.$) {
10017 case 'Unstyled':
10018 var plainNode = vdom.a;
10019 return plainNode;
10020 case 'Node':
10021 var elemType = vdom.a;
10022 var properties = vdom.b;
10023 var children = vdom.c;
10024 return A3($rtfeldman$elm_css$VirtualDom$Styled$unstyle, elemType, properties, children);
10025 case 'NodeNS':
10026 var ns = vdom.a;
10027 var elemType = vdom.b;
10028 var properties = vdom.c;
10029 var children = vdom.d;
10030 return A4($rtfeldman$elm_css$VirtualDom$Styled$unstyleNS, ns, elemType, properties, children);
10031 case 'KeyedNode':
10032 var elemType = vdom.a;
10033 var properties = vdom.b;
10034 var children = vdom.c;
10035 return A3($rtfeldman$elm_css$VirtualDom$Styled$unstyleKeyed, elemType, properties, children);
10036 default:
10037 var ns = vdom.a;
10038 var elemType = vdom.b;
10039 var properties = vdom.c;
10040 var children = vdom.d;
10041 return A4($rtfeldman$elm_css$VirtualDom$Styled$unstyleKeyedNS, ns, elemType, properties, children);
10042 }
10043};
10044var $rtfeldman$elm_css$Html$Styled$toUnstyled = $rtfeldman$elm_css$VirtualDom$Styled$toUnstyled;
7474var $author$project$Main$LogoutPressed = {$: 'LogoutPressed'}; 10045var $author$project$Main$LogoutPressed = {$: 'LogoutPressed'};
7475var $elm$html$Html$button = _VirtualDom_node('button'); 10046var $rtfeldman$elm_css$Css$Preprocess$AppendProperty = function (a) {
7476var $elm$html$Html$li = _VirtualDom_node('li'); 10047 return {$: 'AppendProperty', a: a};
10048};
10049var $rtfeldman$elm_css$Css$property = F2(
10050 function (key, value) {
10051 return $rtfeldman$elm_css$Css$Preprocess$AppendProperty(key + (':' + value));
10052 });
10053var $rtfeldman$elm_css$Css$backgroundColor = function (c) {
10054 return A2($rtfeldman$elm_css$Css$property, 'background-color', c.value);
10055};
10056var $rtfeldman$elm_css$VirtualDom$Styled$murmurSeed = 15739;
10057var $rtfeldman$elm_css$VirtualDom$Styled$getClassname = function (styles) {
10058 return $elm$core$List$isEmpty(styles) ? 'unstyled' : A2(
10059 $elm$core$String$cons,
10060 _Utils_chr('_'),
10061 $rtfeldman$elm_hex$Hex$toString(
10062 A2(
10063 $rtfeldman$elm_css$ElmCssVendor$Murmur3$hashString,
10064 $rtfeldman$elm_css$VirtualDom$Styled$murmurSeed,
10065 $rtfeldman$elm_css$Css$Preprocess$Resolve$compile(
10066 $elm$core$List$singleton(
10067 $rtfeldman$elm_css$Css$Preprocess$stylesheet(
10068 $elm$core$List$singleton(
10069 A2(
10070 $rtfeldman$elm_css$VirtualDom$Styled$makeSnippet,
10071 styles,
10072 $rtfeldman$elm_css$Css$Structure$UniversalSelectorSequence(_List_Nil)))))))));
10073};
10074var $rtfeldman$elm_css$Html$Styled$Internal$css = function (styles) {
10075 var classname = $rtfeldman$elm_css$VirtualDom$Styled$getClassname(styles);
10076 var classProperty = A2(
10077 $elm$virtual_dom$VirtualDom$property,
10078 'className',
10079 $elm$json$Json$Encode$string(classname));
10080 return A3($rtfeldman$elm_css$VirtualDom$Styled$Attribute, classProperty, styles, classname);
10081};
10082var $rtfeldman$elm_css$Html$Styled$Attributes$css = $rtfeldman$elm_css$Html$Styled$Internal$css;
10083var $rtfeldman$elm_css$Css$prop1 = F2(
10084 function (key, arg) {
10085 return A2($rtfeldman$elm_css$Css$property, key, arg.value);
10086 });
10087var $rtfeldman$elm_css$Css$display = $rtfeldman$elm_css$Css$prop1('display');
10088var $rtfeldman$elm_css$Css$border = $rtfeldman$elm_css$Css$prop1('border');
10089var $rtfeldman$elm_css$Html$Styled$button = $rtfeldman$elm_css$Html$Styled$node('button');
10090var $rtfeldman$elm_css$Css$color = function (c) {
10091 return A2($rtfeldman$elm_css$Css$property, 'color', c.value);
10092};
10093var $rtfeldman$elm_css$Css$height = $rtfeldman$elm_css$Css$prop1('height');
10094var $rtfeldman$elm_css$Css$Preprocess$ExtendSelector = F2(
10095 function (a, b) {
10096 return {$: 'ExtendSelector', a: a, b: b};
10097 });
10098var $rtfeldman$elm_css$Css$Structure$PseudoClassSelector = function (a) {
10099 return {$: 'PseudoClassSelector', a: a};
10100};
10101var $rtfeldman$elm_css$Css$pseudoClass = function (_class) {
10102 return $rtfeldman$elm_css$Css$Preprocess$ExtendSelector(
10103 $rtfeldman$elm_css$Css$Structure$PseudoClassSelector(_class));
10104};
10105var $rtfeldman$elm_css$Css$hover = $rtfeldman$elm_css$Css$pseudoClass('hover');
10106var $rtfeldman$elm_css$Css$margin = $rtfeldman$elm_css$Css$prop1('margin');
10107var $rtfeldman$elm_css$Css$prop2 = F3(
10108 function (key, argA, argB) {
10109 return A2(
10110 $rtfeldman$elm_css$Css$property,
10111 key,
10112 A2(
10113 $elm$core$String$join,
10114 ' ',
10115 _List_fromArray(
10116 [argA.value, argB.value])));
10117 });
10118var $rtfeldman$elm_css$Css$padding2 = $rtfeldman$elm_css$Css$prop2('padding');
10119var $rtfeldman$elm_css$Css$PxUnits = {$: 'PxUnits'};
10120var $rtfeldman$elm_css$Css$Structure$Compatible = {$: 'Compatible'};
10121var $elm$core$String$fromFloat = _String_fromNumber;
10122var $rtfeldman$elm_css$Css$Internal$lengthConverter = F3(
10123 function (units, unitLabel, numericValue) {
10124 return {
10125 absoluteLength: $rtfeldman$elm_css$Css$Structure$Compatible,
10126 calc: $rtfeldman$elm_css$Css$Structure$Compatible,
10127 flexBasis: $rtfeldman$elm_css$Css$Structure$Compatible,
10128 fontSize: $rtfeldman$elm_css$Css$Structure$Compatible,
10129 length: $rtfeldman$elm_css$Css$Structure$Compatible,
10130 lengthOrAuto: $rtfeldman$elm_css$Css$Structure$Compatible,
10131 lengthOrAutoOrCoverOrContain: $rtfeldman$elm_css$Css$Structure$Compatible,
10132 lengthOrMinMaxDimension: $rtfeldman$elm_css$Css$Structure$Compatible,
10133 lengthOrNone: $rtfeldman$elm_css$Css$Structure$Compatible,
10134 lengthOrNoneOrMinMaxDimension: $rtfeldman$elm_css$Css$Structure$Compatible,
10135 lengthOrNumber: $rtfeldman$elm_css$Css$Structure$Compatible,
10136 lengthOrNumberOrAutoOrNoneOrContent: $rtfeldman$elm_css$Css$Structure$Compatible,
10137 numericValue: numericValue,
10138 textIndent: $rtfeldman$elm_css$Css$Structure$Compatible,
10139 unitLabel: unitLabel,
10140 units: units,
10141 value: _Utils_ap(
10142 $elm$core$String$fromFloat(numericValue),
10143 unitLabel)
10144 };
10145 });
10146var $rtfeldman$elm_css$Css$px = A2($rtfeldman$elm_css$Css$Internal$lengthConverter, $rtfeldman$elm_css$Css$PxUnits, 'px');
10147var $rtfeldman$elm_css$Html$Styled$styled = F4(
10148 function (fn, styles, attrs, children) {
10149 return A2(
10150 fn,
10151 A2(
10152 $elm$core$List$cons,
10153 $rtfeldman$elm_css$Html$Styled$Internal$css(styles),
10154 attrs),
10155 children);
10156 });
10157var $author$project$Styles$Theme = F7(
10158 function (primary, secondary, bad, fg, bg, fgLight, bgLight) {
10159 return {bad: bad, bg: bg, bgLight: bgLight, fg: fg, fgLight: fgLight, primary: primary, secondary: secondary};
10160 });
10161var $rtfeldman$elm_css$Css$withPrecedingHash = function (str) {
10162 return A2($elm$core$String$startsWith, '#', str) ? str : A2(
10163 $elm$core$String$cons,
10164 _Utils_chr('#'),
10165 str);
10166};
10167var $rtfeldman$elm_css$Css$erroneousHex = function (str) {
10168 return {
10169 alpha: 1,
10170 blue: 0,
10171 color: $rtfeldman$elm_css$Css$Structure$Compatible,
10172 green: 0,
10173 red: 0,
10174 value: $rtfeldman$elm_css$Css$withPrecedingHash(str)
10175 };
10176};
10177var $elm$core$String$fromChar = function (_char) {
10178 return A2($elm$core$String$cons, _char, '');
10179};
10180var $elm$core$Basics$pow = _Basics_pow;
10181var $rtfeldman$elm_hex$Hex$fromStringHelp = F3(
10182 function (position, chars, accumulated) {
10183 fromStringHelp:
10184 while (true) {
10185 if (!chars.b) {
10186 return $elm$core$Result$Ok(accumulated);
10187 } else {
10188 var _char = chars.a;
10189 var rest = chars.b;
10190 switch (_char.valueOf()) {
10191 case '0':
10192 var $temp$position = position - 1,
10193 $temp$chars = rest,
10194 $temp$accumulated = accumulated;
10195 position = $temp$position;
10196 chars = $temp$chars;
10197 accumulated = $temp$accumulated;
10198 continue fromStringHelp;
10199 case '1':
10200 var $temp$position = position - 1,
10201 $temp$chars = rest,
10202 $temp$accumulated = accumulated + A2($elm$core$Basics$pow, 16, position);
10203 position = $temp$position;
10204 chars = $temp$chars;
10205 accumulated = $temp$accumulated;
10206 continue fromStringHelp;
10207 case '2':
10208 var $temp$position = position - 1,
10209 $temp$chars = rest,
10210 $temp$accumulated = accumulated + (2 * A2($elm$core$Basics$pow, 16, position));
10211 position = $temp$position;
10212 chars = $temp$chars;
10213 accumulated = $temp$accumulated;
10214 continue fromStringHelp;
10215 case '3':
10216 var $temp$position = position - 1,
10217 $temp$chars = rest,
10218 $temp$accumulated = accumulated + (3 * A2($elm$core$Basics$pow, 16, position));
10219 position = $temp$position;
10220 chars = $temp$chars;
10221 accumulated = $temp$accumulated;
10222 continue fromStringHelp;
10223 case '4':
10224 var $temp$position = position - 1,
10225 $temp$chars = rest,
10226 $temp$accumulated = accumulated + (4 * A2($elm$core$Basics$pow, 16, position));
10227 position = $temp$position;
10228 chars = $temp$chars;
10229 accumulated = $temp$accumulated;
10230 continue fromStringHelp;
10231 case '5':
10232 var $temp$position = position - 1,
10233 $temp$chars = rest,
10234 $temp$accumulated = accumulated + (5 * A2($elm$core$Basics$pow, 16, position));
10235 position = $temp$position;
10236 chars = $temp$chars;
10237 accumulated = $temp$accumulated;
10238 continue fromStringHelp;
10239 case '6':
10240 var $temp$position = position - 1,
10241 $temp$chars = rest,
10242 $temp$accumulated = accumulated + (6 * A2($elm$core$Basics$pow, 16, position));
10243 position = $temp$position;
10244 chars = $temp$chars;
10245 accumulated = $temp$accumulated;
10246 continue fromStringHelp;
10247 case '7':
10248 var $temp$position = position - 1,
10249 $temp$chars = rest,
10250 $temp$accumulated = accumulated + (7 * A2($elm$core$Basics$pow, 16, position));
10251 position = $temp$position;
10252 chars = $temp$chars;
10253 accumulated = $temp$accumulated;
10254 continue fromStringHelp;
10255 case '8':
10256 var $temp$position = position - 1,
10257 $temp$chars = rest,
10258 $temp$accumulated = accumulated + (8 * A2($elm$core$Basics$pow, 16, position));
10259 position = $temp$position;
10260 chars = $temp$chars;
10261 accumulated = $temp$accumulated;
10262 continue fromStringHelp;
10263 case '9':
10264 var $temp$position = position - 1,
10265 $temp$chars = rest,
10266 $temp$accumulated = accumulated + (9 * A2($elm$core$Basics$pow, 16, position));
10267 position = $temp$position;
10268 chars = $temp$chars;
10269 accumulated = $temp$accumulated;
10270 continue fromStringHelp;
10271 case 'a':
10272 var $temp$position = position - 1,
10273 $temp$chars = rest,
10274 $temp$accumulated = accumulated + (10 * A2($elm$core$Basics$pow, 16, position));
10275 position = $temp$position;
10276 chars = $temp$chars;
10277 accumulated = $temp$accumulated;
10278 continue fromStringHelp;
10279 case 'b':
10280 var $temp$position = position - 1,
10281 $temp$chars = rest,
10282 $temp$accumulated = accumulated + (11 * A2($elm$core$Basics$pow, 16, position));
10283 position = $temp$position;
10284 chars = $temp$chars;
10285 accumulated = $temp$accumulated;
10286 continue fromStringHelp;
10287 case 'c':
10288 var $temp$position = position - 1,
10289 $temp$chars = rest,
10290 $temp$accumulated = accumulated + (12 * A2($elm$core$Basics$pow, 16, position));
10291 position = $temp$position;
10292 chars = $temp$chars;
10293 accumulated = $temp$accumulated;
10294 continue fromStringHelp;
10295 case 'd':
10296 var $temp$position = position - 1,
10297 $temp$chars = rest,
10298 $temp$accumulated = accumulated + (13 * A2($elm$core$Basics$pow, 16, position));
10299 position = $temp$position;
10300 chars = $temp$chars;
10301 accumulated = $temp$accumulated;
10302 continue fromStringHelp;
10303 case 'e':
10304 var $temp$position = position - 1,
10305 $temp$chars = rest,
10306 $temp$accumulated = accumulated + (14 * A2($elm$core$Basics$pow, 16, position));
10307 position = $temp$position;
10308 chars = $temp$chars;
10309 accumulated = $temp$accumulated;
10310 continue fromStringHelp;
10311 case 'f':
10312 var $temp$position = position - 1,
10313 $temp$chars = rest,
10314 $temp$accumulated = accumulated + (15 * A2($elm$core$Basics$pow, 16, position));
10315 position = $temp$position;
10316 chars = $temp$chars;
10317 accumulated = $temp$accumulated;
10318 continue fromStringHelp;
10319 default:
10320 var nonHex = _char;
10321 return $elm$core$Result$Err(
10322 $elm$core$String$fromChar(nonHex) + ' is not a valid hexadecimal character.');
10323 }
10324 }
10325 }
10326 });
10327var $elm$core$Result$map = F2(
10328 function (func, ra) {
10329 if (ra.$ === 'Ok') {
10330 var a = ra.a;
10331 return $elm$core$Result$Ok(
10332 func(a));
10333 } else {
10334 var e = ra.a;
10335 return $elm$core$Result$Err(e);
10336 }
10337 });
10338var $rtfeldman$elm_hex$Hex$fromString = function (str) {
10339 if ($elm$core$String$isEmpty(str)) {
10340 return $elm$core$Result$Err('Empty strings are not valid hexadecimal strings.');
10341 } else {
10342 var result = function () {
10343 if (A2($elm$core$String$startsWith, '-', str)) {
10344 var list = A2(
10345 $elm$core$Maybe$withDefault,
10346 _List_Nil,
10347 $elm$core$List$tail(
10348 $elm$core$String$toList(str)));
10349 return A2(
10350 $elm$core$Result$map,
10351 $elm$core$Basics$negate,
10352 A3(
10353 $rtfeldman$elm_hex$Hex$fromStringHelp,
10354 $elm$core$List$length(list) - 1,
10355 list,
10356 0));
10357 } else {
10358 return A3(
10359 $rtfeldman$elm_hex$Hex$fromStringHelp,
10360 $elm$core$String$length(str) - 1,
10361 $elm$core$String$toList(str),
10362 0);
10363 }
10364 }();
10365 var formatError = function (err) {
10366 return A2(
10367 $elm$core$String$join,
10368 ' ',
10369 _List_fromArray(
10370 ['\"' + (str + '\"'), 'is not a valid hexadecimal string because', err]));
10371 };
10372 return A2($elm$core$Result$mapError, formatError, result);
10373 }
10374};
10375var $elm$core$String$toLower = _String_toLower;
10376var $rtfeldman$elm_css$Css$validHex = F5(
10377 function (str, _v0, _v1, _v2, _v3) {
10378 var r1 = _v0.a;
10379 var r2 = _v0.b;
10380 var g1 = _v1.a;
10381 var g2 = _v1.b;
10382 var b1 = _v2.a;
10383 var b2 = _v2.b;
10384 var a1 = _v3.a;
10385 var a2 = _v3.b;
10386 var toResult = A2(
10387 $elm$core$Basics$composeR,
10388 $elm$core$String$fromList,
10389 A2($elm$core$Basics$composeR, $elm$core$String$toLower, $rtfeldman$elm_hex$Hex$fromString));
10390 var results = _Utils_Tuple2(
10391 _Utils_Tuple2(
10392 toResult(
10393 _List_fromArray(
10394 [r1, r2])),
10395 toResult(
10396 _List_fromArray(
10397 [g1, g2]))),
10398 _Utils_Tuple2(
10399 toResult(
10400 _List_fromArray(
10401 [b1, b2])),
10402 toResult(
10403 _List_fromArray(
10404 [a1, a2]))));
10405 if ((((results.a.a.$ === 'Ok') && (results.a.b.$ === 'Ok')) && (results.b.a.$ === 'Ok')) && (results.b.b.$ === 'Ok')) {
10406 var _v5 = results.a;
10407 var red = _v5.a.a;
10408 var green = _v5.b.a;
10409 var _v6 = results.b;
10410 var blue = _v6.a.a;
10411 var alpha = _v6.b.a;
10412 return {
10413 alpha: alpha / 255,
10414 blue: blue,
10415 color: $rtfeldman$elm_css$Css$Structure$Compatible,
10416 green: green,
10417 red: red,
10418 value: $rtfeldman$elm_css$Css$withPrecedingHash(str)
10419 };
10420 } else {
10421 return $rtfeldman$elm_css$Css$erroneousHex(str);
10422 }
10423 });
10424var $rtfeldman$elm_css$Css$hex = function (str) {
10425 var withoutHash = A2($elm$core$String$startsWith, '#', str) ? A2($elm$core$String$dropLeft, 1, str) : str;
10426 var _v0 = $elm$core$String$toList(withoutHash);
10427 _v0$4:
10428 while (true) {
10429 if ((_v0.b && _v0.b.b) && _v0.b.b.b) {
10430 if (!_v0.b.b.b.b) {
10431 var r = _v0.a;
10432 var _v1 = _v0.b;
10433 var g = _v1.a;
10434 var _v2 = _v1.b;
10435 var b = _v2.a;
10436 return A5(
10437 $rtfeldman$elm_css$Css$validHex,
10438 str,
10439 _Utils_Tuple2(r, r),
10440 _Utils_Tuple2(g, g),
10441 _Utils_Tuple2(b, b),
10442 _Utils_Tuple2(
10443 _Utils_chr('f'),
10444 _Utils_chr('f')));
10445 } else {
10446 if (!_v0.b.b.b.b.b) {
10447 var r = _v0.a;
10448 var _v3 = _v0.b;
10449 var g = _v3.a;
10450 var _v4 = _v3.b;
10451 var b = _v4.a;
10452 var _v5 = _v4.b;
10453 var a = _v5.a;
10454 return A5(
10455 $rtfeldman$elm_css$Css$validHex,
10456 str,
10457 _Utils_Tuple2(r, r),
10458 _Utils_Tuple2(g, g),
10459 _Utils_Tuple2(b, b),
10460 _Utils_Tuple2(a, a));
10461 } else {
10462 if (_v0.b.b.b.b.b.b) {
10463 if (!_v0.b.b.b.b.b.b.b) {
10464 var r1 = _v0.a;
10465 var _v6 = _v0.b;
10466 var r2 = _v6.a;
10467 var _v7 = _v6.b;
10468 var g1 = _v7.a;
10469 var _v8 = _v7.b;
10470 var g2 = _v8.a;
10471 var _v9 = _v8.b;
10472 var b1 = _v9.a;
10473 var _v10 = _v9.b;
10474 var b2 = _v10.a;
10475 return A5(
10476 $rtfeldman$elm_css$Css$validHex,
10477 str,
10478 _Utils_Tuple2(r1, r2),
10479 _Utils_Tuple2(g1, g2),
10480 _Utils_Tuple2(b1, b2),
10481 _Utils_Tuple2(
10482 _Utils_chr('f'),
10483 _Utils_chr('f')));
10484 } else {
10485 if (_v0.b.b.b.b.b.b.b.b && (!_v0.b.b.b.b.b.b.b.b.b)) {
10486 var r1 = _v0.a;
10487 var _v11 = _v0.b;
10488 var r2 = _v11.a;
10489 var _v12 = _v11.b;
10490 var g1 = _v12.a;
10491 var _v13 = _v12.b;
10492 var g2 = _v13.a;
10493 var _v14 = _v13.b;
10494 var b1 = _v14.a;
10495 var _v15 = _v14.b;
10496 var b2 = _v15.a;
10497 var _v16 = _v15.b;
10498 var a1 = _v16.a;
10499 var _v17 = _v16.b;
10500 var a2 = _v17.a;
10501 return A5(
10502 $rtfeldman$elm_css$Css$validHex,
10503 str,
10504 _Utils_Tuple2(r1, r2),
10505 _Utils_Tuple2(g1, g2),
10506 _Utils_Tuple2(b1, b2),
10507 _Utils_Tuple2(a1, a2));
10508 } else {
10509 break _v0$4;
10510 }
10511 }
10512 } else {
10513 break _v0$4;
10514 }
10515 }
10516 }
10517 } else {
10518 break _v0$4;
10519 }
10520 }
10521 return $rtfeldman$elm_css$Css$erroneousHex(str);
10522};
10523var $author$project$Styles$theme = A7(
10524 $author$project$Styles$Theme,
10525 $rtfeldman$elm_css$Css$hex('fedbd0'),
10526 $rtfeldman$elm_css$Css$hex('feeae6'),
10527 $rtfeldman$elm_css$Css$hex('ff0000'),
10528 $rtfeldman$elm_css$Css$hex('442c2e'),
10529 $rtfeldman$elm_css$Css$hex('ffffff'),
10530 $rtfeldman$elm_css$Css$hex('442c2e'),
10531 $rtfeldman$elm_css$Css$hex('feeae6'));
10532var $author$project$Styles$furbyButton = A2(
10533 $rtfeldman$elm_css$Html$Styled$styled,
10534 $rtfeldman$elm_css$Html$Styled$button,
10535 _List_fromArray(
10536 [
10537 $rtfeldman$elm_css$Css$margin(
10538 $rtfeldman$elm_css$Css$px(12)),
10539 $rtfeldman$elm_css$Css$color($author$project$Styles$theme.fg),
10540 $rtfeldman$elm_css$Css$height(
10541 $rtfeldman$elm_css$Css$px(40)),
10542 $rtfeldman$elm_css$Css$border(
10543 $rtfeldman$elm_css$Css$px(0)),
10544 A2(
10545 $rtfeldman$elm_css$Css$padding2,
10546 $rtfeldman$elm_css$Css$px(6),
10547 $rtfeldman$elm_css$Css$px(12)),
10548 $rtfeldman$elm_css$Css$backgroundColor($author$project$Styles$theme.primary),
10549 $rtfeldman$elm_css$Css$hover(
10550 _List_fromArray(
10551 [
10552 $rtfeldman$elm_css$Css$backgroundColor($author$project$Styles$theme.secondary),
10553 $rtfeldman$elm_css$Css$color($author$project$Styles$theme.fg),
10554 $rtfeldman$elm_css$Css$margin(
10555 $rtfeldman$elm_css$Css$px(12))
10556 ]))
10557 ]));
10558var $rtfeldman$elm_css$Css$none = {backgroundImage: $rtfeldman$elm_css$Css$Structure$Compatible, blockAxisOverflow: $rtfeldman$elm_css$Css$Structure$Compatible, borderStyle: $rtfeldman$elm_css$Css$Structure$Compatible, cursor: $rtfeldman$elm_css$Css$Structure$Compatible, display: $rtfeldman$elm_css$Css$Structure$Compatible, hoverCapability: $rtfeldman$elm_css$Css$Structure$Compatible, inlineAxisOverflow: $rtfeldman$elm_css$Css$Structure$Compatible, keyframes: $rtfeldman$elm_css$Css$Structure$Compatible, lengthOrNone: $rtfeldman$elm_css$Css$Structure$Compatible, lengthOrNoneOrMinMaxDimension: $rtfeldman$elm_css$Css$Structure$Compatible, lengthOrNumberOrAutoOrNoneOrContent: $rtfeldman$elm_css$Css$Structure$Compatible, listStyleType: $rtfeldman$elm_css$Css$Structure$Compatible, listStyleTypeOrPositionOrImage: $rtfeldman$elm_css$Css$Structure$Compatible, none: $rtfeldman$elm_css$Css$Structure$Compatible, outline: $rtfeldman$elm_css$Css$Structure$Compatible, pointerDevice: $rtfeldman$elm_css$Css$Structure$Compatible, pointerEvents: $rtfeldman$elm_css$Css$Structure$Compatible, resize: $rtfeldman$elm_css$Css$Structure$Compatible, scriptingSupport: $rtfeldman$elm_css$Css$Structure$Compatible, textDecorationLine: $rtfeldman$elm_css$Css$Structure$Compatible, textTransform: $rtfeldman$elm_css$Css$Structure$Compatible, touchAction: $rtfeldman$elm_css$Css$Structure$Compatible, transform: $rtfeldman$elm_css$Css$Structure$Compatible, updateFrequency: $rtfeldman$elm_css$Css$Structure$Compatible, value: 'none'};
10559var $rtfeldman$elm_css$Css$padding = $rtfeldman$elm_css$Css$prop1('padding');
10560var $rtfeldman$elm_css$Css$textDecoration = $rtfeldman$elm_css$Css$prop1('text-decoration');
10561var $rtfeldman$elm_css$Css$underline = {textDecorationLine: $rtfeldman$elm_css$Css$Structure$Compatible, value: 'underline'};
10562var $author$project$Styles$headerLink = A2(
10563 $rtfeldman$elm_css$Html$Styled$styled,
10564 $rtfeldman$elm_css$Html$Styled$a,
10565 _List_fromArray(
10566 [
10567 $rtfeldman$elm_css$Css$color($author$project$Styles$theme.fgLight),
10568 $rtfeldman$elm_css$Css$padding(
10569 $rtfeldman$elm_css$Css$px(12)),
10570 $rtfeldman$elm_css$Css$textDecoration($rtfeldman$elm_css$Css$none),
10571 $rtfeldman$elm_css$Css$hover(
10572 _List_fromArray(
10573 [
10574 $rtfeldman$elm_css$Css$backgroundColor($author$project$Styles$theme.secondary),
10575 $rtfeldman$elm_css$Css$textDecoration($rtfeldman$elm_css$Css$underline)
10576 ]))
10577 ]));
10578var $rtfeldman$elm_css$Css$inline = {display: $rtfeldman$elm_css$Css$Structure$Compatible, value: 'inline'};
10579var $rtfeldman$elm_css$Css$left = $rtfeldman$elm_css$Css$prop1('left');
10580var $rtfeldman$elm_css$Css$listStyle = $rtfeldman$elm_css$Css$prop1('list-style');
7477var $elm$virtual_dom$VirtualDom$Normal = function (a) { 10581var $elm$virtual_dom$VirtualDom$Normal = function (a) {
7478 return {$: 'Normal', a: a}; 10582 return {$: 'Normal', a: a};
7479}; 10583};
7480var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on; 10584var $elm$virtual_dom$VirtualDom$on = _VirtualDom_on;
7481var $elm$html$Html$Events$on = F2( 10585var $rtfeldman$elm_css$VirtualDom$Styled$on = F2(
10586 function (eventName, handler) {
10587 return A3(
10588 $rtfeldman$elm_css$VirtualDom$Styled$Attribute,
10589 A2($elm$virtual_dom$VirtualDom$on, eventName, handler),
10590 _List_Nil,
10591 '');
10592 });
10593var $rtfeldman$elm_css$Html$Styled$Events$on = F2(
7482 function (event, decoder) { 10594 function (event, decoder) {
7483 return A2( 10595 return A2(
7484 $elm$virtual_dom$VirtualDom$on, 10596 $rtfeldman$elm_css$VirtualDom$Styled$on,
7485 event, 10597 event,
7486 $elm$virtual_dom$VirtualDom$Normal(decoder)); 10598 $elm$virtual_dom$VirtualDom$Normal(decoder));
7487 }); 10599 });
7488var $elm$html$Html$Events$onClick = function (msg) { 10600var $rtfeldman$elm_css$Html$Styled$Events$onClick = function (msg) {
7489 return A2( 10601 return A2(
7490 $elm$html$Html$Events$on, 10602 $rtfeldman$elm_css$Html$Styled$Events$on,
7491 'click', 10603 'click',
7492 $elm$json$Json$Decode$succeed(msg)); 10604 $elm$json$Json$Decode$succeed(msg));
7493}; 10605};
7494var $elm$virtual_dom$VirtualDom$text = _VirtualDom_text; 10606var $rtfeldman$elm_css$Css$paddingBottom = $rtfeldman$elm_css$Css$prop1('padding-bottom');
7495var $elm$html$Html$text = $elm$virtual_dom$VirtualDom$text; 10607var $rtfeldman$elm_css$Css$paddingTop = $rtfeldman$elm_css$Css$prop1('padding-top');
7496var $elm$html$Html$ul = _VirtualDom_node('ul'); 10608var $rtfeldman$elm_css$VirtualDom$Styled$text = function (str) {
10609 return $rtfeldman$elm_css$VirtualDom$Styled$Unstyled(
10610 $elm$virtual_dom$VirtualDom$text(str));
10611};
10612var $rtfeldman$elm_css$Html$Styled$text = $rtfeldman$elm_css$VirtualDom$Styled$text;
10613var $rtfeldman$elm_css$Css$Preprocess$ApplyStyles = function (a) {
10614 return {$: 'ApplyStyles', a: a};
10615};
10616var $rtfeldman$elm_css$Css$Internal$property = F2(
10617 function (key, value) {
10618 return $rtfeldman$elm_css$Css$Preprocess$AppendProperty(key + (':' + value));
10619 });
10620var $rtfeldman$elm_css$Css$Internal$getOverloadedProperty = F3(
10621 function (functionName, desiredKey, style) {
10622 getOverloadedProperty:
10623 while (true) {
10624 switch (style.$) {
10625 case 'AppendProperty':
10626 var str = style.a;
10627 var key = A2(
10628 $elm$core$Maybe$withDefault,
10629 '',
10630 $elm$core$List$head(
10631 A2($elm$core$String$split, ':', str)));
10632 return A2($rtfeldman$elm_css$Css$Internal$property, desiredKey, key);
10633 case 'ExtendSelector':
10634 var selector = style.a;
10635 return A2($rtfeldman$elm_css$Css$Internal$property, desiredKey, 'elm-css-error-cannot-apply-' + (functionName + '-with-inapplicable-Style-for-selector'));
10636 case 'NestSnippet':
10637 var combinator = style.a;
10638 return A2($rtfeldman$elm_css$Css$Internal$property, desiredKey, 'elm-css-error-cannot-apply-' + (functionName + '-with-inapplicable-Style-for-combinator'));
10639 case 'WithPseudoElement':
10640 var pseudoElement = style.a;
10641 return A2($rtfeldman$elm_css$Css$Internal$property, desiredKey, 'elm-css-error-cannot-apply-' + (functionName + '-with-inapplicable-Style-for-pseudo-element setter'));
10642 case 'WithMedia':
10643 return A2($rtfeldman$elm_css$Css$Internal$property, desiredKey, 'elm-css-error-cannot-apply-' + (functionName + '-with-inapplicable-Style-for-media-query'));
10644 case 'WithKeyframes':
10645 return A2($rtfeldman$elm_css$Css$Internal$property, desiredKey, 'elm-css-error-cannot-apply-' + (functionName + '-with-inapplicable-Style-for-keyframes'));
10646 default:
10647 if (!style.a.b) {
10648 return A2($rtfeldman$elm_css$Css$Internal$property, desiredKey, 'elm-css-error-cannot-apply-' + (functionName + '-with-empty-Style'));
10649 } else {
10650 if (!style.a.b.b) {
10651 var _v1 = style.a;
10652 var only = _v1.a;
10653 var $temp$functionName = functionName,
10654 $temp$desiredKey = desiredKey,
10655 $temp$style = only;
10656 functionName = $temp$functionName;
10657 desiredKey = $temp$desiredKey;
10658 style = $temp$style;
10659 continue getOverloadedProperty;
10660 } else {
10661 var _v2 = style.a;
10662 var first = _v2.a;
10663 var rest = _v2.b;
10664 var $temp$functionName = functionName,
10665 $temp$desiredKey = desiredKey,
10666 $temp$style = $rtfeldman$elm_css$Css$Preprocess$ApplyStyles(rest);
10667 functionName = $temp$functionName;
10668 desiredKey = $temp$desiredKey;
10669 style = $temp$style;
10670 continue getOverloadedProperty;
10671 }
10672 }
10673 }
10674 }
10675 });
10676var $rtfeldman$elm_css$Css$Internal$IncompatibleUnits = {$: 'IncompatibleUnits'};
10677var $rtfeldman$elm_css$Css$Internal$lengthForOverloadedProperty = A3($rtfeldman$elm_css$Css$Internal$lengthConverter, $rtfeldman$elm_css$Css$Internal$IncompatibleUnits, '', 0);
10678var $rtfeldman$elm_css$Css$textAlign = function (fn) {
10679 return A3(
10680 $rtfeldman$elm_css$Css$Internal$getOverloadedProperty,
10681 'textAlign',
10682 'text-align',
10683 fn($rtfeldman$elm_css$Css$Internal$lengthForOverloadedProperty));
10684};
10685var $rtfeldman$elm_css$Html$Styled$ul = $rtfeldman$elm_css$Html$Styled$node('ul');
7497var $author$project$Main$viewHeader = function (model) { 10686var $author$project$Main$viewHeader = function (model) {
7498 var links = _List_fromArray( 10687 var links = _List_fromArray(
7499 [ 10688 [
7500 _Utils_Tuple2('Home', '/'),
7501 _Utils_Tuple2('Catalog', '/catalog'), 10689 _Utils_Tuple2('Catalog', '/catalog'),
7502 _Utils_Tuple2('Cart', '/cart') 10690 _Utils_Tuple2('Cart', '/cart')
7503 ]); 10691 ]);
7504 return A2( 10692 return A2(
7505 $elm$html$Html$div, 10693 $rtfeldman$elm_css$Html$Styled$div,
7506 _List_Nil, 10694 _List_fromArray(
10695 [
10696 $rtfeldman$elm_css$Html$Styled$Attributes$css(
10697 _List_fromArray(
10698 [
10699 $rtfeldman$elm_css$Css$padding(
10700 $rtfeldman$elm_css$Css$px(40)),
10701 $rtfeldman$elm_css$Css$paddingTop(
10702 $rtfeldman$elm_css$Css$px(3)),
10703 $rtfeldman$elm_css$Css$paddingBottom(
10704 $rtfeldman$elm_css$Css$px(3)),
10705 $rtfeldman$elm_css$Css$textAlign($rtfeldman$elm_css$Css$left),
10706 $rtfeldman$elm_css$Css$backgroundColor($author$project$Styles$theme.secondary)
10707 ]))
10708 ]),
7507 _List_fromArray( 10709 _List_fromArray(
7508 [ 10710 [
7509 A2( 10711 A2(
7510 $elm$html$Html$ul, 10712 $rtfeldman$elm_css$Html$Styled$ul,
7511 _List_Nil, 10713 _List_fromArray(
10714 [
10715 $rtfeldman$elm_css$Html$Styled$Attributes$css(
10716 _List_fromArray(
10717 [
10718 $rtfeldman$elm_css$Css$listStyle($rtfeldman$elm_css$Css$none),
10719 $rtfeldman$elm_css$Css$padding(
10720 $rtfeldman$elm_css$Css$px(0))
10721 ]))
10722 ]),
7512 _Utils_ap( 10723 _Utils_ap(
7513 A2( 10724 A2(
7514 $elm$core$List$map, 10725 $elm$core$List$map,
@@ -7516,19 +10727,26 @@ var $author$project$Main$viewHeader = function (model) {
7516 var name = _v0.a; 10727 var name = _v0.a;
7517 var loc = _v0.b; 10728 var loc = _v0.b;
7518 return A2( 10729 return A2(
7519 $elm$html$Html$li, 10730 $rtfeldman$elm_css$Html$Styled$li,
7520 _List_Nil, 10731 _List_fromArray(
10732 [
10733 $rtfeldman$elm_css$Html$Styled$Attributes$css(
10734 _List_fromArray(
10735 [
10736 $rtfeldman$elm_css$Css$display($rtfeldman$elm_css$Css$inline)
10737 ]))
10738 ]),
7521 _List_fromArray( 10739 _List_fromArray(
7522 [ 10740 [
7523 A2( 10741 A2(
7524 $elm$html$Html$a, 10742 $author$project$Styles$headerLink,
7525 _List_fromArray( 10743 _List_fromArray(
7526 [ 10744 [
7527 $elm$html$Html$Attributes$href(loc) 10745 $rtfeldman$elm_css$Html$Styled$Attributes$href(loc)
7528 ]), 10746 ]),
7529 _List_fromArray( 10747 _List_fromArray(
7530 [ 10748 [
7531 $elm$html$Html$text(name) 10749 $rtfeldman$elm_css$Html$Styled$text(name)
7532 ])) 10750 ]))
7533 ])); 10751 ]));
7534 }, 10752 },
@@ -7536,121 +10754,160 @@ var $author$project$Main$viewHeader = function (model) {
7536 _List_fromArray( 10754 _List_fromArray(
7537 [ 10755 [
7538 (!_Utils_eq(model.loginModel.loginStatus, $author$project$Login$LoggedIn)) ? A2( 10756 (!_Utils_eq(model.loginModel.loginStatus, $author$project$Login$LoggedIn)) ? A2(
7539 $elm$html$Html$li, 10757 $rtfeldman$elm_css$Html$Styled$li,
7540 _List_Nil, 10758 _List_fromArray(
10759 [
10760 $rtfeldman$elm_css$Html$Styled$Attributes$css(
10761 _List_fromArray(
10762 [
10763 $rtfeldman$elm_css$Css$display($rtfeldman$elm_css$Css$inline)
10764 ]))
10765 ]),
7541 _List_fromArray( 10766 _List_fromArray(
7542 [ 10767 [
7543 A2( 10768 A2(
7544 $elm$html$Html$a, 10769 $author$project$Styles$headerLink,
7545 _List_fromArray( 10770 _List_fromArray(
7546 [ 10771 [
7547 $elm$html$Html$Attributes$href('/login') 10772 $rtfeldman$elm_css$Html$Styled$Attributes$href('/login')
7548 ]), 10773 ]),
7549 _List_fromArray( 10774 _List_fromArray(
7550 [ 10775 [
7551 $elm$html$Html$text('Login') 10776 $rtfeldman$elm_css$Html$Styled$text('Login')
7552 ])) 10777 ]))
7553 ])) : A2( 10778 ])) : A2(
7554 $elm$html$Html$button, 10779 $author$project$Styles$furbyButton,
7555 _List_fromArray( 10780 _List_fromArray(
7556 [ 10781 [
7557 $elm$html$Html$Events$onClick($author$project$Main$LogoutPressed) 10782 $rtfeldman$elm_css$Html$Styled$Events$onClick($author$project$Main$LogoutPressed)
7558 ]), 10783 ]),
7559 _List_fromArray( 10784 _List_fromArray(
7560 [ 10785 [
7561 $elm$html$Html$text('Logout') 10786 $rtfeldman$elm_css$Html$Styled$text('Logout')
7562 ])) 10787 ]))
7563 ]))) 10788 ])))
7564 ])); 10789 ]));
7565}; 10790};
7566var $author$project$Main$pageWrap = F2( 10791var $author$project$Main$pageWrap = F2(
7567 function (model, page) { 10792 function (model, page) {
7568 return _List_fromArray( 10793 return $elm$core$List$singleton(
7569 [ 10794 $rtfeldman$elm_css$Html$Styled$toUnstyled(
7570 A2( 10795 A2(
7571 $elm$html$Html$div, 10796 $rtfeldman$elm_css$Html$Styled$div,
7572 _List_Nil, 10797 _List_Nil,
7573 _List_fromArray( 10798 _List_fromArray(
7574 [ 10799 [
7575 $author$project$Main$viewHeader(model), 10800 $author$project$Main$viewHeader(model),
7576 page 10801 page
7577 ])) 10802 ]))));
7578 ]);
7579 }); 10803 });
7580var $elm$core$List$isEmpty = function (xs) { 10804var $author$project$Cart$calculateTotal = function (model) {
7581 if (!xs.b) { 10805 var items = model.products;
7582 return true; 10806 return A3(
7583 } else { 10807 $elm$core$List$foldl,
7584 return false; 10808 $elm$core$Basics$add,
7585 } 10809 0,
10810 A2(
10811 $elm$core$List$map,
10812 function (i) {
10813 return i.quantity * i.productItem.price;
10814 },
10815 items));
10816};
10817var $author$project$Cart$AddToCartPressed = function (a) {
10818 return {$: 'AddToCartPressed', a: a};
7586}; 10819};
7587var $author$project$Cart$RemoveFromCart = function (a) { 10820var $author$project$Cart$RemoveFromCart = function (a) {
7588 return {$: 'RemoveFromCart', a: a}; 10821 return {$: 'RemoveFromCart', a: a};
7589}; 10822};
7590var $elm$core$String$fromFloat = _String_fromNumber; 10823var $author$project$Cart$viewCartItemListing = function (listing) {
7591var $author$project$Cart$viewProduct = function (p) {
7592 return A2( 10824 return A2(
7593 $elm$html$Html$div, 10825 $rtfeldman$elm_css$Html$Styled$div,
7594 _List_Nil, 10826 _List_Nil,
7595 _List_fromArray( 10827 _List_fromArray(
7596 [ 10828 [
7597 $elm$html$Html$text(p.name), 10829 $rtfeldman$elm_css$Html$Styled$text(listing.productItem.name),
7598 A2( 10830 A2(
7599 $elm$html$Html$div, 10831 $rtfeldman$elm_css$Html$Styled$div,
7600 _List_Nil, 10832 _List_Nil,
7601 _List_fromArray( 10833 _List_fromArray(
7602 [ 10834 [
7603 $elm$html$Html$text( 10835 $rtfeldman$elm_css$Html$Styled$text(
7604 A2($elm$core$Maybe$withDefault, '', p.kind)) 10836 A2($elm$core$Maybe$withDefault, '', listing.productItem.kind))
7605 ])), 10837 ])),
7606 A2( 10838 A2(
7607 $elm$html$Html$div, 10839 $rtfeldman$elm_css$Html$Styled$div,
7608 _List_Nil, 10840 _List_Nil,
7609 _List_fromArray( 10841 _List_fromArray(
7610 [ 10842 [
7611 $elm$html$Html$text( 10843 $rtfeldman$elm_css$Html$Styled$text(
7612 A2($elm$core$Maybe$withDefault, '', p.description)) 10844 A2($elm$core$Maybe$withDefault, '', listing.productItem.description))
7613 ])), 10845 ])),
7614 A2( 10846 A2(
7615 $elm$html$Html$div, 10847 $rtfeldman$elm_css$Html$Styled$div,
7616 _List_Nil, 10848 _List_Nil,
7617 _List_fromArray( 10849 _List_fromArray(
7618 [ 10850 [
7619 $elm$html$Html$text( 10851 $rtfeldman$elm_css$Html$Styled$text(
7620 $elm$core$String$fromFloat(p.price)) 10852 $elm$core$String$fromFloat(listing.productItem.price))
10853 ])),
10854 A2(
10855 $rtfeldman$elm_css$Html$Styled$div,
10856 _List_Nil,
10857 _List_fromArray(
10858 [
10859 $rtfeldman$elm_css$Html$Styled$text(
10860 $elm$core$String$fromInt(listing.quantity))
7621 ])), 10861 ])),
7622 A2( 10862 A2(
7623 $elm$html$Html$div, 10863 $rtfeldman$elm_css$Html$Styled$div,
7624 _List_Nil, 10864 _List_Nil,
7625 _List_fromArray( 10865 _List_fromArray(
7626 [ 10866 [
7627 A2( 10867 A2(
7628 $elm$html$Html$button, 10868 $rtfeldman$elm_css$Html$Styled$button,
7629 _List_fromArray( 10869 _List_fromArray(
7630 [ 10870 [
7631 $elm$html$Html$Events$onClick( 10871 $rtfeldman$elm_css$Html$Styled$Events$onClick(
7632 $author$project$Cart$RemoveFromCart(p.id)) 10872 $author$project$Cart$AddToCartPressed(listing.productItem.id))
7633 ]), 10873 ]),
7634 _List_fromArray( 10874 _List_fromArray(
7635 [ 10875 [
7636 $elm$html$Html$text('Remove') 10876 $rtfeldman$elm_css$Html$Styled$text('Add')
7637 ])) 10877 ]))
7638 ])), 10878 ])),
7639 A2( 10879 A2(
7640 $elm$html$Html$div, 10880 $rtfeldman$elm_css$Html$Styled$div,
7641 _List_Nil, 10881 _List_Nil,
7642 _List_fromArray( 10882 _List_fromArray(
7643 [ 10883 [
7644 A2( 10884 A2(
7645 $elm$html$Html$a, 10885 $rtfeldman$elm_css$Html$Styled$button,
7646 _List_fromArray( 10886 _List_fromArray(
7647 [ 10887 [
7648 $elm$html$Html$Attributes$href( 10888 $rtfeldman$elm_css$Html$Styled$Events$onClick(
7649 '/product/' + $elm$core$String$fromInt(p.id)) 10889 $author$project$Cart$RemoveFromCart(listing.productItem.id))
7650 ]), 10890 ]),
7651 _List_fromArray( 10891 _List_fromArray(
7652 [ 10892 [
7653 $elm$html$Html$text('View Product') 10893 $rtfeldman$elm_css$Html$Styled$text('Remove')
10894 ]))
10895 ])),
10896 A2(
10897 $rtfeldman$elm_css$Html$Styled$div,
10898 _List_Nil,
10899 _List_fromArray(
10900 [
10901 A2(
10902 $rtfeldman$elm_css$Html$Styled$a,
10903 _List_fromArray(
10904 [
10905 $rtfeldman$elm_css$Html$Styled$Attributes$href(
10906 '/product/' + $elm$core$String$fromInt(listing.productItem.id))
10907 ]),
10908 _List_fromArray(
10909 [
10910 $rtfeldman$elm_css$Html$Styled$text('View Product')
7654 ])) 10911 ]))
7655 ])) 10912 ]))
7656 ])); 10913 ]));
@@ -7669,49 +10926,371 @@ var $author$project$Cart$view = function (model) {
7669 var _v0 = model.pageStatus; 10926 var _v0 = model.pageStatus;
7670 if (_v0.$ === 'Loading') { 10927 if (_v0.$ === 'Loading') {
7671 return A2( 10928 return A2(
7672 $elm$html$Html$div, 10929 $rtfeldman$elm_css$Html$Styled$div,
7673 _List_Nil, 10930 _List_Nil,
7674 _List_fromArray( 10931 _List_fromArray(
7675 [ 10932 [
7676 $elm$html$Html$text( 10933 $rtfeldman$elm_css$Html$Styled$text(
7677 $author$project$Cart$viewStatus($author$project$Cart$Loading)) 10934 $author$project$Cart$viewStatus($author$project$Cart$Loading))
7678 ])); 10935 ]));
7679 } else { 10936 } else {
7680 return A2( 10937 return A2(
7681 $elm$html$Html$div, 10938 $rtfeldman$elm_css$Html$Styled$div,
7682 _List_Nil, 10939 _List_Nil,
7683 _List_fromArray( 10940 _List_fromArray(
7684 [ 10941 [
7685 function () { 10942 function () {
7686 var cart = A2($elm$core$List$map, $author$project$Cart$viewProduct, model.products); 10943 var cart = A2($elm$core$List$map, $author$project$Cart$viewCartItemListing, model.products);
7687 return $elm$core$List$isEmpty(cart) ? $elm$html$Html$text('No items in cart') : A2($elm$html$Html$ul, _List_Nil, cart); 10944 return $elm$core$List$isEmpty(cart) ? $rtfeldman$elm_css$Html$Styled$text('No items in cart') : A2($rtfeldman$elm_css$Html$Styled$ul, _List_Nil, cart);
7688 }() 10945 }(),
10946 $rtfeldman$elm_css$Html$Styled$text(
10947 $elm$core$String$fromFloat(
10948 $author$project$Cart$calculateTotal(model))),
10949 A2(
10950 $rtfeldman$elm_css$Html$Styled$a,
10951 _List_fromArray(
10952 [
10953 $rtfeldman$elm_css$Html$Styled$Attributes$href('/checkout')
10954 ]),
10955 _List_fromArray(
10956 [
10957 $rtfeldman$elm_css$Html$Styled$text('Checkout')
10958 ]))
7689 ])); 10959 ]));
7690 } 10960 }
7691}; 10961};
7692var $author$project$Catalog$viewProduct = function (p) { 10962var $rtfeldman$elm_css$Css$fontSize = $rtfeldman$elm_css$Css$prop1('font-size');
10963var $author$project$Styles$bigHeading = $rtfeldman$elm_css$Css$fontSize(
10964 $rtfeldman$elm_css$Css$px(24));
10965var $elm$core$Basics$ge = _Utils_ge;
10966var $author$project$Utils$between = F2(
10967 function (_v0, v) {
10968 var l = _v0.a;
10969 var u = _v0.b;
10970 return (_Utils_cmp(v, l) > -1) && (_Utils_cmp(v, u) < 1);
10971 });
10972var $author$project$Catalog$filterProducts = function (model) {
10973 return A2(
10974 $elm$core$List$filter,
10975 function (p) {
10976 return A2(
10977 $author$project$Utils$between,
10978 model.filters.rating,
10979 A2($elm$core$Maybe$withDefault, 5.0, p.averageRating));
10980 },
10981 A2(
10982 $elm$core$List$filter,
10983 A2(
10984 $elm$core$Basics$composeL,
10985 $author$project$Utils$between(model.filters.price),
10986 function ($) {
10987 return $.price;
10988 }),
10989 model.products));
10990};
10991var $rtfeldman$elm_css$Css$float = function (fn) {
10992 return A3(
10993 $rtfeldman$elm_css$Css$Internal$getOverloadedProperty,
10994 'float',
10995 'float',
10996 fn($rtfeldman$elm_css$Css$Internal$lengthForOverloadedProperty));
10997};
10998var $rtfeldman$elm_css$Css$PercentageUnits = {$: 'PercentageUnits'};
10999var $rtfeldman$elm_css$Css$pct = A2($rtfeldman$elm_css$Css$Internal$lengthConverter, $rtfeldman$elm_css$Css$PercentageUnits, '%');
11000var $author$project$Catalog$ChangePriceLower = function (a) {
11001 return {$: 'ChangePriceLower', a: a};
11002};
11003var $author$project$Catalog$ChangePriceUpper = function (a) {
11004 return {$: 'ChangePriceUpper', a: a};
11005};
11006var $author$project$Catalog$ChangeRatingLower = function (a) {
11007 return {$: 'ChangeRatingLower', a: a};
11008};
11009var $author$project$Catalog$ChangeRatingUpper = function (a) {
11010 return {$: 'ChangeRatingUpper', a: a};
11011};
11012var $rtfeldman$elm_css$Css$prop3 = F4(
11013 function (key, argA, argB, argC) {
11014 return A2(
11015 $rtfeldman$elm_css$Css$property,
11016 key,
11017 A2(
11018 $elm$core$String$join,
11019 ' ',
11020 _List_fromArray(
11021 [argA.value, argB.value, argC.value])));
11022 });
11023var $rtfeldman$elm_css$Css$borderBottom3 = $rtfeldman$elm_css$Css$prop3('border-bottom');
11024var $rtfeldman$elm_css$Css$right = $rtfeldman$elm_css$Css$prop1('right');
11025var $rtfeldman$elm_css$Html$Styled$select = $rtfeldman$elm_css$Html$Styled$node('select');
11026var $rtfeldman$elm_css$Css$solid = {borderStyle: $rtfeldman$elm_css$Css$Structure$Compatible, textDecorationStyle: $rtfeldman$elm_css$Css$Structure$Compatible, value: 'solid'};
11027var $author$project$Styles$furbySelect = A2(
11028 $rtfeldman$elm_css$Html$Styled$styled,
11029 $rtfeldman$elm_css$Html$Styled$select,
11030 _List_fromArray(
11031 [
11032 $rtfeldman$elm_css$Css$margin(
11033 $rtfeldman$elm_css$Css$px(6)),
11034 $rtfeldman$elm_css$Css$color($author$project$Styles$theme.fg),
11035 $rtfeldman$elm_css$Css$border(
11036 $rtfeldman$elm_css$Css$px(0)),
11037 A3(
11038 $rtfeldman$elm_css$Css$borderBottom3,
11039 $rtfeldman$elm_css$Css$px(2),
11040 $rtfeldman$elm_css$Css$solid,
11041 $author$project$Styles$theme.bgLight),
11042 $rtfeldman$elm_css$Css$textAlign($rtfeldman$elm_css$Css$right),
11043 A2(
11044 $rtfeldman$elm_css$Css$padding2,
11045 $rtfeldman$elm_css$Css$px(3),
11046 $rtfeldman$elm_css$Css$px(3)),
11047 $rtfeldman$elm_css$Css$backgroundColor($author$project$Styles$theme.bg),
11048 $rtfeldman$elm_css$Css$hover(
11049 _List_fromArray(
11050 [
11051 A3(
11052 $rtfeldman$elm_css$Css$borderBottom3,
11053 $rtfeldman$elm_css$Css$px(2),
11054 $rtfeldman$elm_css$Css$solid,
11055 $author$project$Styles$theme.fg)
11056 ]))
11057 ]));
11058var $rtfeldman$elm_css$Html$Styled$Events$alwaysStop = function (x) {
11059 return _Utils_Tuple2(x, true);
11060};
11061var $elm$virtual_dom$VirtualDom$MayStopPropagation = function (a) {
11062 return {$: 'MayStopPropagation', a: a};
11063};
11064var $rtfeldman$elm_css$Html$Styled$Events$stopPropagationOn = F2(
11065 function (event, decoder) {
11066 return A2(
11067 $rtfeldman$elm_css$VirtualDom$Styled$on,
11068 event,
11069 $elm$virtual_dom$VirtualDom$MayStopPropagation(decoder));
11070 });
11071var $elm$json$Json$Decode$at = F2(
11072 function (fields, decoder) {
11073 return A3($elm$core$List$foldr, $elm$json$Json$Decode$field, decoder, fields);
11074 });
11075var $rtfeldman$elm_css$Html$Styled$Events$targetValue = A2(
11076 $elm$json$Json$Decode$at,
11077 _List_fromArray(
11078 ['target', 'value']),
11079 $elm$json$Json$Decode$string);
11080var $rtfeldman$elm_css$Html$Styled$Events$onInput = function (tagger) {
7693 return A2( 11081 return A2(
7694 $elm$html$Html$div, 11082 $rtfeldman$elm_css$Html$Styled$Events$stopPropagationOn,
11083 'input',
11084 A2(
11085 $elm$json$Json$Decode$map,
11086 $rtfeldman$elm_css$Html$Styled$Events$alwaysStop,
11087 A2($elm$json$Json$Decode$map, tagger, $rtfeldman$elm_css$Html$Styled$Events$targetValue)));
11088};
11089var $rtfeldman$elm_css$Html$Styled$option = $rtfeldman$elm_css$Html$Styled$node('option');
11090var $author$project$Utils$range = F3(
11091 function (start, stop, step) {
11092 return (_Utils_cmp(start, stop) > -1) ? _List_Nil : A2(
11093 $elm$core$List$cons,
11094 start,
11095 A3($author$project$Utils$range, start + step, stop, step));
11096 });
11097var $elm$json$Json$Encode$bool = _Json_wrap;
11098var $rtfeldman$elm_css$Html$Styled$Attributes$boolProperty = F2(
11099 function (key, bool) {
11100 return A2(
11101 $rtfeldman$elm_css$VirtualDom$Styled$property,
11102 key,
11103 $elm$json$Json$Encode$bool(bool));
11104 });
11105var $rtfeldman$elm_css$Html$Styled$Attributes$selected = $rtfeldman$elm_css$Html$Styled$Attributes$boolProperty('selected');
11106var $elm$virtual_dom$VirtualDom$style = _VirtualDom_style;
11107var $rtfeldman$elm_css$VirtualDom$Styled$style = F2(
11108 function (key, val) {
11109 return A3(
11110 $rtfeldman$elm_css$VirtualDom$Styled$Attribute,
11111 A2($elm$virtual_dom$VirtualDom$style, key, val),
11112 _List_Nil,
11113 '');
11114 });
11115var $rtfeldman$elm_css$Html$Styled$Attributes$style = $rtfeldman$elm_css$VirtualDom$Styled$style;
11116var $elm$core$String$toFloat = _String_toFloat;
11117var $author$project$Catalog$viewFilters = function (model) {
11118 var viewRange = F2(
11119 function (_default, scale) {
11120 return A2(
11121 $elm$core$List$map,
11122 function (i) {
11123 return A2(
11124 $rtfeldman$elm_css$Html$Styled$option,
11125 _List_fromArray(
11126 [
11127 $rtfeldman$elm_css$Html$Styled$Attributes$selected(
11128 _Utils_eq(i, _default))
11129 ]),
11130 _List_fromArray(
11131 [
11132 $rtfeldman$elm_css$Html$Styled$text(
11133 $elm$core$String$fromInt(i))
11134 ]));
11135 },
11136 scale);
11137 });
11138 var ratingRange = A3($author$project$Utils$range, 1, 6, 1);
11139 var priceRange = A3($author$project$Utils$range, 0, 55000, 5000);
11140 var inp = A2(
11141 $elm$core$Basics$composeL,
11142 $elm$core$Maybe$withDefault(0),
11143 $elm$core$String$toFloat);
11144 return A2(
11145 $rtfeldman$elm_css$Html$Styled$div,
7695 _List_Nil, 11146 _List_Nil,
7696 _List_fromArray( 11147 _List_fromArray(
7697 [ 11148 [
7698 $elm$html$Html$text(p.name),
7699 $elm$html$Html$text(
7700 A2($elm$core$Maybe$withDefault, '', p.kind)),
7701 $elm$html$Html$text(
7702 A2($elm$core$Maybe$withDefault, '', p.description)),
7703 $elm$html$Html$text(
7704 $elm$core$String$fromFloat(p.price)),
7705 A2( 11149 A2(
7706 $elm$html$Html$a, 11150 $rtfeldman$elm_css$Html$Styled$div,
7707 _List_fromArray( 11151 _List_fromArray(
7708 [ 11152 [
7709 $elm$html$Html$Attributes$href( 11153 $rtfeldman$elm_css$Html$Styled$Attributes$css(
7710 '/product/' + $elm$core$String$fromInt(p.id)) 11154 _List_fromArray(
11155 [
11156 $author$project$Styles$bigHeading,
11157 $rtfeldman$elm_css$Css$paddingBottom(
11158 $rtfeldman$elm_css$Css$px(12))
11159 ]))
7711 ]), 11160 ]),
7712 _List_fromArray( 11161 _List_fromArray(
7713 [ 11162 [
7714 $elm$html$Html$text('View Product') 11163 $rtfeldman$elm_css$Html$Styled$text('Filters')
11164 ])),
11165 A2(
11166 $rtfeldman$elm_css$Html$Styled$div,
11167 _List_Nil,
11168 _List_fromArray(
11169 [
11170 A2(
11171 $rtfeldman$elm_css$Html$Styled$div,
11172 _List_Nil,
11173 _List_fromArray(
11174 [
11175 $rtfeldman$elm_css$Html$Styled$text('Price')
11176 ])),
11177 A2(
11178 $author$project$Styles$furbySelect,
11179 _List_fromArray(
11180 [
11181 $rtfeldman$elm_css$Html$Styled$Events$onInput(
11182 A2($elm$core$Basics$composeL, $author$project$Catalog$ChangePriceLower, inp)),
11183 A2($rtfeldman$elm_css$Html$Styled$Attributes$style, 'appearance', 'none')
11184 ]),
11185 A2(viewRange, 0, priceRange)),
11186 $rtfeldman$elm_css$Html$Styled$text('to'),
11187 A2(
11188 $author$project$Styles$furbySelect,
11189 _List_fromArray(
11190 [
11191 $rtfeldman$elm_css$Html$Styled$Events$onInput(
11192 A2($elm$core$Basics$composeL, $author$project$Catalog$ChangePriceUpper, inp)),
11193 A2($rtfeldman$elm_css$Html$Styled$Attributes$style, 'appearance', 'none')
11194 ]),
11195 A2(viewRange, 50000, priceRange))
11196 ])),
11197 A2(
11198 $rtfeldman$elm_css$Html$Styled$div,
11199 _List_Nil,
11200 _List_fromArray(
11201 [
11202 A2(
11203 $rtfeldman$elm_css$Html$Styled$div,
11204 _List_Nil,
11205 _List_fromArray(
11206 [
11207 $rtfeldman$elm_css$Html$Styled$text('Rating')
11208 ])),
11209 A2(
11210 $author$project$Styles$furbySelect,
11211 _List_fromArray(
11212 [
11213 $rtfeldman$elm_css$Html$Styled$Events$onInput(
11214 A2($elm$core$Basics$composeL, $author$project$Catalog$ChangeRatingLower, inp)),
11215 A2($rtfeldman$elm_css$Html$Styled$Attributes$style, 'appearance', 'none')
11216 ]),
11217 A2(viewRange, 1, ratingRange)),
11218 $rtfeldman$elm_css$Html$Styled$text('to'),
11219 A2(
11220 $author$project$Styles$furbySelect,
11221 _List_fromArray(
11222 [
11223 $rtfeldman$elm_css$Html$Styled$Events$onInput(
11224 A2($elm$core$Basics$composeL, $author$project$Catalog$ChangeRatingUpper, inp)),
11225 A2($rtfeldman$elm_css$Html$Styled$Attributes$style, 'appearance', 'none')
11226 ]),
11227 A2(viewRange, 5, ratingRange))
11228 ]))
11229 ]));
11230};
11231var $author$project$Catalog$viewProduct = function (p) {
11232 return A2(
11233 $rtfeldman$elm_css$Html$Styled$div,
11234 _List_Nil,
11235 _List_fromArray(
11236 [
11237 A2(
11238 $rtfeldman$elm_css$Html$Styled$div,
11239 _List_Nil,
11240 _List_fromArray(
11241 [
11242 $rtfeldman$elm_css$Html$Styled$text(p.name)
11243 ])),
11244 A2(
11245 $rtfeldman$elm_css$Html$Styled$div,
11246 _List_Nil,
11247 _List_fromArray(
11248 [
11249 $rtfeldman$elm_css$Html$Styled$text(
11250 A2($elm$core$Maybe$withDefault, '', p.kind))
11251 ])),
11252 A2(
11253 $rtfeldman$elm_css$Html$Styled$div,
11254 _List_Nil,
11255 _List_fromArray(
11256 [
11257 $rtfeldman$elm_css$Html$Styled$text(
11258 A2($elm$core$Maybe$withDefault, '', p.description))
11259 ])),
11260 A2(
11261 $rtfeldman$elm_css$Html$Styled$div,
11262 _List_Nil,
11263 _List_fromArray(
11264 [
11265 $rtfeldman$elm_css$Html$Styled$text(
11266 $elm$core$String$fromFloat(p.price))
11267 ])),
11268 function () {
11269 var _v0 = p.averageRating;
11270 if (_v0.$ === 'Just') {
11271 var v = _v0.a;
11272 return $rtfeldman$elm_css$Html$Styled$text(
11273 'Avg Rating: ' + $elm$core$String$fromFloat(v));
11274 } else {
11275 return $rtfeldman$elm_css$Html$Styled$text('No Ratings');
11276 }
11277 }(),
11278 A2(
11279 $rtfeldman$elm_css$Html$Styled$div,
11280 _List_Nil,
11281 _List_fromArray(
11282 [
11283 A2(
11284 $rtfeldman$elm_css$Html$Styled$a,
11285 _List_fromArray(
11286 [
11287 $rtfeldman$elm_css$Html$Styled$Attributes$href(
11288 '/product/' + $elm$core$String$fromInt(p.id))
11289 ]),
11290 _List_fromArray(
11291 [
11292 $rtfeldman$elm_css$Html$Styled$text('View Product')
11293 ]))
7715 ])) 11294 ]))
7716 ])); 11295 ]));
7717}; 11296};
@@ -7725,27 +11304,200 @@ var $author$project$Catalog$viewStatus = function (s) {
7725 return 'Not loaded ...'; 11304 return 'Not loaded ...';
7726 } 11305 }
7727}; 11306};
11307var $rtfeldman$elm_css$Css$width = $rtfeldman$elm_css$Css$prop1('width');
7728var $author$project$Catalog$view = function (model) { 11308var $author$project$Catalog$view = function (model) {
7729 var _v0 = model.pageStatus; 11309 var _v0 = model.pageStatus;
7730 if (_v0.$ === 'Loading') { 11310 if (_v0.$ === 'Loading') {
7731 return A2( 11311 return A2(
7732 $elm$html$Html$div, 11312 $rtfeldman$elm_css$Html$Styled$div,
7733 _List_Nil, 11313 _List_Nil,
7734 _List_fromArray( 11314 _List_fromArray(
7735 [ 11315 [
7736 $elm$html$Html$text( 11316 $rtfeldman$elm_css$Html$Styled$text(
7737 $author$project$Catalog$viewStatus($author$project$Catalog$Loading)) 11317 $author$project$Catalog$viewStatus($author$project$Catalog$Loading))
7738 ])); 11318 ]));
7739 } else { 11319 } else {
7740 return A2( 11320 return A2(
7741 $elm$html$Html$div, 11321 $rtfeldman$elm_css$Html$Styled$div,
11322 _List_fromArray(
11323 [
11324 $rtfeldman$elm_css$Html$Styled$Attributes$css(
11325 _List_fromArray(
11326 [
11327 $rtfeldman$elm_css$Css$padding(
11328 $rtfeldman$elm_css$Css$px(40))
11329 ]))
11330 ]),
11331 _List_fromArray(
11332 [
11333 A2(
11334 $rtfeldman$elm_css$Html$Styled$div,
11335 _List_fromArray(
11336 [
11337 $rtfeldman$elm_css$Html$Styled$Attributes$css(
11338 _List_fromArray(
11339 [
11340 $rtfeldman$elm_css$Css$float($rtfeldman$elm_css$Css$left),
11341 $rtfeldman$elm_css$Css$width(
11342 $rtfeldman$elm_css$Css$pct(20))
11343 ]))
11344 ]),
11345 _List_fromArray(
11346 [
11347 $author$project$Catalog$viewFilters(model)
11348 ])),
11349 A2(
11350 $rtfeldman$elm_css$Html$Styled$div,
11351 _List_fromArray(
11352 [
11353 $rtfeldman$elm_css$Html$Styled$Attributes$css(
11354 _List_fromArray(
11355 [
11356 $rtfeldman$elm_css$Css$float($rtfeldman$elm_css$Css$left),
11357 $rtfeldman$elm_css$Css$width(
11358 $rtfeldman$elm_css$Css$pct(80))
11359 ]))
11360 ]),
11361 _List_fromArray(
11362 [
11363 A2(
11364 $rtfeldman$elm_css$Html$Styled$div,
11365 _List_fromArray(
11366 [
11367 $rtfeldman$elm_css$Html$Styled$Attributes$css(
11368 _List_fromArray(
11369 [$author$project$Styles$bigHeading]))
11370 ]),
11371 _List_fromArray(
11372 [
11373 $rtfeldman$elm_css$Html$Styled$text('Products')
11374 ])),
11375 A2(
11376 $rtfeldman$elm_css$Html$Styled$ul,
11377 _List_fromArray(
11378 [
11379 $rtfeldman$elm_css$Html$Styled$Attributes$css(
11380 _List_fromArray(
11381 [
11382 $rtfeldman$elm_css$Css$padding(
11383 $rtfeldman$elm_css$Css$px(0))
11384 ]))
11385 ]),
11386 A2(
11387 $elm$core$List$map,
11388 $author$project$Catalog$viewProduct,
11389 $author$project$Catalog$filterProducts(model)))
11390 ]))
11391 ]));
11392 }
11393};
11394var $author$project$Checkout$CheckoutPressed = {$: 'CheckoutPressed'};
11395var $author$project$Checkout$PaymentModeSelected = function (a) {
11396 return {$: 'PaymentModeSelected', a: a};
11397};
11398var $author$project$Checkout$viewStatus = function (s) {
11399 switch (s.$) {
11400 case 'Loading':
11401 return 'Loading';
11402 case 'Loaded':
11403 return 'Ready!';
11404 default:
11405 return 'Not loaded ...';
11406 }
11407};
11408var $author$project$Checkout$view = function (model) {
11409 var _v0 = model.pageStatus;
11410 if (_v0.$ === 'Loading') {
11411 return A2(
11412 $rtfeldman$elm_css$Html$Styled$div,
7742 _List_Nil, 11413 _List_Nil,
7743 _List_fromArray( 11414 _List_fromArray(
7744 [ 11415 [
11416 $rtfeldman$elm_css$Html$Styled$text(
11417 $author$project$Checkout$viewStatus($author$project$Checkout$Loading))
11418 ]));
11419 } else {
11420 return A2(
11421 $rtfeldman$elm_css$Html$Styled$div,
11422 _List_Nil,
11423 _List_fromArray(
11424 [
11425 A2(
11426 $rtfeldman$elm_css$Html$Styled$div,
11427 _List_Nil,
11428 _List_fromArray(
11429 [
11430 $rtfeldman$elm_css$Html$Styled$text(
11431 $elm$core$String$fromFloat(model.cartTotal))
11432 ])),
11433 A2(
11434 $rtfeldman$elm_css$Html$Styled$select,
11435 _List_Nil,
11436 _List_fromArray(
11437 [
11438 A2(
11439 $rtfeldman$elm_css$Html$Styled$option,
11440 _List_fromArray(
11441 [
11442 $rtfeldman$elm_css$Html$Styled$Events$onInput($author$project$Checkout$PaymentModeSelected)
11443 ]),
11444 _List_fromArray(
11445 [
11446 $rtfeldman$elm_css$Html$Styled$text('Cash')
11447 ])),
11448 A2(
11449 $rtfeldman$elm_css$Html$Styled$option,
11450 _List_fromArray(
11451 [
11452 $rtfeldman$elm_css$Html$Styled$Events$onInput($author$project$Checkout$PaymentModeSelected)
11453 ]),
11454 _List_fromArray(
11455 [
11456 $rtfeldman$elm_css$Html$Styled$text('Debit Card')
11457 ])),
11458 A2(
11459 $rtfeldman$elm_css$Html$Styled$option,
11460 _List_fromArray(
11461 [
11462 $rtfeldman$elm_css$Html$Styled$Events$onInput($author$project$Checkout$PaymentModeSelected)
11463 ]),
11464 _List_fromArray(
11465 [
11466 $rtfeldman$elm_css$Html$Styled$text('Credit Card')
11467 ]))
11468 ])),
7745 A2( 11469 A2(
7746 $elm$html$Html$ul, 11470 $rtfeldman$elm_css$Html$Styled$div,
7747 _List_Nil, 11471 _List_Nil,
7748 A2($elm$core$List$map, $author$project$Catalog$viewProduct, model.products)) 11472 _List_fromArray(
11473 [
11474 A2(
11475 $rtfeldman$elm_css$Html$Styled$a,
11476 _List_fromArray(
11477 [
11478 $rtfeldman$elm_css$Html$Styled$Attributes$href('/cart')
11479 ]),
11480 _List_fromArray(
11481 [
11482 $rtfeldman$elm_css$Html$Styled$text('Cancel')
11483 ]))
11484 ])),
11485 A2(
11486 $rtfeldman$elm_css$Html$Styled$div,
11487 _List_Nil,
11488 _List_fromArray(
11489 [
11490 A2(
11491 $rtfeldman$elm_css$Html$Styled$button,
11492 _List_fromArray(
11493 [
11494 $rtfeldman$elm_css$Html$Styled$Events$onClick($author$project$Checkout$CheckoutPressed)
11495 ]),
11496 _List_fromArray(
11497 [
11498 $rtfeldman$elm_css$Html$Styled$text('Confirm and Pay')
11499 ]))
11500 ]))
7749 ])); 11501 ]));
7750 } 11502 }
7751}; 11503};
@@ -7756,58 +11508,64 @@ var $author$project$Login$PassEntered = function (a) {
7756var $author$project$Login$UserEntered = function (a) { 11508var $author$project$Login$UserEntered = function (a) {
7757 return {$: 'UserEntered', a: a}; 11509 return {$: 'UserEntered', a: a};
7758}; 11510};
7759var $elm$html$Html$input = _VirtualDom_node('input'); 11511var $rtfeldman$elm_css$Css$auto = {alignItemsOrAuto: $rtfeldman$elm_css$Css$Structure$Compatible, cursor: $rtfeldman$elm_css$Css$Structure$Compatible, flexBasis: $rtfeldman$elm_css$Css$Structure$Compatible, intOrAuto: $rtfeldman$elm_css$Css$Structure$Compatible, justifyContentOrAuto: $rtfeldman$elm_css$Css$Structure$Compatible, lengthOrAuto: $rtfeldman$elm_css$Css$Structure$Compatible, lengthOrAutoOrCoverOrContain: $rtfeldman$elm_css$Css$Structure$Compatible, lengthOrNumberOrAutoOrNoneOrContent: $rtfeldman$elm_css$Css$Structure$Compatible, overflow: $rtfeldman$elm_css$Css$Structure$Compatible, pointerEvents: $rtfeldman$elm_css$Css$Structure$Compatible, tableLayout: $rtfeldman$elm_css$Css$Structure$Compatible, textRendering: $rtfeldman$elm_css$Css$Structure$Compatible, touchAction: $rtfeldman$elm_css$Css$Structure$Compatible, value: 'auto'};
7760var $elm$html$Html$Events$alwaysStop = function (x) { 11512var $rtfeldman$elm_css$Css$center = $rtfeldman$elm_css$Css$prop1('center');
7761 return _Utils_Tuple2(x, true); 11513var $author$project$Login$fieldPadding = $rtfeldman$elm_css$Html$Styled$Attributes$css(
7762};
7763var $elm$virtual_dom$VirtualDom$MayStopPropagation = function (a) {
7764 return {$: 'MayStopPropagation', a: a};
7765};
7766var $elm$html$Html$Events$stopPropagationOn = F2(
7767 function (event, decoder) {
7768 return A2(
7769 $elm$virtual_dom$VirtualDom$on,
7770 event,
7771 $elm$virtual_dom$VirtualDom$MayStopPropagation(decoder));
7772 });
7773var $elm$json$Json$Decode$at = F2(
7774 function (fields, decoder) {
7775 return A3($elm$core$List$foldr, $elm$json$Json$Decode$field, decoder, fields);
7776 });
7777var $elm$html$Html$Events$targetValue = A2(
7778 $elm$json$Json$Decode$at,
7779 _List_fromArray( 11514 _List_fromArray(
7780 ['target', 'value']), 11515 [
7781 $elm$json$Json$Decode$string); 11516 $rtfeldman$elm_css$Css$paddingTop(
7782var $elm$html$Html$Events$onInput = function (tagger) { 11517 $rtfeldman$elm_css$Css$px(10)),
7783 return A2( 11518 $rtfeldman$elm_css$Css$paddingBottom(
7784 $elm$html$Html$Events$stopPropagationOn, 11519 $rtfeldman$elm_css$Css$px(10))
7785 'input', 11520 ]));
7786 A2( 11521var $rtfeldman$elm_css$Css$marginTop = $rtfeldman$elm_css$Css$prop1('margin-top');
7787 $elm$json$Json$Decode$map, 11522var $rtfeldman$elm_css$Css$focus = $rtfeldman$elm_css$Css$pseudoClass('focus');
7788 $elm$html$Html$Events$alwaysStop, 11523var $rtfeldman$elm_css$Html$Styled$input = $rtfeldman$elm_css$Html$Styled$node('input');
7789 A2($elm$json$Json$Decode$map, tagger, $elm$html$Html$Events$targetValue))); 11524var $author$project$Styles$loginInputField = A2(
7790}; 11525 $rtfeldman$elm_css$Html$Styled$styled,
7791var $elm$html$Html$Attributes$placeholder = $elm$html$Html$Attributes$stringProperty('placeholder'); 11526 $rtfeldman$elm_css$Html$Styled$input,
7792var $elm$html$Html$Attributes$type_ = $elm$html$Html$Attributes$stringProperty('type'); 11527 _List_fromArray(
7793var $elm$html$Html$Attributes$value = $elm$html$Html$Attributes$stringProperty('value'); 11528 [
11529 $rtfeldman$elm_css$Css$width(
11530 $rtfeldman$elm_css$Css$pct(100)),
11531 $rtfeldman$elm_css$Css$color($author$project$Styles$theme.fg),
11532 $rtfeldman$elm_css$Css$border(
11533 $rtfeldman$elm_css$Css$px(0)),
11534 A3(
11535 $rtfeldman$elm_css$Css$borderBottom3,
11536 $rtfeldman$elm_css$Css$px(1),
11537 $rtfeldman$elm_css$Css$solid,
11538 $author$project$Styles$theme.bgLight),
11539 $rtfeldman$elm_css$Css$focus(
11540 _List_fromArray(
11541 [
11542 A3(
11543 $rtfeldman$elm_css$Css$borderBottom3,
11544 $rtfeldman$elm_css$Css$px(2),
11545 $rtfeldman$elm_css$Css$solid,
11546 $author$project$Styles$theme.fg)
11547 ]))
11548 ]));
11549var $rtfeldman$elm_css$Html$Styled$Attributes$placeholder = $rtfeldman$elm_css$Html$Styled$Attributes$stringProperty('placeholder');
11550var $rtfeldman$elm_css$Html$Styled$Attributes$type_ = $rtfeldman$elm_css$Html$Styled$Attributes$stringProperty('type');
11551var $rtfeldman$elm_css$Html$Styled$Attributes$value = $rtfeldman$elm_css$Html$Styled$Attributes$stringProperty('value');
7794var $author$project$Login$viewInput = F4( 11552var $author$project$Login$viewInput = F4(
7795 function (t, p, v, toMsg) { 11553 function (t, p, v, toMsg) {
7796 return A2( 11554 return A2(
7797 $elm$html$Html$input, 11555 $author$project$Styles$loginInputField,
7798 _List_fromArray( 11556 _List_fromArray(
7799 [ 11557 [
7800 $elm$html$Html$Attributes$type_(t), 11558 $rtfeldman$elm_css$Html$Styled$Attributes$type_(t),
7801 $elm$html$Html$Attributes$placeholder(p), 11559 $rtfeldman$elm_css$Html$Styled$Attributes$placeholder(p),
7802 $elm$html$Html$Attributes$value(v), 11560 $rtfeldman$elm_css$Html$Styled$Attributes$value(v),
7803 $elm$html$Html$Events$onInput(toMsg) 11561 $rtfeldman$elm_css$Html$Styled$Events$onInput(toMsg)
7804 ]), 11562 ]),
7805 _List_Nil); 11563 _List_Nil);
7806 }); 11564 });
7807var $author$project$Login$viewStatus = function (ls) { 11565var $author$project$Login$viewStatus = function (ls) {
7808 switch (ls.$) { 11566 switch (ls.$) {
7809 case 'NotLoggedIn': 11567 case 'NotLoggedIn':
7810 return 'Not Logged In'; 11568 return '';
7811 case 'InvalidLogin': 11569 case 'InvalidLogin':
7812 return 'Invalid Login'; 11570 return 'Invalid Login';
7813 case 'LoggedIn': 11571 case 'LoggedIn':
@@ -7818,63 +11576,107 @@ var $author$project$Login$viewStatus = function (ls) {
7818}; 11576};
7819var $author$project$Login$view = function (model) { 11577var $author$project$Login$view = function (model) {
7820 return A2( 11578 return A2(
7821 $elm$html$Html$div, 11579 $rtfeldman$elm_css$Html$Styled$div,
7822 _List_Nil, 11580 _List_fromArray(
11581 [
11582 $rtfeldman$elm_css$Html$Styled$Attributes$css(
11583 _List_fromArray(
11584 [
11585 $rtfeldman$elm_css$Css$margin($rtfeldman$elm_css$Css$auto),
11586 $rtfeldman$elm_css$Css$marginTop(
11587 $rtfeldman$elm_css$Css$pct(10)),
11588 $rtfeldman$elm_css$Css$padding(
11589 $rtfeldman$elm_css$Css$px(20)),
11590 $rtfeldman$elm_css$Css$width(
11591 $rtfeldman$elm_css$Css$pct(30))
11592 ]))
11593 ]),
7823 _List_fromArray( 11594 _List_fromArray(
7824 [ 11595 [
7825 A2( 11596 A2(
7826 $elm$html$Html$div, 11597 $rtfeldman$elm_css$Html$Styled$div,
7827 _List_Nil, 11598 _List_fromArray(
11599 [
11600 $author$project$Login$fieldPadding,
11601 $rtfeldman$elm_css$Html$Styled$Attributes$css(
11602 _List_fromArray(
11603 [$author$project$Styles$bigHeading]))
11604 ]),
11605 _List_fromArray(
11606 [
11607 $rtfeldman$elm_css$Html$Styled$text('Login')
11608 ])),
11609 A2(
11610 $rtfeldman$elm_css$Html$Styled$div,
11611 _List_fromArray(
11612 [$author$project$Login$fieldPadding]),
7828 _List_fromArray( 11613 _List_fromArray(
7829 [ 11614 [
7830 A4($author$project$Login$viewInput, 'text', 'Enter name here', model.username, $author$project$Login$UserEntered) 11615 A4($author$project$Login$viewInput, 'text', 'Enter name here', model.username, $author$project$Login$UserEntered)
7831 ])), 11616 ])),
7832 A2( 11617 A2(
7833 $elm$html$Html$div, 11618 $rtfeldman$elm_css$Html$Styled$div,
7834 _List_Nil, 11619 _List_fromArray(
11620 [$author$project$Login$fieldPadding]),
7835 _List_fromArray( 11621 _List_fromArray(
7836 [ 11622 [
7837 A4($author$project$Login$viewInput, 'password', 'Password', model.password, $author$project$Login$PassEntered) 11623 A4($author$project$Login$viewInput, 'password', 'Password', model.password, $author$project$Login$PassEntered)
7838 ])), 11624 ])),
7839 A2( 11625 A2(
7840 $elm$html$Html$div, 11626 $rtfeldman$elm_css$Html$Styled$div,
7841 _List_Nil, 11627 _List_fromArray(
11628 [
11629 $rtfeldman$elm_css$Html$Styled$Attributes$css(
11630 _List_fromArray(
11631 [
11632 $rtfeldman$elm_css$Css$textAlign($rtfeldman$elm_css$Css$center)
11633 ])),
11634 $author$project$Login$fieldPadding
11635 ]),
7842 _List_fromArray( 11636 _List_fromArray(
7843 [ 11637 [
7844 A2( 11638 A2(
7845 $elm$html$Html$button, 11639 $author$project$Styles$furbyButton,
7846 _List_fromArray( 11640 _List_fromArray(
7847 [ 11641 [
7848 $elm$html$Html$Events$onClick($author$project$Login$LoginPressed) 11642 $rtfeldman$elm_css$Html$Styled$Events$onClick($author$project$Login$LoginPressed)
7849 ]), 11643 ]),
7850 _List_fromArray( 11644 _List_fromArray(
7851 [ 11645 [
7852 $elm$html$Html$text('Login') 11646 $rtfeldman$elm_css$Html$Styled$text('Login')
7853 ])) 11647 ]))
7854 ])), 11648 ])),
7855 A2( 11649 A2(
7856 $elm$html$Html$div, 11650 $rtfeldman$elm_css$Html$Styled$div,
7857 _List_Nil, 11651 _List_fromArray(
11652 [
11653 $rtfeldman$elm_css$Html$Styled$Attributes$css(
11654 _List_fromArray(
11655 [
11656 $rtfeldman$elm_css$Css$textAlign($rtfeldman$elm_css$Css$center)
11657 ]))
11658 ]),
7858 _List_fromArray( 11659 _List_fromArray(
7859 [ 11660 [
7860 $elm$html$Html$text( 11661 $rtfeldman$elm_css$Html$Styled$text(
7861 $author$project$Login$viewStatus(model.loginStatus)) 11662 $author$project$Login$viewStatus(model.loginStatus))
7862 ])), 11663 ])),
7863 A2( 11664 A2(
7864 $elm$html$Html$div, 11665 $rtfeldman$elm_css$Html$Styled$div,
7865 _List_Nil, 11666 _List_fromArray(
11667 [$author$project$Login$fieldPadding]),
7866 _List_fromArray( 11668 _List_fromArray(
7867 [ 11669 [
7868 $elm$html$Html$text('Don\'t have an account? '), 11670 $rtfeldman$elm_css$Html$Styled$text('Don\'t have an account? '),
7869 A2( 11671 A2(
7870 $elm$html$Html$a, 11672 $rtfeldman$elm_css$Html$Styled$a,
7871 _List_fromArray( 11673 _List_fromArray(
7872 [ 11674 [
7873 $elm$html$Html$Attributes$href('/signup') 11675 $rtfeldman$elm_css$Html$Styled$Attributes$href('/signup')
7874 ]), 11676 ]),
7875 _List_fromArray( 11677 _List_fromArray(
7876 [ 11678 [
7877 $elm$html$Html$text('Register now!') 11679 $rtfeldman$elm_css$Html$Styled$text('Register now!')
7878 ])) 11680 ]))
7879 ])) 11681 ]))
7880 ])); 11682 ]));
@@ -7887,42 +11689,118 @@ var $author$project$Product$AddToCartPressed = {$: 'AddToCartPressed'};
7887var $author$project$Product$viewInput = F4( 11689var $author$project$Product$viewInput = F4(
7888 function (t, p, v, toMsg) { 11690 function (t, p, v, toMsg) {
7889 return A2( 11691 return A2(
7890 $elm$html$Html$input, 11692 $rtfeldman$elm_css$Html$Styled$input,
7891 _List_fromArray( 11693 _List_fromArray(
7892 [ 11694 [
7893 $elm$html$Html$Attributes$type_(t), 11695 $rtfeldman$elm_css$Html$Styled$Attributes$type_(t),
7894 $elm$html$Html$Attributes$placeholder(p), 11696 $rtfeldman$elm_css$Html$Styled$Attributes$placeholder(p),
7895 $elm$html$Html$Attributes$value(v), 11697 $rtfeldman$elm_css$Html$Styled$Attributes$value(v),
7896 $elm$html$Html$Events$onInput(toMsg) 11698 $rtfeldman$elm_css$Html$Styled$Events$onInput(toMsg)
7897 ]), 11699 ]),
7898 _List_Nil); 11700 _List_Nil);
7899 }); 11701 });
11702var $elm$virtual_dom$VirtualDom$attribute = F2(
11703 function (key, value) {
11704 return A2(
11705 _VirtualDom_attribute,
11706 _VirtualDom_noOnOrFormAction(key),
11707 _VirtualDom_noJavaScriptOrHtmlUri(value));
11708 });
11709var $rtfeldman$elm_css$VirtualDom$Styled$attribute = F2(
11710 function (key, value) {
11711 return A3(
11712 $rtfeldman$elm_css$VirtualDom$Styled$Attribute,
11713 A2($elm$virtual_dom$VirtualDom$attribute, key, value),
11714 _List_Nil,
11715 '');
11716 });
11717var $rtfeldman$elm_css$Html$Styled$Attributes$attribute = $rtfeldman$elm_css$VirtualDom$Styled$attribute;
11718var $author$project$Utils$arIosSrc = function (src) {
11719 return A2($rtfeldman$elm_css$Html$Styled$Attributes$attribute, 'ios-src', src);
11720};
11721var $author$project$Utils$arModes = function (mode) {
11722 return A2($rtfeldman$elm_css$Html$Styled$Attributes$attribute, 'ar-modes', mode);
11723};
11724var $author$project$Utils$arSrc = function (src) {
11725 return A2($rtfeldman$elm_css$Html$Styled$Attributes$attribute, 'src', src);
11726};
11727var $author$project$Utils$autoRotate = A2($rtfeldman$elm_css$Html$Styled$Attributes$attribute, 'auto-rotate', '');
11728var $author$project$Utils$cameraControls = A2($rtfeldman$elm_css$Html$Styled$Attributes$attribute, 'camera-controls', '');
11729var $author$project$Utils$loading = function (mode) {
11730 return A2($rtfeldman$elm_css$Html$Styled$Attributes$attribute, 'loading', mode);
11731};
11732var $author$project$Utils$modelViewer = F2(
11733 function (attributes, children) {
11734 return A3($rtfeldman$elm_css$Html$Styled$node, 'model-viewer', attributes, children);
11735 });
7900var $author$project$Product$viewProduct = function (p) { 11736var $author$project$Product$viewProduct = function (p) {
7901 return A2( 11737 return A2(
7902 $elm$html$Html$div, 11738 $rtfeldman$elm_css$Html$Styled$div,
7903 _List_Nil, 11739 _List_Nil,
7904 _List_fromArray( 11740 _List_fromArray(
7905 [ 11741 [
7906 $elm$html$Html$text(p.name), 11742 A2(
7907 $elm$html$Html$text( 11743 $rtfeldman$elm_css$Html$Styled$div,
7908 A2($elm$core$Maybe$withDefault, '', p.kind)), 11744 _List_Nil,
7909 $elm$html$Html$text( 11745 _List_fromArray(
7910 A2($elm$core$Maybe$withDefault, '', p.description)), 11746 [
7911 $elm$html$Html$text( 11747 $rtfeldman$elm_css$Html$Styled$text(p.name)
7912 $elm$core$String$fromFloat(p.price)) 11748 ])),
11749 A2(
11750 $rtfeldman$elm_css$Html$Styled$div,
11751 _List_Nil,
11752 _List_fromArray(
11753 [
11754 $rtfeldman$elm_css$Html$Styled$text(
11755 A2($elm$core$Maybe$withDefault, '', p.kind))
11756 ])),
11757 A2(
11758 $rtfeldman$elm_css$Html$Styled$div,
11759 _List_Nil,
11760 _List_fromArray(
11761 [
11762 $rtfeldman$elm_css$Html$Styled$text(
11763 A2($elm$core$Maybe$withDefault, '', p.description))
11764 ])),
11765 A2(
11766 $rtfeldman$elm_css$Html$Styled$div,
11767 _List_Nil,
11768 _List_fromArray(
11769 [
11770 $rtfeldman$elm_css$Html$Styled$text(
11771 $elm$core$String$fromFloat(p.price))
11772 ])),
11773 A2(
11774 $rtfeldman$elm_css$Html$Styled$div,
11775 _List_Nil,
11776 _List_fromArray(
11777 [
11778 A2(
11779 $author$project$Utils$modelViewer,
11780 _List_fromArray(
11781 [
11782 $author$project$Utils$cameraControls,
11783 $author$project$Utils$autoRotate,
11784 $author$project$Utils$arSrc(p.src),
11785 $author$project$Utils$arIosSrc(p.iosSrc),
11786 $author$project$Utils$loading('eager'),
11787 $author$project$Utils$arModes('webxr')
11788 ]),
11789 _List_Nil)
11790 ]))
7913 ])); 11791 ]));
7914}; 11792};
7915var $author$project$Product$viewRating = function (r) { 11793var $author$project$Product$viewRating = function (r) {
7916 return A2( 11794 return A2(
7917 $elm$html$Html$div, 11795 $rtfeldman$elm_css$Html$Styled$div,
7918 _List_Nil, 11796 _List_Nil,
7919 _List_fromArray( 11797 _List_fromArray(
7920 [ 11798 [
7921 $elm$html$Html$text(r.customerName + ' posted on '), 11799 $rtfeldman$elm_css$Html$Styled$text(r.customerName + ' posted on '),
7922 $elm$html$Html$text(r.commentDate + ' '), 11800 $rtfeldman$elm_css$Html$Styled$text(r.commentDate + ' '),
7923 $elm$html$Html$text( 11801 $rtfeldman$elm_css$Html$Styled$text(
7924 A2($elm$core$Maybe$withDefault, '', r.commentText)), 11802 A2($elm$core$Maybe$withDefault, '', r.commentText)),
7925 $elm$html$Html$text( 11803 $rtfeldman$elm_css$Html$Styled$text(
7926 ' Stars: ' + $elm$core$String$fromInt(r.stars)) 11804 ' Stars: ' + $elm$core$String$fromInt(r.stars))
7927 ])); 11805 ]));
7928}; 11806};
@@ -7930,21 +11808,21 @@ var $author$project$Product$AddRatingStars = function (a) {
7930 return {$: 'AddRatingStars', a: a}; 11808 return {$: 'AddRatingStars', a: a};
7931}; 11809};
7932var $author$project$Product$viewStars = A2( 11810var $author$project$Product$viewStars = A2(
7933 $elm$html$Html$ul, 11811 $rtfeldman$elm_css$Html$Styled$ul,
7934 _List_Nil, 11812 _List_Nil,
7935 A2( 11813 A2(
7936 $elm$core$List$map, 11814 $elm$core$List$map,
7937 function (i) { 11815 function (i) {
7938 return A2( 11816 return A2(
7939 $elm$html$Html$button, 11817 $rtfeldman$elm_css$Html$Styled$button,
7940 _List_fromArray( 11818 _List_fromArray(
7941 [ 11819 [
7942 $elm$html$Html$Events$onClick( 11820 $rtfeldman$elm_css$Html$Styled$Events$onClick(
7943 $author$project$Product$AddRatingStars(i)) 11821 $author$project$Product$AddRatingStars(i))
7944 ]), 11822 ]),
7945 _List_fromArray( 11823 _List_fromArray(
7946 [ 11824 [
7947 $elm$html$Html$text( 11825 $rtfeldman$elm_css$Html$Styled$text(
7948 $elm$core$String$fromInt(i)) 11826 $elm$core$String$fromInt(i))
7949 ])); 11827 ]));
7950 }, 11828 },
@@ -7964,85 +11842,85 @@ var $author$project$Product$view = function (model) {
7964 var _v0 = model.pageStatus; 11842 var _v0 = model.pageStatus;
7965 if (_v0.$ === 'Loading') { 11843 if (_v0.$ === 'Loading') {
7966 return A2( 11844 return A2(
7967 $elm$html$Html$div, 11845 $rtfeldman$elm_css$Html$Styled$div,
7968 _List_Nil, 11846 _List_Nil,
7969 _List_fromArray( 11847 _List_fromArray(
7970 [ 11848 [
7971 $elm$html$Html$text( 11849 $rtfeldman$elm_css$Html$Styled$text(
7972 $author$project$Product$viewStatus($author$project$Product$Loading)) 11850 $author$project$Product$viewStatus($author$project$Product$Loading))
7973 ])); 11851 ]));
7974 } else { 11852 } else {
7975 return A2( 11853 return A2(
7976 $elm$html$Html$div, 11854 $rtfeldman$elm_css$Html$Styled$div,
7977 _List_Nil, 11855 _List_Nil,
7978 _List_fromArray( 11856 _List_fromArray(
7979 [ 11857 [
7980 A2( 11858 A2(
7981 $elm$html$Html$div, 11859 $rtfeldman$elm_css$Html$Styled$div,
7982 _List_Nil, 11860 _List_Nil,
7983 _List_fromArray( 11861 _List_fromArray(
7984 [ 11862 [
7985 $author$project$Product$viewProduct(model.listing) 11863 $author$project$Product$viewProduct(model.listing)
7986 ])), 11864 ])),
7987 A2( 11865 A2(
7988 $elm$html$Html$ul, 11866 $rtfeldman$elm_css$Html$Styled$ul,
7989 _List_Nil, 11867 _List_Nil,
7990 A2($elm$core$List$map, $author$project$Product$viewRating, model.ratings)), 11868 A2($elm$core$List$map, $author$project$Product$viewRating, model.ratings)),
7991 A2( 11869 A2(
7992 $elm$html$Html$div, 11870 $rtfeldman$elm_css$Html$Styled$div,
7993 _List_Nil, 11871 _List_Nil,
7994 _List_fromArray( 11872 _List_fromArray(
7995 [ 11873 [
7996 $elm$html$Html$text('Add Rating: ') 11874 $rtfeldman$elm_css$Html$Styled$text('Add Rating: ')
7997 ])), 11875 ])),
7998 A2( 11876 A2(
7999 $elm$html$Html$div, 11877 $rtfeldman$elm_css$Html$Styled$div,
8000 _List_Nil, 11878 _List_Nil,
8001 _List_fromArray( 11879 _List_fromArray(
8002 [ 11880 [
8003 $author$project$Product$viewStars, 11881 $author$project$Product$viewStars,
8004 A4($author$project$Product$viewInput, 'text', 'Enter Comment Text', model.ratingText, $author$project$Product$AddRatingComment), 11882 A4($author$project$Product$viewInput, 'text', 'Enter Comment Text', model.ratingText, $author$project$Product$AddRatingComment),
8005 A2( 11883 A2(
8006 $elm$html$Html$button, 11884 $rtfeldman$elm_css$Html$Styled$button,
8007 _List_fromArray( 11885 _List_fromArray(
8008 [ 11886 [
8009 $elm$html$Html$Events$onClick($author$project$Product$AddRatingPressed) 11887 $rtfeldman$elm_css$Html$Styled$Events$onClick($author$project$Product$AddRatingPressed)
8010 ]), 11888 ]),
8011 _List_fromArray( 11889 _List_fromArray(
8012 [ 11890 [
8013 $elm$html$Html$text('Submit Rating') 11891 $rtfeldman$elm_css$Html$Styled$text('Submit Rating')
8014 ])) 11892 ]))
8015 ])), 11893 ])),
8016 A2( 11894 A2(
8017 $elm$html$Html$div, 11895 $rtfeldman$elm_css$Html$Styled$div,
8018 _List_Nil, 11896 _List_Nil,
8019 _List_fromArray( 11897 _List_fromArray(
8020 [ 11898 [
8021 A2( 11899 A2(
8022 $elm$html$Html$button, 11900 $rtfeldman$elm_css$Html$Styled$button,
8023 _List_fromArray( 11901 _List_fromArray(
8024 [ 11902 [
8025 $elm$html$Html$Events$onClick($author$project$Product$AddToCartPressed) 11903 $rtfeldman$elm_css$Html$Styled$Events$onClick($author$project$Product$AddToCartPressed)
8026 ]), 11904 ]),
8027 _List_fromArray( 11905 _List_fromArray(
8028 [ 11906 [
8029 $elm$html$Html$text('Add To Cart') 11907 $rtfeldman$elm_css$Html$Styled$text('Add To Cart')
8030 ])) 11908 ]))
8031 ])), 11909 ])),
8032 A2( 11910 A2(
8033 $elm$html$Html$div, 11911 $rtfeldman$elm_css$Html$Styled$div,
8034 _List_Nil, 11912 _List_Nil,
8035 _List_fromArray( 11913 _List_fromArray(
8036 [ 11914 [
8037 A2( 11915 A2(
8038 $elm$html$Html$a, 11916 $rtfeldman$elm_css$Html$Styled$a,
8039 _List_fromArray( 11917 _List_fromArray(
8040 [ 11918 [
8041 $elm$html$Html$Attributes$href('/catalog') 11919 $rtfeldman$elm_css$Html$Styled$Attributes$href('/catalog')
8042 ]), 11920 ]),
8043 _List_fromArray( 11921 _List_fromArray(
8044 [ 11922 [
8045 $elm$html$Html$text('Back to catalog') 11923 $rtfeldman$elm_css$Html$Styled$text('Back to catalog')
8046 ])) 11924 ]))
8047 ])) 11925 ]))
8048 ])); 11926 ]));
@@ -8064,16 +11942,24 @@ var $author$project$Signup$PhoneEntered = function (a) {
8064var $author$project$Signup$UserEntered = function (a) { 11942var $author$project$Signup$UserEntered = function (a) {
8065 return {$: 'UserEntered', a: a}; 11943 return {$: 'UserEntered', a: a};
8066}; 11944};
11945var $author$project$Signup$fieldPadding = $rtfeldman$elm_css$Html$Styled$Attributes$css(
11946 _List_fromArray(
11947 [
11948 $rtfeldman$elm_css$Css$paddingTop(
11949 $rtfeldman$elm_css$Css$px(10)),
11950 $rtfeldman$elm_css$Css$paddingBottom(
11951 $rtfeldman$elm_css$Css$px(10))
11952 ]));
8067var $author$project$Signup$viewInput = F4( 11953var $author$project$Signup$viewInput = F4(
8068 function (t, p, v, toMsg) { 11954 function (t, p, v, toMsg) {
8069 return A2( 11955 return A2(
8070 $elm$html$Html$input, 11956 $author$project$Styles$loginInputField,
8071 _List_fromArray( 11957 _List_fromArray(
8072 [ 11958 [
8073 $elm$html$Html$Attributes$type_(t), 11959 $rtfeldman$elm_css$Html$Styled$Attributes$type_(t),
8074 $elm$html$Html$Attributes$placeholder(p), 11960 $rtfeldman$elm_css$Html$Styled$Attributes$placeholder(p),
8075 $elm$html$Html$Attributes$value(v), 11961 $rtfeldman$elm_css$Html$Styled$Attributes$value(v),
8076 $elm$html$Html$Events$onInput(toMsg) 11962 $rtfeldman$elm_css$Html$Styled$Events$onInput(toMsg)
8077 ]), 11963 ]),
8078 _List_Nil); 11964 _List_Nil);
8079 }); 11965 });
@@ -8095,172 +11981,208 @@ var $author$project$Signup$viewStatus = function (s) {
8095}; 11981};
8096var $author$project$Signup$view = function (model) { 11982var $author$project$Signup$view = function (model) {
8097 return A2( 11983 return A2(
8098 $elm$html$Html$div, 11984 $rtfeldman$elm_css$Html$Styled$div,
8099 _List_Nil, 11985 _List_fromArray(
11986 [
11987 $rtfeldman$elm_css$Html$Styled$Attributes$css(
11988 _List_fromArray(
11989 [
11990 $rtfeldman$elm_css$Css$margin($rtfeldman$elm_css$Css$auto),
11991 $rtfeldman$elm_css$Css$marginTop(
11992 $rtfeldman$elm_css$Css$pct(10)),
11993 $rtfeldman$elm_css$Css$padding(
11994 $rtfeldman$elm_css$Css$px(20)),
11995 $rtfeldman$elm_css$Css$width(
11996 $rtfeldman$elm_css$Css$pct(30))
11997 ]))
11998 ]),
8100 _List_fromArray( 11999 _List_fromArray(
8101 [ 12000 [
8102 A2( 12001 A2(
8103 $elm$html$Html$div, 12002 $rtfeldman$elm_css$Html$Styled$div,
8104 _List_Nil, 12003 _List_fromArray(
12004 [
12005 $author$project$Signup$fieldPadding,
12006 $rtfeldman$elm_css$Html$Styled$Attributes$css(
12007 _List_fromArray(
12008 [$author$project$Styles$bigHeading]))
12009 ]),
8105 _List_fromArray( 12010 _List_fromArray(
8106 [ 12011 [
8107 A4($author$project$Signup$viewInput, 'text', 'Enter Username', model.username, $author$project$Signup$UserEntered) 12012 $rtfeldman$elm_css$Html$Styled$text('Signup')
8108 ])), 12013 ])),
8109 A2( 12014 A2(
8110 $elm$html$Html$div, 12015 $rtfeldman$elm_css$Html$Styled$div,
8111 _List_Nil, 12016 _List_fromArray(
12017 [$author$project$Signup$fieldPadding]),
12018 _List_fromArray(
12019 [
12020 A4($author$project$Signup$viewInput, 'text', 'Username', model.username, $author$project$Signup$UserEntered)
12021 ])),
12022 A2(
12023 $rtfeldman$elm_css$Html$Styled$div,
12024 _List_fromArray(
12025 [$author$project$Signup$fieldPadding]),
8112 _List_fromArray( 12026 _List_fromArray(
8113 [ 12027 [
8114 A4($author$project$Signup$viewInput, 'password', 'Password', model.password, $author$project$Signup$PassEntered) 12028 A4($author$project$Signup$viewInput, 'password', 'Password', model.password, $author$project$Signup$PassEntered)
8115 ])), 12029 ])),
8116 A2( 12030 A2(
8117 $elm$html$Html$div, 12031 $rtfeldman$elm_css$Html$Styled$div,
8118 _List_Nil, 12032 _List_fromArray(
12033 [$author$project$Signup$fieldPadding]),
8119 _List_fromArray( 12034 _List_fromArray(
8120 [ 12035 [
8121 A4($author$project$Signup$viewInput, 'text', 'Email', model.emailId, $author$project$Signup$EmailEntered) 12036 A4($author$project$Signup$viewInput, 'text', 'Email', model.emailId, $author$project$Signup$EmailEntered)
8122 ])), 12037 ])),
8123 A2( 12038 A2(
8124 $elm$html$Html$div, 12039 $rtfeldman$elm_css$Html$Styled$div,
8125 _List_Nil, 12040 _List_fromArray(
12041 [$author$project$Signup$fieldPadding]),
8126 _List_fromArray( 12042 _List_fromArray(
8127 [ 12043 [
8128 A4($author$project$Signup$viewInput, 'text', 'Enter your Phone number', model.phoneNumber, $author$project$Signup$PhoneEntered) 12044 A4($author$project$Signup$viewInput, 'text', 'Phone Number', model.phoneNumber, $author$project$Signup$PhoneEntered)
8129 ])), 12045 ])),
8130 A2( 12046 A2(
8131 $elm$html$Html$div, 12047 $rtfeldman$elm_css$Html$Styled$div,
8132 _List_Nil, 12048 _List_fromArray(
12049 [$author$project$Signup$fieldPadding]),
8133 _List_fromArray( 12050 _List_fromArray(
8134 [ 12051 [
8135 A4( 12052 A4(
8136 $author$project$Signup$viewInput, 12053 $author$project$Signup$viewInput,
8137 'text', 12054 'text',
8138 'Enter Shipping address', 12055 'Shipping Address',
8139 A2($elm$core$Maybe$withDefault, '', model.address), 12056 A2($elm$core$Maybe$withDefault, '', model.address),
8140 $author$project$Signup$AddressEntered) 12057 $author$project$Signup$AddressEntered)
8141 ])), 12058 ])),
8142 A2( 12059 A2(
8143 $elm$html$Html$div, 12060 $rtfeldman$elm_css$Html$Styled$div,
8144 _List_Nil, 12061 _List_fromArray(
12062 [
12063 $author$project$Signup$fieldPadding,
12064 $rtfeldman$elm_css$Html$Styled$Attributes$css(
12065 _List_fromArray(
12066 [
12067 $rtfeldman$elm_css$Css$textAlign($rtfeldman$elm_css$Css$center)
12068 ]))
12069 ]),
8145 _List_fromArray( 12070 _List_fromArray(
8146 [ 12071 [
8147 A2( 12072 A2(
8148 $elm$html$Html$button, 12073 $author$project$Styles$furbyButton,
8149 _List_fromArray( 12074 _List_fromArray(
8150 [ 12075 [
8151 $elm$html$Html$Events$onClick($author$project$Signup$CreatePressed) 12076 $rtfeldman$elm_css$Html$Styled$Events$onClick($author$project$Signup$CreatePressed)
8152 ]), 12077 ]),
8153 _List_fromArray( 12078 _List_fromArray(
8154 [ 12079 [
8155 $elm$html$Html$text('Create') 12080 $rtfeldman$elm_css$Html$Styled$text('Create Account')
8156 ])) 12081 ]))
8157 ])), 12082 ])),
8158 A2( 12083 A2(
8159 $elm$html$Html$div, 12084 $rtfeldman$elm_css$Html$Styled$div,
8160 _List_Nil, 12085 _List_fromArray(
12086 [$author$project$Signup$fieldPadding]),
8161 _List_fromArray( 12087 _List_fromArray(
8162 [ 12088 [
8163 $elm$html$Html$text('Already have a account? '), 12089 $rtfeldman$elm_css$Html$Styled$text('Already have a account? '),
8164 A2( 12090 A2(
8165 $elm$html$Html$a, 12091 $rtfeldman$elm_css$Html$Styled$a,
8166 _List_fromArray( 12092 _List_fromArray(
8167 [ 12093 [
8168 $elm$html$Html$Attributes$href('/login') 12094 $rtfeldman$elm_css$Html$Styled$Attributes$href('/login')
8169 ]), 12095 ]),
8170 _List_fromArray( 12096 _List_fromArray(
8171 [ 12097 [
8172 $elm$html$Html$text('Login >') 12098 $rtfeldman$elm_css$Html$Styled$text('Login >')
8173 ])) 12099 ]))
8174 ])), 12100 ])),
8175 $elm$html$Html$text( 12101 $rtfeldman$elm_css$Html$Styled$text(
8176 $author$project$Signup$viewStatus(model.status)) 12102 $author$project$Signup$viewStatus(model.status))
8177 ])); 12103 ]));
8178}; 12104};
8179var $author$project$Main$viewLink = function (path) {
8180 return A2(
8181 $elm$html$Html$li,
8182 _List_Nil,
8183 _List_fromArray(
8184 [
8185 A2(
8186 $elm$html$Html$a,
8187 _List_fromArray(
8188 [
8189 $elm$html$Html$Attributes$href(path)
8190 ]),
8191 _List_fromArray(
8192 [
8193 $elm$html$Html$text(path)
8194 ]))
8195 ]));
8196};
8197var $author$project$Main$view = function (model) { 12105var $author$project$Main$view = function (model) {
8198 var _v0 = model.location; 12106 var _v0 = model.location;
8199 switch (_v0.$) { 12107 switch (_v0.$) {
8200 case 'LoginPage': 12108 case 'HomePage':
8201 return { 12109 return {
8202 body: _List_fromArray( 12110 body: $elm$core$List$singleton(
8203 [ 12111 $rtfeldman$elm_css$Html$Styled$toUnstyled(
8204 A2( 12112 A2(
8205 $elm$html$Html$map, 12113 $rtfeldman$elm_css$Html$Styled$div,
8206 $author$project$Main$LoginMessage, 12114 _List_Nil,
8207 $author$project$Login$view(model.loginModel)) 12115 _List_fromArray(
8208 ]), 12116 [
12117 A2(
12118 $rtfeldman$elm_css$Html$Styled$ul,
12119 _List_Nil,
12120 A2(
12121 $elm$core$List$map,
12122 function (l) {
12123 return A2(
12124 $rtfeldman$elm_css$Html$Styled$li,
12125 _List_Nil,
12126 _List_fromArray(
12127 [
12128 A2(
12129 $rtfeldman$elm_css$Html$Styled$a,
12130 _List_fromArray(
12131 [
12132 $rtfeldman$elm_css$Html$Styled$Attributes$href(l)
12133 ]),
12134 _List_fromArray(
12135 [
12136 $rtfeldman$elm_css$Html$Styled$text(l)
12137 ]))
12138 ]));
12139 },
12140 _List_fromArray(
12141 ['/login', '/catalog', '/cart'])))
12142 ])))),
8209 title: 'Login' 12143 title: 'Login'
8210 }; 12144 };
8211 case 'SignupPage': 12145 case 'LoginPage':
8212 return { 12146 return {
8213 body: _List_fromArray( 12147 body: $elm$core$List$singleton(
8214 [ 12148 $rtfeldman$elm_css$Html$Styled$toUnstyled(
8215 A2( 12149 A2(
8216 $elm$html$Html$map, 12150 $rtfeldman$elm_css$Html$Styled$map,
8217 $author$project$Main$SignupMessage, 12151 $author$project$Main$LoginMessage,
8218 $author$project$Signup$view(model.signupModel)) 12152 $author$project$Login$view(model.loginModel)))),
8219 ]), 12153 title: 'Login'
8220 title: 'Signup'
8221 }; 12154 };
8222 case 'HomePage': 12155 case 'SignupPage':
8223 return { 12156 return {
8224 body: _List_fromArray( 12157 body: $elm$core$List$singleton(
8225 [ 12158 $rtfeldman$elm_css$Html$Styled$toUnstyled(
8226 $elm$html$Html$text('The current URL is: '),
8227 A2( 12159 A2(
8228 $elm$html$Html$b, 12160 $rtfeldman$elm_css$Html$Styled$map,
8229 _List_Nil, 12161 $author$project$Main$SignupMessage,
8230 _List_fromArray( 12162 $author$project$Signup$view(model.signupModel)))),
8231 [ 12163 title: 'Signup'
8232 $elm$html$Html$text(
8233 $elm$url$Url$toString(model.url))
8234 ])),
8235 A2(
8236 $elm$html$Html$ul,
8237 _List_Nil,
8238 _List_fromArray(
8239 [
8240 $author$project$Main$viewLink('/login'),
8241 $author$project$Main$viewLink('/catalog'),
8242 $author$project$Main$viewLink('/cart'),
8243 $author$project$Main$viewLink('/signup')
8244 ]))
8245 ]),
8246 title: 'URL Interceptor'
8247 }; 12164 };
8248 case 'NotFoundPage': 12165 case 'NotFoundPage':
8249 return { 12166 return {
8250 body: _List_fromArray( 12167 body: $elm$core$List$singleton(
8251 [ 12168 $rtfeldman$elm_css$Html$Styled$toUnstyled(
8252 $elm$html$Html$text('404 - Not Found'),
8253 A2( 12169 A2(
8254 $elm$html$Html$a, 12170 $rtfeldman$elm_css$Html$Styled$div,
8255 _List_fromArray( 12171 _List_Nil,
8256 [ 12172 _List_fromArray(
8257 $elm$html$Html$Attributes$href('/') 12173 [
8258 ]), 12174 $rtfeldman$elm_css$Html$Styled$text('404 - Not Found'),
8259 _List_fromArray( 12175 A2(
8260 [ 12176 $rtfeldman$elm_css$Html$Styled$a,
8261 $elm$html$Html$text('Go back >') 12177 _List_fromArray(
8262 ])) 12178 [
8263 ]), 12179 $rtfeldman$elm_css$Html$Styled$Attributes$href('/')
12180 ]),
12181 _List_fromArray(
12182 [
12183 $rtfeldman$elm_css$Html$Styled$text('Go back >')
12184 ]))
12185 ])))),
8264 title: '404 - Not Found' 12186 title: '404 - Not Found'
8265 }; 12187 };
8266 case 'CatalogPage': 12188 case 'CatalogPage':
@@ -8269,7 +12191,7 @@ var $author$project$Main$view = function (model) {
8269 $author$project$Main$pageWrap, 12191 $author$project$Main$pageWrap,
8270 model, 12192 model,
8271 A2( 12193 A2(
8272 $elm$html$Html$map, 12194 $rtfeldman$elm_css$Html$Styled$map,
8273 $author$project$Main$CatalogMessage, 12195 $author$project$Main$CatalogMessage,
8274 $author$project$Catalog$view(model.catalogModel))), 12196 $author$project$Catalog$view(model.catalogModel))),
8275 title: 'Catalog' 12197 title: 'Catalog'
@@ -8280,11 +12202,22 @@ var $author$project$Main$view = function (model) {
8280 $author$project$Main$pageWrap, 12202 $author$project$Main$pageWrap,
8281 model, 12203 model,
8282 A2( 12204 A2(
8283 $elm$html$Html$map, 12205 $rtfeldman$elm_css$Html$Styled$map,
8284 $author$project$Main$CartMessage, 12206 $author$project$Main$CartMessage,
8285 $author$project$Cart$view(model.cartModel))), 12207 $author$project$Cart$view(model.cartModel))),
8286 title: 'Cart' 12208 title: 'Cart'
8287 }; 12209 };
12210 case 'CheckoutPage':
12211 return {
12212 body: A2(
12213 $author$project$Main$pageWrap,
12214 model,
12215 A2(
12216 $rtfeldman$elm_css$Html$Styled$map,
12217 $author$project$Main$CheckoutMessage,
12218 $author$project$Checkout$view(model.checkoutModel))),
12219 title: 'Checkout'
12220 };
8288 default: 12221 default:
8289 var item = _v0.a; 12222 var item = _v0.a;
8290 return { 12223 return {
@@ -8292,7 +12225,7 @@ var $author$project$Main$view = function (model) {
8292 $author$project$Main$pageWrap, 12225 $author$project$Main$pageWrap,
8293 model, 12226 model,
8294 A2( 12227 A2(
8295 $elm$html$Html$map, 12228 $rtfeldman$elm_css$Html$Styled$map,
8296 $author$project$Main$ProductMessage, 12229 $author$project$Main$ProductMessage,
8297 $author$project$Product$view(model.productModel))), 12230 $author$project$Product$view(model.productModel))),
8298 title: 'Product ' + $elm$core$String$fromInt(item) 12231 title: 'Product ' + $elm$core$String$fromInt(item)
diff --git a/frontend/src/Cart.elm b/frontend/src/Cart.elm
index 58fb72e..44d5a0d 100644
--- a/frontend/src/Cart.elm
+++ b/frontend/src/Cart.elm
@@ -2,9 +2,10 @@ module Cart exposing (..)
2 2
3import Browser 3import Browser
4import Browser.Navigation as Nav 4import Browser.Navigation as Nav
5import Html exposing (..) 5import Html
6import Html.Attributes exposing (..) 6import Html.Styled exposing (..)
7import Html.Events exposing (..) 7import Html.Styled.Attributes exposing (..)
8import Html.Styled.Events exposing (..)
8import Http 9import Http
9import Json.Decode as D 10import Json.Decode as D
10import Json.Encode as Encode 11import Json.Encode as Encode
diff --git a/frontend/src/Catalog.elm b/frontend/src/Catalog.elm
index d00cb92..5b233f2 100644
--- a/frontend/src/Catalog.elm
+++ b/frontend/src/Catalog.elm
@@ -2,15 +2,16 @@ module Catalog exposing (..)
2 2
3import Browser 3import Browser
4import Browser.Navigation as Nav 4import Browser.Navigation as Nav
5import Html exposing (..) 5import Css exposing (..)
6import Html.Attributes exposing (..) 6import Html
7import Html.Events exposing (..) 7import Html.Styled exposing (..)
8import Html.Styled.Attributes exposing (..)
9import Html.Styled.Events exposing (..)
8import Http 10import Http
9import Json.Decode as D 11import Json.Decode as D
10import Json.Encode as Encode 12import Json.Encode as Encode
13import Styles exposing (..)
11import Tuple exposing (..) 14import Tuple exposing (..)
12import Url
13import Url.Parser as P exposing ((</>), Parser, int, oneOf, s, string)
14import Utils exposing (..) 15import Utils exposing (..)
15 16
16 17
@@ -37,7 +38,7 @@ type alias Filters =
37 38
38defaultFilters : Filters 39defaultFilters : Filters
39defaultFilters = 40defaultFilters =
40 Filters ( -1, 10000 ) ( 0, 5 ) 41 Filters ( -1, 100000 ) ( 0, 5 )
41 42
42 43
43type alias Model = 44type alias Model =
@@ -199,18 +200,26 @@ viewFilters model =
199 inp = 200 inp =
200 Maybe.withDefault 0 << String.toFloat 201 Maybe.withDefault 0 << String.toFloat
201 in 202 in
202 div [] 203 div
203 [ div [] 204 []
204 [ text "Price" 205 [ div
205 , select [ onInput (ChangePriceLower << inp) ] (viewRange 0 priceRange) 206 [ css
207 [ bigHeading
208 , paddingBottom (px 12)
209 ]
210 ]
211 [ text "Filters" ]
212 , div []
213 [ div [] [ text "Price" ]
214 , furbySelect [ onInput (ChangePriceLower << inp), style "appearance" "none" ] (viewRange 0 priceRange)
206 , text "to" 215 , text "to"
207 , select [ onInput (ChangePriceUpper << inp) ] (viewRange 50000 priceRange) 216 , furbySelect [ onInput (ChangePriceUpper << inp), style "appearance" "none" ] (viewRange 50000 priceRange)
208 ] 217 ]
209 , div [] 218 , div []
210 [ text "Rating" 219 [ div [] [ text "Rating" ]
211 , select [ onInput (ChangeRatingLower << inp) ] (viewRange 1 ratingRange) 220 , furbySelect [ onInput (ChangeRatingLower << inp), style "appearance" "none" ] (viewRange 1 ratingRange)
212 , text "to" 221 , text "to"
213 , select [ onInput (ChangeRatingUpper << inp) ] (viewRange 5 ratingRange) 222 , furbySelect [ onInput (ChangeRatingUpper << inp), style "appearance" "none" ] (viewRange 5 ratingRange)
214 ] 223 ]
215 ] 224 ]
216 225
@@ -234,8 +243,25 @@ view model =
234 div [] [ text <| viewStatus Loading ] 243 div [] [ text <| viewStatus Loading ]
235 244
236 _ -> 245 _ ->
237 div [] 246 div
238 [ div [] [ viewFilters model ] 247 [ css [ padding (px 40) ] ]
239 , ul [] 248 [ div
240 (filterProducts model |> List.map viewProduct) 249 [ css
250 [ float left
251 , Css.width (pct 20)
252 ]
253 ]
254 [ viewFilters model ]
255 , div
256 [ css
257 [ float left
258 , Css.width (pct 80)
259 ]
260 ]
261 [ div [ css [ bigHeading ] ] [ text "Products" ]
262 , ul
263 [ css [ padding (px 0) ]
264 ]
265 (filterProducts model |> List.map viewProduct)
266 ]
241 ] 267 ]
diff --git a/frontend/src/Checkout.elm b/frontend/src/Checkout.elm
index c60da0d..4df20d8 100644
--- a/frontend/src/Checkout.elm
+++ b/frontend/src/Checkout.elm
@@ -2,9 +2,10 @@ module Checkout exposing (..)
2 2
3import Browser 3import Browser
4import Browser.Navigation as Nav 4import Browser.Navigation as Nav
5import Html exposing (..) 5import Html
6import Html.Attributes exposing (..) 6import Html.Styled exposing (..)
7import Html.Events exposing (..) 7import Html.Styled.Attributes exposing (..)
8import Html.Styled.Events exposing (..)
8import Http 9import Http
9import Json.Decode as D 10import Json.Decode as D
10import Json.Encode as Encode 11import Json.Encode as Encode
diff --git a/frontend/src/Icons.elm b/frontend/src/Icons.elm
new file mode 100644
index 0000000..d3b862f
--- /dev/null
+++ b/frontend/src/Icons.elm
@@ -0,0 +1,15 @@
1module Icons exposing (..)
2
3import FeatherIcons exposing (toHtml)
4import Html
5import Html.Styled exposing (..)
6import Html.Styled.Attributes exposing (..)
7import Html.Styled.Events exposing (..)
8
9
10convert =
11 Html.Styled.fromUnstyled << toHtml []
12
13
14loginIcon =
15 convert FeatherIcons.logIn
diff --git a/frontend/src/Login.elm b/frontend/src/Login.elm
index dd168f0..87657bb 100644
--- a/frontend/src/Login.elm
+++ b/frontend/src/Login.elm
@@ -2,11 +2,15 @@ module Login exposing (..)
2 2
3import Browser 3import Browser
4import Browser.Navigation as Nav 4import Browser.Navigation as Nav
5import Html exposing (..) 5import Css exposing (..)
6import Html.Attributes exposing (..) 6import Html
7import Html.Events exposing (..) 7import Html.Styled exposing (..)
8import Html.Styled.Attributes exposing (..)
9import Html.Styled.Events exposing (..)
8import Http 10import Http
11import Icons exposing (..)
9import Json.Encode as Encode 12import Json.Encode as Encode
13import Styles exposing (..)
10import Url 14import Url
11import Url.Parser as P exposing ((</>), Parser, int, oneOf, s, string) 15import Url.Parser as P exposing ((</>), Parser, int, oneOf, s, string)
12 16
@@ -91,7 +95,7 @@ viewStatus : LoginStatus -> String
91viewStatus ls = 95viewStatus ls =
92 case ls of 96 case ls of
93 NotLoggedIn -> 97 NotLoggedIn ->
94 "Not Logged In" 98 ""
95 99
96 InvalidLogin -> 100 InvalidLogin ->
97 "Invalid Login" 101 "Invalid Login"
@@ -105,15 +109,30 @@ viewStatus ls =
105 109
106viewInput : String -> String -> String -> (String -> msg) -> Html msg 110viewInput : String -> String -> String -> (String -> msg) -> Html msg
107viewInput t p v toMsg = 111viewInput t p v toMsg =
108 input [ type_ t, placeholder p, value v, onInput toMsg ] [] 112 loginInputField [ type_ t, placeholder p, value v, onInput toMsg ] []
113
114
115fieldPadding =
116 css
117 [ paddingTop (px 10)
118 , paddingBottom (px 10)
119 ]
109 120
110 121
111view : Model -> Html Msg 122view : Model -> Html Msg
112view model = 123view model =
113 div [] 124 div
114 [ div [] [ viewInput "text" "Enter name here" model.username UserEntered ] 125 [ css
115 , div [] [ viewInput "password" "Password" model.password PassEntered ] 126 [ margin auto
116 , div [] [ button [ onClick LoginPressed ] [ text "Login" ] ] 127 , marginTop (pct 10)
117 , div [] [ text (viewStatus model.loginStatus) ] 128 , padding (px 20)
118 , div [] [ text "Don't have an account? ", a [ href "/signup" ] [ text "Register now!" ] ] 129 , Css.width (pct 30)
130 ]
131 ]
132 [ div [ fieldPadding, css [ bigHeading ] ] [ text "Login" ]
133 , div [ fieldPadding ] [ viewInput "text" "Enter name here" model.username UserEntered ]
134 , div [ fieldPadding ] [ viewInput "password" "Password" model.password PassEntered ]
135 , div [ css [ textAlign center ], fieldPadding ] [ furbyButton [ onClick LoginPressed ] [ text "Login" ] ]
136 , div [ css [ textAlign center ] ] [ text (viewStatus model.loginStatus) ]
137 , div [ fieldPadding ] [ text "Don't have an account? ", a [ href "/signup" ] [ text "Register now!" ] ]
119 ] 138 ]
diff --git a/frontend/src/Main.elm b/frontend/src/Main.elm
index f1883a1..ea80921 100644
--- a/frontend/src/Main.elm
+++ b/frontend/src/Main.elm
@@ -5,14 +5,17 @@ import Browser.Navigation as Nav
5import Cart 5import Cart
6import Catalog 6import Catalog
7import Checkout 7import Checkout
8import Html exposing (..) 8import Css exposing (..)
9import Html.Attributes exposing (..) 9import Html
10import Html.Events exposing (..) 10import Html.Styled exposing (..)
11import Html.Styled.Attributes exposing (..)
12import Html.Styled.Events exposing (..)
11import Http 13import Http
12import Json.Encode as Encode 14import Json.Encode as Encode
13import Login 15import Login
14import Product 16import Product
15import Signup 17import Signup
18import Styles exposing (..)
16import Url 19import Url
17import Url.Parser as P exposing ((</>), Parser, int, oneOf, s, string) 20import Url.Parser as P exposing ((</>), Parser, int, oneOf, s, string)
18 21
@@ -276,56 +279,93 @@ subscriptions _ =
276view : Model -> Browser.Document Msg 279view : Model -> Browser.Document Msg
277view model = 280view model =
278 case model.location of 281 case model.location of
282 HomePage ->
283 { title = "Login"
284 , body =
285 -- model.loginModel
286 -- |> Login.view
287 -- |> Html.Styled.map LoginMessage
288 -- |> toUnstyled
289 -- |> List.singleton
290 div []
291 [ ul []
292 (List.map
293 (\l ->
294 li []
295 [ a [ href l ] [ text l ] ]
296 )
297 [ "/login", "/catalog", "/cart" ]
298 )
299 ]
300 |> toUnstyled
301 |> List.singleton
302 }
303
279 LoginPage -> 304 LoginPage ->
280 { title = "Login" 305 { title = "Login"
281 , body = [ Html.map LoginMessage (Login.view model.loginModel) ] 306 , body =
307 model.loginModel
308 |> Login.view
309 |> Html.Styled.map LoginMessage
310 |> toUnstyled
311 |> List.singleton
282 } 312 }
283 313
284 SignupPage -> 314 SignupPage ->
285 { title = "Signup" 315 { title = "Signup"
286 , body = [ Html.map SignupMessage (Signup.view model.signupModel) ]
287 }
288
289 HomePage ->
290 { title = "URL Interceptor"
291 , body = 316 , body =
292 [ text "The current URL is: " 317 model.signupModel
293 , b [] [ text (Url.toString model.url) ] 318 |> Signup.view
294 , ul [] 319 |> Html.Styled.map SignupMessage
295 [ viewLink "/login" 320 |> toUnstyled
296 , viewLink "/catalog" 321 |> List.singleton
297 , viewLink "/cart"
298 , viewLink "/signup"
299 ]
300 ]
301 } 322 }
302 323
303 NotFoundPage -> 324 NotFoundPage ->
304 { title = "404 - Not Found" 325 { title = "404 - Not Found"
305 , body = 326 , body =
306 [ text "404 - Not Found" 327 div []
307 , a [ href "/" ] [ text "Go back >" ] 328 [ text "404 - Not Found"
308 ] 329 , a [ href "/" ] [ text "Go back >" ]
330 ]
331 |> toUnstyled
332 |> List.singleton
309 } 333 }
310 334
311 CatalogPage -> 335 CatalogPage ->
312 { title = "Catalog" 336 { title = "Catalog"
313 , body = pageWrap model (Html.map CatalogMessage (Catalog.view model.catalogModel)) 337 , body =
338 model.catalogModel
339 |> Catalog.view
340 |> Html.Styled.map CatalogMessage
341 |> pageWrap model
314 } 342 }
315 343
316 CartPage -> 344 CartPage ->
317 { title = "Cart" 345 { title = "Cart"
318 , body = pageWrap model (Html.map CartMessage (Cart.view model.cartModel)) 346 , body =
347 model.cartModel
348 |> Cart.view
349 |> Html.Styled.map CartMessage
350 |> pageWrap model
319 } 351 }
320 352
321 CheckoutPage -> 353 CheckoutPage ->
322 { title = "Checkout" 354 { title = "Checkout"
323 , body = pageWrap model (Html.map CheckoutMessage (Checkout.view model.checkoutModel)) 355 , body =
356 model.checkoutModel
357 |> Checkout.view
358 |> Html.Styled.map CheckoutMessage
359 |> pageWrap model
324 } 360 }
325 361
326 ProductPage item -> 362 ProductPage item ->
327 { title = "Product " ++ String.fromInt item 363 { title = "Product " ++ String.fromInt item
328 , body = pageWrap model (Html.map ProductMessage (Product.view model.productModel)) 364 , body =
365 model.productModel
366 |> Product.view
367 |> Html.Styled.map ProductMessage
368 |> pageWrap model
329 } 369 }
330 370
331 371
@@ -333,36 +373,49 @@ viewHeader : Model -> Html Msg
333viewHeader model = 373viewHeader model =
334 let 374 let
335 links = 375 links =
336 [ ( "Home", "/" ) 376 [ ( "Catalog", "/catalog" )
337 , ( "Catalog", "/catalog" )
338 , ( "Cart", "/cart" ) 377 , ( "Cart", "/cart" )
339 ] 378 ]
340 in 379 in
341 div [] 380 div
381 [ css
382 [ padding (px 40)
383 , paddingTop (px 3)
384 , paddingBottom (px 3)
385 , textAlign left
386 , backgroundColor theme.secondary
387 ]
388 ]
342 [ List.map 389 [ List.map
343 (\( name, loc ) -> 390 (\( name, loc ) ->
344 li [] 391 li [ css [ display inline ] ]
345 [ a [ href loc ] [ text name ] 392 [ headerLink [ href loc ] [ text name ]
346 ] 393 ]
347 ) 394 )
348 links 395 links
349 ++ [ if model.loginModel.loginStatus /= Login.LoggedIn then 396 ++ [ if model.loginModel.loginStatus /= Login.LoggedIn then
350 li [] [ a [ href "/login" ] [ text "Login" ] ] 397 li [ css [ display inline ] ] [ headerLink [ href "/login" ] [ text "Login" ] ]
351 398
352 else 399 else
353 button [ onClick LogoutPressed ] [ text "Logout" ] 400 furbyButton [ onClick LogoutPressed ] [ text "Logout" ]
354 ] 401 ]
355 |> ul [] 402 |> ul
403 [ css
404 [ listStyle Css.none
405 , padding (px 0)
406 ]
407 ]
356 ] 408 ]
357 409
358 410
359pageWrap : Model -> Html Msg -> List (Html Msg) 411pageWrap : Model -> Html Msg -> List (Html.Html Msg)
360pageWrap model page = 412pageWrap model page =
361 [ div [] 413 div []
362 [ viewHeader model 414 [ viewHeader model
363 , page 415 , page
364 ] 416 ]
365 ] 417 |> toUnstyled
418 |> List.singleton
366 419
367 420
368viewLink : String -> Html msg 421viewLink : String -> Html msg
diff --git a/frontend/src/Product.elm b/frontend/src/Product.elm
index 0ea0ce1..b97a847 100644
--- a/frontend/src/Product.elm
+++ b/frontend/src/Product.elm
@@ -2,14 +2,16 @@ module Product exposing (..)
2 2
3import Browser 3import Browser
4import Browser.Navigation as Nav 4import Browser.Navigation as Nav
5import Html exposing (..) 5import Html
6import Html.Attributes exposing (..) 6import Html.Styled exposing (..)
7import Html.Events exposing (..) 7import Html.Styled.Attributes exposing (..)
8import Html.Styled.Events exposing (..)
8import Http 9import Http
9import Json.Decode as D 10import Json.Decode as D
10import Json.Encode as Encode 11import Json.Encode as Encode
11import Url 12import Url
12import Url.Parser as P exposing ((</>), Parser, int, oneOf, s, string) 13import Url.Parser as P exposing ((</>), Parser, int, oneOf, s, string)
14import Utils exposing (..)
13 15
14 16
15type SubmitStatus 17type SubmitStatus
@@ -25,11 +27,13 @@ type alias Product =
25 , kind : Maybe String 27 , kind : Maybe String
26 , price : Float 28 , price : Float
27 , description : Maybe String 29 , description : Maybe String
30 , src : String
31 , iosSrc : String
28 } 32 }
29 33
30 34
31emptyProduct = 35emptyProduct =
32 Product -1 "" Nothing 0 Nothing 36 Product -1 "" Nothing 0 Nothing "" ""
33 37
34 38
35type alias Rating = 39type alias Rating =
@@ -140,12 +144,14 @@ update msg model =
140 144
141decodeProduct : D.Decoder Product 145decodeProduct : D.Decoder Product
142decodeProduct = 146decodeProduct =
143 D.map5 Product 147 D.map7 Product
144 (D.field "id" D.int) 148 (D.field "id" D.int)
145 (D.field "name" D.string) 149 (D.field "name" D.string)
146 (D.field "kind" (D.nullable D.string)) 150 (D.field "kind" (D.nullable D.string))
147 (D.field "price" D.float) 151 (D.field "price" D.float)
148 (D.field "description" (D.nullable D.string)) 152 (D.field "description" (D.nullable D.string))
153 (D.field "src" D.string)
154 (D.field "ios_src" D.string)
149 155
150 156
151decodeRating : D.Decoder Rating 157decodeRating : D.Decoder Rating
@@ -246,10 +252,21 @@ viewStatus s =
246viewProduct : Product -> Html Msg 252viewProduct : Product -> Html Msg
247viewProduct p = 253viewProduct p =
248 div [] 254 div []
249 [ text p.name 255 [ div [] [ text p.name ]
250 , text <| Maybe.withDefault "" p.kind 256 , div [] [ text <| Maybe.withDefault "" p.kind ]
251 , text <| Maybe.withDefault "" p.description 257 , div [] [ text <| Maybe.withDefault "" p.description ]
252 , text <| String.fromFloat p.price 258 , div [] [ text <| String.fromFloat p.price ]
259 , div []
260 [ modelViewer
261 [ cameraControls
262 , autoRotate
263 , arSrc p.src
264 , arIosSrc p.iosSrc
265 , loading "eager"
266 , arModes "webxr"
267 ]
268 []
269 ]
253 ] 270 ]
254 271
255 272
diff --git a/frontend/src/Signup.elm b/frontend/src/Signup.elm
index 30794e7..028af9c 100644
--- a/frontend/src/Signup.elm
+++ b/frontend/src/Signup.elm
@@ -2,11 +2,14 @@ module Signup exposing (..)
2 2
3import Browser 3import Browser
4import Browser.Navigation as Nav 4import Browser.Navigation as Nav
5import Html exposing (..) 5import Css exposing (..)
6import Html.Attributes exposing (..) 6import Html
7import Html.Events exposing (..) 7import Html.Styled exposing (..)
8import Html.Styled.Attributes exposing (..)
9import Html.Styled.Events exposing (..)
8import Http 10import Http
9import Json.Encode as Encode 11import Json.Encode as Encode
12import Styles exposing (..)
10import Url 13import Url
11import Url.Parser as P exposing ((</>), Parser, int, oneOf, s, string) 14import Url.Parser as P exposing ((</>), Parser, int, oneOf, s, string)
12 15
@@ -178,19 +181,41 @@ viewStatus s =
178 181
179viewInput : String -> String -> String -> (String -> msg) -> Html msg 182viewInput : String -> String -> String -> (String -> msg) -> Html msg
180viewInput t p v toMsg = 183viewInput t p v toMsg =
181 input [ type_ t, placeholder p, value v, onInput toMsg ] [] 184 loginInputField [ type_ t, placeholder p, value v, onInput toMsg ] []
185
186
187fieldPadding =
188 css
189 [ paddingTop (px 10)
190 , paddingBottom (px 10)
191 ]
182 192
183 193
184view : Model -> Html Msg 194view : Model -> Html Msg
185view model = 195view model =
186 div [] 196 div
187 [ div [] [ viewInput "text" "Enter Username" model.username UserEntered ] 197 [ css
188 , div [] [ viewInput "password" "Password" model.password PassEntered ] 198 [ margin auto
189 , div [] [ viewInput "text" "Email" model.emailId EmailEntered ] 199 , marginTop (pct 10)
190 , div [] [ viewInput "text" "Enter your Phone number" model.phoneNumber PhoneEntered ] 200 , padding (px 20)
191 , div [] [ viewInput "text" "Enter Shipping address" (Maybe.withDefault "" model.address) AddressEntered ] 201 , Css.width (pct 30)
192 , div [] [ button [ onClick CreatePressed ] [ text "Create" ] ] 202 ]
193 , div [] 203 ]
204 [ div [ fieldPadding, css [ bigHeading ] ] [ text "Signup" ]
205 , div [ fieldPadding ] [ viewInput "text" "Username" model.username UserEntered ]
206 , div [ fieldPadding ] [ viewInput "password" "Password" model.password PassEntered ]
207 , div [ fieldPadding ] [ viewInput "text" "Email" model.emailId EmailEntered ]
208 , div [ fieldPadding ] [ viewInput "text" "Phone Number" model.phoneNumber PhoneEntered ]
209 , div [ fieldPadding ] [ viewInput "text" "Shipping Address" (Maybe.withDefault "" model.address) AddressEntered ]
210 , div
211 [ fieldPadding
212 , css [ textAlign center ]
213 ]
214 [ furbyButton
215 [ onClick CreatePressed ]
216 [ text "Create Account" ]
217 ]
218 , div [ fieldPadding ]
194 [ text "Already have a account? " 219 [ text "Already have a account? "
195 , a [ href "/login" ] [ text "Login >" ] 220 , a [ href "/login" ] [ text "Login >" ]
196 ] 221 ]
diff --git a/frontend/src/Styles.elm b/frontend/src/Styles.elm
new file mode 100644
index 0000000..36f2a81
--- /dev/null
+++ b/frontend/src/Styles.elm
@@ -0,0 +1,104 @@
1module Styles exposing (..)
2
3import Css exposing (..)
4import Html
5import Html.Styled exposing (..)
6import Html.Styled.Attributes exposing (..)
7import Html.Styled.Events exposing (..)
8
9
10type alias Theme =
11 { primary : Color
12 , secondary : Color
13 , bad : Color
14 , fg : Color
15 , bg : Color
16 , fgLight : Color
17 , bgLight : Color
18 }
19
20
21theme : Theme
22theme =
23 Theme
24 (hex "fedbd0")
25 -- primary
26 (hex "feeae6")
27 -- secondary
28 (hex "ff0000")
29 -- bad
30 (hex "442c2e")
31 -- fg
32 (hex "ffffff")
33 -- bg
34 (hex "442c2e")
35 -- fgLight
36 (hex "feeae6")
37
38
39
40-- bgLight
41
42
43headerLink : List (Attribute msg) -> List (Html msg) -> Html msg
44headerLink =
45 styled a
46 [ color theme.fgLight
47 , padding (px 12)
48 , textDecoration Css.none
49 , hover
50 [ backgroundColor theme.secondary
51 , textDecoration underline
52 ]
53 ]
54
55
56furbyButton : List (Attribute msg) -> List (Html msg) -> Html msg
57furbyButton =
58 styled button
59 [ margin (px 12)
60 , color theme.fg
61 , Css.height (px 40)
62 , border (px 0)
63 , padding2 (px 6) (px 12)
64 , backgroundColor theme.primary
65 , hover
66 [ backgroundColor theme.secondary
67 , color theme.fg
68 , margin (px 12)
69 ]
70 ]
71
72
73furbySelect : List (Attribute msg) -> List (Html msg) -> Html msg
74furbySelect =
75 styled select
76 [ margin (px 6)
77 , color theme.fg
78 , border (px 0)
79 , borderBottom3 (px 2) solid theme.bgLight
80 , textAlign right
81 , padding2 (px 3) (px 3)
82 , backgroundColor theme.bg
83 , hover
84 [ borderBottom3 (px 2) solid theme.fg
85 ]
86 ]
87
88
89loginInputField : List (Attribute msg) -> List (Html msg) -> Html msg
90loginInputField =
91 styled input
92 [ Css.width (pct 100)
93 , color theme.fg
94 , border (px 0)
95 , borderBottom3 (px 1) solid theme.bgLight
96 , focus
97 [ borderBottom3 (px 2) solid theme.fg
98 ]
99 ]
100
101
102bigHeading : Style
103bigHeading =
104 fontSize (px 24)
diff --git a/frontend/src/Utils.elm b/frontend/src/Utils.elm
index 825e4b7..b6c4bd5 100644
--- a/frontend/src/Utils.elm
+++ b/frontend/src/Utils.elm
@@ -1,5 +1,10 @@
1module Utils exposing (..) 1module Utils exposing (..)
2 2
3import Html
4import Html.Styled exposing (..)
5import Html.Styled.Attributes exposing (..)
6import Html.Styled.Events exposing (..)
7
3 8
4between : ( Float, Float ) -> Float -> Bool 9between : ( Float, Float ) -> Float -> Bool
5between ( l, u ) v = 10between ( l, u ) v =
@@ -13,3 +18,43 @@ range start stop step =
13 18
14 else 19 else
15 start :: range (start + step) stop step 20 start :: range (start + step) stop step
21
22
23modelViewer : List (Attribute msg) -> List (Html msg) -> Html msg
24modelViewer attributes children =
25 node "model-viewer" attributes children
26
27
28cameraControls : Attribute msg
29cameraControls =
30 attribute "camera-controls" ""
31
32
33autoRotate : Attribute msg
34autoRotate =
35 attribute "auto-rotate" ""
36
37
38ar : Attribute msg
39ar =
40 attribute "ar" ""
41
42
43arSrc : String -> Attribute msg
44arSrc src =
45 attribute "src" src
46
47
48arIosSrc : String -> Attribute msg
49arIosSrc src =
50 attribute "ios-src" src
51
52
53arModes : String -> Attribute msg
54arModes mode =
55 attribute "ar-modes" mode
56
57
58loading : String -> Attribute msg
59loading mode =
60 attribute "loading" mode