diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json index c8c365d..5a3f401 100644 --- a/.obsidian/appearance.json +++ b/.obsidian/appearance.json @@ -1,3 +1,4 @@ { - "accentColor": "" + "accentColor": "", + "theme": "obsidian" } \ No newline at end of file diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index c89f70a..522df7a 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -1,7 +1,7 @@ -<<<<<<< HEAD [ + "calendar", + "obsidian-kanban", + "obsidian-outliner", + "obsidian-version-history-diff", "obsidian-git" -] -======= -[] ->>>>>>> origin/master +] \ No newline at end of file diff --git a/.obsidian/core-plugins-migration.json b/.obsidian/core-plugins-migration.json index 3106ebd..86f43c0 100644 --- a/.obsidian/core-plugins-migration.json +++ b/.obsidian/core-plugins-migration.json @@ -25,5 +25,7 @@ "workspaces": false, "file-recovery": true, "publish": false, - "sync": false + "sync": false, + "properties": false, + "bookmarks": true } \ No newline at end of file diff --git a/.obsidian/core-plugins.json b/.obsidian/core-plugins.json index 086a8e4..9405bfd 100644 --- a/.obsidian/core-plugins.json +++ b/.obsidian/core-plugins.json @@ -13,7 +13,7 @@ "note-composer", "command-palette", "editor-status", - "starred", + "bookmarks", "outline", "word-count", "file-recovery" diff --git a/.obsidian/graph.json b/.obsidian/graph.json index 5c082f2..45e5682 100644 --- a/.obsidian/graph.json +++ b/.obsidian/graph.json @@ -26,5 +26,5 @@ "linkStrength": 1, "linkDistance": 250, "scale": 0.7132754626224436, - "close": true + "close": false } \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-git/data.json b/.obsidian/plugins/obsidian-git/data.json index e0b29e6..be93772 100644 --- a/.obsidian/plugins/obsidian-git/data.json +++ b/.obsidian/plugins/obsidian-git/data.json @@ -1,6 +1,5 @@ { "commitMessage": "vault backup: {{date}}", - "autoCommitMessage": "vault backup: {{date}}", "commitDateFormat": "YYYY-MM-DD HH:mm:ss", "autoSaveInterval": 0, "autoPushInterval": 0, @@ -9,16 +8,51 @@ "disablePush": false, "pullBeforePush": true, "disablePopups": false, + "disablePopupsForNoChanges": false, "listChangedFilesInMessageBody": false, "showStatusBar": true, "updateSubmodules": false, "syncMethod": "merge", - "gitPath": "", "customMessageOnAutoBackup": false, "autoBackupAfterFileChange": false, "treeStructure": false, "refreshSourceControl": true, "basePath": "", "differentIntervalCommitAndPush": false, - "changedFilesInStatusBar": false + "changedFilesInStatusBar": false, + "showedMobileNotice": true, + "refreshSourceControlTimer": 7000, + "showBranchStatusBar": true, + "setLastSaveToLastCommit": false, + "submoduleRecurseCheckout": false, + "gitDir": "", + "showFileMenu": true, + "authorInHistoryView": "hide", + "dateInHistoryView": false, + "lineAuthor": { + "show": false, + "followMovement": "inactive", + "authorDisplay": "initials", + "showCommitHash": false, + "dateTimeFormatOptions": "date", + "dateTimeFormatCustomString": "YYYY-MM-DD HH:mm", + "dateTimeTimezone": "viewer-local", + "coloringMaxAge": "1y", + "colorNew": { + "r": 255, + "g": 150, + "b": 150 + }, + "colorOld": { + "r": 120, + "g": 160, + "b": 255 + }, + "textColorCss": "var(--text-muted)", + "ignoreWhitespace": false, + "gutterSpacingFallbackLength": 5, + "lastShownAuthorDisplay": "initials", + "lastShownDateTimeFormatOptions": "date" + }, + "autoCommitMessage": "vault backup: {{date}}" } \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-git/main.js b/.obsidian/plugins/obsidian-git/main.js index cb9b8ab..5b1b9f2 100644 --- a/.obsidian/plugins/obsidian-git/main.js +++ b/.obsidian/plugins/obsidian-git/main.js @@ -1,55 +1,33 @@ /* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD -if you want to view the source visit the plugins github repository (https://github.com/phibr0/obsidian-dictionary) +if you want to view the source visit the plugins github repository (https://github.com/denolehov/obsidian-git) */ var __create = Object.create; var __defProp = Object.defineProperty; -var __defProps = Object.defineProperties; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropDescs = Object.getOwnPropertyDescriptors; var __getOwnPropNames = Object.getOwnPropertyNames; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -<<<<<<< HEAD var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value; var __esm = (fn, res) => function __init() { return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -======= -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value; -var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; ->>>>>>> origin/master }; -var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); -var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); var __commonJS = (cb, mod) => function __require() { - return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { - __markAsModule(target); for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; -var __reExport = (target, module2, desc) => { - if (module2 && typeof module2 === "object" || typeof module2 === "function") { - for (let key2 of __getOwnPropNames(module2)) - if (!__hasOwnProp.call(target, key2) && key2 !== "default") - __defProp(target, key2, { get: () => module2[key2], enumerable: !(desc = __getOwnPropDesc(module2, key2)) || desc.enumerable }); - } - return target; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key2 of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key2) && key2 !== except) + __defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable }); + } + return to; }; -<<<<<<< HEAD var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- @@ -271,296 +249,18 @@ var require_buffer = __commonJS({ ); } function typedArraySupport() { -======= -var __toModule = (module2) => { - return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); -}; -var __async = (__this, __arguments, generator) => { - return new Promise((resolve, reject) => { - var fulfilled = (value) => { ->>>>>>> origin/master try { - step(generator.next(value)); + const arr = new Uint8Array(1); + const proto = { foo: function() { + return 42; + } }; + Object.setPrototypeOf(proto, Uint8Array.prototype); + Object.setPrototypeOf(arr, proto); + return arr.foo() === 42; } catch (e) { - reject(e); - } - }; - var rejected = (value) => { - try { - step(generator.throw(value)); - } catch (e) { - reject(e); - } - }; - var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); - step((generator = generator.apply(__this, __arguments)).next()); -}); -}; - -// node_modules/ms/index.js -var require_ms = __commonJS({ - "node_modules/ms/index.js"(exports, module2) { - var s = 1e3; - var m = s * 60; - var h = m * 60; - var d = h * 24; - var w = d * 7; - var y = d * 365.25; - module2.exports = function(val, options) { - options = options || {}; - var type = typeof val; - if (type === "string" && val.length > 0) { - return parse(val); - } else if (type === "number" && isFinite(val)) { - return options.long ? fmtLong(val) : fmtShort(val); - } - throw new Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(val)); - }; - function parse(str) { - str = String(str); - if (str.length > 100) { - return; - } - var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str); - if (!match) { - return; - } - var n = parseFloat(match[1]); - var type = (match[2] || "ms").toLowerCase(); - switch (type) { - case "years": - case "year": - case "yrs": - case "yr": - case "y": - return n * y; - case "weeks": - case "week": - case "w": - return n * w; - case "days": - case "day": - case "d": - return n * d; - case "hours": - case "hour": - case "hrs": - case "hr": - case "h": - return n * h; - case "minutes": - case "minute": - case "mins": - case "min": - case "m": - return n * m; - case "seconds": - case "second": - case "secs": - case "sec": - case "s": - return n * s; - case "milliseconds": - case "millisecond": - case "msecs": - case "msec": - case "ms": - return n; - default: - return void 0; - } - } - function fmtShort(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return Math.round(ms / d) + "d"; - } - if (msAbs >= h) { - return Math.round(ms / h) + "h"; - } - if (msAbs >= m) { - return Math.round(ms / m) + "m"; - } - if (msAbs >= s) { - return Math.round(ms / s) + "s"; - } - return ms + "ms"; - } - function fmtLong(ms) { - var msAbs = Math.abs(ms); - if (msAbs >= d) { - return plural(ms, msAbs, d, "day"); - } - if (msAbs >= h) { - return plural(ms, msAbs, h, "hour"); - } - if (msAbs >= m) { - return plural(ms, msAbs, m, "minute"); - } - if (msAbs >= s) { - return plural(ms, msAbs, s, "second"); - } - return ms + " ms"; - } - function plural(ms, msAbs, n, name) { - var isPlural = msAbs >= n * 1.5; - return Math.round(ms / n) + " " + name + (isPlural ? "s" : ""); - } - } -}); - -// node_modules/debug/src/common.js -var require_common = __commonJS({ - "node_modules/debug/src/common.js"(exports, module2) { - function setup(env) { - createDebug.debug = createDebug; - createDebug.default = createDebug; - createDebug.coerce = coerce; - createDebug.disable = disable; - createDebug.enable = enable; - createDebug.enabled = enabled; - createDebug.humanize = require_ms(); - createDebug.destroy = destroy; - Object.keys(env).forEach((key2) => { - createDebug[key2] = env[key2]; - }); - createDebug.names = []; - createDebug.skips = []; - createDebug.formatters = {}; - function selectColor(namespace) { - let hash2 = 0; - for (let i = 0; i < namespace.length; i++) { - hash2 = (hash2 << 5) - hash2 + namespace.charCodeAt(i); - hash2 |= 0; - } - return createDebug.colors[Math.abs(hash2) % createDebug.colors.length]; - } - createDebug.selectColor = selectColor; - function createDebug(namespace) { - let prevTime; - let enableOverride = null; - let namespacesCache; - let enabledCache; - function debug2(...args) { - if (!debug2.enabled) { - return; - } - const self3 = debug2; - const curr = Number(new Date()); - const ms = curr - (prevTime || curr); - self3.diff = ms; - self3.prev = prevTime; - self3.curr = curr; - prevTime = curr; - args[0] = createDebug.coerce(args[0]); - if (typeof args[0] !== "string") { - args.unshift("%O"); - } - let index = 0; - args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => { - if (match === "%%") { - return "%"; - } - index++; - const formatter = createDebug.formatters[format]; - if (typeof formatter === "function") { - const val = args[index]; - match = formatter.call(self3, val); - args.splice(index, 1); - index--; - } - return match; - }); - createDebug.formatArgs.call(self3, args); - const logFn = self3.log || createDebug.log; - logFn.apply(self3, args); - } - debug2.namespace = namespace; - debug2.useColors = createDebug.useColors(); - debug2.color = createDebug.selectColor(namespace); - debug2.extend = extend; - debug2.destroy = createDebug.destroy; - Object.defineProperty(debug2, "enabled", { - enumerable: true, - configurable: false, - get: () => { - if (enableOverride !== null) { - return enableOverride; - } - if (namespacesCache !== createDebug.namespaces) { - namespacesCache = createDebug.namespaces; - enabledCache = createDebug.enabled(namespace); - } - return enabledCache; - }, - set: (v) => { - enableOverride = v; - } - }); - if (typeof createDebug.init === "function") { - createDebug.init(debug2); - } - return debug2; - } - function extend(namespace, delimiter) { - const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace); - newDebug.log = this.log; - return newDebug; - } - function enable(namespaces) { - createDebug.save(namespaces); - createDebug.namespaces = namespaces; - createDebug.names = []; - createDebug.skips = []; - let i; - const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/); - const len = split.length; - for (i = 0; i < len; i++) { - if (!split[i]) { - continue; - } - namespaces = split[i].replace(/\*/g, ".*?"); - if (namespaces[0] === "-") { - createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$")); - } else { - createDebug.names.push(new RegExp("^" + namespaces + "$")); - } - } - } - function disable() { - const namespaces = [ - ...createDebug.names.map(toNamespace), - ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace) - ].join(","); - createDebug.enable(""); - return namespaces; - } - function enabled(name) { - if (name[name.length - 1] === "*") { - return true; - } - let i; - let len; - for (i = 0, len = createDebug.skips.length; i < len; i++) { - if (createDebug.skips[i].test(name)) { - return false; - } - } - for (i = 0, len = createDebug.names.length; i < len; i++) { - if (createDebug.names[i].test(name)) { - return true; - } - } return false; } - function toNamespace(regexp) { - return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*"); - } - function coerce(val) { - if (val instanceof Error) { - return val.stack || val.message; } -<<<<<<< HEAD Object.defineProperty(Buffer2.prototype, "parent", { enumerable: true, get: function() { @@ -792,123 +492,10 @@ var require_common = __commonJS({ case "ucs-2": case "utf16le": case "utf-16le": -======= - return val; - } - function destroy() { - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - createDebug.enable(createDebug.load()); - return createDebug; - } - module2.exports = setup; - } -}); - -// node_modules/debug/src/browser.js -var require_browser = __commonJS({ - "node_modules/debug/src/browser.js"(exports, module2) { - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.storage = localstorage(); - exports.destroy = (() => { - let warned = false; - return () => { - if (!warned) { - warned = true; - console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - } - }; - })(); - exports.colors = [ - "#0000CC", - "#0000FF", - "#0033CC", - "#0033FF", - "#0066CC", - "#0066FF", - "#0099CC", - "#0099FF", - "#00CC00", - "#00CC33", - "#00CC66", - "#00CC99", - "#00CCCC", - "#00CCFF", - "#3300CC", - "#3300FF", - "#3333CC", - "#3333FF", - "#3366CC", - "#3366FF", - "#3399CC", - "#3399FF", - "#33CC00", - "#33CC33", - "#33CC66", - "#33CC99", - "#33CCCC", - "#33CCFF", - "#6600CC", - "#6600FF", - "#6633CC", - "#6633FF", - "#66CC00", - "#66CC33", - "#9900CC", - "#9900FF", - "#9933CC", - "#9933FF", - "#99CC00", - "#99CC33", - "#CC0000", - "#CC0033", - "#CC0066", - "#CC0099", - "#CC00CC", - "#CC00FF", - "#CC3300", - "#CC3333", - "#CC3366", - "#CC3399", - "#CC33CC", - "#CC33FF", - "#CC6600", - "#CC6633", - "#CC9900", - "#CC9933", - "#CCCC00", - "#CCCC33", - "#FF0000", - "#FF0033", - "#FF0066", - "#FF0099", - "#FF00CC", - "#FF00FF", - "#FF3300", - "#FF3333", - "#FF3366", - "#FF3399", - "#FF33CC", - "#FF33FF", - "#FF6600", - "#FF6633", - "#FF9900", - "#FF9933", - "#FFCC00", - "#FFCC33" - ]; - function useColors() { - if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) { ->>>>>>> origin/master return true; - } - if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) { + default: return false; } -<<<<<<< HEAD }; Buffer2.concat = function concat(list, length) { if (!Array.isArray(list)) { @@ -916,28 +503,14 @@ var require_browser = __commonJS({ } if (list.length === 0) { return Buffer2.alloc(0); -======= - return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/); } - function formatArgs(args) { - args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff); - if (!this.useColors) { - return; ->>>>>>> origin/master - } - const c = "color: " + this.color; - args.splice(1, 0, c, "color: inherit"); - let index = 0; - let lastC = 0; - args[0].replace(/%[a-zA-Z%]/g, (match) => { - if (match === "%%") { - return; + let i; + if (length === void 0) { + length = 0; + for (i = 0; i < list.length; ++i) { + length += list[i].length; } - index++; - if (match === "%c") { - lastC = index; } -<<<<<<< HEAD const buffer2 = Buffer2.allocUnsafe(length); let pos = 0; for (i = 0; i < list.length; ++i) { @@ -1105,7 +678,7 @@ var require_browser = __commonJS({ return slowToString.apply(this, arguments); }; Buffer2.prototype.toLocaleString = Buffer2.prototype.toString; - Buffer2.prototype.equals = function equals2(b) { + Buffer2.prototype.equals = function equals3(b) { if (!Buffer2.isBuffer(b)) throw new TypeError("Argument must be a Buffer"); if (this === b) @@ -2366,9 +1939,9 @@ var init_polyfill_buffer = __esm({ } }); -// node_modules/.pnpm/async-lock@1.4.0/node_modules/async-lock/lib/index.js +// node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/lib/index.js var require_lib = __commonJS({ - "node_modules/.pnpm/async-lock@1.4.0/node_modules/async-lock/lib/index.js"(exports2, module2) { + "node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/lib/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var AsyncLock2 = function(opts) { @@ -2505,12 +2078,13 @@ var require_lib = __commonJS({ if (self2.domainReentrant && !!process.domain) { exec = process.domain.bind(exec); } + var maxPending = opts.maxPending || self2.maxPending; if (!self2.queues[key2]) { self2.queues[key2] = []; exec(true); } else if (self2.domainReentrant && !!process.domain && process.domain === self2.domains[key2]) { exec(false); - } else if (self2.queues[key2].length >= self2.maxPending) { + } else if (self2.queues[key2].length >= maxPending) { done(false, new Error("Too many pending tasks in queue " + key2)); } else { var taskFn = function() { @@ -2581,837 +2155,25 @@ var require_lib = __commonJS({ } }; AsyncLock2.prototype._promiseTry = function(fn) { -======= - }); - args.splice(lastC, 0, c); - } - exports.log = console.debug || console.log || (() => { - }); - function save(namespaces) { ->>>>>>> origin/master try { - if (namespaces) { - exports.storage.setItem("debug", namespaces); - } else { - exports.storage.removeItem("debug"); - } - } catch (error) { - } - } - function load() { - let r; - try { - r = exports.storage.getItem("debug"); - } catch (error) { - } - if (!r && typeof process !== "undefined" && "env" in process) { - r = process.env.DEBUG; - } - return r; - } - function localstorage() { - try { - return localStorage; - } catch (error) { - } - } - module2.exports = require_common()(exports); - var { formatters } = module2.exports; - formatters.j = function(v) { - try { - return JSON.stringify(v); - } catch (error) { - return "[UnexpectedJSONParseError]: " + error.message; - } - }; - } -}); - -<<<<<<< HEAD -// node_modules/.pnpm/async-lock@1.4.0/node_modules/async-lock/index.js -var require_async_lock = __commonJS({ - "node_modules/.pnpm/async-lock@1.4.0/node_modules/async-lock/index.js"(exports2, module2) { -======= -// node_modules/has-flag/index.js -var require_has_flag = __commonJS({ - "node_modules/has-flag/index.js"(exports, module2) { ->>>>>>> origin/master - "use strict"; - module2.exports = (flag, argv = process.argv) => { - const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; - const position = argv.indexOf(prefix + flag); - const terminatorPosition = argv.indexOf("--"); - return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); - }; - } -}); - -// node_modules/supports-color/index.js -var require_supports_color = __commonJS({ - "node_modules/supports-color/index.js"(exports, module2) { - "use strict"; - var os = require("os"); - var tty = require("tty"); - var hasFlag = require_has_flag(); - var { env } = process; - var forceColor; - if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { - forceColor = 0; - } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { - forceColor = 1; - } - if ("FORCE_COLOR" in env) { - if (env.FORCE_COLOR === "true") { - forceColor = 1; - } else if (env.FORCE_COLOR === "false") { - forceColor = 0; - } else { - forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3); - } - } - function translateLevel(level) { - if (level === 0) { - return false; - } - return { - level, - hasBasic: true, - has256: level >= 2, - has16m: level >= 3 - }; - } - function supportsColor(haveStream, streamIsTTY) { - if (forceColor === 0) { - return 0; - } - if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { - return 3; - } - if (hasFlag("color=256")) { - return 2; - } - if (haveStream && !streamIsTTY && forceColor === void 0) { - return 0; - } - const min = forceColor || 0; - if (env.TERM === "dumb") { - return min; - } - if (process.platform === "win32") { - const osRelease = os.release().split("."); - if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { - return Number(osRelease[2]) >= 14931 ? 3 : 2; - } - return 1; - } - if ("CI" in env) { - if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { - return 1; - } - return min; - } - if ("TEAMCITY_VERSION" in env) { - return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; - } - if (env.COLORTERM === "truecolor") { - return 3; - } - if ("TERM_PROGRAM" in env) { - const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); - switch (env.TERM_PROGRAM) { - case "iTerm.app": - return version >= 3 ? 3 : 2; - case "Apple_Terminal": - return 2; - } - } - if (/-256(color)?$/i.test(env.TERM)) { - return 2; - } - if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { - return 1; - } - if ("COLORTERM" in env) { - return 1; - } - return min; - } - function getSupportLevel(stream) { - const level = supportsColor(stream, stream && stream.isTTY); - return translateLevel(level); - } - module2.exports = { - supportsColor: getSupportLevel, - stdout: translateLevel(supportsColor(true, tty.isatty(1))), - stderr: translateLevel(supportsColor(true, tty.isatty(2))) - }; - } -}); - -// node_modules/debug/src/node.js -var require_node = __commonJS({ - "node_modules/debug/src/node.js"(exports, module2) { - var tty = require("tty"); - var util = require("util"); - exports.init = init2; - exports.log = log; - exports.formatArgs = formatArgs; - exports.save = save; - exports.load = load; - exports.useColors = useColors; - exports.destroy = util.deprecate(() => { - }, "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."); - exports.colors = [6, 2, 3, 4, 5, 1]; - try { - const supportsColor = require_supports_color(); - if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) { - exports.colors = [ - 20, - 21, - 26, - 27, - 32, - 33, - 38, - 39, - 40, - 41, - 42, - 43, - 44, - 45, - 56, - 57, - 62, - 63, - 68, - 69, - 74, - 75, - 76, - 77, - 78, - 79, - 80, - 81, - 92, - 93, - 98, - 99, - 112, - 113, - 128, - 129, - 134, - 135, - 148, - 149, - 160, - 161, - 162, - 163, - 164, - 165, - 166, - 167, - 168, - 169, - 170, - 171, - 172, - 173, - 178, - 179, - 184, - 185, - 196, - 197, - 198, - 199, - 200, - 201, - 202, - 203, - 204, - 205, - 206, - 207, - 208, - 209, - 214, - 215, - 220, - 221 - ]; - } - } catch (error) { - } - exports.inspectOpts = Object.keys(process.env).filter((key2) => { - return /^debug_/i.test(key2); - }).reduce((obj, key2) => { - const prop = key2.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => { - return k.toUpperCase(); - }); - let val = process.env[key2]; - if (/^(yes|on|true|enabled)$/i.test(val)) { - val = true; - } else if (/^(no|off|false|disabled)$/i.test(val)) { - val = false; - } else if (val === "null") { - val = null; - } else { - val = Number(val); - } - obj[prop] = val; - return obj; - }, {}); - function useColors() { - return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd); - } - function formatArgs(args) { - const { namespace: name, useColors: useColors2 } = this; - if (useColors2) { - const c = this.color; - const colorCode = "[3" + (c < 8 ? c : "8;5;" + c); - const prefix = ` ${colorCode};1m${name} `; - args[0] = prefix + args[0].split("\n").join("\n" + prefix); - args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + ""); - } else { - args[0] = getDate() + name + " " + args[0]; - } - } - function getDate() { - if (exports.inspectOpts.hideDate) { - return ""; - } - return new Date().toISOString() + " "; - } - function log(...args) { - return process.stderr.write(util.format(...args) + "\n"); - } - function save(namespaces) { - if (namespaces) { - process.env.DEBUG = namespaces; - } else { - delete process.env.DEBUG; - } - } - function load() { - return process.env.DEBUG; - } - function init2(debug2) { - debug2.inspectOpts = {}; - const keys = Object.keys(exports.inspectOpts); - for (let i = 0; i < keys.length; i++) { - debug2.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]]; - } - } - module2.exports = require_common()(exports); - var { formatters } = module2.exports; - formatters.o = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" "); - }; - formatters.O = function(v) { - this.inspectOpts.colors = this.useColors; - return util.inspect(v, this.inspectOpts); - }; - } -}); - -// node_modules/debug/src/index.js -var require_src = __commonJS({ - "node_modules/debug/src/index.js"(exports, module2) { - if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) { - module2.exports = require_browser(); - } else { - module2.exports = require_node(); - } - } -}); - -// node_modules/@kwsites/file-exists/dist/src/index.js -var require_src2 = __commonJS({ - "node_modules/@kwsites/file-exists/dist/src/index.js"(exports) { - "use strict"; - var __importDefault2 = exports && exports.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports, "__esModule", { value: true }); - var fs_1 = require("fs"); - var debug_1 = __importDefault2(require_src()); - var log = debug_1.default("@kwsites/file-exists"); - function check(path3, isFile, isDirectory) { - log(`checking %s`, path3); - try { - const stat = fs_1.statSync(path3); - if (stat.isFile() && isFile) { - log(`[OK] path represents a file`); - return true; - } - if (stat.isDirectory() && isDirectory) { - log(`[OK] path represents a directory`); - return true; - } - log(`[FAIL] path represents something other than a file or directory`); - return false; + return this.Promise.resolve(fn()); } catch (e) { - if (e.code === "ENOENT") { - log(`[FAIL] path is not accessible: %o`, e); - return false; - } - log(`[FATAL] %o`, e); - throw e; - } - } - function exists2(path3, type = exports.READABLE) { - return check(path3, (type & exports.FILE) > 0, (type & exports.FOLDER) > 0); - } - exports.exists = exists2; - exports.FILE = 1; - exports.FOLDER = 2; - exports.READABLE = exports.FILE + exports.FOLDER; - } -}); - -// node_modules/@kwsites/file-exists/dist/index.js -var require_dist = __commonJS({ - "node_modules/@kwsites/file-exists/dist/index.js"(exports) { - "use strict"; - function __export3(m) { - for (var p in m) - if (!exports.hasOwnProperty(p)) - exports[p] = m[p]; - } - Object.defineProperty(exports, "__esModule", { value: true }); - __export3(require_src2()); - } -}); - -// node_modules/@kwsites/promise-deferred/dist/index.js -var require_dist2 = __commonJS({ - "node_modules/@kwsites/promise-deferred/dist/index.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.createDeferred = exports.deferred = void 0; - function deferred2() { - let done; - let fail; - let status = "pending"; - const promise2 = new Promise((_done, _fail) => { - done = _done; - fail = _fail; - }); - return { - promise: promise2, - done(result) { - if (status === "pending") { - status = "resolved"; - done(result); - } - }, - fail(error) { - if (status === "pending") { - status = "rejected"; - fail(error); + return this.Promise.reject(e); } - }, - get fulfilled() { - return status !== "pending"; - }, - get status() { - return status; - } - }; - } - exports.deferred = deferred2; - exports.createDeferred = deferred2; - exports.default = deferred2; - } -}); - -// node_modules/diff2html/lib/types.js -var require_types = __commonJS({ - "node_modules/diff2html/lib/types.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.DiffStyleType = exports.LineMatchingType = exports.OutputFormatType = exports.LineType = void 0; - var LineType; - (function(LineType2) { - LineType2["INSERT"] = "insert"; - LineType2["DELETE"] = "delete"; - LineType2["CONTEXT"] = "context"; - })(LineType = exports.LineType || (exports.LineType = {})); - exports.OutputFormatType = { - LINE_BY_LINE: "line-by-line", - SIDE_BY_SIDE: "side-by-side" }; - exports.LineMatchingType = { - LINES: "lines", - WORDS: "words", - NONE: "none" - }; - exports.DiffStyleType = { - WORD: "word", - CHAR: "char" - }; - } -}); - -// node_modules/diff2html/lib/utils.js -var require_utils = __commonJS({ - "node_modules/diff2html/lib/utils.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.hashCode = exports.unifyPath = exports.escapeForRegExp = void 0; - var specials = [ - "-", - "[", - "]", - "/", - "{", - "}", - "(", - ")", - "*", - "+", - "?", - ".", - "\\", - "^", - "$", - "|" - ]; - var regex = RegExp("[" + specials.join("\\") + "]", "g"); - function escapeForRegExp(str) { - return str.replace(regex, "\\$&"); - } - exports.escapeForRegExp = escapeForRegExp; - function unifyPath(path3) { - return path3 ? path3.replace(/\\/g, "/") : path3; - } - exports.unifyPath = unifyPath; - function hashCode(text2) { - var i, chr, len; - var hash2 = 0; - for (i = 0, len = text2.length; i < len; i++) { - chr = text2.charCodeAt(i); - hash2 = (hash2 << 5) - hash2 + chr; - hash2 |= 0; - } - return hash2; - } - exports.hashCode = hashCode; - } -}); - -// node_modules/diff2html/lib/diff-parser.js -var require_diff_parser = __commonJS({ - "node_modules/diff2html/lib/diff-parser.js"(exports) { - "use strict"; - var __spreadArray2 = exports && exports.__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)); - }; - Object.defineProperty(exports, "__esModule", { value: true }); - exports.parse = void 0; - var types_1 = require_types(); - var utils_1 = require_utils(); - function getExtension(filename, language) { - var 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); - } - var baseDiffFilenamePrefixes = ["a/", "b/", "i/", "w/", "c/", "o/"]; - function getFilename(line, linePrefix, extraPrefix) { - var prefixes = extraPrefix !== void 0 ? __spreadArray2(__spreadArray2([], baseDiffFilenamePrefixes, true), [extraPrefix], false) : baseDiffFilenamePrefixes; - var FilenameRegExp = linePrefix ? new RegExp("^".concat((0, utils_1.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; - return fnameWithoutPrefix.replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/, ""); - } - function getSrcFilename(line, srcPrefix) { - return getFilename(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 index = /^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 diffLines = 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); - currentBlock = null; - } - } - function saveFile() { - if (currentFile !== null) { - if (!currentFile.oldName && possibleOldName !== null) { - currentFile.oldName = possibleOldName; - } - if (!currentFile.newName && possibleNewName !== null) { - currentFile.newName = possibleNewName; - } - if (currentFile.newName) { - files.push(currentFile); - currentFile = null; - } - } - possibleOldName = null; - possibleNewName = null; - } - function startFile() { - saveBlock(); - saveFile(); - currentFile = { - blocks: [], - deletedLines: 0, - addedLines: 0 - }; - } - function startBlock(line) { - saveBlock(); - var values; - if (currentFile !== null) { - if (values = /^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(line)) { - currentFile.isCombined = false; - oldLine = parseInt(values[1], 10); - newLine = parseInt(values[2], 10); - } else if (values = /^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(line)) { - currentFile.isCombined = true; - oldLine = parseInt(values[1], 10); - oldLine2 = parseInt(values[2], 10); - newLine = parseInt(values[3], 10); - } else { - if (line.startsWith(hunkHeaderPrefix)) { - console.error("Failed to parse lines, starting in 0!"); - } - oldLine = 0; - newLine = 0; - currentFile.isCombined = false; - } - } - currentBlock = { - lines: [], - oldStartLine: oldLine, - oldStartLine2: oldLine2, - newStartLine: newLine, - header: line - }; - } - function createLine(line) { - if (currentFile === null || currentBlock === null || oldLine === null || newLine === null) - return; - var currentLine = { - content: line - }; - var addedPrefixes = currentFile.isCombined ? ["+ ", " +", "++"] : ["+"]; - var deletedPrefixes = currentFile.isCombined ? ["- ", " -", "--"] : ["-"]; - if (startsWithAny(line, addedPrefixes)) { - currentFile.addedLines++; - currentLine.type = types_1.LineType.INSERT; - currentLine.oldNumber = void 0; - currentLine.newNumber = newLine++; - } else if (startsWithAny(line, deletedPrefixes)) { - currentFile.deletedLines++; - currentLine.type = types_1.LineType.DELETE; - currentLine.oldNumber = oldLine++; - currentLine.newNumber = void 0; - } else { - currentLine.type = types_1.LineType.CONTEXT; - currentLine.oldNumber = oldLine++; - currentLine.newNumber = newLine++; - } - currentBlock.lines.push(currentLine); - } - function existHunkHeader(line, lineIdx) { - var idx = lineIdx; - while (idx < diffLines.length - 3) { - if (line.startsWith("diff")) { - return false; - } - if (diffLines[idx].startsWith(oldFileNameHeader) && diffLines[idx + 1].startsWith(newFileNameHeader) && diffLines[idx + 2].startsWith(hunkHeaderPrefix)) { - return true; - } - idx++; - } - return false; - } - diffLines.forEach(function(line, lineIndex) { - if (!line || line.startsWith("*")) { - return; - } - var values; - var prevLine = diffLines[lineIndex - 1]; - var nxtLine = diffLines[lineIndex + 1]; - var afterNxtLine = diffLines[lineIndex + 2]; - if (line.startsWith("diff")) { - startFile(); - var 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); - } - if (currentFile === null) { - throw new Error("Where is my file !!!"); - } - currentFile.isGitDiff = true; - return; - } - if (!currentFile || !currentFile.isGitDiff && currentFile && line.startsWith(oldFileNameHeader) && nxtLine.startsWith(newFileNameHeader) && afterNxtLine.startsWith(hunkHeaderPrefix)) { - startFile(); - } - if (currentFile === null || currentFile === void 0 ? void 0 : currentFile.isTooBig) { - return; - } - if (currentFile && (typeof config.diffMaxChanges === "number" && currentFile.addedLines + currentFile.deletedLines > config.diffMaxChanges || typeof config.diffMaxLineLength === "number" && line.length > config.diffMaxLineLength)) { - currentFile.isTooBig = true; - currentFile.addedLines = 0; - currentFile.deletedLines = 0; - currentFile.blocks = []; - currentBlock = null; - var message = typeof config.diffTooBigMessage === "function" ? config.diffTooBigMessage(files.length) : "Diff too big to be displayed"; - startBlock(message); - return; - } - if (line.startsWith(oldFileNameHeader) && nxtLine.startsWith(newFileNameHeader) || line.startsWith(newFileNameHeader) && prevLine.startsWith(oldFileNameHeader)) { - if (currentFile && !currentFile.oldName && line.startsWith("--- ") && (values = getSrcFilename(line, config.srcPrefix))) { - currentFile.oldName = values; - currentFile.language = getExtension(currentFile.oldName, currentFile.language); - return; - } - if (currentFile && !currentFile.newName && line.startsWith("+++ ") && (values = getDstFilename(line, config.dstPrefix))) { - currentFile.newName = values; - currentFile.language = getExtension(currentFile.newName, currentFile.language); - return; - } - } - if (currentFile && (line.startsWith(hunkHeaderPrefix) || currentFile.isGitDiff && currentFile.oldName && currentFile.newName && !currentBlock)) { - startBlock(line); - return; - } - if (currentBlock && (line.startsWith("+") || line.startsWith("-") || line.startsWith(" "))) { - createLine(line); - return; - } - var doesNotExistHunkHeader = !existHunkHeader(line, lineIndex); - if (currentFile === null) { - throw new Error("Where is my file !!!"); - } - if (values = oldMode.exec(line)) { - currentFile.oldMode = values[1]; - } else if (values = newMode.exec(line)) { - currentFile.newMode = values[1]; - } else if (values = deletedFileMode.exec(line)) { - currentFile.deletedFileMode = values[1]; - currentFile.isDeleted = true; - } else if (values = newFileMode.exec(line)) { - currentFile.newFileMode = values[1]; - currentFile.isNew = true; - } else if (values = copyFrom.exec(line)) { - if (doesNotExistHunkHeader) { - currentFile.oldName = values[1]; - } - currentFile.isCopy = true; - } else if (values = copyTo.exec(line)) { - if (doesNotExistHunkHeader) { - currentFile.newName = values[1]; - } - currentFile.isCopy = true; - } else if (values = renameFrom.exec(line)) { - if (doesNotExistHunkHeader) { - currentFile.oldName = values[1]; - } - currentFile.isRename = true; - } else if (values = renameTo.exec(line)) { - if (doesNotExistHunkHeader) { - currentFile.newName = values[1]; - } - currentFile.isRename = true; - } else if (values = binaryFiles.exec(line)) { - currentFile.isBinary = true; - currentFile.oldName = getFilename(values[1], void 0, config.srcPrefix); - currentFile.newName = getFilename(values[2], void 0, config.dstPrefix); - startBlock("Binary file"); - } else if (binaryDiff.test(line)) { - currentFile.isBinary = true; - startBlock(line); - } else if (values = similarityIndex.exec(line)) { - currentFile.unchangedPercentage = parseInt(values[1], 10); - } else if (values = dissimilarityIndex.exec(line)) { - currentFile.changedPercentage = parseInt(values[1], 10); - } else if (values = index.exec(line)) { - currentFile.checksumBefore = values[1]; - currentFile.checksumAfter = values[2]; - values[3] && (currentFile.mode = values[3]); - } else if (values = combinedIndex.exec(line)) { - currentFile.checksumBefore = [values[2], values[3]]; - currentFile.checksumAfter = values[1]; - } else if (values = combinedMode.exec(line)) { - currentFile.oldMode = [values[2], values[3]]; - currentFile.newMode = values[1]; - } else if (values = combinedNewFile.exec(line)) { - currentFile.newFileMode = values[1]; - currentFile.isNew = true; - } else if (values = combinedDeletedFile.exec(line)) { - currentFile.deletedFileMode = values[1]; - currentFile.isDeleted = true; - } -}); - saveBlock(); - saveFile(); - return files; - } - exports.parse = parse; + module2.exports = AsyncLock2; + } +}); + +// node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/index.js +var require_async_lock = __commonJS({ + "node_modules/.pnpm/async-lock@1.4.1/node_modules/async-lock/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = require_lib(); } }); -<<<<<<< HEAD // node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js var require_inherits_browser = __commonJS({ "node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports2, module2) { @@ -3426,247 +2188,21 @@ var require_inherits_browser = __commonJS({ enumerable: false, writable: true, configurable: true -======= -// node_modules/diff/lib/diff/base.js -var require_base = __commonJS({ - "node_modules/diff/lib/diff/base.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports["default"] = Diff; - function Diff() { - } - Diff.prototype = { - diff: function diff(oldString, newString) { - var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; - var callback = options.callback; - if (typeof options === "function") { - callback = options; - options = {}; ->>>>>>> origin/master } - this.options = options; - var self3 = this; - function done(value) { - if (callback) { - setTimeout(function() { - callback(void 0, value); - }, 0); - return true; - } else { - return value; - } - } - oldString = this.castInput(oldString); - newString = this.castInput(newString); - oldString = this.removeEmpty(this.tokenize(oldString)); - newString = this.removeEmpty(this.tokenize(newString)); - var newLen = newString.length, oldLen = oldString.length; - var editLength = 1; - var maxEditLength = newLen + oldLen; - var bestPath = [{ - newPos: -1, - components: [] - }]; - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { - return done([{ - value: this.join(newString), - count: newString.length - }]); + }); } - function execEditLength() { - for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { - var basePath = void 0; - var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { - bestPath[diagonalPath - 1] = void 0; - } - var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; - if (!canAdd && !canRemove) { - bestPath[diagonalPath] = void 0; - continue; - } - if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { - basePath = clonePath(removePath); - self3.pushComponent(basePath.components, void 0, true); - } else { - basePath = addPath; - basePath.newPos++; - self3.pushComponent(basePath.components, true, void 0); - } - _oldPos = self3.extractCommon(basePath, newString, oldString, diagonalPath); - if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { - return done(buildValues(self3, basePath.components, newString, oldString, self3.useLongestToken)); - } else { - bestPath[diagonalPath] = basePath; - } - } - editLength++; - } - if (callback) { - (function exec() { - setTimeout(function() { - if (editLength > maxEditLength) { - return callback(); - } - if (!execEditLength()) { - exec(); - } - }, 0); - })(); - } else { - while (editLength <= maxEditLength) { - var ret = execEditLength(); - if (ret) { - return ret; - } - } - } - }, - pushComponent: function pushComponent(components, added, removed) { - var last2 = components[components.length - 1]; - if (last2 && last2.added === added && last2.removed === removed) { - components[components.length - 1] = { - count: last2.count + 1, - added, - removed }; - } else { - components.push({ - count: 1, - added, - removed - }); + } else { + module2.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; } - }, - extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0; - while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { - newPos++; - oldPos++; - commonCount++; - } - if (commonCount) { - basePath.components.push({ - count: commonCount - }); - } - basePath.newPos = newPos; - return oldPos; - }, - equals: function equals(left, right) { - if (this.options.comparator) { - return this.options.comparator(left, right); - } else { - return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); - } - }, - removeEmpty: function removeEmpty(array) { - var ret = []; - for (var i = 0; i < array.length; i++) { - if (array[i]) { - ret.push(array[i]); - } - } - return ret; - }, - castInput: function castInput(value) { - return value; - }, - tokenize: function tokenize(value) { - return value.split(""); - }, - join: function join2(chars) { - return chars.join(""); - } - }; - function buildValues(diff, components, newString, oldString, useLongestToken) { - var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0; - for (; componentPos < componentLen; componentPos++) { - var component = components[componentPos]; - if (!component.removed) { - if (!component.added && useLongestToken) { - var value = newString.slice(newPos, newPos + component.count); - value = value.map(function(value2, i) { - var oldValue = oldString[oldPos + i]; - return oldValue.length > value2.length ? oldValue : value2; - }); - component.value = diff.join(value); - } else { - component.value = diff.join(newString.slice(newPos, newPos + component.count)); - } - newPos += component.count; - if (!component.added) { - oldPos += component.count; - } - } else { - component.value = diff.join(oldString.slice(oldPos, oldPos + component.count)); - oldPos += component.count; - if (componentPos && components[componentPos - 1].added) { - var tmp = components[componentPos - 1]; - components[componentPos - 1] = components[componentPos]; - components[componentPos] = tmp; - } - } - } - var lastComponent = components[componentLen - 1]; - if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff.equals("", lastComponent.value)) { - components[componentLen - 2].value += lastComponent.value; - components.pop(); - } - return components; - } - function clonePath(path3) { - return { - newPos: path3.newPos, - components: path3.components.slice(0) - }; - } - } -}); - -// node_modules/diff/lib/diff/character.js -var require_character = __commonJS({ - "node_modules/diff/lib/diff/character.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.diffChars = diffChars; - exports.characterDiff = void 0; - var _base = _interopRequireDefault(require_base()); - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { "default": obj }; - } - var characterDiff = new _base["default"](); - exports.characterDiff = characterDiff; - function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); - } - } -}); - -// node_modules/diff/lib/util/params.js -var require_params = __commonJS({ - "node_modules/diff/lib/util/params.js"(exports) { - "use strict"; - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.generateOptions = generateOptions; - function generateOptions(options, defaults) { - if (typeof options === "function") { - defaults.callback = options; - } else if (options) { - for (var name in options) { - if (options.hasOwnProperty(name)) { - defaults[name] = options[name]; - } - } - } - return defaults; + }; } } }); @@ -8265,9 +6801,9 @@ var require_pify = __commonJS({ } }); -// node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.js +// node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js var require_ignore = __commonJS({ - "node_modules/.pnpm/ignore@5.2.4/node_modules/ignore/index.js"(exports2, module2) { + "node_modules/.pnpm/ignore@5.3.1/node_modules/ignore/index.js"(exports2, module2) { init_polyfill_buffer(); function makeArray(subject) { return Array.isArray(subject) ? subject : [subject]; @@ -8299,6 +6835,13 @@ var require_ignore = __commonJS({ return slashes.slice(0, length - length % 2); }; var REPLACERS = [ + [ + // remove BOM + // TODO: + // Other similar zero-width characters? + /^\uFEFF/, + () => EMPTY + ], // > Trailing spaces are ignored unless they are quoted with backslash ("\") [ // (a\ ) -> (a ) @@ -8809,14 +7352,14 @@ var require_diff3 = __commonJS({ init_polyfill_buffer(); var onp = require_onp(); function longestCommonSubsequence(file1, file2) { - var diff2 = new onp(file1, file2); - diff2.compose(); - var ses = diff2.getses(); + var diff3 = new onp(file1, file2); + diff3.compose(); + var ses = diff3.getses(); var root2; var prev; var file1RevIdx = file1.length - 1, file2RevIdx = file2.length - 1; for (var i = ses.length - 1; i >= 0; --i) { - if (ses[i].t === diff2.SES_COMMON) { + if (ses[i].t === diff3.SES_COMMON) { if (prev) { prev.chain = { file1index: file1RevIdx, @@ -8834,9 +7377,9 @@ var require_diff3 = __commonJS({ } file1RevIdx--; file2RevIdx--; - } else if (ses[i].t === diff2.SES_DELETE) { + } else if (ses[i].t === diff3.SES_DELETE) { file1RevIdx--; - } else if (ses[i].t === diff2.SES_ADD) { + } else if (ses[i].t === diff3.SES_ADD) { file2RevIdx--; } } @@ -9299,7 +7842,7 @@ var require_browser = __commonJS({ exports2.load = load; exports2.useColors = useColors; exports2.storage = localstorage(); - exports2.destroy = (() => { + exports2.destroy = /* @__PURE__ */ (() => { let warned = false; return () => { if (!warned) { @@ -10224,15 +8767,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)); @@ -10310,6 +8853,69 @@ var require_object_keys = __commonJS({ } }); +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js +var require_es_errors = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = Error; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js +var require_eval = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = EvalError; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js +var require_range = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = RangeError; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js +var require_ref = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = ReferenceError; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js +var require_syntax = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = SyntaxError; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js +var require_type = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = TypeError; + } +}); + +// node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js +var require_uri = __commonJS({ + "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + module2.exports = URIError; + } +}); + // node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js var require_shams = __commonJS({ "node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(exports2, module2) { @@ -10403,45 +9009,71 @@ var require_has_proto = __commonJS({ } }); -// node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js +// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js var require_implementation2 = __commonJS({ - "node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(exports2, module2) { + "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var ERROR_MESSAGE = "Function.prototype.bind called on incompatible "; - var slice = Array.prototype.slice; var toStr = Object.prototype.toString; + var max = Math.max; var funcType = "[object Function]"; + var concatty = function concatty2(a, b) { + var arr = []; + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + return arr; + }; + var slicy = function slicy2(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; + }; + var joiny = function(arr, joiner) { + var str = ""; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; + }; module2.exports = function bind(that) { var target = this; - if (typeof target !== "function" || toStr.call(target) !== funcType) { + if (typeof target !== "function" || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } - var args = slice.call(arguments, 1); + var args = slicy(arguments, 1); var bound; var binder = function() { if (this instanceof bound) { var result = target.apply( this, - args.concat(slice.call(arguments)) + concatty(args, arguments) ); if (Object(result) === result) { return result; } return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); } + return target.apply( + that, + concatty(args, arguments) + ); }; - var boundLength = Math.max(0, target.length - args.length); + var boundLength = max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { - boundArgs.push("$" + i); + boundArgs[i] = "$" + i; } - bound = Function("binder", "return function (" + boundArgs.join(",") + "){ return binder.apply(this,arguments); }")(binder); + bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder); if (target.prototype) { var Empty = function Empty2() { }; @@ -10454,9 +9086,9 @@ var require_implementation2 = __commonJS({ } }); -// node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js +// node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js var require_function_bind = __commonJS({ - "node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(exports2, module2) { + "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var implementation = require_implementation2(); @@ -10464,25 +9096,32 @@ var require_function_bind = __commonJS({ } }); -// node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js -var require_src2 = __commonJS({ - "node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(exports2, module2) { +// node_modules/.pnpm/hasown@2.0.1/node_modules/hasown/index.js +var require_hasown = __commonJS({ + "node_modules/.pnpm/hasown@2.0.1/node_modules/hasown/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); + var call = Function.prototype.call; + var $hasOwn = Object.prototype.hasOwnProperty; var bind = require_function_bind(); - module2.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + module2.exports = bind.call(call, $hasOwn); } }); -// node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js +// node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js var require_get_intrinsic = __commonJS({ - "node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js"(exports2, module2) { + "node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var undefined2; - var $SyntaxError = SyntaxError; + var $Error = require_es_errors(); + var $EvalError = require_eval(); + var $RangeError = require_range(); + var $ReferenceError = require_ref(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var $URIError = require_uri(); var $Function = Function; - var $TypeError = TypeError; var getEvalledConstructor = function(expressionSyntax) { try { return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")(); @@ -10520,6 +9159,7 @@ var require_get_intrinsic = __commonJS({ var needsEval = {}; var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array); var INTRINSICS = { + __proto__: null, "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer, @@ -10540,10 +9180,10 @@ var require_get_intrinsic = __commonJS({ "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, - "%Error%": Error, + "%Error%": $Error, "%eval%": eval, // eslint-disable-line no-eval - "%EvalError%": EvalError, + "%EvalError%": $EvalError, "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry, @@ -10565,8 +9205,8 @@ var require_get_intrinsic = __commonJS({ "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise, "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy, - "%RangeError%": RangeError, - "%ReferenceError%": ReferenceError, + "%RangeError%": $RangeError, + "%ReferenceError%": $ReferenceError, "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? undefined2 : Set, @@ -10583,7 +9223,7 @@ var require_get_intrinsic = __commonJS({ "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array, "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array, - "%URIError%": URIError, + "%URIError%": $URIError, "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet @@ -10620,6 +9260,7 @@ var require_get_intrinsic = __commonJS({ return value; }; var LEGACY_ALIASES = { + __proto__: null, "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"], "%ArrayPrototype%": ["Array", "prototype"], "%ArrayProto_entries%": ["Array", "prototype", "entries"], @@ -10673,7 +9314,7 @@ var require_get_intrinsic = __commonJS({ "%WeakSetPrototype%": ["WeakSet", "prototype"] }; var bind = require_function_bind(); - var hasOwn = require_src2(); + var hasOwn = require_hasown(); var $concat = bind.call(Function.call, Array.prototype.concat); var $spliceApply = bind.call(Function.apply, Array.prototype.splice); var $replace = bind.call(Function.call, String.prototype.replace); @@ -10782,9 +9423,9 @@ var require_get_intrinsic = __commonJS({ } }); -// node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js +// node_modules/.pnpm/has-property-descriptors@1.0.1/node_modules/has-property-descriptors/index.js var require_has_property_descriptors = __commonJS({ - "node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js"(exports2, module2) { + "node_modules/.pnpm/has-property-descriptors@1.0.1/node_modules/has-property-descriptors/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var GetIntrinsic = require_get_intrinsic(); @@ -10814,40 +9455,110 @@ var require_has_property_descriptors = __commonJS({ } }); -// node_modules/.pnpm/define-properties@1.2.0/node_modules/define-properties/index.js +// node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js +var require_gopd = __commonJS({ + "node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var GetIntrinsic = require_get_intrinsic(); + var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); + if ($gOPD) { + try { + $gOPD([], "length"); + } catch (e) { + $gOPD = null; + } + } + module2.exports = $gOPD; + } +}); + +// node_modules/.pnpm/define-data-property@1.1.2/node_modules/define-data-property/index.js +var require_define_data_property = __commonJS({ + "node_modules/.pnpm/define-data-property@1.1.2/node_modules/define-data-property/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var hasPropertyDescriptors = require_has_property_descriptors()(); + var GetIntrinsic = require_get_intrinsic(); + var $defineProperty = hasPropertyDescriptors && GetIntrinsic("%Object.defineProperty%", true); + if ($defineProperty) { + try { + $defineProperty({}, "a", { value: 1 }); + } catch (e) { + $defineProperty = false; + } + } + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var gopd = require_gopd(); + module2.exports = function defineDataProperty(obj, property, value) { + if (!obj || typeof obj !== "object" && typeof obj !== "function") { + throw new $TypeError("`obj` must be an object or a function`"); + } + if (typeof property !== "string" && typeof property !== "symbol") { + throw new $TypeError("`property` must be a string or a symbol`"); + } + if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) { + throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null"); + } + if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) { + throw new $TypeError("`nonWritable`, if provided, must be a boolean or null"); + } + if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) { + throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null"); + } + if (arguments.length > 6 && typeof arguments[6] !== "boolean") { + throw new $TypeError("`loose`, if provided, must be a boolean"); + } + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + var desc = !!gopd && gopd(obj, property); + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) { + obj[property] = value; + } else { + throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); + } + }; + } +}); + +// node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js var require_define_properties = __commonJS({ - "node_modules/.pnpm/define-properties@1.2.0/node_modules/define-properties/index.js"(exports2, module2) { + "node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var keys = require_object_keys(); var hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol"; var toStr = Object.prototype.toString; var concat = Array.prototype.concat; - var origDefineProperty = Object.defineProperty; - var isFunction = function(fn) { + var defineDataProperty = require_define_data_property(); + var isFunction2 = function(fn) { return typeof fn === "function" && toStr.call(fn) === "[object Function]"; }; - var hasPropertyDescriptors = require_has_property_descriptors()(); - var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; + var supportsDescriptors = require_has_property_descriptors()(); var defineProperty = function(object, name, value, predicate) { if (name in object) { if (predicate === true) { if (object[name] === value) { return; } - } else if (!isFunction(predicate) || !predicate()) { + } else if (!isFunction2(predicate) || !predicate()) { return; } } if (supportsDescriptors) { - origDefineProperty(object, name, { - configurable: true, - enumerable: false, - value, - writable: true - }); + defineDataProperty(object, name, value, true); } else { - object[name] = value; + defineDataProperty(object, name, value); } }; var defineProperties = function(object, map) { @@ -10865,17 +9576,72 @@ var require_define_properties = __commonJS({ } }); -// node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js +// node_modules/.pnpm/set-function-length@1.2.1/node_modules/set-function-length/index.js +var require_set_function_length = __commonJS({ + "node_modules/.pnpm/set-function-length@1.2.1/node_modules/set-function-length/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var GetIntrinsic = require_get_intrinsic(); + var define2 = require_define_data_property(); + var hasDescriptors = require_has_property_descriptors()(); + var gOPD = require_gopd(); + var $TypeError = require_type(); + var $floor = GetIntrinsic("%Math.floor%"); + module2.exports = function setFunctionLength(fn, length) { + if (typeof fn !== "function") { + throw new $TypeError("`fn` is not a function"); + } + if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) { + throw new $TypeError("`length` must be a positive 32-bit integer"); + } + var loose = arguments.length > 2 && !!arguments[2]; + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ("length" in fn && gOPD) { + var desc = gOPD(fn, "length"); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define2( + /** @type {Parameters[0]} */ + fn, + "length", + length, + true, + true + ); + } else { + define2( + /** @type {Parameters[0]} */ + fn, + "length", + length + ); + } + } + return fn; + }; + } +}); + +// node_modules/.pnpm/call-bind@1.0.6/node_modules/call-bind/index.js var require_call_bind = __commonJS({ - "node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(exports2, module2) { + "node_modules/.pnpm/call-bind@1.0.6/node_modules/call-bind/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var bind = require_function_bind(); var GetIntrinsic = require_get_intrinsic(); + var setFunctionLength = require_set_function_length(); + var $TypeError = require_type(); var $apply = GetIntrinsic("%Function.prototype.apply%"); var $call = GetIntrinsic("%Function.prototype.call%"); var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply); - var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); var $defineProperty = GetIntrinsic("%Object.defineProperty%", true); var $max = GetIntrinsic("%Math.max%"); if ($defineProperty) { @@ -10886,18 +9652,15 @@ var require_call_bind = __commonJS({ } } module2.exports = function callBind(originalFunction) { - var func = $reflectApply(bind, $call, arguments); - if ($gOPD && $defineProperty) { - var desc = $gOPD(func, "length"); - if (desc.configurable) { - $defineProperty( - func, - "length", - { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } - ); - } + if (typeof originalFunction !== "function") { + throw new $TypeError("a function is required"); } - return func; + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); }; var applyBind = function applyBind2() { return $reflectApply(bind, $apply, arguments); @@ -10910,9 +9673,9 @@ var require_call_bind = __commonJS({ } }); -// node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js +// node_modules/.pnpm/call-bind@1.0.6/node_modules/call-bind/callBound.js var require_callBound = __commonJS({ - "node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(exports2, module2) { + "node_modules/.pnpm/call-bind@1.0.6/node_modules/call-bind/callBound.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var GetIntrinsic = require_get_intrinsic(); @@ -10928,9 +9691,9 @@ var require_callBound = __commonJS({ } }); -// node_modules/.pnpm/object.assign@4.1.4/node_modules/object.assign/implementation.js +// node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/implementation.js var require_implementation3 = __commonJS({ - "node_modules/.pnpm/object.assign@4.1.4/node_modules/object.assign/implementation.js"(exports2, module2) { + "node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/implementation.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var objectKeys = require_object_keys(); @@ -10974,9 +9737,9 @@ var require_implementation3 = __commonJS({ } }); -// node_modules/.pnpm/object.assign@4.1.4/node_modules/object.assign/polyfill.js +// node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/polyfill.js var require_polyfill = __commonJS({ - "node_modules/.pnpm/object.assign@4.1.4/node_modules/object.assign/polyfill.js"(exports2, module2) { + "node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/polyfill.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var implementation = require_implementation3(); @@ -11024,9 +9787,9 @@ var require_polyfill = __commonJS({ } }); -// node_modules/.pnpm/object.assign@4.1.4/node_modules/object.assign/shim.js +// node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/shim.js var require_shim = __commonJS({ - "node_modules/.pnpm/object.assign@4.1.4/node_modules/object.assign/shim.js"(exports2, module2) { + "node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/shim.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var define2 = require_define_properties(); @@ -11045,9 +9808,9 @@ var require_shim = __commonJS({ } }); -// node_modules/.pnpm/object.assign@4.1.4/node_modules/object.assign/index.js +// node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/index.js var require_object = __commonJS({ - "node_modules/.pnpm/object.assign@4.1.4/node_modules/object.assign/index.js"(exports2, module2) { + "node_modules/.pnpm/object.assign@4.1.5/node_modules/object.assign/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var defineProperties = require_define_properties(); @@ -11102,16 +9865,42 @@ var require_functions_have_names = __commonJS({ } }); -// node_modules/.pnpm/regexp.prototype.flags@1.5.0/node_modules/regexp.prototype.flags/implementation.js -var require_implementation4 = __commonJS({ - "node_modules/.pnpm/regexp.prototype.flags@1.5.0/node_modules/regexp.prototype.flags/implementation.js"(exports2, module2) { +// node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js +var require_set_function_name = __commonJS({ + "node_modules/.pnpm/set-function-name@2.0.1/node_modules/set-function-name/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); + var define2 = require_define_data_property(); + var hasDescriptors = require_has_property_descriptors()(); var functionsHaveConfigurableNames = require_functions_have_names().functionsHaveConfigurableNames(); - var $Object = Object; var $TypeError = TypeError; - module2.exports = function flags() { - if (this != null && this !== $Object(this)) { + module2.exports = function setFunctionName(fn, name) { + if (typeof fn !== "function") { + throw new $TypeError("`fn` is not a function"); + } + var loose = arguments.length > 2 && !!arguments[2]; + if (!loose || functionsHaveConfigurableNames) { + if (hasDescriptors) { + define2(fn, "name", name, true, true); + } else { + define2(fn, "name", name); + } + } + return fn; + }; + } +}); + +// node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/implementation.js +var require_implementation4 = __commonJS({ + "node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/implementation.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var setFunctionName = require_set_function_name(); + var $TypeError = require_type(); + var $Object = Object; + module2.exports = setFunctionName(function flags() { + if (this == null || this !== $Object(this)) { throw new $TypeError("RegExp.prototype.flags getter called on non-object"); } var result = ""; @@ -11140,16 +9929,13 @@ var require_implementation4 = __commonJS({ result += "y"; } return result; - }; - if (functionsHaveConfigurableNames && Object.defineProperty) { - Object.defineProperty(module2.exports, "name", { value: "get flags" }); - } + }, "get flags", true); } }); -// node_modules/.pnpm/regexp.prototype.flags@1.5.0/node_modules/regexp.prototype.flags/polyfill.js +// node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/polyfill.js var require_polyfill2 = __commonJS({ - "node_modules/.pnpm/regexp.prototype.flags@1.5.0/node_modules/regexp.prototype.flags/polyfill.js"(exports2, module2) { + "node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/polyfill.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var implementation = require_implementation4(); @@ -11181,9 +9967,9 @@ var require_polyfill2 = __commonJS({ } }); -// node_modules/.pnpm/regexp.prototype.flags@1.5.0/node_modules/regexp.prototype.flags/shim.js +// node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/shim.js var require_shim2 = __commonJS({ - "node_modules/.pnpm/regexp.prototype.flags@1.5.0/node_modules/regexp.prototype.flags/shim.js"(exports2, module2) { + "node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/shim.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var supportsDescriptors = require_define_properties().supportsDescriptors; @@ -11212,9 +9998,9 @@ var require_shim2 = __commonJS({ } }); -// node_modules/.pnpm/regexp.prototype.flags@1.5.0/node_modules/regexp.prototype.flags/index.js +// node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/index.js var require_regexp_prototype = __commonJS({ - "node_modules/.pnpm/regexp.prototype.flags@1.5.0/node_modules/regexp.prototype.flags/index.js"(exports2, module2) { + "node_modules/.pnpm/regexp.prototype.flags@1.5.2/node_modules/regexp.prototype.flags/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var define2 = require_define_properties(); @@ -11232,9 +10018,9 @@ var require_regexp_prototype = __commonJS({ } }); -// node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js +// node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js var require_shams2 = __commonJS({ - "node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js"(exports2, module2) { + "node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var hasSymbols = require_shams(); @@ -11272,16 +10058,16 @@ var require_is_arguments = __commonJS({ } }); -// (disabled):node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/util.inspect +// (disabled):node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/util.inspect var require_util = __commonJS({ - "(disabled):node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/util.inspect"() { + "(disabled):node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/util.inspect"() { init_polyfill_buffer(); } }); -// node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js +// node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.js var require_object_inspect = __commonJS({ - "node_modules/.pnpm/object-inspect@1.12.3/node_modules/object-inspect/index.js"(exports2, module2) { + "node_modules/.pnpm/object-inspect@1.13.1/node_modules/object-inspect/index.js"(exports2, module2) { init_polyfill_buffer(); var hasMap = typeof Map === "function" && Map.prototype; var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null; @@ -11496,6 +10282,12 @@ var require_object_inspect = __commonJS({ if (isString(obj)) { return markBoxed(inspect(String(obj))); } + if (typeof window !== "undefined" && obj === window) { + return "{ [object Window] }"; + } + if (obj === global) { + return "{ [object globalThis] }"; + } if (!isDate(obj) && !isRegExp(obj)) { var ys = arrObjKeys(obj, inspect); var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; @@ -11789,15 +10581,15 @@ var require_object_inspect = __commonJS({ } }); -// node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js +// node_modules/.pnpm/side-channel@1.0.5/node_modules/side-channel/index.js var require_side_channel = __commonJS({ - "node_modules/.pnpm/side-channel@1.0.4/node_modules/side-channel/index.js"(exports2, module2) { + "node_modules/.pnpm/side-channel@1.0.5/node_modules/side-channel/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var GetIntrinsic = require_get_intrinsic(); var callBound = require_callBound(); var inspect = require_object_inspect(); - var $TypeError = GetIntrinsic("%TypeError%"); + var $TypeError = require_type(); var $WeakMap = GetIntrinsic("%WeakMap%", true); var $Map = GetIntrinsic("%Map%", true); var $weakMapGet = callBound("WeakMap.prototype.get", true); @@ -11901,15 +10693,14 @@ var require_side_channel = __commonJS({ } }); -// node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js +// node_modules/.pnpm/internal-slot@1.0.7/node_modules/internal-slot/index.js var require_internal_slot = __commonJS({ - "node_modules/.pnpm/internal-slot@1.0.5/node_modules/internal-slot/index.js"(exports2, module2) { + "node_modules/.pnpm/internal-slot@1.0.7/node_modules/internal-slot/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); - var GetIntrinsic = require_get_intrinsic(); - var has = require_src2(); + var hasOwn = require_hasown(); var channel = require_side_channel()(); - var $TypeError = GetIntrinsic("%TypeError%"); + var $TypeError = require_type(); var SLOT = { assert: function(O, slot) { if (!O || typeof O !== "object" && typeof O !== "function") { @@ -11941,7 +10732,7 @@ var require_internal_slot = __commonJS({ throw new $TypeError("`slot` must be a string"); } var slots = channel.get(O); - return !!slots && has(slots, "$" + slot); + return !!slots && hasOwn(slots, "$" + slot); }, set: function(O, slot, V) { if (!O || typeof O !== "object" && typeof O !== "function") { @@ -12361,313 +11152,19 @@ var require_object_is = __commonJS({ } }); -// node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js -var require_is_callable = __commonJS({ - "node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js"(exports2, module2) { - "use strict"; - init_polyfill_buffer(); - var fnToStr = Function.prototype.toString; - var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply; - var badArrayLike; - var isCallableMarker; - if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") { - try { - badArrayLike = Object.defineProperty({}, "length", { - get: function() { - throw isCallableMarker; - } - }); - isCallableMarker = {}; - reflectApply(function() { - throw 42; - }, null, badArrayLike); - } catch (_) { - if (_ !== isCallableMarker) { - reflectApply = null; - } - } - } else { - reflectApply = null; - } - var constructorRegex = /^\s*class\b/; - var isES6ClassFn = function isES6ClassFunction(value) { - try { - var fnStr = fnToStr.call(value); - return constructorRegex.test(fnStr); - } catch (e) { - return false; - } - }; - var tryFunctionObject = function tryFunctionToStr(value) { - try { - if (isES6ClassFn(value)) { - return false; - } - fnToStr.call(value); - return true; - } catch (e) { - return false; - } - }; - var toStr = Object.prototype.toString; - var objectClass = "[object Object]"; - var fnClass = "[object Function]"; - var genClass = "[object GeneratorFunction]"; - var ddaClass = "[object HTMLAllCollection]"; - var ddaClass2 = "[object HTML document.all class]"; - var ddaClass3 = "[object HTMLCollection]"; - var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag; - var isIE68 = !(0 in [,]); - var isDDA = function isDocumentDotAll() { - return false; - }; - if (typeof document === "object") { - all = document.all; - if (toStr.call(all) === toStr.call(document.all)) { - isDDA = function isDocumentDotAll(value) { - if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) { - try { - var str = toStr.call(value); - return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value("") == null; - } catch (e) { - } - } - return false; - }; - } - } - var all; - module2.exports = reflectApply ? function isCallable(value) { - if (isDDA(value)) { - return true; - } - if (!value) { - return false; - } - if (typeof value !== "function" && typeof value !== "object") { - return false; - } - try { - reflectApply(value, null, badArrayLike); - } catch (e) { - if (e !== isCallableMarker) { - return false; - } - } - return !isES6ClassFn(value) && tryFunctionObject(value); - } : function isCallable(value) { - if (isDDA(value)) { - return true; - } - if (!value) { - return false; - } - if (typeof value !== "function" && typeof value !== "object") { - return false; - } - if (hasToStringTag) { - return tryFunctionObject(value); - } - if (isES6ClassFn(value)) { - return false; - } - var strClass = toStr.call(value); - if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) { - return false; - } - return tryFunctionObject(value); - }; - } -}); - -// node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js -var require_for_each = __commonJS({ - "node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js"(exports2, module2) { - "use strict"; - init_polyfill_buffer(); - var isCallable = require_is_callable(); - var toStr = Object.prototype.toString; - var hasOwnProperty = Object.prototype.hasOwnProperty; - var forEachArray = function forEachArray2(array, iterator, receiver) { - for (var i = 0, len = array.length; i < len; i++) { - if (hasOwnProperty.call(array, i)) { - if (receiver == null) { - iterator(array[i], i, array); - } else { - iterator.call(receiver, array[i], i, array); - } - } - } - }; - var forEachString = function forEachString2(string, iterator, receiver) { - for (var i = 0, len = string.length; i < len; i++) { - if (receiver == null) { - iterator(string.charAt(i), i, string); - } else { - iterator.call(receiver, string.charAt(i), i, string); - } - } - }; - var forEachObject = function forEachObject2(object, iterator, receiver) { - for (var k in object) { - if (hasOwnProperty.call(object, k)) { - if (receiver == null) { - iterator(object[k], k, object); - } else { - iterator.call(receiver, object[k], k, object); - } - } - } - }; - var forEach2 = function forEach3(list, iterator, thisArg) { - if (!isCallable(iterator)) { - throw new TypeError("iterator must be a function"); - } - var receiver; - if (arguments.length >= 3) { - receiver = thisArg; - } - if (toStr.call(list) === "[object Array]") { - forEachArray(list, iterator, receiver); - } else if (typeof list === "string") { - forEachString(list, iterator, receiver); - } else { - forEachObject(list, iterator, receiver); - } - }; - module2.exports = forEach2; - } -}); - -// node_modules/.pnpm/available-typed-arrays@1.0.5/node_modules/available-typed-arrays/index.js -var require_available_typed_arrays = __commonJS({ - "node_modules/.pnpm/available-typed-arrays@1.0.5/node_modules/available-typed-arrays/index.js"(exports2, module2) { - "use strict"; - init_polyfill_buffer(); - var possibleNames = [ - "BigInt64Array", - "BigUint64Array", - "Float32Array", - "Float64Array", - "Int16Array", - "Int32Array", - "Int8Array", - "Uint16Array", - "Uint32Array", - "Uint8Array", - "Uint8ClampedArray" - ]; - var g = typeof globalThis === "undefined" ? global : globalThis; - module2.exports = function availableTypedArrays() { - var out = []; - for (var i = 0; i < possibleNames.length; i++) { - if (typeof g[possibleNames[i]] === "function") { - out[out.length] = possibleNames[i]; - } - } - return out; - }; - } -}); - -// node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js -var require_gopd = __commonJS({ - "node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(exports2, module2) { - "use strict"; - init_polyfill_buffer(); - var GetIntrinsic = require_get_intrinsic(); - var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true); - if ($gOPD) { - try { - $gOPD([], "length"); - } catch (e) { - $gOPD = null; - } - } - module2.exports = $gOPD; - } -}); - -// 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) { - "use strict"; - init_polyfill_buffer(); - var forEach2 = require_for_each(); - var availableTypedArrays = require_available_typed_arrays(); - var callBound = require_callBound(); - 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 $indexOf = callBound("Array.prototype.indexOf", true) || function indexOf(array, value) { - for (var i = 0; i < array.length; i += 1) { - if (array[i] === value) { - return i; - } - } - return -1; - }; - var $slice = callBound("String.prototype.slice"); - var toStrTags = {}; - var getPrototypeOf = Object.getPrototypeOf; - if (hasToStringTag && gOPD && getPrototypeOf) { - forEach2(typedArrays, function(typedArray) { - 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 anyTrue = false; - forEach2(toStrTags, function(getter, typedArray) { - if (!anyTrue) { - try { - anyTrue = getter.call(value) === typedArray; - } catch (e) { - } - } - }); - return anyTrue; - }; - module2.exports = function isTypedArray(value) { - if (!value || typeof value !== "object") { - return false; - } - if (!hasToStringTag || !(Symbol.toStringTag in value)) { - var tag2 = $slice($toString(value), 8, -1); - return $indexOf(typedArrays, tag2) > -1; - } - if (!gOPD) { - return false; - } - return tryTypedArrays(value); - }; - } -}); - -// node_modules/.pnpm/is-array-buffer@3.0.2/node_modules/is-array-buffer/index.js +// node_modules/.pnpm/is-array-buffer@3.0.4/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) { + "node_modules/.pnpm/is-array-buffer@3.0.4/node_modules/is-array-buffer/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var callBind = require_call_bind(); var callBound = require_callBound(); var GetIntrinsic = require_get_intrinsic(); - var isTypedArray = require_is_typed_array(); - var $ArrayBuffer = GetIntrinsic("ArrayBuffer", true); - var $Float32Array = GetIntrinsic("Float32Array", true); + var $ArrayBuffer = GetIntrinsic("%ArrayBuffer%", true); var $byteLength = callBound("ArrayBuffer.prototype.byteLength", true); - var abSlice = $ArrayBuffer && !$byteLength && new $ArrayBuffer().slice; - var $abSlice = abSlice && callBind(abSlice); + var $toString = callBound("Object.prototype.toString"); + var abSlice = !!$ArrayBuffer && !$byteLength && new $ArrayBuffer(0).slice; + var $abSlice = !!abSlice && callBind(abSlice); module2.exports = $byteLength || $abSlice ? function isArrayBuffer(obj) { if (!obj || typeof obj !== "object") { return false; @@ -12682,12 +11179,8 @@ var require_is_array_buffer = __commonJS({ } catch (e) { return false; } - } : $Float32Array ? function IsArrayBuffer(obj) { - try { - return new $Float32Array(obj).buffer === obj && !isTypedArray(obj); - } catch (e) { - return typeof obj === "object" && e.name === "RangeError"; - } + } : $ArrayBuffer ? function isArrayBuffer(obj) { + return $toString(obj) === "[object ArrayBuffer]"; } : function isArrayBuffer(obj) { return false; }; @@ -13083,13 +11576,223 @@ var require_which_collection = __commonJS({ } }); -// node_modules/.pnpm/which-typed-array@1.1.9/node_modules/which-typed-array/index.js +// node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js +var require_is_callable = __commonJS({ + "node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var fnToStr = Function.prototype.toString; + var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply; + var badArrayLike; + var isCallableMarker; + if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") { + try { + badArrayLike = Object.defineProperty({}, "length", { + get: function() { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + reflectApply(function() { + throw 42; + }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } + } else { + reflectApply = null; + } + var constructorRegex = /^\s*class\b/; + var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; + } + }; + var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { + return false; + } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var objectClass = "[object Object]"; + var fnClass = "[object Function]"; + var genClass = "[object GeneratorFunction]"; + var ddaClass = "[object HTMLAllCollection]"; + var ddaClass2 = "[object HTML document.all class]"; + var ddaClass3 = "[object HTMLCollection]"; + var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag; + var isIE68 = !(0 in [,]); + var isDDA = function isDocumentDotAll() { + return false; + }; + if (typeof document === "object") { + all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) { + try { + var str = toStr.call(value); + return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value("") == null; + } catch (e) { + } + } + return false; + }; + } + } + var all; + module2.exports = reflectApply ? function isCallable(value) { + if (isDDA(value)) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { + return false; + } + } + return !isES6ClassFn(value) && tryFunctionObject(value); + } : function isCallable(value) { + if (isDDA(value)) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) { + return false; + } + return tryFunctionObject(value); + }; + } +}); + +// node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js +var require_for_each = __commonJS({ + "node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var isCallable = require_is_callable(); + var toStr = Object.prototype.toString; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var forEachArray = function forEachArray2(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } + }; + var forEachString = function forEachString2(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } + }; + var forEachObject = function forEachObject2(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } + }; + var forEach2 = function forEach3(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError("iterator must be a function"); + } + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + if (toStr.call(list) === "[object Array]") { + forEachArray(list, iterator, receiver); + } else if (typeof list === "string") { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } + }; + module2.exports = forEach2; + } +}); + +// node_modules/.pnpm/available-typed-arrays@1.0.6/node_modules/available-typed-arrays/index.js +var require_available_typed_arrays = __commonJS({ + "node_modules/.pnpm/available-typed-arrays@1.0.6/node_modules/available-typed-arrays/index.js"(exports2, module2) { + "use strict"; + init_polyfill_buffer(); + var possibleNames = [ + "BigInt64Array", + "BigUint64Array", + "Float32Array", + "Float64Array", + "Int16Array", + "Int32Array", + "Int8Array", + "Uint16Array", + "Uint32Array", + "Uint8Array", + "Uint8ClampedArray" + ]; + var g = typeof globalThis === "undefined" ? global : globalThis; + module2.exports = function availableTypedArrays() { + var out = []; + for (var i = 0; i < possibleNames.length; i++) { + if (typeof g[possibleNames[i]] === "function") { + out[out.length] = possibleNames[i]; + } + } + return out; + }; + } +}); + +// node_modules/.pnpm/which-typed-array@1.1.14/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) { + "node_modules/.pnpm/which-typed-array@1.1.14/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"); @@ -13097,55 +11800,104 @@ var require_which_typed_array = __commonJS({ var g = typeof globalThis === "undefined" ? global : globalThis; var typedArrays = availableTypedArrays(); var $slice = callBound("String.prototype.slice"); - var toStrTags = {}; var getPrototypeOf = Object.getPrototypeOf; + var $indexOf = callBound("Array.prototype.indexOf", true) || /** @type {(array: readonly unknown[], value: unknown) => keyof array} */ + function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; + }; + var cache = { __proto__: null }; 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 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); } + cache["$" + typedArray] = callBind(descriptor.get); + } + }); + } else { + forEach2(typedArrays, function(typedArray) { + var arr = new g[typedArray](); + var fn = arr.slice || arr.set; + if (fn) { + cache["$" + typedArray] = callBind(fn); } }); } 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; + var found = false; + forEach2( + // eslint-disable-next-line no-extra-parens + /** @type {Record<`\$${TypedArrayName}`, typeof cache>} */ + /** @type {any} */ + cache, + /** @type {(getter: typeof cache, name: `\$${TypedArrayName}`) => void} */ + function(getter, typedArray) { + if (!found) { + try { + if ("$" + getter(value) === typedArray) { + found = $slice(typedArray, 1); + } + } catch (e) { } - } catch (e) { } } - }); - return foundName; + ); + return found; + }; + var trySlices = function tryAllSlices(value) { + var found = false; + forEach2( + // eslint-disable-next-line no-extra-parens + /** @type {any} */ + cache, + /** @type {(getter: typeof cache, name: `\$${TypedArrayName}`) => void} */ + function(getter, name) { + if (!found) { + try { + getter(value); + found = $slice(name, 1); + } catch (e) { + } + } + } + ); + return found; }; - var isTypedArray = require_is_typed_array(); module2.exports = function whichTypedArray(value) { - if (!isTypedArray(value)) { + if (!value || typeof value !== "object") { return false; } - if (!hasToStringTag || !(Symbol.toStringTag in value)) { - return $slice($toString(value), 8, -1); + if (!hasToStringTag) { + var tag2 = $slice($toString(value), 8, -1); + if ($indexOf(typedArrays, tag2) > -1) { + return tag2; + } + if (tag2 !== "Object") { + return false; + } + return trySlices(value); + } + if (!gOPD) { + return null; } return tryTypedArrays(value); }; } }); -// node_modules/.pnpm/array-buffer-byte-length@1.0.0/node_modules/array-buffer-byte-length/index.js +// node_modules/.pnpm/array-buffer-byte-length@1.0.1/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) { + "node_modules/.pnpm/array-buffer-byte-length@1.0.1/node_modules/array-buffer-byte-length/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var callBound = require_callBound(); @@ -13160,9 +11912,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.3/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.3/node_modules/deep-equal/index.js"(exports2, module2) { "use strict"; init_polyfill_buffer(); var assign2 = require_object(); @@ -13445,9 +12197,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) { @@ -14390,7 +13153,7 @@ var require_template = __commonJS({ v: hoganEscape, // triple stache t: coerceToString, - render: function render2(context, partials, indent2) { + render: function render(context, partials, indent2) { return this.ri([context], partials || {}, indent2); }, // render internal -- a hook for overrides that catches partials too @@ -14642,9 +13405,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") @@ -14724,7 +13487,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": '' }; } ), /***/ @@ -14857,12 +13620,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; @@ -15129,7 +13892,7 @@ var require_feather = __commonJS({ "./node_modules/core-js/internals/well-known-symbol.js" ); var TO_STRING_TAG = wellKnownSymbol("toStringTag"); - var CORRECT_ARGUMENTS = classofRaw(function() { + var CORRECT_ARGUMENTS = classofRaw(/* @__PURE__ */ function() { return arguments; }()) == "Arguments"; var tryGet = function(it, key2) { @@ -15458,12 +14221,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) : {}; }; @@ -15777,7 +14540,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" ); @@ -15805,7 +14568,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; @@ -16775,19 +15538,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"); }; @@ -16816,7 +15579,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" ); @@ -16826,7 +15589,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"); } }; @@ -16943,7 +15706,7 @@ var require_feather = __commonJS({ /***/ function(module3, exports3) { var g; - g = function() { + g = /* @__PURE__ */ function() { return this; }(); try { @@ -16989,7 +15752,7 @@ var require_feather = __commonJS({ } return target; }; - var _createClass = function() { + var _createClass = /* @__PURE__ */ function() { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; @@ -17204,10 +15967,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"] }; } ), /***/ @@ -17277,7 +16040,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.25.3/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); @@ -18188,8 +16951,30 @@ function compareRefNames(a, b) { } return tmp; } +var memo = /* @__PURE__ */ new Map(); function normalizePath(path2) { - return path2.replace(/\/\.\//g, "/").replace(/\/{2,}/g, "/").replace(/^\/\.$/, "/").replace(/^\.\/$/, ".").replace(/^\.\//, "").replace(/\/\.$/, "").replace(/(.+)\/$/, "$1").replace(/^$/, "."); + let normalizedPath = memo.get(path2); + if (!normalizedPath) { + normalizedPath = normalizePathInternal(path2); + memo.set(path2, normalizedPath); + } + return normalizedPath; +} +function normalizePathInternal(path2) { + path2 = path2.split("/./").join("/").replace(/\/{2,}/g, "/"); + if (path2 === "/.") + return "/"; + if (path2 === "./") + return "."; + if (path2.startsWith("./")) + path2 = path2.slice(2); + if (path2.endsWith("/.")) + path2 = path2.slice(0, -2); + if (path2.length > 1 && path2.endsWith("/")) + path2 = path2.slice(0, -1); + if (path2 === "") + return "."; + return path2; } function join(...parts) { return normalizePath(parts.map(normalizePath).join("/")); @@ -19014,6 +17799,8 @@ var StreamReader = class { let { done, value } = await this.stream.next(); if (done) { this._ended = true; + if (!value) + return Buffer.alloc(0); } if (value) { value = Buffer.from(value); @@ -19723,13 +18510,16 @@ MergeNotSupportedError.code = "MergeNotSupportedError"; var MergeConflictError = class _MergeConflictError extends BaseError { /** * @param {Array} filepaths + * @param {Array} bothModified + * @param {Array} deleteByUs + * @param {Array} deleteByTheirs */ - constructor(filepaths) { + constructor(filepaths, bothModified, deleteByUs, deleteByTheirs) { super( `Automatic merge failed with one or more merge conflicts in the following files: ${filepaths.toString()}. Fix conflicts then commit the result.` ); this.code = this.name = _MergeConflictError.code; - this.data = { filepaths }; + this.data = { filepaths, bothModified, deleteByUs, deleteByTheirs }; } }; MergeConflictError.code = "MergeConflictError"; @@ -20597,6 +19387,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 { @@ -20605,7 +19404,7 @@ function isPromiseFs(fs) { return e; } }; - return test(fs).constructor.name === "Promise"; + return isPromiseLike(test(fs)); } var commands = [ "readFile", @@ -22265,7 +21064,7 @@ var GitPktLine = class { return true; return buffer2; } catch (err) { - console.log("error", err); + stream.error = err; return true; } }; @@ -22640,8 +21439,8 @@ function filterCapabilities(server, client) { } var pkg = { name: "isomorphic-git", - version: "1.24.2", - agent: "git/isomorphic-git@1.24.2" + version: "1.25.3", + agent: "git/isomorphic-git@1.25.3" }; var FIFO = class { constructor() { @@ -22668,8 +21467,8 @@ var FIFO = class { } } destroy(err) { - this._ended = true; this.error = err; + this.end(); } async next() { if (this._queue.length > 0) { @@ -22736,7 +21535,7 @@ var GitSideBand = class { if (line === true) { packetlines.end(); progress.end(); - packfile.end(); + input.error ? packfile.destroy(input.error) : packfile.end(); return; } switch (line[0]) { @@ -22751,11 +21550,13 @@ var GitSideBand = class { case 3: { const error = line.slice(1); progress.write(error); + packetlines.end(); + progress.end(); packfile.destroy(new Error(error.toString("utf8"))); return; } default: { - packetlines.write(line.slice(0)); + packetlines.write(line); } } nextBit(); @@ -22865,9 +21666,16 @@ async function parseUploadPackResponse(stream) { } else if (line.startsWith("NAK")) { nak = true; done = true; + } else { + done = true; + nak = true; } if (done) { - resolve({ shallows, unshallows, acks, nak, packfile, progress }); + stream.error ? reject(stream.error) : resolve({ shallows, unshallows, acks, nak, packfile, progress }); + } + }).finally(() => { + if (!done) { + stream.error ? reject(stream.error) : resolve({ shallows, unshallows, acks, nak, packfile, progress }); } }); }); @@ -23156,6 +21964,8 @@ async function _fetch({ }); } const packfile = Buffer.from(await collect(response.packfile)); + if (raw.body.error) + throw raw.body.error; const packfileSha = packfile.slice(-20).toString("hex"); const res = { defaultBranch: response.HEAD, @@ -23541,15 +22351,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]; } @@ -23682,6 +22496,9 @@ async function mergeTree({ const baseTree = TREE({ ref: baseOid }); const theirTree = TREE({ ref: theirOid }); const unmergedFiles = []; + const bothModified = []; + const deleteByUs = []; + const deleteByTheirs = []; const results = await _walk({ fs, cache, @@ -23733,6 +22550,7 @@ async function mergeTree({ }).then(async (r) => { if (!r.cleanMerge) { unmergedFiles.push(filepath); + bothModified.push(filepath); if (!abortOnConflict) { const baseOid2 = await base.oid(); const ourOid2 = await ours.oid(); @@ -23748,6 +22566,43 @@ async function mergeTree({ return r.mergeResult; }); } + if (base && !ours && theirs && await base.type() === "blob" && await theirs.type() === "blob") { + unmergedFiles.push(filepath); + deleteByUs.push(filepath); + if (!abortOnConflict) { + const baseOid2 = await base.oid(); + const theirOid2 = await theirs.oid(); + index2.delete({ filepath }); + index2.insert({ filepath, oid: baseOid2, stage: 1 }); + index2.insert({ filepath, oid: theirOid2, stage: 3 }); + } + return { + mode: await theirs.mode(), + oid: await theirs.oid(), + type: "blob", + path: path2 + }; + } + if (base && ours && !theirs && await base.type() === "blob" && await ours.type() === "blob") { + unmergedFiles.push(filepath); + deleteByTheirs.push(filepath); + if (!abortOnConflict) { + const baseOid2 = await base.oid(); + const ourOid2 = await ours.oid(); + index2.delete({ filepath }); + index2.insert({ filepath, oid: baseOid2, stage: 1 }); + index2.insert({ filepath, oid: ourOid2, stage: 2 }); + } + return { + mode: await ours.mode(), + oid: await ours.oid(), + type: "blob", + path: path2 + }; + } + if (base && !ours && !theirs && await base.type() === "blob") { + return void 0; + } throw new MergeNotSupportedError(); } } @@ -23796,7 +22651,12 @@ async function mergeTree({ } }); } - return new MergeConflictError(unmergedFiles); + return new MergeConflictError( + unmergedFiles, + bothModified, + deleteByUs, + deleteByTheirs + ); } return results.oid; } @@ -26087,7 +24947,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, @@ -26859,7 +25725,7 @@ var index = { var isomorphic_git_default = index; // src/main.ts -var import_obsidian30 = require("obsidian"); +var import_obsidian31 = require("obsidian"); // src/lineAuthor/lineAuthorIntegration.ts init_polyfill_buffer(); @@ -29470,7 +28336,7 @@ var init_scheduler = __esm2({ "src/lib/runners/scheduler.ts"() { init_utils(); init_git_logger(); - createScheduledTask = (() => { + createScheduledTask = /* @__PURE__ */ (() => { let id = 0; return () => { id++; @@ -30063,9 +28929,9 @@ var init_TagList = __esm2({ return singleSorted(toNumber(partsA[0]), toNumber(partsB[0])); } for (let i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) { - const diff2 = sorted(toNumber(partsA[i]), toNumber(partsB[i])); - if (diff2) { - return diff2; + const diff3 = sorted(toNumber(partsA[i]), toNumber(partsB[i])); + if (diff3) { + return diff3; } } return 0; @@ -30730,6 +29596,7 @@ var DEFAULT_SETTINGS = { disablePush: false, pullBeforePush: true, disablePopups: false, + disablePopupsForNoChanges: false, listChangedFilesInMessageBody: false, showStatusBar: true, updateSubmodules: false, @@ -30748,6 +29615,8 @@ var DEFAULT_SETTINGS = { submoduleRecurseCheckout: false, gitDir: "", showFileMenu: true, + authorInHistoryView: "hide", + dateInHistoryView: false, lineAuthor: { show: false, followMovement: "inactive", @@ -30873,6 +29742,11 @@ function getDisplayPath(path2) { return path2; return path2.split("/").last().replace(".md", ""); } +function formatMinutes(minutes) { + if (minutes === 1) + return "1 minute"; + return `${minutes} minutes`; +} // src/gitManager/gitManager.ts init_polyfill_buffer(); @@ -30881,15 +29755,24 @@ var GitManager = class { this.plugin = plugin; this.app = plugin.app; } - getVaultPath(path2) { + // Constructs a path relative to the vault from a path relative to the git repository + getRelativeVaultPath(path2) { if (this.plugin.settings.basePath) { return this.plugin.settings.basePath + "/" + path2; } else { return path2; } } - asRepositoryRelativePath(path2, relativeToVault) { - return relativeToVault && this.plugin.settings.basePath.length > 0 ? path2.substring(this.plugin.settings.basePath.length + 1) : path2; + // Constructs a path relative to the git repository from a path relative to the vault + // + // @param doConversion - If false, the path is returned as is. This is added because that parameter is often passed on to functions where this method is called. + getRelativeRepoPath(path2, doConversion = true) { + if (doConversion) { + if (this.plugin.settings.basePath.length > 0) { + return path2.substring(this.plugin.settings.basePath.length + 1); + } + } + return path2; } _getTreeStructure(children2, beginLength = 0) { const list = []; @@ -30910,7 +29793,7 @@ var GitManager = class { list.push({ title, path: path2, - vaultPath: this.getVaultPath(path2), + vaultPath: this.getRelativeVaultPath(path2), children: this._getTreeStructure( childrenWithSameTitle, (beginLength > 0 ? beginLength + title.length : title.length) + 1 @@ -30921,7 +29804,7 @@ var GitManager = class { title: restPath, data: first2, path: first2.path, - vaultPath: this.getVaultPath(first2.path) + vaultPath: this.getRelativeVaultPath(first2.path) }); children2.remove(first2); } @@ -31001,10 +29884,10 @@ var GitManager = class { const files = chunks.join(", "); template = template.replace("{{files}}", files); } - const moment5 = window.moment; + const moment6 = window.moment; template = template.replace( "{{date}}", - moment5().format(this.plugin.settings.commitDateFormat) + moment6().format(this.plugin.settings.commitDateFormat) ); if (this.plugin.settings.listChangedFilesInMessageBody) { template = template + "\n\nAffected files:\n" + (status2 != null ? status2 : await this.status()).staged.map((e) => e.path).join("\n"); @@ -31062,32 +29945,29 @@ var SimpleGit = class extends GitManager { this.plugin.setState(1 /* status */); const status2 = await this.git.status((err) => this.onError(err)); this.plugin.setState(0 /* idle */); + const allFilesFormatted = status2.files.map((e) => { + const res = this.formatPath(e); + return { + path: res.path, + from: res.from, + index: e.index === "?" ? "U" : e.index, + working_dir: e.working_dir === "?" ? "U" : e.working_dir, + vault_path: this.getRelativeVaultPath(res.path) + }; + }); return { - changed: status2.files.filter((e) => e.working_dir !== " ").map((e) => { - const res = this.formatPath(e); - return { - path: res.path, - from: res.from, - working_dir: e.working_dir === "?" ? "U" : e.working_dir, - vault_path: this.getVaultPath(res.path) - }; - }), - staged: status2.files.filter((e) => e.index !== " " && e.index != "?").map((e) => { - const res = this.formatPath(e, e.index === "R"); - return { - path: res.path, - from: res.from, - index: e.index, - vault_path: this.getVaultPath(res.path) - }; - }), + all: allFilesFormatted, + changed: allFilesFormatted.filter((e) => e.working_dir !== " "), + staged: allFilesFormatted.filter( + (e) => e.index !== " " && e.index != "U" + ), conflicted: status2.conflicted.map( (path2) => this.formatPath({ path: path2 }).path ) }; } async submoduleAwareHeadRevisonInContainingDirectory(filepath) { - const repoPath = this.asRepositoryRelativePath(filepath, true); + const repoPath = this.getRelativeRepoPath(filepath); const containingDirectory = path.dirname(repoPath); const args = ["-C", containingDirectory, "rev-parse", "HEAD"]; const result = this.git.raw(args); @@ -31147,7 +30027,7 @@ var SimpleGit = class extends GitManager { } } async blame(path2, trackMovement, ignoreWhitespace) { - path2 = this.asRepositoryRelativePath(path2, true); + path2 = this.getRelativeRepoPath(path2); if (!await this.isTracked(path2)) return "untracked"; const inSubmodule = await this.getSubmoduleOfFile(path2); @@ -31205,10 +30085,14 @@ var SimpleGit = class extends GitManager { dispatchEvent(new CustomEvent("git-head-update")); return res.summary.changes; } - async commit(message) { + async commit({ + message, + amend + }) { this.plugin.setState(4 /* commit */); const res = (await this.git.commit( await this.formatCommitMessage(message), + amend ? ["--amend"] : [], (err) => this.onError(err) )).summary.changes; dispatchEvent(new CustomEvent("git-head-update")); @@ -31217,7 +30101,7 @@ var SimpleGit = class extends GitManager { } async stage(path2, relativeToVault) { this.plugin.setState(3 /* add */); - path2 = this.asRepositoryRelativePath(path2, relativeToVault); + path2 = this.getRelativeRepoPath(path2, relativeToVault); await this.git.add(["--", path2], (err) => this.onError(err)); this.plugin.setState(0 /* idle */); } @@ -31236,7 +30120,7 @@ var SimpleGit = class extends GitManager { } async unstage(path2, relativeToVault) { this.plugin.setState(3 /* add */); - path2 = this.asRepositoryRelativePath(path2, relativeToVault); + path2 = this.getRelativeRepoPath(path2, relativeToVault); await this.git.reset(["--", path2], (err) => this.onError(err)); this.plugin.setState(0 /* idle */); } @@ -31246,7 +30130,7 @@ var SimpleGit = class extends GitManager { this.plugin.setState(0 /* idle */); } async hashObject(filepath) { - filepath = this.asRepositoryRelativePath(filepath, true); + filepath = this.getRelativeRepoPath(filepath); const inSubmodule = await this.getSubmoduleOfFile(filepath); const args = inSubmodule ? ["-C", inSubmodule.submodule] : []; const relativeFilepath = inSubmodule ? inSubmodule.relativeFilepath : filepath; @@ -31272,6 +30156,12 @@ var SimpleGit = class extends GitManager { [branchInfo.current], (err) => this.onError(err) ); + if (!branchInfo.tracking && this.plugin.settings.updateSubmodules) { + this.plugin.log( + "No tracking branch found. Ignoring pull of main repo and updating submodules only." + ); + return; + } await this.git.fetch((err) => this.onError(err)); const upstreamCommit = await this.git.revparse( [branchInfo.tracking], @@ -31323,7 +30213,7 @@ var SimpleGit = class extends GitManager { return { path: e, working_dir: "P", - vault_path: this.getVaultPath(e) + vault_path: this.getRelativeVaultPath(e) }; }); } else { @@ -31331,17 +30221,9 @@ var SimpleGit = class extends GitManager { } } async push() { - this.plugin.setState(1 /* status */); - const status2 = await this.git.status(); - const trackingBranch = status2.tracking; - const currentBranch2 = status2.current; - const remoteChangedFiles = (await this.git.diffSummary( - [currentBranch2, trackingBranch, "--"], - (err) => this.onError(err) - )).changed; this.plugin.setState(5 /* push */); if (this.plugin.settings.updateSubmodules) { - await this.git.env({ ...process.env, OBSIDIAN_GIT: 1 }).subModule( + const res = await this.git.env({ ...process.env, OBSIDIAN_GIT: 1 }).subModule( [ "foreach", "--recursive", @@ -31349,7 +30231,21 @@ var SimpleGit = class extends GitManager { ], (err) => this.onError(err) ); + console.log(res); } + const status2 = await this.git.status(); + const trackingBranch = status2.tracking; + const currentBranch2 = status2.current; + if (!trackingBranch && this.plugin.settings.updateSubmodules) { + this.plugin.log( + "No tracking branch found. Ignoring push of main repo and updating submodules only." + ); + return void 0; + } + const remoteChangedFiles = (await this.git.diffSummary( + [currentBranch2, trackingBranch, "--"], + (err) => this.onError(err) + )).changed; await this.git.env({ ...process.env, OBSIDIAN_GIT: 1 }).push((err) => this.onError(err)); return remoteChangedFiles; } @@ -31398,16 +30294,21 @@ var SimpleGit = class extends GitManager { }; } async getRemoteUrl(remote) { - return await this.git.remote( - ["get-url", remote], - (err, url) => this.onError(err) - ) || void 0; + try { + return await this.git.remote(["get-url", remote]) || void 0; + } catch (error) { + if (error.toString().contains(remote)) { + return void 0; + } else { + this.onError(error); + } + } } // https://github.com/kometenstaub/obsidian-version-history-diff/issues/3 async log(file, relativeToVault = true, limit) { let path2; if (file) { - path2 = this.asRepositoryRelativePath(file, relativeToVault); + path2 = this.getRelativeRepoPath(file, relativeToVault); } const res = await this.git.log( { @@ -31422,7 +30323,11 @@ var SimpleGit = class extends GitManager { var _a2, _b, _c, _d; return { ...e, - refs: e.refs.split(", "), + author: { + name: e.author_name, + email: e.author_email + }, + refs: e.refs.split(", ").filter((e2) => e2.length > 0), diff: { ...e.diff, files: (_b = (_a2 = e.diff) == null ? void 0 : _a2.files.map((f) => ({ @@ -31430,7 +30335,7 @@ var SimpleGit = class extends GitManager { status: f.status, path: f.file, hash: e.hash, - vault_path: this.getVaultPath(f.file) + vault_path: this.getRelativeVaultPath(f.file) }))) != null ? _b : [] }, fileName: (_d = (_c = e.diff) == null ? void 0 : _c.files.first()) == null ? void 0 : _d.file @@ -31438,7 +30343,7 @@ var SimpleGit = class extends GitManager { }); } async show(commitHash, file, relativeToVault = true) { - const path2 = this.asRepositoryRelativePath(file, relativeToVault); + const path2 = this.getRelativeRepoPath(file, relativeToVault); return this.git.show( [commitHash + ":" + path2], (err) => this.onError(err) @@ -31527,8 +30432,6 @@ var SimpleGit = class extends GitManager { ["-r", "--list", `${remote}*`], (err) => this.onError(err) ); - console.log(remote); - console.log(res); const list = []; for (const item in res.branches) { list.push(res.branches[item].name); @@ -31839,12 +30742,13 @@ var import_obsidian8 = require("obsidian"); // src/gitManager/isomorphicGit.ts init_polyfill_buffer(); -// node_modules/.pnpm/diff@5.1.0/node_modules/diff/lib/index.mjs +// node_modules/.pnpm/diff@5.2.0/node_modules/diff/lib/index.mjs init_polyfill_buffer(); function Diff() { } Diff.prototype = { diff: function diff(oldString, newString) { + var _options$timeout; var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; var callback = options.callback; if (typeof options === "function") { @@ -31873,42 +30777,53 @@ Diff.prototype = { if (options.maxEditLength) { maxEditLength = Math.min(maxEditLength, options.maxEditLength); } + var maxExecutionTime = (_options$timeout = options.timeout) !== null && _options$timeout !== void 0 ? _options$timeout : Infinity; + var abortAfterTimestamp = Date.now() + maxExecutionTime; var bestPath = [{ - newPos: -1, - components: [] + oldPos: -1, + lastComponent: void 0 }]; - var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); - if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + var newPos = this.extractCommon(bestPath[0], newString, oldString, 0); + if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) { return done([{ value: this.join(newString), count: newString.length }]); } + var minDiagonalToConsider = -Infinity, maxDiagonalToConsider = Infinity; function execEditLength() { - for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + for (var diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) { var basePath = void 0; - var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; - if (addPath) { + var removePath = bestPath[diagonalPath - 1], addPath = bestPath[diagonalPath + 1]; + if (removePath) { bestPath[diagonalPath - 1] = void 0; } - var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; + var canAdd = false; + if (addPath) { + var addPathNewPos = addPath.oldPos - diagonalPath; + canAdd = addPath && 0 <= addPathNewPos && addPathNewPos < newLen; + } + var canRemove = removePath && removePath.oldPos + 1 < oldLen; if (!canAdd && !canRemove) { bestPath[diagonalPath] = void 0; continue; } - if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { - basePath = clonePath(removePath); - self2.pushComponent(basePath.components, void 0, true); + if (!canRemove || canAdd && removePath.oldPos + 1 < addPath.oldPos) { + basePath = self2.addToPath(addPath, true, void 0, 0); } else { - basePath = addPath; - basePath.newPos++; - self2.pushComponent(basePath.components, true, void 0); + basePath = self2.addToPath(removePath, void 0, true, 1); } - _oldPos = self2.extractCommon(basePath, newString, oldString, diagonalPath); - if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { - return done(buildValues(self2, basePath.components, newString, oldString, self2.useLongestToken)); + newPos = self2.extractCommon(basePath, newString, oldString, diagonalPath); + if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) { + return done(buildValues(self2, basePath.lastComponent, newString, oldString, self2.useLongestToken)); } else { bestPath[diagonalPath] = basePath; + if (basePath.oldPos + 1 >= oldLen) { + maxDiagonalToConsider = Math.min(maxDiagonalToConsider, diagonalPath - 1); + } + if (newPos + 1 >= newLen) { + minDiagonalToConsider = Math.max(minDiagonalToConsider, diagonalPath + 1); + } } } editLength++; @@ -31916,7 +30831,7 @@ Diff.prototype = { if (callback) { (function exec() { setTimeout(function() { - if (editLength > maxEditLength) { + if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) { return callback(); } if (!execEditLength()) { @@ -31925,7 +30840,7 @@ Diff.prototype = { }, 0); })(); } else { - while (editLength <= maxEditLength) { + while (editLength <= maxEditLength && Date.now() <= abortAfterTimestamp) { var ret = execEditLength(); if (ret) { return ret; @@ -31933,36 +30848,45 @@ Diff.prototype = { } } }, - pushComponent: function pushComponent(components, added, removed) { - var last2 = components[components.length - 1]; + addToPath: function addToPath(path2, added, removed, oldPosInc) { + var last2 = path2.lastComponent; if (last2 && last2.added === added && last2.removed === removed) { - components[components.length - 1] = { - count: last2.count + 1, - added, - removed + return { + oldPos: path2.oldPos + oldPosInc, + lastComponent: { + count: last2.count + 1, + added, + removed, + previousComponent: last2.previousComponent + } }; } else { - components.push({ - count: 1, - added, - removed - }); + return { + oldPos: path2.oldPos + oldPosInc, + lastComponent: { + count: 1, + added, + removed, + previousComponent: last2 + } + }; } }, extractCommon: function extractCommon(basePath, newString, oldString, diagonalPath) { - var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0; + var newLen = newString.length, oldLen = oldString.length, oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0; while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { newPos++; oldPos++; commonCount++; } if (commonCount) { - basePath.components.push({ - count: commonCount - }); + basePath.lastComponent = { + count: commonCount, + previousComponent: basePath.lastComponent + }; } - basePath.newPos = newPos; - return oldPos; + basePath.oldPos = oldPos; + return newPos; }, equals: function equals(left, right) { if (this.options.comparator) { @@ -31990,7 +30914,16 @@ Diff.prototype = { return chars.join(""); } }; -function buildValues(diff2, components, newString, oldString, useLongestToken) { +function buildValues(diff3, lastComponent, newString, oldString, useLongestToken) { + var components = []; + var nextComponent; + while (lastComponent) { + components.push(lastComponent); + nextComponent = lastComponent.previousComponent; + delete lastComponent.previousComponent; + lastComponent = nextComponent; + } + components.reverse(); var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0; for (; componentPos < componentLen; componentPos++) { var component = components[componentPos]; @@ -32001,16 +30934,16 @@ function buildValues(diff2, components, newString, oldString, useLongestToken) { var oldValue = oldString[oldPos + i]; return oldValue.length > value2.length ? oldValue : value2; }); - component.value = diff2.join(value); + component.value = diff3.join(value); } else { - component.value = diff2.join(newString.slice(newPos, newPos + component.count)); + component.value = diff3.join(newString.slice(newPos, newPos + component.count)); } newPos += component.count; if (!component.added) { oldPos += component.count; } } else { - component.value = diff2.join(oldString.slice(oldPos, oldPos + component.count)); + component.value = diff3.join(oldString.slice(oldPos, oldPos + component.count)); oldPos += component.count; if (componentPos && components[componentPos - 1].added) { var tmp = components[componentPos - 1]; @@ -32019,23 +30952,14 @@ function buildValues(diff2, components, newString, oldString, useLongestToken) { } } } - var lastComponent = components[componentLen - 1]; - if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff2.equals("", lastComponent.value)) { - components[componentLen - 2].value += lastComponent.value; + var finalComponent = components[componentLen - 1]; + if (componentLen > 1 && typeof finalComponent.value === "string" && (finalComponent.added || finalComponent.removed) && diff3.equals("", finalComponent.value)) { + components[componentLen - 2].value += finalComponent.value; components.pop(); } return components; } -function clonePath(path2) { - return { - newPos: path2.newPos, - components: path2.components.slice(0) - }; -} var characterDiff = new Diff(); -function diffChars(oldStr, newStr, options) { - return characterDiff.diff(oldStr, newStr, options); -} var extendedWordChars = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; var reWhitespace = /\S/; var wordDiff = new Diff(); @@ -32057,11 +30981,11 @@ wordDiff.tokenize = function(value) { } return tokens; }; -function diffWordsWithSpace(oldStr, newStr, options) { - return wordDiff.diff(oldStr, newStr, options); -} var lineDiff = new Diff(); lineDiff.tokenize = function(value) { + if (this.options.stripTrailingCr) { + value = value.replace(/\r\n/g, "\n"); + } var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/); if (!linesAndNewlines[linesAndNewlines.length - 1]) { linesAndNewlines.pop(); @@ -32213,11 +31137,11 @@ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, ne if (typeof options.context === "undefined") { options.context = 4; } - var diff2 = diffLines(oldStr, newStr, options); - if (!diff2) { + var diff3 = diffLines(oldStr, newStr, options); + if (!diff3) { return; } - diff2.push({ + diff3.push({ value: "", lines: [] }); @@ -32229,12 +31153,12 @@ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, ne var hunks = []; var oldRangeStart = 0, newRangeStart = 0, curRange = [], oldLine = 1, newLine = 1; var _loop = function _loop2(i2) { - var current = diff2[i2], lines = current.lines || current.value.replace(/\n$/, "").split("\n"); + var current = diff3[i2], lines = current.lines || current.value.replace(/\n$/, "").split("\n"); current.lines = lines; if (current.added || current.removed) { var _curRange; if (!oldRangeStart) { - var prev = diff2[i2 - 1]; + var prev = diff3[i2 - 1]; oldRangeStart = oldLine; newRangeStart = newLine; if (prev) { @@ -32253,7 +31177,7 @@ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, ne } } else { if (oldRangeStart) { - if (lines.length <= options.context * 2 && i2 < diff2.length - 2) { + if (lines.length <= options.context * 2 && i2 < diff3.length - 2) { var _curRange2; (_curRange2 = curRange).push.apply(_curRange2, _toConsumableArray(contextLines(lines))); } else { @@ -32267,7 +31191,7 @@ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, ne newLines: newLine - newRangeStart + contextSize, lines: curRange }; - if (i2 >= diff2.length - 2 && lines.length <= options.context) { + if (i2 >= diff3.length - 2 && lines.length <= options.context) { var oldEOFNewline = /\n$/.test(oldStr); var newEOFNewline = /\n$/.test(newStr); var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines; @@ -32288,7 +31212,7 @@ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, ne newLine += lines.length; } }; - for (var i = 0; i < diff2.length; i++) { + for (var i = 0; i < diff3.length; i++) { _loop(i); } return { @@ -32299,16 +31223,19 @@ function structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, ne hunks }; } -function formatPatch(diff2) { +function formatPatch(diff3) { + if (Array.isArray(diff3)) { + return diff3.map(formatPatch).join("\n"); + } var ret = []; - if (diff2.oldFileName == diff2.newFileName) { - ret.push("Index: " + diff2.oldFileName); + if (diff3.oldFileName == diff3.newFileName) { + ret.push("Index: " + diff3.oldFileName); } ret.push("==================================================================="); - ret.push("--- " + diff2.oldFileName + (typeof diff2.oldHeader === "undefined" ? "" : " " + diff2.oldHeader)); - ret.push("+++ " + diff2.newFileName + (typeof diff2.newHeader === "undefined" ? "" : " " + diff2.newHeader)); - for (var i = 0; i < diff2.hunks.length; i++) { - var hunk = diff2.hunks[i]; + ret.push("--- " + diff3.oldFileName + (typeof diff3.oldHeader === "undefined" ? "" : " " + diff3.oldHeader)); + ret.push("+++ " + diff3.newFileName + (typeof diff3.newHeader === "undefined" ? "" : " " + diff3.newHeader)); + for (var i = 0; i < diff3.hunks.length; i++) { + var hunk = diff3.hunks[i]; if (hunk.oldLines === 0) { hunk.oldStart -= 1; } @@ -32561,7 +31488,9 @@ var MyAdapter = class { async saveAndClear() { if (this.index !== void 0) { await this.adapter.writeBinary( - this.plugin.gitManager.getVaultPath(this.gitDir + "/index"), + this.plugin.gitManager.getRelativeVaultPath( + this.gitDir + "/index" + ), this.index, { ctime: this.indexctime, @@ -32709,7 +31638,7 @@ var IsomorphicGit = class extends GitManager { const conflicted = []; window.clearTimeout(timeout); notice == null ? void 0 : notice.hide(); - return { changed, staged, conflicted }; + return { all: status2, changed, staged, conflicted }; } catch (error) { window.clearTimeout(timeout); notice == null ? void 0 : notice.hide(); @@ -32725,18 +31654,20 @@ var IsomorphicGit = class extends GitManager { try { await this.checkAuthorInfo(); await this.stageAll({ status: status2, unstagedFiles }); - return this.commit(message); + return this.commit({ message }); } catch (error) { this.plugin.displayError(error); throw error; } } - async commit(message) { + async commit({ + message + }) { try { await this.checkAuthorInfo(); this.plugin.setState(4 /* commit */); const formatMessage = await this.formatCommitMessage(message); - const hadConflict = this.plugin.localStorage.getConflict() === "true"; + const hadConflict = this.plugin.localStorage.getConflict(); let parent = void 0; if (hadConflict) { const branchInfo = await this.branchInfo(); @@ -32749,7 +31680,7 @@ var IsomorphicGit = class extends GitManager { parent }) ); - this.plugin.localStorage.setConflict("false"); + this.plugin.localStorage.setConflict(false); return; } catch (error) { this.plugin.displayError(error); @@ -32757,15 +31688,12 @@ var IsomorphicGit = class extends GitManager { } } async stage(filepath, relativeToVault) { - const gitPath = this.asRepositoryRelativePath( - filepath, - relativeToVault - ); + const gitPath = this.getRelativeRepoPath(filepath, relativeToVault); let vaultPath; if (relativeToVault) { vaultPath = filepath; } else { - vaultPath = this.getVaultPath(filepath); + vaultPath = this.getRelativeVaultPath(filepath); } try { this.plugin.setState(3 /* add */); @@ -32821,7 +31749,7 @@ var IsomorphicGit = class extends GitManager { async unstage(filepath, relativeToVault) { try { this.plugin.setState(3 /* add */); - filepath = this.asRepositoryRelativePath(filepath, relativeToVault); + filepath = this.getRelativeRepoPath(filepath, relativeToVault); await this.wrapFS( isomorphic_git_default.resetIndex({ ...this.getRepo(), filepath }) ); @@ -32955,13 +31883,15 @@ var IsomorphicGit = class extends GitManager { path: file.path, working_dir: "P", index: "P", - vault_path: this.getVaultPath(file.path) + vault_path: this.getRelativeVaultPath(file.path) })); } catch (error) { progressNotice == null ? void 0 : progressNotice.hide(); if (error instanceof Errors.MergeConflictError) { this.plugin.handleConflict( - error.data.filepaths.map((file) => this.getVaultPath(file)) + error.data.filepaths.map( + (file) => this.getRelativeVaultPath(file) + ) ); } this.plugin.displayError(error); @@ -33087,7 +32017,7 @@ var IsomorphicGit = class extends GitManager { throw error; } } - async branchIsMerged(branch2) { + async branchIsMerged(_) { return true; } async init() { @@ -33217,6 +32147,10 @@ var IsomorphicGit = class extends GitManager { const completeMessage = log2.commit.message.split("\n\n"); return { message: completeMessage[0], + author: { + name: log2.commit.author.name, + email: log2.commit.author.email + }, body: completeMessage.slice(1).join("\n\n"), date: new Date( log2.commit.committer.timestamp @@ -33230,7 +32164,9 @@ var IsomorphicGit = class extends GitManager { return { path: item.path, status: item.type, - vault_path: this.getVaultPath(item.path), + vault_path: this.getRelativeVaultPath( + item.path + ), hash: log2.oid, binary: void 0 }; @@ -33254,7 +32190,7 @@ var IsomorphicGit = class extends GitManager { ); await this.setConfig(`branch.${branch2}.remote`, remote); } - updateGitPath(gitPath) { + updateGitPath(_) { return; } async getFileChangesCount(commitHash1, commitHash2) { @@ -33316,7 +32252,7 @@ var IsomorphicGit = class extends GitManager { }); return res.map((file) => { return { - vault_path: this.getVaultPath(file.path), + vault_path: this.getRelativeVaultPath(file.path), filepath: file.path }; }); @@ -33396,7 +32332,7 @@ var IsomorphicGit = class extends GitManager { } } async getDiffString(filePath, stagedChanges = false, hash2) { - const vaultPath = this.getVaultPath(filePath); + const vaultPath = this.getRelativeVaultPath(filePath); const map = async (file, [A]) => { if (filePath == file) { const oid = await A.oid(); @@ -33430,12 +32366,12 @@ var IsomorphicGit = class extends GitManager { return void 0; throw err; }); - const diff2 = createPatch( + const diff3 = createPatch( vaultPath, previousContent != null ? previousContent : "", commitContent != null ? commitContent : "" ); - return diff2; + return diff3; } const stagedBlob = (await isomorphic_git_default.walk({ ...this.getRepo(), @@ -33455,21 +32391,21 @@ var IsomorphicGit = class extends GitManager { return void 0; throw err; }); - const diff2 = createPatch( + const diff3 = createPatch( vaultPath, headContent != null ? headContent : "", stagedContent ); - return diff2; + return diff3; } else { let workdirContent; - if (await app.vault.adapter.exists(vaultPath)) { - workdirContent = await app.vault.adapter.read(vaultPath); + if (await this.app.vault.adapter.exists(vaultPath)) { + workdirContent = await this.app.vault.adapter.read(vaultPath); } else { workdirContent = ""; } - const diff2 = createPatch(vaultPath, stagedContent, workdirContent); - return diff2; + const diff3 = createPatch(vaultPath, stagedContent, workdirContent); + return diff3; } } async getLastCommitTime() { @@ -33485,7 +32421,7 @@ var IsomorphicGit = class extends GitManager { index: status2[0] == "?" ? "U" : status2[0], working_dir: status2[1] == "?" ? "U" : status2[1], path: row[this.FILE], - vault_path: this.getVaultPath(row[this.FILE]) + vault_path: this.getRelativeVaultPath(row[this.FILE]) }; } async checkAuthorInfo() { @@ -33623,7 +32559,9 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { plugin.settings.autoSaveInterval ); new import_obsidian8.Notice( - `Automatic ${commitOrBackup} enabled! Every ${plugin.settings.autoSaveInterval} minutes.` + `Automatic ${commitOrBackup} enabled! Every ${formatMinutes( + plugin.settings.autoSaveInterval + )}.` ); } else if (plugin.settings.autoSaveInterval <= 0) { plugin.clearAutoBackup() && new import_obsidian8.Notice( @@ -33636,8 +32574,12 @@ 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 stopping file edits`).setDesc( + `Requires the ${commitOrBackup} interval not to be 0. + If turned on, do auto ${commitOrBackup} every ${formatMinutes( + plugin.settings.autoSaveInterval + )} after stopping file edits. + 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; @@ -33677,7 +32619,9 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { plugin.settings.autoPushInterval ); new import_obsidian8.Notice( - `Automatic push enabled! Every ${plugin.settings.autoPushInterval} minutes.` + `Automatic push enabled! Every ${formatMinutes( + plugin.settings.autoPushInterval + )}.` ); } else if (plugin.settings.autoPushInterval <= 0) { plugin.clearAutoPush() && new import_obsidian8.Notice( @@ -33705,7 +32649,9 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { plugin.settings.autoPullInterval ); new import_obsidian8.Notice( - `Automatic pull enabled! Every ${plugin.settings.autoPullInterval} minutes.` + `Automatic pull enabled! Every ${formatMinutes( + plugin.settings.autoPullInterval + )}.` ); } else if (plugin.settings.autoPullInterval <= 0) { plugin.clearAutoPull() && new import_obsidian8.Notice("Automatic pull disabled!"); @@ -33741,14 +32687,14 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { plugin.saveSettings(); }) ); - new import_obsidian8.Setting(containerEl).setName("{{date}} placeholder format").setDesc( - `Specify custom date format. E.g. "${DATE_TIME_FORMAT_SECONDS}"` - ).addText( + const datePlaceholderSetting = new import_obsidian8.Setting(containerEl).setName("{{date}} placeholder format").addText( (text2) => text2.setPlaceholder(plugin.settings.commitDateFormat).setValue(plugin.settings.commitDateFormat).onChange(async (value) => { plugin.settings.commitDateFormat = value; await plugin.saveSettings(); }) ); + datePlaceholderSetting.descEl.innerHTML = ` + Specify custom date format. E.g. "${DATE_TIME_FORMAT_SECONDS}. See Moment.js for more formats.`; new import_obsidian8.Setting(containerEl).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device.").addText( (text2) => { var _a2; @@ -33814,7 +32760,32 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { } } containerEl.createEl("br"); - containerEl.createEl("h3", { text: "Miscellaneous" }); + containerEl.createEl("h3", { text: "History View" }); + new import_obsidian8.Setting(containerEl).setName("Show Author").setDesc("Show the author of the commit in the history view").addDropdown((dropdown) => { + const options = { + hide: "Hide", + full: "Full", + initials: "Initials" + }; + dropdown.addOptions(options); + dropdown.setValue(plugin.settings.authorInHistoryView); + dropdown.onChange(async (option) => { + plugin.settings.authorInHistoryView = option; + plugin.saveSettings(); + plugin.refresh(); + }); + }); + new import_obsidian8.Setting(containerEl).setName("Show Date").setDesc( + "Show the date of the commit in the history view. The {{date}} placeholder format is used to display the date." + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.dateInHistoryView).onChange((value) => { + plugin.settings.dateInHistoryView = value; + plugin.saveSettings(); + plugin.refresh(); + }) + ); + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "Source Control View" }); new import_obsidian8.Setting(containerEl).setName( "Automatically refresh Source Control View on file changes" ).setDesc( @@ -33839,14 +32810,26 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { plugin.setRefreshDebouncer(); }) ); + containerEl.createEl("br"); + containerEl.createEl("h3", { text: "Miscellaneous" }); new import_obsidian8.Setting(containerEl).setName("Disable notifications").setDesc( "Disable notifications for git operations to minimize distraction (refer to status bar for updates). Errors are still shown as notifications even if you enable this setting" ).addToggle( (toggle) => toggle.setValue(plugin.settings.disablePopups).onChange((value) => { plugin.settings.disablePopups = value; + this.display(); plugin.saveSettings(); }) ); + if (!plugin.settings.disablePopups) + new import_obsidian8.Setting(containerEl).setName("Hide notifications for no changes").setDesc( + "Don't show notifications when there are no changes to commit/push" + ).addToggle( + (toggle) => toggle.setValue(plugin.settings.disablePopupsForNoChanges).onChange((value) => { + plugin.settings.disablePopupsForNoChanges = value; + plugin.saveSettings(); + }) + ); new import_obsidian8.Setting(containerEl).setName("Show status bar").setDesc( "Obsidian must be restarted for the changes to take affect" ).addToggle( @@ -33869,7 +32852,7 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { plugin.saveSettings(); }) ); - new import_obsidian8.Setting(containerEl).setName("Show changes files count in status bar").addToggle( + new import_obsidian8.Setting(containerEl).setName("Show the count of modified files in the status bar").addToggle( (toggle) => toggle.setValue(plugin.settings.changedFilesInStatusBar).onChange((value) => { plugin.settings.changedFilesInStatusBar = value; plugin.saveSettings(); @@ -34009,7 +32992,9 @@ var ObsidianGitSettingsTab = class extends import_obsidian8.PluginSettingTab { plugin.saveSettings(); }); }); - new import_obsidian8.Setting(containerEl).setName("Disable on this device").addToggle( + new import_obsidian8.Setting(containerEl).setName("Disable on this device").setDesc( + "Disables the plugin on this device. This setting is not synced." + ).addToggle( (toggle) => toggle.setValue(plugin.localStorage.getPluginDisabled()).onChange((value) => { plugin.localStorage.setPluginDisabled(value); if (value) { @@ -34433,7 +33418,7 @@ var LineAuthoringSubscriber = class { async notifyLineAuthoring(id, la) { if (this.view === void 0) { console.warn( - `Obsidian Git: View is not defined for editor cache key. Unforeseen situation. id: ${id}` + `Git: View is not defined for editor cache key. Unforeseen situation. id: ${id}` ); return; } @@ -34876,9 +33861,9 @@ var LineAuthoringGutter = class extends import_view.GutterMarker { break; case "natural language": dateTimeFormatting = (time) => { - const diff2 = time.diff((0, import_obsidian10.moment)()); + const diff3 = time.diff((0, import_obsidian10.moment)()); const addFluentSuffix = true; - return import_obsidian10.moment.duration(diff2).humanize(addFluentSuffix); + return import_obsidian10.moment.duration(diff3).humanize(addFluentSuffix); }; break; default: @@ -35183,7 +34168,7 @@ var LineAuthorProvider = class { } async trackChanged(file) { this.trackChangedHelper(file).catch((reason) => { - console.warn("Obsidian Git: Error in trackChanged." + reason); + console.warn("Git: Error in trackChanged." + reason); return Promise.reject(reason); }); } @@ -35192,7 +34177,7 @@ var LineAuthorProvider = class { return; if (file.path === void 0) { console.warn( - "Obsidian Git: Attempted to track change of undefined filepath. Unforeseen situation." + "Git: Attempted to track change of undefined filepath. Unforeseen situation." ); return; } @@ -35249,7 +34234,7 @@ var LineAuthoringFeature = class { const file = obsView == null ? void 0 : obsView.file; if (!this.lineAuthorInfoProvider) { console.warn( - "Obsidian Git: undefined lineAuthorInfoProvider. Unexpected situation." + "Git: undefined lineAuthorInfoProvider. Unexpected situation." ); return; } @@ -35276,7 +34261,7 @@ var LineAuthoringFeature = class { } activateFeature() { try { - if (!this.isAvailableOnCurrentPlatform()) + if (!this.isAvailableOnCurrentPlatform().available) return; setTextColorCssBasedOnSetting(this.plg.settings.lineAuthor); this.lineAuthorInfoProvider = new LineAuthorProvider(this.plg); @@ -35284,10 +34269,7 @@ var LineAuthoringFeature = class { this.activateCodeMirrorExtensions(); console.log(this.plg.manifest.name + ": Enabled line authoring."); } catch (e) { - console.warn( - "Obsidian Git: Error while loading line authoring feature.", - e - ); + console.warn("Git: Error while loading line authoring feature.", e); this.deactivateFeature(); } } @@ -35427,7 +34409,7 @@ var StatusBar = class { this.plugin = plugin; this.messages = []; this.base = "obsidian-git-statusbar-"; - this.statusBarEl.setAttribute("aria-label-position", "top"); + this.statusBarEl.setAttribute("data-tooltip-position", "top"); addEventListener("git-refresh", this.refreshCommitTimestamp.bind(this)); } displayMessage(message, timeout) { @@ -35508,8 +34490,8 @@ var StatusBar = class { var _a2; const timestamp = this.lastCommitTimestamp; if (timestamp) { - const moment5 = window.moment; - const fromNow = moment5(timestamp).fromNow(); + const moment6 = window.moment; + const fromNow = moment6(timestamp).fromNow(); this.statusBarEl.ariaLabel = `${this.plugin.offlineMode ? "Offline: " : ""}Last Commit: ${fromNow}`; if ((_a2 = this.unPushedCommits) != null ? _a2 : 0 > 0) { this.statusBarEl.ariaLabel += ` @@ -35558,7 +34540,7 @@ var ChangedFilesModal = class extends import_obsidian14.FuzzySuggestModal { let working_dir = ""; let index2 = ""; if (item.working_dir != " ") - working_dir = `Working dir: ${item.working_dir} `; + working_dir = `Working Dir: ${item.working_dir} `; if (item.index != " ") index2 = `Index: ${item.index}`; return `${working_dir}${index2} | ${item.vault_path}`; @@ -35627,7 +34609,7 @@ async function openLineInGitHub(editor, file, manager) { } const { isGitHub, branch: branch2, repo, user } = data; if (isGitHub) { - const path2 = manager.asRepositoryRelativePath(file.path, true); + const path2 = manager.getRelativeRepoPath(file.path); const from = editor.getCursor("from").line + 1; const to = editor.getCursor("to").line + 1; if (from === to) { @@ -35650,7 +34632,7 @@ async function openHistoryInGitHub(file, manager) { return; } const { isGitHub, branch: branch2, repo, user } = data; - const path2 = manager.asRepositoryRelativePath(file.path, true); + const path2 = manager.getRelativeRepoPath(file.path); if (isGitHub) { window.open( `https://github.com/${user}/${repo}/commits/${branch2}/${path2}` @@ -35680,7 +34662,7 @@ async function getData(manager) { `remote.${remote}.url` ); const [isGitHub, httpsUser, httpsRepo, sshUser, sshRepo] = remoteUrl.match( - /(?:^https:\/\/github\.com\/(.*)\/(.*)\.git$)|(?:^git@github\.com:(.*)\/(.*)\.git$)/ + /(?:^https:\/\/github\.com\/(.*)\/(.*)\.git$)|(?:^[a-zA-Z]+@github\.com:(.*)\/(.*)\.git$)/ ); return { result: "success", @@ -35738,10 +34720,10 @@ var LocalStorageSettings = class { return app.saveLocalStorage(this.prefix + "hostname", value); } getConflict() { - return app.loadLocalStorage(this.prefix + "conflict"); + return app.loadLocalStorage(this.prefix + "conflict") == "true"; } setConflict(value) { - return app.saveLocalStorage(this.prefix + "conflict", value); + return app.saveLocalStorage(this.prefix + "conflict", `${value}`); } getLastAutoPull() { return app.loadLocalStorage(this.prefix + "lastAutoPull"); @@ -35797,13 +34779,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.47/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.47/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.47/node_modules/diff2html/lib-esm/types.js init_polyfill_buffer(); var LineType; (function(LineType2) { @@ -35824,8 +34806,14 @@ var DiffStyleType = { WORD: "word", CHAR: "char" }; +var ColorSchemeType; +(function(ColorSchemeType2) { + ColorSchemeType2["AUTO"] = "auto"; + ColorSchemeType2["DARK"] = "dark"; + ColorSchemeType2["LIGHT"] = "light"; +})(ColorSchemeType || (ColorSchemeType = {})); -// node_modules/.pnpm/diff2html@3.4.35/node_modules/diff2html/lib-esm/utils.js +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/utils.js init_polyfill_buffer(); var specials = [ "-", @@ -35853,8 +34841,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; @@ -35863,36 +34851,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.47/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) { @@ -35901,39 +34874,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); @@ -35967,7 +34937,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; @@ -35998,11 +34968,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; @@ -36021,7 +34991,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; @@ -36033,17 +35003,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); @@ -36056,7 +35026,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); @@ -36079,7 +35049,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; } @@ -36103,7 +35073,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 !!!"); } @@ -36172,13 +35142,344 @@ 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.47/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.47/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/diff@5.1.0/node_modules/diff/lib/index.mjs +init_polyfill_buffer(); +function Diff2() { +} +Diff2.prototype = { + diff: function diff2(oldString, newString) { + var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; + var callback = options.callback; + if (typeof options === "function") { + callback = options; + options = {}; + } + this.options = options; + var self2 = this; + function done(value) { + if (callback) { + setTimeout(function() { + callback(void 0, value); + }, 0); + return true; + } else { + return value; + } + } + oldString = this.castInput(oldString); + newString = this.castInput(newString); + oldString = this.removeEmpty(this.tokenize(oldString)); + newString = this.removeEmpty(this.tokenize(newString)); + var newLen = newString.length, oldLen = oldString.length; + var editLength = 1; + var maxEditLength = newLen + oldLen; + if (options.maxEditLength) { + maxEditLength = Math.min(maxEditLength, options.maxEditLength); + } + var bestPath = [{ + newPos: -1, + components: [] + }]; + var oldPos = this.extractCommon(bestPath[0], newString, oldString, 0); + if (bestPath[0].newPos + 1 >= newLen && oldPos + 1 >= oldLen) { + return done([{ + value: this.join(newString), + count: newString.length + }]); + } + function execEditLength() { + for (var diagonalPath = -1 * editLength; diagonalPath <= editLength; diagonalPath += 2) { + var basePath = void 0; + var addPath = bestPath[diagonalPath - 1], removePath = bestPath[diagonalPath + 1], _oldPos = (removePath ? removePath.newPos : 0) - diagonalPath; + if (addPath) { + bestPath[diagonalPath - 1] = void 0; + } + var canAdd = addPath && addPath.newPos + 1 < newLen, canRemove = removePath && 0 <= _oldPos && _oldPos < oldLen; + if (!canAdd && !canRemove) { + bestPath[diagonalPath] = void 0; + continue; + } + if (!canAdd || canRemove && addPath.newPos < removePath.newPos) { + basePath = clonePath(removePath); + self2.pushComponent(basePath.components, void 0, true); + } else { + basePath = addPath; + basePath.newPos++; + self2.pushComponent(basePath.components, true, void 0); + } + _oldPos = self2.extractCommon(basePath, newString, oldString, diagonalPath); + if (basePath.newPos + 1 >= newLen && _oldPos + 1 >= oldLen) { + return done(buildValues2(self2, basePath.components, newString, oldString, self2.useLongestToken)); + } else { + bestPath[diagonalPath] = basePath; + } + } + editLength++; + } + if (callback) { + (function exec() { + setTimeout(function() { + if (editLength > maxEditLength) { + return callback(); + } + if (!execEditLength()) { + exec(); + } + }, 0); + })(); + } else { + while (editLength <= maxEditLength) { + var ret = execEditLength(); + if (ret) { + return ret; + } + } + } + }, + pushComponent: function pushComponent(components, added, removed) { + var last2 = components[components.length - 1]; + if (last2 && last2.added === added && last2.removed === removed) { + components[components.length - 1] = { + count: last2.count + 1, + added, + removed + }; + } else { + components.push({ + count: 1, + added, + removed + }); + } + }, + extractCommon: function extractCommon2(basePath, newString, oldString, diagonalPath) { + var newLen = newString.length, oldLen = oldString.length, newPos = basePath.newPos, oldPos = newPos - diagonalPath, commonCount = 0; + while (newPos + 1 < newLen && oldPos + 1 < oldLen && this.equals(newString[newPos + 1], oldString[oldPos + 1])) { + newPos++; + oldPos++; + commonCount++; + } + if (commonCount) { + basePath.components.push({ + count: commonCount + }); + } + basePath.newPos = newPos; + return oldPos; + }, + equals: function equals2(left, right) { + if (this.options.comparator) { + return this.options.comparator(left, right); + } else { + return left === right || this.options.ignoreCase && left.toLowerCase() === right.toLowerCase(); + } + }, + removeEmpty: function removeEmpty2(array) { + var ret = []; + for (var i = 0; i < array.length; i++) { + if (array[i]) { + ret.push(array[i]); + } + } + return ret; + }, + castInput: function castInput2(value) { + return value; + }, + tokenize: function tokenize2(value) { + return value.split(""); + }, + join: function join4(chars) { + return chars.join(""); + } +}; +function buildValues2(diff3, components, newString, oldString, useLongestToken) { + var componentPos = 0, componentLen = components.length, newPos = 0, oldPos = 0; + for (; componentPos < componentLen; componentPos++) { + var component = components[componentPos]; + if (!component.removed) { + if (!component.added && useLongestToken) { + var value = newString.slice(newPos, newPos + component.count); + value = value.map(function(value2, i) { + var oldValue = oldString[oldPos + i]; + return oldValue.length > value2.length ? oldValue : value2; + }); + component.value = diff3.join(value); + } else { + component.value = diff3.join(newString.slice(newPos, newPos + component.count)); + } + newPos += component.count; + if (!component.added) { + oldPos += component.count; + } + } else { + component.value = diff3.join(oldString.slice(oldPos, oldPos + component.count)); + oldPos += component.count; + if (componentPos && components[componentPos - 1].added) { + var tmp = components[componentPos - 1]; + components[componentPos - 1] = components[componentPos]; + components[componentPos] = tmp; + } + } + } + var lastComponent = components[componentLen - 1]; + if (componentLen > 1 && typeof lastComponent.value === "string" && (lastComponent.added || lastComponent.removed) && diff3.equals("", lastComponent.value)) { + components[componentLen - 2].value += lastComponent.value; + components.pop(); + } + return components; +} +function clonePath(path2) { + return { + newPos: path2.newPos, + components: path2.components.slice(0) + }; +} +var characterDiff2 = new Diff2(); +function diffChars(oldStr, newStr, options) { + return characterDiff2.diff(oldStr, newStr, options); +} +var extendedWordChars2 = /^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/; +var reWhitespace2 = /\S/; +var wordDiff2 = new Diff2(); +wordDiff2.equals = function(left, right) { + if (this.options.ignoreCase) { + left = left.toLowerCase(); + right = right.toLowerCase(); + } + return left === right || this.options.ignoreWhitespace && !reWhitespace2.test(left) && !reWhitespace2.test(right); +}; +wordDiff2.tokenize = function(value) { + var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); + for (var i = 0; i < tokens.length - 1; i++) { + if (!tokens[i + 1] && tokens[i + 2] && extendedWordChars2.test(tokens[i]) && extendedWordChars2.test(tokens[i + 2])) { + tokens[i] += tokens[i + 2]; + tokens.splice(i + 1, 2); + i--; + } + } + return tokens; +}; +function diffWordsWithSpace(oldStr, newStr, options) { + return wordDiff2.diff(oldStr, newStr, options); +} +var lineDiff2 = new Diff2(); +lineDiff2.tokenize = function(value) { + var retLines = [], linesAndNewlines = value.split(/(\n|\r\n)/); + if (!linesAndNewlines[linesAndNewlines.length - 1]) { + linesAndNewlines.pop(); + } + for (var i = 0; i < linesAndNewlines.length; i++) { + var line = linesAndNewlines[i]; + if (i % 2 && !this.options.newlineIsToken) { + retLines[retLines.length - 1] += line; + } else { + if (this.options.ignoreWhitespace) { + line = line.trim(); + } + retLines.push(line); + } + } + return retLines; +}; +var sentenceDiff2 = new Diff2(); +sentenceDiff2.tokenize = function(value) { + return value.split(/(\S.+?[.!?])(?=\s+|$)/); +}; +var cssDiff2 = new Diff2(); +cssDiff2.tokenize = function(value) { + return value.split(/([{}:;,]|\s+)/); +}; +function _typeof2(obj) { + "@babel/helpers - typeof"; + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + _typeof2 = function(obj2) { + return typeof obj2; + }; + } else { + _typeof2 = function(obj2) { + return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; + }; + } + return _typeof2(obj); +} +var objectPrototypeToString2 = Object.prototype.toString; +var jsonDiff2 = new Diff2(); +jsonDiff2.useLongestToken = true; +jsonDiff2.tokenize = lineDiff2.tokenize; +jsonDiff2.castInput = function(value) { + var _this$options = this.options, undefinedReplacement = _this$options.undefinedReplacement, _this$options$stringi = _this$options.stringifyReplacer, stringifyReplacer = _this$options$stringi === void 0 ? function(k, v) { + return typeof v === "undefined" ? undefinedReplacement : v; + } : _this$options$stringi; + return typeof value === "string" ? value : JSON.stringify(canonicalize2(value, null, null, stringifyReplacer), stringifyReplacer, " "); +}; +jsonDiff2.equals = function(left, right) { + return Diff2.prototype.equals.call(jsonDiff2, left.replace(/,([\r\n])/g, "$1"), right.replace(/,([\r\n])/g, "$1")); +}; +function canonicalize2(obj, stack, replacementStack, replacer, key2) { + stack = stack || []; + replacementStack = replacementStack || []; + if (replacer) { + obj = replacer(key2, obj); + } + var i; + for (i = 0; i < stack.length; i += 1) { + if (stack[i] === obj) { + return replacementStack[i]; + } + } + var canonicalizedObj; + if ("[object Array]" === objectPrototypeToString2.call(obj)) { + stack.push(obj); + canonicalizedObj = new Array(obj.length); + replacementStack.push(canonicalizedObj); + for (i = 0; i < obj.length; i += 1) { + canonicalizedObj[i] = canonicalize2(obj[i], stack, replacementStack, replacer, key2); + } + stack.pop(); + replacementStack.pop(); + return canonicalizedObj; + } + if (obj && obj.toJSON) { + obj = obj.toJSON(); + } + if (_typeof2(obj) === "object" && obj !== null) { + stack.push(obj); + canonicalizedObj = {}; + replacementStack.push(canonicalizedObj); + var sortedKeys = [], _key; + for (_key in obj) { + if (obj.hasOwnProperty(_key)) { + sortedKeys.push(_key); + } + } + sortedKeys.sort(); + for (i = 0; i < sortedKeys.length; i += 1) { + _key = sortedKeys[i]; + canonicalizedObj[_key] = canonicalize2(obj[_key], stack, replacementStack, replacer, _key); + } + stack.pop(); + replacementStack.pop(); + } else { + canonicalizedObj = obj; + } + return canonicalizedObj; +} +var arrayDiff2 = new Diff2(); +arrayDiff2.tokenize = function(value) { + return value.slice(); +}; +arrayDiff2.join = arrayDiff2.removeEmpty = function(value) { + return value; +}; + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/rematch.js init_polyfill_buffer(); function levenshtein(a, b) { if (a.length === 0) { @@ -36187,12 +35488,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; } @@ -36208,24 +35509,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); @@ -36238,29 +35536,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); } @@ -36272,19 +35564,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.47/node_modules/diff2html/lib-esm/render-utils.js var CSSLineClass = { INSERTS: "d2h-ins", DELETES: "d2h-del", @@ -36297,12 +35577,11 @@ var defaultRenderConfig = { matching: LineMatchingType.NONE, matchWordsThreshold: 0.25, maxLineLengthHighlight: 1e4, - diffStyle: DiffStyleType.WORD + diffStyle: DiffStyleType.WORD, + colorScheme: ColorSchemeType.LIGHT }; 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; @@ -36323,35 +35602,43 @@ function toCSSClass(lineType) { return CSSLineClass.DELETES; } } +function colorSchemeToCss(colorScheme) { + switch (colorScheme) { + case ColorSchemeType.DARK: + return "d2h-dark-color-scheme"; + case ColorSchemeType.AUTO: + return "d2h-auto-color-scheme"; + case ColorSchemeType.LIGHT: + default: + return "d2h-light-color-scheme"; + } +} function prefixLength(isCombined) { return isCombined ? 2 : 1; } 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]); @@ -36369,10 +35656,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) { @@ -36388,10 +35675,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) { @@ -36405,13 +35692,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: { @@ -36424,19 +35708,15 @@ function diffHighlight(diffLine1, diffLine2, isCombined, config) { } }; } - var diff2 = diffStyle === "char" ? diffChars(line1.content, line2.content) : diffWordsWithSpace(line1.content, line2.content); - var changedWords = []; + const diff3 = 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 = diff3.filter((element2) => element2.removed); + const added = diff3.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]); @@ -36444,11 +35724,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 = diff3.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: { @@ -36462,12 +35742,19 @@ 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.47/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", { +var defaultFileListRendererConfig = { + colorScheme: defaultRenderConfig.colorScheme +}; +var FileListRenderer = class { + constructor(hoganUtils, config = {}) { + this.hoganUtils = hoganUtils; + this.config = Object.assign(Object.assign({}, defaultFileListRendererConfig), config); + } + render(diffFiles) { + const files = diffFiles.map((file) => this.hoganUtils.render(baseTemplatesPath, "line", { fileHtmlId: getHtmlId(file), oldName: file.oldName, newName: file.newName, @@ -36475,62 +35762,50 @@ function render(diffFiles, hoganUtils) { deletedLines: "-" + file.deletedLines, addedLines: "+" + file.addedLines }, { - fileIcon: hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)) + fileIcon: this.hoganUtils.template(iconsBaseTemplatesPath, getFileIcon(file)) + })).join("\n"); + return this.hoganUtils.render(baseTemplatesPath, "wrapper", { + colorScheme: colorSchemeToCss(this.config.colorScheme), + filesNumber: diffFiles.length, + files }); - }).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 -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 }); + +// node_modules/.pnpm/diff2html@3.4.47/node_modules/diff2html/lib-esm/line-by-line-renderer.js +init_polyfill_buffer(); +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) { + return this.hoganUtils.render(genericTemplatesPath, "wrapper", { + colorScheme: colorSchemeToCss(this.config.colorScheme), + content: diffsHtml + }); + } + 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), @@ -36542,38 +35817,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, @@ -36582,7 +35852,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 { @@ -36591,13 +35861,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 = []; @@ -36619,51 +35889,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 ? { - prefix: diff2.oldLine.prefix, - content: diff2.oldLine.content, + const maxLinesNumber = Math.max(oldLines.length, newLines.length); + for (let i = 0; i < maxLinesNumber; i++) { + const oldLine = oldLines[i]; + const newLine = newLines[i]; + const diff3 = 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({}, diff3 !== void 0 ? { + prefix: diff3.oldLine.prefix, + content: diff3.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 ? { - prefix: diff2.newLine.prefix, - content: diff2.newLine.content, + } : 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({}, diff3 !== void 0 ? { + prefix: diff3.newLine.prefix, + content: diff3.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 || "" }); @@ -36677,58 +35945,43 @@ 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.47/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) { + return this.hoganUtils.render(genericTemplatesPath2, "wrapper", { + colorScheme: colorSchemeToCss(this.config.colorScheme), + content: diffsHtml + }); + } + 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), @@ -36740,8 +35993,8 @@ var SideBySideRenderer = function() { fileTag: fileTagTemplate }) }); - }; - SideBySideRenderer2.prototype.generateEmptyDiff = function() { + } + generateEmptyDiff() { return { right: "", left: this.hoganUtils.render(genericTemplatesPath2, "empty-diff", { @@ -36749,30 +36002,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, @@ -36782,12 +36030,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 { @@ -36795,16 +36043,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 = []; @@ -36826,76 +36074,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 ? { - prefix: diff2.oldLine.prefix, - content: diff2.oldLine.content, + const maxLinesNumber = Math.max(oldLines.length, newLines.length); + for (let i = 0; i < maxLinesNumber; i++) { + const oldLine = oldLines[i]; + const newLine = newLines[i]; + const diff3 = 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({}, diff3 !== void 0 ? { + prefix: diff3.oldLine.prefix, + content: diff3.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 ? { - prefix: diff2.newLine.prefix, - content: diff2.newLine.content, + } : 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({}, diff3 !== void 0 ? { + prefix: diff3.newLine.prefix, + content: diff3.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.47/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.47/node_modules/diff2html/lib-esm/diff2html-templates.js init_polyfill_buffer(); var Hogan2 = __toESM(require_hogan()); var defaultTemplates = {}; @@ -36933,7 +36177,9 @@ defaultTemplates["file-summary-line"] = new Hogan2.Template({ code: function(c, defaultTemplates["file-summary-wrapper"] = new Hogan2.Template({ code: function(c, p, i) { var t = this; t.b(i = i || ""); - t.b('
'); + t.b('
'); t.b("\n" + i); t.b('
'); t.b("\n" + i); @@ -37098,7 +36344,9 @@ defaultTemplates["generic-line"] = new Hogan2.Template({ code: function(c, p, i) defaultTemplates["generic-wrapper"] = new Hogan2.Template({ code: function(c, p, i) { var t = this; t.b(i = i || ""); - t.b('
'); + t.b('
'); t.b("\n" + i); t.b(" "); t.b(t.t(t.f("content", c, p, 0))); @@ -37300,75 +36548,45 @@ 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.47/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.47/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 { colorScheme } = config; + const fileListRendererConfig = { colorScheme }; + const fileList = config.drawFileList ? new FileListRenderer(hoganUtils, fileListRendererConfig).render(diffJson) : ""; + const diffOutput = config.outputFormat === "side-by-side" ? new SideBySideRenderer(hoganUtils, config).render(diffJson) : new LineByLineRenderer(hoganUtils, config).render(diffJson); return fileList + diffOutput; } @@ -37404,8 +36622,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; @@ -37424,35 +36644,37 @@ var DiffView = class extends import_obsidian17.ItemView { if (((_a2 = this.state) == null ? void 0 : _a2.file) && !this.gettingDiff && this.plugin.gitManager) { this.gettingDiff = true; try { - let diff2 = await this.plugin.gitManager.getDiffString( + let diff3 = await this.plugin.gitManager.getDiffString( this.state.file, this.state.staged, this.state.hash ); this.contentEl.empty(); - if (!diff2) { + if (!diff3) { if (this.plugin.gitManager instanceof SimpleGit && await this.plugin.gitManager.isTracked( this.state.file )) { - diff2 = [ + diff3 = [ `--- ${this.state.file}`, `+++ ${this.state.file}`, "" ].join("\n"); } else { const content = await this.app.vault.adapter.read( - this.plugin.gitManager.getVaultPath(this.state.file) + this.plugin.gitManager.getRelativeVaultPath( + this.state.file + ) ); const header = `--- /dev/null +++ ${this.state.file} @@ -0,0 +1,${content.split("\n").length} @@`; - diff2 = [ + diff3 = [ ...header.split("\n"), ...content.split("\n").map((line) => `+${line}`) ].join("\n"); } } - const diffEl = this.parser.parseFromString(html(diff2), "text/html").querySelector(".d2h-file-diff"); + const diffEl = this.parser.parseFromString(html(diff3), "text/html").querySelector(".d2h-file-diff"); this.contentEl.append(diffEl); } finally { this.gettingDiff = false; @@ -37463,18 +36685,18 @@ var DiffView = class extends import_obsidian17.ItemView { // src/ui/history/historyView.ts init_polyfill_buffer(); -var import_obsidian20 = require("obsidian"); +var import_obsidian21 = 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.10/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.10/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.10/node_modules/svelte/src/runtime/internal/utils.js init_polyfill_buffer(); function noop() { } @@ -37498,13 +36720,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.10/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.10/node_modules/svelte/src/runtime/internal/loop.js init_polyfill_buffer(); var tasks = /* @__PURE__ */ new Set(); function run_tasks(now2) { @@ -37531,23 +36753,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.10/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.10/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.10/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.10/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.10/node_modules/svelte/src/runtime/internal/ResizeObserverSingleton.js var ResizeObserverSingleton = class _ResizeObserverSingleton { /** @param {ResizeObserverOptions} options */ constructor(options) { @@ -37595,7 +36817,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.10/node_modules/svelte/src/runtime/internal/dom.js var is_hydrating = false; function start_hydrating() { is_hydrating = true; @@ -37721,7 +36943,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.10/node_modules/svelte/src/runtime/internal/style_manager.js var managed_styles = /* @__PURE__ */ new Map(); var active = 0; function hash(str) { @@ -37785,16 +37007,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.10/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.10/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.10/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.10/node_modules/svelte/src/runtime/internal/lifecycle.js init_polyfill_buffer(); var current_component; function set_current_component(component) { @@ -37815,7 +37037,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.10/node_modules/svelte/src/runtime/internal/scheduler.js var dirty_components = []; var binding_callbacks = []; var render_callbacks = []; @@ -37890,7 +37112,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.10/node_modules/svelte/src/runtime/internal/transitions.js var promise; function wait() { if (!promise) { @@ -38071,19 +37293,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.10/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.10/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.10/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.10/node_modules/svelte/src/shared/boolean_attributes.js init_polyfill_buffer(); var _boolean_attributes = ( /** @type {const} */ @@ -38117,10 +37339,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.10/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.10/node_modules/svelte/src/runtime/internal/Component.js init_polyfill_buffer(); function create_component(block) { block && block.c(); @@ -38157,7 +37379,7 @@ function make_dirty(component, i) { } component.$$.dirty[i / 31 | 0] |= 1 << i % 31; } -function init2(component, options, instance10, create_fragment10, not_equal, props, append_styles2, dirty = [-1]) { +function init2(component, options, instance10, create_fragment10, not_equal, props, append_styles2 = null, dirty = [-1]) { const parent_component = current_component; set_current_component(component); const $$ = component.$$ = { @@ -38219,54 +37441,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); } }, /** @@ -38286,73 +37514,91 @@ 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({ + for (const key2 in this.$$p_d) { + if (!(key2 in this.$$d) && this[key2] !== void 0) { + this.$$d[key2] = this[key2]; + delete this[key2]; + } + } + 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(this.$$p_d[key2].attribute || 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; } }; @@ -38444,19 +37690,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.10/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.10/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.10/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) { @@ -38487,25 +37733,26 @@ function __awaiter(thisArg, _arguments, P, generator) { } // src/ui/history/historyView.svelte -var import_obsidian19 = require("obsidian"); +var import_obsidian20 = require("obsidian"); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/index.js +// node_modules/.pnpm/svelte@4.2.10/node_modules/svelte/src/runtime/index.js init_polyfill_buffer(); // src/ui/history/components/logComponent.svelte init_polyfill_buffer(); +var import_obsidian19 = require("obsidian"); -// node_modules/.pnpm/svelte@4.0.0/node_modules/svelte/src/runtime/transition/index.js +// node_modules/.pnpm/svelte@4.2.10/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.10/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.10/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; @@ -38537,7 +37784,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; @@ -38605,12 +37852,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"); @@ -38623,22 +37872,32 @@ 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", + "data-tooltip-position", /*side*/ ctx[3] ); 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); @@ -38674,6 +37933,7 @@ function create_fragment(ctx) { } }, p(ctx2, [dirty]) { + var _a2, _b; if (dirty & /*diff*/ 1 && t0_value !== (t0_value = getDisplayPath( /*diff*/ @@ -38708,11 +37968,16 @@ 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( div3, - "aria-label-position", + "data-tooltip-position", /*side*/ ctx2[3] ); @@ -38722,6 +37987,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, @@ -38738,13 +38014,13 @@ function create_fragment(ctx) { } function instance($$self, $$props, $$invalidate) { let side; - let { diff: diff2 } = $$props; + let { diff: diff3 } = $$props; let { view } = $$props; let buttons = []; window.setTimeout(() => buttons.forEach((b) => (0, import_obsidian18.setIcon)(b, b.getAttr("data-icon"))), 0); function open(event) { var _a2; - const file = view.app.vault.getAbstractFileByPath(diff2.vault_path); + const file = view.app.vault.getAbstractFileByPath(diff3.vault_path); if (file instanceof import_obsidian18.TFile) { (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.openFile(file); } @@ -38755,9 +38031,9 @@ function instance($$self, $$props, $$invalidate) { type: DIFF_VIEW_CONFIG.type, active: true, state: { - file: diff2.path, + file: diff3.path, staged: false, - hash: diff2.hash + hash: diff3.hash } }); } @@ -38772,7 +38048,7 @@ function instance($$self, $$props, $$invalidate) { } $$self.$$set = ($$props2) => { if ("diff" in $$props2) - $$invalidate(0, diff2 = $$props2.diff); + $$invalidate(0, diff3 = $$props2.diff); if ("view" in $$props2) $$invalidate(1, view = $$props2.view); }; @@ -38783,7 +38059,7 @@ function instance($$self, $$props, $$invalidate) { $$invalidate(3, side = view.leaf.getRoot().side == "left" ? "right" : "left"); } }; - return [diff2, view, buttons, side, open, showDiff, focus_handler, div_binding]; + return [diff3, view, buttons, side, open, showDiff, focus_handler, div_binding]; } var LogFileComponent = class extends SvelteComponent { constructor(options) { @@ -38855,11 +38131,20 @@ function create_else_block(ctx) { set_style(div0, "padding-right", "5px"); set_style(div0, "display", "flex"); attr(div1, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[4][ + /*entity*/ + ctx[8].title + ] + ); attr(div2, "class", "tree-item-inner nav-folder-title-content svelte-1lnl15d"); attr(div3, "class", "tree-item-self is-clickable nav-folder-title"); attr( div3, - "aria-label-position", + "data-tooltip-position", /*side*/ ctx[5] ); @@ -38897,6 +38182,18 @@ function create_else_block(ctx) { }, p(new_ctx, dirty) { ctx = new_ctx; + if (!current || dirty & /*closed, hierarchy*/ + 17) { + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[4][ + /*entity*/ + ctx[8].title + ] + ); + } if ((!current || dirty & /*hierarchy*/ 1) && t2_value !== (t2_value = /*entity*/ ctx[8].title + "")) @@ -38905,7 +38202,7 @@ function create_else_block(ctx) { 32) { attr( div3, - "aria-label-position", + "data-tooltip-position", /*side*/ ctx[5] ); @@ -39329,15 +38626,12 @@ var LogTreeComponent = class extends SvelteComponent { var logTreeComponent_default = LogTreeComponent; // src/ui/history/components/logComponent.svelte -function add_css3(target) { - append_styles(target, "svelte-1t6egnt", ".git-ref.svelte-1t6egnt{color:var(--text-accent)}"); -} function get_each_context2(ctx, list, i) { const child_ctx = ctx.slice(); - child_ctx[8] = list[i]; + child_ctx[9] = list[i]; return child_ctx; } -function create_if_block_2(ctx) { +function create_if_block_4(ctx) { let div; let t_value = ( /*log*/ @@ -39348,7 +38642,7 @@ function create_if_block_2(ctx) { c() { div = element("div"); t = text(t_value); - attr(div, "class", "git-ref svelte-1t6egnt"); + attr(div, "class", "git-ref"); }, m(target, anchor) { insert(target, div, anchor); @@ -39367,6 +38661,80 @@ function create_if_block_2(ctx) { } }; } +function create_if_block_3(ctx) { + let div; + let t_value = ( + /*authorToString*/ + ctx[7]( + /*log*/ + ctx[0] + ) + "" + ); + let t; + return { + c() { + div = element("div"); + t = text(t_value); + attr(div, "class", "git-author"); + }, + m(target, anchor) { + insert(target, div, anchor); + append2(div, t); + }, + p(ctx2, dirty) { + if (dirty & /*log*/ + 1 && t_value !== (t_value = /*authorToString*/ + ctx2[7]( + /*log*/ + ctx2[0] + ) + "")) + set_data(t, t_value); + }, + d(detaching) { + if (detaching) { + detach(div); + } + } + }; +} +function create_if_block_2(ctx) { + let div; + let t_value = (0, import_obsidian19.moment)( + /*log*/ + ctx[0].date + ).format( + /*plugin*/ + ctx[3].settings.commitDateFormat + ) + ""; + let t; + return { + c() { + div = element("div"); + t = text(t_value); + attr(div, "class", "git-date"); + }, + m(target, anchor) { + insert(target, div, anchor); + append2(div, t); + }, + p(ctx2, dirty) { + if (dirty & /*log, plugin*/ + 9 && t_value !== (t_value = (0, import_obsidian19.moment)( + /*log*/ + ctx2[0].date + ).format( + /*plugin*/ + ctx2[3].settings.commitDateFormat + ) + "")) + set_data(t, t_value); + }, + d(detaching) { + if (detaching) { + detach(div); + } + } + }; +} function create_if_block3(ctx) { let div; let current_block_type_index; @@ -39602,7 +38970,7 @@ function create_each_block2(ctx) { ), diff: ( /*file*/ - ctx[8] + ctx[9] ) } }); @@ -39623,7 +38991,7 @@ function create_each_block2(ctx) { if (dirty & /*log*/ 1) logfilecomponent_changes.diff = /*file*/ - ctx2[8]; + ctx2[9]; logfilecomponent.$set(logfilecomponent_changes); }, i(local) { @@ -39642,6 +39010,7 @@ function create_each_block2(ctx) { }; } function create_fragment3(ctx) { + var _a2; let main; let div4; let div3; @@ -39649,25 +39018,37 @@ function create_fragment3(ctx) { let t0; let div2; let t1; + let t2; + let t3; let div1; - let t2_value = ( + let t4_value = ( /*log*/ ctx[0].message + "" ); - let t2; - let div1_aria_label_value; - let t3; + let t4; + let div3_aria_label_value; + let t5; let current; let mounted; let dispose; let if_block0 = ( /*log*/ - ctx[0].refs.length > 0 && create_if_block_2(ctx) + ctx[0].refs.length > 0 && create_if_block_4(ctx) ); - let if_block1 = !/*isCollapsed*/ + let if_block1 = ( + /*plugin*/ + ctx[3].settings.authorInHistoryView != "hide" && /*log*/ + ((_a2 = ctx[0].author) == null ? void 0 : _a2.name) && create_if_block_3(ctx) + ); + let if_block2 = ( + /*plugin*/ + ctx[3].settings.dateInHistoryView && create_if_block_2(ctx) + ); + let if_block3 = !/*isCollapsed*/ ctx[4] && create_if_block3(ctx); return { c() { + var _a3; main = element("main"); div4 = element("div"); div3 = element("div"); @@ -39678,22 +39059,47 @@ function create_fragment3(ctx) { if (if_block0) if_block0.c(); t1 = space(); - div1 = element("div"); - t2 = text(t2_value); - t3 = space(); if (if_block1) if_block1.c(); + t2 = space(); + if (if_block2) + if_block2.c(); + t3 = space(); + div1 = element("div"); + t4 = text(t4_value); + t5 = space(); + if (if_block3) + if_block3.c(); attr(div0, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class( + div0, + "is-collapsed", + /*isCollapsed*/ + ctx[4] + ); attr(div1, "class", "tree-item-inner nav-folder-title-content"); - attr(div1, "aria-label", div1_aria_label_value = /*log*/ - ctx[0].message); + attr(div3, "class", "tree-item-self is-clickable nav-folder-title"); + attr(div3, "aria-label", div3_aria_label_value = `${/*log*/ + ctx[0].refs.length > 0 ? ( + /*log*/ + ctx[0].refs.join(", ") + "\n" + ) : ""}${/*log*/ + (_a3 = ctx[0].author) == null ? void 0 : _a3.name} +${(0, import_obsidian19.moment)( + /*log*/ + ctx[0].date + ).format( + /*plugin*/ + ctx[3].settings.commitDateFormat + )} +${/*log*/ + ctx[0].message}`); attr( - div1, - "aria-label-position", + div3, + "data-tooltip-position", /*side*/ ctx[5] ); - attr(div3, "class", "tree-item-self is-clickable nav-folder-title"); attr(div4, "class", "tree-item nav-folder"); toggle_class( div4, @@ -39712,23 +39118,39 @@ function create_fragment3(ctx) { if (if_block0) if_block0.m(div2, null); append2(div2, t1); - append2(div2, div1); - append2(div1, t2); - append2(div4, t3); if (if_block1) - if_block1.m(div4, null); + if_block1.m(div2, null); + append2(div2, t2); + if (if_block2) + if_block2.m(div2, null); + append2(div2, t3); + append2(div2, div1); + append2(div1, t4); + append2(div4, t5); + if (if_block3) + if_block3.m(div4, null); current = true; if (!mounted) { dispose = listen( div3, "click", /*click_handler*/ - ctx[7] + ctx[8] ); mounted = true; } }, p(ctx2, [dirty]) { + var _a3, _b; + if (!current || dirty & /*isCollapsed*/ + 16) { + toggle_class( + div0, + "is-collapsed", + /*isCollapsed*/ + ctx2[4] + ); + } if ( /*log*/ ctx2[0].refs.length > 0 @@ -39736,7 +39158,7 @@ function create_fragment3(ctx) { if (if_block0) { if_block0.p(ctx2, dirty); } else { - if_block0 = create_if_block_2(ctx2); + if_block0 = create_if_block_4(ctx2); if_block0.c(); if_block0.m(div2, t1); } @@ -39744,42 +39166,86 @@ function create_fragment3(ctx) { if_block0.d(1); if_block0 = null; } + if ( + /*plugin*/ + ctx2[3].settings.authorInHistoryView != "hide" && /*log*/ + ((_a3 = ctx2[0].author) == null ? void 0 : _a3.name) + ) { + if (if_block1) { + if_block1.p(ctx2, dirty); + } else { + if_block1 = create_if_block_3(ctx2); + if_block1.c(); + if_block1.m(div2, t2); + } + } else if (if_block1) { + if_block1.d(1); + if_block1 = null; + } + if ( + /*plugin*/ + ctx2[3].settings.dateInHistoryView + ) { + if (if_block2) { + if_block2.p(ctx2, dirty); + } else { + if_block2 = create_if_block_2(ctx2); + if_block2.c(); + if_block2.m(div2, t3); + } + } else if (if_block2) { + if_block2.d(1); + if_block2 = null; + } if ((!current || dirty & /*log*/ - 1) && t2_value !== (t2_value = /*log*/ + 1) && t4_value !== (t4_value = /*log*/ ctx2[0].message + "")) - set_data(t2, t2_value); - if (!current || dirty & /*log*/ - 1 && div1_aria_label_value !== (div1_aria_label_value = /*log*/ - ctx2[0].message)) { - attr(div1, "aria-label", div1_aria_label_value); + set_data(t4, t4_value); + if (!current || dirty & /*log, plugin*/ + 9 && div3_aria_label_value !== (div3_aria_label_value = `${/*log*/ + ctx2[0].refs.length > 0 ? ( + /*log*/ + ctx2[0].refs.join(", ") + "\n" + ) : ""}${/*log*/ + (_b = ctx2[0].author) == null ? void 0 : _b.name} +${(0, import_obsidian19.moment)( + /*log*/ + ctx2[0].date + ).format( + /*plugin*/ + ctx2[3].settings.commitDateFormat + )} +${/*log*/ + ctx2[0].message}`)) { + attr(div3, "aria-label", div3_aria_label_value); } if (!current || dirty & /*side*/ 32) { attr( - div1, - "aria-label-position", + div3, + "data-tooltip-position", /*side*/ ctx2[5] ); } if (!/*isCollapsed*/ ctx2[4]) { - if (if_block1) { - if_block1.p(ctx2, dirty); + if (if_block3) { + if_block3.p(ctx2, dirty); if (dirty & /*isCollapsed*/ 16) { - transition_in(if_block1, 1); + transition_in(if_block3, 1); } } else { - if_block1 = create_if_block3(ctx2); - if_block1.c(); - transition_in(if_block1, 1); - if_block1.m(div4, null); + if_block3 = create_if_block3(ctx2); + if_block3.c(); + transition_in(if_block3, 1); + if_block3.m(div4, null); } - } else if (if_block1) { + } else if (if_block3) { group_outros(); - transition_out(if_block1, 1, 1, () => { - if_block1 = null; + transition_out(if_block3, 1, 1, () => { + if_block3 = null; }); check_outros(); } @@ -39796,11 +39262,11 @@ function create_fragment3(ctx) { i(local) { if (current) return; - transition_in(if_block1); + transition_in(if_block3); current = true; }, o(local) { - transition_out(if_block1); + transition_out(if_block3); current = false; }, d(detaching) { @@ -39811,6 +39277,10 @@ function create_fragment3(ctx) { if_block0.d(); if (if_block1) if_block1.d(); + if (if_block2) + if_block2.d(); + if (if_block3) + if_block3.d(); mounted = false; dispose(); } @@ -39824,6 +39294,15 @@ function instance3($$self, $$props, $$invalidate) { let { showTree } = $$props; let { plugin } = $$props; let isCollapsed = true; + function authorToString(log3) { + const name = log3.author.name; + if (plugin.settings.authorInHistoryView == "full") { + return name; + } else if (plugin.settings.authorInHistoryView == "initials") { + const words = name.split(" ").filter((word) => word.length > 0); + return words.map((word) => word[0].toUpperCase()).join(""); + } + } const click_handler = () => $$invalidate(4, isCollapsed = !isCollapsed); $$self.$$set = ($$props2) => { if ("log" in $$props2) @@ -39852,12 +39331,22 @@ function instance3($$self, $$props, $$invalidate) { $$invalidate(5, side = view.leaf.getRoot().side == "left" ? "right" : "left"); } }; - return [log2, view, showTree, plugin, isCollapsed, side, logsHierarchy, click_handler]; + return [ + log2, + view, + showTree, + plugin, + isCollapsed, + side, + logsHierarchy, + authorToString, + click_handler + ]; } var LogComponent = class extends SvelteComponent { constructor(options) { super(); - init2(this, options, instance3, create_fragment3, safe_not_equal, { log: 0, view: 1, showTree: 2, plugin: 3 }, add_css3); + init2(this, options, instance3, create_fragment3, safe_not_equal, { log: 0, view: 1, showTree: 2, plugin: 3 }); } }; var logComponent_default = LogComponent; @@ -40165,8 +39654,8 @@ function instance4($$self, $$props, $$invalidate) { plugin.app.workspace.onLayoutReady(() => { window.setTimeout( () => { - buttons.forEach((btn) => (0, import_obsidian19.setIcon)(btn, btn.getAttr("data-icon"), 16)); - (0, import_obsidian19.setIcon)(layoutBtn, showTree ? "list" : "folder", 16); + buttons.forEach((btn) => (0, import_obsidian20.setIcon)(btn, btn.getAttr("data-icon"))); + (0, import_obsidian20.setIcon)(layoutBtn, showTree ? "list" : "folder"); }, 0 ); @@ -40211,7 +39700,7 @@ function instance4($$self, $$props, $$invalidate) { $: { if (layoutBtn) { layoutBtn.empty(); - (0, import_obsidian19.setIcon)(layoutBtn, showTree ? "list" : "folder", 16); + (0, import_obsidian20.setIcon)(layoutBtn, showTree ? "list" : "folder"); } } } @@ -40238,7 +39727,7 @@ var HistoryView = class extends SvelteComponent { var historyView_default = HistoryView; // src/ui/history/historyView.ts -var HistoryView2 = class extends import_obsidian20.ItemView { +var HistoryView2 = class extends import_obsidian21.ItemView { constructor(leaf, plugin) { super(leaf); this.plugin = plugin; @@ -40270,8 +39759,8 @@ var HistoryView2 = class extends import_obsidian20.ItemView { // src/ui/modals/branchModal.ts init_polyfill_buffer(); -var import_obsidian21 = require("obsidian"); -var BranchModal = class extends import_obsidian21.FuzzySuggestModal { +var import_obsidian22 = require("obsidian"); +var BranchModal = class extends import_obsidian22.FuzzySuggestModal { constructor(branches) { super(app); this.branches = branches; @@ -40301,8 +39790,8 @@ var BranchModal = class extends import_obsidian21.FuzzySuggestModal { // src/ui/modals/ignoreModal.ts init_polyfill_buffer(); -var import_obsidian22 = require("obsidian"); -var IgnoreModal = class extends import_obsidian22.Modal { +var import_obsidian23 = require("obsidian"); +var IgnoreModal = class extends import_obsidian23.Modal { constructor(app2, content) { super(app2); this.content = content; @@ -40340,16 +39829,16 @@ var IgnoreModal = class extends import_obsidian22.Modal { // src/ui/sourceControl/sourceControl.ts init_polyfill_buffer(); -var import_obsidian29 = require("obsidian"); +var import_obsidian30 = require("obsidian"); // src/ui/sourceControl/sourceControl.svelte init_polyfill_buffer(); -var import_obsidian28 = require("obsidian"); +var import_obsidian29 = require("obsidian"); // src/ui/modals/discardModal.ts init_polyfill_buffer(); -var import_obsidian23 = require("obsidian"); -var DiscardModal = class extends import_obsidian23.Modal { +var import_obsidian24 = require("obsidian"); +var DiscardModal = class extends import_obsidian24.Modal { constructor(app2, deletion, filename) { super(app2); this.deletion = deletion; @@ -40405,15 +39894,15 @@ var DiscardModal = class extends import_obsidian23.Modal { // src/ui/sourceControl/components/fileComponent.svelte init_polyfill_buffer(); -var import_obsidian25 = require("obsidian"); +var import_obsidian26 = 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_xyncsguozhhawq25qkwtwp76my/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_xyncsguozhhawq25qkwtwp76my/node_modules/obsidian-community-lib/dist/utils.js init_polyfill_buffer(); var feather = __toESM(require_feather()); -var import_obsidian24 = require("obsidian"); +var import_obsidian25 = require("obsidian"); function hoverPreview(event, view, to) { const targetEl = event.target; app.workspace.trigger("hover-link", { @@ -40426,8 +39915,8 @@ 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}"); +function add_css3(target) { + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_if_block5(ctx) { let div; @@ -40499,12 +39988,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"); @@ -40521,7 +40012,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"); @@ -40533,16 +40024,27 @@ 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", + "data-tooltip-position", /*side*/ ctx[3] ); 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); @@ -40598,6 +40100,7 @@ function create_fragment5(ctx) { } }, p(ctx2, [dirty]) { + var _a2, _b, _c; if (dirty & /*change*/ 1 && t0_value !== (t0_value = getDisplayPath( /*change*/ @@ -40632,11 +40135,16 @@ 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( div6, - "aria-label-position", + "data-tooltip-position", /*side*/ ctx2[3] ); @@ -40646,6 +40154,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, @@ -40668,7 +40188,7 @@ function instance5($$self, $$props, $$invalidate) { let { view } = $$props; let { manager } = $$props; let buttons = []; - window.setTimeout(() => buttons.forEach((b) => (0, import_obsidian25.setIcon)(b, b.getAttr("data-icon"))), 0); + window.setTimeout(() => buttons.forEach((b) => (0, import_obsidian26.setIcon)(b, b.getAttr("data-icon"))), 0); function hover(event) { if (app.vault.getAbstractFileByPath(change.vault_path)) { hoverPreview(event, view, change.vault_path); @@ -40678,7 +40198,7 @@ function instance5($$self, $$props, $$invalidate) { var _a2; const file = view.app.vault.getAbstractFileByPath(change.vault_path); console.log(event); - if (file instanceof import_obsidian25.TFile) { + if (file instanceof import_obsidian26.TFile) { (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.openFile(file); } } @@ -40767,16 +40287,16 @@ function instance5($$self, $$props, $$invalidate) { var FileComponent = class extends SvelteComponent { constructor(options) { super(); - init2(this, options, instance5, create_fragment5, safe_not_equal, { change: 0, view: 1, manager: 9 }, add_css4); + init2(this, options, instance5, create_fragment5, safe_not_equal, { change: 0, view: 1, manager: 9 }, add_css3); } }; var fileComponent_default = FileComponent; // src/ui/sourceControl/components/pulledFileComponent.svelte 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}"); +var import_obsidian27 = require("obsidian"); +function add_css4(target) { + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_fragment6(ctx) { let main; @@ -40796,6 +40316,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; @@ -40809,21 +40330,23 @@ 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", + "data-tooltip-position", /*side*/ ctx[1] ); 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); @@ -40876,11 +40399,16 @@ 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( div2, - "aria-label-position", + "data-tooltip-position", /*side*/ ctx2[1] ); @@ -40914,7 +40442,7 @@ function instance6($$self, $$props, $$invalidate) { function open(event) { var _a2; const file = view.app.vault.getAbstractFileByPath(change.vault_path); - if (file instanceof import_obsidian26.TFile) { + if (file instanceof import_obsidian27.TFile) { (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.openFile(file); } } @@ -40939,16 +40467,16 @@ function instance6($$self, $$props, $$invalidate) { var PulledFileComponent = class extends SvelteComponent { constructor(options) { super(); - init2(this, options, instance6, create_fragment6, safe_not_equal, { change: 0, view: 4 }, add_css5); + init2(this, options, instance6, create_fragment6, safe_not_equal, { change: 0, view: 4 }, add_css4); } }; var pulledFileComponent_default = PulledFileComponent; // src/ui/sourceControl/components/stagedFileComponent.svelte 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}"); +var import_obsidian28 = require("obsidian"); +function add_css5(target) { + append_styles(target, "svelte-1wbh8tp", "main.svelte-1wbh8tp .nav-file-title.svelte-1wbh8tp{align-items:center}"); } function create_if_block6(ctx) { let div; @@ -41012,12 +40540,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"); @@ -41032,7 +40562,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"); @@ -41041,16 +40571,27 @@ 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", + "data-tooltip-position", /*side*/ ctx[3] ); 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); @@ -41099,6 +40640,7 @@ function create_fragment7(ctx) { } }, p(ctx2, [dirty]) { + var _a2, _b, _c; if (dirty & /*change*/ 1 && t0_value !== (t0_value = getDisplayPath( /*change*/ @@ -41133,11 +40675,16 @@ 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( div5, - "aria-label-position", + "data-tooltip-position", /*side*/ ctx2[3] ); @@ -41147,6 +40694,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, @@ -41163,13 +40722,12 @@ function create_fragment7(ctx) { }; } function instance7($$self, $$props, $$invalidate) { - let formattedPath; let side; let { change } = $$props; let { view } = $$props; let { manager } = $$props; let buttons = []; - window.setTimeout(() => buttons.forEach((b) => (0, import_obsidian27.setIcon)(b, b.getAttr("data-icon"), 16)), 0); + window.setTimeout(() => buttons.forEach((b) => (0, import_obsidian28.setIcon)(b, b.getAttr("data-icon"))), 0); function hover(event) { if (app.vault.getAbstractFileByPath(change.vault_path)) { hoverPreview(event, view, change.vault_path); @@ -41178,7 +40736,7 @@ function instance7($$self, $$props, $$invalidate) { function open(event) { var _a2; const file = view.app.vault.getAbstractFileByPath(change.vault_path); - if (file instanceof import_obsidian27.TFile) { + if (file instanceof import_obsidian28.TFile) { (_a2 = getNewLeaf(event)) === null || _a2 === void 0 ? void 0 : _a2.openFile(file); } } @@ -41219,11 +40777,6 @@ function instance7($$self, $$props, $$invalidate) { $$invalidate(8, manager = $$props2.manager); }; $$self.$$.update = () => { - if ($$self.$$.dirty & /*change*/ - 1) { - $: - formattedPath = change.vault_path; - } if ($$self.$$.dirty & /*view*/ 2) { $: @@ -41248,15 +40801,15 @@ function instance7($$self, $$props, $$invalidate) { var StagedFileComponent = class extends SvelteComponent { constructor(options) { super(); - init2(this, options, instance7, create_fragment7, safe_not_equal, { change: 0, view: 1, manager: 8 }, add_css6); + init2(this, options, instance7, create_fragment7, safe_not_equal, { change: 0, view: 1, manager: 8 }, add_css5); } }; 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}"); +function add_css6(target) { + 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(); @@ -41301,7 +40854,7 @@ function create_else_block3(ctx) { ctx[5][ /*entity*/ ctx[15].title - ] && create_if_block_4(ctx); + ] && create_if_block_42(ctx); function click_handler_3() { return ( /*click_handler_3*/ @@ -41336,14 +40889,23 @@ function create_else_block3(ctx) { set_style(div0, "padding-right", "5px"); set_style(div0, "display", "flex"); attr(div1, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); - attr(div2, "class", "tree-item-inner nav-folder-title-content svelte-1lnl15d"); + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[5][ + /*entity*/ + ctx[15].title + ] + ); + 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", + "data-tooltip-position", /*side*/ ctx[6] ); @@ -41381,12 +40943,24 @@ function create_else_block3(ctx) { append2(div7, t6); current = true; if (!mounted) { - dispose = listen(div7, "click", click_handler_3); + dispose = listen(div7, "click", stop_propagation(click_handler_3)); mounted = true; } }, p(new_ctx, dirty) { ctx = new_ctx; + if (!current || dirty & /*closed, hierarchy*/ + 33) { + toggle_class( + div1, + "is-collapsed", + /*closed*/ + ctx[5][ + /*entity*/ + ctx[15].title + ] + ); + } if ((!current || dirty & /*hierarchy*/ 1) && t2_value !== (t2_value = /*entity*/ ctx[15].title + "")) @@ -41405,7 +40979,7 @@ function create_else_block3(ctx) { 64) { attr( div6, - "aria-label-position", + "data-tooltip-position", /*side*/ ctx[6] ); @@ -41427,7 +41001,7 @@ function create_else_block3(ctx) { transition_in(if_block1, 1); } } else { - if_block1 = create_if_block_4(ctx); + if_block1 = create_if_block_42(ctx); if_block1.c(); transition_in(if_block1, 1); if_block1.m(div7, t6); @@ -41480,7 +41054,7 @@ function create_if_block7(ctx) { let if_block; let t; let current; - const if_block_creators = [create_if_block_13, create_if_block_22, create_if_block_3]; + const if_block_creators = [create_if_block_13, create_if_block_22, create_if_block_32]; const if_blocks = []; function select_block_type_1(ctx2, dirty) { if ( @@ -41672,7 +41246,7 @@ function create_if_block_5(ctx) { } }; } -function create_if_block_4(ctx) { +function create_if_block_42(ctx) { let div; let treecomponent; let div_transition; @@ -41762,7 +41336,7 @@ function create_if_block_4(ctx) { } }; } -function create_if_block_3(ctx) { +function create_if_block_32(ctx) { let pulledfilecomponent; let current; pulledfilecomponent = new pulledFileComponent_default({ @@ -42015,7 +41589,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", @@ -42033,7 +41607,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*/ @@ -42181,15 +41755,15 @@ var TreeComponent = class extends SvelteComponent { fileType: 3, topLevel: 4 }, - add_css7 + add_css6 ); } }; 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}`); +function add_css7(target) { + append_styles(target, "svelte-11adhly", `.commit-msg-input.svelte-11adhly.svelte-11adhly{width:100%;overflow:hidden;resize:none;padding:7px 5px;background-color:var(--background-modifier-form-field)}.git-commit-msg.svelte-11adhly.svelte-11adhly{position:relative;padding:0;width:calc(100% - var(--size-4-8));margin:4px auto}main.svelte-11adhly .git-tools .files-count.svelte-11adhly{padding-left:var(--size-2-1);width:11px;display:flex;align-items:center;justify-content:center}.nav-folder-title.svelte-11adhly.svelte-11adhly{align-items:center}.git-commit-msg-clear-button.svelte-11adhly.svelte-11adhly{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-11adhly.svelte-11adhly:after{content:"";height:var(--search-clear-button-size);width:var(--search-clear-button-size);display:block;background-color:currentColor;mask-image:url("data:image/svg+xml,");mask-repeat:no-repeat;-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(); @@ -42214,7 +41788,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-11adhly"); attr(div, "aria-label", div_aria_label_value = "Clear"); }, m(target, anchor) { @@ -42289,7 +41863,7 @@ function create_if_block8(ctx) { ); let if_block1 = ( /*changesOpen*/ - ctx[12] && create_if_block_42(ctx) + ctx[12] && create_if_block_43(ctx) ); let if_block2 = ( /*lastPulledFiles*/ @@ -42343,18 +41917,22 @@ function create_if_block8(ctx) { if (if_block2) if_block2.c(); attr(div0, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class(div0, "is-collapsed", !/*stagedOpen*/ + ctx[13]); attr(div1, "class", "tree-item-inner nav-folder-title-content"); attr(div2, "data-icon", "minus"); 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-11adhly"); 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-11adhly"); attr(div7, "class", "staged tree-item nav-folder"); toggle_class(div7, "is-collapsed", !/*stagedOpen*/ ctx[13]); attr(div8, "class", "tree-item-icon nav-folder-collapse-indicator collapse-icon"); + toggle_class(div8, "is-collapsed", !/*changesOpen*/ + ctx[12]); attr(div9, "class", "tree-item-inner nav-folder-title-content"); attr(div10, "data-icon", "undo"); attr(div10, "aria-label", "Discard"); @@ -42363,10 +41941,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-11adhly"); 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-11adhly"); + 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"); @@ -42445,6 +42023,11 @@ function create_if_block8(ctx) { } }, p(ctx2, dirty) { + if (!current || dirty[0] & /*stagedOpen*/ + 8192) { + toggle_class(div0, "is-collapsed", !/*stagedOpen*/ + ctx2[13]); + } if ((!current || dirty[0] & /*status*/ 64) && t4_value !== (t4_value = /*status*/ ctx2[6].staged.length + "")) @@ -42477,6 +42060,11 @@ function create_if_block8(ctx) { toggle_class(div7, "is-collapsed", !/*stagedOpen*/ ctx2[13]); } + if (!current || dirty[0] & /*changesOpen*/ + 4096) { + toggle_class(div8, "is-collapsed", !/*changesOpen*/ + ctx2[12]); + } if ((!current || dirty[0] & /*status*/ 64) && t12_value !== (t12_value = /*status*/ ctx2[6].changed.length + "")) @@ -42492,7 +42080,7 @@ function create_if_block8(ctx) { transition_in(if_block1, 1); } } else { - if_block1 = create_if_block_42(ctx2); + if_block1 = create_if_block_43(ctx2); if_block1.c(); transition_in(if_block1, 1); if_block1.m(div16, null); @@ -42847,7 +42435,7 @@ function create_each_block_2(ctx) { } }; } -function create_if_block_42(ctx) { +function create_if_block_43(ctx) { let div; let current_block_type_index; let if_block; @@ -43170,7 +42758,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-11adhly"); attr(div3, "class", "pulled nav-folder"); toggle_class(div3, "is-collapsed", !/*lastPulledFilesOpen*/ ctx[14]); @@ -43259,7 +42847,7 @@ function create_if_block_23(ctx) { let if_block; let div_transition; let current; - const if_block_creators = [create_if_block_32, create_else_block4]; + const if_block_creators = [create_if_block_33, create_else_block4]; const if_blocks = []; function select_block_type_2(ctx2, dirty) { if ( @@ -43418,7 +43006,7 @@ function create_else_block4(ctx) { } }; } -function create_if_block_32(ctx) { +function create_if_block_33(ctx) { let treecomponent; let current; treecomponent = new treeComponent_default({ @@ -43554,6 +43142,7 @@ function create_fragment9(ctx) { let t8; let t9; let div11; + let main_data_type_value; let current; let mounted; let dispose; @@ -43643,13 +43232,14 @@ function create_fragment9(ctx) { /*rows*/ ctx[15] ); - attr(textarea, "class", "commit-msg-input svelte-48bivb"); + attr(textarea, "class", "commit-msg-input svelte-11adhly"); attr(textarea, "spellcheck", "true"); attr(textarea, "placeholder", "Commit Message"); - attr(div10, "class", "git-commit-msg svelte-48bivb"); + attr(div10, "class", "git-commit-msg svelte-11adhly"); 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-11adhly"); }, m(target, anchor) { insert(target, main, anchor); @@ -43872,8 +43462,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_obsidian29.setIcon)(btn, btn.getAttr("data-icon"))); + (0, import_obsidian29.setIcon)(layoutBtn, showTree ? "list" : "folder"); }, 0 ); @@ -43889,7 +43479,7 @@ function instance9($$self, $$props, $$invalidate) { plugin.setState(0 /* idle */); return false; } - plugin.promiseQueue.addTask(() => plugin.gitManager.commit(commitMessage).then(() => { + plugin.promiseQueue.addTask(() => plugin.gitManager.commit({ message: commitMessage }).then(() => { if (commitMessage !== plugin.settings.commitMessage) { $$invalidate(2, commitMessage = ""); } @@ -43916,6 +43506,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_obsidian29.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); @@ -43975,7 +43580,7 @@ function instance9($$self, $$props, $$invalidate) { plugin.promiseQueue.addTask(() => plugin.pullChangesFromRemote().finally(triggerRefresh2)); } function discard() { - new DiscardModal(view.app, false, plugin.gitManager.getVaultPath("/")).myOpen().then((shouldDiscard) => { + new DiscardModal(view.app, false, plugin.gitManager.getRelativeVaultPath("/")).myOpen().then((shouldDiscard) => { if (shouldDiscard === true) { plugin.promiseQueue.addTask(() => plugin.gitManager.discardAll({ status: plugin.cachedStatus }).finally(() => { dispatchEvent(new CustomEvent("git-refresh")); @@ -44068,7 +43673,7 @@ function instance9($$self, $$props, $$invalidate) { $: { if (layoutBtn) { layoutBtn.empty(); - (0, import_obsidian28.setIcon)(layoutBtn, showTree ? "list" : "folder", 16); + (0, import_obsidian29.setIcon)(layoutBtn, showTree ? "list" : "folder"); } } } @@ -44123,13 +43728,13 @@ function instance9($$self, $$props, $$invalidate) { var SourceControl = class extends SvelteComponent { constructor(options) { super(); - init2(this, options, instance9, create_fragment9, safe_not_equal, { plugin: 0, view: 1 }, add_css8, [-1, -1]); + init2(this, options, instance9, create_fragment9, safe_not_equal, { plugin: 0, view: 1 }, add_css7, [-1, -1]); } }; var sourceControl_default = SourceControl; // src/ui/sourceControl/sourceControl.ts -var GitView = class extends import_obsidian29.ItemView { +var GitView = class extends import_obsidian30.ItemView { constructor(leaf, plugin) { super(leaf); this.plugin = plugin; @@ -44185,7 +43790,7 @@ var BranchStatusBar = class { }; // src/main.ts -var ObsidianGit = class extends import_obsidian30.Plugin { +var ObsidianGit = class extends import_obsidian31.Plugin { constructor() { super(...arguments); this.gitReady = false; @@ -44260,7 +43865,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { id: "edit-gitignore", name: "Edit .gitignore", callback: async () => { - const path2 = this.gitManager.getVaultPath(".gitignore"); + const path2 = this.gitManager.getRelativeVaultPath(".gitignore"); if (!await this.app.vault.adapter.exists(path2)) { this.app.vault.adapter.write(path2, ""); } @@ -44327,7 +43932,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { active: true, state: { staged: false, - file: this.gitManager.asRepositoryRelativePath( + file: this.gitManager.getRelativeRepoPath( file.path, true ) @@ -44357,6 +43962,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", @@ -44366,13 +43976,13 @@ var ObsidianGit = class extends import_obsidian30.Plugin { id: "add-to-gitignore", name: "Add file to gitignore", checkCallback: (checking) => { - const file = app.workspace.getActiveFile(); + const file = this.app.workspace.getActiveFile(); if (checking) { return file !== null; } else { - app.vault.adapter.append( - this.gitManager.getVaultPath(".gitignore"), - "\n" + this.gitManager.asRepositoryRelativePath( + this.app.vault.adapter.append( + this.gitManager.getRelativeVaultPath(".gitignore"), + "\n" + this.gitManager.getRelativeRepoPath( file.path, true ) @@ -44428,6 +44038,20 @@ var ObsidianGit = class extends import_obsidian30.Plugin { }) ) }); + if (import_obsidian31.Platform.isDesktopApp) { + this.addCommand({ + id: "commit-amend-staged-specified-message", + name: "Commit Amend", + callback: () => this.promiseQueue.addTask( + () => this.commit({ + fromAutoBackup: false, + requestCustomMessage: true, + onlyStaged: true, + amend: true + }) + ) + }); + } this.addCommand({ id: "commit-staged-specified-message", name: "Commit staged with specific message", @@ -44478,6 +44102,11 @@ var ObsidianGit = class extends import_obsidian30.Plugin { name: "Remove remote", callback: async () => this.removeRemote() }); + this.addCommand({ + id: "set-upstream-branch", + name: "Set upstream branch", + callback: async () => this.setUpsreamBranch() + }); this.addCommand({ id: "delete-repo", name: "CAUTION: Delete repository", @@ -44497,14 +44126,14 @@ var ObsidianGit = class extends import_obsidian30.Plugin { `${this.settings.basePath}/.git`, true ); - new import_obsidian30.Notice( + new import_obsidian31.Notice( "Successfully deleted repository. Reloading plugin..." ); this.unloadPlugin(); this.init(); } } else { - new import_obsidian30.Notice("No repository found"); + new import_obsidian31.Notice("No repository found"); } } }); @@ -44525,12 +44154,13 @@ var ObsidianGit = class extends import_obsidian30.Plugin { if (!await this.isAllInitialized()) return; const status2 = await this.gitManager.status(); + console.log(status2); this.setState(0 /* idle */); if (status2.changed.length + status2.staged.length > 500) { this.displayError("Too many changes to display"); return; } - new ChangedFilesModal(this, status2.changed).open(); + new ChangedFilesModal(this, status2.all).open(); } }); this.addCommand({ @@ -44596,7 +44226,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { }, 1e3) ); } - if (import_obsidian30.Platform.isDesktop && this.settings.showBranchStatusBar) { + if (import_obsidian31.Platform.isDesktop && this.settings.showBranchStatusBar) { const branchStatusBarEl = this.addStatusBarItem(); this.branchBar = new BranchStatusBar(branchStatusBarEl, this); this.registerInterval( @@ -44611,7 +44241,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { setRefreshDebouncer() { var _a2; (_a2 = this.debRefresh) == null ? void 0 : _a2.cancel(); - this.debRefresh = (0, import_obsidian30.debounce)( + this.debRefresh = (0, import_obsidian31.debounce)( () => { if (this.settings.refreshSourceControl) { this.refresh(); @@ -44623,17 +44253,17 @@ var ObsidianGit = class extends import_obsidian30.Plugin { } async showNotices() { const length = 1e4; - if (this.manifest.id === "obsidian-git" && import_obsidian30.Platform.isDesktopApp && !this.settings.showedMobileNotice) { - new import_obsidian30.Notice( - "Obsidian Git is now available on mobile! Please read the plugin's README for more information.", + if (this.manifest.id === "obsidian-git" && import_obsidian31.Platform.isDesktopApp && !this.settings.showedMobileNotice) { + new import_obsidian31.Notice( + "Git is now available on mobile! Please read the plugin's README for more information.", length ); this.settings.showedMobileNotice = true; await this.saveSettings(); } if (this.manifest.id === "obsidian-git-isomorphic") { - new import_obsidian30.Notice( - "Obsidian Git Mobile is now deprecated. Please uninstall it and install Obsidian Git instead.", + new import_obsidian31.Notice( + "Git Mobile is now deprecated. Please uninstall it and install Git instead.", length ); } @@ -44652,11 +44282,11 @@ var ObsidianGit = class extends import_obsidian30.Plugin { menu.addItem((item) => { item.setTitle(`Git: Stage`).setIcon("plus-circle").setSection("action").onClick((_) => { this.promiseQueue.addTask(async () => { - if (file instanceof import_obsidian30.TFile) { + if (file instanceof import_obsidian31.TFile) { await this.gitManager.stage(file.path, true); } else { await this.gitManager.stageAll({ - dir: this.gitManager.asRepositoryRelativePath( + dir: this.gitManager.getRelativeRepoPath( file.path, true ) @@ -44669,11 +44299,11 @@ var ObsidianGit = class extends import_obsidian30.Plugin { menu.addItem((item) => { item.setTitle(`Git: Unstage`).setIcon("minus-circle").setSection("action").onClick((_) => { this.promiseQueue.addTask(async () => { - if (file instanceof import_obsidian30.TFile) { + if (file instanceof import_obsidian31.TFile) { await this.gitManager.unstage(file.path, true); } else { await this.gitManager.unstageAll({ - dir: this.gitManager.asRepositoryRelativePath( + dir: this.gitManager.getRelativeRepoPath( file.path, true ) @@ -44717,6 +44347,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); @@ -44760,7 +44391,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { }; } get useSimpleGit() { - return import_obsidian30.Platform.isDesktopApp; + return import_obsidian31.Platform.isDesktopApp; } async init() { var _a2; @@ -44778,7 +44409,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { this.displayError("Cannot run git command"); break; case "missing-repo": - new import_obsidian30.Notice( + new import_obsidian31.Notice( "Can't find a valid git repository. Please create one via the given command or clone an existing repo.", 1e4 ); @@ -44786,6 +44417,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(); }); @@ -44824,7 +44459,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { } async createNewRepo() { await this.gitManager.init(); - new import_obsidian30.Notice("Initialized new repo"); + new import_obsidian31.Notice("Initialized new repo"); await this.init(); } async cloneNewRepo() { @@ -44841,7 +44476,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { if (dir === confirmOption) { dir = "."; } - dir = (0, import_obsidian30.normalizePath)(dir); + dir = (0, import_obsidian31.normalizePath)(dir); if (dir === "/") { dir = "."; } @@ -44853,7 +44488,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { }); const containsConflictDir = await modal2.open(); if (containsConflictDir === void 0) { - new import_obsidian30.Notice("Aborted clone"); + new import_obsidian31.Notice("Aborted clone"); return; } else if (containsConflictDir === "YES") { const confirmOption2 = "DELETE ALL YOUR LOCAL CONFIG AND PLUGINS"; @@ -44869,7 +44504,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { true ); } else { - new import_obsidian30.Notice("Aborted clone"); + new import_obsidian31.Notice("Aborted clone"); return; } } @@ -44882,11 +44517,11 @@ var ObsidianGit = class extends import_obsidian30.Plugin { if (depth !== "") { depthInt = parseInt(depth); if (isNaN(depthInt)) { - new import_obsidian30.Notice("Invalid depth. Aborting clone."); + new import_obsidian31.Notice("Invalid depth. Aborting clone."); return; } } - new import_obsidian30.Notice(`Cloning new repo into "${dir}"`); + new import_obsidian31.Notice(`Cloning new repo into "${dir}"`); const oldBase = this.settings.basePath; const customDir = dir && dir !== "."; if (customDir) { @@ -44899,8 +44534,8 @@ var ObsidianGit = class extends import_obsidian30.Plugin { this.saveSettings(); throw error; } - new import_obsidian30.Notice("Cloned new repo."); - new import_obsidian30.Notice("Please restart Obsidian"); + new import_obsidian31.Notice("Cloned new repo."); + new import_obsidian31.Notice("Please restart Obsidian"); if (customDir) { this.saveSettings(); } @@ -44923,6 +44558,9 @@ var ObsidianGit = class extends import_obsidian30.Plugin { return; const filesUpdated = await this.pull(); this.setUpAutoBackup(); + if (filesUpdated === false) { + return; + } if (!filesUpdated) { this.displayMessage("Everything is up-to-date"); } @@ -44967,11 +44605,12 @@ var ObsidianGit = class extends import_obsidian30.Plugin { fromAutoBackup, requestCustomMessage = false, onlyStaged = false, - commitMessage + commitMessage, + amend = false }) { if (!await this.isAllInitialized()) return false; - let hadConflict = this.localStorage.getConflict() === "true"; + let hadConflict = this.localStorage.getConflict(); let changedFiles; let status2; let unstagedFiles; @@ -44979,7 +44618,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { this.mayDeleteConflictFile(); status2 = await this.updateCachedStatus(); if (status2.conflicted.length == 0) { - this.localStorage.setConflict("false"); + this.localStorage.setConflict(false); hadConflict = false; } if (fromAutoBackup && status2.conflicted.length > 0) { @@ -45006,7 +44645,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { } else { unstagedFiles = await this.gitManager.getUnstagedFiles(); changedFiles = unstagedFiles.map(({ filepath }) => ({ - vault_path: this.gitManager.getVaultPath(filepath) + vault_path: this.gitManager.getRelativeVaultPath(filepath) })); } } @@ -45018,7 +44657,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { let cmtMessage = commitMessage != null ? commitMessage : commitMessage = fromAutoBackup ? this.settings.autoCommitMessage : this.settings.commitMessage; if (fromAutoBackup && this.settings.customMessageOnAutoBackup || requestCustomMessage) { if (!this.settings.disablePopups && fromAutoBackup) { - new import_obsidian30.Notice( + new import_obsidian31.Notice( "Auto backup: Please enter a custom commit message. Leave empty to abort" ); } @@ -45035,17 +44674,21 @@ var ObsidianGit = class extends import_obsidian30.Plugin { } let committedFiles; if (onlyStaged) { - committedFiles = await this.gitManager.commit(cmtMessage); + committedFiles = await this.gitManager.commit({ + message: cmtMessage, + amend + }); } else { committedFiles = await this.gitManager.commitAll({ message: cmtMessage, status: status2, - unstagedFiles + unstagedFiles, + amend }); } if (this.gitManager instanceof SimpleGit) { if ((await this.updateCachedStatus()).conflicted.length == 0) { - this.localStorage.setConflict("false"); + this.localStorage.setConflict(false); } } let roughly = false; @@ -45074,7 +44717,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { const file = this.app.vault.getAbstractFileByPath( f.vault_path ); - if (file instanceof import_obsidian30.TFile) { + if (file instanceof import_obsidian31.TFile) { return file.stat.size >= 1e8; } return false; @@ -45097,7 +44740,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { if (!await this.remotesAreSet()) { return false; } - const hadConflict = this.localStorage.getConflict() === "true"; + const hadConflict = this.localStorage.getConflict(); if (this.gitManager instanceof SimpleGit) await this.mayDeleteConflictFile(); let status2; @@ -45112,9 +44755,9 @@ var ObsidianGit = class extends import_obsidian30.Plugin { this.setState(6 /* conflicted */); return false; } - { - console.log("Pushing...."); - const pushedFiles = await this.gitManager.push(); + console.log("Pushing...."); + const pushedFiles = await this.gitManager.push(); + if (pushedFiles !== void 0) { console.log("Pushed!", pushedFiles); if (pushedFiles > 0) { this.displayMessage( @@ -45123,13 +44766,16 @@ var ObsidianGit = class extends import_obsidian30.Plugin { } else { this.displayMessage(`No changes to push`); } - this.offlineMode = false; - this.setState(0 /* idle */); - return true; } + this.offlineMode = false; + this.setState(0 /* idle */); + dispatchEvent(new CustomEvent("git-refresh")); + return true; } - /// Used for internals - /// Returns whether the pull added a commit or not. + /** Used for internals + Returns whether the pull added a commit or not. + + See {@link pullChangesFromRemote} for the command version. */ async pull() { if (!await this.remotesAreSet()) { return false; @@ -45142,7 +44788,16 @@ var ObsidianGit = class extends import_obsidian30.Plugin { ); this.lastPulledFiles = pulledFiles; } - return pulledFiles.length != 0; + return pulledFiles.length; + } + 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( @@ -45150,7 +44805,8 @@ var ObsidianGit = class extends import_obsidian30.Plugin { ); if (file) { this.app.workspace.iterateAllLeaves((leaf) => { - if (leaf.view instanceof import_obsidian30.MarkdownView && leaf.view.file.path == file.path) { + var _a2; + if (leaf.view instanceof import_obsidian31.MarkdownView && ((_a2 = leaf.view.file) == null ? void 0 : _a2.path) == file.path) { leaf.detach(); } }); @@ -45249,21 +44905,35 @@ var ObsidianGit = class extends import_obsidian30.Plugin { return branch2; } } + // Ensures that the upstream branch is set. + // If not, it will prompt the user to set it. + // + // An exception is when the user has submodules enabled. + // In this case, the upstream branch is not required, + // to allow pulling/pushing only the submodules and not the outer repo. async remotesAreSet() { + if (this.settings.updateSubmodules) { + return true; + } if (!(await this.gitManager.branchInfo()).tracking) { - new import_obsidian30.Notice("No upstream branch is set. Please select one."); - const remoteBranch = await this.selectRemoteBranch(); - if (remoteBranch == void 0) { - this.displayError("Aborted. No upstream-branch is set!", 1e4); - this.setState(0 /* idle */); - return false; - } else { - await this.gitManager.updateUpstreamBranch(remoteBranch); - return true; - } + new import_obsidian31.Notice("No upstream branch is set. Please select one."); + return await this.setUpsreamBranch(); } return true; } + async setUpsreamBranch() { + const remoteBranch = await this.selectRemoteBranch(); + if (remoteBranch == void 0) { + this.displayError("Aborted. No upstream-branch is set!", 1e4); + this.setState(0 /* idle */); + return false; + } else { + await this.gitManager.updateUpstreamBranch(remoteBranch); + this.displayMessage(`Set upstream branch to ${remoteBranch}`); + this.setState(0 /* idle */); + return true; + } + } async setUpAutoBackup() { if (this.settings.setLastSaveToLastCommit) { this.clearAutoBackup(); @@ -45273,39 +44943,39 @@ var ObsidianGit = class extends import_obsidian30.Plugin { } } if (!this.timeoutIDBackup && !this.onFileModifyEventRef) { - const lastAutos = await this.loadLastAuto(); + const lastAutos = this.loadLastAuto(); if (this.settings.autoSaveInterval > 0) { const now2 = /* @__PURE__ */ new Date(); - const diff2 = this.settings.autoSaveInterval - Math.round( + const diff3 = this.settings.autoSaveInterval - Math.round( (now2.getTime() - lastAutos.backup.getTime()) / 1e3 / 60 ); - this.startAutoBackup(diff2 <= 0 ? 0 : diff2); + this.startAutoBackup(diff3 <= 0 ? 0 : diff3); } } } async setUpAutos() { this.setUpAutoBackup(); - const lastAutos = await this.loadLastAuto(); + const lastAutos = this.loadLastAuto(); if (this.settings.differentIntervalCommitAndPush && this.settings.autoPushInterval > 0) { const now2 = /* @__PURE__ */ new Date(); - const diff2 = this.settings.autoPushInterval - Math.round( + const diff3 = this.settings.autoPushInterval - Math.round( (now2.getTime() - lastAutos.push.getTime()) / 1e3 / 60 ); - this.startAutoPush(diff2 <= 0 ? 0 : diff2); + this.startAutoPush(diff3 <= 0 ? 0 : diff3); } if (this.settings.autoPullInterval > 0) { const now2 = /* @__PURE__ */ new Date(); - const diff2 = this.settings.autoPullInterval - Math.round( + const diff3 = this.settings.autoPullInterval - Math.round( (now2.getTime() - lastAutos.pull.getTime()) / 1e3 / 60 ); - this.startAutoPull(diff2 <= 0 ? 0 : diff2); + this.startAutoPull(diff3 <= 0 ? 0 : diff3); } } async discardAll() { await this.gitManager.discardAll({ status: this.cachedStatus }); - new import_obsidian30.Notice( + new import_obsidian31.Notice( "All local changes have been discarded. New files remain untouched." ); } @@ -45324,7 +44994,7 @@ var ObsidianGit = class extends import_obsidian30.Plugin { "modify", () => this.autoBackupDebouncer() ); - this.autoBackupDebouncer = (0, import_obsidian30.debounce)( + this.autoBackupDebouncer = (0, import_obsidian31.debounce)( () => this.doAutoBackup(), time, true @@ -45408,18 +45078,18 @@ var ObsidianGit = class extends import_obsidian30.Plugin { } async handleConflict(conflicted) { this.setState(6 /* conflicted */); - this.localStorage.setConflict("true"); + this.localStorage.setConflict(true); let lines; if (conflicted !== void 0) { lines = [ "# Conflicts", - "Please resolve them and commit them using the commands `Obsidian Git: Commit all changes` followed by `Obsidian Git: Push`", + "Please resolve them and commit them using the commands `Git: Commit all changes` followed by `Git: Push`", "(This file will automatically be deleted before commit)", "[[#Additional Instructions]] available below file list", "", ...conflicted.map((e) => { const file = this.app.vault.getAbstractFileByPath(e); - if (file instanceof import_obsidian30.TFile) { + if (file instanceof import_obsidian31.TFile) { const link = this.app.metadataCache.fileToLinktext( file, "/" @@ -45480,9 +45150,7 @@ I strongly recommend to use "Source mode" for viewing the conflicted files. For if (remoteName) { this.displayMessage("Fetching remote branches"); await this.gitManager.fetch(remoteName); - const branches = await this.gitManager.getRemoteBranches( - remoteName - ); + const branches = await this.gitManager.getRemoteBranches(remoteName); const branchModal = new GeneralModal({ options: branches, placeholder: "Select or create a new remote branch by typing its name and selecting it" @@ -45517,26 +45185,61 @@ 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; (_a2 = this.statusBar) == null ? void 0 : _a2.displayMessage(message.toLowerCase(), timeout); if (!this.settings.disablePopups) { - new import_obsidian30.Notice(message, 5 * 1e3); + if (!this.settings.disablePopupsForNoChanges || !message.startsWith("No changes")) { + new import_obsidian31.Notice(message, 5 * 1e3); + } } - console.log(`git obsidian message: ${message}`); + this.log(message); } displayError(message, timeout = 10 * 1e3) { var _a2; if (message instanceof Errors.UserCanceledError) { - new import_obsidian30.Notice("Aborted"); + new import_obsidian31.Notice("Aborted"); return; } message = message.toString(); - new import_obsidian30.Notice(message, timeout); + new import_obsidian31.Notice(message, timeout); console.log(`git obsidian error: ${message}`); (_a2 = this.statusBar) == null ? void 0 : _a2.displayMessage(message.toLowerCase(), timeout); } + log(message) { + console.log(`${this.manifest.id}: ` + message); + } }; /*! Bundled license information: diff --git a/.obsidian/plugins/obsidian-git/manifest.json b/.obsidian/plugins/obsidian-git/manifest.json index c9d8fc4..79dc19c 100644 --- a/.obsidian/plugins/obsidian-git/manifest.json +++ b/.obsidian/plugins/obsidian-git/manifest.json @@ -1,12 +1,9 @@ { "id": "obsidian-git", - "name": "Obsidian Git", - "description": "Backup your vault with git.", - "isDesktopOnly": true, + "name": "Git", + "description": "Backup your vault with Git.", + "isDesktopOnly": false, + "fundingUrl": "https://ko-fi.com/vinzent", "js": "main.js", -<<<<<<< HEAD - "version": "2.20.6" -======= - "version": "1.26.1" ->>>>>>> origin/master + "version": "2.24.1" } diff --git a/.obsidian/plugins/obsidian-git/styles.css b/.obsidian/plugins/obsidian-git/styles.css index 497ec20..226dbe9 100644 --- a/.obsidian/plugins/obsidian-git/styles.css +++ b/.obsidian/plugins/obsidian-git/styles.css @@ -8,15 +8,20 @@ } } -.workspace-leaf-content[data-type='git-view'] .view-content { +.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; } -.workspace-leaf-content[data-type='git-history-view'] .view-content { +.workspace-leaf-content[data-type="git-history-view"] .view-content { padding: 0; } -.loading>svg { +.loading > svg { animation: 2s linear infinite loading; transform-origin: 50% 50%; display: inline-block; @@ -46,21 +51,42 @@ .tooltip.mod-right { overflow-wrap: break-word; } - -.obsidian-git-shortcuts { - margin: 10px; -} - -.diff-err { - height: 100%; +.git-tools { + display: flex; + margin-left: auto; +} +.git-tools .type { + padding-left: var(--size-2-1); display: flex; - justify-content: center; - flex-direction: column; align-items: center; + justify-content: center; + width: 11px; } -.diff-err-sign { - font-size: 2em; +.git-tools .type[data-type="M"] { + color: orange; +} +.git-tools .type[data-type="D"] { + color: red; +} +.git-tools .buttons { + display: flex; +} +.git-tools .buttons > * { + padding: 0 0; + height: auto; +} + +.git-author { + color: var(--text-accent); +} + +.git-date { + color: var(--text-accent); +} + +.git-ref { + color: var(--text-accent); } .workspace-leaf-content[data-type="diff-view"] .d2h-d-none { @@ -212,20 +238,23 @@ white-space: pre; width: 100%; } + .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del, .theme-light - .workspace-leaf-content[data-type="diff-view"] - .d2h-code-side-line - del { + .workspace-leaf-content[data-type="diff-view"] + .d2h-code-side-line + del { background-color: #ffb6ba; } + .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del, .theme-dark - .workspace-leaf-content[data-type="diff-view"] - .d2h-code-side-line - del { + .workspace-leaf-content[data-type="diff-view"] + .d2h-code-side-line + del { background-color: #8d232881; } + .workspace-leaf-content[data-type="diff-view"] .d2h-code-line del, .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins, .workspace-leaf-content[data-type="diff-view"] .d2h-code-side-line del, @@ -236,22 +265,25 @@ text-decoration: none; vertical-align: middle; } + .theme-light .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins, .theme-light - .workspace-leaf-content[data-type="diff-view"] - .d2h-code-side-line - ins { + .workspace-leaf-content[data-type="diff-view"] + .d2h-code-side-line + ins { background-color: #97f295; text-align: left; } + .theme-dark .workspace-leaf-content[data-type="diff-view"] .d2h-code-line ins, .theme-dark - .workspace-leaf-content[data-type="diff-view"] - .d2h-code-side-line - ins { + .workspace-leaf-content[data-type="diff-view"] + .d2h-code-side-line + ins { background-color: #1d921996; text-align: left; } + .workspace-leaf-content[data-type="diff-view"] .d2h-code-line-prefix { word-wrap: normal; background: none; @@ -367,48 +399,58 @@ border-color: var(--background-modifier-border); color: var(--text-normal); } + .theme-light - .workspace-leaf-content[data-type="diff-view"] - .d2h-file-diff - .d2h-del.d2h-change { + .workspace-leaf-content[data-type="diff-view"] + .d2h-file-diff + .d2h-del.d2h-change { background-color: #fdf2d0; } + .theme-dark - .workspace-leaf-content[data-type="diff-view"] - .d2h-file-diff - .d2h-del.d2h-change { + .workspace-leaf-content[data-type="diff-view"] + .d2h-file-diff + .d2h-del.d2h-change { background-color: #55492480; } + .theme-light - .workspace-leaf-content[data-type="diff-view"] - .d2h-file-diff - .d2h-ins.d2h-change { + .workspace-leaf-content[data-type="diff-view"] + .d2h-file-diff + .d2h-ins.d2h-change { background-color: #ded; } + .theme-dark - .workspace-leaf-content[data-type="diff-view"] - .d2h-file-diff - .d2h-ins.d2h-change { + .workspace-leaf-content[data-type="diff-view"] + .d2h-file-diff + .d2h-ins.d2h-change { background-color: rgba(37, 78, 37, 0.418); } + .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper { margin-bottom: 10px; } + .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-wrapper a { color: #3572b0; text-decoration: none; } + .workspace-leaf-content[data-type="diff-view"] - .d2h-file-list-wrapper - a:visited { + .d2h-file-list-wrapper + a:visited { color: #3572b0; } + .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-header { text-align: left; } + .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-title { font-weight: 700; } + .workspace-leaf-content[data-type="diff-view"] .d2h-file-list-line { display: -webkit-box; display: -ms-flexbox; @@ -423,13 +465,13 @@ padding: 0; } -.workspace-leaf-content[data-type="diff-view"] .d2h-file-list>li { +.workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li { border-bottom: 1px solid var(--background-modifier-border); margin: 0; padding: 5px 10px; } -.workspace-leaf-content[data-type="diff-view"] .d2h-file-list>li:last-child { +.workspace-leaf-content[data-type="diff-view"] .d2h-file-list > li:last-child { border-bottom: none; } @@ -497,9 +539,10 @@ background-color: var(--background-secondary); } -.cm-gutterElement.obs-git-blame-gutter > div, .line-author-settings-preview { +.cm-gutterElement.obs-git-blame-gutter > div, +.line-author-settings-preview { /* delegate text color to settings */ - color: var(--obs-git-gutter-text); + color: var(--obs-git-gutter-text); font-family: monospace; height: 100%; /* ensure, that age-based background color occupies entire parent */ text-align: right; diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 1070a51..005a944 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -18,24 +18,12 @@ } }, { - "id": "9eb92d3d81ca81e4", + "id": "45882341e179f5f2", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "conflict-files-obsidian-git.md", - "mode": "source", - "source": false - } - } - }, - { - "id": "6431c3ab63928f12", - "type": "leaf", - "state": { - "type": "markdown", - "state": { - "file": "渲染/软渲染/冯 高光.md", + "file": "2024-04-10.md", "mode": "source", "source": false } @@ -87,6 +75,14 @@ "type": "starred", "state": {} } + }, + { + "id": "8c8dfe109a7f116f", + "type": "leaf", + "state": { + "type": "bookmarks", + "state": {} + } } ] } @@ -108,7 +104,7 @@ "state": { "type": "backlink", "state": { - "file": "conflict-files-obsidian-git.md", + "file": "2024-04-10.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -133,7 +129,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "conflict-files-obsidian-git.md", + "file": "2024-04-10.md", "linksCollapsed": false, "unlinkedCollapsed": true } @@ -156,7 +152,7 @@ "state": { "type": "outline", "state": { - "file": "conflict-files-obsidian-git.md" + "file": "2024-04-10.md" } } }, @@ -194,16 +190,18 @@ "command-palette:打开命令面板": false } }, - "active": "9eb92d3d81ca81e4", + "active": "45882341e179f5f2", "lastOpenFiles": [ - "Batch & DrawCall.md", + "程序集.md", + "2024-04-10.md", + "2024-03-19.md", "网络同步.md", + "Batch & DrawCall.md", "conflict-files-obsidian-git.md", "渲染/软渲染/冯 高光.md", "渲染/软渲染", "渲染/软渲染/还未实现.md", "待办事项/TODO.md", - "程序集.md", "Mesh/Mesh Renderer 与 Skinned Mesh Renderer.md", "Mesh/Mesh Baker.md", "Mesh/图片/Pasted image 20221021171104.png", @@ -226,12 +224,10 @@ "Issue/超出ScrollView的特效渲染层级不对.md", "FairyGui/工作流.md", "FairyGui", - "并行计算/GPU/Compute Shader.md", "未命名.canvas", "未命名 1.canvas", "log_learn", "渲染", - "并行计算/GPU/SIMT.md", "渲染/GPU", "并行计算/GPU", "并行计算/GPU.canvas", diff --git a/2024-04-10.md b/2024-04-10.md new file mode 100644 index 0000000..092d33e --- /dev/null +++ b/2024-04-10.md @@ -0,0 +1 @@ +[原神渲染解析:分割视锥体以优化体积雾 - 知乎 (zhihu.com)](https://zhuanlan.zhihu.com/p/687122372) \ No newline at end of file