/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var _=Object.defineProperty;var oe=Object.getOwnPropertyDescriptor;var de=Object.getOwnPropertyNames;var le=Object.prototype.hasOwnProperty;var ue=(b,i)=>{for(var e in i)_(b,e,{get:i[e],enumerable:!0})},me=(b,i,e,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let n of de(i))!le.call(b,n)&&n!==e&&_(b,n,{get:()=>i[n],enumerable:!(t=oe(i,n))||t.enumerable});return b};var ge=b=>me(_({},"__esModule",{value:!0}),b);var fe={};ue(fe,{default:()=>G});module.exports=ge(fe);var x=require("obsidian");var w=require("obsidian");var ne=require("obsidian");var J={commands:{updateAll:"Set feature properties in all files (add or update)",updateAllNoThumbnail:"Set featured images in all files (add or update)",updateFolder:"Set feature properties in current folder (add or update)",updateFolderNoThumbnail:"Set featured images in current folder (add or update)",removeAll:"Remove feature properties in all files",removeAllNoThumbnail:"Remove featured images in all files",cleanupUnused:"Remove unused downloaded images and thumbnails",rerenderThumbnails:"Re-render all resized thumbnails"},settings:{headings:{advanced:"Advanced",localMedia:"Local media",externalMedia:"External media",notebookNavigator:"Notebook Navigator"},items:{showNotifications:{name:"Show notifications",desc:"Show notifications when the featured image is set, updated or removed."},frontmatterProperty:{name:"Frontmatter property",desc:"The name of the frontmatter property to update with the featured image"},thumbnailsFolder:{name:"Thumbnails folder",desc:"Folder for downloaded thumbnails and resized images. Subfolders will be created automatically for different image types."},excludedFolders:{name:"Excluded folders",desc:"Comma separated list of folders to exclude from the featured image plugin."},resizeFeatureImage:{name:"Resize feature image",desc:"Resize feature image for better performance in scrolling lists or plugins like Notebook Navigator."},resizedThumbnailProperty:{name:"Resized thumbnail property name",desc:"The name of the frontmatter property to store the resized thumbnail path.",placeholder:"thumbnail"},maxResizedWidth:{name:"Max resized width",desc:"Maximum width of the resized thumbnail in pixels. Use 0 for no width restriction.",placeholder:"256"},maxResizedHeight:{name:"Max resized height",desc:"Maximum height of the resized thumbnail in pixels. Use 0 for no height restriction.",placeholder:"144"},fillResizedDimensions:{name:"Fill resized dimensions",desc:"When enabled, resized thumbnails will be exactly the size specified by max width and height, maintaining aspect ratio and cropping to fill the dimensions."},verticalAlignment:{name:"Vertical alignment",desc:"Choose the vertical alignment for cropped images.",options:{top:"Top",center:"Center",bottom:"Bottom"}},horizontalAlignment:{name:"Horizontal alignment",desc:"Choose the horizontal alignment for cropped images.",options:{left:"Left",center:"Center",right:"Right"}},showAdvancedSettings:{name:"Show advanced settings",desc:"Toggle to show or hide advanced configuration options"},mediaLinkFormat:{name:"Media link format",desc:"Choose how to format the featured image property in frontmatter."},onlyUpdateExisting:{name:"Only update if frontmatter property exists",desc:"Enable this to only update the frontmatter property if it already exists."},keepEmptyProperty:{name:"Keep empty property",desc:"When enabled, the frontmatter property will be kept but set to an empty string if no featured image is found. When disabled, the property will be removed."},preserveTemplateImages:{name:"Don't clear existing property",desc:"When enabled, keeps the existing featured image property if no image is found in the document. When disabled, clears or removes the property when no image is detected (depending on the 'Keep empty property' setting)."},requireExclamationForYouTube:{name:"Require exclamation mark for YouTube thumbnails",desc:"If enabled, only YouTube links prefixed with an exclamation mark will be considered for thumbnail download."},downloadExternalImages:{name:"Download external images to thumbnails folder",desc:"Store external image links locally. Disable to skip remote images when selecting a featured image."},downloadYoutubeThumbnails:{name:"Download YouTube thumbnails",desc:"Store YouTube thumbnails locally. Disable to skip YouTube links when selecting a featured image."},optimizeNotebookNavigator:{name:"Optimize settings for Notebook Navigator",desc:"Optimizes thumbnail settings for Notebook Navigator and re-renders all resized thumbnails.",action:"Optimize"},captureVideoPoster:{name:"Capture video poster frame",desc:"Create a still image from the first frame of local videos and use it as a featured image."},videoExtensions:{name:"Local video extensions",desc:"Comma-separated list of video file extensions eligible for poster capture.",placeholder:"mp4,mov,m4v,webm"},localImageExtensions:{name:"Local image extensions",desc:"Comma-separated list of image file extensions to search for in documents.",placeholder:"png,jpg,jpeg,gif,webp"},debugMode:{name:"Debug mode",desc:"Enable debug mode to log detailed information to the console."},dryRun:{name:"Dry run",desc:"Enable dry run to prevent any changes from being made to your files."}},info:{rerenderTip:'Tip: After changing alignment or dimension settings, run the command "Re-render all resized thumbnails" from the command palette to update existing thumbnails with the new settings.'}},notices:{updatingAllFiles:"Updating featured images in all files...",updatingFolder:"Updating featured images in current folder...",removingAllImages:"Removing featured images from all files...",cleaningUpUnused:"Cleaning up unused images...",rerenderingThumbnails:"Re-rendering all thumbnails...",completed:"Completed",noActiveFile:"No active file",errorOccurred:"An error occurred",featureSet:"Feature image set",featureUpdated:"Feature image updated",featureRemoved:"Feature image removed",featureUnchanged:"Feature image unchanged",dryRunEnabled:"Dry run enabled - no changes made",filesProcessed:"{count} files processed",imagesDeleted:"{count} images deleted",thumbnailsRerendered:"{count} thumbnails re-rendered"}};var X={commands:{updateAll:"Feature-Eigenschaften in allen Dateien setzen (hinzuf\xFCgen oder aktualisieren)",updateAllNoThumbnail:"Featured Images in allen Dateien setzen (hinzuf\xFCgen oder aktualisieren)",updateFolder:"Feature-Eigenschaften im aktuellen Ordner setzen (hinzuf\xFCgen oder aktualisieren)",updateFolderNoThumbnail:"Featured Images im aktuellen Ordner setzen (hinzuf\xFCgen oder aktualisieren)",removeAll:"Feature-Eigenschaften in allen Dateien entfernen",removeAllNoThumbnail:"Featured Images in allen Dateien entfernen",cleanupUnused:"Ungenutzte heruntergeladene Bilder und Vorschaubilder entfernen",rerenderThumbnails:"Alle verkleinerten Vorschaubilder neu rendern"},settings:{headings:{advanced:"Erweitert",localMedia:"Lokale Medien",externalMedia:"Externe Medien",notebookNavigator:"Notebook Navigator"},items:{showNotifications:{name:"Benachrichtigungen anzeigen",desc:"Benachrichtigungen anzeigen, wenn das Featured Image gesetzt, aktualisiert oder entfernt wird."},frontmatterProperty:{name:"Frontmatter-Eigenschaft",desc:"Der Name der Frontmatter-Eigenschaft, die mit dem Featured Image aktualisiert werden soll"},thumbnailsFolder:{name:"Vorschaubilder-Ordner",desc:"Ordner f\xFCr heruntergeladene Vorschaubilder und verkleinerte Bilder. Unterordner werden automatisch f\xFCr verschiedene Bildtypen erstellt."},excludedFolders:{name:"Ausgeschlossene Ordner",desc:"Kommagetrennte Liste von Ordnern, die vom Featured Image Plugin ausgeschlossen werden sollen."},resizeFeatureImage:{name:"Feature-Bild verkleinern",desc:"Feature-Bild f\xFCr bessere Leistung in scrollenden Listen oder Plugins wie Notebook Navigator verkleinern."},resizedThumbnailProperty:{name:"Name der verkleinerten Vorschaubild-Eigenschaft",desc:"Der Name der Frontmatter-Eigenschaft zum Speichern des verkleinerten Vorschaubild-Pfads.",placeholder:"thumbnail"},maxResizedWidth:{name:"Maximale verkleinerte Breite",desc:"Maximale Breite des verkleinerten Vorschaubilds in Pixeln. 0 f\xFCr keine Breitenbeschr\xE4nkung verwenden.",placeholder:"256"},maxResizedHeight:{name:"Maximale verkleinerte H\xF6he",desc:"Maximale H\xF6he des verkleinerten Vorschaubilds in Pixeln. 0 f\xFCr keine H\xF6henbeschr\xE4nkung verwenden.",placeholder:"144"},fillResizedDimensions:{name:"Verkleinerte Dimensionen ausf\xFCllen",desc:"Wenn aktiviert, haben verkleinerte Vorschaubilder genau die durch maximale Breite und H\xF6he angegebene Gr\xF6\xDFe, wobei das Seitenverh\xE4ltnis beibehalten und zum Ausf\xFCllen der Dimensionen zugeschnitten wird."},verticalAlignment:{name:"Vertikale Ausrichtung",desc:"W\xE4hlen Sie die vertikale Ausrichtung f\xFCr zugeschnittene Bilder.",options:{top:"Oben",center:"Mitte",bottom:"Unten"}},horizontalAlignment:{name:"Horizontale Ausrichtung",desc:"W\xE4hlen Sie die horizontale Ausrichtung f\xFCr zugeschnittene Bilder.",options:{left:"Links",center:"Mitte",right:"Rechts"}},showAdvancedSettings:{name:"Erweiterte Einstellungen anzeigen",desc:"Erweiterte Konfigurationsoptionen ein- oder ausblenden"},mediaLinkFormat:{name:"Medienlink-Format",desc:"W\xE4hlen Sie, wie die Featured Image Eigenschaft im Frontmatter formatiert werden soll."},onlyUpdateExisting:{name:"Nur aktualisieren, wenn Frontmatter-Eigenschaft existiert",desc:"Aktivieren Sie dies, um die Frontmatter-Eigenschaft nur zu aktualisieren, wenn sie bereits existiert."},keepEmptyProperty:{name:"Leere Eigenschaft beibehalten",desc:"Wenn aktiviert, wird die Frontmatter-Eigenschaft beibehalten, aber auf einen leeren String gesetzt, wenn kein Featured Image gefunden wird. Wenn deaktiviert, wird die Eigenschaft entfernt."},preserveTemplateImages:{name:"Bestehende Eigenschaft nicht l\xF6schen",desc:'Wenn aktiviert, wird die bestehende Featured Image Eigenschaft beibehalten, wenn kein Bild im Dokument gefunden wird. Wenn deaktiviert, wird die Eigenschaft gel\xF6scht oder entfernt, wenn kein Bild erkannt wird (abh\xE4ngig von der Einstellung "Leere Eigenschaft beibehalten").'},requireExclamationForYouTube:{name:"Ausrufezeichen f\xFCr YouTube-Vorschaubilder erforderlich",desc:"Wenn aktiviert, werden nur YouTube-Links mit vorangestelltem Ausrufezeichen f\xFCr den Vorschaubild-Download ber\xFCcksichtigt."},downloadExternalImages:{name:"Externe Bilder in den Vorschaubilder-Ordner herunterladen",desc:"Externe Bildlinks lokal speichern. Deaktivieren, um entfernte Bilder bei der Auswahl eines Featured Image zu \xFCberspringen."},downloadYoutubeThumbnails:{name:"YouTube-Vorschaubilder herunterladen",desc:"YouTube-Vorschaubilder lokal speichern. Deaktivieren, um YouTube-Links bei der Auswahl eines Featured Image zu \xFCberspringen."},optimizeNotebookNavigator:{name:"Einstellungen f\xFCr Notebook Navigator optimieren",desc:"Optimiert die Thumbnail-Einstellungen f\xFCr Notebook Navigator und rendert alle verkleinerten Vorschaubilder neu.",action:"Optimieren"},captureVideoPoster:{name:"Video-Posterbild erfassen",desc:"Erstellt aus dem ersten Frame lokaler Videos ein Standbild und nutzt es als Featured Image."},videoExtensions:{name:"Lokale Videoerweiterungen",desc:"Kommagetrennte Liste von Video-Dateierweiterungen, die f\xFCr die Poster-Erstellung verwendet werden k\xF6nnen.",placeholder:"mp4,mov,m4v,webm"},localImageExtensions:{name:"Lokale Bilderweiterungen",desc:"Kommagetrennte Liste von Bilddateierweiterungen, nach denen in Dokumenten gesucht werden soll.",placeholder:"png,jpg,jpeg,gif,webp"},debugMode:{name:"Debug-Modus",desc:"Debug-Modus aktivieren, um detaillierte Informationen in der Konsole zu protokollieren."},dryRun:{name:"Testlauf",desc:"Testlauf aktivieren, um zu verhindern, dass \xC4nderungen an Ihren Dateien vorgenommen werden."}},info:{rerenderTip:'Tipp: Nach dem \xC4ndern der Ausrichtungs- oder Dimensionseinstellungen f\xFChren Sie den Befehl "Alle verkleinerten Vorschaubilder neu rendern" aus der Befehlspalette aus, um vorhandene Vorschaubilder mit den neuen Einstellungen zu aktualisieren.'}},notices:{updatingAllFiles:"Featured Images in allen Dateien werden aktualisiert...",updatingFolder:"Featured Images im aktuellen Ordner werden aktualisiert...",removingAllImages:"Featured Images aus allen Dateien werden entfernt...",cleaningUpUnused:"Ungenutzte Bilder werden bereinigt...",rerenderingThumbnails:"Alle Vorschaubilder werden neu gerendert...",completed:"Abgeschlossen",noActiveFile:"Keine aktive Datei",errorOccurred:"Ein Fehler ist aufgetreten",featureSet:"Feature-Bild gesetzt",featureUpdated:"Feature-Bild aktualisiert",featureRemoved:"Feature-Bild entfernt",featureUnchanged:"Feature-Bild unver\xE4ndert",dryRunEnabled:"Testlauf aktiviert - keine \xC4nderungen vorgenommen",filesProcessed:"{count} Dateien verarbeitet",imagesDeleted:"{count} Bilder gel\xF6scht",thumbnailsRerendered:"{count} Vorschaubilder neu gerendert"}};var Q={commands:{updateAll:"Establecer propiedades de imagen destacada en todos los archivos (agregar o actualizar)",updateAllNoThumbnail:"Establecer im\xE1genes destacadas en todos los archivos (agregar o actualizar)",updateFolder:"Establecer propiedades de imagen destacada en la carpeta actual (agregar o actualizar)",updateFolderNoThumbnail:"Establecer im\xE1genes destacadas en la carpeta actual (agregar o actualizar)",removeAll:"Eliminar propiedades de imagen destacada en todos los archivos",removeAllNoThumbnail:"Eliminar im\xE1genes destacadas en todos los archivos",cleanupUnused:"Eliminar im\xE1genes descargadas y miniaturas no utilizadas",rerenderThumbnails:"Volver a renderizar todas las miniaturas redimensionadas"},settings:{headings:{advanced:"Avanzado",localMedia:"Medios locales",externalMedia:"Medios externos",notebookNavigator:"Notebook Navigator"},items:{showNotifications:{name:"Mostrar notificaciones",desc:"Mostrar notificaciones cuando la imagen destacada se establece, actualiza o elimina."},frontmatterProperty:{name:"Propiedad de frontmatter",desc:"El nombre de la propiedad de frontmatter para actualizar con la imagen destacada"},thumbnailsFolder:{name:"Carpeta de miniaturas",desc:"Carpeta para miniaturas descargadas e im\xE1genes redimensionadas. Se crear\xE1n autom\xE1ticamente subcarpetas para diferentes tipos de im\xE1genes."},excludedFolders:{name:"Carpetas excluidas",desc:"Lista separada por comas de carpetas a excluir del plugin de imagen destacada."},resizeFeatureImage:{name:"Redimensionar imagen destacada",desc:"Redimensionar imagen destacada para mejor rendimiento en listas desplazables o plugins como Notebook Navigator."},resizedThumbnailProperty:{name:"Nombre de propiedad de miniatura redimensionada",desc:"El nombre de la propiedad de frontmatter para almacenar la ruta de la miniatura redimensionada.",placeholder:"thumbnail"},maxResizedWidth:{name:"Ancho m\xE1ximo redimensionado",desc:"Ancho m\xE1ximo de la miniatura redimensionada en p\xEDxeles. Use 0 para sin restricci\xF3n de ancho.",placeholder:"256"},maxResizedHeight:{name:"Altura m\xE1xima redimensionada",desc:"Altura m\xE1xima de la miniatura redimensionada en p\xEDxeles. Use 0 para sin restricci\xF3n de altura.",placeholder:"144"},fillResizedDimensions:{name:"Llenar dimensiones redimensionadas",desc:"Cuando est\xE1 habilitado, las miniaturas redimensionadas tendr\xE1n exactamente el tama\xF1o especificado por el ancho y la altura m\xE1ximos, manteniendo la relaci\xF3n de aspecto y recortando para llenar las dimensiones."},verticalAlignment:{name:"Alineaci\xF3n vertical",desc:"Elija la alineaci\xF3n vertical para im\xE1genes recortadas.",options:{top:"Superior",center:"Centro",bottom:"Inferior"}},horizontalAlignment:{name:"Alineaci\xF3n horizontal",desc:"Elija la alineaci\xF3n horizontal para im\xE1genes recortadas.",options:{left:"Izquierda",center:"Centro",right:"Derecha"}},showAdvancedSettings:{name:"Mostrar configuraci\xF3n avanzada",desc:"Alternar para mostrar u ocultar opciones de configuraci\xF3n avanzada"},mediaLinkFormat:{name:"Formato de enlace de medios",desc:"Elija c\xF3mo formatear la propiedad de imagen destacada en el frontmatter."},onlyUpdateExisting:{name:"Solo actualizar si existe la propiedad de frontmatter",desc:"Habilite esto para actualizar solo la propiedad de frontmatter si ya existe."},keepEmptyProperty:{name:"Mantener propiedad vac\xEDa",desc:"Cuando est\xE1 habilitado, la propiedad de frontmatter se mantendr\xE1 pero se establecer\xE1 en una cadena vac\xEDa si no se encuentra una imagen destacada. Cuando est\xE1 deshabilitado, la propiedad se eliminar\xE1."},preserveTemplateImages:{name:"No borrar propiedad existente",desc:'Cuando est\xE1 habilitado, mantiene la propiedad de imagen destacada existente si no se encuentra ninguna imagen en el documento. Cuando est\xE1 deshabilitado, borra o elimina la propiedad cuando no se detecta ninguna imagen (dependiendo de la configuraci\xF3n "Mantener propiedad vac\xEDa").'},requireExclamationForYouTube:{name:"Requerir signo de exclamaci\xF3n para miniaturas de YouTube",desc:"Si est\xE1 habilitado, solo los enlaces de YouTube con prefijo de signo de exclamaci\xF3n se considerar\xE1n para la descarga de miniaturas."},downloadExternalImages:{name:"Descargar im\xE1genes externas en la carpeta de miniaturas",desc:"Almacenar enlaces de im\xE1genes externas localmente. Deshabilite para omitir im\xE1genes remotas al seleccionar la imagen destacada."},downloadYoutubeThumbnails:{name:"Descargar miniaturas de YouTube",desc:"Almacenar miniaturas de YouTube localmente. Deshabilite para omitir enlaces de YouTube al seleccionar la imagen destacada."},optimizeNotebookNavigator:{name:"Optimizar ajustes para Notebook Navigator",desc:"Optimiza la configuraci\xF3n de miniaturas para Notebook Navigator y vuelve a renderizar todas las miniaturas redimensionadas.",action:"Optimizar"},captureVideoPoster:{name:"Capturar fotograma inicial de video",desc:"Crea una imagen fija del primer fotograma de videos locales y la usa como imagen destacada."},videoExtensions:{name:"Extensiones de video locales",desc:"Lista separada por comas de extensiones de archivo de video elegibles para la captura de fotogramas.",placeholder:"mp4,mov,m4v,webm"},localImageExtensions:{name:"Extensiones de imagen local",desc:"Lista separada por comas de extensiones de archivo de imagen para buscar en documentos.",placeholder:"png,jpg,jpeg,gif,webp"},debugMode:{name:"Modo de depuraci\xF3n",desc:"Habilitar el modo de depuraci\xF3n para registrar informaci\xF3n detallada en la consola."},dryRun:{name:"Ejecuci\xF3n de prueba",desc:"Habilitar la ejecuci\xF3n de prueba para evitar que se realicen cambios en sus archivos."}},info:{rerenderTip:'Consejo: Despu\xE9s de cambiar la configuraci\xF3n de alineaci\xF3n o dimensiones, ejecute el comando "Volver a renderizar todas las miniaturas redimensionadas" desde la paleta de comandos para actualizar las miniaturas existentes con la nueva configuraci\xF3n.'}},notices:{updatingAllFiles:"Actualizando im\xE1genes destacadas en todos los archivos...",updatingFolder:"Actualizando im\xE1genes destacadas en la carpeta actual...",removingAllImages:"Eliminando im\xE1genes destacadas de todos los archivos...",cleaningUpUnused:"Limpiando im\xE1genes no utilizadas...",rerenderingThumbnails:"Volviendo a renderizar todas las miniaturas...",completed:"Completado",noActiveFile:"Sin archivo activo",errorOccurred:"Ocurri\xF3 un error",featureSet:"Imagen destacada establecida",featureUpdated:"Imagen destacada actualizada",featureRemoved:"Imagen destacada eliminada",featureUnchanged:"Imagen destacada sin cambios",dryRunEnabled:"Ejecuci\xF3n de prueba habilitada - no se realizaron cambios",filesProcessed:"{count} archivos procesados",imagesDeleted:"{count} im\xE1genes eliminadas",thumbnailsRerendered:"{count} miniaturas re-renderizadas"}};var ee={commands:{updateAll:"D\xE9finir les propri\xE9t\xE9s d'image vedette dans tous les fichiers (ajouter ou mettre \xE0 jour)",updateAllNoThumbnail:"D\xE9finir les images vedettes dans tous les fichiers (ajouter ou mettre \xE0 jour)",updateFolder:"D\xE9finir les propri\xE9t\xE9s d'image vedette dans le dossier actuel (ajouter ou mettre \xE0 jour)",updateFolderNoThumbnail:"D\xE9finir les images vedettes dans le dossier actuel (ajouter ou mettre \xE0 jour)",removeAll:"Supprimer les propri\xE9t\xE9s d'image vedette dans tous les fichiers",removeAllNoThumbnail:"Supprimer les images vedettes dans tous les fichiers",cleanupUnused:"Supprimer les images t\xE9l\xE9charg\xE9es et miniatures inutilis\xE9es",rerenderThumbnails:"Re-g\xE9n\xE9rer toutes les miniatures redimensionn\xE9es"},settings:{headings:{advanced:"Avanc\xE9",localMedia:"M\xE9dias locaux",externalMedia:"M\xE9dias externes",notebookNavigator:"Notebook Navigator"},items:{showNotifications:{name:"Afficher les notifications",desc:"Afficher les notifications lorsque l'image vedette est d\xE9finie, mise \xE0 jour ou supprim\xE9e."},frontmatterProperty:{name:"Propri\xE9t\xE9 frontmatter",desc:"Le nom de la propri\xE9t\xE9 frontmatter \xE0 mettre \xE0 jour avec l'image vedette"},thumbnailsFolder:{name:"Dossier des miniatures",desc:"Dossier pour les miniatures t\xE9l\xE9charg\xE9es et les images redimensionn\xE9es. Des sous-dossiers seront cr\xE9\xE9s automatiquement pour diff\xE9rents types d'images."},excludedFolders:{name:"Dossiers exclus",desc:"Liste de dossiers s\xE9par\xE9s par des virgules \xE0 exclure du plugin d'image vedette."},resizeFeatureImage:{name:"Redimensionner l'image vedette",desc:"Redimensionner l'image vedette pour de meilleures performances dans les listes d\xE9filantes ou les plugins comme Notebook Navigator."},resizedThumbnailProperty:{name:"Nom de la propri\xE9t\xE9 de miniature redimensionn\xE9e",desc:"Le nom de la propri\xE9t\xE9 frontmatter pour stocker le chemin de la miniature redimensionn\xE9e.",placeholder:"thumbnail"},maxResizedWidth:{name:"Largeur maximale redimensionn\xE9e",desc:"Largeur maximale de la miniature redimensionn\xE9e en pixels. Utilisez 0 pour aucune restriction de largeur.",placeholder:"256"},maxResizedHeight:{name:"Hauteur maximale redimensionn\xE9e",desc:"Hauteur maximale de la miniature redimensionn\xE9e en pixels. Utilisez 0 pour aucune restriction de hauteur.",placeholder:"144"},fillResizedDimensions:{name:"Remplir les dimensions redimensionn\xE9es",desc:"Lorsque activ\xE9, les miniatures redimensionn\xE9es auront exactement la taille sp\xE9cifi\xE9e par la largeur et la hauteur maximales, en maintenant le rapport d'aspect et en recadrant pour remplir les dimensions."},verticalAlignment:{name:"Alignement vertical",desc:"Choisissez l'alignement vertical pour les images recadr\xE9es.",options:{top:"Haut",center:"Centre",bottom:"Bas"}},horizontalAlignment:{name:"Alignement horizontal",desc:"Choisissez l'alignement horizontal pour les images recadr\xE9es.",options:{left:"Gauche",center:"Centre",right:"Droite"}},showAdvancedSettings:{name:"Afficher les param\xE8tres avanc\xE9s",desc:"Basculer pour afficher ou masquer les options de configuration avanc\xE9es"},mediaLinkFormat:{name:"Format de lien m\xE9dia",desc:"Choisissez comment formater la propri\xE9t\xE9 d'image vedette dans le frontmatter."},onlyUpdateExisting:{name:"Mettre \xE0 jour uniquement si la propri\xE9t\xE9 frontmatter existe",desc:"Activez ceci pour mettre \xE0 jour uniquement la propri\xE9t\xE9 frontmatter si elle existe d\xE9j\xE0."},keepEmptyProperty:{name:"Conserver la propri\xE9t\xE9 vide",desc:"Lorsque activ\xE9, la propri\xE9t\xE9 frontmatter sera conserv\xE9e mais d\xE9finie sur une cha\xEEne vide si aucune image vedette n'est trouv\xE9e. Lorsque d\xE9sactiv\xE9, la propri\xE9t\xE9 sera supprim\xE9e."},preserveTemplateImages:{name:"Ne pas effacer la propri\xE9t\xE9 existante",desc:`Lorsque activ\xE9, conserve la propri\xE9t\xE9 d'image vedette existante si aucune image n'est trouv\xE9e dans le document. Lorsque d\xE9sactiv\xE9, efface ou supprime la propri\xE9t\xE9 lorsqu'aucune image n'est d\xE9tect\xE9e (selon le param\xE8tre "Conserver la propri\xE9t\xE9 vide").`},requireExclamationForYouTube:{name:"Exiger un point d'exclamation pour les miniatures YouTube",desc:"Si activ\xE9, seuls les liens YouTube pr\xE9fix\xE9s d'un point d'exclamation seront consid\xE9r\xE9s pour le t\xE9l\xE9chargement de miniatures."},downloadExternalImages:{name:"T\xE9l\xE9charger les images externes dans le dossier des miniatures",desc:"Stocker les liens d'images externes localement. D\xE9sactivez pour ignorer les images distantes lors de la s\xE9lection de l'image vedette."},downloadYoutubeThumbnails:{name:"T\xE9l\xE9charger les miniatures YouTube",desc:"Stocker les miniatures YouTube localement. D\xE9sactivez pour ignorer les liens YouTube lors de la s\xE9lection de l\u2019image vedette."},optimizeNotebookNavigator:{name:"Optimiser pour Notebook Navigator",desc:"Optimise les param\xE8tres de miniature pour Notebook Navigator et re-g\xE9n\xE8re toutes les miniatures redimensionn\xE9es.",action:"Optimiser"},captureVideoPoster:{name:"Capturer une image vid\xE9o",desc:"Cr\xE9e une image fixe \xE0 partir de la premi\xE8re image des vid\xE9os locales et l'utilise comme image vedette."},videoExtensions:{name:"Extensions vid\xE9o locales",desc:"Liste s\xE9par\xE9e par des virgules des extensions vid\xE9o prises en charge pour la capture.",placeholder:"mp4,mov,m4v,webm"},localImageExtensions:{name:"Extensions d'image locales",desc:"Liste d'extensions de fichiers image s\xE9par\xE9es par des virgules \xE0 rechercher dans les documents.",placeholder:"png,jpg,jpeg,gif,webp"},debugMode:{name:"Mode d\xE9bogage",desc:"Activer le mode d\xE9bogage pour enregistrer des informations d\xE9taill\xE9es dans la console."},dryRun:{name:"Ex\xE9cution \xE0 blanc",desc:"Activer l'ex\xE9cution \xE0 blanc pour emp\xEAcher toute modification de vos fichiers."}},info:{rerenderTip:`Astuce : Apr\xE8s avoir modifi\xE9 les param\xE8tres d'alignement ou de dimensions, ex\xE9cutez la commande "Re-g\xE9n\xE9rer toutes les miniatures redimensionn\xE9es" depuis la palette de commandes pour mettre \xE0 jour les miniatures existantes avec les nouveaux param\xE8tres.`}},notices:{updatingAllFiles:"Mise \xE0 jour des images vedettes dans tous les fichiers...",updatingFolder:"Mise \xE0 jour des images vedettes dans le dossier actuel...",removingAllImages:"Suppression des images vedettes de tous les fichiers...",cleaningUpUnused:"Nettoyage des images inutilis\xE9es...",rerenderingThumbnails:"Re-g\xE9n\xE9ration de toutes les miniatures...",completed:"Termin\xE9",noActiveFile:"Aucun fichier actif",errorOccurred:"Une erreur s'est produite",featureSet:"Image vedette d\xE9finie",featureUpdated:"Image vedette mise \xE0 jour",featureRemoved:"Image vedette supprim\xE9e",featureUnchanged:"Image vedette inchang\xE9e",dryRunEnabled:"Ex\xE9cution \xE0 blanc activ\xE9e - aucune modification effectu\xE9e",filesProcessed:"{count} fichiers trait\xE9s",imagesDeleted:"{count} images supprim\xE9es",thumbnailsRerendered:"{count} miniatures re-g\xE9n\xE9r\xE9es"}};var te={commands:{updateAll:"\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\uFF08\u8FFD\u52A0\u307E\u305F\u306F\u66F4\u65B0\uFF09",updateAllNoThumbnail:"\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u8A2D\u5B9A\uFF08\u8FFD\u52A0\u307E\u305F\u306F\u66F4\u65B0\uFF09",updateFolder:"\u73FE\u5728\u306E\u30D5\u30A9\u30EB\u30C0\u306B\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A2D\u5B9A\uFF08\u8FFD\u52A0\u307E\u305F\u306F\u66F4\u65B0\uFF09",updateFolderNoThumbnail:"\u73FE\u5728\u306E\u30D5\u30A9\u30EB\u30C0\u306B\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u8A2D\u5B9A\uFF08\u8FFD\u52A0\u307E\u305F\u306F\u66F4\u65B0\uFF09",removeAll:"\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u524A\u9664",removeAllNoThumbnail:"\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u524A\u9664",cleanupUnused:"\u672A\u4F7F\u7528\u306E\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u753B\u50CF\u3068\u30B5\u30E0\u30CD\u30A4\u30EB\u3092\u524A\u9664",rerenderThumbnails:"\u3059\u3079\u3066\u306E\u30EA\u30B5\u30A4\u30BA\u3055\u308C\u305F\u30B5\u30E0\u30CD\u30A4\u30EB\u3092\u518D\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0"},settings:{headings:{advanced:"\u8A73\u7D30\u8A2D\u5B9A",localMedia:"\u30ED\u30FC\u30AB\u30EB\u30E1\u30C7\u30A3\u30A2",externalMedia:"\u5916\u90E8\u30E1\u30C7\u30A3\u30A2",notebookNavigator:"Notebook Navigator"},items:{showNotifications:{name:"\u901A\u77E5\u3092\u8868\u793A",desc:"\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u304C\u8A2D\u5B9A\u3001\u66F4\u65B0\u3001\u524A\u9664\u3055\u308C\u305F\u3068\u304D\u306B\u901A\u77E5\u3092\u8868\u793A\u3057\u307E\u3059\u3002"},frontmatterProperty:{name:"\u30D5\u30ED\u30F3\u30C8\u30DE\u30BF\u30FC\u30D7\u30ED\u30D1\u30C6\u30A3",desc:"\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3067\u66F4\u65B0\u3059\u308B\u30D5\u30ED\u30F3\u30C8\u30DE\u30BF\u30FC\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u540D\u524D"},thumbnailsFolder:{name:"\u30B5\u30E0\u30CD\u30A4\u30EB\u30D5\u30A9\u30EB\u30C0",desc:"\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u305F\u30B5\u30E0\u30CD\u30A4\u30EB\u3068\u30EA\u30B5\u30A4\u30BA\u3057\u305F\u753B\u50CF\u7528\u306E\u30D5\u30A9\u30EB\u30C0\u3002\u7570\u306A\u308B\u753B\u50CF\u30BF\u30A4\u30D7\u7528\u306E\u30B5\u30D6\u30D5\u30A9\u30EB\u30C0\u304C\u81EA\u52D5\u7684\u306B\u4F5C\u6210\u3055\u308C\u307E\u3059\u3002"},excludedFolders:{name:"\u9664\u5916\u30D5\u30A9\u30EB\u30C0",desc:"\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u30D7\u30E9\u30B0\u30A4\u30F3\u304B\u3089\u9664\u5916\u3059\u308B\u30D5\u30A9\u30EB\u30C0\u306E\u30AB\u30F3\u30DE\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3002"},resizeFeatureImage:{name:"\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u30EA\u30B5\u30A4\u30BA",desc:"\u30B9\u30AF\u30ED\u30FC\u30EB\u30EA\u30B9\u30C8\u3084Notebook Navigator\u306A\u3069\u306E\u30D7\u30E9\u30B0\u30A4\u30F3\u3067\u306E\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u5411\u4E0A\u306E\u305F\u3081\u3001\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u30EA\u30B5\u30A4\u30BA\u3057\u307E\u3059\u3002"},resizedThumbnailProperty:{name:"\u30EA\u30B5\u30A4\u30BA\u3055\u308C\u305F\u30B5\u30E0\u30CD\u30A4\u30EB\u30D7\u30ED\u30D1\u30C6\u30A3\u540D",desc:"\u30EA\u30B5\u30A4\u30BA\u3055\u308C\u305F\u30B5\u30E0\u30CD\u30A4\u30EB\u30D1\u30B9\u3092\u4FDD\u5B58\u3059\u308B\u30D5\u30ED\u30F3\u30C8\u30DE\u30BF\u30FC\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u540D\u524D\u3002",placeholder:"thumbnail"},maxResizedWidth:{name:"\u6700\u5927\u30EA\u30B5\u30A4\u30BA\u5E45",desc:"\u30EA\u30B5\u30A4\u30BA\u3055\u308C\u305F\u30B5\u30E0\u30CD\u30A4\u30EB\u306E\u6700\u5927\u5E45\uFF08\u30D4\u30AF\u30BB\u30EB\uFF09\u3002\u5E45\u5236\u9650\u306A\u3057\u306E\u5834\u5408\u306F0\u3092\u4F7F\u7528\u3002",placeholder:"256"},maxResizedHeight:{name:"\u6700\u5927\u30EA\u30B5\u30A4\u30BA\u9AD8\u3055",desc:"\u30EA\u30B5\u30A4\u30BA\u3055\u308C\u305F\u30B5\u30E0\u30CD\u30A4\u30EB\u306E\u6700\u5927\u9AD8\u3055\uFF08\u30D4\u30AF\u30BB\u30EB\uFF09\u3002\u9AD8\u3055\u5236\u9650\u306A\u3057\u306E\u5834\u5408\u306F0\u3092\u4F7F\u7528\u3002",placeholder:"144"},fillResizedDimensions:{name:"\u30EA\u30B5\u30A4\u30BA\u5BF8\u6CD5\u3092\u6E80\u305F\u3059",desc:"\u6709\u52B9\u306B\u3059\u308B\u3068\u3001\u30EA\u30B5\u30A4\u30BA\u3055\u308C\u305F\u30B5\u30E0\u30CD\u30A4\u30EB\u306F\u6700\u5927\u5E45\u3068\u9AD8\u3055\u3067\u6307\u5B9A\u3055\u308C\u305F\u30B5\u30A4\u30BA\u306B\u306A\u308A\u3001\u30A2\u30B9\u30DA\u30AF\u30C8\u6BD4\u3092\u7DAD\u6301\u3057\u3001\u5BF8\u6CD5\u3092\u6E80\u305F\u3059\u3088\u3046\u306B\u30C8\u30EA\u30DF\u30F3\u30B0\u3055\u308C\u307E\u3059\u3002"},verticalAlignment:{name:"\u5782\u76F4\u65B9\u5411\u306E\u914D\u7F6E",desc:"\u30C8\u30EA\u30DF\u30F3\u30B0\u3055\u308C\u305F\u753B\u50CF\u306E\u5782\u76F4\u65B9\u5411\u306E\u914D\u7F6E\u3092\u9078\u629E\u3057\u307E\u3059\u3002",options:{top:"\u4E0A",center:"\u4E2D\u592E",bottom:"\u4E0B"}},horizontalAlignment:{name:"\u6C34\u5E73\u65B9\u5411\u306E\u914D\u7F6E",desc:"\u30C8\u30EA\u30DF\u30F3\u30B0\u3055\u308C\u305F\u753B\u50CF\u306E\u6C34\u5E73\u65B9\u5411\u306E\u914D\u7F6E\u3092\u9078\u629E\u3057\u307E\u3059\u3002",options:{left:"\u5DE6",center:"\u4E2D\u592E",right:"\u53F3"}},showAdvancedSettings:{name:"\u8A73\u7D30\u8A2D\u5B9A\u3092\u8868\u793A",desc:"\u8A73\u7D30\u306A\u8A2D\u5B9A\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u8868\u793A/\u975E\u8868\u793A\u3092\u5207\u308A\u66FF\u3048"},mediaLinkFormat:{name:"\u30E1\u30C7\u30A3\u30A2\u30EA\u30F3\u30AF\u5F62\u5F0F",desc:"\u30D5\u30ED\u30F3\u30C8\u30DE\u30BF\u30FC\u3067\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3059\u308B\u65B9\u6CD5\u3092\u9078\u629E\u3057\u307E\u3059\u3002"},onlyUpdateExisting:{name:"\u30D5\u30ED\u30F3\u30C8\u30DE\u30BF\u30FC\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u5B58\u5728\u3059\u308B\u5834\u5408\u306E\u307F\u66F4\u65B0",desc:"\u3053\u308C\u3092\u6709\u52B9\u306B\u3059\u308B\u3068\u3001\u30D5\u30ED\u30F3\u30C8\u30DE\u30BF\u30FC\u30D7\u30ED\u30D1\u30C6\u30A3\u304C\u65E2\u306B\u5B58\u5728\u3059\u308B\u5834\u5408\u306E\u307F\u66F4\u65B0\u3055\u308C\u307E\u3059\u3002"},keepEmptyProperty:{name:"\u7A7A\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u4FDD\u6301",desc:"\u6709\u52B9\u306B\u3059\u308B\u3068\u3001\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u304C\u898B\u3064\u304B\u3089\u306A\u3044\u5834\u5408\u3001\u30D5\u30ED\u30F3\u30C8\u30DE\u30BF\u30FC\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u4FDD\u6301\u3055\u308C\u307E\u3059\u304C\u7A7A\u306E\u6587\u5B57\u5217\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\u7121\u52B9\u306B\u3059\u308B\u3068\u3001\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u524A\u9664\u3055\u308C\u307E\u3059\u3002"},preserveTemplateImages:{name:"\u65E2\u5B58\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u30AF\u30EA\u30A2\u3057\u306A\u3044",desc:"\u6709\u52B9\u306B\u3059\u308B\u3068\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u753B\u50CF\u304C\u898B\u3064\u304B\u3089\u306A\u3044\u5834\u5408\u3001\u65E2\u5B58\u306E\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u4FDD\u6301\u3057\u307E\u3059\u3002\u7121\u52B9\u306B\u3059\u308B\u3068\u3001\u753B\u50CF\u304C\u691C\u51FA\u3055\u308C\u306A\u3044\u5834\u5408\u3001\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u30AF\u30EA\u30A2\u307E\u305F\u306F\u524A\u9664\u3057\u307E\u3059\uFF08\u300C\u7A7A\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u4FDD\u6301\u300D\u8A2D\u5B9A\u306B\u4F9D\u5B58\uFF09\u3002"},requireExclamationForYouTube:{name:"YouTube\u30B5\u30E0\u30CD\u30A4\u30EB\u306B\u611F\u5606\u7B26\u304C\u5FC5\u8981",desc:"\u6709\u52B9\u306B\u3059\u308B\u3068\u3001\u611F\u5606\u7B26\u304C\u524D\u306B\u4ED8\u3044\u305FYouTube\u30EA\u30F3\u30AF\u306E\u307F\u304C\u30B5\u30E0\u30CD\u30A4\u30EB\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u306E\u5BFE\u8C61\u3068\u306A\u308A\u307E\u3059\u3002"},downloadExternalImages:{name:"\u5916\u90E8\u753B\u50CF\u3092\u30B5\u30E0\u30CD\u30A4\u30EB\u30D5\u30A9\u30EB\u30C0\u306B\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9",desc:"\u5916\u90E8\u753B\u50CF\u30EA\u30F3\u30AF\u3092\u30ED\u30FC\u30AB\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3059\u3002\u7121\u52B9\u306B\u3059\u308B\u3068\u3001\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u306E\u9078\u629E\u6642\u306B\u30EA\u30E2\u30FC\u30C8\u753B\u50CF\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3059\u3002"},downloadYoutubeThumbnails:{name:"YouTube\u30B5\u30E0\u30CD\u30A4\u30EB\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9",desc:"YouTube\u30B5\u30E0\u30CD\u30A4\u30EB\u3092\u30ED\u30FC\u30AB\u30EB\u306B\u4FDD\u5B58\u3057\u307E\u3059\u3002\u7121\u52B9\u306B\u3059\u308B\u3068\u3001\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u306E\u9078\u629E\u6642\u306BYouTube\u30EA\u30F3\u30AF\u3092\u30B9\u30AD\u30C3\u30D7\u3057\u307E\u3059\u3002"},optimizeNotebookNavigator:{name:"Notebook Navigator\u5411\u3051\u306B\u6700\u9069\u5316",desc:"Notebook Navigator\u5411\u3051\u306B\u30B5\u30E0\u30CD\u30A4\u30EB\u8A2D\u5B9A\u3092\u6700\u9069\u5316\u3057\u3001\u3059\u3079\u3066\u306E\u30EA\u30B5\u30A4\u30BA\u6E08\u307F\u30B5\u30E0\u30CD\u30A4\u30EB\u3092\u518D\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u3057\u307E\u3059\u3002",action:"\u6700\u9069\u5316"},captureVideoPoster:{name:"\u52D5\u753B\u306E\u30DD\u30B9\u30BF\u30FC\u30D5\u30EC\u30FC\u30E0\u3092\u53D6\u5F97",desc:"\u30ED\u30FC\u30AB\u30EB\u52D5\u753B\u306E\u6700\u521D\u306E\u30D5\u30EC\u30FC\u30E0\u304B\u3089\u9759\u6B62\u753B\u3092\u4F5C\u6210\u3057\u3001\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3068\u3057\u3066\u4F7F\u7528\u3057\u307E\u3059\u3002"},videoExtensions:{name:"\u30ED\u30FC\u30AB\u30EB\u52D5\u753B\u62E1\u5F35\u5B50",desc:"\u30DD\u30B9\u30BF\u30FC\u30D5\u30EC\u30FC\u30E0\u306E\u53D6\u5F97\u5BFE\u8C61\u3068\u306A\u308B\u52D5\u753B\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u306E\u30AB\u30F3\u30DE\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3002",placeholder:"mp4,mov,m4v,webm"},localImageExtensions:{name:"\u30ED\u30FC\u30AB\u30EB\u753B\u50CF\u62E1\u5F35\u5B50",desc:"\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067\u691C\u7D22\u3059\u308B\u753B\u50CF\u30D5\u30A1\u30A4\u30EB\u62E1\u5F35\u5B50\u306E\u30AB\u30F3\u30DE\u533A\u5207\u308A\u30EA\u30B9\u30C8\u3002",placeholder:"png,jpg,jpeg,gif,webp"},debugMode:{name:"\u30C7\u30D0\u30C3\u30B0\u30E2\u30FC\u30C9",desc:"\u30C7\u30D0\u30C3\u30B0\u30E2\u30FC\u30C9\u3092\u6709\u52B9\u306B\u3057\u3066\u3001\u30B3\u30F3\u30BD\u30FC\u30EB\u306B\u8A73\u7D30\u60C5\u5831\u3092\u30ED\u30B0\u51FA\u529B\u3057\u307E\u3059\u3002"},dryRun:{name:"\u30C9\u30E9\u30A4\u30E9\u30F3",desc:"\u30C9\u30E9\u30A4\u30E9\u30F3\u3092\u6709\u52B9\u306B\u3057\u3066\u3001\u30D5\u30A1\u30A4\u30EB\u3078\u306E\u5909\u66F4\u3092\u9632\u304E\u307E\u3059\u3002"}},info:{rerenderTip:"\u30D2\u30F3\u30C8\uFF1A\u914D\u7F6E\u3084\u5BF8\u6CD5\u306E\u8A2D\u5B9A\u3092\u5909\u66F4\u3057\u305F\u5F8C\u3001\u30B3\u30DE\u30F3\u30C9\u30D1\u30EC\u30C3\u30C8\u304B\u3089\u300C\u3059\u3079\u3066\u306E\u30EA\u30B5\u30A4\u30BA\u3055\u308C\u305F\u30B5\u30E0\u30CD\u30A4\u30EB\u3092\u518D\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u300D\u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C\u3057\u3066\u3001\u65E2\u5B58\u306E\u30B5\u30E0\u30CD\u30A4\u30EB\u3092\u65B0\u3057\u3044\u8A2D\u5B9A\u3067\u66F4\u65B0\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}},notices:{updatingAllFiles:"\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u306E\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u66F4\u65B0\u4E2D...",updatingFolder:"\u73FE\u5728\u306E\u30D5\u30A9\u30EB\u30C0\u306E\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u66F4\u65B0\u4E2D...",removingAllImages:"\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u524A\u9664\u4E2D...",cleaningUpUnused:"\u672A\u4F7F\u7528\u306E\u753B\u50CF\u3092\u30AF\u30EA\u30FC\u30F3\u30A2\u30C3\u30D7\u4E2D...",rerenderingThumbnails:"\u3059\u3079\u3066\u306E\u30B5\u30E0\u30CD\u30A4\u30EB\u3092\u518D\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u4E2D...",completed:"\u5B8C\u4E86",noActiveFile:"\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093",errorOccurred:"\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F",featureSet:"\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u8A2D\u5B9A\u3057\u307E\u3057\u305F",featureUpdated:"\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u66F4\u65B0\u3057\u307E\u3057\u305F",featureRemoved:"\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u3092\u524A\u9664\u3057\u307E\u3057\u305F",featureUnchanged:"\u30A2\u30A4\u30AD\u30E3\u30C3\u30C1\u753B\u50CF\u306F\u5909\u66F4\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F",dryRunEnabled:"\u30C9\u30E9\u30A4\u30E9\u30F3\u6709\u52B9 - \u5909\u66F4\u306F\u884C\u308F\u308C\u307E\u305B\u3093\u3067\u3057\u305F",filesProcessed:"{count}\u500B\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u51E6\u7406\u3057\u307E\u3057\u305F",imagesDeleted:"{count}\u500B\u306E\u753B\u50CF\u3092\u524A\u9664\u3057\u307E\u3057\u305F",thumbnailsRerendered:"{count}\u500B\u306E\u30B5\u30E0\u30CD\u30A4\u30EB\u3092\u518D\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u3057\u307E\u3057\u305F"}};var ie={commands:{updateAll:"\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u8BBE\u7F6E\u7279\u8272\u56FE\u7247\u5C5E\u6027\uFF08\u6DFB\u52A0\u6216\u66F4\u65B0\uFF09",updateAllNoThumbnail:"\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u8BBE\u7F6E\u7279\u8272\u56FE\u7247\uFF08\u6DFB\u52A0\u6216\u66F4\u65B0\uFF09",updateFolder:"\u5728\u5F53\u524D\u6587\u4EF6\u5939\u4E2D\u8BBE\u7F6E\u7279\u8272\u56FE\u7247\u5C5E\u6027\uFF08\u6DFB\u52A0\u6216\u66F4\u65B0\uFF09",updateFolderNoThumbnail:"\u5728\u5F53\u524D\u6587\u4EF6\u5939\u4E2D\u8BBE\u7F6E\u7279\u8272\u56FE\u7247\uFF08\u6DFB\u52A0\u6216\u66F4\u65B0\uFF09",removeAll:"\u4ECE\u6240\u6709\u6587\u4EF6\u4E2D\u5220\u9664\u7279\u8272\u56FE\u7247\u5C5E\u6027",removeAllNoThumbnail:"\u4ECE\u6240\u6709\u6587\u4EF6\u4E2D\u5220\u9664\u7279\u8272\u56FE\u7247",cleanupUnused:"\u5220\u9664\u672A\u4F7F\u7528\u7684\u4E0B\u8F7D\u56FE\u7247\u548C\u7F29\u7565\u56FE",rerenderThumbnails:"\u91CD\u65B0\u6E32\u67D3\u6240\u6709\u8C03\u6574\u5927\u5C0F\u7684\u7F29\u7565\u56FE"},settings:{headings:{advanced:"\u9AD8\u7EA7",localMedia:"\u672C\u5730\u5A92\u4F53",externalMedia:"\u5916\u90E8\u5A92\u4F53",notebookNavigator:"Notebook Navigator"},items:{showNotifications:{name:"\u663E\u793A\u901A\u77E5",desc:"\u5F53\u7279\u8272\u56FE\u7247\u88AB\u8BBE\u7F6E\u3001\u66F4\u65B0\u6216\u5220\u9664\u65F6\u663E\u793A\u901A\u77E5\u3002"},frontmatterProperty:{name:"Frontmatter \u5C5E\u6027",desc:"\u7528\u7279\u8272\u56FE\u7247\u66F4\u65B0\u7684 frontmatter \u5C5E\u6027\u540D\u79F0"},thumbnailsFolder:{name:"\u7F29\u7565\u56FE\u6587\u4EF6\u5939",desc:"\u7528\u4E8E\u4E0B\u8F7D\u7684\u7F29\u7565\u56FE\u548C\u8C03\u6574\u5927\u5C0F\u7684\u56FE\u7247\u7684\u6587\u4EF6\u5939\u3002\u5C06\u81EA\u52A8\u4E3A\u4E0D\u540C\u7684\u56FE\u7247\u7C7B\u578B\u521B\u5EFA\u5B50\u6587\u4EF6\u5939\u3002"},excludedFolders:{name:"\u6392\u9664\u7684\u6587\u4EF6\u5939",desc:"\u8981\u4ECE\u7279\u8272\u56FE\u7247\u63D2\u4EF6\u4E2D\u6392\u9664\u7684\u6587\u4EF6\u5939\u7684\u9017\u53F7\u5206\u9694\u5217\u8868\u3002"},resizeFeatureImage:{name:"\u8C03\u6574\u7279\u8272\u56FE\u7247\u5927\u5C0F",desc:"\u8C03\u6574\u7279\u8272\u56FE\u7247\u5927\u5C0F\u4EE5\u83B7\u5F97\u66F4\u597D\u7684\u6EDA\u52A8\u5217\u8868\u6216 Notebook Navigator \u7B49\u63D2\u4EF6\u7684\u6027\u80FD\u3002"},resizedThumbnailProperty:{name:"\u8C03\u6574\u5927\u5C0F\u7684\u7F29\u7565\u56FE\u5C5E\u6027\u540D\u79F0",desc:"\u7528\u4E8E\u5B58\u50A8\u8C03\u6574\u5927\u5C0F\u7684\u7F29\u7565\u56FE\u8DEF\u5F84\u7684 frontmatter \u5C5E\u6027\u540D\u79F0\u3002",placeholder:"thumbnail"},maxResizedWidth:{name:"\u6700\u5927\u8C03\u6574\u5BBD\u5EA6",desc:"\u8C03\u6574\u5927\u5C0F\u7684\u7F29\u7565\u56FE\u7684\u6700\u5927\u5BBD\u5EA6\uFF08\u50CF\u7D20\uFF09\u3002\u4F7F\u7528 0 \u8868\u793A\u65E0\u5BBD\u5EA6\u9650\u5236\u3002",placeholder:"256"},maxResizedHeight:{name:"\u6700\u5927\u8C03\u6574\u9AD8\u5EA6",desc:"\u8C03\u6574\u5927\u5C0F\u7684\u7F29\u7565\u56FE\u7684\u6700\u5927\u9AD8\u5EA6\uFF08\u50CF\u7D20\uFF09\u3002\u4F7F\u7528 0 \u8868\u793A\u65E0\u9AD8\u5EA6\u9650\u5236\u3002",placeholder:"144"},fillResizedDimensions:{name:"\u586B\u5145\u8C03\u6574\u540E\u7684\u5C3A\u5BF8",desc:"\u542F\u7528\u540E\uFF0C\u8C03\u6574\u5927\u5C0F\u7684\u7F29\u7565\u56FE\u5C06\u5B8C\u5168\u7B26\u5408\u6700\u5927\u5BBD\u5EA6\u548C\u9AD8\u5EA6\u6307\u5B9A\u7684\u5927\u5C0F\uFF0C\u4FDD\u6301\u7EB5\u6A2A\u6BD4\u5E76\u88C1\u526A\u4EE5\u586B\u5145\u5C3A\u5BF8\u3002"},verticalAlignment:{name:"\u5782\u76F4\u5BF9\u9F50",desc:"\u9009\u62E9\u88C1\u526A\u56FE\u7247\u7684\u5782\u76F4\u5BF9\u9F50\u65B9\u5F0F\u3002",options:{top:"\u9876\u90E8",center:"\u4E2D\u5FC3",bottom:"\u5E95\u90E8"}},horizontalAlignment:{name:"\u6C34\u5E73\u5BF9\u9F50",desc:"\u9009\u62E9\u88C1\u526A\u56FE\u7247\u7684\u6C34\u5E73\u5BF9\u9F50\u65B9\u5F0F\u3002",options:{left:"\u5DE6",center:"\u4E2D\u5FC3",right:"\u53F3"}},showAdvancedSettings:{name:"\u663E\u793A\u9AD8\u7EA7\u8BBE\u7F6E",desc:"\u5207\u6362\u4EE5\u663E\u793A\u6216\u9690\u85CF\u9AD8\u7EA7\u914D\u7F6E\u9009\u9879"},mediaLinkFormat:{name:"\u5A92\u4F53\u94FE\u63A5\u683C\u5F0F",desc:"\u9009\u62E9\u5982\u4F55\u5728 frontmatter \u4E2D\u683C\u5F0F\u5316\u7279\u8272\u56FE\u7247\u5C5E\u6027\u3002"},onlyUpdateExisting:{name:"\u4EC5\u5728 frontmatter \u5C5E\u6027\u5B58\u5728\u65F6\u66F4\u65B0",desc:"\u542F\u7528\u6B64\u9009\u9879\u4EE5\u4EC5\u5728 frontmatter \u5C5E\u6027\u5DF2\u5B58\u5728\u65F6\u66F4\u65B0\u5B83\u3002"},keepEmptyProperty:{name:"\u4FDD\u7559\u7A7A\u5C5E\u6027",desc:"\u542F\u7528\u540E\uFF0C\u5982\u679C\u627E\u4E0D\u5230\u7279\u8272\u56FE\u7247\uFF0Cfrontmatter \u5C5E\u6027\u5C06\u88AB\u4FDD\u7559\u4F46\u8BBE\u7F6E\u4E3A\u7A7A\u5B57\u7B26\u4E32\u3002\u7981\u7528\u540E\uFF0C\u5C5E\u6027\u5C06\u88AB\u5220\u9664\u3002"},preserveTemplateImages:{name:"\u4E0D\u6E05\u9664\u73B0\u6709\u5C5E\u6027",desc:'\u542F\u7528\u540E\uFF0C\u5982\u679C\u5728\u6587\u6863\u4E2D\u627E\u4E0D\u5230\u56FE\u7247\uFF0C\u5219\u4FDD\u7559\u73B0\u6709\u7684\u7279\u8272\u56FE\u7247\u5C5E\u6027\u3002\u7981\u7528\u540E\uFF0C\u5F53\u672A\u68C0\u6D4B\u5230\u56FE\u7247\u65F6\u6E05\u9664\u6216\u5220\u9664\u5C5E\u6027\uFF08\u53D6\u51B3\u4E8E"\u4FDD\u7559\u7A7A\u5C5E\u6027"\u8BBE\u7F6E\uFF09\u3002'},requireExclamationForYouTube:{name:"YouTube \u7F29\u7565\u56FE\u9700\u8981\u611F\u53F9\u53F7",desc:"\u5982\u679C\u542F\u7528\uFF0C\u53EA\u6709\u5E26\u6709\u611F\u53F9\u53F7\u524D\u7F00\u7684 YouTube \u94FE\u63A5\u624D\u4F1A\u88AB\u8003\u8651\u7528\u4E8E\u7F29\u7565\u56FE\u4E0B\u8F7D\u3002"},downloadExternalImages:{name:"\u5C06\u5916\u90E8\u56FE\u7247\u4E0B\u8F7D\u5230\u7F29\u7565\u56FE\u6587\u4EF6\u5939",desc:"\u5C06\u5916\u90E8\u56FE\u7247\u94FE\u63A5\u5B58\u50A8\u5728\u672C\u5730\u3002\u7981\u7528\u540E\uFF0C\u5728\u9009\u62E9\u7279\u8272\u56FE\u7247\u65F6\u8DF3\u8FC7\u8FDC\u7A0B\u56FE\u7247\u3002"},downloadYoutubeThumbnails:{name:"\u4E0B\u8F7D YouTube \u7F29\u7565\u56FE",desc:"\u5C06 YouTube \u7F29\u7565\u56FE\u5B58\u50A8\u5728\u672C\u5730\u3002\u7981\u7528\u540E\uFF0C\u5728\u9009\u62E9\u7279\u8272\u56FE\u7247\u65F6\u8DF3\u8FC7 YouTube \u94FE\u63A5\u3002"},optimizeNotebookNavigator:{name:"\u4E3A Notebook Navigator \u4F18\u5316\u8BBE\u7F6E",desc:"\u4E3A Notebook Navigator \u4F18\u5316\u7F29\u7565\u56FE\u8BBE\u7F6E\uFF0C\u5E76\u91CD\u65B0\u6E32\u67D3\u6240\u6709\u5DF2\u8C03\u6574\u5927\u5C0F\u7684\u7F29\u7565\u56FE\u3002",action:"\u4F18\u5316"},captureVideoPoster:{name:"\u6355\u83B7\u89C6\u9891\u9996\u5E27",desc:"\u4ECE\u672C\u5730\u89C6\u9891\u7684\u7B2C\u4E00\u5E27\u521B\u5EFA\u9759\u6001\u56FE\u50CF\uFF0C\u5E76\u5C06\u5176\u7528\u4F5C\u7279\u8272\u56FE\u7247\u3002"},videoExtensions:{name:"\u672C\u5730\u89C6\u9891\u6269\u5C55\u540D",desc:"\u7528\u4E8E\u6355\u83B7\u9996\u5E27\u7684\u89C6\u9891\u6587\u4EF6\u6269\u5C55\u540D\uFF08\u9017\u53F7\u5206\u9694\uFF09\u3002",placeholder:"mp4,mov,m4v,webm"},localImageExtensions:{name:"\u672C\u5730\u56FE\u7247\u6269\u5C55\u540D",desc:"\u8981\u5728\u6587\u6863\u4E2D\u641C\u7D22\u7684\u56FE\u7247\u6587\u4EF6\u6269\u5C55\u540D\u7684\u9017\u53F7\u5206\u9694\u5217\u8868\u3002",placeholder:"png,jpg,jpeg,gif,webp"},debugMode:{name:"\u8C03\u8BD5\u6A21\u5F0F",desc:"\u542F\u7528\u8C03\u8BD5\u6A21\u5F0F\u4EE5\u5728\u63A7\u5236\u53F0\u4E2D\u8BB0\u5F55\u8BE6\u7EC6\u4FE1\u606F\u3002"},dryRun:{name:"\u8BD5\u8FD0\u884C",desc:"\u542F\u7528\u8BD5\u8FD0\u884C\u4EE5\u9632\u6B62\u5BF9\u6587\u4EF6\u8FDB\u884C\u4EFB\u4F55\u66F4\u6539\u3002"}},info:{rerenderTip:'\u63D0\u793A\uFF1A\u66F4\u6539\u5BF9\u9F50\u6216\u5C3A\u5BF8\u8BBE\u7F6E\u540E\uFF0C\u4ECE\u547D\u4EE4\u9762\u677F\u8FD0\u884C"\u91CD\u65B0\u6E32\u67D3\u6240\u6709\u8C03\u6574\u5927\u5C0F\u7684\u7F29\u7565\u56FE"\u547D\u4EE4\uFF0C\u4EE5\u4F7F\u7528\u65B0\u8BBE\u7F6E\u66F4\u65B0\u73B0\u6709\u7F29\u7565\u56FE\u3002'}},notices:{updatingAllFiles:"\u6B63\u5728\u66F4\u65B0\u6240\u6709\u6587\u4EF6\u4E2D\u7684\u7279\u8272\u56FE\u7247...",updatingFolder:"\u6B63\u5728\u66F4\u65B0\u5F53\u524D\u6587\u4EF6\u5939\u4E2D\u7684\u7279\u8272\u56FE\u7247...",removingAllImages:"\u6B63\u5728\u4ECE\u6240\u6709\u6587\u4EF6\u4E2D\u5220\u9664\u7279\u8272\u56FE\u7247...",cleaningUpUnused:"\u6B63\u5728\u6E05\u7406\u672A\u4F7F\u7528\u7684\u56FE\u7247...",rerenderingThumbnails:"\u6B63\u5728\u91CD\u65B0\u6E32\u67D3\u6240\u6709\u7F29\u7565\u56FE...",completed:"\u5DF2\u5B8C\u6210",noActiveFile:"\u6CA1\u6709\u6D3B\u52A8\u6587\u4EF6",errorOccurred:"\u53D1\u751F\u9519\u8BEF",featureSet:"\u7279\u8272\u56FE\u7247\u5DF2\u8BBE\u7F6E",featureUpdated:"\u7279\u8272\u56FE\u7247\u5DF2\u66F4\u65B0",featureRemoved:"\u7279\u8272\u56FE\u7247\u5DF2\u5220\u9664",featureUnchanged:"\u7279\u8272\u56FE\u7247\u672A\u66F4\u6539",dryRunEnabled:"\u8BD5\u8FD0\u884C\u5DF2\u542F\u7528 - \u672A\u8FDB\u884C\u4EFB\u4F55\u66F4\u6539",filesProcessed:"\u5DF2\u5904\u7406 {count} \u4E2A\u6587\u4EF6",imagesDeleted:"\u5DF2\u5220\u9664 {count} \u4E2A\u56FE\u7247",thumbnailsRerendered:"\u5DF2\u91CD\u65B0\u6E32\u67D3 {count} \u4E2A\u7F29\u7565\u56FE"}};var ae={en:J,de:X,es:Q,fr:ee,ja:te,zh:ie};function ce(){let b=(0,ne.getLanguage)();return b&&b in ae?b:"en"}var d=ae[ce()];var y={showNotificationsOnUpdate:!0,frontmatterProperty:"feature",thumbnailsFolder:"thumbnails",excludedFolders:[],createResizedThumbnail:!0,resizedFrontmatterProperty:"thumbnail",maxResizedWidth:256,maxResizedHeight:144,fillResizedDimensions:!1,resizedVerticalAlign:"top",resizedHorizontalAlign:"center",showAdvancedSettings:!1,mediaLinkFormat:"plain",useMediaLinks:!1,onlyUpdateExisting:!1,keepEmptyProperty:!1,preserveTemplateImages:!1,requireExclamationForYouTube:!0,downloadExternalImages:!0,downloadYoutubeThumbnails:!0,imageExtensions:["png","jpg","jpeg","gif","webp"],captureVideoPoster:!0,videoExtensions:["mp4","mov","m4v","webm"],debugMode:!1,dryRun:!1},M=class extends w.PluginSettingTab{constructor(i,e){super(i,e),this.plugin=e}display(){let{containerEl:i}=this;i.empty();let e,t,n,a,s,r;new w.Setting(i).setName(d.settings.items.showNotifications.name).setDesc(d.settings.items.showNotifications.desc).addToggle(m=>{m.setValue(this.plugin.settings.showNotificationsOnUpdate).onChange(async p=>{this.plugin.settings.showNotificationsOnUpdate=p,await this.plugin.saveSettings()})}),new w.Setting(i).setName(d.settings.items.frontmatterProperty.name).setDesc(d.settings.items.frontmatterProperty.desc).addText(m=>m.setPlaceholder(y.frontmatterProperty).setValue(this.plugin.settings.frontmatterProperty).onChange(async p=>{this.plugin.settings.frontmatterProperty=p,await this.plugin.saveSettings()}));let o=new w.Setting(i).setName(d.settings.items.resizedThumbnailProperty.name).setDesc(d.settings.items.resizedThumbnailProperty.desc).addText(m=>m.setPlaceholder(d.settings.items.resizedThumbnailProperty.placeholder).setValue(this.plugin.settings.resizedFrontmatterProperty).onChange(async p=>{this.plugin.settings.resizedFrontmatterProperty=p||"thumbnail",await this.plugin.saveSettings()}));new w.Setting(i).setName(d.settings.items.thumbnailsFolder.name).setDesc(d.settings.items.thumbnailsFolder.desc).addText(m=>m.setPlaceholder(y.thumbnailsFolder).setValue(this.plugin.settings.thumbnailsFolder).onChange(async p=>{let z=p.trim();z?this.plugin.settings.thumbnailsFolder=z.replace(/\/$/,""):this.plugin.settings.thumbnailsFolder=y.thumbnailsFolder,await this.plugin.saveSettings()})),new w.Setting(i).setName(d.settings.items.excludedFolders.name).setDesc(d.settings.items.excludedFolders.desc).addTextArea(m=>m.setValue(this.plugin.settings.excludedFolders.join(",")).onChange(async p=>{this.plugin.settings.excludedFolders=p.split(",").map(z=>z.trim().replace(/\/$/,"")),await this.plugin.saveSettings()}));let l=new w.Setting(i).setName(d.settings.headings.notebookNavigator).setHeading(),c=new w.Setting(i).setName(d.settings.items.optimizeNotebookNavigator.name).setDesc(d.settings.items.optimizeNotebookNavigator.desc).addButton(m=>m.setButtonText(d.settings.items.optimizeNotebookNavigator.action).setCta().onClick(async()=>{this.plugin.settings.createResizedThumbnail=y.createResizedThumbnail,this.plugin.settings.maxResizedWidth=y.maxResizedWidth,this.plugin.settings.maxResizedHeight=y.maxResizedHeight,this.plugin.settings.fillResizedDimensions=y.fillResizedDimensions,this.plugin.settings.resizedVerticalAlign=y.resizedVerticalAlign,this.plugin.settings.resizedHorizontalAlign=y.resizedHorizontalAlign,await this.plugin.saveSettings(),e.setValue(this.plugin.settings.createResizedThumbnail),t.setValue(String(this.plugin.settings.maxResizedWidth)),n.setValue(String(this.plugin.settings.maxResizedHeight)),a.setValue(this.plugin.settings.fillResizedDimensions),s.setValue(this.plugin.settings.resizedVerticalAlign),r.setValue(this.plugin.settings.resizedHorizontalAlign),U(this.plugin.settings.createResizedThumbnail),S(),await this.plugin.rerenderAllResizedThumbnails()}));new w.Setting(i).setName(d.settings.headings.localMedia).setHeading();let u=i.createDiv("local-media-settings");u.addClass("thumbnail-settings"),new w.Setting(u).setName(d.settings.items.captureVideoPoster.name).setDesc(d.settings.items.captureVideoPoster.desc).addToggle(m=>m.setValue(this.plugin.settings.captureVideoPoster).onChange(async p=>{this.plugin.settings.captureVideoPoster=p,await this.plugin.saveSettings()})),new w.Setting(i).setName(d.settings.headings.externalMedia).setHeading();let g=i.createDiv("external-media-settings");g.addClass("thumbnail-settings"),new w.Setting(g).setName(d.settings.items.downloadExternalImages.name).setDesc(d.settings.items.downloadExternalImages.desc).addToggle(m=>m.setValue(this.plugin.settings.downloadExternalImages).onChange(async p=>{this.plugin.settings.downloadExternalImages=p,await this.plugin.saveSettings()})),new w.Setting(g).setName(d.settings.items.downloadYoutubeThumbnails.name).setDesc(d.settings.items.downloadYoutubeThumbnails.desc).addToggle(m=>m.setValue(this.plugin.settings.downloadYoutubeThumbnails).onChange(async p=>{this.plugin.settings.downloadYoutubeThumbnails=p,await this.plugin.saveSettings()})),new w.Setting(g).setName(d.settings.items.requireExclamationForYouTube.name).setDesc(d.settings.items.requireExclamationForYouTube.desc).addToggle(m=>m.setValue(this.plugin.settings.requireExclamationForYouTube).onChange(async p=>{this.plugin.settings.requireExclamationForYouTube=p,await this.plugin.saveSettings()})),new w.Setting(i).setName(d.settings.headings.advanced).setHeading(),new w.Setting(i).setName(d.settings.items.showAdvancedSettings.name).setDesc(d.settings.items.showAdvancedSettings.desc).addToggle(m=>m.setValue(this.plugin.settings.showAdvancedSettings).onChange(async p=>{this.plugin.settings.showAdvancedSettings=p,await this.plugin.saveSettings(),R(p)}));let f=i.createDiv("advanced-settings");new w.Setting(f).setName(d.settings.items.resizeFeatureImage.name).setDesc(d.settings.items.resizeFeatureImage.desc).addToggle(m=>(e=m).setValue(this.plugin.settings.createResizedThumbnail).onChange(async p=>{this.plugin.settings.createResizedThumbnail=p,await this.plugin.saveSettings(),U(p),S()}));let h=f.createDiv("thumbnail-settings");new w.Setting(h).setName(d.settings.items.maxResizedWidth.name).setDesc(d.settings.items.maxResizedWidth.desc).addText(m=>(t=m).setPlaceholder(String(y.maxResizedWidth)).setValue(String(this.plugin.settings.maxResizedWidth)).onChange(async p=>{let z=parseInt(p,10);this.plugin.settings.maxResizedWidth=Number.isNaN(z)?y.maxResizedWidth:z,await this.plugin.saveSettings(),S()})),new w.Setting(h).setName(d.settings.items.maxResizedHeight.name).setDesc(d.settings.items.maxResizedHeight.desc).addText(m=>(n=m).setPlaceholder(String(y.maxResizedHeight)).setValue(String(this.plugin.settings.maxResizedHeight)).onChange(async p=>{let z=parseInt(p,10);this.plugin.settings.maxResizedHeight=Number.isNaN(z)?y.maxResizedHeight:z,await this.plugin.saveSettings(),S()})),new w.Setting(h).setName(d.settings.items.fillResizedDimensions.name).setDesc(d.settings.items.fillResizedDimensions.desc).addToggle(m=>(a=m).setValue(this.plugin.settings.fillResizedDimensions).onChange(async p=>{this.plugin.settings.fillResizedDimensions=p,await this.plugin.saveSettings(),D(p),S()}));let v=h.createDiv("alignment-settings");new w.Setting(v).setName(d.settings.items.verticalAlignment.name).setDesc(d.settings.items.verticalAlignment.desc).addDropdown(m=>(s=m).addOption("top",d.settings.items.verticalAlignment.options.top).addOption("center",d.settings.items.verticalAlignment.options.center).addOption("bottom",d.settings.items.verticalAlignment.options.bottom).setValue(this.plugin.settings.resizedVerticalAlign).onChange(async p=>{this.plugin.settings.resizedVerticalAlign=p,await this.plugin.saveSettings(),S()})),new w.Setting(v).setName(d.settings.items.horizontalAlignment.name).setDesc(d.settings.items.horizontalAlignment.desc).addDropdown(m=>(r=m).addOption("left",d.settings.items.horizontalAlignment.options.left).addOption("center",d.settings.items.horizontalAlignment.options.center).addOption("right",d.settings.items.horizontalAlignment.options.right).setValue(this.plugin.settings.resizedHorizontalAlign).onChange(async p=>{this.plugin.settings.resizedHorizontalAlign=p,await this.plugin.saveSettings(),S()})),h.createDiv("thumbnail-info").createEl("p",{text:d.settings.info.rerenderTip,cls:"setting-item-description"}),new w.Setting(f).setName(d.settings.items.mediaLinkFormat.name).setDesc(d.settings.items.mediaLinkFormat.desc).addDropdown(m=>m.addOption("plain",`${this.plugin.settings.frontmatterProperty}: image.png`).addOption("wiki",`${this.plugin.settings.frontmatterProperty}: [[image.png]]`).addOption("embed",`${this.plugin.settings.frontmatterProperty}: ![[image.png]]`).setValue(this.plugin.settings.mediaLinkFormat).onChange(async p=>{this.plugin.settings.mediaLinkFormat=p,this.plugin.settings.useMediaLinks=p!=="plain",await this.plugin.saveSettings()})),new w.Setting(f).setName(d.settings.items.onlyUpdateExisting.name).setDesc(d.settings.items.onlyUpdateExisting.desc).addToggle(m=>{m.setValue(this.plugin.settings.onlyUpdateExisting).onChange(async p=>{this.plugin.settings.onlyUpdateExisting=p,await this.plugin.saveSettings()})}),new w.Setting(f).setName(d.settings.items.keepEmptyProperty.name).setDesc(d.settings.items.keepEmptyProperty.desc).addToggle(m=>{m.setValue(this.plugin.settings.keepEmptyProperty).onChange(async p=>{this.plugin.settings.keepEmptyProperty=p,await this.plugin.saveSettings()})}),new w.Setting(f).setName(d.settings.items.preserveTemplateImages.name).setDesc(d.settings.items.preserveTemplateImages.desc).addToggle(m=>{m.setValue(this.plugin.settings.preserveTemplateImages).onChange(async p=>{this.plugin.settings.preserveTemplateImages=p,await this.plugin.saveSettings()})}),new w.Setting(f).setName(d.settings.items.localImageExtensions.name).setDesc(d.settings.items.localImageExtensions.desc).addText(m=>m.setPlaceholder(d.settings.items.localImageExtensions.placeholder).setValue(this.plugin.settings.imageExtensions.join(",")).onChange(async p=>{let z=p.split(",").map(I=>I.trim()).filter(I=>I);z.length===0?this.plugin.settings.imageExtensions=y.imageExtensions:this.plugin.settings.imageExtensions=z,await this.plugin.saveSettings()})),new w.Setting(f).setName(d.settings.items.videoExtensions.name).setDesc(d.settings.items.videoExtensions.desc).addText(m=>m.setPlaceholder(d.settings.items.videoExtensions.placeholder).setValue(this.plugin.settings.videoExtensions.join(",")).onChange(async p=>{let z=p.split(",").map(I=>I.trim()).filter(I=>I);z.length===0?this.plugin.settings.videoExtensions=y.videoExtensions:this.plugin.settings.videoExtensions=z,await this.plugin.saveSettings()})),new w.Setting(f).setName(d.settings.items.debugMode.name).setDesc(d.settings.items.debugMode.desc).addToggle(m=>m.setValue(this.plugin.settings.debugMode).onChange(async p=>{this.plugin.settings.debugMode=p,await this.plugin.saveSettings()})),new w.Setting(f).setName(d.settings.items.dryRun.name).setDesc(d.settings.items.dryRun.desc).addToggle(m=>m.setValue(this.plugin.settings.dryRun).onChange(async p=>{this.plugin.settings.dryRun=p,await this.plugin.saveSettings()}));let T=()=>this.plugin.settings.createResizedThumbnail===y.createResizedThumbnail&&this.plugin.settings.maxResizedWidth===y.maxResizedWidth&&this.plugin.settings.maxResizedHeight===y.maxResizedHeight&&this.plugin.settings.fillResizedDimensions===y.fillResizedDimensions&&this.plugin.settings.resizedVerticalAlign===y.resizedVerticalAlign&&this.plugin.settings.resizedHorizontalAlign===y.resizedHorizontalAlign,R=m=>{f.style.display=m?"block":"none"},U=m=>{o.settingEl.style.display=m?"":"none",h.style.display=m?"block":"none",D(m&&this.plugin.settings.fillResizedDimensions),S()},D=m=>{v.style.display=m?"block":"none"},S=()=>{let m=!T();l.settingEl.style.display=m?"":"none",c.settingEl.style.display=m?"":"none"};R(this.plugin.settings.showAdvancedSettings),U(this.plugin.settings.createResizedThumbnail),D(this.plugin.settings.createResizedThumbnail&&this.plugin.settings.fillResizedDimensions),S()}};var V=require("obsidian"),$=class extends V.Modal{constructor(i,e,t,n,a=!0){super(i),this.title=e,this.message=t,this.onSubmit=n,this.showPreservationNote=a}onOpen(){let{contentEl:i,titleEl:e}=this;e.setText(this.title),i.empty(),i.createEl("p",{text:this.message}),this.showPreservationNote&&i.createEl("div",{cls:"featured-image-info"}).createEl("p",{text:"Note: The original modification dates of all files will be preserved.",cls:"featured-image-info-text"}),new V.Setting(i).addButton(t=>t.setButtonText("Cancel").onClick(()=>{this.close(),this.onSubmit(!1)})).addButton(t=>t.setButtonText("Proceed").setCta().onClick(()=>{this.close(),this.onSubmit(!0)}))}onClose(){let{contentEl:i}=this;i.empty()}};var A=require("obsidian");var O=require("obsidian"),B=b=>b instanceof O.TFile,P=(b,i,e)=>{let t=i.trim(),n=b.metadataCache.getFirstLinkpathDest(t,e.path);if(B(n))return n.path;let a=(0,O.normalizePath)(t),s=b.vault.getAbstractFileByPath(a);if(B(s))return s.path};var E=b=>{try{return new URL(b).protocol==="https:"}catch(i){return!1}};var Y=class{constructor(i,e,t){this.app=i;this.deps=t;this.settings=e,this.compileRegexPatterns()}setSettings(i){this.settings=i,this.compileRegexPatterns()}getFrontmatterImageInfo(i,e){var a;let t=this.app.metadataCache.getFileCache(i),n=(a=t==null?void 0:t.frontmatter)==null?void 0:a[e];return this.parseFrontmatterImage(n,i)}isFrontmatterPathEqual(i,e){if(!(i!=null&&i.rawValue)||!e)return!1;if(E(e))return i.resolvedPath===e;let t=(0,A.normalizePath)(e);return(i.isResolved?i.resolvedPath:(0,A.normalizePath)(i.rawPath))===t}async getFeatureFromDocument(i,e,t){var r,o,l,c,u;let n=i;if(i.startsWith(`--- `)){let g=i.indexOf(` --- `,4);g!==-1&&(n=i.substring(g+5))}let a=n.split(` `),s=this.createCardLinkProcessor(g=>this.processAutoCardLinkImage(g,e));for(let g of a){let f=await s.consume(g);if(f.result!==void 0)return f.result;if(f.handled)continue;let h=this.combinedLineRegex.exec(g);if(h){if((r=h.groups)!=null&&r.youtube){let v=this.getVideoId(h.groups.youtube);if(v){let F=await this.deps.downloadYoutubeThumbnail(v,t);if(F)return F}continue}if((o=h.groups)!=null&&o.wikiImage){let v=decodeURIComponent(h.groups.wikiImage),F=P(this.app,v,e);if(F)return F;this.deps.errorLog(`Local image not found for featured image: ${v} (referenced in ${e.path})`);continue}if((l=h.groups)!=null&&l.mdImage){let v=decodeURIComponent(h.groups.mdImage);if(E(v)){let T=await this.deps.downloadExternalImage(v);if(T)return T;continue}let F=P(this.app,v,e);if(F)return F;this.deps.errorLog(`Local image not found for featured image: ${v} (referenced in ${e.path})`);continue}if((c=h.groups)!=null&&c.wikiVideo){let v=decodeURIComponent(h.groups.wikiVideo),F=P(this.app,v,e);if(F){let T=await this.deps.createVideoPoster(F);if(T)return T}else this.deps.errorLog(`Local video not found for poster capture: ${v} (referenced in ${e.path})`);continue}if((u=h.groups)!=null&&u.mdVideo){let v=decodeURIComponent(h.groups.mdVideo);if(E(v)){this.deps.debugLog("Skipping remote video for poster capture due to CORS limitations:",v);continue}let F=P(this.app,v,e);if(F){let T=await this.deps.createVideoPoster(F);if(T)return T}else this.deps.errorLog(`Local video not found for poster capture: ${v} (referenced in ${e.path})`)}}}if(this.settings.preserveTemplateImages&&t)return this.deps.debugLog("No new image found, preserving existing featured image:",t),t}async collectFileReferences(i,e){var t,n,a,s;try{let r=this.app.metadataCache.getFileCache(i);if(r!=null&&r.frontmatter){let u=r.frontmatter[this.settings.frontmatterProperty];if(u&&this.addNormalizedPath(u,e,i),this.settings.createResizedThumbnail){let g=r.frontmatter[this.settings.resizedFrontmatterProperty];g&&this.addNormalizedPath(g,e,i)}}let l=(await this.app.vault.cachedRead(i)).split(` `),c=this.createCardLinkProcessor(u=>{let g=this.extractAutoCardLinkLocalPath(u);g&&this.addNormalizedPath(g,e,i)});for(let u of l){if((await c.consume(u)).handled)continue;this.combinedLineGlobalRegex.lastIndex=0;let f;for(;(f=this.combinedLineGlobalRegex.exec(u))!==null;){if((t=f.groups)!=null&&t.wikiImage&&this.addNormalizedPath(f.groups.wikiImage,e,i),(n=f.groups)!=null&&n.mdImage){let h=decodeURIComponent(f.groups.mdImage);E(h)||this.addNormalizedPath(h,e,i)}if((a=f.groups)!=null&&a.wikiVideo&&this.addNormalizedPath(f.groups.wikiVideo,e,i),(s=f.groups)!=null&&s.mdVideo){let h=decodeURIComponent(f.groups.mdVideo);E(h)||this.addNormalizedPath(h,e,i)}}}}catch(r){this.deps.errorLog(`Error processing references in ${i.path}:`,r)}}parseFrontmatterImage(i,e){if(typeof i!="string")return;let t=i.trim();if(!t)return;let n=t.match(/!?\[\[(.*?)\]\]/),a=t;n&&(a=n[1]),a=a.split("|")[0].split("#")[0].trim();let s=a,r=!1;if(a)if(E(a))r=!0,s=a;else{let o=P(this.app,a,e);o?(s=(0,A.normalizePath)(o),r=!0):s=(0,A.normalizePath)(a)}return{rawValue:t,rawPath:a,resolvedPath:s,isResolved:r}}async processAutoCardLinkImage(i,e){i=i.trim();let t=this.extractAutoCardLinkLocalPath(i);if(t){let n=P(this.app,t,e);if(!n){this.deps.errorLog(`Local Auto Card Link image not found: ${t} (referenced in ${e.path})`);return}return n}if(!E(i)){this.deps.errorLog("Invalid Auto Card Link URL:",i);return}return await this.deps.downloadExternalImage(i,"autocardlink")}extractAutoCardLinkLocalPath(i){if(!(i.startsWith('"')&&i.endsWith('"')))return;let e=i.slice(1,-1).trim();return e=e.replace(/^\[\[|\]\]$/g,""),e}addNormalizedPath(i,e,t){let n=i,a=i.match(/!?\[\[(.*?)\]\]/);a&&(n=a[1]),n=n.split("|")[0].split("#")[0];let s=P(this.app,n,t);if(s){e.add((0,A.normalizePath)(s));return}e.add((0,A.normalizePath)(n))}compileRegexPatterns(){let i=this.settings.imageExtensions.join("|"),e=this.settings.videoExtensions.length>0?this.settings.videoExtensions.join("|"):"mp4|mov|m4v|webm",t=`!\\[\\[(?[^\\]|#]+\\.(${i}))(?:[#|][^\\]]*)?\\]\\]`,n=`!\\[.*?\\]\\((?(?:https?:\\/\\/(?:[^)(]|\\([^)(]*\\))+|[^)(]+\\.(${i})))\\)`,a=`!\\[\\[(?[^\\]|#]+\\.(${e}))(?:[#|][^\\]]*)?\\]\\]`,s=`!\\[.*?\\]\\((?(?:https?:\\/\\/(?:[^)(]|\\([^)(]*\\))+|[^)(]+\\.(${e})))\\)`,o=[`${this.settings.requireExclamationForYouTube?"!":"!?"}\\[.*?\\]\\((?https?:\\/\\/(?:www\\.)?(?:youtube\\.com|youtu\\.be)\\/\\S+)\\)`,t,n,a,s].join("|");this.combinedLineRegex=new RegExp(o,"i"),this.combinedLineGlobalRegex=new RegExp(o,"gi"),this.autoCardImageRegex=/image:\s*(?.+?)(?:\n|$)/i,this.codeBlockStartRegex=/^[\s]*```[\s]*(\w+)?[\s]*$/}getVideoId(i){try{let e=new URL(i),t=e.hostname.toLowerCase(),n=e.pathname,a=e.searchParams,s=t.replace("m.youtube.com","youtube.com");if(t.includes("youtu.be"))return n.slice(1);if(s.includes("youtube.com")){if(n==="/watch")return a.get("v");if(n.startsWith("/embed/")||n.startsWith("/v/")||n.startsWith("/shorts/"))return n.split("/")[2];if(n==="/playlist")return a.get("v")}return null}catch(e){return this.deps.errorLog("Invalid YouTube URL:",i),null}}createCardLinkProcessor(i){let e=!1,t="",n="";return{consume:async a=>{var r,o;let s=this.codeBlockStartRegex.exec(a);if(s){if(!e)return e=!0,t=(s[1]||"").toLowerCase(),n="",{handled:!0};if(t==="cardlink"){let l=this.autoCardImageRegex.exec(n),c=(o=(r=l==null?void 0:l.groups)==null?void 0:r.autoCardImage)==null?void 0:o.trim();if(e=!1,t="",n="",c){let u=await i(c);if(u!==void 0)return{handled:!0,result:u}}return{handled:!0}}return e=!1,t="",n="",{handled:!0}}return e&&t==="cardlink"?(n+=`${a} `,{handled:!0}):{handled:!1}}}}};var L=require("obsidian");var se=require("crypto"),N=b=>(0,se.createHash)("md5").update(b).digest("hex");var H=class{constructor(i,e,t){this.app=i;this.deps=t;this.settings=e,this.canvas=e.createResizedThumbnail?document.createElement("canvas"):null}setSettings(i){this.settings=i,i.createResizedThumbnail&&!this.canvas?this.canvas=document.createElement("canvas"):i.createResizedThumbnail||(this.canvas=null)}async createThumbnail(i){if(!(!this.settings.createResizedThumbnail||this.settings.maxResizedWidth===0&&this.settings.maxResizedHeight===0))try{if(!await this.app.vault.adapter.exists(i)){this.deps.errorLog("Source image not found:",i);return}let e=N(`${this.settings.maxResizedWidth}_${this.settings.maxResizedHeight}_${this.settings.fillResizedDimensions}`).substring(0,8),n=`${N(i)}_${e}`,a=(0,L.normalizePath)(`${this.settings.thumbnailsFolder}/resized`),s=`${a}/${n}.webp`;if(await this.app.vault.adapter.exists(s))return this.deps.debugLog("Resized thumbnail already exists:",s),s;if(this.settings.dryRun)return this.deps.debugLog("Dry run: Skipping thumbnail creation, using mock path"),s;await this.app.vault.adapter.exists(a)||await this.app.vault.adapter.mkdir(a);let r=await this.app.vault.adapter.readBinary(i),o=new Blob([r]),l=URL.createObjectURL(o);try{let c=await this.loadImage(l),{width:u,height:g}=this.calculateThumbnailDimensions(c.width,c.height,this.settings.maxResizedWidth,this.settings.maxResizedHeight,this.settings.fillResizedDimensions),f=await this.resizeImage(c,u,g,this.settings.fillResizedDimensions);return await this.app.vault.adapter.writeBinary(s,f),s}finally{URL.revokeObjectURL(l)}}catch(e){this.deps.errorLog("Error creating thumbnail:",e);return}}async deleteOrphanedThumbnail(i,e){if(!i)return;let t=(0,L.normalizePath)(i),n=(0,L.normalizePath)(`${this.settings.thumbnailsFolder}/resized`);if(!t.startsWith(n)||!await this.app.vault.adapter.exists(i))return;if(!await this.isThumbnailUsedElsewhere(i,e)){let s=this.app.vault.getAbstractFileByPath((0,L.normalizePath)(i));if(s instanceof L.TFile)try{await this.app.fileManager.trashFile(s),this.deps.debugLog("Deleted orphaned thumbnail:",i)}catch(r){this.deps.errorLog("Failed to delete orphaned thumbnail:",i,r)}else this.deps.debugLog("Thumbnail not found when attempting to trash:",i)}}loadImage(i){return new Promise((e,t)=>{let n=new Image;n.onload=()=>e(n),n.onerror=a=>t(a),n.src=i})}calculateThumbnailDimensions(i,e,t,n,a){let s=i,r=e;if(t===0&&n===0)return{width:s,height:r};if(a&&t>0&&n>0)return{width:t,height:n};let o=i/e;return t>0&&n>0?(i>t||e>n)&&(t/n>o?(r=n,s=Math.round(r*o)):(s=t,r=Math.round(s/o))):t>0?i>t&&(s=t,r=Math.round(s/o)):n>0&&e>n&&(r=n,s=Math.round(r*o)),{width:s,height:r}}async resizeImage(i,e,t,n){let a=this.ensureCanvas(),s=a.getContext("2d");if(!s)throw new Error("Failed to get 2D context for thumbnail resize");a.width=e,a.height=t;let r=0,o=0,l=i.width,c=i.height;if(n&&e>0&&t>0){let u=i.width/i.height,g=e/t;if(u>g)switch(l=i.height*g,this.settings.resizedHorizontalAlign){case"left":r=0;break;case"right":r=i.width-l;break;case"center":default:r=(i.width-l)/2;break}else if(u{a.toBlob(f=>{if(!f){g(new Error("Failed to create blob from canvas"));return}let h=new FileReader;h.onloadend=()=>{h.result instanceof ArrayBuffer?u(h.result):g(new Error("Failed to convert blob to array buffer"))},h.onerror=g,h.readAsArrayBuffer(f)},"image/webp",.85)})}ensureCanvas(){return this.canvas||(this.canvas=document.createElement("canvas")),this.canvas}async isThumbnailUsedElsewhere(i,e){if(!i)return!1;let t=(0,L.normalizePath)(i),n=this.app.vault.getMarkdownFiles();for(let a of n){if(e&&a.path===e.path)continue;let s=this.app.metadataCache.getFileCache(a);if(s!=null&&s.frontmatter){let r=s.frontmatter[this.settings.resizedFrontmatterProperty];if(r){let o=r.match(/!?\[\[(.*?)\]\]/),l=o?o[1]:r;if((0,L.normalizePath)(l)===t)return!0}}}return!1}};var K=require("obsidian");var pe=200*1024*1024,j=class{constructor(i,e,t){this.app=i;this.deps=t;this.canvas=null;this.settings=e}setSettings(i){this.settings=i}async createPoster(i){if(!this.settings.captureVideoPoster)return;let e=this.getMimeType(i.extension);if(!e){this.deps.errorLog("Unsupported video format for poster capture:",i.extension);return}let t=(0,K.normalizePath)(i.path),n=(0,K.normalizePath)(`${this.settings.thumbnailsFolder}/video`),a=`${t}:${i.stat.mtime}:${i.stat.size}`,s=`${N(a)}.webp`,r=`${n}/${s}`;if(await this.app.vault.adapter.exists(r))return r;if(this.settings.dryRun)return this.deps.debugLog("Dry run: Skipping video poster capture, returning mock path for",t),r;try{if(await this.app.vault.adapter.exists(n)||await this.app.vault.adapter.mkdir(n),i.stat.size>pe){this.deps.debugLog("Skipping video poster capture for large video (>200MB):",t,`(${i.stat.size} bytes)`);return}let o=this.app.vault.getResourcePath(i),l,c;if(o)this.deps.debugLog("Streaming video poster capture via resource path:",t),l=o;else{this.deps.debugLog("Loading video into memory for poster capture:",t,`(${i.stat.size} bytes)`);let u=await this.app.vault.adapter.readBinary(t),g=new Blob([u],{type:e});l=URL.createObjectURL(g),c=()=>URL.revokeObjectURL(l)}try{let u=await this.loadVideo(l);try{let g=await this.captureFrame(u);return await this.app.vault.adapter.writeBinary(r,g),this.deps.debugLog("Captured video poster frame for",t,"->",r),r}finally{u.pause(),u.removeAttribute("src"),u.load(),u.remove()}}finally{c==null||c()}}catch(o){this.deps.errorLog("Failed to capture video poster for",t,o);return}}ensureCanvas(){return this.canvas||(this.canvas=document.createElement("canvas")),this.canvas}async loadVideo(i){return await new Promise((e,t)=>{let n=document.createElement("video");n.preload="metadata",n.crossOrigin="anonymous",n.muted=!0,n.playsInline=!0;let a=()=>{n.removeEventListener("loadeddata",s),n.removeEventListener("error",r)},s=()=>{a(),e(n)},r=()=>{a();let o=n.error;t(o?new Error(`Video failed to load (code ${o.code})`):new Error("Video failed to load"))};n.addEventListener("loadeddata",s,{once:!0}),n.addEventListener("error",r,{once:!0}),n.src=i,n.load()})}async captureFrame(i){if(!i.videoWidth||!i.videoHeight)throw new Error("Video has no dimensions");let e=this.ensureCanvas();e.width=i.videoWidth,e.height=i.videoHeight;let t=e.getContext("2d");if(!t)throw new Error("Failed to obtain 2D context for video capture");return t.drawImage(i,0,0,e.width,e.height),await new Promise((n,a)=>{e.toBlob(s=>{if(!s){a(new Error("Failed to create blob from video frame"));return}let r=new FileReader;r.onloadend=()=>{r.result instanceof ArrayBuffer?n(r.result):a(new Error("Failed to convert video frame blob to array buffer"))},r.onerror=a,r.readAsArrayBuffer(s)},"image/webp",.9)})}getMimeType(i){let e=i.toLowerCase();return{mp4:"video/mp4",m4v:"video/mp4",mov:"video/quicktime",webm:"video/webm",mkv:"video/x-matroska"}[e]}};var k=require("obsidian"),W=class{constructor(i,e,t){this.app=i;this.deps=t;this.settings=e}setSettings(i){this.settings=i}async cleanupUnusedImages(i){this.deps.debugLog("Starting cleanup of unused images"),new k.Notice("Scanning for unused images...");let e=0,t=0,n=0,a=0,s=0,r=new Set,o=new Set,l=new Set,c=new Set,u=new Set,g=new Set;try{await this.collectImageFiles(r,o,l,c,u),this.deps.debugLog(`Collected image files: - External: ${r.size} - YouTube: ${o.size} - Auto Card: ${l.size} - Resized Thumbnails: ${c.size} - Video Posters: ${u.size}`),await this.buildReferenceMap(g),this.deps.debugLog(`Found ${g.size} unique file references in notes`);let f=this.findUnusedFiles(r,g),h=this.findUnusedFiles(o,g),v=this.findUnusedFiles(l,g),F=this.findUnusedFiles(c,g),T=this.findUnusedFiles(u,g);e=f.size,t=h.size,n=v.size,a=F.size,s=T.size,this.deps.debugLog(`Unused images detected: - External: ${e} - YouTube: ${t} - Auto Card: ${n} - Resized Thumbnails: ${a} - Video Posters: ${s}`);let R=e+t+n+a+s;if(R===0){new k.Notice("No unused images found.");return}if(!await i("Remove unused images",`Found ${R} unused images. Do you want to delete these files?`,!1)){new k.Notice("Cleanup cancelled.");return}if(this.settings.dryRun){this.deps.debugLog("Dry run: Would delete unused files"),new k.Notice(`Dry run: Would delete ${R} unused files.`);return}new k.Notice(`Deleting ${R} unused files...`);let D=[...f,...h,...v,...F,...T],S=await this.calculateFileSizes(D),m=await this.deleteUnusedFiles(D),p=(S/(1024*1024)).toFixed(2);new k.Notice(`Cleanup complete. Deleted ${m} unused files (${p} MB).`)}catch(f){this.deps.errorLog("Error during image cleanup:",f),new k.Notice("Error during image cleanup. Check console for details.")}}async rerenderAllResizedThumbnails(i){if(!this.settings.createResizedThumbnail){new k.Notice("Resized thumbnails are not enabled in settings.");return}if(!await i.confirm("Re-render all resized thumbnails","This will re-render all resized thumbnails based on your current settings (size, alignment, etc.). This operation may take some time depending on the number of images. Proceed?"))return;if(!this.deps.thumbnailService){this.deps.errorLog("Thumbnail service not initialized, unable to re-render thumbnails.");return}i.startBulkUpdate(),new k.Notice(`Starting ${this.settings.dryRun?"dry run of ":""}re-rendering of all resized thumbnails...`);let t=this.app.vault.getMarkdownFiles(),n=0,a=0,s=0,r=Date.now();try{let o=[];for(let u of t){let g=i.getFeatureFromFrontmatter(u);g&&(o.push({file:u,feature:g}),n++)}let l=(0,k.normalizePath)(`${this.settings.thumbnailsFolder}/resized`);if(await this.app.vault.adapter.exists(l))try{let u=await this.app.vault.adapter.list(l);if(!this.settings.dryRun)for(let g of u.files)await this.deps.trashFileAtPath(g);this.deps.debugLog(`Cleared ${u.files.length} existing thumbnails from ${l}`)}catch(u){this.deps.errorLog(`Error accessing resized folder: ${l}`,u)}let c=5;for(let u=0;u{try{let R=await this.deps.thumbnailService.createThumbnail(T);return R?(await i.updateFrontmatter(F,T,R),this.deps.debugLog(`THUMBNAIL UPDATED - File: ${F.path} - Feature: ${T} - New thumbnail: ${R}`),!0):!1}catch(R){return this.deps.errorLog(`Error re-rendering thumbnail for ${F.path}:`,R),!1}})),h=f.filter(F=>F).length;a+=h,s+=f.length-h;let v=Date.now();if(v-r>=5e3){let T=`Re-rendering thumbnails: ${Math.min(u+g.length,n)}/${n} processed. Updated: ${a}`;s>0&&(T+=`. Errors: ${s}`),new k.Notice(T),r=v}}}finally{i.endBulkUpdate();let o=`Re-rendering complete. ${a} thumbnails were updated`;s>0&&(o+=`. There were ${s} errors.`),new k.Notice(o)}}async collectImageFiles(i,e,t,n,a){let s=(0,k.normalizePath)(this.settings.thumbnailsFolder);if(!await this.app.vault.adapter.exists(s)){this.deps.debugLog(`Thumbnail folder ${s} does not exist`);return}let r=`${s}/external`,o=`${s}/youtube`,l=`${s}/autocardlink`,c=`${s}/resized`,u=`${s}/video`;await this.app.vault.adapter.exists(r)&&await this.collectFilesInFolder(r,i,".failed.png"),await this.app.vault.adapter.exists(o)&&await this.collectFilesInFolder(o,e,".failed.png"),await this.app.vault.adapter.exists(l)&&await this.collectFilesInFolder(l,t,".failed.png"),await this.app.vault.adapter.exists(c)&&await this.collectFilesInFolder(c,n,".failed.png"),await this.app.vault.adapter.exists(u)&&await this.collectFilesInFolder(u,a)}async collectFilesInFolder(i,e,t=null){try{let n=await this.app.vault.adapter.list(i);for(let a of n.files)t&&a.endsWith(t)||e.add((0,k.normalizePath)(a));for(let a of n.folders)await this.collectFilesInFolder(a,e,t)}catch(n){this.deps.errorLog(`Error collecting files in ${i}:`,n)}}async buildReferenceMap(i){let e=this.app.vault.getMarkdownFiles();for(let t of e)await this.deps.featureScanner.collectFileReferences(t,i)}findUnusedFiles(i,e){let t=new Set;for(let n of i)this.isFileReferenced(n,e)||t.add(n);return t}isFileReferenced(i,e){if(e.has(i))return!0;let t=i.split("/").pop()||"";for(let n of e){let a=n.split("/").pop()||"";if(t===a)return!0}return!1}async calculateFileSizes(i){let e=0;for(let t of i)try{let n=await this.app.vault.adapter.stat(t);n&&(e+=n.size)}catch(n){this.deps.errorLog(`Error getting file size for ${t}:`,n)}return e}async deleteUnusedFiles(i){let e=0;for(let t of i)await this.deps.trashFileAtPath(t)&&e++;return this.deps.debugLog(`Deleted ${e} unused files`),e}};var q=b=>b?(...i)=>{let e=new Date().toTimeString().split(" ")[0];console.log(`${e}`,...i)}:()=>{},re=()=>(...b)=>{let i=new Date().toTimeString().split(" ")[0];console.error(`${i}`,...b)};var he=(b,i)=>{switch(i){case"wiki":return`[[${b}]]`;case"embed":return`![[${b}]]`;case"plain":default:return b}},Z=(b,i)=>{let{property:e,value:t,format:n,keepEmpty:a}=i;if(t){b[e]=he(t,n);return}a?b[e]="":delete b[e]};var C=class C extends x.Plugin{constructor(){super(...arguments);this.isRunningBulkUpdate=!1;this.updatingFiles=new Set;this.debugLogger=q(!1);this.errorLogger=re()}async onload(){await this.loadSettings(),this.debugLog("Plugin loaded, debug mode:",this.settings.debugMode,"dry run:",this.settings.dryRun),this.thumbnailService=new H(this.app,this.settings,{debugLog:this.debugLog.bind(this),errorLog:this.errorLog.bind(this)}),this.videoFrameService=new j(this.app,this.settings,{debugLog:this.debugLog.bind(this),errorLog:this.errorLog.bind(this)}),this.featureScanner=new Y(this.app,this.settings,{downloadExternalImage:this.downloadExternalImage.bind(this),downloadYoutubeThumbnail:this.downloadThumbnail.bind(this),createVideoPoster:this.createVideoPoster.bind(this),debugLog:this.debugLog.bind(this),errorLog:this.errorLog.bind(this)}),this.imageMaintenance=new W(this.app,this.settings,{featureScanner:this.featureScanner,thumbnailService:this.thumbnailService,debugLog:this.debugLog.bind(this),errorLog:this.errorLog.bind(this),trashFileAtPath:this.trashFileAtPath.bind(this)}),this.addCommand({id:"update-all",name:this.settings.createResizedThumbnail&&this.settings.resizedFrontmatterProperty?d.commands.updateAll:d.commands.updateAllNoThumbnail,callback:()=>this.updateAllFeaturedImages()}),this.addCommand({id:"update-folder",name:this.settings.createResizedThumbnail&&this.settings.resizedFrontmatterProperty?d.commands.updateFolder:d.commands.updateFolderNoThumbnail,callback:()=>this.updateFolderFeaturedImages()}),this.addCommand({id:"remove-all",name:this.settings.createResizedThumbnail&&this.settings.resizedFrontmatterProperty?d.commands.removeAll:d.commands.removeAllNoThumbnail,callback:()=>this.removeAllFeaturedImages()}),this.addCommand({id:"cleanup-unused",name:d.commands.cleanupUnused,callback:()=>this.cleanupUnusedImages()}),this.addCommand({id:"rerender-thumbnails",name:d.commands.rerenderThumbnails,callback:()=>this.rerenderAllResizedThumbnails()}),this.registerEvent(this.app.metadataCache.on("changed",e=>{e instanceof x.TFile&&e.extension==="md"&&!this.updatingFiles.has(e.path)&&!this.isRunningBulkUpdate&&this.setFeaturedImage(e)})),this.registerEvent(this.app.vault.on("rename",(e,t)=>{this.handleFileRename(e,t)})),this.addSettingTab(new M(this.app,this))}debugLog(...e){this.settings.debugMode&&this.debugLogger(...e)}errorLog(...e){this.errorLogger(...e)}isTFile(e){return B(e)}onunload(){}async loadSettings(){this.settings={...y,...await this.loadData()},this.debugLogger=q(this.settings.debugMode),this.featureScanner&&this.featureScanner.setSettings(this.settings),this.thumbnailService&&this.thumbnailService.setSettings(this.settings),this.videoFrameService&&this.videoFrameService.setSettings(this.settings),this.imageMaintenance&&this.imageMaintenance.setSettings(this.settings),this.settings.useMediaLinks&&this.settings.mediaLinkFormat==="plain"&&(this.settings.mediaLinkFormat="embed",await this.saveData(this.settings))}async saveSettings(){await this.saveData(this.settings),this.debugLogger=q(this.settings.debugMode),this.featureScanner&&this.featureScanner.setSettings(this.settings),this.thumbnailService&&this.thumbnailService.setSettings(this.settings),this.videoFrameService&&this.videoFrameService.setSettings(this.settings),this.imageMaintenance&&this.imageMaintenance.setSettings(this.settings)}async setFeaturedImage(e){if(!this.featureScanner)return this.errorLog("Feature scanner not initialized, skipping featured image update for",e.path),!1;if(!this.thumbnailService)return this.errorLog("Thumbnail service not initialized, skipping featured image update for",e.path),!1;let t=this.featureScanner.getFrontmatterImageInfo(e,this.settings.frontmatterProperty),n=t==null?void 0:t.resolvedPath,a=this.settings.createResizedThumbnail?this.featureScanner.getFrontmatterImageInfo(e,this.settings.resizedFrontmatterProperty):void 0,s=a==null?void 0:a.resolvedPath;if(this.shouldSkipProcessing(e))return!1;let r=await this.app.vault.cachedRead(e),o=await this.featureScanner.getFeatureFromDocument(r,e,n),l=s,c;o&&o!==n&&this.settings.createResizedThumbnail?(l=await this.thumbnailService.createThumbnail(o),this.debugLog(`THUMBNAIL GENERATED - File: ${e.path} - Original: ${o} - Thumbnail: ${l}`),s&&s!==l&&(c=s)):o||(l=void 0,s&&(c=s));let u=o&&!this.isValidUrl(o)?(0,x.normalizePath)(o):o;l=l&&!this.isValidUrl(l)?(0,x.normalizePath)(l):l;let f=u?!this.featureScanner.isFrontmatterPathEqual(t,u):!!(t!=null&&t.rawValue),h=l?!this.featureScanner.isFrontmatterPathEqual(a,l):!!(a!=null&&a.rawValue);return f||h?(await this.updateFrontmatter(e,u,l),c&&await this.thumbnailService.deleteOrphanedThumbnail(c,e),this.debugLog(`FEATURE UPDATED - File: ${e.path} - Current feature: ${n} - New feature: ${u} - Thumbnail: ${l}`),!0):!1}getFeatureFromFrontmatter(e){if(!this.featureScanner)return;let t=this.featureScanner.getFrontmatterImageInfo(e,this.settings.frontmatterProperty);return t==null?void 0:t.resolvedPath}getThumbnailFromFrontmatter(e){if(!this.settings.createResizedThumbnail||!this.featureScanner)return;let t=this.featureScanner.getFrontmatterImageInfo(e,this.settings.resizedFrontmatterProperty);return t==null?void 0:t.resolvedPath}shouldSkipProcessing(e){var o,l;let t=this.app.metadataCache.getFileCache(e);if(((l=(o=t==null?void 0:t.frontmatter)==null?void 0:o.tags)!=null?l:[]).includes("excalidraw"))return!0;let a=this.settings.frontmatterProperty in((t==null?void 0:t.frontmatter)||{}),s=this.settings.excludedFolders.some(c=>e.path.startsWith(`${c}/`));return this.settings.onlyUpdateExisting&&!a||s}handleFileRename(e,t){if(this.debugLog("Rename detected:",t,"->",e==null?void 0:e.path),!(!this.isTFile(e)||this.isRunningBulkUpdate)){if(e.extension==="md"){this.scheduleNoteRefreshAfterRename(e);return}this.isManagedImageFile(e)&&this.scheduleImageReferenceRefresh(e,t)}}scheduleNoteRefreshAfterRename(e){window.setTimeout(()=>{if(this.updatingFiles.has(e.path)||this.isRunningBulkUpdate){this.debugLog("Skipping rename refresh for note, plugin already updating:",e.path);return}this.debugLog("Refreshing featured image after note rename:",e.path),this.setFeaturedImage(e)},C.FILE_OPERATION_DELAY)}scheduleImageReferenceRefresh(e,t){let n=(0,x.normalizePath)(t);window.setTimeout(()=>{this.refreshImageReferences(e.path,n)},C.FILE_OPERATION_DELAY)}async refreshImageReferences(e,t){if(this.isRunningBulkUpdate){this.debugLog("Skipping asset rename refresh during bulk update:",e);return}let n=new Set([(0,x.normalizePath)(e)]);t&&n.add((0,x.normalizePath)(t));let a=this.getMarkdownFilesReferencingPaths(n);if(a.size===0){this.debugLog("No markdown files reference renamed asset:",e);return}this.debugLog(`Refreshing featured images for ${a.size} notes referencing renamed asset:`,Array.from(a));for(let s of a){let r=this.app.vault.getAbstractFileByPath(s);if(!(!this.isTFile(r)||r.extension!=="md")){if(this.updatingFiles.has(r.path)){this.debugLog("Skipping asset rename refresh, plugin already updating:",r.path);continue}try{await this.setFeaturedImage(r)}catch(o){this.errorLog(`Failed to refresh featured image after asset rename for ${r.path}:`,o)}}}}getMarkdownFilesReferencingPaths(e){let t=new Set,n=this.app.metadataCache.resolvedLinks;for(let[a,s]of Object.entries(n))for(let r of e)if(Object.prototype.hasOwnProperty.call(s,r)){t.add(a);break}return t}isManagedImageFile(e){var s;let t=(s=e.extension)==null?void 0:s.toLowerCase();if(!t||!this.settings.imageExtensions.map(r=>r.toLowerCase()).includes(t))return!1;let n=(0,x.normalizePath)(e.path),a=(0,x.normalizePath)(this.settings.thumbnailsFolder);return!(n===a||n.startsWith(`${a}/`))}async downloadExternalImage(e,t="external"){if(!this.settings.downloadExternalImages)return;let n=(0,x.normalizePath)(`${this.settings.thumbnailsFolder}/${t}`),a=this.generateHashedFilenameFromUrl(e);if(!a){this.errorLog("Failed to generate hashed filename for:",e);return}let s=`${n}/${a}.failed.png`;if(await this.app.vault.adapter.exists(s)){let r=await this.app.vault.adapter.stat(s);if(!r)return;let o=Date.now()-r.mtime,l=720*60*1e3;if(os.toLowerCase())).has(n.extension.toLowerCase())){this.debugLog("Skipping video poster capture for unsupported extension:",n.extension);return}return await this.videoFrameService.createPoster(n)}async updateFrontmatter(e,t,n=void 0){this.isRunningBulkUpdate||this.updatingFiles.add(e.path);try{if(this.settings.dryRun){if(this.debugLog("Dry run: Skipping frontmatter update"),!this.isRunningBulkUpdate&&this.settings.showNotificationsOnUpdate){let a=t?`Dry run: Would change featured image to: ${t}`:"Dry run: Would remove featured image";new x.Notice(a)}}else if(await this.app.fileManager.processFrontMatter(e,a=>{Z(a,{property:this.settings.frontmatterProperty,value:t,format:this.settings.mediaLinkFormat,keepEmpty:this.settings.keepEmptyProperty}),this.settings.createResizedThumbnail&&Z(a,{property:this.settings.resizedFrontmatterProperty,value:n,format:this.settings.mediaLinkFormat,keepEmpty:this.settings.keepEmptyProperty})}),!this.isRunningBulkUpdate&&this.settings.showNotificationsOnUpdate){let a=t?`Featured image set to ${t}`:"Featured image removed";new x.Notice(a)}}finally{this.isRunningBulkUpdate||setTimeout(()=>{this.updatingFiles.delete(e.path)},100)}}async downloadThumbnail(e,t){if(!this.settings.downloadYoutubeThumbnails)return;let n=(0,x.normalizePath)(`${this.settings.thumbnailsFolder}/youtube`),a=`${n}/${e}`;if(t&&t.startsWith(a))return t;await this.app.vault.adapter.exists(n)||await this.app.vault.adapter.mkdir(n);let s=`${e}.webp`,r=`${n}/${s}`;if(await this.app.vault.adapter.exists(r))return r;if(this.settings.dryRun)return this.debugLog("Dry run: Skipping thumbnail download, using mock path"),r;try{let o=await this.fetchThumbnail(e,"maxresdefault.webp");if((o==null?void 0:o.status)===200)return await this.app.vault.adapter.writeBinary(r,o.arrayBuffer),r}catch(o){this.debugLog("Failed to download WebP thumbnail:",o)}this.errorLog(`Thumbnail for video ${e} could not be downloaded`)}async fetchThumbnail(e,t){let n=t.endsWith(".webp"),s=`${n?"https://i.ytimg.com/vi_webp":"https://img.youtube.com/vi"}/${e}/${t}`;if(!this.isValidUrl(s))throw new Error(`Invalid YouTube thumbnail URL: ${s}`);return await(0,x.requestUrl)({url:s,method:"GET",headers:{Accept:n?"image/webp":"image/jpeg"}})}async updateAllFeaturedImages(){if(!await this.showConfirmationModal("Update all featured images","This will scan all markdown files in your vault and update or add featured images based on the first image, YouTube link, or Auto Card Link image found in each file. Proceed?"))return;let t=this.app.vault.getMarkdownFiles();await this.processFilesWithProgress(t,"bulk update of featured images","updating featured images")}async updateFolderFeaturedImages(){var r;let e=this.app.workspace.getActiveFile();if(!e){new x.Notice("No file is currently active");return}let t=((r=e.parent)==null?void 0:r.path)||"/";if(!await this.showConfirmationModal("Update folder featured images",`This will scan all markdown files in "${t}" and its subfolders, and update or add featured images based on the first image, YouTube link, or Auto Card Link image found in each file. Proceed?`))return;let s=this.app.vault.getMarkdownFiles().filter(o=>t==="/"?!0:o.path.startsWith(`${t}/`));await this.processFilesWithProgress(s,"bulk update of featured images in folder","updating featured images")}async processFilesWithProgress(e,t,n){this.isRunningBulkUpdate=!0;let a=5;new x.Notice(`Starting ${this.settings.dryRun?"dry run of ":""}${t}...`);let s=0,r=0,o=e.length,l=Date.now();try{for(let c=0;c{try{let v=h.stat.mtime,F=await this.setFeaturedImage(h);return F&&!this.settings.dryRun&&await this.app.vault.modify(h,await this.app.vault.read(h),{mtime:v}),{success:!0,updated:F}}catch(v){return this.errorLog(`Error processing file ${h.path}:`,v),{success:!1,updated:!1}}}));s+=g.filter(h=>h.success&&h.updated).length,r+=g.filter(h=>!h.success).length;let f=Date.now();if(f-l>=5e3){let h=`Processed ${c+u.length} of ${o} files. Updated ${s} featured images`;r>0&&(h+=`. Errors: ${r}`),new x.Notice(h),l=f}}}finally{setTimeout(()=>{this.isRunningBulkUpdate=!1;let c=`Finished ${this.settings.dryRun?"dry run of ":""}${n}. Updated: ${s} files`;r>0&&(c+=`. Errors: ${r}`),new x.Notice(c)},100)}}async removeAllFeaturedImages(){let e=`This will remove the "${this.settings.frontmatterProperty}" property from the frontmatter of all markdown files in your vault`;if(this.settings.createResizedThumbnail&&(e+=` and the "${this.settings.resizedFrontmatterProperty}" property if present`),e+=". Proceed?",!await this.showConfirmationModal("Remove all featured images",e))return;this.isRunningBulkUpdate=!0,new x.Notice(`Starting ${this.settings.dryRun?"dry run of ":""}removal of featured images from all files...`);let n=this.app.vault.getMarkdownFiles(),a=0;for(let s of n){let r=this.getFeatureFromFrontmatter(s),o=s.stat.mtime,l=await this.removeFeaturedImage(s,r);l&&!this.settings.dryRun&&await this.app.vault.modify(s,await this.app.vault.read(s),{mtime:o}),l&&a++}setTimeout(()=>{this.isRunningBulkUpdate=!1;let s=`Finished ${this.settings.dryRun?"dry run of ":""}removing featured images from ${a} files.`;new x.Notice(s)},100)}async removeFeaturedImage(e,t){if(!t)return!1;if(this.settings.preserveTemplateImages)return this.debugLog("Preserving existing featured image:",t),!1;let n=this.getThumbnailFromFrontmatter(e);return this.debugLog(`FEATURE REMOVED - File: `,e.path),await this.updateFrontmatter(e,void 0,void 0),n&&this.thumbnailService&&await this.thumbnailService.deleteOrphanedThumbnail(n,e),!0}async showConfirmationModal(e,t,n=!0){return new Promise(a=>{new $(this.app,e,t,s=>{a(s)},n).open()})}async cleanupUnusedImages(){if(!this.imageMaintenance){this.errorLog("Image maintenance service not initialized.");return}await this.imageMaintenance.cleanupUnusedImages(this.showConfirmationModal.bind(this))}async rerenderAllResizedThumbnails(){if(!this.imageMaintenance){this.errorLog("Image maintenance service not initialized, unable to re-render thumbnails.");return}await this.imageMaintenance.rerenderAllResizedThumbnails({confirm:this.showConfirmationModal.bind(this),startBulkUpdate:()=>{this.isRunningBulkUpdate=!0},endBulkUpdate:()=>{this.isRunningBulkUpdate=!1},getFeatureFromFrontmatter:this.getFeatureFromFrontmatter.bind(this),updateFrontmatter:this.updateFrontmatter.bind(this)})}};C.FAILED_IMAGE_DATA=new Uint8Array([137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,1,0,0,0,1,8,6,0,0,0,31,21,196,137,0,0,0,10,73,68,65,84,120,156,99,0,0,0,2,0,1,229,39,222,252,0,0,0,0,73,69,78,68,174,66,96,130]),C.FILE_OPERATION_DELAY=100;var G=C; /* nosourcemap */