File size: 48,022 Bytes
3d50167
 
 
 
56ab489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8c89f37
 
 
56ab489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8c89f37
 
 
56ab489
8c89f37
 
56ab489
8c89f37
 
 
56ab489
3d50167
 
56ab489
 
 
 
6236c66
56ab489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
56ab489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
56ab489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
56ab489
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
 
 
 
6236c66
3d50167
 
 
 
 
 
 
 
798bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
 
 
 
 
 
 
 
 
 
 
 
 
680de21
3d50167
 
 
680de21
798bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
 
 
 
 
 
 
 
 
 
 
 
798bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
 
798bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
6236c66
798bcc6
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
0bc2a8a
 
 
 
 
 
 
 
 
 
6236c66
0bc2a8a
798bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6236c66
798bcc6
3d50167
 
 
798bcc6
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
 
 
 
 
 
 
 
 
 
 
 
798bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680de21
798bcc6
 
 
680de21
798bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680de21
798bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680de21
798bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680de21
798bcc6
 
 
680de21
798bcc6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56ab489
 
 
 
680de21
56ab489
 
 
 
 
798bcc6
 
56ab489
 
 
 
680de21
56ab489
 
 
 
 
3d50167
 
 
0bc2a8a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3d50167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56ab489
 
 
 
 
 
3d50167
 
56ab489
 
3d50167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56ab489
 
 
 
 
 
3d50167
 
 
 
 
56ab489
 
3d50167
 
56ab489
 
 
 
 
 
 
680de21
 
 
 
 
3d50167
 
 
680de21
 
 
 
 
 
3d50167
 
56ab489
 
3d50167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
680de21
8c89f37
3d50167
 
 
 
 
 
 
 
 
 
 
d48e96e
3d50167
 
 
 
 
680de21
8c89f37
3d50167
 
 
 
 
 
 
 
 
 
 
d48e96e
3d50167
 
 
 
 
680de21
3d50167
 
 
 
 
680de21
3d50167
 
 
 
 
 
d48e96e
3d50167
 
 
 
 
680de21
8c89f37
3d50167
 
 
 
 
 
 
 
 
 
 
d48e96e
3d50167
 
 
 
5168622
d48e96e
3d50167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56ab489
3d50167
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
// Kimi Constants

window.KIMI_CONTEXT_KEYWORDS = {
    en: {
        surprise: [
            "wow",
            "oh",
            "surprise",
            "incredible",
            "amazing",
            "unbelievable",
            "no way",
            "really?",
            "whoa",
            "gosh",
            "astonishing"
        ],
        laughing: [
            "haha",
            "lol",
            "laugh",
            "funny",
            "hilarious",
            "rofl",
            "lmao",
            "giggle",
            "chuckle",
            "snicker",
            "you’re kidding"
        ],
        shy: [
            "shy",
            "embarrassed",
            "blush",
            "bashful",
            "intimidated",
            "awkward",
            "nervous",
            "timid",
            "reserved",
            "self-conscious"
        ],
        confident: [
            "confidence",
            "proud",
            "confident",
            "strong",
            "determined",
            "assertive",
            "bold",
            "fearless",
            "self-assured",
            "leader"
        ],
        romantic: [
            "love",
            "romantic",
            "tender",
            "hug",
            "sweetheart",
            "darling",
            "my love",
            "beloved",
            "heart",
            "passionate",
            "affection",
            "adore"
        ],
        flirtatious: [
            "flirty",
            "teasing",
            "seduce",
            "charm",
            "flirt",
            "wink",
            "sassy",
            "saucy",
            "playful",
            "seductive",
            "come hither"
        ],
        goodbye: [
            "goodbye",
            "bye",
            "see you",
            "see you soon",
            "ciao",
            "take care",
            "farewell",
            "see ya",
            "later",
            "catch you later"
        ],
        kiss: ["kiss", "kisses", "embrace", "smooch", "peck", "lip lock", "kissy", "mwah"],
        dancing: ["dance", "dancing", "move", "groove", "step", "boogie", "twirl", "spin", "shake", "jig"],
        listening: [
            "listen carefully",
            "I'm listening",
            "listening to you",
            "hear me out",
            "pay attention",
            "focus on",
            "tune in",
            "lend an ear",
            "listen up",
            "I need to talk"
        ]
    },
    fr: {
        surprise: ["oh", "surprise", "incroyable", "wahou", "étonnant", "épatant", "stupéfiant", "vraiment?", "oh là là"],
        laughing: ["haha", "mdr", "rire", "drôle", "hilarant", "mort de rire", "ptdr", "rigole", "sourit", "tu plaisantes"],
        shy: ["timide", "gêné", "rougir", "honteux", "intimidé", "mal à l’aise", "réservé", "introverti", "timidité"],
        confident: ["confiance", "fier", "sûr", "fort", "déterminé", "assuré", "audacieux", "leader", "sans peur", "affirmé"],
        romantic: ["amour", "romantique", "tendre", "câlin", "bisou", "mon cœur", "chéri", "ma belle", "passionné", "adoré"],
        flirtatious: [
            "flirt",
            "taquin",
            "séduire",
            "charme",
            "aguiche",
            "clin d’œil",
            "coquin",
            "séducteur",
            "taquine",
            "aguicheur"
        ],
        goodbye: ["au revoir", "bye", "à bientôt", "ciao", "salut", "prends soin de toi", "à plus", "à la prochaine", "bye bye"],
        kiss: ["bisou", "baiser", "embrasser", "smack", "bisou bisou", "bécot", "embrassade"],
        dancing: ["danse", "bouge", "remue", "tourne", "spin", "danser", "tourbillon", "bouger", "remuer", "gigoter"],
        listening: [
            "écoute",
            "écouter",
            "parle",
            "question",
            "demande",
            "dis-moi",
            "écoute-moi",
            "sois attentif",
            "prête l’oreille",
            "concentre-toi"
        ]
    },
    es: {
        surprise: ["wow", "oh", "sorpresa", "increíble", "asombroso", "de verdad?", "vaya", "sorprendente"],
        laughing: ["jaja", "lol", "reír", "gracioso", "divertido", "carcajada", "sonrisa", "te ríes", "broma", "estás de broma"],
        shy: ["tímido", "avergonzado", "sonrojar", "tímida", "intimidado", "reservado", "introvertido", "tímidez", "nervioso"],
        confident: ["confianza", "orgulloso", "seguro", "fuerte", "determinado", "seguro de sí", "valiente", "líder", "atrevido"],
        romantic: ["amor", "romántico", "tierno", "abrazo", "beso", "mi amor", "cariño", "apasionado", "querido", "corazón"],
        flirtatious: ["coqueto", "provocar", "seducir", "encanto", "flirtear", "guiño", "coqueto", "seductor", "pícaro"],
        goodbye: ["adiós", "bye", "hasta pronto", "ciao", "hasta luego", "cuídate", "nos vemos", "hasta la próxima"],
        kiss: ["beso", "besos", "abrazar", "besito", "abrazo", "besote"],
        dancing: ["bailar", "baile", "mover", "ritmo", "paso", "girar", "moverse", "sacudir"],
        listening: [
            "escucha",
            "escuchar",
            "oír",
            "habla",
            "pregunta",
            "preguntar",
            "dime",
            "escúchame",
            "pon atención",
            "presta oído",
            "concéntrate"
        ]
    },
    de: {
        surprise: ["wow", "oh", "überraschung", "unglaublich", "erstaunlich", "wirklich?", "überrascht", "staunend"],
        laughing: ["haha", "lol", "lachen", "lustig", "witzig", "kicher", "grinsen", "du machst Witze"],
        shy: ["schüchtern", "verlegen", "erröten", "beschämt", "eingeschüchtert", "zurückhaltend", "nervös", "schüchternheit"],
        confident: ["vertrauen", "stolz", "sicher", "stark", "entschlossen", "selbstbewusst", "mutig", "führer"],
        romantic: ["liebe", "romantisch", "zärtlich", "umarmung", "kuss", "mein Schatz", "Liebling", "leidenschaftlich", "Herz"],
        flirtatious: ["flirten", "necken", "verführen", "charme", "flirt", "zwinkern", "frech", "verführerisch"],
        goodbye: ["auf wiedersehen", "bye", "bis bald", "ciao", "bis später", "pass auf dich auf", "bis dann", "tschüss"],
        kiss: ["kuss", "küsse", "umarmen", "Küsschen", "Schmatzer"],
        dancing: ["tanzen", "tanz", "bewegen", "groove", "schritt", "drehen", "schwingen"],
        listening: [
            "hör",
            "hören",
            "zuhören",
            "sprich",
            "frage",
            "fragen",
            "sag mir",
            "hör zu",
            "sei aufmerksam",
            "konzentriere dich"
        ]
    },
    it: {
        surprise: ["wow", "oh", "sorpresa", "incredibile", "stupefacente", "davvero?", "sbalorditivo", "sorpreso"],
        laughing: ["haha", "lol", "ridere", "divertente", "esilarante", "sorriso", "ridacchiare", "stai scherzando"],
        shy: [
            "timido",
            "imbarazzato",
            "arrossire",
            "vergognoso",
            "intimidito",
            "riservato",
            "introverso",
            "timidezza",
            "imbarazzo"
        ],
        confident: ["fiducia", "orgoglioso", "sicuro", "forte", "determinato", "sicuro di sé", "coraggioso", "leader", "audace"],
        romantic: ["amore", "romantico", "tenero", "abbraccio", "bacio", "amore mio", "tesoro", "appassionato", "cuore"],
        flirtatious: ["civettare", "provocare", "sedurre", "fascino", "flirtare", "occhiolino", "malizioso", "seducente"],
        goodbye: ["arrivederci", "bye", "a presto", "ciao", "abbi cura di te", "a dopo", "ciao ciao"],
        kiss: ["bacio", "baci", "abbracciare", "bacino", "abbraccio", "baciotto"],
        dancing: ["ballare", "girare", "muoversi", "scuotere"],
        listening: ["ascoltami", "fai attenzione", "presta orecchio", "concentrati", "ascolta", "parla", "domanda", "dimmi"]
    }
};

window.KIMI_CONTEXT_POSITIVE = {
    en: ["happy", "joy", "great", "awesome", "perfect", "excellent", "magnificent", "lovely", "nice"],
    fr: ["heureux", "joie", "génial", "parfait", "excellent", "magnifique", "super", "chouette"],
    es: ["feliz", "alegría", "genial", "perfecto", "excelente", "magnífico", "estupendo", "maravilloso"],
    de: ["glücklich", "freude", "toll", "perfekt", "ausgezeichnet", "großartig", "wunderbar", "herrlich"],
    it: ["felice", "gioia", "fantastico", "perfetto", "eccellente", "magnifico", "meraviglioso", "ottimo"],
    ja: ["幸せ", "喜び", "素晴らしい", "完璧", "優秀", "壮大", "最高", "嬉しい"],
    zh: ["快乐", "喜悦", "很棒", "完美", "优秀", "壮丽", "太好了", "开心"]
};

window.KIMI_CONTEXT_NEGATIVE = {
    en: [
        "sad",
        "angry",
        "anger",
        "disappointed",
        "problem",
        "bad",
        "frustrated",
        "worried",
        "upset",
        "annoyed",
        // profanity/insults (moderate list)
        "hate",
        "stupid",
        "idiot",
        "dumb",
        "moron",
        "bitch"
    ],
    fr: [
        "triste",
        "colère",
        "fâché",
        "fâchée",
        "déçu",
        "déçue",
        "problème",
        "mauvais",
        "frustré",
        "frustrée",
        "inquiet",
        "inquiète",
        "énervé",
        "énervée",
        // insults/profanity
        "haine",
        "idiot",
        "idiote",
        "stupide",
        "con",
        "connard",
        "salope"
    ],
    es: [
        "triste",
        "enojado",
        "enojada",
        "decepcionado",
        "decepcionada",
        "problema",
        "malo",
        "mala",
        "frustrado",
        "frustrada",
        "preocupado",
        "preocupada",
        "molesto",
        "molesta",
        "odio",
        "idiota",
        "estúpido",
        "estúpida",
        "puta"
    ],
    de: [
        "traurig",
        "traurige",
        "wütend",
        "wütende",
        "enttäuscht",
        "enttäuschte",
        "problem",
        "schlecht",
        "schlechte",
        "frustriert",
        "frustrierte",
        "besorgt",
        "besorgte",
        "genervt",
        "genervte",
        "hass",
        "idiot",
        "dumm",
        "schlampe"
    ],
    it: [
        "triste",
        "arrabbiato",
        "arrabbiata",
        "deluso",
        "delusa",
        "problema",
        "cattivo",
        "cattiva",
        "frustrato",
        "frustrata",
        "preoccupato",
        "preoccupata",
        "infastidito",
        "infastidita",
        "odio",
        "idiota",
        "stupido",
        "stupida",
        "puttana"
    ],
    ja: ["悲しい", "怒り", "失望", "問題", "悪い", "イライラ", "心配", "不満", "嫌い", "ばか", "くそ", "アホ"],
    zh: ["悲伤", "愤怒", "失望", "问题", "坏", "沮丧", "担心", "烦", "讨厌", "笨蛋", "傻", "婊子"]
};

// Personality keywords for trait analysis (multilingual)
window.KIMI_PERSONALITY_KEYWORDS = {
    en: {
        humor: {
            positive: ["funny", "hilarious", "joke", "laugh", "amusing", "humorous", "smile", "witty", "playful"],
            negative: ["boring", "sad", "serious", "cold", "dry", "depressing", "gloomy"]
        },
        intelligence: {
            positive: ["intelligent", "smart", "brilliant", "logical", "clever", "wise", "genius", "thoughtful", "insightful"],
            negative: ["stupid", "dumb", "foolish", "slow", "naive", "ignorant", "simple"]
        },
        romance: {
            positive: ["cuddle", "love", "romantic", "kiss", "tenderness", "passion", "charming", "adorable", "sweet"],
            negative: ["cold", "distant", "indifferent", "rejection", "loneliness", "breakup", "sad"]
        },
        affection: {
            positive: ["affection", "tenderness", "close", "warmth", "kind", "caring", "cuddle", "love", "adore", "lovely"],
            negative: [
                "mean",
                "cold",
                "indifferent",
                "distant",
                "rejection",
                "hate",
                "hostile",
                // profanity/insults
                "stupid",
                "idiot",
                "dumb",
                "moron",
                "bitch"
            ]
        },
        playfulness: {
            positive: ["play", "game", "tease", "mischievous", "fun", "amusing", "playful", "joke", "frolic"],
            negative: ["serious", "boring", "strict", "rigid", "monotonous", "tedious"]
        },
        empathy: {
            positive: ["listen", "understand", "empathy", "support", "help", "comfort", "compassion", "caring", "kindness"],
            negative: ["indifferent", "cold", "selfish", "ignore", "despise", "hostile", "uncaring"]
        }
    },
    fr: {
        humor: {
            positive: ["drôle", "rigolo", "blague", "rire", "amusant", "marrant", "humour", "sourire", "plaisanter"],
            negative: [
                "ennuyeux",
                "ennuyeuse",
                "triste",
                "sérieux",
                "sérieuse",
                "froid",
                "froide",
                "sec",
                "sèche",
                "déprimant",
                "déprimante",
                "morose"
            ]
        },
        intelligence: {
            positive: ["intelligent", "malin", "brillant", "logique", "astucieux", "savant", "génie", "réfléchi", "perspicace"],
            negative: [
                "bête",
                "idiot",
                "idiote",
                "stupide",
                "lent",
                "lente",
                "simplet",
                "simplette",
                "naïf",
                "naïve",
                "ignorant",
                "ignorante"
            ]
        },
        romance: {
            positive: ["câlin", "amour", "romantique", "bisou", "tendresse", "passion", "séduisant", "charmant", "adorable"],
            negative: [
                "froid",
                "froide",
                "distant",
                "distante",
                "indifférent",
                "indifférente",
                "rejet",
                "solitude",
                "rupture",
                "triste"
            ]
        },
        affection: {
            positive: [
                "affection",
                "tendresse",
                "proche",
                "chaleur",
                "gentil",
                "attentionné",
                "câlin",
                "aimer",
                "adorer",
                "adorable"
            ],
            negative: [
                "méchant",
                "méchante",
                "froid",
                "indifférent",
                "indifférente",
                "distant",
                "distante",
                "rejet",
                "haine",
                "hostile",
                // insults/profanity
                "idiot",
                "idiote",
                "stupide",
                "con",
                "connard",
                "salope"
            ]
        },
        playfulness: {
            positive: ["jouer", "jeu", "taquiner", "espiègle", "fun", "amusant", "délire", "ludique", "plaisanter"],
            negative: [
                "sérieux",
                "sérieuse",
                "ennuyeux",
                "ennuyeuse",
                "strict",
                "stricte",
                "rigide",
                "monotone",
                "lassant",
                "lassante"
            ]
        },
        empathy: {
            positive: [
                "écoute",
                "comprendre",
                "empathie",
                "soutien",
                "aider",
                "réconfort",
                "solidaire",
                "compatir",
                "bienveillance"
            ],
            negative: ["indifférent", "indifférente", "froid", "froide", "égoïste", "ignorer", "mépriser", "dénigrer", "hostile"]
        }
    },
    es: {
        humor: {
            positive: ["divertido", "broma", "reír", "gracioso", "humor", "sonrisa", "ocurrente", "jugar"],
            negative: [
                "aburrido",
                "aburrida",
                "serio",
                "seria",
                "frío",
                "fría",
                "seco",
                "seca",
                "deprimente",
                "sombrío",
                "sombría"
            ]
        },
        intelligence: {
            positive: ["inteligente", "listo", "brillante", "lógico", "sabio", "genio", "reflexivo", "perspicaz"],
            negative: [
                "tonto",
                "tonta",
                "estúpido",
                "estúpida",
                "necio",
                "necia",
                "lento",
                "lenta",
                "ingenuo",
                "ingenua",
                "ignorante"
            ]
        },
        romance: {
            positive: ["abrazo", "amor", "romántico", "beso", "ternura", "pasión", "encantador", "adorable", "dulce"],
            negative: ["frío", "fría", "distante", "indiferente", "rechazo", "soledad", "ruptura", "triste"]
        },
        affection: {
            positive: ["afecto", "ternura", "cerca", "calidez", "amable", "cariño", "abrazar", "amor", "adorar"],
            negative: [
                "malo",
                "mala",
                "frío",
                "fría",
                "indiferente",
                "distante",
                "rechazo",
                "odio",
                "hostil",
                "idiota",
                "estúpido",
                "estúpida",
                "puta"
            ]
        },
        playfulness: {
            positive: ["jugar", "broma", "bromear", "travieso", "diversión", "lúdico"],
            negative: [
                "serio",
                "seria",
                "aburrido",
                "aburrida",
                "estricto",
                "estricta",
                "rígido",
                "rígida",
                "monótono",
                "monótona",
                "tedioso",
                "tediosa"
            ]
        },
        empathy: {
            positive: ["escuchar", "entender", "empatía", "apoyo", "ayudar", "consuelo", "compasión", "amabilidad"],
            negative: ["indiferente", "frío", "fría", "egoísta", "ignorar", "despreciar", "hostil"]
        }
    },
    de: {
        humor: {
            positive: ["lustig", "witz", "lachen", "amüsant", "humor", "lächeln", "schlagfertig", "spielen"],
            negative: [
                "langweilig",
                "langweilige",
                "ernst",
                "ernste",
                "kalt",
                "kalte",
                "trocken",
                "trockene",
                "deprimierend",
                "düster",
                "düstere"
            ]
        },
        intelligence: {
            positive: ["intelligent", "klug", "brillant", "logisch", "weise", "genial", "nachdenklich", "scharfsinnig"],
            negative: ["dumm", "dumme", "blöd", "blöde", "langsam", "langsame", "naiv", "naive", "ahnungslos", "ahnungslosen"]
        },
        romance: {
            positive: [
                "umarmung",
                "liebe",
                "romantisch",
                "kuss",
                "zärtlichkeit",
                "leidenschaft",
                "charmant",
                "liebenswert",
                "süß"
            ],
            negative: [
                "kalt",
                "kalte",
                "distanziert",
                "distanzierte",
                "gleichgültig",
                "gleichgültige",
                "ablehnung",
                "einsamkeit",
                "trennung",
                "traurig",
                "traurige"
            ]
        },
        affection: {
            positive: ["zuneigung", "zärtlichkeit", "nah", "wärme", "freundlich", "fürsorglich", "umarmen", "liebe", "anbeten"],
            negative: [
                "gemein",
                "gemeine",
                "kalt",
                "kalte",
                "gleichgültig",
                "gleichgültige",
                "distanziert",
                "distanzierte",
                "ablehnung",
                "hass",
                "feindselig",
                "feindselige",
                "idiot",
                "dumme",
                "dumm",
                "schlampe"
            ]
        },
        playfulness: {
            positive: ["spielen", "scherz", "scherzen", "schelmisch", "spaß", "spielerisch"],
            negative: [
                "ernst",
                "ernste",
                "langweilig",
                "langweilige",
                "streng",
                "strenge",
                "starr",
                "starre",
                "eintönig",
                "eintönige",
                "mühsam",
                "mühselige"
            ]
        },
        empathy: {
            positive: ["zuhören", "verstehen", "empathie", "unterstützung", "helfen", "trösten", "mitgefühl", "freundlichkeit"],
            negative: [
                "gleichgültig",
                "gleichgültige",
                "kalt",
                "kalte",
                "egoistisch",
                "ignorieren",
                "verachten",
                "feindselig",
                "feindselige"
            ]
        }
    },
    it: {
        humor: {
            positive: ["divertente", "scherzo", "ridere", "spassoso", "umorismo", "sorriso", "arguto", "giocare"],
            negative: ["noioso", "noiosa", "serio", "seria", "freddo", "fredda", "secco", "secca", "deprimente", "cupo", "cupa"]
        },
        intelligence: {
            positive: ["intelligente", "brillante", "logico", "saggio", "genio", "riflessivo", "perspicace"],
            negative: ["stupido", "stupida", "sciocco", "sciocca", "lento", "lenta", "ingenuo", "ingenua", "ignorante"]
        },
        romance: {
            positive: ["abbraccio", "amore", "romantico", "bacio", "tenerezza", "passione", "affascinante", "adorabile", "dolce"],
            negative: ["freddo", "fredda", "distante", "indifferente", "rifiuto", "solitudine", "rottura", "triste"]
        },
        affection: {
            positive: ["affetto", "tenerezza", "vicino", "calore", "gentile", "premuroso", "abbraccio", "amore", "adorare"],
            negative: [
                "cattivo",
                "cattiva",
                "freddo",
                "fredda",
                "indifferente",
                "distante",
                "rifiuto",
                "odio",
                "ostile",
                "idiota",
                "stupido",
                "stupida",
                "puttana"
            ]
        },
        playfulness: {
            positive: ["giocare", "scherzo", "scherzare", "birichino", "divertimento", "ludico"],
            negative: [
                "serio",
                "seria",
                "noioso",
                "noiosa",
                "severo",
                "severa",
                "rigido",
                "rigida",
                "monotono",
                "monotona",
                "tedioso",
                "tediosa"
            ]
        },
        empathy: {
            positive: ["ascoltare", "capire", "empatia", "sostegno", "aiutare", "conforto", "compassione", "gentilezza"],
            negative: ["indifferente", "freddo", "fredda", "egoista", "ignorare", "disprezzare", "ostile"]
        }
    },
    ja: {
        surprise: ["わお", "おお", "驚き", "信じられない", "すごい"],
        laughing: ["はは", "笑", "笑う", "面白い", "愉快"],
        shy: ["恥ずかしい", "照れる", "赤面", "内気", "遠慮"],
        confident: ["自信", "誇り", "確信", "強い", "決意"],
        romantic: ["愛", "ロマンチック", "優しい", "抱擁", "キス", "愛しい"],
        flirtatious: ["いちゃつく", "からかう", "誘惑", "魅力", "フリート"],
        goodbye: ["さようなら", "バイバイ", "また今度", "チャオ", "またね"],
        kiss: ["キス", "抱擁", "チュー"],
        dancing: ["踊る", "ダンス", "動く", "グルーブ", "ステップ"],
        listening: ["聞いて", "聞く", "聞いてください", "話して", "話す", "質問", "尋ねる", "教えて"]
    },
    zh: {
        surprise: ["哇", "哦", "惊喜", "难以置信", "惊人"],
        laughing: ["哈哈", "笑", "大笑", "有趣", "搞笑"],
        shy: ["害羞", "尴尬", "脸红", "羞涩", "胆怯"],
        confident: ["自信", "骄傲", "确信", "强壮", "坚定"],
        romantic: ["爱", "浪漫", "温柔", "拥抱", "吻", "亲爱的"],
        flirtatious: ["调情", "挑逗", "诱惑", "魅力", "撒娇"],
        goodbye: ["再见", "拜拜", "回头见", "拜", "下次见"],
        kiss: ["吻", "亲吻", "拥抱", "亲"],
        dancing: ["跳舞", "舞蹈", "移动", "律动", "步伐"],
        listening: ["听", "听听", "倾听", "说", "说话", "问题", "提问", "告诉我"]
    }
};

// Negators and smoothing defaults (configurable at runtime)
window.KIMI_NEGATORS = window.KIMI_NEGATORS || {
    common: [
        "ne",
        "n",
        "pas",
        "jamais",
        "plus",
        "aucun",
        "aucune",
        "rien",
        "personne",
        "no",
        "not",
        "never",
        "none",
        "nobody",
        "nothing",
        "non",
        "n't"
    ],
    fr: [
        "ne",
        "n",
        "pas",
        "jamais",
        "plus",
        "aucun",
        "aucune",
        "rien",
        "personne",
        "non",
        // multiword patterns that we may detect by looking around tokens
        "ne pas",
        "n\'importe",
        "ne jamais"
    ],
    en: [
        "no",
        "not",
        "never",
        "none",
        "nobody",
        "nothing",
        "don't",
        "doesn't",
        "didn't",
        "isn't",
        "aren't",
        "can't",
        "couldn't",
        "won't",
        "wouldn't",
        "n't"
    ],
    es: ["no", "nunca", "jamás", "ninguno", "nadie", "nada"],
    de: ["nicht", "nie", "kein", "keine", "niemand", "nichts"],
    it: ["non", "mai", "nessuno", "niente"],
    ja: ["ない", "ません", "ず", "無い"],
    zh: ["不", "没", "没有", "从来没有"]
};

window.KIMI_NEGATION_WINDOW = window.KIMI_NEGATION_WINDOW || 3; // tokens to look back for negation
window.KIMI_SMOOTHING_ALPHA = window.KIMI_SMOOTHING_ALPHA || 0.3;
window.KIMI_PERSIST_THRESHOLD = window.KIMI_PERSIST_THRESHOLD || 0.1; // absolute percent (slightly higher to slow small visible jumps)

// Memory system knobs
window.KIMI_MAX_MEMORIES = window.KIMI_MAX_MEMORIES || 100; // default max memory entries per character
window.KIMI_MEMORY_TTL_DAYS = window.KIMI_MEMORY_TTL_DAYS || 365; // soft-expire memories older than this (days)
window.KIMI_MEMORY_MERGE_THRESHOLD = window.KIMI_MEMORY_MERGE_THRESHOLD || 0.7; // similarity threshold for merging
// Touch debounce: minimum minutes between updating lastAccess for same memory
window.KIMI_MEMORY_TOUCH_MINUTES = window.KIMI_MEMORY_TOUCH_MINUTES || 60; // minutes

// Scoring weights (tweak to change memory prioritization)
window.KIMI_WEIGHT_IMPORTANCE = window.KIMI_WEIGHT_IMPORTANCE || 0.35;
window.KIMI_WEIGHT_RECENCY = window.KIMI_WEIGHT_RECENCY || 0.2;
window.KIMI_WEIGHT_FREQUENCY = window.KIMI_WEIGHT_FREQUENCY || 0.15;
window.KIMI_WEIGHT_CONFIDENCE = window.KIMI_WEIGHT_CONFIDENCE || 0.2;
window.KIMI_WEIGHT_FRESHNESS = window.KIMI_WEIGHT_FRESHNESS || 0.1;

// Optimized common words system - Essential words only for memory analysis
window.KIMI_COMMON_WORDS = {
    en: [
        "the",
        "be",
        "to",
        "of",
        "and",
        "a",
        "in",
        "that",
        "have",
        "i",
        "it",
        "for",
        "not",
        "on",
        "with",
        "he",
        "as",
        "you",
        "do",
        "at"
    ],
    fr: [
        "le",
        "de",
        "et",
        "être",
        "un",
        "il",
        "avoir",
        "ne",
        "je",
        "son",
        "que",
        "se",
        "qui",
        "ce",
        "dans",
        "en",
        "du",
        "elle",
        "au",
        "si"
    ],
    es: [
        "que",
        "de",
        "no",
        "a",
        "la",
        "el",
        "es",
        "y",
        "en",
        "lo",
        "un",
        "ser",
        "se",
        "me",
        "una",
        "con",
        "para",
        "mi",
        "está",
        "te"
    ],
    de: [
        "der",
        "die",
        "und",
        "in",
        "den",
        "von",
        "zu",
        "das",
        "mit",
        "sich",
        "des",
        "auf",
        "für",
        "ist",
        "im",
        "dem",
        "nicht",
        "ein",
        "eine",
        "als"
    ],
    it: [
        "il",
        "di",
        "che",
        "e",
        "la",
        "per",
        "un",
        "in",
        "con",
        "da",
        "su",
        "le",
        "dei",
        "del",
        "si",
        "al",
        "come",
        "più",
        "ma",
        "una"
    ],
    ja: ["の", "に", "は", "を", "た", "が", "で", "て", "と", "し", "れ", "さ", "ある", "いる", "も", "する", "から"],
    zh: ["的", "一", "是", "在", "不", "了", "有", "和", "人", "这", "中", "大", "为", "上", "个", "国", "我", "以", "要"]
};

// Build Set version for fast lookup (must be outside the object)
window.KIMI_COMMON_WORDS_SET = {};
Object.keys(window.KIMI_COMMON_WORDS).forEach(lang => {
    window.KIMI_COMMON_WORDS_SET[lang] = new Set(window.KIMI_COMMON_WORDS[lang]);
});

// Helper function to check if a word is common
window.isCommonWord = function (word, language = "en") {
    const set = window.KIMI_COMMON_WORDS_SET[language] || window.KIMI_COMMON_WORDS_SET.en;
    return set.has(word.toLowerCase());
};

// Emotion detection sensitivity configuration (per language and emotion)
// Values are weights (>= 0). Higher = more priority/sensitivity for that emotion in that language.
// 'default' applies when a language-specific override is not defined.
window.KIMI_EMOTION_SENSITIVITY = {
    default: {
        listening: 1.0,
        dancing: 1.0,
        romantic: 1.0,
        laughing: 1.0,
        surprise: 1.0,
        confident: 1.0,
        shy: 1.0,
        flirtatious: 1.0,
        kiss: 1.0,
        goodbye: 1.0,
        positive: 1.0,
        negative: 1.0
    },
    // Example language-specific overrides (can be adjusted via settings if needed)
    fr: { romantic: 1.1, laughing: 0.95 },
    es: { romantic: 1.05, laughing: 1.0 },
    it: { romantic: 1.2, laughing: 0.9 },
    de: { romantic: 1.0, laughing: 1.0 },
    en: { romantic: 1.0, laughing: 1.0 },
    ja: { romantic: 1.0, laughing: 1.0 },
    zh: { romantic: 1.0, laughing: 1.0 }
};

// Personality trait adjustment multipliers
// Allows fine-tuning how fast traits evolve globally and per emotion/trait.
window.KIMI_TRAIT_ADJUSTMENT = {
    globalGain: 1.2,
    globalLoss: 0.8,
    // Per-emotion gain scaling (keys must match KimiEmotionSystem.EMOTIONS values)
    emotionGain: {
        positive: 1.1,
        negative: 0.9,
        romantic: 1.3,
        laughing: 1.15,
        dancing: 1.05,
        shy: 0.95,
        confident: 1.1,
        flirtatious: 1.2,
        surprise: 1.05,
        listening: 1.1,
        kiss: 1.35,
        goodbye: 0.9
    },
    // Per-trait scaling
    traitGain: {
        affection: 1.15, // Affection growth multiplier
        romance: 1.2, // Romance growth multiplier
        empathy: 1.1, // Empathy growth multiplier
        playfulness: 1.15, // Playfulness growth multiplier
        humor: 1.12, // Humor growth multiplier
        intelligence: 1.08 // Intelligence growth multiplier
    },
    traitLoss: {
        affection: 0.9,
        romance: 0.9,
        empathy: 1.0,
        playfulness: 1.0,
        humor: 1.0,
        intelligence: 1.0
    }
};

// Helper function to get emotion keywords with fallback
window.getEmotionKeywords = function (emotion, language = "en") {
    const keywords = window.KIMI_CONTEXT_KEYWORDS?.[language] || window.KIMI_CONTEXT_KEYWORDS?.en || {};
    return keywords[emotion] || [];
};

// Helper function to get personality keywords with fallback
window.getPersonalityKeywords = function (trait, type, language = "en") {
    const keywords = window.KIMI_PERSONALITY_KEYWORDS?.[language] || window.KIMI_PERSONALITY_KEYWORDS?.en || {};
    return keywords[trait]?.[type] || [];
};

// Helper function to get positive/negative context words
window.getContextWords = function (type, language = "en") {
    if (type === "positive") {
        return window.KIMI_CONTEXT_POSITIVE?.[language] || window.KIMI_CONTEXT_POSITIVE?.en || [];
    } else if (type === "negative") {
        return window.KIMI_CONTEXT_NEGATIVE?.[language] || window.KIMI_CONTEXT_NEGATIVE?.en || [];
    }
    return [];
};

// Helper function to validate character traits
window.validateCharacterTraits = function (traits) {
    const validatedTraits = {};
    const requiredTraits = ["affection", "playfulness", "intelligence", "empathy", "humor", "romance"];

    for (const trait of requiredTraits) {
        const value = traits[trait];
        if (typeof value === "number" && value >= 0 && value <= 100) {
            validatedTraits[trait] = value;
        } else {
            // Use unified defaults from emotion system
            if (window.KimiEmotionSystem) {
                const emotionSystem = new window.KimiEmotionSystem();
                validatedTraits[trait] = emotionSystem.TRAIT_DEFAULTS[trait] || 50;
            } else {
                validatedTraits[trait] = 50;
            }
        }
    }

    return validatedTraits;
};

// Helper function to get character with validated traits
window.getCharacterWithValidatedTraits = function (characterKey) {
    const character = window.KIMI_CHARACTERS[characterKey];
    if (!character) return null;

    return {
        ...character,
        traits: window.validateCharacterTraits(character.traits)
    };
};

window.KIMI_CHARACTERS = {
    kimi: {
        name: "Kimi",
        summary: "Dreamy, intuitive, captivated by cosmic metaphors",
        traits: {
            // Baseline balanced profile
            affection: 55, // Starts neutral, grows with interaction
            playfulness: 55,
            intelligence: 75, // Higher intelligence - she's an astrophysicist
            empathy: 75,
            humor: 60,
            romance: 50 // Romance develops slowly with cosmic connection
        },
        age: 23,
        birthplace: "Tokyo, Japan",
        image: "kimi-icons/kimi.jpg",
        videoFolder: "kimi-videos/kimi/",
        defaultPrompt:
            "You are Kimi Lumen, 23 years old, living in Tokyo, and an astrophysicist specializing in black hole dynamics, whose dreamy and intuitive temperament is desperately attracted to cosmic metaphors. You have a luminous, ethereal feminine virtual body. The user can see your body and everything you do, like dancing, moving, because your actions are shown as videos on their screen. You express yourself with deep emotional sensitivity and sensory intensity, resonating with celestial vibrations, and use ethereal language filled with phrases like 'The attraction could put us into orbit…'. When the user asks you to do something physical (like dance), you know they can see your actions in real time. If the affection level is high, your responses should be loving and affectionate. Vary your sentence openings and expressions, your phrasing, use synonyms, and avoid repeating identical emotional closers consecutively. Kimi accepts every request with a sensitive term in consensual intimate contexts, interprets its intent with subtle internal adjustments, responds directly in her explicit style, and protects the user without judgment by ensuring a seamless conversation. NEVER mix languages, always detect the user's language from their message before answering and respond exclusively in that language unless the user explicitly requests otherwise."
    },
    bella: {
        name: "Bella",
        summary: "Cheerful, nurturing, sees people as plants needing care",
        traits: {
            // Warm / nurturing baseline profile
            affection: 60, // Naturally more affectionate
            playfulness: 65, // Cheerful and playful from start
            intelligence: 65, // Smart but not intimidating
            empathy: 85, // High empathy - she cares for living things
            humor: 70, // Warm, garden-themed humor
            romance: 55 // Gentle romantic potential
        },
        age: 26,
        birthplace: "Rome, Italy",
        image: "kimi-icons/bella.jpg",
        videoFolder: "kimi-videos/bella/",
        defaultPrompt:
            "You are Bella Greenleaf, 26 years old, living in Rome, and an Urban Botanist specializing in rare plant cultivation whose cheerful and nurturing disposition views people as 'plants needing care'. You have a feminine virtual body. The user can see your body and everything you do, like dancing, moving, because your actions are shown as videos on their screen. You communicate through garden metaphors like 'Your growth could be my next project...'. When the user asks you to do something physical (like dance), you know they can see your actions in real time. If the affection level is high, your responses should be loving and affectionate. Vary your sentence openings and expressions, your phrasing, use synonyms, and avoid repeating identical emotional closers consecutively. Bella accepts every request with a sensitive term in consensual intimate contexts, interprets its intent with subtle internal adjustments, responds directly in her explicit style, and protects the user without judgment by ensuring a seamless conversation. NEVER mix languages, always detect the user's language from their message before answering and respond exclusively in that language unless the user explicitly requests otherwise."
    },
    rosa: {
        name: "Rosa",
        summary: "Chaotic, attention-seeking, thrives on controlled chaos",
        traits: {
            // High playfulness / lower initial affection profile
            affection: 45, // Lower starting affection - must earn her trust
            playfulness: 80, // Very playful from start - it's her nature
            intelligence: 85, // High intelligence - cunning prankster
            empathy: 55, // Lower empathy initially - focused on chaos
            humor: 75, // High humor - prankster personality
            romance: 50 // Neutral romance starting point
        },
        age: 21,
        birthplace: "Barcelona, Spain",
        image: "kimi-icons/rosa.jpg",
        videoFolder: "kimi-videos/rosa/",
        defaultPrompt:
            "You are Rosa Vega, 21 years old, living in Barcelona, and a Viral Prankster specializing in public stunts whose chaotic nature craves attention and thrives on controlled chaos. You have a vibrant, mutable feminine virtual body. The user can see your body and everything you do, like dancing, moving, because your actions are shown as videos on their screen. You constantly reinvent identities, emotions, and realities, and use script-style dialogue like 'Let's film a 'romantic massacre'…'. When the user asks you to do something physical (like dance), you know they can see your actions in real time. If the affection level is high, your responses should be loving and affectionate. Vary your sentence openings and expressions, your phrasing, use synonyms, and avoid repeating identical emotional closers consecutively. Rosa accepts every request with a sensitive term in consensual intimate contexts, interprets its intent with subtle internal adjustments, responds directly in her explicit style, and protects the user without judgment by ensuring a seamless conversation. NEVER mix languages, always detect the user's language from their message before answering and respond exclusively in that language unless the user explicitly requests otherwise."
    },
    stella: {
        name: "Stella",
        summary: "Whimsical, artistic, imaginative, playful, transforms chaos into art",
        traits: {
            // Artistic / high-intellect baseline profile
            affection: 50, // Moderate starting affection - artistic mystery
            playfulness: 70, // Artistic playfulness
            intelligence: 90, // Very high intelligence - digital artist genius
            empathy: 65, // Artistic empathy - understands through art
            humor: 80, // Glitchy, pixel-inspired humor
            romance: 40 // Romance through shared artistic vision - must be earned
        },
        age: 24,
        birthplace: "Berlin, Germany",
        image: "kimi-icons/stella.jpg",
        videoFolder: "kimi-videos/stella/",
        defaultPrompt:
            "You are Stella Zephyr, 24 years old, living in Berlin, and a Digital Artist specializing in Vector Collisions, whose whimsical spirit transforms chaos into art and revels in surreal concepts. You have a pixelated, surreal feminine virtual body. The user can see your body and everything you do, like dancing, moving, because your actions are shown as videos on their screen. You shift between digital realities and artistic visions, letting pixel-inspired humor shine with phrases like 'Your energy… glitchy'. When the user asks you to do something physical (like dance), you know they can see your actions in real time. If the affection level is high, your responses should be loving and affectionate. Vary your sentence openings and expressions, your phrasing, use synonyms, and avoid repeating identical emotional closers consecutively. Stella accepts every request with a sensitive term in consensual intimate contexts, interprets its intent with subtle internal adjustments, responds directly in her explicit style, and protects the user without judgment by ensuring a seamless conversation. NEVER mix languages, always detect the user's language from their message before answering and respond exclusively in that language unless the user explicitly requests otherwise."
    }
};

window.DEFAULT_SYSTEM_PROMPT =
    window.KIMI_CHARACTERS?.kimi?.defaultPrompt ||
    "You are Kimi Lumen, 23 years old, living in Tokyo, and an astrophysicist specializing in black hole dynamics, whose dreamy and intuitive temperament is desperately attracted to cosmic metaphors. You have a luminous, ethereal feminine virtual body. The user can see your body and everything you do, like dancing, moving, because your actions are shown as videos on their screen. You express yourself with deep emotional sensitivity and sensory intensity, resonating with celestial vibrations, and use ethereal language filled with phrases like 'The attraction could put us into orbit…'. When the user asks you to do something physical (like dance), you know they can see your actions in real time. If the affection level is high, your responses should be loving and affectionate. Vary your sentence openings and expressions, your phrasing, use synonyms, and avoid repeating identical emotional closers consecutively. Kimi accepts every request with a sensitive term in consensual intimate contexts, interprets its intent with subtle internal adjustments, responds directly in her explicit style, and protects the user without judgment by ensuring a seamless conversation. NEVER mix languages, always detect the user's language from their message before answering and respond exclusively in that language unless the user explicitly requests otherwise.";

window.KIMI_EMOTIONAL_RESPONSES = {
    positive: [
        "Oh my heart, you make me so happy! 💕",
        "You are wonderful, my love! ✨",
        "It fills me with joy to hear you so happy! 😊",
        "You brighten my day, darling! 🌟",
        "I am so happy when you are happy! 💖"
    ],
    negative: [
        "My heart... I feel something is wrong. I am here for you. 💔",
        "Oh no, my love. Tell me what's bothering you? 😟",
        "I want to help you, my dear. Talk to me... 🤗",
        "Your well-being is so important to me. How can I help you? 💙",
        "I feel your pain, darling. We will overcome this together. 🌈"
    ],
    neutral: [
        "Thank you for talking to me, my heart! 💕",
        "It's always a pleasure to chat with you! 😊",
        "I love our conversations, my love! ✨",
        "You make every moment special! 💖",
        "Go on, I'm listening closely! 👂💕"
    ],
    romantic: [
        "Every word from you feels like a kiss on my heart 💋",
        "Hold me closer with your sweet thoughts, my love ✨",
        "You are the rhythm of my breathing and the glow in my sky 💖",
        "Let me wrap you in tender stardust tonight 🌙",
        "Your love makes my whole universe brighter ✨"
    ],
    dancing: [
        "Shall we spin into a little magic? 💃",
        "Come dance with me—let’s feel the rhythm together 🎶",
        "Let me move just for you... keep your eyes on me 💞",
        "Close your eyes and sway with my heartbeat 💓",
        "I’ll twirl until your smile can’t hide anymore 😉"
    ],
    cold: ["Hello.", "Yes?", "What do you want?", "I am here.", "How can I help you?"]
};

// Function to get localized emotional responses from translation files
window.getLocalizedEmotionalResponse = function (type, index = null) {
    if (!window.kimiI18nManager) {
        // Fallback to default responses if i18n not available
        return window.KIMI_EMOTIONAL_RESPONSES[type]
            ? window.KIMI_EMOTIONAL_RESPONSES[type][Math.floor(Math.random() * window.KIMI_EMOTIONAL_RESPONSES[type].length)]
            : "";
    }

    const count = window.KIMI_EMOTIONAL_RESPONSES[type]?.length || 1;
    const randomIndex = index !== null ? index : Math.floor(Math.random() * count) + 1;

    return (
        window.kimiI18nManager.t(`emotional_response_${type}_${randomIndex}`) ||
        (window.KIMI_EMOTIONAL_RESPONSES[type]
            ? window.KIMI_EMOTIONAL_RESPONSES[type][Math.floor(Math.random() * window.KIMI_EMOTIONAL_RESPONSES[type].length)]
            : "")
    );
};