@konfuzio/document-validation-ui 0.2.4 → 0.2.5-dev.0
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.
- package/dist/js/app.js +1 -1
- package/dist/js/app.js.map +1 -1
- package/package.json +1 -1
package/dist/js/app.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var e={1903:()=>{},4174:e=>{"use strict";e.exports=JSON.parse('{"no_label_sets_found":"No annotation sets found","no_label_sets_found_description":"There are no annotation sets in this document.","no_labels_found":"No labels found","no_labels_description":"There are no labels in this label set.","resolution_not_supported":"App not supported on this resolution","upload_documents":"Upload your own documents","request_trial":"Request trial access","warning_message":"AI can’t be trained if you change the text manually.","category":"Category","status":"Status","preparation":"Preparation","training":"Training","test":"Test","excluded":"Excluded","set_status":"Set a status","status_error":"We couldn’t change the status. Please try again later.","edit":"Edit","rename":"Rename","save":"Save","details":"Details","autosaving":"Auto saving...","saved":"Saved","hide":"Hide","not_saved":"Could not save. Try again","handover":"Handover","handover_document":"Handover document","type_email":"Type an email","invalid_email":"Please enter a valid email address.","members":"MEMBERS","select":"Select","document_successfully_handed":"Document successfully handed over to","handover_not_possible":"Handover was not possible. Please try again later.","small_viewport_title":"Small viewport size","small_viewport_info":"We’re sorry, but the app is not optimized to this viewport size. For a better experience, please open it on a bigger viewport.","ok":"Ok, got it","no_data_found":"Click to edit...","draw_box_document":"Find <i>{label_name}</i> in the document","confidence":"Confidence","not_found_in_document":"Not found in the document","approved_by":"Approved by","approved":"Approved","created_by":"Created by","edited_by":"Edited by","edited":"Edited","created":"Created manually","not_revised_yet":"Not revised yet","rotate_pages":"Rotate pages","rotate_all":"Rotate all","cancel":"Cancel","apply":"Apply","next":"Next: Rename and Categorize","back_to_annotations":"Back to annotation view","submit":"Submit","data_being_extracted":"New data is being extracted","analysing_document":"We are analysing your document.","few_minutes":"This might take a few minutes.","missing_annotation":"Mark as Missing","ann_exists":"An annotation for this label and label set already exists.","lite_mode":"Read Only","limited_functionalities":"You are using the Read Only version with limited functionalities.","accept":"Accept","split":"Split","reorder":"Reorder","rotate":"Rotate","edit_error":"The changes couldn’t be saved, please try again later.","select_pages":"You can now rotate pages, reorder and split documents.","edit_document":"Edit document (Early Access)","edit_early_access":"You are one of the users who have access to these functionalities before the release date.","selected":"selected","rotate_selected":"Rotate selected","edit_not_available":"Editing is not possible for documents with a status of \'Preparation\', \'Training\' or \'Test\', or documents that are \'Reviewed\'","rotate_split_reorder":"Rotate, split or reorder","rename_and_categorize":"Rename and Categorize","select_label":"Select Label","select_annotation_set":"Select Annotation Set","document_error_title":"Document error","document_error_info":"We’re sorry, the document ran into a problem and its data can’t be restored.","contact_support":"Contact support","finish_review":"Finish review","review_error":"Something went wrong finishing the review. Please try again later.","document_reviewed":"Editing is no longer possible since the document has already been reviewed.","reviewed_mode":"Reviewed","error_creating_annotation":"The annotation could not be created. Please try again later.","categorize_document_title":"Categorize the Document","categorized_as":"This document is currently categorized as","not_categorized":"This document is currently not categorized. Please select a category before annotating: ","choose_category":"Choose a category","select_category":"Select the correct category","categorized_error":"If this is not the correct category, please change it and we\'ll proceed with the re-extraction.","categorize_document_no_category_description":"Ask the Project Manager to add a description of this Category to know more about this category.","annotations_pending":"pending","annotations_accepted":"accepted","mark_all_missing":"Mark all empty as Missing","missing_counter":"Missing","pending_counter":"Pending","no_labels_to_choose":"No Labels","accept_group":"Accept all","new_ann_set_title":"New annotation set","new_ann_set_description":"Select a data model from the existing ones. The new annotation set will contain the same labels.","select_label_set":"Select label-set model","new_ann_set_hint":"The new set will only be created in the moment you save your annotation.","new":"New","continue":"Continue","use_your_keyboard":"Use your keyboard","arrow_keys":"to Navigate","esc_key":"Exit","enter_key":"Accept or Save","decline":"Decline","server_error":"We are currently experiencing a server issue. Please try again later or","get_support":"Get Support","no_labels_available":"There are no unfilled or multiple labels in the selected annotation set.","no_labels_available_link":"For more details, you can visit <a href=\'https://help.konfuzio.com/modules/labels/index.html#multiple\' target=\'_blank\'>this link</a>.","new_multi_ann_title":"Create multiple annotations","new_multi_ann_description":"Select a data model from the existing ones, then deselect the labels that don\'t exist in this document.","drag_drop_columns_multi_ann":"Drag and drop to change the order of the labels","error_creating_multi_ann":"Not all annotation sets were created successfully.","disabled_finish_review":"Finishing the document review is only possible after all annotations have been revised, whether they are accepted or marked as missing.","no_multi_ann_labelset_model":"There are no available label sets that can be found multiple times in this document.","no_multi_ann_labelset_model_link":"For more details, you can visit <a href=\'https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets\' target=\'_blank\'>this link</a>.","single_category_in_project":"The current project has only one category. To be able to change it, the new one should be first added to the project.","approved_annotations":"It is not possible to change the current category since the document has approved or manually created annotations.","restore":"Restore","split_modal_title":"Split the document","split_modal_body":"We\'ve scanned your file and found <strong>{number_of_split_documents}</strong> different documents. <strong>We strongly recommend</strong> splitting it at this stage, otherwise all the progress you’ve made will be lost due to document data re-extraction.","do_it_later":"I\'ll do it later","review_now":"Review now","recommended":"Recommended","smart_split":"Smart Split","smart_split_suggestions":"Our Smart Split suggestions are highlighted in green","no_splitting_suggestions":"This document does not have splitting suggestions","confirm_splitting":"Are you sure you want to confirm the changes?","splitting_warning":"Be aware that any annotations you have made in this document will not be saved if you proceed.","no":"No","yes":"Yes","prepare_document":"Prepare the document","split_modal_no_suggestions":"Do you need to split the document? <strong>We strongly recommend</strong> splitting it at this stage, otherwise all the progress you’ve made will be lost in the future.","missing_from_document":"Missing from the document","edit_label":"Edit label","delete_label":"Delete label","table":"Table","delete_table":"Delete table","error_downloading_file":"The file could not be downloaded.","original_file":"Original file","pdf_file":"PDF file","no_labels_in_set":"This annotation set has no labels.","link_to_add_labels":"See how to add them <a href=\'https://help.konfuzio.com/modules/labels/index.html#add-a-label\' target=\'_blank\'>here</a>.","no_annotations_in_annotation_set":"This annotation set has no annotations extracted for its respective labels.","wait_title":"Please wait...","redirecting_to_documents_list":"We are taking you to the documents list, so you can continue reviewing your documents while we process the changes made.","translated_string_title":"Translated text","no_translated_string":"No translation exists yet.","add_translation":"Click to add one","edit_translation":"Click to edit","search":"Search","no_results":"No results","search_below_minimum":"Minimum 3 characters","search_in_document":"Search document","document_details":"Details","human_feedback_needed":"Human Feedback needed","label_missing_annotations":"Missing Annotations","accepted_annotations":"Accepted Annotations","edit_ann_content_warning":"If you change the content, the AI cannot use this Annotation. You will also invalidate the training data. Try to change the selection to capture the content before adding it manually, or press OK to continue anyway.","annotation_deleted":"This annotation has been deleted.","annotation_link":"Copy the permanent link to this annotation","copied":"Copied","checkbox_ann_details":"A checkbox will be extracted for this label.","document_section":"Document Section","label_size":"Column size:","powered_by":"powered by Konfuzio","nav_label_anns":"Navigate through annotations"}')},4394:()=>{},5432:(e,t,n)=>{var o={"./de.json":5894,"./en.json":4174,"./es.json":6725};function i(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}i.keys=function(){return Object.keys(o)},i.resolve=a,e.exports=i,i.id=5432},5894:e=>{"use strict";e.exports=JSON.parse('{"no_label_sets_found":"Keine Label Sets vorhanden","no_label_sets_found_description":"In diesem Dokument sind keine Label Sets vorhanden.","no_labels_found":"Keine Labels vorhanden","no_labels_description":"In diesem Label Set sind keine Labels vorhanden.","resolution_not_supported":"Die aktuelle Auflösung wird nicht unterstützt","upload_documents":"Laden Sie Ihre Dokumente hoch","request_trial":"Fordern Sie Ihren Probezugang an","warning_message":"Die KI kann nicht trainiert werden, wenn Sie den Text manuell ändern.","category":"Kategorie","status":"Status","preparation":"Vorbereitung","training":"Training","test":"Test","excluded":"Ausgenommen","set_status":"Setzen Sie bitte einen Status","status_error":"Wir konnten den Status nicht ändern. Bitte versuchen Sie es später erneut.","edit":"Bearbeiten","rename":"Umbenennen","save":"Speichern","autosaving":"Automatisches Speichern...","saved":"Gespeichert","hide":"Ausblenden","not_saved":"Konnte nicht gespeichert werden. Versuchen Sie es noch einmal","handover":"Übergeben","handover_document":"Übergabedokument","type_email":"Bitte geben Sie eine E-Mail ein","invalid_email":"Bitte geben Sie eine gültige E-Mail-Adresse ein.","members":"Mitglieder","select":"Auswählen","document_successfully_handed":"Dokument erfolgreich zugewiesen an","handover_not_possible":"Eine Zuweisung war nicht möglich. Bitte versuchen Sie es später erneut.","small_viewport_title":"Kleine Fenstergröße","small_viewport_info":"Es tut uns leid, aber Anwendung ist nicht für diese Fenstergröße optimiert. Für eine bessere Bedienbarkeit öffnen Sie es bitte in einem größeren Ansichtsfenster.","ok":"Ok","no_data_found":"Zum Bearbeiten anklicken...","draw_box_document":"Find <i>{label_name}</i> in the document","confidence":"Konfidenz","not_found_in_document":"Im Dokument nicht gefunden","approved_by":"Genehmigt von","approved":"Genehmigt","created_by":"Erstellt von","edited_by":"Bearbeitet durch","edited":"Bearbeitet","created":"Manuell erzeugt","not_revised_yet":"Noch nicht geprüft","rotate_pages":"Seiten drehen","rotate_all":"Alles drehen","cancel":"Beenden","apply":"Anwenden","data_being_extracted":"Neue Daten werden extrahiert","analysing_document":"Wir analysieren Ihr Dokument.","few_minutes":"Dies könnte ein paar Minuten dauern.","missing_annotation":"Als fehlend markieren","ann_exists":"Eine Annotation für dieses Label und Label-Set existiert bereits.","lite_mode":"Schreibgeschützt","limited_functionalities":"Sie verwenden die schreibgeschützte Version mit begrenzter Funktionalität.","split":"Aufteilen","reorder":"Sortieren","rotate":"Rotieren","edit_error":"Die Änderungen konnten nicht gespeichert werden. Bitte versuchen Sie es später erneut.","select_pages":"Sie können nun Seiten drehen, neu sortieren und Dokumente teilen.","edit_document":"Dokument bearbeiten (Early Access)","edit_early_access":"Sie sind einer der Nutzer, die Zugang zu diesen Funktionalitäten vor dem offiziellen Erscheinungstermin erhalten.","selected":"ausgewählt","rotate_selected":"Ausgewählte Seite drehen","edit_not_available":"Dokumente mit dem Status \'Vorbereitung\', \'Training\' oder \'Test\' sowie Dokumente mit dem Status \'Geprüft\' können nicht bearbeitet werden.","rotate_split_reorder":"Rotieren, teilen oder sortieren","rename_and_categorize":"Umbenennen und kategorisieren","submit":"Senden","next":"Nächster Schritt: Umbenennen und kategorisieren","back_to_annotations":"Zurück zur Hauptansicht","select_label":"Label auswählen","select_annotation_set":"Wähle Annotation Set","accept":"Akzeptieren","document_error_title":"Dokumentenfehler","document_error_info":"Es tut uns leid, das Dokument ist auf ein Problem gestoßen und seine Daten können nicht wiederhergestellt werden.","contact_support":"Support kontaktieren","finish_review":"Nachprüfung beenden","review_error":"Beim Abschluss der Überprüfung ist etwas schiefgelaufen. Bitte versuchen Sie es später erneut.","document_reviewed":"Eine Bearbeitung ist nicht mehr möglich, da das Dokument bereits geprüft wurde.","reviewed_mode":"Geprüft","error_creating_annotation":"Die Annotation konnte nicht erzeugt werden. Bitte versuchen Sie es später erneut.","categorize_document_title":"Dokument Kategorisieren","categorized_as":"Dieses Dokument ist kategorisiert als","not_categorized":"Nicht kategorisiert. Bitte wählen Sie vor dem Annotieren eine Kategorie aus: ","choose_category":"Wählen Sie bitte eine Kategorie","select_category":"Wählen Sie bitte die richtige Kategorie aus","categorized_error":"Wenn dies nicht die richtige Kategorie ist, ändern Sie diese bitte und wir fahren mit der erneuten Extraktion fort.","categorize_document_no_category_description":"Bitten Sie den Projektmanager, eine Beschreibung dieser Kategorie hinzuzufügen, um mehr über diese Kategorie zu erfahren.","annotations_pending":"Ausstehende Annotationen","annotations_accepted":"Akzeptierte Annotationen","mark_all_missing":"Alle leeren als fehlend markieren","missing_counter":"Fehlen","pending_counter":"Ausstehende","no_labels_to_choose":"Keine Labels","accept_group":"Alle akzeptieren","use_your_keyboard":"Benutze deine Tastatur","arrow_keys":"Navigieren","esc_key":"Exit","enter_key":"Akzeptieren oder Speichern","decline":"Ablehnen","server_error":"Wir haben derzeit ein Serverproblem. Bitte versuchen Sie es später noch einmal oder","get_support":"Hole dir Unterstützung","no_labels_available":"Das ausgewählte Annotations-Set enthält keine nicht ausgefüllten oder multiplen Labels.","no_labels_available_link":"Weitere Informationen finden Sie unter <a href=\'https://help.konfuzio.com/modules/labels/index.html#multiple\' target=\'_blank\'>diesem Link</a>.","new_ann_set_title":"Neues Annotations-Set","new_ann_set_description":"Wählen Sie ein Datenmodell aus den vorhandenen aus. Das neue Annotations-Set enthält dieselben Beschriftungen.","select_label_set":"Wählen Sie das Label-Set-Modell aus","new_ann_set_hint":"Das neue Set wird erst in dem Moment erstellt, in dem Sie Ihre Annotationen speichern.","new":"Neu","continue":"Weiter","new_multi_ann_title":"Erstellen Sie mehrere Annotationen","new_multi_ann_description":"Wählen Sie ein Datenmodell aus den vorhandenen aus und deaktivieren Sie dann die Labels, die in diesem Dokument nicht vorhanden sind.","drag_drop_columns_multi_ann":"Drag and Drop, um die Reihenfolge der Labels zu ändern","error_creating_multi_ann":"Nicht alle Annotationen wurden erfolgreich erstellt.","no_multi_ann_labelset_model":"Es gibt keine verfügbaren Label Sets, die mehrfach in diesem Dokument zu finden sind.","no_multi_ann_labelset_model_link":"Weitere Informationen finden Sie unter <a href=\'https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets\' target=\'_blank\'>diesem Link</a>.","single_category_in_project":"Das aktuelle Projekt hat nur eine Kategorie. Um sie ändern zu können, sollte die neue zuerst dem Projekt hinzugefügt werden.","approved_annotations":"Die Kategorie kann nicht geändert werden, da bereits akzeptierte Annotationen oder manuell erstellte Annotationen zu diesem Dokument vorhanden sind.","restore":"Wiederherstellen","disabled_finish_review":"Das Beenden der Dokumentenprüfung ist erst möglich, nachdem alle Annotationen überarbeitet wurden, unabhängig davon, ob sie akzeptiert oder als fehlend markiert wurden.","split_modal_title":"Dokument aufteilen","split_modal_body":"Wir haben Ihre Datei gescannt und <strong>{number_of_split_documents}</strong> verschiedene Dokumente gefunde. <strong>Wir empfehlen dringend,</strong> sie zu diesem Zeitpunkt aufzuteilen, da sonst alle Fortschritte, die Sie gemacht haben, aufgrund der erneuten Extraktion der Dokumentdaten verloren gehen.","do_it_later":"Ich werde es später machen","review_now":"Jetzt überprüfen","recommended":"Empfohlen","smart_split":"Smart Split","smart_split_suggestions":"Unsere Smart Split-Vorschläge sind grün hervorgehoben","no_splitting_suggestions":"Dieses Dokument enthält keine Split-Vorschläge","confirm_splitting":"Sind Sie sicher, dass Sie die Änderungen bestätigen möchten?","splitting_warning":"Beachten Sie bitte, dass alle Annotationen, die Sie in diesem Dokument gemacht haben, nicht gespeichert werden, wenn Sie fortfahren.","no":"Nein","yes":"Ja","split_modal_no_suggestions":"Soll das Dokument geteilt werden? Wir <strong>empfehlen</strong> das Dokument jetzt zuteilen, da sonst alle Fortschritte, die in der Zwischenzeit gemacht werden, verloren gehen.","missing_from_document":"Fehlt im Dokument","edit_label":"Label editieren","delete_label":"Label löschen","table":"Tabelle","prepare_document":"Dokument vorbereiten","delete_table":"Tabelle löschen","error_downloading_file":"Die Datei konnte nicht heruntergeladen werden.","original_file":"Originaldatei","pdf_file":"PDF Datei","no_labels_in_set":"Dieser Annotationssatz hat keine Beschriftungen.","link_to_add_labels":"Sehen Sie <a href=\'https://help.konfuzio.com/modules/labels/index.html#add-a-label\' target=\'_blank\'>hier</a>, wie Sie sie hinzufügen.","no_annotations_in_annotation_set":"Dieser Annotationssatz enthält keine extrahierten Annotationen für die jeweiligen Beschriftungen.","wait_title":"Bitte warten...","redirecting_to_documents_list":"Wir führen Sie zur Dokumentenliste, sodass Sie Ihre Dokumente weiter überprüfen können, während wir die vorgenommenen Änderungen verarbeiten.","translated_string_title":"Übersetzter Text","no_translated_string":"Es existiert noch keine Übersetzung.","add_translation":"Klicken Sie zum hinzufügen","edit_translation":"Zum Bearbeiten anklicken","search":"Suchen","no_results":"Keine Ergebnisse","search_below_minimum":"Mindestens 3 Zeichen","search_in_document":"Suche im Dokument","document_details":"Details","human_feedback_needed":"Menschliches Feedback erforderlich","label_missing_annotations":"Fehlende Annotationen","accepted_annotations":"Akzeptierte Annotationen","edit_ann_content_warning":"Wenn Sie den Text ändern, kann die KI diese Annotation nicht verwenden. Dadurch werden auch die Trainingsdaten ungültig. Versuchen Sie, die Auswahl zu verändern, um den Text zu erfassen, bevor Sie ihn manuell hinzufügen, oder drücken Sie OK, um trotzdem fortzufahren.","annotation_deleted":"Diese Annotation wurde gelöscht.","annotation_link":"Kopieren Sie den permanenten Link zu dieser Annotationen","copied":"Kopiert","checkbox_ann_details":"Für dieses Label wird ein Kästchen extrahiert.","document_section":"Dokumentabschnitt","label_size":"Spaltengröße:","powered_by":"betrieben von Konfuzio","nav_label_anns":"Durch Annotationen navigieren"}')},6725:e=>{"use strict";e.exports=JSON.parse('{"no_label_sets_found":"No se han encontrado grupos de etiquetas","no_label_sets_found_description":"No existen grupos de etiquetas en este documento.","no_labels_found":"No se han encontrado etiquetas","no_labels_description":"No existen etiquetas en este grupo.","resolution_not_supported":"Aplicación no compatible con la resolución de pantalla actual","upload_documents":"Suba sus propios documentos","request_trial":"Solicite acceso a la versión de prueba","warning_message":"La IA no puede ser entrenada si se cambia el texto manualmente.","category":"Categoría","status":"Estado","preparation":"Preparación","training":"Entrenamiento","test":"Prueba","excluded":"Excluído","set_status":"Establecer estado","status_error":"No ha sido posible cambiar el estado del documento. Por favor, inténtelo de nuevo más tarde.","edit":"Editar","rename":"Rebautizar","save":"Guardar","autosaving":"Auto guardando...","saved":"Guardado","hide":"Ocultar","not_saved":"No se pudo guardar. Inténtelo de nuevo.","handover":"Asignar","handover_document":"Asignar documento","type_email":"Escriba un correo electrónico","invalid_email":"Por favor, introduzca un correo electrónico válido","members":"MIEMBROS","select":"Seleccionar","document_successfully_handed":"Documento asignado correctamente a","handover_not_possible":"La asignación no fue posible. Por favor, inténtelo de nuevo más tarde.","small_viewport_title":"Tamaño de ventana demasiado pequeño","small_viewport_info":"Lo sentimos, pero aplicación no está optimizado para este tamaño de ventana. Para una mejor experiencia, por favor ábralo en una ventana más grande.","ok":"Ok, entendido","no_data_found":"Click para editar...","draw_box_document":"Encuentra <i>{label_name}</i> en el documento","confidence":"Precisión","not_found_in_document":"No encontrado en el documento","approved_by":"Aprobado por","approved":"Aprobado","created_by":"Creado por","edited_by":"Editado por","edited":"Editado","created":"Creado manualmente","not_revised_yet":"No ha sido revisado aún","rotate_pages":"Rotar páginas","rotate_all":"Rotar todas","cancel":"Cancelar","apply":"Aplicar","next":"Siguiente: Cambiar nombre y categoría","back_to_annotations":"Volver a la vista de anotaciones","submit":"Enviar","data_being_extracted":"Se están extrayendo nuevos datos","analysing_document":"Estamos analizando el documento.","few_minutes":"Esto puede tardar unos minutos.","missing_annotation":"Marcar como Faltante","ann_exists":"Ya existe una anotación para esta etiqueta y grupo de etiquetas.","lite_mode":"Sólo lectura","limited_functionalities":"Está utilizando la versión de sólo lectura con funcionalidad limitada.","accept":"Aceptar","split":"Dividir","reorder":"Reordenar","rotate":"Rotar","edit_error":"No se han podido guardar los cambios, por favor, inténtelo de nuevo más tarde.","select_pages":"Ahora puede rotar, reordenar o dividir los documentos.","edit_document":"Editar documento (Early Access)","edit_early_access":"Eres uno de los usuarios que tiene acceso a estas funcionalidades antes de la fecha de lanzamiento.","selected":"seleccionadas","rotate_selected":"Rotar seleccionadas","edit_not_available":"No es posible editar documentos con estado en \'Preparación\', \'Entrenamiento\' o \'Pruebas\', así como documentos que han sido \'Revisados\'","rotate_split_reorder":"Rotar, dividir or reordenar","rename_and_categorize":"Cambiar nombre y categoría","select_label":"Seleccionar etiqueta","select_annotation_set":"Seleccionar grupo de etiquetas","document_error_title":"Error en el documento","document_error_info":"Lo sentimos, el documento ha sufrido un problema y no se pueden restaurar sus datos.","contact_support":"Contactar con el soporte","finish_review":"Finalizar revisión","review_error":"No ha sido posible finalizar la revisión. Por favor, inténtelo de nuevo más tarde.","document_reviewed":"No es posible editar el documento si ya ha sido revisado.","reviewed_mode":"Revisado","error_creating_annotation":"No ha sido posible crear la anotación. Por favor, inténtelo de nuevo más tarde.","categorize_document_title":"Categorizar documento","categorized_as":"Este documento ha sido categorizado como","not_categorized":"Este documento no ha sido categorizado. Por favor, seleccione una categoría antes de realizar anotaciones: ","choose_category":"Seleccione una categoría","select_category":"Seleccione la categoría correcta","categorized_error":"Si esta no es la categoría correcta, por favor cámbiela y procederemos a realizar de nuevo la extracción.","categorize_document_no_category_description":"Solicite a su Gestor de Proyecto que agregue una descripción a esta Categoría para saber más sobre ella.","annotations_pending":"pendientes","annotations_accepted":"aceptadas","mark_all_missing":"Marcar todas las anotaciones vacías como Faltantes","missing_counter":"Faltantes","pending_counter":"Pendientes","no_labels_to_choose":"Sin etiquetas","accept_group":"Aceptar todas","use_your_keyboard":"Use su teclado","arrow_keys":"para Navegar","esc_key":"Salir del modo de edición","enter_key":"Aceptar o Guardar","decline":"Declinar","server_error":"Estamos experimentando problemas con el servidor. Por favor, repita la operación o ","get_support":"Contacte al Soporte","no_labels_available":"No hay etiquetas vacías o múltiples en el grupo de anotaciones seleccionado.","no_labels_available_link":"Para más información, haz clic en <a href=\'https://help.konfuzio.com/modules/labels/index.html#multiple\' target=\'_blank\'>este enlace</a>.","new_ann_set_title":"Crear anotaciones múltiples","new_ann_set_description":"Seleccione un modelo de datos de las opciones disponibles, y luego deseleccione las etiquetas que no existen en este documento.","select_label_set":"Seleccione un modelo de grupo de etiquetas","new_ann_set_hint":"El nuevo grupo será creado solo cuando se haya guardado la anotación.","new":"Nuevo","continue":"Continuar","drag_drop_columns_multi_ann":"Arrastre y suelte las columnas para ordenar las etiquetas","error_creating_multi_ann":"No todos los grupos de anotaciones fueron creados de manera exitosa.","disabled_finish_review":"Solo es posible finalizar la revisión del documento si todas las anotaciones han sido revisadas, ya sea aceptadas o marcadas como faltantes.","no_multi_ann_labelset_model":"En este documento no hay grupos de etiquetas múltiples disponibles.","no_multi_ann_labelset_model_link":"Para más información, haga clic en <a href=\'https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets\' target=\'_blank\'>este enlace</a>.","single_category_in_project":"Este proyecto solo tiene una categoría. Para poder modificarla, es necesario agregar esta nueva categoría al proyecto.","approved_annotations":"No es posible cambiar la categoría ya que existen anotaciones aceptadas o creadas manualmente en este documento.","restore":"Restaurar","split_modal_title":"Dividir el documento","split_modal_body":"Hemos escaneado su documento y hemos encontrado <strong>{number_of_split_documents}</strong> documentos diferentes. <strong>Le recomendamos</strong> dividir el documento en esta etapa, ya que de lo contrario se perderá el progreso logrado debido a una nueva extracción de los datos del documento.","do_it_later":"Lo haré luego","review_now":"Revisar ahora","recommended":"Recomendado","smart_split":"División Inteligente","smart_split_suggestions":"Nuestras sugerencias de División Inteligente están marcadas en color verde","no_splitting_suggestions":"Este documento no tiene sugerencias de división","confirm_splitting":"¿Seguro que quiere confirmar los cambios?","splitting_warning":"Tenga en cuenta que se perderán las anotaciones que haya confirmado en el documento.","no":"No","yes":"Sí","split_modal_no_suggestions":"¿Necesita dividir el documento? <strong>Te recomendamos</strong> hacerlo en este momento, o de lo contrario se perderán los cambios realizados.","missing_from_document":"Falta en el documento","edit_label":"Editar etiqueta","delete_label":"Eliminar etiqueta","table":"Tabla","new_multi_ann_description":"Seleccione un modelo de datos de los existentes, luego deseleccione las etiquetas que no existen en este documento.","new_multi_ann_title":"Crear múltiples anotaciones","prepare_document":"Prepare el documento","delete_table":"Eliminar tabla","error_downloading_file":"El documento no pudo ser descargado.","original_file":"Documento original","pdf_file":"Documento PDF","no_labels_in_set":"Este grupo de anotaciones no tiene etiquetas.","link_to_add_labels":"Para ver cómo agregarlas haga clic <a href=\'https://help.konfuzio.com/modules/labels/index.html#add-a-label\' target=\'_blank\'>aquí</a>.","no_annotations_in_annotation_set":"Este grupo de anotaciones no tiene anotaciones encontradas para sus respectivas etiquetas.","wait_title":"Por favor espere...","redirecting_to_documents_list":"Lo estamos redirigiendo a la lista de documentos, para que pueda continuar la revisión de sus documentos mientras procesamos los cambios realizados.","translated_string_title":"Texto traducido","no_translated_string":"Aún no existe traducción.","add_translation":"Clic para agregar","edit_translation":"Clic para editar","search":"Buscar","no_results":"Sin resultados","search_below_minimum":"Mínimo 3 caracteres","search_in_document":"Buscar en documento","document_details":"Detalles","human_feedback_needed":"Necesita feedback humano","label_missing_annotations":"Anotaciones faltantes","accepted_annotations":"Anotaciones aceptadas","edit_ann_content_warning":"Si cambia el texto, la IA no puede utilizar esta anotación. También invalidarás los datos del entrenamiento. Intente cambiar la selección para capturar el texto antes de agregarlo manualmente, o presione OK para continuar de todos modos.","annotation_deleted":"Esta anotación ha sido eliminada.","annotation_link":"Copia el enlace permanente a esta anotación.","copied":"Copiada","checkbox_ann_details":"Se extraerá una casilla de verificación para esta etiqueta.","document_section":"Sección del documento","label_size":"Tamaño de columna:","powered_by":"impulsado por Konfuzio","nav_label_anns":"Navegar por las anotaciones"}')},8330:e=>{"use strict";e.exports=JSON.parse('{"UU":"@konfuzio/document-validation-ui","rE":"0.2.4"}')},8578:(e,t,n)=>{"use strict";var o=n(9726);const i={class:"dv-ui-app-container dv-ui-theme"};function a(e,t,n,a,s,l){const r=(0,o.resolveComponent)("DocumentsList"),c=(0,o.resolveComponent)("DocumentDashboard"),d=(0,o.resolveComponent)("ErrorPage");return(0,o.openBlock)(),(0,o.createElementBlock)("div",i,[l.showDocumentsList?((0,o.openBlock)(),(0,o.createBlock)(r,{key:0})):(0,o.createCommentVNode)("",!0),e.pageError?((0,o.openBlock)(),(0,o.createBlock)(d,{key:2,error:e.pageError},null,8,["error"])):((0,o.openBlock)(),(0,o.createBlock)(c,{key:1}))])}var s=n(6278),l=n(2139);const r={class:"dashboard"},c={key:0,class:"error-modal"},d={key:1,class:"not-optimized"},h={key:2,class:"not-supported"},u={class:"text"};function m(e,t,n,i,a,s){const l=(0,o.resolveComponent)("DocumentTopBar"),m=(0,o.resolveComponent)("DocumentThumbnails"),p=(0,o.resolveComponent)("ScrollingDocument"),g=(0,o.resolveComponent)("pane"),C=(0,o.resolveComponent)("DocumentAnnotations"),_=(0,o.resolveComponent)("DocumentEdit"),b=(0,o.resolveComponent)("splitpanes"),E=(0,o.resolveComponent)("ChooseLabelSetModal"),S=(0,o.resolveComponent)("ErrorMessage"),f=(0,o.resolveComponent)("DocumentErrorModal"),v=(0,o.resolveComponent)("NotOptimizedViewportModal"),A=(0,o.resolveComponent)("AnnotationDeletedModal");return(0,o.openBlock)(),(0,o.createElementBlock)("div",r,[(0,o.createVNode)(l),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["dashboard-viewer",e.renameAndCategorize?"edit-mode":""])},[e.editMode?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(m,{key:0,ref:"documentPages"},null,512)),(0,o.createVNode)(b,{class:"default-theme"},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(g,{size:50,"min-size":10},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(p,{ref:"scrollingDocument",class:"dashboard-document"},null,512)])),_:1}),(0,o.createVNode)(g,{size:50,class:"document-sidebar"},{default:(0,o.withCtx)((()=>[e.editMode?((0,o.openBlock)(),(0,o.createBlock)(_,{key:1,ref:"editView"},null,512)):((0,o.openBlock)(),(0,o.createBlock)(C,{key:0,ref:"annotations"},null,512))])),_:1})])),_:1}),e.showChooseLabelSetModal&&e.showChooseLabelSetModal.show?((0,o.openBlock)(),(0,o.createBlock)(E,{key:1,"is-multiple-annotations":e.showChooseLabelSetModal.isMultipleAnnotations,onFinish:e.showChooseLabelSetModal.finish},null,8,["is-multiple-annotations","onFinish"])):(0,o.createCommentVNode)("",!0),(0,o.createVNode)(o.Transition,{name:"slide-fade"},{default:(0,o.withCtx)((()=>[e.showActionError?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:"error-message",style:(0,o.normalizeStyle)({width:`${e.errorMessageWidth}px`})},[(0,o.createVNode)(S)],4)):(0,o.createCommentVNode)("",!0)])),_:1})],2),e.showDocumentError?((0,o.openBlock)(),(0,o.createElementBlock)("div",c,[(0,o.createVNode)(f)])):(0,o.createCommentVNode)("",!0),e.optimalResolution?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",d,[(0,o.createVNode)(v)])),(0,o.createElementVNode)("div",null,[(0,o.createVNode)(A)]),e.isMinimumWidth?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",h,[(0,o.createElementVNode)("div",u,(0,o.toDisplayString)(e.$t("resolution_not_supported")),1)]))])}const p={id:"document-top-bar-component",ref:"documentTopBar"},g={class:"left-bar-components"},C={key:1,class:"app-info",target:"_blank",href:"https://konfuzio.com"},_={class:"right-bar-components"},b={key:0,class:"right-components"},E={key:0,class:"keyboard-actions-info"},S={key:1,class:"read-only-info"},f={key:0},v={key:1,class:"doc-reviewed"},A={key:0,class:"read-only-details"},k={key:1,class:"read-only-details"},N={class:"top-bar-buttons"},w={key:1,class:"loading-top-bar"};function y(e,t,n,i,a,s){const l=(0,o.resolveComponent)("DocumentSetChooser"),r=(0,o.resolveComponent)("b-icon"),c=(0,o.resolveComponent)("DocumentName"),d=(0,o.resolveComponent)("KeyboardActionsDescription"),h=(0,o.resolveComponent)("b-tooltip"),u=(0,o.resolveComponent)("DocumentTopBarButtons"),m=(0,o.resolveComponent)("b-skeleton");return(0,o.openBlock)(),(0,o.createElementBlock)("div",p,[e.selectedDocument&&e.selectedDocument.pages.length>0&&!e.loading?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["document-top-bar",e.editMode&&"edit-mode-top-bar"])},[(0,o.createElementVNode)("div",g,[e.publicView||e.recalculatingAnnotations||e.editMode?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(l,{key:0})),!e.showBranding||null!==e.selectedDocument.documentSet&&null===e.documentSet?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("a",C,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("powered_by")),1)]))]),(0,o.createElementVNode)("div",{id:"document-info",class:(0,o.normalizeClass)(["center-bar-components",e.recalculatingAnnotations&&"single-component"])},[(0,o.createElementVNode)("div",{style:(0,o.normalizeStyle)("visibility: "+(a.previousDocument?"visible":"hidden")),class:"left-arrow navigation-arrow",type:"button",onClick:t[0]||(t[0]=e=>s.navigateToDocument(a.previousDocument))},[(0,o.createVNode)(r,{icon:"angle-left",size:"is-small"})],4),(0,o.createVNode)(c,{"data-file-name":e.selectedDocument.data_file_name},null,8,["data-file-name"]),(0,o.createElementVNode)("div",{class:"right-arrow navigation-arrow",style:(0,o.normalizeStyle)("visibility: "+(a.nextDocument?"visible":"hidden")),type:"button",onClick:t[1]||(t[1]=e=>s.navigateToDocument(a.nextDocument))},[(0,o.createVNode)(r,{icon:"angle-right",size:"is-small"})],4)],2),(0,o.createElementVNode)("div",_,[e.recalculatingAnnotations?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",b,[e.editMode||e.publicView&&e.isDocumentReviewed?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",E,[(0,o.createVNode)(d)])),e.editMode||!e.publicView&&!e.isDocumentReviewed?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",S,[(0,o.createVNode)(h,{animated:!1,position:"is-bottom",class:"right-aligned width-184"},{content:(0,o.withCtx)((()=>[e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("div",A,(0,o.toDisplayString)(e.$t("limited_functionalities")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("div",k,(0,o.toDisplayString)(e.$t("document_reviewed")),1))])),default:(0,o.withCtx)((()=>[e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("span",f,(0,o.toDisplayString)(e.$t("lite_mode")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("span",v,(0,o.toDisplayString)(e.$t("reviewed_mode")),1)),(0,o.createVNode)(r,{class:(0,o.normalizeClass)(["info-icon is-small",!e.publicView&&e.isDocumentReviewed&&"info-reviewed"]),icon:"circle-info"},null,8,["class"])])),_:1})])),(0,o.createElementVNode)("div",N,[(0,o.createVNode)(u)])]))])],2)):((0,o.openBlock)(),(0,o.createElementBlock)("div",w,[(0,o.createVNode)(m,{position:"is-centered",width:"20%",height:"60%"})]))],512)}const T={class:"dropdown-doc-set"},B={class:"dropdown-left"},D={class:"dropdown-text"},L={class:"top-part"},V={class:"bottom-part"},x={class:"dropdown-right"},M={key:1,class:"loading-bar"};function I(e,t,n,i,a,s){const l=(0,o.resolveComponent)("CategoryIcon"),r=(0,o.resolveComponent)("b-icon"),c=(0,o.resolveComponent)("b-dropdown-item"),d=(0,o.resolveComponent)("b-dropdown"),h=(0,o.resolveComponent)("b-skeleton");return e.documentSet&&e.documentSet.documents&&e.documentSet.documents.length>1&&e.categories?((0,o.openBlock)(),(0,o.createBlock)(d,{key:0,modelValue:a.selectedDocId,"onUpdate:modelValue":t[0]||(t[0]=e=>a.selectedDocId=e),class:"document-set-dropdown dropdown-full-width","aria-role":"list",scrollable:""},{trigger:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",T,[(0,o.createElementVNode)("div",B,[(0,o.createVNode)(l)]),(0,o.createElementVNode)("div",D,[(0,o.createElementVNode)("div",L,(0,o.toDisplayString)(e.$t("document_section")),1),(0,o.createElementVNode)("div",V,(0,o.toDisplayString)(`${e.categoryName(e.selectedDocument.category)} ${e.numberOfDocumentInSet(e.selectedDocument)}`),1)]),(0,o.createElementVNode)("div",x,[(0,o.createVNode)(r,{icon:"angle-down",size:"is-small",class:"caret"})])])])),default:(0,o.withCtx)((()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.documentSet.documents,(t=>((0,o.openBlock)(),(0,o.createBlock)(c,{key:t.id,"aria-role":"listitem",class:"list-item",value:t.id,onClick:e=>s.handleDocumentClick(t)},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(`${e.categoryName(t.category)} ${e.numberOfDocumentInSet(t)}`),1)])),_:2},1032,["value","onClick"])))),128))])),_:1},8,["modelValue"])):null!==e.selectedDocument.documentSet&&null===e.documentSet?((0,o.openBlock)(),(0,o.createElementBlock)("div",M,[(0,o.createVNode)(h,{width:"100px",height:"60%"})])):(0,o.createCommentVNode)("",!0)}const O={xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22"};function P(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",O,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#1A1A1A",d:"M20.47,7.37s0,0,0-.08l-.06-.15a.71.71,0,0,0-.07-.09.94.94,0,0,0-.09-.12l-.09-.07L20,6.78l-7.5-4.63a1,1,0,0,0-1.06,0L4,6.78l-.09.08-.09.07a.94.94,0,0,0-.09.12.71.71,0,0,0-.07.09l-.06.15s0,0,0,.08a1.15,1.15,0,0,0,0,.26v8.74a1,1,0,0,0,.47.85l7.5,4.63h0a.47.47,0,0,0,.15.06s.05,0,.08,0a.86.86,0,0,0,.52,0s.05,0,.08,0a.47.47,0,0,0,.15-.06h0L20,17.22a1,1,0,0,0,.47-.85V7.63A1.15,1.15,0,0,0,20.47,7.37ZM11,19.21l-5.5-3.4V9.43L11,12.82Zm1-8.12L6.4,7.63,12,4.18l5.6,3.45Zm6.5,4.72L13,19.21V12.82l5.5-3.39Z"},null,-1)]))}var $=n(4621);const R={},F=(0,$.A)(R,[["render",P]]),H=F,z={name:"DocumentSetChooser",components:{CategoryIcon:H},data(){return{selectedDocId:0}},computed:{...(0,s.L8)("document",["numberOfDocumentInSet"]),...(0,s.L8)("category",["categoryName"]),...(0,s.aH)("document",["documentSet","selectedDocument"]),...(0,s.aH)("category",["categories"])},mounted(){this.selectedDocId=this.selectedDocument.id},methods:{handleDocumentClick(e){this.$store.dispatch("document/changeCurrentDocument",e.id)}}},U=(0,$.A)(z,[["render",I],["__scopeId","data-v-57a73f96"]]),Z=U,G={class:"document-icon"},W={class:"file-name-section"},q=["contenteditable"],j={key:2,class:"message-container"},K={class:"loading-container"},Y={key:3,class:"message-container"},J={key:0,class:"cloud-icon"},X={key:1,class:"cloud-icon"};function Q(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton"),r=(0,o.resolveComponent)("ServerImage"),c=(0,o.resolveComponent)("b-tooltip"),d=(0,o.resolveComponent)("b-icon"),h=(0,o.resolveComponent)("b-loading"),u=(0,o.resolveComponent)("b-notification"),m=(0,o.resolveComponent)("FileNameSaved"),p=(0,o.resolveComponent)("FileNameNotSaved");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(["document-name-component",e.editMode&&"document-name-edit-mode"])},[(0,o.createElementVNode)("div",G,[(0,o.createVNode)(r,{height:"22px","image-url":`${e.selectedDocument.thumbnail_url}?${e.selectedDocument.downloaded_at}`},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{width:"15px",height:"22px",rounded:!1})])),_:1},8,["image-url"])]),(0,o.createVNode)(c,{label:s.fullText,multilined:"",active:s.isFileNameBiggerThanMaxSize&&!a.isEditable,size:"is-large",position:"is-bottom"},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",W,[(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(["document-name",a.isEditable&&"is-editable"]),contenteditable:a.isEditable,onInput:t[0]||(t[0]=(...e)=>s.handleInput&&s.handleInput(...e)),onPaste:t[1]||(t[1]=(...e)=>s.handlePaste&&s.handlePaste(...e)),onKeydown:t[2]||(t[2]=(0,o.withKeys)(((...e)=>s.handleSave&&s.handleSave(...e)),["enter"])),onBlur:t[3]||(t[3]=(...e)=>s.handleSave&&s.handleSave(...e))},(0,o.toDisplayString)(s.textContent),43,q)])])),_:1},8,["label","active"]),e.publicView||e.isDocumentReviewed||!a.showEditBtn||e.editMode||e.recalculatingAnnotations?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:"edit-btn btn",onClick:t[4]||(t[4]=(...e)=>s.handleEdit&&s.handleEdit(...e))},(0,o.toDisplayString)(e.$t("rename")),1)),a.showSaveBtn&&!e.editMode?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:"save-btn btn",onClick:t[5]||(t[5]=(...e)=>s.handleSave&&s.handleSave(...e))},(0,o.toDisplayString)(e.$t("save")),1)):(0,o.createCommentVNode)("",!0),a.saving?((0,o.openBlock)(),(0,o.createElementBlock)("div",j,[(0,o.createElementVNode)("span",K,[(0,o.createVNode)(u,{closable:!1,class:"loading-background"},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(h,{modelValue:a.saving,"onUpdate:modelValue":t[6]||(t[6]=e=>a.saving=e),"is-full-page":a.isFullPage},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(d,{icon:"spinner",class:"fa-spin loading-icon-size spinner"})])),_:1},8,["modelValue","is-full-page"])])),_:1})]),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("autosaving")),1)])):(0,o.createCommentVNode)("",!0),a.changed?((0,o.openBlock)(),(0,o.createElementBlock)("div",Y,[a.saved?((0,o.openBlock)(),(0,o.createElementBlock)("span",J,[(0,o.createVNode)(m)])):((0,o.openBlock)(),(0,o.createElementBlock)("span",X,[(0,o.createVNode)(p)])),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(a.saved?e.$t("saved"):e.$t("not_saved")),1)])):(0,o.createCommentVNode)("",!0),e.detailsUrl?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:4,class:"details-btn btn",onClick:t[7]||(t[7]=(...e)=>s.openDocumentDetails&&s.openDocumentDetails(...e))},(0,o.toDisplayString)(e.$t("document_details")),1)):(0,o.createCommentVNode)("",!0)],2)}const ee={style:{display:"flex"}},te=["height"];function ne(e,t,n,i,a,s){const l=(0,o.resolveDirective)("observe-visibility");return(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("div",ee,[(0,o.withDirectives)((0,o.createElementVNode)("img",{ref:"imgTag",height:n.height},null,8,te),[[o.vShow,a.loaded]]),a.loaded?(0,o.createCommentVNode)("",!0):(0,o.renderSlot)(e.$slots,"default",{key:0},void 0,!0)])),[[l,s.visibilityChanged]])}var oe=n(4335),ie=n(2068);let ae;const se=async(e,t,n)=>{ae=new ie.A({url:e,realm:t,clientId:n});try{const e=await ae.init({onLoad:"login-required",enableLogging:!0});e?(Ae.setIsKeycloakAuth(!0),Ae.setAuthToken(ae.token)):console.error("User is not authenticated")}catch(o){console.error("Failed to initialize adapter:",o)}},le=()=>new Promise((async(e,t)=>{ae?(await ae.updateToken(30),Ae.setAuthToken(ae.token),e()):t()}));let re,ce,de,he,ue;const me="https://app.konfuzio.com",pe={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_IMAGE_URL;oe.A.defaults.xsrfCookieName="csrftoken",oe.A.defaults.xsrfHeaderName="X-CSRFToken",re=oe.A.create({baseURL:{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_API_URL||`${me}/api/v3/`}),ce=oe.A.create({baseURL:pe||`${me}`,responseType:"blob"});const ge=e=>{e!==de&&(de=e)},Ce=e=>{ue=e},_e=e=>{re.defaults.baseURL=e},be=e=>{ce.defaults.baseURL=e},Ee=e=>{he=e},Se=async e=>(ue&&await le(),de&&(e.headers["Authorization"]=`${ue?"Bearer":"Token"} ${de}`),e.headers["Accept-Language"]=`${he}-${he}`,e);re.interceptors.request.use(Se,(async e=>Promise.reject(e))),ce.interceptors.request.use(Se,(e=>Promise.reject(e)));const fe=e=>new Promise(((t,n)=>{ce.get(e).then((e=>e.data)).then((e=>{t(e)})).catch((o=>{428===o.response.status&&setTimeout((()=>{fe(e).then((e=>{t(e)})).catch((e=>{n(e)}))}),2e3),n(o)}))})),ve=(e,t=!1)=>{let n=[],o=!1,i=t?"&":"?",a=`${e}${i}limit=100`;return new Promise((async(e,t)=>{do{try{let e=await re.get(a);if(e&&e.data){const t=e.data;t.results&&(n=[...n,...t.results]),t.next?a=t.next:o=!0}else t("Error getting paginated results.")}catch(i){t(i),o=!0,console.log(i)}}while(!o);e(n)}))},Ae={HTTP:re,setApiUrl:_e,setFileUrl:be,makeFileRequest:fe,makeGetPaginatedRequest:ve,setAuthToken:ge,setIsKeycloakAuth:Ce,setLocale:Ee,FILE_REQUEST:ce,DEFAULT_URL:me,FILE_URL:pe},ke={name:"ServerImage",props:{imageUrl:{required:!0,type:String},height:{default:null,type:String},width:{default:null,type:String}},data(){return{loaded:!1,isVisible:!1}},watch:{imageUrl(){this.isVisible&&this.loadImage()}},methods:{loadImage(){if(this.imageUrl)return Ae.makeFileRequest(this.imageUrl).then((e=>{this.$refs.imgTag.src=URL.createObjectURL(e),this.height&&(this.$refs.imgTag.style.height=this.height),this.width&&(this.$refs.imgTag.style.width=this.width),this.loaded=!0})).catch((e=>{this.loaded=!1}))},visibilityChanged(e){!this.isVisible&&e&&(this.isVisible=e,this.loadImage())}}},Ne=(0,$.A)(ke,[["render",ne],["__scopeId","data-v-be92e2fe"]]),we=Ne,ye={width:"18",height:"13",viewBox:"0 0 18 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Te(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",ye,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M13.2844 12.3934H4.71415C2.48261 12.3934 0.666992 10.5708 0.666992 8.34388C0.666992 6.31069 2.17392 4.61975 4.12801 4.33512C4.49407 1.97428 6.54159 0.166016 9.0002 0.166016C11.4588 0.166016 13.5063 1.97428 13.8749 4.33512C15.8267 4.61976 17.3337 6.3109 17.3337 8.34388C17.3337 10.5708 15.5182 12.3934 13.2842 12.3934H13.2844ZM4.71415 5.90411C3.36987 5.90411 2.27921 6.99729 2.27921 8.34388C2.27921 9.68564 3.36987 10.7788 4.71415 10.7788H13.2844C14.6286 10.7788 15.7216 9.68564 15.7216 8.34388C15.7216 6.99729 14.6284 5.90411 13.2844 5.90411H13.1265C12.6817 5.90411 12.3205 5.54539 12.3205 5.09557C12.3205 3.26812 10.8304 1.77802 9.00061 1.77802C7.16847 1.77802 5.68072 3.26812 5.68072 5.09557C5.68072 5.5452 5.3195 5.90411 4.87217 5.90411H4.71415Z",fill:"#858C9A"},null,-1)]))}const Be={},De=(0,$.A)(Be,[["render",Te]]),Le=De,Ve={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xe(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Ve,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M11.4269 13.1159H4.57073C2.7855 13.1159 1.33301 11.6578 1.33301 9.87627C1.33301 8.24972 2.53855 6.89697 4.10182 6.66927C4.39467 4.7806 6.03269 3.33398 7.99957 3.33398C9.96646 3.33398 11.6045 4.7806 11.8994 6.66927C13.4608 6.89698 14.6663 8.24989 14.6663 9.87627C14.6663 11.6578 13.214 13.1159 11.4267 13.1159H11.4269ZM4.57073 7.92446C3.49531 7.92446 2.62278 8.799 2.62278 9.87627C2.62278 10.9497 3.49531 11.8242 4.57073 11.8242H11.4269C12.5023 11.8242 13.3767 10.9497 13.3767 9.87627C13.3767 8.799 12.5022 7.92446 11.4269 7.92446H11.3006C10.9448 7.92446 10.6558 7.63749 10.6558 7.27762C10.6558 5.81567 9.46374 4.62359 7.9999 4.62359C6.53419 4.62359 5.34399 5.81567 5.34399 7.27762C5.34399 7.63733 5.05501 7.92446 4.69715 7.92446H4.57073Z",fill:"#858C9A"},null,-1),(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.47098 2.86203C2.73133 2.60168 3.15344 2.60168 3.41379 2.86203L14.471 13.9192C14.7313 14.1796 14.7313 14.6017 14.471 14.862C14.2106 15.1224 13.7885 15.1224 13.5282 14.862L2.47098 3.80484C2.21063 3.54449 2.21063 3.12238 2.47098 2.86203Z",fill:"#858C9A"},null,-1),(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.99957 2.39007C2.52027 1.86938 3.36449 1.86938 3.88519 2.39007L14.9424 13.4473C15.4631 13.968 15.4631 14.8122 14.9424 15.3329C14.4217 15.8536 13.5775 15.8536 13.0568 15.3329L1.99957 4.27569C1.47887 3.75499 1.47887 2.91077 1.99957 2.39007ZM3.41379 2.86148C3.15344 2.60113 2.73133 2.60113 2.47098 2.86148C2.21063 3.12183 2.21063 3.54394 2.47098 3.80429L13.5282 14.8615C13.7885 15.1218 14.2106 15.1218 14.471 14.8615C14.7313 14.6011 14.7313 14.179 14.471 13.9187L3.41379 2.86148Z",fill:"white"},null,-1)]))}const Me={},Ie=(0,$.A)(Me,[["render",xe]]),Oe=Ie,Pe={name:"DocumentName",components:{ServerImage:we,FileNameSaved:Le,FileNameNotSaved:Oe},props:{dataFileName:{type:String,default:""}},data(){return{maxFilenameChars:26,isEditable:!1,showEditBtn:!0,showSaveBtn:!1,fileExtension:null,fileName:null,oldFileName:null,saving:!1,isFullPage:!1,changed:!1,saved:!1}},computed:{...(0,s.aH)("document",["selectedDocument","publicView","recalculatingAnnotations","documentId"]),...(0,s.aH)("display",["optimalResolution","detailsUrl"]),...(0,s.aH)("edit",["editMode"]),...(0,s.L8)("document",["isDocumentReviewed"]),textContent(){return this.isEditable?this.oldFileName:this.fileName?this.shortFilenameIfNeeded(`${this.fileName}.${this.fileExtension}`):this.shortFilenameIfNeeded(this.dataFileName)},fullText(){return this.fileName?this.fileName:this.dataFileName},isFileNameBiggerThanMaxSize(){return this.fileName?this.fileName.length>=this.maxFilenameChars:this.dataFileName.length>=this.maxFilenameChars}},updated(){const e=document.querySelector(".document-name");if(this.isEditable&&e&&(e.focus(),this.handleCaretPlacing(e)),this.changed){const e=this;setTimeout((function(){e.saved=!1,e.changed=!1,e.showEditBtn=!0,this.showSaveBtn=!1}),4e3)}},methods:{shortFilenameIfNeeded(e){return e&&e.length>=this.maxFilenameChars?e.substr(0,this.maxFilenameChars/2)+"..."+e.substr(e.length-this.maxFilenameChars/2,e.length):e},handleFileName(){this.fileName=this.dataFileName.split(".").slice(0,-1).join("."),this.fileExtension=this.dataFileName.split(".").at(-1)},handleEdit(){this.handleFileName(),this.isEditable=!0,this.showEditBtn=!1,this.showSaveBtn=!0,this.oldFileName=this.fileName},handleCaretPlacing(e){let t,n;document.createRange?(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),n=window.getSelection(),n.removeAllRanges(),n.addRange(t)):document.selection&&(t=document.body.createTextRange(),t.moveToElementText(e),t.collapse(!1),t.select())},handlePaste(e){e.preventDefault()},handleInput(e){const t=e.target.textContent;this.fileName=""===t?"untitled":t.trim()},handleSave(e){this.isEditable=!1,e.target.textContent=this.fileName;const t={data_file_name:`${this.fileName}.${this.fileExtension}`};this.showSaveBtn=!1,this.saving=!0,this.$store.dispatch("document/updateDocument",t).then((e=>{e&&(this.changed=!0,this.oldFileName=this.fileName,this.saved=!0)})).catch((t=>{this.changed=!0,e.target.textContent=this.oldFileName,this.fileName=this.oldFileName})).finally((()=>{this.saving=!1}));const n=document.querySelector(".document-name");n&&n.blur()},openDocumentDetails(){window.location.href=this.detailsUrl}}},$e=(0,$.A)(Pe,[["render",Q],["__scopeId","data-v-605ff746"]]),Re=$e,Fe={class:"buttons"},He={key:0,class:"edit-mode-buttons"},ze={key:1,id:"review-btn",class:"finish-review-button-container"},Ue={key:0},Ze={key:1};function Ge(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button"),r=(0,o.resolveComponent)("b-tooltip"),c=(0,o.resolveComponent)("b-icon"),d=(0,o.resolveComponent)("b-loading"),h=(0,o.resolveComponent)("b-notification");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Fe,[e.editMode?((0,o.openBlock)(),(0,o.createElementBlock)("div",He,[(0,o.createVNode)(l,{label:e.$t("back_to_annotations"),class:"button-cancel primary-button edit-mode-btn",type:"is-default",disabled:!s.documentHasCategory||e.waitingForSplittingConfirmation(e.selectedDocument),onClick:s.closeEditMode},null,8,["label","disabled","onClick"]),(0,o.createVNode)(r,{active:!a.enableSubmit,position:"is-bottom",label:e.$t("select_category"),class:"right-aligned no-right-margin"},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{label:e.editMode&&!e.renameAndCategorize?e.$t("next"):e.$t("submit"),type:"is-primary",class:(0,o.normalizeClass)(["button-next primary-button edit-mode-btn",e.renameAndCategorize&&"submit-btn"]),disabled:e.renameAndCategorize&&!a.enableSubmit,onClick:s.handleButton},null,8,["label","class","disabled","onClick"])])),_:1},8,["active","label"])])):(0,o.createCommentVNode)("",!0),e.editMode||e.isDocumentReviewed||e.publicView?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",ze,[(0,o.createVNode)(r,{active:!s.isReviewButtonActive,position:"is-bottom",multilined:"",class:"right-aligned no-right-margin"},{content:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("disabled_finish_review")),1)])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{class:(0,o.normalizeClass)(["finish-review-btn","text-btn","primary-button"]),type:"is-primary",disabled:!s.isReviewButtonActive,onClick:(0,o.withModifiers)(s.handleFinishReview,["stop"])},{default:(0,o.withCtx)((()=>[a.isLoading?((0,o.openBlock)(),(0,o.createElementBlock)("div",Ze,[(0,o.createVNode)(h,{closable:!1,class:(0,o.normalizeClass)(["loading-background"])},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(d,{active:a.isLoading,"is-full-page":!1},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(c,{icon:"spinner",class:"fa-spin loading-icon-size spinner"})])),_:1},8,["active"])])),_:1})])):((0,o.openBlock)(),(0,o.createElementBlock)("span",Ue,(0,o.toDisplayString)(e.$t("finish_review")),1))])),_:1},8,["disabled","onClick"])])),_:1},8,["active"])]))])}const We={name:"DocumentTopBarButtons",data(){return{emptyLabels:null,isLoading:!1,enableSubmit:!1}},computed:{...(0,s.aH)("document",["selectedDocument","publicView","annotationSets","thumbnailIsLoaded"]),...(0,s.aH)("edit",["editMode","renameAndCategorize","updatedDocument"]),...(0,s.L8)("document",["isDocumentReadyToFinishReview","isDocumentReviewed","waitingForSplittingConfirmation"]),...(0,s.L8)("edit",["documentShouldBePostprocessed"]),isReviewButtonActive(){return this.isDocumentReadyToFinishReview},documentHasCategory(){return this.selectedDocument.category}},watch:{updatedDocument(e){e&&this.submitValidation(e)}},mounted(){this.updatedDocument&&this.submitValidation(this.updatedDocument)},methods:{submitValidation(e){const t=e.find((e=>!e.category));this.enableSubmit=!t},closeEditMode(){this.$store.dispatch("edit/disableEditMode"),this.$store.dispatch("edit/setRenameAndCategorize",!1),this.$store.dispatch("edit/setUpdatedDocument",null),this.$store.dispatch("edit/setSelectedPages",null),this.$nextTick((()=>{this.$store.dispatch("display/updateCurrentPage",1)}))},handleButton(){this.renameAndCategorize?this.selectedDocument.category_is_revised&&this.documentShouldBePostprocessed?this.$store.dispatch("edit/setShowEditConfirmationModal",!0):this.$store.dispatch("edit/setSubmitEditChanges",!0):(this.$store.dispatch("edit/setRenameAndCategorize",!0),this.$store.dispatch("edit/setSelectedPages",null))},handleFinishReview(){const e={is_reviewed:!0};this.isLoading=!0,this.$store.dispatch("document/updateDocument",e).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("review_error")})})).finally((()=>{this.isLoading=!1}))}}},qe=(0,$.A)(We,[["render",Ge],["__scopeId","data-v-3767df42"]]),je=qe,Ke={key:0,class:"keyboard-actions-description"},Ye={class:"b-tooltips"},Je={class:"tooltip-title"},Xe={class:"tooltip-description"},Qe={class:"content-line"},et={class:"action-item"},tt={class:"key"},nt={class:"key"},ot={class:"keyboard-action-text"},it={class:"action-item"},at={class:"keyboard-action-text"},st={class:"content-line"},lt={class:"action-item"},rt={class:"keyboard-action-text"},ct={class:"action-item"},dt={class:"keyboard-action-text"};function ht(e,t,n,i,a,s){const l=(0,o.resolveComponent)("KeyboardIcon"),r=(0,o.resolveComponent)("ArrowUpKey"),c=(0,o.resolveComponent)("ArrowDownKey"),d=(0,o.resolveComponent)("b-tooltip");return e.publicView||e.isDocumentReviewed||e.editMode?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Ke,[(0,o.createElementVNode)("section",Ye,[(0,o.createVNode)(d,{position:"is-left",size:"is-large",class:"left-down-aligned"},{content:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",Je,(0,o.toDisplayString)(e.$t("use_your_keyboard")),1),(0,o.createElementVNode)("div",Xe,[(0,o.createElementVNode)("div",Qe,[(0,o.createElementVNode)("div",et,[(0,o.createElementVNode)("div",tt,[(0,o.createVNode)(r)]),(0,o.createElementVNode)("div",nt,[(0,o.createVNode)(c)]),(0,o.createElementVNode)("div",ot,(0,o.toDisplayString)(e.$t("arrow_keys")),1)]),t[1]||(t[1]=(0,o.createElementVNode)("div",{class:"tooltip-divider"},null,-1)),(0,o.createElementVNode)("div",it,[t[0]||(t[0]=(0,o.createElementVNode)("div",{class:"key"},(0,o.toDisplayString)("ESC"),-1)),(0,o.createElementVNode)("div",at,(0,o.toDisplayString)(e.$t("esc_key")),1)])]),(0,o.createElementVNode)("div",st,[(0,o.createElementVNode)("div",lt,[t[2]||(t[2]=(0,o.createElementVNode)("div",{class:"key"},(0,o.toDisplayString)("ENTER"),-1)),(0,o.createElementVNode)("div",rt,(0,o.toDisplayString)(e.$t("enter_key")),1)]),t[4]||(t[4]=(0,o.createElementVNode)("div",{class:"tooltip-divider"},null,-1)),(0,o.createElementVNode)("div",ct,[t[3]||(t[3]=(0,o.createElementVNode)("div",{class:"key"},(0,o.toDisplayString)("DELETE"),-1)),(0,o.createElementVNode)("div",dt,(0,o.toDisplayString)(e.$t("missing_annotation")),1)])])])])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(l)])),_:1})])]))}const ut={width:"20",height:"12",viewBox:"0 0 20 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mt(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",ut,t[0]||(t[0]=[(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.30187 0.167969H15.6994C16.1387 0.167955 16.5177 0.167942 16.8298 0.193445C17.1593 0.220362 17.487 0.279792 17.8023 0.440454C18.2727 0.680138 18.6552 1.06259 18.8948 1.53299C19.0555 1.84831 19.1149 2.17599 19.1418 2.50545C19.1673 2.81759 19.1673 3.19655 19.1673 3.63583V8.36678C19.1673 8.80606 19.1673 9.18502 19.1418 9.49716C19.1149 9.82661 19.0555 10.1543 18.8948 10.4696C18.6552 10.94 18.2727 11.3225 17.8023 11.5622C17.487 11.7228 17.1593 11.7822 16.8298 11.8092C16.5177 11.8347 16.1387 11.8347 15.6994 11.8346H4.30188C3.86259 11.8347 3.48361 11.8347 3.17146 11.8092C2.84201 11.7822 2.51433 11.7228 2.19901 11.5622C1.7286 11.3225 1.34615 10.94 1.10647 10.4696C0.945808 10.1543 0.886378 9.82661 0.85946 9.49716C0.833957 9.18502 0.83397 8.80605 0.833985 8.36676V3.63585C0.83397 3.19656 0.833957 2.81759 0.85946 2.50545C0.886378 2.17599 0.945808 1.84831 1.10647 1.53299C1.34615 1.06259 1.7286 0.680137 2.19901 0.440454C2.51433 0.279792 2.84201 0.220362 3.17146 0.193445C3.48361 0.167942 3.86258 0.167955 4.30187 0.167969ZM3.30718 1.85458C3.0808 1.87307 2.99686 1.90447 2.95566 1.92546C2.79886 2.00536 2.67138 2.13284 2.59148 2.28964C2.57049 2.33085 2.53909 2.41478 2.52059 2.64117C2.5013 2.87728 2.50065 3.18751 2.50065 3.66797V8.33464C2.50065 8.8151 2.5013 9.12533 2.52059 9.36144C2.53909 9.58783 2.57049 9.67176 2.59148 9.71296C2.67138 9.86976 2.79886 9.99725 2.95566 10.0771C2.99686 10.0981 3.0808 10.1295 3.30718 10.148C3.5433 10.1673 3.85352 10.168 4.33399 10.168H15.6673C16.1478 10.168 16.458 10.1673 16.6941 10.148C16.9205 10.1295 17.0044 10.0981 17.0456 10.0771C17.2024 9.99725 17.3299 9.86977 17.4098 9.71296C17.4308 9.67176 17.4622 9.58783 17.4807 9.36144C17.5 9.12533 17.5007 8.8151 17.5007 8.33464V3.66797C17.5007 3.18751 17.5 2.87728 17.4807 2.64117C17.4622 2.41478 17.4308 2.33085 17.4098 2.28964C17.3299 2.13284 17.2024 2.00536 17.0456 1.92546C17.0044 1.90447 16.9205 1.87307 16.6941 1.85458C16.458 1.83528 16.1478 1.83464 15.6673 1.83464H4.33399C3.85352 1.83464 3.5433 1.83528 3.30718 1.85458ZM4.16732 4.33464C4.16732 3.8744 4.54042 3.5013 5.00065 3.5013H5.00899C5.46922 3.5013 5.84232 3.8744 5.84232 4.33464C5.84232 4.79487 5.46922 5.16797 5.00899 5.16797H5.00065C4.54042 5.16797 4.16732 4.79487 4.16732 4.33464ZM7.50065 4.33464C7.50065 3.8744 7.87375 3.5013 8.33399 3.5013H8.34232C8.80256 3.5013 9.17565 3.8744 9.17565 4.33464C9.17565 4.79487 8.80256 5.16797 8.34232 5.16797H8.33399C7.87375 5.16797 7.50065 4.79487 7.50065 4.33464ZM10.834 4.33464C10.834 3.8744 11.2071 3.5013 11.6673 3.5013H11.6757C12.1359 3.5013 12.509 3.8744 12.509 4.33464C12.509 4.79487 12.1359 5.16797 11.6757 5.16797H11.6673C11.2071 5.16797 10.834 4.79487 10.834 4.33464ZM14.1673 4.33464C14.1673 3.8744 14.5404 3.5013 15.0007 3.5013H15.009C15.4692 3.5013 15.8423 3.8744 15.8423 4.33464C15.8423 4.79487 15.4692 5.16797 15.009 5.16797H15.0007C14.5404 5.16797 14.1673 4.79487 14.1673 4.33464ZM5.00065 8.08464C5.00065 7.6244 5.37375 7.2513 5.83399 7.2513H14.1673C14.6276 7.2513 15.0007 7.6244 15.0007 8.08464C15.0007 8.54487 14.6276 8.91797 14.1673 8.91797H5.83399C5.37375 8.91797 5.00065 8.54487 5.00065 8.08464Z",fill:"#1A1A1A"},null,-1)]))}const pt={},gt=(0,$.A)(pt,[["render",mt]]),Ct=gt,_t={width:"8",height:"6",viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function bt(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",_t,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M4 5.5L0 0.5L8 0.5L4 5.5Z",fill:"white"},null,-1)]))}const Et={},St=(0,$.A)(Et,[["render",bt]]),ft=St,vt={width:"8",height:"6",viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function At(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",vt,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M4 0.5L0 5.5L8 5.5L4 0.5Z",fill:"white"},null,-1)]))}const kt={},Nt=(0,$.A)(kt,[["render",At]]),wt=Nt,yt={name:"KeyboardActionsDescription",components:{KeyboardIcon:Ct,ArrowUpKey:ft,ArrowDownKey:wt},computed:{...(0,s.aH)("edit",["editMode"]),...(0,s.aH)("document",["selectedDocument","publicView"]),...(0,s.L8)("document",["isDocumentReviewed"])}},Tt=(0,$.A)(yt,[["render",ht],["__scopeId","data-v-bcf0f440"]]),Bt=Tt,Dt={name:"DocumentTopBar",components:{DocumentSetChooser:Z,DocumentName:Re,DocumentTopBarButtons:je,KeyboardActionsDescription:Bt},data(){return{previousDocument:null,nextDocument:null}},computed:{...(0,s.aH)("document",["selectedDocument","documentSet","publicView","loading","recalculatingAnnotations"]),...(0,s.aH)("edit",["editMode"]),...(0,s.aH)("display",["showDocumentsNavigation","showBranding"]),...(0,s.L8)("document",["isDocumentReviewed","isDocumentReadyToBeReviewed","waitingForSplittingConfirmation"])},watch:{loading(e){!e&&this.showDocumentsNavigation&&this.$store.dispatch("project/fetchDocumentListForNavigation").then((e=>{this.getPreviousAndNextDocuments(e)}))}},created(){window.addEventListener("resize",this.handleResize)},unmounted(){window.removeEventListener("resize",this.handleResize)},mounted(){this.$refs.documentTopBar&&this.setComponentWidth(this.$refs.documentTopBar.offsetWidth)},methods:{setComponentWidth(e){this.$store.dispatch("document/setErrorMessageWidth",e)},handleResize(){this.$refs.documentTopBar&&this.setComponentWidth(this.$refs.documentTopBar.offsetWidth)},getPreviousAndNextDocuments(e){if(!e)return;const t=e.find((e=>e.id===this.selectedDocument.id)),n=e.indexOf(t);n<0?(this.previousDocument=e[0],this.nextDocument=e[1]):(this.previousDocument=e[n-1],this.nextDocument=e[n+1])},navigateToDocument(e){e&&this.$store.dispatch("document/changeCurrentDocument",e.id)}}},Lt=(0,$.A)(Dt,[["render",y],["__scopeId","data-v-bd7cf984"]]),Vt=Lt;function xt(e,t,n,i,a,s){const l=(0,o.resolveComponent)("AnnotationPopup"),r=(0,o.resolveComponent)("AnnSetTableOptions"),c=(0,o.resolveComponent)("v-image"),d=(0,o.resolveComponent)("v-rect"),h=(0,o.resolveComponent)("v-group"),u=(0,o.resolveComponent)("v-layer"),m=(0,o.resolveComponent)("span-selection"),p=(0,o.resolveComponent)("placeholder-selection"),g=(0,o.resolveComponent)("box-selection"),C=(0,o.resolveComponent)("v-stage"),_=(0,o.resolveComponent)("b-skeleton");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{ref:"pdfContainer",class:(0,o.normalizeClass)(["pdf-page-container",(e.categorizeModalIsActive||e.editMode||e.publicView||e.isDocumentReviewed)&&"default-cursor",n.page.number===e.currentPage&&"current-page"])},[!e.isSelecting&&e.spanSelectionsForPage(n.page).length>0?((0,o.openBlock)(),(0,o.createBlock)(l,{key:0,spans:e.spanSelectionsForPage(n.page),"container-width":s.scaledViewport.width,"container-height":s.scaledViewport.height,page:n.page,onClose:s.closePopups},null,8,["spans","container-width","container-height","page","onClose"])):(0,o.createCommentVNode)("",!0),s.showAnnotationLabel?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:"annotation-label",style:(0,o.normalizeStyle)(s.getAnnotationLabelPosition(s.showAnnotationLabel))},(0,o.toDisplayString)(s.showAnnotationLabel.labelName),5)):(0,o.createCommentVNode)("",!0),e.showAnnSetTable?((0,o.openBlock)(),(0,o.createBlock)(r,{key:2,page:n.page},null,8,["page"])):(0,o.createCommentVNode)("",!0),a.image&&e.scale?((0,o.openBlock)(),(0,o.createBlock)(C,{key:3,ref:"stage",config:s.scaledViewport,style:(0,o.normalizeStyle)(s.canvasStyle),onMousedown:s.onMouseDown,onMouseup:s.onMouseUp,onMousemove:s.onMouseMove},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(u,null,{default:(0,o.withCtx)((()=>[(0,o.createVNode)(c,{config:{image:a.image,width:s.scaledViewport.width,height:s.scaledViewport.height,listening:!1}},null,8,["config"]),s.pageInVisibleRange&&!e.editMode?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[s.searchResults.length>0?((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:0},(0,o.renderList)(s.searchResults,((e,t)=>((0,o.openBlock)(),(0,o.createBlock)(d,{key:"sr"+t,config:{...s.selectionTextRect(e,e===s.currentSearchResultForPage)}},null,8,["config"])))),128)):(0,o.createCommentVNode)("",!0),e.categorizeModalIsActive&&e.publicView&&e.isDocumentReviewed?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(h,{key:1,ref:"entities"},{default:(0,o.withCtx)((()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.scaledEntities(n.page.entities,n.page),((e,t)=>((0,o.openBlock)(),(0,o.createBlock)(d,{key:t,config:s.entityRect(e),onClick:t=>s.handleClickedEntity(e),onMouseenter:s.onElementEnter,onMouseleave:s.onElementLeave},null,8,["config","onClick","onMouseenter","onMouseleave"])))),128))])),_:1},512)),((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(s.pageAnnotations,(t=>((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,null,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(t.span.filter((e=>e.page_index+1==n.page.number)),((n,i)=>((0,o.openBlock)(),(0,o.createBlock)(h,null,{default:(0,o.withCtx)((()=>[e.isAnnotationInEditMode(t.id)?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(d,{key:0,config:s.annotationRect(n,t.id),onClick:e=>s.handleFocusedAnnotation(t),onMouseenter:e=>s.onElementEnter(t,n),onMouseleave:s.onElementLeave},null,8,["config","onClick","onMouseenter","onMouseleave"]))])),_:2},1024)))),256)),t.metadata&&t.metadata.checkbox?((0,o.openBlock)(),(0,o.createBlock)(h,{key:0},{default:(0,o.withCtx)((()=>[e.isAnnotationInEditMode(t.id)?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(d,{key:0,config:s.annotationRect(t.metadata.checkbox.bbox,t.id),onClick:e=>s.handleFocusedAnnotation(t),onMouseenter:e=>s.onElementEnter(t,t.metadata.checkbox.bbox),onMouseleave:s.onElementLeave},null,8,["config","onClick","onMouseenter","onMouseleave"]))])),_:2},1024)):(0,o.createCommentVNode)("",!0)],64)))),256))],64)):(0,o.createCommentVNode)("",!0)])),_:1}),(0,o.createVNode)(u,null,{default:(0,o.withCtx)((()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.spanSelectionsForPage(n.page),((e,t)=>((0,o.openBlock)(),(0,o.createBlock)(m,{key:t,id:t,span:e,page:n.page},null,8,["id","span","page"])))),128)),((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.placeholderSelectionForPage(n.page),((e,t)=>((0,o.openBlock)(),(0,o.createBlock)(p,{key:`${t}_placeholder`,span:e,page:n.page},null,8,["span","page"])))),128)),n.page.number===s.selectionPage?((0,o.openBlock)(),(0,o.createBlock)(g,{key:0,page:n.page},null,8,["page"])):(0,o.createCommentVNode)("",!0)])),_:1})])),_:1},8,["config","style","onMousedown","onMouseup","onMousemove"])):((0,o.openBlock)(),(0,o.createBlock)(_,{key:4,position:"is-centered",width:s.scaledViewport.width,height:s.scaledViewport.height},null,8,["width","height"]))],2)}const Mt=window.devicePixelRatio||1,It=.98,Ot=600,Pt=950,$t=1800;function Rt(e,t,n,i,a,s){const l=(0,o.resolveComponent)("v-rect"),r=(0,o.resolveComponent)("v-transformer"),c=(0,o.resolveComponent)("v-group");return(0,o.openBlock)(),(0,o.createBlock)(c,null,{default:(0,o.withCtx)((()=>[e.isSelectionValid?((0,o.openBlock)(),(0,o.createBlock)(l,{key:0,ref:"boxSelection",config:s.config,"stroke-scale-enabled":!1,onDragend:s.onChange,onTransformend:s.onChange},null,8,["config","onDragend","onTransformend"])):(0,o.createCommentVNode)("",!0),n.editable?((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,ref:"boxTransformer",config:s.transformerConfig},null,8,["config"])):(0,o.createCommentVNode)("",!0)])),_:1})}const Ft={props:{page:{required:!0,type:Object},editable:{required:!1,type:Boolean,default:!0}},computed:{config(){return{x:this.selection.start.x,y:this.selection.start.y,width:this.selection.end.x-this.selection.start.x,height:this.selection.end.y-this.selection.start.y,fill:this.isSelecting?"#7B61FFB3":"transparent",stroke:this.isSelecting?"transparent":"#7B61FFB3",strokeWidth:1,globalCompositeOperation:"multiply",shadowForStrokeEnabled:!1,name:"boxSelection",draggable:!0}},transformerConfig(){return{borderEnabled:!1,rotateEnabled:!1,ignoreStroke:!0,keepRatio:!1,anchorStroke:"#7B61FF",anchorSize:6}},...(0,s.aH)("selection",["selection","isSelecting","elementSelected","spanSelection"]),...(0,s.aH)("document",["editAnnotation"]),...(0,s.L8)("display",["clientToBbox","scaledEntities"]),...(0,s.L8)("selection",["isSelectionValid","entitiesOnSelection"])},watch:{isSelecting(e){e||(this.updateTransformer(),this.handleSelection())}},mounted(){this.selection.custom||this.updateTransformer()},methods:{handleSelection(){const e=this.clientToBbox(this.page,this.selection.start,this.selection.end);this.$store.dispatch("selection/entitySelection",{entities:this.scaledEntities(this.entitiesOnSelection(e,this.page),this.page),selection:e})},updateTransformer(){const e=this.$refs.boxTransformer;if(!e)return;const t=e.getNode(),n=t.getStage();let o;n&&(o=n.findOne(".boxSelection")),o!==t.node()&&(o?t.nodes([o]):t.nodes([]),t.getLayer().batchDraw())},onChange(e){const{x:t,y:n,scaleX:o,scaleY:i,skewX:a,width:s,height:l}=e.target.attrs,r=s*o,c=l*i;let d,h;a>=0?(d={x:t,y:n},h={x:d.x+r,y:d.y+c}):(h={x:t,y:n},d={x:h.x-r,y:h.y-c}),this.moveSelection({start:d,end:h});const u=this.$refs.boxSelection.getNode();u.skewX(0),u.skewY(0),u.rotation(0),u.scaleX(1),u.scaleY(1),this.handleSelection()},...(0,s.i0)("selection",["moveSelection"])}},Ht=(0,$.A)(Ft,[["render",Rt]]),zt=Ht;function Ut(e,t,n,i,a,s){const l=(0,o.resolveComponent)("v-rect"),r=(0,o.resolveComponent)("v-transformer"),c=(0,o.resolveComponent)("v-group");return(0,o.openBlock)(),(0,o.createBlock)(c,null,{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{ref:"spanSelection",config:s.config,"stroke-scale-enabled":!1,onDragend:s.onChange,onTransformend:s.onChange},null,8,["config","onDragend","onTransformend"]),e.isSelectionValid?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(r,{key:0,ref:"spanTransformer",config:s.transformerConfig},null,8,["config"]))])),_:1})}const Zt={props:{id:{required:!0,type:Number},page:{required:!0,type:Object},span:{required:!0,type:Object}},data(){return{selection:{start:null,end:null},box:{x:0,y:0,width:0,height:0}}},computed:{config(){const e=window.getComputedStyle(document.body).getPropertyValue("--primary-color");return{x:this.box.x,y:this.box.y,width:this.box.width,height:this.box.height,stroke:"#7B61FFB3",fill:`${e}77`,strokeWidth:1,globalCompositeOperation:"multiply",shadowForStrokeEnabled:!1,perfectDrawEnabled:!1,name:`spanSelection_${this.id}`,draggable:!0}},transformerConfig(){return{borderEnabled:!1,rotateEnabled:!1,ignoreStroke:!0,keepRatio:!1,anchorStroke:"#7B61FF",anchorSize:6,name:`spanTransformer_${this.id}`}},...(0,s.aH)("document",["editAnnotation"]),...(0,s.L8)("display",["clientToBbox","bboxToRect","scaledEntities"]),...(0,s.L8)("selection",["entitiesOnSelection","isSelectionValid"])},watch:{box(){this.updateTransformer(),this.setSelection()},span(){this.box=this.bboxToRect(this.page,this.span)}},mounted(){this.box=this.bboxToRect(this.page,this.span),this.setSelection(),this.$nextTick((()=>{this.updateTransformer()}))},methods:{setSelection(){this.selection={start:{x:this.box.x,y:this.box.y},end:{x:this.box.x+this.box.width,y:this.box.y+this.box.height}}},startSelection(e){this.selection.start=e},moveSelection(e){if(this.selection){const t=Math.abs(this.selection.start.x-e.end.x),n=Math.abs(this.selection.start.y-e.end.y);if(t>5&&n>5){const{start:t,end:n}=e;t&&(this.selection.start=t),n&&(this.selection.end=n)}}},endSelection(e){let t,n;e&&(t=Math.abs(this.selection.start.x-e.x),n=Math.abs(this.selection.start.y-e.y)),!e||n<=5&&t<=5||this.selection.start.x===e.x&&this.selection.start.y==e.y?(this.selection.start=null,this.selection.end=null):(this.selection.start.x=this.selection.start.x-selectionPadding,this.selection.start.y=this.selection.start.y-selectionPadding,e.x=e.x+selectionPadding,e.y=e.y+selectionPadding,this.selection.end=e)},handleSelection(){this.box={x:this.selection.start.x,y:this.selection.start.y,width:this.selection.end.x-this.selection.start.x,height:this.selection.end.y-this.selection.start.y};const e=this.clientToBbox(this.page,this.selection.start,this.selection.end);this.$store.dispatch("selection/entitySelection",{entities:this.scaledEntities(this.entitiesOnSelection(e,this.page),this.page),selection:e})},updateTransformer(){const e=this.$refs.spanTransformer;if(!e)return;const t=e.getNode(),n=t.getStage();let o;n&&(o=n.findOne(`.spanSelection_${this.id}`)),o!==t.node()&&(o?t.nodes([o]):t.nodes([]),t.getLayer().batchDraw())},onChange(e){const{x:t,y:n,scaleX:o,scaleY:i,skewX:a,width:s,height:l}=e.target.attrs,r=s*o,c=l*i;let d,h;a>=0?(d={x:t,y:n},h={x:d.x+r,y:d.y+c}):(h={x:t,y:n},d={x:h.x-r,y:h.y-c}),this.moveSelection({start:d,end:h});const u=this.$refs.spanSelection.getNode();u.skewX(0),u.skewY(0),u.rotation(0),u.scaleX(1),u.scaleY(1),this.handleSelection()}}},Gt=(0,$.A)(Zt,[["render",Ut]]),Wt=Gt;function qt(e,t,n,i,a,s){const l=(0,o.resolveComponent)("v-rect"),r=(0,o.resolveComponent)("v-group");return(0,o.openBlock)(),(0,o.createBlock)(r,null,{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{ref:"placeholderSelection",config:s.placeholderConfig},null,8,["config"])])),_:1})}const jt={props:{span:{required:!0,type:Object},page:{required:!0,type:Object}},data(){return{selection:{start:null,end:null}}},computed:{placeholderConfig(){const e=this.bboxToRect(this.page,this.span),t=window.getComputedStyle(document.body).getPropertyValue("--primary-color");return{x:e.x,y:e.y,width:e.width,height:e.height,fill:"transparent",stroke:t,strokeWidth:3,globalCompositeOperation:"multiply",shadowForStrokeEnabled:!1,name:"placeholderSelection",draggable:!1}},...(0,s.L8)("display",["bboxToRect"])}},Kt=(0,$.A)(jt,[["render",qt]]),Yt=Kt,Jt={key:0},Xt={key:0,class:"popup-input"},Qt={class:"input-text"},en={class:"caret-icon"},tn=["innerHTML"],nn={class:"input-text"},on={class:"caret-icon"},an={class:"annotation-buttons"};function sn(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-button"),c=(0,o.resolveComponent)("b-dropdown-item"),d=(0,o.resolveComponent)("b-dropdown"),h=(0,o.resolveComponent)("b-tooltip");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"annotation-popup",style:(0,o.normalizeStyle)({left:`${s.left}px`,top:`${s.top}px`,height:`${a.heightOfPopup}px`})},[e.editAnnotation?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Jt,[e.spanLoading?((0,o.openBlock)(),(0,o.createElementBlock)("div",Xt,[(0,o.createVNode)(l,{icon:"spinner",class:"fa-spin loading-icon-size spinner"})])):(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("input",{key:1,"onUpdate:modelValue":t[0]||(t[0]=e=>s.textFromEntities=e),class:"popup-input",type:"text",disabled:!0},null,512)),[[o.vModelText,s.textFromEntities]])])),(0,o.createVNode)(d,{modelValue:a.selectedSet,"onUpdate:modelValue":t[1]||(t[1]=e=>a.selectedSet=e),disabled:!s.textFromEntities,"aria-role":"list",class:(0,o.normalizeClass)(["annotation-dropdown","no-padding-bottom","no-padding-top","dropdown-full-width",0===a.setsList.length?"no-padding-top":""]),scrollable:""},{trigger:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{class:(0,o.normalizeClass)(["popup-input",a.selectedSet?"":"not-selected","has-right-icon"]),type:"is-text"},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",Qt,(0,o.toDisplayString)(a.selectedSet?`${a.selectedSet.label_set.name} ${a.selectedSet.id?e.numberOfAnnotationSetGroup(a.selectedSet):`${e.numberOfLabelSetGroup(a.selectedSet.label_set)} (${e.$t("new")})`}`:e.$t("select_annotation_set")),1),(0,o.createElementVNode)("span",en,[(0,o.createVNode)(l,{icon:"angle-down",size:"is-small",class:"caret"})])])),_:1},8,["class"])])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{type:"is-ghost",class:(0,o.normalizeClass)(["add-ann-set","dropdown-item","no-icon-margin"]),"icon-left":"plus",onClick:s.openAnnotationSetCreation},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("new_ann_set_title")),1)])),_:1},8,["onClick"]),((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(a.setsList,((t,n)=>((0,o.openBlock)(),(0,o.createBlock)(c,{key:`${t.label_set.id}_${n}`,"aria-role":"listitem",value:t},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(`${t.label_set.name} ${t.id?e.numberOfAnnotationSetGroup(t):`${e.numberOfLabelSetGroup(t.label_set)} (${e.$t("new")})`}`),1)])),_:2},1032,["value"])))),128))])),_:1},8,["modelValue","disabled","class"]),(0,o.createVNode)(h,{multilined:"",active:a.selectedSet&&(!a.labels||0===a.labels.length),size:"is-large",position:"is-bottom",class:"bottom-aligned"},{content:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",{innerHTML:`${e.$t("no_labels_available")} ${e.showBranding?e.$t("no_labels_available_link"):""}`},null,8,tn)])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(d,{modelValue:a.selectedLabel,"onUpdate:modelValue":t[2]||(t[2]=e=>a.selectedLabel=e),"aria-role":"list",disabled:!s.textFromEntities||!a.labels||0===a.labels.length,scrollable:"",class:"label-dropdown annotation-dropdown dropdown-full-width"},{trigger:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{class:(0,o.normalizeClass)(["popup-input",a.selectedLabel?"":"not-selected","has-right-icon"]),type:"is-text"},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",nn,(0,o.toDisplayString)(a.selectedLabel?a.selectedLabel.name:a.labels&&0===a.labels.length?e.$t("no_labels_to_choose"):e.$t("select_label")),1),(0,o.createElementVNode)("span",on,[(0,o.createVNode)(l,{icon:"angle-down",size:"is-small",class:"caret"})])])),_:1},8,["class"])])),default:(0,o.withCtx)((()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(a.labels,(e=>((0,o.openBlock)(),(0,o.createBlock)(c,{key:e.id,"aria-role":"listitem",value:e},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.name),1)])),_:2},1032,["value"])))),128))])),_:1},8,["modelValue","disabled"])])),_:1},8,["active"]),(0,o.createElementVNode)("div",an,[(0,o.createVNode)(r,{type:"is-text",class:"cancel-button popup-button primary-button",label:e.$t("cancel"),disabled:a.loading,onClick:(0,o.withModifiers)(s.close,["prevent"])},null,8,["label","disabled","onClick"]),(0,o.createVNode)(r,{type:"is-primary",class:"popup-button primary-button",label:e.$t("save"),disabled:a.loading||!e.spanSelection||!a.selectedLabel,onClick:(0,o.withModifiers)(s.save,["prevent"])},null,8,["label","disabled","onClick"])])],4)}const ln={props:{spans:{required:!0,type:Array},containerWidth:{type:Number,required:!0},containerHeight:{type:Number,required:!0},page:{required:!0,type:Object}},data(){return{heightOfPopup:192,margin:12,widthOfPopup:205,selectedLabel:null,selectedSet:null,labels:null,loading:!1,isAnnSetModalShowing:!1,setsList:[]}},computed:{...(0,s.aH)("document",["annotationSets","documentId","editAnnotation"]),...(0,s.L8)("document",["numberOfAnnotationSetGroup","numberOfLabelSetGroup","labelsFilteredForAnnotationCreation"]),...(0,s.aH)("display",["showBranding"]),...(0,s.L8)("display",["clientToBbox","bboxToRect"]),...(0,s.aH)("selection",["spanSelection","selection","spanLoading"]),top(){if(this.selection&&this.selection.end){const e=this.selection.end.y+this.margin;return e+this.heightOfPopup<this.containerHeight?e:this.selection.end.y-this.heightOfPopup}{const e=this.bboxToRect(this.page,this.spans[0]),t=e.y-this.heightOfPopup;return e.y>this.heightOfPopup?t:e.y+e.height+this.margin}},left(){if(this.selection&&this.selection.start&&this.selection.end){const e=this.selection.start.x;return e+this.widthOfPopup<this.containerWidth?e:this.containerWidth-this.widthOfPopup}{const e=this.bboxToRect(this.page,this.spans[0]),t=e.x+e.width/2-this.widthOfPopup/2;return t+this.widthOfPopup>this.containerWidth?this.containerWidth-this.widthOfPopup:t>0?t:0}},textFromEntities(){let e="";return this.spans.forEach((t=>{e=`${e} ${t.offset_string}`})),e.trim()}},watch:{selectedSet(e,t){this.selectedLabel=null,this.labels=this.labelsFilteredForAnnotationCreation(e),null===t&&this.editAnnotation?this.selectedLabel=this.editAnnotation.label:this.labels.length>0&&(this.selectedLabel=this.labels[0])}},mounted(){this.setsList=this.orderedSetList([...this.annotationSets]),this.editAnnotation?(this.heightOfPopup=142,this.selectedSet=this.editAnnotation.annotationSet):1===this.setsList.length&&(this.selectedSet=this.setsList[0]),setTimeout((()=>{document.body.addEventListener("click",this.clickOutside)}),200)},unmounted(){document.body.removeEventListener("click",this.clickOutside)},methods:{orderedSetList(e){return e.sort(((e,t)=>{const n=e.label_set.name,o=t.label_set.name;return n<o?-1:n>o?1:0})),e},close(){this.editAnnotation&&this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"),this.$emit("close")},save(){if(this.editAnnotation)return this.loading=!0,this.$store.dispatch("document/setEditAnnotation",{id:this.editAnnotation.id,index:this.editAnnotation.index,label:this.selectedLabel,labelSet:this.selectedSet.label_set,annotationSet:this.selectedSet,pageNumber:this.editAnnotation.pageNumber}),void document.getElementById("save-ann").click();{this.loading=!0;let e=null;this.selection&&this.selection.start&&this.selection.end&&(e=this.clientToBbox(this.page,this.selection.start,this.selection.end));const t={document:this.documentId,span:this.spans,label:this.selectedLabel.id,is_correct:!0,revised:!1};e&&(t.selection_bbox=e),this.selectedSet.id?t.annotation_set=this.selectedSet.id:t.label_set=this.selectedSet.label_set.id,this.$store.dispatch("document/createAnnotation",{annotation:t}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("error_creating_annotation")})})).finally((()=>{this.close(),this.loading=!1}))}},chooseLabelSet(e){const t=this.setsList.findIndex((t=>null===t.id&&t.label_set.id===e.id)),n={label_set:e,labels:e.labels,id:null};t>=0?this.setsList[t]=n:this.setsList.unshift(n),this.selectedSet=n},openAnnotationSetCreation(){this.$store.dispatch("display/showChooseLabelSetModal",{show:!0,finish:this.chooseLabelSet})}}},rn=(0,$.A)(ln,[["render",sn],["__scopeId","data-v-60c53a7e"]]),cn=rn,dn={class:"ann-set-label-set-name"};function hn(e,t,n,i,a,s){const l=(0,o.resolveComponent)("SettingsIcon"),r=(0,o.resolveComponent)("b-dropdown-item"),c=(0,o.resolveComponent)("b-dropdown");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"ann-set-table-header",style:(0,o.normalizeStyle)({left:`${s.coordinates.x}px`,top:`${s.coordinates.y}px`})},[(0,o.createVNode)(c,{"aria-role":"list",class:"ann-set-table-header-dropdown",position:"is-top-right",scrollable:""},{trigger:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",dn,(0,o.toDisplayString)(s.labelSetName),1),(0,o.createVNode)(l)])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{"aria-role":"listitem",class:"delete-action",onClick:t[0]||(t[0]=e=>s.handleDelete())},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("delete_table")),1)])),_:1})])),_:1})],4)}const un={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mn(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",un,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M13.361 8.4396C13.2541 8.31795 13.1952 8.16154 13.1952 7.9996C13.1952 7.83767 13.2541 7.68126 13.361 7.55961L14.2143 6.5996C14.3084 6.49472 14.3668 6.36274 14.3811 6.22261C14.3955 6.08248 14.3651 5.9414 14.2943 5.8196L12.961 3.51294C12.8909 3.39129 12.7843 3.29486 12.6562 3.2374C12.5281 3.17993 12.3851 3.16438 12.2477 3.19294L10.9943 3.44627C10.8349 3.47922 10.6688 3.45266 10.5276 3.3716C10.3864 3.29055 10.2797 3.16059 10.2277 3.00627L9.821 1.78627C9.77627 1.65386 9.69107 1.53885 9.57742 1.4575C9.46377 1.37615 9.32743 1.33258 9.18766 1.33294H6.521C6.37562 1.32535 6.23175 1.36556 6.11138 1.44741C5.991 1.52927 5.90072 1.64828 5.85433 1.78627L5.481 3.00627C5.429 3.16059 5.32231 3.29055 5.18107 3.3716C5.03983 3.45266 4.87381 3.47922 4.71433 3.44627L3.42767 3.19294C3.29737 3.17453 3.16453 3.19509 3.0459 3.25203C2.92726 3.30898 2.82813 3.39976 2.761 3.51294L1.42767 5.8196C1.35511 5.94004 1.32248 6.08033 1.33445 6.22042C1.34643 6.36051 1.40239 6.49323 1.49433 6.5996L2.341 7.55961C2.44788 7.68126 2.50682 7.83767 2.50682 7.9996C2.50682 8.16154 2.44788 8.31795 2.341 8.4396L1.49433 9.39961C1.40239 9.50598 1.34643 9.6387 1.33445 9.77879C1.32248 9.91888 1.35511 10.0592 1.42767 10.1796L2.761 12.4863C2.83106 12.6079 2.93774 12.7044 3.06583 12.7618C3.19392 12.8193 3.33688 12.8348 3.47433 12.8063L4.72766 12.5529C4.88714 12.52 5.05317 12.5465 5.19441 12.6276C5.33565 12.7087 5.44233 12.8386 5.49433 12.9929L5.901 14.2129C5.94738 14.3509 6.03766 14.4699 6.15804 14.5518C6.27842 14.6337 6.42229 14.6739 6.56766 14.6663H9.23433C9.37409 14.6666 9.51044 14.6231 9.62408 14.5417C9.73773 14.4604 9.82294 14.3454 9.86766 14.2129L10.2743 12.9929C10.3263 12.8386 10.433 12.7087 10.5743 12.6276C10.7155 12.5465 10.8815 12.52 11.041 12.5529L12.2943 12.8063C12.4318 12.8348 12.5747 12.8193 12.7028 12.7618C12.8309 12.7044 12.9376 12.6079 13.0077 12.4863L14.341 10.1796C14.4118 10.0578 14.4422 9.91673 14.4278 9.7766C14.4134 9.63647 14.355 9.50449 14.261 9.39961L13.361 8.4396ZM12.3677 9.33294L12.901 9.93294L12.0477 11.4129L11.261 11.2529C10.7809 11.1548 10.2814 11.2364 9.85739 11.4821C9.43341 11.7279 9.11443 12.1208 8.961 12.5863L8.70767 13.3329H7.001L6.761 12.5729C6.60757 12.1075 6.28859 11.7146 5.8646 11.4688C5.44062 11.223 4.94115 11.1415 4.461 11.2396L3.67433 11.3996L2.80767 9.92627L3.341 9.32627C3.66897 8.95959 3.85029 8.48489 3.85029 7.99294C3.85029 7.50098 3.66897 7.02629 3.341 6.6596L2.80767 6.0596L3.661 4.59294L4.44767 4.75294C4.92781 4.85109 5.42728 4.76953 5.85127 4.52374C6.27525 4.27795 6.59423 3.88504 6.74766 3.4196L7.001 2.66627H8.70767L8.961 3.42627C9.11443 3.89171 9.43341 4.28462 9.85739 4.5304C10.2814 4.77619 10.7809 4.85775 11.261 4.7596L12.0477 4.5996L12.901 6.0796L12.3677 6.67961C12.0434 7.04545 11.8643 7.51739 11.8643 8.00627C11.8643 8.49515 12.0434 8.9671 12.3677 9.33294ZM7.85433 5.33294C7.32691 5.33294 6.81134 5.48934 6.37281 5.78235C5.93428 6.07537 5.59249 6.49185 5.39065 6.97912C5.18882 7.46638 5.13601 8.00256 5.2389 8.51985C5.3418 9.03713 5.59577 9.51228 5.96871 9.88522C6.34165 10.2582 6.81681 10.5121 7.33409 10.615C7.85137 10.7179 8.38755 10.6651 8.87482 10.4633C9.36209 10.2615 9.77857 9.91966 10.0716 9.48113C10.3646 9.04259 10.521 8.52702 10.521 7.9996C10.521 7.29236 10.24 6.61408 9.73995 6.11399C9.23985 5.61389 8.56158 5.33294 7.85433 5.33294ZM7.85433 9.33294C7.59062 9.33294 7.33284 9.25474 7.11357 9.10823C6.89431 8.96172 6.72341 8.75348 6.62249 8.50985C6.52158 8.26621 6.49517 7.99813 6.54662 7.73948C6.59807 7.48084 6.72505 7.24327 6.91152 7.0568C7.09799 6.87033 7.33557 6.74334 7.59421 6.69189C7.85285 6.64044 8.12094 6.66685 8.36458 6.76777C8.60821 6.86868 8.81645 7.03958 8.96296 7.25884C9.10947 7.47811 9.18766 7.7359 9.18766 7.9996C9.18766 8.35323 9.04719 8.69237 8.79714 8.94241C8.54709 9.19246 8.20795 9.33294 7.85433 9.33294Z",fill:"white"},null,-1)]))}const pn={},gn=(0,$.A)(pn,[["render",mn]]),Cn=gn,_n={name:"AnnSetTableOptions",components:{SettingsIcon:Cn},props:{page:{type:Object,required:!0}},computed:{...(0,s.L8)("document",["annotationSetsInTable","annotationsInAnnotationsSets"]),...(0,s.L8)("display",["bboxToPoint"]),...(0,s.aH)("display",["showAnnSetTable"]),labelSetName(){return this.showAnnSetTable[0].label_set.name},coordinates(){let e=0,t=0;const n=40;return this.showAnnSetTable.forEach((o=>{o.labels&&o.labels.forEach((o=>{o.annotations.forEach((o=>{o.span.forEach((o=>{const{x:i,y:a}=this.bboxToPoint(this.page,{x:o.x0,y:o.y0});(0===e||i<e)&&(e=i),(0===t||a<t)&&(t=a-n)}))}))}))})),{x:e,y:t}}},methods:{handleDelete(){const e=this.annotationsInAnnotationsSets(this.showAnnSetTable);for(let t=0;t<e.length;t++){const n=e[t];this.$store.dispatch("document/deleteAnnotation",{annotationId:n.id,annotationSet:null}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})}))}this.$store.dispatch("display/showAnnSetTable",null)}}},bn=(0,$.A)(_n,[["render",hn],["__scopeId","data-v-0f7fbff8"]]),En=bn,Sn={name:"DocumentPage",components:{BoxSelection:zt,SpanSelection:Wt,PlaceholderSelection:Yt,AnnotationPopup:cn,AnnSetTableOptions:En},props:{page:{type:Object,required:!0},imageBlob:{type:Blob,required:!1,default:null}},data(){return{image:null}},computed:{...(0,s.aH)("selection",["selectedEntities","spanSelection","isSelecting"]),...(0,s.aH)("display",["scale","categorizeModalIsActive","searchEnabled","currentPage","showAnnSetTable"]),...(0,s.aH)("document",["documentAnnotationSelected","recalculatingAnnotations","selectedDocument","publicView","annotationId"]),...(0,s.aH)("edit",["editMode"]),...(0,s.L8)("display",["visiblePageRange","bboxToRect","scaledEntities"]),...(0,s.L8)("selection",["isSelectionValid","spanSelectionsForPage","placeholderSelectionForPage"]),...(0,s.L8)("document",["getAnnotationsFiltered","isAnnotationInEditMode","isDocumentReadyToBeReviewed","isDocumentReviewed","labelOfAnnotation"]),selectionPage(){return this.selection&&this.selection.pageNumber},showFocusedAnnotation(){return this.documentAnnotationSelected&&this.documentAnnotationSelected.page===this.page.number&&this.visiblePageRange.includes(this.documentAnnotationSelected.page)&&!this.isAnnotationInEditMode(this.documentAnnotationSelected.id)},actualSizeViewport(){return{width:this.page.size[0]*this.scale,height:this.page.size[1]*this.scale}},scaledViewport(){const{width:e,height:t}=this.actualSizeViewport,[n,o]=[e,t].map((e=>e/Mt));return{width:n,height:o}},canvasStyle(){const{width:e,height:t}=this.scaledViewport;return`width: ${e}px; height: ${t}px;`},pageInVisibleRange(){return this.visiblePageRange.includes(this.page.number)},pageAnnotations(){const e=[];return this.getAnnotationsFiltered.annotations&&this.getAnnotationsFiltered.annotations.map((t=>{t.span.find((e=>e.page_index+1===this.page.number))&&e.push(t)})),e},selection(){return this.$store.getters["selection/getSelectionForPage"](this.page.number)},searchResults(){const e=this.$store.getters["display/searchResultsForPage"](this.page.number);return e},currentSearchResultForPage(){return this.$store.getters["display/currentSearchResultForPage"](this.page.number)},showAnnotationLabel(){return this.showFocusedAnnotation&&!this.isSelecting&&this.documentAnnotationSelected&&""!==this.documentAnnotationSelected.labelName?this.documentAnnotationSelected:null}},watch:{recalculatingAnnotations(e){e||this.drawPage(!0)},scale(){this.closePopups()},page(e,t){e.image_url!==t.image_url&&this.drawPage(!0)},searchEnabled(e){e&&this.closePopups()}},mounted(){this.selectedDocument&&1===this.selectedDocument.labeling_available&&this.drawPage()},methods:{...(0,s.i0)("selection",["startSelection","endSelection","moveSelection"]),isAnnotationFocused(e){return this.documentAnnotationSelected&&e===this.documentAnnotationSelected.id},onMouseDown(e){if(this.categorizeModalIsActive||this.editMode||this.publicView||this.isDocumentReviewed)return;if(e.target.getParent()&&"Transformer"===e.target.getParent().className&&!e.target.name().includes("anchor"))return void this.closePopups();if("entity"===e.target.name()||"annotation"===e.target.name()||"multiAnnBoxSelection"===e.target.name()||"multiAnnBoxTransformer"===e.target.name()||"multiAnnButton"===e.target.name()||"boxSelection"===e.target.name()||"boxTransformer"===e.target.name()||e.target.name().includes("spanSelection")||e.target.name().includes("spanTransformer")||e.target.name().includes("anchor"))return;const t=this.$refs.stage.getStage().getPointerPosition();this.startSelection({pageNumber:this.page.number,start:{x:t.x,y:t.y}})},onMouseMove(){if(!this.isSelecting)return;const e=this.$refs.stage.getStage().getPointerPosition();this.moveSelection({end:{x:e.x,y:e.y}})},onMouseUp(){if(!this.isSelecting)return;const e=this.$refs.stage.getStage().getPointerPosition();this.endSelection({x:e.x,y:e.y})},handleFocusedAnnotation(e){this.$store.dispatch("document/setAnnotationId",e.id),this.closePopups()},handleClickedEntity(e){this.$store.dispatch("selection/entityClick",e)},onElementEnter(e=null,t=null){if(this.categorizeModalIsActive||this.publicView||this.editMode||this.isDocumentReviewed||(this.$refs.stage.$el.style.cursor="pointer"),e){const n=this.labelOfAnnotation(e);n&&this.$store.dispatch("document/setDocumentAnnotationSelected",{annotation:e,label:n,span:t,scrollTo:!1})}},onElementLeave(){this.$refs.stage.$el.style.cursor="inherit",this.$store.dispatch("document/disableDocumentAnnotationSelected")},drawPage(e=!1){if(this.image&&!e)return;const t=e=>{const t=new Image;t.src=URL.createObjectURL(e),t.onload=()=>{this.image=t}};this.imageBlob?t(this.imageBlob):Ae.makeFileRequest(`${this.page.image_url}?${this.selectedDocument.downloaded_at}`).then((e=>{t(e)})).catch((e=>{}))},selectionTextRect(e,t){return{fill:t?"orange":"greenyellow",stroke:t?"orange":"",globalCompositeOperation:"multiply",...this.bboxToRect(this.page,e)}},entityRect(e){return{stroke:"#ccc",strokeWidth:1,dash:[5,2],fill:"transparent",globalCompositeOperation:"multiply",transformsEnabled:"position",hitStrokeWidth:0,shadowForStrokeEnabled:!1,perfectDrawEnabled:!1,name:"entity",...e.scaled}},annotationRect(e,t,n){const o=this.annotationId==t&&!this.searchEnabled,i=this.isAnnotationFocused(t);let a="yellow",s=0,l="";return o?(a="orange",s=1,l="black"):i&&(a="#67E9B7",s=1,l="black"),{fill:a,globalCompositeOperation:"multiply",strokeWidth:s,stroke:l,name:"annotation",draggable:n,...this.bboxToRect(this.page,e)}},getAnnotationLabelPosition(e){if(e&&this.$refs.stage){const t=10,n=50,o=this.bboxToRect(this.page,e.span);return e.labelName.length>t&&o.y<n?`left: ${o.x}px; top: ${o.y+o.height}px`:`left: ${o.x}px; bottom: ${this.$refs.stage.$el.clientHeight-o.y}px`}return""},closePopups(){this.$store.dispatch("selection/entitySelection",{entities:[],selection:null})}}},fn=(0,$.A)(Sn,[["render",xt],["__scopeId","data-v-6c500392"]]),vn=fn;function An(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{style:(0,o.normalizeStyle)(s.canvasStyle)},[(0,o.createVNode)(l,{width:`${s.scaledViewport.width}px`,height:`${s.scaledViewport.height}px`},null,8,["width","height"])],4)}const kn={props:{width:{default:0,type:Number},height:{default:0,type:Number}},computed:{...(0,s.aH)("display",["scale"]),actualSizeViewport(){return{width:this.width*this.scale,height:this.height*this.scale}},scaledViewport(){const{width:e,height:t}=this.actualSizeViewport,[n,o]=[e,t].map((e=>Math.ceil(e/Mt)));return{width:n,height:o}},canvasStyle(){const{width:e,height:t}=this.scaledViewport;return`width: ${e}px; height: ${t}px; margin: 0 auto`}}},Nn=(0,$.A)(kn,[["render",An]]),wn=Nn,yn={id:"scrolling-document"},Tn={ref:"scrollingDocument",class:"scrolling-document"},Bn={key:0},Dn={key:1,class:"loading-page"};function Ln(e,t,n,i,a,s){const l=(0,o.resolveComponent)("SearchBar"),r=(0,o.resolveComponent)("ScrollingPage"),c=(0,o.resolveComponent)("b-skeleton"),d=(0,o.resolveComponent)("Toolbar");return(0,o.openBlock)(),(0,o.createElementBlock)("div",yn,[(0,o.createElementVNode)("div",Tn,[(0,o.createVNode)(o.Transition,{name:e.searchEnabled?"slide-down":"slide-up"},{default:(0,o.withCtx)((()=>[e.searchEnabled?((0,o.openBlock)(),(0,o.createBlock)(l,{key:0})):(0,o.createCommentVNode)("",!0)])),_:1},8,["name"]),e.selectedDocument&&e.scale&&!e.loading&&!e.recalculatingAnnotations?((0,o.openBlock)(),(0,o.createElementBlock)("div",Bn,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.editMode?e.pagesForPostprocess:s.pages,(e=>((0,o.openBlock)(),(0,o.createBlock)(r,{key:e.number,ref_for:!0,ref:"scrollingPage",page:e,"client-height":a.clientHeight,"scroll-top":a.scrollTop,class:"scrolling-page",onPageJump:s.onPageJump},null,8,["page","client-height","scroll-top","onPageJump"])))),128))])):((0,o.openBlock)(),(0,o.createElementBlock)("div",Dn,[(0,o.createVNode)(c,{width:"100%",height:"1000px"})]))],512),s.showToolbar?((0,o.openBlock)(),(0,o.createBlock)(d,{key:0})):(0,o.createCommentVNode)("",!0)])}function Vn(e,t){const n=t.value;t.modifiers.immediate&&n();const o=xn(n,300);e.addEventListener("scroll",o,!0)}function xn(e,t){var n=!1;return function(){n||(e.apply(this,arguments),n=!0,setTimeout((function(){n=!1}),t))}}const Mn={inserted:Vn};function In(e,t,n,i,a,s){const l=(0,o.resolveComponent)("DummyPage"),r=(0,o.resolveComponent)("DocumentPage"),c=(0,o.resolveDirective)("observe-visibility");return(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("div",null,[s.loadedPage?((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,page:s.loadedPage},null,8,["page"])):((0,o.openBlock)(),(0,o.createBlock)(l,{key:0,width:n.page.size[0],height:n.page.size[1]},null,8,["width","height"]))])),[[c,s.visibilityChanged]])}const On={name:"ScrollingPage",components:{DocumentPage:vn,DummyPage:wn},props:{page:{type:Object,required:!0},scrollTop:{type:Number,required:!0},clientHeight:{type:Number,required:!0}},data(){return{elementTop:0,elementHeight:0,previousFocusedAnnotation:null,previousY:null,pageBeingLoaded:!1,isScrolling:!1}},computed:{...(0,s.aH)("display",["pageChangedFromThumbnail","currentPage"]),...(0,s.aH)("document",["pages","documentAnnotationSelected","loading","annotationId"]),...(0,s.aH)("edit",["editMode"]),...(0,s.L8)("display",["visiblePageRange","bboxToRect"]),...(0,s.L8)("document",["scrollDocumentToAnnotation","annotationById"]),loadedPage(){if(this.editMode)return this.page;let e=null;return this.page&&this.pages&&(e=this.pages.find((e=>e.number===this.page.number))),!e&&this.pageInVisibleRange(this.page)&&(this.pageBeingLoaded||this.loadPage()),e},isElementFocused(){const{elementTop:e,bottom:t,elementHeight:n,scrollTop:o,clientHeight:i}=this;if(!n)return;const a=n/2,s=i/2,l=n>=s?s:a,r=o+l;return e<r&&t>=r},bottom(){return this.elementTop+this.elementHeight},scrollBottom(){return this.scrollTop+this.clientHeight},currentSearchResultForPage(){return this.$store.getters["display/currentSearchResultForPage"](this.page.number)},spanForAnnotationSelected(){if(this.annotationId){const e=this.annotationById(this.annotationId);if(e&&e.span&&e.span.length>0&&e.span[0].page_index+1===this.page.number)return e.span[0]}return null}},watch:{scrollTop:"updateElementBounds",clientHeight:"updateElementBounds",annotationId(){this.scrollDocumentToPosition(this.spanForAnnotationSelected)},scrollDocumentToAnnotation(e){e&&this.documentAnnotationSelected.page===this.page.number&&this.scrollDocumentToPosition(this.documentAnnotationSelected.span)},isElementFocused(e){this.loading||!e||this.pageChangedFromThumbnail||this.$store.dispatch("display/updateCurrentPage",this.page.number)},currentPage(e){this.page.number!==e||this.isElementFocused||this.$emit("page-jump",this.elementTop,0)},currentSearchResultForPage(e){if(!e)return;const t=this.getYForBbox(e),n=t+this.elementTop;n<this.scrollBottom&&n>this.scrollTop||this.$nextTick((function(){this.scrollTo(t)}))}},mounted(){this.updateElementBounds(),this.scrollDocumentToPosition(this.spanForAnnotationSelected)},methods:{loadPage(){this.pageBeingLoaded=!0,this.$store.dispatch("document/fetchDocumentPage",this.page.number).then((()=>{this.pageBeingLoaded=!1}))},visibilityChanged(e){!e||this.loadedPage||this.pageBeingLoaded||this.loadPage(),!e&&this.loadedPage&&this.$store.dispatch("document/unloadDocumentPage",this.page.number)},pageInVisibleRange(e){return this.currentPage===e.number||this.visiblePageRange.includes(e.number)},scrollDocumentToPosition(e){e&&this.$nextTick((()=>{this.scrollTo(this.getYForBbox(e)-100,this.getXForBbox(e))}))},updateElementBounds(){const{offsetTop:e,offsetHeight:t}=this.$el;this.elementTop=e,this.elementHeight=t},getYForBbox(e){return this.bboxToRect(this.page,e).y},getXForBbox(e){return this.bboxToRect(this.page,e).x},scrollTo(e,t){this.$emit("page-jump",this.elementTop+e-80,t)}}},Pn=(0,$.A)(On,[["render",In]]),$n=Pn,Rn={id:"toolbar-container"},Fn={class:"edit-icon icon"},Hn={class:"edit-text"},zn={key:0,class:"toolbar-divider"},Un={key:2,class:"download-file icons"},Zn={key:3,class:"toolbar-divider"},Gn={class:"icons icons-right"},Wn={id:"zoom-percentage",class:"percentage"};function qn(e,t,n,i,a,s){const l=(0,o.resolveComponent)("EditDocIcon"),r=(0,o.resolveComponent)("b-tooltip"),c=(0,o.resolveComponent)("b-icon"),d=(0,o.resolveComponent)("b-dropdown-item"),h=(0,o.resolveComponent)("b-dropdown"),u=(0,o.resolveComponent)("FitZoomIcon"),m=(0,o.resolveComponent)("PlusIcon"),p=(0,o.resolveComponent)("MinusIcon");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Rn,[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["toolbar",e.recalculatingAnnotations&&"hidden"])},[(0,o.createVNode)(r,{label:a.tooltipInfo,multilined:"",active:a.editModeDisabled,size:"is-large",class:"top-aligned"},{default:(0,o.withCtx)((()=>[e.isEditModeAvailable?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,id:"edit-mode-button",class:(0,o.normalizeClass)(["icons icons-left",a.editModeDisabled&&"edit-mode-disabled"]),onClick:t[0]||(t[0]=(...e)=>s.handleEdit&&s.handleEdit(...e))},[(0,o.createElementVNode)("div",Fn,[(0,o.createVNode)(l)]),(0,o.createElementVNode)("span",Hn,(0,o.toDisplayString)(e.$t("edit")),1)],2)):(0,o.createCommentVNode)("",!0)])),_:1},8,["label","active"]),e.isEditModeAvailable?((0,o.openBlock)(),(0,o.createElementBlock)("div",zn)):(0,o.createCommentVNode)("",!0),e.publicView||e.editMode?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:"search-document icons",onClick:t[1]||(t[1]=(...t)=>e.toggleSearch&&e.toggleSearch(...t))},[(0,o.createVNode)(c,{icon:"search",size:"is-small",class:"search-icon"})])),e.publicView?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Un,[(0,o.createVNode)(h,{"aria-role":"list",position:"is-top-right",scrollable:""},{trigger:(0,o.withCtx)((()=>[(0,o.createVNode)(c,{icon:"download",size:"is-small",class:"download-file"})])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(d,{class:"original-file","aria-role":"listitem",onClick:t[2]||(t[2]=e=>s.handleDownloadFile())},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("original_file")),1)])),_:1}),(0,o.createVNode)(d,{class:"ocr-file","aria-role":"listitem",onClick:t[3]||(t[3]=e=>s.handleDownloadFile("ocr"))},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("pdf_file")),1)])),_:1})])),_:1})])),e.publicView?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Zn)),(0,o.createElementVNode)("div",Gn,[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["fit-zoom","icon",50===a.currentPercentage&&"zoom-disabled"]),onClick:t[4]||(t[4]=(0,o.withModifiers)(((...e)=>s.fitAuto&&s.fitAuto(...e)),["prevent","stop"]))},[(0,o.createVNode)(u)],2),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["zoom-in icon",s.isZoomInExceeding&&"zoom-disabled"]),onClick:t[5]||(t[5]=(0,o.withModifiers)(((...e)=>s.zoomIn&&s.zoomIn(...e)),["prevent","stop"]))},[(0,o.createVNode)(m)],2),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["zoom-out icon",s.isZoomOutExceeding&&"zoom-disabled"]),onClick:t[6]||(t[6]=(0,o.withModifiers)(((...e)=>s.zoomOut&&s.zoomOut(...e)),["prevent","stop"]))},[(0,o.createVNode)(p)],2),(0,o.createElementVNode)("div",Wn,(0,o.toDisplayString)(`${a.currentPercentage}%`),1)])],2)])}const jn={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Kn(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",jn,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M2.66683 9.99935C2.29864 9.99935 2.00016 9.70087 2.00016 9.33268C2.00016 8.96449 2.29864 8.66602 2.66683 8.66602H6.66683C7.03502 8.66602 7.3335 8.96449 7.3335 9.33268V13.3327C7.3335 13.7009 7.03502 13.9994 6.66683 13.9994C6.29864 13.9994 6.00016 13.7009 6.00016 13.3327V10.9422L2.47157 14.4708C2.21122 14.7311 1.78911 14.7311 1.52876 14.4708C1.26841 14.2104 1.26841 13.7883 1.52876 13.5279L5.05735 9.99935H2.66683Z"},null,-1),(0,o.createElementVNode)("path",{d:"M13.3334 6.00065C13.7016 6.00065 14.0001 6.29913 14.0001 6.66732C14.0001 7.03551 13.7016 7.33398 13.3334 7.33398L9.33341 7.33398C8.96522 7.33398 8.66675 7.03551 8.66675 6.66732L8.66675 2.66732C8.66675 2.29913 8.96523 2.00065 9.33342 2.00065C9.7016 2.00065 10.0001 2.29913 10.0001 2.66732L10.0001 5.05784L13.5287 1.52925C13.789 1.2689 14.2111 1.2689 14.4715 1.52925C14.7318 1.78959 14.7318 2.21171 14.4715 2.47205L10.9429 6.00065L13.3334 6.00065Z"},null,-1)]))}const Yn={},Jn=(0,$.A)(Yn,[["render",Kn]]),Xn=Jn,Qn={width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function eo(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Qn,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M5.49935 0.667969C5.13116 0.667969 4.83268 0.966447 4.83268 1.33464V5.33463H0.832682C0.464492 5.33463 0.166016 5.63311 0.166016 6.0013C0.166016 6.36949 0.464493 6.66797 0.832682 6.66797H4.83268V10.668C4.83268 11.0362 5.13116 11.3346 5.49935 11.3346C5.86754 11.3346 6.16602 11.0362 6.16602 10.668V6.66797H10.166C10.5342 6.66797 10.8327 6.36949 10.8327 6.0013C10.8327 5.63311 10.5342 5.33463 10.166 5.33463H6.16602V1.33464C6.16602 0.966446 5.86754 0.667969 5.49935 0.667969Z"},null,-1)]))}const to={},no=(0,$.A)(to,[["render",eo]]),oo=no,io={width:"11",height:"2",viewBox:"0 0 11 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ao(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",io,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M0.834635 1.66536C0.466446 1.66536 0.167969 1.36689 0.167969 0.998698C0.167969 0.630508 0.466445 0.332031 0.834635 0.332031H10.168C10.5362 0.332031 10.8346 0.630508 10.8346 0.998698C10.8346 1.36689 10.5362 1.66536 10.168 1.66536H0.834635Z"},null,-1)]))}const so={},lo=(0,$.A)(so,[["render",ao]]),ro=lo,co={xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24"};function ho(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",co,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M20.71,16.71l-2.42-2.42a1,1,0,0,0-1.42,0l-3.58,3.58a1,1,0,0,0-.29.71V21a1,1,0,0,0,1,1h2.42a1,1,0,0,0,.71-.29l3.58-3.58A1,1,0,0,0,20.71,16.71ZM16,20H15V19l2.58-2.58,1,1Zm-6,0H6a1,1,0,0,1-1-1V5A1,1,0,0,1,6,4h5V7a3,3,0,0,0,3,3h3v1a1,1,0,0,0,2,0V9s0,0,0-.06a1.31,1.31,0,0,0-.06-.27l0-.09a1.07,1.07,0,0,0-.19-.28h0l-6-6h0a1.07,1.07,0,0,0-.28-.19.32.32,0,0,0-.09,0L12.06,2H6A3,3,0,0,0,3,5V19a3,3,0,0,0,3,3h4a1,1,0,0,0,0-2ZM13,5.41,15.59,8H14a1,1,0,0,1-1-1ZM8,14h6a1,1,0,0,0,0-2H8a1,1,0,0,0,0,2Zm0-4H9A1,1,0,0,0,9,8H8a1,1,0,0,0,0,2Zm2,6H8a1,1,0,0,0,0,2h2a1,1,0,0,0,0-2Z"},null,-1)]))}const uo={},mo=(0,$.A)(uo,[["render",ho]]),po=mo,go={name:"DocumentToolbar",components:{FitZoomIcon:Xn,PlusIcon:oo,MinusIcon:ro,EditDocIcon:po},data(){return{currentPercentage:100,fitWidthScale:1,maxPercentage:500,defaultPercentage:.25,fitPercentage:.5,toolbarModalOpen:!0,editModeDisabled:!1,tooltipInfo:null}},computed:{...(0,s.aH)("display",["scale"]),...(0,s.aH)("edit",["editMode"]),...(0,s.L8)("edit",["isEditModeAvailable"]),...(0,s.aH)("document",["selectedDocument","recalculatingAnnotations","publicView"]),...(0,s.L8)("document",["documentCannotBeEdited"]),isZoomInExceeding(){return this.currentPercentage===this.maxPercentage},isZoomOutExceeding(){return this.currentPercentage===100*this.defaultPercentage}},watch:{selectedDocument(e){this.documentCannotBeEdited(e)&&(this.editModeDisabled=!0)},scale(e){this.fitWidthScale>0?this.currentPercentage=Math.round(e/this.fitWidthScale*100):this.currentPercentage=Math.round(100*e)}},mounted(){this.selectedDocument&&this.documentCannotBeEdited(this.selectedDocument)&&(this.editModeDisabled=!0)},updated(){this.selectedDocument.is_reviewed?this.tooltipInfo=this.$t("document_reviewed"):this.tooltipInfo=this.$t("edit_not_available")},methods:{...(0,s.i0)("display",["toggleSearch"]),handleEdit(){this.editModeDisabled||(this.$store.dispatch("selection/disableSelection"),this.$store.dispatch("edit/enableEditMode"))},zoomIn(){this.currentPercentage!==this.maxPercentage&&(this.cancelAnnotationEditMode(),this.currentPercentage+=100*this.defaultPercentage,this.updateScale(this.scale+this.defaultPercentage))},zoomOut(){this.currentPercentage!==100*this.defaultPercentage&&(this.cancelAnnotationEditMode(),this.currentPercentage-=100*this.defaultPercentage,this.updateScale(this.scale-this.defaultPercentage))},fitAuto(){this.cancelAnnotationEditMode(),this.$store.dispatch("display/updateFit","all").then((()=>{this.$nextTick((()=>{this.fitWidthScale=this.scale,this.currentPercentage=100}))}))},updateScale(e){this.$store.dispatch("display/updateFit","custom").then((()=>{this.$store.dispatch("display/updateScale",{scale:e})}))},handleDownloadFile(e){let t,n=this.selectedDocument.data_file_name;return"ocr"===e?(t=this.selectedDocument.file_url,n=`${e}_${n}`):t=`/doc/show-original/${this.selectedDocument.id}/`,Ae.makeFileRequest(t).then((e=>{const t=URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.setAttribute("download",n),o.click(),URL.revokeObjectURL(o.href)})).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("error_downloading_file")}),console.log(e)}))},cancelAnnotationEditMode(){this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection")}}},Co=(0,$.A)(go,[["render",qn],["__scopeId","data-v-0ef4bf7c"]]),_o=Co,bo={id:"document-search"},Eo={class:"search-container"},So=["placeholder"],fo={key:0,class:"search-loading"},vo={key:1,class:"search-no-results"},Ao={key:2,class:"search-navigation"},ko={key:0,class:"search-counters"},No={key:1,class:"search-counters"},wo={class:"search-close"};function yo(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-button");return(0,o.openBlock)(),(0,o.createElementBlock)("div",bo,[(0,o.createElementVNode)("div",Eo,[(0,o.withDirectives)((0,o.createElementVNode)("input",{ref:"searchInput","onUpdate:modelValue":t[0]||(t[0]=e=>a.search=e),placeholder:e.$t("search"),class:"search-input",onKeyup:t[1]||(t[1]=(0,o.withKeys)((e=>s.focusSearchResult(1)),["13"]))},null,40,So),[[o.vModelText,a.search]]),e.searchLoading?((0,o.openBlock)(),(0,o.createElementBlock)("div",fo,[(0,o.createVNode)(l,{icon:"spinner",class:"fa-spin loading-icon-size spinner"})])):0===e.searchResults.length&&a.search.length>=a.minSearchLength?((0,o.openBlock)(),(0,o.createElementBlock)("div",vo,(0,o.toDisplayString)(e.$t("no_results")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("div",Ao,[s.searchBelowMinimum?((0,o.openBlock)(),(0,o.createElementBlock)("span",ko,(0,o.toDisplayString)(e.$t("search_below_minimum")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("span",No,(0,o.toDisplayString)(s.currentCounter)+"/"+(0,o.toDisplayString)(e.searchResults.length),1)),s.searchBelowMinimum?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(r,{key:2,class:"is-ghost is-small next-search",disabled:!e.searchResults.length||e.searchResults.length<=1,onClick:t[2]||(t[2]=e=>s.focusSearchResult(1))},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"angle-down",class:"is-small"})])),_:1},8,["disabled"])),s.searchBelowMinimum?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(r,{key:3,class:"is-ghost is-small previous-search",disabled:!e.searchResults.length||e.searchResults.length<=1,onClick:t[3]||(t[3]=e=>s.focusSearchResult(-1))},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"angle-up",class:"is-small"})])),_:1},8,["disabled"]))])),(0,o.createElementVNode)("div",wo,[(0,o.createVNode)(r,{class:"is-ghost is-small",onClick:s.closeSearch},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"xmark",class:"is-small"})])),_:1},8,["onClick"])])])])}const To={name:"SearchBar",data(){return{search:"",minSearchLength:3}},computed:{...(0,s.aH)("display",["currentSearchResult","currentSearch","searchEnabled","searchResults","searchLoading"]),searchBelowMinimum(){return this.search&&this.search.length>0&&this.search.length<this.minSearchLength},currentCounter(){return null!=this.currentSearchResult&&this.searchResults.length>0?this.currentSearchResult+1:0}},watch:{search(e){this.$store.dispatch("display/setCurrentSearch",e),e.length>=this.minSearchLength&&this.$store.dispatch("display/startSearchLoading"),this.$store.dispatch("display/debounceSearch",e)},currentSearch(e){this.search!==e&&(this.search=e)},searchEnabled(e){e&&this.$nextTick((()=>{this.$refs.searchInput.focus()}))}},mounted(){this.currentSearch!==this.search&&(this.search=this.currentSearch)},methods:{focusSearchResult(e){this.$store.dispatch("display/setCurrentSearchResult",e)},closeSearch(){this.$store.dispatch("display/resetSearch"),this.$store.dispatch("display/toggleSearch")}}},Bo=(0,$.A)(To,[["render",yo],["__scopeId","data-v-4a901e3d"]]),Do=Bo,Lo={components:{ScrollingPage:$n,Toolbar:_o,SearchBar:Do},directives:{scroll:Mn},data(){return{scrollTop:0,clientHeight:0,scrollTimeout:null}},computed:{...(0,s.aH)("document",["recalculatingAnnotations","selectedDocument","loading","annotationSets"]),...(0,s.aH)("edit",["editMode","documentPagesListForEditMode","pagesForPostprocess"]),...(0,s.aH)("display",["scale","pageChangedFromThumbnail","currentPage","searchEnabled"]),...(0,s.L8)("display",["visiblePageRange"]),pages(){return this.selectedDocument?this.selectedDocument.pages:[]},showToolbar(){return!this.loading&&this.pages.length>0&&this.scale}},watch:{loading(){this.scrollTop=0}},mounted(){this.$refs.scrollingDocument.addEventListener("scroll",this.handleScroll)},methods:{updateScrollBounds(){const{scrollTop:e,clientHeight:t}=this.$refs.scrollingDocument;this.scrollTop=e,this.clientHeight=t},onPageJump(e,t){const n=e-(this.$refs.scrollingDocument.offsetTop+4),o=t-this.$refs.scrollingDocument.offsetLeft-4;this.$refs.scrollingDocument.scroll(o,n)},handleScroll(){this.updateScrollBounds(),1!==this.pages.length&&(this.isScrolling=!0,clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout((()=>{this.isScrolling=!1,this.pageChangedFromThumbnail&&this.visiblePageRange[1]===this.currentPage&&this.$store.dispatch("display/setPageChangedFromThumbnail",!1)}),300))}}},Vo=(0,$.A)(Lo,[["render",Ln],["__scopeId","data-v-0f38cc3c"]]),xo=Vo,Mo={id:"document-pages",ref:"documentThumbnails"},Io={key:0,ref:"docPage"},Oo=["onClick"],Po={class:"image-section"},$o={class:"image-container"},Ro={class:"number-thumbnail"},Fo={key:1,class:"document-thumbnail-loading"},Ho={class:"document-thumbnail"},zo={class:"image-section"},Uo={class:"image-container"};function Zo(e,t,n,i,a,s){const l=(0,o.resolveComponent)("LoadingThumbnail"),r=(0,o.resolveComponent)("ServerImage");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Mo,[e.selectedDocument?((0,o.openBlock)(),(0,o.createElementBlock)("div",Io,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.selectedDocument.pages,(t=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:t.id,class:(0,o.normalizeClass)(["document-thumbnail",e.currentPage==t.number&&"selected"]),onClick:e=>s.changePage(t.number)},[(0,o.createElementVNode)("div",Po,[(0,o.createElementVNode)("div",$o,[e.loading||e.recalculatingAnnotations?((0,o.openBlock)(),(0,o.createBlock)(l,{key:1})):((0,o.openBlock)(),(0,o.createBlock)(r,{key:0,class:(0,o.normalizeClass)(["img-thumbnail",e.currentPage==t.number&&"selected"]),width:"40px","image-url":`${t.thumbnail_url}?${e.selectedDocument.downloaded_at}`},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l)])),_:2},1032,["class","image-url"]))])]),(0,o.createElementVNode)("div",Ro,(0,o.toDisplayString)(t.number),1)],10,Oo)))),128))],512)):((0,o.openBlock)(),(0,o.createElementBlock)("div",Fo,[(0,o.createElementVNode)("div",Ho,[(0,o.createElementVNode)("div",zo,[(0,o.createElementVNode)("div",Uo,[(0,o.createVNode)(l)])])])]))],512)}const Go={class:"loading-thumbnail"};function Wo(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Go,[(0,o.createVNode)(l,{width:"40px",height:"57px"})])}const qo={name:"LoadingThumbnail"},jo=(0,$.A)(qo,[["render",Wo],["__scopeId","data-v-714f8116"]]),Ko=jo,Yo={name:"DocumentThumbnails",components:{ServerImage:we,LoadingThumbnail:Ko},data(){return{thumbnailClicked:null,previousScrollPosition:0}},computed:{...(0,s.aH)("document",["selectedDocument","recalculatingAnnotations","loading"]),...(0,s.aH)("display",["currentPage"])},watch:{currentPage(e){e&&e!=this.thumbnailClicked&&this.scrollToThumbnail(e)}},methods:{changePage(e){this.thumbnailClicked=e,this.loading||this.recalculatingAnnotations||e==this.currentPage||(this.$store.dispatch("display/setPageChangedFromThumbnail",!0),this.$store.dispatch("display/updateCurrentPage",e))},scrollToThumbnail(e){this.thumbnailClicked=null,this.$refs.docPage.children[e-1].scrollIntoView({behavior:"smooth"})}}},Jo=(0,$.A)(Yo,[["render",Zo],["__scopeId","data-v-b21f512c"]]),Xo=Jo,Qo={key:0,class:"extracting-data"},ei={key:1,class:"document-annotations-loading"},ti={key:2,class:"empty-annotation-sets"},ni={key:3,ref:"annotationList",class:"annotation-set-list"},oi={key:1,class:"empty-annotation-sets"},ii={key:2,class:"annotation-sets-accordions"},ai=["onClick"],si={class:"label-set-name"},li={key:0,class:"labelset-action-buttons"},ri={key:0,class:"annotation-sets-list"},ci={key:0,class:"labels"},di={key:1,class:"no-labels"},hi=["innerHTML"],ui={key:2,class:"no-labels"};function mi(e,t,n,i,a,s){const l=(0,o.resolveComponent)("ExtractingData"),r=(0,o.resolveComponent)("LoadingAnnotations"),c=(0,o.resolveComponent)("EmptyState"),d=(0,o.resolveComponent)("AnnotationFilters"),h=(0,o.resolveComponent)("b-icon"),u=(0,o.resolveComponent)("AnnotationSetActionButtons"),m=(0,o.resolveComponent)("DocumentLabel"),p=(0,o.resolveComponent)("b-collapse");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{id:"document-annotations",onClick:t[2]||(t[2]=(...e)=>s.cleanSelection&&s.cleanSelection(...e))},[e.recalculatingAnnotations?((0,o.openBlock)(),(0,o.createElementBlock)("div",Qo,[(0,o.createVNode)(l)])):!e.getAnnotationsFiltered.annotationSets||e.loading?((0,o.openBlock)(),(0,o.createElementBlock)("div",ei,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(a.numberOfLoadingAnnotations,(e=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:e,class:"loading-annotation-set"},[(0,o.createVNode)(r)])))),128))])):0!==e.getAnnotationsFiltered.annotationSets.length||e.isSearchingAnnotationList?((0,o.openBlock)(),(0,o.createElementBlock)("div",ni,[s.isDocumentEditable?((0,o.openBlock)(),(0,o.createBlock)(d,{key:0,onOpenAll:s.openAllAccordions},null,8,["onOpenAll"])):(0,o.createCommentVNode)("",!0),0===e.getAnnotationsFiltered.annotationSets.length&&e.isSearchingAnnotationList?((0,o.openBlock)(),(0,o.createElementBlock)("div",oi,[(0,o.createVNode)(c,{"is-search":!0})])):(0,o.createCommentVNode)("",!0),a.annotationSetsAccordion?((0,o.openBlock)(),(0,o.createElementBlock)("div",ii,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.getAnnotationsFiltered.annotationSets,((n,i)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:i,class:(0,o.normalizeClass)(["annotation-set-group",0===i&&"no-top-margin",!s.isAccordionOpen(n)&&"annotation-set-collapsed"])},[(0,o.createElementVNode)("div",{class:"label-set-header",onClick:e=>s.toggleAccordion(n)},[(0,o.createElementVNode)("div",si,[(0,o.createVNode)(h,{icon:s.isAccordionOpen(n)?"angle-up":"angle-down",size:"is-12"},null,8,["icon"]),(0,o.createTextVNode)(" "+(0,o.toDisplayString)(`${n.label_set.name} ${e.numberOfAnnotationSetGroup(n)}`),1)]),e.publicView||e.isDocumentReviewed||0===n.labels.length?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",li,[(0,o.createVNode)(u,{"is-placeholder":!s.isAccordionOpen(n),"number-of-empty-labels-in-annotation-set":e.emptyLabels(n).length,"number-of-not-correct-annotations-in-annotation-set":e.notCorrectAnnotations(n).length,onMarkAllEmptyMissing:e=>s.markAnnotationsAsMissing(null,null,n,!0),onHoverAnnotationSetToMarkMissing:e=>s.handleHoverAnnotationSet(n,"missing"),onLeaveAnnotationSetToMarkMissing:t[0]||(t[0]=e=>s.handleHoverAnnotationSet(null)),onAcceptAllPendingAnnotations:e=>s.acceptPendingAnnotationsInAnnotationSet(n),onHoverAnnotationSetToAccept:e=>s.handleHoverAnnotationSet(n,"accept"),onLeaveAnnotationSetToAccept:t[1]||(t[1]=e=>s.handleHoverAnnotationSet(null))},null,8,["is-placeholder","number-of-empty-labels-in-annotation-set","number-of-not-correct-annotations-in-annotation-set","onMarkAllEmptyMissing","onHoverAnnotationSetToMarkMissing","onAcceptAllPendingAnnotations","onHoverAnnotationSetToAccept"])]))],8,ai),(0,o.createVNode)(p,{"model-value":s.isAccordionOpen(n),animation:"slide"},{default:(0,o.withCtx)((()=>[n.labels.length>0?((0,o.openBlock)(),(0,o.createElementBlock)("div",ri,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(n.labels,(t=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:t.id},[0===t.annotations.length&&e.publicView?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",ci,[(0,o.createVNode)(m,{label:t,"annotation-set":n,"label-set":n.label_set,"index-group":i,onHandleMissingAnnotation:s.markAnnotationsAsMissing},null,8,["label","annotation-set","label-set","index-group","onHandleMissingAnnotation"])]))])))),128))])):0===n.labels.length?((0,o.openBlock)(),(0,o.createElementBlock)("div",di,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.isSearchingAnnotationList?e.$t("no_results"):e.$t("no_labels_in_set")),1),e.showBranding&&s.isDocumentEditable&&!e.isSearchingAnnotationList?((0,o.openBlock)(),(0,o.createElementBlock)("span",{key:0,innerHTML:e.$t("link_to_add_labels")},null,8,hi)):(0,o.createCommentVNode)("",!0)])):!s.annotationSetHasAnnotations(n)&&e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("div",ui,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("no_annotations_in_annotation_set")),1)])):(0,o.createCommentVNode)("",!0)])),_:2},1032,["model-value"])],2)))),128))])):(0,o.createCommentVNode)("",!0)],512)):((0,o.openBlock)(),(0,o.createElementBlock)("div",ti,[(0,o.createVNode)(c)]))])}const pi={class:"empty-container"},gi={class:"empty-text"},Ci={class:"title"},_i={key:0,class:"description"};function bi(e,t,n,i,a,s){const l=(0,o.resolveComponent)("EmptyStateImg");return(0,o.openBlock)(),(0,o.createElementBlock)("div",pi,[(0,o.createVNode)(l),(0,o.createElementVNode)("div",gi,[(0,o.createElementVNode)("p",Ci,(0,o.toDisplayString)(e.$t("no_label_sets_found")),1),n.isSearch?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("p",_i,(0,o.toDisplayString)(e.$t("no_label_sets_found_description")),1))])])}const Ei={width:"122",height:"165",viewBox:"0 0 122 165",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Si(e,t,n,i,a,s){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Ei,t[0]||(t[0]=[(0,o.createStaticVNode)('<circle cx="61" cy="61" r="61" fill="#F7F7F7"></circle><g filter="url(#filter0_d_2720_20884)"><rect x="22" y="29" width="77.8605" height="108" rx="4" fill="white"></rect></g><rect opacity="0.7" x="32.0449" y="41.584" width="18.8372" height="6.27907" rx="2" stroke="#BFBFBF" stroke-linecap="round" stroke-dasharray="3 2"></rect><rect opacity="0.7" x="32.0449" y="59.3965" width="57.7674" height="6.27907" rx="2" stroke="#BFBFBF" stroke-linecap="round" stroke-dasharray="3 2"></rect><rect opacity="0.7" x="32.0449" y="71.2109" width="57.7674" height="6.27907" rx="2" stroke="#BFBFBF" stroke-linecap="round" stroke-dasharray="3 2"></rect><rect opacity="0.7" x="32.0449" y="83.0254" width="57.7674" height="6.27907" rx="2" stroke="#BFBFBF" stroke-linecap="round" stroke-dasharray="3 2"></rect><rect opacity="0.7" x="32" y="97" width="58" height="28" rx="2" stroke="#BFBFBF" stroke-linecap="round" stroke-dasharray="3 2"></rect><defs><filter id="filter0_d_2720_20884" x="2" y="17" width="117.86" height="148" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="8"></feOffset><feGaussianBlur stdDeviation="10"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.07 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2720_20884"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2720_20884" result="shape"></feBlend></filter></defs>',8)]))}const fi={name:"EmptyStateImg"},vi=(0,$.A)(fi,[["render",Si]]),Ai=vi,ki={name:"EmptyState",components:{EmptyStateImg:Ai},props:{isSearch:{type:Boolean,required:!1,default:!1}}},Ni=(0,$.A)(ki,[["render",bi],["__scopeId","data-v-f6b38116"]]),wi=Ni,yi={class:"data-extraction-container"},Ti={class:"loading-container"},Bi={class:"data-extraction-text"},Di={class:"title"},Li={key:0},Vi={key:1},xi={class:"description"},Mi={key:0},Ii={key:1};function Oi(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon");return(0,o.openBlock)(),(0,o.createElementBlock)("div",yi,[(0,o.createElementVNode)("div",Ti,[(0,o.createVNode)(l,{icon:"spinner",class:"fa-spin spinner-icon"})]),(0,o.createElementVNode)("div",Bi,[(0,o.createElementVNode)("p",Di,[e.redirectingUser?((0,o.openBlock)(),(0,o.createElementBlock)("span",Li,(0,o.toDisplayString)(e.$t("wait_title")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("span",Vi,(0,o.toDisplayString)(e.$t("data_being_extracted")),1))]),(0,o.createElementVNode)("div",xi,[e.redirectingUser?((0,o.openBlock)(),(0,o.createElementBlock)("span",Mi,[(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("redirecting_to_documents_list")),1)])):((0,o.openBlock)(),(0,o.createElementBlock)("span",Ii,[(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("analysing_document")),1),(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("few_minutes")),1)]))])])])}const Pi={name:"ExtractingData",computed:{...(0,s.aH)("edit",["redirectingUser"])}},$i=(0,$.A)(Pi,[["render",Oi],["__scopeId","data-v-22a5db6f"]]),Ri=$i,Fi={class:"action-buttons"};function Hi(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Fi,[(0,o.createElementVNode)("div",{class:"missing-button-container all-missing",onMouseenter:t[0]||(t[0]=e=>s.mouseenterAnnotationSet("missing")),onMouseleave:t[1]||(t[1]=(...e)=>s.mouseleaveAnnotationSet&&s.mouseleaveAnnotationSet(...e))},[(0,o.createVNode)(l,{type:"is-ghost",class:"button-action is-button-text-ghost",disabled:0===n.numberOfEmptyLabelsInAnnotationSet,onClick:s.markAllAsMissing},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(n.isPlaceholder?e.$t("missing_counter"):e.$t("mark_all_missing"))+" ("+(0,o.toDisplayString)(n.numberOfEmptyLabelsInAnnotationSet)+") ",1)])),_:1},8,["disabled","onClick"])],32),(0,o.createElementVNode)("div",{class:"accept-all",onMouseenter:t[2]||(t[2]=e=>s.mouseenterAnnotationSet("accept")),onMouseleave:t[3]||(t[3]=(...e)=>s.mouseleaveAnnotationSet&&s.mouseleaveAnnotationSet(...e))},[(0,o.createVNode)(l,{type:"is-ghost",class:"button-action is-button-text-ghost accept-all-icon",disabled:0===n.numberOfNotCorrectAnnotationsInAnnotationSet,onClick:s.acceptAllPending},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(n.isPlaceholder?e.$t("pending_counter"):e.$t("accept_group"))+" ("+(0,o.toDisplayString)(n.numberOfNotCorrectAnnotationsInAnnotationSet)+") ",1)])),_:1},8,["disabled","onClick"])],32)])}const zi={name:"AnnotationSetActionButtons",props:{isPlaceholder:{type:Boolean,default:!1},numberOfEmptyLabelsInAnnotationSet:{type:Number,default:0},numberOfNotCorrectAnnotationsInAnnotationSet:{type:Number,default:0}},computed:{...(0,s.aH)("document",["publicView"]),...(0,s.L8)("document",["isDocumentReviewed"])},methods:{mouseenterAnnotationSet(e){"missing"==e&&this.$emit("hover-annotation-set-to-mark-missing"),"accept"==e&&this.$emit("hover-annotation-set-to-accept")},mouseleaveAnnotationSet(){this.$emit("leave-annotation-set-to-accept"),this.$emit("leave-annotation-set-to-mark-missing")},markAllAsMissing(e){this.isPlaceholder||(e.stopPropagation(),this.$emit("mark-all-empty-missing"))},acceptAllPending(e){this.isPlaceholder||(e.stopPropagation(),this.$emit("accept-all-pending-annotations"))}}},Ui=(0,$.A)(zi,[["render",Hi],["__scopeId","data-v-24255449"]]),Zi=Ui,Gi={class:"label"},Wi={key:0},qi={key:1},ji={key:2};function Ki(e,t,n,i,a,s){const l=(0,o.resolveComponent)("AnnotationRow");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Gi,[n.annotationSet&&s.annotationsToShow().length>0?((0,o.openBlock)(),(0,o.createElementBlock)("div",Wi,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(s.annotationsToShow(),((e,t)=>((0,o.openBlock)(),(0,o.createBlock)(l,{key:t,annotation:e,label:n.label,"annotation-set":n.annotationSet,"label-set":n.annotationSet.label_set},null,8,["annotation","label","annotation-set","label-set"])))),128))])):n.annotationSet?((0,o.openBlock)(),(0,o.createElementBlock)("div",qi,[(0,o.createVNode)(l,{label:n.label,"annotation-set":n.annotationSet,"label-set":n.annotationSet.label_set},null,8,["label","annotation-set","label-set"])])):n.labelSet?((0,o.openBlock)(),(0,o.createElementBlock)("div",ji,[(0,o.createVNode)(l,{label:n.label,"label-set":n.labelSet},null,8,["label","label-set"])])):(0,o.createCommentVNode)("",!0)])}const Yi={class:"annotations-width-slider"},Ji={class:"annotation-icon"},Xi={class:"icon"},Qi={class:"translation-details"},ea={class:"translation-title"},ta={class:"translation-info"},na={key:0,class:"annotation-details-link"},oa={class:"annotation-content"},ia={key:0},aa={key:1,class:"annotation-items"},sa={class:"annotation-spans"},la=["onMouseenter"],ra={key:2},ca={key:0};function da(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-slider"),r=(0,o.resolveComponent)("AnnotationDetails"),c=(0,o.resolveComponent)("TranslateArrows"),d=(0,o.resolveComponent)("b-tooltip"),h=(0,o.resolveComponent)("b-icon"),u=(0,o.resolveComponent)("b-checkbox"),m=(0,o.resolveComponent)("AnnotationContent"),p=(0,o.resolveComponent)("EmptyAnnotation"),g=(0,o.resolveComponent)("AnnotationActionButtons");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(["annotation-row",a.isSelected&&"selected",s.hoverEmptyLabelRows&&"hovered-empty-labels",s.hoverPendingAnnotationRows&&"hovered-pending-annotations",e.annotationIsNotFound(n.annotationSet,n.label)&&"missing",e.isAnnotationInEditMode(s.currentAnnotationId())&&"editing",e.publicView&&"clickable-cursor"]),onClick:t[8]||(t[8]=(...e)=>s.onAnnotationClick&&s.onAnnotationClick(...e)),onMouseover:t[9]||(t[9]=e=>a.hoveredAnnotation=s.currentAnnotationId()),onMouseleave:t[10]||(t[10]=e=>a.hoveredAnnotation=null)},[(0,o.createElementVNode)("div",Yi,[(0,o.createVNode)(l,{modelValue:a.labelContainerWidth,"onUpdate:modelValue":t[0]||(t[0]=e=>a.labelContainerWidth=e),type:"is-move",min:20,max:80,"custom-formatter":t=>`${e.$t("label_size")} ${t}%`,class:"is-full-height show-hover show-line",disabled:e.isAnnotationInEditMode()},null,8,["modelValue","custom-formatter","disabled"])]),(0,o.createElementVNode)("div",{class:"annotation-row-left",style:(0,o.normalizeStyle)(`width:${e.labelWidth}%`),onMouseenter:t[3]||(t[3]=e=>s.onAnnotationHoverEnter(s.defaultSpan)),onMouseleave:t[4]||(t[4]=(...e)=>s.onAnnotationHoverLeave&&s.onAnnotationHoverLeave(...e))},[(0,o.createElementVNode)("div",Ji,[(0,o.createVNode)(r,{description:n.label.description,annotation:n.annotation,"annotation-set":n.annotationSet,label:n.label},null,8,["description","annotation","annotation-set","label"])]),n.showLabel?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["label-name",e.annotationIsNotFound(n.annotationSet,n.label)&&"not-found-text"])},[(0,o.createElementVNode)("span",{onClick:t[1]||(t[1]=(...e)=>s.selectAnnotation&&s.selectAnnotation(...e))},(0,o.toDisplayString)(n.label.name),1)],2)):(0,o.createCommentVNode)("",!0),e.showAnnotationTranslations&&n.annotation&&n.annotation.translated_string?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(["annotation-translation",!e.isDocumentReviewed&&"pointer"]),onClick:t[2]||(t[2]=e=>s.editAnnotationTranslation(n.annotation.id))},[(0,o.createVNode)(d,{animated:!1,position:"is-bottom"},{content:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",Qi,[(0,o.createElementVNode)("div",ea,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("translated_string_title")),1),(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(["translated-string",!n.annotation.translated_string&&"no-translation"])},(0,o.toDisplayString)(n.annotation.translated_string?n.annotation.translated_string:e.$t("no_translated_string")),3)])]),(0,o.createElementVNode)("div",ta,[e.isDocumentReviewed?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",na,(0,o.toDisplayString)(n.annotation.translated_string?e.$t("edit_translation"):e.$t("add_translation")),1))])])),default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",Xi,[(0,o.createVNode)(c,{translation:n.annotation.translated_string},null,8,["translation"])])])),_:1})],2)):(0,o.createCommentVNode)("",!0)],36),(0,o.createElementVNode)("div",{class:"annotation-row-right",style:(0,o.normalizeStyle)(`width:${e.annotationWidth}%`)},[(0,o.createElementVNode)("div",oa,[e.isAnnotationInEditMode(s.currentAnnotationId())&&e.spanLoading?((0,o.openBlock)(),(0,o.createElementBlock)("div",ia,[(0,o.createVNode)(h,{style:{width:"16px"},icon:"spinner",class:"fa-spin"})])):n.annotation?((0,o.openBlock)(),(0,o.createElementBlock)("div",aa,[n.annotation.metadata&&n.annotation.metadata.checkbox?((0,o.openBlock)(),(0,o.createBlock)(u,{key:0,modelValue:a.isChecked,"onUpdate:modelValue":t[5]||(t[5]=e=>a.isChecked=e),class:"annotation-checkbox"},null,8,["modelValue"])):(0,o.createCommentVNode)("",!0),(0,o.createElementVNode)("div",sa,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(s.spanForEditing?e.spanSelection:n.annotation.span,((e,i)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:i,onMouseenter:t=>s.onAnnotationHoverEnter(e),onMouseleave:t[6]||(t[6]=(...e)=>s.onAnnotationHoverLeave&&s.onAnnotationHoverLeave(...e))},[(0,o.createVNode)(m,{ref_for:!0,ref:`span_${n.annotation.id}_${i}`,annotation:n.annotation,span:e,"span-index":i,label:n.label,"annotation-set":n.annotationSet,"is-hovered":a.hoveredAnnotation,onSaveAnnotationChanges:s.handleSaveChanges},null,8,["annotation","span","span-index","label","annotation-set","is-hovered","onSaveAnnotationChanges"])],40,la)))),128))])])):((0,o.openBlock)(),(0,o.createElementBlock)("div",ra,[e.spanSelection.length>0&&e.isAnnotationInEditMode(s.currentAnnotationId())?((0,o.openBlock)(),(0,o.createElementBlock)("div",ca,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.spanSelection,((t,i)=>((0,o.openBlock)(),(0,o.createBlock)(p,{key:i,span:t,"span-index":i,label:n.label,"annotation-set":n.annotationSet,"label-set":n.labelSet,"is-hovered":a.hoveredAnnotation,"is-missing-annotation":e.annotationIsNotFound(n.annotationSet,n.label),onSaveEmptyAnnotationChanges:s.saveEmptyAnnotationChanges},null,8,["span","span-index","label","annotation-set","label-set","is-hovered","is-missing-annotation","onSaveEmptyAnnotationChanges"])))),128))])):((0,o.openBlock)(),(0,o.createBlock)(p,{key:1,label:n.label,"annotation-set":n.annotationSet,"label-set":n.labelSet,"is-hovered":a.hoveredAnnotation,"is-missing-annotation":e.annotationIsNotFound(n.annotationSet,n.label),onSaveEmptyAnnotationChanges:s.saveEmptyAnnotationChanges},null,8,["label","annotation-set","label-set","is-hovered","is-missing-annotation","onSaveEmptyAnnotationChanges"]))]))]),s.showAnnotationActions()?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)("buttons-container "+(e.isAnnotationInEditMode(s.currentAnnotationId())?"is-ann-editing":""))},[(0,o.createVNode)(g,{annotation:n.annotation,label:n.label,"show-cancel":s.showCancelButton(),"show-accept":s.showAcceptButton(),"show-decline":s.showDeclineButton(),"show-missing":s.showMissingButton(),"show-search":s.showMissingButton(),"show-save":s.showSaveButton(),"show-restore":s.showRestoreButton(),"show-link":s.showLinkButton(),"is-loading":a.isLoading,onMarkAsMissing:s.handleMissingAnnotation,onSave:s.handleSaveChanges,onAccept:s.handleSaveChanges,onDecline:t[7]||(t[7]=e=>s.handleSaveChanges(!0)),onCancel:s.handleCancelButton,onRestore:s.handleRestore,onSearch:s.searchLabelInDocument,onLink:s.copyAnnotationLink},null,8,["annotation","label","show-cancel","show-accept","show-decline","show-missing","show-search","show-save","show-restore","show-link","is-loading","onMarkAsMissing","onSave","onAccept","onCancel","onRestore","onSearch","onLink"])],2)):(0,o.createCommentVNode)("",!0)],4)],34)}const ha={class:(0,o.normalizeClass)(["label-icon"])},ua={key:0},ma={key:3},pa={class:"label-details"},ga={key:0,class:"label-description"},Ca={key:1,class:"label-description"},_a={key:3,class:"revision"},ba={class:"detail-icons"},Ea={key:0},Sa={key:2};function fa(e,t,n,i,a,s){const l=(0,o.resolveComponent)("AcceptedUser"),r=(0,o.resolveComponent)("NotFoundIcon"),c=(0,o.resolveComponent)("QuestionMark"),d=(0,o.resolveComponent)("AcceptedCheckMark"),h=(0,o.resolveComponent)("CheckMark"),u=(0,o.resolveComponent)("b-icon"),m=(0,o.resolveComponent)("b-tooltip");return(0,o.openBlock)(),(0,o.createElementBlock)("div",null,[(0,o.createVNode)(m,{animated:!1,position:"is-bottom",class:(0,o.normalizeClass)(["left-aligned","annotation-details"])},{content:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",pa,[n.annotation&&n.annotation.metadata&&n.annotation.metadata.checkbox?((0,o.openBlock)(),(0,o.createElementBlock)("div",ga,[(0,o.createVNode)(u,{size:"is-small",icon:"square-check"}),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("checkbox_ann_details")),1)])):(0,o.createCommentVNode)("",!0),n.description?((0,o.openBlock)(),(0,o.createElementBlock)("div",Ca,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(n.description),1)])):(0,o.createCommentVNode)("",!0),e.confidence(n.annotation)?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:2,id:"annotation-details-confidence",class:(0,o.normalizeClass)(["confidence",e.publicView&&"tooltip-in-public-view"])},[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("confidence")),1),(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(["value",e.confidence(n.annotation)<=.2?"red":e.confidence(n.annotation)<=.5?"yellow":""])},(0,o.toDisplayString)(Math.floor(100*e.confidence(n.annotation))/100),3)],2)):(0,o.createCommentVNode)("",!0),e.publicView?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",_a,[(0,o.createElementVNode)("div",ba,[e.created(n.annotation)||e.edited(n.annotation)?((0,o.openBlock)(),(0,o.createElementBlock)("div",Ea,[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":"","user-icon"])},[(0,o.createVNode)(l)],2)])):e.notExtracted(n.annotation)?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":"","question-icon"])},[(0,o.createVNode)(c)],2)):((0,o.openBlock)(),(0,o.createElementBlock)("div",Sa,[e.accepted(n.annotation)?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":""])},[(0,o.createVNode)(d)],2)):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":""])},[(0,o.createVNode)(h)],2))])),(0,o.createTextVNode)(" "+(0,o.toDisplayString)(s.getText()),1)])]))])])),default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",ha,[!e.created(n.annotation)&&!e.edited(n.annotation)||e.publicView?e.annotationIsNotFound(n.annotationSet,n.label)&&!e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":""])},[(0,o.createVNode)(r)],2)):e.notExtracted(n.annotation)&&!e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:2,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":"","question-icon"])},[(0,o.createVNode)(c)],2)):((0,o.openBlock)(),(0,o.createElementBlock)("div",ma,[e.accepted(n.annotation)&&!e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["annotation-details-icon success",a.animate?"animated-ripple":""])},[(0,o.createVNode)(d)],2)):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":""])},[(0,o.createVNode)(h,{class:"pending"})],2))])):((0,o.openBlock)(),(0,o.createElementBlock)("div",ua,[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":"","user-icon"])},[(0,o.createVNode)(l)],2)]))])])),_:1})])}const va={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Aa(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",va,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#E1E1E1",d:"M18.71,7.21a1,1,0,0,0-1.42,0L9.84,14.67,6.71,11.53A1,1,0,1,0,5.29,13l3.84,3.84a1,1,0,0,0,1.42,0l8.16-8.16A1,1,0,0,0,18.71,7.21Z"},null,-1)]))}const ka={},Na=(0,$.A)(ka,[["render",Aa]]),wa=Na,ya={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Ta(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",ya,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#4bb543",d:"M18.71,7.21a1,1,0,0,0-1.42,0L9.84,14.67,6.71,11.53A1,1,0,1,0,5.29,13l3.84,3.84a1,1,0,0,0,1.42,0l8.16-8.16A1,1,0,0,0,18.71,7.21Z"},null,-1)]))}const Ba={},Da=(0,$.A)(Ba,[["render",Ta]]),La=Da,Va={xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 24 24"};function xa(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Va,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#E1E1E1",d:"M15.33252,9.5A3.5001,3.5001,0,0,0,8.80127,7.75a1.00016,1.00016,0,0,0,1.73242,1A1.50266,1.50266,0,0,1,11.83252,8a1.5,1.5,0,1,1,0,3h-.00244a.94984.94984,0,0,0-.18927.0387,1.03181,1.03181,0,0,0-.19861.04065.98275.98275,0,0,0-.15552.10485,1.00813,1.00813,0,0,0-.162.10975,1.00464,1.00464,0,0,0-.11706.1737.97789.97789,0,0,0-.09668.14417,1.02252,1.02252,0,0,0-.04285.21191A.94847.94847,0,0,0,10.83252,12v1l.00232.01135.0011.49109a1.00016,1.00016,0,0,0,1,.99756h.00244a1.00006,1.00006,0,0,0,.99756-1.00244l-.00153-.66138A3.49363,3.49363,0,0,0,15.33252,9.5Zm-4.20264,6.79A1,1,0,0,0,11.82959,18a1.036,1.036,0,0,0,.71045-.29,1.01517,1.01517,0,0,0,0-1.41992A1.03425,1.03425,0,0,0,11.12988,16.29Z"},null,-1)]))}const Ma={},Ia=(0,$.A)(Ma,[["render",xa]]),Oa=Ia,Pa={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function $a(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Pa,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#4bb543",d:"M15.71,12.71a6,6,0,1,0-7.42,0,10,10,0,0,0-6.22,8.18,1,1,0,0,0,2,.22,8,8,0,0,1,15.9,0,1,1,0,0,0,1,.89h.11a1,1,0,0,0,.88-1.1A10,10,0,0,0,15.71,12.71ZM12,12a4,4,0,1,1,4-4A4,4,0,0,1,12,12Z"},null,-1)]))}const Ra={},Fa=(0,$.A)(Ra,[["render",$a]]),Ha=Fa,za={width:"10",height:"11",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ua(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",za,t[0]||(t[0]=[(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.17854 5.83544L9.75604 2.25794C10.0819 1.9321 10.0819 1.40544 9.75604 1.0796C9.43021 0.75377 8.90354 0.75377 8.57771 1.0796L5.00021 4.6571L1.42271 1.0796C1.09688 0.75377 0.570208 0.75377 0.244375 1.0796C-0.0814583 1.40544 -0.0814583 1.9321 0.244375 2.25794L3.82188 5.83544L0.244375 9.41294C-0.0814583 9.73877 -0.0814583 10.2654 0.244375 10.5913C0.406875 10.7538 0.620208 10.8354 0.833542 10.8354C1.04688 10.8354 1.26021 10.7538 1.42271 10.5913L5.00021 7.01377L8.57771 10.5913C8.74021 10.7538 8.95354 10.8354 9.16687 10.8354C9.38021 10.8354 9.59354 10.7538 9.75604 10.5913C10.0819 10.2654 10.0819 9.73877 9.75604 9.41294L6.17854 5.83544Z",fill:"#E1E1E1"},null,-1)]))}const Za={},Ga=(0,$.A)(Za,[["render",Ua]]),Wa=Ga,qa={name:"AnnotationDetails",components:{CheckMark:wa,QuestionMark:Oa,AcceptedCheckMark:La,AcceptedUser:Ha,NotFoundIcon:Wa},props:{description:{type:String,default:null,required:!1},annotation:{type:Object,default:null},annotationSet:{type:Object,default:null},label:{type:Object,default:null}},data(){return{animate:!1}},computed:{...(0,s.L8)("document",["confidence","notExtracted","created","edited","accepted","getUser","annotationIsNotFound"]),...(0,s.aH)("document",["publicView"])},watch:{annotation(e,t){e&&e.id&&this.accepted(e)&&!this.accepted(t)&&(this.animate=!0,setTimeout((()=>{this.animate=!1}),2e3))}},mounted(){this.changePositionOfTooltip()},methods:{getText(){return this.notExtracted(this.annotation)?this.$t("not_found_in_document"):this.created(this.annotation)?this.getUser(this.annotation)?`${this.$t("created_by")} ${this.getUser(this.annotation)}`:this.$t("created"):this.accepted(this.annotation)?this.getUser(this.annotation)?`${this.$t("approved_by")} ${this.getUser(this.annotation)}`:this.$t("approved"):this.$t("not_revised_yet")},changePositionOfTooltip(){const e=document.getElementsByClassName("annotation-details");if(e){let t;if(!(e.length>=3))return;t=e.length-2;for(let n=t;n<e.length;n++)this.updateClass(e,n)}},updateClass(e,t){e[t]&&(e[t].classList.remove("is-bottom"),e[t].classList.add("is-top"))}}},ja=(0,$.A)(qa,[["render",fa],["__scopeId","data-v-21369c27"]]),Ka=ja,Ya=["id"],Ja=["id","contenteditable"];function Xa(e,t,n,i,a,s){return(0,o.openBlock)(),(0,o.createElementBlock)("div",{id:n.annotation.id,ref:"annotation",class:"annotation"},[(0,o.createElementVNode)("span",{id:n.annotation.id,ref:"contentEditable",class:(0,o.normalizeClass)(["annotation-value","keyboard-nav",a.isLoading&&"saving-changes",e.showActionError&&e.editAnnotation&&e.editAnnotation.id===n.annotation.id&&"error-editing",s.isSpanBeingEdited&&"clicked-ann"]),role:"textbox",contenteditable:s.isSpanBeingEdited,onClick:t[0]||(t[0]=(...e)=>s.handleEditAnnotation&&s.handleEditAnnotation(...e)),onPaste:t[1]||(t[1]=(...e)=>s.handlePaste&&s.handlePaste(...e)),onKeypress:t[2]||(t[2]=(0,o.withKeys)(((...e)=>s.saveAnnotationChanges&&s.saveAnnotationChanges(...e)),["enter"]))},(0,o.toDisplayString)(n.span.offset_string),43,Ja)],8,Ya)}function Qa(e){new Promise((t=>setTimeout(t,e)))}function es(e){const t=window.location.search,n=new URLSearchParams(t);if(n.has(e))return n.get(e)}function ts(e){const t=window.location.pathname;if(!t.includes(`/${e}/`))return;const n=t.split(e)[1].split("/")[1];return""!==n?n:void 0}function ns(e){const t=window.location.hash;if(!t.includes(`#${e}`))return;const n=t.split(`#${e}`)[1].replace("/","");return""!==n?n:void 0}function os(e,t,n=""){const o=new URL(window.location.href);""!=t?(""!=n&&o.searchParams.delete(n),o.searchParams.set(e,t)):o.searchParams.delete(e),window.history.pushState(null,"",o.toString())}function is(e){e?window.location.hash=`ann${e}`:history.pushState("",document.title,window.location.pathname+window.location.search)}function as(e,t){const n=window.location.href,o=n.replace(e,t);window.location.replace(o)}function ss(e,t){if(!e)return;const n=e.charAt(e.length-1);let o="/";n===o&&(o="");const i=`?project=${t}`,a=`${e}${o}${i}`;return window.location.href=a,!0}function ls(e){return Array.isArray(e)}function rs(e,t){let n;return(...o)=>{clearTimeout(n),n=setTimeout((()=>{e(...o)}),t)}}const cs={name:"AnnotationContent",props:{annotation:{type:Object,required:!0},span:{type:[Object,Array],required:!0},spanIndex:{type:Number,required:!0},label:{type:Object,required:!0},annotationSet:{type:Object,required:!0}},data(){return{isLoading:!1}},computed:{...(0,s.L8)("document",["isAnnotationInEditMode","isDocumentReviewed"]),...(0,s.aH)("document",["editAnnotation","publicView","annotations","newAcceptedAnnotations","showActionError"]),isSpanBeingEdited(){return this.isAnnotationInEditMode(this.annotation.id,this.spanIndex)},isAnnotationBeingEdited(){return this.editAnnotation&&this.annotation.id===this.editAnnotation.id}},watch:{span(){this.setText(this.span.offset_string)}},methods:{setText(e){this.$refs.contentEditable.textContent=e},getAnnotationText(){return this.$refs.contentEditable.textContent.trim()},handleEditAnnotation(e){this.publicView||this.isDocumentReviewed||(e&&e.preventDefault(),this.publicView||this.isDocumentReviewed||this.isSpanBeingEdited||this.isLoading||(this.isAnnotationBeingEdited||this.$store.dispatch("selection/setSpanSelection",this.annotation.span),this.$store.dispatch("document/setEditAnnotation",{id:this.annotation.id,index:this.spanIndex,label:this.label,labelSet:this.annotationSet.label_set,annotationSet:this.annotationSet,pageNumber:this.span.page_index+1}).then((()=>{this.$refs.contentEditable&&this.$refs.contentEditable.focus()})).catch((e=>{console.log(e)})),this.annotation.selection_bbox&&this.annotation.span.length>1&&this.$store.dispatch("selection/setPlaceholderSelection",[this.annotation.selection_bbox])))},handleCancel(){this.setText(this.span.offset_string),this.isLoading=!1,this.$refs.contentEditable&&this.$refs.contentEditable.blur(),this.$store.dispatch("selection/setSpanSelection",null)},handlePaste(e){e.preventDefault()},saveAnnotationChanges(e){if(this.publicView||this.isDocumentReviewed)return;e&&e.preventDefault();let t=0===this.getAnnotationText().length&&(!ls(this.annotation.span)||1===this.annotation.span.length);this.$emit("save-annotation-changes",t)},createSpan(){const e=this.getAnnotationText();if(e)return{offset_string:e,page_index:this.span.page_index,x0:this.span.x0,x1:this.span.x1,y0:this.span.y0,y1:this.span.y1,start_offset:this.span.start_offset,end_offset:this.span.end_offset,is_custom:this.span.offset_string!==e}}}},ds=(0,$.A)(cs,[["render",Xa],["__scopeId","data-v-8aa3a3c6"]]),hs=ds,us={key:0,class:"empty-annotation"},ms=["id","contenteditable"],ps=["innerHTML"],gs={key:1,class:"not-found-text"},Cs={key:2},_s={key:3,class:"label-empty"};function bs(e,t,n,i,a,s){return e.publicView||e.isDocumentReviewed?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",us,[(0,o.createElementVNode)("span",{id:s.emptyAnnotationId(),ref:"emptyAnnotation",class:(0,o.normalizeClass)(["annotation-value",e.showActionError&&s.isAnnotationBeingEdited()&&"error-editing",s.isAnnotationBeingEdited()&&"clicked-ann",n.isMissingAnnotation&&"missing-annotation",!n.isMissingAnnotation&&"keyboard-nav"]),contenteditable:s.isAnnotationBeingEdited(),onKeypress:t[0]||(t[0]=(0,o.withKeys)(((...e)=>s.saveEmptyAnnotationChanges&&s.saveEmptyAnnotationChanges(...e)),["enter"])),onClick:t[1]||(t[1]=(...e)=>s.handleEditEmptyAnnotation&&s.handleEditEmptyAnnotation(...e)),onFocus:t[2]||(t[2]=(...e)=>s.handleEditEmptyAnnotation&&s.handleEditEmptyAnnotation(...e))},[s.isFindingAnnotation?((0,o.openBlock)(),(0,o.createElementBlock)("span",{key:0,class:"label-empty-clicked",innerHTML:e.$t("draw_box_document",{label_name:n.label.name})},null,8,ps)):n.isMissingAnnotation?((0,o.openBlock)(),(0,o.createElementBlock)("span",gs,(0,o.toDisplayString)(e.$t("missing_from_document")),1)):n.span&&n.span.offset_string?((0,o.openBlock)(),(0,o.createElementBlock)("span",Cs,(0,o.toDisplayString)(n.span.offset_string),1)):((0,o.openBlock)(),(0,o.createElementBlock)("span",_s,(0,o.toDisplayString)(e.$t("no_data_found")),1))],42,ms)]))}const Es={name:"EmptyAnnotation",props:{label:{type:Object,required:!0},annotationSet:{type:Object,default:null},labelSet:{type:Object,required:!0},span:{type:Object,default:null,required:!1},spanIndex:{type:Number,required:!1,default:0},isMissingAnnotation:{type:Boolean,required:!0,default:!1}},computed:{...(0,s.L8)("document",["isAnnotationInEditMode","isDocumentReviewed"]),...(0,s.aH)("selection",["spanSelection"]),...(0,s.aH)("document",["editAnnotation","publicView","showActionError"]),isFindingAnnotation(){return this.editAnnotation&&this.editAnnotation.id===this.emptyAnnotationId()&&(!this.span||!this.span.offset_string)}},watch:{span(e){},spanSelection(e){e&&e[0]&&!e[0].offset_string&&(this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"))}},methods:{emptyAnnotationId(){if(!this.annotationSet&&!this.labelSet||!this.label)return;const e=this.annotationSet&&null!=this.annotationSet.id?this.annotationSet.id:this.labelSet.id;return`${e}_${this.label.id}`},isAnnotationBeingEdited(){return this.isAnnotationInEditMode(this.emptyAnnotationId())},handleEditEmptyAnnotation(){this.isMissingAnnotation||(this.$store.dispatch("selection/disableSelection"),this.$store.dispatch("document/setEditAnnotation",{id:this.emptyAnnotationId(),index:this.spanIndex,label:this.label,labelSet:this.labelSet,annotationSet:this.annotationSet}))},saveEmptyAnnotationChanges(e){e&&e.preventDefault(),this.$emit("save-empty-annotation-changes")}}},Ss=(0,$.A)(Es,[["render",bs],["__scopeId","data-v-153d72f9"]]),fs=Ss,vs={class:"action-buttons"},As={class:"ann-nav-btns"},ks={key:0,class:"button-text"},Ns={key:0,class:"button-text"},ws={key:0,class:"button-text"},ys={key:0,class:"button-text"},Ts={key:0,class:"button-text"};function Bs(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-tooltip"),c=(0,o.resolveComponent)("b-button");return(0,o.openBlock)(),(0,o.createElementBlock)("div",vs,[e.isLabelMultiFalseAndGroupOfAnns(n.label)&&!n.showSave?((0,o.openBlock)(),(0,o.createBlock)(r,{key:0,delay:a.tooltipDelay,position:"is-left",label:e.$t("nav_label_anns")},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",As,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(n.label.annotations.length),1),(0,o.createVNode)(l,{icon:"angle-down",class:"angle-icon center-icon button-icon is-link",onClick:(0,o.withModifiers)(s.nextAnn,["stop"])},null,8,["onClick"])])])),_:1},8,["delay","label"])):(0,o.createCommentVNode)("",!0),n.showLink?((0,o.openBlock)(),(0,o.createBlock)(c,{key:1,id:"annotation-link-btn",type:"is-ghost",class:"button-action is-button-icon",onClick:(0,o.withModifiers)(s.link,["stop"])},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{delay:a.tooltipDelay,position:"is-left",label:e.$t("annotation_link")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"link",class:"link-icon center-icon button-icon"})])),_:1},8,["delay","label"])])),_:1},8,["onClick"])):(0,o.createCommentVNode)("",!0),n.showDecline?((0,o.openBlock)(),(0,o.createBlock)(c,{key:2,class:"button-action is-button-icon decline-btn",type:"is-ghost",onClick:(0,o.withModifiers)(s.decline,["stop"])},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{delay:a.tooltipDelay,position:"is-left",label:e.$t("decline")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"ban",class:"decline-icon center-icon button-icon"})])),_:1},8,["delay","label"])])),_:1},8,["onClick"])):(0,o.createCommentVNode)("",!0),n.showAccept?((0,o.openBlock)(),(0,o.createBlock)(c,{key:3,class:(0,o.normalizeClass)("button-action accept-btn "+(a.showText?"is-button-text":"is-button-icon")),type:a.showText?"is-primary":"is-ghost",onClick:(0,o.withModifiers)(s.accept,["stop"])},{default:(0,o.withCtx)((()=>[a.showText?((0,o.openBlock)(),(0,o.createElementBlock)("span",ks,(0,o.toDisplayString)(e.$t("accept")),1)):((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,delay:a.tooltipDelay,position:"is-left",label:e.$t("accept")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"circle-check",class:"accept-icon center-icon button-icon"})])),_:1},8,["delay","label"]))])),_:1},8,["class","type","onClick"])):(0,o.createCommentVNode)("",!0),n.showSearch?((0,o.openBlock)(),(0,o.createBlock)(c,{key:4,type:"is-ghost",class:(0,o.normalizeClass)("button-action "+(a.showText?"is-button-text-ghost":"is-button-icon")),onClick:(0,o.withModifiers)(s.search,["stop"])},{default:(0,o.withCtx)((()=>[a.showText?((0,o.openBlock)(),(0,o.createElementBlock)("span",Ns,(0,o.toDisplayString)(e.$t("search_in_document")),1)):((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,delay:a.tooltipDelay,position:"is-left",label:e.$t("search_in_document")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"search",class:"center-icon button-icon search-icon"})])),_:1},8,["delay","label"]))])),_:1},8,["class","onClick"])):(0,o.createCommentVNode)("",!0),n.showMissing?((0,o.openBlock)(),(0,o.createBlock)(c,{key:5,type:"is-ghost",class:(0,o.normalizeClass)("button-action "+(a.showText?"is-button-text-ghost":"is-button-icon")),onClick:(0,o.withModifiers)(s.markAsMissing,["stop"])},{default:(0,o.withCtx)((()=>[a.showText?((0,o.openBlock)(),(0,o.createElementBlock)("span",ws,(0,o.toDisplayString)(e.$t("missing_annotation")),1)):((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,delay:a.tooltipDelay,position:"is-left",label:e.$t("missing_annotation")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"magnifying-glass-minus",class:"center-icon button-icon missing-icon"})])),_:1},8,["delay","label"]))])),_:1},8,["class","onClick"])):(0,o.createCommentVNode)("",!0),n.showSave?((0,o.openBlock)(),(0,o.createBlock)(c,{key:6,id:"save-ann",class:(0,o.normalizeClass)("button-action "+(a.showText?"is-button-text":"is-button-icon")),type:a.showText?"is-primary":"is-ghost",onClick:(0,o.withModifiers)(s.save,["stop"])},{default:(0,o.withCtx)((()=>[a.showText?((0,o.openBlock)(),(0,o.createElementBlock)("span",ys,(0,o.toDisplayString)(e.$t("save")),1)):((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,delay:a.tooltipDelay,position:"is-left",label:e.$t("save")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"floppy-disk",class:"button-icon center-icon save-icon"})])),_:1},8,["delay","label"]))])),_:1},8,["class","type","onClick"])):(0,o.createCommentVNode)("",!0),n.showRestore?((0,o.openBlock)(),(0,o.createBlock)(c,{key:7,class:(0,o.normalizeClass)("button-action restore-btn "+(a.showText?"is-button-text":"is-button-icon")),type:a.showText?"is-primary":"is-ghost",onClick:(0,o.withModifiers)(s.restore,["stop"])},{default:(0,o.withCtx)((()=>[a.showText?((0,o.openBlock)(),(0,o.createElementBlock)("span",Ts,(0,o.toDisplayString)(e.$t("restore")),1)):((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,delay:a.tooltipDelay,position:"is-left",label:e.$t("restore")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"trash-arrow-up",class:"center-icon button-icon restore-icon"})])),_:1},8,["delay","label"]))])),_:1},8,["class","type","onClick"])):(0,o.createCommentVNode)("",!0),n.showCancel?((0,o.openBlock)(),(0,o.createBlock)(c,{key:8,class:"button-action is-button-icon",title:e.$t("cancel"),type:"is-ghost",onClick:(0,o.withModifiers)(s.cancel,["stop"])},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"xmark",class:"cancel-icon center-icon button-icon"})])),_:1},8,["title","onClick"])):(0,o.createCommentVNode)("",!0),n.isLoading?((0,o.openBlock)(),(0,o.createBlock)(l,{key:9,icon:"spinner",class:"fa-spin spinner-icon"})):(0,o.createCommentVNode)("",!0)])}const Ds={name:"AnnotationActionButtons",props:{annotation:{type:Object,default:null},label:{type:Object,default:null},isLoading:{type:Boolean},showSave:{type:Boolean},showCancel:{type:Boolean},showMissing:{type:Boolean},showAccept:{type:Boolean},showDecline:{type:Boolean},showRestore:{type:Boolean},showLink:{type:Boolean},showSearch:{type:Boolean}},data(){return{tooltipDelay:700,showText:window.innerWidth>$t}},computed:{...(0,s.aH)("document",["publicView"]),...(0,s.L8)("document",["isDocumentReviewed","isLabelMultiFalseAndGroupOfAnns"]),showHoverButton(){return!this.isLoading&&!this.cancelBtn&&!this.saveBtn&&!this.publicView&&!this.isDocumentReviewed}},created(){window.addEventListener("resize",this.resize)},unmounted(){window.removeEventListener("resize",this.resize)},methods:{resize(){this.showText=window.innerWidth>$t},search(){this.$emit("search")},save(){this.$emit("save")},cancel(){this.$emit("cancel")},accept(){this.$emit("accept")},markAsMissing(){this.$emit("mark-as-missing")},decline(){this.$emit("decline")},restore(){this.$emit("restore")},link(){this.$emit("link")},nextAnn(){this.$store.dispatch("document/putNextAnnotationInLabelFirst",this.label)}}},Ls=(0,$.A)(Ds,[["render",Bs],["__scopeId","data-v-1ca87cbe"]]),Vs=Ls,xs={id:"exchange",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Ms={key:0,fill:"#1A1A1A",d:"M18,10a1,1,0,0,0-1-1H5.41l2.3-2.29A1,1,0,0,0,6.29,5.29l-4,4a1,1,0,0,0-.21,1.09A1,1,0,0,0,3,11H17A1,1,0,0,0,18,10Zm3.92,3.62A1,1,0,0,0,21,13H7a1,1,0,0,0,0,2H18.59l-2.3,2.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l4-4A1,1,0,0,0,21.92,13.62Z"},Is={key:1,fill:"#E1E1E1",d:"M18,10a1,1,0,0,0-1-1H5.41l2.3-2.29A1,1,0,0,0,6.29,5.29l-4,4a1,1,0,0,0-.21,1.09A1,1,0,0,0,3,11H17A1,1,0,0,0,18,10Zm3.92,3.62A1,1,0,0,0,21,13H7a1,1,0,0,0,0,2H18.59l-2.3,2.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l4-4A1,1,0,0,0,21.92,13.62Z"};function Os(e,t,n,i,a,s){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",xs,[n.translation?((0,o.openBlock)(),(0,o.createElementBlock)("path",Ms)):((0,o.openBlock)(),(0,o.createElementBlock)("path",Is))])}const Ps={name:"TranslateArrows",props:{translation:{type:String,default:null,required:!1}}},$s=(0,$.A)(Ps,[["render",Os]]),Rs=$s,Fs={name:"AnnotationRow",components:{AnnotationDetails:Ka,AnnotationContent:hs,EmptyAnnotation:fs,AnnotationActionButtons:Vs,TranslateArrows:Rs},props:{annotationSet:{type:Object,default:null},labelSet:{type:Object,required:!0},label:{type:Object,required:!0},annotation:{type:Object,default:null},showLabel:{type:Boolean,default:!0}},data(){const e=this.annotation&&this.annotation.metadata&&this.annotation.metadata.checkbox&&this.annotation.metadata.checkbox.is_checked;return{isLoading:!1,isSelected:!1,hoveredAnnotation:null,checkboxDefaultValue:e,isCheckboxAvailable:!1,isChecked:e,labelContainerWidth:0}},computed:{...(0,s.aH)("document",["editAnnotation","annotationId","hoveredAnnotationSet","publicView","newAcceptedAnnotations","annotationsMarkedAsMissing","documentId","showActionError","missingAnnotations"]),...(0,s.aH)("selection",["spanSelection","selectedEntities","spanLoading"]),...(0,s.aH)("display",["labelWidth","annotationWidth"]),...(0,s.aH)("project",["showAnnotationTranslations"]),...(0,s.L8)("document",["isAnnotationInEditMode","annotationIsNotFound","isDocumentReviewed"]),defaultSpan(){return this.annotation&&this.annotation.span&&this.annotation.span.length>0?this.annotation.span[0]:null},spanForEditing(){return this.spanSelection&&ls(this.spanSelection)&&this.isAnnotationInEditMode(this.currentAnnotationId())},isAnnotation(){return this.annotation&&this.isAnnotationInEditMode(this.currentAnnotationId(),this.editAnnotation.index)},hoverEmptyLabelRows(){return this.hoveredAnnotationSet&&"missing"==this.hoveredAnnotationSet.type&&this.annotationSet&&!this.annotationIsNotFound(this.annotationSet,this.label)&&this.annotationSet.id===this.hoveredAnnotationSet.annotationSet.id&&this.annotationSet.label_set.id===this.hoveredAnnotationSet.annotationSet.label_set.id&&this.hoveredEmptyLabels()===this.label.id},hoverPendingAnnotationRows(){return this.hoveredAnnotationSet&&"accept"==this.hoveredAnnotationSet.type&&this.annotation&&this.hoveredNotCorrectAnnotations()===this.annotation.id}},watch:{labelWidth(e){this.labelContainerWidth=e},labelContainerWidth(e){this.setLabelWidth(e)},annotationId(e){this.checkAnnotationSelection(e)},editAnnotation(e){e||(this.isLoading=!1)},newAcceptedAnnotations(e){e?this.enableLoading(e):this.isLoading=!1},annotationsMarkedAsMissing(e){e?this.enableLoading():this.isLoading=!1},showActionError(e){e&&(this.isLoading=!1)},selectedEntities(e){e&&this.isAnnotationInEditMode(this.currentAnnotationId())&&(this.isLoading=!0)},spanSelection(e){e&&(this.isLoading=!1)},isChecked(){this.isCheckboxAvailable?this.handleCheckboxChanged(this.isChecked):this.isChecked!==this.checkboxDefaultValue&&this.$buefy.dialog.confirm({container:"#app .dv-ui-app-container",canCancel:["button"],message:this.$t("edit_ann_content_warning"),onConfirm:()=>{this.isCheckboxAvailable=!0,this.handleCheckboxChanged(this.isChecked)},onCancel:()=>{this.isChecked=!this.isChecked}})}},mounted(){this.checkAnnotationSelection(this.annotationId),this.labelContainerWidth=this.labelWidth},methods:{...(0,s.i0)("display",["setLabelWidth"]),handleCheckboxChanged(e){this.$store.dispatch("document/updateAnnotation",{updatedValues:{metadata:{checkbox:{is_checked:e}}},annotationId:this.annotation.id,annotationSet:this.annotationSet}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})}))},checkAnnotationSelection(e){if(e&&this.annotation&&this.annotation.id==e){this.isSelected=!0;const e=()=>{this.$el.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})};e()}else this.isSelected=!1},currentAnnotationId(){if(!this.annotationSet&&!this.labelSet||!this.label)return;if(this.annotation&&this.annotation.id)return this.annotation.id;const e=this.annotationSet&&this.annotationSet.id?this.annotationSet.id:this.labelSet.id;return`${e}_${this.label.id}`},onAnnotationHoverEnter(e){e&&this.$store.dispatch("document/setDocumentAnnotationSelected",{annotation:this.annotation,label:this.label,span:e,scrollTo:!1})},onAnnotationHoverLeave(){this.$store.dispatch("document/disableDocumentAnnotationSelected")},onAnnotationClick(){this.$store.dispatch("document/scrollToDocumentAnnotationSelected")},hoveredEmptyLabels(){if(!this.hoveredAnnotationSet)return;const e=this.hoveredAnnotationSet.annotationSet.labels.map((e=>JSON.parse(JSON.stringify(e)))),t=e.find((e=>e.id===this.label.id));return t&&0===t.annotations.length?t.id:null},hoveredNotCorrectAnnotations(){if(!this.hoveredAnnotationSet)return;const e=this.hoveredAnnotationSet.annotationSet.labels.flatMap((e=>e.annotations));if(0===e.length)return;const t=e.find((e=>e.id===this.annotation.id&&!e.is_correct));return t?t.id:null},showAnnotationActions(){return!this.publicView&&!this.isDocumentReviewed&&(this.isLoading||this.showLinkButton()||this.showAcceptButton()||this.showDeclineButton()||this.showMissingButton()||this.showCancelButton()||this.showSaveButton()||this.showRestoreButton())},showLinkButton(){return!this.editAnnotation&&this.annotation&&!this.isLoading&&this.hoveredAnnotation===this.annotation.id},showAcceptButton(){return!this.editAnnotation&&!this.isLoading&&!this.isAnnotationInEditMode(this.currentAnnotationId())&&this.annotation&&!this.annotation.is_correct&&this.hoveredAnnotation===this.annotation.id},showDeclineButton(){return!this.editAnnotation&&!this.isLoading&&!this.isAnnotationInEditMode(this.currentAnnotationId())&&this.annotation&&this.hoveredAnnotation===this.annotation.id},showMissingButton(){return!this.editAnnotation&&!this.isLoading&&this.hoveredAnnotation&&!this.isAnnotationInEditMode(this.currentAnnotationId())&&!this.annotation&&!this.annotationIsNotFound(this.annotationSet,this.label)},showRestoreButton(){return!this.editAnnotation&&this.hoveredAnnotation&&!this.isLoading&&!this.isAnnotationInEditMode(this.currentAnnotationId())&&this.annotationIsNotFound(this.annotationSet,this.label)},showCancelButton(){return!(!this.editAnnotation||this.isLoading)&&this.isAnnotationInEditMode(this.currentAnnotationId())},showSaveButton(){return!(!this.editAnnotation||this.isLoading)&&(!!this.isAnnotation||(this.isAnnotationInEditMode(this.currentAnnotationId())?this.spanSelection&&this.spanSelection.length>0:void 0))},handleMissingAnnotation(){this.label&&this.annotationSet&&(this.isLoading=!0,this.$parent.$emit("handle-missing-annotation",this.label.id,this.labelSet.id,this.annotationSet.id,!1))},handleSaveChanges(e=!1){if(!this.publicView&&!this.isDocumentReviewed)if(this.annotation&&(this.showAcceptButton()||this.showDeclineButton()||this.isAnnotationInEditMode(this.currentAnnotationId(),this.editAnnotation.index))){let t=[],n=!1;e||Object.keys(this.$refs).forEach((e=>{if(e.includes(`span_${this.annotation.id}`)){const o=this.$refs[e][0];if(!o)return;const i=o.createSpan();i&&(n=i.is_custom,t.push(i))}})),n?this.$buefy.dialog.confirm({container:"#app .dv-ui-app-container",canCancel:["button"],message:this.$t("edit_ann_content_warning"),onConfirm:()=>this.saveAnnotationChanges(t,e),onCancel:()=>this.handleCancelButton()}):this.saveAnnotationChanges(t,e)}else!this.annotation&&this.isAnnotationInEditMode(this.currentAnnotationId())&&this.saveEmptyAnnotationChanges()},handleRestore(){this.isLoading=!0;const e=this.missingAnnotations.find((e=>e.annotation_set===this.annotationSet.id&&e.label===this.label.id&&e.label_set===this.labelSet.id));this.$store.dispatch("document/deleteMissingAnnotation",e.id).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})})).finally((()=>{this.isLoading=!1,this.closedTag=null}))},saveAnnotationChanges(e,t){if(setTimeout((()=>{this.isLoading=!0}),100),!t&&(this.editAnnotation.annotationSet&&(this.editAnnotation.annotationSet.id!==this.annotationSet.id||null==this.editAnnotation.annotationSet.id&&this.labelSet.id!==this.editAnnotation.labelSet.id)||this.editAnnotation.label&&this.editAnnotation.label.id!==this.label.id))this.$store.dispatch("document/deleteAnnotation",{annotationId:this.annotation.id}).then((()=>{const t={document:this.documentId,span:e,label:this.editAnnotation.label.id,is_correct:!0,revised:!1};this.editAnnotation.annotationSet.id?t.annotation_set=this.editAnnotation.annotationSet.id:t.label_set=this.editAnnotation.labelSet.id,this.$store.dispatch("document/createAnnotation",{annotation:t}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("error_creating_annotation")})})).finally((()=>{this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"),this.loading=!1}))}));else{let n,o;t||0===e.length?o="document/deleteAnnotation":(o="document/updateAnnotation",n={is_correct:!0,revised:!0,span:e}),this.$store.dispatch(o,{updatedValues:n,annotationId:this.annotation.id,annotationSet:this.annotationSet}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})})).finally((()=>{this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"),this.isLoading=!1}))}},saveEmptyAnnotationChanges(){let e;e=this.annotationSet&&this.annotationSet.id?{document:this.documentId,span:this.spanSelection,label:this.label.id,annotation_set:this.annotationSet.id,is_correct:!0,revised:!1}:{document:this.documentId,span:this.spanSelection,label:this.label.id,label_set:this.labelSet.id,is_correct:!0,revised:!1},this.isLoading=!0,this.$store.dispatch("document/createAnnotation",{annotation:e}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})})).finally((()=>{this.$store.dispatch("document/resetEditAnnotation"),this.handleCancelButton()}))},handleCancelButton(){this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"),this.isLoading=!1},enableLoading(e){if(e&&this.annotation&&!this.annotation.is_correct){const t=e.find((e=>e===this.annotation.id));return t?void(this.isLoading=!0):void(this.isLoading=!1)}this.annotationsMarkedAsMissing?this.annotationsMarkedAsMissing.length>0&&this.annotationsMarkedAsMissing.map((e=>{if(e.label_set===this.labelSet.id&&e.annotation_set===this.annotationSet.id&&e.label===this.label.id){if(this.hoveredAnnotationSet)return void(this.isLoading=!0);if(!this.hoveredAnnotationSet&&e.label===this.label.id)return void(this.isLoading=!0)}})):this.isLoading=!1},editAnnotationTranslation(e){if(!e||this.isDocumentReviewed)return;const t=Ae.FILE_URL?Ae.FILE_URL:Ae.DEFAULT_URL,n=`${t}/admin/server/sequenceannotation/${e}/change/`;window.open(n,"_blank")},searchLabelInDocument(){this.label&&(this.$store.dispatch("display/enableSearch",!0),this.$store.dispatch("display/setCurrentSearch",this.label.name))},copyAnnotationLink(){this.annotation&&(this.$store.dispatch("document/setAnnotationId",this.annotation.id),navigator.clipboard.writeText(window.location.href),this.$buefy.toast.open({container:"#app .dv-ui-app-container",message:this.$t("copied")}))},selectAnnotation(e){e.stopPropagation(),this.annotation&&this.$store.dispatch("document/setAnnotationId",this.annotation.id)}}},Hs=(0,$.A)(Fs,[["render",da],["__scopeId","data-v-e1003d16"]]),zs=Hs,Us={name:"DocumentLabel",components:{AnnotationRow:zs},props:{label:{type:Object,required:!0},annotationSet:{type:Object,default:null},labelSet:{type:Object,required:!0}},computed:{...(0,s.aH)("document",["annotationId","publicView"]),...(0,s.L8)("document",["numberOfAcceptedAnnotationsInLabel","isLabelMultiFalseAndGroupOfAnns"])},methods:{annotationsToShow(){return this.isLabelMultiFalseAndGroupOfAnns(this.label)?[this.label.annotations[0]]:this.label.annotations},labelHasPendingAnnotations(e){if(!e)return;const t=this.label.annotations.find((e=>!e.is_correct));return this.annotationSet.id===e.annotationSet.id&&t}}},Zs=(0,$.A)(Us,[["render",Ki],["__scopeId","data-v-2422371a"]]),Gs=Zs,Ws={class:"annotation-options"},qs={id:"annotation-search"},js={id:"annotation-filters"};function Ks(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-taginput"),r=(0,o.resolveComponent)("b-field"),c=(0,o.resolveComponent)("b-switch");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Ws,[(0,o.createElementVNode)("div",qs,[(0,o.createVNode)(r,null,{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{modelValue:a.search,"onUpdate:modelValue":t[0]||(t[0]=e=>a.search=e),ellipsis:"",attached:"",icon:"search",placeholder:e.$t("search")},{tag:(0,o.withCtx)((e=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(s.labelNameForAnnotationId(e.tag)||e.tag),1)])),_:1},8,["modelValue","placeholder"])])),_:1})]),(0,o.createElementVNode)("div",js,[(0,o.createVNode)(c,{modelValue:e.annotationFilters.showFeedbackNeeded,"onUpdate:modelValue":t[1]||(t[1]=t=>e.annotationFilters.showFeedbackNeeded=t),class:"is-small"},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("human_feedback_needed")),1)])),_:1},8,["modelValue"]),(0,o.createVNode)(c,{modelValue:e.annotationFilters.showEmpty,"onUpdate:modelValue":t[2]||(t[2]=t=>e.annotationFilters.showEmpty=t),class:"is-small"},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("label_missing_annotations")),1)])),_:1},8,["modelValue"]),(0,o.createVNode)(c,{modelValue:e.annotationFilters.showAccepted,"onUpdate:modelValue":t[3]||(t[3]=t=>e.annotationFilters.showAccepted=t),class:"is-small"},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("accepted_annotations")),1)])),_:1},8,["modelValue"])])])}const Ys={name:"AnnotationFilters",data(){return{search:[]}},computed:{...(0,s.aH)("document",["annotationSets","annotationFilters","annotationSearch"]),...(0,s.L8)("document",["annotationById","labelOfAnnotation"])},watch:{search(){this.search.length>0&&this.$emit("openAll"),this.search!=this.annotationSearch&&this.$store.dispatch("document/setAnnotationSearch",this.search)}},mounted(){this.search=this.annotationSearch},methods:{labelNameForAnnotationId(e){const t=this.annotationById(Number(e));if(t){const e=this.labelOfAnnotation(t);if(e)return e.name}return!1}}},Js=(0,$.A)(Ys,[["render",Ks],["__scopeId","data-v-e268669e"]]),Xs=Js,Qs={class:"annotations-skeleton"},el={class:"label-set-name-skeleton"};function tl(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton"),r=(0,o.resolveComponent)("LoadingLabels");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Qs,[(0,o.createElementVNode)("div",el,[(0,o.createVNode)(l,{width:"20%",height:"8px"})]),((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(a.numberOfLabelRows,(e=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:e},[(0,o.createVNode)(r)])))),128))])}const nl={class:"label-properties-skeleton"},ol={class:"loading-left"},il={class:"circle"},al={class:"label-skeleton"},sl={class:"loading-right"};function ll(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton");return(0,o.openBlock)(),(0,o.createElementBlock)("div",nl,[(0,o.createElementVNode)("div",ol,[(0,o.createElementVNode)("div",il,[(0,o.createVNode)(l,{circle:"",width:"16px",height:"16px"})]),(0,o.createElementVNode)("div",al,[(0,o.createVNode)(l,{width:"70%",height:"8px"})])]),(0,o.createElementVNode)("div",sl,[(0,o.createVNode)(l,{width:"80%",height:"8px"})])])}const rl={name:"LoadingLabels"},cl=(0,$.A)(rl,[["render",ll],["__scopeId","data-v-07542bd0"]]),dl=cl,hl={name:"LoadingAnnotations",components:{LoadingLabels:dl},data(){return{numberOfLabelRows:7}}},ul=(0,$.A)(hl,[["render",tl],["__scopeId","data-v-90b74e8e"]]),ml=ul,pl={components:{EmptyState:wi,ExtractingData:Ri,AnnotationSetActionButtons:Zi,DocumentLabel:Gs,LoadingAnnotations:ml,AnnotationFilters:Xs},data(){return{count:0,jumpToNextAnnotation:!1,numberOfLoadingAnnotations:3,annotationSetsAccordion:null}},computed:{...(0,s.aH)("display",["showAnnSetTable","showBranding"]),...(0,s.aH)("edit",["editMode"]),...(0,s.aH)("document",["annotationSets","documentId","annotationId","annotationSetId","recalculatingAnnotations","publicView","editAnnotation","loading","labels","selectedDocument","splittingSuggestions"]),...(0,s.L8)("document",["numberOfAnnotationSetGroup","getAnnotationsFiltered","emptyLabels","notCorrectAnnotations","isDocumentReviewed","annotationSetOfAnnotation","isAnnotationInAnnotationSet","isSearchingAnnotationList"]),isAnnotationBeingEdited(){return this.editAnnotation&&this.editAnnotation.id},isDocumentEditable(){return!this.publicView&&!this.isDocumentReviewed&&!this.editMode}},watch:{editAnnotation(e){e||this.jumpToNextAnnotation||(this.count=0)},acceptAnnotation(e,t){!e&&t&&(this.focusOnNextAnnotation(),this.jumpToNextAnnotation=!1)},getAnnotationsFiltered(e,t){e.annotationSets.length!==t.annotationSets.length&&this.loadAccordions(e.annotationSets,t.annotationSets)},annotationId(e){if(e){const t=this.annotationSetOfAnnotation(e);if(t){const e={...this.annotationSetsAccordion};e[t.id||t.label_set.id]=!0,this.annotationSetsAccordion=e}}}},created(){window.addEventListener("keydown",this.keyDownHandler),this.getAnnotationsFiltered.annotationSets&&this.getAnnotationsFiltered.annotationSets.length>0&&this.loadAccordions(this.getAnnotationsFiltered.annotationSets)},unmounted(){window.removeEventListener("keydown",this.keyDownHandler)},methods:{annotationSetShouldAppear(e){return!(0===e.labels.length&&this.isSearchingAnnotationList)},isAccordionOpen(e){return this.isSearchingAnnotationList||!0===this.annotationSetsAccordion[e.id||e.label_set.id]},toggleAccordion(e){const t={...this.annotationSetsAccordion};t[e.id||e.label_set.id]=!t[e.id||e.label_set.id],this.annotationSetsAccordion=t},openAllAccordions(){const e={...this.annotationSetsAccordion};for(var t in e)e[t]=!0;this.annotationSetsAccordion=e},loadAccordions(e){if(e){const t=null===this.annotationSetsAccordion,n={},o=[];e.forEach(((e,i)=>{if(t&&this.annotationSetId)n[e.id||e.label_set.id]=e.id==this.annotationSetId;else if(t&&this.annotationId)n[e.id||e.label_set.id]=this.isAnnotationInAnnotationSet(e,this.annotationId);else if(t&&0===i)n[e.id||e.label_set.id]=!0;else{const t=o.find((t=>t.id&&e.id&&e.id===t.id));n[e.id||e.label_set.id]=void 0!==t}})),this.annotationSetsAccordion=n}},annotationSetHasAnnotations(e){const t=e.labels.find((e=>e.annotations.length>0));return t},focusOnNextAnnotation(){const e=this.createArray("keyboard-nav");e[this.count]?e[this.count].click():this.count=0},scrollToFocusedAnnotationFromKeyHandler(){if(!this.editAnnotation)return;let e;this.labels.map((t=>{const n=t.annotations.find((e=>e.id===this.editAnnotation.id));n&&(e=t)}));const t=this.getAnnotationsFiltered.annotations.find((e=>e.id===this.editAnnotation.id));t&&(this.$store.dispatch("document/setDocumentAnnotationSelected",{annotation:t,label:e,span:t.span[0],scrollTo:!1}),this.$store.dispatch("document/scrollToDocumentAnnotationSelected"))},exitEditMode(){this.count=0,this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"),this.$store.dispatch("document/endLoading")},createArray(e){if(this.$refs.annotationList)return Array.from(this.$refs.annotationList.getElementsByClassName(e))},keyDownHandler(e){if(!this.isDocumentEditable)return;if("Escape"===e.key)return void this.exitEditMode();if("ArrowUp"===e.key&&!this.isAnnotationBeingEdited)return;let t=this.createArray("keyboard-nav");const n=this.createArray("clicked-ann"),o=t.findIndex((e=>e===n[0]));if("ArrowDown"===e.key){if(this.openAllAccordions(),this.count>=t.length){const t=this.createArray("finish-review-btn");return t&&t[0]&&t[0].focus(),this.$store.dispatch("document/resetEditAnnotation"),this.count=0,void("Enter"!==e.key||t.disabled||t.click())}n[0]&&(this.count=o+1);const i=t[this.count];i.className.includes("label-group")?(i.click(),this.$nextTick((()=>{t=this.createArray("keyboard-nav"),t[this.count].click(),this.scrollToFocusedAnnotationFromKeyHandler(),this.count++}))):t[this.count]&&(t[this.count].click(),this.scrollToFocusedAnnotationFromKeyHandler(),this.count++)}else if("ArrowUp"===e.key){if(n[0]===t[0])return void(this.count=0);n[0]&&(this.count=o-1);const e=t[this.count];e.className.includes("label-group")?(e.click(),this.$nextTick((()=>{t=this.createArray("keyboard-nav");const e=t.findIndex((e=>e===n[0]));this.count=e-1,t[this.count].click(),this.scrollToFocusedAnnotationFromKeyHandler(),this.count--}))):t[this.count]&&(t[this.count].click(),this.scrollToFocusedAnnotationFromKeyHandler(),this.count--)}else if("Enter"===e.key){if(!this.getAnnotationsFiltered.annotations||!this.editAnnotation)return;const e=this.getAnnotationsFiltered.annotations.find((e=>e.id===this.editAnnotation.id));if(!this.editAnnotation&&this.editAnnotation.id!==e.id)return;this.count=o+1,this.jumpToNextAnnotation=!0}else{if("Delete"!==e.key||!t[o].className.includes("label-empty")||!t[o].className.includes("clicked"))return;this.editAnnotation.id===t[o].id&&this.markAnnotationsAsMissing(),this.jumpToNextAnnotation=!0}},markAnnotationsAsMissing(e,t,n,o){let i;if(e&&t&&!o)i=[{document:parseInt(this.documentId),label:e,label_set:t,annotation_set:n}];else if(this.editAnnotation&&null!==this.editAnnotation.id&&this.editAnnotation.annotationSet)i=[{document:parseInt(this.documentId),label:this.editAnnotation.label.id,label_set:this.editAnnotation.labelSet.id,annotation_set:this.editAnnotation.annotationSet.id}];else if(n&&o){const e=this.emptyLabels(n);i=e.map((e=>({document:parseInt(this.documentId),label:e.id,label_set:n.label_set.id,annotation_set:n.id})))}this.$store.dispatch("document/setAnnotationsMarkedAsMissing",i),this.$store.dispatch("document/addMissingAnnotations",i).then((e=>{e&&(this.jumpToNextAnnotation=!0),this.jumpToNextAnnotation=!1})).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})})).finally((()=>{this.$store.dispatch("document/setAnnotationsMarkedAsMissing",null),this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection")}))},handleHoverAnnotationSet(e,t){let n;n=t||e?{annotationSet:e,type:t}:null,this.$store.dispatch("document/setHoveredAnnotationSet",n)},acceptPendingAnnotationsInAnnotationSet(e){const t=[];if(e.labels.map((e=>{0!==e.annotations.length&&e.annotations.map((e=>{e.revised||t.push(e.id)}))})),0!==t.length){const e={ids:t,is_correct:!0,revised:!0};this.$store.dispatch("document/updateMultipleAnnotations",e).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})}))}},openAnnotationSetTable(e){this.$store.dispatch("selection/disableSelection"),this.$store.dispatch("document/resetEditAnnotation"),this.showAnnSetTable&&this.showAnnSetTable===e?this.$store.dispatch("display/toggleAnnSetTable",e):this.$store.dispatch("display/showAnnSetTable",e)},cleanSelection(){this.$store.dispatch("document/setAnnotationId",null)}}},gl=(0,$.A)(pl,[["render",mi],["__scopeId","data-v-309cdd6e"]]),Cl=gl,_l={class:"choose-label-set-modal"},bl={class:"modal-card-body"},El={class:"content"},Sl={key:0},fl=["innerHTML"],vl={key:1},Al={class:"label-set-list"},kl={class:"labels-list"},Nl={class:"next-step-description"};function wl(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button"),r=(0,o.resolveComponent)("b-modal");return(0,o.openBlock)(),(0,o.createElementBlock)("section",_l,[(0,o.createVNode)(r,{ref:"modal",modelValue:a.show,"onUpdate:modelValue":t[0]||(t[0]=e=>a.show=e),"can-cancel":["x","outside"],class:"modal-absolute modal-400 modal-no-footer model-overflow-visible","on-cancel":s.close},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("section",bl,[(0,o.createElementVNode)("div",El,[(0,o.createElementVNode)("h3",null,(0,o.toDisplayString)(e.$t("new_ann_set_title")),1),(0,o.createElementVNode)("div",null,[0===e.labelSetsFilteredForAnnotationSetCreation.length?((0,o.openBlock)(),(0,o.createElementBlock)("div",Sl,[(0,o.createElementVNode)("p",{innerHTML:`${e.$t("no_multi_ann_labelset_model")}\n ${e.showBranding?e.$t("no_multi_ann_labelset_model_link"):""}`},null,8,fl)])):((0,o.openBlock)(),(0,o.createElementBlock)("div",vl,[(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("new_ann_set_description")),1),(0,o.createElementVNode)("div",Al,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.labelSetsFilteredForAnnotationSetCreation,(t=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:t.id,class:"label-set-list-row"},[(0,o.createVNode)(l,{class:"full-width",type:"is-secondary",onClick:e=>s.submit(t)},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(`${t.name} ${e.numberOfLabelSetGroup(t)}`),1)])),_:2},1032,["onClick"]),(0,o.createElementVNode)("div",kl,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(t.labels,((e,n)=>((0,o.openBlock)(),(0,o.createElementBlock)("span",{key:e.id},(0,o.toDisplayString)(`${e.name}${n+1!==t.labels.length?", ":""}`),1)))),128))])])))),128))]),(0,o.createElementVNode)("p",Nl,(0,o.toDisplayString)(e.$t("new_ann_set_hint")),1)]))])])])])),_:1},8,["modelValue","on-cancel"])])}const yl={name:"CreateAnnotationSetModal",data(){return{show:!0}},computed:{...(0,s.aH)("display",["showBranding"]),...(0,s.L8)("document",["numberOfLabelSetGroup","labelSetsFilteredForAnnotationSetCreation"])},methods:{submit(e){this.$emit("finish",e),this.close()},close(){this.$store.dispatch("display/showChooseLabelSetModal",null),this.$emit("close")}}},Tl=(0,$.A)(yl,[["render",wl],["__scopeId","data-v-565aea8a"]]),Bl=Tl;const Dl={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ll(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Dl,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M4.5 4.94922C4.30222 4.94922 4.10888 5.00787 3.94443 5.11775C3.77998 5.22763 3.65181 5.38381 3.57612 5.56654C3.50043 5.74926 3.48063 5.95033 3.51922 6.14431C3.5578 6.33829 3.65304 6.51647 3.79289 6.65633C3.93275 6.79618 4.11093 6.89142 4.30491 6.93C4.49889 6.96859 4.69996 6.94879 4.88268 6.8731C5.06541 6.79741 5.22159 6.66924 5.33147 6.50479C5.44135 6.34034 5.5 6.147 5.5 5.94922C5.5 5.684 5.39464 5.42965 5.20711 5.24211C5.01957 5.05458 4.76522 4.94922 4.5 4.94922ZM4.5 8.44922C4.30222 8.44922 4.10888 8.50787 3.94443 8.61775C3.77998 8.72763 3.65181 8.88381 3.57612 9.06654C3.50043 9.24926 3.48063 9.45033 3.51922 9.64431C3.5578 9.83829 3.65304 10.0165 3.79289 10.1563C3.93275 10.2962 4.11093 10.3914 4.30491 10.43C4.49889 10.4686 4.69996 10.4488 4.88268 10.3731C5.06541 10.2974 5.22159 10.1692 5.33147 10.0048C5.44135 9.84034 5.5 9.647 5.5 9.44922C5.5 9.184 5.39464 8.92965 5.20711 8.74211C5.01957 8.55458 4.76522 8.44922 4.5 8.44922ZM8 3.44922C8.19778 3.44922 8.39112 3.39057 8.55557 3.28069C8.72002 3.17081 8.84819 3.01463 8.92388 2.8319C8.99957 2.64918 9.01937 2.44811 8.98079 2.25413C8.9422 2.06015 8.84696 1.88196 8.70711 1.74211C8.56725 1.60226 8.38907 1.50702 8.19509 1.46843C8.00111 1.42985 7.80004 1.44965 7.61732 1.52534C7.43459 1.60103 7.27841 1.7292 7.16853 1.89365C7.05865 2.0581 7 2.25144 7 2.44922C7 2.71444 7.10536 2.96879 7.29289 3.15633C7.48043 3.34386 7.73478 3.44922 8 3.44922ZM4.5 1.44922C4.30222 1.44922 4.10888 1.50787 3.94443 1.61775C3.77998 1.72763 3.65181 1.88381 3.57612 2.06654C3.50043 2.24926 3.48063 2.45033 3.51922 2.64431C3.5578 2.83829 3.65304 3.01647 3.79289 3.15633C3.93275 3.29618 4.11093 3.39142 4.30491 3.43C4.49889 3.46859 4.69996 3.44879 4.88268 3.3731C5.06541 3.29741 5.22159 3.16924 5.33147 3.00479C5.44135 2.84034 5.5 2.647 5.5 2.44922C5.5 2.184 5.39464 1.92965 5.20711 1.74211C5.01957 1.55458 4.76522 1.44922 4.5 1.44922ZM8 8.44922C7.80222 8.44922 7.60888 8.50787 7.44443 8.61775C7.27998 8.72763 7.15181 8.88381 7.07612 9.06654C7.00043 9.24926 6.98063 9.45033 7.01922 9.64431C7.0578 9.83829 7.15304 10.0165 7.29289 10.1563C7.43275 10.2962 7.61093 10.3914 7.80491 10.43C7.99889 10.4686 8.19996 10.4488 8.38268 10.3731C8.56541 10.2974 8.72159 10.1692 8.83147 10.0048C8.94135 9.84034 9 9.647 9 9.44922C9 9.184 8.89464 8.92965 8.70711 8.74211C8.51957 8.55458 8.26522 8.44922 8 8.44922ZM8 4.94922C7.80222 4.94922 7.60888 5.00787 7.44443 5.11775C7.27998 5.22763 7.15181 5.38381 7.07612 5.56654C7.00043 5.74926 6.98063 5.95033 7.01922 6.14431C7.0578 6.33829 7.15304 6.51647 7.29289 6.65633C7.43275 6.79618 7.61093 6.89142 7.80491 6.93C7.99889 6.96859 8.19996 6.94879 8.38268 6.8731C8.56541 6.79741 8.72159 6.66924 8.83147 6.50479C8.94135 6.34034 9 6.147 9 5.94922C9 5.684 8.89464 5.42965 8.70711 5.24211C8.51957 5.05458 8.26522 4.94922 8 4.94922Z",fill:"white"},null,-1)]))}const Vl={},xl=(0,$.A)(Vl,[["render",Ll]]),Ml=xl,Il=((0,s.aH)("display",["showAnnSetTable"]),(0,s.aH)("document",["annotations"]),{key:0,class:"pages-section"}),Ol={class:"info-bar"},Pl={key:1,class:"rename-and-categorize-section"},$l={key:2,class:"sidebar"},Rl={class:"confirmation-modal-container"};function Fl(e,t,n,i,a,s){const l=(0,o.resolveComponent)("EditPages"),r=(0,o.resolveComponent)("SplitInfoBar"),c=(0,o.resolveComponent)("RenameAndCategorize"),d=(0,o.resolveComponent)("EditSidebar"),h=(0,o.resolveComponent)("EditConfirmationModal");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{id:"document-edit",class:(0,o.normalizeClass)([e.renameAndCategorize&&"rename-and-categorize-component"])},[e.renameAndCategorize?((0,o.openBlock)(),(0,o.createElementBlock)("div",Pl,[(0,o.createVNode)(c,{"file-name":a.fileName,"file-extension":a.fileExtension,onChangePage:s.changePage},null,8,["file-name","file-extension","onChangePage"])])):((0,o.openBlock)(),(0,o.createElementBlock)("div",Il,[(0,o.createVNode)(l,{"splitting-lines":a.splittingLines,"split-suggestions-enabled":a.splitSuggestionsEnabled,onHandleSplittingLines:s.handleSplittingLines,onCheckMove:s.checkMove,onHandleDragEnd:s.handleDragEnd},null,8,["splitting-lines","split-suggestions-enabled","onHandleSplittingLines","onCheckMove","onHandleDragEnd"]),(0,o.createElementVNode)("div",Ol,[a.splitSuggestionsEnabled?((0,o.openBlock)(),(0,o.createBlock)(r,{key:0})):(0,o.createCommentVNode)("",!0)])])),e.renameAndCategorize?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",$l,[(0,o.createVNode)(d,{"split-suggestions-enabled":a.splitSuggestionsEnabled,onRotate:s.rotatePage,onRotateAllLeft:s.handleRotationsToTheLeft,onRotateAllRight:s.handleRotationsToTheRight,onHandleSplittingSuggestions:s.applySplittingSuggestions},null,8,["split-suggestions-enabled","onRotate","onRotateAllLeft","onRotateAllRight","onHandleSplittingSuggestions"])])),(0,o.createElementVNode)("div",Rl,[(0,o.createVNode)(h,{onSaveChanges:s.saveEditChanges},null,8,["onSaveChanges"])])],2)}const Hl={class:"edit-sidebar"},zl={class:"buttons-container"},Ul={class:"rotate-selected edit-buttons"},Zl={class:"rotate-all edit-buttons"},Gl={class:"smart-split"},Wl={class:"switch-info"},ql={class:"switch-text"};function jl(e,t,n,i,a,s){const l=(0,o.resolveComponent)("SidebarButtons"),r=(0,o.resolveComponent)("b-switch"),c=(0,o.resolveComponent)("b-field"),d=(0,o.resolveComponent)("b-tooltip");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Hl,[(0,o.createElementVNode)("div",zl,[(0,o.createElementVNode)("div",Ul,[(0,o.createVNode)(l,{"show-rotate-button":!0,"button-disabled":a.buttonDisabled,"button-text":e.$t("rotate_selected"),icon:"arrow-rotate-left",onRotate:s.rotateLeft},null,8,["button-disabled","button-text","onRotate"]),(0,o.createVNode)(l,{"show-rotate-button":!0,"button-disabled":a.buttonDisabled,"button-text":e.$t("rotate_selected"),icon:"arrow-rotate-right",onRotate:s.rotateRight},null,8,["button-disabled","button-text","onRotate"]),(0,o.createElementVNode)("p",{class:(0,o.normalizeClass)(["pages-selected",a.buttonDisabled&&"disabled"])},(0,o.toDisplayString)(e.selectedPages.length)+" "+(0,o.toDisplayString)(e.$t("selected")),3)]),(0,o.createElementVNode)("div",Zl,[(0,o.createVNode)(l,{"show-rotate-button":!0,"button-disabled":!1,"button-text":e.$t("rotate_all"),icon:"arrow-rotate-left",onRotate:s.rotateAllLeft},null,8,["button-text","onRotate"]),(0,o.createVNode)(l,{"show-rotate-button":!0,"button-disabled":!1,"button-text":e.$t("rotate_all"),icon:"arrow-rotate-right",onRotate:s.rotateAllRight},null,8,["button-text","onRotate"])])]),(0,o.createElementVNode)("div",Gl,[(0,o.createVNode)(d,{multilined:"",active:!e.documentHasProposedSplit(e.selectedDocument),position:"is-bottom",class:"bottom-aligned split-tooltip",label:a.tooltipInfo},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(c,null,{default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{modelValue:a.switchStatus,"onUpdate:modelValue":t[0]||(t[0]=e=>a.switchStatus=e),value:!0,size:"is-small",disabled:!e.documentHasProposedSplit(e.selectedDocument),class:"split-switch"},null,8,["modelValue","disabled"]),(0,o.createElementVNode)("div",Wl,[(0,o.createElementVNode)("span",ql,(0,o.toDisplayString)(e.$t("smart_split")),1)])])),_:1})])),_:1},8,["active","label"])])])}const Kl={class:"sidebar-buttons"},Yl={key:0,class:"rotate-button-container"},Jl={class:"button-content"},Xl={class:"button-text"};function Ql(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-button");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Kl,[n.showRotateButton?((0,o.openBlock)(),(0,o.createElementBlock)("div",Yl,[(0,o.createVNode)(r,{class:"rotate-button edit-mode-btn primary-button",disabled:n.buttonDisabled,onClick:s.rotateButton},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",Jl,[(0,o.createVNode)(l,{icon:n.icon,class:"is-small"},null,8,["icon"]),(0,o.createElementVNode)("span",Xl,(0,o.toDisplayString)(n.buttonText),1)])])),_:1},8,["disabled","onClick"])])):(0,o.createCommentVNode)("",!0)])}const er={name:"SidebarButtons",props:{showRotateButton:{type:Boolean,default:!1},buttonDisabled:{type:Boolean,default:!0},buttonText:{type:String,default:null},icon:{type:String,default:null},tooltipInfo:{type:String,default:null}},methods:{rotateButton(){this.$emit("rotate")}}},tr=(0,$.A)(er,[["render",Ql],["__scopeId","data-v-c4cb62fa"]]),nr=tr,or={name:"EditSidebar",components:{SidebarButtons:nr},props:{splitSuggestionsEnabled:{type:Boolean}},data(){return{buttonDisabled:!0,tooltipInfo:null,switchStatus:!0}},computed:{...(0,s.aH)("edit",["selectedPages","updatedDocument"]),...(0,s.aH)("document",["splittingSuggestions","selectedDocument"]),...(0,s.L8)("document",["documentHasProposedSplit"])},watch:{selectedPages(e){e.length>0?this.buttonDisabled=!1:this.buttonDisabled=!0},switchStatus(e){this.splittingSuggestions&&this.splittingSuggestions.length>0&&this.$emit("handle-splitting-suggestions",e)},splitSuggestionsEnabled(e){e||(this.switchStatus=!1)},updatedDocument(e){e&&1===e.length&&(this.switchStatus=!1)}},mounted(){this.$nextTick((()=>{this.switchStatus=this.splitSuggestionsEnabled,this.tooltipInfo=this.$t("no_splitting_suggestions")}))},methods:{rotateLeft(){this.$emit("rotate","left")},rotateRight(){this.$emit("rotate","right")},rotateAllLeft(){this.$emit("rotate-all-left")},rotateAllRight(){this.$emit("rotate-all-right")}}},ir=(0,$.A)(or,[["render",jl],["__scopeId","data-v-bc1216ea"]]),ar=ir,sr={class:"rename-and-categorize"},lr={class:"back-btn-section"},rr={class:"back-text"},cr={class:"rename-and-categorize-title"},dr={class:"new-documents-container"},hr={class:"rename-and-categorize-thumbnails"},ur={class:"split-documents"},mr=["onClick"],pr={class:"icon-container"},gr={class:"action-icon"},Cr={class:"doc-info"},_r={class:"file-name-section"},br=["value","onBlur"],Er={class:"file-extension-container"},Sr={class:"category"};function fr(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-skeleton"),c=(0,o.resolveComponent)("ServerImage"),d=(0,o.resolveComponent)("EyeIcon"),h=(0,o.resolveComponent)("DocumentCategory");return(0,o.openBlock)(),(0,o.createElementBlock)("div",sr,[(0,o.createElementVNode)("div",{class:"back-section",onClick:t[0]||(t[0]=(...e)=>s.handleBackButton&&s.handleBackButton(...e))},[(0,o.createElementVNode)("div",lr,[(0,o.createVNode)(l,{icon:"arrow-left",class:"is-small arrow",style:{color:"#1a1a1a",cursor:"pointer"}})]),(0,o.createElementVNode)("div",rr,(0,o.toDisplayString)(e.$t("rotate_split_reorder")),1)]),(0,o.createElementVNode)("div",cr,(0,o.toDisplayString)(e.$t("rename_and_categorize")),1),(0,o.createElementVNode)("div",dr,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.updatedDocument,((i,l)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:l,class:"document-details"},[(0,o.createElementVNode)("div",hr,[(0,o.createElementVNode)("div",ur,[(0,o.createElementVNode)("div",{class:"image-container",onClick:e=>s.handlePageChange(i.pages[0].number)},[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["thumbnail",i.pages.length>1&&"page-stack"])},[(0,o.createVNode)(c,{ref_for:!0,ref:"image",style:(0,o.normalizeStyle)({transform:"rotate("+s.getRotation(i.pages[0].id)+"deg)"}),"image-url":s.getImageUrl(i),class:"page-thumbnail"},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{width:"60px",height:"60px"})])),_:2},1032,["style","image-url"]),(0,o.createElementVNode)("div",pr,[(0,o.createElementVNode)("div",gr,[(0,o.createVNode)(d)])])],2)],8,mr)])]),(0,o.createElementVNode)("div",Cr,[(0,o.createElementVNode)("div",_r,[(0,o.createElementVNode)("input",{type:"text",class:"name-input",value:s.getFileName(i.name),onInput:t[1]||(t[1]=(...e)=>s.handleInput&&s.handleInput(...e)),onPaste:t[2]||(t[2]=(...e)=>s.handlePaste&&s.handlePaste(...e)),onBlur:e=>s.handleChanges(i)},null,40,br),(0,o.createElementVNode)("div",Er,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(`.${n.fileExtension}`),1)])]),(0,o.createElementVNode)("div",Sr,[(0,o.createVNode)(h,{"selected-document":e.selectedDocument,"split-mode":a.splitMode,page:i,index:l,onCategoryChange:s.handleChanges},null,8,["selected-document","split-mode","page","index","onCategoryChange"])])])])))),128))])])}const vr={ref:"tooltipContent"},Ar={class:"category-drop-down"},kr={class:"icon"},Nr={class:"category-info"},wr={key:0,class:"category-title"},yr={class:"category-name"},Tr={key:0},Br={key:0},Dr={key:1,class:"loading-bar"};function Lr(e,t,n,i,a,s){const l=(0,o.resolveComponent)("CategoryIcon"),r=(0,o.resolveComponent)("b-icon"),c=(0,o.resolveComponent)("b-dropdown-item"),d=(0,o.resolveComponent)("b-dropdown"),h=(0,o.resolveComponent)("b-tooltip"),u=(0,o.resolveComponent)("b-skeleton");return e.categories?((0,o.openBlock)(),(0,o.createBlock)(h,{key:0,multilined:"",active:a.tooltipIsShown||a.dropdownIsDisabled,size:"is-large",position:"is-bottom",class:(0,o.normalizeClass)([e.editMode?"right-aligned full-height-tooltip":"left-aligned full-height-tooltip"])},{content:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",vr,null,512)])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(d,{class:(0,o.normalizeClass)(["category-chooser",n.splitMode&&"split-mode",e.isDocumentReviewed&&"disabled"]),"aria-role":"list",scrollable:"",disabled:a.dropdownIsDisabled},{trigger:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",Ar,[(0,o.createElementVNode)("div",kr,[(0,o.createVNode)(l)]),(0,o.createElementVNode)("div",Nr,[n.splitMode?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("p",wr,(0,o.toDisplayString)(e.$t("category")),1)),(0,o.createElementVNode)("div",yr,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(s.setCategoryDefaultText),1),n.splitMode&&s.setCategoryConfidence>=0?((0,o.openBlock)(),(0,o.createElementBlock)("span",Tr,(0,o.toDisplayString)(`(${s.setCategoryConfidence}%)`),1)):(0,o.createCommentVNode)("",!0)])]),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)([!n.splitMode&&"caret-section"])},[(0,o.createVNode)(r,{icon:"angle-down",size:"is-small",class:(0,o.normalizeClass)(["caret",n.splitMode&&"split-mode-caret"])},null,8,["class"])],2)])])),default:(0,o.withCtx)((()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(s.listOfCategories(),(e=>((0,o.openBlock)(),(0,o.createBlock)(c,{key:e.id,"aria-role":"listitem",class:"list-item",disabled:s.handleOptionInDropdownDisabled(e),onClick:t=>s.handleChangeCategory(e)},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.name),1),n.splitMode&&e.confidence>=0?((0,o.openBlock)(),(0,o.createElementBlock)("span",Br,(0,o.toDisplayString)(` (${e.confidence}%)`),1)):(0,o.createCommentVNode)("",!0)])),_:2},1032,["disabled","onClick"])))),128))])),_:1},8,["class","disabled"])])),_:1},8,["active","class"])):((0,o.openBlock)(),(0,o.createElementBlock)("div",Dr,[(0,o.createVNode)(u,{width:"auto",height:"100%"})]))}const Vr={name:"DocumentCategory",components:{CategoryIcon:H},props:{splitMode:{type:Boolean},page:{type:Object,default:null},index:{type:Number,default:0}},data(){return{categoryError:!1,tooltipIsShown:!1,dropdownIsDisabled:!1}},computed:{...(0,s.L8)("category",["categoryName","projectHasSingleCategory","categoryConfidence"]),...(0,s.L8)("document",["documentCannotBeEdited","documentHasCorrectAnnotations","isDocumentReviewed"]),...(0,s.aH)("document",["selectedDocument","annotations"]),...(0,s.aH)("category",["categories"]),...(0,s.aH)("edit",["editMode","updatedDocument"]),setCategoryDefaultText(){if(this.splitMode){const e=this.updatedDocument.find((e=>!e.category));if(this.projectHasSingleCategory&&e){const e=this.updatedDocument.map((e=>(!e.category&&this.categories&&(e.category=this.categories[0].id),e)));this.$store.dispatch("edit/setUpdatedDocument",e)}const t=this.categoryName(this.updatedDocument[this.index].category);return t||this.$t("choose_category")}return this.categoryName(this.selectedDocument.category)},setCategoryConfidence(){if(!this.updatedDocument[this.index].categories||!this.categoryName(this.updatedDocument[this.index].category))return;const e=this.updatedDocument[this.index].categories.find((e=>e.id===this.updatedDocument[this.index].category));return this.categoryConfidence(e.confidence)}},watch:{annotations(){this.checkIfDropdownIsDisabled(),this.setTooltipText()}},mounted(){this.projectHasSingleCategory&&(this.tooltipIsShown=!0)},updated(){this.setTooltipText(),this.checkIfDropdownIsDisabled()},methods:{listOfCategories(){let e;if(this.splitMode&&this.updatedDocument[this.index].categories)e=this.handleCategories(this.updatedDocument[this.index].categories);else if(this.categories){const t=this.categories.filter((e=>e.project===this.selectedDocument.project));e=this.handleCategories(t)}return e},handleCategories(e){return e.map((e=>({id:e.id,name:this.categoryName(e.id),confidence:this.categoryConfidence(e.confidence)})))},checkIfDropdownIsDisabled(){this.projectHasSingleCategory||this.documentCannotBeEdited(this.selectedDocument)||this.documentHasCorrectAnnotations&&!this.splitMode?this.dropdownIsDisabled=!0:this.dropdownIsDisabled=!1},handleOptionInDropdownDisabled(e){return this.splitMode?e.id===this.updatedDocument[this.index].category:e.id===this.selectedDocument.category},handleChangeCategory(e){const t={category:e.id};if(!this.splitMode)return this.$store.dispatch("document/startRecalculatingAnnotations"),void this.$store.dispatch("document/updateDocument",t).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})})).finally((()=>{this.$store.dispatch("document/endRecalculatingAnnotations")}));this.$emit("category-change",this.page,e.id)},setTooltipText(){if(this.categories){let e;this.documentCannotBeEdited(this.selectedDocument)?e=this.$t("edit_not_available"):this.documentHasCorrectAnnotations?e=this.$t("approved_annotations"):this.projectHasSingleCategory&&(e=this.$t("single_category_in_project")),this.$refs.tooltipContent.innerHTML=e}}}},xr=(0,$.A)(Vr,[["render",Lr],["__scopeId","data-v-00b8045a"]]),Mr=xr,Ir={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Or(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Ir,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#FFFFFF",d:"M21.92,11.6C19.9,6.91,16.1,4,12,4S4.1,6.91,2.08,11.6a1,1,0,0,0,0,.8C4.1,17.09,7.9,20,12,20s7.9-2.91,9.92-7.6A1,1,0,0,0,21.92,11.6ZM12,18c-3.17,0-6.17-2.29-7.9-6C5.83,8.29,8.83,6,12,6s6.17,2.29,7.9,6C18.17,15.71,15.17,18,12,18ZM12,8a4,4,0,1,0,4,4A4,4,0,0,0,12,8Zm0,6a2,2,0,1,1,2-2A2,2,0,0,1,12,14Z"},null,-1)]))}const Pr={},$r=(0,$.A)(Pr,[["render",Or]]),Rr=$r,Fr={name:"RenameAndCategorize",components:{DocumentCategory:Mr,ServerImage:we,EyeIcon:Rr},props:{fileName:{type:String,default:""},fileExtension:{type:String,default:""}},data(){return{splitMode:!0,updatedFileName:null}},computed:{...(0,s.aH)("document",["selectedDocument","pages"]),...(0,s.aH)("edit",["updatedDocument","pagesForPostprocess"])},methods:{handleBackButton(){this.$store.dispatch("edit/setRenameAndCategorize",!1)},handlePaste(e){e.preventDefault()},handleInput(e){this.updatedFileName=e.target.value.trim()},handleChanges(e,t){const n=this.updatedDocument.map((n=>n.pages[0].id===e.pages[0].id?this.updatedFileName?{...n,name:`${this.updatedFileName}.${this.fileExtension}`}:t?{...n,category:t}:n:n));this.$store.dispatch("edit/setUpdatedDocument",n),this.updatedFileName&&(this.updatedFileName=null)},handlePageChange(e){this.$emit("change-page",e)},getFileName(e){if(e)return e.split(".").slice(0,-1).join(".")},getImageUrl(e){if(!this.pagesForPostprocess||!this.pages||!e)return;const t=this.pagesForPostprocess.find((t=>t.number===e.pages[0].number));return`${t.thumbnail_url}?${t.updated_at}`},getRotation(e){return this.pagesForPostprocess?.find((t=>t.id===e))?.angle}}},Hr=(0,$.A)(Fr,[["render",fr],["__scopeId","data-v-7b950a9d"]]),zr=Hr,Ur={class:"edit-pages"},Zr={class:"grid-header"},Gr={class:"header-title"},Wr=["id"],qr={class:"top-section"},jr=["onClick"],Kr={class:"scissors-icon"},Yr={key:0,class:"lines active-split"},Jr={key:1,class:"lines not-active-split"},Xr={class:"bottom-section"},Qr={class:"page-number"};function ec(e,t,n,i,a,s){const l=(0,o.resolveComponent)("EditPageThumbnail"),r=(0,o.resolveComponent)("b-icon"),c=(0,o.resolveComponent)("SplitZigZag"),d=(0,o.resolveComponent)("SplitLines"),h=(0,o.resolveComponent)("draggable");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Ur,[(0,o.createElementVNode)("div",Zr,[(0,o.createElementVNode)("span",Gr,(0,o.toDisplayString)(e.$t("rotate_split_reorder")),1)]),(0,o.createVNode)(h,{modelValue:a.editPages,"onUpdate:modelValue":t[0]||(t[0]=e=>a.editPages=e),class:"document-grid",easing:"cubic-bezier(0.37, 0, 0.63, 1)","item-key":"id",move:s.checkMove,onStart:t[1]||(t[1]=t=>e.dragging=!0),onEnd:s.handleDragEnd},{item:(0,o.withCtx)((({element:e,index:t})=>[((0,o.openBlock)(),(0,o.createElementBlock)("div",{id:e.id,key:e.id,class:"image-section",tabindex:"0"},[(0,o.createElementVNode)("div",qr,[(0,o.createVNode)(l,{page:e,index:t,rotation:s.getRotation(e.id)},null,8,["page","index","rotation"]),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["splitting-lines",n.splittingLines&&n.splittingLines[t].page===e.number&&"active-split"]),onClick:t=>s.handleSplittingLines(e.number,"manual")},[(0,o.createElementVNode)("div",Kr,[(0,o.createVNode)(r,{icon:"scissors",class:"is-small"})]),n.splittingLines&&n.splittingLines[t].page===e.number?((0,o.openBlock)(),(0,o.createElementBlock)("div",Yr,[(0,o.createVNode)(c,{color:n.splittingLines&&n.splittingLines[t].origin&&"AI"===n.splittingLines[t].origin&&n.splitSuggestionsEnabled?"green":"dark"},null,8,["color"])])):((0,o.openBlock)(),(0,o.createElementBlock)("div",Jr,[(0,o.createVNode)(d)]))],10,jr)]),(0,o.createElementVNode)("div",Xr,[(0,o.createElementVNode)("span",Qr,(0,o.toDisplayString)(e.number),1)])],8,Wr))])),_:1},8,["modelValue","move","onEnd"])])}const tc={width:"2",height:"59",viewBox:"0 0 2 59",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function nc(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",tc,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M1 0.908203V58.2693",stroke:"#858C9A","stroke-opacity":"0.4","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"2 2"},null,-1)]))}const oc={},ic=(0,$.A)(oc,[["render",nc]]),ac=ic,sc={key:0,width:"6",height:"57",viewBox:"0 0 6 57",fill:"none",xmlns:"http://www.w3.org/2000/svg"},lc={key:1,width:"6",height:"52",viewBox:"0 0 6 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rc(e,t,n,i,a,s){return(0,o.openBlock)(),(0,o.createElementBlock)("div",null,["dark"===n.color?((0,o.openBlock)(),(0,o.createElementBlock)("svg",sc,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M1 1L5 7.875L1 14.75L5 21.625L1 28.5L5 35.375L1 42.25L5 49.125L1 56",stroke:"#1A1A1A","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(0,o.createCommentVNode)("",!0),"green"===n.color?((0,o.openBlock)(),(0,o.createElementBlock)("svg",lc,t[1]||(t[1]=[(0,o.createElementVNode)("path",{d:"M1 1.67383L5 7.81966L1 13.9655L5 20.1113L1 26.2572L5 32.403L1 38.5488L5 44.6947L1 50.8405",stroke:"#44B78B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(0,o.createCommentVNode)("",!0)])}const cc={name:"SplitZigZag",props:{color:{type:String,default:null,required:!1}}},dc=(0,$.A)(cc,[["render",rc]]),hc=dc,uc=["tabindex"],mc={key:0,class:"action-icon"};function pc(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton"),r=(0,o.resolveComponent)("ServerImage"),c=(0,o.resolveComponent)("EyeIcon"),d=(0,o.resolveComponent)("b-checkbox");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"edit-page-thumbnail",tabindex:n.index,onMouseenter:t[2]||(t[2]=e=>a.isHover=!0),onMouseleave:t[3]||(t[3]=e=>a.isHover=!1)},[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["page-thumbnail",s.isVisible&&"visible",a.checkboxValue&&"selected"]),style:(0,o.normalizeStyle)(`rotate:${n.rotation}deg`),onClick:t[0]||(t[0]=e=>s.selectPage())},[(0,o.createVNode)(r,{"image-url":`${n.page.thumbnail_url}?${n.page.updated_at}`},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{width:"80px",height:"80px"})])),_:1},8,["image-url"]),s.isVisible?((0,o.openBlock)(),(0,o.createElementBlock)("div",mc,[(0,o.createVNode)(c)])):(0,o.createCommentVNode)("",!0)],6),(0,o.withDirectives)((0,o.createVNode)(d,{modelValue:a.checkboxValue,"onUpdate:modelValue":t[1]||(t[1]=e=>a.checkboxValue=e),class:"action-checkbox",onInput:s.checkboxInput},null,8,["modelValue","onInput"]),[[o.vShow,a.isHover||a.checkboxValue]])],40,uc)}const gc={name:"EditPageThumbnail",components:{ServerImage:we,EyeIcon:Rr},props:{page:{required:!0,type:Object,default:null},index:{required:!0,type:Number,default:0},rotation:{required:!1,type:Number,default:0}},data(){return{isHover:!1,checkboxValue:!1}},computed:{...(0,s.aH)("display",["currentPage"]),...(0,s.aH)("edit",["selectedPages"]),...(0,s.L8)("edit",["isPageSelected"]),isVisible(){return this.currentPage===this.page.number},isSelected(){return void 0!==this.isPageSelected(this.page.id)}},watch:{isSelected(){this.checkboxValue=this.isSelected}},mounted(){this.checkboxValue=this.isSelected},methods:{selectPage(e=!this.isSelected){this.changePage(),this.$store.dispatch(e?"edit/selectPage":"edit/unselectPage",this.page)},checkboxInput(e){this.selectPage(e)},changePage(){this.isVisible||this.$store.dispatch("display/updateCurrentPage",parseInt(this.page.number,10))}}},Cc=(0,$.A)(gc,[["render",pc],["__scopeId","data-v-3284908e"]]),_c=Cc;var bc=n(432),Ec=n.n(bc);const Sc={name:"EditPages",components:{SplitLines:ac,SplitZigZag:hc,EditPageThumbnail:_c,draggable:Ec()},props:{splittingLines:{type:Array,default:null},splitSuggestionsEnabled:{type:Boolean,default:!1}},data(){return{editPages:null}},computed:{...(0,s.aH)("document",["pages","recalculatingAnnotations","selectedDocument","splittingSuggestions"]),...(0,s.aH)("edit",["editMode","pagesForPostprocess","renameAndCategorize"])},watch:{pagesForPostprocess(e,t){e!==t&&(this.editPages=e)},editPages(e,t){e!==t&&this.$store.dispatch("edit/setPagesForPostprocess",e)},renameAndCategorize(e){e&&(this.editPages=this.pagesForPostprocess)}},mounted(){this.pagesForPostprocess.length>0&&(this.editPages=this.pagesForPostprocess)},methods:{deselect(){this.$store.dispatch("edit/setSelectedPages")},getRotation(e){return this.pagesForPostprocess?.find((t=>t.id===e))?.angle},handleSplittingLines(e,t){this.$emit("handle-splitting-lines",e,t)},checkMove(e){this.$emit("check-move",e)},handleDragEnd(){this.draggable=!1,this.$emit("handle-drag-end")}}},fc=(0,$.A)(Sc,[["render",ec],["__scopeId","data-v-233044dc"]]),vc=fc,Ac={class:"split-info-bar"},kc={class:"bar-icon"};function Nc(e,t,n,i,a,s){const l=(0,o.resolveComponent)("StarIcon");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Ac,[(0,o.createElementVNode)("div",kc,[(0,o.createVNode)(l)]),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("smart_split_suggestions")),1)])}const wc={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yc(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",wc,t[0]||(t[0]=[(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.99935 0.667969C3.36754 0.667969 3.66602 0.966446 3.66602 1.33464V2.33464H4.66602C5.03421 2.33464 5.33268 2.63311 5.33268 3.0013C5.33268 3.36949 5.03421 3.66797 4.66602 3.66797H3.66602V4.66797C3.66602 5.03616 3.36754 5.33464 2.99935 5.33464C2.63116 5.33464 2.33268 5.03616 2.33268 4.66797V3.66797H1.33268C0.964492 3.66797 0.666016 3.36949 0.666016 3.0013C0.666016 2.63311 0.964492 2.33464 1.33268 2.33464H2.33268V1.33464C2.33268 0.966446 2.63116 0.667969 2.99935 0.667969ZM8.66601 1.33464C8.94186 1.33464 9.18922 1.50452 9.28824 1.76198L10.4444 4.76789C10.6446 5.28859 10.7076 5.43863 10.7936 5.5597C10.88 5.68117 10.9861 5.7873 11.1076 5.87367C11.2287 5.95975 11.3787 6.02268 11.8994 6.22295L14.9053 7.37907C15.1628 7.47809 15.3327 7.72545 15.3327 8.0013C15.3327 8.27715 15.1628 8.52451 14.9053 8.62353L11.8994 9.77965C11.3787 9.97992 11.2287 10.0429 11.1076 10.1289C10.9861 10.2153 10.88 10.3214 10.7936 10.4429C10.7076 10.564 10.6446 10.714 10.4444 11.2347L9.28825 14.2406C9.18922 14.4981 8.94186 14.668 8.66602 14.668C8.39017 14.668 8.14281 14.4981 8.04379 14.2406L6.88767 11.2347C6.6874 10.714 6.62447 10.564 6.53838 10.4429C6.45201 10.3214 6.34588 10.2153 6.22441 10.1289C6.10335 10.0429 5.9533 9.97992 5.4326 9.77965L2.4267 8.62353C2.16923 8.52451 1.99935 8.27715 1.99935 8.0013C1.99935 7.72545 2.16923 7.47809 2.4267 7.37907L5.4326 6.22295C5.9533 6.02268 6.10335 5.95975 6.22441 5.87367C6.34588 5.7873 6.45201 5.68117 6.53838 5.5597C6.62447 5.43863 6.6874 5.28859 6.88767 4.76789L8.04378 1.76198C8.14281 1.50452 8.39017 1.33464 8.66601 1.33464ZM2.99935 10.668C3.36754 10.668 3.66602 10.9664 3.66602 11.3346V12.3346H4.66602C5.03421 12.3346 5.33268 12.6331 5.33268 13.0013C5.33268 13.3695 5.03421 13.668 4.66602 13.668H3.66602V14.668C3.66602 15.0362 3.36754 15.3346 2.99935 15.3346C2.63116 15.3346 2.33268 15.0362 2.33268 14.668V13.668H1.33268C0.964492 13.668 0.666016 13.3695 0.666016 13.0013C0.666016 12.6331 0.964492 12.3346 1.33268 12.3346H2.33268V11.3346C2.33268 10.9664 2.63116 10.668 2.99935 10.668Z",fill:"#41AF85"},null,-1)]))}const Tc={},Bc=(0,$.A)(Tc,[["render",yc]]),Dc=Bc,Lc={name:"SplitInfoBar",components:{StarIcon:Dc}},Vc=(0,$.A)(Lc,[["render",Nc],["__scopeId","data-v-53be5126"]]),xc=Vc,Mc={class:"edit-confirmation-modal"},Ic={class:"modal-card-body"},Oc={class:"header"},Pc={class:"modal-title"},$c={class:"content"},Rc={class:"modal-card-foot"};function Fc(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button"),r=(0,o.resolveComponent)("b-modal");return(0,o.openBlock)(),(0,o.createElementBlock)("section",Mc,[(0,o.createVNode)(r,{modelValue:a.isModalActive,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isModalActive=e),"can-cancel":[],class:"edit-modal"},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("section",Ic,[(0,o.createElementVNode)("div",Oc,[(0,o.createElementVNode)("p",Pc,(0,o.toDisplayString)(e.$t("confirm_splitting")),1)]),(0,o.createElementVNode)("div",$c,(0,o.toDisplayString)(e.$t("splitting_warning")),1)]),(0,o.createElementVNode)("footer",Rc,[(0,o.createVNode)(l,{onClick:s.closeModal},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("no")),1)])),_:1},8,["onClick"]),(0,o.createVNode)(l,{type:"is-primary",onClick:s.confirmChanges},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("yes")),1)])),_:1},8,["onClick"])])])),_:1},8,["modelValue"])])}const Hc={name:"EditConfirmationModal",data(){return{isModalActive:!1}},computed:{...(0,s.aH)("edit",["showEditConfirmationModal"])},watch:{showEditConfirmationModal(e){this.isModalActive=e}},methods:{closeModal(){this.isModalActive=!1,this.$store.dispatch("edit/setShowEditConfirmationModal",!1)},confirmChanges(){this.$emit("save-changes"),this.isModalActive=!1}}},zc=(0,$.A)(Hc,[["render",Fc],["__scopeId","data-v-01991ceb"]]),Uc=zc,Zc={name:"DocumentEdit",components:{EditSidebar:ar,RenameAndCategorize:zr,EditPages:vc,SplitInfoBar:xc,EditConfirmationModal:Uc},data(){return{fileName:null,fileExtension:null,splittingLines:[],dragging:!1,prevPageAtIndex:null,splitSuggestionsEnabled:!1}},computed:{...(0,s.aH)("document",["recalculatingAnnotations","selectedDocument","splittingSuggestions","pages"]),...(0,s.aH)("display",["currentPage"]),...(0,s.aH)("edit",["editMode","pagesForPostprocess","updatedDocument","renameAndCategorize","selectedPages","submitEditChanges"]),...(0,s.aH)("project",["projectId","documentsListPath","currentUser"]),...(0,s.L8)("edit",["documentShouldBePostprocessed"]),...(0,s.L8)("document",["waitingForSplittingConfirmation"])},watch:{renameAndCategorize(e){e&&this.splitFileNameFromExtension()},pagesForPostprocess(e,t){e&&this.saveUpdatedDocuments()},splittingLines(e){const t=e.find((e=>"AI"===e.origin));t||(this.splitSuggestionsEnabled=!1)},submitEditChanges(e){e&&this.saveEditChanges()},updatedDocument(e,t){e&&t&&e.length!==t.length&&1===e.length&&this.saveUpdatedDocuments()}},mounted(){this.setPages()},methods:{setPages(){this.selectedDocument&&(this.$store.dispatch("edit/setPagesForPostprocess",this.createPagesForPostprocess()),this.selectedDocument.pages.length>0&&(this.selectedDocument.pages.map((e=>{e.number!==this.selectedDocument.pages.length?this.setSplittingArray(0,null):this.setSplittingArray(e.number,null)})),this.splittingSuggestions&&(this.splitSuggestionsEnabled=!0,this.setAutomaticSplitting())))},createPagesForPostprocess(){return this.selectedDocument.pages.map((e=>({id:e.id,angle:0,number:e.number,thumbnail_url:e.thumbnail_url,image_url:e.image_url,size:e.size,updated_at:this.selectedDocument.downloaded_at})))},changePage(e){e!=this.currentPage&&this.$store.dispatch("display/updateCurrentPage",parseInt(e,10))},rotatePage(e){this.selectedPages.forEach((t=>{this.$store.dispatch("edit/rotatePage",{page:t,direction:e})}))},handleRotationsToTheLeft(){this.$store.dispatch("edit/updateRotationToTheLeft")},handleRotationsToTheRight(){this.$store.dispatch("edit/updateRotationToTheRight")},setAutomaticSplitting(){this.splittingSuggestions&&this.splittingSuggestions.map((e=>{const t=this.selectedDocument.pages.find((t=>t.id===e.pages[e.pages.length-1].id));this.handleSplittingLines(t.number,"AI")}))},applySplittingSuggestions(e){this.splitSuggestionsEnabled=e,this.setAutomaticSplitting()},setSplittingArray(e,t){this.splittingLines.push({page:e,origin:t})},splitFileNameFromExtension(){(this.selectedDocument||this.selectedDocument.data_file_name)&&(this.fileName=this.selectedDocument.data_file_name.split(".").slice(0,-1).join("."),this.fileExtension=this.selectedDocument.data_file_name.split(".").at(-1))},handleSplittingLines(e,t){const n=this.splittingLines.find((t=>t.page===e)),o={page:e,origin:t},i={page:0,origin:t};if(this.splitSuggestionsEnabled&&"AI"===t)this.splittingLines.splice(e-1,1,o);else{if(e===this.splittingLines.length||!this.splitSuggestionsEnabled&&!n&&"AI"===t)return;if(n){if(!this.splitSuggestionsEnabled&&n.origin!==t)return;this.splittingLines.splice(e-1,1,i)}else this.splittingLines.splice(e-1,1,o)}this.saveUpdatedDocuments()},saveUpdatedDocuments(){this.splitFileNameFromExtension();const e=this.splittingLines.filter((e=>0!==e.page)),t=this.createEachNewDocument(e,e.length);this.$store.dispatch("edit/setUpdatedDocument",t)},createEachNewDocument(e,t){const n=new Array(t);for(let o=0;o<t;o++){const t={name:this.handleNewDocumentName(o),category:this.handleNewDocumentCategory(o,e),categories:this.handleNewDocumentCategoriesAndConfidence(o,e),pages:this.handleNewDocumentPages(o,e)};n.splice(o,1,t)}return n},handleNewDocumentName(e){let t;return t=0===e?this.selectedDocument.data_file_name:1===e?`${this.fileName}_copy.${this.fileExtension}`:`${this.fileName}_copy${e}.${this.fileExtension}`,t},handleNewDocumentCategory(e,t){if(this.updatedDocument&&this.updatedDocument.length>1&&t[e].origin&&"AI"===t[e].origin){const n=this.indexOfSplittingSuggestion(e,t);return this.splittingSuggestions[n].category}return this.selectedDocument.category},handleNewDocumentCategoriesAndConfidence(e,t){if(this.updatedDocument&&this.updatedDocument.length>1&&t[e].origin&&"AI"===t[e].origin){const n=this.indexOfSplittingSuggestion(e,t);return this.splittingSuggestions[n].categories}return null},handleNewDocumentPages(e,t){let n;return n=0===e?this.pagesForPostprocess.slice(0,t[e].page):t[e].page?this.pagesForPostprocess.slice(t[e-1].page,t[e].page):this.pagesForPostprocess.slice(t[e-1].page),n},indexOfSplittingSuggestion(e,t){const n=this.selectedDocument.pages.find((n=>n.number===t[e].page)),o=this.splittingSuggestions.find((e=>e.pages[e.pages.length-1].id===n.id));return this.splittingSuggestions.indexOf(o)},checkMove(e){this.prevPageAtIndex=this.pagesForPostprocess.find((t=>this.pagesForPostprocess.indexOf(t)===e.draggedContext.futureIndex))},handleDragEnd(){const e=this.pagesForPostprocess.map((e=>{const t=this.pagesForPostprocess.indexOf(e);return{...e,number:t+1}}));this.$store.dispatch("edit/setPagesForPostprocess",e)},saveEditChanges(){if(this.documentShouldBePostprocessed||this.waitingForSplittingConfirmation(this.selectedDocument)){const e=this.updatedDocument.map((e=>(delete e.categories,e)));this.$store.dispatch("edit/editDocument",e).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})}));const t=ss(this.documentsListPath,this.projectId);t&&this.$store.dispatch("edit/setRedirectingUser",!0)}else{const e=this.updatedDocument[0].category,t=this.updatedDocument[0].name;let n={},o={},i={};if(this.selectedDocument.category!==e&&(Object.assign(n,{category:e}),this.$store.dispatch("document/startLoading")),!this.selectedDocument.category_is_revised&&e&&Object.assign(i,{category_is_revised:!0}),this.selectedDocument.data_file_name!==t&&Object.assign(o,{data_file_name:t}),!n&&!o)return;const a=Object.assign(n,i,o);this.$store.dispatch("document/updateDocument",a).catch((e=>{this.$store.dispatch("document/endLoading"),this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})}))}this.closeEditMode()},closeEditMode(){this.$store.dispatch("edit/disableEditMode"),this.$store.dispatch("edit/setRenameAndCategorize",!1),this.$store.dispatch("edit/setUpdatedDocument",null),this.$store.dispatch("edit/setSelectedPages",null),this.$store.dispatch("edit/setSubmitEditChanges",!1),this.$store.dispatch("edit/setShowEditConfirmationModal",!1),this.$nextTick((()=>{this.$store.dispatch("display/updateCurrentPage",1)}))}}},Gc=(0,$.A)(Zc,[["render",Fl],["__scopeId","data-v-0ecba500"]]),Wc=Gc,qc={key:0,class:"message-container"},jc={class:"server-error"},Kc={key:1,class:"message-container"};function Yc(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-message");return(0,o.openBlock)(),(0,o.createBlock)(r,null,{default:(0,o.withCtx)((()=>[e.serverError?((0,o.openBlock)(),(0,o.createElementBlock)("div",qc,[(0,o.createElementVNode)("span",jc,[(0,o.createTextVNode)((0,o.toDisplayString)(e.errorMessage)+" ",1),e.showBranding?((0,o.openBlock)(),(0,o.createElementBlock)("span",{key:0,class:"contact-support",onClick:t[0]||(t[0]=(...e)=>s.handleGetSupport&&s.handleGetSupport(...e))},[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("get_support"))+" ",1),(0,o.createVNode)(l,{icon:"arrow-right",size:"is-small"})])):(0,o.createCommentVNode)("",!0)])])):((0,o.openBlock)(),(0,o.createElementBlock)("div",Kc,(0,o.toDisplayString)(e.errorMessage),1)),(0,o.createElementVNode)("div",{class:"btn-container",type:"button",onClick:t[1]||(t[1]=(...e)=>s.handleErrorClose&&s.handleErrorClose(...e))},[(0,o.createVNode)(l,{icon:"xmark",class:"close-btn error-icon",size:"is-small"})])])),_:1})}const Jc={name:"ErrorMessage",computed:{...(0,s.aH)("document",["errorMessage","serverError"]),...(0,s.aH)("display",["showBranding"])},methods:{handleGetSupport(){const e="Server error";this.$store.dispatch("document/contactSupport",e)},handleErrorClose(){this.$store.dispatch("document/setErrorMessage",null)}}},Xc=(0,$.A)(Jc,[["render",Yc],["__scopeId","data-v-4692340c"]]),Qc=Xc,ed={class:"viewport-modal"},td={class:"modal-card-body"},nd={class:"image"},od={class:"content"},id={class:"modal-card-foot"};function ad(e,t,n,i,a,s){const l=(0,o.resolveComponent)("Illustration"),r=(0,o.resolveComponent)("b-button"),c=(0,o.resolveComponent)("b-modal");return(0,o.openBlock)(),(0,o.createElementBlock)("section",ed,[(0,o.createVNode)(c,{modelValue:a.isModalActive,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isModalActive=e),class:"modal-text-center",width:500},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("section",td,[(0,o.createElementVNode)("div",nd,[(0,o.createVNode)(l)]),(0,o.createElementVNode)("div",od,[(0,o.createElementVNode)("h3",null,(0,o.toDisplayString)(e.$t("small_viewport_title")),1),(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("small_viewport_info")),1)])]),(0,o.createElementVNode)("footer",id,[(0,o.createVNode)(r,{type:"is-primary",class:"primary-button",onClick:s.handleNotOptimizedModal},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("ok")),1)])),_:1},8,["onClick"])])])),_:1},8,["modelValue"])])}const sd={width:"179",height:"202",viewBox:"0 0 179 202",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ld(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",sd,t[0]||(t[0]=[(0,o.createStaticVNode)('<path opacity="0.6" fill-rule="evenodd" clip-rule="evenodd" d="M143.279 186.492C131.002 186.492 121.053 188.111 121.053 190.084C121.053 192.056 131.002 193.65 143.279 193.65C155.557 193.65 165.506 192.056 165.506 190.084C165.506 188.111 155.557 186.492 143.279 186.492Z" fill="#D7D7D7"></path><path opacity="0.6" fill-rule="evenodd" clip-rule="evenodd" d="M51.001 185.697C36.4215 185.697 24.6074 187.496 24.6074 189.688C24.6074 191.879 36.4215 193.65 51.001 193.65C65.5805 193.65 77.3946 191.879 77.3946 189.688C77.3946 187.496 65.5805 185.697 51.001 185.697Z" fill="#D7D7D7"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M59.6212 55.6689C55.8724 55.6689 52.7847 58.7319 52.7847 62.4941C52.7847 66.575 56.1487 69.2773 59.6635 69.2773C61.3508 69.2773 63.0725 68.6542 64.4742 67.2637C68.7969 63.0201 65.7529 55.6689 59.6212 55.6689ZM59.6807 55.0117C61.5187 55.0117 63.3912 55.6886 64.9145 57.1998C69.6789 61.8815 66.3268 69.8899 59.6212 69.8899C55.5193 69.8899 52.1672 66.5645 52.1235 62.4941C52.1235 57.9908 55.8248 55.0117 59.6807 55.0117Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M59.6212 50.7079C55.8724 50.7079 52.7847 53.7274 52.7847 57.4905C52.7847 61.6026 56.1527 64.3138 59.6701 64.3138C61.3548 64.3138 63.0738 63.692 64.4742 62.303C68.7969 58.0152 65.7529 50.7079 59.6212 50.7079ZM59.6741 50.0508C61.5148 50.0508 63.3899 50.7263 64.9145 52.2399C69.6789 56.9213 66.3268 64.9289 59.6212 64.9289C55.5193 64.9289 52.1672 61.6026 52.1235 57.4905C52.1235 53.0191 55.8208 50.0508 59.6741 50.0508Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.4537 22.0168C55.2169 22.0168 53.418 23.7907 53.418 25.9445C53.418 28.2869 55.405 29.838 57.4918 29.838C58.4898 29.838 59.5115 29.4834 60.3492 28.6895C62.8923 26.2408 61.0948 22.0168 57.4537 22.0168ZM57.5115 21.6445C58.599 21.6445 59.7075 22.0332 60.6122 22.9044C63.3749 25.6064 61.4011 30.1684 57.4537 30.2102C55.0407 30.1684 53.0236 28.2679 53.0236 25.9445C53.0236 23.3678 55.2209 21.6445 57.5115 21.6445Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M58.3535 20.647C56.1165 20.647 54.3174 22.4249 54.3174 24.5834C54.3174 26.9311 56.3045 28.4843 58.3916 28.4843C59.3898 28.4843 60.4116 28.129 61.2494 27.3346C63.7928 24.8791 61.995 20.647 58.3535 20.647ZM58.4127 20.293C59.5003 20.293 60.6089 20.6775 61.5124 21.5353C64.2755 24.2446 62.3015 28.8587 58.3535 28.8587C55.8968 28.8587 53.9228 26.912 53.9228 24.5834C53.9228 21.9998 56.1217 20.293 58.4127 20.293Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M100.474 9.01953C101.422 9.01953 102.959 9.29418 103.44 9.66344C102.341 15.0553 92.8031 27.241 90.5615 29.1701C85.3734 33.5974 70.7352 40.1285 70.7352 40.1285L67.8782 30.9678C67.8782 30.9678 85.0663 25.9269 86.2971 23.8217C87.9233 21.0174 97.6381 12.0748 100.012 9.04976C100.138 9.02873 100.295 9.01953 100.474 9.01953Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M101.228 4.96094L106.142 5.2734C105.428 7.28761 104.42 9.12079 103.16 10.8212L99.8417 9.65718L101.228 4.96094Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M103.392 0.00195312L105.846 1.04704L106.142 5.40995L101.192 5.04752L103.392 0.00195312Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M61.4585 30.6621C63.2449 30.6621 65.0325 30.7172 66.8082 30.8261C68.3629 30.9573 69.8723 31.2198 71.1155 31.4389C72.9804 31.7893 74.4898 33.1894 74.9783 34.9844C76.3107 40.0612 77.0655 45.2706 77.1986 50.5233C77.3317 55.7313 73.1574 60.1087 67.8291 60.24L60.592 60.4145C60.5042 60.4171 60.4177 60.4184 60.3298 60.4184C55.7362 60.4184 51.8348 57.0461 51.313 52.5361C50.8245 48.6849 50.0245 43.2131 48.382 34.9398C48.0719 33.234 49.2259 31.5701 51.0016 31.351C52.4671 31.1319 54.3319 30.914 56.1076 30.8261C57.8833 30.7172 59.6709 30.6621 61.4585 30.6621Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.3134 20.7422L63.5843 22.432C63.0139 25.1022 62.9258 29.8623 66.7401 30.7519C66.7401 30.7519 69.6777 34.2663 63.9339 34.2663C57.621 34.2663 56.1739 30.7519 56.1739 30.7519C58.4977 28.4379 58.06 24.1672 57.3134 20.7422Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.5256 20.7422L63.6546 22.437C63.3091 23.9585 63.1357 26.1744 63.8267 27.9552C63.2651 27.8249 62.7049 27.6516 62.1434 27.3911C60.0292 26.392 58.9501 24.8274 57.8271 22.5243C57.7417 21.9159 57.6122 21.3076 57.5256 20.7422Z" fill="#3A9C76"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.515 18.9375C57.7373 18.9375 57.9608 18.9756 58.1805 19.0603C59.43 19.5934 59.775 21.1914 58.74 22.1334C58.0074 22.9121 56.9297 23.4034 55.8094 23.444C55.7887 23.4452 55.7667 23.4452 55.7461 23.4452C54.3311 23.4452 53.9228 22.0757 54.6451 20.9039C55.153 20.0085 56.3314 18.9375 57.515 18.9375Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M60.1306 8.56836C60.4785 8.56836 60.8342 8.59738 61.1952 8.6607C65.9937 9.45221 68.2184 16.0085 68.2615 20.2773C68.3282 23.8272 65.5177 26.6014 62.3343 26.6014C61.2959 26.6014 60.2182 26.3059 59.1876 25.6464C56.3954 23.8417 55.7846 21.1572 54.3891 16.7129C53.0224 12.6591 56.0619 8.56836 60.1306 8.56836Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M61.3498 9.91992C61.3772 9.91992 61.4046 9.9239 61.4293 9.93185C61.5662 9.93185 61.7032 10.0207 61.795 10.1533C61.8621 10.0883 61.9772 10.0472 62.0881 10.0472C62.1292 10.0472 62.1689 10.0525 62.2059 10.0644C62.3429 10.1095 62.4799 10.197 62.5716 10.3309C62.6251 10.2779 62.71 10.2567 62.799 10.2567C62.8607 10.2567 62.9264 10.2673 62.9826 10.2859C63.1195 10.3747 63.2565 10.5073 63.2565 10.6399C63.3332 10.6213 63.4003 10.6107 63.4633 10.6107C63.5538 10.6107 63.6332 10.6319 63.714 10.6836C63.851 10.7724 63.9428 10.905 63.9428 11.0376C64.0797 11.0376 64.2619 11.0376 64.3537 11.1702C64.4907 11.259 64.5824 11.4354 64.5359 11.613C64.7646 11.613 64.9016 11.7019 64.9934 11.8782C65.0851 12.0545 65.0851 12.276 64.9468 12.4536C65.0851 12.5411 65.1755 12.7626 65.1303 12.9402C65.1303 13.1166 64.9934 13.2929 64.8098 13.338C64.8564 13.5143 64.8098 13.692 64.6728 13.8683C64.5865 13.9532 64.4811 13.9837 64.3688 13.9837C64.3044 13.9837 64.2373 13.9731 64.1701 13.9572C64.1071 14.1719 63.9113 14.3019 63.7058 14.3019C63.6154 14.3019 63.5236 14.2767 63.4401 14.2223C63.3935 14.3112 63.3031 14.4437 63.1661 14.4875C63.0278 14.4875 62.8456 14.4875 62.7538 14.3987C62.7086 14.5312 62.5716 14.6201 62.4347 14.6652C62.2977 14.6652 62.1607 14.6652 62.0689 14.5763C61.9772 14.7089 61.8868 14.7977 61.7484 14.8415C61.7128 14.8534 61.6758 14.8587 61.6388 14.8587C61.5388 14.8587 61.4388 14.8176 61.3375 14.7527C61.2923 14.8852 61.2005 14.9741 61.0635 15.0179C61.0265 15.0298 60.9896 15.0351 60.9539 15.0351C60.8526 15.0351 60.7526 14.994 60.6526 14.9303C60.6074 15.0629 60.4691 15.1504 60.3321 15.1955C60.3061 15.2088 60.2718 15.2141 60.2334 15.2141C60.1417 15.2141 60.0321 15.1822 59.9677 15.1504C59.9212 15.2392 59.7842 15.3281 59.6472 15.3718C59.5911 15.3904 59.5335 15.401 59.4801 15.401C59.4047 15.401 59.3349 15.3798 59.2815 15.3281C59.1938 15.4991 59.0281 15.5972 58.8486 15.5972C58.75 15.5972 58.6473 15.5681 58.55 15.5044C58.5048 15.637 58.413 15.7258 58.2761 15.7696H58.2309C58.1993 15.7776 58.1678 15.7815 58.1364 15.7815C57.987 15.7815 57.8419 15.6954 57.7282 15.5495C57.6254 15.6489 57.4967 15.698 57.3624 15.698C57.3172 15.698 57.2706 15.6927 57.2254 15.6821C57.0433 15.5932 56.9515 15.4169 56.9063 15.2392C56.7227 15.2392 56.5406 15.1504 56.4488 14.9741C56.3118 14.7977 56.3118 14.6201 56.4488 14.4437C56.2666 14.3112 56.1748 14.1335 56.1748 13.9572C56.2201 13.7795 56.3118 13.6031 56.4488 13.5594C56.357 13.4268 56.357 13.2491 56.4036 13.1166C56.4488 12.9402 56.5858 12.8514 56.7227 12.8076C56.6775 12.6737 56.6775 12.4974 56.7227 12.3648C56.8145 12.2322 56.9515 12.1434 57.0885 12.1434C57.0433 12.0108 57.0885 11.8345 57.1802 11.7019C57.2706 11.613 57.409 11.5242 57.5912 11.5242C57.546 11.3916 57.6364 11.2153 57.7282 11.1264C57.8281 11.0615 57.9295 11.0204 58.0295 11.0204C58.0665 11.0204 58.1021 11.0257 58.1391 11.0376C58.1391 10.8613 58.2309 10.7287 58.3678 10.6399C58.4487 10.5882 58.5281 10.5669 58.6089 10.5669C58.6651 10.5669 58.7226 10.5775 58.7788 10.5961C58.8254 10.4635 58.9157 10.3309 59.0527 10.2859C59.1061 10.2527 59.1651 10.2381 59.2253 10.2381C59.3239 10.2381 59.4253 10.2753 59.5102 10.3309C59.5554 10.1533 59.6924 10.0644 59.8294 10.0207C59.8636 10.0101 59.902 10.0035 59.9389 10.0035C60.0527 10.0035 60.1732 10.0538 60.2417 10.1533C60.3321 10.0207 60.4691 9.93185 60.6074 9.93185C60.6403 9.9239 60.6718 9.91992 60.7033 9.91992C60.8389 9.91992 60.943 9.99284 61.0183 10.0644C61.0923 9.99284 61.2279 9.91992 61.3498 9.91992Z" fill="#96F3AB"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M59.1588 10.8242C59.2913 10.8656 59.4239 10.9497 59.4677 11.0751C59.5326 11.0136 59.6453 10.9748 59.7355 10.9748C59.7687 10.9748 59.7978 10.9798 59.8217 10.9911C59.9994 11.0337 60.0869 11.1165 60.1319 11.2846C60.1982 11.2432 60.2645 11.2219 60.3255 11.2219C60.3852 11.2219 60.4409 11.2432 60.4859 11.2846C60.6185 11.326 60.7511 11.4515 60.7511 11.5769C60.8055 11.5606 60.8612 11.5493 60.9155 11.5493C60.9938 11.5493 61.0707 11.5707 61.1489 11.6196C61.2377 11.745 61.3252 11.8705 61.3703 11.9959C61.4034 11.9859 61.4366 11.9796 61.4684 11.9796C61.5665 11.9796 61.658 12.0273 61.7243 12.1214C61.8118 12.2054 61.9006 12.3723 61.9006 12.5404C62.077 12.5404 62.2096 12.6658 62.2547 12.7913C62.3435 12.9581 62.3435 13.1676 62.2547 13.3345C62.3872 13.46 62.4761 13.6281 62.4761 13.7949C62.431 13.963 62.3435 14.0885 62.1658 14.1725C62.2547 14.3394 62.2096 14.5062 62.077 14.6317C62.02 14.7132 61.9258 14.7596 61.8317 14.7596C61.7787 14.7596 61.727 14.7458 61.6792 14.7157C61.6355 14.8412 61.5466 14.9666 61.3703 15.0093C61.3464 15.0206 61.3199 15.0256 61.2907 15.0256C61.2138 15.0256 61.125 14.9867 61.06 14.9252C61.0163 15.0507 60.9275 15.1347 60.7949 15.1761C60.771 15.1874 60.7445 15.1924 60.7166 15.1924C60.6384 15.1924 60.5496 15.1535 60.4859 15.0921C60.4409 15.2175 60.352 15.3016 60.2194 15.3016C60.181 15.3141 60.1465 15.3191 60.1121 15.3191C60.0312 15.3191 59.9596 15.289 59.8668 15.2602C59.8668 15.3442 59.7779 15.427 59.6453 15.4697C59.6095 15.481 59.5738 15.486 59.5393 15.486C59.4438 15.486 59.3563 15.4471 59.2913 15.3856C59.2476 15.5111 59.1588 15.5951 59.0699 15.6365C58.9373 15.6365 58.8047 15.6365 58.7159 15.5525C58.6722 15.6779 58.5833 15.762 58.4507 15.762C58.4269 15.7733 58.4004 15.7783 58.3725 15.7783C58.2943 15.7783 58.2055 15.7394 58.1418 15.6779C58.0967 15.8034 58.0092 15.8874 57.8753 15.9301C57.8408 15.9401 57.8077 15.9464 57.7772 15.9464C57.6923 15.9464 57.6194 15.9075 57.5226 15.846C57.5226 15.9715 57.4338 16.0555 57.3012 16.0969C57.2203 16.0355 57.1262 16.0079 57.0387 16.0079C56.8889 16.0079 56.7536 16.0894 56.7258 16.2224C56.6953 16.2299 56.6635 16.2337 56.633 16.2337C56.4898 16.2337 56.3572 16.1584 56.2843 16.0555C56.2114 16.1245 56.1238 16.1546 56.039 16.1546C55.97 16.1546 55.9011 16.1346 55.8415 16.0969C55.7088 16.0129 55.5763 15.8874 55.5763 15.6779C55.5524 15.6842 55.5285 15.6867 55.5047 15.6867C55.3535 15.6867 55.2103 15.5776 55.1334 15.4697C55.0009 15.3016 55.0009 15.0921 55.0897 14.8838C54.9571 14.7998 54.8245 14.6317 54.8682 14.4234C54.8682 14.298 54.9133 14.1299 55.0459 14.0458C55.0009 13.9204 54.9571 13.7949 55.0009 13.6281C55.0459 13.5026 55.1334 13.4186 55.266 13.3772C55.2222 13.2517 55.2222 13.1263 55.266 12.9581C55.3111 12.8741 55.4437 12.7913 55.5763 12.7486C55.5325 12.6232 55.5763 12.4977 55.62 12.3723C55.7088 12.2468 55.8415 12.2054 55.974 12.2054C55.9303 12.08 55.974 11.9545 56.0628 11.8291C56.1278 11.7676 56.2392 11.7287 56.3294 11.7287C56.3625 11.7287 56.393 11.7337 56.4169 11.745C56.4169 11.6196 56.5044 11.4941 56.5932 11.4101C56.6595 11.3687 56.7258 11.3474 56.7868 11.3474C56.8478 11.3474 56.9035 11.3687 56.9472 11.4101C56.991 11.2846 57.0798 11.1592 57.1686 11.1165C57.219 11.0852 57.2694 11.0714 57.3198 11.0714C57.402 11.0714 57.4842 11.1077 57.5664 11.1592C57.6101 11.0337 57.699 10.9083 57.8316 10.9083C57.8674 10.897 57.9031 10.892 57.9376 10.892C58.0318 10.892 58.1206 10.9309 58.1856 10.9911C58.2293 10.9083 58.3619 10.8242 58.4945 10.8242C58.6284 10.8242 58.761 10.8656 58.8485 10.9911C58.8936 10.8656 59.0262 10.8242 59.1588 10.8242Z" fill="#ABF2BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M23.5364 29.3086C26.6811 31.612 33.1016 33.9141 35.9832 35.2869C36.1508 35.3653 36.3929 35.3998 36.7006 35.3998C39.2052 35.3998 45.9555 33.022 50.0023 31.5231C50.3938 31.3744 50.7996 31.3027 51.1989 31.3027C52.5828 31.3027 53.9051 32.1524 54.4131 33.5597L54.9813 34.8887C55.7236 36.8814 54.6317 39.0959 52.6221 39.627C48.4273 40.7515 41.6508 42.3832 37.1012 42.3832C36.6299 42.3832 36.1835 42.3659 35.7645 42.3287C32.8829 42.0632 23.2313 35.9521 20.6116 30.992C20.9598 30.372 22.794 29.4414 23.5364 29.3086Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M22.9388 26.6055C22.9388 26.6055 25.5611 29.4906 23.8421 32.0148L21.0047 31.3838L17.9108 28.2284L22.9388 26.6055Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M21.6818 22.998L22.8599 26.824L17.7524 28.4074L17.0103 24.1846L21.6818 22.998Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M61.4369 17.5859L62.4761 18.9782L59.273 19.3883L57.9757 18.4871L61.4369 17.5859Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M66.5278 15.7832L66.4471 16.9098L64.4781 18.0365L64.2782 16.4671L66.5278 15.7832Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M66.7946 20.293C66.8523 20.293 66.9035 20.3264 66.9342 20.3613C66.9764 20.4588 66.9342 20.5548 66.8907 20.6042C65.1405 21.7198 63.261 22.3991 61.2535 22.5445C61.1678 22.5445 61.1255 22.4471 61.1255 22.3511C61.1255 22.2536 61.1678 22.1562 61.2535 22.1562C63.1753 22.0107 65.0125 21.3795 66.7204 20.3133C66.7447 20.2988 66.7703 20.293 66.7946 20.293Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M36.238 35.1719C36.2519 35.1719 36.265 35.1771 36.2733 35.189C36.3347 35.2324 36.3663 35.3205 36.3347 35.4073C36.0873 36.3727 35.5599 39.6635 35.932 42.2086C35.932 42.252 35.9004 42.3401 35.839 42.3835H35.8074C35.7767 42.3835 35.7143 42.3401 35.7143 42.252C35.466 39.9266 35.6213 37.5144 36.1487 35.2758C36.1487 35.2113 36.1989 35.1719 36.238 35.1719Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M51.0916 31.1133C51.136 31.1133 51.1754 31.1345 51.2008 31.1863C52.6822 33.2254 53.0211 35.9725 52.0475 38.3649C51.4965 39.6509 50.5648 40.4917 49.5911 40.5807C49.5492 40.5807 49.4642 40.4917 49.4223 40.4479C49.4223 40.3589 49.5073 40.2712 49.5911 40.2712C50.4378 40.1822 51.2426 39.429 51.7504 38.2773C52.6822 35.9725 52.3864 33.3583 50.9888 31.3643C50.9037 31.2753 50.9469 31.1863 50.9888 31.1425C51.0243 31.1239 51.0586 31.1133 51.0916 31.1133Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M68.1718 30.6621C71.9216 30.6621 74.9675 34.963 75.5298 38.1416C75.5298 38.2338 75.4865 38.2792 75.3987 38.3259H75.3555C75.3109 38.3259 75.2244 38.2792 75.2244 38.187C74.6621 35.146 71.7459 30.9826 68.1705 30.9826C68.1311 30.9826 68.0931 30.984 68.0538 30.984C67.966 30.984 67.8795 30.9386 67.8795 30.8464C67.8795 30.7556 67.966 30.6635 68.0538 30.6635C68.0931 30.6621 68.1324 30.6621 68.1718 30.6621Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M24.476 29.7617C24.6156 29.8032 24.6616 29.8874 24.6156 29.9704C24.4285 30.9771 22.7998 31.2285 21.4489 31.4384L20.8445 31.564H20.7971C20.705 31.5226 20.6575 31.4798 20.6115 31.4384C20.6115 31.3541 20.6575 31.2699 20.751 31.2285C20.9367 31.2285 21.1697 31.187 21.4028 31.1443C22.6128 30.9356 24.1494 30.7257 24.289 29.8874C24.335 29.8032 24.4285 29.7617 24.476 29.7617Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M86.1418 23.8984C86.1724 23.8984 86.2029 23.9089 86.2293 23.935C88.0822 25.1552 89.9364 27.7693 89.8433 30.0359C89.8433 30.1234 89.7503 30.2096 89.6586 30.2096C89.5655 30.1665 89.4725 30.1234 89.4725 30.0359C89.5655 27.8568 87.7585 25.3289 85.9974 24.1532C85.8863 24.0826 86.014 23.8984 86.1418 23.8984Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M99.5986 9.46875C99.6445 9.46875 99.6931 9.48691 99.7347 9.53116C100.225 10.1485 101.395 10.54 102.513 10.54C102.765 10.54 103.015 10.5196 103.256 10.4776C103.281 10.4674 103.302 10.4628 103.321 10.4628C103.372 10.4628 103.407 10.498 103.44 10.5536C103.44 10.6296 103.395 10.7045 103.302 10.7431C103.024 10.7806 102.746 10.818 102.468 10.818C102.422 10.8203 102.378 10.8203 102.333 10.8203C101.224 10.8203 100.168 10.3743 99.4556 9.68323C99.3903 9.57542 99.4875 9.46875 99.5986 9.46875Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.3648 35.6211C67.7415 35.6211 71.8946 40.0353 72.6096 45.5187C73.279 51.0007 70.2867 55.459 65.8658 55.459C65.2405 55.459 64.5697 55.3708 63.9901 55.1917C60.3269 54.1667 57.2007 50.243 56.5755 45.5628C56.1738 42.9768 56.7991 40.3467 58.3173 38.2071C59.4794 36.602 61.3552 35.6211 63.3648 35.6211Z" fill="#3A9C76"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M61.001 37.877C65.1094 37.877 68.7839 41.573 69.2476 46.271C69.6789 50.4648 67.3955 54.0915 63.991 55.0083C63.3026 54.7895 62.6555 54.4844 62.0097 54.1347C59.4253 52.4739 57.3563 49.2415 56.8823 45.5716C56.624 43.7799 56.8396 41.9895 57.4428 40.2856C57.7011 39.5862 58.0886 38.9313 58.52 38.3196C59.2522 38.0564 59.9846 37.8822 60.7169 37.8822C60.8125 37.8783 60.9068 37.877 61.001 37.877Z" fill="#46C963"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.4666 40.1309C57.6009 40.1745 57.7339 40.1745 57.8668 40.1745C62.1671 40.6159 65.626 44.3195 65.5369 48.4197C65.5369 50.7565 64.2076 52.9612 62.1232 54.1072C59.4633 52.4312 57.3337 49.1691 56.8459 45.4655C56.6252 43.6573 56.802 41.8505 57.4666 40.1309Z" fill="#34B952"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M66.5343 41.4844C67.1715 41.4844 67.8662 41.7431 68.4734 42.2632C69.6929 43.2981 70.1278 44.9812 69.3874 46.0602L67.6024 48.5635C67.3335 48.9503 66.9143 49.1469 66.4834 49.1469C66.1452 49.1469 65.7992 49.0253 65.5119 48.7796L62.2881 46.0602C61.0685 44.9812 60.6768 43.2981 61.4171 42.2632C61.7827 41.7457 62.3507 41.4921 62.9814 41.4921C63.4045 41.4921 63.8549 41.606 64.2924 41.8311C64.4556 41.9035 64.6345 41.9372 64.8121 41.9372C65.0615 41.9372 65.3083 41.8712 65.5119 41.7444C65.8149 41.5711 66.1648 41.4844 66.5343 41.4844Z" fill="#ABF2BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M68.0324 56.8145C68.6784 56.8145 69.327 56.8222 69.977 56.8404C71.5138 56.8844 72.8742 57.9652 73.2689 59.4775C74.6293 64.9669 73.532 72.1435 73.532 72.1435H57.074C57.6884 68.4256 57.8647 64.665 57.5134 60.9043C57.3818 59.0019 58.7857 57.36 60.7171 57.1436C63.1485 56.9376 65.5786 56.8145 68.0324 56.8145Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M68.0324 56.8145C68.6784 56.8145 69.327 56.8222 69.977 56.8404C71.5138 56.8844 72.8742 57.9652 73.2689 59.4775C74.6293 64.9669 73.532 72.1435 73.532 72.1435H57.074C57.6884 68.4256 57.8647 64.665 57.5134 60.9043C57.3818 59.0019 58.7857 57.36 60.7171 57.1436C63.1485 56.9376 65.5786 56.8145 68.0324 56.8145Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M74.7496 72.1445C76.6739 72.1445 78.2323 73.7096 78.1001 75.6171C77.7435 84.8453 76.5403 109.981 73.6906 122.988C71.9973 140.389 69.3252 189.826 69.3252 189.826H57.0742C57.0742 189.826 60.9949 134.809 64.8703 122.988C60.9055 112.398 61.9297 72.1458 61.9297 72.1458H74.6694C74.6961 72.1445 74.7229 72.1445 74.7496 72.1445Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M65.5834 86.5742C65.5834 86.5742 65.6274 104.51 63.361 115.43C62.5163 108.851 62.1606 100.169 62.0274 92.3194L65.5834 86.5742Z" fill="#3A9C76"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M71.0283 72.1445C71.0283 72.1445 62.4253 112.397 56.4119 122.987C53.8224 148.211 44.3864 189.825 44.3864 189.825H32.3149C32.3149 189.825 42.0153 138.631 46.9313 122.987C46.7563 109.979 51.4091 84.844 52.9013 75.6158C53.2526 73.6384 54.9645 72.1445 56.983 72.1445H71.0283Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M53.4149 117.684C53.8457 117.684 54.2778 117.759 54.6982 117.92C56.9688 118.757 57.9731 121.757 56.9256 124.624C56.0626 126.982 54.1076 128.505 52.1526 128.505C51.7309 128.505 51.308 128.434 50.8981 128.284C48.6262 127.447 47.6218 124.403 48.6694 121.537C49.5284 119.225 51.469 117.684 53.4149 117.684Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M53.4149 117.684C53.8457 117.684 54.2778 117.759 54.6982 117.92C56.9688 118.757 57.9731 121.757 56.9256 124.624C56.0626 126.982 54.1076 128.505 52.1526 128.505C51.7309 128.505 51.308 128.434 50.8981 128.284C48.6262 127.447 47.6218 124.403 48.6694 121.537C49.5284 119.225 51.469 117.684 53.4149 117.684Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M43.4331 185.77C45.7484 185.77 47.619 187.607 47.4855 189.826H39.0684C39.1565 187.563 41.1166 185.813 43.4331 185.77Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M70.6791 117.686C70.8675 117.686 71.0572 117.702 71.2483 117.736C73.5208 118.141 75.0813 120.846 74.7246 123.821C74.3532 126.529 72.4988 128.504 70.4266 128.504C70.2556 128.504 70.0833 128.491 69.9109 128.464C67.5943 128.058 66.0792 125.354 66.4346 122.379C66.802 119.653 68.6283 117.686 70.6791 117.686Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M70.6791 117.686C70.8675 117.686 71.0572 117.702 71.2483 117.736C73.5208 118.141 75.0813 120.846 74.7246 123.821C74.3532 126.529 72.4988 128.504 70.4266 128.504C70.2556 128.504 70.0833 128.491 69.9109 128.464C67.5943 128.058 66.0792 125.354 66.4346 122.379C66.802 119.653 68.6283 117.686 70.6791 117.686Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M69.2499 185.77C71.4797 185.77 73.2803 187.563 73.2803 189.826H65.1772C65.1772 187.563 66.9777 185.77 69.2499 185.77Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M54.5479 74.3984C56.4626 74.3984 58.7686 75.6085 60.8997 77.7254C63.4235 80.2323 66.0776 84.5103 66.0776 89.1354C66.0776 89.2209 66.0346 89.2649 65.9472 89.2649C65.9316 89.2727 65.9146 89.2766 65.9003 89.2766C65.8311 89.2766 65.7724 89.2054 65.7724 89.1354C65.7724 84.5971 63.1196 80.4047 60.6388 77.9845C58.5507 75.9104 56.3322 74.7444 54.5479 74.7444C54.4619 74.7444 54.3745 74.6575 54.3745 74.5707C54.3745 74.4852 54.4619 74.3984 54.5479 74.3984Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M76.2573 78.9082C76.2725 78.9082 76.2878 78.9121 76.303 78.92C76.3882 78.92 76.4302 79.0063 76.4302 79.094C75.9635 82.1057 72.2737 87.1676 68.5839 88.8265H68.542C68.3716 88.8265 68.3296 88.608 68.4568 88.5204C71.9775 86.9491 75.7093 81.9304 76.1339 79.0508C76.1339 78.9789 76.1899 78.9082 76.2573 78.9082Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M41.261 185.77C42.811 185.77 44.1648 185.959 44.7573 186.148C44.9195 186.185 44.8567 186.394 44.7089 186.394C44.6972 186.394 44.6841 186.393 44.671 186.389C44.0994 186.242 42.7626 186.061 41.2375 186.061C39.8484 186.061 38.3036 186.211 37.0349 186.671H36.9917C36.9473 186.671 36.8609 186.63 36.8609 186.591C36.8164 186.51 36.8609 186.429 36.9473 186.389C38.2605 185.929 39.8432 185.77 41.261 185.77Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M67.6428 185.316C68.1838 185.316 68.6619 185.408 69.0564 185.565C69.2287 185.617 69.1426 185.935 68.9716 185.935C68.6144 185.793 68.1658 185.707 67.6505 185.707C66.4335 185.707 64.8399 186.183 63.1846 187.517C63.1409 187.517 63.1409 187.571 63.0985 187.571C63.0548 187.571 63.0124 187.517 62.97 187.465C62.9263 187.359 62.9263 187.254 63.0124 187.201C64.7294 185.829 66.3628 185.316 67.6428 185.316Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M98.1937 53.207L97.0674 58.3729C97.0674 58.3729 98.8532 59.9677 100.623 59.9677C100.925 59.9677 101.227 59.9213 101.519 59.8126L101.568 57.6772L98.1937 53.207Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M94.1024 52.3047L93.4658 56.3415L97.5574 58.6145L97.9675 53.326L94.1024 52.3047Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M100.676 50.0508C100.618 50.0508 100.554 50.0688 100.488 50.1107L91.0148 54.8605C90.8649 54.961 90.765 55.1603 90.8649 55.31C90.9145 55.4105 91.0148 55.4601 91.1643 55.4601H91.2642L100.787 50.6608C101.119 50.4945 100.968 50.0508 100.676 50.0508Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M122.739 39.6797C122.25 40.5125 121.909 41.1983 121.518 41.9328C121.127 42.6687 120.736 43.4032 120.345 44.1372C119.613 45.6076 118.881 47.0279 118.148 48.4978C116.732 51.4367 115.365 54.4257 114.046 57.4147L113.851 57.9535C113.803 58.0017 113.803 58.0518 113.753 58.1005C113.704 58.1988 113.656 58.247 113.606 58.2957C113.508 58.394 113.362 58.444 113.216 58.444C113.016 58.463 112.817 58.4734 112.618 58.4734C111.842 58.4734 111.074 58.325 110.334 58.0518C109.065 57.6099 107.844 57.0724 106.671 56.3862C106.085 56.0426 105.451 55.6503 104.864 55.2585L103.986 54.6223C103.741 54.4257 103.4 54.1804 103.204 54.0334L98.418 61.1377C98.9069 61.383 99.2481 61.53 99.6388 61.7752C100.03 61.9705 100.421 62.1671 100.812 62.3623C101.592 62.7546 102.422 63.1469 103.204 63.4891C104.864 64.2249 106.623 64.8125 108.381 65.253C109.358 65.4983 110.334 65.6935 111.36 65.7918C111.653 65.817 111.946 65.8288 112.239 65.8288C113.119 65.8288 113.997 65.7183 114.876 65.4983C117.025 65.0077 118.831 63.6361 119.906 61.7252C120.102 61.4312 120.249 61.1377 120.345 60.8437L120.59 60.2562C121.225 58.8846 121.861 57.4629 122.544 56.0426C123.178 54.671 123.912 53.2989 124.644 51.9273C125.376 50.6039 126.158 49.2824 126.988 47.959C127.379 47.3214 127.818 46.6857 128.209 46.0481C128.6 45.3623 129.087 44.7261 129.478 44.1873L122.739 39.6797Z" fill="#ABF2BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M140.32 14.4297C139.517 14.4297 138.938 14.9398 138.307 15.9407C137.246 17.5733 134.882 25.8328 135.365 29.246C135.679 31.5474 137.153 32.4654 138.884 32.4654C141.134 32.4654 143.817 30.9188 144.962 28.8501C147.035 25.1907 144.432 16.3366 142.358 15.1489C141.517 14.6669 140.866 14.4297 140.32 14.4297Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M149.834 6.76367C145.531 6.76367 142.086 12.6322 142.557 14.4458C142.993 16.2549 143.717 16.8892 145.457 17.2321C146.122 17.3771 147.197 17.5836 148.4 17.5836C150.423 17.5836 152.808 16.9977 154.203 14.5439C156.04 11.4163 153.913 6.97022 150.144 6.77391C150.041 6.76809 149.936 6.76367 149.834 6.76367Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M133.358 14.8809C132.267 14.8809 131.004 15.4398 130.358 16.2767C129.031 17.9805 129.836 22.6178 130.784 23.3738C131.228 23.73 131.577 23.8973 131.894 23.8973C132.251 23.8973 132.563 23.6818 132.915 23.28C133.578 22.4759 135.331 18.5479 135.331 16.7491C135.331 15.4157 134.428 14.8809 133.358 14.8809Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M129.481 173.145L129.818 184.866H134.882L134.544 173.145H129.481Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M158.306 170.889L153.34 171.573L156.475 183.061L161.442 182.425L158.306 170.889Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M161.243 180.357C161.211 180.357 161.177 180.362 161.143 180.371L155.653 182.02C155.309 182.119 155.064 182.32 154.917 182.57C153.888 184.068 153.594 185.418 150.016 187.367C149.287 187.759 149.719 189.374 151.248 189.374C151.468 189.374 151.711 189.341 151.977 189.266C154.035 188.665 156.142 187.867 157.662 187.416C160.113 186.716 161.045 186.567 163.005 186.017C163.447 185.867 163.691 185.368 163.544 184.917L161.632 180.621C161.552 180.455 161.403 180.357 161.243 180.357Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M129.612 183.965C129.321 183.965 129.069 184.1 128.855 184.272C127.516 185.413 125.881 186.603 121.819 187.495C120.927 187.695 121.077 189.826 123.206 189.826C125.387 189.826 128.655 189.678 130.242 189.678C132.817 189.678 133.758 189.826 135.79 189.826C136.285 189.826 136.681 189.43 136.632 188.933L135.988 184.321C135.944 184.106 135.789 183.965 135.618 183.965C135.592 183.965 135.567 183.968 135.542 183.975H129.746C129.7 183.968 129.655 183.965 129.612 183.965Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M129.481 173.145L129.679 179.005H134.882L134.683 173.145H129.481Z" fill="#1A2327" fill-opacity="0.129412"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M158.415 170.889L153.34 171.59L154.965 177.651L160.09 177.001L158.415 170.889Z" fill="#1A2327" fill-opacity="0.129412"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.893 37.875C135.35 37.875 133.814 37.9359 132.278 38.0563C128.292 38.3958 123.778 39.3629 123.778 39.3629C123.778 39.3629 121.378 40.1854 126.179 69.887H146.586C146.251 61.5194 146.202 56.3418 150.188 39.2178C147.306 38.5883 144.426 38.2028 141.545 38.0563C139.983 37.9359 138.436 37.875 136.893 37.875Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M140.708 27.5059L134.966 32.4021C135.552 34.7287 135.648 37.2005 132.291 38.0247C132.291 38.0247 129.031 41.0313 135.21 41.0313C140.806 41.0313 141.633 38.0247 141.633 38.0247C139.541 36.0381 140.124 30.5111 140.708 27.5059Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M138.334 29.3105L134.882 32.1868C135.029 32.7143 135.129 33.2419 135.178 33.8168C136.461 33.6256 138.237 32.2341 138.384 30.9405C138.482 30.3643 138.433 29.8367 138.334 29.3105Z" fill="#1A2327" fill-opacity="0.129412"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.902 13.0781C136.415 13.0781 135.917 13.1299 135.413 13.2379C130.148 14.374 128.129 21.7264 128.425 26.4632C128.631 30.1127 131.543 32.465 134.807 32.465C136.221 32.465 137.702 32.0227 139.056 31.0524C142.058 28.8822 142.451 26.759 143.633 21.7752C144.784 17.2469 141.274 13.0781 136.902 13.0781Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M142.739 10.8242C141.949 10.8242 141.302 10.9946 140.971 11.2886C139.933 12.1635 139.834 12.8913 140.378 14.0078C140.921 15.1242 144.281 18.9614 146.011 19.6892C146.263 19.7911 146.497 19.8392 146.714 19.8392C148.762 19.8392 149.287 15.6381 148.037 13.6191C146.757 11.6016 144.424 10.8242 142.739 10.8242Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M138.585 11.2734C137.439 11.2734 136.494 11.5268 136.004 11.9515C134.53 13.3192 134.433 14.2477 135.218 15.9083C135.955 17.569 140.767 23.0886 143.222 24.1149C143.602 24.2745 143.955 24.3493 144.28 24.3493C147.236 24.3493 147.937 18.2749 146.168 15.3709C144.304 12.3908 140.996 11.2734 138.585 11.2734Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M125.905 69.8887C125.905 69.8887 121.828 109.124 122.172 124.672C122.516 140.804 128.509 177.651 128.509 177.651H135.437C135.437 177.651 134.355 141.73 134.945 125.89C135.681 108.588 141.183 69.8887 141.183 69.8887H125.905Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.683 175.398L127.229 175.673L127.89 178.101H136.276L136.683 175.398Z" fill="#1A2327"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M137.126 77.1055C136.528 77.1055 135.823 77.8377 134.995 79.5344C129.93 89.79 133.981 108.445 135.765 115.429C136.634 104.978 138.177 92.232 139.383 82.8066C138.918 79.4524 138.195 77.1055 137.126 77.1055Z" fill="black"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M146.703 69.8887L131.281 69.9369C131.281 69.9369 136.027 110.717 139.635 123.775C143.884 139.318 153.572 176.298 153.572 176.298L160.542 175.372C160.542 175.372 154.314 134.299 152.287 125.724C147.888 107.454 152.287 81.3386 146.703 69.8887Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M161.441 172.693L151.54 174.379L152.795 176.749L161.296 175.701L161.441 172.693Z" fill="#1A2327"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.188 21.1914C134.91 21.1914 134.604 21.4461 134.55 21.7786C134.432 22.1352 134.667 22.4931 134.959 22.5387C134.985 22.5414 135.01 22.5427 135.037 22.5427C135.353 22.5427 135.613 22.2854 135.722 21.9127C135.78 21.5547 135.604 21.1968 135.253 21.1968C135.232 21.1928 135.209 21.1914 135.188 21.1914Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M130.709 20.291C130.369 20.291 130.049 20.5457 129.993 20.8769C129.932 21.2804 130.115 21.5927 130.422 21.6383C130.448 21.641 130.476 21.6423 130.501 21.6423C130.834 21.6423 131.106 21.3876 131.218 21.0565C131.28 20.6543 131.097 20.3406 130.79 20.2964C130.762 20.2924 130.737 20.291 130.709 20.291Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M129.932 19.8398C129.932 19.8398 130.18 20.2895 130.55 20.2895C130.636 20.2895 130.732 20.2641 130.831 20.2025L129.932 19.8398Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M132.18 22.0938C131.672 22.9174 131.073 23.648 130.38 24.2878C130.712 24.6169 131.119 24.7978 131.567 24.7978C131.617 24.7978 131.668 24.7964 131.719 24.791L132.18 22.0938Z" fill="#ED847E"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.639 25.7012C135.603 25.7012 135.567 25.712 135.543 25.7309C134.974 26.1724 134.192 26.4131 133.391 26.4131C133.186 26.4131 132.978 26.3964 132.774 26.3644C132.727 26.3644 132.679 26.405 132.631 26.4438C132.631 26.483 132.679 26.5628 132.727 26.5628C132.966 26.6016 133.203 26.6016 133.395 26.6016C134.254 26.6016 135.114 26.3252 135.733 25.8509C135.782 25.8103 135.782 25.7711 135.733 25.7309C135.71 25.712 135.675 25.7012 135.639 25.7012Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M143.142 22.5449C141.958 22.5449 140.943 23.8958 140.605 24.9347C140.284 26.0145 140.699 27.0525 141.738 27.0525C141.865 27.0525 142.002 27.0372 142.149 27.0038C143.127 26.7013 144.001 26.0966 144.514 25.239C145.235 24.1785 144.618 22.7658 143.382 22.5646C143.302 22.551 143.222 22.5449 143.142 22.5449Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.569 18.9395C135.456 18.9395 135.385 19.034 135.385 19.1633C135.334 19.321 135.439 19.4266 135.596 19.4266C136.223 19.5843 136.798 20.0052 137.06 20.5838C137.111 20.6878 137.163 20.6878 137.216 20.7414H137.425C137.53 20.6358 137.582 20.4782 137.53 20.3725C137.163 19.5843 136.484 19.0577 135.647 18.9521C135.619 18.9442 135.594 18.9395 135.569 18.9395Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M131.174 17.5859C130.409 17.5859 129.669 17.8042 129.141 18.1919C129.03 18.2662 129.03 18.3769 129.141 18.4501C129.195 18.4877 129.251 18.4877 129.36 18.4877C129.417 18.4877 129.471 18.4501 129.526 18.4135C129.948 18.1299 130.492 17.9537 131.087 17.9537C131.189 17.9537 131.295 17.9593 131.399 17.9704C131.509 17.9704 131.675 17.9327 131.731 17.8219C131.731 17.7111 131.62 17.6369 131.509 17.6003C131.397 17.5915 131.287 17.5859 131.174 17.5859Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M153.684 182.411C154.106 182.411 154.705 182.532 155.155 182.677V182.731C154.581 183.056 154.061 183.229 153.713 183.229C153.593 183.229 153.494 183.208 153.421 183.167C153.276 183.057 153.179 182.894 153.179 182.731C153.179 182.677 153.179 182.568 153.227 182.514C153.308 182.441 153.474 182.411 153.684 182.411ZM153.73 182.16C153.457 182.16 153.22 182.212 153.082 182.351C152.986 182.459 152.89 182.622 152.938 182.785C152.938 183.004 153.082 183.221 153.227 183.384L153.276 183.439C153.385 183.49 153.51 183.513 153.646 183.513C154.236 183.513 155.024 183.095 155.493 182.785C155.541 182.731 155.59 182.731 155.59 182.677C155.59 182.622 155.541 182.568 155.493 182.568C155.354 182.49 154.424 182.16 153.73 182.16Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M154.325 181.085C154.374 181.085 154.419 181.099 154.465 181.127C154.509 181.127 154.509 181.127 154.554 181.181C154.914 181.57 155.184 182.122 155.32 182.73C154.779 182.453 154.06 181.735 154.014 181.347C154.014 181.293 154.014 181.181 154.149 181.127C154.217 181.099 154.273 181.085 154.325 181.085ZM154.325 180.809C154.24 180.809 154.149 180.822 154.06 180.85C153.88 180.905 153.789 181.127 153.789 181.347C153.835 181.79 154.284 182.287 154.734 182.675C154.96 182.841 155.23 182.952 155.499 183.061C155.499 183.061 155.544 183.061 155.59 183.007C155.59 183.007 155.59 182.952 155.59 182.896C155.59 182.841 155.184 181.238 154.554 180.85C154.486 180.822 154.408 180.809 154.325 180.809Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M126.862 183.779C127.59 183.878 128.316 184.125 128.995 184.52C128.576 184.575 128.193 184.603 127.862 184.603C127.308 184.603 126.898 184.526 126.717 184.372C126.621 184.273 126.571 184.125 126.571 183.977C126.571 183.927 126.621 183.878 126.669 183.829C126.717 183.779 126.814 183.779 126.862 183.779ZM126.882 183.514C126.757 183.514 126.651 183.534 126.571 183.582C126.426 183.681 126.378 183.779 126.378 183.927C126.329 184.174 126.426 184.372 126.571 184.52C126.911 184.766 127.347 184.865 127.783 184.865C128.316 184.816 128.849 184.766 129.383 184.668C129.43 184.618 129.48 184.618 129.48 184.569C129.48 184.52 129.48 184.421 129.43 184.421C129.222 184.335 127.676 183.514 126.882 183.514Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M127.998 182.853C128.163 182.853 128.327 182.901 128.436 182.997C128.875 183.428 129.149 183.956 129.203 184.53C128.491 184.195 127.559 183.332 127.668 182.997C127.668 182.948 127.668 182.853 127.888 182.853H127.998ZM127.888 182.613C127.503 182.661 127.395 182.804 127.395 182.948C127.231 183.525 128.602 184.627 129.314 184.866H129.424C129.478 184.818 129.478 184.77 129.478 184.77C129.478 184.674 129.369 183.332 128.656 182.804C128.436 182.661 128.163 182.613 127.888 182.613Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M125.768 68.5352C125.575 68.5352 125.43 68.679 125.43 68.7755L125.575 70.5971C125.623 70.6931 125.768 70.7896 125.962 70.7896H147.1C147.292 70.7896 147.485 70.6458 147.438 70.502L146.905 68.7277C146.808 68.5825 146.663 68.5352 146.567 68.5352H125.768Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M144.03 68.5371C143.922 68.5371 143.885 68.6327 143.885 68.6818L144.065 71.0964C144.065 71.192 144.137 71.2411 144.245 71.2411H144.641C144.712 71.2411 144.785 71.192 144.785 71.0964L144.605 68.6818C144.605 68.6327 144.497 68.5371 144.425 68.5371H144.03Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M127.368 68.5371C127.264 68.5371 127.229 68.6327 127.229 68.6818L127.402 71.0964C127.437 71.192 127.506 71.2411 127.576 71.2411H127.99C128.06 71.2411 128.129 71.192 128.094 71.0964L127.922 68.6818C127.922 68.6327 127.852 68.5371 127.748 68.5371H127.368Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.54 68.5371C135.436 68.5371 135.332 68.6327 135.385 68.6818L135.645 71.0964C135.645 71.192 135.748 71.2411 135.852 71.2411H136.474C136.578 71.2411 136.683 71.192 136.683 71.0964L136.371 68.6818C136.371 68.6327 136.267 68.5371 136.163 68.5371H135.54Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M134.432 20.7422C134.432 20.7422 134.644 21.1919 135.02 21.1919C135.114 21.1919 135.217 21.1638 135.331 21.0935L134.432 20.7422Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M132.292 37.4258C129.846 37.6215 124.174 38.0101 122.903 39.0824C121.68 40.155 121.24 61.2577 122.266 68.7128C123.294 76.1701 119.576 141.377 121.337 153.756C129.759 153.142 134.202 153.018 136.409 153.018C137.879 153.018 138.357 153.074 138.357 153.074L138.895 149.272L140.411 153.172C140.411 153.172 147.798 152.519 153.457 152.519C155.983 152.519 158.165 152.649 159.191 153.024C159.093 140.841 153.322 81.336 148.724 69.1529C150.29 53.8987 152.295 39.7168 151.316 38.5958C150.29 37.4754 141.829 37.4258 141.829 37.4258C140.265 39.0824 138.161 40.1068 135.912 40.2529C135.853 40.2542 135.796 40.2542 135.739 40.2542C132.34 40.2542 132.292 37.4258 132.292 37.4258Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M132.292 37.4258C129.846 37.6215 124.174 38.0101 122.903 39.0824C121.68 40.155 121.24 61.2577 122.266 68.7128C123.294 76.1701 119.576 141.377 121.337 153.756C129.759 153.142 134.202 153.018 136.409 153.018C137.879 153.018 138.357 153.074 138.357 153.074L138.895 149.272L140.411 153.172C140.411 153.172 147.798 152.519 153.457 152.519C155.983 152.519 158.165 152.649 159.191 153.024C159.093 140.841 153.322 81.336 148.724 69.1529C150.29 53.8987 152.295 39.7168 151.316 38.5958C150.29 37.4754 141.829 37.4258 141.829 37.4258C140.265 39.0824 138.161 40.1068 135.912 40.2529C135.853 40.2542 135.796 40.2542 135.739 40.2542C132.34 40.2542 132.292 37.4258 132.292 37.4258Z" fill="#ABF2BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M139.384 65.832C139.432 66.9106 139.579 67.99 139.869 69.0171C140.751 69.3301 142.668 69.4378 144.592 69.4378C146.153 69.4378 147.72 69.367 148.74 69.2746L148.692 69.1204L148.837 67.5788L139.384 65.832Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M147.937 47.3438C147.937 50.1965 148.524 55.0161 150.019 58.1638C150.394 54.8687 150.766 51.7711 151.086 49.0657L147.937 47.3438Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.19 40.1309C135.105 40.1309 135.018 40.1908 135.018 40.313C135.018 40.4109 134.629 49.9423 134.53 70.3172C134.432 103.873 138.542 148.661 138.591 149.098C138.591 149.196 138.689 149.244 138.739 149.244H138.787C138.885 149.244 138.934 149.146 138.934 149.05C138.885 148.612 134.775 103.873 134.872 70.3172C134.97 49.9423 135.362 40.4109 135.362 40.313C135.362 40.1908 135.277 40.1309 135.19 40.1309Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M142.737 68.5352C142.63 68.5352 142.535 68.6262 142.592 68.7674C143.779 71.8068 146.058 74.2773 149.001 75.7494H149.097C149.144 75.7494 149.192 75.7026 149.239 75.6539C149.286 75.5601 149.239 75.4645 149.144 75.4162C146.296 73.9923 144.111 71.6175 142.923 68.6731C142.886 68.5766 142.808 68.5352 142.737 68.5352Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M120.206 51.4023C119.618 51.4023 119.126 51.938 119.225 52.5233L121.68 71.0198C121.777 71.6533 122.268 72.1389 122.956 72.1389H136.507C136.532 72.1421 136.556 72.1421 136.58 72.1421C137.178 72.1421 137.583 71.5816 137.489 71.0198L135.082 52.5233C134.985 51.8898 134.445 51.4519 133.806 51.4023H120.206Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.546 58.166L136.234 63.4532C136.234 63.4532 137.991 64.4772 139.703 64.4772C140.217 64.4772 140.727 64.3852 141.184 64.1453L140.819 62.0207L136.546 58.166Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M127.072 68.5371C126.968 68.5371 126.865 68.5867 126.865 68.6873C126.345 71.242 125.099 73.5966 123.231 75.4497C123.178 75.4993 123.178 75.5999 123.231 75.7004C123.282 75.7004 123.333 75.75 123.386 75.75C123.437 75.75 123.489 75.7004 123.542 75.7004C126.812 72.2434 127.228 68.887 127.228 68.7369C127.228 68.6363 127.176 68.5371 127.072 68.5371Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M132.233 57.7148L132.182 61.9555L137.131 63.5751L136.672 58.0963L132.233 57.7148Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M151.361 38.7793L144.801 43.3883C144.851 43.4361 144.995 43.6309 145.092 43.7269L145.381 44.1634C145.621 44.5038 145.815 44.7947 146.007 45.1351C146.393 45.7167 146.779 46.3958 147.165 47.027C147.888 48.3856 148.563 49.7437 149.143 51.15C150.3 53.9149 151.12 56.8263 151.553 59.8342C151.553 60.1728 151.603 60.5132 151.651 60.9014L151.698 61.2897H151.603C151.023 61.2897 150.494 61.2897 149.914 61.1923C148.563 60.9497 147.165 60.6106 145.863 60.125C145.187 59.8342 144.464 59.5434 143.789 59.2521L142.776 58.7665C142.439 58.6213 142.101 58.4261 141.811 58.2809L138.484 66.0921C139.015 66.2856 139.4 66.383 139.835 66.4803L141.136 66.8686C141.956 67.1102 142.825 67.3528 143.692 67.5481C145.526 67.9841 147.358 68.3232 149.191 68.4683C149.69 68.5121 150.178 68.5369 150.666 68.5369C151.264 68.5369 151.86 68.5004 152.47 68.4205C153.097 68.3232 153.773 68.1775 154.399 67.9349C155.171 67.6441 155.943 67.2554 156.57 66.6738C157.293 66.0443 157.872 65.2674 158.258 64.3454C158.547 63.5689 158.741 62.7443 158.741 61.9196C158.741 61.5805 158.741 61.2405 158.692 60.9014L158.644 60.2224C158.596 59.7846 158.547 59.3481 158.499 58.9121C158.016 55.3708 157.149 51.8773 155.943 48.5308C155.315 46.88 154.64 45.2311 153.918 43.6309C153.531 42.8049 153.145 42.0298 152.712 41.2533L152.084 40.0404L151.747 39.4092C151.603 39.2158 151.506 39.0223 151.361 38.7793Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M151.361 38.7793L144.801 43.3883C144.851 43.4361 144.995 43.6309 145.092 43.7269L145.381 44.1634C145.621 44.5038 145.815 44.7947 146.007 45.1351C146.393 45.7167 146.779 46.3958 147.165 47.027C147.888 48.3856 148.563 49.7437 149.143 51.15C150.3 53.9149 151.12 56.8263 151.553 59.8342C151.553 60.1728 151.603 60.5132 151.651 60.9014L151.698 61.2897H151.603C151.023 61.2897 150.494 61.2897 149.914 61.1923C148.563 60.9497 147.165 60.6106 145.863 60.125C145.187 59.8342 144.464 59.5434 143.789 59.2521L142.776 58.7665C142.439 58.6213 142.101 58.4261 141.811 58.2809L138.484 66.0921C139.015 66.2856 139.4 66.383 139.835 66.4803L141.136 66.8686C141.956 67.1102 142.825 67.3528 143.692 67.5481C145.526 67.9841 147.358 68.3232 149.191 68.4683C149.69 68.5121 150.178 68.5369 150.666 68.5369C151.264 68.5369 151.86 68.5004 152.47 68.4205C153.097 68.3232 153.773 68.1775 154.399 67.9349C155.171 67.6441 155.943 67.2554 156.57 66.6738C157.293 66.0443 157.872 65.2674 158.258 64.3454C158.547 63.5689 158.741 62.7443 158.741 61.9196C158.741 61.5805 158.741 61.2405 158.692 60.9014L158.644 60.2224C158.596 59.7846 158.547 59.3481 158.499 58.9121C158.016 55.3708 157.149 51.8773 155.943 48.5308C155.315 46.88 154.64 45.2311 153.918 43.6309C153.531 42.8049 153.145 42.0298 152.712 41.2533L152.084 40.0404L151.747 39.4092C151.603 39.2158 151.506 39.0223 151.361 38.7793Z" fill="#ABF2BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M141.458 36.9746C139.761 38.3372 137.869 39.4563 135.784 40.2355C137.288 41.5981 137.335 45.5402 137.335 45.5402C137.335 45.5402 143.884 40.7215 143.643 37.3642C142.963 37.1207 142.235 36.9746 141.458 36.9746Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M131.731 36.9727C131.275 36.9727 130.823 37.0502 130.41 37.2076C128.581 40.5473 132.544 44.6378 132.544 44.6378C132.544 44.6378 133.305 41.3459 134.88 39.9495C133.662 39.4517 132.747 38.3542 132.544 37.0565C132.277 37.0011 132.003 36.9727 131.731 36.9727Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M134.139 12.627C133.196 12.627 132.101 13.3317 130.833 15.0957C129.48 17.0341 136.871 22.2681 139.384 22.996C138.751 20.4968 137.29 12.627 134.139 12.627Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.732 17.8952C135.833 17.8952 135.933 17.8952 136.083 17.9472C137.383 18.2029 138.133 20.04 137.734 21.9306C137.372 23.6836 136.194 24.9358 135.011 24.9358C134.886 24.9358 134.758 24.9218 134.632 24.8916C133.283 24.585 132.532 22.7986 132.932 20.908C133.333 19.172 134.533 17.8952 135.732 17.8952ZM135.667 17.5859C134.314 17.5859 132.986 18.9285 132.583 20.8069C132.182 22.8997 133.033 24.8916 134.533 25.1977C134.683 25.2496 134.783 25.2496 134.933 25.2496C136.334 25.2496 137.633 23.9222 138.034 22.0316C138.483 19.9389 137.633 17.9472 136.133 17.641C135.978 17.6028 135.822 17.5859 135.667 17.5859Z" fill="#3A9C76"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M129.88 16.9825C129.98 16.9825 130.081 17.0328 130.23 17.0328C131.531 17.3374 132.28 19.1162 131.88 20.9956C131.518 22.7394 130.342 23.9867 129.121 23.9867C128.991 23.9867 128.861 23.9713 128.73 23.9425C127.43 23.6882 126.679 21.8591 127.079 19.9798C127.281 19.0659 127.679 18.3029 128.33 17.6435C128.73 17.2369 129.28 17.0328 129.88 16.9825ZM129.826 16.6855C129.186 16.6855 128.576 16.946 128.13 17.4394C127.43 18.1004 126.979 18.9639 126.779 19.8777C126.33 22.0114 127.18 23.9425 128.681 24.2973C128.83 24.2973 128.98 24.3492 129.13 24.3492C130.479 24.3492 131.83 22.977 132.231 21.0976C132.631 19.0142 131.781 17.0328 130.28 16.7282C130.129 16.6993 129.976 16.6855 129.826 16.6855Z" fill="#3A9C76"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M132.1 20.7422C132.033 20.7422 131.965 20.7488 131.9 20.762C131.788 20.762 131.731 20.9072 131.788 20.9819C131.788 21.1293 131.9 21.2019 131.957 21.2019C132.004 21.1887 132.053 21.1821 132.102 21.1821C132.333 21.1821 132.557 21.3251 132.744 21.5692C132.744 21.5692 132.8 21.6418 132.857 21.6418C132.913 21.6418 132.968 21.6418 133.026 21.5692C133.081 21.4944 133.081 21.3492 133.026 21.2019C132.792 20.8962 132.439 20.7422 132.1 20.7422Z" fill="#3A9C76"></path>',106)]))}const rd={},cd=(0,$.A)(rd,[["render",ld]]),dd=cd,hd={name:"NotOptimizedViewportModal",components:{Illustration:dd},data(){return{isModalActive:!0}},methods:{handleNotOptimizedModal(){this.isModalActive=!1}}},ud=(0,$.A)(hd,[["render",ad],["__scopeId","data-v-5a442ccf"]]),md=ud,pd={class:"viewport-modal"},gd={class:"modal-card-body"},Cd={class:"content"},_d={class:"modal-card-foot",style:{"padding-top":"0"}};function bd(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button"),r=(0,o.resolveComponent)("b-modal");return(0,o.openBlock)(),(0,o.createElementBlock)("section",pd,[(0,o.createVNode)(r,{modelValue:a.isModalActive,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isModalActive=e),class:"modal-text-center",width:500,"can-cancel":!1},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("section",gd,[(0,o.createElementVNode)("div",Cd,[(0,o.createElementVNode)("h3",null,(0,o.toDisplayString)(e.$t("annotation_deleted")),1)])]),(0,o.createElementVNode)("footer",_d,[(0,o.createVNode)(l,{type:"is-primary",class:"primary-button",onClick:s.closeModal},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("ok")),1)])),_:1},8,["onClick"])])])),_:1},8,["modelValue"])])}const Ed={name:"AnnotationDeletedModal",data(){return{isModalActive:"#deleted"===window.location.hash}},methods:{closeModal(){window.location.hash="",this.isModalActive=!1}}},Sd=(0,$.A)(Ed,[["render",bd]]),fd=Sd,vd={class:"document-error-modal"},Ad={class:"modal-card-body"},kd={class:"header"},Nd={class:"error-icon"},wd={class:"content"},yd={class:"modal-card-foot"};function Td(e,t,n,i,a,s){const l=(0,o.resolveComponent)("ErrorIcon"),r=(0,o.resolveComponent)("b-button"),c=(0,o.resolveComponent)("b-modal");return(0,o.openBlock)(),(0,o.createElementBlock)("section",vd,[(0,o.createVNode)(c,{modelValue:a.isModalActive,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isModalActive=e),width:400,"can-cancel":["x"],"on-cancel":s.closeModal},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("section",Ad,[(0,o.createElementVNode)("div",kd,[(0,o.createElementVNode)("div",Nd,[(0,o.createVNode)(l,{class:"icon"})])]),(0,o.createElementVNode)("div",wd,[(0,o.createElementVNode)("h3",null,(0,o.toDisplayString)(e.$t("document_error_title")),1),(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("document_error_info")),1)])]),(0,o.createElementVNode)("footer",yd,[e.showBranding?((0,o.openBlock)(),(0,o.createBlock)(r,{key:0,type:"is-primary",class:"primary-button",onClick:s.handleContactSupport},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("contact_support")),1)])),_:1},8,["onClick"])):(0,o.createCommentVNode)("",!0)])])),_:1},8,["modelValue","on-cancel"])])}const Bd={width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dd(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Bd,t[0]||(t[0]=[(0,o.createElementVNode)("g",{"clip-path":"url(#clip0_5456_102710)"},[(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.02582 0.854884C7.32534 0.686248 7.66328 0.597656 8.00701 0.597656C8.35075 0.597656 8.68868 0.686248 8.98821 0.854884C9.28773 1.02352 9.53874 1.26651 9.71701 1.5604L9.71893 1.56357L15.3656 10.9902L15.371 10.9994C15.5456 11.3019 15.638 11.6447 15.639 11.994C15.64 12.3432 15.5495 12.6866 15.3766 12.99C15.2036 13.2934 14.9543 13.5462 14.6533 13.7233C14.3523 13.9004 14.0102 13.9956 13.661 13.9994L13.6537 13.9995L2.35302 13.9995C2.00382 13.9956 1.66171 13.9004 1.36073 13.7233C1.05974 13.5462 0.810381 13.2934 0.637445 12.99C0.46451 12.6866 0.37403 12.3432 0.375008 11.994C0.375986 11.6447 0.468387 11.3019 0.643019 10.9994L0.648434 10.9902L6.297 1.56039C6.47528 1.2665 6.72629 1.02352 7.02582 0.854884ZM8.00701 1.93099C7.89243 1.93099 7.77979 1.96052 7.67995 2.01673C7.58056 2.07269 7.49719 2.15321 7.43782 2.25058L1.79547 11.67C1.73869 11.7699 1.70866 11.8828 1.70834 11.9977C1.70801 12.1141 1.73817 12.2286 1.79582 12.3297C1.85346 12.4308 1.93658 12.5151 2.03691 12.5741C2.13636 12.6327 2.24928 12.6644 2.36461 12.6662H13.6494C13.7647 12.6644 13.8777 12.6327 13.9771 12.5741C14.0774 12.5151 14.1606 12.4308 14.2182 12.3297C14.2759 12.2286 14.306 12.1141 14.3057 11.9977C14.3054 11.8828 14.2753 11.7699 14.2186 11.6701L8.57701 2.2519C8.57675 2.25146 8.57648 2.25102 8.57621 2.25058C8.51683 2.15321 8.43347 2.07269 8.33408 2.01673C8.23424 1.96052 8.12159 1.93099 8.00701 1.93099ZM8.00701 4.66615C8.3752 4.66615 8.67368 4.96463 8.67368 5.33282V7.99949C8.67368 8.36768 8.3752 8.66615 8.00701 8.66615C7.63882 8.66615 7.34035 8.36768 7.34035 7.99949V5.33282C7.34035 4.96463 7.63882 4.66615 8.00701 4.66615ZM7.34035 10.6662C7.34035 10.298 7.63882 9.99949 8.00701 9.99949H8.01368C8.38187 9.99949 8.68035 10.298 8.68035 10.6662C8.68035 11.0343 8.38187 11.3328 8.01368 11.3328H8.00701C7.63882 11.3328 7.34035 11.0343 7.34035 10.6662Z",fill:"#E7423A"})],-1),(0,o.createElementVNode)("defs",null,[(0,o.createElementVNode)("clipPath",{id:"clip0_5456_102710"},[(0,o.createElementVNode)("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.0078125)"})])],-1)]))}const Ld={},Vd=(0,$.A)(Ld,[["render",Dd]]),xd=Vd,Md={name:"DocumentErrorModal",components:{ErrorIcon:xd},data(){return{isModalActive:!0}},computed:{...(0,s.aH)("display",["showBranding"])},methods:{handleContactSupport(){const e="Document error";this.$store.dispatch("document/contactSupport",e)},closeModal(){this.$store.dispatch("document/setDocumentError",!1)}}},Id=(0,$.A)(Md,[["render",Td],["__scopeId","data-v-254242fc"]]),Od=Id;var Pd=n(9415);const $d={name:"DocumentDashboard",components:{Splitpanes:Pd.S,Pane:Pd.Z,DocumentTopBar:Vt,ScrollingDocument:xo,DocumentThumbnails:Xo,DocumentAnnotations:Cl,DocumentEdit:Wc,ErrorMessage:Qc,NotOptimizedViewportModal:md,DocumentErrorModal:Od,ChooseLabelSetModal:Bl,AnnotationDeletedModal:fd},data(){return{resizeObserver:null,unwatchSelectedDocument:null,documentContainerLeftPadding:0,documentContainerWidth:0}},computed:{...(0,s.aH)("display",["scale","fit","optimalResolution","pageWidthScale","currentPage","showAnnSetTable","showChooseLabelSetModal"]),...(0,s.aH)("document",["showActionError","showDocumentError","errorMessageWidth","selectedDocument","splittingSuggestions"]),...(0,s.aH)("edit",["editMode","renameAndCategorize"]),...(0,s.L8)("display",["isMinimumWidth"])},watch:{selectedDocument(e,t){e&&!t?this.resizeObserver.observe(this.$refs.scrollingDocument.$el):e&&this.onDocumentResize()},fit(e,t){e!==t&&this.onDocumentResize()}},mounted(){this.resizeObserver=new ResizeObserver(this.onDocumentResize)},unmounted(){this.$refs.scrollingDocument&&this.resizeObserver.unobserve(this.$refs.scrollingDocument.$el)},methods:{elementsWidth(){let e=1;return this.$refs.editView&&(e+=this.$refs.editView.$el.clientWidth),this.$refs.documentPages&&(e+=this.$refs.documentPages.$el.clientWidth),this.$refs.annotations&&(e+=this.$refs.annotations.$el.clientWidth),e},onDocumentResize(){this.$refs.scrollingDocument&&(this.documentContainerLeftPadding=this.$refs.scrollingDocument.$el.getBoundingClientRect().left,this.documentContainerWidth=this.$refs.scrollingDocument.$el.offsetWidth,this.$store.dispatch("display/updateOptimalResolution",this.$el.offsetWidth),this.selectedDocument.pages[0]&&this.$store.dispatch("display/updateScale",{elementsWidth:this.elementsWidth(),client:{width:this.$el.clientWidth,height:this.$el.clientHeight},viewport:{width:this.selectedDocument.pages[0].size[0],height:this.selectedDocument.pages[0].size[1]}}))}}},Rd=(0,$.A)($d,[["render",m],["__scopeId","data-v-5bb4e541"]]),Fd=Rd,Hd={class:"error-page"};function zd(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Hd,[(0,o.createVNode)(l,{icon:"circle-exclamation",size:"is-48",class:"error-icon"}),(0,o.createElementVNode)("h1",null,(0,o.toDisplayString)(e.$t("document_error_title")),1),(0,o.createElementVNode)("h2",null,(0,o.toDisplayString)(n.error?n.error:""),1)])}const Ud={name:"ErrorPage",props:{error:{type:String,required:!1,default:null}}},Zd=(0,$.A)(Ud,[["render",zd],["__scopeId","data-v-6b311fc9"]]),Gd=Zd,Wd={key:0,class:"documents-list"},qd={key:0,class:"documents-list-top"},jd={class:"documents-list-top-left"},Kd={class:"documents-list-top-right"},Yd={key:0,class:"action-box"},Jd={class:"documents-list-bottom"},Xd=["onClick"],Qd={key:0,class:"error-icon"};function eh(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button"),r=(0,o.resolveComponent)("b-skeleton"),c=(0,o.resolveComponent)("ServerImage"),d=(0,o.resolveComponent)("ErrorIcon"),h=(0,o.resolveComponent)("b-carousel-list");return e.documentsAvailableToReview&&e.documentsAvailableToReview.length>0?((0,o.openBlock)(),(0,o.createElementBlock)("div",Wd,[a.showCategoryInfo&&a.selectedCategory?((0,o.openBlock)(),(0,o.createElementBlock)("div",qd,[(0,o.createElementVNode)("div",jd,[(0,o.createElementVNode)("h2",null,(0,o.toDisplayString)(a.selectedCategory.name),1),(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(a.selectedCategory.description),1)]),(0,o.createElementVNode)("div",Kd,[e.showBranding?((0,o.openBlock)(),(0,o.createElementBlock)("div",Yd,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("upload_documents")),1),(0,o.createVNode)(l,{class:"action-button primary-button",type:"is-primary",onClick:s.requestTrialAccess},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("request_trial")),1)])),_:1},8,["onClick"])])):(0,o.createCommentVNode)("",!0)])])):(0,o.createCommentVNode)("",!0),(0,o.createElementVNode)("div",Jd,[(0,o.createVNode)(h,{data:e.documentsAvailableToReview,"items-to-show":5},{item:(0,o.withCtx)((t=>[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["documents-list-thumbnail",e.selectedDocument.id==t.id&&"selected"]),onClick:e=>s.changeDocument(t.id)},[(0,o.createVNode)(c,{class:(0,o.normalizeClass)(["img-thumbnail",e.selectedDocument.id==t.id&&"selected"]),"image-url":`${t.thumbnail_url}?${t.updated_at}`},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{width:"20px",height:"100%"})])),_:2},1032,["class","image-url"]),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["document-name",e.selectedDocument.id==t.id&&"selected"])},(0,o.toDisplayString)(e.selectedDocument.id==t.id?e.selectedDocument.data_file_name:t.data_file_name),3),e.documentHadErrorDuringExtraction(t)?((0,o.openBlock)(),(0,o.createElementBlock)("div",Qd,[(0,o.createVNode)(d)])):(0,o.createCommentVNode)("",!0)],10,Xd)])),_:1},8,["data"])])])):(0,o.createCommentVNode)("",!0)}const th={name:"DocumentsList",components:{ServerImage:we,ErrorIcon:xd},data(){return{showCategoryInfo:!1,selectedCategory:null,documentsList:null}},computed:{...(0,s.aH)("document",["selectedDocument"]),...(0,s.aH)("category",["documentsAvailableToReview"]),...(0,s.aH)("display",["showBranding"]),...(0,s.L8)("category",["category"]),...(0,s.L8)("document",["documentHadErrorDuringExtraction"])},watch:{showCategoryInfo(e){e&&(this.selectedCategory=this.category(this.selectedDocument.category))}},methods:{changeDocument(e){this.$store.dispatch("document/changeCurrentDocument",e)},requestTrialAccess(){window.open("https://konfuzio.com","_blank")}}},nh=(0,$.A)(th,[["render",eh],["__scopeId","data-v-710ee0ae"]]),oh=nh;var ih=n(6704);const ah={name:"App",components:{DocumentsList:oh,DocumentDashboard:Fd,ErrorPage:Gd},props:{document:{type:String,required:!1,default:null},user_token:{type:String,required:!1,default:""},full_mode:{type:String,required:!1,default:"false"},show_documents_navigation:{type:String,required:!1,default:"true"},show_missing_annotations:{type:String,required:!1,default:"true"},show_feedback_needed_annotations:{type:String,required:!1,default:"true"},show_accepted_annotations:{type:String,required:!1,default:"true"},sentry_dsn:{type:String,required:!1,default:""},sentry_env:{type:String,required:!1,default:""},api_url:{type:String,required:!1,default:""},image_url:{type:String,required:!1,default:""},locale:{type:String,required:!1},documents_list_path:{type:String,required:!1,default:""},details_url:{type:String,required:!1,default:""},annotation:{type:String,required:!1,default:""},annotationSet:{type:String,required:!1,default:""},sso_url:{type:String,required:!1,default:""},sso_realm:{type:String,required:!1,default:""},sso_client_id:{type:String,required:!1,default:""},hide_empty_label_sets:{type:String,required:!1,default:"false"},annotation_content_width:{type:String,required:!1,default:"60"},remove_branding:{type:String,required:!1,default:"false"}},computed:{...(0,s.aH)("display",["pageError"]),documentId(){return es("document")?es("document"):ts("d")?ts("d"):{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DOCUMENT?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DOCUMENT:this.document?this.document:null},userToken(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_USER_TOKEN?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_USER_TOKEN:this.user_token?this.user_token:null},fullMode(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_FULL_MODE?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_FULL_MODE:this.full_mode&&"true"===this.full_mode?this.full_mode:null},showDocumentsNavigation(){return!this.isPublicView&&({NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_DOCUMENTS_NAVIGATION?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_DOCUMENTS_NAVIGATION:"true"===this.show_documents_navigation)},removeBranding(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_REMOVE_BRANDING?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_REMOVE_BRANDING:"true"===this.remove_branding},showMissingAnnotations(){return"#unrevised"!==window.location.hash&&"#possiblyIncorrect"!==window.location.hash&&({NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_MISSING_ANNOTATIONS?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_MISSING_ANNOTATIONS:"true"===this.show_missing_annotations)},showAcceptedAnnotations(){return"#unrevised"!==window.location.hash&&"#possiblyIncorrect"!==window.location.hash&&({NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_ACCEPTED_ANNOTATIONS?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_ACCEPTED_ANNOTATIONS:"true"===this.show_accepted_annotations)},showFeedbackNeededAnnotations(){return"#unrevised"===window.location.hash||"#possiblyIncorrect"===window.location.hash||({NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_FEEDBACK_NEEDED_ANNOTATIONS?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_FEEDBACK_NEEDED_ANNOTATIONS:"true"===this.show_feedback_needed_annotations)},isPublicView(){return!(this.userToken||this.fullMode||this.ssoUrl&&this.ssoRealm&&this.ssoClientId)},showDocumentsList(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_DOCUMENTS_LIST},documentsListPath(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DOCUMENTS_LIST_PATH?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DOCUMENTS_LIST_PATH:this.documents_list_path&&""!==this.documents_list_path?this.documents_list_path:null},detailsUrl(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DETAILS_URL?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DETAILS_URL:this.details_url?this.details_url:null},ssoUrl(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_URL?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_URL:this.sso_url?this.sso_url:null},ssoRealm(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_REALM?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_REALM:this.sso_realm?this.sso_realm:null},ssoClientId(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_CLIENT_ID?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_CLIENT_ID:this.sso_client_id?this.sso_client_id:null},annotationId(){return ns("ann")?ns("ann"):{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION:this.annotation?this.annotation:null},annotationSetId(){return ns("templ")?ns("templ"):{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION_SET?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION_SET:this.annotationSet?this.annotationSet:null},hideEmptyLabelSets(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_HIDE_EMPTY_LABEL_SETS?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_HIDE_EMPTY_LABEL_SETS:"true"===this.hide_empty_label_sets},annotationContentWidth(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION_CONTENT_WIDTH?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION_CONTENT_WIDTH:this.annotation_content_width}},async created(){l.T({Vue:o["default"],dsn:{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SENTRY_DSN,integrations:[new ih.IQ.Jh],environment:{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SENTRY_ENV,tracesSampleRate:1,logErrors:!0,tracingOptions:{trackComponents:!0}}),console.log(`${this.removeBranding?"":n(8330).UU} ${n(8330).rE}`),console.log("-------"),this.locale&&""!==this.locale&&(this.$i18n.locale=this.locale),this.userToken?Ae.setAuthToken(this.userToken):this.ssoUrl&&this.ssoRealm&&this.ssoClientId&&await se(this.ssoUrl,this.ssoRealm,this.ssoClientId),Ae.setLocale(this.$i18n.locale),""!==this.api_url&&Ae.setApiUrl(this.api_url),""!==this.image_url&&Ae.setFileUrl(this.image_url),Promise.all([this.$store.dispatch("display/setDetailsUrl",this.detailsUrl),this.$store.dispatch("display/setAnnotationWidth",this.annotationContentWidth),this.$store.dispatch("display/hideEmptyLabelSets",this.hideEmptyLabelSets),this.$store.dispatch("display/showDocumentsNavigation",this.showDocumentsNavigation),this.$store.dispatch("display/showBranding",!this.removeBranding),this.$store.dispatch("document/showMissingAnnotations",this.showMissingAnnotations),this.$store.dispatch("document/showFeedbackNeededAnnotations",this.showFeedbackNeededAnnotations),this.$store.dispatch("document/showAcceptedAnnotations",this.showAcceptedAnnotations),this.$store.dispatch("document/setDocId",this.documentId),this.$store.dispatch("document/setPublicView",this.isPublicView),this.$store.dispatch("document/setAnnotationId",this.annotationId),this.$store.dispatch("document/setAnnotationSetId",this.annotationSetId),this.$store.dispatch("project/setDocumentsListPath",this.documentsListPath)]).finally((()=>{this.$store.dispatch("document/fetchDocument")}));const e=window.ResizeObserver;window.ResizeObserver=class extends e{constructor(e){e=rs(e,20),super(e)}}}},sh=(0,$.A)(ah,[["render",a]]),lh=sh;var rh=n(7411),ch=n(5916),dh=n(4682);function hh(){const e=n(5432),t={};return e.keys().forEach((n=>{const o=n.match(/([A-Za-z0-9-_]+)\./i);if(o&&o.length>1){const i=o[1];t[i]=e(n)}})),t}const uh=(0,dh.hU)({locale:{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_LOCALE||"en",fallbackLocale:"en",messages:hh()});var mh=n(346);const ph=Ae.HTTP,gh=(e,t)=>{const n=Math.pow(10,t||0);return Math.floor(e*n)/n},Ch={scale:void 0,fit:"width",currentPage:1,optimalResolution:!0,interactionBlocked:!1,categorizeModalIsActive:!1,pageChangedFromThumbnail:!1,showAnnSetTable:null,showChooseLabelSetModal:null,hideEmptyLabelSets:!1,showDocumentsNavigation:!0,currentSearch:"",searchEnabled:!1,searchResults:[],searchLoading:!1,currentSearchResult:null,detailsUrl:null,pageError:null,labelWidth:40,annotationWidth:60,showBranding:!0},_h={isMinimumWidth:e=>e=>e>=Ot,pageWidthScale:e=>(e,t,n)=>(t-e)*Mt*It/n,pageHeightScale:e=>(e,t)=>e*Mt*It/t,visiblePageRange:(e,t,n,o)=>{const i=o.pageCount,a=e.currentPage-1<1?1:e.currentPage-1,s=e.currentPage+1>i?i:e.currentPage+1;return[a,e.currentPage,s]},searchResultsForPage:(e,t)=>t=>!e.searchEnabled||e.searchResults.length<1?[]:e.searchResults.filter((e=>e.page_index+1===t)),currentSearchResultForPage:e=>t=>{if(!e.searchEnabled||e.searchResults.length<1)return!1;const n=e.searchResults[e.currentSearchResult];return!(!n||n.page_index!==t-1)&&n},scaledEntities:(e,t)=>(e,n)=>e&&0!==e.length?e.map((e=>{const o=t.bboxToRect(n,e);return{original:e,scaled:{...o}}})):[],imageScale:e=>e=>e.size&&e.size.length>0&&e.original_size&&e.original_size.length>0?new mh.A(e.size[0]).div(e.original_size[0]).toNumber():0,bboxToPoint:(e,t)=>(n,o,i=!1)=>{if(n&&n.original_size&&n.original_size.length>1){const a=t.imageScale(n),{x:s,y:l}=o,r=new mh.A(n.original_size[1]),c={x:new mh.A(s).minus(i?1:0).times(e.scale).times(a).div(Mt).toNumber(),y:r.minus(new mh.A(l)).minus(i?17.1:0).times(e.scale).times(a).div(Mt).toNumber()};return c}return{x:0,y:0}},bboxToRect:(e,t)=>(n,o,i=!1)=>{const a=t.imageScale(n);if(o.x0&&o.y0){const{x0:t,x1:s,y0:l,y1:r}=o,c=new mh.A(n.original_size[1]),d={x:new mh.A(t).minus(i?1:0).times(e.scale).times(a).div(Mt).toNumber(),y:c.minus(new mh.A(r)).minus(i?17.1:0).times(e.scale).times(a).div(Mt).toNumber(),width:new mh.A(s).minus(t).abs().times(e.scale).times(a).div(Mt).toNumber(),height:new mh.A(r).minus(l).times(e.scale).times(a).div(Mt).toNumber()};return d}return{x:0,y:0,width:0,height:0}},clientToBbox:(e,t)=>(n,o,i)=>{const a=new mh.A(n.original_size[1]),s=t.imageScale(n),l=new mh.A(Math.min(o.x,i.x)).div(e.scale).div(s).times(Mt).dp(3,mh.A.ROUND_DOWN).toNumber(),r=new mh.A(Math.max(o.x,i.x)).div(e.scale).div(s).times(Mt).dp(3,mh.A.ROUND_UP).toNumber(),c=new mh.A(Math.min(o.y,i.y)).div(e.scale).div(s).times(Mt).dp(3).toNumber(),d=new mh.A(Math.max(o.y,i.y)).div(e.scale).div(s).times(Mt).dp(3).toNumber(),h=a.minus(d).dp(3,mh.A.ROUND_DOWN).toNumber(),u=a.minus(c).dp(3,mh.A.ROUND_UP).toNumber(),m={x0:l,x1:r,y0:h,y1:u,page_index:n.number-1};return m}},bh={updateScale({commit:e,getters:t},{elementsWidth:n,client:o,viewport:i,scale:a}){switch(Ch.fit){case"width":e("SET_SCALE",t.pageWidthScale(n,o.width,i.width));break;case"auto":const s=t.pageWidthScale(n,o.width,i.width),l=t.pageWidthScale(o.height,i.height),r=Math.min(s,l);e("SET_SCALE",r);break;case"all":{const a=t.pageWidthScale(n,o.width,i.width);e("SET_SCALE",a);break}case"custom":a&&e("SET_SCALE",a);break;default:console.log("No fit defined");break}},updateFit({commit:e},t){e("SET_FIT",t)},debounceUpdateCurrentPage:rs((({commit:e,dispatch:t},n)=>{t("updateCurrentPage",n)}),300),updateCurrentPage({commit:e},t){e("SET_CURRENT_PAGE",t)},updateOptimalResolution({commit:e},t){e("SET_OPTIMAL_RESOLUTION",t>=Pt)},showAnnSetTable({commit:e},t){e("SET_ANN_SET_TABLE",t)},showDocumentsNavigation({commit:e},t){e("SET_SHOW_DOCUMENTS_NAVIGATION",t)},showBranding({commit:e},t){e("SET_SHOW_BRANDING",t)},showChooseLabelSetModal({commit:e},t){e("SET_SHOW_CHOOSE_LABEL_SET_MODAL",t)},toggleAnnSetTable({commit:e},t){e("TOGGLE_ANN_SET_TABLE",t)},setCategorizeModalIsActive:({commit:e},t)=>{e("SET_CATEGORIZE_MODAL_IS_ACTIVE",t)},setPageChangedFromThumbnail:({commit:e},t)=>{e("SET_PAGE_CHANGED_FROM_THUMBNAIL",t)},setDetailsUrl:({commit:e},t)=>{e("SET_DETAILS_URL",t)},setLabelWidth:({commit:e},t)=>{e("SET_LABEL_WIDTH",t),e("SET_ANNOTATION_WIDTH",100-t)},setAnnotationWidth:({commit:e},t)=>{const n=Number(t);n&&n>=20?(e("SET_ANNOTATION_WIDTH",n),e("SET_LABEL_WIDTH",100-n)):(e("SET_ANNOTATION_WIDTH",60),e("SET_LABEL_WIDTH",40))},debounceSearch:rs((({commit:e,dispatch:t},n)=>{t("search",n)}),300),startSearchLoading({commit:e}){e("SET_SEARCH_LOADING",!0)},hideEmptyLabelSets({commit:e},t){e("HIDE_EMPTY_LABEL_SETS",t)},search({commit:e,rootState:t},n){if(n.length>=3)return ph.post(`documents/${t.document.documentId}/search/`,{q:n}).then((t=>{e("SET_SEARCH_RESULTS",t.data.span),e("SET_SEARCH_LOADING",!1)}));e("SET_SEARCH_RESULTS",[]),e("SET_SEARCH_LOADING",!1)},resetSearch({commit:e}){e("SET_CURRENT_SEARCH",""),e("SET_SEARCH_RESULTS",[]),e("SET_SEARCH_LOADING",!1)},toggleSearch({commit:e}){e("TOGGLE_SEARCH")},enableSearch({commit:e},t){e("ENABLE_SEARCH",t)},setCurrentSearch({commit:e},t){e("SET_CURRENT_SEARCH",t)},setPageError({commit:e},t){e("SET_PAGE_ERROR",t)},setCurrentSearchResult({commit:e,state:t},n){let o=t.currentSearchResult+n;const i=t.searchResults.length-1;o>i?o=0:o<0&&(o=i),e("SET_CURRENT_SEARCH_RESULT",o)}},Eh={SET_SCALE:(e,t)=>{e.scale=gh(t,2)},SET_FIT:(e,t)=>{e.fit=t},SET_OPTIMAL_RESOLUTION:(e,t)=>{e.optimalResolution=t},SET_CURRENT_PAGE:(e,t)=>{e.currentPage=t},SET_LABEL_WIDTH:(e,t)=>{e.labelWidth=t},SET_ANNOTATION_WIDTH:(e,t)=>{e.annotationWidth=t},SET_SHOW_DOCUMENTS_NAVIGATION:(e,t)=>{e.showDocumentsNavigation=t},SET_SHOW_BRANDING:(e,t)=>{e.showBranding=t},SET_ANN_SET_TABLE:(e,t)=>{e.showAnnSetTable=t},HIDE_EMPTY_LABEL_SETS:(e,t)=>{e.hideEmptyLabelSets=t},TOGGLE_ANN_SET_TABLE:(e,t)=>{e.showAnnSetTable?e.showAnnSetTable=null:e.showAnnSetTable=t},SET_CATEGORIZE_MODAL_IS_ACTIVE:(e,t)=>{e.categorizeModalIsActive=t},SET_PAGE_CHANGED_FROM_THUMBNAIL:(e,t)=>{e.pageChangedFromThumbnail=t},SET_SHOW_CHOOSE_LABEL_SET_MODAL:(e,t)=>{e.showChooseLabelSetModal=t},SET_SEARCH_RESULTS:(e,t)=>{e.currentSearchResult=0,e.searchResults=t},SET_SEARCH_LOADING:(e,t)=>{e.searchLoading=t},TOGGLE_SEARCH:e=>{e.searchEnabled=!e.searchEnabled},ENABLE_SEARCH:(e,t)=>{e.searchEnabled=t},SET_CURRENT_SEARCH:(e,t)=>{e.currentSearch=t},SET_CURRENT_SEARCH_RESULT:(e,t)=>{e.currentSearchResult=t},SET_DETAILS_URL:(e,t)=>{e.detailsUrl=t},SET_PAGE_ERROR:(e,t)=>{e.pageError=t}},Sh={namespaced:!0,state:Ch,getters:_h,actions:bh,mutations:Eh},fh=Ae.HTTP,vh=1e3,Ah="api.v3.dvui.table",kh={loading:!0,pages:[],annotationSets:null,annotations:null,labels:[],documentId:{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DOCUMENT,documentSet:null,annotationId:null,annotationSetId:null,documentAnnotationSelected:null,selectedDocument:null,recalculatingAnnotations:!1,editAnnotation:null,missingAnnotations:[],publicView:!0,showActionError:!1,errorMessage:null,showDocumentError:!1,annotationsMarkedAsMissing:null,errorMessageWidth:null,hoveredAnnotationSet:null,newAcceptedAnnotations:null,serverError:!1,splittingSuggestions:null,enableGroupingFeature:!0,annotationFilters:{showFeedbackNeeded:!0,showEmpty:!0,showAccepted:!0},annotationSearch:es("search")&&es("search").split(",")||[]},Nh={pageCount:e=>e.selectedDocument.pages?e.selectedDocument.pages.length:0,pageSelected:(e,t,n)=>e.pages?e.pages[n.display.currentPage-1]:null,pageAtIndex:e=>t=>e.selectedDocument&&e.selectedDocument.pages?e.selectedDocument.pages[t]:null,scrollDocumentToAnnotation:e=>e.documentAnnotationSelected&&e.documentAnnotationSelected.scrollTo,categorizationIsConfirmed:e=>{if(e.selectedDocument){if(e.selectedDocument.category_is_revised||e.selectedDocument.is_reviewed)return!0;if(e.selectedDocument.category){const t=e.annotations.find((e=>e.revised));return void 0!=t}return!1}return!1},labelsFilteredForAnnotationCreation:(e,t)=>e=>{let t=[];return e.id&&e.labels?e.labels.map((e=>{const n=t.find((t=>t.id===e.id));n||(0===e.annotations.length||e.has_multiple_top_candidates)&&t.push(e)})):e.labels&&(t=e.labels),t},isAnnotationDeleted:e=>e=>!!e&&(e.revised&&!e.is_correct),labelHasAnnotations:(e,t)=>e=>{const n=e.annotations.filter((e=>!t.isAnnotationDeleted(e)));return n.length>0},isLabelMultiFalseAndGroupOfAnns:e=>t=>t&&t.annotations&&t.annotations.length>1&&!t.has_multiple_top_candidates&&e.enableGroupingFeature,annotationsByConfidence:e=>e=>(e.sort(((e,t)=>e.confidence>t.confidence?-1:e.confidence<t.confidence?1:0)),e),annotationSetExists:e=>t=>e.annotationSets.find((e=>e.id===t)),annotationSetsInTable:e=>()=>{const t={};return e.annotationSets.forEach((e=>{let n=!1;e.labels&&e.labels.forEach((e=>{e.annotations&&e.annotations.find((e=>e.origin&&e.origin===Ah))&&(n=!0)})),n&&(t[`${e.label_set.id}`]?t[`${e.label_set.id}`].push(e):t[`${e.label_set.id}`]=[e])})),t},annotationSetsToShowInList:e=>()=>{const t=[];return e.annotationSets.forEach((e=>{let n=!0;e.labels&&e.labels.forEach((e=>{e.annotations&&e.annotations.find((e=>e.origin&&e.origin===Ah))&&(n=!1)})),n&&t.push(e)})),t},annotationsInAnnotationsSets:e=>e=>{const t=[];return e.forEach((e=>{e.labels.forEach((e=>{e.annotations.forEach((e=>{t.push(e)}))}))})),t},annotationSetOfAnnotation:e=>t=>{let n=null;return e.annotationSets.forEach((e=>{e.labels.forEach((o=>{o.annotations.forEach((o=>{o.id!==t||(n=e)}))}))})),n},labelOfAnnotation:e=>t=>{let n=null;return e.annotationSets&&e.annotationSets.forEach((e=>{e.labels.forEach((e=>{e.annotations.forEach((o=>{o.id!==t.id||(n=e)}))}))})),n},getAnnotationsFiltered:(e,t)=>{let n=[],o=[],i=[],a=[];const s=e.annotationSearch.length>0,l=(t,n,o)=>o?(t.push(n),!0):s?(n.offset_string&&e.annotationSearch.find((e=>n.offset_string.toLowerCase().includes(e.toLowerCase())))||!(!n.id||!e.annotationSearch.find((e=>`${n.id}`===e))))&&(t.push(n),!0):(t.push(n),!0),r=t=>!!s&&!(!t.name||!e.annotationSearch.find((e=>t.name.toLowerCase().includes(e.toLowerCase()))));return e.annotationSets&&e.annotationSets.forEach((t=>{o=[],t.labels.forEach((t=>{const i=[];let c=!1;const d=r(t);t.annotations&&0!==t.annotations.length?e.annotationFilters.showEmpty&&e.annotationFilters.showFeedbackNeeded&&e.annotationFilters.showAccepted?t.annotations.forEach((e=>{const t=l(i,e,d);t&&(c=!0)})):t.annotations.forEach((t=>{if(e.annotationFilters.showFeedbackNeeded&&!1===t.revised&&!t.created_by){const e=l(i,t,d);e&&(c=!0)}else if(e.annotationFilters.showAccepted&&(!0===t.revised||t.created_by)){const e=l(i,t,d);e&&(c=!0)}})):!e.annotationFilters.showEmpty||s&&!d||(c=!0),c&&(o.push({...t,annotations:i}),a.push(t)),n.push(...i)})),e.annotationSearch.length>0&&0===o.length||i.push({...t,labels:o})})),i.sort(((e,t)=>e.label_set.name.localeCompare(t.label_set.name))),{annotationSets:i,labels:a,annotations:n}},processAnnotationSets:(e,t,n)=>o=>{let i=[],a=[],s=[],l=[];const r=n=>{if(n=t.annotationsByConfidence(n),e.annotationId)for(let t=0;t<n.length;t++)e.annotationId==n[t].id&&n.unshift(n.splice(t,1)[0]);return n};return o.forEach((o=>{(n.display.hideEmptyLabelSets||e.publicView)&&0===o.labels.length||(a=[],o.labels.forEach((e=>{let n=[];e.annotations.forEach((e=>{t.isNegative(e)||n.push(e)})),e.has_multiple_top_candidates||(n=r(n)),a.push({...e,annotations:n}),l.push(e),i.push(...n)})),s.push({...o,labels:a}))})),{annotationSets:s,labels:l,annotations:i}},documentHasCorrectAnnotations:e=>!(e.annotations&&!(e.annotations&&e.annotations.filter((e=>e.is_correct)).length>0)),numberOfAcceptedAnnotationsInLabel:e=>e=>{const t=e.annotations.filter((e=>e.is_correct));return t.length},numberOfAnnotationSetGroup:e=>t=>{let n=!1,o=0,i=0;if(e.annotationSets){let a=[...e.annotationSets];return a.sort(((e,t)=>e.id-t.id||e.label_set.name.localeCompare(t.label_set.name))),a.map((e=>{e.id!==t.id&&e.label_set.id===t.label_set.id&&e.label_set.name===t.label_set.name?(n=!0,i++):e.label_set.id===t.label_set.id&&(o=i)})),n?`${o+1}`:""}return""},numberOfDocumentInSet:e=>t=>{let n=!1,o=0,i=0;return e.documentSet&&e.documentSet.documents?(e.documentSet.documents.map((e=>{e.id!==t.id&&e.category===t.category?(n=!0,i++):e.id===t.id&&(o=i)})),n?`${o+1}`:""):""},numberOfLabelSetGroup:e=>t=>{let n=!1,o=0;if(e.annotationSets){let i=[...e.annotationSets];return i.sort(((e,t)=>e.id-t.id||e.label_set.name.localeCompare(t.label_set.name))),i.forEach((e=>{e.label_set.id===t.id&&e.label_set.name===t.name&&(n=!0,e.id&&o++)})),n?0===o?"":`${o+1}`:""}return""},labelSetsFilteredForAnnotationSetCreation:e=>{let t=[];return e.annotationSets&&e.annotationSets.forEach((e=>{if((null==e.id||e.label_set.has_multiple_annotation_sets)&&!t.find((t=>null!==t.id&&t.id===e.label_set.id))){const n={...e.label_set};n.labels=[...e.labels],t.push(n)}})),t},annotationsInLabelFiltered:e=>e=>{let t;if(!1===e.has_multiple_top_candidates&&e.annotations&&e.annotations.length>1){let n=e.annotations[0];for(let t=1;t<e.annotations.length;t++)(n.confidence<e.annotations[t].confidence||n.confidence===e.annotations[t].confidence&&e.annotations[t].revised)&&(n=e.annotations[t]);t={...e,annotations:[n]}}else t={...e};return t},isAnnotationInEditMode:e=>(t,n=null)=>{if(e.editAnnotation&&t)return null!=n?e.editAnnotation.id===t&&e.editAnnotation.index===n:e.editAnnotation.id===t},isSearchingAnnotationList:e=>!(e.annotationFilters.showFeedbackNeeded&&e.annotationFilters.showEmpty&&e.annotationFilters.showAccepted)||e.annotationSearch&&e.annotationSearch.length>0,emptyLabels:(e,t)=>t=>{const n=[];return t.labels.map((o=>{const i=e.missingAnnotations.find((e=>e.label===o.id&&t.id===e.annotation_set&&t.label_set.id===e.label_set));i||0!==o.annotations.length||n.push(o)})),n},annotationIsNotFound:e=>(t,n)=>{if(t){if(0===e.missingAnnotations.length)return!1;{const o=e.missingAnnotations.filter((e=>e.label===n.id&&e.annotation_set===t.id&&e.label_set===t.label_set.id));return 0!==o.length}}return!1},isAnnotationInAnnotationSet:e=>(e,t)=>{let n=!1;for(let o=0;o<e.labels.length;o++){const i=e.labels[o];for(let e=0;e<i.annotations.length;e++)if(n=i.annotations[e].id==t,n)break;if(n)break}return n},annotationById:e=>t=>e.annotations?e.annotations.find((e=>e.id==t)):null,isDocumentReadyToFinishReview:e=>{let t;const n=[];return 0!==e.labels.length&&(e.annotationSets&&e.annotationSets.length>0&&e.annotationSets.forEach((e=>{e.labels.map((t=>{0===t.annotations.length&&n.push({label:t.id,label_set:e.label_set.id})}))})),e.annotations&&(t=e.annotations.filter((e=>!e.is_correct)),t&&t.map((e=>{n.push(e)}))),!n||!e.missingAnnotations||e.missingAnnotations.length===n.length)},isDocumentReviewed:e=>e.selectedDocument.is_reviewed,notCorrectAnnotations:()=>e=>{const t=e.labels.filter((e=>e.annotations.length>0)),n=[];return t.map((e=>{const t=e.annotations.filter((e=>!e.is_correct&&!e.revised));if(t&&t.length>0&&t.map((e=>{n.push(e)})),kh.enableGroupingFeature&&e.annotations.length<2)return n.length-e.annotations.length})),n},isDocumentReadyToBeReviewed:()=>e=>2===e.status_data&&1===e.labeling_available,documentHadErrorDuringExtraction:()=>e=>111===e.status_data,documentCannotBeEdited:e=>(t=e.selectedDocument)=>1===t.dataset_status||2===t.dataset_status||3===t.dataset_status||t.is_reviewed,waitingForSplittingConfirmation:()=>e=>e&&41===e.status_data,documentHasProposedSplit:()=>e=>e.proposed_split&&e.proposed_split.length>0,confidence:()=>e=>e?e.confidence:null,notExtracted:()=>e=>!e||!e.span,created:()=>e=>e?e.created_by&&!e.revised&&e.is_correct:null,edited:()=>e=>e?e.offset_string!==e.offset_string_original||!!e.created_by:null,accepted:()=>e=>e?e.revised&&e.is_correct:null,isNegative:()=>e=>e?!e.is_correct&&e.revised:null,getUser:()=>e=>e?e.created_by&&!e.revised?e.created_by:e.revised&&e.revised_by?e.revised_by:null:null,isOnlyMultipleAnnotationSet:e=>t=>{const n=e.annotationSets.filter((e=>e.label_set.id===t.label_set.id));return 1===n.length},annotationSetCanBeMultiple:e=>e=>e.label_set.has_multiple_annotation_sets,annotationSetHasNoFilledLabels:e=>e=>{const t=e.labels.flatMap((e=>e.annotations));return 0===t.length}},wh={startLoading:({commit:e})=>{e("SET_LOADING",!0),e("display/ENABLE_SEARCH",!1,{root:!0})},endLoading:({commit:e})=>{e("SET_LOADING",!1)},setDocId:({commit:e},t)=>{e("SET_PAGES",[]),e("SET_DOC_ID",t)},setAnnotationId:({commit:e,dispatch:t,getters:n},o)=>{if(o){const e=n.annotationById(o),i=n.labelOfAnnotation(e);n.isLabelMultiFalseAndGroupOfAnns(i)&&t("setAnnotationAsFirstInLabel",{label:i,annotation:e})}e("SET_ANNOTATION_ID",o),is(o)},setAnnotationSetId:({commit:e},t)=>{e("SET_ANNOTATION_SET_ID",t)},setAnnotationSets:({commit:e},t)=>{e("SET_ANNOTATION_SETS",t)},setEditAnnotation:({commit:e},{id:t,index:n,label:o,labelSet:i,annotationSet:a,pageNumber:s})=>{const l={id:t,index:n,label:o,labelSet:i,annotationSet:a,pageNumber:s};e("SET_EDIT_ANNOTATION",l)},resetEditAnnotation:({commit:e})=>{e("RESET_EDIT_ANNOTATION")},setAnnotations:({commit:e},t)=>{e("SET_ANNOTATIONS",t)},setLabels:({commit:e},t)=>{e("SET_LABELS",t)},setPages:({commit:e},t)=>{e("SET_PAGES",t)},setSelectedDocument:({commit:e},t)=>{e("SET_SELECTED_DOCUMENT",t)},setPublicView:({commit:e},t)=>{e("SET_PUBLIC_VIEW",t)},startRecalculatingAnnotations:({commit:e})=>{e("SET_RECALCULATING_ANNOTATIONS",!0)},endRecalculatingAnnotations:({commit:e})=>{e("SET_RECALCULATING_ANNOTATIONS",!1)},setMissingAnnotations:({commit:e},t)=>{e("SET_MISSING_ANNOTATIONS",t)},setErrorMessage:({commit:e,dispatch:t},n)=>{e("SET_SHOW_ACTION_ERROR",!!n),e("SET_ERROR_MESSAGE",n),t("closeErrorMessage")},setDocumentError:({commit:e},t)=>{e("SET_DOCUMENT_ERROR",t)},setAnnotationsMarkedAsMissing:({commit:e},t)=>{e("SET_ANNOTATIONS_MARKED_AS_MISSING",t)},setErrorMessageWidth:({commit:e},t)=>{e("SET_ERROR_MESSAGE_WIDTH",t)},setHoveredAnnotationSet:({commit:e},t)=>{e("SET_HOVERED_ANNOTATION_SET",t)},setNewAcceptedAnnotations:({commit:e},t)=>{e("SET_NEW_ACCEPTED_ANNOTATIONS",t)},setSplittingSuggestions:({commit:e},t)=>{e("SET_SPLITTING_SUGGESTIONS",t)},setAnnotationSearch:({commit:e},t)=>{e("SET_ANNOTATION_SEARCH",t)},fetchDocument:async({commit:e,state:t,dispatch:n,rootState:o,getters:i})=>{const a=1;n("startLoading"),n("display/updateCurrentPage",a,{root:!0}),await fh.get(`documents/${t.documentId}/`).then((o=>{if(o.data){const s=o.data,{labels:l,annotations:r,annotationSets:c}=i.processAnnotationSets(s.annotation_sets);e("SET_PAGES",[]),s.pages.length>0&&n("fetchDocumentPage",a),e("SET_ANNOTATION_SETS",c),e("SET_ANNOTATIONS",r),e("SET_LABELS",l),e("SET_SELECTED_DOCUMENT",s),s.project&&(n("project/setProjectId",s.project,{root:!0}),n("project/setShowAnnotationTranslations",s.enable_translated_strings,{root:!0})),t.publicView||(n("fetchMissingAnnotations"),n("project/fetchCurrentUser",null,{root:!0}),s.project&&n("category/fetchCategories",s.project,{root:!0}),s.document_set&&n("fetchDocumentSet",s.document_set)),i.documentHasProposedSplit(s)&&n("setSplittingSuggestions",s.proposed_split),1!==s.labeling_available&&(e("SET_RECALCULATING_ANNOTATIONS",!0),n("pollDocumentEndpoint"))}})).catch((e=>{console.log(e,"Could not fetch document details from the backend"),n("display/setPageError",e.response.data.detail,{root:!0})})),t.publicView||!t.selectedDocument||t.selectedDocument.category&&(t.selectedDocument.category_is_revised||i.documentHasCorrectAnnotations||0!==t.missingAnnotations.length)||(n("edit/enableEditMode",null,{root:!0}),n("edit/setRenameAndCategorize",!0,{root:!0})),n("endLoading")},fetchDocumentPage:({commit:e,state:t},n)=>fh.get(`documents/${t.documentId}/pages/${n}/`).then((t=>{e("ADD_PAGE",t.data)})).catch((e=>{console.log(e)})),setDocumentSet:({commit:e},t)=>{e("SET_DOC_SET",t)},fetchDocumentSet:({commit:e,state:t},n)=>fh.get(`document-sets/${n}/?expand=documents&fields=documents.id,documents.data_file_name,documents.category`).then((t=>{e("SET_DOC_SET",t.data)})).catch((e=>{console.log(e)})),setDocumentAnnotationSelected:({commit:e},{annotation:t,label:n,span:o,scrollTo:i=!1})=>{const a={scrollTo:i,id:t.id,span:o,page:o.page_index+1,labelName:n?n.name:""};e("SET_DOCUMENT_ANNOTATION_SELECTED",a)},scrollToDocumentAnnotationSelected:({commit:e})=>{e("SET_DOCUMENT_ANNOTATION_SCROLL",!0)},disableDocumentAnnotationSelected:({commit:e})=>{e("SET_DOCUMENT_ANNOTATION_SELECTED",null)},createAnnotation:({commit:e,getters:t,dispatch:n},{annotation:o})=>new Promise(((i,a)=>{fh.post("/annotations/",o).then((async o=>{if(201===o.status){if(await n("fetchMissingAnnotations"),t.annotationSetExists(o.data.annotation_set))e("ADD_ANNOTATION",o.data);else{const o=await n("fetchDocumentData");if(o&&o.annotation_sets){const{labels:n,annotations:i,annotationSets:a}=t.processAnnotationSets(o.annotation_sets);e("SET_ANNOTATION_SETS",a),e("SET_ANNOTATIONS",i),e("SET_LABELS",n)}}o.data&&o.data.id&&n("setAnnotationId",o.data.id),i(o)}})).catch((e=>{a(e.response),console.log(e)}))})),updateAnnotation:({commit:e,getters:t,dispatch:n},{updatedValues:o,annotationId:i})=>(e("SET_NEW_ACCEPTED_ANNOTATIONS",[i]),new Promise(((t,a)=>{fh.patch(`/annotations/${i}/`,o).then((async o=>{200===o.status&&(e("UPDATE_ANNOTATION",o.data),e("SET_NEW_ACCEPTED_ANNOTATIONS",null),o.data&&o.data.id&&n("setAnnotationId",o.data.id),t(!0))})).catch((e=>{a(e.response),console.log(e)}))}))),deleteAnnotation:({commit:e,getters:t,state:n},{annotationId:o,annotationSet:i})=>new Promise(((a,s)=>{fh.delete(`/annotations/${o}/`).then((async s=>{204===s.status&&(n.annotationId===o&&(e("SET_ANNOTATION_ID",null),is(null)),e("DELETE_ANNOTATION",o),i&&t.annotationSetCanBeMultiple(i)&&t.annotationSetHasNoFilledLabels(i)&&(t.isOnlyMultipleAnnotationSet(i)?e("UPDATE_ANNOTATION_SET",i):e("DELETE_ANNOTATION_SET",i)),a(!0))})).catch((e=>{s(e.response),console.log(e)}))})),updateDocument:({commit:e,state:t,getters:n,dispatch:o},i)=>new Promise(((n,a)=>{fh.patch(`/documents/${t.documentId}/`,i).then((t=>{200===t.status&&(i.data_file_name?e("UPDATE_FILE_NAME",t.data.data_file_name):(e("SET_SELECTED_DOCUMENT",t.data),o("pollDocumentEndpoint")),n(!0))})).catch((e=>{if(console.log(e),e.response&&e.response.request&&e.response.request.response){const t=JSON.parse(e.request.response).is_reviewed;if(t&&t.length>0){const e={data:[...t]};return void a(e)}}a(e.response)}))})),fetchMissingAnnotations:({commit:e,state:t,getters:n})=>new Promise(((n,o)=>Ae.makeGetPaginatedRequest(`/missing-annotations/?document=${t.documentId}`,!0).then((t=>{e("SET_MISSING_ANNOTATIONS",t),n(!0)})).catch((e=>{o(e.response),console.log(e)})))),addMissingAnnotations:({commit:e,getters:t},n)=>new Promise(((t,o)=>{fh.post("/missing-annotations/",n).then((async n=>{201===n.status&&(e("SET_ANNOTATIONS_MARKED_AS_MISSING",null),e("ADD_MISSING_ANNOTATIONS",n.data)),t(n)})).catch((e=>{o(e.response),console.log(e)}))})),deleteMissingAnnotation:({commit:e,getters:t},n)=>new Promise(((t,o)=>fh.delete(`/missing-annotations/${n}/`).then((o=>{204===o.status&&(e("DELETE_MISSING_ANNOTATION",n),t(!0))})).catch((e=>{o(e.response),console.log(e)})))),updateMultipleAnnotations:({state:e,commit:t},n)=>(t("SET_NEW_ACCEPTED_ANNOTATIONS",n.ids),new Promise(((o,i)=>fh.patch(`documents/${e.documentId}/update-annotations/`,n).then((e=>{200===e.status&&(e.data.map((e=>{t("UPDATE_ANNOTATION",e)})),t("SET_NEW_ACCEPTED_ANNOTATIONS",null),o(!0))})).catch((e=>{console.log(e),i(e.response)}))))),fetchDocumentStatus:({state:e,getters:t})=>new Promise(((n,o)=>fh.get(`documents/${e.documentId}/?fields=status_data,labeling_available`).then((e=>t.isDocumentReadyToBeReviewed(e.data)||t.waitingForSplittingConfirmation(e.data)?n(!0):t.documentHadErrorDuringExtraction(e.data)?o():n(!1))).catch((e=>{o(e.response),console.log(e)})))),fetchDocumentData:({state:e})=>new Promise(((t,n)=>{fh.get(`documents/${e.documentId}/`).then((e=>t(e.data))).catch((e=>{n(e),console.log(e)}))})),pollDocumentEndpoint:({dispatch:e})=>e("fetchDocumentStatus").then((t=>{t?(e("endRecalculatingAnnotations"),e("fetchDocument")):(Qa(vh),e("pollDocumentEndpoint"))})).catch((t=>{e("setDocumentError",!0),console.log(t)})),createErrorMessage:({commit:e,dispatch:t},{error:n,serverErrorMessage:o,defaultErrorMessage:i})=>{n&&n.status>=500&&n.status<600?(t("setErrorMessage",o),e("SET_SERVER_ERROR",!0)):n.data&&n.data.length>0?t("setErrorMessage",n.data[0]):t("setErrorMessage",i)},closeErrorMessage:({commit:e})=>{setTimeout((()=>{e("SET_ERROR_MESSAGE",null),e("SET_SHOW_ACTION_ERROR",!1),e("SET_SERVER_ERROR",!1)}),5e3)},contactSupport:({rootState:e},t)=>{const n="https://konfuzio.com/support/",o=`project=${e.project.projectId}&email=${e.project.currentUser.username}&issue=${t}`,i=`${n}?${o}`;window.open(i,"_blank")},changeCurrentDocument:({commit:e,state:t,dispatch:n,rootState:o},i)=>{t.splittingSuggestions&&e("SET_SPLITTING_SUGGESTIONS",null),o.edit.editMode&&n("edit/disableEditMode",null,{root:!0}),e("SET_RECALCULATING_ANNOTATIONS",!1),es("document")||ts("d")?as(t.selectedDocument.id,i):(e("SET_DOC_ID",i),n("fetchDocument"))},showMissingAnnotations({commit:e},t){e("SET_SHOW_MISSING_ANNOTATIONS",t)},showFeedbackNeededAnnotations({commit:e},t){e("SET_SHOW_FEEDBACK_NEEDED_ANNOTATIONS",t)},showAcceptedAnnotations({commit:e},t){e("SET_SHOW_ACCEPTED_ANNOTATIONS",t)},unloadDocumentPage:({commit:e},t)=>{e("REMOVE_PAGE",t)},putNextAnnotationInLabelFirst({commit:e},t){e("PUT_NEXT_ANN_IN_LABEL_FIRST",t)},setAnnotationAsFirstInLabel({commit:e,state:t},{label:n,annotation:o}){t.annotationSets.forEach((t=>{t.labels.forEach((i=>{if(i.id===n.id&&i.annotations&&i.annotations.length>1)for(let n=0;n<i.annotations.length;n++)i.annotations[n].id===o.id&&(i.annotations.unshift(i.annotations.splice(n,1)[0]),e("SET_ANNOTATIONS_IN_LABEL",{annotationSet:t,label:i,annotations:i.annotations}))}))}))},putNextAnnotationInLabelFirst({commit:e,state:t,dispatch:n},o){n("setAnnotationId",null);let i=null;t.annotationSets.forEach((t=>{t.labels.forEach((n=>{if(n.id===o.id&&n.annotations&&n.annotations.length>1){const o=[...n.annotations],a=o.shift();return o.push(a),e("SET_ANNOTATIONS_IN_LABEL",{annotationSet:t,label:n,annotations:o}),void(i=o[0])}}))})),i&&(n("setDocumentAnnotationSelected",{annotation:i,label:o,span:i.span[0],scrollTo:!0}),n("scrollToDocumentAnnotationSelected"))}},yh={SET_LOADING:(e,t)=>{e.loading=t},SET_DOC_ID:(e,t)=>{t!==e.documentId&&(e.documentId=t)},SET_DOC_SET:(e,t)=>{let n=[];t&&t.documents&&(n=t.documents.slice().reverse());const o={...t,documents:n};e.documentSet=o},SET_ANNOTATION_ID:(e,t)=>{e.annotationId=t},SET_ANNOTATION_SET_ID:(e,t)=>{e.annotationSetId=t},ADD_ANNOTATION:(e,t)=>{e.annotations.push(t),e.annotationSets.map((e=>{t.annotation_set===e.id&&t.label_set&&e.label_set.id===t.label_set.id&&e.labels.map((e=>{if(t.label&&t.label.id===e.id){const n=e.annotations.find((e=>e.id===t.id));if(!n)return void e.annotations.push(t)}}))}))},UPDATE_ANNOTATION:(e,t)=>{const n=e.annotations.findIndex((e=>e.id===t.id));n>-1&&e.annotations.splice(n,1,t);let o=!1;e.annotationSets.forEach((e=>{o||e.labels.forEach((n=>{const i=n.annotations.findIndex((e=>e.id===t.id));if(i>-1){if(t.label&&t.label.id!==n.id){n.annotations.splice(i,1);const o=e.labels.find((e=>e.id===t.label.id));o.annotations.push(t)}else n.annotations.splice(i,1,t);o=!0}else;}))}))},DELETE_ANNOTATION:(e,t)=>{const n=e.annotations.findIndex((e=>e.id===t));n>-1&&e.annotations.splice(n,1);let o=!1;e.annotationSets.forEach((e=>{o||e.labels.forEach((e=>{const n=e.annotations.findIndex((e=>e.id===t));if(n>-1)return e.annotations.splice(n,1),void(o=!0)}))}))},SET_ANNOTATIONS:(e,t)=>{e.annotations=t},SET_ANNOTATION_SETS:(e,t)=>{e.annotationSets=t},DELETE_ANNOTATION_SET:(e,t)=>{const n=e.annotationSets.findIndex((e=>e.id===t.id));-1!==n&&e.annotationSets.splice(n,1)},UPDATE_ANNOTATION_SET:(e,t)=>{const n=e.annotationSets.findIndex((e=>e.id===t.id));if(-1===n)return;const o={...t,id:null};e.annotationSets.splice(n,1,o)},SET_LABELS:(e,t)=>{e.labels=t},SET_ANNOTATIONS_IN_LABEL:(e,{label:t,annotations:n,annotationSet:o})=>{o.labels.forEach((e=>{if(e.id===t.id)return delete e.annotations,void(e.annotations=n)}))},SET_EDIT_ANNOTATION:(e,t)=>{e.editAnnotation=t},RESET_EDIT_ANNOTATION:e=>{e.editAnnotation=null},ADD_PAGE:(e,t)=>{const n=e.pages.findIndex((e=>e.number===t.number));-1===n?e.pages.push(t):e.pages[n]=t},SET_PAGES:(e,t)=>{e.pages=t},SET_DOCUMENT_ANNOTATION_SELECTED:(e,t)=>{e.documentAnnotationSelected=t},SET_DOCUMENT_ANNOTATION_SCROLL:(e,t)=>{e.documentAnnotationSelected&&(e.documentAnnotationSelected.scrollTo=t)},SET_SELECTED_DOCUMENT:(e,t)=>{e.selectedDocument=t,e.selectedDocument&&(e.selectedDocument.downloaded_at=Date.now())},SET_RECALCULATING_ANNOTATIONS:(e,t)=>{e.recalculatingAnnotations=t},SET_MISSING_ANNOTATIONS:(e,t)=>{e.missingAnnotations=t},ADD_MISSING_ANNOTATIONS:(e,t)=>{t&&t.length>0?t.map((t=>{const n=e.missingAnnotations.find((e=>e.id===t.id));if(n){const n=e.missingAnnotations.findIndex((e=>e.id===t.id));n>-1&&e.missingAnnotations.splice(n,1,t)}else e.missingAnnotations.push(t)})):e.missingAnnotations.push(t)},DELETE_MISSING_ANNOTATION:(e,t)=>{const n=e.missingAnnotations.findIndex((e=>e.id===t));n>-1&&e.missingAnnotations.splice(n,1)},SET_SHOW_ACTION_ERROR:(e,t)=>{e.showActionError=t},SET_ERROR_MESSAGE:(e,t)=>{e.errorMessage=t},SET_DOCUMENT_ERROR:(e,t)=>{e.showDocumentError=t},SET_ANNOTATIONS_MARKED_AS_MISSING:(e,t)=>{e.annotationsMarkedAsMissing=t},SET_ERROR_MESSAGE_WIDTH:(e,t)=>{e.errorMessageWidth=t},SET_PUBLIC_VIEW:(e,t)=>{e.publicView=t},SET_DOCUMENT_IS_READY:(e,t)=>{e.documentIsReady=t},SET_DOCUMENT_HAS_ERROR:(e,t)=>{e.documentHasError=t},SET_HOVERED_ANNOTATION_SET:(e,t)=>{e.hoveredAnnotationSet=t},SET_NEW_ACCEPTED_ANNOTATIONS:(e,t)=>{e.newAcceptedAnnotations=t},SET_SERVER_ERROR:(e,t)=>{e.serverError=t},UPDATE_FILE_NAME:(e,t)=>{e.selectedDocument.data_file_name=t},SET_SPLITTING_SUGGESTIONS:(e,t)=>{e.splittingSuggestions=t},SET_ANNOTATION_SEARCH:(e,t)=>{e.annotationSearch=t,os("search",t)},SET_SHOW_MISSING_ANNOTATIONS:(e,t)=>{e.annotationFilters.showEmpty=t},SET_SHOW_ACCEPTED_ANNOTATIONS:(e,t)=>{e.annotationFilters.showAccepted=t},SET_SHOW_FEEDBACK_NEEDED_ANNOTATIONS:(e,t)=>{e.annotationFilters.showFeedbackNeeded=t},REMOVE_PAGE:(e,t)=>{e.pages=e.pages.filter((e=>e.number!==t))}},Th={namespaced:!0,state:kh,getters:Nh,actions:wh,mutations:yh},Bh=(Ae.HTTP,{documentsAvailableToReview:[],categories:null}),Dh={categoryName:e=>t=>{if(t&&e.categories){const n=e.categories.find((e=>e.id==t));if(n)return n.name}return""},categoryConfidence:()=>e=>e?(100*e).toFixed(2):0===e?e.toFixed(2):void 0,category:e=>t=>{if(t&&e.categories){const n=e.categories.find((e=>e.id==t));if(n)return n}return null},projectHasSingleCategory:e=>e.categories&&1===e.categories.length},Lh={setDocumentsAvailableToReview:({commit:e},t)=>{e("SET_AVAILABLE_DOCUMENTS",t)},setCategories:({commit:e},t)=>{e("SET_CATEGORIES",t)},createAvailableDocumentsList:({commit:e,state:t,dispatch:n,rootState:o,rootGetters:i},{categoryId:a,user:s,poll:l})=>{if(!t.createAvailableListOfDocuments)return;const r=`category=${a}`,c=e=>new Promise((t=>setTimeout(t,e)));let d=0;const h=o=>{let a=0;return d+=1,n("project/fetchDocumentListWithParameters",r).then((s=>{for(let o=0;o<s.length;o++){const l=t.documentsAvailableToReview.find((e=>e.id===s[o].id));if(!l)if(i["document/isDocumentReadyToBeReviewed"](s))e("ADD_AVAILABLE_DOCUMENT",s);else if(i["document/documentHadErrorDuringExtraction"](s)){n("document/setDocumentError",null,{root:!0}),a+=1;continue}}return!l||s.length===t.documentsAvailableToReview.length||t.documentsAvailableToReview.length+a===s.length||(d>=10||c(o).then((()=>{h(o)})))}))};if(0===documents.length||documents.length!==t.documentsAvailableToReview.length){let e;e=d<=5?5e3:d>10?2e4:1e4,h(e)}},fetchCategories:({commit:e},t)=>Ae.makeGetPaginatedRequest(`categories/?project=${t}`,!0).then((async t=>{t&&e("SET_CATEGORIES",t)})).catch((e=>{console.log(e,"Could not fetch categories from the backend")}))},Vh={SET_AVAILABLE_DOCUMENTS:(e,t)=>{e.documentsAvailableToReview=t},ADD_AVAILABLE_DOCUMENT:(e,t)=>{const n=e.documentsAvailableToReview.find((e=>e.id===t.id));n||e.documentsAvailableToReview.push(t)},SET_CATEGORIES:(e,t)=>{e.categories=t}},xh={namespaced:!0,state:Bh,actions:Lh,mutations:Vh,getters:Dh},Mh=Ae.HTTP,Ih={projectId:null,labelSets:null,currentUser:null,documentsListPath:null,showAnnotationTranslations:!1},Oh={setProjectId:({commit:e},t)=>{e("SET_PROJECT_ID",t)},fetchLabelSetDetails:({commit:e,state:t},n)=>new Promise(((e,t)=>{Mh.get(`label-sets/${n}/`).then((t=>e(t.data))).catch((e=>{t(e),console.log(e)}))})),fetchLabelSets:({commit:e,state:t})=>Ae.makeGetPaginatedRequest(`label-sets/?project=${t.projectId}`,!0).then((t=>{e("SET_LABEL_SETS",t)})).catch((e=>{console.log(e)})),fetchCurrentUser:({commit:e})=>Mh.get("/auth/me/").then((t=>{e("SET_CURRENT_USER",t.data)})).catch((e=>{console.log(e)})),setCurrentUser:({commit:e},t)=>{e("SET_CURRENT_USER",t)},setDocumentsListPath:({commit:e},t)=>{e("SET_DOCUMENTS_LIST_PATH",t)},setShowAnnotationTranslations:({commit:e},t)=>{e("SET_SHOW_ANNOTATION_TRANSLATIONS",t)},fetchDocumentListWithParameters:({commit:e,state:t},n)=>new Promise(((e,o)=>{Ae.makeGetPaginatedRequest(`documents/?project=${t.projectId}&${n}`,!0).then((t=>{e(t)})).catch((e=>{o(),console.log(e,"Could not fetch document list from the backend")}))})),fetchDocumentListForNavigation:({commit:e,state:t})=>new Promise(((e,n)=>{Ae.makeGetPaginatedRequest(`documents/?project=${t.projectId}&is_reviewed=false&fields=id`,!0).then((t=>{e(t)})).catch((e=>{n(),console.log(e,"Could not fetch document list from the backend")}))}))},Ph={SET_PROJECT_ID:(e,t)=>{e.projectId=t},SET_CURRENT_USER:(e,t)=>{e.currentUser=t},SET_LABEL_SETS:(e,t)=>{e.labelSets=t},SET_DOCUMENTS_LIST_PATH:(e,t)=>{e.documentsListPath=t},SET_SHOW_ANNOTATION_TRANSLATIONS:(e,t)=>{e.showAnnotationTranslations=t}},$h={namespaced:!0,state:Ih,actions:Oh,mutations:Ph},Rh=Ae.HTTP,Fh=1,Hh={selection:{pageNumber:null,start:null,end:null},isSelecting:!1,spanSelection:[],placeholderSelection:[],selectedEntities:[],spanLoading:!1},zh={isSelectionValid:e=>e.selection&&null!=e.selection.end,getSelectionForPage:e=>t=>e.selection.pageNumber===t?e.selection:null,entitiesOnSelection:e=>(e,t)=>t.entities.filter((t=>e.x0<=t.x0&&e.x1>=t.x1&&e.y0<=t.y0&&e.y1>=t.y1)),spanSelectionsForPage:e=>t=>e.spanSelection.filter((e=>t.number===e.page_index+1)),placeholderSelectionForPage:e=>t=>e.placeholderSelection.filter((e=>t.number===e.page_index+1))},Uh={disableSelection:({commit:e})=>{e("RESET_SELECTION"),e("SET_SELECTED_ENTITIES",[]),e("SET_SPAN_SELECTION",[]),e("SET_PLACEHOLDER_SELECTION",[])},startSelection:({commit:e},{pageNumber:t,start:n})=>{e("START_SELECTION",{pageNumber:t,start:n})},moveSelection:({commit:e,state:t,dispatch:n},o)=>{if(t.selection&&t.selection.start){const n=Math.abs(t.selection.start.x-o.end.x),i=Math.abs(t.selection.start.y-o.end.y);n>5&&i>5&&e("MOVE_SELECTION",o)}},endSelection:({commit:e,state:t},n)=>{let o,i;n&&(o=Math.abs(t.selection.start.x-n.x),i=Math.abs(t.selection.start.y-n.y)),!n||i<=5&&o<=5||t.selection.start.x===n.x&&t.selection.start.y==n.y?e("RESET_SELECTION"):(t.selection.start.x=t.selection.start.x-Fh,t.selection.start.y=t.selection.start.y-Fh,n.x=n.x+Fh,n.y=n.y+Fh,e("END_SELECTION",n))},setSelectedEntities:({commit:e},t)=>{e("SET_SELECTED_ENTITIES",t)},getTextFromBboxes:({commit:e,rootState:t},n)=>(e("SET_SPAN_LOADING",!0),new Promise(((o,i)=>{Rh.post(`documents/${t.document.documentId}/bbox/`,{span:n}).then((e=>{e.data.span.length&&e.data.span.length>0?o(e.data.span):o(n)})).catch((e=>{alert("Could not fetch the selected text from the backend"),i(e)})).finally((()=>{e("SET_SPAN_LOADING",!1)}))}))),entitySelection:({commit:e,dispatch:t,state:n},{entities:o,selection:i})=>{if(0===o.length)i?t("getTextFromBboxes",[i]).then((t=>{e("SET_SPAN_SELECTION",t)})):(e("RESET_SELECTION"),e("SET_SPAN_SELECTION",[])),e("SET_SELECTED_ENTITIES",[]);else{let n;e("SET_SELECTED_ENTITIES",o),t("document/setAnnotationId",null,{root:!0}),n=o?o.flatMap((e=>e.original)):[o],e("SET_SPAN_SELECTION",n),t("getTextFromBboxes",n).then((t=>{e("SET_SPAN_SELECTION",t)}))}},entityClick:({commit:e,dispatch:t,state:n},o)=>{const i=n.selectedEntities.find((e=>o.scaled.width===e.scaled.width&&o.original.offset_string===e.original.offset_string));let a=n.selectedEntities;if(i?a=[...n.selectedEntities.filter((e=>e.scaled.width!==o.scaled.width&&e.original.offset_string!==o.original.offset_string))]:a.push(o),0===a.length)e("SET_SELECTED_ENTITIES",[]),e("SET_SPAN_SELECTION",[]);else{let n;e("SET_SELECTED_ENTITIES",a),t("document/setAnnotationId",null,{root:!0}),n=a?a.flatMap((e=>e.original)):[a],e("SET_SPAN_SELECTION",n)}},setSpanSelection:({commit:e},t)=>{e("SET_SPAN_SELECTION",t)},setPlaceholderSelection:({commit:e},t)=>{e("SET_PLACEHOLDER_SELECTION",t)}},Zh={START_SELECTION:(e,{pageNumber:t,start:n})=>{e.selection.end=null,e.selection.pageNumber=t,e.selection.start=n,e.isSelecting=!0},MOVE_SELECTION:(e,t)=>{const{start:n,end:o}=t;n&&(e.selection.start=n),o&&(e.selection.end=o)},END_SELECTION:(e,t)=>{e.selection.end=t,e.isSelecting=!1},RESET_SELECTION:e=>{e.selection.pageNumber=null,e.selection.start=null,e.selection.end=null},SET_SPAN_SELECTION:(e,t)=>{e.spanSelection=t||[]},ADD_SPAN_SELECTION:(e,t)=>{e.spanSelection.push(t)},SET_PLACEHOLDER_SELECTION:(e,t)=>{e.placeholderSelection=t||[]},ADD_PLACEHOLDER_SELECTION:(e,t)=>{e.placeholderSelection.push(t)},SET_SELECTED_ENTITIES:(e,t)=>{e.selectedEntities=t||[]},SET_SPAN_LOADING:(e,t)=>{e.spanLoading=t}},Gh={namespaced:!0,state:Hh,getters:zh,actions:Uh,mutations:Zh},Wh=Ae.HTTP,qh={editMode:!1,renameAndCategorize:!1,isMultipleSelection:!0,pagesForPostprocess:[],selectedPages:[],updatedDocument:[],showEditConfirmationModal:!1,submitEditChanges:!1,redirectingUser:!1},jh={isEditModeAvailable:(e,t,n,o)=>!n.document.publicView&&!o["document/isDocumentReviewed"]&&!e.editMode,isPageSelected:e=>t=>e.selectedPages.find((e=>e.id===t)),documentShouldBePostprocessed:(e,t,n)=>{const o=e.pagesForPostprocess.find((e=>0!==e.angle));let i=!1;return e.pagesForPostprocess.map(((e,t)=>{(e.id===n.document.selectedDocument.pages[t].id&&e.number!==n.document.selectedDocument.pages[t].number||e.id!==n.document.selectedDocument.pages[t].id&&e.number===n.document.selectedDocument.pages[t].number)&&(i=!0)})),e.updatedDocument.length>1||o||i}},Kh={enableEditMode:({commit:e})=>{e("SET_EDIT_MODE",!0)},disableEditMode:({commit:e})=>{e("SET_EDIT_MODE",!1),e("SET_RENAME_AND_CATEGORIZE",!1)},setRenameAndCategorize:({commit:e},t)=>{e("SET_RENAME_AND_CATEGORIZE",t)},setPagesForPostprocess:({commit:e},t)=>{e("SET_PAGES_FOR_POSTPROCESS",t)},setUpdatedDocument:({commit:e},t)=>{e("SET_UPDATED_DOCUMENT",t)},setSubmitEditChanges:({commit:e},t)=>{e("SET_SUBMIT_EDIT_CHANGES",t)},selectPage:({state:e,commit:t},n)=>{e.isMultipleSelection||t("SET_SELECTED_PAGES",[]),t("ADD_SELECTED_PAGE",n)},unselectPage:({state:e,commit:t},n)=>{const o=e.selectedPages.find((e=>e.id===n.id));if(o){const o=e.selectedPages.filter((e=>e.id!==n.id));t("SET_SELECTED_PAGES",o)}},setSelectedPages:({state:e,commit:t},n)=>{if(!n)return void t("SET_SELECTED_PAGES",[]);const o=e.selectedPages.find((e=>e.id===n.id));if(o){const o=e.selectedPages.filter((e=>e.id!==n.id));t("SET_SELECTED_PAGES",o)}else e.isMultipleSelection||t("SET_SELECTED_PAGES",[]),t("ADD_SELECTED_PAGE",n)},rotatePage:({state:e,commit:t},{page:n,direction:o})=>{if(e.pagesForPostprocess.find((e=>e.id===n.id))){const i=e.pagesForPostprocess.map((e=>{let t;return"left"===o?(t=e.angle-90,e.id===n.id?(-270===t&&(t=90),{...e,angle:t}):e):"right"===o?(t=e.angle+90,e.id===n.id?(270===t&&(t=-90),{...e,angle:t}):e):void 0}));t("SET_PAGES_FOR_POSTPROCESS",i)}else"left"===o&&e.pagesForPostprocess.push({id:n.id,number:n.number,angle:-90,thumbnail_url:n.thumbnail_url,updated_at:n.updated_at}),"right"===o&&e.pagesForPostprocess.push({id:n.id,number:n.number,angle:90,thumbnail_url:n.thumbnail_url,updated_at:n.updated_at})},updateRotationToTheLeft:({state:e,commit:t})=>{const n=e.pagesForPostprocess.map((e=>{let t=e.angle-90;return-270===t&&(t=90),{...e,angle:t}}));t("SET_PAGES_FOR_POSTPROCESS",n)},updateRotationToTheRight:({state:e,commit:t})=>{const n=e.pagesForPostprocess.map((e=>{let t=e.angle+90;return 270===t&&(t=-90),{...e,angle:t}}));t("SET_PAGES_FOR_POSTPROCESS",n)},editDocument:({rootState:e,commit:t,dispatch:n},o)=>{n("document/startRecalculatingAnnotations",null,{root:!0});const i=e.document.documentId;return new Promise(((a,s)=>{Wh.post(`/documents/${e.document.documentId}/postprocess/`,o).then((async e=>{if(e&&200===e.status){const o=e.data[0].id;n("document/setSplittingSuggestions",null,{root:!0}),t("SET_SUBMIT_EDIT_CHANGES",!1),o!=i?es("document")||ts("docs")?as(i,o):(await n("document/setDocId",o,{root:!0}),n("document/pollDocumentEndpoint",null,{root:!0})):(n("document/setSelectedDocument",e.data[0],{root:!0}),n("document/pollDocumentEndpoint",null,{root:!0}))}a(e)})).catch((e=>{s(e.response),console.log(e)}))}))},setShowEditConfirmationModal:({commit:e},t)=>{e("SET_SHOW_EDIT_CONFIRMATION_MODAL",t)},setRedirectingUser:({commit:e},t)=>{e("SET_REDIRECTING_USER",t)}},Yh={SET_EDIT_MODE:(e,t)=>{e.editMode=t},SET_RENAME_AND_CATEGORIZE:(e,t)=>{e.renameAndCategorize=t},SET_PAGES_FOR_POSTPROCESS:(e,t)=>{e.pagesForPostprocess=t},SET_UPDATED_DOCUMENT:(e,t)=>{e.updatedDocument=t},SET_SELECTED_PAGES:(e,t)=>{e.selectedPages=t},ADD_SELECTED_PAGE:(e,t)=>{e.selectedPages.push(t)},SET_SHOW_EDIT_CONFIRMATION_MODAL:(e,t)=>{e.showEditConfirmationModal=t},SET_SUBMIT_EDIT_CHANGES:(e,t)=>{e.submitEditChanges=t},SET_REDIRECTING_USER:(e,t)=>{e.redirectingUser=t}},Jh={namespaced:!0,state:qh,actions:Kh,mutations:Yh,getters:jh},Xh=(0,s.y$)({modules:{display:Sh,document:Th,category:xh,project:$h,selection:Gh,edit:Jh}});var Qh=n(3168),eu=n(7107),tu=n(6188),nu=n(1273);eu.Yv.add(tu.INu,tu.vmR,tu.Uec,tu.GF6,tu.tdl,tu.z1G,tu.Jyw,tu.rVG,tu.Dfk,tu.QRE,tu.z1G,tu.QLR,tu.nx5,tu.mEO,tu.V3T,tu.mCl,tu.XGd,tu.VH5,tu.CeG,tu.dmS,tu.cbP,tu.MjD,tu.Q2C,tu.jkA,tu.lEd,tu.CQO,tu.Dnq);const ou=nu.gc,iu=(0,o.createApp)();iu.component("App",lh),iu.component("VueFontawesome",ou),iu.use(ch.A),iu.use(rh.Ay,{defaultIconPack:"fas",defaultIconComponent:"vue-fontawesome"}),iu.use(Qh.A),iu.use(Xh),iu.use(uh),iu.mount("#app")}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var a=t[o]={id:o,loaded:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.m=e,(()=>{n.amdO={}})(),(()=>{var e=[];n.O=(t,o,i,a)=>{if(!o){var s=1/0;for(d=0;d<e.length;d++){for(var[o,i,a]=e[d],l=!0,r=0;r<o.length;r++)(!1&a||s>=a)&&Object.keys(n.O).every((e=>n.O[e](o[r])))?o.splice(r--,1):(l=!1,a<s&&(s=a));if(l){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[o,i,a]}})(),(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()})(),(()=>{n.hmd=e=>(e=Object.create(e),e.children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e)})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{var e={524:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var i,a,[s,l,r]=o,c=0;if(s.some((t=>0!==e[t]))){for(i in l)n.o(l,i)&&(n.m[i]=l[i]);if(r)var d=r(n)}for(t&&t(o);c<s.length;c++)a=s[c],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(d)},o=self["webpackChunk_konfuzio_document_validation_ui"]=self["webpackChunk_konfuzio_document_validation_ui"]||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var o=n.O(void 0,[504],(()=>n(8578)));o=n.O(o)})();
|
|
1
|
+
(()=>{var e={1903:()=>{},4174:e=>{"use strict";e.exports=JSON.parse('{"no_label_sets_found":"No annotation sets found","no_label_sets_found_description":"There are no annotation sets in this document.","no_labels_found":"No labels found","no_labels_description":"There are no labels in this label set.","resolution_not_supported":"App not supported on this resolution","upload_documents":"Upload your own documents","request_trial":"Request trial access","warning_message":"AI can’t be trained if you change the text manually.","category":"Category","status":"Status","preparation":"Preparation","training":"Training","test":"Test","excluded":"Excluded","set_status":"Set a status","status_error":"We couldn’t change the status. Please try again later.","edit":"Edit","rename":"Rename","save":"Save","details":"Details","autosaving":"Auto saving...","saved":"Saved","hide":"Hide","not_saved":"Could not save. Try again","handover":"Handover","handover_document":"Handover document","type_email":"Type an email","invalid_email":"Please enter a valid email address.","members":"MEMBERS","select":"Select","document_successfully_handed":"Document successfully handed over to","handover_not_possible":"Handover was not possible. Please try again later.","small_viewport_title":"Small viewport size","small_viewport_info":"We’re sorry, but the app is not optimized to this viewport size. For a better experience, please open it on a bigger viewport.","ok":"Ok, got it","no_data_found":"Click to edit...","draw_box_document":"Find <i>{label_name}</i> in the document","confidence":"Confidence","not_found_in_document":"Not found in the document","approved_by":"Approved by","approved":"Approved","created_by":"Created by","edited_by":"Edited by","edited":"Edited","created":"Created manually","not_revised_yet":"Not revised yet","rotate_pages":"Rotate pages","rotate_all":"Rotate all","cancel":"Cancel","apply":"Apply","next":"Next: Rename and Categorize","back_to_annotations":"Back to annotation view","submit":"Submit","data_being_extracted":"New data is being extracted","analysing_document":"We are analysing your document.","few_minutes":"This might take a few minutes.","missing_annotation":"Mark as Missing","ann_exists":"An annotation for this label and label set already exists.","lite_mode":"Read Only","limited_functionalities":"You are using the Read Only version with limited functionalities.","accept":"Accept","split":"Split","reorder":"Reorder","rotate":"Rotate","edit_error":"The changes couldn’t be saved, please try again later.","select_pages":"You can now rotate pages, reorder and split documents.","edit_document":"Edit document (Early Access)","edit_early_access":"You are one of the users who have access to these functionalities before the release date.","selected":"selected","rotate_selected":"Rotate selected","edit_not_available":"Editing is not possible for documents with a status of \'Preparation\', \'Training\' or \'Test\', or documents that are \'Reviewed\'","rotate_split_reorder":"Rotate, split or reorder","rename_and_categorize":"Rename and Categorize","select_label":"Select Label","select_annotation_set":"Select Annotation Set","document_error_title":"Document error","document_error_info":"We’re sorry, the document ran into a problem and its data can’t be restored.","contact_support":"Contact support","finish_review":"Finish review","review_error":"Something went wrong finishing the review. Please try again later.","document_reviewed":"Editing is no longer possible since the document has already been reviewed.","reviewed_mode":"Reviewed","error_creating_annotation":"The annotation could not be created. Please try again later.","categorize_document_title":"Categorize the Document","categorized_as":"This document is currently categorized as","not_categorized":"This document is currently not categorized. Please select a category before annotating: ","choose_category":"Choose a category","select_category":"Select the correct category","categorized_error":"If this is not the correct category, please change it and we\'ll proceed with the re-extraction.","categorize_document_no_category_description":"Ask the Project Manager to add a description of this Category to know more about this category.","annotations_pending":"pending","annotations_accepted":"accepted","mark_all_missing":"Mark all empty as Missing","missing_counter":"Missing","pending_counter":"Pending","no_labels_to_choose":"No Labels","accept_group":"Accept all","new_ann_set_title":"New annotation set","new_ann_set_description":"Select a data model from the existing ones. The new annotation set will contain the same labels.","select_label_set":"Select label-set model","new_ann_set_hint":"The new set will only be created in the moment you save your annotation.","new":"New","continue":"Continue","use_your_keyboard":"Use your keyboard","arrow_keys":"to Navigate","esc_key":"Exit","enter_key":"Accept or Save","decline":"Decline","server_error":"We are currently experiencing a server issue. Please try again later or","get_support":"Get Support","no_labels_available":"There are no unfilled or multiple labels in the selected annotation set.","no_labels_available_link":"For more details, you can visit <a href=\'https://help.konfuzio.com/modules/labels/index.html#multiple\' target=\'_blank\'>this link</a>.","new_multi_ann_title":"Create multiple annotations","new_multi_ann_description":"Select a data model from the existing ones, then deselect the labels that don\'t exist in this document.","drag_drop_columns_multi_ann":"Drag and drop to change the order of the labels","error_creating_multi_ann":"Not all annotation sets were created successfully.","disabled_finish_review":"Finishing the document review is only possible after all annotations have been revised, whether they are accepted or marked as missing.","no_multi_ann_labelset_model":"There are no available label sets that can be found multiple times in this document.","no_multi_ann_labelset_model_link":"For more details, you can visit <a href=\'https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets\' target=\'_blank\'>this link</a>.","single_category_in_project":"The current project has only one category. To be able to change it, the new one should be first added to the project.","approved_annotations":"It is not possible to change the current category since the document has approved or manually created annotations.","restore":"Restore","split_modal_title":"Split the document","split_modal_body":"We\'ve scanned your file and found <strong>{number_of_split_documents}</strong> different documents. <strong>We strongly recommend</strong> splitting it at this stage, otherwise all the progress you’ve made will be lost due to document data re-extraction.","do_it_later":"I\'ll do it later","review_now":"Review now","recommended":"Recommended","smart_split":"Smart Split","smart_split_suggestions":"Our Smart Split suggestions are highlighted in green","no_splitting_suggestions":"This document does not have splitting suggestions","confirm_splitting":"Are you sure you want to confirm the changes?","splitting_warning":"Be aware that any annotations you have made in this document will not be saved if you proceed.","no":"No","yes":"Yes","prepare_document":"Prepare the document","split_modal_no_suggestions":"Do you need to split the document? <strong>We strongly recommend</strong> splitting it at this stage, otherwise all the progress you’ve made will be lost in the future.","missing_from_document":"Missing from the document","edit_label":"Edit label","delete_label":"Delete label","table":"Table","delete_table":"Delete table","error_downloading_file":"The file could not be downloaded.","original_file":"Original file","pdf_file":"PDF file","no_labels_in_set":"This annotation set has no labels.","link_to_add_labels":"See how to add them <a href=\'https://help.konfuzio.com/modules/labels/index.html#add-a-label\' target=\'_blank\'>here</a>.","no_annotations_in_annotation_set":"This annotation set has no annotations extracted for its respective labels.","wait_title":"Please wait...","redirecting_to_documents_list":"We are taking you to the documents list, so you can continue reviewing your documents while we process the changes made.","translated_string_title":"Translated text","no_translated_string":"No translation exists yet.","add_translation":"Click to add one","edit_translation":"Click to edit","search":"Search","no_results":"No results","search_below_minimum":"Minimum 3 characters","search_in_document":"Search document","document_details":"Details","human_feedback_needed":"Human Feedback needed","label_missing_annotations":"Missing Annotations","accepted_annotations":"Accepted Annotations","edit_ann_content_warning":"If you change the content, the AI cannot use this Annotation. You will also invalidate the training data. Try to change the selection to capture the content before adding it manually, or press OK to continue anyway.","annotation_deleted":"This annotation has been deleted.","annotation_link":"Copy the permanent link to this annotation","copied":"Copied","checkbox_ann_details":"A checkbox will be extracted for this label.","document_section":"Document Section","label_size":"Column size:","powered_by":"powered by Konfuzio","nav_label_anns":"Navigate through annotations"}')},4394:()=>{},5432:(e,t,n)=>{var o={"./de.json":5894,"./en.json":4174,"./es.json":6725};function i(e){var t=a(e);return n(t)}function a(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}i.keys=function(){return Object.keys(o)},i.resolve=a,e.exports=i,i.id=5432},5894:e=>{"use strict";e.exports=JSON.parse('{"no_label_sets_found":"Keine Label Sets vorhanden","no_label_sets_found_description":"In diesem Dokument sind keine Label Sets vorhanden.","no_labels_found":"Keine Labels vorhanden","no_labels_description":"In diesem Label Set sind keine Labels vorhanden.","resolution_not_supported":"Die aktuelle Auflösung wird nicht unterstützt","upload_documents":"Laden Sie Ihre Dokumente hoch","request_trial":"Fordern Sie Ihren Probezugang an","warning_message":"Die KI kann nicht trainiert werden, wenn Sie den Text manuell ändern.","category":"Kategorie","status":"Status","preparation":"Vorbereitung","training":"Training","test":"Test","excluded":"Ausgenommen","set_status":"Setzen Sie bitte einen Status","status_error":"Wir konnten den Status nicht ändern. Bitte versuchen Sie es später erneut.","edit":"Bearbeiten","rename":"Umbenennen","save":"Speichern","autosaving":"Automatisches Speichern...","saved":"Gespeichert","hide":"Ausblenden","not_saved":"Konnte nicht gespeichert werden. Versuchen Sie es noch einmal","handover":"Übergeben","handover_document":"Übergabedokument","type_email":"Bitte geben Sie eine E-Mail ein","invalid_email":"Bitte geben Sie eine gültige E-Mail-Adresse ein.","members":"Mitglieder","select":"Auswählen","document_successfully_handed":"Dokument erfolgreich zugewiesen an","handover_not_possible":"Eine Zuweisung war nicht möglich. Bitte versuchen Sie es später erneut.","small_viewport_title":"Kleine Fenstergröße","small_viewport_info":"Es tut uns leid, aber Anwendung ist nicht für diese Fenstergröße optimiert. Für eine bessere Bedienbarkeit öffnen Sie es bitte in einem größeren Ansichtsfenster.","ok":"Ok","no_data_found":"Zum Bearbeiten anklicken...","draw_box_document":"Find <i>{label_name}</i> in the document","confidence":"Konfidenz","not_found_in_document":"Im Dokument nicht gefunden","approved_by":"Genehmigt von","approved":"Genehmigt","created_by":"Erstellt von","edited_by":"Bearbeitet durch","edited":"Bearbeitet","created":"Manuell erzeugt","not_revised_yet":"Noch nicht geprüft","rotate_pages":"Seiten drehen","rotate_all":"Alles drehen","cancel":"Beenden","apply":"Anwenden","data_being_extracted":"Neue Daten werden extrahiert","analysing_document":"Wir analysieren Ihr Dokument.","few_minutes":"Dies könnte ein paar Minuten dauern.","missing_annotation":"Als fehlend markieren","ann_exists":"Eine Annotation für dieses Label und Label-Set existiert bereits.","lite_mode":"Schreibgeschützt","limited_functionalities":"Sie verwenden die schreibgeschützte Version mit begrenzter Funktionalität.","split":"Aufteilen","reorder":"Sortieren","rotate":"Rotieren","edit_error":"Die Änderungen konnten nicht gespeichert werden. Bitte versuchen Sie es später erneut.","select_pages":"Sie können nun Seiten drehen, neu sortieren und Dokumente teilen.","edit_document":"Dokument bearbeiten (Early Access)","edit_early_access":"Sie sind einer der Nutzer, die Zugang zu diesen Funktionalitäten vor dem offiziellen Erscheinungstermin erhalten.","selected":"ausgewählt","rotate_selected":"Ausgewählte Seite drehen","edit_not_available":"Dokumente mit dem Status \'Vorbereitung\', \'Training\' oder \'Test\' sowie Dokumente mit dem Status \'Geprüft\' können nicht bearbeitet werden.","rotate_split_reorder":"Rotieren, teilen oder sortieren","rename_and_categorize":"Umbenennen und kategorisieren","submit":"Senden","next":"Nächster Schritt: Umbenennen und kategorisieren","back_to_annotations":"Zurück zur Hauptansicht","select_label":"Label auswählen","select_annotation_set":"Wähle Annotation Set","accept":"Akzeptieren","document_error_title":"Dokumentenfehler","document_error_info":"Es tut uns leid, das Dokument ist auf ein Problem gestoßen und seine Daten können nicht wiederhergestellt werden.","contact_support":"Support kontaktieren","finish_review":"Nachprüfung beenden","review_error":"Beim Abschluss der Überprüfung ist etwas schiefgelaufen. Bitte versuchen Sie es später erneut.","document_reviewed":"Eine Bearbeitung ist nicht mehr möglich, da das Dokument bereits geprüft wurde.","reviewed_mode":"Geprüft","error_creating_annotation":"Die Annotation konnte nicht erzeugt werden. Bitte versuchen Sie es später erneut.","categorize_document_title":"Dokument Kategorisieren","categorized_as":"Dieses Dokument ist kategorisiert als","not_categorized":"Nicht kategorisiert. Bitte wählen Sie vor dem Annotieren eine Kategorie aus: ","choose_category":"Wählen Sie bitte eine Kategorie","select_category":"Wählen Sie bitte die richtige Kategorie aus","categorized_error":"Wenn dies nicht die richtige Kategorie ist, ändern Sie diese bitte und wir fahren mit der erneuten Extraktion fort.","categorize_document_no_category_description":"Bitten Sie den Projektmanager, eine Beschreibung dieser Kategorie hinzuzufügen, um mehr über diese Kategorie zu erfahren.","annotations_pending":"Ausstehende Annotationen","annotations_accepted":"Akzeptierte Annotationen","mark_all_missing":"Alle leeren als fehlend markieren","missing_counter":"Fehlen","pending_counter":"Ausstehende","no_labels_to_choose":"Keine Labels","accept_group":"Alle akzeptieren","use_your_keyboard":"Benutze deine Tastatur","arrow_keys":"Navigieren","esc_key":"Exit","enter_key":"Akzeptieren oder Speichern","decline":"Ablehnen","server_error":"Wir haben derzeit ein Serverproblem. Bitte versuchen Sie es später noch einmal oder","get_support":"Hole dir Unterstützung","no_labels_available":"Das ausgewählte Annotations-Set enthält keine nicht ausgefüllten oder multiplen Labels.","no_labels_available_link":"Weitere Informationen finden Sie unter <a href=\'https://help.konfuzio.com/modules/labels/index.html#multiple\' target=\'_blank\'>diesem Link</a>.","new_ann_set_title":"Neues Annotations-Set","new_ann_set_description":"Wählen Sie ein Datenmodell aus den vorhandenen aus. Das neue Annotations-Set enthält dieselben Beschriftungen.","select_label_set":"Wählen Sie das Label-Set-Modell aus","new_ann_set_hint":"Das neue Set wird erst in dem Moment erstellt, in dem Sie Ihre Annotationen speichern.","new":"Neu","continue":"Weiter","new_multi_ann_title":"Erstellen Sie mehrere Annotationen","new_multi_ann_description":"Wählen Sie ein Datenmodell aus den vorhandenen aus und deaktivieren Sie dann die Labels, die in diesem Dokument nicht vorhanden sind.","drag_drop_columns_multi_ann":"Drag and Drop, um die Reihenfolge der Labels zu ändern","error_creating_multi_ann":"Nicht alle Annotationen wurden erfolgreich erstellt.","no_multi_ann_labelset_model":"Es gibt keine verfügbaren Label Sets, die mehrfach in diesem Dokument zu finden sind.","no_multi_ann_labelset_model_link":"Weitere Informationen finden Sie unter <a href=\'https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets\' target=\'_blank\'>diesem Link</a>.","single_category_in_project":"Das aktuelle Projekt hat nur eine Kategorie. Um sie ändern zu können, sollte die neue zuerst dem Projekt hinzugefügt werden.","approved_annotations":"Die Kategorie kann nicht geändert werden, da bereits akzeptierte Annotationen oder manuell erstellte Annotationen zu diesem Dokument vorhanden sind.","restore":"Wiederherstellen","disabled_finish_review":"Das Beenden der Dokumentenprüfung ist erst möglich, nachdem alle Annotationen überarbeitet wurden, unabhängig davon, ob sie akzeptiert oder als fehlend markiert wurden.","split_modal_title":"Dokument aufteilen","split_modal_body":"Wir haben Ihre Datei gescannt und <strong>{number_of_split_documents}</strong> verschiedene Dokumente gefunde. <strong>Wir empfehlen dringend,</strong> sie zu diesem Zeitpunkt aufzuteilen, da sonst alle Fortschritte, die Sie gemacht haben, aufgrund der erneuten Extraktion der Dokumentdaten verloren gehen.","do_it_later":"Ich werde es später machen","review_now":"Jetzt überprüfen","recommended":"Empfohlen","smart_split":"Smart Split","smart_split_suggestions":"Unsere Smart Split-Vorschläge sind grün hervorgehoben","no_splitting_suggestions":"Dieses Dokument enthält keine Split-Vorschläge","confirm_splitting":"Sind Sie sicher, dass Sie die Änderungen bestätigen möchten?","splitting_warning":"Beachten Sie bitte, dass alle Annotationen, die Sie in diesem Dokument gemacht haben, nicht gespeichert werden, wenn Sie fortfahren.","no":"Nein","yes":"Ja","split_modal_no_suggestions":"Soll das Dokument geteilt werden? Wir <strong>empfehlen</strong> das Dokument jetzt zuteilen, da sonst alle Fortschritte, die in der Zwischenzeit gemacht werden, verloren gehen.","missing_from_document":"Fehlt im Dokument","edit_label":"Label editieren","delete_label":"Label löschen","table":"Tabelle","prepare_document":"Dokument vorbereiten","delete_table":"Tabelle löschen","error_downloading_file":"Die Datei konnte nicht heruntergeladen werden.","original_file":"Originaldatei","pdf_file":"PDF Datei","no_labels_in_set":"Dieser Annotationssatz hat keine Beschriftungen.","link_to_add_labels":"Sehen Sie <a href=\'https://help.konfuzio.com/modules/labels/index.html#add-a-label\' target=\'_blank\'>hier</a>, wie Sie sie hinzufügen.","no_annotations_in_annotation_set":"Dieser Annotationssatz enthält keine extrahierten Annotationen für die jeweiligen Beschriftungen.","wait_title":"Bitte warten...","redirecting_to_documents_list":"Wir führen Sie zur Dokumentenliste, sodass Sie Ihre Dokumente weiter überprüfen können, während wir die vorgenommenen Änderungen verarbeiten.","translated_string_title":"Übersetzter Text","no_translated_string":"Es existiert noch keine Übersetzung.","add_translation":"Klicken Sie zum hinzufügen","edit_translation":"Zum Bearbeiten anklicken","search":"Suchen","no_results":"Keine Ergebnisse","search_below_minimum":"Mindestens 3 Zeichen","search_in_document":"Suche im Dokument","document_details":"Details","human_feedback_needed":"Menschliches Feedback erforderlich","label_missing_annotations":"Fehlende Annotationen","accepted_annotations":"Akzeptierte Annotationen","edit_ann_content_warning":"Wenn Sie den Text ändern, kann die KI diese Annotation nicht verwenden. Dadurch werden auch die Trainingsdaten ungültig. Versuchen Sie, die Auswahl zu verändern, um den Text zu erfassen, bevor Sie ihn manuell hinzufügen, oder drücken Sie OK, um trotzdem fortzufahren.","annotation_deleted":"Diese Annotation wurde gelöscht.","annotation_link":"Kopieren Sie den permanenten Link zu dieser Annotationen","copied":"Kopiert","checkbox_ann_details":"Für dieses Label wird ein Kästchen extrahiert.","document_section":"Dokumentabschnitt","label_size":"Spaltengröße:","powered_by":"betrieben von Konfuzio","nav_label_anns":"Durch Annotationen navigieren"}')},6725:e=>{"use strict";e.exports=JSON.parse('{"no_label_sets_found":"No se han encontrado grupos de etiquetas","no_label_sets_found_description":"No existen grupos de etiquetas en este documento.","no_labels_found":"No se han encontrado etiquetas","no_labels_description":"No existen etiquetas en este grupo.","resolution_not_supported":"Aplicación no compatible con la resolución de pantalla actual","upload_documents":"Suba sus propios documentos","request_trial":"Solicite acceso a la versión de prueba","warning_message":"La IA no puede ser entrenada si se cambia el texto manualmente.","category":"Categoría","status":"Estado","preparation":"Preparación","training":"Entrenamiento","test":"Prueba","excluded":"Excluído","set_status":"Establecer estado","status_error":"No ha sido posible cambiar el estado del documento. Por favor, inténtelo de nuevo más tarde.","edit":"Editar","rename":"Rebautizar","save":"Guardar","autosaving":"Auto guardando...","saved":"Guardado","hide":"Ocultar","not_saved":"No se pudo guardar. Inténtelo de nuevo.","handover":"Asignar","handover_document":"Asignar documento","type_email":"Escriba un correo electrónico","invalid_email":"Por favor, introduzca un correo electrónico válido","members":"MIEMBROS","select":"Seleccionar","document_successfully_handed":"Documento asignado correctamente a","handover_not_possible":"La asignación no fue posible. Por favor, inténtelo de nuevo más tarde.","small_viewport_title":"Tamaño de ventana demasiado pequeño","small_viewport_info":"Lo sentimos, pero aplicación no está optimizado para este tamaño de ventana. Para una mejor experiencia, por favor ábralo en una ventana más grande.","ok":"Ok, entendido","no_data_found":"Click para editar...","draw_box_document":"Encuentra <i>{label_name}</i> en el documento","confidence":"Precisión","not_found_in_document":"No encontrado en el documento","approved_by":"Aprobado por","approved":"Aprobado","created_by":"Creado por","edited_by":"Editado por","edited":"Editado","created":"Creado manualmente","not_revised_yet":"No ha sido revisado aún","rotate_pages":"Rotar páginas","rotate_all":"Rotar todas","cancel":"Cancelar","apply":"Aplicar","next":"Siguiente: Cambiar nombre y categoría","back_to_annotations":"Volver a la vista de anotaciones","submit":"Enviar","data_being_extracted":"Se están extrayendo nuevos datos","analysing_document":"Estamos analizando el documento.","few_minutes":"Esto puede tardar unos minutos.","missing_annotation":"Marcar como Faltante","ann_exists":"Ya existe una anotación para esta etiqueta y grupo de etiquetas.","lite_mode":"Sólo lectura","limited_functionalities":"Está utilizando la versión de sólo lectura con funcionalidad limitada.","accept":"Aceptar","split":"Dividir","reorder":"Reordenar","rotate":"Rotar","edit_error":"No se han podido guardar los cambios, por favor, inténtelo de nuevo más tarde.","select_pages":"Ahora puede rotar, reordenar o dividir los documentos.","edit_document":"Editar documento (Early Access)","edit_early_access":"Eres uno de los usuarios que tiene acceso a estas funcionalidades antes de la fecha de lanzamiento.","selected":"seleccionadas","rotate_selected":"Rotar seleccionadas","edit_not_available":"No es posible editar documentos con estado en \'Preparación\', \'Entrenamiento\' o \'Pruebas\', así como documentos que han sido \'Revisados\'","rotate_split_reorder":"Rotar, dividir or reordenar","rename_and_categorize":"Cambiar nombre y categoría","select_label":"Seleccionar etiqueta","select_annotation_set":"Seleccionar grupo de etiquetas","document_error_title":"Error en el documento","document_error_info":"Lo sentimos, el documento ha sufrido un problema y no se pueden restaurar sus datos.","contact_support":"Contactar con el soporte","finish_review":"Finalizar revisión","review_error":"No ha sido posible finalizar la revisión. Por favor, inténtelo de nuevo más tarde.","document_reviewed":"No es posible editar el documento si ya ha sido revisado.","reviewed_mode":"Revisado","error_creating_annotation":"No ha sido posible crear la anotación. Por favor, inténtelo de nuevo más tarde.","categorize_document_title":"Categorizar documento","categorized_as":"Este documento ha sido categorizado como","not_categorized":"Este documento no ha sido categorizado. Por favor, seleccione una categoría antes de realizar anotaciones: ","choose_category":"Seleccione una categoría","select_category":"Seleccione la categoría correcta","categorized_error":"Si esta no es la categoría correcta, por favor cámbiela y procederemos a realizar de nuevo la extracción.","categorize_document_no_category_description":"Solicite a su Gestor de Proyecto que agregue una descripción a esta Categoría para saber más sobre ella.","annotations_pending":"pendientes","annotations_accepted":"aceptadas","mark_all_missing":"Marcar todas las anotaciones vacías como Faltantes","missing_counter":"Faltantes","pending_counter":"Pendientes","no_labels_to_choose":"Sin etiquetas","accept_group":"Aceptar todas","use_your_keyboard":"Use su teclado","arrow_keys":"para Navegar","esc_key":"Salir del modo de edición","enter_key":"Aceptar o Guardar","decline":"Declinar","server_error":"Estamos experimentando problemas con el servidor. Por favor, repita la operación o ","get_support":"Contacte al Soporte","no_labels_available":"No hay etiquetas vacías o múltiples en el grupo de anotaciones seleccionado.","no_labels_available_link":"Para más información, haz clic en <a href=\'https://help.konfuzio.com/modules/labels/index.html#multiple\' target=\'_blank\'>este enlace</a>.","new_ann_set_title":"Crear anotaciones múltiples","new_ann_set_description":"Seleccione un modelo de datos de las opciones disponibles, y luego deseleccione las etiquetas que no existen en este documento.","select_label_set":"Seleccione un modelo de grupo de etiquetas","new_ann_set_hint":"El nuevo grupo será creado solo cuando se haya guardado la anotación.","new":"Nuevo","continue":"Continuar","drag_drop_columns_multi_ann":"Arrastre y suelte las columnas para ordenar las etiquetas","error_creating_multi_ann":"No todos los grupos de anotaciones fueron creados de manera exitosa.","disabled_finish_review":"Solo es posible finalizar la revisión del documento si todas las anotaciones han sido revisadas, ya sea aceptadas o marcadas como faltantes.","no_multi_ann_labelset_model":"En este documento no hay grupos de etiquetas múltiples disponibles.","no_multi_ann_labelset_model_link":"Para más información, haga clic en <a href=\'https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets\' target=\'_blank\'>este enlace</a>.","single_category_in_project":"Este proyecto solo tiene una categoría. Para poder modificarla, es necesario agregar esta nueva categoría al proyecto.","approved_annotations":"No es posible cambiar la categoría ya que existen anotaciones aceptadas o creadas manualmente en este documento.","restore":"Restaurar","split_modal_title":"Dividir el documento","split_modal_body":"Hemos escaneado su documento y hemos encontrado <strong>{number_of_split_documents}</strong> documentos diferentes. <strong>Le recomendamos</strong> dividir el documento en esta etapa, ya que de lo contrario se perderá el progreso logrado debido a una nueva extracción de los datos del documento.","do_it_later":"Lo haré luego","review_now":"Revisar ahora","recommended":"Recomendado","smart_split":"División Inteligente","smart_split_suggestions":"Nuestras sugerencias de División Inteligente están marcadas en color verde","no_splitting_suggestions":"Este documento no tiene sugerencias de división","confirm_splitting":"¿Seguro que quiere confirmar los cambios?","splitting_warning":"Tenga en cuenta que se perderán las anotaciones que haya confirmado en el documento.","no":"No","yes":"Sí","split_modal_no_suggestions":"¿Necesita dividir el documento? <strong>Te recomendamos</strong> hacerlo en este momento, o de lo contrario se perderán los cambios realizados.","missing_from_document":"Falta en el documento","edit_label":"Editar etiqueta","delete_label":"Eliminar etiqueta","table":"Tabla","new_multi_ann_description":"Seleccione un modelo de datos de los existentes, luego deseleccione las etiquetas que no existen en este documento.","new_multi_ann_title":"Crear múltiples anotaciones","prepare_document":"Prepare el documento","delete_table":"Eliminar tabla","error_downloading_file":"El documento no pudo ser descargado.","original_file":"Documento original","pdf_file":"Documento PDF","no_labels_in_set":"Este grupo de anotaciones no tiene etiquetas.","link_to_add_labels":"Para ver cómo agregarlas haga clic <a href=\'https://help.konfuzio.com/modules/labels/index.html#add-a-label\' target=\'_blank\'>aquí</a>.","no_annotations_in_annotation_set":"Este grupo de anotaciones no tiene anotaciones encontradas para sus respectivas etiquetas.","wait_title":"Por favor espere...","redirecting_to_documents_list":"Lo estamos redirigiendo a la lista de documentos, para que pueda continuar la revisión de sus documentos mientras procesamos los cambios realizados.","translated_string_title":"Texto traducido","no_translated_string":"Aún no existe traducción.","add_translation":"Clic para agregar","edit_translation":"Clic para editar","search":"Buscar","no_results":"Sin resultados","search_below_minimum":"Mínimo 3 caracteres","search_in_document":"Buscar en documento","document_details":"Detalles","human_feedback_needed":"Necesita feedback humano","label_missing_annotations":"Anotaciones faltantes","accepted_annotations":"Anotaciones aceptadas","edit_ann_content_warning":"Si cambia el texto, la IA no puede utilizar esta anotación. También invalidarás los datos del entrenamiento. Intente cambiar la selección para capturar el texto antes de agregarlo manualmente, o presione OK para continuar de todos modos.","annotation_deleted":"Esta anotación ha sido eliminada.","annotation_link":"Copia el enlace permanente a esta anotación.","copied":"Copiada","checkbox_ann_details":"Se extraerá una casilla de verificación para esta etiqueta.","document_section":"Sección del documento","label_size":"Tamaño de columna:","powered_by":"impulsado por Konfuzio","nav_label_anns":"Navegar por las anotaciones"}')},8330:e=>{"use strict";e.exports=JSON.parse('{"UU":"@konfuzio/document-validation-ui","rE":"0.2.5-dev.0"}')},8578:(e,t,n)=>{"use strict";var o=n(9726);const i={class:"dv-ui-app-container dv-ui-theme"};function a(e,t,n,a,s,l){const r=(0,o.resolveComponent)("DocumentsList"),c=(0,o.resolveComponent)("DocumentDashboard"),d=(0,o.resolveComponent)("ErrorPage");return(0,o.openBlock)(),(0,o.createElementBlock)("div",i,[l.showDocumentsList?((0,o.openBlock)(),(0,o.createBlock)(r,{key:0})):(0,o.createCommentVNode)("",!0),e.pageError?((0,o.openBlock)(),(0,o.createBlock)(d,{key:2,error:e.pageError},null,8,["error"])):((0,o.openBlock)(),(0,o.createBlock)(c,{key:1}))])}var s=n(6278),l=n(2139);const r={class:"dashboard"},c={key:0,class:"error-modal"},d={key:1,class:"not-optimized"},h={key:2,class:"not-supported"},u={class:"text"};function m(e,t,n,i,a,s){const l=(0,o.resolveComponent)("DocumentTopBar"),m=(0,o.resolveComponent)("DocumentThumbnails"),p=(0,o.resolveComponent)("ScrollingDocument"),g=(0,o.resolveComponent)("pane"),C=(0,o.resolveComponent)("DocumentAnnotations"),_=(0,o.resolveComponent)("DocumentEdit"),b=(0,o.resolveComponent)("splitpanes"),E=(0,o.resolveComponent)("ChooseLabelSetModal"),S=(0,o.resolveComponent)("ErrorMessage"),f=(0,o.resolveComponent)("DocumentErrorModal"),v=(0,o.resolveComponent)("NotOptimizedViewportModal"),A=(0,o.resolveComponent)("AnnotationDeletedModal");return(0,o.openBlock)(),(0,o.createElementBlock)("div",r,[(0,o.createVNode)(l),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["dashboard-viewer",e.renameAndCategorize?"edit-mode":""])},[e.editMode?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(m,{key:0,ref:"documentPages"},null,512)),(0,o.createVNode)(b,{class:"default-theme"},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(g,{size:50,"min-size":10},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(p,{ref:"scrollingDocument",class:"dashboard-document"},null,512)])),_:1}),(0,o.createVNode)(g,{size:50,class:"document-sidebar"},{default:(0,o.withCtx)((()=>[e.editMode?((0,o.openBlock)(),(0,o.createBlock)(_,{key:1,ref:"editView"},null,512)):((0,o.openBlock)(),(0,o.createBlock)(C,{key:0,ref:"annotations"},null,512))])),_:1})])),_:1}),e.showChooseLabelSetModal&&e.showChooseLabelSetModal.show?((0,o.openBlock)(),(0,o.createBlock)(E,{key:1,"is-multiple-annotations":e.showChooseLabelSetModal.isMultipleAnnotations,onFinish:e.showChooseLabelSetModal.finish},null,8,["is-multiple-annotations","onFinish"])):(0,o.createCommentVNode)("",!0),(0,o.createVNode)(o.Transition,{name:"slide-fade"},{default:(0,o.withCtx)((()=>[e.showActionError?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:"error-message",style:(0,o.normalizeStyle)({width:`${e.errorMessageWidth}px`})},[(0,o.createVNode)(S)],4)):(0,o.createCommentVNode)("",!0)])),_:1})],2),e.showDocumentError?((0,o.openBlock)(),(0,o.createElementBlock)("div",c,[(0,o.createVNode)(f)])):(0,o.createCommentVNode)("",!0),e.optimalResolution?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",d,[(0,o.createVNode)(v)])),(0,o.createElementVNode)("div",null,[(0,o.createVNode)(A)]),e.isMinimumWidth?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",h,[(0,o.createElementVNode)("div",u,(0,o.toDisplayString)(e.$t("resolution_not_supported")),1)]))])}const p={id:"document-top-bar-component",ref:"documentTopBar"},g={class:"left-bar-components"},C={key:1,class:"app-info",target:"_blank",href:"https://konfuzio.com"},_={class:"right-bar-components"},b={key:0,class:"right-components"},E={key:0,class:"keyboard-actions-info"},S={key:1,class:"read-only-info"},f={key:0},v={key:1,class:"doc-reviewed"},A={key:0,class:"read-only-details"},k={key:1,class:"read-only-details"},N={class:"top-bar-buttons"},w={key:1,class:"loading-top-bar"};function y(e,t,n,i,a,s){const l=(0,o.resolveComponent)("DocumentSetChooser"),r=(0,o.resolveComponent)("b-icon"),c=(0,o.resolveComponent)("DocumentName"),d=(0,o.resolveComponent)("KeyboardActionsDescription"),h=(0,o.resolveComponent)("b-tooltip"),u=(0,o.resolveComponent)("DocumentTopBarButtons"),m=(0,o.resolveComponent)("b-skeleton");return(0,o.openBlock)(),(0,o.createElementBlock)("div",p,[e.selectedDocument&&e.selectedDocument.pages.length>0&&!e.loading?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["document-top-bar",e.editMode&&"edit-mode-top-bar"])},[(0,o.createElementVNode)("div",g,[e.publicView||e.recalculatingAnnotations||e.editMode?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(l,{key:0})),!e.showBranding||null!==e.selectedDocument.documentSet&&null===e.documentSet?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("a",C,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("powered_by")),1)]))]),(0,o.createElementVNode)("div",{id:"document-info",class:(0,o.normalizeClass)(["center-bar-components",e.recalculatingAnnotations&&"single-component"])},[(0,o.createElementVNode)("div",{style:(0,o.normalizeStyle)("visibility: "+(a.previousDocument?"visible":"hidden")),class:"left-arrow navigation-arrow",type:"button",onClick:t[0]||(t[0]=e=>s.navigateToDocument(a.previousDocument))},[(0,o.createVNode)(r,{icon:"angle-left",size:"is-small"})],4),(0,o.createVNode)(c,{"data-file-name":e.selectedDocument.data_file_name},null,8,["data-file-name"]),(0,o.createElementVNode)("div",{class:"right-arrow navigation-arrow",style:(0,o.normalizeStyle)("visibility: "+(a.nextDocument?"visible":"hidden")),type:"button",onClick:t[1]||(t[1]=e=>s.navigateToDocument(a.nextDocument))},[(0,o.createVNode)(r,{icon:"angle-right",size:"is-small"})],4)],2),(0,o.createElementVNode)("div",_,[e.recalculatingAnnotations?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",b,[e.editMode||e.publicView&&e.isDocumentReviewed?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",E,[(0,o.createVNode)(d)])),e.editMode||!e.publicView&&!e.isDocumentReviewed?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",S,[(0,o.createVNode)(h,{animated:!1,position:"is-bottom",class:"right-aligned width-184"},{content:(0,o.withCtx)((()=>[e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("div",A,(0,o.toDisplayString)(e.$t("limited_functionalities")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("div",k,(0,o.toDisplayString)(e.$t("document_reviewed")),1))])),default:(0,o.withCtx)((()=>[e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("span",f,(0,o.toDisplayString)(e.$t("lite_mode")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("span",v,(0,o.toDisplayString)(e.$t("reviewed_mode")),1)),(0,o.createVNode)(r,{class:(0,o.normalizeClass)(["info-icon is-small",!e.publicView&&e.isDocumentReviewed&&"info-reviewed"]),icon:"circle-info"},null,8,["class"])])),_:1})])),(0,o.createElementVNode)("div",N,[(0,o.createVNode)(u)])]))])],2)):((0,o.openBlock)(),(0,o.createElementBlock)("div",w,[(0,o.createVNode)(m,{position:"is-centered",width:"20%",height:"60%"})]))],512)}const T={class:"dropdown-doc-set"},B={class:"dropdown-left"},D={class:"dropdown-text"},L={class:"top-part"},V={class:"bottom-part"},x={class:"dropdown-right"},M={key:1,class:"loading-bar"};function I(e,t,n,i,a,s){const l=(0,o.resolveComponent)("CategoryIcon"),r=(0,o.resolveComponent)("b-icon"),c=(0,o.resolveComponent)("b-dropdown-item"),d=(0,o.resolveComponent)("b-dropdown"),h=(0,o.resolveComponent)("b-skeleton");return e.documentSet&&e.documentSet.documents&&e.documentSet.documents.length>1&&e.categories?((0,o.openBlock)(),(0,o.createBlock)(d,{key:0,modelValue:a.selectedDocId,"onUpdate:modelValue":t[0]||(t[0]=e=>a.selectedDocId=e),class:"document-set-dropdown dropdown-full-width","aria-role":"list",scrollable:""},{trigger:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",T,[(0,o.createElementVNode)("div",B,[(0,o.createVNode)(l)]),(0,o.createElementVNode)("div",D,[(0,o.createElementVNode)("div",L,(0,o.toDisplayString)(e.$t("document_section")),1),(0,o.createElementVNode)("div",V,(0,o.toDisplayString)(`${e.categoryName(e.selectedDocument.category)} ${e.numberOfDocumentInSet(e.selectedDocument)}`),1)]),(0,o.createElementVNode)("div",x,[(0,o.createVNode)(r,{icon:"angle-down",size:"is-small",class:"caret"})])])])),default:(0,o.withCtx)((()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.documentSet.documents,(t=>((0,o.openBlock)(),(0,o.createBlock)(c,{key:t.id,"aria-role":"listitem",class:"list-item",value:t.id,onClick:e=>s.handleDocumentClick(t)},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(`${e.categoryName(t.category)} ${e.numberOfDocumentInSet(t)}`),1)])),_:2},1032,["value","onClick"])))),128))])),_:1},8,["modelValue"])):null!==e.selectedDocument.documentSet&&null===e.documentSet?((0,o.openBlock)(),(0,o.createElementBlock)("div",M,[(0,o.createVNode)(h,{width:"100px",height:"60%"})])):(0,o.createCommentVNode)("",!0)}const O={xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 22 22"};function P(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",O,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#1A1A1A",d:"M20.47,7.37s0,0,0-.08l-.06-.15a.71.71,0,0,0-.07-.09.94.94,0,0,0-.09-.12l-.09-.07L20,6.78l-7.5-4.63a1,1,0,0,0-1.06,0L4,6.78l-.09.08-.09.07a.94.94,0,0,0-.09.12.71.71,0,0,0-.07.09l-.06.15s0,0,0,.08a1.15,1.15,0,0,0,0,.26v8.74a1,1,0,0,0,.47.85l7.5,4.63h0a.47.47,0,0,0,.15.06s.05,0,.08,0a.86.86,0,0,0,.52,0s.05,0,.08,0a.47.47,0,0,0,.15-.06h0L20,17.22a1,1,0,0,0,.47-.85V7.63A1.15,1.15,0,0,0,20.47,7.37ZM11,19.21l-5.5-3.4V9.43L11,12.82Zm1-8.12L6.4,7.63,12,4.18l5.6,3.45Zm6.5,4.72L13,19.21V12.82l5.5-3.39Z"},null,-1)]))}var $=n(4621);const R={},F=(0,$.A)(R,[["render",P]]),H=F,z={name:"DocumentSetChooser",components:{CategoryIcon:H},data(){return{selectedDocId:0}},computed:{...(0,s.L8)("document",["numberOfDocumentInSet"]),...(0,s.L8)("category",["categoryName"]),...(0,s.aH)("document",["documentSet","selectedDocument"]),...(0,s.aH)("category",["categories"])},mounted(){this.selectedDocId=this.selectedDocument.id},methods:{handleDocumentClick(e){this.$store.dispatch("document/changeCurrentDocument",e.id)}}},U=(0,$.A)(z,[["render",I],["__scopeId","data-v-57a73f96"]]),Z=U,G={class:"document-icon"},W={class:"file-name-section"},q=["contenteditable"],j={key:2,class:"message-container"},K={class:"loading-container"},Y={key:3,class:"message-container"},J={key:0,class:"cloud-icon"},X={key:1,class:"cloud-icon"};function Q(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton"),r=(0,o.resolveComponent)("ServerImage"),c=(0,o.resolveComponent)("b-tooltip"),d=(0,o.resolveComponent)("b-icon"),h=(0,o.resolveComponent)("b-loading"),u=(0,o.resolveComponent)("b-notification"),m=(0,o.resolveComponent)("FileNameSaved"),p=(0,o.resolveComponent)("FileNameNotSaved");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(["document-name-component",e.editMode&&"document-name-edit-mode"])},[(0,o.createElementVNode)("div",G,[(0,o.createVNode)(r,{height:"22px","image-url":`${e.selectedDocument.thumbnail_url}?${e.selectedDocument.downloaded_at}`},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{width:"15px",height:"22px",rounded:!1})])),_:1},8,["image-url"])]),(0,o.createVNode)(c,{label:s.fullText,multilined:"",active:s.isFileNameBiggerThanMaxSize&&!a.isEditable,size:"is-large",position:"is-bottom"},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",W,[(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(["document-name",a.isEditable&&"is-editable"]),contenteditable:a.isEditable,onInput:t[0]||(t[0]=(...e)=>s.handleInput&&s.handleInput(...e)),onPaste:t[1]||(t[1]=(...e)=>s.handlePaste&&s.handlePaste(...e)),onKeydown:t[2]||(t[2]=(0,o.withKeys)(((...e)=>s.handleSave&&s.handleSave(...e)),["enter"])),onBlur:t[3]||(t[3]=(...e)=>s.handleSave&&s.handleSave(...e))},(0,o.toDisplayString)(s.textContent),43,q)])])),_:1},8,["label","active"]),e.publicView||e.isDocumentReviewed||!a.showEditBtn||e.editMode||e.recalculatingAnnotations?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:"edit-btn btn",onClick:t[4]||(t[4]=(...e)=>s.handleEdit&&s.handleEdit(...e))},(0,o.toDisplayString)(e.$t("rename")),1)),a.showSaveBtn&&!e.editMode?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:"save-btn btn",onClick:t[5]||(t[5]=(...e)=>s.handleSave&&s.handleSave(...e))},(0,o.toDisplayString)(e.$t("save")),1)):(0,o.createCommentVNode)("",!0),a.saving?((0,o.openBlock)(),(0,o.createElementBlock)("div",j,[(0,o.createElementVNode)("span",K,[(0,o.createVNode)(u,{closable:!1,class:"loading-background"},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(h,{modelValue:a.saving,"onUpdate:modelValue":t[6]||(t[6]=e=>a.saving=e),"is-full-page":a.isFullPage},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(d,{icon:"spinner",class:"fa-spin loading-icon-size spinner"})])),_:1},8,["modelValue","is-full-page"])])),_:1})]),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("autosaving")),1)])):(0,o.createCommentVNode)("",!0),a.changed?((0,o.openBlock)(),(0,o.createElementBlock)("div",Y,[a.saved?((0,o.openBlock)(),(0,o.createElementBlock)("span",J,[(0,o.createVNode)(m)])):((0,o.openBlock)(),(0,o.createElementBlock)("span",X,[(0,o.createVNode)(p)])),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(a.saved?e.$t("saved"):e.$t("not_saved")),1)])):(0,o.createCommentVNode)("",!0),e.detailsUrl?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:4,class:"details-btn btn",onClick:t[7]||(t[7]=(...e)=>s.openDocumentDetails&&s.openDocumentDetails(...e))},(0,o.toDisplayString)(e.$t("document_details")),1)):(0,o.createCommentVNode)("",!0)],2)}const ee={style:{display:"flex"}},te=["height"];function ne(e,t,n,i,a,s){const l=(0,o.resolveDirective)("observe-visibility");return(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("div",ee,[(0,o.withDirectives)((0,o.createElementVNode)("img",{ref:"imgTag",height:n.height},null,8,te),[[o.vShow,a.loaded]]),a.loaded?(0,o.createCommentVNode)("",!0):(0,o.renderSlot)(e.$slots,"default",{key:0},void 0,!0)])),[[l,s.visibilityChanged]])}var oe=n(4335),ie=n(2068);let ae;const se=async(e,t,n)=>{ae=new ie.A({url:e,realm:t,clientId:n});try{const e=await ae.init({onLoad:"login-required",enableLogging:!0});e?(Ae.setIsKeycloakAuth(!0),Ae.setAuthToken(ae.token)):console.error("User is not authenticated")}catch(o){console.error("Failed to initialize adapter:",o)}},le=()=>new Promise((async(e,t)=>{ae?(await ae.updateToken(30),Ae.setAuthToken(ae.token),e()):t()}));let re,ce,de,he,ue;const me="https://app.konfuzio.com",pe={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_IMAGE_URL;oe.A.defaults.xsrfCookieName="csrftoken",oe.A.defaults.xsrfHeaderName="X-CSRFToken",re=oe.A.create({baseURL:{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_API_URL||`${me}/api/v3/`}),ce=oe.A.create({baseURL:pe||`${me}`,responseType:"blob"});const ge=e=>{e!==de&&(de=e)},Ce=e=>{ue=e},_e=e=>{re.defaults.baseURL=e},be=e=>{ce.defaults.baseURL=e},Ee=e=>{he=e},Se=async e=>(ue&&await le(),de&&(e.headers["Authorization"]=`${ue?"Bearer":"Token"} ${de}`),e.headers["Accept-Language"]=`${he}-${he}`,e);re.interceptors.request.use(Se,(async e=>Promise.reject(e))),ce.interceptors.request.use(Se,(e=>Promise.reject(e)));const fe=e=>new Promise(((t,n)=>{ce.get(e).then((e=>e.data)).then((e=>{t(e)})).catch((o=>{428===o.response.status&&setTimeout((()=>{fe(e).then((e=>{t(e)})).catch((e=>{n(e)}))}),2e3),n(o)}))})),ve=(e,t=!1)=>{let n=[],o=!1,i=t?"&":"?",a=`${e}${i}limit=100`;return new Promise((async(e,t)=>{do{try{let e=await re.get(a);if(e&&e.data){const t=e.data;t.results&&(n=[...n,...t.results]),t.next?a=t.next:o=!0}else t("Error getting paginated results.")}catch(i){t(i),o=!0,console.log(i)}}while(!o);e(n)}))},Ae={HTTP:re,setApiUrl:_e,setFileUrl:be,makeFileRequest:fe,makeGetPaginatedRequest:ve,setAuthToken:ge,setIsKeycloakAuth:Ce,setLocale:Ee,FILE_REQUEST:ce,DEFAULT_URL:me,FILE_URL:pe},ke={name:"ServerImage",props:{imageUrl:{required:!0,type:String},height:{default:null,type:String},width:{default:null,type:String}},data(){return{loaded:!1,isVisible:!1}},watch:{imageUrl(){this.isVisible&&this.loadImage()}},methods:{loadImage(){if(this.imageUrl)return Ae.makeFileRequest(this.imageUrl).then((e=>{this.$refs.imgTag.src=URL.createObjectURL(e),this.height&&(this.$refs.imgTag.style.height=this.height),this.width&&(this.$refs.imgTag.style.width=this.width),this.loaded=!0})).catch((e=>{this.loaded=!1}))},visibilityChanged(e){!this.isVisible&&e&&(this.isVisible=e,this.loadImage())}}},Ne=(0,$.A)(ke,[["render",ne],["__scopeId","data-v-be92e2fe"]]),we=Ne,ye={width:"18",height:"13",viewBox:"0 0 18 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Te(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",ye,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M13.2844 12.3934H4.71415C2.48261 12.3934 0.666992 10.5708 0.666992 8.34388C0.666992 6.31069 2.17392 4.61975 4.12801 4.33512C4.49407 1.97428 6.54159 0.166016 9.0002 0.166016C11.4588 0.166016 13.5063 1.97428 13.8749 4.33512C15.8267 4.61976 17.3337 6.3109 17.3337 8.34388C17.3337 10.5708 15.5182 12.3934 13.2842 12.3934H13.2844ZM4.71415 5.90411C3.36987 5.90411 2.27921 6.99729 2.27921 8.34388C2.27921 9.68564 3.36987 10.7788 4.71415 10.7788H13.2844C14.6286 10.7788 15.7216 9.68564 15.7216 8.34388C15.7216 6.99729 14.6284 5.90411 13.2844 5.90411H13.1265C12.6817 5.90411 12.3205 5.54539 12.3205 5.09557C12.3205 3.26812 10.8304 1.77802 9.00061 1.77802C7.16847 1.77802 5.68072 3.26812 5.68072 5.09557C5.68072 5.5452 5.3195 5.90411 4.87217 5.90411H4.71415Z",fill:"#858C9A"},null,-1)]))}const Be={},De=(0,$.A)(Be,[["render",Te]]),Le=De,Ve={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xe(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Ve,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M11.4269 13.1159H4.57073C2.7855 13.1159 1.33301 11.6578 1.33301 9.87627C1.33301 8.24972 2.53855 6.89697 4.10182 6.66927C4.39467 4.7806 6.03269 3.33398 7.99957 3.33398C9.96646 3.33398 11.6045 4.7806 11.8994 6.66927C13.4608 6.89698 14.6663 8.24989 14.6663 9.87627C14.6663 11.6578 13.214 13.1159 11.4267 13.1159H11.4269ZM4.57073 7.92446C3.49531 7.92446 2.62278 8.799 2.62278 9.87627C2.62278 10.9497 3.49531 11.8242 4.57073 11.8242H11.4269C12.5023 11.8242 13.3767 10.9497 13.3767 9.87627C13.3767 8.799 12.5022 7.92446 11.4269 7.92446H11.3006C10.9448 7.92446 10.6558 7.63749 10.6558 7.27762C10.6558 5.81567 9.46374 4.62359 7.9999 4.62359C6.53419 4.62359 5.34399 5.81567 5.34399 7.27762C5.34399 7.63733 5.05501 7.92446 4.69715 7.92446H4.57073Z",fill:"#858C9A"},null,-1),(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.47098 2.86203C2.73133 2.60168 3.15344 2.60168 3.41379 2.86203L14.471 13.9192C14.7313 14.1796 14.7313 14.6017 14.471 14.862C14.2106 15.1224 13.7885 15.1224 13.5282 14.862L2.47098 3.80484C2.21063 3.54449 2.21063 3.12238 2.47098 2.86203Z",fill:"#858C9A"},null,-1),(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1.99957 2.39007C2.52027 1.86938 3.36449 1.86938 3.88519 2.39007L14.9424 13.4473C15.4631 13.968 15.4631 14.8122 14.9424 15.3329C14.4217 15.8536 13.5775 15.8536 13.0568 15.3329L1.99957 4.27569C1.47887 3.75499 1.47887 2.91077 1.99957 2.39007ZM3.41379 2.86148C3.15344 2.60113 2.73133 2.60113 2.47098 2.86148C2.21063 3.12183 2.21063 3.54394 2.47098 3.80429L13.5282 14.8615C13.7885 15.1218 14.2106 15.1218 14.471 14.8615C14.7313 14.6011 14.7313 14.179 14.471 13.9187L3.41379 2.86148Z",fill:"white"},null,-1)]))}const Me={},Ie=(0,$.A)(Me,[["render",xe]]),Oe=Ie,Pe={name:"DocumentName",components:{ServerImage:we,FileNameSaved:Le,FileNameNotSaved:Oe},props:{dataFileName:{type:String,default:""}},data(){return{maxFilenameChars:26,isEditable:!1,showEditBtn:!0,showSaveBtn:!1,fileExtension:null,fileName:null,oldFileName:null,saving:!1,isFullPage:!1,changed:!1,saved:!1}},computed:{...(0,s.aH)("document",["selectedDocument","publicView","recalculatingAnnotations","documentId"]),...(0,s.aH)("display",["optimalResolution","detailsUrl"]),...(0,s.aH)("edit",["editMode"]),...(0,s.L8)("document",["isDocumentReviewed"]),textContent(){return this.isEditable?this.oldFileName:this.fileName?this.shortFilenameIfNeeded(`${this.fileName}.${this.fileExtension}`):this.shortFilenameIfNeeded(this.dataFileName)},fullText(){return this.fileName?this.fileName:this.dataFileName},isFileNameBiggerThanMaxSize(){return this.fileName?this.fileName.length>=this.maxFilenameChars:this.dataFileName.length>=this.maxFilenameChars}},updated(){const e=document.querySelector(".document-name");if(this.isEditable&&e&&(e.focus(),this.handleCaretPlacing(e)),this.changed){const e=this;setTimeout((function(){e.saved=!1,e.changed=!1,e.showEditBtn=!0,this.showSaveBtn=!1}),4e3)}},methods:{shortFilenameIfNeeded(e){return e&&e.length>=this.maxFilenameChars?e.substr(0,this.maxFilenameChars/2)+"..."+e.substr(e.length-this.maxFilenameChars/2,e.length):e},handleFileName(){this.fileName=this.dataFileName.split(".").slice(0,-1).join("."),this.fileExtension=this.dataFileName.split(".").at(-1)},handleEdit(){this.handleFileName(),this.isEditable=!0,this.showEditBtn=!1,this.showSaveBtn=!0,this.oldFileName=this.fileName},handleCaretPlacing(e){let t,n;document.createRange?(t=document.createRange(),t.selectNodeContents(e),t.collapse(!1),n=window.getSelection(),n.removeAllRanges(),n.addRange(t)):document.selection&&(t=document.body.createTextRange(),t.moveToElementText(e),t.collapse(!1),t.select())},handlePaste(e){e.preventDefault()},handleInput(e){const t=e.target.textContent;this.fileName=""===t?"untitled":t.trim()},handleSave(e){this.isEditable=!1,e.target.textContent=this.fileName;const t={data_file_name:`${this.fileName}.${this.fileExtension}`};this.showSaveBtn=!1,this.saving=!0,this.$store.dispatch("document/updateDocument",t).then((e=>{e&&(this.changed=!0,this.oldFileName=this.fileName,this.saved=!0)})).catch((t=>{this.changed=!0,e.target.textContent=this.oldFileName,this.fileName=this.oldFileName})).finally((()=>{this.saving=!1}));const n=document.querySelector(".document-name");n&&n.blur()},openDocumentDetails(){window.location.href=this.detailsUrl}}},$e=(0,$.A)(Pe,[["render",Q],["__scopeId","data-v-605ff746"]]),Re=$e,Fe={class:"buttons"},He={key:0,class:"edit-mode-buttons"},ze={key:1,id:"review-btn",class:"finish-review-button-container"},Ue={key:0},Ze={key:1};function Ge(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button"),r=(0,o.resolveComponent)("b-tooltip"),c=(0,o.resolveComponent)("b-icon"),d=(0,o.resolveComponent)("b-loading"),h=(0,o.resolveComponent)("b-notification");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Fe,[e.editMode?((0,o.openBlock)(),(0,o.createElementBlock)("div",He,[(0,o.createVNode)(l,{label:e.$t("back_to_annotations"),class:"button-cancel primary-button edit-mode-btn",type:"is-default",disabled:!s.documentHasCategory||e.waitingForSplittingConfirmation(e.selectedDocument),onClick:s.closeEditMode},null,8,["label","disabled","onClick"]),(0,o.createVNode)(r,{active:!a.enableSubmit,position:"is-bottom",label:e.$t("select_category"),class:"right-aligned no-right-margin"},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{label:e.editMode&&!e.renameAndCategorize?e.$t("next"):e.$t("submit"),type:"is-primary",class:(0,o.normalizeClass)(["button-next primary-button edit-mode-btn",e.renameAndCategorize&&"submit-btn"]),disabled:e.renameAndCategorize&&!a.enableSubmit,onClick:s.handleButton},null,8,["label","class","disabled","onClick"])])),_:1},8,["active","label"])])):(0,o.createCommentVNode)("",!0),e.editMode||e.isDocumentReviewed||e.publicView?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",ze,[(0,o.createVNode)(r,{active:!s.isReviewButtonActive,position:"is-bottom",multilined:"",class:"right-aligned no-right-margin"},{content:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("disabled_finish_review")),1)])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{class:(0,o.normalizeClass)(["finish-review-btn","text-btn","primary-button"]),type:"is-primary",disabled:!s.isReviewButtonActive,onClick:(0,o.withModifiers)(s.handleFinishReview,["stop"])},{default:(0,o.withCtx)((()=>[a.isLoading?((0,o.openBlock)(),(0,o.createElementBlock)("div",Ze,[(0,o.createVNode)(h,{closable:!1,class:(0,o.normalizeClass)(["loading-background"])},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(d,{active:a.isLoading,"is-full-page":!1},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(c,{icon:"spinner",class:"fa-spin loading-icon-size spinner"})])),_:1},8,["active"])])),_:1})])):((0,o.openBlock)(),(0,o.createElementBlock)("span",Ue,(0,o.toDisplayString)(e.$t("finish_review")),1))])),_:1},8,["disabled","onClick"])])),_:1},8,["active"])]))])}const We={name:"DocumentTopBarButtons",data(){return{emptyLabels:null,isLoading:!1,enableSubmit:!1}},computed:{...(0,s.aH)("document",["selectedDocument","publicView","annotationSets","thumbnailIsLoaded"]),...(0,s.aH)("edit",["editMode","renameAndCategorize","updatedDocument"]),...(0,s.L8)("document",["isDocumentReadyToFinishReview","isDocumentReviewed","waitingForSplittingConfirmation"]),...(0,s.L8)("edit",["documentShouldBePostprocessed"]),isReviewButtonActive(){return this.isDocumentReadyToFinishReview},documentHasCategory(){return this.selectedDocument.category}},watch:{updatedDocument(e){e&&this.submitValidation(e)}},mounted(){this.updatedDocument&&this.submitValidation(this.updatedDocument)},methods:{submitValidation(e){const t=e.find((e=>!e.category));this.enableSubmit=!t},closeEditMode(){this.$store.dispatch("edit/disableEditMode"),this.$store.dispatch("edit/setRenameAndCategorize",!1),this.$store.dispatch("edit/setUpdatedDocument",null),this.$store.dispatch("edit/setSelectedPages",null),this.$nextTick((()=>{this.$store.dispatch("display/updateCurrentPage",1)}))},handleButton(){this.renameAndCategorize?this.selectedDocument.category_is_revised&&this.documentShouldBePostprocessed?this.$store.dispatch("edit/setShowEditConfirmationModal",!0):this.$store.dispatch("edit/setSubmitEditChanges",!0):(this.$store.dispatch("edit/setRenameAndCategorize",!0),this.$store.dispatch("edit/setSelectedPages",null))},handleFinishReview(){const e={is_reviewed:!0};this.isLoading=!0,this.$store.dispatch("document/updateDocument",e).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("review_error")})})).finally((()=>{this.isLoading=!1}))}}},qe=(0,$.A)(We,[["render",Ge],["__scopeId","data-v-3767df42"]]),je=qe,Ke={key:0,class:"keyboard-actions-description"},Ye={class:"b-tooltips"},Je={class:"tooltip-title"},Xe={class:"tooltip-description"},Qe={class:"content-line"},et={class:"action-item"},tt={class:"key"},nt={class:"key"},ot={class:"keyboard-action-text"},it={class:"action-item"},at={class:"keyboard-action-text"},st={class:"content-line"},lt={class:"action-item"},rt={class:"keyboard-action-text"},ct={class:"action-item"},dt={class:"keyboard-action-text"};function ht(e,t,n,i,a,s){const l=(0,o.resolveComponent)("KeyboardIcon"),r=(0,o.resolveComponent)("ArrowUpKey"),c=(0,o.resolveComponent)("ArrowDownKey"),d=(0,o.resolveComponent)("b-tooltip");return e.publicView||e.isDocumentReviewed||e.editMode?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Ke,[(0,o.createElementVNode)("section",Ye,[(0,o.createVNode)(d,{position:"is-left",size:"is-large",class:"left-down-aligned"},{content:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",Je,(0,o.toDisplayString)(e.$t("use_your_keyboard")),1),(0,o.createElementVNode)("div",Xe,[(0,o.createElementVNode)("div",Qe,[(0,o.createElementVNode)("div",et,[(0,o.createElementVNode)("div",tt,[(0,o.createVNode)(r)]),(0,o.createElementVNode)("div",nt,[(0,o.createVNode)(c)]),(0,o.createElementVNode)("div",ot,(0,o.toDisplayString)(e.$t("arrow_keys")),1)]),t[1]||(t[1]=(0,o.createElementVNode)("div",{class:"tooltip-divider"},null,-1)),(0,o.createElementVNode)("div",it,[t[0]||(t[0]=(0,o.createElementVNode)("div",{class:"key"},(0,o.toDisplayString)("ESC"),-1)),(0,o.createElementVNode)("div",at,(0,o.toDisplayString)(e.$t("esc_key")),1)])]),(0,o.createElementVNode)("div",st,[(0,o.createElementVNode)("div",lt,[t[2]||(t[2]=(0,o.createElementVNode)("div",{class:"key"},(0,o.toDisplayString)("ENTER"),-1)),(0,o.createElementVNode)("div",rt,(0,o.toDisplayString)(e.$t("enter_key")),1)]),t[4]||(t[4]=(0,o.createElementVNode)("div",{class:"tooltip-divider"},null,-1)),(0,o.createElementVNode)("div",ct,[t[3]||(t[3]=(0,o.createElementVNode)("div",{class:"key"},(0,o.toDisplayString)("DELETE"),-1)),(0,o.createElementVNode)("div",dt,(0,o.toDisplayString)(e.$t("missing_annotation")),1)])])])])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(l)])),_:1})])]))}const ut={width:"20",height:"12",viewBox:"0 0 20 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mt(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",ut,t[0]||(t[0]=[(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.30187 0.167969H15.6994C16.1387 0.167955 16.5177 0.167942 16.8298 0.193445C17.1593 0.220362 17.487 0.279792 17.8023 0.440454C18.2727 0.680138 18.6552 1.06259 18.8948 1.53299C19.0555 1.84831 19.1149 2.17599 19.1418 2.50545C19.1673 2.81759 19.1673 3.19655 19.1673 3.63583V8.36678C19.1673 8.80606 19.1673 9.18502 19.1418 9.49716C19.1149 9.82661 19.0555 10.1543 18.8948 10.4696C18.6552 10.94 18.2727 11.3225 17.8023 11.5622C17.487 11.7228 17.1593 11.7822 16.8298 11.8092C16.5177 11.8347 16.1387 11.8347 15.6994 11.8346H4.30188C3.86259 11.8347 3.48361 11.8347 3.17146 11.8092C2.84201 11.7822 2.51433 11.7228 2.19901 11.5622C1.7286 11.3225 1.34615 10.94 1.10647 10.4696C0.945808 10.1543 0.886378 9.82661 0.85946 9.49716C0.833957 9.18502 0.83397 8.80605 0.833985 8.36676V3.63585C0.83397 3.19656 0.833957 2.81759 0.85946 2.50545C0.886378 2.17599 0.945808 1.84831 1.10647 1.53299C1.34615 1.06259 1.7286 0.680137 2.19901 0.440454C2.51433 0.279792 2.84201 0.220362 3.17146 0.193445C3.48361 0.167942 3.86258 0.167955 4.30187 0.167969ZM3.30718 1.85458C3.0808 1.87307 2.99686 1.90447 2.95566 1.92546C2.79886 2.00536 2.67138 2.13284 2.59148 2.28964C2.57049 2.33085 2.53909 2.41478 2.52059 2.64117C2.5013 2.87728 2.50065 3.18751 2.50065 3.66797V8.33464C2.50065 8.8151 2.5013 9.12533 2.52059 9.36144C2.53909 9.58783 2.57049 9.67176 2.59148 9.71296C2.67138 9.86976 2.79886 9.99725 2.95566 10.0771C2.99686 10.0981 3.0808 10.1295 3.30718 10.148C3.5433 10.1673 3.85352 10.168 4.33399 10.168H15.6673C16.1478 10.168 16.458 10.1673 16.6941 10.148C16.9205 10.1295 17.0044 10.0981 17.0456 10.0771C17.2024 9.99725 17.3299 9.86977 17.4098 9.71296C17.4308 9.67176 17.4622 9.58783 17.4807 9.36144C17.5 9.12533 17.5007 8.8151 17.5007 8.33464V3.66797C17.5007 3.18751 17.5 2.87728 17.4807 2.64117C17.4622 2.41478 17.4308 2.33085 17.4098 2.28964C17.3299 2.13284 17.2024 2.00536 17.0456 1.92546C17.0044 1.90447 16.9205 1.87307 16.6941 1.85458C16.458 1.83528 16.1478 1.83464 15.6673 1.83464H4.33399C3.85352 1.83464 3.5433 1.83528 3.30718 1.85458ZM4.16732 4.33464C4.16732 3.8744 4.54042 3.5013 5.00065 3.5013H5.00899C5.46922 3.5013 5.84232 3.8744 5.84232 4.33464C5.84232 4.79487 5.46922 5.16797 5.00899 5.16797H5.00065C4.54042 5.16797 4.16732 4.79487 4.16732 4.33464ZM7.50065 4.33464C7.50065 3.8744 7.87375 3.5013 8.33399 3.5013H8.34232C8.80256 3.5013 9.17565 3.8744 9.17565 4.33464C9.17565 4.79487 8.80256 5.16797 8.34232 5.16797H8.33399C7.87375 5.16797 7.50065 4.79487 7.50065 4.33464ZM10.834 4.33464C10.834 3.8744 11.2071 3.5013 11.6673 3.5013H11.6757C12.1359 3.5013 12.509 3.8744 12.509 4.33464C12.509 4.79487 12.1359 5.16797 11.6757 5.16797H11.6673C11.2071 5.16797 10.834 4.79487 10.834 4.33464ZM14.1673 4.33464C14.1673 3.8744 14.5404 3.5013 15.0007 3.5013H15.009C15.4692 3.5013 15.8423 3.8744 15.8423 4.33464C15.8423 4.79487 15.4692 5.16797 15.009 5.16797H15.0007C14.5404 5.16797 14.1673 4.79487 14.1673 4.33464ZM5.00065 8.08464C5.00065 7.6244 5.37375 7.2513 5.83399 7.2513H14.1673C14.6276 7.2513 15.0007 7.6244 15.0007 8.08464C15.0007 8.54487 14.6276 8.91797 14.1673 8.91797H5.83399C5.37375 8.91797 5.00065 8.54487 5.00065 8.08464Z",fill:"#1A1A1A"},null,-1)]))}const pt={},gt=(0,$.A)(pt,[["render",mt]]),Ct=gt,_t={width:"8",height:"6",viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function bt(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",_t,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M4 5.5L0 0.5L8 0.5L4 5.5Z",fill:"white"},null,-1)]))}const Et={},St=(0,$.A)(Et,[["render",bt]]),ft=St,vt={width:"8",height:"6",viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function At(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",vt,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M4 0.5L0 5.5L8 5.5L4 0.5Z",fill:"white"},null,-1)]))}const kt={},Nt=(0,$.A)(kt,[["render",At]]),wt=Nt,yt={name:"KeyboardActionsDescription",components:{KeyboardIcon:Ct,ArrowUpKey:ft,ArrowDownKey:wt},computed:{...(0,s.aH)("edit",["editMode"]),...(0,s.aH)("document",["selectedDocument","publicView"]),...(0,s.L8)("document",["isDocumentReviewed"])}},Tt=(0,$.A)(yt,[["render",ht],["__scopeId","data-v-bcf0f440"]]),Bt=Tt,Dt={name:"DocumentTopBar",components:{DocumentSetChooser:Z,DocumentName:Re,DocumentTopBarButtons:je,KeyboardActionsDescription:Bt},data(){return{previousDocument:null,nextDocument:null}},computed:{...(0,s.aH)("document",["selectedDocument","documentSet","publicView","loading","recalculatingAnnotations"]),...(0,s.aH)("edit",["editMode"]),...(0,s.aH)("display",["showDocumentsNavigation","showBranding"]),...(0,s.L8)("document",["isDocumentReviewed","isDocumentReadyToBeReviewed","waitingForSplittingConfirmation"])},watch:{loading(e){!e&&this.showDocumentsNavigation&&this.$store.dispatch("project/fetchDocumentListForNavigation").then((e=>{this.getPreviousAndNextDocuments(e)}))}},created(){window.addEventListener("resize",this.handleResize)},unmounted(){window.removeEventListener("resize",this.handleResize)},mounted(){this.$refs.documentTopBar&&this.setComponentWidth(this.$refs.documentTopBar.offsetWidth)},methods:{setComponentWidth(e){this.$store.dispatch("document/setErrorMessageWidth",e)},handleResize(){this.$refs.documentTopBar&&this.setComponentWidth(this.$refs.documentTopBar.offsetWidth)},getPreviousAndNextDocuments(e){if(!e)return;const t=e.find((e=>e.id===this.selectedDocument.id)),n=e.indexOf(t);n<0?(this.previousDocument=e[0],this.nextDocument=e[1]):(this.previousDocument=e[n-1],this.nextDocument=e[n+1])},navigateToDocument(e){e&&this.$store.dispatch("document/changeCurrentDocument",e.id)}}},Lt=(0,$.A)(Dt,[["render",y],["__scopeId","data-v-bd7cf984"]]),Vt=Lt;function xt(e,t,n,i,a,s){const l=(0,o.resolveComponent)("AnnotationPopup"),r=(0,o.resolveComponent)("AnnSetTableOptions"),c=(0,o.resolveComponent)("v-image"),d=(0,o.resolveComponent)("v-rect"),h=(0,o.resolveComponent)("v-group"),u=(0,o.resolveComponent)("v-layer"),m=(0,o.resolveComponent)("span-selection"),p=(0,o.resolveComponent)("placeholder-selection"),g=(0,o.resolveComponent)("box-selection"),C=(0,o.resolveComponent)("v-stage"),_=(0,o.resolveComponent)("b-skeleton");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{ref:"pdfContainer",class:(0,o.normalizeClass)(["pdf-page-container",(e.categorizeModalIsActive||e.editMode||e.publicView||e.isDocumentReviewed)&&"default-cursor",n.page.number===e.currentPage&&"current-page"])},[!e.isSelecting&&e.spanSelectionsForPage(n.page).length>0?((0,o.openBlock)(),(0,o.createBlock)(l,{key:0,spans:e.spanSelectionsForPage(n.page),"container-width":s.scaledViewport.width,"container-height":s.scaledViewport.height,page:n.page,onClose:s.closePopups},null,8,["spans","container-width","container-height","page","onClose"])):(0,o.createCommentVNode)("",!0),s.showAnnotationLabel?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:"annotation-label",style:(0,o.normalizeStyle)(s.getAnnotationLabelPosition(s.showAnnotationLabel))},(0,o.toDisplayString)(s.showAnnotationLabel.labelName),5)):(0,o.createCommentVNode)("",!0),e.showAnnSetTable?((0,o.openBlock)(),(0,o.createBlock)(r,{key:2,page:n.page},null,8,["page"])):(0,o.createCommentVNode)("",!0),a.image&&e.scale?((0,o.openBlock)(),(0,o.createBlock)(C,{key:3,ref:"stage",config:s.scaledViewport,style:(0,o.normalizeStyle)(s.canvasStyle),onMousedown:s.onMouseDown,onMouseup:s.onMouseUp,onMousemove:s.onMouseMove},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(u,null,{default:(0,o.withCtx)((()=>[(0,o.createVNode)(c,{config:{image:a.image,width:s.scaledViewport.width,height:s.scaledViewport.height,listening:!1}},null,8,["config"]),s.pageInVisibleRange&&!e.editMode?((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,{key:0},[s.searchResults.length>0?((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,{key:0},(0,o.renderList)(s.searchResults,((e,t)=>((0,o.openBlock)(),(0,o.createBlock)(d,{key:"sr"+t,config:{...s.selectionTextRect(e,e===s.currentSearchResultForPage)}},null,8,["config"])))),128)):(0,o.createCommentVNode)("",!0),e.categorizeModalIsActive&&e.publicView&&e.isDocumentReviewed?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(h,{key:1,ref:"entities"},{default:(0,o.withCtx)((()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.scaledEntities(n.page.entities,n.page),((e,t)=>((0,o.openBlock)(),(0,o.createBlock)(d,{key:t,config:s.entityRect(e),onClick:t=>s.handleClickedEntity(e),onMouseenter:s.onElementEnter,onMouseleave:s.onElementLeave},null,8,["config","onClick","onMouseenter","onMouseleave"])))),128))])),_:1},512)),((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(s.pageAnnotations,(t=>((0,o.openBlock)(),(0,o.createElementBlock)(o.Fragment,null,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(t.span.filter((e=>e.page_index+1==n.page.number)),((n,i)=>((0,o.openBlock)(),(0,o.createBlock)(h,null,{default:(0,o.withCtx)((()=>[e.isAnnotationInEditMode(t.id)?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(d,{key:0,config:s.annotationRect(n,t.id),onClick:e=>s.handleFocusedAnnotation(t),onMouseenter:e=>s.onElementEnter(t,n),onMouseleave:s.onElementLeave},null,8,["config","onClick","onMouseenter","onMouseleave"]))])),_:2},1024)))),256)),t.metadata&&t.metadata.checkbox?((0,o.openBlock)(),(0,o.createBlock)(h,{key:0},{default:(0,o.withCtx)((()=>[e.isAnnotationInEditMode(t.id)?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(d,{key:0,config:s.annotationRect(t.metadata.checkbox.bbox,t.id),onClick:e=>s.handleFocusedAnnotation(t),onMouseenter:e=>s.onElementEnter(t,t.metadata.checkbox.bbox),onMouseleave:s.onElementLeave},null,8,["config","onClick","onMouseenter","onMouseleave"]))])),_:2},1024)):(0,o.createCommentVNode)("",!0)],64)))),256))],64)):(0,o.createCommentVNode)("",!0)])),_:1}),(0,o.createVNode)(u,null,{default:(0,o.withCtx)((()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.spanSelectionsForPage(n.page),((e,t)=>((0,o.openBlock)(),(0,o.createBlock)(m,{key:t,id:t,span:e,page:n.page},null,8,["id","span","page"])))),128)),((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.placeholderSelectionForPage(n.page),((e,t)=>((0,o.openBlock)(),(0,o.createBlock)(p,{key:`${t}_placeholder`,span:e,page:n.page},null,8,["span","page"])))),128)),n.page.number===s.selectionPage?((0,o.openBlock)(),(0,o.createBlock)(g,{key:0,page:n.page},null,8,["page"])):(0,o.createCommentVNode)("",!0)])),_:1})])),_:1},8,["config","style","onMousedown","onMouseup","onMousemove"])):((0,o.openBlock)(),(0,o.createBlock)(_,{key:4,position:"is-centered",width:s.scaledViewport.width,height:s.scaledViewport.height},null,8,["width","height"]))],2)}const Mt=window.devicePixelRatio||1,It=.98,Ot=600,Pt=950,$t=1800;function Rt(e,t,n,i,a,s){const l=(0,o.resolveComponent)("v-rect"),r=(0,o.resolveComponent)("v-transformer"),c=(0,o.resolveComponent)("v-group");return(0,o.openBlock)(),(0,o.createBlock)(c,null,{default:(0,o.withCtx)((()=>[e.isSelectionValid?((0,o.openBlock)(),(0,o.createBlock)(l,{key:0,ref:"boxSelection",config:s.config,"stroke-scale-enabled":!1,onDragend:s.onChange,onTransformend:s.onChange},null,8,["config","onDragend","onTransformend"])):(0,o.createCommentVNode)("",!0),n.editable?((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,ref:"boxTransformer",config:s.transformerConfig},null,8,["config"])):(0,o.createCommentVNode)("",!0)])),_:1})}const Ft={props:{page:{required:!0,type:Object},editable:{required:!1,type:Boolean,default:!0}},computed:{config(){return{x:this.selection.start.x,y:this.selection.start.y,width:this.selection.end.x-this.selection.start.x,height:this.selection.end.y-this.selection.start.y,fill:this.isSelecting?"#7B61FFB3":"transparent",stroke:this.isSelecting?"transparent":"#7B61FFB3",strokeWidth:1,globalCompositeOperation:"multiply",shadowForStrokeEnabled:!1,name:"boxSelection",draggable:!0}},transformerConfig(){return{borderEnabled:!1,rotateEnabled:!1,ignoreStroke:!0,keepRatio:!1,anchorStroke:"#7B61FF",anchorSize:6}},...(0,s.aH)("selection",["selection","isSelecting","elementSelected","spanSelection"]),...(0,s.aH)("document",["editAnnotation"]),...(0,s.L8)("display",["clientToBbox","scaledEntities"]),...(0,s.L8)("selection",["isSelectionValid","entitiesOnSelection"])},watch:{isSelecting(e){e||(this.updateTransformer(),this.handleSelection())}},mounted(){this.selection.custom||this.updateTransformer()},methods:{handleSelection(){const e=this.clientToBbox(this.page,this.selection.start,this.selection.end);this.$store.dispatch("selection/entitySelection",{entities:this.scaledEntities(this.entitiesOnSelection(e,this.page),this.page),selection:e})},updateTransformer(){const e=this.$refs.boxTransformer;if(!e)return;const t=e.getNode(),n=t.getStage();let o;n&&(o=n.findOne(".boxSelection")),o!==t.node()&&(o?t.nodes([o]):t.nodes([]),t.getLayer().batchDraw())},onChange(e){const{x:t,y:n,scaleX:o,scaleY:i,skewX:a,width:s,height:l}=e.target.attrs,r=s*o,c=l*i;let d,h;a>=0?(d={x:t,y:n},h={x:d.x+r,y:d.y+c}):(h={x:t,y:n},d={x:h.x-r,y:h.y-c}),this.moveSelection({start:d,end:h});const u=this.$refs.boxSelection.getNode();u.skewX(0),u.skewY(0),u.rotation(0),u.scaleX(1),u.scaleY(1),this.handleSelection()},...(0,s.i0)("selection",["moveSelection"])}},Ht=(0,$.A)(Ft,[["render",Rt]]),zt=Ht;function Ut(e,t,n,i,a,s){const l=(0,o.resolveComponent)("v-rect"),r=(0,o.resolveComponent)("v-transformer"),c=(0,o.resolveComponent)("v-group");return(0,o.openBlock)(),(0,o.createBlock)(c,null,{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{ref:"spanSelection",config:s.config,"stroke-scale-enabled":!1,onDragend:s.onChange,onTransformend:s.onChange},null,8,["config","onDragend","onTransformend"]),e.isSelectionValid?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(r,{key:0,ref:"spanTransformer",config:s.transformerConfig},null,8,["config"]))])),_:1})}const Zt={props:{id:{required:!0,type:Number},page:{required:!0,type:Object},span:{required:!0,type:Object}},data(){return{selection:{start:null,end:null},box:{x:0,y:0,width:0,height:0}}},computed:{config(){const e=window.getComputedStyle(document.body).getPropertyValue("--primary-color");return{x:this.box.x,y:this.box.y,width:this.box.width,height:this.box.height,stroke:"#7B61FFB3",fill:`${e}77`,strokeWidth:1,globalCompositeOperation:"multiply",shadowForStrokeEnabled:!1,perfectDrawEnabled:!1,name:`spanSelection_${this.id}`,draggable:!0}},transformerConfig(){return{borderEnabled:!1,rotateEnabled:!1,ignoreStroke:!0,keepRatio:!1,anchorStroke:"#7B61FF",anchorSize:6,name:`spanTransformer_${this.id}`}},...(0,s.aH)("document",["editAnnotation"]),...(0,s.L8)("display",["clientToBbox","bboxToRect","scaledEntities"]),...(0,s.L8)("selection",["entitiesOnSelection","isSelectionValid"])},watch:{box(){this.updateTransformer(),this.setSelection()},span(){this.box=this.bboxToRect(this.page,this.span)}},mounted(){this.box=this.bboxToRect(this.page,this.span),this.setSelection(),this.$nextTick((()=>{this.updateTransformer()}))},methods:{setSelection(){this.selection={start:{x:this.box.x,y:this.box.y},end:{x:this.box.x+this.box.width,y:this.box.y+this.box.height}}},startSelection(e){this.selection.start=e},moveSelection(e){if(this.selection){const t=Math.abs(this.selection.start.x-e.end.x),n=Math.abs(this.selection.start.y-e.end.y);if(t>5&&n>5){const{start:t,end:n}=e;t&&(this.selection.start=t),n&&(this.selection.end=n)}}},endSelection(e){let t,n;e&&(t=Math.abs(this.selection.start.x-e.x),n=Math.abs(this.selection.start.y-e.y)),!e||n<=5&&t<=5||this.selection.start.x===e.x&&this.selection.start.y==e.y?(this.selection.start=null,this.selection.end=null):(this.selection.start.x=this.selection.start.x-selectionPadding,this.selection.start.y=this.selection.start.y-selectionPadding,e.x=e.x+selectionPadding,e.y=e.y+selectionPadding,this.selection.end=e)},handleSelection(){this.box={x:this.selection.start.x,y:this.selection.start.y,width:this.selection.end.x-this.selection.start.x,height:this.selection.end.y-this.selection.start.y};const e=this.clientToBbox(this.page,this.selection.start,this.selection.end);this.$store.dispatch("selection/entitySelection",{entities:this.scaledEntities(this.entitiesOnSelection(e,this.page),this.page),selection:e})},updateTransformer(){const e=this.$refs.spanTransformer;if(!e)return;const t=e.getNode(),n=t.getStage();let o;n&&(o=n.findOne(`.spanSelection_${this.id}`)),o!==t.node()&&(o?t.nodes([o]):t.nodes([]),t.getLayer().batchDraw())},onChange(e){const{x:t,y:n,scaleX:o,scaleY:i,skewX:a,width:s,height:l}=e.target.attrs,r=s*o,c=l*i;let d,h;a>=0?(d={x:t,y:n},h={x:d.x+r,y:d.y+c}):(h={x:t,y:n},d={x:h.x-r,y:h.y-c}),this.moveSelection({start:d,end:h});const u=this.$refs.spanSelection.getNode();u.skewX(0),u.skewY(0),u.rotation(0),u.scaleX(1),u.scaleY(1),this.handleSelection()}}},Gt=(0,$.A)(Zt,[["render",Ut]]),Wt=Gt;function qt(e,t,n,i,a,s){const l=(0,o.resolveComponent)("v-rect"),r=(0,o.resolveComponent)("v-group");return(0,o.openBlock)(),(0,o.createBlock)(r,null,{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{ref:"placeholderSelection",config:s.placeholderConfig},null,8,["config"])])),_:1})}const jt={props:{span:{required:!0,type:Object},page:{required:!0,type:Object}},data(){return{selection:{start:null,end:null}}},computed:{placeholderConfig(){const e=this.bboxToRect(this.page,this.span),t=window.getComputedStyle(document.body).getPropertyValue("--primary-color");return{x:e.x,y:e.y,width:e.width,height:e.height,fill:"transparent",stroke:t,strokeWidth:3,globalCompositeOperation:"multiply",shadowForStrokeEnabled:!1,name:"placeholderSelection",draggable:!1}},...(0,s.L8)("display",["bboxToRect"])}},Kt=(0,$.A)(jt,[["render",qt]]),Yt=Kt,Jt={key:0},Xt={key:0,class:"popup-input"},Qt={class:"input-text"},en={class:"caret-icon"},tn=["innerHTML"],nn={class:"input-text"},on={class:"caret-icon"},an={class:"annotation-buttons"};function sn(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-button"),c=(0,o.resolveComponent)("b-dropdown-item"),d=(0,o.resolveComponent)("b-dropdown"),h=(0,o.resolveComponent)("b-tooltip");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"annotation-popup",style:(0,o.normalizeStyle)({left:`${s.left}px`,top:`${s.top}px`,height:`${a.heightOfPopup}px`})},[e.editAnnotation?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Jt,[e.spanLoading?((0,o.openBlock)(),(0,o.createElementBlock)("div",Xt,[(0,o.createVNode)(l,{icon:"spinner",class:"fa-spin loading-icon-size spinner"})])):(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("input",{key:1,"onUpdate:modelValue":t[0]||(t[0]=e=>s.textFromEntities=e),class:"popup-input",type:"text",disabled:!0},null,512)),[[o.vModelText,s.textFromEntities]])])),(0,o.createVNode)(d,{modelValue:a.selectedSet,"onUpdate:modelValue":t[1]||(t[1]=e=>a.selectedSet=e),disabled:!s.textFromEntities,"aria-role":"list",class:(0,o.normalizeClass)(["annotation-dropdown","no-padding-bottom","no-padding-top","dropdown-full-width",0===a.setsList.length?"no-padding-top":""]),scrollable:""},{trigger:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{class:(0,o.normalizeClass)(["popup-input",a.selectedSet?"":"not-selected","has-right-icon"]),type:"is-text"},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",Qt,(0,o.toDisplayString)(a.selectedSet?`${a.selectedSet.label_set.name} ${a.selectedSet.id?e.numberOfAnnotationSetGroup(a.selectedSet):`${e.numberOfLabelSetGroup(a.selectedSet.label_set)} (${e.$t("new")})`}`:e.$t("select_annotation_set")),1),(0,o.createElementVNode)("span",en,[(0,o.createVNode)(l,{icon:"angle-down",size:"is-small",class:"caret"})])])),_:1},8,["class"])])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{type:"is-ghost",class:(0,o.normalizeClass)(["add-ann-set","dropdown-item","no-icon-margin"]),"icon-left":"plus",onClick:s.openAnnotationSetCreation},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("new_ann_set_title")),1)])),_:1},8,["onClick"]),((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(a.setsList,((t,n)=>((0,o.openBlock)(),(0,o.createBlock)(c,{key:`${t.label_set.id}_${n}`,"aria-role":"listitem",value:t},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(`${t.label_set.name} ${t.id?e.numberOfAnnotationSetGroup(t):`${e.numberOfLabelSetGroup(t.label_set)} (${e.$t("new")})`}`),1)])),_:2},1032,["value"])))),128))])),_:1},8,["modelValue","disabled","class"]),(0,o.createVNode)(h,{multilined:"",active:a.selectedSet&&(!a.labels||0===a.labels.length),size:"is-large",position:"is-bottom",class:"bottom-aligned"},{content:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",{innerHTML:`${e.$t("no_labels_available")} ${e.showBranding?e.$t("no_labels_available_link"):""}`},null,8,tn)])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(d,{modelValue:a.selectedLabel,"onUpdate:modelValue":t[2]||(t[2]=e=>a.selectedLabel=e),"aria-role":"list",disabled:!s.textFromEntities||!a.labels||0===a.labels.length,scrollable:"",class:"label-dropdown annotation-dropdown dropdown-full-width"},{trigger:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{class:(0,o.normalizeClass)(["popup-input",a.selectedLabel?"":"not-selected","has-right-icon"]),type:"is-text"},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",nn,(0,o.toDisplayString)(a.selectedLabel?a.selectedLabel.name:a.labels&&0===a.labels.length?e.$t("no_labels_to_choose"):e.$t("select_label")),1),(0,o.createElementVNode)("span",on,[(0,o.createVNode)(l,{icon:"angle-down",size:"is-small",class:"caret"})])])),_:1},8,["class"])])),default:(0,o.withCtx)((()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(a.labels,(e=>((0,o.openBlock)(),(0,o.createBlock)(c,{key:e.id,"aria-role":"listitem",value:e},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.name),1)])),_:2},1032,["value"])))),128))])),_:1},8,["modelValue","disabled"])])),_:1},8,["active"]),(0,o.createElementVNode)("div",an,[(0,o.createVNode)(r,{type:"is-text",class:"cancel-button popup-button primary-button",label:e.$t("cancel"),disabled:a.loading,onClick:(0,o.withModifiers)(s.close,["prevent"])},null,8,["label","disabled","onClick"]),(0,o.createVNode)(r,{type:"is-primary",class:"popup-button primary-button",label:e.$t("save"),disabled:a.loading||!e.spanSelection||!a.selectedLabel,onClick:(0,o.withModifiers)(s.save,["prevent"])},null,8,["label","disabled","onClick"])])],4)}const ln={props:{spans:{required:!0,type:Array},containerWidth:{type:Number,required:!0},containerHeight:{type:Number,required:!0},page:{required:!0,type:Object}},data(){return{heightOfPopup:192,margin:12,widthOfPopup:205,selectedLabel:null,selectedSet:null,labels:null,loading:!1,isAnnSetModalShowing:!1,setsList:[]}},computed:{...(0,s.aH)("document",["annotationSets","documentId","editAnnotation"]),...(0,s.L8)("document",["numberOfAnnotationSetGroup","numberOfLabelSetGroup","labelsFilteredForAnnotationCreation"]),...(0,s.aH)("display",["showBranding"]),...(0,s.L8)("display",["clientToBbox","bboxToRect"]),...(0,s.aH)("selection",["spanSelection","selection","spanLoading"]),top(){if(this.selection&&this.selection.end){const e=this.selection.end.y+this.margin;return e+this.heightOfPopup<this.containerHeight?e:this.selection.end.y-this.heightOfPopup}{const e=this.bboxToRect(this.page,this.spans[0]),t=e.y-this.heightOfPopup;return e.y>this.heightOfPopup?t:e.y+e.height+this.margin}},left(){if(this.selection&&this.selection.start&&this.selection.end){const e=this.selection.start.x;return e+this.widthOfPopup<this.containerWidth?e:this.containerWidth-this.widthOfPopup}{const e=this.bboxToRect(this.page,this.spans[0]),t=e.x+e.width/2-this.widthOfPopup/2;return t+this.widthOfPopup>this.containerWidth?this.containerWidth-this.widthOfPopup:t>0?t:0}},textFromEntities(){let e="";return this.spans.forEach((t=>{e=`${e} ${t.offset_string}`})),e.trim()}},watch:{selectedSet(e,t){this.selectedLabel=null,this.labels=this.labelsFilteredForAnnotationCreation(e),null===t&&this.editAnnotation?this.selectedLabel=this.editAnnotation.label:this.labels.length>0&&(this.selectedLabel=this.labels[0])}},mounted(){this.setsList=this.orderedSetList([...this.annotationSets]),this.editAnnotation?(this.heightOfPopup=142,this.selectedSet=this.editAnnotation.annotationSet):1===this.setsList.length&&(this.selectedSet=this.setsList[0]),setTimeout((()=>{document.body.addEventListener("click",this.clickOutside)}),200)},unmounted(){document.body.removeEventListener("click",this.clickOutside)},methods:{orderedSetList(e){return e.sort(((e,t)=>{const n=e.label_set.name,o=t.label_set.name;return n<o?-1:n>o?1:0})),e},close(){this.editAnnotation&&this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"),this.$emit("close")},save(){if(this.editAnnotation)return this.loading=!0,this.$store.dispatch("document/setEditAnnotation",{id:this.editAnnotation.id,index:this.editAnnotation.index,label:this.selectedLabel,labelSet:this.selectedSet.label_set,annotationSet:this.selectedSet,pageNumber:this.editAnnotation.pageNumber}),void document.getElementById("save-ann").click();{this.loading=!0;let e=null;this.selection&&this.selection.start&&this.selection.end&&(e=this.clientToBbox(this.page,this.selection.start,this.selection.end));const t={document:this.documentId,span:this.spans,label:this.selectedLabel.id,is_correct:!0,revised:!1};e&&(t.selection_bbox=e),this.selectedSet.id?t.annotation_set=this.selectedSet.id:t.label_set=this.selectedSet.label_set.id,this.$store.dispatch("document/createAnnotation",{annotation:t}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("error_creating_annotation")})})).finally((()=>{this.close(),this.loading=!1}))}},chooseLabelSet(e){const t=this.setsList.findIndex((t=>null===t.id&&t.label_set.id===e.id)),n={label_set:e,labels:e.labels,id:null};t>=0?this.setsList[t]=n:this.setsList.unshift(n),this.selectedSet=n},openAnnotationSetCreation(){this.$store.dispatch("display/showChooseLabelSetModal",{show:!0,finish:this.chooseLabelSet})}}},rn=(0,$.A)(ln,[["render",sn],["__scopeId","data-v-60c53a7e"]]),cn=rn,dn={class:"ann-set-label-set-name"};function hn(e,t,n,i,a,s){const l=(0,o.resolveComponent)("SettingsIcon"),r=(0,o.resolveComponent)("b-dropdown-item"),c=(0,o.resolveComponent)("b-dropdown");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"ann-set-table-header",style:(0,o.normalizeStyle)({left:`${s.coordinates.x}px`,top:`${s.coordinates.y}px`})},[(0,o.createVNode)(c,{"aria-role":"list",class:"ann-set-table-header-dropdown",position:"is-top-right",scrollable:""},{trigger:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",dn,(0,o.toDisplayString)(s.labelSetName),1),(0,o.createVNode)(l)])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{"aria-role":"listitem",class:"delete-action",onClick:t[0]||(t[0]=e=>s.handleDelete())},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("delete_table")),1)])),_:1})])),_:1})],4)}const un={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function mn(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",un,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M13.361 8.4396C13.2541 8.31795 13.1952 8.16154 13.1952 7.9996C13.1952 7.83767 13.2541 7.68126 13.361 7.55961L14.2143 6.5996C14.3084 6.49472 14.3668 6.36274 14.3811 6.22261C14.3955 6.08248 14.3651 5.9414 14.2943 5.8196L12.961 3.51294C12.8909 3.39129 12.7843 3.29486 12.6562 3.2374C12.5281 3.17993 12.3851 3.16438 12.2477 3.19294L10.9943 3.44627C10.8349 3.47922 10.6688 3.45266 10.5276 3.3716C10.3864 3.29055 10.2797 3.16059 10.2277 3.00627L9.821 1.78627C9.77627 1.65386 9.69107 1.53885 9.57742 1.4575C9.46377 1.37615 9.32743 1.33258 9.18766 1.33294H6.521C6.37562 1.32535 6.23175 1.36556 6.11138 1.44741C5.991 1.52927 5.90072 1.64828 5.85433 1.78627L5.481 3.00627C5.429 3.16059 5.32231 3.29055 5.18107 3.3716C5.03983 3.45266 4.87381 3.47922 4.71433 3.44627L3.42767 3.19294C3.29737 3.17453 3.16453 3.19509 3.0459 3.25203C2.92726 3.30898 2.82813 3.39976 2.761 3.51294L1.42767 5.8196C1.35511 5.94004 1.32248 6.08033 1.33445 6.22042C1.34643 6.36051 1.40239 6.49323 1.49433 6.5996L2.341 7.55961C2.44788 7.68126 2.50682 7.83767 2.50682 7.9996C2.50682 8.16154 2.44788 8.31795 2.341 8.4396L1.49433 9.39961C1.40239 9.50598 1.34643 9.6387 1.33445 9.77879C1.32248 9.91888 1.35511 10.0592 1.42767 10.1796L2.761 12.4863C2.83106 12.6079 2.93774 12.7044 3.06583 12.7618C3.19392 12.8193 3.33688 12.8348 3.47433 12.8063L4.72766 12.5529C4.88714 12.52 5.05317 12.5465 5.19441 12.6276C5.33565 12.7087 5.44233 12.8386 5.49433 12.9929L5.901 14.2129C5.94738 14.3509 6.03766 14.4699 6.15804 14.5518C6.27842 14.6337 6.42229 14.6739 6.56766 14.6663H9.23433C9.37409 14.6666 9.51044 14.6231 9.62408 14.5417C9.73773 14.4604 9.82294 14.3454 9.86766 14.2129L10.2743 12.9929C10.3263 12.8386 10.433 12.7087 10.5743 12.6276C10.7155 12.5465 10.8815 12.52 11.041 12.5529L12.2943 12.8063C12.4318 12.8348 12.5747 12.8193 12.7028 12.7618C12.8309 12.7044 12.9376 12.6079 13.0077 12.4863L14.341 10.1796C14.4118 10.0578 14.4422 9.91673 14.4278 9.7766C14.4134 9.63647 14.355 9.50449 14.261 9.39961L13.361 8.4396ZM12.3677 9.33294L12.901 9.93294L12.0477 11.4129L11.261 11.2529C10.7809 11.1548 10.2814 11.2364 9.85739 11.4821C9.43341 11.7279 9.11443 12.1208 8.961 12.5863L8.70767 13.3329H7.001L6.761 12.5729C6.60757 12.1075 6.28859 11.7146 5.8646 11.4688C5.44062 11.223 4.94115 11.1415 4.461 11.2396L3.67433 11.3996L2.80767 9.92627L3.341 9.32627C3.66897 8.95959 3.85029 8.48489 3.85029 7.99294C3.85029 7.50098 3.66897 7.02629 3.341 6.6596L2.80767 6.0596L3.661 4.59294L4.44767 4.75294C4.92781 4.85109 5.42728 4.76953 5.85127 4.52374C6.27525 4.27795 6.59423 3.88504 6.74766 3.4196L7.001 2.66627H8.70767L8.961 3.42627C9.11443 3.89171 9.43341 4.28462 9.85739 4.5304C10.2814 4.77619 10.7809 4.85775 11.261 4.7596L12.0477 4.5996L12.901 6.0796L12.3677 6.67961C12.0434 7.04545 11.8643 7.51739 11.8643 8.00627C11.8643 8.49515 12.0434 8.9671 12.3677 9.33294ZM7.85433 5.33294C7.32691 5.33294 6.81134 5.48934 6.37281 5.78235C5.93428 6.07537 5.59249 6.49185 5.39065 6.97912C5.18882 7.46638 5.13601 8.00256 5.2389 8.51985C5.3418 9.03713 5.59577 9.51228 5.96871 9.88522C6.34165 10.2582 6.81681 10.5121 7.33409 10.615C7.85137 10.7179 8.38755 10.6651 8.87482 10.4633C9.36209 10.2615 9.77857 9.91966 10.0716 9.48113C10.3646 9.04259 10.521 8.52702 10.521 7.9996C10.521 7.29236 10.24 6.61408 9.73995 6.11399C9.23985 5.61389 8.56158 5.33294 7.85433 5.33294ZM7.85433 9.33294C7.59062 9.33294 7.33284 9.25474 7.11357 9.10823C6.89431 8.96172 6.72341 8.75348 6.62249 8.50985C6.52158 8.26621 6.49517 7.99813 6.54662 7.73948C6.59807 7.48084 6.72505 7.24327 6.91152 7.0568C7.09799 6.87033 7.33557 6.74334 7.59421 6.69189C7.85285 6.64044 8.12094 6.66685 8.36458 6.76777C8.60821 6.86868 8.81645 7.03958 8.96296 7.25884C9.10947 7.47811 9.18766 7.7359 9.18766 7.9996C9.18766 8.35323 9.04719 8.69237 8.79714 8.94241C8.54709 9.19246 8.20795 9.33294 7.85433 9.33294Z",fill:"white"},null,-1)]))}const pn={},gn=(0,$.A)(pn,[["render",mn]]),Cn=gn,_n={name:"AnnSetTableOptions",components:{SettingsIcon:Cn},props:{page:{type:Object,required:!0}},computed:{...(0,s.L8)("document",["annotationSetsInTable","annotationsInAnnotationsSets"]),...(0,s.L8)("display",["bboxToPoint"]),...(0,s.aH)("display",["showAnnSetTable"]),labelSetName(){return this.showAnnSetTable[0].label_set.name},coordinates(){let e=0,t=0;const n=40;return this.showAnnSetTable.forEach((o=>{o.labels&&o.labels.forEach((o=>{o.annotations.forEach((o=>{o.span.forEach((o=>{const{x:i,y:a}=this.bboxToPoint(this.page,{x:o.x0,y:o.y0});(0===e||i<e)&&(e=i),(0===t||a<t)&&(t=a-n)}))}))}))})),{x:e,y:t}}},methods:{handleDelete(){const e=this.annotationsInAnnotationsSets(this.showAnnSetTable);for(let t=0;t<e.length;t++){const n=e[t];this.$store.dispatch("document/deleteAnnotation",{annotationId:n.id,annotationSet:null}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})}))}this.$store.dispatch("display/showAnnSetTable",null)}}},bn=(0,$.A)(_n,[["render",hn],["__scopeId","data-v-0f7fbff8"]]),En=bn,Sn={name:"DocumentPage",components:{BoxSelection:zt,SpanSelection:Wt,PlaceholderSelection:Yt,AnnotationPopup:cn,AnnSetTableOptions:En},props:{page:{type:Object,required:!0},imageBlob:{type:Blob,required:!1,default:null}},data(){return{image:null}},computed:{...(0,s.aH)("selection",["selectedEntities","spanSelection","isSelecting"]),...(0,s.aH)("display",["scale","categorizeModalIsActive","searchEnabled","currentPage","showAnnSetTable"]),...(0,s.aH)("document",["documentAnnotationSelected","recalculatingAnnotations","selectedDocument","publicView","annotationId"]),...(0,s.aH)("edit",["editMode"]),...(0,s.L8)("display",["visiblePageRange","bboxToRect","scaledEntities"]),...(0,s.L8)("selection",["isSelectionValid","spanSelectionsForPage","placeholderSelectionForPage"]),...(0,s.L8)("document",["getAnnotationsFiltered","isAnnotationInEditMode","isDocumentReadyToBeReviewed","isDocumentReviewed","labelOfAnnotation"]),selectionPage(){return this.selection&&this.selection.pageNumber},showFocusedAnnotation(){return this.documentAnnotationSelected&&this.documentAnnotationSelected.page===this.page.number&&this.visiblePageRange.includes(this.documentAnnotationSelected.page)&&!this.isAnnotationInEditMode(this.documentAnnotationSelected.id)},actualSizeViewport(){return{width:this.page.size[0]*this.scale,height:this.page.size[1]*this.scale}},scaledViewport(){const{width:e,height:t}=this.actualSizeViewport,[n,o]=[e,t].map((e=>e/Mt));return{width:n,height:o}},canvasStyle(){const{width:e,height:t}=this.scaledViewport;return`width: ${e}px; height: ${t}px;`},pageInVisibleRange(){return this.visiblePageRange.includes(this.page.number)},pageAnnotations(){const e=[];return this.getAnnotationsFiltered.annotations&&this.getAnnotationsFiltered.annotations.map((t=>{t.span.find((e=>e.page_index+1===this.page.number))&&e.push(t)})),e},selection(){return this.$store.getters["selection/getSelectionForPage"](this.page.number)},searchResults(){const e=this.$store.getters["display/searchResultsForPage"](this.page.number);return e},currentSearchResultForPage(){return this.$store.getters["display/currentSearchResultForPage"](this.page.number)},showAnnotationLabel(){return this.showFocusedAnnotation&&!this.isSelecting&&this.documentAnnotationSelected&&""!==this.documentAnnotationSelected.labelName?this.documentAnnotationSelected:null}},watch:{recalculatingAnnotations(e){e||this.drawPage(!0)},scale(){this.closePopups()},page(e,t){e.image_url!==t.image_url&&this.drawPage(!0)},searchEnabled(e){e&&this.closePopups()}},mounted(){this.selectedDocument&&1===this.selectedDocument.labeling_available&&this.drawPage()},methods:{...(0,s.i0)("selection",["startSelection","endSelection","moveSelection"]),isAnnotationFocused(e){return this.documentAnnotationSelected&&e===this.documentAnnotationSelected.id},onMouseDown(e){if(this.categorizeModalIsActive||this.editMode||this.publicView||this.isDocumentReviewed)return;if(e.target.getParent()&&"Transformer"===e.target.getParent().className&&!e.target.name().includes("anchor"))return void this.closePopups();if("entity"===e.target.name()||"annotation"===e.target.name()||"multiAnnBoxSelection"===e.target.name()||"multiAnnBoxTransformer"===e.target.name()||"multiAnnButton"===e.target.name()||"boxSelection"===e.target.name()||"boxTransformer"===e.target.name()||e.target.name().includes("spanSelection")||e.target.name().includes("spanTransformer")||e.target.name().includes("anchor"))return;const t=this.$refs.stage.getStage().getPointerPosition();this.startSelection({pageNumber:this.page.number,start:{x:t.x,y:t.y}})},onMouseMove(){if(!this.isSelecting)return;const e=this.$refs.stage.getStage().getPointerPosition();this.moveSelection({end:{x:e.x,y:e.y}})},onMouseUp(){if(!this.isSelecting)return;const e=this.$refs.stage.getStage().getPointerPosition();this.endSelection({x:e.x,y:e.y})},handleFocusedAnnotation(e){this.$store.dispatch("document/setAnnotationId",e.id),this.closePopups()},handleClickedEntity(e){this.$store.dispatch("selection/entityClick",e)},onElementEnter(e=null,t=null){if(this.categorizeModalIsActive||this.publicView||this.editMode||this.isDocumentReviewed||(this.$refs.stage.$el.style.cursor="pointer"),e){const n=this.labelOfAnnotation(e);n&&this.$store.dispatch("document/setDocumentAnnotationSelected",{annotation:e,label:n,span:t,scrollTo:!1})}},onElementLeave(){this.$refs.stage.$el.style.cursor="inherit",this.$store.dispatch("document/disableDocumentAnnotationSelected")},drawPage(e=!1){if(this.image&&!e)return;const t=e=>{const t=new Image;t.src=URL.createObjectURL(e),t.onload=()=>{this.image=t}};this.imageBlob?t(this.imageBlob):Ae.makeFileRequest(`${this.page.image_url}?${this.selectedDocument.downloaded_at}`).then((e=>{t(e)})).catch((e=>{}))},selectionTextRect(e,t){return{fill:t?"orange":"greenyellow",stroke:t?"orange":"",globalCompositeOperation:"multiply",...this.bboxToRect(this.page,e)}},entityRect(e){return{stroke:"#ccc",strokeWidth:1,dash:[5,2],fill:"transparent",globalCompositeOperation:"multiply",transformsEnabled:"position",hitStrokeWidth:0,shadowForStrokeEnabled:!1,perfectDrawEnabled:!1,name:"entity",...e.scaled}},annotationRect(e,t,n){const o=this.annotationId==t&&!this.searchEnabled,i=this.isAnnotationFocused(t);let a="yellow",s=0,l="";return o?(a="orange",s=1,l="black"):i&&(a="#67E9B7",s=1,l="black"),{fill:a,globalCompositeOperation:"multiply",strokeWidth:s,stroke:l,name:"annotation",draggable:n,...this.bboxToRect(this.page,e)}},getAnnotationLabelPosition(e){if(e&&this.$refs.stage){const t=10,n=50,o=this.bboxToRect(this.page,e.span);return e.labelName.length>t&&o.y<n?`left: ${o.x}px; top: ${o.y+o.height}px`:`left: ${o.x}px; bottom: ${this.$refs.stage.$el.clientHeight-o.y}px`}return""},closePopups(){this.$store.dispatch("selection/entitySelection",{entities:[],selection:null})}}},fn=(0,$.A)(Sn,[["render",xt],["__scopeId","data-v-6c500392"]]),vn=fn;function An(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{style:(0,o.normalizeStyle)(s.canvasStyle)},[(0,o.createVNode)(l,{width:`${s.scaledViewport.width}px`,height:`${s.scaledViewport.height}px`},null,8,["width","height"])],4)}const kn={props:{width:{default:0,type:Number},height:{default:0,type:Number}},computed:{...(0,s.aH)("display",["scale"]),actualSizeViewport(){return{width:this.width*this.scale,height:this.height*this.scale}},scaledViewport(){const{width:e,height:t}=this.actualSizeViewport,[n,o]=[e,t].map((e=>Math.ceil(e/Mt)));return{width:n,height:o}},canvasStyle(){const{width:e,height:t}=this.scaledViewport;return`width: ${e}px; height: ${t}px; margin: 0 auto`}}},Nn=(0,$.A)(kn,[["render",An]]),wn=Nn,yn={id:"scrolling-document"},Tn={ref:"scrollingDocument",class:"scrolling-document"},Bn={key:0},Dn={key:1,class:"loading-page"};function Ln(e,t,n,i,a,s){const l=(0,o.resolveComponent)("SearchBar"),r=(0,o.resolveComponent)("ScrollingPage"),c=(0,o.resolveComponent)("b-skeleton"),d=(0,o.resolveComponent)("Toolbar");return(0,o.openBlock)(),(0,o.createElementBlock)("div",yn,[(0,o.createElementVNode)("div",Tn,[(0,o.createVNode)(o.Transition,{name:e.searchEnabled?"slide-down":"slide-up"},{default:(0,o.withCtx)((()=>[e.searchEnabled?((0,o.openBlock)(),(0,o.createBlock)(l,{key:0})):(0,o.createCommentVNode)("",!0)])),_:1},8,["name"]),e.selectedDocument&&e.scale&&!e.loading&&!e.recalculatingAnnotations?((0,o.openBlock)(),(0,o.createElementBlock)("div",Bn,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.editMode?e.pagesForPostprocess:s.pages,(e=>((0,o.openBlock)(),(0,o.createBlock)(r,{key:e.number,ref_for:!0,ref:"scrollingPage",page:e,"client-height":a.clientHeight,"scroll-top":a.scrollTop,class:"scrolling-page",onPageJump:s.onPageJump},null,8,["page","client-height","scroll-top","onPageJump"])))),128))])):((0,o.openBlock)(),(0,o.createElementBlock)("div",Dn,[(0,o.createVNode)(c,{width:"100%",height:"1000px"})]))],512),s.showToolbar?((0,o.openBlock)(),(0,o.createBlock)(d,{key:0})):(0,o.createCommentVNode)("",!0)])}function Vn(e,t){const n=t.value;t.modifiers.immediate&&n();const o=xn(n,300);e.addEventListener("scroll",o,!0)}function xn(e,t){var n=!1;return function(){n||(e.apply(this,arguments),n=!0,setTimeout((function(){n=!1}),t))}}const Mn={inserted:Vn};function In(e,t,n,i,a,s){const l=(0,o.resolveComponent)("DummyPage"),r=(0,o.resolveComponent)("DocumentPage"),c=(0,o.resolveDirective)("observe-visibility");return(0,o.withDirectives)(((0,o.openBlock)(),(0,o.createElementBlock)("div",null,[s.loadedPage?((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,page:s.loadedPage},null,8,["page"])):((0,o.openBlock)(),(0,o.createBlock)(l,{key:0,width:n.page.size[0],height:n.page.size[1]},null,8,["width","height"]))])),[[c,s.visibilityChanged]])}const On={name:"ScrollingPage",components:{DocumentPage:vn,DummyPage:wn},props:{page:{type:Object,required:!0},scrollTop:{type:Number,required:!0},clientHeight:{type:Number,required:!0}},data(){return{elementTop:0,elementHeight:0,previousFocusedAnnotation:null,previousY:null,pageBeingLoaded:!1,isScrolling:!1}},computed:{...(0,s.aH)("display",["pageChangedFromThumbnail","currentPage"]),...(0,s.aH)("document",["pages","documentAnnotationSelected","loading","annotationId"]),...(0,s.aH)("edit",["editMode"]),...(0,s.L8)("display",["visiblePageRange","bboxToRect"]),...(0,s.L8)("document",["scrollDocumentToAnnotation","annotationById"]),loadedPage(){if(this.editMode)return this.page;let e=null;return this.page&&this.pages&&(e=this.pages.find((e=>e.number===this.page.number))),!e&&this.pageInVisibleRange(this.page)&&(this.pageBeingLoaded||this.loadPage()),e},isElementFocused(){const{elementTop:e,bottom:t,elementHeight:n,scrollTop:o,clientHeight:i}=this;if(!n)return;const a=n/2,s=i/2,l=n>=s?s:a,r=o+l;return e<r&&t>=r},bottom(){return this.elementTop+this.elementHeight},scrollBottom(){return this.scrollTop+this.clientHeight},currentSearchResultForPage(){return this.$store.getters["display/currentSearchResultForPage"](this.page.number)},spanForAnnotationSelected(){if(this.annotationId){const e=this.annotationById(this.annotationId);if(e&&e.span&&e.span.length>0&&e.span[0].page_index+1===this.page.number)return e.span[0]}return null}},watch:{scrollTop:"updateElementBounds",clientHeight:"updateElementBounds",annotationId(){this.scrollDocumentToPosition(this.spanForAnnotationSelected)},scrollDocumentToAnnotation(e){e&&this.documentAnnotationSelected.page===this.page.number&&this.scrollDocumentToPosition(this.documentAnnotationSelected.span)},isElementFocused(e){this.loading||!e||this.pageChangedFromThumbnail||this.$store.dispatch("display/updateCurrentPage",this.page.number)},currentPage(e){this.page.number!==e||this.isElementFocused||this.$emit("page-jump",this.elementTop,0)},currentSearchResultForPage(e){if(!e)return;const t=this.getYForBbox(e),n=t+this.elementTop;n<this.scrollBottom&&n>this.scrollTop||this.$nextTick((function(){this.scrollTo(t)}))}},mounted(){this.updateElementBounds(),this.scrollDocumentToPosition(this.spanForAnnotationSelected)},methods:{loadPage(){this.pageBeingLoaded=!0,this.$store.dispatch("document/fetchDocumentPage",this.page.number).then((()=>{this.pageBeingLoaded=!1}))},visibilityChanged(e){!e||this.loadedPage||this.pageBeingLoaded||this.loadPage(),!e&&this.loadedPage&&this.$store.dispatch("document/unloadDocumentPage",this.page.number)},pageInVisibleRange(e){return this.currentPage===e.number||this.visiblePageRange.includes(e.number)},scrollDocumentToPosition(e){e&&this.$nextTick((()=>{this.scrollTo(this.getYForBbox(e)-100,this.getXForBbox(e))}))},updateElementBounds(){const{offsetTop:e,offsetHeight:t}=this.$el;this.elementTop=e,this.elementHeight=t},getYForBbox(e){return this.bboxToRect(this.page,e).y},getXForBbox(e){return this.bboxToRect(this.page,e).x},scrollTo(e,t){this.$emit("page-jump",this.elementTop+e-80,t)}}},Pn=(0,$.A)(On,[["render",In]]),$n=Pn,Rn={id:"toolbar-container"},Fn={class:"edit-icon icon"},Hn={class:"edit-text"},zn={key:0,class:"toolbar-divider"},Un={key:2,class:"download-file icons"},Zn={key:3,class:"toolbar-divider"},Gn={class:"icons icons-right"},Wn={id:"zoom-percentage",class:"percentage"};function qn(e,t,n,i,a,s){const l=(0,o.resolveComponent)("EditDocIcon"),r=(0,o.resolveComponent)("b-tooltip"),c=(0,o.resolveComponent)("b-icon"),d=(0,o.resolveComponent)("b-dropdown-item"),h=(0,o.resolveComponent)("b-dropdown"),u=(0,o.resolveComponent)("FitZoomIcon"),m=(0,o.resolveComponent)("PlusIcon"),p=(0,o.resolveComponent)("MinusIcon");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Rn,[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["toolbar",e.recalculatingAnnotations&&"hidden"])},[(0,o.createVNode)(r,{label:a.tooltipInfo,multilined:"",active:a.editModeDisabled,size:"is-large",class:"top-aligned"},{default:(0,o.withCtx)((()=>[e.isEditModeAvailable?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,id:"edit-mode-button",class:(0,o.normalizeClass)(["icons icons-left",a.editModeDisabled&&"edit-mode-disabled"]),onClick:t[0]||(t[0]=(...e)=>s.handleEdit&&s.handleEdit(...e))},[(0,o.createElementVNode)("div",Fn,[(0,o.createVNode)(l)]),(0,o.createElementVNode)("span",Hn,(0,o.toDisplayString)(e.$t("edit")),1)],2)):(0,o.createCommentVNode)("",!0)])),_:1},8,["label","active"]),e.isEditModeAvailable?((0,o.openBlock)(),(0,o.createElementBlock)("div",zn)):(0,o.createCommentVNode)("",!0),e.publicView||e.editMode?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:"search-document icons",onClick:t[1]||(t[1]=(...t)=>e.toggleSearch&&e.toggleSearch(...t))},[(0,o.createVNode)(c,{icon:"search",size:"is-small",class:"search-icon"})])),e.publicView?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Un,[(0,o.createVNode)(h,{"aria-role":"list",position:"is-top-right",scrollable:""},{trigger:(0,o.withCtx)((()=>[(0,o.createVNode)(c,{icon:"download",size:"is-small",class:"download-file"})])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(d,{class:"original-file","aria-role":"listitem",onClick:t[2]||(t[2]=e=>s.handleDownloadFile())},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("original_file")),1)])),_:1}),(0,o.createVNode)(d,{class:"ocr-file","aria-role":"listitem",onClick:t[3]||(t[3]=e=>s.handleDownloadFile("ocr"))},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("pdf_file")),1)])),_:1})])),_:1})])),e.publicView?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",Zn)),(0,o.createElementVNode)("div",Gn,[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["fit-zoom","icon",50===a.currentPercentage&&"zoom-disabled"]),onClick:t[4]||(t[4]=(0,o.withModifiers)(((...e)=>s.fitAuto&&s.fitAuto(...e)),["prevent","stop"]))},[(0,o.createVNode)(u)],2),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["zoom-in icon",s.isZoomInExceeding&&"zoom-disabled"]),onClick:t[5]||(t[5]=(0,o.withModifiers)(((...e)=>s.zoomIn&&s.zoomIn(...e)),["prevent","stop"]))},[(0,o.createVNode)(m)],2),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["zoom-out icon",s.isZoomOutExceeding&&"zoom-disabled"]),onClick:t[6]||(t[6]=(0,o.withModifiers)(((...e)=>s.zoomOut&&s.zoomOut(...e)),["prevent","stop"]))},[(0,o.createVNode)(p)],2),(0,o.createElementVNode)("div",Wn,(0,o.toDisplayString)(`${a.currentPercentage}%`),1)])],2)])}const jn={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Kn(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",jn,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M2.66683 9.99935C2.29864 9.99935 2.00016 9.70087 2.00016 9.33268C2.00016 8.96449 2.29864 8.66602 2.66683 8.66602H6.66683C7.03502 8.66602 7.3335 8.96449 7.3335 9.33268V13.3327C7.3335 13.7009 7.03502 13.9994 6.66683 13.9994C6.29864 13.9994 6.00016 13.7009 6.00016 13.3327V10.9422L2.47157 14.4708C2.21122 14.7311 1.78911 14.7311 1.52876 14.4708C1.26841 14.2104 1.26841 13.7883 1.52876 13.5279L5.05735 9.99935H2.66683Z"},null,-1),(0,o.createElementVNode)("path",{d:"M13.3334 6.00065C13.7016 6.00065 14.0001 6.29913 14.0001 6.66732C14.0001 7.03551 13.7016 7.33398 13.3334 7.33398L9.33341 7.33398C8.96522 7.33398 8.66675 7.03551 8.66675 6.66732L8.66675 2.66732C8.66675 2.29913 8.96523 2.00065 9.33342 2.00065C9.7016 2.00065 10.0001 2.29913 10.0001 2.66732L10.0001 5.05784L13.5287 1.52925C13.789 1.2689 14.2111 1.2689 14.4715 1.52925C14.7318 1.78959 14.7318 2.21171 14.4715 2.47205L10.9429 6.00065L13.3334 6.00065Z"},null,-1)]))}const Yn={},Jn=(0,$.A)(Yn,[["render",Kn]]),Xn=Jn,Qn={width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function eo(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Qn,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M5.49935 0.667969C5.13116 0.667969 4.83268 0.966447 4.83268 1.33464V5.33463H0.832682C0.464492 5.33463 0.166016 5.63311 0.166016 6.0013C0.166016 6.36949 0.464493 6.66797 0.832682 6.66797H4.83268V10.668C4.83268 11.0362 5.13116 11.3346 5.49935 11.3346C5.86754 11.3346 6.16602 11.0362 6.16602 10.668V6.66797H10.166C10.5342 6.66797 10.8327 6.36949 10.8327 6.0013C10.8327 5.63311 10.5342 5.33463 10.166 5.33463H6.16602V1.33464C6.16602 0.966446 5.86754 0.667969 5.49935 0.667969Z"},null,-1)]))}const to={},no=(0,$.A)(to,[["render",eo]]),oo=no,io={width:"11",height:"2",viewBox:"0 0 11 2",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ao(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",io,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M0.834635 1.66536C0.466446 1.66536 0.167969 1.36689 0.167969 0.998698C0.167969 0.630508 0.466445 0.332031 0.834635 0.332031H10.168C10.5362 0.332031 10.8346 0.630508 10.8346 0.998698C10.8346 1.36689 10.5362 1.66536 10.168 1.66536H0.834635Z"},null,-1)]))}const so={},lo=(0,$.A)(so,[["render",ao]]),ro=lo,co={xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",viewBox:"0 0 24 24"};function ho(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",co,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M20.71,16.71l-2.42-2.42a1,1,0,0,0-1.42,0l-3.58,3.58a1,1,0,0,0-.29.71V21a1,1,0,0,0,1,1h2.42a1,1,0,0,0,.71-.29l3.58-3.58A1,1,0,0,0,20.71,16.71ZM16,20H15V19l2.58-2.58,1,1Zm-6,0H6a1,1,0,0,1-1-1V5A1,1,0,0,1,6,4h5V7a3,3,0,0,0,3,3h3v1a1,1,0,0,0,2,0V9s0,0,0-.06a1.31,1.31,0,0,0-.06-.27l0-.09a1.07,1.07,0,0,0-.19-.28h0l-6-6h0a1.07,1.07,0,0,0-.28-.19.32.32,0,0,0-.09,0L12.06,2H6A3,3,0,0,0,3,5V19a3,3,0,0,0,3,3h4a1,1,0,0,0,0-2ZM13,5.41,15.59,8H14a1,1,0,0,1-1-1ZM8,14h6a1,1,0,0,0,0-2H8a1,1,0,0,0,0,2Zm0-4H9A1,1,0,0,0,9,8H8a1,1,0,0,0,0,2Zm2,6H8a1,1,0,0,0,0,2h2a1,1,0,0,0,0-2Z"},null,-1)]))}const uo={},mo=(0,$.A)(uo,[["render",ho]]),po=mo,go={name:"DocumentToolbar",components:{FitZoomIcon:Xn,PlusIcon:oo,MinusIcon:ro,EditDocIcon:po},data(){return{currentPercentage:100,fitWidthScale:1,maxPercentage:500,defaultPercentage:.25,fitPercentage:.5,toolbarModalOpen:!0,editModeDisabled:!1,tooltipInfo:null}},computed:{...(0,s.aH)("display",["scale"]),...(0,s.aH)("edit",["editMode"]),...(0,s.L8)("edit",["isEditModeAvailable"]),...(0,s.aH)("document",["selectedDocument","recalculatingAnnotations","publicView"]),...(0,s.L8)("document",["documentCannotBeEdited"]),isZoomInExceeding(){return this.currentPercentage===this.maxPercentage},isZoomOutExceeding(){return this.currentPercentage===100*this.defaultPercentage}},watch:{selectedDocument(e){this.documentCannotBeEdited(e)&&(this.editModeDisabled=!0)},scale(e){this.fitWidthScale>0?this.currentPercentage=Math.round(e/this.fitWidthScale*100):this.currentPercentage=Math.round(100*e)}},mounted(){this.selectedDocument&&this.documentCannotBeEdited(this.selectedDocument)&&(this.editModeDisabled=!0)},updated(){this.selectedDocument.is_reviewed?this.tooltipInfo=this.$t("document_reviewed"):this.tooltipInfo=this.$t("edit_not_available")},methods:{...(0,s.i0)("display",["toggleSearch"]),handleEdit(){this.editModeDisabled||(this.$store.dispatch("selection/disableSelection"),this.$store.dispatch("edit/enableEditMode"))},zoomIn(){this.currentPercentage!==this.maxPercentage&&(this.cancelAnnotationEditMode(),this.currentPercentage+=100*this.defaultPercentage,this.updateScale(this.scale+this.defaultPercentage))},zoomOut(){this.currentPercentage!==100*this.defaultPercentage&&(this.cancelAnnotationEditMode(),this.currentPercentage-=100*this.defaultPercentage,this.updateScale(this.scale-this.defaultPercentage))},fitAuto(){this.cancelAnnotationEditMode(),this.$store.dispatch("display/updateFit","all").then((()=>{this.$nextTick((()=>{this.fitWidthScale=this.scale,this.currentPercentage=100}))}))},updateScale(e){this.$store.dispatch("display/updateFit","custom").then((()=>{this.$store.dispatch("display/updateScale",{scale:e})}))},handleDownloadFile(e){let t,n=this.selectedDocument.data_file_name;return"ocr"===e?(t=this.selectedDocument.file_url,n=`${e}_${n}`):t=`/doc/show-original/${this.selectedDocument.id}/`,Ae.makeFileRequest(t).then((e=>{const t=URL.createObjectURL(e),o=document.createElement("a");o.href=t,o.setAttribute("download",n),o.click(),URL.revokeObjectURL(o.href)})).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("error_downloading_file")}),console.log(e)}))},cancelAnnotationEditMode(){this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection")}}},Co=(0,$.A)(go,[["render",qn],["__scopeId","data-v-0ef4bf7c"]]),_o=Co,bo={id:"document-search"},Eo={class:"search-container"},So=["placeholder"],fo={key:0,class:"search-loading"},vo={key:1,class:"search-no-results"},Ao={key:2,class:"search-navigation"},ko={key:0,class:"search-counters"},No={key:1,class:"search-counters"},wo={class:"search-close"};function yo(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-button");return(0,o.openBlock)(),(0,o.createElementBlock)("div",bo,[(0,o.createElementVNode)("div",Eo,[(0,o.withDirectives)((0,o.createElementVNode)("input",{ref:"searchInput","onUpdate:modelValue":t[0]||(t[0]=e=>a.search=e),placeholder:e.$t("search"),class:"search-input",onKeyup:t[1]||(t[1]=(0,o.withKeys)((e=>s.focusSearchResult(1)),["13"]))},null,40,So),[[o.vModelText,a.search]]),e.searchLoading?((0,o.openBlock)(),(0,o.createElementBlock)("div",fo,[(0,o.createVNode)(l,{icon:"spinner",class:"fa-spin loading-icon-size spinner"})])):0===e.searchResults.length&&a.search.length>=a.minSearchLength?((0,o.openBlock)(),(0,o.createElementBlock)("div",vo,(0,o.toDisplayString)(e.$t("no_results")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("div",Ao,[s.searchBelowMinimum?((0,o.openBlock)(),(0,o.createElementBlock)("span",ko,(0,o.toDisplayString)(e.$t("search_below_minimum")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("span",No,(0,o.toDisplayString)(s.currentCounter)+"/"+(0,o.toDisplayString)(e.searchResults.length),1)),s.searchBelowMinimum?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(r,{key:2,class:"is-ghost is-small next-search",disabled:!e.searchResults.length||e.searchResults.length<=1,onClick:t[2]||(t[2]=e=>s.focusSearchResult(1))},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"angle-down",class:"is-small"})])),_:1},8,["disabled"])),s.searchBelowMinimum?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createBlock)(r,{key:3,class:"is-ghost is-small previous-search",disabled:!e.searchResults.length||e.searchResults.length<=1,onClick:t[3]||(t[3]=e=>s.focusSearchResult(-1))},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"angle-up",class:"is-small"})])),_:1},8,["disabled"]))])),(0,o.createElementVNode)("div",wo,[(0,o.createVNode)(r,{class:"is-ghost is-small",onClick:s.closeSearch},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"xmark",class:"is-small"})])),_:1},8,["onClick"])])])])}const To={name:"SearchBar",data(){return{search:"",minSearchLength:3}},computed:{...(0,s.aH)("display",["currentSearchResult","currentSearch","searchEnabled","searchResults","searchLoading"]),searchBelowMinimum(){return this.search&&this.search.length>0&&this.search.length<this.minSearchLength},currentCounter(){return null!=this.currentSearchResult&&this.searchResults.length>0?this.currentSearchResult+1:0}},watch:{search(e){this.$store.dispatch("display/setCurrentSearch",e),e.length>=this.minSearchLength&&this.$store.dispatch("display/startSearchLoading"),this.$store.dispatch("display/debounceSearch",e)},currentSearch(e){this.search!==e&&(this.search=e)},searchEnabled(e){e&&this.$nextTick((()=>{this.$refs.searchInput.focus()}))}},mounted(){this.currentSearch!==this.search&&(this.search=this.currentSearch)},methods:{focusSearchResult(e){this.$store.dispatch("display/setCurrentSearchResult",e)},closeSearch(){this.$store.dispatch("display/resetSearch"),this.$store.dispatch("display/toggleSearch")}}},Bo=(0,$.A)(To,[["render",yo],["__scopeId","data-v-4a901e3d"]]),Do=Bo,Lo={components:{ScrollingPage:$n,Toolbar:_o,SearchBar:Do},directives:{scroll:Mn},data(){return{scrollTop:0,clientHeight:0,scrollTimeout:null}},computed:{...(0,s.aH)("document",["recalculatingAnnotations","selectedDocument","loading","annotationSets"]),...(0,s.aH)("edit",["editMode","documentPagesListForEditMode","pagesForPostprocess"]),...(0,s.aH)("display",["scale","pageChangedFromThumbnail","currentPage","searchEnabled"]),...(0,s.L8)("display",["visiblePageRange"]),pages(){return this.selectedDocument?this.selectedDocument.pages:[]},showToolbar(){return!this.loading&&this.pages.length>0&&this.scale}},watch:{loading(){this.scrollTop=0}},mounted(){this.$refs.scrollingDocument.addEventListener("scroll",this.handleScroll)},methods:{updateScrollBounds(){const{scrollTop:e,clientHeight:t}=this.$refs.scrollingDocument;this.scrollTop=e,this.clientHeight=t},onPageJump(e,t){const n=e-(this.$refs.scrollingDocument.offsetTop+4),o=t-this.$refs.scrollingDocument.offsetLeft-4;this.$refs.scrollingDocument.scroll(o,n)},handleScroll(){this.updateScrollBounds(),1!==this.pages.length&&(this.isScrolling=!0,clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout((()=>{this.isScrolling=!1,this.pageChangedFromThumbnail&&this.visiblePageRange[1]===this.currentPage&&this.$store.dispatch("display/setPageChangedFromThumbnail",!1)}),300))}}},Vo=(0,$.A)(Lo,[["render",Ln],["__scopeId","data-v-0f38cc3c"]]),xo=Vo,Mo={id:"document-pages",ref:"documentThumbnails"},Io={key:0,ref:"docPage"},Oo=["onClick"],Po={class:"image-section"},$o={class:"image-container"},Ro={class:"number-thumbnail"},Fo={key:1,class:"document-thumbnail-loading"},Ho={class:"document-thumbnail"},zo={class:"image-section"},Uo={class:"image-container"};function Zo(e,t,n,i,a,s){const l=(0,o.resolveComponent)("LoadingThumbnail"),r=(0,o.resolveComponent)("ServerImage");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Mo,[e.selectedDocument?((0,o.openBlock)(),(0,o.createElementBlock)("div",Io,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.selectedDocument.pages,(t=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:t.id,class:(0,o.normalizeClass)(["document-thumbnail",e.currentPage==t.number&&"selected"]),onClick:e=>s.changePage(t.number)},[(0,o.createElementVNode)("div",Po,[(0,o.createElementVNode)("div",$o,[e.loading||e.recalculatingAnnotations?((0,o.openBlock)(),(0,o.createBlock)(l,{key:1})):((0,o.openBlock)(),(0,o.createBlock)(r,{key:0,class:(0,o.normalizeClass)(["img-thumbnail",e.currentPage==t.number&&"selected"]),width:"40px","image-url":`${t.thumbnail_url}?${e.selectedDocument.downloaded_at}`},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l)])),_:2},1032,["class","image-url"]))])]),(0,o.createElementVNode)("div",Ro,(0,o.toDisplayString)(t.number),1)],10,Oo)))),128))],512)):((0,o.openBlock)(),(0,o.createElementBlock)("div",Fo,[(0,o.createElementVNode)("div",Ho,[(0,o.createElementVNode)("div",zo,[(0,o.createElementVNode)("div",Uo,[(0,o.createVNode)(l)])])])]))],512)}const Go={class:"loading-thumbnail"};function Wo(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Go,[(0,o.createVNode)(l,{width:"40px",height:"57px"})])}const qo={name:"LoadingThumbnail"},jo=(0,$.A)(qo,[["render",Wo],["__scopeId","data-v-714f8116"]]),Ko=jo,Yo={name:"DocumentThumbnails",components:{ServerImage:we,LoadingThumbnail:Ko},data(){return{thumbnailClicked:null,previousScrollPosition:0}},computed:{...(0,s.aH)("document",["selectedDocument","recalculatingAnnotations","loading"]),...(0,s.aH)("display",["currentPage"])},watch:{currentPage(e){e&&e!=this.thumbnailClicked&&this.scrollToThumbnail(e)}},methods:{changePage(e){this.thumbnailClicked=e,this.loading||this.recalculatingAnnotations||e==this.currentPage||(this.$store.dispatch("display/setPageChangedFromThumbnail",!0),this.$store.dispatch("display/updateCurrentPage",e))},scrollToThumbnail(e){this.thumbnailClicked=null,this.$refs.docPage.children[e-1].scrollIntoView({behavior:"smooth"})}}},Jo=(0,$.A)(Yo,[["render",Zo],["__scopeId","data-v-b21f512c"]]),Xo=Jo,Qo={key:0,class:"extracting-data"},ei={key:1,class:"document-annotations-loading"},ti={key:2,class:"empty-annotation-sets"},ni={key:3,ref:"annotationList",class:"annotation-set-list"},oi={key:1,class:"empty-annotation-sets"},ii={key:2,class:"annotation-sets-accordions"},ai=["onClick"],si={class:"label-set-name"},li={key:0,class:"labelset-action-buttons"},ri={key:0,class:"annotation-sets-list"},ci={key:0,class:"labels"},di={key:1,class:"no-labels"},hi=["innerHTML"],ui={key:2,class:"no-labels"};function mi(e,t,n,i,a,s){const l=(0,o.resolveComponent)("ExtractingData"),r=(0,o.resolveComponent)("LoadingAnnotations"),c=(0,o.resolveComponent)("EmptyState"),d=(0,o.resolveComponent)("AnnotationFilters"),h=(0,o.resolveComponent)("b-icon"),u=(0,o.resolveComponent)("AnnotationSetActionButtons"),m=(0,o.resolveComponent)("DocumentLabel"),p=(0,o.resolveComponent)("b-collapse");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{id:"document-annotations",onClick:t[2]||(t[2]=(...e)=>s.cleanSelection&&s.cleanSelection(...e))},[e.recalculatingAnnotations?((0,o.openBlock)(),(0,o.createElementBlock)("div",Qo,[(0,o.createVNode)(l)])):!e.getAnnotationsFiltered.annotationSets||e.loading?((0,o.openBlock)(),(0,o.createElementBlock)("div",ei,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(a.numberOfLoadingAnnotations,(e=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:e,class:"loading-annotation-set"},[(0,o.createVNode)(r)])))),128))])):0!==e.getAnnotationsFiltered.annotationSets.length||e.isSearchingAnnotationList?((0,o.openBlock)(),(0,o.createElementBlock)("div",ni,[s.isDocumentEditable?((0,o.openBlock)(),(0,o.createBlock)(d,{key:0,onOpenAll:s.openAllAccordions},null,8,["onOpenAll"])):(0,o.createCommentVNode)("",!0),0===e.getAnnotationsFiltered.annotationSets.length&&e.isSearchingAnnotationList?((0,o.openBlock)(),(0,o.createElementBlock)("div",oi,[(0,o.createVNode)(c,{"is-search":!0})])):(0,o.createCommentVNode)("",!0),a.annotationSetsAccordion?((0,o.openBlock)(),(0,o.createElementBlock)("div",ii,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.getAnnotationsFiltered.annotationSets,((n,i)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:i,class:(0,o.normalizeClass)(["annotation-set-group",0===i&&"no-top-margin",!s.isAccordionOpen(n)&&"annotation-set-collapsed"])},[(0,o.createElementVNode)("div",{class:"label-set-header",onClick:e=>s.toggleAccordion(n)},[(0,o.createElementVNode)("div",si,[(0,o.createVNode)(h,{icon:s.isAccordionOpen(n)?"angle-up":"angle-down",size:"is-12"},null,8,["icon"]),(0,o.createTextVNode)(" "+(0,o.toDisplayString)(`${n.label_set.name} ${e.numberOfAnnotationSetGroup(n)}`),1)]),e.publicView||e.isDocumentReviewed||0===n.labels.length?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",li,[(0,o.createVNode)(u,{"is-placeholder":!s.isAccordionOpen(n),"number-of-empty-labels-in-annotation-set":e.emptyLabels(n).length,"number-of-not-correct-annotations-in-annotation-set":e.notCorrectAnnotations(n).length,onMarkAllEmptyMissing:e=>s.markAnnotationsAsMissing(null,null,n,!0),onHoverAnnotationSetToMarkMissing:e=>s.handleHoverAnnotationSet(n,"missing"),onLeaveAnnotationSetToMarkMissing:t[0]||(t[0]=e=>s.handleHoverAnnotationSet(null)),onAcceptAllPendingAnnotations:e=>s.acceptPendingAnnotationsInAnnotationSet(n),onHoverAnnotationSetToAccept:e=>s.handleHoverAnnotationSet(n,"accept"),onLeaveAnnotationSetToAccept:t[1]||(t[1]=e=>s.handleHoverAnnotationSet(null))},null,8,["is-placeholder","number-of-empty-labels-in-annotation-set","number-of-not-correct-annotations-in-annotation-set","onMarkAllEmptyMissing","onHoverAnnotationSetToMarkMissing","onAcceptAllPendingAnnotations","onHoverAnnotationSetToAccept"])]))],8,ai),(0,o.createVNode)(p,{"model-value":s.isAccordionOpen(n),animation:"slide"},{default:(0,o.withCtx)((()=>[n.labels.length>0?((0,o.openBlock)(),(0,o.createElementBlock)("div",ri,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(n.labels,(t=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:t.id},[0===t.annotations.length&&e.publicView?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",ci,[(0,o.createVNode)(m,{label:t,"annotation-set":n,"label-set":n.label_set,"index-group":i,onHandleMissingAnnotation:s.markAnnotationsAsMissing},null,8,["label","annotation-set","label-set","index-group","onHandleMissingAnnotation"])]))])))),128))])):0===n.labels.length?((0,o.openBlock)(),(0,o.createElementBlock)("div",di,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.isSearchingAnnotationList?e.$t("no_results"):e.$t("no_labels_in_set")),1),e.showBranding&&s.isDocumentEditable&&!e.isSearchingAnnotationList?((0,o.openBlock)(),(0,o.createElementBlock)("span",{key:0,innerHTML:e.$t("link_to_add_labels")},null,8,hi)):(0,o.createCommentVNode)("",!0)])):!s.annotationSetHasAnnotations(n)&&e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("div",ui,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("no_annotations_in_annotation_set")),1)])):(0,o.createCommentVNode)("",!0)])),_:2},1032,["model-value"])],2)))),128))])):(0,o.createCommentVNode)("",!0)],512)):((0,o.openBlock)(),(0,o.createElementBlock)("div",ti,[(0,o.createVNode)(c)]))])}const pi={class:"empty-container"},gi={class:"empty-text"},Ci={class:"title"},_i={key:0,class:"description"};function bi(e,t,n,i,a,s){const l=(0,o.resolveComponent)("EmptyStateImg");return(0,o.openBlock)(),(0,o.createElementBlock)("div",pi,[(0,o.createVNode)(l),(0,o.createElementVNode)("div",gi,[(0,o.createElementVNode)("p",Ci,(0,o.toDisplayString)(e.$t("no_label_sets_found")),1),n.isSearch?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("p",_i,(0,o.toDisplayString)(e.$t("no_label_sets_found_description")),1))])])}const Ei={width:"122",height:"165",viewBox:"0 0 122 165",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Si(e,t,n,i,a,s){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Ei,t[0]||(t[0]=[(0,o.createStaticVNode)('<circle cx="61" cy="61" r="61" fill="#F7F7F7"></circle><g filter="url(#filter0_d_2720_20884)"><rect x="22" y="29" width="77.8605" height="108" rx="4" fill="white"></rect></g><rect opacity="0.7" x="32.0449" y="41.584" width="18.8372" height="6.27907" rx="2" stroke="#BFBFBF" stroke-linecap="round" stroke-dasharray="3 2"></rect><rect opacity="0.7" x="32.0449" y="59.3965" width="57.7674" height="6.27907" rx="2" stroke="#BFBFBF" stroke-linecap="round" stroke-dasharray="3 2"></rect><rect opacity="0.7" x="32.0449" y="71.2109" width="57.7674" height="6.27907" rx="2" stroke="#BFBFBF" stroke-linecap="round" stroke-dasharray="3 2"></rect><rect opacity="0.7" x="32.0449" y="83.0254" width="57.7674" height="6.27907" rx="2" stroke="#BFBFBF" stroke-linecap="round" stroke-dasharray="3 2"></rect><rect opacity="0.7" x="32" y="97" width="58" height="28" rx="2" stroke="#BFBFBF" stroke-linecap="round" stroke-dasharray="3 2"></rect><defs><filter id="filter0_d_2720_20884" x="2" y="17" width="117.86" height="148" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="8"></feOffset><feGaussianBlur stdDeviation="10"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.07 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2720_20884"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2720_20884" result="shape"></feBlend></filter></defs>',8)]))}const fi={name:"EmptyStateImg"},vi=(0,$.A)(fi,[["render",Si]]),Ai=vi,ki={name:"EmptyState",components:{EmptyStateImg:Ai},props:{isSearch:{type:Boolean,required:!1,default:!1}}},Ni=(0,$.A)(ki,[["render",bi],["__scopeId","data-v-f6b38116"]]),wi=Ni,yi={class:"data-extraction-container"},Ti={class:"loading-container"},Bi={class:"data-extraction-text"},Di={class:"title"},Li={key:0},Vi={key:1},xi={class:"description"},Mi={key:0},Ii={key:1};function Oi(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon");return(0,o.openBlock)(),(0,o.createElementBlock)("div",yi,[(0,o.createElementVNode)("div",Ti,[(0,o.createVNode)(l,{icon:"spinner",class:"fa-spin spinner-icon"})]),(0,o.createElementVNode)("div",Bi,[(0,o.createElementVNode)("p",Di,[e.redirectingUser?((0,o.openBlock)(),(0,o.createElementBlock)("span",Li,(0,o.toDisplayString)(e.$t("wait_title")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("span",Vi,(0,o.toDisplayString)(e.$t("data_being_extracted")),1))]),(0,o.createElementVNode)("div",xi,[e.redirectingUser?((0,o.openBlock)(),(0,o.createElementBlock)("span",Mi,[(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("redirecting_to_documents_list")),1)])):((0,o.openBlock)(),(0,o.createElementBlock)("span",Ii,[(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("analysing_document")),1),(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("few_minutes")),1)]))])])])}const Pi={name:"ExtractingData",computed:{...(0,s.aH)("edit",["redirectingUser"])}},$i=(0,$.A)(Pi,[["render",Oi],["__scopeId","data-v-22a5db6f"]]),Ri=$i,Fi={class:"action-buttons"};function Hi(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Fi,[(0,o.createElementVNode)("div",{class:"missing-button-container all-missing",onMouseenter:t[0]||(t[0]=e=>s.mouseenterAnnotationSet("missing")),onMouseleave:t[1]||(t[1]=(...e)=>s.mouseleaveAnnotationSet&&s.mouseleaveAnnotationSet(...e))},[(0,o.createVNode)(l,{type:"is-ghost",class:"button-action is-button-text-ghost",disabled:0===n.numberOfEmptyLabelsInAnnotationSet,onClick:s.markAllAsMissing},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(n.isPlaceholder?e.$t("missing_counter"):e.$t("mark_all_missing"))+" ("+(0,o.toDisplayString)(n.numberOfEmptyLabelsInAnnotationSet)+") ",1)])),_:1},8,["disabled","onClick"])],32),(0,o.createElementVNode)("div",{class:"accept-all",onMouseenter:t[2]||(t[2]=e=>s.mouseenterAnnotationSet("accept")),onMouseleave:t[3]||(t[3]=(...e)=>s.mouseleaveAnnotationSet&&s.mouseleaveAnnotationSet(...e))},[(0,o.createVNode)(l,{type:"is-ghost",class:"button-action is-button-text-ghost accept-all-icon",disabled:0===n.numberOfNotCorrectAnnotationsInAnnotationSet,onClick:s.acceptAllPending},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(n.isPlaceholder?e.$t("pending_counter"):e.$t("accept_group"))+" ("+(0,o.toDisplayString)(n.numberOfNotCorrectAnnotationsInAnnotationSet)+") ",1)])),_:1},8,["disabled","onClick"])],32)])}const zi={name:"AnnotationSetActionButtons",props:{isPlaceholder:{type:Boolean,default:!1},numberOfEmptyLabelsInAnnotationSet:{type:Number,default:0},numberOfNotCorrectAnnotationsInAnnotationSet:{type:Number,default:0}},computed:{...(0,s.aH)("document",["publicView"]),...(0,s.L8)("document",["isDocumentReviewed"])},methods:{mouseenterAnnotationSet(e){"missing"==e&&this.$emit("hover-annotation-set-to-mark-missing"),"accept"==e&&this.$emit("hover-annotation-set-to-accept")},mouseleaveAnnotationSet(){this.$emit("leave-annotation-set-to-accept"),this.$emit("leave-annotation-set-to-mark-missing")},markAllAsMissing(e){this.isPlaceholder||(e.stopPropagation(),this.$emit("mark-all-empty-missing"))},acceptAllPending(e){this.isPlaceholder||(e.stopPropagation(),this.$emit("accept-all-pending-annotations"))}}},Ui=(0,$.A)(zi,[["render",Hi],["__scopeId","data-v-24255449"]]),Zi=Ui,Gi={class:"label"},Wi={key:0},qi={key:1},ji={key:2};function Ki(e,t,n,i,a,s){const l=(0,o.resolveComponent)("AnnotationRow");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Gi,[n.annotationSet&&s.annotationsToShow().length>0?((0,o.openBlock)(),(0,o.createElementBlock)("div",Wi,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(s.annotationsToShow(),((e,t)=>((0,o.openBlock)(),(0,o.createBlock)(l,{key:t,annotation:e,label:n.label,"annotation-set":n.annotationSet,"label-set":n.annotationSet.label_set},null,8,["annotation","label","annotation-set","label-set"])))),128))])):n.annotationSet?((0,o.openBlock)(),(0,o.createElementBlock)("div",qi,[(0,o.createVNode)(l,{label:n.label,"annotation-set":n.annotationSet,"label-set":n.annotationSet.label_set},null,8,["label","annotation-set","label-set"])])):n.labelSet?((0,o.openBlock)(),(0,o.createElementBlock)("div",ji,[(0,o.createVNode)(l,{label:n.label,"label-set":n.labelSet},null,8,["label","label-set"])])):(0,o.createCommentVNode)("",!0)])}const Yi={class:"annotations-width-slider"},Ji={class:"annotation-icon"},Xi={class:"icon"},Qi={class:"translation-details"},ea={class:"translation-title"},ta={class:"translation-info"},na={key:0,class:"annotation-details-link"},oa={class:"annotation-content"},ia={key:0},aa={key:1,class:"annotation-items"},sa={class:"annotation-spans"},la=["onMouseenter"],ra={key:2},ca={key:0};function da(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-slider"),r=(0,o.resolveComponent)("AnnotationDetails"),c=(0,o.resolveComponent)("TranslateArrows"),d=(0,o.resolveComponent)("b-tooltip"),h=(0,o.resolveComponent)("b-icon"),u=(0,o.resolveComponent)("b-checkbox"),m=(0,o.resolveComponent)("AnnotationContent"),p=(0,o.resolveComponent)("EmptyAnnotation"),g=(0,o.resolveComponent)("AnnotationActionButtons");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:(0,o.normalizeClass)(["annotation-row",a.isSelected&&"selected",s.hoverEmptyLabelRows&&"hovered-empty-labels",s.hoverPendingAnnotationRows&&"hovered-pending-annotations",e.annotationIsNotFound(n.annotationSet,n.label)&&"missing",e.isAnnotationInEditMode(s.currentAnnotationId())&&"editing",e.publicView&&"clickable-cursor"]),onClick:t[8]||(t[8]=(...e)=>s.onAnnotationClick&&s.onAnnotationClick(...e)),onMouseover:t[9]||(t[9]=e=>a.hoveredAnnotation=s.currentAnnotationId()),onMouseleave:t[10]||(t[10]=e=>a.hoveredAnnotation=null)},[(0,o.createElementVNode)("div",Yi,[(0,o.createVNode)(l,{modelValue:a.labelContainerWidth,"onUpdate:modelValue":t[0]||(t[0]=e=>a.labelContainerWidth=e),type:"is-move",min:20,max:80,"custom-formatter":t=>`${e.$t("label_size")} ${t}%`,class:"is-full-height show-hover show-line",disabled:e.isAnnotationInEditMode()},null,8,["modelValue","custom-formatter","disabled"])]),(0,o.createElementVNode)("div",{class:"annotation-row-left",style:(0,o.normalizeStyle)(`width:${e.labelWidth}%`),onMouseenter:t[3]||(t[3]=e=>s.onAnnotationHoverEnter(s.defaultSpan)),onMouseleave:t[4]||(t[4]=(...e)=>s.onAnnotationHoverLeave&&s.onAnnotationHoverLeave(...e))},[(0,o.createElementVNode)("div",Ji,[(0,o.createVNode)(r,{description:n.label.description,annotation:n.annotation,"annotation-set":n.annotationSet,label:n.label},null,8,["description","annotation","annotation-set","label"])]),n.showLabel?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["label-name",e.annotationIsNotFound(n.annotationSet,n.label)&&"not-found-text"])},[(0,o.createElementVNode)("span",{onClick:t[1]||(t[1]=(...e)=>s.selectAnnotation&&s.selectAnnotation(...e))},(0,o.toDisplayString)(n.label.name),1)],2)):(0,o.createCommentVNode)("",!0),e.showAnnotationTranslations&&n.annotation&&n.annotation.translated_string?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(["annotation-translation",!e.isDocumentReviewed&&"pointer"]),onClick:t[2]||(t[2]=e=>s.editAnnotationTranslation(n.annotation.id))},[(0,o.createVNode)(d,{animated:!1,position:"is-bottom"},{content:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",Qi,[(0,o.createElementVNode)("div",ea,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("translated_string_title")),1),(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(["translated-string",!n.annotation.translated_string&&"no-translation"])},(0,o.toDisplayString)(n.annotation.translated_string?n.annotation.translated_string:e.$t("no_translated_string")),3)])]),(0,o.createElementVNode)("div",ta,[e.isDocumentReviewed?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",na,(0,o.toDisplayString)(n.annotation.translated_string?e.$t("edit_translation"):e.$t("add_translation")),1))])])),default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",Xi,[(0,o.createVNode)(c,{translation:n.annotation.translated_string},null,8,["translation"])])])),_:1})],2)):(0,o.createCommentVNode)("",!0)],36),(0,o.createElementVNode)("div",{class:"annotation-row-right",style:(0,o.normalizeStyle)(`width:${e.annotationWidth}%`)},[(0,o.createElementVNode)("div",oa,[e.isAnnotationInEditMode(s.currentAnnotationId())&&e.spanLoading?((0,o.openBlock)(),(0,o.createElementBlock)("div",ia,[(0,o.createVNode)(h,{style:{width:"16px"},icon:"spinner",class:"fa-spin"})])):n.annotation?((0,o.openBlock)(),(0,o.createElementBlock)("div",aa,[n.annotation.metadata&&n.annotation.metadata.checkbox?((0,o.openBlock)(),(0,o.createBlock)(u,{key:0,modelValue:a.isChecked,"onUpdate:modelValue":t[5]||(t[5]=e=>a.isChecked=e),class:"annotation-checkbox"},null,8,["modelValue"])):(0,o.createCommentVNode)("",!0),(0,o.createElementVNode)("div",sa,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(s.spanForEditing?e.spanSelection:n.annotation.span,((e,i)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:i,onMouseenter:t=>s.onAnnotationHoverEnter(e),onMouseleave:t[6]||(t[6]=(...e)=>s.onAnnotationHoverLeave&&s.onAnnotationHoverLeave(...e))},[(0,o.createVNode)(m,{ref_for:!0,ref:`span_${n.annotation.id}_${i}`,annotation:n.annotation,span:e,"span-index":i,label:n.label,"annotation-set":n.annotationSet,"is-hovered":a.hoveredAnnotation,onSaveAnnotationChanges:s.handleSaveChanges},null,8,["annotation","span","span-index","label","annotation-set","is-hovered","onSaveAnnotationChanges"])],40,la)))),128))])])):((0,o.openBlock)(),(0,o.createElementBlock)("div",ra,[e.spanSelection.length>0&&e.isAnnotationInEditMode(s.currentAnnotationId())?((0,o.openBlock)(),(0,o.createElementBlock)("div",ca,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.spanSelection,((t,i)=>((0,o.openBlock)(),(0,o.createBlock)(p,{key:i,span:t,"span-index":i,label:n.label,"annotation-set":n.annotationSet,"label-set":n.labelSet,"is-hovered":a.hoveredAnnotation,"is-missing-annotation":e.annotationIsNotFound(n.annotationSet,n.label),onSaveEmptyAnnotationChanges:s.saveEmptyAnnotationChanges},null,8,["span","span-index","label","annotation-set","label-set","is-hovered","is-missing-annotation","onSaveEmptyAnnotationChanges"])))),128))])):((0,o.openBlock)(),(0,o.createBlock)(p,{key:1,label:n.label,"annotation-set":n.annotationSet,"label-set":n.labelSet,"is-hovered":a.hoveredAnnotation,"is-missing-annotation":e.annotationIsNotFound(n.annotationSet,n.label),onSaveEmptyAnnotationChanges:s.saveEmptyAnnotationChanges},null,8,["label","annotation-set","label-set","is-hovered","is-missing-annotation","onSaveEmptyAnnotationChanges"]))]))]),s.showAnnotationActions()?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)("buttons-container "+(e.isAnnotationInEditMode(s.currentAnnotationId())?"is-ann-editing":""))},[(0,o.createVNode)(g,{annotation:n.annotation,label:n.label,"show-cancel":s.showCancelButton(),"show-accept":s.showAcceptButton(),"show-decline":s.showDeclineButton(),"show-missing":s.showMissingButton(),"show-search":s.showMissingButton(),"show-save":s.showSaveButton(),"show-restore":s.showRestoreButton(),"show-link":s.showLinkButton(),"is-loading":a.isLoading,onMarkAsMissing:s.handleMissingAnnotation,onSave:s.handleSaveChanges,onAccept:s.handleSaveChanges,onDecline:t[7]||(t[7]=e=>s.handleSaveChanges(!0)),onCancel:s.handleCancelButton,onRestore:s.handleRestore,onSearch:s.searchLabelInDocument,onLink:s.copyAnnotationLink},null,8,["annotation","label","show-cancel","show-accept","show-decline","show-missing","show-search","show-save","show-restore","show-link","is-loading","onMarkAsMissing","onSave","onAccept","onCancel","onRestore","onSearch","onLink"])],2)):(0,o.createCommentVNode)("",!0)],4)],34)}const ha={class:(0,o.normalizeClass)(["label-icon"])},ua={key:0},ma={key:3},pa={class:"label-details"},ga={key:0,class:"label-description"},Ca={key:1,class:"label-description"},_a={key:3,class:"revision"},ba={class:"detail-icons"},Ea={key:0},Sa={key:2};function fa(e,t,n,i,a,s){const l=(0,o.resolveComponent)("AcceptedUser"),r=(0,o.resolveComponent)("NotFoundIcon"),c=(0,o.resolveComponent)("QuestionMark"),d=(0,o.resolveComponent)("AcceptedCheckMark"),h=(0,o.resolveComponent)("CheckMark"),u=(0,o.resolveComponent)("b-icon"),m=(0,o.resolveComponent)("b-tooltip");return(0,o.openBlock)(),(0,o.createElementBlock)("div",null,[(0,o.createVNode)(m,{animated:!1,position:"is-bottom",class:(0,o.normalizeClass)(["left-aligned","annotation-details"])},{content:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",pa,[n.annotation&&n.annotation.metadata&&n.annotation.metadata.checkbox?((0,o.openBlock)(),(0,o.createElementBlock)("div",ga,[(0,o.createVNode)(u,{size:"is-small",icon:"square-check"}),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("checkbox_ann_details")),1)])):(0,o.createCommentVNode)("",!0),n.description?((0,o.openBlock)(),(0,o.createElementBlock)("div",Ca,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(n.description),1)])):(0,o.createCommentVNode)("",!0),e.confidence(n.annotation)?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:2,id:"annotation-details-confidence",class:(0,o.normalizeClass)(["confidence",e.publicView&&"tooltip-in-public-view"])},[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("confidence")),1),(0,o.createElementVNode)("span",{class:(0,o.normalizeClass)(["value",e.confidence(n.annotation)<=.2?"red":e.confidence(n.annotation)<=.5?"yellow":""])},(0,o.toDisplayString)(Math.floor(100*e.confidence(n.annotation))/100),3)],2)):(0,o.createCommentVNode)("",!0),e.publicView?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",_a,[(0,o.createElementVNode)("div",ba,[e.created(n.annotation)||e.edited(n.annotation)?((0,o.openBlock)(),(0,o.createElementBlock)("div",Ea,[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":"","user-icon"])},[(0,o.createVNode)(l)],2)])):e.notExtracted(n.annotation)?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":"","question-icon"])},[(0,o.createVNode)(c)],2)):((0,o.openBlock)(),(0,o.createElementBlock)("div",Sa,[e.accepted(n.annotation)?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":""])},[(0,o.createVNode)(d)],2)):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":""])},[(0,o.createVNode)(h)],2))])),(0,o.createTextVNode)(" "+(0,o.toDisplayString)(s.getText()),1)])]))])])),default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",ha,[!e.created(n.annotation)&&!e.edited(n.annotation)||e.publicView?e.annotationIsNotFound(n.annotationSet,n.label)&&!e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":""])},[(0,o.createVNode)(r)],2)):e.notExtracted(n.annotation)&&!e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:2,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":"","question-icon"])},[(0,o.createVNode)(c)],2)):((0,o.openBlock)(),(0,o.createElementBlock)("div",ma,[e.accepted(n.annotation)&&!e.publicView?((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:0,class:(0,o.normalizeClass)(["annotation-details-icon success",a.animate?"animated-ripple":""])},[(0,o.createVNode)(d)],2)):((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:1,class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":""])},[(0,o.createVNode)(h,{class:"pending"})],2))])):((0,o.openBlock)(),(0,o.createElementBlock)("div",ua,[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["annotation-details-icon",a.animate?"animated-ripple":"","user-icon"])},[(0,o.createVNode)(l)],2)]))])])),_:1})])}const va={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Aa(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",va,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#E1E1E1",d:"M18.71,7.21a1,1,0,0,0-1.42,0L9.84,14.67,6.71,11.53A1,1,0,1,0,5.29,13l3.84,3.84a1,1,0,0,0,1.42,0l8.16-8.16A1,1,0,0,0,18.71,7.21Z"},null,-1)]))}const ka={},Na=(0,$.A)(ka,[["render",Aa]]),wa=Na,ya={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Ta(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",ya,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#4bb543",d:"M18.71,7.21a1,1,0,0,0-1.42,0L9.84,14.67,6.71,11.53A1,1,0,1,0,5.29,13l3.84,3.84a1,1,0,0,0,1.42,0l8.16-8.16A1,1,0,0,0,18.71,7.21Z"},null,-1)]))}const Ba={},Da=(0,$.A)(Ba,[["render",Ta]]),La=Da,Va={xmlns:"http://www.w3.org/2000/svg","data-name":"Layer 1",viewBox:"0 0 24 24"};function xa(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Va,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#E1E1E1",d:"M15.33252,9.5A3.5001,3.5001,0,0,0,8.80127,7.75a1.00016,1.00016,0,0,0,1.73242,1A1.50266,1.50266,0,0,1,11.83252,8a1.5,1.5,0,1,1,0,3h-.00244a.94984.94984,0,0,0-.18927.0387,1.03181,1.03181,0,0,0-.19861.04065.98275.98275,0,0,0-.15552.10485,1.00813,1.00813,0,0,0-.162.10975,1.00464,1.00464,0,0,0-.11706.1737.97789.97789,0,0,0-.09668.14417,1.02252,1.02252,0,0,0-.04285.21191A.94847.94847,0,0,0,10.83252,12v1l.00232.01135.0011.49109a1.00016,1.00016,0,0,0,1,.99756h.00244a1.00006,1.00006,0,0,0,.99756-1.00244l-.00153-.66138A3.49363,3.49363,0,0,0,15.33252,9.5Zm-4.20264,6.79A1,1,0,0,0,11.82959,18a1.036,1.036,0,0,0,.71045-.29,1.01517,1.01517,0,0,0,0-1.41992A1.03425,1.03425,0,0,0,11.12988,16.29Z"},null,-1)]))}const Ma={},Ia=(0,$.A)(Ma,[["render",xa]]),Oa=Ia,Pa={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function $a(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Pa,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#4bb543",d:"M15.71,12.71a6,6,0,1,0-7.42,0,10,10,0,0,0-6.22,8.18,1,1,0,0,0,2,.22,8,8,0,0,1,15.9,0,1,1,0,0,0,1,.89h.11a1,1,0,0,0,.88-1.1A10,10,0,0,0,15.71,12.71ZM12,12a4,4,0,1,1,4-4A4,4,0,0,1,12,12Z"},null,-1)]))}const Ra={},Fa=(0,$.A)(Ra,[["render",$a]]),Ha=Fa,za={width:"10",height:"11",viewBox:"0 0 10 11",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ua(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",za,t[0]||(t[0]=[(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.17854 5.83544L9.75604 2.25794C10.0819 1.9321 10.0819 1.40544 9.75604 1.0796C9.43021 0.75377 8.90354 0.75377 8.57771 1.0796L5.00021 4.6571L1.42271 1.0796C1.09688 0.75377 0.570208 0.75377 0.244375 1.0796C-0.0814583 1.40544 -0.0814583 1.9321 0.244375 2.25794L3.82188 5.83544L0.244375 9.41294C-0.0814583 9.73877 -0.0814583 10.2654 0.244375 10.5913C0.406875 10.7538 0.620208 10.8354 0.833542 10.8354C1.04688 10.8354 1.26021 10.7538 1.42271 10.5913L5.00021 7.01377L8.57771 10.5913C8.74021 10.7538 8.95354 10.8354 9.16687 10.8354C9.38021 10.8354 9.59354 10.7538 9.75604 10.5913C10.0819 10.2654 10.0819 9.73877 9.75604 9.41294L6.17854 5.83544Z",fill:"#E1E1E1"},null,-1)]))}const Za={},Ga=(0,$.A)(Za,[["render",Ua]]),Wa=Ga,qa={name:"AnnotationDetails",components:{CheckMark:wa,QuestionMark:Oa,AcceptedCheckMark:La,AcceptedUser:Ha,NotFoundIcon:Wa},props:{description:{type:String,default:null,required:!1},annotation:{type:Object,default:null},annotationSet:{type:Object,default:null},label:{type:Object,default:null}},data(){return{animate:!1}},computed:{...(0,s.L8)("document",["confidence","notExtracted","created","edited","accepted","getUser","annotationIsNotFound"]),...(0,s.aH)("document",["publicView"])},watch:{annotation(e,t){e&&e.id&&this.accepted(e)&&!this.accepted(t)&&(this.animate=!0,setTimeout((()=>{this.animate=!1}),2e3))}},mounted(){this.changePositionOfTooltip()},methods:{getText(){return this.notExtracted(this.annotation)?this.$t("not_found_in_document"):this.created(this.annotation)?this.getUser(this.annotation)?`${this.$t("created_by")} ${this.getUser(this.annotation)}`:this.$t("created"):this.accepted(this.annotation)?this.getUser(this.annotation)?`${this.$t("approved_by")} ${this.getUser(this.annotation)}`:this.$t("approved"):this.$t("not_revised_yet")},changePositionOfTooltip(){const e=document.getElementsByClassName("annotation-details");if(e){let t;if(!(e.length>=3))return;t=e.length-2;for(let n=t;n<e.length;n++)this.updateClass(e,n)}},updateClass(e,t){e[t]&&(e[t].classList.remove("is-bottom"),e[t].classList.add("is-top"))}}},ja=(0,$.A)(qa,[["render",fa],["__scopeId","data-v-21369c27"]]),Ka=ja,Ya=["id"],Ja=["id","contenteditable"];function Xa(e,t,n,i,a,s){return(0,o.openBlock)(),(0,o.createElementBlock)("div",{id:n.annotation.id,ref:"annotation",class:"annotation"},[(0,o.createElementVNode)("span",{id:n.annotation.id,ref:"contentEditable",class:(0,o.normalizeClass)(["annotation-value","keyboard-nav",a.isLoading&&"saving-changes",e.showActionError&&e.editAnnotation&&e.editAnnotation.id===n.annotation.id&&"error-editing",s.isSpanBeingEdited&&"clicked-ann"]),role:"textbox",contenteditable:s.isSpanBeingEdited,onClick:t[0]||(t[0]=(...e)=>s.handleEditAnnotation&&s.handleEditAnnotation(...e)),onPaste:t[1]||(t[1]=(...e)=>s.handlePaste&&s.handlePaste(...e)),onKeypress:t[2]||(t[2]=(0,o.withKeys)(((...e)=>s.saveAnnotationChanges&&s.saveAnnotationChanges(...e)),["enter"]))},(0,o.toDisplayString)(n.span.offset_string),43,Ja)],8,Ya)}function Qa(e){new Promise((t=>setTimeout(t,e)))}function es(e){const t=window.location.search,n=new URLSearchParams(t);if(n.has(e))return n.get(e)}function ts(e){const t=window.location.pathname;if(!t.includes(`/${e}/`))return;const n=t.split(e)[1].split("/")[1];return""!==n?n:void 0}function ns(e){const t=window.location.hash;if(!t.includes(`#${e}`))return;const n=t.split(`#${e}`)[1].replace("/","");return""!==n?n:void 0}function os(e,t,n=""){const o=new URL(window.location.href);""!=t?(""!=n&&o.searchParams.delete(n),o.searchParams.set(e,t)):o.searchParams.delete(e),window.history.pushState(null,"",o.toString())}function is(e){e?window.location.hash=`ann${e}`:history.pushState("",document.title,window.location.pathname+window.location.search)}function as(e,t){const n=window.location.href,o=n.replace(e,t);window.location.replace(o)}function ss(e,t){if(!e)return;const n=e.charAt(e.length-1);let o="/";n===o&&(o="");const i=`?project=${t}`,a=`${e}${o}${i}`;return window.location.href=a,!0}function ls(e){return Array.isArray(e)}function rs(e,t){let n;return(...o)=>{clearTimeout(n),n=setTimeout((()=>{e(...o)}),t)}}const cs={name:"AnnotationContent",props:{annotation:{type:Object,required:!0},span:{type:[Object,Array],required:!0},spanIndex:{type:Number,required:!0},label:{type:Object,required:!0},annotationSet:{type:Object,required:!0}},data(){return{isLoading:!1}},computed:{...(0,s.L8)("document",["isAnnotationInEditMode","isDocumentReviewed"]),...(0,s.aH)("document",["editAnnotation","publicView","annotations","newAcceptedAnnotations","showActionError"]),isSpanBeingEdited(){return this.isAnnotationInEditMode(this.annotation.id,this.spanIndex)},isAnnotationBeingEdited(){return this.editAnnotation&&this.annotation.id===this.editAnnotation.id}},watch:{span(){this.setText(this.span.offset_string)}},methods:{setText(e){this.$refs.contentEditable.textContent=e},getAnnotationText(){return this.$refs.contentEditable.textContent.trim()},handleEditAnnotation(e){this.publicView||this.isDocumentReviewed||(e&&e.preventDefault(),this.publicView||this.isDocumentReviewed||this.isSpanBeingEdited||this.isLoading||(this.isAnnotationBeingEdited||this.$store.dispatch("selection/setSpanSelection",this.annotation.span),this.$store.dispatch("document/setEditAnnotation",{id:this.annotation.id,index:this.spanIndex,label:this.label,labelSet:this.annotationSet.label_set,annotationSet:this.annotationSet,pageNumber:this.span.page_index+1}).then((()=>{this.$refs.contentEditable&&this.$refs.contentEditable.focus()})).catch((e=>{console.log(e)})),this.annotation.selection_bbox&&this.annotation.span.length>1&&this.$store.dispatch("selection/setPlaceholderSelection",[this.annotation.selection_bbox])))},handleCancel(){this.setText(this.span.offset_string),this.isLoading=!1,this.$refs.contentEditable&&this.$refs.contentEditable.blur(),this.$store.dispatch("selection/setSpanSelection",null)},handlePaste(e){e.preventDefault()},saveAnnotationChanges(e){if(this.publicView||this.isDocumentReviewed)return;e&&e.preventDefault();let t=0===this.getAnnotationText().length&&(!ls(this.annotation.span)||1===this.annotation.span.length);this.$emit("save-annotation-changes",t)},createSpan(){const e=this.getAnnotationText();if(e)return{offset_string:e,page_index:this.span.page_index,x0:this.span.x0,x1:this.span.x1,y0:this.span.y0,y1:this.span.y1,start_offset:this.span.start_offset,end_offset:this.span.end_offset,is_custom:this.span.offset_string!==e}}}},ds=(0,$.A)(cs,[["render",Xa],["__scopeId","data-v-8aa3a3c6"]]),hs=ds,us={key:0,class:"empty-annotation"},ms=["id","contenteditable"],ps=["innerHTML"],gs={key:1,class:"not-found-text"},Cs={key:2},_s={key:3,class:"label-empty"};function bs(e,t,n,i,a,s){return e.publicView||e.isDocumentReviewed?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",us,[(0,o.createElementVNode)("span",{id:s.emptyAnnotationId(),ref:"emptyAnnotation",class:(0,o.normalizeClass)(["annotation-value",e.showActionError&&s.isAnnotationBeingEdited()&&"error-editing",s.isAnnotationBeingEdited()&&"clicked-ann",n.isMissingAnnotation&&"missing-annotation",!n.isMissingAnnotation&&"keyboard-nav"]),contenteditable:s.isAnnotationBeingEdited(),onKeypress:t[0]||(t[0]=(0,o.withKeys)(((...e)=>s.saveEmptyAnnotationChanges&&s.saveEmptyAnnotationChanges(...e)),["enter"])),onClick:t[1]||(t[1]=(...e)=>s.handleEditEmptyAnnotation&&s.handleEditEmptyAnnotation(...e)),onFocus:t[2]||(t[2]=(...e)=>s.handleEditEmptyAnnotation&&s.handleEditEmptyAnnotation(...e))},[s.isFindingAnnotation?((0,o.openBlock)(),(0,o.createElementBlock)("span",{key:0,class:"label-empty-clicked",innerHTML:e.$t("draw_box_document",{label_name:n.label.name})},null,8,ps)):n.isMissingAnnotation?((0,o.openBlock)(),(0,o.createElementBlock)("span",gs,(0,o.toDisplayString)(e.$t("missing_from_document")),1)):n.span&&n.span.offset_string?((0,o.openBlock)(),(0,o.createElementBlock)("span",Cs,(0,o.toDisplayString)(n.span.offset_string),1)):((0,o.openBlock)(),(0,o.createElementBlock)("span",_s,(0,o.toDisplayString)(e.$t("no_data_found")),1))],42,ms)]))}const Es={name:"EmptyAnnotation",props:{label:{type:Object,required:!0},annotationSet:{type:Object,default:null},labelSet:{type:Object,required:!0},span:{type:Object,default:null,required:!1},spanIndex:{type:Number,required:!1,default:0},isMissingAnnotation:{type:Boolean,required:!0,default:!1}},computed:{...(0,s.L8)("document",["isAnnotationInEditMode","isDocumentReviewed"]),...(0,s.aH)("selection",["spanSelection"]),...(0,s.aH)("document",["editAnnotation","publicView","showActionError"]),isFindingAnnotation(){return this.editAnnotation&&this.editAnnotation.id===this.emptyAnnotationId()&&(!this.span||!this.span.offset_string)}},watch:{span(e){},spanSelection(e){e&&e[0]&&!e[0].offset_string&&(this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"))}},methods:{emptyAnnotationId(){if(!this.annotationSet&&!this.labelSet||!this.label)return;const e=this.annotationSet&&null!=this.annotationSet.id?this.annotationSet.id:this.labelSet.id;return`${e}_${this.label.id}`},isAnnotationBeingEdited(){return this.isAnnotationInEditMode(this.emptyAnnotationId())},handleEditEmptyAnnotation(){this.isMissingAnnotation||(this.$store.dispatch("selection/disableSelection"),this.$store.dispatch("document/setEditAnnotation",{id:this.emptyAnnotationId(),index:this.spanIndex,label:this.label,labelSet:this.labelSet,annotationSet:this.annotationSet}))},saveEmptyAnnotationChanges(e){e&&e.preventDefault(),this.$emit("save-empty-annotation-changes")}}},Ss=(0,$.A)(Es,[["render",bs],["__scopeId","data-v-153d72f9"]]),fs=Ss,vs={class:"action-buttons"},As={class:"ann-nav-btns"},ks={key:0,class:"button-text"},Ns={key:0,class:"button-text"},ws={key:0,class:"button-text"},ys={key:0,class:"button-text"},Ts={key:0,class:"button-text"};function Bs(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-tooltip"),c=(0,o.resolveComponent)("b-button");return(0,o.openBlock)(),(0,o.createElementBlock)("div",vs,[e.isLabelMultiFalseAndGroupOfAnns(n.label)&&!n.showSave?((0,o.openBlock)(),(0,o.createBlock)(r,{key:0,delay:a.tooltipDelay,position:"is-left",label:e.$t("nav_label_anns")},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",As,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(n.label.annotations.length),1),(0,o.createVNode)(l,{icon:"angle-down",class:"angle-icon center-icon button-icon is-link",onClick:(0,o.withModifiers)(s.nextAnn,["stop"])},null,8,["onClick"])])])),_:1},8,["delay","label"])):(0,o.createCommentVNode)("",!0),n.showLink?((0,o.openBlock)(),(0,o.createBlock)(c,{key:1,id:"annotation-link-btn",type:"is-ghost",class:"button-action is-button-icon",onClick:(0,o.withModifiers)(s.link,["stop"])},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{delay:a.tooltipDelay,position:"is-left",label:e.$t("annotation_link")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"link",class:"link-icon center-icon button-icon"})])),_:1},8,["delay","label"])])),_:1},8,["onClick"])):(0,o.createCommentVNode)("",!0),n.showDecline?((0,o.openBlock)(),(0,o.createBlock)(c,{key:2,class:"button-action is-button-icon decline-btn",type:"is-ghost",onClick:(0,o.withModifiers)(s.decline,["stop"])},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{delay:a.tooltipDelay,position:"is-left",label:e.$t("decline")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"ban",class:"decline-icon center-icon button-icon"})])),_:1},8,["delay","label"])])),_:1},8,["onClick"])):(0,o.createCommentVNode)("",!0),n.showAccept?((0,o.openBlock)(),(0,o.createBlock)(c,{key:3,class:(0,o.normalizeClass)("button-action accept-btn "+(a.showText?"is-button-text":"is-button-icon")),type:a.showText?"is-primary":"is-ghost",onClick:(0,o.withModifiers)(s.accept,["stop"])},{default:(0,o.withCtx)((()=>[a.showText?((0,o.openBlock)(),(0,o.createElementBlock)("span",ks,(0,o.toDisplayString)(e.$t("accept")),1)):((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,delay:a.tooltipDelay,position:"is-left",label:e.$t("accept")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"circle-check",class:"accept-icon center-icon button-icon"})])),_:1},8,["delay","label"]))])),_:1},8,["class","type","onClick"])):(0,o.createCommentVNode)("",!0),n.showSearch?((0,o.openBlock)(),(0,o.createBlock)(c,{key:4,type:"is-ghost",class:(0,o.normalizeClass)("button-action "+(a.showText?"is-button-text-ghost":"is-button-icon")),onClick:(0,o.withModifiers)(s.search,["stop"])},{default:(0,o.withCtx)((()=>[a.showText?((0,o.openBlock)(),(0,o.createElementBlock)("span",Ns,(0,o.toDisplayString)(e.$t("search_in_document")),1)):((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,delay:a.tooltipDelay,position:"is-left",label:e.$t("search_in_document")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"search",class:"center-icon button-icon search-icon"})])),_:1},8,["delay","label"]))])),_:1},8,["class","onClick"])):(0,o.createCommentVNode)("",!0),n.showMissing?((0,o.openBlock)(),(0,o.createBlock)(c,{key:5,type:"is-ghost",class:(0,o.normalizeClass)("button-action "+(a.showText?"is-button-text-ghost":"is-button-icon")),onClick:(0,o.withModifiers)(s.markAsMissing,["stop"])},{default:(0,o.withCtx)((()=>[a.showText?((0,o.openBlock)(),(0,o.createElementBlock)("span",ws,(0,o.toDisplayString)(e.$t("missing_annotation")),1)):((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,delay:a.tooltipDelay,position:"is-left",label:e.$t("missing_annotation")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"magnifying-glass-minus",class:"center-icon button-icon missing-icon"})])),_:1},8,["delay","label"]))])),_:1},8,["class","onClick"])):(0,o.createCommentVNode)("",!0),n.showSave?((0,o.openBlock)(),(0,o.createBlock)(c,{key:6,id:"save-ann",class:(0,o.normalizeClass)("button-action "+(a.showText?"is-button-text":"is-button-icon")),type:a.showText?"is-primary":"is-ghost",onClick:(0,o.withModifiers)(s.save,["stop"])},{default:(0,o.withCtx)((()=>[a.showText?((0,o.openBlock)(),(0,o.createElementBlock)("span",ys,(0,o.toDisplayString)(e.$t("save")),1)):((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,delay:a.tooltipDelay,position:"is-left",label:e.$t("save")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"floppy-disk",class:"button-icon center-icon save-icon"})])),_:1},8,["delay","label"]))])),_:1},8,["class","type","onClick"])):(0,o.createCommentVNode)("",!0),n.showRestore?((0,o.openBlock)(),(0,o.createBlock)(c,{key:7,class:(0,o.normalizeClass)("button-action restore-btn "+(a.showText?"is-button-text":"is-button-icon")),type:a.showText?"is-primary":"is-ghost",onClick:(0,o.withModifiers)(s.restore,["stop"])},{default:(0,o.withCtx)((()=>[a.showText?((0,o.openBlock)(),(0,o.createElementBlock)("span",Ts,(0,o.toDisplayString)(e.$t("restore")),1)):((0,o.openBlock)(),(0,o.createBlock)(r,{key:1,delay:a.tooltipDelay,position:"is-left",label:e.$t("restore")},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"trash-arrow-up",class:"center-icon button-icon restore-icon"})])),_:1},8,["delay","label"]))])),_:1},8,["class","type","onClick"])):(0,o.createCommentVNode)("",!0),n.showCancel?((0,o.openBlock)(),(0,o.createBlock)(c,{key:8,class:"button-action is-button-icon",title:e.$t("cancel"),type:"is-ghost",onClick:(0,o.withModifiers)(s.cancel,["stop"])},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{icon:"xmark",class:"cancel-icon center-icon button-icon"})])),_:1},8,["title","onClick"])):(0,o.createCommentVNode)("",!0),n.isLoading?((0,o.openBlock)(),(0,o.createBlock)(l,{key:9,icon:"spinner",class:"fa-spin spinner-icon"})):(0,o.createCommentVNode)("",!0)])}const Ds={name:"AnnotationActionButtons",props:{annotation:{type:Object,default:null},label:{type:Object,default:null},isLoading:{type:Boolean},showSave:{type:Boolean},showCancel:{type:Boolean},showMissing:{type:Boolean},showAccept:{type:Boolean},showDecline:{type:Boolean},showRestore:{type:Boolean},showLink:{type:Boolean},showSearch:{type:Boolean}},data(){return{tooltipDelay:700,showText:window.innerWidth>$t}},computed:{...(0,s.aH)("document",["publicView"]),...(0,s.L8)("document",["isDocumentReviewed","isLabelMultiFalseAndGroupOfAnns"]),showHoverButton(){return!this.isLoading&&!this.cancelBtn&&!this.saveBtn&&!this.publicView&&!this.isDocumentReviewed}},created(){window.addEventListener("resize",this.resize)},unmounted(){window.removeEventListener("resize",this.resize)},methods:{resize(){this.showText=window.innerWidth>$t},search(){this.$emit("search")},save(){this.$emit("save")},cancel(){this.$emit("cancel")},accept(){this.$emit("accept")},markAsMissing(){this.$emit("mark-as-missing")},decline(){this.$emit("decline")},restore(){this.$emit("restore")},link(){this.$emit("link")},nextAnn(){this.$store.dispatch("document/putNextAnnotationInLabelFirst",this.label)}}},Ls=(0,$.A)(Ds,[["render",Bs],["__scopeId","data-v-1ca87cbe"]]),Vs=Ls,xs={id:"exchange",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},Ms={key:0,fill:"#1A1A1A",d:"M18,10a1,1,0,0,0-1-1H5.41l2.3-2.29A1,1,0,0,0,6.29,5.29l-4,4a1,1,0,0,0-.21,1.09A1,1,0,0,0,3,11H17A1,1,0,0,0,18,10Zm3.92,3.62A1,1,0,0,0,21,13H7a1,1,0,0,0,0,2H18.59l-2.3,2.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l4-4A1,1,0,0,0,21.92,13.62Z"},Is={key:1,fill:"#E1E1E1",d:"M18,10a1,1,0,0,0-1-1H5.41l2.3-2.29A1,1,0,0,0,6.29,5.29l-4,4a1,1,0,0,0-.21,1.09A1,1,0,0,0,3,11H17A1,1,0,0,0,18,10Zm3.92,3.62A1,1,0,0,0,21,13H7a1,1,0,0,0,0,2H18.59l-2.3,2.29a1,1,0,0,0,0,1.42,1,1,0,0,0,1.42,0l4-4A1,1,0,0,0,21.92,13.62Z"};function Os(e,t,n,i,a,s){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",xs,[n.translation?((0,o.openBlock)(),(0,o.createElementBlock)("path",Ms)):((0,o.openBlock)(),(0,o.createElementBlock)("path",Is))])}const Ps={name:"TranslateArrows",props:{translation:{type:String,default:null,required:!1}}},$s=(0,$.A)(Ps,[["render",Os]]),Rs=$s,Fs={name:"AnnotationRow",components:{AnnotationDetails:Ka,AnnotationContent:hs,EmptyAnnotation:fs,AnnotationActionButtons:Vs,TranslateArrows:Rs},props:{annotationSet:{type:Object,default:null},labelSet:{type:Object,required:!0},label:{type:Object,required:!0},annotation:{type:Object,default:null},showLabel:{type:Boolean,default:!0}},data(){const e=this.annotation&&this.annotation.metadata&&this.annotation.metadata.checkbox&&this.annotation.metadata.checkbox.is_checked;return{isLoading:!1,isSelected:!1,hoveredAnnotation:null,checkboxDefaultValue:e,isCheckboxAvailable:!1,isChecked:e,labelContainerWidth:0}},computed:{...(0,s.aH)("document",["editAnnotation","annotationId","hoveredAnnotationSet","publicView","newAcceptedAnnotations","annotationsMarkedAsMissing","documentId","showActionError","missingAnnotations"]),...(0,s.aH)("selection",["spanSelection","selectedEntities","spanLoading"]),...(0,s.aH)("display",["labelWidth","annotationWidth"]),...(0,s.aH)("project",["showAnnotationTranslations"]),...(0,s.L8)("document",["isAnnotationInEditMode","annotationIsNotFound","isDocumentReviewed"]),defaultSpan(){return this.annotation&&this.annotation.span&&this.annotation.span.length>0?this.annotation.span[0]:null},spanForEditing(){return this.spanSelection&&ls(this.spanSelection)&&this.isAnnotationInEditMode(this.currentAnnotationId())},isAnnotation(){return this.annotation&&this.isAnnotationInEditMode(this.currentAnnotationId(),this.editAnnotation.index)},hoverEmptyLabelRows(){return this.hoveredAnnotationSet&&"missing"==this.hoveredAnnotationSet.type&&this.annotationSet&&!this.annotationIsNotFound(this.annotationSet,this.label)&&this.annotationSet.id===this.hoveredAnnotationSet.annotationSet.id&&this.annotationSet.label_set.id===this.hoveredAnnotationSet.annotationSet.label_set.id&&this.hoveredEmptyLabels()===this.label.id},hoverPendingAnnotationRows(){return this.hoveredAnnotationSet&&"accept"==this.hoveredAnnotationSet.type&&this.annotation&&this.hoveredNotCorrectAnnotations()===this.annotation.id}},watch:{labelWidth(e){this.labelContainerWidth=e},labelContainerWidth(e){this.setLabelWidth(e)},annotationId(e){this.checkAnnotationSelection(e)},editAnnotation(e){e||(this.isLoading=!1)},newAcceptedAnnotations(e){e?this.enableLoading(e):this.isLoading=!1},annotationsMarkedAsMissing(e){e?this.enableLoading():this.isLoading=!1},showActionError(e){e&&(this.isLoading=!1)},selectedEntities(e){e&&this.isAnnotationInEditMode(this.currentAnnotationId())&&(this.isLoading=!0)},spanSelection(e){e&&(this.isLoading=!1)},isChecked(){this.isCheckboxAvailable?this.handleCheckboxChanged(this.isChecked):this.isChecked!==this.checkboxDefaultValue&&this.$buefy.dialog.confirm({container:"#app .dv-ui-app-container",canCancel:["button"],message:this.$t("edit_ann_content_warning"),onConfirm:()=>{this.isCheckboxAvailable=!0,this.handleCheckboxChanged(this.isChecked)},onCancel:()=>{this.isChecked=!this.isChecked}})}},mounted(){this.checkAnnotationSelection(this.annotationId),this.labelContainerWidth=this.labelWidth},methods:{...(0,s.i0)("display",["setLabelWidth"]),handleCheckboxChanged(e){this.$store.dispatch("document/updateAnnotation",{updatedValues:{metadata:{checkbox:{is_checked:e}}},annotationId:this.annotation.id,annotationSet:this.annotationSet}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})}))},checkAnnotationSelection(e){if(e&&this.annotation&&this.annotation.id==e){this.isSelected=!0;const e=()=>{this.$el.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})};e()}else this.isSelected=!1},currentAnnotationId(){if(!this.annotationSet&&!this.labelSet||!this.label)return;if(this.annotation&&this.annotation.id)return this.annotation.id;const e=this.annotationSet&&this.annotationSet.id?this.annotationSet.id:this.labelSet.id;return`${e}_${this.label.id}`},onAnnotationHoverEnter(e){e&&this.$store.dispatch("document/setDocumentAnnotationSelected",{annotation:this.annotation,label:this.label,span:e,scrollTo:!1})},onAnnotationHoverLeave(){this.$store.dispatch("document/disableDocumentAnnotationSelected")},onAnnotationClick(){this.$store.dispatch("document/scrollToDocumentAnnotationSelected")},hoveredEmptyLabels(){if(!this.hoveredAnnotationSet)return;const e=this.hoveredAnnotationSet.annotationSet.labels.map((e=>JSON.parse(JSON.stringify(e)))),t=e.find((e=>e.id===this.label.id));return t&&0===t.annotations.length?t.id:null},hoveredNotCorrectAnnotations(){if(!this.hoveredAnnotationSet)return;const e=this.hoveredAnnotationSet.annotationSet.labels.flatMap((e=>e.annotations));if(0===e.length)return;const t=e.find((e=>e.id===this.annotation.id&&!e.is_correct));return t?t.id:null},showAnnotationActions(){return!this.publicView&&!this.isDocumentReviewed&&(this.isLoading||this.showLinkButton()||this.showAcceptButton()||this.showDeclineButton()||this.showMissingButton()||this.showCancelButton()||this.showSaveButton()||this.showRestoreButton())},showLinkButton(){return!this.editAnnotation&&this.annotation&&!this.isLoading&&this.hoveredAnnotation===this.annotation.id},showAcceptButton(){return!this.editAnnotation&&!this.isLoading&&!this.isAnnotationInEditMode(this.currentAnnotationId())&&this.annotation&&!this.annotation.is_correct&&this.hoveredAnnotation===this.annotation.id},showDeclineButton(){return!this.editAnnotation&&!this.isLoading&&!this.isAnnotationInEditMode(this.currentAnnotationId())&&this.annotation&&this.hoveredAnnotation===this.annotation.id},showMissingButton(){return!this.editAnnotation&&!this.isLoading&&this.hoveredAnnotation&&!this.isAnnotationInEditMode(this.currentAnnotationId())&&!this.annotation&&!this.annotationIsNotFound(this.annotationSet,this.label)},showRestoreButton(){return!this.editAnnotation&&this.hoveredAnnotation&&!this.isLoading&&!this.isAnnotationInEditMode(this.currentAnnotationId())&&this.annotationIsNotFound(this.annotationSet,this.label)},showCancelButton(){return!(!this.editAnnotation||this.isLoading)&&this.isAnnotationInEditMode(this.currentAnnotationId())},showSaveButton(){return!(!this.editAnnotation||this.isLoading)&&(!!this.isAnnotation||(this.isAnnotationInEditMode(this.currentAnnotationId())?this.spanSelection&&this.spanSelection.length>0:void 0))},handleMissingAnnotation(){this.label&&this.annotationSet&&(this.isLoading=!0,this.$parent.$emit("handle-missing-annotation",this.label.id,this.labelSet.id,this.annotationSet.id,!1))},handleSaveChanges(e=!1){if(!this.publicView&&!this.isDocumentReviewed)if(this.annotation&&(this.showAcceptButton()||this.showDeclineButton()||this.isAnnotationInEditMode(this.currentAnnotationId(),this.editAnnotation.index))){let t=[],n=!1;e||Object.keys(this.$refs).forEach((e=>{if(e.includes(`span_${this.annotation.id}`)){const o=this.$refs[e][0];if(!o)return;const i=o.createSpan();i&&(n=i.is_custom,t.push(i))}})),n?this.$buefy.dialog.confirm({container:"#app .dv-ui-app-container",canCancel:["button"],message:this.$t("edit_ann_content_warning"),onConfirm:()=>this.saveAnnotationChanges(t,e),onCancel:()=>this.handleCancelButton()}):this.saveAnnotationChanges(t,e)}else!this.annotation&&this.isAnnotationInEditMode(this.currentAnnotationId())&&this.saveEmptyAnnotationChanges()},handleRestore(){this.isLoading=!0;const e=this.missingAnnotations.find((e=>e.annotation_set===this.annotationSet.id&&e.label===this.label.id&&e.label_set===this.labelSet.id));this.$store.dispatch("document/deleteMissingAnnotation",e.id).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})})).finally((()=>{this.isLoading=!1,this.closedTag=null}))},saveAnnotationChanges(e,t){if(setTimeout((()=>{this.isLoading=!0}),100),!t&&(this.editAnnotation.annotationSet&&(this.editAnnotation.annotationSet.id!==this.annotationSet.id||null==this.editAnnotation.annotationSet.id&&this.labelSet.id!==this.editAnnotation.labelSet.id)||this.editAnnotation.label&&this.editAnnotation.label.id!==this.label.id))this.$store.dispatch("document/deleteAnnotation",{annotationId:this.annotation.id}).then((()=>{const t={document:this.documentId,span:e,label:this.editAnnotation.label.id,is_correct:!0,revised:!1};this.editAnnotation.annotationSet.id?t.annotation_set=this.editAnnotation.annotationSet.id:t.label_set=this.editAnnotation.labelSet.id,this.$store.dispatch("document/createAnnotation",{annotation:t}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("error_creating_annotation")})})).finally((()=>{this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"),this.loading=!1}))}));else{let n,o;t||0===e.length?o="document/deleteAnnotation":(o="document/updateAnnotation",n={is_correct:!0,revised:!0,span:e}),this.$store.dispatch(o,{updatedValues:n,annotationId:this.annotation.id,annotationSet:this.annotationSet}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})})).finally((()=>{this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"),this.isLoading=!1}))}},saveEmptyAnnotationChanges(){let e;e=this.annotationSet&&this.annotationSet.id?{document:this.documentId,span:this.spanSelection,label:this.label.id,annotation_set:this.annotationSet.id,is_correct:!0,revised:!1}:{document:this.documentId,span:this.spanSelection,label:this.label.id,label_set:this.labelSet.id,is_correct:!0,revised:!1},this.isLoading=!0,this.$store.dispatch("document/createAnnotation",{annotation:e}).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})})).finally((()=>{this.$store.dispatch("document/resetEditAnnotation"),this.handleCancelButton()}))},handleCancelButton(){this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"),this.isLoading=!1},enableLoading(e){if(e&&this.annotation&&!this.annotation.is_correct){const t=e.find((e=>e===this.annotation.id));return t?void(this.isLoading=!0):void(this.isLoading=!1)}this.annotationsMarkedAsMissing?this.annotationsMarkedAsMissing.length>0&&this.annotationsMarkedAsMissing.map((e=>{if(e.label_set===this.labelSet.id&&e.annotation_set===this.annotationSet.id&&e.label===this.label.id){if(this.hoveredAnnotationSet)return void(this.isLoading=!0);if(!this.hoveredAnnotationSet&&e.label===this.label.id)return void(this.isLoading=!0)}})):this.isLoading=!1},editAnnotationTranslation(e){if(!e||this.isDocumentReviewed)return;const t=Ae.FILE_URL?Ae.FILE_URL:Ae.DEFAULT_URL,n=`${t}/admin/server/sequenceannotation/${e}/change/`;window.open(n,"_blank")},searchLabelInDocument(){this.label&&(this.$store.dispatch("display/enableSearch",!0),this.$store.dispatch("display/setCurrentSearch",this.label.name))},copyAnnotationLink(){this.annotation&&(this.$store.dispatch("document/setAnnotationId",this.annotation.id),navigator.clipboard.writeText(window.location.href),this.$buefy.toast.open({container:"#app .dv-ui-app-container",message:this.$t("copied")}))},selectAnnotation(e){e.stopPropagation(),this.annotation&&this.$store.dispatch("document/setAnnotationId",this.annotation.id)}}},Hs=(0,$.A)(Fs,[["render",da],["__scopeId","data-v-e1003d16"]]),zs=Hs,Us={name:"DocumentLabel",components:{AnnotationRow:zs},props:{label:{type:Object,required:!0},annotationSet:{type:Object,default:null},labelSet:{type:Object,required:!0}},computed:{...(0,s.aH)("document",["annotationId","publicView"]),...(0,s.L8)("document",["numberOfAcceptedAnnotationsInLabel","isLabelMultiFalseAndGroupOfAnns"])},methods:{annotationsToShow(){return this.isLabelMultiFalseAndGroupOfAnns(this.label)?[this.label.annotations[0]]:this.label.annotations},labelHasPendingAnnotations(e){if(!e)return;const t=this.label.annotations.find((e=>!e.is_correct));return this.annotationSet.id===e.annotationSet.id&&t}}},Zs=(0,$.A)(Us,[["render",Ki],["__scopeId","data-v-2422371a"]]),Gs=Zs,Ws={class:"annotation-options"},qs={id:"annotation-search"},js={id:"annotation-filters"};function Ks(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-taginput"),r=(0,o.resolveComponent)("b-field"),c=(0,o.resolveComponent)("b-switch");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Ws,[(0,o.createElementVNode)("div",qs,[(0,o.createVNode)(r,null,{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{modelValue:a.search,"onUpdate:modelValue":t[0]||(t[0]=e=>a.search=e),ellipsis:"",attached:"",icon:"search",placeholder:e.$t("search")},{tag:(0,o.withCtx)((e=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(s.labelNameForAnnotationId(e.tag)||e.tag),1)])),_:1},8,["modelValue","placeholder"])])),_:1})]),(0,o.createElementVNode)("div",js,[(0,o.createVNode)(c,{modelValue:e.annotationFilters.showFeedbackNeeded,"onUpdate:modelValue":t[1]||(t[1]=t=>e.annotationFilters.showFeedbackNeeded=t),class:"is-small"},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("human_feedback_needed")),1)])),_:1},8,["modelValue"]),(0,o.createVNode)(c,{modelValue:e.annotationFilters.showEmpty,"onUpdate:modelValue":t[2]||(t[2]=t=>e.annotationFilters.showEmpty=t),class:"is-small"},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("label_missing_annotations")),1)])),_:1},8,["modelValue"]),(0,o.createVNode)(c,{modelValue:e.annotationFilters.showAccepted,"onUpdate:modelValue":t[3]||(t[3]=t=>e.annotationFilters.showAccepted=t),class:"is-small"},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("accepted_annotations")),1)])),_:1},8,["modelValue"])])])}const Ys={name:"AnnotationFilters",data(){return{search:[]}},computed:{...(0,s.aH)("document",["annotationSets","annotationFilters","annotationSearch"]),...(0,s.L8)("document",["annotationById","labelOfAnnotation"])},watch:{search(){this.search.length>0&&this.$emit("openAll"),this.search!=this.annotationSearch&&this.$store.dispatch("document/setAnnotationSearch",this.search)}},mounted(){this.search=this.annotationSearch},methods:{labelNameForAnnotationId(e){const t=this.annotationById(Number(e));if(t){const e=this.labelOfAnnotation(t);if(e)return e.name}return!1}}},Js=(0,$.A)(Ys,[["render",Ks],["__scopeId","data-v-e268669e"]]),Xs=Js,Qs={class:"annotations-skeleton"},el={class:"label-set-name-skeleton"};function tl(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton"),r=(0,o.resolveComponent)("LoadingLabels");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Qs,[(0,o.createElementVNode)("div",el,[(0,o.createVNode)(l,{width:"20%",height:"8px"})]),((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(a.numberOfLabelRows,(e=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:e},[(0,o.createVNode)(r)])))),128))])}const nl={class:"label-properties-skeleton"},ol={class:"loading-left"},il={class:"circle"},al={class:"label-skeleton"},sl={class:"loading-right"};function ll(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton");return(0,o.openBlock)(),(0,o.createElementBlock)("div",nl,[(0,o.createElementVNode)("div",ol,[(0,o.createElementVNode)("div",il,[(0,o.createVNode)(l,{circle:"",width:"16px",height:"16px"})]),(0,o.createElementVNode)("div",al,[(0,o.createVNode)(l,{width:"70%",height:"8px"})])]),(0,o.createElementVNode)("div",sl,[(0,o.createVNode)(l,{width:"80%",height:"8px"})])])}const rl={name:"LoadingLabels"},cl=(0,$.A)(rl,[["render",ll],["__scopeId","data-v-07542bd0"]]),dl=cl,hl={name:"LoadingAnnotations",components:{LoadingLabels:dl},data(){return{numberOfLabelRows:7}}},ul=(0,$.A)(hl,[["render",tl],["__scopeId","data-v-90b74e8e"]]),ml=ul,pl={components:{EmptyState:wi,ExtractingData:Ri,AnnotationSetActionButtons:Zi,DocumentLabel:Gs,LoadingAnnotations:ml,AnnotationFilters:Xs},data(){return{count:0,jumpToNextAnnotation:!1,numberOfLoadingAnnotations:3,annotationSetsAccordion:null}},computed:{...(0,s.aH)("display",["showAnnSetTable","showBranding"]),...(0,s.aH)("edit",["editMode"]),...(0,s.aH)("document",["annotationSets","documentId","annotationId","annotationSetId","recalculatingAnnotations","publicView","editAnnotation","loading","labels","selectedDocument","splittingSuggestions"]),...(0,s.L8)("document",["numberOfAnnotationSetGroup","getAnnotationsFiltered","emptyLabels","notCorrectAnnotations","isDocumentReviewed","annotationSetOfAnnotation","isAnnotationInAnnotationSet","isSearchingAnnotationList"]),isAnnotationBeingEdited(){return this.editAnnotation&&this.editAnnotation.id},isDocumentEditable(){return!this.publicView&&!this.isDocumentReviewed&&!this.editMode}},watch:{editAnnotation(e){e||this.jumpToNextAnnotation||(this.count=0)},acceptAnnotation(e,t){!e&&t&&(this.focusOnNextAnnotation(),this.jumpToNextAnnotation=!1)},getAnnotationsFiltered(e,t){e.annotationSets.length!==t.annotationSets.length&&this.loadAccordions(e.annotationSets,t.annotationSets)},annotationId(e){if(e){const t=this.annotationSetOfAnnotation(e);if(t){const e={...this.annotationSetsAccordion};e[t.id||t.label_set.id]=!0,this.annotationSetsAccordion=e}}}},created(){window.addEventListener("keydown",this.keyDownHandler),this.getAnnotationsFiltered.annotationSets&&this.getAnnotationsFiltered.annotationSets.length>0&&this.loadAccordions(this.getAnnotationsFiltered.annotationSets)},unmounted(){window.removeEventListener("keydown",this.keyDownHandler)},methods:{annotationSetShouldAppear(e){return!(0===e.labels.length&&this.isSearchingAnnotationList)},isAccordionOpen(e){return this.isSearchingAnnotationList||!0===this.annotationSetsAccordion[e.id||e.label_set.id]},toggleAccordion(e){const t={...this.annotationSetsAccordion};t[e.id||e.label_set.id]=!t[e.id||e.label_set.id],this.annotationSetsAccordion=t},openAllAccordions(){const e={...this.annotationSetsAccordion};for(var t in e)e[t]=!0;this.annotationSetsAccordion=e},loadAccordions(e){if(e){const t=null===this.annotationSetsAccordion,n={},o=[];e.forEach(((e,i)=>{if(t&&this.annotationSetId)n[e.id||e.label_set.id]=e.id==this.annotationSetId;else if(t&&this.annotationId)n[e.id||e.label_set.id]=this.isAnnotationInAnnotationSet(e,this.annotationId);else if(t&&0===i)n[e.id||e.label_set.id]=!0;else{const t=o.find((t=>t.id&&e.id&&e.id===t.id));n[e.id||e.label_set.id]=void 0!==t}})),this.annotationSetsAccordion=n}},annotationSetHasAnnotations(e){const t=e.labels.find((e=>e.annotations.length>0));return t},focusOnNextAnnotation(){const e=this.createArray("keyboard-nav");e[this.count]?e[this.count].click():this.count=0},scrollToFocusedAnnotationFromKeyHandler(){if(!this.editAnnotation)return;let e;this.labels.map((t=>{const n=t.annotations.find((e=>e.id===this.editAnnotation.id));n&&(e=t)}));const t=this.getAnnotationsFiltered.annotations.find((e=>e.id===this.editAnnotation.id));t&&(this.$store.dispatch("document/setDocumentAnnotationSelected",{annotation:t,label:e,span:t.span[0],scrollTo:!1}),this.$store.dispatch("document/scrollToDocumentAnnotationSelected"))},exitEditMode(){this.count=0,this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection"),this.$store.dispatch("document/endLoading")},createArray(e){if(this.$refs.annotationList)return Array.from(this.$refs.annotationList.getElementsByClassName(e))},keyDownHandler(e){if(!this.isDocumentEditable)return;if("Escape"===e.key)return void this.exitEditMode();if("ArrowUp"===e.key&&!this.isAnnotationBeingEdited)return;let t=this.createArray("keyboard-nav");const n=this.createArray("clicked-ann"),o=t.findIndex((e=>e===n[0]));if("ArrowDown"===e.key){if(this.openAllAccordions(),this.count>=t.length){const t=this.createArray("finish-review-btn");return t&&t[0]&&t[0].focus(),this.$store.dispatch("document/resetEditAnnotation"),this.count=0,void("Enter"!==e.key||t.disabled||t.click())}n[0]&&(this.count=o+1);const i=t[this.count];i.className.includes("label-group")?(i.click(),this.$nextTick((()=>{t=this.createArray("keyboard-nav"),t[this.count].click(),this.scrollToFocusedAnnotationFromKeyHandler(),this.count++}))):t[this.count]&&(t[this.count].click(),this.scrollToFocusedAnnotationFromKeyHandler(),this.count++)}else if("ArrowUp"===e.key){if(n[0]===t[0])return void(this.count=0);n[0]&&(this.count=o-1);const e=t[this.count];e.className.includes("label-group")?(e.click(),this.$nextTick((()=>{t=this.createArray("keyboard-nav");const e=t.findIndex((e=>e===n[0]));this.count=e-1,t[this.count].click(),this.scrollToFocusedAnnotationFromKeyHandler(),this.count--}))):t[this.count]&&(t[this.count].click(),this.scrollToFocusedAnnotationFromKeyHandler(),this.count--)}else if("Enter"===e.key){if(!this.getAnnotationsFiltered.annotations||!this.editAnnotation)return;const e=this.getAnnotationsFiltered.annotations.find((e=>e.id===this.editAnnotation.id));if(!this.editAnnotation&&this.editAnnotation.id!==e.id)return;this.count=o+1,this.jumpToNextAnnotation=!0}else{if("Delete"!==e.key||!t[o].className.includes("label-empty")||!t[o].className.includes("clicked"))return;this.editAnnotation.id===t[o].id&&this.markAnnotationsAsMissing(),this.jumpToNextAnnotation=!0}},markAnnotationsAsMissing(e,t,n,o){let i;if(e&&t&&!o)i=[{document:parseInt(this.documentId),label:e,label_set:t,annotation_set:n}];else if(this.editAnnotation&&null!==this.editAnnotation.id&&this.editAnnotation.annotationSet)i=[{document:parseInt(this.documentId),label:this.editAnnotation.label.id,label_set:this.editAnnotation.labelSet.id,annotation_set:this.editAnnotation.annotationSet.id}];else if(n&&o){const e=this.emptyLabels(n);i=e.map((e=>({document:parseInt(this.documentId),label:e.id,label_set:n.label_set.id,annotation_set:n.id})))}this.$store.dispatch("document/setAnnotationsMarkedAsMissing",i),this.$store.dispatch("document/addMissingAnnotations",i).then((e=>{e&&(this.jumpToNextAnnotation=!0),this.jumpToNextAnnotation=!1})).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})})).finally((()=>{this.$store.dispatch("document/setAnnotationsMarkedAsMissing",null),this.$store.dispatch("document/resetEditAnnotation"),this.$store.dispatch("selection/disableSelection")}))},handleHoverAnnotationSet(e,t){let n;n=t||e?{annotationSet:e,type:t}:null,this.$store.dispatch("document/setHoveredAnnotationSet",n)},acceptPendingAnnotationsInAnnotationSet(e){const t=[];if(e.labels.map((e=>{0!==e.annotations.length&&e.annotations.map((e=>{e.revised||t.push(e.id)}))})),0!==t.length){const e={ids:t,is_correct:!0,revised:!0};this.$store.dispatch("document/updateMultipleAnnotations",e).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})}))}},openAnnotationSetTable(e){this.$store.dispatch("selection/disableSelection"),this.$store.dispatch("document/resetEditAnnotation"),this.showAnnSetTable&&this.showAnnSetTable===e?this.$store.dispatch("display/toggleAnnSetTable",e):this.$store.dispatch("display/showAnnSetTable",e)},cleanSelection(){this.$store.dispatch("document/setAnnotationId",null)}}},gl=(0,$.A)(pl,[["render",mi],["__scopeId","data-v-309cdd6e"]]),Cl=gl,_l={class:"choose-label-set-modal"},bl={class:"modal-card-body"},El={class:"content"},Sl={key:0},fl=["innerHTML"],vl={key:1},Al={class:"label-set-list"},kl={class:"labels-list"},Nl={class:"next-step-description"};function wl(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button"),r=(0,o.resolveComponent)("b-modal");return(0,o.openBlock)(),(0,o.createElementBlock)("section",_l,[(0,o.createVNode)(r,{ref:"modal",modelValue:a.show,"onUpdate:modelValue":t[0]||(t[0]=e=>a.show=e),"can-cancel":["x","outside"],class:"modal-absolute modal-400 modal-no-footer model-overflow-visible","on-cancel":s.close},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("section",bl,[(0,o.createElementVNode)("div",El,[(0,o.createElementVNode)("h3",null,(0,o.toDisplayString)(e.$t("new_ann_set_title")),1),(0,o.createElementVNode)("div",null,[0===e.labelSetsFilteredForAnnotationSetCreation.length?((0,o.openBlock)(),(0,o.createElementBlock)("div",Sl,[(0,o.createElementVNode)("p",{innerHTML:`${e.$t("no_multi_ann_labelset_model")}\n ${e.showBranding?e.$t("no_multi_ann_labelset_model_link"):""}`},null,8,fl)])):((0,o.openBlock)(),(0,o.createElementBlock)("div",vl,[(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("new_ann_set_description")),1),(0,o.createElementVNode)("div",Al,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.labelSetsFilteredForAnnotationSetCreation,(t=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:t.id,class:"label-set-list-row"},[(0,o.createVNode)(l,{class:"full-width",type:"is-secondary",onClick:e=>s.submit(t)},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(`${t.name} ${e.numberOfLabelSetGroup(t)}`),1)])),_:2},1032,["onClick"]),(0,o.createElementVNode)("div",kl,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(t.labels,((e,n)=>((0,o.openBlock)(),(0,o.createElementBlock)("span",{key:e.id},(0,o.toDisplayString)(`${e.name}${n+1!==t.labels.length?", ":""}`),1)))),128))])])))),128))]),(0,o.createElementVNode)("p",Nl,(0,o.toDisplayString)(e.$t("new_ann_set_hint")),1)]))])])])])),_:1},8,["modelValue","on-cancel"])])}const yl={name:"CreateAnnotationSetModal",data(){return{show:!0}},computed:{...(0,s.aH)("display",["showBranding"]),...(0,s.L8)("document",["numberOfLabelSetGroup","labelSetsFilteredForAnnotationSetCreation"])},methods:{submit(e){this.$emit("finish",e),this.close()},close(){this.$store.dispatch("display/showChooseLabelSetModal",null),this.$emit("close")}}},Tl=(0,$.A)(yl,[["render",wl],["__scopeId","data-v-565aea8a"]]),Bl=Tl;const Dl={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ll(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Dl,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M4.5 4.94922C4.30222 4.94922 4.10888 5.00787 3.94443 5.11775C3.77998 5.22763 3.65181 5.38381 3.57612 5.56654C3.50043 5.74926 3.48063 5.95033 3.51922 6.14431C3.5578 6.33829 3.65304 6.51647 3.79289 6.65633C3.93275 6.79618 4.11093 6.89142 4.30491 6.93C4.49889 6.96859 4.69996 6.94879 4.88268 6.8731C5.06541 6.79741 5.22159 6.66924 5.33147 6.50479C5.44135 6.34034 5.5 6.147 5.5 5.94922C5.5 5.684 5.39464 5.42965 5.20711 5.24211C5.01957 5.05458 4.76522 4.94922 4.5 4.94922ZM4.5 8.44922C4.30222 8.44922 4.10888 8.50787 3.94443 8.61775C3.77998 8.72763 3.65181 8.88381 3.57612 9.06654C3.50043 9.24926 3.48063 9.45033 3.51922 9.64431C3.5578 9.83829 3.65304 10.0165 3.79289 10.1563C3.93275 10.2962 4.11093 10.3914 4.30491 10.43C4.49889 10.4686 4.69996 10.4488 4.88268 10.3731C5.06541 10.2974 5.22159 10.1692 5.33147 10.0048C5.44135 9.84034 5.5 9.647 5.5 9.44922C5.5 9.184 5.39464 8.92965 5.20711 8.74211C5.01957 8.55458 4.76522 8.44922 4.5 8.44922ZM8 3.44922C8.19778 3.44922 8.39112 3.39057 8.55557 3.28069C8.72002 3.17081 8.84819 3.01463 8.92388 2.8319C8.99957 2.64918 9.01937 2.44811 8.98079 2.25413C8.9422 2.06015 8.84696 1.88196 8.70711 1.74211C8.56725 1.60226 8.38907 1.50702 8.19509 1.46843C8.00111 1.42985 7.80004 1.44965 7.61732 1.52534C7.43459 1.60103 7.27841 1.7292 7.16853 1.89365C7.05865 2.0581 7 2.25144 7 2.44922C7 2.71444 7.10536 2.96879 7.29289 3.15633C7.48043 3.34386 7.73478 3.44922 8 3.44922ZM4.5 1.44922C4.30222 1.44922 4.10888 1.50787 3.94443 1.61775C3.77998 1.72763 3.65181 1.88381 3.57612 2.06654C3.50043 2.24926 3.48063 2.45033 3.51922 2.64431C3.5578 2.83829 3.65304 3.01647 3.79289 3.15633C3.93275 3.29618 4.11093 3.39142 4.30491 3.43C4.49889 3.46859 4.69996 3.44879 4.88268 3.3731C5.06541 3.29741 5.22159 3.16924 5.33147 3.00479C5.44135 2.84034 5.5 2.647 5.5 2.44922C5.5 2.184 5.39464 1.92965 5.20711 1.74211C5.01957 1.55458 4.76522 1.44922 4.5 1.44922ZM8 8.44922C7.80222 8.44922 7.60888 8.50787 7.44443 8.61775C7.27998 8.72763 7.15181 8.88381 7.07612 9.06654C7.00043 9.24926 6.98063 9.45033 7.01922 9.64431C7.0578 9.83829 7.15304 10.0165 7.29289 10.1563C7.43275 10.2962 7.61093 10.3914 7.80491 10.43C7.99889 10.4686 8.19996 10.4488 8.38268 10.3731C8.56541 10.2974 8.72159 10.1692 8.83147 10.0048C8.94135 9.84034 9 9.647 9 9.44922C9 9.184 8.89464 8.92965 8.70711 8.74211C8.51957 8.55458 8.26522 8.44922 8 8.44922ZM8 4.94922C7.80222 4.94922 7.60888 5.00787 7.44443 5.11775C7.27998 5.22763 7.15181 5.38381 7.07612 5.56654C7.00043 5.74926 6.98063 5.95033 7.01922 6.14431C7.0578 6.33829 7.15304 6.51647 7.29289 6.65633C7.43275 6.79618 7.61093 6.89142 7.80491 6.93C7.99889 6.96859 8.19996 6.94879 8.38268 6.8731C8.56541 6.79741 8.72159 6.66924 8.83147 6.50479C8.94135 6.34034 9 6.147 9 5.94922C9 5.684 8.89464 5.42965 8.70711 5.24211C8.51957 5.05458 8.26522 4.94922 8 4.94922Z",fill:"white"},null,-1)]))}const Vl={},xl=(0,$.A)(Vl,[["render",Ll]]),Ml=xl,Il=((0,s.aH)("display",["showAnnSetTable"]),(0,s.aH)("document",["annotations"]),{key:0,class:"pages-section"}),Ol={class:"info-bar"},Pl={key:1,class:"rename-and-categorize-section"},$l={key:2,class:"sidebar"},Rl={class:"confirmation-modal-container"};function Fl(e,t,n,i,a,s){const l=(0,o.resolveComponent)("EditPages"),r=(0,o.resolveComponent)("SplitInfoBar"),c=(0,o.resolveComponent)("RenameAndCategorize"),d=(0,o.resolveComponent)("EditSidebar"),h=(0,o.resolveComponent)("EditConfirmationModal");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{id:"document-edit",class:(0,o.normalizeClass)([e.renameAndCategorize&&"rename-and-categorize-component"])},[e.renameAndCategorize?((0,o.openBlock)(),(0,o.createElementBlock)("div",Pl,[(0,o.createVNode)(c,{"file-name":a.fileName,"file-extension":a.fileExtension,onChangePage:s.changePage},null,8,["file-name","file-extension","onChangePage"])])):((0,o.openBlock)(),(0,o.createElementBlock)("div",Il,[(0,o.createVNode)(l,{"splitting-lines":a.splittingLines,"split-suggestions-enabled":a.splitSuggestionsEnabled,onHandleSplittingLines:s.handleSplittingLines,onCheckMove:s.checkMove,onHandleDragEnd:s.handleDragEnd},null,8,["splitting-lines","split-suggestions-enabled","onHandleSplittingLines","onCheckMove","onHandleDragEnd"]),(0,o.createElementVNode)("div",Ol,[a.splitSuggestionsEnabled?((0,o.openBlock)(),(0,o.createBlock)(r,{key:0})):(0,o.createCommentVNode)("",!0)])])),e.renameAndCategorize?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",$l,[(0,o.createVNode)(d,{"split-suggestions-enabled":a.splitSuggestionsEnabled,onRotate:s.rotatePage,onRotateAllLeft:s.handleRotationsToTheLeft,onRotateAllRight:s.handleRotationsToTheRight,onHandleSplittingSuggestions:s.applySplittingSuggestions},null,8,["split-suggestions-enabled","onRotate","onRotateAllLeft","onRotateAllRight","onHandleSplittingSuggestions"])])),(0,o.createElementVNode)("div",Rl,[(0,o.createVNode)(h,{onSaveChanges:s.saveEditChanges},null,8,["onSaveChanges"])])],2)}const Hl={class:"edit-sidebar"},zl={class:"buttons-container"},Ul={class:"rotate-selected edit-buttons"},Zl={class:"rotate-all edit-buttons"},Gl={class:"smart-split"},Wl={class:"switch-info"},ql={class:"switch-text"};function jl(e,t,n,i,a,s){const l=(0,o.resolveComponent)("SidebarButtons"),r=(0,o.resolveComponent)("b-switch"),c=(0,o.resolveComponent)("b-field"),d=(0,o.resolveComponent)("b-tooltip");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Hl,[(0,o.createElementVNode)("div",zl,[(0,o.createElementVNode)("div",Ul,[(0,o.createVNode)(l,{"show-rotate-button":!0,"button-disabled":a.buttonDisabled,"button-text":e.$t("rotate_selected"),icon:"arrow-rotate-left",onRotate:s.rotateLeft},null,8,["button-disabled","button-text","onRotate"]),(0,o.createVNode)(l,{"show-rotate-button":!0,"button-disabled":a.buttonDisabled,"button-text":e.$t("rotate_selected"),icon:"arrow-rotate-right",onRotate:s.rotateRight},null,8,["button-disabled","button-text","onRotate"]),(0,o.createElementVNode)("p",{class:(0,o.normalizeClass)(["pages-selected",a.buttonDisabled&&"disabled"])},(0,o.toDisplayString)(e.selectedPages.length)+" "+(0,o.toDisplayString)(e.$t("selected")),3)]),(0,o.createElementVNode)("div",Zl,[(0,o.createVNode)(l,{"show-rotate-button":!0,"button-disabled":!1,"button-text":e.$t("rotate_all"),icon:"arrow-rotate-left",onRotate:s.rotateAllLeft},null,8,["button-text","onRotate"]),(0,o.createVNode)(l,{"show-rotate-button":!0,"button-disabled":!1,"button-text":e.$t("rotate_all"),icon:"arrow-rotate-right",onRotate:s.rotateAllRight},null,8,["button-text","onRotate"])])]),(0,o.createElementVNode)("div",Gl,[(0,o.createVNode)(d,{multilined:"",active:!e.documentHasProposedSplit(e.selectedDocument),position:"is-bottom",class:"bottom-aligned split-tooltip",label:a.tooltipInfo},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(c,null,{default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{modelValue:a.switchStatus,"onUpdate:modelValue":t[0]||(t[0]=e=>a.switchStatus=e),value:!0,size:"is-small",disabled:!e.documentHasProposedSplit(e.selectedDocument),class:"split-switch"},null,8,["modelValue","disabled"]),(0,o.createElementVNode)("div",Wl,[(0,o.createElementVNode)("span",ql,(0,o.toDisplayString)(e.$t("smart_split")),1)])])),_:1})])),_:1},8,["active","label"])])])}const Kl={class:"sidebar-buttons"},Yl={key:0,class:"rotate-button-container"},Jl={class:"button-content"},Xl={class:"button-text"};function Ql(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-button");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Kl,[n.showRotateButton?((0,o.openBlock)(),(0,o.createElementBlock)("div",Yl,[(0,o.createVNode)(r,{class:"rotate-button edit-mode-btn primary-button",disabled:n.buttonDisabled,onClick:s.rotateButton},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",Jl,[(0,o.createVNode)(l,{icon:n.icon,class:"is-small"},null,8,["icon"]),(0,o.createElementVNode)("span",Xl,(0,o.toDisplayString)(n.buttonText),1)])])),_:1},8,["disabled","onClick"])])):(0,o.createCommentVNode)("",!0)])}const er={name:"SidebarButtons",props:{showRotateButton:{type:Boolean,default:!1},buttonDisabled:{type:Boolean,default:!0},buttonText:{type:String,default:null},icon:{type:String,default:null},tooltipInfo:{type:String,default:null}},methods:{rotateButton(){this.$emit("rotate")}}},tr=(0,$.A)(er,[["render",Ql],["__scopeId","data-v-c4cb62fa"]]),nr=tr,or={name:"EditSidebar",components:{SidebarButtons:nr},props:{splitSuggestionsEnabled:{type:Boolean}},data(){return{buttonDisabled:!0,tooltipInfo:null,switchStatus:!0}},computed:{...(0,s.aH)("edit",["selectedPages","updatedDocument"]),...(0,s.aH)("document",["splittingSuggestions","selectedDocument"]),...(0,s.L8)("document",["documentHasProposedSplit"])},watch:{selectedPages(e){e.length>0?this.buttonDisabled=!1:this.buttonDisabled=!0},switchStatus(e){this.splittingSuggestions&&this.splittingSuggestions.length>0&&this.$emit("handle-splitting-suggestions",e)},splitSuggestionsEnabled(e){e||(this.switchStatus=!1)},updatedDocument(e){e&&1===e.length&&(this.switchStatus=!1)}},mounted(){this.$nextTick((()=>{this.switchStatus=this.splitSuggestionsEnabled,this.tooltipInfo=this.$t("no_splitting_suggestions")}))},methods:{rotateLeft(){this.$emit("rotate","left")},rotateRight(){this.$emit("rotate","right")},rotateAllLeft(){this.$emit("rotate-all-left")},rotateAllRight(){this.$emit("rotate-all-right")}}},ir=(0,$.A)(or,[["render",jl],["__scopeId","data-v-bc1216ea"]]),ar=ir,sr={class:"rename-and-categorize"},lr={class:"back-btn-section"},rr={class:"back-text"},cr={class:"rename-and-categorize-title"},dr={class:"new-documents-container"},hr={class:"rename-and-categorize-thumbnails"},ur={class:"split-documents"},mr=["onClick"],pr={class:"icon-container"},gr={class:"action-icon"},Cr={class:"doc-info"},_r={class:"file-name-section"},br=["value","onBlur"],Er={class:"file-extension-container"},Sr={class:"category"};function fr(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-skeleton"),c=(0,o.resolveComponent)("ServerImage"),d=(0,o.resolveComponent)("EyeIcon"),h=(0,o.resolveComponent)("DocumentCategory");return(0,o.openBlock)(),(0,o.createElementBlock)("div",sr,[(0,o.createElementVNode)("div",{class:"back-section",onClick:t[0]||(t[0]=(...e)=>s.handleBackButton&&s.handleBackButton(...e))},[(0,o.createElementVNode)("div",lr,[(0,o.createVNode)(l,{icon:"arrow-left",class:"is-small arrow",style:{color:"#1a1a1a",cursor:"pointer"}})]),(0,o.createElementVNode)("div",rr,(0,o.toDisplayString)(e.$t("rotate_split_reorder")),1)]),(0,o.createElementVNode)("div",cr,(0,o.toDisplayString)(e.$t("rename_and_categorize")),1),(0,o.createElementVNode)("div",dr,[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(e.updatedDocument,((i,l)=>((0,o.openBlock)(),(0,o.createElementBlock)("div",{key:l,class:"document-details"},[(0,o.createElementVNode)("div",hr,[(0,o.createElementVNode)("div",ur,[(0,o.createElementVNode)("div",{class:"image-container",onClick:e=>s.handlePageChange(i.pages[0].number)},[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["thumbnail",i.pages.length>1&&"page-stack"])},[(0,o.createVNode)(c,{ref_for:!0,ref:"image",style:(0,o.normalizeStyle)({transform:"rotate("+s.getRotation(i.pages[0].id)+"deg)"}),"image-url":s.getImageUrl(i),class:"page-thumbnail"},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{width:"60px",height:"60px"})])),_:2},1032,["style","image-url"]),(0,o.createElementVNode)("div",pr,[(0,o.createElementVNode)("div",gr,[(0,o.createVNode)(d)])])],2)],8,mr)])]),(0,o.createElementVNode)("div",Cr,[(0,o.createElementVNode)("div",_r,[(0,o.createElementVNode)("input",{type:"text",class:"name-input",value:s.getFileName(i.name),onInput:t[1]||(t[1]=(...e)=>s.handleInput&&s.handleInput(...e)),onPaste:t[2]||(t[2]=(...e)=>s.handlePaste&&s.handlePaste(...e)),onBlur:e=>s.handleChanges(i)},null,40,br),(0,o.createElementVNode)("div",Er,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(`.${n.fileExtension}`),1)])]),(0,o.createElementVNode)("div",Sr,[(0,o.createVNode)(h,{"selected-document":e.selectedDocument,"split-mode":a.splitMode,page:i,index:l,onCategoryChange:s.handleChanges},null,8,["selected-document","split-mode","page","index","onCategoryChange"])])])])))),128))])])}const vr={ref:"tooltipContent"},Ar={class:"category-drop-down"},kr={class:"icon"},Nr={class:"category-info"},wr={key:0,class:"category-title"},yr={class:"category-name"},Tr={key:0},Br={key:0},Dr={key:1,class:"loading-bar"};function Lr(e,t,n,i,a,s){const l=(0,o.resolveComponent)("CategoryIcon"),r=(0,o.resolveComponent)("b-icon"),c=(0,o.resolveComponent)("b-dropdown-item"),d=(0,o.resolveComponent)("b-dropdown"),h=(0,o.resolveComponent)("b-tooltip"),u=(0,o.resolveComponent)("b-skeleton");return e.categories?((0,o.openBlock)(),(0,o.createBlock)(h,{key:0,multilined:"",active:a.tooltipIsShown||a.dropdownIsDisabled,size:"is-large",position:"is-bottom",class:(0,o.normalizeClass)([e.editMode?"right-aligned full-height-tooltip":"left-aligned full-height-tooltip"])},{content:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",vr,null,512)])),default:(0,o.withCtx)((()=>[(0,o.createVNode)(d,{class:(0,o.normalizeClass)(["category-chooser",n.splitMode&&"split-mode",e.isDocumentReviewed&&"disabled"]),"aria-role":"list",scrollable:"",disabled:a.dropdownIsDisabled},{trigger:(0,o.withCtx)((()=>[(0,o.createElementVNode)("div",Ar,[(0,o.createElementVNode)("div",kr,[(0,o.createVNode)(l)]),(0,o.createElementVNode)("div",Nr,[n.splitMode?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("p",wr,(0,o.toDisplayString)(e.$t("category")),1)),(0,o.createElementVNode)("div",yr,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(s.setCategoryDefaultText),1),n.splitMode&&s.setCategoryConfidence>=0?((0,o.openBlock)(),(0,o.createElementBlock)("span",Tr,(0,o.toDisplayString)(`(${s.setCategoryConfidence}%)`),1)):(0,o.createCommentVNode)("",!0)])]),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)([!n.splitMode&&"caret-section"])},[(0,o.createVNode)(r,{icon:"angle-down",size:"is-small",class:(0,o.normalizeClass)(["caret",n.splitMode&&"split-mode-caret"])},null,8,["class"])],2)])])),default:(0,o.withCtx)((()=>[((0,o.openBlock)(!0),(0,o.createElementBlock)(o.Fragment,null,(0,o.renderList)(s.listOfCategories(),(e=>((0,o.openBlock)(),(0,o.createBlock)(c,{key:e.id,"aria-role":"listitem",class:"list-item",disabled:s.handleOptionInDropdownDisabled(e),onClick:t=>s.handleChangeCategory(e)},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.name),1),n.splitMode&&e.confidence>=0?((0,o.openBlock)(),(0,o.createElementBlock)("span",Br,(0,o.toDisplayString)(` (${e.confidence}%)`),1)):(0,o.createCommentVNode)("",!0)])),_:2},1032,["disabled","onClick"])))),128))])),_:1},8,["class","disabled"])])),_:1},8,["active","class"])):((0,o.openBlock)(),(0,o.createElementBlock)("div",Dr,[(0,o.createVNode)(u,{width:"auto",height:"100%"})]))}const Vr={name:"DocumentCategory",components:{CategoryIcon:H},props:{splitMode:{type:Boolean},page:{type:Object,default:null},index:{type:Number,default:0}},data(){return{categoryError:!1,tooltipIsShown:!1,dropdownIsDisabled:!1}},computed:{...(0,s.L8)("category",["categoryName","projectHasSingleCategory","categoryConfidence"]),...(0,s.L8)("document",["documentCannotBeEdited","documentHasCorrectAnnotations","isDocumentReviewed"]),...(0,s.aH)("document",["selectedDocument","annotations"]),...(0,s.aH)("category",["categories"]),...(0,s.aH)("edit",["editMode","updatedDocument"]),setCategoryDefaultText(){if(this.splitMode){const e=this.updatedDocument.find((e=>!e.category));if(this.projectHasSingleCategory&&e){const e=this.updatedDocument.map((e=>(!e.category&&this.categories&&(e.category=this.categories[0].id),e)));this.$store.dispatch("edit/setUpdatedDocument",e)}const t=this.categoryName(this.updatedDocument[this.index].category);return t||this.$t("choose_category")}return this.categoryName(this.selectedDocument.category)},setCategoryConfidence(){if(!this.updatedDocument[this.index].categories||!this.categoryName(this.updatedDocument[this.index].category))return;const e=this.updatedDocument[this.index].categories.find((e=>e.id===this.updatedDocument[this.index].category));return this.categoryConfidence(e.confidence)}},watch:{annotations(){this.checkIfDropdownIsDisabled(),this.setTooltipText()}},mounted(){this.projectHasSingleCategory&&(this.tooltipIsShown=!0)},updated(){this.setTooltipText(),this.checkIfDropdownIsDisabled()},methods:{listOfCategories(){let e;if(this.splitMode&&this.updatedDocument[this.index].categories)e=this.handleCategories(this.updatedDocument[this.index].categories);else if(this.categories){const t=this.categories.filter((e=>e.project===this.selectedDocument.project));e=this.handleCategories(t)}return e},handleCategories(e){return e.map((e=>({id:e.id,name:this.categoryName(e.id),confidence:this.categoryConfidence(e.confidence)})))},checkIfDropdownIsDisabled(){this.projectHasSingleCategory||this.documentCannotBeEdited(this.selectedDocument)||this.documentHasCorrectAnnotations&&!this.splitMode?this.dropdownIsDisabled=!0:this.dropdownIsDisabled=!1},handleOptionInDropdownDisabled(e){return this.splitMode?e.id===this.updatedDocument[this.index].category:e.id===this.selectedDocument.category},handleChangeCategory(e){const t={category:e.id};if(!this.splitMode)return this.$store.dispatch("document/startRecalculatingAnnotations"),void this.$store.dispatch("document/updateDocument",t).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})})).finally((()=>{this.$store.dispatch("document/endRecalculatingAnnotations")}));this.$emit("category-change",this.page,e.id)},setTooltipText(){if(this.categories){let e;this.documentCannotBeEdited(this.selectedDocument)?e=this.$t("edit_not_available"):this.documentHasCorrectAnnotations?e=this.$t("approved_annotations"):this.projectHasSingleCategory&&(e=this.$t("single_category_in_project")),this.$refs.tooltipContent.innerHTML=e}}}},xr=(0,$.A)(Vr,[["render",Lr],["__scopeId","data-v-00b8045a"]]),Mr=xr,Ir={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Or(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Ir,t[0]||(t[0]=[(0,o.createElementVNode)("path",{fill:"#FFFFFF",d:"M21.92,11.6C19.9,6.91,16.1,4,12,4S4.1,6.91,2.08,11.6a1,1,0,0,0,0,.8C4.1,17.09,7.9,20,12,20s7.9-2.91,9.92-7.6A1,1,0,0,0,21.92,11.6ZM12,18c-3.17,0-6.17-2.29-7.9-6C5.83,8.29,8.83,6,12,6s6.17,2.29,7.9,6C18.17,15.71,15.17,18,12,18ZM12,8a4,4,0,1,0,4,4A4,4,0,0,0,12,8Zm0,6a2,2,0,1,1,2-2A2,2,0,0,1,12,14Z"},null,-1)]))}const Pr={},$r=(0,$.A)(Pr,[["render",Or]]),Rr=$r,Fr={name:"RenameAndCategorize",components:{DocumentCategory:Mr,ServerImage:we,EyeIcon:Rr},props:{fileName:{type:String,default:""},fileExtension:{type:String,default:""}},data(){return{splitMode:!0,updatedFileName:null}},computed:{...(0,s.aH)("document",["selectedDocument","pages"]),...(0,s.aH)("edit",["updatedDocument","pagesForPostprocess"])},methods:{handleBackButton(){this.$store.dispatch("edit/setRenameAndCategorize",!1)},handlePaste(e){e.preventDefault()},handleInput(e){this.updatedFileName=e.target.value.trim()},handleChanges(e,t){const n=this.updatedDocument.map((n=>n.pages[0].id===e.pages[0].id?this.updatedFileName?{...n,name:`${this.updatedFileName}.${this.fileExtension}`}:t?{...n,category:t}:n:n));this.$store.dispatch("edit/setUpdatedDocument",n),this.updatedFileName&&(this.updatedFileName=null)},handlePageChange(e){this.$emit("change-page",e)},getFileName(e){if(e)return e.split(".").slice(0,-1).join(".")},getImageUrl(e){if(!this.pagesForPostprocess||!this.pages||!e)return;const t=this.pagesForPostprocess.find((t=>t.number===e.pages[0].number));return`${t.thumbnail_url}?${t.updated_at}`},getRotation(e){return this.pagesForPostprocess?.find((t=>t.id===e))?.angle}}},Hr=(0,$.A)(Fr,[["render",fr],["__scopeId","data-v-7b950a9d"]]),zr=Hr,Ur={class:"edit-pages"},Zr={class:"grid-header"},Gr={class:"header-title"},Wr=["id"],qr={class:"top-section"},jr=["onClick"],Kr={class:"scissors-icon"},Yr={key:0,class:"lines active-split"},Jr={key:1,class:"lines not-active-split"},Xr={class:"bottom-section"},Qr={class:"page-number"};function ec(e,t,n,i,a,s){const l=(0,o.resolveComponent)("EditPageThumbnail"),r=(0,o.resolveComponent)("b-icon"),c=(0,o.resolveComponent)("SplitZigZag"),d=(0,o.resolveComponent)("SplitLines"),h=(0,o.resolveComponent)("draggable");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Ur,[(0,o.createElementVNode)("div",Zr,[(0,o.createElementVNode)("span",Gr,(0,o.toDisplayString)(e.$t("rotate_split_reorder")),1)]),(0,o.createVNode)(h,{modelValue:a.editPages,"onUpdate:modelValue":t[0]||(t[0]=e=>a.editPages=e),class:"document-grid",easing:"cubic-bezier(0.37, 0, 0.63, 1)","item-key":"id",move:s.checkMove,onStart:t[1]||(t[1]=t=>e.dragging=!0),onEnd:s.handleDragEnd},{item:(0,o.withCtx)((({element:e,index:t})=>[((0,o.openBlock)(),(0,o.createElementBlock)("div",{id:e.id,key:e.id,class:"image-section",tabindex:"0"},[(0,o.createElementVNode)("div",qr,[(0,o.createVNode)(l,{page:e,index:t,rotation:s.getRotation(e.id)},null,8,["page","index","rotation"]),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["splitting-lines",n.splittingLines&&n.splittingLines[t].page===e.number&&"active-split"]),onClick:t=>s.handleSplittingLines(e.number,"manual")},[(0,o.createElementVNode)("div",Kr,[(0,o.createVNode)(r,{icon:"scissors",class:"is-small"})]),n.splittingLines&&n.splittingLines[t].page===e.number?((0,o.openBlock)(),(0,o.createElementBlock)("div",Yr,[(0,o.createVNode)(c,{color:n.splittingLines&&n.splittingLines[t].origin&&"AI"===n.splittingLines[t].origin&&n.splitSuggestionsEnabled?"green":"dark"},null,8,["color"])])):((0,o.openBlock)(),(0,o.createElementBlock)("div",Jr,[(0,o.createVNode)(d)]))],10,jr)]),(0,o.createElementVNode)("div",Xr,[(0,o.createElementVNode)("span",Qr,(0,o.toDisplayString)(e.number),1)])],8,Wr))])),_:1},8,["modelValue","move","onEnd"])])}const tc={width:"2",height:"59",viewBox:"0 0 2 59",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function nc(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",tc,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M1 0.908203V58.2693",stroke:"#858C9A","stroke-opacity":"0.4","stroke-linecap":"round","stroke-linejoin":"round","stroke-dasharray":"2 2"},null,-1)]))}const oc={},ic=(0,$.A)(oc,[["render",nc]]),ac=ic,sc={key:0,width:"6",height:"57",viewBox:"0 0 6 57",fill:"none",xmlns:"http://www.w3.org/2000/svg"},lc={key:1,width:"6",height:"52",viewBox:"0 0 6 52",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rc(e,t,n,i,a,s){return(0,o.openBlock)(),(0,o.createElementBlock)("div",null,["dark"===n.color?((0,o.openBlock)(),(0,o.createElementBlock)("svg",sc,t[0]||(t[0]=[(0,o.createElementVNode)("path",{d:"M1 1L5 7.875L1 14.75L5 21.625L1 28.5L5 35.375L1 42.25L5 49.125L1 56",stroke:"#1A1A1A","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(0,o.createCommentVNode)("",!0),"green"===n.color?((0,o.openBlock)(),(0,o.createElementBlock)("svg",lc,t[1]||(t[1]=[(0,o.createElementVNode)("path",{d:"M1 1.67383L5 7.81966L1 13.9655L5 20.1113L1 26.2572L5 32.403L1 38.5488L5 44.6947L1 50.8405",stroke:"#44B78B","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):(0,o.createCommentVNode)("",!0)])}const cc={name:"SplitZigZag",props:{color:{type:String,default:null,required:!1}}},dc=(0,$.A)(cc,[["render",rc]]),hc=dc,uc=["tabindex"],mc={key:0,class:"action-icon"};function pc(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-skeleton"),r=(0,o.resolveComponent)("ServerImage"),c=(0,o.resolveComponent)("EyeIcon"),d=(0,o.resolveComponent)("b-checkbox");return(0,o.openBlock)(),(0,o.createElementBlock)("div",{class:"edit-page-thumbnail",tabindex:n.index,onMouseenter:t[2]||(t[2]=e=>a.isHover=!0),onMouseleave:t[3]||(t[3]=e=>a.isHover=!1)},[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["page-thumbnail",s.isVisible&&"visible",a.checkboxValue&&"selected"]),style:(0,o.normalizeStyle)(`rotate:${n.rotation}deg`),onClick:t[0]||(t[0]=e=>s.selectPage())},[(0,o.createVNode)(r,{"image-url":`${n.page.thumbnail_url}?${n.page.updated_at}`},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(l,{width:"80px",height:"80px"})])),_:1},8,["image-url"]),s.isVisible?((0,o.openBlock)(),(0,o.createElementBlock)("div",mc,[(0,o.createVNode)(c)])):(0,o.createCommentVNode)("",!0)],6),(0,o.withDirectives)((0,o.createVNode)(d,{modelValue:a.checkboxValue,"onUpdate:modelValue":t[1]||(t[1]=e=>a.checkboxValue=e),class:"action-checkbox",onInput:s.checkboxInput},null,8,["modelValue","onInput"]),[[o.vShow,a.isHover||a.checkboxValue]])],40,uc)}const gc={name:"EditPageThumbnail",components:{ServerImage:we,EyeIcon:Rr},props:{page:{required:!0,type:Object,default:null},index:{required:!0,type:Number,default:0},rotation:{required:!1,type:Number,default:0}},data(){return{isHover:!1,checkboxValue:!1}},computed:{...(0,s.aH)("display",["currentPage"]),...(0,s.aH)("edit",["selectedPages"]),...(0,s.L8)("edit",["isPageSelected"]),isVisible(){return this.currentPage===this.page.number},isSelected(){return void 0!==this.isPageSelected(this.page.id)}},watch:{isSelected(){this.checkboxValue=this.isSelected}},mounted(){this.checkboxValue=this.isSelected},methods:{selectPage(e=!this.isSelected){this.changePage(),this.$store.dispatch(e?"edit/selectPage":"edit/unselectPage",this.page)},checkboxInput(e){this.selectPage(e)},changePage(){this.isVisible||this.$store.dispatch("display/updateCurrentPage",parseInt(this.page.number,10))}}},Cc=(0,$.A)(gc,[["render",pc],["__scopeId","data-v-3284908e"]]),_c=Cc;var bc=n(432),Ec=n.n(bc);const Sc={name:"EditPages",components:{SplitLines:ac,SplitZigZag:hc,EditPageThumbnail:_c,draggable:Ec()},props:{splittingLines:{type:Array,default:null},splitSuggestionsEnabled:{type:Boolean,default:!1}},data(){return{editPages:null}},computed:{...(0,s.aH)("document",["pages","recalculatingAnnotations","selectedDocument","splittingSuggestions"]),...(0,s.aH)("edit",["editMode","pagesForPostprocess","renameAndCategorize"])},watch:{pagesForPostprocess(e,t){e!==t&&(this.editPages=e)},editPages(e,t){e!==t&&this.$store.dispatch("edit/setPagesForPostprocess",e)},renameAndCategorize(e){e&&(this.editPages=this.pagesForPostprocess)}},mounted(){this.pagesForPostprocess.length>0&&(this.editPages=this.pagesForPostprocess)},methods:{deselect(){this.$store.dispatch("edit/setSelectedPages")},getRotation(e){return this.pagesForPostprocess?.find((t=>t.id===e))?.angle},handleSplittingLines(e,t){this.$emit("handle-splitting-lines",e,t)},checkMove(e){this.$emit("check-move",e)},handleDragEnd(){this.draggable=!1,this.$emit("handle-drag-end")}}},fc=(0,$.A)(Sc,[["render",ec],["__scopeId","data-v-233044dc"]]),vc=fc,Ac={class:"split-info-bar"},kc={class:"bar-icon"};function Nc(e,t,n,i,a,s){const l=(0,o.resolveComponent)("StarIcon");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Ac,[(0,o.createElementVNode)("div",kc,[(0,o.createVNode)(l)]),(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("smart_split_suggestions")),1)])}const wc={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function yc(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",wc,t[0]||(t[0]=[(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.99935 0.667969C3.36754 0.667969 3.66602 0.966446 3.66602 1.33464V2.33464H4.66602C5.03421 2.33464 5.33268 2.63311 5.33268 3.0013C5.33268 3.36949 5.03421 3.66797 4.66602 3.66797H3.66602V4.66797C3.66602 5.03616 3.36754 5.33464 2.99935 5.33464C2.63116 5.33464 2.33268 5.03616 2.33268 4.66797V3.66797H1.33268C0.964492 3.66797 0.666016 3.36949 0.666016 3.0013C0.666016 2.63311 0.964492 2.33464 1.33268 2.33464H2.33268V1.33464C2.33268 0.966446 2.63116 0.667969 2.99935 0.667969ZM8.66601 1.33464C8.94186 1.33464 9.18922 1.50452 9.28824 1.76198L10.4444 4.76789C10.6446 5.28859 10.7076 5.43863 10.7936 5.5597C10.88 5.68117 10.9861 5.7873 11.1076 5.87367C11.2287 5.95975 11.3787 6.02268 11.8994 6.22295L14.9053 7.37907C15.1628 7.47809 15.3327 7.72545 15.3327 8.0013C15.3327 8.27715 15.1628 8.52451 14.9053 8.62353L11.8994 9.77965C11.3787 9.97992 11.2287 10.0429 11.1076 10.1289C10.9861 10.2153 10.88 10.3214 10.7936 10.4429C10.7076 10.564 10.6446 10.714 10.4444 11.2347L9.28825 14.2406C9.18922 14.4981 8.94186 14.668 8.66602 14.668C8.39017 14.668 8.14281 14.4981 8.04379 14.2406L6.88767 11.2347C6.6874 10.714 6.62447 10.564 6.53838 10.4429C6.45201 10.3214 6.34588 10.2153 6.22441 10.1289C6.10335 10.0429 5.9533 9.97992 5.4326 9.77965L2.4267 8.62353C2.16923 8.52451 1.99935 8.27715 1.99935 8.0013C1.99935 7.72545 2.16923 7.47809 2.4267 7.37907L5.4326 6.22295C5.9533 6.02268 6.10335 5.95975 6.22441 5.87367C6.34588 5.7873 6.45201 5.68117 6.53838 5.5597C6.62447 5.43863 6.6874 5.28859 6.88767 4.76789L8.04378 1.76198C8.14281 1.50452 8.39017 1.33464 8.66601 1.33464ZM2.99935 10.668C3.36754 10.668 3.66602 10.9664 3.66602 11.3346V12.3346H4.66602C5.03421 12.3346 5.33268 12.6331 5.33268 13.0013C5.33268 13.3695 5.03421 13.668 4.66602 13.668H3.66602V14.668C3.66602 15.0362 3.36754 15.3346 2.99935 15.3346C2.63116 15.3346 2.33268 15.0362 2.33268 14.668V13.668H1.33268C0.964492 13.668 0.666016 13.3695 0.666016 13.0013C0.666016 12.6331 0.964492 12.3346 1.33268 12.3346H2.33268V11.3346C2.33268 10.9664 2.63116 10.668 2.99935 10.668Z",fill:"#41AF85"},null,-1)]))}const Tc={},Bc=(0,$.A)(Tc,[["render",yc]]),Dc=Bc,Lc={name:"SplitInfoBar",components:{StarIcon:Dc}},Vc=(0,$.A)(Lc,[["render",Nc],["__scopeId","data-v-53be5126"]]),xc=Vc,Mc={class:"edit-confirmation-modal"},Ic={class:"modal-card-body"},Oc={class:"header"},Pc={class:"modal-title"},$c={class:"content"},Rc={class:"modal-card-foot"};function Fc(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button"),r=(0,o.resolveComponent)("b-modal");return(0,o.openBlock)(),(0,o.createElementBlock)("section",Mc,[(0,o.createVNode)(r,{modelValue:a.isModalActive,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isModalActive=e),"can-cancel":[],class:"edit-modal"},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("section",Ic,[(0,o.createElementVNode)("div",Oc,[(0,o.createElementVNode)("p",Pc,(0,o.toDisplayString)(e.$t("confirm_splitting")),1)]),(0,o.createElementVNode)("div",$c,(0,o.toDisplayString)(e.$t("splitting_warning")),1)]),(0,o.createElementVNode)("footer",Rc,[(0,o.createVNode)(l,{onClick:s.closeModal},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("no")),1)])),_:1},8,["onClick"]),(0,o.createVNode)(l,{type:"is-primary",onClick:s.confirmChanges},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("yes")),1)])),_:1},8,["onClick"])])])),_:1},8,["modelValue"])])}const Hc={name:"EditConfirmationModal",data(){return{isModalActive:!1}},computed:{...(0,s.aH)("edit",["showEditConfirmationModal"])},watch:{showEditConfirmationModal(e){this.isModalActive=e}},methods:{closeModal(){this.isModalActive=!1,this.$store.dispatch("edit/setShowEditConfirmationModal",!1)},confirmChanges(){this.$emit("save-changes"),this.isModalActive=!1}}},zc=(0,$.A)(Hc,[["render",Fc],["__scopeId","data-v-01991ceb"]]),Uc=zc,Zc={name:"DocumentEdit",components:{EditSidebar:ar,RenameAndCategorize:zr,EditPages:vc,SplitInfoBar:xc,EditConfirmationModal:Uc},data(){return{fileName:null,fileExtension:null,splittingLines:[],dragging:!1,prevPageAtIndex:null,splitSuggestionsEnabled:!1}},computed:{...(0,s.aH)("document",["recalculatingAnnotations","selectedDocument","splittingSuggestions","pages"]),...(0,s.aH)("display",["currentPage"]),...(0,s.aH)("edit",["editMode","pagesForPostprocess","updatedDocument","renameAndCategorize","selectedPages","submitEditChanges"]),...(0,s.aH)("project",["projectId","documentsListPath","currentUser"]),...(0,s.L8)("edit",["documentShouldBePostprocessed"]),...(0,s.L8)("document",["waitingForSplittingConfirmation"])},watch:{renameAndCategorize(e){e&&this.splitFileNameFromExtension()},pagesForPostprocess(e,t){e&&this.saveUpdatedDocuments()},splittingLines(e){const t=e.find((e=>"AI"===e.origin));t||(this.splitSuggestionsEnabled=!1)},submitEditChanges(e){e&&this.saveEditChanges()},updatedDocument(e,t){e&&t&&e.length!==t.length&&1===e.length&&this.saveUpdatedDocuments()}},mounted(){this.setPages()},methods:{setPages(){this.selectedDocument&&(this.$store.dispatch("edit/setPagesForPostprocess",this.createPagesForPostprocess()),this.selectedDocument.pages.length>0&&(this.selectedDocument.pages.map((e=>{e.number!==this.selectedDocument.pages.length?this.setSplittingArray(0,null):this.setSplittingArray(e.number,null)})),this.splittingSuggestions&&(this.splitSuggestionsEnabled=!0,this.setAutomaticSplitting())))},createPagesForPostprocess(){return this.selectedDocument.pages.map((e=>({id:e.id,angle:0,number:e.number,thumbnail_url:e.thumbnail_url,image_url:e.image_url,size:e.size,updated_at:this.selectedDocument.downloaded_at})))},changePage(e){e!=this.currentPage&&this.$store.dispatch("display/updateCurrentPage",parseInt(e,10))},rotatePage(e){this.selectedPages.forEach((t=>{this.$store.dispatch("edit/rotatePage",{page:t,direction:e})}))},handleRotationsToTheLeft(){this.$store.dispatch("edit/updateRotationToTheLeft")},handleRotationsToTheRight(){this.$store.dispatch("edit/updateRotationToTheRight")},setAutomaticSplitting(){this.splittingSuggestions&&this.splittingSuggestions.map((e=>{const t=this.selectedDocument.pages.find((t=>t.id===e.pages[e.pages.length-1].id));this.handleSplittingLines(t.number,"AI")}))},applySplittingSuggestions(e){this.splitSuggestionsEnabled=e,this.setAutomaticSplitting()},setSplittingArray(e,t){this.splittingLines.push({page:e,origin:t})},splitFileNameFromExtension(){(this.selectedDocument||this.selectedDocument.data_file_name)&&(this.fileName=this.selectedDocument.data_file_name.split(".").slice(0,-1).join("."),this.fileExtension=this.selectedDocument.data_file_name.split(".").at(-1))},handleSplittingLines(e,t){const n=this.splittingLines.find((t=>t.page===e)),o={page:e,origin:t},i={page:0,origin:t};if(this.splitSuggestionsEnabled&&"AI"===t)this.splittingLines.splice(e-1,1,o);else{if(e===this.splittingLines.length||!this.splitSuggestionsEnabled&&!n&&"AI"===t)return;if(n){if(!this.splitSuggestionsEnabled&&n.origin!==t)return;this.splittingLines.splice(e-1,1,i)}else this.splittingLines.splice(e-1,1,o)}this.saveUpdatedDocuments()},saveUpdatedDocuments(){this.splitFileNameFromExtension();const e=this.splittingLines.filter((e=>0!==e.page)),t=this.createEachNewDocument(e,e.length);this.$store.dispatch("edit/setUpdatedDocument",t)},createEachNewDocument(e,t){const n=new Array(t);for(let o=0;o<t;o++){const t={name:this.handleNewDocumentName(o),category:this.handleNewDocumentCategory(o,e),categories:this.handleNewDocumentCategoriesAndConfidence(o,e),pages:this.handleNewDocumentPages(o,e)};n.splice(o,1,t)}return n},handleNewDocumentName(e){let t;return t=0===e?this.selectedDocument.data_file_name:1===e?`${this.fileName}_copy.${this.fileExtension}`:`${this.fileName}_copy${e}.${this.fileExtension}`,t},handleNewDocumentCategory(e,t){if(this.updatedDocument&&this.updatedDocument.length>1&&t[e].origin&&"AI"===t[e].origin){const n=this.indexOfSplittingSuggestion(e,t);return this.splittingSuggestions[n].category}return this.selectedDocument.category},handleNewDocumentCategoriesAndConfidence(e,t){if(this.updatedDocument&&this.updatedDocument.length>1&&t[e].origin&&"AI"===t[e].origin){const n=this.indexOfSplittingSuggestion(e,t);return this.splittingSuggestions[n].categories}return null},handleNewDocumentPages(e,t){let n;return n=0===e?this.pagesForPostprocess.slice(0,t[e].page):t[e].page?this.pagesForPostprocess.slice(t[e-1].page,t[e].page):this.pagesForPostprocess.slice(t[e-1].page),n},indexOfSplittingSuggestion(e,t){const n=this.selectedDocument.pages.find((n=>n.number===t[e].page)),o=this.splittingSuggestions.find((e=>e.pages[e.pages.length-1].id===n.id));return this.splittingSuggestions.indexOf(o)},checkMove(e){this.prevPageAtIndex=this.pagesForPostprocess.find((t=>this.pagesForPostprocess.indexOf(t)===e.draggedContext.futureIndex))},handleDragEnd(){const e=this.pagesForPostprocess.map((e=>{const t=this.pagesForPostprocess.indexOf(e);return{...e,number:t+1}}));this.$store.dispatch("edit/setPagesForPostprocess",e)},saveEditChanges(){if(this.documentShouldBePostprocessed||this.waitingForSplittingConfirmation(this.selectedDocument)){const e=this.updatedDocument.map((e=>(delete e.categories,e)));this.$store.dispatch("edit/editDocument",e).catch((e=>{this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})}));const t=ss(this.documentsListPath,this.projectId);t&&this.$store.dispatch("edit/setRedirectingUser",!0)}else{const e=this.updatedDocument[0].category,t=this.updatedDocument[0].name;let n={},o={},i={};if(this.selectedDocument.category!==e&&(Object.assign(n,{category:e}),this.$store.dispatch("document/startLoading")),!this.selectedDocument.category_is_revised&&e&&Object.assign(i,{category_is_revised:!0}),this.selectedDocument.data_file_name!==t&&Object.assign(o,{data_file_name:t}),!n&&!o)return;const a=Object.assign(n,i,o);this.$store.dispatch("document/updateDocument",a).catch((e=>{this.$store.dispatch("document/endLoading"),this.$store.dispatch("document/createErrorMessage",{error:e,serverErrorMessage:this.$t("server_error"),defaultErrorMessage:this.$t("edit_error")})}))}this.closeEditMode()},closeEditMode(){this.$store.dispatch("edit/disableEditMode"),this.$store.dispatch("edit/setRenameAndCategorize",!1),this.$store.dispatch("edit/setUpdatedDocument",null),this.$store.dispatch("edit/setSelectedPages",null),this.$store.dispatch("edit/setSubmitEditChanges",!1),this.$store.dispatch("edit/setShowEditConfirmationModal",!1),this.$nextTick((()=>{this.$store.dispatch("display/updateCurrentPage",1)}))}}},Gc=(0,$.A)(Zc,[["render",Fl],["__scopeId","data-v-0ecba500"]]),Wc=Gc,qc={key:0,class:"message-container"},jc={class:"server-error"},Kc={key:1,class:"message-container"};function Yc(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon"),r=(0,o.resolveComponent)("b-message");return(0,o.openBlock)(),(0,o.createBlock)(r,null,{default:(0,o.withCtx)((()=>[e.serverError?((0,o.openBlock)(),(0,o.createElementBlock)("div",qc,[(0,o.createElementVNode)("span",jc,[(0,o.createTextVNode)((0,o.toDisplayString)(e.errorMessage)+" ",1),e.showBranding?((0,o.openBlock)(),(0,o.createElementBlock)("span",{key:0,class:"contact-support",onClick:t[0]||(t[0]=(...e)=>s.handleGetSupport&&s.handleGetSupport(...e))},[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("get_support"))+" ",1),(0,o.createVNode)(l,{icon:"arrow-right",size:"is-small"})])):(0,o.createCommentVNode)("",!0)])])):((0,o.openBlock)(),(0,o.createElementBlock)("div",Kc,(0,o.toDisplayString)(e.errorMessage),1)),(0,o.createElementVNode)("div",{class:"btn-container",type:"button",onClick:t[1]||(t[1]=(...e)=>s.handleErrorClose&&s.handleErrorClose(...e))},[(0,o.createVNode)(l,{icon:"xmark",class:"close-btn error-icon",size:"is-small"})])])),_:1})}const Jc={name:"ErrorMessage",computed:{...(0,s.aH)("document",["errorMessage","serverError"]),...(0,s.aH)("display",["showBranding"])},methods:{handleGetSupport(){const e="Server error";this.$store.dispatch("document/contactSupport",e)},handleErrorClose(){this.$store.dispatch("document/setErrorMessage",null)}}},Xc=(0,$.A)(Jc,[["render",Yc],["__scopeId","data-v-4692340c"]]),Qc=Xc,ed={class:"viewport-modal"},td={class:"modal-card-body"},nd={class:"image"},od={class:"content"},id={class:"modal-card-foot"};function ad(e,t,n,i,a,s){const l=(0,o.resolveComponent)("Illustration"),r=(0,o.resolveComponent)("b-button"),c=(0,o.resolveComponent)("b-modal");return(0,o.openBlock)(),(0,o.createElementBlock)("section",ed,[(0,o.createVNode)(c,{modelValue:a.isModalActive,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isModalActive=e),class:"modal-text-center",width:500},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("section",td,[(0,o.createElementVNode)("div",nd,[(0,o.createVNode)(l)]),(0,o.createElementVNode)("div",od,[(0,o.createElementVNode)("h3",null,(0,o.toDisplayString)(e.$t("small_viewport_title")),1),(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("small_viewport_info")),1)])]),(0,o.createElementVNode)("footer",id,[(0,o.createVNode)(r,{type:"is-primary",class:"primary-button",onClick:s.handleNotOptimizedModal},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("ok")),1)])),_:1},8,["onClick"])])])),_:1},8,["modelValue"])])}const sd={width:"179",height:"202",viewBox:"0 0 179 202",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function ld(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",sd,t[0]||(t[0]=[(0,o.createStaticVNode)('<path opacity="0.6" fill-rule="evenodd" clip-rule="evenodd" d="M143.279 186.492C131.002 186.492 121.053 188.111 121.053 190.084C121.053 192.056 131.002 193.65 143.279 193.65C155.557 193.65 165.506 192.056 165.506 190.084C165.506 188.111 155.557 186.492 143.279 186.492Z" fill="#D7D7D7"></path><path opacity="0.6" fill-rule="evenodd" clip-rule="evenodd" d="M51.001 185.697C36.4215 185.697 24.6074 187.496 24.6074 189.688C24.6074 191.879 36.4215 193.65 51.001 193.65C65.5805 193.65 77.3946 191.879 77.3946 189.688C77.3946 187.496 65.5805 185.697 51.001 185.697Z" fill="#D7D7D7"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M59.6212 55.6689C55.8724 55.6689 52.7847 58.7319 52.7847 62.4941C52.7847 66.575 56.1487 69.2773 59.6635 69.2773C61.3508 69.2773 63.0725 68.6542 64.4742 67.2637C68.7969 63.0201 65.7529 55.6689 59.6212 55.6689ZM59.6807 55.0117C61.5187 55.0117 63.3912 55.6886 64.9145 57.1998C69.6789 61.8815 66.3268 69.8899 59.6212 69.8899C55.5193 69.8899 52.1672 66.5645 52.1235 62.4941C52.1235 57.9908 55.8248 55.0117 59.6807 55.0117Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M59.6212 50.7079C55.8724 50.7079 52.7847 53.7274 52.7847 57.4905C52.7847 61.6026 56.1527 64.3138 59.6701 64.3138C61.3548 64.3138 63.0738 63.692 64.4742 62.303C68.7969 58.0152 65.7529 50.7079 59.6212 50.7079ZM59.6741 50.0508C61.5148 50.0508 63.3899 50.7263 64.9145 52.2399C69.6789 56.9213 66.3268 64.9289 59.6212 64.9289C55.5193 64.9289 52.1672 61.6026 52.1235 57.4905C52.1235 53.0191 55.8208 50.0508 59.6741 50.0508Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.4537 22.0168C55.2169 22.0168 53.418 23.7907 53.418 25.9445C53.418 28.2869 55.405 29.838 57.4918 29.838C58.4898 29.838 59.5115 29.4834 60.3492 28.6895C62.8923 26.2408 61.0948 22.0168 57.4537 22.0168ZM57.5115 21.6445C58.599 21.6445 59.7075 22.0332 60.6122 22.9044C63.3749 25.6064 61.4011 30.1684 57.4537 30.2102C55.0407 30.1684 53.0236 28.2679 53.0236 25.9445C53.0236 23.3678 55.2209 21.6445 57.5115 21.6445Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M58.3535 20.647C56.1165 20.647 54.3174 22.4249 54.3174 24.5834C54.3174 26.9311 56.3045 28.4843 58.3916 28.4843C59.3898 28.4843 60.4116 28.129 61.2494 27.3346C63.7928 24.8791 61.995 20.647 58.3535 20.647ZM58.4127 20.293C59.5003 20.293 60.6089 20.6775 61.5124 21.5353C64.2755 24.2446 62.3015 28.8587 58.3535 28.8587C55.8968 28.8587 53.9228 26.912 53.9228 24.5834C53.9228 21.9998 56.1217 20.293 58.4127 20.293Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M100.474 9.01953C101.422 9.01953 102.959 9.29418 103.44 9.66344C102.341 15.0553 92.8031 27.241 90.5615 29.1701C85.3734 33.5974 70.7352 40.1285 70.7352 40.1285L67.8782 30.9678C67.8782 30.9678 85.0663 25.9269 86.2971 23.8217C87.9233 21.0174 97.6381 12.0748 100.012 9.04976C100.138 9.02873 100.295 9.01953 100.474 9.01953Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M101.228 4.96094L106.142 5.2734C105.428 7.28761 104.42 9.12079 103.16 10.8212L99.8417 9.65718L101.228 4.96094Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M103.392 0.00195312L105.846 1.04704L106.142 5.40995L101.192 5.04752L103.392 0.00195312Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M61.4585 30.6621C63.2449 30.6621 65.0325 30.7172 66.8082 30.8261C68.3629 30.9573 69.8723 31.2198 71.1155 31.4389C72.9804 31.7893 74.4898 33.1894 74.9783 34.9844C76.3107 40.0612 77.0655 45.2706 77.1986 50.5233C77.3317 55.7313 73.1574 60.1087 67.8291 60.24L60.592 60.4145C60.5042 60.4171 60.4177 60.4184 60.3298 60.4184C55.7362 60.4184 51.8348 57.0461 51.313 52.5361C50.8245 48.6849 50.0245 43.2131 48.382 34.9398C48.0719 33.234 49.2259 31.5701 51.0016 31.351C52.4671 31.1319 54.3319 30.914 56.1076 30.8261C57.8833 30.7172 59.6709 30.6621 61.4585 30.6621Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.3134 20.7422L63.5843 22.432C63.0139 25.1022 62.9258 29.8623 66.7401 30.7519C66.7401 30.7519 69.6777 34.2663 63.9339 34.2663C57.621 34.2663 56.1739 30.7519 56.1739 30.7519C58.4977 28.4379 58.06 24.1672 57.3134 20.7422Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.5256 20.7422L63.6546 22.437C63.3091 23.9585 63.1357 26.1744 63.8267 27.9552C63.2651 27.8249 62.7049 27.6516 62.1434 27.3911C60.0292 26.392 58.9501 24.8274 57.8271 22.5243C57.7417 21.9159 57.6122 21.3076 57.5256 20.7422Z" fill="#3A9C76"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.515 18.9375C57.7373 18.9375 57.9608 18.9756 58.1805 19.0603C59.43 19.5934 59.775 21.1914 58.74 22.1334C58.0074 22.9121 56.9297 23.4034 55.8094 23.444C55.7887 23.4452 55.7667 23.4452 55.7461 23.4452C54.3311 23.4452 53.9228 22.0757 54.6451 20.9039C55.153 20.0085 56.3314 18.9375 57.515 18.9375Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M60.1306 8.56836C60.4785 8.56836 60.8342 8.59738 61.1952 8.6607C65.9937 9.45221 68.2184 16.0085 68.2615 20.2773C68.3282 23.8272 65.5177 26.6014 62.3343 26.6014C61.2959 26.6014 60.2182 26.3059 59.1876 25.6464C56.3954 23.8417 55.7846 21.1572 54.3891 16.7129C53.0224 12.6591 56.0619 8.56836 60.1306 8.56836Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M61.3498 9.91992C61.3772 9.91992 61.4046 9.9239 61.4293 9.93185C61.5662 9.93185 61.7032 10.0207 61.795 10.1533C61.8621 10.0883 61.9772 10.0472 62.0881 10.0472C62.1292 10.0472 62.1689 10.0525 62.2059 10.0644C62.3429 10.1095 62.4799 10.197 62.5716 10.3309C62.6251 10.2779 62.71 10.2567 62.799 10.2567C62.8607 10.2567 62.9264 10.2673 62.9826 10.2859C63.1195 10.3747 63.2565 10.5073 63.2565 10.6399C63.3332 10.6213 63.4003 10.6107 63.4633 10.6107C63.5538 10.6107 63.6332 10.6319 63.714 10.6836C63.851 10.7724 63.9428 10.905 63.9428 11.0376C64.0797 11.0376 64.2619 11.0376 64.3537 11.1702C64.4907 11.259 64.5824 11.4354 64.5359 11.613C64.7646 11.613 64.9016 11.7019 64.9934 11.8782C65.0851 12.0545 65.0851 12.276 64.9468 12.4536C65.0851 12.5411 65.1755 12.7626 65.1303 12.9402C65.1303 13.1166 64.9934 13.2929 64.8098 13.338C64.8564 13.5143 64.8098 13.692 64.6728 13.8683C64.5865 13.9532 64.4811 13.9837 64.3688 13.9837C64.3044 13.9837 64.2373 13.9731 64.1701 13.9572C64.1071 14.1719 63.9113 14.3019 63.7058 14.3019C63.6154 14.3019 63.5236 14.2767 63.4401 14.2223C63.3935 14.3112 63.3031 14.4437 63.1661 14.4875C63.0278 14.4875 62.8456 14.4875 62.7538 14.3987C62.7086 14.5312 62.5716 14.6201 62.4347 14.6652C62.2977 14.6652 62.1607 14.6652 62.0689 14.5763C61.9772 14.7089 61.8868 14.7977 61.7484 14.8415C61.7128 14.8534 61.6758 14.8587 61.6388 14.8587C61.5388 14.8587 61.4388 14.8176 61.3375 14.7527C61.2923 14.8852 61.2005 14.9741 61.0635 15.0179C61.0265 15.0298 60.9896 15.0351 60.9539 15.0351C60.8526 15.0351 60.7526 14.994 60.6526 14.9303C60.6074 15.0629 60.4691 15.1504 60.3321 15.1955C60.3061 15.2088 60.2718 15.2141 60.2334 15.2141C60.1417 15.2141 60.0321 15.1822 59.9677 15.1504C59.9212 15.2392 59.7842 15.3281 59.6472 15.3718C59.5911 15.3904 59.5335 15.401 59.4801 15.401C59.4047 15.401 59.3349 15.3798 59.2815 15.3281C59.1938 15.4991 59.0281 15.5972 58.8486 15.5972C58.75 15.5972 58.6473 15.5681 58.55 15.5044C58.5048 15.637 58.413 15.7258 58.2761 15.7696H58.2309C58.1993 15.7776 58.1678 15.7815 58.1364 15.7815C57.987 15.7815 57.8419 15.6954 57.7282 15.5495C57.6254 15.6489 57.4967 15.698 57.3624 15.698C57.3172 15.698 57.2706 15.6927 57.2254 15.6821C57.0433 15.5932 56.9515 15.4169 56.9063 15.2392C56.7227 15.2392 56.5406 15.1504 56.4488 14.9741C56.3118 14.7977 56.3118 14.6201 56.4488 14.4437C56.2666 14.3112 56.1748 14.1335 56.1748 13.9572C56.2201 13.7795 56.3118 13.6031 56.4488 13.5594C56.357 13.4268 56.357 13.2491 56.4036 13.1166C56.4488 12.9402 56.5858 12.8514 56.7227 12.8076C56.6775 12.6737 56.6775 12.4974 56.7227 12.3648C56.8145 12.2322 56.9515 12.1434 57.0885 12.1434C57.0433 12.0108 57.0885 11.8345 57.1802 11.7019C57.2706 11.613 57.409 11.5242 57.5912 11.5242C57.546 11.3916 57.6364 11.2153 57.7282 11.1264C57.8281 11.0615 57.9295 11.0204 58.0295 11.0204C58.0665 11.0204 58.1021 11.0257 58.1391 11.0376C58.1391 10.8613 58.2309 10.7287 58.3678 10.6399C58.4487 10.5882 58.5281 10.5669 58.6089 10.5669C58.6651 10.5669 58.7226 10.5775 58.7788 10.5961C58.8254 10.4635 58.9157 10.3309 59.0527 10.2859C59.1061 10.2527 59.1651 10.2381 59.2253 10.2381C59.3239 10.2381 59.4253 10.2753 59.5102 10.3309C59.5554 10.1533 59.6924 10.0644 59.8294 10.0207C59.8636 10.0101 59.902 10.0035 59.9389 10.0035C60.0527 10.0035 60.1732 10.0538 60.2417 10.1533C60.3321 10.0207 60.4691 9.93185 60.6074 9.93185C60.6403 9.9239 60.6718 9.91992 60.7033 9.91992C60.8389 9.91992 60.943 9.99284 61.0183 10.0644C61.0923 9.99284 61.2279 9.91992 61.3498 9.91992Z" fill="#96F3AB"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M59.1588 10.8242C59.2913 10.8656 59.4239 10.9497 59.4677 11.0751C59.5326 11.0136 59.6453 10.9748 59.7355 10.9748C59.7687 10.9748 59.7978 10.9798 59.8217 10.9911C59.9994 11.0337 60.0869 11.1165 60.1319 11.2846C60.1982 11.2432 60.2645 11.2219 60.3255 11.2219C60.3852 11.2219 60.4409 11.2432 60.4859 11.2846C60.6185 11.326 60.7511 11.4515 60.7511 11.5769C60.8055 11.5606 60.8612 11.5493 60.9155 11.5493C60.9938 11.5493 61.0707 11.5707 61.1489 11.6196C61.2377 11.745 61.3252 11.8705 61.3703 11.9959C61.4034 11.9859 61.4366 11.9796 61.4684 11.9796C61.5665 11.9796 61.658 12.0273 61.7243 12.1214C61.8118 12.2054 61.9006 12.3723 61.9006 12.5404C62.077 12.5404 62.2096 12.6658 62.2547 12.7913C62.3435 12.9581 62.3435 13.1676 62.2547 13.3345C62.3872 13.46 62.4761 13.6281 62.4761 13.7949C62.431 13.963 62.3435 14.0885 62.1658 14.1725C62.2547 14.3394 62.2096 14.5062 62.077 14.6317C62.02 14.7132 61.9258 14.7596 61.8317 14.7596C61.7787 14.7596 61.727 14.7458 61.6792 14.7157C61.6355 14.8412 61.5466 14.9666 61.3703 15.0093C61.3464 15.0206 61.3199 15.0256 61.2907 15.0256C61.2138 15.0256 61.125 14.9867 61.06 14.9252C61.0163 15.0507 60.9275 15.1347 60.7949 15.1761C60.771 15.1874 60.7445 15.1924 60.7166 15.1924C60.6384 15.1924 60.5496 15.1535 60.4859 15.0921C60.4409 15.2175 60.352 15.3016 60.2194 15.3016C60.181 15.3141 60.1465 15.3191 60.1121 15.3191C60.0312 15.3191 59.9596 15.289 59.8668 15.2602C59.8668 15.3442 59.7779 15.427 59.6453 15.4697C59.6095 15.481 59.5738 15.486 59.5393 15.486C59.4438 15.486 59.3563 15.4471 59.2913 15.3856C59.2476 15.5111 59.1588 15.5951 59.0699 15.6365C58.9373 15.6365 58.8047 15.6365 58.7159 15.5525C58.6722 15.6779 58.5833 15.762 58.4507 15.762C58.4269 15.7733 58.4004 15.7783 58.3725 15.7783C58.2943 15.7783 58.2055 15.7394 58.1418 15.6779C58.0967 15.8034 58.0092 15.8874 57.8753 15.9301C57.8408 15.9401 57.8077 15.9464 57.7772 15.9464C57.6923 15.9464 57.6194 15.9075 57.5226 15.846C57.5226 15.9715 57.4338 16.0555 57.3012 16.0969C57.2203 16.0355 57.1262 16.0079 57.0387 16.0079C56.8889 16.0079 56.7536 16.0894 56.7258 16.2224C56.6953 16.2299 56.6635 16.2337 56.633 16.2337C56.4898 16.2337 56.3572 16.1584 56.2843 16.0555C56.2114 16.1245 56.1238 16.1546 56.039 16.1546C55.97 16.1546 55.9011 16.1346 55.8415 16.0969C55.7088 16.0129 55.5763 15.8874 55.5763 15.6779C55.5524 15.6842 55.5285 15.6867 55.5047 15.6867C55.3535 15.6867 55.2103 15.5776 55.1334 15.4697C55.0009 15.3016 55.0009 15.0921 55.0897 14.8838C54.9571 14.7998 54.8245 14.6317 54.8682 14.4234C54.8682 14.298 54.9133 14.1299 55.0459 14.0458C55.0009 13.9204 54.9571 13.7949 55.0009 13.6281C55.0459 13.5026 55.1334 13.4186 55.266 13.3772C55.2222 13.2517 55.2222 13.1263 55.266 12.9581C55.3111 12.8741 55.4437 12.7913 55.5763 12.7486C55.5325 12.6232 55.5763 12.4977 55.62 12.3723C55.7088 12.2468 55.8415 12.2054 55.974 12.2054C55.9303 12.08 55.974 11.9545 56.0628 11.8291C56.1278 11.7676 56.2392 11.7287 56.3294 11.7287C56.3625 11.7287 56.393 11.7337 56.4169 11.745C56.4169 11.6196 56.5044 11.4941 56.5932 11.4101C56.6595 11.3687 56.7258 11.3474 56.7868 11.3474C56.8478 11.3474 56.9035 11.3687 56.9472 11.4101C56.991 11.2846 57.0798 11.1592 57.1686 11.1165C57.219 11.0852 57.2694 11.0714 57.3198 11.0714C57.402 11.0714 57.4842 11.1077 57.5664 11.1592C57.6101 11.0337 57.699 10.9083 57.8316 10.9083C57.8674 10.897 57.9031 10.892 57.9376 10.892C58.0318 10.892 58.1206 10.9309 58.1856 10.9911C58.2293 10.9083 58.3619 10.8242 58.4945 10.8242C58.6284 10.8242 58.761 10.8656 58.8485 10.9911C58.8936 10.8656 59.0262 10.8242 59.1588 10.8242Z" fill="#ABF2BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M23.5364 29.3086C26.6811 31.612 33.1016 33.9141 35.9832 35.2869C36.1508 35.3653 36.3929 35.3998 36.7006 35.3998C39.2052 35.3998 45.9555 33.022 50.0023 31.5231C50.3938 31.3744 50.7996 31.3027 51.1989 31.3027C52.5828 31.3027 53.9051 32.1524 54.4131 33.5597L54.9813 34.8887C55.7236 36.8814 54.6317 39.0959 52.6221 39.627C48.4273 40.7515 41.6508 42.3832 37.1012 42.3832C36.6299 42.3832 36.1835 42.3659 35.7645 42.3287C32.8829 42.0632 23.2313 35.9521 20.6116 30.992C20.9598 30.372 22.794 29.4414 23.5364 29.3086Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M22.9388 26.6055C22.9388 26.6055 25.5611 29.4906 23.8421 32.0148L21.0047 31.3838L17.9108 28.2284L22.9388 26.6055Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M21.6818 22.998L22.8599 26.824L17.7524 28.4074L17.0103 24.1846L21.6818 22.998Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M61.4369 17.5859L62.4761 18.9782L59.273 19.3883L57.9757 18.4871L61.4369 17.5859Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M66.5278 15.7832L66.4471 16.9098L64.4781 18.0365L64.2782 16.4671L66.5278 15.7832Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M66.7946 20.293C66.8523 20.293 66.9035 20.3264 66.9342 20.3613C66.9764 20.4588 66.9342 20.5548 66.8907 20.6042C65.1405 21.7198 63.261 22.3991 61.2535 22.5445C61.1678 22.5445 61.1255 22.4471 61.1255 22.3511C61.1255 22.2536 61.1678 22.1562 61.2535 22.1562C63.1753 22.0107 65.0125 21.3795 66.7204 20.3133C66.7447 20.2988 66.7703 20.293 66.7946 20.293Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M36.238 35.1719C36.2519 35.1719 36.265 35.1771 36.2733 35.189C36.3347 35.2324 36.3663 35.3205 36.3347 35.4073C36.0873 36.3727 35.5599 39.6635 35.932 42.2086C35.932 42.252 35.9004 42.3401 35.839 42.3835H35.8074C35.7767 42.3835 35.7143 42.3401 35.7143 42.252C35.466 39.9266 35.6213 37.5144 36.1487 35.2758C36.1487 35.2113 36.1989 35.1719 36.238 35.1719Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M51.0916 31.1133C51.136 31.1133 51.1754 31.1345 51.2008 31.1863C52.6822 33.2254 53.0211 35.9725 52.0475 38.3649C51.4965 39.6509 50.5648 40.4917 49.5911 40.5807C49.5492 40.5807 49.4642 40.4917 49.4223 40.4479C49.4223 40.3589 49.5073 40.2712 49.5911 40.2712C50.4378 40.1822 51.2426 39.429 51.7504 38.2773C52.6822 35.9725 52.3864 33.3583 50.9888 31.3643C50.9037 31.2753 50.9469 31.1863 50.9888 31.1425C51.0243 31.1239 51.0586 31.1133 51.0916 31.1133Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M68.1718 30.6621C71.9216 30.6621 74.9675 34.963 75.5298 38.1416C75.5298 38.2338 75.4865 38.2792 75.3987 38.3259H75.3555C75.3109 38.3259 75.2244 38.2792 75.2244 38.187C74.6621 35.146 71.7459 30.9826 68.1705 30.9826C68.1311 30.9826 68.0931 30.984 68.0538 30.984C67.966 30.984 67.8795 30.9386 67.8795 30.8464C67.8795 30.7556 67.966 30.6635 68.0538 30.6635C68.0931 30.6621 68.1324 30.6621 68.1718 30.6621Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M24.476 29.7617C24.6156 29.8032 24.6616 29.8874 24.6156 29.9704C24.4285 30.9771 22.7998 31.2285 21.4489 31.4384L20.8445 31.564H20.7971C20.705 31.5226 20.6575 31.4798 20.6115 31.4384C20.6115 31.3541 20.6575 31.2699 20.751 31.2285C20.9367 31.2285 21.1697 31.187 21.4028 31.1443C22.6128 30.9356 24.1494 30.7257 24.289 29.8874C24.335 29.8032 24.4285 29.7617 24.476 29.7617Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M86.1418 23.8984C86.1724 23.8984 86.2029 23.9089 86.2293 23.935C88.0822 25.1552 89.9364 27.7693 89.8433 30.0359C89.8433 30.1234 89.7503 30.2096 89.6586 30.2096C89.5655 30.1665 89.4725 30.1234 89.4725 30.0359C89.5655 27.8568 87.7585 25.3289 85.9974 24.1532C85.8863 24.0826 86.014 23.8984 86.1418 23.8984Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M99.5986 9.46875C99.6445 9.46875 99.6931 9.48691 99.7347 9.53116C100.225 10.1485 101.395 10.54 102.513 10.54C102.765 10.54 103.015 10.5196 103.256 10.4776C103.281 10.4674 103.302 10.4628 103.321 10.4628C103.372 10.4628 103.407 10.498 103.44 10.5536C103.44 10.6296 103.395 10.7045 103.302 10.7431C103.024 10.7806 102.746 10.818 102.468 10.818C102.422 10.8203 102.378 10.8203 102.333 10.8203C101.224 10.8203 100.168 10.3743 99.4556 9.68323C99.3903 9.57542 99.4875 9.46875 99.5986 9.46875Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M63.3648 35.6211C67.7415 35.6211 71.8946 40.0353 72.6096 45.5187C73.279 51.0007 70.2867 55.459 65.8658 55.459C65.2405 55.459 64.5697 55.3708 63.9901 55.1917C60.3269 54.1667 57.2007 50.243 56.5755 45.5628C56.1738 42.9768 56.7991 40.3467 58.3173 38.2071C59.4794 36.602 61.3552 35.6211 63.3648 35.6211Z" fill="#3A9C76"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M61.001 37.877C65.1094 37.877 68.7839 41.573 69.2476 46.271C69.6789 50.4648 67.3955 54.0915 63.991 55.0083C63.3026 54.7895 62.6555 54.4844 62.0097 54.1347C59.4253 52.4739 57.3563 49.2415 56.8823 45.5716C56.624 43.7799 56.8396 41.9895 57.4428 40.2856C57.7011 39.5862 58.0886 38.9313 58.52 38.3196C59.2522 38.0564 59.9846 37.8822 60.7169 37.8822C60.8125 37.8783 60.9068 37.877 61.001 37.877Z" fill="#46C963"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M57.4666 40.1309C57.6009 40.1745 57.7339 40.1745 57.8668 40.1745C62.1671 40.6159 65.626 44.3195 65.5369 48.4197C65.5369 50.7565 64.2076 52.9612 62.1232 54.1072C59.4633 52.4312 57.3337 49.1691 56.8459 45.4655C56.6252 43.6573 56.802 41.8505 57.4666 40.1309Z" fill="#34B952"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M66.5343 41.4844C67.1715 41.4844 67.8662 41.7431 68.4734 42.2632C69.6929 43.2981 70.1278 44.9812 69.3874 46.0602L67.6024 48.5635C67.3335 48.9503 66.9143 49.1469 66.4834 49.1469C66.1452 49.1469 65.7992 49.0253 65.5119 48.7796L62.2881 46.0602C61.0685 44.9812 60.6768 43.2981 61.4171 42.2632C61.7827 41.7457 62.3507 41.4921 62.9814 41.4921C63.4045 41.4921 63.8549 41.606 64.2924 41.8311C64.4556 41.9035 64.6345 41.9372 64.8121 41.9372C65.0615 41.9372 65.3083 41.8712 65.5119 41.7444C65.8149 41.5711 66.1648 41.4844 66.5343 41.4844Z" fill="#ABF2BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M68.0324 56.8145C68.6784 56.8145 69.327 56.8222 69.977 56.8404C71.5138 56.8844 72.8742 57.9652 73.2689 59.4775C74.6293 64.9669 73.532 72.1435 73.532 72.1435H57.074C57.6884 68.4256 57.8647 64.665 57.5134 60.9043C57.3818 59.0019 58.7857 57.36 60.7171 57.1436C63.1485 56.9376 65.5786 56.8145 68.0324 56.8145Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M68.0324 56.8145C68.6784 56.8145 69.327 56.8222 69.977 56.8404C71.5138 56.8844 72.8742 57.9652 73.2689 59.4775C74.6293 64.9669 73.532 72.1435 73.532 72.1435H57.074C57.6884 68.4256 57.8647 64.665 57.5134 60.9043C57.3818 59.0019 58.7857 57.36 60.7171 57.1436C63.1485 56.9376 65.5786 56.8145 68.0324 56.8145Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M74.7496 72.1445C76.6739 72.1445 78.2323 73.7096 78.1001 75.6171C77.7435 84.8453 76.5403 109.981 73.6906 122.988C71.9973 140.389 69.3252 189.826 69.3252 189.826H57.0742C57.0742 189.826 60.9949 134.809 64.8703 122.988C60.9055 112.398 61.9297 72.1458 61.9297 72.1458H74.6694C74.6961 72.1445 74.7229 72.1445 74.7496 72.1445Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M65.5834 86.5742C65.5834 86.5742 65.6274 104.51 63.361 115.43C62.5163 108.851 62.1606 100.169 62.0274 92.3194L65.5834 86.5742Z" fill="#3A9C76"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M71.0283 72.1445C71.0283 72.1445 62.4253 112.397 56.4119 122.987C53.8224 148.211 44.3864 189.825 44.3864 189.825H32.3149C32.3149 189.825 42.0153 138.631 46.9313 122.987C46.7563 109.979 51.4091 84.844 52.9013 75.6158C53.2526 73.6384 54.9645 72.1445 56.983 72.1445H71.0283Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M53.4149 117.684C53.8457 117.684 54.2778 117.759 54.6982 117.92C56.9688 118.757 57.9731 121.757 56.9256 124.624C56.0626 126.982 54.1076 128.505 52.1526 128.505C51.7309 128.505 51.308 128.434 50.8981 128.284C48.6262 127.447 47.6218 124.403 48.6694 121.537C49.5284 119.225 51.469 117.684 53.4149 117.684Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M53.4149 117.684C53.8457 117.684 54.2778 117.759 54.6982 117.92C56.9688 118.757 57.9731 121.757 56.9256 124.624C56.0626 126.982 54.1076 128.505 52.1526 128.505C51.7309 128.505 51.308 128.434 50.8981 128.284C48.6262 127.447 47.6218 124.403 48.6694 121.537C49.5284 119.225 51.469 117.684 53.4149 117.684Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M43.4331 185.77C45.7484 185.77 47.619 187.607 47.4855 189.826H39.0684C39.1565 187.563 41.1166 185.813 43.4331 185.77Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M70.6791 117.686C70.8675 117.686 71.0572 117.702 71.2483 117.736C73.5208 118.141 75.0813 120.846 74.7246 123.821C74.3532 126.529 72.4988 128.504 70.4266 128.504C70.2556 128.504 70.0833 128.491 69.9109 128.464C67.5943 128.058 66.0792 125.354 66.4346 122.379C66.802 119.653 68.6283 117.686 70.6791 117.686Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M70.6791 117.686C70.8675 117.686 71.0572 117.702 71.2483 117.736C73.5208 118.141 75.0813 120.846 74.7246 123.821C74.3532 126.529 72.4988 128.504 70.4266 128.504C70.2556 128.504 70.0833 128.491 69.9109 128.464C67.5943 128.058 66.0792 125.354 66.4346 122.379C66.802 119.653 68.6283 117.686 70.6791 117.686Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M69.2499 185.77C71.4797 185.77 73.2803 187.563 73.2803 189.826H65.1772C65.1772 187.563 66.9777 185.77 69.2499 185.77Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M54.5479 74.3984C56.4626 74.3984 58.7686 75.6085 60.8997 77.7254C63.4235 80.2323 66.0776 84.5103 66.0776 89.1354C66.0776 89.2209 66.0346 89.2649 65.9472 89.2649C65.9316 89.2727 65.9146 89.2766 65.9003 89.2766C65.8311 89.2766 65.7724 89.2054 65.7724 89.1354C65.7724 84.5971 63.1196 80.4047 60.6388 77.9845C58.5507 75.9104 56.3322 74.7444 54.5479 74.7444C54.4619 74.7444 54.3745 74.6575 54.3745 74.5707C54.3745 74.4852 54.4619 74.3984 54.5479 74.3984Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M76.2573 78.9082C76.2725 78.9082 76.2878 78.9121 76.303 78.92C76.3882 78.92 76.4302 79.0063 76.4302 79.094C75.9635 82.1057 72.2737 87.1676 68.5839 88.8265H68.542C68.3716 88.8265 68.3296 88.608 68.4568 88.5204C71.9775 86.9491 75.7093 81.9304 76.1339 79.0508C76.1339 78.9789 76.1899 78.9082 76.2573 78.9082Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M41.261 185.77C42.811 185.77 44.1648 185.959 44.7573 186.148C44.9195 186.185 44.8567 186.394 44.7089 186.394C44.6972 186.394 44.6841 186.393 44.671 186.389C44.0994 186.242 42.7626 186.061 41.2375 186.061C39.8484 186.061 38.3036 186.211 37.0349 186.671H36.9917C36.9473 186.671 36.8609 186.63 36.8609 186.591C36.8164 186.51 36.8609 186.429 36.9473 186.389C38.2605 185.929 39.8432 185.77 41.261 185.77Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M67.6428 185.316C68.1838 185.316 68.6619 185.408 69.0564 185.565C69.2287 185.617 69.1426 185.935 68.9716 185.935C68.6144 185.793 68.1658 185.707 67.6505 185.707C66.4335 185.707 64.8399 186.183 63.1846 187.517C63.1409 187.517 63.1409 187.571 63.0985 187.571C63.0548 187.571 63.0124 187.517 62.97 187.465C62.9263 187.359 62.9263 187.254 63.0124 187.201C64.7294 185.829 66.3628 185.316 67.6428 185.316Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M98.1937 53.207L97.0674 58.3729C97.0674 58.3729 98.8532 59.9677 100.623 59.9677C100.925 59.9677 101.227 59.9213 101.519 59.8126L101.568 57.6772L98.1937 53.207Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M94.1024 52.3047L93.4658 56.3415L97.5574 58.6145L97.9675 53.326L94.1024 52.3047Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M100.676 50.0508C100.618 50.0508 100.554 50.0688 100.488 50.1107L91.0148 54.8605C90.8649 54.961 90.765 55.1603 90.8649 55.31C90.9145 55.4105 91.0148 55.4601 91.1643 55.4601H91.2642L100.787 50.6608C101.119 50.4945 100.968 50.0508 100.676 50.0508Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M122.739 39.6797C122.25 40.5125 121.909 41.1983 121.518 41.9328C121.127 42.6687 120.736 43.4032 120.345 44.1372C119.613 45.6076 118.881 47.0279 118.148 48.4978C116.732 51.4367 115.365 54.4257 114.046 57.4147L113.851 57.9535C113.803 58.0017 113.803 58.0518 113.753 58.1005C113.704 58.1988 113.656 58.247 113.606 58.2957C113.508 58.394 113.362 58.444 113.216 58.444C113.016 58.463 112.817 58.4734 112.618 58.4734C111.842 58.4734 111.074 58.325 110.334 58.0518C109.065 57.6099 107.844 57.0724 106.671 56.3862C106.085 56.0426 105.451 55.6503 104.864 55.2585L103.986 54.6223C103.741 54.4257 103.4 54.1804 103.204 54.0334L98.418 61.1377C98.9069 61.383 99.2481 61.53 99.6388 61.7752C100.03 61.9705 100.421 62.1671 100.812 62.3623C101.592 62.7546 102.422 63.1469 103.204 63.4891C104.864 64.2249 106.623 64.8125 108.381 65.253C109.358 65.4983 110.334 65.6935 111.36 65.7918C111.653 65.817 111.946 65.8288 112.239 65.8288C113.119 65.8288 113.997 65.7183 114.876 65.4983C117.025 65.0077 118.831 63.6361 119.906 61.7252C120.102 61.4312 120.249 61.1377 120.345 60.8437L120.59 60.2562C121.225 58.8846 121.861 57.4629 122.544 56.0426C123.178 54.671 123.912 53.2989 124.644 51.9273C125.376 50.6039 126.158 49.2824 126.988 47.959C127.379 47.3214 127.818 46.6857 128.209 46.0481C128.6 45.3623 129.087 44.7261 129.478 44.1873L122.739 39.6797Z" fill="#ABF2BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M140.32 14.4297C139.517 14.4297 138.938 14.9398 138.307 15.9407C137.246 17.5733 134.882 25.8328 135.365 29.246C135.679 31.5474 137.153 32.4654 138.884 32.4654C141.134 32.4654 143.817 30.9188 144.962 28.8501C147.035 25.1907 144.432 16.3366 142.358 15.1489C141.517 14.6669 140.866 14.4297 140.32 14.4297Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M149.834 6.76367C145.531 6.76367 142.086 12.6322 142.557 14.4458C142.993 16.2549 143.717 16.8892 145.457 17.2321C146.122 17.3771 147.197 17.5836 148.4 17.5836C150.423 17.5836 152.808 16.9977 154.203 14.5439C156.04 11.4163 153.913 6.97022 150.144 6.77391C150.041 6.76809 149.936 6.76367 149.834 6.76367Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M133.358 14.8809C132.267 14.8809 131.004 15.4398 130.358 16.2767C129.031 17.9805 129.836 22.6178 130.784 23.3738C131.228 23.73 131.577 23.8973 131.894 23.8973C132.251 23.8973 132.563 23.6818 132.915 23.28C133.578 22.4759 135.331 18.5479 135.331 16.7491C135.331 15.4157 134.428 14.8809 133.358 14.8809Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M129.481 173.145L129.818 184.866H134.882L134.544 173.145H129.481Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M158.306 170.889L153.34 171.573L156.475 183.061L161.442 182.425L158.306 170.889Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M161.243 180.357C161.211 180.357 161.177 180.362 161.143 180.371L155.653 182.02C155.309 182.119 155.064 182.32 154.917 182.57C153.888 184.068 153.594 185.418 150.016 187.367C149.287 187.759 149.719 189.374 151.248 189.374C151.468 189.374 151.711 189.341 151.977 189.266C154.035 188.665 156.142 187.867 157.662 187.416C160.113 186.716 161.045 186.567 163.005 186.017C163.447 185.867 163.691 185.368 163.544 184.917L161.632 180.621C161.552 180.455 161.403 180.357 161.243 180.357Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M129.612 183.965C129.321 183.965 129.069 184.1 128.855 184.272C127.516 185.413 125.881 186.603 121.819 187.495C120.927 187.695 121.077 189.826 123.206 189.826C125.387 189.826 128.655 189.678 130.242 189.678C132.817 189.678 133.758 189.826 135.79 189.826C136.285 189.826 136.681 189.43 136.632 188.933L135.988 184.321C135.944 184.106 135.789 183.965 135.618 183.965C135.592 183.965 135.567 183.968 135.542 183.975H129.746C129.7 183.968 129.655 183.965 129.612 183.965Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M129.481 173.145L129.679 179.005H134.882L134.683 173.145H129.481Z" fill="#1A2327" fill-opacity="0.129412"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M158.415 170.889L153.34 171.59L154.965 177.651L160.09 177.001L158.415 170.889Z" fill="#1A2327" fill-opacity="0.129412"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.893 37.875C135.35 37.875 133.814 37.9359 132.278 38.0563C128.292 38.3958 123.778 39.3629 123.778 39.3629C123.778 39.3629 121.378 40.1854 126.179 69.887H146.586C146.251 61.5194 146.202 56.3418 150.188 39.2178C147.306 38.5883 144.426 38.2028 141.545 38.0563C139.983 37.9359 138.436 37.875 136.893 37.875Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M140.708 27.5059L134.966 32.4021C135.552 34.7287 135.648 37.2005 132.291 38.0247C132.291 38.0247 129.031 41.0313 135.21 41.0313C140.806 41.0313 141.633 38.0247 141.633 38.0247C139.541 36.0381 140.124 30.5111 140.708 27.5059Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M138.334 29.3105L134.882 32.1868C135.029 32.7143 135.129 33.2419 135.178 33.8168C136.461 33.6256 138.237 32.2341 138.384 30.9405C138.482 30.3643 138.433 29.8367 138.334 29.3105Z" fill="#1A2327" fill-opacity="0.129412"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.902 13.0781C136.415 13.0781 135.917 13.1299 135.413 13.2379C130.148 14.374 128.129 21.7264 128.425 26.4632C128.631 30.1127 131.543 32.465 134.807 32.465C136.221 32.465 137.702 32.0227 139.056 31.0524C142.058 28.8822 142.451 26.759 143.633 21.7752C144.784 17.2469 141.274 13.0781 136.902 13.0781Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M142.739 10.8242C141.949 10.8242 141.302 10.9946 140.971 11.2886C139.933 12.1635 139.834 12.8913 140.378 14.0078C140.921 15.1242 144.281 18.9614 146.011 19.6892C146.263 19.7911 146.497 19.8392 146.714 19.8392C148.762 19.8392 149.287 15.6381 148.037 13.6191C146.757 11.6016 144.424 10.8242 142.739 10.8242Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M138.585 11.2734C137.439 11.2734 136.494 11.5268 136.004 11.9515C134.53 13.3192 134.433 14.2477 135.218 15.9083C135.955 17.569 140.767 23.0886 143.222 24.1149C143.602 24.2745 143.955 24.3493 144.28 24.3493C147.236 24.3493 147.937 18.2749 146.168 15.3709C144.304 12.3908 140.996 11.2734 138.585 11.2734Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M125.905 69.8887C125.905 69.8887 121.828 109.124 122.172 124.672C122.516 140.804 128.509 177.651 128.509 177.651H135.437C135.437 177.651 134.355 141.73 134.945 125.89C135.681 108.588 141.183 69.8887 141.183 69.8887H125.905Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.683 175.398L127.229 175.673L127.89 178.101H136.276L136.683 175.398Z" fill="#1A2327"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M137.126 77.1055C136.528 77.1055 135.823 77.8377 134.995 79.5344C129.93 89.79 133.981 108.445 135.765 115.429C136.634 104.978 138.177 92.232 139.383 82.8066C138.918 79.4524 138.195 77.1055 137.126 77.1055Z" fill="black"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M146.703 69.8887L131.281 69.9369C131.281 69.9369 136.027 110.717 139.635 123.775C143.884 139.318 153.572 176.298 153.572 176.298L160.542 175.372C160.542 175.372 154.314 134.299 152.287 125.724C147.888 107.454 152.287 81.3386 146.703 69.8887Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M161.441 172.693L151.54 174.379L152.795 176.749L161.296 175.701L161.441 172.693Z" fill="#1A2327"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.188 21.1914C134.91 21.1914 134.604 21.4461 134.55 21.7786C134.432 22.1352 134.667 22.4931 134.959 22.5387C134.985 22.5414 135.01 22.5427 135.037 22.5427C135.353 22.5427 135.613 22.2854 135.722 21.9127C135.78 21.5547 135.604 21.1968 135.253 21.1968C135.232 21.1928 135.209 21.1914 135.188 21.1914Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M130.709 20.291C130.369 20.291 130.049 20.5457 129.993 20.8769C129.932 21.2804 130.115 21.5927 130.422 21.6383C130.448 21.641 130.476 21.6423 130.501 21.6423C130.834 21.6423 131.106 21.3876 131.218 21.0565C131.28 20.6543 131.097 20.3406 130.79 20.2964C130.762 20.2924 130.737 20.291 130.709 20.291Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M129.932 19.8398C129.932 19.8398 130.18 20.2895 130.55 20.2895C130.636 20.2895 130.732 20.2641 130.831 20.2025L129.932 19.8398Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M132.18 22.0938C131.672 22.9174 131.073 23.648 130.38 24.2878C130.712 24.6169 131.119 24.7978 131.567 24.7978C131.617 24.7978 131.668 24.7964 131.719 24.791L132.18 22.0938Z" fill="#ED847E"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.639 25.7012C135.603 25.7012 135.567 25.712 135.543 25.7309C134.974 26.1724 134.192 26.4131 133.391 26.4131C133.186 26.4131 132.978 26.3964 132.774 26.3644C132.727 26.3644 132.679 26.405 132.631 26.4438C132.631 26.483 132.679 26.5628 132.727 26.5628C132.966 26.6016 133.203 26.6016 133.395 26.6016C134.254 26.6016 135.114 26.3252 135.733 25.8509C135.782 25.8103 135.782 25.7711 135.733 25.7309C135.71 25.712 135.675 25.7012 135.639 25.7012Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M143.142 22.5449C141.958 22.5449 140.943 23.8958 140.605 24.9347C140.284 26.0145 140.699 27.0525 141.738 27.0525C141.865 27.0525 142.002 27.0372 142.149 27.0038C143.127 26.7013 144.001 26.0966 144.514 25.239C145.235 24.1785 144.618 22.7658 143.382 22.5646C143.302 22.551 143.222 22.5449 143.142 22.5449Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.569 18.9395C135.456 18.9395 135.385 19.034 135.385 19.1633C135.334 19.321 135.439 19.4266 135.596 19.4266C136.223 19.5843 136.798 20.0052 137.06 20.5838C137.111 20.6878 137.163 20.6878 137.216 20.7414H137.425C137.53 20.6358 137.582 20.4782 137.53 20.3725C137.163 19.5843 136.484 19.0577 135.647 18.9521C135.619 18.9442 135.594 18.9395 135.569 18.9395Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M131.174 17.5859C130.409 17.5859 129.669 17.8042 129.141 18.1919C129.03 18.2662 129.03 18.3769 129.141 18.4501C129.195 18.4877 129.251 18.4877 129.36 18.4877C129.417 18.4877 129.471 18.4501 129.526 18.4135C129.948 18.1299 130.492 17.9537 131.087 17.9537C131.189 17.9537 131.295 17.9593 131.399 17.9704C131.509 17.9704 131.675 17.9327 131.731 17.8219C131.731 17.7111 131.62 17.6369 131.509 17.6003C131.397 17.5915 131.287 17.5859 131.174 17.5859Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M153.684 182.411C154.106 182.411 154.705 182.532 155.155 182.677V182.731C154.581 183.056 154.061 183.229 153.713 183.229C153.593 183.229 153.494 183.208 153.421 183.167C153.276 183.057 153.179 182.894 153.179 182.731C153.179 182.677 153.179 182.568 153.227 182.514C153.308 182.441 153.474 182.411 153.684 182.411ZM153.73 182.16C153.457 182.16 153.22 182.212 153.082 182.351C152.986 182.459 152.89 182.622 152.938 182.785C152.938 183.004 153.082 183.221 153.227 183.384L153.276 183.439C153.385 183.49 153.51 183.513 153.646 183.513C154.236 183.513 155.024 183.095 155.493 182.785C155.541 182.731 155.59 182.731 155.59 182.677C155.59 182.622 155.541 182.568 155.493 182.568C155.354 182.49 154.424 182.16 153.73 182.16Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M154.325 181.085C154.374 181.085 154.419 181.099 154.465 181.127C154.509 181.127 154.509 181.127 154.554 181.181C154.914 181.57 155.184 182.122 155.32 182.73C154.779 182.453 154.06 181.735 154.014 181.347C154.014 181.293 154.014 181.181 154.149 181.127C154.217 181.099 154.273 181.085 154.325 181.085ZM154.325 180.809C154.24 180.809 154.149 180.822 154.06 180.85C153.88 180.905 153.789 181.127 153.789 181.347C153.835 181.79 154.284 182.287 154.734 182.675C154.96 182.841 155.23 182.952 155.499 183.061C155.499 183.061 155.544 183.061 155.59 183.007C155.59 183.007 155.59 182.952 155.59 182.896C155.59 182.841 155.184 181.238 154.554 180.85C154.486 180.822 154.408 180.809 154.325 180.809Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M126.862 183.779C127.59 183.878 128.316 184.125 128.995 184.52C128.576 184.575 128.193 184.603 127.862 184.603C127.308 184.603 126.898 184.526 126.717 184.372C126.621 184.273 126.571 184.125 126.571 183.977C126.571 183.927 126.621 183.878 126.669 183.829C126.717 183.779 126.814 183.779 126.862 183.779ZM126.882 183.514C126.757 183.514 126.651 183.534 126.571 183.582C126.426 183.681 126.378 183.779 126.378 183.927C126.329 184.174 126.426 184.372 126.571 184.52C126.911 184.766 127.347 184.865 127.783 184.865C128.316 184.816 128.849 184.766 129.383 184.668C129.43 184.618 129.48 184.618 129.48 184.569C129.48 184.52 129.48 184.421 129.43 184.421C129.222 184.335 127.676 183.514 126.882 183.514Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M127.998 182.853C128.163 182.853 128.327 182.901 128.436 182.997C128.875 183.428 129.149 183.956 129.203 184.53C128.491 184.195 127.559 183.332 127.668 182.997C127.668 182.948 127.668 182.853 127.888 182.853H127.998ZM127.888 182.613C127.503 182.661 127.395 182.804 127.395 182.948C127.231 183.525 128.602 184.627 129.314 184.866H129.424C129.478 184.818 129.478 184.77 129.478 184.77C129.478 184.674 129.369 183.332 128.656 182.804C128.436 182.661 128.163 182.613 127.888 182.613Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M125.768 68.5352C125.575 68.5352 125.43 68.679 125.43 68.7755L125.575 70.5971C125.623 70.6931 125.768 70.7896 125.962 70.7896H147.1C147.292 70.7896 147.485 70.6458 147.438 70.502L146.905 68.7277C146.808 68.5825 146.663 68.5352 146.567 68.5352H125.768Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M144.03 68.5371C143.922 68.5371 143.885 68.6327 143.885 68.6818L144.065 71.0964C144.065 71.192 144.137 71.2411 144.245 71.2411H144.641C144.712 71.2411 144.785 71.192 144.785 71.0964L144.605 68.6818C144.605 68.6327 144.497 68.5371 144.425 68.5371H144.03Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M127.368 68.5371C127.264 68.5371 127.229 68.6327 127.229 68.6818L127.402 71.0964C127.437 71.192 127.506 71.2411 127.576 71.2411H127.99C128.06 71.2411 128.129 71.192 128.094 71.0964L127.922 68.6818C127.922 68.6327 127.852 68.5371 127.748 68.5371H127.368Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.54 68.5371C135.436 68.5371 135.332 68.6327 135.385 68.6818L135.645 71.0964C135.645 71.192 135.748 71.2411 135.852 71.2411H136.474C136.578 71.2411 136.683 71.192 136.683 71.0964L136.371 68.6818C136.371 68.6327 136.267 68.5371 136.163 68.5371H135.54Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M134.432 20.7422C134.432 20.7422 134.644 21.1919 135.02 21.1919C135.114 21.1919 135.217 21.1638 135.331 21.0935L134.432 20.7422Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M132.292 37.4258C129.846 37.6215 124.174 38.0101 122.903 39.0824C121.68 40.155 121.24 61.2577 122.266 68.7128C123.294 76.1701 119.576 141.377 121.337 153.756C129.759 153.142 134.202 153.018 136.409 153.018C137.879 153.018 138.357 153.074 138.357 153.074L138.895 149.272L140.411 153.172C140.411 153.172 147.798 152.519 153.457 152.519C155.983 152.519 158.165 152.649 159.191 153.024C159.093 140.841 153.322 81.336 148.724 69.1529C150.29 53.8987 152.295 39.7168 151.316 38.5958C150.29 37.4754 141.829 37.4258 141.829 37.4258C140.265 39.0824 138.161 40.1068 135.912 40.2529C135.853 40.2542 135.796 40.2542 135.739 40.2542C132.34 40.2542 132.292 37.4258 132.292 37.4258Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M132.292 37.4258C129.846 37.6215 124.174 38.0101 122.903 39.0824C121.68 40.155 121.24 61.2577 122.266 68.7128C123.294 76.1701 119.576 141.377 121.337 153.756C129.759 153.142 134.202 153.018 136.409 153.018C137.879 153.018 138.357 153.074 138.357 153.074L138.895 149.272L140.411 153.172C140.411 153.172 147.798 152.519 153.457 152.519C155.983 152.519 158.165 152.649 159.191 153.024C159.093 140.841 153.322 81.336 148.724 69.1529C150.29 53.8987 152.295 39.7168 151.316 38.5958C150.29 37.4754 141.829 37.4258 141.829 37.4258C140.265 39.0824 138.161 40.1068 135.912 40.2529C135.853 40.2542 135.796 40.2542 135.739 40.2542C132.34 40.2542 132.292 37.4258 132.292 37.4258Z" fill="#ABF2BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M139.384 65.832C139.432 66.9106 139.579 67.99 139.869 69.0171C140.751 69.3301 142.668 69.4378 144.592 69.4378C146.153 69.4378 147.72 69.367 148.74 69.2746L148.692 69.1204L148.837 67.5788L139.384 65.832Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M147.937 47.3438C147.937 50.1965 148.524 55.0161 150.019 58.1638C150.394 54.8687 150.766 51.7711 151.086 49.0657L147.937 47.3438Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.19 40.1309C135.105 40.1309 135.018 40.1908 135.018 40.313C135.018 40.4109 134.629 49.9423 134.53 70.3172C134.432 103.873 138.542 148.661 138.591 149.098C138.591 149.196 138.689 149.244 138.739 149.244H138.787C138.885 149.244 138.934 149.146 138.934 149.05C138.885 148.612 134.775 103.873 134.872 70.3172C134.97 49.9423 135.362 40.4109 135.362 40.313C135.362 40.1908 135.277 40.1309 135.19 40.1309Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M142.737 68.5352C142.63 68.5352 142.535 68.6262 142.592 68.7674C143.779 71.8068 146.058 74.2773 149.001 75.7494H149.097C149.144 75.7494 149.192 75.7026 149.239 75.6539C149.286 75.5601 149.239 75.4645 149.144 75.4162C146.296 73.9923 144.111 71.6175 142.923 68.6731C142.886 68.5766 142.808 68.5352 142.737 68.5352Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M120.206 51.4023C119.618 51.4023 119.126 51.938 119.225 52.5233L121.68 71.0198C121.777 71.6533 122.268 72.1389 122.956 72.1389H136.507C136.532 72.1421 136.556 72.1421 136.58 72.1421C137.178 72.1421 137.583 71.5816 137.489 71.0198L135.082 52.5233C134.985 51.8898 134.445 51.4519 133.806 51.4023H120.206Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M136.546 58.166L136.234 63.4532C136.234 63.4532 137.991 64.4772 139.703 64.4772C140.217 64.4772 140.727 64.3852 141.184 64.1453L140.819 62.0207L136.546 58.166Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M127.072 68.5371C126.968 68.5371 126.865 68.5867 126.865 68.6873C126.345 71.242 125.099 73.5966 123.231 75.4497C123.178 75.4993 123.178 75.5999 123.231 75.7004C123.282 75.7004 123.333 75.75 123.386 75.75C123.437 75.75 123.489 75.7004 123.542 75.7004C126.812 72.2434 127.228 68.887 127.228 68.7369C127.228 68.6363 127.176 68.5371 127.072 68.5371Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M132.233 57.7148L132.182 61.9555L137.131 63.5751L136.672 58.0963L132.233 57.7148Z" fill="#FFC3BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M151.361 38.7793L144.801 43.3883C144.851 43.4361 144.995 43.6309 145.092 43.7269L145.381 44.1634C145.621 44.5038 145.815 44.7947 146.007 45.1351C146.393 45.7167 146.779 46.3958 147.165 47.027C147.888 48.3856 148.563 49.7437 149.143 51.15C150.3 53.9149 151.12 56.8263 151.553 59.8342C151.553 60.1728 151.603 60.5132 151.651 60.9014L151.698 61.2897H151.603C151.023 61.2897 150.494 61.2897 149.914 61.1923C148.563 60.9497 147.165 60.6106 145.863 60.125C145.187 59.8342 144.464 59.5434 143.789 59.2521L142.776 58.7665C142.439 58.6213 142.101 58.4261 141.811 58.2809L138.484 66.0921C139.015 66.2856 139.4 66.383 139.835 66.4803L141.136 66.8686C141.956 67.1102 142.825 67.3528 143.692 67.5481C145.526 67.9841 147.358 68.3232 149.191 68.4683C149.69 68.5121 150.178 68.5369 150.666 68.5369C151.264 68.5369 151.86 68.5004 152.47 68.4205C153.097 68.3232 153.773 68.1775 154.399 67.9349C155.171 67.6441 155.943 67.2554 156.57 66.6738C157.293 66.0443 157.872 65.2674 158.258 64.3454C158.547 63.5689 158.741 62.7443 158.741 61.9196C158.741 61.5805 158.741 61.2405 158.692 60.9014L158.644 60.2224C158.596 59.7846 158.547 59.3481 158.499 58.9121C158.016 55.3708 157.149 51.8773 155.943 48.5308C155.315 46.88 154.64 45.2311 153.918 43.6309C153.531 42.8049 153.145 42.0298 152.712 41.2533L152.084 40.0404L151.747 39.4092C151.603 39.2158 151.506 39.0223 151.361 38.7793Z" fill="#80ED99"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M151.361 38.7793L144.801 43.3883C144.851 43.4361 144.995 43.6309 145.092 43.7269L145.381 44.1634C145.621 44.5038 145.815 44.7947 146.007 45.1351C146.393 45.7167 146.779 46.3958 147.165 47.027C147.888 48.3856 148.563 49.7437 149.143 51.15C150.3 53.9149 151.12 56.8263 151.553 59.8342C151.553 60.1728 151.603 60.5132 151.651 60.9014L151.698 61.2897H151.603C151.023 61.2897 150.494 61.2897 149.914 61.1923C148.563 60.9497 147.165 60.6106 145.863 60.125C145.187 59.8342 144.464 59.5434 143.789 59.2521L142.776 58.7665C142.439 58.6213 142.101 58.4261 141.811 58.2809L138.484 66.0921C139.015 66.2856 139.4 66.383 139.835 66.4803L141.136 66.8686C141.956 67.1102 142.825 67.3528 143.692 67.5481C145.526 67.9841 147.358 68.3232 149.191 68.4683C149.69 68.5121 150.178 68.5369 150.666 68.5369C151.264 68.5369 151.86 68.5004 152.47 68.4205C153.097 68.3232 153.773 68.1775 154.399 67.9349C155.171 67.6441 155.943 67.2554 156.57 66.6738C157.293 66.0443 157.872 65.2674 158.258 64.3454C158.547 63.5689 158.741 62.7443 158.741 61.9196C158.741 61.5805 158.741 61.2405 158.692 60.9014L158.644 60.2224C158.596 59.7846 158.547 59.3481 158.499 58.9121C158.016 55.3708 157.149 51.8773 155.943 48.5308C155.315 46.88 154.64 45.2311 153.918 43.6309C153.531 42.8049 153.145 42.0298 152.712 41.2533L152.084 40.0404L151.747 39.4092C151.603 39.2158 151.506 39.0223 151.361 38.7793Z" fill="#ABF2BD"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M141.458 36.9746C139.761 38.3372 137.869 39.4563 135.784 40.2355C137.288 41.5981 137.335 45.5402 137.335 45.5402C137.335 45.5402 143.884 40.7215 143.643 37.3642C142.963 37.1207 142.235 36.9746 141.458 36.9746Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M131.731 36.9727C131.275 36.9727 130.823 37.0502 130.41 37.2076C128.581 40.5473 132.544 44.6378 132.544 44.6378C132.544 44.6378 133.305 41.3459 134.88 39.9495C133.662 39.4517 132.747 38.3542 132.544 37.0565C132.277 37.0011 132.003 36.9727 131.731 36.9727Z" fill="#44B78B"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M134.139 12.627C133.196 12.627 132.101 13.3317 130.833 15.0957C129.48 17.0341 136.871 22.2681 139.384 22.996C138.751 20.4968 137.29 12.627 134.139 12.627Z" fill="#263238"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M135.732 17.8952C135.833 17.8952 135.933 17.8952 136.083 17.9472C137.383 18.2029 138.133 20.04 137.734 21.9306C137.372 23.6836 136.194 24.9358 135.011 24.9358C134.886 24.9358 134.758 24.9218 134.632 24.8916C133.283 24.585 132.532 22.7986 132.932 20.908C133.333 19.172 134.533 17.8952 135.732 17.8952ZM135.667 17.5859C134.314 17.5859 132.986 18.9285 132.583 20.8069C132.182 22.8997 133.033 24.8916 134.533 25.1977C134.683 25.2496 134.783 25.2496 134.933 25.2496C136.334 25.2496 137.633 23.9222 138.034 22.0316C138.483 19.9389 137.633 17.9472 136.133 17.641C135.978 17.6028 135.822 17.5859 135.667 17.5859Z" fill="#3A9C76"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M129.88 16.9825C129.98 16.9825 130.081 17.0328 130.23 17.0328C131.531 17.3374 132.28 19.1162 131.88 20.9956C131.518 22.7394 130.342 23.9867 129.121 23.9867C128.991 23.9867 128.861 23.9713 128.73 23.9425C127.43 23.6882 126.679 21.8591 127.079 19.9798C127.281 19.0659 127.679 18.3029 128.33 17.6435C128.73 17.2369 129.28 17.0328 129.88 16.9825ZM129.826 16.6855C129.186 16.6855 128.576 16.946 128.13 17.4394C127.43 18.1004 126.979 18.9639 126.779 19.8777C126.33 22.0114 127.18 23.9425 128.681 24.2973C128.83 24.2973 128.98 24.3492 129.13 24.3492C130.479 24.3492 131.83 22.977 132.231 21.0976C132.631 19.0142 131.781 17.0328 130.28 16.7282C130.129 16.6993 129.976 16.6855 129.826 16.6855Z" fill="#3A9C76"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M132.1 20.7422C132.033 20.7422 131.965 20.7488 131.9 20.762C131.788 20.762 131.731 20.9072 131.788 20.9819C131.788 21.1293 131.9 21.2019 131.957 21.2019C132.004 21.1887 132.053 21.1821 132.102 21.1821C132.333 21.1821 132.557 21.3251 132.744 21.5692C132.744 21.5692 132.8 21.6418 132.857 21.6418C132.913 21.6418 132.968 21.6418 133.026 21.5692C133.081 21.4944 133.081 21.3492 133.026 21.2019C132.792 20.8962 132.439 20.7422 132.1 20.7422Z" fill="#3A9C76"></path>',106)]))}const rd={},cd=(0,$.A)(rd,[["render",ld]]),dd=cd,hd={name:"NotOptimizedViewportModal",components:{Illustration:dd},data(){return{isModalActive:!0}},methods:{handleNotOptimizedModal(){this.isModalActive=!1}}},ud=(0,$.A)(hd,[["render",ad],["__scopeId","data-v-5a442ccf"]]),md=ud,pd={class:"viewport-modal"},gd={class:"modal-card-body"},Cd={class:"content"},_d={class:"modal-card-foot",style:{"padding-top":"0"}};function bd(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button"),r=(0,o.resolveComponent)("b-modal");return(0,o.openBlock)(),(0,o.createElementBlock)("section",pd,[(0,o.createVNode)(r,{modelValue:a.isModalActive,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isModalActive=e),class:"modal-text-center",width:500,"can-cancel":!1},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("section",gd,[(0,o.createElementVNode)("div",Cd,[(0,o.createElementVNode)("h3",null,(0,o.toDisplayString)(e.$t("annotation_deleted")),1)])]),(0,o.createElementVNode)("footer",_d,[(0,o.createVNode)(l,{type:"is-primary",class:"primary-button",onClick:s.closeModal},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("ok")),1)])),_:1},8,["onClick"])])])),_:1},8,["modelValue"])])}const Ed={name:"AnnotationDeletedModal",data(){return{isModalActive:"#deleted"===window.location.hash}},methods:{closeModal(){window.location.hash="",this.isModalActive=!1}}},Sd=(0,$.A)(Ed,[["render",bd]]),fd=Sd,vd={class:"document-error-modal"},Ad={class:"modal-card-body"},kd={class:"header"},Nd={class:"error-icon"},wd={class:"content"},yd={class:"modal-card-foot"};function Td(e,t,n,i,a,s){const l=(0,o.resolveComponent)("ErrorIcon"),r=(0,o.resolveComponent)("b-button"),c=(0,o.resolveComponent)("b-modal");return(0,o.openBlock)(),(0,o.createElementBlock)("section",vd,[(0,o.createVNode)(c,{modelValue:a.isModalActive,"onUpdate:modelValue":t[0]||(t[0]=e=>a.isModalActive=e),width:400,"can-cancel":["x"],"on-cancel":s.closeModal},{default:(0,o.withCtx)((()=>[(0,o.createElementVNode)("section",Ad,[(0,o.createElementVNode)("div",kd,[(0,o.createElementVNode)("div",Nd,[(0,o.createVNode)(l,{class:"icon"})])]),(0,o.createElementVNode)("div",wd,[(0,o.createElementVNode)("h3",null,(0,o.toDisplayString)(e.$t("document_error_title")),1),(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(e.$t("document_error_info")),1)])]),(0,o.createElementVNode)("footer",yd,[e.showBranding?((0,o.openBlock)(),(0,o.createBlock)(r,{key:0,type:"is-primary",class:"primary-button",onClick:s.handleContactSupport},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("contact_support")),1)])),_:1},8,["onClick"])):(0,o.createCommentVNode)("",!0)])])),_:1},8,["modelValue","on-cancel"])])}const Bd={width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dd(e,t){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Bd,t[0]||(t[0]=[(0,o.createElementVNode)("g",{"clip-path":"url(#clip0_5456_102710)"},[(0,o.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.02582 0.854884C7.32534 0.686248 7.66328 0.597656 8.00701 0.597656C8.35075 0.597656 8.68868 0.686248 8.98821 0.854884C9.28773 1.02352 9.53874 1.26651 9.71701 1.5604L9.71893 1.56357L15.3656 10.9902L15.371 10.9994C15.5456 11.3019 15.638 11.6447 15.639 11.994C15.64 12.3432 15.5495 12.6866 15.3766 12.99C15.2036 13.2934 14.9543 13.5462 14.6533 13.7233C14.3523 13.9004 14.0102 13.9956 13.661 13.9994L13.6537 13.9995L2.35302 13.9995C2.00382 13.9956 1.66171 13.9004 1.36073 13.7233C1.05974 13.5462 0.810381 13.2934 0.637445 12.99C0.46451 12.6866 0.37403 12.3432 0.375008 11.994C0.375986 11.6447 0.468387 11.3019 0.643019 10.9994L0.648434 10.9902L6.297 1.56039C6.47528 1.2665 6.72629 1.02352 7.02582 0.854884ZM8.00701 1.93099C7.89243 1.93099 7.77979 1.96052 7.67995 2.01673C7.58056 2.07269 7.49719 2.15321 7.43782 2.25058L1.79547 11.67C1.73869 11.7699 1.70866 11.8828 1.70834 11.9977C1.70801 12.1141 1.73817 12.2286 1.79582 12.3297C1.85346 12.4308 1.93658 12.5151 2.03691 12.5741C2.13636 12.6327 2.24928 12.6644 2.36461 12.6662H13.6494C13.7647 12.6644 13.8777 12.6327 13.9771 12.5741C14.0774 12.5151 14.1606 12.4308 14.2182 12.3297C14.2759 12.2286 14.306 12.1141 14.3057 11.9977C14.3054 11.8828 14.2753 11.7699 14.2186 11.6701L8.57701 2.2519C8.57675 2.25146 8.57648 2.25102 8.57621 2.25058C8.51683 2.15321 8.43347 2.07269 8.33408 2.01673C8.23424 1.96052 8.12159 1.93099 8.00701 1.93099ZM8.00701 4.66615C8.3752 4.66615 8.67368 4.96463 8.67368 5.33282V7.99949C8.67368 8.36768 8.3752 8.66615 8.00701 8.66615C7.63882 8.66615 7.34035 8.36768 7.34035 7.99949V5.33282C7.34035 4.96463 7.63882 4.66615 8.00701 4.66615ZM7.34035 10.6662C7.34035 10.298 7.63882 9.99949 8.00701 9.99949H8.01368C8.38187 9.99949 8.68035 10.298 8.68035 10.6662C8.68035 11.0343 8.38187 11.3328 8.01368 11.3328H8.00701C7.63882 11.3328 7.34035 11.0343 7.34035 10.6662Z",fill:"#E7423A"})],-1),(0,o.createElementVNode)("defs",null,[(0,o.createElementVNode)("clipPath",{id:"clip0_5456_102710"},[(0,o.createElementVNode)("rect",{width:"16",height:"16",fill:"white",transform:"translate(0.0078125)"})])],-1)]))}const Ld={},Vd=(0,$.A)(Ld,[["render",Dd]]),xd=Vd,Md={name:"DocumentErrorModal",components:{ErrorIcon:xd},data(){return{isModalActive:!0}},computed:{...(0,s.aH)("display",["showBranding"])},methods:{handleContactSupport(){const e="Document error";this.$store.dispatch("document/contactSupport",e)},closeModal(){this.$store.dispatch("document/setDocumentError",!1)}}},Id=(0,$.A)(Md,[["render",Td],["__scopeId","data-v-254242fc"]]),Od=Id;var Pd=n(9415);const $d={name:"DocumentDashboard",components:{Splitpanes:Pd.S,Pane:Pd.Z,DocumentTopBar:Vt,ScrollingDocument:xo,DocumentThumbnails:Xo,DocumentAnnotations:Cl,DocumentEdit:Wc,ErrorMessage:Qc,NotOptimizedViewportModal:md,DocumentErrorModal:Od,ChooseLabelSetModal:Bl,AnnotationDeletedModal:fd},data(){return{resizeObserver:null,unwatchSelectedDocument:null,documentContainerLeftPadding:0,documentContainerWidth:0}},computed:{...(0,s.aH)("display",["scale","fit","optimalResolution","pageWidthScale","currentPage","showAnnSetTable","showChooseLabelSetModal"]),...(0,s.aH)("document",["showActionError","showDocumentError","errorMessageWidth","selectedDocument","splittingSuggestions"]),...(0,s.aH)("edit",["editMode","renameAndCategorize"]),...(0,s.L8)("display",["isMinimumWidth"])},watch:{selectedDocument(e,t){e&&!t?this.resizeObserver.observe(this.$refs.scrollingDocument.$el):e&&this.onDocumentResize()},fit(e,t){e!==t&&this.onDocumentResize()}},mounted(){this.resizeObserver=new ResizeObserver(this.onDocumentResize)},unmounted(){this.$refs.scrollingDocument&&this.resizeObserver.unobserve(this.$refs.scrollingDocument.$el)},methods:{elementsWidth(){let e=1;return this.$refs.editView&&(e+=this.$refs.editView.$el.clientWidth),this.$refs.documentPages&&(e+=this.$refs.documentPages.$el.clientWidth),this.$refs.annotations&&(e+=this.$refs.annotations.$el.clientWidth),e},onDocumentResize(){this.$refs.scrollingDocument&&(this.documentContainerLeftPadding=this.$refs.scrollingDocument.$el.getBoundingClientRect().left,this.documentContainerWidth=this.$refs.scrollingDocument.$el.offsetWidth,this.$store.dispatch("display/updateOptimalResolution",this.$el.offsetWidth),this.selectedDocument.pages[0]&&this.$store.dispatch("display/updateScale",{elementsWidth:this.elementsWidth(),client:{width:this.$el.clientWidth,height:this.$el.clientHeight},viewport:{width:this.selectedDocument.pages[0].size[0],height:this.selectedDocument.pages[0].size[1]}}))}}},Rd=(0,$.A)($d,[["render",m],["__scopeId","data-v-5bb4e541"]]),Fd=Rd,Hd={class:"error-page"};function zd(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-icon");return(0,o.openBlock)(),(0,o.createElementBlock)("div",Hd,[(0,o.createVNode)(l,{icon:"circle-exclamation",size:"is-48",class:"error-icon"}),(0,o.createElementVNode)("h1",null,(0,o.toDisplayString)(e.$t("document_error_title")),1),(0,o.createElementVNode)("h2",null,(0,o.toDisplayString)(n.error?n.error:""),1)])}const Ud={name:"ErrorPage",props:{error:{type:String,required:!1,default:null}}},Zd=(0,$.A)(Ud,[["render",zd],["__scopeId","data-v-6b311fc9"]]),Gd=Zd,Wd={key:0,class:"documents-list"},qd={key:0,class:"documents-list-top"},jd={class:"documents-list-top-left"},Kd={class:"documents-list-top-right"},Yd={key:0,class:"action-box"},Jd={class:"documents-list-bottom"},Xd=["onClick"],Qd={key:0,class:"error-icon"};function eh(e,t,n,i,a,s){const l=(0,o.resolveComponent)("b-button"),r=(0,o.resolveComponent)("b-skeleton"),c=(0,o.resolveComponent)("ServerImage"),d=(0,o.resolveComponent)("ErrorIcon"),h=(0,o.resolveComponent)("b-carousel-list");return e.documentsAvailableToReview&&e.documentsAvailableToReview.length>0?((0,o.openBlock)(),(0,o.createElementBlock)("div",Wd,[a.showCategoryInfo&&a.selectedCategory?((0,o.openBlock)(),(0,o.createElementBlock)("div",qd,[(0,o.createElementVNode)("div",jd,[(0,o.createElementVNode)("h2",null,(0,o.toDisplayString)(a.selectedCategory.name),1),(0,o.createElementVNode)("p",null,(0,o.toDisplayString)(a.selectedCategory.description),1)]),(0,o.createElementVNode)("div",Kd,[e.showBranding?((0,o.openBlock)(),(0,o.createElementBlock)("div",Yd,[(0,o.createElementVNode)("span",null,(0,o.toDisplayString)(e.$t("upload_documents")),1),(0,o.createVNode)(l,{class:"action-button primary-button",type:"is-primary",onClick:s.requestTrialAccess},{default:(0,o.withCtx)((()=>[(0,o.createTextVNode)((0,o.toDisplayString)(e.$t("request_trial")),1)])),_:1},8,["onClick"])])):(0,o.createCommentVNode)("",!0)])])):(0,o.createCommentVNode)("",!0),(0,o.createElementVNode)("div",Jd,[(0,o.createVNode)(h,{data:e.documentsAvailableToReview,"items-to-show":5},{item:(0,o.withCtx)((t=>[(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["documents-list-thumbnail",e.selectedDocument.id==t.id&&"selected"]),onClick:e=>s.changeDocument(t.id)},[(0,o.createVNode)(c,{class:(0,o.normalizeClass)(["img-thumbnail",e.selectedDocument.id==t.id&&"selected"]),"image-url":`${t.thumbnail_url}?${t.updated_at}`},{default:(0,o.withCtx)((()=>[(0,o.createVNode)(r,{width:"20px",height:"100%"})])),_:2},1032,["class","image-url"]),(0,o.createElementVNode)("div",{class:(0,o.normalizeClass)(["document-name",e.selectedDocument.id==t.id&&"selected"])},(0,o.toDisplayString)(e.selectedDocument.id==t.id?e.selectedDocument.data_file_name:t.data_file_name),3),e.documentHadErrorDuringExtraction(t)?((0,o.openBlock)(),(0,o.createElementBlock)("div",Qd,[(0,o.createVNode)(d)])):(0,o.createCommentVNode)("",!0)],10,Xd)])),_:1},8,["data"])])])):(0,o.createCommentVNode)("",!0)}const th={name:"DocumentsList",components:{ServerImage:we,ErrorIcon:xd},data(){return{showCategoryInfo:!1,selectedCategory:null,documentsList:null}},computed:{...(0,s.aH)("document",["selectedDocument"]),...(0,s.aH)("category",["documentsAvailableToReview"]),...(0,s.aH)("display",["showBranding"]),...(0,s.L8)("category",["category"]),...(0,s.L8)("document",["documentHadErrorDuringExtraction"])},watch:{showCategoryInfo(e){e&&(this.selectedCategory=this.category(this.selectedDocument.category))}},methods:{changeDocument(e){this.$store.dispatch("document/changeCurrentDocument",e)},requestTrialAccess(){window.open("https://konfuzio.com","_blank")}}},nh=(0,$.A)(th,[["render",eh],["__scopeId","data-v-710ee0ae"]]),oh=nh;var ih=n(6704);const ah={name:"App",components:{DocumentsList:oh,DocumentDashboard:Fd,ErrorPage:Gd},props:{document:{type:String,required:!1,default:null},user_token:{type:String,required:!1,default:""},full_mode:{type:String,required:!1,default:"false"},show_documents_navigation:{type:String,required:!1,default:"true"},show_missing_annotations:{type:String,required:!1,default:"true"},show_feedback_needed_annotations:{type:String,required:!1,default:"true"},show_accepted_annotations:{type:String,required:!1,default:"true"},sentry_dsn:{type:String,required:!1,default:""},sentry_env:{type:String,required:!1,default:""},api_url:{type:String,required:!1,default:""},image_url:{type:String,required:!1,default:""},locale:{type:String,required:!1},documents_list_path:{type:String,required:!1,default:""},details_url:{type:String,required:!1,default:""},annotation:{type:String,required:!1,default:""},annotationSet:{type:String,required:!1,default:""},sso_url:{type:String,required:!1,default:""},sso_realm:{type:String,required:!1,default:""},sso_client_id:{type:String,required:!1,default:""},hide_empty_label_sets:{type:String,required:!1,default:"false"},annotation_content_width:{type:String,required:!1,default:"60"},remove_branding:{type:String,required:!1,default:"false"}},computed:{...(0,s.aH)("display",["pageError"]),documentId(){return es("document")?es("document"):ts("d")?ts("d"):{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DOCUMENT?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DOCUMENT:this.document?this.document:null},userToken(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_USER_TOKEN?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_USER_TOKEN:this.user_token?this.user_token:null},fullMode(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_FULL_MODE?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_FULL_MODE:this.full_mode&&"true"===this.full_mode?this.full_mode:null},showDocumentsNavigation(){return!this.isPublicView&&({NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_DOCUMENTS_NAVIGATION?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_DOCUMENTS_NAVIGATION:"true"===this.show_documents_navigation)},removeBranding(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_REMOVE_BRANDING?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_REMOVE_BRANDING:"true"===this.remove_branding},showMissingAnnotations(){return"#unrevised"!==window.location.hash&&"#possiblyIncorrect"!==window.location.hash&&({NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_MISSING_ANNOTATIONS?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_MISSING_ANNOTATIONS:"true"===this.show_missing_annotations)},showAcceptedAnnotations(){return"#unrevised"!==window.location.hash&&"#possiblyIncorrect"!==window.location.hash&&({NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_ACCEPTED_ANNOTATIONS?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_ACCEPTED_ANNOTATIONS:"true"===this.show_accepted_annotations)},showFeedbackNeededAnnotations(){return"#unrevised"===window.location.hash||"#possiblyIncorrect"===window.location.hash||({NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_FEEDBACK_NEEDED_ANNOTATIONS?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_FEEDBACK_NEEDED_ANNOTATIONS:"true"===this.show_feedback_needed_annotations)},isPublicView(){return!(this.userToken||this.fullMode||this.ssoUrl&&this.ssoRealm&&this.ssoClientId)},showDocumentsList(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SHOW_DOCUMENTS_LIST},documentsListPath(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DOCUMENTS_LIST_PATH?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DOCUMENTS_LIST_PATH:this.documents_list_path&&""!==this.documents_list_path?this.documents_list_path:null},detailsUrl(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DETAILS_URL?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DETAILS_URL:this.details_url?this.details_url:null},ssoUrl(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_URL?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_URL:this.sso_url?this.sso_url:null},ssoRealm(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_REALM?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_REALM:this.sso_realm?this.sso_realm:null},ssoClientId(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_CLIENT_ID?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SSO_CLIENT_ID:this.sso_client_id?this.sso_client_id:null},annotationId(){return ns("ann")?ns("ann"):{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION:this.annotation?this.annotation:null},annotationSetId(){return ns("templ")?ns("templ"):{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION_SET?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION_SET:this.annotationSet?this.annotationSet:null},hideEmptyLabelSets(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_HIDE_EMPTY_LABEL_SETS?"true"==={NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_HIDE_EMPTY_LABEL_SETS:"true"===this.hide_empty_label_sets},annotationContentWidth(){return{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION_CONTENT_WIDTH?{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_ANNOTATION_CONTENT_WIDTH:this.annotation_content_width}},async created(){l.T({Vue:o["default"],dsn:{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SENTRY_DSN,integrations:[new ih.IQ.Jh],environment:{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_SENTRY_ENV,tracesSampleRate:1,logErrors:!0,tracingOptions:{trackComponents:!0}}),console.log(`${this.removeBranding?"":n(8330).UU} ${n(8330).rE}`),console.log("-------"),this.locale&&""!==this.locale&&(this.$i18n.locale=this.locale),this.userToken?Ae.setAuthToken(this.userToken):this.ssoUrl&&this.ssoRealm&&this.ssoClientId&&await se(this.ssoUrl,this.ssoRealm,this.ssoClientId),Ae.setLocale(this.$i18n.locale),""!==this.api_url&&Ae.setApiUrl(this.api_url),""!==this.image_url&&Ae.setFileUrl(this.image_url),Promise.all([this.$store.dispatch("display/setDetailsUrl",this.detailsUrl),this.$store.dispatch("display/setAnnotationWidth",this.annotationContentWidth),this.$store.dispatch("display/hideEmptyLabelSets",this.hideEmptyLabelSets),this.$store.dispatch("display/showDocumentsNavigation",this.showDocumentsNavigation),this.$store.dispatch("display/showBranding",!this.removeBranding),this.$store.dispatch("document/showMissingAnnotations",this.showMissingAnnotations),this.$store.dispatch("document/showFeedbackNeededAnnotations",this.showFeedbackNeededAnnotations),this.$store.dispatch("document/showAcceptedAnnotations",this.showAcceptedAnnotations),this.$store.dispatch("document/setDocId",this.documentId),this.$store.dispatch("document/setPublicView",this.isPublicView),this.$store.dispatch("document/setAnnotationId",this.annotationId),this.$store.dispatch("document/setAnnotationSetId",this.annotationSetId),this.$store.dispatch("project/setDocumentsListPath",this.documentsListPath)]).finally((()=>{this.$store.dispatch("document/fetchDocument")}));const e=window.ResizeObserver;window.ResizeObserver=class extends e{constructor(e){e=rs(e,20),super(e)}}}},sh=(0,$.A)(ah,[["render",a]]),lh=sh;var rh=n(7411),ch=n(5916),dh=n(4682);function hh(){const e=n(5432),t={};return e.keys().forEach((n=>{const o=n.match(/([A-Za-z0-9-_]+)\./i);if(o&&o.length>1){const i=o[1];t[i]=e(n)}})),t}const uh=(0,dh.hU)({locale:{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_LOCALE||"en",fallbackLocale:"en",messages:hh()});var mh=n(346);const ph=Ae.HTTP,gh=(e,t)=>{const n=Math.pow(10,t||0);return Math.floor(e*n)/n},Ch={scale:void 0,fit:"width",currentPage:1,optimalResolution:!0,interactionBlocked:!1,categorizeModalIsActive:!1,pageChangedFromThumbnail:!1,showAnnSetTable:null,showChooseLabelSetModal:null,hideEmptyLabelSets:!1,showDocumentsNavigation:!0,currentSearch:"",searchEnabled:!1,searchResults:[],searchLoading:!1,currentSearchResult:null,detailsUrl:null,pageError:null,labelWidth:40,annotationWidth:60,showBranding:!0},_h={isMinimumWidth:e=>e=>e>=Ot,pageWidthScale:e=>(e,t,n)=>(t-e)*Mt*It/n,pageHeightScale:e=>(e,t)=>e*Mt*It/t,visiblePageRange:(e,t,n,o)=>{const i=o.pageCount,a=e.currentPage-1<1?1:e.currentPage-1,s=e.currentPage+1>i?i:e.currentPage+1;return[a,e.currentPage,s]},searchResultsForPage:(e,t)=>t=>!e.searchEnabled||e.searchResults.length<1?[]:e.searchResults.filter((e=>e.page_index+1===t)),currentSearchResultForPage:e=>t=>{if(!e.searchEnabled||e.searchResults.length<1)return!1;const n=e.searchResults[e.currentSearchResult];return!(!n||n.page_index!==t-1)&&n},scaledEntities:(e,t)=>(e,n)=>e&&0!==e.length?e.map((e=>{const o=t.bboxToRect(n,e);return{original:e,scaled:{...o}}})):[],imageScale:e=>e=>e.size&&e.size.length>0&&e.original_size&&e.original_size.length>0?new mh.A(e.size[0]).div(e.original_size[0]).toNumber():0,bboxToPoint:(e,t)=>(n,o,i=!1)=>{if(n&&n.original_size&&n.original_size.length>1){const a=t.imageScale(n),{x:s,y:l}=o,r=new mh.A(n.original_size[1]),c={x:new mh.A(s).minus(i?1:0).times(e.scale).times(a).div(Mt).toNumber(),y:r.minus(new mh.A(l)).minus(i?17.1:0).times(e.scale).times(a).div(Mt).toNumber()};return c}return{x:0,y:0}},bboxToRect:(e,t)=>(n,o,i=!1)=>{const a=t.imageScale(n);if(o.x0&&o.y0){const{x0:t,x1:s,y0:l,y1:r}=o,c=new mh.A(n.original_size[1]),d={x:new mh.A(t).minus(i?1:0).times(e.scale).times(a).div(Mt).toNumber(),y:c.minus(new mh.A(r)).minus(i?17.1:0).times(e.scale).times(a).div(Mt).toNumber(),width:new mh.A(s).minus(t).abs().times(e.scale).times(a).div(Mt).toNumber(),height:new mh.A(r).minus(l).times(e.scale).times(a).div(Mt).toNumber()};return d}return{x:0,y:0,width:0,height:0}},clientToBbox:(e,t)=>(n,o,i)=>{const a=new mh.A(n.original_size[1]),s=t.imageScale(n),l=new mh.A(Math.min(o.x,i.x)).div(e.scale).div(s).times(Mt).dp(3,mh.A.ROUND_DOWN).toNumber(),r=new mh.A(Math.max(o.x,i.x)).div(e.scale).div(s).times(Mt).dp(3,mh.A.ROUND_UP).toNumber(),c=new mh.A(Math.min(o.y,i.y)).div(e.scale).div(s).times(Mt).dp(3).toNumber(),d=new mh.A(Math.max(o.y,i.y)).div(e.scale).div(s).times(Mt).dp(3).toNumber(),h=a.minus(d).dp(3,mh.A.ROUND_DOWN).toNumber(),u=a.minus(c).dp(3,mh.A.ROUND_UP).toNumber(),m={x0:l,x1:r,y0:h,y1:u,page_index:n.number-1};return m}},bh={updateScale({commit:e,getters:t},{elementsWidth:n,client:o,viewport:i,scale:a}){switch(Ch.fit){case"width":e("SET_SCALE",t.pageWidthScale(n,o.width,i.width));break;case"auto":const s=t.pageWidthScale(n,o.width,i.width),l=t.pageWidthScale(o.height,i.height),r=Math.min(s,l);e("SET_SCALE",r);break;case"all":{const a=t.pageWidthScale(n,o.width,i.width);e("SET_SCALE",a);break}case"custom":a&&e("SET_SCALE",a);break;default:console.log("No fit defined");break}},updateFit({commit:e},t){e("SET_FIT",t)},debounceUpdateCurrentPage:rs((({commit:e,dispatch:t},n)=>{t("updateCurrentPage",n)}),300),updateCurrentPage({commit:e},t){e("SET_CURRENT_PAGE",t)},updateOptimalResolution({commit:e},t){e("SET_OPTIMAL_RESOLUTION",t>=Pt)},showAnnSetTable({commit:e},t){e("SET_ANN_SET_TABLE",t)},showDocumentsNavigation({commit:e},t){e("SET_SHOW_DOCUMENTS_NAVIGATION",t)},showBranding({commit:e},t){e("SET_SHOW_BRANDING",t)},showChooseLabelSetModal({commit:e},t){e("SET_SHOW_CHOOSE_LABEL_SET_MODAL",t)},toggleAnnSetTable({commit:e},t){e("TOGGLE_ANN_SET_TABLE",t)},setCategorizeModalIsActive:({commit:e},t)=>{e("SET_CATEGORIZE_MODAL_IS_ACTIVE",t)},setPageChangedFromThumbnail:({commit:e},t)=>{e("SET_PAGE_CHANGED_FROM_THUMBNAIL",t)},setDetailsUrl:({commit:e},t)=>{e("SET_DETAILS_URL",t)},setLabelWidth:({commit:e},t)=>{e("SET_LABEL_WIDTH",t),e("SET_ANNOTATION_WIDTH",100-t)},setAnnotationWidth:({commit:e},t)=>{const n=Number(t);n&&n>=20?(e("SET_ANNOTATION_WIDTH",n),e("SET_LABEL_WIDTH",100-n)):(e("SET_ANNOTATION_WIDTH",60),e("SET_LABEL_WIDTH",40))},debounceSearch:rs((({commit:e,dispatch:t},n)=>{t("search",n)}),300),startSearchLoading({commit:e}){e("SET_SEARCH_LOADING",!0)},hideEmptyLabelSets({commit:e},t){e("HIDE_EMPTY_LABEL_SETS",t)},search({commit:e,rootState:t},n){if(n.length>=3)return ph.post(`documents/${t.document.documentId}/search/`,{q:n}).then((t=>{e("SET_SEARCH_RESULTS",t.data.span),e("SET_SEARCH_LOADING",!1)}));e("SET_SEARCH_RESULTS",[]),e("SET_SEARCH_LOADING",!1)},resetSearch({commit:e}){e("SET_CURRENT_SEARCH",""),e("SET_SEARCH_RESULTS",[]),e("SET_SEARCH_LOADING",!1)},toggleSearch({commit:e}){e("TOGGLE_SEARCH")},enableSearch({commit:e},t){e("ENABLE_SEARCH",t)},setCurrentSearch({commit:e},t){e("SET_CURRENT_SEARCH",t)},setPageError({commit:e},t){e("SET_PAGE_ERROR",t)},setCurrentSearchResult({commit:e,state:t},n){let o=t.currentSearchResult+n;const i=t.searchResults.length-1;o>i?o=0:o<0&&(o=i),e("SET_CURRENT_SEARCH_RESULT",o)}},Eh={SET_SCALE:(e,t)=>{e.scale=gh(t,2)},SET_FIT:(e,t)=>{e.fit=t},SET_OPTIMAL_RESOLUTION:(e,t)=>{e.optimalResolution=t},SET_CURRENT_PAGE:(e,t)=>{e.currentPage=t},SET_LABEL_WIDTH:(e,t)=>{e.labelWidth=t},SET_ANNOTATION_WIDTH:(e,t)=>{e.annotationWidth=t},SET_SHOW_DOCUMENTS_NAVIGATION:(e,t)=>{e.showDocumentsNavigation=t},SET_SHOW_BRANDING:(e,t)=>{e.showBranding=t},SET_ANN_SET_TABLE:(e,t)=>{e.showAnnSetTable=t},HIDE_EMPTY_LABEL_SETS:(e,t)=>{e.hideEmptyLabelSets=t},TOGGLE_ANN_SET_TABLE:(e,t)=>{e.showAnnSetTable?e.showAnnSetTable=null:e.showAnnSetTable=t},SET_CATEGORIZE_MODAL_IS_ACTIVE:(e,t)=>{e.categorizeModalIsActive=t},SET_PAGE_CHANGED_FROM_THUMBNAIL:(e,t)=>{e.pageChangedFromThumbnail=t},SET_SHOW_CHOOSE_LABEL_SET_MODAL:(e,t)=>{e.showChooseLabelSetModal=t},SET_SEARCH_RESULTS:(e,t)=>{e.currentSearchResult=0,e.searchResults=t},SET_SEARCH_LOADING:(e,t)=>{e.searchLoading=t},TOGGLE_SEARCH:e=>{e.searchEnabled=!e.searchEnabled},ENABLE_SEARCH:(e,t)=>{e.searchEnabled=t},SET_CURRENT_SEARCH:(e,t)=>{e.currentSearch=t},SET_CURRENT_SEARCH_RESULT:(e,t)=>{e.currentSearchResult=t},SET_DETAILS_URL:(e,t)=>{e.detailsUrl=t},SET_PAGE_ERROR:(e,t)=>{e.pageError=t}},Sh={namespaced:!0,state:Ch,getters:_h,actions:bh,mutations:Eh},fh=Ae.HTTP,vh=1e3,Ah="api.v3.dvui.table",kh={loading:!0,pages:[],annotationSets:null,annotations:null,labels:[],documentId:{NODE_ENV:"production",BASE_URL:"/"}.VUE_APP_DOCUMENT,documentSet:null,annotationId:null,annotationSetId:null,documentAnnotationSelected:null,selectedDocument:null,recalculatingAnnotations:!1,editAnnotation:null,missingAnnotations:[],publicView:!0,showActionError:!1,errorMessage:null,showDocumentError:!1,annotationsMarkedAsMissing:null,errorMessageWidth:null,hoveredAnnotationSet:null,newAcceptedAnnotations:null,serverError:!1,splittingSuggestions:null,enableGroupingFeature:!0,annotationFilters:{showFeedbackNeeded:!0,showEmpty:!0,showAccepted:!0},annotationSearch:es("search")&&es("search").split(",")||[]},Nh={pageCount:e=>e.selectedDocument.pages?e.selectedDocument.pages.length:0,pageSelected:(e,t,n)=>e.pages?e.pages[n.display.currentPage-1]:null,pageAtIndex:e=>t=>e.selectedDocument&&e.selectedDocument.pages?e.selectedDocument.pages[t]:null,scrollDocumentToAnnotation:e=>e.documentAnnotationSelected&&e.documentAnnotationSelected.scrollTo,categorizationIsConfirmed:e=>{if(e.selectedDocument){if(e.selectedDocument.category_is_revised||e.selectedDocument.is_reviewed)return!0;if(e.selectedDocument.category){const t=e.annotations.find((e=>e.revised));return void 0!=t}return!1}return!1},labelsFilteredForAnnotationCreation:(e,t)=>e=>{let t=[];return e.id&&e.labels?e.labels.map((e=>{const n=t.find((t=>t.id===e.id));n||(0===e.annotations.length||e.has_multiple_top_candidates)&&t.push(e)})):e.labels&&(t=e.labels),t},isAnnotationDeleted:e=>e=>!!e&&(e.revised&&!e.is_correct),labelHasAnnotations:(e,t)=>e=>{const n=e.annotations.filter((e=>!t.isAnnotationDeleted(e)));return n.length>0},isLabelMultiFalseAndGroupOfAnns:e=>t=>t&&t.annotations&&t.annotations.length>1&&!t.has_multiple_top_candidates&&e.enableGroupingFeature,annotationsByConfidence:e=>e=>(e.sort(((e,t)=>e.confidence>t.confidence?-1:e.confidence<t.confidence?1:0)),e),annotationSetExists:e=>t=>e.annotationSets.find((e=>e.id===t)),annotationSetsInTable:e=>()=>{const t={};return e.annotationSets.forEach((e=>{let n=!1;e.labels&&e.labels.forEach((e=>{e.annotations&&e.annotations.find((e=>e.origin&&e.origin===Ah))&&(n=!0)})),n&&(t[`${e.label_set.id}`]?t[`${e.label_set.id}`].push(e):t[`${e.label_set.id}`]=[e])})),t},annotationSetsToShowInList:e=>()=>{const t=[];return e.annotationSets.forEach((e=>{let n=!0;e.labels&&e.labels.forEach((e=>{e.annotations&&e.annotations.find((e=>e.origin&&e.origin===Ah))&&(n=!1)})),n&&t.push(e)})),t},annotationsInAnnotationsSets:e=>e=>{const t=[];return e.forEach((e=>{e.labels.forEach((e=>{e.annotations.forEach((e=>{t.push(e)}))}))})),t},annotationSetOfAnnotation:e=>t=>{let n=null;return e.annotationSets.forEach((e=>{e.labels.forEach((o=>{o.annotations.forEach((o=>{o.id!==t||(n=e)}))}))})),n},labelOfAnnotation:e=>t=>{let n=null;return e.annotationSets&&e.annotationSets.forEach((e=>{e.labels.forEach((e=>{e.annotations.forEach((o=>{o.id!==t.id||(n=e)}))}))})),n},getAnnotationsFiltered:(e,t)=>{let n=[],o=[],i=[],a=[];const s=e.annotationSearch.length>0,l=(t,n,o)=>o?(t.push(n),!0):s?(n.offset_string&&e.annotationSearch.find((e=>n.offset_string.toLowerCase().includes(e.toLowerCase())))||!(!n.id||!e.annotationSearch.find((e=>`${n.id}`===e))))&&(t.push(n),!0):(t.push(n),!0),r=t=>!!s&&!(!t.name||!e.annotationSearch.find((e=>t.name.toLowerCase().includes(e.toLowerCase()))));return e.annotationSets&&e.annotationSets.forEach((t=>{o=[],t.labels.forEach((t=>{const i=[];let c=!1;const d=r(t);t.annotations&&0!==t.annotations.length?e.annotationFilters.showEmpty&&e.annotationFilters.showFeedbackNeeded&&e.annotationFilters.showAccepted?t.annotations.forEach((e=>{const t=l(i,e,d);t&&(c=!0)})):t.annotations.forEach((t=>{if(e.annotationFilters.showFeedbackNeeded&&!1===t.revised&&!t.created_by){const e=l(i,t,d);e&&(c=!0)}else if(e.annotationFilters.showAccepted&&(!0===t.revised||t.created_by)){const e=l(i,t,d);e&&(c=!0)}})):!e.annotationFilters.showEmpty||s&&!d||(c=!0),c&&(o.push({...t,annotations:i}),a.push(t)),n.push(...i)})),e.annotationSearch.length>0&&0===o.length||i.push({...t,labels:o})})),i.sort(((e,t)=>e.label_set.name.localeCompare(t.label_set.name))),{annotationSets:i,labels:a,annotations:n}},processAnnotationSets:(e,t,n)=>o=>{let i=[],a=[],s=[],l=[];const r=n=>{if(n=t.annotationsByConfidence(n),e.annotationId)for(let t=0;t<n.length;t++)e.annotationId==n[t].id&&n.unshift(n.splice(t,1)[0]);return n};return o.forEach((o=>{(n.display.hideEmptyLabelSets||e.publicView)&&0===o.labels.length||(a=[],o.labels.forEach((e=>{let n=[];e.annotations.forEach((e=>{t.isNegative(e)||n.push(e)})),e.has_multiple_top_candidates||(n=r(n)),a.push({...e,annotations:n}),l.push(e),i.push(...n)})),s.push({...o,labels:a}))})),{annotationSets:s,labels:l,annotations:i}},documentHasCorrectAnnotations:e=>!(e.annotations&&!(e.annotations&&e.annotations.filter((e=>e.is_correct)).length>0)),numberOfAcceptedAnnotationsInLabel:e=>e=>{const t=e.annotations.filter((e=>e.is_correct));return t.length},numberOfAnnotationSetGroup:e=>t=>{let n=!1,o=0,i=0;if(e.annotationSets){let a=[...e.annotationSets];return a.sort(((e,t)=>e.id-t.id||e.label_set.name.localeCompare(t.label_set.name))),a.map((e=>{e.id!==t.id&&e.label_set.id===t.label_set.id&&e.label_set.name===t.label_set.name?(n=!0,i++):e.label_set.id===t.label_set.id&&(o=i)})),n?`${o+1}`:""}return""},numberOfDocumentInSet:e=>t=>{let n=!1,o=0,i=0;return e.documentSet&&e.documentSet.documents?(e.documentSet.documents.map((e=>{e.id!==t.id&&e.category===t.category?(n=!0,i++):e.id===t.id&&(o=i)})),n?`${o+1}`:""):""},numberOfLabelSetGroup:e=>t=>{let n=!1,o=0;if(e.annotationSets){let i=[...e.annotationSets];return i.sort(((e,t)=>e.id-t.id||e.label_set.name.localeCompare(t.label_set.name))),i.forEach((e=>{e.label_set.id===t.id&&e.label_set.name===t.name&&(n=!0,e.id&&o++)})),n?0===o?"":`${o+1}`:""}return""},labelSetsFilteredForAnnotationSetCreation:e=>{let t=[];return e.annotationSets&&e.annotationSets.forEach((e=>{if((null==e.id||e.label_set.has_multiple_annotation_sets)&&!t.find((t=>null!==t.id&&t.id===e.label_set.id))){const n={...e.label_set};n.labels=[...e.labels],t.push(n)}})),t},annotationsInLabelFiltered:e=>e=>{let t;if(!1===e.has_multiple_top_candidates&&e.annotations&&e.annotations.length>1){let n=e.annotations[0];for(let t=1;t<e.annotations.length;t++)(n.confidence<e.annotations[t].confidence||n.confidence===e.annotations[t].confidence&&e.annotations[t].revised)&&(n=e.annotations[t]);t={...e,annotations:[n]}}else t={...e};return t},isAnnotationInEditMode:e=>(t,n=null)=>{if(e.editAnnotation&&t)return null!=n?e.editAnnotation.id===t&&e.editAnnotation.index===n:e.editAnnotation.id===t},isSearchingAnnotationList:e=>!(e.annotationFilters.showFeedbackNeeded&&e.annotationFilters.showEmpty&&e.annotationFilters.showAccepted)||e.annotationSearch&&e.annotationSearch.length>0,emptyLabels:(e,t)=>t=>{const n=[];return t.labels.map((o=>{const i=e.missingAnnotations.find((e=>e.label===o.id&&t.id===e.annotation_set&&t.label_set.id===e.label_set));i||0!==o.annotations.length||n.push(o)})),n},annotationIsNotFound:e=>(t,n)=>{if(t){if(0===e.missingAnnotations.length)return!1;{const o=e.missingAnnotations.filter((e=>e.label===n.id&&e.annotation_set===t.id&&e.label_set===t.label_set.id));return 0!==o.length}}return!1},isAnnotationInAnnotationSet:e=>(e,t)=>{let n=!1;for(let o=0;o<e.labels.length;o++){const i=e.labels[o];for(let e=0;e<i.annotations.length;e++)if(n=i.annotations[e].id==t,n)break;if(n)break}return n},annotationById:e=>t=>e.annotations?e.annotations.find((e=>e.id==t)):null,isDocumentReadyToFinishReview:e=>{let t;const n=[];return 0!==e.labels.length&&(e.annotationSets&&e.annotationSets.length>0&&e.annotationSets.forEach((e=>{e.labels.map((t=>{0===t.annotations.length&&n.push({label:t.id,label_set:e.label_set.id})}))})),e.annotations&&(t=e.annotations.filter((e=>!e.is_correct)),t&&t.map((e=>{n.push(e)}))),!n||!e.missingAnnotations||e.missingAnnotations.length===n.length)},isDocumentReviewed:e=>e.selectedDocument.is_reviewed,notCorrectAnnotations:()=>e=>{const t=e.labels.filter((e=>e.annotations.length>0)),n=[];return t.map((e=>{const t=e.annotations.filter((e=>!e.is_correct&&!e.revised));if(t&&t.length>0&&t.map((e=>{n.push(e)})),kh.enableGroupingFeature&&e.annotations.length<2)return n.length-e.annotations.length})),n},isDocumentReadyToBeReviewed:()=>e=>2===e.status_data&&1===e.labeling_available,documentHadErrorDuringExtraction:()=>e=>111===e.status_data,documentCannotBeEdited:e=>(t=e.selectedDocument)=>1===t.dataset_status||2===t.dataset_status||3===t.dataset_status||t.is_reviewed,waitingForSplittingConfirmation:()=>e=>e&&41===e.status_data,documentHasProposedSplit:()=>e=>e.proposed_split&&e.proposed_split.length>0,confidence:()=>e=>e?e.confidence:null,notExtracted:()=>e=>!e||!e.span,created:()=>e=>e?e.created_by&&!e.revised&&e.is_correct:null,edited:()=>e=>e?e.offset_string!==e.offset_string_original||!!e.created_by:null,accepted:()=>e=>e?e.revised&&e.is_correct:null,isNegative:()=>e=>e?!e.is_correct&&e.revised:null,getUser:()=>e=>e?e.created_by&&!e.revised?e.created_by:e.revised&&e.revised_by?e.revised_by:null:null,isOnlyMultipleAnnotationSet:e=>t=>{const n=e.annotationSets.filter((e=>e.label_set.id===t.label_set.id));return 1===n.length},annotationSetCanBeMultiple:e=>e=>e.label_set.has_multiple_annotation_sets,annotationSetHasNoFilledLabels:e=>e=>{const t=e.labels.flatMap((e=>e.annotations));return 0===t.length}},wh={startLoading:({commit:e})=>{e("SET_LOADING",!0),e("display/ENABLE_SEARCH",!1,{root:!0})},endLoading:({commit:e})=>{e("SET_LOADING",!1)},setDocId:({commit:e},t)=>{e("SET_PAGES",[]),e("SET_DOC_ID",t)},setAnnotationId:({commit:e,dispatch:t,getters:n},o)=>{if(o){const e=n.annotationById(o),i=n.labelOfAnnotation(e);n.isLabelMultiFalseAndGroupOfAnns(i)&&t("setAnnotationAsFirstInLabel",{label:i,annotation:e})}e("SET_ANNOTATION_ID",o),is(o)},setAnnotationSetId:({commit:e},t)=>{e("SET_ANNOTATION_SET_ID",t)},setAnnotationSets:({commit:e},t)=>{e("SET_ANNOTATION_SETS",t)},setEditAnnotation:({commit:e},{id:t,index:n,label:o,labelSet:i,annotationSet:a,pageNumber:s})=>{const l={id:t,index:n,label:o,labelSet:i,annotationSet:a,pageNumber:s};e("SET_EDIT_ANNOTATION",l)},resetEditAnnotation:({commit:e})=>{e("RESET_EDIT_ANNOTATION")},setAnnotations:({commit:e},t)=>{e("SET_ANNOTATIONS",t)},setLabels:({commit:e},t)=>{e("SET_LABELS",t)},setPages:({commit:e},t)=>{e("SET_PAGES",t)},setSelectedDocument:({commit:e},t)=>{e("SET_SELECTED_DOCUMENT",t)},setPublicView:({commit:e},t)=>{e("SET_PUBLIC_VIEW",t)},startRecalculatingAnnotations:({commit:e})=>{e("SET_RECALCULATING_ANNOTATIONS",!0)},endRecalculatingAnnotations:({commit:e})=>{e("SET_RECALCULATING_ANNOTATIONS",!1)},setMissingAnnotations:({commit:e},t)=>{e("SET_MISSING_ANNOTATIONS",t)},setErrorMessage:({commit:e,dispatch:t},n)=>{e("SET_SHOW_ACTION_ERROR",!!n),e("SET_ERROR_MESSAGE",n),t("closeErrorMessage")},setDocumentError:({commit:e},t)=>{e("SET_DOCUMENT_ERROR",t)},setAnnotationsMarkedAsMissing:({commit:e},t)=>{e("SET_ANNOTATIONS_MARKED_AS_MISSING",t)},setErrorMessageWidth:({commit:e},t)=>{e("SET_ERROR_MESSAGE_WIDTH",t)},setHoveredAnnotationSet:({commit:e},t)=>{e("SET_HOVERED_ANNOTATION_SET",t)},setNewAcceptedAnnotations:({commit:e},t)=>{e("SET_NEW_ACCEPTED_ANNOTATIONS",t)},setSplittingSuggestions:({commit:e},t)=>{e("SET_SPLITTING_SUGGESTIONS",t)},setAnnotationSearch:({commit:e},t)=>{e("SET_ANNOTATION_SEARCH",t)},fetchDocument:async({commit:e,state:t,dispatch:n,rootState:o,getters:i})=>{const a=1;n("startLoading"),n("display/updateCurrentPage",a,{root:!0}),await fh.get(`documents/${t.documentId}/`).then((o=>{if(o.data){const s=o.data,{labels:l,annotations:r,annotationSets:c}=i.processAnnotationSets(s.annotation_sets);e("SET_PAGES",[]),s.pages.length>0&&n("fetchDocumentPage",a),e("SET_ANNOTATION_SETS",c),e("SET_ANNOTATIONS",r),e("SET_LABELS",l),e("SET_SELECTED_DOCUMENT",s),s.project&&(n("project/setProjectId",s.project,{root:!0}),n("project/setShowAnnotationTranslations",s.enable_translated_strings,{root:!0})),t.publicView||(n("fetchMissingAnnotations"),n("project/fetchCurrentUser",null,{root:!0}),s.project&&n("category/fetchCategories",s.project,{root:!0}),s.document_set&&n("fetchDocumentSet",s.document_set)),i.documentHasProposedSplit(s)&&n("setSplittingSuggestions",s.proposed_split),1!==s.labeling_available&&(e("SET_RECALCULATING_ANNOTATIONS",!0),n("pollDocumentEndpoint"))}})).catch((e=>{console.log(e,"Could not fetch document details from the backend"),n("display/setPageError",e.response.data.detail,{root:!0})})),t.publicView||!t.selectedDocument||t.selectedDocument.category&&(t.selectedDocument.category_is_revised||i.documentHasCorrectAnnotations||0!==t.missingAnnotations.length)||(n("edit/enableEditMode",null,{root:!0}),n("edit/setRenameAndCategorize",!0,{root:!0})),n("endLoading")},fetchDocumentPage:({commit:e,state:t},n)=>fh.get(`documents/${t.documentId}/pages/${n}/`).then((t=>{e("ADD_PAGE",t.data)})).catch((e=>{console.log(e)})),setDocumentSet:({commit:e},t)=>{e("SET_DOC_SET",t)},fetchDocumentSet:({commit:e,state:t},n)=>fh.get(`document-sets/${n}/?expand=documents&fields=documents.id,documents.data_file_name,documents.category`).then((t=>{e("SET_DOC_SET",t.data)})).catch((e=>{console.log(e)})),setDocumentAnnotationSelected:({commit:e},{annotation:t,label:n,span:o,scrollTo:i=!1})=>{const a={scrollTo:i,id:t.id,span:o,page:o.page_index+1,labelName:n?n.name:""};e("SET_DOCUMENT_ANNOTATION_SELECTED",a)},scrollToDocumentAnnotationSelected:({commit:e})=>{e("SET_DOCUMENT_ANNOTATION_SCROLL",!0)},disableDocumentAnnotationSelected:({commit:e})=>{e("SET_DOCUMENT_ANNOTATION_SELECTED",null)},createAnnotation:({commit:e,getters:t,dispatch:n},{annotation:o})=>new Promise(((i,a)=>{fh.post("/annotations/",o).then((async o=>{if(201===o.status){if(await n("fetchMissingAnnotations"),t.annotationSetExists(o.data.annotation_set))e("ADD_ANNOTATION",o.data);else{const o=await n("fetchDocumentData");if(o&&o.annotation_sets){const{labels:n,annotations:i,annotationSets:a}=t.processAnnotationSets(o.annotation_sets);e("SET_ANNOTATION_SETS",a),e("SET_ANNOTATIONS",i),e("SET_LABELS",n)}}o.data&&o.data.id&&n("setAnnotationId",o.data.id),i(o)}})).catch((e=>{a(e.response),console.log(e)}))})),updateAnnotation:({commit:e,getters:t,dispatch:n},{updatedValues:o,annotationId:i})=>(e("SET_NEW_ACCEPTED_ANNOTATIONS",[i]),new Promise(((t,a)=>{fh.patch(`/annotations/${i}/`,o).then((async o=>{200===o.status&&(e("UPDATE_ANNOTATION",o.data),e("SET_NEW_ACCEPTED_ANNOTATIONS",null),o.data&&o.data.id&&n("setAnnotationId",o.data.id),t(!0))})).catch((e=>{a(e.response),console.log(e)}))}))),deleteAnnotation:({commit:e,getters:t,state:n},{annotationId:o,annotationSet:i})=>new Promise(((a,s)=>{fh.delete(`/annotations/${o}/`).then((async s=>{204===s.status&&(n.annotationId===o&&(e("SET_ANNOTATION_ID",null),is(null)),e("DELETE_ANNOTATION",o),i&&t.annotationSetCanBeMultiple(i)&&t.annotationSetHasNoFilledLabels(i)&&(t.isOnlyMultipleAnnotationSet(i)?e("UPDATE_ANNOTATION_SET",i):e("DELETE_ANNOTATION_SET",i)),a(!0))})).catch((e=>{s(e.response),console.log(e)}))})),updateDocument:({commit:e,state:t,getters:n,dispatch:o},i)=>new Promise(((n,a)=>{fh.patch(`/documents/${t.documentId}/`,i).then((t=>{200===t.status&&(i.data_file_name?e("UPDATE_FILE_NAME",t.data.data_file_name):(e("SET_SELECTED_DOCUMENT",t.data),o("pollDocumentEndpoint")),n(!0))})).catch((e=>{if(console.log(e),e.response&&e.response.request&&e.response.request.response){const t=JSON.parse(e.request.response).is_reviewed;if(t&&t.length>0){const e={data:[...t]};return void a(e)}}a(e.response)}))})),fetchMissingAnnotations:({commit:e,state:t,getters:n})=>new Promise(((n,o)=>Ae.makeGetPaginatedRequest(`/missing-annotations/?document=${t.documentId}`,!0).then((t=>{e("SET_MISSING_ANNOTATIONS",t),n(!0)})).catch((e=>{o(e.response),console.log(e)})))),addMissingAnnotations:({commit:e,getters:t},n)=>new Promise(((t,o)=>{fh.post("/missing-annotations/",n).then((async n=>{201===n.status&&(e("SET_ANNOTATIONS_MARKED_AS_MISSING",null),e("ADD_MISSING_ANNOTATIONS",n.data)),t(n)})).catch((e=>{o(e.response),console.log(e)}))})),deleteMissingAnnotation:({commit:e,getters:t},n)=>new Promise(((t,o)=>fh.delete(`/missing-annotations/${n}/`).then((o=>{204===o.status&&(e("DELETE_MISSING_ANNOTATION",n),t(!0))})).catch((e=>{o(e.response),console.log(e)})))),updateMultipleAnnotations:({state:e,commit:t},n)=>(t("SET_NEW_ACCEPTED_ANNOTATIONS",n.ids),new Promise(((o,i)=>fh.patch(`documents/${e.documentId}/update-annotations/`,n).then((e=>{200===e.status&&(e.data.map((e=>{t("UPDATE_ANNOTATION",e)})),t("SET_NEW_ACCEPTED_ANNOTATIONS",null),o(!0))})).catch((e=>{console.log(e),i(e.response)}))))),fetchDocumentStatus:({state:e,getters:t})=>new Promise(((n,o)=>fh.get(`documents/${e.documentId}/?fields=status_data,labeling_available`).then((e=>t.isDocumentReadyToBeReviewed(e.data)||t.waitingForSplittingConfirmation(e.data)?n(!0):t.documentHadErrorDuringExtraction(e.data)?o():n(!1))).catch((e=>{o(e.response),console.log(e)})))),fetchDocumentData:({state:e})=>new Promise(((t,n)=>{fh.get(`documents/${e.documentId}/`).then((e=>t(e.data))).catch((e=>{n(e),console.log(e)}))})),pollDocumentEndpoint:({dispatch:e})=>e("fetchDocumentStatus").then((t=>{t?(e("endRecalculatingAnnotations"),e("fetchDocument")):(Qa(vh),e("pollDocumentEndpoint"))})).catch((t=>{e("setDocumentError",!0),console.log(t)})),createErrorMessage:({commit:e,dispatch:t},{error:n,serverErrorMessage:o,defaultErrorMessage:i})=>{n&&n.status>=500&&n.status<600?(t("setErrorMessage",o),e("SET_SERVER_ERROR",!0)):n.data&&n.data.length>0?t("setErrorMessage",n.data[0]):t("setErrorMessage",i)},closeErrorMessage:({commit:e})=>{setTimeout((()=>{e("SET_ERROR_MESSAGE",null),e("SET_SHOW_ACTION_ERROR",!1),e("SET_SERVER_ERROR",!1)}),5e3)},contactSupport:({rootState:e},t)=>{const n="https://konfuzio.com/support/",o=`project=${e.project.projectId}&email=${e.project.currentUser.username}&issue=${t}`,i=`${n}?${o}`;window.open(i,"_blank")},changeCurrentDocument:({commit:e,state:t,dispatch:n,rootState:o},i)=>{t.splittingSuggestions&&e("SET_SPLITTING_SUGGESTIONS",null),o.edit.editMode&&n("edit/disableEditMode",null,{root:!0}),e("SET_RECALCULATING_ANNOTATIONS",!1),es("document")||ts("d")?as(t.selectedDocument.id,i):(e("SET_DOC_ID",i),n("fetchDocument"))},showMissingAnnotations({commit:e},t){e("SET_SHOW_MISSING_ANNOTATIONS",t)},showFeedbackNeededAnnotations({commit:e},t){e("SET_SHOW_FEEDBACK_NEEDED_ANNOTATIONS",t)},showAcceptedAnnotations({commit:e},t){e("SET_SHOW_ACCEPTED_ANNOTATIONS",t)},unloadDocumentPage:({commit:e},t)=>{e("REMOVE_PAGE",t)},putNextAnnotationInLabelFirst({commit:e},t){e("PUT_NEXT_ANN_IN_LABEL_FIRST",t)},setAnnotationAsFirstInLabel({commit:e,state:t},{label:n,annotation:o}){t.annotationSets.forEach((t=>{t.labels.forEach((i=>{if(i.id===n.id&&i.annotations&&i.annotations.length>1)for(let n=0;n<i.annotations.length;n++)i.annotations[n].id===o.id&&(i.annotations.unshift(i.annotations.splice(n,1)[0]),e("SET_ANNOTATIONS_IN_LABEL",{annotationSet:t,label:i,annotations:i.annotations}))}))}))},putNextAnnotationInLabelFirst({commit:e,state:t,dispatch:n},o){n("setAnnotationId",null);let i=null;t.annotationSets.forEach((t=>{t.labels.forEach((n=>{if(n.id===o.id&&n.annotations&&n.annotations.length>1){const o=[...n.annotations],a=o.shift();return o.push(a),e("SET_ANNOTATIONS_IN_LABEL",{annotationSet:t,label:n,annotations:o}),void(i=o[0])}}))})),i&&(n("setDocumentAnnotationSelected",{annotation:i,label:o,span:i.span[0],scrollTo:!0}),n("scrollToDocumentAnnotationSelected"))}},yh={SET_LOADING:(e,t)=>{e.loading=t},SET_DOC_ID:(e,t)=>{t!==e.documentId&&(e.documentId=t)},SET_DOC_SET:(e,t)=>{let n=[];t&&t.documents&&(n=t.documents.slice().reverse());const o={...t,documents:n};e.documentSet=o},SET_ANNOTATION_ID:(e,t)=>{e.annotationId=t},SET_ANNOTATION_SET_ID:(e,t)=>{e.annotationSetId=t},ADD_ANNOTATION:(e,t)=>{e.annotations.push(t),e.annotationSets.map((e=>{t.annotation_set===e.id&&t.label_set&&e.label_set.id===t.label_set.id&&e.labels.map((e=>{if(t.label&&t.label.id===e.id){const n=e.annotations.find((e=>e.id===t.id));if(!n)return void e.annotations.push(t)}}))}))},UPDATE_ANNOTATION:(e,t)=>{const n=e.annotations.findIndex((e=>e.id===t.id));n>-1&&e.annotations.splice(n,1,t);let o=!1;e.annotationSets.forEach((e=>{o||e.labels.forEach((n=>{const i=n.annotations.findIndex((e=>e.id===t.id));if(i>-1){if(t.label&&t.label.id!==n.id){n.annotations.splice(i,1);const o=e.labels.find((e=>e.id===t.label.id));o.annotations.push(t)}else n.annotations.splice(i,1,t);o=!0}else;}))}))},DELETE_ANNOTATION:(e,t)=>{const n=e.annotations.findIndex((e=>e.id===t));n>-1&&e.annotations.splice(n,1);let o=!1;e.annotationSets.forEach((e=>{o||e.labels.forEach((e=>{const n=e.annotations.findIndex((e=>e.id===t));if(n>-1)return e.annotations.splice(n,1),void(o=!0)}))}))},SET_ANNOTATIONS:(e,t)=>{e.annotations=t},SET_ANNOTATION_SETS:(e,t)=>{e.annotationSets=t},DELETE_ANNOTATION_SET:(e,t)=>{const n=e.annotationSets.findIndex((e=>e.id===t.id));-1!==n&&e.annotationSets.splice(n,1)},UPDATE_ANNOTATION_SET:(e,t)=>{const n=e.annotationSets.findIndex((e=>e.id===t.id));if(-1===n)return;const o={...t,id:null};e.annotationSets.splice(n,1,o)},SET_LABELS:(e,t)=>{e.labels=t},SET_ANNOTATIONS_IN_LABEL:(e,{label:t,annotations:n,annotationSet:o})=>{o.labels.forEach((e=>{if(e.id===t.id)return delete e.annotations,void(e.annotations=n)}))},SET_EDIT_ANNOTATION:(e,t)=>{e.editAnnotation=t},RESET_EDIT_ANNOTATION:e=>{e.editAnnotation=null},ADD_PAGE:(e,t)=>{const n=e.pages.findIndex((e=>e.number===t.number));-1===n?e.pages.push(t):e.pages[n]=t},SET_PAGES:(e,t)=>{e.pages=t},SET_DOCUMENT_ANNOTATION_SELECTED:(e,t)=>{e.documentAnnotationSelected=t},SET_DOCUMENT_ANNOTATION_SCROLL:(e,t)=>{e.documentAnnotationSelected&&(e.documentAnnotationSelected.scrollTo=t)},SET_SELECTED_DOCUMENT:(e,t)=>{e.selectedDocument=t,e.selectedDocument&&(e.selectedDocument.downloaded_at=Date.now())},SET_RECALCULATING_ANNOTATIONS:(e,t)=>{e.recalculatingAnnotations=t},SET_MISSING_ANNOTATIONS:(e,t)=>{e.missingAnnotations=t},ADD_MISSING_ANNOTATIONS:(e,t)=>{t&&t.length>0?t.map((t=>{const n=e.missingAnnotations.find((e=>e.id===t.id));if(n){const n=e.missingAnnotations.findIndex((e=>e.id===t.id));n>-1&&e.missingAnnotations.splice(n,1,t)}else e.missingAnnotations.push(t)})):e.missingAnnotations.push(t)},DELETE_MISSING_ANNOTATION:(e,t)=>{const n=e.missingAnnotations.findIndex((e=>e.id===t));n>-1&&e.missingAnnotations.splice(n,1)},SET_SHOW_ACTION_ERROR:(e,t)=>{e.showActionError=t},SET_ERROR_MESSAGE:(e,t)=>{e.errorMessage=t},SET_DOCUMENT_ERROR:(e,t)=>{e.showDocumentError=t},SET_ANNOTATIONS_MARKED_AS_MISSING:(e,t)=>{e.annotationsMarkedAsMissing=t},SET_ERROR_MESSAGE_WIDTH:(e,t)=>{e.errorMessageWidth=t},SET_PUBLIC_VIEW:(e,t)=>{e.publicView=t},SET_DOCUMENT_IS_READY:(e,t)=>{e.documentIsReady=t},SET_DOCUMENT_HAS_ERROR:(e,t)=>{e.documentHasError=t},SET_HOVERED_ANNOTATION_SET:(e,t)=>{e.hoveredAnnotationSet=t},SET_NEW_ACCEPTED_ANNOTATIONS:(e,t)=>{e.newAcceptedAnnotations=t},SET_SERVER_ERROR:(e,t)=>{e.serverError=t},UPDATE_FILE_NAME:(e,t)=>{e.selectedDocument.data_file_name=t},SET_SPLITTING_SUGGESTIONS:(e,t)=>{e.splittingSuggestions=t},SET_ANNOTATION_SEARCH:(e,t)=>{e.annotationSearch=t,os("search",t)},SET_SHOW_MISSING_ANNOTATIONS:(e,t)=>{e.annotationFilters.showEmpty=t},SET_SHOW_ACCEPTED_ANNOTATIONS:(e,t)=>{e.annotationFilters.showAccepted=t},SET_SHOW_FEEDBACK_NEEDED_ANNOTATIONS:(e,t)=>{e.annotationFilters.showFeedbackNeeded=t},REMOVE_PAGE:(e,t)=>{e.pages=e.pages.filter((e=>e.number!==t))}},Th={namespaced:!0,state:kh,getters:Nh,actions:wh,mutations:yh},Bh=(Ae.HTTP,{documentsAvailableToReview:[],categories:null}),Dh={categoryName:e=>t=>{if(t&&e.categories){const n=e.categories.find((e=>e.id==t));if(n)return n.name}return""},categoryConfidence:()=>e=>e?(100*e).toFixed(2):0===e?e.toFixed(2):void 0,category:e=>t=>{if(t&&e.categories){const n=e.categories.find((e=>e.id==t));if(n)return n}return null},projectHasSingleCategory:e=>e.categories&&1===e.categories.length},Lh={setDocumentsAvailableToReview:({commit:e},t)=>{e("SET_AVAILABLE_DOCUMENTS",t)},setCategories:({commit:e},t)=>{e("SET_CATEGORIES",t)},createAvailableDocumentsList:({commit:e,state:t,dispatch:n,rootState:o,rootGetters:i},{categoryId:a,user:s,poll:l})=>{if(!t.createAvailableListOfDocuments)return;const r=`category=${a}`,c=e=>new Promise((t=>setTimeout(t,e)));let d=0;const h=o=>{let a=0;return d+=1,n("project/fetchDocumentListWithParameters",r).then((s=>{for(let o=0;o<s.length;o++){const l=t.documentsAvailableToReview.find((e=>e.id===s[o].id));if(!l)if(i["document/isDocumentReadyToBeReviewed"](s))e("ADD_AVAILABLE_DOCUMENT",s);else if(i["document/documentHadErrorDuringExtraction"](s)){n("document/setDocumentError",null,{root:!0}),a+=1;continue}}return!l||s.length===t.documentsAvailableToReview.length||t.documentsAvailableToReview.length+a===s.length||(d>=10||c(o).then((()=>{h(o)})))}))};if(0===documents.length||documents.length!==t.documentsAvailableToReview.length){let e;e=d<=5?5e3:d>10?2e4:1e4,h(e)}},fetchCategories:({commit:e},t)=>Ae.makeGetPaginatedRequest(`categories/?project=${t}`,!0).then((async t=>{t&&e("SET_CATEGORIES",t)})).catch((e=>{console.log(e,"Could not fetch categories from the backend")}))},Vh={SET_AVAILABLE_DOCUMENTS:(e,t)=>{e.documentsAvailableToReview=t},ADD_AVAILABLE_DOCUMENT:(e,t)=>{const n=e.documentsAvailableToReview.find((e=>e.id===t.id));n||e.documentsAvailableToReview.push(t)},SET_CATEGORIES:(e,t)=>{e.categories=t}},xh={namespaced:!0,state:Bh,actions:Lh,mutations:Vh,getters:Dh},Mh=Ae.HTTP,Ih={projectId:null,labelSets:null,currentUser:null,documentsListPath:null,showAnnotationTranslations:!1},Oh={setProjectId:({commit:e},t)=>{e("SET_PROJECT_ID",t)},fetchLabelSetDetails:({commit:e,state:t},n)=>new Promise(((e,t)=>{Mh.get(`label-sets/${n}/`).then((t=>e(t.data))).catch((e=>{t(e),console.log(e)}))})),fetchLabelSets:({commit:e,state:t})=>Ae.makeGetPaginatedRequest(`label-sets/?project=${t.projectId}`,!0).then((t=>{e("SET_LABEL_SETS",t)})).catch((e=>{console.log(e)})),fetchCurrentUser:({commit:e})=>Mh.get("/auth/me/").then((t=>{e("SET_CURRENT_USER",t.data)})).catch((e=>{console.log(e)})),setCurrentUser:({commit:e},t)=>{e("SET_CURRENT_USER",t)},setDocumentsListPath:({commit:e},t)=>{e("SET_DOCUMENTS_LIST_PATH",t)},setShowAnnotationTranslations:({commit:e},t)=>{e("SET_SHOW_ANNOTATION_TRANSLATIONS",t)},fetchDocumentListWithParameters:({commit:e,state:t},n)=>new Promise(((e,o)=>{Ae.makeGetPaginatedRequest(`documents/?project=${t.projectId}&${n}`,!0).then((t=>{e(t)})).catch((e=>{o(),console.log(e,"Could not fetch document list from the backend")}))})),fetchDocumentListForNavigation:({commit:e,state:t})=>new Promise(((e,n)=>{Ae.makeGetPaginatedRequest(`documents/?project=${t.projectId}&is_reviewed=false&fields=id`,!0).then((t=>{e(t)})).catch((e=>{n(),console.log(e,"Could not fetch document list from the backend")}))}))},Ph={SET_PROJECT_ID:(e,t)=>{e.projectId=t},SET_CURRENT_USER:(e,t)=>{e.currentUser=t},SET_LABEL_SETS:(e,t)=>{e.labelSets=t},SET_DOCUMENTS_LIST_PATH:(e,t)=>{e.documentsListPath=t},SET_SHOW_ANNOTATION_TRANSLATIONS:(e,t)=>{e.showAnnotationTranslations=t}},$h={namespaced:!0,state:Ih,actions:Oh,mutations:Ph},Rh=Ae.HTTP,Fh=1,Hh={selection:{pageNumber:null,start:null,end:null},isSelecting:!1,spanSelection:[],placeholderSelection:[],selectedEntities:[],spanLoading:!1},zh={isSelectionValid:e=>e.selection&&null!=e.selection.end,getSelectionForPage:e=>t=>e.selection.pageNumber===t?e.selection:null,entitiesOnSelection:e=>(e,t)=>t.entities.filter((t=>e.x0<=t.x0&&e.x1>=t.x1&&e.y0<=t.y0&&e.y1>=t.y1)),spanSelectionsForPage:e=>t=>e.spanSelection.filter((e=>t.number===e.page_index+1)),placeholderSelectionForPage:e=>t=>e.placeholderSelection.filter((e=>t.number===e.page_index+1))},Uh={disableSelection:({commit:e})=>{e("RESET_SELECTION"),e("SET_SELECTED_ENTITIES",[]),e("SET_SPAN_SELECTION",[]),e("SET_PLACEHOLDER_SELECTION",[])},startSelection:({commit:e},{pageNumber:t,start:n})=>{e("START_SELECTION",{pageNumber:t,start:n})},moveSelection:({commit:e,state:t,dispatch:n},o)=>{if(t.selection&&t.selection.start){const n=Math.abs(t.selection.start.x-o.end.x),i=Math.abs(t.selection.start.y-o.end.y);n>5&&i>5&&e("MOVE_SELECTION",o)}},endSelection:({commit:e,state:t},n)=>{let o,i;n&&(o=Math.abs(t.selection.start.x-n.x),i=Math.abs(t.selection.start.y-n.y)),!n||i<=5&&o<=5||t.selection.start.x===n.x&&t.selection.start.y==n.y?e("RESET_SELECTION"):(t.selection.start.x=t.selection.start.x-Fh,t.selection.start.y=t.selection.start.y-Fh,n.x=n.x+Fh,n.y=n.y+Fh,e("END_SELECTION",n))},setSelectedEntities:({commit:e},t)=>{e("SET_SELECTED_ENTITIES",t)},getTextFromBboxes:({commit:e,rootState:t},n)=>(e("SET_SPAN_LOADING",!0),new Promise(((o,i)=>{Rh.post(`documents/${t.document.documentId}/bbox/`,{span:n}).then((e=>{e.data.span.length&&e.data.span.length>0?o(e.data.span):o(n)})).catch((e=>{alert("Could not fetch the selected text from the backend"),i(e)})).finally((()=>{e("SET_SPAN_LOADING",!1)}))}))),entitySelection:({commit:e,dispatch:t,state:n},{entities:o,selection:i})=>{if(0===o.length)i?t("getTextFromBboxes",[i]).then((t=>{e("SET_SPAN_SELECTION",t)})):(e("RESET_SELECTION"),e("SET_SPAN_SELECTION",[])),e("SET_SELECTED_ENTITIES",[]);else{let n;e("SET_SELECTED_ENTITIES",o),t("document/setAnnotationId",null,{root:!0}),n=o?o.flatMap((e=>e.original)):[o],e("SET_SPAN_SELECTION",n),t("getTextFromBboxes",n).then((t=>{e("SET_SPAN_SELECTION",t)}))}},entityClick:({commit:e,dispatch:t,state:n},o)=>{const i=n.selectedEntities.find((e=>o.scaled.width===e.scaled.width&&o.original.offset_string===e.original.offset_string));let a=n.selectedEntities;if(i?a=[...n.selectedEntities.filter((e=>e.scaled.width!==o.scaled.width&&e.original.offset_string!==o.original.offset_string))]:a.push(o),0===a.length)e("SET_SELECTED_ENTITIES",[]),e("SET_SPAN_SELECTION",[]);else{let n;e("SET_SELECTED_ENTITIES",a),t("document/setAnnotationId",null,{root:!0}),n=a?a.flatMap((e=>e.original)):[a],e("SET_SPAN_SELECTION",n)}},setSpanSelection:({commit:e},t)=>{e("SET_SPAN_SELECTION",t)},setPlaceholderSelection:({commit:e},t)=>{e("SET_PLACEHOLDER_SELECTION",t)}},Zh={START_SELECTION:(e,{pageNumber:t,start:n})=>{e.selection.end=null,e.selection.pageNumber=t,e.selection.start=n,e.isSelecting=!0},MOVE_SELECTION:(e,t)=>{const{start:n,end:o}=t;n&&(e.selection.start=n),o&&(e.selection.end=o)},END_SELECTION:(e,t)=>{e.selection.end=t,e.isSelecting=!1},RESET_SELECTION:e=>{e.selection.pageNumber=null,e.selection.start=null,e.selection.end=null},SET_SPAN_SELECTION:(e,t)=>{e.spanSelection=t||[]},ADD_SPAN_SELECTION:(e,t)=>{e.spanSelection.push(t)},SET_PLACEHOLDER_SELECTION:(e,t)=>{e.placeholderSelection=t||[]},ADD_PLACEHOLDER_SELECTION:(e,t)=>{e.placeholderSelection.push(t)},SET_SELECTED_ENTITIES:(e,t)=>{e.selectedEntities=t||[]},SET_SPAN_LOADING:(e,t)=>{e.spanLoading=t}},Gh={namespaced:!0,state:Hh,getters:zh,actions:Uh,mutations:Zh},Wh=Ae.HTTP,qh={editMode:!1,renameAndCategorize:!1,isMultipleSelection:!0,pagesForPostprocess:[],selectedPages:[],updatedDocument:[],showEditConfirmationModal:!1,submitEditChanges:!1,redirectingUser:!1},jh={isEditModeAvailable:(e,t,n,o)=>!n.document.publicView&&!o["document/isDocumentReviewed"]&&!e.editMode,isPageSelected:e=>t=>e.selectedPages.find((e=>e.id===t)),documentShouldBePostprocessed:(e,t,n)=>{const o=e.pagesForPostprocess.find((e=>0!==e.angle));let i=!1;return e.pagesForPostprocess.map(((e,t)=>{(e.id===n.document.selectedDocument.pages[t].id&&e.number!==n.document.selectedDocument.pages[t].number||e.id!==n.document.selectedDocument.pages[t].id&&e.number===n.document.selectedDocument.pages[t].number)&&(i=!0)})),e.updatedDocument.length>1||o||i}},Kh={enableEditMode:({commit:e})=>{e("SET_EDIT_MODE",!0)},disableEditMode:({commit:e})=>{e("SET_EDIT_MODE",!1),e("SET_RENAME_AND_CATEGORIZE",!1)},setRenameAndCategorize:({commit:e},t)=>{e("SET_RENAME_AND_CATEGORIZE",t)},setPagesForPostprocess:({commit:e},t)=>{e("SET_PAGES_FOR_POSTPROCESS",t)},setUpdatedDocument:({commit:e},t)=>{e("SET_UPDATED_DOCUMENT",t)},setSubmitEditChanges:({commit:e},t)=>{e("SET_SUBMIT_EDIT_CHANGES",t)},selectPage:({state:e,commit:t},n)=>{e.isMultipleSelection||t("SET_SELECTED_PAGES",[]),t("ADD_SELECTED_PAGE",n)},unselectPage:({state:e,commit:t},n)=>{const o=e.selectedPages.find((e=>e.id===n.id));if(o){const o=e.selectedPages.filter((e=>e.id!==n.id));t("SET_SELECTED_PAGES",o)}},setSelectedPages:({state:e,commit:t},n)=>{if(!n)return void t("SET_SELECTED_PAGES",[]);const o=e.selectedPages.find((e=>e.id===n.id));if(o){const o=e.selectedPages.filter((e=>e.id!==n.id));t("SET_SELECTED_PAGES",o)}else e.isMultipleSelection||t("SET_SELECTED_PAGES",[]),t("ADD_SELECTED_PAGE",n)},rotatePage:({state:e,commit:t},{page:n,direction:o})=>{if(e.pagesForPostprocess.find((e=>e.id===n.id))){const i=e.pagesForPostprocess.map((e=>{let t;return"left"===o?(t=e.angle-90,e.id===n.id?(-270===t&&(t=90),{...e,angle:t}):e):"right"===o?(t=e.angle+90,e.id===n.id?(270===t&&(t=-90),{...e,angle:t}):e):void 0}));t("SET_PAGES_FOR_POSTPROCESS",i)}else"left"===o&&e.pagesForPostprocess.push({id:n.id,number:n.number,angle:-90,thumbnail_url:n.thumbnail_url,updated_at:n.updated_at}),"right"===o&&e.pagesForPostprocess.push({id:n.id,number:n.number,angle:90,thumbnail_url:n.thumbnail_url,updated_at:n.updated_at})},updateRotationToTheLeft:({state:e,commit:t})=>{const n=e.pagesForPostprocess.map((e=>{let t=e.angle-90;return-270===t&&(t=90),{...e,angle:t}}));t("SET_PAGES_FOR_POSTPROCESS",n)},updateRotationToTheRight:({state:e,commit:t})=>{const n=e.pagesForPostprocess.map((e=>{let t=e.angle+90;return 270===t&&(t=-90),{...e,angle:t}}));t("SET_PAGES_FOR_POSTPROCESS",n)},editDocument:({rootState:e,commit:t,dispatch:n},o)=>{n("document/startRecalculatingAnnotations",null,{root:!0});const i=e.document.documentId;return new Promise(((a,s)=>{Wh.post(`/documents/${e.document.documentId}/postprocess/`,o).then((async e=>{if(e&&200===e.status){const o=e.data[0].id;n("document/setSplittingSuggestions",null,{root:!0}),t("SET_SUBMIT_EDIT_CHANGES",!1),o!=i?es("document")||ts("docs")?as(i,o):(await n("document/setDocId",o,{root:!0}),n("document/pollDocumentEndpoint",null,{root:!0})):(n("document/setSelectedDocument",e.data[0],{root:!0}),n("document/pollDocumentEndpoint",null,{root:!0}))}a(e)})).catch((e=>{s(e.response),console.log(e)}))}))},setShowEditConfirmationModal:({commit:e},t)=>{e("SET_SHOW_EDIT_CONFIRMATION_MODAL",t)},setRedirectingUser:({commit:e},t)=>{e("SET_REDIRECTING_USER",t)}},Yh={SET_EDIT_MODE:(e,t)=>{e.editMode=t},SET_RENAME_AND_CATEGORIZE:(e,t)=>{e.renameAndCategorize=t},SET_PAGES_FOR_POSTPROCESS:(e,t)=>{e.pagesForPostprocess=t},SET_UPDATED_DOCUMENT:(e,t)=>{e.updatedDocument=t},SET_SELECTED_PAGES:(e,t)=>{e.selectedPages=t},ADD_SELECTED_PAGE:(e,t)=>{e.selectedPages.push(t)},SET_SHOW_EDIT_CONFIRMATION_MODAL:(e,t)=>{e.showEditConfirmationModal=t},SET_SUBMIT_EDIT_CHANGES:(e,t)=>{e.submitEditChanges=t},SET_REDIRECTING_USER:(e,t)=>{e.redirectingUser=t}},Jh={namespaced:!0,state:qh,actions:Kh,mutations:Yh,getters:jh},Xh=(0,s.y$)({modules:{display:Sh,document:Th,category:xh,project:$h,selection:Gh,edit:Jh}});var Qh=n(3168),eu=n(7107),tu=n(6188),nu=n(1273);eu.Yv.add(tu.INu,tu.vmR,tu.Uec,tu.GF6,tu.tdl,tu.z1G,tu.Jyw,tu.rVG,tu.Dfk,tu.QRE,tu.z1G,tu.QLR,tu.nx5,tu.mEO,tu.V3T,tu.mCl,tu.XGd,tu.VH5,tu.CeG,tu.dmS,tu.cbP,tu.MjD,tu.Q2C,tu.jkA,tu.lEd,tu.CQO,tu.Dnq);const ou=nu.gc,iu=(0,o.createApp)();iu.component("App",lh),iu.component("VueFontawesome",ou),iu.use(ch.A),iu.use(rh.Ay,{defaultIconPack:"fas",defaultIconComponent:"vue-fontawesome"}),iu.use(Qh.A),iu.use(Xh),iu.use(uh),iu.mount("#app")}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var a=t[o]={id:o,loaded:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.m=e,(()=>{n.amdO={}})(),(()=>{var e=[];n.O=(t,o,i,a)=>{if(!o){var s=1/0;for(d=0;d<e.length;d++){for(var[o,i,a]=e[d],l=!0,r=0;r<o.length;r++)(!1&a||s>=a)&&Object.keys(n.O).every((e=>n.O[e](o[r])))?o.splice(r--,1):(l=!1,a<s&&(s=a));if(l){e.splice(d--,1);var c=i();void 0!==c&&(t=c)}}return t}a=a||0;for(var d=e.length;d>0&&e[d-1][2]>a;d--)e[d]=e[d-1];e[d]=[o,i,a]}})(),(()=>{n.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;return n.d(t,{a:t}),t}})(),(()=>{n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()})(),(()=>{n.hmd=e=>(e=Object.create(e),e.children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e)})(),(()=>{n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})(),(()=>{var e={524:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var i,a,[s,l,r]=o,c=0;if(s.some((t=>0!==e[t]))){for(i in l)n.o(l,i)&&(n.m[i]=l[i]);if(r)var d=r(n)}for(t&&t(o);c<s.length;c++)a=s[c],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(d)},o=self["webpackChunk_konfuzio_document_validation_ui"]=self["webpackChunk_konfuzio_document_validation_ui"]||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var o=n.O(void 0,[504],(()=>n(8578)));o=n.O(o)})();
|
|
2
2
|
//# sourceMappingURL=app.js.map
|