@blocknote/core 0.15.4 → 0.15.6

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.
@@ -1,8 +1,8 @@
1
- (function(d,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("prosemirror-model"),require("rehype-parse"),require("rehype-stringify"),require("unified"),require("@tiptap/core"),require("prosemirror-state"),require("uuid"),require("hast-util-from-dom"),require("@tiptap/extension-bold"),require("@tiptap/extension-code"),require("@tiptap/extension-italic"),require("@tiptap/extension-strike"),require("@tiptap/extension-underline"),require("@tiptap/extension-table-cell"),require("@tiptap/extension-table-header"),require("@tiptap/extension-table-row"),require("prosemirror-tables"),require("rehype-remark"),require("remark-gfm"),require("remark-stringify"),require("remark-parse"),require("remark-rehype"),require("prosemirror-view"),require("@tiptap/extension-collaboration"),require("@tiptap/extension-collaboration-cursor"),require("@tiptap/extension-dropcursor"),require("@tiptap/extension-gapcursor"),require("@tiptap/extension-hard-break"),require("@tiptap/extension-history"),require("@tiptap/extension-link"),require("@tiptap/extension-text")):typeof define=="function"&&define.amd?define(["exports","prosemirror-model","rehype-parse","rehype-stringify","unified","@tiptap/core","prosemirror-state","uuid","hast-util-from-dom","@tiptap/extension-bold","@tiptap/extension-code","@tiptap/extension-italic","@tiptap/extension-strike","@tiptap/extension-underline","@tiptap/extension-table-cell","@tiptap/extension-table-header","@tiptap/extension-table-row","prosemirror-tables","rehype-remark","remark-gfm","remark-stringify","remark-parse","remark-rehype","prosemirror-view","@tiptap/extension-collaboration","@tiptap/extension-collaboration-cursor","@tiptap/extension-dropcursor","@tiptap/extension-gapcursor","@tiptap/extension-hard-break","@tiptap/extension-history","@tiptap/extension-link","@tiptap/extension-text"],y):(d=typeof globalThis<"u"?globalThis:d||self,y(d.blocknote={},d.prosemirrorModel,d.rehypeParse,d.rehypeStringify,d.unified,d.core,d.prosemirrorState,d.uuid,d.hastUtilFromDom,d.Bold,d.Code,d.Italic,d.Strike,d.Underline,d.extensionTableCell,d.extensionTableHeader,d.extensionTableRow,d.prosemirrorTables,d.rehypeRemark,d.remarkGfm,d.remarkStringify,d.remarkParse,d.remarkRehype,d.prosemirrorView,d.Collaboration,d.CollaborationCursor,d.extensionDropcursor,d.extensionGapcursor,d.extensionHardBreak,d.extensionHistory,d.extensionLink,d.extensionText))})(this,function(d,y,K,xi,fe,b,_,Ei,ge,Si,Ci,Ti,Mi,Bi,Li,Ii,Pi,Ke,Ai,Ni,Hi,Di,qe,M,Ui,ji,Ri,zi,Oi,Vi,Fi,Gi){"use strict";var Kn=Object.defineProperty;var qn=(d,y,K)=>y in d?Kn(d,y,{enumerable:!0,configurable:!0,writable:!0,value:K}):d[y]=K;var u=(d,y,K)=>qn(d,typeof y!="symbol"?y+"":y,K);const S=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},We=S(K),$e=S(xi),Ki=S(Si),qi=S(Ci),Wi=S(Ti),$i=S(Mi),Xi=S(Bi),Zi=S(Ai),Xe=S(Ni),Ji=S(Hi),Yi=S(Di),Qi=S(qe),eo=S(Ui),to=S(ji),io={slash_menu:{heading:{title:"عنوان 1",subtext:"يستخدم لعناوين المستوى الأعلى",aliases:["ع","عنوان1","ع1"],group:"العناوين"},heading_2:{title:"عنوان 2",subtext:"يستخدم للأقسام الرئيسية",aliases:["ع2","عنوان2","عنوان فرعي"],group:"العناوين"},heading_3:{title:"عنوان 3",subtext:"يستخدم للأقسام الفرعية والعناوين المجموعة",aliases:["ع3","عنوان3","عنوان فرعي"],group:"العناوين"},numbered_list:{title:"قائمة مرقمة",subtext:"تستخدم لعرض قائمة مرقمة",aliases:["ق","عناصر قائمة","قائمة","قائمة مرقمة"],group:"الكتل الأساسية"},bullet_list:{title:"قائمة نقطية",subtext:"تستخدم لعرض قائمة غير مرتبة",aliases:["ق","عناصر قائمة","قائمة","قائمة نقطية"],group:"الكتل الأساسية"},check_list:{title:"قائمة تحقق",subtext:"تستخدم لعرض قائمة بمربعات التحقق",aliases:["قوائم غير مرتبة","عناصر قائمة","قائمة","قائمة تحقق","قائمة التحقق","قائمة مشطوبة","مربع التحقق"],group:"الكتل الأساسية"},paragraph:{title:"فقرة",subtext:"تستخدم لنص الوثيقة الأساسي",aliases:["ف","فقرة"],group:"الكتل الأساسية"},table:{title:"جدول",subtext:"يستخدم للجداول",aliases:["جدول"],group:"متقدم"},image:{title:"صورة",subtext:"إدراج صورة",aliases:["صورة","رفع صورة","تحميل","صورة","صورة","وسائط","رابط"],group:"وسائط"},video:{title:"فيديو",subtext:"إدراج فيديو",aliases:["فيديو","رفع فيديو","تحميل","فيديو","فيلم","وسائط","رابط"],group:"وسائط"},audio:{title:"صوت",subtext:"إدراج صوت",aliases:["صوت","رفع صوت","تحميل","صوت","صوت","وسائط","رابط"],group:"وسائط"},file:{title:"ملف",subtext:"إدراج ملف",aliases:["ملف","تحميل","تضمين","وسائط","رابط"],group:"وسائط"},emoji:{title:"الرموز التعبيرية",subtext:"تُستخدم لإدراج رمز تعبيري",aliases:["رمز تعبيري","إيموجي","إيموت","عاطفة","وجه"],group:"آخرون"}},placeholders:{default:"أدخل نصًا أو اكتب '/' للأوامر",heading:"عنوان",bulletListItem:"قائمة",numberedListItem:"قائمة",checkListItem:"قائمة"},file_blocks:{image:{add_button_text:"إضافة صورة"},video:{add_button_text:"إضافة فيديو"},audio:{add_button_text:"إضافة صوت"},file:{add_button_text:"إضافة ملف"}},side_menu:{add_block_label:"إضافة محتوي",drag_handle_label:"فتح قائمة المحتويات"},drag_handle:{delete_menuitem:"حذف",colors_menuitem:"ألوان"},table_handle:{delete_column_menuitem:"حذف عمود",delete_row_menuitem:"حذف صف",add_left_menuitem:"إضافة عمود إلى اليسار",add_right_menuitem:"إضافة عمود إلى اليمين",add_above_menuitem:"إضافة صف أعلى",add_below_menuitem:"إضافة صف أسفل"},suggestion_menu:{no_items_title:"لم يتم العثور على عناصر",loading:"جارٍ التحميل…"},color_picker:{text_title:"نص",background_title:"خلفية",colors:{default:"افتراضي",gray:"رمادي",brown:"بني",red:"أحمر",orange:"برتقالي",yellow:"أصفر",green:"أخضر",blue:"أزرق",purple:"أرجواني",pink:"وردي"}},formatting_toolbar:{bold:{tooltip:"عريض",secondary_tooltip:"Mod+B"},italic:{tooltip:"مائل",secondary_tooltip:"Mod+I"},underline:{tooltip:"تحته خط",secondary_tooltip:"Mod+U"},strike:{tooltip:"مشطوب",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"كود",secondary_tooltip:""},colors:{tooltip:"ألوان"},link:{tooltip:"إنشاء رابط",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"تحرير التسمية التوضيحية",input_placeholder:"تحرير التسمية التوضيحية"},file_replace:{tooltip:{image:"استبدال الصورة",video:"استبدال الفيديو",audio:"استبدال الصوت",file:"استبدال الملف"}},file_rename:{tooltip:{image:"إعادة تسمية الصورة",video:"إعادة تسمية الفيديو",audio:"إعادة تسمية الصوت",file:"إعادة تسمية الملف"},input_placeholder:{image:"إعادة تسمية الصورة",video:"إعادة تسمية الفيديو",audio:"إعادة تسمية الصوت",file:"إعادة تسمية الملف"}},file_download:{tooltip:{image:"تنزيل الصورة",video:"تنزيل الفيديو",audio:"تنزيل الصوت",file:"تنزيل الملف"}},file_delete:{tooltip:{image:"حذف الصورة",video:"حذف الفيديو",audio:"حذف الصوت",file:"حذف الملف"}},file_preview_toggle:{tooltip:"تبديل المعاينة"},nest:{tooltip:"محتويات متداخلة",secondary_tooltip:"Tab"},unnest:{tooltip:"إلغاء التداخل",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"محاذاة النص إلى اليسار"},align_center:{tooltip:"محاذاة النص في المنتصف"},align_right:{tooltip:"محاذاة النص إلى اليمين"},align_justify:{tooltip:"ضبط النص"}},file_panel:{upload:{title:"تحميل",file_placeholder:{image:"تحميل صورة",video:"تحميل فيديو",audio:"تحميل صوت",file:"تحميل ملف"},upload_error:"خطأ: فشل التحميل"},embed:{title:"تضمين",embed_button:{image:"تضمين صورة",video:"تضمين فيديو",audio:"تضمين صوت",file:"تضمين ملف"},url_placeholder:"أدخل الرابط"}},link_toolbar:{delete:{tooltip:"إزالة الرابط"},edit:{text:"تحرير الرابط",tooltip:"تحرير"},open:{tooltip:"فتح في تبويب جديد"},form:{title_placeholder:"تحرير العنوان",url_placeholder:"تحرير الرابط"}},generic:{ctrl_shortcut:"Ctrl"}},Ze={slash_menu:{heading:{title:"Heading 1",subtext:"Top-level heading",aliases:["h","heading1","h1"],group:"Headings"},heading_2:{title:"Heading 2",subtext:"Key section heading",aliases:["h2","heading2","subheading"],group:"Headings"},heading_3:{title:"Heading 3",subtext:"Subsection and group heading",aliases:["h3","heading3","subheading"],group:"Headings"},numbered_list:{title:"Numbered List",subtext:"List with ordered items",aliases:["ol","li","list","numberedlist","numbered list"],group:"Basic blocks"},bullet_list:{title:"Bullet List",subtext:"List with unordered items",aliases:["ul","li","list","bulletlist","bullet list"],group:"Basic blocks"},check_list:{title:"Check List",subtext:"List with checkboxes",aliases:["ul","li","list","checklist","check list","checked list","checkbox"],group:"Basic blocks"},paragraph:{title:"Paragraph",subtext:"The body of your document",aliases:["p","paragraph"],group:"Basic blocks"},table:{title:"Table",subtext:"Table with editable cells",aliases:["table"],group:"Advanced"},image:{title:"Image",subtext:"Resizable image with caption",aliases:["image","imageUpload","upload","img","picture","media","url"],group:"Media"},video:{title:"Video",subtext:"Resizable video with caption",aliases:["video","videoUpload","upload","mp4","film","media","url"],group:"Media"},audio:{title:"Audio",subtext:"Embedded audio with caption",aliases:["audio","audioUpload","upload","mp3","sound","media","url"],group:"Media"},file:{title:"File",subtext:"Embedded file",aliases:["file","upload","embed","media","url"],group:"Media"},emoji:{title:"Emoji",subtext:"Search for and insert an emoji",aliases:["emoji","emote","emotion","face"],group:"Others"}},placeholders:{default:"Enter text or type '/' for commands",heading:"Heading",bulletListItem:"List",numberedListItem:"List",checkListItem:"List"},file_blocks:{image:{add_button_text:"Add image"},video:{add_button_text:"Add video"},audio:{add_button_text:"Add audio"},file:{add_button_text:"Add file"}},side_menu:{add_block_label:"Add block",drag_handle_label:"Open block menu"},drag_handle:{delete_menuitem:"Delete",colors_menuitem:"Colors"},table_handle:{delete_column_menuitem:"Delete column",delete_row_menuitem:"Delete row",add_left_menuitem:"Add column left",add_right_menuitem:"Add column right",add_above_menuitem:"Add row above",add_below_menuitem:"Add row below"},suggestion_menu:{no_items_title:"No items found",loading:"Loading…"},color_picker:{text_title:"Text",background_title:"Background",colors:{default:"Default",gray:"Gray",brown:"Brown",red:"Red",orange:"Orange",yellow:"Yellow",green:"Green",blue:"Blue",purple:"Purple",pink:"Pink"}},formatting_toolbar:{bold:{tooltip:"Bold",secondary_tooltip:"Mod+B"},italic:{tooltip:"Italic",secondary_tooltip:"Mod+I"},underline:{tooltip:"Underline",secondary_tooltip:"Mod+U"},strike:{tooltip:"Strike",secondary_tooltip:"Mod+Shift+S"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Colors"},link:{tooltip:"Create link",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Edit caption",input_placeholder:"Edit caption"},file_replace:{tooltip:{image:"Replace image",video:"Replace video",audio:"Replace audio",file:"Replace file"}},file_rename:{tooltip:{image:"Rename image",video:"Rename video",audio:"Rename audio",file:"Rename file"},input_placeholder:{image:"Rename image",video:"Rename video",audio:"Rename audio",file:"Rename file"}},file_download:{tooltip:{image:"Download image",video:"Download video",audio:"Download audio",file:"Download file"}},file_delete:{tooltip:{image:"Delete image",video:"Delete video",audio:"Delete audio",file:"Delete file"}},file_preview_toggle:{tooltip:"Toggle preview"},nest:{tooltip:"Nest block",secondary_tooltip:"Tab"},unnest:{tooltip:"Unnest block",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Align text left"},align_center:{tooltip:"Align text center"},align_right:{tooltip:"Align text right"},align_justify:{tooltip:"Justify text"}},file_panel:{upload:{title:"Upload",file_placeholder:{image:"Upload image",video:"Upload video",audio:"Upload audio",file:"Upload file"},upload_error:"Error: Upload failed"},embed:{title:"Embed",embed_button:{image:"Embed image",video:"Embed video",audio:"Embed audio",file:"Embed file"},url_placeholder:"Enter URL"}},link_toolbar:{delete:{tooltip:"Remove link"},edit:{text:"Edit link",tooltip:"Edit"},open:{tooltip:"Open in new tab"},form:{title_placeholder:"Edit title",url_placeholder:"Edit URL"}},generic:{ctrl_shortcut:"Ctrl"}},oo=Object.freeze(Object.defineProperty({__proto__:null,ar:io,de:{slash_menu:{heading:{title:"Überschrift 1",subtext:"Hauptebene Überschrift",aliases:["h","überschrift1","h1"],group:"Überschriften"},heading_2:{title:"Überschrift 2",subtext:"Wichtige Abschnittsüberschrift",aliases:["h2","überschrift2","unterüberschrift"],group:"Überschriften"},heading_3:{title:"Überschrift 3",subtext:"Unterabschnitts- und Gruppenüberschrift",aliases:["h3","überschrift3","unterüberschrift"],group:"Überschriften"},numbered_list:{title:"Nummerierte Liste",subtext:"Liste mit nummerierten Elementen",aliases:["ol","li","liste","nummerierteliste","nummerierte liste"],group:"Grundlegende Blöcke"},bullet_list:{title:"Aufzählungsliste",subtext:"Liste mit unnummerierten Elementen",aliases:["ul","li","liste","aufzählungsliste","aufzählung liste"],group:"Grundlegende Blöcke"},check_list:{title:"Checkliste",subtext:"Liste mit Kontrollkästchen",aliases:["ul","li","liste","checkliste","check liste","geprüfte liste","kontrollkästchen"],group:"Grundlegende Blöcke"},paragraph:{title:"Absatz",subtext:"Der Hauptteil Ihres Dokuments",aliases:["p","absatz"],group:"Grundlegende Blöcke"},table:{title:"Tabelle",subtext:"Tabelle mit editierbaren Zellen",aliases:["tabelle"],group:"Erweitert"},image:{title:"Bild",subtext:"Größenveränderbares Bild mit Beschriftung",aliases:["bild","bildhochladen","hochladen","img","bild","medien","url"],group:"Medien"},video:{title:"Video",subtext:"Größenveränderbares Video mit Beschriftung",aliases:["video","videoupload","hochladen","mp4","film","medien","url"],group:"Medien"},audio:{title:"Audio",subtext:"Eingebettetes Audio mit Beschriftung",aliases:["audio","audioupload","hochladen","mp3","ton","medien","url"],group:"Medien"},file:{title:"Datei",subtext:"Eingebettete Datei",aliases:["datei","hochladen","einbetten","medien","url"],group:"Medien"},emoji:{title:"Emoji",subtext:"Nach Emoji suchen und einfügen",aliases:["emoji","emote","emotion","gesicht"],group:"Andere"}},placeholders:{default:"Text eingeben oder '/' für Befehle tippen",heading:"Überschrift",bulletListItem:"Liste",numberedListItem:"Liste",checkListItem:"Liste"},file_blocks:{image:{add_button_text:"Bild hinzufügen"},video:{add_button_text:"Video hinzufügen"},audio:{add_button_text:"Audio hinzufügen"},file:{add_button_text:"Datei hinzufügen"}},side_menu:{add_block_label:"Block hinzufügen",drag_handle_label:"Blockmenü öffnen"},drag_handle:{delete_menuitem:"Löschen",colors_menuitem:"Farben"},table_handle:{delete_column_menuitem:"Spalte löschen",delete_row_menuitem:"Zeile löschen",add_left_menuitem:"Spalte links hinzufügen",add_right_menuitem:"Spalte rechts hinzufügen",add_above_menuitem:"Zeile oberhalb hinzufügen",add_below_menuitem:"Zeile unterhalb hinzufügen"},suggestion_menu:{no_items_title:"Keine Elemente gefunden",loading:"Laden…"},color_picker:{text_title:"Text",background_title:"Hintergrund",colors:{default:"Standard",gray:"Grau",brown:"Braun",red:"Rot",orange:"Orange",yellow:"Gelb",green:"Grün",blue:"Blau",purple:"Lila",pink:"Rosa"}},formatting_toolbar:{bold:{tooltip:"Fett",secondary_tooltip:"Mod+B"},italic:{tooltip:"Kursiv",secondary_tooltip:"Mod+I"},underline:{tooltip:"Unterstrichen",secondary_tooltip:"Mod+U"},strike:{tooltip:"Durchgestrichen",secondary_tooltip:"Mod+Shift+S"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Farben"},link:{tooltip:"Link erstellen",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Beschriftung bearbeiten",input_placeholder:"Beschriftung bearbeiten"},file_replace:{tooltip:{image:"Bild ersetzen",video:"Video ersetzen",audio:"Audio ersetzen",file:"Datei ersetzen"}},file_rename:{tooltip:{image:"Bild umbenennen",video:"Video umbenennen",audio:"Audio umbenennen",file:"Datei umbenennen"},input_placeholder:{image:"Bild umbenennen",video:"Video umbenennen",audio:"Audio umbenennen",file:"Datei umbenennen"}},file_download:{tooltip:{image:"Bild herunterladen",video:"Video herunterladen",audio:"Audio herunterladen",file:"Datei herunterladen"}},file_delete:{tooltip:{image:"Bild löschen",video:"Video löschen",audio:"Audio löschen",file:"Datei löschen"}},file_preview_toggle:{tooltip:"Vorschau umschalten"},nest:{tooltip:"Block verschachteln",secondary_tooltip:"Tab"},unnest:{tooltip:"Block entnesten",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Text linksbündig"},align_center:{tooltip:"Text zentrieren"},align_right:{tooltip:"Text rechtsbündig"},align_justify:{tooltip:"Text Blocksatz"}},file_panel:{upload:{title:"Hochladen",file_placeholder:{image:"Bild hochladen",video:"Video hochladen",audio:"Audio hochladen",file:"Datei hochladen"},upload_error:"Fehler: Hochladen fehlgeschlagen"},embed:{title:"Einbetten",embed_button:{image:"Bild einbetten",video:"Video einbetten",audio:"Audio einbetten",file:"Datei einbetten"},url_placeholder:"URL eingeben"}},link_toolbar:{delete:{tooltip:"Link entfernen"},edit:{text:"Link bearbeiten",tooltip:"Bearbeiten"},open:{tooltip:"In neuem Tab öffnen"},form:{title_placeholder:"Titel bearbeiten",url_placeholder:"URL bearbeiten"}},generic:{ctrl_shortcut:"Strg"}},en:Ze,fr:{slash_menu:{heading:{title:"Titre 1",subtext:"Utilisé pour un titre de premier niveau",aliases:["h","titre1","h1"],group:"Titres"},heading_2:{title:"Titre 2",subtext:"Utilisé pour les sections clés",aliases:["h2","titre2","sous-titre"],group:"Titres"},heading_3:{title:"Titre 3",subtext:"Utilisé pour les sous-sections et les titres de groupe",aliases:["h3","titre3","sous-titre"],group:"Titres"},numbered_list:{title:"Liste Numérotée",subtext:"Utilisé pour afficher une liste numérotée",aliases:["ol","li","liste","listenumérotée","liste numérotée"],group:"Blocs de base"},bullet_list:{title:"Liste à Puces",subtext:"Utilisé pour afficher une liste non ordonnée",aliases:["ul","li","liste","listeàpuces","liste à puces"],group:"Blocs de base"},check_list:{title:"Liste de vérification",subtext:"Utilisé pour afficher une liste avec des cases à cocher",aliases:["ul","li","liste","liste de vérification","liste cochée","case à cocher"],group:"Blocs de base"},paragraph:{title:"Paragraphe",subtext:"Utilisé pour le corps de votre document",aliases:["p","paragraphe"],group:"Blocs de base"},table:{title:"Tableau",subtext:"Utilisé pour les tableaux",aliases:["tableau"],group:"Avancé"},image:{title:"Image",subtext:"Insérer une image",aliases:["image","uploadImage","télécharger","img","photo","média","url"],group:"Médias"},video:{title:"Vidéo",subtext:"Insérer une vidéo",aliases:["vidéo","téléchargerVidéo","téléverser","mp4","film","média","url"],group:"Média"},audio:{title:"Audio",subtext:"Insérer un audio",aliases:["audio","téléchargerAudio","téléverser","mp3","son","média","url"],group:"Média"},file:{title:"Fichier",subtext:"Insérer un fichier",aliases:["fichier","téléverser","intégrer","média","url"],group:"Média"},emoji:{title:"Emoji",subtext:"Utilisé pour insérer un emoji",aliases:["emoji","émoticône","émotion","visage"],group:"Autres"}},placeholders:{default:"Entrez du texte ou tapez '/' pour les commandes",heading:"Titre",bulletListItem:"Liste",numberedListItem:"Liste",checkListItem:"Liste"},file_blocks:{image:{add_button_text:"Ajouter une image"},video:{add_button_text:"Ajouter une vidéo"},audio:{add_button_text:"Ajouter un audio"},file:{add_button_text:"Ajouter un fichier"}},side_menu:{add_block_label:"Ajouter un bloc",drag_handle_label:"Ouvrir le menu du bloc"},drag_handle:{delete_menuitem:"Supprimer",colors_menuitem:"Couleurs"},table_handle:{delete_column_menuitem:"Supprimer la colonne",delete_row_menuitem:"Supprimer la ligne",add_left_menuitem:"Ajouter une colonne à gauche",add_right_menuitem:"Ajouter une colonne à droite",add_above_menuitem:"Ajouter une ligne au-dessus",add_below_menuitem:"Ajouter une ligne en dessous"},suggestion_menu:{no_items_title:"Aucun élément trouvé",loading:"Chargement…"},color_picker:{text_title:"Texte",background_title:"Fond",colors:{default:"Défaut",gray:"Gris",brown:"Marron",red:"Rouge",orange:"Orange",yellow:"Jaune",green:"Vert",blue:"Bleu",purple:"Violet",pink:"Rose"}},formatting_toolbar:{bold:{tooltip:"Gras",secondary_tooltip:"Mod+B"},italic:{tooltip:"Italique",secondary_tooltip:"Mod+I"},underline:{tooltip:"Souligner",secondary_tooltip:"Mod+U"},strike:{tooltip:"Barré",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Couleurs"},link:{tooltip:"Créer un lien",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Modifier la légende",input_placeholder:"Modifier la légende"},file_replace:{tooltip:{image:"Remplacer l'image",video:"Remplacer la vidéo",audio:"Remplacer l'audio",file:"Remplacer le fichier"}},file_rename:{tooltip:{image:"Renommer l'image",video:"Renommer la vidéo",audio:"Renommer l'audio",file:"Renommer le fichier"},input_placeholder:{image:"Renommer l'image",video:"Renommer la vidéo",audio:"Renommer l'audio",file:"Renommer le fichier"}},file_download:{tooltip:{image:"Télécharger l'image",video:"Télécharger la vidéo",audio:"Télécharger l'audio",file:"Télécharger le fichier"}},file_delete:{tooltip:{image:"Supprimer l'image",video:"Supprimer la vidéo",audio:"Supprimer l'audio",file:"Supprimer le fichier"}},file_preview_toggle:{tooltip:"Basculer l'aperçu"},nest:{tooltip:"Emboîter le bloc",secondary_tooltip:"Tab"},unnest:{tooltip:"Démboîter le bloc",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Aligner le texte à gauche"},align_center:{tooltip:"Aligner le texte au centre"},align_right:{tooltip:"Aligner le texte à droite"},align_justify:{tooltip:"Justifier le texte"}},file_panel:{upload:{title:"Télécharger",file_placeholder:{image:"Télécharger une image",video:"Télécharger une vidéo",audio:"Télécharger un fichier audio",file:"Télécharger un fichier"},upload_error:"Erreur : Échec du téléchargement"},embed:{title:"Intégrer",embed_button:{image:"Intégrer une image",video:"Intégrer une vidéo",audio:"Intégrer un fichier audio",file:"Intégrer un fichier"},url_placeholder:"Entrez l'URL"}},link_toolbar:{delete:{tooltip:"Supprimer le lien"},edit:{text:"Modifier le lien",tooltip:"Modifier"},open:{tooltip:"Ouvrir dans un nouvel onglet"},form:{title_placeholder:"Modifier le titre",url_placeholder:"Modifier l'URL"}},generic:{ctrl_shortcut:"Ctrl"}},is:{slash_menu:{heading:{title:"Fyrirsögn 1",subtext:"Notað fyrir efstu fyrirsögn",aliases:["h","fyrirsogn1","h1"],group:"Fyrirsagnir"},heading_2:{title:"Fyrirsögn 2",subtext:"Notað fyrir lykilhluta",aliases:["h2","fyrirsogn2","undirfyrirsogn"],group:"Fyrirsagnir"},heading_3:{title:"Fyrirsögn 3",subtext:"Notað fyrir undirhluta og hópfyrirsagnir",aliases:["h3","fyrirsogn3","undirfyrirsogn"],group:"Fyrirsagnir"},numbered_list:{title:"Númeruð listi",subtext:"Notað til að birta númeraðan lista",aliases:["ol","li","listi","numeradurlisti"],group:"Grunnblokkar"},bullet_list:{title:"Punktalisti",subtext:"Notað til að birta óraðaðan lista",aliases:["ul","li","listi","punktalisti"],group:"Grunnblokkar"},check_list:{title:"Athugunarlisti",subtext:"Notað til að sýna lista með gátreitum",aliases:["ul","li","listi","athugunarlisti","merktur listi"],group:"Grunnblokkar"},paragraph:{title:"Málsgrein",subtext:"Notað fyrir meginmál skjalsins",aliases:["p","malsgrein"],group:"Grunnblokkar"},table:{title:"Tafla",subtext:"Notað fyrir töflur",aliases:["tafla"],group:"Ítarlegt"},image:{title:"Mynd",subtext:"Settu inn mynd",aliases:["mynd","myndaupphlaed","upphlaed","img","mynd","media","url"],group:"Miðlar"},video:{title:"Myndband",subtext:"Setja inn myndband",aliases:["myndband","videoUpphala","hlaða upp","mp4","kvikmynd","miðill","url"],group:"Miðill"},audio:{title:"Hljóð",subtext:"Setja inn hljóð",aliases:["hljóð","audioUpphala","hlaða upp","mp3","hljóð","miðill","url"],group:"Miðlar"},file:{title:"Skrá",subtext:"Setja inn skrá",aliases:["skrá","hlaða upp","fella inn","miðill","url"],group:"Miðlar"},emoji:{title:"Emoji",subtext:"Notað til að setja inn smámynd",aliases:["emoji","andlitsávísun","tilfinningar","andlit"],group:"Annað"}},placeholders:{default:"Sláðu inn texta eða skrifaðu '/' fyrir skipanir",heading:"Fyrirsögn",bulletListItem:"Listi",numberedListItem:"Listi",checkListItem:"Listi"},file_blocks:{image:{add_button_text:"Bæta við mynd"},video:{add_button_text:"Bæta við myndbandi"},audio:{add_button_text:"Bæta við hljóði"},file:{add_button_text:"Bæta við skrá"}},side_menu:{add_block_label:"Bæta við blokki",drag_handle_label:"Opna blokkarvalmynd"},drag_handle:{delete_menuitem:"Eyða",colors_menuitem:"Litir"},table_handle:{delete_column_menuitem:"Eyða dálki",delete_row_menuitem:"Eyða röð",add_left_menuitem:"Bæta dálki við til vinstri",add_right_menuitem:"Bæta dálki við til hægri",add_above_menuitem:"Bæta röð við fyrir ofan",add_below_menuitem:"Bæta röð við fyrir neðan"},suggestion_menu:{no_items_title:"Engir hlutir fundust",loading:"Hleður…"},color_picker:{text_title:"Texti",background_title:"Bakgrunnur",colors:{default:"Sjálfgefið",gray:"Grár",brown:"Brúnn",red:"Rauður",orange:"Appelsínugulur",yellow:"Gulur",green:"Grænn",blue:"Blár",purple:"Fjólublár",pink:"Bleikur"}},formatting_toolbar:{bold:{tooltip:"Feitletrað",secondary_tooltip:"Mod+B"},italic:{tooltip:"Skáletrað",secondary_tooltip:"Mod+I"},underline:{tooltip:"Undirstrikað",secondary_tooltip:"Mod+U"},strike:{tooltip:"Yfirstrikað",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Kóði",secondary_tooltip:""},colors:{tooltip:"Litir"},link:{tooltip:"Búa til tengil",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Breyta myndatexta",input_placeholder:"Breyta myndatexta"},file_replace:{tooltip:{image:"Skipta um mynd",video:"Skipta um myndband",audio:"Skipta um hljóð",file:"Skipta um skrá"}},file_rename:{tooltip:{image:"Endurnefna mynd",video:"Endurnefna myndband",audio:"Endurnefna hljóð",file:"Endurnefna skrá"},input_placeholder:{image:"Endurnefna mynd",video:"Endurnefna myndband",audio:"Endurnefna hljóð",file:"Endurnefna skrá"}},file_download:{tooltip:{image:"Sækja mynd",video:"Sækja myndband",audio:"Sækja hljóð",file:"Sækja skrá"}},file_delete:{tooltip:{image:"Eyða mynd",video:"Eyða myndbandi",audio:"Eyða hljóði",file:"Eyða skrá"}},file_preview_toggle:{tooltip:"Skipta um forskoðun"},nest:{tooltip:"Fella blokk saman",secondary_tooltip:"Tab"},unnest:{tooltip:"Afþýða blokk",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Vinstrijafna texta"},align_center:{tooltip:"Miðjustilla texta"},align_right:{tooltip:"Hægrijafna texta"},align_justify:{tooltip:"Jafna texta"}},file_panel:{upload:{title:"Hlaða upp",file_placeholder:{image:"Hlaða upp mynd",video:"Hlaða upp myndband",audio:"Hlaða upp hljóð",file:"Hlaða upp skrá"},upload_error:"Villa: Upphleðsla mistókst"},embed:{title:"Innsetja",embed_button:{image:"Innsetja mynd",video:"Innsetja myndband",audio:"Innsetja hljóð",file:"Innsetja skrá"},url_placeholder:"Sláðu inn URL"}},link_toolbar:{delete:{tooltip:"Fjarlægja tengil"},edit:{text:"Breyta tengli",tooltip:"Breyta"},open:{tooltip:"Opna í nýjum flipa"},form:{title_placeholder:"Breyta titli",url_placeholder:"Breyta URL"}},generic:{ctrl_shortcut:"Ctrl"}},ja:{slash_menu:{heading:{title:"見出し1",subtext:"トップレベルの見出しに使用",aliases:["h","見出し1","h1","大見出し"],group:"見出し"},heading_2:{title:"見出し2",subtext:"重要なセクションに使用",aliases:["h2","見出し2","subheading","中見出し"],group:"見出し"},heading_3:{title:"見出し3",subtext:"セクションやグループの見出しに使用",aliases:["h3","見出し3","subheading","小見出し"],group:"見出し"},numbered_list:{title:"番号付リスト",subtext:"番号付リストを表示するために使用",aliases:["ol","li","numberedlist","numbered list","リスト","番号付リスト","番号 リスト"],group:"基本ブロック"},bullet_list:{title:"箇条書き",subtext:"箇条書きを表示するために使用",aliases:["ul","li","bulletlist","bullet list","リスト","箇条書きリスト"],group:"基本ブロック"},check_list:{title:"チェックリスト",subtext:"チェックボックス付きリストを表示するために使用されます",aliases:["ul","li","list","checklist","checked list","リスト","チェックリスト","チェックされたリスト"],group:"基本ブロック"},paragraph:{title:"標準テキスト",subtext:"本文に使用",aliases:["p","paragraph","標準テキスト"],group:"基本ブロック"},table:{title:"表",subtext:"表に使用",aliases:["table","表","テーブル"],group:"高度なブロック"},image:{title:"画像",subtext:"画像を挿入",aliases:["image","imageUpload","upload","img","picture","media","url","画像"],group:"メディア"},video:{title:"ビデオ",subtext:"ビデオを挿入",aliases:["video","videoUpload","upload","mp4","film","media","url","ビデオ"],group:"メディア"},audio:{title:"オーディオ",subtext:"オーディオを挿入",aliases:["audio","audioUpload","upload","mp3","sound","media","url","オーディオ"],group:"メディア"},file:{title:"ファイル",subtext:"ファイルを挿入",aliases:["file","upload","embed","media","url","ファイル"],group:"メディア"},emoji:{title:"絵文字",subtext:"絵文字を挿入するために使用します",aliases:["絵文字","顔文字","感情表現","顔"],group:"その他"}},placeholders:{default:"テキストを入力するか'/' を入力してコマンド選択",heading:"見出し",bulletListItem:"リストを追加",numberedListItem:"リストを追加",checkListItem:"リストを追加"},file_blocks:{image:{add_button_text:"画像を追加"},video:{add_button_text:"ビデオを追加"},audio:{add_button_text:"オーディオを追加"},file:{add_button_text:"ファイルを追加"}},side_menu:{add_block_label:"ブロックを追加",drag_handle_label:"ブロックメニュー"},drag_handle:{delete_menuitem:"削除",colors_menuitem:"色を変更"},table_handle:{delete_column_menuitem:"列を削除",delete_row_menuitem:"行を削除",add_left_menuitem:"左に列を追加",add_right_menuitem:"右に列を追加",add_above_menuitem:"上に行を追加",add_below_menuitem:"下に行を追加"},suggestion_menu:{no_items_title:"アイテムが見つかりません",loading:"読込中…"},color_picker:{text_title:"文字色",background_title:"背景色",colors:{default:"デフォルト",gray:"グレー",brown:"茶色",red:"赤",orange:"オレンジ",yellow:"黄色",green:"緑",blue:"青",purple:"紫",pink:"ピンク"}},formatting_toolbar:{bold:{tooltip:"太字",secondary_tooltip:"Mod+B"},italic:{tooltip:"斜体",secondary_tooltip:"Mod+I"},underline:{tooltip:"下線",secondary_tooltip:"Mod+U"},strike:{tooltip:"打ち消し",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"コード",secondary_tooltip:""},colors:{tooltip:"色"},link:{tooltip:"リンク",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"キャプションを編集",input_placeholder:"キャプションを編集"},file_replace:{tooltip:{image:"画像を置換",video:"ビデオを置換",audio:"オーディオを置換",file:"ファイルを置換"}},file_rename:{tooltip:{image:"画像の名前を変更",video:"ビデオの名前を変更",audio:"オーディオの名前を変更",file:"ファイルの名前を変更"},input_placeholder:{image:"画像の名前を変更",video:"ビデオの名前を変更",audio:"オーディオの名前を変更",file:"ファイルの名前を変更"}},file_download:{tooltip:{image:"画像をダウンロード",video:"ビデオをダウンロード",audio:"オーディオをダウンロード",file:"ファイルをダウンロード"}},file_delete:{tooltip:{image:"画像を削除",video:"ビデオを削除",audio:"オーディオを削除",file:"ファイルを削除"}},file_preview_toggle:{tooltip:"プレビューの切り替え"},nest:{tooltip:"インデント増",secondary_tooltip:"Tab"},unnest:{tooltip:"インデント減",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"左揃え"},align_center:{tooltip:"中央揃え"},align_right:{tooltip:"右揃え"},align_justify:{tooltip:"両端揃え"}},file_panel:{upload:{title:"アップロード",file_placeholder:{image:"画像をアップロード",video:"ビデオをアップロード",audio:"オーディオをアップロード",file:"ファイルをアップロード"},upload_error:"エラー: アップロードが失敗しました"},embed:{title:"埋め込み",embed_button:{image:"画像を埋め込む",video:"ビデオを埋め込む",audio:"オーディオを埋め込む",file:"ファイルを埋め込む"},url_placeholder:"URLを入力"}},link_toolbar:{delete:{tooltip:"リンクを解除"},edit:{text:"リンクを編集",tooltip:"編集"},open:{tooltip:"新しいタブでリンクを開く"},form:{title_placeholder:"タイトルを編集",url_placeholder:"URLを編集"}},generic:{ctrl_shortcut:"Ctrl"}},ko:{slash_menu:{heading:{title:"제목1",subtext:"섹션 제목(대)",aliases:["h","제목1","h1","대제목"],group:"제목"},heading_2:{title:"제목2",subtext:"섹션 제목(중)",aliases:["h2","제목2","중제목"],group:"제목"},heading_3:{title:"제목3",subtext:"섹션 제목(소)",aliases:["h3","제목3","subheading"],group:"제목"},numbered_list:{title:"번호 매기기 목록",subtext:"번호가 매겨진 목록을 추가합니다.",aliases:["ol","li","목록","번호 매기기 목록","번호 목록"],group:"기본 블록"},bullet_list:{title:"글머리 기호 목록",subtext:"간단한 글머리 기호를 추가합니다.",aliases:["ul","li","목록","글머리 기호 목록","글머리 목록"],group:"기본 블록"},check_list:{title:"체크리스트",subtext:"체크박스가 있는 목록을 표시하는 데 사용",aliases:["ul","li","목록","체크리스트","체크 리스트","체크된 목록","체크박스"],group:"기본 블록"},paragraph:{title:"본문",subtext:"일반 텍스트",aliases:["p","paragraph","본문"],group:"기본 블록"},table:{title:"표",subtext:"간단한 표를 추가합니다.",aliases:["표"],group:"고급"},image:{title:"이미지",subtext:"이미지 파일을 업로드합니다.",aliases:["image","imageUpload","upload","img","picture","media","이미지","url"],group:"미디어"},video:{title:"비디오",subtext:"비디오 삽입",aliases:["video","videoUpload","upload","mp4","film","media","동영상","url"],group:"미디어"},audio:{title:"오디오",subtext:"오디오 삽입",aliases:["audio","audioUpload","upload","mp3","sound","media","오디오","url"],group:"미디어"},file:{title:"파일",subtext:"파일 삽입",aliases:["file","upload","embed","media","파일","url"],group:"미디어"},emoji:{title:"이모지",subtext:"이모지 삽입용으로 사용됩니다",aliases:["이모지","emoji","감정 표현","emotion expression","표정","face expression","얼굴","face"],group:"기타"}},placeholders:{default:"텍스트를 입력하거나 /를 입력하여 명령을 입력하세요.",heading:"제목",bulletListItem:"목록",numberedListItem:"목록",checkListItem:"목록"},file_blocks:{image:{add_button_text:"이미지 추가"},video:{add_button_text:"비디오 추가"},audio:{add_button_text:"오디오 추가"},file:{add_button_text:"파일 추가"}},side_menu:{add_block_label:"블록 추가",drag_handle_label:"블록 메뉴 열기"},drag_handle:{delete_menuitem:"삭제",colors_menuitem:"색깔"},table_handle:{delete_column_menuitem:"열 1개 삭제",delete_row_menuitem:"행 삭제",add_left_menuitem:"왼쪽에 열 1개 추가",add_right_menuitem:"오른쪽에 열 1개 추가",add_above_menuitem:"위에 행 1개 추가",add_below_menuitem:"아래에 행 1개 추가"},suggestion_menu:{no_items_title:"항목을 찾을 수 없음",loading:"로딩 중…"},color_picker:{text_title:"텍스트",background_title:"배경",colors:{default:"기본",gray:"회색",brown:"갈색",red:"빨간색",orange:"주황색",yellow:"노란색",green:"녹색",blue:"파란색",purple:"보라색",pink:"분홍색"}},formatting_toolbar:{bold:{tooltip:"진하게",secondary_tooltip:"Mod+B"},italic:{tooltip:"기울임",secondary_tooltip:"Mod+I"},underline:{tooltip:"밑줄",secondary_tooltip:"Mod+U"},strike:{tooltip:"취소선",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"코드",secondary_tooltip:""},colors:{tooltip:"색깔"},link:{tooltip:"링크 만들기",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"이미지 캡션 수정",input_placeholder:"이미지 캡션 수정"},file_replace:{tooltip:{image:"이미지 교체",video:"비디오 교체",audio:"오디오 교체",file:"파일 교체"}},file_rename:{tooltip:{image:"이미지 이름 변경",video:"비디오 이름 변경",audio:"오디오 이름 변경",file:"파일 이름 변경"},input_placeholder:{image:"이미지 이름 변경",video:"비디오 이름 변경",audio:"오디오 이름 변경",file:"파일 이름 변경"}},file_download:{tooltip:{image:"이미지 다운로드",video:"비디오 다운로드",audio:"오디오 다운로드",file:"파일 다운로드"}},file_delete:{tooltip:{image:"이미지 삭제",video:"비디오 삭제",audio:"오디오 삭제",file:"파일 삭제"}},file_preview_toggle:{tooltip:"미리보기 전환"},nest:{tooltip:"중첩 블록",secondary_tooltip:"Tab"},unnest:{tooltip:"비중첩 블록",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"텍스트 왼쪽 맞춤"},align_center:{tooltip:"텍스트 가운데 맞춤"},align_right:{tooltip:"텍스트 오른쪽 맞춤"},align_justify:{tooltip:"텍스트 양쪽 맞춤"}},file_panel:{upload:{title:"업로드",file_placeholder:{image:"이미지 업로드",video:"비디오 업로드",audio:"오디오 업로드",file:"파일 업로드"},upload_error:"오류: 업로드 실패"},embed:{title:"임베드",embed_button:{image:"이미지 삽입",video:"비디오 삽입",audio:"오디오 삽입",file:"파일 삽입"},url_placeholder:"URL을 입력하세요."}},link_toolbar:{delete:{tooltip:"링크 삭제"},edit:{text:"링크 수정",tooltip:"수정"},open:{tooltip:"새 탭으로 열기"},form:{title_placeholder:"제목 수정",url_placeholder:"URL 수정"}},generic:{ctrl_shortcut:"Ctrl"}},nl:{slash_menu:{heading:{title:"Kop 1",subtext:"Gebruikt voor een hoofdkop",aliases:["h","kop1","h1"],group:"Koppen"},heading_2:{title:"Kop 2",subtext:"Gebruikt voor belangrijke secties",aliases:["h2","kop2","subkop"],group:"Koppen"},heading_3:{title:"Kop 3",subtext:"Gebruikt voor subsecties en groepskoppen",aliases:["h3","kop3","subkop"],group:"Koppen"},numbered_list:{title:"Genummerde Lijst",subtext:"Gebruikt om een genummerde lijst weer te geven",aliases:["ol","li","lijst","genummerdelijst","genummerde lijst"],group:"Basisblokken"},bullet_list:{title:"Puntenlijst",subtext:"Gebruikt om een ongeordende lijst weer te geven",aliases:["ul","li","lijst","puntenlijst","punten lijst"],group:"Basisblokken"},check_list:{title:"Controlelijst",subtext:"Gebruikt om een lijst met selectievakjes weer te geven",aliases:["ul","li","lijst","aangevinkte lijst","selectievakje"],group:"Basisblokken"},paragraph:{title:"Paragraaf",subtext:"Gebruikt voor de hoofdtekst van uw document",aliases:["p","paragraaf"],group:"Basisblokken"},table:{title:"Tabel",subtext:"Gebruikt voor tabellen",aliases:["tabel"],group:"Geavanceerd"},image:{title:"Afbeelding",subtext:"Voeg een afbeelding in",aliases:["afbeelding","imageUpload","upload","img","foto","media","url"],group:"Media"},video:{title:"Video",subtext:"Voeg een video in",aliases:["video","videoUploaden","upload","mp4","film","media","url","drive","dropbox"],group:"Media"},audio:{title:"Audio",subtext:"Voeg audio in",aliases:["audio","audioUploaden","upload","mp3","geluid","media","url"],group:"Media"},file:{title:"Bestand",subtext:"Voeg een bestand in",aliases:["bestand","upload","insluiten","media","url"],group:"Media"},emoji:{title:"Emoji",subtext:"Gebruikt voor het invoegen van een emoji",aliases:["emoji","emotie-uitdrukking","gezichtsuitdrukking","gezicht"],group:"Overig"}},placeholders:{default:"Voer tekst in of type '/' voor commando's",heading:"Kop",bulletListItem:"Lijst",numberedListItem:"Lijst",checkListItem:"Lijst"},file_blocks:{image:{add_button_text:"Afbeelding toevoegen"},video:{add_button_text:"Video toevoegen"},audio:{add_button_text:"Audio toevoegen"},file:{add_button_text:"Bestand toevoegen"}},side_menu:{add_block_label:"Nieuw blok",drag_handle_label:"Open blok menu"},drag_handle:{delete_menuitem:"Verwijder",colors_menuitem:"Kleuren"},table_handle:{delete_column_menuitem:"Verwijder kolom",delete_row_menuitem:"Verwijder rij",add_left_menuitem:"Voeg kolom links toe",add_right_menuitem:"Voeg kolom rechts toe",add_above_menuitem:"Voeg rij boven toe",add_below_menuitem:"Voeg rij onder toe"},suggestion_menu:{no_items_title:"Geen items gevonden",loading:"Laden…"},color_picker:{text_title:"Tekst",background_title:"Achtergrond",colors:{default:"Standaard",gray:"Grijs",brown:"Bruin",red:"Rood",orange:"Oranje",yellow:"Geel",green:"Groen",blue:"Blauw",purple:"Paars",pink:"Roze"}},formatting_toolbar:{bold:{tooltip:"Vet",secondary_tooltip:"Mod+B"},italic:{tooltip:"Cursief",secondary_tooltip:"Mod+I"},underline:{tooltip:"Onderstrepen",secondary_tooltip:"Mod+U"},strike:{tooltip:"Doorstrepen",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Kleuren"},link:{tooltip:"Maak link",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Bewerk onderschrift",input_placeholder:"Bewerk onderschrift"},file_replace:{tooltip:{image:"Afbeelding vervangen",video:"Video vervangen",audio:"Audio vervangen",file:"Bestand vervangen"}},file_rename:{tooltip:{image:"Afbeelding hernoemen",video:"Video hernoemen",audio:"Audio hernoemen",file:"Bestand hernoemen"},input_placeholder:{image:"Afbeelding hernoemen",video:"Video hernoemen",audio:"Audio hernoemen",file:"Bestand hernoemen"}},file_download:{tooltip:{image:"Afbeelding downloaden",video:"Video downloaden",audio:"Audio downloaden",file:"Bestand downloaden"}},file_delete:{tooltip:{image:"Afbeelding verwijderen",video:"Video verwijderen",audio:"Audio verwijderen",file:"Bestand verwijderen"}},file_preview_toggle:{tooltip:"Voorbeeldschakelaar"},nest:{tooltip:"Nest blok",secondary_tooltip:"Tab"},unnest:{tooltip:"Ontnest blok",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Tekst links uitlijnen"},align_center:{tooltip:"Tekst centreren"},align_right:{tooltip:"Tekst rechts uitlijnen"},align_justify:{tooltip:"Tekst uitvullen"}},file_panel:{upload:{title:"Upload",file_placeholder:{image:"Afbeelding uploaden",video:"Video uploaden",audio:"Audio uploaden",file:"Bestand uploaden"},upload_error:"Fout: Upload mislukt"},embed:{title:"Insluiten",embed_button:{image:"Afbeelding insluiten",video:"Video insluiten",audio:"Audio insluiten",file:"Bestand insluiten"},url_placeholder:"Voer URL in"}},link_toolbar:{delete:{tooltip:"Verwijder link"},edit:{text:"Bewerk link",tooltip:"Bewerk"},open:{tooltip:"Open in nieuw tabblad"},form:{title_placeholder:"Bewerk titel",url_placeholder:"Bewerk URL"}},generic:{ctrl_shortcut:"Ctrl"}},pl:{slash_menu:{heading:{title:"Nagłówek 1",subtext:"Używany dla nagłówka najwyższego poziomu",aliases:["h","naglowek1","h1"],group:"Nagłówki"},heading_2:{title:"Nagłówek 2",subtext:"Używany dla kluczowych sekcji",aliases:["h2","naglowek2","podnaglowek"],group:"Nagłówki"},heading_3:{title:"Nagłówek 3",subtext:"Używany dla podsekcji i grup nagłówków",aliases:["h3","naglowek3","podnaglowek"],group:"Nagłówki"},numbered_list:{title:"Lista numerowana",subtext:"Używana do wyświetlania listy numerowanej",aliases:["ol","li","lista","numerowana lista"],group:"Podstawowe bloki"},bullet_list:{title:"Lista punktowana",subtext:"Używana do wyświetlania listy bez numeracji",aliases:["ul","li","lista","punktowana lista"],group:"Podstawowe bloki"},check_list:{title:"Lista z polami wyboru",subtext:"Używana do wyświetlania listy z polami wyboru",aliases:["ul","li","lista","lista z polami wyboru","pole wyboru"],group:"Podstawowe bloki"},paragraph:{title:"Akapit",subtext:"Używany dla treści dokumentu",aliases:["p","akapit"],group:"Podstawowe bloki"},table:{title:"Tabela",subtext:"Używana do tworzenia tabel",aliases:["tabela"],group:"Zaawansowane"},image:{title:"Zdjęcie",subtext:"Wstaw zdjęcie",aliases:["obraz","wrzućZdjęcie","wrzuć","img","zdjęcie","media","url"],group:"Media"},video:{title:"Wideo",subtext:"Wstaw wideo",aliases:["wideo","wrzućWideo","wrzuć","mp4","film","media","url"],group:"Media"},audio:{title:"Audio",subtext:"Wstaw audio",aliases:["audio","wrzućAudio","wrzuć","mp3","dźwięk","media","url"],group:"Media"},file:{title:"Plik",subtext:"Wstaw plik",aliases:["plik","wrzuć","wstaw","media","url"],group:"Media"},emoji:{title:"Emoji",subtext:"Używane do wstawiania emoji",aliases:["emoji","emotka","wyrażenie emocji","twarz"],group:"Inne"}},placeholders:{default:"Wprowadź tekst lub wpisz '/' aby użyć poleceń",heading:"Nagłówek",bulletListItem:"Lista",numberedListItem:"Lista",checkListItem:"Lista"},file_blocks:{image:{add_button_text:"Dodaj zdjęcie"},video:{add_button_text:"Dodaj wideo"},audio:{add_button_text:"Dodaj audio"},file:{add_button_text:"Dodaj plik"}},side_menu:{add_block_label:"Dodaj blok",drag_handle_label:"Otwórz menu bloków"},drag_handle:{delete_menuitem:"Usuń",colors_menuitem:"Kolory"},table_handle:{delete_column_menuitem:"Usuń kolumnę",delete_row_menuitem:"Usuń wiersz",add_left_menuitem:"Dodaj kolumnę po lewej",add_right_menuitem:"Dodaj kolumnę po prawej",add_above_menuitem:"Dodaj wiersz powyżej",add_below_menuitem:"Dodaj wiersz poniżej"},suggestion_menu:{no_items_title:"Nie znaleziono elementów",loading:"Ładowanie…"},color_picker:{text_title:"Tekst",background_title:"Tło",colors:{default:"Domyślny",gray:"Szary",brown:"Brązowy",red:"Czerwony",orange:"Pomarańczowy",yellow:"Żółty",green:"Zielony",blue:"Niebieski",purple:"Fioletowy",pink:"Różowy"}},formatting_toolbar:{bold:{tooltip:"Pogrubienie",secondary_tooltip:"Mod+B"},italic:{tooltip:"Kursywa",secondary_tooltip:"Mod+I"},underline:{tooltip:"Podkreślenie",secondary_tooltip:"Mod+U"},strike:{tooltip:"Przekreślenie",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Kod",secondary_tooltip:""},colors:{tooltip:"Kolory"},link:{tooltip:"Utwórz link",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Zmień podpis",input_placeholder:"Zmień podpis"},file_replace:{tooltip:{image:"Zmień obraz",video:"Zmień wideo",audio:"Zmień audio",file:"Zmień plik"}},file_rename:{tooltip:{image:"Zmień nazwę zdjęcia",video:"Zmień nazwę wideo",audio:"Zmień nazwę audio",file:"Zmień nazwę pliku"},input_placeholder:{image:"Zmień nazwę zdjęcia",video:"Zmień nazwę wideo",audio:"Zmień nazwę audio",file:"Zmień nazwę pliku"}},file_download:{tooltip:{image:"Pobierz zdjęcie",video:"Pobierz wideo",audio:"Pobierz audio",file:"Pobierz plik"}},file_delete:{tooltip:{image:"Usuń zdjęcie",video:"Usuń wideo",audio:"Usuń audio",file:"Usuń plik"}},file_preview_toggle:{tooltip:"Przełącz podgląd"},nest:{tooltip:"Zagnieźdź blok",secondary_tooltip:"Tab"},unnest:{tooltip:"Odgagnieźdź blok",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Wyrównaj tekst do lewej"},align_center:{tooltip:"Wyśrodkuj tekst"},align_right:{tooltip:"Wyrównaj tekst do prawej"},align_justify:{tooltip:"Wyjustuj tekst"}},file_panel:{upload:{title:"Wrzuć",file_placeholder:{image:"Wrzuć zdjęcie",video:"Wrzuć wideo",audio:"Wrzuć audio",file:"Wrzuć plik"},upload_error:"Błąd: Przesyłanie nie powiodło się"},embed:{title:"Wstaw",embed_button:{image:"Wstaw zdjęice",video:"Wstaw wideo",audio:"Wstaw audio",file:"Wstaw plik"},url_placeholder:"Wprowadź URL"}},link_toolbar:{delete:{tooltip:"Usuń link"},edit:{text:"Edytuj link",tooltip:"Edytuj"},open:{tooltip:"Otwórz w nowej karcie"},form:{title_placeholder:"Edytuj tytuł",url_placeholder:"Edytuj URL"}},generic:{ctrl_shortcut:"Ctrl"}},pt:{slash_menu:{heading:{title:"Título",subtext:"Usado para um título de nível superior",aliases:["h","titulo1","h1"],group:"Títulos"},heading_2:{title:"Título 2",subtext:"Usado para seções principais",aliases:["h2","titulo2","subtitulo"],group:"Títulos"},heading_3:{title:"Título 3",subtext:"Usado para subseções e títulos de grupo",aliases:["h3","titulo3","subtitulo"],group:"Títulos"},numbered_list:{title:"Lista Numerada",subtext:"Usado para exibir uma lista numerada",aliases:["ol","li","lista","listanumerada","lista numerada"],group:"Blocos Básicos"},bullet_list:{title:"Lista com Marcadores",subtext:"Usado para exibir uma lista não ordenada",aliases:["ul","li","lista","listamarcadores","lista com marcadores"],group:"Blocos Básicos"},check_list:{title:"Lista de verificação",subtext:"Usado para exibir uma lista com caixas de seleção",aliases:["ul","li","lista","lista de verificação","lista marcada","caixa de seleção"],group:"Blocos Básicos"},paragraph:{title:"Parágrafo",subtext:"Usado para o corpo do seu documento",aliases:["p","paragrafo"],group:"Blocos Básicos"},table:{title:"Tabela",subtext:"Usado para tabelas",aliases:["tabela"],group:"Avançado"},image:{title:"Imagem",subtext:"Inserir uma imagem",aliases:["imagem","uploadImagem","upload","img","foto","media","url"],group:"Mídia"},video:{title:"Vídeo",subtext:"Inserir um vídeo",aliases:["vídeo","uploadVídeo","upload","mp4","filme","mídia","url"],group:"Mídia"},audio:{title:"Áudio",subtext:"Inserir um áudio",aliases:["áudio","uploadÁudio","upload","mp3","som","mídia","url"],group:"Mídia"},file:{title:"Arquivo",subtext:"Inserir um arquivo",aliases:["arquivo","upload","incorporar","mídia","url"],group:"Mídia"},emoji:{title:"Emoji",subtext:"Usado para inserir um emoji",aliases:["emoji","emoticon","expressão emocional","rosto"],group:"Outros"}},placeholders:{default:"Digite texto ou use '/' para comandos",heading:"Título",bulletListItem:"Lista",numberedListItem:"Lista",checkListItem:"Lista"},file_blocks:{image:{add_button_text:"Adicionar imagem"},video:{add_button_text:"Adicionar vídeo"},audio:{add_button_text:"Adicionar áudio"},file:{add_button_text:"Adicionar arquivo"}},side_menu:{add_block_label:"Adicionar bloco",drag_handle_label:"Abrir menu do bloco"},drag_handle:{delete_menuitem:"Excluir",colors_menuitem:"Cores"},table_handle:{delete_column_menuitem:"Excluir coluna",delete_row_menuitem:"Excluir linha",add_left_menuitem:"Adicionar coluna à esquerda",add_right_menuitem:"Adicionar coluna à direita",add_above_menuitem:"Adicionar linha acima",add_below_menuitem:"Adicionar linha abaixo"},suggestion_menu:{no_items_title:"Nenhum item encontrado",loading:"Carregando…"},color_picker:{text_title:"Texto",background_title:"Fundo",colors:{default:"Padrão",gray:"Cinza",brown:"Marrom",red:"Vermelho",orange:"Laranja",yellow:"Amarelo",green:"Verde",blue:"Azul",purple:"Roxo",pink:"Rosa"}},formatting_toolbar:{bold:{tooltip:"Negrito",secondary_tooltip:"Mod+B"},italic:{tooltip:"Itálico",secondary_tooltip:"Mod+I"},underline:{tooltip:"Sublinhado",secondary_tooltip:"Mod+U"},strike:{tooltip:"Riscado",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Código",secondary_tooltip:""},colors:{tooltip:"Cores"},link:{tooltip:"Criar link",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Editar legenda",input_placeholder:"Editar legenda"},file_replace:{tooltip:{image:"Substituir imagem",video:"Substituir vídeo",audio:"Substituir áudio",file:"Substituir arquivo"}},file_rename:{tooltip:{image:"Renomear imagem",video:"Renomear vídeo",audio:"Renomear áudio",file:"Renomear arquivo"},input_placeholder:{image:"Renomear imagem",video:"Renomear vídeo",audio:"Renomear áudio",file:"Renomear arquivo"}},file_download:{tooltip:{image:"Baixar imagem",video:"Baixar vídeo",audio:"Baixar áudio",file:"Baixar arquivo"}},file_delete:{tooltip:{image:"Excluir imagem",video:"Excluir vídeo",audio:"Excluir áudio",file:"Excluir arquivo"}},file_preview_toggle:{tooltip:"Alternar visualização"},nest:{tooltip:"Aninhar bloco",secondary_tooltip:"Tab"},unnest:{tooltip:"Desaninhar bloco",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Alinhar à esquerda"},align_center:{tooltip:"Alinhar ao centro"},align_right:{tooltip:"Alinhar à direita"},align_justify:{tooltip:"Justificar texto"}},file_panel:{upload:{title:"Upload",file_placeholder:{image:"Upload de imagem",video:"Upload de vídeo",audio:"Upload de áudio",file:"Upload de arquivo"},upload_error:"Erro: Falha no upload"},embed:{title:"Incorporar",embed_button:{image:"Incorporar imagem",video:"Incorporar vídeo",audio:"Incorporar áudio",file:"Incorporar arquivo"},url_placeholder:"Insira a URL"}},link_toolbar:{delete:{tooltip:"Remover link"},edit:{text:"Editar link",tooltip:"Editar"},open:{tooltip:"Abrir em nova aba"},form:{title_placeholder:"Editar título",url_placeholder:"Editar URL"}},generic:{ctrl_shortcut:"Ctrl"}},ru:{slash_menu:{heading:{title:"Заголовок 1 уровня",subtext:"Используется для заголовка верхнего уровня",aliases:["h","heading1","h1","заголовок1"],group:"Заголовки"},heading_2:{title:"Заголовок 2 уровня",subtext:"Используется для ключевых разделов",aliases:["h2","heading2","subheading","заголовок2","подзаголовок"],group:"Заголовки"},heading_3:{title:"Заголовок 3 уровня",subtext:"Используется для подразделов и групп",aliases:["h3","heading3","subheading","заголовок3","подзаголовок"],group:"Заголовки"},numbered_list:{title:"Нумерованный список",subtext:"Используется для отображения нумерованного списка",aliases:["ol","li","list","numberedlist","numbered list","список","нумерованный список"],group:"Базовые блоки"},bullet_list:{title:"Маркированный список",subtext:"Для отображения неупорядоченного списка.",aliases:["ul","li","list","bulletlist","bullet list","список","маркированный список"],group:"Базовые блоки"},check_list:{title:"Контрольный список",subtext:"Для отображения списка с флажками",aliases:["ul","li","list","checklist","check list","checked list","checkbox","список"],group:"Базовые блоки"},paragraph:{title:"Параграф",subtext:"Основной текст",aliases:["p","paragraph","параграф"],group:"Базовые блоки"},table:{title:"Таблица",subtext:"Используется для таблиц",aliases:["table","таблица"],group:"Продвинутый"},image:{title:"Картинка",subtext:"Вставить изображение",aliases:["image","imageUpload","upload","img","picture","media","url","загрузка","картинка","рисунок"],group:"Медиа"},video:{title:"Видео",subtext:"Вставить видео",aliases:["video","videoUpload","upload","mp4","film","media","url","загрузка","видео"],group:"Медиа"},audio:{title:"Аудио",subtext:"Вставить аудио",aliases:["audio","audioUpload","upload","mp3","sound","media","url","загрузка","аудио","звук","музыка"],group:"Медиа"},file:{title:"Файл",subtext:"Вставить файл",aliases:["file","upload","embed","media","url","загрузка","файл"],group:"Медиа"},emoji:{title:"Эмодзи",subtext:"Используется для вставки эмодзи",aliases:["эмодзи","смайлик","выражение эмоций","лицо"],group:"Прочее"}},placeholders:{default:"Ведите текст или введите «/» для команд",heading:"Заголовок",bulletListItem:"Список",numberedListItem:"Список",checkListItem:"Список"},file_blocks:{image:{add_button_text:"Добавить изображение"},video:{add_button_text:"Добавить видео"},audio:{add_button_text:"Добавить аудио"},file:{add_button_text:"Добавить файл"}},side_menu:{add_block_label:"Добавить блок",drag_handle_label:"Открыть меню блока"},drag_handle:{delete_menuitem:"Удалить",colors_menuitem:"Цвета"},table_handle:{delete_column_menuitem:"Удалить столбец",delete_row_menuitem:"Удалить строку",add_left_menuitem:"Добавить столбец слева",add_right_menuitem:"Добавить столбец справа",add_above_menuitem:"Добавить строку выше",add_below_menuitem:"Добавить строку ниже"},suggestion_menu:{no_items_title:"ничего не найдено",loading:"Загрузка…"},color_picker:{text_title:"Текст",background_title:"Задний фон",colors:{default:"По умолчинию",gray:"Серый",brown:"Коричневый",red:"Красный",orange:"Оранжевый",yellow:"Жёлтый",green:"Зелёный",blue:"Голубой",purple:"Фиолетовый",pink:"Розовый"}},formatting_toolbar:{bold:{tooltip:"Жирный",secondary_tooltip:"Mod+B"},italic:{tooltip:"Курсив",secondary_tooltip:"Mod+I"},underline:{tooltip:"Подчёркнутый",secondary_tooltip:"Mod+U"},strike:{tooltip:"Зачёркнутый",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Код",secondary_tooltip:""},colors:{tooltip:"Цвета"},link:{tooltip:"Создать ссылку",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Изменить подпись",input_placeholder:"Изменить подпись"},file_replace:{tooltip:{image:"Заменить изображение",video:"Заменить видео",audio:"Заменить аудио",file:"Заменить файл"}},file_rename:{tooltip:{image:"Переименовать изображение",video:"Переименовать видео",audio:"Переименовать аудио",file:"Переименовать файл"},input_placeholder:{image:"Переименовать изображение",video:"Переименовать видео",audio:"Переименовать аудио",file:"Переименовать файл"}},file_download:{tooltip:{image:"Скачать картинку",video:"Скачать видео",audio:"Скачать аудио",file:"Скачать файл"}},file_delete:{tooltip:{image:"Удалить картинку",video:"Удалить видео",audio:"Удалить аудио",file:"Скачать файл"}},file_preview_toggle:{tooltip:"Переключить предварительный просмотр"},nest:{tooltip:"Сдвинуть вправо",secondary_tooltip:"Tab"},unnest:{tooltip:"Сдвинуть влево",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Текст по левому краю"},align_center:{tooltip:"Текст по середине"},align_right:{tooltip:"Текст по правому краю"},align_justify:{tooltip:"По середине текст"}},file_panel:{upload:{title:"Загрузить",file_placeholder:{image:"Загрузить картинки",video:"Загрузить видео",audio:"Загрузить аудио",file:"Загрузить файл"},upload_error:"Ошибка: не удалось загрузить"},embed:{title:"Вставить",embed_button:{image:"Вставить картинку",video:"Вставить видео",audio:"Вставить аудио",file:"Вставить файл"},url_placeholder:"Введите URL"}},link_toolbar:{delete:{tooltip:"Удалить ссылку"},edit:{text:"Изменить ссылку",tooltip:"Редактировать"},open:{tooltip:"Открыть в новой вкладке"},form:{title_placeholder:"Изменить заголовок",url_placeholder:"Изменить URL"}},generic:{ctrl_shortcut:"Ctrl"}},vi:{slash_menu:{heading:{title:"Tiêu đề H1",subtext:"Sử dụng cho tiêu đề cấp cao nhất",aliases:["h","tieude1","dd1"],group:"Tiêu đề"},heading_2:{title:"Tiêu đề H2",subtext:"Sử dụng cho các phần chính",aliases:["h2","tieude2","tieudephu"],group:"Tiêu đề"},heading_3:{title:"Tiêu đề H3",subtext:"Sử dụng cho phụ đề và tiêu đề nhóm",aliases:["h3","tieude3","tieudephu"],group:"Tiêu đề"},numbered_list:{title:"Danh sách đánh số",subtext:"Sử dụng để hiển thị danh sách có đánh số",aliases:["ol","li","ds","danhsachdso","danh sach danh so"],group:"Khối cơ bản"},bullet_list:{title:"Danh sách",subtext:"Sử dụng để hiển thị danh sách không đánh số",aliases:["ul","li","ds","danhsach","danh sach"],group:"Khối cơ bản"},check_list:{title:"Danh sách kiểm tra",subtext:"Dùng để hiển thị danh sách có hộp kiểm",aliases:["ul","li","danh sach","danh sach kiem tra","danh sach da kiem tra","hop kiem"],group:"Khối cơ bản"},paragraph:{title:"Đoạn văn",subtext:"Sử dụng cho nội dung chính của tài liệu",aliases:["p","doanvan"],group:"Khối cơ bản"},table:{title:"Bảng",subtext:"Sử dụng để tạo bảng",aliases:["bang"],group:"Nâng cao"},image:{title:"Hình ảnh",subtext:"Chèn hình ảnh",aliases:["anh","tai-len-anh","tai-len","img","hinh","media","url"],group:"Phương tiện"},video:{title:"Video",subtext:"Chèn video",aliases:["video","tai-len-video","tai-len","mp4","phim","media","url"],group:"Phương tiện"},audio:{title:"Âm thanh",subtext:"Chèn âm thanh",aliases:["âm thanh","tai-len-am-thanh","tai-len","mp3","am thanh","media","url"],group:"Phương tiện"},file:{title:"Tệp",subtext:"Chèn tệp",aliases:["tep","tai-len","nhung","media","url"],group:"Phương tiện"},emoji:{title:"Biểu tượng cảm xúc",subtext:"Dùng để chèn biểu tượng cảm xúc",aliases:["biểu tượng cảm xúc","emoji","emoticon","cảm xúc expression","khuôn mặt","face"],group:"Khác"}},placeholders:{default:"Nhập văn bản hoặc gõ '/' để thêm định dạng",heading:"Tiêu đề",bulletListItem:"Danh sách",numberedListItem:"Danh sách",checkListItem:"Danh sách"},file_blocks:{image:{add_button_text:"Thêm ảnh"},video:{add_button_text:"Thêm video"},audio:{add_button_text:"Thêm âm thanh"},file:{add_button_text:"Thêm tệp"}},side_menu:{add_block_label:"Thêm khối",drag_handle_label:"Mở trình đơn khối"},drag_handle:{delete_menuitem:"Xóa",colors_menuitem:"Màu sắc"},table_handle:{delete_column_menuitem:"Xóa cột",delete_row_menuitem:"Xóa hàng",add_left_menuitem:"Thêm cột bên trái",add_right_menuitem:"Thêm cột bên phải",add_above_menuitem:"Thêm hàng phía trên",add_below_menuitem:"Thêm hàng phía dưới"},suggestion_menu:{no_items_title:"Không tìm thấy mục nào",loading:"Đang tải..."},color_picker:{text_title:"Văn bản",background_title:"Nền",colors:{default:"Mặc định",gray:"Xám",brown:"Nâu",red:"Đỏ",orange:"Cam",yellow:"Vàng",green:"Xanh lá",blue:"Xanh dương",purple:"Tím",pink:"Hồng"}},formatting_toolbar:{bold:{tooltip:"In đậm",secondary_tooltip:"Mod+B"},italic:{tooltip:"In nghiêng",secondary_tooltip:"Mod+I"},underline:{tooltip:"Gạch dưới",secondary_tooltip:"Mod+U"},strike:{tooltip:"Gạch ngang",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Màu sắc"},link:{tooltip:"Tạo liên kết",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Chỉnh sửa chú thích",input_placeholder:"Chỉnh sửa chú thích"},file_replace:{tooltip:{image:"Thay thế hình ảnh",video:"Thay thế video",audio:"Thay thế âm thanh",file:"Thay thế tệp"}},file_rename:{tooltip:{image:"Đổi tên hình ảnh",video:"Đổi tên video",audio:"Đổi tên âm thanh",file:"Đổi tên tệp"},input_placeholder:{image:"Đổi tên hình ảnh",video:"Đổi tên video",audio:"Đổi tên âm thanh",file:"Đổi tên tệp"}},file_download:{tooltip:{image:"Tải xuống hình ảnh",video:"Tải xuống video",audio:"Tải xuống âm thanh",file:"Tải xuống tệp"}},file_delete:{tooltip:{image:"Xóa hình ảnh",video:"Xóa video",audio:"Xóa âm thanh",file:"Xóa tệp"}},file_preview_toggle:{tooltip:"Chuyển đổi xem trước"},nest:{tooltip:"Lồng khối",secondary_tooltip:"Tab"},unnest:{tooltip:"Bỏ lồng khối",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Căn trái văn bản"},align_center:{tooltip:"Căn giữa văn bản"},align_right:{tooltip:"Căn phải văn bản"},align_justify:{tooltip:"Căn đều văn bản"}},file_panel:{upload:{title:"Tải lên",file_placeholder:{image:"Tải lên hình ảnh",video:"Tải lên video",audio:"Tải lên âm thanh",file:"Tải lên tệp"},upload_error:"Lỗi: Tải lên thất bại"},embed:{title:"Nhúng",embed_button:{image:"Nhúng hình ảnh",video:"Nhúng video",audio:"Nhúng âm thanh",file:"Nhúng tệp"},url_placeholder:"Nhập URL"}},link_toolbar:{delete:{tooltip:"Xóa liên kết"},edit:{text:"Chỉnh sửa liên kết",tooltip:"Chỉnh sửa"},open:{tooltip:"Mở trong tab mới"},form:{title_placeholder:"Chỉnh sửa tiêu đề",url_placeholder:"Chỉnh sửa URL"}},generic:{ctrl_shortcut:"Ctrl"}},zh:{slash_menu:{heading:{title:"一级标题",subtext:"用于顶级标题",aliases:["h","heading1","h1","标题","一级标题"],group:"标题"},heading_2:{title:"二级标题",subtext:"用于关键部分",aliases:["h2","heading2","subheading","标题","二级标题","副标题"],group:"标题"},heading_3:{title:"三级标题",subtext:"用于小节和分组标题",aliases:["h3","heading3","subheading","标题","三级标题"],group:"标题"},numbered_list:{title:"有序列表",subtext:"用于显示有序列表",aliases:["ol","li","list","numberedlist","numbered list","列表","有序列表"],group:"基础"},bullet_list:{title:"无序列表",subtext:"用于显示无序列表",aliases:["ul","li","list","bulletlist","bullet list","列表","无序列表"],group:"基础"},check_list:{title:"检查清单",subtext:"用于显示带有复选框的列表",aliases:["ul","li","checklist","checked list","列表","检查清单","勾选列表","复选框"],group:"基础"},paragraph:{title:"段落",subtext:"用于文档正文",aliases:["p","paragraph","text","正文"],group:"基础"},table:{title:"表格",subtext:"使用表格",aliases:["table","表格"],group:"高级功能"},image:{title:"图片",subtext:"插入图片",aliases:["图片","上传图片","上传","image","img","相册","媒体","url"],group:"媒体"},video:{title:"视频",subtext:"插入视频",aliases:["视频","视频上传","上传","video","mp4","电影","媒体","url","驱动","dropbox"],group:"媒体"},audio:{title:"音频",subtext:"插入音频",aliases:["音频","音频上传","上传","audio","mp3","声音","媒体","url","驱动","dropbox"],group:"媒体"},file:{title:"文件",subtext:"插入文件",aliases:["文件","上传","file","嵌入","媒体","url"],group:"媒体"},emoji:{title:"表情符号",subtext:"用于插入表情符号",aliases:["表情符号","emoji","face","emote","表情","表情表达","表情"],group:"其他"}},placeholders:{default:"输入 '/' 以使用命令",heading:"标题",bulletListItem:"列表",numberedListItem:"列表",checkListItem:"列表"},file_blocks:{image:{add_button_text:"添加图片"},video:{add_button_text:"添加视频"},audio:{add_button_text:"添加音频"},file:{add_button_text:"添加文件"}},side_menu:{add_block_label:"添加块",drag_handle_label:"打开菜单"},drag_handle:{delete_menuitem:"删除",colors_menuitem:"颜色"},table_handle:{delete_column_menuitem:"删除列",delete_row_menuitem:"删除行",add_left_menuitem:"左侧添加列",add_right_menuitem:"右侧添加列",add_above_menuitem:"上方添加行",add_below_menuitem:"下方添加行"},suggestion_menu:{no_items_title:"无匹配项",loading:"加载中…"},color_picker:{text_title:"文本",background_title:"背景色",colors:{default:"默认",gray:"灰色",brown:"棕色",red:"红色",orange:"橙色",yellow:"黄色",green:"绿色",blue:"蓝色",purple:"紫色",pink:"粉色"}},formatting_toolbar:{bold:{tooltip:"加粗",secondary_tooltip:"Mod+B"},italic:{tooltip:"斜体",secondary_tooltip:"Mod+I"},underline:{tooltip:"下划线",secondary_tooltip:"Mod+U"},strike:{tooltip:"删除线",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"代码标记",secondary_tooltip:""},colors:{tooltip:"颜色"},link:{tooltip:"添加链接",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"编辑标题",input_placeholder:"编辑标题"},file_replace:{tooltip:{image:"替换图片",video:"替换视频",audio:"替换音频",file:"替换文件"}},file_rename:{tooltip:{image:"重命名图片",video:"重命名视频",audio:"重命名音频",file:"重命名文件"},input_placeholder:{image:"重命名图片",video:"重命名视频",audio:"重命名音频",file:"重命名文件"}},file_download:{tooltip:{image:"下载图片",video:"下载视频",audio:"下载音频",file:"下载文件"}},file_delete:{tooltip:{image:"删除图片",video:"删除视频",audio:"删除音频",file:"删除文件"}},file_preview_toggle:{tooltip:"切换预览"},nest:{tooltip:"嵌套",secondary_tooltip:"Tab"},unnest:{tooltip:"取消嵌套",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"左对齐"},align_center:{tooltip:"居中"},align_right:{tooltip:"右对齐"},align_justify:{tooltip:"文本对齐"}},file_panel:{upload:{title:"上传",file_placeholder:{image:"上传图片",video:"上传视频",audio:"上传音频",file:"上传文件"},upload_error:"Error:上传失败"},embed:{title:"嵌入",embed_button:{image:"嵌入图片",video:"嵌入视频",audio:"嵌入音频",file:"嵌入文件"},url_placeholder:"输入图片地址"}},link_toolbar:{delete:{tooltip:"清除链接"},edit:{text:"编辑链接",tooltip:"编辑"},open:{tooltip:"新窗口打开"},form:{title_placeholder:"编辑标题",url_placeholder:"编辑链接地址"}},generic:{ctrl_shortcut:"Ctrl"}}},Symbol.toStringTag,{value:"Module"}));function no(e,t=JSON.stringify){const i={};return e.filter(o=>{const n=t(o);return Object.prototype.hasOwnProperty.call(i,n)?!1:i[n]=!0})}function ro(e){const t=e.filter((o,n)=>e.indexOf(o)!==n);return no(t)}const q=b.Extension.create({name:"uniqueID",priority:1e4,addOptions(){return{attributeName:"id",types:[],generateID:()=>{if(typeof window<"u"&&window.__TEST_OPTIONS){const e=window.__TEST_OPTIONS;return e.mockID===void 0?e.mockID=0:e.mockID++,e.mockID.toString()}return Ei.v4()},filterTransaction:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{[this.options.attributeName]:{default:null,parseHTML:e=>e.getAttribute(`data-${this.options.attributeName}`),renderHTML:e=>({[`data-${this.options.attributeName}`]:e[this.options.attributeName]})}}}]},addProseMirrorPlugins(){let e=null,t=!1;return[new _.Plugin({key:new _.PluginKey("uniqueID"),appendTransaction:(i,o,n)=>{const r=i.some(f=>f.docChanged)&&!o.doc.eq(n.doc),a=this.options.filterTransaction&&i.some(f=>{let k,w;return!(!((w=(k=this.options).filterTransaction)===null||w===void 0)&&w.call(k,f))});if(!r||a)return;const{tr:l}=n,{types:s,attributeName:c,generateID:p}=this.options,h=b.combineTransactionSteps(o.doc,i),{mapping:m}=h;if(b.getChangedRanges(h).forEach(({newRange:f})=>{const k=b.findChildrenInRange(n.doc,f,A=>s.includes(A.type.name)),w=k.map(({node:A})=>A.attrs[c]).filter(A=>A!==null),z=ro(w);k.forEach(({node:A,pos:O})=>{let ae;const yi=(ae=l.doc.nodeAt(O))===null||ae===void 0?void 0:ae.attrs[c];if(yi===null){const wi=o.doc.type.createAndFill().content;if(o.doc.content.findDiffStart(wi)===null){const vi=JSON.parse(JSON.stringify(n.doc.toJSON()));if(vi.content[0].content[0].attrs.id="initialBlockId",JSON.stringify(vi.content)===JSON.stringify(wi.toJSON())){l.setNodeMarkup(O,void 0,{...A.attrs,[c]:"initialBlockId"});return}}l.setNodeMarkup(O,void 0,{...A.attrs,[c]:p()});return}const{deleted:Gn}=m.invert().mapResult(O);Gn&&z.includes(yi)&&l.setNodeMarkup(O,void 0,{...A.attrs,[c]:p()})})}),!!l.steps.length)return l},view(i){const o=n=>{let r;e=!((r=i.dom.parentElement)===null||r===void 0)&&r.contains(n.target)?i.dom.parentElement:null};return window.addEventListener("dragstart",o),{destroy(){window.removeEventListener("dragstart",o)}}},props:{handleDOMEvents:{drop:(i,o)=>{let n;return(e!==i.dom.parentElement||((n=o.dataTransfer)===null||n===void 0?void 0:n.effectAllowed)==="copy")&&(e=null,t=!0),!1},paste:()=>(t=!0,!1)},transformPasted:i=>{if(!t)return i;const{types:o,attributeName:n}=this.options,r=a=>{const l=[];return a.forEach(s=>{if(s.isText){l.push(s);return}if(!o.includes(s.type.name)){l.push(s.copy(r(s.content)));return}const c=s.type.create({...s.attrs,[n]:null},r(s.content),s.marks);l.push(c)}),y.Fragment.from(l)};return t=!1,new y.Slice(r(i.content),i.openStart,i.openEnd)}}})]}});function Je(e){const t=e.attrs.id,i=e.firstChild,o=i.type,n=e.childCount===2?e.lastChild.childCount:0;return{id:t,node:e,contentNode:i,contentType:o,numChildBlocks:n}}function v(e,t){const o=e.nodeSize-2;if(t<=1)for(t=2;e.resolve(t).parent.type.name!=="blockContainer"&&t<o;)t++;else if(t>=o)for(t=o-1;e.resolve(t).parent.type.name!=="blockContainer"&&t>1;)t--;e.resolve(t).parent.type.name==="blockGroup"&&t++;const n=e.resolve(t),r=n.depth;let a=n.node(r),l=r;for(;;){if(l<0)throw new Error("Could not find blockContainer node. This can only happen if the underlying BlockNote schema has been edited.");if(a.type.name==="blockContainer")break;l-=1,a=n.node(l)}const{id:s,contentNode:c,contentType:p,numChildBlocks:h}=Je(a),m=n.start(l),g=n.end(l);return{id:s,node:a,contentNode:c,contentType:p,numChildBlocks:h,startPos:m,endPos:g,depth:l}}function be(e){return e.type==="link"}function ke(e){return typeof e!="string"&&e.type==="link"}function W(e){return typeof e!="string"&&e.type==="text"}class I extends Error{constructor(t){super(`Unreachable case: ${t}`)}}function ao(e,t=!0){const{"data-test":i,...o}=e;if(Object.keys(o).length>0&&t)throw new Error("Object must be empty "+JSON.stringify(e))}function Ye(e,t,i){const o=[];for(const[n,r]of Object.entries(e.styles)){const a=i[n];if(!a)throw new Error(`style ${n} not found in styleSchema`);if(a.propSchema==="boolean")o.push(t.mark(n));else if(a.propSchema==="string")o.push(t.mark(n,{stringValue:r}));else throw new I(a.propSchema)}return e.text.split(/(\n)/g).filter(n=>n.length>0).map(n=>n===`
2
- `?t.nodes.hardBreak.create():t.text(n,o))}function lo(e,t,i){const o=t.marks.link.create({href:e.href});return _e(e.content,t,i).map(n=>{if(n.type.name==="text")return n.mark([...n.marks,o]);if(n.type.name==="hardBreak")return n;throw new Error("unexpected node type")})}function _e(e,t,i){const o=[];if(typeof e=="string")return o.push(...Ye({type:"text",text:e,styles:{}},t,i)),o;for(const n of e)o.push(...Ye(n,t,i));return o}function V(e,t,i){const o=[];for(const n of e)typeof n=="string"?o.push(..._e(n,t,i)):ke(n)?o.push(...lo(n,t,i)):W(n)?o.push(..._e([n],t,i)):o.push(Qe(n,t,i));return o}function ye(e,t,i){const o=[];for(const n of e.rows){const r=[];for(const l of n.cells){let s;if(!l)s=t.nodes.tableParagraph.create({});else if(typeof l=="string")s=t.nodes.tableParagraph.create({},t.text(l));else{const p=V(l,t,i);s=t.nodes.tableParagraph.create({},p)}const c=t.nodes.tableCell.create({},s);r.push(c)}const a=t.nodes.tableRow.create({},r);o.push(a)}return o}function Qe(e,t,i){let o,n=e.type;if(n===void 0&&(n="paragraph"),!t.nodes[n])throw new Error(`node type ${n} not found in schema`);if(!e.content)o=t.nodes[n].create(e.props);else if(typeof e.content=="string"){const r=V([e.content],t,i);o=t.nodes[n].create(e.props,r)}else if(Array.isArray(e.content)){const r=V(e.content,t,i);o=t.nodes[n].create(e.props,r)}else if(e.content.type==="tableContent"){const r=ye(e.content,t,i);o=t.nodes[n].create(e.props,r)}else throw new I(e.content.type);return o}function N(e,t,i){let o=e.id;o===void 0&&(o=q.options.generateID());const n=Qe(e,t,i),r=[];if(e.children)for(const l of e.children)r.push(N(l,t,i));const a=t.nodes.blockGroup.create({},r);return t.nodes.blockContainer.create({id:o,...e.props},r.length>0?[n,a]:n)}function so(e,t,i){const o={type:"tableContent",rows:[]};return e.content.forEach(n=>{const r={cells:[]};n.content.forEach(a=>{r.cells.push(le(a.firstChild,t,i))}),o.rows.push(r)}),o}function le(e,t,i){const o=[];let n;return e.content.forEach(r=>{if(r.type.name==="hardBreak"){if(n)if(W(n))n.text+=`
3
- `;else if(be(n))n.content[n.content.length-1].text+=`
1
+ (function(d,y){typeof exports=="object"&&typeof module<"u"?y(exports,require("prosemirror-model"),require("@tiptap/core"),require("prosemirror-state"),require("uuid"),require("@tiptap/extension-bold"),require("@tiptap/extension-code"),require("@tiptap/extension-italic"),require("@tiptap/extension-strike"),require("@tiptap/extension-underline"),require("@tiptap/extension-table-cell"),require("@tiptap/extension-table-header"),require("@tiptap/extension-table-row"),require("prosemirror-tables"),require("prosemirror-view"),require("@tiptap/extension-collaboration"),require("@tiptap/extension-collaboration-cursor"),require("@tiptap/extension-dropcursor"),require("@tiptap/extension-gapcursor"),require("@tiptap/extension-hard-break"),require("@tiptap/extension-history"),require("@tiptap/extension-link"),require("@tiptap/extension-text")):typeof define=="function"&&define.amd?define(["exports","prosemirror-model","@tiptap/core","prosemirror-state","uuid","@tiptap/extension-bold","@tiptap/extension-code","@tiptap/extension-italic","@tiptap/extension-strike","@tiptap/extension-underline","@tiptap/extension-table-cell","@tiptap/extension-table-header","@tiptap/extension-table-row","prosemirror-tables","prosemirror-view","@tiptap/extension-collaboration","@tiptap/extension-collaboration-cursor","@tiptap/extension-dropcursor","@tiptap/extension-gapcursor","@tiptap/extension-hard-break","@tiptap/extension-history","@tiptap/extension-link","@tiptap/extension-text"],y):(d=typeof globalThis<"u"?globalThis:d||self,y(d.blocknote={},d.prosemirrorModel,d.core,d.prosemirrorState,d.uuid,d.Bold,d.Code,d.Italic,d.Strike,d.Underline,d.extensionTableCell,d.extensionTableHeader,d.extensionTableRow,d.prosemirrorTables,d.prosemirrorView,d.Collaboration,d.CollaborationCursor,d.extensionDropcursor,d.extensionGapcursor,d.extensionHardBreak,d.extensionHistory,d.extensionLink,d.extensionText))})(this,function(d,y,g,_,bi,ki,_i,yi,vi,wi,Ei,xi,Si,Ke,M,Ci,Ti,Mi,Bi,Li,Ii,Ai,Pi){"use strict";var In=Object.defineProperty;var An=(d,y,g)=>y in d?In(d,y,{enumerable:!0,configurable:!0,writable:!0,value:g}):d[y]=g;var u=(d,y,g)=>An(d,typeof y!="symbol"?y+"":y,g);const O=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Ni=O(ki),Hi=O(_i),Di=O(yi),Ui=O(vi),ji=O(wi),Ri=O(Ci),zi=O(Ti),Vi={slash_menu:{heading:{title:"عنوان 1",subtext:"يستخدم لعناوين المستوى الأعلى",aliases:["ع","عنوان1","ع1"],group:"العناوين"},heading_2:{title:"عنوان 2",subtext:"يستخدم للأقسام الرئيسية",aliases:["ع2","عنوان2","عنوان فرعي"],group:"العناوين"},heading_3:{title:"عنوان 3",subtext:"يستخدم للأقسام الفرعية والعناوين المجموعة",aliases:["ع3","عنوان3","عنوان فرعي"],group:"العناوين"},numbered_list:{title:"قائمة مرقمة",subtext:"تستخدم لعرض قائمة مرقمة",aliases:["ق","عناصر قائمة","قائمة","قائمة مرقمة"],group:"الكتل الأساسية"},bullet_list:{title:"قائمة نقطية",subtext:"تستخدم لعرض قائمة غير مرتبة",aliases:["ق","عناصر قائمة","قائمة","قائمة نقطية"],group:"الكتل الأساسية"},check_list:{title:"قائمة تحقق",subtext:"تستخدم لعرض قائمة بمربعات التحقق",aliases:["قوائم غير مرتبة","عناصر قائمة","قائمة","قائمة تحقق","قائمة التحقق","قائمة مشطوبة","مربع التحقق"],group:"الكتل الأساسية"},paragraph:{title:"فقرة",subtext:"تستخدم لنص الوثيقة الأساسي",aliases:["ف","فقرة"],group:"الكتل الأساسية"},table:{title:"جدول",subtext:"يستخدم للجداول",aliases:["جدول"],group:"متقدم"},image:{title:"صورة",subtext:"إدراج صورة",aliases:["صورة","رفع صورة","تحميل","صورة","صورة","وسائط","رابط"],group:"وسائط"},video:{title:"فيديو",subtext:"إدراج فيديو",aliases:["فيديو","رفع فيديو","تحميل","فيديو","فيلم","وسائط","رابط"],group:"وسائط"},audio:{title:"صوت",subtext:"إدراج صوت",aliases:["صوت","رفع صوت","تحميل","صوت","صوت","وسائط","رابط"],group:"وسائط"},file:{title:"ملف",subtext:"إدراج ملف",aliases:["ملف","تحميل","تضمين","وسائط","رابط"],group:"وسائط"},emoji:{title:"الرموز التعبيرية",subtext:"تُستخدم لإدراج رمز تعبيري",aliases:["رمز تعبيري","إيموجي","إيموت","عاطفة","وجه"],group:"آخرون"}},placeholders:{default:"أدخل نصًا أو اكتب '/' للأوامر",heading:"عنوان",bulletListItem:"قائمة",numberedListItem:"قائمة",checkListItem:"قائمة"},file_blocks:{image:{add_button_text:"إضافة صورة"},video:{add_button_text:"إضافة فيديو"},audio:{add_button_text:"إضافة صوت"},file:{add_button_text:"إضافة ملف"}},side_menu:{add_block_label:"إضافة محتوي",drag_handle_label:"فتح قائمة المحتويات"},drag_handle:{delete_menuitem:"حذف",colors_menuitem:"ألوان"},table_handle:{delete_column_menuitem:"حذف عمود",delete_row_menuitem:"حذف صف",add_left_menuitem:"إضافة عمود إلى اليسار",add_right_menuitem:"إضافة عمود إلى اليمين",add_above_menuitem:"إضافة صف أعلى",add_below_menuitem:"إضافة صف أسفل"},suggestion_menu:{no_items_title:"لم يتم العثور على عناصر",loading:"جارٍ التحميل…"},color_picker:{text_title:"نص",background_title:"خلفية",colors:{default:"افتراضي",gray:"رمادي",brown:"بني",red:"أحمر",orange:"برتقالي",yellow:"أصفر",green:"أخضر",blue:"أزرق",purple:"أرجواني",pink:"وردي"}},formatting_toolbar:{bold:{tooltip:"عريض",secondary_tooltip:"Mod+B"},italic:{tooltip:"مائل",secondary_tooltip:"Mod+I"},underline:{tooltip:"تحته خط",secondary_tooltip:"Mod+U"},strike:{tooltip:"مشطوب",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"كود",secondary_tooltip:""},colors:{tooltip:"ألوان"},link:{tooltip:"إنشاء رابط",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"تحرير التسمية التوضيحية",input_placeholder:"تحرير التسمية التوضيحية"},file_replace:{tooltip:{image:"استبدال الصورة",video:"استبدال الفيديو",audio:"استبدال الصوت",file:"استبدال الملف"}},file_rename:{tooltip:{image:"إعادة تسمية الصورة",video:"إعادة تسمية الفيديو",audio:"إعادة تسمية الصوت",file:"إعادة تسمية الملف"},input_placeholder:{image:"إعادة تسمية الصورة",video:"إعادة تسمية الفيديو",audio:"إعادة تسمية الصوت",file:"إعادة تسمية الملف"}},file_download:{tooltip:{image:"تنزيل الصورة",video:"تنزيل الفيديو",audio:"تنزيل الصوت",file:"تنزيل الملف"}},file_delete:{tooltip:{image:"حذف الصورة",video:"حذف الفيديو",audio:"حذف الصوت",file:"حذف الملف"}},file_preview_toggle:{tooltip:"تبديل المعاينة"},nest:{tooltip:"محتويات متداخلة",secondary_tooltip:"Tab"},unnest:{tooltip:"إلغاء التداخل",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"محاذاة النص إلى اليسار"},align_center:{tooltip:"محاذاة النص في المنتصف"},align_right:{tooltip:"محاذاة النص إلى اليمين"},align_justify:{tooltip:"ضبط النص"}},file_panel:{upload:{title:"تحميل",file_placeholder:{image:"تحميل صورة",video:"تحميل فيديو",audio:"تحميل صوت",file:"تحميل ملف"},upload_error:"خطأ: فشل التحميل"},embed:{title:"تضمين",embed_button:{image:"تضمين صورة",video:"تضمين فيديو",audio:"تضمين صوت",file:"تضمين ملف"},url_placeholder:"أدخل الرابط"}},link_toolbar:{delete:{tooltip:"إزالة الرابط"},edit:{text:"تحرير الرابط",tooltip:"تحرير"},open:{tooltip:"فتح في تبويب جديد"},form:{title_placeholder:"تحرير العنوان",url_placeholder:"تحرير الرابط"}},generic:{ctrl_shortcut:"Ctrl"}},Oi={slash_menu:{heading:{title:"Überschrift 1",subtext:"Hauptebene Überschrift",aliases:["h","überschrift1","h1"],group:"Überschriften"},heading_2:{title:"Überschrift 2",subtext:"Wichtige Abschnittsüberschrift",aliases:["h2","überschrift2","unterüberschrift"],group:"Überschriften"},heading_3:{title:"Überschrift 3",subtext:"Unterabschnitts- und Gruppenüberschrift",aliases:["h3","überschrift3","unterüberschrift"],group:"Überschriften"},numbered_list:{title:"Nummerierte Liste",subtext:"Liste mit nummerierten Elementen",aliases:["ol","li","liste","nummerierteliste","nummerierte liste"],group:"Grundlegende Blöcke"},bullet_list:{title:"Aufzählungsliste",subtext:"Liste mit unnummerierten Elementen",aliases:["ul","li","liste","aufzählungsliste","aufzählung liste"],group:"Grundlegende Blöcke"},check_list:{title:"Checkliste",subtext:"Liste mit Kontrollkästchen",aliases:["ul","li","liste","checkliste","check liste","geprüfte liste","kontrollkästchen"],group:"Grundlegende Blöcke"},paragraph:{title:"Absatz",subtext:"Der Hauptteil Ihres Dokuments",aliases:["p","absatz"],group:"Grundlegende Blöcke"},table:{title:"Tabelle",subtext:"Tabelle mit editierbaren Zellen",aliases:["tabelle"],group:"Erweitert"},image:{title:"Bild",subtext:"Größenveränderbares Bild mit Beschriftung",aliases:["bild","bildhochladen","hochladen","img","bild","medien","url"],group:"Medien"},video:{title:"Video",subtext:"Größenveränderbares Video mit Beschriftung",aliases:["video","videoupload","hochladen","mp4","film","medien","url"],group:"Medien"},audio:{title:"Audio",subtext:"Eingebettetes Audio mit Beschriftung",aliases:["audio","audioupload","hochladen","mp3","ton","medien","url"],group:"Medien"},file:{title:"Datei",subtext:"Eingebettete Datei",aliases:["datei","hochladen","einbetten","medien","url"],group:"Medien"},emoji:{title:"Emoji",subtext:"Nach Emoji suchen und einfügen",aliases:["emoji","emote","emotion","gesicht"],group:"Andere"}},placeholders:{default:"Text eingeben oder '/' für Befehle tippen",heading:"Überschrift",bulletListItem:"Liste",numberedListItem:"Liste",checkListItem:"Liste"},file_blocks:{image:{add_button_text:"Bild hinzufügen"},video:{add_button_text:"Video hinzufügen"},audio:{add_button_text:"Audio hinzufügen"},file:{add_button_text:"Datei hinzufügen"}},side_menu:{add_block_label:"Block hinzufügen",drag_handle_label:"Blockmenü öffnen"},drag_handle:{delete_menuitem:"Löschen",colors_menuitem:"Farben"},table_handle:{delete_column_menuitem:"Spalte löschen",delete_row_menuitem:"Zeile löschen",add_left_menuitem:"Spalte links hinzufügen",add_right_menuitem:"Spalte rechts hinzufügen",add_above_menuitem:"Zeile oberhalb hinzufügen",add_below_menuitem:"Zeile unterhalb hinzufügen"},suggestion_menu:{no_items_title:"Keine Elemente gefunden",loading:"Laden…"},color_picker:{text_title:"Text",background_title:"Hintergrund",colors:{default:"Standard",gray:"Grau",brown:"Braun",red:"Rot",orange:"Orange",yellow:"Gelb",green:"Grün",blue:"Blau",purple:"Lila",pink:"Rosa"}},formatting_toolbar:{bold:{tooltip:"Fett",secondary_tooltip:"Mod+B"},italic:{tooltip:"Kursiv",secondary_tooltip:"Mod+I"},underline:{tooltip:"Unterstrichen",secondary_tooltip:"Mod+U"},strike:{tooltip:"Durchgestrichen",secondary_tooltip:"Mod+Shift+S"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Farben"},link:{tooltip:"Link erstellen",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Beschriftung bearbeiten",input_placeholder:"Beschriftung bearbeiten"},file_replace:{tooltip:{image:"Bild ersetzen",video:"Video ersetzen",audio:"Audio ersetzen",file:"Datei ersetzen"}},file_rename:{tooltip:{image:"Bild umbenennen",video:"Video umbenennen",audio:"Audio umbenennen",file:"Datei umbenennen"},input_placeholder:{image:"Bild umbenennen",video:"Video umbenennen",audio:"Audio umbenennen",file:"Datei umbenennen"}},file_download:{tooltip:{image:"Bild herunterladen",video:"Video herunterladen",audio:"Audio herunterladen",file:"Datei herunterladen"}},file_delete:{tooltip:{image:"Bild löschen",video:"Video löschen",audio:"Audio löschen",file:"Datei löschen"}},file_preview_toggle:{tooltip:"Vorschau umschalten"},nest:{tooltip:"Block verschachteln",secondary_tooltip:"Tab"},unnest:{tooltip:"Block entnesten",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Text linksbündig"},align_center:{tooltip:"Text zentrieren"},align_right:{tooltip:"Text rechtsbündig"},align_justify:{tooltip:"Text Blocksatz"}},file_panel:{upload:{title:"Hochladen",file_placeholder:{image:"Bild hochladen",video:"Video hochladen",audio:"Audio hochladen",file:"Datei hochladen"},upload_error:"Fehler: Hochladen fehlgeschlagen"},embed:{title:"Einbetten",embed_button:{image:"Bild einbetten",video:"Video einbetten",audio:"Audio einbetten",file:"Datei einbetten"},url_placeholder:"URL eingeben"}},link_toolbar:{delete:{tooltip:"Link entfernen"},edit:{text:"Link bearbeiten",tooltip:"Bearbeiten"},open:{tooltip:"In neuem Tab öffnen"},form:{title_placeholder:"Titel bearbeiten",url_placeholder:"URL bearbeiten"}},generic:{ctrl_shortcut:"Strg"}},Ge={slash_menu:{heading:{title:"Heading 1",subtext:"Top-level heading",aliases:["h","heading1","h1"],group:"Headings"},heading_2:{title:"Heading 2",subtext:"Key section heading",aliases:["h2","heading2","subheading"],group:"Headings"},heading_3:{title:"Heading 3",subtext:"Subsection and group heading",aliases:["h3","heading3","subheading"],group:"Headings"},numbered_list:{title:"Numbered List",subtext:"List with ordered items",aliases:["ol","li","list","numberedlist","numbered list"],group:"Basic blocks"},bullet_list:{title:"Bullet List",subtext:"List with unordered items",aliases:["ul","li","list","bulletlist","bullet list"],group:"Basic blocks"},check_list:{title:"Check List",subtext:"List with checkboxes",aliases:["ul","li","list","checklist","check list","checked list","checkbox"],group:"Basic blocks"},paragraph:{title:"Paragraph",subtext:"The body of your document",aliases:["p","paragraph"],group:"Basic blocks"},table:{title:"Table",subtext:"Table with editable cells",aliases:["table"],group:"Advanced"},image:{title:"Image",subtext:"Resizable image with caption",aliases:["image","imageUpload","upload","img","picture","media","url"],group:"Media"},video:{title:"Video",subtext:"Resizable video with caption",aliases:["video","videoUpload","upload","mp4","film","media","url"],group:"Media"},audio:{title:"Audio",subtext:"Embedded audio with caption",aliases:["audio","audioUpload","upload","mp3","sound","media","url"],group:"Media"},file:{title:"File",subtext:"Embedded file",aliases:["file","upload","embed","media","url"],group:"Media"},emoji:{title:"Emoji",subtext:"Search for and insert an emoji",aliases:["emoji","emote","emotion","face"],group:"Others"}},placeholders:{default:"Enter text or type '/' for commands",heading:"Heading",bulletListItem:"List",numberedListItem:"List",checkListItem:"List"},file_blocks:{image:{add_button_text:"Add image"},video:{add_button_text:"Add video"},audio:{add_button_text:"Add audio"},file:{add_button_text:"Add file"}},side_menu:{add_block_label:"Add block",drag_handle_label:"Open block menu"},drag_handle:{delete_menuitem:"Delete",colors_menuitem:"Colors"},table_handle:{delete_column_menuitem:"Delete column",delete_row_menuitem:"Delete row",add_left_menuitem:"Add column left",add_right_menuitem:"Add column right",add_above_menuitem:"Add row above",add_below_menuitem:"Add row below"},suggestion_menu:{no_items_title:"No items found",loading:"Loading…"},color_picker:{text_title:"Text",background_title:"Background",colors:{default:"Default",gray:"Gray",brown:"Brown",red:"Red",orange:"Orange",yellow:"Yellow",green:"Green",blue:"Blue",purple:"Purple",pink:"Pink"}},formatting_toolbar:{bold:{tooltip:"Bold",secondary_tooltip:"Mod+B"},italic:{tooltip:"Italic",secondary_tooltip:"Mod+I"},underline:{tooltip:"Underline",secondary_tooltip:"Mod+U"},strike:{tooltip:"Strike",secondary_tooltip:"Mod+Shift+S"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Colors"},link:{tooltip:"Create link",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Edit caption",input_placeholder:"Edit caption"},file_replace:{tooltip:{image:"Replace image",video:"Replace video",audio:"Replace audio",file:"Replace file"}},file_rename:{tooltip:{image:"Rename image",video:"Rename video",audio:"Rename audio",file:"Rename file"},input_placeholder:{image:"Rename image",video:"Rename video",audio:"Rename audio",file:"Rename file"}},file_download:{tooltip:{image:"Download image",video:"Download video",audio:"Download audio",file:"Download file"}},file_delete:{tooltip:{image:"Delete image",video:"Delete video",audio:"Delete audio",file:"Delete file"}},file_preview_toggle:{tooltip:"Toggle preview"},nest:{tooltip:"Nest block",secondary_tooltip:"Tab"},unnest:{tooltip:"Unnest block",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Align text left"},align_center:{tooltip:"Align text center"},align_right:{tooltip:"Align text right"},align_justify:{tooltip:"Justify text"}},file_panel:{upload:{title:"Upload",file_placeholder:{image:"Upload image",video:"Upload video",audio:"Upload audio",file:"Upload file"},upload_error:"Error: Upload failed"},embed:{title:"Embed",embed_button:{image:"Embed image",video:"Embed video",audio:"Embed audio",file:"Embed file"},url_placeholder:"Enter URL"}},link_toolbar:{delete:{tooltip:"Remove link"},edit:{text:"Edit link",tooltip:"Edit"},open:{tooltip:"Open in new tab"},form:{title_placeholder:"Edit title",url_placeholder:"Edit URL"}},generic:{ctrl_shortcut:"Ctrl"}},Fi=Object.freeze(Object.defineProperty({__proto__:null,ar:Vi,de:Oi,en:Ge,es:{slash_menu:{heading:{title:"Encabezado 1",subtext:"Encabezado de primer nivel",aliases:["h","encabezado1","h1"],group:"Encabezados"},heading_2:{title:"Encabezado 2",subtext:"Encabezado de sección principal",aliases:["h2","encabezado2","subencabezado"],group:"Encabezados"},heading_3:{title:"Encabezado 3",subtext:"Encabezado de subsección y grupo",aliases:["h3","encabezado3","subencabezado"],group:"Encabezados"},numbered_list:{title:"Lista Numerada",subtext:"Lista con elementos ordenados",aliases:["ol","li","lista","lista numerada"],group:"Bloques básicos"},bullet_list:{title:"Lista con Viñetas",subtext:"Lista con elementos no ordenados",aliases:["ul","li","lista","lista con viñetas"],group:"Bloques básicos"},check_list:{title:"Lista de Verificación",subtext:"Lista con casillas de verificación",aliases:["ul","li","lista","lista de verificación","lista de chequeo","checkbox"],group:"Bloques básicos"},paragraph:{title:"Párrafo",subtext:"El cuerpo de tu documento",aliases:["p","párrafo"],group:"Bloques básicos"},table:{title:"Tabla",subtext:"Tabla con celdas editables",aliases:["tabla"],group:"Avanzado"},image:{title:"Imagen",subtext:"Imagen redimensionable con leyenda",aliases:["imagen","subir imagen","cargar","img","foto","media","url"],group:"Medios"},video:{title:"Vídeo",subtext:"Vídeo redimensionable con leyenda",aliases:["video","subir vídeo","cargar","mp4","película","media","url"],group:"Medios"},audio:{title:"Audio",subtext:"Audio incrustado con leyenda",aliases:["audio","subir audio","cargar","mp3","sonido","media","url"],group:"Medios"},file:{title:"Archivo",subtext:"Archivo incrustado",aliases:["archivo","cargar","incrustar","media","url"],group:"Medios"},emoji:{title:"Emoji",subtext:"Busca e inserta un emoji",aliases:["emoji","emoticono","emoción","cara"],group:"Otros"}},placeholders:{default:"Escribe o teclea '/' para comandos",heading:"Encabezado",bulletListItem:"Lista",numberedListItem:"Lista",checkListItem:"Lista"},file_blocks:{image:{add_button_text:"Agregar imagen"},video:{add_button_text:"Agregar vídeo"},audio:{add_button_text:"Agregar audio"},file:{add_button_text:"Agregar archivo"}},side_menu:{add_block_label:"Agregar bloque",drag_handle_label:"Abrir menú de bloque"},drag_handle:{delete_menuitem:"Eliminar",colors_menuitem:"Colores"},table_handle:{delete_column_menuitem:"Eliminar columna",delete_row_menuitem:"Eliminar fila",add_left_menuitem:"Agregar columna a la izquierda",add_right_menuitem:"Agregar columna a la derecha",add_above_menuitem:"Agregar fila arriba",add_below_menuitem:"Agregar fila abajo"},suggestion_menu:{no_items_title:"No se encontraron elementos",loading:"Cargando…"},color_picker:{text_title:"Texto",background_title:"Fondo",colors:{default:"Por defecto",gray:"Gris",brown:"Marrón",red:"Rojo",orange:"Naranja",yellow:"Amarillo",green:"Verde",blue:"Azul",purple:"Morado",pink:"Rosa"}},formatting_toolbar:{bold:{tooltip:"Negrita",secondary_tooltip:"Mod+B"},italic:{tooltip:"Cursiva",secondary_tooltip:"Mod+I"},underline:{tooltip:"Subrayado",secondary_tooltip:"Mod+U"},strike:{tooltip:"Tachado",secondary_tooltip:"Mod+Shift+S"},code:{tooltip:"Código",secondary_tooltip:""},colors:{tooltip:"Colores"},link:{tooltip:"Crear enlace",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Editar leyenda",input_placeholder:"Editar leyenda"},file_replace:{tooltip:{image:"Reemplazar imagen",video:"Reemplazar vídeo",audio:"Reemplazar audio",file:"Reemplazar archivo"}},file_rename:{tooltip:{image:"Renombrar imagen",video:"Renombrar vídeo",audio:"Renombrar audio",file:"Renombrar archivo"},input_placeholder:{image:"Renombrar imagen",video:"Renombrar vídeo",audio:"Renombrar audio",file:"Renombrar archivo"}},file_download:{tooltip:{image:"Descargar imagen",video:"Descargar vídeo",audio:"Descargar audio",file:"Descargar archivo"}},file_delete:{tooltip:{image:"Eliminar imagen",video:"Eliminar vídeo",audio:"Eliminar audio",file:"Eliminar archivo"}},file_preview_toggle:{tooltip:"Alternar vista previa"},nest:{tooltip:"Anidar bloque",secondary_tooltip:"Tab"},unnest:{tooltip:"Desanidar bloque",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Alinear texto a la izquierda"},align_center:{tooltip:"Alinear texto al centro"},align_right:{tooltip:"Alinear texto a la derecha"},align_justify:{tooltip:"Justificar texto"}},file_panel:{upload:{title:"Subir",file_placeholder:{image:"Subir imagen",video:"Subir vídeo",audio:"Subir audio",file:"Subir archivo"},upload_error:"Error: Fallo en la subida"},embed:{title:"Incrustar",embed_button:{image:"Incrustar imagen",video:"Incrustar vídeo",audio:"Incrustar audio",file:"Incrustar archivo"},url_placeholder:"Introduce la URL"}},link_toolbar:{delete:{tooltip:"Eliminar enlace"},edit:{text:"Editar enlace",tooltip:"Editar"},open:{tooltip:"Abrir en nueva pestaña"},form:{title_placeholder:"Editar título",url_placeholder:"Editar URL"}},generic:{ctrl_shortcut:"Ctrl"}},fr:{slash_menu:{heading:{title:"Titre 1",subtext:"Utilisé pour un titre de premier niveau",aliases:["h","titre1","h1"],group:"Titres"},heading_2:{title:"Titre 2",subtext:"Utilisé pour les sections clés",aliases:["h2","titre2","sous-titre"],group:"Titres"},heading_3:{title:"Titre 3",subtext:"Utilisé pour les sous-sections et les titres de groupe",aliases:["h3","titre3","sous-titre"],group:"Titres"},numbered_list:{title:"Liste Numérotée",subtext:"Utilisé pour afficher une liste numérotée",aliases:["ol","li","liste","listenumérotée","liste numérotée"],group:"Blocs de base"},bullet_list:{title:"Liste à Puces",subtext:"Utilisé pour afficher une liste non ordonnée",aliases:["ul","li","liste","listeàpuces","liste à puces"],group:"Blocs de base"},check_list:{title:"Liste de vérification",subtext:"Utilisé pour afficher une liste avec des cases à cocher",aliases:["ul","li","liste","liste de vérification","liste cochée","case à cocher"],group:"Blocs de base"},paragraph:{title:"Paragraphe",subtext:"Utilisé pour le corps de votre document",aliases:["p","paragraphe"],group:"Blocs de base"},table:{title:"Tableau",subtext:"Utilisé pour les tableaux",aliases:["tableau"],group:"Avancé"},image:{title:"Image",subtext:"Insérer une image",aliases:["image","uploadImage","télécharger","img","photo","média","url"],group:"Médias"},video:{title:"Vidéo",subtext:"Insérer une vidéo",aliases:["vidéo","téléchargerVidéo","téléverser","mp4","film","média","url"],group:"Média"},audio:{title:"Audio",subtext:"Insérer un audio",aliases:["audio","téléchargerAudio","téléverser","mp3","son","média","url"],group:"Média"},file:{title:"Fichier",subtext:"Insérer un fichier",aliases:["fichier","téléverser","intégrer","média","url"],group:"Média"},emoji:{title:"Emoji",subtext:"Utilisé pour insérer un emoji",aliases:["emoji","émoticône","émotion","visage"],group:"Autres"}},placeholders:{default:"Entrez du texte ou tapez '/' pour les commandes",heading:"Titre",bulletListItem:"Liste",numberedListItem:"Liste",checkListItem:"Liste"},file_blocks:{image:{add_button_text:"Ajouter une image"},video:{add_button_text:"Ajouter une vidéo"},audio:{add_button_text:"Ajouter un audio"},file:{add_button_text:"Ajouter un fichier"}},side_menu:{add_block_label:"Ajouter un bloc",drag_handle_label:"Ouvrir le menu du bloc"},drag_handle:{delete_menuitem:"Supprimer",colors_menuitem:"Couleurs"},table_handle:{delete_column_menuitem:"Supprimer la colonne",delete_row_menuitem:"Supprimer la ligne",add_left_menuitem:"Ajouter une colonne à gauche",add_right_menuitem:"Ajouter une colonne à droite",add_above_menuitem:"Ajouter une ligne au-dessus",add_below_menuitem:"Ajouter une ligne en dessous"},suggestion_menu:{no_items_title:"Aucun élément trouvé",loading:"Chargement…"},color_picker:{text_title:"Texte",background_title:"Fond",colors:{default:"Défaut",gray:"Gris",brown:"Marron",red:"Rouge",orange:"Orange",yellow:"Jaune",green:"Vert",blue:"Bleu",purple:"Violet",pink:"Rose"}},formatting_toolbar:{bold:{tooltip:"Gras",secondary_tooltip:"Mod+B"},italic:{tooltip:"Italique",secondary_tooltip:"Mod+I"},underline:{tooltip:"Souligner",secondary_tooltip:"Mod+U"},strike:{tooltip:"Barré",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Couleurs"},link:{tooltip:"Créer un lien",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Modifier la légende",input_placeholder:"Modifier la légende"},file_replace:{tooltip:{image:"Remplacer l'image",video:"Remplacer la vidéo",audio:"Remplacer l'audio",file:"Remplacer le fichier"}},file_rename:{tooltip:{image:"Renommer l'image",video:"Renommer la vidéo",audio:"Renommer l'audio",file:"Renommer le fichier"},input_placeholder:{image:"Renommer l'image",video:"Renommer la vidéo",audio:"Renommer l'audio",file:"Renommer le fichier"}},file_download:{tooltip:{image:"Télécharger l'image",video:"Télécharger la vidéo",audio:"Télécharger l'audio",file:"Télécharger le fichier"}},file_delete:{tooltip:{image:"Supprimer l'image",video:"Supprimer la vidéo",audio:"Supprimer l'audio",file:"Supprimer le fichier"}},file_preview_toggle:{tooltip:"Basculer l'aperçu"},nest:{tooltip:"Emboîter le bloc",secondary_tooltip:"Tab"},unnest:{tooltip:"Démboîter le bloc",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Aligner le texte à gauche"},align_center:{tooltip:"Aligner le texte au centre"},align_right:{tooltip:"Aligner le texte à droite"},align_justify:{tooltip:"Justifier le texte"}},file_panel:{upload:{title:"Télécharger",file_placeholder:{image:"Télécharger une image",video:"Télécharger une vidéo",audio:"Télécharger un fichier audio",file:"Télécharger un fichier"},upload_error:"Erreur : Échec du téléchargement"},embed:{title:"Intégrer",embed_button:{image:"Intégrer une image",video:"Intégrer une vidéo",audio:"Intégrer un fichier audio",file:"Intégrer un fichier"},url_placeholder:"Entrez l'URL"}},link_toolbar:{delete:{tooltip:"Supprimer le lien"},edit:{text:"Modifier le lien",tooltip:"Modifier"},open:{tooltip:"Ouvrir dans un nouvel onglet"},form:{title_placeholder:"Modifier le titre",url_placeholder:"Modifier l'URL"}},generic:{ctrl_shortcut:"Ctrl"}},is:{slash_menu:{heading:{title:"Fyrirsögn 1",subtext:"Notað fyrir efstu fyrirsögn",aliases:["h","fyrirsogn1","h1"],group:"Fyrirsagnir"},heading_2:{title:"Fyrirsögn 2",subtext:"Notað fyrir lykilhluta",aliases:["h2","fyrirsogn2","undirfyrirsogn"],group:"Fyrirsagnir"},heading_3:{title:"Fyrirsögn 3",subtext:"Notað fyrir undirhluta og hópfyrirsagnir",aliases:["h3","fyrirsogn3","undirfyrirsogn"],group:"Fyrirsagnir"},numbered_list:{title:"Númeruð listi",subtext:"Notað til að birta númeraðan lista",aliases:["ol","li","listi","numeradurlisti"],group:"Grunnblokkar"},bullet_list:{title:"Punktalisti",subtext:"Notað til að birta óraðaðan lista",aliases:["ul","li","listi","punktalisti"],group:"Grunnblokkar"},check_list:{title:"Athugunarlisti",subtext:"Notað til að sýna lista með gátreitum",aliases:["ul","li","listi","athugunarlisti","merktur listi"],group:"Grunnblokkar"},paragraph:{title:"Málsgrein",subtext:"Notað fyrir meginmál skjalsins",aliases:["p","malsgrein"],group:"Grunnblokkar"},table:{title:"Tafla",subtext:"Notað fyrir töflur",aliases:["tafla"],group:"Ítarlegt"},image:{title:"Mynd",subtext:"Settu inn mynd",aliases:["mynd","myndaupphlaed","upphlaed","img","mynd","media","url"],group:"Miðlar"},video:{title:"Myndband",subtext:"Setja inn myndband",aliases:["myndband","videoUpphala","hlaða upp","mp4","kvikmynd","miðill","url"],group:"Miðill"},audio:{title:"Hljóð",subtext:"Setja inn hljóð",aliases:["hljóð","audioUpphala","hlaða upp","mp3","hljóð","miðill","url"],group:"Miðlar"},file:{title:"Skrá",subtext:"Setja inn skrá",aliases:["skrá","hlaða upp","fella inn","miðill","url"],group:"Miðlar"},emoji:{title:"Emoji",subtext:"Notað til að setja inn smámynd",aliases:["emoji","andlitsávísun","tilfinningar","andlit"],group:"Annað"}},placeholders:{default:"Sláðu inn texta eða skrifaðu '/' fyrir skipanir",heading:"Fyrirsögn",bulletListItem:"Listi",numberedListItem:"Listi",checkListItem:"Listi"},file_blocks:{image:{add_button_text:"Bæta við mynd"},video:{add_button_text:"Bæta við myndbandi"},audio:{add_button_text:"Bæta við hljóði"},file:{add_button_text:"Bæta við skrá"}},side_menu:{add_block_label:"Bæta við blokki",drag_handle_label:"Opna blokkarvalmynd"},drag_handle:{delete_menuitem:"Eyða",colors_menuitem:"Litir"},table_handle:{delete_column_menuitem:"Eyða dálki",delete_row_menuitem:"Eyða röð",add_left_menuitem:"Bæta dálki við til vinstri",add_right_menuitem:"Bæta dálki við til hægri",add_above_menuitem:"Bæta röð við fyrir ofan",add_below_menuitem:"Bæta röð við fyrir neðan"},suggestion_menu:{no_items_title:"Engir hlutir fundust",loading:"Hleður…"},color_picker:{text_title:"Texti",background_title:"Bakgrunnur",colors:{default:"Sjálfgefið",gray:"Grár",brown:"Brúnn",red:"Rauður",orange:"Appelsínugulur",yellow:"Gulur",green:"Grænn",blue:"Blár",purple:"Fjólublár",pink:"Bleikur"}},formatting_toolbar:{bold:{tooltip:"Feitletrað",secondary_tooltip:"Mod+B"},italic:{tooltip:"Skáletrað",secondary_tooltip:"Mod+I"},underline:{tooltip:"Undirstrikað",secondary_tooltip:"Mod+U"},strike:{tooltip:"Yfirstrikað",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Kóði",secondary_tooltip:""},colors:{tooltip:"Litir"},link:{tooltip:"Búa til tengil",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Breyta myndatexta",input_placeholder:"Breyta myndatexta"},file_replace:{tooltip:{image:"Skipta um mynd",video:"Skipta um myndband",audio:"Skipta um hljóð",file:"Skipta um skrá"}},file_rename:{tooltip:{image:"Endurnefna mynd",video:"Endurnefna myndband",audio:"Endurnefna hljóð",file:"Endurnefna skrá"},input_placeholder:{image:"Endurnefna mynd",video:"Endurnefna myndband",audio:"Endurnefna hljóð",file:"Endurnefna skrá"}},file_download:{tooltip:{image:"Sækja mynd",video:"Sækja myndband",audio:"Sækja hljóð",file:"Sækja skrá"}},file_delete:{tooltip:{image:"Eyða mynd",video:"Eyða myndbandi",audio:"Eyða hljóði",file:"Eyða skrá"}},file_preview_toggle:{tooltip:"Skipta um forskoðun"},nest:{tooltip:"Fella blokk saman",secondary_tooltip:"Tab"},unnest:{tooltip:"Afþýða blokk",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Vinstrijafna texta"},align_center:{tooltip:"Miðjustilla texta"},align_right:{tooltip:"Hægrijafna texta"},align_justify:{tooltip:"Jafna texta"}},file_panel:{upload:{title:"Hlaða upp",file_placeholder:{image:"Hlaða upp mynd",video:"Hlaða upp myndband",audio:"Hlaða upp hljóð",file:"Hlaða upp skrá"},upload_error:"Villa: Upphleðsla mistókst"},embed:{title:"Innsetja",embed_button:{image:"Innsetja mynd",video:"Innsetja myndband",audio:"Innsetja hljóð",file:"Innsetja skrá"},url_placeholder:"Sláðu inn URL"}},link_toolbar:{delete:{tooltip:"Fjarlægja tengil"},edit:{text:"Breyta tengli",tooltip:"Breyta"},open:{tooltip:"Opna í nýjum flipa"},form:{title_placeholder:"Breyta titli",url_placeholder:"Breyta URL"}},generic:{ctrl_shortcut:"Ctrl"}},ja:{slash_menu:{heading:{title:"見出し1",subtext:"トップレベルの見出しに使用",aliases:["h","見出し1","h1","大見出し"],group:"見出し"},heading_2:{title:"見出し2",subtext:"重要なセクションに使用",aliases:["h2","見出し2","subheading","中見出し"],group:"見出し"},heading_3:{title:"見出し3",subtext:"セクションやグループの見出しに使用",aliases:["h3","見出し3","subheading","小見出し"],group:"見出し"},numbered_list:{title:"番号付リスト",subtext:"番号付リストを表示するために使用",aliases:["ol","li","numberedlist","numbered list","リスト","番号付リスト","番号 リスト"],group:"基本ブロック"},bullet_list:{title:"箇条書き",subtext:"箇条書きを表示するために使用",aliases:["ul","li","bulletlist","bullet list","リスト","箇条書きリスト"],group:"基本ブロック"},check_list:{title:"チェックリスト",subtext:"チェックボックス付きリストを表示するために使用されます",aliases:["ul","li","list","checklist","checked list","リスト","チェックリスト","チェックされたリスト"],group:"基本ブロック"},paragraph:{title:"標準テキスト",subtext:"本文に使用",aliases:["p","paragraph","標準テキスト"],group:"基本ブロック"},table:{title:"表",subtext:"表に使用",aliases:["table","表","テーブル"],group:"高度なブロック"},image:{title:"画像",subtext:"画像を挿入",aliases:["image","imageUpload","upload","img","picture","media","url","画像"],group:"メディア"},video:{title:"ビデオ",subtext:"ビデオを挿入",aliases:["video","videoUpload","upload","mp4","film","media","url","ビデオ"],group:"メディア"},audio:{title:"オーディオ",subtext:"オーディオを挿入",aliases:["audio","audioUpload","upload","mp3","sound","media","url","オーディオ"],group:"メディア"},file:{title:"ファイル",subtext:"ファイルを挿入",aliases:["file","upload","embed","media","url","ファイル"],group:"メディア"},emoji:{title:"絵文字",subtext:"絵文字を挿入するために使用します",aliases:["絵文字","顔文字","感情表現","顔"],group:"その他"}},placeholders:{default:"テキストを入力するか'/' を入力してコマンド選択",heading:"見出し",bulletListItem:"リストを追加",numberedListItem:"リストを追加",checkListItem:"リストを追加"},file_blocks:{image:{add_button_text:"画像を追加"},video:{add_button_text:"ビデオを追加"},audio:{add_button_text:"オーディオを追加"},file:{add_button_text:"ファイルを追加"}},side_menu:{add_block_label:"ブロックを追加",drag_handle_label:"ブロックメニュー"},drag_handle:{delete_menuitem:"削除",colors_menuitem:"色を変更"},table_handle:{delete_column_menuitem:"列を削除",delete_row_menuitem:"行を削除",add_left_menuitem:"左に列を追加",add_right_menuitem:"右に列を追加",add_above_menuitem:"上に行を追加",add_below_menuitem:"下に行を追加"},suggestion_menu:{no_items_title:"アイテムが見つかりません",loading:"読込中…"},color_picker:{text_title:"文字色",background_title:"背景色",colors:{default:"デフォルト",gray:"グレー",brown:"茶色",red:"赤",orange:"オレンジ",yellow:"黄色",green:"緑",blue:"青",purple:"紫",pink:"ピンク"}},formatting_toolbar:{bold:{tooltip:"太字",secondary_tooltip:"Mod+B"},italic:{tooltip:"斜体",secondary_tooltip:"Mod+I"},underline:{tooltip:"下線",secondary_tooltip:"Mod+U"},strike:{tooltip:"打ち消し",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"コード",secondary_tooltip:""},colors:{tooltip:"色"},link:{tooltip:"リンク",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"キャプションを編集",input_placeholder:"キャプションを編集"},file_replace:{tooltip:{image:"画像を置換",video:"ビデオを置換",audio:"オーディオを置換",file:"ファイルを置換"}},file_rename:{tooltip:{image:"画像の名前を変更",video:"ビデオの名前を変更",audio:"オーディオの名前を変更",file:"ファイルの名前を変更"},input_placeholder:{image:"画像の名前を変更",video:"ビデオの名前を変更",audio:"オーディオの名前を変更",file:"ファイルの名前を変更"}},file_download:{tooltip:{image:"画像をダウンロード",video:"ビデオをダウンロード",audio:"オーディオをダウンロード",file:"ファイルをダウンロード"}},file_delete:{tooltip:{image:"画像を削除",video:"ビデオを削除",audio:"オーディオを削除",file:"ファイルを削除"}},file_preview_toggle:{tooltip:"プレビューの切り替え"},nest:{tooltip:"インデント増",secondary_tooltip:"Tab"},unnest:{tooltip:"インデント減",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"左揃え"},align_center:{tooltip:"中央揃え"},align_right:{tooltip:"右揃え"},align_justify:{tooltip:"両端揃え"}},file_panel:{upload:{title:"アップロード",file_placeholder:{image:"画像をアップロード",video:"ビデオをアップロード",audio:"オーディオをアップロード",file:"ファイルをアップロード"},upload_error:"エラー: アップロードが失敗しました"},embed:{title:"埋め込み",embed_button:{image:"画像を埋め込む",video:"ビデオを埋め込む",audio:"オーディオを埋め込む",file:"ファイルを埋め込む"},url_placeholder:"URLを入力"}},link_toolbar:{delete:{tooltip:"リンクを解除"},edit:{text:"リンクを編集",tooltip:"編集"},open:{tooltip:"新しいタブでリンクを開く"},form:{title_placeholder:"タイトルを編集",url_placeholder:"URLを編集"}},generic:{ctrl_shortcut:"Ctrl"}},ko:{slash_menu:{heading:{title:"제목1",subtext:"섹션 제목(대)",aliases:["h","제목1","h1","대제목"],group:"제목"},heading_2:{title:"제목2",subtext:"섹션 제목(중)",aliases:["h2","제목2","중제목"],group:"제목"},heading_3:{title:"제목3",subtext:"섹션 제목(소)",aliases:["h3","제목3","subheading"],group:"제목"},numbered_list:{title:"번호 매기기 목록",subtext:"번호가 매겨진 목록을 추가합니다.",aliases:["ol","li","목록","번호 매기기 목록","번호 목록"],group:"기본 블록"},bullet_list:{title:"글머리 기호 목록",subtext:"간단한 글머리 기호를 추가합니다.",aliases:["ul","li","목록","글머리 기호 목록","글머리 목록"],group:"기본 블록"},check_list:{title:"체크리스트",subtext:"체크박스가 있는 목록을 표시하는 데 사용",aliases:["ul","li","목록","체크리스트","체크 리스트","체크된 목록","체크박스"],group:"기본 블록"},paragraph:{title:"본문",subtext:"일반 텍스트",aliases:["p","paragraph","본문"],group:"기본 블록"},table:{title:"표",subtext:"간단한 표를 추가합니다.",aliases:["표"],group:"고급"},image:{title:"이미지",subtext:"이미지 파일을 업로드합니다.",aliases:["image","imageUpload","upload","img","picture","media","이미지","url"],group:"미디어"},video:{title:"비디오",subtext:"비디오 삽입",aliases:["video","videoUpload","upload","mp4","film","media","동영상","url"],group:"미디어"},audio:{title:"오디오",subtext:"오디오 삽입",aliases:["audio","audioUpload","upload","mp3","sound","media","오디오","url"],group:"미디어"},file:{title:"파일",subtext:"파일 삽입",aliases:["file","upload","embed","media","파일","url"],group:"미디어"},emoji:{title:"이모지",subtext:"이모지 삽입용으로 사용됩니다",aliases:["이모지","emoji","감정 표현","emotion expression","표정","face expression","얼굴","face"],group:"기타"}},placeholders:{default:"텍스트를 입력하거나 /를 입력하여 명령을 입력하세요.",heading:"제목",bulletListItem:"목록",numberedListItem:"목록",checkListItem:"목록"},file_blocks:{image:{add_button_text:"이미지 추가"},video:{add_button_text:"비디오 추가"},audio:{add_button_text:"오디오 추가"},file:{add_button_text:"파일 추가"}},side_menu:{add_block_label:"블록 추가",drag_handle_label:"블록 메뉴 열기"},drag_handle:{delete_menuitem:"삭제",colors_menuitem:"색깔"},table_handle:{delete_column_menuitem:"열 1개 삭제",delete_row_menuitem:"행 삭제",add_left_menuitem:"왼쪽에 열 1개 추가",add_right_menuitem:"오른쪽에 열 1개 추가",add_above_menuitem:"위에 행 1개 추가",add_below_menuitem:"아래에 행 1개 추가"},suggestion_menu:{no_items_title:"항목을 찾을 수 없음",loading:"로딩 중…"},color_picker:{text_title:"텍스트",background_title:"배경",colors:{default:"기본",gray:"회색",brown:"갈색",red:"빨간색",orange:"주황색",yellow:"노란색",green:"녹색",blue:"파란색",purple:"보라색",pink:"분홍색"}},formatting_toolbar:{bold:{tooltip:"진하게",secondary_tooltip:"Mod+B"},italic:{tooltip:"기울임",secondary_tooltip:"Mod+I"},underline:{tooltip:"밑줄",secondary_tooltip:"Mod+U"},strike:{tooltip:"취소선",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"코드",secondary_tooltip:""},colors:{tooltip:"색깔"},link:{tooltip:"링크 만들기",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"이미지 캡션 수정",input_placeholder:"이미지 캡션 수정"},file_replace:{tooltip:{image:"이미지 교체",video:"비디오 교체",audio:"오디오 교체",file:"파일 교체"}},file_rename:{tooltip:{image:"이미지 이름 변경",video:"비디오 이름 변경",audio:"오디오 이름 변경",file:"파일 이름 변경"},input_placeholder:{image:"이미지 이름 변경",video:"비디오 이름 변경",audio:"오디오 이름 변경",file:"파일 이름 변경"}},file_download:{tooltip:{image:"이미지 다운로드",video:"비디오 다운로드",audio:"오디오 다운로드",file:"파일 다운로드"}},file_delete:{tooltip:{image:"이미지 삭제",video:"비디오 삭제",audio:"오디오 삭제",file:"파일 삭제"}},file_preview_toggle:{tooltip:"미리보기 전환"},nest:{tooltip:"중첩 블록",secondary_tooltip:"Tab"},unnest:{tooltip:"비중첩 블록",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"텍스트 왼쪽 맞춤"},align_center:{tooltip:"텍스트 가운데 맞춤"},align_right:{tooltip:"텍스트 오른쪽 맞춤"},align_justify:{tooltip:"텍스트 양쪽 맞춤"}},file_panel:{upload:{title:"업로드",file_placeholder:{image:"이미지 업로드",video:"비디오 업로드",audio:"오디오 업로드",file:"파일 업로드"},upload_error:"오류: 업로드 실패"},embed:{title:"임베드",embed_button:{image:"이미지 삽입",video:"비디오 삽입",audio:"오디오 삽입",file:"파일 삽입"},url_placeholder:"URL을 입력하세요."}},link_toolbar:{delete:{tooltip:"링크 삭제"},edit:{text:"링크 수정",tooltip:"수정"},open:{tooltip:"새 탭으로 열기"},form:{title_placeholder:"제목 수정",url_placeholder:"URL 수정"}},generic:{ctrl_shortcut:"Ctrl"}},nl:{slash_menu:{heading:{title:"Kop 1",subtext:"Gebruikt voor een hoofdkop",aliases:["h","kop1","h1"],group:"Koppen"},heading_2:{title:"Kop 2",subtext:"Gebruikt voor belangrijke secties",aliases:["h2","kop2","subkop"],group:"Koppen"},heading_3:{title:"Kop 3",subtext:"Gebruikt voor subsecties en groepskoppen",aliases:["h3","kop3","subkop"],group:"Koppen"},numbered_list:{title:"Genummerde Lijst",subtext:"Gebruikt om een genummerde lijst weer te geven",aliases:["ol","li","lijst","genummerdelijst","genummerde lijst"],group:"Basisblokken"},bullet_list:{title:"Puntenlijst",subtext:"Gebruikt om een ongeordende lijst weer te geven",aliases:["ul","li","lijst","puntenlijst","punten lijst"],group:"Basisblokken"},check_list:{title:"Controlelijst",subtext:"Gebruikt om een lijst met selectievakjes weer te geven",aliases:["ul","li","lijst","aangevinkte lijst","selectievakje"],group:"Basisblokken"},paragraph:{title:"Paragraaf",subtext:"Gebruikt voor de hoofdtekst van uw document",aliases:["p","paragraaf"],group:"Basisblokken"},table:{title:"Tabel",subtext:"Gebruikt voor tabellen",aliases:["tabel"],group:"Geavanceerd"},image:{title:"Afbeelding",subtext:"Voeg een afbeelding in",aliases:["afbeelding","imageUpload","upload","img","foto","media","url"],group:"Media"},video:{title:"Video",subtext:"Voeg een video in",aliases:["video","videoUploaden","upload","mp4","film","media","url","drive","dropbox"],group:"Media"},audio:{title:"Audio",subtext:"Voeg audio in",aliases:["audio","audioUploaden","upload","mp3","geluid","media","url"],group:"Media"},file:{title:"Bestand",subtext:"Voeg een bestand in",aliases:["bestand","upload","insluiten","media","url"],group:"Media"},emoji:{title:"Emoji",subtext:"Gebruikt voor het invoegen van een emoji",aliases:["emoji","emotie-uitdrukking","gezichtsuitdrukking","gezicht"],group:"Overig"}},placeholders:{default:"Voer tekst in of type '/' voor commando's",heading:"Kop",bulletListItem:"Lijst",numberedListItem:"Lijst",checkListItem:"Lijst"},file_blocks:{image:{add_button_text:"Afbeelding toevoegen"},video:{add_button_text:"Video toevoegen"},audio:{add_button_text:"Audio toevoegen"},file:{add_button_text:"Bestand toevoegen"}},side_menu:{add_block_label:"Nieuw blok",drag_handle_label:"Open blok menu"},drag_handle:{delete_menuitem:"Verwijder",colors_menuitem:"Kleuren"},table_handle:{delete_column_menuitem:"Verwijder kolom",delete_row_menuitem:"Verwijder rij",add_left_menuitem:"Voeg kolom links toe",add_right_menuitem:"Voeg kolom rechts toe",add_above_menuitem:"Voeg rij boven toe",add_below_menuitem:"Voeg rij onder toe"},suggestion_menu:{no_items_title:"Geen items gevonden",loading:"Laden…"},color_picker:{text_title:"Tekst",background_title:"Achtergrond",colors:{default:"Standaard",gray:"Grijs",brown:"Bruin",red:"Rood",orange:"Oranje",yellow:"Geel",green:"Groen",blue:"Blauw",purple:"Paars",pink:"Roze"}},formatting_toolbar:{bold:{tooltip:"Vet",secondary_tooltip:"Mod+B"},italic:{tooltip:"Cursief",secondary_tooltip:"Mod+I"},underline:{tooltip:"Onderstrepen",secondary_tooltip:"Mod+U"},strike:{tooltip:"Doorstrepen",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Kleuren"},link:{tooltip:"Maak link",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Bewerk onderschrift",input_placeholder:"Bewerk onderschrift"},file_replace:{tooltip:{image:"Afbeelding vervangen",video:"Video vervangen",audio:"Audio vervangen",file:"Bestand vervangen"}},file_rename:{tooltip:{image:"Afbeelding hernoemen",video:"Video hernoemen",audio:"Audio hernoemen",file:"Bestand hernoemen"},input_placeholder:{image:"Afbeelding hernoemen",video:"Video hernoemen",audio:"Audio hernoemen",file:"Bestand hernoemen"}},file_download:{tooltip:{image:"Afbeelding downloaden",video:"Video downloaden",audio:"Audio downloaden",file:"Bestand downloaden"}},file_delete:{tooltip:{image:"Afbeelding verwijderen",video:"Video verwijderen",audio:"Audio verwijderen",file:"Bestand verwijderen"}},file_preview_toggle:{tooltip:"Voorbeeldschakelaar"},nest:{tooltip:"Nest blok",secondary_tooltip:"Tab"},unnest:{tooltip:"Ontnest blok",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Tekst links uitlijnen"},align_center:{tooltip:"Tekst centreren"},align_right:{tooltip:"Tekst rechts uitlijnen"},align_justify:{tooltip:"Tekst uitvullen"}},file_panel:{upload:{title:"Upload",file_placeholder:{image:"Afbeelding uploaden",video:"Video uploaden",audio:"Audio uploaden",file:"Bestand uploaden"},upload_error:"Fout: Upload mislukt"},embed:{title:"Insluiten",embed_button:{image:"Afbeelding insluiten",video:"Video insluiten",audio:"Audio insluiten",file:"Bestand insluiten"},url_placeholder:"Voer URL in"}},link_toolbar:{delete:{tooltip:"Verwijder link"},edit:{text:"Bewerk link",tooltip:"Bewerk"},open:{tooltip:"Open in nieuw tabblad"},form:{title_placeholder:"Bewerk titel",url_placeholder:"Bewerk URL"}},generic:{ctrl_shortcut:"Ctrl"}},pl:{slash_menu:{heading:{title:"Nagłówek 1",subtext:"Używany dla nagłówka najwyższego poziomu",aliases:["h","naglowek1","h1"],group:"Nagłówki"},heading_2:{title:"Nagłówek 2",subtext:"Używany dla kluczowych sekcji",aliases:["h2","naglowek2","podnaglowek"],group:"Nagłówki"},heading_3:{title:"Nagłówek 3",subtext:"Używany dla podsekcji i grup nagłówków",aliases:["h3","naglowek3","podnaglowek"],group:"Nagłówki"},numbered_list:{title:"Lista numerowana",subtext:"Używana do wyświetlania listy numerowanej",aliases:["ol","li","lista","numerowana lista"],group:"Podstawowe bloki"},bullet_list:{title:"Lista punktowana",subtext:"Używana do wyświetlania listy bez numeracji",aliases:["ul","li","lista","punktowana lista"],group:"Podstawowe bloki"},check_list:{title:"Lista z polami wyboru",subtext:"Używana do wyświetlania listy z polami wyboru",aliases:["ul","li","lista","lista z polami wyboru","pole wyboru"],group:"Podstawowe bloki"},paragraph:{title:"Akapit",subtext:"Używany dla treści dokumentu",aliases:["p","akapit"],group:"Podstawowe bloki"},table:{title:"Tabela",subtext:"Używana do tworzenia tabel",aliases:["tabela"],group:"Zaawansowane"},image:{title:"Zdjęcie",subtext:"Wstaw zdjęcie",aliases:["obraz","wrzućZdjęcie","wrzuć","img","zdjęcie","media","url"],group:"Media"},video:{title:"Wideo",subtext:"Wstaw wideo",aliases:["wideo","wrzućWideo","wrzuć","mp4","film","media","url"],group:"Media"},audio:{title:"Audio",subtext:"Wstaw audio",aliases:["audio","wrzućAudio","wrzuć","mp3","dźwięk","media","url"],group:"Media"},file:{title:"Plik",subtext:"Wstaw plik",aliases:["plik","wrzuć","wstaw","media","url"],group:"Media"},emoji:{title:"Emoji",subtext:"Używane do wstawiania emoji",aliases:["emoji","emotka","wyrażenie emocji","twarz"],group:"Inne"}},placeholders:{default:"Wprowadź tekst lub wpisz '/' aby użyć poleceń",heading:"Nagłówek",bulletListItem:"Lista",numberedListItem:"Lista",checkListItem:"Lista"},file_blocks:{image:{add_button_text:"Dodaj zdjęcie"},video:{add_button_text:"Dodaj wideo"},audio:{add_button_text:"Dodaj audio"},file:{add_button_text:"Dodaj plik"}},side_menu:{add_block_label:"Dodaj blok",drag_handle_label:"Otwórz menu bloków"},drag_handle:{delete_menuitem:"Usuń",colors_menuitem:"Kolory"},table_handle:{delete_column_menuitem:"Usuń kolumnę",delete_row_menuitem:"Usuń wiersz",add_left_menuitem:"Dodaj kolumnę po lewej",add_right_menuitem:"Dodaj kolumnę po prawej",add_above_menuitem:"Dodaj wiersz powyżej",add_below_menuitem:"Dodaj wiersz poniżej"},suggestion_menu:{no_items_title:"Nie znaleziono elementów",loading:"Ładowanie…"},color_picker:{text_title:"Tekst",background_title:"Tło",colors:{default:"Domyślny",gray:"Szary",brown:"Brązowy",red:"Czerwony",orange:"Pomarańczowy",yellow:"Żółty",green:"Zielony",blue:"Niebieski",purple:"Fioletowy",pink:"Różowy"}},formatting_toolbar:{bold:{tooltip:"Pogrubienie",secondary_tooltip:"Mod+B"},italic:{tooltip:"Kursywa",secondary_tooltip:"Mod+I"},underline:{tooltip:"Podkreślenie",secondary_tooltip:"Mod+U"},strike:{tooltip:"Przekreślenie",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Kod",secondary_tooltip:""},colors:{tooltip:"Kolory"},link:{tooltip:"Utwórz link",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Zmień podpis",input_placeholder:"Zmień podpis"},file_replace:{tooltip:{image:"Zmień obraz",video:"Zmień wideo",audio:"Zmień audio",file:"Zmień plik"}},file_rename:{tooltip:{image:"Zmień nazwę zdjęcia",video:"Zmień nazwę wideo",audio:"Zmień nazwę audio",file:"Zmień nazwę pliku"},input_placeholder:{image:"Zmień nazwę zdjęcia",video:"Zmień nazwę wideo",audio:"Zmień nazwę audio",file:"Zmień nazwę pliku"}},file_download:{tooltip:{image:"Pobierz zdjęcie",video:"Pobierz wideo",audio:"Pobierz audio",file:"Pobierz plik"}},file_delete:{tooltip:{image:"Usuń zdjęcie",video:"Usuń wideo",audio:"Usuń audio",file:"Usuń plik"}},file_preview_toggle:{tooltip:"Przełącz podgląd"},nest:{tooltip:"Zagnieźdź blok",secondary_tooltip:"Tab"},unnest:{tooltip:"Odgagnieźdź blok",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Wyrównaj tekst do lewej"},align_center:{tooltip:"Wyśrodkuj tekst"},align_right:{tooltip:"Wyrównaj tekst do prawej"},align_justify:{tooltip:"Wyjustuj tekst"}},file_panel:{upload:{title:"Wrzuć",file_placeholder:{image:"Wrzuć zdjęcie",video:"Wrzuć wideo",audio:"Wrzuć audio",file:"Wrzuć plik"},upload_error:"Błąd: Przesyłanie nie powiodło się"},embed:{title:"Wstaw",embed_button:{image:"Wstaw zdjęice",video:"Wstaw wideo",audio:"Wstaw audio",file:"Wstaw plik"},url_placeholder:"Wprowadź URL"}},link_toolbar:{delete:{tooltip:"Usuń link"},edit:{text:"Edytuj link",tooltip:"Edytuj"},open:{tooltip:"Otwórz w nowej karcie"},form:{title_placeholder:"Edytuj tytuł",url_placeholder:"Edytuj URL"}},generic:{ctrl_shortcut:"Ctrl"}},pt:{slash_menu:{heading:{title:"Título",subtext:"Usado para um título de nível superior",aliases:["h","titulo1","h1"],group:"Títulos"},heading_2:{title:"Título 2",subtext:"Usado para seções principais",aliases:["h2","titulo2","subtitulo"],group:"Títulos"},heading_3:{title:"Título 3",subtext:"Usado para subseções e títulos de grupo",aliases:["h3","titulo3","subtitulo"],group:"Títulos"},numbered_list:{title:"Lista Numerada",subtext:"Usado para exibir uma lista numerada",aliases:["ol","li","lista","listanumerada","lista numerada"],group:"Blocos Básicos"},bullet_list:{title:"Lista com Marcadores",subtext:"Usado para exibir uma lista não ordenada",aliases:["ul","li","lista","listamarcadores","lista com marcadores"],group:"Blocos Básicos"},check_list:{title:"Lista de verificação",subtext:"Usado para exibir uma lista com caixas de seleção",aliases:["ul","li","lista","lista de verificação","lista marcada","caixa de seleção"],group:"Blocos Básicos"},paragraph:{title:"Parágrafo",subtext:"Usado para o corpo do seu documento",aliases:["p","paragrafo"],group:"Blocos Básicos"},table:{title:"Tabela",subtext:"Usado para tabelas",aliases:["tabela"],group:"Avançado"},image:{title:"Imagem",subtext:"Inserir uma imagem",aliases:["imagem","uploadImagem","upload","img","foto","media","url"],group:"Mídia"},video:{title:"Vídeo",subtext:"Inserir um vídeo",aliases:["vídeo","uploadVídeo","upload","mp4","filme","mídia","url"],group:"Mídia"},audio:{title:"Áudio",subtext:"Inserir um áudio",aliases:["áudio","uploadÁudio","upload","mp3","som","mídia","url"],group:"Mídia"},file:{title:"Arquivo",subtext:"Inserir um arquivo",aliases:["arquivo","upload","incorporar","mídia","url"],group:"Mídia"},emoji:{title:"Emoji",subtext:"Usado para inserir um emoji",aliases:["emoji","emoticon","expressão emocional","rosto"],group:"Outros"}},placeholders:{default:"Digite texto ou use '/' para comandos",heading:"Título",bulletListItem:"Lista",numberedListItem:"Lista",checkListItem:"Lista"},file_blocks:{image:{add_button_text:"Adicionar imagem"},video:{add_button_text:"Adicionar vídeo"},audio:{add_button_text:"Adicionar áudio"},file:{add_button_text:"Adicionar arquivo"}},side_menu:{add_block_label:"Adicionar bloco",drag_handle_label:"Abrir menu do bloco"},drag_handle:{delete_menuitem:"Excluir",colors_menuitem:"Cores"},table_handle:{delete_column_menuitem:"Excluir coluna",delete_row_menuitem:"Excluir linha",add_left_menuitem:"Adicionar coluna à esquerda",add_right_menuitem:"Adicionar coluna à direita",add_above_menuitem:"Adicionar linha acima",add_below_menuitem:"Adicionar linha abaixo"},suggestion_menu:{no_items_title:"Nenhum item encontrado",loading:"Carregando…"},color_picker:{text_title:"Texto",background_title:"Fundo",colors:{default:"Padrão",gray:"Cinza",brown:"Marrom",red:"Vermelho",orange:"Laranja",yellow:"Amarelo",green:"Verde",blue:"Azul",purple:"Roxo",pink:"Rosa"}},formatting_toolbar:{bold:{tooltip:"Negrito",secondary_tooltip:"Mod+B"},italic:{tooltip:"Itálico",secondary_tooltip:"Mod+I"},underline:{tooltip:"Sublinhado",secondary_tooltip:"Mod+U"},strike:{tooltip:"Riscado",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Código",secondary_tooltip:""},colors:{tooltip:"Cores"},link:{tooltip:"Criar link",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Editar legenda",input_placeholder:"Editar legenda"},file_replace:{tooltip:{image:"Substituir imagem",video:"Substituir vídeo",audio:"Substituir áudio",file:"Substituir arquivo"}},file_rename:{tooltip:{image:"Renomear imagem",video:"Renomear vídeo",audio:"Renomear áudio",file:"Renomear arquivo"},input_placeholder:{image:"Renomear imagem",video:"Renomear vídeo",audio:"Renomear áudio",file:"Renomear arquivo"}},file_download:{tooltip:{image:"Baixar imagem",video:"Baixar vídeo",audio:"Baixar áudio",file:"Baixar arquivo"}},file_delete:{tooltip:{image:"Excluir imagem",video:"Excluir vídeo",audio:"Excluir áudio",file:"Excluir arquivo"}},file_preview_toggle:{tooltip:"Alternar visualização"},nest:{tooltip:"Aninhar bloco",secondary_tooltip:"Tab"},unnest:{tooltip:"Desaninhar bloco",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Alinhar à esquerda"},align_center:{tooltip:"Alinhar ao centro"},align_right:{tooltip:"Alinhar à direita"},align_justify:{tooltip:"Justificar texto"}},file_panel:{upload:{title:"Upload",file_placeholder:{image:"Upload de imagem",video:"Upload de vídeo",audio:"Upload de áudio",file:"Upload de arquivo"},upload_error:"Erro: Falha no upload"},embed:{title:"Incorporar",embed_button:{image:"Incorporar imagem",video:"Incorporar vídeo",audio:"Incorporar áudio",file:"Incorporar arquivo"},url_placeholder:"Insira a URL"}},link_toolbar:{delete:{tooltip:"Remover link"},edit:{text:"Editar link",tooltip:"Editar"},open:{tooltip:"Abrir em nova aba"},form:{title_placeholder:"Editar título",url_placeholder:"Editar URL"}},generic:{ctrl_shortcut:"Ctrl"}},ru:{slash_menu:{heading:{title:"Заголовок 1 уровня",subtext:"Используется для заголовка верхнего уровня",aliases:["h","heading1","h1","заголовок1"],group:"Заголовки"},heading_2:{title:"Заголовок 2 уровня",subtext:"Используется для ключевых разделов",aliases:["h2","heading2","subheading","заголовок2","подзаголовок"],group:"Заголовки"},heading_3:{title:"Заголовок 3 уровня",subtext:"Используется для подразделов и групп",aliases:["h3","heading3","subheading","заголовок3","подзаголовок"],group:"Заголовки"},numbered_list:{title:"Нумерованный список",subtext:"Используется для отображения нумерованного списка",aliases:["ol","li","list","numberedlist","numbered list","список","нумерованный список"],group:"Базовые блоки"},bullet_list:{title:"Маркированный список",subtext:"Для отображения неупорядоченного списка.",aliases:["ul","li","list","bulletlist","bullet list","список","маркированный список"],group:"Базовые блоки"},check_list:{title:"Контрольный список",subtext:"Для отображения списка с флажками",aliases:["ul","li","list","checklist","check list","checked list","checkbox","список"],group:"Базовые блоки"},paragraph:{title:"Параграф",subtext:"Основной текст",aliases:["p","paragraph","параграф"],group:"Базовые блоки"},table:{title:"Таблица",subtext:"Используется для таблиц",aliases:["table","таблица"],group:"Продвинутый"},image:{title:"Картинка",subtext:"Вставить изображение",aliases:["image","imageUpload","upload","img","picture","media","url","загрузка","картинка","рисунок"],group:"Медиа"},video:{title:"Видео",subtext:"Вставить видео",aliases:["video","videoUpload","upload","mp4","film","media","url","загрузка","видео"],group:"Медиа"},audio:{title:"Аудио",subtext:"Вставить аудио",aliases:["audio","audioUpload","upload","mp3","sound","media","url","загрузка","аудио","звук","музыка"],group:"Медиа"},file:{title:"Файл",subtext:"Вставить файл",aliases:["file","upload","embed","media","url","загрузка","файл"],group:"Медиа"},emoji:{title:"Эмодзи",subtext:"Используется для вставки эмодзи",aliases:["эмодзи","смайлик","выражение эмоций","лицо"],group:"Прочее"}},placeholders:{default:"Ведите текст или введите «/» для команд",heading:"Заголовок",bulletListItem:"Список",numberedListItem:"Список",checkListItem:"Список"},file_blocks:{image:{add_button_text:"Добавить изображение"},video:{add_button_text:"Добавить видео"},audio:{add_button_text:"Добавить аудио"},file:{add_button_text:"Добавить файл"}},side_menu:{add_block_label:"Добавить блок",drag_handle_label:"Открыть меню блока"},drag_handle:{delete_menuitem:"Удалить",colors_menuitem:"Цвета"},table_handle:{delete_column_menuitem:"Удалить столбец",delete_row_menuitem:"Удалить строку",add_left_menuitem:"Добавить столбец слева",add_right_menuitem:"Добавить столбец справа",add_above_menuitem:"Добавить строку выше",add_below_menuitem:"Добавить строку ниже"},suggestion_menu:{no_items_title:"ничего не найдено",loading:"Загрузка…"},color_picker:{text_title:"Текст",background_title:"Задний фон",colors:{default:"По умолчинию",gray:"Серый",brown:"Коричневый",red:"Красный",orange:"Оранжевый",yellow:"Жёлтый",green:"Зелёный",blue:"Голубой",purple:"Фиолетовый",pink:"Розовый"}},formatting_toolbar:{bold:{tooltip:"Жирный",secondary_tooltip:"Mod+B"},italic:{tooltip:"Курсив",secondary_tooltip:"Mod+I"},underline:{tooltip:"Подчёркнутый",secondary_tooltip:"Mod+U"},strike:{tooltip:"Зачёркнутый",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Код",secondary_tooltip:""},colors:{tooltip:"Цвета"},link:{tooltip:"Создать ссылку",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Изменить подпись",input_placeholder:"Изменить подпись"},file_replace:{tooltip:{image:"Заменить изображение",video:"Заменить видео",audio:"Заменить аудио",file:"Заменить файл"}},file_rename:{tooltip:{image:"Переименовать изображение",video:"Переименовать видео",audio:"Переименовать аудио",file:"Переименовать файл"},input_placeholder:{image:"Переименовать изображение",video:"Переименовать видео",audio:"Переименовать аудио",file:"Переименовать файл"}},file_download:{tooltip:{image:"Скачать картинку",video:"Скачать видео",audio:"Скачать аудио",file:"Скачать файл"}},file_delete:{tooltip:{image:"Удалить картинку",video:"Удалить видео",audio:"Удалить аудио",file:"Скачать файл"}},file_preview_toggle:{tooltip:"Переключить предварительный просмотр"},nest:{tooltip:"Сдвинуть вправо",secondary_tooltip:"Tab"},unnest:{tooltip:"Сдвинуть влево",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Текст по левому краю"},align_center:{tooltip:"Текст по середине"},align_right:{tooltip:"Текст по правому краю"},align_justify:{tooltip:"По середине текст"}},file_panel:{upload:{title:"Загрузить",file_placeholder:{image:"Загрузить картинки",video:"Загрузить видео",audio:"Загрузить аудио",file:"Загрузить файл"},upload_error:"Ошибка: не удалось загрузить"},embed:{title:"Вставить",embed_button:{image:"Вставить картинку",video:"Вставить видео",audio:"Вставить аудио",file:"Вставить файл"},url_placeholder:"Введите URL"}},link_toolbar:{delete:{tooltip:"Удалить ссылку"},edit:{text:"Изменить ссылку",tooltip:"Редактировать"},open:{tooltip:"Открыть в новой вкладке"},form:{title_placeholder:"Изменить заголовок",url_placeholder:"Изменить URL"}},generic:{ctrl_shortcut:"Ctrl"}},vi:{slash_menu:{heading:{title:"Tiêu đề H1",subtext:"Sử dụng cho tiêu đề cấp cao nhất",aliases:["h","tieude1","dd1"],group:"Tiêu đề"},heading_2:{title:"Tiêu đề H2",subtext:"Sử dụng cho các phần chính",aliases:["h2","tieude2","tieudephu"],group:"Tiêu đề"},heading_3:{title:"Tiêu đề H3",subtext:"Sử dụng cho phụ đề và tiêu đề nhóm",aliases:["h3","tieude3","tieudephu"],group:"Tiêu đề"},numbered_list:{title:"Danh sách đánh số",subtext:"Sử dụng để hiển thị danh sách có đánh số",aliases:["ol","li","ds","danhsachdso","danh sach danh so"],group:"Khối cơ bản"},bullet_list:{title:"Danh sách",subtext:"Sử dụng để hiển thị danh sách không đánh số",aliases:["ul","li","ds","danhsach","danh sach"],group:"Khối cơ bản"},check_list:{title:"Danh sách kiểm tra",subtext:"Dùng để hiển thị danh sách có hộp kiểm",aliases:["ul","li","danh sach","danh sach kiem tra","danh sach da kiem tra","hop kiem"],group:"Khối cơ bản"},paragraph:{title:"Đoạn văn",subtext:"Sử dụng cho nội dung chính của tài liệu",aliases:["p","doanvan"],group:"Khối cơ bản"},table:{title:"Bảng",subtext:"Sử dụng để tạo bảng",aliases:["bang"],group:"Nâng cao"},image:{title:"Hình ảnh",subtext:"Chèn hình ảnh",aliases:["anh","tai-len-anh","tai-len","img","hinh","media","url"],group:"Phương tiện"},video:{title:"Video",subtext:"Chèn video",aliases:["video","tai-len-video","tai-len","mp4","phim","media","url"],group:"Phương tiện"},audio:{title:"Âm thanh",subtext:"Chèn âm thanh",aliases:["âm thanh","tai-len-am-thanh","tai-len","mp3","am thanh","media","url"],group:"Phương tiện"},file:{title:"Tệp",subtext:"Chèn tệp",aliases:["tep","tai-len","nhung","media","url"],group:"Phương tiện"},emoji:{title:"Biểu tượng cảm xúc",subtext:"Dùng để chèn biểu tượng cảm xúc",aliases:["biểu tượng cảm xúc","emoji","emoticon","cảm xúc expression","khuôn mặt","face"],group:"Khác"}},placeholders:{default:"Nhập văn bản hoặc gõ '/' để thêm định dạng",heading:"Tiêu đề",bulletListItem:"Danh sách",numberedListItem:"Danh sách",checkListItem:"Danh sách"},file_blocks:{image:{add_button_text:"Thêm ảnh"},video:{add_button_text:"Thêm video"},audio:{add_button_text:"Thêm âm thanh"},file:{add_button_text:"Thêm tệp"}},side_menu:{add_block_label:"Thêm khối",drag_handle_label:"Mở trình đơn khối"},drag_handle:{delete_menuitem:"Xóa",colors_menuitem:"Màu sắc"},table_handle:{delete_column_menuitem:"Xóa cột",delete_row_menuitem:"Xóa hàng",add_left_menuitem:"Thêm cột bên trái",add_right_menuitem:"Thêm cột bên phải",add_above_menuitem:"Thêm hàng phía trên",add_below_menuitem:"Thêm hàng phía dưới"},suggestion_menu:{no_items_title:"Không tìm thấy mục nào",loading:"Đang tải..."},color_picker:{text_title:"Văn bản",background_title:"Nền",colors:{default:"Mặc định",gray:"Xám",brown:"Nâu",red:"Đỏ",orange:"Cam",yellow:"Vàng",green:"Xanh lá",blue:"Xanh dương",purple:"Tím",pink:"Hồng"}},formatting_toolbar:{bold:{tooltip:"In đậm",secondary_tooltip:"Mod+B"},italic:{tooltip:"In nghiêng",secondary_tooltip:"Mod+I"},underline:{tooltip:"Gạch dưới",secondary_tooltip:"Mod+U"},strike:{tooltip:"Gạch ngang",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"Code",secondary_tooltip:""},colors:{tooltip:"Màu sắc"},link:{tooltip:"Tạo liên kết",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"Chỉnh sửa chú thích",input_placeholder:"Chỉnh sửa chú thích"},file_replace:{tooltip:{image:"Thay thế hình ảnh",video:"Thay thế video",audio:"Thay thế âm thanh",file:"Thay thế tệp"}},file_rename:{tooltip:{image:"Đổi tên hình ảnh",video:"Đổi tên video",audio:"Đổi tên âm thanh",file:"Đổi tên tệp"},input_placeholder:{image:"Đổi tên hình ảnh",video:"Đổi tên video",audio:"Đổi tên âm thanh",file:"Đổi tên tệp"}},file_download:{tooltip:{image:"Tải xuống hình ảnh",video:"Tải xuống video",audio:"Tải xuống âm thanh",file:"Tải xuống tệp"}},file_delete:{tooltip:{image:"Xóa hình ảnh",video:"Xóa video",audio:"Xóa âm thanh",file:"Xóa tệp"}},file_preview_toggle:{tooltip:"Chuyển đổi xem trước"},nest:{tooltip:"Lồng khối",secondary_tooltip:"Tab"},unnest:{tooltip:"Bỏ lồng khối",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"Căn trái văn bản"},align_center:{tooltip:"Căn giữa văn bản"},align_right:{tooltip:"Căn phải văn bản"},align_justify:{tooltip:"Căn đều văn bản"}},file_panel:{upload:{title:"Tải lên",file_placeholder:{image:"Tải lên hình ảnh",video:"Tải lên video",audio:"Tải lên âm thanh",file:"Tải lên tệp"},upload_error:"Lỗi: Tải lên thất bại"},embed:{title:"Nhúng",embed_button:{image:"Nhúng hình ảnh",video:"Nhúng video",audio:"Nhúng âm thanh",file:"Nhúng tệp"},url_placeholder:"Nhập URL"}},link_toolbar:{delete:{tooltip:"Xóa liên kết"},edit:{text:"Chỉnh sửa liên kết",tooltip:"Chỉnh sửa"},open:{tooltip:"Mở trong tab mới"},form:{title_placeholder:"Chỉnh sửa tiêu đề",url_placeholder:"Chỉnh sửa URL"}},generic:{ctrl_shortcut:"Ctrl"}},zh:{slash_menu:{heading:{title:"一级标题",subtext:"用于顶级标题",aliases:["h","heading1","h1","标题","一级标题"],group:"标题"},heading_2:{title:"二级标题",subtext:"用于关键部分",aliases:["h2","heading2","subheading","标题","二级标题","副标题"],group:"标题"},heading_3:{title:"三级标题",subtext:"用于小节和分组标题",aliases:["h3","heading3","subheading","标题","三级标题"],group:"标题"},numbered_list:{title:"有序列表",subtext:"用于显示有序列表",aliases:["ol","li","list","numberedlist","numbered list","列表","有序列表"],group:"基础"},bullet_list:{title:"无序列表",subtext:"用于显示无序列表",aliases:["ul","li","list","bulletlist","bullet list","列表","无序列表"],group:"基础"},check_list:{title:"检查清单",subtext:"用于显示带有复选框的列表",aliases:["ul","li","checklist","checked list","列表","检查清单","勾选列表","复选框"],group:"基础"},paragraph:{title:"段落",subtext:"用于文档正文",aliases:["p","paragraph","text","正文"],group:"基础"},table:{title:"表格",subtext:"使用表格",aliases:["table","表格"],group:"高级功能"},image:{title:"图片",subtext:"插入图片",aliases:["图片","上传图片","上传","image","img","相册","媒体","url"],group:"媒体"},video:{title:"视频",subtext:"插入视频",aliases:["视频","视频上传","上传","video","mp4","电影","媒体","url","驱动","dropbox"],group:"媒体"},audio:{title:"音频",subtext:"插入音频",aliases:["音频","音频上传","上传","audio","mp3","声音","媒体","url","驱动","dropbox"],group:"媒体"},file:{title:"文件",subtext:"插入文件",aliases:["文件","上传","file","嵌入","媒体","url"],group:"媒体"},emoji:{title:"表情符号",subtext:"用于插入表情符号",aliases:["表情符号","emoji","face","emote","表情","表情表达","表情"],group:"其他"}},placeholders:{default:"输入 '/' 以使用命令",heading:"标题",bulletListItem:"列表",numberedListItem:"列表",checkListItem:"列表"},file_blocks:{image:{add_button_text:"添加图片"},video:{add_button_text:"添加视频"},audio:{add_button_text:"添加音频"},file:{add_button_text:"添加文件"}},side_menu:{add_block_label:"添加块",drag_handle_label:"打开菜单"},drag_handle:{delete_menuitem:"删除",colors_menuitem:"颜色"},table_handle:{delete_column_menuitem:"删除列",delete_row_menuitem:"删除行",add_left_menuitem:"左侧添加列",add_right_menuitem:"右侧添加列",add_above_menuitem:"上方添加行",add_below_menuitem:"下方添加行"},suggestion_menu:{no_items_title:"无匹配项",loading:"加载中…"},color_picker:{text_title:"文本",background_title:"背景色",colors:{default:"默认",gray:"灰色",brown:"棕色",red:"红色",orange:"橙色",yellow:"黄色",green:"绿色",blue:"蓝色",purple:"紫色",pink:"粉色"}},formatting_toolbar:{bold:{tooltip:"加粗",secondary_tooltip:"Mod+B"},italic:{tooltip:"斜体",secondary_tooltip:"Mod+I"},underline:{tooltip:"下划线",secondary_tooltip:"Mod+U"},strike:{tooltip:"删除线",secondary_tooltip:"Mod+Shift+X"},code:{tooltip:"代码标记",secondary_tooltip:""},colors:{tooltip:"颜色"},link:{tooltip:"添加链接",secondary_tooltip:"Mod+K"},file_caption:{tooltip:"编辑标题",input_placeholder:"编辑标题"},file_replace:{tooltip:{image:"替换图片",video:"替换视频",audio:"替换音频",file:"替换文件"}},file_rename:{tooltip:{image:"重命名图片",video:"重命名视频",audio:"重命名音频",file:"重命名文件"},input_placeholder:{image:"重命名图片",video:"重命名视频",audio:"重命名音频",file:"重命名文件"}},file_download:{tooltip:{image:"下载图片",video:"下载视频",audio:"下载音频",file:"下载文件"}},file_delete:{tooltip:{image:"删除图片",video:"删除视频",audio:"删除音频",file:"删除文件"}},file_preview_toggle:{tooltip:"切换预览"},nest:{tooltip:"嵌套",secondary_tooltip:"Tab"},unnest:{tooltip:"取消嵌套",secondary_tooltip:"Shift+Tab"},align_left:{tooltip:"左对齐"},align_center:{tooltip:"居中"},align_right:{tooltip:"右对齐"},align_justify:{tooltip:"文本对齐"}},file_panel:{upload:{title:"上传",file_placeholder:{image:"上传图片",video:"上传视频",audio:"上传音频",file:"上传文件"},upload_error:"Error:上传失败"},embed:{title:"嵌入",embed_button:{image:"嵌入图片",video:"嵌入视频",audio:"嵌入音频",file:"嵌入文件"},url_placeholder:"输入图片地址"}},link_toolbar:{delete:{tooltip:"清除链接"},edit:{text:"编辑链接",tooltip:"编辑"},open:{tooltip:"新窗口打开"},form:{title_placeholder:"编辑标题",url_placeholder:"编辑链接地址"}},generic:{ctrl_shortcut:"Ctrl"}}},Symbol.toStringTag,{value:"Module"}));d.esmDependencies=void 0;async function G(){if(d.esmDependencies)return d.esmDependencies;const e=await Promise.all([import("rehype-parse"),import("rehype-stringify"),import("unified"),import("hast-util-from-dom"),import("rehype-remark"),import("remark-gfm"),import("remark-stringify"),import("remark-parse"),import("remark-rehype"),import("rehype-format")]);return d.esmDependencies={rehypeParse:e[0],rehypeStringify:e[1],unified:e[2],hastUtilFromDom:e[3],rehypeRemark:e[4],remarkGfm:e[5],remarkStringify:e[6],remarkParse:e[7],remarkRehype:e[8],rehypeFormat:e[9]},d.esmDependencies}function Ki(e,t=JSON.stringify){const i={};return e.filter(o=>{const n=t(o);return Object.prototype.hasOwnProperty.call(i,n)?!1:i[n]=!0})}function Gi(e){const t=e.filter((o,n)=>e.indexOf(o)!==n);return Ki(t)}const q=g.Extension.create({name:"uniqueID",priority:1e4,addOptions(){return{attributeName:"id",types:[],generateID:()=>{if(typeof window<"u"&&window.__TEST_OPTIONS){const e=window.__TEST_OPTIONS;return e.mockID===void 0?e.mockID=0:e.mockID++,e.mockID.toString()}return bi.v4()},filterTransaction:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{[this.options.attributeName]:{default:null,parseHTML:e=>e.getAttribute(`data-${this.options.attributeName}`),renderHTML:e=>({[`data-${this.options.attributeName}`]:e[this.options.attributeName]})}}}]},addProseMirrorPlugins(){let e=null,t=!1;return[new _.Plugin({key:new _.PluginKey("uniqueID"),appendTransaction:(i,o,n)=>{const r=i.some(k=>k.docChanged)&&!o.doc.eq(n.doc),a=this.options.filterTransaction&&i.some(k=>{let b,v;return!(!((v=(b=this.options).filterTransaction)===null||v===void 0)&&v.call(b,k))});if(!r||a)return;const{tr:l}=n,{types:s,attributeName:c,generateID:p}=this.options,h=g.combineTransactionSteps(o.doc,i),{mapping:m}=h;if(g.getChangedRanges(h).forEach(({newRange:k})=>{const b=g.findChildrenInRange(n.doc,k,P=>s.includes(P.type.name)),v=b.map(({node:P})=>P.attrs[c]).filter(P=>P!==null),x=Gi(v);b.forEach(({node:P,pos:V})=>{let ae;const mi=(ae=l.doc.nodeAt(V))===null||ae===void 0?void 0:ae.attrs[c];if(mi===null){const fi=o.doc.type.createAndFill().content;if(o.doc.content.findDiffStart(fi)===null){const gi=JSON.parse(JSON.stringify(n.doc.toJSON()));if(gi.content[0].content[0].attrs.id="initialBlockId",JSON.stringify(gi.content)===JSON.stringify(fi.toJSON())){l.setNodeMarkup(V,void 0,{...P.attrs,[c]:"initialBlockId"});return}}l.setNodeMarkup(V,void 0,{...P.attrs,[c]:p()});return}const{deleted:Ln}=m.invert().mapResult(V);Ln&&x.includes(mi)&&l.setNodeMarkup(V,void 0,{...P.attrs,[c]:p()})})}),!!l.steps.length)return l},view(i){const o=n=>{let r;e=!((r=i.dom.parentElement)===null||r===void 0)&&r.contains(n.target)?i.dom.parentElement:null};return window.addEventListener("dragstart",o),{destroy(){window.removeEventListener("dragstart",o)}}},props:{handleDOMEvents:{drop:(i,o)=>{let n;return(e!==i.dom.parentElement||((n=o.dataTransfer)===null||n===void 0?void 0:n.effectAllowed)==="copy")&&(e=null,t=!0),!1},paste:()=>(t=!0,!1)},transformPasted:i=>{if(!t)return i;const{types:o,attributeName:n}=this.options,r=a=>{const l=[];return a.forEach(s=>{if(s.isText){l.push(s);return}if(!o.includes(s.type.name)){l.push(s.copy(r(s.content)));return}const c=s.type.create({...s.attrs,[n]:null},r(s.content),s.marks);l.push(c)}),y.Fragment.from(l)};return t=!1,new y.Slice(r(i.content),i.openStart,i.openEnd)}}})]}});function qe(e){const t=e.attrs.id,i=e.firstChild,o=i.type,n=e.childCount===2?e.lastChild.childCount:0;return{id:t,node:e,contentNode:i,contentType:o,numChildBlocks:n}}function w(e,t){const o=e.nodeSize-2;if(t<=1)for(t=2;e.resolve(t).parent.type.name!=="blockContainer"&&t<o;)t++;else if(t>=o)for(t=o-1;e.resolve(t).parent.type.name!=="blockContainer"&&t>1;)t--;e.resolve(t).parent.type.name==="blockGroup"&&t++;const n=e.resolve(t),r=n.depth;let a=n.node(r),l=r;for(;;){if(l<0)throw new Error("Could not find blockContainer node. This can only happen if the underlying BlockNote schema has been edited.");if(a.type.name==="blockContainer")break;l-=1,a=n.node(l)}const{id:s,contentNode:c,contentType:p,numChildBlocks:h}=qe(a),m=n.start(l),f=n.end(l);return{id:s,node:a,contentNode:c,contentType:p,numChildBlocks:h,startPos:m,endPos:f,depth:l}}function fe(e){return e.type==="link"}function ge(e){return typeof e!="string"&&e.type==="link"}function W(e){return typeof e!="string"&&e.type==="text"}class I extends Error{constructor(t){super(`Unreachable case: ${t}`)}}function qi(e,t=!0){const{"data-test":i,...o}=e;if(Object.keys(o).length>0&&t)throw new Error("Object must be empty "+JSON.stringify(e))}function We(e,t,i){const o=[];for(const[n,r]of Object.entries(e.styles)){const a=i[n];if(!a)throw new Error(`style ${n} not found in styleSchema`);if(a.propSchema==="boolean")o.push(t.mark(n));else if(a.propSchema==="string")o.push(t.mark(n,{stringValue:r}));else throw new I(a.propSchema)}return e.text.split(/(\n)/g).filter(n=>n.length>0).map(n=>n===`
2
+ `?t.nodes.hardBreak.create():t.text(n,o))}function Wi(e,t,i){const o=t.marks.link.create({href:e.href});return be(e.content,t,i).map(n=>{if(n.type.name==="text")return n.mark([...n.marks,o]);if(n.type.name==="hardBreak")return n;throw new Error("unexpected node type")})}function be(e,t,i){const o=[];if(typeof e=="string")return o.push(...We({type:"text",text:e,styles:{}},t,i)),o;for(const n of e)o.push(...We(n,t,i));return o}function F(e,t,i){const o=[];for(const n of e)typeof n=="string"?o.push(...be(n,t,i)):ge(n)?o.push(...Wi(n,t,i)):W(n)?o.push(...be([n],t,i)):o.push($e(n,t,i));return o}function ke(e,t,i){const o=[];for(const n of e.rows){const r=[];for(const l of n.cells){let s;if(!l)s=t.nodes.tableParagraph.create({});else if(typeof l=="string")s=t.nodes.tableParagraph.create({},t.text(l));else{const p=F(l,t,i);s=t.nodes.tableParagraph.create({},p)}const c=t.nodes.tableCell.create({},s);r.push(c)}const a=t.nodes.tableRow.create({},r);o.push(a)}return o}function $e(e,t,i){let o,n=e.type;if(n===void 0&&(n="paragraph"),!t.nodes[n])throw new Error(`node type ${n} not found in schema`);if(!e.content)o=t.nodes[n].create(e.props);else if(typeof e.content=="string"){const r=F([e.content],t,i);o=t.nodes[n].create(e.props,r)}else if(Array.isArray(e.content)){const r=F(e.content,t,i);o=t.nodes[n].create(e.props,r)}else if(e.content.type==="tableContent"){const r=ke(e.content,t,i);o=t.nodes[n].create(e.props,r)}else throw new I(e.content.type);return o}function N(e,t,i){let o=e.id;o===void 0&&(o=q.options.generateID());const n=$e(e,t,i),r=[];if(e.children)for(const l of e.children)r.push(N(l,t,i));const a=t.nodes.blockGroup.create({},r);return t.nodes.blockContainer.create({id:o,...e.props},r.length>0?[n,a]:n)}function $i(e,t,i){const o={type:"tableContent",rows:[]};return e.content.forEach(n=>{const r={cells:[]};n.content.forEach(a=>{r.cells.push(le(a.firstChild,t,i))}),o.rows.push(r)}),o}function le(e,t,i){const o=[];let n;return e.content.forEach(r=>{if(r.type.name==="hardBreak"){if(n)if(W(n))n.text+=`
3
+ `;else if(fe(n))n.content[n.content.length-1].text+=`
4
4
  `;else throw new Error("unexpected");else n={type:"text",text:`
5
- `,styles:{}};return}if(r.type.name!=="link"&&r.type.name!=="text"&&t[r.type.name]){n&&(o.push(n),n=void 0),o.push(we(r,t,i));return}const a={};let l;for(const s of r.marks)if(s.type.name==="link")l=s;else{const c=i[s.type.name];if(!c)throw new Error(`style ${s.type.name} not found in styleSchema`);if(c.propSchema==="boolean")a[c.type]=!0;else if(c.propSchema==="string")a[c.type]=s.attrs.stringValue;else throw new I(c.propSchema)}n?W(n)?l?(o.push(n),n={type:"link",href:l.attrs.href,content:[{type:"text",text:r.textContent,styles:a}]}):JSON.stringify(n.styles)===JSON.stringify(a)?n.text+=r.textContent:(o.push(n),n={type:"text",text:r.textContent,styles:a}):be(n)&&(l?n.href===l.attrs.href?JSON.stringify(n.content[n.content.length-1].styles)===JSON.stringify(a)?n.content[n.content.length-1].text+=r.textContent:n.content.push({type:"text",text:r.textContent,styles:a}):(o.push(n),n={type:"link",href:l.attrs.href,content:[{type:"text",text:r.textContent,styles:a}]}):(o.push(n),n={type:"text",text:r.textContent,styles:a})):l?n={type:"link",href:l.attrs.href,content:[{type:"text",text:r.textContent,styles:a}]}:n={type:"text",text:r.textContent,styles:a}}),n&&o.push(n),o}function we(e,t,i){if(e.type.name==="text"||e.type.name==="link")throw new Error("unexpected");const o={},n=t[e.type.name];for(const[l,s]of Object.entries(e.attrs)){if(!n)throw Error("ic node is of an unrecognized type: "+e.type.name);const c=n.propSchema;l in c&&(o[l]=s)}let r;return n.content==="styled"?r=le(e,t,i):r=void 0,{type:e.type.name,props:o,content:r}}function E(e,t,i,o,n){if(e.type.name!=="blockContainer")throw Error("Node must be of type blockContainer, but is of type"+e.type.name+".");const r=n==null?void 0:n.get(e);if(r)return r;const a=Je(e);let l=a.id;l===null&&(l=q.options.generateID());const s={};for(const[g,f]of Object.entries({...e.attrs,...a.contentNode.attrs})){const k=t[a.contentType.name];if(!k)throw Error("Block is of an unrecognized type: "+a.contentType.name);const w=k.propSchema;g in w&&(s[g]=f)}const c=t[a.contentType.name],p=[];for(let g=0;g<a.numChildBlocks;g++)p.push(E(e.lastChild.child(g),t,i,o,n));let h;if(c.content==="inline")h=le(a.contentNode,i,o);else if(c.content==="table")h=so(a.contentNode,i,o);else if(c.content==="none")h=void 0;else throw new I(c.content);const m={id:l,type:c.type,props:s,content:h,children:p};return n==null||n.set(e,m),m}function co(e){return e.document||window.document}const et=(e,t,i,o,n)=>{if(!i.nodes[e.type.name])throw new Error("Serializer is missing a node type: "+e.type.name);const{dom:r,contentDOM:a}=y.DOMSerializer.renderSpec(co(t),i.nodes[e.type.name](e));if(a){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");if(e.type.name==="blockContainer"){const l=e.childCount>0&&e.firstChild.type.spec.group==="blockContent"?e.firstChild:void 0,s=e.childCount>0&&e.lastChild.type.spec.group==="blockGroup"?e.lastChild:void 0;if(l!==void 0){const c=o.blockImplementations[l.type.name].implementation,h=(n?c.toExternalHTML:c.toInternalHTML)(E(e,o.schema.blockSchema,o.schema.inlineContentSchema,o.schema.styleSchema,o.blockCache),o);if(h.contentDOM!==void 0){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");h.contentDOM.appendChild(i.serializeFragment(l.content,t))}a.appendChild(h.dom)}s!==void 0&&i.serializeFragment(y.Fragment.from(s),t,a)}else i.serializeFragment(e.content,t,a)}return r},tt=(e,t,i)=>{const o=t.serializeFragment(e,i),n=document.createElement("div");return n.appendChild(o),n.innerHTML};function uo(e){const t=new Set([...e.orderedListItemBlockTypes,...e.unorderedListItemBlockTypes]),i=o=>{var a;if(o.children.length===1&&((a=o.children[0].properties)==null?void 0:a.dataNodeType)==="blockGroup"){const l=o.children[0];o.children.pop(),o.children.push(...l.children)}let n=o.children.length,r;for(let l=0;l<n;l++){const c=o.children[l].children[0],p=c.children.find(f=>{const k=f.properties,w=k==null?void 0:k.className;return w==null?void 0:w.includes("bn-block-content")}),h=c.children.find(f=>{const k=f.properties,w=k==null?void 0:k.className;return w==null?void 0:w.includes("bn-block-group")});if(!p){o.children.splice(l,1,...h.children),i(o);return}const m=t.has(p.properties.dataContentType),g=m?e.orderedListItemBlockTypes.has(p.properties.dataContentType)?"ol":"ul":null;if(h&&i(h),r&&r.tagName!==g){o.children.splice(l-r.children.length,r.children.length,r);const f=r.children.length-1;l-=f,n-=f,r=void 0}if(m){r||(r=ge.fromDom(document.createElement(g)));const f=ge.fromDom(document.createElement("li"));f.children.push(...p.children),h&&f.children.push(...h.children),r.children.push(f)}else if(h){o.children.splice(l+1,0,...h.children),o.children[l]=p.children[0];const f=h.children.length;l+=f,n+=f}else o.children[l]=p.children[0]}r&&o.children.splice(n-r.children.length,r.children.length,r)};return i}const Y=(e,t)=>{const i=y.DOMSerializer.fromSchema(e);return i.serializeNodeInner=(o,n)=>et(o,n,i,t,!0),i.exportProseMirrorFragment=(o,n)=>fe.unified().use(We.default,{fragment:!0}).use(uo,{orderedListItemBlockTypes:new Set(["numberedListItem"]),unorderedListItemBlockTypes:new Set(["bulletListItem","checkListItem"])}).use($e.default).processSync(tt(o,i,n)).value,i.exportBlocks=(o,n)=>{const r=o.map(l=>N(l,e,t.schema.styleSchema)),a=e.nodes.blockGroup.create(null,r);return i.exportProseMirrorFragment(y.Fragment.from(a),n)},i},se=(e,t)=>{const i=y.DOMSerializer.fromSchema(e);return i.serializeNodeInner=(o,n)=>et(o,n,i,t,!1),i.serializeProseMirrorFragment=(o,n)=>tt(o,i,n),i.serializeBlocks=(o,n)=>{const r=o.map(l=>N(l,e,t.schema.styleSchema)),a=e.nodes.blockGroup.create(null,r);return i.serializeProseMirrorFragment(y.Fragment.from(a),n)},i},it=()=>typeof navigator<"u"&&(/Mac/.test(navigator.platform)||/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent));function H(e,t="Ctrl"){return it()?e.replace("Mod","⌘"):e.replace("Mod",t)}function D(...e){return e.filter(t=>t).join(" ")}const po=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function F(e,t,i,o){const n=document.createElement("div");n.className=D("bn-block-content",i.class),n.setAttribute("data-content-type",e);for(const[a,l]of Object.entries(i))a!=="class"&&n.setAttribute(a,l);const r=document.createElement(t);r.className=D("bn-inline-content",o.class);for(const[a,l]of Object.entries(o))a!=="class"&&r.setAttribute(a,l);return n.appendChild(r),{dom:n,contentDOM:r}}const ot=(e,t)=>{const i=N(e,t.pmSchema,t.schema.styleSchema).firstChild,o=t.pmSchema.nodes[i.type.name].spec.toDOM;if(o===void 0)throw new Error("This block has no default HTML serialization as its corresponding TipTap node doesn't implement `renderHTML`.");const n=o(i);if(typeof n!="object"||!("dom"in n))throw new Error("Cannot use this block's default HTML serialization as its corresponding TipTap node's `renderHTML` function does not return an object with the `dom` property.");return n},x={backgroundColor:{default:"default"},textColor:{default:"default"},textAlignment:{default:"left",values:["left","center","right","justify"]}},ve=["backgroundColor","textColor"];function Q(e){return"data-"+e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function ho(e){const t=e.split("/");return!t.length||t[t.length-1]===""?e:t[t.length-1]}function xe(e){const t={};return Object.entries(e).filter(([i,o])=>!ve.includes(i)).forEach(([i,o])=>{t[i]={default:o.default,keepOnSplit:!0,parseHTML:n=>{const r=n.getAttribute(Q(i));if(r===null)return null;if(typeof o.default=="boolean")return r==="true"?!0:r==="false"?!1:null;if(typeof o.default=="number"){const a=parseFloat(r);return!Number.isNaN(a)&&Number.isFinite(a)?a:null}return r},renderHTML:n=>n[i]!==o.default?{[Q(i)]:n[i]}:{}}}),t}function nt(e,t,i,o){if(typeof e=="boolean")throw new Error("Cannot find node position as getPos is a boolean, not a function.");const n=e(),a=i.state.doc.resolve(n).node().attrs.id;if(!a)throw new Error("Block doesn't have id");const l=t.getBlock(a);if(l.type!==o)throw new Error("Block type does not match");return l}function de(e,t,i,o,n=!1,r){const a=document.createElement("div");if(r!==void 0)for(const[l,s]of Object.entries(r))l!=="class"&&a.setAttribute(l,s);a.className=D("bn-block-content",(r==null?void 0:r.class)||""),a.setAttribute("data-content-type",t);for(const[l,s]of Object.entries(i))!ve.includes(l)&&s!==o[l].default&&a.setAttribute(Q(l),s);return n&&a.setAttribute("data-file-block",""),a.appendChild(e.dom),e.contentDOM!==void 0&&(e.contentDOM.className=D("bn-inline-content",e.contentDOM.className),e.contentDOM.setAttribute("data-editable","")),{...e,dom:a}}function U(e){return b.Node.create(e)}function Ee(e,t){return{config:e,implementation:t}}function G(e,t,i){return Ee({type:e.name,content:e.config.content==="inline*"?"inline":e.config.content==="tableRow+"?"table":"none",propSchema:t},{node:e,requiredExtensions:i,toInternalHTML:ot,toExternalHTML:ot})}function Se(e){return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i.config]))}function rt(e,t){const i=[{tag:"[data-content-type="+e.type+"]",contentElement:"[data-editable]"}];return t&&i.push({tag:"*",getAttrs(o){if(typeof o=="string")return!1;const n=t==null?void 0:t(o);return n===void 0?!1:n}}),i}function ee(e,t){const i=U({name:e.type,content:e.content==="inline"?"inline*":"",group:"blockContent",selectable:!0,addAttributes(){return xe(e.propSchema)},parseHTML(){return rt(e,t.parse)},renderHTML(){const o=document.createElement("div");return o.setAttribute("data-tmp-placeholder","true"),{dom:o}},addNodeView(){return({getPos:o})=>{var s;const n=this.options.editor,r=nt(o,n,this.editor,e.type),a=((s=this.options.domAttributes)==null?void 0:s.blockContent)||{},l=t.render(r,n);return de(l,r.type,r.props,e.propSchema,a)}}});if(i.name!==e.type)throw new Error("Node name does not match block type. This is a bug in BlockNote.");return Ee(e,{node:i,toInternalHTML:(o,n)=>{var l;const r=((l=i.options.domAttributes)==null?void 0:l.blockContent)||{},a=t.render(o,n);return de(a,o.type,o.props,e.propSchema,e.isFileBlock,r)},toExternalHTML:(o,n)=>{var l,s;const r=((l=i.options.domAttributes)==null?void 0:l.blockContent)||{};let a=(s=t.toExternalHTML)==null?void 0:s.call(t,o,n);return a===void 0&&(a=t.render(o,n)),de(a,o.type,o.props,e.propSchema,r)}})}function at(e,t,i,o){return e.dom.setAttribute("data-inline-content-type",t),Object.entries(i).filter(([n,r])=>r!==o[n].default).map(([n,r])=>[Q(n),r]).forEach(([n,r])=>e.dom.setAttribute(n,r)),e.contentDOM!==void 0&&e.contentDOM.setAttribute("data-editable",""),e}function lt(e){return{Backspace:({editor:t})=>{const i=t.state.selection.$from;return t.state.selection.empty&&i.node().type.name===e.type&&i.parentOffset===0}}}function st(e,t){return{config:e,implementation:t}}function dt(e,t){return st({type:e.name,propSchema:t,content:e.config.content==="inline*"?"styled":"none"},{node:e})}function Ce(e){return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i.config]))}function ct(e){return[{tag:`[data-inline-content-type="${e.type}"]`,contentElement:t=>{const i=t;return i.matches("[data-editable]")?i:i.querySelector("[data-editable]")||i}}]}function mo(e,t){const i=b.Node.create({name:e.type,inline:!0,group:"inline",selectable:e.content==="styled",atom:e.content==="none",content:e.content==="styled"?"inline*":"",addAttributes(){return xe(e.propSchema)},addKeyboardShortcuts(){return lt(e)},parseHTML(){return ct(e)},renderHTML({node:o}){const n=this.options.editor,r=t.render(we(o,n.schema.inlineContentSchema,n.schema.styleSchema));return at(r,e.type,o.attrs,e.propSchema)}});return dt(i,e.propSchema)}function ut(e){return e==="boolean"?{}:{stringValue:{default:void 0,keepOnSplit:!0,parseHTML:t=>t.getAttribute("data-value"),renderHTML:t=>t.stringValue!==void 0?{"data-value":t.stringValue}:{}}}}function pt(e,t,i,o){return e.dom.setAttribute("data-style-type",t),o==="string"&&e.dom.setAttribute("data-value",i),e.contentDOM!==void 0&&e.contentDOM.setAttribute("data-editable",""),e}function Te(e,t){return{config:e,implementation:t}}function j(e,t){return Te({type:e.name,propSchema:t},{mark:e})}function Me(e){return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i.config]))}function ht(e){return[{tag:`[data-style-type="${e.type}"]`,contentElement:t=>{const i=t;return i.matches("[data-editable]")?i:i.querySelector("[data-editable]")||i}}]}function fo(e,t){const i=b.Mark.create({name:e.type,addAttributes(){return ut(e.propSchema)},parseHTML(){return ht(e)},renderHTML({mark:o}){let n;if(e.propSchema==="boolean")n=t.render();else if(e.propSchema==="string")n=t.render(o.attrs.stringValue);else throw new I(e.propSchema);return pt(n,e.type,o.attrs.stringValue,e.propSchema)}});return Te(e,{mark:i})}const te=e=>{const t=document.createElement("div");t.className="bn-file-default-preview";const i=document.createElement("div");i.className="bn-file-default-preview-icon",i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg>';const o=document.createElement("p");return o.className="bn-file-default-preview-name",o.textContent=e.props.name||"",t.appendChild(i),t.appendChild(o),{dom:t}},R=(e,t)=>{const i=document.createElement("div");i.className="bn-file-and-caption-wrapper";const o=document.createElement("p");return o.className="bn-file-caption",o.textContent=e.props.caption,i.appendChild(t),i.appendChild(o),{dom:i}},ie=(e,t,i,o)=>{const n=document.createElement("div");n.className="bn-add-file-button";const r=document.createElement("div");r.className="bn-add-file-button-icon",o?r.appendChild(o):r.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg>';const a=document.createElement("p");a.className="bn-add-file-button-text",a.innerHTML=i||t.dictionary.file_blocks.file.add_button_text;const l=c=>{c.preventDefault()},s=()=>{t.dispatch(t._tiptapEditor.state.tr.setMeta(t.filePanel.plugin,{block:e}))};return n.appendChild(r),n.appendChild(a),n.addEventListener("mousedown",l,!0),n.addEventListener("click",s,!0),{dom:n,destroy:()=>{n.removeEventListener("mousedown",l,!0),n.removeEventListener("click",s,!0)}}},Be=e=>({url:e.src||void 0}),oe=(e,t)=>{const i=e.querySelector(t);if(!i)return;const o=e.querySelector("figcaption"),n=(o==null?void 0:o.textContent)??void 0;return{targetElement:i,caption:n}},ne=(e,t)=>{const i=document.createElement("div"),o=document.createElement("p");return o.textContent=t,i.appendChild(e),i.appendChild(o),{dom:i}},ce=(e,t)=>{const i=document.createElement("figure"),o=document.createElement("figcaption");return o.textContent=t,i.appendChild(e),i.appendChild(o),{dom:i}},Le=(e,t,i,o,n)=>{if(!e.props.previewWidth)throw new Error("Block must have a `previewWidth` prop.");const r=document.createElement("div");r.className="bn-visual-media-wrapper";const a=document.createElement("div");a.className="bn-visual-media-resize-handle",a.style.left="4px";const l=document.createElement("div");l.className="bn-visual-media-resize-handle",l.style.right="4px";let s;const c=k=>{if(!s){!t.isEditable&&r.contains(a)&&r.contains(l)&&(r.removeChild(a),r.removeChild(l));return}let w;e.props.textAlignment==="center"?s.handleUsed==="left"?w=s.initialWidth+(s.initialClientX-k.clientX)*2:w=s.initialWidth+(k.clientX-s.initialClientX)*2:s.handleUsed==="left"?w=s.initialWidth+s.initialClientX-k.clientX:w=s.initialWidth+k.clientX-s.initialClientX;const z=64;w<z?n(z):w>t.domElement.firstElementChild.clientWidth?n(t.domElement.firstElementChild.clientWidth):n(w)},p=k=>{(!k.target||!r.contains(k.target)||!t.isEditable)&&r.contains(a)&&r.contains(l)&&(r.removeChild(a),r.removeChild(l)),s&&(s=void 0,t.updateBlock(e,{props:{previewWidth:o()}}))},h=()=>{t.isEditable&&(r.appendChild(a),r.appendChild(l))},m=k=>{k.relatedTarget===a||k.relatedTarget===l||s||t.isEditable&&r.contains(a)&&r.contains(l)&&(r.removeChild(a),r.removeChild(l))},g=k=>{k.preventDefault(),r.appendChild(a),r.appendChild(l),s={handleUsed:"left",initialWidth:e.props.previewWidth,initialClientX:k.clientX}},f=k=>{k.preventDefault(),r.appendChild(a),r.appendChild(l),s={handleUsed:"right",initialWidth:e.props.previewWidth,initialClientX:k.clientX}};return r.appendChild(i),window.addEventListener("mousemove",c),window.addEventListener("mouseup",p),i.addEventListener("mouseenter",h),i.addEventListener("mouseleave",m),a.addEventListener("mousedown",g),l.addEventListener("mousedown",f),{dom:r,destroy:()=>{window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",p),i.removeEventListener("mouseenter",h),i.removeEventListener("mouseleave",m),a.removeEventListener("mousedown",g),l.removeEventListener("mousedown",f)}}},mt=e=>({url:e.src||void 0}),ft={backgroundColor:x.backgroundColor,name:{default:""},url:{default:""},caption:{default:""},showPreview:{default:!0}},gt={type:"audio",propSchema:ft,content:"none",isFileBlock:!0,fileBlockAcceptMimeTypes:["audio/*"]},bt=(e,t)=>{const i=document.createElement("div");if(i.className="bn-file-block-content-wrapper",e.props.url===""){const o=document.createElement("div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg>';const n=ie(e,t,t.dictionary.file_blocks.audio.add_button_text,o.firstElementChild);return i.appendChild(n.dom),{dom:i,destroy:()=>{var r;(r=n==null?void 0:n.destroy)==null||r.call(n)}}}else if(e.props.showPreview){const o=document.createElement("audio");o.className="bn-audio",t.resolveFileUrl(e.props.url).then(r=>{o.src=r}),o.controls=!0,o.contentEditable="false",o.draggable=!1;const n=R(e,o);return i.appendChild(n.dom),{dom:i}}else{const o=te(e).dom;return{dom:R(e,o).dom}}},kt=e=>{if(e.tagName==="AUDIO")return mt(e);if(e.tagName==="FIGURE"){const t=oe(e,"audio");if(!t)return;const{targetElement:i,caption:o}=t;return{...mt(i),caption:o}}},_t=e=>{if(!e.props.url){const i=document.createElement("p");return i.textContent="Add audio",{dom:i}}let t;return e.props.showPreview?(t=document.createElement("audio"),t.src=e.props.url):(t=document.createElement("a"),t.href=e.props.url,t.textContent=e.props.name||e.props.url),e.props.caption?e.props.showPreview?ce(t,e.props.caption):ne(t,e.props.caption):{dom:t}},yt=ee(gt,{render:bt,parse:kt,toExternalHTML:_t}),wt={backgroundColor:x.backgroundColor,name:{default:""},url:{default:""},caption:{default:""}},vt={type:"file",propSchema:wt,content:"none",isFileBlock:!0},xt=(e,t)=>{const i=document.createElement("div");if(i.className="bn-file-block-content-wrapper",e.props.url===""){const o=ie(e,t);return i.appendChild(o.dom),{dom:i,destroy:o.destroy}}else{const o=te(e).dom,n=R(e,o);return i.appendChild(n.dom),{dom:i}}},Et=e=>{if(e.tagName==="EMBED")return Be(e);if(e.tagName==="FIGURE"){const t=oe(e,"embed");if(!t)return;const{targetElement:i,caption:o}=t;return{...Be(i),caption:o}}},St=e=>{if(!e.props.url){const i=document.createElement("p");return i.textContent="Add file",{dom:i}}const t=document.createElement("a");return t.href=e.props.url,t.textContent=e.props.name||e.props.url,e.props.caption?ne(t,e.props.caption):{dom:t}},Ct=ee(vt,{render:xt,parse:Et,toExternalHTML:St}),Ie=e=>{const t=e.src||void 0,i=e.width||void 0;return{url:t,previewWidth:i}},Tt={textAlignment:x.textAlignment,backgroundColor:x.backgroundColor,name:{default:""},url:{default:""},caption:{default:""},showPreview:{default:!0},previewWidth:{default:512}},Mt={type:"image",propSchema:Tt,content:"none",isFileBlock:!0,fileBlockAcceptMimeTypes:["image/*"]},Bt=(e,t)=>{const i=document.createElement("div");if(i.className="bn-file-block-content-wrapper",e.props.url===""){const o=document.createElement("div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M5 11.1005L7 9.1005L12.5 14.6005L16 11.1005L19 14.1005V5H5V11.1005ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10Z"></path></svg>';const n=ie(e,t,t.dictionary.file_blocks.image.add_button_text,o.firstElementChild);return i.appendChild(n.dom),{dom:i,destroy:()=>{var r;(r=n==null?void 0:n.destroy)==null||r.call(n)}}}else if(e.props.showPreview){const o=document.createElement("img");o.className="bn-visual-media",t.resolveFileUrl(e.props.url).then(a=>{o.src=a}),o.alt=e.props.name||e.props.caption||"BlockNote image",o.contentEditable="false",o.draggable=!1,o.width=Math.min(e.props.previewWidth,t.domElement.firstElementChild.clientWidth);const n=Le(e,t,o,()=>o.width,a=>o.width=a),r=R(e,n.dom);return i.appendChild(r.dom),{dom:i,destroy:n.destroy}}else{const o=te(e).dom;return{dom:R(e,o).dom}}},Lt=e=>{if(e.tagName==="IMG")return Ie(e);if(e.tagName==="FIGURE"){const t=oe(e,"img");if(!t)return;const{targetElement:i,caption:o}=t;return{...Ie(i),caption:o}}},It=e=>{if(!e.props.url){const i=document.createElement("p");return i.textContent="Add image",{dom:i}}let t;return e.props.showPreview?(t=document.createElement("img"),t.src=e.props.url,t.alt=e.props.name||e.props.caption||"BlockNote image",t.width=e.props.previewWidth):(t=document.createElement("a"),t.href=e.props.url,t.textContent=e.props.name||e.props.url),e.props.caption?e.props.showPreview?ce(t,e.props.caption):ne(t,e.props.caption):{dom:t}},Pt=ee(Mt,{render:Bt,parse:Lt,toExternalHTML:It}),At=e=>{const t=e.src||void 0,i=e.width||void 0;return{url:t,previewWidth:i}},Nt={textAlignment:x.textAlignment,backgroundColor:x.backgroundColor,name:{default:""},url:{default:""},caption:{default:""},showPreview:{default:!0},previewWidth:{default:512}},Ht={type:"video",propSchema:Nt,content:"none",isFileBlock:!0,fileBlockAcceptMimeTypes:["video/*"]},Dt=(e,t)=>{const i=document.createElement("div");if(i.className="bn-file-block-content-wrapper",e.props.url===""){const o=document.createElement("div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg>';const n=ie(e,t,t.dictionary.file_blocks.video.add_button_text,o.firstElementChild);return i.appendChild(n.dom),{dom:i,destroy:()=>{var r;(r=n==null?void 0:n.destroy)==null||r.call(n)}}}else if(e.props.showPreview){const o=document.createElement("video");o.className="bn-visual-media",o.src=e.props.url,o.controls=!0,o.contentEditable="false",o.draggable=!1,o.width=Math.min(e.props.previewWidth,t.domElement.firstElementChild.clientWidth);const n=Le(e,t,o,()=>o.width,a=>o.width=a),r=R(e,n.dom);return i.appendChild(r.dom),{dom:i,destroy:n.destroy}}else{const o=te(e).dom;return{dom:R(e,o).dom}}},Ut=e=>{if(e.tagName==="VIDEO")return At(e);if(e.tagName==="FIGURE"){const t=oe(e,"video");if(!t)return;const{targetElement:i,caption:o}=t;return{...At(i),caption:o}}},jt=e=>{if(!e.props.url){const i=document.createElement("p");return i.textContent="Add video",{dom:i}}let t;return e.props.showPreview?(t=document.createElement("video"),t.src=e.props.url,t.width=e.props.previewWidth):(t=document.createElement("a"),t.href=e.props.url,t.textContent=e.props.name||e.props.url),e.props.caption?e.props.showPreview?ce(t,e.props.caption):ne(t,e.props.caption):{dom:t}},Rt=ee(Ht,{render:Dt,parse:Ut,toExternalHTML:jt}),go=async e=>{const t=new FormData;return t.append("file",e),(await(await fetch("https://tmpfiles.org/api/v1/upload",{method:"POST",body:t})).json()).data.url.replace("tmpfiles.org/","tmpfiles.org/dl/")},bo=b.Mark.create({name:"backgroundColor",addAttributes(){return{stringValue:{default:void 0,parseHTML:e=>e.getAttribute("data-background-color"),renderHTML:e=>({"data-background-color":e.stringValue})}}},parseHTML(){return[{tag:"span",getAttrs:e=>typeof e=="string"?!1:e.hasAttribute("data-background-color")?{stringValue:e.getAttribute("data-background-color")}:!1}]},renderHTML({HTMLAttributes:e}){return["span",e,0]}}),ko=j(bo,"string"),_o=b.Mark.create({name:"textColor",addAttributes(){return{stringValue:{default:void 0,parseHTML:e=>e.getAttribute("data-text-color"),renderHTML:e=>({"data-text-color":e.stringValue})}}},parseHTML(){return[{tag:"span",getAttrs:e=>typeof e=="string"?!1:e.hasAttribute("data-text-color")?{stringValue:e.getAttribute("data-text-color")}:!1}]},renderHTML({HTMLAttributes:e}){return["span",e,0]}}),yo=j(_o,"string"),L=e=>{const{contentType:t}=v(e.state.doc,e.state.selection.from);return t.spec.content},wo={...x,level:{default:1,values:[1,2,3]}},vo=U({name:"heading",content:"inline*",group:"blockContent",addAttributes(){return{level:{default:1,parseHTML:e=>{const t=e.getAttribute("data-level"),i=parseInt(t);if(isFinite(i))return i},renderHTML:e=>({"data-level":e.level.toString()})}}},addInputRules(){return[...[1,2,3].map(e=>new b.InputRule({find:new RegExp(`^(#{${e}})\\s$`),handler:({state:t,chain:i,range:o})=>{L(this.editor)==="inline*"&&i().BNUpdateBlock(t.selection.from,{type:"heading",props:{level:e}}).deleteRange({from:o.from,to:o.to})}}))]},addKeyboardShortcuts(){return{"Mod-Alt-1":()=>L(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:1}}),"Mod-Alt-2":()=>L(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:2}}),"Mod-Alt-3":()=>L(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:3}})}},parseHTML(){return[{tag:"div[data-content-type="+this.name+"]",getAttrs:e=>typeof e=="string"?!1:{level:e.getAttribute("data-level")}},{tag:"h1",attrs:{level:1},node:"heading"},{tag:"h2",attrs:{level:2},node:"heading"},{tag:"h3",attrs:{level:3},node:"heading"}]},renderHTML({node:e,HTMLAttributes:t}){var i,o;return F(this.name,`h${e.attrs.level}`,{...((i=this.options.domAttributes)==null?void 0:i.blockContent)||{},...t},((o=this.options.domAttributes)==null?void 0:o.inlineContent)||{})}}),xo=G(vo,wo),Pe=e=>{const{contentNode:t,contentType:i}=v(e.state.doc,e.state.selection.from),o=e.state.selection.anchor===e.state.selection.head;return!(i.name==="bulletListItem"||i.name==="numberedListItem"||i.name==="checkListItem")||!o?!1:e.commands.first(({state:n,chain:r,commands:a})=>[()=>a.command(()=>t.childCount===0?a.BNUpdateBlock(n.selection.from,{type:"paragraph",props:{}}):!1),()=>a.command(()=>t.childCount>0?(r().deleteSelection().BNSplitBlock(n.selection.from,!0).run(),!0):!1)])},Eo={...x},So=U({name:"bulletListItem",content:"inline*",group:"blockContent",priority:90,addInputRules(){return[new b.InputRule({find:new RegExp("^[-+*]\\s$"),handler:({state:e,chain:t,range:i})=>{L(this.editor)==="inline*"&&t().BNUpdateBlock(e.selection.from,{type:"bulletListItem",props:{}}).deleteRange({from:i.from,to:i.to})}})]},addKeyboardShortcuts(){return{Enter:()=>Pe(this.editor),"Mod-Shift-8":()=>L(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"bulletListItem",props:{}})}},parseHTML(){return[{tag:"div[data-content-type="+this.name+"]"},{tag:"li",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.tagName==="UL"||t.tagName==="DIV"&&t.parentElement.tagName==="UL"?{}:!1},node:"bulletListItem"},{tag:"p",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.getAttribute("data-content-type")==="bulletListItem"?{}:!1},priority:300,node:"bulletListItem"}]},renderHTML({HTMLAttributes:e}){var t,i;return F(this.name,"p",{...((t=this.options.domAttributes)==null?void 0:t.blockContent)||{},...e},((i=this.options.domAttributes)==null?void 0:i.inlineContent)||{})}}),Co=G(So,Eo),To=new _.PluginKey("numbered-list-indexing"),Mo=()=>new _.Plugin({key:To,appendTransaction:(e,t,i)=>{const o=i.tr;o.setMeta("numberedListIndexing",!0);let n=!1;return i.doc.descendants((r,a)=>{if(r.type.name==="blockContainer"&&r.firstChild.type.name==="numberedListItem"){let l="1";const s=a===1,c=v(o.doc,a+1);if(c===void 0)return;if(!s){const m=v(o.doc,a-2);if(m===void 0)return;if(!(c.depth!==m.depth)){const f=m.contentNode;if(m.contentType.name==="numberedListItem"){const z=f.attrs.index;l=(parseInt(z)+1).toString()}}}c.contentNode.attrs.index!==l&&(n=!0,o.setNodeMarkup(a+1,void 0,{index:l}))}}),n?o:null}}),Bo={...x},Lo=U({name:"numberedListItem",content:"inline*",group:"blockContent",priority:90,addAttributes(){return{index:{default:null,parseHTML:e=>e.getAttribute("data-index"),renderHTML:e=>({"data-index":e.index})}}},addInputRules(){return[new b.InputRule({find:new RegExp("^1\\.\\s$"),handler:({state:e,chain:t,range:i})=>{L(this.editor)==="inline*"&&t().BNUpdateBlock(e.selection.from,{type:"numberedListItem",props:{}}).deleteRange({from:i.from,to:i.to})}})]},addKeyboardShortcuts(){return{Enter:()=>Pe(this.editor),"Mod-Shift-7":()=>L(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"numberedListItem",props:{}})}},addProseMirrorPlugins(){return[Mo()]},parseHTML(){return[{tag:"div[data-content-type="+this.name+"]"},{tag:"li",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.tagName==="OL"||t.tagName==="DIV"&&t.parentElement.tagName==="OL"?{}:!1},node:"numberedListItem"},{tag:"p",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.getAttribute("data-content-type")==="numberedListItem"?{}:!1},priority:300,node:"numberedListItem"}]},renderHTML({HTMLAttributes:e}){var t,i;return F(this.name,"p",{...((t=this.options.domAttributes)==null?void 0:t.blockContent)||{},...e},((i=this.options.domAttributes)==null?void 0:i.inlineContent)||{})}}),Io=G(Lo,Bo),Po={...x,checked:{default:!1}},Ao=U({name:"checkListItem",content:"inline*",group:"blockContent",addAttributes(){return{checked:{default:!1,parseHTML:e=>e.getAttribute("data-checked")==="true"||void 0,renderHTML:e=>e.checked?{"data-checked":e.checked.toString()}:{}}}},addInputRules(){return[new b.InputRule({find:new RegExp("\\[\\s*\\]\\s$"),handler:({state:e,chain:t,range:i})=>{L(this.editor)==="inline*"&&t().BNUpdateBlock(e.selection.from,{type:"checkListItem",props:{checked:!1}}).deleteRange({from:i.from,to:i.to})}}),new b.InputRule({find:new RegExp("\\[[Xx]\\]\\s$"),handler:({state:e,chain:t,range:i})=>{L(this.editor)==="inline*"&&t().BNUpdateBlock(e.selection.from,{type:"checkListItem",props:{checked:!0}}).deleteRange({from:i.from,to:i.to})}})]},addKeyboardShortcuts(){return{Enter:()=>Pe(this.editor),"Mod-Shift-9":()=>L(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"checkListItem",props:{}})}},parseHTML(){return[{tag:"div[data-content-type="+this.name+"]"},{tag:"input",getAttrs:e=>typeof e=="string"?!1:e.type==="checkbox"?{checked:e.checked}:!1,node:"checkListItem"},{tag:"li",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;if(t===null)return!1;if(t.tagName==="UL"||t.tagName==="DIV"&&t.parentElement.tagName==="UL"){const i=e.querySelector("input[type=checkbox]")||null;return i===null?!1:{checked:i.checked}}return!1},node:"checkListItem"}]},renderHTML({node:e,HTMLAttributes:t}){var r,a;const i=document.createElement("input");i.type="checkbox",i.checked=e.attrs.checked,e.attrs.checked&&i.setAttribute("checked","");const{dom:o,contentDOM:n}=F(this.name,"p",{...((r=this.options.domAttributes)==null?void 0:r.blockContent)||{},...t},((a=this.options.domAttributes)==null?void 0:a.inlineContent)||{});return o.insertBefore(i,n),{dom:o,contentDOM:n}},addNodeView(){return({node:e,getPos:t,editor:i,HTMLAttributes:o})=>{var p,h;const n=document.createElement("div"),r=document.createElement("div");r.contentEditable="false";const a=document.createElement("input");a.type="checkbox",a.checked=e.attrs.checked,e.attrs.checked&&a.setAttribute("checked","");const l=()=>{if(!i.isEditable){a.checked=!a.checked;return}typeof t!="boolean"&&this.editor.commands.BNUpdateBlock(t(),{type:"checkListItem",props:{checked:a.checked}})};a.addEventListener("change",l);const{dom:s,contentDOM:c}=F(this.name,"p",{...((p=this.options.domAttributes)==null?void 0:p.blockContent)||{},...o},((h=this.options.domAttributes)==null?void 0:h.inlineContent)||{});if(typeof t!="boolean"){const g="label-"+this.editor.state.doc.resolve(t()).node().attrs.id;a.setAttribute("aria-labelledby",g),c.id=g}return s.removeChild(c),s.appendChild(n),n.appendChild(r),n.appendChild(c),r.appendChild(a),{dom:s,contentDOM:c,destroy:()=>{a.removeEventListener("change",l)}}}}}),No=G(Ao,Po),Ho={...x},Do=U({name:"paragraph",content:"inline*",group:"blockContent",addKeyboardShortcuts(){return{"Mod-Alt-0":()=>L(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"paragraph",props:{}})}},parseHTML(){return[{tag:"div[data-content-type="+this.name+"]"},{tag:"p",priority:200,getAttrs:e=>{var t;return typeof e=="string"||!((t=e.textContent)!=null&&t.trim())?!1:{}},node:"paragraph"}]},renderHTML({HTMLAttributes:e}){var t,i;return F(this.name,"p",{...((t=this.options.domAttributes)==null?void 0:t.blockContent)||{},...e},((i=this.options.domAttributes)==null?void 0:i.inlineContent)||{})}}),Uo=G(Do,Ho),jo=b.Extension.create({name:"BlockNoteTableExtension",addProseMirrorPlugins:()=>[Ke.columnResizing({cellMinWidth:100}),Ke.tableEditing()],addKeyboardShortcuts(){return{Enter:()=>this.editor.state.selection.empty&&this.editor.state.selection.$head.parent.type.name==="tableParagraph"?(this.editor.commands.setHardBreak(),!0):!1,Backspace:()=>{const e=this.editor.state.selection,t=e.empty,i=e.$head.parentOffset===0,o=e.$head.node().type.name==="tableParagraph";return t&&i&&o}}},extendNodeSchema(e){const t={name:e.name,options:e.options,storage:e.storage};return{tableRole:b.callOrReturn(b.getExtensionField(e,"tableRole",t))}}}),Ro={...x},zo=U({name:"table",content:"tableRow+",group:"blockContent",tableRole:"table",isolating:!0,parseHTML(){return[{tag:"table"}]},renderHTML({HTMLAttributes:e}){var t,i;return F(this.name,"table",{...((t=this.options.domAttributes)==null?void 0:t.blockContent)||{},...e},((i=this.options.domAttributes)==null?void 0:i.inlineContent)||{})}}),Oo=b.Node.create({name:"tableParagraph",group:"tableContent",content:"inline*",parseHTML(){return[{tag:"td"},{tag:"p",getAttrs:e=>{if(typeof e=="string"||!e.textContent)return!1;const t=e.parentElement;return t===null?!1:t.tagName==="TD"?{}:!1}}]},renderHTML({HTMLAttributes:e}){return["p",b.mergeAttributes(this.options.HTMLAttributes,e),0]}}),Vo=G(zo,Ro,[jo,Oo,Ii.TableHeader.extend({content:"tableContent"}),Li.TableCell.extend({content:"tableContent"}),Pi.TableRow]),Ae={paragraph:Uo,heading:xo,bulletListItem:Co,numberedListItem:Io,checkListItem:No,table:Vo,file:Ct,image:Pt,video:Rt,audio:yt},zt=Se(Ae),Ne={bold:j(Ki.default,"boolean"),italic:j(Wi.default,"boolean"),underline:j(Xi.default,"boolean"),strike:j($i.default,"boolean"),code:j(qi.default,"boolean"),textColor:yo,backgroundColor:ko},Fo=Me(Ne),He={text:{config:"text",implementation:{}},link:{config:"link",implementation:{}}},Ot=Ce(He);function B(e,t){return e in t.schema.blockSchema&&t.schema.blockSchema[e]===zt[e]}function Vt(e,t){return e in t.schema.inlineContentSchema&&t.schema.inlineContentSchema[e]===Ot[e]}function Ft(e,t,i){return t.type===e&&t.type in i.schema.blockSchema&&B(t.type,i)}function Go(e,t){return e.type in t.schema.blockSchema&&t.schema.blockSchema[e.type].isFileBlock||!1}function Ko(e,t){return e.type in t.schema.blockSchema&&t.schema.blockSchema[e.type].isFileBlock&&"showPreview"in t.schema.blockSchema[e.type].propSchema||!1}function qo(e,t){return t.schema.blockSchema[e.type].isFileBlock&&!e.props.url}function Gt(e,t,i){return t in i.schema.blockSchema&&e in i.schema.blockSchema[t].propSchema&&i.schema.blockSchema[t].propSchema[e]===x[e]}function Wo(e,t,i){return Gt(e,t.type,i)}function De(e,t){let i,o;if(t.firstChild.descendants((n,r)=>i?!1:n.type.name!=="blockContainer"||n.attrs.id!==e?!0:(i=n,o=r+1,!1)),i===void 0||o===void 0)throw Error("Could not find block in the editor with matching ID.");return{node:i,posBeforeNode:o}}function $o(e,t,i="before",o){const n=typeof t=="string"?t:t.id,r=[];for(const c of e)r.push(N(c,o.pmSchema,o.schema.styleSchema));const{node:a,posBeforeNode:l}=De(n,o._tiptapEditor.state.doc);if(i==="before"&&o.dispatch(o._tiptapEditor.state.tr.insert(l,r)),i==="after"&&o.dispatch(o._tiptapEditor.state.tr.insert(l+a.nodeSize,r)),i==="nested"&&a.childCount<2){const c=o._tiptapEditor.state.schema.nodes.blockGroup.create({},r);o.dispatch(o._tiptapEditor.state.tr.insert(l+a.firstChild.nodeSize+1,c))}const s=[];for(const c of r)s.push(E(c,o.schema.blockSchema,o.schema.inlineContentSchema,o.schema.styleSchema,o.blockCache));return s}function Xo(e,t,i){const o=i._tiptapEditor,n=typeof e=="string"?e:e.id,{posBeforeNode:r}=De(n,o.state.doc);o.commands.BNUpdateBlock(r+1,t);const a=o.state.doc.resolve(r+1).node();return E(a,i.schema.blockSchema,i.schema.inlineContentSchema,i.schema.styleSchema,i.blockCache)}function Kt(e,t,i){const o=t._tiptapEditor,n=o.state.tr,r=new Set(e.map(s=>typeof s=="string"?s:s.id)),a=[];let l=0;if(o.state.doc.descendants((s,c)=>{if(r.size===0)return!1;if(s.type.name!=="blockContainer"||!r.has(s.attrs.id))return!0;a.push(E(s,t.schema.blockSchema,t.schema.inlineContentSchema,t.schema.styleSchema,t.blockCache)),r.delete(s.attrs.id),l=(i==null?void 0:i(s,c,n,l))||l;const p=n.doc.nodeSize;n.delete(c-l-1,c-l+s.nodeSize+1);const h=n.doc.nodeSize;return l+=p-h,!1}),r.size>0){const s=[...r].join(`
6
- `);throw Error("Blocks with the following IDs could not be found in the editor: "+s)}return t.dispatch(n),a}function Zo(e,t){return Kt(e,t)}function Jo(e,t,i){const o=[];for(const l of t)o.push(N(l,i.pmSchema,i.schema.styleSchema));const n=typeof e[0]=="string"?e[0]:e[0].id,r=Kt(e,i,(l,s,c,p)=>{if(l.attrs.id===n){const h=c.doc.nodeSize;c.insert(s,o);const m=c.doc.nodeSize;return p+h-m}return p}),a=[];for(const l of o)a.push(E(l,i.schema.blockSchema,i.schema.inlineContentSchema,i.schema.styleSchema,i.blockCache));return{insertedBlocks:a,removedBlocks:r}}function Yo(e,t,i,o={updateSelection:!0}){const n=i._tiptapEditor.state.tr;let{from:r,to:a}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},l=!0,s=!0,c="";if(t.forEach(p=>{p.check(),l&&p.isText&&p.marks.length===0?c+=p.text:l=!1,s=s?p.isBlock:!1}),r===a&&s){const{parent:p}=n.doc.resolve(r);p.isTextblock&&!p.type.spec.code&&!p.childCount&&(r-=1,a+=1)}return l?n.insertText(c,r,a):n.replaceWith(r,a,t),o.updateSelection&&b.selectionToInsertionEnd(n,n.steps.length-1,-1),i.dispatch(n),!0}function Qo(){const e=t=>{let i=t.children.length;for(let o=0;o<i;o++){const n=t.children[o];if(n.type==="element"&&(e(n),n.tagName==="u"))if(n.children.length>0){t.children.splice(o,1,...n.children);const r=n.children.length-1;i+=r,o+=r}else t.children.splice(o,1),i--,o--}};return e}function en(){const e=t=>{var i;if(t.children&&"length"in t.children&&t.children.length)for(let o=t.children.length-1;o>=0;o--){const n=t.children[o],r=o+1<t.children.length?t.children[o+1]:void 0;n.type==="element"&&n.tagName==="input"&&((i=n.properties)==null?void 0:i.type)==="checkbox"&&(r==null?void 0:r.type)==="element"&&r.tagName==="p"?(r.tagName="span",r.children.splice(0,0,ge.fromDom(document.createTextNode(" ")))):e(n)}};return e}function ue(e){return fe.unified().use(We.default,{fragment:!0}).use(Qo).use(en).use(Zi.default).use(Xe.default).use(Ji.default,{handlers:{text:i=>i.value}}).processSync(e).value}function qt(e,t,i,o){const r=Y(t,i).exportBlocks(e,o);return ue(r)}function tn(e){return Array.prototype.indexOf.call(e.parentElement.childNodes,e)}function on(e){return e.nodeType===3&&!/\S/.test(e.nodeValue||"")}function nn(e){e.querySelectorAll("li > ul, li > ol").forEach(t=>{const i=tn(t),o=t.parentElement,n=Array.from(o.childNodes).slice(i+1);t.remove(),n.forEach(r=>{r.remove()}),o.insertAdjacentElement("afterend",t),n.reverse().forEach(r=>{if(on(r))return;const a=document.createElement("li");a.append(r),t.insertAdjacentElement("afterend",a)}),o.childNodes.length===0&&o.remove()})}function rn(e){e.querySelectorAll("li + ul, li + ol").forEach(t=>{var r,a;const i=t.previousElementSibling,o=document.createElement("div");i.insertAdjacentElement("afterend",o),o.append(i);const n=document.createElement("div");for(n.setAttribute("data-node-type","blockGroup"),o.append(n);((r=o.nextElementSibling)==null?void 0:r.nodeName)==="UL"||((a=o.nextElementSibling)==null?void 0:a.nodeName)==="OL";)n.append(o.nextElementSibling)})}let Wt=null;function an(){return Wt||(Wt=document.implementation.createHTMLDocument("title"))}function $t(e){if(typeof e=="string"){const t=an().createElement("div");t.innerHTML=e,e=t}return nn(e),rn(e),e}async function Ue(e,t,i,o,n){const r=$t(e),l=y.DOMParser.fromSchema(n).parse(r,{topNode:n.nodes.blockGroup.create()}),s=[];for(let c=0;c<l.childCount;c++)s.push(E(l.child(c),t,i,o));return s}function ln(e,t){const i=t.value?t.value+`
7
- `:"",o={};t.lang&&(o["data-language"]=t.lang);let n={type:"element",tagName:"code",properties:o,children:[{type:"text",value:i}]};return t.meta&&(n.data={meta:t.meta}),e.patch(t,n),n=e.applyData(t,n),n={type:"element",tagName:"pre",properties:{},children:[n]},e.patch(t,n),n}function Xt(e,t,i,o,n){const r=fe.unified().use(Yi.default).use(Xe.default).use(Qi.default,{handlers:{...qe.defaultHandlers,code:ln}}).use($e.default).processSync(e);return Ue(r.value,t,i,o,n)}class ${constructor(){u(this,"callbacks",{})}on(t,i){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(i),()=>this.off(t,i)}emit(t,...i){const o=this.callbacks[t];o&&o.forEach(n=>n.apply(this,i))}off(t,i){const o=this.callbacks[t];o&&(i?this.callbacks[t]=o.filter(n=>n!==i):delete this.callbacks[t])}removeAllListeners(){this.callbacks={}}}class Zt{constructor(t,i,o,n){u(this,"state");u(this,"emitUpdate");u(this,"mouseDownHandler",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});u(this,"dragstartHandler",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});u(this,"scrollHandler",()=>{var t;if((t=this.state)!=null&&t.show){const i=this.pmView.root.querySelector(`[data-node-type="blockContainer"][data-id="${this.state.block.id}"]`);this.state.referencePos=i.getBoundingClientRect(),this.emitUpdate()}});u(this,"closeMenu",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});this.editor=t,this.pluginKey=i,this.pmView=o,this.emitUpdate=()=>{if(!this.state)throw new Error("Attempting to update uninitialized file panel");n(this.state)},o.dom.addEventListener("mousedown",this.mouseDownHandler),o.dom.addEventListener("dragstart",this.dragstartHandler),o.root.addEventListener("scroll",this.scrollHandler,!0)}update(t,i){var n,r;const o=this.pluginKey.getState(t.state);if(!((n=this.state)!=null&&n.show)&&o.block&&this.editor.isEditable){const a=this.pmView.root.querySelector(`[data-node-type="blockContainer"][data-id="${o.block.id}"]`);this.state={show:!0,referencePos:a.getBoundingClientRect(),block:o.block},this.emitUpdate();return}(!t.state.selection.eq(i.selection)||!t.state.doc.eq(i.doc)||!this.editor.isEditable)&&(r=this.state)!=null&&r.show&&(this.state.show=!1,this.emitUpdate())}destroy(){this.pmView.dom.removeEventListener("mousedown",this.mouseDownHandler),this.pmView.dom.removeEventListener("dragstart",this.dragstartHandler),this.pmView.root.removeEventListener("scroll",this.scrollHandler,!0)}}const je=new _.PluginKey("FilePanelPlugin");class Jt extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"closeMenu",()=>this.view.closeMenu());this.plugin=new _.Plugin({key:je,view:o=>(this.view=new Zt(i,je,o,n=>{this.emit("update",n)}),this.view),props:{handleKeyDown:(o,n)=>n.key==="Escape"&&this.shown?(this.view.closeMenu(),!0):!1},state:{init:()=>({block:void 0}),apply:o=>{var r;return{block:(r=o.getMeta(je))==null?void 0:r.block}}}})}get shown(){var i,o;return((o=(i=this.view)==null?void 0:i.state)==null?void 0:o.show)||!1}onUpdate(i){return this.on("update",i)}}class Yt{constructor(t,i,o){u(this,"state");u(this,"emitUpdate");u(this,"preventHide",!1);u(this,"preventShow",!1);u(this,"shouldShow",({state:t,from:i,to:o,view:n})=>{const{doc:r,selection:a}=t,{empty:l}=a,s=!r.textBetween(i,o).length&&b.isTextSelection(t.selection);return!(!n.hasFocus()||l||s)});u(this,"blurHandler",t=>{var o;if(this.preventHide){this.preventHide=!1;return}const i=this.pmView.dom.parentElement;t&&t.relatedTarget&&(i===t.relatedTarget||i.contains(t.relatedTarget)||t.relatedTarget.matches(".bn-ui-container, .bn-ui-container *"))||(o=this.state)!=null&&o.show&&(this.state.show=!1,this.emitUpdate())});u(this,"viewMousedownHandler",()=>{this.preventShow=!0});u(this,"viewMouseupHandler",()=>{this.preventShow=!1,setTimeout(()=>this.update(this.pmView))});u(this,"dragHandler",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});u(this,"scrollHandler",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.referencePos=this.getSelectionBoundingBox(),this.emitUpdate())});u(this,"closeMenu",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});this.editor=t,this.pmView=i,this.emitUpdate=()=>{if(!this.state)throw new Error("Attempting to update uninitialized formatting toolbar");o(this.state)},i.dom.addEventListener("mousedown",this.viewMousedownHandler),i.dom.addEventListener("mouseup",this.viewMouseupHandler),i.dom.addEventListener("dragstart",this.dragHandler),i.dom.addEventListener("dragover",this.dragHandler),i.dom.addEventListener("blur",this.blurHandler),i.root.addEventListener("scroll",this.scrollHandler,!0)}update(t,i){var m,g;const{state:o,composing:n}=t,{doc:r,selection:a}=o,l=i&&i.doc.eq(r)&&i.selection.eq(a);if(n||l)return;const{ranges:s}=a,c=Math.min(...s.map(f=>f.$from.pos)),p=Math.max(...s.map(f=>f.$to.pos)),h=(m=this.shouldShow)==null?void 0:m.call(this,{view:t,state:o,from:c,to:p});if(!this.preventShow&&(h||this.preventHide)){this.state={show:!0,referencePos:this.getSelectionBoundingBox()},this.emitUpdate();return}if((g=this.state)!=null&&g.show&&!this.preventHide&&(!h||this.preventShow||!this.editor.isEditable)){this.state.show=!1,this.emitUpdate();return}}destroy(){this.pmView.dom.removeEventListener("mousedown",this.viewMousedownHandler),this.pmView.dom.removeEventListener("mouseup",this.viewMouseupHandler),this.pmView.dom.removeEventListener("dragstart",this.dragHandler),this.pmView.dom.removeEventListener("dragover",this.dragHandler),this.pmView.dom.removeEventListener("blur",this.blurHandler),this.pmView.root.removeEventListener("scroll",this.scrollHandler,!0)}getSelectionBoundingBox(){const{state:t}=this.pmView,{selection:i}=t,{ranges:o}=i,n=Math.min(...o.map(a=>a.$from.pos)),r=Math.max(...o.map(a=>a.$to.pos));if(b.isNodeSelection(i)){const a=this.pmView.nodeDOM(n);if(a)return a.getBoundingClientRect()}return b.posToDOMRect(this.pmView,n,r)}}const Qt=new _.PluginKey("FormattingToolbarPlugin");class ei extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"closeMenu",()=>this.view.closeMenu());this.plugin=new _.Plugin({key:Qt,view:o=>(this.view=new Yt(i,o,n=>{this.emit("update",n)}),this.view),props:{handleKeyDown:(o,n)=>n.key==="Escape"&&this.shown?(this.view.closeMenu(),!0):!1}})}get shown(){var i,o;return((o=(i=this.view)==null?void 0:i.state)==null?void 0:o.show)||!1}onUpdate(i){return this.on("update",i)}}class sn{constructor(t,i,o){u(this,"state");u(this,"emitUpdate");u(this,"menuUpdateTimer");u(this,"startMenuUpdateTimer");u(this,"stopMenuUpdateTimer");u(this,"mouseHoveredLinkMark");u(this,"mouseHoveredLinkMarkRange");u(this,"keyboardHoveredLinkMark");u(this,"keyboardHoveredLinkMarkRange");u(this,"linkMark");u(this,"linkMarkRange");u(this,"mouseOverHandler",t=>{if(this.mouseHoveredLinkMark=void 0,this.mouseHoveredLinkMarkRange=void 0,this.stopMenuUpdateTimer(),t.target instanceof HTMLAnchorElement&&t.target.nodeName==="A"){const i=t.target,o=this.pmView.posAtDOM(i,0)+1,n=this.pmView.state.doc.resolve(o),r=n.marks();for(const a of r)if(a.type.name===this.pmView.state.schema.mark("link").type.name){this.mouseHoveredLinkMark=a,this.mouseHoveredLinkMarkRange=b.getMarkRange(n,a.type,a.attrs)||void 0;break}}return this.startMenuUpdateTimer(),!1});u(this,"clickHandler",t=>{var o;const i=this.pmView.dom.parentElement;this.linkMark&&t&&t.target&&!(i===t.target||i.contains(t.target))&&(o=this.state)!=null&&o.show&&(this.state.show=!1,this.emitUpdate())});u(this,"scrollHandler",()=>{var t;this.linkMark!==void 0&&(t=this.state)!=null&&t.show&&(this.state.referencePos=b.posToDOMRect(this.pmView,this.linkMarkRange.from,this.linkMarkRange.to),this.emitUpdate())});u(this,"closeMenu",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});this.editor=t,this.pmView=i,this.emitUpdate=()=>{if(!this.state)throw new Error("Attempting to update uninitialized link toolbar");o(this.state)},this.startMenuUpdateTimer=()=>{this.menuUpdateTimer=setTimeout(()=>{this.update()},250)},this.stopMenuUpdateTimer=()=>(this.menuUpdateTimer&&(clearTimeout(this.menuUpdateTimer),this.menuUpdateTimer=void 0),!1),this.pmView.dom.addEventListener("mouseover",this.mouseOverHandler),this.pmView.root.addEventListener("click",this.clickHandler,!0),this.pmView.root.addEventListener("scroll",this.scrollHandler,!0)}editLink(t,i){var n;const o=this.pmView.state.tr.insertText(i,this.linkMarkRange.from,this.linkMarkRange.to);o.addMark(this.linkMarkRange.from,this.linkMarkRange.from+i.length,this.pmView.state.schema.mark("link",{href:t})),this.editor.dispatch(o),this.pmView.focus(),(n=this.state)!=null&&n.show&&(this.state.show=!1,this.emitUpdate())}deleteLink(){var t;this.editor.dispatch(this.pmView.state.tr.removeMark(this.linkMarkRange.from,this.linkMarkRange.to,this.linkMark.type).setMeta("preventAutolink",!0)),this.pmView.focus(),(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())}update(){var i;if(!this.pmView.hasFocus())return;const t=this.linkMark;if(this.linkMark=void 0,this.linkMarkRange=void 0,this.keyboardHoveredLinkMark=void 0,this.keyboardHoveredLinkMarkRange=void 0,this.pmView.state.selection.empty){const o=this.pmView.state.selection.$from.marks();for(const n of o)if(n.type.name===this.pmView.state.schema.mark("link").type.name){this.keyboardHoveredLinkMark=n,this.keyboardHoveredLinkMarkRange=b.getMarkRange(this.pmView.state.selection.$from,n.type,n.attrs)||void 0;break}}if(this.mouseHoveredLinkMark&&(this.linkMark=this.mouseHoveredLinkMark,this.linkMarkRange=this.mouseHoveredLinkMarkRange),this.keyboardHoveredLinkMark&&(this.linkMark=this.keyboardHoveredLinkMark,this.linkMarkRange=this.keyboardHoveredLinkMarkRange),this.linkMark&&this.editor.isEditable){this.state={show:!0,referencePos:b.posToDOMRect(this.pmView,this.linkMarkRange.from,this.linkMarkRange.to),url:this.linkMark.attrs.href,text:this.pmView.state.doc.textBetween(this.linkMarkRange.from,this.linkMarkRange.to)},this.emitUpdate();return}if((i=this.state)!=null&&i.show&&t&&(!this.linkMark||!this.editor.isEditable)){this.state.show=!1,this.emitUpdate();return}}destroy(){this.pmView.dom.removeEventListener("mouseover",this.mouseOverHandler),this.pmView.root.removeEventListener("scroll",this.scrollHandler,!0),this.pmView.root.removeEventListener("click",this.clickHandler,!0)}}const ti=new _.PluginKey("LinkToolbarPlugin");class ii extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"editLink",(i,o)=>{this.view.editLink(i,o)});u(this,"deleteLink",()=>{this.view.deleteLink()});u(this,"startHideTimer",()=>{this.view.startMenuUpdateTimer()});u(this,"stopHideTimer",()=>{this.view.stopMenuUpdateTimer()});u(this,"closeMenu",()=>this.view.closeMenu());this.plugin=new _.Plugin({key:ti,view:o=>(this.view=new sn(i,o,n=>{this.emit("update",n)}),this.view),props:{handleKeyDown:(o,n)=>n.key==="Escape"&&this.shown?(this.view.closeMenu(),!0):!1}})}onUpdate(i){return this.on("update",i)}get shown(){var i,o;return((o=(i=this.view)==null?void 0:i.state)==null?void 0:o.show)||!1}}class X extends _.Selection{constructor(i,o){super(i,o);u(this,"nodes");const n=i.node();this.nodes=[],i.doc.nodesBetween(i.pos,o.pos,(r,a,l)=>{if(l!==null&&l.eq(n))return this.nodes.push(r),!1})}static create(i,o,n=o){return new X(i.resolve(o),i.resolve(n))}content(){return new y.Slice(y.Fragment.from(this.nodes),0,0)}eq(i){if(!(i instanceof X)||this.nodes.length!==i.nodes.length||this.from!==i.from||this.to!==i.to)return!1;for(let o=0;o<this.nodes.length;o++)if(!this.nodes[o].eq(i.nodes[o]))return!1;return!0}map(i,o){const n=o.mapResult(this.from),r=o.mapResult(this.to);return r.deleted?_.Selection.near(i.resolve(n.pos)):n.deleted?_.Selection.near(i.resolve(r.pos)):new X(i.resolve(n.pos),i.resolve(r.pos))}toJSON(){return{type:"node",anchor:this.anchor,head:this.head}}}let P;function re(e,t){var i,o;for(;e&&e.parentElement&&e.parentElement!==t.dom&&((i=e.getAttribute)==null?void 0:i.call(e,"data-node-type"))!=="blockContainer";)e=e.parentElement;if(((o=e.getAttribute)==null?void 0:o.call(e,"data-node-type"))==="blockContainer")return{node:e,id:e.getAttribute("data-id")}}function dn(e,t){const i=re(e,t);if(i&&i.node.nodeType===1){const o=t.docView,n=o.nearestDesc(i.node,!0);return!n||n===o?null:n.posBefore}return null}function cn(e,t){let i,o;const n=t.resolve(e.from).node().type.spec.group==="blockContent",r=t.resolve(e.to).node().type.spec.group==="blockContent",a=Math.min(e.$anchor.depth,e.$head.depth);if(n&&r){const l=e.$from.start(a-1),s=e.$to.end(a-1);i=t.resolve(l-1).pos,o=t.resolve(s+1).pos}else i=e.from,o=e.to;return{from:i,to:o}}function oi(e,t,i=t){t===i&&(i+=e.state.doc.resolve(t+1).node().nodeSize);const o=e.domAtPos(t).node.cloneNode(!0),n=e.domAtPos(t).node,r=(p,h)=>Array.prototype.indexOf.call(p.children,h),a=r(n,e.domAtPos(t+1).node.parentElement),l=r(n,e.domAtPos(i-1).node.parentElement);for(let p=n.childElementCount-1;p>=0;p--)(p>l||p<a)&&o.removeChild(o.children[p]);ni(e.root),P=o;const c=e.dom.className.split(" ").filter(p=>p!=="ProseMirror"&&p!=="bn-root"&&p!=="bn-editor").join(" ");P.className=P.className+" bn-drag-preview "+c,e.root instanceof ShadowRoot?e.root.appendChild(P):e.root.body.appendChild(P)}function ni(e){P!==void 0&&(e instanceof ShadowRoot?e.removeChild(P):e.body.removeChild(P),P=void 0)}function un(e,t){if(!e.dataTransfer)return;const i=t.prosemirrorView,o=i.dom.getBoundingClientRect(),n={left:o.left+o.width/2,top:e.clientY},r=i.root.elementsFromPoint(n.left,n.top);let a;for(const s of r)if(i.dom.contains(s)){a=re(s,i);break}if(!a)return;const l=dn(a.node,i);if(l!=null){const s=i.state.selection,c=i.state.doc,{from:p,to:h}=cn(s,c),m=p<=l&&l<h,g=s.$anchor.node()!==s.$head.node()||s instanceof X;m&&g?(i.dispatch(i.state.tr.setSelection(X.create(c,p,h))),oi(i,p,h)):(i.dispatch(i.state.tr.setSelection(_.NodeSelection.create(i.state.doc,l))),oi(i,l));const f=i.state.selection.content(),k=t.pmSchema,z=se(k,t).serializeProseMirrorFragment(f.content,{}),O=Y(k,t).exportProseMirrorFragment(f.content,{}),ae=ue(O);e.dataTransfer.clearData(),e.dataTransfer.setData("blocknote/html",z),e.dataTransfer.setData("text/html",O),e.dataTransfer.setData("text/plain",ae),e.dataTransfer.effectAllowed="move",e.dataTransfer.setDragImage(P,0,0),i.dragging={slice:f,move:!0}}}class ri{constructor(t,i,o){u(this,"state");u(this,"emitUpdate");u(this,"needUpdate",!1);u(this,"mousePos");u(this,"horizontalPosAnchoredAtRoot");u(this,"horizontalPosAnchor");u(this,"hoveredBlock");u(this,"isDragging",!1);u(this,"menuFrozen",!1);u(this,"updateState",()=>{var a,l,s,c;if(this.menuFrozen||!this.mousePos)return;const t=this.pmView.dom.firstChild.getBoundingClientRect();this.horizontalPosAnchor=t.x;const i={left:t.left+t.width/2,top:this.mousePos.y},o=this.pmView.root.elementsFromPoint(i.left,i.top);let n;for(const p of o)if(this.pmView.dom.contains(p)){n=re(p,this.pmView);break}if(!n||!this.editor.isEditable){(a=this.state)!=null&&a.show&&(this.state.show=!1,this.needUpdate=!0);return}if((l=this.state)!=null&&l.show&&((s=this.hoveredBlock)!=null&&s.hasAttribute("data-id"))&&((c=this.hoveredBlock)==null?void 0:c.getAttribute("data-id"))===n.id)return;this.hoveredBlock=n.node;const r=n.node.firstChild;if(r&&this.editor.isEditable){const p=r.getBoundingClientRect();this.state={show:!0,referencePos:new DOMRect(this.horizontalPosAnchoredAtRoot?this.horizontalPosAnchor:p.x,p.y,p.width,p.height),block:this.editor.getBlock(this.hoveredBlock.getAttribute("data-id"))},this.needUpdate=!0}});u(this,"onDragStart",()=>{this.isDragging=!0});u(this,"onDrop",t=>{if(this.editor._tiptapEditor.commands.blur(),t.synthetic||!this.isDragging)return;const i=this.pmView.posAtCoords({left:t.clientX,top:t.clientY});if(this.isDragging=!1,!i||i.inside===-1){const o=new Event("drop",t),n=this.pmView.dom.firstChild.getBoundingClientRect();o.clientX=t.clientX<n.left||t.clientX>n.left+n.width?n.left+n.width/2:t.clientX,o.clientY=Math.min(Math.max(t.clientY,n.top),n.top+n.height),o.dataTransfer=t.dataTransfer,o.preventDefault=()=>t.preventDefault(),o.synthetic=!0,this.pmView.dom.dispatchEvent(o)}});u(this,"onDragOver",t=>{if(t.synthetic||!this.isDragging)return;const i=this.pmView.posAtCoords({left:t.clientX,top:t.clientY});if(!i||i.inside===-1){const o=new Event("dragover",t),n=this.pmView.dom.firstChild.getBoundingClientRect();o.clientX=n.left+n.width/2,o.clientY=t.clientY,o.dataTransfer=t.dataTransfer,o.preventDefault=()=>t.preventDefault(),o.synthetic=!0,this.pmView.dom.dispatchEvent(o)}});u(this,"onKeyDown",t=>{var i;(i=this.state)!=null&&i.show&&this.editor.isFocused()&&(this.state.show=!1,this.emitUpdate(this.state),this.menuFrozen=!1)});u(this,"onMouseDown",()=>{this.state&&this.state.show&&this.menuFrozen&&(this.menuFrozen=!1,this.state.show=!1,this.emitUpdate(this.state))});u(this,"onMouseMove",t=>{var r;if(this.menuFrozen)return;this.mousePos={x:t.clientX,y:t.clientY};const i=this.pmView.dom.getBoundingClientRect(),o=this.mousePos.x>i.left&&this.mousePos.x<i.right&&this.mousePos.y>i.top&&this.mousePos.y<i.bottom,n=this.pmView.dom.parentElement;if(o&&t&&t.target&&!(n===t.target||n.contains(t.target))){(r=this.state)!=null&&r.show&&(this.state.show=!1,this.emitUpdate(this.state));return}this.updateState(),this.needUpdate&&(this.emitUpdate(this.state),this.needUpdate=!1)});u(this,"onScroll",()=>{var t;if((t=this.state)!=null&&t.show){const o=this.hoveredBlock.firstChild.getBoundingClientRect();this.state.referencePos=new DOMRect(this.horizontalPosAnchoredAtRoot?this.horizontalPosAnchor:o.x,o.y,o.width,o.height),this.emitUpdate(this.state)}});this.editor=t,this.pmView=i,this.emitUpdate=()=>{if(!this.state)throw new Error("Attempting to update uninitialized side menu");o(this.state)},this.horizontalPosAnchoredAtRoot=!0,this.horizontalPosAnchor=this.pmView.dom.firstChild.getBoundingClientRect().x,this.pmView.root.addEventListener("drop",this.onDrop,!0),this.pmView.root.addEventListener("dragover",this.onDragOver),this.pmView.dom.addEventListener("dragstart",this.onDragStart),this.pmView.root.addEventListener("mousemove",this.onMouseMove,!0),this.pmView.dom.addEventListener("mousedown",this.onMouseDown),this.pmView.root.addEventListener("keydown",this.onKeyDown,!0),this.pmView.root.addEventListener("scroll",this.onScroll,!0)}update(){var i;const t=(i=this.state)==null?void 0:i.block.id;this.updateState(),this.needUpdate&&this.state&&t!==this.state.block.id&&(this.emitUpdate(this.state),this.needUpdate=!1)}destroy(){var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate(this.state)),this.pmView.root.removeEventListener("mousemove",this.onMouseMove,!0),this.pmView.root.removeEventListener("dragover",this.onDragOver),this.pmView.dom.removeEventListener("dragstart",this.onDragStart),this.pmView.root.removeEventListener("drop",this.onDrop,!0),this.pmView.root.removeEventListener("scroll",this.onScroll,!0),this.pmView.dom.removeEventListener("mousedown",this.onMouseDown),this.pmView.root.removeEventListener("keydown",this.onKeyDown,!0)}addBlock(){var s;(s=this.state)!=null&&s.show&&(this.state.show=!1,this.emitUpdate(this.state));const i=this.hoveredBlock.firstChild.getBoundingClientRect(),o=this.pmView.posAtCoords({left:i.left+i.width/2,top:i.top+i.height/2});if(!o)return;const n=v(this.editor._tiptapEditor.state.doc,o.pos);if(n===void 0)return;const{contentNode:r,startPos:a,endPos:l}=n;if(r.type.spec.content!=="inline*"||r.textContent.length!==0){const c=l+1,p=c+2;this.editor._tiptapEditor.chain().BNCreateBlock(c).setTextSelection(p).run()}else this.editor._tiptapEditor.commands.setTextSelection(a+1);this.editor.openSelectionMenu("/")}}const ai=new _.PluginKey("SideMenuPlugin");class li extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"addBlock",()=>this.view.addBlock());u(this,"blockDragStart",i=>{this.view.isDragging=!0,un(i,this.editor)});u(this,"blockDragEnd",()=>ni(this.editor.prosemirrorView.root));u(this,"freezeMenu",()=>this.view.menuFrozen=!0);u(this,"unfreezeMenu",()=>{this.view.menuFrozen=!1,this.view.state.show=!1,this.view.emitUpdate(this.view.state)});this.editor=i,this.plugin=new _.Plugin({key:ai,view:o=>(this.view=new ri(i,o,n=>{this.emit("update",n)}),this.view)})}onUpdate(i){return this.on("update",i)}}const pn=b.findParentNode(e=>e.type.name==="blockContainer");class hn{constructor(t,i){u(this,"state");u(this,"emitUpdate");u(this,"rootEl");u(this,"pluginState");u(this,"handleScroll",()=>{var t,i;if((t=this.state)!=null&&t.show){const o=(i=this.rootEl)==null?void 0:i.querySelector(`[data-decoration-id="${this.pluginState.decorationId}"]`);this.state.referencePos=o.getBoundingClientRect(),this.emitUpdate(this.pluginState.triggerCharacter)}});u(this,"closeMenu",()=>{this.editor.dispatch(this.editor._tiptapEditor.view.state.tr.setMeta(Z,null))});u(this,"clearQuery",()=>{this.pluginState!==void 0&&this.editor._tiptapEditor.chain().focus().deleteRange({from:this.pluginState.queryStartPos-(this.pluginState.fromUserInput?this.pluginState.triggerCharacter.length:0),to:this.editor._tiptapEditor.state.selection.from}).run()});this.editor=t,this.pluginState=void 0,this.emitUpdate=o=>{if(!this.state)throw new Error("Attempting to update uninitialized suggestions menu");i(o,this.state)},this.rootEl=this.editor._tiptapEditor.view.root,this.rootEl.addEventListener("scroll",this.handleScroll,!0)}update(t,i){var c;const o=Z.getState(i),n=Z.getState(t.state),r=o===void 0&&n!==void 0,a=o!==void 0&&n===void 0;if(!r&&!(o!==void 0&&n!==void 0)&&!a)return;if(this.pluginState=a?o:n,a||!this.editor.isEditable){this.state.show=!1,this.emitUpdate(this.pluginState.triggerCharacter);return}const s=(c=this.rootEl)==null?void 0:c.querySelector(`[data-decoration-id="${this.pluginState.decorationId}"]`);this.editor.isEditable&&(this.state={show:!0,referencePos:s.getBoundingClientRect(),query:this.pluginState.query},this.emitUpdate(this.pluginState.triggerCharacter))}destroy(){var t;(t=this.rootEl)==null||t.removeEventListener("scroll",this.handleScroll,!0)}}const Z=new _.PluginKey("SuggestionMenuPlugin");class si extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"triggerCharacters",[]);u(this,"addTriggerCharacter",i=>{this.triggerCharacters.push(i)});u(this,"removeTriggerCharacter",i=>{this.triggerCharacters=this.triggerCharacters.filter(o=>o!==i)});u(this,"closeMenu",()=>this.view.closeMenu());u(this,"clearQuery",()=>this.view.clearQuery());const o=this.triggerCharacters;this.plugin=new _.Plugin({key:Z,view:()=>(this.view=new hn(i,(n,r)=>{this.emit(`update ${n}`,r)}),this.view),state:{init(){},apply(n,r,a,l){if(n.getMeta("orderedListIndexing")!==void 0)return r;const s=n.getMeta(Z);if(typeof s=="object"&&s!==null&&r===void 0)return{triggerCharacter:s.triggerCharacter,fromUserInput:s.fromUserInput!==!1,queryStartPos:l.selection.from,query:"",decorationId:`id_${Math.floor(Math.random()*4294967295)}`};if(r===void 0)return r;if(l.selection.from!==l.selection.to||s===null||n.getMeta("focus")||n.getMeta("blur")||n.getMeta("pointer")||r.triggerCharacter!==void 0&&l.selection.from<r.queryStartPos)return;const c={...r};return c.query=l.doc.textBetween(r.queryStartPos,l.selection.from),c}},props:{handleTextInput(n,r,a,l){const s=this.getState(n.state);return o.includes(l)&&s===void 0?(n.dispatch(n.state.tr.insertText(l).scrollIntoView().setMeta(Z,{triggerCharacter:l})),!0):!1},decorations(n){const r=this.getState(n);if(r===void 0)return null;if(!r.fromUserInput){const a=pn(n.selection);if(a)return M.DecorationSet.create(n.doc,[M.Decoration.node(a.pos,a.pos+a.node.nodeSize,{nodeName:"span",class:"bn-suggestion-decorator","data-decoration-id":r.decorationId})])}return M.DecorationSet.create(n.doc,[M.Decoration.inline(r.queryStartPos-r.triggerCharacter.length,r.queryStartPos,{nodeName:"span",class:"bn-suggestion-decorator","data-decoration-id":r.decorationId})])}}})}onUpdate(i,o){return this.triggerCharacters.includes(i)||this.addTriggerCharacter(i),this.on(`update ${i}`,o)}get shown(){var i,o;return((o=(i=this.view)==null?void 0:i.state)==null?void 0:o.show)||!1}}function mn(e,t){e.suggestionMenus.addTriggerCharacter(t)}let C;function di(e){C||(C=document.createElement("div"),C.innerHTML="_",C.style.opacity="0",C.style.height="1px",C.style.width="1px",e instanceof Document?e.body.appendChild(C):e.appendChild(C))}function fn(e){C&&(e instanceof Document?e.body.removeChild(C):e.removeChild(C),C=void 0)}function pe(e){return Array.prototype.indexOf.call(e.parentElement.childNodes,e)}function gn(e){for(;e&&e.nodeName!=="TD"&&e.nodeName!=="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function bn(e,t){e.forEach(i=>{const o=t.querySelectorAll(i);for(let n=0;n<o.length;n++)o[n].style.visibility="hidden"})}class ci{constructor(t,i,o){u(this,"state");u(this,"emitUpdate");u(this,"tableId");u(this,"tablePos");u(this,"menuFrozen",!1);u(this,"prevWasEditable",null);u(this,"mouseMoveHandler",t=>{var c;if(this.menuFrozen)return;const i=gn(t.target);if(!i||!this.editor.isEditable){(c=this.state)!=null&&c.show&&(this.state.show=!1,this.emitUpdate());return}const o=pe(i),n=pe(i.parentElement),r=i.getBoundingClientRect(),a=i.parentElement.parentElement.getBoundingClientRect(),l=re(i,this.pmView);if(!l)return;let s;if(this.editor._tiptapEditor.state.doc.descendants((p,h)=>{if(typeof s<"u")return!1;if(p.type.name!=="blockContainer"||p.attrs.id!==l.id)return!0;const m=E(p,this.editor.schema.blockSchema,this.editor.schema.inlineContentSchema,this.editor.schema.styleSchema,this.editor.blockCache);return Ft("table",m,this.editor)&&(this.tablePos=h+1,s=m),!1}),!!s&&(this.tableId=l.id,!(this.state!==void 0&&this.state.show&&this.tableId===l.id&&this.state.rowIndex===n&&this.state.colIndex===o)))return this.state={show:!0,referencePosCell:r,referencePosTable:a,block:s,colIndex:o,rowIndex:n,draggingState:void 0},this.emitUpdate(),!1});u(this,"dragOverHandler",t=>{var m;if(((m=this.state)==null?void 0:m.draggingState)===void 0)return;t.preventDefault(),t.dataTransfer.dropEffect="move",bn(["column-resize-handle","prosemirror-dropcursor-block","prosemirror-dropcursor-inline"],this.pmView.root);const i={left:Math.min(Math.max(t.clientX,this.state.referencePosTable.left+1),this.state.referencePosTable.right-1),top:Math.min(Math.max(t.clientY,this.state.referencePosTable.top+1),this.state.referencePosTable.bottom-1)},o=this.pmView.root.elementsFromPoint(i.left,i.top).filter(g=>g.tagName==="TD"||g.tagName==="TH");if(o.length===0)throw new Error("Could not find table cell element that the mouse cursor is hovering over.");const n=o[0];let r=!1;const a=pe(n.parentElement),l=pe(n),s=this.state.draggingState.draggedCellOrientation==="row"?this.state.rowIndex:this.state.colIndex,p=(this.state.draggingState.draggedCellOrientation==="row"?a:l)!==s;(this.state.rowIndex!==a||this.state.colIndex!==l)&&(this.state.rowIndex=a,this.state.colIndex=l,this.state.referencePosCell=n.getBoundingClientRect(),r=!0);const h=this.state.draggingState.draggedCellOrientation==="row"?i.top:i.left;this.state.draggingState.mousePos!==h&&(this.state.draggingState.mousePos=h,r=!0),r&&this.emitUpdate(),p&&this.editor.dispatch(this.pmView.state.tr.setMeta(J,!0))});u(this,"dropHandler",t=>{if(this.state===void 0||this.state.draggingState===void 0)return;t.preventDefault();const i=this.state.block.content.rows;if(this.state.draggingState.draggedCellOrientation==="row"){const o=i[this.state.draggingState.originalIndex];i.splice(this.state.draggingState.originalIndex,1),i.splice(this.state.rowIndex,0,o)}else{const o=i.map(n=>n.cells[this.state.draggingState.originalIndex]);i.forEach((n,r)=>{n.cells.splice(this.state.draggingState.originalIndex,1),n.cells.splice(this.state.colIndex,0,o[r])})}this.editor.updateBlock(this.state.block,{type:"table",content:{type:"tableContent",rows:i}})});u(this,"scrollHandler",()=>{var t;if((t=this.state)!=null&&t.show){const i=this.pmView.root.querySelector(`[data-node-type="blockContainer"][data-id="${this.tableId}"] table`),o=i.querySelector(`tr:nth-child(${this.state.rowIndex+1}) > td:nth-child(${this.state.colIndex+1})`);this.state.referencePosTable=i.getBoundingClientRect(),this.state.referencePosCell=o.getBoundingClientRect(),this.emitUpdate()}});this.editor=t,this.pmView=i,this.emitUpdate=()=>{if(!this.state)throw new Error("Attempting to update uninitialized image toolbar");o(this.state)},i.dom.addEventListener("mousemove",this.mouseMoveHandler),i.root.addEventListener("dragover",this.dragOverHandler),i.root.addEventListener("drop",this.dropHandler),i.root.addEventListener("scroll",this.scrollHandler,!0)}destroy(){this.pmView.dom.removeEventListener("mousemove",this.mouseMoveHandler),this.pmView.root.removeEventListener("dragover",this.dragOverHandler),this.pmView.root.removeEventListener("drop",this.dropHandler),this.pmView.root.removeEventListener("scroll",this.scrollHandler,!0)}}const J=new _.PluginKey("TableHandlesPlugin");class ui extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"colDragStart",i=>{if(this.view.state===void 0)throw new Error("Attempted to drag table column, but no table block was hovered prior.");this.view.state.draggingState={draggedCellOrientation:"col",originalIndex:this.view.state.colIndex,mousePos:i.clientX},this.view.emitUpdate(),this.editor.dispatch(this.editor._tiptapEditor.state.tr.setMeta(J,{draggedCellOrientation:this.view.state.draggingState.draggedCellOrientation,originalIndex:this.view.state.colIndex,newIndex:this.view.state.colIndex,tablePos:this.view.tablePos})),di(this.editor._tiptapEditor.view.root),i.dataTransfer.setDragImage(C,0,0),i.dataTransfer.effectAllowed="move"});u(this,"rowDragStart",i=>{if(this.view.state===void 0)throw new Error("Attempted to drag table row, but no table block was hovered prior.");this.view.state.draggingState={draggedCellOrientation:"row",originalIndex:this.view.state.rowIndex,mousePos:i.clientY},this.view.emitUpdate(),this.editor.dispatch(this.editor._tiptapEditor.state.tr.setMeta(J,{draggedCellOrientation:this.view.state.draggingState.draggedCellOrientation,originalIndex:this.view.state.rowIndex,newIndex:this.view.state.rowIndex,tablePos:this.view.tablePos})),di(this.editor._tiptapEditor.view.root),i.dataTransfer.setDragImage(C,0,0),i.dataTransfer.effectAllowed="copyMove"});u(this,"dragEnd",()=>{if(this.view.state===void 0)throw new Error("Attempted to drag table row, but no table block was hovered prior.");this.view.state.draggingState=void 0,this.view.emitUpdate(),this.editor.dispatch(this.editor._tiptapEditor.state.tr.setMeta(J,null)),fn(this.editor._tiptapEditor.view.root)});u(this,"freezeHandles",()=>{this.view.menuFrozen=!0});u(this,"unfreezeHandles",()=>{this.view.menuFrozen=!1});this.editor=i,this.plugin=new _.Plugin({key:J,view:o=>(this.view=new ci(i,o,n=>{this.emit("update",n)}),this.view),props:{decorations:o=>{if(this.view===void 0||this.view.state===void 0||this.view.state.draggingState===void 0||this.view.tablePos===void 0)return;const n=this.view.state.draggingState.draggedCellOrientation==="row"?this.view.state.rowIndex:this.view.state.colIndex,r=[];if(n===this.view.state.draggingState.originalIndex)return M.DecorationSet.create(o.doc,r);const a=o.doc.resolve(this.view.tablePos+1),l=a.node();if(this.view.state.draggingState.draggedCellOrientation==="row"){const s=o.doc.resolve(a.posAtIndex(n)+1),c=s.node();for(let p=0;p<c.childCount;p++){const h=o.doc.resolve(s.posAtIndex(p)+1),m=h.node(),g=h.pos+(n>this.view.state.draggingState.originalIndex?m.nodeSize-2:0);r.push(M.Decoration.widget(g,()=>{const f=document.createElement("div");return f.className="bn-table-drop-cursor",f.style.left="0",f.style.right="0",n>this.view.state.draggingState.originalIndex?f.style.bottom="-2px":f.style.top="-3px",f.style.height="4px",f}))}}else for(let s=0;s<l.childCount;s++){const c=o.doc.resolve(a.posAtIndex(s)+1),p=o.doc.resolve(c.posAtIndex(n)+1),h=p.node(),m=p.pos+(n>this.view.state.draggingState.originalIndex?h.nodeSize-2:0);r.push(M.Decoration.widget(m,()=>{const g=document.createElement("div");return g.className="bn-table-drop-cursor",g.style.top="0",g.style.bottom="0",n>this.view.state.draggingState.originalIndex?g.style.right="-2px":g.style.left="-3px",g.style.width="4px",g}))}return M.DecorationSet.create(o.doc,r)}}})}onUpdate(i){return this.on("update",i)}}function pi(e,t){const i=e.state.selection.content().content,n=se(e.state.schema,t).serializeProseMirrorFragment(i,{}),a=Y(e.state.schema,t).exportProseMirrorFragment(i,{}),l=ue(a);return{internalHTML:n,externalHTML:a,plainText:l}}const kn=e=>b.Extension.create({name:"copyToClipboard",addProseMirrorPlugins(){return[new _.Plugin({props:{handleDOMEvents:{copy(t,i){i.preventDefault(),i.clipboardData.clearData(),"node"in t.state.selection&&t.state.selection.node.type.spec.group==="blockContent"&&e.dispatch(e._tiptapEditor.state.tr.setSelection(new _.NodeSelection(t.state.doc.resolve(t.state.selection.from-1))));const{internalHTML:o,externalHTML:n,plainText:r}=pi(t,e);return i.clipboardData.setData("blocknote/html",o),i.clipboardData.setData("text/html",n),i.clipboardData.setData("text/plain",r),!0},dragstart(t,i){if(!("node"in t.state.selection)||t.state.selection.node.type.spec.group!=="blockContent")return;e.dispatch(e._tiptapEditor.state.tr.setSelection(new _.NodeSelection(t.state.doc.resolve(t.state.selection.from-1)))),i.preventDefault(),i.dataTransfer.clearData();const{internalHTML:o,externalHTML:n,plainText:r}=pi(t,e);return i.dataTransfer.setData("blocknote/html",o),i.dataTransfer.setData("text/html",n),i.dataTransfer.setData("text/plain",r),!0}}}})]}});function _n(e){let t=e.getTextCursorPosition().block,i=e.schema.blockSchema[t.type].content;for(;i==="none";)t=e.getTextCursorPosition().nextBlock,i=e.schema.blockSchema[t.type].content,e.setTextCursorPosition(t,"end")}function T(e,t){const i=e.getTextCursorPosition().block;if(i.content===void 0)throw new Error("Slash Menu open in a block that doesn't contain content.");Array.isArray(i.content)&&(i.content.length===1&&W(i.content[0])&&i.content[0].type==="text"&&i.content[0].text==="/"||i.content.length===0)?e.updateBlock(i,t):(e.insertBlocks([t],i,"after"),e.setTextCursorPosition(e.getTextCursorPosition().nextBlock,"end"));const o=e.getTextCursorPosition().block;return _n(e),o}function yn(e){const t=[];return B("heading",e)&&t.push({onItemClick:()=>{T(e,{type:"heading",props:{level:1}})},badge:H("Mod-Alt-1"),key:"heading",...e.dictionary.slash_menu.heading},{onItemClick:()=>{T(e,{type:"heading",props:{level:2}})},badge:H("Mod-Alt-2"),key:"heading_2",...e.dictionary.slash_menu.heading_2},{onItemClick:()=>{T(e,{type:"heading",props:{level:3}})},badge:H("Mod-Alt-3"),key:"heading_3",...e.dictionary.slash_menu.heading_3}),B("numberedListItem",e)&&t.push({onItemClick:()=>{T(e,{type:"numberedListItem"})},badge:H("Mod-Shift-7"),key:"numbered_list",...e.dictionary.slash_menu.numbered_list}),B("bulletListItem",e)&&t.push({onItemClick:()=>{T(e,{type:"bulletListItem"})},badge:H("Mod-Shift-8"),key:"bullet_list",...e.dictionary.slash_menu.bullet_list}),B("checkListItem",e)&&t.push({onItemClick:()=>{T(e,{type:"checkListItem"})},badge:H("Mod-Shift-9"),key:"check_list",...e.dictionary.slash_menu.check_list}),B("paragraph",e)&&t.push({onItemClick:()=>{T(e,{type:"paragraph"})},badge:H("Mod-Alt-0"),key:"paragraph",...e.dictionary.slash_menu.paragraph}),B("table",e)&&t.push({onItemClick:()=>{T(e,{type:"table",content:{type:"tableContent",rows:[{cells:["","",""]},{cells:["","",""]}]}})},badge:void 0,key:"table",...e.dictionary.slash_menu.table}),B("image",e)&&t.push({onItemClick:()=>{const i=T(e,{type:"image"});e.dispatch(e._tiptapEditor.state.tr.setMeta(e.filePanel.plugin,{block:i}))},key:"image",...e.dictionary.slash_menu.image}),B("video",e)&&t.push({onItemClick:()=>{const i=T(e,{type:"video"});e.dispatch(e._tiptapEditor.state.tr.setMeta(e.filePanel.plugin,{block:i}))},key:"video",...e.dictionary.slash_menu.video}),B("audio",e)&&t.push({onItemClick:()=>{const i=T(e,{type:"audio"});e.dispatch(e._tiptapEditor.state.tr.setMeta(e.filePanel.plugin,{block:i}))},key:"audio",...e.dictionary.slash_menu.audio}),B("file",e)&&t.push({onItemClick:()=>{const i=T(e,{type:"file"});e.dispatch(e._tiptapEditor.state.tr.setMeta(e.filePanel.plugin,{block:i}))},key:"image",...e.dictionary.slash_menu.file}),t.push({onItemClick:()=>e.openSelectionMenu(":"),key:"emoji",...e.dictionary.slash_menu.emoji}),t}function wn(e,t){return e.filter(({title:i,aliases:o})=>i.toLowerCase().includes(t.toLowerCase())||o&&o.filter(n=>n.toLowerCase().includes(t.toLowerCase())).length!==0)}const Re=["blocknote/html","Files","text/html","text/plain"];function vn(e,t){const i=e.split("/"),o=t.split("/");if(i.length!==2)throw new Error(`The string ${e} is not a valid MIME type.`);if(o.length!==2)throw new Error(`The string ${t} is not a valid MIME type.`);return i[1]==="*"||o[1]==="*"?i[0]===o[0]:(i[0]==="*"||o[0]==="*"||i[0]===o[0])&&i[1]===o[1]}async function hi(e,t){if(!t.uploadFile)return;const i="dataTransfer"in e?e.dataTransfer:e.clipboardData;if(i===null)return;let o=null;for(const a of Re)if(i.types.includes(a)){o=a;break}if(o!=="Files")return;const n=i.items;if(!n)return;e.preventDefault();const r=Object.values(t.schema.blockSchema).filter(a=>a.isFileBlock);for(let a=0;a<n.length;a++){let l="file";for(const c of r)for(const p of c.fileBlockAcceptMimeTypes||[])if(vn(n[a].type,p)){l=c.type;break}const s=n[a].getAsFile();if(s){const c=await t.uploadFile(s);if(typeof c=="string"){const p={type:l,props:{name:s.name,url:c}};T(t,p)}}}}const xn=e=>b.Extension.create({name:"pasteFromClipboard",addProseMirrorPlugins(){return[new _.Plugin({props:{handleDOMEvents:{paste(t,i){if(i.preventDefault(),!e.isEditable)return;let o=null;for(const r of Re)if(i.clipboardData.types.includes(r)){o=r;break}if(o===null)return!0;if(o==="Files")return hi(i,e),!0;let n=i.clipboardData.getData(o);return o==="text/html"&&(n=$t(n.trim()).innerHTML),e._tiptapEditor.view.pasteHTML(n),!0}}}})]}}),En=e=>b.Extension.create({name:"dropFile",addProseMirrorPlugins(){return[new _.Plugin({props:{handleDOMEvents:{drop(t,i){if(!e.isEditable)return;let o=null;for(const n of Re)if(i.dataTransfer.types.includes(n)){o=n;break}return o===null?!0:o==="Files"?(hi(i,e),!0):!1}}}})]}}),Sn=b.Extension.create({name:"blockBackgroundColor",addGlobalAttributes(){return[{types:["blockContainer"],attributes:{backgroundColor:{default:x.backgroundColor.default,parseHTML:e=>e.hasAttribute("data-background-color")?e.getAttribute("data-background-color"):x.backgroundColor.default,renderHTML:e=>e.backgroundColor===x.backgroundColor.default?{}:{"data-background-color":e.backgroundColor}}}}]}}),Cn=b.Extension.create({name:"textAlignment",addGlobalAttributes(){return[{types:["paragraph","heading","bulletListItem","numberedListItem","checkListItem"],attributes:{textAlignment:{default:"left",parseHTML:e=>e.getAttribute("data-text-alignment"),renderHTML:e=>e.textAlignment==="left"?{}:{"data-text-alignment":e.textAlignment}}}}]}}),Tn=b.Extension.create({name:"blockTextColor",addGlobalAttributes(){return[{types:["blockContainer"],attributes:{textColor:{default:x.textColor.default,parseHTML:e=>e.hasAttribute("data-text-color")?e.getAttribute("data-text-color"):x.textColor.default,renderHTML:e=>e.textColor===x.textColor.default?{}:{"data-text-color":e.textColor}}}}]}}),Mn=b.Extension.create({name:"trailingNode",addProseMirrorPlugins(){const e=new _.PluginKey(this.name);return[new _.Plugin({key:e,appendTransaction:(t,i,o)=>{const{doc:n,tr:r,schema:a}=o,l=e.getState(o),s=n.content.size-2,c=a.nodes.blockContainer,p=a.nodes.paragraph;if(l)return r.insert(s,c.create(void 0,p.create()))},state:{init:(t,i)=>{},apply:(t,i)=>{if(!t.docChanged)return i;let o=t.doc.lastChild;if(!o||o.type.name!=="blockGroup")throw new Error("Expected blockGroup");if(o=o.lastChild,!o||o.type.name!=="blockContainer")throw new Error("Expected blockContainer");const n=o.firstChild;if(!n)throw new Error("Expected blockContent");return o.nodeSize>4||n.type.spec.content!=="inline*"}}})]}}),Bn=new _.PluginKey("non-editable-block"),Ln=()=>new _.Plugin({key:Bn,props:{handleKeyDown:(e,t)=>{if("node"in e.state.selection){if(t.ctrlKey||t.metaKey)return!1;if(t.key.length===1)return t.preventDefault(),!0;if(t.key==="Enter"){const i=e.state.tr;return e.dispatch(i.insert(e.state.tr.selection.$to.after(),e.state.schema.nodes.paragraph.create()).setSelection(new _.TextSelection(i.doc.resolve(e.state.tr.selection.$to.after()+1)))),!0}}return!1}}}),mi=new _.PluginKey("previous-blocks"),In={index:"index",level:"level",type:"type",depth:"depth","depth-change":"depth-change"},Pn=()=>{let e;return new _.Plugin({key:mi,view(t){return{update:async(i,o)=>{var n;((n=this.key)==null?void 0:n.getState(i.state).updatedBlocks.size)>0&&(e=setTimeout(()=>{i.dispatch(i.state.tr.setMeta(mi,{clearUpdate:!0}))},0))},destroy:()=>{e&&clearTimeout(e)}}},state:{init(){return{prevTransactionOldBlockAttrs:{},currentTransactionOldBlockAttrs:{},updatedBlocks:new Set}},apply(t,i,o,n){if(i.currentTransactionOldBlockAttrs={},i.updatedBlocks.clear(),!t.docChanged||o.doc.eq(n.doc))return i;const r={},a=b.findChildren(o.doc,c=>c.attrs.id),l=new Map(a.map(c=>[c.node.attrs.id,c])),s=b.findChildren(n.doc,c=>c.attrs.id);for(const c of s){const p=l.get(c.node.attrs.id),h=p==null?void 0:p.node.firstChild,m=c.node.firstChild;if(p&&h&&m){const g={index:m.attrs.index,level:m.attrs.level,type:m.type.name,depth:n.doc.resolve(c.pos).depth};let f={index:h.attrs.index,level:h.attrs.level,type:h.type.name,depth:o.doc.resolve(p.pos).depth};r[c.node.attrs.id]=f,t.getMeta("numberedListIndexing")&&(c.node.attrs.id in i.prevTransactionOldBlockAttrs&&(f=i.prevTransactionOldBlockAttrs[c.node.attrs.id]),g.type==="numberedListItem"&&(f.index=g.index)),i.currentTransactionOldBlockAttrs[c.node.attrs.id]=f,JSON.stringify(f)!==JSON.stringify(g)&&(f["depth-change"]=f.depth-g.depth,i.updatedBlocks.add(c.node.attrs.id))}}return i.prevTransactionOldBlockAttrs=r,i}},props:{decorations(t){const i=this.getState(t);if(i.updatedBlocks.size===0)return;const o=[];return t.doc.descendants((n,r)=>{if(!n.attrs.id||!i.updatedBlocks.has(n.attrs.id))return;const a=i.currentTransactionOldBlockAttrs[n.attrs.id],l={};for(const[c,p]of Object.entries(a))l["data-prev-"+In[c]]=p||"none";const s=M.Decoration.node(r,r+n.nodeSize,{...l});o.push(s)}),M.DecorationSet.create(t.doc,o)}}})},An={blockColor:"data-block-color",blockStyle:"data-block-style",id:"data-id",depth:"data-depth",depthChange:"data-depth-change"},Nn=b.Node.create({name:"blockContainer",group:"blockContainer",content:"blockContent blockGroup?",priority:50,defining:!0,parseHTML(){return[{tag:"div",getAttrs:e=>{if(typeof e=="string")return!1;const t={};for(const[i,o]of Object.entries(An))e.getAttribute(o)&&(t[i]=e.getAttribute(o));return e.getAttribute("data-node-type")==="blockContainer"?t:!1}}]},renderHTML({HTMLAttributes:e}){var n;const t=document.createElement("div");t.className="bn-block-outer",t.setAttribute("data-node-type","blockOuter");for(const[r,a]of Object.entries(e))r!=="class"&&t.setAttribute(r,a);const i={...((n=this.options.domAttributes)==null?void 0:n.block)||{},...e},o=document.createElement("div");o.className=D("bn-block",i.class),o.setAttribute("data-node-type",this.name);for(const[r,a]of Object.entries(i))r!=="class"&&o.setAttribute(r,a);return t.appendChild(o),{dom:t,contentDOM:o}},addCommands(){return{BNCreateBlock:e=>({state:t,dispatch:i})=>{const o=t.schema.nodes.blockContainer.createAndFill();return i&&t.tr.insert(e,o).scrollIntoView(),!0},BNDeleteBlock:e=>({state:t,dispatch:i})=>{const o=v(t.doc,e);if(o===void 0)return!1;const{startPos:n,endPos:r}=o;return i&&t.tr.deleteRange(n,r),!0},BNUpdateBlock:(e,t)=>({state:i,dispatch:o})=>{const n=v(i.doc,e);if(n===void 0)return!1;const{startPos:r,endPos:a,node:l,contentNode:s}=n;if(o){if(t.children!==void 0){const m=[];for(const g of t.children)m.push(N(g,i.schema,this.options.editor.schema.styleSchema));l.childCount===2?i.tr.replace(r+s.nodeSize+1,a-1,new y.Slice(y.Fragment.from(m),0,0)):i.tr.insert(r+s.nodeSize,i.schema.nodes.blockGroup.create({},m))}const c=s.type.name,p=t.type||c;let h="keep";if(t.content)if(typeof t.content=="string")h=V([t.content],i.schema,this.options.editor.schema.styleSchema);else if(Array.isArray(t.content))h=V(t.content,i.schema,this.options.editor.schema.styleSchema);else if(t.content.type==="tableContent")h=ye(t.content,i.schema,this.options.editor.schema.styleSchema);else throw new I(t.content.type);else{const m=i.schema.nodes[c].spec.content,g=i.schema.nodes[p].spec.content;m===""||g!==m&&(h=[])}h==="keep"?i.tr.setNodeMarkup(r,t.type===void 0?void 0:i.schema.nodes[t.type],{...s.attrs,...t.props}):i.tr.replaceWith(r,a,i.schema.nodes[p].create({...s.attrs,...t.props},h)).setSelection(i.schema.nodes[p].spec.content===""?new _.NodeSelection(i.tr.doc.resolve(r)):i.schema.nodes[p].spec.content==="inline*"?new _.TextSelection(i.tr.doc.resolve(r)):new _.TextSelection(i.tr.doc.resolve(r+4))),i.tr.setNodeMarkup(r-1,void 0,{...l.attrs,...t.props})}return!0},BNMergeBlocks:e=>({state:t,dispatch:i})=>{const o=t.doc.resolve(e+1).node().type.name==="blockContainer",n=t.doc.resolve(e-1).node().type.name==="blockContainer";if(!o||!n)return!1;const r=v(t.doc,e+1),{node:a,contentNode:l,startPos:s,endPos:c,depth:p}=r;if(a.childCount===2){const g=t.doc.resolve(s+l.nodeSize+1),f=t.doc.resolve(c-1),k=g.blockRange(f);i&&t.tr.lift(k,p-1)}let h=e-1,m=v(t.doc,h);for(;m.numChildBlocks>0;)if(h--,m=v(t.doc,h),m===void 0)return!1;return i&&(i(t.tr.deleteRange(s,s+l.nodeSize).replace(h-1,s,new y.Slice(l.content,0,0)).scrollIntoView()),t.tr.setSelection(new _.TextSelection(t.doc.resolve(h-1)))),!0},BNSplitBlock:(e,t,i)=>({state:o,dispatch:n})=>{const r=v(o.doc,e);if(r===void 0)return!1;const{contentNode:a,contentType:l,startPos:s,endPos:c,depth:p}=r,h=o.doc.cut(s+1,e),m=o.doc.cut(e,c-1),g=o.schema.nodes.blockContainer.createAndFill(),f=c+1,k=f+2;return n&&(o.tr.insert(f,g),o.tr.replace(k,k+1,m.content.size>0?new y.Slice(y.Fragment.from(m),p+2,p+2):void 0),t&&o.tr.setBlockType(k,k,o.schema.node(l).type,i?a.attrs:void 0),o.tr.setSelection(new _.TextSelection(o.doc.resolve(k))),o.tr.replace(s+1,c-1,h.content.size>0?new y.Slice(y.Fragment.from(h),p+2,p+2):void 0),o.tr.scrollIntoView()),!0}}},addProseMirrorPlugins(){return[Pn(),Ln()]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.undoInputRule(),()=>o.command(({state:n})=>{const{contentType:r,startPos:a}=v(n.doc,n.selection.from),l=n.selection.from===a+1,s=r.name==="paragraph";return l&&!s?o.BNUpdateBlock(n.selection.from,{type:"paragraph",props:{}}):!1}),()=>o.command(({state:n})=>{const{startPos:r}=v(n.doc,n.selection.from);return n.selection.from===r+1?o.liftListItem("blockContainer"):!1}),()=>o.command(({state:n})=>{const{depth:r,startPos:a}=v(n.doc,n.selection.from),l=n.selection.from===a+1,s=n.selection.empty,c=a===2,p=a-1;return!c&&l&&s&&r===2?o.BNMergeBlocks(p):!1})]),Delete:()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.command(({state:n})=>{const{node:r,depth:a,endPos:l}=v(n.doc,n.selection.from),s=l===n.doc.nodeSize-4,c=n.selection.from===l-1,p=n.selection.empty,h=r.childCount===2;if(!s&&c&&p&&!h){let m=a,g=l+2,f=n.doc.resolve(g).depth;for(;f<m;)m=f,g+=2,f=n.doc.resolve(g).depth;return o.BNMergeBlocks(g-1)}return!1})]),Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.command(({state:n})=>{const{contentNode:r,depth:a}=v(n.doc,n.selection.from),l=n.selection.$anchor.parentOffset===0,s=n.selection.anchor===n.selection.head,c=r.childCount===0,p=a>2;return l&&s&&c&&p?o.liftListItem("blockContainer"):!1}),()=>o.command(({state:n,chain:r})=>{const{contentNode:a,endPos:l}=v(n.doc,n.selection.from),s=n.selection.$anchor.parentOffset===0,c=n.selection.anchor===n.selection.head,p=a.childCount===0;if(s&&c&&p){const h=l+1,m=h+2;return r().BNCreateBlock(h).setTextSelection(m).run(),!0}return!1}),()=>o.command(({state:n,chain:r})=>{const{contentNode:a}=v(n.doc,n.selection.from),l=n.selection.$anchor.parentOffset===0;return a.childCount===0?!1:(r().deleteSelection().BNSplitBlock(n.selection.from,l,l).run(),!0)})]),Tab:()=>{var o,n,r;return(o=this.options.editor.formattingToolbar)!=null&&o.shown||(n=this.options.editor.linkToolbar)!=null&&n.shown||(r=this.options.editor.filePanel)!=null&&r.shown?!1:(this.editor.commands.sinkListItem("blockContainer"),!0)},"Shift-Tab":()=>{var o,n,r;return(o=this.options.editor.formattingToolbar)!=null&&o.shown||(n=this.options.editor.linkToolbar)!=null&&n.shown||(r=this.options.editor.filePanel)!=null&&r.shown?!1:(this.editor.commands.liftListItem("blockContainer"),!0)}}}}),Hn=b.Node.create({name:"blockGroup",group:"blockGroup",content:"blockContainer+",parseHTML(){return[{tag:"div",getAttrs:e=>typeof e=="string"?!1:e.getAttribute("data-node-type")==="blockGroup"?null:!1}]},renderHTML({HTMLAttributes:e}){var o;const t={...((o=this.options.domAttributes)==null?void 0:o.blockGroup)||{},...e},i=document.createElement("div");i.className=D("bn-block-group",t.class),i.setAttribute("data-node-type","blockGroup");for(const[n,r]of Object.entries(t))n!=="class"&&i.setAttribute(n,r);return{dom:i,contentDOM:i}}}),Dn=b.Node.create({name:"doc",topNode:!0,content:"blockGroup"}),fi=e=>{var o;const t=[b.extensions.ClipboardTextSerializer,b.extensions.Commands,b.extensions.Editable,b.extensions.FocusEvents,b.extensions.Tabindex,zi.Gapcursor,q.configure({types:["blockContainer"]}),Oi.HardBreak.extend({priority:10}),Gi.Text,Fi.Link.extend({addKeyboardShortcuts(){return{"Mod-k":()=>(this.editor.commands.toggleLink({href:""}),!0)}}}),...Object.values(e.styleSpecs).map(n=>n.implementation.mark),Tn,Sn,Cn,b.Extension.create({name:"OverrideEscape",addKeyboardShortcuts(){return{Escape:()=>e.editor.suggestionMenus.shown?!1:this.editor.commands.blur()}}}),Dn,Nn.configure({editor:e.editor,domAttributes:e.domAttributes}),Hn.configure({domAttributes:e.domAttributes}),...Object.values(e.inlineContentSpecs).filter(n=>n.config!=="link"&&n.config!=="text").map(n=>n.implementation.node.configure({editor:e.editor})),...Object.values(e.blockSpecs).flatMap(n=>[...(n.implementation.requiredExtensions||[]).map(r=>r.configure({editor:e.editor,domAttributes:e.domAttributes})),n.implementation.node.configure({editor:e.editor,domAttributes:e.domAttributes})]),kn(e.editor),xn(e.editor),En(e.editor),Ri.Dropcursor.configure({width:5,color:"#ddeeff"}),...e.trailingBlock===void 0||e.trailingBlock?[Mn]:[]];if(e.collaboration){if(t.push(eo.default.configure({fragment:e.collaboration.fragment})),(o=e.collaboration.provider)!=null&&o.awareness){const n=r=>{const a=document.createElement("span");a.classList.add("collaboration-cursor__caret"),a.setAttribute("style",`border-color: ${r.color}`);const l=document.createElement("span");l.classList.add("collaboration-cursor__label"),l.setAttribute("style",`background-color: ${r.color}`),l.insertBefore(document.createTextNode(r.name),null);const s=document.createTextNode("⁠"),c=document.createTextNode("⁠");return a.insertBefore(s,null),a.insertBefore(l,null),a.insertBefore(c,null),a};t.push(to.default.configure({user:e.collaboration.user,render:e.collaboration.renderCursor||n,provider:e.collaboration.provider}))}}else t.push(Vi.History);const i=e.disableExtensions||[];return t.filter(n=>!i.includes(n.name))};function Un(e,t){const i=[];return e.forEach((o,n,r)=>{r!==t&&i.push(o)}),y.Fragment.from(i)}function jn(e,t){let i=y.Fragment.from(e.content);for(let o=0;o<i.childCount;o++)if(i.child(o).type.spec.group==="blockContent"){const n=[i.child(o)];if(o+1<i.childCount&&i.child(o+1).type.spec.group==="blockGroup"){const a=i.child(o+1).child(0).child(0);(a.type.name==="bulletListItem"||a.type.name==="numberedListItem"||a.type.name==="checkListItem")&&(n.push(i.child(o+1)),i=Un(i,o+1))}const r=t.state.schema.nodes.blockContainer.create(void 0,n);i=i.replaceChild(o,r)}return new y.Slice(i,e.openStart,e.openEnd)}function ze(e){return e&&Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}class he{constructor(t){u(this,"blockSpecs");u(this,"inlineContentSpecs");u(this,"styleSpecs");u(this,"blockSchema");u(this,"inlineContentSchema");u(this,"styleSchema");u(this,"BlockNoteEditor","only for types");u(this,"Block","only for types");u(this,"PartialBlock","only for types");this.blockSpecs=ze(t==null?void 0:t.blockSpecs)||Ae,this.inlineContentSpecs=ze(t==null?void 0:t.inlineContentSpecs)||He,this.styleSpecs=ze(t==null?void 0:t.styleSpecs)||Ne,this.blockSchema=Se(this.blockSpecs),this.inlineContentSchema=Ce(this.inlineContentSpecs),this.styleSchema=Me(this.styleSpecs)}static create(t){return new he(t)}}class gi extends b.Editor{constructor(i,o){super({...i,content:void 0});u(this,"_state");u(this,"mount",i=>{i?(this.options.element=i,this.createViewAlternative()):this.destroy()});const n=this.schema;let r;const a=n.nodes.doc.createAndFill;n.nodes.doc.createAndFill=(...s)=>{if(r)return r;const c=a.apply(n.nodes.doc,s),p=JSON.parse(JSON.stringify(c.toJSON()));return p.content[0].content[0].attrs.id="initialBlockId",r=y.Node.fromJSON(n,p),r};let l;try{const s=i==null?void 0:i.content.map(c=>N(c,this.schema,o).toJSON());l=b.createDocument({type:"doc",content:[{type:"blockGroup",content:s}]},this.schema,this.options.parseOptions)}catch(s){throw console.error("Error creating document from blocks passed as `initialContent`. Caused by exception: ",s),new Error("Error creating document from blocks passed as `initialContent`:\n"+ +JSON.stringify(i.content))}this._state=_.EditorState.create({doc:l,schema:this.schema})}get state(){return this.view&&(this._state=this.view.state),this._state}dispatch(i){this.view?this.view.dispatch(i):this._state=this.state.apply(i)}createViewAlternative(){queueMicrotask(()=>{this.view=new M.EditorView({mount:this.options.element},{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:this.state});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews()})}}gi.prototype.createView=()=>{};const Rn=new _.PluginKey("blocknote-placeholder"),zn=(e,t)=>new _.Plugin({key:Rn,view:()=>{const i=document.createElement("style"),o=e._tiptapEditor.options.injectNonce;o&&i.setAttribute("nonce",o),e._tiptapEditor.view.root instanceof ShadowRoot?e._tiptapEditor.view.root.append(i):e._tiptapEditor.view.root.head.appendChild(i);const n=i.sheet,r=(l="")=>`.bn-block-content${l} .bn-inline-content:has(> .ProseMirror-trailingBreak:only-child):before`,a=(l,s=!0)=>{const c=s?"[data-is-empty-and-focused]":"";if(l==="default")return r(c);const p=`[data-content-type="${l}"]`;return r(c+p)};for(const[l,s]of Object.entries(t)){const c=l==="default";n.insertRule(`${a(l,c)}{ content: ${JSON.stringify(s)}; }`),c||n.insertRule(`${a(l,!0)}{ content: ${JSON.stringify(s)}; }`)}return{destroy:()=>{e._tiptapEditor.view.root instanceof ShadowRoot?e._tiptapEditor.view.root.removeChild(i):e._tiptapEditor.view.root.head.removeChild(i)}}},props:{decorations:i=>{const{doc:o,selection:n}=i;if(!e.isEditable||!n.empty)return;const r=n.$anchor,a=r.parent;if(a.content.size>0)return null;const l=r.before(),s=M.Decoration.node(l,l+a.nodeSize,{"data-is-empty-and-focused":"true"});return M.DecorationSet.create(o,[s])}}}),On={enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!1};class Oe{constructor(t){u(this,"_pmSchema");u(this,"headless",!1);u(this,"_tiptapEditor");u(this,"elementRenderer",null);u(this,"blockCache",new WeakMap);u(this,"dictionary");u(this,"schema");u(this,"blockImplementations");u(this,"inlineContentImplementations");u(this,"styleImplementations");u(this,"formattingToolbar");u(this,"linkToolbar");u(this,"sideMenu");u(this,"suggestionMenus");u(this,"filePanel");u(this,"tableHandles");u(this,"uploadFile");u(this,"resolveFileUrl");u(this,"mount",t=>{this._tiptapEditor.mount(t)});var s,c,p,h,m,g,f;this.options=t;const i=t;if(i.onEditorContentChange)throw new Error("onEditorContentChange initialization option is deprecated, use <BlockNoteView onChange={...} />, the useEditorChange(...) hook, or editor.onChange(...)");if(i.onTextCursorPositionChange)throw new Error("onTextCursorPositionChange initialization option is deprecated, use <BlockNoteView onSelectionChange={...} />, the useEditorSelectionChange(...) hook, or editor.onSelectionChange(...)");if(i.onEditorReady)throw new Error("onEditorReady is deprecated. Editor is immediately ready for use after creation.");if(i.editable)throw new Error("editable initialization option is deprecated, use <BlockNoteView editable={true/false} />, or alternatively editor.isEditable = true/false");this.dictionary=t.dictionary||Ze;const o={defaultStyles:!0,schema:t.schema||he.create(),_headless:!1,...t,placeholders:{...this.dictionary.placeholders,...t.placeholders}};this.schema=o.schema,this.blockImplementations=o.schema.blockSpecs,this.inlineContentImplementations=o.schema.inlineContentSpecs,this.styleImplementations=o.schema.styleSpecs,this.formattingToolbar=new ei(this),this.linkToolbar=new ii(this),this.sideMenu=new li(this),this.suggestionMenus=new si(this),this.filePanel=new Jt(this),B("table",this)&&(this.tableHandles=new ui(this));const n=fi({editor:this,domAttributes:o.domAttributes||{},blockSpecs:this.schema.blockSpecs,styleSpecs:this.schema.styleSpecs,inlineContentSpecs:this.schema.inlineContentSpecs,collaboration:o.collaboration,trailingBlock:o.trailingBlock,disableExtensions:o.disableExtensions}),r=b.Extension.create({name:"BlockNoteUIExtension",addProseMirrorPlugins:()=>[this.formattingToolbar.plugin,this.linkToolbar.plugin,this.sideMenu.plugin,this.suggestionMenus.plugin,...this.filePanel?[this.filePanel.plugin]:[],...this.tableHandles?[this.tableHandles.plugin]:[],zn(this,o.placeholders)]});n.push(r),this.uploadFile=o.uploadFile,this.resolveFileUrl=o.resolveFileUrl||(async k=>k),this.headless=o._headless,o.collaboration&&o.initialContent&&console.warn("When using Collaboration, initialContent might cause conflicts, because changes should come from the collaboration provider");const a=o.initialContent||(t.collaboration?[{type:"paragraph",id:"initialBlockId"}]:[{type:"paragraph",id:q.options.generateID()}]);if(!Array.isArray(a)||a.length===0)throw new Error("initialContent must be a non-empty array of blocks, received: "+a);const l={...On,...o._tiptapOptions,content:a,extensions:[...((s=o._tiptapOptions)==null?void 0:s.extensions)||[],...n],editorProps:{...(c=o._tiptapOptions)==null?void 0:c.editorProps,attributes:{...(h=(p=o._tiptapOptions)==null?void 0:p.editorProps)==null?void 0:h.attributes,...(m=o.domAttributes)==null?void 0:m.editor,class:D("bn-editor",o.defaultStyles?"bn-default-styles":"",((f=(g=o.domAttributes)==null?void 0:g.editor)==null?void 0:f.class)||"")},transformPasted:jn}};this.headless?this._pmSchema=b.getSchema(l.extensions):(this._tiptapEditor=new gi(l,this.schema.styleSchema),this._pmSchema=this._tiptapEditor.schema)}get pmSchema(){return this._pmSchema}static create(t={}){return new Oe(t)}dispatch(t){this._tiptapEditor.dispatch(t)}get prosemirrorView(){return this._tiptapEditor.view}get domElement(){return this._tiptapEditor.view.dom}isFocused(){return this._tiptapEditor.view.hasFocus()}focus(){this._tiptapEditor.view.focus()}get topLevelBlocks(){return this.document}get document(){const t=[];return this._tiptapEditor.state.doc.firstChild.descendants(i=>(t.push(E(i,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache)),!1)),t}getBlock(t){const i=typeof t=="string"?t:t.id;let o;return this._tiptapEditor.state.doc.firstChild.descendants(n=>typeof o<"u"?!1:n.type.name!=="blockContainer"||n.attrs.id!==i?!0:(o=E(n,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache),!1)),o}forEachBlock(t,i=!1){const o=this.document.slice();i&&o.reverse();function n(r){for(const a of r){if(!t(a))return!1;const l=i?a.children.slice().reverse():a.children;if(!n(l))return!1}return!0}n(o)}onEditorContentChange(t){this._tiptapEditor.on("update",t)}onEditorSelectionChange(t){this._tiptapEditor.on("selectionUpdate",t)}getTextCursorPosition(){const{node:t,depth:i,startPos:o,endPos:n}=v(this._tiptapEditor.state.doc,this._tiptapEditor.state.selection.from),r=this._tiptapEditor.state.doc.resolve(n).index(i-1),a=this._tiptapEditor.state.doc.resolve(n+1).node().childCount;let l;r>0&&(l=this._tiptapEditor.state.doc.resolve(o-2).node());let s;return r<a-1&&(s=this._tiptapEditor.state.doc.resolve(n+2).node()),{block:E(t,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache),prevBlock:l===void 0?void 0:E(l,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache),nextBlock:s===void 0?void 0:E(s,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache)}}setTextCursorPosition(t,i="start"){const o=typeof t=="string"?t:t.id,{posBeforeNode:n}=De(o,this._tiptapEditor.state.doc),{startPos:r,contentNode:a}=v(this._tiptapEditor.state.doc,n+2),l=this.schema.blockSchema[a.type.name].content;if(l==="none"){this._tiptapEditor.commands.setNodeSelection(r);return}if(l==="inline")i==="start"?this._tiptapEditor.commands.setTextSelection(r+1):this._tiptapEditor.commands.setTextSelection(r+a.nodeSize-1);else if(l==="table")i==="start"?this._tiptapEditor.commands.setTextSelection(r+4):this._tiptapEditor.commands.setTextSelection(r+a.nodeSize-4);else throw new I(l)}getSelection(){if(this._tiptapEditor.state.selection.from===this._tiptapEditor.state.selection.to||"node"in this._tiptapEditor.state.selection)return;const t=[];return this._tiptapEditor.state.doc.descendants((i,o)=>i.type.spec.group!=="blockContent"||o+i.nodeSize<this._tiptapEditor.state.selection.from||o>this._tiptapEditor.state.selection.to?!0:(t.push(E(this._tiptapEditor.state.doc.resolve(o).node(),this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache)),!1)),{blocks:t}}get isEditable(){if(!this._tiptapEditor){if(!this.headless)throw new Error("no editor, but also not headless?");return!1}return this._tiptapEditor.isEditable===void 0?!0:this._tiptapEditor.isEditable}set isEditable(t){if(!this._tiptapEditor){if(!this.headless)throw new Error("no editor, but also not headless?");return}this._tiptapEditor.options.editable!==t&&this._tiptapEditor.setEditable(t)}insertBlocks(t,i,o="before"){return $o(t,i,o,this)}updateBlock(t,i){return Xo(t,i,this)}removeBlocks(t){return Zo(t,this)}replaceBlocks(t,i){return Jo(t,i,this)}insertInlineContent(t){const i=V(t,this.pmSchema,this.schema.styleSchema);Yo({from:this._tiptapEditor.state.selection.from,to:this._tiptapEditor.state.selection.to},i,this)}getActiveStyles(){const t={},i=this._tiptapEditor.state.selection.$to.marks();for(const o of i){const n=this.schema.styleSchema[o.type.name];if(!n){o.type.name!=="link"&&console.warn("mark not found in styleschema",o.type.name);continue}n.propSchema==="boolean"?t[n.type]=!0:t[n.type]=o.attrs.stringValue}return t}addStyles(t){for(const[i,o]of Object.entries(t)){const n=this.schema.styleSchema[i];if(!n)throw new Error(`style ${i} not found in styleSchema`);if(n.propSchema==="boolean")this._tiptapEditor.commands.setMark(i);else if(n.propSchema==="string")this._tiptapEditor.commands.setMark(i,{stringValue:o});else throw new I(n.propSchema)}}removeStyles(t){for(const i of Object.keys(t))this._tiptapEditor.commands.unsetMark(i)}toggleStyles(t){for(const[i,o]of Object.entries(t)){const n=this.schema.styleSchema[i];if(!n)throw new Error(`style ${i} not found in styleSchema`);if(n.propSchema==="boolean")this._tiptapEditor.commands.toggleMark(i);else if(n.propSchema==="string")this._tiptapEditor.commands.toggleMark(i,{stringValue:o});else throw new I(n.propSchema)}}getSelectedText(){return this._tiptapEditor.state.doc.textBetween(this._tiptapEditor.state.selection.from,this._tiptapEditor.state.selection.to)}getSelectedLinkUrl(){return this._tiptapEditor.getAttributes("link").href}createLink(t,i){if(t==="")return;const{from:o,to:n}=this._tiptapEditor.state.selection;i||(i=this._tiptapEditor.state.doc.textBetween(o,n));const r=this.pmSchema.mark("link",{href:t});this.dispatch(this._tiptapEditor.state.tr.insertText(i,o,n).addMark(o,o+i.length,r))}canNestBlock(){const{startPos:t,depth:i}=v(this._tiptapEditor.state.doc,this._tiptapEditor.state.selection.from);return this._tiptapEditor.state.doc.resolve(t).index(i-1)>0}nestBlock(){this._tiptapEditor.commands.sinkListItem("blockContainer")}canUnnestBlock(){const{depth:t}=v(this._tiptapEditor.state.doc,this._tiptapEditor.state.selection.from);return t>2}unnestBlock(){this._tiptapEditor.commands.liftListItem("blockContainer")}async blocksToHTMLLossy(t=this.document){return Y(this.pmSchema,this).exportBlocks(t,{})}async blocksToFullHTML(t){return se(this.pmSchema,this).serializeBlocks(t,{})}async tryParseHTMLToBlocks(t){return Ue(t,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.pmSchema)}async blocksToMarkdownLossy(t=this.document){return qt(t,this.pmSchema,this,{})}async tryParseMarkdownToBlocks(t){return Xt(t,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.pmSchema)}updateCollaborationUserInfo(t){if(!this.options.collaboration)throw new Error("Cannot update collaboration user info when collaboration is disabled.");this._tiptapEditor.commands.updateUser(t)}onChange(t){if(this.headless)return;const i=()=>{t(this)};return this._tiptapEditor.on("update",i),()=>{this._tiptapEditor.off("update",i)}}onSelectionChange(t){if(this.headless)return;const i=()=>{t(this)};return this._tiptapEditor.on("selectionUpdate",i),()=>{this._tiptapEditor.off("selectionUpdate",i)}}openSelectionMenu(t){this.prosemirrorView.focus(),this.prosemirrorView.dispatch(this.prosemirrorView.state.tr.scrollIntoView().setMeta(this.suggestionMenus.plugin,{triggerCharacter:t,fromUserInput:!1}))}}let me,Ve;async function Vn(e,t){if(!Vt("text",e))return[];if(!me){me=import("@emoji-mart/data"),Ve=await import("emoji-mart");const n=(await me).default;await Ve.init({data:n})}const i=(await me).default;return(t.trim()===""?Object.values(i.emojis):await Ve.SearchIndex.search(t)).map(n=>({id:n.skins[0].native,onItemClick:()=>e.insertInlineContent(n.skins[0].native+" ")}))}function Fe(e=""){return typeof e=="string"?[{type:"text",text:e,styles:{}}]:e}function bi(e){return typeof e=="string"?Fe(e):Array.isArray(e)?e.flatMap(t=>typeof t=="string"?Fe(t):ke(t)?{...t,content:Fe(t.content)}:W(t)?t:{props:{},...t,content:bi(t.content)}):e}function Fn(e,t){return t.map(i=>Ge(e,i))}function Ge(e,t){const i={id:"",type:t.type,props:{},content:e[t.type].content==="inline"?[]:void 0,children:[],...t};return Object.entries(e[t.type].propSchema).forEach(([o,n])=>{i.props[o]===void 0&&(i.props[o]=n.default)}),{...i,content:bi(i.content),children:i.children.map(o=>Ge(e,o))}}function ki(e){e.id||(e.id=q.options.generateID()),e.children&&_i(e.children)}function _i(e){for(const t of e)ki(t)}d.AudioBlock=yt,d.BlockNoteEditor=Oe,d.BlockNoteSchema=he,d.FileBlock=Ct,d.FilePanelProsemirrorPlugin=Jt,d.FilePanelView=Zt,d.FormattingToolbarProsemirrorPlugin=ei,d.FormattingToolbarView=Yt,d.HTMLToBlocks=Ue,d.ImageBlock=Pt,d.LinkToolbarProsemirrorPlugin=ii,d.SideMenuProsemirrorPlugin=li,d.SideMenuView=ri,d.SuggestionMenuProseMirrorPlugin=si,d.TableHandlesProsemirrorPlugin=ui,d.TableHandlesView=ci,d.UniqueID=q,d.UnreachableCaseError=I,d.VideoBlock=Rt,d.addIdsToBlock=ki,d.addIdsToBlocks=_i,d.addInlineContentAttributes=at,d.addInlineContentKeyboardShortcuts=lt,d.addStyleAttributes=pt,d.assertEmpty=ao,d.audioBlockConfig=gt,d.audioParse=kt,d.audioPropSchema=ft,d.audioRender=bt,d.audioToExternalHTML=_t,d.blockToNode=N,d.blocksToMarkdown=qt,d.camelToDataKebab=Q,d.checkBlockHasDefaultProp=Wo,d.checkBlockIsDefaultType=Ft,d.checkBlockIsFileBlock=Go,d.checkBlockIsFileBlockWithPlaceholder=qo,d.checkBlockIsFileBlockWithPreview=Ko,d.checkBlockTypeHasDefaultProp=Gt,d.checkDefaultBlockTypeInSchema=B,d.checkDefaultInlineContentTypeInSchema=Vt,d.cleanHTMLToMarkdown=ue,d.contentNodeToInlineContent=le,d.createAddFileButton=ie,d.createBlockSpec=ee,d.createBlockSpecFromStronglyTypedTiptapNode=G,d.createDefaultFilePreview=te,d.createExternalHTMLExporter=Y,d.createFigureWithCaption=ce,d.createFileAndCaptionWrapper=R,d.createInlineContentSpec=mo,d.createInlineContentSpecFromTipTapNode=dt,d.createInternalBlockSpec=Ee,d.createInternalHTMLSerializer=se,d.createInternalInlineContentSpec=st,d.createInternalStyleSpec=Te,d.createLinkWithCaption=ne,d.createResizeHandlesWrapper=Le,d.createStronglyTypedTiptapNode=U,d.createStyleSpec=fo,d.createStyleSpecFromTipTapMark=j,d.createSuggestionMenu=mn,d.defaultBlockSchema=zt,d.defaultBlockSpecs=Ae,d.defaultInlineContentSchema=Ot,d.defaultInlineContentSpecs=He,d.defaultProps=x,d.defaultStyleSchema=Fo,d.defaultStyleSpecs=Ne,d.fileBlockConfig=vt,d.fileParse=Et,d.filePropSchema=wt,d.fileRender=xt,d.fileToExternalHTML=St,d.filenameFromURL=ho,d.filterSuggestionItems=wn,d.formatKeyboardShortcut=H,d.formattingToolbarPluginKey=Qt,d.getBlockFromPos=nt,d.getBlockNoteExtensions=fi,d.getBlockSchemaFromSpecs=Se,d.getDefaultEmojiPickerItems=Vn,d.getDefaultSlashMenuItems=yn,d.getDraggableBlockFromElement=re,d.getInlineContentParseRules=ct,d.getInlineContentSchemaFromSpecs=Ce,d.getParseRules=rt,d.getStyleParseRules=ht,d.getStyleSchemaFromSpecs=Me,d.imageBlockConfig=Mt,d.imageParse=Lt,d.imagePropSchema=Tt,d.imageRender=Bt,d.imageToExternalHTML=It,d.inheritedProps=ve,d.inlineContentToNodes=V,d.insertOrUpdateBlock=T,d.isAppleOS=it,d.isLinkInlineContent=be,d.isPartialLinkInlineContent=ke,d.isSafari=po,d.isStyledTextInlineContent=W,d.linkToolbarPluginKey=ti,d.locales=oo,d.markdownToBlocks=Xt,d.mergeCSSClasses=D,d.nodeToBlock=E,d.nodeToCustomInlineContent=we,d.parseEmbedElement=Be,d.parseFigureElement=oe,d.parseImageElement=Ie,d.partialBlockToBlockForTesting=Ge,d.partialBlocksToBlocksForTesting=Fn,d.propsToAttributes=xe,d.sideMenuPluginKey=ai,d.stylePropsToAttributes=ut,d.tableContentToNodes=ye,d.tableHandlesPluginKey=J,d.uploadToTmpFilesDotOrg_DEV_ONLY=go,d.videoBlockConfig=Ht,d.videoParse=Ut,d.videoPropSchema=Nt,d.videoRender=Dt,d.videoToExternalHTML=jt,d.wrapInBlockStructure=de,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
5
+ `,styles:{}};return}if(r.type.name!=="link"&&r.type.name!=="text"&&t[r.type.name]){n&&(o.push(n),n=void 0),o.push(_e(r,t,i));return}const a={};let l;for(const s of r.marks)if(s.type.name==="link")l=s;else{const c=i[s.type.name];if(!c)throw new Error(`style ${s.type.name} not found in styleSchema`);if(c.propSchema==="boolean")a[c.type]=!0;else if(c.propSchema==="string")a[c.type]=s.attrs.stringValue;else throw new I(c.propSchema)}n?W(n)?l?(o.push(n),n={type:"link",href:l.attrs.href,content:[{type:"text",text:r.textContent,styles:a}]}):JSON.stringify(n.styles)===JSON.stringify(a)?n.text+=r.textContent:(o.push(n),n={type:"text",text:r.textContent,styles:a}):fe(n)&&(l?n.href===l.attrs.href?JSON.stringify(n.content[n.content.length-1].styles)===JSON.stringify(a)?n.content[n.content.length-1].text+=r.textContent:n.content.push({type:"text",text:r.textContent,styles:a}):(o.push(n),n={type:"link",href:l.attrs.href,content:[{type:"text",text:r.textContent,styles:a}]}):(o.push(n),n={type:"text",text:r.textContent,styles:a})):l?n={type:"link",href:l.attrs.href,content:[{type:"text",text:r.textContent,styles:a}]}:n={type:"text",text:r.textContent,styles:a}}),n&&o.push(n),o}function _e(e,t,i){if(e.type.name==="text"||e.type.name==="link")throw new Error("unexpected");const o={},n=t[e.type.name];for(const[l,s]of Object.entries(e.attrs)){if(!n)throw Error("ic node is of an unrecognized type: "+e.type.name);const c=n.propSchema;l in c&&(o[l]=s)}let r;return n.content==="styled"?r=le(e,t,i):r=void 0,{type:e.type.name,props:o,content:r}}function S(e,t,i,o,n){if(e.type.name!=="blockContainer")throw Error("Node must be of type blockContainer, but is of type"+e.type.name+".");const r=n==null?void 0:n.get(e);if(r)return r;const a=qe(e);let l=a.id;l===null&&(l=q.options.generateID());const s={};for(const[f,k]of Object.entries({...e.attrs,...a.contentNode.attrs})){const b=t[a.contentType.name];if(!b)throw Error("Block is of an unrecognized type: "+a.contentType.name);const v=b.propSchema;f in v&&(s[f]=k)}const c=t[a.contentType.name],p=[];for(let f=0;f<a.numChildBlocks;f++)p.push(S(e.lastChild.child(f),t,i,o,n));let h;if(c.content==="inline")h=le(a.contentNode,i,o);else if(c.content==="table")h=$i(a.contentNode,i,o);else if(c.content==="none")h=void 0;else throw new I(c.content);const m={id:l,type:c.type,props:s,content:h,children:p};return n==null||n.set(e,m),m}function Xi(e){return e.document||window.document}const Xe=(e,t,i,o,n)=>{if(!i.nodes[e.type.name])throw new Error("Serializer is missing a node type: "+e.type.name);const{dom:r,contentDOM:a}=y.DOMSerializer.renderSpec(Xi(t),i.nodes[e.type.name](e));if(a){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");if(e.type.name==="blockContainer"){const l=e.childCount>0&&e.firstChild.type.spec.group==="blockContent"?e.firstChild:void 0,s=e.childCount>0&&e.lastChild.type.spec.group==="blockGroup"?e.lastChild:void 0;if(l!==void 0){const c=o.blockImplementations[l.type.name].implementation,h=(n?c.toExternalHTML:c.toInternalHTML)(S(e,o.schema.blockSchema,o.schema.inlineContentSchema,o.schema.styleSchema,o.blockCache),o);if(h.contentDOM!==void 0){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");h.contentDOM.appendChild(i.serializeFragment(l.content,t))}a.appendChild(h.dom)}s!==void 0&&i.serializeFragment(y.Fragment.from(s),t,a)}else i.serializeFragment(e.content,t,a)}return r},Ze=(e,t,i)=>{const o=t.serializeFragment(e,i),n=document.createElement("div");return n.appendChild(o),n.innerHTML};function Zi(e){const t=d.esmDependencies;if(!t)throw new Error("simplifyBlocks requires ESM dependencies to be initialized");const i=new Set([...e.orderedListItemBlockTypes,...e.unorderedListItemBlockTypes]),o=n=>{var l;if(n.children.length===1&&((l=n.children[0].properties)==null?void 0:l.dataNodeType)==="blockGroup"){const s=n.children[0];n.children.pop(),n.children.push(...s.children)}let r=n.children.length,a;for(let s=0;s<r;s++){const p=n.children[s].children[0],h=p.children.find(b=>{const v=b.properties,x=v==null?void 0:v.className;return x==null?void 0:x.includes("bn-block-content")}),m=p.children.find(b=>{const v=b.properties,x=v==null?void 0:v.className;return x==null?void 0:x.includes("bn-block-group")});if(!h){n.children.splice(s,1,...m.children),o(n);return}const f=i.has(h.properties.dataContentType),k=f?e.orderedListItemBlockTypes.has(h.properties.dataContentType)?"ol":"ul":null;if(m&&o(m),a&&a.tagName!==k){n.children.splice(s-a.children.length,a.children.length,a);const b=a.children.length-1;s-=b,r-=b,a=void 0}if(f){a||(a=t.hastUtilFromDom.fromDom(document.createElement(k)));const b=t.hastUtilFromDom.fromDom(document.createElement("li"));b.children.push(...h.children),m&&b.children.push(...m.children),a.children.push(b)}else if(m){n.children.splice(s+1,0,...m.children),n.children[s]=h.children[0];const b=m.children.length;s+=b,r+=b}else n.children[s]=h.children[0]}a&&n.children.splice(r-a.children.length,a.children.length,a)};return o}const Y=(e,t)=>{const i=d.esmDependencies;if(!i)throw new Error("External HTML exporter requires ESM dependencies to be initialized");const o=y.DOMSerializer.fromSchema(e);return o.serializeNodeInner=(n,r)=>Xe(n,r,o,t,!0),o.exportProseMirrorFragment=(n,r)=>i.unified.unified().use(i.rehypeParse.default,{fragment:!0}).use(Zi,{orderedListItemBlockTypes:new Set(["numberedListItem"]),unorderedListItemBlockTypes:new Set(["bulletListItem","checkListItem"])}).use(i.rehypeStringify.default).processSync(Ze(n,o,r)).value,o.exportBlocks=(n,r)=>{const a=n.map(s=>N(s,e,t.schema.styleSchema)),l=e.nodes.blockGroup.create(null,a);return o.exportProseMirrorFragment(y.Fragment.from(l),r)},o},se=(e,t)=>{const i=y.DOMSerializer.fromSchema(e);return i.serializeNodeInner=(o,n)=>Xe(o,n,i,t,!1),i.serializeProseMirrorFragment=(o,n)=>Ze(o,i,n),i.serializeBlocks=(o,n)=>{const r=o.map(l=>N(l,e,t.schema.styleSchema)),a=e.nodes.blockGroup.create(null,r);return i.serializeProseMirrorFragment(y.Fragment.from(a),n)},i},B=e=>{const{contentType:t}=w(e.state.doc,e.state.selection.from);return t.spec.content},Je=()=>typeof navigator<"u"&&(/Mac/.test(navigator.platform)||/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent));function H(e,t="Ctrl"){return Je()?e.replace("Mod","⌘"):e.replace("Mod",t)}function D(...e){return e.filter(t=>t).join(" ")}const Ji=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function U(e,t,i,o){const n=document.createElement("div");n.className=D("bn-block-content",i.class),n.setAttribute("data-content-type",e);for(const[a,l]of Object.entries(i))a!=="class"&&n.setAttribute(a,l);const r=document.createElement(t);r.className=D("bn-inline-content",o.class);for(const[a,l]of Object.entries(o))a!=="class"&&r.setAttribute(a,l);return n.appendChild(r),{dom:n,contentDOM:r}}const ye=(e,t)=>{const i=N(e,t.pmSchema,t.schema.styleSchema).firstChild,o=t.pmSchema.nodes[i.type.name].spec.toDOM;if(o===void 0)throw new Error("This block has no default HTML serialization as its corresponding TipTap node doesn't implement `renderHTML`.");const n=o(i);if(typeof n!="object"||!("dom"in n))throw new Error("Cannot use this block's default HTML serialization as its corresponding TipTap node's `renderHTML` function does not return an object with the `dom` property.");return n},E={backgroundColor:{default:"default"},textColor:{default:"default"},textAlignment:{default:"left",values:["left","center","right","justify"]}},ve=["backgroundColor","textColor"];function Q(e){return"data-"+e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Yi(e){const t=e.split("/");return!t.length||t[t.length-1]===""?e:t[t.length-1]}function we(e){const t={};return Object.entries(e).filter(([i,o])=>!ve.includes(i)).forEach(([i,o])=>{t[i]={default:o.default,keepOnSplit:!0,parseHTML:n=>{const r=n.getAttribute(Q(i));if(r===null)return null;if(typeof o.default=="boolean")return r==="true"?!0:r==="false"?!1:null;if(typeof o.default=="number"){const a=parseFloat(r);return!Number.isNaN(a)&&Number.isFinite(a)?a:null}return r},renderHTML:n=>n[i]!==o.default?{[Q(i)]:n[i]}:{}}}),t}function Ye(e,t,i,o){if(typeof e=="boolean")throw new Error("Cannot find node position as getPos is a boolean, not a function.");const n=e(),a=i.state.doc.resolve(n).node().attrs.id;if(!a)throw new Error("Block doesn't have id");const l=t.getBlock(a);if(l.type!==o)throw new Error("Block type does not match");return l}function de(e,t,i,o,n=!1,r){const a=document.createElement("div");if(r!==void 0)for(const[l,s]of Object.entries(r))l!=="class"&&a.setAttribute(l,s);a.className=D("bn-block-content",(r==null?void 0:r.class)||""),a.setAttribute("data-content-type",t);for(const[l,s]of Object.entries(i))!ve.includes(l)&&s!==o[l].default&&a.setAttribute(Q(l),s);return n&&a.setAttribute("data-file-block",""),a.appendChild(e.dom),e.contentDOM!==void 0&&(e.contentDOM.className=D("bn-inline-content",e.contentDOM.className),e.contentDOM.setAttribute("data-editable","")),{...e,dom:a}}function j(e){return g.Node.create(e)}function Ee(e,t){return{config:e,implementation:t}}function K(e,t,i){return Ee({type:e.name,content:e.config.content==="inline*"?"inline":e.config.content==="tableRow+"?"table":"none",propSchema:t},{node:e,requiredExtensions:i,toInternalHTML:ye,toExternalHTML:ye})}function xe(e){return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i.config]))}function Qe(e,t){const i=[{tag:"[data-content-type="+e.type+"]",contentElement:"[data-editable]"}];return t&&i.push({tag:"*",getAttrs(o){if(typeof o=="string")return!1;const n=t==null?void 0:t(o);return n===void 0?!1:n}}),i}function ee(e,t){const i=j({name:e.type,content:e.content==="inline"?"inline*":"",group:"blockContent",selectable:!0,addAttributes(){return we(e.propSchema)},parseHTML(){return Qe(e,t.parse)},renderHTML(){const o=document.createElement("div");return o.setAttribute("data-tmp-placeholder","true"),{dom:o}},addNodeView(){return({getPos:o})=>{var s;const n=this.options.editor,r=Ye(o,n,this.editor,e.type),a=((s=this.options.domAttributes)==null?void 0:s.blockContent)||{},l=t.render(r,n);return de(l,r.type,r.props,e.propSchema,a)}}});if(i.name!==e.type)throw new Error("Node name does not match block type. This is a bug in BlockNote.");return Ee(e,{node:i,toInternalHTML:(o,n)=>{var l;const r=((l=i.options.domAttributes)==null?void 0:l.blockContent)||{},a=t.render(o,n);return de(a,o.type,o.props,e.propSchema,e.isFileBlock,r)},toExternalHTML:(o,n)=>{var l,s;const r=((l=i.options.domAttributes)==null?void 0:l.blockContent)||{};let a=(s=t.toExternalHTML)==null?void 0:s.call(t,o,n);return a===void 0&&(a=t.render(o,n)),de(a,o.type,o.props,e.propSchema,r)}})}function et(e,t,i,o){return e.dom.setAttribute("data-inline-content-type",t),Object.entries(i).filter(([n,r])=>r!==o[n].default).map(([n,r])=>[Q(n),r]).forEach(([n,r])=>e.dom.setAttribute(n,r)),e.contentDOM!==void 0&&e.contentDOM.setAttribute("data-editable",""),e}function tt(e){return{Backspace:({editor:t})=>{const i=t.state.selection.$from;return t.state.selection.empty&&i.node().type.name===e.type&&i.parentOffset===0}}}function it(e,t){return{config:e,implementation:t}}function ot(e,t){return it({type:e.name,propSchema:t,content:e.config.content==="inline*"?"styled":"none"},{node:e})}function Se(e){return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i.config]))}function nt(e){return[{tag:`[data-inline-content-type="${e.type}"]`,contentElement:t=>{const i=t;return i.matches("[data-editable]")?i:i.querySelector("[data-editable]")||i}}]}function Qi(e,t){const i=g.Node.create({name:e.type,inline:!0,group:"inline",selectable:e.content==="styled",atom:e.content==="none",content:e.content==="styled"?"inline*":"",addAttributes(){return we(e.propSchema)},addKeyboardShortcuts(){return tt(e)},parseHTML(){return nt(e)},renderHTML({node:o}){const n=this.options.editor,r=t.render(_e(o,n.schema.inlineContentSchema,n.schema.styleSchema));return et(r,e.type,o.attrs,e.propSchema)}});return ot(i,e.propSchema)}function rt(e){return e==="boolean"?{}:{stringValue:{default:void 0,keepOnSplit:!0,parseHTML:t=>t.getAttribute("data-value"),renderHTML:t=>t.stringValue!==void 0?{"data-value":t.stringValue}:{}}}}function at(e,t,i,o){return e.dom.setAttribute("data-style-type",t),o==="string"&&e.dom.setAttribute("data-value",i),e.contentDOM!==void 0&&e.contentDOM.setAttribute("data-editable",""),e}function Ce(e,t){return{config:e,implementation:t}}function R(e,t){return Ce({type:e.name,propSchema:t},{mark:e})}function Te(e){return Object.fromEntries(Object.entries(e).map(([t,i])=>[t,i.config]))}function lt(e){return[{tag:`[data-style-type="${e.type}"]`,contentElement:t=>{const i=t;return i.matches("[data-editable]")?i:i.querySelector("[data-editable]")||i}}]}function eo(e,t){const i=g.Mark.create({name:e.type,addAttributes(){return rt(e.propSchema)},parseHTML(){return lt(e)},renderHTML({mark:o}){let n;if(e.propSchema==="boolean")n=t.render();else if(e.propSchema==="string")n=t.render(o.attrs.stringValue);else throw new I(e.propSchema);return at(n,e.type,o.attrs.stringValue,e.propSchema)}});return Ce(e,{mark:i})}const te=e=>{const t=document.createElement("div");t.className="bn-file-default-preview";const i=document.createElement("div");i.className="bn-file-default-preview-icon",i.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg>';const o=document.createElement("p");return o.className="bn-file-default-preview-name",o.textContent=e.props.name||"",t.appendChild(i),t.appendChild(o),{dom:t}},z=(e,t)=>{const i=document.createElement("div");i.className="bn-file-and-caption-wrapper";const o=document.createElement("p");return o.className="bn-file-caption",o.textContent=e.props.caption,i.appendChild(t),i.appendChild(o),{dom:i}},ie=(e,t,i,o)=>{const n=document.createElement("div");n.className="bn-add-file-button";const r=document.createElement("div");r.className="bn-add-file-button-icon",o?r.appendChild(o):r.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3 8L9.00319 2H19.9978C20.5513 2 21 2.45531 21 2.9918V21.0082C21 21.556 20.5551 22 20.0066 22H3.9934C3.44476 22 3 21.5501 3 20.9932V8ZM10 4V9H5V20H19V4H10Z"></path></svg>';const a=document.createElement("p");a.className="bn-add-file-button-text",a.innerHTML=i||t.dictionary.file_blocks.file.add_button_text;const l=c=>{c.preventDefault()},s=()=>{t.dispatch(t._tiptapEditor.state.tr.setMeta(t.filePanel.plugin,{block:e}))};return n.appendChild(r),n.appendChild(a),n.addEventListener("mousedown",l,!0),n.addEventListener("click",s,!0),{dom:n,destroy:()=>{n.removeEventListener("mousedown",l,!0),n.removeEventListener("click",s,!0)}}},Me=e=>({url:e.src||void 0}),oe=(e,t)=>{const i=e.querySelector(t);if(!i)return;const o=e.querySelector("figcaption"),n=(o==null?void 0:o.textContent)??void 0;return{targetElement:i,caption:n}},ne=(e,t)=>{const i=document.createElement("div"),o=document.createElement("p");return o.textContent=t,i.appendChild(e),i.appendChild(o),{dom:i}},ce=(e,t)=>{const i=document.createElement("figure"),o=document.createElement("figcaption");return o.textContent=t,i.appendChild(e),i.appendChild(o),{dom:i}},Be=(e,t,i,o,n)=>{if(!e.props.previewWidth)throw new Error("Block must have a `previewWidth` prop.");const r=document.createElement("div");r.className="bn-visual-media-wrapper";const a=document.createElement("div");a.className="bn-visual-media-resize-handle",a.style.left="4px";const l=document.createElement("div");l.className="bn-visual-media-resize-handle",l.style.right="4px";let s;const c=b=>{if(!s){!t.isEditable&&r.contains(a)&&r.contains(l)&&(r.removeChild(a),r.removeChild(l));return}let v;e.props.textAlignment==="center"?s.handleUsed==="left"?v=s.initialWidth+(s.initialClientX-b.clientX)*2:v=s.initialWidth+(b.clientX-s.initialClientX)*2:s.handleUsed==="left"?v=s.initialWidth+s.initialClientX-b.clientX:v=s.initialWidth+b.clientX-s.initialClientX;const x=64;v<x?n(x):v>t.domElement.firstElementChild.clientWidth?n(t.domElement.firstElementChild.clientWidth):n(v)},p=b=>{(!b.target||!r.contains(b.target)||!t.isEditable)&&r.contains(a)&&r.contains(l)&&(r.removeChild(a),r.removeChild(l)),s&&(s=void 0,t.updateBlock(e,{props:{previewWidth:o()}}))},h=()=>{t.isEditable&&(r.appendChild(a),r.appendChild(l))},m=b=>{b.relatedTarget===a||b.relatedTarget===l||s||t.isEditable&&r.contains(a)&&r.contains(l)&&(r.removeChild(a),r.removeChild(l))},f=b=>{b.preventDefault(),r.appendChild(a),r.appendChild(l),s={handleUsed:"left",initialWidth:e.props.previewWidth,initialClientX:b.clientX}},k=b=>{b.preventDefault(),r.appendChild(a),r.appendChild(l),s={handleUsed:"right",initialWidth:e.props.previewWidth,initialClientX:b.clientX}};return r.appendChild(i),window.addEventListener("mousemove",c),window.addEventListener("mouseup",p),i.addEventListener("mouseenter",h),i.addEventListener("mouseleave",m),a.addEventListener("mousedown",f),l.addEventListener("mousedown",k),{dom:r,destroy:()=>{window.removeEventListener("mousemove",c),window.removeEventListener("mouseup",p),i.removeEventListener("mouseenter",h),i.removeEventListener("mouseleave",m),a.removeEventListener("mousedown",f),l.removeEventListener("mousedown",k)}}},st=e=>({url:e.src||void 0}),dt={backgroundColor:E.backgroundColor,name:{default:""},url:{default:""},caption:{default:""},showPreview:{default:!0}},ct={type:"audio",propSchema:dt,content:"none",isFileBlock:!0,fileBlockAcceptMimeTypes:["audio/*"]},ut=(e,t)=>{const i=document.createElement("div");if(i.className="bn-file-block-content-wrapper",e.props.url===""){const o=document.createElement("div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 16.0001H5.88889L11.1834 20.3319C11.2727 20.405 11.3846 20.4449 11.5 20.4449C11.7761 20.4449 12 20.2211 12 19.9449V4.05519C12 3.93977 11.9601 3.8279 11.887 3.73857C11.7121 3.52485 11.3971 3.49335 11.1834 3.66821L5.88889 8.00007H2C1.44772 8.00007 1 8.44778 1 9.00007V15.0001C1 15.5524 1.44772 16.0001 2 16.0001ZM23 12C23 15.292 21.5539 18.2463 19.2622 20.2622L17.8445 18.8444C19.7758 17.1937 21 14.7398 21 12C21 9.26016 19.7758 6.80629 17.8445 5.15557L19.2622 3.73779C21.5539 5.75368 23 8.70795 23 12ZM18 12C18 10.0883 17.106 8.38548 15.7133 7.28673L14.2842 8.71584C15.3213 9.43855 16 10.64 16 12C16 13.36 15.3213 14.5614 14.2842 15.2841L15.7133 16.7132C17.106 15.6145 18 13.9116 18 12Z"></path></svg>';const n=ie(e,t,t.dictionary.file_blocks.audio.add_button_text,o.firstElementChild);return i.appendChild(n.dom),{dom:i,destroy:()=>{var r;(r=n==null?void 0:n.destroy)==null||r.call(n)}}}else if(e.props.showPreview){const o=document.createElement("audio");o.className="bn-audio",t.resolveFileUrl(e.props.url).then(r=>{o.src=r}),o.controls=!0,o.contentEditable="false",o.draggable=!1;const n=z(e,o);return i.appendChild(n.dom),{dom:i}}else{const o=te(e).dom;return{dom:z(e,o).dom}}},pt=e=>{if(e.tagName==="AUDIO")return st(e);if(e.tagName==="FIGURE"){const t=oe(e,"audio");if(!t)return;const{targetElement:i,caption:o}=t;return{...st(i),caption:o}}},ht=e=>{if(!e.props.url){const i=document.createElement("p");return i.textContent="Add audio",{dom:i}}let t;return e.props.showPreview?(t=document.createElement("audio"),t.src=e.props.url):(t=document.createElement("a"),t.href=e.props.url,t.textContent=e.props.name||e.props.url),e.props.caption?e.props.showPreview?ce(t,e.props.caption):ne(t,e.props.caption):{dom:t}},mt=ee(ct,{render:ut,parse:pt,toExternalHTML:ht}),ft={backgroundColor:E.backgroundColor,name:{default:""},url:{default:""},caption:{default:""}},gt={type:"file",propSchema:ft,content:"none",isFileBlock:!0},bt=(e,t)=>{const i=document.createElement("div");if(i.className="bn-file-block-content-wrapper",e.props.url===""){const o=ie(e,t);return i.appendChild(o.dom),{dom:i,destroy:o.destroy}}else{const o=te(e).dom,n=z(e,o);return i.appendChild(n.dom),{dom:i}}},kt=e=>{if(e.tagName==="EMBED")return Me(e);if(e.tagName==="FIGURE"){const t=oe(e,"embed");if(!t)return;const{targetElement:i,caption:o}=t;return{...Me(i),caption:o}}},_t=e=>{if(!e.props.url){const i=document.createElement("p");return i.textContent="Add file",{dom:i}}const t=document.createElement("a");return t.href=e.props.url,t.textContent=e.props.name||e.props.url,e.props.caption?ne(t,e.props.caption):{dom:t}},yt=ee(gt,{render:bt,parse:kt,toExternalHTML:_t}),to=async e=>{const t=new FormData;return t.append("file",e),(await(await fetch("https://tmpfiles.org/api/v1/upload",{method:"POST",body:t})).json()).data.url.replace("tmpfiles.org/","tmpfiles.org/dl/")},Le=e=>{const t=e.src||void 0,i=e.width||void 0;return{url:t,previewWidth:i}},vt={textAlignment:E.textAlignment,backgroundColor:E.backgroundColor,name:{default:""},url:{default:""},caption:{default:""},showPreview:{default:!0},previewWidth:{default:512}},wt={type:"image",propSchema:vt,content:"none",isFileBlock:!0,fileBlockAcceptMimeTypes:["image/*"]},Et=(e,t)=>{const i=document.createElement("div");if(i.className="bn-file-block-content-wrapper",e.props.url===""){const o=document.createElement("div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M5 11.1005L7 9.1005L12.5 14.6005L16 11.1005L19 14.1005V5H5V11.1005ZM4 3H20C20.5523 3 21 3.44772 21 4V20C21 20.5523 20.5523 21 20 21H4C3.44772 21 3 20.5523 3 20V4C3 3.44772 3.44772 3 4 3ZM15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7C16.3284 7 17 7.67157 17 8.5C17 9.32843 16.3284 10 15.5 10Z"></path></svg>';const n=ie(e,t,t.dictionary.file_blocks.image.add_button_text,o.firstElementChild);return i.appendChild(n.dom),{dom:i,destroy:()=>{var r;(r=n==null?void 0:n.destroy)==null||r.call(n)}}}else if(e.props.showPreview){const o=document.createElement("img");o.className="bn-visual-media",t.resolveFileUrl(e.props.url).then(a=>{o.src=a}),o.alt=e.props.name||e.props.caption||"BlockNote image",o.contentEditable="false",o.draggable=!1,o.width=Math.min(e.props.previewWidth,t.domElement.firstElementChild.clientWidth);const n=Be(e,t,o,()=>o.width,a=>o.width=a),r=z(e,n.dom);return i.appendChild(r.dom),{dom:i,destroy:n.destroy}}else{const o=te(e).dom;return{dom:z(e,o).dom}}},xt=e=>{if(e.tagName==="IMG")return Le(e);if(e.tagName==="FIGURE"){const t=oe(e,"img");if(!t)return;const{targetElement:i,caption:o}=t;return{...Le(i),caption:o}}},St=e=>{if(!e.props.url){const i=document.createElement("p");return i.textContent="Add image",{dom:i}}let t;return e.props.showPreview?(t=document.createElement("img"),t.src=e.props.url,t.alt=e.props.name||e.props.caption||"BlockNote image",t.width=e.props.previewWidth):(t=document.createElement("a"),t.href=e.props.url,t.textContent=e.props.name||e.props.url),e.props.caption?e.props.showPreview?ce(t,e.props.caption):ne(t,e.props.caption):{dom:t}},Ct=ee(wt,{render:Et,parse:xt,toExternalHTML:St}),Tt=e=>{const t=e.src||void 0,i=e.width||void 0;return{url:t,previewWidth:i}},Mt={textAlignment:E.textAlignment,backgroundColor:E.backgroundColor,name:{default:""},url:{default:""},caption:{default:""},showPreview:{default:!0},previewWidth:{default:512}},Bt={type:"video",propSchema:Mt,content:"none",isFileBlock:!0,fileBlockAcceptMimeTypes:["video/*"]},Lt=(e,t)=>{const i=document.createElement("div");if(i.className="bn-file-block-content-wrapper",e.props.url===""){const o=document.createElement("div");o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 3.9934C2 3.44476 2.45531 3 2.9918 3H21.0082C21.556 3 22 3.44495 22 3.9934V20.0066C22 20.5552 21.5447 21 21.0082 21H2.9918C2.44405 21 2 20.5551 2 20.0066V3.9934ZM8 5V19H16V5H8ZM4 5V7H6V5H4ZM18 5V7H20V5H18ZM4 9V11H6V9H4ZM18 9V11H20V9H18ZM4 13V15H6V13H4ZM18 13V15H20V13H18ZM4 17V19H6V17H4ZM18 17V19H20V17H18Z"></path></svg>';const n=ie(e,t,t.dictionary.file_blocks.video.add_button_text,o.firstElementChild);return i.appendChild(n.dom),{dom:i,destroy:()=>{var r;(r=n==null?void 0:n.destroy)==null||r.call(n)}}}else if(e.props.showPreview){const o=document.createElement("video");o.className="bn-visual-media",o.src=e.props.url,o.controls=!0,o.contentEditable="false",o.draggable=!1,o.width=Math.min(e.props.previewWidth,t.domElement.firstElementChild.clientWidth);const n=Be(e,t,o,()=>o.width,a=>o.width=a),r=z(e,n.dom);return i.appendChild(r.dom),{dom:i,destroy:n.destroy}}else{const o=te(e).dom;return{dom:z(e,o).dom}}},It=e=>{if(e.tagName==="VIDEO")return Tt(e);if(e.tagName==="FIGURE"){const t=oe(e,"video");if(!t)return;const{targetElement:i,caption:o}=t;return{...Tt(i),caption:o}}},At=e=>{if(!e.props.url){const i=document.createElement("p");return i.textContent="Add video",{dom:i}}let t;return e.props.showPreview?(t=document.createElement("video"),t.src=e.props.url,t.width=e.props.previewWidth):(t=document.createElement("a"),t.href=e.props.url,t.textContent=e.props.name||e.props.url),e.props.caption?e.props.showPreview?ce(t,e.props.caption):ne(t,e.props.caption):{dom:t}},Pt=ee(Bt,{render:Lt,parse:It,toExternalHTML:At}),io=g.Mark.create({name:"backgroundColor",addAttributes(){return{stringValue:{default:void 0,parseHTML:e=>e.getAttribute("data-background-color"),renderHTML:e=>({"data-background-color":e.stringValue})}}},parseHTML(){return[{tag:"span",getAttrs:e=>typeof e=="string"?!1:e.hasAttribute("data-background-color")?{stringValue:e.getAttribute("data-background-color")}:!1}]},renderHTML({HTMLAttributes:e}){return["span",e,0]}}),oo=R(io,"string"),no=g.Mark.create({name:"textColor",addAttributes(){return{stringValue:{default:void 0,parseHTML:e=>e.getAttribute("data-text-color"),renderHTML:e=>({"data-text-color":e.stringValue})}}},parseHTML(){return[{tag:"span",getAttrs:e=>typeof e=="string"?!1:e.hasAttribute("data-text-color")?{stringValue:e.getAttribute("data-text-color")}:!1}]},renderHTML({HTMLAttributes:e}){return["span",e,0]}}),ro=R(no,"string"),ao={...E,level:{default:1,values:[1,2,3]}},lo=j({name:"heading",content:"inline*",group:"blockContent",addAttributes(){return{level:{default:1,parseHTML:e=>{const t=e.getAttribute("data-level"),i=parseInt(t);if(isFinite(i))return i},renderHTML:e=>({"data-level":e.level.toString()})}}},addInputRules(){return[...[1,2,3].map(e=>new g.InputRule({find:new RegExp(`^(#{${e}})\\s$`),handler:({state:t,chain:i,range:o})=>{B(this.editor)==="inline*"&&i().BNUpdateBlock(t.selection.from,{type:"heading",props:{level:e}}).deleteRange({from:o.from,to:o.to})}}))]},addKeyboardShortcuts(){return{"Mod-Alt-1":()=>B(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:1}}),"Mod-Alt-2":()=>B(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:2}}),"Mod-Alt-3":()=>B(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"heading",props:{level:3}})}},parseHTML(){return[{tag:"div[data-content-type="+this.name+"]",getAttrs:e=>typeof e=="string"?!1:{level:e.getAttribute("data-level")}},{tag:"h1",attrs:{level:1},node:"heading"},{tag:"h2",attrs:{level:2},node:"heading"},{tag:"h3",attrs:{level:3},node:"heading"}]},renderHTML({node:e,HTMLAttributes:t}){var i,o;return U(this.name,`h${e.attrs.level}`,{...((i=this.options.domAttributes)==null?void 0:i.blockContent)||{},...t},((o=this.options.domAttributes)==null?void 0:o.inlineContent)||{})}}),so=K(lo,ao),Ie=e=>{const{contentNode:t,contentType:i}=w(e.state.doc,e.state.selection.from),o=e.state.selection.anchor===e.state.selection.head;return!(i.name==="bulletListItem"||i.name==="numberedListItem"||i.name==="checkListItem")||!o?!1:e.commands.first(({state:n,chain:r,commands:a})=>[()=>a.command(()=>t.childCount===0?a.BNUpdateBlock(n.selection.from,{type:"paragraph",props:{}}):!1),()=>a.command(()=>t.childCount>0?(r().deleteSelection().BNSplitBlock(n.selection.from,!0).run(),!0):!1)])},co={...E},uo=j({name:"bulletListItem",content:"inline*",group:"blockContent",priority:90,addInputRules(){return[new g.InputRule({find:new RegExp("^[-+*]\\s$"),handler:({state:e,chain:t,range:i})=>{B(this.editor)==="inline*"&&t().BNUpdateBlock(e.selection.from,{type:"bulletListItem",props:{}}).deleteRange({from:i.from,to:i.to})}})]},addKeyboardShortcuts(){return{Enter:()=>Ie(this.editor),"Mod-Shift-8":()=>B(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"bulletListItem",props:{}})}},parseHTML(){return[{tag:"div[data-content-type="+this.name+"]"},{tag:"li",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.tagName==="UL"||t.tagName==="DIV"&&t.parentElement.tagName==="UL"?{}:!1},node:"bulletListItem"},{tag:"p",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.getAttribute("data-content-type")==="bulletListItem"?{}:!1},priority:300,node:"bulletListItem"}]},renderHTML({HTMLAttributes:e}){var t,i;return U(this.name,"p",{...((t=this.options.domAttributes)==null?void 0:t.blockContent)||{},...e},((i=this.options.domAttributes)==null?void 0:i.inlineContent)||{})}}),po=K(uo,co),ho=new _.PluginKey("numbered-list-indexing"),mo=()=>new _.Plugin({key:ho,appendTransaction:(e,t,i)=>{const o=i.tr;o.setMeta("numberedListIndexing",!0);let n=!1;return i.doc.descendants((r,a)=>{if(r.type.name==="blockContainer"&&r.firstChild.type.name==="numberedListItem"){let l="1";const s=a===1,c=w(o.doc,a+1);if(c===void 0)return;if(!s){const m=w(o.doc,a-2);if(m===void 0)return;if(!(c.depth!==m.depth)){const k=m.contentNode;if(m.contentType.name==="numberedListItem"){const x=k.attrs.index;l=(parseInt(x)+1).toString()}}}c.contentNode.attrs.index!==l&&(n=!0,o.setNodeMarkup(a+1,void 0,{index:l}))}}),n?o:null}}),fo={...E},go=j({name:"numberedListItem",content:"inline*",group:"blockContent",priority:90,addAttributes(){return{index:{default:null,parseHTML:e=>e.getAttribute("data-index"),renderHTML:e=>({"data-index":e.index})}}},addInputRules(){return[new g.InputRule({find:new RegExp("^1\\.\\s$"),handler:({state:e,chain:t,range:i})=>{B(this.editor)==="inline*"&&t().BNUpdateBlock(e.selection.from,{type:"numberedListItem",props:{}}).deleteRange({from:i.from,to:i.to})}})]},addKeyboardShortcuts(){return{Enter:()=>Ie(this.editor),"Mod-Shift-7":()=>B(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"numberedListItem",props:{}})}},addProseMirrorPlugins(){return[mo()]},parseHTML(){return[{tag:"div[data-content-type="+this.name+"]"},{tag:"li",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.tagName==="OL"||t.tagName==="DIV"&&t.parentElement.tagName==="OL"?{}:!1},node:"numberedListItem"},{tag:"p",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;return t===null?!1:t.getAttribute("data-content-type")==="numberedListItem"?{}:!1},priority:300,node:"numberedListItem"}]},renderHTML({HTMLAttributes:e}){var t,i;return U(this.name,"p",{...((t=this.options.domAttributes)==null?void 0:t.blockContent)||{},...e},((i=this.options.domAttributes)==null?void 0:i.inlineContent)||{})}}),bo=K(go,fo),ko={...E,checked:{default:!1}},_o=j({name:"checkListItem",content:"inline*",group:"blockContent",addAttributes(){return{checked:{default:!1,parseHTML:e=>e.getAttribute("data-checked")==="true"||void 0,renderHTML:e=>e.checked?{"data-checked":e.checked.toString()}:{}}}},addInputRules(){return[new g.InputRule({find:new RegExp("\\[\\s*\\]\\s$"),handler:({state:e,chain:t,range:i})=>{B(this.editor)==="inline*"&&t().BNUpdateBlock(e.selection.from,{type:"checkListItem",props:{checked:!1}}).deleteRange({from:i.from,to:i.to})}}),new g.InputRule({find:new RegExp("\\[[Xx]\\]\\s$"),handler:({state:e,chain:t,range:i})=>{B(this.editor)==="inline*"&&t().BNUpdateBlock(e.selection.from,{type:"checkListItem",props:{checked:!0}}).deleteRange({from:i.from,to:i.to})}})]},addKeyboardShortcuts(){return{Enter:()=>Ie(this.editor),"Mod-Shift-9":()=>B(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"checkListItem",props:{}})}},parseHTML(){return[{tag:"div[data-content-type="+this.name+"]"},{tag:"input",getAttrs:e=>typeof e=="string"?!1:e.type==="checkbox"?{checked:e.checked}:!1,node:"checkListItem"},{tag:"li",getAttrs:e=>{if(typeof e=="string")return!1;const t=e.parentElement;if(t===null)return!1;if(t.tagName==="UL"||t.tagName==="DIV"&&t.parentElement.tagName==="UL"){const i=e.querySelector("input[type=checkbox]")||null;return i===null?!1:{checked:i.checked}}return!1},node:"checkListItem"}]},renderHTML({node:e,HTMLAttributes:t}){var r,a;const i=document.createElement("input");i.type="checkbox",i.checked=e.attrs.checked,e.attrs.checked&&i.setAttribute("checked","");const{dom:o,contentDOM:n}=U(this.name,"p",{...((r=this.options.domAttributes)==null?void 0:r.blockContent)||{},...t},((a=this.options.domAttributes)==null?void 0:a.inlineContent)||{});return o.insertBefore(i,n),{dom:o,contentDOM:n}},addNodeView(){return({node:e,getPos:t,editor:i,HTMLAttributes:o})=>{var p,h;const n=document.createElement("div"),r=document.createElement("div");r.contentEditable="false";const a=document.createElement("input");a.type="checkbox",a.checked=e.attrs.checked,e.attrs.checked&&a.setAttribute("checked","");const l=()=>{if(!i.isEditable){a.checked=!a.checked;return}typeof t!="boolean"&&this.editor.commands.BNUpdateBlock(t(),{type:"checkListItem",props:{checked:a.checked}})};a.addEventListener("change",l);const{dom:s,contentDOM:c}=U(this.name,"p",{...((p=this.options.domAttributes)==null?void 0:p.blockContent)||{},...o},((h=this.options.domAttributes)==null?void 0:h.inlineContent)||{});if(typeof t!="boolean"){const f="label-"+this.editor.state.doc.resolve(t()).node().attrs.id;a.setAttribute("aria-labelledby",f),c.id=f}return s.removeChild(c),s.appendChild(n),n.appendChild(r),n.appendChild(c),r.appendChild(a),{dom:s,contentDOM:c,destroy:()=>{a.removeEventListener("change",l)}}}}}),yo=K(_o,ko),vo={...E},wo=j({name:"paragraph",content:"inline*",group:"blockContent",addKeyboardShortcuts(){return{"Mod-Alt-0":()=>B(this.editor)!=="inline*"?!0:this.editor.commands.BNUpdateBlock(this.editor.state.selection.anchor,{type:"paragraph",props:{}})}},parseHTML(){return[{tag:"div[data-content-type="+this.name+"]"},{tag:"p",priority:200,getAttrs:e=>{var t;return typeof e=="string"||!((t=e.textContent)!=null&&t.trim())?!1:{}},node:"paragraph"}]},renderHTML({HTMLAttributes:e}){var t,i;return U(this.name,"p",{...((t=this.options.domAttributes)==null?void 0:t.blockContent)||{},...e},((i=this.options.domAttributes)==null?void 0:i.inlineContent)||{})}}),Eo=K(wo,vo),xo=g.Extension.create({name:"BlockNoteTableExtension",addProseMirrorPlugins:()=>[Ke.columnResizing({cellMinWidth:100}),Ke.tableEditing()],addKeyboardShortcuts(){return{Enter:()=>this.editor.state.selection.empty&&this.editor.state.selection.$head.parent.type.name==="tableParagraph"?(this.editor.commands.setHardBreak(),!0):!1,Backspace:()=>{const e=this.editor.state.selection,t=e.empty,i=e.$head.parentOffset===0,o=e.$head.node().type.name==="tableParagraph";return t&&i&&o}}},extendNodeSchema(e){const t={name:e.name,options:e.options,storage:e.storage};return{tableRole:g.callOrReturn(g.getExtensionField(e,"tableRole",t))}}}),So={...E},Co=j({name:"table",content:"tableRow+",group:"blockContent",tableRole:"table",isolating:!0,parseHTML(){return[{tag:"table"}]},renderHTML({HTMLAttributes:e}){var t,i;return U(this.name,"table",{...((t=this.options.domAttributes)==null?void 0:t.blockContent)||{},...e},((i=this.options.domAttributes)==null?void 0:i.inlineContent)||{})}}),To=g.Node.create({name:"tableParagraph",group:"tableContent",content:"inline*",parseHTML(){return[{tag:"td"},{tag:"p",getAttrs:e=>{if(typeof e=="string"||!e.textContent)return!1;const t=e.parentElement;return t===null?!1:t.tagName==="TD"?{}:!1}}]},renderHTML({HTMLAttributes:e}){return["p",g.mergeAttributes(this.options.HTMLAttributes,e),0]}}),Mo=K(Co,So,[xo,To,xi.TableHeader.extend({content:"tableContent"}),Ei.TableCell.extend({content:"tableContent"}),Si.TableRow]),Ae={paragraph:Eo,heading:so,bulletListItem:po,numberedListItem:bo,checkListItem:yo,table:Mo,file:yt,image:Ct,video:Pt,audio:mt},Nt=xe(Ae),Pe={bold:R(Ni.default,"boolean"),italic:R(Di.default,"boolean"),underline:R(ji.default,"boolean"),strike:R(Ui.default,"boolean"),code:R(Hi.default,"boolean"),textColor:ro,backgroundColor:oo},Bo=Te(Pe),Ne={text:{config:"text",implementation:{}},link:{config:"link",implementation:{}}},Ht=Se(Ne);function L(e,t){return e in t.schema.blockSchema&&t.schema.blockSchema[e]===Nt[e]}function Dt(e,t){return e in t.schema.inlineContentSchema&&t.schema.inlineContentSchema[e]===Ht[e]}function Ut(e,t,i){return t.type===e&&t.type in i.schema.blockSchema&&L(t.type,i)}function Lo(e,t){return e.type in t.schema.blockSchema&&t.schema.blockSchema[e.type].isFileBlock||!1}function Io(e,t){return e.type in t.schema.blockSchema&&t.schema.blockSchema[e.type].isFileBlock&&"showPreview"in t.schema.blockSchema[e.type].propSchema||!1}function Ao(e,t){return t.schema.blockSchema[e.type].isFileBlock&&!e.props.url}function jt(e,t,i){return t in i.schema.blockSchema&&e in i.schema.blockSchema[t].propSchema&&i.schema.blockSchema[t].propSchema[e]===E[e]}function Po(e,t,i){return jt(e,t.type,i)}function He(e,t){let i,o;if(t.firstChild.descendants((n,r)=>i?!1:n.type.name!=="blockContainer"||n.attrs.id!==e?!0:(i=n,o=r+1,!1)),i===void 0||o===void 0)throw Error("Could not find block in the editor with matching ID.");return{node:i,posBeforeNode:o}}function No(e,t,i="before",o){const n=typeof t=="string"?t:t.id,r=[];for(const c of e)r.push(N(c,o.pmSchema,o.schema.styleSchema));const{node:a,posBeforeNode:l}=He(n,o._tiptapEditor.state.doc);if(i==="before"&&o.dispatch(o._tiptapEditor.state.tr.insert(l,r)),i==="after"&&o.dispatch(o._tiptapEditor.state.tr.insert(l+a.nodeSize,r)),i==="nested"&&a.childCount<2){const c=o._tiptapEditor.state.schema.nodes.blockGroup.create({},r);o.dispatch(o._tiptapEditor.state.tr.insert(l+a.firstChild.nodeSize+1,c))}const s=[];for(const c of r)s.push(S(c,o.schema.blockSchema,o.schema.inlineContentSchema,o.schema.styleSchema,o.blockCache));return s}function Ho(e,t,i){const o=i._tiptapEditor,n=typeof e=="string"?e:e.id,{posBeforeNode:r}=He(n,o.state.doc);o.commands.BNUpdateBlock(r+1,t);const a=o.state.doc.resolve(r+1).node();return S(a,i.schema.blockSchema,i.schema.inlineContentSchema,i.schema.styleSchema,i.blockCache)}function Rt(e,t,i){const o=t._tiptapEditor,n=o.state.tr,r=new Set(e.map(s=>typeof s=="string"?s:s.id)),a=[];let l=0;if(o.state.doc.descendants((s,c)=>{if(r.size===0)return!1;if(s.type.name!=="blockContainer"||!r.has(s.attrs.id))return!0;a.push(S(s,t.schema.blockSchema,t.schema.inlineContentSchema,t.schema.styleSchema,t.blockCache)),r.delete(s.attrs.id),l=(i==null?void 0:i(s,c,n,l))||l;const p=n.doc.nodeSize;n.delete(c-l-1,c-l+s.nodeSize+1);const h=n.doc.nodeSize;return l+=p-h,!1}),r.size>0){const s=[...r].join(`
6
+ `);throw Error("Blocks with the following IDs could not be found in the editor: "+s)}return t.dispatch(n),a}function Do(e,t){return Rt(e,t)}function Uo(e,t,i){const o=[];for(const l of t)o.push(N(l,i.pmSchema,i.schema.styleSchema));const n=typeof e[0]=="string"?e[0]:e[0].id,r=Rt(e,i,(l,s,c,p)=>{if(l.attrs.id===n){const h=c.doc.nodeSize;c.insert(s,o);const m=c.doc.nodeSize;return p+h-m}return p}),a=[];for(const l of o)a.push(S(l,i.schema.blockSchema,i.schema.inlineContentSchema,i.schema.styleSchema,i.blockCache));return{insertedBlocks:a,removedBlocks:r}}function jo(e,t,i,o={updateSelection:!0}){const n=i._tiptapEditor.state.tr;let{from:r,to:a}=typeof e=="number"?{from:e,to:e}:{from:e.from,to:e.to},l=!0,s=!0,c="";if(t.forEach(p=>{p.check(),l&&p.isText&&p.marks.length===0?c+=p.text:l=!1,s=s?p.isBlock:!1}),r===a&&s){const{parent:p}=n.doc.resolve(r);p.isTextblock&&!p.type.spec.code&&!p.childCount&&(r-=1,a+=1)}return l?n.insertText(c,r,a):n.replaceWith(r,a,t),o.updateSelection&&g.selectionToInsertionEnd(n,n.steps.length-1,-1),i.dispatch(n),!0}function Ro(){const e=t=>{let i=t.children.length;for(let o=0;o<i;o++){const n=t.children[o];if(n.type==="element"&&(e(n),n.tagName==="u"))if(n.children.length>0){t.children.splice(o,1,...n.children);const r=n.children.length-1;i+=r,o+=r}else t.children.splice(o,1),i--,o--}};return e}function zo(){const e=d.esmDependencies;if(!e)throw new Error("simplifyBlocks requires ESM dependencies to be initialized");const t=i=>{var o;if(i.children&&"length"in i.children&&i.children.length)for(let n=i.children.length-1;n>=0;n--){const r=i.children[n],a=n+1<i.children.length?i.children[n+1]:void 0;r.type==="element"&&r.tagName==="input"&&((o=r.properties)==null?void 0:o.type)==="checkbox"&&(a==null?void 0:a.type)==="element"&&a.tagName==="p"?(a.tagName="span",a.children.splice(0,0,e.hastUtilFromDom.fromDom(document.createTextNode(" ")))):t(r)}};return t}function ue(e){const t=d.esmDependencies;if(!t)throw new Error("cleanHTMLToMarkdown requires ESM dependencies to be initialized");return t.unified.unified().use(t.rehypeParse.default,{fragment:!0}).use(Ro).use(zo).use(t.rehypeRemark.default).use(t.remarkGfm.default).use(t.remarkStringify.default,{handlers:{text:o=>o.value}}).processSync(e).value}async function zt(e,t,i,o){await G();const r=Y(t,i).exportBlocks(e,o);return ue(r)}function Vo(e){return Array.prototype.indexOf.call(e.parentElement.childNodes,e)}function Oo(e){return e.nodeType===3&&!/\S/.test(e.nodeValue||"")}function Fo(e){e.querySelectorAll("li > ul, li > ol").forEach(t=>{const i=Vo(t),o=t.parentElement,n=Array.from(o.childNodes).slice(i+1);t.remove(),n.forEach(r=>{r.remove()}),o.insertAdjacentElement("afterend",t),n.reverse().forEach(r=>{if(Oo(r))return;const a=document.createElement("li");a.append(r),t.insertAdjacentElement("afterend",a)}),o.childNodes.length===0&&o.remove()})}function Ko(e){e.querySelectorAll("li + ul, li + ol").forEach(t=>{var r,a;const i=t.previousElementSibling,o=document.createElement("div");i.insertAdjacentElement("afterend",o),o.append(i);const n=document.createElement("div");for(n.setAttribute("data-node-type","blockGroup"),o.append(n);((r=o.nextElementSibling)==null?void 0:r.nodeName)==="UL"||((a=o.nextElementSibling)==null?void 0:a.nodeName)==="OL";)n.append(o.nextElementSibling)})}let Vt=null;function Go(){return Vt||(Vt=document.implementation.createHTMLDocument("title"))}function Ot(e){if(typeof e=="string"){const t=Go().createElement("div");t.innerHTML=e,e=t}return Fo(e),Ko(e),e}async function De(e,t,i,o,n){const r=Ot(e),l=y.DOMParser.fromSchema(n).parse(r,{topNode:n.nodes.blockGroup.create()}),s=[];for(let c=0;c<l.childCount;c++)s.push(S(l.child(c),t,i,o));return s}function qo(e,t){const i=t.value?t.value+`
7
+ `:"",o={};t.lang&&(o["data-language"]=t.lang);let n={type:"element",tagName:"code",properties:o,children:[{type:"text",value:i}]};return t.meta&&(n.data={meta:t.meta}),e.patch(t,n),n=e.applyData(t,n),n={type:"element",tagName:"pre",properties:{},children:[n]},e.patch(t,n),n}async function Ft(e,t,i,o,n){const r=await G(),a=r.unified.unified().use(r.remarkParse.default).use(r.remarkGfm.default).use(r.remarkRehype.default,{handlers:{...r.remarkRehype.defaultHandlers,code:qo}}).use(r.rehypeStringify.default).processSync(e);return De(a.value,t,i,o,n)}class ${constructor(){u(this,"callbacks",{})}on(t,i){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(i),()=>this.off(t,i)}emit(t,...i){const o=this.callbacks[t];o&&o.forEach(n=>n.apply(this,i))}off(t,i){const o=this.callbacks[t];o&&(i?this.callbacks[t]=o.filter(n=>n!==i):delete this.callbacks[t])}removeAllListeners(){this.callbacks={}}}class Kt{constructor(t,i,o,n){u(this,"state");u(this,"emitUpdate");u(this,"mouseDownHandler",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});u(this,"dragstartHandler",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});u(this,"scrollHandler",()=>{var t;if((t=this.state)!=null&&t.show){const i=this.pmView.root.querySelector(`[data-node-type="blockContainer"][data-id="${this.state.block.id}"]`);this.state.referencePos=i.getBoundingClientRect(),this.emitUpdate()}});u(this,"closeMenu",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});this.editor=t,this.pluginKey=i,this.pmView=o,this.emitUpdate=()=>{if(!this.state)throw new Error("Attempting to update uninitialized file panel");n(this.state)},o.dom.addEventListener("mousedown",this.mouseDownHandler),o.dom.addEventListener("dragstart",this.dragstartHandler),o.root.addEventListener("scroll",this.scrollHandler,!0)}update(t,i){var n,r;const o=this.pluginKey.getState(t.state);if(!((n=this.state)!=null&&n.show)&&o.block&&this.editor.isEditable){const a=this.pmView.root.querySelector(`[data-node-type="blockContainer"][data-id="${o.block.id}"]`);this.state={show:!0,referencePos:a.getBoundingClientRect(),block:o.block},this.emitUpdate();return}(!t.state.selection.eq(i.selection)||!t.state.doc.eq(i.doc)||!this.editor.isEditable)&&(r=this.state)!=null&&r.show&&(this.state.show=!1,this.emitUpdate())}destroy(){this.pmView.dom.removeEventListener("mousedown",this.mouseDownHandler),this.pmView.dom.removeEventListener("dragstart",this.dragstartHandler),this.pmView.root.removeEventListener("scroll",this.scrollHandler,!0)}}const Ue=new _.PluginKey("FilePanelPlugin");class Gt extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"closeMenu",()=>this.view.closeMenu());this.plugin=new _.Plugin({key:Ue,view:o=>(this.view=new Kt(i,Ue,o,n=>{this.emit("update",n)}),this.view),props:{handleKeyDown:(o,n)=>n.key==="Escape"&&this.shown?(this.view.closeMenu(),!0):!1},state:{init:()=>({block:void 0}),apply:o=>{var r;return{block:(r=o.getMeta(Ue))==null?void 0:r.block}}}})}get shown(){var i,o;return((o=(i=this.view)==null?void 0:i.state)==null?void 0:o.show)||!1}onUpdate(i){return this.on("update",i)}}class qt{constructor(t,i,o){u(this,"state");u(this,"emitUpdate");u(this,"preventHide",!1);u(this,"preventShow",!1);u(this,"shouldShow",({state:t,from:i,to:o,view:n})=>{const{doc:r,selection:a}=t,{empty:l}=a,s=!r.textBetween(i,o).length&&g.isTextSelection(t.selection);return!(!n.hasFocus()||l||s)});u(this,"blurHandler",t=>{var o;if(this.preventHide){this.preventHide=!1;return}const i=this.pmView.dom.parentElement;t&&t.relatedTarget&&(i===t.relatedTarget||i.contains(t.relatedTarget)||t.relatedTarget.matches(".bn-ui-container, .bn-ui-container *"))||(o=this.state)!=null&&o.show&&(this.state.show=!1,this.emitUpdate())});u(this,"viewMousedownHandler",()=>{this.preventShow=!0});u(this,"viewMouseupHandler",()=>{this.preventShow=!1,setTimeout(()=>this.update(this.pmView))});u(this,"dragHandler",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});u(this,"scrollHandler",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.referencePos=this.getSelectionBoundingBox(),this.emitUpdate())});u(this,"closeMenu",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});this.editor=t,this.pmView=i,this.emitUpdate=()=>{if(!this.state)throw new Error("Attempting to update uninitialized formatting toolbar");o(this.state)},i.dom.addEventListener("mousedown",this.viewMousedownHandler),i.dom.addEventListener("mouseup",this.viewMouseupHandler),i.dom.addEventListener("dragstart",this.dragHandler),i.dom.addEventListener("dragover",this.dragHandler),i.dom.addEventListener("blur",this.blurHandler),i.root.addEventListener("scroll",this.scrollHandler,!0)}update(t,i){var m,f;const{state:o,composing:n}=t,{doc:r,selection:a}=o,l=i&&i.doc.eq(r)&&i.selection.eq(a);if(n||l)return;const{ranges:s}=a,c=Math.min(...s.map(k=>k.$from.pos)),p=Math.max(...s.map(k=>k.$to.pos)),h=(m=this.shouldShow)==null?void 0:m.call(this,{view:t,state:o,from:c,to:p});if(!this.preventShow&&(h||this.preventHide)){this.state={show:!0,referencePos:this.getSelectionBoundingBox()},this.emitUpdate();return}if((f=this.state)!=null&&f.show&&!this.preventHide&&(!h||this.preventShow||!this.editor.isEditable)){this.state.show=!1,this.emitUpdate();return}}destroy(){this.pmView.dom.removeEventListener("mousedown",this.viewMousedownHandler),this.pmView.dom.removeEventListener("mouseup",this.viewMouseupHandler),this.pmView.dom.removeEventListener("dragstart",this.dragHandler),this.pmView.dom.removeEventListener("dragover",this.dragHandler),this.pmView.dom.removeEventListener("blur",this.blurHandler),this.pmView.root.removeEventListener("scroll",this.scrollHandler,!0)}getSelectionBoundingBox(){const{state:t}=this.pmView,{selection:i}=t,{ranges:o}=i,n=Math.min(...o.map(a=>a.$from.pos)),r=Math.max(...o.map(a=>a.$to.pos));if(g.isNodeSelection(i)){const a=this.pmView.nodeDOM(n);if(a)return a.getBoundingClientRect()}return g.posToDOMRect(this.pmView,n,r)}}const Wt=new _.PluginKey("FormattingToolbarPlugin");class $t extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"closeMenu",()=>this.view.closeMenu());this.plugin=new _.Plugin({key:Wt,view:o=>(this.view=new qt(i,o,n=>{this.emit("update",n)}),this.view),props:{handleKeyDown:(o,n)=>n.key==="Escape"&&this.shown?(this.view.closeMenu(),!0):!1}})}get shown(){var i,o;return((o=(i=this.view)==null?void 0:i.state)==null?void 0:o.show)||!1}onUpdate(i){return this.on("update",i)}}class Wo{constructor(t,i,o){u(this,"state");u(this,"emitUpdate");u(this,"menuUpdateTimer");u(this,"startMenuUpdateTimer");u(this,"stopMenuUpdateTimer");u(this,"mouseHoveredLinkMark");u(this,"mouseHoveredLinkMarkRange");u(this,"keyboardHoveredLinkMark");u(this,"keyboardHoveredLinkMarkRange");u(this,"linkMark");u(this,"linkMarkRange");u(this,"mouseOverHandler",t=>{if(this.mouseHoveredLinkMark=void 0,this.mouseHoveredLinkMarkRange=void 0,this.stopMenuUpdateTimer(),t.target instanceof HTMLAnchorElement&&t.target.nodeName==="A"){const i=t.target,o=this.pmView.posAtDOM(i,0)+1,n=this.pmView.state.doc.resolve(o),r=n.marks();for(const a of r)if(a.type.name===this.pmView.state.schema.mark("link").type.name){this.mouseHoveredLinkMark=a,this.mouseHoveredLinkMarkRange=g.getMarkRange(n,a.type,a.attrs)||void 0;break}}return this.startMenuUpdateTimer(),!1});u(this,"clickHandler",t=>{var o;const i=this.pmView.dom.parentElement;this.linkMark&&t&&t.target&&!(i===t.target||i.contains(t.target))&&(o=this.state)!=null&&o.show&&(this.state.show=!1,this.emitUpdate())});u(this,"scrollHandler",()=>{var t;this.linkMark!==void 0&&(t=this.state)!=null&&t.show&&(this.state.referencePos=g.posToDOMRect(this.pmView,this.linkMarkRange.from,this.linkMarkRange.to),this.emitUpdate())});u(this,"closeMenu",()=>{var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())});this.editor=t,this.pmView=i,this.emitUpdate=()=>{if(!this.state)throw new Error("Attempting to update uninitialized link toolbar");o(this.state)},this.startMenuUpdateTimer=()=>{this.menuUpdateTimer=setTimeout(()=>{this.update()},250)},this.stopMenuUpdateTimer=()=>(this.menuUpdateTimer&&(clearTimeout(this.menuUpdateTimer),this.menuUpdateTimer=void 0),!1),this.pmView.dom.addEventListener("mouseover",this.mouseOverHandler),this.pmView.root.addEventListener("click",this.clickHandler,!0),this.pmView.root.addEventListener("scroll",this.scrollHandler,!0)}editLink(t,i){var n;const o=this.pmView.state.tr.insertText(i,this.linkMarkRange.from,this.linkMarkRange.to);o.addMark(this.linkMarkRange.from,this.linkMarkRange.from+i.length,this.pmView.state.schema.mark("link",{href:t})),this.editor.dispatch(o),this.pmView.focus(),(n=this.state)!=null&&n.show&&(this.state.show=!1,this.emitUpdate())}deleteLink(){var t;this.editor.dispatch(this.pmView.state.tr.removeMark(this.linkMarkRange.from,this.linkMarkRange.to,this.linkMark.type).setMeta("preventAutolink",!0)),this.pmView.focus(),(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate())}update(){var i;if(!this.pmView.hasFocus())return;const t=this.linkMark;if(this.linkMark=void 0,this.linkMarkRange=void 0,this.keyboardHoveredLinkMark=void 0,this.keyboardHoveredLinkMarkRange=void 0,this.pmView.state.selection.empty){const o=this.pmView.state.selection.$from.marks();for(const n of o)if(n.type.name===this.pmView.state.schema.mark("link").type.name){this.keyboardHoveredLinkMark=n,this.keyboardHoveredLinkMarkRange=g.getMarkRange(this.pmView.state.selection.$from,n.type,n.attrs)||void 0;break}}if(this.mouseHoveredLinkMark&&(this.linkMark=this.mouseHoveredLinkMark,this.linkMarkRange=this.mouseHoveredLinkMarkRange),this.keyboardHoveredLinkMark&&(this.linkMark=this.keyboardHoveredLinkMark,this.linkMarkRange=this.keyboardHoveredLinkMarkRange),this.linkMark&&this.editor.isEditable){this.state={show:!0,referencePos:g.posToDOMRect(this.pmView,this.linkMarkRange.from,this.linkMarkRange.to),url:this.linkMark.attrs.href,text:this.pmView.state.doc.textBetween(this.linkMarkRange.from,this.linkMarkRange.to)},this.emitUpdate();return}if((i=this.state)!=null&&i.show&&t&&(!this.linkMark||!this.editor.isEditable)){this.state.show=!1,this.emitUpdate();return}}destroy(){this.pmView.dom.removeEventListener("mouseover",this.mouseOverHandler),this.pmView.root.removeEventListener("scroll",this.scrollHandler,!0),this.pmView.root.removeEventListener("click",this.clickHandler,!0)}}const Xt=new _.PluginKey("LinkToolbarPlugin");class Zt extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"editLink",(i,o)=>{this.view.editLink(i,o)});u(this,"deleteLink",()=>{this.view.deleteLink()});u(this,"startHideTimer",()=>{this.view.startMenuUpdateTimer()});u(this,"stopHideTimer",()=>{this.view.stopMenuUpdateTimer()});u(this,"closeMenu",()=>this.view.closeMenu());this.plugin=new _.Plugin({key:Xt,view:o=>(this.view=new Wo(i,o,n=>{this.emit("update",n)}),this.view),props:{handleKeyDown:(o,n)=>n.key==="Escape"&&this.shown?(this.view.closeMenu(),!0):!1}})}onUpdate(i){return this.on("update",i)}get shown(){var i,o;return((o=(i=this.view)==null?void 0:i.state)==null?void 0:o.show)||!1}}class X extends _.Selection{constructor(i,o){super(i,o);u(this,"nodes");const n=i.node();this.nodes=[],i.doc.nodesBetween(i.pos,o.pos,(r,a,l)=>{if(l!==null&&l.eq(n))return this.nodes.push(r),!1})}static create(i,o,n=o){return new X(i.resolve(o),i.resolve(n))}content(){return new y.Slice(y.Fragment.from(this.nodes),0,0)}eq(i){if(!(i instanceof X)||this.nodes.length!==i.nodes.length||this.from!==i.from||this.to!==i.to)return!1;for(let o=0;o<this.nodes.length;o++)if(!this.nodes[o].eq(i.nodes[o]))return!1;return!0}map(i,o){const n=o.mapResult(this.from),r=o.mapResult(this.to);return r.deleted?_.Selection.near(i.resolve(n.pos)):n.deleted?_.Selection.near(i.resolve(r.pos)):new X(i.resolve(n.pos),i.resolve(r.pos))}toJSON(){return{type:"node",anchor:this.anchor,head:this.head}}}let A;function re(e,t){var i,o;for(;e&&e.parentElement&&e.parentElement!==t.dom&&((i=e.getAttribute)==null?void 0:i.call(e,"data-node-type"))!=="blockContainer";)e=e.parentElement;if(((o=e.getAttribute)==null?void 0:o.call(e,"data-node-type"))==="blockContainer")return{node:e,id:e.getAttribute("data-id")}}function $o(e,t){const i=re(e,t);if(i&&i.node.nodeType===1){const o=t.docView,n=o.nearestDesc(i.node,!0);return!n||n===o?null:n.posBefore}return null}function Xo(e,t){let i,o;const n=t.resolve(e.from).node().type.spec.group==="blockContent",r=t.resolve(e.to).node().type.spec.group==="blockContent",a=Math.min(e.$anchor.depth,e.$head.depth);if(n&&r){const l=e.$from.start(a-1),s=e.$to.end(a-1);i=t.resolve(l-1).pos,o=t.resolve(s+1).pos}else i=e.from,o=e.to;return{from:i,to:o}}function Jt(e,t,i=t){t===i&&(i+=e.state.doc.resolve(t+1).node().nodeSize);const o=e.domAtPos(t).node.cloneNode(!0),n=e.domAtPos(t).node,r=(p,h)=>Array.prototype.indexOf.call(p.children,h),a=r(n,e.domAtPos(t+1).node.parentElement),l=r(n,e.domAtPos(i-1).node.parentElement);for(let p=n.childElementCount-1;p>=0;p--)(p>l||p<a)&&o.removeChild(o.children[p]);Yt(e.root),A=o;const c=e.dom.className.split(" ").filter(p=>p!=="ProseMirror"&&p!=="bn-root"&&p!=="bn-editor").join(" ");A.className=A.className+" bn-drag-preview "+c,e.root instanceof ShadowRoot?e.root.appendChild(A):e.root.body.appendChild(A)}function Yt(e){A!==void 0&&(e instanceof ShadowRoot?e.removeChild(A):e.body.removeChild(A),A=void 0)}function Zo(e,t){if(!e.dataTransfer)return;const i=t.prosemirrorView,o=i.dom.getBoundingClientRect(),n={left:o.left+o.width/2,top:e.clientY},r=i.root.elementsFromPoint(n.left,n.top);let a;for(const s of r)if(i.dom.contains(s)){a=re(s,i);break}if(!a)return;const l=$o(a.node,i);if(l!=null){const s=i.state.selection,c=i.state.doc,{from:p,to:h}=Xo(s,c),m=p<=l&&l<h,f=s.$anchor.node()!==s.$head.node()||s instanceof X;m&&f?(i.dispatch(i.state.tr.setSelection(X.create(c,p,h))),Jt(i,p,h)):(i.dispatch(i.state.tr.setSelection(_.NodeSelection.create(i.state.doc,l))),Jt(i,l));const k=i.state.selection.content(),b=t.pmSchema,x=se(b,t).serializeProseMirrorFragment(k.content,{}),V=Y(b,t).exportProseMirrorFragment(k.content,{}),ae=ue(V);e.dataTransfer.clearData(),e.dataTransfer.setData("blocknote/html",x),e.dataTransfer.setData("text/html",V),e.dataTransfer.setData("text/plain",ae),e.dataTransfer.effectAllowed="move",e.dataTransfer.setDragImage(A,0,0),i.dragging={slice:k,move:!0}}}class Qt{constructor(t,i,o){u(this,"state");u(this,"emitUpdate");u(this,"needUpdate",!1);u(this,"mousePos");u(this,"horizontalPosAnchoredAtRoot");u(this,"horizontalPosAnchor");u(this,"hoveredBlock");u(this,"isDragging",!1);u(this,"menuFrozen",!1);u(this,"updateState",()=>{var a,l,s,c;if(this.menuFrozen||!this.mousePos)return;const t=this.pmView.dom.firstChild.getBoundingClientRect();this.horizontalPosAnchor=t.x;const i={left:t.left+t.width/2,top:this.mousePos.y},o=this.pmView.root.elementsFromPoint(i.left,i.top);let n;for(const p of o)if(this.pmView.dom.contains(p)){n=re(p,this.pmView);break}if(!n||!this.editor.isEditable){(a=this.state)!=null&&a.show&&(this.state.show=!1,this.needUpdate=!0);return}if((l=this.state)!=null&&l.show&&((s=this.hoveredBlock)!=null&&s.hasAttribute("data-id"))&&((c=this.hoveredBlock)==null?void 0:c.getAttribute("data-id"))===n.id)return;this.hoveredBlock=n.node;const r=n.node.firstChild;if(r&&this.editor.isEditable){const p=r.getBoundingClientRect();this.state={show:!0,referencePos:new DOMRect(this.horizontalPosAnchoredAtRoot?this.horizontalPosAnchor:p.x,p.y,p.width,p.height),block:this.editor.getBlock(this.hoveredBlock.getAttribute("data-id"))},this.needUpdate=!0}});u(this,"onDragStart",()=>{this.isDragging=!0});u(this,"onDrop",t=>{if(this.editor._tiptapEditor.commands.blur(),t.synthetic||!this.isDragging)return;const i=this.pmView.posAtCoords({left:t.clientX,top:t.clientY});if(this.isDragging=!1,!i||i.inside===-1){const o=new Event("drop",t),n=this.pmView.dom.firstChild.getBoundingClientRect();o.clientX=t.clientX<n.left||t.clientX>n.left+n.width?n.left+n.width/2:t.clientX,o.clientY=Math.min(Math.max(t.clientY,n.top),n.top+n.height),o.dataTransfer=t.dataTransfer,o.preventDefault=()=>t.preventDefault(),o.synthetic=!0,this.pmView.dom.dispatchEvent(o)}});u(this,"onDragOver",t=>{if(t.synthetic||!this.isDragging)return;const i=this.pmView.posAtCoords({left:t.clientX,top:t.clientY});if(!i||i.inside===-1){const o=new Event("dragover",t),n=this.pmView.dom.firstChild.getBoundingClientRect();o.clientX=n.left+n.width/2,o.clientY=t.clientY,o.dataTransfer=t.dataTransfer,o.preventDefault=()=>t.preventDefault(),o.synthetic=!0,this.pmView.dom.dispatchEvent(o)}});u(this,"onKeyDown",t=>{var i;(i=this.state)!=null&&i.show&&this.editor.isFocused()&&(this.state.show=!1,this.emitUpdate(this.state),this.menuFrozen=!1)});u(this,"onMouseDown",()=>{this.state&&this.state.show&&this.menuFrozen&&(this.menuFrozen=!1,this.state.show=!1,this.emitUpdate(this.state))});u(this,"onMouseMove",t=>{var r;if(this.menuFrozen)return;this.mousePos={x:t.clientX,y:t.clientY};const i=this.pmView.dom.getBoundingClientRect(),o=this.mousePos.x>i.left&&this.mousePos.x<i.right&&this.mousePos.y>i.top&&this.mousePos.y<i.bottom,n=this.pmView.dom.parentElement;if(o&&t&&t.target&&!(n===t.target||n.contains(t.target))){(r=this.state)!=null&&r.show&&(this.state.show=!1,this.emitUpdate(this.state));return}this.updateState(),this.needUpdate&&(this.emitUpdate(this.state),this.needUpdate=!1)});u(this,"onScroll",()=>{var t;if((t=this.state)!=null&&t.show){const o=this.hoveredBlock.firstChild.getBoundingClientRect();this.state.referencePos=new DOMRect(this.horizontalPosAnchoredAtRoot?this.horizontalPosAnchor:o.x,o.y,o.width,o.height),this.emitUpdate(this.state)}});this.editor=t,this.pmView=i,this.emitUpdate=()=>{if(!this.state)throw new Error("Attempting to update uninitialized side menu");o(this.state)},this.horizontalPosAnchoredAtRoot=!0,this.horizontalPosAnchor=this.pmView.dom.firstChild.getBoundingClientRect().x,this.pmView.root.addEventListener("drop",this.onDrop,!0),this.pmView.root.addEventListener("dragover",this.onDragOver),G(),this.pmView.dom.addEventListener("dragstart",this.onDragStart),this.pmView.root.addEventListener("mousemove",this.onMouseMove,!0),this.pmView.dom.addEventListener("mousedown",this.onMouseDown),this.pmView.root.addEventListener("keydown",this.onKeyDown,!0),this.pmView.root.addEventListener("scroll",this.onScroll,!0)}update(){var i;const t=(i=this.state)==null?void 0:i.block.id;this.updateState(),this.needUpdate&&this.state&&t!==this.state.block.id&&(this.emitUpdate(this.state),this.needUpdate=!1)}destroy(){var t;(t=this.state)!=null&&t.show&&(this.state.show=!1,this.emitUpdate(this.state)),this.pmView.root.removeEventListener("mousemove",this.onMouseMove,!0),this.pmView.root.removeEventListener("dragover",this.onDragOver),this.pmView.dom.removeEventListener("dragstart",this.onDragStart),this.pmView.root.removeEventListener("drop",this.onDrop,!0),this.pmView.root.removeEventListener("scroll",this.onScroll,!0),this.pmView.dom.removeEventListener("mousedown",this.onMouseDown),this.pmView.root.removeEventListener("keydown",this.onKeyDown,!0)}addBlock(){var s;(s=this.state)!=null&&s.show&&(this.state.show=!1,this.emitUpdate(this.state));const i=this.hoveredBlock.firstChild.getBoundingClientRect(),o=this.pmView.posAtCoords({left:i.left+i.width/2,top:i.top+i.height/2});if(!o)return;const n=w(this.editor._tiptapEditor.state.doc,o.pos);if(n===void 0)return;const{contentNode:r,startPos:a,endPos:l}=n;if(r.type.spec.content!=="inline*"||r.textContent.length!==0){const c=l+1,p=c+2;this.editor._tiptapEditor.chain().BNCreateBlock(c).setTextSelection(p).run()}else this.editor._tiptapEditor.commands.setTextSelection(a+1);this.editor.openSelectionMenu("/")}}const ei=new _.PluginKey("SideMenuPlugin");class ti extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"addBlock",()=>this.view.addBlock());u(this,"blockDragStart",i=>{this.view.isDragging=!0,Zo(i,this.editor)});u(this,"blockDragEnd",()=>Yt(this.editor.prosemirrorView.root));u(this,"freezeMenu",()=>this.view.menuFrozen=!0);u(this,"unfreezeMenu",()=>{this.view.menuFrozen=!1,this.view.state.show=!1,this.view.emitUpdate(this.view.state)});this.editor=i,this.plugin=new _.Plugin({key:ei,view:o=>(this.view=new Qt(i,o,n=>{this.emit("update",n)}),this.view)})}onUpdate(i){return this.on("update",i)}}const Jo=g.findParentNode(e=>e.type.name==="blockContainer");class Yo{constructor(t,i){u(this,"state");u(this,"emitUpdate");u(this,"rootEl");u(this,"pluginState");u(this,"handleScroll",()=>{var t,i;if((t=this.state)!=null&&t.show){const o=(i=this.rootEl)==null?void 0:i.querySelector(`[data-decoration-id="${this.pluginState.decorationId}"]`);this.state.referencePos=o.getBoundingClientRect(),this.emitUpdate(this.pluginState.triggerCharacter)}});u(this,"closeMenu",()=>{this.editor.dispatch(this.editor._tiptapEditor.view.state.tr.setMeta(Z,null))});u(this,"clearQuery",()=>{this.pluginState!==void 0&&this.editor._tiptapEditor.chain().focus().deleteRange({from:this.pluginState.queryStartPos-(this.pluginState.fromUserInput?this.pluginState.triggerCharacter.length:0),to:this.editor._tiptapEditor.state.selection.from}).run()});this.editor=t,this.pluginState=void 0,this.emitUpdate=o=>{if(!this.state)throw new Error("Attempting to update uninitialized suggestions menu");i(o,this.state)},this.rootEl=this.editor._tiptapEditor.view.root,this.rootEl.addEventListener("scroll",this.handleScroll,!0)}update(t,i){var c;const o=Z.getState(i),n=Z.getState(t.state),r=o===void 0&&n!==void 0,a=o!==void 0&&n===void 0;if(!r&&!(o!==void 0&&n!==void 0)&&!a)return;if(this.pluginState=a?o:n,a||!this.editor.isEditable){this.state.show=!1,this.emitUpdate(this.pluginState.triggerCharacter);return}const s=(c=this.rootEl)==null?void 0:c.querySelector(`[data-decoration-id="${this.pluginState.decorationId}"]`);this.editor.isEditable&&(this.state={show:!0,referencePos:s.getBoundingClientRect(),query:this.pluginState.query},this.emitUpdate(this.pluginState.triggerCharacter))}destroy(){var t;(t=this.rootEl)==null||t.removeEventListener("scroll",this.handleScroll,!0)}}const Z=new _.PluginKey("SuggestionMenuPlugin");class ii extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"triggerCharacters",[]);u(this,"addTriggerCharacter",i=>{this.triggerCharacters.push(i)});u(this,"removeTriggerCharacter",i=>{this.triggerCharacters=this.triggerCharacters.filter(o=>o!==i)});u(this,"closeMenu",()=>this.view.closeMenu());u(this,"clearQuery",()=>this.view.clearQuery());const o=this.triggerCharacters;this.plugin=new _.Plugin({key:Z,view:()=>(this.view=new Yo(i,(n,r)=>{this.emit(`update ${n}`,r)}),this.view),state:{init(){},apply(n,r,a,l){if(n.getMeta("orderedListIndexing")!==void 0)return r;const s=n.getMeta(Z);if(typeof s=="object"&&s!==null&&r===void 0)return{triggerCharacter:s.triggerCharacter,fromUserInput:s.fromUserInput!==!1,queryStartPos:l.selection.from,query:"",decorationId:`id_${Math.floor(Math.random()*4294967295)}`};if(r===void 0)return r;if(l.selection.from!==l.selection.to||s===null||n.getMeta("focus")||n.getMeta("blur")||n.getMeta("pointer")||r.triggerCharacter!==void 0&&l.selection.from<r.queryStartPos)return;const c={...r};return c.query=l.doc.textBetween(r.queryStartPos,l.selection.from),c}},props:{handleTextInput(n,r,a,l){const s=this.getState(n.state);return o.includes(l)&&s===void 0?(n.dispatch(n.state.tr.insertText(l).scrollIntoView().setMeta(Z,{triggerCharacter:l})),!0):!1},decorations(n){const r=this.getState(n);if(r===void 0)return null;if(!r.fromUserInput){const a=Jo(n.selection);if(a)return M.DecorationSet.create(n.doc,[M.Decoration.node(a.pos,a.pos+a.node.nodeSize,{nodeName:"span",class:"bn-suggestion-decorator","data-decoration-id":r.decorationId})])}return M.DecorationSet.create(n.doc,[M.Decoration.inline(r.queryStartPos-r.triggerCharacter.length,r.queryStartPos,{nodeName:"span",class:"bn-suggestion-decorator","data-decoration-id":r.decorationId})])}}})}onUpdate(i,o){return this.triggerCharacters.includes(i)||this.addTriggerCharacter(i),this.on(`update ${i}`,o)}get shown(){var i,o;return((o=(i=this.view)==null?void 0:i.state)==null?void 0:o.show)||!1}}function Qo(e,t){e.suggestionMenus.addTriggerCharacter(t)}let C;function oi(e){C||(C=document.createElement("div"),C.innerHTML="_",C.style.opacity="0",C.style.height="1px",C.style.width="1px",e instanceof Document?e.body.appendChild(C):e.appendChild(C))}function en(e){C&&(e instanceof Document?e.body.removeChild(C):e.removeChild(C),C=void 0)}function pe(e){return Array.prototype.indexOf.call(e.parentElement.childNodes,e)}function tn(e){for(;e&&e.nodeName!=="TD"&&e.nodeName!=="TH";)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}function on(e,t){e.forEach(i=>{const o=t.querySelectorAll(i);for(let n=0;n<o.length;n++)o[n].style.visibility="hidden"})}class ni{constructor(t,i,o){u(this,"state");u(this,"emitUpdate");u(this,"tableId");u(this,"tablePos");u(this,"menuFrozen",!1);u(this,"prevWasEditable",null);u(this,"mouseMoveHandler",t=>{var c;if(this.menuFrozen)return;const i=tn(t.target);if(!i||!this.editor.isEditable){(c=this.state)!=null&&c.show&&(this.state.show=!1,this.emitUpdate());return}const o=pe(i),n=pe(i.parentElement),r=i.getBoundingClientRect(),a=i.parentElement.parentElement.getBoundingClientRect(),l=re(i,this.pmView);if(!l)return;let s;if(this.editor._tiptapEditor.state.doc.descendants((p,h)=>{if(typeof s<"u")return!1;if(p.type.name!=="blockContainer"||p.attrs.id!==l.id)return!0;const m=S(p,this.editor.schema.blockSchema,this.editor.schema.inlineContentSchema,this.editor.schema.styleSchema,this.editor.blockCache);return Ut("table",m,this.editor)&&(this.tablePos=h+1,s=m),!1}),!!s&&(this.tableId=l.id,!(this.state!==void 0&&this.state.show&&this.tableId===l.id&&this.state.rowIndex===n&&this.state.colIndex===o)))return this.state={show:!0,referencePosCell:r,referencePosTable:a,block:s,colIndex:o,rowIndex:n,draggingState:void 0},this.emitUpdate(),!1});u(this,"dragOverHandler",t=>{var m;if(((m=this.state)==null?void 0:m.draggingState)===void 0)return;t.preventDefault(),t.dataTransfer.dropEffect="move",on(["column-resize-handle","prosemirror-dropcursor-block","prosemirror-dropcursor-inline"],this.pmView.root);const i={left:Math.min(Math.max(t.clientX,this.state.referencePosTable.left+1),this.state.referencePosTable.right-1),top:Math.min(Math.max(t.clientY,this.state.referencePosTable.top+1),this.state.referencePosTable.bottom-1)},o=this.pmView.root.elementsFromPoint(i.left,i.top).filter(f=>f.tagName==="TD"||f.tagName==="TH");if(o.length===0)throw new Error("Could not find table cell element that the mouse cursor is hovering over.");const n=o[0];let r=!1;const a=pe(n.parentElement),l=pe(n),s=this.state.draggingState.draggedCellOrientation==="row"?this.state.rowIndex:this.state.colIndex,p=(this.state.draggingState.draggedCellOrientation==="row"?a:l)!==s;(this.state.rowIndex!==a||this.state.colIndex!==l)&&(this.state.rowIndex=a,this.state.colIndex=l,this.state.referencePosCell=n.getBoundingClientRect(),r=!0);const h=this.state.draggingState.draggedCellOrientation==="row"?i.top:i.left;this.state.draggingState.mousePos!==h&&(this.state.draggingState.mousePos=h,r=!0),r&&this.emitUpdate(),p&&this.editor.dispatch(this.pmView.state.tr.setMeta(J,!0))});u(this,"dropHandler",t=>{if(this.state===void 0||this.state.draggingState===void 0)return;t.preventDefault();const i=this.state.block.content.rows;if(this.state.draggingState.draggedCellOrientation==="row"){const o=i[this.state.draggingState.originalIndex];i.splice(this.state.draggingState.originalIndex,1),i.splice(this.state.rowIndex,0,o)}else{const o=i.map(n=>n.cells[this.state.draggingState.originalIndex]);i.forEach((n,r)=>{n.cells.splice(this.state.draggingState.originalIndex,1),n.cells.splice(this.state.colIndex,0,o[r])})}this.editor.updateBlock(this.state.block,{type:"table",content:{type:"tableContent",rows:i}})});u(this,"scrollHandler",()=>{var t;if((t=this.state)!=null&&t.show){const i=this.pmView.root.querySelector(`[data-node-type="blockContainer"][data-id="${this.tableId}"] table`),o=i.querySelector(`tr:nth-child(${this.state.rowIndex+1}) > td:nth-child(${this.state.colIndex+1})`);this.state.referencePosTable=i.getBoundingClientRect(),this.state.referencePosCell=o.getBoundingClientRect(),this.emitUpdate()}});this.editor=t,this.pmView=i,this.emitUpdate=()=>{if(!this.state)throw new Error("Attempting to update uninitialized image toolbar");o(this.state)},i.dom.addEventListener("mousemove",this.mouseMoveHandler),i.root.addEventListener("dragover",this.dragOverHandler),i.root.addEventListener("drop",this.dropHandler),i.root.addEventListener("scroll",this.scrollHandler,!0)}destroy(){this.pmView.dom.removeEventListener("mousemove",this.mouseMoveHandler),this.pmView.root.removeEventListener("dragover",this.dragOverHandler),this.pmView.root.removeEventListener("drop",this.dropHandler),this.pmView.root.removeEventListener("scroll",this.scrollHandler,!0)}}const J=new _.PluginKey("TableHandlesPlugin");class ri extends ${constructor(i){super();u(this,"view");u(this,"plugin");u(this,"colDragStart",i=>{if(this.view.state===void 0)throw new Error("Attempted to drag table column, but no table block was hovered prior.");this.view.state.draggingState={draggedCellOrientation:"col",originalIndex:this.view.state.colIndex,mousePos:i.clientX},this.view.emitUpdate(),this.editor.dispatch(this.editor._tiptapEditor.state.tr.setMeta(J,{draggedCellOrientation:this.view.state.draggingState.draggedCellOrientation,originalIndex:this.view.state.colIndex,newIndex:this.view.state.colIndex,tablePos:this.view.tablePos})),oi(this.editor._tiptapEditor.view.root),i.dataTransfer.setDragImage(C,0,0),i.dataTransfer.effectAllowed="move"});u(this,"rowDragStart",i=>{if(this.view.state===void 0)throw new Error("Attempted to drag table row, but no table block was hovered prior.");this.view.state.draggingState={draggedCellOrientation:"row",originalIndex:this.view.state.rowIndex,mousePos:i.clientY},this.view.emitUpdate(),this.editor.dispatch(this.editor._tiptapEditor.state.tr.setMeta(J,{draggedCellOrientation:this.view.state.draggingState.draggedCellOrientation,originalIndex:this.view.state.rowIndex,newIndex:this.view.state.rowIndex,tablePos:this.view.tablePos})),oi(this.editor._tiptapEditor.view.root),i.dataTransfer.setDragImage(C,0,0),i.dataTransfer.effectAllowed="copyMove"});u(this,"dragEnd",()=>{if(this.view.state===void 0)throw new Error("Attempted to drag table row, but no table block was hovered prior.");this.view.state.draggingState=void 0,this.view.emitUpdate(),this.editor.dispatch(this.editor._tiptapEditor.state.tr.setMeta(J,null)),en(this.editor._tiptapEditor.view.root)});u(this,"freezeHandles",()=>{this.view.menuFrozen=!0});u(this,"unfreezeHandles",()=>{this.view.menuFrozen=!1});this.editor=i,this.plugin=new _.Plugin({key:J,view:o=>(this.view=new ni(i,o,n=>{this.emit("update",n)}),this.view),props:{decorations:o=>{if(this.view===void 0||this.view.state===void 0||this.view.state.draggingState===void 0||this.view.tablePos===void 0)return;const n=this.view.state.draggingState.draggedCellOrientation==="row"?this.view.state.rowIndex:this.view.state.colIndex,r=[];if(n===this.view.state.draggingState.originalIndex)return M.DecorationSet.create(o.doc,r);const a=o.doc.resolve(this.view.tablePos+1),l=a.node();if(this.view.state.draggingState.draggedCellOrientation==="row"){const s=o.doc.resolve(a.posAtIndex(n)+1),c=s.node();for(let p=0;p<c.childCount;p++){const h=o.doc.resolve(s.posAtIndex(p)+1),m=h.node(),f=h.pos+(n>this.view.state.draggingState.originalIndex?m.nodeSize-2:0);r.push(M.Decoration.widget(f,()=>{const k=document.createElement("div");return k.className="bn-table-drop-cursor",k.style.left="0",k.style.right="0",n>this.view.state.draggingState.originalIndex?k.style.bottom="-2px":k.style.top="-3px",k.style.height="4px",k}))}}else for(let s=0;s<l.childCount;s++){const c=o.doc.resolve(a.posAtIndex(s)+1),p=o.doc.resolve(c.posAtIndex(n)+1),h=p.node(),m=p.pos+(n>this.view.state.draggingState.originalIndex?h.nodeSize-2:0);r.push(M.Decoration.widget(m,()=>{const f=document.createElement("div");return f.className="bn-table-drop-cursor",f.style.top="0",f.style.bottom="0",n>this.view.state.draggingState.originalIndex?f.style.right="-2px":f.style.left="-3px",f.style.width="4px",f}))}return M.DecorationSet.create(o.doc,r)}}})}onUpdate(i){return this.on("update",i)}}async function ai(e,t){const i=e.state.selection.content().content,n=(await se(e.state.schema,t)).serializeProseMirrorFragment(i,{});await G();const a=Y(e.state.schema,t).exportProseMirrorFragment(i,{}),l=await ue(a);return{internalHTML:n,externalHTML:a,plainText:l}}const nn=e=>g.Extension.create({name:"copyToClipboard",addProseMirrorPlugins(){return[new _.Plugin({props:{handleDOMEvents:{copy(t,i){return i.preventDefault(),i.clipboardData.clearData(),"node"in t.state.selection&&t.state.selection.node.type.spec.group==="blockContent"&&e.dispatch(e._tiptapEditor.state.tr.setSelection(new _.NodeSelection(t.state.doc.resolve(t.state.selection.from-1)))),(async()=>{const{internalHTML:o,externalHTML:n,plainText:r}=await ai(t,e);i.clipboardData.setData("blocknote/html",o),i.clipboardData.setData("text/html",n),i.clipboardData.setData("text/plain",r)})(),!0},dragstart(t,i){if("node"in t.state.selection&&t.state.selection.node.type.spec.group==="blockContent")return e.dispatch(e._tiptapEditor.state.tr.setSelection(new _.NodeSelection(t.state.doc.resolve(t.state.selection.from-1)))),i.preventDefault(),i.dataTransfer.clearData(),(async()=>{const{internalHTML:o,externalHTML:n,plainText:r}=await ai(t,e);i.dataTransfer.setData("blocknote/html",o),i.dataTransfer.setData("text/html",n),i.dataTransfer.setData("text/plain",r)})(),!0}}}})]}});function rn(e){let t=e.getTextCursorPosition().block,i=e.schema.blockSchema[t.type].content;for(;i==="none";)t=e.getTextCursorPosition().nextBlock,i=e.schema.blockSchema[t.type].content,e.setTextCursorPosition(t,"end")}function T(e,t){const i=e.getTextCursorPosition().block;if(i.content===void 0)throw new Error("Slash Menu open in a block that doesn't contain content.");Array.isArray(i.content)&&(i.content.length===1&&W(i.content[0])&&i.content[0].type==="text"&&i.content[0].text==="/"||i.content.length===0)?e.updateBlock(i,t):(e.insertBlocks([t],i,"after"),e.setTextCursorPosition(e.getTextCursorPosition().nextBlock,"end"));const o=e.getTextCursorPosition().block;return rn(e),o}function an(e){const t=[];return L("heading",e)&&t.push({onItemClick:()=>{T(e,{type:"heading",props:{level:1}})},badge:H("Mod-Alt-1"),key:"heading",...e.dictionary.slash_menu.heading},{onItemClick:()=>{T(e,{type:"heading",props:{level:2}})},badge:H("Mod-Alt-2"),key:"heading_2",...e.dictionary.slash_menu.heading_2},{onItemClick:()=>{T(e,{type:"heading",props:{level:3}})},badge:H("Mod-Alt-3"),key:"heading_3",...e.dictionary.slash_menu.heading_3}),L("numberedListItem",e)&&t.push({onItemClick:()=>{T(e,{type:"numberedListItem"})},badge:H("Mod-Shift-7"),key:"numbered_list",...e.dictionary.slash_menu.numbered_list}),L("bulletListItem",e)&&t.push({onItemClick:()=>{T(e,{type:"bulletListItem"})},badge:H("Mod-Shift-8"),key:"bullet_list",...e.dictionary.slash_menu.bullet_list}),L("checkListItem",e)&&t.push({onItemClick:()=>{T(e,{type:"checkListItem"})},badge:H("Mod-Shift-9"),key:"check_list",...e.dictionary.slash_menu.check_list}),L("paragraph",e)&&t.push({onItemClick:()=>{T(e,{type:"paragraph"})},badge:H("Mod-Alt-0"),key:"paragraph",...e.dictionary.slash_menu.paragraph}),L("table",e)&&t.push({onItemClick:()=>{T(e,{type:"table",content:{type:"tableContent",rows:[{cells:["","",""]},{cells:["","",""]}]}})},badge:void 0,key:"table",...e.dictionary.slash_menu.table}),L("image",e)&&t.push({onItemClick:()=>{const i=T(e,{type:"image"});e.dispatch(e._tiptapEditor.state.tr.setMeta(e.filePanel.plugin,{block:i}))},key:"image",...e.dictionary.slash_menu.image}),L("video",e)&&t.push({onItemClick:()=>{const i=T(e,{type:"video"});e.dispatch(e._tiptapEditor.state.tr.setMeta(e.filePanel.plugin,{block:i}))},key:"video",...e.dictionary.slash_menu.video}),L("audio",e)&&t.push({onItemClick:()=>{const i=T(e,{type:"audio"});e.dispatch(e._tiptapEditor.state.tr.setMeta(e.filePanel.plugin,{block:i}))},key:"audio",...e.dictionary.slash_menu.audio}),L("file",e)&&t.push({onItemClick:()=>{const i=T(e,{type:"file"});e.dispatch(e._tiptapEditor.state.tr.setMeta(e.filePanel.plugin,{block:i}))},key:"image",...e.dictionary.slash_menu.file}),t.push({onItemClick:()=>e.openSelectionMenu(":"),key:"emoji",...e.dictionary.slash_menu.emoji}),t}function ln(e,t){return e.filter(({title:i,aliases:o})=>i.toLowerCase().includes(t.toLowerCase())||o&&o.filter(n=>n.toLowerCase().includes(t.toLowerCase())).length!==0)}const je=["blocknote/html","Files","text/html","text/plain"];function sn(e,t){const i=e.split("/"),o=t.split("/");if(i.length!==2)throw new Error(`The string ${e} is not a valid MIME type.`);if(o.length!==2)throw new Error(`The string ${t} is not a valid MIME type.`);return i[1]==="*"||o[1]==="*"?i[0]===o[0]:(i[0]==="*"||o[0]==="*"||i[0]===o[0])&&i[1]===o[1]}async function li(e,t){if(!t.uploadFile)return;const i="dataTransfer"in e?e.dataTransfer:e.clipboardData;if(i===null)return;let o=null;for(const a of je)if(i.types.includes(a)){o=a;break}if(o!=="Files")return;const n=i.items;if(!n)return;e.preventDefault();const r=Object.values(t.schema.blockSchema).filter(a=>a.isFileBlock);for(let a=0;a<n.length;a++){let l="file";for(const c of r)for(const p of c.fileBlockAcceptMimeTypes||[])if(sn(n[a].type,p)){l=c.type;break}const s=n[a].getAsFile();if(s){const c=await t.uploadFile(s);if(typeof c=="string"){const p={type:l,props:{name:s.name,url:c}};T(t,p)}}}}const dn=e=>g.Extension.create({name:"pasteFromClipboard",addProseMirrorPlugins(){return[new _.Plugin({props:{handleDOMEvents:{paste(t,i){if(i.preventDefault(),!e.isEditable)return;let o=null;for(const r of je)if(i.clipboardData.types.includes(r)){o=r;break}if(o===null)return!0;if(o==="Files")return li(i,e),!0;let n=i.clipboardData.getData(o);return o==="text/html"&&(n=Ot(n.trim()).innerHTML),e._tiptapEditor.view.pasteHTML(n),!0}}}})]}}),cn=e=>g.Extension.create({name:"dropFile",addProseMirrorPlugins(){return[new _.Plugin({props:{handleDOMEvents:{drop(t,i){if(!e.isEditable)return;let o=null;for(const n of je)if(i.dataTransfer.types.includes(n)){o=n;break}return o===null?!0:o==="Files"?(li(i,e),!0):!1}}}})]}}),un=g.Extension.create({name:"blockBackgroundColor",addGlobalAttributes(){return[{types:["blockContainer"],attributes:{backgroundColor:{default:E.backgroundColor.default,parseHTML:e=>e.hasAttribute("data-background-color")?e.getAttribute("data-background-color"):E.backgroundColor.default,renderHTML:e=>e.backgroundColor===E.backgroundColor.default?{}:{"data-background-color":e.backgroundColor}}}}]}}),pn=g.Extension.create({name:"textAlignment",addGlobalAttributes(){return[{types:["paragraph","heading","bulletListItem","numberedListItem","checkListItem"],attributes:{textAlignment:{default:"left",parseHTML:e=>e.getAttribute("data-text-alignment"),renderHTML:e=>e.textAlignment==="left"?{}:{"data-text-alignment":e.textAlignment}}}}]}}),hn=g.Extension.create({name:"blockTextColor",addGlobalAttributes(){return[{types:["blockContainer"],attributes:{textColor:{default:E.textColor.default,parseHTML:e=>e.hasAttribute("data-text-color")?e.getAttribute("data-text-color"):E.textColor.default,renderHTML:e=>e.textColor===E.textColor.default?{}:{"data-text-color":e.textColor}}}}]}}),mn=g.Extension.create({name:"trailingNode",addProseMirrorPlugins(){const e=new _.PluginKey(this.name);return[new _.Plugin({key:e,appendTransaction:(t,i,o)=>{const{doc:n,tr:r,schema:a}=o,l=e.getState(o),s=n.content.size-2,c=a.nodes.blockContainer,p=a.nodes.paragraph;if(l)return r.insert(s,c.create(void 0,p.create()))},state:{init:(t,i)=>{},apply:(t,i)=>{if(!t.docChanged)return i;let o=t.doc.lastChild;if(!o||o.type.name!=="blockGroup")throw new Error("Expected blockGroup");if(o=o.lastChild,!o||o.type.name!=="blockContainer")throw new Error("Expected blockContainer");const n=o.firstChild;if(!n)throw new Error("Expected blockContent");return o.nodeSize>4||n.type.spec.content!=="inline*"}}})]}}),fn=new _.PluginKey("non-editable-block"),gn=()=>new _.Plugin({key:fn,props:{handleKeyDown:(e,t)=>{if("node"in e.state.selection){if(t.ctrlKey||t.metaKey)return!1;if(t.key.length===1)return t.preventDefault(),!0;if(t.key==="Enter"&&!t.shiftKey&&!t.altKey&&!t.ctrlKey&&!t.metaKey){const i=e.state.tr;return e.dispatch(i.insert(e.state.tr.selection.$to.after(),e.state.schema.nodes.paragraph.create()).setSelection(new _.TextSelection(i.doc.resolve(e.state.tr.selection.$to.after()+1)))),!0}}return!1}}}),si=new _.PluginKey("previous-blocks"),bn={index:"index",level:"level",type:"type",depth:"depth","depth-change":"depth-change"},kn=()=>{let e;return new _.Plugin({key:si,view(t){return{update:async(i,o)=>{var n;((n=this.key)==null?void 0:n.getState(i.state).updatedBlocks.size)>0&&(e=setTimeout(()=>{i.dispatch(i.state.tr.setMeta(si,{clearUpdate:!0}))},0))},destroy:()=>{e&&clearTimeout(e)}}},state:{init(){return{prevTransactionOldBlockAttrs:{},currentTransactionOldBlockAttrs:{},updatedBlocks:new Set}},apply(t,i,o,n){if(i.currentTransactionOldBlockAttrs={},i.updatedBlocks.clear(),!t.docChanged||o.doc.eq(n.doc))return i;const r={},a=g.findChildren(o.doc,c=>c.attrs.id),l=new Map(a.map(c=>[c.node.attrs.id,c])),s=g.findChildren(n.doc,c=>c.attrs.id);for(const c of s){const p=l.get(c.node.attrs.id),h=p==null?void 0:p.node.firstChild,m=c.node.firstChild;if(p&&h&&m){const f={index:m.attrs.index,level:m.attrs.level,type:m.type.name,depth:n.doc.resolve(c.pos).depth};let k={index:h.attrs.index,level:h.attrs.level,type:h.type.name,depth:o.doc.resolve(p.pos).depth};r[c.node.attrs.id]=k,t.getMeta("numberedListIndexing")&&(c.node.attrs.id in i.prevTransactionOldBlockAttrs&&(k=i.prevTransactionOldBlockAttrs[c.node.attrs.id]),f.type==="numberedListItem"&&(k.index=f.index)),i.currentTransactionOldBlockAttrs[c.node.attrs.id]=k,JSON.stringify(k)!==JSON.stringify(f)&&(k["depth-change"]=k.depth-f.depth,i.updatedBlocks.add(c.node.attrs.id))}}return i.prevTransactionOldBlockAttrs=r,i}},props:{decorations(t){const i=this.getState(t);if(i.updatedBlocks.size===0)return;const o=[];return t.doc.descendants((n,r)=>{if(!n.attrs.id||!i.updatedBlocks.has(n.attrs.id))return;const a=i.currentTransactionOldBlockAttrs[n.attrs.id],l={};for(const[c,p]of Object.entries(a))l["data-prev-"+bn[c]]=p||"none";const s=M.Decoration.node(r,r+n.nodeSize,{...l});o.push(s)}),M.DecorationSet.create(t.doc,o)}}})},_n={blockColor:"data-block-color",blockStyle:"data-block-style",id:"data-id",depth:"data-depth",depthChange:"data-depth-change"},yn=g.Node.create({name:"blockContainer",group:"blockContainer",content:"blockContent blockGroup?",priority:50,defining:!0,parseHTML(){return[{tag:"div",getAttrs:e=>{if(typeof e=="string")return!1;const t={};for(const[i,o]of Object.entries(_n))e.getAttribute(o)&&(t[i]=e.getAttribute(o));return e.getAttribute("data-node-type")==="blockContainer"?t:!1}}]},renderHTML({HTMLAttributes:e}){var n;const t=document.createElement("div");t.className="bn-block-outer",t.setAttribute("data-node-type","blockOuter");for(const[r,a]of Object.entries(e))r!=="class"&&t.setAttribute(r,a);const i={...((n=this.options.domAttributes)==null?void 0:n.block)||{},...e},o=document.createElement("div");o.className=D("bn-block",i.class),o.setAttribute("data-node-type",this.name);for(const[r,a]of Object.entries(i))r!=="class"&&o.setAttribute(r,a);return t.appendChild(o),{dom:t,contentDOM:o}},addCommands(){return{BNCreateBlock:e=>({state:t,dispatch:i})=>{const o=t.schema.nodes.blockContainer.createAndFill();return i&&t.tr.insert(e,o).scrollIntoView(),!0},BNDeleteBlock:e=>({state:t,dispatch:i})=>{const o=w(t.doc,e);if(o===void 0)return!1;const{startPos:n,endPos:r}=o;return i&&t.tr.deleteRange(n,r),!0},BNUpdateBlock:(e,t)=>({state:i,dispatch:o})=>{const n=w(i.doc,e);if(n===void 0)return!1;const{startPos:r,endPos:a,node:l,contentNode:s}=n;if(o){if(t.children!==void 0){const m=[];for(const f of t.children)m.push(N(f,i.schema,this.options.editor.schema.styleSchema));l.childCount===2?i.tr.replace(r+s.nodeSize+1,a-1,new y.Slice(y.Fragment.from(m),0,0)):i.tr.insert(r+s.nodeSize,i.schema.nodes.blockGroup.create({},m))}const c=s.type.name,p=t.type||c;let h="keep";if(t.content)if(typeof t.content=="string")h=F([t.content],i.schema,this.options.editor.schema.styleSchema);else if(Array.isArray(t.content))h=F(t.content,i.schema,this.options.editor.schema.styleSchema);else if(t.content.type==="tableContent")h=ke(t.content,i.schema,this.options.editor.schema.styleSchema);else throw new I(t.content.type);else{const m=i.schema.nodes[c].spec.content,f=i.schema.nodes[p].spec.content;m===""||f!==m&&(h=[])}h==="keep"?i.tr.setNodeMarkup(r,t.type===void 0?void 0:i.schema.nodes[t.type],{...s.attrs,...t.props}):i.tr.replaceWith(r,a,i.schema.nodes[p].create({...s.attrs,...t.props},h)).setSelection(i.schema.nodes[p].spec.content===""?new _.NodeSelection(i.tr.doc.resolve(r)):i.schema.nodes[p].spec.content==="inline*"?new _.TextSelection(i.tr.doc.resolve(r)):new _.TextSelection(i.tr.doc.resolve(r+4))),i.tr.setNodeMarkup(r-1,void 0,{...l.attrs,...t.props})}return!0},BNMergeBlocks:e=>({state:t,dispatch:i})=>{const o=t.doc.resolve(e+1).node().type.name==="blockContainer",n=t.doc.resolve(e-1).node().type.name==="blockContainer";if(!o||!n)return!1;const r=w(t.doc,e+1),{node:a,contentNode:l,startPos:s,endPos:c,depth:p}=r;if(a.childCount===2){const f=t.doc.resolve(s+l.nodeSize+1),k=t.doc.resolve(c-1),b=f.blockRange(k);i&&t.tr.lift(b,p-1)}let h=e-1,m=w(t.doc,h);for(;m.numChildBlocks>0;)if(h--,m=w(t.doc,h),m===void 0)return!1;return i&&(i(t.tr.deleteRange(s,s+l.nodeSize).replace(h-1,s,new y.Slice(l.content,0,0)).scrollIntoView()),t.tr.setSelection(new _.TextSelection(t.doc.resolve(h-1)))),!0},BNSplitBlock:(e,t,i)=>({state:o,dispatch:n})=>{const r=w(o.doc,e);if(r===void 0)return!1;const{contentNode:a,contentType:l,startPos:s,endPos:c,depth:p}=r,h=o.doc.cut(s+1,e),m=o.doc.cut(e,c-1),f=o.schema.nodes.blockContainer.createAndFill(),k=c+1,b=k+2;return n&&(o.tr.insert(k,f),o.tr.replace(b,b+1,m.content.size>0?new y.Slice(y.Fragment.from(m),p+2,p+2):void 0),t&&o.tr.setBlockType(b,b,o.schema.node(l).type,i?a.attrs:void 0),o.tr.setSelection(new _.TextSelection(o.doc.resolve(b))),o.tr.replace(s+1,c-1,h.content.size>0?new y.Slice(y.Fragment.from(h),p+2,p+2):void 0),o.tr.scrollIntoView()),!0}}},addProseMirrorPlugins(){return[kn(),gn()]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.undoInputRule(),()=>o.command(({state:n})=>{const{contentType:r,startPos:a}=w(n.doc,n.selection.from),l=n.selection.from===a+1,s=r.name==="paragraph";return l&&!s?o.BNUpdateBlock(n.selection.from,{type:"paragraph",props:{}}):!1}),()=>o.command(({state:n})=>{const{startPos:r}=w(n.doc,n.selection.from);return n.selection.from===r+1?o.liftListItem("blockContainer"):!1}),()=>o.command(({state:n})=>{const{depth:r,startPos:a}=w(n.doc,n.selection.from),l=n.selection.from===a+1,s=n.selection.empty,c=a===2,p=a-1;return!c&&l&&s&&r===2?o.BNMergeBlocks(p):!1})]),Delete:()=>this.editor.commands.first(({commands:o})=>[()=>o.deleteSelection(),()=>o.command(({state:n})=>{const{node:r,depth:a,endPos:l}=w(n.doc,n.selection.from),s=l===n.doc.nodeSize-4,c=n.selection.from===l-1,p=n.selection.empty,h=r.childCount===2;if(!s&&c&&p&&!h){let m=a,f=l+2,k=n.doc.resolve(f).depth;for(;k<m;)m=k,f+=2,k=n.doc.resolve(f).depth;return o.BNMergeBlocks(f-1)}return!1})]),Enter:()=>this.editor.commands.first(({commands:o})=>[()=>o.command(({state:n})=>{const{contentNode:r,depth:a}=w(n.doc,n.selection.from),l=n.selection.$anchor.parentOffset===0,s=n.selection.anchor===n.selection.head,c=r.childCount===0,p=a>2;return l&&s&&c&&p?o.liftListItem("blockContainer"):!1}),()=>o.command(({state:n,chain:r})=>{const{contentNode:a,endPos:l}=w(n.doc,n.selection.from),s=n.selection.$anchor.parentOffset===0,c=n.selection.anchor===n.selection.head,p=a.childCount===0;if(s&&c&&p){const h=l+1,m=h+2;return r().BNCreateBlock(h).setTextSelection(m).run(),!0}return!1}),()=>o.command(({state:n,chain:r})=>{const{contentNode:a}=w(n.doc,n.selection.from),l=n.selection.$anchor.parentOffset===0;return a.childCount===0?!1:(r().deleteSelection().BNSplitBlock(n.selection.from,l,l).run(),!0)})]),Tab:()=>{var o,n,r;return(o=this.options.editor.formattingToolbar)!=null&&o.shown||(n=this.options.editor.linkToolbar)!=null&&n.shown||(r=this.options.editor.filePanel)!=null&&r.shown?!1:(this.editor.commands.sinkListItem("blockContainer"),!0)},"Shift-Tab":()=>{var o,n,r;return(o=this.options.editor.formattingToolbar)!=null&&o.shown||(n=this.options.editor.linkToolbar)!=null&&n.shown||(r=this.options.editor.filePanel)!=null&&r.shown?!1:(this.editor.commands.liftListItem("blockContainer"),!0)}}}}),vn=g.Node.create({name:"blockGroup",group:"blockGroup",content:"blockContainer+",parseHTML(){return[{tag:"div",getAttrs:e=>typeof e=="string"?!1:e.getAttribute("data-node-type")==="blockGroup"?null:!1}]},renderHTML({HTMLAttributes:e}){var o;const t={...((o=this.options.domAttributes)==null?void 0:o.blockGroup)||{},...e},i=document.createElement("div");i.className=D("bn-block-group",t.class),i.setAttribute("data-node-type","blockGroup");for(const[n,r]of Object.entries(t))n!=="class"&&i.setAttribute(n,r);return{dom:i,contentDOM:i}}}),wn=g.Node.create({name:"doc",topNode:!0,content:"blockGroup"}),di=e=>{var o;const t=[g.extensions.ClipboardTextSerializer,g.extensions.Commands,g.extensions.Editable,g.extensions.FocusEvents,g.extensions.Tabindex,Bi.Gapcursor,q.configure({types:["blockContainer"]}),Li.HardBreak.extend({priority:10}),Pi.Text,Ai.Link.extend({addKeyboardShortcuts(){return{"Mod-k":()=>(this.editor.commands.toggleLink({href:""}),!0)}}}),...Object.values(e.styleSpecs).map(n=>n.implementation.mark),hn,un,pn,g.Extension.create({name:"OverrideEscape",addKeyboardShortcuts(){return{Escape:()=>e.editor.suggestionMenus.shown?!1:this.editor.commands.blur()}}}),wn,yn.configure({editor:e.editor,domAttributes:e.domAttributes}),vn.configure({domAttributes:e.domAttributes}),...Object.values(e.inlineContentSpecs).filter(n=>n.config!=="link"&&n.config!=="text").map(n=>n.implementation.node.configure({editor:e.editor})),...Object.values(e.blockSpecs).flatMap(n=>[...(n.implementation.requiredExtensions||[]).map(r=>r.configure({editor:e.editor,domAttributes:e.domAttributes})),n.implementation.node.configure({editor:e.editor,domAttributes:e.domAttributes})]),nn(e.editor),dn(e.editor),cn(e.editor),Mi.Dropcursor.configure({width:5,color:"#ddeeff"}),...e.trailingBlock===void 0||e.trailingBlock?[mn]:[]];if(e.collaboration){if(t.push(Ri.default.configure({fragment:e.collaboration.fragment})),(o=e.collaboration.provider)!=null&&o.awareness){const n=r=>{const a=document.createElement("span");a.classList.add("collaboration-cursor__caret"),a.setAttribute("style",`border-color: ${r.color}`);const l=document.createElement("span");l.classList.add("collaboration-cursor__label"),l.setAttribute("style",`background-color: ${r.color}`),l.insertBefore(document.createTextNode(r.name),null);const s=document.createTextNode("⁠"),c=document.createTextNode("⁠");return a.insertBefore(s,null),a.insertBefore(l,null),a.insertBefore(c,null),a};t.push(zi.default.configure({user:e.collaboration.user,render:e.collaboration.renderCursor||n,provider:e.collaboration.provider}))}}else t.push(Ii.History);const i=e.disableExtensions||[];return t.filter(n=>!i.includes(n.name))};function En(e,t){const i=[];return e.forEach((o,n,r)=>{r!==t&&i.push(o)}),y.Fragment.from(i)}function xn(e,t){let i=y.Fragment.from(e.content);for(let o=0;o<i.childCount;o++)if(i.child(o).type.spec.group==="blockContent"){const n=[i.child(o)];if(o+1<i.childCount&&i.child(o+1).type.spec.group==="blockGroup"){const a=i.child(o+1).child(0).child(0);(a.type.name==="bulletListItem"||a.type.name==="numberedListItem"||a.type.name==="checkListItem")&&(n.push(i.child(o+1)),i=En(i,o+1))}const r=t.state.schema.nodes.blockContainer.create(void 0,n);i=i.replaceChild(o,r)}return new y.Slice(i,e.openStart,e.openEnd)}function Re(e){return e&&Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}class he{constructor(t){u(this,"blockSpecs");u(this,"inlineContentSpecs");u(this,"styleSpecs");u(this,"blockSchema");u(this,"inlineContentSchema");u(this,"styleSchema");u(this,"BlockNoteEditor","only for types");u(this,"Block","only for types");u(this,"PartialBlock","only for types");this.blockSpecs=Re(t==null?void 0:t.blockSpecs)||Ae,this.inlineContentSpecs=Re(t==null?void 0:t.inlineContentSpecs)||Ne,this.styleSpecs=Re(t==null?void 0:t.styleSpecs)||Pe,this.blockSchema=xe(this.blockSpecs),this.inlineContentSchema=Se(this.inlineContentSpecs),this.styleSchema=Te(this.styleSpecs)}static create(t){return new he(t)}}class ci extends g.Editor{constructor(i,o){super({...i,content:void 0});u(this,"_state");u(this,"mount",i=>{i?(this.options.element=i,this.createViewAlternative()):this.destroy()});const n=this.schema;let r;const a=n.nodes.doc.createAndFill;n.nodes.doc.createAndFill=(...s)=>{if(r)return r;const c=a.apply(n.nodes.doc,s),p=JSON.parse(JSON.stringify(c.toJSON()));return p.content[0].content[0].attrs.id="initialBlockId",r=y.Node.fromJSON(n,p),r};let l;try{const s=i==null?void 0:i.content.map(c=>N(c,this.schema,o).toJSON());l=g.createDocument({type:"doc",content:[{type:"blockGroup",content:s}]},this.schema,this.options.parseOptions)}catch(s){throw console.error("Error creating document from blocks passed as `initialContent`. Caused by exception: ",s),new Error("Error creating document from blocks passed as `initialContent`:\n"+ +JSON.stringify(i.content))}this._state=_.EditorState.create({doc:l,schema:this.schema})}get state(){return this.view&&(this._state=this.view.state),this._state}dispatch(i){this.view?this.view.dispatch(i):this._state=this.state.apply(i)}createViewAlternative(){queueMicrotask(()=>{this.view=new M.EditorView({mount:this.options.element},{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:this.state});const i=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(i),this.createNodeViews()})}}ci.prototype.createView=()=>{};const Sn=new _.PluginKey("blocknote-placeholder"),Cn=(e,t)=>new _.Plugin({key:Sn,view:()=>{const i=document.createElement("style"),o=e._tiptapEditor.options.injectNonce;o&&i.setAttribute("nonce",o),e._tiptapEditor.view.root instanceof ShadowRoot?e._tiptapEditor.view.root.append(i):e._tiptapEditor.view.root.head.appendChild(i);const n=i.sheet,r=(l="")=>`.bn-block-content${l} .bn-inline-content:has(> .ProseMirror-trailingBreak:only-child):before`,a=(l,s=!0)=>{const c=s?"[data-is-empty-and-focused]":"";if(l==="default")return r(c);const p=`[data-content-type="${l}"]`;return r(c+p)};for(const[l,s]of Object.entries(t)){const c=l==="default";n.insertRule(`${a(l,c)}{ content: ${JSON.stringify(s)}; }`),c||n.insertRule(`${a(l,!0)}{ content: ${JSON.stringify(s)}; }`)}return{destroy:()=>{e._tiptapEditor.view.root instanceof ShadowRoot?e._tiptapEditor.view.root.removeChild(i):e._tiptapEditor.view.root.head.removeChild(i)}}},props:{decorations:i=>{const{doc:o,selection:n}=i;if(!e.isEditable||!n.empty)return;const r=n.$anchor,a=r.parent;if(a.content.size>0)return null;const l=r.before(),s=M.Decoration.node(l,l+a.nodeSize,{"data-is-empty-and-focused":"true"});return M.DecorationSet.create(o,[s])}}}),Tn={enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!1};class ze{constructor(t){u(this,"_pmSchema");u(this,"headless",!1);u(this,"_tiptapEditor");u(this,"elementRenderer",null);u(this,"blockCache",new WeakMap);u(this,"dictionary");u(this,"schema");u(this,"blockImplementations");u(this,"inlineContentImplementations");u(this,"styleImplementations");u(this,"formattingToolbar");u(this,"linkToolbar");u(this,"sideMenu");u(this,"suggestionMenus");u(this,"filePanel");u(this,"tableHandles");u(this,"uploadFile");u(this,"resolveFileUrl");u(this,"mount",t=>{this._tiptapEditor.mount(t)});var s,c,p,h,m,f,k;this.options=t;const i=t;if(i.onEditorContentChange)throw new Error("onEditorContentChange initialization option is deprecated, use <BlockNoteView onChange={...} />, the useEditorChange(...) hook, or editor.onChange(...)");if(i.onTextCursorPositionChange)throw new Error("onTextCursorPositionChange initialization option is deprecated, use <BlockNoteView onSelectionChange={...} />, the useEditorSelectionChange(...) hook, or editor.onSelectionChange(...)");if(i.onEditorReady)throw new Error("onEditorReady is deprecated. Editor is immediately ready for use after creation.");if(i.editable)throw new Error("editable initialization option is deprecated, use <BlockNoteView editable={true/false} />, or alternatively editor.isEditable = true/false");this.dictionary=t.dictionary||Ge;const o={defaultStyles:!0,schema:t.schema||he.create(),_headless:!1,...t,placeholders:{...this.dictionary.placeholders,...t.placeholders}};this.schema=o.schema,this.blockImplementations=o.schema.blockSpecs,this.inlineContentImplementations=o.schema.inlineContentSpecs,this.styleImplementations=o.schema.styleSpecs,this.formattingToolbar=new $t(this),this.linkToolbar=new Zt(this),this.sideMenu=new ti(this),this.suggestionMenus=new ii(this),this.filePanel=new Gt(this),L("table",this)&&(this.tableHandles=new ri(this));const n=di({editor:this,domAttributes:o.domAttributes||{},blockSpecs:this.schema.blockSpecs,styleSpecs:this.schema.styleSpecs,inlineContentSpecs:this.schema.inlineContentSpecs,collaboration:o.collaboration,trailingBlock:o.trailingBlock,disableExtensions:o.disableExtensions}),r=g.Extension.create({name:"BlockNoteUIExtension",addProseMirrorPlugins:()=>[this.formattingToolbar.plugin,this.linkToolbar.plugin,this.sideMenu.plugin,this.suggestionMenus.plugin,...this.filePanel?[this.filePanel.plugin]:[],...this.tableHandles?[this.tableHandles.plugin]:[],Cn(this,o.placeholders)]});n.push(r),this.uploadFile=o.uploadFile,this.resolveFileUrl=o.resolveFileUrl||(async b=>b),this.headless=o._headless,o.collaboration&&o.initialContent&&console.warn("When using Collaboration, initialContent might cause conflicts, because changes should come from the collaboration provider");const a=o.initialContent||(t.collaboration?[{type:"paragraph",id:"initialBlockId"}]:[{type:"paragraph",id:q.options.generateID()}]);if(!Array.isArray(a)||a.length===0)throw new Error("initialContent must be a non-empty array of blocks, received: "+a);const l={...Tn,...o._tiptapOptions,content:a,extensions:[...((s=o._tiptapOptions)==null?void 0:s.extensions)||[],...n],editorProps:{...(c=o._tiptapOptions)==null?void 0:c.editorProps,attributes:{tabIndex:"0",...(h=(p=o._tiptapOptions)==null?void 0:p.editorProps)==null?void 0:h.attributes,...(m=o.domAttributes)==null?void 0:m.editor,class:D("bn-editor",o.defaultStyles?"bn-default-styles":"",((k=(f=o.domAttributes)==null?void 0:f.editor)==null?void 0:k.class)||"")},transformPasted:xn}};this.headless?this._pmSchema=g.getSchema(l.extensions):(this._tiptapEditor=new ci(l,this.schema.styleSchema),this._pmSchema=this._tiptapEditor.schema)}get pmSchema(){return this._pmSchema}static create(t={}){return new ze(t)}dispatch(t){this._tiptapEditor.dispatch(t)}get prosemirrorView(){return this._tiptapEditor.view}get domElement(){return this._tiptapEditor.view.dom}isFocused(){return this._tiptapEditor.view.hasFocus()}focus(){this._tiptapEditor.view.focus()}get topLevelBlocks(){return this.document}get document(){const t=[];return this._tiptapEditor.state.doc.firstChild.descendants(i=>(t.push(S(i,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache)),!1)),t}getBlock(t){const i=typeof t=="string"?t:t.id;let o;return this._tiptapEditor.state.doc.firstChild.descendants(n=>typeof o<"u"?!1:n.type.name!=="blockContainer"||n.attrs.id!==i?!0:(o=S(n,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache),!1)),o}forEachBlock(t,i=!1){const o=this.document.slice();i&&o.reverse();function n(r){for(const a of r){if(!t(a))return!1;const l=i?a.children.slice().reverse():a.children;if(!n(l))return!1}return!0}n(o)}onEditorContentChange(t){this._tiptapEditor.on("update",t)}onEditorSelectionChange(t){this._tiptapEditor.on("selectionUpdate",t)}getTextCursorPosition(){const{node:t,depth:i,startPos:o,endPos:n}=w(this._tiptapEditor.state.doc,this._tiptapEditor.state.selection.from),r=this._tiptapEditor.state.doc.resolve(n).index(i-1),a=this._tiptapEditor.state.doc.resolve(n+1).node().childCount;let l;r>0&&(l=this._tiptapEditor.state.doc.resolve(o-2).node());let s;return r<a-1&&(s=this._tiptapEditor.state.doc.resolve(n+2).node()),{block:S(t,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache),prevBlock:l===void 0?void 0:S(l,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache),nextBlock:s===void 0?void 0:S(s,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache)}}setTextCursorPosition(t,i="start"){const o=typeof t=="string"?t:t.id,{posBeforeNode:n}=He(o,this._tiptapEditor.state.doc),{startPos:r,contentNode:a}=w(this._tiptapEditor.state.doc,n+2),l=this.schema.blockSchema[a.type.name].content;if(l==="none"){this._tiptapEditor.commands.setNodeSelection(r);return}if(l==="inline")i==="start"?this._tiptapEditor.commands.setTextSelection(r+1):this._tiptapEditor.commands.setTextSelection(r+a.nodeSize-1);else if(l==="table")i==="start"?this._tiptapEditor.commands.setTextSelection(r+4):this._tiptapEditor.commands.setTextSelection(r+a.nodeSize-4);else throw new I(l)}getSelection(){if(this._tiptapEditor.state.selection.from===this._tiptapEditor.state.selection.to||"node"in this._tiptapEditor.state.selection)return;const t=[];return this._tiptapEditor.state.doc.descendants((i,o)=>{if(i.type.spec.group!=="blockContent")return!0;const n=o+i.nodeSize-1,r=o+1;return n<=this._tiptapEditor.state.selection.from||r>=this._tiptapEditor.state.selection.to?!0:(t.push(S(this._tiptapEditor.state.doc.resolve(o).node(),this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.blockCache)),!1)}),{blocks:t}}get isEditable(){if(!this._tiptapEditor){if(!this.headless)throw new Error("no editor, but also not headless?");return!1}return this._tiptapEditor.isEditable===void 0?!0:this._tiptapEditor.isEditable}set isEditable(t){if(!this._tiptapEditor){if(!this.headless)throw new Error("no editor, but also not headless?");return}this._tiptapEditor.options.editable!==t&&this._tiptapEditor.setEditable(t)}insertBlocks(t,i,o="before"){return No(t,i,o,this)}updateBlock(t,i){return Ho(t,i,this)}removeBlocks(t){return Do(t,this)}replaceBlocks(t,i){return Uo(t,i,this)}insertInlineContent(t){const i=F(t,this.pmSchema,this.schema.styleSchema);jo({from:this._tiptapEditor.state.selection.from,to:this._tiptapEditor.state.selection.to},i,this)}getActiveStyles(){const t={},i=this._tiptapEditor.state.selection.$to.marks();for(const o of i){const n=this.schema.styleSchema[o.type.name];if(!n){o.type.name!=="link"&&console.warn("mark not found in styleschema",o.type.name);continue}n.propSchema==="boolean"?t[n.type]=!0:t[n.type]=o.attrs.stringValue}return t}addStyles(t){for(const[i,o]of Object.entries(t)){const n=this.schema.styleSchema[i];if(!n)throw new Error(`style ${i} not found in styleSchema`);if(n.propSchema==="boolean")this._tiptapEditor.commands.setMark(i);else if(n.propSchema==="string")this._tiptapEditor.commands.setMark(i,{stringValue:o});else throw new I(n.propSchema)}}removeStyles(t){for(const i of Object.keys(t))this._tiptapEditor.commands.unsetMark(i)}toggleStyles(t){for(const[i,o]of Object.entries(t)){const n=this.schema.styleSchema[i];if(!n)throw new Error(`style ${i} not found in styleSchema`);if(n.propSchema==="boolean")this._tiptapEditor.commands.toggleMark(i);else if(n.propSchema==="string")this._tiptapEditor.commands.toggleMark(i,{stringValue:o});else throw new I(n.propSchema)}}getSelectedText(){return this._tiptapEditor.state.doc.textBetween(this._tiptapEditor.state.selection.from,this._tiptapEditor.state.selection.to)}getSelectedLinkUrl(){return this._tiptapEditor.getAttributes("link").href}createLink(t,i){if(t==="")return;const{from:o,to:n}=this._tiptapEditor.state.selection;i||(i=this._tiptapEditor.state.doc.textBetween(o,n));const r=this.pmSchema.mark("link",{href:t});this.dispatch(this._tiptapEditor.state.tr.insertText(i,o,n).addMark(o,o+i.length,r))}canNestBlock(){const{startPos:t,depth:i}=w(this._tiptapEditor.state.doc,this._tiptapEditor.state.selection.from);return this._tiptapEditor.state.doc.resolve(t).index(i-1)>0}nestBlock(){this._tiptapEditor.commands.sinkListItem("blockContainer")}canUnnestBlock(){const{depth:t}=w(this._tiptapEditor.state.doc,this._tiptapEditor.state.selection.from);return t>2}unnestBlock(){this._tiptapEditor.commands.liftListItem("blockContainer")}async blocksToHTMLLossy(t=this.document){return await G(),Y(this.pmSchema,this).exportBlocks(t,{})}async blocksToFullHTML(t){return se(this.pmSchema,this).serializeBlocks(t,{})}async tryParseHTMLToBlocks(t){return De(t,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.pmSchema)}async blocksToMarkdownLossy(t=this.document){return zt(t,this.pmSchema,this,{})}async tryParseMarkdownToBlocks(t){return Ft(t,this.schema.blockSchema,this.schema.inlineContentSchema,this.schema.styleSchema,this.pmSchema)}updateCollaborationUserInfo(t){if(!this.options.collaboration)throw new Error("Cannot update collaboration user info when collaboration is disabled.");this._tiptapEditor.commands.updateUser(t)}onChange(t){if(this.headless)return;const i=()=>{t(this)};return this._tiptapEditor.on("update",i),()=>{this._tiptapEditor.off("update",i)}}onSelectionChange(t){if(this.headless)return;const i=()=>{t(this)};return this._tiptapEditor.on("selectionUpdate",i),()=>{this._tiptapEditor.off("selectionUpdate",i)}}openSelectionMenu(t){this.prosemirrorView.focus(),this.prosemirrorView.dispatch(this.prosemirrorView.state.tr.scrollIntoView().setMeta(this.suggestionMenus.plugin,{triggerCharacter:t,fromUserInput:!1}))}}let me,Ve;async function Mn(e,t){if(!Dt("text",e))return[];if(!me){me=import("@emoji-mart/data"),Ve=await import("emoji-mart");const n=(await me).default;await Ve.init({data:n})}const i=(await me).default;return(t.trim()===""?Object.values(i.emojis):await Ve.SearchIndex.search(t)).map(n=>({id:n.skins[0].native,onItemClick:()=>e.insertInlineContent(n.skins[0].native+" ")}))}function Oe(e=""){return typeof e=="string"?[{type:"text",text:e,styles:{}}]:e}function ui(e){return typeof e=="string"?Oe(e):Array.isArray(e)?e.flatMap(t=>typeof t=="string"?Oe(t):ge(t)?{...t,content:Oe(t.content)}:W(t)?t:{props:{},...t,content:ui(t.content)}):e}function Bn(e,t){return t.map(i=>Fe(e,i))}function Fe(e,t){const i={id:"",type:t.type,props:{},content:e[t.type].content==="inline"?[]:void 0,children:[],...t};return Object.entries(e[t.type].propSchema).forEach(([o,n])=>{i.props[o]===void 0&&(i.props[o]=n.default)}),{...i,content:ui(i.content),children:i.children.map(o=>Fe(e,o))}}function pi(e){e.id||(e.id=q.options.generateID()),e.children&&hi(e.children)}function hi(e){for(const t of e)pi(t)}d.AudioBlock=mt,d.BlockNoteEditor=ze,d.BlockNoteSchema=he,d.FileBlock=yt,d.FilePanelProsemirrorPlugin=Gt,d.FilePanelView=Kt,d.FormattingToolbarProsemirrorPlugin=$t,d.FormattingToolbarView=qt,d.HTMLToBlocks=De,d.ImageBlock=Ct,d.LinkToolbarProsemirrorPlugin=Zt,d.SideMenuProsemirrorPlugin=ti,d.SideMenuView=Qt,d.SuggestionMenuProseMirrorPlugin=ii,d.TableHandlesProsemirrorPlugin=ri,d.TableHandlesView=ni,d.UniqueID=q,d.UnreachableCaseError=I,d.VideoBlock=Pt,d.addIdsToBlock=pi,d.addIdsToBlocks=hi,d.addInlineContentAttributes=et,d.addInlineContentKeyboardShortcuts=tt,d.addStyleAttributes=at,d.assertEmpty=qi,d.audioBlockConfig=ct,d.audioParse=pt,d.audioPropSchema=dt,d.audioRender=ut,d.audioToExternalHTML=ht,d.blockToNode=N,d.blocksToMarkdown=zt,d.camelToDataKebab=Q,d.checkBlockHasDefaultProp=Po,d.checkBlockIsDefaultType=Ut,d.checkBlockIsFileBlock=Lo,d.checkBlockIsFileBlockWithPlaceholder=Ao,d.checkBlockIsFileBlockWithPreview=Io,d.checkBlockTypeHasDefaultProp=jt,d.checkDefaultBlockTypeInSchema=L,d.checkDefaultInlineContentTypeInSchema=Dt,d.cleanHTMLToMarkdown=ue,d.contentNodeToInlineContent=le,d.createAddFileButton=ie,d.createBlockSpec=ee,d.createBlockSpecFromStronglyTypedTiptapNode=K,d.createDefaultBlockDOMOutputSpec=U,d.createDefaultFilePreview=te,d.createExternalHTMLExporter=Y,d.createFigureWithCaption=ce,d.createFileAndCaptionWrapper=z,d.createInlineContentSpec=Qi,d.createInlineContentSpecFromTipTapNode=ot,d.createInternalBlockSpec=Ee,d.createInternalHTMLSerializer=se,d.createInternalInlineContentSpec=it,d.createInternalStyleSpec=Ce,d.createLinkWithCaption=ne,d.createResizeHandlesWrapper=Be,d.createStronglyTypedTiptapNode=j,d.createStyleSpec=eo,d.createStyleSpecFromTipTapMark=R,d.createSuggestionMenu=Qo,d.defaultBlockSchema=Nt,d.defaultBlockSpecs=Ae,d.defaultBlockToHTML=ye,d.defaultInlineContentSchema=Ht,d.defaultInlineContentSpecs=Ne,d.defaultProps=E,d.defaultStyleSchema=Bo,d.defaultStyleSpecs=Pe,d.fileBlockConfig=gt,d.fileParse=kt,d.filePropSchema=ft,d.fileRender=bt,d.fileToExternalHTML=_t,d.filenameFromURL=Yi,d.filterSuggestionItems=ln,d.formatKeyboardShortcut=H,d.formattingToolbarPluginKey=Wt,d.getBlockFromPos=Ye,d.getBlockNoteExtensions=di,d.getBlockSchemaFromSpecs=xe,d.getCurrentBlockContentType=B,d.getDefaultEmojiPickerItems=Mn,d.getDefaultSlashMenuItems=an,d.getDraggableBlockFromElement=re,d.getInlineContentParseRules=nt,d.getInlineContentSchemaFromSpecs=Se,d.getParseRules=Qe,d.getStyleParseRules=lt,d.getStyleSchemaFromSpecs=Te,d.imageBlockConfig=wt,d.imageParse=xt,d.imagePropSchema=vt,d.imageRender=Et,d.imageToExternalHTML=St,d.inheritedProps=ve,d.initializeESMDependencies=G,d.inlineContentToNodes=F,d.insertOrUpdateBlock=T,d.isAppleOS=Je,d.isLinkInlineContent=fe,d.isPartialLinkInlineContent=ge,d.isSafari=Ji,d.isStyledTextInlineContent=W,d.linkToolbarPluginKey=Xt,d.locales=Fi,d.markdownToBlocks=Ft,d.mergeCSSClasses=D,d.nodeToBlock=S,d.nodeToCustomInlineContent=_e,d.parseEmbedElement=Me,d.parseFigureElement=oe,d.parseImageElement=Le,d.partialBlockToBlockForTesting=Fe,d.partialBlocksToBlocksForTesting=Bn,d.propsToAttributes=we,d.sideMenuPluginKey=ei,d.stylePropsToAttributes=rt,d.tableContentToNodes=ke,d.tableHandlesPluginKey=J,d.uploadToTmpFilesDotOrg_DEV_ONLY=to,d.videoBlockConfig=Bt,d.videoParse=It,d.videoPropSchema=Mt,d.videoRender=Lt,d.videoToExternalHTML=At,d.wrapInBlockStructure=de,Object.defineProperty(d,Symbol.toStringTag,{value:"Module"})});
8
8
  //# sourceMappingURL=blocknote.umd.cjs.map