@iblai/iblai-js 2.33.2 → 2.33.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -4846,13 +4846,72 @@ var memoryTabLabels$3 = {
|
|
|
4846
4846
|
description: "Configure memory settings for your agent."
|
|
4847
4847
|
},
|
|
4848
4848
|
toggle: {
|
|
4849
|
-
label: "
|
|
4850
|
-
description: "
|
|
4849
|
+
label: "Long-term Memory",
|
|
4850
|
+
description: "Let this agent remember useful details from past conversations — like a returning colleague — so people don't have to repeat themselves. When on, review what it remembers about each person and add shared memories below.",
|
|
4851
|
+
offHint: "Turn it on to let this agent remember details across conversations."
|
|
4852
|
+
},
|
|
4853
|
+
subTabs: {
|
|
4854
|
+
ariaLabel: "Memory sections",
|
|
4855
|
+
personal: "Personal Memories",
|
|
4856
|
+
shared: "Shared Memory"
|
|
4857
|
+
},
|
|
4858
|
+
sharedMemory: {
|
|
4859
|
+
title: "Shared Memory",
|
|
4860
|
+
description: "Facts, rules, and background this agent should always keep in mind. Every person who chats with this agent gets these memories.",
|
|
4861
|
+
gatingHint: "Shared memories reach chats only while Long-term Memory is on for this agent and the person chatting has memory turned on.",
|
|
4862
|
+
addButton: "Add Shared Memory",
|
|
4863
|
+
addButtonShort: "Add",
|
|
4864
|
+
listAriaLabel: "Shared memories",
|
|
4865
|
+
actionsAria: "Shared memory actions",
|
|
4866
|
+
edit: "Edit",
|
|
4867
|
+
"delete": "Delete",
|
|
4868
|
+
loading: "Loading shared memories...",
|
|
4869
|
+
loadError: "Couldn't load this agent's shared memories. Please try again.",
|
|
4870
|
+
unknownAuthor: "Unknown",
|
|
4871
|
+
addedBy: "Added by {name}",
|
|
4872
|
+
empty: {
|
|
4873
|
+
title: "No Shared Memories Yet",
|
|
4874
|
+
description: "Add anything this agent should always keep in mind — how to behave, key facts, or house rules. Every person who chats with this agent gets these memories."
|
|
4875
|
+
},
|
|
4876
|
+
denied: {
|
|
4877
|
+
title: "No Access to Shared Memory",
|
|
4878
|
+
description: "You don't have permission to view this agent's shared memories. Ask an administrator for access."
|
|
4879
|
+
},
|
|
4880
|
+
modal: {
|
|
4881
|
+
addTitle: "Add Shared Memory",
|
|
4882
|
+
editTitle: "Edit Shared Memory",
|
|
4883
|
+
contentLabel: "Memory",
|
|
4884
|
+
placeholder: "Write what this agent should always keep in mind...",
|
|
4885
|
+
charCountMinimum: "{count}/10 characters minimum",
|
|
4886
|
+
charCount: "{count} characters",
|
|
4887
|
+
save: "Save",
|
|
4888
|
+
saving: "Saving...",
|
|
4889
|
+
cancel: "Cancel"
|
|
4890
|
+
},
|
|
4891
|
+
deleteModal: {
|
|
4892
|
+
title: "Delete Shared Memory",
|
|
4893
|
+
description: "Are you sure you want to delete this shared memory? Everyone who chats with this agent will stop seeing it. This action cannot be undone.",
|
|
4894
|
+
"delete": "Delete",
|
|
4895
|
+
deleting: "Deleting...",
|
|
4896
|
+
cancel: "Cancel"
|
|
4897
|
+
},
|
|
4898
|
+
errors: {
|
|
4899
|
+
duplicate: "This shared memory already exists.",
|
|
4900
|
+
tooShort: "A shared memory must be at least 10 characters.",
|
|
4901
|
+
forbidden: "You don't have permission to change this agent's shared memories."
|
|
4902
|
+
},
|
|
4903
|
+
toasts: {
|
|
4904
|
+
created: "Shared memory added",
|
|
4905
|
+
updated: "Shared memory updated",
|
|
4906
|
+
deleted: "Shared memory deleted",
|
|
4907
|
+
saveError: "Couldn't save shared memory",
|
|
4908
|
+
deleteError: "Couldn't delete shared memory"
|
|
4909
|
+
}
|
|
4851
4910
|
},
|
|
4852
4911
|
toasts: {
|
|
4853
|
-
enableSuccess: "Memory
|
|
4854
|
-
disableSuccess: "Memory
|
|
4855
|
-
toggleError: "
|
|
4912
|
+
enableSuccess: "Memory turned on",
|
|
4913
|
+
disableSuccess: "Memory turned off",
|
|
4914
|
+
toggleError: "Couldn't update memory setting"
|
|
4856
4915
|
}
|
|
4857
4916
|
};
|
|
4858
4917
|
var memoryTabLearnersMemories$3 = {
|
|
@@ -4916,7 +4975,10 @@ var memoryTabManageMemories$3 = {
|
|
|
4916
4975
|
memoryUpdatedSuccessfully: "Memory updated successfully",
|
|
4917
4976
|
failedToUpdateMemory: "Failed to update memory",
|
|
4918
4977
|
memoryCreatedSuccessfully: "Memory created successfully",
|
|
4919
|
-
failedToCreateMemory: "Failed to create memory"
|
|
4978
|
+
failedToCreateMemory: "Failed to create memory",
|
|
4979
|
+
savedMemoriesAriaLabel: "Saved memories",
|
|
4980
|
+
memoryActionsAriaLabel: "Memory actions",
|
|
4981
|
+
memoryCategoriesAriaLabel: "Memory categories"
|
|
4920
4982
|
};
|
|
4921
4983
|
var memoryTabSavedMemoriesModal$3 = {
|
|
4922
4984
|
savedMemories: "Saved Memories",
|
|
@@ -12744,13 +12806,72 @@ var memoryTabLabels$2 = {
|
|
|
12744
12806
|
description: "Configurez les paramètres de mémoire de votre agent."
|
|
12745
12807
|
},
|
|
12746
12808
|
toggle: {
|
|
12747
|
-
label: "
|
|
12748
|
-
description: "
|
|
12809
|
+
label: "Mémoire à long terme",
|
|
12810
|
+
description: "Permettez à cet agent de retenir les détails utiles des conversations passées — comme un collègue qui vous connaît déjà — pour que personne n'ait à se répéter. Une fois activée, consultez ci-dessous ce qu'il retient de chaque personne et ajoutez des souvenirs partagés.",
|
|
12811
|
+
offHint: "Activez-la pour que cet agent retienne des détails d'une conversation à l'autre."
|
|
12812
|
+
},
|
|
12813
|
+
subTabs: {
|
|
12814
|
+
ariaLabel: "Sections de la mémoire",
|
|
12815
|
+
personal: "Souvenirs personnels",
|
|
12816
|
+
shared: "Mémoire partagée"
|
|
12817
|
+
},
|
|
12818
|
+
sharedMemory: {
|
|
12819
|
+
title: "Mémoire partagée",
|
|
12820
|
+
description: "Faits, règles et contexte que cet agent doit toujours garder à l'esprit. Chaque personne qui discute avec cet agent bénéficie de ces souvenirs.",
|
|
12821
|
+
gatingHint: "Les souvenirs partagés n'atteignent les conversations que lorsque la mémoire à long terme est activée pour cet agent et que la personne qui discute a activé sa mémoire.",
|
|
12822
|
+
addButton: "Ajouter un souvenir partagé",
|
|
12823
|
+
addButtonShort: "Ajouter",
|
|
12824
|
+
listAriaLabel: "Souvenirs partagés",
|
|
12825
|
+
actionsAria: "Actions sur le souvenir partagé",
|
|
12826
|
+
edit: "Modifier",
|
|
12827
|
+
"delete": "Supprimer",
|
|
12828
|
+
loading: "Chargement des souvenirs partagés...",
|
|
12829
|
+
loadError: "Impossible de charger les souvenirs partagés de cet agent. Veuillez réessayer.",
|
|
12830
|
+
unknownAuthor: "Inconnu",
|
|
12831
|
+
addedBy: "Ajouté par {name}",
|
|
12832
|
+
empty: {
|
|
12833
|
+
title: "Aucun souvenir partagé pour l'instant",
|
|
12834
|
+
description: "Ajoutez tout ce que cet agent doit toujours garder à l'esprit — comment se comporter, faits essentiels ou règles internes. Chaque personne qui discute avec cet agent bénéficie de ces souvenirs."
|
|
12835
|
+
},
|
|
12836
|
+
denied: {
|
|
12837
|
+
title: "Pas d'accès à la mémoire partagée",
|
|
12838
|
+
description: "Vous n'avez pas la permission de voir les souvenirs partagés de cet agent. Demandez l'accès à un administrateur."
|
|
12839
|
+
},
|
|
12840
|
+
modal: {
|
|
12841
|
+
addTitle: "Ajouter un souvenir partagé",
|
|
12842
|
+
editTitle: "Modifier le souvenir partagé",
|
|
12843
|
+
contentLabel: "Souvenir",
|
|
12844
|
+
placeholder: "Écrivez ce que cet agent doit toujours garder à l'esprit...",
|
|
12845
|
+
charCountMinimum: "{count}/10 caractères minimum",
|
|
12846
|
+
charCount: "{count} caractères",
|
|
12847
|
+
save: "Enregistrer",
|
|
12848
|
+
saving: "Enregistrement...",
|
|
12849
|
+
cancel: "Annuler"
|
|
12850
|
+
},
|
|
12851
|
+
deleteModal: {
|
|
12852
|
+
title: "Supprimer le souvenir partagé",
|
|
12853
|
+
description: "Voulez-vous vraiment supprimer ce souvenir partagé ? Tous ceux qui discutent avec cet agent cesseront de le voir. Cette action est irréversible.",
|
|
12854
|
+
"delete": "Supprimer",
|
|
12855
|
+
deleting: "Suppression...",
|
|
12856
|
+
cancel: "Annuler"
|
|
12857
|
+
},
|
|
12858
|
+
errors: {
|
|
12859
|
+
duplicate: "Ce souvenir partagé existe déjà.",
|
|
12860
|
+
tooShort: "Un souvenir partagé doit comporter au moins 10 caractères.",
|
|
12861
|
+
forbidden: "Vous n'avez pas la permission de modifier les souvenirs partagés de cet agent."
|
|
12862
|
+
},
|
|
12863
|
+
toasts: {
|
|
12864
|
+
created: "Souvenir partagé ajouté",
|
|
12865
|
+
updated: "Souvenir partagé mis à jour",
|
|
12866
|
+
deleted: "Souvenir partagé supprimé",
|
|
12867
|
+
saveError: "Impossible d'enregistrer le souvenir partagé",
|
|
12868
|
+
deleteError: "Impossible de supprimer le souvenir partagé"
|
|
12869
|
+
}
|
|
12749
12870
|
},
|
|
12750
12871
|
toasts: {
|
|
12751
12872
|
enableSuccess: "Mémoire activée",
|
|
12752
12873
|
disableSuccess: "Mémoire désactivée",
|
|
12753
|
-
toggleError: "
|
|
12874
|
+
toggleError: "Impossible de mettre à jour le paramètre de mémoire"
|
|
12754
12875
|
}
|
|
12755
12876
|
};
|
|
12756
12877
|
var memoryTabLearnersMemories$2 = {
|
|
@@ -12814,7 +12935,10 @@ var memoryTabManageMemories$2 = {
|
|
|
12814
12935
|
memoryUpdatedSuccessfully: "Souvenir mis à jour avec succès",
|
|
12815
12936
|
failedToUpdateMemory: "Échec de la mise à jour du souvenir",
|
|
12816
12937
|
memoryCreatedSuccessfully: "Souvenir créé avec succès",
|
|
12817
|
-
failedToCreateMemory: "Échec de la création du souvenir"
|
|
12938
|
+
failedToCreateMemory: "Échec de la création du souvenir",
|
|
12939
|
+
savedMemoriesAriaLabel: "Souvenirs enregistrés",
|
|
12940
|
+
memoryActionsAriaLabel: "Actions sur le souvenir",
|
|
12941
|
+
memoryCategoriesAriaLabel: "Catégories de souvenirs"
|
|
12818
12942
|
};
|
|
12819
12943
|
var memoryTabSavedMemoriesModal$2 = {
|
|
12820
12944
|
savedMemories: "Souvenirs enregistrés",
|
|
@@ -16795,7 +16919,7 @@ var accessibility$2 = {
|
|
|
16795
16919
|
positionAnnouncement: "Bouton d'accessibilité déplacé vers le bord {side, select, left {gauche} other {droit}}, à {bottom} pixels du bas."
|
|
16796
16920
|
}
|
|
16797
16921
|
};
|
|
16798
|
-
var fr = {
|
|
16922
|
+
var fr$1 = {
|
|
16799
16923
|
accessTabAddAccess: accessTabAddAccess$2,
|
|
16800
16924
|
accessTabLabels: accessTabLabels$2,
|
|
16801
16925
|
accessTabUpdateAccess: accessTabUpdateAccess$2,
|
|
@@ -20473,16 +20597,75 @@ var memoryTabEditMemoryModal$1 = {
|
|
|
20473
20597
|
var memoryTabLabels$1 = {
|
|
20474
20598
|
header: {
|
|
20475
20599
|
title: "Memoria",
|
|
20476
|
-
description: "
|
|
20600
|
+
description: "Configura los ajustes de memoria de tu agente."
|
|
20477
20601
|
},
|
|
20478
20602
|
toggle: {
|
|
20479
|
-
label: "
|
|
20480
|
-
description: "
|
|
20603
|
+
label: "Memoria a largo plazo",
|
|
20604
|
+
description: "Permite que este agente recuerde detalles útiles de conversaciones anteriores — como un colega que ya te conoce — para que nadie tenga que repetirse. Cuando está activada, revisa a continuación lo que recuerda de cada persona y agrega memorias compartidas.",
|
|
20605
|
+
offHint: "Actívala para que este agente recuerde detalles de una conversación a otra."
|
|
20606
|
+
},
|
|
20607
|
+
subTabs: {
|
|
20608
|
+
ariaLabel: "Secciones de memoria",
|
|
20609
|
+
personal: "Memorias personales",
|
|
20610
|
+
shared: "Memoria compartida"
|
|
20611
|
+
},
|
|
20612
|
+
sharedMemory: {
|
|
20613
|
+
title: "Memoria compartida",
|
|
20614
|
+
description: "Hechos, reglas y contexto que este agente debe tener siempre presentes. Todas las personas que chatean con este agente reciben estas memorias.",
|
|
20615
|
+
gatingHint: "Las memorias compartidas llegan a los chats solo mientras la memoria a largo plazo esté activada para este agente y la persona que chatea tenga la memoria activada.",
|
|
20616
|
+
addButton: "Agregar memoria compartida",
|
|
20617
|
+
addButtonShort: "Agregar",
|
|
20618
|
+
listAriaLabel: "Memorias compartidas",
|
|
20619
|
+
actionsAria: "Acciones de memoria compartida",
|
|
20620
|
+
edit: "Editar",
|
|
20621
|
+
"delete": "Eliminar",
|
|
20622
|
+
loading: "Cargando memorias compartidas...",
|
|
20623
|
+
loadError: "No se pudieron cargar las memorias compartidas de este agente. Inténtalo de nuevo.",
|
|
20624
|
+
unknownAuthor: "Desconocido",
|
|
20625
|
+
addedBy: "Agregado por {name}",
|
|
20626
|
+
empty: {
|
|
20627
|
+
title: "Aún no hay memorias compartidas",
|
|
20628
|
+
description: "Agrega todo lo que este agente debe tener siempre presente: cómo comportarse, hechos clave o reglas internas. Todas las personas que chatean con este agente reciben estas memorias."
|
|
20629
|
+
},
|
|
20630
|
+
denied: {
|
|
20631
|
+
title: "Sin acceso a la memoria compartida",
|
|
20632
|
+
description: "No tienes permiso para ver las memorias compartidas de este agente. Pide acceso a un administrador."
|
|
20633
|
+
},
|
|
20634
|
+
modal: {
|
|
20635
|
+
addTitle: "Agregar memoria compartida",
|
|
20636
|
+
editTitle: "Editar memoria compartida",
|
|
20637
|
+
contentLabel: "Memoria",
|
|
20638
|
+
placeholder: "Escribe lo que este agente debe tener siempre presente...",
|
|
20639
|
+
charCountMinimum: "{count}/10 caracteres mínimo",
|
|
20640
|
+
charCount: "{count} caracteres",
|
|
20641
|
+
save: "Guardar",
|
|
20642
|
+
saving: "Guardando...",
|
|
20643
|
+
cancel: "Cancelar"
|
|
20644
|
+
},
|
|
20645
|
+
deleteModal: {
|
|
20646
|
+
title: "Eliminar memoria compartida",
|
|
20647
|
+
description: "¿Seguro que quieres eliminar esta memoria compartida? Todas las personas que chatean con este agente dejarán de verla. Esta acción no se puede deshacer.",
|
|
20648
|
+
"delete": "Eliminar",
|
|
20649
|
+
deleting: "Eliminando...",
|
|
20650
|
+
cancel: "Cancelar"
|
|
20651
|
+
},
|
|
20652
|
+
errors: {
|
|
20653
|
+
duplicate: "Esta memoria compartida ya existe.",
|
|
20654
|
+
tooShort: "Una memoria compartida debe tener al menos 10 caracteres.",
|
|
20655
|
+
forbidden: "No tienes permiso para cambiar las memorias compartidas de este agente."
|
|
20656
|
+
},
|
|
20657
|
+
toasts: {
|
|
20658
|
+
created: "Memoria compartida agregada",
|
|
20659
|
+
updated: "Memoria compartida actualizada",
|
|
20660
|
+
deleted: "Memoria compartida eliminada",
|
|
20661
|
+
saveError: "No se pudo guardar la memoria compartida",
|
|
20662
|
+
deleteError: "No se pudo eliminar la memoria compartida"
|
|
20663
|
+
}
|
|
20481
20664
|
},
|
|
20482
20665
|
toasts: {
|
|
20483
20666
|
enableSuccess: "Memoria activada",
|
|
20484
20667
|
disableSuccess: "Memoria desactivada",
|
|
20485
|
-
toggleError: "
|
|
20668
|
+
toggleError: "No se pudo actualizar el ajuste de memoria"
|
|
20486
20669
|
}
|
|
20487
20670
|
};
|
|
20488
20671
|
var memoryTabLearnersMemories$1 = {
|
|
@@ -20546,7 +20729,10 @@ var memoryTabManageMemories$1 = {
|
|
|
20546
20729
|
memoryUpdatedSuccessfully: "Memoria actualizada correctamente",
|
|
20547
20730
|
failedToUpdateMemory: "Error al actualizar la memoria",
|
|
20548
20731
|
memoryCreatedSuccessfully: "Memoria creada correctamente",
|
|
20549
|
-
failedToCreateMemory: "Error al crear la memoria"
|
|
20732
|
+
failedToCreateMemory: "Error al crear la memoria",
|
|
20733
|
+
savedMemoriesAriaLabel: "Memorias guardadas",
|
|
20734
|
+
memoryActionsAriaLabel: "Acciones de memoria",
|
|
20735
|
+
memoryCategoriesAriaLabel: "Categorías de memoria"
|
|
20550
20736
|
};
|
|
20551
20737
|
var memoryTabSavedMemoriesModal$1 = {
|
|
20552
20738
|
savedMemories: "Memorias guardadas",
|
|
@@ -24527,7 +24713,7 @@ var accessibility$1 = {
|
|
|
24527
24713
|
positionAnnouncement: "Botón de accesibilidad movido al borde {side, select, left {izquierdo} other {derecho}}, a {bottom} píxeles de la parte inferior."
|
|
24528
24714
|
}
|
|
24529
24715
|
};
|
|
24530
|
-
var es = {
|
|
24716
|
+
var es$1 = {
|
|
24531
24717
|
accessTabAddAccess: accessTabAddAccess$1,
|
|
24532
24718
|
accessTabLabels: accessTabLabels$1,
|
|
24533
24719
|
accessTabUpdateAccess: accessTabUpdateAccess$1,
|
|
@@ -28208,13 +28394,72 @@ var memoryTabLabels = {
|
|
|
28208
28394
|
description: "配置您的智能体的记忆设置。"
|
|
28209
28395
|
},
|
|
28210
28396
|
toggle: {
|
|
28211
|
-
label: "
|
|
28212
|
-
description: "
|
|
28397
|
+
label: "长期记忆",
|
|
28398
|
+
description: "让此智能体记住过去对话中的有用细节——就像一位熟悉情况的老同事——这样大家就不必重复说明。开启后,可在下方查看它对每个人的记忆并添加共享记忆。",
|
|
28399
|
+
offHint: "开启后,此智能体就能跨对话记住细节。"
|
|
28400
|
+
},
|
|
28401
|
+
subTabs: {
|
|
28402
|
+
ariaLabel: "记忆分区",
|
|
28403
|
+
personal: "个人记忆",
|
|
28404
|
+
shared: "共享记忆"
|
|
28405
|
+
},
|
|
28406
|
+
sharedMemory: {
|
|
28407
|
+
title: "共享记忆",
|
|
28408
|
+
description: "此智能体应始终牢记的事实、规则和背景信息。所有与此智能体聊天的人都会获得这些记忆。",
|
|
28409
|
+
gatingHint: "只有在此智能体开启长期记忆、且聊天者也开启了记忆时,共享记忆才会用于聊天。",
|
|
28410
|
+
addButton: "添加共享记忆",
|
|
28411
|
+
addButtonShort: "添加",
|
|
28412
|
+
listAriaLabel: "共享记忆",
|
|
28413
|
+
actionsAria: "共享记忆操作",
|
|
28414
|
+
edit: "编辑",
|
|
28415
|
+
"delete": "删除",
|
|
28416
|
+
loading: "加载共享记忆中...",
|
|
28417
|
+
loadError: "无法加载此智能体的共享记忆。请重试。",
|
|
28418
|
+
unknownAuthor: "未知",
|
|
28419
|
+
addedBy: "由 {name} 添加",
|
|
28420
|
+
empty: {
|
|
28421
|
+
title: "暂无共享记忆",
|
|
28422
|
+
description: "添加此智能体应始终牢记的内容——行为方式、关键事实或内部规则。所有与此智能体聊天的人都会获得这些记忆。"
|
|
28423
|
+
},
|
|
28424
|
+
denied: {
|
|
28425
|
+
title: "无权访问共享记忆",
|
|
28426
|
+
description: "您没有权限查看此智能体的共享记忆。请向管理员申请访问权限。"
|
|
28427
|
+
},
|
|
28428
|
+
modal: {
|
|
28429
|
+
addTitle: "添加共享记忆",
|
|
28430
|
+
editTitle: "编辑共享记忆",
|
|
28431
|
+
contentLabel: "记忆",
|
|
28432
|
+
placeholder: "写下此智能体应始终牢记的内容...",
|
|
28433
|
+
charCountMinimum: "{count}/10 个字符(最少)",
|
|
28434
|
+
charCount: "{count} 个字符",
|
|
28435
|
+
save: "保存",
|
|
28436
|
+
saving: "保存中...",
|
|
28437
|
+
cancel: "取消"
|
|
28438
|
+
},
|
|
28439
|
+
deleteModal: {
|
|
28440
|
+
title: "删除共享记忆",
|
|
28441
|
+
description: "确定要删除这条共享记忆吗?所有与此智能体聊天的人将不再看到它。此操作无法撤销。",
|
|
28442
|
+
"delete": "删除",
|
|
28443
|
+
deleting: "删除中...",
|
|
28444
|
+
cancel: "取消"
|
|
28445
|
+
},
|
|
28446
|
+
errors: {
|
|
28447
|
+
duplicate: "这条共享记忆已存在。",
|
|
28448
|
+
tooShort: "共享记忆至少需要 10 个字符。",
|
|
28449
|
+
forbidden: "您没有权限更改此智能体的共享记忆。"
|
|
28450
|
+
},
|
|
28451
|
+
toasts: {
|
|
28452
|
+
created: "共享记忆已添加",
|
|
28453
|
+
updated: "共享记忆已更新",
|
|
28454
|
+
deleted: "共享记忆已删除",
|
|
28455
|
+
saveError: "无法保存共享记忆",
|
|
28456
|
+
deleteError: "无法删除共享记忆"
|
|
28457
|
+
}
|
|
28213
28458
|
},
|
|
28214
28459
|
toasts: {
|
|
28215
|
-
enableSuccess: "
|
|
28216
|
-
disableSuccess: "
|
|
28217
|
-
toggleError: "
|
|
28460
|
+
enableSuccess: "记忆已开启",
|
|
28461
|
+
disableSuccess: "记忆已关闭",
|
|
28462
|
+
toggleError: "无法更新记忆设置"
|
|
28218
28463
|
}
|
|
28219
28464
|
};
|
|
28220
28465
|
var memoryTabLearnersMemories = {
|
|
@@ -28278,7 +28523,10 @@ var memoryTabManageMemories = {
|
|
|
28278
28523
|
memoryUpdatedSuccessfully: "记忆已成功更新",
|
|
28279
28524
|
failedToUpdateMemory: "更新记忆失败",
|
|
28280
28525
|
memoryCreatedSuccessfully: "记忆已成功创建",
|
|
28281
|
-
failedToCreateMemory: "创建记忆失败"
|
|
28526
|
+
failedToCreateMemory: "创建记忆失败",
|
|
28527
|
+
savedMemoriesAriaLabel: "已保存的记忆",
|
|
28528
|
+
memoryActionsAriaLabel: "记忆操作",
|
|
28529
|
+
memoryCategoriesAriaLabel: "记忆分类"
|
|
28282
28530
|
};
|
|
28283
28531
|
var memoryTabSavedMemoriesModal = {
|
|
28284
28532
|
savedMemories: "已保存的记忆",
|
|
@@ -32564,8 +32812,8 @@ var zh = {
|
|
|
32564
32812
|
*/
|
|
32565
32813
|
const CATALOGS = {
|
|
32566
32814
|
en: en,
|
|
32567
|
-
fr: fr,
|
|
32568
|
-
es: es,
|
|
32815
|
+
fr: fr$1,
|
|
32816
|
+
es: es$1,
|
|
32569
32817
|
zh: zh,
|
|
32570
32818
|
};
|
|
32571
32819
|
/**
|
|
@@ -34525,7 +34773,7 @@ function endOfISOWeek(date, options) {
|
|
|
34525
34773
|
return endOfWeek(date, { ...options, weekStartsOn: 1 });
|
|
34526
34774
|
}
|
|
34527
34775
|
|
|
34528
|
-
const formatDistanceLocale = {
|
|
34776
|
+
const formatDistanceLocale$3 = {
|
|
34529
34777
|
lessThanXSeconds: {
|
|
34530
34778
|
one: "less than a second",
|
|
34531
34779
|
other: "less than {{count}} seconds",
|
|
@@ -34604,10 +34852,10 @@ const formatDistanceLocale = {
|
|
|
34604
34852
|
},
|
|
34605
34853
|
};
|
|
34606
34854
|
|
|
34607
|
-
const formatDistance$
|
|
34855
|
+
const formatDistance$4 = (token, count, options) => {
|
|
34608
34856
|
let result;
|
|
34609
34857
|
|
|
34610
|
-
const tokenValue = formatDistanceLocale[token];
|
|
34858
|
+
const tokenValue = formatDistanceLocale$3[token];
|
|
34611
34859
|
if (typeof tokenValue === "string") {
|
|
34612
34860
|
result = tokenValue;
|
|
34613
34861
|
} else if (count === 1) {
|
|
@@ -34636,45 +34884,45 @@ function buildFormatLongFn(args) {
|
|
|
34636
34884
|
};
|
|
34637
34885
|
}
|
|
34638
34886
|
|
|
34639
|
-
const dateFormats = {
|
|
34887
|
+
const dateFormats$3 = {
|
|
34640
34888
|
full: "EEEE, MMMM do, y",
|
|
34641
34889
|
long: "MMMM do, y",
|
|
34642
34890
|
medium: "MMM d, y",
|
|
34643
34891
|
short: "MM/dd/yyyy",
|
|
34644
34892
|
};
|
|
34645
34893
|
|
|
34646
|
-
const timeFormats = {
|
|
34894
|
+
const timeFormats$3 = {
|
|
34647
34895
|
full: "h:mm:ss a zzzz",
|
|
34648
34896
|
long: "h:mm:ss a z",
|
|
34649
34897
|
medium: "h:mm:ss a",
|
|
34650
34898
|
short: "h:mm a",
|
|
34651
34899
|
};
|
|
34652
34900
|
|
|
34653
|
-
const dateTimeFormats = {
|
|
34901
|
+
const dateTimeFormats$3 = {
|
|
34654
34902
|
full: "{{date}} 'at' {{time}}",
|
|
34655
34903
|
long: "{{date}} 'at' {{time}}",
|
|
34656
34904
|
medium: "{{date}}, {{time}}",
|
|
34657
34905
|
short: "{{date}}, {{time}}",
|
|
34658
34906
|
};
|
|
34659
34907
|
|
|
34660
|
-
const formatLong = {
|
|
34908
|
+
const formatLong$3 = {
|
|
34661
34909
|
date: buildFormatLongFn({
|
|
34662
|
-
formats: dateFormats,
|
|
34910
|
+
formats: dateFormats$3,
|
|
34663
34911
|
defaultWidth: "full",
|
|
34664
34912
|
}),
|
|
34665
34913
|
|
|
34666
34914
|
time: buildFormatLongFn({
|
|
34667
|
-
formats: timeFormats,
|
|
34915
|
+
formats: timeFormats$3,
|
|
34668
34916
|
defaultWidth: "full",
|
|
34669
34917
|
}),
|
|
34670
34918
|
|
|
34671
34919
|
dateTime: buildFormatLongFn({
|
|
34672
|
-
formats: dateTimeFormats,
|
|
34920
|
+
formats: dateTimeFormats$3,
|
|
34673
34921
|
defaultWidth: "full",
|
|
34674
34922
|
}),
|
|
34675
34923
|
};
|
|
34676
34924
|
|
|
34677
|
-
const formatRelativeLocale = {
|
|
34925
|
+
const formatRelativeLocale$3 = {
|
|
34678
34926
|
lastWeek: "'last' eeee 'at' p",
|
|
34679
34927
|
yesterday: "'yesterday at' p",
|
|
34680
34928
|
today: "'today at' p",
|
|
@@ -34683,8 +34931,8 @@ const formatRelativeLocale = {
|
|
|
34683
34931
|
other: "P",
|
|
34684
34932
|
};
|
|
34685
34933
|
|
|
34686
|
-
const formatRelative$
|
|
34687
|
-
formatRelativeLocale[token];
|
|
34934
|
+
const formatRelative$4 = (token, _date, _baseDate, _options) =>
|
|
34935
|
+
formatRelativeLocale$3[token];
|
|
34688
34936
|
|
|
34689
34937
|
/**
|
|
34690
34938
|
* The localize function argument callback which allows to convert raw value to
|
|
@@ -34749,13 +34997,13 @@ function buildLocalizeFn(args) {
|
|
|
34749
34997
|
};
|
|
34750
34998
|
}
|
|
34751
34999
|
|
|
34752
|
-
const eraValues = {
|
|
35000
|
+
const eraValues$3 = {
|
|
34753
35001
|
narrow: ["B", "A"],
|
|
34754
35002
|
abbreviated: ["BC", "AD"],
|
|
34755
35003
|
wide: ["Before Christ", "Anno Domini"],
|
|
34756
35004
|
};
|
|
34757
35005
|
|
|
34758
|
-
const quarterValues = {
|
|
35006
|
+
const quarterValues$3 = {
|
|
34759
35007
|
narrow: ["1", "2", "3", "4"],
|
|
34760
35008
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
34761
35009
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"],
|
|
@@ -34765,7 +35013,7 @@ const quarterValues = {
|
|
|
34765
35013
|
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
34766
35014
|
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
34767
35015
|
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
34768
|
-
const monthValues = {
|
|
35016
|
+
const monthValues$3 = {
|
|
34769
35017
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
34770
35018
|
abbreviated: [
|
|
34771
35019
|
"Jan",
|
|
@@ -34798,7 +35046,7 @@ const monthValues = {
|
|
|
34798
35046
|
],
|
|
34799
35047
|
};
|
|
34800
35048
|
|
|
34801
|
-
const dayValues = {
|
|
35049
|
+
const dayValues$3 = {
|
|
34802
35050
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
34803
35051
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
34804
35052
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -34813,7 +35061,7 @@ const dayValues = {
|
|
|
34813
35061
|
],
|
|
34814
35062
|
};
|
|
34815
35063
|
|
|
34816
|
-
const dayPeriodValues = {
|
|
35064
|
+
const dayPeriodValues$3 = {
|
|
34817
35065
|
narrow: {
|
|
34818
35066
|
am: "a",
|
|
34819
35067
|
pm: "p",
|
|
@@ -34846,7 +35094,7 @@ const dayPeriodValues = {
|
|
|
34846
35094
|
},
|
|
34847
35095
|
};
|
|
34848
35096
|
|
|
34849
|
-
const formattingDayPeriodValues = {
|
|
35097
|
+
const formattingDayPeriodValues$2 = {
|
|
34850
35098
|
narrow: {
|
|
34851
35099
|
am: "a",
|
|
34852
35100
|
pm: "p",
|
|
@@ -34879,7 +35127,7 @@ const formattingDayPeriodValues = {
|
|
|
34879
35127
|
},
|
|
34880
35128
|
};
|
|
34881
35129
|
|
|
34882
|
-
const ordinalNumber = (dirtyNumber, _options) => {
|
|
35130
|
+
const ordinalNumber$3 = (dirtyNumber, _options) => {
|
|
34883
35131
|
const number = Number(dirtyNumber);
|
|
34884
35132
|
|
|
34885
35133
|
// If ordinal numbers depend on context, for example,
|
|
@@ -34903,34 +35151,34 @@ const ordinalNumber = (dirtyNumber, _options) => {
|
|
|
34903
35151
|
return number + "th";
|
|
34904
35152
|
};
|
|
34905
35153
|
|
|
34906
|
-
const localize = {
|
|
34907
|
-
ordinalNumber,
|
|
35154
|
+
const localize$3 = {
|
|
35155
|
+
ordinalNumber: ordinalNumber$3,
|
|
34908
35156
|
|
|
34909
35157
|
era: buildLocalizeFn({
|
|
34910
|
-
values: eraValues,
|
|
35158
|
+
values: eraValues$3,
|
|
34911
35159
|
defaultWidth: "wide",
|
|
34912
35160
|
}),
|
|
34913
35161
|
|
|
34914
35162
|
quarter: buildLocalizeFn({
|
|
34915
|
-
values: quarterValues,
|
|
35163
|
+
values: quarterValues$3,
|
|
34916
35164
|
defaultWidth: "wide",
|
|
34917
35165
|
argumentCallback: (quarter) => quarter - 1,
|
|
34918
35166
|
}),
|
|
34919
35167
|
|
|
34920
35168
|
month: buildLocalizeFn({
|
|
34921
|
-
values: monthValues,
|
|
35169
|
+
values: monthValues$3,
|
|
34922
35170
|
defaultWidth: "wide",
|
|
34923
35171
|
}),
|
|
34924
35172
|
|
|
34925
35173
|
day: buildLocalizeFn({
|
|
34926
|
-
values: dayValues,
|
|
35174
|
+
values: dayValues$3,
|
|
34927
35175
|
defaultWidth: "wide",
|
|
34928
35176
|
}),
|
|
34929
35177
|
|
|
34930
35178
|
dayPeriod: buildLocalizeFn({
|
|
34931
|
-
values: dayPeriodValues,
|
|
35179
|
+
values: dayPeriodValues$3,
|
|
34932
35180
|
defaultWidth: "wide",
|
|
34933
|
-
formattingValues: formattingDayPeriodValues,
|
|
35181
|
+
formattingValues: formattingDayPeriodValues$2,
|
|
34934
35182
|
defaultFormattingWidth: "wide",
|
|
34935
35183
|
}),
|
|
34936
35184
|
};
|
|
@@ -35014,33 +35262,33 @@ function buildMatchPatternFn(args) {
|
|
|
35014
35262
|
};
|
|
35015
35263
|
}
|
|
35016
35264
|
|
|
35017
|
-
const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
35018
|
-
const parseOrdinalNumberPattern = /\d+/i;
|
|
35265
|
+
const matchOrdinalNumberPattern$3 = /^(\d+)(th|st|nd|rd)?/i;
|
|
35266
|
+
const parseOrdinalNumberPattern$3 = /\d+/i;
|
|
35019
35267
|
|
|
35020
|
-
const matchEraPatterns = {
|
|
35268
|
+
const matchEraPatterns$3 = {
|
|
35021
35269
|
narrow: /^(b|a)/i,
|
|
35022
35270
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
35023
35271
|
wide: /^(before christ|before common era|anno domini|common era)/i,
|
|
35024
35272
|
};
|
|
35025
|
-
const parseEraPatterns = {
|
|
35273
|
+
const parseEraPatterns$3 = {
|
|
35026
35274
|
any: [/^b/i, /^(a|c)/i],
|
|
35027
35275
|
};
|
|
35028
35276
|
|
|
35029
|
-
const matchQuarterPatterns = {
|
|
35277
|
+
const matchQuarterPatterns$3 = {
|
|
35030
35278
|
narrow: /^[1234]/i,
|
|
35031
35279
|
abbreviated: /^q[1234]/i,
|
|
35032
35280
|
wide: /^[1234](th|st|nd|rd)? quarter/i,
|
|
35033
35281
|
};
|
|
35034
|
-
const parseQuarterPatterns = {
|
|
35282
|
+
const parseQuarterPatterns$3 = {
|
|
35035
35283
|
any: [/1/i, /2/i, /3/i, /4/i],
|
|
35036
35284
|
};
|
|
35037
35285
|
|
|
35038
|
-
const matchMonthPatterns = {
|
|
35286
|
+
const matchMonthPatterns$3 = {
|
|
35039
35287
|
narrow: /^[jfmasond]/i,
|
|
35040
35288
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
35041
35289
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,
|
|
35042
35290
|
};
|
|
35043
|
-
const parseMonthPatterns = {
|
|
35291
|
+
const parseMonthPatterns$3 = {
|
|
35044
35292
|
narrow: [
|
|
35045
35293
|
/^j/i,
|
|
35046
35294
|
/^f/i,
|
|
@@ -35072,22 +35320,22 @@ const parseMonthPatterns = {
|
|
|
35072
35320
|
],
|
|
35073
35321
|
};
|
|
35074
35322
|
|
|
35075
|
-
const matchDayPatterns = {
|
|
35323
|
+
const matchDayPatterns$3 = {
|
|
35076
35324
|
narrow: /^[smtwf]/i,
|
|
35077
35325
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
35078
35326
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
35079
35327
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,
|
|
35080
35328
|
};
|
|
35081
|
-
const parseDayPatterns = {
|
|
35329
|
+
const parseDayPatterns$3 = {
|
|
35082
35330
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
35083
35331
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],
|
|
35084
35332
|
};
|
|
35085
35333
|
|
|
35086
|
-
const matchDayPeriodPatterns = {
|
|
35334
|
+
const matchDayPeriodPatterns$3 = {
|
|
35087
35335
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
35088
35336
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,
|
|
35089
35337
|
};
|
|
35090
|
-
const parseDayPeriodPatterns = {
|
|
35338
|
+
const parseDayPeriodPatterns$3 = {
|
|
35091
35339
|
any: {
|
|
35092
35340
|
am: /^a/i,
|
|
35093
35341
|
pm: /^p/i,
|
|
@@ -35100,46 +35348,46 @@ const parseDayPeriodPatterns = {
|
|
|
35100
35348
|
},
|
|
35101
35349
|
};
|
|
35102
35350
|
|
|
35103
|
-
const match = {
|
|
35351
|
+
const match$3 = {
|
|
35104
35352
|
ordinalNumber: buildMatchPatternFn({
|
|
35105
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
35106
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
35353
|
+
matchPattern: matchOrdinalNumberPattern$3,
|
|
35354
|
+
parsePattern: parseOrdinalNumberPattern$3,
|
|
35107
35355
|
valueCallback: (value) => parseInt(value, 10),
|
|
35108
35356
|
}),
|
|
35109
35357
|
|
|
35110
35358
|
era: buildMatchFn({
|
|
35111
|
-
matchPatterns: matchEraPatterns,
|
|
35359
|
+
matchPatterns: matchEraPatterns$3,
|
|
35112
35360
|
defaultMatchWidth: "wide",
|
|
35113
|
-
parsePatterns: parseEraPatterns,
|
|
35361
|
+
parsePatterns: parseEraPatterns$3,
|
|
35114
35362
|
defaultParseWidth: "any",
|
|
35115
35363
|
}),
|
|
35116
35364
|
|
|
35117
35365
|
quarter: buildMatchFn({
|
|
35118
|
-
matchPatterns: matchQuarterPatterns,
|
|
35366
|
+
matchPatterns: matchQuarterPatterns$3,
|
|
35119
35367
|
defaultMatchWidth: "wide",
|
|
35120
|
-
parsePatterns: parseQuarterPatterns,
|
|
35368
|
+
parsePatterns: parseQuarterPatterns$3,
|
|
35121
35369
|
defaultParseWidth: "any",
|
|
35122
35370
|
valueCallback: (index) => index + 1,
|
|
35123
35371
|
}),
|
|
35124
35372
|
|
|
35125
35373
|
month: buildMatchFn({
|
|
35126
|
-
matchPatterns: matchMonthPatterns,
|
|
35374
|
+
matchPatterns: matchMonthPatterns$3,
|
|
35127
35375
|
defaultMatchWidth: "wide",
|
|
35128
|
-
parsePatterns: parseMonthPatterns,
|
|
35376
|
+
parsePatterns: parseMonthPatterns$3,
|
|
35129
35377
|
defaultParseWidth: "any",
|
|
35130
35378
|
}),
|
|
35131
35379
|
|
|
35132
35380
|
day: buildMatchFn({
|
|
35133
|
-
matchPatterns: matchDayPatterns,
|
|
35381
|
+
matchPatterns: matchDayPatterns$3,
|
|
35134
35382
|
defaultMatchWidth: "wide",
|
|
35135
|
-
parsePatterns: parseDayPatterns,
|
|
35383
|
+
parsePatterns: parseDayPatterns$3,
|
|
35136
35384
|
defaultParseWidth: "any",
|
|
35137
35385
|
}),
|
|
35138
35386
|
|
|
35139
35387
|
dayPeriod: buildMatchFn({
|
|
35140
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
35388
|
+
matchPatterns: matchDayPeriodPatterns$3,
|
|
35141
35389
|
defaultMatchWidth: "any",
|
|
35142
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
35390
|
+
parsePatterns: parseDayPeriodPatterns$3,
|
|
35143
35391
|
defaultParseWidth: "any",
|
|
35144
35392
|
}),
|
|
35145
35393
|
};
|
|
@@ -35154,11 +35402,11 @@ const match = {
|
|
|
35154
35402
|
*/
|
|
35155
35403
|
const enUS = {
|
|
35156
35404
|
code: "en-US",
|
|
35157
|
-
formatDistance: formatDistance$
|
|
35158
|
-
formatLong: formatLong,
|
|
35159
|
-
formatRelative: formatRelative$
|
|
35160
|
-
localize: localize,
|
|
35161
|
-
match: match,
|
|
35405
|
+
formatDistance: formatDistance$4,
|
|
35406
|
+
formatLong: formatLong$3,
|
|
35407
|
+
formatRelative: formatRelative$4,
|
|
35408
|
+
localize: localize$3,
|
|
35409
|
+
match: match$3,
|
|
35162
35410
|
options: {
|
|
35163
35411
|
weekStartsOn: 0 /* Sunday */,
|
|
35164
35412
|
firstWeekContainsDate: 1,
|
|
@@ -36851,7 +37099,7 @@ function cleanEscapedString(input) {
|
|
|
36851
37099
|
* })
|
|
36852
37100
|
* //=> 'pli ol 1 jaro'
|
|
36853
37101
|
*/
|
|
36854
|
-
function formatDistance(laterDate, earlierDate, options) {
|
|
37102
|
+
function formatDistance$3(laterDate, earlierDate, options) {
|
|
36855
37103
|
const defaultOptions = getDefaultOptions();
|
|
36856
37104
|
const locale = options?.locale ?? defaultOptions.locale ?? enUS;
|
|
36857
37105
|
const minutesInAlmostTwoDays = 2520;
|
|
@@ -37043,7 +37291,7 @@ function formatDistance(laterDate, earlierDate, options) {
|
|
|
37043
37291
|
* //=> 'pli ol 1 jaro'
|
|
37044
37292
|
*/
|
|
37045
37293
|
function formatDistanceToNow(date, options) {
|
|
37046
|
-
return formatDistance(date, constructNow(date), options);
|
|
37294
|
+
return formatDistance$3(date, constructNow(date), options);
|
|
37047
37295
|
}
|
|
37048
37296
|
|
|
37049
37297
|
/**
|
|
@@ -37174,6 +37422,53 @@ function isBefore(date, dateToCompare) {
|
|
|
37174
37422
|
return +toDate(date) < +toDate(dateToCompare);
|
|
37175
37423
|
}
|
|
37176
37424
|
|
|
37425
|
+
/**
|
|
37426
|
+
* The {@link isSameWeek} function options.
|
|
37427
|
+
*/
|
|
37428
|
+
|
|
37429
|
+
/**
|
|
37430
|
+
* @name isSameWeek
|
|
37431
|
+
* @category Week Helpers
|
|
37432
|
+
* @summary Are the given dates in the same week (and month and year)?
|
|
37433
|
+
*
|
|
37434
|
+
* @description
|
|
37435
|
+
* Are the given dates in the same week (and month and year)?
|
|
37436
|
+
*
|
|
37437
|
+
* @param laterDate - The first date to check
|
|
37438
|
+
* @param earlierDate - The second date to check
|
|
37439
|
+
* @param options - An object with options
|
|
37440
|
+
*
|
|
37441
|
+
* @returns The dates are in the same week (and month and year)
|
|
37442
|
+
*
|
|
37443
|
+
* @example
|
|
37444
|
+
* // Are 31 August 2014 and 4 September 2014 in the same week?
|
|
37445
|
+
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4))
|
|
37446
|
+
* //=> true
|
|
37447
|
+
*
|
|
37448
|
+
* @example
|
|
37449
|
+
* // If week starts with Monday,
|
|
37450
|
+
* // are 31 August 2014 and 4 September 2014 in the same week?
|
|
37451
|
+
* const result = isSameWeek(new Date(2014, 7, 31), new Date(2014, 8, 4), {
|
|
37452
|
+
* weekStartsOn: 1
|
|
37453
|
+
* })
|
|
37454
|
+
* //=> false
|
|
37455
|
+
*
|
|
37456
|
+
* @example
|
|
37457
|
+
* // Are 1 January 2014 and 1 January 2015 in the same week?
|
|
37458
|
+
* const result = isSameWeek(new Date(2014, 0, 1), new Date(2015, 0, 1))
|
|
37459
|
+
* //=> false
|
|
37460
|
+
*/
|
|
37461
|
+
function isSameWeek(laterDate, earlierDate, options) {
|
|
37462
|
+
const [laterDate_, earlierDate_] = normalizeDates(
|
|
37463
|
+
options?.in,
|
|
37464
|
+
laterDate,
|
|
37465
|
+
earlierDate,
|
|
37466
|
+
);
|
|
37467
|
+
return (
|
|
37468
|
+
+startOfWeek(laterDate_, options) === +startOfWeek(earlierDate_, options)
|
|
37469
|
+
);
|
|
37470
|
+
}
|
|
37471
|
+
|
|
37177
37472
|
/**
|
|
37178
37473
|
* The {@link isSameMonth} function options.
|
|
37179
37474
|
*/
|
|
@@ -242487,7 +242782,7 @@ function formatDuration(seconds) {
|
|
|
242487
242782
|
return rest ? `${hours}h ${rest}m` : `${hours}h`;
|
|
242488
242783
|
}
|
|
242489
242784
|
/** `3 days ago`; empty for a missing or unparseable timestamp. */
|
|
242490
|
-
function formatRelative(iso) {
|
|
242785
|
+
function formatRelative$3(iso) {
|
|
242491
242786
|
if (!iso)
|
|
242492
242787
|
return '';
|
|
242493
242788
|
const date = new Date(iso);
|
|
@@ -242766,7 +243061,7 @@ function ConversationRow({ session }) {
|
|
|
242766
243061
|
negative: t('chatHistoryChatHistoryTab.negative'),
|
|
242767
243062
|
userSentiment: t('chatHistoryChatHistoryTab.userSentiment'),
|
|
242768
243063
|
}), [t]);
|
|
242769
|
-
return (jsxs("li", { className: "flex items-start gap-3 py-3 first:pt-0 last:pb-0", "data-testid": "overview-conversation", children: [jsx("span", { className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400", "aria-hidden": "true", children: jsx(Bot, { className: "h-4 w-4" }) }), jsxs("div", { className: "min-w-0 flex-1", children: [jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [jsx("span", { className: "min-w-0 truncate text-sm font-medium text-gray-900 dark:text-gray-100", title: title, children: title }), jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children: formatRelative(session.inserted_at) })] }), jsxs("p", { className: "mt-0.5 truncate text-xs text-gray-500 dark:text-gray-400", children: [agent, turns > 0 && ` · ${t('profileOverviewTab.messageCount', { count: turns })}`] }), jsx(ConversationTopics, { topics: session.topics, className: "mt-1.5", leading: jsx(ConversationSentiment, { sentiment: session.sentiment, labels: labels, compact: true }) })] })] }));
|
|
243064
|
+
return (jsxs("li", { className: "flex items-start gap-3 py-3 first:pt-0 last:pb-0", "data-testid": "overview-conversation", children: [jsx("span", { className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-gray-100 text-gray-500 dark:bg-gray-800 dark:text-gray-400", "aria-hidden": "true", children: jsx(Bot, { className: "h-4 w-4" }) }), jsxs("div", { className: "min-w-0 flex-1", children: [jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [jsx("span", { className: "min-w-0 truncate text-sm font-medium text-gray-900 dark:text-gray-100", title: title, children: title }), jsx("span", { className: "flex-shrink-0 text-xs text-gray-500 dark:text-gray-400", children: formatRelative$3(session.inserted_at) })] }), jsxs("p", { className: "mt-0.5 truncate text-xs text-gray-500 dark:text-gray-400", children: [agent, turns > 0 && ` · ${t('profileOverviewTab.messageCount', { count: turns })}`] }), jsx(ConversationTopics, { topics: session.topics, className: "mt-1.5", leading: jsx(ConversationSentiment, { sentiment: session.sentiment, labels: labels, compact: true }) })] })] }));
|
|
242770
243065
|
}
|
|
242771
243066
|
function MemoryRow({ memory }) {
|
|
242772
243067
|
const t = useT();
|
|
@@ -242838,7 +243133,7 @@ function OverviewTab({ org, username, isOwnProfile = true, sections, onNavigate,
|
|
|
242838
243133
|
? unavailable
|
|
242839
243134
|
: last
|
|
242840
243135
|
? t('profileOverviewTab.kpiConversationsLast', {
|
|
242841
|
-
when: formatRelative(last.inserted_at),
|
|
243136
|
+
when: formatRelative$3(last.inserted_at),
|
|
242842
243137
|
})
|
|
242843
243138
|
: t('profileOverviewTab.kpiConversationsSub'), loading: conversations.isLoading }, "conversations"));
|
|
242844
243139
|
}
|
|
@@ -255298,6 +255593,1472 @@ function GlobalMemoriesSection({ tenantKey, username }) {
|
|
|
255298
255593
|
}), onClick: () => setSelectedUser(user), children: jsx(Eye, { className: "h-4 w-4" }) }) }) })] }, user.username))), users.length === 0 && (jsx("tr", { children: jsx("td", { colSpan: 4, className: "px-6 py-8 text-center text-gray-500 dark:text-gray-400", children: isFetching ? t('memoryAdminTab.loading') : t('memoryAdminTab.noUsersFound') }) }))] })] }) }), totalPages > 1 && (jsx("div", { className: "mt-6", children: jsx(IblPagination, { totalPages: totalPages, currentPage: page, onPageChange: setPage, disabled: isFetching }) }))] })), selectedUser && (jsx(UserMemoriesModal, { isOpen: !!selectedUser, onClose: () => setSelectedUser(null), tenantKey: tenantKey, adminUsername: username, user: selectedUser }))] }));
|
|
255299
255594
|
}
|
|
255300
255595
|
|
|
255596
|
+
const formatDistanceLocale$2 = {
|
|
255597
|
+
lessThanXSeconds: {
|
|
255598
|
+
one: "menos de un segundo",
|
|
255599
|
+
other: "menos de {{count}} segundos",
|
|
255600
|
+
},
|
|
255601
|
+
|
|
255602
|
+
xSeconds: {
|
|
255603
|
+
one: "1 segundo",
|
|
255604
|
+
other: "{{count}} segundos",
|
|
255605
|
+
},
|
|
255606
|
+
|
|
255607
|
+
halfAMinute: "medio minuto",
|
|
255608
|
+
|
|
255609
|
+
lessThanXMinutes: {
|
|
255610
|
+
one: "menos de un minuto",
|
|
255611
|
+
other: "menos de {{count}} minutos",
|
|
255612
|
+
},
|
|
255613
|
+
|
|
255614
|
+
xMinutes: {
|
|
255615
|
+
one: "1 minuto",
|
|
255616
|
+
other: "{{count}} minutos",
|
|
255617
|
+
},
|
|
255618
|
+
|
|
255619
|
+
aboutXHours: {
|
|
255620
|
+
one: "alrededor de 1 hora",
|
|
255621
|
+
other: "alrededor de {{count}} horas",
|
|
255622
|
+
},
|
|
255623
|
+
|
|
255624
|
+
xHours: {
|
|
255625
|
+
one: "1 hora",
|
|
255626
|
+
other: "{{count}} horas",
|
|
255627
|
+
},
|
|
255628
|
+
|
|
255629
|
+
xDays: {
|
|
255630
|
+
one: "1 día",
|
|
255631
|
+
other: "{{count}} días",
|
|
255632
|
+
},
|
|
255633
|
+
|
|
255634
|
+
aboutXWeeks: {
|
|
255635
|
+
one: "alrededor de 1 semana",
|
|
255636
|
+
other: "alrededor de {{count}} semanas",
|
|
255637
|
+
},
|
|
255638
|
+
|
|
255639
|
+
xWeeks: {
|
|
255640
|
+
one: "1 semana",
|
|
255641
|
+
other: "{{count}} semanas",
|
|
255642
|
+
},
|
|
255643
|
+
|
|
255644
|
+
aboutXMonths: {
|
|
255645
|
+
one: "alrededor de 1 mes",
|
|
255646
|
+
other: "alrededor de {{count}} meses",
|
|
255647
|
+
},
|
|
255648
|
+
|
|
255649
|
+
xMonths: {
|
|
255650
|
+
one: "1 mes",
|
|
255651
|
+
other: "{{count}} meses",
|
|
255652
|
+
},
|
|
255653
|
+
|
|
255654
|
+
aboutXYears: {
|
|
255655
|
+
one: "alrededor de 1 año",
|
|
255656
|
+
other: "alrededor de {{count}} años",
|
|
255657
|
+
},
|
|
255658
|
+
|
|
255659
|
+
xYears: {
|
|
255660
|
+
one: "1 año",
|
|
255661
|
+
other: "{{count}} años",
|
|
255662
|
+
},
|
|
255663
|
+
|
|
255664
|
+
overXYears: {
|
|
255665
|
+
one: "más de 1 año",
|
|
255666
|
+
other: "más de {{count}} años",
|
|
255667
|
+
},
|
|
255668
|
+
|
|
255669
|
+
almostXYears: {
|
|
255670
|
+
one: "casi 1 año",
|
|
255671
|
+
other: "casi {{count}} años",
|
|
255672
|
+
},
|
|
255673
|
+
};
|
|
255674
|
+
|
|
255675
|
+
const formatDistance$2 = (token, count, options) => {
|
|
255676
|
+
let result;
|
|
255677
|
+
|
|
255678
|
+
const tokenValue = formatDistanceLocale$2[token];
|
|
255679
|
+
if (typeof tokenValue === "string") {
|
|
255680
|
+
result = tokenValue;
|
|
255681
|
+
} else if (count === 1) {
|
|
255682
|
+
result = tokenValue.one;
|
|
255683
|
+
} else {
|
|
255684
|
+
result = tokenValue.other.replace("{{count}}", count.toString());
|
|
255685
|
+
}
|
|
255686
|
+
|
|
255687
|
+
if (options?.addSuffix) {
|
|
255688
|
+
if (options.comparison && options.comparison > 0) {
|
|
255689
|
+
return "en " + result;
|
|
255690
|
+
} else {
|
|
255691
|
+
return "hace " + result;
|
|
255692
|
+
}
|
|
255693
|
+
}
|
|
255694
|
+
|
|
255695
|
+
return result;
|
|
255696
|
+
};
|
|
255697
|
+
|
|
255698
|
+
const dateFormats$2 = {
|
|
255699
|
+
full: "EEEE, d 'de' MMMM 'de' y",
|
|
255700
|
+
long: "d 'de' MMMM 'de' y",
|
|
255701
|
+
medium: "d MMM y",
|
|
255702
|
+
short: "dd/MM/y",
|
|
255703
|
+
};
|
|
255704
|
+
|
|
255705
|
+
const timeFormats$2 = {
|
|
255706
|
+
full: "HH:mm:ss zzzz",
|
|
255707
|
+
long: "HH:mm:ss z",
|
|
255708
|
+
medium: "HH:mm:ss",
|
|
255709
|
+
short: "HH:mm",
|
|
255710
|
+
};
|
|
255711
|
+
|
|
255712
|
+
const dateTimeFormats$2 = {
|
|
255713
|
+
full: "{{date}} 'a las' {{time}}",
|
|
255714
|
+
long: "{{date}} 'a las' {{time}}",
|
|
255715
|
+
medium: "{{date}}, {{time}}",
|
|
255716
|
+
short: "{{date}}, {{time}}",
|
|
255717
|
+
};
|
|
255718
|
+
|
|
255719
|
+
const formatLong$2 = {
|
|
255720
|
+
date: buildFormatLongFn({
|
|
255721
|
+
formats: dateFormats$2,
|
|
255722
|
+
defaultWidth: "full",
|
|
255723
|
+
}),
|
|
255724
|
+
|
|
255725
|
+
time: buildFormatLongFn({
|
|
255726
|
+
formats: timeFormats$2,
|
|
255727
|
+
defaultWidth: "full",
|
|
255728
|
+
}),
|
|
255729
|
+
|
|
255730
|
+
dateTime: buildFormatLongFn({
|
|
255731
|
+
formats: dateTimeFormats$2,
|
|
255732
|
+
defaultWidth: "full",
|
|
255733
|
+
}),
|
|
255734
|
+
};
|
|
255735
|
+
|
|
255736
|
+
const formatRelativeLocale$2 = {
|
|
255737
|
+
lastWeek: "'el' eeee 'pasado a la' p",
|
|
255738
|
+
yesterday: "'ayer a la' p",
|
|
255739
|
+
today: "'hoy a la' p",
|
|
255740
|
+
tomorrow: "'mañana a la' p",
|
|
255741
|
+
nextWeek: "eeee 'a la' p",
|
|
255742
|
+
other: "P",
|
|
255743
|
+
};
|
|
255744
|
+
|
|
255745
|
+
const formatRelativeLocalePlural = {
|
|
255746
|
+
lastWeek: "'el' eeee 'pasado a las' p",
|
|
255747
|
+
yesterday: "'ayer a las' p",
|
|
255748
|
+
today: "'hoy a las' p",
|
|
255749
|
+
tomorrow: "'mañana a las' p",
|
|
255750
|
+
nextWeek: "eeee 'a las' p",
|
|
255751
|
+
other: "P",
|
|
255752
|
+
};
|
|
255753
|
+
|
|
255754
|
+
const formatRelative$2 = (token, date, _baseDate, _options) => {
|
|
255755
|
+
if (date.getHours() !== 1) {
|
|
255756
|
+
return formatRelativeLocalePlural[token];
|
|
255757
|
+
} else {
|
|
255758
|
+
return formatRelativeLocale$2[token];
|
|
255759
|
+
}
|
|
255760
|
+
};
|
|
255761
|
+
|
|
255762
|
+
const eraValues$2 = {
|
|
255763
|
+
narrow: ["AC", "DC"],
|
|
255764
|
+
abbreviated: ["AC", "DC"],
|
|
255765
|
+
wide: ["antes de cristo", "después de cristo"],
|
|
255766
|
+
};
|
|
255767
|
+
|
|
255768
|
+
const quarterValues$2 = {
|
|
255769
|
+
narrow: ["1", "2", "3", "4"],
|
|
255770
|
+
abbreviated: ["T1", "T2", "T3", "T4"],
|
|
255771
|
+
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"],
|
|
255772
|
+
};
|
|
255773
|
+
|
|
255774
|
+
const monthValues$2 = {
|
|
255775
|
+
narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
|
255776
|
+
abbreviated: [
|
|
255777
|
+
"ene",
|
|
255778
|
+
"feb",
|
|
255779
|
+
"mar",
|
|
255780
|
+
"abr",
|
|
255781
|
+
"may",
|
|
255782
|
+
"jun",
|
|
255783
|
+
"jul",
|
|
255784
|
+
"ago",
|
|
255785
|
+
"sep",
|
|
255786
|
+
"oct",
|
|
255787
|
+
"nov",
|
|
255788
|
+
"dic",
|
|
255789
|
+
],
|
|
255790
|
+
|
|
255791
|
+
wide: [
|
|
255792
|
+
"enero",
|
|
255793
|
+
"febrero",
|
|
255794
|
+
"marzo",
|
|
255795
|
+
"abril",
|
|
255796
|
+
"mayo",
|
|
255797
|
+
"junio",
|
|
255798
|
+
"julio",
|
|
255799
|
+
"agosto",
|
|
255800
|
+
"septiembre",
|
|
255801
|
+
"octubre",
|
|
255802
|
+
"noviembre",
|
|
255803
|
+
"diciembre",
|
|
255804
|
+
],
|
|
255805
|
+
};
|
|
255806
|
+
|
|
255807
|
+
const dayValues$2 = {
|
|
255808
|
+
narrow: ["d", "l", "m", "m", "j", "v", "s"],
|
|
255809
|
+
short: ["do", "lu", "ma", "mi", "ju", "vi", "sá"],
|
|
255810
|
+
abbreviated: ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
|
|
255811
|
+
wide: [
|
|
255812
|
+
"domingo",
|
|
255813
|
+
"lunes",
|
|
255814
|
+
"martes",
|
|
255815
|
+
"miércoles",
|
|
255816
|
+
"jueves",
|
|
255817
|
+
"viernes",
|
|
255818
|
+
"sábado",
|
|
255819
|
+
],
|
|
255820
|
+
};
|
|
255821
|
+
|
|
255822
|
+
const dayPeriodValues$2 = {
|
|
255823
|
+
narrow: {
|
|
255824
|
+
am: "a",
|
|
255825
|
+
pm: "p",
|
|
255826
|
+
midnight: "mn",
|
|
255827
|
+
noon: "md",
|
|
255828
|
+
morning: "mañana",
|
|
255829
|
+
afternoon: "tarde",
|
|
255830
|
+
evening: "tarde",
|
|
255831
|
+
night: "noche",
|
|
255832
|
+
},
|
|
255833
|
+
abbreviated: {
|
|
255834
|
+
am: "AM",
|
|
255835
|
+
pm: "PM",
|
|
255836
|
+
midnight: "medianoche",
|
|
255837
|
+
noon: "mediodia",
|
|
255838
|
+
morning: "mañana",
|
|
255839
|
+
afternoon: "tarde",
|
|
255840
|
+
evening: "tarde",
|
|
255841
|
+
night: "noche",
|
|
255842
|
+
},
|
|
255843
|
+
wide: {
|
|
255844
|
+
am: "a.m.",
|
|
255845
|
+
pm: "p.m.",
|
|
255846
|
+
midnight: "medianoche",
|
|
255847
|
+
noon: "mediodia",
|
|
255848
|
+
morning: "mañana",
|
|
255849
|
+
afternoon: "tarde",
|
|
255850
|
+
evening: "tarde",
|
|
255851
|
+
night: "noche",
|
|
255852
|
+
},
|
|
255853
|
+
};
|
|
255854
|
+
|
|
255855
|
+
const formattingDayPeriodValues$1 = {
|
|
255856
|
+
narrow: {
|
|
255857
|
+
am: "a",
|
|
255858
|
+
pm: "p",
|
|
255859
|
+
midnight: "mn",
|
|
255860
|
+
noon: "md",
|
|
255861
|
+
morning: "de la mañana",
|
|
255862
|
+
afternoon: "de la tarde",
|
|
255863
|
+
evening: "de la tarde",
|
|
255864
|
+
night: "de la noche",
|
|
255865
|
+
},
|
|
255866
|
+
abbreviated: {
|
|
255867
|
+
am: "AM",
|
|
255868
|
+
pm: "PM",
|
|
255869
|
+
midnight: "medianoche",
|
|
255870
|
+
noon: "mediodia",
|
|
255871
|
+
morning: "de la mañana",
|
|
255872
|
+
afternoon: "de la tarde",
|
|
255873
|
+
evening: "de la tarde",
|
|
255874
|
+
night: "de la noche",
|
|
255875
|
+
},
|
|
255876
|
+
wide: {
|
|
255877
|
+
am: "a.m.",
|
|
255878
|
+
pm: "p.m.",
|
|
255879
|
+
midnight: "medianoche",
|
|
255880
|
+
noon: "mediodia",
|
|
255881
|
+
morning: "de la mañana",
|
|
255882
|
+
afternoon: "de la tarde",
|
|
255883
|
+
evening: "de la tarde",
|
|
255884
|
+
night: "de la noche",
|
|
255885
|
+
},
|
|
255886
|
+
};
|
|
255887
|
+
|
|
255888
|
+
const ordinalNumber$2 = (dirtyNumber, _options) => {
|
|
255889
|
+
const number = Number(dirtyNumber);
|
|
255890
|
+
return number + "º";
|
|
255891
|
+
};
|
|
255892
|
+
|
|
255893
|
+
const localize$2 = {
|
|
255894
|
+
ordinalNumber: ordinalNumber$2,
|
|
255895
|
+
|
|
255896
|
+
era: buildLocalizeFn({
|
|
255897
|
+
values: eraValues$2,
|
|
255898
|
+
defaultWidth: "wide",
|
|
255899
|
+
}),
|
|
255900
|
+
|
|
255901
|
+
quarter: buildLocalizeFn({
|
|
255902
|
+
values: quarterValues$2,
|
|
255903
|
+
defaultWidth: "wide",
|
|
255904
|
+
argumentCallback: (quarter) => Number(quarter) - 1,
|
|
255905
|
+
}),
|
|
255906
|
+
|
|
255907
|
+
month: buildLocalizeFn({
|
|
255908
|
+
values: monthValues$2,
|
|
255909
|
+
defaultWidth: "wide",
|
|
255910
|
+
}),
|
|
255911
|
+
|
|
255912
|
+
day: buildLocalizeFn({
|
|
255913
|
+
values: dayValues$2,
|
|
255914
|
+
defaultWidth: "wide",
|
|
255915
|
+
}),
|
|
255916
|
+
|
|
255917
|
+
dayPeriod: buildLocalizeFn({
|
|
255918
|
+
values: dayPeriodValues$2,
|
|
255919
|
+
defaultWidth: "wide",
|
|
255920
|
+
formattingValues: formattingDayPeriodValues$1,
|
|
255921
|
+
defaultFormattingWidth: "wide",
|
|
255922
|
+
}),
|
|
255923
|
+
};
|
|
255924
|
+
|
|
255925
|
+
const matchOrdinalNumberPattern$2 = /^(\d+)(º)?/i;
|
|
255926
|
+
const parseOrdinalNumberPattern$2 = /\d+/i;
|
|
255927
|
+
|
|
255928
|
+
const matchEraPatterns$2 = {
|
|
255929
|
+
narrow: /^(ac|dc|a|d)/i,
|
|
255930
|
+
abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
|
|
255931
|
+
wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i,
|
|
255932
|
+
};
|
|
255933
|
+
const parseEraPatterns$2 = {
|
|
255934
|
+
any: [/^ac/i, /^dc/i],
|
|
255935
|
+
wide: [
|
|
255936
|
+
/^(antes de cristo|antes de la era com[uú]n)/i,
|
|
255937
|
+
/^(despu[eé]s de cristo|era com[uú]n)/i,
|
|
255938
|
+
],
|
|
255939
|
+
};
|
|
255940
|
+
|
|
255941
|
+
const matchQuarterPatterns$2 = {
|
|
255942
|
+
narrow: /^[1234]/i,
|
|
255943
|
+
abbreviated: /^T[1234]/i,
|
|
255944
|
+
wide: /^[1234](º)? trimestre/i,
|
|
255945
|
+
};
|
|
255946
|
+
const parseQuarterPatterns$2 = {
|
|
255947
|
+
any: [/1/i, /2/i, /3/i, /4/i],
|
|
255948
|
+
};
|
|
255949
|
+
|
|
255950
|
+
const matchMonthPatterns$2 = {
|
|
255951
|
+
narrow: /^[efmajsond]/i,
|
|
255952
|
+
abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
|
|
255953
|
+
wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,
|
|
255954
|
+
};
|
|
255955
|
+
const parseMonthPatterns$2 = {
|
|
255956
|
+
narrow: [
|
|
255957
|
+
/^e/i,
|
|
255958
|
+
/^f/i,
|
|
255959
|
+
/^m/i,
|
|
255960
|
+
/^a/i,
|
|
255961
|
+
/^m/i,
|
|
255962
|
+
/^j/i,
|
|
255963
|
+
/^j/i,
|
|
255964
|
+
/^a/i,
|
|
255965
|
+
/^s/i,
|
|
255966
|
+
/^o/i,
|
|
255967
|
+
/^n/i,
|
|
255968
|
+
/^d/i,
|
|
255969
|
+
],
|
|
255970
|
+
|
|
255971
|
+
any: [
|
|
255972
|
+
/^en/i,
|
|
255973
|
+
/^feb/i,
|
|
255974
|
+
/^mar/i,
|
|
255975
|
+
/^abr/i,
|
|
255976
|
+
/^may/i,
|
|
255977
|
+
/^jun/i,
|
|
255978
|
+
/^jul/i,
|
|
255979
|
+
/^ago/i,
|
|
255980
|
+
/^sep/i,
|
|
255981
|
+
/^oct/i,
|
|
255982
|
+
/^nov/i,
|
|
255983
|
+
/^dic/i,
|
|
255984
|
+
],
|
|
255985
|
+
};
|
|
255986
|
+
|
|
255987
|
+
const matchDayPatterns$2 = {
|
|
255988
|
+
narrow: /^[dlmjvs]/i,
|
|
255989
|
+
short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
|
|
255990
|
+
abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
|
|
255991
|
+
wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i,
|
|
255992
|
+
};
|
|
255993
|
+
const parseDayPatterns$2 = {
|
|
255994
|
+
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
255995
|
+
any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i],
|
|
255996
|
+
};
|
|
255997
|
+
|
|
255998
|
+
const matchDayPeriodPatterns$2 = {
|
|
255999
|
+
narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
|
|
256000
|
+
any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i,
|
|
256001
|
+
};
|
|
256002
|
+
const parseDayPeriodPatterns$2 = {
|
|
256003
|
+
any: {
|
|
256004
|
+
am: /^a/i,
|
|
256005
|
+
pm: /^p/i,
|
|
256006
|
+
midnight: /^mn/i,
|
|
256007
|
+
noon: /^md/i,
|
|
256008
|
+
morning: /mañana/i,
|
|
256009
|
+
afternoon: /tarde/i,
|
|
256010
|
+
evening: /tarde/i,
|
|
256011
|
+
night: /noche/i,
|
|
256012
|
+
},
|
|
256013
|
+
};
|
|
256014
|
+
|
|
256015
|
+
const match$2 = {
|
|
256016
|
+
ordinalNumber: buildMatchPatternFn({
|
|
256017
|
+
matchPattern: matchOrdinalNumberPattern$2,
|
|
256018
|
+
parsePattern: parseOrdinalNumberPattern$2,
|
|
256019
|
+
valueCallback: function (value) {
|
|
256020
|
+
return parseInt(value, 10);
|
|
256021
|
+
},
|
|
256022
|
+
}),
|
|
256023
|
+
|
|
256024
|
+
era: buildMatchFn({
|
|
256025
|
+
matchPatterns: matchEraPatterns$2,
|
|
256026
|
+
defaultMatchWidth: "wide",
|
|
256027
|
+
parsePatterns: parseEraPatterns$2,
|
|
256028
|
+
defaultParseWidth: "any",
|
|
256029
|
+
}),
|
|
256030
|
+
|
|
256031
|
+
quarter: buildMatchFn({
|
|
256032
|
+
matchPatterns: matchQuarterPatterns$2,
|
|
256033
|
+
defaultMatchWidth: "wide",
|
|
256034
|
+
parsePatterns: parseQuarterPatterns$2,
|
|
256035
|
+
defaultParseWidth: "any",
|
|
256036
|
+
valueCallback: (index) => index + 1,
|
|
256037
|
+
}),
|
|
256038
|
+
|
|
256039
|
+
month: buildMatchFn({
|
|
256040
|
+
matchPatterns: matchMonthPatterns$2,
|
|
256041
|
+
defaultMatchWidth: "wide",
|
|
256042
|
+
parsePatterns: parseMonthPatterns$2,
|
|
256043
|
+
defaultParseWidth: "any",
|
|
256044
|
+
}),
|
|
256045
|
+
|
|
256046
|
+
day: buildMatchFn({
|
|
256047
|
+
matchPatterns: matchDayPatterns$2,
|
|
256048
|
+
defaultMatchWidth: "wide",
|
|
256049
|
+
parsePatterns: parseDayPatterns$2,
|
|
256050
|
+
defaultParseWidth: "any",
|
|
256051
|
+
}),
|
|
256052
|
+
|
|
256053
|
+
dayPeriod: buildMatchFn({
|
|
256054
|
+
matchPatterns: matchDayPeriodPatterns$2,
|
|
256055
|
+
defaultMatchWidth: "any",
|
|
256056
|
+
parsePatterns: parseDayPeriodPatterns$2,
|
|
256057
|
+
defaultParseWidth: "any",
|
|
256058
|
+
}),
|
|
256059
|
+
};
|
|
256060
|
+
|
|
256061
|
+
/**
|
|
256062
|
+
* @category Locales
|
|
256063
|
+
* @summary Spanish locale.
|
|
256064
|
+
* @language Spanish
|
|
256065
|
+
* @iso-639-2 spa
|
|
256066
|
+
* @author Juan Angosto [@juanangosto](https://github.com/juanangosto)
|
|
256067
|
+
* @author Guillermo Grau [@guigrpa](https://github.com/guigrpa)
|
|
256068
|
+
* @author Fernando Agüero [@fjaguero](https://github.com/fjaguero)
|
|
256069
|
+
* @author Gastón Haro [@harogaston](https://github.com/harogaston)
|
|
256070
|
+
* @author Yago Carballo [@YagoCarballo](https://github.com/YagoCarballo)
|
|
256071
|
+
*/
|
|
256072
|
+
const es = {
|
|
256073
|
+
code: "es",
|
|
256074
|
+
formatDistance: formatDistance$2,
|
|
256075
|
+
formatLong: formatLong$2,
|
|
256076
|
+
formatRelative: formatRelative$2,
|
|
256077
|
+
localize: localize$2,
|
|
256078
|
+
match: match$2,
|
|
256079
|
+
options: {
|
|
256080
|
+
weekStartsOn: 1 /* Monday */,
|
|
256081
|
+
firstWeekContainsDate: 1,
|
|
256082
|
+
},
|
|
256083
|
+
};
|
|
256084
|
+
|
|
256085
|
+
const formatDistanceLocale$1 = {
|
|
256086
|
+
lessThanXSeconds: {
|
|
256087
|
+
one: "moins d’une seconde",
|
|
256088
|
+
other: "moins de {{count}} secondes",
|
|
256089
|
+
},
|
|
256090
|
+
|
|
256091
|
+
xSeconds: {
|
|
256092
|
+
one: "1 seconde",
|
|
256093
|
+
other: "{{count}} secondes",
|
|
256094
|
+
},
|
|
256095
|
+
|
|
256096
|
+
halfAMinute: "30 secondes",
|
|
256097
|
+
|
|
256098
|
+
lessThanXMinutes: {
|
|
256099
|
+
one: "moins d’une minute",
|
|
256100
|
+
other: "moins de {{count}} minutes",
|
|
256101
|
+
},
|
|
256102
|
+
|
|
256103
|
+
xMinutes: {
|
|
256104
|
+
one: "1 minute",
|
|
256105
|
+
other: "{{count}} minutes",
|
|
256106
|
+
},
|
|
256107
|
+
|
|
256108
|
+
aboutXHours: {
|
|
256109
|
+
one: "environ 1 heure",
|
|
256110
|
+
other: "environ {{count}} heures",
|
|
256111
|
+
},
|
|
256112
|
+
|
|
256113
|
+
xHours: {
|
|
256114
|
+
one: "1 heure",
|
|
256115
|
+
other: "{{count}} heures",
|
|
256116
|
+
},
|
|
256117
|
+
|
|
256118
|
+
xDays: {
|
|
256119
|
+
one: "1 jour",
|
|
256120
|
+
other: "{{count}} jours",
|
|
256121
|
+
},
|
|
256122
|
+
|
|
256123
|
+
aboutXWeeks: {
|
|
256124
|
+
one: "environ 1 semaine",
|
|
256125
|
+
other: "environ {{count}} semaines",
|
|
256126
|
+
},
|
|
256127
|
+
|
|
256128
|
+
xWeeks: {
|
|
256129
|
+
one: "1 semaine",
|
|
256130
|
+
other: "{{count}} semaines",
|
|
256131
|
+
},
|
|
256132
|
+
|
|
256133
|
+
aboutXMonths: {
|
|
256134
|
+
one: "environ 1 mois",
|
|
256135
|
+
other: "environ {{count}} mois",
|
|
256136
|
+
},
|
|
256137
|
+
|
|
256138
|
+
xMonths: {
|
|
256139
|
+
one: "1 mois",
|
|
256140
|
+
other: "{{count}} mois",
|
|
256141
|
+
},
|
|
256142
|
+
|
|
256143
|
+
aboutXYears: {
|
|
256144
|
+
one: "environ 1 an",
|
|
256145
|
+
other: "environ {{count}} ans",
|
|
256146
|
+
},
|
|
256147
|
+
|
|
256148
|
+
xYears: {
|
|
256149
|
+
one: "1 an",
|
|
256150
|
+
other: "{{count}} ans",
|
|
256151
|
+
},
|
|
256152
|
+
|
|
256153
|
+
overXYears: {
|
|
256154
|
+
one: "plus d’un an",
|
|
256155
|
+
other: "plus de {{count}} ans",
|
|
256156
|
+
},
|
|
256157
|
+
|
|
256158
|
+
almostXYears: {
|
|
256159
|
+
one: "presqu’un an",
|
|
256160
|
+
other: "presque {{count}} ans",
|
|
256161
|
+
},
|
|
256162
|
+
};
|
|
256163
|
+
|
|
256164
|
+
const formatDistance$1 = (token, count, options) => {
|
|
256165
|
+
let result;
|
|
256166
|
+
const form = formatDistanceLocale$1[token];
|
|
256167
|
+
if (typeof form === "string") {
|
|
256168
|
+
result = form;
|
|
256169
|
+
} else if (count === 1) {
|
|
256170
|
+
result = form.one;
|
|
256171
|
+
} else {
|
|
256172
|
+
result = form.other.replace("{{count}}", String(count));
|
|
256173
|
+
}
|
|
256174
|
+
|
|
256175
|
+
if (options?.addSuffix) {
|
|
256176
|
+
if (options.comparison && options.comparison > 0) {
|
|
256177
|
+
return "dans " + result;
|
|
256178
|
+
} else {
|
|
256179
|
+
return "il y a " + result;
|
|
256180
|
+
}
|
|
256181
|
+
}
|
|
256182
|
+
|
|
256183
|
+
return result;
|
|
256184
|
+
};
|
|
256185
|
+
|
|
256186
|
+
const dateFormats$1 = {
|
|
256187
|
+
full: "EEEE d MMMM y",
|
|
256188
|
+
long: "d MMMM y",
|
|
256189
|
+
medium: "d MMM y",
|
|
256190
|
+
short: "dd/MM/y",
|
|
256191
|
+
};
|
|
256192
|
+
|
|
256193
|
+
const timeFormats$1 = {
|
|
256194
|
+
full: "HH:mm:ss zzzz",
|
|
256195
|
+
long: "HH:mm:ss z",
|
|
256196
|
+
medium: "HH:mm:ss",
|
|
256197
|
+
short: "HH:mm",
|
|
256198
|
+
};
|
|
256199
|
+
|
|
256200
|
+
const dateTimeFormats$1 = {
|
|
256201
|
+
full: "{{date}} 'à' {{time}}",
|
|
256202
|
+
long: "{{date}} 'à' {{time}}",
|
|
256203
|
+
medium: "{{date}}, {{time}}",
|
|
256204
|
+
short: "{{date}}, {{time}}",
|
|
256205
|
+
};
|
|
256206
|
+
|
|
256207
|
+
const formatLong$1 = {
|
|
256208
|
+
date: buildFormatLongFn({
|
|
256209
|
+
formats: dateFormats$1,
|
|
256210
|
+
defaultWidth: "full",
|
|
256211
|
+
}),
|
|
256212
|
+
|
|
256213
|
+
time: buildFormatLongFn({
|
|
256214
|
+
formats: timeFormats$1,
|
|
256215
|
+
defaultWidth: "full",
|
|
256216
|
+
}),
|
|
256217
|
+
|
|
256218
|
+
dateTime: buildFormatLongFn({
|
|
256219
|
+
formats: dateTimeFormats$1,
|
|
256220
|
+
defaultWidth: "full",
|
|
256221
|
+
}),
|
|
256222
|
+
};
|
|
256223
|
+
|
|
256224
|
+
const formatRelativeLocale$1 = {
|
|
256225
|
+
lastWeek: "eeee 'dernier à' p",
|
|
256226
|
+
yesterday: "'hier à' p",
|
|
256227
|
+
today: "'aujourd’hui à' p",
|
|
256228
|
+
tomorrow: "'demain à' p'",
|
|
256229
|
+
nextWeek: "eeee 'prochain à' p",
|
|
256230
|
+
other: "P",
|
|
256231
|
+
};
|
|
256232
|
+
|
|
256233
|
+
const formatRelative$1 = (token, _date, _baseDate, _options) =>
|
|
256234
|
+
formatRelativeLocale$1[token];
|
|
256235
|
+
|
|
256236
|
+
const eraValues$1 = {
|
|
256237
|
+
narrow: ["av. J.-C", "ap. J.-C"],
|
|
256238
|
+
abbreviated: ["av. J.-C", "ap. J.-C"],
|
|
256239
|
+
wide: ["avant Jésus-Christ", "après Jésus-Christ"],
|
|
256240
|
+
};
|
|
256241
|
+
|
|
256242
|
+
const quarterValues$1 = {
|
|
256243
|
+
narrow: ["T1", "T2", "T3", "T4"],
|
|
256244
|
+
abbreviated: ["1er trim.", "2ème trim.", "3ème trim.", "4ème trim."],
|
|
256245
|
+
wide: ["1er trimestre", "2ème trimestre", "3ème trimestre", "4ème trimestre"],
|
|
256246
|
+
};
|
|
256247
|
+
|
|
256248
|
+
const monthValues$1 = {
|
|
256249
|
+
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
256250
|
+
abbreviated: [
|
|
256251
|
+
"janv.",
|
|
256252
|
+
"févr.",
|
|
256253
|
+
"mars",
|
|
256254
|
+
"avr.",
|
|
256255
|
+
"mai",
|
|
256256
|
+
"juin",
|
|
256257
|
+
"juil.",
|
|
256258
|
+
"août",
|
|
256259
|
+
"sept.",
|
|
256260
|
+
"oct.",
|
|
256261
|
+
"nov.",
|
|
256262
|
+
"déc.",
|
|
256263
|
+
],
|
|
256264
|
+
|
|
256265
|
+
wide: [
|
|
256266
|
+
"janvier",
|
|
256267
|
+
"février",
|
|
256268
|
+
"mars",
|
|
256269
|
+
"avril",
|
|
256270
|
+
"mai",
|
|
256271
|
+
"juin",
|
|
256272
|
+
"juillet",
|
|
256273
|
+
"août",
|
|
256274
|
+
"septembre",
|
|
256275
|
+
"octobre",
|
|
256276
|
+
"novembre",
|
|
256277
|
+
"décembre",
|
|
256278
|
+
],
|
|
256279
|
+
};
|
|
256280
|
+
|
|
256281
|
+
const dayValues$1 = {
|
|
256282
|
+
narrow: ["D", "L", "M", "M", "J", "V", "S"],
|
|
256283
|
+
short: ["di", "lu", "ma", "me", "je", "ve", "sa"],
|
|
256284
|
+
abbreviated: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
|
|
256285
|
+
|
|
256286
|
+
wide: [
|
|
256287
|
+
"dimanche",
|
|
256288
|
+
"lundi",
|
|
256289
|
+
"mardi",
|
|
256290
|
+
"mercredi",
|
|
256291
|
+
"jeudi",
|
|
256292
|
+
"vendredi",
|
|
256293
|
+
"samedi",
|
|
256294
|
+
],
|
|
256295
|
+
};
|
|
256296
|
+
|
|
256297
|
+
const dayPeriodValues$1 = {
|
|
256298
|
+
narrow: {
|
|
256299
|
+
am: "AM",
|
|
256300
|
+
pm: "PM",
|
|
256301
|
+
midnight: "minuit",
|
|
256302
|
+
noon: "midi",
|
|
256303
|
+
morning: "mat.",
|
|
256304
|
+
afternoon: "ap.m.",
|
|
256305
|
+
evening: "soir",
|
|
256306
|
+
night: "mat.",
|
|
256307
|
+
},
|
|
256308
|
+
abbreviated: {
|
|
256309
|
+
am: "AM",
|
|
256310
|
+
pm: "PM",
|
|
256311
|
+
midnight: "minuit",
|
|
256312
|
+
noon: "midi",
|
|
256313
|
+
morning: "matin",
|
|
256314
|
+
afternoon: "après-midi",
|
|
256315
|
+
evening: "soir",
|
|
256316
|
+
night: "matin",
|
|
256317
|
+
},
|
|
256318
|
+
wide: {
|
|
256319
|
+
am: "AM",
|
|
256320
|
+
pm: "PM",
|
|
256321
|
+
midnight: "minuit",
|
|
256322
|
+
noon: "midi",
|
|
256323
|
+
morning: "du matin",
|
|
256324
|
+
afternoon: "de l’après-midi",
|
|
256325
|
+
evening: "du soir",
|
|
256326
|
+
night: "du matin",
|
|
256327
|
+
},
|
|
256328
|
+
};
|
|
256329
|
+
|
|
256330
|
+
const ordinalNumber$1 = (dirtyNumber, options) => {
|
|
256331
|
+
const number = Number(dirtyNumber);
|
|
256332
|
+
const unit = options?.unit;
|
|
256333
|
+
|
|
256334
|
+
if (number === 0) return "0";
|
|
256335
|
+
|
|
256336
|
+
const feminineUnits = ["year", "week", "hour", "minute", "second"];
|
|
256337
|
+
let suffix;
|
|
256338
|
+
|
|
256339
|
+
if (number === 1) {
|
|
256340
|
+
suffix = unit && feminineUnits.includes(unit) ? "ère" : "er";
|
|
256341
|
+
} else {
|
|
256342
|
+
suffix = "ème";
|
|
256343
|
+
}
|
|
256344
|
+
|
|
256345
|
+
return number + suffix;
|
|
256346
|
+
};
|
|
256347
|
+
|
|
256348
|
+
const LONG_MONTHS_TOKENS = ["MMM", "MMMM"];
|
|
256349
|
+
|
|
256350
|
+
const localize$1 = {
|
|
256351
|
+
preprocessor: (date, parts) => {
|
|
256352
|
+
// Replaces the `do` tokens with `d` when used with long month tokens and the day of the month is greater than one.
|
|
256353
|
+
// Use case "do MMMM" => 1er août, 29 août
|
|
256354
|
+
// see https://github.com/date-fns/date-fns/issues/1391
|
|
256355
|
+
|
|
256356
|
+
if (date.getDate() === 1) return parts;
|
|
256357
|
+
|
|
256358
|
+
const hasLongMonthToken = parts.some(
|
|
256359
|
+
(part) => part.isToken && LONG_MONTHS_TOKENS.includes(part.value),
|
|
256360
|
+
);
|
|
256361
|
+
|
|
256362
|
+
if (!hasLongMonthToken) return parts;
|
|
256363
|
+
|
|
256364
|
+
return parts.map((part) =>
|
|
256365
|
+
part.isToken && part.value === "do"
|
|
256366
|
+
? { isToken: true, value: "d" }
|
|
256367
|
+
: part,
|
|
256368
|
+
);
|
|
256369
|
+
},
|
|
256370
|
+
|
|
256371
|
+
ordinalNumber: ordinalNumber$1,
|
|
256372
|
+
|
|
256373
|
+
era: buildLocalizeFn({
|
|
256374
|
+
values: eraValues$1,
|
|
256375
|
+
defaultWidth: "wide",
|
|
256376
|
+
}),
|
|
256377
|
+
|
|
256378
|
+
quarter: buildLocalizeFn({
|
|
256379
|
+
values: quarterValues$1,
|
|
256380
|
+
defaultWidth: "wide",
|
|
256381
|
+
argumentCallback: (quarter) => quarter - 1,
|
|
256382
|
+
}),
|
|
256383
|
+
|
|
256384
|
+
month: buildLocalizeFn({
|
|
256385
|
+
values: monthValues$1,
|
|
256386
|
+
defaultWidth: "wide",
|
|
256387
|
+
}),
|
|
256388
|
+
|
|
256389
|
+
day: buildLocalizeFn({
|
|
256390
|
+
values: dayValues$1,
|
|
256391
|
+
defaultWidth: "wide",
|
|
256392
|
+
}),
|
|
256393
|
+
|
|
256394
|
+
dayPeriod: buildLocalizeFn({
|
|
256395
|
+
values: dayPeriodValues$1,
|
|
256396
|
+
defaultWidth: "wide",
|
|
256397
|
+
}),
|
|
256398
|
+
};
|
|
256399
|
+
|
|
256400
|
+
const matchOrdinalNumberPattern$1 = /^(\d+)(ième|ère|ème|er|e)?/i;
|
|
256401
|
+
const parseOrdinalNumberPattern$1 = /\d+/i;
|
|
256402
|
+
|
|
256403
|
+
const matchEraPatterns$1 = {
|
|
256404
|
+
narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
|
|
256405
|
+
abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
|
|
256406
|
+
wide: /^(avant Jésus-Christ|après Jésus-Christ)/i,
|
|
256407
|
+
};
|
|
256408
|
+
const parseEraPatterns$1 = {
|
|
256409
|
+
any: [/^av/i, /^ap/i],
|
|
256410
|
+
};
|
|
256411
|
+
|
|
256412
|
+
const matchQuarterPatterns$1 = {
|
|
256413
|
+
narrow: /^T?[1234]/i,
|
|
256414
|
+
abbreviated: /^[1234](er|ème|e)? trim\.?/i,
|
|
256415
|
+
wide: /^[1234](er|ème|e)? trimestre/i,
|
|
256416
|
+
};
|
|
256417
|
+
const parseQuarterPatterns$1 = {
|
|
256418
|
+
any: [/1/i, /2/i, /3/i, /4/i],
|
|
256419
|
+
};
|
|
256420
|
+
|
|
256421
|
+
const matchMonthPatterns$1 = {
|
|
256422
|
+
narrow: /^[jfmasond]/i,
|
|
256423
|
+
abbreviated:
|
|
256424
|
+
/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
|
|
256425
|
+
wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
|
|
256426
|
+
};
|
|
256427
|
+
const parseMonthPatterns$1 = {
|
|
256428
|
+
narrow: [
|
|
256429
|
+
/^j/i,
|
|
256430
|
+
/^f/i,
|
|
256431
|
+
/^m/i,
|
|
256432
|
+
/^a/i,
|
|
256433
|
+
/^m/i,
|
|
256434
|
+
/^j/i,
|
|
256435
|
+
/^j/i,
|
|
256436
|
+
/^a/i,
|
|
256437
|
+
/^s/i,
|
|
256438
|
+
/^o/i,
|
|
256439
|
+
/^n/i,
|
|
256440
|
+
/^d/i,
|
|
256441
|
+
],
|
|
256442
|
+
|
|
256443
|
+
any: [
|
|
256444
|
+
/^ja/i,
|
|
256445
|
+
/^f/i,
|
|
256446
|
+
/^mar/i,
|
|
256447
|
+
/^av/i,
|
|
256448
|
+
/^ma/i,
|
|
256449
|
+
/^juin/i,
|
|
256450
|
+
/^juil/i,
|
|
256451
|
+
/^ao/i,
|
|
256452
|
+
/^s/i,
|
|
256453
|
+
/^o/i,
|
|
256454
|
+
/^n/i,
|
|
256455
|
+
/^d/i,
|
|
256456
|
+
],
|
|
256457
|
+
};
|
|
256458
|
+
|
|
256459
|
+
const matchDayPatterns$1 = {
|
|
256460
|
+
narrow: /^[lmjvsd]/i,
|
|
256461
|
+
short: /^(di|lu|ma|me|je|ve|sa)/i,
|
|
256462
|
+
abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
|
|
256463
|
+
wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i,
|
|
256464
|
+
};
|
|
256465
|
+
const parseDayPatterns$1 = {
|
|
256466
|
+
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
256467
|
+
any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i],
|
|
256468
|
+
};
|
|
256469
|
+
|
|
256470
|
+
const matchDayPeriodPatterns$1 = {
|
|
256471
|
+
narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
|
|
256472
|
+
any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i,
|
|
256473
|
+
};
|
|
256474
|
+
const parseDayPeriodPatterns$1 = {
|
|
256475
|
+
any: {
|
|
256476
|
+
am: /^a/i,
|
|
256477
|
+
pm: /^p/i,
|
|
256478
|
+
midnight: /^min/i,
|
|
256479
|
+
noon: /^mid/i,
|
|
256480
|
+
morning: /mat/i,
|
|
256481
|
+
afternoon: /ap/i,
|
|
256482
|
+
evening: /soir/i,
|
|
256483
|
+
night: /nuit/i,
|
|
256484
|
+
},
|
|
256485
|
+
};
|
|
256486
|
+
|
|
256487
|
+
const match$1 = {
|
|
256488
|
+
ordinalNumber: buildMatchPatternFn({
|
|
256489
|
+
matchPattern: matchOrdinalNumberPattern$1,
|
|
256490
|
+
parsePattern: parseOrdinalNumberPattern$1,
|
|
256491
|
+
valueCallback: (value) => parseInt(value),
|
|
256492
|
+
}),
|
|
256493
|
+
|
|
256494
|
+
era: buildMatchFn({
|
|
256495
|
+
matchPatterns: matchEraPatterns$1,
|
|
256496
|
+
defaultMatchWidth: "wide",
|
|
256497
|
+
parsePatterns: parseEraPatterns$1,
|
|
256498
|
+
defaultParseWidth: "any",
|
|
256499
|
+
}),
|
|
256500
|
+
|
|
256501
|
+
quarter: buildMatchFn({
|
|
256502
|
+
matchPatterns: matchQuarterPatterns$1,
|
|
256503
|
+
defaultMatchWidth: "wide",
|
|
256504
|
+
parsePatterns: parseQuarterPatterns$1,
|
|
256505
|
+
defaultParseWidth: "any",
|
|
256506
|
+
valueCallback: (index) => index + 1,
|
|
256507
|
+
}),
|
|
256508
|
+
|
|
256509
|
+
month: buildMatchFn({
|
|
256510
|
+
matchPatterns: matchMonthPatterns$1,
|
|
256511
|
+
defaultMatchWidth: "wide",
|
|
256512
|
+
parsePatterns: parseMonthPatterns$1,
|
|
256513
|
+
defaultParseWidth: "any",
|
|
256514
|
+
}),
|
|
256515
|
+
|
|
256516
|
+
day: buildMatchFn({
|
|
256517
|
+
matchPatterns: matchDayPatterns$1,
|
|
256518
|
+
defaultMatchWidth: "wide",
|
|
256519
|
+
parsePatterns: parseDayPatterns$1,
|
|
256520
|
+
defaultParseWidth: "any",
|
|
256521
|
+
}),
|
|
256522
|
+
|
|
256523
|
+
dayPeriod: buildMatchFn({
|
|
256524
|
+
matchPatterns: matchDayPeriodPatterns$1,
|
|
256525
|
+
defaultMatchWidth: "any",
|
|
256526
|
+
parsePatterns: parseDayPeriodPatterns$1,
|
|
256527
|
+
defaultParseWidth: "any",
|
|
256528
|
+
}),
|
|
256529
|
+
};
|
|
256530
|
+
|
|
256531
|
+
/**
|
|
256532
|
+
* @category Locales
|
|
256533
|
+
* @summary French locale.
|
|
256534
|
+
* @language French
|
|
256535
|
+
* @iso-639-2 fra
|
|
256536
|
+
* @author Jean Dupouy [@izeau](https://github.com/izeau)
|
|
256537
|
+
* @author François B [@fbonzon](https://github.com/fbonzon)
|
|
256538
|
+
*/
|
|
256539
|
+
const fr = {
|
|
256540
|
+
code: "fr",
|
|
256541
|
+
formatDistance: formatDistance$1,
|
|
256542
|
+
formatLong: formatLong$1,
|
|
256543
|
+
formatRelative: formatRelative$1,
|
|
256544
|
+
localize: localize$1,
|
|
256545
|
+
match: match$1,
|
|
256546
|
+
options: {
|
|
256547
|
+
weekStartsOn: 1 /* Monday */,
|
|
256548
|
+
firstWeekContainsDate: 4,
|
|
256549
|
+
},
|
|
256550
|
+
};
|
|
256551
|
+
|
|
256552
|
+
const formatDistanceLocale = {
|
|
256553
|
+
lessThanXSeconds: {
|
|
256554
|
+
one: "不到 1 秒",
|
|
256555
|
+
other: "不到 {{count}} 秒",
|
|
256556
|
+
},
|
|
256557
|
+
|
|
256558
|
+
xSeconds: {
|
|
256559
|
+
one: "1 秒",
|
|
256560
|
+
other: "{{count}} 秒",
|
|
256561
|
+
},
|
|
256562
|
+
|
|
256563
|
+
halfAMinute: "半分钟",
|
|
256564
|
+
|
|
256565
|
+
lessThanXMinutes: {
|
|
256566
|
+
one: "不到 1 分钟",
|
|
256567
|
+
other: "不到 {{count}} 分钟",
|
|
256568
|
+
},
|
|
256569
|
+
|
|
256570
|
+
xMinutes: {
|
|
256571
|
+
one: "1 分钟",
|
|
256572
|
+
other: "{{count}} 分钟",
|
|
256573
|
+
},
|
|
256574
|
+
|
|
256575
|
+
xHours: {
|
|
256576
|
+
one: "1 小时",
|
|
256577
|
+
other: "{{count}} 小时",
|
|
256578
|
+
},
|
|
256579
|
+
|
|
256580
|
+
aboutXHours: {
|
|
256581
|
+
one: "大约 1 小时",
|
|
256582
|
+
other: "大约 {{count}} 小时",
|
|
256583
|
+
},
|
|
256584
|
+
|
|
256585
|
+
xDays: {
|
|
256586
|
+
one: "1 天",
|
|
256587
|
+
other: "{{count}} 天",
|
|
256588
|
+
},
|
|
256589
|
+
|
|
256590
|
+
aboutXWeeks: {
|
|
256591
|
+
one: "大约 1 个星期",
|
|
256592
|
+
other: "大约 {{count}} 个星期",
|
|
256593
|
+
},
|
|
256594
|
+
|
|
256595
|
+
xWeeks: {
|
|
256596
|
+
one: "1 个星期",
|
|
256597
|
+
other: "{{count}} 个星期",
|
|
256598
|
+
},
|
|
256599
|
+
|
|
256600
|
+
aboutXMonths: {
|
|
256601
|
+
one: "大约 1 个月",
|
|
256602
|
+
other: "大约 {{count}} 个月",
|
|
256603
|
+
},
|
|
256604
|
+
|
|
256605
|
+
xMonths: {
|
|
256606
|
+
one: "1 个月",
|
|
256607
|
+
other: "{{count}} 个月",
|
|
256608
|
+
},
|
|
256609
|
+
|
|
256610
|
+
aboutXYears: {
|
|
256611
|
+
one: "大约 1 年",
|
|
256612
|
+
other: "大约 {{count}} 年",
|
|
256613
|
+
},
|
|
256614
|
+
|
|
256615
|
+
xYears: {
|
|
256616
|
+
one: "1 年",
|
|
256617
|
+
other: "{{count}} 年",
|
|
256618
|
+
},
|
|
256619
|
+
|
|
256620
|
+
overXYears: {
|
|
256621
|
+
one: "超过 1 年",
|
|
256622
|
+
other: "超过 {{count}} 年",
|
|
256623
|
+
},
|
|
256624
|
+
|
|
256625
|
+
almostXYears: {
|
|
256626
|
+
one: "将近 1 年",
|
|
256627
|
+
other: "将近 {{count}} 年",
|
|
256628
|
+
},
|
|
256629
|
+
};
|
|
256630
|
+
|
|
256631
|
+
const formatDistance = (token, count, options) => {
|
|
256632
|
+
let result;
|
|
256633
|
+
|
|
256634
|
+
const tokenValue = formatDistanceLocale[token];
|
|
256635
|
+
if (typeof tokenValue === "string") {
|
|
256636
|
+
result = tokenValue;
|
|
256637
|
+
} else if (count === 1) {
|
|
256638
|
+
result = tokenValue.one;
|
|
256639
|
+
} else {
|
|
256640
|
+
result = tokenValue.other.replace("{{count}}", String(count));
|
|
256641
|
+
}
|
|
256642
|
+
|
|
256643
|
+
if (options?.addSuffix) {
|
|
256644
|
+
if (options.comparison && options.comparison > 0) {
|
|
256645
|
+
return result + "内";
|
|
256646
|
+
} else {
|
|
256647
|
+
return result + "前";
|
|
256648
|
+
}
|
|
256649
|
+
}
|
|
256650
|
+
|
|
256651
|
+
return result;
|
|
256652
|
+
};
|
|
256653
|
+
|
|
256654
|
+
const dateFormats = {
|
|
256655
|
+
full: "y'年'M'月'd'日' EEEE",
|
|
256656
|
+
long: "y'年'M'月'd'日'",
|
|
256657
|
+
medium: "yyyy-MM-dd",
|
|
256658
|
+
short: "yy-MM-dd",
|
|
256659
|
+
};
|
|
256660
|
+
|
|
256661
|
+
const timeFormats = {
|
|
256662
|
+
full: "zzzz a h:mm:ss",
|
|
256663
|
+
long: "z a h:mm:ss",
|
|
256664
|
+
medium: "a h:mm:ss",
|
|
256665
|
+
short: "a h:mm",
|
|
256666
|
+
};
|
|
256667
|
+
|
|
256668
|
+
const dateTimeFormats = {
|
|
256669
|
+
full: "{{date}} {{time}}",
|
|
256670
|
+
long: "{{date}} {{time}}",
|
|
256671
|
+
medium: "{{date}} {{time}}",
|
|
256672
|
+
short: "{{date}} {{time}}",
|
|
256673
|
+
};
|
|
256674
|
+
|
|
256675
|
+
const formatLong = {
|
|
256676
|
+
date: buildFormatLongFn({
|
|
256677
|
+
formats: dateFormats,
|
|
256678
|
+
defaultWidth: "full",
|
|
256679
|
+
}),
|
|
256680
|
+
|
|
256681
|
+
time: buildFormatLongFn({
|
|
256682
|
+
formats: timeFormats,
|
|
256683
|
+
defaultWidth: "full",
|
|
256684
|
+
}),
|
|
256685
|
+
|
|
256686
|
+
dateTime: buildFormatLongFn({
|
|
256687
|
+
formats: dateTimeFormats,
|
|
256688
|
+
defaultWidth: "full",
|
|
256689
|
+
}),
|
|
256690
|
+
};
|
|
256691
|
+
|
|
256692
|
+
function checkWeek(date, baseDate, options) {
|
|
256693
|
+
const baseFormat = "eeee p";
|
|
256694
|
+
|
|
256695
|
+
if (isSameWeek(date, baseDate, options)) {
|
|
256696
|
+
return baseFormat; // in same week
|
|
256697
|
+
} else if (date.getTime() > baseDate.getTime()) {
|
|
256698
|
+
return "'下个'" + baseFormat; // in next week
|
|
256699
|
+
}
|
|
256700
|
+
return "'上个'" + baseFormat; // in last week
|
|
256701
|
+
}
|
|
256702
|
+
|
|
256703
|
+
const formatRelativeLocale = {
|
|
256704
|
+
lastWeek: checkWeek, // days before yesterday, maybe in this week or last week
|
|
256705
|
+
yesterday: "'昨天' p",
|
|
256706
|
+
today: "'今天' p",
|
|
256707
|
+
tomorrow: "'明天' p",
|
|
256708
|
+
nextWeek: checkWeek, // days after tomorrow, maybe in this week or next week
|
|
256709
|
+
other: "PP p",
|
|
256710
|
+
};
|
|
256711
|
+
|
|
256712
|
+
const formatRelative = (token, date, baseDate, options) => {
|
|
256713
|
+
const format = formatRelativeLocale[token];
|
|
256714
|
+
|
|
256715
|
+
if (typeof format === "function") {
|
|
256716
|
+
return format(date, baseDate, options);
|
|
256717
|
+
}
|
|
256718
|
+
|
|
256719
|
+
return format;
|
|
256720
|
+
};
|
|
256721
|
+
|
|
256722
|
+
const eraValues = {
|
|
256723
|
+
narrow: ["前", "公元"],
|
|
256724
|
+
abbreviated: ["前", "公元"],
|
|
256725
|
+
wide: ["公元前", "公元"],
|
|
256726
|
+
};
|
|
256727
|
+
|
|
256728
|
+
const quarterValues = {
|
|
256729
|
+
narrow: ["1", "2", "3", "4"],
|
|
256730
|
+
abbreviated: ["第一季", "第二季", "第三季", "第四季"],
|
|
256731
|
+
wide: ["第一季度", "第二季度", "第三季度", "第四季度"],
|
|
256732
|
+
};
|
|
256733
|
+
|
|
256734
|
+
const monthValues = {
|
|
256735
|
+
narrow: [
|
|
256736
|
+
"一",
|
|
256737
|
+
"二",
|
|
256738
|
+
"三",
|
|
256739
|
+
"四",
|
|
256740
|
+
"五",
|
|
256741
|
+
"六",
|
|
256742
|
+
"七",
|
|
256743
|
+
"八",
|
|
256744
|
+
"九",
|
|
256745
|
+
"十",
|
|
256746
|
+
"十一",
|
|
256747
|
+
"十二",
|
|
256748
|
+
],
|
|
256749
|
+
|
|
256750
|
+
abbreviated: [
|
|
256751
|
+
"1月",
|
|
256752
|
+
"2月",
|
|
256753
|
+
"3月",
|
|
256754
|
+
"4月",
|
|
256755
|
+
"5月",
|
|
256756
|
+
"6月",
|
|
256757
|
+
"7月",
|
|
256758
|
+
"8月",
|
|
256759
|
+
"9月",
|
|
256760
|
+
"10月",
|
|
256761
|
+
"11月",
|
|
256762
|
+
"12月",
|
|
256763
|
+
],
|
|
256764
|
+
|
|
256765
|
+
wide: [
|
|
256766
|
+
"一月",
|
|
256767
|
+
"二月",
|
|
256768
|
+
"三月",
|
|
256769
|
+
"四月",
|
|
256770
|
+
"五月",
|
|
256771
|
+
"六月",
|
|
256772
|
+
"七月",
|
|
256773
|
+
"八月",
|
|
256774
|
+
"九月",
|
|
256775
|
+
"十月",
|
|
256776
|
+
"十一月",
|
|
256777
|
+
"十二月",
|
|
256778
|
+
],
|
|
256779
|
+
};
|
|
256780
|
+
|
|
256781
|
+
const dayValues = {
|
|
256782
|
+
narrow: ["日", "一", "二", "三", "四", "五", "六"],
|
|
256783
|
+
short: ["日", "一", "二", "三", "四", "五", "六"],
|
|
256784
|
+
abbreviated: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
|
256785
|
+
|
|
256786
|
+
wide: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"],
|
|
256787
|
+
};
|
|
256788
|
+
|
|
256789
|
+
const dayPeriodValues = {
|
|
256790
|
+
narrow: {
|
|
256791
|
+
am: "上",
|
|
256792
|
+
pm: "下",
|
|
256793
|
+
midnight: "凌晨",
|
|
256794
|
+
noon: "午",
|
|
256795
|
+
morning: "早",
|
|
256796
|
+
afternoon: "下午",
|
|
256797
|
+
evening: "晚",
|
|
256798
|
+
night: "夜",
|
|
256799
|
+
},
|
|
256800
|
+
abbreviated: {
|
|
256801
|
+
am: "上午",
|
|
256802
|
+
pm: "下午",
|
|
256803
|
+
midnight: "凌晨",
|
|
256804
|
+
noon: "中午",
|
|
256805
|
+
morning: "早晨",
|
|
256806
|
+
afternoon: "中午",
|
|
256807
|
+
evening: "晚上",
|
|
256808
|
+
night: "夜间",
|
|
256809
|
+
},
|
|
256810
|
+
wide: {
|
|
256811
|
+
am: "上午",
|
|
256812
|
+
pm: "下午",
|
|
256813
|
+
midnight: "凌晨",
|
|
256814
|
+
noon: "中午",
|
|
256815
|
+
morning: "早晨",
|
|
256816
|
+
afternoon: "中午",
|
|
256817
|
+
evening: "晚上",
|
|
256818
|
+
night: "夜间",
|
|
256819
|
+
},
|
|
256820
|
+
};
|
|
256821
|
+
|
|
256822
|
+
const formattingDayPeriodValues = {
|
|
256823
|
+
narrow: {
|
|
256824
|
+
am: "上",
|
|
256825
|
+
pm: "下",
|
|
256826
|
+
midnight: "凌晨",
|
|
256827
|
+
noon: "午",
|
|
256828
|
+
morning: "早",
|
|
256829
|
+
afternoon: "下午",
|
|
256830
|
+
evening: "晚",
|
|
256831
|
+
night: "夜",
|
|
256832
|
+
},
|
|
256833
|
+
abbreviated: {
|
|
256834
|
+
am: "上午",
|
|
256835
|
+
pm: "下午",
|
|
256836
|
+
midnight: "凌晨",
|
|
256837
|
+
noon: "中午",
|
|
256838
|
+
morning: "早晨",
|
|
256839
|
+
afternoon: "中午",
|
|
256840
|
+
evening: "晚上",
|
|
256841
|
+
night: "夜间",
|
|
256842
|
+
},
|
|
256843
|
+
wide: {
|
|
256844
|
+
am: "上午",
|
|
256845
|
+
pm: "下午",
|
|
256846
|
+
midnight: "凌晨",
|
|
256847
|
+
noon: "中午",
|
|
256848
|
+
morning: "早晨",
|
|
256849
|
+
afternoon: "中午",
|
|
256850
|
+
evening: "晚上",
|
|
256851
|
+
night: "夜间",
|
|
256852
|
+
},
|
|
256853
|
+
};
|
|
256854
|
+
|
|
256855
|
+
const ordinalNumber = (dirtyNumber, options) => {
|
|
256856
|
+
const number = Number(dirtyNumber);
|
|
256857
|
+
|
|
256858
|
+
switch (options?.unit) {
|
|
256859
|
+
case "date":
|
|
256860
|
+
return number.toString() + "日";
|
|
256861
|
+
case "hour":
|
|
256862
|
+
return number.toString() + "时";
|
|
256863
|
+
case "minute":
|
|
256864
|
+
return number.toString() + "分";
|
|
256865
|
+
case "second":
|
|
256866
|
+
return number.toString() + "秒";
|
|
256867
|
+
default:
|
|
256868
|
+
return "第 " + number.toString();
|
|
256869
|
+
}
|
|
256870
|
+
};
|
|
256871
|
+
|
|
256872
|
+
const localize = {
|
|
256873
|
+
ordinalNumber,
|
|
256874
|
+
|
|
256875
|
+
era: buildLocalizeFn({
|
|
256876
|
+
values: eraValues,
|
|
256877
|
+
defaultWidth: "wide",
|
|
256878
|
+
}),
|
|
256879
|
+
|
|
256880
|
+
quarter: buildLocalizeFn({
|
|
256881
|
+
values: quarterValues,
|
|
256882
|
+
defaultWidth: "wide",
|
|
256883
|
+
argumentCallback: (quarter) => quarter - 1,
|
|
256884
|
+
}),
|
|
256885
|
+
|
|
256886
|
+
month: buildLocalizeFn({
|
|
256887
|
+
values: monthValues,
|
|
256888
|
+
defaultWidth: "wide",
|
|
256889
|
+
}),
|
|
256890
|
+
|
|
256891
|
+
day: buildLocalizeFn({
|
|
256892
|
+
values: dayValues,
|
|
256893
|
+
defaultWidth: "wide",
|
|
256894
|
+
}),
|
|
256895
|
+
|
|
256896
|
+
dayPeriod: buildLocalizeFn({
|
|
256897
|
+
values: dayPeriodValues,
|
|
256898
|
+
defaultWidth: "wide",
|
|
256899
|
+
formattingValues: formattingDayPeriodValues,
|
|
256900
|
+
defaultFormattingWidth: "wide",
|
|
256901
|
+
}),
|
|
256902
|
+
};
|
|
256903
|
+
|
|
256904
|
+
const matchOrdinalNumberPattern = /^(第\s*)?\d+(日|时|分|秒)?/i;
|
|
256905
|
+
const parseOrdinalNumberPattern = /\d+/i;
|
|
256906
|
+
|
|
256907
|
+
const matchEraPatterns = {
|
|
256908
|
+
narrow: /^(前)/i,
|
|
256909
|
+
abbreviated: /^(前)/i,
|
|
256910
|
+
wide: /^(公元前|公元)/i,
|
|
256911
|
+
};
|
|
256912
|
+
const parseEraPatterns = {
|
|
256913
|
+
any: [/^(前)/i, /^(公元)/i],
|
|
256914
|
+
};
|
|
256915
|
+
|
|
256916
|
+
const matchQuarterPatterns = {
|
|
256917
|
+
narrow: /^[1234]/i,
|
|
256918
|
+
abbreviated: /^第[一二三四]刻/i,
|
|
256919
|
+
wide: /^第[一二三四]刻钟/i,
|
|
256920
|
+
};
|
|
256921
|
+
const parseQuarterPatterns = {
|
|
256922
|
+
any: [/(1|一)/i, /(2|二)/i, /(3|三)/i, /(4|四)/i],
|
|
256923
|
+
};
|
|
256924
|
+
|
|
256925
|
+
const matchMonthPatterns = {
|
|
256926
|
+
narrow: /^(一|二|三|四|五|六|七|八|九|十[二一])/i,
|
|
256927
|
+
abbreviated: /^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,
|
|
256928
|
+
wide: /^(一|二|三|四|五|六|七|八|九|十[二一])月/i,
|
|
256929
|
+
};
|
|
256930
|
+
const parseMonthPatterns = {
|
|
256931
|
+
narrow: [
|
|
256932
|
+
/^一/i,
|
|
256933
|
+
/^二/i,
|
|
256934
|
+
/^三/i,
|
|
256935
|
+
/^四/i,
|
|
256936
|
+
/^五/i,
|
|
256937
|
+
/^六/i,
|
|
256938
|
+
/^七/i,
|
|
256939
|
+
/^八/i,
|
|
256940
|
+
/^九/i,
|
|
256941
|
+
/^十(?!(一|二))/i,
|
|
256942
|
+
/^十一/i,
|
|
256943
|
+
/^十二/i,
|
|
256944
|
+
],
|
|
256945
|
+
|
|
256946
|
+
any: [
|
|
256947
|
+
/^一|1/i,
|
|
256948
|
+
/^二|2/i,
|
|
256949
|
+
/^三|3/i,
|
|
256950
|
+
/^四|4/i,
|
|
256951
|
+
/^五|5/i,
|
|
256952
|
+
/^六|6/i,
|
|
256953
|
+
/^七|7/i,
|
|
256954
|
+
/^八|8/i,
|
|
256955
|
+
/^九|9/i,
|
|
256956
|
+
/^十(?!(一|二))|10/i,
|
|
256957
|
+
/^十一|11/i,
|
|
256958
|
+
/^十二|12/i,
|
|
256959
|
+
],
|
|
256960
|
+
};
|
|
256961
|
+
|
|
256962
|
+
const matchDayPatterns = {
|
|
256963
|
+
narrow: /^[一二三四五六日]/i,
|
|
256964
|
+
short: /^[一二三四五六日]/i,
|
|
256965
|
+
abbreviated: /^周[一二三四五六日]/i,
|
|
256966
|
+
wide: /^星期[一二三四五六日]/i,
|
|
256967
|
+
};
|
|
256968
|
+
const parseDayPatterns = {
|
|
256969
|
+
any: [/日/i, /一/i, /二/i, /三/i, /四/i, /五/i, /六/i],
|
|
256970
|
+
};
|
|
256971
|
+
|
|
256972
|
+
const matchDayPeriodPatterns = {
|
|
256973
|
+
any: /^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i,
|
|
256974
|
+
};
|
|
256975
|
+
const parseDayPeriodPatterns = {
|
|
256976
|
+
any: {
|
|
256977
|
+
am: /^上午?/i,
|
|
256978
|
+
pm: /^下午?/i,
|
|
256979
|
+
midnight: /^午夜/i,
|
|
256980
|
+
noon: /^[中正]午/i,
|
|
256981
|
+
morning: /^早上/i,
|
|
256982
|
+
afternoon: /^下午/i,
|
|
256983
|
+
evening: /^晚上?/i,
|
|
256984
|
+
night: /^凌晨/i,
|
|
256985
|
+
},
|
|
256986
|
+
};
|
|
256987
|
+
|
|
256988
|
+
const match = {
|
|
256989
|
+
ordinalNumber: buildMatchPatternFn({
|
|
256990
|
+
matchPattern: matchOrdinalNumberPattern,
|
|
256991
|
+
parsePattern: parseOrdinalNumberPattern,
|
|
256992
|
+
valueCallback: (value) => parseInt(value, 10),
|
|
256993
|
+
}),
|
|
256994
|
+
|
|
256995
|
+
era: buildMatchFn({
|
|
256996
|
+
matchPatterns: matchEraPatterns,
|
|
256997
|
+
defaultMatchWidth: "wide",
|
|
256998
|
+
parsePatterns: parseEraPatterns,
|
|
256999
|
+
defaultParseWidth: "any",
|
|
257000
|
+
}),
|
|
257001
|
+
|
|
257002
|
+
quarter: buildMatchFn({
|
|
257003
|
+
matchPatterns: matchQuarterPatterns,
|
|
257004
|
+
defaultMatchWidth: "wide",
|
|
257005
|
+
parsePatterns: parseQuarterPatterns,
|
|
257006
|
+
defaultParseWidth: "any",
|
|
257007
|
+
valueCallback: (index) => index + 1,
|
|
257008
|
+
}),
|
|
257009
|
+
|
|
257010
|
+
month: buildMatchFn({
|
|
257011
|
+
matchPatterns: matchMonthPatterns,
|
|
257012
|
+
defaultMatchWidth: "wide",
|
|
257013
|
+
parsePatterns: parseMonthPatterns,
|
|
257014
|
+
defaultParseWidth: "any",
|
|
257015
|
+
}),
|
|
257016
|
+
|
|
257017
|
+
day: buildMatchFn({
|
|
257018
|
+
matchPatterns: matchDayPatterns,
|
|
257019
|
+
defaultMatchWidth: "wide",
|
|
257020
|
+
parsePatterns: parseDayPatterns,
|
|
257021
|
+
defaultParseWidth: "any",
|
|
257022
|
+
}),
|
|
257023
|
+
|
|
257024
|
+
dayPeriod: buildMatchFn({
|
|
257025
|
+
matchPatterns: matchDayPeriodPatterns,
|
|
257026
|
+
defaultMatchWidth: "any",
|
|
257027
|
+
parsePatterns: parseDayPeriodPatterns,
|
|
257028
|
+
defaultParseWidth: "any",
|
|
257029
|
+
}),
|
|
257030
|
+
};
|
|
257031
|
+
|
|
257032
|
+
/**
|
|
257033
|
+
* @category Locales
|
|
257034
|
+
* @summary Chinese Simplified locale.
|
|
257035
|
+
* @language Chinese Simplified
|
|
257036
|
+
* @iso-639-2 zho
|
|
257037
|
+
* @author Changyu Geng [@KingMario](https://github.com/KingMario)
|
|
257038
|
+
* @author Song Shuoyun [@fnlctrl](https://github.com/fnlctrl)
|
|
257039
|
+
* @author sabrinaM [@sabrinamiao](https://github.com/sabrinamiao)
|
|
257040
|
+
* @author Carney Wu [@cubicwork](https://github.com/cubicwork)
|
|
257041
|
+
* @author Terrence Lam [@skyuplam](https://github.com/skyuplam)
|
|
257042
|
+
*/
|
|
257043
|
+
const zhCN = {
|
|
257044
|
+
code: "zh-CN",
|
|
257045
|
+
formatDistance: formatDistance,
|
|
257046
|
+
formatLong: formatLong,
|
|
257047
|
+
formatRelative: formatRelative,
|
|
257048
|
+
localize: localize,
|
|
257049
|
+
match: match,
|
|
257050
|
+
options: {
|
|
257051
|
+
weekStartsOn: 1 /* Monday */,
|
|
257052
|
+
firstWeekContainsDate: 4,
|
|
257053
|
+
},
|
|
257054
|
+
};
|
|
257055
|
+
|
|
257056
|
+
const DATE_FNS_LOCALES = { fr, es, zh: zhCN };
|
|
257057
|
+
/** The date-fns locale for the active language; undefined keeps date-fns' English default. */
|
|
257058
|
+
function useDateFnsLocale() {
|
|
257059
|
+
return DATE_FNS_LOCALES[useWebContainersLocale()];
|
|
257060
|
+
}
|
|
257061
|
+
|
|
255301
257062
|
const EditMemoryModal$1 = dynamic(() => Promise.resolve().then(function () { return editMemoryModal; }).then((module) => ({
|
|
255302
257063
|
default: module.EditMemoryModal,
|
|
255303
257064
|
})), { ssr: false });
|
|
@@ -255318,6 +257079,7 @@ const SNAPSHOT_PAGE_SIZE = 1000;
|
|
|
255318
257079
|
function ManageMemories({ tenantKey, username, mentorId }) {
|
|
255319
257080
|
var _a, _b, _c, _d, _e;
|
|
255320
257081
|
const t = useT();
|
|
257082
|
+
const dateFnsLocale = useDateFnsLocale();
|
|
255321
257083
|
const [selectedLearner, setSelectedLearner] = useState('');
|
|
255322
257084
|
const [dateRange, setDateRange] = useState(undefined);
|
|
255323
257085
|
const [selectedCategorySlug, setSelectedCategorySlug] = useState('all');
|
|
@@ -255560,21 +257322,22 @@ function ManageMemories({ tenantKey, username, mentorId }) {
|
|
|
255560
257322
|
setSelectedLearner(learner.email);
|
|
255561
257323
|
}, children: [jsx(Check, { className: cn('mr-2 h-4 w-4', selectedLearner === learner.email ? 'opacity-100' : 'opacity-0') }), jsx("div", { className: "flex flex-col", children: jsx("span", { className: "font-medium text-gray-700", children: learner.email }) })] }, learner.email)))] })] })] }) })] }) }), jsxs(Popover, { children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", className: "flex w-full items-center gap-2 bg-transparent font-normal whitespace-nowrap lg:w-auto", children: [jsx(Calendar$1, { className: "h-4 w-4" }), (dateRange === null || dateRange === void 0 ? void 0 : dateRange.from) && (dateRange === null || dateRange === void 0 ? void 0 : dateRange.to)
|
|
255562
257324
|
? `${format$1(dateRange.from, 'MMM dd')} - ${format$1(dateRange.to, 'MMM dd')}`
|
|
255563
|
-
: t('memoryTabManageMemories.pickDateRange')] }) }), jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: jsx(Calendar, { mode: "range", selected: dateRange, onSelect: setDateRange, numberOfMonths: 2, initialFocus: true }) })] })] }) }), jsx("div", { children: jsxs("div", { className: "flex items-center justify-between gap-4", children: [jsxs("div", { className: "scrollbar-none hidden flex-1 items-center space-x-8 overflow-x-auto sm:flex", children: [visibleCategories.map((category) => (jsxs("button", { onClick: () => setSelectedCategorySlug(category.slug), className: `relative px-1 py-2 text-sm font-medium whitespace-nowrap transition-colors ${selectedCategorySlug === category.slug
|
|
257325
|
+
: t('memoryTabManageMemories.pickDateRange')] }) }), jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: jsx(Calendar, { mode: "range", selected: dateRange, onSelect: setDateRange, numberOfMonths: 2, initialFocus: true }) })] })] }) }), jsx("div", { children: jsxs("div", { className: "flex items-center justify-between gap-4", children: [jsxs("div", { role: "tablist", "aria-label": t('memoryTabManageMemories.memoryCategoriesAriaLabel'), className: "scrollbar-none hidden flex-1 items-center space-x-8 overflow-x-auto sm:flex", children: [visibleCategories.map((category) => (jsxs("button", { role: "tab", "aria-selected": selectedCategorySlug === category.slug, onClick: () => setSelectedCategorySlug(category.slug), className: `relative px-1 py-2 text-sm font-medium whitespace-nowrap transition-colors ${selectedCategorySlug === category.slug
|
|
255564
257326
|
? 'text-[#38A1E5]'
|
|
255565
257327
|
: 'text-gray-600 hover:text-gray-900'}`, children: [category.name, selectedCategorySlug === category.slug && (jsx("div", { className: "absolute bottom-0 left-1/2 h-0.5 -translate-x-1/2 transform bg-[#38A1E5] transition-all duration-200", style: { width: `${category.name.length * 0.55}em` } }))] }, category.slug))), overflowCategories.length > 0 && (jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs("button", { className: cn('relative flex items-center gap-1 px-1 py-2 text-sm font-medium whitespace-nowrap transition-colors', overflowSelected ? 'text-[#38A1E5]' : 'text-gray-600 hover:text-gray-900'), "aria-label": t('memoryTabManageMemories.moreCategories'), children: [overflowSelected ? overflowSelected.name : t('memoryTabManageMemories.more'), jsx(ChevronDown, { className: "h-3.5 w-3.5" }), overflowSelected && (jsx("div", { className: "absolute bottom-0 left-0 h-0.5 bg-[#38A1E5] transition-all duration-200", style: {
|
|
255566
257328
|
width: `${overflowSelected.name.length * 0.55}em`,
|
|
255567
257329
|
} }))] }) }), jsx(DropdownMenuContent, { align: "end", children: overflowCategories.map((category) => (jsx(DropdownMenuItem, { onClick: () => setSelectedCategorySlug(category.slug), className: selectedCategorySlug === category.slug ? 'bg-gray-100' : '', children: category.name }, category.slug))) })] }))] }), jsx("div", { className: "w-full py-2 sm:hidden", children: jsxs(DropdownMenu, { open: showMobileDropdown, onOpenChange: setShowMobileDropdown, children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsxs(Button$1, { variant: "outline", className: "w-full justify-between bg-transparent", children: [selectedCategoryName, jsx(ChevronDown, { className: "h-4 w-4" })] }) }), jsx(DropdownMenuContent, { className: "w-full", children: categories.map((category) => (jsx(DropdownMenuItem, { onClick: () => {
|
|
255568
257330
|
setSelectedCategorySlug(category.slug);
|
|
255569
257331
|
setShowMobileDropdown(false);
|
|
255570
|
-
}, className: selectedCategorySlug === category.slug ? 'bg-gray-100' : '', children: category.name }, category.slug))) })] }) }), jsxs(Button$1, { onClick: () => setShowManageCategories(true), size: "sm", variant: "outline", className: "shrink-0", "aria-label": t('memoryTabManageMemories.manageCategories'), children: [jsx(Tags, { className: "h-4 w-4 sm:mr-2" }), jsx("span", { className: "hidden sm:inline", children: t('memoryTabManageMemories.categories') })] }), jsxs(Button$1, { onClick: startAddMemory, size: "sm", className: "ibl-button-primary shrink-0", children: [jsx(Plus, { className: "mr-1 h-4 w-4 sm:mr-2" }), jsx("span", { className: "hidden sm:inline", children: t('memoryTabManageMemories.addMemory') }), jsx("span", { className: "sm:hidden", children: t('memoryTabManageMemories.add') })] })] }) }), jsx("div", { className: "space-y-3 px-1 sm:px-0", children: isLoadingMemories ? (jsx("div", { className: "py-8 text-center text-gray-600", children: jsx("p", { children: t('memoryTabManageMemories.loadingMemories') }) })) : (filteredMemories.map((memory) => {
|
|
257332
|
+
}, className: selectedCategorySlug === category.slug ? 'bg-gray-100' : '', children: category.name }, category.slug))) })] }) }), jsxs(Button$1, { onClick: () => setShowManageCategories(true), size: "sm", variant: "outline", className: "shrink-0", "aria-label": t('memoryTabManageMemories.manageCategories'), children: [jsx(Tags, { className: "h-4 w-4 sm:mr-2" }), jsx("span", { className: "hidden sm:inline", children: t('memoryTabManageMemories.categories') })] }), jsxs(Button$1, { onClick: startAddMemory, size: "sm", className: "ibl-button-primary shrink-0", children: [jsx(Plus, { className: "mr-1 h-4 w-4 sm:mr-2" }), jsx("span", { className: "hidden sm:inline", children: t('memoryTabManageMemories.addMemory') }), jsx("span", { className: "sm:hidden", children: t('memoryTabManageMemories.add') })] })] }) }), jsx("div", { role: "list", "aria-label": t('memoryTabManageMemories.savedMemoriesAriaLabel'), className: "space-y-3 px-1 sm:px-0", children: isLoadingMemories ? (jsx("div", { className: "py-8 text-center text-gray-600", children: jsx("p", { children: t('memoryTabManageMemories.loadingMemories') }) })) : (filteredMemories.map((memory) => {
|
|
255571
257333
|
const timeAgo = memory.createdAt
|
|
255572
257334
|
? formatDistanceToNow(new Date(memory.createdAt), {
|
|
255573
257335
|
addSuffix: true,
|
|
257336
|
+
locale: dateFnsLocale,
|
|
255574
257337
|
})
|
|
255575
257338
|
: '';
|
|
255576
257339
|
const displayUser = memory.email || t('memoryTabManageMemories.unknown');
|
|
255577
|
-
return (jsxs("div", { className: "flex items-start gap-3 rounded-lg border border-gray-200 bg-white p-3", children: [jsxs("div", { className: "flex-1", children: [(timeAgo || displayUser) && (jsxs("div", { className: "mb-2 flex items-center justify-between", children: [timeAgo && jsx("span", { className: "text-sm text-gray-600", children: timeAgo }), displayUser && (jsx("span", { className: "max-w-[100px] truncate text-sm text-gray-900 sm:max-w-[200px]", children: displayUser }))] })), jsx("
|
|
257340
|
+
return (jsxs("div", { role: "listitem", className: "flex items-start gap-3 rounded-lg border border-gray-200 bg-white p-3", children: [jsxs("div", { className: "flex-1", children: [(timeAgo || displayUser) && (jsxs("div", { className: "mb-2 flex items-center justify-between", children: [timeAgo && jsx("span", { className: "text-sm text-gray-600", children: timeAgo }), displayUser && (jsx("span", { className: "max-w-[100px] truncate text-sm text-gray-900 sm:max-w-[200px]", children: displayUser }))] })), jsx("p", { className: "text-sm leading-relaxed text-gray-900", children: memory.content })] }), jsxs(DropdownMenu, { children: [jsx(DropdownMenuTrigger, { asChild: true, children: jsx(Button$1, { variant: "ghost", size: "sm", "aria-label": t('memoryTabManageMemories.memoryActionsAriaLabel'), className: "h-6 w-6 flex-shrink-0 p-0 text-gray-600 hover:text-gray-900", children: jsx(Ellipsis, { className: "h-4 w-4" }) }) }), jsxs(DropdownMenuContent, { align: "end", children: [jsx(DropdownMenuItem, { onClick: () => startEdit(memory), children: t('memoryTabManageMemories.edit') }), jsx(DropdownMenuItem, { onClick: () => setShowDeleteConfirm(memory.id), children: t('memoryTabManageMemories.delete') })] })] })] }, memory.id));
|
|
255578
257341
|
})) }), filteredMemories.length > 0 && selectedCategorySlug !== 'all' && (jsx("div", { className: "flex justify-end", children: jsx(Button$1, { variant: "outline", onClick: () => setShowBulkDeleteConfirm(true), children: t('memoryTabManageMemories.deleteAll') }) })), filteredMemories.length === 0 && !isLoadingMemories && (jsx("div", { className: "py-8 text-center text-gray-600", children: jsx("p", { children: t('memoryTabManageMemories.noSavedMemories') }) })), totalPages > 1 && (jsx("div", { className: "flex justify-center pt-2", children: jsx(IblPagination, { currentPage: page, totalPages: totalPages, onPageChange: setPage, disabled: isLoadingMemories }) }))] }), jsx(EditMemoryModal$1, { open: !!editingMemory, onOpenChange: (open) => !open && cancelEdit(), editContent: editContent, editCategory: editCategory, onContentChange: setEditContent, onCategoryChange: setEditCategory, onSave: saveEdit, onCancel: cancelEdit, categories: categoryNames, isSaving: isEditing }), jsx(AddMemoryModal$1, { open: showAddMemory, onOpenChange: (open) => !open && cancelAddMemory(), newMemoryContent: newMemoryContent, newMemoryCategory: newMemoryCategory, onContentChange: setNewMemoryContent, onCategoryChange: setNewMemoryCategory, onSave: saveNewMemory, onCancel: cancelAddMemory, categories: categoryNames, isSaving: isSaving }), jsx(DeleteMemoryModal, { open: !!showDeleteConfirm, onOpenChange: (open) => !open && setShowDeleteConfirm(null), onConfirm: () => showDeleteConfirm !== null && handleDeleteMemory(showDeleteConfirm), onCancel: () => setShowDeleteConfirm(null), isDeleting: isDeleting }), jsx(ManageCategoriesModal$1, { open: showManageCategories, onOpenChange: setShowManageCategories, tenantKey: tenantKey, mentorId: mentorId }), jsx(BulkDeleteMemoryModal$1, { open: showBulkDeleteConfirm, onOpenChange: setShowBulkDeleteConfirm, onConfirm: handleBulkDelete, onCancel: () => setShowBulkDeleteConfirm(false), isDeleting: isBulkDeleting, selectedCategory: selectedCategoryName })] }));
|
|
255579
257342
|
}
|
|
255580
257343
|
|