mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-03-03 14:21:45 +00:00
2 lines
88 KiB
JavaScript
2 lines
88 KiB
JavaScript
(this["webpackJsonptopola-viewer"]=this["webpackJsonptopola-viewer"]||[]).push([[0],{239:function(e){e.exports=JSON.parse('{"menu.open":"Otev\u0159\xedt","menu.open_file":"Otev\u0159\xedt soubor","menu.load_from_url":"Otev\u0159\xedt z URL","menu.select_wikitree_id":"Vybrat WikiTree ID","menu.print":"Tiskni","menu.download":"St\xe1hnout","menu.pdf_file":"Soubor PDF","menu.png_file":"Soubor PNG","menu.svg_file":"Soubor SVG","menu.download_pdf":"St\xe1hnout PDF","menu.download_png":"St\xe1hnout PNG","menu.download_svg":"St\xe1hnout SVG","menu.view":"Zobrazen\xed","menu.hourglass":"P\u0159es\xfdpac\xed hodiny","menu.relatives":"V\u0161ichni p\u0159\xedbuzn\xed","menu.fancy":"Rodinn\xfd strom (experiment\xe1ln\xed)","menu.wikitree_login":"P\u0159ihl\xe1\u0161en\xed na WikiTree","menu.wikitree_logged_in":"P\u0159ihl\xe1\u0161eno","menu.wikitree_popup_username":"P\u0159ihl\xe1\u0161eno do WikiTree jako {username}","menu.wikitree_popup":"P\u0159ihl\xe1\u0161eno do WikiTree","menu.github":"GitHub projekt","menu.search.placeholder":"Hledej osobu","menu.search.no_results":"\u017d\xe1dn\xe9 v\xfdsledky","intro.title":"Topola Genealogy","intro.description":"Topola Genealogy v\xe1m umo\u017e\u0148uje interaktivn\xed prohl\xed\u017een\xed rodokmenu.","intro.instructions":"Kliknut\xedm na OTEV\u0158\xcdT SOUBOR nebo OTEV\u0158\xcdT Z URL na\u010dt\u011bte soubor GEDCOM. V\u011bt\u0161ina genealogick\xfdch program\u016f m\xe1 funkci exportu do form\xe1tu GEDCOM.","intro.examples":"N\xed\u017ee je uvedeno n\u011bkolik p\u0159\xedklad\u016f pou\u017eit\xed z internetu:","intro.from":"zdroj:","intro.privacy":"Soukrom\xed","intro.privacy_note":"Pomoc\xed funkce \\"Otev\u0159\xedt soubor\\" nejsou va\u0161e data nikam odes\xedl\xe1na a z\u016fst\xe1vaj\xed ve va\u0161em po\u010d\xedta\u010di. P\u0159i pou\u017eit\xed funkce \\"Otev\u0159\xedt z URL\\" jsou data z dan\xe9 adresy odesl\xe1na slu\u017ebou {link}, aby bylo mo\u017en\xe9 data na\u010d\xedst (CORS).","load_from_url.title":"Otev\u0159\xedt z adresy URL","load_from_url.comment":"Data z dan\xe9 adresy URL budou na\u010dteny prost\u0159ednictv\xedm slu\u017eby {link}, aby nedoch\xe1zelo k probl\xe9m\u016fm s CORS.","load_from_url.cancel":"Zru\u0161it","load_from_url.load":"Otev\u0159\xedt","select_wikitree_id.title":"Zadejte WikiTree ID","select_wikitree_id.comment":"Zadejte ID profilu {wikiTreeLink}. P\u0159\xedklad: {example1}, {example2}","select_wikitree_id.cancel":"Zru\u0161it","select_wikitree_id.load":"Otev\u0159\xedt","gedcom.BAPM":"K\u0159est","gedcom.BIRT":"Narozen\xed","gedcom.BURI":"Poh\u0159eb","gedcom.CENS":"S\u010d\xedt\xe1n\xed lidu","gedcom.CHR":"K\u0159est","gedcom.DEAT":"\xdamrt\xed","gedcom.DSCR":"Opis","gedcom.EDUC":"Vzd\u011bl\xe1n\xed","gedcom.EMAIL":"E-mail","gedcom.EVEN":"Ud\xe1lost","gedcom.FACT":"Skute\u010dnost","gedcom.MILT":"Vojensk\xe1 slu\u017eba","gedcom.OCCU":"Povol\xe1n\xed","gedcom.RIN":"ID","gedcom.TITL":"Titul","gedcom.WWW":"Str\xe1nka WWW","gedcom.RELI":"Vyzn\xe1n\xed","gedcom._UPD":"Posledn\xed aktualizace","date.abt":"kolem","date.cal":"spo\u010dteno","date.est":"asi","date.between":"mezi {from} a {to}","date.after":"po {from}","date.before":"p\u0159ed {to}","error.error":"Chyba","error.failed_pdf":"Soubor PDF nelze vytvo\u0159it. Zkuste to znovu s men\u0161\xedm diagramem nebo st\xe1hn\u011bte soubor SVG.","error.failed_png":"Soubor PNG nelze vytvo\u0159it. Zkuste to znovu s men\u0161\xedm diagramem nebo st\xe1hn\u011bte soubor SVG.","error.failed_to_load_file":"Chyba p\u0159i na\u010d\xedt\xe1n\xed souboru","error.failed_wikitree_load_more":"Chyba p\u0159i na\u010d\xedt\xe1n\xed dat z WikiTree. {chyba}","error.GEDCOM_READ_FAILED":"Chyba p\u0159i na\u010d\xedt\xe1n\xed souboru GEDCOM","error.ERROR_LOADING_UPLOADED_FILE":"Chyba p\u0159i na\u010d\xedt\xe1n\xed dat. Znovu otev\u0159ete soubor.","error.WIKITREE_ID_NOT_PROVIDED":"WikiTree ID nebylo z\xedsk\xe1no","error.WIKITREE_PROFILE_NOT_ACCESSIBLE":"Profil WikiTree {id} nen\xed k dispozici","error.WIKITREE_PROFILE_NOT_FOUND":"Profil WikiTree {id} neexistuje","wikitree.private":"Soukrom\xe9"}')},240:function(e){e.exports=JSON.parse('{"menu.open":"\xd6ffnen","menu.open_file":"Datei \xf6ffnen","menu.load_from_url":"URL \xf6ffnen","menu.select_wikitree_id":"WikiTree ID ausw\xe4hlen","menu.print":"Print","menu.download":"Download","menu.pdf_file":"PDF-Datei","menu.png_file":"PNG-Datei","menu.svg_file":"SVG-Datei","menu.download_pdf":"PDF herunterladen","menu.download_png":"PNG herunterladen","menu.download_svg":"SVG herunterladen","menu.view":"View","menu.hourglass":"Sanduhrkarte","menu.relatives":"Alle Verwandten","menu.fancy":"Zierbaum (experimentell)","menu.wikitree_login":"Bei WikiTree anmelden","menu.wikitree_logged_in":"Eingeloggt","menu.wikitree_popup_username":"Bei WikiTree als {username} angemeldet","menu.wikitree_popup":"Bei WikiTree angemeldet","menu.github":"Projekt auf der GitHub-Website","menu.search.placeholder":"Person suchen","menu.search.no_results":"Keine Ergebnisse","intro.title":"Topola Genealogie","intro.description":"Mit der Topola Genealogie k\xf6nnen Sie den Stammbaum auf interaktive Weise durchsuchen.","intro.instructions":"Klicken Sie auf Datei \xf6ffnen oder URL \xf6ffnen, um eine GEDCOM-Datei zu laden. Die meisten Genealogie-Programme verf\xfcgen \xfcber eine GEDCOM-Exportfunktion.","intro.examples":"Nachfolgend einige Beispiele aus dem Internet:","intro.from":"source:","intro.privacy":"Datenschutz","intro.privacy_note":"Bei Verwendung der Funktion \\"Datei \xf6ffnen\\" werden Ihre Daten nirgendwo gesendet und verbleiben auf Ihrem Computer. Bei Verwendung der Funktion \\"URL \xf6ffnen\\" werden Daten von der angegebenen Adresse vom Dienst {link} an gesendet Erm\xf6glichen des Ladens von Daten aus einer anderen Dom\xe4ne (CORS).","load_from_url.title":"Von URL \xf6ffnen","load_from_url.comment":"Die Daten der angegebenen URL werden \xfcber den {link} -Dienst geladen, um CORS-Probleme zu vermeiden.","load_from_url.cancel":"Cancel","load_from_url.load":"\xd6ffnen","select_wikitree_id.title":"WikiTree ID eingeben","select_wikitree_id.comment":"Geben Sie die Profil-ID {wikiTreeLink} ein. Beispiele: {example1}, {example2}","select_wikitree_id.cancel":"Cancel","select_wikitree_id.load":"Open","gedcom.BAPM":"Taufe","gedcom.BIRT":"Geburt","gedcom.BURI":"Beerdigung","gedcom.CENS":"Volksz\xe4hlung","gedcom.CHR":"Taufe","gedcom.DEAT":"Tod","gedcom.DSCR":"Beschreibung","gedcom.EMAIL":"E-Mail","gedcom.EVEN":"Ereignis","gedcom.OCCU":"Beruf","gedcom.RIN":"ID","gedcom.TITL":"Titel","gedcom.WWW":"Website","gedcom._UPD":"Zuletzt aktualisiert","date.abt":"about","date.cal":"berechnet","date.est":"gesch\xe4tzt","date.between":"zwischen {from} und {to}","date.after":"after {from}","date.before":"before {to}","error.error":"Error","error.failed_pdf":"PDF konnte nicht erstellt werden. Versuchen Sie es erneut mit einem kleineren Diagramm oder laden Sie die SVG-Datei herunter.","error.failed_png":"Fehler beim Erstellen der PNG-Datei. Versuchen Sie es erneut mit einem kleineren Diagramm oder laden Sie die SVG-Datei herunter.","error.failed_to_load_file":"Fehler beim Laden der Datei","error.failed_wikitree_load_more":"Fehler beim Abrufen der Daten aus WikiTree. {error}","wikitree.private":"Privat"}')},241:function(e){e.exports=JSON.parse('{"menu.open":"Ouvrir","menu.open_file":"Ouvrir le fichier","menu.load_from_url":"Ouvrir l\'URL","menu.select_wikitree_id":"S\xe9lectionnez l\'ID WikiTree","menu.print":"Imprimer","menu.download":"T\xe9l\xe9charger","menu.pdf_file":"Fichier PDF","menu.png_file":"Fichier PNG","menu.svg_file":"Fichier SVG","menu.download_pdf":"T\xe9l\xe9charger le PDF","menu.download_png":"T\xe9l\xe9charger PNG","menu.download_svg":"T\xe9l\xe9charger SVG","menu.view":"Afficher","menu.hourglass":"Graphique en sablier","menu.relatives":"Tous les parents","menu.fancy":"Arbre ornemental (exp\xe9rimental)","menu.wikitree_login":"Connectez-vous \xe0 WikiTree","menu.wikitree_logged_in":"Connect\xe9","menu.wikitree_popup_username":"Connect\xe9 \xe0 WikiTree en tant que {username}","menu.wikitree_popup":"Connect\xe9 \xe0 WikiTree","menu.github":"Projet sur le site Web GitHub","menu.search.placeholder":"Rechercher une personne","menu.search.no_results":"Aucun r\xe9sultat","intro.title":"Topola G\xe9n\xe9alogie","intro.description":"La Topola G\xe9n\xe9alogie vous permet de parcourir l\'arbre g\xe9n\xe9alogique de mani\xe8re interactive.","intro.instructions":"Cliquez sur OPEN FILE ou OPEN URL pour charger un fichier GEDCOM. La plupart des logiciels de g\xe9n\xe9alogie ont une fonction d\'exportation GEDCOM.","intro.examples":"Voici quelques exemples trouv\xe9s sur Internet:","intro.from":"source:","intro.privacy":"Confidentialit\xe9","intro.privacy_note":"Lorsque vous utilisez la fonction \\"Ouvrir un fichier\\", vos donn\xe9es ne sont envoy\xe9es nulle part et restent sur votre ordinateur. Lorsque vous utilisez la fonction \\"Ouvrir l\'URL\\", les donn\xe9es de l\'adresse indiqu\xe9e sont envoy\xe9es par le service {link} \xe0 permettant le chargement des donn\xe9es depuis un autre domaine (CORS).","load_from_url.title":"Ouvrir depuis l\'URL","load_from_url.comment":"Les donn\xe9es de l\'URL donn\xe9e seront charg\xe9es via le service {link} pour \xe9viter les probl\xe8mes CORS.","load_from_url.cancel":"Annuler","load_from_url.load":"Ouvrir","select_wikitree_id.title":"Entrez l\'ID de WikiTree","select_wikitree_id.comment":"Entrez l\'ID de profil {wikiTreeLink}. Exemples: {example1}, {example2}","select_wikitree_id.cancel":"Annuler","select_wikitree_id.load":"Ouvrir","gedcom.BAPM":"Bapt\xeame","gedcom.BIRT":"Naissance","gedcom.BURI":"Fun\xe9railles","gedcom.CENS":"Recensement","gedcom.CHR":"Bapt\xeame","gedcom.DEAT":"Mort","gedcom.DSCR":"Description","gedcom.EMAIL":"E-mail","gedcom.EVEN":"\xc9v\xe9nement","gedcom.OCCU":"Profession","gedcom.RIN":"ID","gedcom.TITL":"Titre","gedcom.WWW":"Site Web","gedcom._UPD":"Derni\xe8re mise \xe0 jour","date.abt":"environ","date.cal":"calcul\xe9","date.est":"estim\xe9","date.between":"entre {from} et {to}","date.after":"apr\xe8s {from}","date.before":"avant {to}","error.error":"Erreur","error.failed_pdf":"\xc9chec de la cr\xe9ation du PDF. R\xe9essayez avec un diagramme plus petit ou t\xe9l\xe9chargez le fichier SVG.","error.failed_png":"Impossible de cr\xe9er le fichier PNG. R\xe9essayez avec un diagramme plus petit ou t\xe9l\xe9chargez le fichier SVG.","error.failed_to_load_file":"Erreur lors du chargement du fichier","error.failed_wikitree_load_more":"Erreur lors de l\'obtention des donn\xe9es de WikiTree. {error}","wikitree.private":"Priv\xe9"}')},242:function(e){e.exports=JSON.parse('{"menu.open":"Apri","menu.open_file":"Apri file","menu.load_from_url":"Apri URL","menu.select_wikitree_id":"Seleziona ID WikiTree","menu.print":"Stampa","menu.download":"Download","menu.pdf_file":"File PDF","menu.png_file":"File PNG","menu.svg_file":"File SVG","menu.download_pdf":"Scarica PDF","menu.download_png":"Scarica PNG","menu.download_svg":"Scarica SVG","menu.view":"Visualizza","menu.hourglass":"Grafico a clessidra","menu.relatives":"Tutti i parenti","menu.fancy":"Albero ornamentale (sperimentale)","menu.wikitree_login":"Accedi a WikiTree","menu.wikitree_logged_in":"Accesso effettuato","menu.wikitree_popup_username":"Accesso a WikiTree come {username}","menu.wikitree_popup":"Accesso a WikiTree","menu.github":"Progetto sul sito web GitHub","menu.search.placeholder":"Cerca persona","menu.search.no_results":"Nessun risultato","intro.title":"Topola Genealogy","intro.description":"Topola Genealogy ti consente di esplorare l\'albero genealogico in modo interattivo.","intro.instructions":"Fai clic su OPEN FILE o OPEN URL per caricare un file GEDCOM. La maggior parte dei software di genealogia ha una funzione di esportazione GEDCOM.","intro.examples":"Di seguito sono riportati alcuni esempi trovati su Internet:","intro.from":"source:","intro.privacy":"Privacy","intro.privacy_note":"Quando si utilizza la funzione \\"Apri file\\", i dati non vengono inviati da nessuna parte e rimangono sul computer. Quando si utilizza la funzione \\"Apri URL\\", i dati dall\'indirizzo specificato vengono inviati dal servizio {link} a consentire il caricamento dei dati da un altro dominio (CORS).","load_from_url.title":"Apri da URL","load_from_url.comment":"I dati dall\'URL specificato verranno caricati tramite il servizio {link} per evitare problemi CORS.","load_from_url.cancel":"Annulla","load_from_url.load":"Apri","select_wikitree_id.title":"Inserisci ID WikiTree","select_wikitree_id.comment":"Inserisci l\'ID profilo {wikiTreeLink}. Esempi: {example1}, {example2}","select_wikitree_id.cancel":"Annulla","select_wikitree_id.load":"Apri","gedcom.BAPM":"Battesimo","gedcom.BIRT":"Nascita","gedcom.BURI":"Funerale","gedcom.CENS":"Census","gedcom.CHR":"Battesimo","gedcom.DEAT":"Death","gedcom.DSCR":"Descrizione","gedcom.EMAIL":"E-mail","gedcom.EVEN":"Evento","gedcom.OCCU":"Professione","gedcom.RIN":"ID","gedcom.TITL":"Titolo","gedcom.WWW":"Sito web","gedcom._UPD":"Ultimo aggiornamento","date.abt":"about","date.cal":"calcolato","date.est":"stimato","date.between":"tra {from} e {to}","date.after":"after {from}","date.before":"before {to}","error.error":"Error","error.failed_pdf":"Impossibile creare PDF. Riprova con un diagramma pi\xf9 piccolo o scarica il file SVG.","error.failed_png":"Impossibile creare il file PNG. Riprova con un diagramma pi\xf9 piccolo o scarica il file SVG.","error.failed_to_load_file":"Errore durante il caricamento del file","error.failed_wikitree_load_more":"Errore durante il recupero dei dati da WikiTree. {error}","wikitree.private":"Privato"}')},243:function(e){e.exports=JSON.parse('{"menu.open":"Otw\xf3rz","menu.open_file":"Otw\xf3rz plik","menu.load_from_url":"Otw\xf3rz URL","menu.select_wikitree_id":"Wybierz WikiTree ID","menu.print":"Drukuj","menu.download":"Pobierz","menu.pdf_file":"Plik PDF","menu.png_file":"Plik PNG","menu.svg_file":"Plik SVG","menu.download_pdf":"Pobierz PDF","menu.download_png":"Pobierz PNG","menu.download_svg":"Pobierz SVG","menu.view":"Widok","menu.hourglass":"Wykres klepsydrowy","menu.relatives":"Wszyscy krewni","menu.fancy":"Ozdobne drzewo (eksperymentalne)","menu.wikitree_login":"Zaloguj do WikiTree","menu.wikitree_logged_in":"Zalogowano","menu.wikitree_popup_username":"Zalogowano do WikiTree jako {username}","menu.wikitree_popup":"Zalogowano do WikiTree","menu.github":"Projekt na stronie GitHub","menu.search.placeholder":"Szukaj osoby","menu.search.no_results":"Brak wynik\xf3w","intro.title":"Topola Genealogy","intro.description":"Topola Genealogy pozwala przegl\u0105da\u0107 drzewo genealogiczne w interaktywny spos\xf3b.","intro.instructions":"Kliknij OTW\xd3RZ PLIK lub OTW\xd3RZ URL, aby za\u0142adowa\u0107 plik GEDCOM. Wi\u0119kszo\u015b\u0107 program\xf3w genealogicznych posiada funkcj\u0119 eksportu do pliku GEDCOM.","intro.examples":"Poni\u017cej jest kilka przyk\u0142ad\xf3w znalezionych w Internecie:","intro.from":"\u017ar\xf3d\u0142o:","intro.privacy":"Prywatno\u015b\u0107","intro.privacy_note":"U\u017cywaj\u0105c funkcji \\"Otw\xf3rz plik\\", Twoje dane nie s\u0105 nigdzie wysy\u0142ane i pozostaj\u0105 na Twoim komputerze. U\u017cywaj\u0105c funkcji \\"Otw\xf3rz URL\\", dane z podanego adresu przesy\u0142ane s\u0105 przez us\u0142ug\u0119 {link} w celu umo\u017cliwienia za\u0142adowania danych z innej domeny (CORS).","load_from_url.title":"Otw\xf3rz z adresu URL","load_from_url.comment":"Dane z podanego adresu URL zostan\u0105 za\u0142adowane poprzez us\u0142ug\u0119 {link} w celu unikni\u0119cia problem\xf3w z CORS.","load_from_url.cancel":"Anuluj","load_from_url.load":"Otw\xf3rz","select_wikitree_id.title":"Podaj WikiTree ID","select_wikitree_id.comment":"Wpisz identyfikator profilu {wikiTreeLink}. Przyk\u0142ady: {example1}, {example2}","select_wikitree_id.cancel":"Anuluj","select_wikitree_id.load":"Otw\xf3rz","gedcom.BAPM":"Chrzest","gedcom.BIRT":"Narodziny","gedcom.BURI":"Pogrzeb","gedcom.CENS":"Spis ludno\u015bci","gedcom.CHR":"Chrzest","gedcom.DEAT":"\u015amier\u0107","gedcom.DSCR":"Opis","gedcom.EDUC":"Wykszta\u0142cenie","gedcom.EMAIL":"E-mail","gedcom.EVEN":"Wydarzenie","gedcom.FACT":"Fakt","gedcom.MILT":"S\u0142u\u017cba wojskowa","gedcom.OCCU":"Zaw\xf3d","gedcom.RIN":"ID","gedcom.TITL":"Tytu\u0142","gedcom.WWW":"Strona WWW","gedcom._UPD":"Ostatnia aktualizacja","date.abt":"oko\u0142o","date.cal":"wyliczone","date.est":"oszacowane","date.between":"mi\u0119dzy {from} a {to}","date.after":"po {from}","date.before":"przed {to}","error.error":"B\u0142\u0105d","error.failed_pdf":"Nie uda\u0142o si\u0119 utworzy\u0107 pliku PDF. Spr\xf3buj jeszcze raz z mniejszym diagramem lub pobierz plik SVG.","error.failed_png":"Nie uda\u0142o si\u0119 utworzy\u0107 pliku PNG. Spr\xf3buj jeszcze raz z mniejszym diagramem lub pobierz plik SVG.","error.failed_to_load_file":"B\u0142\u0105d wczytywania pliku","error.failed_wikitree_load_more":"B\u0142\u0105d podczas pobierania danych z WikiTree. {error}","error.GEDCOM_READ_FAILED":"B\u0142\u0105d wczytywania pliku GEDCOM","error.ERROR_LOADING_UPLOADED_FILE":"B\u0142\u0105d wczytywania danych. Otw\xf3rz ponownie plik.","error.WIKITREE_ID_NOT_PROVIDED":"Identyfikator WikiTree nie zosta\u0142 podany","error.WIKITREE_PROFILE_NOT_ACCESSIBLE":"Profil WikiTree {id} nie jest dost\u0119pny","error.WIKITREE_PROFILE_NOT_FOUND":"Profil WikiTree {id} nie istnieje","wikitree.private":"Prywatne"}')},244:function(e){e.exports=JSON.parse('{"menu.open":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c","menu.open_file":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b","menu.load_from_url":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c URL","menu.select_wikitree_id":"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 WikiTree ID","menu.print":"\u041f\u0435\u0447\u0430\u0442\u044c","menu.download":"\u0421\u043a\u0430\u0447\u0430\u0442\u044c","menu.pdf_file":"\u0424\u0430\u0439\u043b PDF","menu.png_file":"\u0424\u0430\u0439\u043b PNG","menu.svg_file":"\u0424\u0430\u0439\u043b SVG","menu.download_pdf":"\u0421\u043a\u0430\u0447\u0430\u0442\u044c PDF","menu.download_png":"\u0421\u043a\u0430\u0447\u0430\u0442\u044c PNG","menu.download_svg":"\u0421\u043a\u0430\u0447\u0430\u0442\u044c SVG","menu.view":"\u0412\u0438\u0434","menu.hourglass":"\u0413\u0440\u0430\u0444\u0438\u043a \u041f\u0435\u0441\u043e\u0447\u043d\u044b\u0435 \u0447\u0430\u0441\u044b","menu.relatives":"\u0412\u0441\u0435 \u0440\u043e\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0438\u043a\u0438","menu.fancy":"\u0414\u0435\u043a\u043e\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e (\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0435))","menu.wikitree_login":"\u0412\u043e\u0439\u0442\u0438 \u0432 WikiTree","menu.wikitree_logged_in":"\u0412\u0445\u043e\u0434 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d","menu.wikitree_popup_username":"\u0412\u044b \u0432\u043e\u0448\u043b\u0438 \u0432 WikiTree \u043a\u0430\u043a {username}","menu.wikitree_popup":"\u0412\u044b \u0432\u043e\u0448\u043b\u0438 \u0432 WikiTree","menu.github":"\u041f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 GitHub","menu.search.placeholder":"\u0418\u0441\u043a\u0430\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430","menu.search.no_results":"\u041d\u0435\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432","intro.title":"Topola Genealogy","intro.description":"Topola Genealogy \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0441\u0435\u043c\u0435\u0439\u043d\u043e\u0435 \u0434\u0440\u0435\u0432\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435.","intro.instructions":"\u0429\u0435\u043b\u043a\u043d\u0438\u0442\u0435 \\"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b\\" \u0438\u043b\u0438 \\"\u041e\u0442\u043a\u0440\u044b\u0442\u044c URL\\", \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b GEDCOM. \u0411\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0430\u043b\u043e\u0433\u0438\u0438 \u0438\u043c\u0435\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0430 GEDCOM.","intro.examples":"\u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u0432 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435:","intro.from":"\u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a:","intro.privacy":"\u041a\u043e\u043d\u0444\u0438\u0434\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c","intro.privacy_note":"\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \\"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b\\" \u0412\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0412\u0430\u0448\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \\"\u041e\u0442\u043a\u0440\u044b\u0442\u044c URL\\" \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u043b\u0443\u0436\u0431\u043e\u0439 {link} \u043d\u0430 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0434\u043e\u043c\u0435\u043d\u0430 (CORS).","load_from_url.title":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0441 \u0430\u0434\u0440\u0435\u0441\u0430 URL","load_from_url.comment":"\u0414\u0430\u043d\u043d\u044b\u0435 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 URL \u0431\u0443\u0434\u0443\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u0441\u043b\u0443\u0436\u0431\u0443 {link}, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c CORS.","load_from_url.cancel":"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c","load_from_url.load":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c","select_wikitree_id.title":"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 WikiTree","select_wikitree_id.comment":"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u043e\u0444\u0438\u043b\u044f {wikiTreeLink}. \u041f\u0440\u0438\u043c\u0435\u0440\u044b: {example1}, {example2}","select_wikitree_id.cancel":"\u041e\u0442\u043c\u0435\u043d\u0430","select_wikitree_id.load":"\u041e\u0442\u043a\u0440\u044b\u0442\u044c","gedcom.ADOP":"\u0423\u0441\u044b\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435","gedcom.BAPM":"\u041a\u0440\u0435\u0449\u0435\u043d\u0438\u0435","gedcom.BIRT":"\u0420\u043e\u0436\u0434\u0435\u043d\u0438\u0435","gedcom.BURI":"\u041f\u043e\u0445\u043e\u0440\u043e\u043d\u044b","gedcom.CENS":"\u041f\u0435\u0440\u0435\u043f\u0438\u0441\u044c \u043d\u0430\u0441\u0435\u043b\u0435\u043d\u0438\u044f","gedcom.CHR":"\u041a\u0440\u0435\u0449\u0435\u043d\u0438\u0435","gedcom.CREM":"\u041a\u0440\u0435\u043c\u0430\u0446\u0438\u044f","gedcom.DEAT":"\u0421\u043c\u0435\u0440\u0442\u044c","gedcom.DSCR":"\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435","gedcom.EDUC":"\u041e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435","gedcom.EMAIL":"E-mail","gedcom.EMIG":"\u042d\u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f","gedcom.EVEN":"\u0421\u043e\u0431\u044b\u0442\u0438\u0435","gedcom.FACT":"\u0424\u0430\u043a\u0442","gedcom.IMMI":"\u0418\u043c\u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f","gedcom.MILT":"\u0412\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u043b\u0443\u0436\u0431\u0430","gedcom.NATU":"\u041d\u0430\u0442\u0443\u0440\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f","gedcom.OCCU":"\u0412\u0438\u0434 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438","gedcom.RIN":"ID","gedcom.TITL":"\u0422\u0438\u0442\u0443\u043b","gedcom.WWW":"\u0412\u0435\u0431-\u0441\u0430\u0439\u0442 WWW","gedcom._UPD":"\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435","date.abt":"\u043e\u043a\u043e\u043b\u043e","date.cal":"\u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043e","date.est":"\u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e","date.between":"\u043c\u0435\u0436\u0434\u0443 {from} \u0438 {to}","date.after":"\u043f\u043e\u0441\u043b\u0435 {from}","date.before":"\u0434\u043e {to}","error.error":"\u041e\u0448\u0438\u0431\u043a\u0430","error.failed_pdf":"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c PDF-\u0444\u0430\u0439\u043b. \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u043e\u0439 \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043b SVG.","error.failed_png":"\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0444\u0430\u0439\u043b PNG. \u041f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u0435 \u043f\u043e\u043f\u044b\u0442\u043a\u0443 \u0441 \u043c\u0435\u043d\u044c\u0448\u0435\u0439 \u0441\u0445\u0435\u043c\u043e\u0439 \u0438\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043b SVG.","error.failed_to_load_file":"\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u0430","error.failed_wikitree_load_more":"\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 WikiTree. {error}}","wikitree.private":"\u0427\u0430\u0441\u0442\u043d\u044b\u0439"}')},323:function(e,t){},383:function(e,t,n){},386:function(e,t,n){"use strict";n.r(t);var r=n(0),a=n(82),i=n(239),o=n(240),s=n(241),c=n(242),u=n(243),l=n(244),d=n(24),p=n(10),h=n.n(p),m=n(17),f=n(13),g=n(15),j=n(19),b=n(20),O=n(26),v=n(34);function w(e,t){window.gtag("event",e,t)}var k,_=n(156),x=n(67),y=n(133),D=n(92),E=n(245),T=Object(E.createMedia)({breakpoints:{small:320,large:768}}),I=T.createMediaStyle(),S=T.Media,R=T.MediaContextProvider,M=n(200),N=n(150),C=(n(93),n(132)),L=n(48),P=n(1);function z(e,t){var n=Object(N.a)("#svgContainer").node(),r=t.transform.k,a=Object(y.a)([0,(n.clientWidth-e[0]*r)/2]),i=Object(y.a)([0,(n.clientHeight-e[1]*r)/2]);Object(N.a)("#chartSvg").attr("width",e[0]*r).attr("height",e[1]*r).attr("transform","translate(".concat(a,", ").concat(i,")")),Object(N.a)("#chart").attr("transform","scale(".concat(r,")")),n.scrollLeft=-t.transform.x,n.scrollTop=-t.transform.y}function A(){var e=Object(N.a)("#svgContainer").node(),t=e.scrollLeft+e.clientWidth/2,n=e.scrollTop+e.clientHeight/2,r=Object(C.b)(e).k;Object(N.a)(e).call(Object(C.a)().translateTo,t/r,n/r)}function W(e){var t=new FileReader;return t.readAsDataURL(e),new Promise((function(e,n){t.onload=function(t){return e(t.target.result)}}))}function G(e){return F.apply(this,arguments)}function F(){return(F=Object(m.a)(h.a.mark((function e(t){var n,r,a,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.href.baseVal){e.next=3;break}return e.abrupt("return");case 3:return e.prev=3,e.next=6,fetch(n);case 6:return r=e.sent,e.next=9,r.blob();case 9:return a=e.sent,e.next=12,W(a);case 12:i=e.sent,t.href.baseVal=i,e.next=19;break;case 16:e.prev=16,e.t0=e.catch(3),console.warn("Failed to load image:",e.t0);case 19:case"end":return e.stop()}}),e,null,[[3,16]])})))).apply(this,arguments)}function U(e){return B.apply(this,arguments)}function B(){return(B=Object(m.a)(h.a.mark((function e(t){var n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Array.from(t.getElementsByTagName("image")),e.next=3,Promise.all(n.map(G));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function V(e){var t=new Image;return t.src=URL.createObjectURL(e),new Promise((function(e,n){t.addEventListener("load",(function(){return e(t)}))}))}function H(e){var t=document.createElement("canvas");t.width=2*e.width,t.height=2*e.height;var n=t.getContext("2d"),r=n.fillStyle;return n.fillStyle="white",n.fillRect(0,0,t.width,t.height),n.fillStyle=r,n.drawImage(e,0,0,t.width,t.height),t}function K(e,t){return new Promise((function(n,r){e.toBlob((function(e){e?n(e):r()}),t)}))}!function(e){e[e.Hourglass=0]="Hourglass",e[e.Relatives=1]="Relatives",e[e.Fancy=2]="Fancy"}(k||(k={}));var q,Z=function(e){Object(j.a)(r,e);var t=Object(b.a)(r);function r(){var e;Object(f.a)(this,r);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).chart=void 0,e.animating=!1,e.rerenderRequired=!1,e.zoomBehavior=void 0,e}return Object(g.a)(r,[{key:"getChartType",value:function(){switch(this.props.chartType){case k.Hourglass:return L.HourglassChart;case k.Relatives:return L.RelativesChart;case k.Fancy:return L.FancyChart;default:return L.HourglassChart}}},{key:"getRendererType",value:function(){switch(this.props.chartType){case k.Fancy:return L.CircleRenderer;default:return L.DetailedRenderer}}},{key:"zoom",value:function(e){var t=Object(N.a)("#svgContainer");this.zoomBehavior.scaleBy(t,e)}},{key:"renderChart",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{initialRender:!1};if(t.initialRender||!this.animating){if(t.initialRender||!this.props.freezeAnimation){t.initialRender?(Object(N.a)("#chart").node().innerHTML="",this.chart=Object(L.createChart)({json:this.props.data,chartType:this.getChartType(),renderer:this.getRendererType(),svgSelector:"#chart",indiCallback:function(t){return e.props.onSelection(t)},animate:!0,updateSvgSize:!1,locale:this.props.intl.locale})):this.chart.setData(this.props.data);var n=this.chart.render({startIndi:this.props.selection.id,baseGeneration:this.props.selection.generation}),r=Object(N.a)("#chartSvg"),a=Object(N.a)("#svgContainer").node(),i=Object(C.b)(a).k,o=Object(D.a)([1,i,a.clientWidth/n.size[0],a.clientHeight/n.size[1]]),s=[Object(y.a)([.1,o]),2];this.zoomBehavior=Object(C.a)().scaleExtent(s).translateExtent([[0,0],n.size]).on("zoom",(function(e){return z(n.size,e)})),Object(N.a)(a).on("scroll",A).call(this.zoomBehavior);var c=function(e){return function(){var t=Object(x.a)(a.scrollTop,e);return function(e){a.scrollTop=t(e)}}},u=function(e){return function(){var t=Object(x.a)(a.scrollLeft,e);return function(e){a.scrollLeft=t(e)}}},l=a.clientWidth/2-n.origin[0]*i,d=a.clientHeight/2-n.origin[1]*i,p=Object(y.a)([0,(a.clientWidth-n.size[0]*i)/2]),h=Object(y.a)([0,(a.clientHeight-n.size[1]*i)/2]),m=r.transition().delay(200).duration(500),f=t.initialRender?r:m;f.attr("transform","translate(".concat(p,", ").concat(h,")")).attr("width",n.size[0]*i).attr("height",n.size[1]*i),t.initialRender?(a.scrollLeft=-l,a.scrollTop=-d):m.tween("scrollLeft",u(-l)).tween("scrollTop",c(-d)),this.animating=!0,n.animationPromise.then((function(){e.animating=!1,e.rerenderRequired&&(e.rerenderRequired=!1,e.renderChart({initialRender:!1}))}))}}else this.rerenderRequired=!0}},{key:"componentDidMount",value:function(){this.renderChart({initialRender:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props.chartType!==e.chartType;this.renderChart({initialRender:t})}},{key:"render",value:function(){var e=this;return Object(P.jsxs)("div",{id:"svgContainer",children:[Object(P.jsxs)(S,{at:"large",className:"zoom",children:[Object(P.jsx)("button",{className:"zoom-in",onClick:function(){return e.zoom(1.3)},children:"+"}),Object(P.jsx)("button",{className:"zoom-out",onClick:function(){return e.zoom(1/1.3)},children:"\u2212"})]}),Object(P.jsx)("svg",{id:"chartSvg",children:Object(P.jsx)("g",{id:"chart"})})]})}},{key:"getStrippedSvg",value:function(){var e=document.getElementById("chartSvg").cloneNode(!0);e.removeAttribute("transform");var t=Object(N.a)("#svgContainer").node(),n=Object(C.b)(t).k;return e.setAttribute("width",String(Number(e.getAttribute("width"))/n)),e.setAttribute("height",String(Number(e.getAttribute("height"))/n)),e.querySelector("#chart").removeAttribute("transform"),e}},{key:"getSvgContents",value:function(){return(new XMLSerializer).serializeToString(this.getStrippedSvg())}},{key:"getSvgContentsWithInlinedImages",value:function(){var e=Object(m.a)(h.a.mark((function e(){var t;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.getStrippedSvg(),e.next=3,U(t);case 3:return e.abrupt("return",(new XMLSerializer).serializeToString(t));case 4:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"print",value:function(){var e=this,t=document.createElement("iframe");t.style.position="absolute",t.style.top="-1000px",t.style.left="-1000px",t.onload=function(){t.contentDocument.open(),t.contentDocument.write(e.getSvgContents()),t.contentDocument.close(),setTimeout((function(){t.contentWindow.focus(),t.contentWindow.print(),t.parentNode.removeChild(t)}),500)},document.body.appendChild(t)}},{key:"downloadSvg",value:function(){var e=Object(m.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSvgContentsWithInlinedImages();case 2:t=e.sent,n=new Blob([t],{type:"image/svg+xml"}),Object(M.saveAs)(n,"topola.svg");case 5:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"drawOnCanvas",value:function(){var e=Object(m.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSvgContentsWithInlinedImages();case 2:return t=e.sent,n=new Blob([t],{type:"image/svg+xml"}),e.t0=H,e.next=7,V(n);case 7:return e.t1=e.sent,e.next=10,(0,e.t0)(e.t1);case 10:return e.abrupt("return",e.sent);case 11:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"downloadPng",value:function(){var e=Object(m.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.drawOnCanvas();case 2:return t=e.sent,e.next=5,K(t,"image/png");case 5:n=e.sent,Object(M.saveAs)(n,"topola.png");case 7:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()},{key:"downloadPdf",value:function(){var e=Object(m.a)(h.a.mark((function e(){var t,r,a,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.e(4).then(n.bind(null,794));case 2:return t=e.sent,r=t.default,e.next=6,this.drawOnCanvas();case 6:a=e.sent,(i=new r({orientation:a.width>a.height?"l":"p",unit:"pt",format:[a.width,a.height]})).addImage(a,"PNG",0,0,a.width,a.height,"NONE"),i.save("topola.pdf");case 10:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}()}]),r}(r.PureComponent),J=Object(_.c)(Z,{forwardRef:!0});!function(e){e[e.UPLOADED=0]="UPLOADED",e[e.GEDCOM_URL=1]="GEDCOM_URL",e[e.WIKITREE=2]="WIKITREE",e[e.EMBEDDED=3]="EMBEDDED"}(q||(q={}));var Y=n(62),X=n(247),Q=n.n(X),$=n(248),ee=n.n($),te=n(417),ne=n(199),re=n(138),ae=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(e,r){var a,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Object(f.a)(this,n),(a=t.call(this,r)).code=e,a.args=i,a}return n}(Object(re.a)(Error));function ie(e){return e.substring(1,e.length-1)}function oe(e){var t=new Map;return e.indis.forEach((function(e){t.set(e.id,e)})),t}function se(e){var t=new Map;return e.fams.forEach((function(e){t.set(e.id,e)})),t}function ce(e){var t=e.find((function(e){return"HEAD"===e.tag})),n={},r={},a={};return e.forEach((function(e){"INDI"===e.tag?n[ie(e.pointer)]=e:"FAM"===e.tag?r[ie(e.pointer)]=e:e.pointer&&(a[ie(e.pointer)]=e)})),{head:t,indis:n,fams:r,other:a}}function ue(e,t){return e<t?-1:e>t?1:0}function le(e,t){var n=e&&(e.date||e.dateRange&&e.dateRange.from),r=t&&(t.date||t.dateRange&&t.dateRange.from);return n&&n.year&&r&&r.year?n.year!==r.year?n.year-r.year:n.month&&r.month&&(n.month!==r.month||n.day&&r.day&&n.day!==r.day)?n.month-r.month:0:0}function de(e){var t=function(e){var t=oe(e);return function(e,n){var r=t.get(e),a=t.get(n);return le(r&&r.birth,a&&a.birth)||ue(e,n)}}(e),n=e.fams.map((function(e){return function(e,t){if(!e.children)return e;var n=e.children.sort(t);return Object.assign({},e,{children:n})}(e,t)}));return Object.assign({},e,{fams:n})}function pe(e){var t=function(e){var t=se(e);return function(e,n){var r=t.get(e),a=t.get(n);return le(r&&r.marriage,a&&a.marriage)||ue(e,n)}}(e),n=e.indis.map((function(e){return function(e,t){if(!e.fams)return e;var n=e.fams.sort(t);return Object.assign({},e,{fams:n})}(e,t)}));return Object.assign({},e,{indis:n})}function he(e){return pe(de(e))}var me=[".jpg",".png",".gif"];function fe(e,t){if(!e.images||0===e.images.length)return e;var n=[];return e.images.forEach((function(e){var r=e.url.match(/[^/\\]*$/)[0];t.has(r)?n.push({url:t.get(r),title:e.title}):e.url.startsWith("http")&&function(e){var t=e.toLowerCase();return me.some((function(e){return t.endsWith(e)}))}(e.url)&&n.push(e)})),Object.assign({},e,{images:n})}function ge(e,t){var n=e.indis.map((function(e){return fe(e,t)}));return Object.assign({},e,{indis:n})}function je(e){var t=e&&e.tree&&e.tree.find((function(e){return"SOUR"===e.tag})),n=t&&t.tree&&t.tree.find((function(e){return"NAME"===e.tag}));return n&&n.data||null}var be=new Map([["abt","about"],["cal","calculated"],["est","estimated"]]);function Oe(e,t){var n=void 0!==e.day,r=void 0!==e.month,a=void 0!==e.year;if(!n&&!r&&!a)return e.text||"";var i=new Date(a?e.year:0,r?e.month-1:0,n?e.day:1),o=e.qualifier&&e.qualifier.toLowerCase(),s={day:n?"numeric":void 0,month:r?"long":void 0,year:a?"numeric":void 0};return[o&&t.formatMessage({id:"date.".concat(o),defaultMessage:be.get(o)||o}),new Intl.DateTimeFormat(t.locale,s).format(i)].join(" ")}function ve(e,t){return e?e.date?Oe(e.date,t):e.dateRange?function(e,t){var n=e.from,r=e.to,a=n&&Oe(n,t),i=r&&Oe(r,t);return a&&i?t.formatMessage({id:"date.between",defaultMessage:"between {from} and {to}"},{from:a,to:i}):a?t.formatMessage({id:"date.after",defaultMessage:"after {from}"},{from:a}):i?t.formatMessage({id:"date.before",defaultMessage:"before {to}"},{to:i}):""}(e.dateRange,t):"":""}var we=["BIRT","BAPM","CHR","EVEN","CENS","DEAT","BURI"],ke=["NAME","SEX","FAMC","FAMS","NOTE","SOUR"],_e=new Map([["ADOP","Adoption"],["BAPM","Baptism"],["BIRT","Birth"],["BURI","Burial"],["CENS","Census"],["CHR","Christening"],["CREM","Cremation"],["DEAT","Death"],["EDUC","Education"],["EMAIL","E-mail"],["EMIG","Emigration"],["EVEN","Event"],["FACT","Fact"],["IMMI","Immigration"],["MARR","Marriage"],["MILT","Military services"],["NATU","Naturalization"],["OCCU","Occupation"],["TITL","Title"],["WWW","WWW"]]);function xe(e){var t=e.replace(/_/g,"");return Object(P.jsx)(te.a,{id:"gedcom.".concat(t),defaultMessage:_e.get(t)||t})}function ye(e){return Object(P.jsx)(P.Fragment,{children:e.map((function(e,t){return Object(P.jsxs)("div",{children:[Object(P.jsx)(ee.a,{properties:{target:"_blank"},children:e}),Object(P.jsx)("br",{})]},t)}))})}function De(e){var t=[e.data];return e.tree.forEach((function(e){if("CONC"===e.tag&&e.data){var n=t.length-1;t[n]+=e.data}else"CONT"===e.tag&&e.data&&t.push(e.data)})),t}function Ee(e,t){var n=[];e.data&&e.data.length>1&&n.push(Object(P.jsx)("i",{children:e.data}));var r=e.tree.find((function(e){return"DATE"===e.tag}));r&&r.data&&n.push(function(e,t){return ve(Object(L.getDate)(e),t)}(r.data,t));var a=e.tree.find((function(e){return"PLAC"===e.tag}));return a&&a.data&&n.push.apply(n,Object(Y.a)(De(a))),e.tree.filter((function(e){return"NOTE"===e.tag})).forEach((function(e){return De(e).forEach((function(e){return n.push(Object(P.jsx)("i",{children:e}))}))})),n.length?Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)("div",{className:"ui sub header",children:xe(e.tag)}),Object(P.jsx)("span",{children:ye(n)})]}):null}function Te(e){return ye(De(e).map((function(e,t){return Object(P.jsx)("i",{children:e},t)})))}function Ie(e){return Object(P.jsx)("h2",{className:"ui header",children:e.data.split("/").filter((function(e){return!!e})).map((function(e,t){return Object(P.jsxs)("div",{children:[e,Object(P.jsx)("br",{})]},t)}))})}function Se(e,t,n){return Q()(t,(function(t){return e.filter((function(e){return e.tag===t})).map((function(e){return n(e)}))})).filter((function(e){return null!==e})).map((function(e,t){return Object(P.jsx)("div",{className:"ui segment",children:e},t)}))}function Re(e){return e.tree.length>0||e.data&&!e.data.startsWith("@")}function Me(e){return e.filter((function(e){return!ke.includes(e.tag)&&!we.includes(e.tag)})).filter(Re).map((function(e){return function(e){var t=[];return e.data&&t.push.apply(t,Object(Y.a)(De(e))),e.tree.filter((function(e){return"NOTE"===e.tag})).forEach((function(e){return De(e).forEach((function(e){return t.push(Object(P.jsx)("i",{children:e}))}))})),t.length?Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)("div",{className:"ui sub header",children:xe(e.tag)}),Object(P.jsx)("span",{children:ye(t)})]}):null}(e)})).filter((function(e){return null!==e})).map((function(e,t){return Object(P.jsx)("div",{className:"ui segment",children:e},t)}))}var Ne=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(g.a)(n,[{key:"render",value:function(){var e=this,t=this.props.gedcom.indis[this.props.indi].tree,n=t.map((function(t){return function(e,t){if(e.data){var n=t.other[ie(e.data)];if(n)return n}return e}(t,e.props.gedcom)})).filter(Re);return Object(P.jsxs)("div",{className:"ui segments",id:"details",children:[Se(t,["NAME"],Ie),Se(t,we,(function(t){return Ee(t,e.props.intl)})),Me(n),Se(n,["NOTE"],Te)]})}}]),n}(r.Component),Ce=Object(_.c)(Ne);function Le(e,t){return{id:t&&e.indis.some((function(e){return e.id===t.id}))?t.id:e.indis[0].id,generation:(null===t||void 0===t?void 0:t.generation)||0}}function Pe(e,t,n){var r=function(e,t){var n=Object(ne.parse)(e),r=Object(L.gedcomEntriesToJson)(n);if(!r||!r.indis||!r.indis.length||!r.fams||!r.fams.length)throw new ae("GEDCOM_READ_FAILED","Failed to read GEDCOM file");return{chartData:ge(he(r),t),gedcom:ce(n)}}(e,n||new Map),a=JSON.stringify(r);try{sessionStorage.setItem(t,a)}catch(i){console.warn("Failed to store data in session storage: "+i)}return r}function ze(e,t){return Ae.apply(this,arguments)}function Ae(){return(Ae=Object(m.a)(h.a.mark((function e(t,n){var r,a,i,o,s,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(r=sessionStorage.getItem(t))){e.next=4;break}return e.abrupt("return",JSON.parse(r));case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.warn("Failed to load data from session storage: "+e.t0);case 9:return(a=t.match(/https:\/\/drive\.google\.com\/file\/d\/(.*)\/.*/))&&(t="https://drive.google.com/uc?id=".concat(a[1],"&export=download")),(i=t.match(/https:\/\/drive\.google\.com\/open\?id=([^&]*)&?.*/))&&(t="https://drive.google.com/uc?id=".concat(i[1],"&export=download")),o=n?"https://topola-cors.herokuapp.com/"+t:t,e.next=16,window.fetch(o);case 16:if(200===(s=e.sent).status){e.next=19;break}throw new Error(s.statusText);case 19:return e.next=21,s.text();case 21:return c=e.sent,e.abrupt("return",Pe(c,t));case 23:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}function We(e,t,n){return Ge.apply(this,arguments)}function Ge(){return(Ge=Object(m.a)(h.a.mark((function e(t,n,r){var a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(a=sessionStorage.getItem(t))){e.next=4;break}return e.abrupt("return",JSON.parse(a));case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.warn("Failed to load data from session storage: "+e.t0);case 9:if(n){e.next=11;break}throw new ae("ERROR_LOADING_UPLOADED_FILE","Error loading data. Please upload your file again.");case 11:return e.abrupt("return",Pe(n,t,r));case 12:case"end":return e.stop()}}),e,null,[[0,6]])})))).apply(this,arguments)}var Fe,Ue=function(){function e(){Object(f.a)(this,e)}return Object(g.a)(e,[{key:"isNewData",value:function(e,t,n){return e.spec.hash!==t.spec.hash}},{key:"loadData",value:function(){var e=Object(m.a)(h.a.mark((function e(t){var n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,We(t.spec.hash,t.spec.gedcom,t.spec.images);case 3:return n=e.sent,w("upload_file_loaded",{event_label:je(n.gedcom.head),event_value:t.spec.images&&t.spec.images.size||0}),e.abrupt("return",n);case 9:throw e.prev=9,e.t0=e.catch(0),w("upload_file_error"),e.t0;case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}()}]),e}(),Be=function(){function e(){Object(f.a)(this,e)}return Object(g.a)(e,[{key:"isNewData",value:function(e,t,n){return e.spec.url!==t.spec.url}},{key:"loadData",value:function(){var e=Object(m.a)(h.a.mark((function e(t){var n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ze(t.spec.url,t.spec.handleCors);case 3:return n=e.sent,w("upload_file_loaded",{event_label:je(n.gedcom.head)}),e.abrupt("return",n);case 9:throw e.prev=9,e.t0=e.catch(0),w("url_file_error"),e.t0;case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(t){return e.apply(this,arguments)}}()}]),e}();!function(e){e.GEDCOM="gedcom",e.READY="ready",e.PARENT_READY="parent_ready"}(Fe||(Fe={}));var Ve=function(){function e(){Object(f.a)(this,e)}return Object(g.a)(e,[{key:"isNewData",value:function(e,t,n){return!1}},{key:"onMessage",value:function(){var e=Object(m.a)(h.a.mark((function e(t,n,r){var a,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.message!==Fe.PARENT_READY){e.next=4;break}window.parent.postMessage({message:Fe.READY},"*"),e.next=21;break;case 4:if(t.message!==Fe.GEDCOM){e.next=21;break}if(a=t.gedcom){e.next=8;break}return e.abrupt("return");case 8:return e.prev=8,e.next=11,We("",a);case 11:i=e.sent,w("embedded_file_loaded",{event_label:je(i.gedcom.head)}),n(i),e.next=21;break;case 17:e.prev=17,e.t0=e.catch(8),w("embedded_file_error"),r(e.t0);case 21:case"end":return e.stop()}}),e,null,[[8,17]])})));return function(t,n,r){return e.apply(this,arguments)}}()},{key:"loadData",value:function(){var e=Object(m.a)(h.a.mark((function e(t){var n=this;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,t){window.parent.postMessage({message:Fe.READY},"*"),window.addEventListener("message",(function(r){return n.onMessage(r.data,e,t)}))})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}]),e}();var He=n.p+"static/media/topola.a3ffa9a5.jpg",Ke=n(412),qe=n(415),Ze=n(253),Je=n(73);function Ye(e){return Object(P.jsx)(Je.b,{to:{pathname:"/view",search:v.stringify({url:e.url})},children:e.text})}function Xe(){var e,t=Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)("p",{children:Object(P.jsx)(te.a,{id:"intro.description",defaultMessage:"Topola Genealogy is a genealogy tree viewer that lets you browse the structure of the family."})}),Object(P.jsx)("p",{children:Object(P.jsx)(te.a,{id:"intro.instructions",defaultMessage:"Use the OPEN FILE or LOAD FROM URL buttons above to load a GEDCOM file. You can export a GEDCOM file from most of the existing genealogy programs and web sites."})}),Object(P.jsx)("p",{children:Object(P.jsx)(te.a,{id:"intro.examples",defaultMessage:"Here are some examples from the web that you can view:"})}),Object(P.jsxs)("ul",{children:[Object(P.jsxs)("li",{children:[Object(P.jsx)(Ye,{url:"http://genpol.com/module-Downloads-prep_hand_out-lid-32.html",text:"Karol Wojty\u0142a"})," ","(",Object(P.jsx)(te.a,{id:"intro.from",defaultMessage:"from"})," ",Object(P.jsx)("a",{href:"http://genpol.com/module-Downloads-display-lid-32.html",children:"GENPOL"}),")"]}),Object(P.jsxs)("li",{children:[Object(P.jsx)(Ye,{url:"https://webtreeprint.com/tp_downloader.php?path=famous_gedcoms/shakespeare.ged",text:"Shakespeare"})," ","(",Object(P.jsx)(te.a,{id:"intro.from",defaultMessage:"from"})," ",Object(P.jsx)("a",{href:"https://webtreeprint.com/tp_famous_gedcoms.php",children:"webtreeprint.com"}),")"]})]}),Object(P.jsxs)("p",{children:[Object(P.jsx)("b",{children:Object(P.jsx)(te.a,{id:"intro.privacy",defaultMessage:"Privacy"})}),": ",Object(P.jsx)(te.a,{id:"intro.privacy_note",defaultMessage:'When using the "load from file" option, this site does not send your data anywhere and files loaded from disk do not leave your computer. When using "load from URL", data is passed through the {link} service to deal with an issue with cross-site file loading in the browser (CORS).',values:{link:Object(P.jsx)("a",{href:"https://topola-cors.herokuapp.com/",children:"cors-anywhere"})}})]}),Object(P.jsxs)("p",{className:"ui right aligned version",children:["version: ",(e="2021-04-15 00:25:15 +0200",e.slice(0,16))," (",Object(P.jsx)("a",{href:"https://github.com/PeWu/topola-viewer/commit/".concat("e615308"),children:"e615308"}),")"]})]});return Object(P.jsxs)("div",{id:"content",children:[Object(P.jsx)("div",{className:"backgroundImage"}),Object(P.jsxs)(Ke.a,{className:"intro",children:[Object(P.jsx)(Ke.a.Content,{as:S,at:"large",children:Object(P.jsx)(Ke.a.Header,{children:Object(P.jsx)(te.a,{id:"intro.title",defaultMessage:"Topola Genealogy Viewer"})})}),Object(P.jsxs)(Ke.a.Content,{children:[Object(P.jsx)(qe.a,{as:S,at:"large",children:Object(P.jsxs)(qe.a.Row,{children:[Object(P.jsx)(qe.a.Column,{width:5,children:Object(P.jsx)(Ze.a,{src:He,alt:"Topola logo"})}),Object(P.jsx)(qe.a.Column,{width:11,children:t})]})}),Object(P.jsxs)(S,{at:"small",children:[Object(P.jsx)(Ze.a,{src:He,alt:"Topola logo",centered:!0,size:"tiny",className:"blockImage"}),t]})]})]})]})}var Qe,$e=n(413),et=n(418),tt=n(405),nt=n(25),rt=n(407),at=n(99),it=n(408);!function(e){e[e.Menu=0]="Menu",e[e.Dropdown=1]="Dropdown"}(Qe||(Qe={}));var ot=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(g.a)(n,[{key:"render",value:function(){var e=Object(d.a)({},this.props);return delete e.menuType,Object(P.jsx)(P.Fragment,{children:this.props.menuType===Qe.Menu?Object(P.jsx)(it.a.Item,Object(d.a)(Object(d.a)({},e),{},{children:this.props.children})):Object(P.jsx)(rt.a.Item,Object(d.a)(Object(d.a)({},e),{},{children:this.props.children}))})}}]),n}(r.Component),st=n(250),ct=n.n(st),ut=n(69),lt=n.n(ut),dt=n(251),pt=n.n(dt);n(375)(lt.a),n(376)(lt.a),n(377)(lt.a),n(378)(lt.a),n(379)(lt.a),n(380)(lt.a);function ht(e){return e.toLocaleLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\u0142/g,"l")}function mt(e,t){return e.score!==t.score?t.score-e.score:pt()(e.ref,t.ref)}var ft=function(){function e(t){Object(f.a)(this,e),this.index=void 0,this.indiMap=void 0,this.famMap=void 0,this.indiMap=oe(t),this.famMap=se(t)}return Object(g.a)(e,[{key:"initialize",value:function(){var e=this;this.index=lt()((function(){var t=this;this.use(lt.a.multiLanguage("de","en","fr","it","ru")),this.ref("id"),this.field("id"),this.field("name",{boost:10}),this.field("normalizedName",{boost:8}),this.field("spouseLastName",{boost:2}),this.field("normalizedSpouseLastName",{boost:2}),e.indiMap.forEach((function(n){var r=[n.firstName,n.lastName].join(" "),a=function(e,t,n){return(e.fams||[]).map((function(e){return n.get(e)})).map((function(e){return e&&e.husb})).map((function(e){return e&&t.get(e)})).map((function(e){return e&&e.lastName})).join(" ")}(n,e.indiMap,e.famMap);t.add({id:n.id,name:r,normalizedName:ht(r),spouseLastName:a,normalizedSpouseLastName:ht(a)})}))}))}},{key:"search",value:function(e){var t=this,n=e.split(" ").filter((function(e){return!!e})).map((function(e){return"+".concat(e,"*")})).join(" ");return this.index.search(n).sort(mt).slice(0,8).map((function(e){return{id:e.ref,indi:t.indiMap.get(e.ref)}}))}}]),e}();var gt=n(406);function jt(e){var t=[e.indi.firstName,e.indi.lastName].join(" ").trim();return e.id.length>8?t:Object(P.jsxs)(P.Fragment,{children:[t," ",Object(P.jsxs)("i",{children:["(",e.id,")"]})]})}var bt=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(){var e;Object(f.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={searchResults:[]},e.searchRef=void 0,e.searchIndex=void 0,e}return Object(g.a)(n,[{key:"getDescriptionLine",value:function(e){var t=ve(e.birth,this.props.intl),n=ve(e.death,this.props.intl);return n?"".concat(t," \u2013 ").concat(n):t}},{key:"displaySearchResult",value:function(e){return{id:e.id,key:e.id,title:jt(e),description:this.getDescriptionLine(e.indi)}}},{key:"handleSearch",value:function(e){var t=this;if(e){var n=this.searchIndex.search(e).map((function(e){return t.displaySearchResult(e)}));this.setState(Object.assign({},this.state,{searchResults:n}))}}},{key:"handleResultSelect",value:function(e){w("search_result_selected"),this.props.onSelection({id:e,generation:0}),this.searchRef.setValue("")}},{key:"initializeSearchIndex",value:function(){this.searchIndex=function(e){var t=new ft(e);return t.initialize(),t}(this.props.data)}},{key:"componentDidMount",value:function(){this.initializeSearchIndex()}},{key:"componentDidUpdate",value:function(e){e.data!==this.props.data&&this.initializeSearchIndex()}},{key:"render",value:function(){var e=this;return Object(P.jsx)(gt.a,{onSearchChange:ct()((function(t,n){return e.handleSearch(n.value)}),200),onResultSelect:function(t,n){return e.handleResultSelect(n.result.id)},results:this.state.searchResults,noResultsMessage:this.props.intl.formatMessage({id:"menu.search.no_results",defaultMessage:"No results found"}),placeholder:this.props.intl.formatMessage({id:"menu.search.placeholder",defaultMessage:"Search for people"}),selectFirstResult:!0,ref:function(t){return e.searchRef=t},id:"search"})}}]),n}(r.Component),Ot=Object(_.c)(bt),vt=n(205),wt=n.n(vt);function kt(e){return new Promise((function(t){var n=new FileReader;n.onload=function(e){t(e.target.result)},n.readAsText(e)}))}function _t(e){var t=e.toLowerCase();return t.endsWith(".jpg")||t.endsWith(".png")}var xt=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(g.a)(n,[{key:"handleUpload",value:function(){var e=Object(m.a)(h.a.mark((function e(t){var n,r,a,i,o,s,c,u,l;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((n=t.target.files)&&n.length){e.next=3;break}return e.abrupt("return");case 3:return r=Array.from(n),t.target.value="",w("upload_files_selected",{event_value:n.length}),a=1===r.length?r[0]:r.find((function(e){return e.name.toLowerCase().endsWith(".ged")}))||r[0],i=r.filter((function(e){return e.name!==a.name&&_t(e.name)})).map((function(e){return{name:e.name,url:URL.createObjectURL(e)}})),o=new Map(i.map((function(e){return[e.name,e.url]}))),e.next=11,kt(a);case 11:s=e.sent,c=i.map((function(e){return e.name})).sort().join("|"),u=wt()(wt()(s)+c),l=v.parse(this.props.location.search),(l.file===u?this.props.history.replace:this.props.history.push)({pathname:"/view",search:v.stringify({file:u}),state:{data:s,images:o}});case 17:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)(at.a,{name:"folder open"}),Object(P.jsx)(te.a,{id:"menu.open_file",defaultMessage:"Open file"})]});return Object(P.jsxs)(P.Fragment,{children:[this.props.menuType===Qe.Menu?Object(P.jsx)("label",{htmlFor:"fileInput",children:Object(P.jsx)(it.a.Item,{as:"a",children:t})}):Object(P.jsx)(rt.a.Item,{as:"label",htmlFor:"fileInput",children:t}),Object(P.jsx)("input",{className:"hidden",type:"file",accept:".ged,image/*",id:"fileInput",multiple:!0,onChange:function(t){return e.handleUpload(t)}})]})}}]),n}(r.Component),yt=n(411),Dt=n(416),Et=n(409),Tt=n(404),It=n(390),St=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(){var e;Object(f.a)(this,n);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={dialogOpen:!1},e.inputRef=r.createRef(),e}return Object(g.a)(n,[{key:"openDialog",value:function(){var e=this;this.setState(Object.assign({},this.state,{dialogOpen:!0}),(function(){return e.inputRef.current.focus()}))}},{key:"handleClose",value:function(){this.setState(Object.assign({},this.state,{dialogOpen:!1}))}},{key:"handleLoad",value:function(){this.setState(Object.assign({},this.state,{dialogOpen:!1})),this.state.url&&(w("url_selected"),this.props.history.push({pathname:"/view",search:v.stringify({url:this.state.url})}))}},{key:"handleUrlChange",value:function(e){this.setState(Object.assign({},this.state,{url:e}))}},{key:"loadFromUrlModal",value:function(){var e=this;return Object(P.jsxs)(yt.a,{open:this.state.dialogOpen,onClose:function(){return e.handleClose()},centered:!1,children:[Object(P.jsxs)(Dt.a,{children:[Object(P.jsx)(at.a,{name:"cloud download"}),Object(P.jsx)(te.a,{id:"load_from_url.title",defaultMessage:"Load from URL"})]}),Object(P.jsx)(yt.a.Content,{children:Object(P.jsxs)(Et.a,{onSubmit:function(){return e.handleLoad()},children:[Object(P.jsx)(Tt.a,{placeholder:"https://",fluid:!0,onChange:function(t,n){return e.handleUrlChange(n.value)},ref:this.inputRef}),Object(P.jsx)("p",{children:Object(P.jsx)(te.a,{id:"load_from_url.comment",defaultMessage:"Data from the URL will be loaded through {link} to avoid CORS issues.",values:{link:Object(P.jsx)("a",{href:"https://topola-cors.herokuapp.com/",children:"topola-cors.herokuapp.com"})}})})]})}),Object(P.jsxs)(yt.a.Actions,{children:[Object(P.jsx)(It.a,{secondary:!0,onClick:function(){return e.handleClose()},children:Object(P.jsx)(te.a,{id:"load_from_url.cancel",defaultMessage:"Cancel"})}),Object(P.jsx)(It.a,{primary:!0,onClick:function(){return e.handleLoad()},children:Object(P.jsx)(te.a,{id:"load_from_url.load",defaultMessage:"Load"})})]})]})}},{key:"render",value:function(){var e=this;return Object(P.jsxs)(P.Fragment,{children:[Object(P.jsxs)(ot,{onClick:function(){return e.openDialog()},menuType:this.props.menuType,children:[Object(P.jsx)(at.a,{name:"cloud download"}),Object(P.jsx)(te.a,{id:"menu.load_from_url",defaultMessage:"Load from URL"})]}),this.loadFromUrlModal()]})}}]),n}(r.Component),Rt=n.p+"static/media/wikitree.7bffea31.png",Mt=n(206),Nt=n.n(Mt),Ct="~Private",Lt="wikidb_wtb_UserName";function Pt(e){try{return sessionStorage.getItem(e)}catch(t){console.warn("Failed to load data from session storage: "+t)}return null}function zt(e,t){try{sessionStorage.setItem(e,t)}catch(n){console.warn("Failed to store data in session storage: "+n)}}function At(e,t){return Wt.apply(this,arguments)}function Wt(){return(Wt=Object(m.a)(h.a.mark((function e(t,n){var r,a,i,o,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(a in(r=new FormData).append("format","json"),t)r.append(a,t[a]);return i=n?"https://topola-cors.herokuapp.com/https://api.wikitree.com/api.php":"https://api.wikitree.com/api.php",e.next=6,window.fetch(i,{method:"POST",body:r,credentials:n?void 0:"include"});case 6:return o=e.sent,e.next=9,o.text();case 9:return s=e.sent,e.abrupt("return",JSON.parse(s));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gt(e,t){return Ft.apply(this,arguments)}function Ft(){return(Ft=Object(m.a)(h.a.mark((function e(t,n){var r,a,i,o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r="wikitree:ancestors:".concat(t),!(a=Pt(r))){e.next=4;break}return e.abrupt("return",JSON.parse(a));case 4:return e.next=6,At({action:"getAncestors",key:t,fields:"*"},n);case 6:return i=e.sent,o=i[0].ancestors,zt(r,JSON.stringify(o)),e.abrupt("return",o);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ut(e,t){return Bt.apply(this,arguments)}function Bt(){return(Bt=Object(m.a)(h.a.mark((function e(t,n){var r,a,i,o,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=[],a=[],t.forEach((function(e){var t=Pt("wikitree:relatives:".concat(e));t?r.push(JSON.parse(t)):a.push(e)})),0!==a.length){e.next=5;break}return e.abrupt("return",r);case 5:return e.next=7,At({action:"getRelatives",keys:a.join(","),getChildren:!0,getSpouses:!0},n);case 7:if(null!==(i=e.sent)[0].items){e.next=11;break}throw o=a[0],new ae("WIKITREE_PROFILE_NOT_FOUND","WikiTree profile ".concat(o," not found"),{id:o});case 11:return(s=i[0].items.map((function(e){return e.person}))).forEach((function(e){zt("wikitree:relatives:".concat(e.Name),JSON.stringify(e))})),e.abrupt("return",r.concat(s));case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vt(e){return Ht.apply(this,arguments)}function Ht(){return(Ht=Object(m.a)(h.a.mark((function e(t){var n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,At({action:"clientLogin",authcode:t},!1);case 2:return n=e.sent,e.abrupt("return",n.clientLogin);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Kt(){return Nt.a.get(Lt)}function qt(e,t,n){return Zt.apply(this,arguments)}function Zt(){return(Zt=Object(m.a)(h.a.mark((function e(t,n,r){var a,i,o,s,c,u,l,d,p,m,f,g,j,b,v,w,k,_,x,y,D,E,T,I,S,R;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((a="apps.wikitree.com"!==window.location.hostname)||Kt()||!r){e.next=6;break}return e.next=4,Vt(r);case 4:"Success"===(i=e.sent).result&&(sessionStorage.clear(),Nt.a.set(Lt,i.username));case 6:return o=[],e.next=9,Ut([t],a);case 9:if((s=e.sent)[0].Name){e.next=13;break}throw new ae("WIKITREE_PROFILE_NOT_ACCESSIBLE","WikiTree profile ".concat(c=t," is not accessible. Try logging in."),{id:c});case 13:return u=Object.values(s[0].Spouses).map((function(e){return e.Name})),e.next=16,Promise.all([t].concat(u).map((function(e){return Gt(e,a)})));case 16:return l=e.sent,d=l.flat().map((function(e){return e.Name})).filter((function(e){return!!e})),e.next=20,Ut(d,a);case 20:p=e.sent,m=new Map,f=new Map,l.forEach((function(e,t){var n=1e3*t;e.forEach((function(e){e.Id<0&&(e.Id-=n,e.Name="".concat(Ct).concat(e.Id)),e.Father<0&&(e.Father-=n,m.set(e.Id,e.Father)),e.Mother<0&&(e.Mother-=n,f.set(e.Id,e.Mother))}))})),p.forEach((function(e){var t=m.get(e.Id);t&&(e.Father=t);var n=f.get(e.Id);n&&(e.Mother=n)})),o.push.apply(o,Object(Y.a)(p)),g=l.flat().filter((function(e){return e.Id<0})),o.push.apply(o,Object(Y.a)(g)),j=5,b=[t],v=0;case 31:if(!(b.length>0&&v<=j)){e.next=42;break}return e.next=34,Ut(b,a);case 34:w=e.sent,o.push.apply(o,Object(Y.a)(w)),k=w.flatMap((function(e){return Object.values(e.Spouses)})),o.push.apply(o,Object(Y.a)(k)),b=w.flatMap((function(e){return Object.values(e.Children).map((function(e){return e.Name}))})),v++,e.next=31;break;case 42:return _=new Map,x=new Map,y=new Map,D=new Map,o.forEach((function(e){if(D.set(e.Id,e.Name),e.Mother||e.Father){var t=Jt(e.Mother,e.Father);en(_,e.Mother).add(t),en(_,e.Father).add(t),en(x,t).add(e.Id),y.set(t,{wife:e.Mother||void 0,husband:e.Father||void 0})}})),E=[],T=new Set,o.forEach((function(e){if(!T.has(e.Id)){T.add(e.Id);var t=Yt(e,n);e.Spouses&&Object.values(e.Spouses).forEach((function(t){var n=Jt(e.Id,t.Id);en(_,e.Id).add(n),en(_,t.Id).add(n);var r="Male"===e.Gender?{wife:t.Id,husband:e.Id,spouse:t}:{wife:e.Id,husband:t.Id,spouse:t};y.set(n,r)})),t.fams=Array.from(en(_,e.Id)),E.push(t)}})),I=Array.from(y.entries()).map((function(e){var t=Object(O.a)(e,2),n=t[0],r=t[1],a={id:n},i=r.wife&&D.get(r.wife);i&&(a.wife=i);var o=r.husband&&D.get(r.husband);if(o&&(a.husb=o),a.children=Array.from(en(x,n)).map((function(e){return D.get(e)})),r.spouse&&(r.spouse.marriage_date&&"0000-00-00"!==r.spouse.marriage_date||r.spouse.marriage_location)){var s=Xt(r.spouse.marriage_date);a.marriage=Object.assign({},s,{place:r.spouse.marriage_location})}return a})),S=he({indis:E,fams:I}),R=$t(E),e.abrupt("return",{chartData:S,gedcom:R});case 54:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Jt(e,t){return t>e?"".concat(e,"_").concat(t):"".concat(t,"_").concat(e)}function Yt(e,t){var n={id:e.Name};if(e.Name.startsWith(Ct)&&(n.hideId=!0,n.firstName=t.formatMessage({id:"wikitree.private",defaultMessage:"Private"})),e.FirstName&&"Unknown"!==e.FirstName?n.firstName=e.FirstName:e.RealName&&"Unknown"!==e.RealName&&(n.firstName=e.RealName),"Unknown"!==e.LastNameAtBirth&&(n.lastName=e.LastNameAtBirth),(e.Mother||e.Father)&&(n.famc=Jt(e.Mother,e.Father)),"Male"===e.Gender?n.sex="M":"Female"===e.Gender&&(n.sex="F"),e.BirthDate&&"0000-00-00"!==e.BirthDate||e.BirthLocation||"unknown"!==e.BirthDateDecade){var r=Xt(e.BirthDate,e.DataStatus&&e.DataStatus.BirthDate)||Qt(e.BirthDateDecade);n.birth=Object.assign({},r,{place:e.BirthLocation})}if(e.DeathDate&&"0000-00-00"!==e.DeathDate||e.DeathLocation||"unknown"!==e.DeathDateDecade){var a=Xt(e.DeathDate,e.DataStatus&&e.DataStatus.DeathDate)||Qt(e.DeathDateDecade);n.death=Object.assign({},a,{place:e.DeathLocation})}return e.PhotoData&&(n.images=[{url:"https://www.wikitree.com".concat(e.PhotoData.url)}]),n}function Xt(e,t){if(e){var n=e.match(/(\d\d\d\d)-(\d\d)-(\d\d)/);if(!n)return{date:{text:e}};var r={};return"0000"!==n[1]&&(r.year=~~n[1]),"00"!==n[2]&&(r.month=~~n[2]),"00"!==n[3]&&(r.day=~~n[3]),"after"===t?{dateRange:{from:r}}:"before"===t?{dateRange:{to:r}}:("guess"===t&&(r.qualifier="abt"),{date:r})}}function Qt(e){return"unknown"!==e?{date:{text:e}}:void 0}function $t(e){var t={};return e.forEach((function(e){var n=e.id.replace(/ /g,"_");t[e.id]={level:0,pointer:"@".concat(e.id,"@"),tag:"INDI",data:"",tree:[{level:1,pointer:"",tag:"NAME",data:"".concat(e.firstName||""," /").concat(e.lastName||"","/"),tree:[]}]},e.id.startsWith("~")||t[e.id].tree.push({level:1,pointer:"",tag:"WWW",data:"https://www.wikitree.com/wiki/".concat(n),tree:[]})})),{head:{level:0,pointer:"",tag:"HEAD",data:"",tree:[]},indis:t,fams:{},other:{}}}function en(e,t){var n=e.get(t);if(n)return n;var r=new Set;return e.set(t,r),r}var tn,nn=function(){function e(t){Object(f.a)(this,e),this.intl=t}return Object(g.a)(e,[{key:"isNewData",value:function(e,t,n){var r;return!!e.selection&&((null===(r=t.selection)||void 0===r?void 0:r.id)!==e.selection.id&&(!n||!n.chartData.indis.some((function(t){var n;return t.id===(null===(n=e.selection)||void 0===n?void 0:n.id)}))))}},{key:"loadData",value:function(){var e=Object(m.a)(h.a.mark((function e(t){var n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.selection){e.next=2;break}throw new ae("WIKITREE_ID_NOT_PROVIDED","WikiTree id needs to be provided");case 2:return e.prev=2,e.next=5,qt(t.selection.id,this.intl,t.spec.authcode);case 5:return n=e.sent,w("wikitree_loaded"),e.abrupt("return",n);case 10:throw e.prev=10,e.t0=e.catch(2),w("wikitree_error"),e.t0;case 14:case"end":return e.stop()}}),e,this,[[2,10]])})));return function(t){return e.apply(this,arguments)}}()}]),e}();!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.NOT_LOGGED_IN=1]="NOT_LOGGED_IN",e[e.LOGGED_IN=2]="LOGGED_IN"}(tn||(tn={}));var rn,an=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(){var e;Object(f.a)(this,n);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={dialogOpen:!1},e.inputRef=r.createRef(),e}return Object(g.a)(n,[{key:"openDialog",value:function(){var e=this;this.setState(Object.assign({},this.state,{dialogOpen:!0}),(function(){return e.inputRef.current.focus()}))}},{key:"handleClose",value:function(){this.setState(Object.assign({},this.state,{dialogOpen:!1}))}},{key:"handleSelectId",value:function(){if(this.setState(Object.assign({},this.state,{dialogOpen:!1})),this.state.wikiTreeId){w("wikitree_id_selected");var e=v.parse(this.props.location.search),t=void 0===e.standalone||e.standalone;this.props.history.push({pathname:"/view",search:v.stringify({indi:this.state.wikiTreeId,source:"wikitree",standalone:t})})}}},{key:"handleIdChange",value:function(e){this.setState(Object.assign({},this.state,{wikiTreeId:e}))}},{key:"enterId",value:function(e,t){e.preventDefault(),this.inputRef.current.inputRef.value=t,this.handleIdChange(t),this.inputRef.current.focus()}},{key:"wikiTreeIdModal",value:function(){var e=this;return Object(P.jsxs)(yt.a,{open:this.state.dialogOpen,onClose:function(){return e.handleClose()},centered:!1,children:[Object(P.jsxs)(Dt.a,{children:[Object(P.jsx)("img",{src:Rt,alt:"WikiTree logo",style:{width:"32px",height:"32px"}}),Object(P.jsx)(te.a,{id:"select_wikitree_id.title",defaultMessage:"Select WikiTree ID"})]}),Object(P.jsx)(yt.a.Content,{children:Object(P.jsxs)(Et.a,{onSubmit:function(){return e.handleSelectId()},children:[Object(P.jsx)("p",{children:Object(P.jsx)(te.a,{id:"select_wikitree_id.comment",defaultMessage:"Enter a {wikiTreeLink} profile ID. Examples: {example1}, {example2}.",values:{wikiTreeLink:Object(P.jsx)("a",{href:"https://wikitree.com/",target:"_blank",rel:"noopener noreferrer",children:"WikiTree"}),example1:Object(P.jsx)("span",{onClick:function(t){return e.enterId(t,"Wojtyla-13")},className:"link-span",children:"Wojtyla-13"}),example2:Object(P.jsx)("span",{onClick:function(t){return e.enterId(t,"Sk\u0142odowska-2")},className:"link-span",children:"Sk\u0142odowska-2"})}})}),Object(P.jsx)(Tt.a,{fluid:!0,onChange:function(t,n){return e.handleIdChange(n.value)},ref:this.inputRef})]})}),Object(P.jsxs)(yt.a.Actions,{children:[Object(P.jsx)(It.a,{secondary:!0,onClick:function(){return e.handleClose()},children:Object(P.jsx)(te.a,{id:"select_wikitree_id.cancel",defaultMessage:"Cancel"})}),Object(P.jsx)(It.a,{primary:!0,onClick:function(){return e.handleSelectId()},children:Object(P.jsx)(te.a,{id:"select_wikitree_id.load",defaultMessage:"Load"})})]})]})}},{key:"render",value:function(){var e=this;return Object(P.jsxs)(P.Fragment,{children:[Object(P.jsxs)(ot,{menuType:this.props.menuType,onClick:function(){return e.openDialog()},children:[Object(P.jsx)("img",{src:Rt,alt:"WikiTree logo",className:"menu-icon"}),Object(P.jsx)(te.a,{id:"menu.select_wikitree_id",defaultMessage:"Select WikiTree ID"})]}),this.wikiTreeIdModal()]})}}]),n}(r.Component),on=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(){var e;Object(f.a)(this,n);for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={wikiTreeLoginState:tn.UNKNOWN},e.wikiTreeLoginFormRef=r.createRef(),e.wikiTreeReturnUrlRef=r.createRef(),e}return Object(g.a)(n,[{key:"wikiTreeLogin",value:function(){var e="".concat("https://apps.wikitree.com/apps/wiech13/topola-viewer").concat(window.location.hash,"&");this.wikiTreeReturnUrlRef.current.value=e,this.wikiTreeLoginFormRef.current.submit()}},{key:"checkWikiTreeLoginState",value:function(){var e=Kt(),t=e?tn.LOGGED_IN:tn.NOT_LOGGED_IN;this.state.wikiTreeLoginState!==t&&this.setState(Object.assign({},this.state,{wikiTreeLoginState:t,wikiTreeLoginUsername:e}))}},{key:"componentDidMount",value:function(){this.checkWikiTreeLoginState()}},{key:"componentDidUpdate",value:function(){this.checkWikiTreeLoginState()}},{key:"render",value:function(){var e=this;switch(this.state.wikiTreeLoginState){case tn.NOT_LOGGED_IN:return Object(P.jsxs)(P.Fragment,{children:[Object(P.jsxs)(ot,{menuType:this.props.menuType,onClick:function(){return e.wikiTreeLogin()},children:[Object(P.jsx)("img",{src:Rt,alt:"WikiTree logo",className:"menu-icon"}),Object(P.jsx)(te.a,{id:"menu.wikitree_login",defaultMessage:"Log in to WikiTree"})]}),Object(P.jsxs)("form",{action:"https://api.wikitree.com/api.php",method:"POST",style:{display:"hidden"},ref:this.wikiTreeLoginFormRef,children:[Object(P.jsx)("input",{type:"hidden",name:"action",value:"clientLogin"}),Object(P.jsx)("input",{type:"hidden",name:"returnURL",ref:this.wikiTreeReturnUrlRef})]})]});case tn.LOGGED_IN:var t=this.state.wikiTreeLoginUsername?this.props.intl.formatMessage({id:"menu.wikitree_popup_username",defaultMessage:"Logged in to WikiTree as {username}"},{username:this.state.wikiTreeLoginUsername}):this.props.intl.formatMessage({id:"menu.wikitree_popup",defaultMessage:"Logged in to WikiTree"});return Object(P.jsxs)(ot,{menuType:this.props.menuType,title:t,children:[Object(P.jsx)("img",{src:Rt,alt:"WikiTree logo",className:"menu-icon"}),Object(P.jsx)(te.a,{id:"menu.wikitree_logged_in",defaultMessage:"Logged in"})]})}return null}}]),n}(r.Component),sn=Object(_.c)(on);!function(e){e[e.LARGE=0]="LARGE",e[e.SMALL=1]="SMALL"}(rn||(rn={}));var cn,un=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(){return Object(f.a)(this,n),t.apply(this,arguments)}return Object(g.a)(n,[{key:"changeView",value:function(e){var t=this.props.location,n=v.parse(t.search);n.view!==e&&(n.view=e,t.search=v.stringify(n),this.props.history.push(t))}},{key:"chartMenus",value:function(e){var t=this;if(!this.props.showingChart)return null;var n=Object(P.jsxs)(P.Fragment,{children:[Object(P.jsxs)(rt.a.Item,{onClick:function(){return t.changeView("hourglass")},children:[Object(P.jsx)(at.a,{name:"hourglass"}),Object(P.jsx)(te.a,{id:"menu.hourglass",defaultMessage:"Hourglass chart"})]}),this.props.allowAllRelativesChart?Object(P.jsxs)(rt.a.Item,{onClick:function(){return t.changeView("relatives")},children:[Object(P.jsx)(at.a,{name:"users"}),Object(P.jsx)(te.a,{id:"menu.relatives",defaultMessage:"All relatives"})]}):null,Object(P.jsxs)(rt.a.Item,{onClick:function(){return t.changeView("fancy")},children:[Object(P.jsx)(at.a,{name:"users"}),Object(P.jsx)(te.a,{id:"menu.fancy",defaultMessage:"Fancy tree (experimental)"})]})]});switch(e){case rn.LARGE:return Object(P.jsxs)(P.Fragment,{children:[Object(P.jsxs)(it.a.Item,{onClick:function(){return t.props.eventHandlers.onPrint()},children:[Object(P.jsx)(at.a,{name:"print"}),Object(P.jsx)(te.a,{id:"menu.print",defaultMessage:"Print"})]}),Object(P.jsx)(rt.a,{trigger:Object(P.jsxs)("div",{children:[Object(P.jsx)(at.a,{name:"download"}),Object(P.jsx)(te.a,{id:"menu.download",defaultMessage:"Download"})]}),className:"item",children:Object(P.jsxs)(rt.a.Menu,{children:[Object(P.jsx)(rt.a.Item,{onClick:function(){return t.props.eventHandlers.onDownloadPdf()},children:Object(P.jsx)(te.a,{id:"menu.pdf_file",defaultMessage:"PDF file"})}),Object(P.jsx)(rt.a.Item,{onClick:function(){return t.props.eventHandlers.onDownloadPng()},children:Object(P.jsx)(te.a,{id:"menu.png_file",defaultMessage:"PNG file"})}),Object(P.jsx)(rt.a.Item,{onClick:function(){return t.props.eventHandlers.onDownloadSvg()},children:Object(P.jsx)(te.a,{id:"menu.svg_file",defaultMessage:"SVG file"})})]})}),Object(P.jsx)(rt.a,{trigger:Object(P.jsxs)("div",{children:[Object(P.jsx)(at.a,{name:"eye"}),Object(P.jsx)(te.a,{id:"menu.view",defaultMessage:"View"})]}),className:"item",children:Object(P.jsx)(rt.a.Menu,{children:n})}),Object(P.jsx)(Ot,Object(d.a)({data:this.props.data,onSelection:this.props.eventHandlers.onSelection},this.props))]});case rn.SMALL:return Object(P.jsxs)(P.Fragment,{children:[Object(P.jsxs)(rt.a.Item,{onClick:function(){return t.props.eventHandlers.onPrint()},children:[Object(P.jsx)(at.a,{name:"print"}),Object(P.jsx)(te.a,{id:"menu.print",defaultMessage:"Print"})]}),Object(P.jsx)(rt.a.Divider,{}),Object(P.jsxs)(rt.a.Item,{onClick:function(){return t.props.eventHandlers.onDownloadPdf()},children:[Object(P.jsx)(at.a,{name:"download"}),Object(P.jsx)(te.a,{id:"menu.download_pdf",defaultMessage:"Downlod PDF"})]}),Object(P.jsxs)(rt.a.Item,{onClick:function(){return t.props.eventHandlers.onDownloadPng()},children:[Object(P.jsx)(at.a,{name:"download"}),Object(P.jsx)(te.a,{id:"menu.download_png",defaultMessage:"Download PNG"})]}),Object(P.jsxs)(rt.a.Item,{onClick:function(){return t.props.eventHandlers.onDownloadSvg()},children:[Object(P.jsx)(at.a,{name:"download"}),Object(P.jsx)(te.a,{id:"menu.download_svg",defaultMessage:"Download SVG"})]}),Object(P.jsx)(rt.a.Divider,{}),n,Object(P.jsx)(rt.a.Divider,{})]})}}},{key:"title",value:function(){return Object(P.jsx)(it.a.Item,{children:Object(P.jsx)("b",{children:"Topola Genealogy"})})}},{key:"fileMenus",value:function(e){if(!this.props.standalone&&this.props.showWikiTreeMenus)switch(e){case rn.LARGE:return Object(P.jsx)(an,Object(d.a)({menuType:Qe.Menu},this.props));case rn.SMALL:return Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)(an,Object(d.a)({menuType:Qe.Dropdown},this.props)),Object(P.jsx)(rt.a.Divider,{})]})}if(!this.props.standalone)return null;switch(e){case rn.LARGE:return this.props.showingChart?Object(P.jsx)(rt.a,{trigger:Object(P.jsxs)("div",{children:[Object(P.jsx)(at.a,{name:"folder open"}),Object(P.jsx)(te.a,{id:"menu.open",defaultMessage:"Open"})]}),className:"item",children:Object(P.jsxs)(rt.a.Menu,{children:[Object(P.jsx)(xt,Object(d.a)({menuType:Qe.Dropdown},this.props)),Object(P.jsx)(St,Object(d.a)({menuType:Qe.Dropdown},this.props)),Object(P.jsx)(an,Object(d.a)({menuType:Qe.Dropdown},this.props))]})}):Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)(xt,Object(d.a)({menuType:Qe.Menu},this.props)),Object(P.jsx)(St,Object(d.a)({menuType:Qe.Menu},this.props)),Object(P.jsx)(an,Object(d.a)({menuType:Qe.Menu},this.props))]});case rn.SMALL:return Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)(xt,Object(d.a)({menuType:Qe.Dropdown},this.props)),Object(P.jsx)(St,Object(d.a)({menuType:Qe.Dropdown},this.props)),Object(P.jsx)(an,Object(d.a)({menuType:Qe.Dropdown},this.props)),Object(P.jsx)(rt.a.Divider,{})]})}}},{key:"wikiTreeLoginMenu",value:function(e){return this.props.showWikiTreeMenus?Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)(sn,Object(d.a)({menuType:e===rn.SMALL?Qe.Dropdown:Qe.Menu},this.props)),e===rn.SMALL?Object(P.jsx)(rt.a.Divider,{}):null]}):null}},{key:"mobileMenus",value:function(){return Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)(rt.a,{trigger:Object(P.jsx)("div",{children:Object(P.jsx)(at.a,{name:"sidebar"})}),className:"item",icon:null,children:Object(P.jsxs)(rt.a.Menu,{children:[this.fileMenus(rn.SMALL),this.chartMenus(rn.SMALL),this.wikiTreeLoginMenu(rn.SMALL),Object(P.jsx)(rt.a.Item,{href:"https://github.com/PeWu/topola-viewer",target:"_blank",rel:"noopener noreferrer",children:Object(P.jsx)(te.a,{id:"menu.github",defaultMessage:"GitHub project"})})]})}),this.props.standalone?Object(P.jsx)(Je.b,{to:"/",children:this.title()}):this.title()]})}},{key:"desktopMenus",value:function(){return Object(P.jsxs)(P.Fragment,{children:[this.props.standalone?Object(P.jsx)(Je.b,{to:"/",children:this.title()}):null,this.fileMenus(rn.LARGE),this.chartMenus(rn.LARGE),Object(P.jsxs)(it.a.Menu,{position:"right",children:[this.wikiTreeLoginMenu(rn.LARGE),Object(P.jsx)(it.a.Item,{href:"https://github.com/PeWu/topola-viewer",target:"_blank",rel:"noopener noreferrer",children:Object(P.jsx)(te.a,{id:"menu.github",defaultMessage:"GitHub project"})})]})]})}},{key:"render",value:function(){return Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)(it.a,{as:S,at:"large",attached:"top",inverted:!0,color:"blue",size:"large",children:this.desktopMenus()}),Object(P.jsx)(it.a,{as:S,at:"small",attached:"top",inverted:!0,color:"blue",size:"large",children:this.mobileMenus()})]})}}]),n}(r.Component);function ln(e){return Object(P.jsxs)($e.a,{negative:!0,className:"error",children:[Object(P.jsx)($e.a.Header,{children:Object(P.jsx)(te.a,{id:"error.failed_to_load_file",defaultMessage:"Failed to load file"})}),Object(P.jsx)("p",{children:e.message})]})}function dn(e){return Object(P.jsx)(et.a,{open:e.open,onClose:e.onDismiss,children:Object(P.jsxs)($e.a,{negative:!0,className:"errorPopup",onDismiss:e.onDismiss,children:[Object(P.jsx)($e.a.Header,{children:Object(P.jsx)(te.a,{id:"error.error",defaultMessage:"Error"})}),Object(P.jsx)("p",{children:e.message})]})})}function pn(e){var t=v.parse(e.search),n=function(e){var n=t[e];return"string"===typeof n?n:void 0},r=n("view"),a=new Map([["relatives",k.Relatives],["fancy",k.Fancy]]),i=n("file"),o=n("url"),s="true"===n("embedded"),c=void 0;"wikitree"===n("source")?c={source:q.WIKITREE,authcode:n("?authcode")}:i?c={source:q.UPLOADED,hash:i,gedcom:e.state&&e.state.data,images:e.state&&e.state.images}:o?c={source:q.GEDCOM_URL,url:o,handleCors:"false"!==n("handleCors")}:s&&(c={source:q.EMBEDDED});var u=n("indi"),l=Number(n("gen"));return{sourceSpec:c,selection:u?{id:u,generation:isNaN(l)?0:l}:void 0,chartType:a.get(r)||k.Hourglass,showSidePanel:"false"!==n("sidePanel"),standalone:"false"!==n("standalone")&&!s,freezeAnimation:"true"===n("freeze")}}!function(e){e[e.INITIAL=0]="INITIAL",e[e.LOADING=1]="LOADING",e[e.ERROR=2]="ERROR",e[e.SHOWING_CHART=3]="SHOWING_CHART",e[e.LOADING_MORE=4]="LOADING_MORE"}(cn||(cn={}));var hn=function(e){Object(j.a)(n,e);var t=Object(b.a)(n);function n(){var e;Object(f.a)(this,n);for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return(e=t.call.apply(t,[this].concat(a))).state={state:cn.INITIAL,standalone:!0,chartType:k.Hourglass,showErrorPopup:!1},e.chartRef=null,e.uploadedDataSource=new Ue,e.gedcomUrlDataSource=new Be,e.wikiTreeDataSource=new nn(e.props.intl),e.embeddedDataSource=new Ve,e.onSelection=function(t){if(!t.id.startsWith(Ct)){w("selection_changed");var n=e.props.location,r=v.parse(n.search);r.indi=t.id,r.gen=String(t.generation),n.search=v.stringify(r),e.props.history.push(n)}},e.onPrint=function(){w("print"),e.chartRef&&e.chartRef.print()},e.onDownloadPdf=Object(m.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w("download_pdf"),t.prev=1,t.t0=e.chartRef,!t.t0){t.next=6;break}return t.next=6,e.chartRef.downloadPdf();case 6:t.next=11;break;case 8:t.prev=8,t.t1=t.catch(1),e.showErrorPopup(e.props.intl.formatMessage({id:"error.failed_pdf",defaultMessage:"Failed to generate PDF file. Please try with a smaller diagram or download an SVG file."}));case 11:case"end":return t.stop()}}),t,null,[[1,8]])}))),e.onDownloadPng=Object(m.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w("download_png"),t.prev=1,t.t0=e.chartRef,!t.t0){t.next=6;break}return t.next=6,e.chartRef.downloadPng();case 6:t.next=11;break;case 8:t.prev=8,t.t1=t.catch(1),e.showErrorPopup(e.props.intl.formatMessage({id:"error.failed_png",defaultMessage:"Failed to generate PNG file. Please try with a smaller diagram or download an SVG file."}));case 11:case"end":return t.stop()}}),t,null,[[1,8]])}))),e.onDownloadSvg=function(){w("download_svg"),e.chartRef&&e.chartRef.downloadSvg()},e.onDismissErrorPopup=function(){e.setState(Object.assign({},e.state,{showErrorPopup:!1}))},e.renderMainArea=function(){switch(e.state.state){case cn.SHOWING_CHART:case cn.LOADING_MORE:return Object(P.jsxs)("div",{id:"content",children:[Object(P.jsx)(dn,{open:e.state.showErrorPopup,message:e.state.error,onDismiss:e.onDismissErrorPopup}),e.state.state===cn.LOADING_MORE?Object(P.jsx)(tt.a,{active:!0,size:"small",className:"loading-more"}):null,Object(P.jsx)(J,{data:e.state.data.chartData,selection:e.state.selection,chartType:e.state.chartType,onSelection:e.onSelection,freezeAnimation:e.state.freezeAnimation,ref:function(t){return e.chartRef=t}}),e.state.showSidePanel?Object(P.jsx)(S,{at:"large",className:"sidePanel",children:Object(P.jsx)(Ce,{gedcom:e.state.data.gedcom,indi:e.state.selection.id})}):null]});case cn.ERROR:return Object(P.jsx)(ln,{message:e.state.error});case cn.INITIAL:case cn.LOADING:return Object(P.jsx)(tt.a,{active:!0,size:"large"})}},e}return Object(g.a)(n,[{key:"updateDisplay",value:function(e,t){var n,r;(!this.state.selection||this.state.selection.id!==e.id||this.state.selection.generation!==e.generation||(n=this.state,(r=t)&&Object.entries(r).some((function(e){var t=Object(O.a)(e,2),r=t[0],a=t[1];return void 0!==a&&n[r]!==a}))))&&this.setState(Object.assign({},this.state,{selection:e},t))}},{key:"setError",value:function(e){this.setState(Object.assign({},this.state,{state:cn.ERROR,error:e}))}},{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"isNewData",value:function(e,t){if(!this.state.sourceSpec||this.state.sourceSpec.source!==e.source)return!0;var n={spec:e,selection:t},r={spec:this.state.sourceSpec,selection:this.state.selection};switch(n.spec.source){case q.UPLOADED:return this.uploadedDataSource.isNewData(n,r,this.state.data);case q.GEDCOM_URL:return this.gedcomUrlDataSource.isNewData(n,r,this.state.data);case q.WIKITREE:return this.wikiTreeDataSource.isNewData(n,r,this.state.data);case q.EMBEDDED:return this.embeddedDataSource.isNewData(n,r,this.state.data)}}},{key:"loadData",value:function(e,t){switch(e.source){case q.UPLOADED:return this.uploadedDataSource.loadData({spec:e,selection:t});case q.GEDCOM_URL:return this.gedcomUrlDataSource.loadData({spec:e,selection:t});case q.WIKITREE:return this.wikiTreeDataSource.loadData({spec:e,selection:t});case q.EMBEDDED:return this.embeddedDataSource.loadData({spec:e,selection:t})}}},{key:"componentDidUpdate",value:function(){var e=Object(m.a)(h.a.mark((function e(){var t,n,r,a,i,o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("/view"===this.props.location.pathname){e.next=3;break}return this.state.state!==cn.INITIAL&&this.setState(Object.assign({},this.state,{state:cn.INITIAL})),e.abrupt("return");case 3:if((t=pn(this.props.location)).sourceSpec){e.next=8;break}this.props.history.replace({pathname:"/"}),e.next=38;break;case 8:if(this.state.state!==cn.INITIAL&&!this.isNewData(t.sourceSpec,t.selection)){e.next=22;break}return this.setState(Object.assign({},this.state,{state:cn.LOADING,sourceSpec:t.sourceSpec,selection:t.selection,standalone:t.standalone,chartType:t.chartType})),e.prev=10,e.next=13,this.loadData(t.sourceSpec,t.selection);case 13:n=e.sent,this.setState(Object.assign({},this.state,{state:cn.SHOWING_CHART,data:n,selection:Le(n.chartData,t.selection),showSidePanel:t.showSidePanel})),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(10),this.setError((s=e.t0,c=this.props.intl,s instanceof ae?c.formatMessage({id:"error.".concat(s.code),defaultMessage:s.message},s.args):s.message));case 20:e.next=38;break;case 22:if(this.state.state!==cn.SHOWING_CHART&&this.state.state!==cn.LOADING_MORE){e.next=38;break}if(r=Le(this.state.data.chartData,t.selection),a=t.sourceSpec.source===q.WIKITREE&&(!this.state.selection||this.state.selection.id!==r.id),this.updateDisplay(r,{chartType:t.chartType,state:a?cn.LOADING_MORE:cn.SHOWING_CHART}),!a){e.next=38;break}return e.prev=27,e.next=30,qt(t.selection.id,this.props.intl);case 30:i=e.sent,o=Le(i.chartData,t.selection),this.setState(Object.assign({},this.state,{state:cn.SHOWING_CHART,data:i,selection:o})),e.next=38;break;case 35:e.prev=35,e.t1=e.catch(27),this.showErrorPopup(this.props.intl.formatMessage({id:"error.failed_wikitree_load_more",defaultMessage:"Failed to load data from WikiTree. {error}"},{error:e.t1}),{state:cn.SHOWING_CHART});case 38:case"end":return e.stop()}var s,c}),e,this,[[10,17],[27,35]])})));return function(){return e.apply(this,arguments)}}()},{key:"showErrorPopup",value:function(e,t){this.setState(Object.assign({},this.state,{showErrorPopup:!0,error:e},t))}},{key:"render",value:function(){var e=this;return Object(P.jsxs)(P.Fragment,{children:[Object(P.jsx)(nt.b,{render:function(t){var n,r;return Object(P.jsx)(un,Object(d.a)(Object(d.a)({},t),{},{data:e.state.data&&e.state.data.chartData,allowAllRelativesChart:(null===(n=e.state.sourceSpec)||void 0===n?void 0:n.source)!==q.WIKITREE,showingChart:"/view"===e.props.history.location.pathname&&(e.state.state===cn.SHOWING_CHART||e.state.state===cn.LOADING_MORE),standalone:e.state.standalone,eventHandlers:{onSelection:e.onSelection,onPrint:e.onPrint,onDownloadPdf:e.onDownloadPdf,onDownloadPng:e.onDownloadPng,onDownloadSvg:e.onDownloadSvg},showWikiTreeMenus:(null===(r=e.state.sourceSpec)||void 0===r?void 0:r.source)===q.WIKITREE}))}}),Object(P.jsxs)(nt.d,{children:[Object(P.jsx)(nt.b,{exact:!0,path:"/",component:Xe}),Object(P.jsx)(nt.b,{exact:!0,path:"/view",render:this.renderMainArea}),Object(P.jsx)(nt.a,{to:"/"})]})]})}}]),n}(r.Component),mn=n(252),fn=n(410),gn=(n(383),n(384),n(385),{cs:i,de:o,fr:s,it:c,pl:u,ru:l}),jn=navigator.language&&navigator.language.split(/[-_]/)[0],bn=Object(mn.a)();bn&&"ie"===bn.name?a.render(Object(P.jsx)("p",{children:"Topola Genealogy Viewer does not support Internet Explorer. Please try a different (modern) browser."}),document.querySelector("#root")):a.render(Object(P.jsx)(fn.a,{locale:jn,messages:gn[jn],children:Object(P.jsxs)(R,{children:[Object(P.jsx)("style",{children:I}),Object(P.jsx)(Je.a,{children:Object(P.jsx)(nt.b,{component:hn})})]})}),document.querySelector("#root"))}},[[386,1,3]]]);
|
|
//# sourceMappingURL=main.72fe0747.chunk.js.map
|