enzostvs HF staff commited on
Commit
17aecfb
β€’
1 Parent(s): b34e9b1

refacto models API, now connected to hugging face api + wip submit model through lora studio

Browse files
package-lock.json CHANGED
@@ -9,6 +9,7 @@
9
  "version": "0.0.1",
10
  "dependencies": {
11
  "@iconify/svelte": "^3.1.4",
 
12
  "@sveltejs/adapter-node": "^1.3.1",
13
  "svelte-infinite-scroll": "^2.0.1"
14
  },
@@ -16,6 +17,7 @@
16
  "@fontsource/fira-mono": "^4.5.10",
17
  "@neoconfetti/svelte": "^1.0.0",
18
  "@sveltejs/adapter-auto": "^2.0.0",
 
19
  "@sveltejs/kit": "^1.27.4",
20
  "@types/cookie": "^0.5.1",
21
  "@typescript-eslint/eslint-plugin": "^6.0.0",
@@ -27,6 +29,7 @@
27
  "postcss": "^8.4.32",
28
  "prettier": "^3.0.0",
29
  "prettier-plugin-svelte": "^3.0.0",
 
30
  "sass": "^1.69.5",
31
  "svelte": "^4.2.7",
32
  "svelte-check": "^3.6.0",
@@ -69,6 +72,16 @@
69
  "node": ">=6.0.0"
70
  }
71
  },
 
 
 
 
 
 
 
 
 
 
72
  "node_modules/@esbuild/android-arm": {
73
  "version": "0.18.20",
74
  "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
@@ -521,6 +534,456 @@
521
  "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",
522
  "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="
523
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
524
  "node_modules/@jridgewell/gen-mapping": {
525
  "version": "0.3.3",
526
  "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
@@ -610,6 +1073,68 @@
610
  "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.24.tgz",
611
  "integrity": "sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ=="
612
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
  "node_modules/@rollup/plugin-commonjs": {
614
  "version": "25.0.7",
615
  "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz",
@@ -779,6 +1304,17 @@
779
  "@sveltejs/kit": "^1.0.0"
780
  }
781
  },
 
 
 
 
 
 
 
 
 
 
 
782
  "node_modules/@sveltejs/kit": {
783
  "version": "1.28.0",
784
  "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.28.0.tgz",
@@ -1421,6 +1957,19 @@
1421
  "periscopic": "^3.1.0"
1422
  }
1423
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
1424
  "node_modules/color-convert": {
1425
  "version": "2.0.1",
1426
  "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
@@ -1439,6 +1988,16 @@
1439
  "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
1440
  "dev": true
1441
  },
 
 
 
 
 
 
 
 
 
 
1442
  "node_modules/commander": {
1443
  "version": "4.1.1",
1444
  "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
@@ -1552,6 +2111,15 @@
1552
  "node": ">=8"
1553
  }
1554
  },
 
 
 
 
 
 
 
 
 
1555
  "node_modules/devalue": {
1556
  "version": "4.3.2",
1557
  "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz",
@@ -2148,6 +2716,18 @@
2148
  "node": ">= 4"
2149
  }
2150
  },
 
 
 
 
 
 
 
 
 
 
 
 
2151
  "node_modules/immutable": {
2152
  "version": "4.3.4",
2153
  "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz",
@@ -2203,6 +2783,12 @@
2203
  "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
2204
  "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
2205
  },
 
 
 
 
 
 
2206
  "node_modules/is-binary-path": {
2207
  "version": "2.1.0",
2208
  "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
@@ -2961,6 +3547,22 @@
2961
  "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0"
2962
  }
2963
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2964
  "node_modules/punycode": {
2965
  "version": "2.3.1",
2966
  "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
@@ -3171,6 +3773,46 @@
3171
  "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz",
3172
  "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ=="
3173
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3174
  "node_modules/shebang-command": {
3175
  "version": "2.0.0",
3176
  "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -3192,6 +3834,15 @@
3192
  "node": ">=8"
3193
  }
3194
  },
 
 
 
 
 
 
 
 
 
3195
  "node_modules/sirv": {
3196
  "version": "2.0.3",
3197
  "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.3.tgz",
@@ -3426,6 +4077,18 @@
3426
  "resolved": "https://registry.npmjs.org/svelte-infinite-scroll/-/svelte-infinite-scroll-2.0.1.tgz",
3427
  "integrity": "sha512-goTHCfOHRDCs8C5MeSuIc6LlAQ8zVQ+M4Y3LyvrDjx5rqSSxSrdCuQwIyWYNcO6j6/mnqRro3QB64ClBzfn+Wg=="
3428
  },
 
 
 
 
 
 
 
 
 
 
 
 
3429
  "node_modules/svelte-preprocess": {
3430
  "version": "5.1.1",
3431
  "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.1.1.tgz",
@@ -3817,6 +4480,19 @@
3817
  }
3818
  }
3819
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
3820
  "node_modules/vitefu": {
3821
  "version": "0.2.5",
3822
  "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz",
 
9
  "version": "0.0.1",
10
  "dependencies": {
11
  "@iconify/svelte": "^3.1.4",
12
+ "@prisma/client": "^5.7.1",
13
  "@sveltejs/adapter-node": "^1.3.1",
14
  "svelte-infinite-scroll": "^2.0.1"
15
  },
 
17
  "@fontsource/fira-mono": "^4.5.10",
18
  "@neoconfetti/svelte": "^1.0.0",
19
  "@sveltejs/adapter-auto": "^2.0.0",
20
+ "@sveltejs/enhanced-img": "^0.1.7",
21
  "@sveltejs/kit": "^1.27.4",
22
  "@types/cookie": "^0.5.1",
23
  "@typescript-eslint/eslint-plugin": "^6.0.0",
 
29
  "postcss": "^8.4.32",
30
  "prettier": "^3.0.0",
31
  "prettier-plugin-svelte": "^3.0.0",
32
+ "prisma": "^5.7.1",
33
  "sass": "^1.69.5",
34
  "svelte": "^4.2.7",
35
  "svelte-check": "^3.6.0",
 
72
  "node": ">=6.0.0"
73
  }
74
  },
75
+ "node_modules/@emnapi/runtime": {
76
+ "version": "0.44.0",
77
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-0.44.0.tgz",
78
+ "integrity": "sha512-ZX/etZEZw8DR7zAB1eVQT40lNo0jeqpb6dCgOvctB6FIQ5PoXfMuNY8+ayQfu8tNQbAB8gQWSSJupR8NxeiZXw==",
79
+ "dev": true,
80
+ "optional": true,
81
+ "dependencies": {
82
+ "tslib": "^2.4.0"
83
+ }
84
+ },
85
  "node_modules/@esbuild/android-arm": {
86
  "version": "0.18.20",
87
  "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
 
534
  "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",
535
  "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg=="
536
  },
537
+ "node_modules/@img/sharp-darwin-arm64": {
538
+ "version": "0.33.1",
539
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.1.tgz",
540
+ "integrity": "sha512-esr2BZ1x0bo+wl7Gx2hjssYhjrhUsD88VQulI0FrG8/otRQUOxLWHMBd1Y1qo2Gfg2KUvXNpT0ASnV9BzJCexw==",
541
+ "cpu": [
542
+ "arm64"
543
+ ],
544
+ "dev": true,
545
+ "optional": true,
546
+ "os": [
547
+ "darwin"
548
+ ],
549
+ "engines": {
550
+ "glibc": ">=2.26",
551
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
552
+ "npm": ">=9.6.5",
553
+ "pnpm": ">=7.1.0",
554
+ "yarn": ">=3.2.0"
555
+ },
556
+ "funding": {
557
+ "url": "https://opencollective.com/libvips"
558
+ },
559
+ "optionalDependencies": {
560
+ "@img/sharp-libvips-darwin-arm64": "1.0.0"
561
+ }
562
+ },
563
+ "node_modules/@img/sharp-darwin-x64": {
564
+ "version": "0.33.1",
565
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.1.tgz",
566
+ "integrity": "sha512-YrnuB3bXuWdG+hJlXtq7C73lF8ampkhU3tMxg5Hh+E7ikxbUVOU9nlNtVTloDXz6pRHt2y2oKJq7DY/yt+UXYw==",
567
+ "cpu": [
568
+ "x64"
569
+ ],
570
+ "dev": true,
571
+ "optional": true,
572
+ "os": [
573
+ "darwin"
574
+ ],
575
+ "engines": {
576
+ "glibc": ">=2.26",
577
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
578
+ "npm": ">=9.6.5",
579
+ "pnpm": ">=7.1.0",
580
+ "yarn": ">=3.2.0"
581
+ },
582
+ "funding": {
583
+ "url": "https://opencollective.com/libvips"
584
+ },
585
+ "optionalDependencies": {
586
+ "@img/sharp-libvips-darwin-x64": "1.0.0"
587
+ }
588
+ },
589
+ "node_modules/@img/sharp-libvips-darwin-arm64": {
590
+ "version": "1.0.0",
591
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.0.tgz",
592
+ "integrity": "sha512-VzYd6OwnUR81sInf3alj1wiokY50DjsHz5bvfnsFpxs5tqQxESoHtJO6xyksDs3RIkyhMWq2FufXo6GNSU9BMw==",
593
+ "cpu": [
594
+ "arm64"
595
+ ],
596
+ "dev": true,
597
+ "optional": true,
598
+ "os": [
599
+ "darwin"
600
+ ],
601
+ "engines": {
602
+ "macos": ">=11",
603
+ "npm": ">=9.6.5",
604
+ "pnpm": ">=7.1.0",
605
+ "yarn": ">=3.2.0"
606
+ },
607
+ "funding": {
608
+ "url": "https://opencollective.com/libvips"
609
+ }
610
+ },
611
+ "node_modules/@img/sharp-libvips-darwin-x64": {
612
+ "version": "1.0.0",
613
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.0.tgz",
614
+ "integrity": "sha512-dD9OznTlHD6aovRswaPNEy8dKtSAmNo4++tO7uuR4o5VxbVAOoEQ1uSmN4iFAdQneTHws1lkTZeiXPrcCkh6IA==",
615
+ "cpu": [
616
+ "x64"
617
+ ],
618
+ "dev": true,
619
+ "optional": true,
620
+ "os": [
621
+ "darwin"
622
+ ],
623
+ "engines": {
624
+ "macos": ">=10.13",
625
+ "npm": ">=9.6.5",
626
+ "pnpm": ">=7.1.0",
627
+ "yarn": ">=3.2.0"
628
+ },
629
+ "funding": {
630
+ "url": "https://opencollective.com/libvips"
631
+ }
632
+ },
633
+ "node_modules/@img/sharp-libvips-linux-arm": {
634
+ "version": "1.0.0",
635
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.0.tgz",
636
+ "integrity": "sha512-VwgD2eEikDJUk09Mn9Dzi1OW2OJFRQK+XlBTkUNmAWPrtj8Ly0yq05DFgu1VCMx2/DqCGQVi5A1dM9hTmxf3uw==",
637
+ "cpu": [
638
+ "arm"
639
+ ],
640
+ "dev": true,
641
+ "optional": true,
642
+ "os": [
643
+ "linux"
644
+ ],
645
+ "engines": {
646
+ "glibc": ">=2.28",
647
+ "npm": ">=9.6.5",
648
+ "pnpm": ">=7.1.0",
649
+ "yarn": ">=3.2.0"
650
+ },
651
+ "funding": {
652
+ "url": "https://opencollective.com/libvips"
653
+ }
654
+ },
655
+ "node_modules/@img/sharp-libvips-linux-arm64": {
656
+ "version": "1.0.0",
657
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.0.tgz",
658
+ "integrity": "sha512-xTYThiqEZEZc0PRU90yVtM3KE7lw1bKdnDQ9kCTHWbqWyHOe4NpPOtMGy27YnN51q0J5dqRrvicfPbALIOeAZA==",
659
+ "cpu": [
660
+ "arm64"
661
+ ],
662
+ "dev": true,
663
+ "optional": true,
664
+ "os": [
665
+ "linux"
666
+ ],
667
+ "engines": {
668
+ "glibc": ">=2.26",
669
+ "npm": ">=9.6.5",
670
+ "pnpm": ">=7.1.0",
671
+ "yarn": ">=3.2.0"
672
+ },
673
+ "funding": {
674
+ "url": "https://opencollective.com/libvips"
675
+ }
676
+ },
677
+ "node_modules/@img/sharp-libvips-linux-s390x": {
678
+ "version": "1.0.0",
679
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.0.tgz",
680
+ "integrity": "sha512-o9E46WWBC6JsBlwU4QyU9578G77HBDT1NInd+aERfxeOPbk0qBZHgoDsQmA2v9TbqJRWzoBPx1aLOhprBMgPjw==",
681
+ "cpu": [
682
+ "s390x"
683
+ ],
684
+ "dev": true,
685
+ "optional": true,
686
+ "os": [
687
+ "linux"
688
+ ],
689
+ "engines": {
690
+ "glibc": ">=2.28",
691
+ "npm": ">=9.6.5",
692
+ "pnpm": ">=7.1.0",
693
+ "yarn": ">=3.2.0"
694
+ },
695
+ "funding": {
696
+ "url": "https://opencollective.com/libvips"
697
+ }
698
+ },
699
+ "node_modules/@img/sharp-libvips-linux-x64": {
700
+ "version": "1.0.0",
701
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.0.tgz",
702
+ "integrity": "sha512-naldaJy4hSVhWBgEjfdBY85CAa4UO+W1nx6a1sWStHZ7EUfNiuBTTN2KUYT5dH1+p/xij1t2QSXfCiFJoC5S/Q==",
703
+ "cpu": [
704
+ "x64"
705
+ ],
706
+ "dev": true,
707
+ "optional": true,
708
+ "os": [
709
+ "linux"
710
+ ],
711
+ "engines": {
712
+ "glibc": ">=2.26",
713
+ "npm": ">=9.6.5",
714
+ "pnpm": ">=7.1.0",
715
+ "yarn": ">=3.2.0"
716
+ },
717
+ "funding": {
718
+ "url": "https://opencollective.com/libvips"
719
+ }
720
+ },
721
+ "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
722
+ "version": "1.0.0",
723
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.0.tgz",
724
+ "integrity": "sha512-OdorplCyvmSAPsoJLldtLh3nLxRrkAAAOHsGWGDYfN0kh730gifK+UZb3dWORRa6EusNqCTjfXV4GxvgJ/nPDQ==",
725
+ "cpu": [
726
+ "arm64"
727
+ ],
728
+ "dev": true,
729
+ "optional": true,
730
+ "os": [
731
+ "linux"
732
+ ],
733
+ "engines": {
734
+ "musl": ">=1.2.2",
735
+ "npm": ">=9.6.5",
736
+ "pnpm": ">=7.1.0",
737
+ "yarn": ">=3.2.0"
738
+ },
739
+ "funding": {
740
+ "url": "https://opencollective.com/libvips"
741
+ }
742
+ },
743
+ "node_modules/@img/sharp-libvips-linuxmusl-x64": {
744
+ "version": "1.0.0",
745
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.0.tgz",
746
+ "integrity": "sha512-FW8iK6rJrg+X2jKD0Ajhjv6y74lToIBEvkZhl42nZt563FfxkCYacrXZtd+q/sRQDypQLzY5WdLkVTbJoPyqNg==",
747
+ "cpu": [
748
+ "x64"
749
+ ],
750
+ "dev": true,
751
+ "optional": true,
752
+ "os": [
753
+ "linux"
754
+ ],
755
+ "engines": {
756
+ "musl": ">=1.2.2",
757
+ "npm": ">=9.6.5",
758
+ "pnpm": ">=7.1.0",
759
+ "yarn": ">=3.2.0"
760
+ },
761
+ "funding": {
762
+ "url": "https://opencollective.com/libvips"
763
+ }
764
+ },
765
+ "node_modules/@img/sharp-linux-arm": {
766
+ "version": "0.33.1",
767
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.1.tgz",
768
+ "integrity": "sha512-Ii4X1vnzzI4j0+cucsrYA5ctrzU9ciXERfJR633S2r39CiD8npqH2GMj63uFZRCFt3E687IenAdbwIpQOJ5BNA==",
769
+ "cpu": [
770
+ "arm"
771
+ ],
772
+ "dev": true,
773
+ "optional": true,
774
+ "os": [
775
+ "linux"
776
+ ],
777
+ "engines": {
778
+ "glibc": ">=2.28",
779
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
780
+ "npm": ">=9.6.5",
781
+ "pnpm": ">=7.1.0",
782
+ "yarn": ">=3.2.0"
783
+ },
784
+ "funding": {
785
+ "url": "https://opencollective.com/libvips"
786
+ },
787
+ "optionalDependencies": {
788
+ "@img/sharp-libvips-linux-arm": "1.0.0"
789
+ }
790
+ },
791
+ "node_modules/@img/sharp-linux-arm64": {
792
+ "version": "0.33.1",
793
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.1.tgz",
794
+ "integrity": "sha512-59B5GRO2d5N3tIfeGHAbJps7cLpuWEQv/8ySd9109ohQ3kzyCACENkFVAnGPX00HwPTQcaBNF7HQYEfZyZUFfw==",
795
+ "cpu": [
796
+ "arm64"
797
+ ],
798
+ "dev": true,
799
+ "optional": true,
800
+ "os": [
801
+ "linux"
802
+ ],
803
+ "engines": {
804
+ "glibc": ">=2.26",
805
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
806
+ "npm": ">=9.6.5",
807
+ "pnpm": ">=7.1.0",
808
+ "yarn": ">=3.2.0"
809
+ },
810
+ "funding": {
811
+ "url": "https://opencollective.com/libvips"
812
+ },
813
+ "optionalDependencies": {
814
+ "@img/sharp-libvips-linux-arm64": "1.0.0"
815
+ }
816
+ },
817
+ "node_modules/@img/sharp-linux-s390x": {
818
+ "version": "0.33.1",
819
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.1.tgz",
820
+ "integrity": "sha512-tRGrb2pHnFUXpOAj84orYNxHADBDIr0J7rrjwQrTNMQMWA4zy3StKmMvwsI7u3dEZcgwuMMooIIGWEWOjnmG8A==",
821
+ "cpu": [
822
+ "s390x"
823
+ ],
824
+ "dev": true,
825
+ "optional": true,
826
+ "os": [
827
+ "linux"
828
+ ],
829
+ "engines": {
830
+ "glibc": ">=2.28",
831
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
832
+ "npm": ">=9.6.5",
833
+ "pnpm": ">=7.1.0",
834
+ "yarn": ">=3.2.0"
835
+ },
836
+ "funding": {
837
+ "url": "https://opencollective.com/libvips"
838
+ },
839
+ "optionalDependencies": {
840
+ "@img/sharp-libvips-linux-s390x": "1.0.0"
841
+ }
842
+ },
843
+ "node_modules/@img/sharp-linux-x64": {
844
+ "version": "0.33.1",
845
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.1.tgz",
846
+ "integrity": "sha512-4y8osC0cAc1TRpy02yn5omBeloZZwS62fPZ0WUAYQiLhSFSpWJfY/gMrzKzLcHB9ulUV6ExFiu2elMaixKDbeg==",
847
+ "cpu": [
848
+ "x64"
849
+ ],
850
+ "dev": true,
851
+ "optional": true,
852
+ "os": [
853
+ "linux"
854
+ ],
855
+ "engines": {
856
+ "glibc": ">=2.26",
857
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
858
+ "npm": ">=9.6.5",
859
+ "pnpm": ">=7.1.0",
860
+ "yarn": ">=3.2.0"
861
+ },
862
+ "funding": {
863
+ "url": "https://opencollective.com/libvips"
864
+ },
865
+ "optionalDependencies": {
866
+ "@img/sharp-libvips-linux-x64": "1.0.0"
867
+ }
868
+ },
869
+ "node_modules/@img/sharp-linuxmusl-arm64": {
870
+ "version": "0.33.1",
871
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.1.tgz",
872
+ "integrity": "sha512-D3lV6clkqIKUizNS8K6pkuCKNGmWoKlBGh5p0sLO2jQERzbakhu4bVX1Gz+RS4vTZBprKlWaf+/Rdp3ni2jLfA==",
873
+ "cpu": [
874
+ "arm64"
875
+ ],
876
+ "dev": true,
877
+ "optional": true,
878
+ "os": [
879
+ "linux"
880
+ ],
881
+ "engines": {
882
+ "musl": ">=1.2.2",
883
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
884
+ "npm": ">=9.6.5",
885
+ "pnpm": ">=7.1.0",
886
+ "yarn": ">=3.2.0"
887
+ },
888
+ "funding": {
889
+ "url": "https://opencollective.com/libvips"
890
+ },
891
+ "optionalDependencies": {
892
+ "@img/sharp-libvips-linuxmusl-arm64": "1.0.0"
893
+ }
894
+ },
895
+ "node_modules/@img/sharp-linuxmusl-x64": {
896
+ "version": "0.33.1",
897
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.1.tgz",
898
+ "integrity": "sha512-LOGKNu5w8uu1evVqUAUKTix2sQu1XDRIYbsi5Q0c/SrXhvJ4QyOx+GaajxmOg5PZSsSnCYPSmhjHHsRBx06/wQ==",
899
+ "cpu": [
900
+ "x64"
901
+ ],
902
+ "dev": true,
903
+ "optional": true,
904
+ "os": [
905
+ "linux"
906
+ ],
907
+ "engines": {
908
+ "musl": ">=1.2.2",
909
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
910
+ "npm": ">=9.6.5",
911
+ "pnpm": ">=7.1.0",
912
+ "yarn": ">=3.2.0"
913
+ },
914
+ "funding": {
915
+ "url": "https://opencollective.com/libvips"
916
+ },
917
+ "optionalDependencies": {
918
+ "@img/sharp-libvips-linuxmusl-x64": "1.0.0"
919
+ }
920
+ },
921
+ "node_modules/@img/sharp-wasm32": {
922
+ "version": "0.33.1",
923
+ "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.1.tgz",
924
+ "integrity": "sha512-vWI/sA+0p+92DLkpAMb5T6I8dg4z2vzCUnp8yvxHlwBpzN8CIcO3xlSXrLltSvK6iMsVMNswAv+ub77rsf25lA==",
925
+ "cpu": [
926
+ "wasm32"
927
+ ],
928
+ "dev": true,
929
+ "optional": true,
930
+ "dependencies": {
931
+ "@emnapi/runtime": "^0.44.0"
932
+ },
933
+ "engines": {
934
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
935
+ "npm": ">=9.6.5",
936
+ "pnpm": ">=7.1.0",
937
+ "yarn": ">=3.2.0"
938
+ },
939
+ "funding": {
940
+ "url": "https://opencollective.com/libvips"
941
+ }
942
+ },
943
+ "node_modules/@img/sharp-win32-ia32": {
944
+ "version": "0.33.1",
945
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.1.tgz",
946
+ "integrity": "sha512-/xhYkylsKL05R+NXGJc9xr2Tuw6WIVl2lubFJaFYfW4/MQ4J+dgjIo/T4qjNRizrqs/szF/lC9a5+updmY9jaQ==",
947
+ "cpu": [
948
+ "ia32"
949
+ ],
950
+ "dev": true,
951
+ "optional": true,
952
+ "os": [
953
+ "win32"
954
+ ],
955
+ "engines": {
956
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
957
+ "npm": ">=9.6.5",
958
+ "pnpm": ">=7.1.0",
959
+ "yarn": ">=3.2.0"
960
+ },
961
+ "funding": {
962
+ "url": "https://opencollective.com/libvips"
963
+ }
964
+ },
965
+ "node_modules/@img/sharp-win32-x64": {
966
+ "version": "0.33.1",
967
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.1.tgz",
968
+ "integrity": "sha512-XaM69X0n6kTEsp9tVYYLhXdg7Qj32vYJlAKRutxUsm1UlgQNx6BOhHwZPwukCGXBU2+tH87ip2eV1I/E8MQnZg==",
969
+ "cpu": [
970
+ "x64"
971
+ ],
972
+ "dev": true,
973
+ "optional": true,
974
+ "os": [
975
+ "win32"
976
+ ],
977
+ "engines": {
978
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
979
+ "npm": ">=9.6.5",
980
+ "pnpm": ">=7.1.0",
981
+ "yarn": ">=3.2.0"
982
+ },
983
+ "funding": {
984
+ "url": "https://opencollective.com/libvips"
985
+ }
986
+ },
987
  "node_modules/@jridgewell/gen-mapping": {
988
  "version": "0.3.3",
989
  "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
 
1073
  "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.24.tgz",
1074
  "integrity": "sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ=="
1075
  },
1076
+ "node_modules/@prisma/client": {
1077
+ "version": "5.7.1",
1078
+ "resolved": "https://registry.npmjs.org/@prisma/client/-/client-5.7.1.tgz",
1079
+ "integrity": "sha512-TUSa4nUcC4nf/e7X3jyO1pEd6XcI/TLRCA0KjkA46RDIpxUaRsBYEOqITwXRW2c0bMFyKcCRXrH4f7h4q9oOlg==",
1080
+ "hasInstallScript": true,
1081
+ "engines": {
1082
+ "node": ">=16.13"
1083
+ },
1084
+ "peerDependencies": {
1085
+ "prisma": "*"
1086
+ },
1087
+ "peerDependenciesMeta": {
1088
+ "prisma": {
1089
+ "optional": true
1090
+ }
1091
+ }
1092
+ },
1093
+ "node_modules/@prisma/debug": {
1094
+ "version": "5.7.1",
1095
+ "resolved": "https://registry.npmjs.org/@prisma/debug/-/debug-5.7.1.tgz",
1096
+ "integrity": "sha512-yrVSO/YZOxdeIxcBtZ5BaNqUfPrZkNsAKQIQg36cJKMxj/VYK3Vk5jMKkI+gQLl0KReo1YvX8GWKfV788SELjw==",
1097
+ "devOptional": true
1098
+ },
1099
+ "node_modules/@prisma/engines": {
1100
+ "version": "5.7.1",
1101
+ "resolved": "https://registry.npmjs.org/@prisma/engines/-/engines-5.7.1.tgz",
1102
+ "integrity": "sha512-R+Pqbra8tpLP2cvyiUpx+SIKglav3nTCpA+rn6826CThviQ8yvbNG0s8jNpo51vS9FuZO3pOkARqG062vKX7uA==",
1103
+ "devOptional": true,
1104
+ "hasInstallScript": true,
1105
+ "dependencies": {
1106
+ "@prisma/debug": "5.7.1",
1107
+ "@prisma/engines-version": "5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5",
1108
+ "@prisma/fetch-engine": "5.7.1",
1109
+ "@prisma/get-platform": "5.7.1"
1110
+ }
1111
+ },
1112
+ "node_modules/@prisma/engines-version": {
1113
+ "version": "5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5",
1114
+ "resolved": "https://registry.npmjs.org/@prisma/engines-version/-/engines-version-5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5.tgz",
1115
+ "integrity": "sha512-dIR5IQK/ZxEoWRBDOHF87r1Jy+m2ih3Joi4vzJRP+FOj5yxCwS2pS5SBR3TWoVnEK1zxtLI/3N7BjHyGF84fgw==",
1116
+ "devOptional": true
1117
+ },
1118
+ "node_modules/@prisma/fetch-engine": {
1119
+ "version": "5.7.1",
1120
+ "resolved": "https://registry.npmjs.org/@prisma/fetch-engine/-/fetch-engine-5.7.1.tgz",
1121
+ "integrity": "sha512-9ELauIEBkIaEUpMIYPRlh5QELfoC6pyHolHVQgbNxglaINikZ9w9X7r1TIePAcm05pCNp2XPY1ObQIJW5nYfBQ==",
1122
+ "devOptional": true,
1123
+ "dependencies": {
1124
+ "@prisma/debug": "5.7.1",
1125
+ "@prisma/engines-version": "5.7.1-1.0ca5ccbcfa6bdc81c003cf549abe4269f59c41e5",
1126
+ "@prisma/get-platform": "5.7.1"
1127
+ }
1128
+ },
1129
+ "node_modules/@prisma/get-platform": {
1130
+ "version": "5.7.1",
1131
+ "resolved": "https://registry.npmjs.org/@prisma/get-platform/-/get-platform-5.7.1.tgz",
1132
+ "integrity": "sha512-eDlswr3a1m5z9D/55Iyt/nZqS5UpD+DZ9MooBB3hvrcPhDQrcf9m4Tl7buy4mvAtrubQ626ECtb8c6L/f7rGSQ==",
1133
+ "devOptional": true,
1134
+ "dependencies": {
1135
+ "@prisma/debug": "5.7.1"
1136
+ }
1137
+ },
1138
  "node_modules/@rollup/plugin-commonjs": {
1139
  "version": "25.0.7",
1140
  "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.7.tgz",
 
1304
  "@sveltejs/kit": "^1.0.0"
1305
  }
1306
  },
1307
+ "node_modules/@sveltejs/enhanced-img": {
1308
+ "version": "0.1.7",
1309
+ "resolved": "https://registry.npmjs.org/@sveltejs/enhanced-img/-/enhanced-img-0.1.7.tgz",
1310
+ "integrity": "sha512-7hxH9vcxeEckOT+Iu/jPGrppIORia65BCF0SuJvjSjhOuJsoI0ycPxLLoD7XnOg3zor71gjXl3aPtghvRPucPw==",
1311
+ "dev": true,
1312
+ "dependencies": {
1313
+ "magic-string": "^0.30.5",
1314
+ "svelte-parse-markup": "^0.1.2",
1315
+ "vite-imagetools": "^6.2.8"
1316
+ }
1317
+ },
1318
  "node_modules/@sveltejs/kit": {
1319
  "version": "1.28.0",
1320
  "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.28.0.tgz",
 
1957
  "periscopic": "^3.1.0"
1958
  }
1959
  },
1960
+ "node_modules/color": {
1961
+ "version": "4.2.3",
1962
+ "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
1963
+ "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
1964
+ "dev": true,
1965
+ "dependencies": {
1966
+ "color-convert": "^2.0.1",
1967
+ "color-string": "^1.9.0"
1968
+ },
1969
+ "engines": {
1970
+ "node": ">=12.5.0"
1971
+ }
1972
+ },
1973
  "node_modules/color-convert": {
1974
  "version": "2.0.1",
1975
  "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
 
1988
  "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
1989
  "dev": true
1990
  },
1991
+ "node_modules/color-string": {
1992
+ "version": "1.9.1",
1993
+ "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
1994
+ "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
1995
+ "dev": true,
1996
+ "dependencies": {
1997
+ "color-name": "^1.0.0",
1998
+ "simple-swizzle": "^0.2.2"
1999
+ }
2000
+ },
2001
  "node_modules/commander": {
2002
  "version": "4.1.1",
2003
  "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
 
2111
  "node": ">=8"
2112
  }
2113
  },
2114
+ "node_modules/detect-libc": {
2115
+ "version": "2.0.2",
2116
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz",
2117
+ "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==",
2118
+ "dev": true,
2119
+ "engines": {
2120
+ "node": ">=8"
2121
+ }
2122
+ },
2123
  "node_modules/devalue": {
2124
  "version": "4.3.2",
2125
  "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz",
 
2716
  "node": ">= 4"
2717
  }
2718
  },
2719
+ "node_modules/imagetools-core": {
2720
+ "version": "6.0.4",
2721
+ "resolved": "https://registry.npmjs.org/imagetools-core/-/imagetools-core-6.0.4.tgz",
2722
+ "integrity": "sha512-N1qs5qn7u9nR3kboISkYuvJm8MohiphCfBa+wx1UOropVaFis9/mh6wuDPLHJNhl6/64C7q2Pch5NASVKAaSrg==",
2723
+ "dev": true,
2724
+ "dependencies": {
2725
+ "sharp": "^0.33.1"
2726
+ },
2727
+ "engines": {
2728
+ "node": ">=12.0.0"
2729
+ }
2730
+ },
2731
  "node_modules/immutable": {
2732
  "version": "4.3.4",
2733
  "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz",
 
2783
  "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
2784
  "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
2785
  },
2786
+ "node_modules/is-arrayish": {
2787
+ "version": "0.3.2",
2788
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
2789
+ "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==",
2790
+ "dev": true
2791
+ },
2792
  "node_modules/is-binary-path": {
2793
  "version": "2.1.0",
2794
  "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
 
3547
  "svelte": "^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0"
3548
  }
3549
  },
3550
+ "node_modules/prisma": {
3551
+ "version": "5.7.1",
3552
+ "resolved": "https://registry.npmjs.org/prisma/-/prisma-5.7.1.tgz",
3553
+ "integrity": "sha512-ekho7ziH0WEJvC4AxuJz+ewRTMskrebPcrKuBwcNzVDniYxx+dXOGcorNeIb9VEMO5vrKzwNYvhD271Ui2jnNw==",
3554
+ "devOptional": true,
3555
+ "hasInstallScript": true,
3556
+ "dependencies": {
3557
+ "@prisma/engines": "5.7.1"
3558
+ },
3559
+ "bin": {
3560
+ "prisma": "build/index.js"
3561
+ },
3562
+ "engines": {
3563
+ "node": ">=16.13"
3564
+ }
3565
+ },
3566
  "node_modules/punycode": {
3567
  "version": "2.3.1",
3568
  "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
 
3773
  "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz",
3774
  "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ=="
3775
  },
3776
+ "node_modules/sharp": {
3777
+ "version": "0.33.1",
3778
+ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.1.tgz",
3779
+ "integrity": "sha512-iAYUnOdTqqZDb3QjMneBKINTllCJDZ3em6WaWy7NPECM4aHncvqHRm0v0bN9nqJxMiwamv5KIdauJ6lUzKDpTQ==",
3780
+ "dev": true,
3781
+ "hasInstallScript": true,
3782
+ "dependencies": {
3783
+ "color": "^4.2.3",
3784
+ "detect-libc": "^2.0.2",
3785
+ "semver": "^7.5.4"
3786
+ },
3787
+ "engines": {
3788
+ "libvips": ">=8.15.0",
3789
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
3790
+ },
3791
+ "funding": {
3792
+ "url": "https://opencollective.com/libvips"
3793
+ },
3794
+ "optionalDependencies": {
3795
+ "@img/sharp-darwin-arm64": "0.33.1",
3796
+ "@img/sharp-darwin-x64": "0.33.1",
3797
+ "@img/sharp-libvips-darwin-arm64": "1.0.0",
3798
+ "@img/sharp-libvips-darwin-x64": "1.0.0",
3799
+ "@img/sharp-libvips-linux-arm": "1.0.0",
3800
+ "@img/sharp-libvips-linux-arm64": "1.0.0",
3801
+ "@img/sharp-libvips-linux-s390x": "1.0.0",
3802
+ "@img/sharp-libvips-linux-x64": "1.0.0",
3803
+ "@img/sharp-libvips-linuxmusl-arm64": "1.0.0",
3804
+ "@img/sharp-libvips-linuxmusl-x64": "1.0.0",
3805
+ "@img/sharp-linux-arm": "0.33.1",
3806
+ "@img/sharp-linux-arm64": "0.33.1",
3807
+ "@img/sharp-linux-s390x": "0.33.1",
3808
+ "@img/sharp-linux-x64": "0.33.1",
3809
+ "@img/sharp-linuxmusl-arm64": "0.33.1",
3810
+ "@img/sharp-linuxmusl-x64": "0.33.1",
3811
+ "@img/sharp-wasm32": "0.33.1",
3812
+ "@img/sharp-win32-ia32": "0.33.1",
3813
+ "@img/sharp-win32-x64": "0.33.1"
3814
+ }
3815
+ },
3816
  "node_modules/shebang-command": {
3817
  "version": "2.0.0",
3818
  "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
 
3834
  "node": ">=8"
3835
  }
3836
  },
3837
+ "node_modules/simple-swizzle": {
3838
+ "version": "0.2.2",
3839
+ "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
3840
+ "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
3841
+ "dev": true,
3842
+ "dependencies": {
3843
+ "is-arrayish": "^0.3.1"
3844
+ }
3845
+ },
3846
  "node_modules/sirv": {
3847
  "version": "2.0.3",
3848
  "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.3.tgz",
 
4077
  "resolved": "https://registry.npmjs.org/svelte-infinite-scroll/-/svelte-infinite-scroll-2.0.1.tgz",
4078
  "integrity": "sha512-goTHCfOHRDCs8C5MeSuIc6LlAQ8zVQ+M4Y3LyvrDjx5rqSSxSrdCuQwIyWYNcO6j6/mnqRro3QB64ClBzfn+Wg=="
4079
  },
4080
+ "node_modules/svelte-parse-markup": {
4081
+ "version": "0.1.2",
4082
+ "resolved": "https://registry.npmjs.org/svelte-parse-markup/-/svelte-parse-markup-0.1.2.tgz",
4083
+ "integrity": "sha512-DycY7DJr7VqofiJ63ut1/NEG92HrWWL56VWITn/cJCu+LlZhMoBkBXT4opUitPEEwbq1nMQbv4vTKUfbOqIW1g==",
4084
+ "dev": true,
4085
+ "funding": {
4086
+ "url": "https://bjornlu.com/sponsor"
4087
+ },
4088
+ "peerDependencies": {
4089
+ "svelte": "^3.0.0 || ^4.0.0"
4090
+ }
4091
+ },
4092
  "node_modules/svelte-preprocess": {
4093
  "version": "5.1.1",
4094
  "resolved": "https://registry.npmjs.org/svelte-preprocess/-/svelte-preprocess-5.1.1.tgz",
 
4480
  }
4481
  }
4482
  },
4483
+ "node_modules/vite-imagetools": {
4484
+ "version": "6.2.9",
4485
+ "resolved": "https://registry.npmjs.org/vite-imagetools/-/vite-imagetools-6.2.9.tgz",
4486
+ "integrity": "sha512-C4ZYhgj2vAj43/TpZ06XlDNP0p/7LIeYbgUYr+xG44nM++4HGX6YZBKAYpiBNgiCFUTJ6eXkRppWBrfPMevgmg==",
4487
+ "dev": true,
4488
+ "dependencies": {
4489
+ "@rollup/pluginutils": "^5.0.5",
4490
+ "imagetools-core": "^6.0.4"
4491
+ },
4492
+ "engines": {
4493
+ "node": ">=12.0.0"
4494
+ }
4495
+ },
4496
  "node_modules/vitefu": {
4497
  "version": "0.2.5",
4498
  "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.5.tgz",
package.json CHANGED
@@ -14,6 +14,7 @@
14
  "@fontsource/fira-mono": "^4.5.10",
15
  "@neoconfetti/svelte": "^1.0.0",
16
  "@sveltejs/adapter-auto": "^2.0.0",
 
17
  "@sveltejs/kit": "^1.27.4",
18
  "@types/cookie": "^0.5.1",
19
  "@typescript-eslint/eslint-plugin": "^6.0.0",
@@ -25,6 +26,7 @@
25
  "postcss": "^8.4.32",
26
  "prettier": "^3.0.0",
27
  "prettier-plugin-svelte": "^3.0.0",
 
28
  "sass": "^1.69.5",
29
  "svelte": "^4.2.7",
30
  "svelte-check": "^3.6.0",
@@ -36,6 +38,7 @@
36
  "type": "module",
37
  "dependencies": {
38
  "@iconify/svelte": "^3.1.4",
 
39
  "@sveltejs/adapter-node": "^1.3.1",
40
  "svelte-infinite-scroll": "^2.0.1"
41
  }
 
14
  "@fontsource/fira-mono": "^4.5.10",
15
  "@neoconfetti/svelte": "^1.0.0",
16
  "@sveltejs/adapter-auto": "^2.0.0",
17
+ "@sveltejs/enhanced-img": "^0.1.7",
18
  "@sveltejs/kit": "^1.27.4",
19
  "@types/cookie": "^0.5.1",
20
  "@typescript-eslint/eslint-plugin": "^6.0.0",
 
26
  "postcss": "^8.4.32",
27
  "prettier": "^3.0.0",
28
  "prettier-plugin-svelte": "^3.0.0",
29
+ "prisma": "^5.7.1",
30
  "sass": "^1.69.5",
31
  "svelte": "^4.2.7",
32
  "svelte-check": "^3.6.0",
 
38
  "type": "module",
39
  "dependencies": {
40
  "@iconify/svelte": "^3.1.4",
41
+ "@prisma/client": "^5.7.1",
42
  "@sveltejs/adapter-node": "^1.3.1",
43
  "svelte-infinite-scroll": "^2.0.1"
44
  }
prisma/dev.db ADDED
Binary file (36.9 kB). View file
 
prisma/migrations/20240104143521_init/migration.sql ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ -- CreateTable
2
+ CREATE TABLE "Model" (
3
+ "id" TEXT NOT NULL PRIMARY KEY,
4
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
5
+ "repo" TEXT NOT NULL,
6
+ "title" TEXT,
7
+ "trigger_word" TEXT,
8
+ "image" TEXT,
9
+ "weights" TEXT,
10
+ "likes" INTEGER,
11
+ "downloads" INTEGER,
12
+ "isPublic" BOOLEAN NOT NULL DEFAULT false
13
+ );
14
+
15
+ -- CreateIndex
16
+ CREATE UNIQUE INDEX "Model_repo_key" ON "Model"("repo");
prisma/migrations/20240104145615_init/migration.sql ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `downloads` on the `Model` table. All the data in the column will be lost.
5
+ - You are about to drop the column `image` on the `Model` table. All the data in the column will be lost.
6
+ - You are about to drop the column `likes` on the `Model` table. All the data in the column will be lost.
7
+ - You are about to drop the column `title` on the `Model` table. All the data in the column will be lost.
8
+ - You are about to drop the column `trigger_word` on the `Model` table. All the data in the column will be lost.
9
+ - You are about to drop the column `weights` on the `Model` table. All the data in the column will be lost.
10
+
11
+ */
12
+ -- RedefineTables
13
+ PRAGMA foreign_keys=OFF;
14
+ CREATE TABLE "new_Model" (
15
+ "id" TEXT NOT NULL PRIMARY KEY,
16
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
17
+ "repo" TEXT NOT NULL,
18
+ "isPublic" BOOLEAN NOT NULL DEFAULT false
19
+ );
20
+ INSERT INTO "new_Model" ("createdAt", "id", "isPublic", "repo") SELECT "createdAt", "id", "isPublic", "repo" FROM "Model";
21
+ DROP TABLE "Model";
22
+ ALTER TABLE "new_Model" RENAME TO "Model";
23
+ CREATE UNIQUE INDEX "Model_repo_key" ON "Model"("repo");
24
+ PRAGMA foreign_key_check;
25
+ PRAGMA foreign_keys=ON;
prisma/migrations/20240104153500_init/migration.sql ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ -- AlterTable
2
+ ALTER TABLE "Model" ADD COLUMN "image" TEXT;
prisma/migrations/20240104154419_init/migration.sql ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ Warnings:
3
+
4
+ - Added the required column `title` to the `Model` table without a default value. This is not possible if the table is not empty.
5
+ - Made the column `image` on table `Model` required. This step will fail if there are existing NULL values in that column.
6
+
7
+ */
8
+ -- RedefineTables
9
+ PRAGMA foreign_keys=OFF;
10
+ CREATE TABLE "new_Model" (
11
+ "id" TEXT NOT NULL PRIMARY KEY,
12
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
13
+ "repo" TEXT NOT NULL,
14
+ "title" TEXT NOT NULL,
15
+ "image" TEXT NOT NULL,
16
+ "likes" INTEGER,
17
+ "downloads" INTEGER,
18
+ "isPublic" BOOLEAN NOT NULL DEFAULT false
19
+ );
20
+ INSERT INTO "new_Model" ("createdAt", "id", "image", "isPublic", "repo") SELECT "createdAt", "id", "image", "isPublic", "repo" FROM "Model";
21
+ DROP TABLE "Model";
22
+ ALTER TABLE "new_Model" RENAME TO "Model";
23
+ CREATE UNIQUE INDEX "Model_repo_key" ON "Model"("repo");
24
+ PRAGMA foreign_key_check;
25
+ PRAGMA foreign_keys=ON;
prisma/migrations/migration_lock.toml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ # Please do not edit this file manually
2
+ # It should be added in your version-control system (i.e. Git)
3
+ provider = "sqlite"
prisma/schema.prisma ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // This is your Prisma schema file,
2
+ // learn more about it in the docs: https://pris.ly/d/prisma-schema
3
+
4
+ generator client {
5
+ provider = "prisma-client-js"
6
+ }
7
+
8
+ datasource db {
9
+ provider = "sqlite"
10
+ url = env("DATABASE_URL")
11
+ }
12
+
13
+ model Model {
14
+ id String @id @default(uuid())
15
+ createdAt DateTime @default(now())
16
+ repo String @unique
17
+ title String
18
+ // trigger_word String?
19
+ image String
20
+ // weights String?
21
+ likes Int?
22
+ downloads Int?
23
+ isPublic Boolean @default(false)
24
+ }
src/lib/components/Loading.svelte ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="absolute left-0 top-0 w-full h-full flex items-center justify-center flex-col">
2
+ <svg
3
+ class="animate-spin -ml-1 mr-3 h-8 w-8 text-white"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ fill="none"
6
+ viewBox="0 0 24 24"
7
+ >
8
+ <circle
9
+ class="opacity-25"
10
+ cx="12"
11
+ cy="12"
12
+ r="10"
13
+ stroke="currentColor"
14
+ stroke-width="4"
15
+ ></circle>
16
+ <path
17
+ class="opacity-75"
18
+ fill="currentColor"
19
+ d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
20
+ ></path>
21
+ </svg>
22
+ <slot />
23
+ </div>
src/lib/components/dialog/Dialog.svelte ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script lang="ts">
2
+ import { browser } from "$app/environment";
3
+
4
+ export let open: boolean = false;
5
+ export let onClose: () => void;
6
+
7
+ if (browser) {
8
+ if (open) {
9
+ document.body.style.overflow = "hidden";
10
+ } else {
11
+ document.body.style.overflow = "auto";
12
+ }
13
+ }
14
+ </script>
15
+
16
+ <!-- svelte-ignore a11y-click-events-have-key-events -->
17
+ <!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
18
+ <div
19
+ aria-labelledby="modal-container"
20
+ role="dialog"
21
+ class="bg-neutral-950/10 backdrop-blur-[2px] fixed top-0 left-0 h-full w-full flex items-center justify-center py-12 z-50 transition-all duration-200" class:opacity-0={!open} class:pointer-events-none={!open}
22
+ on:click={() => onClose()}
23
+ >
24
+ <div
25
+ aria-labelledby="modal-dialog"
26
+ aria-describedby="modal-description"
27
+ role="dialog"
28
+ class="max-w-xl w-full bg-neutral-900 rounded-lg p-8 border border-neutral-800 text-neutral-400 shadow-xl transition-all duration-500 relative"
29
+ class:-translate-y-5={!open}
30
+ on:click={(e) => {
31
+ e.stopPropagation();
32
+ e.preventDefault();
33
+ }}
34
+ >
35
+ <slot />
36
+ </div>
37
+ </div>
src/lib/components/fields/Input.svelte CHANGED
@@ -1,6 +1,7 @@
1
  <script lang="ts">
2
  export let placeholder: string = "Search";
3
  export let value: string = "";
 
4
  export let onChange: (value: string) => void = () => {};
5
 
6
  const handleChange = (event: any) => {
@@ -9,12 +10,17 @@
9
  }
10
  </script>
11
 
12
- <div class="bg-neutral-900 border border-neutral-800 rounded-lg px-4 py-3 text-neutral-200 text-base">
 
 
 
 
 
13
  <input
14
  type="text"
15
  {value}
16
  {placeholder}
17
- class="bg-transparent outline-none border-none placeholder:text-neutral-500 w-full"
18
  on:input={handleChange}
19
  >
20
  </div>
 
1
  <script lang="ts">
2
  export let placeholder: string = "Search";
3
  export let value: string = "";
4
+ export let prefix: string = "";
5
  export let onChange: (value: string) => void = () => {};
6
 
7
  const handleChange = (event: any) => {
 
10
  }
11
  </script>
12
 
13
+ <div class="bg-neutral-900 border border-neutral-800 rounded-lg text-neutral-200 text-base flex items-center justify-start overflow-hidden">
14
+ {#if prefix}
15
+ <div class="flex items-center justify-between bg-neutral-800/50 px-3 border-r border-neutral-800 py-4">
16
+ <p class="text-xs uppercase text-neutral-100 font-semibold">{prefix}</p>
17
+ </div>
18
+ {/if}
19
  <input
20
  type="text"
21
  {value}
22
  {placeholder}
23
+ class="bg-transparent outline-none border-none placeholder:text-neutral-500 w-full px-4 py-3"
24
  on:input={handleChange}
25
  >
26
  </div>
src/lib/components/models/Card.svelte CHANGED
@@ -2,6 +2,7 @@
2
  import type { ModelCard } from "$lib/type";
3
  import Button from "$lib/components/Button.svelte";
4
  import Icon from "@iconify/svelte";
 
5
 
6
  export let card: ModelCard;
7
 
@@ -9,15 +10,18 @@
9
  <div
10
  class="w-full cursor-pointer group bg-neutral-900 rounded-xl relative flex items-start justify-between flex-col p-3 border border-neutral-800 transition-all duration-200 brightness-75 hover:brightness-100 z-[1]"
11
  >
12
- <div class="w-full h-[250px] relative z-[1] mb-3 overflow-hidden">
13
- <div class="w-full h-full bg-center bg-cover rounded-lg" style="background-image: url('{card.image}');"></div>
 
 
 
14
  <div class="group-hover:opacity-100 opacity-0 translate-x-full group-hover:translate-x-0 transition-all duration-200 absolute right-3 bottom-3">
15
  <Button theme="light" size="md">
16
  Try it now
17
  </Button>
18
  </div>
19
  </div>
20
- <div class="flex items-center justify-between w-full gap-4">
21
  <p class="text-white font-semibold text-base mb-1 truncate">{card?.title ?? card?.repo}</p>
22
  <div class="flex items-center justify-end gap-3">
23
  <div class="text-white text-sm flex items-center justify-end gap-1.5">
 
2
  import type { ModelCard } from "$lib/type";
3
  import Button from "$lib/components/Button.svelte";
4
  import Icon from "@iconify/svelte";
5
+ import Loading from "../Loading.svelte";
6
 
7
  export let card: ModelCard;
8
 
 
10
  <div
11
  class="w-full cursor-pointer group bg-neutral-900 rounded-xl relative flex items-start justify-between flex-col p-3 border border-neutral-800 transition-all duration-200 brightness-75 hover:brightness-100 z-[1]"
12
  >
13
+ <div class="w-full h-[270px] relative z-[1] mb-3 overflow-hidden">
14
+ <!-- <div class="w-full h-full bg-center bg-cover rounded-lg bg-neutral-800 relative" style=""> -->
15
+ <!-- <Loading /> -->
16
+ <!-- </div> -->
17
+ <img src="{card.image}" class="w-full h-full bg-center bg-cover rounded-lg object-cover object-center" alt="{card?.title}" />
18
  <div class="group-hover:opacity-100 opacity-0 translate-x-full group-hover:translate-x-0 transition-all duration-200 absolute right-3 bottom-3">
19
  <Button theme="light" size="md">
20
  Try it now
21
  </Button>
22
  </div>
23
  </div>
24
+ <div class="flex items-center justify-between w-full gap-4 py-1">
25
  <p class="text-white font-semibold text-base mb-1 truncate">{card?.title ?? card?.repo}</p>
26
  <div class="flex items-center justify-end gap-3">
27
  <div class="text-white text-sm flex items-center justify-end gap-1.5">
src/lib/components/models/Submit.svelte ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script>
2
+ import Input from "$lib/components/fields/Input.svelte";
3
+ import Button from "$lib/components/Button.svelte";
4
+
5
+ </script>
6
+ <div class="grid grid-cols-1 gap-8">
7
+ <p class="bg-yellow-500/40 rounded-full text-xs text-yellow-400 px-3 py-1 font-semibold max-w-max">
8
+ You need to be logged in to submit a model.
9
+ </p>
10
+ <header>
11
+ <p class="text-white font-semibold text-lg">
12
+ Submit a Model
13
+ </p>
14
+ <p class="text-neutral-300 text-base mt-1">
15
+ Submit a model to the LoRA Studio. You can submit a model by providing a link to the model.
16
+ </p>
17
+ </header>
18
+ <main class="grid grid-cols-1 gap-6">
19
+ <div>
20
+ <p class="text-xs uppercase text-neutral-400 font-semibold mb-2">HuggingFace model URL</p>
21
+ <Input placeholder="enzostvs/hair-color" prefix="huggingface.co/" />
22
+ </div>
23
+ <div>
24
+ <p class="text-xs uppercase text-neutral-400 font-semibold mb-2">Title</p>
25
+ <Input placeholder="Simpson style" />
26
+ </div>
27
+ </main>
28
+ <footer class="flex items-center justify-end gap-3">
29
+ <Button theme="dark" size="md">Cancel</Button>
30
+ <Button theme="blue" size="md">Submit</Button>
31
+ </footer>
32
+ </div>
src/lib/prisma.ts ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ import { PrismaClient } from '@prisma/client'
2
+
3
+ const prisma = new PrismaClient()
4
+ export default prisma
src/lib/type.ts CHANGED
@@ -14,14 +14,11 @@ export interface CommunityCard {
14
  }
15
 
16
  export interface ModelCard {
17
- repo: string;
18
- title: string;
19
- trigger_word: string;
20
- is_compatible: boolean;
21
- image: string;
22
- weights: string;
23
- likes: number;
24
- downloads?: number;
25
  }
26
 
27
  export interface ReactionType {
 
14
  }
15
 
16
  export interface ModelCard {
17
+ title: string,
18
+ repo: string,
19
+ likes: number,
20
+ downloads: number,
21
+ image: string,
 
 
 
22
  }
23
 
24
  export interface ReactionType {
src/lib/utils/loras.json CHANGED
@@ -421,7 +421,7 @@
421
  "image": "https://huggingface.co/CiroN2022/overprint-effect/resolve/main/2139470.jpeg",
422
  "weights": "Overprint_effect_sdxl.safetensors",
423
  "likes": 1,
424
- "downloads": 0
425
  },
426
  {
427
  "repo": "CiroN2022/toy-face",
 
421
  "image": "https://huggingface.co/CiroN2022/overprint-effect/resolve/main/2139470.jpeg",
422
  "weights": "Overprint_effect_sdxl.safetensors",
423
  "likes": 1,
424
+ "downloads": 30
425
  },
426
  {
427
  "repo": "CiroN2022/toy-face",
src/routes/api/bulk-create-models/+server.ts ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { json } from '@sveltejs/kit';
2
+ import prisma from '$lib/prisma';
3
+ // import { env } from '$env/dynamic/private'
4
+
5
+ // import jsonData from "$lib/utils/loras.json";
6
+ // import type { ModelCard } from '$lib/type';
7
+
8
+ /** @type {import('./$types').RequestHandler} */
9
+
10
+ export async function POST({ request }) {
11
+ const headers = Object.fromEntries(request.headers.entries());
12
+
13
+ if (headers["x-hf-token"] !== process.env.HF_TOKEN) {
14
+ return Response.json({
15
+ message: "Wrong castle fam :^)"
16
+ }, { status: 401 });
17
+ }
18
+
19
+ const { models } = await request.json();
20
+
21
+ const cards = await Promise.all(models.map(async (model: Record<string, string>) => {
22
+ const res = await fetch(`https://huggingface.co/api/models/${model.repo}`)
23
+ const data = await res.json();
24
+ const mergedData = {
25
+ image: model.image,
26
+ repo: model.repo,
27
+ title: model.title,
28
+ likes: data.likes,
29
+ downloads: data.downloads,
30
+ }
31
+ return mergedData
32
+ }
33
+ ))
34
+
35
+ for (const model of cards) {
36
+ await prisma.model.create({
37
+ data: {
38
+ repo: model.repo,
39
+ image: model.image,
40
+ title: model.title,
41
+ likes: model.likes,
42
+ downloads: model.downloads,
43
+ isPublic: true,
44
+ }
45
+ })
46
+ }
47
+
48
+ const total_items = await prisma.model.count()
49
+
50
+ return json({
51
+ message: `Successfully added ${total_items} models`,
52
+ })
53
+ }
src/routes/api/models/+server.ts CHANGED
@@ -1,45 +1,42 @@
1
  import { error, json, type RequestEvent } from '@sveltejs/kit';
2
- // import { env } from '$env/dynamic/private'
3
-
4
- import jsonData from "$lib/utils/loras.json";
5
- import type { ModelCard } from '$lib/type';
6
 
7
  /** @type {import('./$types').RequestHandler} */
8
 
9
- const Dict: Record<
10
- string,
11
- (a: ModelCard, b: ModelCard) => number
12
- > = {
13
- hotest: (a: ModelCard, b: ModelCard) => (b.downloads ?? 0) - (a.downloads ?? 0),
14
- likes: (a: ModelCard, b: ModelCard) => b.likes - a.likes,
15
- }
16
 
17
  export async function GET(request : RequestEvent) {
18
- const hasError = false
19
-
20
  const page = parseInt(request.url.searchParams.get('page') || '0')
21
  const filter = request.url.searchParams.get('filter') || 'hotest'
22
  const search = request.url.searchParams.get('search') || ''
23
 
24
- console.log({ search })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
 
26
  if (hasError) {
27
  return error(500, 'Internal Server Error')
28
  }
29
 
30
- let cards: ModelCard[] = jsonData
31
-
32
- if (search) {
33
- cards = cards.filter((card) => card.title.toLowerCase().includes(search.toLowerCase()))
34
- }
35
-
36
- const sortFunc = Dict[filter] || Dict['hotest']
37
- cards = cards.sort(sortFunc)
38
-
39
- cards = cards.slice(page * 25, page * 25 + 25)
40
-
41
  return json({
42
  cards,
43
- total_items: jsonData.length,
44
  })
45
  }
 
1
  import { error, json, type RequestEvent } from '@sveltejs/kit';
2
+ import prisma from '$lib/prisma';
 
 
 
3
 
4
  /** @type {import('./$types').RequestHandler} */
5
 
6
+ // TODO
7
+ // run hooks to update each model by repo using hugging face api.
8
+ // refer to bulk-create-models +server.ts for example
 
 
 
 
9
 
10
  export async function GET(request : RequestEvent) {
11
+
 
12
  const page = parseInt(request.url.searchParams.get('page') || '0')
13
  const filter = request.url.searchParams.get('filter') || 'hotest'
14
  const search = request.url.searchParams.get('search') || ''
15
 
16
+ const cards = await prisma.model.findMany({
17
+ where: {
18
+ isPublic: true,
19
+ OR: [
20
+ { title: { contains: search } },
21
+ { repo: { contains: search } },
22
+ ]
23
+ },
24
+ orderBy: {
25
+ ...(filter === 'hotest' ? { downloads: 'desc' } : { likes: 'desc' })
26
+ },
27
+ skip: 20 * page,
28
+ take: 20,
29
+ })
30
+
31
+ const total_reposId = await prisma.model.count()
32
 
33
+ const hasError = false
34
  if (hasError) {
35
  return error(500, 'Internal Server Error')
36
  }
37
 
 
 
 
 
 
 
 
 
 
 
 
38
  return json({
39
  cards,
40
+ total_items: total_reposId
41
  })
42
  }
src/routes/models/+page.svelte CHANGED
@@ -1,13 +1,14 @@
1
  <script lang="ts">
2
  import { browser } from "$app/environment";
3
  import InfiniteScroll from "svelte-infinite-scroll";
4
-
5
  import Button from "$lib/components/Button.svelte";
6
  import Card from "$lib/components/models/Card.svelte";
7
  import Input from "$lib/components/fields/Input.svelte";
8
  import Radio from "$lib/components/fields/Radio.svelte";
9
  import { MODELS_FILTER_OPTIONS } from "$lib/utils/index.js";
10
  import GoTop from "$lib/components/GoTop.svelte";
 
 
11
 
12
  export let data;
13
 
@@ -16,6 +17,7 @@
16
  search: "",
17
  page: "0",
18
  }
 
19
 
20
  $: elementScroll = browser ? document?.getElementById('app') : undefined;
21
 
@@ -27,9 +29,11 @@
27
  form = { ...form, filter, page: (0).toString()};
28
  refetch(false)
29
  }
 
30
  const handleChangeSearch = async (search: string) => {
 
31
  form = { ...form, search, page: (0).toString()};
32
- refetch(false)
33
  }
34
 
35
  const refetch = async (add: boolean) => {
@@ -45,18 +49,35 @@
45
  <meta name="description" content="Svelte demo app" />
46
  </svelte:head>
47
 
 
 
 
48
  <h1 class="text-white font-semibold text-2xl">
49
- Explore Models : {form.search}
50
  </h1>
51
  <div class="flex items-start sm:items-center justify-between mt-5 flex-col sm:flex-row gap-5 sm:justify-between">
52
  <Radio options={MODELS_FILTER_OPTIONS} value="{form.filter}" onChange={handleChangeFilter} />
53
  <div class="items-center justify-end gap-5 hidden lg:flex">
54
  <Button icon="ic:round-plus" theme="dark" size="lg">Create</Button>
55
- <Button icon="octicon:upload-16" theme="blue" size="lg">Upload model</Button>
 
 
 
 
 
 
 
56
  </div>
57
  <div class="items-center justify-end gap-3 flex lg:hidden">
58
  <Button icon="ic:round-plus" theme="dark" size="md">Create</Button>
59
- <Button icon="octicon:upload-16" theme="blue" size="md">Upload model</Button>
 
 
 
 
 
 
 
60
  </div>
61
  </div>
62
  <div class="mt-5 max-w-sm">
 
1
  <script lang="ts">
2
  import { browser } from "$app/environment";
3
  import InfiniteScroll from "svelte-infinite-scroll";
 
4
  import Button from "$lib/components/Button.svelte";
5
  import Card from "$lib/components/models/Card.svelte";
6
  import Input from "$lib/components/fields/Input.svelte";
7
  import Radio from "$lib/components/fields/Radio.svelte";
8
  import { MODELS_FILTER_OPTIONS } from "$lib/utils/index.js";
9
  import GoTop from "$lib/components/GoTop.svelte";
10
+ import Dialog from "$lib/components/dialog/Dialog.svelte";
11
+ import SubmitModel from "$lib/components/models/Submit.svelte";
12
 
13
  export let data;
14
 
 
17
  search: "",
18
  page: "0",
19
  }
20
+ let submitModelDialog = false;
21
 
22
  $: elementScroll = browser ? document?.getElementById('app') : undefined;
23
 
 
29
  form = { ...form, filter, page: (0).toString()};
30
  refetch(false)
31
  }
32
+ let timeout: any;
33
  const handleChangeSearch = async (search: string) => {
34
+ clearTimeout(timeout);
35
  form = { ...form, search, page: (0).toString()};
36
+ timeout = setTimeout(() => refetch(false), 500);
37
  }
38
 
39
  const refetch = async (add: boolean) => {
 
49
  <meta name="description" content="Svelte demo app" />
50
  </svelte:head>
51
 
52
+ <Dialog open={submitModelDialog} onClose={() => submitModelDialog = false}>
53
+ <SubmitModel />
54
+ </Dialog>
55
  <h1 class="text-white font-semibold text-2xl">
56
+ Explore Models ({data.total_items})
57
  </h1>
58
  <div class="flex items-start sm:items-center justify-between mt-5 flex-col sm:flex-row gap-5 sm:justify-between">
59
  <Radio options={MODELS_FILTER_OPTIONS} value="{form.filter}" onChange={handleChangeFilter} />
60
  <div class="items-center justify-end gap-5 hidden lg:flex">
61
  <Button icon="ic:round-plus" theme="dark" size="lg">Create</Button>
62
+ <Button
63
+ icon="octicon:upload-16"
64
+ theme="blue"
65
+ size="lg"
66
+ onClick={() => submitModelDialog = true}
67
+ >
68
+ Submit model
69
+ </Button>
70
  </div>
71
  <div class="items-center justify-end gap-3 flex lg:hidden">
72
  <Button icon="ic:round-plus" theme="dark" size="md">Create</Button>
73
+ <Button
74
+ icon="octicon:upload-16"
75
+ theme="blue"
76
+ size="md"
77
+ onClick={() => submitModelDialog = true}
78
+ >
79
+ Submit model
80
+ </Button>
81
  </div>
82
  </div>
83
  <div class="mt-5 max-w-sm">
vite.config.ts CHANGED
@@ -1,6 +1,10 @@
1
  import { sveltekit } from '@sveltejs/kit/vite';
 
2
  import { defineConfig } from 'vite';
3
 
4
  export default defineConfig({
5
- plugins: [sveltekit()],
 
 
 
6
  });
 
1
  import { sveltekit } from '@sveltejs/kit/vite';
2
+ import { enhancedImages } from '@sveltejs/enhanced-img';
3
  import { defineConfig } from 'vite';
4
 
5
  export default defineConfig({
6
+ plugins: [
7
+ enhancedImages(),
8
+ sveltekit()
9
+ ],
10
  });