From 05d89f6cb54bf1b2a13745d54c6efc83041a0e28 Mon Sep 17 00:00:00 2001 From: Andley Chang Date: Thu, 28 Dec 2023 10:21:05 +0800 Subject: [PATCH] vault backup: 2023-12-28 10:21:05 Affected files: .obsidian/plugins/obsidian-footnotes/main.js .obsidian/plugins/obsidian-footnotes/manifest.json .obsidian/plugins/obsidian-git/main.js .obsidian/plugins/obsidian-git/manifest.json .obsidian/plugins/obsidian-git/styles.css .obsidian/plugins/obsidian-hider/main.js .obsidian/plugins/obsidian-hider/manifest.json .obsidian/plugins/obsidian-hider/styles.css .obsidian/workspace.json Hab.2.20-3.19.md README.md --- .obsidian/plugins/obsidian-footnotes/main.js | 699 +++++--- .../plugins/obsidian-footnotes/manifest.json | 2 +- .obsidian/plugins/obsidian-git/main.js | 1439 +++++++++-------- .obsidian/plugins/obsidian-git/manifest.json | 2 +- .obsidian/plugins/obsidian-git/styles.css | 5 + .obsidian/plugins/obsidian-hider/main.js | 14 +- .../plugins/obsidian-hider/manifest.json | 4 +- .obsidian/plugins/obsidian-hider/styles.css | 2 +- .obsidian/workspace.json | 15 +- Hab.2-3.md => Hab.2.20-3.19.md | 2 +- README.md | 2 +- 11 files changed, 1206 insertions(+), 980 deletions(-) rename Hab.2-3.md => Hab.2.20-3.19.md (90%) diff --git a/.obsidian/plugins/obsidian-footnotes/main.js b/.obsidian/plugins/obsidian-footnotes/main.js index fe12c3b..61a853f 100644 --- a/.obsidian/plugins/obsidian-footnotes/main.js +++ b/.obsidian/plugins/obsidian-footnotes/main.js @@ -27,19 +27,427 @@ function __awaiter(thisArg, _arguments, P, generator) { }); } +const DEFAULT_SETTINGS = { + enableAutoSuggest: true, + enableFootnoteSectionHeading: false, + FootnoteSectionHeading: "Footnotes", +}; +class FootnotePluginSettingTab extends obsidian.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; + } + display() { + const { containerEl } = this; + containerEl.empty(); + containerEl.createEl("h2", { + text: "Footnote Shortcut", + }); + const mainDesc = containerEl.createEl('p'); + mainDesc.appendText('Need help? Check the '); + mainDesc.appendChild(createEl('a', { + text: "README", + href: "https://github.com/MichaBrugger/obsidian-footnotes", + })); + mainDesc.appendText('!'); + containerEl.createEl('br'); + new obsidian.Setting(containerEl) + .setName("Enable Footnote Autosuggest") + .setDesc("Suggests existing footnotes when entering named footnotes.") + .addToggle((toggle) => toggle + .setValue(this.plugin.settings.enableAutoSuggest) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.enableAutoSuggest = value; + yield this.plugin.saveSettings(); + }))); + containerEl.createEl("h3", { + text: "Footnotes Section Behavior", + }); + new obsidian.Setting(containerEl) + .setName("Enable Footnote Section Heading") + .setDesc("Automatically adds a heading separating footnotes at the bottom of the note from the rest of the text.") + .addToggle((toggle) => toggle + .setValue(this.plugin.settings.enableFootnoteSectionHeading) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.enableFootnoteSectionHeading = value; + yield this.plugin.saveSettings(); + }))); + new obsidian.Setting(containerEl) + .setName("Footnote Section Heading") + .setDesc("Heading to place above footnotes section (Supports Markdown formatting). Heading will be H1 size.") + .addText((text) => text + .setPlaceholder("Heading is Empty") + .setValue(this.plugin.settings.FootnoteSectionHeading) + .onChange((value) => __awaiter(this, void 0, void 0, function* () { + this.plugin.settings.FootnoteSectionHeading = value; + yield this.plugin.saveSettings(); + }))); + } +} + +var AllMarkers = /\[\^([^\[\]]+)\](?!:)/dg; +var AllNumberedMarkers = /\[\^(\d+)\]/gi; +var AllDetailsNameOnly = /\[\^([^\[\]]+)\]:/g; +var DetailInLine = /\[\^([^\[\]]+)\]:/; +var ExtractNameFromFootnote = /(\[\^)([^\[\]]+)(?=\])/; +function listExistingFootnoteDetails(doc) { + let FootnoteDetailList = []; + //search each line for footnote details and add to list + for (let i = 0; i < doc.lineCount(); i++) { + let theLine = doc.getLine(i); + let lineMatch = theLine.match(AllDetailsNameOnly); + if (lineMatch) { + let temp = lineMatch[0]; + temp = temp.replace("[^", ""); + temp = temp.replace("]:", ""); + FootnoteDetailList.push(temp); + } + } + if (FootnoteDetailList.length > 0) { + return FootnoteDetailList; + } + else { + return null; + } +} +function listExistingFootnoteMarkersAndLocations(doc) { + let markerEntry; + let FootnoteMarkerInfo = []; + //search each line for footnote markers + //for each, add their name, line number, and start index to FootnoteMarkerInfo + for (let i = 0; i < doc.lineCount(); i++) { + let theLine = doc.getLine(i); + let lineMatch; + while ((lineMatch = AllMarkers.exec(theLine)) != null) { + markerEntry = { + footnote: lineMatch[0], + lineNum: i, + startIndex: lineMatch.index + }; + FootnoteMarkerInfo.push(markerEntry); + } + } + return FootnoteMarkerInfo; +} +function shouldJumpFromDetailToMarker(lineText, cursorPosition, doc) { + // check if we're in a footnote detail line ("[^1]: footnote") + // if so, jump cursor back to the footnote in the text + let match = lineText.match(DetailInLine); + if (match) { + let s = match[0]; + let index = s.replace("[^", ""); + index = index.replace("]:", ""); + let footnote = s.replace(":", ""); + let returnLineIndex = cursorPosition.line; + // find the FIRST OCCURENCE where this footnote exists in the text + for (let i = 0; i < doc.lineCount(); i++) { + let scanLine = doc.getLine(i); + if (scanLine.contains(footnote)) { + let cursorLocationIndex = scanLine.indexOf(footnote); + returnLineIndex = i; + doc.setCursor({ + line: returnLineIndex, + ch: cursorLocationIndex + footnote.length, + }); + return true; + } + } + } + return false; +} +function shouldJumpFromMarkerToDetail(lineText, cursorPosition, doc) { + // Jump cursor TO detail marker + // does this line have a footnote marker? + // does the cursor overlap with one of them? + // if so, which one? + // find this footnote marker's detail line + // place cursor there + let markerTarget = null; + let FootnoteMarkerInfo = listExistingFootnoteMarkersAndLocations(doc); + let currentLine = cursorPosition.line; + let footnotesOnLine = FootnoteMarkerInfo.filter((markerEntry) => markerEntry.lineNum === currentLine); + if (footnotesOnLine != null) { + for (let i = 0; i <= footnotesOnLine.length - 1; i++) { + if (footnotesOnLine[i].footnote !== null) { + let marker = footnotesOnLine[i].footnote; + let indexOfMarkerInLine = footnotesOnLine[i].startIndex; + if (cursorPosition.ch >= indexOfMarkerInLine && + cursorPosition.ch <= indexOfMarkerInLine + marker.length) { + markerTarget = marker; + break; + } + } + } + } + if (markerTarget !== null) { + // extract name + let match = markerTarget.match(ExtractNameFromFootnote); + if (match) { + let footnoteName = match[2]; + // find the first line with this detail marker name in it. + for (let i = 0; i < doc.lineCount(); i++) { + let theLine = doc.getLine(i); + let lineMatch = theLine.match(DetailInLine); + if (lineMatch) { + // compare to the index + let nameMatch = lineMatch[1]; + if (nameMatch == footnoteName) { + doc.setCursor({ line: i, ch: lineMatch[0].length + 1 }); + return true; + } + } + } + } + } + return false; +} +function addFootnoteSectionHeader(plugin) { + //check if 'Enable Footnote Section Heading' is true + //if so, return the "Footnote Section Heading" + // else, return "" + if (plugin.settings.enableFootnoteSectionHeading == true) { + let returnHeading = `\n# ${plugin.settings.FootnoteSectionHeading}`; + return returnHeading; + } + return ""; +} +//FUNCTIONS FOR AUTONUMBERED FOOTNOTES +function insertAutonumFootnote(plugin) { + const mdView = app.workspace.getActiveViewOfType(obsidian.MarkdownView); + if (!mdView) + return false; + if (mdView.editor == undefined) + return false; + const doc = mdView.editor; + const cursorPosition = doc.getCursor(); + const lineText = doc.getLine(cursorPosition.line); + const markdownText = mdView.data; + if (shouldJumpFromDetailToMarker(lineText, cursorPosition, doc)) + return; + if (shouldJumpFromMarkerToDetail(lineText, cursorPosition, doc)) + return; + return shouldCreateAutonumFootnote(lineText, cursorPosition, plugin, doc, markdownText); +} +function shouldCreateAutonumFootnote(lineText, cursorPosition, plugin, doc, markdownText) { + // create new footnote with the next numerical index + let matches = markdownText.match(AllNumberedMarkers); + let currentMax = 1; + if (matches != null) { + for (let i = 0; i <= matches.length - 1; i++) { + let match = matches[i]; + match = match.replace("[^", ""); + match = match.replace("]", ""); + let matchNumber = Number(match); + if (matchNumber + 1 > currentMax) { + currentMax = matchNumber + 1; + } + } + } + let footNoteId = currentMax; + let footnoteMarker = `[^${footNoteId}]`; + let linePart1 = lineText.substr(0, cursorPosition.ch); + let linePart2 = lineText.substr(cursorPosition.ch); + let newLine = linePart1 + footnoteMarker + linePart2; + doc.replaceRange(newLine, { line: cursorPosition.line, ch: 0 }, { line: cursorPosition.line, ch: lineText.length }); + let lastLineIndex = doc.lastLine(); + let lastLine = doc.getLine(lastLineIndex); + while (lastLineIndex > 0) { + lastLine = doc.getLine(lastLineIndex); + if (lastLine.length > 0) { + doc.replaceRange("", { line: lastLineIndex, ch: 0 }, { line: doc.lastLine(), ch: 0 }); + break; + } + lastLineIndex--; + } + let footnoteDetail = `\n[^${footNoteId}]: `; + let list = listExistingFootnoteDetails(doc); + if (list === null && currentMax == 1) { + footnoteDetail = "\n" + footnoteDetail; + let Heading = addFootnoteSectionHeader(plugin); + doc.setLine(doc.lastLine(), lastLine + Heading + footnoteDetail); + doc.setCursor(doc.lastLine() - 1, footnoteDetail.length - 1); + } + else { + doc.setLine(doc.lastLine(), lastLine + footnoteDetail); + doc.setCursor(doc.lastLine(), footnoteDetail.length - 1); + } +} +//FUNCTIONS FOR NAMED FOOTNOTES +function insertNamedFootnote(plugin) { + const mdView = app.workspace.getActiveViewOfType(obsidian.MarkdownView); + if (!mdView) + return false; + if (mdView.editor == undefined) + return false; + const doc = mdView.editor; + const cursorPosition = doc.getCursor(); + const lineText = doc.getLine(cursorPosition.line); + mdView.data; + if (shouldJumpFromDetailToMarker(lineText, cursorPosition, doc)) + return; + if (shouldJumpFromMarkerToDetail(lineText, cursorPosition, doc)) + return; + if (shouldCreateMatchingFootnoteDetail(lineText, cursorPosition, plugin, doc)) + return; + return shouldCreateFootnoteMarker(lineText, cursorPosition, doc); +} +function shouldCreateMatchingFootnoteDetail(lineText, cursorPosition, plugin, doc) { + // Create matching footnote detail for footnote marker + // does this line have a footnote marker? + // does the cursor overlap with one of them? + // if so, which one? + // does this footnote marker have a detail line? + // if not, create it and place cursor there + let reOnlyMarkersMatches = lineText.match(AllMarkers); + let markerTarget = null; + if (reOnlyMarkersMatches) { + for (let i = 0; i <= reOnlyMarkersMatches.length; i++) { + let marker = reOnlyMarkersMatches[i]; + if (marker != undefined) { + let indexOfMarkerInLine = lineText.indexOf(marker); + if (cursorPosition.ch >= indexOfMarkerInLine && + cursorPosition.ch <= indexOfMarkerInLine + marker.length) { + markerTarget = marker; + break; + } + } + } + } + if (markerTarget != null) { + //extract footnote + let match = markerTarget.match(ExtractNameFromFootnote); + //find if this footnote exists by listing existing footnote details + if (match) { + let footnoteId = match[2]; + let list = listExistingFootnoteDetails(doc); + // Check if the list is empty OR if the list doesn't include current footnote + // if so, add detail for the current footnote + if (list === null || !list.includes(footnoteId)) { + let lastLineIndex = doc.lastLine(); + let lastLine = doc.getLine(lastLineIndex); + while (lastLineIndex > 0) { + lastLine = doc.getLine(lastLineIndex); + if (lastLine.length > 0) { + doc.replaceRange("", { line: lastLineIndex, ch: 0 }, { line: doc.lastLine(), ch: 0 }); + break; + } + lastLineIndex--; + } + let footnoteDetail = `\n[^${footnoteId}]: `; + if (list === null || list.length < 1) { + footnoteDetail = "\n" + footnoteDetail; + let Heading = addFootnoteSectionHeader(plugin); + doc.setLine(doc.lastLine(), lastLine + Heading + footnoteDetail); + doc.setCursor(doc.lastLine() - 1, footnoteDetail.length - 1); + } + else { + doc.setLine(doc.lastLine(), lastLine + footnoteDetail); + doc.setCursor(doc.lastLine(), footnoteDetail.length - 1); + } + return true; + } + return; + } + } +} +function shouldCreateFootnoteMarker(lineText, cursorPosition, doc, markdownText) { + //create empty footnote marker for name input + let emptyMarker = `[^]`; + doc.replaceRange(emptyMarker, doc.getCursor()); + //move cursor in between [^ and ] + doc.setCursor(cursorPosition.line, cursorPosition.ch + 2); + //open footnotePicker popup +} + +class Autocomplete extends obsidian.EditorSuggest { + constructor(plugin) { + super(plugin.app); + this.Footnote_Detail_Names_And_Text = /\[\^([^\[\]]+)\]:(.+(?:\n(?:(?!\[\^[^\[\]]+\]:).)+)*)/g; + this.getSuggestions = (context) => { + const { query } = context; + const mdView = app.workspace.getActiveViewOfType(obsidian.MarkdownView); + const doc = mdView.editor; + const matches = this.Extract_Footnote_Detail_Names_And_Text(doc); + const filteredResults = matches.filter((entry) => entry[1].includes(query)); + return filteredResults; + }; + this.plugin = plugin; + } + onTrigger(cursorPosition, doc, file) { + if (this.plugin.settings.enableAutoSuggest) { + const mdView = app.workspace.getActiveViewOfType(obsidian.MarkdownView); + const lineText = doc.getLine(cursorPosition.line); + mdView.data; + let reOnlyMarkersMatches = lineText.match(AllMarkers); + let markerTarget = null; + let indexOfMarkerInLine = null; + if (reOnlyMarkersMatches) { + for (let i = 0; i <= reOnlyMarkersMatches.length; i++) { + let marker = reOnlyMarkersMatches[i]; + if (marker != undefined) { + indexOfMarkerInLine = lineText.indexOf(marker); + if (cursorPosition.ch >= indexOfMarkerInLine && + cursorPosition.ch <= indexOfMarkerInLine + marker.length) { + markerTarget = marker; + break; + } + } + } + } + if (markerTarget != null) { + //extract footnote + let match = markerTarget.match(ExtractNameFromFootnote); + //find if this footnote exists by listing existing footnote details + if (match) { + let footnoteId = match[2]; + if (footnoteId !== undefined) { + this.latestTriggerInfo = { + end: cursorPosition, + start: { + ch: indexOfMarkerInLine + 2, + line: cursorPosition.line + }, + query: footnoteId + }; + return this.latestTriggerInfo; + } + } + } + return null; + } + } + Extract_Footnote_Detail_Names_And_Text(doc) { + //search each line for footnote details and add to list + //save the footnote detail name as capture group 1 + //save the footnote detail text as capture group 2 + let docText = doc.getValue(); + const matches = Array.from(docText.matchAll(this.Footnote_Detail_Names_And_Text)); + return matches; + } + renderSuggestion(value, el) { + el.createEl("b", { text: value[1] }); + el.createEl("br"); + el.createEl("p", { text: value[2] }); + } + selectSuggestion(value, evt) { + const { context, plugin } = this; + if (!context) + return; + const mdView = app.workspace.getActiveViewOfType(obsidian.MarkdownView); + mdView.editor; + const field = value[1]; + const replacement = `${field}`; + context.editor.replaceRange(replacement, this.latestTriggerInfo.start, this.latestTriggerInfo.end); + } +} + //Add chevron-up-square icon from lucide for mobile toolbar (temporary until Obsidian updates to Lucide v0.130.0) obsidian.addIcon("chevron-up-square", ``); -class MyPlugin extends obsidian.Plugin { - constructor() { - super(...arguments); - this.AllMarkers = /\[\^([^\[\]]+)\](?!:)/dg; - this.AllNumberedMarkers = /\[\^(\d+)\]/gi; - this.AllDetailsNameOnly = /\[\^([^\[\]]+)\]:/g; - this.DetailInLine = /\[\^([^\[\]]+)\]:/; - this.ExtractNameFromFootnote = /(\[\^)([^\[\]]+)(?=\])/; - } +class FootnotePlugin extends obsidian.Plugin { onload() { return __awaiter(this, void 0, void 0, function* () { + yield this.loadSettings(); + this.registerEditorSuggest(new Autocomplete(this)); this.addCommand({ id: "insert-autonumbered-footnote", name: "Insert / Navigate Auto-Numbered Footnote", @@ -47,7 +455,7 @@ class MyPlugin extends obsidian.Plugin { checkCallback: (checking) => { if (checking) return !!this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); - this.insertAutonumFootnote(); + insertAutonumFootnote(this); }, }); this.addCommand({ @@ -57,270 +465,23 @@ class MyPlugin extends obsidian.Plugin { checkCallback: (checking) => { if (checking) return !!this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); - this.insertNamedFootnote(); + insertNamedFootnote(this); } }); + this.addSettingTab(new FootnotePluginSettingTab(this.app, this)); }); } - //UNIVERSAL FUNCTIONS - listExistingFootnoteDetails(doc) { - let FootnoteDetailList = []; - //search each line for footnote details and add to list - for (let i = 0; i < doc.lineCount(); i++) { - let theLine = doc.getLine(i); - let lineMatch = theLine.match(this.AllDetailsNameOnly); - if (lineMatch) { - let temp = lineMatch[0]; - temp = temp.replace("[^", ""); - temp = temp.replace("]:", ""); - FootnoteDetailList.push(temp); - } - } - if (FootnoteDetailList.length > 0) { - return FootnoteDetailList; - } - else { - return null; - } + loadSettings() { + return __awaiter(this, void 0, void 0, function* () { + this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData()); + }); } - listExistingFootnoteMarkersAndLocations(doc) { - let markerEntry; - let FootnoteMarkerInfo = []; - //search each line for footnote markers - //for each, add their name, line number, and start index to FootnoteMarkerInfo - for (let i = 0; i < doc.lineCount(); i++) { - let theLine = doc.getLine(i); - let lineMatch; - while ((lineMatch = this.AllMarkers.exec(theLine)) != null) { - markerEntry = { - footnote: lineMatch[0], - lineNum: i, - startIndex: lineMatch.index - }; - FootnoteMarkerInfo.push(markerEntry); - } - } - return FootnoteMarkerInfo; - } - shouldJumpFromDetailToMarker(lineText, cursorPosition, doc) { - // check if we're in a footnote detail line ("[^1]: footnote") - // if so, jump cursor back to the footnote in the text - // https://github.com/akaalias/obsidian-footnotes#improved-quick-navigation - let match = lineText.match(this.DetailInLine); - if (match) { - let s = match[0]; - let index = s.replace("[^", ""); - index = index.replace("]:", ""); - let footnote = s.replace(":", ""); - let returnLineIndex = cursorPosition.line; - // find the FIRST OCCURENCE where this footnote exists in the text - for (let i = 0; i < doc.lineCount(); i++) { - let scanLine = doc.getLine(i); - if (scanLine.contains(footnote)) { - let cursorLocationIndex = scanLine.indexOf(footnote); - returnLineIndex = i; - doc.setCursor({ - line: returnLineIndex, - ch: cursorLocationIndex + footnote.length, - }); - return true; - } - } - } - return false; - } - shouldJumpFromMarkerToDetail(lineText, cursorPosition, doc) { - // Jump cursor TO detail marker - // does this line have a footnote marker? - // does the cursor overlap with one of them? - // if so, which one? - // find this footnote marker's detail line - // place cursor there - let markerTarget = null; - let FootnoteMarkerInfo = this.listExistingFootnoteMarkersAndLocations(doc); - let currentLine = cursorPosition.line; - let footnotesOnLine = FootnoteMarkerInfo.filter(markerEntry => markerEntry.lineNum === currentLine); - if (footnotesOnLine != null) { - for (let i = 0; i <= footnotesOnLine.length - 1; i++) { - if (footnotesOnLine[i].footnote !== null) { - let marker = footnotesOnLine[i].footnote; - let indexOfMarkerInLine = footnotesOnLine[i].startIndex; - if (cursorPosition.ch >= indexOfMarkerInLine && - cursorPosition.ch <= indexOfMarkerInLine + marker.length) { - markerTarget = marker; - break; - } - } - } - } - if (markerTarget !== null) { - // extract name - let match = markerTarget.match(this.ExtractNameFromFootnote); - if (match) { - let footnoteName = match[2]; - // find the first line with this detail marker name in it. - for (let i = 0; i < doc.lineCount(); i++) { - let theLine = doc.getLine(i); - let lineMatch = theLine.match(this.DetailInLine); - if (lineMatch) { - // compare to the index - let nameMatch = lineMatch[1]; - if (nameMatch == footnoteName) { - doc.setCursor({ line: i, ch: lineMatch[0].length + 1 }); - return true; - } - } - } - } - } - return false; - } - //FUNCTIONS FOR AUTONUMBERED FOOTNOTES - insertAutonumFootnote() { - const mdView = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); - if (!mdView) - return false; - if (mdView.editor == undefined) - return false; - const doc = mdView.editor; - const cursorPosition = doc.getCursor(); - const lineText = doc.getLine(cursorPosition.line); - const markdownText = mdView.data; - if (this.shouldJumpFromDetailToMarker(lineText, cursorPosition, doc)) - return; - if (this.shouldJumpFromMarkerToDetail(lineText, cursorPosition, doc)) - return; - return this.shouldCreateAutonumFootnote(lineText, cursorPosition, doc, markdownText); - } - shouldCreateAutonumFootnote(lineText, cursorPosition, doc, markdownText) { - // create new footnote with the next numerical index - let matches = markdownText.match(this.AllNumberedMarkers); - let currentMax = 1; - if (matches != null) { - for (let i = 0; i <= matches.length - 1; i++) { - let match = matches[i]; - match = match.replace("[^", ""); - match = match.replace("]", ""); - let matchNumber = Number(match); - if (matchNumber + 1 > currentMax) { - currentMax = matchNumber + 1; - } - } - } - let footNoteId = currentMax; - let footnoteMarker = `[^${footNoteId}]`; - let linePart1 = lineText.substr(0, cursorPosition.ch); - let linePart2 = lineText.substr(cursorPosition.ch); - let newLine = linePart1 + footnoteMarker + linePart2; - doc.replaceRange(newLine, { line: cursorPosition.line, ch: 0 }, { line: cursorPosition.line, ch: lineText.length }); - let lastLineIndex = doc.lastLine(); - let lastLine = doc.getLine(lastLineIndex); - while (lastLineIndex > 0) { - lastLine = doc.getLine(lastLineIndex); - if (lastLine.length > 0) { - doc.replaceRange("", { line: lastLineIndex, ch: 0 }, { line: doc.lastLine(), ch: 0 }); - break; - } - lastLineIndex--; - } - let footnoteDetail = `\n[^${footNoteId}]: `; - let list = this.listExistingFootnoteDetails(doc); - if (list === null && currentMax == 1) { - footnoteDetail = "\n" + footnoteDetail; - doc.setLine(doc.lastLine(), lastLine + footnoteDetail); - doc.setCursor(doc.lastLine() - 1, footnoteDetail.length - 1); - } - else { - doc.setLine(doc.lastLine(), lastLine + footnoteDetail); - doc.setCursor(doc.lastLine(), footnoteDetail.length - 1); - } - } - //FUNCTIONS FOR NAMED FOOTNOTES - insertNamedFootnote() { - const mdView = this.app.workspace.getActiveViewOfType(obsidian.MarkdownView); - if (!mdView) - return false; - if (mdView.editor == undefined) - return false; - const doc = mdView.editor; - const cursorPosition = doc.getCursor(); - const lineText = doc.getLine(cursorPosition.line); - const markdownText = mdView.data; - if (this.shouldJumpFromDetailToMarker(lineText, cursorPosition, doc)) - return; - if (this.shouldJumpFromMarkerToDetail(lineText, cursorPosition, doc)) - return; - if (this.shouldCreateMatchingFootnoteDetail(lineText, cursorPosition, doc)) - return; - return this.shouldCreateFootnoteMarker(lineText, cursorPosition, doc, markdownText); - } - shouldCreateMatchingFootnoteDetail(lineText, cursorPosition, doc) { - // Create matching footnote detail for footnote marker - // does this line have a footnote marker? - // does the cursor overlap with one of them? - // if so, which one? - // does this footnote marker have a detail line? - // if not, create it and place cursor there - let reOnlyMarkersMatches = lineText.match(this.AllMarkers); - let markerTarget = null; - if (reOnlyMarkersMatches) { - for (let i = 0; i <= reOnlyMarkersMatches.length; i++) { - let marker = reOnlyMarkersMatches[i]; - if (marker != undefined) { - let indexOfMarkerInLine = lineText.indexOf(marker); - if (cursorPosition.ch >= indexOfMarkerInLine && - cursorPosition.ch <= indexOfMarkerInLine + marker.length) { - markerTarget = marker; - break; - } - } - } - } - if (markerTarget != null) { - //extract footnote - let match = markerTarget.match(this.ExtractNameFromFootnote); - //find if this footnote exists by listing existing footnote details - if (match) { - let footnoteId = match[2]; - let list = this.listExistingFootnoteDetails(doc); - // Check if the list is empty OR if the list doesn't include current footnote - // if so, add detail for the current footnote - if (list === null || !list.includes(footnoteId)) { - let lastLineIndex = doc.lastLine(); - let lastLine = doc.getLine(lastLineIndex); - while (lastLineIndex > 0) { - lastLine = doc.getLine(lastLineIndex); - if (lastLine.length > 0) { - doc.replaceRange("", { line: lastLineIndex, ch: 0 }, { line: doc.lastLine(), ch: 0 }); - break; - } - lastLineIndex--; - } - let footnoteDetail = `\n[^${footnoteId}]: `; - if (list === null || list.length < 1) { - footnoteDetail = "\n" + footnoteDetail; - doc.setLine(doc.lastLine(), lastLine + footnoteDetail); - doc.setCursor(doc.lastLine() - 1, footnoteDetail.length - 1); - } - else { - doc.setLine(doc.lastLine(), lastLine + footnoteDetail); - doc.setCursor(doc.lastLine(), footnoteDetail.length - 1); - } - return true; - } - return; - } - } - } - shouldCreateFootnoteMarker(lineText, cursorPosition, doc, markdownText) { - //create empty footnote marker for name input - let emptyMarker = `[^]`; - doc.replaceRange(emptyMarker, doc.getCursor()); - //move cursor in between [^ and ] - doc.setCursor(cursorPosition.line, cursorPosition.ch + 2); - //open footnotePicker popup + saveSettings() { + return __awaiter(this, void 0, void 0, function* () { + yield this.saveData(this.settings); + }); } } -module.exports = MyPlugin; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsIm1haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5Db3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi5cclxuXHJcblBlcm1pc3Npb24gdG8gdXNlLCBjb3B5LCBtb2RpZnksIGFuZC9vciBkaXN0cmlidXRlIHRoaXMgc29mdHdhcmUgZm9yIGFueVxyXG5wdXJwb3NlI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ICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodCAmJiBfLmxhYmVsIDwgdFsyXSkgeyBfLmxhYmVsID0gdFsyXTsgXy5vcHMucHVzaChvcCk7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRbMl0pIF8ub3BzLnBvcCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIF8udHJ5cy5wb3AoKTsgY29udGludWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgb3AgPSBib2R5LmNhbGwodGhpc0FyZywgXyk7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkgeyBvcCA9IFs2LCBlXTsgeSA9IDA7IH0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pW1wicmV0dXJuXCJdKSkgbS5jYWxsKGkpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBmaW5hbGx5IHsgaWYgKGUpIHRocm93IGUuZXJyb3I7IH1cclxuICAgIH1cclxuICAgIHJldHVybiBhcjtcclxufVxyXG5cclxuLyoqIEBkZXByZWNhdGVkICovXHJcbmV4cG9ydCBmdW5jdGlvbiBfX3NwcmVhZCgpIHtcclxuICAgIGZvciAodmFyIGFyID0gW10sIGkgPSAwOyBpIDwgYXJndW1lbnRzLmxlbmd0aDsgaSsrKVxyXG4gICAgICAgIGFyID0gYXIuY29uY2F0KF9fcmVhZChhcmd1bWVudHNbaV0pKTtcclxuICAgIHJldHVybiBhcjtcclxufVxyXG5cclxuLyoqIEBkZXByZWNhdGVkICovXHJcbmV4cG9ydCBmdW5jdGlvbiBfX3NwcmVhZEFycmF5cygpIHtcclxuICAgIGZvciAodmFyIHMgPSAwLCBpID0gMCwgaWwgPSBhcmd1bWVudHMubGVuZ3RoOyBpIDwgaWw7IGkrKykgcyArPSBhcmd1bWVudHNbaV0ubGVuZ3RoO1xyXG4gICAgZm9yICh2YXIgciA9IEFycmF5KHMpLCBrID0gMCwgaSA9IDA7IGkgPCBpbDsgaSsrKVxyXG4gICAgICAgIGZvciAodmFyIGEgPSBhcmd1bWVudHNbaV0sIGogPSAwLCBqbCA9IGEubGVuZ3RoOyBqIDwgamw7IGorKywgaysrKVxyXG4gICAgICAgICAgICByW2tdID0gYVtqXTtcclxuICAgIHJldHVybiByO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gX19zcHJlYWRBcnJheSh0bywgZnJvbSwgcGFjaykge1xyXG4gICAgaWYgKHBhY2sgfHwgYXJndW1lbnRzLmxlbmd0aCA9PT0gMikgZm9yICh2YXIgaSA9IDAsIGwgPSBmcm9tLmxlbmd0aCwgYXI7IGkgPCBsOyBpKyspIHtcclxuICAgICAgICBpZiAoYXIgfHwgIShpIGluIGZyb20pKSB7XHJcbiAgICAgICAgIC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lscyhkb2MpO1xyXG4gICAgICAgIFxyXG4gICAgICAgIC8vIENoZWNrIGlmIHRoZSBsaXN0IGlzIGVtcHR5IE9SIGlmIHRoZSBsaXN0IGRvZXNuJ3QgaW5jbHVkZSBjdXJyZW50IGZvb3Rub3RlXHJcbiAgICAgICAgLy8gaWYgc28sIGFkZCBkZXRhaWwgZm9yIHRoZSBjdXJyZW50IGZvb3Rub3RlXHJcbiAgICAgICAgaWYobGlzdCA9PT0gbnVsbCB8fCAhbGlzdC5pbmNsdWRlcyhmb290bm90ZUlkKSkge1xyXG4gICAgICAgICAgbGV0IGxhc3RMaW5lSW5kZXggPSBkb2MubGFzdExpbmUoKTtcclxuICAgICAgICAgIGxldCBsYXN0TGluZSA9IGRvYy5nZXRMaW5lKGxhc3RMaW5lSW5kZXgpO1xyXG5cclxuICAgICAgICAgIHdoaWxlIChsYXN0TGluZUluZGV4ID4gMCkge1xyXG4gICAgICAgICAgICBsYXN0TGluZSA9IGRvYy5nZXRMaW5lKGxhc3RMaW5lSW5kZXgpO1xyXG4gICAgICAgICAgICBpZiAobGFzdExpbmUubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICAgIGRvYy5yZXBsYWNlUmFuZ2UoXHJcbiAgICAgICAgICAgICAgICBcIlwiLFxyXG4gICAgICAgICAgICAgICAgeyBsaW5lOiBsYXN0TGluZUluZGV4LCBjaDogMCB9LFxyXG4gICAgICAgICAgICAgICAgeyBsaW5lOiBkb2MubGFzdExpbmUoKSwgY2g6IDAgfVxyXG4gICAgICAgICAgICAgICk7XHJcbiAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgbGFzdExpbmVJbmRleC0tO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgXHJcbiAgICAgICAgICBsZXQgZm9vdG5vdGVEZXRhaWwgPSBgXFxuW14ke2Zvb3Rub3RlSWR9XTogYDtcclxuICAgICAgICAgICAgICAgICAgICBcclxuICAgICAgICA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QUFDLGNBQWMsQ0FBQyxJQUFJLEVBQUUsY0FBYyxDQUFDLEVBQUUsR0FBQyxDQUFDLENBQUMsQ0FBQzs7S0FHekQ7QUFDRjs7OzsifQ== +module.exports = FootnotePlugin; +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsInNyYy9zZXR0aW5ncy50cyIsInNyYy9pbnNlcnQtb3ItbmF2aWdhdGUtZm9vdG5vdGVzLnRzIiwic3JjL2F1dG9zdWdnZXN0LnRzIiwic3JjL21haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG5Db3B5cmlnaHQgKGMpIE1pY3Jvc29mdCBDb3Jwb3JhdGlvbi5cclxuXHJcblBlcm1pc3Npb24gdG8gdXNlLCBjb3B5LCBtb2RpZnksIGFuZC9vciBkaXN0cmlidXRlIHRoaXMgc29mdHdhcmUgZm9yIGFueVxyXG5wdXJwb3NlIHdpdGggb3Igd2l0aG91dCBmZWUgaXMgaGVyZWJ5IGdyYW50ZWQuXHJcblxyXG5USEUgU09GVFdBUkUgSVMgUFJPVklERUQgXCJBUyBJU1wiIEFORCBUSEUgQVVUSE9SIERJU0NMQUlNUyBBTEwgV0FSUkFOVElFUyBXSVRIXHJcblJFR0FSRCBUTyBUSElTIFNPRlRXQVJFIElOQ0xVRElORyBBTEwgSU1QTElFRCBXQVJSQU5USUVTIE9GIE1FUkNIQU5UQUJJTElUWVxyXG5BTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsXHJcbklORElSRUNULCBPUiBDT05TRVFVRU5USU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HVybiBzdGVwKFtuLCB2XSk7IH07IH1cclxuICAgIGZ1bmN0aW9uIHN0ZXAob3ApIHtcclxuICAgICAgICBpZiAoZikgdGhyb3cgbmV3IFR5cGVFcnJvcihcIkdlbmVyYXRvciBpcyBhbHJlYWR5IGV4ZWN1dGluZy5cIik7XHJcbiAgICAgICAgd2hpbGUgKGcgJiYgKGcgPSAwLCBvcFswXSAmJiAoXyA9IDApKSwgXykgdHJ5IHtcclxuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXS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bmRleCA9IHMucmVwbGFjZShcIlteXCIsIFwiXCIpO1xyXG4gICAgICAgIGluZGV4ID0gaW5kZXgucmVwbGFjZShcIl06XCIsIFwiXCIpO1xyXG4gICAgICAgIGxldCBmb290bm90ZSA9IHMucmVwbGFjZShcIjpcIiwgXCJcIik7XHJcblxyXG4gICAgICAgIGxldCByZXR1cm5MaW5lSW5kZXggPSBjdXJzb3JQb3NpdGlvbi5saW5lO1xyXG4gICAgICAgIC8vIGZpbmQgdGhlIEZJUlNUIE9DQ1VSRU5DRSB3aGVyZSB0aGlzIGZvb3Rub3RlIGV4aXN0cyBpbiB0aGUgdGV4dFxyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZG9jLmxpbmVDb3VudCgpOyBpKyspIHtcclxuICAgICAgICAgICAgbGV0IHNjYW5MaW5lID0gZG9jLmdldExpbmUoaSk7XHJcbiAgICAgICAgICAgIGlmIChzY2FuTGluZS5jb250YWlucyhmb290bm90ZSkpIHtcclxuICAgICAgICAgICAgICAgIGxldCBjdXJzb3JMb2NhdGlvbkluZGV4ID0gc2NhbkxpbmUuaW5kZXhPZihmb290bm90ZSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm5MaW5lSW5kZXggPSBpO1xyXG4gICAgICAgICAgICAgICAgZG9jLnNldEN1cnNvcih7XHJcbiAgICAgICAgICAgICAgICBsaW5lOiByZXR1cm5MaW5lSW5kZXgsXHJcbiAgICAgICAgICAgICAgICBjaDogY3Vyc29yTG9jYXRpb25JbmRleCArIGZvb3Rub3RlLmxlbmd0aCxcclxuICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4gZmFsc2U7XHJcbn1cclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBzaG91bGRKdW1wRnJvbU1hcmtlclRvRGV0YWlsKFxyXG4gICAgbGluZVRleH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bkxpbmVbaV0uZm9vdG5vdGU7XHJcbiAgICAgICAgICAgICAgICBsZXQgaW5kZXhPZk1hcmtlckluTGluZSA9IGZvb3Rub3Rlc09uTGluZVtpXS5zdGFydEluZGV4O1xyXG4gICAgICAgICAgICAgICAgaWYgKFxyXG4gICAgICAgICAgICAgICAgY3Vyc29yUG9zaXRpb24uY2ggPj0gaW5kZXhPZk1hcmtlckluTGluZSAmJlxyXG4gICAgICAgICAgICAgICAgY3Vyc29yUG9zaXRpb24uY2ggPD0gaW5kZXhPZk1hcmtlckluTGluZSArIG1hcmtlci5sZW5ndGhcclxuICAgICAgICAgICAgICAgICkge1xyXG4gICAgICAgICAgICAgICAgbWFya2VyVGFyZ2V0ID0gbWFya2VyO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICBpZiAobWFya2VyVGFyZ2V0ICE9PSBudWxsKSB7XHJcbiAgICAgICAgLy8gZXh0cmFjdCBuYW1lXHJcbiAgICAgICAgbGV0IG1hdGNoID0gbWFya2VyVGFyZ2V0Lm1hdGNoKEV4dHJhY3ROYW1lRnJvbUZvb3Rub3RlKTtcclxuICAgICAgICBpZiAobWF0Y2gpIHtcclxuICAgICAgICAgICAgbGV0IGZvb3Rub3RlTmFtZSA9IG1hdGNoWzJdO1xyXG5cclxuICAgICAgICAgICAgLy8gZmluZCB0aGUgZmlyc3QgbGluZSB3aXRoIHRoaXMgZGV0YWlsIG1hcmtlciBuYW1lIGluIGl0LlxyXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGRvYy5saW5lQ291bnQoKTsgaSsrKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgdGhlTGluZSA9IGRvYy5nZXRMaW5lKGkpO1xyXG4gICAgICAgICAgICAgICAgbGV0IGxpbmVNYXRjaCA9IHRoZUxpbmUubWF0Y2goRGV0YWlsSW5MaW5lKTtcclxuICAgICAgICAgICAgICAgIGlmIChsaW5lTWF0Y2gpIHtcclxuICAgICAgICAgICAgICAgICAgICAvLyBjb21wYXJlIHRvIHRoZSBpbmRleFxyXG4gICAgICAgICAgICAgICAgICAgIGxldCBuYW1lTWF0Y2ggPSBsaW5lTWF0Y2hbMV07XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5hbWVNYXRjaCA9PSBmb290bm90ZU5hbWUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZG9jLnNldEN1cnNvcih7IGxpbmU6IGksIGNoOiBsaW5lTWF0Y2hbMF0ubGVuZ3RoICsgMSB9KTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG4gICAgcmV0dXJuIGZhbHNlO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gYWRkRm9vdG5vdGVTZWN0aW9uSGVhZGVyKFxyXG4gICAgcGx1Z2luOiBGb290bm90ZVBsdWdpbixcclxuKTogc3RyaW5nIHtcclxuICAgIC8vY2hlY2sgaWYgJ0VuYWJsZSBGb290bm90ZSBTZWN0aW9uIEhlYWRpbmcnIGlzIHRydWVcclxuICAgIC8vaWYgc28sIHJldHVybiB0aGUgXCJGb290bm90ZSBTZWN0aW9uIEhlYWRpbmdcIlxyXG4gICAgLy8gZWxzZSwgcmV0dXJuIFwiXCJcclxuXHJcbiAgICBpZiAocGx1Z2luLnNldHRpbmdzLmVuYWJsZUZvb3Rub3RlU2VjdGlvbkhlYWRpbmcgPT0gdHJ1ZSkge1xyXG4gICAgICAgIGxldCByZXR1cm5IZWFkaW5nID0gYFxcbiMgJHtwbHVnaW4uc2V0dGluZ3MuRm9vdG5vdGVTZWN0aW9uSGVhZGluZ31gO1xyXG4gICAgICAgIHJldHVybiByZXR1cm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PSBtYXRjaE51bWJlciArIDE7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgbGV0IGZvb3ROb3RlSWQgPSBjdXJyZW50TWF4O1xyXG4gICAgbGV0IGZvb3Rub3RlTWFya2VyID0gYFteJHtmb290Tm90ZUlkfV1gO1xyXG4gICAgbGV0IGxpbmVQYXJ0MSA9IGxpbmVUZXh0LnN1YnN0cigwLCBjdXJzb3JQb3NpdGlvbi5jaCk7XHJcbiAgICBsZXQgbGluZVBhcnQyID0gbGluZVRleHQuc3Vic3RyKGN1cnNvclBvc2l0aW9uLmNoKTtcclxuICAgIGxldCBuZXdMaW5lID0gbGluZVBhcnQxICsgZm9vdG5vdGVNYXJrZXIgKyBsaW5lUGFydDI7XHJcblxyXG4gICAgZG9jLnJlcGxhY2VSYW5nZShcclxuICAgICAgICBuZXdMaW5lLFxyXG4gICAgICAgIHsgbGluZTogY3Vyc29yUG9zaXRpb24ubGluZSwgY2g6IDAgfSxcclxuICAgICAgICB7IGxpbmU6IGN1cnNvclBvc2l0aW9uLmxpbmUsIGNoOiBsaW5lVGV4dC5sZW5ndGggfVxyXG4gICAgKTtcclxuXHJcbiAgICBsZXQgbGFzdExpbmVJbmRleCA9IGRvYy5sYXN0TGluZSgpO1xyXG4gICAgbGV0IGxhc3RMaW5lID0gZG9jLmdldExpbmUobGFzdExpbmVJbmRleCk7XHJcblxyXG4gICAgd2hpbGUgKGxhc3RMaW5lSW5kZXggPiAwKSB7XHJcbiAgICAgICAgbGFzdExpbmUgPSBkb2MuZ2V0TGluZShsYXN0TGluZUluZGV4KTtcclxuICAgICAgICBpZiAobGFzdExpbmUubGVuZ3RoID4gMCkge1xyXG4gICAgICAgICAgICBkb2MucmVwbGFjZVJhbmdlKFxyXG4gICAgICAgICAgICAgICAgXCJcIixcclxuICAgICAgICAgICAgICAgIHsgbGluZTogbGFzdExpbmVJbmRleCwgY2g6IDAgfSxcclxuICAgICAgICAgICAgICAgI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vb3Rub3RlXHJcbiAgICAgICAgICAgIGlmKGxpc3QgPT09IG51bGwgfHwgIWxpc3QuaW5jbHVkZXMoZm9vdG5vdGVJZCkpIHtcclxuICAgICAgICAgICAgICAgIGxldCBsYXN0TGluZUluZGV4ID0gZG9jLmxhc3RMaW5lKCk7XHJcbiAgICAgICAgICAgICAgICBsZXQgbGFzdExpbmUgPSBkb2MuZ2V0TGluZShsYXN0TGluZUluZGV4KTtcclxuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSAobGFzdExpbmVJbmRleCA+IDApIHtcclxuICAgICAgICAgICAgICAgICAgICBsYXN0TGluZSA9IGRvYy5nZXRMaW5lKGxhc3RMaW5lSW5kZXgpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChsYXN0TGluZS5sZW5ndGggPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvYy5yZXBsYWNlUmFuZ2UoXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIlwiLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeyBsaW5lOiBsYXN0TGluZUluZGV4LCBjaDogMCB9LFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeyBsaW5lOiBkb2MubGFzdExpbmUoKSwgY2g6IDAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgbGFzdExpbmVJbmRleC0tO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgXHJcbiAgICAgICAgICAgICAgICBsZXQgZm9vdG5vdGVEZXRhaWwgPSBgXFxuW14ke2Zvb3Rub3RlSWR9XTogYDtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxyXG4gICAgICAgICAgICAgICAgaWYgKGxpc3Q9PT1udWxsIHx8IGxpc3QubGVuZ3RoIDwgMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGZvb3Rub3RlRGV0YWlsID0gXCJcXG5cIiArIGZvb3Rub3RlRGV0YWlsO1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBIZWFkaW5nID0gYWRkRm9vdG5vdGVTZWN0aW9uSGVhZGVyKHBsdWdpbik7XHJcbiAgICAgICAgICAgICAgICAgICAgZG9jLnNldExpbmUoZG9jLmxhc3RMaW5lKCksIGxhc3RMaW5lICsgSGVhZGluZyArIGZvb3Rub3RlRGV0YWlsKTtcclxuICAgICAgICAgICAgICAgICAgICBkb2Muc2V0Q3Vyc29yKGRvYy5sYXN0TGluZSgpIC0gMSwgZm9vdG5vdGVEZXRhaWwubGVuZ3RoIC0gMSk7XHJcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIGRvYy5zZXRMaW5lKGRvYy5sYXN0TGluZSgpLCBsYXN0TGluZSArIGZvb3Rub3RlRGV0YWlsKTtcclxuICAgICAgICAgICAgICAgICAgICBkb2Muc2V0Q3Vyc29yKGRvYy5sYXN0TGluZSgpLCBmb290bm90ZURldGFpbC5sZW5ndGggLSAxKTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICByZXR1cm47IFxyXG4gICAgICAgIH1cclxuICAgIH1cclxufVxyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIHNob3VsZENyZWF0ZUZvb3Rub3RlTWFya2VyKFxyXG4gICAgbGluZVRleHQ6IHN0cmluZyxcclxuICAgIGN1cnNvclBvc2l0aW9uOiBFZGl0b3JQb3NpdGlvbixcclxuICAgIGRvYzogRWRpdG9yLFxyXG4gICAgbWFya2Rvd25UZXh0OiBzdHJpbmdcclxuKSB7XHJcbiAgICAvL2NyZWF0ZSBlbXB0eSBmb290bm90ZSBtYXJrZXIgZm9yIG5hbWUgaW5wdXRcclxuIC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HtcclxuICAgICAgICBzdXBlcihwbHVnaW4uYXBwKTtcclxuICAgICAgICB0aGlzLnBsdWdpbiA9IHBsdWdpbjtcclxuICAgIH1cclxuXHJcbiAgICBvblRyaWdnZXIoXHJcbiAgICAgICAgY3Vyc29yUG9zaXRpb246IEVkaXRvclBvc2l0aW9uLCBcclxuICAgICAgICBkb2M6IEVkaXRvciwgXHJcbiAgICAgICAgZmlsZTogVEZpbGVcclxuICAgICk6IEVkaXRvclN1Z2dlc3RUcmlnZ2VySW5mbyB8IG51bGx7XHJcbiAgICAgICAgaWYgKHRoaXMucGx1Z2luLnNldHRpbmdzLmVuYWJsZUF1dG9TdWdnZXN0KSB7XHJcblxyXG4gICAgICAgICAgICBjb25zdCBtZFZpZXcgPSBhcHAud29ya3NwYWNlLmdldEFjdGl2ZVZpZXdPZlR5cGUoTWFya2Rvd25WaWV3KTtcclxuICAgICAgICAgICAgY29uc3QgbGluZVRleHQgPSBkb2MuZ2V0TGluZShjdXJzb3JQb3NpdGlvbi5saW5lKTtcclxuICAgICAgICAgICAgY29uc3QgbWFya2Rvd25UZXh0ID0gbWRWaWV3LmRhdGE7XHJcbiAgICAgICAgICAgIFxyXG4gICAgICAgICAgICBsZXQgcmVPbmx5TWFya2Vyc01hdGNoZXMgPSBsaW5lVGV4dC5tYXRjaChBbGxNYXJrZXJzKTtcclxuXHJcbiAgICAgICAgICAgIGxldCBtYXJrZXJUYXJnZXQgPSBudWxsO1xyXG4gICAgICAgICAgICBsZXQgaW5kZXhPZk1hcmtlckluTGluZSA9IG51bGw7XHJcblxyXG4gICAgICAgICAgICBpZiAocmVPbmx5TWFya2Vyc01hdGNoZXMpe1xyXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPD0gcmVPbmx5TWFya2Vyc01hdGNoZXMubGVuZ3RoOyBpKyspIHtcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbWFya2VyID0gcmVPbmx5TWFya2Vyc01hdGNoZXNbaV07XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG1hcmtlciAhPSB1bmRlZmluZWQpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXhPZk1hcmtlckluTGluZSA9IGxpbmVUZXh0LmluZGV4T2YobWFya2VyKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yUG9zaXRpb24uY2ggPj0gaW5kZXhPZk1hcmtlckluTGluZSAmJlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yUG9zaXRpb24uY2ggPD0gaW5kZXhPZk1hcmtlckluTGluZSArIG1hcmtlci5sZW5ndGhcclxuICAgICAgICAgICAgICAgICAgICAgICAgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJrZXJUYXJnZXQgPSBtYXJrZXI7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgaWYgKG1hcmtlclRhcmdldCAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAvL2V4dHJhY3QgZm9vdG5vdGVcclxuICAgICAgICAgICAgICAgIGxldCBtYXRjaCA9IG1hcmtlclRhcmdldC5tYXRjaChFeHRyYWN0TmFtZUZyb21Gb290bm90ZSlcclxuICAgICAgICAgICAgICAgIC8vZmluZCBpZiB0aGlzIGZvb3Rub3RlIGV4aXN0cyBieSBsaXN0aW5nIGV4aXN0aW5nIGZvb3Rub3RlIGRldGFpbHNcclxuICAgICAgICAgICAgICAgIGlmIChtYXRjaCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBmb290bm90ZUlkID0gbWF0Y2hbMl07XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZvb3Rub3RlSWQgIT09IHVuZGVmaW5lZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxhdGVzdFRyaWdnZXJJbmZvID0ge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kOiBjdXJzb3JQb3NpdGlvbixcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0OiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2g6IGluZGV4T2ZNYXJrZXJJbkxpbmUgKyAyLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmU6IGN1cnNvclBvc2l0aW9uLmxpbmVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWVyeTogZm9vdG5vdGVJZFxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xyXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5sYXRlc3RUcmlnZ2VySW5mb1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIHJldHVybiBudWxsO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBGb290bm90ZV9EZXRhaWxfTmFtZXNfQW5kX1RleHQgPSAvXFxbXFxeKFteXFxbXFxdXSspXFxdOiguKyg/Olxcbig/Oig/IVxcW1xcXlteXFxbXFxdXStcXF06KS4pKykqKS9nO1xyXG5cclxuICAgIEV4dHJhY3RfRm9vdG5vdGVfRGV0YWlsX05hbWVzX0FuZF9UZXh0KFxyXG4gICAgICAgIGRvYzogRWRpdG9yXHJcbiAgICApIHtcclxuICAgICAgICAvL3NlYXJjaCBlYWNoIGxpbmUgZm9yIGZvb3Rub3RlIGRldGFpbHMgYW5kIGFkZCB0byBsaXN0XHJcbiAgICAgICAgLy9zYXZlIHRoZSBmb290bm90ZSBkZXRhaWwgbmFtZSBhcy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index 22c7207..7a0ee47 100644 --- a/.obsidian/plugins/obsidian-footnotes/manifest.json +++ b/.obsidian/plugins/obsidian-footnotes/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-footnotes", "name": "Footnote Shortcut", - "version": "0.1.2", + "version": "0.1.3", "minAppVersion": "0.12.0", "description": "Insert and write footnotes faster", "author": "Alexis Rondeau, Micha Brugger, Jason Qin", diff --git a/.obsidian/plugins/obsidian-git/main.js b/.obsidian/plugins/obsidian-git/main.js index e079ea5..dc70752 100644 --- a/.obsidian/plugins/obsidian-git/main.js +++ b/.obsidian/plugins/obsidian-git/main.js @@ -8759,15 +8759,15 @@ var require_implementation = __commonJS({ } }; keysShim = function keys(object) { - var isObject = object !== null && typeof object === "object"; - var isFunction = toStr.call(object) === "[object Function]"; + var isObject2 = object !== null && typeof object === "object"; + var isFunction2 = toStr.call(object) === "[object Function]"; var isArguments = isArgs(object); - var isString = isObject && toStr.call(object) === "[object String]"; + var isString = isObject2 && toStr.call(object) === "[object String]"; var theKeys = []; - if (!isObject && !isFunction && !isArguments) { + if (!isObject2 && !isFunction2 && !isArguments) { throw new TypeError("Object.keys called on a non-object"); } - var skipProto = hasProtoEnumBug && isFunction; + var skipProto = hasProtoEnumBug && isFunction2; if (isString && object.length > 0 && !has.call(object, 0)) { for (var i = 0; i < object.length; ++i) { theKeys.push(String(i)); @@ -9359,7 +9359,7 @@ var require_define_properties = __commonJS({ var toStr = Object.prototype.toString; var concat = Array.prototype.concat; var origDefineProperty = Object.defineProperty; - var isFunction = function(fn) { + var isFunction2 = function(fn) { return typeof fn === "function" && toStr.call(fn) === "[object Function]"; }; var hasPropertyDescriptors = require_has_property_descriptors()(); @@ -9370,7 +9370,7 @@ var require_define_properties = __commonJS({ if (object[name] === value) { return; } - } else if (!isFunction(predicate) || !predicate()) { + } else if (!isFunction2(predicate) || !predicate()) { return; } } @@ -11123,19 +11123,22 @@ var require_gopd = __commonJS({ } }); -// node_modules/.pnpm/is-typed-array@1.1.10/node_modules/is-typed-array/index.js -var require_is_typed_array = __commonJS({ - "node_modules/.pnpm/is-typed-array@1.1.10/node_modules/is-typed-array/index.js"(exports2, module2) { +// node_modules/.pnpm/which-typed-array@1.1.11/node_modules/which-typed-array/index.js +var require_which_typed_array = __commonJS({ + "node_modules/.pnpm/which-typed-array@1.1.11/node_modules/which-typed-array/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var forEach2 = require_for_each(); var availableTypedArrays = require_available_typed_arrays(); + var callBind = require_call_bind(); var callBound = require_callBound(); + var gOPD = require_gopd(); var $toString = callBound("Object.prototype.toString"); var hasToStringTag = require_shams2()(); - var gOPD = require_gopd(); var g = typeof globalThis === "undefined" ? global : globalThis; var typedArrays = availableTypedArrays(); + var $slice = callBound("String.prototype.slice"); + var getPrototypeOf = Object.getPrototypeOf; var $indexOf = callBound("Array.prototype.indexOf", true) || function indexOf(array, value) { for (var i = 0; i < array.length; i += 1) { if (array[i] === value) { @@ -11144,9 +11147,7 @@ var require_is_typed_array = __commonJS({ } return -1; }; - var $slice = callBound("String.prototype.slice"); - var toStrTags = {}; - var getPrototypeOf = Object.getPrototypeOf; + var cache = { __proto__: null }; if (hasToStringTag && gOPD && getPrototypeOf) { forEach2(typedArrays, function(typedArray) { var arr = new g[typedArray](); @@ -11157,38 +11158,76 @@ var require_is_typed_array = __commonJS({ var superProto = getPrototypeOf(proto); descriptor = gOPD(superProto, Symbol.toStringTag); } - toStrTags[typedArray] = descriptor.get; + cache["$" + typedArray] = callBind(descriptor.get); } }); + } else { + forEach2(typedArrays, function(typedArray) { + var arr = new g[typedArray](); + cache["$" + typedArray] = callBind(arr.slice); + }); } var tryTypedArrays = function tryAllTypedArrays(value) { - var anyTrue = false; - forEach2(toStrTags, function(getter, typedArray) { - if (!anyTrue) { + var found = false; + forEach2(cache, function(getter, typedArray) { + if (!found) { try { - anyTrue = getter.call(value) === typedArray; + if ("$" + getter(value) === typedArray) { + found = $slice(typedArray, 1); + } } catch (e) { } } }); - return anyTrue; + return found; }; - module2.exports = function isTypedArray(value) { + var trySlices = function tryAllSlices(value) { + var found = false; + forEach2(cache, function(getter, name) { + if (!found) { + try { + getter(value); + found = $slice(name, 1); + } catch (e) { + } + } + }); + return found; + }; + module2.exports = function whichTypedArray(value) { if (!value || typeof value !== "object") { return false; } - if (!hasToStringTag || !(Symbol.toStringTag in value)) { + if (!hasToStringTag) { var tag2 = $slice($toString(value), 8, -1); - return $indexOf(typedArrays, tag2) > -1; + if ($indexOf(typedArrays, tag2) > -1) { + return tag2; + } + if (tag2 !== "Object") { + return false; + } + return trySlices(value); } if (!gOPD) { - return false; + return null; } return tryTypedArrays(value); }; } }); +// node_modules/.pnpm/is-typed-array@1.1.12/node_modules/is-typed-array/index.js +var require_is_typed_array = __commonJS({ + "node_modules/.pnpm/is-typed-array@1.1.12/node_modules/is-typed-array/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var whichTypedArray = require_which_typed_array(); + module2.exports = function isTypedArray(value) { + return !!whichTypedArray(value); + }; + } +}); + // node_modules/.pnpm/is-array-buffer@3.0.2/node_modules/is-array-buffer/index.js var require_is_array_buffer = __commonJS({ "node_modules/.pnpm/is-array-buffer@3.0.2/node_modules/is-array-buffer/index.js"(exports2, module2) { @@ -11618,66 +11657,6 @@ var require_which_collection = __commonJS({ } }); -// node_modules/.pnpm/which-typed-array@1.1.9/node_modules/which-typed-array/index.js -var require_which_typed_array = __commonJS({ - "node_modules/.pnpm/which-typed-array@1.1.9/node_modules/which-typed-array/index.js"(exports2, module2) { - "use strict"; - init_polyfill_buffer(); - var forEach2 = require_for_each(); - var availableTypedArrays = require_available_typed_arrays(); - var callBound = require_callBound(); - var gOPD = require_gopd(); - var $toString = callBound("Object.prototype.toString"); - var hasToStringTag = require_shams2()(); - var g = typeof globalThis === "undefined" ? global : globalThis; - var typedArrays = availableTypedArrays(); - var $slice = callBound("String.prototype.slice"); - var toStrTags = {}; - var getPrototypeOf = Object.getPrototypeOf; - if (hasToStringTag && gOPD && getPrototypeOf) { - forEach2(typedArrays, function(typedArray) { - if (typeof g[typedArray] === "function") { - var arr = new g[typedArray](); - if (Symbol.toStringTag in arr) { - var proto = getPrototypeOf(arr); - var descriptor = gOPD(proto, Symbol.toStringTag); - if (!descriptor) { - var superProto = getPrototypeOf(proto); - descriptor = gOPD(superProto, Symbol.toStringTag); - } - toStrTags[typedArray] = descriptor.get; - } - } - }); - } - var tryTypedArrays = function tryAllTypedArrays(value) { - var foundName = false; - forEach2(toStrTags, function(getter, typedArray) { - if (!foundName) { - try { - var name = getter.call(value); - if (name === typedArray) { - foundName = name; - } - } catch (e) { - } - } - }); - return foundName; - }; - var isTypedArray = require_is_typed_array(); - module2.exports = function whichTypedArray(value) { - if (!isTypedArray(value)) { - return false; - } - if (!hasToStringTag || !(Symbol.toStringTag in value)) { - return $slice($toString(value), 8, -1); - } - return tryTypedArrays(value); - }; - } -}); - // node_modules/.pnpm/array-buffer-byte-length@1.0.0/node_modules/array-buffer-byte-length/index.js var require_array_buffer_byte_length = __commonJS({ "node_modules/.pnpm/array-buffer-byte-length@1.0.0/node_modules/array-buffer-byte-length/index.js"(exports2, module2) { @@ -11695,9 +11674,9 @@ var require_array_buffer_byte_length = __commonJS({ } }); -// node_modules/.pnpm/deep-equal@2.2.1/node_modules/deep-equal/index.js +// node_modules/.pnpm/deep-equal@2.2.2/node_modules/deep-equal/index.js var require_deep_equal = __commonJS({ - "node_modules/.pnpm/deep-equal@2.2.1/node_modules/deep-equal/index.js"(exports2, module2) { + "node_modules/.pnpm/deep-equal@2.2.2/node_modules/deep-equal/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var assign2 = require_object(); @@ -11980,9 +11959,20 @@ var require_deep_equal = __commonJS({ } var aWhich = whichTypedArray(a); var bWhich = whichTypedArray(b); - if ((aWhich || bWhich) && aWhich !== bWhich) { + if (aWhich !== bWhich) { return false; } + if (aWhich || bWhich) { + if (a.length !== b.length) { + return false; + } + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; + } var aIsBuffer = isBuffer(a); var bIsBuffer = isBuffer(b); if (aIsBuffer !== bIsBuffer) { @@ -13177,9 +13167,9 @@ var require_hogan = __commonJS({ } }); -// node_modules/.pnpm/feather-icons@4.29.0/node_modules/feather-icons/dist/feather.js +// node_modules/.pnpm/feather-icons@4.29.1/node_modules/feather-icons/dist/feather.js var require_feather = __commonJS({ - "node_modules/.pnpm/feather-icons@4.29.0/node_modules/feather-icons/dist/feather.js"(exports2, module2) { + "node_modules/.pnpm/feather-icons@4.29.1/node_modules/feather-icons/dist/feather.js"(exports2, module2) { init_polyfill_buffer(); (function webpackUniversalModuleDefinition(root2, factory) { if (typeof exports2 === "object" && typeof module2 === "object") @@ -13259,7 +13249,7 @@ var require_feather = __commonJS({ /*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, aperture, archive, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, award, bar-chart-2, bar-chart, battery-charging, battery, bell-off, bell, bluetooth, bold, book-open, book, bookmark, box, briefcase, calendar, camera-off, camera, cast, check-circle, check-square, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, chrome, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-off, cloud-rain, cloud-snow, cloud, code, codepen, codesandbox, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, divide-circle, divide-square, divide, dollar-sign, download-cloud, download, dribbble, droplet, edit-2, edit-3, edit, external-link, eye-off, eye, facebook, fast-forward, feather, figma, file-minus, file-plus, file-text, file, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, grid, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, info, instagram, italic, key, layers, layout, life-buoy, link-2, link, linkedin, list, loader, lock, log-in, log-out, mail, map-pin, map, maximize-2, maximize, meh, menu, message-circle, message-square, mic-off, mic, minimize-2, minimize, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation-2, navigation, octagon, package, paperclip, pause-circle, pause, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, pie-chart, play-circle, play, plus-circle, plus-square, plus, pocket, power, printer, radio, refresh-ccw, refresh-cw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, server, settings, share-2, share, shield-off, shield, shopping-bag, shopping-cart, shuffle, sidebar, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, square, star, stop-circle, sun, sunrise, sunset, table, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash-2, trash, trello, trending-down, trending-up, triangle, truck, tv, twitch, twitter, type, umbrella, underline, unlock, upload-cloud, upload, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume-1, volume-2, volume-x, volume, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */ /***/ function(module3) { - module3.exports = { "activity": '', "airplay": '', "alert-circle": '', "alert-octagon": '', "alert-triangle": '', "align-center": '', "align-justify": '', "align-left": '', "align-right": '', "anchor": '', "aperture": '', "archive": '', "arrow-down-circle": '', "arrow-down-left": '', "arrow-down-right": '', "arrow-down": '', "arrow-left-circle": '', "arrow-left": '', "arrow-right-circle": '', "arrow-right": '', "arrow-up-circle": '', "arrow-up-left": '', "arrow-up-right": '', "arrow-up": '', "at-sign": '', "award": '', "bar-chart-2": '', "bar-chart": '', "battery-charging": '', "battery": '', "bell-off": '', "bell": '', "bluetooth": '', "bold": '', "book-open": '', "book": '', "bookmark": '', "box": '', "briefcase": '', "calendar": '', "camera-off": '', "camera": '', "cast": '', "check-circle": '', "check-square": '', "check": '', "chevron-down": '', "chevron-left": '', "chevron-right": '', "chevron-up": '', "chevrons-down": '', "chevrons-left": '', "chevrons-right": '', "chevrons-up": '', "chrome": '', "circle": '', "clipboard": '', "clock": '', "cloud-drizzle": '', "cloud-lightning": '', "cloud-off": '', "cloud-rain": '', "cloud-snow": '', "cloud": '', "code": '', "codepen": '', "codesandbox": '', "coffee": '', "columns": '', "command": '', "compass": '', "copy": '', "corner-down-left": '', "corner-down-right": '', "corner-left-down": '', "corner-left-up": '', "corner-right-down": '', "corner-right-up": '', "corner-up-left": '', "corner-up-right": '', "cpu": '', "credit-card": '', "crop": '', "crosshair": '', "database": '', "delete": '', "disc": '', "divide-circle": '', "divide-square": '', "divide": '', "dollar-sign": '', "download-cloud": '', "download": '', "dribbble": '', "droplet": '', "edit-2": '', "edit-3": '', "edit": '', "external-link": '', "eye-off": '', "eye": '', "facebook": '', "fast-forward": '', "feather": '', "figma": '', "file-minus": '', "file-plus": '', "file-text": '', "file": '', "film": '', "filter": '', "flag": '', "folder-minus": '', "folder-plus": '', "folder": '', "framer": '', "frown": '', "gift": '', "git-branch": '', "git-commit": '', "git-merge": '', "git-pull-request": '', "github": '', "gitlab": '', "globe": '', "grid": '', "hard-drive": '', "hash": '', "headphones": '', "heart": '', "help-circle": '', "hexagon": '', "home": '', "image": '', "inbox": '', "info": '', "instagram": '', "italic": '', "key": '', "layers": '', "layout": '', "life-buoy": '', "link-2": '', "link": '', "linkedin": '', "list": '', "loader": '', "lock": '', "log-in": '', "log-out": '', "mail": '', "map-pin": '', "map": '', "maximize-2": '', "maximize": '', "meh": '', "menu": '', "message-circle": '', "message-square": '', "mic-off": '', "mic": '', "minimize-2": '', "minimize": '', "minus-circle": '', "minus-square": '', "minus": '', "monitor": '', "moon": '', "more-horizontal": '', "more-vertical": '', "mouse-pointer": '', "move": '', "music": '', "navigation-2": '', "navigation": '', "octagon": '', "package": '', "paperclip": '', "pause-circle": '', "pause": '', "pen-tool": '', "percent": '', "phone-call": '', "phone-forwarded": '', "phone-incoming": '', "phone-missed": '', "phone-off": '', "phone-outgoing": '', "phone": '', "pie-chart": '', "play-circle": '', "play": '', "plus-circle": '', "plus-square": '', "plus": '', "pocket": '', "power": '', "printer": '', "radio": '', "refresh-ccw": '', "refresh-cw": '', "repeat": '', "rewind": '', "rotate-ccw": '', "rotate-cw": '', "rss": '', "save": '', "scissors": '', "search": '', "send": '', "server": '', "settings": '', "share-2": '', "share": '', "shield-off": '', "shield": '', "shopping-bag": '', "shopping-cart": '', "shuffle": '', "sidebar": '', "skip-back": '', "skip-forward": '', "slack": '', "slash": '', "sliders": '', "smartphone": '', "smile": '', "speaker": '', "square": '', "star": '', "stop-circle": '', "sun": '', "sunrise": '', "sunset": '', "table": '', "tablet": '', "tag": '', "target": '', "terminal": '', "thermometer": '', "thumbs-down": '', "thumbs-up": '', "toggle-left": '', "toggle-right": '', "tool": '', "trash-2": '', "trash": '', "trello": '', "trending-down": '', "trending-up": '', "triangle": '', "truck": '', "tv": '', "twitch": '', "twitter": '', "type": '', "umbrella": '', "underline": '', "unlock": '', "upload-cloud": '', "upload": '', "user-check": '', "user-minus": '', "user-plus": '', "user-x": '', "user": '', "users": '', "video-off": '', "video": '', "voicemail": '', "volume-1": '', "volume-2": '', "volume-x": '', "volume": '', "watch": '', "wifi-off": '', "wifi": '', "wind": '', "x-circle": '', "x-octagon": '', "x-square": '', "x": '', "youtube": '', "zap-off": '', "zap": '', "zoom-in": '', "zoom-out": '' }; + module3.exports = { "activity": '', "airplay": '', "alert-circle": '', "alert-octagon": '', "alert-triangle": '', "align-center": '', "align-justify": '', "align-left": '', "align-right": '', "anchor": '', "aperture": '', "archive": '', "arrow-down-circle": '', "arrow-down-left": '', "arrow-down-right": '', "arrow-down": '', "arrow-left-circle": '', "arrow-left": '', "arrow-right-circle": '', "arrow-right": '', "arrow-up-circle": '', "arrow-up-left": '', "arrow-up-right": '', "arrow-up": '', "at-sign": '', "award": '', "bar-chart-2": '', "bar-chart": '', "battery-charging": '', "battery": '', "bell-off": '', "bell": '', "bluetooth": '', "bold": '', "book-open": '', "book": '', "bookmark": '', "box": '', "briefcase": '', "calendar": '', "camera-off": '', "camera": '', "cast": '', "check-circle": '', "check-square": '', "check": '', "chevron-down": '', "chevron-left": '', "chevron-right": '', "chevron-up": '', "chevrons-down": '', "chevrons-left": '', "chevrons-right": '', "chevrons-up": '', "chrome": '', "circle": '', "clipboard": '', "clock": '', "cloud-drizzle": '', "cloud-lightning": '', "cloud-off": '', "cloud-rain": '', "cloud-snow": '', "cloud": '', "code": '', "codepen": '', "codesandbox": '', "coffee": '', "columns": '', "command": '', "compass": '', "copy": '', "corner-down-left": '', "corner-down-right": '', "corner-left-down": '', "corner-left-up": '', "corner-right-down": '', "corner-right-up": '', "corner-up-left": '', "corner-up-right": '', "cpu": '', "credit-card": '', "crop": '', "crosshair": '', "database": '', "delete": '', "disc": '', "divide-circle": '', "divide-square": '', "divide": '', "dollar-sign": '', "download-cloud": '', "download": '', "dribbble": '', "droplet": '', "edit-2": '', "edit-3": '', "edit": '', "external-link": '', "eye-off": '', "eye": '', "facebook": '', "fast-forward": '', "feather": '', "figma": '', "file-minus": '', "file-plus": '', "file-text": '', "file": '', "film": '', "filter": '', "flag": '', "folder-minus": '', "folder-plus": '', "folder": '', "framer": '', "frown": '', "gift": '', "git-branch": '', "git-commit": '', "git-merge": '', "git-pull-request": '', "github": '', "gitlab": '', "globe": '', "grid": '', "hard-drive": '', "hash": '', "headphones": '', "heart": '', "help-circle": '', "hexagon": '', "home": '', "image": '', "inbox": '', "info": '', "instagram": '', "italic": '', "key": '', "layers": '', "layout": '', "life-buoy": '', "link-2": '', "link": '', "linkedin": '', "list": '', "loader": '', "lock": '', "log-in": '', "log-out": '', "mail": '', "map-pin": '', "map": '', "maximize-2": '', "maximize": '', "meh": '', "menu": '', "message-circle": '', "message-square": '', "mic-off": '', "mic": '', "minimize-2": '', "minimize": '', "minus-circle": '', "minus-square": '', "minus": '', "monitor": '', "moon": '', "more-horizontal": '', "more-vertical": '', "mouse-pointer": '', "move": '', "music": '', "navigation-2": '', "navigation": '', "octagon": '', "package": '', "paperclip": '', "pause-circle": '', "pause": '', "pen-tool": '', "percent": '', "phone-call": '', "phone-forwarded": '', "phone-incoming": '', "phone-missed": '', "phone-off": '', "phone-outgoing": '', "phone": '', "pie-chart": '', "play-circle": '', "play": '', "plus-circle": '', "plus-square": '', "plus": '', "pocket": '', "power": '', "printer": '', "radio": '', "refresh-ccw": '', "refresh-cw": '', "repeat": '', "rewind": '', "rotate-ccw": '', "rotate-cw": '', "rss": '', "save": '', "scissors": '', "search": '', "send": '', "server": '', "settings": '', "share-2": '', "share": '', "shield-off": '', "shield": '', "shopping-bag": '', "shopping-cart": '', "shuffle": '', "sidebar": '', "skip-back": '', "skip-forward": '', "slack": '', "slash": '', "sliders": '', "smartphone": '', "smile": '', "speaker": '', "square": '', "star": '', "stop-circle": '', "sun": '', "sunrise": '', "sunset": '', "table": '', "tablet": '', "tag": '', "target": '', "terminal": '', "thermometer": '', "thumbs-down": '', "thumbs-up": '', "toggle-left": '', "toggle-right": '', "tool": '', "trash-2": '', "trash": '', "trello": '', "trending-down": '', "trending-up": '', "triangle": '', "truck": '', "tv": '', "twitch": '', "twitter": '', "type": '', "umbrella": '', "underline": '', "unlock": '', "upload-cloud": '', "upload": '', "user-check": '', "user-minus": '', "user-plus": '', "user-x": '', "user": '', "users": '', "video-off": '', "video": '', "voicemail": '', "volume-1": '', "volume-2": '', "volume-x": '', "volume": '', "watch": '', "wifi-off": '', "wifi": '', "wind": '', "x-circle": '', "x-octagon": '', "x-square": '', "x": '', "youtube": '', "zap-off": '', "zap": '', "zoom-in": '', "zoom-out": '' }; } ), /***/ @@ -13392,12 +13382,12 @@ var require_feather = __commonJS({ /*! no static exports found */ /***/ function(module3, exports3, __webpack_require__) { - var isObject = __webpack_require__( + var isObject2 = __webpack_require__( /*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js" ); module3.exports = function(it) { - if (!isObject(it)) { + if (!isObject2(it)) { throw TypeError(String(it) + " is not an object"); } return it; @@ -13993,12 +13983,12 @@ var require_feather = __commonJS({ /*! ../internals/global */ "./node_modules/core-js/internals/global.js" ); - var isObject = __webpack_require__( + var isObject2 = __webpack_require__( /*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js" ); var document2 = global2.document; - var exist = isObject(document2) && isObject(document2.createElement); + var exist = isObject2(document2) && isObject2(document2.createElement); module3.exports = function(it) { return exist ? document2.createElement(it) : {}; }; @@ -14312,7 +14302,7 @@ var require_feather = __commonJS({ /*! ../internals/global */ "./node_modules/core-js/internals/global.js" ); - var isObject = __webpack_require__( + var isObject2 = __webpack_require__( /*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js" ); @@ -14340,7 +14330,7 @@ var require_feather = __commonJS({ var getterFor = function(TYPE) { return function(it) { var state; - if (!isObject(it) || (state = get(it)).type !== TYPE) { + if (!isObject2(it) || (state = get(it)).type !== TYPE) { throw TypeError("Incompatible receiver, " + TYPE + " required"); } return state; @@ -15310,19 +15300,19 @@ var require_feather = __commonJS({ /*! no static exports found */ /***/ function(module3, exports3, __webpack_require__) { - var isObject = __webpack_require__( + var isObject2 = __webpack_require__( /*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js" ); module3.exports = function(it, S) { - if (!isObject(it)) + if (!isObject2(it)) return it; var fn, val; - if (S && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it))) + if (S && typeof (fn = it.toString) == "function" && !isObject2(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == "function" && !isObject(val = fn.call(it))) + if (typeof (fn = it.valueOf) == "function" && !isObject2(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == "function" && !isObject(val = fn.call(it))) + if (!S && typeof (fn = it.toString) == "function" && !isObject2(val = fn.call(it))) return val; throw TypeError("Can't convert object to primitive value"); }; @@ -15351,7 +15341,7 @@ var require_feather = __commonJS({ /*! no static exports found */ /***/ function(module3, exports3, __webpack_require__) { - var isObject = __webpack_require__( + var isObject2 = __webpack_require__( /*! ../internals/is-object */ "./node_modules/core-js/internals/is-object.js" ); @@ -15361,7 +15351,7 @@ var require_feather = __commonJS({ ); module3.exports = function(O, proto) { anObject(O); - if (!isObject(proto) && proto !== null) { + if (!isObject2(proto) && proto !== null) { throw TypeError("Can't set " + String(proto) + " as a prototype"); } }; @@ -15739,10 +15729,10 @@ var require_feather = __commonJS({ /*!***********************!*\ !*** ./src/tags.json ***! \***********************/ - /*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, archive, at-sign, award, aperture, bar-chart, bar-chart-2, battery, battery-charging, bell, bell-off, bluetooth, book-open, book, bookmark, box, briefcase, calendar, camera, cast, chevron-down, chevron-up, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-rain, cloud-snow, cloud, codepen, codesandbox, code, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, dollar-sign, droplet, edit, edit-2, edit-3, eye, eye-off, external-link, facebook, fast-forward, figma, file-minus, file-plus, file-text, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, instagram, key, layers, layout, life-bouy, link, link-2, linkedin, list, lock, log-in, log-out, mail, map-pin, map, maximize, maximize-2, meh, menu, message-circle, message-square, mic-off, mic, minimize, minimize-2, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation, navigation-2, octagon, package, paperclip, pause, pause-circle, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, play, pie-chart, play-circle, plus, plus-circle, plus-square, pocket, power, printer, radio, refresh-cw, refresh-ccw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, settings, share-2, shield, shield-off, shopping-bag, shopping-cart, shuffle, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, star, stop-circle, sun, sunrise, sunset, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash, trash-2, triangle, truck, tv, twitch, twitter, type, umbrella, unlock, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume, volume-1, volume-2, volume-x, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */ + /*! exports provided: activity, airplay, alert-circle, alert-octagon, alert-triangle, align-center, align-justify, align-left, align-right, anchor, archive, at-sign, award, aperture, bar-chart, bar-chart-2, battery, battery-charging, bell, bell-off, bluetooth, book-open, book, bookmark, box, briefcase, calendar, camera, cast, chevron-down, chevron-up, circle, clipboard, clock, cloud-drizzle, cloud-lightning, cloud-rain, cloud-snow, cloud, codepen, codesandbox, code, coffee, columns, command, compass, copy, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, cpu, credit-card, crop, crosshair, database, delete, disc, dollar-sign, droplet, edit, edit-2, edit-3, eye, eye-off, external-link, facebook, fast-forward, figma, file-minus, file-plus, file-text, film, filter, flag, folder-minus, folder-plus, folder, framer, frown, gift, git-branch, git-commit, git-merge, git-pull-request, github, gitlab, globe, hard-drive, hash, headphones, heart, help-circle, hexagon, home, image, inbox, instagram, key, layers, layout, life-buoy, link, link-2, linkedin, list, lock, log-in, log-out, mail, map-pin, map, maximize, maximize-2, meh, menu, message-circle, message-square, mic-off, mic, minimize, minimize-2, minus, monitor, moon, more-horizontal, more-vertical, mouse-pointer, move, music, navigation, navigation-2, octagon, package, paperclip, pause, pause-circle, pen-tool, percent, phone-call, phone-forwarded, phone-incoming, phone-missed, phone-off, phone-outgoing, phone, play, pie-chart, play-circle, plus, plus-circle, plus-square, pocket, power, printer, radio, refresh-cw, refresh-ccw, repeat, rewind, rotate-ccw, rotate-cw, rss, save, scissors, search, send, settings, share-2, shield, shield-off, shopping-bag, shopping-cart, shuffle, skip-back, skip-forward, slack, slash, sliders, smartphone, smile, speaker, star, stop-circle, sun, sunrise, sunset, tablet, tag, target, terminal, thermometer, thumbs-down, thumbs-up, toggle-left, toggle-right, tool, trash, trash-2, triangle, truck, tv, twitch, twitter, type, umbrella, unlock, user-check, user-minus, user-plus, user-x, user, users, video-off, video, voicemail, volume, volume-1, volume-2, volume-x, watch, wifi-off, wifi, wind, x-circle, x-octagon, x-square, x, youtube, zap-off, zap, zoom-in, zoom-out, default */ /***/ function(module3) { - module3.exports = { "activity": ["pulse", "health", "action", "motion"], "airplay": ["stream", "cast", "mirroring"], "alert-circle": ["warning", "alert", "danger"], "alert-octagon": ["warning", "alert", "danger"], "alert-triangle": ["warning", "alert", "danger"], "align-center": ["text alignment", "center"], "align-justify": ["text alignment", "justified"], "align-left": ["text alignment", "left"], "align-right": ["text alignment", "right"], "anchor": [], "archive": ["index", "box"], "at-sign": ["mention", "at", "email", "message"], "award": ["achievement", "badge"], "aperture": ["camera", "photo"], "bar-chart": ["statistics", "diagram", "graph"], "bar-chart-2": ["statistics", "diagram", "graph"], "battery": ["power", "electricity"], "battery-charging": ["power", "electricity"], "bell": ["alarm", "notification", "sound"], "bell-off": ["alarm", "notification", "silent"], "bluetooth": ["wireless"], "book-open": ["read", "library"], "book": ["read", "dictionary", "booklet", "magazine", "library"], "bookmark": ["read", "clip", "marker", "tag"], "box": ["cube"], "briefcase": ["work", "bag", "baggage", "folder"], "calendar": ["date"], "camera": ["photo"], "cast": ["chromecast", "airplay"], "chevron-down": ["expand"], "chevron-up": ["collapse"], "circle": ["off", "zero", "record"], "clipboard": ["copy"], "clock": ["time", "watch", "alarm"], "cloud-drizzle": ["weather", "shower"], "cloud-lightning": ["weather", "bolt"], "cloud-rain": ["weather"], "cloud-snow": ["weather", "blizzard"], "cloud": ["weather"], "codepen": ["logo"], "codesandbox": ["logo"], "code": ["source", "programming"], "coffee": ["drink", "cup", "mug", "tea", "cafe", "hot", "beverage"], "columns": ["layout"], "command": ["keyboard", "cmd", "terminal", "prompt"], "compass": ["navigation", "safari", "travel", "direction"], "copy": ["clone", "duplicate"], "corner-down-left": ["arrow", "return"], "corner-down-right": ["arrow"], "corner-left-down": ["arrow"], "corner-left-up": ["arrow"], "corner-right-down": ["arrow"], "corner-right-up": ["arrow"], "corner-up-left": ["arrow"], "corner-up-right": ["arrow"], "cpu": ["processor", "technology"], "credit-card": ["purchase", "payment", "cc"], "crop": ["photo", "image"], "crosshair": ["aim", "target"], "database": ["storage", "memory"], "delete": ["remove"], "disc": ["album", "cd", "dvd", "music"], "dollar-sign": ["currency", "money", "payment"], "droplet": ["water"], "edit": ["pencil", "change"], "edit-2": ["pencil", "change"], "edit-3": ["pencil", "change"], "eye": ["view", "watch"], "eye-off": ["view", "watch", "hide", "hidden"], "external-link": ["outbound"], "facebook": ["logo", "social"], "fast-forward": ["music"], "figma": ["logo", "design", "tool"], "file-minus": ["delete", "remove", "erase"], "file-plus": ["add", "create", "new"], "file-text": ["data", "txt", "pdf"], "film": ["movie", "video"], "filter": ["funnel", "hopper"], "flag": ["report"], "folder-minus": ["directory"], "folder-plus": ["directory"], "folder": ["directory"], "framer": ["logo", "design", "tool"], "frown": ["emoji", "face", "bad", "sad", "emotion"], "gift": ["present", "box", "birthday", "party"], "git-branch": ["code", "version control"], "git-commit": ["code", "version control"], "git-merge": ["code", "version control"], "git-pull-request": ["code", "version control"], "github": ["logo", "version control"], "gitlab": ["logo", "version control"], "globe": ["world", "browser", "language", "translate"], "hard-drive": ["computer", "server", "memory", "data"], "hash": ["hashtag", "number", "pound"], "headphones": ["music", "audio", "sound"], "heart": ["like", "love", "emotion"], "help-circle": ["question mark"], "hexagon": ["shape", "node.js", "logo"], "home": ["house", "living"], "image": ["picture"], "inbox": ["email"], "instagram": ["logo", "camera"], "key": ["password", "login", "authentication", "secure"], "layers": ["stack"], "layout": ["window", "webpage"], "life-bouy": ["help", "life ring", "support"], "link": ["chain", "url"], "link-2": ["chain", "url"], "linkedin": ["logo", "social media"], "list": ["options"], "lock": ["security", "password", "secure"], "log-in": ["sign in", "arrow", "enter"], "log-out": ["sign out", "arrow", "exit"], "mail": ["email", "message"], "map-pin": ["location", "navigation", "travel", "marker"], "map": ["location", "navigation", "travel"], "maximize": ["fullscreen"], "maximize-2": ["fullscreen", "arrows", "expand"], "meh": ["emoji", "face", "neutral", "emotion"], "menu": ["bars", "navigation", "hamburger"], "message-circle": ["comment", "chat"], "message-square": ["comment", "chat"], "mic-off": ["record", "sound", "mute"], "mic": ["record", "sound", "listen"], "minimize": ["exit fullscreen", "close"], "minimize-2": ["exit fullscreen", "arrows", "close"], "minus": ["subtract"], "monitor": ["tv", "screen", "display"], "moon": ["dark", "night"], "more-horizontal": ["ellipsis"], "more-vertical": ["ellipsis"], "mouse-pointer": ["arrow", "cursor"], "move": ["arrows"], "music": ["note"], "navigation": ["location", "travel"], "navigation-2": ["location", "travel"], "octagon": ["stop"], "package": ["box", "container"], "paperclip": ["attachment"], "pause": ["music", "stop"], "pause-circle": ["music", "audio", "stop"], "pen-tool": ["vector", "drawing"], "percent": ["discount"], "phone-call": ["ring"], "phone-forwarded": ["call"], "phone-incoming": ["call"], "phone-missed": ["call"], "phone-off": ["call", "mute"], "phone-outgoing": ["call"], "phone": ["call"], "play": ["music", "start"], "pie-chart": ["statistics", "diagram"], "play-circle": ["music", "start"], "plus": ["add", "new"], "plus-circle": ["add", "new"], "plus-square": ["add", "new"], "pocket": ["logo", "save"], "power": ["on", "off"], "printer": ["fax", "office", "device"], "radio": ["signal"], "refresh-cw": ["synchronise", "arrows"], "refresh-ccw": ["arrows"], "repeat": ["loop", "arrows"], "rewind": ["music"], "rotate-ccw": ["arrow"], "rotate-cw": ["arrow"], "rss": ["feed", "subscribe"], "save": ["floppy disk"], "scissors": ["cut"], "search": ["find", "magnifier", "magnifying glass"], "send": ["message", "mail", "email", "paper airplane", "paper aeroplane"], "settings": ["cog", "edit", "gear", "preferences"], "share-2": ["network", "connections"], "shield": ["security", "secure"], "shield-off": ["security", "insecure"], "shopping-bag": ["ecommerce", "cart", "purchase", "store"], "shopping-cart": ["ecommerce", "cart", "purchase", "store"], "shuffle": ["music"], "skip-back": ["music"], "skip-forward": ["music"], "slack": ["logo"], "slash": ["ban", "no"], "sliders": ["settings", "controls"], "smartphone": ["cellphone", "device"], "smile": ["emoji", "face", "happy", "good", "emotion"], "speaker": ["audio", "music"], "star": ["bookmark", "favorite", "like"], "stop-circle": ["media", "music"], "sun": ["brightness", "weather", "light"], "sunrise": ["weather", "time", "morning", "day"], "sunset": ["weather", "time", "evening", "night"], "tablet": ["device"], "tag": ["label"], "target": ["logo", "bullseye"], "terminal": ["code", "command line", "prompt"], "thermometer": ["temperature", "celsius", "fahrenheit", "weather"], "thumbs-down": ["dislike", "bad", "emotion"], "thumbs-up": ["like", "good", "emotion"], "toggle-left": ["on", "off", "switch"], "toggle-right": ["on", "off", "switch"], "tool": ["settings", "spanner"], "trash": ["garbage", "delete", "remove", "bin"], "trash-2": ["garbage", "delete", "remove", "bin"], "triangle": ["delta"], "truck": ["delivery", "van", "shipping", "transport", "lorry"], "tv": ["television", "stream"], "twitch": ["logo"], "twitter": ["logo", "social"], "type": ["text"], "umbrella": ["rain", "weather"], "unlock": ["security"], "user-check": ["followed", "subscribed"], "user-minus": ["delete", "remove", "unfollow", "unsubscribe"], "user-plus": ["new", "add", "create", "follow", "subscribe"], "user-x": ["delete", "remove", "unfollow", "unsubscribe", "unavailable"], "user": ["person", "account"], "users": ["group"], "video-off": ["camera", "movie", "film"], "video": ["camera", "movie", "film"], "voicemail": ["phone"], "volume": ["music", "sound", "mute"], "volume-1": ["music", "sound"], "volume-2": ["music", "sound"], "volume-x": ["music", "sound", "mute"], "watch": ["clock", "time"], "wifi-off": ["disabled"], "wifi": ["connection", "signal", "wireless"], "wind": ["weather", "air"], "x-circle": ["cancel", "close", "delete", "remove", "times", "clear"], "x-octagon": ["delete", "stop", "alert", "warning", "times", "clear"], "x-square": ["cancel", "close", "delete", "remove", "times", "clear"], "x": ["cancel", "close", "delete", "remove", "times", "clear"], "youtube": ["logo", "video", "play"], "zap-off": ["flash", "camera", "lightning"], "zap": ["flash", "camera", "lightning"], "zoom-in": ["magnifying glass"], "zoom-out": ["magnifying glass"] }; + module3.exports = { "activity": ["pulse", "health", "action", "motion"], "airplay": ["stream", "cast", "mirroring"], "alert-circle": ["warning", "alert", "danger"], "alert-octagon": ["warning", "alert", "danger"], "alert-triangle": ["warning", "alert", "danger"], "align-center": ["text alignment", "center"], "align-justify": ["text alignment", "justified"], "align-left": ["text alignment", "left"], "align-right": ["text alignment", "right"], "anchor": [], "archive": ["index", "box"], "at-sign": ["mention", "at", "email", "message"], "award": ["achievement", "badge"], "aperture": ["camera", "photo"], "bar-chart": ["statistics", "diagram", "graph"], "bar-chart-2": ["statistics", "diagram", "graph"], "battery": ["power", "electricity"], "battery-charging": ["power", "electricity"], "bell": ["alarm", "notification", "sound"], "bell-off": ["alarm", "notification", "silent"], "bluetooth": ["wireless"], "book-open": ["read", "library"], "book": ["read", "dictionary", "booklet", "magazine", "library"], "bookmark": ["read", "clip", "marker", "tag"], "box": ["cube"], "briefcase": ["work", "bag", "baggage", "folder"], "calendar": ["date"], "camera": ["photo"], "cast": ["chromecast", "airplay"], "chevron-down": ["expand"], "chevron-up": ["collapse"], "circle": ["off", "zero", "record"], "clipboard": ["copy"], "clock": ["time", "watch", "alarm"], "cloud-drizzle": ["weather", "shower"], "cloud-lightning": ["weather", "bolt"], "cloud-rain": ["weather"], "cloud-snow": ["weather", "blizzard"], "cloud": ["weather"], "codepen": ["logo"], "codesandbox": ["logo"], "code": ["source", "programming"], "coffee": ["drink", "cup", "mug", "tea", "cafe", "hot", "beverage"], "columns": ["layout"], "command": ["keyboard", "cmd", "terminal", "prompt"], "compass": ["navigation", "safari", "travel", "direction"], "copy": ["clone", "duplicate"], "corner-down-left": ["arrow", "return"], "corner-down-right": ["arrow"], "corner-left-down": ["arrow"], "corner-left-up": ["arrow"], "corner-right-down": ["arrow"], "corner-right-up": ["arrow"], "corner-up-left": ["arrow"], "corner-up-right": ["arrow"], "cpu": ["processor", "technology"], "credit-card": ["purchase", "payment", "cc"], "crop": ["photo", "image"], "crosshair": ["aim", "target"], "database": ["storage", "memory"], "delete": ["remove"], "disc": ["album", "cd", "dvd", "music"], "dollar-sign": ["currency", "money", "payment"], "droplet": ["water"], "edit": ["pencil", "change"], "edit-2": ["pencil", "change"], "edit-3": ["pencil", "change"], "eye": ["view", "watch"], "eye-off": ["view", "watch", "hide", "hidden"], "external-link": ["outbound"], "facebook": ["logo", "social"], "fast-forward": ["music"], "figma": ["logo", "design", "tool"], "file-minus": ["delete", "remove", "erase"], "file-plus": ["add", "create", "new"], "file-text": ["data", "txt", "pdf"], "film": ["movie", "video"], "filter": ["funnel", "hopper"], "flag": ["report"], "folder-minus": ["directory"], "folder-plus": ["directory"], "folder": ["directory"], "framer": ["logo", "design", "tool"], "frown": ["emoji", "face", "bad", "sad", "emotion"], "gift": ["present", "box", "birthday", "party"], "git-branch": ["code", "version control"], "git-commit": ["code", "version control"], "git-merge": ["code", "version control"], "git-pull-request": ["code", "version control"], "github": ["logo", "version control"], "gitlab": ["logo", "version control"], "globe": ["world", "browser", "language", "translate"], "hard-drive": ["computer", "server", "memory", "data"], "hash": ["hashtag", "number", "pound"], "headphones": ["music", "audio", "sound"], "heart": ["like", "love", "emotion"], "help-circle": ["question mark"], "hexagon": ["shape", "node.js", "logo"], "home": ["house", "living"], "image": ["picture"], "inbox": ["email"], "instagram": ["logo", "camera"], "key": ["password", "login", "authentication", "secure"], "layers": ["stack"], "layout": ["window", "webpage"], "life-buoy": ["help", "life ring", "support"], "link": ["chain", "url"], "link-2": ["chain", "url"], "linkedin": ["logo", "social media"], "list": ["options"], "lock": ["security", "password", "secure"], "log-in": ["sign in", "arrow", "enter"], "log-out": ["sign out", "arrow", "exit"], "mail": ["email", "message"], "map-pin": ["location", "navigation", "travel", "marker"], "map": ["location", "navigation", "travel"], "maximize": ["fullscreen"], "maximize-2": ["fullscreen", "arrows", "expand"], "meh": ["emoji", "face", "neutral", "emotion"], "menu": ["bars", "navigation", "hamburger"], "message-circle": ["comment", "chat"], "message-square": ["comment", "chat"], "mic-off": ["record", "sound", "mute"], "mic": ["record", "sound", "listen"], "minimize": ["exit fullscreen", "close"], "minimize-2": ["exit fullscreen", "arrows", "close"], "minus": ["subtract"], "monitor": ["tv", "screen", "display"], "moon": ["dark", "night"], "more-horizontal": ["ellipsis"], "more-vertical": ["ellipsis"], "mouse-pointer": ["arrow", "cursor"], "move": ["arrows"], "music": ["note"], "navigation": ["location", "travel"], "navigation-2": ["location", "travel"], "octagon": ["stop"], "package": ["box", "container"], "paperclip": ["attachment"], "pause": ["music", "stop"], "pause-circle": ["music", "audio", "stop"], "pen-tool": ["vector", "drawing"], "percent": ["discount"], "phone-call": ["ring"], "phone-forwarded": ["call"], "phone-incoming": ["call"], "phone-missed": ["call"], "phone-off": ["call", "mute"], "phone-outgoing": ["call"], "phone": ["call"], "play": ["music", "start"], "pie-chart": ["statistics", "diagram"], "play-circle": ["music", "start"], "plus": ["add", "new"], "plus-circle": ["add", "new"], "plus-square": ["add", "new"], "pocket": ["logo", "save"], "power": ["on", "off"], "printer": ["fax", "office", "device"], "radio": ["signal"], "refresh-cw": ["synchronise", "arrows"], "refresh-ccw": ["arrows"], "repeat": ["loop", "arrows"], "rewind": ["music"], "rotate-ccw": ["arrow"], "rotate-cw": ["arrow"], "rss": ["feed", "subscribe"], "save": ["floppy disk"], "scissors": ["cut"], "search": ["find", "magnifier", "magnifying glass"], "send": ["message", "mail", "email", "paper airplane", "paper aeroplane"], "settings": ["cog", "edit", "gear", "preferences"], "share-2": ["network", "connections"], "shield": ["security", "secure"], "shield-off": ["security", "insecure"], "shopping-bag": ["ecommerce", "cart", "purchase", "store"], "shopping-cart": ["ecommerce", "cart", "purchase", "store"], "shuffle": ["music"], "skip-back": ["music"], "skip-forward": ["music"], "slack": ["logo"], "slash": ["ban", "no"], "sliders": ["settings", "controls"], "smartphone": ["cellphone", "device"], "smile": ["emoji", "face", "happy", "good", "emotion"], "speaker": ["audio", "music"], "star": ["bookmark", "favorite", "like"], "stop-circle": ["media", "music"], "sun": ["brightness", "weather", "light"], "sunrise": ["weather", "time", "morning", "day"], "sunset": ["weather", "time", "evening", "night"], "tablet": ["device"], "tag": ["label"], "target": ["logo", "bullseye"], "terminal": ["code", "command line", "prompt"], "thermometer": ["temperature", "celsius", "fahrenheit", "weather"], "thumbs-down": ["dislike", "bad", "emotion"], "thumbs-up": ["like", "good", "emotion"], "toggle-left": ["on", "off", "switch"], "toggle-right": ["on", "off", "switch"], "tool": ["settings", "spanner"], "trash": ["garbage", "delete", "remove", "bin"], "trash-2": ["garbage", "delete", "remove", "bin"], "triangle": ["delta"], "truck": ["delivery", "van", "shipping", "transport", "lorry"], "tv": ["television", "stream"], "twitch": ["logo"], "twitter": ["logo", "social"], "type": ["text"], "umbrella": ["rain", "weather"], "unlock": ["security"], "user-check": ["followed", "subscribed"], "user-minus": ["delete", "remove", "unfollow", "unsubscribe"], "user-plus": ["new", "add", "create", "follow", "subscribe"], "user-x": ["delete", "remove", "unfollow", "unsubscribe", "unavailable"], "user": ["person", "account"], "users": ["group"], "video-off": ["camera", "movie", "film"], "video": ["camera", "movie", "film"], "voicemail": ["phone"], "volume": ["music", "sound", "mute"], "volume-1": ["music", "sound"], "volume-2": ["music", "sound"], "volume-x": ["music", "sound", "mute"], "watch": ["clock", "time"], "wifi-off": ["disabled"], "wifi": ["connection", "signal", "wireless"], "wind": ["weather", "air"], "x-circle": ["cancel", "close", "delete", "remove", "times", "clear"], "x-octagon": ["delete", "stop", "alert", "warning", "times", "clear"], "x-square": ["cancel", "close", "delete", "remove", "times", "clear"], "x": ["cancel", "close", "delete", "remove", "times", "clear"], "youtube": ["logo", "video", "play"], "zap-off": ["flash", "camera", "lightning"], "zap": ["flash", "camera", "lightning"], "zoom-in": ["magnifying glass"], "zoom-out": ["magnifying glass"] }; } ), /***/ @@ -15812,7 +15802,7 @@ __export(main_exports, { module.exports = __toCommonJS(main_exports); init_polyfill_buffer(); -// node_modules/.pnpm/isomorphic-git@1.24.2/node_modules/isomorphic-git/index.js +// node_modules/.pnpm/isomorphic-git@1.24.5/node_modules/isomorphic-git/index.js init_polyfill_buffer(); var import_async_lock = __toESM(require_async_lock(), 1); var import_sha1 = __toESM(require_sha1(), 1); @@ -19132,6 +19122,15 @@ async function rmRecursive(fs, filepath) { await fs.rmdir(filepath); } } +function isPromiseLike(obj) { + return isObject(obj) && isFunction(obj.then) && isFunction(obj.catch); +} +function isObject(obj) { + return obj && typeof obj === "object"; +} +function isFunction(obj) { + return typeof obj === "function"; +} function isPromiseFs(fs) { const test = (targetFs) => { try { @@ -19140,7 +19139,7 @@ function isPromiseFs(fs) { return e; } }; - return test(fs).constructor.name === "Promise"; + return isPromiseLike(test(fs)); } var commands = [ "readFile", @@ -21175,8 +21174,8 @@ function filterCapabilities(server, client) { } var pkg = { name: "isomorphic-git", - version: "1.24.2", - agent: "git/isomorphic-git@1.24.2" + version: "1.24.5", + agent: "git/isomorphic-git@1.24.5" }; var FIFO = class { constructor() { @@ -22076,15 +22075,19 @@ async function expandOidPacked({ } async function _expandOid({ fs, cache, gitdir, oid: short }) { const getExternalRefDelta = (oid) => _readObject({ fs, cache, gitdir, oid }); - const results1 = await expandOidLoose({ fs, gitdir, oid: short }); - const results2 = await expandOidPacked({ + const results = await expandOidLoose({ fs, gitdir, oid: short }); + const packedOids = await expandOidPacked({ fs, cache, gitdir, oid: short, getExternalRefDelta }); - const results = results1.concat(results2); + for (const packedOid of packedOids) { + if (results.indexOf(packedOid) === -1) { + results.push(packedOid); + } + } if (results.length === 1) { return results[0]; } @@ -24622,7 +24625,13 @@ async function _renameBranch({ }); await GitRefManager.writeRef({ fs, gitdir, ref: fullnewref, value }); await GitRefManager.deleteRef({ fs, gitdir, ref: fulloldref }); - if (checkout2) { + const fullCurrentBranchRef = await _currentBranch({ + fs, + gitdir, + fullname: true + }); + const isCurrentBranch = fullCurrentBranchRef === fulloldref; + if (checkout2 || isCurrentBranch) { await GitRefManager.writeSymbolicRef({ fs, gitdir, @@ -32171,8 +32180,8 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { }) ); if (!plugin.settings.setLastSaveToLastCommit) - new import_obsidian8.Setting(containerEl).setName(`Auto Backup after file change`).setDesc( - `If turned on, do auto ${commitOrBackup} every ${plugin.settings.autoSaveInterval} minutes after last change. This also prevents auto ${commitOrBackup} while editing a file. If turned off, it's independent from the last change.` + new import_obsidian8.Setting(containerEl).setName(`Auto Backup after stop editing any file`).setDesc( + `Requires the ${commitOrBackup} interval not to be 0. If turned on, do auto ${commitOrBackup} every ${plugin.settings.autoSaveInterval} minutes after stop editing any file. This also prevents auto ${commitOrBackup} while editing a file. If turned off, it's independent from the last change.` ).addToggle( (toggle) => toggle.setValue(plugin.settings.autoBackupAfterFileChange).onChange((value) => { plugin.settings.autoBackupAfterFileChange = value; @@ -34332,13 +34341,13 @@ var LocalStorageSettings = class { // src/ui/diff/diffView.ts init_polyfill_buffer(); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/diff2html.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/diff2html.js init_polyfill_buffer(); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/diff-parser.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/diff-parser.js init_polyfill_buffer(); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/types.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/types.js init_polyfill_buffer(); var LineType; (function(LineType2) { @@ -34360,7 +34369,7 @@ var DiffStyleType = { CHAR: "char" }; -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/utils.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/utils.js init_polyfill_buffer(); var specials = [ "-", @@ -34388,8 +34397,8 @@ function unifyPath(path2) { return path2 ? path2.replace(/\\/g, "/") : path2; } function hashCode(text2) { - var i, chr, len; - var hash2 = 0; + let i, chr, len; + let hash2 = 0; for (i = 0, len = text2.length; i < len; i++) { chr = text2.charCodeAt(i); hash2 = (hash2 << 5) - hash2 + chr; @@ -34398,36 +34407,21 @@ function hashCode(text2) { return hash2; } -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/diff-parser.js -var __spreadArray = function(to, from, pack) { - if (pack || arguments.length === 2) - for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { - if (!ar) - ar = Array.prototype.slice.call(from, 0, i); - ar[i] = from[i]; - } - } - return to.concat(ar || Array.prototype.slice.call(from)); -}; +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/diff-parser.js function getExtension(filename, language) { - var filenameParts = filename.split("."); + const filenameParts = filename.split("."); return filenameParts.length > 1 ? filenameParts[filenameParts.length - 1] : language; } function startsWithAny(str, prefixes) { - return prefixes.reduce(function(startsWith, prefix) { - return startsWith || str.startsWith(prefix); - }, false); + return prefixes.reduce((startsWith, prefix) => startsWith || str.startsWith(prefix), false); } var baseDiffFilenamePrefixes = ["a/", "b/", "i/", "w/", "c/", "o/"]; function getFilename(line, linePrefix, extraPrefix) { - var prefixes = extraPrefix !== void 0 ? __spreadArray(__spreadArray([], baseDiffFilenamePrefixes, true), [extraPrefix], false) : baseDiffFilenamePrefixes; - var FilenameRegExp = linePrefix ? new RegExp("^".concat(escapeForRegExp(linePrefix), ' "?(.+?)"?$')) : new RegExp('^"?(.+?)"?$'); - var _a2 = FilenameRegExp.exec(line) || [], _b = _a2[1], filename = _b === void 0 ? "" : _b; - var matchingPrefix = prefixes.find(function(p) { - return filename.indexOf(p) === 0; - }); - var fnameWithoutPrefix = matchingPrefix ? filename.slice(matchingPrefix.length) : filename; + const prefixes = extraPrefix !== void 0 ? [...baseDiffFilenamePrefixes, extraPrefix] : baseDiffFilenamePrefixes; + const FilenameRegExp = linePrefix ? new RegExp(`^${escapeForRegExp(linePrefix)} "?(.+?)"?$`) : new RegExp('^"?(.+?)"?$'); + const [, filename = ""] = FilenameRegExp.exec(line) || []; + const matchingPrefix = prefixes.find((p) => filename.indexOf(p) === 0); + const fnameWithoutPrefix = matchingPrefix ? filename.slice(matchingPrefix.length) : filename; return fnameWithoutPrefix.replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/, ""); } function getSrcFilename(line, srcPrefix) { @@ -34436,39 +34430,36 @@ function getSrcFilename(line, srcPrefix) { function getDstFilename(line, dstPrefix) { return getFilename(line, "+++", dstPrefix); } -function parse(diffInput, config) { - if (config === void 0) { - config = {}; - } - var files = []; - var currentFile = null; - var currentBlock = null; - var oldLine = null; - var oldLine2 = null; - var newLine = null; - var possibleOldName = null; - var possibleNewName = null; - var oldFileNameHeader = "--- "; - var newFileNameHeader = "+++ "; - var hunkHeaderPrefix = "@@"; - var oldMode = /^old mode (\d{6})/; - var newMode = /^new mode (\d{6})/; - var deletedFileMode = /^deleted file mode (\d{6})/; - var newFileMode = /^new file mode (\d{6})/; - var copyFrom = /^copy from "?(.+)"?/; - var copyTo = /^copy to "?(.+)"?/; - var renameFrom = /^rename from "?(.+)"?/; - var renameTo = /^rename to "?(.+)"?/; - var similarityIndex = /^similarity index (\d+)%/; - var dissimilarityIndex = /^dissimilarity index (\d+)%/; - var index2 = /^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/; - var binaryFiles = /^Binary files (.*) and (.*) differ/; - var binaryDiff = /^GIT binary patch/; - var combinedIndex = /^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/; - var combinedMode = /^mode (\d{6}),(\d{6})\.\.(\d{6})/; - var combinedNewFile = /^new file mode (\d{6})/; - var combinedDeletedFile = /^deleted file mode (\d{6}),(\d{6})/; - var diffLines2 = diffInput.replace(/\\ No newline at end of file/g, "").replace(/\r\n?/g, "\n").split("\n"); +function parse(diffInput, config = {}) { + const files = []; + let currentFile = null; + let currentBlock = null; + let oldLine = null; + let oldLine2 = null; + let newLine = null; + let possibleOldName = null; + let possibleNewName = null; + const oldFileNameHeader = "--- "; + const newFileNameHeader = "+++ "; + const hunkHeaderPrefix = "@@"; + const oldMode = /^old mode (\d{6})/; + const newMode = /^new mode (\d{6})/; + const deletedFileMode = /^deleted file mode (\d{6})/; + const newFileMode = /^new file mode (\d{6})/; + const copyFrom = /^copy from "?(.+)"?/; + const copyTo = /^copy to "?(.+)"?/; + const renameFrom = /^rename from "?(.+)"?/; + const renameTo = /^rename to "?(.+)"?/; + const similarityIndex = /^similarity index (\d+)%/; + const dissimilarityIndex = /^dissimilarity index (\d+)%/; + const index2 = /^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/; + const binaryFiles = /^Binary files (.*) and (.*) differ/; + const binaryDiff = /^GIT binary patch/; + const combinedIndex = /^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/; + const combinedMode = /^mode (\d{6}),(\d{6})\.\.(\d{6})/; + const combinedNewFile = /^new file mode (\d{6})/; + const combinedDeletedFile = /^deleted file mode (\d{6}),(\d{6})/; + const diffLines2 = diffInput.replace(/\\ No newline at end of file/g, "").replace(/\r\n?/g, "\n").split("\n"); function saveBlock() { if (currentBlock !== null && currentFile !== null) { currentFile.blocks.push(currentBlock); @@ -34502,7 +34493,7 @@ function parse(diffInput, config) { } function startBlock(line) { saveBlock(); - var values; + let values; if (currentFile !== null) { if (values = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(line)) { currentFile.isCombined = false; @@ -34533,11 +34524,11 @@ function parse(diffInput, config) { function createLine(line) { if (currentFile === null || currentBlock === null || oldLine === null || newLine === null) return; - var currentLine = { + const currentLine = { content: line }; - var addedPrefixes = currentFile.isCombined ? ["+ ", " +", "++"] : ["+"]; - var deletedPrefixes = currentFile.isCombined ? ["- ", " -", "--"] : ["-"]; + const addedPrefixes = currentFile.isCombined ? ["+ ", " +", "++"] : ["+"]; + const deletedPrefixes = currentFile.isCombined ? ["- ", " -", "--"] : ["-"]; if (startsWithAny(line, addedPrefixes)) { currentFile.addedLines++; currentLine.type = LineType.INSERT; @@ -34556,7 +34547,7 @@ function parse(diffInput, config) { currentBlock.lines.push(currentLine); } function existHunkHeader(line, lineIdx) { - var idx = lineIdx; + let idx = lineIdx; while (idx < diffLines2.length - 3) { if (line.startsWith("diff")) { return false; @@ -34568,17 +34559,17 @@ function parse(diffInput, config) { } return false; } - diffLines2.forEach(function(line, lineIndex) { + diffLines2.forEach((line, lineIndex) => { if (!line || line.startsWith("*")) { return; } - var values; - var prevLine = diffLines2[lineIndex - 1]; - var nxtLine = diffLines2[lineIndex + 1]; - var afterNxtLine = diffLines2[lineIndex + 2]; + let values; + const prevLine = diffLines2[lineIndex - 1]; + const nxtLine = diffLines2[lineIndex + 1]; + const afterNxtLine = diffLines2[lineIndex + 2]; if (line.startsWith("diff --git") || line.startsWith("diff --combined")) { startFile(); - var gitDiffStart = /^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/; + const gitDiffStart = /^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/; if (values = gitDiffStart.exec(line)) { possibleOldName = getFilename(values[1], void 0, config.dstPrefix); possibleNewName = getFilename(values[2], void 0, config.srcPrefix); @@ -34591,7 +34582,7 @@ function parse(diffInput, config) { } if (line.startsWith("Binary files") && !(currentFile === null || currentFile === void 0 ? void 0 : currentFile.isGitDiff)) { startFile(); - var unixDiffBinaryStart = /^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/; + const unixDiffBinaryStart = /^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/; if (values = unixDiffBinaryStart.exec(line)) { possibleOldName = getFilename(values[1], void 0, config.dstPrefix); possibleNewName = getFilename(values[2], void 0, config.srcPrefix); @@ -34614,7 +34605,7 @@ function parse(diffInput, config) { currentFile.deletedLines = 0; currentFile.blocks = []; currentBlock = null; - var message = typeof config.diffTooBigMessage === "function" ? config.diffTooBigMessage(files.length) : "Diff too big to be displayed"; + const message = typeof config.diffTooBigMessage === "function" ? config.diffTooBigMessage(files.length) : "Diff too big to be displayed"; startBlock(message); return; } @@ -34638,7 +34629,7 @@ function parse(diffInput, config) { createLine(line); return; } - var doesNotExistHunkHeader = !existHunkHeader(line, lineIndex); + const doesNotExistHunkHeader = !existHunkHeader(line, lineIndex); if (currentFile === null) { throw new Error("Where is my file !!!"); } @@ -34707,13 +34698,13 @@ function parse(diffInput, config) { return files; } -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/file-list-renderer.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/file-list-renderer.js init_polyfill_buffer(); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/render-utils.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/render-utils.js init_polyfill_buffer(); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/rematch.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/rematch.js init_polyfill_buffer(); function levenshtein(a, b) { if (a.length === 0) { @@ -34722,12 +34713,12 @@ function levenshtein(a, b) { if (b.length === 0) { return a.length; } - var matrix = []; - var i; + const matrix = []; + let i; for (i = 0; i <= b.length; i++) { matrix[i] = [i]; } - var j; + let j; for (j = 0; j <= a.length; j++) { matrix[0][j] = j; } @@ -34743,24 +34734,21 @@ function levenshtein(a, b) { return matrix[b.length][a.length]; } function newDistanceFn(str) { - return function(x, y) { - var xValue = str(x).trim(); - var yValue = str(y).trim(); - var lev = levenshtein(xValue, yValue); + return (x, y) => { + const xValue = str(x).trim(); + const yValue = str(y).trim(); + const lev = levenshtein(xValue, yValue); return lev / (xValue.length + yValue.length); }; } function newMatcherFn(distance2) { - function findBestMatch(a, b, cache) { - if (cache === void 0) { - cache = /* @__PURE__ */ new Map(); - } - var bestMatchDist = Infinity; - var bestMatch; - for (var i = 0; i < a.length; ++i) { - for (var j = 0; j < b.length; ++j) { - var cacheKey = JSON.stringify([a[i], b[j]]); - var md = void 0; + function findBestMatch(a, b, cache = /* @__PURE__ */ new Map()) { + let bestMatchDist = Infinity; + let bestMatch; + for (let i = 0; i < a.length; ++i) { + for (let j = 0; j < b.length; ++j) { + const cacheKey = JSON.stringify([a[i], b[j]]); + let md; if (!(cache.has(cacheKey) && (md = cache.get(cacheKey)))) { md = distance2(a[i], b[j]); cache.set(cacheKey, md); @@ -34773,29 +34761,23 @@ function newMatcherFn(distance2) { } return bestMatch; } - function group(a, b, level, cache) { - if (level === void 0) { - level = 0; - } - if (cache === void 0) { - cache = /* @__PURE__ */ new Map(); - } - var bm = findBestMatch(a, b, cache); + function group(a, b, level = 0, cache = /* @__PURE__ */ new Map()) { + const bm = findBestMatch(a, b, cache); if (!bm || a.length + b.length < 3) { return [[a, b]]; } - var a1 = a.slice(0, bm.indexA); - var b1 = b.slice(0, bm.indexB); - var aMatch = [a[bm.indexA]]; - var bMatch = [b[bm.indexB]]; - var tailA = bm.indexA + 1; - var tailB = bm.indexB + 1; - var a2 = a.slice(tailA); - var b2 = b.slice(tailB); - var group1 = group(a1, b1, level + 1, cache); - var groupMatch = group(aMatch, bMatch, level + 1, cache); - var group2 = group(a2, b2, level + 1, cache); - var result = groupMatch; + const a1 = a.slice(0, bm.indexA); + const b1 = b.slice(0, bm.indexB); + const aMatch = [a[bm.indexA]]; + const bMatch = [b[bm.indexB]]; + const tailA = bm.indexA + 1; + const tailB = bm.indexB + 1; + const a2 = a.slice(tailA); + const b2 = b.slice(tailB); + const group1 = group(a1, b1, level + 1, cache); + const groupMatch = group(aMatch, bMatch, level + 1, cache); + const group2 = group(a2, b2, level + 1, cache); + let result = groupMatch; if (bm.indexA > 0 || bm.indexB > 0) { result = group1.concat(result); } @@ -34807,19 +34789,7 @@ function newMatcherFn(distance2) { return group; } -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/render-utils.js -var __assign = function() { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/render-utils.js var CSSLineClass = { INSERTS: "d2h-ins", DELETES: "d2h-del", @@ -34835,9 +34805,7 @@ var defaultRenderConfig = { diffStyle: DiffStyleType.WORD }; var separator = "/"; -var distance = newDistanceFn(function(change) { - return change.value; -}); +var distance = newDistanceFn((change) => change.value); var matcher = newMatcherFn(distance); function isDevNullName(name) { return name.indexOf("dev/null") !== -1; @@ -34864,29 +34832,26 @@ function prefixLength(isCombined) { function escapeForHtml(str) { return str.slice(0).replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'").replace(/\//g, "/"); } -function deconstructLine(line, isCombined, escape) { - if (escape === void 0) { - escape = true; - } - var indexToSplit = prefixLength(isCombined); +function deconstructLine(line, isCombined, escape = true) { + const indexToSplit = prefixLength(isCombined); return { prefix: line.substring(0, indexToSplit), content: escape ? escapeForHtml(line.substring(indexToSplit)) : line.substring(indexToSplit) }; } function filenameDiff(file) { - var oldFilename = unifyPath(file.oldName); - var newFilename = unifyPath(file.newName); + const oldFilename = unifyPath(file.oldName); + const newFilename = unifyPath(file.newName); if (oldFilename !== newFilename && !isDevNullName(oldFilename) && !isDevNullName(newFilename)) { - var prefixPaths = []; - var suffixPaths = []; - var oldFilenameParts = oldFilename.split(separator); - var newFilenameParts = newFilename.split(separator); - var oldFilenamePartsSize = oldFilenameParts.length; - var newFilenamePartsSize = newFilenameParts.length; - var i = 0; - var j = oldFilenamePartsSize - 1; - var k = newFilenamePartsSize - 1; + const prefixPaths = []; + const suffixPaths = []; + const oldFilenameParts = oldFilename.split(separator); + const newFilenameParts = newFilename.split(separator); + const oldFilenamePartsSize = oldFilenameParts.length; + const newFilenamePartsSize = newFilenameParts.length; + let i = 0; + let j = oldFilenamePartsSize - 1; + let k = newFilenamePartsSize - 1; while (i < j && i < k) { if (oldFilenameParts[i] === newFilenameParts[i]) { prefixPaths.push(newFilenameParts[i]); @@ -34904,10 +34869,10 @@ function filenameDiff(file) { break; } } - var finalPrefix = prefixPaths.join(separator); - var finalSuffix = suffixPaths.join(separator); - var oldRemainingPath = oldFilenameParts.slice(i, j + 1).join(separator); - var newRemainingPath = newFilenameParts.slice(i, k + 1).join(separator); + const finalPrefix = prefixPaths.join(separator); + const finalSuffix = suffixPaths.join(separator); + const oldRemainingPath = oldFilenameParts.slice(i, j + 1).join(separator); + const newRemainingPath = newFilenameParts.slice(i, k + 1).join(separator); if (finalPrefix.length && finalSuffix.length) { return finalPrefix + separator + "{" + oldRemainingPath + " \u2192 " + newRemainingPath + "}" + separator + finalSuffix; } else if (finalPrefix.length) { @@ -34923,10 +34888,10 @@ function filenameDiff(file) { } } function getHtmlId(file) { - return "d2h-".concat(hashCode(filenameDiff(file)).toString().slice(-6)); + return `d2h-${hashCode(filenameDiff(file)).toString().slice(-6)}`; } function getFileIcon(file) { - var templateName = "file-changed"; + let templateName = "file-changed"; if (file.isRename) { templateName = "file-renamed"; } else if (file.isCopy) { @@ -34940,13 +34905,10 @@ function getFileIcon(file) { } return templateName; } -function diffHighlight(diffLine1, diffLine2, isCombined, config) { - if (config === void 0) { - config = {}; - } - var _a2 = __assign(__assign({}, defaultRenderConfig), config), matching = _a2.matching, maxLineLengthHighlight = _a2.maxLineLengthHighlight, matchWordsThreshold = _a2.matchWordsThreshold, diffStyle = _a2.diffStyle; - var line1 = deconstructLine(diffLine1, isCombined, false); - var line2 = deconstructLine(diffLine2, isCombined, false); +function diffHighlight(diffLine1, diffLine2, isCombined, config = {}) { + const { matching, maxLineLengthHighlight, matchWordsThreshold, diffStyle } = Object.assign(Object.assign({}, defaultRenderConfig), config); + const line1 = deconstructLine(diffLine1, isCombined, false); + const line2 = deconstructLine(diffLine2, isCombined, false); if (line1.content.length > maxLineLengthHighlight || line2.content.length > maxLineLengthHighlight) { return { oldLine: { @@ -34959,19 +34921,15 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) { } }; } - var diff2 = diffStyle === "char" ? diffChars(line1.content, line2.content) : diffWordsWithSpace(line1.content, line2.content); - var changedWords = []; + const diff2 = diffStyle === "char" ? diffChars(line1.content, line2.content) : diffWordsWithSpace(line1.content, line2.content); + const changedWords = []; if (diffStyle === "word" && matching === "words") { - var removed = diff2.filter(function(element2) { - return element2.removed; - }); - var added = diff2.filter(function(element2) { - return element2.added; - }); - var chunks = matcher(added, removed); - chunks.forEach(function(chunk) { + const removed = diff2.filter((element2) => element2.removed); + const added = diff2.filter((element2) => element2.added); + const chunks = matcher(added, removed); + chunks.forEach((chunk) => { if (chunk[0].length === 1 && chunk[1].length === 1) { - var dist = distance(chunk[0][0], chunk[1][0]); + const dist = distance(chunk[0][0], chunk[1][0]); if (dist < matchWordsThreshold) { changedWords.push(chunk[0][0]); changedWords.push(chunk[1][0]); @@ -34979,11 +34937,11 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) { } }); } - var highlightedLine = diff2.reduce(function(highlightedLine2, part) { - var elemType = part.added ? "ins" : part.removed ? "del" : null; - var addClass = changedWords.indexOf(part) > -1 ? ' class="d2h-change"' : ""; - var escapedValue = escapeForHtml(part.value); - return elemType !== null ? "".concat(highlightedLine2, "<").concat(elemType).concat(addClass, ">").concat(escapedValue, "") : "".concat(highlightedLine2).concat(escapedValue); + const highlightedLine = diff2.reduce((highlightedLine2, part) => { + const elemType = part.added ? "ins" : part.removed ? "del" : null; + const addClass = changedWords.indexOf(part) > -1 ? ' class="d2h-change"' : ""; + const escapedValue = escapeForHtml(part.value); + return elemType !== null ? `${highlightedLine2}<${elemType}${addClass}>${escapedValue}` : `${highlightedLine2}${escapedValue}`; }, ""); return { oldLine: { @@ -34997,75 +34955,57 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) { }; } -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/file-list-renderer.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/file-list-renderer.js var baseTemplatesPath = "file-summary"; var iconsBaseTemplatesPath = "icon"; function render(diffFiles, hoganUtils) { - var files = diffFiles.map(function(file) { - return hoganUtils.render(baseTemplatesPath, "line", { - fileHtmlId: getHtmlId(file), - oldName: file.oldName, - newName: file.newName, - fileName: filenameDiff(file), - deletedLines: "-" + file.deletedLines, - addedLines: "+" + file.addedLines - }, { - fileIcon: hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)) - }); - }).join("\n"); + const files = diffFiles.map((file) => hoganUtils.render(baseTemplatesPath, "line", { + fileHtmlId: getHtmlId(file), + oldName: file.oldName, + newName: file.newName, + fileName: filenameDiff(file), + deletedLines: "-" + file.deletedLines, + addedLines: "+" + file.addedLines + }, { + fileIcon: hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)) + })).join("\n"); return hoganUtils.render(baseTemplatesPath, "wrapper", { filesNumber: diffFiles.length, files }); } -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/line-by-line-renderer.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/line-by-line-renderer.js init_polyfill_buffer(); -var __assign2 = function() { - __assign2 = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign2.apply(this, arguments); -}; -var defaultLineByLineRendererConfig = __assign2(__assign2({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 }); +var defaultLineByLineRendererConfig = Object.assign(Object.assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 }); var genericTemplatesPath = "generic"; var baseTemplatesPath2 = "line-by-line"; var iconsBaseTemplatesPath2 = "icon"; var tagsBaseTemplatesPath = "tag"; -var LineByLineRenderer = function() { - function LineByLineRenderer2(hoganUtils, config) { - if (config === void 0) { - config = {}; - } +var LineByLineRenderer = class { + constructor(hoganUtils, config = {}) { this.hoganUtils = hoganUtils; - this.config = __assign2(__assign2({}, defaultLineByLineRendererConfig), config); + this.config = Object.assign(Object.assign({}, defaultLineByLineRendererConfig), config); } - LineByLineRenderer2.prototype.render = function(diffFiles) { - var _this = this; - var diffsHtml = diffFiles.map(function(file) { - var diffs; + render(diffFiles) { + const diffsHtml = diffFiles.map((file) => { + let diffs; if (file.blocks.length) { - diffs = _this.generateFileHtml(file); + diffs = this.generateFileHtml(file); } else { - diffs = _this.generateEmptyDiff(); + diffs = this.generateEmptyDiff(); } - return _this.makeFileDiffHtml(file, diffs); + return this.makeFileDiffHtml(file, diffs); }).join("\n"); return this.hoganUtils.render(genericTemplatesPath, "wrapper", { content: diffsHtml }); - }; - LineByLineRenderer2.prototype.makeFileDiffHtml = function(file, diffs) { + } + makeFileDiffHtml(file, diffs) { if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0) return ""; - var fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath2, "file-diff"); - var filePathTemplate = this.hoganUtils.template(genericTemplatesPath, "file-path"); - var fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath2, "file"); - var fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath, getFileIcon(file)); + const fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath2, "file-diff"); + const filePathTemplate = this.hoganUtils.template(genericTemplatesPath, "file-path"); + const fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath2, "file"); + const fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath, getFileIcon(file)); return fileDiffTemplate.render({ file, fileHtmlId: getHtmlId(file), @@ -35077,38 +35017,33 @@ var LineByLineRenderer = function() { fileTag: fileTagTemplate }) }); - }; - LineByLineRenderer2.prototype.generateEmptyDiff = function() { + } + generateEmptyDiff() { return this.hoganUtils.render(genericTemplatesPath, "empty-diff", { contentClass: "d2h-code-line", CSSLineClass }); - }; - LineByLineRenderer2.prototype.generateFileHtml = function(file) { - var _this = this; - var matcher2 = newMatcherFn(newDistanceFn(function(e) { - return deconstructLine(e.content, file.isCombined).content; - })); - return file.blocks.map(function(block) { - var lines = _this.hoganUtils.render(genericTemplatesPath, "block-header", { + } + generateFileHtml(file) { + const matcher2 = newMatcherFn(newDistanceFn((e) => deconstructLine(e.content, file.isCombined).content)); + return file.blocks.map((block) => { + let lines = this.hoganUtils.render(genericTemplatesPath, "block-header", { CSSLineClass, blockHeader: file.isTooBig ? block.header : escapeForHtml(block.header), lineClass: "d2h-code-linenumber", contentClass: "d2h-code-line" }); - _this.applyLineGroupping(block).forEach(function(_a2) { - var contextLines = _a2[0], oldLines = _a2[1], newLines = _a2[2]; + this.applyLineGroupping(block).forEach(([contextLines, oldLines, newLines]) => { if (oldLines.length && newLines.length && !contextLines.length) { - _this.applyRematchMatching(oldLines, newLines, matcher2).map(function(_a3) { - var oldLines2 = _a3[0], newLines2 = _a3[1]; - var _b2 = _this.processChangedLines(file, file.isCombined, oldLines2, newLines2), left2 = _b2.left, right2 = _b2.right; - lines += left2; - lines += right2; + this.applyRematchMatching(oldLines, newLines, matcher2).map(([oldLines2, newLines2]) => { + const { left, right } = this.processChangedLines(file, file.isCombined, oldLines2, newLines2); + lines += left; + lines += right; }); } else if (contextLines.length) { - contextLines.forEach(function(line) { - var _a3 = deconstructLine(line.content, file.isCombined), prefix = _a3.prefix, content = _a3.content; - lines += _this.generateSingleLineHtml(file, { + contextLines.forEach((line) => { + const { prefix, content } = deconstructLine(line.content, file.isCombined); + lines += this.generateSingleLineHtml(file, { type: CSSLineClass.CONTEXT, prefix, content, @@ -35117,7 +35052,7 @@ var LineByLineRenderer = function() { }); }); } else if (oldLines.length || newLines.length) { - var _b = _this.processChangedLines(file, file.isCombined, oldLines, newLines), left = _b.left, right = _b.right; + const { left, right } = this.processChangedLines(file, file.isCombined, oldLines, newLines); lines += left; lines += right; } else { @@ -35126,13 +35061,13 @@ var LineByLineRenderer = function() { }); return lines; }).join("\n"); - }; - LineByLineRenderer2.prototype.applyLineGroupping = function(block) { - var blockLinesGroups = []; - var oldLines = []; - var newLines = []; - for (var i = 0; i < block.lines.length; i++) { - var diffLine = block.lines[i]; + } + applyLineGroupping(block) { + const blockLinesGroups = []; + let oldLines = []; + let newLines = []; + for (let i = 0; i < block.lines.length; i++) { + const diffLine = block.lines[i]; if (diffLine.type !== LineType.INSERT && newLines.length || diffLine.type === LineType.CONTEXT && oldLines.length > 0) { blockLinesGroups.push([[], oldLines, newLines]); oldLines = []; @@ -35154,51 +35089,49 @@ var LineByLineRenderer = function() { newLines = []; } return blockLinesGroups; - }; - LineByLineRenderer2.prototype.applyRematchMatching = function(oldLines, newLines, matcher2) { - var comparisons = oldLines.length * newLines.length; - var maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map(function(elem) { - return elem.content.length; - }))); - var doMatching = comparisons < this.config.matchingMaxComparisons && maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison && (this.config.matching === "lines" || this.config.matching === "words"); + } + applyRematchMatching(oldLines, newLines, matcher2) { + const comparisons = oldLines.length * newLines.length; + const maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map((elem) => elem.content.length))); + const doMatching = comparisons < this.config.matchingMaxComparisons && maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison && (this.config.matching === "lines" || this.config.matching === "words"); return doMatching ? matcher2(oldLines, newLines) : [[oldLines, newLines]]; - }; - LineByLineRenderer2.prototype.processChangedLines = function(file, isCombined, oldLines, newLines) { - var fileHtml = { + } + processChangedLines(file, isCombined, oldLines, newLines) { + const fileHtml = { right: "", left: "" }; - var maxLinesNumber = Math.max(oldLines.length, newLines.length); - for (var i = 0; i < maxLinesNumber; i++) { - var oldLine = oldLines[i]; - var newLine = newLines[i]; - var diff2 = oldLine !== void 0 && newLine !== void 0 ? diffHighlight(oldLine.content, newLine.content, isCombined, this.config) : void 0; - var preparedOldLine = oldLine !== void 0 && oldLine.oldNumber !== void 0 ? __assign2(__assign2({}, diff2 !== void 0 ? { + const maxLinesNumber = Math.max(oldLines.length, newLines.length); + for (let i = 0; i < maxLinesNumber; i++) { + const oldLine = oldLines[i]; + const newLine = newLines[i]; + const diff2 = oldLine !== void 0 && newLine !== void 0 ? diffHighlight(oldLine.content, newLine.content, isCombined, this.config) : void 0; + const preparedOldLine = oldLine !== void 0 && oldLine.oldNumber !== void 0 ? Object.assign(Object.assign({}, diff2 !== void 0 ? { prefix: diff2.oldLine.prefix, content: diff2.oldLine.content, type: CSSLineClass.DELETE_CHANGES - } : __assign2(__assign2({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) })), { oldNumber: oldLine.oldNumber, newNumber: oldLine.newNumber }) : void 0; - var preparedNewLine = newLine !== void 0 && newLine.newNumber !== void 0 ? __assign2(__assign2({}, diff2 !== void 0 ? { + } : Object.assign(Object.assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) })), { oldNumber: oldLine.oldNumber, newNumber: oldLine.newNumber }) : void 0; + const preparedNewLine = newLine !== void 0 && newLine.newNumber !== void 0 ? Object.assign(Object.assign({}, diff2 !== void 0 ? { prefix: diff2.newLine.prefix, content: diff2.newLine.content, type: CSSLineClass.INSERT_CHANGES - } : __assign2(__assign2({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) })), { oldNumber: newLine.oldNumber, newNumber: newLine.newNumber }) : void 0; - var _a2 = this.generateLineHtml(file, preparedOldLine, preparedNewLine), left = _a2.left, right = _a2.right; + } : Object.assign(Object.assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) })), { oldNumber: newLine.oldNumber, newNumber: newLine.newNumber }) : void 0; + const { left, right } = this.generateLineHtml(file, preparedOldLine, preparedNewLine); fileHtml.left += left; fileHtml.right += right; } return fileHtml; - }; - LineByLineRenderer2.prototype.generateLineHtml = function(file, oldLine, newLine) { + } + generateLineHtml(file, oldLine, newLine) { return { left: this.generateSingleLineHtml(file, oldLine), right: this.generateSingleLineHtml(file, newLine) }; - }; - LineByLineRenderer2.prototype.generateSingleLineHtml = function(file, line) { + } + generateSingleLineHtml(file, line) { if (line === void 0) return ""; - var lineNumberHtml = this.hoganUtils.render(baseTemplatesPath2, "numbers", { + const lineNumberHtml = this.hoganUtils.render(baseTemplatesPath2, "numbers", { oldNumber: line.oldNumber || "", newNumber: line.newNumber || "" }); @@ -35212,58 +35145,40 @@ var LineByLineRenderer = function() { line, file }); - }; - return LineByLineRenderer2; -}(); -var line_by_line_renderer_default = LineByLineRenderer; - -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/side-by-side-renderer.js -init_polyfill_buffer(); -var __assign3 = function() { - __assign3 = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign3.apply(this, arguments); + } }; -var defaultSideBySideRendererConfig = __assign3(__assign3({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 }); + +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/side-by-side-renderer.js +init_polyfill_buffer(); +var defaultSideBySideRendererConfig = Object.assign(Object.assign({}, defaultRenderConfig), { renderNothingWhenEmpty: false, matchingMaxComparisons: 2500, maxLineSizeInBlockForComparison: 200 }); var genericTemplatesPath2 = "generic"; var baseTemplatesPath3 = "side-by-side"; var iconsBaseTemplatesPath3 = "icon"; var tagsBaseTemplatesPath2 = "tag"; -var SideBySideRenderer = function() { - function SideBySideRenderer2(hoganUtils, config) { - if (config === void 0) { - config = {}; - } +var SideBySideRenderer = class { + constructor(hoganUtils, config = {}) { this.hoganUtils = hoganUtils; - this.config = __assign3(__assign3({}, defaultSideBySideRendererConfig), config); + this.config = Object.assign(Object.assign({}, defaultSideBySideRendererConfig), config); } - SideBySideRenderer2.prototype.render = function(diffFiles) { - var _this = this; - var diffsHtml = diffFiles.map(function(file) { - var diffs; + render(diffFiles) { + const diffsHtml = diffFiles.map((file) => { + let diffs; if (file.blocks.length) { - diffs = _this.generateFileHtml(file); + diffs = this.generateFileHtml(file); } else { - diffs = _this.generateEmptyDiff(); + diffs = this.generateEmptyDiff(); } - return _this.makeFileDiffHtml(file, diffs); + return this.makeFileDiffHtml(file, diffs); }).join("\n"); return this.hoganUtils.render(genericTemplatesPath2, "wrapper", { content: diffsHtml }); - }; - SideBySideRenderer2.prototype.makeFileDiffHtml = function(file, diffs) { + } + makeFileDiffHtml(file, diffs) { if (this.config.renderNothingWhenEmpty && Array.isArray(file.blocks) && file.blocks.length === 0) return ""; - var fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath3, "file-diff"); - var filePathTemplate = this.hoganUtils.template(genericTemplatesPath2, "file-path"); - var fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath3, "file"); - var fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath2, getFileIcon(file)); + const fileDiffTemplate = this.hoganUtils.template(baseTemplatesPath3, "file-diff"); + const filePathTemplate = this.hoganUtils.template(genericTemplatesPath2, "file-path"); + const fileIconTemplate = this.hoganUtils.template(iconsBaseTemplatesPath3, "file"); + const fileTagTemplate = this.hoganUtils.template(tagsBaseTemplatesPath2, getFileIcon(file)); return fileDiffTemplate.render({ file, fileHtmlId: getHtmlId(file), @@ -35275,8 +35190,8 @@ var SideBySideRenderer = function() { fileTag: fileTagTemplate }) }); - }; - SideBySideRenderer2.prototype.generateEmptyDiff = function() { + } + generateEmptyDiff() { return { right: "", left: this.hoganUtils.render(genericTemplatesPath2, "empty-diff", { @@ -35284,30 +35199,25 @@ var SideBySideRenderer = function() { CSSLineClass }) }; - }; - SideBySideRenderer2.prototype.generateFileHtml = function(file) { - var _this = this; - var matcher2 = newMatcherFn(newDistanceFn(function(e) { - return deconstructLine(e.content, file.isCombined).content; - })); - return file.blocks.map(function(block) { - var fileHtml = { - left: _this.makeHeaderHtml(block.header, file), - right: _this.makeHeaderHtml("") + } + generateFileHtml(file) { + const matcher2 = newMatcherFn(newDistanceFn((e) => deconstructLine(e.content, file.isCombined).content)); + return file.blocks.map((block) => { + const fileHtml = { + left: this.makeHeaderHtml(block.header, file), + right: this.makeHeaderHtml("") }; - _this.applyLineGroupping(block).forEach(function(_a2) { - var contextLines = _a2[0], oldLines = _a2[1], newLines = _a2[2]; + this.applyLineGroupping(block).forEach(([contextLines, oldLines, newLines]) => { if (oldLines.length && newLines.length && !contextLines.length) { - _this.applyRematchMatching(oldLines, newLines, matcher2).map(function(_a3) { - var oldLines2 = _a3[0], newLines2 = _a3[1]; - var _b2 = _this.processChangedLines(file.isCombined, oldLines2, newLines2), left2 = _b2.left, right2 = _b2.right; - fileHtml.left += left2; - fileHtml.right += right2; + this.applyRematchMatching(oldLines, newLines, matcher2).map(([oldLines2, newLines2]) => { + const { left, right } = this.processChangedLines(file.isCombined, oldLines2, newLines2); + fileHtml.left += left; + fileHtml.right += right; }); } else if (contextLines.length) { - contextLines.forEach(function(line) { - var _a3 = deconstructLine(line.content, file.isCombined), prefix = _a3.prefix, content = _a3.content; - var _b2 = _this.generateLineHtml({ + contextLines.forEach((line) => { + const { prefix, content } = deconstructLine(line.content, file.isCombined); + const { left, right } = this.generateLineHtml({ type: CSSLineClass.CONTEXT, prefix, content, @@ -35317,12 +35227,12 @@ var SideBySideRenderer = function() { prefix, content, number: line.newNumber - }), left2 = _b2.left, right2 = _b2.right; - fileHtml.left += left2; - fileHtml.right += right2; + }); + fileHtml.left += left; + fileHtml.right += right; }); } else if (oldLines.length || newLines.length) { - var _b = _this.processChangedLines(file.isCombined, oldLines, newLines), left = _b.left, right = _b.right; + const { left, right } = this.processChangedLines(file.isCombined, oldLines, newLines); fileHtml.left += left; fileHtml.right += right; } else { @@ -35330,16 +35240,16 @@ var SideBySideRenderer = function() { } }); return fileHtml; - }).reduce(function(accomulated, html2) { + }).reduce((accomulated, html2) => { return { left: accomulated.left + html2.left, right: accomulated.right + html2.right }; }, { left: "", right: "" }); - }; - SideBySideRenderer2.prototype.applyLineGroupping = function(block) { - var blockLinesGroups = []; - var oldLines = []; - var newLines = []; - for (var i = 0; i < block.lines.length; i++) { - var diffLine = block.lines[i]; + } + applyLineGroupping(block) { + const blockLinesGroups = []; + let oldLines = []; + let newLines = []; + for (let i = 0; i < block.lines.length; i++) { + const diffLine = block.lines[i]; if (diffLine.type !== LineType.INSERT && newLines.length || diffLine.type === LineType.CONTEXT && oldLines.length > 0) { blockLinesGroups.push([[], oldLines, newLines]); oldLines = []; @@ -35361,76 +35271,72 @@ var SideBySideRenderer = function() { newLines = []; } return blockLinesGroups; - }; - SideBySideRenderer2.prototype.applyRematchMatching = function(oldLines, newLines, matcher2) { - var comparisons = oldLines.length * newLines.length; - var maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map(function(elem) { - return elem.content.length; - }))); - var doMatching = comparisons < this.config.matchingMaxComparisons && maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison && (this.config.matching === "lines" || this.config.matching === "words"); + } + applyRematchMatching(oldLines, newLines, matcher2) { + const comparisons = oldLines.length * newLines.length; + const maxLineSizeInBlock = Math.max.apply(null, [0].concat(oldLines.concat(newLines).map((elem) => elem.content.length))); + const doMatching = comparisons < this.config.matchingMaxComparisons && maxLineSizeInBlock < this.config.maxLineSizeInBlockForComparison && (this.config.matching === "lines" || this.config.matching === "words"); return doMatching ? matcher2(oldLines, newLines) : [[oldLines, newLines]]; - }; - SideBySideRenderer2.prototype.makeHeaderHtml = function(blockHeader, file) { + } + makeHeaderHtml(blockHeader, file) { return this.hoganUtils.render(genericTemplatesPath2, "block-header", { CSSLineClass, blockHeader: (file === null || file === void 0 ? void 0 : file.isTooBig) ? blockHeader : escapeForHtml(blockHeader), lineClass: "d2h-code-side-linenumber", contentClass: "d2h-code-side-line" }); - }; - SideBySideRenderer2.prototype.processChangedLines = function(isCombined, oldLines, newLines) { - var fileHtml = { + } + processChangedLines(isCombined, oldLines, newLines) { + const fileHtml = { right: "", left: "" }; - var maxLinesNumber = Math.max(oldLines.length, newLines.length); - for (var i = 0; i < maxLinesNumber; i++) { - var oldLine = oldLines[i]; - var newLine = newLines[i]; - var diff2 = oldLine !== void 0 && newLine !== void 0 ? diffHighlight(oldLine.content, newLine.content, isCombined, this.config) : void 0; - var preparedOldLine = oldLine !== void 0 && oldLine.oldNumber !== void 0 ? __assign3(__assign3({}, diff2 !== void 0 ? { + const maxLinesNumber = Math.max(oldLines.length, newLines.length); + for (let i = 0; i < maxLinesNumber; i++) { + const oldLine = oldLines[i]; + const newLine = newLines[i]; + const diff2 = oldLine !== void 0 && newLine !== void 0 ? diffHighlight(oldLine.content, newLine.content, isCombined, this.config) : void 0; + const preparedOldLine = oldLine !== void 0 && oldLine.oldNumber !== void 0 ? Object.assign(Object.assign({}, diff2 !== void 0 ? { prefix: diff2.oldLine.prefix, content: diff2.oldLine.content, type: CSSLineClass.DELETE_CHANGES - } : __assign3(__assign3({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) })), { number: oldLine.oldNumber }) : void 0; - var preparedNewLine = newLine !== void 0 && newLine.newNumber !== void 0 ? __assign3(__assign3({}, diff2 !== void 0 ? { + } : Object.assign(Object.assign({}, deconstructLine(oldLine.content, isCombined)), { type: toCSSClass(oldLine.type) })), { number: oldLine.oldNumber }) : void 0; + const preparedNewLine = newLine !== void 0 && newLine.newNumber !== void 0 ? Object.assign(Object.assign({}, diff2 !== void 0 ? { prefix: diff2.newLine.prefix, content: diff2.newLine.content, type: CSSLineClass.INSERT_CHANGES - } : __assign3(__assign3({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) })), { number: newLine.newNumber }) : void 0; - var _a2 = this.generateLineHtml(preparedOldLine, preparedNewLine), left = _a2.left, right = _a2.right; + } : Object.assign(Object.assign({}, deconstructLine(newLine.content, isCombined)), { type: toCSSClass(newLine.type) })), { number: newLine.newNumber }) : void 0; + const { left, right } = this.generateLineHtml(preparedOldLine, preparedNewLine); fileHtml.left += left; fileHtml.right += right; } return fileHtml; - }; - SideBySideRenderer2.prototype.generateLineHtml = function(oldLine, newLine) { + } + generateLineHtml(oldLine, newLine) { return { left: this.generateSingleHtml(oldLine), right: this.generateSingleHtml(newLine) }; - }; - SideBySideRenderer2.prototype.generateSingleHtml = function(line) { - var lineClass = "d2h-code-side-linenumber"; - var contentClass = "d2h-code-side-line"; + } + generateSingleHtml(line) { + const lineClass = "d2h-code-side-linenumber"; + const contentClass = "d2h-code-side-line"; return this.hoganUtils.render(genericTemplatesPath2, "line", { - type: (line === null || line === void 0 ? void 0 : line.type) || "".concat(CSSLineClass.CONTEXT, " d2h-emptyplaceholder"), - lineClass: line !== void 0 ? lineClass : "".concat(lineClass, " d2h-code-side-emptyplaceholder"), - contentClass: line !== void 0 ? contentClass : "".concat(contentClass, " d2h-code-side-emptyplaceholder"), + type: (line === null || line === void 0 ? void 0 : line.type) || `${CSSLineClass.CONTEXT} d2h-emptyplaceholder`, + lineClass: line !== void 0 ? lineClass : `${lineClass} d2h-code-side-emptyplaceholder`, + contentClass: line !== void 0 ? contentClass : `${contentClass} d2h-code-side-emptyplaceholder`, prefix: (line === null || line === void 0 ? void 0 : line.prefix) === " " ? " " : line === null || line === void 0 ? void 0 : line.prefix, content: line === null || line === void 0 ? void 0 : line.content, lineNumber: line === null || line === void 0 ? void 0 : line.number }); - }; - return SideBySideRenderer2; -}(); -var side_by_side_renderer_default = SideBySideRenderer; + } +}; -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/hoganjs-utils.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/hoganjs-utils.js init_polyfill_buffer(); var Hogan3 = __toESM(require_hogan()); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/diff2html-templates.js +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/diff2html-templates.js init_polyfill_buffer(); var Hogan2 = __toESM(require_hogan()); var defaultTemplates = {}; @@ -35835,75 +35741,43 @@ defaultTemplates["tag-file-renamed"] = new Hogan2.Template({ code: function(c, p return t.fl(); }, partials: {}, subs: {} }); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/hoganjs-utils.js -var __assign4 = function() { - __assign4 = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign4.apply(this, arguments); -}; -var HoganJsUtils = function() { - function HoganJsUtils2(_a2) { - var _b = _a2.compiledTemplates, compiledTemplates = _b === void 0 ? {} : _b, _c = _a2.rawTemplates, rawTemplates = _c === void 0 ? {} : _c; - var compiledRawTemplates = Object.entries(rawTemplates).reduce(function(previousTemplates, _a3) { - var _b2; - var name = _a3[0], templateString = _a3[1]; - var compiledTemplate = Hogan3.compile(templateString, { asString: false }); - return __assign4(__assign4({}, previousTemplates), (_b2 = {}, _b2[name] = compiledTemplate, _b2)); +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/hoganjs-utils.js +var HoganJsUtils = class { + constructor({ compiledTemplates = {}, rawTemplates = {} }) { + const compiledRawTemplates = Object.entries(rawTemplates).reduce((previousTemplates, [name, templateString]) => { + const compiledTemplate = Hogan3.compile(templateString, { asString: false }); + return Object.assign(Object.assign({}, previousTemplates), { [name]: compiledTemplate }); }, {}); - this.preCompiledTemplates = __assign4(__assign4(__assign4({}, defaultTemplates), compiledTemplates), compiledRawTemplates); + this.preCompiledTemplates = Object.assign(Object.assign(Object.assign({}, defaultTemplates), compiledTemplates), compiledRawTemplates); } - HoganJsUtils2.compile = function(templateString) { + static compile(templateString) { return Hogan3.compile(templateString, { asString: false }); - }; - HoganJsUtils2.prototype.render = function(namespace, view, params, partials, indent2) { - var templateKey = this.templateKey(namespace, view); + } + render(namespace, view, params, partials, indent2) { + const templateKey = this.templateKey(namespace, view); try { - var template = this.preCompiledTemplates[templateKey]; + const template = this.preCompiledTemplates[templateKey]; return template.render(params, partials, indent2); } catch (e) { - throw new Error("Could not find template to render '".concat(templateKey, "'")); + throw new Error(`Could not find template to render '${templateKey}'`); } - }; - HoganJsUtils2.prototype.template = function(namespace, view) { - return this.preCompiledTemplates[this.templateKey(namespace, view)]; - }; - HoganJsUtils2.prototype.templateKey = function(namespace, view) { - return "".concat(namespace, "-").concat(view); - }; - return HoganJsUtils2; -}(); -var hoganjs_utils_default = HoganJsUtils; - -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/diff2html.js -var __assign5 = function() { - __assign5 = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) - if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign5.apply(this, arguments); -}; -var defaultDiff2HtmlConfig = __assign5(__assign5(__assign5({}, defaultLineByLineRendererConfig), defaultSideBySideRendererConfig), { outputFormat: OutputFormatType.LINE_BY_LINE, drawFileList: true }); -function html(diffInput, configuration) { - if (configuration === void 0) { - configuration = {}; } - var config = __assign5(__assign5({}, defaultDiff2HtmlConfig), configuration); - var diffJson = typeof diffInput === "string" ? parse(diffInput, config) : diffInput; - var hoganUtils = new hoganjs_utils_default(config); - var fileList = config.drawFileList ? render(diffJson, hoganUtils) : ""; - var diffOutput = config.outputFormat === "side-by-side" ? new side_by_side_renderer_default(hoganUtils, config).render(diffJson) : new line_by_line_renderer_default(hoganUtils, config).render(diffJson); + template(namespace, view) { + return this.preCompiledTemplates[this.templateKey(namespace, view)]; + } + templateKey(namespace, view) { + return `${namespace}-${view}`; + } +}; + +// node_modules/.pnpm/diff2html@3.4.41/node_modules/diff2html/lib-esm/diff2html.js +var defaultDiff2HtmlConfig = Object.assign(Object.assign(Object.assign({}, defaultLineByLineRendererConfig), defaultSideBySideRendererConfig), { outputFormat: OutputFormatType.LINE_BY_LINE, drawFileList: true }); +function html(diffInput, configuration = {}) { + const config = Object.assign(Object.assign({}, defaultDiff2HtmlConfig), configuration); + const diffJson = typeof diffInput === "string" ? parse(diffInput, config) : diffInput; + const hoganUtils = new HoganJsUtils(config); + const fileList = config.drawFileList ? render(diffJson, hoganUtils) : ""; + const diffOutput = config.outputFormat === "side-by-side" ? new SideBySideRenderer(hoganUtils, config).render(diffJson) : new LineByLineRenderer(hoganUtils, config).render(diffJson); return fileList + diffOutput; } @@ -35939,8 +35813,10 @@ var DiffView = class extends import_obsidian17.ItemView { } async setState(state, result) { this.state = state; + if (import_obsidian17.Platform.isMobile) { + this.leaf.view.titleEl.textContent = this.getDisplayText(); + } await this.refresh(); - return; } getState() { return this.state; @@ -36003,13 +35879,13 @@ var import_obsidian20 = require("obsidian"); // src/ui/history/historyView.svelte init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/index.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/index.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/animations.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/animations.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/utils.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/utils.js init_polyfill_buffer(); function noop() { } @@ -36033,13 +35909,13 @@ function is_empty(obj) { return Object.keys(obj).length === 0; } -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/environment.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/environment.js init_polyfill_buffer(); var is_client = typeof window !== "undefined"; var now = is_client ? () => window.performance.now() : () => Date.now(); var raf = is_client ? (cb) => requestAnimationFrame(cb) : noop; -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/loop.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/loop.js init_polyfill_buffer(); var tasks = /* @__PURE__ */ new Set(); function run_tasks(now2) { @@ -36066,23 +35942,23 @@ function loop(callback) { }; } -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/style_manager.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/style_manager.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/dom.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/dom.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/globals.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/globals.js init_polyfill_buffer(); var globals = typeof window !== "undefined" ? window : typeof globalThis !== "undefined" ? globalThis : ( // @ts-ignore Node typings have this global ); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js var ResizeObserverSingleton = class _ResizeObserverSingleton { /** @param {ResizeObserverOptions} options */ constructor(options) { @@ -36130,7 +36006,7 @@ var ResizeObserverSingleton = class _ResizeObserverSingleton { }; ResizeObserverSingleton.entries = "WeakMap" in globals ? /* @__PURE__ */ new WeakMap() : void 0; -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/dom.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/dom.js var is_hydrating = false; function start_hydrating() { is_hydrating = true; @@ -36256,7 +36132,7 @@ function get_custom_elements_slots(element2) { return result; } -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/style_manager.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/style_manager.js var managed_styles = /* @__PURE__ */ new Map(); var active = 0; function hash(str) { @@ -36320,16 +36196,16 @@ function clear_rules() { }); } -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/await_block.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/await_block.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/transitions.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/transitions.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/scheduler.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/scheduler.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/lifecycle.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/lifecycle.js init_polyfill_buffer(); var current_component; function set_current_component(component) { @@ -36350,7 +36226,7 @@ function bubble(component, event) { } } -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/scheduler.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/scheduler.js var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; @@ -36425,7 +36301,7 @@ function flush_render_callbacks(fns) { render_callbacks = filtered; } -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/transitions.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/transitions.js var promise; function wait() { if (!promise) { @@ -36606,19 +36482,19 @@ function create_bidirectional_transition(node, fn, params, intro) { }; } -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/each.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/each.js init_polyfill_buffer(); function ensure_array_like(array_like_or_iterator) { return (array_like_or_iterator == null ? void 0 : array_like_or_iterator.length) !== void 0 ? array_like_or_iterator : Array.from(array_like_or_iterator); } -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/spread.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/spread.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/ssr.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/ssr.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/shared/boolean_attributes.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/shared/boolean_attributes.js init_polyfill_buffer(); var _boolean_attributes = ( /** @type {const} */ @@ -36652,10 +36528,10 @@ var _boolean_attributes = ( ); var boolean_attributes = /* @__PURE__ */ new Set([..._boolean_attributes]); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/shared/utils/names.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/shared/utils/names.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/Component.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/Component.js init_polyfill_buffer(); function create_component(block) { block && block.c(); @@ -36754,54 +36630,60 @@ if (typeof HTMLElement === "function") { SvelteElement = class extends HTMLElement { constructor($$componentCtor, $$slots, use_shadow_dom) { super(); - __publicField(this, "$$componentCtor"); - __publicField(this, "$$slots"); - __publicField(this, "$$component"); - __publicField(this, "$$connected", false); - __publicField(this, "$$data", {}); - __publicField(this, "$$reflecting", false); - /** @type {Record} */ - __publicField(this, "$$props_definition", {}); - /** @type {Record} */ - __publicField(this, "$$listeners", {}); - /** @type {Map} */ - __publicField(this, "$$listener_unsubscribe_fns", /* @__PURE__ */ new Map()); - this.$$componentCtor = $$componentCtor; - this.$$slots = $$slots; + /** The Svelte component constructor */ + __publicField(this, "$$ctor"); + /** Slots */ + __publicField(this, "$$s"); + /** The Svelte component instance */ + __publicField(this, "$$c"); + /** Whether or not the custom element is connected */ + __publicField(this, "$$cn", false); + /** Component props data */ + __publicField(this, "$$d", {}); + /** `true` if currently in the process of reflecting component props back to attributes */ + __publicField(this, "$$r", false); + /** @type {Record} Props definition (name, reflected, type etc) */ + __publicField(this, "$$p_d", {}); + /** @type {Record} Event listeners */ + __publicField(this, "$$l", {}); + /** @type {Map} Event listener unsubscribe functions */ + __publicField(this, "$$l_u", /* @__PURE__ */ new Map()); + this.$$ctor = $$componentCtor; + this.$$s = $$slots; if (use_shadow_dom) { this.attachShadow({ mode: "open" }); } } addEventListener(type, listener, options) { - this.$$listeners[type] = this.$$listeners[type] || []; - this.$$listeners[type].push(listener); - if (this.$$component) { - const unsub = this.$$component.$on(type, listener); - this.$$listener_unsubscribe_fns.set(listener, unsub); + this.$$l[type] = this.$$l[type] || []; + this.$$l[type].push(listener); + if (this.$$c) { + const unsub = this.$$c.$on(type, listener); + this.$$l_u.set(listener, unsub); } super.addEventListener(type, listener, options); } removeEventListener(type, listener, options) { super.removeEventListener(type, listener, options); - if (this.$$component) { - const unsub = this.$$listener_unsubscribe_fns.get(listener); + if (this.$$c) { + const unsub = this.$$l_u.get(listener); if (unsub) { unsub(); - this.$$listener_unsubscribe_fns.delete(listener); + this.$$l_u.delete(listener); } } } async connectedCallback() { - this.$$connected = true; - if (!this.$$component) { + this.$$cn = true; + if (!this.$$c) { let create_slot = function(name) { return () => { let node; const obj = { c: function create() { - node = document.createElement("slot"); + node = element("slot"); if (name !== "default") { - node.setAttribute("name", name); + attr(node, "name", name); } }, /** @@ -36821,73 +36703,85 @@ if (typeof HTMLElement === "function") { }; }; await Promise.resolve(); - if (!this.$$connected) { + if (!this.$$cn) { return; } const $$slots = {}; const existing_slots = get_custom_elements_slots(this); - for (const name of this.$$slots) { + for (const name of this.$$s) { if (name in existing_slots) { $$slots[name] = [create_slot(name)]; } } for (const attribute of this.attributes) { - const name = this.$$get_prop_name(attribute.name); - if (!(name in this.$$data)) { - this.$$data[name] = get_custom_element_value( - name, - attribute.value, - this.$$props_definition, - "toProp" - ); + const name = this.$$g_p(attribute.name); + if (!(name in this.$$d)) { + this.$$d[name] = get_custom_element_value(name, attribute.value, this.$$p_d, "toProp"); } } - this.$$component = new this.$$componentCtor({ + this.$$c = new this.$$ctor({ target: this.shadowRoot || this, props: { - ...this.$$data, + ...this.$$d, $$slots, $$scope: { ctx: [] } } }); - for (const type in this.$$listeners) { - for (const listener of this.$$listeners[type]) { - const unsub = this.$$component.$on(type, listener); - this.$$listener_unsubscribe_fns.set(listener, unsub); + const reflect_attributes = () => { + this.$$r = true; + for (const key2 in this.$$p_d) { + this.$$d[key2] = this.$$c.$$.ctx[this.$$c.$$.props[key2]]; + if (this.$$p_d[key2].reflect) { + const attribute_value = get_custom_element_value( + key2, + this.$$d[key2], + this.$$p_d, + "toAttribute" + ); + if (attribute_value == null) { + this.removeAttribute(key2); + } else { + this.setAttribute(this.$$p_d[key2].attribute || key2, attribute_value); + } + } + } + this.$$r = false; + }; + this.$$c.$$.after_update.push(reflect_attributes); + reflect_attributes(); + for (const type in this.$$l) { + for (const listener of this.$$l[type]) { + const unsub = this.$$c.$on(type, listener); + this.$$l_u.set(listener, unsub); } } - this.$$listeners = {}; + this.$$l = {}; } } // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte // and setting attributes through setAttribute etc, this is helpful attributeChangedCallback(attr2, _oldValue, newValue) { var _a2; - if (this.$$reflecting) + if (this.$$r) return; - attr2 = this.$$get_prop_name(attr2); - this.$$data[attr2] = get_custom_element_value( - attr2, - newValue, - this.$$props_definition, - "toProp" - ); - (_a2 = this.$$component) == null ? void 0 : _a2.$set({ [attr2]: this.$$data[attr2] }); + attr2 = this.$$g_p(attr2); + this.$$d[attr2] = get_custom_element_value(attr2, newValue, this.$$p_d, "toProp"); + (_a2 = this.$$c) == null ? void 0 : _a2.$set({ [attr2]: this.$$d[attr2] }); } disconnectedCallback() { - this.$$connected = false; + this.$$cn = false; Promise.resolve().then(() => { - if (!this.$$connected) { - this.$$component.$destroy(); - this.$$component = void 0; + if (!this.$$cn) { + this.$$c.$destroy(); + this.$$c = void 0; } }); } - $$get_prop_name(attribute_name) { - return Object.keys(this.$$props_definition).find( - (key2) => this.$$props_definition[key2].attribute === attribute_name || !this.$$props_definition[key2].attribute && key2.toLowerCase() === attribute_name + $$g_p(attribute_name) { + return Object.keys(this.$$p_d).find( + (key2) => this.$$p_d[key2].attribute === attribute_name || !this.$$p_d[key2].attribute && key2.toLowerCase() === attribute_name ) || attribute_name; } }; @@ -36979,19 +36873,19 @@ var SvelteComponent = class { } }; -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/dev.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/dev.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/shared/version.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/shared/version.js init_polyfill_buffer(); var PUBLIC_VERSION = "4"; -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/internal/disclose-version/index.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/internal/disclose-version/index.js init_polyfill_buffer(); if (typeof window !== "undefined") (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(PUBLIC_VERSION); -// node_modules/.pnpm/tslib@2.6.0/node_modules/tslib/tslib.es6.mjs +// node_modules/.pnpm/tslib@2.6.2/node_modules/tslib/tslib.es6.mjs init_polyfill_buffer(); function __awaiter(thisArg, _arguments, P, generator) { function adopt(value) { @@ -37024,23 +36918,23 @@ function __awaiter(thisArg, _arguments, P, generator) { // src/ui/history/historyView.svelte var import_obsidian19 = require("obsidian"); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/index.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/index.js init_polyfill_buffer(); // src/ui/history/components/logComponent.svelte init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/transition/index.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/transition/index.js init_polyfill_buffer(); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/easing/index.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/easing/index.js init_polyfill_buffer(); function cubicOut(t) { const f = t - 1; return f * f * f + 1; } -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/transition/index.js +// node_modules/.pnpm/svelte@4.2.0/node_modules/svelte/src/runtime/transition/index.js function slide(node, { delay: delay2 = 0, duration = 400, easing = cubicOut, axis = "y" } = {}) { const style = getComputedStyle(node); const opacity = +style.opacity; @@ -37072,7 +36966,7 @@ function slide(node, { delay: delay2 = 0, duration = 400, easing = cubicOut, axi init_polyfill_buffer(); var import_obsidian18 = require("obsidian"); function add_css(target) { - append_styles(target, "svelte-pmbo0n", "main.svelte-pmbo0n .nav-file-title-content.svelte-pmbo0n{display:flex;align-items:center}"); + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_if_block(ctx) { let div; @@ -37140,12 +37034,14 @@ function create_fragment(ctx) { ); let t3; let span_data_type_value; + let div3_data_path_value; let div3_aria_label_value; let mounted; let dispose; let if_block = show_if && create_if_block(ctx); return { c() { + var _a2, _b; main = element("main"); div3 = element("div"); div0 = element("div"); @@ -37158,13 +37054,15 @@ function create_fragment(ctx) { t2 = space(); span = element("span"); t3 = text(t3_value); - attr(div0, "class", "tree-item-inner nav-file-title-content svelte-pmbo0n"); + attr(div0, "class", "tree-item-inner nav-file-title-content"); attr(div1, "class", "buttons"); attr(span, "class", "type"); attr(span, "data-type", span_data_type_value = /*diff*/ ctx[0].status); attr(div2, "class", "git-tools"); - attr(div3, "class", "tree-item-self is-clickable nav-file-title"); + attr(div3, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div3, "data-path", div3_data_path_value = /*diff*/ + ctx[0].vault_path); attr( div3, "aria-label-position", @@ -37173,7 +37071,15 @@ function create_fragment(ctx) { ); attr(div3, "aria-label", div3_aria_label_value = /*diff*/ ctx[0].vault_path); - attr(main, "class", "tree-item nav-file svelte-pmbo0n"); + toggle_class( + div3, + "is-active", + /*view*/ + ((_a2 = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*diff*/ + ctx[0].vault_path && /*view*/ + ((_b = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) + ); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); }, m(target, anchor) { insert(target, main, anchor); @@ -37209,6 +37115,7 @@ function create_fragment(ctx) { } }, p(ctx2, [dirty]) { + var _a2, _b; if (dirty & /*diff*/ 1 && t0_value !== (t0_value = getDisplayPath( /*diff*/ @@ -37243,6 +37150,11 @@ function create_fragment(ctx) { ctx2[0].status)) { attr(span, "data-type", span_data_type_value); } + if (dirty & /*diff*/ + 1 && div3_data_path_value !== (div3_data_path_value = /*diff*/ + ctx2[0].vault_path)) { + attr(div3, "data-path", div3_data_path_value); + } if (dirty & /*side*/ 8) { attr( @@ -37257,6 +37169,17 @@ function create_fragment(ctx) { ctx2[0].vault_path)) { attr(div3, "aria-label", div3_aria_label_value); } + if (dirty & /*view, diff*/ + 3) { + toggle_class( + div3, + "is-active", + /*view*/ + ((_a2 = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*diff*/ + ctx2[0].vault_path && /*view*/ + ((_b = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) + ); + } }, i: noop, o: noop, @@ -38978,10 +38901,10 @@ var DiscardModal = class extends import_obsidian23.Modal { init_polyfill_buffer(); var import_obsidian25 = require("obsidian"); -// node_modules/.pnpm/obsidian-community-lib@2.0.2_@codemirror+state@6.2.1_@codemirror+view@6.14.0/node_modules/obsidian-community-lib/dist/index.js +// node_modules/.pnpm/github.com+Vinzent03+obsidian-community-lib@e663de4f95c879b40613090da78ea599ff621d24_@codemir_kbfcpig3uak7df3ohthcqq53p4/node_modules/obsidian-community-lib/dist/index.js init_polyfill_buffer(); -// node_modules/.pnpm/obsidian-community-lib@2.0.2_@codemirror+state@6.2.1_@codemirror+view@6.14.0/node_modules/obsidian-community-lib/dist/utils.js +// node_modules/.pnpm/github.com+Vinzent03+obsidian-community-lib@e663de4f95c879b40613090da78ea599ff621d24_@codemir_kbfcpig3uak7df3ohthcqq53p4/node_modules/obsidian-community-lib/dist/utils.js init_polyfill_buffer(); var feather = __toESM(require_feather()); var import_obsidian24 = require("obsidian"); @@ -38998,7 +38921,7 @@ function hoverPreview(event, view, to) { // src/ui/sourceControl/components/fileComponent.svelte function add_css4(target) { - append_styles(target, "svelte-pmbo0n", "main.svelte-pmbo0n .nav-file-title-content.svelte-pmbo0n{display:flex;align-items:center}"); + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_if_block5(ctx) { let div; @@ -39070,12 +38993,14 @@ function create_fragment5(ctx) { ); let t5; let div4_data_type_value; + let div6_data_path_value; let div6_aria_label_value; let mounted; let dispose; let if_block = show_if && create_if_block5(ctx); return { c() { + var _a2, _b, _c; main = element("main"); div6 = element("div"); div0 = element("div"); @@ -39092,7 +39017,7 @@ function create_fragment5(ctx) { t4 = space(); div4 = element("div"); t5 = text(t5_value); - attr(div0, "class", "tree-item-inner nav-file-title-content svelte-pmbo0n"); + attr(div0, "class", "tree-item-inner nav-file-title-content"); attr(div1, "data-icon", "undo"); attr(div1, "aria-label", "Discard"); attr(div1, "class", "clickable-icon"); @@ -39104,7 +39029,9 @@ function create_fragment5(ctx) { attr(div4, "data-type", div4_data_type_value = /*change*/ ctx[0].working_dir); attr(div5, "class", "git-tools"); - attr(div6, "class", "tree-item-self is-clickable nav-file-title"); + attr(div6, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div6, "data-path", div6_data_path_value = /*change*/ + ctx[0].vault_path); attr( div6, "aria-label-position", @@ -39113,7 +39040,16 @@ function create_fragment5(ctx) { ); attr(div6, "aria-label", div6_aria_label_value = /*change*/ ctx[0].vault_path); - attr(main, "class", "tree-item nav-file svelte-pmbo0n"); + toggle_class( + div6, + "is-active", + /*view*/ + ((_a2 = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx[0].vault_path && !/*view*/ + ((_b = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && !/*view*/ + ((_c = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); }, m(target, anchor) { insert(target, main, anchor); @@ -39169,6 +39105,7 @@ function create_fragment5(ctx) { } }, p(ctx2, [dirty]) { + var _a2, _b, _c; if (dirty & /*change*/ 1 && t0_value !== (t0_value = getDisplayPath( /*change*/ @@ -39203,6 +39140,11 @@ function create_fragment5(ctx) { ctx2[0].working_dir)) { attr(div4, "data-type", div4_data_type_value); } + if (dirty & /*change*/ + 1 && div6_data_path_value !== (div6_data_path_value = /*change*/ + ctx2[0].vault_path)) { + attr(div6, "data-path", div6_data_path_value); + } if (dirty & /*side*/ 8) { attr( @@ -39217,6 +39159,18 @@ function create_fragment5(ctx) { ctx2[0].vault_path)) { attr(div6, "aria-label", div6_aria_label_value); } + if (dirty & /*view, change*/ + 3) { + toggle_class( + div6, + "is-active", + /*view*/ + ((_a2 = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx2[0].vault_path && !/*view*/ + ((_b = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && !/*view*/ + ((_c = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + } }, i: noop, o: noop, @@ -39347,7 +39301,7 @@ var fileComponent_default = FileComponent; init_polyfill_buffer(); var import_obsidian26 = require("obsidian"); function add_css5(target) { - append_styles(target, "svelte-pmbo0n", "main.svelte-pmbo0n .nav-file-title-content.svelte-pmbo0n{display:flex;align-items:center}"); + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_fragment6(ctx) { let main; @@ -39367,6 +39321,7 @@ function create_fragment6(ctx) { ); let t2; let span_data_type_value; + let div2_data_path_value; let div2_aria_label_value; let mounted; let dispose; @@ -39380,12 +39335,14 @@ function create_fragment6(ctx) { div1 = element("div"); span = element("span"); t2 = text(t2_value); - attr(div0, "class", "tree-item-inner nav-file-title-content svelte-pmbo0n"); + attr(div0, "class", "tree-item-inner nav-file-title-content"); attr(span, "class", "type"); attr(span, "data-type", span_data_type_value = /*change*/ ctx[0].working_dir); attr(div1, "class", "git-tools"); - attr(div2, "class", "tree-item-self is-clickable nav-file-title"); + attr(div2, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div2, "data-path", div2_data_path_value = /*change*/ + ctx[0].vault_path); attr( div2, "aria-label-position", @@ -39394,7 +39351,7 @@ function create_fragment6(ctx) { ); attr(div2, "aria-label", div2_aria_label_value = /*change*/ ctx[0].vault_path); - attr(main, "class", "tree-item nav-file svelte-pmbo0n"); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); }, m(target, anchor) { insert(target, main, anchor); @@ -39447,6 +39404,11 @@ function create_fragment6(ctx) { ctx2[0].working_dir)) { attr(span, "data-type", span_data_type_value); } + if (dirty & /*change*/ + 1 && div2_data_path_value !== (div2_data_path_value = /*change*/ + ctx2[0].vault_path)) { + attr(div2, "data-path", div2_data_path_value); + } if (dirty & /*side*/ 2) { attr( @@ -39519,7 +39481,7 @@ var pulledFileComponent_default = PulledFileComponent; init_polyfill_buffer(); var import_obsidian27 = require("obsidian"); function add_css6(target) { - append_styles(target, "svelte-pmbo0n", "main.svelte-pmbo0n .nav-file-title-content.svelte-pmbo0n{display:flex;align-items:center}"); + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_if_block6(ctx) { let div; @@ -39583,12 +39545,14 @@ function create_fragment7(ctx) { ); let t4; let div3_data_type_value; + let div5_data_path_value; let div5_aria_label_value; let mounted; let dispose; let if_block = show_if && create_if_block6(ctx); return { c() { + var _a2, _b, _c; main = element("main"); div5 = element("div"); div0 = element("div"); @@ -39603,7 +39567,7 @@ function create_fragment7(ctx) { t3 = space(); div3 = element("div"); t4 = text(t4_value); - attr(div0, "class", "tree-item-inner nav-file-title-content svelte-pmbo0n"); + attr(div0, "class", "tree-item-inner nav-file-title-content"); attr(div1, "data-icon", "minus"); attr(div1, "aria-label", "Unstage"); attr(div1, "class", "clickable-icon"); @@ -39612,7 +39576,9 @@ function create_fragment7(ctx) { attr(div3, "data-type", div3_data_type_value = /*change*/ ctx[0].index); attr(div4, "class", "git-tools"); - attr(div5, "class", "tree-item-self is-clickable nav-file-title"); + attr(div5, "class", "tree-item-self is-clickable nav-file-title svelte-1wbh8tp"); + attr(div5, "data-path", div5_data_path_value = /*change*/ + ctx[0].vault_path); attr( div5, "aria-label-position", @@ -39621,7 +39587,16 @@ function create_fragment7(ctx) { ); attr(div5, "aria-label", div5_aria_label_value = /*change*/ ctx[0].vault_path); - attr(main, "class", "tree-item nav-file svelte-pmbo0n"); + toggle_class( + div5, + "is-active", + /*view*/ + ((_a2 = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx[0].vault_path && !/*view*/ + ((_b = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && /*view*/ + ((_c = ctx[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + attr(main, "class", "tree-item nav-file svelte-1wbh8tp"); }, m(target, anchor) { insert(target, main, anchor); @@ -39670,6 +39645,7 @@ function create_fragment7(ctx) { } }, p(ctx2, [dirty]) { + var _a2, _b, _c; if (dirty & /*change*/ 1 && t0_value !== (t0_value = getDisplayPath( /*change*/ @@ -39704,6 +39680,11 @@ function create_fragment7(ctx) { ctx2[0].index)) { attr(div3, "data-type", div3_data_type_value); } + if (dirty & /*change*/ + 1 && div5_data_path_value !== (div5_data_path_value = /*change*/ + ctx2[0].vault_path)) { + attr(div5, "data-path", div5_data_path_value); + } if (dirty & /*side*/ 8) { attr( @@ -39718,6 +39699,18 @@ function create_fragment7(ctx) { ctx2[0].vault_path)) { attr(div5, "aria-label", div5_aria_label_value); } + if (dirty & /*view, change*/ + 3) { + toggle_class( + div5, + "is-active", + /*view*/ + ((_a2 = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _a2.file) == /*change*/ + ctx2[0].vault_path && !/*view*/ + ((_b = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _b.hash) && /*view*/ + ((_c = ctx2[1].plugin.lastDiffViewState) == null ? void 0 : _c.staged) + ); + } }, i: noop, o: noop, @@ -39827,7 +39820,7 @@ var stagedFileComponent_default = StagedFileComponent; // src/ui/sourceControl/components/treeComponent.svelte init_polyfill_buffer(); function add_css7(target) { - append_styles(target, "svelte-1lnl15d", "main.svelte-1lnl15d .nav-folder-title-content.svelte-1lnl15d{display:flex;align-items:center}"); + append_styles(target, "svelte-hup5mn", "main.svelte-hup5mn .nav-folder-title.svelte-hup5mn{align-items:center}"); } function get_each_context4(ctx, list, i) { const child_ctx = ctx.slice(); @@ -39916,11 +39909,11 @@ function create_else_block3(ctx) { ctx[15].title ] ); - attr(div2, "class", "tree-item-inner nav-folder-title-content svelte-1lnl15d"); + attr(div2, "class", "tree-item-inner nav-folder-title-content"); set_style(div3, "width", "11px"); attr(div4, "class", "buttons"); attr(div5, "class", "git-tools"); - attr(div6, "class", "tree-item-self is-clickable nav-folder-title"); + attr(div6, "class", "tree-item-self is-clickable nav-folder-title svelte-hup5mn"); attr( div6, "aria-label-position", @@ -40607,7 +40600,7 @@ function create_fragment8(ctx) { for (let i = 0; i < each_blocks.length; i += 1) { each_blocks[i].c(); } - attr(main, "class", "svelte-1lnl15d"); + attr(main, "class", "svelte-hup5mn"); toggle_class( main, "topLevel", @@ -40625,7 +40618,7 @@ function create_fragment8(ctx) { current = true; }, p(ctx2, [dirty]) { - if (dirty & /*hierarchy, plugin, view, fileType, FileType, closed, fold, side, unstage, stage, discard*/ + if (dirty & /*hierarchy, plugin, view, fileType, closed, fold, side, unstage, stage, discard*/ 2031) { each_value = ensure_array_like( /*hierarchy*/ @@ -40781,7 +40774,7 @@ var treeComponent_default = TreeComponent; // src/ui/sourceControl/sourceControl.svelte function add_css8(target) { - append_styles(target, "svelte-48bivb", `.commit-msg-input.svelte-48bivb.svelte-48bivb{width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field)}.git-commit-msg.svelte-48bivb.svelte-48bivb{position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto}main.svelte-48bivb .git-tools .files-count.svelte-48bivb{padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center}.git-commit-msg-clear-button.svelte-48bivb.svelte-48bivb{position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out}.git-commit-msg-clear-button.svelte-48bivb.svelte-48bivb:after{content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,");-webkit-mask-repeat:no-repeat}`); + append_styles(target, "svelte-1bvmxec", `.commit-msg-input.svelte-1bvmxec.svelte-1bvmxec{width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field)}.git-commit-msg.svelte-1bvmxec.svelte-1bvmxec{position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto}main.svelte-1bvmxec .git-tools .files-count.svelte-1bvmxec{padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center}.nav-folder-title.svelte-1bvmxec.svelte-1bvmxec{align-items:center}.git-commit-msg-clear-button.svelte-1bvmxec.svelte-1bvmxec{position:absolute;background:transparent;border-radius:50%;color:var(--search-clear-button-color);cursor:var(--cursor);top:-4px;right:2px;bottom:0px;line-height:0;height:var(--input-height);width:28px;margin:auto;padding:0 0;text-align:center;display:flex;justify-content:center;align-items:center;transition:color 0.15s ease-in-out}.git-commit-msg-clear-button.svelte-1bvmxec.svelte-1bvmxec:after{content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,");-webkit-mask-repeat:no-repeat}`); } function get_each_context5(ctx, list, i) { const child_ctx = ctx.slice(); @@ -40806,7 +40799,7 @@ function create_if_block_8(ctx) { return { c() { div = element("div"); - attr(div, "class", "git-commit-msg-clear-button svelte-48bivb"); + attr(div, "class", "git-commit-msg-clear-button svelte-1bvmxec"); attr(div, "aria-label", div_aria_label_value = "Clear"); }, m(target, anchor) { @@ -40942,9 +40935,9 @@ function create_if_block8(ctx) { attr(div2, "aria-label", "Unstage"); attr(div2, "class", "clickable-icon"); attr(div3, "class", "buttons"); - attr(div4, "class", "files-count svelte-48bivb"); + attr(div4, "class", "files-count svelte-1bvmxec"); attr(div5, "class", "git-tools"); - attr(div6, "class", "tree-item-self is-clickable nav-folder-title"); + attr(div6, "class", "tree-item-self is-clickable nav-folder-title svelte-1bvmxec"); attr(div7, "class", "staged tree-item nav-folder"); toggle_class(div7, "is-collapsed", !/*stagedOpen*/ ctx[13]); @@ -40959,10 +40952,10 @@ function create_if_block8(ctx) { attr(div11, "aria-label", "Stage"); attr(div11, "class", "clickable-icon"); attr(div12, "class", "buttons"); - attr(div13, "class", "files-count svelte-48bivb"); + attr(div13, "class", "files-count svelte-1bvmxec"); attr(div14, "class", "git-tools"); - attr(div15, "class", "tree-item-self is-clickable nav-folder-title"); - attr(div16, "class", "changes nav-folder"); + attr(div15, "class", "tree-item-self is-clickable nav-folder-title svelte-1bvmxec"); + attr(div16, "class", "changes tree-item nav-folder"); toggle_class(div16, "is-collapsed", !/*changesOpen*/ ctx[12]); attr(div17, "class", "tree-item-children nav-folder-children"); @@ -41776,7 +41769,7 @@ function create_if_block_14(ctx) { attr(div0, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); attr(div1, "class", "tree-item-inner nav-folder-title-content"); attr(span, "class", "tree-item-flair"); - attr(div2, "class", "tree-item-self is-clickable nav-folder-title"); + attr(div2, "class", "tree-item-self is-clickable nav-folder-title svelte-1bvmxec"); attr(div3, "class", "pulled nav-folder"); toggle_class(div3, "is-collapsed", !/*lastPulledFilesOpen*/ ctx[14]); @@ -42160,6 +42153,7 @@ function create_fragment9(ctx) { let t8; let t9; let div11; + let main_data_type_value; let current; let mounted; let dispose; @@ -42249,13 +42243,14 @@ function create_fragment9(ctx) { /*rows*/ ctx[15] ); - attr(textarea, "class", "commit-msg-input svelte-48bivb"); + attr(textarea, "class", "commit-msg-input svelte-1bvmxec"); attr(textarea, "spellcheck", "true"); attr(textarea, "placeholder", "Commit Message"); - attr(div10, "class", "git-commit-msg svelte-48bivb"); + attr(div10, "class", "git-commit-msg svelte-1bvmxec"); attr(div11, "class", "nav-files-container"); set_style(div11, "position", "relative"); - attr(main, "class", "svelte-48bivb"); + attr(main, "data-type", main_data_type_value = SOURCE_CONTROL_VIEW_CONFIG.type); + attr(main, "class", "svelte-1bvmxec"); }, m(target, anchor) { insert(target, main, anchor); @@ -42478,8 +42473,8 @@ function instance9($$self, $$props, $$invalidate) { plugin.app.workspace.onLayoutReady(() => { window.setTimeout( () => { - buttons.forEach((btn) => (0, import_obsidian28.setIcon)(btn, btn.getAttr("data-icon"), 16)); - (0, import_obsidian28.setIcon)(layoutBtn, showTree ? "list" : "folder", 16); + buttons.forEach((btn) => (0, import_obsidian28.setIcon)(btn, btn.getAttr("data-icon"))); + (0, import_obsidian28.setIcon)(layoutBtn, showTree ? "list" : "folder"); }, 0 ); @@ -42522,6 +42517,21 @@ function instance9($$self, $$props, $$invalidate) { $$invalidate(6, status2 = void 0); return; } + const unPushedCommits = yield plugin.gitManager.getUnpushedCommits(); + buttons.forEach((btn) => { + var _a2, _b; + if (import_obsidian28.Platform.isMobile) { + btn.removeClass("button-border"); + if (btn.id == "push" && unPushedCommits > 0) { + btn.addClass("button-border"); + } + } else { + (_a2 = btn.firstElementChild) === null || _a2 === void 0 ? void 0 : _a2.removeAttribute("color"); + if (btn.id == "push" && unPushedCommits > 0) { + (_b = btn.firstElementChild) === null || _b === void 0 ? void 0 : _b.setAttr("color", "var(--text-accent)"); + } + } + }); $$invalidate(6, status2 = plugin.cachedStatus); if (plugin.lastPulledFiles && plugin.lastPulledFiles != lastPulledFiles) { $$invalidate(7, lastPulledFiles = plugin.lastPulledFiles); @@ -42674,7 +42684,7 @@ function instance9($$self, $$props, $$invalidate) { $: { if (layoutBtn) { layoutBtn.empty(); - (0, import_obsidian28.setIcon)(layoutBtn, showTree ? "list" : "folder", 16); + (0, import_obsidian28.setIcon)(layoutBtn, showTree ? "list" : "folder"); } } } @@ -42963,6 +42973,11 @@ var ObsidianGit = class extends import_obsidian30.Plugin { name: "Pull", callback: () => this.promiseQueue.addTask(() => this.pullChangesFromRemote()) }); + this.addCommand({ + id: "fetch", + name: "fetch", + callback: () => this.promiseQueue.addTask(() => this.fetch()) + }); this.addCommand({ id: "switch-to-remote-branch", name: "Switch to remote branch", @@ -43323,6 +43338,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { "git-head-update", this.refreshUpdatedHead.bind(this) ); + this.app.workspace.offref(this.openEvent); this.app.metadataCache.offref(this.modifyEvent); this.app.metadataCache.offref(this.deleteEvent); this.app.metadataCache.offref(this.createEvent); @@ -43392,6 +43408,10 @@ var ObsidianGit = class extends import_obsidian30.Plugin { case "valid": this.gitReady = true; this.setState(0 /* idle */); + this.openEvent = this.app.workspace.on( + "active-leaf-change", + (leaf) => this.handleViewActiveState(leaf) + ); this.modifyEvent = this.app.vault.on("modify", () => { this.debRefresh(); }); @@ -43751,6 +43771,15 @@ var ObsidianGit = class extends import_obsidian30.Plugin { } return pulledFiles.length != 0; } + async fetch() { + if (!await this.remotesAreSet()) { + return; + } + await this.gitManager.fetch(); + this.displayMessage(`Fetched from remote`); + this.offlineMode = false; + dispatchEvent(new CustomEvent("git-refresh")); + } async mayDeleteConflictFile() { const file = this.app.vault.getAbstractFileByPath( this.conflictOutputFile @@ -44124,6 +44153,36 @@ I strongly recommend to use "Source mode" for viewing the conflicted files. For this.app.workspace.openLinkText(this.conflictOutputFile, "/", true); } } + handleViewActiveState(leaf) { + var _a2, _b; + if (!(leaf == null ? void 0 : leaf.view.getState().file)) + return; + const sourceControlLeaf = this.app.workspace.getLeavesOfType(SOURCE_CONTROL_VIEW_CONFIG.type).first(); + const historyLeaf = this.app.workspace.getLeavesOfType(HISTORY_VIEW_CONFIG.type).first(); + (_a2 = sourceControlLeaf == null ? void 0 : sourceControlLeaf.view.containerEl.querySelector(`div.nav-file-title.is-active`)) == null ? void 0 : _a2.removeClass("is-active"); + (_b = historyLeaf == null ? void 0 : historyLeaf.view.containerEl.querySelector(`div.nav-file-title.is-active`)) == null ? void 0 : _b.removeClass("is-active"); + if ((leaf == null ? void 0 : leaf.view) instanceof DiffView) { + const path2 = leaf.view.state.file; + this.lastDiffViewState = leaf.view.getState(); + let el; + if (sourceControlLeaf && leaf.view.state.staged) { + el = sourceControlLeaf.view.containerEl.querySelector( + `div.staged div.nav-file-title[data-path='${path2}']` + ); + } else if (sourceControlLeaf && leaf.view.state.staged === false && !leaf.view.state.hash) { + el = sourceControlLeaf.view.containerEl.querySelector( + `div.changes div.nav-file-title[data-path='${path2}']` + ); + } else if (historyLeaf && leaf.view.state.hash) { + el = historyLeaf.view.containerEl.querySelector( + `div.nav-file-title[data-path='${path2}']` + ); + } + el == null ? void 0 : el.addClass("is-active"); + } else { + this.lastDiffViewState = void 0; + } + } // region: displaying / formatting messages displayMessage(message, timeout = 4 * 1e3) { var _a2; diff --git a/.obsidian/plugins/obsidian-git/manifest.json b/.obsidian/plugins/obsidian-git/manifest.json index edb53f6..a771a54 100644 --- a/.obsidian/plugins/obsidian-git/manifest.json +++ b/.obsidian/plugins/obsidian-git/manifest.json @@ -5,5 +5,5 @@ "isDesktopOnly": false, "fundingUrl": "https://ko-fi.com/vinzent", "js": "main.js", - "version": "2.20.7" + "version": "2.22.0" } diff --git a/.obsidian/plugins/obsidian-git/styles.css b/.obsidian/plugins/obsidian-git/styles.css index 39cdb13..c1d5065 100644 --- a/.obsidian/plugins/obsidian-git/styles.css +++ b/.obsidian/plugins/obsidian-git/styles.css @@ -8,6 +8,11 @@ } } +.workspace-leaf-content[data-type='git-view'] .button-border { + border: 2px solid var(--interactive-accent); + border-radius: var(--radius-s); +} + .workspace-leaf-content[data-type='git-view'] .view-content { padding: 0; } diff --git a/.obsidian/plugins/obsidian-hider/main.js b/.obsidian/plugins/obsidian-hider/main.js index 3edafa0..19e0569 100644 --- a/.obsidian/plugins/obsidian-hider/main.js +++ b/.obsidian/plugins/obsidian-hider/main.js @@ -47,7 +47,7 @@ class Hider extends obsidian.Plugin { document.body.classList.toggle('hider-file-nav-header', this.settings.hideFileNavButtons); document.body.classList.toggle('hider-search-counts', this.settings.hideSearchCounts); document.body.classList.toggle('hider-instructions', this.settings.hideInstructions); - document.body.classList.toggle('hider-meta', this.settings.hideMeta); + document.body.classList.toggle('hider-meta', this.settings.hidePropertiesReading); document.body.classList.toggle('hider-vault', this.settings.hideVault); }; } @@ -113,7 +113,7 @@ const DEFAULT_SETTINGS = { hideSearchSuggestions: false, hideSearchCounts: false, hideInstructions: false, - hideMeta: false, + hidePropertiesReading: false, hideVault: false }; class HiderSettingTab extends obsidian.PluginSettingTab { @@ -224,11 +224,11 @@ class HiderSettingTab extends obsidian.PluginSettingTab { this.plugin.refresh(); })); new obsidian.Setting(containerEl) - .setName('Hide metadata block in Reading view') - .setDesc('When front matter is turned off in your Editor settings this hides the metadata block') - .addToggle(toggle => toggle.setValue(this.plugin.settings.hideMeta) + .setName('Hide properties in Reading view') + .setDesc('Hides the properties section in Reading view') + .addToggle(toggle => toggle.setValue(this.plugin.settings.hidePropertiesReading) .onChange((value) => { - this.plugin.settings.hideMeta = value; + this.plugin.settings.hidePropertiesReading = value; this.plugin.saveData(this.plugin.settings); this.plugin.refresh(); })); @@ -236,4 +236,4 @@ class HiderSettingTab extends obsidian.PluginSettingTab { } module.exports = Hider; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFpbi5qcyIsInNvdXJjZXMiOlsibm9kZV9tb2R1bGVzL3RzbGliL3RzbGliLmVzNi5qcyIsIm1haW4udHMiXSwic291cmNlc0NvbnRlbnQiOlsiLyohICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbkNvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLlxyXG5cclxuUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55XHJcbnB1cnBvc2Ugd2l0aCBvciB3aXRob3V0IGZlZSBpcyBoZXJlYnkgZ3JhbnRlZC5cclxuXHJcblRIRSBTT0ZUV0FSRSBJUyBQUk9WSURFRCBcIkFTIElTXCIgQU5EIFRIRSBBVVRIT1IgREl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G9yIGlzIGFscmVhZHkgZXhlY3V0aW5nLlwiKTtcclxuICAgICAgICB3aGlsZSAoXykgdHJ5IHtcclxuICAgICAgICAgICAgaWYgKGYgPSAxLCB5ICYmICh0ID0gb3BbMF0gJiAyID8geVtcInJldHVyblwiXSA6IG9wWzBdID8geVtcInRocm93XCJdIHx8ICgodCA9IHlbXCJyZXR1cm5cIl0pICYmIHQuY2FsbCh5KSwgMCkgOiB5Lm5leHQpICYmICEodCA9IHQuY2FsbCh5LCBvcFsxXSkpLmRvbmUpIHJldHVybiB0O1xyXG4gICAgICAgICAgICBpZiAoeSA9IDAsIHQpIG9wID0gW29wWzBdICYgMiwgdC52YWx1ZV07XHJcbiAgICAgICAgICAgIHN3aXRjaCAob3BbMF0pIHtcclxuICAgICAgICAgICAgICAgIGNhc2UgMDogY2FzZSAxOiB0ID0gb3A7IGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgY2FzZSA0OiBfLmxhYmVsKys7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJ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7IHJldHVybiB7IHZhbHVlOiBvcFsxXSwgZG9uZTogZmFsc2UgfTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNTogXy5sYWJlbCsrOyB5ID0gb3BbMV07IG9wID0gWzBdOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGNhc2UgNzogb3AgPSBfLm9wcy5wb3AoKTsgXy50cnlzLnBvcCgpOyBjb250aW51ZTtcclxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCEodCA9IF8udHJ5cywgdCA9IHQubGVuZ3RoID4gMCAmJiB0W3QubGVuZ3RoIC0gMV0pICYmIChvcFswXSA9PT0gNiB8fCBvcFswXSA9PT0gMikpIHsgXyA9IDA7IGNvbnRpbnVlOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wWzBdID09PSAzICYmICghdCB8fCAob3BbMV0gPiB0WzBdICYmIG9wWzFdIDwgdFszXSkpKSB7IF8ubGFiZWwgPSBvcFsxXTsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAob3BbMF0gPT09IDYgJiYgXy5sYWJlbCA8IHRbMV0pIHsgXy5sYWJlbCA9IHRbMV07IHQgPSBvcDsgYnJlYWs7IH1cclxuICAgICAgICAgICAgICAgICAgICBpZiAodCAmJiBfLmxhYmVsIDwgdFsyXSkgeyBfLmxhYmVsID0gdFsyXTsgXy5vcHMucHVzaChvcCk7IGJyZWFrOyB9XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRbMl0pIF8ub3BzLnBvcCgpO1xyXG4gICAgICAgICAgICAgICAgICAgIF8udHJ5cy5wb3AoKTsgY29udGludWU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgb3AgPSBib2R5LmNhbGwodGhpc0FyZywgXyk7XHJcbiAgICAgICAgfSBjYXRjaCAoZSkgeyBvcCA9IFs2LCBlXTsgeSA9IDA7IH0gZmluYWxseSB7IGYgPSB0ID0gMD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QUM7UUFFUixJQUFJQSxnQkFBTyxDQUFDLFdBQVcsQ0FBQzthQUNyQixPQUFPLENBQUMsaUNBQWlDLENBQUM7YUFDMUMsT0FBTyxDQUFDLDhDQUE4QyxDQUFDO2FBQ3ZELFNBQVMsQ0FBQyxNQUFNLElBQUksTUFBTSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxxQkFBcUIsQ0FBQzthQUMzRSxRQUFRLENBQUMsQ0FBQyxLQUFLO1lBQ2QsSUFBSSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMscUJBQXFCLEdBQUcsS0FBSyxDQUFDO1lBQ25ELElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLENBQUM7WUFDM0MsSUFBSSxDQUFDLE1BQU0sQ0FBQyxPQUFPLEVBQUUsQ0FBQztTQUNyQixDQUFDLENBQ0gsQ0FBQztLQUlUOzs7OzsifQ== diff --git a/.obsidian/plugins/obsidian-hider/manifest.json b/.obsidian/plugins/obsidian-hider/manifest.json index 13983eb..583c60e 100644 --- a/.obsidian/plugins/obsidian-hider/manifest.json +++ b/.obsidian/plugins/obsidian-hider/manifest.json @@ -1,8 +1,8 @@ { "id": "obsidian-hider", "name": "Hider", - "version": "1.2.5", - "minAppVersion": "0.16.0", + "version": "1.3.1", + "minAppVersion": "1.4.0", "description": "Hide UI elements such as tooltips, status, titlebar and more", "author": "@kepano", "authorUrl": "https://www.twitter.com/kepano", diff --git a/.obsidian/plugins/obsidian-hider/styles.css b/.obsidian/plugins/obsidian-hider/styles.css index 094973e..1f79815 100644 --- a/.obsidian/plugins/obsidian-hider/styles.css +++ b/.obsidian/plugins/obsidian-hider/styles.css @@ -37,7 +37,7 @@ } /* Hide meta */ -.hider-meta .frontmatter-container { +.hider-meta .markdown-reading-view .metadata-container { display:none; } diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 927c4e3..bc9ed46 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -25,13 +25,14 @@ "state": { "type": "markdown", "state": { - "file": "Hab.2-3.md", + "file": "Hab.2.20-3.19.md", "mode": "source", "source": false } } } - ] + ], + "currentTab": 1 } ], "direction": "vertical" @@ -105,7 +106,7 @@ "state": { "type": "outline", "state": { - "file": "README.md" + "file": "Hab.2.20-3.19.md" } } }, @@ -126,7 +127,7 @@ "state": { "type": "backlink", "state": { - "file": "README.md", + "file": "Hab.2.20-3.19.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -143,7 +144,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "README.md", + "file": "Hab.2.20-3.19.md", "linksCollapsed": false, "unlinkedCollapsed": true } @@ -178,10 +179,10 @@ "workspaces:Manage workspace layouts": false } }, - "active": "1525ca662bf8f78d", + "active": "d3f4b06a3b98097f", "lastOpenFiles": [ - "Hab.2-3.md", "README.md", + "Hab.2.20-3.19.md", "Mat.25.31-46.md", "Eze.34.1-24.md", "images/2023-11-26 Eze.34.1-24.png", diff --git a/Hab.2-3.md b/Hab.2.20-3.19.md similarity index 90% rename from Hab.2-3.md rename to Hab.2.20-3.19.md index 93a9ff2..e6eac8c 100644 --- a/Hab.2-3.md +++ b/Hab.2.20-3.19.md @@ -1,4 +1,4 @@ -經文:哈巴谷書2-3章 +經文:哈巴谷書2:20; 3:16-19 題目:耶和華在祂殿中 日期:2023-12-31 教會:竹圍信友堂 diff --git a/README.md b/README.md index 72a5506..2aa8c5d 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ | 2023-07-23 | 台北衛理堂 | 羅馬書 8:12-25 | 榮耀的盼望 (二) | [羅 8:12-25](Rom.8.12-25.md) | | 2023-09-03 | 大直真理堂 | 哥林多後書 3:1-6 | 蒙福之人 | [林後 3:1-6](2Co.3.1-6.md) | | 2023-11-26 | 台北衛理堂 (兩堂證道) | 以西結書 34:1-24 | 耶穌親自牧養:我們要認識祂、回應祂 | [結 34:1-16, 20-24](Eze.34.1-24.md) | -| 2023-12-31 | 竹圍信友堂 | 哈巴谷書2-3章 | 耶和華在祂殿中 | [哈 2-3 ](Hab.2-3.md) | +| 2023-12-31 | 竹圍信友堂 | 哈巴谷書2-3章 | 耶和華在祂殿中 | [哈 2:20; 3:16-19 ](Hab.2.20-3.19.md) |