flatboard 2026-8-23:20:42:59
This commit is contained in:
1 parent
b1c0affa60
commit
ba9dd7935d
679 files changed
+158609
No files matched your search
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"alwaysUpdateLinks": true
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"cssTheme": "Vauxhall",
|
||||
"theme": "obsidian",
|
||||
"baseFontSize": 14
|
||||
}
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
[
|
||||
"obsidian-style-settings",
|
||||
"obsidian-5e-statblocks",
|
||||
"obsidian-dice-roller",
|
||||
"obsidian-text-format",
|
||||
"draw-in-canvas",
|
||||
"obsidian-livesync",
|
||||
"github-sync"
|
||||
]
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"file-explorer": true,
|
||||
"global-search": true,
|
||||
"switcher": true,
|
||||
"graph": true,
|
||||
"backlink": true,
|
||||
"canvas": true,
|
||||
"outgoing-link": true,
|
||||
"tag-pane": true,
|
||||
"footnotes": false,
|
||||
"properties": true,
|
||||
"page-preview": true,
|
||||
"daily-notes": true,
|
||||
"templates": true,
|
||||
"note-composer": true,
|
||||
"command-palette": true,
|
||||
"slash-command": false,
|
||||
"editor-status": true,
|
||||
"bookmarks": true,
|
||||
"markdown-importer": false,
|
||||
"zk-prefixer": false,
|
||||
"random-note": false,
|
||||
"outline": true,
|
||||
"word-count": true,
|
||||
"slides": false,
|
||||
"audio-recorder": false,
|
||||
"workspaces": false,
|
||||
"file-recovery": true,
|
||||
"publish": false,
|
||||
"sync": true,
|
||||
"bases": true,
|
||||
"webviewer": false
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"collapse-filter": true,
|
||||
"search": "",
|
||||
"showTags": false,
|
||||
"showAttachments": false,
|
||||
"hideUnresolved": false,
|
||||
"showOrphans": true,
|
||||
"collapse-color-groups": true,
|
||||
"colorGroups": [],
|
||||
"collapse-display": true,
|
||||
"showArrow": false,
|
||||
"textFadeMultiplier": 0,
|
||||
"nodeSizeMultiplier": 1,
|
||||
"lineSizeMultiplier": 1,
|
||||
"collapse-forces": true,
|
||||
"centerStrength": 0.518713248970312,
|
||||
"repelStrength": 10,
|
||||
"linkStrength": 1,
|
||||
"linkDistance": 250,
|
||||
"scale": 2.3703703703703702,
|
||||
"close": false
|
||||
}
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"editor:add-cursor-above": [
|
||||
{
|
||||
"modifiers": [
|
||||
"Alt"
|
||||
],
|
||||
"key": "ArrowUp"
|
||||
}
|
||||
],
|
||||
"editor:add-cursor-below": [
|
||||
{
|
||||
"modifiers": [
|
||||
"Alt"
|
||||
],
|
||||
"key": "ArrowDown"
|
||||
}
|
||||
]
|
||||
}
|
||||
+4508
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "advanced-cursors",
|
||||
"name": "Advanced Cursors",
|
||||
"version": "0.5.1",
|
||||
"minAppVersion": "0.12.18",
|
||||
"description": "Use multiple cursors even more powerfully.",
|
||||
"author": "SkepticMystic",
|
||||
"authorUrl": "https://github.com/SkepticMystic/advanced-cursors",
|
||||
"isDesktopOnly": true
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
/* Sets all the text color to red! */
|
||||
.savedQ {
|
||||
padding: 5px 5px;
|
||||
}
|
||||
|
||||
.savedQ-name {
|
||||
background-color: var(--background-secondary-alt);
|
||||
padding: 2px 4px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.savedQ-view-q {
|
||||
padding: 2px 4px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.editQButton,
|
||||
.deleteQButton {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.savedQ-name:hover,
|
||||
.editQButton:hover,
|
||||
.deleteQButton:hover,
|
||||
.savedQ-query:hover,
|
||||
.AC-submit-button:hover,
|
||||
.savedQ-view-q:hover {
|
||||
background-color: var(--interactive-accent) !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.AC-submit-button:focus {
|
||||
background-color: var(--interactive-accent) !important;
|
||||
}
|
||||
|
||||
.savedQ-query {
|
||||
background-color: var(--background-primary-alt);
|
||||
padding: 2px 4px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.AC-flashNewSel {
|
||||
animation: flashNewSel 1.5s 1;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
@keyframes flashNewSel {
|
||||
0% {
|
||||
background-color: transparent;
|
||||
}
|
||||
10% {
|
||||
background-color: var(--text-highlight-bg);
|
||||
}
|
||||
80% {
|
||||
background-color: var(--text-highlight-bg);
|
||||
}
|
||||
100% {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"strokeColor": "#0a9339",
|
||||
"strokeWidth": 10,
|
||||
"strokeHardness": 100,
|
||||
"strokeOpacity": 100,
|
||||
"beautifulStrokes": false,
|
||||
"usePenCursorFallback": true,
|
||||
"allowTinyCanvasElements": false,
|
||||
"strokeThinning": 0.5,
|
||||
"strokeStreamline": 0.5,
|
||||
"strokeSmoothing": 0.5,
|
||||
"strokeTaperStart": 8,
|
||||
"strokeTaperEnd": 8
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||||
if you want to view the source, please visit the github repository of this plugin
|
||||
*/
|
||||
|
||||
var Pr=Object.defineProperty;var sa=Object.getOwnPropertyDescriptor;var aa=Object.getOwnPropertyNames;var la=Object.prototype.hasOwnProperty;var ca=(r,e)=>{for(var t in e)Pr(r,t,{get:e[t],enumerable:!0})},da=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of aa(e))!la.call(r,o)&&o!==t&&Pr(r,o,{get:()=>e[o],enumerable:!(n=sa(e,o))||n.enumerable});return r};var ua=r=>da(Pr({},"__esModule",{value:!0}),r);var _u={};ca(_u,{default:()=>mr});module.exports=ua(_u);var Y=require("obsidian");var ro=require("obsidian");function no(r){let e=r.workspace.getMostRecentLeaf();if(!e)return null;let t=e.view;if(t.getViewType()!=="canvas")return null;let n=ha(r,t);return!n||n.extension!=="canvas"?null:{leaf:e,view:t,file:n,containerEl:t.containerEl}}function ha(r,e){let t=e.file;if(t instanceof ro.TFile)return t;let n=r.workspace.getActiveFile();return(n==null?void 0:n.extension)==="canvas"?n:null}var I=require("obsidian");var X=require("obsidian");var H={strokeThinning:{label:"Thinning",min:-.99,max:.99,step:.01,defaultValue:.5,ariaLabel:"Stroke thinning"},strokeStreamline:{label:"Streamline",min:.01,max:.99,step:.01,defaultValue:.5,ariaLabel:"Stroke streamline"},strokeSmoothing:{label:"Smoothing",min:.01,max:.99,step:.01,defaultValue:.5,ariaLabel:"Stroke smoothing"},strokeTaperStart:{label:"Taper start",min:0,max:100,step:1,defaultValue:8,ariaLabel:"Stroke taper start"},strokeTaperEnd:{label:"Taper end",min:0,max:100,step:1,defaultValue:8,ariaLabel:"Stroke taper end"}},Ce={strokeColor:"#ff5a5f",strokeWidth:4,strokeHardness:100,strokeOpacity:100,beautifulStrokes:!1,usePenCursorFallback:!0,allowTinyCanvasElements:!1,strokeThinning:.5,strokeStreamline:.5,strokeSmoothing:.5,strokeTaperStart:8,strokeTaperEnd:8};function y(r){let e=typeof r=="number"?r:Number(r);if(!Number.isFinite(e))return 4;let t=Math.round(e/1)*1;return Math.min(32,Math.max(1,t))}function x(r){let e=typeof r=="number"?r:Number(r);if(!Number.isFinite(e))return 100;let t=Math.round(e/1)*1;return Math.min(100,Math.max(0,t))}function f(r){let e=typeof r=="number"?r:Number(r);if(!Number.isFinite(e))return 100;let t=Math.round(e/1)*1;return Math.min(100,Math.max(1,t))}function k(r,e){let t=H[r],n=typeof e=="number"?e:Number(e);if(!Number.isFinite(n))return t.defaultValue;let o=Math.round(n/t.step)*t.step,i=Math.min(t.max,Math.max(t.min,o));return pa(i,t.step)}function oo(r){var t;let e=r!=null?r:{};return{...Ce,...e,strokeColor:((t=e.strokeColor)==null?void 0:t.trim())||Ce.strokeColor,strokeWidth:y(e.strokeWidth),strokeHardness:x(e.strokeHardness),strokeOpacity:f(e.strokeOpacity),beautifulStrokes:e.beautifulStrokes===!0,usePenCursorFallback:e.usePenCursorFallback!==!1,allowTinyCanvasElements:e.allowTinyCanvasElements===!0,strokeThinning:k("strokeThinning",e.strokeThinning),strokeStreamline:k("strokeStreamline",e.strokeStreamline),strokeSmoothing:k("strokeSmoothing",e.strokeSmoothing),strokeTaperStart:k("strokeTaperStart",e.strokeTaperStart),strokeTaperEnd:k("strokeTaperEnd",e.strokeTaperEnd)}}function pa(r,e){var n,o;let t=(o=(n=e.toString().split(".")[1])==null?void 0:n.length)!=null?o:0;return Number(r.toFixed(t))}var kt=class extends X.PluginSettingTab{constructor(e,t){super(e,t),this.plugin=t}display(){let{containerEl:e}=this;e.empty();let t=activeDocument.createElement("h2");t.textContent="Draw in canvas",e.appendChild(t),new X.Setting(e).setName("Stroke color").setDesc("Any CSS color, such as #ff5a5f, red, or rgb(255, 90, 95).").addText(o=>o.setPlaceholder(Ce.strokeColor).setValue(this.plugin.settings.strokeColor).onChange(async i=>{this.plugin.settings.strokeColor=i.trim()||Ce.strokeColor,this.plugin.refreshActiveLayerSettings(),await this.plugin.saveSettings()})),new X.Setting(e).setName("Stroke width").setDesc("Screen-pixel width for new freehand strokes at the current canvas zoom.").addSlider(o=>o.setLimits(1,32,1).setValue(y(this.plugin.settings.strokeWidth)).setDynamicTooltip().onChange(i=>{this.plugin.setStrokeWidth(i)})),new X.Setting(e).setName("Stroke hardness").setDesc("Softens new stroke edges like brush hardness.").addSlider(o=>o.setLimits(0,100,1).setValue(x(this.plugin.settings.strokeHardness)).setDynamicTooltip().onChange(i=>{this.plugin.setStrokeHardness(i)})),new X.Setting(e).setName("Stroke opacity").setDesc("Controls how transparent new strokes are, like brush opacity.").addSlider(o=>o.setLimits(1,100,1).setValue(f(this.plugin.settings.strokeOpacity)).setDynamicTooltip().onChange(i=>{this.plugin.setStrokeOpacity(i)})),new X.Setting(e).setName("Handwritten strokes").setDesc("Smooth strokes with subtle tapered starts and ends. Pen strokes use real stylus pressure when available.").addToggle(o=>o.setValue(this.plugin.settings.beautifulStrokes).onChange(i=>{this.plugin.setBeautifulStrokes(i)})),new X.Setting(e).setName("Stylus pointer fallback").setDesc("Show a plugin pointer while drawing with a stylus when the native pointer is hidden or unreliable.").addToggle(o=>o.setValue(this.plugin.settings.usePenCursorFallback).onLine truncated
|
||||
`)}function Lt(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)}function vo(r){return r!==null}function mo(r){return!Number.isFinite(r)||r<=0?1:Math.min(1,r)}function go(r){return Number.isFinite(r)?Math.min(12,Math.max(-4,r)):r>0?12:-4}function fo(r){return Number.isFinite(r)?Math.min(4096,Math.max(.0625,r)):r>0?4096:.0625}var Hr=20,wa=2**1;function yo(r){if(!Number.isFinite(r))return Hr;if(r>1){let e=Hr/2**(r-1);return Number.isFinite(e)&&e>0?e:Number.EPSILON}return Pa(r)}function Eo(r,e){return Co(r)?Co(e)?e<=wa?Math.ceil(r/e):r/e:Math.ceil(r):0}function Pa(r){return r<-3.3?160:r<-2.16?80:r<-.91?40:Hr}function Co(r){return typeof r=="number"&&Number.isFinite(r)&&r>0}var ko=10,bo=2**1,Be=new WeakMap;function To(r){var t;let e=(t=r.menu)==null?void 0:t.selection;return e?Aa(e):null}function xo(r){let e=Be.get(r);if(e)return e.refCount++,()=>wo(r);let t=r.update,n=Object.prototype.hasOwnProperty.call(r,"update");if(!Br(t))return _a;let o={original:t,patched:Ta(t),hadOwnUpdate:n,refCount:1};return r.update=o.patched,Be.set(r,o),()=>wo(r)}function wo(r){let e=Be.get(r);e&&(e.refCount--,!(e.refCount>0)&&(r.update===e.patched&&(e.hadOwnUpdate?r.update=e.original:delete r.update),Be.delete(r)))}function Ta(r){return function(t){if(!La(this,t)){r.call(this,t);return}try{xa(this,t)}catch(n){r.call(this,t)}}}function xa(r,e){var s,a,l,c;let t=r.selectionEl,n=(s=r.canvas)==null?void 0:s.canvasEl;r.bbox=e,t.parentNode||(a=n.appendChild)==null||a.call(n,t);for(let d of(l=r.resizerEls)!=null?l:[])(c=t.appendChild)==null||c.call(t,d);let o=Ia(r),i=Na(e,o);Ma(t,{transform:`translate(${Dt(i.minX)}, ${Dt(i.minY)})`,width:Dt(i.maxX-i.minX),height:Dt(i.maxY-i.minY)})}function Ia(r){var t;if(Ra(r))return 0;let e=(t=r.canvas)==null?void 0:t.scale;return!Ba(e)||e<=bo?ko:ko*bo/e}function Ra(r){let e=r.selectionEl;return!!e&&!Po(e,"mod-group-selection")&&!Po(e,"mod-node-highlight")}function Na(r,e){return{minX:r.minX-e,minY:r.minY-e,maxX:r.maxX+e,maxY:r.maxY+e}}function La(r,e){var t;return Da(e)&&!!r.selectionEl&&!!((t=r.canvas)!=null&&t.canvasEl)}function Da(r){return rt(r.minX)&&rt(r.minY)&&rt(r.maxX)&&rt(r.maxY)}function Aa(r){let e=Object.getPrototypeOf(r);for(;e&&e!==Object.prototype;){if(Object.prototype.hasOwnProperty.call(e,"update"))return Be.has(e)||Br(e.update)?e:null;e=Object.getPrototypeOf(e)}return Object.prototype.hasOwnProperty.call(r,"update")&&(Be.has(r)||Br(r.update))?r:null}function Br(r){if(typeof r!="function")return!1;let e=Function.prototype.toString.call(r);return e.includes("selectionEl")&&e.includes("resizerEls")&&e.includes("setCssStyles")&&e.includes("10")}function Ma(r,e){var t;if(typeof r.setCssStyles=="function"){r.setCssStyles(e);return}for(let[n,o]of Object.entries(e))typeof((t=r.style)==null?void 0:t.setProperty)=="function"?r.style.setProperty(n,o):r.style&&(r.style[n]=o)}function Po(r,e){var t;return r?typeof((t=r.classList)==null?void 0:t.contains)=="function"&&r.classList.contains(e)?!0:Ha(r).includes(e):!1}function Ha(r){let e=r.className;if(typeof e=="string")return e.split(/\s+/).filter(t=>t.length>0);if(e&&typeof e=="object"&&"baseVal"in e){let t=e.baseVal;return typeof t=="string"?t.split(/\s+/).filter(n=>n.length>0):[]}return[]}function Dt(r){return`${Number(r.toFixed(6)).toString()}px`}function rt(r){return typeof r=="number"&&Number.isFinite(r)}function Ba(r){return rt(r)&&r>0}function _a(){}var Io=1,Ro=1.1,At=class{constructor(e){this.canvas=null;this.hasOriginalMinContainerDimension=!1;this.isRequestFramePatched=!1;this.hadOwnRequestFrame=!1;this.isZoomToBboxPatched=!1;this.hadOwnZoomToBbox=!1;this.isGridSpacingPatched=!1;this.hadOwnGridSpacing=!1;this.isSnapDistancePatched=!1;this.hadOwnSnapDistance=!1;this.selectionOverlayPatchPrototype=null;this.releaseSelectionOverlayPatchCallback=null;this.target=e}setEnabled(e){let t=Va(this.target);if(!e||!t){this.restore();return}this.canvas&&this.canvas!==t&&this.restore(),this.canvas=t,this.applyMinimumDimensionOverride(t),this.applyZoomOverrides(t)}dispose(){this.restore()}applyMinimumDimensionOverride(e){e.config&&(this.hasOriginalMinContainerDimension||(this.originalMinContainerDimension=e.config.minContainerDimension,this.hasOriginalMinContainerDimension=!0),e.config.minContainerDimension=Io)}applyZoomOverrides(e){this.patchRequestFrame(e),this.patchZoomToBbox(e),this.patchGridSpacing(e),this.patchSnapDistance(e),this.patchSelectionOverlay(e)}patchRequestFrame(e){if(this.isRequestFramePatched||typeof e.requestFrame!="function")return;let t=e.requestFrame;this.hadOwnRequestFrame=Object.prototype.hasOwnProperty.call(e,"requestFrame"),this.originalRequestFrame=t;let n=o=>{var l,c;let i=(c=(l=e.canvasEl)==null?void 0:l.win)!=null?c:window,s=Reflect.get(i,"requestAnimationFrame"),a=s.bind(i);Reflect.set(i,"requestAnimationFrame",d=>a(u=>{this.runWithZoomClampBypass(e,()=>d(u))}));try{t.call(e,o)}finally{Reflect.set(i,"requestAnimationFrame",s)}};e.requestFrame=n,this.patchedRequestFrame=n,this.isRequestFramePatched=!0}patchZoomT
Line truncated
|
||||
|
||||
/* nosourcemap */
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"id": "draw-in-canvas",
|
||||
"name": "Draw in Canvas",
|
||||
"version": "0.1.8",
|
||||
"minAppVersion": "1.5.0",
|
||||
"description": "Draw freehand annotations on JSON Canvas files.",
|
||||
"author": "xRyul",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+1587
File diff suppressed because it is too large.
Load diff
+9
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"remoteURL": "https://gitea.exocomet-frog.ts.net/andus/vaardspace-wiki.git",
|
||||
"gitLocation": "",
|
||||
"syncinterval": 0,
|
||||
"isSyncOnLoad": true,
|
||||
"checkStatusOnLoad": true,
|
||||
"noticeLevel": "ALL",
|
||||
"showSyncSuccessNotice": true
|
||||
}
|
||||
+4907
File diff suppressed because it is too large.
Load diff
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "github-sync",
|
||||
"name": "GitHub Sync",
|
||||
"version": "1.0.7",
|
||||
"minAppVersion": "0.15.0",
|
||||
"description": "Sync vault to personal GitHub.",
|
||||
"author": "Kevin Chin",
|
||||
"authorUrl": "https://kevin.gd/",
|
||||
"isDesktopOnly": true
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
|
||||
This CSS file will be included with your plugin, and
|
||||
available in the app when your plugin is enabled.
|
||||
|
||||
If your plugin does not need CSS, delete this file.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
.gh-sync-ribbon
|
||||
{
|
||||
order: 100;
|
||||
}
|
||||
|
||||
.gh-sync-status
|
||||
{
|
||||
order: -1;
|
||||
}
|
||||
|
||||
.howto {
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.howto_title {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.howto_text {
|
||||
color: var(--text-muted);
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.my-plugin-setting-text {
|
||||
width: 30em;
|
||||
}
|
||||
|
||||
.my-plugin-setting-text2 {
|
||||
width: 30em;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"monsters": [],
|
||||
"defaultLayouts": {},
|
||||
"layouts": [],
|
||||
"default": "basic-5e-layout",
|
||||
"useDice": true,
|
||||
"renderDice": false,
|
||||
"export": true,
|
||||
"showAdvanced": false,
|
||||
"version": {
|
||||
"major": 4,
|
||||
"minor": 10,
|
||||
"patch": 3
|
||||
},
|
||||
"paths": [
|
||||
"/"
|
||||
],
|
||||
"autoParse": false,
|
||||
"disableSRD": false,
|
||||
"tryToRenderLinks": true,
|
||||
"debug": false,
|
||||
"notifiedOfFantasy": false,
|
||||
"hideConditionHelp": false,
|
||||
"alwaysImport": false,
|
||||
"defaultLayoutsIntegrated": true,
|
||||
"atomicWrite": false
|
||||
}
|
||||
+1107
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "obsidian-5e-statblocks",
|
||||
"name": "Fantasy Statblocks",
|
||||
"version": "4.10.3",
|
||||
"description": "Create Fantasy Statblocks in Obsidian.md",
|
||||
"minAppVersion": "0.12.0",
|
||||
"author": "Jeremy Valentine",
|
||||
"authorUrl": "",
|
||||
"fundingUrl": "https://www.buymeacoffee.com/valentine195",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
@charset "UTF-8";:root{--statblock-primary-color: #7a200d;--statblock-rule-color: #922610;--statblock-background-color: #fdf1dc;--statblock-bar-color: #e69a28;--statblock-bar-border-size: 1px;--statblock-bar-border-color: #000;--statblock-image-width: 75px;--statblock-image-height: 75px;--statblock-image-border-size: 2px;--statblock-image-border-color: var(--statblock-primary-color);--statblock-border-size: 1px;--statblock-border-color: #ddd;--statblock-box-shadow-color: #ddd;--statblock-box-shadow-x-offset: 0;--statblock-box-shadow-y-offset: 0;--statblock-box-shadow-blur: 1.5em;--statblock-font-color: var(--statblock-primary-color);--statblock-font-weight: 700;--statblock-content-font: "Noto Sans", "Myriad Pro", Calibri, Helvetica, Arial, sans-serif;--statblock-content-font-size: 14px;--statblock-heading-font: "Libre Baskerville", "Lora", "Calisto MT", "Bookman Old Style", Bookman, "Goudy Old Style", Garamond, "Hoefler Text", "Bitstream Charter", Georgia, serif;--statblock-heading-font-color: var(--statblock-font-color);--statblock-heading-font-size: 23px;--statblock-heading-font-variant: small-caps;--statblock-heading-font-weight: var(--statblock-font-weight);--statblock-heading-line-height: inherit;--statblock-property-line-height: 1.4;--statblock-property-font-color: var(--statblock-font-color);--statblock-property-name-font-color: var(--statblock-font-color);--statblock-property-name-font-weight: bold;--statblock-section-heading-border-size: 1px;--statblock-section-heading-border-color: var(--statblock-primary-color);--statblock-section-heading-font-color: var(--statblock-font-color);--statblock-section-heading-font-size: 21px;--statblock-section-heading-font-variant: small-caps;--statblock-section-heading-font-weight: normal;--statblock-saves-line-height: 1.4;--statblock-spells-font-style: italic;--statblock-subheading-font-size: 12px;--statblock-subheading-font-style: italic;--statblock-subheading-font-weight: normal;--statblock-table-header-font-weight: bold;--statblock-traits-name-font-weight: bold;--statblock-traits-name-font-style: italic;--statblock-link-style: italic}.statblock-detached{position:absolute;top:-9999px;width:auto}.statblock-item-container{margin-bottom:.25rem}.statblock-item-inline{display:flex;justify-content:space-between}.statblock-filter-container .search-input-container{margin-bottom:0}.no-border-top{border-top:0}.statblock-edit-block .statblock-additional-container>.additional>.setting-item .setting-item-name{font-size:small;font-style:italic}.statblock-edit-block .statblock-additional-container>.additional>.setting-item{color:var(--text-muted)}.statblock-edit-block .statblock-additional-container>:not(.additional){padding-bottom:0}.fantasy-statblocks-modal .copy-code-button,.statblock-edit-block .copy-code-button{display:none}.statblock-edit-block .setting-item{border:0;padding-top:0rem}.statblock-edit-block textarea{width:100%;resize:vertical;overflow:hidden}.statblock-additional-container.statblock-monsters button{margin-right:0}.statblock-file-upload>input[type=file]{display:none}.statblock-additional-container{border-top:1px solid var(--background-modifier-border);border-bottom:0px solid var(--background-modifier-border);padding:18px 0 0;background-color:inherit}.statblock-additional-container details{padding:18px 0}.statblock-additional-container .clickable-icon{margin:0 6px}.statblock-additional-container .task-list-inline{display:grid;grid-template-columns:1fr 1fr;gap:0 3em;padding-bottom:0;margin:0}.statblock-monster-filter{position:sticky;top:calc(-1 * var(--statblock-filter-offset));background-color:var(--statblock-filter-bg);z-index:99999}.statblock-additional-container>.setting-item-heading:only-child{padding-bottom:18px}.statblock-additional-container>.additional{margin:6px 12px}.statblock-additional-container .setting-item{border-top:0}.statblock-additional-container>.additional>.setting-item{padding-top:9px}.statblock-additional-container>.additional>.setting-item>.setting-item-control>*:first-child{margin:0 6px}.statblock-settings .coffee{width:60%;color:var(--text-faint);margin:1rem auto;text-align:center}.statblock-settings .coffee img{height:30px}details.statblock-nested-settings>summary{outline:none;display:flex;justify-content:space-between;min-height:1rem;border-top-left-radius:.1rem;border-top-right-radius:.1rem;cursor:pointer;position:relative;margin-bottom:1rem}details.statblock-nested-settings>summary>.setting-item{padding-bottom:0}.statblock-nested-settings .cm-editor{margin-bottom:1rem}details.statblock-nested-settings>summary::-webkit-details-marker,details.statblock-nested-settings>summary::marker{display:none!important}details.statblock-nested-settings .summary-content{display:flex;align-items:center;justify-content:space-between}details.statblock-nested-settings[open] .summary-content{border-bottom:1px solid var(--background-modifier-border)}details.statblock-nested-settings .summary-content .setting-item-heading{padding:0}details.statblock-Line truncated
|
||||
/*!
|
||||
Pathfinder TTRPG General Statblock Layout CSS
|
||||
|
||||
version: 1.6.1
|
||||
by: Moritz Jung (https://github.com/mProjectsCode) and Sigrunixia
|
||||
repo: https://github.com/mProjectsCode/obsidian-pathfinder2e-statblocks
|
||||
|
||||
This file was generated from SCSS.
|
||||
Looking for `!important`?
|
||||
- Check for:
|
||||
Rare_0X
|
||||
Trait_0X
|
||||
Popover
|
||||
|
||||
That is the only spots they are used in this file.
|
||||
*/
|
||||
/*!
|
||||
/* @settings
|
||||
name: Pathfinder 2e Statblocks
|
||||
id: pathfinder-2e-statblocks
|
||||
collapsed: true
|
||||
settings:
|
||||
-
|
||||
id: layout-theme-basic
|
||||
title: Creature Statblock Theme
|
||||
description: The theme of the creature statblock
|
||||
type: class-select
|
||||
allowEmpty: false
|
||||
default: basic-pathfinder-2e-layout-theme-default
|
||||
options:
|
||||
-
|
||||
label: Default
|
||||
value: basic-pathfinder-2e-layout-theme-default
|
||||
-
|
||||
label: Kingmaker
|
||||
value: basic-pathfinder-2e-layout-theme-kingmaker
|
||||
-
|
||||
id: layout-theme-action
|
||||
title: Action Statblock Theme
|
||||
description: The theme of the action statblock
|
||||
type: class-select
|
||||
allowEmpty: false
|
||||
default: pathfinder-2e-action-layout-theme-default
|
||||
options:
|
||||
-
|
||||
label: Default
|
||||
value: pathfinder-2e-action-layout-theme-default
|
||||
-
|
||||
label: Kingmaker
|
||||
value: pathfinder-2e-action-layout-theme-kingmaker
|
||||
-
|
||||
id: layout-theme-hazard
|
||||
title: Hazard Statblock Theme
|
||||
description: The theme of the hazard statblock
|
||||
type: class-select
|
||||
allowEmpty: false
|
||||
default: pathfinder-2e-hazard-layout-theme-default
|
||||
options:
|
||||
-
|
||||
label: Default
|
||||
value: pathfinder-2e-hazard-layout-theme-default
|
||||
-
|
||||
label: Kingmaker
|
||||
value: pathfinder-2e-hazard-layout-theme-kingmaker
|
||||
-
|
||||
id: layout-theme-influence
|
||||
title: Influence Statblock Theme
|
||||
description: The theme of the influence subsystem statblock
|
||||
type: class-select
|
||||
allowEmpty: false
|
||||
default: pathfinder-2e-influence-layout-theme-default
|
||||
options:
|
||||
-
|
||||
label: Default
|
||||
value: pathfinder-2e-influence-layout-theme-default
|
||||
-
|
||||
label: Kingmaker
|
||||
value: pathfinder-2e-influence-layout-theme-kingmaker
|
||||
-
|
||||
id: layout-theme-item
|
||||
title: Item Statblock Theme
|
||||
description: The theme of the item statblock
|
||||
type: class-select
|
||||
allowEmpty: false
|
||||
default: pathfinder-2e-item-layout-theme-default
|
||||
options:
|
||||
-
|
||||
label: Default
|
||||
value: pathfinder-2e-item-layout-theme-default
|
||||
-
|
||||
label: Kingmaker
|
||||
value: pathfinder-2e-item-layout-theme-kingmaker
|
||||
-
|
||||
id: layout-theme-misc
|
||||
title: Misc Statblock Theme
|
||||
description: The theme of the misc statblock
|
||||
type: class-select
|
||||
allowEmpty: false
|
||||
default: pathfinder-2e-misc-layout-theme-default
|
||||
options:
|
||||
-
|
||||
label: Default
|
||||
value: pathfinder-2e-misc-layout-theme-default
|
||||
-
|
||||
label: Kingmaker
|
||||
value: pathfinder-2e-misc-layout-theme-kingmaker
|
||||
-
|
||||
id: layout-theme-plane
|
||||
title: Plane Statblock Theme
|
||||
description: The theme of the plane statblock
|
||||
type: class-select
|
||||
allowEmpty: false
|
||||
default: pathfinder-2e-plane-layout-theme-default
|
||||
options:
|
||||
-
|
||||
label: Default
|
||||
value: pathfinder-2e-plane-layout-theme-default
|
||||
-
|
||||
label: Kingmaker
|
||||
value: pathfinder-2e-plane-layout-theme-kingmaker
|
||||
-
|
||||
id: layout-theme-quest
|
||||
title: Quest Statblock Theme
|
||||
description: The theme of the quest statblock
|
||||
type: class-select
|
||||
allowEmpty: false
|
||||
default: pathfinder-2e-quest-layout-theme-default
|
||||
options:
|
||||
-
|
||||
label: Default
|
||||
value: pathfinder-2e-quest-layout-theme-default
|
||||
-
|
||||
label: Kingmaker
|
||||
value: pathfinder-2e-quest-layout-theme-kingmaker
|
||||
-
|
||||
id: layout-theme-settlement
|
||||
title: Settlement Statblock Theme
|
||||
description: The theme of the settlement statblock
|
||||
type: class-select
|
||||
allowEmpty: false
|
||||
default: pathfinder-2e-settlement-layout-theme-default
|
||||
options:
|
||||
-
|
||||
label: Default
|
||||
value: pathfinder-2e-settlement-layout-theme-default
|
||||
-
|
||||
label: Kingmaker
|
||||
value: pathfinder-2e-settlement-layout-theme-kingmaker
|
||||
*/
|
||||
@@ -0,0 +1,80 @@
|
||||
{
|
||||
"position": "RIGHT",
|
||||
"showFudgeIcon": false,
|
||||
"rollLinksForTags": false,
|
||||
"copyContentButton": true,
|
||||
"customFormulas": [],
|
||||
"displayFormulaForMod": true,
|
||||
"displayResultsInline": false,
|
||||
"displayFormulaAfter": false,
|
||||
"escapeDiceMod": true,
|
||||
"signed": false,
|
||||
"displayLookupRoll": true,
|
||||
"formulas": {},
|
||||
"defaultRoll": 1,
|
||||
"defaultFace": 100,
|
||||
"renderer": false,
|
||||
"renderAllDice": false,
|
||||
"addToView": false,
|
||||
"renderTime": 2000,
|
||||
"colorfulDice": false,
|
||||
"scaler": 1,
|
||||
"diceColor": "#202020",
|
||||
"textColor": "#ffffff",
|
||||
"textFont": "Arial",
|
||||
"showLeafOnStartup": true,
|
||||
"narrativeSymbolSet": "Genesys",
|
||||
"displayAsSymbols": false,
|
||||
"displayAsEmbed": true,
|
||||
"round": "None",
|
||||
"initialDisplay": "Roll",
|
||||
"icons": [
|
||||
{
|
||||
"id": "dice-roller-d4",
|
||||
"shape": "Triangle",
|
||||
"formula": "d4",
|
||||
"text": "4"
|
||||
},
|
||||
{
|
||||
"id": "dice-roller-d6",
|
||||
"shape": "Square",
|
||||
"formula": "d6",
|
||||
"text": "6"
|
||||
},
|
||||
{
|
||||
"id": "dice-roller-d8",
|
||||
"shape": "Diamond",
|
||||
"formula": "d8",
|
||||
"text": "8"
|
||||
},
|
||||
{
|
||||
"id": "dice-roller-d10",
|
||||
"shape": "Diamond",
|
||||
"formula": "d10",
|
||||
"text": "10"
|
||||
},
|
||||
{
|
||||
"id": "dice-roller-d12",
|
||||
"shape": "Dodecahedron",
|
||||
"formula": "d12",
|
||||
"text": "12"
|
||||
},
|
||||
{
|
||||
"id": "dice-roller-d20",
|
||||
"shape": "Icosahedron",
|
||||
"formula": "d20",
|
||||
"text": "20"
|
||||
},
|
||||
{
|
||||
"id": "dice-roller-d100",
|
||||
"shape": "Circle",
|
||||
"formula": "d%",
|
||||
"text": "%"
|
||||
}
|
||||
],
|
||||
"showRenderNotice": true,
|
||||
"diceModTemplateFolders": {},
|
||||
"replaceDiceModInLivePreview": true,
|
||||
"viewResults": [],
|
||||
"version": "11.4.2"
|
||||
}
|
||||
+3107
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "obsidian-dice-roller",
|
||||
"name": "Dice Roller",
|
||||
"version": "11.4.2",
|
||||
"minAppVersion": "0.12.15",
|
||||
"description": "Inline dice rolling for Obsidian.md",
|
||||
"author": "Jeremy Valentine",
|
||||
"authorUrl": "",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.dice-roller{position:relative;display:inline-flex;align-items:center;gap:.25rem;cursor:pointer;margin:0 .25em 0 0;vertical-align:top}.dice-roller.no-icon{margin:0}.dice-roller>div{display:inline-block}.dice-roller:not(.has-embed) span{font-weight:700}.dice-roller>.dice-roller-button{display:inline-flex;position:relative;font-size:inherit}.dice-roller>.dice-roller-formula{display:inline-flex;position:relative;font-size:inherit}.dice-roller.has-embed .dice-roller-result{width:100%;padding:1rem}.dice-roller.has-embed .dice-roller-result .markdown-embed{display:flex;margin-top:.5rem;padding-right:0}.dice-roller.has-embed .dice-roller-button{padding-top:.5rem}.dice.tooltip{max-width:unset!important}.workspace .markdown-preview-view .dice-roller.has-embed{display:flex;padding-right:.25rem;margin:.25rem 0}.dice-no-results{font-style:italic;text-align:center}.dice-roller.has-embed .internal-embed{width:100%}.dice-roller.has-embed .internal-embed .dice-roller>.dice-roller-button,.dice-roller.has-embed .internal-embed .dice-roller>.dice-roller-result{display:inline;padding:0}.dice-roller.has-embed .internal-embed .dice-roller>.dice-roller-result .embedded-table-result{margin-bottom:0}.dice-roller.has-embed .internal-embed *:last-child:not(svg):not(.dice-content-copy):not(.markdown-embed .dice-roller):not(.dice-roller-result>.embedded-table-result *){margin-bottom:15px}.dice-roller.has-embed .dice-file-name{font-style:italic}.dice-section-result{position:relative}.dice-content-copy{color:var(--text-faint);cursor:pointer;height:fit-content}.dice-content-copy.no-show{display:none}.dice-content-copy:hover{color:var(--text-normal)}.dice-roller.has-embed .dice-section-result .dice-content-copy,.dice-content-copy:hover{opacity:1}.dice-roller-result{position:relative;display:inline-flex;align-items:center}.dice-roller-result .embedded-table-result p{margin:0}.dice-roller-settings .coffee{width:60%;color:var(--text-faint);margin:.5rem auto;text-align:center}.dice-roller-settings .coffee img{height:30px}.dice-roller-setting-additional-container>.setting-item:not(.setting-item-heading){border:0px}.dice-roller-setting-additional-container .additional{padding:0 18px}.dice-roller-setting-additional-container{border-bottom:1px solid var(--background-modifier-border);border-top:1px solid var(--background-modifier-border);padding:18px 0}.dice-roller-setting-additional-container>.setting-item-heading:only-child{padding-bottom:18px}.dice-roller-setting-additional-container>.additional .no-formulas{width:auto;display:block;text-align:center}.dice-roller-setting-additional-container>.additional>.setting-item{border-top:0;padding-top:9px}.dice-roller-setting-additional-container>.additional>.setting-item>.setting-item-control>*:first-child{margin:0 6px}.dice-roller-setting-additional-container>.additional>.setting-item>.setting-item-control>.dice-mod-template-use-subfolders{margin:0 px;font-style:italic;font-size:small}.dice-roller-setting-additional-container .add-new-formula{margin:0 1rem;padding:1rem 1rem 0;border-radius:.5rem;box-shadow:0 0 .25rem var(--background-modifier-box-shadow)}.dice-roller-setting-additional-container .add-new-formula .formula-data .setting-item{border:0}.should-spin{border-bottom-color:transparent;border-radius:50%;display:inline-flex;align-items:center;box-sizing:border-box;animation:rotation 1s ease infinite}@keyframes rotation{0%{transform:scale(1) rotate(-60deg)}20%{transform:rotate(-90deg)}50%{transform:rotate(690deg)}to{transform:rotate(660deg)}}.renderer-container{position:absolute;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:9999999;transition:opacity 1s ease-out}.dice-roller-view .dice-roller-roll:disabled{cursor:not-allowed;opacity:.75}.workspace-split.mod-right-split .view-content.dice-roller-view{padding:.5rem;display:flex;flex-flow:column nowrap;justify-content:flex-start;gap:12px}.dice-roller-view .dice-roller-grid{display:grid;grid-template-rows:auto auto;justify-content:center;gap:6px}.dice-roller-view .dice-roller-grid .dice-buttons{display:flex;flex-flow:row wrap;align-items:center;justify-content:center;width:fit-content}.dice-roller-view .dice-roller-grid .dice-custom-formula-container{display:flex;justify-content:space-between;align-items:center}.dice-roller-view .dice-roller-grid .dice-custom-formula{display:flex;justify-content:flex-start;align-items:center}.dice-roller-view .setting-editor-extra-setting-button{width:fit-content}.dice-button svg{width:36px;height:36px}.dice-roller-view .dice-context{display:grid;grid-template-columns:1fr auto}.dice-roller-view .dice-context .add-subtract{display:flex;align-items:center}.dice-roller-view input,.dice-roller-view textarea{width:100%}.dice-roller-view .dice-roller-grid .advantage-disadvantage{display:flex;justify-content:center;align-items:center;gap:.5rem}.dice-roller-view .dice-roller-grid .advantage-disadvantage button{margin:0;min-width:66px}.dice-roller-view .dice-roller-formula{display:flex;flex-flow:column nowrLine truncated
|
||||
+98963
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"id": "obsidian-emoji-toolbar",
|
||||
"name": "Emoji Toolbar",
|
||||
"version": "1.0.0",
|
||||
"description": "Quickly search for and insert emojis into your notes.",
|
||||
"author": "oliveryh",
|
||||
"authorUrl": "https://github.com/oliveryh/obsidian-emoji-toolbar",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
img.emoji {
|
||||
height: 1em;
|
||||
width: 1em;
|
||||
margin: 0 0.05em 0 0.1em;
|
||||
vertical-align: -0.1em;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
#emoji-modal {
|
||||
padding: 0px;
|
||||
min-width: unset;
|
||||
width: unset !important;
|
||||
|
||||
.modal-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.button {
|
||||
background-color: unset;
|
||||
border: 0px !important;
|
||||
box-shadow: 0px !important;
|
||||
}
|
||||
|
||||
.modal-close-button {
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
+427
@@ -0,0 +1,427 @@
|
||||
/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||||
if you want to view the source visit the plugins github repository (https://github.com/denolehov/obsidian-git)
|
||||
*/
|
||||
|
||||
"use strict";var E$=Object.create;var gc=Object.defineProperty;var S$=Object.getOwnPropertyDescriptor;var k$=Object.getOwnPropertyNames;var C$=Object.getPrototypeOf,A$=Object.prototype.hasOwnProperty;var Eb=t=>{throw TypeError(t)};var T$=(t,e,r)=>e in t?gc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var P$=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(i){throw r=[i],i}};var U=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},R$=(t,e)=>{for(var r in e)gc(t,r,{get:e[r],enumerable:!0})},Sb=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of k$(e))!A$.call(t,n)&&n!==r&&gc(t,n,{get:()=>e[n],enumerable:!(i=S$(e,n))||i.enumerable});return t};var ft=(t,e,r)=>(r=t!=null?E$(C$(t)):{},Sb(e||!t||!t.__esModule?gc(r,"default",{value:t,enumerable:!0}):r,t)),$$=t=>Sb(gc({},"__esModule",{value:!0}),t);var He=(t,e,r)=>T$(t,typeof e!="symbol"?e+"":e,r),tm=(t,e,r)=>e.has(t)||Eb("Cannot "+r);var $=(t,e,r)=>(tm(t,e,"read from private field"),r?r.call(t):e.get(t)),me=(t,e,r)=>e.has(t)?Eb("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),fe=(t,e,r,i)=>(tm(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),Ee=(t,e,r)=>(tm(t,e,"access private method"),r);var Ab=U(Rf=>{"use strict";m();Rf.byteLength=I$;Rf.toByteArray=D$;Rf.fromByteArray=N$;var ln=[],pi=[],F$=typeof Uint8Array!="undefined"?Uint8Array:Array,rm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(ia=0,kb=rm.length;ia<kb;++ia)ln[ia]=rm[ia],pi[rm.charCodeAt(ia)]=ia;var ia,kb;pi[45]=62;pi[95]=63;function Cb(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function I$(t){var e=Cb(t),r=e[0],i=e[1];return(r+i)*3/4-i}function M$(t,e,r){return(e+r)*3/4-r}function D$(t){var e,r=Cb(t),i=r[0],n=r[1],s=new F$(M$(t,i,n)),a=0,o=n>0?i-4:i,l;for(l=0;l<o;l+=4)e=pi[t.charCodeAt(l)]<<18|pi[t.charCodeAt(l+1)]<<12|pi[t.charCodeAt(l+2)]<<6|pi[t.charCodeAt(l+3)],s[a++]=e>>16&255,s[a++]=e>>8&255,s[a++]=e&255;return n===2&&(e=pi[t.charCodeAt(l)]<<2|pi[t.charCodeAt(l+1)]>>4,s[a++]=e&255),n===1&&(e=pi[t.charCodeAt(l)]<<10|pi[t.charCodeAt(l+1)]<<4|pi[t.charCodeAt(l+2)]>>2,s[a++]=e>>8&255,s[a++]=e&255),s}function O$(t){return ln[t>>18&63]+ln[t>>12&63]+ln[t>>6&63]+ln[t&63]}function L$(t,e,r){for(var i,n=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),n.push(O$(i));return n.join("")}function N$(t){for(var e,r=t.length,i=r%3,n=[],s=16383,a=0,o=r-i;a<o;a+=s)n.push(L$(t,a,a+s>o?o:a+s));return i===1?(e=t[r-1],n.push(ln[e>>2]+ln[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push(ln[e>>10]+ln[e>>4&63]+ln[e<<2&63]+"=")),n.join("")}});var Tb=U(im=>{m();im.read=function(t,e,r,i,n){var s,a,o=n*8-i-1,l=(1<<o)-1,c=l>>1,u=-7,f=r?n-1:0,d=r?-1:1,h=t[e+f];for(f+=d,s=h&(1<<-u)-1,h>>=-u,u+=o;u>0;s=s*256+t[e+f],f+=d,u-=8);for(a=s&(1<<-u)-1,s>>=-u,u+=i;u>0;a=a*256+t[e+f],f+=d,u-=8);if(s===0)s=1-c;else{if(s===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,i),s=s-c}return(h?-1:1)*a*Math.pow(2,s-i)};im.write=function(t,e,r,i,n,s){var a,o,l,c=s*8-n-1,u=(1<<c)-1,f=u>>1,d=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:s-1,p=i?1:-1,g=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=u):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+f>=1?e+=d/l:e+=d*Math.pow(2,1-f),e*l>=2&&(a++,l/=2),a+f>=u?(o=0,a=u):a+f>=1?(o=(e*l-1)*Math.pow(2,n),a=a+f):(o=e*Math.pow(2,f-1)*Math.pow(2,n),a=0));n>=8;t[r+h]=o&255,h+=p,o/=256,n-=8);for(a=a<<n|o,c+=n;c>0;t[r+h]=a&255,h+=p,a/=256,c-=8);t[r+h-p]|=g*128}});var dm=U(Eo=>{"use strict";m();var nm=Ab(),yo=Tb(),Pb=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Eo.Buffer=M;Eo.SlowBuffer=V$;Eo.INSPECT_MAX_BYTES=50;var $f=2147483647;Eo.kMaxLength=$f;M.TYPED_ARRAY_SUPPORT=B$();!M.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function B$(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch(t){return!1}}Object.defineProperty(M.prototype,"parent",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.buffer}});Object.defineProperty(M.prototype,"offset",{enumerable:!0,get:function(){if(M.isBuffer(this))return this.byteOffset}});function Gn(t){if(t>$f)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,M.prototype),e}function M(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return lm(t)}return Ib(t,e,r)}M.poolSize=8192;function Ib(t,e,r){if(typeoLine truncated
|
||||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function VB(t,e){if(t){if(typeof t=="string")return jS(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jS(t,e)}}function jS(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function zB(t,e){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(t)))){var r=[],i=!0,n=!1,s=void 0;try{for(var a=t[Symbol.iterator](),o;!(i=(o=a.next()).done)&&(r.push(o.value),!(e&&r.length===e));i=!0);}catch(l){n=!0,s=l}finally{try{!i&&a.return!=null&&a.return()}finally{if(n)throw s}}return r}}function WB(t){if(Array.isArray(t))return t}var zS=/^#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})?$/,WS=/^#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])?$/,qS=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,YS=/^rgba?\(\s*(\d+)\s+(\d+)\s+(\d+)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,ZS=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,KS=/^rgba?\(\s*(\d+%)\s+(\d+%)\s+(\d+%)(?:\s*\/\s*(0|1|0?\.\d+|\d+%))?\s*\)$/,XS=/^hsla?\(\s*(\d+)(deg|rad|grad|turn)?\s*,\s*(\d+)%\s*,\s*(\d+)%(?:\s*,\s*(0|1|0?\.\d+|\d+%))?\s*\)$/;function vu(t,e){return t.indexOf(e)>-1}function qB(t,e,r){var i=t/255,n=e/255,s=r/255,a=Math.max(i,n,s),o=Math.min(i,n,s),l=a-o,c=(a+o)/2;if(l===0)return[0,0,c*100];var u=l/(1-Math.abs(2*c-1)),f=(function(){switch(a){case i:return(n-s)/l%6;case n:return(s-i)/l+2;default:return(i-n)/l+4}})();return[f*60,u*100,c*100]}function YB(t,e,r){var i=t/60,n=e/100,s=r/100,a=(1-Math.abs(2*s-1))*n,o=a*(1-Math.abs(i%2-1)),l=s-a/2,c=(function(){return i<1?[a,o,0]:i<2?[o,a,0]:i<3?[0,a,o]:i<4?[0,o,a]:i<5?[o,0,a]:[a,0,o]})(),u=_r(c,3),f=u[0],d=u[1],h=u[2];return[(f+l)*255,(d+l)*255,(h+l)*255]}var ZB=(function(){function t(e){var r=_r(e,4),i=r[0],n=r[1],s=r[2],a=r[3];UB(this,t),this.values=[Math.max(Math.min(parseInt(i,10),255),0),Math.max(Math.min(parseInt(n,10),255),0),Math.max(Math.min(parseInt(s,10),255),0),a==null?1:Math.max(Math.min(parseFloat(a),255),0)]}return GB(t,[{key:"toRgbString",value:function(){var r=_r(this.values,4),i=r[0],n=r[1],s=r[2],a=r[3];return a===1?"rgb(".concat(i,", ").concat(n,", ").concat(s,")"):"rgba(".concat(i,", ").concat(n,", ").concat(s,", ").concat(a,")")}},{key:"toHslString",value:function(){var r=this.toHslaArray(),i=_r(r,4),n=i[0],s=i[1],a=i[2],o=i[3];return o===1?"hsl(".concat(n,", ").concat(s,"%, ").concat(a,"%)"):"hsla(".concat(n,", ").concat(s,"%, ").concat(a,"%, ").concat(o,")")}},{key:"toHexString",value:function(){var r=_r(this.values,4),i=r[0],n=r[1],s=r[2],a=r[3];return i=Number(i).toString(16).padStart(2,"0"),n=Number(n).toString(16).padStart(2,"0"),s=Number(s).toString(16).padStart(2,"0"),a=a<1?parseInt(a*255,10).toString(16).padStart(2,"0"):"","#".concat(i).concat(n).concat(s).concat(a)}},{key:"toRgbaArray",value:function(){return this.values}},{key:"toHslaArray",value:function(){var r=_r(this.values,4),i=r[0],n=r[1],s=r[2],a=r[3],o=qB(i,n,s),l=_r(o,3),c=l[0],u=l[1],f=l[2];return[c,u,f,a]}}]),t})();function sl(t){var e=_r(t,4),r=e[0],i=e[1],n=e[2],s=e[3];return new ZB([r,i,n,s])}function av(t){var e=_r(t,3),r=e[0],i=e[1],n=e[2];return sl([r,i,n,1])}function Ld(t){var e=_r(t,4),r=e[0],i=e[1],n=e[2],s=e[3],a=YB(r,i,n),o=_r(a,3),l=o[0],c=o[1],u=o[2];return sl([l,c,u,s])}function QS(t){var e=_r(t,3),r=e[0],i=e[1],n=e[2];return Ld([r,i,n,1])}function KB(t){var e=zS.exec(t)||WS.exec(t),r=_r(e,5),i=r[1],n=r[2],s=r[3],a=r[4];return i=parseInt(i.length<2?i.repeat(2):i,16),n=parseInt(n.length<2?n.repeat(2):n,16),s=parseInt(s.length<2?s.repeat(2):s,16),a=a&&(parseInt(a.length<2?a.repeat(2):a,16)/255).toPrecision(1)||1,sl([i,n,s,a])}function XB(t){var e=qS.exec(t)||ZS.exec(t)||YS.exec(t)||KS.exec(t),r=_r(e,5),i=r[1],n=r[2],s=r[3],a=r[4];return i=vu(i,"%")?parseInt(i,10)*255/100:parseInt(i,10),n=vu(n,"%")?parseInt(n,10)*255/100:parseInt(n,10),s=vu(s,"%")>0?parseInt(s,10)*255/100:parseInt(s,10),a=a===void 0?1:parseFloat(a)/(vu(a,"%")?100:1),sl([i,n,s,a])}function QB(t){var e=XS.exec(t),r=_r(e,6),i=r[1],n=r[2],s=r[3],a=r[4],o=r[5];return n=n||"deg",i=(0,HB.default)(parseFloat(i),n,"deg"),s=parseFloat(s),a=parseFloat(a),o=o===void 0?1:parseFloat(o)/(vu(o,"%")?100:1),Ld([i,s,a,o])}function JS(t){return US.default[t]?av(US.default[t]):zS.test(t)||WS.test(t)?KB(t):qS.test(t)||ZS.test(t)||YS.test(t)||KS.test(t)?XB(t):XS.test(t)?QB(t):null}var JB={fromString:JS,fromRgb:av,fromRgba:sl,fromHsl:QS,fromHsla:Ld};Kn.default=JB});var dk=U((v9,fk)=>{m();fk.exports=function(t,e){var r=t,i=e,n=r.length,s=i.length,a=!1,o=n+1,l=[],c=[],u,f,d=function(){n>=s&&(u=r,f=n,r=i,i=u,n=s,s=f,a=!0,o=n+1)},h=function(g,v,b,_,C){return{startX:g,startY:v,endX:b,endY:_,r:C}},p=function(g,v,b){var _,C,x,S,A;for(v>b?_=l[g-1+o]:_=l[g+1+o],A=x=Math
Line truncated
|
||||
`});ce=!1,W=K.length}function Ie(Rt,$t){var Xe="="+G,ee=Rt.indexOf(Xe,$t),N=c(Rt.substring(Rt.indexOf("=",$t)+1,ee)).split(" ");return X=N[0],G=N[N.length-1],ee+Xe.length-1}for(y&&(y=y.split(" "),X=y[0],G=y[1]),pe=0;pe<P;pe++)H==T?u(X,E,pe)?(--pe,Be(),H=I):E.charAt(pe)==`
|
||||
`?Ut(ce):Z+=E.charAt(pe):H==I?(pe+=X.length-1,xe=t.tags[E.charAt(pe+1)],te=xe?E.charAt(pe+1):"_v",te=="="?(pe=Ie(E,pe),H=T):(xe&&pe++,H=L),ce=pe):u(G,E,pe)?(K.push({tag:te,n:c(Z),otag:X,ctag:G,i:te=="/"?ce-X.length:pe+G.length}),Z="",pe+=G.length-1,H=T,te=="{"&&(G=="}}"?pe++:l(K[K.length-1]))):Z+=E.charAt(pe);return Ut(ce,!0),K};function l(w){w.n.substr(w.n.length-1)==="}"&&(w.n=w.n.substring(0,w.n.length-1))}function c(w){return w.trim?w.trim():w.replace(/^\s*|\s*$/g,"")}function u(w,E,y){if(E.charAt(y)!=w.charAt(0))return!1;for(var P=1,T=w.length;P<T;P++)if(E.charAt(y+P)!=w.charAt(P))return!1;return!0}var f={_t:!0,"\n":!0,$:!0,"/":!0};function d(w,E,y,P){var T=[],I=null,L=null,H=null;for(L=y[y.length-1];w.length>0;){if(H=w.shift(),L&&L.tag=="<"&&!(H.tag in f))throw new Error("Illegal content in < super tag.");if(t.tags[H.tag]<=t.tags.$||h(H,P))y.push(H),H.nodes=d(w,H.tag,y,P);else if(H.tag=="/"){if(y.length===0)throw new Error("Closing tag without opener: /"+H.n);if(I=y.pop(),H.n!=I.n&&!p(H.n,I.n,P))throw new Error("Nesting error: "+I.n+" vs. "+H.n);return I.end=H.i,T}else H.tag==`
|
||||
`&&(H.last=w.length==0||w[0].tag==`
|
||||
`);T.push(H)}if(y.length>0)throw new Error("missing closing tag: "+y.pop().n);return T}function h(w,E){for(var y=0,P=E.length;y<P;y++)if(E[y].o==w.n)return w.tag="#",!0}function p(w,E,y){for(var P=0,T=y.length;P<T;P++)if(y[P].c==w&&y[P].o==E)return!0}function g(w){var E=[];for(var y in w)E.push('"'+_(y)+'": function(c,p,t,i) {'+w[y]+"}");return"{ "+E.join(",")+" }"}function v(w){var E=[];for(var y in w.partials)E.push('"'+_(y)+'":{name:"'+_(w.partials[y].name)+'", '+v(w.partials[y])+"}");return"partials: {"+E.join(",")+"}, subs: "+g(w.subs)}t.stringify=function(w,E,y){return"{code: function (c,p,i) { "+t.wrapMain(w.code)+" },"+v(w)+"}"};var b=0;t.generate=function(w,E,y){b=0;var P={code:"",subs:{},partials:{}};return t.walk(w,P),y.asString?this.stringify(P,E,y):this.makeTemplate(P,E,y)},t.wrapMain=function(w){return'var t=this;t.b(i=i||"");'+w+"return t.fl();"},t.template=t.Template,t.makeTemplate=function(w,E,y){var P=this.makePartials(w);return P.code=new Function("c","p","i",this.wrapMain(w.code)),new this.template(P,E,this,y)},t.makePartials=function(w){var E,y={subs:{},partials:w.partials,name:w.name};for(E in y.partials)y.partials[E]=this.makePartials(y.partials[E]);for(E in w.subs)y.subs[E]=new Function("c","p","t","i",w.subs[E]);return y};function _(w){return w.replace(s,"\\\\").replace(r,'\\"').replace(i,"\\n").replace(n,"\\r").replace(a,"\\u2028").replace(o,"\\u2029")}function C(w){return~w.indexOf(".")?"d":"f"}function x(w,E){var y="<"+(E.prefix||""),P=y+w.n+b++;return E.partials[P]={name:w.n,partials:{}},E.code+='t.b(t.rp("'+_(P)+'",c,p,"'+(w.indent||"")+'"));',P}t.codegen={"#":function(w,E){E.code+="if(t.s(t."+C(w.n)+'("'+_(w.n)+'",c,p,1),c,p,0,'+w.i+","+w.end+',"'+w.otag+" "+w.ctag+'")){t.rs(c,p,function(c,p,t){',t.walk(w.nodes,E),E.code+="});c.pop();}"},"^":function(w,E){E.code+="if(!t.s(t."+C(w.n)+'("'+_(w.n)+'",c,p,1),c,p,1,0,0,"")){',t.walk(w.nodes,E),E.code+="};"},">":x,"<":function(w,E){var y={partials:{},code:"",subs:{},inPartial:!0};t.walk(w.nodes,y);var P=E.partials[x(w,E)];P.subs=y.subs,P.partials=y.partials},$:function(w,E){var y={subs:{},code:"",partials:E.partials,prefix:w.n};t.walk(w.nodes,y),E.subs[w.n]=y.code,E.inPartial||(E.code+='t.sub("'+_(w.n)+'",c,p,i);')},"\n":function(w,E){E.code+=A('"\\n"'+(w.last?"":" + i"))},_v:function(w,E){E.code+="t.b(t.v(t."+C(w.n)+'("'+_(w.n)+'",c,p,0)));'},_t:function(w,E){E.code+=A('"'+_(w.text)+'"')},"{":S,"&":S};function S(w,E){E.code+="t.b(t.t(t."+C(w.n)+'("'+_(w.n)+'",c,p,0)));'}function A(w){return"t.b("+w+");"}t.walk=function(w,E){for(var y,P=0,T=w.length;P<T;P++)y=t.codegen[w[P].tag],y&&y(w[P],E);return E},t.parse=function(w,E,y){return y=y||{},d(w,"",[],y.sectionTags||[])},t.cache={},t.cacheKey=function(w,E){return[w,!!E.asString,!!E.disableLambda,E.delimiters,!!E.modelGet].join("||")},t.compile=function(w,E){E=E||{};var y=t.cacheKey(w,E),P=this.cache[y];if(P){var T=P.partials;for(var I in T)delete T[I].instance;return P}return P=this.generate(this.parse(this.scan(w,E.delimiters),w,E),w,E),this.cache[y]=P}})(typeof Vw!="undefined"?Vw:Hogan)});var Z2=U(zw=>{m();var b5={};(function(t){t.Template=function(d,h,p,g){d=d||{},this.r=d.code||this.r,this.c=p,this.options=g||{},this.text=h||"",this.partials=d.partials||{},this.subs=d.subs||{},this.buf=""},t.Template.prototype={r:function(d,h,p){return""},v:u,t:c,render:function(h,p,g){return this.ri([h],p||{},g)},ri:function(d,h,p){return this.r(d,h,p)},ep:function(d,h){var p=this.partials[d],g=h[p.name];if(p.instance&&p.base==g)return p.instance;if(typeof g=="string"){if(!this.c)throw new Error("No compiler available.");g=this.c.compile(g,this.options)}if(!g)return null;if(this.partials[d].base=g,p.subs){h.stackText||(h.stackText={});for(key in p.subs)h.stackText[key]||(h.stackText[key]=this.activeSub!==void 0&&h.stackText[this.activeSub]?h.stackText[this.activeSub]:this.text);g=r(g,p.subs,p.partials,this.stackSubs,this.stackPartials,h.stackText)}return this.partials[d].instance=g,g},rp:function(d,h,p,g){var v=this.ep(d,p);return v?v.ri(h,p,g):""},rs:function(d,h,p){var g=d[d.length-1];if(!f(g)){p(d,h,this);return}for(var v=0;v<g.length;v++)d.push(g[v]),p(d,h,this),d.pop()},s:function(d,h,p,g,v,b,_){var C;return f(d)&&d.length===0?!1:(typeof d=="function"&&(d=this.ms(d,h,p,g,v,b,_)),C=!!d,!g&&C&&h&&h.push(typeof d=="object"?d:h[h.length-1]),C)},d:function(d,h,p,g){var v,b=d.split("."),_=this.f(b[0],h,p,g),C=this.options.modelGet,x=null;if(d==="."&&f(h[h.length-2]))_=h[h.length-1];else for(var S=1;S<b.length;S++)v=e(b[S],_,C),v!==void 0?(x=_,_=v):_="";return g&&!_?!1:(!g&&typeof _=="function"&&(h.push(x),_=this.mv(_,h,p),h.pop()),_)},f:function(d,h,p,g){for(var v=!1,b=null,_=!1,C=this.options.modelGet,x=h.length-1;x>=0;x--)if(b=h[x],v=e(d,b,C),v!==void 0){_=!0;break}return _?(!g&&typeof v=="function"&&(v=this.mv(v,h,p)),v):g?!1:""},ls:function(d,h,p,g,v,b){var _=this.options.delimiters;return this.options.delimiters=b,this.b(this.ct(c(d.call(h,v,p)),h,g)),this.options.delimiters=_,!1},ct:functio
Line truncated
|
||||
|
||||
If you're using an application that depends on isomorphic-git, please report this error to that application's developers.
|
||||
|
||||
If you're a developer and you believe this is a bug in isomorphic-git, please file an issue at https://github.com/isomorphic-git/isomorphic-git/issues with a minimal reproduction, version and environment details, and this error message: ${e}`),this.code=this.name=t.code,this.data={message:e}}};he.code="InternalError";var va=class t extends Te{constructor(e){super(`The filepath "${e}" contains unsafe character sequences`),this.code=this.name=t.code,this.data={filepath:e}}};va.code="UnsafeFilepathError";var Ui=class{constructor(e){this.buffer=e,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(e){this._start=e}slice(e){let r=this.buffer.slice(this._start,this._start+e);return this._start+=e,r}toString(e,r){let i=this.buffer.toString(e,this._start,this._start+r);return this._start+=r,i}write(e,r,i){let n=this.buffer.write(e,this._start,r,i);return this._start+=r,n}copy(e,r,i){let n=e.copy(this.buffer,this._start,r,i);return this._start+=n,n}readUInt8(){let e=this.buffer.readUInt8(this._start);return this._start+=1,e}writeUInt8(e){let r=this.buffer.writeUInt8(e,this._start);return this._start+=1,r}readUInt16BE(){let e=this.buffer.readUInt16BE(this._start);return this._start+=2,e}writeUInt16BE(e){let r=this.buffer.writeUInt16BE(e,this._start);return this._start+=2,r}readUInt32BE(){let e=this.buffer.readUInt32BE(this._start);return this._start+=4,e}writeUInt32BE(e){let r=this.buffer.writeUInt32BE(e,this._start);return this._start+=4,r}};function Td(t,e){return-(t<e)||+(t>e)}function VE(t,e){return Td(t.path,e.path)}function zE(t){let e=t>0?t>>12:0;e!==4&&e!==8&&e!==10&&e!==14&&(e=8);let r=t&511;return r&73?r=493:r=420,e!==8&&(r=0),(e<<12)+r}var vn=2**32;function wE(t,e,r,i){if(t!==void 0&&e!==void 0)return[t,e];r===void 0&&(r=i.valueOf());let n=Math.floor(r/1e3),s=(r-n*1e3)*1e6;return[n,s]}function Wo(t){let[e,r]=wE(t.ctimeSeconds,t.ctimeNanoseconds,t.ctimeMs,t.ctime),[i,n]=wE(t.mtimeSeconds,t.mtimeNanoseconds,t.mtimeMs,t.mtime);return{ctimeSeconds:e%vn,ctimeNanoseconds:r%vn,mtimeSeconds:i%vn,mtimeNanoseconds:n%vn,dev:t.dev%vn,ino:t.ino%vn,mode:zE(t.mode%vn),uid:t.uid%vn,gid:t.gid%vn,size:t.size>-1?t.size%vn:0}}function bO(t){let e="";for(let r of new Uint8Array(t))r<16&&(e+="0"),e+=r.toString(16);return e}var Sg=null;async function bn(t){return Sg===null&&(Sg=await yO()),Sg?WE(t):_O(t)}function _O(t){return new Yg.default().update(t).digest("hex")}async function WE(t){let e=await crypto.subtle.digest("SHA-1",t);return bO(e)}async function yO(){try{return await WE(new Uint8Array([]))==="da39a3ee5e6b4b0d3255bfef95601890afd80709"}catch(t){}return!1}function xO(t){return{assumeValid:!!(t&32768),extended:!!(t&16384),stage:(t&12288)>>12,nameLength:t&4095}}function EO(t){let e=t.flags;return e.extended=!1,e.nameLength=Math.min(k.from(t.path).length,4095),(e.assumeValid?32768:0)+(e.extended?16384:0)+((e.stage&3)<<12)+(e.nameLength&4095)}var Og=class t{constructor(e,r){this._dirty=!1,this._unmergedPaths=r||new Set,this._entries=e||new Map}_addEntry(e){if(e.flags.stage===0)e.stages=[e],this._entries.set(e.path,e),this._unmergedPaths.delete(e.path);else{let r=this._entries.get(e.path);r||(this._entries.set(e.path,e),r=e),r.stages[e.flags.stage]=e,this._unmergedPaths.add(e.path)}}static async from(e){if(k.isBuffer(e))return t.fromBuffer(e);if(e===null)return new t(null);throw new he("invalid type passed to GitIndex.from")}static async fromBuffer(e){if(e.length===0)throw new he("Index file is empty (.git/index)");let r=new t,i=new Ui(e),n=i.toString("utf8",4);if(n!=="DIRC")throw new he(`Invalid dircache magic file number: ${n}`);let s=await bn(e.slice(0,-20)),a=e.slice(-20).toString("hex");if(a!==s)throw new he(`Invalid checksum in GitIndex buffer: expected ${a} but saw ${s}`);let o=i.readUInt32BE();if(o!==2)throw new he(`Unsupported dircache version: ${o}`);let l=i.readUInt32BE(),c=0;for(;!i.eof()&&c<l;){let u={};u.ctimeSeconds=i.readUInt32BE(),u.ctimeNanoseconds=i.readUInt32BE(),u.mtimeSeconds=i.readUInt32BE(),u.mtimeNanoseconds=i.readUInt32BE(),u.dev=i.readUInt32BE(),u.ino=i.readUInt32BE(),u.mode=i.readUInt32BE(),u.uid=i.readUInt32BE(),u.gid=i.readUInt32BE(),u.size=i.readUInt32BE(),u.oid=i.slice(20).toString("hex");let f=i.readUInt16BE();u.flags=xO(f);let d=e.indexOf(0,i.tell()+1)-i.tell();if(d<1)throw new he(`Got a path length of: ${d}`);if(u.path=i.toString("utf8",d),u.path.includes("..\\")||u.path.includes("../"))throw new va(u.path);let h=8-(i.tell()-12)%8;for(h===0&&(h=8);h--;){let p=i.readUInt8();if(p!==0)throw new he(`Expected 1-8 null characters but got '${p}' after ${u.path}`);if(i.eof())throw new he("Unexpected end of file")}u.stages=[],r._addEntry(u),c++}return r}get unmergedPaths(){return[...this._unmergedPaths]}get entries(){return[...this._entries.values()].sort(VE)}get entriesMap(){return this._entries}get entriesFlat(){return[...this.entries].flatMap(e=>e.stages.length>1?e.stages.filter(r=>r):e)}*[Symbol.iterator](){for(let e of this.entries)yield e}insert({filepath
Line truncated
|
||||
`)}static async _entryToBuffer(e){let r=k.from(e.path),i=Math.ceil((62+r.length+1)/8)*8,n=k.alloc(i),s=new Ui(n),a=Wo(e);return s.writeUInt32BE(a.ctimeSeconds),s.writeUInt32BE(a.ctimeNanoseconds),s.writeUInt32BE(a.mtimeSeconds),s.writeUInt32BE(a.mtimeNanoseconds),s.writeUInt32BE(a.dev),s.writeUInt32BE(a.ino),s.writeUInt32BE(a.mode),s.writeUInt32BE(a.uid),s.writeUInt32BE(a.gid),s.writeUInt32BE(a.size),s.write(e.oid,20,"hex"),s.writeUInt16BE(EO(e)),s.write(e.path,r.length,"utf8"),n}async toObject(){let e=k.alloc(12),r=new Ui(e);r.write("DIRC",4,"utf8"),r.writeUInt32BE(2),r.writeUInt32BE(this.entriesFlat.length);let i=[];for(let o of this.entries)if(i.push(t._entryToBuffer(o)),o.stages.length>1)for(let l of o.stages)l&&l!==o&&i.push(t._entryToBuffer(l));i=await Promise.all(i);let n=k.concat(i),s=k.concat([e,n]),a=await bn(s);return k.concat([s,k.from(a,"hex")])}};function gd(t,e,r=!0,i=!0){let n=Wo(t),s=Wo(e);return r&&n.mode!==s.mode||n.mtimeSeconds!==s.mtimeSeconds||n.ctimeSeconds!==s.ctimeSeconds||n.uid!==s.uid||n.gid!==s.gid||i&&n.ino!==s.ino||n.size!==s.size}var kg=null,Cg=Symbol("IndexCache");function SO(){return{map:new Map,stats:new Map}}async function kO(t,e,r){let[i,n]=await Promise.all([t.lstat(e),t.read(e)]),s=await Og.from(n);r.map.set(e,s),r.stats.set(e,i)}async function CO(t,e,r){let i=r.stats.get(e);if(i===void 0)return!0;if(i===null)return!1;let n=await t.lstat(e);return n===null?!1:gd(i,n)}var dt=class{static async acquire({fs:e,gitdir:r,cache:i,allowUnmerged:n=!0},s){i[Cg]||(i[Cg]=SO());let a=`${r}/index`;kg===null&&(kg=new Vo.default({maxPending:1/0}));let o,l=[];return await kg.acquire(a,async()=>{let c=i[Cg];await CO(e,a,c)&&await kO(e,a,c);let u=c.map.get(a);if(l=u.unmergedPaths,l.length&&!n)throw new Uc(l);if(o=await s(u),u._dirty){let f=await u.toObject();await e.write(a,f),c.stats.set(a,await e.lstat(a)),u._dirty=!1}}),o}};function vd(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e>-1&&(t=t.slice(e+1)),t}function wa(t){let e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e===-1?".":e===0?"/":t.slice(0,e)}function qE(t){let e=new Map,r=function(n){if(!e.has(n)){let s={type:"tree",fullpath:n,basename:vd(n),metadata:{},children:[]};e.set(n,s),s.parent=r(wa(n)),s.parent&&s.parent!==s&&s.parent.children.push(s)}return e.get(n)},i=function(n,s){if(!e.has(n)){let a={type:"blob",fullpath:n,basename:vd(n),metadata:s,parent:r(wa(n)),children:[]};a.parent&&a.parent.children.push(a),e.set(n,a)}return e.get(n)};r(".");for(let n of t)i(n.path,n);return e}function AO(t){switch(t){case 16384:return"tree";case 33188:return"blob";case 33261:return"blob";case 40960:return"blob";case 57344:return"commit"}throw new he(`Unexpected GitTree entry mode: ${t.toString(8)}`)}var Lg=class{constructor({fs:e,gitdir:r,cache:i}){this.treePromise=dt.acquire({fs:e,gitdir:r,cache:i},async function(s){return qE(s.entries)});let n=this;this.ConstructEntry=class{constructor(a){this._fullpath=a,this._type=!1,this._mode=!1,this._stat=!1,this._oid=!1}async type(){return n.type(this)}async mode(){return n.mode(this)}async stat(){return n.stat(this)}async content(){return n.content(this)}async oid(){return n.oid(this)}}}async readdir(e){let r=e._fullpath,n=(await this.treePromise).get(r);if(!n||n.type==="blob")return null;if(n.type!=="tree")throw new Error(`ENOTDIR: not a directory, scandir '${r}'`);let s=n.children.map(a=>a.fullpath);return s.sort(Td),s}async type(e){return e._type===!1&&await e.stat(),e._type}async mode(e){return e._mode===!1&&await e.stat(),e._mode}async stat(e){if(e._stat===!1){let i=(await this.treePromise).get(e._fullpath);if(!i)throw new Error(`ENOENT: no such file or directory, lstat '${e._fullpath}'`);let n=i.type==="tree"?{}:Wo(i.metadata);e._type=i.type==="tree"?"tree":AO(n.mode),e._mode=n.mode,i.type==="tree"?e._stat=void 0:e._stat=n}return e._stat}async content(e){}async oid(e){if(e._oid===!1){let i=(await this.treePromise).get(e._fullpath);e._oid=i.metadata.oid}return e._oid}},Pd=Symbol("GitWalkSymbol");function tl(){let t=Object.create(null);return Object.defineProperty(t,Pd,{value:function({fs:e,gitdir:r,cache:i}){return new Lg({fs:e,gitdir:r,cache:i})}}),Object.freeze(t),t}var Ve=class t extends Te{constructor(e){super(`Could not find ${e}.`),this.code=this.name=t.code,this.data={what:e}}};Ve.code="NotFoundError";var br=class t extends Te{constructor(e,r,i,n){super(`Object ${e} ${n?`at ${n}`:""}was anticipated to be a ${i} but it is a ${r}.`),this.code=this.name=t.code,this.data={oid:e,actual:r,expected:i,filepath:n}}};br.code="ObjectTypeError";var Rs=class t extends Te{constructor(e){super(`Expected a 40-char hex object id but saw "${e}".`),this.code=this.name=t.code,this.data={value:e}}};Rs.code="InvalidOidError";var Gc=class t extends Te{constructor(e){super(`Could not find a fetch refspec for remote "${e}". Make sure the config file has an entry like the following:
|
||||
[remote "${e}"]
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
`),this.code=this.name=t.code,this.data={remote:e}}};Gc.code="NoRefspecError";var wd=class t{constructor(e){if(this.refs=new Map,this.parsedConfig=[],e){let r=null;this.parsedConfig=e.trim().split(`
|
||||
`).map(i=>{if(/^\s*#/.test(i))return{line:i,comment:!0};let n=i.indexOf(" ");if(i.startsWith("^")){let s=i.slice(1);return this.refs.set(r+"^{}",s),{line:i,ref:r,peeled:s}}else{let s=i.slice(0,n);return r=i.slice(n+1),this.refs.set(r,s),{line:i,ref:r,oid:s}}})}return this}static from(e){return new t(e)}delete(e){this.parsedConfig=this.parsedConfig.filter(r=>r.ref!==e),this.refs.delete(e)}toString(){return this.parsedConfig.map(({line:e})=>e).join(`
|
||||
`)+`
|
||||
`}},bd=class t{constructor({remotePath:e,localPath:r,force:i,matchPrefix:n}){Object.assign(this,{remotePath:e,localPath:r,force:i,matchPrefix:n})}static from(e){let[r,i,n,s,a]=e.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),o=r==="+",l=n==="*";if(l!==(a==="*"))throw new he("Invalid refspec");return new t({remotePath:i,localPath:s,force:o,matchPrefix:l})}translate(e){if(this.matchPrefix){if(e.startsWith(this.remotePath))return this.localPath+e.replace(this.remotePath,"")}else if(e===this.remotePath)return this.localPath;return null}reverseTranslate(e){if(this.matchPrefix){if(e.startsWith(this.localPath))return this.remotePath+e.replace(this.localPath,"")}else if(e===this.localPath)return this.remotePath;return null}},Ng=class t{constructor(e=[]){this.rules=e}static from(e){let r=[];for(let i of e)r.push(bd.from(i));return new t(r)}add(e){let r=bd.from(e);this.rules.push(r)}translate(e){let r=[];for(let i of this.rules)for(let n of e){let s=i.translate(n);s&&r.push([n,s])}return r}translateOne(e){let r=null;for(let i of this.rules){let n=i.translate(e);n&&(r=n)}return r}localNamespaces(){return this.rules.filter(e=>e.matchPrefix).map(e=>e.localPath.replace(/\/$/,""))}};function TO(t,e){let r=t.replace(/\^\{\}$/,""),i=e.replace(/\^\{\}$/,""),n=-(r<i)||+(r>i);return n===0?t.endsWith("^{}")?1:-1:n}function PO(t,e){let r="",i=0,n=-1,s=0,a="\0";for(let o=0;o<=t.length;++o){if(o<t.length)a=t[o];else{if(a==="/")break;a="/"}if(a==="/"){if(!(n===o-1||s===1))if(s===2){if(r.length<2||i!==2||r.at(-1)!=="."||r.at(-2)!=="."){if(r.length>2){let l=r.lastIndexOf("/");l===-1?(r="",i=0):(r=r.slice(0,l),i=r.length-1-r.lastIndexOf("/")),n=o,s=0;continue}else if(r.length!==0){r="",i=0,n=o,s=0;continue}}e&&(r+=r.length>0?"/..":"..",i=2)}else r.length>0?r+="/"+t.slice(n+1,o):r=t.slice(n+1,o),i=o-n-1;n=o,s=0}else a==="."&&s!==-1?++s:s=-1}return r}function RO(t){return t.length>=2&&/^[a-zA-Z]:/.test(t)?t.slice(0,2):null}function $O(t){if(!t.length)return".";t=t.replace(/\\/g,"/");let e=RO(t),r=t[0]==="/"||e!==null&&t[2]==="/",i=t.at(-1)==="/",n=e?t.slice(2):t,s=PO(n,!r);if(!s.length){let a=e?r?e+"/":e:r?"/":".";return i&&!r?a+"/":a}return i&&(s+="/"),e?r?`${e}/${s}`:`${e}${s}`:r?`/${s}`:s}function B(...t){if(t.length===0)return".";let e;for(let r=0;r<t.length;++r){let i=t[r].replace(/\\/g,"/");i.length!==0&&(/^[a-zA-Z]:\//.test(i)||e===void 0?e=i:e+="/"+i)}return e===void 0?".":$O(e)}var FO=t=>{if(typeof t=="number")return t;t=t.toLowerCase();let e=parseInt(t);return t.endsWith("k")&&(e*=1024),t.endsWith("m")&&(e*=1024*1024),t.endsWith("g")&&(e*=1024*1024*1024),e},Bc=t=>{if(typeof t=="boolean")return t;if(t=t.trim().toLowerCase(),t==="true"||t==="yes"||t==="on")return!0;if(t==="false"||t==="no"||t==="off")return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${t}`)},bE={core:{filemode:Bc,bare:Bc,logallrefupdates:Bc,symlinks:Bc,ignorecase:Bc,bigFileThreshold:FO}},IO=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,MO=/^[A-Za-z0-9-.]+$/,DO=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,OO=/^[A-Za-z][A-Za-z-]*$/,LO=/^(.*?)( *[#;].*)$/,NO=t=>{let e=IO.exec(t);if(e!=null){let[r,i]=e.slice(1);return[r,i]}return null},BO=t=>{let e=DO.exec(t);if(e!=null){let[r,i="true"]=e.slice(1),n=HO(i),s=UO(n);return[r,s]}return null},HO=t=>{let e=LO.exec(t);if(e==null)return t;let[r,i]=e.slice(1);return _E(r)&&_E(i)?`${r}${i}`:r},_E=t=>(t.match(/(?:^|[^\\])"/g)||[]).length%2!==0,UO=t=>t.split("").reduce((e,r,i,n)=>{let s=r==='"'&&n[i-1]!=="\\",a=r==="\\"&&n[i+1]==='"';return s||a?e:e+r},""),yE=t=>t!=null?t.toLowerCase():null,Bg=(t,e,r)=>[yE(t),e,yE(r)].filter(i=>i!=null).join("."),xE=t=>{let e=t.split("."),r=e.shift(),i=e.pop(),n=e.length?e.join("."):void 0;return{section:r,subsection:n,name:i,path:Bg(r,n,i),sectionPath:Bg(r,n,null),isSection:!!r}},GO=(t,e)=>t.reduce((r,i,n)=>e(i)?n:r,-1),Hg=class t{constructor(e){let r=null,i=null;this.parsedConfig=e?e.split(`
|
||||
`).map(n=>{let s=null,a=null,o=n.trim(),l=NO(o),c=l!=null;if(c)[r,i]=l;else{let f=BO(o);f!=null&&([s,a]=f)}let u=Bg(r,i,s);return{line:n,isSection:c,section:r,subsection:i,name:s,value:a,path:u}}):[]}static from(e){return new t(e)}async get(e,r=!1){let i=xE(e).path,n=this.parsedConfig.filter(s=>s.path===i).map(({section:s,name:a,value:o})=>{let l=bE[s]&&bE[s][a];return l?l(o):o});return r?n:n.pop()}async getall(e){return this.get(e,!0)}async getSubsections(e){return this.parsedConfig.filter(r=>r.isSection&&r.section===e).map(r=>r.subsection)}async deleteSection(e,r){this.parsedConfig=this.parsedConfig.filter(i=>!(i.section===e&&i.subsection===r))}async append(e,r){return this.set(e,r,!0)}async set(e,r,i=!1){let{section:n,subsection:s,name:a,path:o,sectionPath:l,isSection:c}=xE(e),u=GO(this.parsedConfig,f=>f.path===o);if(r==null)u!==-1&&this.parsedConfig.splice(u,1);else if(u!==-1){let f=this.parsedConfig[u],d=Object.assign({},f,{name:a,value:r,modified:!0});i?this.parsedConfig.splice(u+1,0,d):this.parsedConfig[u]=d}else{let f=this.parsedConfig.findIndex(h=>h.path===l),d={section:n,subsection:s,name:a,value:r,modified:!0,path:o};if(MO.test(n)&&OO.test(a))if(f>=0)this.parsedConfig.splice(f+1,0,d);else{let h={isSection:c,section:n,subsection:s,modified:!0,path:l};this.parsedConfig.push(h,d)}}}toString(){return this.parsedConfig.map(({line:e,section:r,subsection:i,name:n,value:s,modified:a=!1})=>a?n!=null&&s!=null?typeof s=="string"&&/[#;]/.test(s)?` ${n} = "${s}"`:` ${n} = ${s}`:i!=null?`[${r} "${i}"]`:`[${r}]`:e).join(`
|
||||
`)}},ht=class{static async get({fs:e,gitdir:r}){let i=await e.read(`${r}/config`,{encoding:"utf8"});return Hg.from(i)}static async save({fs:e,gitdir:r,config:i}){await e.write(`${r}/config`,i.toString(),{encoding:"utf8"})}},pd=t=>[`${t}`,`refs/${t}`,`refs/tags/${t}`,`refs/heads/${t}`,`refs/remotes/${t}`,`refs/remotes/${t}/HEAD`],jO=["config","description","index","shallow","commondir"],Ag;async function Ts(t,e){return Ag===void 0&&(Ag=new Vo.default),Ag.acquire(t,e)}var q=class t{static async updateRemoteRefs({fs:e,gitdir:r,remote:i,refs:n,symrefs:s,tags:a,refspecs:o=void 0,prune:l=!1,pruneTags:c=!1}){for(let v of n.values())if(!v.match(/[0-9a-f]{40}/))throw new Rs(v);let u=await ht.get({fs:e,gitdir:r});if(!o){if(o=await u.getall(`remote.${i}.fetch`),o.length===0)throw new Gc(i);o.unshift(`+HEAD:refs/remotes/${i}/HEAD`)}let f=Ng.from(o),d=new Map;if(c){let v=await t.listRefs({fs:e,gitdir:r,filepath:"refs/tags"});await t.deleteRefs({fs:e,gitdir:r,refs:v.map(b=>`refs/tags/${b}`)})}if(a){for(let v of n.keys())if(v.startsWith("refs/tags")&&!v.endsWith("^{}")&&!await t.exists({fs:e,gitdir:r,ref:v})){let b=n.get(v);d.set(v,b)}}let h=f.translate([...n.keys()]);for(let[v,b]of h){let _=n.get(v);d.set(b,_)}let p=f.translate([...s.keys()]);for(let[v,b]of p){let _=s.get(v),C=f.translateOne(_);C&&d.set(b,`ref: ${C}`)}let g=[];if(l){for(let v of f.localNamespaces()){let b=(await t.listRefs({fs:e,gitdir:r,filepath:v})).map(_=>`${v}/${_}`);for(let _ of b)d.has(_)||g.push(_)}g.length>0&&await t.deleteRefs({fs:e,gitdir:r,refs:g})}for(let[v,b]of d)await Ts(v,async()=>e.write(B(r,v),`${b.trim()}
|
||||
`,"utf8"));return{pruned:g}}static async writeRef({fs:e,gitdir:r,ref:i,value:n}){if(!n.match(/[0-9a-f]{40}/))throw new Rs(n);await Ts(i,async()=>e.write(B(r,i),`${n.trim()}
|
||||
`,"utf8"))}static async writeSymbolicRef({fs:e,gitdir:r,ref:i,value:n}){await Ts(i,async()=>e.write(B(r,i),`ref: ${n.trim()}
|
||||
`,"utf8"))}static async deleteRef({fs:e,gitdir:r,ref:i}){return t.deleteRefs({fs:e,gitdir:r,refs:[i]})}static async deleteRefs({fs:e,gitdir:r,refs:i}){await Promise.all(i.map(o=>e.rm(B(r,o))));let n=await Ts("packed-refs",async()=>e.read(`${r}/packed-refs`,{encoding:"utf8"})),s=wd.from(n),a=s.refs.size;for(let o of i)s.refs.has(o)&&s.delete(o);s.refs.size<a&&(n=s.toString(),await Ts("packed-refs",async()=>e.write(`${r}/packed-refs`,n,{encoding:"utf8"})))}static async resolve({fs:e,gitdir:r,ref:i,depth:n=void 0,visited:s=new Set}){if(n!==void 0&&(n--,n===-1))return i;if(i.startsWith("ref: "))return i=i.slice(5),t.resolve({fs:e,gitdir:r,ref:i,depth:n,visited:s});if(i.length===40&&/[0-9a-f]{40}/.test(i))return i;let a=await t.packedRefs({fs:e,gitdir:r}),o=pd(i).filter(l=>!jO.includes(l));for(let l of o){let c=await Ts(l,async()=>await e.read(`${r}/${l}`,{encoding:"utf8"})||a.get(l));if(c){if(s.has(l))throw new he(`Circular reference detected while resolving ref "${l}"`);return s.add(l),t.resolve({fs:e,gitdir:r,ref:c.trim(),depth:n,visited:s})}}throw new Ve(i)}static async exists({fs:e,gitdir:r,ref:i}){try{return await t.expand({fs:e,gitdir:r,ref:i}),!0}catch(n){return!1}}static async expand({fs:e,gitdir:r,ref:i}){if(i.length===40&&/[0-9a-f]{40}/.test(i))return i;let n=await t.packedRefs({fs:e,gitdir:r}),s=pd(i);for(let a of s)if(await Ts(a,async()=>e.exists(`${r}/${a}`))||n.has(a))return a;throw new Ve(i)}static async expandAgainstMap({ref:e,map:r}){let i=pd(e);for(let n of i)if(await r.has(n))return n;throw new Ve(e)}static resolveAgainstMap({ref:e,fullref:r=e,depth:i=void 0,map:n}){if(i!==void 0&&(i--,i===-1))return{fullref:r,oid:e};if(e.startsWith("ref: "))return e=e.slice(5),t.resolveAgainstMap({ref:e,fullref:r,depth:i,map:n});if(e.length===40&&/[0-9a-f]{40}/.test(e))return{fullref:r,oid:e};let s=pd(e);for(let a of s){let o=n.get(a);if(o)return t.resolveAgainstMap({ref:o.trim(),fullref:a,depth:i,map:n})}throw new Ve(e)}static async packedRefs({fs:e,gitdir:r}){let i=await Ts("packed-refs",async()=>e.read(`${r}/packed-refs`,{encoding:"utf8"}));return wd.from(i).refs}static async listRefs({fs:e,gitdir:r,filepath:i}){let n=t.packedRefs({fs:e,gitdir:r}),s=null;try{s=await e.readdirDeep(`${r}/${i}`),s=s.map(a=>a.replace(`${r}/${i}/`,""))}catch(a){s=[]}for(let a of(await n).keys())a.startsWith(i)&&(a=a.replace(i+"/",""),s.includes(a)||s.push(a));return s.sort(TO),s}static async listBranches({fs:e,gitdir:r,remote:i}){return i?t.listRefs({fs:e,gitdir:r,filepath:`refs/remotes/${i}`}):t.listRefs({fs:e,gitdir:r,filepath:"refs/heads"})}static async listTags({fs:e,gitdir:r}){return(await t.listRefs({fs:e,gitdir:r,filepath:"refs/tags"})).filter(n=>!n.endsWith("^{}"))}};function VO(t,e){return Td(EE(t),EE(e))}function EE(t){return t.mode==="040000"?t.path+"/":t.path}function YE(t){switch(t){case"040000":return"tree";case"100644":return"blob";case"100755":return"blob";case"120000":return"blob";case"160000":return"commit"}throw new he(`Unexpected GitTree entry mode: ${t}`)}function zO(t){let e=[],r=0;for(;r<t.length;){let i=t.indexOf(32,r);if(i===-1)throw new he(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next space character.`);let n=t.indexOf(0,r);if(n===-1)throw new he(`GitTree: Error parsing buffer at byte location ${r}: Could not find the next null character.`);let s=t.slice(r,i).toString("utf8");s==="40000"&&(s="040000");let a=YE(s),o=t.slice(i+1,n).toString("utf8"),l=o.replace(/[\u200C-\u200F\u202A-\u202E\u206A-\u206F\uFEFF]/g,""),u=l.split(":")[0].toLowerCase().replace(/[. ]+$/,"");if(o.includes("\\")||o.includes("/")||l==="."||l===".."||u===".git"||/^\.?git~[1-9]$/.test(u))throw new va(o);let f=t.slice(n+1,n+21).toString("hex");r=n+21,e.push({mode:s,path:o,oid:f,type:a})}return e}function WO(t){if(typeof t=="number"&&(t=t.toString(8)),t.match(/^0?4.*/))return"040000";if(t.match(/^1006.*/))return"100644";if(t.match(/^1007.*/))return"100755";if(t.match(/^120.*/))return"120000";if(t.match(/^160.*/))return"160000";throw new he(`Could not understand file mode: ${t}`)}function qO(t){return!t.oid&&t.sha&&(t.oid=t.sha),t.mode=WO(t.mode),t.type||(t.type=YE(t.mode)),t}var Mr=class t{constructor(e){if(k.isBuffer(e))this._entries=zO(e);else if(Array.isArray(e))this._entries=e.map(qO);else throw new he("invalid type passed to GitTree constructor");this._entries.sort(VE)}static from(e){return new t(e)}render(){return this._entries.map(e=>`${e.mode} ${e.type} ${e.oid} ${e.path}`).join(`
|
||||
`)}toObject(){let e=[...this._entries];return e.sort(VO),k.concat(e.map(r=>{let i=k.from(r.mode.replace(/^0/,"")),n=k.from(" "),s=k.from(r.path,"utf8"),a=k.from([0]),o=k.from(r.oid,"hex");return k.concat([i,n,s,a,o])}))}entries(){return this._entries}*[Symbol.iterator](){for(let e of this._entries)yield e}},$s=class{static wrap({type:e,object:r}){let i=`${e} ${r.length}\0`,n=i.length,s=n+r.length,a=new Uint8Array(s);for(let o=0;o<n;o++)a[o]=i.charCodeAt(o);return a.set(r,n),a}static unwrap(e){let r=e.indexOf(32),i=e.indexOf(0),n=e.slice(0,r).toString("utf8"),s=e.slice(r+1,i).toString("utf8"),a=e.length-(i+1);if(parseInt(s)!==a)throw new he(`Length mismatch: expected ${s} bytes but got ${a} instead.`);return{type:n,object:k.from(e.slice(i+1))}}};async function ZE({fs:t,gitdir:e,oid:r}){let i=`objects/${r.slice(0,2)}/${r.slice(2)}`,n=await t.read(`${e}/${i}`);return n?{object:n,format:"deflated",source:i}:null}function YO(t,e){let r=new Ui(t),i=SE(r);if(i!==e.byteLength)throw new he(`applyDelta expected source buffer to be ${i} bytes but the provided buffer was ${e.length} bytes`);let n=SE(r),s,a=CE(r,e);if(a.byteLength===n)s=a;else{let o=[a],l=a.byteLength;for(;!r.eof();){let c=CE(r,e);o.push(c),l+=c.byteLength}if(n!==l)throw new he(`applyDelta expected target buffer to be ${n} bytes but the resulting buffer was ${l} bytes`);s=k.concat(o,n)}return s}function SE(t){let e=0,r=0,i=null;do i=t.readUInt8(),e|=(i&127)<<r,r+=7;while(i&128);return e}function kE(t,e,r){let i=0,n=0;for(;r--;)e&1&&(i|=t.readUInt8()<<n),e>>=1,n+=8;return i}function CE(t,e){let r=t.readUInt8(),i=128,n=15,s=112;if(r&i){let a=kE(t,r&n,4),o=kE(t,(r&s)>>4,3);return o===0&&(o=65536),e.slice(a,a+o)}else return t.slice(r)}function ZO(t){let e=[t];return{next(){return Promise.resolve({done:e.length===0,value:e.pop()})},return(){return e=[],{}},[Symbol.asyncIterator](){return this}}}function KE(t){return t[Symbol.asyncIterator]?t[Symbol.asyncIterator]():t[Symbol.iterator]?t[Symbol.iterator]():t.next?t:ZO(t)}var _d=class{constructor(e){if(typeof k=="undefined")throw new Error("Missing Buffer dependency");this.stream=KE(e),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),!(this.cursor===this.buffer.length&&(await this._loadnext(),this._ended))))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(e){if(!this.eof())return this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e),this.buffer.slice(this.undoCursor,this.cursor)}async skip(e){this.eof()||(this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:e,value:r}=await this.stream.next();return e&&(this._ended=!0,!r)?k.alloc(0):(r&&(r=k.from(r)),r)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(e){this.undoCursor=this.cursor,this.cursor+=e,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(e){if(this._ended)return;let r=[this.buffer];for(;this.cursor+e>KO(r);){let i=await this._next();if(this._ended)break;r.push(i)}this.buffer=k.concat(r)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}};function KO(t){return t.reduce((e,r)=>e+r.length,0)}async function XO(t,e){let r=new _d(t),i=await r.read(4);if(i=i.toString("utf8"),i!=="PACK")throw new he(`Invalid PACK header '${i}'`);let n=await r.read(4);if(n=n.readUInt32BE(0),n!==2)throw new he(`Invalid packfile version: ${n}`);let s=await r.read(4);if(s=s.readUInt32BE(0),!(s<1))for(;!r.eof()&&s--;){let a=r.tell(),{type:o,length:l,ofs:c,reference:u}=await QO(r),f=new Ad.default.Inflate;for(;!f.result;){let d=await r.chunk();if(!d)break;if(f.push(d,!1),f.err)throw new he(`Pako error: ${f.msg}`);if(f.result){if(f.result.length!==l)throw new he("Inflated object size is different from that stated in packfile.");await r.undo(),await r.read(d.length-f.strm.avail_in);let h=r.tell();await e({data:f.result,type:o,num:s,offset:a,end:h,reference:u,ofs:c})}}}}async function QO(t){let e=await t.byte(),r=e>>4&7,i=e&15;if(e&128){let a=4;do e=await t.byte(),i|=(e&127)<<a,a+=7;while(e&128)}let n,s;if(r===6){let a=0;n=0;let o=[];do e=await t.byte(),n|=(e&127)<<a,a+=7,o.push(e);while(e&128);s=k.from(o)}return r===7&&(s=await t.read(20)),{type:r,l
Line truncated
|
||||
`,t}function yd(t){let[,e,r,i,n]=t.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:e,email:r,timestamp:Number(i),timezoneOffset:cL(n)}}function cL(t){let[,e,r,i]=t.match(/(\+|-)(\d\d)(\d\d)/);return i=(e==="+"?1:-1)*(Number(r)*60+Number(i)),uL(i)}function uL(t){return t===0?t:-t}var Jr=class t{constructor(e){if(typeof e=="string")this._tag=e;else if(k.isBuffer(e))this._tag=e.toString("utf8");else if(typeof e=="object")this._tag=t.render(e);else throw new he("invalid type passed to GitAnnotatedTag constructor")}static from(e){return new t(e)}static render(e){return`object ${e.object}
|
||||
type ${e.type}
|
||||
tag ${e.tag}
|
||||
tagger ${Ug(e.tagger)}
|
||||
|
||||
${e.message}
|
||||
${e.gpgsig?e.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(`
|
||||
|
||||
`))}message(){let e=this.withoutSignature();return e.slice(e.indexOf(`
|
||||
|
||||
`)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let e=this.justHeaders().split(`
|
||||
`),r=[];for(let n of e)n[0]===" "?r[r.length-1]+=`
|
||||
`+n.slice(1):r.push(n);let i={};for(let n of r){let s=n.slice(0,n.indexOf(" ")),a=n.slice(n.indexOf(" ")+1);Array.isArray(i[s])?i[s].push(a):i[s]=a}return i.tagger&&(i.tagger=yd(i.tagger)),i.committer&&(i.committer=yd(i.committer)),i}withoutSignature(){let e=Yn(this._tag);return e.indexOf(`
|
||||
-----BEGIN PGP SIGNATURE-----`)===-1?e:e.slice(0,e.lastIndexOf(`
|
||||
-----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(`
|
||||
-----BEGIN PGP SIGNATURE-----`)===-1)return;let e=this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27);return Yn(e)}payload(){return this.withoutSignature()+`
|
||||
`}toObject(){return k.from(this._tag,"utf8")}static async sign(e,r,i){let n=e.payload(),{signature:s}=await r({payload:n,secretKey:i});s=Yn(s);let a=n+s;return t.from(a)}};function Pg(t){return t.trim().split(`
|
||||
`).map(e=>" "+e).join(`
|
||||
`)+`
|
||||
`}function fL(t){return t.split(`
|
||||
`).map(e=>e.replace(/^ /,"")).join(`
|
||||
`)}var Dr=class t{constructor(e){if(typeof e=="string")this._commit=e;else if(k.isBuffer(e))this._commit=e.toString("utf8");else if(typeof e=="object")this._commit=t.render(e);else throw new he("invalid type passed to GitCommit constructor")}static fromPayloadSignature({payload:e,signature:r}){let i=t.justHeaders(e),n=t.justMessage(e),s=Yn(i+`
|
||||
gpgsig`+Pg(r)+`
|
||||
`+n);return new t(s)}static from(e){return new t(e)}toObject(){return k.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return t.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(e){return Yn(e.slice(e.indexOf(`
|
||||
|
||||
`)+2))}static justHeaders(e){return e.slice(0,e.indexOf(`
|
||||
|
||||
`))}parseHeaders(){let e=t.justHeaders(this._commit).split(`
|
||||
`),r=[];for(let n of e)n[0]===" "?r[r.length-1]+=`
|
||||
`+n.slice(1):r.push(n);let i={parent:[]};for(let n of r){let s=n.slice(0,n.indexOf(" ")),a=n.slice(n.indexOf(" ")+1);Array.isArray(i[s])?i[s].push(a):i[s]=a}return i.author&&(i.author=yd(i.author)),i.committer&&(i.committer=yd(i.committer)),i}static renderHeaders(e){let r="";if(e.tree?r+=`tree ${e.tree}
|
||||
`:r+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
|
||||
`,e.parent){if(e.parent.length===void 0)throw new he("commit 'parent' property should be an array");for(let s of e.parent)r+=`parent ${s}
|
||||
`}let i=e.author;r+=`author ${Ug(i)}
|
||||
`;let n=e.committer||e.author;return r+=`committer ${Ug(n)}
|
||||
`,e.gpgsig&&(r+="gpgsig"+Pg(e.gpgsig)),r}static render(e){return t.renderHeaders(e)+`
|
||||
`+Yn(e.message)}render(){return this._commit}withoutSignature(){let e=Yn(this._commit);if(e.indexOf(`
|
||||
gpgsig`)===-1)return e;let r=e.slice(0,e.indexOf(`
|
||||
gpgsig`)),i=e.slice(e.indexOf(`-----END PGP SIGNATURE-----
|
||||
`)+28);return Yn(r+`
|
||||
`+i)}isolateSignature(){let e=this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27);return fL(e)}static async sign(e,r,i){let n=e.withoutSignature(),s=t.justMessage(e._commit),{signature:a}=await r({payload:n,secretKey:i});a=Yn(a);let l=t.justHeaders(e._commit)+`
|
||||
gpgsig`+Pg(a)+`
|
||||
`+s;return t.from(l)}};async function Xo({fs:t,cache:e,gitdir:r,oid:i}){if(i==="4b825dc642cb6eb9a060e54bf8d69288fbee4904")return{tree:Mr.from([]),oid:i};let{type:n,object:s}=await tt({fs:t,cache:e,gitdir:r,oid:i});if(n==="tag")return i=Jr.from(s).parse().object,Xo({fs:t,cache:e,gitdir:r,oid:i});if(n==="commit")return i=Dr.from(s).parse().tree,Xo({fs:t,cache:e,gitdir:r,oid:i});if(n!=="tree")throw new br(i,n,"tree");return{tree:Mr.from(s),oid:i}}var Gg=class{constructor({fs:e,gitdir:r,ref:i,cache:n}){this.fs=e,this.cache=n,this.gitdir=r,this.mapPromise=(async()=>{let a=new Map,o;try{o=await q.resolve({fs:e,gitdir:r,ref:i})}catch(c){c instanceof Ve&&(o="4b825dc642cb6eb9a060e54bf8d69288fbee4904")}let l=await Xo({fs:e,cache:this.cache,gitdir:r,oid:o});return l.type="tree",l.mode="40000",a.set(".",l),a})();let s=this;this.ConstructEntry=class{constructor(o){this._fullpath=o,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return s.type(this)}async mode(){return s.mode(this)}async stat(){return s.stat(this)}async content(){return s.content(this)}async oid(){return s.oid(this)}}}async readdir(e){let r=e._fullpath,{fs:i,cache:n,gitdir:s}=this,a=await this.mapPromise,o=a.get(r);if(!o)throw new Error(`No obj for ${r}`);let l=o.oid;if(!l)throw new Error(`No oid for obj ${JSON.stringify(o)}`);if(o.type!=="tree")return null;let{type:c,object:u}=await tt({fs:i,cache:n,gitdir:s,oid:l});if(c!==o.type)throw new br(l,c,o.type);let f=Mr.from(u);for(let d of f)a.set(B(r,d.path),d);return f.entries().map(d=>B(r,d.path))}async type(e){if(e._type===!1){let r=await this.mapPromise,{type:i}=r.get(e._fullpath);e._type=i}return e._type}async mode(e){if(e._mode===!1){let r=await this.mapPromise,{mode:i}=r.get(e._fullpath);e._mode=zE(parseInt(i,8))}return e._mode}async stat(e){}async content(e){if(e._content===!1){let r=await this.mapPromise,{fs:i,cache:n,gitdir:s}=this,o=r.get(e._fullpath).oid,{type:l,object:c}=await tt({fs:i,cache:n,gitdir:s,oid:o});l!=="blob"?e._content=void 0:e._content=new Uint8Array(c)}return e._content}async oid(e){if(e._oid===!1){let i=(await this.mapPromise).get(e._fullpath);e._oid=i.oid}return e._oid}};function Fr({ref:t="HEAD"}={}){let e=Object.create(null);return Object.defineProperty(e,Pd,{value:function({fs:r,gitdir:i,cache:n}){return new Gg({fs:r,gitdir:i,ref:t,cache:n})}}),Object.freeze(e),e}var jg=class{constructor({fs:e,dir:r,gitdir:i,cache:n,refresh:s=!0}){this.fs=e,this.cache=n,this.dir=r,this.gitdir=i,this.refresh=s,this.config=null;let a=this;this.ConstructEntry=class{constructor(l){this._fullpath=l,this._type=!1,this._mode=!1,this._stat=!1,this._content=!1,this._oid=!1}async type(){return a.type(this)}async mode(){return a.mode(this)}async stat(){return a.stat(this)}async content(){return a.content(this)}async oid(){return a.oid(this)}}}async readdir(e){if(await e.type()!=="tree")return null;let r=e._fullpath,{fs:i,dir:n}=this,s=await i.readdir(B(n,r));return s===null?null:s.map(a=>B(r,a))}async type(e){return e._type===!1&&await e.stat(),e._type}async mode(e){return e._mode===!1&&await e.stat(),e._mode}async stat(e){if(e._stat===!1){let{fs:r,dir:i}=this,n=await r.lstat(`${i}/${e._fullpath}`);if(!n)throw new Error(`ENOENT: no such file or directory, lstat '${e._fullpath}'`);let s=n.isDirectory()?"tree":"blob";s==="blob"&&!n.isFile()&&!n.isSymbolicLink()&&(s="special"),e._type=s,n=Wo(n),e._mode=n.mode,n.size===-1&&e._actualSize&&(n.size=e._actualSize),e._stat=n}return e._stat}async content(e){if(e._content===!1){let{fs:r,dir:i,gitdir:n}=this;if(await e.type()==="tree")e._content=void 0;else{let s;if(await e.mode()>>12===10)s=await r.readlink(`${i}/${e._fullpath}`);else{let o=await(await this._getGitConfig(r,n)).get("core.autocrlf");s=await r.read(`${i}/${e._fullpath}`,{autocrlf:o})}e._actualSize=s.length,e._stat&&e._stat.size===-1&&(e._stat.size=e._actualSize),e._content=new Uint8Array(s)}}return e._content}async oid(e){if(e._oid===!1){let r=this,{fs:i,gitdir:n,cache:s}=this,a;await dt.acquire({fs:i,gitdir:n,cache:s},async function(o){let l=o.entriesMap.get(e._fullpath),c=await e.stat(),f=await(await r._getGitConfig(i,n)).get("core.filemode"),d=typeof process!="undefined"?process.platform!=="win32":!0;if(!l||gd(c,l,f,d)){let h=await e.content();h===void 0?a=void 0:(a=await bn($s.wrap({type:"blob",object:h})),r.refresh&&l&&a===l.oid&&(!f||c.mode===l.mode)&&gd(c,l,f,d)&&o.insert({filepath:e._fullpath,stats:c,oid:a}))}else a=l.oid}),e._oid=a}return e._oid}async _getGitConfig(e,r){return this.config?this.config:(this.config=await ht.get({fs:e,gitdir:r}),this.config)}};function cu({refresh:t=!0}={}){let e=Object.create(null);return Object.defineProperty(e,Pd,{value:function({fs:r,dir:i,gitdir:n,cache:s}){return new jg({fs:r,dir:i,gitdir:n,cache:s,refresh:t})}}),Object.freeze(e),e}function dL(t,e){let r=e-t;return Array.from({length:r},(i,n)=>t+n)}var QE=typeof Array.prototype.flat=="undefined"?t=>t.reduce((e,r)=>e.concat(r),[]):t=>t.flat(),Vg=class{constructor(){this
Line truncated
|
||||
`),i=new TextEncoder().encode(i)}catch(n){}return typeof i!="string"&&(i=k.from(i)),i}catch(i){return null}}async write(e,r,i={}){try{await this._writeFile(e,r,i)}catch(n){await this.mkdir(wa(e)),await this._writeFile(e,r,i)}}async mkdir(e,r=!1){try{await this._mkdir(e)}catch(i){if(i===null||i.code==="EEXIST")return;if(r)throw i;if(i.code==="ENOENT"){let n=wa(e);if(n==="."||n==="/"||n===e)throw i;await this.mkdir(n),await this.mkdir(e,!0)}}}async rm(e){try{await this._unlink(e)}catch(r){if(r.code!=="ENOENT")throw r}}async rmdir(e,r){try{r&&r.recursive?await this._rm(e,r):await this._rmdir(e)}catch(i){if(i.code!=="ENOENT")throw i}}async readdir(e){try{let r=await this._readdir(e);return r.sort(Td),r}catch(r){return r.code==="ENOTDIR"?null:[]}}async readdirDeep(e){let r=await this._readdir(e);return(await Promise.all(r.map(async n=>{let s=e+"/"+n;return(await this._stat(s)).isDirectory()?this.readdirDeep(s):s}))).reduce((n,s)=>n.concat(s),[])}async lstat(e){try{return await this._lstat(e)}catch(r){if(r.code==="ENOENT"||(r.code||"").includes("ENS"))return null;throw r}}async readlink(e,r={encoding:"buffer"}){try{let i=await this._readlink(e,r);return k.isBuffer(i)?i:k.from(i)}catch(i){if(i.code==="ENOENT"||(i.code||"").includes("ENS"))return null;throw i}}async writelink(e,r){return this._symlink(r.toString("utf8"),e)}};function R(t,e){if(e===void 0)throw new Ir(t)}function gL(t){return t.startsWith("/")||/^[a-zA-Z]:[\\/]/.test(t)}async function re({fsp:t,dotgit:e}){R("fsp",t),R("dotgit",e);let r=await t._stat(e).catch(()=>({isFile:()=>!1,isDirectory:()=>!1}));return r.isDirectory()?e:r.isFile()?t._readFile(e,"utf8").then(i=>i.trimRight().substr(8)).then(i=>gL(i)?i:B(wa(e),i)):e}async function xd(t,e){return!t&&!e?!1:t&&!e||!t&&e?!0:!(await t.type()==="tree"&&await e.type()==="tree"||await t.type()===await e.type()&&await t.mode()===await e.mode()&&await t.oid()===await e.oid())}async function vL({fs:t,dir:e,gitdir:r=B(e,".git"),commit:i="HEAD",cache:n={}}){try{R("fs",t),R("dir",e),R("gitdir",r);let s=new J(t),a=[Fr({ref:i}),cu(),tl()],o=[],l=await re({fsp:s,dotgit:r});await dt.acquire({fs:s,gitdir:l,cache:n},async function(u){o=u.unmergedPaths});let c=await Zn({fs:s,cache:n,dir:e,gitdir:l,trees:a,map:async function(u,[f,d,h]){let p=!await xd(d,h),g=o.includes(u),v=!await xd(h,f);if(p||g)return f?{path:u,mode:await f.mode(),oid:await f.oid(),type:await f.type(),content:await f.content()}:void 0;if(v)return!1;throw new iu(u)}});await dt.acquire({fs:s,gitdir:l,cache:n},async function(u){for(let f of c)if(f!==!1){if(!f){await s.rmdir(`${e}/${f.path}`,{recursive:!0}),u.delete({filepath:f.path});continue}if(f.type==="blob"){let d=new TextDecoder().decode(f.content);await s.write(`${e}/${f.path}`,d,{mode:f.mode}),u.insert({filepath:f.path,oid:f.oid,stage:0})}}})}catch(s){throw s.caller="git.abortMerge",s}}var Is=class{static async isIgnored({fs:e,dir:r,gitdir:i=B(r,".git"),filepath:n}){if(vd(n)===".git")return!0;if(n===".")return!1;let s="",a=B(i,"info","exclude");await e.exists(a)&&(s=await e.read(a,"utf8"));let o=[{gitignore:B(r,".gitignore"),filepath:n}],l=n.split("/").filter(Boolean);for(let u=1;u<l.length;u++){let f=l.slice(0,u).join("/"),d=l.slice(u).join("/");o.push({gitignore:B(r,f,".gitignore"),filepath:d})}let c=!1;for(let u of o){let f;try{f=await e.read(u.gitignore,"utf8")}catch(p){if(p.code==="NOENT")continue}let d=(0,GE.default)().add(s);d.add(f);let h=wa(u.filepath);if(h!=="."&&d.ignores(h))return!0;c?c=!d.test(u.filepath).unignored:c=d.test(u.filepath).ignored}return c}};async function wL({fs:t,gitdir:e,object:r,format:i,oid:n}){if(i!=="deflated")throw new he("GitObjectStoreLoose expects objects to write to be in deflated format");let s=`objects/${n.slice(0,2)}/${n.slice(2)}`,a=`${e}/${s}`;await t.exists(a)||await t.write(a,r)}var Rg=null;async function JE(t){return Rg===null&&(Rg=_L()),Rg?bL(t):Ad.default.deflate(t)}async function bL(t){let e=new CompressionStream("deflate"),r=new Blob([t]).stream().pipeThrough(e);return new Uint8Array(await new Response(r).arrayBuffer())}function _L(){try{return new CompressionStream("deflate").writable.close(),new Blob([]).stream().cancel(),!0}catch(t){return!1}}async function Or({fs:t,gitdir:e,type:r,object:i,format:n="content",oid:s=void 0,dryRun:a=!1}){return n!=="deflated"&&(n!=="wrapped"&&(i=$s.wrap({type:r,object:i})),s=await bn(i),i=k.from(await JE(i))),a||await wL({fs:t,gitdir:e,object:i,format:"deflated",oid:s}),s}function eS(t){let e;for(;~(e=t.indexOf(92));)t[e]=47;return t}async function yL({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i,cache:n={},force:s=!1,parallel:a=!0}){try{R("fs",t),R("dir",e),R("gitdir",r),R("filepath",i);let o=new J(t),l=await re({fsp:o,dotgit:r});await dt.acquire({fs:o,gitdir:l,cache:n},async c=>{let f=await(await ht.get({fs:o,gitdir:l})).get("core.autocrlf");return Wg({dir:e,gitdir:l,fs:o,filepath:i,index:c,force:s,parallel:a,autocrlf:f})})}catch(o){throw o.caller="git.add",o}}async function Wg({dir:t,gitdir:e,fs:r,filepath:i,in
Line truncated
|
||||
`,author:l,committer:c,signingKey:u})}async function SL({fs:t,onSign:e,dir:r,gitdir:i=B(r,".git"),ref:n="refs/notes/commits",oid:s,note:a,force:o,author:l,committer:c,signingKey:u,cache:f={}}){try{R("fs",t),R("gitdir",i),R("oid",s),R("note",a),u&&R("onSign",e);let d=new J(t),h=await Ms({fs:d,gitdir:i,author:l});if(!h)throw new Kt("author");let p=await xa({fs:d,gitdir:i,author:h,committer:c});if(!p)throw new Kt("committer");let g=await re({fsp:d,dotgit:i});return await EL({fs:d,cache:f,onSign:e,gitdir:g,ref:n,oid:s,note:a,force:o,author:h,committer:p,signingKey:u})}catch(d){throw d.caller="git.addNote",d}}var kL=/(^|[/.])([/.]|$)|^@$|@{|[\x00-\x20\x7f~^:?*[\\]|\.lock(\/|$)/;function au(t,e){if(typeof t!="string")throw new TypeError("Reference name must be a string");return!kL.test(t)&&(!!e||t.includes("/"))}async function sS({fs:t,gitdir:e,remote:r,url:i,force:n}){if(!au(r,!0))throw new ji(r,zo.default.clean(r));let s=await ht.get({fs:t,gitdir:e});if(!n&&(await s.getSubsections("remote")).includes(r)&&i!==await s.get(`remote.${r}.url`))throw new Gi("remote",r);await s.set(`remote.${r}.url`,i),await s.set(`remote.${r}.fetch`,`+refs/heads/*:refs/remotes/${r}/*`),await ht.save({fs:t,gitdir:e,config:s})}async function CL({fs:t,dir:e,gitdir:r=B(e,".git"),remote:i,url:n,force:s=!1}){try{R("fs",t),R("gitdir",r),R("remote",i),R("url",n);let a=new J(t),o=await re({fsp:a,dotgit:r});return await sS({fs:a,gitdir:o,remote:i,url:n,force:s})}catch(a){throw a.caller="git.addRemote",a}}async function AL({fs:t,cache:e,onSign:r,gitdir:i,ref:n,tagger:s,message:a=n,gpgsig:o,object:l,signingKey:c,force:u=!1}){if(n=n.startsWith("refs/tags/")?n:`refs/tags/${n}`,!u&&await q.exists({fs:t,gitdir:i,ref:n}))throw new Gi("tag",n);let f=await q.resolve({fs:t,gitdir:i,ref:l||"HEAD"}),{type:d}=await tt({fs:t,cache:e,gitdir:i,oid:f}),h=Jr.from({object:f,type:d,tag:n.replace("refs/tags/",""),tagger:s,message:a,gpgsig:o});c&&(h=await Jr.sign(h,r,c));let p=await Or({fs:t,gitdir:i,type:"tag",object:h.toObject()});await q.writeRef({fs:t,gitdir:i,ref:n,value:p})}async function TL({fs:t,onSign:e,dir:r,gitdir:i=B(r,".git"),ref:n,tagger:s,message:a=n,gpgsig:o,object:l,signingKey:c,force:u=!1,cache:f={}}){try{R("fs",t),R("gitdir",i),R("ref",n),c&&R("onSign",e);let d=new J(t),h=await re({fsp:d,dotgit:i}),p=await Ms({fs:d,gitdir:h,author:s});if(!p)throw new Kt("tagger");return await AL({fs:d,cache:f,onSign:e,gitdir:h,ref:n,tagger:p,message:a,gpgsig:o,object:l,signingKey:c,force:u})}catch(d){throw d.caller="git.annotatedTag",d}}async function PL({fs:t,gitdir:e,ref:r,object:i,checkout:n=!1,force:s=!1}){if(!au(r,!0))throw new ji(r,zo.default.clean(r));let a=`refs/heads/${r}`;if(!s&&await q.exists({fs:t,gitdir:e,ref:a}))throw new Gi("branch",r,!1);let o;try{o=await q.resolve({fs:t,gitdir:e,ref:i||"HEAD"})}catch(l){}o&&await q.writeRef({fs:t,gitdir:e,ref:a,value:o}),n&&await q.writeSymbolicRef({fs:t,gitdir:e,ref:"HEAD",value:a})}async function RL({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i,object:n,checkout:s=!1,force:a=!1}){try{R("fs",t),R("gitdir",r),R("ref",i);let o=new J(t),l=await re({fsp:o,dotgit:r});return await PL({fs:o,gitdir:l,ref:i,object:n,checkout:s,force:a})}catch(o){throw o.caller="git.branch",o}}async function ou(t,e,r){let i=r.split("/");i.pop();let n=e;for(let s of i){if(s===""||s===".")continue;n=`${n}/${s}`;let a=await t.lstat(n);if(a&&a.isSymbolicLink())throw new va(r)}}var aS=(t,e)=>t==="."||e==null||e.length===0||e==="."?!0:e.length>=t.length?e.startsWith(t):t.startsWith(e);async function Kg({fs:t,cache:e,onProgress:r,onPostCheckout:i,dir:n,gitdir:s,remote:a,ref:o,filepaths:l,noCheckout:c,noUpdateHead:u,dryRun:f,force:d,track:h=!0,nonBlocking:p=!1,batchSize:g=100}){let v;if(i)try{v=await q.resolve({fs:t,gitdir:s,ref:"HEAD"})}catch(_){v="0000000000000000000000000000000000000000"}let b;try{b=await q.resolve({fs:t,gitdir:s,ref:o})}catch(_){if(o==="HEAD")throw _;let C=`${a}/${o}`;if(b=await q.resolve({fs:t,gitdir:s,ref:C}),h){let x=await ht.get({fs:t,gitdir:s});await x.set(`branch.${o}.remote`,a),await x.set(`branch.${o}.merge`,`refs/heads/${o}`),await ht.save({fs:t,gitdir:s,config:x})}await q.writeRef({fs:t,gitdir:s,ref:`refs/heads/${o}`,value:b})}if(!c){let _;try{_=await $L({fs:t,cache:e,onProgress:r,dir:n,gitdir:s,ref:o,force:d,filepaths:l})}catch(w){throw w instanceof Ve&&w.data.what===b?new Yc(o,b):w}let C=_.filter(([w])=>w==="conflict").map(([w,E])=>E);if(C.length>0)throw new zc(C);let x=_.filter(([w])=>w==="error").map(([w,E])=>E);if(x.length>0)throw new he(x.join(", "));if(f){i&&await i({previousHead:v,newHead:b,type:l!=null&&l.length>0?"file":"branch"});return}let S=0,A=_.length;if(await dt.acquire({fs:t,gitdir:s,cache:e},async function(w){await Promise.all(_.filter(([E])=>E==="delete"||E==="delete-index").map(async function([E,y]){let P=`${n}/${y}`;E==="delete"&&await t.rm(P),w.delete({filepath:y}),r&&await r({phase:"Updating workdir",loaded:++S,total:A})}))}),await dt.acquire({fs:t,gitdir:s,cache:e},async function(w){for(let[E,y]of
Line truncated
|
||||
`,d+=p.conflict.a.join(""),d+=`${"=".repeat(f)}
|
||||
`,d+=p.conflict.b.join(""),d+=`${">".repeat(f)} ${i}
|
||||
`);return{cleanMerge:h,mergedText:d}}async function lS({fs:t,cache:e,dir:r,gitdir:i=B(r,".git"),index:n,ourOid:s,baseOid:a,theirOid:o,ourName:l="ours",baseName:c="base",theirName:u="theirs",dryRun:f=!1,abortOnConflict:d=!0,mergeDriver:h}){let p=Fr({ref:s}),g=Fr({ref:a}),v=Fr({ref:o}),b=[],_=[],C=[],x=[],S=await Zn({fs:t,cache:e,dir:r,gitdir:i,trees:[p,g,v],map:async function(A,[w,E,y]){let P=vd(A),T=await xd(w,E),I=await xd(y,E);switch(`${T}-${I}`){case"false-false":return{mode:await E.mode(),path:P,oid:await E.oid(),type:await E.type()};case"false-true":return!y&&await w.type()==="tree"?{mode:await w.mode(),path:P,oid:await w.oid(),type:await w.type()}:y?{mode:await y.mode(),path:P,oid:await y.oid(),type:await y.type()}:void 0;case"true-false":return!w&&await y.type()==="tree"?{mode:await y.mode(),path:P,oid:await y.oid(),type:await y.type()}:w?{mode:await w.mode(),path:P,oid:await w.oid(),type:await w.type()}:void 0;case"true-true":{if(w&&y&&await w.type()==="tree"&&await y.type()==="tree")return{mode:await w.mode(),path:P,oid:await w.oid(),type:"tree"};if(w&&y&&await w.type()==="blob"&&await y.type()==="blob")return DL({fs:t,gitdir:i,path:P,ours:w,base:E,theirs:y,ourName:l,baseName:c,theirName:u,mergeDriver:h}).then(async L=>{if(L.cleanMerge)d||n.insert({filepath:A,oid:L.mergeResult.oid,stage:0});else if(b.push(A),_.push(A),!d){let H="";E&&await E.type()==="blob"&&(H=await E.oid());let te=await w.oid(),xe=await y.oid();n.delete({filepath:A}),H&&n.insert({filepath:A,oid:H,stage:1}),n.insert({filepath:A,oid:te,stage:2}),n.insert({filepath:A,oid:xe,stage:3})}return L.mergeResult});if(E&&!w&&y&&await E.type()==="blob"&&await y.type()==="blob"){if(b.push(A),C.push(A),!d){let L=await E.oid(),H=await y.oid();n.delete({filepath:A}),n.insert({filepath:A,oid:L,stage:1}),n.insert({filepath:A,oid:H,stage:3})}return{mode:await y.mode(),oid:await y.oid(),type:"blob",path:P}}if(E&&w&&!y&&await E.type()==="blob"&&await w.type()==="blob"){if(b.push(A),x.push(A),!d){let L=await E.oid(),H=await w.oid();n.delete({filepath:A}),n.insert({filepath:A,oid:L,stage:1}),n.insert({filepath:A,oid:H,stage:2})}return{mode:await w.mode(),oid:await w.oid(),type:"blob",path:P}}if(E&&!w&&!y&&(await E.type()==="blob"||await E.type()==="tree"))return;throw new Yo}}},reduce:b.length!==0&&(!r||d)?void 0:async(A,w)=>{let E=w.filter(Boolean);if(A&&!(A&&A.type==="tree"&&E.length===0&&A.path!==".")){if(E.length>0||A.path==="."&&E.length===0){let P=new Mr(E).toObject(),T=await Or({fs:t,gitdir:i,type:"tree",object:P,dryRun:f});A.oid=T}return A}}});return b.length!==0?(r&&!d&&await Zn({fs:t,cache:e,dir:r,gitdir:i,trees:[Fr({ref:S.oid})],map:async function(A,[w]){let E=`${r}/${A}`;if(await w.type()==="blob"){let y=await w.mode(),P=await w.content();await t.write(E,P,{mode:y})}return!0}}),new ba(b,_,C,x)):S.oid}async function DL({fs:t,gitdir:e,path:r,ours:i,base:n,theirs:s,ourName:a,theirName:o,baseName:l,dryRun:c,mergeDriver:u=ML}){let f="blob",d="100755",h="",p="";n&&await n.type()==="blob"&&(d=await n.mode(),h=await n.oid(),p=k.from(await n.content()).toString("utf8"));let g=d===await i.mode()?await s.mode():await i.mode();if(await i.oid()===await s.oid())return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await i.oid(),type:f}};if(await i.oid()===h)return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await s.oid(),type:f}};if(await s.oid()===h)return{cleanMerge:!0,mergeResult:{mode:g,path:r,oid:await i.oid(),type:f}};let v=k.from(await i.content()).toString("utf8"),b=k.from(await s.content()).toString("utf8"),{mergedText:_,cleanMerge:C}=await u({branches:[l,a,o],contents:[p,v,b],path:r}),x=await Or({fs:t,gitdir:e,type:"blob",object:k.from(_,"utf8"),dryRun:c});return{cleanMerge:C,mergeResult:{mode:g,path:r,oid:x,type:f}}}var OL={stage:tl,workdir:cu},Fg;async function Qo(t,e){return Fg===void 0&&(Fg=new Vo.default),Fg.acquire(t,e)}async function LL(t,e,r,i,n=null){let s=B(r,i),a=await t.lstat(s);if(!a)throw new Ve(s);if(a.isDirectory())throw new he(`${s}: file expected, but found directory`);let o=n?await ZE({fs:t,gitdir:e,oid:n}):void 0,l=o?n:void 0;return o||await Qo({fs:t,gitdir:e,currentFilepath:s},async()=>{let c=a.isSymbolicLink()?await t.readlink(s).then(eS):await t.read(s);if(c===null)throw new Ve(s);l=await Or({fs:t,gitdir:e,type:"blob",object:c})}),l}async function NL({fs:t,dir:e,gitdir:r,entries:i}){async function n(s){if(s.type==="tree"){if(!s.oid){let a=await Promise.all(s.children.map(n));s.oid=await du({fs:t,gitdir:r,tree:a}),s.mode=16384}}else s.type==="blob"&&(s.oid=await LL(t,r,e,s.path,s.oid),s.mode=33188);return s.path=s.path.split("/").pop(),s}return Promise.all(i.map(n))}async function FE({fs:t,dir:e,gitdir:r,treePair:i}){let n=i[1]==="stage",s=i.map(h=>typeof h=="string"?OL[h]():h),a=[],u=await Zn({fs:t,cache:{},dir:e,gitdir:r,trees:s,map:async(h,[p,g])=>{if(!(h==="."||await Is.isIgnored({fs:t,dir:e,gitdir:r,filepath:h}))&&g)return(!p||await p.oid()!==await g.oid()&&await g.oid()!==void 0)&&a.push([p,g]),{mode:await g.mode(),pa
Line truncated
|
||||
`).map(a=>n.add(a))}),n}static async write({fs:e,gitdir:r,oids:i}){ma===null&&(ma=new Vo.default);let n=B(r,"shallow");if(i.size>0){let s=[...i].join(`
|
||||
`)+`
|
||||
`;await ma.acquire(n,async function(){await e.write(n,s,{encoding:"utf8"})})}else await ma.acquire(n,async function(){await e.rm(n)})}};async function jL({fs:t,gitdir:e,oid:r}){let i=`objects/${r.slice(0,2)}/${r.slice(2)}`;return t.exists(`${e}/${i}`)}async function VL({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:n}){let s=await t.readdir(B(r,"objects/pack"));s=s.filter(a=>a.endsWith(".idx"));for(let a of s){let o=`${r}/objects/pack/${a}`,l=await Zg({fs:t,cache:e,filename:o,getExternalRefDelta:n});if(l.error)throw new he(l.error);if(l.offsets.has(i))return!0}return!1}async function BE({fs:t,cache:e,gitdir:r,oid:i,format:n="content"}){let s=o=>tt({fs:t,cache:e,gitdir:r,oid:o}),a=await jL({fs:t,gitdir:r,oid:i});return a||(a=await VL({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:s})),a}function Sd({config:t,onAuth:e}){return e&&(async(r,i)=>{let n=i.username||await t.get(`credential.${r}.username`);return e(r,n?{...i,username:n}:i)})}function zL(t){let n="5041434b"+"00000002"+"00000000";return t.slice(0,12).toString("hex")===n}function fS(t,e){let r=t.map(i=>i.split("=",1)[0]);return e.filter(i=>{let n=i.split("=",1)[0];return r.includes(n)})}var Rd={name:"isomorphic-git",version:"1.40.0",agent:"git/isomorphic-git@1.40.0"},jo=class{constructor(){this._queue=[]}write(e){if(this._ended)throw Error("You cannot write to a FIFO that has already been ended!");if(this._waiting){let r=this._waiting;this._waiting=null,r({value:e})}else this._queue.push(e)}end(){if(this._ended=!0,this._waiting){let e=this._waiting;this._waiting=null,e({done:!0})}}destroy(e){this.error=e,this.end()}async next(){if(this._queue.length>0)return{value:this._queue.shift()};if(this._ended)return{done:!0};if(this._waiting)throw Error("You cannot call read until the previous call to read has returned!");return new Promise(e=>{this._waiting=e})}};function WL(t){let e=t.indexOf("\r"),r=t.indexOf(`
|
||||
`);return e===-1&&r===-1?-1:e===-1?r+1:r===-1?e+1:r===e+1?r+1:Math.min(e,r)+1}function dS(t){let e=new jo,r="";return(async()=>(await hu(t,i=>{for(i=i.toString("utf8"),r+=i;;){let n=WL(r);if(n===-1)break;e.write(r.slice(0,n)),r=r.slice(n)}}),r.length>0&&e.write(r),e.end()))(),e}var kd=class{static demux(e){let r=ot.streamReader(e),i=new jo,n=new jo,s=new jo,a=async function(){let o=await r();if(o===null)return a();if(o===!0){i.end(),s.end(),e.error?n.destroy(e.error):n.end();return}switch(o[0]){case 1:{n.write(o.slice(1));break}case 2:{s.write(o.slice(1));break}case 3:{let l=o.slice(1);s.write(l),i.end(),s.end(),n.destroy(new Error(l.toString("utf8")));return}default:i.write(o)}a()};return a(),{packetlines:i,packfile:n,progress:s}}};async function qL(t){let{packetlines:e,packfile:r,progress:i}=kd.demux(t),n=[],s=[],a=[],o=!1,l=!1;return new Promise((c,u)=>{hu(e,f=>{let d=f.toString("utf8").trim();if(d.startsWith("shallow")){let h=d.slice(-41).trim();h.length!==40&&u(new Rs(h)),n.push(h)}else if(d.startsWith("unshallow")){let h=d.slice(-41).trim();h.length!==40&&u(new Rs(h)),s.push(h)}else if(d.startsWith("ACK")){let[,h,p]=d.split(" ");a.push({oid:h,status:p}),p||(l=!0)}else d.startsWith("NAK")?(o=!0,l=!0):(l=!0,o=!0);l&&(t.error?u(t.error):c({shallows:n,unshallows:s,acks:a,nak:o,packfile:r,progress:i}))}).finally(()=>{l||(t.error?u(t.error):c({shallows:n,unshallows:s,acks:a,nak:o,packfile:r,progress:i}))})})}function YL({capabilities:t=[],wants:e=[],haves:r=[],shallows:i=[],depth:n=null,since:s=null,exclude:a=[]}){let o=[];e=[...new Set(e)];let l=` ${t.join(" ")}`;for(let c of e)o.push(ot.encode(`want ${c}${l}
|
||||
`)),l="";for(let c of i)o.push(ot.encode(`shallow ${c}
|
||||
`));n!==null&&o.push(ot.encode(`deepen ${n}
|
||||
`)),s!==null&&o.push(ot.encode(`deepen-since ${Math.floor(s.valueOf()/1e3)}
|
||||
`));for(let c of a)o.push(ot.encode(`deepen-not ${c}
|
||||
`));o.push(ot.flush());for(let c of r)o.push(ot.encode(`have ${c}
|
||||
`));return o.push(ot.encode(`done
|
||||
`)),o}async function Xg({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:s,onAuthSuccess:a,onAuthFailure:o,gitdir:l,ref:c,remoteRef:u,remote:f,url:d,corsProxy:h,depth:p=null,since:g=null,exclude:v=[],relative:b=!1,tags:_=!1,singleBranch:C=!1,headers:x={},prune:S=!1,pruneTags:A=!1}){let w=c||await Ds({fs:t,gitdir:l,test:!0}),E=await ht.get({fs:t,gitdir:l}),y=f||w&&await E.get(`branch.${w}.remote`)||"origin",P=d||await E.get(`remote.${y}.url`);if(typeof P=="undefined")throw new Ir("remote OR url");let T=u||w&&await E.get(`branch.${w}.merge`)||c||"HEAD";h===void 0&&(h=await E.get("http.corsProxy"));let I=el.getRemoteHelperFor({url:P}),L=await I.discover({http:r,onAuth:Sd({config:E,onAuth:s}),onAuthSuccess:a,onAuthFailure:Sd({config:E,onAuth:o}),corsProxy:h,service:"git-upload-pack",url:P,headers:x,protocolVersion:1}),H=L.auth,te=L.refs;if(te.size===0)return{defaultBranch:null,fetchHead:null,fetchHeadDescription:null};if(p!==null&&!L.capabilities.has("shallow"))throw new Ps("shallow","depth");if(g!==null&&!L.capabilities.has("deepen-since"))throw new Ps("deepen-since","since");if(v.length>0&&!L.capabilities.has("deepen-not"))throw new Ps("deepen-not","exclude");if(b===!0&&!L.capabilities.has("deepen-relative"))throw new Ps("deepen-relative","relative");let{oid:xe,fullref:Z}=q.resolveAgainstMap({ref:T,map:te});for(let N of te.keys())N===Z||N==="HEAD"||N.startsWith("refs/heads/")||_&&N.startsWith("refs/tags/")||te.delete(N);let K=fS([...L.capabilities],["multi_ack_detailed","no-done","side-band-64k","ofs-delta",`agent=${Rd.agent}`]);b&&K.push("deepen-relative");let ce=C?[xe]:te.values(),pe=C?[w]:await q.listRefs({fs:t,gitdir:l,filepath:"refs"}),W=[];for(let N of pe)try{N=await q.expand({fs:t,gitdir:l,ref:N});let O=await q.resolve({fs:t,gitdir:l,ref:N});await BE({fs:t,cache:e,gitdir:l,oid:O})&&W.push(O)}catch(O){}W=[...new Set(W)];let X=await Ea.read({fs:t,gitdir:l}),G=L.capabilities.has("shallow")?[...X]:[],Be=YL({capabilities:K,wants:ce,haves:W,shallows:G,depth:p,since:g,exclude:v}),pr=k.from(await Ed(Be)),Ut=await I.connect({http:r,onProgress:i,corsProxy:h,service:"git-upload-pack",url:P,auth:H,body:[pr],headers:x}),Ie=await qL(Ut.body);Ut.headers&&(Ie.headers=Ut.headers);for(let N of Ie.shallows)if(!X.has(N))try{let{object:O}=await tt({fs:t,cache:e,gitdir:l,oid:N}),ue=new Dr(O),$e=await Promise.all(ue.headers().parent.map(Tr=>BE({fs:t,cache:e,gitdir:l,oid:Tr})));$e.length===0||$e.every(Tr=>Tr)||X.add(N)}catch(O){X.add(N)}for(let N of Ie.unshallows)X.delete(N);if(await Ea.write({fs:t,gitdir:l,oids:X}),C){let N=new Map([[Z,xe]]),O=new Map,ue=10,$e=Z;for(;ue--;){let go=L.symrefs.get($e);if(go===void 0)break;O.set($e,go),$e=go}let Gt=te.get($e);Gt&&N.set($e,Gt);let{pruned:Tr}=await q.updateRemoteRefs({fs:t,gitdir:l,remote:y,refs:N,symrefs:O,tags:_,prune:S});S&&(Ie.pruned=Tr)}else{let{pruned:N}=await q.updateRemoteRefs({fs:t,gitdir:l,remote:y,refs:te,symrefs:L.symrefs,tags:_,prune:S,pruneTags:A});S&&(Ie.pruned=N)}if(Ie.HEAD=L.symrefs.get("HEAD"),Ie.HEAD===void 0){let{oid:N}=q.resolveAgainstMap({ref:"HEAD",map:te});for(let[O,ue]of te.entries())if(O!=="HEAD"&&ue===N){Ie.HEAD=O;break}}let Rt=Z.startsWith("refs/tags")?"tag":"branch";if(Ie.FETCH_HEAD={oid:xe,description:`${Rt} '${ga(Z)}' of ${P}`},i||n){let N=dS(Ie.progress);hu(N,async O=>{if(n&&await n(O),i){let ue=O.match(/([^:]*).*\((\d+?)\/(\d+?)\)/);ue&&await i({phase:ue[1].trim(),loaded:parseInt(ue[2],10),total:parseInt(ue[3],10)})}})}let $t=k.from(await Ed(Ie.packfile));if(Ut.body.error)throw Ut.body.error;let Xe=$t.slice(-20).toString("hex"),ee={defaultBranch:Ie.HEAD,fetchHead:Ie.FETCH_HEAD.oid,fetchHeadDescription:Ie.FETCH_HEAD.description};if(Ie.headers&&(ee.headers=Ie.headers),S&&(ee.pruned=Ie.pruned),Xe!==""&&!zL($t)){ee.packfile=`objects/pack/pack-${Xe}.pack`;let N=B(l,ee.packfile);await t.write(N,$t);let O=$e=>tt({fs:t,cache:e,gitdir:l,oid:$e}),ue=await jc.fromPack({pack:$t,getExternalRefDelta:O,onProgress:i});await t.write(N.replace(/\.pack$/,".idx"),await ue.toBuffer())}return ee}async function hS({fs:t,bare:e=!1,dir:r,gitdir:i=e?r:B(r,".git"),defaultBranch:n="master"}){if(await t.exists(i+"/config"))return;let s=["hooks","info","objects/info","objects/pack","refs/heads","refs/tags"];s=s.map(a=>i+"/"+a);for(let a of s)await t.mkdir(a);await t.write(i+"/config",`[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = false
|
||||
bare = ${e}
|
||||
`+(e?"":` logallrefupdates = true
|
||||
`)+` symlinks = false
|
||||
ignorecase = true
|
||||
`),await t.write(i+"/HEAD",`ref: refs/heads/${n}
|
||||
`)}async function ZL({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:s,onAuthSuccess:a,onAuthFailure:o,onPostCheckout:l,dir:c,gitdir:u,url:f,corsProxy:d,ref:h,remote:p,depth:g,since:v,exclude:b,relative:_,singleBranch:C,noCheckout:x,noTags:S,headers:A,nonBlocking:w,batchSize:E=100}){try{if(await hS({fs:t,gitdir:u}),await sS({fs:t,gitdir:u,remote:p,url:f,force:!1}),d){let T=await ht.get({fs:t,gitdir:u});await T.set("http.corsProxy",d),await ht.save({fs:t,gitdir:u,config:T})}let{defaultBranch:y,fetchHead:P}=await Xg({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:s,onAuthSuccess:a,onAuthFailure:o,gitdir:u,ref:h,remote:p,corsProxy:d,depth:g,since:v,exclude:b,relative:_,singleBranch:C,headers:A,tags:!S});if(P===null)return;h=h||y,h=h.replace("refs/heads/",""),await Kg({fs:t,cache:e,onProgress:i,onPostCheckout:l,dir:c,gitdir:u,ref:h,remote:p,noCheckout:x,nonBlocking:w,batchSize:E})}catch(y){throw await t.rmdir(u,{recursive:!0,maxRetries:10}).catch(()=>{}),y}}async function KL({fs:t,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,onPostCheckout:o,dir:l,gitdir:c=B(l,".git"),url:u,corsProxy:f=void 0,ref:d=void 0,remote:h="origin",depth:p=void 0,since:g=void 0,exclude:v=[],relative:b=!1,singleBranch:_=!1,noCheckout:C=!1,noTags:x=!1,headers:S={},cache:A={},nonBlocking:w=!1,batchSize:E=100}){try{R("fs",t),R("http",e),R("gitdir",c),C||R("dir",l),R("url",u);let y=new J(t),P=await re({fsp:y,dotgit:c});return await ZL({fs:y,cache:A,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,onPostCheckout:o,dir:l,gitdir:P,url:u,corsProxy:f,ref:d,remote:h,depth:p,since:g,exclude:v,relative:b,singleBranch:_,noCheckout:C,noTags:x,headers:S,nonBlocking:w,batchSize:E})}catch(y){throw y.caller="git.clone",y}}async function XL({fs:t,onSign:e,dir:r,gitdir:i=B(r,".git"),message:n,author:s,committer:a,signingKey:o,amend:l=!1,dryRun:c=!1,noUpdateBranch:u=!1,disallowEmpty:f=!1,ref:d,parent:h,tree:p,cache:g={}}){try{R("fs",t),l||R("message",n),o&&R("onSign",e);let v=new J(t),b=await re({fsp:v,dotgit:i});return await uu({fs:v,cache:g,onSign:e,gitdir:b,message:n,author:s,committer:a,signingKey:o,amend:l,dryRun:c,noUpdateBranch:u,disallowEmpty:f,ref:d,parent:h,tree:p})}catch(v){throw v.caller="git.commit",v}}async function QL({fs:t,dir:e,gitdir:r=B(e,".git"),fullname:i=!1,test:n=!1}){try{R("fs",t),R("gitdir",r);let s=new J(t),a=await re({fsp:s,dotgit:r});return await Ds({fs:s,gitdir:a,fullname:i,test:n})}catch(s){throw s.caller="git.currentBranch",s}}async function JL({fs:t,gitdir:e,ref:r}){if(r=r.startsWith("refs/heads/")?r:`refs/heads/${r}`,!await q.exists({fs:t,gitdir:e,ref:r}))throw new Ve(r);let n=await q.expand({fs:t,gitdir:e,ref:r}),s=await Ds({fs:t,gitdir:e,fullname:!0});if(n===s){let l=await q.resolve({fs:t,gitdir:e,ref:n});await q.writeRef({fs:t,gitdir:e,ref:"HEAD",value:l})}await q.deleteRef({fs:t,gitdir:e,ref:n});let a=ga(r),o=await ht.get({fs:t,gitdir:e});await o.deleteSection("branch",a),await ht.save({fs:t,gitdir:e,config:o})}async function eN({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i}){try{R("fs",t),R("ref",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await JL({fs:n,gitdir:s,ref:i})}catch(n){throw n.caller="git.deleteBranch",n}}async function tN({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i}){try{R("fs",t),R("ref",i);let n=new J(t),s=await re({fsp:n,dotgit:r});await q.deleteRef({fs:n,gitdir:s,ref:i})}catch(n){throw n.caller="git.deleteRef",n}}async function rN({fs:t,gitdir:e,remote:r}){let i=await ht.get({fs:t,gitdir:e});await i.deleteSection("remote",r),await ht.save({fs:t,gitdir:e,config:i})}async function iN({fs:t,dir:e,gitdir:r=B(e,".git"),remote:i}){try{R("fs",t),R("remote",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await rN({fs:n,gitdir:s,remote:i})}catch(n){throw n.caller="git.deleteRemote",n}}async function nN({fs:t,gitdir:e,ref:r}){r=r.startsWith("refs/tags/")?r:`refs/tags/${r}`,await q.deleteRef({fs:t,gitdir:e,ref:r})}async function sN({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i}){try{R("fs",t),R("ref",i);let n=new J(t),s=await re({fsp:n,dotgit:r});return await nN({fs:n,gitdir:s,ref:i})}catch(n){throw n.caller="git.deleteTag",n}}async function aN({fs:t,gitdir:e,oid:r}){let i=r.slice(0,2);return(await t.readdir(`${e}/objects/${i}`)).map(s=>`${i}${s}`).filter(s=>s.startsWith(r))}async function oN({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:n}){let s=[],a=await t.readdir(B(r,"objects/pack"));a=a.filter(o=>o.endsWith(".idx"));for(let o of a){let l=`${r}/objects/pack/${o}`,c=await Zg({fs:t,cache:e,filename:l,getExternalRefDelta:n});if(c.error)throw new he(c.error);for(let u of c.offsets.keys())u.startsWith(i)&&s.push(u)}return s}async function lN({fs:t,cache:e,gitdir:r,oid:i}){let n=o=>tt({fs:t,cache:e,gitdir:r,oid:o}),s=await aN({fs:t,gitdir:r,oid:i}),a=await oN({fs:t,cache:e,gitdir:r,oid:i,getExternalRefDelta:n});for(let o of a)s.indexOf(o)===-1&&s.push(o);if(s.length===1)return s[0];throw s.length>1?new Vc("oids",i,s):new Ve(`an object matching "${i}"`)}as
Line truncated
|
||||
`)),i.push(ot.encode(`agent=${Rd.agent}
|
||||
`)),(r||e||t)&&i.push(ot.delim()),r&&i.push(ot.encode("peel")),e&&i.push(ot.encode("symrefs")),t&&i.push(ot.encode(`ref-prefix ${t}`)),i.push(ot.flush()),i}async function LN({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:i,corsProxy:n,url:s,headers:a={},forPush:o=!1,protocolVersion:l=2,prefix:c,symrefs:u,peelTags:f}){try{R("http",t),R("url",s);let d=await Jo.discover({http:t,onAuth:e,onAuthSuccess:r,onAuthFailure:i,corsProxy:n,service:o?"git-receive-pack":"git-upload-pack",url:s,headers:a,protocolVersion:l});if(d.protocolVersion===1)return vS(d,c,u,f);let h=await ON({prefix:c,symrefs:u,peelTags:f}),p=await Jo.connect({http:t,auth:d.auth,headers:a,corsProxy:n,service:o?"git-receive-pack":"git-upload-pack",url:s,body:h});return DN(p.body)}catch(d){throw d.caller="git.listServerRefs",d}}async function NN({fs:t,dir:e,gitdir:r=B(e,".git")}){try{R("fs",t),R("gitdir",r);let i=new J(t),n=await re({fsp:i,dotgit:r});return q.listTags({fs:i,gitdir:n})}catch(i){throw i.caller="git.listTags",i}}function BN(t,e){return t.committer.timestamp-e.committer.timestamp}var HN="e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";async function HE({fs:t,cache:e,gitdir:r,oid:i,fileId:n}){if(n===HN)return;let s=i,a,o=await Xo({fs:t,cache:e,gitdir:r,oid:i}),l=o.tree;return n===o.oid?a=o.path:(a=await _S({fs:t,cache:e,gitdir:r,tree:l,fileId:n,oid:s}),Array.isArray(a)&&(a.length===0?a=void 0:a.length===1&&(a=a[0]))),a}async function _S({fs:t,cache:e,gitdir:r,tree:i,fileId:n,oid:s,filepaths:a=[],parentPath:o=""}){let l=i.entries().map(function(c){let u;return c.oid===n?(u=B(o,c.path),a.push(u)):c.type==="tree"&&(u=tt({fs:t,cache:e,gitdir:r,oid:c.oid}).then(function({object:f}){return _S({fs:t,cache:e,gitdir:r,tree:Mr.from(f),fileId:n,oid:s,filepaths:a,parentPath:B(o,c.path)})})),u});return await Promise.all(l),a}async function UN({fs:t,cache:e,gitdir:r,filepath:i,ref:n,depth:s,since:a,force:o,follow:l,includeChanges:c}){let u=typeof a=="undefined"?void 0:Math.floor(a.valueOf()/1e3),f=[],d=await Ea.read({fs:t,gitdir:r}),h=await q.resolve({fs:t,gitdir:r,ref:n}),p=[await wn({fs:t,cache:e,gitdir:r,oid:h})],g,v,b;function _(C){b&&i&&f.push(C)}for(;p.length>0;){let C=p.pop();if(u!==void 0&&C.commit.committer.timestamp<=u)break;if(i){let x;try{x=await fu({fs:t,cache:e,gitdir:r,oid:C.commit.tree,filepath:i}),v&&g!==x&&f.push(v),g=x,v=C,b=!0}catch(S){if(S instanceof Ve){let A=l&&g;if(A&&(A=await HE({fs:t,cache:e,gitdir:r,oid:C.commit.tree,fileId:g}),A))if(Array.isArray(A)){if(v){let w=await HE({fs:t,cache:e,gitdir:r,oid:v.commit.tree,fileId:g});if(Array.isArray(w))if(A=A.filter(E=>w.indexOf(E)===-1),A.length===1)A=A[0],i=A,v&&f.push(v);else{A=!1,v&&f.push(v);break}}}else i=A,v&&f.push(v);if(!A){if(b&&g&&(f.push(v),!o))break;if(!o&&!l)throw S}v=C,b=!1}else throw S}}else f.push(C);if(s!==void 0&&f.length===s){_(C);break}if(!d.has(C.oid))for(let x of C.commit.parent){let S=await wn({fs:t,cache:e,gitdir:r,oid:x});p.map(A=>A.oid).includes(S.oid)||p.push(S)}p.length===0&&_(C),p.sort((x,S)=>BN(x.commit,S.commit))}if(c)for(let C of f)C.commit.changes=await GN({fs:t,cache:e,gitdir:r,commit:C,shallow:d.has(C.oid)});return f}async function GN({fs:t,cache:e,gitdir:r,commit:i,shallow:n}){let s=n||!i.commit.parent[0]?"4b825dc642cb6eb9a060e54bf8d69288fbee4904":i.commit.parent[0];return Zn({fs:t,cache:e,gitdir:r,trees:[Fr({ref:i.oid}),Fr({ref:s})],map:async(a,[o,l])=>{let[c,u]=await Promise.all([o&&o.type(),l&&l.type()]);if(c==="tree")return u&&u!=="tree"?[null,await l.oid(),a]:void 0;if(u==="tree")return c?[await o.oid(),null,a]:void 0;let[f,d]=await Promise.all([o?o.oid():null,l?l.oid():null]);if(f!==d)return[f,d,a]}})}async function jN({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i,ref:n="HEAD",depth:s,since:a,force:o,follow:l,includeChanges:c=!1,cache:u={}}){try{R("fs",t),R("gitdir",r),R("ref",n);let f=new J(t),d=await re({fsp:f,dotgit:r});return await UN({fs:f,cache:u,gitdir:d,filepath:i,ref:n,depth:s,since:a,force:o,follow:l,includeChanges:c})}catch(f){throw f.caller="git.log",f}}async function VN({fs:t,onSign:e,dir:r,gitdir:i=B(r,".git"),ours:n,theirs:s,fastForward:a=!0,fastForwardOnly:o=!1,dryRun:l=!1,noUpdateBranch:c=!1,abortOnConflict:u=!0,message:f,author:d,committer:h,signingKey:p,cache:g={},mergeDriver:v,allowUnrelatedHistories:b=!1}){try{R("fs",t),p&&R("onSign",e);let _=new J(t),C=await re({fsp:_,dotgit:i}),x=await Ms({fs:_,gitdir:C,author:d});if(!x&&(!o||!a))throw new Kt("author");let S=await xa({fs:_,gitdir:C,author:x,committer:h});if(!S&&(!o||!a))throw new Kt("committer");return await pS({fs:_,cache:g,dir:r,gitdir:C,ours:n,theirs:s,fastForward:a,fastForwardOnly:o,dryRun:l,noUpdateBranch:c,abortOnConflict:u,message:f,author:x,committer:S,signingKey:p,onSign:e,mergeDriver:v,allowUnrelatedHistories:b})}catch(_){throw _.caller="git.merge",_}}var zN={commit:16,tree:32,blob:48,tag:64,ofs_delta:96,ref_delta:112};async function yS({fs:t,cache:e,dir:r,gitdir:i=B(r,".git"),oids:n}){let s=new Yg.default,a=[];function o(u,f){let d=k.from(u,f);a.push(d),s.update(d)}as
Line truncated
|
||||
`),n=await i();let s=r.toString("utf8").split(`
|
||||
`);if(n=s.shift(),!n.startsWith("unpack "))throw new ya('unpack ok" or "unpack [error message]',n);e.ok=n==="unpack ok",e.ok||(e.error=n.slice(7)),e.refs={};for(let a of s){if(a.trim()==="")continue;let o=a.slice(0,2),l=a.slice(3),c=l.indexOf(" ");c===-1&&(c=l.length);let u=l.slice(0,c),f=l.slice(c+1);e.refs[u]={ok:o==="ok",error:f}}return e}async function XN({capabilities:t=[],triplets:e=[]}){let r=[],i=`\0 ${t.join(" ")}`;for(let n of e)r.push(ot.encode(`${n.oldoid} ${n.oid} ${n.fullRef}${i}
|
||||
`)),i="";return r.push(ot.flush()),r}async function QN({fs:t,cache:e,http:r,onProgress:i,onMessage:n,onAuth:s,onAuthSuccess:a,onAuthFailure:o,onPrePush:l,gitdir:c,ref:u,remoteRef:f,remote:d,url:h,force:p=!1,delete:g=!1,corsProxy:v,headers:b={}}){let _=u||await Ds({fs:t,gitdir:c});if(typeof _=="undefined")throw new Ir("ref");let C=await ht.get({fs:t,gitdir:c});d=d||await C.get(`branch.${_}.pushRemote`)||await C.get("remote.pushDefault")||await C.get(`branch.${_}.remote`)||"origin";let x=h||await C.get(`remote.${d}.pushurl`)||await C.get(`remote.${d}.url`);if(typeof x=="undefined")throw new Ir("remote OR url");let S=f||await C.get(`branch.${_}.merge`);if(typeof x=="undefined")throw new Ir("remoteRef");v===void 0&&(v=await C.get("http.corsProxy"));let A=await q.expand({fs:t,gitdir:c,ref:_}),w=g?"0000000000000000000000000000000000000000":await q.resolve({fs:t,gitdir:c,ref:A}),E=el.getRemoteHelperFor({url:x}),y=await E.discover({http:r,onAuth:Sd({config:C,onAuth:s}),onAuthSuccess:a,onAuthFailure:Sd({config:C,onAuth:o}),corsProxy:v,service:"git-receive-pack",url:x,headers:b,protocolVersion:1}),P=y.auth,T;if(!S)T=A;else try{T=await q.expandAgainstMap({ref:S,map:y.refs})}catch(X){if(X instanceof Ve)T=S.startsWith("refs/")?S:`refs/heads/${S}`;else throw X}let I=y.refs.get(T)||"0000000000000000000000000000000000000000";if(l&&!await l({remote:d,url:x,localRef:{ref:g?"(delete)":A,oid:w},remoteRef:{ref:T,oid:I}}))throw new Ko;let L=!y.capabilities.has("no-thin"),H=new Set;if(!g){let X=[...y.refs.values()],G=new Set;if(I!=="0000000000000000000000000000000000000000"){let Be=await Qg({fs:t,cache:e,gitdir:c,oids:[w,I]});for(let pr of Be)X.push(pr);L&&(G=await Dg({fs:t,cache:e,gitdir:c,oids:Be}))}if(!X.includes(w)){let Be=await ZN({fs:t,cache:e,gitdir:c,start:[w],finish:X});H=await Dg({fs:t,cache:e,gitdir:c,oids:Be})}if(L){try{let Be=await q.resolve({fs:t,gitdir:c,ref:`refs/remotes/${d}/HEAD`,depth:2}),{oid:pr}=await q.resolveAgainstMap({ref:Be.replace(`refs/remotes/${d}/`,""),fullref:Be,map:y.refs}),Ut=[pr];for(let Ie of await Dg({fs:t,cache:e,gitdir:c,oids:Ut}))G.add(Ie)}catch(Be){}for(let Be of G)H.delete(Be)}if(w===I&&(p=!0),!p){if(A.startsWith("refs/tags")&&I!=="0000000000000000000000000000000000000000")throw new Zo("tag-exists");if(w!=="0000000000000000000000000000000000000000"&&I!=="0000000000000000000000000000000000000000"&&!await wS({fs:t,cache:e,gitdir:c,oid:w,ancestor:I,depth:-1}))throw new Zo("not-fast-forward")}}let te=fS([...y.capabilities],["report-status","side-band-64k",`agent=${Rd.agent}`]),xe=await XN({capabilities:te,triplets:[{oldoid:I,oid:w,fullRef:T}]}),Z=g?[]:await yS({fs:t,cache:e,gitdir:c,oids:[...H]}),K=await E.connect({http:r,onProgress:i,corsProxy:v,service:"git-receive-pack",url:x,auth:P,headers:b,body:[...xe,...Z]}),{packfile:ce,progress:pe}=await kd.demux(K.body);if(n){let X=dS(pe);hu(X,async G=>{await n(G)})}let W=await KN(ce);if(K.headers&&(W.headers=K.headers),d&&W.ok&&W.refs[T].ok&&!A.startsWith("refs/tags")){let X=`refs/remotes/${d}/${T.replace("refs/heads","")}`;g?await q.deleteRef({fs:t,gitdir:c,ref:X}):await q.writeRef({fs:t,gitdir:c,ref:X,value:w})}if(W.ok&&Object.values(W.refs).every(X=>X.ok))return W;{let X=Object.entries(W.refs).filter(([G,Be])=>!Be.ok).map(([G,Be])=>`
|
||||
- ${G}: ${Be.error}`).join("");throw new Qc(X,W)}}async function JN({fs:t,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,onPrePush:o,dir:l,gitdir:c=B(l,".git"),ref:u,remoteRef:f,remote:d="origin",url:h,force:p=!1,delete:g=!1,corsProxy:v,headers:b={},cache:_={}}){try{R("fs",t),R("http",e),R("gitdir",c);let C=new J(t),x=await re({fsp:C,dotgit:c});return await QN({fs:C,cache:_,http:e,onProgress:r,onMessage:i,onAuth:n,onAuthSuccess:s,onAuthFailure:a,onPrePush:o,gitdir:x,ref:u,remoteRef:f,remote:d,url:h,force:p,delete:g,corsProxy:v,headers:b})}catch(C){throw C.caller="git.push",C}}async function xS({fs:t,cache:e,gitdir:r,oid:i}){let{type:n,object:s}=await tt({fs:t,cache:e,gitdir:r,oid:i});if(n==="tag")return i=Jr.from(s).parse().object,xS({fs:t,cache:e,gitdir:r,oid:i});if(n!=="blob")throw new br(i,n,"blob");return{oid:i,blob:new Uint8Array(s)}}async function ES({fs:t,cache:e,gitdir:r,oid:i,filepath:n=void 0}){return n!==void 0&&(i=await fu({fs:t,cache:e,gitdir:r,oid:i,filepath:n})),await xS({fs:t,cache:e,gitdir:r,oid:i})}async function pu({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,filepath:n,cache:s={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let a=new J(t),o=await re({fsp:a,dotgit:r});return await ES({fs:a,cache:s,gitdir:o,oid:i,filepath:n})}catch(a){throw a.caller="git.readBlob",a}}async function SS({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,cache:n={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let s=new J(t),a=await re({fsp:s,dotgit:r});return await wn({fs:s,cache:n,gitdir:a,oid:i})}catch(s){throw s.caller="git.readCommit",s}}async function eB({fs:t,cache:e,gitdir:r,ref:i="refs/notes/commits",oid:n}){let s=await q.resolve({gitdir:r,fs:t,ref:i}),{blob:a}=await ES({fs:t,cache:e,gitdir:r,oid:s,filepath:n});return a}async function tB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i="refs/notes/commits",oid:n,cache:s={}}){try{R("fs",t),R("gitdir",r),R("ref",i),R("oid",n);let a=new J(t),o=await re({fsp:a,dotgit:r});return await eB({fs:a,cache:s,gitdir:o,ref:i,oid:n})}catch(a){throw a.caller="git.readNote",a}}async function rB({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,format:n="parsed",filepath:s=void 0,encoding:a=void 0,cache:o={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let l=new J(t),c=await re({fsp:l,dotgit:r});s!==void 0&&(i=await fu({fs:l,cache:o,gitdir:c,oid:i,filepath:s}));let f=await tt({fs:l,cache:o,gitdir:c,oid:i,format:n==="parsed"?"content":n});if(f.oid=i,n==="parsed")switch(f.format="parsed",f.type){case"commit":f.object=Dr.from(f.object).parse();break;case"tree":f.object=Mr.from(f.object).entries();break;case"blob":a?f.object=f.object.toString(a):(f.object=new Uint8Array(f.object),f.format="content");break;case"tag":f.object=Jr.from(f.object).parse();break;default:throw new br(f.oid,f.type,"blob|commit|tag|tree")}else(f.format==="deflated"||f.format==="wrapped")&&(f.type=f.format);return f}catch(l){throw l.caller="git.readObject",l}}async function iB({fs:t,cache:e,gitdir:r,oid:i}){let{type:n,object:s}=await tt({fs:t,cache:e,gitdir:r,oid:i,format:"content"});if(n!=="tag")throw new br(i,n,"tag");let a=Jr.from(s);return{oid:i,tag:a.parse(),payload:a.payload()}}async function nB({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,cache:n={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let s=new J(t),a=await re({fsp:s,dotgit:r});return await iB({fs:s,cache:n,gitdir:a,oid:i})}catch(s){throw s.caller="git.readTag",s}}async function sB({fs:t,dir:e,gitdir:r=B(e,".git"),oid:i,filepath:n=void 0,cache:s={}}){try{R("fs",t),R("gitdir",r),R("oid",i);let a=new J(t),o=await re({fsp:a,dotgit:r});return await rl({fs:a,cache:s,gitdir:o,oid:i,filepath:n})}catch(a){throw a.caller="git.readTree",a}}async function aB({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i,cache:n={}}){try{R("fs",t),R("gitdir",r),R("filepath",i);let s=new J(t),a=await re({fsp:s,dotgit:r});await dt.acquire({fs:s,gitdir:a,cache:n},async function(o){o.delete({filepath:i})})}catch(s){throw s.caller="git.remove",s}}async function oB({fs:t,cache:e,onSign:r,gitdir:i,ref:n="refs/notes/commits",oid:s,author:a,committer:o,signingKey:l}){let c;try{c=await q.resolve({gitdir:i,fs:t,ref:n})}catch(p){if(!(p instanceof Ve))throw p}let f=(await rl({fs:t,cache:e,gitdir:i,oid:c||"4b825dc642cb6eb9a060e54bf8d69288fbee4904"})).tree;f=f.filter(p=>p.path!==s);let d=await du({fs:t,gitdir:i,tree:f});return await uu({fs:t,cache:e,onSign:r,gitdir:i,ref:n,tree:d,parent:c&&[c],message:`Note removed by 'isomorphic-git removeNote'
|
||||
`,author:a,committer:o,signingKey:l})}async function lB({fs:t,onSign:e,dir:r,gitdir:i=B(r,".git"),ref:n="refs/notes/commits",oid:s,author:a,committer:o,signingKey:l,cache:c={}}){try{R("fs",t),R("gitdir",i),R("oid",s);let u=new J(t),f=await re({fsp:u,dotgit:i}),d=await Ms({fs:u,gitdir:f,author:a});if(!d)throw new Kt("author");let h=await xa({fs:u,gitdir:f,author:d,committer:o});if(!h)throw new Kt("committer");return await oB({fs:u,cache:c,onSign:e,gitdir:f,ref:n,oid:s,author:d,committer:h,signingKey:l})}catch(u){throw u.caller="git.removeNote",u}}async function cB({fs:t,gitdir:e,oldref:r,ref:i,checkout:n=!1}){if(!au(i,!0))throw new ji(i,zo.default.clean(i));if(!au(r,!0))throw new ji(r,zo.default.clean(r));let s=`refs/heads/${r}`,a=`refs/heads/${i}`;if(await q.exists({fs:t,gitdir:e,ref:a}))throw new Gi("branch",i,!1);let l=await q.resolve({fs:t,gitdir:e,ref:s,depth:1});await q.writeRef({fs:t,gitdir:e,ref:a,value:l}),await q.deleteRef({fs:t,gitdir:e,ref:s});let u=await Ds({fs:t,gitdir:e,fullname:!0})===s;(n||u)&&await q.writeSymbolicRef({fs:t,gitdir:e,ref:"HEAD",value:a})}async function uB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i,oldref:n,checkout:s=!1}){try{R("fs",t),R("gitdir",r),R("ref",i),R("oldref",n);let a=new J(t),o=await re({fsp:a,dotgit:r});return await cB({fs:a,gitdir:o,ref:i,oldref:n,checkout:s})}catch(a){throw a.caller="git.renameBranch",a}}async function kS({gitdir:t,type:e,object:r}){return bn($s.wrap({type:e,object:r}))}async function fB({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i,ref:n,cache:s={}}){try{R("fs",t),R("gitdir",r),R("filepath",i);let a=new J(t),o=await re({fsp:a,dotgit:r}),l,c;try{l=await q.resolve({fs:a,gitdir:o,ref:n||"HEAD"})}catch(d){if(n)throw d}if(l)try{l=await fu({fs:a,cache:s,gitdir:o,oid:l,filepath:i})}catch(d){l=null}let u={ctime:new Date(0),mtime:new Date(0),dev:0,ino:0,mode:0,uid:0,gid:0,size:0},f=e&&await a.read(B(e,i));f&&(c=await kS({gitdir:o,type:"blob",object:f}),l===c&&(u=await a.lstat(B(e,i)))),await dt.acquire({fs:a,gitdir:o,cache:s},async function(d){d.delete({filepath:i}),l&&d.insert({filepath:i,stats:u,oid:l})})}catch(a){throw a.caller="git.reset",a}}async function dB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i,depth:n}){try{R("fs",t),R("gitdir",r),R("ref",i);let s=new J(t),a=await re({fsp:s,dotgit:r});return await q.resolve({fs:s,gitdir:a,ref:i,depth:n})}catch(s){throw s.caller="git.resolveRef",s}}async function hB({fs:t,dir:e,gitdir:r=B(e,".git"),path:i,value:n,append:s=!1}){try{R("fs",t),R("gitdir",r),R("path",i);let a=new J(t),o=await re({fsp:a,dotgit:r}),l=await ht.get({fs:a,gitdir:o});s?await l.append(i,n):await l.set(i,n),await ht.save({fs:a,gitdir:o,config:l})}catch(a){throw a.caller="git.setConfig",a}}async function CS({fs:t,gitdir:e,commit:r}){let i=Dr.from(r).toObject();return await Or({fs:t,gitdir:e,type:"commit",object:i,format:"content"})}var Cd=class t{static get timezoneOffsetForRefLogEntry(){let e=new Date().getTimezoneOffset(),r=Math.abs(Math.floor(e/60)),i=Math.abs(e%60).toString().padStart(2,"0");return`${e>0?"-":"+"}${r.toString().padStart(2,"0")}${i}`}static createStashReflogEntry(e,r,i){let n=e.name.replace(/\s/g,""),s="0000000000000000000000000000000000000000",a=Math.floor(Date.now()/1e3),o=t.timezoneOffsetForRefLogEntry;return`${s} ${r} ${n} ${e.email} ${a} ${o} ${i}
|
||||
`}static getStashReflogEntry(e,r=!1){return e.split(`
|
||||
`).filter(s=>s).reverse().map((s,a)=>r?`stash@{${a}}: ${s.split(" ")[1]}`:s)}},Sa=class t{constructor({fs:e,dir:r,gitdir:i=B(r,".git")}){Object.assign(this,{fs:e,dir:r,gitdir:i,_author:null})}static get refStash(){return"refs/stash"}static get refLogsStash(){return"logs/refs/stash"}get refStashPath(){return B(this.gitdir,t.refStash)}get refLogsStashPath(){return B(this.gitdir,t.refLogsStash)}async getAuthor(){if(!this._author&&(this._author=await Ms({fs:this.fs,gitdir:this.gitdir,author:{}}),!this._author))throw new Kt("author");return this._author}async getStashSHA(e,r){return await this.fs.exists(this.refStashPath)?(r||await this.readStashReflogs({parsed:!1}))[e].split(" ")[1]:null}async writeStashCommit({message:e,tree:r,parent:i}){return CS({fs:this.fs,gitdir:this.gitdir,commit:{message:e,tree:r,parent:i,author:await this.getAuthor(),committer:await this.getAuthor()}})}async readStashCommit(e){let r=await this.readStashReflogs({parsed:!1});if(e!==0&&(e<0||e>r.length-1))throw new ji(`stash@${e}`,"number that is in range of [0, num of stash pushed]");let i=await this.getStashSHA(e,r);return i?wn({fs:this.fs,cache:{},gitdir:this.gitdir,oid:i}):{}}async writeStashRef(e){return q.writeRef({fs:this.fs,gitdir:this.gitdir,ref:t.refStash,value:e})}async writeStashReflogEntry({stashCommit:e,message:r}){let i=await this.getAuthor(),n=Cd.createStashReflogEntry(i,e,r),s=this.refLogsStashPath;await Qo({filepath:s,entry:n},async()=>{let a=await this.fs.exists(s)?await this.fs.read(s,"utf8"):"";await this.fs.write(s,a+n,"utf8")})}async readStashReflogs({parsed:e=!1}){if(!await this.fs.exists(this.refLogsStashPath))return[];let r=await this.fs.read(this.refLogsStashPath,"utf8");return Cd.getStashReflogEntry(r,e)}};async function AS({fs:t,dir:e,gitdir:r,message:i=""}){let n=new Sa({fs:t,dir:e,gitdir:r});await n.getAuthor();let s=await Ds({fs:t,gitdir:r,fullname:!1}),a=await q.resolve({fs:t,gitdir:r,ref:"HEAD"}),l=(await SS({fs:t,dir:e,gitdir:r,oid:a})).commit.message,c=[a],u=null,f=Fr({ref:"HEAD"}),d=await FE({fs:t,dir:e,gitdir:r,treePair:[Fr({ref:"HEAD"}),"stage"]});if(d){let v=await n.writeStashCommit({message:`stash-Index: WIP on ${s} - ${new Date().toISOString()}`,tree:d,parent:c});c.push(v),u=d,f=tl()}let h=await FE({fs:t,dir:e,gitdir:r,treePair:[f,"workdir"]});if(h){let v=await n.writeStashCommit({message:`stash-WorkDir: WIP on ${s} - ${new Date().toISOString()}`,tree:h,parent:[c[c.length-1]]});c.push(v),u=h}if(!u||!d&&!h)throw new Ve("changes, nothing to stash");let p=(i.trim()||`WIP on ${s}`)+`: ${a.substring(0,7)} ${l}`;return{stashCommit:await n.writeStashCommit({message:p,tree:u,parent:c}),stashMsg:p,branch:s,stashMgr:n}}async function pB({fs:t,dir:e,gitdir:r,message:i=""}){let{stashCommit:n,stashMsg:s,branch:a,stashMgr:o}=await AS({fs:t,dir:e,gitdir:r,message:i});return await o.writeStashRef(n),await o.writeStashReflogEntry({stashCommit:n,message:s}),await oS({fs:t,dir:e,gitdir:r,ref:a,track:!1,force:!0}),n}async function mB({fs:t,dir:e,gitdir:r,message:i=""}){let{stashCommit:n}=await AS({fs:t,dir:e,gitdir:r,message:i});return n}async function TS({fs:t,dir:e,gitdir:r,refIdx:i=0}){let s=await new Sa({fs:t,dir:e,gitdir:r}).readStashCommit(i),{parent:a=null}=s.commit?s.commit:{};if(!(!a||!Array.isArray(a)))for(let o=0;o<a.length-1;o++){let c=(await wn({fs:t,cache:{},gitdir:r,oid:a[o+1]})).commit.message.startsWith("stash-Index");await cS({fs:t,dir:e,gitdir:r,stashCommit:a[o+1],parentCommit:a[o],wasStaged:c})}}async function PS({fs:t,dir:e,gitdir:r,refIdx:i=0}){let n=new Sa({fs:t,dir:e,gitdir:r});if(!(await n.readStashCommit(i)).commit)return;let a=n.refStashPath;await Qo(a,async()=>{await t.exists(a)&&await t.rm(a)});let o=await n.readStashReflogs({parsed:!1});if(!o.length)return;o.splice(i,1);let l=n.refLogsStashPath;await Qo({reflogEntries:o,stashReflogPath:l,stashMgr:n},async()=>{if(o.length){await t.write(l,o.reverse().join(`
|
||||
`)+`
|
||||
`,"utf8");let c=o[o.length-1].split(" ")[1];await n.writeStashRef(c)}else await t.rm(l)})}async function gB({fs:t,dir:e,gitdir:r}){return new Sa({fs:t,dir:e,gitdir:r}).readStashReflogs({parsed:!0})}async function vB({fs:t,dir:e,gitdir:r}){let i=new Sa({fs:t,dir:e,gitdir:r}),n=[i.refStashPath,i.refLogsStashPath];await Qo(n,async()=>{await Promise.all(n.map(async s=>{if(await t.exists(s))return t.rm(s)}))})}async function wB({fs:t,dir:e,gitdir:r,refIdx:i=0}){await TS({fs:t,dir:e,gitdir:r,refIdx:i}),await PS({fs:t,dir:e,gitdir:r,refIdx:i})}async function bB({fs:t,dir:e,gitdir:r=B(e,".git"),op:i="push",message:n="",refIdx:s=0}){R("fs",t),R("dir",e),R("gitdir",r),R("op",i);let a={push:pB,apply:TS,drop:PS,list:gB,clear:vB,pop:wB,create:mB},o=["apply","drop","pop"];try{let l=new J(t),c=await re({fsp:l,dotgit:r});["refs","logs","logs/refs"].map(d=>B(c,d)).forEach(async d=>{await l.exists(d)||await l.mkdir(d)});let f=a[i];if(f){if(o.includes(i)&&s<0)throw new ji(`stash@${s}`,"number that is in range of [0, num of stash pushed]");return await f({fs:l,dir:e,gitdir:c,message:n,refIdx:s})}throw new Error(`To be implemented: ${i}`)}catch(l){throw l.caller="git.stash",l}}async function _B({fs:t,dir:e,gitdir:r=B(e,".git"),filepath:i,cache:n={},refresh:s=!0}){try{R("fs",t),R("gitdir",r),R("filepath",i);let a=new J(t),o=await re({fsp:a,dotgit:r});if(await Is.isIgnored({fs:a,gitdir:o,dir:e,filepath:i}))return"ignored";let c=await yB({fs:a,cache:n,gitdir:o}),u=await RS({fs:a,cache:n,gitdir:o,tree:c,path:i}),f=await dt.acquire({fs:a,gitdir:o,cache:n},async function(b){for(let _ of b)if(_.path===i)return _;return null}),d=await a.lstat(B(e,i)),h=u!==null,p=f!==null,g=d!==null,v=async()=>{if(p&&!gd(f,d))return f.oid;{let b=await a.read(B(e,i)),_=await kS({gitdir:o,type:"blob",object:b});return s&&p&&f.oid===_&&d.size!==-1&&dt.acquire({fs:a,gitdir:o,cache:n},async function(C){C.insert({filepath:i,stats:d,oid:_})}),_}};if(!h&&!g&&!p)return"absent";if(!h&&!g&&p)return"*absent";if(!h&&g&&!p)return"*added";if(!h&&g&&p)return await v()===f.oid?"added":"*added";if(h&&!g&&!p)return"deleted";if(h&&!g&&p)return u===f.oid,"*deleted";if(h&&g&&!p)return await v()===u?"*undeleted":"*undeletemodified";if(h&&g&&p){let b=await v();return b===u?b===f.oid?"unmodified":"*unmodified":b===f.oid?"modified":"*modified"}}catch(a){throw a.caller="git.status",a}}async function RS({fs:t,cache:e,gitdir:r,tree:i,path:n}){typeof n=="string"&&(n=n.split("/"));let s=n.shift();for(let a of i)if(a.path===s){if(n.length===0)return a.oid;let{type:o,object:l}=await tt({fs:t,cache:e,gitdir:r,oid:a.oid});if(o==="tree"){let c=Mr.from(l);return RS({fs:t,cache:e,gitdir:r,tree:c,path:n})}if(o==="blob")throw new br(a.oid,o,"blob",n.join("/"))}return null}async function yB({fs:t,cache:e,gitdir:r}){let i;try{i=await q.resolve({fs:t,gitdir:r,ref:"HEAD"})}catch(s){if(s instanceof Ve)return[]}let{tree:n}=await rl({fs:t,cache:e,gitdir:r,oid:i});return n}async function xB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i="HEAD",filepaths:n=["."],filter:s,cache:a={},ignored:o=!1,refresh:l=!0}){try{R("fs",t),R("gitdir",r),R("ref",i);let c=new J(t),u=await re({fsp:c,dotgit:r});return await Zn({fs:c,cache:a,dir:e,gitdir:u,trees:[Fr({ref:i}),cu({refresh:l}),tl()],map:async function(f,[d,h,p]){if(!d&&!p&&h&&!o&&await Is.isIgnored({fs:c,dir:e,filepath:f})||!n.some(E=>aS(f,E)))return null;if(s&&!s(f))return;let[g,v,b]=await Promise.all([d&&d.type(),h&&h.type(),p&&p.type()]),_=[g,v,b].includes("blob");if((g==="tree"||g==="special")&&!_)return;if(g==="commit")return null;if((v==="tree"||v==="special")&&!_)return;if(b==="commit")return null;if((b==="tree"||b==="special")&&!_)return;let C=g==="blob"?await d.oid():void 0,x=b==="blob"?await p.oid():void 0,S;g!=="blob"&&v==="blob"&&b!=="blob"?S="42":v==="blob"&&(S=await h.oid());let A=[void 0,C,S,x],w=A.map(E=>A.indexOf(E));return w.shift(),[f,...w]}})}catch(c){throw c.caller="git.statusMatrix",c}}async function EB({fs:t,dir:e,gitdir:r=B(e,".git"),ref:i,object:n,force:s=!1}){try{R("fs",t),R("gitdir",r),R("ref",i);let a=new J(t);if(i===void 0)throw new Ir("ref");i=i.startsWith("refs/tags/")?i:`refs/tags/${i}`;let o=await re({fsp:a,dotgit:r}),l=await q.resolve({fs:a,gitdir:o,ref:n||"HEAD"});if(!s&&await q.exists({fs:a,gitdir:o,ref:i}))throw new Gi("tag",i);await q.writeRef({fs:a,gitdir:o,ref:i,value:l})}catch(a){throw a.caller="git.tag",a}}async function SB({fs:t,dir:e,gitdir:r=B(e,".git"),cache:i={},filepath:n,oid:s,mode:a,add:o,remove:l,force:c}){try{R("fs",t),R("gitdir",r),R("filepath",n);let u=new J(t),f=await re({fsp:u,dotgit:r});if(l)return await dt.acquire({fs:u,gitdir:f,cache:i},async function(h){if(!c){let p=await u.lstat(B(e,n));if(p){if(p.isDirectory())throw new Fs("directory");return}}h.has({filepath:n})&&h.delete({filepath:n})});let d;if(!s){if(d=await u.lstat(B(e,n)),!d)throw new Ve(`file at "${n}" on disk and "remove" not set`);if(d.isDirectory())throw new Fs("directory")}return await dt.acquire({fs:u,gitdir:f,cache:i},async function(h){if(!o
Line truncated
|
||||
|
||||
PROMPT="$1"
|
||||
TEMP_FILE="$OBSIDIAN_GIT_CREDENTIALS_INPUT"
|
||||
|
||||
cleanup() {
|
||||
rm -f "$TEMP_FILE" "$TEMP_FILE.response"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
echo "$PROMPT" > "$TEMP_FILE"
|
||||
|
||||
while [ ! -e "$TEMP_FILE.response" ]; do
|
||||
if [ ! -e "$TEMP_FILE" ]; then
|
||||
echo "Trigger file got removed: Abort" >&2
|
||||
exit 1
|
||||
fi
|
||||
sleep 0.1
|
||||
done
|
||||
|
||||
RESPONSE=$(cat "$TEMP_FILE.response")
|
||||
|
||||
echo "$RESPONSE"
|
||||
`,IS=["3dm","3ds","3g2","3gp","7z","a","aac","adp","afdesign","afphoto","afpub","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];m();m();m();var mu=class{diff(e,r,i={}){let n;typeof i=="function"?(n=i,i={}):"callback"in i&&(n=i.callback);let s=this.castInput(e,i),a=this.castInput(r,i),o=this.removeEmpty(this.tokenize(s,i)),l=this.removeEmpty(this.tokenize(a,i));return this.diffWithOptionsObj(o,l,i,n)}diffWithOptionsObj(e,r,i,n){var s;let a=_=>{if(_=this.postProcess(_,i),n){setTimeout(function(){n(_)},0);return}else return _},o=r.length,l=e.length,c=1,u=o+l;i.maxEditLength!=null&&(u=Math.min(u,i.maxEditLength));let f=(s=i.timeout)!==null&&s!==void 0?s:1/0,d=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(h[0],r,e,0,i);if(h[0].oldPos+1>=l&&p+1>=o)return a(this.buildValues(h[0].lastComponent,r,e));let g=-1/0,v=1/0,b=()=>{for(let _=Math.max(g,-c);_<=Math.min(v,c);_+=2){let C,x=h[_-1],S=h[_+1];x&&(h[_-1]=void 0);let A=!1;if(S){let E=S.oldPos-_;A=S&&0<=E&&E<o}let w=x&&x.oldPos+1<l;if(!A&&!w){h[_]=void 0;continue}if(!w||A&&x.oldPos<S.oldPos?C=this.addToPath(S,!0,!1,0,i):C=this.addToPath(x,!1,!0,1,i),p=this.extractCommon(C,r,e,_,i),C.oldPos+1>=l&&p+1>=o)return a(this.buildValues(C.lastComponent,r,e))||!0;h[_]=C,C.oldPos+1>=l&&(v=Math.min(v,_-1)),p+1>=o&&(g=Math.max(g,_+1))}c++};if(n)(function _(){setTimeout(function(){if(c>u||Date.now()>d)return n(void 0);b()||_()},0)})();else for(;c<=u&&Date.now()<=d;){let _=b();if(_)return _}}addToPath(e,r,i,n,s){let a=e.lastComponent;return a&&!s.oneChangePerToken&&a.added===r&&a.removed===i?{oldPos:e.oldPos+n,lastComponent:{count:a.count+1,added:r,removed:i,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+n,lastComponent:{count:1,added:r,removed:i,previousComponent:a}}}extractCommon(e,r,i,n,s){let a=r.length,o=i.length,l=e.oldPos,c=l-n,u=0;for(;c+1<a&&l+1<o&&this.equals(i[l+1],r[c+1],s);)c++,l++,u++,s.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return u&&!s.oneChangePerToken&&(e.lastComponent={count:u,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=l,c}equals(e,r,i){return i.comparator?i.comparator(e,r):e===r||!!i.ignoreCase&&e.toLowerCase()===r.toLowerCase()}removeEmpty(e){let r=[];for(let i=0;i<e.length;i++)e[i]&&r.push(e[i]);return r}castInput(e,r){return e}tokenize(e,r){return Array.from(e)}join(e){return e.join("")}postProcess(e,r){return e}get useLongestToken(){return!1}buildValues(e,r,i){let n=[],s;for(;e;)n.push(e),s=e.previousComponent,delete e.previousComponent,e=s;n.reverse();let a=n.length,o=0,l=0,c=0;for(;o<a;o++){let u=n[o];if(u.removed)u.value=this.join(i.slice(c,c+u.count)),c+=u.count;else{if(!u.added&&this.useLongestToken){let f=r.slice(l,l+u.count);f=f.map(function(d,h){let p=i[c+h];return p.length>d.length?p:d}),u.value=this.join(f)}else u.value=this.join(r.slice(l,l+u.count));l+=u.count,u.added||(c+=u.count)}}return n}};m();var tv=class extends mu{constructor(){super(...arguments),this.tokenize=OB}equals(e,r,i){return i.ignoreWhitespace?((!i.newlineIsToken||!e.includes(`
|
||||
`))&&(e=e.trim()),(!i.newlineIsToken||!r.includes(`
|
||||
`))&&(r=r.trim())):i.ignoreNewlineAtEof&&!i.newlineIsToken&&(e.endsWith(`
|
||||
`)&&(e=e.slice(0,-1)),r.endsWith(`
|
||||
`)&&(r=r.slice(0,-1))),super.equals(e,r,i)}},DB=new tv;function rv(t,e,r){return DB.diff(t,e,r)}function OB(t,e){e.stripTrailingCr&&(t=t.replace(/\r\n/g,`
|
||||
`));let r=[],i=t.split(/(\n|\r\n)/);i[i.length-1]||i.pop();for(let n=0;n<i.length;n++){let s=i[n];n%2&&!e.newlineIsToken?r[r.length-1]+=s:r.push(s)}return r}m();function LB(t){for(let e=0;e<t.length;e++)if(t[e]<" "||t[e]>"~"||t[e]==='"'||t[e]==="\\")return!0;return!1}function Ns(t){if(!LB(t))return t;let e='"',r=new TextEncoder().encode(t),i=0;for(;i<r.length;){let n=r[i];n===7?e+="\\a":n===8?e+="\\b":n===9?e+="\\t":n===10?e+="\\n":n===11?e+="\\v":n===12?e+="\\f":n===13?e+="\\r":n===34?e+='\\"':n===92?e+="\\\\":n>=32&&n<=126?e+=String.fromCharCode(n):e+="\\"+n.toString(8).padStart(3,"0"),i++}return e+='"',e}var iv={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function nv(t,e,r,i,n,s,a){let o;a?typeof a=="function"?o={callback:a}:o=a:o={},typeof o.context=="undefined"&&(o.context=4);let l=o.context;if(o.newlineIsToken)throw new Error("newlineIsToken may not be used with patch-generation functions, only with diffing functions");if(o.callback){let{callback:u}=o;rv(r,i,Object.assign(Object.assign({},o),{callback:f=>{let d=c(f);u(d)}}))}else return c(rv(r,i,o));function c(u){if(!u)return;u.push({value:"",lines:[]});function f(_){return _.map(function(C){return" "+C})}let d=[],h=0,p=0,g=[],v=1,b=1;for(let _=0;_<u.length;_++){let C=u[_],x=C.lines||NB(C.value);if(C.lines=x,C.added||C.removed){if(!h){let S=u[_-1];h=v,p=b,S&&(g=l>0?f(S.lines.slice(-l)):[],h-=g.length,p-=g.length)}for(let S of x)g.push((C.added?"+":"-")+S);C.added?b+=x.length:v+=x.length}else{if(h)if(x.length<=l*2&&_<u.length-2)for(let S of f(x))g.push(S);else{let S=Math.min(x.length,l);for(let w of f(x.slice(0,S)))g.push(w);let A={oldStart:h,oldLines:v-h+S,newStart:p,newLines:b-p+S,lines:g};d.push(A),h=0,p=0,g=[]}v+=x.length,b+=x.length}}for(let _ of d)for(let C=0;C<_.lines.length;C++)_.lines[C].endsWith(`
|
||||
`)?_.lines[C]=_.lines[C].slice(0,-1):(_.lines.splice(C+1,0,"\\ No newline at end of file"),C++);return{oldFileName:t,newFileName:e,oldHeader:n,newHeader:s,hunks:d}}}function Od(t,e){var r,i,n,s,a,o;if(e||(e=iv),Array.isArray(t)){if(t.length>1&&!e.includeFileHeaders&&!t.every(u=>u.isGit))throw new Error("Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)");return t.map(u=>Od(u,e)).join(`
|
||||
`)}let l=[];if(t.isGit){if(e=iv,!t.oldFileName)throw new Error("oldFileName must be specified for Git patches");if(!t.newFileName)throw new Error("newFileName must be specified for Git patches");let u=t.oldFileName,f=t.newFileName;t.isCreate&&u==="/dev/null"?u=f.replace(/^b\//,"a/"):t.isDelete&&f==="/dev/null"&&(f=u.replace(/^a\//,"b/")),l.push("diff --git "+Ns(u)+" "+Ns(f)),t.isDelete&&l.push("deleted file mode "+((r=t.oldMode)!==null&&r!==void 0?r:"100644")),t.isCreate&&l.push("new file mode "+((i=t.newMode)!==null&&i!==void 0?i:"100644")),t.oldMode&&t.newMode&&!t.isDelete&&!t.isCreate&&(l.push("old mode "+t.oldMode),l.push("new mode "+t.newMode)),t.isRename&&(l.push("rename from "+Ns(((n=t.oldFileName)!==null&&n!==void 0?n:"").replace(/^a\//,""))),l.push("rename to "+Ns(((s=t.newFileName)!==null&&s!==void 0?s:"").replace(/^b\//,"")))),t.isCopy&&(l.push("copy from "+Ns(((a=t.oldFileName)!==null&&a!==void 0?a:"").replace(/^a\//,""))),l.push("copy to "+Ns(((o=t.newFileName)!==null&&o!==void 0?o:"").replace(/^b\//,""))))}else e.includeIndex&&t.oldFileName==t.newFileName&&t.oldFileName!==void 0&&l.push("Index: "+t.oldFileName),e.includeUnderline&&l.push("===================================================================");let c=t.hunks.length>0;e.includeFileHeaders&&t.oldFileName!==void 0&&t.newFileName!==void 0&&(!t.isGit||c)&&(l.push("--- "+Ns(t.oldFileName)+(t.oldHeader?" "+t.oldHeader:"")),l.push("+++ "+Ns(t.newFileName)+(t.newHeader?" "+t.newHeader:"")));for(let u=0;u<t.hunks.length;u++){let f=t.hunks[u],d=f.oldLines===0?f.oldStart-1:f.oldStart,h=f.newLines===0?f.newStart-1:f.newStart;l.push("@@ -"+d+","+f.oldLines+" +"+h+","+f.newLines+" @@");for(let p of f.lines)l.push(p)}return l.join(`
|
||||
`)+`
|
||||
`}function MS(t,e,r,i,n,s,a){if(typeof a=="function"&&(a={callback:a}),a!=null&&a.callback){let{callback:o}=a;nv(t,e,r,i,n,s,Object.assign(Object.assign({},a),{callback:l=>{o(l?Od(l,a.headerOptions):void 0)}}))}else{let o=nv(t,e,r,i,n,s,a);return o?Od(o,a==null?void 0:a.headerOptions):void 0}}function gu(t,e,r,i,n,s){return MS(t,t,e,r,i,n,s)}function NB(t){let e=t.endsWith(`
|
||||
`),r=t.split(`
|
||||
`).map(i=>i+`
|
||||
`);return e?r.pop():r.push(r.pop().slice(0,-1)),r}var En=require("obsidian");m();function DS(t,e){let r=Object.assign({},t.lineAuthor,e.lineAuthor);return Object.assign({},t,e,{lineAuthor:r})}var nl=class extends Error{constructor(r){super("No network connection available");this.originalError=r}};m();var OS=require("obsidian"),BB={options:[],placeholder:"",allowEmpty:!1,onlySelection:!1,initialValue:void 0,obscure:!1},rt=class extends OS.SuggestModal{constructor(e,r){if(super(e.app),this.config={...BB,...r},this.setPlaceholder(this.config.placeholder),this.config.obscure){this.inputEl.type="password";let i=this.containerEl.querySelector(".prompt-input-container");i.addClass("git-obscure-prompt"),i.setAttr("git-is-obscured","true");let n=i==null?void 0:i.createDiv({cls:"search-input-clear-button"});n.style.marginRight="32px",n.id="git-show-password",n.addEventListener("click",()=>{i.getAttr("git-is-obscured")==="true"?(this.inputEl.type="text",i.setAttr("git-is-obscured","false")):(this.inputEl.type="password",i.setAttr("git-is-obscured","true"))})}}openAndGetResult(){return new Promise(e=>{this.resolve=e,this.open(),this.config.initialValue!=null&&(this.inputEl.value=this.config.initialValue,this.inputEl.dispatchEvent(new Event("input")))})}onClose(){new Promise(e=>window.setTimeout(e,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(e){return this.config.onlySelection?this.config.options:this.config.allowEmpty?[e.length>0?e:" ",...this.config.options]:[e.length>0?e:"...",...this.config.options]}renderSuggestion(e,r){this.config.obscure?r.hide():r.setText(e)}onChooseSuggestion(e,r){if(this.resolve){let i;this.config.allowEmpty&&e===" "?i="":e==="..."?i=void 0:i=e,this.resolve(i)}}};m();var tk=ft(ek(),1),rk=require("child_process"),Xn=require("obsidian");function Nd(t){throw new Error(`Unexpected object: ${t}`)}function wu(t,e,r){return t===1?`${t} ${e}`:`${t} ${r!=null?r:e+"s"}`}var ov=(t,e)=>t==="."||e==null||e.length===0||e==="."?!0:e.length>=t.length?e.startsWith(t):t.startsWith(e);function Vi(t,e){let r;if(e){if(e.button===0||e.button===1){let i=Xn.Keymap.isModEvent(e);r=t.workspace.getLeaf(i)}}else r=t.workspace.getLeaf(!1);return r}function _n(t,e,r,i,n){if(e.button==2){let s=t.vault.getAbstractFileByPath(r);if(s!=null){let a=new Xn.Menu;t.workspace.trigger("file-menu",a,s,n,i),a.showAtPosition({x:e.pageX,y:e.pageY})}else{let a=new Xn.Menu;t.workspace.trigger("obsidian-git:menu",a,r,n,i),a.showAtPosition({x:e.pageX,y:e.pageY})}}}function Bs(t){throw new Error("Impossible branch: "+t)}function lv(t){return`rgb(${t.r},${t.g},${t.b})`}function ik(t){var s;let e=(s=tk.fromString(t))==null?void 0:s.toRgbaArray();if(e===void 0)return;let[r,i,n]=e;return{r,g:i,b:n}}function nk(t){return t.diff(Xn.moment.unix(0),"seconds")}function sk(t){if(t.length!==0)return t.slice().sort()[Math.floor(t.length/2)]}function bu(t,e){return new Proxy(t,{get(r,i){return i==="length"?Math.min(e,r.length):r[i]}})}function ak(t,e,r){return t.length<=e?new Array(e-t.length).fill(r).join("")+t:t.substring(t.length-e)}function ok(t,e){if(e<=0)return t;let r=new Array(e).fill(" ").join(""),i=t.substring(e,t.length);return r+i}function cv(t,e,r){return t<=e&&e<=r}function yn(t){let[e,...r]=t.split("/");return[e!=null?e:"",r.length===0?void 0:r.join("/")]}function xn(t){return t.endsWith("/")?t:t.split("/").last().replace(/\.md$/,"")}function lk(t){return t===1?"1 minute":`${t} minutes`}function e3(t){let e=t.lastIndexOf(".");return t.substring(e+1)}function al(t){if(t.endsWith(".md"))return!1;let e=e3(t);return IS.includes(e)}function uv(t){return(t.startsWith("https://github.com/")||t.startsWith("https://gitlab.com/"))&&(t.endsWith(".git")||(t=t+".git")),t}function ol(t,e){let r=e.vault.getAbstractFileByPath(t);if(!(r instanceof Xn.TFile))return!1;try{return!!e.viewRegistry.getTypeByExtension(r.extension)}catch(i){return!0}}function ck({isFolder:t,gitRelativePath:e}){let r="/";return r+=e,t&&(r+="/"),r.replace(/([\\!#*?[\]])/g,String.raw`\$1`).replace(/\s(?=\s*$)/g,String.raw`\ `)}function ll(t,e,r,i){let n=e.target;t.workspace.trigger("hover-link",{event:e,source:r.getViewType(),hoverParent:r,targetEl:n,linktext:i})}function _u(t,e,r={}){return new Promise((i,n)=>{let s=(0,rk.spawn)(t,e,r),a="",o="";s.stdout.on("data",l=>{a+=l.toString()}),s.stderr.on("data",l=>{o+=l.toString()}),s.on("error",l=>{i({error:new Error(l.message),stdout:a,stderr:o,code:1})}),s.on("close",l=>{i({stdout:a,stderr:o,code:l!=null?l:1,error:void 0})})})}m();var uk=require("os"),Hd=require("obsidian");var cl=class{constructor(e){this.plugin=e,this.app=e.app}async withGitOperation(e,r){var i;this.plugin.setPluginState({operation:e});try{return await r()}finally{(i=this.plugin.statusBar)==null||i.clearProgress(!1),this.plugin.setPluginState({operation:0})}}getRelativeVaultPath(e){return this.plugin.settings.basePath?e===""||e==="."?this.plugin.settings.basePath:this.plugin.settings.basePath+"/"+e:e}getRelativeRepoPath(e,r=!0){if(r){let i=this.p
Line truncated
|
||||
`):n="Too many files to list",e=e+`
|
||||
|
||||
Affected files:
|
||||
`+n}return e}};m();var bi=require("obsidian"),Ud=class{constructor(e,r){this.plugin=r;this.promises={};this.adapter=e.adapter,this.vault=e,this.lastBasePath=this.plugin.settings.basePath,this.promises.readFile=this.readFile.bind(this),this.promises.writeFile=this.writeFile.bind(this),this.promises.readdir=this.readdir.bind(this),this.promises.mkdir=this.mkdir.bind(this),this.promises.rmdir=this.rmdir.bind(this),this.promises.stat=this.stat.bind(this),this.promises.unlink=this.unlink.bind(this),this.promises.lstat=this.lstat.bind(this),this.promises.readlink=this.readlink.bind(this),this.promises.symlink=this.symlink.bind(this)}async readFile(e,r){var n;if(this.maybeLog("Read: "+e+JSON.stringify(r)),(typeof r=="string"?r:r==null?void 0:r.encoding)==="utf8"){let s=this.vault.getAbstractFileByPath(e);return s instanceof bi.TFile?(this.maybeLog("Reuse"),this.vault.read(s)):this.adapter.read(e)}else{if(this.isIndexPath(e))return this.plugin.settings.basePath!=this.lastBasePath?(this.clearIndex(),this.lastBasePath=this.plugin.settings.basePath,this.adapter.readBinary(e)):(n=this.index)!=null?n:this.adapter.readBinary(e);let s=this.vault.getAbstractFileByPath(e);return s instanceof bi.TFile?(this.maybeLog("Reuse"),this.vault.readBinary(s)):this.adapter.readBinary(e)}}async writeFile(e,r){var i;if(this.maybeLog("Write: "+e),typeof r=="string"){let n=this.vault.getAbstractFileByPath(e);if(n instanceof bi.TFile)return this.vault.modify(n,r);if(!this.isHiddenPath(e))await this.vault.create(e,r);else return this.adapter.write(e,r)}else{let n=t3(r);if(this.isIndexPath(e)){this.index=n;let s=Date.now();(i=this.indexctime)!=null||(this.indexctime=s),this.indexmtime=s}else{let s=this.vault.getAbstractFileByPath(e);if(s instanceof bi.TFile)return this.vault.modifyBinary(s,n);if(!this.isHiddenPath(e))await this.vault.createBinary(e,n);else return this.adapter.writeBinary(e,n)}}}async readdir(e){e==="."&&(e="/");let r=await this.adapter.list(e),i=[...r.files,...r.folders],n;return e!=="/"?n=i.map(s=>(0,bi.normalizePath)(s.substring(e.length))):n=i,n}async mkdir(e){if(!(e==="."||e==="/")){if(!this.isHiddenPath(e)){if(this.vault.getFolderByPath(e))return;await this.vault.createFolder(e);return}return this.adapter.mkdir(e)}}async rmdir(e,r){var i,n;if(!this.isHiddenPath(e)){let s=this.vault.getAbstractFileByPath(e);if(s instanceof bi.TFolder){await this.vault.delete(s,(r==null?void 0:r.recursive)===!0||((i=r==null?void 0:r.options)==null?void 0:i.recursive)===!0);return}}return this.adapter.rmdir(e,(r==null?void 0:r.recursive)===!0||((n=r==null?void 0:r.options)==null?void 0:n.recursive)===!0)}async stat(e){if(this.isIndexPath(e)){if(this.index!==void 0&&this.indexctime!=null&&this.indexmtime!=null)return{isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1,size:this.index.byteLength,type:"file",ctimeMs:this.indexctime,mtimeMs:this.indexmtime};{let i=await this.adapter.stat(e);if(i==null)throw{code:"ENOENT"};return this.indexctime=i.ctime,this.indexmtime=i.mtime,{ctimeMs:i.ctime,mtimeMs:i.mtime,size:i.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1}}}e==="."&&(e="/");let r=this.vault.getAbstractFileByPath(e);if(this.maybeLog("Stat: "+e),r instanceof bi.TFile)return this.maybeLog("Reuse stat"),{ctimeMs:r.stat.ctime,mtimeMs:r.stat.mtime,size:r.stat.size,type:"file",isFile:()=>!0,isDirectory:()=>!1,isSymbolicLink:()=>!1};{let i=await this.adapter.stat(e);if(i)return{ctimeMs:i.ctime,mtimeMs:i.mtime,size:i.size,type:i.type==="folder"?"directory":i.type,isFile:()=>i.type==="file",isDirectory:()=>i.type==="folder",isSymbolicLink:()=>!1};throw{code:"ENOENT"}}}async unlink(e){if(!this.isHiddenPath(e)){let r=this.vault.getAbstractFileByPath(e);if(r instanceof bi.TFile)return this.vault.delete(r)}return this.adapter.remove(e)}async lstat(e){return this.stat(e)}async readlink(e){throw new Error(`readlink of (${e}) is not implemented.`)}async symlink(e){throw new Error(`symlink of (${e}) is not implemented.`)}async saveAndClear(){this.index!==void 0&&await this.adapter.writeBinary(this.getIndexPath(),this.index,{ctime:this.indexctime,mtime:this.indexmtime}),this.clearIndex()}clearIndex(){this.index=void 0,this.indexctime=void 0,this.indexmtime=void 0}get gitDir(){return this.plugin.settings.gitDir||".git"}getIndexPath(){return this.plugin.gitManager.getRelativeVaultPath(this.gitDir+"/index")}isIndexPath(e){return e===this.getIndexPath()}isHiddenPath(e){return e.startsWith(this.gitDir)?!0:(0,bi.normalizePath)(e).split("/").some(r=>r.startsWith(".")&&r!==".")}maybeLog(e){}};function t3(t){return t instanceof ArrayBuffer?t:t.buffer instanceof ArrayBuffer&&t.byteOffset===0&&t.byteLength===t.buffer.byteLength?t.buffer:new Uint8Array(t.buffer,t.byteOffset,t.byteLength).slice().buffer}var gk=ft(mk(),1),zi=class extends cl{constructor(r){super(r);this.FILE=0;this.HEAD=1;this.WORKDIR=2;this.STAGE=3;this.status_mapping={"000":" ","003":"AD","020":"??","022":"A ","023":"AM",100:"D ",101:" D",103:"MD",110:"DA",111:" ",113:"M
Line truncated
|
||||
|
||||
`);return{message:(c=l[0])!=null?c:"",author:{name:o.commit.author.name,email:o.commit.author.email},body:l.slice(1).join(`
|
||||
|
||||
`),date:new Date(o.commit.committer.timestamp).toDateString(),diff:{changed:0,files:(await this.getFileChangesCount(o.commit.parent.first(),o.oid)).map(u=>({path:u.path,status:u.type,vaultPath:this.getRelativeVaultPath(u.path),hash:o.oid}))},hash:o.oid,refs:[]}}))}updateBasePath(r){return this.getRepo().dir=r,Promise.resolve()}getGitDirPath(){return(0,En.normalizePath)(this.getRelativeVaultPath(this.plugin.settings.gitDir||".git"))}async updateUpstreamBranch(r){let[i,n]=yn(r),s=await this.branchInfo();await this.wrapFS(de.push({...this.getRepo(),remote:i,remoteRef:n})),await this.setConfig(`branch.${s.current}.merge`,`refs/heads/${n}`)}updateGitPath(r){return Promise.resolve()}async getFileChangesCount(r,i){return this.walkDifference({walkers:[de.TREE({ref:r}),de.TREE({ref:i})]})}async walkDifference({walkers:r,dir:i}){return await this.wrapFS(de.walk({...this.getRepo(),trees:r,map:async function(s,[a,o]){if(!ov(s,i))return null;if(await(a==null?void 0:a.type())==="tree"||await(o==null?void 0:o.type())==="tree")return;let l=await(a==null?void 0:a.oid()),c=await(o==null?void 0:o.oid()),u="equal";if(l!==c&&(u="M"),l===void 0&&(u="A"),c===void 0&&(u="D"),l===void 0&&c===void 0&&(console.log("Something weird happened:"),console.log(a),console.log(o)),u!=="equal")return{path:s,type:u}}}))}async getStagedFiles(r="."){return(await this.walkDifference({walkers:[de.TREE({ref:"HEAD"}),de.STAGE()],dir:r})).map(n=>({vaultPath:this.getRelativeVaultPath(n.path),path:n.path}))}async getUnstagedFiles(r="."){let i,n=window.setTimeout(()=>{i=new En.Notice("This takes longer: Getting status",this.noticeLength)},2e4);try{let s=this.getRepo(),a=await this.wrapFS(de.walk({...s,trees:[de.WORKDIR(),de.STAGE()],map:async function(o,[l,c]){if(!c&&l&&await de.isIgnored({...s,filepath:o})||!ov(o,r))return null;let[u,f]=await Promise.all([l&&l.type(),c&&c.type()]),d=[u,f].includes("blob");if((u==="tree"||u==="special")&&!d)return;if(f==="commit")return null;if((f==="tree"||f==="special")&&!d)return;let h=f==="blob"?await c.oid():void 0,p;return u==="blob"&&f!=="blob"?p="42":u==="blob"&&(p=await l.oid()),p?h?p!==h?{path:o,type:"M"}:null:{path:o,type:"A"}:{path:o,type:"D"}}}));return window.clearTimeout(n),i==null||i.hide(),a}catch(s){throw window.clearTimeout(n),i==null||i.hide(),this.plugin.displayError(s),s}}async getDiffString(r,i=!1,n){let s=this.getRelativeVaultPath(r),a=async(c,[u])=>{if(r==c){let f=await u.oid();return(await de.readBlob({...this.getRepo(),oid:f})).blob}};if(n){let c=await pu({...this.getRepo(),filepath:r,oid:n}).then(p=>new TextDecoder().decode(p.blob)).catch(p=>{if(!(p instanceof de.Errors.NotFoundError))throw p}),f=(await de.readCommit({...this.getRepo(),oid:n})).commit.parent.first(),d;return f&&(d=await pu({...this.getRepo(),filepath:r,oid:f}).then(p=>new TextDecoder().decode(p.blob)).catch(p=>{if(!(p instanceof de.Errors.NotFoundError))throw p})),gu(s,d!=null?d:"",c!=null?c:"")}let o=(await de.walk({...this.getRepo(),trees:[de.STAGE()],map:a})).first(),l=new TextDecoder().decode(o);if(i){let c=await this.resolveRef("HEAD").then(f=>pu({...this.getRepo(),filepath:r,oid:f})).then(f=>new TextDecoder().decode(f.blob)).catch(f=>{if(!(f instanceof de.Errors.NotFoundError))throw f});return gu(s,c!=null?c:"",l)}else{let c;return await this.app.vault.adapter.exists(s)?c=await this.app.vault.adapter.read(s):c="",gu(s,l,c)}}async getLastCommitTime(){let r=this.getRepo(),i=await this.resolveRef("HEAD"),s=(await de.readCommit({...r,oid:i})).commit.committer.timestamp;return new Date(s*1e3)}getFileStatusResult(r){var n,s;let i=this.status_mapping[`${r[this.HEAD]}${r[this.WORKDIR]}${r[this.STAGE]}`];return{index:i[0]=="?"?"U":(n=i[0])!=null?n:" ",workingDir:i[1]=="?"?"U":(s=i[1])!=null?s:" ",path:r[this.FILE],vaultPath:this.getRelativeVaultPath(r[this.FILE])}}async checkAuthorInfo(){let r=await this.getConfig("user.name"),i=await this.getConfig("user.email");if(!r||!i)throw Error("Git author name and email are not set. Please set both fields in the settings.")}showNotice(r,i=!0){if(!this.plugin.settings.disablePopups)return new En.Notice(r,i?this.noticeLength:void 0)}};async function*n3(t){yield new Uint8Array(t)}async function s3(t){let e=new ReadableStream({async start(i){for await(let n of t)i.enqueue(n);i.close()}});return await new Response(e).arrayBuffer()}async function a3(t){let e=new Uint8Array(t);if(e.length<2||e[0]!==31||e[1]!==139)return t;try{let r=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip"));return await new Response(r).arrayBuffer()}catch(r){return t}}m();var hT=ft(Vd(),1),ri=ft(require("fs/promises"),1),Qn=require("obsidian"),Le=ft(require("path"),1),Ru=require("path");m();var eh=ft(xk(),1);m();var fv=new WeakMap;function pl(...t){let e=new String(t);return fv.set(e,t),e}function _i(t){return t instanceof String&&fv.has(t)}function ml(t){var e;return(e=fv.get(t))!=null?e:[]}var Qd=ft(Vd(),1),QC=require("child_process");var OA=ft(hv(),1),qA=require("node:path");m();function*Ek(t,e){let
Line truncated
|
||||
`){return t.split(r).reduce((i,n)=>{let s=e?n.trim():n;return s&&i.push(s),i},[])}function Ov(t,e){return Cu(t,!0).map(r=>e(r))}function Lv(t){return(0,eh.exists)(t,eh.FOLDER)}function Ei(t,e){return Array.isArray(t)?t.includes(e)||t.push(e):t.add(e),e}function pC(t,e){return Array.isArray(t)&&!t.includes(e)&&t.push(e),t}function th(t,e){if(Array.isArray(t)){let r=t.indexOf(e);r>=0&&t.splice(r,1)}else t.delete(e);return e}function Sn(t){return Array.isArray(t)?t:[t]}function mC(t){return t.replace(/[\s-]+(.)/g,(e,r)=>r.toUpperCase())}function yl(t){return Sn(t).map(e=>e instanceof String?e:String(e))}function Qe(t,e=0){if(t==null)return e;let r=parseInt(t,10);return Number.isNaN(r)?e:r}function Eu(t,e){let r=[];for(let i=0,n=t.length;i<n;i++)r.push(e,t[i]);return r}function Su(t){return(Array.isArray(t)?k.concat(t):t).toString("utf-8")}function gC(t,e){let r={};return e.forEach(i=>{t[i]!==void 0&&(r[i]=t[i])}),r}function _v(t=0){return new Promise(e=>setTimeout(e,t))}function yv(t){if(t!==!1)return t}var wl,$a,Au,rh=Y({"src/lib/utils/util.ts"(){"use strict";Nv(),wl="\0",$a=()=>{},Au=Object.prototype.toString.call.bind(Object.prototype.toString)}});function ar(t,e,r){return e(t)?t:arguments.length>2?r:void 0}function xv(t,e){let r=_i(t)?"string":typeof t;return/number|string|boolean/.test(r)&&(!e||!e.includes(r))}function ih(t){return!!t&&Au(t)==="[object Object]"}function vC(t){return typeof t=="function"}var Tu,wC,mt,Kd,nh,Nv=Y({"src/lib/utils/argument-filters.ts"(){"use strict";rh(),Tu=t=>Array.isArray(t),wC=t=>typeof t=="number",mt=t=>typeof t=="string"||_i(t),Kd=t=>mt(t)||Array.isArray(t)&&t.every(mt),nh=t=>t==null||"number|boolean|function".includes(typeof t)?!1:typeof t.length=="number"}}),Ev,s8=Y({"src/lib/utils/exit-codes.ts"(){"use strict";Ev=(t=>(t[t.SUCCESS=0]="SUCCESS",t[t.ERROR=1]="ERROR",t[t.NOT_FOUND=-2]="NOT_FOUND",t[t.UNCLEAN=128]="UNCLEAN",t))(Ev||{})}}),Xd,a8=Y({"src/lib/utils/git-output-streams.ts"(){"use strict";Xd=class bC{constructor(e,r){this.stdOut=e,this.stdErr=r}asStrings(){return new bC(this.stdOut.toString("utf8"),this.stdErr.toString("utf8"))}}}});function o8(){throw new Error("LineParser:useMatches not implemented")}var be,Hs,l8=Y({"src/lib/utils/line-parser.ts"(){"use strict";be=class{constructor(t,e){this.matches=[],this.useMatches=o8,this.parse=(r,i)=>(this.resetMatches(),this._regExp.every((n,s)=>this.addMatch(n,s,r(s)))?this.useMatches(i,this.prepareMatches())!==!1:!1),this._regExp=Array.isArray(t)?t:[t],e&&(this.useMatches=e)}resetMatches(){this.matches.length=0}prepareMatches(){return this.matches}addMatch(t,e,r){let i=r&&t.exec(r);return i&&this.pushMatch(e,i),!!i}pushMatch(t,e){this.matches.push(...e.slice(1))}},Hs=class extends be{addMatch(t,e,r){return/^remote:\s/.test(String(r))&&super.addMatch(t,e,r)}pushMatch(t,e){(t>0||e.length>1)&&super.pushMatch(t,e)}}}});function _C(...t){let e=process.cwd(),r=Object.assign({baseDir:e,...yC},...t.filter(i=>typeof i=="object"&&i));return r.baseDir=r.baseDir||e,r.trimmed=r.trimmed===!0,r}var yC,c8=Y({"src/lib/utils/simple-git-options.ts"(){"use strict";yC={binary:"git",maxConcurrentProcesses:5,config:[],trimmed:!1}}});function Bv(t,e=[]){return ih(t)?Object.keys(t).reduce((r,i)=>{let n=t[i];if(_i(n))r.push(n);else if(xv(n,["boolean"]))r.push(i+"="+n);else if(Array.isArray(n))for(let s of n)xv(s,["string","number"])||r.push(i+"="+s);else r.push(i);return r},e):e}function yr(t,e=0,r=!1){let i=[];for(let n=0,s=e<0?t.length:e;n<s;n++)"string|number".includes(typeof t[n])&&i.push(String(t[n]));return Bv(Hv(t),i),r||i.push(...u8(t)),i}function u8(t){let e=typeof Ra(t)=="function";return yl(ar(Ra(t,e?1:0),Tu,[]))}function Hv(t){let e=vC(Ra(t));return ar(Ra(t,e?1:0),ih)}function nt(t,e=!0){let r=cC(Ra(t));return e||uC(r)?r:void 0}var f8=Y({"src/lib/utils/task-options.ts"(){"use strict";Nv(),rh()}});function Sv(t,e){return t(e.stdOut,e.stdErr)}function Hr(t,e,r,i=!0){return Sn(r).forEach(n=>{for(let s=Cu(n,i),a=0,o=s.length;a<o;a++){let l=(c=0)=>{if(!(a+c>=o))return s[a+c]};e.some(({parse:c})=>c(l,t))}}),t}var d8=Y({"src/lib/utils/task-parser.ts"(){"use strict";rh()}}),xC={};St(xC,{ExitCodes:()=>Ev,GitOutputStreams:()=>Xd,LineParser:()=>be,NOOP:()=>$a,NULL:()=>wl,RemoteLineParser:()=>Hs,append:()=>Ei,appendTaskOptions:()=>Bv,asArray:()=>Sn,asCamelCase:()=>mC,asFunction:()=>cC,asNumber:()=>Qe,asStringArray:()=>yl,bufferToString:()=>Su,callTaskParser:()=>Sv,createInstanceConfig:()=>_C,delay:()=>_v,filterArray:()=>Tu,filterFunction:()=>vC,filterHasLength:()=>nh,filterNumber:()=>wC,filterPlainObject:()=>ih,filterPrimitives:()=>xv,filterString:()=>mt,filterStringOrStringArray:()=>Kd,filterType:()=>ar,first:()=>dC,folderExists:()=>Lv,forEachLineWithContent:()=>Ov,getTrailingOptions:()=>yr,including:()=>pC,isUserFunction:()=>uC,last:()=>Ra,objectToString:()=>Au,orVoid:()=>yv,parseStringResponse:()=>Hr,pick:()=>gC,prefixedArray:()=>Eu,remove:()=>th,splitOn:()=>fC,toLinesWithContent:()=>Cu,trailingFunctionArgument:()=>nt,trailingOptionsArgument
Line truncated
|
||||
`)){let l=fC(a,`
|
||||
`);o=l[0],a=l[1]}yield{file:s,key:o,value:a}}}var BC,C8=Y({"src/lib/responses/ConfigList.ts"(){"use strict";ge(),BC=class{constructor(){this.files=[],this.values=Object.create(null)}get all(){return this._all||(this._all=this.files.reduce((t,e)=>Object.assign(t,this.values[e]),{})),this._all}addFile(t){if(!(t in this.values)){let e=Ra(this.files);this.values[t]=e?Object.create(this.values[e]):{},this.files.push(t)}return this.values[t]}addValue(t,e,r){let i=this.addFile(t);Object.hasOwn(i,e)?Array.isArray(i[e])?i[e].push(r):i[e]=[i[e],r]:i[e]=r,this._all=void 0}}}});function pv(t,e){return typeof t=="string"&&Object.hasOwn(Av,t)?t:e}function A8(t,e,r,i){let n=["config",`--${i}`];return r&&n.push("--add"),n.push(t,e),{commands:n,format:"utf-8",parser(s){return s}}}function T8(t,e){let r=["config","--null","--show-origin","--get-all",t];return e&&r.splice(1,0,`--${e}`),{commands:r,format:"utf-8",parser(i){return S8(i,t)}}}function P8(t){let e=["config","--list","--show-origin","--null"];return t&&e.push(`--${t}`),{commands:e,format:"utf-8",parser(r){return E8(r)}}}function R8(){return{addConfig(t,e,...r){return this._runTask(A8(t,e,r[0]===!0,pv(r[1],"local")),nt(arguments))},getConfig(t,e){return this._runTask(T8(t,pv(e,void 0)),nt(arguments))},listConfig(...t){return this._runTask(P8(pv(t[0],void 0)),nt(arguments))}}}var Av,HC=Y({"src/lib/tasks/config.ts"(){"use strict";C8(),ge(),Av=(t=>(t.system="system",t.global="global",t.local="local",t.worktree="worktree",t))(Av||{})}});function $8(t){return UC.has(t)}var mv,UC,GC=Y({"src/lib/tasks/diff-name-status.ts"(){"use strict";mv=(t=>(t.ADDED="A",t.COPIED="C",t.DELETED="D",t.MODIFIED="M",t.RENAMED="R",t.CHANGED="T",t.UNMERGED="U",t.UNKNOWN="X",t.BROKEN="B",t))(mv||{}),UC=new Set(Object.values(mv))}});function F8(...t){return new VC().param(...t)}function I8(t){let e=new Set,r={};return Ov(t,i=>{let[n,s,a]=i.split(wl);e.add(n),(r[n]=r[n]||[]).push({line:Qe(s),path:n,preview:a})}),{paths:e,results:r}}function M8(){return{grep(t){let e=nt(arguments),r=yr(arguments);for(let n of jC)if(r.includes(n))return this._runTask(Nr(`git.grep: use of "${n}" is not supported.`),e);typeof t=="string"&&(t=F8().param(t));let i=["grep","--null","-n","--full-name",...r,...t];return this._runTask({commands:i,format:"utf-8",parser(n){return I8(n)}},e)}}}var jC,xu,Rk,VC,zC=Y({"src/lib/tasks/grep.ts"(){"use strict";ge(),yt(),jC=["-h"],xu=Symbol("grepQuery"),VC=class{constructor(){this[Rk]=[]}*[(Rk=xu,Symbol.iterator)](){for(let t of this[xu])yield t}and(...t){return t.length&&this[xu].push("--and","(",...Eu(t,"-e"),")"),this}param(...t){return this[xu].push(...Eu(t,"-e")),this}}}}),WC={};St(WC,{ResetMode:()=>qd,getResetMode:()=>O8,resetTask:()=>D8});function D8(t,e){let r=["reset"];return qC(t)&&r.push(`--${t}`),r.push(...e),xr(r)}function O8(t){if(qC(t))return t;switch(typeof t){case"string":case"undefined":return"soft"}}function qC(t){return typeof t=="string"&&YC.includes(t)}var qd,YC,ZC=Y({"src/lib/tasks/reset.ts"(){"use strict";ge(),yt(),qd=(t=>(t.MIXED="mixed",t.SOFT="soft",t.HARD="hard",t.MERGE="merge",t.KEEP="keep",t))(qd||{}),YC=yl(Object.values(qd))}});function L8(){return(0,Qd.default)("simple-git")}function $k(t,e,r){return!e||!String(e).replace(/\s*/,"")?r?(i,...n)=>{t(i,...n),r(i,...n)}:t:(i,...n)=>{t(`%s ${i}`,e,...n),r&&r(i,...n)}}function N8(t,e,{namespace:r}){if(typeof t=="string")return t;let i=e&&e.namespace||"";return i.startsWith(r)?i.substr(r.length+1):i||r}function Wv(t,e,r,i=L8()){let n=t&&`[${t}]`||"",s=[],a=typeof e=="string"?i.extend(e):e,o=N8(ar(e,mt),a,i);return c(r);function l(u,f){return Ei(s,Wv(t,o.replace(/^[^:]+/,u),f,i))}function c(u){let f=u&&`[${u}]`||"",d=a&&$k(a,f)||$a,h=$k(i,`${n} ${f}`,d);return Object.assign(a?d:h,{label:t,sibling:l,info:h,step:c})}}var KC=Y({"src/lib/git-logger.ts"(){"use strict";ge(),Qd.default.formatters.L=t=>String(nh(t)?t.length:"-"),Qd.default.formatters.B=t=>k.isBuffer(t)?t.toString("utf8"):Au(t)}}),XC,B8=Y({"src/lib/runners/tasks-pending-queue.ts"(){"use strict";var t;Us(),KC(),XC=(t=class{constructor(r="GitExecutor"){this.logLabel=r,this._queue=new Map}withProgress(r){return this._queue.get(r)}createProgress(r){let i=t.getName(r.commands[0]),n=Wv(this.logLabel,i);return{task:r,logger:n,name:i}}push(r){let i=this.createProgress(r);return i.logger("Adding task to the queue, commands = %o",r.commands),this._queue.set(r,i),i}fatal(r){for(let[i,{logger:n}]of Array.from(this._queue.entries()))i===r.task?(n.info("Failed %o",r),n("Fatal exception, any as-yet un-started tasks run through this executor will not be attempted")):n.info("A fatal exception occurred in a previous task, the queue has been purged: %o",r.message),this.complete(i);if(this._queue.size!==0)throw new Error(`Queue size should be zero after fatal: ${this._queue.size}`)}complete(r){this.withProgress(r)&&this._queue.delete(r)}attempt(r){let i=this.withProgress(r);if(!i)throw new Br(void 0,"TasksPendingQueue: attempt called for an unknown task");return i.logger(
Line truncated
|
||||
`).map(M6).filter(Boolean);e||r.sort(function(n,s){let a=n.split("."),o=s.split(".");if(a.length===1||o.length===1)return I6(Wd(a[0]),Wd(o[0]));for(let l=0,c=Math.max(a.length,o.length);l<c;l++){let u=sT(Wd(a[l]),Wd(o[l]));if(u)return u}return 0});let i=e?r[0]:[...r].reverse().find(n=>n.indexOf(".")>=0);return new rC(r,i)}}}),oT={};St(oT,{addAnnotatedTagTask:()=>N6,addTagTask:()=>L6,tagListTask:()=>O6});function O6(t=[]){let e=t.some(r=>/^--sort=/.test(r));return{format:"utf-8",commands:["tag","-l",...t],parser(r){return aT(r,e)}}}function L6(t){return{format:"utf-8",commands:["tag",t],parser(){return{name:t}}}}function N6(t,e){return{format:"utf-8",commands:["tag","-a","-m",e,t],parser(){return{name:t}}}}var B6=Y({"src/lib/tasks/tag.ts"(){"use strict";D6()}}),H6=i8({"src/git.js"(t,e){"use strict";var{GitExecutor:r}=(G8(),_t(JC)),{SimpleGitApi:i}=(GH(),_t(MA)),{Scheduler:n}=(jH(),_t(DA)),{adhocExecTask:s,configurationErrorTask:a}=(yt(),_t(Cv)),{asArray:o,filterArray:l,filterPrimitives:c,filterString:u,filterStringOrStringArray:f,filterType:d,getTrailingOptions:h,trailingFunctionArgument:p,trailingOptionsArgument:g}=(ge(),_t(xC)),{applyPatchTask:v}=(zH(),_t(NA)),{branchTask:b,branchLocalTask:_,deleteBranchesTask:C,deleteBranchTask:x}=(r6(),_t(zA)),{checkIgnoreTask:S}=(a6(),_t(ZA)),{checkIsRepoTask:A}=(CC(),_t(EC)),{cleanWithOptionsTask:w,isCleanOptionsArray:E}=(LC(),_t(DC)),{diffSummaryTask:y}=(Jv(),_t(dA)),{fetchTask:P}=(f6(),_t(XA)),{moveTask:T}=(m6(),_t(JA)),{pullTask:I}=(v6(),_t(eT)),{pushTagsTask:L}=(AA(),_t(CA)),{addRemoteTask:H,getRemotesTask:te,listRemotesTask:xe,remoteTask:Z,removeRemoteTask:K}=(C6(),_t(rT)),{getResetMode:ce,resetTask:pe}=(ZC(),_t(WC)),{stashListTask:W}=(T6(),_t(iT)),{addSubModuleTask:X,initSubModuleTask:G,subModuleTask:Be,updateSubModuleTask:pr}=(F6(),_t(nT)),{addAnnotatedTagTask:Ut,addTagTask:Ie,tagListTask:Rt}=(B6(),_t(oT)),{straightThroughBufferTask:$t,straightThroughStringTask:Xe}=(yt(),_t(Cv));function ee(N,O){this._plugins=O,this._executor=new r(N.baseDir,new n(N.maxConcurrentProcesses),O),this._trimmed=N.trimmed}(ee.prototype=Object.create(i.prototype)).constructor=ee,ee.prototype.customBinary=function(N){return this._plugins.reconfigure("binary",N),this},ee.prototype.env=function(N,O){return arguments.length===1&&typeof N=="object"?this._executor.env=N:(this._executor.env=this._executor.env||{})[N]=O,this},ee.prototype.stashList=function(N){return this._runTask(W(g(arguments)||{},l(N)&&N||[]),p(arguments))},ee.prototype.mv=function(N,O){return this._runTask(T(N,O),p(arguments))},ee.prototype.checkoutLatestTag=function(N){var O=this;return this.pull(function(){O.tags(function(ue,$e){O.checkout($e.latest,N)})})},ee.prototype.pull=function(N,O,ue,$e){return this._runTask(I(d(N,u),d(O,u),h(arguments)),p(arguments))},ee.prototype.fetch=function(N,O){return this._runTask(P(d(N,u),d(O,u),h(arguments)),p(arguments))},ee.prototype.silent=function(N){return this._runTask(s(()=>console.warn("simple-git deprecation notice: git.silent: logging should be configured using the `debug` library / `DEBUG` environment variable, this method will be removed.")))},ee.prototype.tags=function(N,O){return this._runTask(Rt(h(arguments)),p(arguments))},ee.prototype.rebase=function(){return this._runTask(Xe(["rebase",...h(arguments)]),p(arguments))},ee.prototype.reset=function(N){return this._runTask(pe(ce(N),h(arguments)),p(arguments))},ee.prototype.revert=function(N){let O=p(arguments);return typeof N!="string"?this._runTask(a("Commit must be a string"),O):this._runTask(Xe(["revert",...h(arguments,0,!0),N]),O)},ee.prototype.addTag=function(N){let O=typeof N=="string"?Ie(N):a("Git.addTag requires a tag name");return this._runTask(O,p(arguments))},ee.prototype.addAnnotatedTag=function(N,O){return this._runTask(Ut(N,O),p(arguments))},ee.prototype.deleteLocalBranch=function(N,O,ue){return this._runTask(x(N,typeof O=="boolean"?O:!1),p(arguments))},ee.prototype.deleteLocalBranches=function(N,O,ue){return this._runTask(C(N,typeof O=="boolean"?O:!1),p(arguments))},ee.prototype.branch=function(N,O){return this._runTask(b(h(arguments)),p(arguments))},ee.prototype.branchLocal=function(N){return this._runTask(_(),p(arguments))},ee.prototype.raw=function(N){let O=!Array.isArray(N),ue=[].slice.call(O?arguments:N,0);for(let Gt=0;Gt<ue.length&&O;Gt++)if(!c(ue[Gt])){ue.splice(Gt,ue.length-Gt);break}ue.push(...h(arguments,0,!0));var $e=p(arguments);return ue.length?this._runTask(Xe(ue,this._trimmed),$e):this._runTask(a("Raw: must supply one or more command to execute"),$e)},ee.prototype.submoduleAdd=function(N,O,ue){return this._runTask(X(N,O),p(arguments))},ee.prototype.submoduleUpdate=function(N,O){return this._runTask(pr(h(arguments,!0)),p(arguments))},ee.prototype.submoduleInit=function(N,O){return this._runTask(G(h(arguments,!0)),p(arguments))},ee.prototype.subModule=function(N,O){return this._runTask(Be(h(arguments)),p(arguments))},ee.prototype.listRemote=function(){return this._runTask(xe(h(arguments)),p(argum
Line truncated
|
||||
`).some(l=>l.contains(n))||await ri.appendFile(r,n+`
|
||||
`)}catch(r){console.error("Error while adding askpass script to exclude file:",r)}}unload(){var r;(r=this.watchAbortController)==null||r.abort()}async status(r){let i=r==null?void 0:r.path,n=await this.git.status(i!=null?["--",i]:[]),s=n.files.map(a=>{let o=this.formatPath(a);return{path:o.path,from:o.from,index:a.index==="?"?"U":a.index,workingDir:a.working_dir==="?"?"U":a.working_dir,vaultPath:this.getRelativeVaultPath(o.path)}});return{all:s,changed:s.filter(a=>a.workingDir!==" "),staged:s.filter(a=>a.index!==" "&&a.index!="U"),conflicted:n.conflicted.map(a=>this.formatPath({path:a}).path)}}async submoduleAwareHeadRevisonInContainingDirectory(r){let i=this.getRelativeRepoPath(r),s=["-C",Le.dirname(i),"rev-parse","HEAD"],a=this.git.raw(s);return a.catch(o=>console.warn("obsidian-git: rev-parse error:",o)),(await a).trim()}async getSubmodulePaths(){return new Promise(r=>{this.git.outputHandler((i,n,s,a)=>{if(!(a.contains("submodule")&&a.contains("foreach")))return;let o="",l=this.app.vault.adapter.getBasePath()+(this.plugin.settings.basePath?"/"+this.plugin.settings.basePath:"");n.on("data",c=>{o+=c.toString("utf8")}),n.on("end",()=>{let u=o.split(`
|
||||
`).map(f=>{let d=f.match(/'([^']*)'/);if(d!=null)return l+"/"+d[1]+Ru.sep}).filter(f=>!!f);u.reverse(),r(u)})}),this.git.subModule(["foreach","--recursive",""]).then(()=>{this.git.outputHandler(()=>{})},i=>this.plugin.displayError(i))})}formatPath(r){function i(n){if(n!=null)return n.startsWith('"')&&n.endsWith('"')?n.substring(1,n.length-1):n}return r.from!=null?{from:i(r.from),path:i(r.path)}:{path:i(r.path)}}async blame(r,i,n){if(r=this.getRelativeRepoPath(r),!await this.isTracked(r))return"untracked";let s=await this.getSubmoduleOfFile(r),a=s?["-C",s.submodule]:[],o=s?s.relativeFilepath:r;a.push("blame","--porcelain"),n&&a.push("-w");let l=`-C${Id}`;switch(i){case"inactive":break;case"same-commit":a.push("-C",l);break;case"all-commits":a.push("-C","-C",l);break;default:Bs(i)}a.push("--",o);let c=await this.git.raw(a);return a4(c)}async isTracked(r){let i=await this.getSubmoduleOfFile(r),n=i?["-C",i.submodule]:[],s=i?i.relativeFilepath:r;return n.push("ls-files","--",s),this.git.raw(n).then(a=>a.trim()!=="")}async commitAll({message:r}){return this.withGitOperation(2,async()=>{if(this.plugin.settings.updateSubmodules){let n=await this.getSubmodulePaths();for(let s of n)await this.git.cwd({path:s,root:!1}).add("-A"),await this.git.cwd({path:s,root:!1}).commit(await this.formatCommitMessage(r))}await this.git.add("-A");let i=await this.git.commit(await this.formatCommitMessage(r));return this.app.workspace.trigger("obsidian-git:head-change"),i.summary.changes})}async commit({message:r,amend:i}){return this.withGitOperation(2,async()=>{let n=(await this.git.commit(await this.formatCommitMessage(r),i?["--amend"]:[])).summary.changes;return this.app.workspace.trigger("obsidian-git:head-change"),n})}async stage(r,i){r=this.getRelativeRepoPath(r,i),await this.git.add(["--",r])}async stageAll({dir:r}){await this.git.add(r!=null?r:"-A")}async unstageAll({dir:r}){await this.git.reset(r!=null?["--",r]:[])}async unstage(r,i){r=this.getRelativeRepoPath(r,i),await this.git.reset(["--",r])}async discard(r){await this.isTracked(r)&&await this.git.checkout(["--progress","--",r])}async applyPatch(r){let i=Le.join(this.relPluginConfigPath,"patch");await this.app.vault.adapter.write(i,r),await this.git.applyPatch(i,{"--cached":null,"--unidiff-zero":null,"--whitespace":"nowarn"}),await this.app.vault.adapter.remove(i)}async getUntrackedPaths(r){let i=r==null?void 0:r.path,n=[];return i!=null&&n.push("--",i),(await this.git.clean(Pa.RECURSIVE+Pa.DRY_RUN,n)).paths}async hashObject(r){r=this.getRelativeRepoPath(r);let i=await this.getSubmoduleOfFile(r),n=i?["-C",i.submodule]:[],s=i?i.relativeFilepath:r;return n.push("hash-object","--",s),this.git.raw(n)}async discardAll({dir:r}){return this.discard(r!=null?r:".")}async pull(){return this.withGitOperation(1,async()=>{try{this.plugin.settings.updateSubmodules&&await this.git.subModule(["update","--remote","--merge","--recursive"]);let r=await this.branchInfo();if(!r.current){this.plugin.displayError("No current branch found. Cannot pull.");return}let i=await this.git.revparse([r.current]);if(!r.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();let n=await this.git.revparse([r.tracking]);if(i!==n){if(this.plugin.settings.syncMethod==="merge"||this.plugin.settings.syncMethod==="rebase")try{let o=[r.tracking];switch(this.plugin.settings.mergeStrategy!=="none"&&o.push(`--strategy-option=${this.plugin.settings.mergeStrategy}`),this.plugin.settings.syncMethod){case"merge":await this.git.merge(o);break;case"rebase":await this.git.rebase(o)}}catch(o){this.plugin.displayError(`Pull failed (${this.plugin.settings.syncMethod}): ${dT(o)}`);return}else if(this.plugin.settings.syncMethod==="reset")try{await this.git.raw(["update-ref",`refs/heads/${r.current}`,n]),await this.git.reset([])}catch(o){this.plugin.displayError(`Sync failed (${this.plugin.settings.syncMethod}): ${dT(o)}`)}this.app.workspace.trigger("obsidian-git:head-change");let s=await this.git.revparse([r.current]);return(await this.git.diff([`${i}..${s}`,"--name-only"])).split(/\r\n|\r|\n/).filter(o=>o.length>0).map(o=>({path:o,workingDir:"P",vaultPath:this.getRelativeVaultPath(o)}))}else return[]}catch(r){this.convertErrors(r)}})}async push(){return this.withGitOperation(3,async()=>{try{if(this.plugin.settings.updateSubmodules){let a=await this.git.subModule(["foreach","--recursive",`tracking=$(git for-each-ref --format='%(upstream:short)' "$(git symbolic-ref -q HEAD)"); echo $tracking; if [ ! -z "$(git diff --shortstat $tracking)" ]; then git push; fi`]);console.log(a)}let r=await this.git.status(),i=r.tracking,n=r.current;if(!n){this.plugin.displayError("No current branch found. Cannot push.");return}if(!i&&this.plugin.settings.updateSubmodules){this.plugin.log("No tracking branch found. Ignoring push of main repo and updating submodules only.");return}let s=null;return i&&(s=(await this.git.diffS
Line truncated
|
||||
`):[]}async removeRemote(r){await this.git.removeRemote(r)}async updateUpstreamBranch(r){try{await this.git.branch(["--set-upstream-to",r])}catch(i){try{await this.git.branch(["--set-upstream",r])}catch(n){let[s,a]=yn(r),o=await this.branchInfo();await this.git.push(["--set-upstream",s,`${o.current}:${a}`])}}}updateGitPath(r){return this.setGitInstance()}updateBasePath(r){return this.setGitInstance(!0)}async getDiffString(r,i=!1,n){return i?await this.git.diff(["--cached","--",r]):n?await this.git.show([`${n}`,"--",r]):await this.git.diff(["--",r])}async diff(r,i,n){return await this.git.diff([`${i}..${n}`,"--",r])}async rawCommand(r){let i=r.split(" "),n=i[0];return n===void 0?"":await this.git.raw(n,...i.slice(1))}async getSubmoduleOfFile(r){if(!await this.app.vault.adapter.exists(Le.dirname(r)))return;let i=await this.git.raw(["-C",Le.dirname(r),"rev-parse","--show-toplevel"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message));if(i=i.trim(),(await this.git.raw(["-C",Le.dirname(r),"rev-parse","--show-superproject-working-tree"],l=>l&&console.warn("get-submodule-of-file",l==null?void 0:l.message))).trim()==="")return;let a=this.app.vault.adapter.getFullPath(Le.normalize(r)),o=Le.relative(i,a);return{submodule:i,relativeFilepath:o}}async getLastCommitTime(){try{let r=await this.git.log({n:1});if(r!=null&&r.latest!=null)return new Date(r.latest.date)}catch(r){if(r instanceof Br){if(r.message.contains("does not have any commits yet"))return}else throw r}}async isGitInstalled(){let r=this.plugin.localStorage.getGitPath(),i=await _u(r||"git",["--version"],{});if(i.error)if(Qn.Platform.isWin&&!r){this.plugin.log(`Git not found in PATH. Checking standard installation path(${Md}) of Git for Windows.`);let n=await _u(Md,["--version"]);if(n.error)return console.error(n.error),!1;this.useDefaultWindowsGitPath=!0}else return console.error(i.error),!1;else this.useDefaultWindowsGitPath=!1;return!0}convertErrors(r){if(r instanceof Br){let i=String(r.message);if(i.contains("Could not resolve host")||i.contains("Unable to resolve host")||i.contains("Unable to open connection")||i.match(/ssh: connect to host .*? port .*?: Operation timed out/)!=null||i.match(/ssh: connect to host .*? port .*?: Network is unreachable/)!=null||i.match(/ssh: connect to host .*? port .*?: Undefined error: 0/)!=null)throw new nl(i)}throw r}async isFileTrackedByLFS(r){try{return(await this.git.raw(["check-attr","filter",r])).includes("filter: lfs")}catch(i){let n=i instanceof Error?i.message:String(i);return this.plugin.displayError(`Error checking LFS status: ${n}`),!1}}},pT={hash:"000000",isZeroCommit:!0,summary:""};function a4(t){let r=t.replace(`\r
|
||||
`,`
|
||||
`).split(`
|
||||
`),i={commits:new Map,hashPerLine:[void 0],originalFileLineNrPerLine:[void 0],finalFileLineNrPerLine:[void 0],groupSizePerStartingLine:new Map},n=1;for(let s=0;s<r.length;){let a=r[s];if(uT(a)){let o=a.split(" "),l=o4(o,n,i);for(s++;uT(r[s]);s++){let c=r[s].split(" ");l4(c,i,n)}c4(i.commits.get(l)),n+=1}else if(!(a===""&&s===r.length-1))throw Error(`Expected non-whitespace line or EOF, but found: ${a}`);s++}return i}function o4(t,e,r){let i=t[0],n=t[1],s=t[2];if(i===void 0||n===void 0||s===void 0)throw Error(`Invalid git-blame line info: ${t.join(" ")}`);if(r.hashPerLine.push(i),r.originalFileLineNrPerLine.push(parseInt(n)),r.finalFileLineNrPerLine.push(parseInt(s)),t.length>=4&&r.groupSizePerStartingLine.set(e,parseInt(t[3])),parseInt(s)!==e)throw Error(`git-blame output is out of order: ${e} vs ${s}`);return i}function l4(t,e,r){let i=t[0],n=t.slice(1).join(" "),s=e.hashPerLine[r];if(s===void 0)throw Error(`No commit hash found for git-blame line ${r}`);let a=e.commits.get(s)||{hash:s,author:{},committer:{},previous:{}};switch(i){case"summary":a.summary=n;break;case"author":a.author.name=n;break;case"author-mail":a.author.email=fT(n);break;case"author-time":a.author.epochSeconds=parseInt(n);break;case"author-tz":a.author.tz=n;break;case"committer":a.committer.name=n;break;case"committer-mail":a.committer.email=fT(n);break;case"committer-time":a.committer.epochSeconds=parseInt(n);break;case"committer-tz":a.committer.tz=n;break;case"previous":a.previous.commitHash=n;break;case"filename":a.previous.filename=n;break}e.commits.set(s,a)}function c4(t){if(t.summary===void 0)throw Error(`Summary not provided for commit: ${t.hash}`);iw(t.author)&&(t.author=void 0),iw(t.committer)&&(t.committer=void 0),iw(t.previous)&&(t.previous=void 0),t.isZeroCommit=!!t.hash.match(/^0*$/)}function iw(t){return!t||Object.keys(t).length===0}function uT(t){return t===void 0?!1:t.length>0&&t[0].trim()===t[0]}function fT(t){let e=t.startsWith("<")?t.substring(1):t;return e.endsWith(">")?e.substring(0,e.length-1):e}function dT(t){return t instanceof Error?t.message:String(t)}m();var BT=require("@codemirror/state");m();var nw=class{constructor(){this.eventsPerFilepath=new Map;this.init()}ifFilepathDefinedTransformSubscribers(e,r){if(e)return this.ensureInitialized(e),r(this.eventsPerFilepath.get(e))}forEachSubscriber(e){this.eventsPerFilepath.forEach(r=>r.forEach(e))}ensureInitialized(e){this.eventsPerFilepath.get(e)||this.eventsPerFilepath.set(e,new Set)}init(){this.removeStalesSubscribersTimer===void 0&&this.startRemoveStalesSubscribersInterval()}startRemoveStalesSubscribersInterval(){this.removeStalesSubscribersTimer=window.setInterval(()=>this==null?void 0:this.forEachSubscriber(e=>e==null?void 0:e.removeIfStale()),6e4)}clear(){this.removeStalesSubscribersTimer!==void 0&&(window.clearInterval(this.removeStalesSubscribersTimer),this.removeStalesSubscribersTimer=void 0),this.eventsPerFilepath.clear()}},Si=new nw;m();var uh=require("@codemirror/state");m();function u4(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var mT={exports:{}};(function(t){(function(){var e="input is invalid type",r=typeof window=="object",i=r?window:{};i.JS_SHA256_NO_WINDOW&&(r=!1);var n=!r&&typeof self=="object";n&&(i=self);var s=!i.JS_SHA256_NO_COMMON_JS&&!0&&t.exports,a=!i.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",o="0123456789abcdef".split(""),l=[-2147483648,8388608,32768,128],c=[24,16,8,0],u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],f=["hex","array","digest","arrayBuffer"],d=[];(i.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(x){return Object.prototype.toString.call(x)==="[object Array]"}),a&&(i.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(x){return typeof x=="object"&&x.buffer&&x.buffer.constructor===ArrayBuffer});var h=function(x,S){return function(A){return new b(S,!0).update(A)[x]()}},p=function(x){var S=h("hex",x);S.create=function(){return new b(x)},S.update=function(E){return S.create().update(E)};for(var A=0;A<f.length;++A){var w=f[A];S[w]=h(w,x)}return S},g=function(x,S){return function(A,w){return new _(A,S,!0).update(w)[x]()}},v=function(x){var S=g("hex",x);S.create=function(E){return new _(E,x)},S.update=function(E,y){return S.create(E).update(y)};for(var A=0;A<f.length;++A){var w=f[A];S[w]=g
Line truncated
|
||||
If turned on, do auto ${n} every ${lk(i.settings.autoSaveInterval)} after stopping file edits.
|
||||
This also prevents auto ${n} while editing a file. If turned off, it's independent from the last file edit.`).addToggle(f=>f.setValue(i.settings.autoBackupAfterFileChange).onChange(async d=>{i.settings.autoBackupAfterFileChange=d,this.refreshDisplayWithDelay(),await i.saveSettings(),i.automaticsManager.reload("commit")})),this.mayDisableSetting(a,i.settings.setLastSaveToLastCommit),a=new j.Setting(r).setName(`Auto ${n} after latest commit`).setDesc(`If turned on, sets last auto ${n} timestamp to the latest commit timestamp. This reduces the frequency of auto ${n} when doing manual commits.`).addToggle(f=>f.setValue(i.settings.setLastSaveToLastCommit).onChange(async d=>{i.settings.setLastSaveToLastCommit=d,await i.saveSettings(),i.automaticsManager.reload("commit"),this.refreshDisplayWithDelay()})),this.mayDisableSetting(a,i.settings.autoBackupAfterFileChange),a=new j.Setting(r).setName("Auto push interval (minutes)").setDesc("Push commits every X minutes. Set to 0 (default) to disable.").addText(f=>{f.inputEl.type="number",this.setNonDefaultValue({text:f,settingsProperty:"autoPushInterval"}),f.setPlaceholder(String(pt.autoPushInterval)),f.onChange(async d=>{d!==""?i.settings.autoPushInterval=Number(d):i.settings.autoPushInterval=pt.autoPushInterval,await i.saveSettings(),i.automaticsManager.reload("push")})}),this.mayDisableSetting(a,!i.settings.differentIntervalCommitAndPush),new j.Setting(r).setName("Auto pull interval (minutes)").setDesc("Pull changes every X minutes. Set to 0 (default) to disable.").addText(f=>{f.inputEl.type="number",this.setNonDefaultValue({text:f,settingsProperty:"autoPullInterval"}),f.setPlaceholder(String(pt.autoPullInterval)),f.onChange(async d=>{d!==""?i.settings.autoPullInterval=Number(d):i.settings.autoPullInterval=pt.autoPullInterval,await i.saveSettings(),i.automaticsManager.reload("pull")})}),new j.Setting(r).setName(`Auto ${n} only staged files`).setDesc(`If turned on, only staged files are committed on ${n}. If turned off, all changed files are committed.`).addToggle(f=>f.setValue(i.settings.autoCommitOnlyStaged).onChange(async d=>{i.settings.autoCommitOnlyStaged=d,await i.saveSettings()})),new j.Setting(r).setName(`Specify custom commit message on auto ${n}`).setDesc("You will get a pop up to specify your message.").addToggle(f=>f.setValue(i.settings.customMessageOnAutoBackup).onChange(async d=>{i.settings.customMessageOnAutoBackup=d,await i.saveSettings(),this.refreshDisplayWithDelay()})),a=new j.Setting(r).setName(`Commit message on auto ${n}`).setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message).").addTextArea(f=>{f.setPlaceholder(pt.autoCommitMessage).onChange(async d=>{d===""?i.settings.autoCommitMessage=pt.autoCommitMessage:i.settings.autoCommitMessage=d,await i.saveSettings()}),this.setNonDefaultValue({text:f,settingsProperty:"autoCommitMessage"})}),this.mayDisableSetting(a,i.settings.customMessageOnAutoBackup),new j.Setting(r).setName("Commit message").setHeading();let c=new j.Setting(r).setName("Commit message on manual commit").setDesc("Available placeholders: {{date}} (see below), {{hostname}} (see below), {{numFiles}} (number of changed files in the commit) and {{files}} (changed files in commit message). Leave empty to require manual input on each commit.");c.addTextArea(f=>{c.addButton(d=>{d.setIcon("reset").setTooltip(`Set to default: "${pt.commitMessage}"`).onClick(()=>{f.setValue(pt.commitMessage),f.onChanged()})}),f.setValue(i.settings.commitMessage),f.onChange(async d=>{i.settings.commitMessage=d,await i.saveSettings()})}),j.Platform.isDesktopApp&&new j.Setting(r).setName("Commit message script").setDesc("A script that is run using 'sh -c' to generate the commit message. May be used to generate commit messages using AI tools. Available placeholders: {{hostname}}, {{date}}.").addText(f=>{f.onChange(async d=>{d===""?i.settings.commitMessageScript=pt.commitMessageScript:i.settings.commitMessageScript=d,await i.saveSettings()}),this.setNonDefaultValue({text:f,settingsProperty:"commitMessageScript"})});let u=new j.Setting(r).setName("{{date}} placeholder format").addMomentFormat(f=>f.setDefaultFormat(i.settings.commitDateFormat).setValue(i.settings.commitDateFormat).onChange(async d=>{i.settings.commitDateFormat=d,await i.saveSettings()}));u.descEl.createSpan({text:` Specify custom date format. E.g. "${ev}. See `}),u.descEl.createEl("a",{text:"Moment.js documentation",href:UT,attr:{target:"_blank"}}),u.descEl.createSpan({text:" for more formats."}),new j.Setting(r).setName("{{hostname}} placeholder replacement").setDesc("Specify custom hostname for every device. Defaults to the OS hostname if not set on desktop.").addText(f=>{var d;return f.setValue((d=i.localStorage.getHostname())!=null?d:"").onChange(h=>{i.localStorage.setHostname(h)})}),new j.Setting(r).setName("Preview commit message").addButton(f=>f.se
Line truncated
|
||||
`)),c.onChange(u=>{i.localStorage.setEnvVars(u.split(`
|
||||
`))})}),i.gitManager instanceof Se&&new j.Setting(r).setName("Additional PATH environment variable paths").setDesc("Use each line for one path").addTextArea(c=>{c.setValue(i.localStorage.getPATHPaths().join(`
|
||||
`)),c.onChange(u=>{i.localStorage.setPATHPaths(u.split(`
|
||||
`))})}),i.gitManager instanceof Se&&new j.Setting(r).setName("Reload with new environment variables").setDesc("Removing previously added environment variables will not take effect until Obsidian is restarted.").addButton(c=>{c.setButtonText("Reload"),c.setCta(),c.onClick(async()=>{await i.gitManager.setGitInstance()})}),new j.Setting(r).setName("Custom base path (Git repository path)").setDesc(`
|
||||
Sets the relative path to the vault from which the Git binary should be executed.
|
||||
Mostly used to set the path to the Git repository, which is only required if the Git repository is below the vault root directory. Use "\\" instead of "/" on Windows.
|
||||
`).addText(c=>{c.setValue(i.settings.basePath),c.setPlaceholder("directory/directory-with-git-repo"),c.onChange(async u=>{i.settings.basePath=u,await i.saveSettings(),i.gitManager.updateBasePath(u||"").catch(f=>i.displayError(f))})}),new j.Setting(r).setName("Custom Git directory path (Instead of '.git')").setDesc('Corresponds to the GIT_DIR environment variable. Relative paths are resolved from the custom base path, or the vault root when no base path is configured. Requires restart of Obsidian to take effect. Use "\\" instead of "/" on Windows.').addText(c=>{c.setValue(i.settings.gitDir),c.setPlaceholder(".git"),c.onChange(async u=>{i.settings.gitDir=u,await i.saveSettings()})}),new j.Setting(r).setName("Disable on this device").setDesc("Disables the plugin on this device. This setting is not synced.").addToggle(c=>c.setValue(i.localStorage.getPluginDisabled()).onChange(u=>{i.localStorage.setPluginDisabled(u),u?i.unloadPlugin():i.init({fromReload:!0}).catch(f=>i.displayError(f)),new j.Notice("Obsidian must be restarted for the changes to take affect.")})),new j.Setting(r).setName("Support").setHeading(),new j.Setting(r).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(c=>{var f;let u=(f=c.buttonEl.parentElement)==null?void 0:f.createEl("a",{href:"https://ko-fi.com/F1F195IQ5",attr:{target:"_blank"}});u&&(u.createEl("img",{attr:{height:"36",style:"border:0px;height:36px;",src:"https://cdn.ko-fi.com/cdn/kofi3.png?v=3",border:"0",alt:"Buy Me a Coffee at ko-fi.com"}}),c.buttonEl.remove())});let o=r.createDiv();o.setAttr("align","center"),o.setAttr("style","margin: var(--size-4-2)");let l=o.createEl("button");if(l.setText("Copy Debug Information"),l.onclick=async()=>{await window.navigator.clipboard.writeText(JSON.stringify({settings:this.plugin.settings,pluginVersion:this.plugin.manifest.version},null,4)),new j.Notice("Debug information copied to clipboard. May contain sensitive information!")},j.Platform.isDesktopApp){let c=r.createDiv();c.setAttr("align","center"),c.setText(`Debugging and logging:
|
||||
You can always see the logs of this and every other plugin by opening the console with`);let u=r.createDiv();u.setAttr("align","center"),u.addClass("obsidian-git-shortcuts"),j.Platform.isMacOS===!0?u.createEl("kbd",{text:"CMD (\u2318) + OPTION (\u2325) + I"}):u.createEl("kbd",{text:"CTRL + SHIFT + I"})}}mayDisableSetting(r,i){i&&(r.setDisabled(i),r.setClass("obsidian-git-disabled"))}configureLineAuthorShowStatus(r){this.settings.lineAuthor.show=r,this.plugin.saveSettings(),r?this.plugin.editorIntegration.activateLineAuthoring():this.plugin.editorIntegration.deactiveLineAuthoring()}async lineAuthorSettingHandler(r,i){this.settings.lineAuthor[r]=i,await this.plugin.saveSettings(),this.plugin.editorIntegration.lineAuthoringFeature.refreshLineAuthorViews()}beforeSaveSettings(){let r=this.settings.lineAuthor;r.authorDisplay!=="hide"&&(r.lastShownAuthorDisplay=r.authorDisplay),r.dateTimeFormatOptions!=="hide"&&(r.lastShownDateTimeFormatOptions=r.dateTimeFormatOptions)}addLineAuthorInfoSettings(){let r=new j.Setting(this.containerEl).setName("Show commit authoring information next to each line");if(this.plugin.editorIntegration.lineAuthoringFeature.isAvailableOnCurrentPlatform()||r.setDesc("Only available on desktop currently.").setDisabled(!0),r.descEl.createEl("a",{href:T4,text:"Feature guide and quick examples",attr:{target:"_blank"}}),r.descEl.createEl("br"),r.descEl.createSpan({text:" The commit hash, author name and authoring date can all be individually toggled."}),r.descEl.createEl("br"),r.descEl.createSpan({text:"Hide everything, to only show the age-colored sidebar."}),r.addToggle(i=>i.setValue(this.settings.lineAuthor.show).onChange(n=>{this.configureLineAuthorShowStatus(n),this.refreshDisplayWithDelay()})),this.settings.lineAuthor.show){let i=new j.Setting(this.containerEl).setName("Follow movement and copies across files and commits").addDropdown(l=>{l.addOptions({inactive:"Do not follow (default)","same-commit":"Follow within same commit","all-commits":"Follow within all commits (maybe slow)"}),l.setValue(this.settings.lineAuthor.followMovement),l.onChange(c=>this.lineAuthorSettingHandler("followMovement",c))});if(i.descEl.createSpan({text:"By default (deactivated), each line only shows the newest commit where it was changed."}),i.descEl.createEl("br"),i.descEl.createSpan({text:"With "}),i.descEl.createEl("i",{text:"same commit"}),i.descEl.createSpan({text:", cut-copy-paste-ing of text is followed within the same commit and the original commit of authoring will be shown."}),i.descEl.createEl("br"),i.descEl.createSpan({text:"With "}),i.descEl.createEl("i",{text:"all commits"}),i.descEl.createSpan({text:", cut-copy-paste-ing text inbetween multiple commits will be detected."}),i.descEl.createEl("br"),i.descEl.createSpan({text:"It uses "}),i.descEl.createEl("a",{href:"https://git-scm.com/docs/git-blame",text:"git-blame",attr:{target:"_blank"}}),i.descEl.createSpan({text:` and for matches (at least ${Id} characters) within the same (or all) commit(s), `}),i.descEl.createEl("em",{text:"the originating"}),i.descEl.createSpan({text:" commit's information is shown."}),new j.Setting(this.containerEl).setName("Show commit hash").addToggle(l=>{l.setValue(this.settings.lineAuthor.showCommitHash),l.onChange(c=>this.lineAuthorSettingHandler("showCommitHash",c))}),new j.Setting(this.containerEl).setName("Author name display").setDesc("If and how the author is displayed").addDropdown(l=>{let c={hide:"Hide",initials:"Initials (default)","first name":"First name","last name":"Last name",full:"Full name"};l.addOptions(c),l.setValue(this.settings.lineAuthor.authorDisplay),l.onChange(async u=>this.lineAuthorSettingHandler("authorDisplay",u))}),new j.Setting(this.containerEl).setName("Authoring date display").setDesc("If and how the date and time of authoring the line is displayed").addDropdown(l=>{let c={hide:"Hide",date:"Date (default)",datetime:"Date and time","natural language":"Natural language",custom:"Custom"};l.addOptions(c),l.setValue(this.settings.lineAuthor.dateTimeFormatOptions),l.onChange(async u=>{await this.lineAuthorSettingHandler("dateTimeFormatOptions",u),this.refreshDisplayWithDelay()})}),this.settings.lineAuthor.dateTimeFormatOptions==="custom"){let l=new j.Setting(this.containerEl);l.setName("Custom authoring date format").addText(c=>{c.setValue(this.settings.lineAuthor.dateTimeFormatCustomString),c.setPlaceholder("YYYY-MM-DD HH:mm"),c.onChange(async u=>{await this.lineAuthorSettingHandler("dateTimeFormatCustomString",u),this.setCustomDateTimeDescription(l.descEl,u)})}),this.setCustomDateTimeDescription(l.descEl,this.settings.lineAuthor.dateTimeFormatCustomString)}let n=new j.Setting(this.containerEl).setName("Authoring date display timezone").addDropdown(l=>{let c={"viewer-local":"My local (default)","author-local":"Author's local",utc0000:"UTC+0000/Z"};l.addOptions(c),l.setValue(this.settings.lineAuthor.dateTimeTimezone),l.onChange(async u=>this.lineAuthorSettingHandler("dateTimeTimezone",u))});n.d
Line truncated
|
||||
Either your local time-zone (default),
|
||||
the author's time-zone during commit creation or
|
||||
`}),n.descEl.createEl("a",{text:"UTC\xB100:00",href:"https://en.wikipedia.org/wiki/UTC%C2%B100:00"}),n.descEl.createSpan({text:"."});let s=new j.Setting(this.containerEl).setName("Oldest age in coloring");this.setOldestAgeDescription(s.descEl,this.settings.lineAuthor.coloringMaxAge),s.addText(l=>{l.setPlaceholder("1y"),l.setValue(this.settings.lineAuthor.coloringMaxAge),l.onChange(async c=>{let f=Iu(c)!==void 0;this.setOldestAgeDescription(s.descEl,c),f&&(await this.lineAuthorSettingHandler("coloringMaxAge",c),this.refreshColorSettingsName("oldest"))})}),this.createColorSetting("newest"),this.createColorSetting("oldest");let a=new j.Setting(this.containerEl).setName("Text color").addText(l=>{l.setValue(this.settings.lineAuthor.textColorCss),l.onChange(async c=>{await this.lineAuthorSettingHandler("textColorCss",c)})});a.descEl.empty(),a.descEl.createSpan({text:"The CSS color of the gutter text."}),a.descEl.createEl("br"),a.descEl.createEl("br"),a.descEl.createSpan({text:"It is highly recommended to use "}),a.descEl.createEl("a",{text:"CSS variables",href:"https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties"}),a.descEl.createSpan({text:" defined by themes (e.g. "}),a.descEl.createEl("pre",{text:"var(--text-muted)",attr:{style:"display:inline"}}),a.descEl.createSpan({text:" or "}),a.descEl.createEl("pre",{text:"var(--text-on-accent)",attr:{style:"display:inline"}}),a.descEl.createSpan({text:"), because they automatically adapt to theme changes."}),a.descEl.createEl("br"),a.descEl.createEl("br"),a.descEl.createSpan({text:"See: "}),a.descEl.createEl("a",{text:"List of available CSS variables in Obsidian",href:"https://github.com/obsidian-community/obsidian-theme-template/blob/main/obsidian.css"});let o=new j.Setting(this.containerEl).setName("Ignore whitespace and newlines in changes").addToggle(l=>{l.setValue(this.settings.lineAuthor.ignoreWhitespace),l.onChange(c=>this.lineAuthorSettingHandler("ignoreWhitespace",c))});o.descEl.empty(),o.descEl.createSpan({text:"Whitespace and newlines are interpreted as part of the document and in changes by default (hence not ignored). This makes the last line being shown as 'changed' when a new subsequent line is added, even if the previously last line's text is the same."}),o.descEl.createEl("br"),o.descEl.createSpan({text:"If you don't care about purely-whitespace changes (e.g. list nesting / quote indentation changes), then activating this will provide more meaningful change detection."})}}createColorSetting(r){let i=new j.Setting(this.containerEl).setName("").addText(n=>{let s=hw(r,this.settings.lineAuthor),a=hw(r,pt.lineAuthor);n.setPlaceholder(lv(a)),n.setValue(lv(s)),n.onChange(async o=>{let l=ik(o);if(l!==void 0){let c=r==="newest"?"colorNew":"colorOld";await this.lineAuthorSettingHandler(c,l)}this.refreshColorSettingsDesc(r,l)})});this.lineAuthorColorSettings.set(r,i),this.refreshColorSettingsName(r),this.refreshColorSettingsDesc(r,hw(r,this.settings.lineAuthor))}refreshColorSettingsName(r){let i=this.lineAuthorColorSettings.get(r);if(i){let n=r==="oldest"?`oldest (${this.settings.lineAuthor.coloringMaxAge} or older)`:"newest";i.nameEl.setText(`Color for ${n} commits`)}}refreshColorSettingsDesc(r,i){let n=this.lineAuthorColorSettings.get(r);n&&this.colorSettingPreviewDesc(n.descEl,r,this.settings.lineAuthor,i!==void 0)}colorSettingPreviewDesc(r,i,n,s){r.empty(),r.createSpan({text:"Supports 'rgb(r,g,b)', 'hsl(h,s,l)', hex (#) and named colors (e.g. 'black', 'purple'). Color preview: "});let a=s?bh(i,n):"rgba(127,127,127,0.3)",o=j.moment.unix(j.moment.now()/1e3).format("YYYY-MM-DD"),l=s?`abcdef Author Name ${o}`:"invalid color";r.createEl("div",{text:l,attr:{class:"line-author-settings-preview",style:`background-color: ${a}; width: 30ch;`}})}setCustomDateTimeDescription(r,i){r.empty(),r.createEl("a",{text:"Format string",href:UT}),r.createSpan({text:" to display the authoring date."}),r.createEl("br");let n=(0,j.moment)().format(i);r.createSpan({text:`Currently: ${n}`})}setOldestAgeDescription(r,i){let n=Iu(i),s=n!==void 0?`${n.asDays()} days`:"invalid!";r.empty(),r.createSpan({text:`The oldest age in the line author coloring. Everything older will have the same color.
|
||||
Smallest valid age is "1d". Currently: ${s}`})}setNonDefaultValue({settingsProperty:r,text:i}){let n=this.plugin.settings[r];pt[r]!==n&&(typeof n=="string"||typeof n=="number"||typeof n=="boolean"?i.setValue(String(n)):i.setValue(JSON.stringify(n)))}refreshDisplayWithDelay(r=80){window.setTimeout(()=>this.display(),r)}};function hw(t,e){return t==="oldest"?e.colorOld:e.colorNew}function Iu(t){let e=j.moment.duration("P"+t.toUpperCase());return e.isValid()&&e.asDays()&&e.asDays()>=1?e:void 0}m();var Ur=require("obsidian");var xh=class{constructor(e,r){this.statusBarEl=e;this.plugin=r;this.messages=[];this.currentMessage=null;this.lastMessageTimestamp=null;this.base="obsidian-git-statusbar-";this.statusBarEl.setAttribute("data-tooltip-position","top"),r.registerEvent(r.app.workspace.on("obsidian-git:refreshed",()=>{this.refreshCommitTimestamp().catch(console.error)}))}displayMessage(e,r){this.messages.push({message:`Git: ${e.slice(0,100)}`,timeout:r}),this.display()}displayProgress(e){this.progress=e,this.display()}clearProgress(e=!0){this.progress=void 0,e&&this.display()}display(){this.progress?this.displayState():this.messages.length>0&&!this.currentMessage?(this.currentMessage=this.messages.shift(),this.statusBarEl.addClass(this.base+"message"),this.statusBarEl.ariaLabel="",this.statusBarEl.setText(this.currentMessage.message),this.lastMessageTimestamp=Date.now()):this.currentMessage?Date.now()-this.lastMessageTimestamp>=this.currentMessage.timeout&&(this.currentMessage=null,this.lastMessageTimestamp=null):this.displayState()}displayState(){if((this.statusBarEl.getText().length>3||!this.statusBarEl.hasChildNodes())&&(this.statusBarEl.empty(),this.conflictEl=this.statusBarEl.createDiv(),this.conflictEl.setAttribute("data-tooltip-position","top"),this.conflictEl.style.float="left",this.pausedEl=this.statusBarEl.createDiv(),this.pausedEl.setAttribute("data-tooltip-position","top"),this.pausedEl.style.float="left",this.iconEl=this.statusBarEl.createDiv(),this.iconEl.style.float="left",this.textEl=this.statusBarEl.createDiv(),this.textEl.style.float="right",this.textEl.style.marginLeft="5px"),this.plugin.localStorage.getConflict()?((0,Ur.setIcon)(this.conflictEl,"alert-circle"),this.conflictEl.ariaLabel="You have merge conflicts. Resolve them and commit afterwards.",this.conflictEl.style.marginRight="5px",this.conflictEl.addClass(this.base+"conflict")):(this.conflictEl.empty(),this.conflictEl.style.marginRight=""),this.plugin.localStorage.getPausedAutomatics()?((0,Ur.setIcon)(this.pausedEl,"pause-circle"),this.pausedEl.ariaLabel="Automatic routines are currently paused.",this.pausedEl.style.marginRight="5px",this.pausedEl.addClass(this.base+"paused")):(this.pausedEl.empty(),this.pausedEl.style.marginRight=""),this.progress){this.statusBarEl.ariaLabel=this.getProgressTooltip("Git operation in progress..."),(0,Ur.setIcon)(this.iconEl,this.getProgressIcon()),this.displayProgressText(),this.statusBarEl.addClass(this.base+"progress");return}switch(this.plugin.state.operation){case 0:this.displayFromNow();break;case 2:this.statusBarEl.ariaLabel="Committing changes...",(0,Ur.setIcon)(this.iconEl,"git-commit"),this.textEl.empty(),this.statusBarEl.addClass(this.base+"commit");break;case 3:this.statusBarEl.ariaLabel=this.getProgressTooltip("Pushing changes..."),(0,Ur.setIcon)(this.iconEl,"upload"),this.displayProgressText(),this.statusBarEl.addClass(this.base+"push");break;case 1:this.statusBarEl.ariaLabel=this.getProgressTooltip("Pulling changes..."),(0,Ur.setIcon)(this.iconEl,"download"),this.displayProgressText(),this.statusBarEl.addClass(this.base+"pull");break;case 4:this.statusBarEl.ariaLabel=this.getProgressTooltip("Fetching from remote..."),(0,Ur.setIcon)(this.iconEl,"download"),this.displayProgressText(),this.statusBarEl.addClass(this.base+"fetch");break;case 5:this.statusBarEl.ariaLabel=this.getProgressTooltip("Checking out branch..."),(0,Ur.setIcon)(this.iconEl,"git-branch"),this.displayProgressText(),this.statusBarEl.addClass(this.base+"checkout");break;default:this.statusBarEl.ariaLabel="Failed on initialization!",(0,Ur.setIcon)(this.iconEl,"alert-triangle"),this.textEl.empty(),this.statusBarEl.addClass(this.base+"failed-init");break}}displayProgressText(){this.progress?this.textEl.setText(this.getCompactProgressText()):this.textEl.empty()}getProgressTooltip(e){if(!this.progress)return e;let r=this.progress.stage?`${this.progress.stage}: `:"";if(this.progress.progress===void 0)return this.progress.stage?`${this.progress.action}: ${this.progress.stage}...`:`${this.progress.action}...`;let i=this.progress.processed!==void 0&&this.progress.total!==void 0?` (${this.progress.processed}/${this.progress.total})`:"";return`${this.progress.action}: ${r}${Math.round(this.progress.progress)}%${i}`}getCompactProgressText(){return this.progress?this.progress.progress===void 0?`${this.progress.action}...`:`${this.progress.action} ${Math.round(this.progress.progress)}%`:""}getProgressIcon(){var e;switch((e=this.progress)
Line truncated
|
||||
(${this.unPushedCommits} unpushed commits)`)}else this.statusBarEl.ariaLabel=r?"Git is offline":"Git is ready";r?(0,Ur.setIcon)(this.iconEl,"globe"):(0,Ur.setIcon)(this.iconEl,"check"),this.plugin.settings.changedFilesInStatusBar&&this.plugin.cachedStatus?this.textEl.setText(this.plugin.cachedStatus.changed.length.toString()):this.textEl.empty(),this.statusBarEl.addClass(this.base+"idle")}async refreshCommitTimestamp(){this.lastCommitTimestamp=await this.plugin.gitManager.getLastCommitTime(),this.unPushedCommits=await this.plugin.gitManager.getUnpushedCommits()}remove(){this.statusBarEl.remove()}};m();var Sh=require("obsidian"),Eh=class extends Sh.SuggestModal{constructor(r){super(r.app);this.plugin=r;this.resolve=null;this.setPlaceholder("Type your message and select optional the version with the added date.")}openAndGetResult(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>window.setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}getSuggestions(r){let i=(0,Sh.moment)().format(this.plugin.settings.commitDateFormat);return r==""&&(r="..."),[r,`${i}: ${r}`,`${r}: ${i}`]}renderSuggestion(r,i){i.innerText=r}onChooseSuggestion(r,i){this.resolve&&this.resolve(r)}};m();var GT=require("obsidian"),Mu=class{constructor(e){this.plugin=e}saveLastAuto(e,r){r==="backup"?this.plugin.localStorage.setLastAutoBackup(e.toString()):r==="pull"?this.plugin.localStorage.setLastAutoPull(e.toString()):r==="push"&&this.plugin.localStorage.setLastAutoPush(e.toString())}loadLastAuto(){var e,r,i;return{backup:new Date((e=this.plugin.localStorage.getLastAutoBackup())!=null?e:""),pull:new Date((r=this.plugin.localStorage.getLastAutoPull())!=null?r:""),push:new Date((i=this.plugin.localStorage.getLastAutoPush())!=null?i:"")}}async init(){await this.setUpAutoCommitAndSync();let e=this.loadLastAuto();if(this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0){let r=this.diff(this.plugin.settings.autoPushInterval,e.push);this.startAutoPush(r)}if(this.plugin.settings.autoPullInterval>0){let r=this.diff(this.plugin.settings.autoPullInterval,e.pull);this.startAutoPull(r)}}unload(){this.clearAutoPull(),this.clearAutoPush(),this.clearAutoCommitAndSync()}reload(...e){this.plugin.localStorage.getPausedAutomatics()||(e.contains("commit")&&(this.clearAutoCommitAndSync(),this.plugin.settings.autoSaveInterval>0&&this.startAutoCommitAndSync(this.plugin.settings.autoSaveInterval)),e.contains("push")&&(this.clearAutoPush(),this.plugin.settings.differentIntervalCommitAndPush&&this.plugin.settings.autoPushInterval>0&&this.startAutoPush(this.plugin.settings.autoPushInterval)),e.contains("pull")&&(this.clearAutoPull(),this.plugin.settings.autoPullInterval>0&&this.startAutoPull(this.plugin.settings.autoPullInterval)))}async setUpAutoCommitAndSync(){if(this.plugin.settings.setLastSaveToLastCommit){this.clearAutoCommitAndSync();let e=await this.plugin.gitManager.getLastCommitTime();e&&this.saveLastAuto(e,"backup")}if(!this.timeoutIDCommitAndSync&&!this.plugin.autoCommitDebouncer){let e=this.loadLastAuto();if(this.plugin.settings.autoSaveInterval>0){let r=this.diff(this.plugin.settings.autoSaveInterval,e.backup);this.startAutoCommitAndSync(r)}}}get isAutomaticsDisabled(){return!this.plugin.gitReady||this.plugin.localStorage.getPausedAutomatics()}startAutoCommitAndSync(e){if(this.isAutomaticsDisabled)return;let r=(e!=null?e:this.plugin.settings.autoSaveInterval)*6e4;this.plugin.settings.autoBackupAfterFileChange?e===0?this.doAutoCommitAndSync():this.plugin.autoCommitDebouncer=(0,GT.debounce)(()=>this.doAutoCommitAndSync(),r,!0):(r>2147483647&&(r=2147483647),this.timeoutIDCommitAndSync=window.setTimeout(()=>this.doAutoCommitAndSync(),r))}doAutoCommitAndSync(){this.plugin.promiseQueue.addTask(async()=>{if(this.plugin.settings.setLastSaveToLastCommit){let r=await this.plugin.gitManager.getLastCommitTime();if(r){this.saveLastAuto(r,"backup");let i=this.diff(this.plugin.settings.autoSaveInterval,r);if(i>0)return this.startAutoCommitAndSync(i),!1}}let e=this.plugin.settings.autoCommitOnlyStaged;return this.plugin.settings.differentIntervalCommitAndPush?await this.plugin.commit({fromAuto:!0,onlyStaged:e}):await this.plugin.commitAndSync({fromAutoBackup:!0,onlyStaged:e}),!0},e=>{e!==!1&&(this.saveLastAuto(new Date,"backup"),this.startAutoCommitAndSync())})}startAutoPull(e){if(this.isAutomaticsDisabled)return;let r=(e!=null?e:this.plugin.settings.autoPullInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPull=window.setTimeout(()=>this.doAutoPull(),r)}doAutoPull(){this.plugin.promiseQueue.addTask(()=>this.plugin.pullChangesFromRemote(),()=>{this.saveLastAuto(new Date,"pull"),this.startAutoPull()})}startAutoPush(e){if(this.isAutomaticsDisabled)return;let r=(e!=null?e:this.plugin.settings.autoPushInterval)*6e4;r>2147483647&&(r=2147483647),this.timeoutIDPush=window.setTimeout(()=>this.doAutoPush(),r)}doAutoPush(){this.plugin.promiseQueue.addTask(()=>this.plugin.push(),()=>{this.saveLastA
Line truncated
|
||||
`)}static newName(){let e=ZT[YT]||1;return ZT[YT]=e+1,"\u037C"+e.toString(36)}static mount(e,r,i){let n=e[pw],s=i&&i.nonce;n?s&&n.setNonce(s):n=new mw(e,s),n.mount(Array.isArray(r)?r:[r],e)}},KT=new Map,mw=class{constructor(e,r){let i=e.ownerDocument||e,n=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let s=KT.get(i);if(s)return e[pw]=s;this.sheet=new n.CSSStyleSheet,KT.set(i,this)}else this.styleTag=i.createElement("style"),r&&this.styleTag.setAttribute("nonce",r);this.modules=[],e[pw]=this}mount(e,r){let i=this.sheet,n=0,s=0;for(let a=0;a<e.length;a++){let o=e[a],l=this.modules.indexOf(o);if(l<s&&l>-1&&(this.modules.splice(l,1),s--,l=-1),l==-1){if(this.modules.splice(s++,0,o),i)for(let c=0;c<o.rules.length;c++)i.insertRule(o.rules[c],n++)}else{for(;s<l;)n+=this.modules[s++].rules.length;n+=o.rules.length,s++}}if(i)r.adoptedStyleSheets.indexOf(this.sheet)<0&&(r.adoptedStyleSheets=[this.sheet,...r.adoptedStyleSheets]);else{let a="";for(let l=0;l<this.modules.length;l++)a+=this.modules[l].getRules()+`
|
||||
`;this.styleTag.textContent=a;let o=r.head||r;this.styleTag.parentNode!=o&&o.insertBefore(this.styleTag,o.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}};var p2=require("@codemirror/language"),P4=require("@lezer/highlight"),kt=class t{constructor(e,r,i,n){this.fromA=e,this.toA=r,this.fromB=i,this.toB=n}offset(e,r=e){return new t(this.fromA+e,this.toA+e,this.fromB+r,this.toB+r)}};function Ma(t,e,r,i,n,s){if(t==i)return[];let a=Ew(t,e,r,i,n,s),o=Sw(t,e+a,r,i,n+a,s);e+=a,r-=o,n+=a,s-=o;let l=r-e,c=s-n;if(!l||!c)return[new kt(e,r,n,s)];if(l>c){let f=t.slice(e,r).indexOf(i.slice(n,s));if(f>-1)return[new kt(e,e+f,n,n),new kt(e+f+c,r,s,s)]}else if(c>l){let f=i.slice(n,s).indexOf(t.slice(e,r));if(f>-1)return[new kt(e,e,n,n+f),new kt(r,r,n+f+l,s)]}if(l==1||c==1)return[new kt(e,r,n,s)];let u=g2(t,e,r,i,n,s);if(u){let[f,d,h]=u;return Ma(t,e,f,i,n,d).concat(Ma(t,f+h,r,i,d+h,s))}return R4(t,e,r,i,n,s)}var Ou=1e9,Lu=0,xw=!1;function R4(t,e,r,i,n,s){let a=r-e,o=s-n;if(Ou<1e9&&Math.min(a,o)>Ou*16||Lu>0&&Date.now()>Lu)return Math.min(a,o)>Ou*64?[new kt(e,r,n,s)]:XT(t,e,r,i,n,s);let l=Math.ceil((a+o)/2);gw.reset(l),vw.reset(l);let c=(h,p)=>t.charCodeAt(e+h)==i.charCodeAt(n+p),u=(h,p)=>t.charCodeAt(r-h-1)==i.charCodeAt(s-p-1),f=(a-o)%2!=0?vw:null,d=f?null:gw;for(let h=0;h<l;h++){if(h>Ou||Lu>0&&!(h&63)&&Date.now()>Lu)return XT(t,e,r,i,n,s);let p=gw.advance(h,a,o,l,f,!1,c)||vw.advance(h,a,o,l,d,!0,u);if(p)return $4(t,e,r,e+p[0],i,n,s,n+p[1])}return[new kt(e,r,n,s)]}var Fh=class{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let r=0;r<this.len;r++)this.vec[r]=-1;this.vec[e+1]=0,this.start=this.end=0}advance(e,r,i,n,s,a,o){for(let l=-e+this.start;l<=e-this.end;l+=2){let c=n+l,u=l==-e||l!=e&&this.vec[c-1]<this.vec[c+1]?this.vec[c+1]:this.vec[c-1]+1,f=u-l;for(;u<r&&f<i&&o(u,f);)u++,f++;if(this.vec[c]=u,u>r)this.end+=2;else if(f>i)this.start+=2;else if(s){let d=n+(r-i)-l;if(d>=0&&d<this.len&&s.vec[d]!=-1)if(a){let h=s.vec[d];if(h>=r-u)return[h,n+h-d]}else{let h=r-s.vec[d];if(u>=h)return[u,f]}}}return null}},gw=new Fh,vw=new Fh;function $4(t,e,r,i,n,s,a,o){let l=!1;return!Tl(t,i)&&++i==r&&(l=!0),!Tl(n,o)&&++o==a&&(l=!0),l?[new kt(e,r,s,a)]:Ma(t,e,i,n,s,o).concat(Ma(t,i,r,n,o,a))}function m2(t,e){let r=1,i=Math.min(t,e);for(;r<i;)r=r<<1;return r}function Ew(t,e,r,i,n,s){if(e==r||e==s||t.charCodeAt(e)!=i.charCodeAt(n))return 0;let a=m2(r-e,s-n);for(let o=e,l=n;;){let c=o+a,u=l+a;if(c>r||u>s||t.slice(o,c)!=i.slice(l,u)){if(a==1)return o-e-(Tl(t,o)?0:1);a=a>>1}else{if(c==r||u==s)return c-e;o=c,l=u}}}function Sw(t,e,r,i,n,s){if(e==r||n==s||t.charCodeAt(r-1)!=i.charCodeAt(s-1))return 0;let a=m2(r-e,s-n);for(let o=r,l=s;;){let c=o-a,u=l-a;if(c<e||u<n||t.slice(c,o)!=i.slice(u,l)){if(a==1)return r-o-(Tl(t,o)?0:1);a=a>>1}else{if(c==e||u==n)return r-c;o=c,l=u}}}function ww(t,e,r,i,n,s,a,o){let l=i.slice(n,s),c=null;for(;;){if(c||a<o)return c;for(let u=e+a;;){Tl(t,u)||u++;let f=u+a;if(Tl(t,f)||(f+=f==u+1?1:-1),f>=r)break;let d=t.slice(u,f),h=-1;for(;(h=l.indexOf(d,h+1))!=-1;){let p=Ew(t,f,r,i,n+h+d.length,s),g=Sw(t,e,u,i,n,n+h),v=d.length+p+g;(!c||c[2]<v)&&(c=[u-g,n+h-g,v])}u=f}if(o<0)return c;a=a>>1}}function g2(t,e,r,i,n,s){let a=r-e,o=s-n;if(a<o){let l=g2(i,n,s,t,e,r);return l&&[l[1],l[0],l[2]]}return a<4||o*2<a?null:ww(t,e,r,i,n,s,Math.floor(a/4),-1)}function XT(t,e,r,i,n,s){xw=!0;let a=r-e,o=s-n,l;if(a<o){let d=ww(i,n,s,t,e,r,Math.floor(a/6),50);l=d&&[d[1],d[0],d[2]]}else l=ww(t,e,r,i,n,s,Math.floor(o/6),50);if(!l)return[new kt(e,r,n,s)];let[c,u,f]=l;return Ma(t,e,c,i,n,u).concat(Ma(t,c+f,r,i,u+f,s))}function v2(t,e){for(let r=1;r<t.length;r++){let i=t[r-1],n=t[r];i.toA>n.fromA-e&&i.toB>n.fromB-e&&(t[r-1]=new kt(i.fromA,n.toA,i.fromB,n.toB),t.splice(r--,1))}}function F4(t,e,r){for(;;){v2(r,1);let i=!1;for(let n=0;n<r.length;n++){let s=r[n],a,o;(a=Ew(t,s.fromA,s.toA,e,s.fromB,s.toB))&&(s=r[n]=new kt(s.fromA+a,s.toA,s.fromB+a,s.toB)),(o=Sw(t,s.fromA,s.toA,e,s.fromB,s.toB))&&(s=r[n]=new kt(s.fromA,s.toA-o,s.fromB,s.toB-o));let l=s.toA-s.fromA,c=s.toB-s.fromB;if(l&&c)continue;let u=s.fromA-(n?r[n-1].toA:0),f=(n<r.length-1?r[n+1].fromA:t.length)-s.toA;if(!u||!f)continue;let d=l?t.slice(s.fromA,s.toA):e.slice(s.fromB,s.toB);u<=d.length&&t.slice(s.fromA-u,s.fromA)==d.slice(d.length-u)?(r[n]=new kt(s.fromA-u,s.toA-u,s.fromB-u,s.toB-u),i=!0):f<=d.length&&t.slice(s.toA,s.toA+f)==d.slice(0,f)&&(r[n]=new kt(s.fromA+f,s.toA+f,s.fromB+f,s.toB+f),i=!0)}if(!i)break}return r}function I4(t,e,r){for(let i=0,n=0;n<t.length;n++){let s=t[n],a=s.toA-s.fromA,o=s.toB-s.fromB;if(a&&o||a>3||o>3){let l=n==t.length-1?e.length:t[n+1].fromA,c=s.fromA-i,u=l-s.toA,f=JT(e,s.fromA,c),d=QT(e,s.toA,u),h=s.fromA-f,p=d-s.toA;if((!a||!o)&&h&&p){let g=Math.max(a,o),[v,b,_]=a?[e,s.fromA,s.toA]:[r,s.fromB,s.toB];g>h&&e.slice(f,s.fromA)==v.slice(_-h,_)?(s=t[n]=new kt(f,f+a,s.fromB-h,s.toB-h),f=s.fromA,d=QT(e,s.toA,l-s.toA)):g>p&&e.slice(s.toA,d)==v.slice(b,b+p)&&(s=t[n]=new kt(d-a,d,s.fromB+p,s.toB+p),d=s.
Line truncated
|
||||
`),s=e.split(`
|
||||
`);for(let a of r){let{oldStart:o,oldLines:l,newStart:c,newLines:u}=a,f=zt.createHunk(o,l,c,u);if(a.oldLines>0){for(let d=o;d<o+l;d++)f.removed.lines.push(n[d-1]);o+l>n.length&&n.last()!=""&&(f.removed.no_nl_at_eof=!0)}if(a.newLines>0){for(let d=c;d<c+u;d++)f.added.lines.push(s[d-1]);c+u>s.length&&s.last()!=""&&(f.added.no_nl_at_eof=!0)}i.push(f)}return i}function Tw(t,e,r){let i=e.lineAt(t.fromA).number,n=t.fromA==t.toA?0:Dh(e,t.endA)-i+1,s=r.lineAt(t.fromB).number,a=t.fromB==t.toB?0:Dh(r,t.endB)-s+1,o={oldStart:i,oldLines:n,newStart:s,newLines:a};return o.oldLines==0&&(o.oldStart-=1),o.newLines==0&&(o.newStart-=1),o}var T2={scanLimit:1e3,timeout:200};function Z4(t,e,r,i){let n=Cw.Text.of(t.split(`
|
||||
`)),s=Cw.Text.of(e.split(`
|
||||
`)),a=r&&i?Jn.updateB(r,n,s,i,T2):Jn.build(n,s,T2),o=[];for(let l=0;l<a.length;l++){let c=a[l],u=Tw(c,n,s);o.push(u)}return{hunks:Aw(t,e,o),chunks:a}}function P2(t,e,r,i){return Z4(t,e,r,i)}var es=require("obsidian"),Wi=class{static hasHunksData(e){let r=e.field(Gr,!1);return!!r&&!r.isDirty}static getHunks(e,r){let i=e.field(Gr);return i?r?i.stagedHunks:i.hunks:[]}static getHunkAtPos(e,r,i){if(!e.field(Gr))return;let s=e.doc.lineAt(r).number,a=this.getHunks(e,i);return zt.findHunk(s,a)[0]}static getCursorHunk(e,r){if(!e.field(Gr))return;let n=e.selection.main.head;return this.getHunkAtPos(e,n,r)}static getHunk(e,r,i){if(i!=null)return this.getHunkAtPos(e,i,r);if(e.selection.main.empty)return this.getCursorHunk(e,r);let n=e.selection.main.from,s=e.selection.main.to,a=e.doc.lineAt(n).number,o=Dh(e.doc,s),l=this.getHunks(e,r),c=zt.createPartialHunk(l,a,o);if(!c)return;let u=e.field(Gr);if(r){let f=a,d=o;for(let h of u.hunks)a>h.vend&&(f=f-(h.added.count-h.removed.count)),o>h.vend&&(d=d-(h.added.count-h.removed.count));c.added.lines=u.compareText.split(`
|
||||
`).slice(f-1,d),u.compareTextHead?c.removed.lines=u.compareTextHead.split(`
|
||||
`).slice(c.removed.start-1,c.removed.start-1+c.removed.count):c.removed.lines=[]}else c.added.lines=e.doc.toString().split(`
|
||||
`).slice(a-1,o),o===e.doc.lines&&!e.doc.toString().endsWith(`
|
||||
`)&&(c.added.no_nl_at_eof=!0),c.removed.lines=u.compareText.split(`
|
||||
`).slice(c.removed.start-1,c.removed.start-1+c.removed.count),c.removed.start+c.removed.count-1===u.compareText.split(`
|
||||
`).length&&!u.compareText.endsWith(`
|
||||
`)&&(c.removed.no_nl_at_eof=!0);return c}},Gr=Pl.StateField.define({create:t=>{},update:(t,e)=>{var n,s,a;let r=t?{...t}:{maxDiffTimeMs:0,hunks:[],stagedHunks:[],chunks:void 0,isDirty:!1},i=!1;for(let o of e.effects)if(o.is(Rl)&&(r.compareText=o.value.compareText,r.compareTextHead=o.value.compareTextHead,i=(t==null?void 0:t.compareText)!==o.value.compareText,i&&(r.chunks=void 0,r.changeDesc=void 0)),o.is(Oh)){let l=(n=e.startState.field(Bu,!1))==null?void 0:n.revision;if(o.value.revision!==l)continue;R2(r,o.value.result,e.state),r.changeDesc=void 0}if(e.docChanged){let o=!r.changeDesc||r.changeDesc.newLength===e.changes.length;console.assert(o,"Git: Hunk changes belong to different document histories."),o||(r.chunks=void 0),r.changeDesc=K4(r.changeDesc,e.changes)}if(r.compareText!==void 0){if(i||e.docChanged){r.isDirty=!0;let o=X4(e,r.compareText,r.chunks,r.changeDesc,r.maxDiffTimeMs);o&&(R2(r,o,e.state),r.changeDesc=void 0)}}else{r.compareText=void 0,r.compareTextHead=void 0,r.chunks=void 0,r.hunks=[],r.stagedHunks=[],r.isDirty=!1;let o=e.state.field(es.editorInfoField).file;(a=(s=It.plugin)==null?void 0:s.editorIntegration.signsFeature.changeStatusBar)==null||a.display(r.hunks,o)}return r}});function R2(t,e,r){var n,s;t.hunks=e.hunks,t.chunks=e.chunks,t.isDirty=!1,t.maxDiffTimeMs=Math.max(.95*t.maxDiffTimeMs,e.diffDuration);let i=r.field(es.editorInfoField).file;(s=(n=It.plugin)==null?void 0:n.editorIntegration.signsFeature.changeStatusBar)==null||s.display(t.hunks,i)}var Bu=Pl.StateField.define({create:t=>{var e,r;return{debouncer:(0,es.debounce)(i=>{let{state:n,compareText:s,previousChunks:a,changeDesc:o,revision:l}=i,c=n.field(es.editorEditorField,!1);if(!c)return;let u=c.state.field(Bu,!1);if((u==null?void 0:u.revision)!==l)return;let f=$2(n,s,a,o);c.dispatch({effects:Oh.of({result:f,revision:l})})},1e3,!0),revision:{},filePath:(r=(e=t.field(es.editorInfoField,!1))==null?void 0:e.file)==null?void 0:r.path}},update:(t,e)=>{var i,n;let r=(n=(i=e.state.field(es.editorInfoField,!1))==null?void 0:i.file)==null?void 0:n.path;return e.docChanged||r!==t.filePath?{...t,revision:{},filePath:r}:t}});function K4(t,e){return!t||t.newLength!==e.length?e:t.composeDesc(e)}function $2(t,e,r,i){let n=t.doc.toString(),s=performance.now(),{hunks:a,chunks:o}=P2(e,n,r,i),l=performance.now()-s;return{hunks:a,chunks:o,diffDuration:l}}function X4(t,e,r,i,n){let s=t.state,a=Math.abs(t.changes.length-t.changes.newLength),o=s.field(Bu);if(a>1e3||n>16){o.debouncer({state:s,compareText:e,previousChunks:r,changeDesc:i,revision:o.revision});return}else return $2(s,e,r,i)}var Rl=Pl.StateEffect.define(),Oh=Pl.StateEffect.define();function F2(t,e){return e.update({effects:Rl.of(t)})}m();m();m();var st;(function(t){t.INSERT="insert",t.DELETE="delete",t.CONTEXT="context"})(st||(st={}));var I2={LINE_BY_LINE:"line-by-line",SIDE_BY_SIDE:"side-by-side"},M2={LINES:"lines",WORDS:"words",NONE:"none"},D2={WORD:"word",CHAR:"char"},Da;(function(t){t.AUTO="auto",t.DARK="dark",t.LIGHT="light"})(Da||(Da={}));m();var Q4=["-","[","]","/","{","}","(",")","*","+","?",".","\\","^","$","|"],J4=RegExp("["+Q4.join("\\")+"]","g");function O2(t){return t.replace(J4,"\\$&")}function Pw(t){return t&&t.replace(/\\/g,"/")}function L2(t){let e,r,i,n=0;for(e=0,i=t.length;e<i;e++)r=t.charCodeAt(e),n=(n<<5)-n+r,n|=0;return n}function Lh(t){let e=t.length,r=-1/0;for(let i=0;i<e;i++)r=Math.max(r,t[i]);return r}function N2(t,e){let r=t.split(".");return r.length>1?r[r.length-1]:e}function B2(t,e){return e.reduce((r,i)=>r||t.startsWith(i),!1)}var H2=["a/","b/","i/","w/","c/","o/"];function Gs(t,e,r){let i=r!==void 0?[...H2,r]:H2,n=e?new RegExp(`^${O2(e)} "?(.+?)"?$`):new RegExp('^"?(.+?)"?$'),[,s=""]=n.exec(t)||[],a=i.find(l=>s.indexOf(l)===0);return(a?s.slice(a.length):s).replace(/\s+\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(?:\.\d+)? [+-]\d{4}.*$/,"")}function e5(t,e){return Gs(t,"---",e)}function t5(t,e){return Gs(t,"+++",e)}function U2(t,e={}){let r=[],i=null,n=null,s=null,a=null,o=null,l=null,c=null,u="--- ",f="+++ ",d="@@",h=/^old mode (\d{6})/,p=/^new mode (\d{6})/,g=/^deleted file mode (\d{6})/,v=/^new file mode (\d{6})/,b=/^copy from "?(.+)"?/,_=/^copy to "?(.+)"?/,C=/^rename from "?(.+)"?/,x=/^rename to "?(.+)"?/,S=/^similarity index (\d+)%/,A=/^dissimilarity index (\d+)%/,w=/^index ([\da-z]+)\.\.([\da-z]+)\s*(\d{6})?/,E=/^Binary files (.*) and (.*) differ/,y=/^GIT binary patch/,P=/^index ([\da-z]+),([\da-z]+)\.\.([\da-z]+)/,T=/^mode (\d{6}),(\d{6})\.\.(\d{6})/,I=/^new file mode (\d{6})/,L=/^deleted file mode (\d{6}),(\d{6})/,H=t.replace(/\\ No newline at end of file/g,"").replace(/\r\n?/g,`
|
||||
`).split(`
|
||||
`);function te(){n!==null&&i!==null&&(i.blocks.push(n),n=null)}function xe(){i!==null&&(!i.oldName&&l!==null&&(i.oldName=l),!i.newName&&c!==null&&(i.newName=c),i.newName&&(r.push(i),i=null)),l=null,c=null}function Z(){te(),xe(),i={blocks:[],deletedLines:0,addedLines:0}}function K(W){te();let X;i!==null&&((X=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@.*/.exec(W))?(i.isCombined=!1,s=parseInt(X[1],10),o=parseInt(X[2],10)):(X=/^@@@ -(\d+)(?:,\d+)? -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@@.*/.exec(W))?(i.isCombined=!0,s=parseInt(X[1],10),a=parseInt(X[2],10),o=parseInt(X[3],10)):(W.startsWith(d)&&console.error("Failed to parse lines, starting in 0!"),s=0,o=0,i.isCombined=!1)),n={lines:[],oldStartLine:s,oldStartLine2:a,newStartLine:o,header:W}}function ce(W){if(i===null||n===null||s===null||o===null)return;let X={content:W},G=i.isCombined?["+ "," +","++"]:["+"],Be=i.isCombined?["- "," -","--"]:["-"];B2(W,G)?(i.addedLines++,X.type=st.INSERT,X.oldNumber=void 0,X.newNumber=o++):B2(W,Be)?(i.deletedLines++,X.type=st.DELETE,X.oldNumber=s++,X.newNumber=void 0):(X.type=st.CONTEXT,X.oldNumber=s++,X.newNumber=o++),n.lines.push(X)}function pe(W,X){let G=X;for(;G<H.length-3;){if(W.startsWith("diff"))return!1;if(H[G].startsWith(u)&&H[G+1].startsWith(f)&&H[G+2].startsWith(d))return!0;G++}return!1}return H.forEach((W,X)=>{if(!W||W.startsWith("*"))return;let G,Be=H[X-1],pr=H[X+1],Ut=H[X+2];if(W.startsWith("diff --git")||W.startsWith("diff --combined")){if(Z(),(G=/^diff --git "?([a-ciow]\/.+)"? "?([a-ciow]\/.+)"?/.exec(W))&&(l=Gs(G[1],void 0,e.dstPrefix),c=Gs(G[2],void 0,e.srcPrefix)),i===null)throw new Error("Where is my file !!!");i.isGitDiff=!0;return}if(W.startsWith("Binary files")&&!(i!=null&&i.isGitDiff)){if(Z(),(G=/^Binary files "?([a-ciow]\/.+)"? and "?([a-ciow]\/.+)"? differ/.exec(W))&&(l=Gs(G[1],void 0,e.dstPrefix),c=Gs(G[2],void 0,e.srcPrefix)),i===null)throw new Error("Where is my file !!!");i.isBinary=!0;return}if((!i||!i.isGitDiff&&i&&W.startsWith(u)&&pr.startsWith(f)&&Ut.startsWith(d))&&Z(),i!=null&&i.isTooBig)return;if(i&&(typeof e.diffMaxChanges=="number"&&i.addedLines+i.deletedLines>e.diffMaxChanges||typeof e.diffMaxLineLength=="number"&&W.length>e.diffMaxLineLength)){i.isTooBig=!0,i.addedLines=0,i.deletedLines=0,i.blocks=[],n=null;let Rt=typeof e.diffTooBigMessage=="function"?e.diffTooBigMessage(r.length):"Diff too big to be displayed";K(Rt);return}if(W.startsWith(u)&&pr.startsWith(f)||W.startsWith(f)&&Be.startsWith(u)){if(i&&!i.oldName&&W.startsWith("--- ")&&(G=e5(W,e.srcPrefix))){i.oldName=G,i.language=N2(i.oldName,i.language);return}if(i&&!i.newName&&W.startsWith("+++ ")&&(G=t5(W,e.dstPrefix))){i.newName=G,i.language=N2(i.newName,i.language);return}}if(i&&(W.startsWith(d)||i.isGitDiff&&i.oldName&&i.newName&&!n)){K(W);return}if(n&&(W.startsWith("+")||W.startsWith("-")||W.startsWith(" "))){ce(W);return}let Ie=!pe(W,X);if(i===null)throw new Error("Where is my file !!!");(G=h.exec(W))?i.oldMode=G[1]:(G=p.exec(W))?i.newMode=G[1]:(G=g.exec(W))?(i.deletedFileMode=G[1],i.isDeleted=!0):(G=v.exec(W))?(i.newFileMode=G[1],i.isNew=!0):(G=b.exec(W))?(Ie&&(i.oldName=G[1]),i.isCopy=!0):(G=_.exec(W))?(Ie&&(i.newName=G[1]),i.isCopy=!0):(G=C.exec(W))?(Ie&&(i.oldName=G[1]),i.isRename=!0):(G=x.exec(W))?(Ie&&(i.newName=G[1]),i.isRename=!0):(G=E.exec(W))?(i.isBinary=!0,i.oldName=Gs(G[1],void 0,e.srcPrefix),i.newName=Gs(G[2],void 0,e.dstPrefix),K("Binary file")):y.test(W)?(i.isBinary=!0,K(W)):(G=S.exec(W))?i.unchangedPercentage=parseInt(G[1],10):(G=A.exec(W))?i.changedPercentage=parseInt(G[1],10):(G=w.exec(W))?(i.checksumBefore=G[1],i.checksumAfter=G[2],G[3]&&(i.mode=G[3])):(G=P.exec(W))?(i.checksumBefore=[G[2],G[3]],i.checksumAfter=G[1]):(G=T.exec(W))?(i.oldMode=[G[2],G[3]],i.newMode=G[1]):(G=I.exec(W))?(i.newFileMode=G[1],i.isNew=!0):(G=L.exec(W))&&(i.deletedFileMode=G[1],i.isDeleted=!0)}),te(),xe(),r}m();m();m();m();var js=class{diff(e,r,i={}){let n;typeof i=="function"?(n=i,i={}):"callback"in i&&(n=i.callback);let s=this.castInput(e,i),a=this.castInput(r,i),o=this.removeEmpty(this.tokenize(s,i)),l=this.removeEmpty(this.tokenize(a,i));return this.diffWithOptionsObj(o,l,i,n)}diffWithOptionsObj(e,r,i,n){var s;let a=_=>{if(_=this.postProcess(_,i),n){setTimeout(function(){n(_)},0);return}else return _},o=r.length,l=e.length,c=1,u=o+l;i.maxEditLength!=null&&(u=Math.min(u,i.maxEditLength));let f=(s=i.timeout)!==null&&s!==void 0?s:1/0,d=Date.now()+f,h=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(h[0],r,e,0,i);if(h[0].oldPos+1>=l&&p+1>=o)return a(this.buildValues(h[0].lastComponent,r,e));let g=-1/0,v=1/0,b=()=>{for(let _=Math.max(g,-c);_<=Math.min(v,c);_+=2){let C,x=h[_-1],S=h[_+1];x&&(h[_-1]=void 0);let A=!1;if(S){let E=S.oldPos-_;A=S&&0<=E&&E<o}let w=x&&x.oldPos+1<l;if(!A&&!w){h[_]=void 0;continue}if(!w||A&&x.oldPos<S.oldPos?C=this.addToPath(S,!0,!1,0,i):C=this.addToPath(x,!1,!0,1,i),p=this.extractCommon(C,r,e,_,i),C.oldPos+1>=l&&p+1>=o)return a(this.buildValues(C.lastComponent,r,e))||!0;h[_]=C,C.oldPos+1>=l&&(v=Math.min(v,_-1)),p+
Line truncated
|
||||
`);return this.hoganUtils.render(W2,"wrapper",{colorScheme:Ol(this.config.colorScheme),filesNumber:e.length,files:r})}};m();var Gw=Object.assign(Object.assign({},La),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),Uu="generic",q2="line-by-line",p5="icon",m5="tag",Gu=class{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},Gw),r)}render(e){let r=e.map(i=>{let n;return i.blocks.length?n=this.generateFileHtml(i):n=this.generateEmptyDiff(),this.makeFileDiffHtml(i,n)}).join(`
|
||||
`);return this.hoganUtils.render(Uu,"wrapper",{colorScheme:Ol(this.config.colorScheme),content:r})}makeFileDiffHtml(e,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&e.blocks.length===0)return"";let i=this.hoganUtils.template(q2,"file-diff"),n=this.hoganUtils.template(Uu,"file-path"),s=this.hoganUtils.template(p5,"file"),a=this.hoganUtils.template(m5,Nl(e));return i.render({file:e,fileHtmlId:Ll(e),diffs:r,filePath:n.render({fileDiffName:Na(e)},{fileIcon:s,fileTag:a})})}generateEmptyDiff(){return this.hoganUtils.render(Uu,"empty-diff",{contentClass:"d2h-code-line",CSSLineClass:Qt})}generateFileHtml(e){let r=Ml(Il(i=>Ci(i.content,e.isCombined).content));return e.blocks.map(i=>{let n=this.hoganUtils.render(Uu,"block-header",{CSSLineClass:Qt,blockHeader:e.isTooBig?i.header:Vs(i.header),lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line"});return this.applyLineGroupping(i).forEach(([s,a,o])=>{if(a.length&&o.length&&!s.length)this.applyRematchMatching(a,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(e,e.isCombined,l,c);n+=u,n+=f});else if(s.length)s.forEach(l=>{let{prefix:c,content:u}=Ci(l.content,e.isCombined);n+=this.generateSingleLineHtml(e,{type:Qt.CONTEXT,prefix:c,content:u,oldNumber:l.oldNumber,newNumber:l.newNumber})});else if(a.length||o.length){let{left:l,right:c}=this.processChangedLines(e,e.isCombined,a,o);n+=l,n+=c}else console.error("Unknown state reached while processing groups of lines",s,a,o)}),n}).join(`
|
||||
`)}applyLineGroupping(e){let r=[],i=[],n=[];for(let s=0;s<e.lines.length;s++){let a=e.lines[s];(a.type!==st.INSERT&&n.length||a.type===st.CONTEXT&&i.length>0)&&(r.push([[],i,n]),i=[],n=[]),a.type===st.CONTEXT?r.push([[a],[],[]]):a.type===st.INSERT&&i.length===0?r.push([[],[],[a]]):a.type===st.INSERT&&i.length>0?n.push(a):a.type===st.DELETE&&i.push(a)}return(i.length||n.length)&&(r.push([[],i,n]),i=[],n=[]),r}applyRematchMatching(e,r,i){let n=e.length*r.length,s=Lh(e.concat(r).map(o=>o.content.length));return n<this.config.matchingMaxComparisons&&s<this.config.maxLineSizeInBlockForComparison&&(this.config.matching==="lines"||this.config.matching==="words")?i(e,r):[[e,r]]}processChangedLines(e,r,i,n){let s={right:"",left:""},a=Math.max(i.length,n.length);for(let o=0;o<a;o++){let l=i[o],c=n[o],u=l!==void 0&&c!==void 0?Gh(l.content,c.content,r,this.config):void 0,f=l!==void 0&&l.oldNumber!==void 0?Object.assign(Object.assign({},u!==void 0?{prefix:u.oldLine.prefix,content:u.oldLine.content,type:Qt.DELETE_CHANGES}:Object.assign(Object.assign({},Ci(l.content,r)),{type:Dl(l.type)})),{oldNumber:l.oldNumber,newNumber:l.newNumber}):void 0,d=c!==void 0&&c.newNumber!==void 0?Object.assign(Object.assign({},u!==void 0?{prefix:u.newLine.prefix,content:u.newLine.content,type:Qt.INSERT_CHANGES}:Object.assign(Object.assign({},Ci(c.content,r)),{type:Dl(c.type)})),{oldNumber:c.oldNumber,newNumber:c.newNumber}):void 0,{left:h,right:p}=this.generateLineHtml(e,f,d);s.left+=h,s.right+=p}return s}generateLineHtml(e,r,i){return{left:this.generateSingleLineHtml(e,r),right:this.generateSingleLineHtml(e,i)}}generateSingleLineHtml(e,r){if(r===void 0)return"";let i=this.hoganUtils.render(q2,"numbers",{oldNumber:r.oldNumber||"",newNumber:r.newNumber||""});return this.hoganUtils.render(Uu,"line",{type:r.type,lineClass:"d2h-code-linenumber",contentClass:"d2h-code-line",prefix:r.prefix===" "?" ":r.prefix,content:r.content,lineNumber:i,line:r,file:e})}};m();var jw=Object.assign(Object.assign({},La),{renderNothingWhenEmpty:!1,matchingMaxComparisons:2500,maxLineSizeInBlockForComparison:200}),ju="generic",g5="side-by-side",v5="icon",w5="tag",Vu=class{constructor(e,r={}){this.hoganUtils=e,this.config=Object.assign(Object.assign({},jw),r)}render(e){let r=e.map(i=>{let n;return i.blocks.length?n=this.generateFileHtml(i):n=this.generateEmptyDiff(),this.makeFileDiffHtml(i,n)}).join(`
|
||||
`);return this.hoganUtils.render(ju,"wrapper",{colorScheme:Ol(this.config.colorScheme),content:r})}makeFileDiffHtml(e,r){if(this.config.renderNothingWhenEmpty&&Array.isArray(e.blocks)&&e.blocks.length===0)return"";let i=this.hoganUtils.template(g5,"file-diff"),n=this.hoganUtils.template(ju,"file-path"),s=this.hoganUtils.template(v5,"file"),a=this.hoganUtils.template(w5,Nl(e));return i.render({file:e,fileHtmlId:Ll(e),diffs:r,filePath:n.render({fileDiffName:Na(e)},{fileIcon:s,fileTag:a})})}generateEmptyDiff(){return{right:"",left:this.hoganUtils.render(ju,"empty-diff",{contentClass:"d2h-code-side-line",CSSLineClass:Qt})}}generateFileHtml(e){let r=Ml(Il(i=>Ci(i.content,e.isCombined).content));return e.blocks.map(i=>{let n={left:this.makeHeaderHtml(i.header,e),right:this.makeHeaderHtml("")};return this.applyLineGroupping(i).forEach(([s,a,o])=>{if(a.length&&o.length&&!s.length)this.applyRematchMatching(a,o,r).map(([l,c])=>{let{left:u,right:f}=this.processChangedLines(e.isCombined,l,c);n.left+=u,n.right+=f});else if(s.length)s.forEach(l=>{let{prefix:c,content:u}=Ci(l.content,e.isCombined),{left:f,right:d}=this.generateLineHtml({type:Qt.CONTEXT,prefix:c,content:u,number:l.oldNumber},{type:Qt.CONTEXT,prefix:c,content:u,number:l.newNumber});n.left+=f,n.right+=d});else if(a.length||o.length){let{left:l,right:c}=this.processChangedLines(e.isCombined,a,o);n.left+=l,n.right+=c}else console.error("Unknown state reached while processing groups of lines",s,a,o)}),n}).reduce((i,n)=>({left:i.left+n.left,right:i.right+n.right}),{left:"",right:""})}applyLineGroupping(e){let r=[],i=[],n=[];for(let s=0;s<e.lines.length;s++){let a=e.lines[s];(a.type!==st.INSERT&&n.length||a.type===st.CONTEXT&&i.length>0)&&(r.push([[],i,n]),i=[],n=[]),a.type===st.CONTEXT?r.push([[a],[],[]]):a.type===st.INSERT&&i.length===0?r.push([[],[],[a]]):a.type===st.INSERT&&i.length>0?n.push(a):a.type===st.DELETE&&i.push(a)}return(i.length||n.length)&&(r.push([[],i,n]),i=[],n=[]),r}applyRematchMatching(e,r,i){let n=e.length*r.length,s=Lh(e.concat(r).map(o=>o.content.length));return n<this.config.matchingMaxComparisons&&s<this.config.maxLineSizeInBlockForComparison&&(this.config.matching==="lines"||this.config.matching==="words")?i(e,r):[[e,r]]}makeHeaderHtml(e,r){return this.hoganUtils.render(ju,"block-header",{CSSLineClass:Qt,blockHeader:r!=null&&r.isTooBig?e:Vs(e),lineClass:"d2h-code-side-linenumber",contentClass:"d2h-code-side-line"})}processChangedLines(e,r,i){let n={right:"",left:""},s=Math.max(r.length,i.length);for(let a=0;a<s;a++){let o=r[a],l=i[a],c=o!==void 0&&l!==void 0?Gh(o.content,l.content,e,this.config):void 0,u=o!==void 0&&o.oldNumber!==void 0?Object.assign(Object.assign({},c!==void 0?{prefix:c.oldLine.prefix,content:c.oldLine.content,type:Qt.DELETE_CHANGES}:Object.assign(Object.assign({},Ci(o.content,e)),{type:Dl(o.type)})),{number:o.oldNumber}):void 0,f=l!==void 0&&l.newNumber!==void 0?Object.assign(Object.assign({},c!==void 0?{prefix:c.newLine.prefix,content:c.newLine.content,type:Qt.INSERT_CHANGES}:Object.assign(Object.assign({},Ci(l.content,e)),{type:Dl(l.type)})),{number:l.newNumber}):void 0,{left:d,right:h}=this.generateLineHtml(u,f);n.left+=d,n.right+=h}return n}generateLineHtml(e,r){return{left:this.generateSingleHtml(e),right:this.generateSingleHtml(r)}}generateSingleHtml(e){let r="d2h-code-side-linenumber",i="d2h-code-side-line";return this.hoganUtils.render(ju,"line",{type:(e==null?void 0:e.type)||`${Qt.CONTEXT} d2h-emptyplaceholder`,lineClass:e!==void 0?r:`${r} d2h-code-side-emptyplaceholder`,contentClass:e!==void 0?i:`${i} d2h-code-side-emptyplaceholder`,prefix:(e==null?void 0:e.prefix)===" "?" ":e==null?void 0:e.prefix,content:e==null?void 0:e.content,lineNumber:e==null?void 0:e.number})}};m();var qw=ft(Ww());m();var Ct=ft(Ww()),xt={};xt["file-summary-line"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<li class="d2h-file-list-line">'),i.b(`
|
||||
`+r),i.b(' <span class="d2h-file-name-wrapper">'),i.b(`
|
||||
`+r),i.b(i.rp("<fileIcon0",t,e," ")),i.b(' <a href="#'),i.b(i.v(i.f("fileHtmlId",t,e,0))),i.b('" class="d2h-file-name">'),i.b(i.v(i.f("fileName",t,e,0))),i.b("</a>"),i.b(`
|
||||
`+r),i.b(' <span class="d2h-file-stats">'),i.b(`
|
||||
`+r),i.b(' <span class="d2h-lines-added">'),i.b(i.v(i.f("addedLines",t,e,0))),i.b("</span>"),i.b(`
|
||||
`+r),i.b(' <span class="d2h-lines-deleted">'),i.b(i.v(i.f("deletedLines",t,e,0))),i.b("</span>"),i.b(`
|
||||
`+r),i.b(" </span>"),i.b(`
|
||||
`+r),i.b(" </span>"),i.b(`
|
||||
`+r),i.b("</li>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}}},subs:{}});xt["file-summary-wrapper"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<div class="d2h-file-list-wrapper '),i.b(i.v(i.f("colorScheme",t,e,0))),i.b('">'),i.b(`
|
||||
`+r),i.b(' <div class="d2h-file-list-header">'),i.b(`
|
||||
`+r),i.b(' <span class="d2h-file-list-title">Files changed ('),i.b(i.v(i.f("filesNumber",t,e,0))),i.b(")</span>"),i.b(`
|
||||
`+r),i.b(' <a class="d2h-file-switch d2h-hide">hide</a>'),i.b(`
|
||||
`+r),i.b(' <a class="d2h-file-switch d2h-show">show</a>'),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b(' <ol class="d2h-file-list">'),i.b(`
|
||||
`+r),i.b(" "),i.b(i.t(i.f("files",t,e,0))),i.b(`
|
||||
`+r),i.b(" </ol>"),i.b(`
|
||||
`+r),i.b("</div>"),i.fl()},partials:{},subs:{}});xt["generic-block-header"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b("<tr>"),i.b(`
|
||||
`+r),i.b(' <td class="'),i.b(i.v(i.f("lineClass",t,e,0))),i.b(" "),i.b(i.v(i.d("CSSLineClass.INFO",t,e,0))),i.b('"></td>'),i.b(`
|
||||
`+r),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",t,e,0))),i.b('">'),i.b(`
|
||||
`+r),i.b(' <div class="'),i.b(i.v(i.f("contentClass",t,e,0))),i.b('">'),i.s(i.f("blockHeader",t,e,1),t,e,0,156,173,"{{ }}")&&(i.rs(t,e,function(n,s,a){a.b(a.t(a.f("blockHeader",n,s,0)))}),t.pop()),i.s(i.f("blockHeader",t,e,1),t,e,1,0,0,"")||i.b(" "),i.b("</div>"),i.b(`
|
||||
`+r),i.b(" </td>"),i.b(`
|
||||
`+r),i.b("</tr>"),i.fl()},partials:{},subs:{}});xt["generic-empty-diff"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b("<tr>"),i.b(`
|
||||
`+r),i.b(' <td class="'),i.b(i.v(i.d("CSSLineClass.INFO",t,e,0))),i.b('">'),i.b(`
|
||||
`+r),i.b(' <div class="'),i.b(i.v(i.f("contentClass",t,e,0))),i.b('">'),i.b(`
|
||||
`+r),i.b(" File without changes"),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b(" </td>"),i.b(`
|
||||
`+r),i.b("</tr>"),i.fl()},partials:{},subs:{}});xt["generic-file-path"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<span class="d2h-file-name-wrapper">'),i.b(`
|
||||
`+r),i.b(i.rp("<fileIcon0",t,e," ")),i.b(' <span class="d2h-file-name">'),i.b(i.v(i.f("fileDiffName",t,e,0))),i.b("</span>"),i.b(`
|
||||
`+r),i.b(i.rp("<fileTag1",t,e," ")),i.b("</span>"),i.b(`
|
||||
`+r),i.b('<label class="d2h-file-collapse">'),i.b(`
|
||||
`+r),i.b(' <input class="d2h-file-collapse-input" type="checkbox" name="viewed" value="viewed">'),i.b(`
|
||||
`+r),i.b(" Viewed"),i.b(`
|
||||
`+r),i.b("</label>"),i.fl()},partials:{"<fileIcon0":{name:"fileIcon",partials:{},subs:{}},"<fileTag1":{name:"fileTag",partials:{},subs:{}}},subs:{}});xt["generic-line"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b("<tr>"),i.b(`
|
||||
`+r),i.b(' <td class="'),i.b(i.v(i.f("lineClass",t,e,0))),i.b(" "),i.b(i.v(i.f("type",t,e,0))),i.b('">'),i.b(`
|
||||
`+r),i.b(" "),i.b(i.t(i.f("lineNumber",t,e,0))),i.b(`
|
||||
`+r),i.b(" </td>"),i.b(`
|
||||
`+r),i.b(' <td class="'),i.b(i.v(i.f("type",t,e,0))),i.b('">'),i.b(`
|
||||
`+r),i.b(' <div class="'),i.b(i.v(i.f("contentClass",t,e,0))),i.b('">'),i.b(`
|
||||
`+r),i.s(i.f("prefix",t,e,1),t,e,0,162,238,"{{ }}")&&(i.rs(t,e,function(n,s,a){a.b(' <span class="d2h-code-line-prefix">'),a.b(a.t(a.f("prefix",n,s,0))),a.b("</span>"),a.b(`
|
||||
`+r)}),t.pop()),i.s(i.f("prefix",t,e,1),t,e,1,0,0,"")||(i.b(' <span class="d2h-code-line-prefix"> </span>'),i.b(`
|
||||
`+r)),i.s(i.f("content",t,e,1),t,e,0,371,445,"{{ }}")&&(i.rs(t,e,function(n,s,a){a.b(' <span class="d2h-code-line-ctn">'),a.b(a.t(a.f("content",n,s,0))),a.b("</span>"),a.b(`
|
||||
`+r)}),t.pop()),i.s(i.f("content",t,e,1),t,e,1,0,0,"")||(i.b(' <span class="d2h-code-line-ctn"><br></span>'),i.b(`
|
||||
`+r)),i.b(" </div>"),i.b(`
|
||||
`+r),i.b(" </td>"),i.b(`
|
||||
`+r),i.b("</tr>"),i.fl()},partials:{},subs:{}});xt["generic-wrapper"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<div class="d2h-wrapper '),i.b(i.v(i.f("colorScheme",t,e,0))),i.b('">'),i.b(`
|
||||
`+r),i.b(" "),i.b(i.t(i.f("content",t,e,0))),i.b(`
|
||||
`+r),i.b("</div>"),i.fl()},partials:{},subs:{}});xt["icon-file-added"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-added" height="16" title="added" version="1.1" viewBox="0 0 14 16"'),i.b(`
|
||||
`+r),i.b(' width="14">'),i.b(`
|
||||
`+r),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM6 9H3V7h3V4h2v3h3v2H8v3H6V9z"></path>'),i.b(`
|
||||
`+r),i.b("</svg>"),i.fl()},partials:{},subs:{}});xt["icon-file-changed"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-changed" height="16" title="modified" version="1.1"'),i.b(`
|
||||
`+r),i.b(' viewBox="0 0 14 16" width="14">'),i.b(`
|
||||
`+r),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM4 8c0-1.66 1.34-3 3-3s3 1.34 3 3-1.34 3-3 3-3-1.34-3-3z"></path>'),i.b(`
|
||||
`+r),i.b("</svg>"),i.fl()},partials:{},subs:{}});xt["icon-file-deleted"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-deleted" height="16" title="removed" version="1.1"'),i.b(`
|
||||
`+r),i.b(' viewBox="0 0 14 16" width="14">'),i.b(`
|
||||
`+r),i.b(' <path d="M13 1H1C0.45 1 0 1.45 0 2v12c0 0.55 0.45 1 1 1h12c0.55 0 1-0.45 1-1V2c0-0.55-0.45-1-1-1z m0 13H1V2h12v12zM11 9H3V7h8v2z"></path>'),i.b(`
|
||||
`+r),i.b("</svg>"),i.fl()},partials:{},subs:{}});xt["icon-file-renamed"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<svg aria-hidden="true" class="d2h-icon d2h-moved" height="16" title="renamed" version="1.1"'),i.b(`
|
||||
`+r),i.b(' viewBox="0 0 14 16" width="14">'),i.b(`
|
||||
`+r),i.b(' <path d="M6 9H3V7h3V4l5 4-5 4V9z m8-7v12c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h12c0.55 0 1 0.45 1 1z m-1 0H1v12h12V2z"></path>'),i.b(`
|
||||
`+r),i.b("</svg>"),i.fl()},partials:{},subs:{}});xt["icon-file"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<svg aria-hidden="true" class="d2h-icon" height="16" version="1.1" viewBox="0 0 12 16" width="12">'),i.b(`
|
||||
`+r),i.b(' <path d="M6 5H2v-1h4v1zM2 8h7v-1H2v1z m0 2h7v-1H2v1z m0 2h7v-1H2v1z m10-7.5v9.5c0 0.55-0.45 1-1 1H1c-0.55 0-1-0.45-1-1V2c0-0.55 0.45-1 1-1h7.5l3.5 3.5z m-1 0.5L8 2H1v12h10V5z"></path>'),i.b(`
|
||||
`+r),i.b("</svg>"),i.fl()},partials:{},subs:{}});xt["line-by-line-file-diff"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",t,e,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",t,e,0))),i.b('">'),i.b(`
|
||||
`+r),i.b(' <div class="d2h-file-header">'),i.b(`
|
||||
`+r),i.b(" "),i.b(i.t(i.f("filePath",t,e,0))),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b(' <div class="d2h-file-diff">'),i.b(`
|
||||
`+r),i.b(' <div class="d2h-code-wrapper">'),i.b(`
|
||||
`+r),i.b(' <table class="d2h-diff-table">'),i.b(`
|
||||
`+r),i.b(' <tbody class="d2h-diff-tbody">'),i.b(`
|
||||
`+r),i.b(" "),i.b(i.t(i.f("diffs",t,e,0))),i.b(`
|
||||
`+r),i.b(" </tbody>"),i.b(`
|
||||
`+r),i.b(" </table>"),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b("</div>"),i.fl()},partials:{},subs:{}});xt["line-by-line-numbers"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<div class="line-num1">'),i.b(i.v(i.f("oldNumber",t,e,0))),i.b("</div>"),i.b(`
|
||||
`+r),i.b('<div class="line-num2">'),i.b(i.v(i.f("newNumber",t,e,0))),i.b("</div>"),i.fl()},partials:{},subs:{}});xt["side-by-side-file-diff"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<div id="'),i.b(i.v(i.f("fileHtmlId",t,e,0))),i.b('" class="d2h-file-wrapper" data-lang="'),i.b(i.v(i.d("file.language",t,e,0))),i.b('">'),i.b(`
|
||||
`+r),i.b(' <div class="d2h-file-header">'),i.b(`
|
||||
`+r),i.b(" "),i.b(i.t(i.f("filePath",t,e,0))),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b(' <div class="d2h-files-diff">'),i.b(`
|
||||
`+r),i.b(' <div class="d2h-file-side-diff">'),i.b(`
|
||||
`+r),i.b(' <div class="d2h-code-wrapper">'),i.b(`
|
||||
`+r),i.b(' <table class="d2h-diff-table">'),i.b(`
|
||||
`+r),i.b(' <tbody class="d2h-diff-tbody">'),i.b(`
|
||||
`+r),i.b(" "),i.b(i.t(i.d("diffs.left",t,e,0))),i.b(`
|
||||
`+r),i.b(" </tbody>"),i.b(`
|
||||
`+r),i.b(" </table>"),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b(' <div class="d2h-file-side-diff">'),i.b(`
|
||||
`+r),i.b(' <div class="d2h-code-wrapper">'),i.b(`
|
||||
`+r),i.b(' <table class="d2h-diff-table">'),i.b(`
|
||||
`+r),i.b(' <tbody class="d2h-diff-tbody">'),i.b(`
|
||||
`+r),i.b(" "),i.b(i.t(i.d("diffs.right",t,e,0))),i.b(`
|
||||
`+r),i.b(" </tbody>"),i.b(`
|
||||
`+r),i.b(" </table>"),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b(" </div>"),i.b(`
|
||||
`+r),i.b("</div>"),i.fl()},partials:{},subs:{}});xt["tag-file-added"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<span class="d2h-tag d2h-added d2h-added-tag">ADDED</span>'),i.fl()},partials:{},subs:{}});xt["tag-file-changed"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<span class="d2h-tag d2h-changed d2h-changed-tag">CHANGED</span>'),i.fl()},partials:{},subs:{}});xt["tag-file-deleted"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<span class="d2h-tag d2h-deleted d2h-deleted-tag">DELETED</span>'),i.fl()},partials:{},subs:{}});xt["tag-file-renamed"]=new Ct.Template({code:function(t,e,r){var i=this;return i.b(r=r||""),i.b('<span class="d2h-tag d2h-moved d2h-moved-tag">RENAMED</span>'),i.fl()},partials:{},subs:{}});var zu=class{constructor({compiledTemplates:e={},rawTemplates:r={}}){let i=Object.entries(r).reduce((n,[s,a])=>{let o=qw.compile(a,{asString:!1});return Object.assign(Object.assign({},n),{[s]:o})},{});this.preCompiledTemplates=Object.assign(Object.assign(Object.assign({},xt),e),i)}static compile(e){return qw.compile(e,{asString:!1})}render(e,r,i,n,s){let a=this.templateKey(e,r);try{return this.preCompiledTemplates[a].render(i,n,s)}catch(o){throw new Error(`Could not find template to render '${a}'`)}}template(e,r){return this.preCompiledTemplates[this.templateKey(e,r)]}templateKey(e,r){return`${e}-${r}`}};var _5=Object.assign(Object.assign(Object.assign({},Gw),jw),{outputFormat:I2.LINE_BY_LINE,drawFileList:!0});function zh(t,e={}){let r=Object.assign(Object.assign({},_5),e),i=typeof t=="string"?U2(t,r):t,n=new zu(r),{colorScheme:s}=r,a={colorScheme:s},o=r.drawFileList?new jh(n,a).render(i):"",l=r.outputFormat==="side-by-side"?new Vu(n,r).render(i):new Gu(n,r).render(i);return o+l}var tP=ft(J2(),1);var Ba=require("obsidian"),Yw=Wu.StateEffect.define();function zs(t,e){let r=t.state,i=r.field(qh),n=r.field(Gr),s=r.doc.lineAt(e!=null?e:r.selection.main.head).number,a=zt.findHunk(s,n==null?void 0:n.hunks)[0];if(!a)return;let o=r.doc.line(Math.max(1,a.added.start)).from,l=i.has(o);return r.field(Ba.editorEditorField).dispatch({effects:Yw.of({pos:o,add:!l})})}var qh=Wu.StateField.define({create:()=>new Set,update(t,e){let r=new Set;for(let i of e.effects)i.is(Yw)&&(i.value.add?t.add(i.value.pos):t.delete(i.value.pos));for(let i of t)r.add(e.changes.mapPos(i));return r}}),rP=Wu.StateField.define({create:t=>eP(t),update(t,e){return e.docChanged||e.effects.some(r=>r.is(Rl)||r.is(Yw))?eP(e.state):t},provide:t=>Wh.showTooltip.computeN([t],e=>e.field(t))}),iP=Wh.EditorView.baseTheme({".cm-tooltip.git-diff-tooltip":{"z-index":"var(--layer-popover)",backgroundColor:"var(--background-primary-alt)",border:"var(--border-width) solid var(--background-primary-alt)",borderRadius:"var(--radius-s)"},".cm-tooltip.git-diff-tooltip .tooltip-toolbar":{display:"flex",padding:"var(--size-2-1)"}});function eP(t){let e=t.field(Gr);return e?[...t.field(qh)].map(i=>{let n=t.doc.lineAt(i),s=zt.findHunk(n.number,e.hunks)[0];if(s)return{pos:i,above:!1,arrow:!1,strictSide:!0,clip:!1,create:()=>y5(s,t,i)}}).filter(i=>i!==void 0):[]}function y5(t,e,r){var g,v;let i=zt.createPatch("file",[t],"10064",!1).join(`
|
||||
`)+`
|
||||
`,n=zh(i,{colorScheme:tP.ColorSchemeType.AUTO,diffStyle:"word",drawFileList:!1}),s=new DOMParser().parseFromString(n,"text/html").querySelector(".d2h-file-diff"),a=createDiv();a.addClass("tooltip-toolbar");let o=(b,_)=>{let C=createDiv();return(0,Ba.setIcon)(C,b),C.setAttr("aria-label",_),C.addClass("clickable-icon"),C},l=o("x","Close hunk"),c=o("plus","Stage hunk"),u=o("undo","Reset hunk");a.appendChild(l),a.appendChild(c),a.appendChild(u);let f=createDiv();f.appendChild(a),f.appendChild(s),f.addClass("git-diff-tooltip","git-diff");let d=e.field(Ba.editorEditorField);l.onclick=()=>{zs(d,r)},c.onclick=()=>{let b=It.plugin;b&&(b.promiseQueue.addTask(()=>b.hunkActions.stageHunk(r)),zs(d,r))},u.onclick=()=>{let b=It.plugin;b&&(b.hunkActions.resetHunk(r),zs(d,r))};let h=(v=(g=It.plugin)==null?void 0:g.app.workspace.getActiveViewOfType(Ba.MarkdownView))==null?void 0:v.scope,p=h==null?void 0:h.register(null,"Escape",(b,_)=>{zs(d,r)});return{dom:f,destroy:()=>{p&&(h==null||h.unregister(p))},update:b=>{r=b.changes.mapPos(r)}}}function nP(t){let e=t.app;t.addCommand({id:"edit-gitignore",name:"Edit .gitignore",callback:async()=>{let r=t.gitManager.getRelativeVaultPath(".gitignore");await e.vault.adapter.exists(r)||await e.vault.adapter.write(r,"");let i=await e.vault.adapter.read(r),s=await new Ch(e,i).openAndGetReslt();s!==void 0&&(await e.vault.adapter.write(r,s),await t.refresh())}}),t.addCommand({id:"open-git-view",name:"Open source control view",callback:async()=>{var n;let r=e.workspace.getLeavesOfType(Xt.type),i;r.length===0?(i=(n=e.workspace.getRightLeaf(!1))!=null?n:e.workspace.getLeaf(),await i.setViewState({type:Xt.type})):i=r.first(),await e.workspace.revealLeaf(i),e.workspace.trigger("obsidian-git:refresh")}}),t.addCommand({id:"open-history-view",name:"Open history view",callback:async()=>{var n;let r=e.workspace.getLeavesOfType(wi.type),i;r.length===0?(i=(n=e.workspace.getRightLeaf(!1))!=null?n:e.workspace.getLeaf(),await i.setViewState({type:wi.type})):i=r.first(),await e.workspace.revealLeaf(i),e.workspace.trigger("obsidian-git:refresh")}}),t.addCommand({id:"open-diff-view",name:"Open diff view",checkCallback:r=>{let i=e.workspace.getActiveFile();if(r)return i!==null;{let n=t.gitManager.getRelativeRepoPath(i.path,!0);return t.tools.openDiff({aFile:n,aRef:""}),!0}}}),t.addCommand({id:"view-file-on-github",name:"Open file on GitHub",editorCallback:(r,{file:i})=>{if(i)return jT(r,i,t.gitManager)}}),t.addCommand({id:"view-history-on-github",name:"Open file history on GitHub",editorCallback:(r,{file:i})=>{if(i)return VT(i,t.gitManager)}}),t.addCommand({id:"pull",name:"Pull",callback:()=>t.promiseQueue.addTask(()=>t.pullChangesFromRemote())}),t.addCommand({id:"fetch",name:"Fetch",callback:()=>t.promiseQueue.addTask(()=>t.fetch())}),t.addCommand({id:"switch-to-remote-branch",name:"Switch to remote branch",callback:()=>t.promiseQueue.addTask(()=>t.switchRemoteBranch())}),t.addCommand({id:"add-to-gitignore",name:"Add file to .gitignore",checkCallback:r=>{let i=e.workspace.getActiveFile();return r?i!==null:(t.addFileToGitignore(i.path,i instanceof qi.TFolder).catch(n=>t.displayError(n)),!0)}}),t.addCommand({id:"push",name:"Commit-and-sync",callback:()=>t.promiseQueue.addTask(()=>t.commitAndSync({fromAutoBackup:!1}))}),t.addCommand({id:"backup-and-close",name:"Commit-and-sync and then close Obsidian",callback:()=>t.promiseQueue.addTask(async()=>{await t.commitAndSync({fromAutoBackup:!1}),window.close()})}),t.addCommand({id:"commit-push-specified-message",name:"Commit-and-sync with specific message",callback:()=>t.promiseQueue.addTask(()=>t.commitAndSync({fromAutoBackup:!1,requestCustomMessage:!0}))}),t.addCommand({id:"commit",name:"Commit all changes",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1}))}),t.addCommand({id:"commit-specified-message",name:"Commit all changes with specific message",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0}))}),t.addCommand({id:"commit-smart",name:"Commit",callback:()=>t.promiseQueue.addTask(async()=>{let i=(await t.updateCachedStatus()).staged.length>0;return t.commit({fromAuto:!1,requestCustomMessage:!1,onlyStaged:i})})}),t.addCommand({id:"commit-staged",name:"Commit staged",checkCallback:function(r){return r?!1:(t.promiseQueue.addTask(async()=>t.commit({fromAuto:!1,requestCustomMessage:!1})),!0)}}),qi.Platform.isDesktopApp&&t.addCommand({id:"commit-amend-staged-specified-message",name:"Amend staged",callback:()=>t.promiseQueue.addTask(()=>t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:!0,amend:!0}))}),t.addCommand({id:"commit-smart-specified-message",name:"Commit with specific message",callback:()=>t.promiseQueue.addTask(async()=>{let i=(await t.updateCachedStatus()).staged.length>0;return t.commit({fromAuto:!1,requestCustomMessage:!0,onlyStaged:i})})}),t.addCommand({id:"commit-staged-specified-message",name:"Commit staged with specific message",checkCallback:function(r){return r?!1:t.promiseQueue.addTask(()=>t.c
Line truncated
|
||||
- ${s.map(o=>o.vaultPath).join(`
|
||||
- `)}
|
||||
Please remove them or add to .gitignore.`),!0}return!1}async writeAndOpenFile(e){e!==void 0&&await this.plugin.app.vault.adapter.write(il,e);let r=!1;this.plugin.app.workspace.iterateAllLeaves(i=>{i.getDisplayText()!=""&&il.startsWith(i.getDisplayText())&&(r=!0)}),r||await this.plugin.app.workspace.openLinkText(il,"/",!0)}openDiff({aFile:e,bFile:r,aRef:i,bRef:n,event:s}){var l,c;let a=this.plugin.settings.diffStyle;Bl.Platform.isMobileApp&&(a="git_unified");let o={aFile:e,bFile:r!=null?r:e,aRef:i,bRef:n};a=="split"?(l=Vi(this.plugin.app,s))==null||l.setViewState({type:Os.type,active:!0,state:o}):a=="git_unified"&&((c=Vi(this.plugin.app,s))==null||c.setViewState({type:Ls.type,active:!0,state:o}))}async runRawCommand(){let e=this.plugin.gitManager;if(!(e instanceof Se))return;let i=await new rt(this.plugin,{placeholder:"push origin master",allowEmpty:!1}).openAndGetResult();i!==void 0&&this.plugin.promiseQueue.addTask(async()=>{let n=new Bl.Notice(`Running '${i}'...`,999999);try{let s=await e.rawCommand(i);s?(n.setMessage(s),window.setTimeout(()=>n.hide(),5e3)):n.hide()}catch(s){throw n.hide(),s}})}};m();var Zh=require("obsidian");var Ha=class extends Zh.ItemView{constructor(r,i){super(r);this.plugin=i;this.gettingDiff=!1;this.parser=new DOMParser,this.navigation=!0,this.contentEl.addClass("git-diff"),this.gitRefreshRef=this.app.workspace.on("obsidian-git:status-changed",()=>{this.refresh().catch(console.error)})}getViewType(){return Ls.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let i=this.state.bFile.split("/").last();return i!=null&&i.endsWith(".md")&&(i=i.slice(0,-3)),`Diff: ${i}`}return Ls.name}getIcon(){return Ls.icon}async setState(r,i){this.state=r,Zh.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await this.refresh()}getState(){return this.state}onClose(){return this.app.workspace.offref(this.gitRefreshRef),this.app.workspace.offref(this.gitViewRefreshRef),super.onClose()}async onOpen(){return await this.refresh(),super.onOpen()}async refresh(){var r;if((r=this.state)!=null&&r.bFile&&!this.gettingDiff&&this.plugin.gitManager){this.gettingDiff=!0;try{let i=await this.plugin.gitManager.getDiffString(this.state.bFile,this.state.aRef=="HEAD",this.state.bRef);this.contentEl.empty();let n=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);if(!i){if(this.plugin.gitManager instanceof Se&&await this.plugin.gitManager.isTracked(this.state.bFile))i=[`--- ${this.state.aFile}`,`+++ ${this.state.bFile}`,""].join(`
|
||||
`);else if(await this.app.vault.adapter.exists(n)){let s=await this.app.vault.adapter.read(n);i=[...`--- /dev/null
|
||||
+++ ${this.state.bFile}
|
||||
@@ -0,0 +1,${s.split(`
|
||||
`).length} @@`.split(`
|
||||
`),...s.split(`
|
||||
`).map(o=>`+${o}`)].join(`
|
||||
`)}}if(i){let s=this.parser.parseFromString(zh(i),"text/html").querySelector(".d2h-file-diff");this.contentEl.append(s)}else{let s=this.contentEl.createDiv({cls:"obsidian-git-center"});s.createSpan({text:"\u26A0\uFE0F",attr:{style:"font-size: 2em"}}),s.createEl("br"),s.createSpan({text:"File not found: "+this.state.bFile})}}finally{this.gettingDiff=!1}}}};m();var ts=require("obsidian");var Ul=require("@codemirror/commands");var Xh=require("@codemirror/search"),Hl=require("@codemirror/state"),Yi=require("@codemirror/view");m();var Kh=require("obsidian"),Zw=require("@codemirror/view");function x5(t){return t.selection.ranges.filter(e=>!e.empty).map(e=>t.sliceDoc(e.from,e.to)).join(t.lineBreak)}function E5(t){t.dispatch({...t.state.replaceSelection(""),userEvent:"delete.cut"})}function sP(t,e){t.dispatch({...t.state.replaceSelection(e),scrollIntoView:!0,userEvent:"input.paste"})}async function aP(t){if(!t&&navigator.clipboard.read){let e=await navigator.clipboard.read();for(let r of e)if(r.types.includes("text/html")){let i=await(await r.getType("text/html")).text();return(0,Kh.htmlToMarkdown)(i)}}return navigator.clipboard.readText()}var oP=Zw.EditorView.domEventHandlers({contextmenu(t,e){t.preventDefault();let r=x5(e.state),i=!e.state.readOnly&&e.state.facet(Zw.EditorView.editable),n=Kh.Menu.forEvent(t);return n.addItem(s=>s.setTitle("Cut").setIcon("scissors").setDisabled(!i||r.length===0).onClick(async()=>{await navigator.clipboard.writeText(r),E5(e)})),n.addItem(s=>s.setTitle("Copy").setIcon("copy").setDisabled(r.length===0).onClick(()=>navigator.clipboard.writeText(r))),n.addItem(s=>s.setTitle("Paste").setIcon("clipboard-paste").setDisabled(!i).onClick(async()=>sP(e,await aP(!1)))),n.addItem(s=>s.setTitle("Paste as plain text").setIcon("clipboard-type").setDisabled(!i).onClick(async()=>sP(e,await aP(!0)))),n.addItem(s=>s.setTitle("Select all").setIcon("scan").onClick(()=>e.dispatch({selection:{anchor:0,head:e.state.doc.length}}))),n.showAtMouseEvent(t),!0}});var lP=Yi.EditorView.theme({"& .cm-content":{caretColor:"transparent !important"},"&.cm-focused .cm-cursor, & .cm-dropCursor":{display:"none !important"}}),Ua=class extends ts.ItemView{constructor(r,i){super(r);this.plugin=i;this.refreshing=!1;this.ignoreNextModification=!1;this.navigation=!0,this.registerEvent(this.app.workspace.on("obsidian-git:status-changed",()=>{this.mergeView?this.updateRefEditors().catch(console.error):this.createMergeView().catch(console.error)})),this.intervalRef=window.setInterval(()=>{this.mergeView&&this.updateRefEditors().catch(console.error)},30*1e3),this.registerEvent(this.app.vault.on("modify",n=>{this.state.bRef==null&&n.path===this.state.bFile&&(this.ignoreNextModification?this.ignoreNextModification=!1:this.updateModifiableEditor().catch(console.error))})),this.registerEvent(this.app.vault.on("delete",n=>{this.state.bRef==null&&n.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("create",n=>{this.state.bRef==null&&n.path===this.state.bFile&&this.createMergeView().catch(console.error)})),this.registerEvent(this.app.vault.on("rename",(n,s)=>{this.state.bRef==null&&(n.path===this.state.bFile||s===this.state.bFile)&&this.createMergeView().catch(console.error)})),this.fileSaveDebouncer=(0,ts.debounce)(n=>{let s=this.state.bFile;s&&(this.ignoreNextModification=!0,this.plugin.app.vault.adapter.write(this.plugin.gitManager.getRelativeVaultPath(s),n).catch(a=>this.plugin.displayError(a)))},1e3,!1)}getViewType(){return Os.type}getDisplayText(){var r;if(((r=this.state)==null?void 0:r.bFile)!=null){let i=this.state.bFile.split("/").last();i!=null&&i.endsWith(".md")&&(i=i.slice(0,-3));let n;return this.state.bRef==null?n=" (Working Tree)":this.state.bRef==""?n=" (Index)":n="("+this.state.bRef.substring(0,7)+")",`Diff: ${i} ${n}`}return Os.name}getIcon(){return Os.icon}async setState(r,i){this.state=r,ts.Platform.isMobile&&(this.leaf.view.titleEl.textContent=this.getDisplayText()),await super.setState(r,i),await this.createMergeView()}getState(){return this.state}onClose(){return window.clearInterval(this.intervalRef),super.onClose()}async onOpen(){return await this.createMergeView(),super.onOpen()}async gitShow(r,i){try{return await this.plugin.gitManager.show(r,i,!1)}catch(n){if(n instanceof Br&&(n.message.includes("does not exist")||n.message.includes("unknown revision or path")||n.message.includes("exists on disk, but not in")||n.message.includes("fatal: bad object")))return n.message.includes("fatal: bad object")&&this.plugin.displayError(n.message),"";throw n}}async bShouldBeEditable(){if(this.state.bRef!=null)return!1;let r=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);return await this.app.vault.adapter.exists(r)}async updateModifiableEditor(){if(!this.mergeView||this.refreshing)return;let r=this.mergeView.b;this.refreshing=!0;let i=await this.app.vault.adapter.read(this.state.bFile);if(i!=r.state.doc.toString()){let n=r.state.update({changes:{fro
Line truncated
|
||||
`)+`
|
||||
`;await this.plugin.gitManager.applyPatch(h),this.plugin.app.workspace.trigger("obsidian-git:refresh")},this.state.bRef==null){let s=i.createDiv();s.addClass("clickable-icon"),s.setAttr("aria-label","Reset hunk"),(0,ts.setIcon)(s,"undo"),s.onmousedown=a=>{var d;let o=this.mergeView.a,l=this.mergeView.b,c=kw(l.state),u=(d=i.parentElement)==null?void 0:d.indexOf(i),f=c.chunks[u];if(f){let h=f.fromA,p=f.toA,g=f.fromB,v=f.toB,b=o.state.sliceDoc(h,Math.max(h,p-1));h!=p&&v<=l.state.doc.length&&(b+=o.state.lineBreak),l.dispatch({changes:{from:g,to:Math.min(l.state.doc.length,v),insert:b},userEvent:"revert"})}}}return i.onmousedown=s=>{s.preventDefault(),s.stopPropagation()},i}async createMergeView(){var r,i,n;if((r=this.state)!=null&&r.aFile&&((i=this.state)!=null&&i.bFile)&&!this.refreshing&&this.plugin.gitManager){this.refreshing=!0,(n=this.mergeView)==null||n.destroy();let s=this.containerEl.children[1];s.empty(),this.contentEl.addClass("git-split-diff-view","git-diff"),this.bIsEditable=await this.bShouldBeEditable();let a=await this.gitShow(this.state.aRef,this.state.aFile),o;if(this.state.bRef!=null)o=await this.gitShow(this.state.bRef,this.state.bFile);else{let g=this.plugin.gitManager.getRelativeVaultPath(this.state.bFile);await this.app.vault.adapter.exists(g)?o=await this.app.vault.adapter.read(g):o=""}let l=[(0,Yi.lineNumbers)(),(0,Xh.highlightSelectionMatches)(),(0,Yi.drawSelection)(),Yi.keymap.of([...Ul.standardKeymap,Ul.indentWithTab]),(0,Ul.history)(),(0,Xh.search)(),Yi.EditorView.lineWrapping,oP],c=this,u=Yi.ViewPlugin.define(g=>({update(v){if(v.docChanged&&!v.transactions.some(b=>b.annotation(Hl.Transaction.remote))){let b=g.state.doc.toString();c.fileSaveDebouncer(b)}}})),f={doc:a,extensions:[...l,Hl.EditorState.readOnly.of(!0),lP]},d=[...l];this.bIsEditable?d.push(u):d.push(Hl.EditorState.readOnly.of(!0),lP);let h={doc:o,extensions:d};s.addClasses(["cm-s-obsidian","mod-cm6","markdown-source-view","cm-content"]);let p=this.plugin.gitManager instanceof Se&&(this.state.bRef===void 0||this.state.bRef==="");this.mergeView=new Mh({b:h,a:f,collapseUnchanged:{minSize:6,margin:4},renderRevertControl:p?()=>this.renderButtons(s):void 0,revertControls:p?"a-to-b":void 0,diffConfig:{scanLimit:this.bIsEditable?1e3:1e4},parent:s}),this.refreshing=!1}}};m();var QR=require("obsidian");m();m();m();var cP,uP,fP;typeof window!="undefined"&&((fP=(uP=(cP=window.__svelte)!=null?cP:window.__svelte={}).v)!=null?fP:uP.v=new Set).add("5");m();m();m();var rs={};var Ye=Symbol("uninitialized"),Ti=Symbol("filename");var Qh="http://www.w3.org/1999/xhtml";m();m();m();m();var Jh=!0;m();var D=!1;m();var is=Array.isArray,dP=Array.prototype.indexOf,Ws=Array.prototype.includes,Gl=Array.from,Kw=Object.keys,or=Object.defineProperty,jr=Object.getOwnPropertyDescriptor,Xw=Object.getOwnPropertyDescriptors,Qw=Object.prototype,hP=Array.prototype,jl=Object.getPrototypeOf,Jw=Object.isExtensible;function e0(t){return typeof t=="function"}var lr=()=>{};function ep(t){for(var e=0;e<t.length;e++)t[e]()}function tp(){var t,e,r=new Promise((i,n)=>{t=i,e=n});return{promise:r,resolve:t,reject:e}}m();m();var Jt=Symbol("$state"),Yu=Symbol("legacy props"),mP=Symbol(""),rp=Symbol("proxy path"),ip=Symbol("attributes"),Zu=Symbol("class"),t0=Symbol("style"),Ku=Symbol("text"),Ga=Symbol("form reset"),r0=Symbol("hmr anchor"),ns=new class extends Error{constructor(){super(...arguments);He(this,"name","StaleReactionError");He(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},pP,i0=!!((pP=globalThis.document)!=null&&pP.contentType)&&globalThis.document.contentType.includes("xml");var Vl=3,Pi=8;m();m();function gP(t){if(D){let e=new Error(`invariant_violation
|
||||
An invariant violation occurred, meaning Svelte's internal assumptions were flawed. This is a bug in Svelte, not your app \u2014 please open an issue at https://github.com/sveltejs/svelte, citing the following message: "${t}"
|
||||
https://svelte.dev/e/invariant_violation`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/invariant_violation")}function np(t){if(D){let e=new Error(`lifecycle_outside_component
|
||||
\`${t}(...)\` can only be used during component initialisation
|
||||
https://svelte.dev/e/lifecycle_outside_component`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function wP(){if(D){let t=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/async_derived_orphan")}function n0(){if(D){let t=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/bind_invalid_checkbox_value")}function bP(){if(D){let t=new Error(`derived_references_self
|
||||
A derived value cannot reference itself recursively
|
||||
https://svelte.dev/e/derived_references_self`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/derived_references_self")}function s0(t,e,r){if(D){let i=new Error(`each_key_duplicate
|
||||
${r?`Keyed each block has duplicate key \`${r}\` at indexes ${t} and ${e}`:`Keyed each block has duplicate key at indexes ${t} and ${e}`}
|
||||
https://svelte.dev/e/each_key_duplicate`);throw i.name="Svelte error",i}else throw new Error("https://svelte.dev/e/each_key_duplicate")}function _P(t,e,r){if(D){let i=new Error(`each_key_volatile
|
||||
Keyed each block has key that is not idempotent \u2014 the key for item at index ${t} was \`${e}\` but is now \`${r}\`. Keys must be the same each time for a given item
|
||||
https://svelte.dev/e/each_key_volatile`);throw i.name="Svelte error",i}else throw new Error("https://svelte.dev/e/each_key_volatile")}function yP(t){if(D){let e=new Error(`effect_in_teardown
|
||||
\`${t}\` cannot be used inside an effect cleanup function
|
||||
https://svelte.dev/e/effect_in_teardown`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_in_teardown")}function xP(){if(D){let t=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function EP(t){if(D){let e=new Error(`effect_orphan
|
||||
\`${t}\` can only be used inside an effect (e.g. during component initialisation)
|
||||
https://svelte.dev/e/effect_orphan`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/effect_orphan")}function SP(){if(D){let t=new Error(`effect_update_depth_exceeded
|
||||
Maximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state
|
||||
https://svelte.dev/e/effect_update_depth_exceeded`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function kP(){if(D){let t=new Error(`hydration_failed
|
||||
Failed to hydrate the application
|
||||
https://svelte.dev/e/hydration_failed`);throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/hydration_failed")}function CP(t){if(D){let e=new Error(`props_invalid_value
|
||||
Cannot do \`bind:${t}={undefined}\` when \`${t}\` has a fallback value
|
||||
https://svelte.dev/e/props_invalid_value`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/props_invalid_value")}function AP(t){if(D){let e=new Error(`rune_outside_svelte
|
||||
The \`${t}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files
|
||||
https://svelte.dev/e/rune_outside_svelte`);throw e.name="Svelte error",e}else throw new Error("https://svelte.dev/e/rune_outside_svelte")}function TP(){if(D){let t=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function PP(){if(D){let t=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_prototype_fixed")}function RP(){if(D){let t=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function $P(){if(D){let t=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw t.name="Svelte error",t}else throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}m();m();m();var An="font-weight: bold",Tn="font-weight: normal";function FP(t){D?console.warn(`%c[svelte] await_reactivity_loss
|
||||
%cDetected reactivity loss when reading \`${t}\`. This happens when state is read in an async function after an earlier \`await\`
|
||||
https://svelte.dev/e/await_reactivity_loss`,An,Tn):console.warn("https://svelte.dev/e/await_reactivity_loss")}function IP(t,e){D?console.warn(`%c[svelte] await_waterfall
|
||||
%cAn async derived, \`${t}\` (${e}) was not read immediately after it resolved. This often indicates an unnecessary waterfall, which can slow down your app
|
||||
https://svelte.dev/e/await_waterfall`,An,Tn):console.warn("https://svelte.dev/e/await_waterfall")}function MP(){D?console.warn(`%c[svelte] derived_inert
|
||||
%cReading a derived belonging to a now-destroyed effect may result in stale values
|
||||
https://svelte.dev/e/derived_inert`,An,Tn):console.warn("https://svelte.dev/e/derived_inert")}function DP(t,e,r){D?console.warn(`%c[svelte] hydration_attribute_changed
|
||||
%cThe \`${t}\` attribute on \`${e}\` changed its value between server and client renders. The client value, \`${r}\`, will be ignored in favour of the server value
|
||||
https://svelte.dev/e/hydration_attribute_changed`,An,Tn):console.warn("https://svelte.dev/e/hydration_attribute_changed")}function ja(t){D?console.warn(`%c[svelte] hydration_mismatch
|
||||
%c${t?`Hydration failed because the initial UI does not match what was rendered on the server. The error occurred near ${t}`:"Hydration failed because the initial UI does not match what was rendered on the server"}
|
||||
https://svelte.dev/e/hydration_mismatch`,An,Tn):console.warn("https://svelte.dev/e/hydration_mismatch")}function OP(){D?console.warn(`%c[svelte] lifecycle_double_unmount
|
||||
%cTried to unmount a component that was not mounted
|
||||
https://svelte.dev/e/lifecycle_double_unmount`,An,Tn):console.warn("https://svelte.dev/e/lifecycle_double_unmount")}function sp(t){D?console.warn(`%c[svelte] state_proxy_equality_mismatch
|
||||
%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${t}\` will produce unexpected results
|
||||
https://svelte.dev/e/state_proxy_equality_mismatch`,An,Tn):console.warn("https://svelte.dev/e/state_proxy_equality_mismatch")}function LP(){D?console.warn(`%c[svelte] state_proxy_unmount
|
||||
%cTried to unmount a state proxy, rather than a component
|
||||
https://svelte.dev/e/state_proxy_unmount`,An,Tn):console.warn("https://svelte.dev/e/state_proxy_unmount")}function NP(){D?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",An,Tn):console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function BP(t){D?console.warn(`%c[svelte] transition_slide_display
|
||||
%cThe \`slide\` transition does not work correctly for elements with \`display: ${t}\`
|
||||
https://svelte.dev/e/transition_slide_display`,An,Tn):console.warn("https://svelte.dev/e/transition_slide_display")}var ne=!1;function Mt(t){ne=t}var we;function ze(t){if(t===null)throw ja(),rs;return we=t}function cr(){return ze(tr(we))}function V(t){if(ne){if(tr(we)!==null)throw ja(),rs;we=t}}function Va(t=1){if(ne){for(var e=t,r=we;e--;)r=tr(r);we=r}}function Pn(t=!0){for(var e=0,r=we;;){if(r.nodeType===Pi){var i=r.data;if(i==="]"){if(e===0)return r;e-=1}else(i==="["||i==="[!"||i[0]==="["&&!isNaN(Number(i.slice(1))))&&(e+=1)}var n=tr(r);t&&r.remove(),r=n}}function Qu(t){if(!t||t.nodeType!==Pi)throw ja(),rs;return t.data}m();m();m();m();function ap(t){return t===this.v}function a0(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function op(t){return!a0(t,this.v)}m();var At=!1,ss=!1,Zi=!1;m();m();m();var Ju=null;function ur(t,e){return t.label=e,cp(t.v,e),t}function cp(t,e){var r;return(r=t==null?void 0:t[rp])==null||r.call(t,e),t}m();function Ki(t){let e=new Error,r=k5();return r.length===0?null:(r.unshift(`
|
||||
`),or(e,"stack",{value:r.join(`
|
||||
`)}),or(e,"name",{value:t}),e)}function k5(){let t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let e=new Error().stack;if(Error.stackTraceLimit=t,!e)return[];let r=e.split(`
|
||||
`),i=[];for(let n=0;n<r.length;n++){let s=r[n],a=s.replaceAll("\\","/");if(s.trim()!=="Error"){if(s.includes("validate_each_keys"))return[];a.includes("svelte/src/internal")||a.includes("node_modules/.vite")||i.push(s)}}return i}function UP(t,e){if(!D)throw new Error("invariant(...) was not guarded by if (DEV)");t||gP(e)}m();var ye=null;function as(t){ye=t}var Rn=null;function ql(t){Rn=t}var Xi=null;function up(t){Xi=t}function lt(t,e=!1,r){ye={p:ye,i:!1,c:null,e:null,s:t,x:null,r:Q,l:ss&&!e?{s:null,u:null,$:[]}:null},D&&(ye.function=r,Xi=r)}function ct(t){var n;var e=ye,r=e.e;if(r!==null){e.e=null;for(var i of r)o0(i)}return t!==void 0&&(e.x=t),e.i=!0,ye=e.p,D&&(Xi=(n=ye==null?void 0:ye.function)!=null?n:null),t!=null?t:{}}function $n(){return!ss||ye!==null&&ye.l===null}m();m();var za=[];function GP(){var t=za;za=[],ep(t)}function Et(t){if(za.length===0&&!Wa){var e=za;queueMicrotask(()=>{e===za&&GP()})}za.push(t)}function jP(){for(;za.length>0;)GP()}m();var l0=new WeakMap;function fp(t){var e=Q;if(e===null)return ae.f|=8388608,t;if(D&&t instanceof Error&&!l0.has(t)&&l0.set(t,C5(t,e)),(e.f&32768)===0&&(e.f&4)===0)throw D&&!e.parent&&t instanceof Error&&VP(t),t;Ji(t,e)}function Ji(t,e){if(!(e!==null&&(e.f&16384)!==0)){for(;e!==null;){if((e.f&128)!==0){if((e.f&32768)===0)throw t;try{e.b.error(t);return}catch(r){t=r}}e=e.parent}throw D&&t instanceof Error&&VP(t),t}}function C5(t,e){var a,o,l;let r=jr(t,"message");if(!(r&&!r.configurable)){for(var i=tf?" ":" ",n=`
|
||||
${i}in ${((a=e.fn)==null?void 0:a.name)||"<unknown>"}`,s=e.ctx;s!==null;)n+=`
|
||||
${i}in ${(o=s.function)==null?void 0:o[Ti].split("/").pop()}`,s=s.p;return{message:t.message+`
|
||||
${n}
|
||||
`,stack:(l=t.stack)==null?void 0:l.split(`
|
||||
`).filter(c=>!c.includes("svelte/src/internal")).join(`
|
||||
`)}}}function VP(t){let e=l0.get(t);e&&(or(t,"message",{value:e.message}),or(t,"stack",{value:e.stack}))}m();m();var A5=-7169;function Ue(t,e){t.f=t.f&A5|e}function Yl(t){(t.f&512)!==0||t.deps===null?Ue(t,1024):Ue(t,4096)}function zP(t){if(t!==null)for(let e of t)(e.f&2)===0||(e.f&65536)===0||(e.f^=65536,zP(e.deps))}function dp(t,e,r){(t.f&2048)!==0?e.add(t):(t.f&4096)!==0&&r.add(t),zP(t.deps),Ue(t,1024)}m();m();m();var WP=!1,hp=!1;function c0(t){var e=hp;try{return hp=!1,[t(),hp]}finally{hp=e}}m();m();m();m();function u0(t){ne&&nr(t)!==null&&Kl(t)}var qP=!1;function f0(){qP||(qP=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(let r of t.target.elements)(e=r[Ga])==null||e.call(r)})},{capture:!0}))}function zr(t){var e=ae,r=Q;Lt(null),Nt(null);try{return t()}finally{Lt(e),Nt(r)}}function d0(t,e,r,i=r){t.addEventListener(e,()=>zr(r));let n=t[Ga];n?t[Ga]=()=>{n(),i(!0)}:t[Ga]=()=>i(!0),f0()}m();m();m();function YP(t){let e=0,r=dr(0),i;return D&&ur(r,"createSubscriber version"),()=>{qs()&&(F(r),sr(()=>(e===0&&(i=Ze(()=>t(()=>Za(r)))),e+=1,()=>{Et(()=>{e-=1,e===0&&(i==null||i(),i=void 0,Za(r))})})))}}var P5=589824;function w0(t,e,r,i){new h0(t,e,r,i)}var ii,rf,Fi,Ka,Wr,Ii,Sr,ni,ls,Xa,Ys,Xl,nf,sf,Fn,gp,We,KP,XP,p0,QP,m0,pp,mp,g0,v0,h0=class{constructor(e,r,i,n){me(this,We);He(this,"parent");He(this,"is_pending",!1);He(this,"transform_error");me(this,ii);me(this,rf,ne?we:null);me(this,Fi);me(this,Ka);me(this,Wr);me(this,Ii,null);me(this,Sr,null);me(this,ni,null);me(this,ls,null);me(this,Xa,0);me(this,Ys,0);me(this,Xl,!1);me(this,nf,new Set);me(this,sf,new Set);me(this,Fn,null);me(this,gp,YP(()=>(fe(this,Fn,dr($(this,Xa))),D&&ur($(this,Fn),"$effect.pending()"),()=>{fe(this,Fn,null)})));var s,a;fe(this,ii,e),fe(this,Fi,r),fe(this,Ka,o=>{var l=Q;l.b=this,l.f|=128,i(o)}),this.parent=Q.b,this.transform_error=(a=n!=null?n:(s=this.parent)==null?void 0:s.transform_error)!=null?a:(o=>o),fe(this,Wr,ai(()=>{if(ne){let o=$(this,rf);cr();let l=o.data==="[!";if(o.data.startsWith("[?")){let u=JSON.parse(o.data.slice("[?".length));Ee(this,We,XP).call(this,u)}else l?Ee(this,We,QP).call(this):Ee(this,We,KP).call(this)}else Ee(this,We,m0).call(this)},P5)),ne&&fe(this,ii,we)}defer_effect(e){dp(e,$(this,nf),$(this,sf))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!$(this,Fi).pending}update_pending_count(e,r){Ee(this,We,g0).call(this,e,r),fe(this,Xa,$(this,Xa)+e),!(!$(this,Fn)||$(this,Xl))&&(fe(this,Xl,!0),Et(()=>{fe(this,Xl,!1),$(this,Fn)&&en($(this,Fn),$(this,Xa))}))}get_effect_pending(){return $(this,gp).call(this),F($(this,Fn))}error(e){var r;if(!$(this,Fi).onerror&&!$(this,Fi).failed)throw e;(r=oe)!=null&&r.is_fork?($(this,Ii)&&oe.skip_effect($(this,Ii)),$(this,Sr)&&oe.skip_effect($(this,Sr)),$(this,ni)&&oe.skip_effect($(this,ni)),oe.oncommit(()=>{Ee(this,We,v0).call(this,e)})):Ee(this,We,v0).call(this,e)}};ii=new WeakMap,rf=new WeakMap,Fi=new WeakMap,Ka=new WeakMap,Wr=new WeakMap,Ii=new WeakMap,Sr=new WeakMap,ni=new WeakMap,ls=new WeakMap,Xa=new WeakMap,Ys=new WeakMap,Xl=new WeakMap,nf=new WeakMap,sf=new WeakMap,Fn=new WeakMap,gp=new WeakMap,We=new WeakSet,KP=function(){try{fe(this,Ii,Bt(()=>$(this,Ka).call(this,$(this,ii))))}catch(e){this.error(e)}},XP=function(e){let r=$(this,Fi).failed,{reset:i,invoke_onerror:n}=Ee(this,We,p0).call(this,e);Et(n),r&&fe(this,ni,Bt(()=>{r($(this,ii),()=>e,()=>i)}))},p0=function(e){var r=!1,i=!1;let n=()=>{if(r){NP();return}r=!0,i&&$P(),$(this,ni)!==null&&In($(this,ni),()=>{fe(this,ni,null)}),Ee(this,We,mp).call(this,()=>{Ee(this,We,m0).call(this)})};return{reset:n,invoke_onerror:()=>{var a,o;try{i=!0,(o=(a=$(this,Fi)).onerror)==null||o.call(a,e,n),i=!1}catch(l){Ji(l,$(this,Wr)&&$(this,Wr).parent)}}}},QP=function(){let e=$(this,Fi).pending;e&&(this.is_pending=!0,fe(this,Sr,Bt(()=>e($(this,ii)))),Et(()=>{var r=fe(this,ls,document.createDocumentFragment()),i=Ht();r.append(i),fe(this,Ii,Ee(this,We,mp).call(this,()=>Bt(()=>$(this,Ka).call(this,i)))),$(this,Ys)===0&&($(this,ii).before(r),fe(this,ls,null),In($(this,Sr),()=>{fe(this,Sr,null)}),Ee(this,We,pp).call(this,oe))}))},m0=function(){try{if(this.is_pending=this.has_pending_snippet(),fe(this,Ys,0),fe(this,Xa,0),fe(this,Ii,Bt(()=>{$(this,Ka).call(this,$(this,ii))})),$(this,Ys)>0){var e=fe(this,ls,document.createDocumentFragment());Ql($(this,Ii),e);let r=$(this,Fi).pending;fe(this,Sr,Bt(()=>r($(this,ii))))}else Ee(this,We,pp).call(this,oe)}catch(r){this.error(r)}},pp=function(e){this.is_pending=!1,e.transfer_effects($(this,nf),$(this,sf))},mp=function(e){var r=Q,i=ae,n=ye;Nt($(this,Wr)),Lt($(this,Wr)),as($(this,Wr).ctx);try{return si.ensure(),e()}catch(s){return fp(s),null}finally{Nt(r),Lt(i),as(n)}},g0=function(e,r){var i;if(!this.has_pending_snippet()){this.parent&&Ee(i=this.parent,We,g0).call(i,e,r);return}fe(this,Ys,$(this,Ys)+e),$(this,Ys)===0&&(Ee(this,We,pp).call(this,r),$(this,Sr)&&In($(this,Sr),()=>{fe(this,Sr,null)}),$(this
Line truncated
|
||||
`).some(l=>l.startsWith("https://svelte.dev/e/")))throw o;return o!==rs&&console.warn("Failed to hydrate: ",o),e.recover===!1&&kP(),kp(),Kl(r),Mt(!1),Js(t,e)}finally{Mt(i),ze(n)}}var Fp=new Map;function OR(t,{target:e,anchor:r,props:i={},events:n,context:s,intro:a=!0,transformError:o}){kp();var l=void 0,c=yR(()=>{var u=r!=null?r:e.appendChild(Ht());w0(u,{pending:()=>{}},h=>{lt({});var p=ye;if(s&&(p.c=s),n&&(i.$$events=n),ne&&rn(h,null),Ip=a,l=t(h,i)||{},Ip=!0,ne&&(Q.nodes.end=we,we===null||we.nodeType!==Pi||we.data!=="]"))throw ja(),rs;ct()},o);var f=new Set,d=h=>{for(var p=0;p<h.length;p++){var g=h[p];if(!f.has(g)){f.add(g);var v=DR(g);for(let C of[e,document]){var b=Fp.get(C);b===void 0&&(b=new Map,Fp.set(C,b));var _=b.get(g);_===void 0?(C.addEventListener(g,$p,{passive:v}),b.set(g,1)):b.set(g,_+1)}}}};return d(Gl(N0)),Rp.add(d),()=>{var v;for(var h of f)for(let b of[e,document]){var p=Fp.get(b),g=p.get(h);--g==0?(b.removeEventListener(h,$p),p.delete(h),p.size===0&&Fp.delete(b)):p.set(h,g)}Rp.delete(d),u!==r&&((v=u.parentNode)==null||v.removeChild(u))}});return G0.set(l,c),l}var G0=new WeakMap;function gs(t,e){let r=G0.get(t);return r?(G0.delete(t),r(e)):(D&&(Jt in t?LP():OP()),Promise.resolve())}m();m();m();var nn,Nn,fi,lo,mf,gf,Mp,vs=class{constructor(e,r=!0){He(this,"anchor");me(this,nn,new Map);me(this,Nn,new Map);me(this,fi,new Map);me(this,lo,new Set);me(this,mf,!0);me(this,gf,e=>{if($(this,nn).has(e)){var r=$(this,nn).get(e),i=$(this,Nn).get(r);if(i)fc(i),$(this,lo).delete(r);else{var n=$(this,fi).get(r);n&&(fc(n.effect),$(this,Nn).set(r,n.effect),$(this,fi).delete(r),D&&(n.fragment.lastChild[r0]=this.anchor),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),i=n.effect)}for(let[s,a]of $(this,nn)){if($(this,nn).delete(s),s===e)break;let o=$(this,fi).get(a);o&&(vt(o.effect),$(this,fi).delete(a))}for(let[s,a]of $(this,Nn)){if(s===r||$(this,lo).has(s))continue;let o=()=>{if(Array.from($(this,nn).values()).includes(s)){var c=document.createDocumentFragment();Ql(a,c),c.append(Ht()),$(this,fi).set(s,{effect:a,fragment:c})}else vt(a);$(this,lo).delete(s),$(this,Nn).delete(s)};$(this,mf)||!i?($(this,lo).add(s),In(a,o,!1)):o()}}});me(this,Mp,e=>{$(this,nn).delete(e);let r=Array.from($(this,nn).values());for(let[i,n]of $(this,fi))r.includes(i)||(vt(n.effect),$(this,fi).delete(i))});this.anchor=e,fe(this,mf,r)}ensure(e,r){var i=oe,n=Cp();if(r&&!$(this,Nn).has(e)&&!$(this,fi).has(e))if(n){var s=document.createDocumentFragment(),a=Ht();s.append(a),$(this,fi).set(e,{effect:Bt(()=>r(a)),fragment:s})}else $(this,Nn).set(e,Bt(()=>r(this.anchor)));if($(this,nn).set(i,e),n){for(let[o,l]of $(this,Nn))o===e?i.unskip_effect(l):i.skip_effect(l);for(let[o,l]of $(this,fi))o===e?i.unskip_effect(l.effect):i.skip_effect(l.effect);i.oncommit($(this,gf)),i.ondiscard($(this,Mp))}else ne&&(this.anchor=we),$(this,gf).call(this,i)}};nn=new WeakMap,Nn=new WeakMap,fi=new WeakMap,lo=new WeakMap,mf=new WeakMap,gf=new WeakMap,Mp=new WeakMap;if(D){let t=function(e){if(!(e in globalThis)){let r;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(r!==void 0)return r;AP(e)},set:i=>{r=i}})}};t("$state"),t("$effect"),t("$derived"),t("$inspect"),t("$props"),t("$bindable")}function co(t){ye===null&&np("onMount"),ss&&ye.l!==null?X5(ye).m.push(t):hr(()=>{let e=Ze(t);if(typeof e=="function")return e})}function X5(t){var r;var e=t.l;return(r=e.u)!=null?r:e.u={a:[],b:[],m:[]}}m();m();var BR=new Map;function HR(t,e){var r=BR.get(t);r||(r=new Set,BR.set(t,r)),r.add(e)}m();m();m();m();m();m();m();m();m();function Re(t,e,r=!1){var i;ne&&(i=we,cr());var n=new vs(t),s=r?65536:0;function a(o,l){if(ne){var c=Qu(i);if(o!==parseInt(c.substring(1))){var u=Pn();ze(u),n.anchor=u,Mt(!1),n.ensure(o,l),Mt(!0);return}}n.ensure(o,l)}ai(()=>{var o=!1;e((l,c=0)=>{o=!0,a(c,l)}),o||a(-1,null)},s)}m();m();m();function di(t,e){return e}function sU(t,e,r){var f;for(var i=[],n=e.length,s,a=e.length,o=0;o<n;o++){let d=e[o];In(d,()=>{if(s){if(s.pending.delete(d),s.done.add(d),s.pending.size===0){var h=t.outrogroups;V0(t,Gl(s.done)),h.delete(s),h.size===0&&(t.outrogroups=null)}}else a-=1},!1)}if(a===0){var l=i.length===0&&r!==null;if(l){var c=r,u=c.parentNode;Kl(u),u.append(c),t.items.clear()}V0(t,e,!l)}else s={pending:new Set(e),done:new Set},((f=t.outrogroups)!=null?f:t.outrogroups=new Set).add(s)}function V0(t,e,r=!0){var i;if(t.pending.size>0){i=new Set;for(let a of t.pending.values())for(let o of a)i.add(t.items.get(o).e)}for(var n=0;n<e.length;n++){var s=e[n];if(i!=null&&i.has(s)){s.f|=33554432;let a=document.createDocumentFragment();Ql(s,a)}else vt(e[n],r)}}var dc;function hi(t,e,r,i,n,s=null){var a=t,o=new Map,l=(e&4)!==0;if(l){var c=t;a=ne?ze(nr(c)):c.appendChild(Ht())}ne&&cr();var u=null,f=Qa(()=>{var C=r();return is(C)?C:C==null?[]:Gl(C)});D&&ur(f,"{#each ...}");var d,h=new Map,p=!0;function g(C){(_.effect.f&16384)===0&&(_.pending.delete(C),_.fallback=u,aU(_,d,a,e,i),u!==null&&(d.length===0?(u.f&33554432)===0?fc(u):(u.f^=33554432,wf(u,null,a)):
Line truncated
|
||||
\r\f\xA0\v\uFEFF`];function qR(t,e,r){var i=t==null?"":""+t;if(e&&(i=i?i+" "+e:e),r){for(var n of Object.keys(r))if(r[n])i=i?i+" "+n:n;else if(i.length)for(var s=n.length,a=0;(a=i.indexOf(n,a))>=0;){var o=a+s;(a===0||WR.includes(i[a-1]))&&(o===i.length||WR.includes(i[o]))?i=(a===0?"":i.substring(0,a))+i.substring(o+1):a=o}}return i===""?null:i}m();function wt(t,e,r,i,n,s){var a=t[Zu];if(ne||a!==r||a===void 0){var o=qR(r,i,s);(!ne||o!==t.getAttribute("class"))&&(o==null?t.removeAttribute("class"):e?t.className=o:t.setAttribute("class",o)),t[Zu]=r}else if(s&&n!==s)for(var l in s){var c=!!s[l];(n==null||c!==!!n[l])&&t.classList.toggle(l,c)}return s}m();m();var xU=Symbol("is custom element"),EU=Symbol("is html"),SU=i0?"link":"LINK";function Ce(t,e,r,i){var n=kU(t);if(ne&&(n[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName===SU)){i||AU(t,e,r!=null?r:"");return}n[e]!==(n[e]=r)&&(e==="loading"&&(t[mP]=r),r==null?t.removeAttribute(e):typeof r!="string"&&CU(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function kU(t){var e,r;return(r=t[e=ip])!=null?r:t[e]={[xU]:t.nodeName.includes("-"),[EU]:t.namespaceURI===Qh}}var YR=new Map;function CU(t){var e=t.getAttribute("is")||t.nodeName,r=YR.get(e);if(r)return r;YR.set(e,r=[]);for(var i,n=t,s=Element.prototype;s!==n;){i=Xw(n);for(var a in i)i[a].set&&a!=="innerHTML"&&a!=="textContent"&&a!=="innerText"&&r.push(a);n=jl(n)}return r}function AU(t,e,r){var i;D&&(e==="srcset"&&TU(t,r)||W0((i=t.getAttribute(e))!=null?i:"",r)||DP(e,t.outerHTML.replace(t.innerHTML,t.innerHTML&&"..."),String(r)))}function W0(t,e){return t===e?!0:new URL(t,document.baseURI).href===new URL(e,document.baseURI).href}function ZR(t){return t.split(",").map(e=>e.trim().split(" ").filter(Boolean))}function TU(t,e){var r=ZR(t.srcset),i=ZR(e);return i.length===r.length&&i.every(([n,s],a)=>s===r[a][1]&&(W0(r[a][0],n)||W0(n,r[a][0])))}m();m();m();function Z0(t,e,r=e){var i=new WeakSet;d0(t,"input",async n=>{D&&t.type==="checkbox"&&n0();var s=n?t.defaultValue:t.value;if(s=q0(t)?Y0(s):s,r(s),oe!==null&&i.add(oe),await Pp(),s!==(s=e())){var a=t.selectionStart,o=t.selectionEnd,l=t.value.length;if(t.value=s!=null?s:"",o!==null){var c=t.value.length;a===o&&o===l&&c>l?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=a,t.selectionEnd=Math.min(o,c))}}}),(ne&&t.defaultValue!==t.value||Ze(e)==null&&t.value)&&(r(q0(t)?Y0(t.value):t.value),oe!==null&&i.add(oe)),sr(()=>{D&&t.type==="checkbox"&&n0();var n=e();if(t===document.activeElement){var s=At?us:oe;if(i.has(s))return}q0(t)&&n===Y0(t.value)||t.type==="date"&&!n&&!t.value||n!==t.value&&(t.value=n!=null?n:"")})}function q0(t){var e=t.type;return e==="number"||e==="range"}function Y0(t){return t===""?null:+t}m();m();m();m();m();function K0(t,e){return t===e||(t==null?void 0:t[Jt])===e}function at(t={},e,r,i){var n=ye.r,s=Q;return Kr(()=>{var a,o;return sr(()=>{a=o,o=(i==null?void 0:i())||[],Ze(()=>{K0(r(...o),t)||(e(t,...o),a&&K0(r(...a),t)&&e(null,...a))})}),()=>{let l=s;for(;l!==n&&l.parent!==null&&l.parent.f&33554432;)l=l.parent;let c=()=>{o&&K0(r(...o),t)&&e(null,...o)},u=l.teardown;l.teardown=()=>{c(),u==null||u()}}}),t}m();m();m();m();m();m();function Di(t,e,r,i){var x,S;var n=!ss||(r&2)!==0,s=(r&8)!==0,a=(r&16)!==0,o=i,l=!0,c=void 0,u=()=>a&&n?(c!=null||(c=Zs(i)),F(c)):(l&&(l=!1,o=a?Ze(i):i),o);let f;if(s){var d=Jt in t||Yu in t;f=(S=(x=jr(t,e))==null?void 0:x.set)!=null?S:d&&e in t?A=>t[e]=A:void 0}var h,p=!1;s?[h,p]=c0(()=>t[e]):h=t[e],h===void 0&&i!==void 0&&(h=u(),f&&(n&&CP(e),f(h)));var g;if(n?g=()=>{var A=t[e];return A===void 0?u():(l=!0,A)}:g=()=>{var A=t[e];return A!==void 0&&(o=void 0),A===void 0?o:A},n&&(r&4)===0)return g;if(f){var v=t.$$legacy;return(function(A,w){return arguments.length>0?((!n||!w||v||p)&&f(w?g():A),A):g()})}var b=!1,_=((r&1)!==0?Zs:Qa)(()=>(b=!1,g()));D&&(_.label=e),s&&F(_);var C=Q;return(function(A,w){if(arguments.length>0){let E=w?F(_):n&&s?et(A):A;return se(_,E),b=!0,o!==void 0&&(o=E),A}return oi&&b||(C.f&16384)!==0?_.v:F(_)})}m();m();m();function XR(t){return new Q0(t)}var ws,Oi,Q0=class{constructor(e){me(this,ws);me(this,Oi);var s,a;var r=new Map,i=(o,l)=>{var c=qa(l,!1,!1);return r.set(o,c),c};let n=new Proxy({...e.props||{},$$events:{}},{get(o,l){var c;return F((c=r.get(l))!=null?c:i(l,Reflect.get(o,l)))},has(o,l){var c;return l===Yu?!0:(F((c=r.get(l))!=null?c:i(l,Reflect.get(o,l))),Reflect.has(o,l))},set(o,l,c){var u;return se((u=r.get(l))!=null?u:i(l,c),c),Reflect.set(o,l,c)}});fe(this,Oi,(e.hydrate?j0:Js)(e.component,{target:e.target,anchor:e.anchor,props:n,context:e.context,intro:(s=e.intro)!=null?s:!1,recover:e.recover,transformError:e.transformError})),!At&&(!((a=e==null?void 0:e.props)!=null&&a.$$host)||e.sync===!1)&&io(),fe(this,ws,n.$$events);for(let o of Object.keys($(this,Oi)))o==="$set"||o==="$destroy"||o==="$on"||or(this,o,{get(){return $(this,Oi)[o]},set(l){$(this,Oi)[o]=l},enumerable:!0});$(this,Oi).$set=o=>{Object.assign(n,o)},$(this,Oi).$destroy=()=>{gs($(this,Oi))}}$set(e){$(this,Oi).$set(
Line truncated
|
||||
`:""}${(E=e.log.author)==null?void 0:E.name}
|
||||
${(0,tb.moment)(e.log.date).format(e.plugin.settings.commitDateFormat)}
|
||||
${e.log.message}`}]),ve("click",u,()=>se(n,!F(n))),le(t,o),ct()}Pt(["click"]);var nG=_e('<div class="tree-item nav-folder mod-root"></div>'),sG=_e('<main class="git-view"><div class="nav-header"><div class="nav-buttons-container"><div id="layoutChange" class="clickable-icon nav-action-button" aria-label="Change Layout"></div> <div id="refresh" data-icon="refresh-cw" aria-label="Refresh"></div></div></div> <div class="nav-files-container" style="position: relative;"><!> <div id="sentinel"></div> <div style="margin-bottom:40px"></div></div></main>'),aG={hash:"svelte-12n6twc",code:""};function nb(t,e){lt(e,!0),on(t,aG);let r=Di(e,"plugin",15),i=Oe(!1),n=et([]),s=Oe(void 0),a=Oe(et(r().settings.treeStructure)),o;hr(()=>{o&&o.empty()}),co(()=>{e.view.registerEvent(e.view.app.workspace.on("obsidian-git:head-change",()=>{c().catch(console.error)}))}),hr(()=>{n.forEach(x=>(0,ib.setIcon)(x,x.getAttr("data-icon")))}),co(()=>{let x=new IntersectionObserver(A=>{var w;(w=A[0])!=null&&w.isIntersecting&&!F(i)&&u().catch(console.error)}),S=activeDocument.querySelector("#sentinel");return S&&x.observe(S),()=>{x.disconnect()}}),c().catch(console.error);function l(){c().catch(console.error)}async function c(){var A,w;if(!r().gitReady){se(s,void 0);return}se(i,!0);let x=r().gitManager instanceof Se,S;((w=(A=F(s))==null?void 0:A.length)!=null?w:0)==0?S=x?50:10:S=F(s).length,se(s,await r().gitManager.log(void 0,!1,S),!0),se(i,!1)}async function u(){var w;if(!r().gitReady||F(s)===void 0)return;se(i,!0);let S=r().gitManager instanceof Se?50:10,A=await r().gitManager.log(void 0,!1,S,(w=F(s).last())==null?void 0:w.hash);F(s).push(...A.slice(1)),se(i,!1)}var f=sG(),d=z(f),h=z(d),p=z(h);at(p,x=>n[0]=x,()=>n==null?void 0:n[0]);var g=ie(p,2);let v;at(g,x=>n[1]=x,()=>n==null?void 0:n[1]),V(h),V(d);var b=ie(d,2),_=z(b);{var C=x=>{var S=nG();hi(S,21,()=>F(s),di,(A,w)=>{rb(A,{get view(){return e.view},get showTree(){return F(a)},get log(){return F(w)},get plugin(){return r()}})}),V(S),le(x,S)};Re(_,x=>{F(s)&&x(C)})}Va(4),V(b),V(f),je(()=>{Ce(p,"data-icon",F(a)?"list":"folder"),v=wt(g,1,"clickable-icon nav-action-button",null,v,{loading:F(i)})}),ve("click",p,()=>{se(a,!F(a)),(0,ib.setIcon)(n[0],F(a)?"list":"folder"),r(r().settings.treeStructure=F(a),!0),r().saveSettings()}),ve("click",g,l),le(t,f),ct()}Pt(["click"]);var yf=class extends QR.ItemView{constructor(e,r){super(e),this.plugin=r,this.hoverPopover=null}getViewType(){return wi.type}getDisplayText(){return wi.name}getIcon(){return wi.icon}onClose(){return this._view&&gs(this._view),super.onClose()}reload(){this._view&&gs(this._view),this._view=Js(nb,{target:this.contentEl,props:{plugin:this.plugin,view:this}})}onOpen(){return this.reload(),super.onOpen()}};m();var JR=require("obsidian"),Np=class extends JR.FuzzySuggestModal{constructor(r,i){super(r.app);this.branches=i;this.setPlaceholder("Select branch to checkout")}getItems(){return this.branches}getItemText(r){return r}onChooseItem(r,i){this.resolve(r)}openAndGetReslt(){return new Promise(r=>{this.resolve=r,this.open()})}onClose(){new Promise(r=>window.setTimeout(r,10)).then(()=>{this.resolve&&this.resolve(void 0)})}};m();var r$=require("obsidian");m();var ho=require("obsidian");m();var xf=require("obsidian");m();var e$=require("obsidian");var hc=class extends e$.Modal{constructor({app:r,path:i,filesToDeleteCount:n,filesToDiscardCount:s}){super(r);this.resolve=null;this.path=i,this.deleteCount=n,this.discardCount=s}openAndGetResult(){return this.open(),new Promise(r=>{this.resolve=r})}onOpen(){let r=this.deleteCount+this.discardCount,{contentEl:i,titleEl:n}=this,s="";this.path!=""&&(r>1?s=`files in "${this.path}"`:s=`"${this.path}"`),n.setText(`${this.discardCount==0?"Delete":"Discard"} ${s}`),this.deleteCount>0&&i.createEl("p").setText(`Are you sure you want to DELETE the ${wu(this.deleteCount,"untracked file")}? They are deleted according to your Obsidian trash settting.`),this.discardCount>0&&i.createEl("p").setText(`Are you sure you want to discard ALL changes in ${wu(this.discardCount,"tracked file")}?`);let a=i.createDiv({cls:"modal-button-container"});if(this.deleteCount>0){let l=a.createEl("button",{cls:"mod-warning",text:`${this.discardCount>0?"Discard":"Delete"} all ${wu(r,"file")}`});l.addEventListener("click",()=>{this.resolve&&this.resolve("delete"),this.close()}),l.addEventListener("keypress",()=>{this.resolve&&this.resolve("delete"),this.close()})}if(this.discardCount>0){let l=a.createEl("button",{cls:"mod-warning",text:`Discard all ${wu(this.discardCount,"tracked file")}`});l.addEventListener("click",()=>{this.resolve&&this.resolve("discard"),this.close()}),l.addEventListener("keypress",()=>{this.resolve&&this.resolve("discard"),this.close()})}let o=a.createEl("button",{text:"Cancel"});o.addEventListener("click",()=>(this.resolve&&this.resolve(!1),this.close())),o.addEventListener("keypress",()=>(this.resolve&&this.resolve(!1),this.close()))}onClose(){let{contentEl:r}=this;r.empty()}};var oG=_e('<div data-icon="go-t
Line truncated
|
||||
`);n.removed.lines.length>0&&!n.removed.no_nl_at_eof&&(c+=`
|
||||
`),i.replaceRange(c,i.offsetToPos(o),i.offsetToPos(l)),i.setSelection(i.offsetToPos(o))}}async stageHunk(e){if(!await this.plugin.isAllInitialized()||!this.editor)return;let{editor:r}=this.editor,i=Wi.getHunk(r.state,!1,e),n=!1;if(i||(i=Wi.getHunk(r.state,!0,e),n=!0),!i)return;let s=r.state.field(i$.editorInfoField).file.path,a=zt.createPatch(s,[i],"100644",n).join(`
|
||||
`)+`
|
||||
`;await this.gitManager.applyPatch(a),this.plugin.app.workspace.trigger("obsidian-git:refresh")}goToHunk(e){if(!this.editor)return;let{editor:r,obEditor:i}=this.editor,n=Wi.getHunks(r.state,!1),s=i.getCursor().line+1,a=zt.findNearestHunk(s,n,e,!0);if(a==null)return;let o=n[a];if(o){let l=o.added.start-1;i.setCursor(l,0),i.scrollIntoView({from:{line:l,ch:0},to:{line:l+1,ch:0}},!0)}}};m();m();var po=require("obsidian");var Gp=class{constructor(e){this.plg=e;this.codeMirrorExtensions=[];this.handleWorkspaceLeaf=e=>{if(!this.lineAuthorInfoProvider){console.warn("Git: undefined lineAuthorInfoProvider. Unexpected situation.");return}let r=e==null?void 0:e.view;!(r instanceof po.MarkdownView)||r.file==null||(r==null?void 0:r.allowNoFile)===!0||this.lineAuthorInfoProvider.trackChanged(r.file).catch(console.error)}}onLoadPlugin(){this.plg.registerEditorExtension(this.codeMirrorExtensions),bT(()=>this.plg.settings.lineAuthor,e=>{this.plg.settings.lineAuthor=e,this.plg.saveSettings()})}conditionallyActivateBySettings(){this.plg.settings.lineAuthor.show&&this.activateFeature()}activateFeature(){try{if(!this.isAvailableOnCurrentPlatform().available)return;PT(this.plg.settings.lineAuthor),this.lineAuthorInfoProvider=new _h(this.plg),this.createEventHandlers(),this.activateCodeMirrorExtensions(),console.log(this.plg.manifest.name+": Enabled line authoring.")}catch(e){console.warn("Git: Error while loading line authoring feature.",e),this.deactivateFeature()}}deactivateFeature(){var e;this.destroyEventHandlers(),this.deactivateCodeMirrorExtensions(),(e=this.lineAuthorInfoProvider)==null||e.destroy(),this.lineAuthorInfoProvider=void 0,console.log(this.plg.manifest.name+": Disabled line authoring.")}isAvailableOnCurrentPlatform(){return{available:this.plg.useSimpleGit&&po.Platform.isDesktopApp,gitManager:this.plg.gitManager instanceof Se?this.plg.gitManager:void 0}}refreshLineAuthorViews(){this.plg.settings.lineAuthor.show&&(this.deactivateFeature(),this.activateFeature())}activateCodeMirrorExtensions(){this.codeMirrorExtensions.push(HT),this.plg.app.workspace.updateOptions(),this.plg.app.workspace.iterateAllLeaves(this.handleWorkspaceLeaf)}deactivateCodeMirrorExtensions(){for(let e of this.codeMirrorExtensions)this.codeMirrorExtensions.remove(e);this.plg.app.workspace.updateOptions()}createEventHandlers(){this.gutterContextMenuEvent=this.createGutterContextMenuHandler(),this.fileOpenEvent=this.createFileOpenEvent(),this.workspaceLeafChangeEvent=this.createWorkspaceLeafChangeEvent(),this.fileModificationEvent=this.createVaultFileModificationHandler(),this.headChangeEvent=this.createHeadChangeEvent(),this.refreshOnCssChangeEvent=this.createCssRefreshHandler(),this.fileRenameEvent=this.createFileRenameEvent(),ST(),this.plg.registerEvent(this.gutterContextMenuEvent),this.plg.registerEvent(this.refreshOnCssChangeEvent),this.plg.registerEvent(this.fileOpenEvent),this.plg.registerEvent(this.workspaceLeafChangeEvent),this.plg.registerEvent(this.fileModificationEvent),this.plg.registerEvent(this.headChangeEvent),this.plg.registerEvent(this.fileRenameEvent)}destroyEventHandlers(){this.plg.app.workspace.offref(this.gutterContextMenuEvent),this.plg.app.workspace.offref(this.refreshOnCssChangeEvent),this.plg.app.workspace.offref(this.fileOpenEvent),this.plg.app.workspace.offref(this.workspaceLeafChangeEvent),this.plg.app.vault.offref(this.fileModificationEvent),this.plg.app.workspace.offref(this.headChangeEvent),this.plg.app.vault.offref(this.fileRenameEvent)}createFileOpenEvent(){return this.plg.app.workspace.on("file-open",e=>{var r;e&&((r=this.lineAuthorInfoProvider)==null||r.trackChanged(e).catch(console.error))})}createWorkspaceLeafChangeEvent(){return this.plg.app.workspace.on("active-leaf-change",this.handleWorkspaceLeaf)}createFileRenameEvent(){return this.plg.app.vault.on("rename",(e,r)=>{var i;return e instanceof po.TFile&&((i=this.lineAuthorInfoProvider)==null?void 0:i.trackChanged(e))})}createVaultFileModificationHandler(){return this.plg.app.vault.on("modify",e=>{var r;return e instanceof po.TFile&&((r=this.lineAuthorInfoProvider)==null?void 0:r.trackChanged(e))})}createHeadChangeEvent(){return this.plg.app.workspace.on("obsidian-git:head-change",()=>{this.refreshLineAuthorViews()})}createCssRefreshHandler(){return this.plg.app.workspace.on("css-change",()=>this.refreshLineAuthorViews())}createGutterContextMenuHandler(){return this.plg.app.workspace.on("editor-menu",AT)}};m();var pc=require("obsidian");m();m();var mo=require("@codemirror/state"),Vp=require("@codemirror/view");var jp=class extends Vp.GutterMarker{constructor(r,i){super();this.type=r;this.staged=i}toDOM(r){let i=createDiv();return i.className=`git-gutter-marker git-${this.type} ${this.staged?"staged":"unstaged"}`,this.type=="changedelete"&&i.setText("~"),i}},lb=mo.StateField.define({create:()=>mo.RangeSet.empty,update:(t,e)=>{let r=e.state.field(Gr,!1);if(!r)return mo.RangeSet.empty;let i=e.effects.some(s=>s.is(Oh)),n=e.effects.some(s=>s.is(Rl));if(i||n||(e.
Line truncated
|
||||
`+s),this.app.workspace.trigger("obsidian-git:refresh")}handleFileMenu(r,i,n,s){if(!this.gitReady||!this.settings.showFileMenu||!i)return;let a;if(typeof i=="string"?a=i:a=i.path,n=="file-explorer-context-menu"&&(r.addItem(o=>{o.setTitle("Git: Stage").setIcon("plus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{i instanceof ke.TFile?await this.stageFile(i):(await this.gitManager.stageAll({dir:this.gitManager.getRelativeRepoPath(a,!0)}),this.app.workspace.trigger("obsidian-git:refresh"))})})}),r.addItem(o=>{o.setTitle("Git: Unstage").setIcon("minus-circle").setSection("action").onClick(l=>{this.promiseQueue.addTask(async()=>{i instanceof ke.TFile?await this.unstageFile(i):(await this.gitManager.unstageAll({dir:this.gitManager.getRelativeRepoPath(a,!0)}),this.app.workspace.trigger("obsidian-git:refresh"))})})}),r.addItem(o=>{o.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(l=>{this.addFileToGitignore(a,i instanceof ke.TFolder).catch(c=>this.displayError(c))})})),n=="git-source-control"){r.addItem(l=>{l.setTitle("Git: Add to .gitignore").setIcon("file-x").setSection("action").onClick(c=>{this.addFileToGitignore(a,i instanceof ke.TFolder).catch(u=>this.displayError(u))})});let o=this.app.vault.adapter;s==="obsidian-git:menu"&&o instanceof ke.FileSystemAdapter&&(r.addItem(l=>{l.setTitle("Open in default app").setIcon("arrow-up-right").setSection("action").onClick(c=>{this.app.openWithDefaultApp(a)})}),r.addItem(l=>{l.setTitle("Show in system explorer").setIcon("arrow-up-right").setSection("action").onClick(c=>{window.electron.shell.showItemInFolder(c$.join(o.getBasePath(),a))})}))}}async migrateSettings(){this.settings.mergeOnPull!=null&&(this.settings.syncMethod=this.settings.mergeOnPull?"merge":"rebase",this.settings.mergeOnPull=void 0,await this.saveSettings()),this.settings.autoCommitMessage===void 0&&(this.settings.autoCommitMessage=this.settings.commitMessage,await this.saveSettings()),this.settings.gitPath!=null&&(this.localStorage.setGitPath(this.settings.gitPath),this.settings.gitPath=void 0,await this.saveSettings()),this.settings.username!=null&&(this.localStorage.setPassword(this.settings.username),this.settings.username=void 0,await this.saveSettings())}unloadPlugin(){var r,i;this.gitReady=!1,this.editorIntegration.onUnloadPlugin(),this.automaticsManager.unload(),(r=this.branchBar)==null||r.remove(),(i=this.statusBar)==null||i.remove(),this.statusBar=void 0,this.branchBar=void 0,this.gitManager.unload(),this.promiseQueue.clear();for(let n of this.intervalsToClear)window.clearInterval(n);this.intervalsToClear=[],this.debRefresh.cancel()}onunload(){this.unloadPlugin(),console.log("unloading "+this.manifest.name+" plugin")}async loadSettings(){let r=await this.loadData();r==null&&(r={showedMobileNotice:!0}),this.settings=DS(pt,r)}async saveSettings(){var r;(r=this.settingsTab)==null||r.beforeSaveSettings(),await this.saveData(this.settings)}get useSimpleGit(){return ke.Platform.isDesktopApp}async init({fromReload:r=!1}){var i;if(!this.localStorage.getPluginDisabled()){if(this.settings.showStatusBar&&!this.statusBar){let n=this.addStatusBarItem();this.statusBar=new xh(n,this),this.intervalsToClear.push(window.setInterval(()=>{var s;return(s=this.statusBar)==null?void 0:s.display()},1e3))}try{this.useSimpleGit?(this.gitManager=new Se(this),await this.gitManager.setGitInstance()):this.gitManager=new zi(this);let n=await this.gitManager.checkRequirements(),s=this.localStorage.getPausedAutomatics();switch(n){case"missing-git":this.displayError(`Cannot run git command. Trying to run: '${this.localStorage.getGitPath()||"git"}' .`);break;case"missing-repo":new ke.Notice("Can't find a valid git repository. Please create one via the given command or clone an existing repo.",1e4);break;case"valid":if(this.gitReady=!0,ke.Platform.isDesktop&&this.settings.showBranchStatusBar&&!this.branchBar){let a=this.addStatusBarItem();this.branchBar=new Hp(a,this),this.intervalsToClear.push(window.setInterval(()=>{var o;(o=this.branchBar)==null?void 0:o.display().catch(console.error)},6e4))}await((i=this.branchBar)==null?void 0:i.display()),this.editorIntegration.onReady(),this.app.workspace.trigger("obsidian-git:refresh"),this.app.workspace.trigger("obsidian-git:head-change"),!r&&this.settings.autoPullOnBoot&&!s&&this.promiseQueue.addTask(()=>this.pullChangesFromRemote()),s||await this.automaticsManager.init(),s&&new ke.Notice("Automatic routines are currently paused.");break;default:this.log("Something weird happened. The 'checkRequirements' result is "+n)}}catch(n){this.displayError(n),console.error(n)}}}async createNewRepo(){try{await this.gitManager.init(),new ke.Notice("Initialized new repo"),await this.init({fromReload:!0})}catch(r){this.displayError(r)}}async cloneNewRepo(){let i=await new rt(this,{placeholder:"Enter remote URL"}).openAndGetResult();if(i){let n="Vault Root",s=await new rt(this,{options:this.gitManager instanceof zi?[n]:[],placeholder:"En
Line truncated
|
||||
# Additional Instructions
|
||||
I strongly recommend to use "Source mode" for viewing the conflicted files. For simple conflicts, in each file listed above replace every occurrence of the following text blocks with the desired text.
|
||||
|
||||
\`\`\`diff
|
||||
<<<<<<< HEAD
|
||||
File changes in local repository
|
||||
=======
|
||||
File changes in remote repository
|
||||
>>>>>>> origin/main
|
||||
\`\`\``]),await this.tools.writeAndOpenFile(i==null?void 0:i.join(`
|
||||
`))}async editRemotes(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),n=await new rt(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}).openAndGetResult();if(n){let s=await this.gitManager.getRemoteUrl(n),o=await new rt(this,{initialValue:s,placeholder:"Enter remote URL"}).openAndGetResult();if(o)return await this.gitManager.setRemote(n,uv(o)),n}}async selectRemoteBranch(){let r=await this.gitManager.getRemotes(),i;r.length===0&&(i=await this.editRemotes(),i==null&&(r=await this.gitManager.getRemotes()));let n=new rt(this,{options:r,placeholder:"Select or create a new remote by typing its name and selecting it"}),s=i!=null?i:await n.openAndGetResult();if(s){this.displayMessage("Fetching remote branches"),await this.gitManager.fetch(s);let a=await this.gitManager.getRemoteBranches(s),l=await new rt(this,{options:a,placeholder:"Select or create a new remote branch by typing its name and selecting it"}).openAndGetResult();return l==null?void 0:l.startsWith(s+"/")?l:`${s}/${l}`}}async removeRemote(){if(!await this.isAllInitialized())return;let r=await this.gitManager.getRemotes(),n=await new rt(this,{options:r,placeholder:"Select a remote"}).openAndGetResult();n&&await this.gitManager.removeRemote(n)}onActiveLeafChange(r){var a,o;let i=r==null?void 0:r.view;if(!(i!=null&&i.getState().file)&&!(i instanceof Ha||i instanceof Ua))return;let n=this.app.workspace.getLeavesOfType(Xt.type).first(),s=this.app.workspace.getLeavesOfType(wi.type).first();if((a=n==null?void 0:n.view.containerEl.querySelector("div.tree-item-self.is-active"))==null||a.removeClass("is-active"),(o=s==null?void 0:s.view.containerEl.querySelector("div.tree-item-self.is-active"))==null||o.removeClass("is-active"),(r==null?void 0:r.view)instanceof Ha||(r==null?void 0:r.view)instanceof Ua){let c=r.view.state.bFile.replace(/["\\]/g,"\\$&");this.lastDiffViewState=r.view.getState();let u;n&&r.view.state.aRef=="HEAD"?u=n.view.containerEl.querySelector(`div.staged div.tree-item-self[data-path="${c}"]`):n&&r.view.state.aRef==""?u=n.view.containerEl.querySelector(`div.changes div.tree-item-self[data-path="${c}"]`):s&&(u=s.view.containerEl.querySelector(`div.tree-item-self[data-path='${c}']`)),u==null||u.addClass("is-active")}else this.lastDiffViewState=void 0}handleNoNetworkError(r){this.state.offlineMode?this.log("Encountered network error, but already in offline mode"):this.displayError("Git: Going into offline mode. Future network errors will no longer be displayed.",2e3),this.setPluginState({offlineMode:!0})}displayMessage(r,i=4*1e3){var n;(n=this.statusBar)==null||n.displayMessage(r.toLowerCase(),i),this.settings.disablePopups||(!this.settings.disablePopupsForNoChanges||!r.startsWith("No changes"))&&new ke.Notice(r,5*1e3),this.log(r)}displayError(r,i=10*1e3){var s;if(r instanceof lu.UserCanceledError){new ke.Notice("Aborted");return}let n;r instanceof Error?n=r:n=new Error(String(r)),this.settings.showErrorNotices&&new ke.Notice(n.message,i),console.error(`${this.manifest.id}:`,n.stack),(s=this.statusBar)==null||s.displayMessage(n.message.toLowerCase(),i)}log(...r){console.log(`${this.manifest.id}:`,...r)}};
|
||||
/*! Bundled license information:
|
||||
|
||||
ieee754/index.js:
|
||||
(*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
||||
|
||||
buffer/index.js:
|
||||
(*!
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*)
|
||||
|
||||
safe-buffer/index.js:
|
||||
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
||||
|
||||
crc-32/crc32.js:
|
||||
(*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *)
|
||||
|
||||
isomorphic-git/index.js:
|
||||
(*!
|
||||
* This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements.
|
||||
* SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
* Copyright (c) James Prevett and other ZenFS contributors.
|
||||
*
|
||||
* Windows support added:
|
||||
* - Backslashes are normalised to forward slashes before processing.
|
||||
* - Drive-letter prefixes (e.g. "C:") are detected and preserved through
|
||||
* normalisation, so absolute Windows paths are handled correctly.
|
||||
* - An absolute argument passed to join() resets the accumulated path,
|
||||
* matching Node behaviour and handling worktree gitdir paths properly.
|
||||
*
|
||||
* Limitation: UNC paths (e.g. \\server\share) are not supported. The leading
|
||||
* backslashes are normalised to forward slashes and then collapsed by
|
||||
* normalizeString, losing the UNC root. Git on Windows works with
|
||||
* drive-letter paths, so this is not expected to be a practical issue.
|
||||
*)
|
||||
|
||||
js-sha256/build/sha256.mjs:
|
||||
(**
|
||||
* [js-sha256]{@link https://github.com/emn178/js-sha256}
|
||||
*
|
||||
* @version 0.12.0
|
||||
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
||||
* @copyright Chen, Yi-Cyuan 2014-2026
|
||||
* @license MIT
|
||||
*)
|
||||
*/
|
||||
|
||||
/* nosourcemap */
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"author": "Vinzent",
|
||||
"authorUrl": "https://github.com/Vinzent03",
|
||||
"id": "obsidian-git",
|
||||
"name": "Git",
|
||||
"description": "Integrate Git version control with automatic backup and other advanced features.",
|
||||
"isDesktopOnly": false,
|
||||
"fundingUrl": "https://ko-fi.com/vinzent",
|
||||
"version": "2.39.0"
|
||||
}
|
||||
+705
@@ -0,0 +1,705 @@
|
||||
@keyframes loading {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.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-left: 0;
|
||||
padding-top: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-history-view"] .view-content {
|
||||
padding-left: 0;
|
||||
padding-top: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.loading {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.loading > svg {
|
||||
animation: 2s linear infinite loading;
|
||||
transform-origin: 50% 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.obsidian-git-center {
|
||||
margin: auto;
|
||||
text-align: center;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.obsidian-git-textarea {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.obsidian-git-disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.obsidian-git-center-button {
|
||||
display: block;
|
||||
margin: 20px auto;
|
||||
}
|
||||
|
||||
.tooltip.mod-left {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.tooltip.mod-right {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* Limits the scrollbar to the view body */
|
||||
.git-view {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* Re-enable wrapping of nav buttns to prevent overflow on smaller screens #*/
|
||||
.workspace-drawer .git-view .nav-buttons-container {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.git-tools {
|
||||
display: flex;
|
||||
margin-left: auto;
|
||||
}
|
||||
.git-tools .type {
|
||||
padding-left: var(--size-2-1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 11px;
|
||||
}
|
||||
|
||||
.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;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"] .tree-item-self,
|
||||
.workspace-leaf-content[data-type="git-history-view"] .tree-item-self {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="git-view"]
|
||||
.tree-item-self:hover
|
||||
.clickable-icon,
|
||||
.workspace-leaf-content[data-type="git-history-view"]
|
||||
.tree-item-self:hover
|
||||
.clickable-icon {
|
||||
color: var(--icon-color-hover);
|
||||
}
|
||||
|
||||
/* Highlight an item as active if it's diff is currently opened */
|
||||
.is-active .git-tools .buttons > * {
|
||||
color: var(--nav-item-color-active);
|
||||
}
|
||||
|
||||
.git-author {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.git-date {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.git-ref {
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
/* ====== diff2html ======
|
||||
The following styles are adapted from the obsidian-version-history plugin by
|
||||
@kometenstaub https://github.com/kometenstaub/obsidian-version-history-diff/blob/main/src/styles.scss
|
||||
which itself is adapted from the diff2html library with the following original license:
|
||||
|
||||
https://github.com/rtfpessoa/diff2html/blob/master/LICENSE.md
|
||||
|
||||
Copyright 2014-2016 Rodrigo Fernandes https://rtfpessoa.github.io/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
||||
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
|
||||
Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
|
||||
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
.theme-dark,
|
||||
.theme-light {
|
||||
--git-delete-bg: #ff475040;
|
||||
--git-delete-hl: #96050a75;
|
||||
--git-insert-bg: #68d36840;
|
||||
--git-insert-hl: #23c02350;
|
||||
--git-change-bg: #ffd55840;
|
||||
--git-selected: #3572b0;
|
||||
|
||||
--git-delete: #cc3333;
|
||||
--git-insert: #399839;
|
||||
--git-change: #d0b44c;
|
||||
--git-move: #3572b0;
|
||||
}
|
||||
|
||||
.git-diff {
|
||||
.d2h-d-none {
|
||||
display: none;
|
||||
}
|
||||
.d2h-wrapper {
|
||||
text-align: left;
|
||||
border-radius: 0.25em;
|
||||
overflow: auto;
|
||||
}
|
||||
.d2h-file-header.d2h-file-header {
|
||||
background-color: var(--background-secondary);
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
font-family:
|
||||
Source Sans Pro,
|
||||
Helvetica Neue,
|
||||
Helvetica,
|
||||
Arial,
|
||||
sans-serif;
|
||||
height: 35px;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.d2h-file-header,
|
||||
.d2h-file-stats {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
}
|
||||
.d2h-file-header {
|
||||
display: none;
|
||||
}
|
||||
.d2h-file-stats {
|
||||
font-size: 14px;
|
||||
margin-left: auto;
|
||||
}
|
||||
.d2h-lines-added {
|
||||
border: 1px solid var(--color-green);
|
||||
border-radius: 5px 0 0 5px;
|
||||
color: var(--color-green);
|
||||
padding: 2px;
|
||||
text-align: right;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-lines-deleted {
|
||||
border: 1px solid var(--color-red);
|
||||
border-radius: 0 5px 5px 0;
|
||||
color: var(--color-red);
|
||||
margin-left: 1px;
|
||||
padding: 2px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-file-name-wrapper {
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
font-size: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
.d2h-file-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: var(--text-normal);
|
||||
font-size: var(--h5-size);
|
||||
}
|
||||
.d2h-file-wrapper {
|
||||
border: 1px solid var(--background-secondary-alt);
|
||||
border-radius: 3px;
|
||||
margin-bottom: 1em;
|
||||
max-height: 100%;
|
||||
}
|
||||
.d2h-file-collapse {
|
||||
-webkit-box-pack: end;
|
||||
-ms-flex-pack: end;
|
||||
-webkit-box-align: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
border: 1px solid var(--background-secondary-alt);
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
justify-content: flex-end;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
.d2h-file-collapse.d2h-selected {
|
||||
background-color: var(--git-selected);
|
||||
}
|
||||
.d2h-file-collapse-input {
|
||||
margin: 0 4px 0 0;
|
||||
}
|
||||
.d2h-diff-table {
|
||||
border-collapse: collapse;
|
||||
font-family: var(--font-monospace);
|
||||
font-size: var(--code-size);
|
||||
width: 100%;
|
||||
}
|
||||
.d2h-files-diff {
|
||||
width: 100%;
|
||||
}
|
||||
.d2h-file-diff {
|
||||
/*
|
||||
overflow-y: scroll;
|
||||
*/
|
||||
border-radius: 5px;
|
||||
font-size: var(--font-text-size);
|
||||
line-height: var(--line-height-normal);
|
||||
}
|
||||
.d2h-file-side-diff {
|
||||
display: inline-block;
|
||||
margin-bottom: -8px;
|
||||
margin-right: -4px;
|
||||
overflow-x: scroll;
|
||||
overflow-y: hidden;
|
||||
width: 50%;
|
||||
}
|
||||
.d2h-code-line {
|
||||
padding-left: 6em;
|
||||
padding-right: 1.5em;
|
||||
}
|
||||
.d2h-code-line,
|
||||
.d2h-code-side-line {
|
||||
display: inline-block;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
}
|
||||
.d2h-code-side-line {
|
||||
/* needed to be changed */
|
||||
padding-left: 0.5em;
|
||||
padding-right: 0.5em;
|
||||
}
|
||||
.d2h-code-line-ctn {
|
||||
word-wrap: normal;
|
||||
background: none;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
vertical-align: middle;
|
||||
width: 100%;
|
||||
/* only works for line-by-line */
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.d2h-code-line del,
|
||||
.d2h-code-side-line del {
|
||||
background-color: var(--git-delete-hl);
|
||||
color: var(--text-normal);
|
||||
}
|
||||
.d2h-code-line del,
|
||||
.d2h-code-line ins,
|
||||
.d2h-code-side-line del,
|
||||
.d2h-code-side-line ins {
|
||||
border-radius: 0.2em;
|
||||
display: inline-block;
|
||||
margin-top: -1px;
|
||||
text-decoration: none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-code-line ins,
|
||||
.d2h-code-side-line ins {
|
||||
background-color: var(--git-insert-hl);
|
||||
text-align: left;
|
||||
}
|
||||
.d2h-code-line-prefix {
|
||||
word-wrap: normal;
|
||||
background: none;
|
||||
display: inline;
|
||||
padding: 0;
|
||||
white-space: pre;
|
||||
}
|
||||
.line-num1 {
|
||||
float: left;
|
||||
}
|
||||
.line-num1,
|
||||
.line-num2 {
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
overflow: hidden;
|
||||
/*
|
||||
padding: 0 0.5em;
|
||||
*/
|
||||
text-overflow: ellipsis;
|
||||
width: 2.5em;
|
||||
padding-left: 0;
|
||||
}
|
||||
.line-num2 {
|
||||
float: right;
|
||||
}
|
||||
.d2h-code-linenumber {
|
||||
background-color: var(--background-primary);
|
||||
border: solid var(--background-modifier-border);
|
||||
border-width: 0 1px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: var(--text-faint);
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
text-align: right;
|
||||
width: 5.5em;
|
||||
}
|
||||
.d2h-code-linenumber:after {
|
||||
content: "\200b";
|
||||
}
|
||||
.d2h-code-side-linenumber {
|
||||
background-color: var(--background-primary);
|
||||
border: solid var(--background-modifier-border);
|
||||
border-width: 0 1px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
color: var(--text-faint);
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
padding: 0 0.5em;
|
||||
text-align: right;
|
||||
text-overflow: ellipsis;
|
||||
width: 4em;
|
||||
/* needed to be changed */
|
||||
display: table-cell;
|
||||
position: relative;
|
||||
}
|
||||
.d2h-code-side-linenumber:after {
|
||||
content: "\200b";
|
||||
}
|
||||
.d2h-code-side-emptyplaceholder,
|
||||
.d2h-emptyplaceholder {
|
||||
background-color: var(--background-primary);
|
||||
border-color: var(--background-modifier-border);
|
||||
}
|
||||
.d2h-code-line-prefix,
|
||||
.d2h-code-linenumber,
|
||||
.d2h-code-side-linenumber,
|
||||
.d2h-emptyplaceholder {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.d2h-code-linenumber,
|
||||
.d2h-code-side-linenumber {
|
||||
direction: rtl;
|
||||
}
|
||||
.d2h-del {
|
||||
background-color: var(--git-delete-bg);
|
||||
border-color: var(--git-delete-hl);
|
||||
}
|
||||
.d2h-ins {
|
||||
background-color: var(--git-insert-bg);
|
||||
border-color: var(--git-insert-hl);
|
||||
}
|
||||
.d2h-info {
|
||||
background-color: var(--background-primary);
|
||||
border-color: var(--background-modifier-border);
|
||||
color: var(--text-faint);
|
||||
}
|
||||
.d2h-del,
|
||||
.d2h-ins,
|
||||
.d2h-file-diff .d2h-change {
|
||||
color: var(--text-normal);
|
||||
}
|
||||
.d2h-file-diff .d2h-del.d2h-change {
|
||||
background-color: var(--git-change-bg);
|
||||
}
|
||||
.d2h-file-diff .d2h-ins.d2h-change {
|
||||
background-color: var(--git-insert-bg);
|
||||
}
|
||||
.d2h-file-list-wrapper {
|
||||
a {
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
|
||||
svg {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.d2h-file-list-header {
|
||||
text-align: left;
|
||||
}
|
||||
.d2h-file-list-title {
|
||||
display: none;
|
||||
}
|
||||
.d2h-file-list-line {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
text-align: left;
|
||||
}
|
||||
.d2h-file-list {
|
||||
}
|
||||
.d2h-file-list > li {
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
margin: 0;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
.d2h-file-list > li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
.d2h-file-switch {
|
||||
cursor: pointer;
|
||||
display: none;
|
||||
font-size: 10px;
|
||||
}
|
||||
.d2h-icon {
|
||||
fill: currentColor;
|
||||
margin-right: 10px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.d2h-deleted {
|
||||
color: var(--git-delete);
|
||||
}
|
||||
.d2h-added {
|
||||
color: var(--git-insert);
|
||||
}
|
||||
.d2h-changed {
|
||||
color: var(--git-change);
|
||||
}
|
||||
.d2h-moved {
|
||||
color: var(--git-move);
|
||||
}
|
||||
.d2h-tag {
|
||||
background-color: var(--background-secondary);
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
font-size: 10px;
|
||||
margin-left: 5px;
|
||||
padding: 0 2px;
|
||||
}
|
||||
.d2h-deleted-tag {
|
||||
border: 1px solid var(--git-delete);
|
||||
}
|
||||
.d2h-added-tag {
|
||||
border: 1px solid var(--git-insert);
|
||||
}
|
||||
.d2h-changed-tag {
|
||||
border: 1px solid var(--git-change);
|
||||
}
|
||||
.d2h-moved-tag {
|
||||
border: 1px solid var(--git-move);
|
||||
}
|
||||
|
||||
/* needed for line-by-line*/
|
||||
|
||||
.d2h-diff-tbody {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* My additions */
|
||||
.cm-merge-revert {
|
||||
width: 4em;
|
||||
}
|
||||
/* Ensure that merge revert markers are positioned correctly */
|
||||
.cm-merge-revert > * {
|
||||
position: absolute;
|
||||
background-color: var(--background-secondary);
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
/* ====================== Line Authoring Information ====================== */
|
||||
|
||||
.cm-gutterElement.obs-git-blame-gutter {
|
||||
/* Add background color to spacing inbetween and around the gutter for better aesthetics */
|
||||
border-width: 0px 2px 0.2px;
|
||||
border-style: solid;
|
||||
border-color: var(--background-secondary);
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
|
||||
.cm-gutterElement.obs-git-blame-gutter > div,
|
||||
.line-author-settings-preview {
|
||||
/* delegate text color to settings */
|
||||
color: var(--obs-git-gutter-text);
|
||||
font-family: monospace;
|
||||
height: 100%; /* ensure, that age-based background color occupies entire parent */
|
||||
text-align: right;
|
||||
padding: 0px 6px;
|
||||
white-space: pre; /* Keep spaces and do not collapse them. */
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
/* hide git blame gutter not to superpose text */
|
||||
.cm-gutterElement.obs-git-blame-gutter {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.git-unified-diff-view,
|
||||
.git-split-diff-view .cm-deletedLine .cm-changedText {
|
||||
background-color: #ee443330;
|
||||
}
|
||||
|
||||
.git-unified-diff-view,
|
||||
.git-split-diff-view .cm-insertedLine .cm-changedText {
|
||||
background-color: #22bb2230;
|
||||
}
|
||||
|
||||
.git-obscure-prompt[git-is-obscured="true"] #git-show-password:after {
|
||||
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-eye"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"></path><circle cx="12" cy="12" r="3"></circle></svg>');
|
||||
}
|
||||
|
||||
.git-obscure-prompt[git-is-obscured="false"] #git-show-password:after {
|
||||
-webkit-mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-eye-off"><path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"></path><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"></path><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"></path><path d="m2 2 20 20"></path></svg>');
|
||||
}
|
||||
|
||||
/* Override styling of Codemirror merge view "collapsed lines" indicator */
|
||||
.git-split-diff-view .ͼ2 .cm-collapsedLines {
|
||||
background: var(--interactive-normal);
|
||||
border-radius: var(--radius-m);
|
||||
color: var(--text-accent);
|
||||
font-size: var(--font-small);
|
||||
padding: var(--size-4-1) var(--size-4-1);
|
||||
}
|
||||
.git-split-diff-view .ͼ2 .cm-collapsedLines:hover {
|
||||
background: var(--interactive-hover);
|
||||
color: var(--text-accent-hover);
|
||||
}
|
||||
|
||||
.git-signs-gutter {
|
||||
.cm-gutterElement {
|
||||
display: grid;
|
||||
|
||||
/* Needed to align the sign properly for different line heigts. Such as
|
||||
* when having a heading or list item.
|
||||
*/
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.git-gutter-marker:hover {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-add {
|
||||
background-color: var(--color-green);
|
||||
justify-self: center;
|
||||
height: inherit;
|
||||
width: 0.2rem;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-change {
|
||||
background-color: var(--color-yellow);
|
||||
justify-self: center;
|
||||
height: inherit;
|
||||
width: 0.2rem;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-changedelete {
|
||||
color: var(--color-yellow);
|
||||
font-weight: var(--font-bold);
|
||||
font-size: 1rem;
|
||||
justify-self: center;
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-delete {
|
||||
background-color: var(--color-red);
|
||||
height: 0.2rem;
|
||||
width: 0.8rem;
|
||||
align-self: end;
|
||||
}
|
||||
|
||||
.git-gutter-marker.git-topdelete {
|
||||
background-color: var(--color-red);
|
||||
height: 0.2rem;
|
||||
width: 0.8rem;
|
||||
align-self: start;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-change {
|
||||
width: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-add {
|
||||
width: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-delete {
|
||||
height: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-topdelete {
|
||||
height: 0.6rem;
|
||||
}
|
||||
|
||||
div:hover > .git-gutter-marker.git-changedelete {
|
||||
font-weight: var(--font-bold);
|
||||
}
|
||||
|
||||
.git-gutter-marker.staged {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
/* Prevent shifting of the editor when git signs gutter is the only gutter present */
|
||||
.cm-gutters.cm-gutters-before:has(> .git-signs-gutter:only-child) {
|
||||
margin-inline-end: 0;
|
||||
.git-signs-gutter {
|
||||
margin-inline-start: -1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.git-changes-status-bar-colored {
|
||||
.git-add {
|
||||
color: var(--color-green);
|
||||
}
|
||||
.git-change {
|
||||
color: var(--color-yellow);
|
||||
}
|
||||
.git-delete {
|
||||
color: var(--color-red);
|
||||
}
|
||||
}
|
||||
|
||||
.git-changes-status-bar .git-add {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
.git-changes-status-bar .git-change {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
var sF=Object.create;var Vs=Object.defineProperty;var lF=Object.getOwnPropertyDescriptor;var uF=Object.getOwnPropertyNames;var cF=Object.getPrototypeOf,dF=Object.prototype.hasOwnProperty;var fF=(e,t,r)=>t in e?Vs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var hF=(e,t)=>()=>(e&&(t=e(e=0)),t);var wn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Rf=(e,t)=>{for(var r in t)Vs(e,r,{get:t[r],enumerable:!0})},av=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uF(t))!dF.call(e,i)&&i!==r&&Vs(e,i,{get:()=>t[i],enumerable:!(n=lF(t,i))||n.enumerable});return e};var Ct=(e,t,r)=>(r=e!=null?sF(cF(e)):{},av(t||!e||!e.__esModule?Vs(r,"default",{value:e,enumerable:!0}):r,e)),ov=e=>av(Vs({},"__esModule",{value:!0}),e);var ur=(e,t,r)=>(fF(e,typeof t!="symbol"?t+"":t,r),r);var ln=wn((hi,Zv)=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});function Qr(e){return typeof e=="object"&&!("toString"in e)?Object.prototype.toString.call(e).slice(8,-1):e}var eI=typeof process=="object"&&!0;function Vr(e,t){if(!e)throw eI?new Error("Invariant failed"):new Error(t())}hi.invariant=Vr;var nh=Object.prototype.hasOwnProperty,tI=Array.prototype.splice,nI=Object.prototype.toString;function Ua(e){return nI.call(e).slice(8,-1)}var bu=Object.assign||function(e,t){return rh(t).forEach(function(r){nh.call(t,r)&&(e[r]=t[r])}),e},rh=typeof Object.getOwnPropertySymbols=="function"?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function sa(e){return Array.isArray(e)?bu(e.constructor(e.length),e):Ua(e)==="Map"?new Map(e):Ua(e)==="Set"?new Set(e):e&&typeof e=="object"?bu(Object.create(Object.getPrototypeOf(e)),e):e}var Gv=function(){function e(){this.commands=bu({},rI),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(t,r){return t===r},this.update.newContext=function(){return new e().update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(t){this.update.isEquals=t},enumerable:!0,configurable:!0}),e.prototype.extend=function(t,r){this.commands[t]=r},e.prototype.update=function(t,r){var n=this,i=typeof r=="function"?{$apply:r}:r;Array.isArray(t)&&Array.isArray(i)||Vr(!Array.isArray(i),function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."}),Vr(typeof i=="object"&&i!==null,function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the "+("following commands: "+Object.keys(n.commands).join(", ")+".")});var a=t;return rh(i).forEach(function(o){if(nh.call(n.commands,o)){var s=t===a;a=n.commands[o](i[o],a,i,t),s&&n.isEquals(a,t)&&(a=t)}else{var u=Ua(t)==="Map"?n.update(t.get(o),i[o]):n.update(t[o],i[o]),l=Ua(a)==="Map"?a.get(o):a[o];(!n.isEquals(u,l)||typeof u=="undefined"&&!nh.call(t,o))&&(a===t&&(a=sa(t)),Ua(a)==="Map"?a.set(o,u):a[o]=u)}}),a},e}();hi.Context=Gv;var rI={$push:function(e,t,r){return jv(t,r,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,r){return jv(t,r,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,r,n){return iI(t,r),e.forEach(function(i){Jv(i),t===n&&i.length&&(t=sa(n)),tI.apply(t,i)}),t},$set:function(e,t,r){return oI(r),e},$toggle:function(e,t){zs(e,"$toggle");var r=e.length?sa(t):t;return e.forEach(function(n){r[n]=!t[n]}),r},$unset:function(e,t,r,n){return zs(e,"$unset"),e.forEach(function(i){Object.hasOwnProperty.call(t,i)&&(t===n&&(t=sa(n)),delete t[i])}),t},$add:function(e,t,r,n){return qv(t,"$add"),zs(e,"$add"),Ua(t)==="Map"?e.forEach(function(i){var a=i[0],o=i[1];t===n&&t.get(a)!==o&&(t=sa(n)),t.set(a,o)}):e.forEach(function(i){t===n&&!t.has(i)&&(t=sa(n)),t.add(i)}),t},$remove:function(e,t,r,n){return qv(t,"$remove"),zs(e,"$remove"),e.forEach(function(i){t===n&&t.has(i)&&(t=sa(n)),t.delete(i)}),t},$merge:function(e,t,r,n){return sI(t,e),rh(e).forEach(function(i){e[i]!==t[i]&&(t===n&&(t=sa(n)),t[i]=e[i])}),t},$apply:function(e,t){return aI(e),e(t)}},ih=new Gv;hi.isEquals=ih.update.isEquals;hi.extend=ih.extend;hi.default=ih.update;hi.default.default=Zv.exports=bu(hi.default,hi);function jv(e,t,r){Vr(Array.isArray(e),function(){return"update(): expected target of "+Qr(r)+" to be an array; got "+Qr(e)+"."}),zs(t[r],r)}function zs(e,t){Vr(Array.isArray(e),function(){return"update(): expected spec of "+Qr(t)+" to be an array; got "+Qr(e)+". Did you forget to wrap your parameter in an array?"})}function iI(e,t){Vr(Array.isArray(e),function(){return"Expected $splice target to be an array; got "+Qr(e)}),Jv(t.$splice)}function Jv(e){Vr(Array.isArray(e),function(){return"update(): expected spec of $splice to be an array of arrays; got "+Qr(e)+". Did you forget to wrap your parameters in an array?"})}function aI(e){Vr(typeof e=="funcLine truncated
|
||||
`||L.charAt(ge)==="\r"&&L.charAt(ge+1)!==`
|
||||
`)&&(de++,ve===0&&(ve=ge+1)),ge--}var M=ue+de,H=K-ve;return ee[K]={line:M,lineStart:ve},{offset:K,line:M+1,column:H+1}}function oe(L){if(!x(L))throw new Error("not a parser: "+L)}function te(L,K){return typeof L=="string"?L.charAt(K):L[K]}function re(L){if(typeof L!="number")throw new Error("not a number: "+L)}function ne(L){if(typeof L!="function")throw new Error("not a function: "+L)}function be(L){if(typeof L!="string")throw new Error("not a string: "+L)}var pe=2,De=3,Ce=8,U=5*Ce,Je=4*Ce,it=" ";function N(L,K){return new Array(K+1).join(L)}function Ze(L,K,ee){var ue=K-L.length;return ue<=0?L:N(ee,ue)+L}function It(L,K,ee,ue){return{from:L-K>0?L-K:0,to:L+ee>ue?ue:L+ee}}function Mt(L,K){var ee,ue,de,ve,ge,M=K.index,H=M.offset,q=1;if(H===L.length)return"Got the end of the input";if(A(L)){var ie=H-H%Ce,ye=H-ie,ce=It(ie,U,Je+Ce,L.length),ae=l(function(Te){return l(function(Ue){return Ze(Ue.toString(16),2,"0")},Te)},function(Te,Ue){var We=Te.length,Ft=[],Hn=0;if(We<=Ue)return[Te.slice()];for(var Ot=0;Ot<We;Ot++)Ft[Hn]||Ft.push([]),Ft[Hn].push(Te[Ot]),(Ot+1)%Ue==0&&Hn++;return Ft}(L.slice(ce.from,ce.to).toJSON().data,Ce));ve=function(Te){return Te.from===0&&Te.to===1?{from:Te.from,to:Te.to}:{from:Te.from/Ce,to:Math.floor(Te.to/Ce)}}(ce),ue=ie/Ce,ee=3*ye,ye>=4&&(ee+=1),q=2,de=l(function(Te){return Te.length<=4?Te.join(" "):Te.slice(0,4).join(" ")+" "+Te.slice(4).join(" ")},ae),(ge=(8*(ve.to>0?ve.to-1:ve.to)).toString(16).length)<2&&(ge=2)}else{var Se=L.split(/\r\n|[\n\r\u2028\u2029]/);ee=M.column-1,ue=M.line-1,ve=It(ue,pe,De,Se.length),de=Se.slice(ve.from,ve.to),ge=ve.to.toString().length}var nt=ue-ve.from;return A(L)&&(ge=(8*(ve.to>0?ve.to-1:ve.to)).toString(16).length)<2&&(ge=2),u(function(Te,Ue,We){var Ft,Hn=We===nt,Ot=Hn?"> ":it;return Ft=A(L)?Ze((8*(ve.from+We)).toString(16),ge,"0"):Ze((ve.from+We+1).toString(),ge," "),[].concat(Te,[Ot+Ft+" | "+Ue],Hn?[it+N(" ",ge)+" | "+Ze("",ee," ")+N("^",q)]:[])},[],de).join(`
|
||||
`)}function jt(L,K){return[`
|
||||
`,"-- PARSING FAILED "+N("-",50),`
|
||||
|
||||
`,Mt(L,K),`
|
||||
|
||||
`,(ee=K.expected,ee.length===1?`Expected:
|
||||
|
||||
`+ee[0]:`Expected one of the following:
|
||||
|
||||
`+ee.join(", ")),`
|
||||
`].join("");var ee}function vt(L){return L.flags!==void 0?L.flags:[L.global?"g":"",L.ignoreCase?"i":"",L.multiline?"m":"",L.unicode?"u":"",L.sticky?"y":""].join("")}function Wt(){for(var L=[].slice.call(arguments),K=L.length,ee=0;ee<K;ee+=1)oe(L[ee]);return a(function(ue,de){for(var ve,ge=new Array(K),M=0;M<K;M+=1){if(!(ve=G(L[M]._(ue,de),ve)).status)return ve;ge[M]=ve.value,de=ve.index}return G(P(de,ge),ve)})}function Tt(){var L=[].slice.call(arguments);if(L.length===0)throw new Error("seqMap needs at least one argument");var K=L.pop();return ne(K),Wt.apply(null,L).map(function(ee){return K.apply(null,ee)})}function Jt(){var L=[].slice.call(arguments),K=L.length;if(K===0)return jn("zero alternates");for(var ee=0;ee<K;ee+=1)oe(L[ee]);return a(function(ue,de){for(var ve,ge=0;ge<L.length;ge+=1)if((ve=G(L[ge]._(ue,de),ve)).status)return ve;return ve})}function en(L,K){return gn(L,K).or(xn([]))}function gn(L,K){return oe(L),oe(K),Tt(L,K.then(L).many(),function(ee,ue){return[ee].concat(ue)})}function yn(L){be(L);var K="'"+L+"'";return a(function(ee,ue){var de=ue+L.length,ve=ee.slice(ue,de);return ve===L?P(de,ve):B(ue,K)})}function vn(L,K){(function(de){if(!(de instanceof RegExp))throw new Error("not a regexp: "+de);for(var ve=vt(de),ge=0;ge<ve.length;ge++){var M=ve.charAt(ge);if(M!=="i"&&M!=="m"&&M!=="u"&&M!=="s")throw new Error('unsupported regexp flag "'+M+'": '+de)}})(L),arguments.length>=2?re(K):K=0;var ee=function(de){return RegExp("^(?:"+de.source+")",vt(de))}(L),ue=""+L;return a(function(de,ve){var ge=ee.exec(de.slice(ve));if(ge){if(0<=K&&K<=ge.length){var M=ge[0],H=ge[K];return P(ve+M.length,H)}return B(ve,"valid match group (0 to "+ge.length+") in "+ue)}return B(ve,ue)})}function xn(L){return a(function(K,ee){return P(ee,L)})}function jn(L){return a(function(K,ee){return B(ee,L)})}function sn(L){if(x(L))return a(function(K,ee){var ue=L._(K,ee);return ue.index=ee,ue.value="",ue});if(typeof L=="string")return sn(yn(L));if(L instanceof RegExp)return sn(vn(L));throw new Error("not a string, regexp, or parser: "+L)}function Rt(L){return oe(L),a(function(K,ee){var ue=L._(K,ee),de=K.slice(ee,ue.index);return ue.status?B(ee,'not "'+de+'"'):P(ee,null)})}function Vt(L){return ne(L),a(function(K,ee){var ue=te(K,ee);return ee<K.length&&L(ue)?P(ee+1,ue):B(ee,"a character/byte matching "+L)})}function Sr(L,K){arguments.length<2&&(K=L,L=void 0);var ee=a(function(ue,de){return ee._=K()._,ee._(ue,de)});return L?ee.desc(L):ee}function Rr(){return jn("fantasy-land/empty")}o.parse=function(L){if(typeof L!="string"&&!A(L))throw new Error(".parse must be called with a string or Buffer as its argument");var K,ee=this.skip(At)._(L,0);return K=ee.status?{status:!0,value:ee.value}:{status:!1,index:Q(L,ee.furthest),expected:ee.expected},delete J[L],K},o.tryParse=function(L){var K=this.parse(L);if(K.status)return K.value;var ee=jt(L,K),ue=new Error(ee);throw ue.type="ParsimmonError",ue.result=K,ue},o.assert=function(L,K){return this.chain(function(ee){return L(ee)?xn(ee):jn(K)})},o.or=function(L){return Jt(this,L)},o.trim=function(L){return this.wrap(L,L)},o.wrap=function(L,K){return Tt(L,this,K,function(ee,ue){return ue})},o.thru=function(L){return L(this)},o.then=function(L){return oe(L),Wt(this,L).map(function(K){return K[1]})},o.many=function(){var L=this;return a(function(K,ee){for(var ue=[],de=void 0;;){if(!(de=G(L._(K,ee),de)).status)return G(P(ee,ue),de);if(ee===de.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");ee=de.index,ue.push(de.value)}})},o.tieWith=function(L){return be(L),this.map(function(K){if(function(de){if(!O(de))throw new Error("not an array: "+de)}(K),K.length){be(K[0]);for(var ee=K[0],ue=1;ue<K.length;ue++)be(K[ue]),ee+=L+K[ue];return ee}return""})},o.tie=function(){return this.tieWith("")},o.times=function(L,K){var ee=this;return arguments.length<2&&(K=L),re(L),re(K),a(function(ue,de){for(var ve=[],ge=void 0,M=void 0,H=0;H<L;H+=1){if(M=G(ge=ee._(ue,de),M),!ge.status)return M;de=ge.index,ve.push(ge.value)}for(;H<K&&(M=G(ge=ee._(ue,de),M),ge.status);H+=1)de=ge.index,ve.push(ge.value);return G(P(de,ve),M)})},o.result=function(L){return this.map(function(){return L})},o.atMost=function(L){return this.times(0,L)},o.atLeast=function(L){return Tt(this.times(L),this.many(),function(K,ee){return K.concat(ee)})},o.map=function(L){ne(L);var K=this;return a(function(ee,ue){var de=K._(ee,ue);return de.status?G(P(de.index,L(de.value)),de):de})},o.contramap=function(L){ne(L);var K=this;return a(function(ee,ue){var de=K.parse(L(ee.slice(ue)));return de.status?P(ue+ee.length,de.value):de})},o.promap=function(L,K){return ne(L),ne(K),this.contramap(L).map(K)},o.skip=function(L){return Wt(this,L).map(function(K){return K[0]})},o.mark=function(){return Tt(Bt,this,Bt,function(L,K,ee){return{start:L,value:K,end:ee}})},o.node=function(L){return Tt(Bt,this,Bt,function(K,ee,ue){return{name:L,value:ee,start:K,end:ue}})},o.sepBy=f
Line truncated
|
||||
`),ar=yn(`\r
|
||||
`),ht=Jt(ar,Ht,_n).desc("newline"),St=Jt(ht,At);a.all=rn,a.alt=Jt,a.any=Hr,a.cr=_n,a.createLanguage=function(L){var K={};for(var ee in L)({}).hasOwnProperty.call(L,ee)&&function(ue){K[ue]=Sr(function(){return L[ue](K)})}(ee);return K},a.crlf=ar,a.custom=function(L){return a(L(P,B))},a.digit=Z,a.digits=me,a.empty=Rr,a.end=St,a.eof=At,a.fail=jn,a.formatError=jt,a.index=Bt,a.isParser=x,a.lazy=Sr,a.letter=Ie,a.letters=at,a.lf=Ht,a.lookahead=sn,a.makeFailure=B,a.makeSuccess=P,a.newline=ht,a.noneOf=function(L){return Vt(function(K){return L.indexOf(K)<0}).desc("none of '"+L+"'")},a.notFollowedBy=Rt,a.of=xn,a.oneOf=function(L){for(var K=L.split(""),ee=0;ee<K.length;ee++)K[ee]="'"+K[ee]+"'";return Vt(function(ue){return L.indexOf(ue)>=0}).desc(K)},a.optWhitespace=Dt,a.Parser=a,a.range=function(L,K){return Vt(function(ee){return L<=ee&&ee<=K}).desc(L+"-"+K)},a.regex=vn,a.regexp=vn,a.sepBy=en,a.sepBy1=gn,a.seq=Wt,a.seqMap=Tt,a.seqObj=function(){for(var L,K={},ee=0,ue=(L=arguments,Array.prototype.slice.call(L)),de=ue.length,ve=0;ve<de;ve+=1){var ge=ue[ve];if(!x(ge)){if(O(ge)&&ge.length===2&&typeof ge[0]=="string"&&x(ge[1])){var M=ge[0];if(Object.prototype.hasOwnProperty.call(K,M))throw new Error("seqObj: duplicate key "+M);K[M]=!0,ee++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(ee===0)throw new Error("seqObj expects at least one named parser, found zero");return a(function(H,q){for(var ie,ye={},ce=0;ce<de;ce+=1){var ae,Se;if(O(ue[ce])?(ae=ue[ce][0],Se=ue[ce][1]):(ae=null,Se=ue[ce]),!(ie=G(Se._(H,q),ie)).status)return ie;ae&&(ye[ae]=ie.value),q=ie.index}return G(P(q,ye),ie)})},a.string=yn,a.succeed=xn,a.takeWhile=function(L){return ne(L),a(function(K,ee){for(var ue=ee;ue<K.length&&L(te(K,ue));)ue++;return P(ue,K.slice(ee,ue))})},a.test=Vt,a.whitespace=Cn,a["fantasy-land/empty"]=Rr,a["fantasy-land/of"]=xn,a.Binary={bitSeq:h,bitSeqObj:function(L){m();var K={},ee=0,ue=l(function(ve){if(O(ve)){var ge=ve;if(ge.length!==2)throw new Error("["+ge.join(", ")+"] should be length 2, got length "+ge.length);if(be(ge[0]),re(ge[1]),Object.prototype.hasOwnProperty.call(K,ge[0]))throw new Error("duplicate key in bitSeqObj: "+ge[0]);return K[ge[0]]=!0,ee++,ge}return re(ve),[null,ve]},L);if(ee<1)throw new Error("bitSeqObj expects at least one named pair, got ["+L.join(", ")+"]");var de=l(function(ve){return ve[0]},ue);return h(l(function(ve){return ve[1]},ue)).map(function(ve){return u(function(ge,M){return M[0]!==null&&(ge[M[0]]=M[1]),ge},{},l(function(ge,M){return[ge,ve[M]]},de))})},byte:function(L){if(m(),re(L),L>255)throw new Error("Value specified to byte constructor ("+L+"=0x"+L.toString(16)+") is larger in value than a single byte.");var K=(L>15?"0x":"0x0")+L.toString(16);return a(function(ee,ue){var de=te(ee,ue);return de===L?P(ue+1,de):B(ue,K)})},buffer:function(L){return g("buffer",L).map(function(K){return Buffer.from(K)})},encodedString:function(L,K){return g("string",K).map(function(ee){return ee.toString(L)})},uintBE:v,uint8BE:v(1),uint16BE:v(2),uint32BE:v(4),uintLE:D,uint8LE:D(1),uint16LE:D(2),uint32LE:D(4),intBE:I,int8BE:I(1),int16BE:I(2),int32BE:I(4),intLE:C,int8LE:C(1),int16LE:C(2),int32LE:C(4),floatBE:g("floatBE",4).map(function(L){return L.readFloatBE(0)}),floatLE:g("floatLE",4).map(function(L){return L.readFloatLE(0)}),doubleBE:g("doubleBE",8).map(function(L){return L.readDoubleBE(0)}),doubleLE:g("doubleLE",8).map(function(L){return L.readDoubleLE(0)})},r.exports=a}])})})(kc,kc.exports);var W=kc.exports,Bm=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-
Line truncated
|
||||
`)[0];let n=r.substring(2).trim();return W.makeSuccess(t+r.length,n)}),namedField:e=>W.alt(e.explicitNamedField,jP(ai.field).map(([t,r])=>Cc.named(qP(r),t))),sortField:e=>W.seqMap(ai.field.skip(W.optWhitespace),W.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),(t,r)=>{let n=r.length==0?"ascending":r[0].toLowerCase();return n=="desc"&&(n="descending"),n=="asc"&&(n="ascending"),{field:t,direction:n}}),headerClause:e=>e.queryType.chain(t=>{switch(t){case"table":return R0(()=>({type:t,fields:[],showId:!0}),W.seqMap(W.regexp(/WITHOUT\s+ID/i).skip(W.optWhitespace).atMost(1),W.sepBy(e.namedField,W.string(",").trim(W.optWhitespace)),(r,n)=>({type:t,fields:n,showId:r.length==0})));case"list":return R0(()=>({type:t,format:void 0,showId:!0}),W.seqMap(W.regexp(/WITHOUT\s+ID/i).skip(W.optWhitespace).atMost(1),ai.field.atMost(1),(r,n)=>({type:t,format:n.length==1?n[0]:void 0,showId:r.length==0})));case"task":return W.succeed({type:t});case"calendar":return W.whitespace.then(W.seqMap(e.namedField,r=>({type:t,showId:!0,field:r})));default:return W.fail(`Unrecognized query type '${t}'`)}}).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:e=>W.seqMap(W.regexp(/FROM/i),W.whitespace,ai.source,(t,r,n)=>n),whereClause:e=>W.seqMap(W.regexp(/WHERE/i),W.whitespace,ai.field,(t,r,n)=>({type:"where",clause:n})).desc("WHERE <expression>"),sortByClause:e=>W.seqMap(W.regexp(/SORT/i),W.whitespace,e.sortField.sepBy1(W.string(",").trim(W.optWhitespace)),(t,r,n)=>({type:"sort",fields:n})).desc("SORT field [ASC/DESC]"),limitClause:e=>W.seqMap(W.regexp(/LIMIT/i),W.whitespace,ai.field,(t,r,n)=>({type:"limit",amount:n})).desc("LIMIT <value>"),flattenClause:e=>W.seqMap(W.regexp(/FLATTEN/i).skip(W.whitespace),e.namedField,(t,r)=>({type:"flatten",field:r})).desc("FLATTEN <value> [AS <name>]"),groupByClause:e=>W.seqMap(W.regexp(/GROUP BY/i).skip(W.whitespace),e.namedField,(t,r)=>({type:"group",field:r})).desc("GROUP BY <value> [AS <name>]"),clause:e=>W.alt(e.fromClause,e.whereClause,e.sortByClause,e.limitClause,e.groupByClause,e.flattenClause),query:e=>W.seqMap(e.headerClause.trim(dm),e.fromClause.trim(dm).atMost(1),e.clause.trim(dm).many(),(t,r,n)=>({header:t,source:r.length==0?Si.folder(""):r[0],operations:n,settings:Hm}))}),dm=W.alt(W.whitespace,RS.comment).many().map(e=>e.join("")),GP=e=>{var t;return e?(t=e.plugins.plugins.dataview)==null?void 0:t.api:window.DataviewAPI},JP=e=>e.plugins.enabledPlugins.has("dataview");Ei.DATE_SHORTHANDS=Fm;Ei.DURATION_TYPES=Tm;Ei.EXPRESSION=ai;Ei.KEYWORDS=Im;Ei.QUERY_LANGUAGE=RS;Ei.getAPI=GP;Ei.isPluginEnabled=JP;Ei.parseField=KP});var HS=wn((Vm,$m)=>{(function(e,t){typeof Vm=="object"&&typeof $m!="undefined"?$m.exports=t():typeof define=="function"&&define.amd?define(t):e.Mark=t()})(Vm,function(){"use strict";var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},t=function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")},r=function(){function s(u,l){for(var c=0;c<l.length;c++){var d=l[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(u,d.key,d)}}return function(u,l,c){return l&&s(u.prototype,l),c&&s(u,c),u}}(),n=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var l=arguments[u];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(s[c]=l[c])}return s},i=function(){function s(u){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5e3;t(this,s),this.ctx=u,this.iframes=l,this.exclude=c,this.iframesTimeout=d}return r(s,[{key:"getContexts",value:function(){var l=void 0,c=[];return typeof this.ctx=="undefined"||!this.ctx?l=[]:NodeList.prototype.isPrototypeOf(this.ctx)?l=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?l=this.ctx:typeof this.ctx=="string"?l=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):l=[this.ctx],l.forEach(function(d){var m=c.filter(function(h){return h.contains(d)}).length>0;c.indexOf(d)===-1&&!m&&c.push(d)}),c}},{key:"getIframeContents",value:function(l,c){var d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},m=void 0;try{var h=l.contentWindow;if(m=h.document,!h||!m)throw new Error("iframe inaccessible")}catch(g){d()}m&&c(m)}},{key:"isIframeBlank",value:function(l){var c="about:blank",d=l.getAttribute("src").trim(),m=l.contentWindow.location.href;return m===c&&d!==c&&d}},{key:"observeIframeLoad",value:function(l,c,d){var m=this,h=!1,g=null,y=function v(){if(!h){h=!0,activeWindow.clearTimeout(g);try{m.isIframeBlank(l)||(l.removeEventListener("load",v),m.getIframeContents(l,c,d))}catch(D){d()}}};l.addEventListener("load",y),g=activeWindow.setTimeout(y,this.iframesTimeout)}},{key:"onIframeReady",value:function(l,c,d){try{l.contentWindow.document.readyState==="c
Line truncated
|
||||
[`+j+"] ";for(se in arguments[0])a(arguments[0],se)&&(F+=se+": "+arguments[0][se]+", ");F=F.slice(0,-2)}else F=arguments[j];S.push(F)}P(f+`
|
||||
Arguments: `+Array.prototype.slice.call(S).join("")+`
|
||||
`+new Error().stack),w=!1}return p.apply(this,arguments)},p)}var G={};function J(f,p){t.deprecationHandler!=null&&t.deprecationHandler(f,p),G[f]||(P(p),G[f]=!0)}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;function Q(f){return typeof Function!="undefined"&&f instanceof Function||Object.prototype.toString.call(f)==="[object Function]"}function oe(f){var p,w;for(w in f)a(f,w)&&(p=f[w],Q(p)?this[w]=p:this["_"+w]=p);this._config=f,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function te(f,p){var w=d({},f),S;for(S in p)a(p,S)&&(i(f[S])&&i(p[S])?(w[S]={},d(w[S],f[S]),d(w[S],p[S])):p[S]!=null?w[S]=p[S]:delete w[S]);for(S in f)a(f,S)&&!a(p,S)&&i(f[S])&&(w[S]=d({},w[S]));return w}function re(f){f!=null&&this.set(f)}var ne;Object.keys?ne=Object.keys:ne=function(f){var p,w=[];for(p in f)a(f,p)&&w.push(p);return w};var be={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function pe(f,p,w){var S=this._calendar[f]||this._calendar.sameElse;return Q(S)?S.call(p,w):S}function De(f,p,w){var S=""+Math.abs(f),F=p-S.length,j=f>=0;return(j?w?"+":"":"-")+Math.pow(10,Math.max(0,F)).toString().substr(1)+S}var Ce=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Je={},it={};function N(f,p,w,S){var F=S;typeof S=="string"&&(F=function(){return this[S]()}),f&&(it[f]=F),p&&(it[p[0]]=function(){return De(F.apply(this,arguments),p[1],p[2])}),w&&(it[w]=function(){return this.localeData().ordinal(F.apply(this,arguments),f)})}function Ze(f){return f.match(/\[[\s\S]/)?f.replace(/^\[|\]$/g,""):f.replace(/\\/g,"")}function It(f){var p=f.match(Ce),w,S;for(w=0,S=p.length;w<S;w++)it[p[w]]?p[w]=it[p[w]]:p[w]=Ze(p[w]);return function(F){var j="",se;for(se=0;se<S;se++)j+=Q(p[se])?p[se].call(F,f):p[se];return j}}function Mt(f,p){return f.isValid()?(p=jt(p,f.localeData()),Je[p]=Je[p]||It(p),Je[p](f)):f.localeData().invalidDate()}function jt(f,p){var w=5;function S(F){return p.longDateFormat(F)||F}for(U.lastIndex=0;w>=0&&U.test(f);)f=f.replace(U,S),U.lastIndex=0,w-=1;return f}var vt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Wt(f){var p=this._longDateFormat[f],w=this._longDateFormat[f.toUpperCase()];return p||!w?p:(this._longDateFormat[f]=w.match(Ce).map(function(S){return S==="MMMM"||S==="MM"||S==="DD"||S==="dddd"?S.slice(1):S}).join(""),this._longDateFormat[f])}var Tt="Invalid date";function Jt(){return this._invalidDate}var en="%d",gn=/\d{1,2}/;function yn(f){return this._ordinal.replace("%d",f)}var vn={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function xn(f,p,w,S){var F=this._relativeTime[w];return Q(F)?F(f,p,w,S):F.replace(/%d/i,f)}function jn(f,p){var w=this._relativeTime[f>0?"future":"past"];return Q(w)?w(p):w.replace(/%s/i,p)}var sn={};function Rt(f,p){var w=f.toLowerCase();sn[w]=sn[w+"s"]=sn[p]=f}function Vt(f){return typeof f=="string"?sn[f]||sn[f.toLowerCase()]:void 0}function Sr(f){var p={},w,S;for(S in f)a(f,S)&&(w=Vt(S),w&&(p[w]=f[S]));return p}var Rr={};function Bt(f,p){Rr[f]=p}function Hr(f){var p=[],w;for(w in f)a(f,w)&&p.push({unit:w,priority:Rr[w]});return p.sort(function(S,F){return S.priority-F.priority}),p}function rn(f){return f%4===0&&f%100!==0||f%400===0}function At(f){return f<0?Math.ceil(f)||0:Math.floor(f)}function Z(f){var p=+f,w=0;return p!==0&&isFinite(p)&&(w=At(p)),w}function me(f,p){return function(w){return w!=null?(at(this,f,w),t.updateOffset(this,p),this):Ie(this,f)}}function Ie(f,p){return f.isValid()?f._d["get"+(f._isUTC?"UTC":"")+p]():NaN}function at(f,p,w){f.isValid()&&!isNaN(w)&&(p==="FullYear"&&rn(f.year())&&f.month()===1&&f.date()===29?(w=Z(w),f._d["set"+(f._isUTC?"UTC":"")+p](w,f.month(),b(w,f.month()))):f._d["set"+(f._isUTC?"UTC":"")+p](w))}function Dt(f){return f=Vt(f),Q(this[f])?this[f]():this}function Cn(f,p){if(typeof f=="object"){f=Sr(f);var w=Hr(f),S,F=w.length;for(S=0;S<F;S++)this[w[S].unit](f[w[S].unit])}else if(f=Vt(f),Q(this[f]))return this[f](p);return this}var _n=/\d/,Ht=/\d\d/,ar=/\d{3}/,ht=/\d{4}/,St=/[+-]?\d{6}/,L=/\d\d?/,K=/\d\d\d\d?/,ee=/\d\d\d\d\d\d?/,ue=/\d{1,3}/,de=/\d{1,4}/,ve=/[+-]?\d{1,6}/,ge=/\d+/,M=/[+-]?\d+/,H=/Z|[+-]\d\d:?\d\d/gi,q=/Z|[+-]\d\d(?::?\d\d)?/gi,ie=/[+-]?\d+(\.\d{1,3})?/,ye=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ce;ce={};function ae(f,p,w){ce[f]=Q(p)?p:function(S,F){return S&&w?w:p}}function Se(f,p){return
Line truncated
|
||||
Search pattern: "`.concat(v,'"'));var I=this._prepareSearchers(v),C=I.tokenSearchers,x=I.fullSearcher,O=this._search(C,x),A=O.weights,P=O.results;return this._computeScore(A,P),this.options.shouldSort&&this._sort(P),D.limit&&typeof D.limit=="number"&&(P=P.slice(0,D.limit)),this._format(P)}},{key:"_prepareSearchers",value:function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",D=[];if(this.options.tokenize)for(var I=v.split(this.options.tokenSeparator),C=0,x=I.length;C<x;C+=1)D.push(new u(I[C],this.options));return{tokenSearchers:D,fullSearcher:new u(v,this.options)}}},{key:"_search",value:function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],D=arguments.length>1?arguments[1]:void 0,I=this.list,C={},x=[];if(typeof I[0]=="string"){for(var O=0,A=I.length;O<A;O+=1)this._analyze({key:"",value:I[O],record:O,index:O},{resultMap:C,results:x,tokenSearchers:v,fullSearcher:D});return{weights:null,results:x}}for(var P={},B=0,G=I.length;B<G;B+=1)for(var J=I[B],Q=0,oe=this.options.keys.length;Q<oe;Q+=1){var te=this.options.keys[Q];if(typeof te!="string"){if(P[te.name]={weight:1-te.weight||1},te.weight<=0||te.weight>1)throw new Error("Key weight has to be > 0 and <= 1");te=te.name}else P[te]={weight:1};this._analyze({key:te,value:this.options.getFn(J,te),record:J,index:B},{resultMap:C,results:x,tokenSearchers:v,fullSearcher:D})}return{weights:P,results:x}}},{key:"_analyze",value:function(v,D){var I=v.key,C=v.arrayIndex,x=C===void 0?-1:C,O=v.value,A=v.record,P=v.index,B=D.tokenSearchers,G=B===void 0?[]:B,J=D.fullSearcher,Q=J===void 0?[]:J,oe=D.resultMap,te=oe===void 0?{}:oe,re=D.results,ne=re===void 0?[]:re;if(O!=null){var be=!1,pe=-1,De=0;if(typeof O=="string"){this._log(`
|
||||
Key: `.concat(I===""?"-":I));var Ce=Q.search(O);if(this._log('Full text: "'.concat(O,'", score: ').concat(Ce.score)),this.options.tokenize){for(var U=O.split(this.options.tokenSeparator),Je=[],it=0;it<G.length;it+=1){var N=G[it];this._log(`
|
||||
Pattern: "`.concat(N.pattern,'"'));for(var Ze=!1,It=0;It<U.length;It+=1){var Mt=U[It],jt=N.search(Mt),vt={};jt.isMatch?(vt[Mt]=jt.score,be=!0,Ze=!0,Je.push(jt.score)):(vt[Mt]=1,this.options.matchAllTokens||Je.push(1)),this._log('Token: "'.concat(Mt,'", score: ').concat(vt[Mt]))}Ze&&(De+=1)}pe=Je[0];for(var Wt=Je.length,Tt=1;Tt<Wt;Tt+=1)pe+=Je[Tt];pe/=Wt,this._log("Token score average:",pe)}var Jt=Ce.score;pe>-1&&(Jt=(Jt+pe)/2),this._log("Score average:",Jt);var en=!this.options.tokenize||!this.options.matchAllTokens||De>=G.length;if(this._log(`
|
||||
Check Matches: `.concat(en)),(be||Ce.isMatch)&&en){var gn=te[P];gn?gn.output.push({key:I,arrayIndex:x,value:O,score:Jt,matchedIndices:Ce.matchedIndices}):(te[P]={item:A,output:[{key:I,arrayIndex:x,value:O,score:Jt,matchedIndices:Ce.matchedIndices}]},ne.push(te[P]))}}else if(c(O))for(var yn=0,vn=O.length;yn<vn;yn+=1)this._analyze({key:I,arrayIndex:yn,value:O[yn],record:A,index:P},{resultMap:te,results:ne,tokenSearchers:G,fullSearcher:Q})}}},{key:"_computeScore",value:function(v,D){this._log(`
|
||||
|
||||
Computing score:
|
||||
`);for(var I=0,C=D.length;I<C;I+=1){for(var x=D[I].output,O=x.length,A=1,P=1,B=0;B<O;B+=1){var G=v?v[x[B].key].weight:1,J=(G===1?x[B].score:x[B].score||.001)*G;G!==1?P=Math.min(P,J):(x[B].nScore=J,A*=J)}D[I].score=P===1?A:P,this._log(D[I])}}},{key:"_sort",value:function(v){this._log(`
|
||||
|
||||
Sorting....`),v.sort(this.options.sortFn)}},{key:"_format",value:function(v){var D=[];if(this.options.verbose){var I=[];this._log(`
|
||||
|
||||
Output:
|
||||
|
||||
`,JSON.stringify(v,function(J,Q){if(o(Q)==="object"&&Q!==null){if(I.indexOf(Q)!==-1)return;I.push(Q)}return Q})),I=null}var C=[];this.options.includeMatches&&C.push(function(J,Q){var oe=J.output;Q.matches=[];for(var te=0,re=oe.length;te<re;te+=1){var ne=oe[te];if(ne.matchedIndices.length!==0){var be={indices:ne.matchedIndices,value:ne.value};ne.key&&(be.key=ne.key),ne.hasOwnProperty("arrayIndex")&&ne.arrayIndex>-1&&(be.arrayIndex=ne.arrayIndex),Q.matches.push(be)}}}),this.options.includeScore&&C.push(function(J,Q){Q.score=J.score});for(var x=0,O=v.length;x<O;x+=1){var A=v[x];if(this.options.id&&(A.item=this.options.getFn(A.item,this.options.id)[0]),C.length){for(var P={item:A.item},B=0,G=C.length;B<G;B+=1)C[B](A,P);D.push(P)}else D.push(A.item)}return D}},{key:"_log",value:function(){var v;this.options.verbose&&(v=console).log.apply(v,arguments)}}])&&s(h.prototype,g),y&&s(h,y),m}();n.exports=d},function(n,i,a){function o(d,m){for(var h=0;h<m.length;h++){var g=m[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}var s=a(3),u=a(4),l=a(7),c=function(){function d(y,v){var D=v.location,I=D===void 0?0:D,C=v.distance,x=C===void 0?100:C,O=v.threshold,A=O===void 0?.6:O,P=v.maxPatternLength,B=P===void 0?32:P,G=v.isCaseSensitive,J=G!==void 0&&G,Q=v.tokenSeparator,oe=Q===void 0?/ +/g:Q,te=v.findAllMatches,re=te!==void 0&&te,ne=v.minMatchCharLength,be=ne===void 0?1:ne;(function(pe,De){if(!(pe instanceof De))throw new TypeError("Cannot call a class as a function")})(this,d),this.options={location:I,distance:x,threshold:A,maxPatternLength:B,isCaseSensitive:J,tokenSeparator:oe,findAllMatches:re,minMatchCharLength:be},this.pattern=this.options.isCaseSensitive?y:y.toLowerCase(),this.pattern.length<=B&&(this.patternAlphabet=l(this.pattern))}var m,h,g;return m=d,(h=[{key:"search",value:function(y){if(this.options.isCaseSensitive||(y=y.toLowerCase()),this.pattern===y)return{isMatch:!0,score:0,matchedIndices:[[0,y.length-1]]};var v=this.options,D=v.maxPatternLength,I=v.tokenSeparator;if(this.pattern.length>D)return s(y,this.pattern,I);var C=this.options,x=C.location,O=C.distance,A=C.threshold,P=C.findAllMatches,B=C.minMatchCharLength;return u(y,this.pattern,this.patternAlphabet,{location:x,distance:O,threshold:A,findAllMatches:P,minMatchCharLength:B})}}])&&o(m.prototype,h),g&&o(m,g),d}();n.exports=c},function(n,i){var a=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;n.exports=function(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:/ +/g,l=new RegExp(s.replace(a,"\\$&").replace(u,"|")),c=o.match(l),d=!!c,m=[];if(d)for(var h=0,g=c.length;h<g;h+=1){var y=c[h];m.push([o.indexOf(y),y.length-1])}return{score:d?.5:1,isMatch:d,matchedIndices:m}}},function(n,i,a){var o=a(5),s=a(6);n.exports=function(u,l,c,d){for(var m=d.location,h=m===void 0?0:m,g=d.distance,y=g===void 0?100:g,v=d.threshold,D=v===void 0?.6:v,I=d.findAllMatches,C=I!==void 0&&I,x=d.minMatchCharLength,O=x===void 0?1:x,A=h,P=u.length,B=D,G=u.indexOf(l,A),J=l.length,Q=[],oe=0;oe<P;oe+=1)Q[oe]=0;if(G!==-1){var te=o(l,{errors:0,currentLocation:G,expectedLocation:A,distance:y});if(B=Math.min(te,B),(G=u.lastIndexOf(l,A+J))!==-1){var re=o(l,{errors:0,currentLocation:G,expectedLocation:A,distance:y});B=Math.min(re,B)}}G=-1;for(var ne=[],be=1,pe=J+P,De=1<<J-1,Ce=0;Ce<J;Ce+=1){for(var U=0,Je=pe;U<Je;)o(l,{errors:Ce,currentLocation:A+Je,expectedLocation:A,distance:y})<=B?U=Je:pe=Je,Je=Math.floor((pe-U)/2+U);pe=Je;var it=Math.max(1,A-Je+1),N=C?P:Math.min(A+Je,P)+J,Ze=Array(N+2);Ze[N+1]=(1<<Ce)-1;for(var It=N;It>=it;It-=1){var Mt=It-1,jt=c[u.charAt(Mt)];if(jt&&(Q[Mt]=1),Ze[It]=(Ze[It+1]<<1|1)&jt,Ce!==0&&(Ze[It]|=(ne[It+1]|ne[It])<<1|1|ne[It+1]),Ze[It]&De&&(be=o(l,{errors:Ce,currentLocation:Mt,expectedLocation:A,distance:y}))<=B){if(B=be,(G=Mt)<=A)break;it=Math.max(1,2*A-G)}}if(o(l,{errors:Ce+1,currentLocation:A,expectedLocation:A,distance:y})>B)break;ne=Ze}return{isMatch:G>=0,score:be===0?.001:be,matchedIndices:s(Q,O)}}},function(n,i){n.exports=function(a,o){var s=o.errors,u=s===void 0?0:s,l=o.currentLocation,c=l===void 0?0:l,d=o.expectedLocation,m=d===void 0?0:d,h=o.distance,g=h===void 0?100:h,y=u/a.length,v=Math.abs(m-c);return g?y+v/g:v?1:y}},function(n,i){n.exports=function(){for(var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,s=[],u=-1,l=-1,c=0,d=a.length;c<d;c+=1){var m=a[c];m&&u===-1?u=c:m||u===-1||((l=c-1)-u+1>=o&&s.push([u,l]),u=-1)}return a[c-1]&&c-u>=o&&s.push([u,c-1]),s}},function(n,i){n.exports=function(a){for(var o={},s=a.length,u=0;u<s;u+=1)o[a.charAt(u)]=0;for(var l=0;l<s;l+=1)o[a.charAt(l)]|=1<<s-l-1;return o}},function(n,i,a){var o=a(0);n.exports=function(s,u){return function l(c,d,m){if(d){var h=d.indexOf("."),g=d,y=null;h!==-1&&(g=d.slice(0,h),y=d.slice(h+1));var v=c[g];if(v!=null)if(y||typeof v!="string"&&typeof v!="number")if(o(v))for(var D=0,I=v.length;D<I;D+=1)l(v[D],y,m);else y&&l(v,y,m);else m.push(v.toString())}el
Line truncated
|
||||
`).map(BI).filter(function(r){return r!==null});return Un(Un({},t[0]),t[1])}function tl(e){var t={},r=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!r)return t;var n=r[1],i=r[2];return n&&(t.tzid=n),t.dtstart=Zs(i),t}function BI(e){if(e=e.replace(/^\s+|\s+$/,""),!e.length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return Sw(e);var r=t[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return Sw(e);case"DTSTART":return tl(e);default:throw new Error("Unsupported RFC prop ".concat(r," in ").concat(e))}}function Sw(e){var t=e.replace(/^RRULE:/i,""),r=tl(t),n=e.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var a=i.split("="),o=a[0],s=a[1];switch(o.toUpperCase()){case"FREQ":r.freq=pt[s.toUpperCase()];break;case"WKST":r.wkst=Ur[s.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=VI(s),l=o.toLowerCase();r[l]=u;break;case"BYWEEKDAY":case"BYDAY":r.byweekday=$I(s);break;case"DTSTART":case"TZID":var c=tl(e);r.tzid=c.tzid,r.dtstart=c.dtstart;break;case"UNTIL":r.until=Zs(s);break;case"BYEASTER":r.byeaster=Number(s);break;default:throw new Error("Unknown RRULE property '"+o+"'")}}),r}function VI(e){if(e.indexOf(",")!==-1){var t=e.split(",");return t.map(Ew)}return Ew(e)}function Ew(e){return/^[+-]?\d+$/.test(e)?Number(e):e}function $I(e){var t=e.split(",");return t.map(function(r){if(r.length===2)return Ur[r];var n=r.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(r));var i=Number(n[1]),a=n[2],o=Ur[a].weekday;return new Mn(o,i)})}var Ka=function(){function e(t,r){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=r}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=Fo(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:fw(this.date,this.tzid)},e}();function rl(e){for(var t=[],r="",n=Object.keys(e),i=Object.keys(el),a=0;a<n.length;a++)if(n[a]!=="tzid"&&Et(i,n[a])){var o=n[a].toUpperCase(),s=e[n[a]],u="";if(!(!Gt(s)||$n(s)&&!s.length)){switch(o){case"FREQ":u=Oe.FREQUENCIES[e.freq];break;case"WKST":Cr(s)?u=new Mn(s).toString():u=s.toString();break;case"BYWEEKDAY":o="BYDAY",u=sw(s).map(function(h){return h instanceof Mn?h:$n(h)?new Mn(h[0],h[1]):new Mn(h)}).toString();break;case"DTSTART":r=UI(s,e.tzid);break;case"UNTIL":u=Fo(s,!e.tzid);break;default:if($n(s)){for(var l=[],c=0;c<s.length;c++)l[c]=String(s[c]);u=l.toString()}else u=String(s)}u&&t.push([o,u])}}var d=t.map(function(h){var g=h[0],y=h[1];return"".concat(g,"=").concat(y.toString())}).join(";"),m="";return d!==""&&(m="RRULE:".concat(d)),[r,m].filter(function(h){return!!h}).join(`
|
||||
`)}function UI(e,t){return e?"DTSTART"+new Ka(new Date(e),t).toString():""}function WI(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every(function(r,n){return r.getTime()===t[n].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var kw=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(t,r,n){r&&(r=r instanceof Date?Cu(r):ch(r)),t==="all"?this.all=r:(n._value=r,this[t].push(n))},e.prototype._cacheGet=function(t,r){var n=!1,i=r?Object.keys(r):[],a=function(c){for(var d=0;d<i.length;d++){var m=i[d];if(!WI(r[m],c[m]))return!0}return!1},o=this[t];if(t==="all")n=this.all;else if($n(o))for(var s=0;s<o.length;s++){var u=o[s];if(!(i.length&&a(u))){n=u._value;break}}if(!n&&this.all){for(var l=new Vi(t,r),s=0;s<this.all.length&&l.accept(this.all[s]);s++);n=l.getValue(),this._cacheAdd(t,n,r)}return $n(n)?ch(n):n instanceof Date?Cu(n):n},e}();var xw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],wt(1,31),!0),wt(2,28),!0),wt(3,31),!0),wt(4,30),!0),wt(5,31),!0),wt(6,30),!0),wt(7,31),!0),wt(8,31),!0),wt(9,30),!0),wt(10,31),!0),wt(11,30),!0),wt(12,31),!0),wt(1,7),!0),Cw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],wt(1,31),!0),wt(2,29),!0),wt(3,31),!0),wt(4,30),!0),wt(5,31),!0),wt(6,30),!0),wt(7,31),!0),wt(8,31),!0),wt(9,30),!0),wt(10,31),!0),wt(11,30),!0),wt(12,31),!0),wt(1,7),!0),YI=$r(1,29),zI=$r(1,30),ua=$r(1,31),Gn=$r(1,32),_w=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Gn,!0),zI,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn.slice(0,7),!0),Mw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Gn,!0),YI,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn.slice(0,7),!0),KI=$r(-28,0),jI=$r(-29,0),ca=$r(-30,0),Jn=$r(-31,0),Tw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Jn,!0),jI,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn.slice(0,7),!0),Fw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Jn,!0),KI,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn.slice(0,7),!0),Iw=[0,31,60,91,121,152,182,213,244,274,305,335,366],Aw=[0,31,59,90,120,151,181,212,243,273,304,334,365],mh=function(){for(var e=[],t=0;t<55;t++)e=e.concat($r(7));return e}();function Ow(e,t){var r=pi(e,1,1),n=To(e)?366:365,i=To(e+1)?366:365,a=Js(r),o=Hi(r),s=Un(Un({yearlen:n,nextyearlen:i,yearordinal:a,yearweekday:o},qI(e)),{wnomask:null});if(_r(t.byweekno))return s;s.wnomask=wt(0,n+7);var u,l,c=u=qn(7-o+t.wkst,7);c>=4?(c=0,l=s.yearlen+qn(o-t.wkst,7)):l=n-c;for(var d=Math.floor(l/7),m=qn(l,7),h=Math.floor(d+m/4),g=0;g<t.byweekno.length;g++){var y=t.byweekno[g];if(y<0&&(y+=h+1),y>0&&y<=h){var v=void 0;y>1?(v=c+(y-1)*7,c!==u&&(v-=7-u)):v=c;for(var D=0;D<7&&(s.wnomask[v]=1,v++,s.wdaymask[v]!==t.wkst);D++);}}if(Et(t.byweekno,1)){var v=c+h*7;if(c!==u&&(v-=7-u),v<n)for(var g=0;g<7&&(s.wnomask[v]=1,v+=1,s.wdaymask[v]!==t.wkst);g++);}if(c){var I=void 0;if(Et(t.byweekno,-1))I=-1;else{var C=Hi(pi(e-1,1,1)),x=qn(7-C.valueOf()+t.wkst,7),O=To(e-1)?366:365,A=void 0;x>=4?(x=0,A=O+qn(C-t.wkst,7)):A=n-c,I=Math.floor(52+qn(A,7)/4)}if(Et(t.byweekno,I))for(var v=0;v<c;v++)s.wnomask[v]=1}return s}function qI(e){var t=To(e)?366:365,r=pi(e,1,1),n=Hi(r);return t===365?{mmask:xw,mdaymask:Mw,nmdaymask:Fw,wdaymask:mh.slice(n),mrange:Aw}:{mmask:Cw,mdaymask:_w,nmdaymask:Tw,wdaymask:mh.slice(n),mrange:Iw}}function Lw(e,t,r,n,i,a){var o={lastyear:e,lastmonth:t,nwdaymask:[]},s=[];if(a.freq===Oe.YEARLY)if(_r(a.bymonth))s=[[0,r]];else for(var u=0;u<a.bymonth.length;u++)t=a.bymonth[u],s.push(n.slice(t-1,t+1));else a.freq===Oe.MONTHLY&&(s=[n.slice(t-1,t+1)]);if(_r(s))return o;o.nwdaymask=wt(0,r);for(var u=0;u<s.length;u++)for(var l=s[u],c=l[0],d=l[1]-1,m=0;m<a.bynweekday.length;m++){var h=void 0,g=a.bynweekday[m],y=g[0],v=g[1];v<0?(h=d+(v+1)*7,h-=qn(i[h]-y,7)):(h=c+(v-1)*7,h+=qn(7-i[h]+y,7)),c<=h&&h<=d&&(o.nwdaymask[h]=1)}return o}function Pw(e,t){t===void 0&&(t=0);var r=e%19,n=Math.floor(e/100),i=e%100,a=Math.floor(n/4),o=n%4,s=Math.floor((n+8)/25),u=Math.floor((n-s+1)/3),l=Math.floor(19*r+n-a-u+15)%30,c=Math.floor(i/4),d=i%4,m=Math.floor(32+2*o+2*c-l-d)%7,h=Math.floor((r+11*l+22*m)/451),g=Math.floor((l+m-7*h+114)/31),y=(l+m-7*h+114)%31+1,v=Date.UTC(e,g-1,y+t),D=Date.UTC(e,0,1);return[Math.ceil((v-D)/(1e3*60*60*24))]}var GI=function(){function e(t){this.options=t}return e.prototype.rebuild=function(t,r){var n=this.options;if(t!==this.lastyear&&(this.yearinfo=Ow(t,n)),bn(n.bynweekday)&&(r!==this.lastmonth||t!==this.lastyear)){var i=this.yearinfo,a=i.yearlen,o=i.mrange,s=i.wdaymask;this.monthinfo=Lw(t,r,a,o,s,n)}Gt(n.byeaster)&&(this.eastermask=Pw(t,n.byeaster))},Object.defineProperty(e.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"yearle
Line truncated
|
||||
`),n=0;n<r.length;){var i=r[n]=r[n].replace(/\s+$/g,"");i?n>0&&i[0]===" "?(r[n-1]+=i.slice(1),r.splice(n,1)):n+=1:r.splice(n,1)}return r}function aA(e){e.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function $w(e,t){return aA(t),e.split(",").map(function(r){return Zs(r)})}function Uw(e){var t=this;return function(r){if(r!==void 0&&(t["_".concat(e)]=r),t["_".concat(e)]!==void 0)return t["_".concat(e)];for(var n=0;n<t._rrule.length;n++){var i=t._rrule[n].origOptions[e];if(i)return i}}}var gh=function(e){Io(t,e);function t(r){r===void 0&&(r=!1);var n=e.call(this,{},r)||this;return n.dtstart=Uw.apply(n,["dtstart"]),n.tzid=Uw.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return t.prototype._iter=function(r){return Bw(r,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(r){Ww(r,this._rrule)},t.prototype.exrule=function(r){Ww(r,this._exrule)},t.prototype.rdate=function(r){Yw(r,this._rdate)},t.prototype.exdate=function(r){Yw(r,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(r){return Mu(r.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(r){return Mu(r.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(r){return new Date(r.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(r){return new Date(r.getTime())})},t.prototype.valueOf=function(){var r=[];return!this._rrule.length&&this._dtstart&&(r=r.concat(rl({dtstart:this._dtstart}))),this._rrule.forEach(function(n){r=r.concat(n.toString().split(`
|
||||
`))}),this._exrule.forEach(function(n){r=r.concat(n.toString().split(`
|
||||
`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&r.push(zw("RDATE",this._rdate,this.tzid())),this._exdate.length&&r.push(zw("EXDATE",this._exdate,this.tzid())),r},t.prototype.toString=function(){return this.valueOf().join(`
|
||||
`)},t.prototype.clone=function(){var r=new t(!!this._cache);return this._rrule.forEach(function(n){return r.rrule(n.clone())}),this._exrule.forEach(function(n){return r.exrule(n.clone())}),this._rdate.forEach(function(n){return r.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return r.exdate(new Date(n.getTime()))}),r},t}(Oe);function Ww(e,t){if(!(e instanceof Oe))throw new TypeError(String(e)+" is not RRule instance");Et(t.map(String),String(e))||t.push(e)}function Yw(e,t){if(!(e instanceof Date))throw new TypeError(String(e)+" is not Date instance");Et(t.map(Number),Number(e))||(t.push(e),Bi(t))}function zw(e,t,r){var n=!r||r.toUpperCase()==="UTC",i=n?"".concat(e,":"):"".concat(e,";TZID=").concat(r,":"),a=t.map(function(o){return Fo(o.valueOf(),n)}).join(",");return"".concat(i).concat(a)}var oA={},Kw=oA;var sA={},jw=sA;var lA={},qw=lA;var uA={"Open as kanban board":"\xD6ffne als Kanban-Board","Create new board":"Erstelle ein neues Board","Archive completed cards in active board":"Archiviere fertiggestellte Karten im aktiven Board","Error: current file is not a Kanban board":"Fehler: Momentan ge\xF6ffnete Datei ist kein Kanban-Board","Convert empty note to Kanban":"Konvertiere leere Notiz in ein Kanban-Board","Error: cannot create Kanban, the current note is not empty":"Fehler: Kanban konnte nicht erstellt werden, momentan ge\xF6ffnete Datei ist nicht leer","New kanban board":"Neues Kanban-Board","Untitled Kanban":"Unbenanntes Kanban","Toggle between Kanban and markdown mode":"Wechsle zwischen Kanban und Markdown Modus","Open as markdown":"\xD6ffne als Markdown","Open board settings":"\xD6ffne Board-Einstellungen","Archive completed cards":"Archiviere fertiggestellte Karten","Something went wrong":"Etwas ist schief gelaufen","You may wish to open as markdown and inspect or edit the file.":"Du kannst die Datei im Markdown Modus \xF6ffnen und \xFCberpr\xFCfen oder bearbeiten.","Are you sure you want to archive all completed cards on this board?":"Bist du dir sicher, dass du alle fertiggestellten Karten des Boards archivieren m\xF6chtest?",Complete:"Fertiggestellt",Archive:"Archiv","Invalid Kanban file: problems parsing frontmatter":"Fehlerhafte Kanban Datei: Probleme beim Parsen des Frontmatters","I don't know how to interpret this line:":"Ich wei\xDF nicht, wie ich diese Zeile interpretieren soll:",Untitled:"Unbenannt","Note: No template plugins are currently enabled.":"Beachte: Keine Template-Plugins sind derzeit aktiviert.",default:"Standard","Search...":"Suche...","These settings will take precedence over the default Kanban board settings.":"Diese Einstellung wird Vorrang vor der standard Kanban-Board Einstellung haben. ","Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.":"Stelle standard Kanban-Board Einstellungen ein. Einstellungen k\xF6nnen auf einer Board-f\xFCr-Board Basis \xFCberschrieben werden.","Note template":"Notiz Vorlage","This template will be used when creating new notes from Kanban cards.":"Diese Vorlage wird beim Erstellen neuer Notizen aus Kanban-Karten verwendet.","No template":"Keine Vorlage","Note folder":"Notiz Ordner","Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.":"Notizen, welche aus einer Kanban-Karte erstellt wurden, werden in diesem Ordner platziert. Falls leer, werden die Einstellungen des Vaults verwendet.","Default folder":"Standard Ordner","Maximum number of archived cards":"Maximale Anzahl archivierter Karten.","Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.":"Archivierte Karten k\xF6nnen im Markdown-Modus betrachtet werden. Diese Einstellung wird alte Karten l\xF6schen, sobald das Limit erreicht wird. Eine Einstellung von -1 setzt das Archiv auf eine unendliche Gr\xF6\xDFe.","Display card checkbox":"Zeige Karten Checkbox","When toggled, a checkbox will be displayed with each card":"Wenn aktiviert, wird eine Checkbox mit jeder Karte angezeigt.","Reset to default":"Zur\xFCcksetzen","Date & Time":"Datum & Uhrzeit","Date trigger":"Datums Ausl\xF6ser","When this is typed, it will trigger the date selector":"Wenn dies eingegeben wird, dann wird die Datumsauswahl angezeigt","Time trigger":"Uhrzeit Ausl\xF6ser","When this is typed, it will trigger the time selector":"Wenn dies eingegeben wird, dann wird die Uhrzeitsauswahl angezeigt","Date format":"Format des Datums","This format will be used when saving dates in markdown.":"Dieses Format wird verwendet, wenn ein Datum in Markdown gespeichert wird.","For more syntax, refer to":"F\xFCr mehr Syntax Informationen siehe","format reference":"Formatvorlage","Your current syntax looks like this":"Dein momentanes Format sieht so aus","Time format":"Format der Uhrzeit","Date display format":"Format der Datums Anzeige","This format will be used when d
Line truncated
|
||||
`)}),l,s]}var Fu=Object.freeze({"[":"]","(":")"});function AA(e,t){let r=e.indexOf("::",t);if(!(r<0))return{key:e.substring(t,r).trim(),valueIndex:r+2}}function OA(e,t,r,n){let i=0,a=!1;for(let o=t;o<e.length;o++){let s=e.charAt(o);if(s=="\\"){a=!a;continue}if(a){a=!1;continue}if(s==r?i++:s==n&&i--,i<0)return{value:e.substring(t,o).trim(),endIndex:o+1};a=!1}}function LA(e,t){let r=e.charAt(t),n=AA(e,t+1);if(n===void 0)return;for(let a of Object.keys(Fu).concat(Object.values(Fu)))if(n.key.includes(a))return;let i=OA(e,n.valueIndex,r,Fu[r]);if(i!==void 0)return{key:n.key,value:i.value,start:t,startValue:n.valueIndex,end:i.endIndex,wrapping:r}}var PA=/([🔺⏫🔼🔽⏬])\uFE0F?/u,NA=/🛫 *(\d{4}-\d{2}-\d{2})/u,RA=/➕ *(\d{4}-\d{2}-\d{2})/u,HA=/[⏳⌛] *(\d{4}-\d{2}-\d{2})/u,BA=/[📅📆🗓] *(\d{4}-\d{2}-\d{2})/u,VA=/✅ *(\d{4}-\d{2}-\d{2})/u,$A=/❌ *(\d{4}-\d{2}-\d{2})/u,UA=/⛔\uFE0F? *([a-zA-Z0-9-_]+)/u,WA=/🆔 *([a-zA-Z0-9-_]+)/u,YA=/🔁 *([a-zA-Z0-9; !]+)/u,yi=new Set(["priority","start","created","scheduled","due","completion","cancelled","id","dependsOn","repeat"]),zA=[{regex:PA,key:"priority"},{regex:NA,key:"start"},{regex:RA,key:"created"},{regex:HA,key:"scheduled"},{regex:BA,key:"due"},{regex:VA,key:"completion"},{regex:$A,key:"cancelled"},{regex:WA,key:"id"},{regex:UA,key:"dependsOn"},{regex:YA,key:"repeat"}];function KA(e){let t=[];for(let{regex:r,key:n}of zA){let i=r.exec(e);if(!i)continue;let a=i[1],o=i.index+i[0].length;if(n==="priority")a=IA(a);else if(n==="repeat"){let s=a.length;a=Oe.fromText(a).toText(),o-=s-a.length}t.push({key:n,value:a,start:i.index,startValue:i.index+1,end:o,wrapping:"emoji-shorthand"})}return t}function gb(e,t=!1){let r=il(),n=wh(),i=[];if(r)for(let o of Object.keys(Fu)){let s=e.indexOf(o);for(;s>=0;){let u=LA(e,s);if(!u){s=e.indexOf(o,s+1);continue}i.push(u),s=e.indexOf(o,u.end)}}n&&t&&(i=i.concat(KA(e))),i.sort((o,s)=>o.start-s.start);let a=[];for(let o=0;o<i.length;o++){let s=i[o];(o==0||a[a.length-1].end<s.start)&&a.push(s)}return a}function il(){return app.plugins.enabledPlugins.has("dataview")?app.plugins.plugins.dataview:null}var Eh="kanban-plugin";function Mr(){}var Dh=new Map;function $(e){if(Dh.has(e))return Dh.get(e);let t=`${Eh}__${e}`;return Dh.set(e,t),t}function et(e=9){return Math.random().toString(36).slice(2,2+e)}function Au(e,t,r,n,i,a,o){var h,g;let s=un(t,r.slice(0,-1)),u=un(i,a.slice(0,-1)),l=(h=s==null?void 0:s.data)==null?void 0:h.shouldMarkItemsComplete,c=(g=u==null?void 0:u.data)==null?void 0:g.shouldMarkItemsComplete;if(!l&&!c)return{next:o};let d=o.data.checked&&o.data.checkChar===Zn();if(c===d)return{next:o};c&&(o=(0,Sh.default)(o,{data:{checkChar:{$set:Iu()}}}));let m=Ro(o,n.file);if(m){let[y,v,D]=m,I,C;return y.forEach((x,O)=>{O===D?I=n.getNewItem(x,v[O]):C=n.getNewItem(x,v[O])}),{next:I,replacement:C}}return{next:(0,Sh.default)(o,{data:{checked:{$set:c},checkChar:{$set:c?Zn():" "}}})}}function Ou(){let e=$e.useRef(!1);return{oncompositionstart:()=>{e.current=!0},oncompositionend:()=>{e.current=!1},getShouldIMEBlockAction:()=>e.current}}var jA=/<%/;async function yb(e,t){let r=t?e.app.vault.getAbstractFileByPath(t):null;if(r&&r instanceof da.TFile){let n=app.workspace.getActiveViewOfType(da.MarkdownView);try{(n==null?void 0:n.getMode())!=="source"&&await n.setState({...n.getState(),mode:"source"},{history:!1});let{templatesEnabled:i,templaterEnabled:a,templatesPlugin:o,templaterPlugin:s}=kh(e.app),u=await e.app.vault.read(r);if(i&&a)return jA.test(u)?await s.append_template_to_active_file(r):await o.instance.insertTemplate(r);if(i)return await o.instance.insertTemplate(r);if(a)return await s.append_template_to_active_file(r);await e.app.vault.modify(e.app.workspace.getActiveFile(),u)}catch(i){console.error(i),e.setError(i)}}}function ja(e){var s,u,l,c,d;let t=e.internalPlugins.plugins,r=(s=t["daily-notes"])==null?void 0:s.enabled,n=(u=t["daily-notes"])==null?void 0:u.instance.options.format,i=(l=e.plugins.plugins["nldates-obsidian"])==null?void 0:l.settings.format,a=(c=t.templates)==null?void 0:c.enabled,o=(d=t.templates)==null?void 0:d.instance.options.dateFormat;return r&&n||i||a&&o||"YYYY-MM-DD"}function Ho(e){var a,o,s;let t=e.internalPlugins.plugins,r=(a=e.plugins.plugins["nldates-obsidian"])==null?void 0:a.settings.timeFormat,n=(o=t.templates)==null?void 0:o.enabled,i=(s=t.templates)==null?void 0:s.instance.options.timeFormat;return r||n&&i||"HH:mm"}var vb=/[\\^$.*+?()[\]{}|]/g,qA=RegExp(vb.source);function Qn(e){return e&&qA.test(e)?e.replace(vb,"\\$&"):e||""}function kh(e){var s;let t=e.internalPlugins.plugins.templates,r=t.enabled,n=e.plugins.plugins["templater-obsidian"],i=e.plugins.enabledPlugins.has("templater-obsidian"),a=n&&((s=this.app.plugins.plugins["templater-obsidian"].settings)==null?void 0:s.empty_file_template),o=r?t.instance.options.folder:n?n.settings.template_folder:void 0;return{templatesPlugin:t,templatesEnabled:r,templaterPlugin:n==null?void 0:n.templater,templaterEnabled:i,templaterEmptyFileTemplat
Line truncated
|
||||
<span class='flatpickr-weekday'>
|
||||
${H.join("</span><span class='flatpickr-weekday'>")}
|
||||
</span>
|
||||
`}function Je(){n.calendarContainer.classList.add("hasWeeks");let M=Pt(r.document,"div","flatpickr-weekwrapper");M.appendChild(Pt(r.document,"span","flatpickr-weekday",n.l10n.weekAbbreviation));let H=Pt(r.document,"div","flatpickr-weeks");return M.appendChild(H),{weekWrapper:M,weekNumbers:H}}function it(M,H=!0){let q=H?M:M-n.currentMonth;q<0&&n._hidePrevMonthArrow===!0||q>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=q,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,ht("onYearChange"),re()),te(),ht("onMonthChange"),ee())}function N(M=!0,H=!0){if(n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,H===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){let{hours:q,minutes:ie,seconds:ye}=Jc(n.config);g(q,ie,ye)}n.redraw(),M&&ht("onChange")}function Ze(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),ht("onClose")}function It(){n.config!==void 0&&ht("onDestroy");for(let M=n._handlers.length;M--;)n._handlers[M].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){let M=n.calendarContainer.parentNode;if(M.lastChild&&M.removeChild(M.lastChild),M.parentNode){for(;M.firstChild;)M.parentNode.insertBefore(M.firstChild,M);M.parentNode.removeChild(M)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(M=>{try{delete n[M]}catch(H){}})}function Mt(M){return n.calendarContainer.contains(M)}function jt(M){if(n.isOpen&&!n.config.inline){let H=Dr(M),q=Mt(H),ye=!(H===n.input||H===n.altInput||n.element.contains(H)||M.path&&M.path.indexOf&&(~M.path.indexOf(n.input)||~M.path.indexOf(n.altInput)))&&!q&&!Mt(M.relatedTarget),ce=!n.config.ignoredFocusElements.some(ae=>ae.contains(H));ye&&ce&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&l(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function vt(M){if(!M||n.config.minDate&&M<n.config.minDate.getFullYear()||n.config.maxDate&&M>n.config.maxDate.getFullYear())return;let H=M,q=n.currentYear!==H;n.currentYear=H||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),q&&(n.redraw(),ht("onYearChange"),re())}function Wt(M,H=!0){var ce;let q=n.parseDate(M,void 0,H);if(n.config.minDate&&q&&br(q,n.config.minDate,H!==void 0?H:!n.minDateHasTime)<0||n.config.maxDate&&q&&br(q,n.config.maxDate,H!==void 0?H:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(q===void 0)return!1;let ie=!!n.config.enable,ye=(ce=n.config.enable)!=null?ce:n.config.disable;for(let ae=0,Se;ae<ye.length;ae++){if(Se=ye[ae],typeof Se=="function"&&Se(q))return ie;if(Se.getTime&&q!==void 0&&Se.getTime()===q.getTime())return ie;if(typeof Se=="string"){let nt=n.parseDate(Se,void 0,!0);return nt&&nt.getTime()===q.getTime()?ie:!ie}else if(typeof Se=="object"&&q!==void 0&&Se.from&&Se.to&&q.getTime()>=Se.from.getTime()&&q.getTime()<=Se.to.getTime())return ie}return!ie}function Tt(M){return n.daysContainer!==void 0?M.className.indexOf("hidden")===-1&&M.className.indexOf("flatpickr-disabled")===-1&&n.daysContainer.contains(M):!1}function Jt(M){let H=M.target===n._input,q=n._input.value.trimEnd()!==ue();H&&q&&!(M.relatedTarget&&Mt(M.relatedTarget))&&n.setDate(n._input.value,!0,M.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function en(M){let H=Dr(M),q=n.config.wrap?e.contains(H):H===n._input,ie=n.config.allowInput,ye=n.isOpen&&(!ie||!q),c
Line truncated
|
||||
`)}function ps({tags:e,searchQuery:t,alwaysShow:r}){let{stateManager:n}=Ee(tt),i=Lu(n),a=Ee(zn),o=n.useSetting("move-tags")||r;return!e.length||!o?null:E("div",{className:$("item-tags"),children:e.map((s,u)=>{let l=i(s);return E("a",{href:s,onClick:c=>{c.preventDefault();let d=n.getSetting("tag-action");if(a&&d==="kanban"){a.search(s,!0);return}n.app.internalPlugins.getPluginById("global-search").instance.openGlobalSearch(`tag:${s}`)},className:`tag ${$("item-tag")} ${t&&s.toLocaleLowerCase().contains(t)?"is-search-match":""}`,style:l&&{"--tag-color":l.color,"--tag-background":l.backgroundColor},children:[E("span",{children:s[0]}),s.slice(1)]},u)})})}var ad=zt(function({item:t,editState:r,setEditState:n,searchQuery:i,showMetadata:a=!0,isStatic:o}){let{stateManager:s,filePath:u,boardModifiers:l}=Ee(tt),c=fa(s),d=Fe(null);Ae(()=>{r===1?(d.current!==null&&l.updateItem(m,s.updateItemContent(t,d.current)),d.current=null):r===0&&(d.current=null)},[r,s,t]);let m=Ui(),{onEditDate:h,onEditTime:g}=ug(t),y=Ye((x,O,A)=>{if(!Ca(s,O,A))return n(1),!0},[s]),v=Ye(x=>{x.targetNode.instanceOf(HTMLElement)&&(x.targetNode.hasClass($("item-metadata-date"))?h(x):x.targetNode.hasClass($("item-metadata-time"))&&g(x))},[h,g]),D=Ye(()=>n(1),[]),I=Ye(()=>(n(0),!0),[t]),C=Ye(x=>{let O=x.target;if(O.hasClass("task-list-item-checkbox")){if(O.dataset.src)return;let A=parseInt(O.dataset.checkboxIndex,10),P=dN(s,t.data.titleRaw,A),B=s.updateItemContent(t,P);l.updateItem(m,B)}},[m,l,s,t]);return!o&&kn(r)?E("div",{className:$("item-input-wrapper"),children:E(_a,{editState:r,className:$("item-input"),onEnter:y,onEscape:I,onSubmit:D,value:t.data.titleRaw,onChange:x=>{x.docChanged&&(d.current=x.state.doc.toString().trim())}})}):E("div",{onClick:v,className:$("item-title"),children:[o?E(WS,{entityId:t.id,className:$("item-markdown"),markdownString:t.data.title,searchQuery:i,onPointerUp:C}):E(Sa,{entityId:t.id,className:$("item-markdown"),markdownString:t.data.title,searchQuery:i,onPointerUp:C}),a&&E("div",{className:$("item-metadata"),children:[E(rd,{item:t,stateManager:s}),E(id,{item:t,stateManager:s,filePath:u,getDateColor:c}),E(dk,{item:t,stateManager:s}),E(ps,{tags:t.data.metadata.tags,searchQuery:i})]})]})});function fN(e,t=[],r){return t.reduce((n,i)=>{if(yi.has(i.key))return n;let a=Pu(i,r);return n[i.key]=a,n},e||{})}function fk({item:e,searchQuery:t}){let{stateManager:r}=Ee(tt),n=r.useSetting("inline-metadata-position")==="metadata-table",i=r.useSetting("metadata-keys"),{fileMetadata:a,fileMetadataOrder:o,inlineMetadata:s}=e.data.metadata,u=Re(()=>{let c=n?fN(a,s,i||[]):a;return!c||!Object.keys(c).length?null:c},[a,s,i]),l=Re(()=>{let c=new Set(o||[]);return n&&(s!=null&&s.length)&&s.forEach(d=>{c.has(d.key)||c.add(d.key)}),Array.from(c)},[o,n,s]);return u?E("div",{className:$("item-metadata-wrapper"),children:E(gN,{metadata:u,order:l,searchQuery:t})}):null}function hN(e,t){let r;if(e.ts?r=(0,li.moment)(e.ts):li.moment.isMoment(e)?r=e:e instanceof Date&&(r=(0,li.moment)(e)),r){let n=t.getSetting(r.hours()===0?"date-display-format":"date-time-display-format");return r.format(n)}return null}function mN(e,t){if(typeof e!="object"||!e.path)return null;let r=app.vault.getAbstractFileByPath(e.path);if(r&&r instanceof li.TFile){let n=app.fileManager.generateMarkdownLink(r,t.file.path,e.subpath,e.display);return`${e.embed&&n[0]!=="!"?"!":""}${n}`}return`${e.embed?"!":""}[[${e.path}${e.display?`|${e.display}`:""}]]`}function hk(e){if(typeof e=="string"&&/^\d{4}-\d{2}-\d{2}/.test(e)){let r=(0,li.moment)(e);if(r.isValid())return r}if(li.moment.isMoment(e))return e;if(e instanceof Date)return(0,li.moment)(e);let t=(0,cg.getAPI)();return t!=null&&t.value.isDate(e)?(0,li.moment)(e.ts):null}function In(e,t){Ni(e)&&e.value&&(e=e.value);let r=hk(e);if(r)return hN(r,t);if(typeof e=="string")return e;if(e instanceof li.TFile)return e.path;if(Array.isArray(e))return e.map(i=>In(i,t)).join(" ");if(e.rrule)return e.toText();let n=(0,cg.getAPI)();return n?n.value.toString(e):`${e}`}function pN(e,t){return In(e.value,t)}function hs({data:e,dateLabel:t,searchQuery:r}){let{view:n,stateManager:i}=Ee(tt),a=fa(i),o=(s,u)=>{let l=mN(s,n),c=hk(s),d=In(s,i),m=r&&d.toLocaleLowerCase().contains(r),h;if(l||e.containsMarkdown)h=E(Sa,{className:"inline",markdownString:l||d,searchQuery:r});else if(c){let g=a(c);h=E("span",{className:Ge({[$("date")]:!0,"is-search-match":m,"has-background":g==null?void 0:g.backgroundColor}),style:g&&{"--date-color":g.color,"--date-background-color":g.backgroundColor},children:[!!t&&E("span",{className:$("item-metadata-date-label"),children:t}),E("span",{className:$("item-metadata-date"),children:d})]})}else m?h=E("span",{className:"is-search-match",children:d}):h=d;return E(ct,{children:[h,u?E("span",{children:u}):null]})};return Array.isArray(e.value)?E("span",{className:Ge([$("meta-value"),"mod-array"]),children:e.value.map((s,u,l)=>o(s,u<l.length-1?", ":void 0))}):E("span",{className:Ge([$("meta-value")]),children:o(e.value)})}var gN=zt(f
Line truncated
|
||||
`);function vk(e){return["","","%% kanban:settings","```",JSON.stringify(e.data.settings),"```","%%"].join(`
|
||||
`)}function wk(e,t){let r=e.data.metadata.fileMetadata,{titleSearchRaw:n}=e.data,i=[n];if(r){let a=Object.keys(r).filter(o=>{var s;return(s=e.data.metadata.fileMetadataOrder)==null?void 0:s.includes(o)});if(a.length){let o=In(a,t),s=In(a.map(u=>r[u]),t);o&&i.push(o),s&&i.push(s)}}return e.data.metadata.time?(i.push(e.data.metadata.time.format("LLLL")),i.push(In(e.data.metadata.time,t))):e.data.metadata.date&&(i.push(e.data.metadata.date.format("LLLL")),i.push(In(e.data.metadata.date,t))),i.join(" ").toLocaleLowerCase()}function yN(e,t,r){var n,i,a;if(e.plugins.enabledPlugins.has("dataview")&&((a=(i=(n=e.plugins)==null?void 0:n.plugins)==null?void 0:i.dataview)!=null&&a.api))return e.plugins.plugins.dataview.api.page(t.path,r.path)}function mk(e,t){if(!e)return null;if(e[t])return e[t];let r=t.split("."),n=e;for(let i of r)if(typeof n=="object"&&i in n)n=n[i];else{n=null;break}return n}function fg(e,t){let r=e.getSetting("metadata-keys");if(!r.length)return{};if(!t)return{};let n=e.app.metadataCache.getFileCache(t),i=yN(e.app,t,e.file);if(!n&&!i)return{};let a={},o={},s={},u=[],l=!1;return r.forEach(c=>{var h;if(s[c.metadataKey])return;if(s[c.metadataKey]=!0,c.metadataKey==="tags"){let g=(n==null?void 0:n.tags)||[];if(Array.isArray((h=n==null?void 0:n.frontmatter)==null?void 0:h.tags)&&(g=[].concat(g,n.frontmatter.tags.map(y=>({tag:`#${y}`})))),(g==null?void 0:g.length)===0)return;u.push(c.metadataKey),a.tags={...c,value:g.map(y=>y.tag).filter(y=>o[y]?!1:(o[y]=!0,!0)).sort(fr)},l=!0;return}let d=mk(i,c.metadataKey),m=mk(n==null?void 0:n.frontmatter,c.metadataKey);if(m!=null&&m!==""&&!(Array.isArray(m)&&m.length===0)){if(typeof m=="string"){if(/^\d{4}-\d{2}-\d{2}/.test(m))m=(0,pk.moment)(m);else if(/^\[\[[^\]]+\]\]$/.test(m)){let g=(n.frontmatterLinks||[]).find(y=>y.key===c.metadataKey);if(g){let y=e.app.metadataCache.getFirstLinkpathDest(g.link,e.file.path);y&&(m=y)}}}else Array.isArray(m)&&(m=m.map((g,y)=>{if(typeof g=="string"&&/^\[\[[^\]]+\]\]$/.test(g)){let v=(n.frontmatterLinks||[]).find(D=>D.key===c.metadataKey+"."+y.toString());if(v){let D=e.app.metadataCache.getFirstLinkpathDest(v.link,e.file.path);if(D)return D}}return g}));u.push(c.metadataKey),a[c.metadataKey]={...c,value:m},l=!0}else if(d!=null&&d!==""&&!(Array.isArray(d)&&d.length===0)){let g=i[c.metadataKey];u.push(c.metadataKey),a[c.metadataKey]={...c,value:g},l=!0}}),{fileMetadata:l?a:void 0,fileMetadataOrder:u}}function bk(e,t){return!e&&t?!0:!["metadata-keys","date-trigger","time-trigger","link-date-to-daily-note","date-format","time-format","move-dates","move-tags","inline-metadata-position","move-task-metadata","hide-card-count","tag-colors","date-colors"].every(n=>e[n]===t[n])}function Dk(e,t){let r=(0,Vl.getDateFromFile)(t,"day");if(!r||!r.isValid())return;e.internalPlugins.plugins["daily-notes"].instance.gotoNextExisting(r)}function Sk(e,t){let r=(0,Vl.getDateFromFile)(t,"day");if(!r||!r.isValid())return;e.internalPlugins.plugins["daily-notes"].instance.gotoPreviousExisting(r)}function ed(e,t){let r=(0,Vl.getDailyNoteSettings)();return e.vault.getConfig("useMarkdownLinks")?`[${t}](${r.folder?`${encodeURIComponent(r.folder)}/`:""}${encodeURIComponent(t)}.md)`:`[[${t}]]`}function Ek(e){if(!e)return!1;let t=e.match(/---\s+([\w\W]+?)\s+---/);return!(!t||!t[1].contains(_t))}function hg(e){var r;if(!e)return!1;let t=app.metadataCache.getFileCache(e);return!!((r=t==null?void 0:t.frontmatter)!=null&&r[_t])}function cd(e,t){return t?`${e} (${t})`:e}function od(e,t,r,n,i){return e.document.body.createDiv({cls:`${$("date-picker")} ${$("ignore-click-outside")}`},a=>{a.style.left=`${r.x||0}px`,a.style.top=`${r.y||0}px`,a.createEl("input",{type:"text"},o=>{a.win.setTimeout(()=>{let s=null,u=d=>{d.target instanceof d.view.HTMLElement&&d.target.closest(`.${$("date-picker")}`)===null&&c()},l=d=>{d.key==="Escape"&&c()},c=()=>{s.destroy(),a.remove(),e.document.body.removeEventListener("click",u),e.document.removeEventListener("keydown",l)};s=Qc(o,{locale:zc(t),defaultDate:i,inline:!0,onChange:d=>{n(d),c()},win:e}),a.win.setTimeout(()=>{let d=a.clientHeight,m=a.clientWidth;r.y+d>e.innerHeight&&(a.style.top=`${(r.y||0)-d}px`),r.x+m>e.innerWidth&&(a.style.left=`${(r.x||0)-m}px`)}),e.document.body.addEventListener("click",u),e.document.addEventListener("keydown",l)})})})}function sd({stateManager:e,boardModifiers:t,item:r,hasDate:n,path:i}){let a=e.getSetting("date-format"),o=e.getSetting("link-date-to-daily-note"),s=e.getSetting("date-trigger"),u=o?"(?:\\[[^\\]]+\\]\\([^)]+\\)|\\[\\[[^\\]]+\\]\\])":"{[^}]+}",l=new RegExp(`(^|\\s)${Qn(s)}${u}`);return c=>{let d=c[0],m=(0,An.moment)(d).format(a),h=o?ed(e.app,m):`{${m}}`,g=r.data.titleRaw;n?g=r.data.titleRaw.replace(l,`$1${s}${h}`):g=`${r.data.titleRaw} ${s}${h}`,t.updateItem(i,e.updateItemContent(r,g))}}function lg(e){let t=e.getSetting("time-format"),r=[];for(let n=0;n<24;n++)r.push((0,An.moment)({hour:n}).format(t)),r.push((0,An.moment)({hour:n,minute:15}).format(t)),r.push((0,An.moment)({hour:n,minute:30}
Line truncated
|
||||
`)[0].trim(),h=m.replace(FN,"$1").replace(IN,"$1").replace(AN,"$1").replace(ON,"$1").replace(TN," ").trim().replace(LN," "),g=i.getSetting("new-note-folder"),y=i.getSetting("new-note-template"),v=g?i.app.vault.getAbstractFileByPath(g):i.app.fileManager.getNewFileParent(i.file.path),D=await i.app.fileManager.createNewMarkdownFile(v,h),I=i.app.workspace.splitActiveLeaf();await I.openFile(D),i.app.workspace.setActiveLeaf(I,!1,!0),await yb(i,y);let C=t.data.titleRaw.replace(m,i.app.fileManager.generateMarkdownLink(D,i.file.path));n.updateItem(r,i.updateItemContent(t,C))})}).addItem(d=>{d.setIcon("lucide-link").setTitle(R("Copy link to card")).onClick(()=>{if(t.data.blockId)navigator.clipboard.writeText(`${this.app.fileManager.generateMarkdownLink(i.file,"","#^"+t.data.blockId)}`);else{let m=et(6);navigator.clipboard.writeText(`${this.app.fileManager.generateMarkdownLink(i.file,"","#^"+m)}`),n.updateItem(r,i.updateItemContent((0,Lk.default)(t,{data:{blockId:{$set:m}}}),t.data.titleRaw))}})}).addSeparator(),/\n/.test(t.data.titleRaw)&&l.addItem(d=>{d.setIcon("lucide-wrap-text").setTitle(R("Split card")).onClick(async()=>{let m=t.data.titleRaw.split(/[\r\n]+/g).map(g=>g.trim()),h=await Promise.all(m.map(g=>i.getNewItem(g," ")));n.splitItem(r,h)})}),l.addItem(d=>{d.setIcon("lucide-copy").setTitle(R("Duplicate card")).onClick(()=>n.duplicateEntity(r))}).addItem(d=>{d.setIcon("lucide-list-start").setTitle(R("Insert card before")).onClick(()=>n.insertItems(r,[i.getNewItem(""," ",!0)]))}).addItem(d=>{d.setIcon("lucide-list-end").setTitle(R("Insert card after")).onClick(()=>{let m=[...r];m[m.length-1]=m[m.length-1]+1,n.insertItems(m,[i.getNewItem(""," ",!0)])})}).addItem(d=>{d.setIcon("lucide-arrow-up").setTitle(R("Move to top")).onClick(()=>n.moveItemToTop(r))}).addItem(d=>{d.setIcon("lucide-arrow-down").setTitle(R("Move to bottom")).onClick(()=>n.moveItemToBottom(r))}).addItem(d=>{d.setIcon("lucide-archive").setTitle(R("Archive card")).onClick(()=>n.archiveItem(r))}).addItem(d=>{d.setIcon("lucide-trash-2").setTitle(R("Delete card")).onClick(()=>n.deleteEntity(r))}).addSeparator().addItem(d=>{d.setIcon("lucide-calendar-check").setTitle(s?R("Edit date"):R("Add date")).onClick(()=>{var m;od(a.view,i,o,sd({stateManager:i,boardModifiers:n,item:t,hasDate:s,path:r}),(m=t.data.metadata.date)==null?void 0:m.toDate())})}),s&&(l.addItem(d=>{d.setIcon("lucide-x").setTitle(R("Remove date")).onClick(()=>{let m=i.getSetting("link-date-to-daily-note"),h=i.getSetting("date-trigger"),g=m?"(?:\\[[^\\]]+\\]\\([^\\)]+\\)|\\[\\[[^\\]]+\\]\\])":"{[^}]+}",y=new RegExp(`(^|\\s)${Qn(h)}${g}`),v=t.data.titleRaw.replace(y,"").trim();n.updateItem(r,i.updateItemContent(t,v))})}),l.addItem(d=>{d.setIcon("lucide-clock").setTitle(u?R("Edit time"):R("Add time")).onClick(()=>{ld(a.view,i,o,ud({stateManager:i,boardModifiers:n,item:t,hasTime:u,path:r}),t.data.metadata.time)})}),u&&l.addItem(d=>{d.setIcon("lucide-x").setTitle(R("Remove time")).onClick(()=>{let m=i.getSetting("time-trigger"),h=new RegExp(`(^|\\s)${Qn(m)}{([^}]+)}`),g=t.data.titleRaw.replace(h,"").trim();n.updateItem(r,i.updateItemContent(t,g))})})),l.addSeparator();let c=d=>{let m=i.state.children;if(!(m.length<=1))for(let h=0,g=m.length;h<g;h++)d.addItem(y=>y.setIcon("lucide-square-kanban").setChecked(r[0]===h).setTitle(m[h].data.title).onClick(()=>{r[0]!==h&&i.setState(v=>Ri(v,r,[h,0]))}))};pd.Platform.isPhone?c(l):l.addItem(d=>{let m=d.setTitle(R("Move to list")).setIcon("lucide-square-kanban").setSubmenu();c(m)}),l.showAtPosition(o)},[e,t,r,n,i])}var Pk=$e.memo(function({editState:t,setEditState:r,showMenu:n}){let i=$e.useMemo(()=>t?{"data-ignore-drag":!0}:{},[t]);return E("div",{...i,className:$("item-postfix-button-wrapper"),children:kn(t)?E("a",{"data-ignore-drag":!0,onPointerDown:a=>a.preventDefault(),onClick:()=>r(0),className:`${$("item-postfix-button")} is-enabled clickable-icon`,"aria-label":R("Cancel"),children:E(Ut,{name:"lucide-x"})}):E("a",{"data-ignore-drag":!0,onPointerDown:a=>a.preventDefault(),onClick:n,className:`${$("item-postfix-button")} clickable-icon`,"aria-label":R("More options"),children:E(Ut,{name:"lucide-more-vertical"})})})});var Nk=zt(function({item:t,shouldMarkItemsComplete:r,isMatch:n,searchQuery:i,isStatic:a}){let{stateManager:o,boardModifiers:s}=Ee(tt),[u,l]=Ne(0),c=Ee(cn);Ae(()=>{let v=()=>{kn(u)&&l(0)};return c.dragManager.emitter.on("dragStart",v),()=>{c.dragManager.emitter.off("dragStart",v)}},[c,u]),Ae(()=>{t.data.forceEditMode&&l({x:0,y:0})},[t.data.forceEditMode]);let d=Ui(),m=gd({boardModifiers:s,item:t,setEditState:l,stateManager:o,path:d}),h=Ye(v=>{kn(u)||v.targetNode.instanceOf(HTMLAnchorElement)&&(v.targetNode.hasClass("internal-link")||v.targetNode.hasClass("external-link"))||m(v)},[m,u]),g=Ye(v=>l({x:v.clientX,y:v.clientY}),[l]),y=Re(()=>kn(u)?{"data-ignore-drag":!0}:{},[u]);return E("div",{onDblClick:g,onContextMenu:h,className:$("item-content-wrapper"),...y,children:[E("div",{className:$("item-title-wrapper"),...y,children:[E(md,{boardM
Line truncated
|
||||
Available method signatures are:
|
||||
animateScrollTo(y:number, options)
|
||||
animateScrollTo([x:number | null, y:number | null], options)
|
||||
animateScrollTo(scrollToElement:Element, options)`;r+=a.horizontalOffset,n+=a.verticalOffset;let d=c.getMaxHorizontalScroll(),m=c.getHorizontalScroll();r>d&&(r=d);let h=r-m,g=c.getMaxVerticalScroll(),y=c.getVerticalScroll();n>g&&(n=g);let v=n-y,D=Math.abs(Math.round(h/1e3*a.speed)),I=Math.abs(Math.round(v/1e3*a.speed)),C=D>I?D:I;return C<a.minDuration?C=a.minDuration:C>a.maxDuration&&(C=a.maxDuration),new Promise((x,O)=>{h===0&&v===0&&x(!0),Ji.remove(c.element,!0);let A,P=()=>{oe(),activeWindow.cancelAnimationFrame(A),x(!1)};Ji.add(c.element,P);let B=ne=>ne.preventDefault(),G=a.cancelOnUserAction?P:B,J=a.cancelOnUserAction?{passive:!0}:{passive:!1},Q=["wheel","touchstart","keydown","mousedown"],oe=()=>{Q.forEach(ne=>{c.element.removeEventListener(ne,G,J)})};Q.forEach(ne=>{c.element.addEventListener(ne,G,J)});let te=Date.now(),re=()=>{var ne=Date.now()-te,be=ne/C;let pe=Math.round(m+h*a.easing(be)),De=Math.round(y+v*a.easing(be));ne<C&&(pe!==r||De!==n)?(c.scrollTo(pe,De),A=activeWindow.requestAnimationFrame(re)):(c.scrollTo(r,n),activeWindow.cancelAnimationFrame(A),oe(),Ji.remove(c.element,!1),x(!0))};A=activeWindow.requestAnimationFrame(re)})})}var vd=RN;var kg=Ct(ln());function Bk({children:e}){let t=$e.useMemo(()=>new Vo,[]);return E(sl.Provider,{value:t,children:e})}function Vk(e,t){let r=$e.useContext(ma),n=$e.useRef(null),i=$e.useContext(sl),a=o=>{n.current=o,n.current&&o.win.requestAnimationFrame(()=>{let s=i.getScrollState(e);s&&(s.x!==0||s.y!==0)&&(n.current.scrollLeft=s.x,n.current.scrollTop=s.y)})};return $e.useEffect(()=>{let o=n.current;if(!o)return;let s=dd(o.win,u=>{let l=u.target;i.setScrollState(r,e,{x:l.scrollLeft,y:l.scrollTop})});return o.addEventListener("scroll",s),()=>{o.removeEventListener("scroll",s)}},[i,e,t]),{setRef:a,scrollRef:n}}var HN="scroll-container",wd=8,bd=["top","right","bottom","left"],Dd=class{constructor(t,r,n,i){this.scrollFrame=0;this.observerQueue=[];this.onScroll=()=>{this.activeScroll.size===0&&(this.scrollState=Th(this.scrollEl),this.handleEntityRegistration())};this.onDragEnd=()=>{this.activeScroll.clear()};this.handleBeginDragScroll=({scrollEntitySide:t,scrollStrength:r})=>{this.isDoneScrolling(t)||(this.activeScroll.set(t,r),this.handleDragScroll())};this.handleUpdateDragScroll=({scrollEntitySide:t,scrollStrength:r})=>{this.isDoneScrolling(t)||this.activeScroll.set(t,r)};this.handleEndDragScroll=({scrollEntitySide:t})=>{this.activeScroll.delete(t)};this.dndManager=t,this.instanceId=et(),this.scopeId=r,this.triggerTypes=n,this.scrollState=Tr,this.parent=i,this.activeScroll=new Map,this.observerHandlers=new Map}initNodes(t){this.scrollEl=t,this.scrollEl.dataset.hitboxid=this.instanceId,this.scrollEl.dataset.scrollid=this.instanceId,this.top=this.createScrollEntity("top"),this.right=this.createScrollEntity("right"),this.bottom=this.createScrollEntity("bottom"),this.left=this.createScrollEntity("left"),this.bindScrollHandlers(),this.observer=new IntersectionObserver(n=>{n.forEach(i=>{var o;let a=(o=i.target.dataset)==null?void 0:o.hitboxid;if(a&&this.observerHandlers.has(a)){let s=this.observerHandlers.get(a);s&&s(i)}})},{root:t,threshold:.1});let{observerQueue:r}=this;this.observerQueue=[],r.forEach(([n,i,a])=>{this.observerHandlers.set(n,a),this.observer.observe(i)}),this.scrollEl.addEventListener("scroll",this.onScroll,{passive:!0,capture:!1}),this.dndManager.emitter.on("scrollResize",this.onScroll),this.scrollEl.win.setTimeout(()=>this.onScroll()),this.dndManager.observeResize(this.scrollEl),this.parent?this.parent.registerObserverHandler(this.instanceId,this.scrollEl,n=>{n.isIntersecting?this.handleEntityRegistration():this.handleEntityUnregistration()}):this.handleEntityRegistration()}destroy(){var t;!this.scrollEl&&!this.observer||(this.observerQueue.length=0,this.handleEntityUnregistration(),this.observer.disconnect(),this.unbindScrollHandlers(),this.scrollEl.removeEventListener("scroll",this.onScroll),this.dndManager.emitter.off("scrollResize",this.onScroll),(t=this.parent)==null||t.unregisterObserverHandler(this.instanceId,this.scrollEl),this.dndManager.unobserveResize(this.scrollEl))}handleEntityRegistration(){bd.forEach(t=>{let r=Dn(this.scrollEl),n=this.getId(t),i=this.dndManager.scrollEntities.has(n),a=this.isDoneScrolling(t);!a&&!i?this.dndManager.registerScrollEntity(n,this[t],r):a&&i&&this.dndManager.unregisterScrollEntity(n,r)})}handleEntityUnregistration(){bd.forEach(t=>{let r=Dn(this.scrollEl),n=this.getId(t);this.dndManager.unregisterScrollEntity(n,r)})}registerObserverHandler(t,r,n){this.observer?(this.observerHandlers.set(t,n),this.observer.observe(r)):this.observerQueue.push([t,r,n])}unregisterObserverHandler(t,r){this.observer?(this.observerHandlers.delete(t),this.observer.unobserve(r)):this.observerQueue=this.observerQueue.filter(n=>n[0]!==t)}bindScrollHandlers(){bd.forEach(t=>{let r=this.getId(t);this.dndManager.dragManager.emitter.on("beginDragScroll",this.handleBeginDragScroll,r),this.dndManager.dragManager.emitter.on("updateDragScr
Line truncated
|
||||
`).trim()}function Cd(e){let t=app.vault.getConfig("useTab");return e.trim().replace(/(?:\r\n|\n)/g,t?`
|
||||
`:`
|
||||
`)}function Sg(e,t){if(!t.data.blockId)return e;let r=e.split(/(?:\r\n|\n)/g);return r[0]+=" ^"+t.data.blockId,r.join(`
|
||||
`)}function qk(e){let t=e.split(/(?:\r\n|\n)/g);return t[0]=t[0].replace(/\s+\^([a-zA-Z0-9-]+)$/,""),t.join(`
|
||||
`)}function Eg(e){return e.trim().replace(/(?:\r\n|\n)(?: {4}|\t)/g,`
|
||||
`)}function co(e){e=Dg(e);let t=e.match(/^(.*?)\s*\((\d+)\)$/);return t==null?{title:e,maxItems:0}:{title:t[1],maxItems:Number(t[2])}}function Gk(e){return E("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",children:E("path",{fill:"currentColor",d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"})})}var $l=Ct(ln()),_d=require("obsidian");var Jk={delete:{description:R("Are you sure you want to delete this list and all its cards?"),confirm:R("Yes, delete list")},archive:{description:R("Are you sure you want to archive this list and all its cards?"),confirm:R("Yes, archive list")},"archive-items":{description:R("Are you sure you want to archive all cards in this list?"),confirm:R("Yes, archive cards")}};function Zk({action:e,cancel:t,onAction:r,lane:n}){return Ae(()=>{e&&n.children.length===0&&r()},[e,n.children.length]),!e||e&&n.children.length===0?null:E("div",{className:$("action-confirm-wrapper"),children:[E("div",{className:$("action-confirm-text"),children:Jk[e].description}),E("div",{children:[E("button",{onClick:r,className:$("confirm-action-button"),children:Jk[e].confirm}),E("button",{onClick:t,className:$("cancel-action-button"),children:"Cancel"})]})]})}function Qk({setEditState:e,path:t,lane:r}){let{stateManager:n,boardModifiers:i}=Ee(tt),[a,o]=Ne(null);return{settingsMenu:Re(()=>{let u=new Set,l=!1,c=!1;r.children.forEach(h=>{var y;let g=h.data.metadata.inlineMetadata;g&&g.forEach(v=>{v.key!=="repeat"&&(u.has(v.key)||u.add(v.key))}),!l&&h.data.metadata.date&&(l=!0),!c&&((y=h.data.metadata.tags)!=null&&y.length)&&(c=!0)});let d=new _d.Menu().addItem(h=>{h.setIcon("lucide-edit-3").setTitle(R("Edit list")).onClick(()=>e({x:0,y:0}))}).addItem(h=>{h.setIcon("lucide-archive").setTitle(R("Archive cards")).onClick(()=>o("archive-items"))}).addSeparator().addItem(h=>{h.setIcon("arrow-left-to-line").setTitle(R("Insert list before")).onClick(()=>i.insertLane(t,{...Ea,id:et(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}}))}).addItem(h=>{h.setIcon("arrow-right-to-line").setTitle(R("Insert list after")).onClick(()=>{let g=[...t];g[g.length-1]=g[g.length-1]+1,i.insertLane(g,{...Ea,id:et(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}})})}).addSeparator().addItem(h=>{h.setIcon("lucide-archive").setTitle(R("Archive list")).onClick(()=>o("archive"))}).addItem(h=>{h.setIcon("lucide-trash-2").setTitle(R("Delete list")).onClick(()=>o("delete"))}).addSeparator(),m=h=>{h.addItem(g=>{g.setIcon("arrow-down-up").setTitle(R("Sort by card text")).onClick(()=>{let y=r.children.slice(),v=r.data.sorted===0;y.sort((D,I)=>v?I.data.title.localeCompare(D.data.title):D.data.title.localeCompare(I.data.title)),i.updateLane(t,(0,$l.default)(r,{children:{$set:y},data:{sorted:{$set:r.data.sorted===0?1:0}}}))})}),l&&h.addItem(g=>{g.setIcon("arrow-down-up").setTitle(R("Sort by date")).onClick(()=>{let y=r.children.slice(),v=r.data.sorted===2?-1:1;y.sort((D,I)=>{let C=D.data.metadata.time||D.data.metadata.date,x=I.data.metadata.time||I.data.metadata.date;return C&&!x?-1*v:x&&!C?1*v:!C&&!x?0:(C.isBefore(x)?-1:1)*v}),i.updateLane(t,(0,$l.default)(r,{children:{$set:y},data:{sorted:{$set:r.data.sorted===2?3:2}}}))})}),c&&h.addItem(g=>{g.setIcon("arrow-down-up").setTitle(R("Sort by tags")).onClick(()=>{let y=n.getSetting("tag-sort"),v=r.children.slice(),D=r.data.sorted===4;v.sort((I,C)=>{var B,G;let x=I.data.metadata.tags,O=C.data.metadata.tags;if(!(x!=null&&x.length)&&!(O!=null&&O.length))return 0;if(!(x!=null&&x.length))return 1;if(!(O!=null&&O.length))return-1;let A=(B=y==null?void 0:y.findIndex(J=>x.includes(J.tag)))!=null?B:-1,P=(G=y==null?void 0:y.findIndex(J=>O.includes(J.tag)))!=null?G:-1;return A>-1&&P<0?D?1:-1:P>-1&&A<0?D?-1:1:A>-1&&P>-1?D?P-A:A-P:D?fr(O.join(""),x.join("")):fr(x.join(""),O.join(""))}),i.updateLane(t,(0,$l.default)(r,{children:{$set:v},data:{sorted:{$set:r.data.sorted===4?5:4}}}))})}),u.size&&u.forEach(g=>{h.addItem(y=>{y.setIcon("arrow-down-up").setTitle(R("Sort by")+" "+No(g).toLocaleLowerCase()).onClick(()=>{let v=r.children.slice(),D=r.data.sorted===g+"-asc";v.sort((I,C)=>{var A,P;let x=(A=I.data.metadata.inlineMetadata)==null?void 0:A.find(B=>B.key===g),O=(P=C.data.metadata.inlineMetadata)==null?void 0:P.find(B=>B.key===g);return x===void 0&&O===void 0?0:x===void 0?1:O===void 0?-1:D?fr(In(O.value,n),In(x.value,n)):fr(In(x.value,n),In(O.value,n))}),i.updateLane(t,(0,$l.default)(r,{children:{$set:v},data:{sorted:{$set:r.data.sorted===g+"-asc"?g+"-desc":g+"-asc"}}}))})})})};return _d.Platform.isPhone?m(d):d.addItem(h=>{let g=h.setTitle(R("Sort by")).setIcon("arrow-down-up").setSubmenu();m(g)}),d},[n,o,t,r]),confirmAction:a,setConfirmAction:o}}var Xk=Ct(ln());function ex({lane:e,lanePath:t,editState:r}){let{boardModifiers:n}=Ee(tt);return kn(r)?E("div",{className:$("lane-setting-wrapper"),children:E("div",{className:$("checkbox-wrapper"),children:[E("div",{className:$("checkbox-label"),children:R("Mark cards in this list as co
Line truncated
|
||||
font-size: .6rem;
|
||||
font-weight: bold;
|
||||
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,r==null?void 0:r.key)}return i}}function Ke(e,t,r,n){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:n}}function NR(e,t,r,n){let i=()=>{var o;return(o=a.getValue())!=null?o:e.options.renderFallbackValue},a={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(n),renderValue:i,getContext:ze(()=>[e,r,t,a],(o,s,u,l)=>({table:o,column:s,row:u,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ke(e.options,"debugCells","cell.getContext"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(a,r,t,e)},{}),a}function RR(e,t,r,n){var i,a;let s={...e._getDefaultColumnDef(),...t},u=s.accessorKey,l=(i=(a=s.id)!=null?a:u?u.replace(".","_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(".")?c=m=>{let h=m;for(let y of u.split(".")){var g;h=(g=h)==null?void 0:g[y]}return h}:c=m=>m[s.accessorKey]),!l)throw new Error;let d={id:`${String(l)}`,accessorFn:c,parent:n,depth:r,columnDef:s,columns:[],getFlatColumns:ze(()=>[!0],()=>{var m;return[d,...(m=d.columns)==null?void 0:m.flatMap(h=>h.getFlatColumns())]},Ke(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:ze(()=>[e._getOrderColumnsFn()],m=>{var h;if((h=d.columns)!=null&&h.length){let g=d.columns.flatMap(y=>y.getLeafColumns());return m(g)}return[d]},Ke(e.options,"debugColumns","column.getLeafColumns"))};for(let m of e._features)m.createColumn==null||m.createColumn(d,e);return d}var nr="debugHeaders";function Kx(e,t,r){var n;let a={id:(n=r.id)!=null?n:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let o=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),o.push(u)};return s(a),o},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(a,e)}),a}var HR={createTable:e=>{e.getHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,i)=>{var a,o;let s=(a=n==null?void 0:n.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?a:[],u=(o=i==null?void 0:i.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?o:[],l=r.filter(d=>!(n!=null&&n.includes(d.id))&&!(i!=null&&i.includes(d.id)));return Wd(t,[...s,...l,...u],e)},Ke(e.options,nr,"getHeaderGroups")),e.getCenterHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,i)=>(r=r.filter(a=>!(n!=null&&n.includes(a.id))&&!(i!=null&&i.includes(a.id))),Wd(t,r,e,"center")),Ke(e.options,nr,"getCenterHeaderGroups")),e.getLeftHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,n)=>{var i;let a=(i=n==null?void 0:n.map(o=>r.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return Wd(t,a,e,"left")},Ke(e.options,nr,"getLeftHeaderGroups")),e.getRightHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,n)=>{var i;let a=(i=n==null?void 0:n.map(o=>r.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return Wd(t,a,e,"right")},Ke(e.options,nr,"getRightHeaderGroups")),e.getFooterGroups=ze(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,"getFooterGroups")),e.getLeftFooterGroups=ze(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,"getLeftFooterGroups")),e.getCenterFooterGroups=ze(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,"getCenterFooterGroups")),e.getRightFooterGroups=ze(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,"getRightFooterGroups")),e.getFlatHeaders=ze(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),Ke(e.options,nr,"getFlatHeaders")),e.getLeftFlatHeaders=ze(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),Ke(e.options,nr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=ze(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),Ke(e.options,nr,"getCenterFlatHeaders")),e.getRightFlatHeaders=ze(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),Ke(e.options,nr,"getRightFlatHeaders")),e.getCenterLeafHeaders=ze(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Ke(e.options,nr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=ze(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Ke(e.options,nr,"getLeftLeafHeaders")),e.getRightLeafHeaders=ze(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var n;return!((n=r.subHeaders)!=null&&n.length)}),Ke(e.options,nr,"getRightLeafHeaders")),e.getLeafHeaders=ze(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,n)=>{var i,a,o,s,u,l;return[...(i=(a=t[0])==null?void 0:a.headers)!=null?i:[],...(o=(s=r[0])==null?void 0:s.headers)!=null?o:[],.
Line truncated
|
||||
`;break}case-3:{o=`\r
|
||||
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}var wy={};Rf(wy,{attentionMarkers:()=>gB,contentInitial:()=>cB,disable:()=>yB,document:()=>uB,flow:()=>fB,flowInitial:()=>dB,insideSpan:()=>pB,string:()=>hB,text:()=>mB});var uB={42:ir,43:ir,45:ir,48:ir,49:ir,50:ir,51:ir,52:ir,53:ir,54:ir,55:ir,56:ir,57:ir,62:tf},cB={91:dy},dB={[-2]:Ql,[-1]:Ql,32:Ql},fB={35:hy,42:vo,45:[cf,vo],60:py,61:cf,95:vo,96:af,126:af},hB={38:rf,92:nf},mB={[-5]:Xl,[-4]:Xl,[-3]:Xl,33:yy,38:rf,42:Zl,60:[ly,gy],91:vy,92:[fy,nf],93:yo,95:Zl,96:uy},pB={null:[Zl,o_]},gB={null:[42,95]},yB={null:[]};function f_(e){let r=zC([wy,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:r,content:i(QC),document:i(e_),flow:i(a_),string:i(s_),text:i(l_)};return n;function i(a){return o;function o(s){return d_(n,a,s)}}}var h_=/[\0\t\n\r]/g;function m_(){let e=1,t="",r=!0,n;return i;function i(a,o,s){let u=[],l,c,d,m,h;for(a=t+a.toString(o),d=0,t="",r&&(a.charCodeAt(0)===65279&&d++,r=void 0);d<a.length;){if(h_.lastIndex=d,l=h_.exec(a),m=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(m),!l){t=a.slice(d);break}if(h===10&&d===m&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),d<m&&(u.push(a.slice(d,m)),e+=m-d),h){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}d=m+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}function p_(e){for(;!of(e););return e}function df(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCharCode(r)}var vB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function g_(e){return e.replace(vB,wB)}function wB(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),a=i===120||i===88;return df(r.slice(a?2:1),a?16:10)}return Ts(r)||e}function Fs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?y_(e.position):"start"in e||"end"in e?y_(e):"line"in e||"column"in e?by(e):""}function by(e){return v_(e&&e.line)+":"+v_(e&&e.column)}function y_(e){return by(e&&e.start)+"-"+by(e&&e.end)}function v_(e){return e&&typeof e=="number"?e:1}var b_={}.hasOwnProperty,ff=function(e,t,r){return typeof t!="string"&&(r=t,t=void 0),bB(r)(p_(f_(r).document().write(m_()(e,t,!0))))};function bB(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Vt),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:s(xn),blockQuote:s(Jt),characterEscape:Q,characterReference:Q,codeFenced:s(en),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(en,u),codeText:s(gn,u),codeTextData:Q,data:Q,codeFlowValue:Q,definition:s(yn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(vn),hardBreakEscape:s(jn),hardBreakTrailing:s(jn),htmlFlow:s(sn,u),htmlFlowData:Q,htmlText:s(sn,u),htmlTextData:Q,image:s(Rt),label:u,link:s(Vt),listItem:s(Rr),listItemValue:g,listOrdered:s(Sr,h),listUnordered:s(Sr),paragraph:s(Bt),reference:It,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(xn),strong:s(Hr),thematicBreak:s(At)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:Tt,autolinkProtocol:Wt,blockQuote:c(),characterEscapeValue:oe,characterReferenceMarkerHexadecimal:jt,characterReferenceMarkerNumeric:jt,characterReferenceValue:vt,codeFenced:c(I),codeFencedFence:D,codeFencedFenceInfo:y,codeFencedFenceMeta:v,codeFlowValue:oe,codeIndented:c(C),codeText:c(pe),codeTextData:oe,data:oe,definition:c(),definitionDestinationString:A,definitionLabelString:x,definitionTitleString:O,emphasis:c(),hardBreakEscape:c(re),hardBreakTrailing:c(re),htmlFlow:c(ne),htmlFlowData:oe,htmlText:c(be),htmlTextData:oe,image:c(Ce),label:Je,labelText:U,lineEnding:te,link:c(De),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Mt,resourceDestinationString:it,resourceTitleString:N,resource:Ze,setextHeading:c(J),setextHeadingLineSequence:G,setextHeadingText:B,strong:c(),thematicBreak:c()}};D_(t,(e||{}).mdastExtensions||[]);let r={};return n;function n(Z){let me={type:"root",children:[]},Ie={stack:[me],tokenStack:[],config:t,enter:l,exit:d,buffer:u,resume:m,setData:a,getData:o},at=[],Dt=-1;for(;++Dt<Z.length;)if(Z[Dt][1].type==="listOrdered"||Z[Dt][1].type==="listUnordered")if(Z[Dt][0]==="enter")at.push(Dt);else{let Cn=at.pop();Dt=i(Z,Cn,Dt)}for(Dt=-1;++Dt<Z.length;){let Cn=t[Z[Dt][0]];b_.call(Cn,Z[Dt][1].type)&&Cn[Z[Dt][1].type].call(Object.assign({sliceSerialize:Z[Dt][2].sliceSerialize},Ie),Z[Dt][1])}if(Ie.tokenStack.length>0){let Cn=Ie.tokenStack[Ie.tokenStack.length-1];(Cn[1]||w_).call(Ie,void 0,Cn[0])}for(me.position={start:Ra(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:Ra(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Dt=-1;++Dt<t.transforms.lenLine truncated
|
||||
`),y=gb(h.title,!0);if(y!=null&&y.length){let D=h.metadata.inlineMetadata=y.reduce((x,O)=>(yi.has(O.key)?(g<=0||O.end<g)&&x.push(O):x.push(O),x),[]),I=e.getSetting("move-task-metadata"),C=e.getSetting("inline-metadata-position")!=="body";if(I||C){let x=h.title;for(let O of[...D].reverse()){let A=yi.has(O.key);A&&!I||!A&&!C||(x=x.slice(0,O.start)+x.slice(O.end))}h.title=x}}return(v=h.metadata.tags)==null||v.sort(fr),h}function OB(e,t,r){if(e.type!=="heading"||_s(e,{includeImageAlt:!1})!==R("Archive"))return!1;let n=HC(t,r);return n&&n.type==="thematicBreak"}function B_(e,t,r,n,i){let a=[],o=[];return n.children.forEach((s,u)=>{if(s.type==="heading"){let l=OB(s,n.children,u),c=ef(s),d=oy(i,c),m=!1,h=BC(n.children,u,"list",g=>{if(g.type==="heading")return!1;if(g.type==="paragraph"){let y=_s(g);if(y.startsWith("%% kanban:settings"))return!1;if(y===R("Complete"))return m=!0,!0}return!0});if(l&&h){o.push(...h.children.map(g=>({...Pc,id:et(),data:gf(e,i,g)})));return}h?a.push({...Ea,children:h.children.map(g=>{let y=gf(e,i,g);return{...Pc,id:et(),data:y}}),id:et(),data:{...co(d),shouldMarkItemsComplete:m}}):a.push({...Ea,children:[],id:et(),data:{...co(d),shouldMarkItemsComplete:m}})}}),{...Nc,id:e.file.path,children:a,data:{settings:t,frontmatter:r,archive:o,isSearching:!1,errors:[]}}}function _y(e,t,r){let n=`- [${t.data.checkChar}] ${Sg(Cd(r),t)}`,i=Cy(e,n),a=gf(e,n,i.children[0].children[0]),o=(0,pf.default)(t,{data:{$set:a}});try{ql(e,o)}catch(s){console.error(s)}return o}function V_(e,t,r,n){let i=`- [${r}] ${Cd(t)}`,a=Cy(e,i),o=gf(e,i,a.children[0].children[0]);o.forceEditMode=!!n;let s={...Pc,id:et(),data:o};try{ql(e,s)}catch(u){console.error(u)}return s}function $_(e,t){try{return(0,pf.default)(t,{children:{$set:t.children.map(r=>(0,pf.default)(r,{children:{$set:r.children.map(n=>_y(e,n,n.data.titleRaw))}}))}})}catch(r){throw e.setError(r),r}}function U_(e){return`- [${e.data.checkChar}] ${Sg(Cd(e.data.titleRaw),e)}`}function LB(e){let t=[];return t.push(`## ${jk(cd(e.data.title,e.data.maxItems))}`),t.push(""),e.data.shouldMarkItemsComplete&&t.push(gk),e.children.forEach(r=>{t.push(U_(r))}),t.push(""),t.push(""),t.push(""),t.join(`
|
||||
`)}function PB(e){if(e.length){let t=[yk,"",`## ${R("Archive")}`,""];return e.forEach(r=>{t.push(U_(r))}),t.join(`
|
||||
`)}return""}function W_(e){let t=e.children.reduce((n,i)=>n+LB(i),"");return["---","",(0,H_.stringifyYaml)(e.data.frontmatter),"---","",""].join(`
|
||||
`)+t+PB(e.data.archive)+vk(e)}var NB=["id","date","time","titleSearch","titleSearchRaw","file"],yf=class{constructor(t){this.stateManager=t}newItem(t,r,n){return V_(this.stateManager,t,r,n)}updateItemContent(t,r){return _y(this.stateManager,t,r)}boardToMd(t){return W_(t)}mdToBoard(t){let{ast:r,settings:n,frontmatter:i}=R_(this.stateManager,t),a=B_(this.stateManager,n,i,r,t),{state:o}=this.stateManager,s=(0,z_.getAPI)();if(!this.stateManager.hasError()&&o){let u=OC(o,a,c=>NB.includes(c.last()),c=>c?c instanceof Y_.TFile?c.path:Ni(c)||Array.isArray(c)?String(c):s&&!s.value.isObject(c)?s.value.toString(c):String(c):String(c)),l=PC(o,u);return WC(this.stateManager,l,u)}return UC(this.stateManager,a)}reparseBoard(){return $_(this.stateManager,this.stateManager.state)}};var vf=class{constructor(t,r,n,i,a){this.stateReceivers=[];this.settingsNotifiers=new Map;this.viewSet=new Set;this.compiledSettings={};this.getSetting=(t,r)=>{var n;return(r==null?void 0:r[t])!==void 0?r[t]:((n=this.compiledSettings)==null?void 0:n[t])!==void 0?this.compiledSettings[t]:this.getSettingRaw(t)};this.getSettingRaw=(t,r)=>{var n,i,a;return(r==null?void 0:r[t])!==void 0?r[t]:((a=(i=(n=this.state)==null?void 0:n.data)==null?void 0:i.settings)==null?void 0:a[t])!==void 0?this.state.data.settings[t]:this.getGlobalSetting(t)};this.getGlobalSetting=t=>{let r=this.getGlobalSettings();return(r==null?void 0:r[t])!==void 0?r[t]:null};this.app=t,this.file=r.file,this.onEmpty=i,this.getGlobalSettings=a,this.parser=new yf(this),this.registerView(r,n,!0)}getAView(){return this.viewSet.values().next().value}hasError(){var t,r,n;return!!((n=(r=(t=this.state)==null?void 0:t.data)==null?void 0:r.errors)!=null&&n.length)}async registerView(t,r,n){this.viewSet.has(t)||this.viewSet.add(t),await new Promise(i=>activeWindow.setTimeout(i,10)),n?await this.newBoard(t,r):await t.prerender(this.state),t.populateViewState(this.state.data.settings)}unregisterView(t){this.viewSet.has(t)&&(this.viewSet.delete(t),this.viewSet.size===0&&this.onEmpty())}buildSettingRetrievers(){return{getGlobalSettings:this.getGlobalSettings,getGlobalSetting:this.getGlobalSetting,getSetting:this.getSetting}}async newBoard(t,r){try{let n=this.getParsedBoard(r);await t.prerender(n),this.setState(n,!1)}catch(n){this.setError(n)}}saveToDisk(){if(this.state.data.errors.length>0)return;let t=this.getAView();if(t){let r=this.parser.boardToMd(this.state);t.requestSaveToDisk(r),this.viewSet.forEach(n=>{n.data=r})}}softRefresh(){this.stateReceivers.forEach(t=>t({...this.state}))}forceRefresh(){if(this.state)try{this.compileSettings(),this.state=this.parser.reparseBoard(),this.stateReceivers.forEach(t=>t(this.state)),this.settingsNotifiers.forEach(t=>{t.forEach(r=>r())}),this.viewSet.forEach(t=>t.initHeaderButtons())}catch(t){console.error(t),this.setError(t)}}setState(t,r=!0){var n;try{let i=(n=this.state)==null?void 0:n.data.settings,a=typeof t=="function"?t(this.state):t,o=a==null?void 0:a.data.settings;i&&o&&bk(i,o)?(this.state=(0,Ps.default)(this.state,{data:{settings:{$set:o}}}),this.compileSettings(),this.state=this.parser.reparseBoard()):(this.state=a,this.compileSettings()),this.viewSet.forEach(s=>{s.initHeaderButtons(),s.validatePreviewCache(a)}),r&&this.saveToDisk(),this.stateReceivers.forEach(s=>s(this.state)),i!==o&&o&&this.settingsNotifiers.forEach((s,u)=>{(!i&&o||i[u]!==o[u])&&s.forEach(l=>l())})}catch(i){console.error(i),this.setError(i)}}useState(){let[t,r]=Ne(this.state);return Ae(()=>(this.stateReceivers.push(n=>r(n)),r(this.state),()=>{this.stateReceivers.remove(r)}),[]),t}useSetting(t){let[r,n]=Ne(this.getSetting(t));return Ae(()=>{let i=()=>n(this.getSetting(t));return this.settingsNotifiers.has(t)?this.settingsNotifiers.get(t).push(i):this.settingsNotifiers.set(t,[i]),()=>{this.settingsNotifiers.get(t).remove(i)}},[]),r}compileSettings(t){var l,c,d,m,h,g,y,v,D,I;let r=this.getGlobalSetting("metadata-keys")||[],n=this.getSettingRaw("metadata-keys",t)||[],i=Array.from(new Set([...r,...n])),a=this.getSettingRaw("date-format",t)||ja(this.app),o=this.getSettingRaw("date-display-format",t)||a,s=this.getSettingRaw("time-format",t)||Ho(this.app),u=this.getSettingRaw("archive-date-format",t)||`${a} ${s}`;this.compiledSettings={[_t]:this.getSettingRaw(_t,t)||"board","date-format":a,"date-display-format":o,"date-time-display-format":o+" "+s,"date-trigger":this.getSettingRaw("date-trigger",t)||Ad,"inline-metadata-position":this.getSettingRaw("inline-metadata-position",t)||Ul,"time-format":s,"time-trigger":this.getSettingRaw("time-trigger",t)||Od,"link-date-to-daily-note":this.getSettingRaw("link-date-to-daily-note",t),"move-dates":this.getSettingRaw("move-dates",t),"move-tags":this.getSettingRaw("move-tags",t),"move-task-metadata":this.getSettingRaw("move-task-metadata",t),"metadata-keys":i,"archive-date-separator":this.getSettingRaw("archive-date-separator")||"","archive-date-format":u,"show-add-list":(l=this.getSettingRaw("show-add-list",t))!=null?l:!0,"show-archive-all":(c=this.ge
Line truncated
|
||||
/*!
|
||||
* The buffer module from node.js, for the browser.
|
||||
*
|
||||
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
/*! Bundled license information:
|
||||
|
||||
mark.js/dist/mark.js:
|
||||
(*!***************************************************
|
||||
* mark.js v8.11.1
|
||||
* https://markjs.io/
|
||||
* Copyright (c) 2014–2018, Julian Kühnel
|
||||
* Released under the MIT license https://git.io/vwTVl
|
||||
*****************************************************)
|
||||
|
||||
moment/moment.js:
|
||||
(*! moment.js *)
|
||||
(*! version : 2.29.4 *)
|
||||
(*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)
|
||||
(*! license : MIT *)
|
||||
(*! momentjs.com *)
|
||||
|
||||
choices.js/public/assets/scripts/choices.js:
|
||||
(*! choices.js v9.0.1 | © 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme *)
|
||||
(*!
|
||||
* Fuse.js v3.4.5 - Lightweight fuzzy-search (http://fusejs.io)
|
||||
*
|
||||
* Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
|
||||
* All Rights Reserved. Apache Software License 2.0
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*)
|
||||
|
||||
is-plain-object/dist/is-plain-object.mjs:
|
||||
(*!
|
||||
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*)
|
||||
|
||||
@tanstack/table-core/build/lib/index.mjs:
|
||||
(**
|
||||
* table-core
|
||||
*
|
||||
* Copyright (c) TanStack
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*)
|
||||
|
||||
@tanstack/react-table/build/lib/index.mjs:
|
||||
(**
|
||||
* react-table
|
||||
*
|
||||
* Copyright (c) TanStack
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*)
|
||||
|
||||
@tanstack/match-sorter-utils/build/lib/index.mjs:
|
||||
(**
|
||||
* match-sorter-utils
|
||||
*
|
||||
* Copyright (c) TanStack
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE.md file in the root directory of this source tree.
|
||||
*
|
||||
* @license MIT
|
||||
*)
|
||||
(**
|
||||
* @name match-sorter
|
||||
* @license MIT license.
|
||||
* @copyright (c) 2099 Kent C. Dodds
|
||||
* @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
|
||||
*)
|
||||
*/
|
||||
|
||||
/* nosourcemap */
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "obsidian-kanban",
|
||||
"name": "Kanban",
|
||||
"version": "2.0.51",
|
||||
"minAppVersion": "1.0.0",
|
||||
"description": "Create markdown-backed Kanban boards in Obsidian.",
|
||||
"author": "mgmeyers",
|
||||
"authorUrl": "https://github.com/mgmeyers/obsidian-kanban",
|
||||
"helpUrl": "https://publish.obsidian.md/kanban/Obsidian+Kanban+Plugin",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.choices{position:relative;margin-bottom:24px;font-size:16px}.choices:focus{outline:none}.choices:last-child{margin-bottom:0}.choices.is-disabled .choices__inner,.choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none}.choices.is-disabled .choices__item{cursor:not-allowed}.choices [hidden]{display:none!important}.choices[data-type*=select-one]{cursor:pointer}.choices[data-type*=select-one] .choices__inner{padding-bottom:7.5px}.choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #dddddd;background-color:#fff;margin:0}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:.5}.choices[data-type*=select-one] .choices__button:hover,.choices[data-type*=select-one] .choices__button:focus{opacity:1}.choices[data-type*=select-one] .choices__button:focus{box-shadow:0 0 0 2px #00bcd4}.choices[data-type*=select-one] .choices__item[data-value=""] .choices__button{display:none}.choices[data-type*=select-one]:after{content:"";height:0;width:0;border-style:solid;border-color:#333333 transparent transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none}.choices[data-type*=select-one].is-open:after{border-color:transparent transparent #333333 transparent;margin-top:-7.5px}.choices[data-type*=select-one][dir=rtl]:after{left:11.5px;right:auto}.choices[data-type*=select-one][dir=rtl] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0}.choices[data-type*=select-multiple] .choices__inner,.choices[data-type*=text] .choices__inner{cursor:text}.choices[data-type*=select-multiple] .choices__button,.choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin:0 -4px 0 8px;padding-left:16px;border-left:1px solid #008fa1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:.75;border-radius:0}.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=select-multiple] .choices__button:focus,.choices[data-type*=text] .choices__button:hover,.choices[data-type*=text] .choices__button:focus{opacity:1}.choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #dddddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden}.is-focused .choices__inner,.is-open .choices__inner{border-color:#b7b7b7}.is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.choices__list{margin:0;padding-left:0;list-style:none}.choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%}[dir=rtl] .choices__list--single{padding-right:4px;padding-left:16px}.choices__list--single .choices__item{width:100%}.choices__list--multiple{display:inline}.choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#00bcd4;border:1px solid #00a5bb;color:#fff;word-break:break-all;box-sizing:border-box}.choices__list--multiple .choices__item[data-deletable]{padding-right:5px}[dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.choices__list--multiple .choices__item.is-highlighted{background-color:#00a5bb;border:1px solid #008fa1}.is-disabled .choices__list--multiple .choices__item{background-color:#aaa;border:1px solid #919191}.choices__list--dropdown{visibility:hidden;z-index:1;position:absolute;width:100%;background-color:#fff;border:1px solid #dddddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all;will-change:visibility}.choices__list--dropdown.is-active{visibility:visible}.is-open .choices__list--dropdown{border-color:#b7b7b7}.is-flipped .choices__list--dropdown{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:.25rem .25rem 0 0}.choices__list--dropdown .choices__list{position:relative;max-heightLine truncated
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
{
|
||||
"remoteType": "",
|
||||
"useCustomRequestHandler": false,
|
||||
"couchDB_URI": "",
|
||||
"couchDB_USER": "",
|
||||
"couchDB_PASSWORD": "",
|
||||
"couchDB_DBNAME": "",
|
||||
"liveSync": false,
|
||||
"syncOnSave": false,
|
||||
"syncOnStart": false,
|
||||
"savingDelay": 200,
|
||||
"lessInformationInLog": false,
|
||||
"gcDelay": 0,
|
||||
"versionUpFlash": "",
|
||||
"minimumChunkSize": 20,
|
||||
"longLineThreshold": 250,
|
||||
"showVerboseLog": false,
|
||||
"suspendFileWatching": false,
|
||||
"trashInsteadDelete": true,
|
||||
"periodicReplication": false,
|
||||
"periodicReplicationInterval": 60,
|
||||
"syncOnFileOpen": false,
|
||||
"encrypt": true,
|
||||
"passphrase": "",
|
||||
"usePathObfuscation": true,
|
||||
"doNotDeleteFolder": false,
|
||||
"resolveConflictsByNewerFile": false,
|
||||
"batchSave": false,
|
||||
"batchSaveMinimumDelay": 5,
|
||||
"batchSaveMaximumDelay": 60,
|
||||
"deviceAndVaultName": "",
|
||||
"usePluginSettings": false,
|
||||
"showOwnPlugins": false,
|
||||
"showStatusOnEditor": true,
|
||||
"showStatusOnStatusbar": true,
|
||||
"showOnlyIconsOnEditor": false,
|
||||
"hideFileWarningNotice": false,
|
||||
"networkWarningStyle": "",
|
||||
"usePluginSync": false,
|
||||
"autoSweepPlugins": false,
|
||||
"autoSweepPluginsPeriodic": false,
|
||||
"notifyPluginOrSettingUpdated": false,
|
||||
"checkIntegrityOnSave": false,
|
||||
"batch_size": 25,
|
||||
"batches_limit": 25,
|
||||
"useHistory": true,
|
||||
"disableRequestURI": true,
|
||||
"skipOlderFilesOnSync": true,
|
||||
"checkConflictOnlyOnOpen": false,
|
||||
"showMergeDialogOnlyOnActive": false,
|
||||
"syncInternalFiles": false,
|
||||
"syncInternalFilesBeforeReplication": false,
|
||||
"syncInternalFilesIgnorePatterns": "\\/node_modules\\/, \\/\\.git\\/, \\/obsidian-livesync\\/",
|
||||
"syncInternalFilesTargetPatterns": "",
|
||||
"syncInternalFilesInterval": 60,
|
||||
"additionalSuffixOfDatabaseName": "60c5885e09230cce",
|
||||
"ignoreVersionCheck": false,
|
||||
"lastReadUpdates": 25,
|
||||
"deleteMetadataOfDeletedFiles": false,
|
||||
"syncIgnoreRegEx": "",
|
||||
"syncOnlyRegEx": "",
|
||||
"customChunkSize": 0,
|
||||
"readChunksOnline": true,
|
||||
"watchInternalFileChanges": true,
|
||||
"automaticallyDeleteMetadataOfDeletedFiles": 0,
|
||||
"disableMarkdownAutoMerge": false,
|
||||
"writeDocumentsIfConflicted": false,
|
||||
"useDynamicIterationCount": false,
|
||||
"syncAfterMerge": false,
|
||||
"configPassphraseStore": "",
|
||||
"encryptedPassphrase": "%$N0ZUalInU1+u18ErLUrnsIfKQt9sG5SPQP96kSetnJ86TkKppZ83aF/bCAqTRu3pLC/wtqKKRq2XP6VRTzzp4+LNSnygQ59YEqOxDis9AOwnnFNZC9Bj7UOCjuxiUruIjg53jmBNrDt/E+NRuUaU+X4=",
|
||||
"encryptedCouchDBConnection": "%$N0ZUalInU1+u18ErLUrnsIfKQt9sG5SPQP96kSetnJ8yCWEkSFTly8KTm0CJqAXsKkZA1qRCBhP/sTdsXwkgwQnnhZLWyKLGr4JR/NTaIX2hVVx8yjH4MRdFn55MUG3eOYqoFPWAJ0fUrvZ3y70oksLyMKr5TOT1zam4AIkqZPcAmHWyKtOs1OEZBiu3QlcdM3uyi3/4zkB/HlwXaQsHfB58poSCI35NJN66cl8DzExFvOSUAvzLoAtpcwXO5LAPHtPDcVdYCER8sQDDncznUzCVs4wxMRfwr4MpbMO4/Y2m0rmo4gX5339nTp5yjp83pcMhb7xwffUhmbBo2QAlfjjmJ+x4Qstk9uSYVXkaeif5TEP2dPNsUiQkIc9oM5a1fNyWSlFWA5bbIzYLzExcl45RpdjFsiTEAVE1RcFJk86MwvUc0YsnWChG4sz/9D8Uoiyq2cqjbkZgwq3cIbEvR3VUxvnpBpAA5PdaGlAwLdn4JHUAHseF/BCntomV1un+bbPuVU5jc03e/fN7FtzMqob3w53SEO2DGkw1/8cv3TdDkWpJ/VAxUjM3VLq8otsJ4P4tlbqKyy3rf6Fpj16BeqnP/2RnnIlQjZY0/3SF6hzZ48pp1JR6SZEqoTkvsX/7UVQDCGanbuUoVjzGvMubTfIaOkrd0CYyL7kDTwpTDpr6R1MVXypmYe1KE8KCaqtvuDcWGKbTS1YoUgxUP3I0Vd2XkA0=",
|
||||
"permitEmptyPassphrase": false,
|
||||
"remoteConfigurations": {
|
||||
"legacy-couchdb": {
|
||||
"id": "legacy-couchdb",
|
||||
"name": "CouchDB Remote",
|
||||
"uri": "%$N0ZUalInU1+u18ErLUrnsIfKQt9sG5SPQP96kSetnJ8BKv3qS0JozOAN+QohpKXWbZCjfUDv2QehXP4ZbfsKmgGfOWiN0v5baX9pOWpTpzC2nOl4zWpBcXxeLxSz2YTnhrtnO/yQrJ0ewDaZYy7hNqLdVfVoQkdN1ZJyyRCHBmTa3vtrXWJ/PfOQre2m1Y/U4Y4Ibcl2urZXfgPrUtXet0tcCf/6wyl6I27tsfkMog==",
|
||||
"isEncrypted": true
|
||||
}
|
||||
},
|
||||
"activeConfigurationId": "legacy-couchdb",
|
||||
"P2P_ActiveRemoteConfigurationId": "",
|
||||
"useIndexedDBAdapter": false,
|
||||
"useTimeouts": false,
|
||||
"writeLogToTheFile": false,
|
||||
"doNotPaceReplication": false,
|
||||
"hashCacheMaxCount": 300,
|
||||
"hashCacheMaxAmount": 50,
|
||||
"concurrencyOfReadChunksOnline": 40,
|
||||
"minimumIntervalOfReadChunksOnline": 50,
|
||||
"hashAlg": "xxhash64",
|
||||
"suspendParseReplicationResult": false,
|
||||
"doNotSuspendOnFetching": false,
|
||||
"useIgnoreFiles": false,
|
||||
"ignoreFiles": ".gitignore",
|
||||
"syncOnEditorSave": false,
|
||||
"keepReplicationActiveInBackground": false,
|
||||
"pluginSyncExtendedSetting": {},
|
||||
"syncMaxSizeInMB": 50,
|
||||
"settingSyncFile": "",
|
||||
"writeCredentialsForSettingSync": false,
|
||||
"notifyAllSettingSyncFile": false,
|
||||
"isConfigured": true,
|
||||
"settingVersion": 10,
|
||||
"enableCompression": false,
|
||||
"accessKey": "",
|
||||
"bucket": "",
|
||||
"endpoint": "",
|
||||
"region": "",
|
||||
"secretKey": "",
|
||||
"useEden": false,
|
||||
"maxChunksInEden": 10,
|
||||
"maxTotalLengthInEden": 1024,
|
||||
"maxAgeInEden": 10,
|
||||
"disableCheckingConfigMismatch": false,
|
||||
"displayLanguage": "def",
|
||||
"enableChunkSplitterV2": false,
|
||||
"disableWorkerForGeneratingChunks": false,
|
||||
"processSmallFilesInUIThread": false,
|
||||
"notifyThresholdOfRemoteStorageSize": 2000,
|
||||
"usePluginSyncV2": false,
|
||||
"usePluginEtc": false,
|
||||
"doNotUseFixedRevisionForChunks": true,
|
||||
"showLongerLogInsideEditor": false,
|
||||
"sendChunksBulk": false,
|
||||
"sendChunksBulkMaxSize": 1,
|
||||
"useSegmenter": false,
|
||||
"useAdvancedMode": false,
|
||||
"usePowerUserMode": false,
|
||||
"useEdgeCaseMode": false,
|
||||
"enableDebugTools": false,
|
||||
"suppressNotifyHiddenFilesChange": false,
|
||||
"syncMinimumInterval": 2000,
|
||||
"P2P_Enabled": false,
|
||||
"P2P_AutoAccepting": 0,
|
||||
"P2P_AppID": "self-hosted-livesync",
|
||||
"P2P_roomID": "",
|
||||
"P2P_passphrase": "",
|
||||
"P2P_relays": "wss://exp-relay.vrtmrz.net/",
|
||||
"P2P_AutoBroadcast": false,
|
||||
"P2P_AutoStart": false,
|
||||
"P2P_AutoSyncPeers": "",
|
||||
"P2P_AutoWatchPeers": "",
|
||||
"P2P_SyncOnReplication": "",
|
||||
"P2P_RebuildFrom": "",
|
||||
"P2P_AutoAcceptingPeers": "",
|
||||
"P2P_AutoDenyingPeers": "",
|
||||
"P2P_IsHeadless": false,
|
||||
"P2P_DevicePeerName": "",
|
||||
"P2P_turnServers": "",
|
||||
"P2P_turnUsername": "",
|
||||
"P2P_turnCredential": "",
|
||||
"P2P_useDiagRTC": false,
|
||||
"doctorProcessedVersion": "0.25.27",
|
||||
"bucketCustomHeaders": "",
|
||||
"couchDB_CustomHeaders": "",
|
||||
"useJWT": false,
|
||||
"jwtAlgorithm": "",
|
||||
"jwtKey": "",
|
||||
"jwtKid": "",
|
||||
"jwtSub": "",
|
||||
"jwtExpDuration": 5,
|
||||
"useRequestAPI": false,
|
||||
"bucketPrefix": "",
|
||||
"chunkSplitterVersion": "v3-rabin-karp",
|
||||
"E2EEAlgorithm": "v2",
|
||||
"processSizeMismatchedFiles": false,
|
||||
"forcePathStyle": true,
|
||||
"syncInternalFileOverwritePatterns": "",
|
||||
"useOnlyLocalChunk": false,
|
||||
"maxMTimeForReflectEvents": 0,
|
||||
"tweakModified": 1786225950021
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD AND TERSER
|
||||
if you want to view the source, please visit the github repository of this plugin
|
||||
*/
|
||||
|
||||
"use strict";function cloneQuery2(query3){return Object.keys(query3).reduce((carry,paramName)=>{const param=query3[paramName];return{...carry,[paramName]:Array.isArray(param)?[...param]:param}},{})}function parseQueryString(querystring){const query3={};querystring=querystring.replace(/^\?/,"");if(querystring)for(const pair of querystring.split("&")){let[key3,value=null]=pair.split("=");key3=decodeURIComponent(key3);value&&(value=decodeURIComponent(value));key3 in query3?Array.isArray(query3[key3])?query3[key3].push(value):query3[key3]=[query3[key3],value]:query3[key3]=value}return query3}function toBase64(_input){let input;input="string"==typeof _input?fromUtf8(_input):_input;const isArrayLike="object"==typeof input&&"number"==typeof input.length,isUint8Array="object"==typeof input&&"number"==typeof input.byteOffset&&"number"==typeof input.byteLength;if(!isArrayLike&&!isUint8Array)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let str="";for(let i4=0;i4<input.length;i4+=3){let bits2=0,bitLength=0;for(let j2=i4,limit=Math.min(i4+3,input.length);j2<limit;j2++){bits2|=input[j2]<<(limit-j2-1)*bitsPerByte;bitLength+=bitsPerByte}const bitClusterCount=Math.ceil(bitLength/bitsPerLetter);bits2<<=bitClusterCount*bitsPerLetter-bitLength;for(let k2=1;k2<=bitClusterCount;k2++){const offset=(bitClusterCount-k2)*bitsPerLetter;str+=alphabetByValue[(bits2&maxLetterValue<<offset)>>offset]}str+="==".slice(0,4-bitClusterCount)}return str}function bindUint8ArrayBlobAdapter(toUtf82,fromUtf85,toBase643,fromBase643){return class Uint8ArrayBlobAdapter2 extends Uint8Array{static fromString(source2,encoding="utf-8"){if("string"==typeof source2)return"base64"===encoding?Uint8ArrayBlobAdapter2.mutate(fromBase643(source2)):Uint8ArrayBlobAdapter2.mutate(fromUtf85(source2));throw new Error(`Unsupported conversion from ${typeof source2} to Uint8ArrayBlobAdapter.`)}static mutate(source2){Object.setPrototypeOf(source2,Uint8ArrayBlobAdapter2.prototype);return source2}transformToString(encoding="utf-8"){return"base64"===encoding?toBase643(this):toUtf82(this)}}}function bindV4(getRandomValues2){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?()=>crypto.randomUUID():()=>{const rnds=new Uint8Array(16);getRandomValues2(rnds);rnds[6]=15&rnds[6]|64;rnds[8]=63&rnds[8]|128;return decimalToHex[rnds[0]]+decimalToHex[rnds[1]]+decimalToHex[rnds[2]]+decimalToHex[rnds[3]]+"-"+decimalToHex[rnds[4]]+decimalToHex[rnds[5]]+"-"+decimalToHex[rnds[6]]+decimalToHex[rnds[7]]+"-"+decimalToHex[rnds[8]]+decimalToHex[rnds[9]]+"-"+decimalToHex[rnds[10]]+decimalToHex[rnds[11]]+decimalToHex[rnds[12]]+decimalToHex[rnds[13]]+decimalToHex[rnds[14]]+decimalToHex[rnds[15]]}}function dateToUtcString(date2){const year2=date2.getUTCFullYear(),month=date2.getUTCMonth(),dayOfWeek=date2.getUTCDay(),dayOfMonthInt=date2.getUTCDate(),hoursInt=date2.getUTCHours(),minutesInt=date2.getUTCMinutes(),secondsInt=date2.getUTCSeconds(),dayOfMonthString=dayOfMonthInt<10?`0${dayOfMonthInt}`:`${dayOfMonthInt}`,hoursString=hoursInt<10?`0${hoursInt}`:`${hoursInt}`,minutesString=minutesInt<10?`0${minutesInt}`:`${minutesInt}`,secondsString=secondsInt<10?`0${secondsInt}`:`${secondsInt}`;return`${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year2} ${hoursString}:${minutesString}:${secondsString} GMT`}function quoteHeader(part){(part.includes(",")||part.includes('"'))&&(part=`"${part.replace(/"/g,'\\"')}"`);return part}function range3(v2,min,max3){const _v=Number(v2);if(_v<min||_v>max3)throw new Error(`Value ${_v} out of range [${min}, ${max3}]`)}function splitEvery(value,delimiter,numDelimiters){if(numDelimiters<=0||!Number.isInteger(numDelimiters))throw new Error("Invalid number of delimiters ("+numDelimiters+") for splitEvery.");const segments=value.split(delimiter);if(1===numDelimiters)return segments;const compoundSegments=[];let currentSegment="";for(let i4=0;i4<segments.length;i4++){""===currentSegment?currentSegment=segments[i4]:currentSegment+=delimiter+segments[i4];if((i4+1)%numDelimiters===0){compoundSegments.push(currentSegment);currentSegment=""}}""!==currentSegment&&compoundSegments.push(currentSegment);return compoundSegments}function fromHex(encoded){if(encoded.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const out=new Uint8Array(encoded.length/2);for(let i4=0;i4<encoded.length;i4+=2){const encodedByte=encoded.slice(i4,i4+2).toLowerCase();if(!(encodedByte in HEX_TO_SHORT))throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);out[i4/2]=HEX_TO_SHORT[encodedByte]}return out}function toHex2(bytes){let out="";for(let i4=0;i4<bytes.byteLength;i4++)out+=SHORT_TO_HEX[bytes[i4]];return out}function bindGetEndpointFromInstructions(getEndpointFromConfig3){return async(commandInput,instructionsSupplier,clientConfig,context2)=>{if(!clientConfig.isCustomEndpoint){let endpointFromConfig;endpointFromConfig=clientConfig.serviceConfiguredEndpoint?awaitLine truncated
|
||||
/*! Bundled license information:
|
||||
|
||||
octagonal-wheels/dist/encoding/encodeobject.js:
|
||||
(* istanbul ignore if -- @preserve *)
|
||||
|
||||
@noble/secp256k1/index.js:
|
||||
(*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) *)
|
||||
|
||||
octagonal-wheels/dist/encryption/hkdf.js:
|
||||
(* istanbul ignore if -- @preserve *)
|
||||
(* istanbul ignore next -- @preserve *)
|
||||
*/__export(index_browser_exports,{EventStreamCodec:()=>EventStreamCodec,EventStreamMarshaller:()=>EventStreamMarshaller2,EventStreamSerde:()=>EventStreamSerde,HeaderMarshaller:()=>HeaderMarshaller,Int64:()=>Int64,MessageDecoderStream:()=>MessageDecoderStream,MessageEncoderStream:()=>MessageEncoderStream,SmithyMessageDecoderStream:()=>SmithyMessageDecoderStream,SmithyMessageEncoderStream:()=>SmithyMessageEncoderStream,UniversalEventStreamMarshaller:()=>EventStreamMarshaller,eventStreamSerdeProvider:()=>eventStreamSerdeProvider2,getChunkedStream:()=>getChunkedStream,getMessageUnmarshaller:()=>getMessageUnmarshaller,getUnmarshalledStream:()=>getUnmarshalledStream,iterableToReadableStream:()=>iterableToReadableStream,readableStreamToIterable:()=>readableStreamToIterable,resolveEventStreamSerdeConfig:()=>resolveEventStreamSerdeConfig,universalEventStreamSerdeProvider:()=>eventStreamSerdeProvider});init_index_browser3=__esm({"node_modules/@smithy/core/dist-es/submodules/event-streams/index.browser.js"(){init_EventStreamCodec();init_HeaderMarshaller();init_Int64();init_MessageDecoderStream();init_MessageEncoderStream();init_SmithyMessageDecoderStream();init_SmithyMessageEncoderStream();init_EventStreamMarshaller_browser();init_utils();init_EventStreamMarshaller();init_getChunkedStream();init_getUnmarshalledStream();init_EventStreamSerdeConfig();init_EventStreamSerde()}});main_exports={};__export(main_exports,{default:()=>ObsidianLiveSyncPlugin});module.exports=__toCommonJS(main_exports);LOG_LEVEL_DEBUG=-1;LOG_LEVEL_VERBOSE=16;LOG_LEVEL_INFO=32;LOG_LEVEL_NOTICE=64;LOG_LEVEL_URGENT=128;0;LOG_KIND_DEBUG=1;LOG_KIND_VERBOSE=2;LOG_KIND_WARNING=4;LOG_KIND_ERROR=8;0;LEVEL_INFO=LOG_LEVEL_INFO;LEVEL_NOTICE=LOG_LEVEL_NOTICE;0;0;defaultLoggerEnv_minLogLevel=LOG_LEVEL_INFO;defaultLogger=function defaultLogger2(message,level=LEVEL_INFO,key3){if(level<defaultLoggerEnv_minLogLevel)return;const now3=new Date,timestamp=now3.toLocaleString(),messageContent="string"==typeof message?message:message instanceof Error?`${message.name}:${message.message}`:JSON.stringify(message,null,2),newMessage=`${timestamp}\t${level}\t${messageContent}`;level&LOG_KIND_DEBUG?console.debug(newMessage):level&LOG_KIND_WARNING?console.warn(newMessage):level&LOG_KIND_ERROR?console.error(newMessage):level&LOG_KIND_VERBOSE?console.info(newMessage):console.log(newMessage);message instanceof Error&&console.dir(message.stack)};_logger=defaultLogger;RESULT_TIMED_OUT=Symbol("timed out");0;VERSIONING_DOCID="obsydian_livesync_version";MILESTONE_DOCID="_local/obsydian_livesync_milestone";NODEINFO_DOCID="_local/obsydian_livesync_nodeinfo";SYNCINFO_ID="syncinfo";EntryTypes_NOTE_LEGACY="notes",EntryTypes_NOTE_BINARY="newnote",EntryTypes_NOTE_PLAIN="plain",EntryTypes_CHUNK="leaf",EntryTypes_CHUNK_PACK="chunkpack",EntryTypes_SYNC_PARAMETERS="sync-parameters";0;0;CANCELLED=Symbol("cancelled");AUTO_MERGED=Symbol("auto_merged");NOT_CONFLICTED=Symbol("not_conflicted");MISSING_OR_ERROR=Symbol("missing_or_error");LEAVE_TO_SUBSEQUENT=Symbol("leave_to_subsequent_proc");0;BASE_IS_NEW=Symbol("base");TARGET_IS_NEW=Symbol("target");EVEN=Symbol("even");0;MAX_DOC_SIZE_BIN=102400;VER=12;0;LEAF_WAIT_TIMEOUT=3e4;LEAF_WAIT_ONLY_REMOTE=5e3;LEAF_WAIT_TIMEOUT_SEQUENTIAL_REPLICATOR=5e3;REPLICATION_BUSY_TIMEOUT=3e6;SALT_OF_PASSPHRASE="rHGMPtr6oWw7VSa3W3wpa8fT8U";SALT_OF_ID="a83hrf7fy7sa8g31";SEED_MURMURHASH=305419896;IDPrefixes_Chunk="h:";PREFIX_OBFUSCATED="f:";0;PREFIX_ENCRYPTED_CHUNK="h:+";AutoAccepting=(AutoAccepting2=>{AutoAccepting2[AutoAccepting2.NONE=0]="NONE";AutoAccepting2[AutoAccepting2.ALL=1]="ALL";return AutoAccepting2})(AutoAccepting||{});0;SETTING_VERSION_SUPPORT_CASE_INSENSITIVE=10;CURRENT_SETTING_VERSION=SETTING_VERSION_SUPPORT_CASE_INSENSITIVE;RemoteTypes_REMOTE_COUCHDB="",RemoteTypes_REMOTE_MINIO="MINIO",RemoteTypes_REMOTE_P2P="ONLY_P2P";REMOTE_COUCHDB=RemoteTypes_REMOTE_COUCHDB;REMOTE_MINIO=RemoteTypes_REMOTE_MINIO;REMOTE_P2P=RemoteTypes_REMOTE_P2P;E2EEAlgorithmNames={"":"V1: Legacy",v2:"V2: AES-256-GCM With HKDF",forceV1:"Force-V1: Force Legacy (Not recommended)"};E2EEAlgorithms={V1:"",V2:"v2",ForceV1:"forceV1"};HashAlgorithms_XXHASH64="xxhash64",HashAlgorithms_MIXED_PUREJS="mixed-purejs",HashAlgorithms_SHA1="sha1",HashAlgorithms_LEGACY="";ChunkAlgorithmNames={v1:"V1: Legacy",v2:"V2: Simple (Default)","v2-segmenter":"V2.5: Lexical chunks","v3-rabin-karp":"V3: Fine deduplication"};ChunkAlgorithms_V1="v1",ChunkAlgorithms_V2="v2",ChunkAlgorithms_V2Segmenter="v2-segmenter",ChunkAlgorithms_RabinKarp="v3-rabin-karp";MODE_SELECTIVE=0;MODE_AUTOMATIC=1;MODE_PAUSED=2;MODE_SHINY=3;NetworkWarningStyles_BANNER="",NetworkWarningStyles_ICON="icon",NetworkWarningStyles_HIDDEN="hidden";PREFERRED_BASE={syncMaxSizeInMB:50,chunkSplitterVersion:"v3-rabin-karp",doNotUseFixedRevisionForChunks:!1,usePluginSyncV2:!0,handleFilenameCaseSensitive:!1,E2EEAlgorithm:E2EEAlgorithms.V2};PREFERRED_SETTING_CLOUDANT={...PREFERRED_BASE,customChunkSize:0,sendChunksBulkMaxSize:1,concurrencyOfReadChunksOnline:100Line truncated
|
||||
/* nosourcemap */
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "obsidian-livesync",
|
||||
"name": "Self-hosted LiveSync",
|
||||
"version": "0.25.81",
|
||||
"minAppVersion": "1.7.2",
|
||||
"description": "Community implementation of self-hosted livesync. Reflect your vault changes to some other devices immediately. Please make sure to disable other synchronize solutions to avoid content corruption or duplication.",
|
||||
"author": "vorotamoroz",
|
||||
"authorUrl": "https://github.com/vrtmrz",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+573
@@ -0,0 +1,573 @@
|
||||
.ls-dialog .added {
|
||||
color: var(--text-on-accent);
|
||||
background-color: var(--text-accent);
|
||||
}
|
||||
|
||||
.ls-dialog .normal {
|
||||
color: var(--text-normal);
|
||||
}
|
||||
|
||||
.ls-dialog .deleted {
|
||||
color: var(--text-on-accent);
|
||||
background-color: var(--text-muted);
|
||||
}
|
||||
|
||||
.conflict-dev-name {
|
||||
display: inline-block;
|
||||
min-width: 5em;
|
||||
}
|
||||
|
||||
.conflict-action-button {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.op-scrollable {
|
||||
overflow-y: scroll;
|
||||
/* min-height: 280px; */
|
||||
max-height: 280px;
|
||||
user-select: text;
|
||||
-webkit-user-select: text;
|
||||
}
|
||||
|
||||
.op-pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.op-warn {
|
||||
border: 1px solid salmon;
|
||||
padding: 2px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.op-warn::before {
|
||||
content: "Warning";
|
||||
font-weight: bold;
|
||||
color: salmon;
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.op-warn-info {
|
||||
border: 1px solid rgb(255, 209, 81);
|
||||
padding: 2px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.op-warn-info::before {
|
||||
content: "Notice";
|
||||
font-weight: bold;
|
||||
color: rgb(255, 209, 81);
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.syncstatusbar {
|
||||
-webkit-filter: grayscale(100%);
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.tcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.sls-plugins-wrap {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
max-height: 50vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.sls-remote-list .setting-item-description {
|
||||
white-space: normal;
|
||||
overflow-wrap: anywhere;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.sls-plugins-tbl {
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
width: 100%;
|
||||
max-height: 80%;
|
||||
}
|
||||
|
||||
.divider th {
|
||||
border-top: 1px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.sls-header-button {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.sls-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
:root {
|
||||
--sls-log-text: "";
|
||||
}
|
||||
|
||||
.sls-troubleshoot-preview {
|
||||
max-width: max-content;
|
||||
}
|
||||
|
||||
.sls-troubleshoot-preview img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.sls-setting-tab {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.sls-setting-menu-btn {
|
||||
color: var(--text-normal);
|
||||
background-color: var(--background-secondary-alt);
|
||||
border-radius: 8px;
|
||||
padding: 6px 10px;
|
||||
cursor: pointer;
|
||||
margin-right: 2px;
|
||||
font-family: "Inter", sans-serif;
|
||||
outline: none;
|
||||
user-select: none;
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
.sls-setting-label.selected {
|
||||
/* order: 1; */
|
||||
flex-grow: 1;
|
||||
/* width: 100%; */
|
||||
}
|
||||
|
||||
.sls-setting-tab:hover~div.sls-setting-menu-btn,
|
||||
.sls-setting-label.selected .sls-setting-tab:checked~div.sls-setting-menu-btn {
|
||||
background-color: var(--interactive-accent);
|
||||
color: var(--text-on-accent);
|
||||
}
|
||||
|
||||
.sls-setting-menu-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 1;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
backdrop-filter: blur(15px);
|
||||
padding: 4px;
|
||||
border-radius: 10px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.sls-setting-menu {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
body {
|
||||
--sls-col-transparent: transparent;
|
||||
--sls-col-warn: rgba(var(--background-modifier-error-rgb), 0.1);
|
||||
--sls-col-warn-stripe1: var(--sls-col-transparent);
|
||||
--sls-col-warn-stripe2: var(--sls-col-warn);
|
||||
}
|
||||
|
||||
.sls-setting-menu-buttons {
|
||||
border: 1px solid var(--sls-col-warn);
|
||||
/* padding: 2px; */
|
||||
margin: 1px;
|
||||
border-radius: 4px;
|
||||
background-image: linear-gradient(-45deg,
|
||||
var(--sls-col-warn-stripe1) 25%, var(--sls-col-warn-stripe2) 25%, var(--sls-col-warn-stripe2) 50%,
|
||||
var(--sls-col-warn-stripe1) 50%, var(--sls-col-warn-stripe1) 75%, var(--sls-col-warn-stripe2) 75%, var(--sls-col-warn-stripe2));
|
||||
background-size: 30px 30px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
/* justify-content: flex-end; */
|
||||
padding: 0.5em 0.25em;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
/* transition: background-position 1s; */
|
||||
animation: sls-scroll-warn 1s linear 0s infinite;
|
||||
}
|
||||
|
||||
@keyframes sls-scroll-warn {
|
||||
0% {
|
||||
background-position: 0 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: 30px 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.sls-setting-menu-buttons label {
|
||||
margin-right: auto;
|
||||
flex-grow: 1;
|
||||
color: var(--text-warning);
|
||||
}
|
||||
|
||||
.sls-setting-label {
|
||||
flex-grow: 1;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.setting-collapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sls-plugins-tbl-buttons {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.sls-plugins-tbl-buttons button {
|
||||
flex-grow: 0;
|
||||
padding: 6px 10px;
|
||||
}
|
||||
|
||||
.sls-plugins-tbl-device-head {
|
||||
background-color: var(--background-secondary-alt);
|
||||
color: var(--text-accent);
|
||||
}
|
||||
|
||||
.op-flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.op-flex input {
|
||||
display: inline-flex;
|
||||
flex-grow: 1;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.op-info {
|
||||
display: inline-flex;
|
||||
flex-grow: 1;
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
width: 100%;
|
||||
margin-bottom: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.history-added {
|
||||
color: var(--text-on-accent);
|
||||
background-color: var(--text-accent);
|
||||
}
|
||||
|
||||
.history-normal {
|
||||
color: var(--text-normal);
|
||||
}
|
||||
|
||||
.history-deleted {
|
||||
color: var(--text-on-accent);
|
||||
background-color: var(--text-muted);
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.ob-btn-config-fix label {
|
||||
margin-right: 40px;
|
||||
}
|
||||
|
||||
.ob-btn-config-info {
|
||||
border: 1px solid salmon;
|
||||
padding: 2px;
|
||||
margin: 1px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.ob-btn-config-head {
|
||||
padding: 2px;
|
||||
margin: 1px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.isWizard .wizardHidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sls-setting:not(.isWizard) .wizardOnly {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sls-item-dirty::before {
|
||||
content: "✏";
|
||||
}
|
||||
|
||||
.sls-item-dirty-help::after {
|
||||
content: " ❓";
|
||||
}
|
||||
|
||||
.sls-setting .setting-item-control input.sls-item-invalid-value,
|
||||
.sls-setting .setting-item-control textarea.sls-item-invalid-value {
|
||||
background-color: rgba(var(--background-modifier-error-rgb), 0.3);
|
||||
}
|
||||
|
||||
.sls-setting-disabled input[type=text],
|
||||
.sls-setting-disabled input[type=number],
|
||||
.sls-setting-disabled input[type=password] {
|
||||
filter: brightness(80%);
|
||||
color: var(--text-muted);
|
||||
|
||||
}
|
||||
|
||||
.sls-setting-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.sls-setting-obsolete {
|
||||
/* background-image: linear-gradient(-45deg,
|
||||
var(--sls-col-warn-stripe1) 25%, var(--sls-col-warn-stripe2) 25%, var(--sls-col-warn-stripe2) 50%,
|
||||
var(--sls-col-warn-stripe1) 50%, var(--sls-col-warn-stripe1) 75%, var(--sls-col-warn-stripe2) 75%, var(--sls-col-warn-stripe2)); */
|
||||
background-image: linear-gradient(-45deg,
|
||||
transparent 25%, rgba(var(--background-secondary), 0.1) 25%, rgba(var(--background-secondary), 0.1) 50%, transparent 50%, transparent 75%, rgba(var(--background-secondary), 0.1) 75%, rgba(var(--background-secondary), 0.1));
|
||||
background-size: 60px 60px;
|
||||
}
|
||||
|
||||
.password-input>.setting-item-control>input {
|
||||
-webkit-text-security: disc;
|
||||
}
|
||||
|
||||
span.ls-mark-cr::after {
|
||||
user-select: none;
|
||||
content: "↲";
|
||||
color: var(--text-muted);
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.deleted span.ls-mark-cr::after {
|
||||
color: var(--text-on-accent);
|
||||
}
|
||||
|
||||
.ls-imgdiff-wrap {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.ls-imgdiff-wrap .overlay {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ls-imgdiff-wrap .overlay .img-base {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.ls-imgdiff-wrap .overlay .img-overlay {
|
||||
-webkit-filter: invert(100%) opacity(50%);
|
||||
filter: invert(100%) opacity(50%);
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
animation: ls-blink-diff 0.5s cubic-bezier(0.4, 0, 1, 1) infinite alternate;
|
||||
}
|
||||
|
||||
@keyframes ls-blink-diff {
|
||||
0% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.livesync-status {
|
||||
user-select: none;
|
||||
pointer-events: none;
|
||||
height: auto;
|
||||
min-height: 1em;
|
||||
position: absolute;
|
||||
background-color: transparent;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
padding-right: 16px;
|
||||
top: var(--header-height);
|
||||
z-index: calc(var(--layer-cover) + 1);
|
||||
|
||||
font-variant-numeric: tabular-nums;
|
||||
tab-size: 4;
|
||||
text-align: right;
|
||||
white-space: pre-wrap;
|
||||
display: inline-block;
|
||||
color: var(--text-normal);
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
div.workspace-leaf-content[data-type=bases] .livesync-status {
|
||||
top: calc(var(--bases-header-height) + var(--header-height));
|
||||
padding: 5px;
|
||||
padding-right: 18px;
|
||||
}
|
||||
|
||||
.is-mobile div.workspace-leaf-content[data-type=bases] .livesync-status {
|
||||
top: calc(var(--bases-header-height) + var(--view-header-height));
|
||||
padding: 6px;
|
||||
padding-right: 18px;
|
||||
}
|
||||
|
||||
.livesync-status div {
|
||||
opacity: 0.6;
|
||||
-webkit-filter: grayscale(100%);
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
.livesync-status .livesync-status-loghistory {
|
||||
text-align: left;
|
||||
opacity: 0.4;
|
||||
|
||||
}
|
||||
|
||||
.livesync-status div.livesync-status-messagearea:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.livesync-status div.livesync-status-messagearea:not(:empty) {
|
||||
opacity: 0.6;
|
||||
color: var(--text-on-accent);
|
||||
border: 1px solid var(--background-modifier-error);
|
||||
background-color: rgba(var(--background-modifier-error-rgb), 0.2);
|
||||
-webkit-filter: unset;
|
||||
filter: unset;
|
||||
width: fit-content;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
|
||||
.menu-setting-poweruser-disabled .sls-setting-poweruser {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.menu-setting-advanced-disabled .sls-setting-advanced {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.menu-setting-edgecase-disabled .sls-setting-edgecase {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sls-setting-panel-title {
|
||||
position: sticky;
|
||||
font-size: medium;
|
||||
top: 2.5em;
|
||||
background-color: var(--background-secondary-alt);
|
||||
border-radius: 10px;
|
||||
padding: 0.5em 1.0em;
|
||||
}
|
||||
|
||||
.active-pane .sls-setting-panel-title {
|
||||
border: 1px solid var(--interactive-accent);
|
||||
}
|
||||
|
||||
.sls-dialogue-note-wrapper {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sls-dialogue-note-countdown {
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.sls-qr {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
max-width: max-content;
|
||||
}
|
||||
|
||||
.sls-keypair pre {
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
|
||||
}
|
||||
|
||||
/* Diff navigation */
|
||||
.diff-options-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.diff-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.diff-nav-btn {
|
||||
padding: 2px 8px;
|
||||
font-size: 0.85em;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
border-radius: 4px;
|
||||
background-color: var(--background-secondary);
|
||||
color: var(--text-normal);
|
||||
}
|
||||
|
||||
.diff-nav-btn:hover {
|
||||
background-color: var(--background-modifier-hover);
|
||||
}
|
||||
|
||||
.diff-nav-indicator {
|
||||
font-size: 0.85em;
|
||||
color: var(--text-muted);
|
||||
min-width: 3em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.diff-only-label {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.history-search-row {
|
||||
display: flex;
|
||||
gap: 5px;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.history-search-input {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.history-search-result-indicator {
|
||||
font-size: 0.8em;
|
||||
min-width: 80px;
|
||||
}
|
||||
|
||||
.history-search-progress-indicator {
|
||||
font-size: 0.8em;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.history-diff-options-row {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.history-highlight-diff-container,
|
||||
.history-highlight-diff-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.history-highlight-diff-label {
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.diff-focused {
|
||||
outline: 2px solid var(--interactive-accent);
|
||||
outline-offset: 1px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"vauxhall@@main-color": "vauxhall-magenta",
|
||||
"vauxhall@@color-intensity": "intensity-nebula",
|
||||
"vauxhall@@h1-accent": false
|
||||
}
|
||||
+165
@@ -0,0 +1,165 @@
|
||||
/*
|
||||
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
||||
if you want to view the source, please visit the github repository of this plugin
|
||||
*/
|
||||
|
||||
var al=Object.create;var Kt=Object.defineProperty;var sl=Object.getOwnPropertyDescriptor;var ol=Object.getOwnPropertyNames;var ll=Object.getPrototypeOf,cl=Object.prototype.hasOwnProperty;var Zr=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),ul=(e,n)=>{for(var t in n)Kt(e,t,{get:n[t],enumerable:!0})},Zn=(e,n,t,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of ol(n))!cl.call(e,i)&&i!==t&&Kt(e,i,{get:()=>n[i],enumerable:!(a=sl(n,i))||a.enumerable});return e};var Xt=(e,n,t)=>(t=e!=null?al(ll(e)):{},Zn(n||!e||!e.__esModule?Kt(t,"default",{value:e,enumerable:!0}):t,e)),fl=e=>Zn(Kt({},"__esModule",{value:!0}),e);var Jn=Zr((Jr,en)=>{(function(e,n){typeof Jr=="object"&&typeof en!="undefined"?en.exports=n():typeof define=="function"&&define.amd?define(n):e.chroma=n()})(Jr,function(){"use strict";for(var e=function(r,s,o){return s===void 0&&(s=0),o===void 0&&(o=1),r<s?s:r>o?o:r},n=function(r){r._clipped=!1,r._unclipped=r.slice(0);for(var s=0;s<=3;s++)s<3?((r[s]<0||r[s]>255)&&(r._clipped=!0),r[s]=e(r[s],0,255)):s===3&&(r[s]=e(r[s],0,1));return r},t={},a=0,i=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];a<i.length;a+=1){var l=i[a];t["[object "+l+"]"]=l.toLowerCase()}var c=function(r){return t[Object.prototype.toString.call(r)]||"object"},f=function(r,s){return s===void 0&&(s=null),r.length>=3?Array.prototype.slice.call(r):c(r[0])=="object"&&s?s.split("").filter(function(o){return r[0][o]!==void 0}).map(function(o){return r[0][o]}):r[0]},p=function(r){if(r.length<2)return null;var s=r.length-1;return c(r[s])=="string"?r[s].toLowerCase():null},w=Math.PI,S={clip_rgb:n,limit:e,type:c,unpack:f,last:p,PI:w,TWOPI:w*2,PITHIRD:w/3,DEG2RAD:w/180,RAD2DEG:180/w},E={format:{},autodetect:[]},B=S.last,Y=S.clip_rgb,K=S.type,Q=function(){for(var s=[],o=arguments.length;o--;)s[o]=arguments[o];var g=this;if(K(s[0])==="object"&&s[0].constructor&&s[0].constructor===this.constructor)return s[0];var b=B(s),y=!1;if(!b){y=!0,E.sorted||(E.autodetect=E.autodetect.sort(function(R,O){return O.p-R.p}),E.sorted=!0);for(var d=0,A=E.autodetect;d<A.length;d+=1){var k=A[d];if(b=k.test.apply(k,s),b)break}}if(E.format[b]){var N=E.format[b].apply(null,y?s:s.slice(0,-1));g._rgb=Y(N)}else throw new Error("unknown format: "+s);g._rgb.length===3&&g._rgb.push(1)};Q.prototype.toString=function(){return K(this.hex)=="function"?this.hex():"["+this._rgb.join(",")+"]"};var L=Q,re=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(re.Color,[null].concat(r)))};re.Color=L,re.version="2.1.2";var F=re,oe=S.unpack,ke=Math.max,Ye=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=oe(r,"rgb"),g=o[0],b=o[1],y=o[2];g=g/255,b=b/255,y=y/255;var d=1-ke(g,ke(b,y)),A=d<1?1/(1-d):0,k=(1-g-d)*A,N=(1-b-d)*A,R=(1-y-d)*A;return[k,N,R,d]},qe=Ye,Te=S.unpack,xe=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];r=Te(r,"cmyk");var o=r[0],g=r[1],b=r[2],y=r[3],d=r.length>4?r[4]:1;return y===1?[0,0,0,d]:[o>=1?0:255*(1-o)*(1-y),g>=1?0:255*(1-g)*(1-y),b>=1?0:255*(1-b)*(1-y),d]},Pe=xe,Qe=S.unpack,ie=S.type;L.prototype.cmyk=function(){return qe(this._rgb)},F.cmyk=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];return new(Function.prototype.bind.apply(L,[null].concat(r,["cmyk"])))},E.format.cmyk=Pe,E.autodetect.push({p:2,test:function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];if(r=Qe(r,"cmyk"),ie(r)==="array"&&r.length===4)return"cmyk"}});var Tt=S.unpack,Ve=S.last,V=function(r){return Math.round(r*100)/100},M=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=Tt(r,"hsla"),g=Ve(r)||"lsa";return o[0]=V(o[0]||0),o[1]=V(o[1]*100)+"%",o[2]=V(o[2]*100)+"%",g==="hsla"||o.length>3&&o[3]<1?(o[3]=o.length>3?o[3]:1,g="hsla"):o.length=3,g+"("+o.join(",")+")"},_=M,u=S.unpack,h=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];r=u(r,"rgba");var o=r[0],g=r[1],b=r[2];o/=255,g/=255,b/=255;var y=Math.min(o,g,b),d=Math.max(o,g,b),A=(d+y)/2,k,N;return d===y?(k=0,N=Number.NaN):k=A<.5?(d-y)/(d+y):(d-y)/(2-d-y),o==d?N=(g-b)/(d-y):g==d?N=2+(b-o)/(d-y):b==d&&(N=4+(o-g)/(d-y)),N*=60,N<0&&(N+=360),r.length>3&&r[3]!==void 0?[N,k,A,r[3]]:[N,k,A]},m=h,C=S.unpack,v=S.last,x=Math.round,T=function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=C(r,"rgba"),g=v(r)||"rgb";return g.substr(0,3)=="hsl"?_(m(o),g):(o[0]=x(o[0]),o[1]=x(o[1]),o[2]=x(o[2]),(g==="rgba"||o.length>3&&o[3]<1)&&(o[3]=o.length>3?o[3]:1,g="rgba"),g+"("+o.slice(0,g==="rgb"?3:4).join(",")+")")},I=T,D=S.unpack,P=Math.round,G=function(){for(var r,s=[],o=arguments.length;o--;)s[o]=arguments[o];s=D(s,"hsl");var g=s[0],b=s[1],y=s[2],d,A,k;if(b===0)d=A=k=y*255;else{var N=[0,0,0],R=[0,0,0],O=y<.5?y*(1+b):y+b-y*b,j=2*y-O,H=g/360;N[0]=H+1/3,N[1]=H,N[2]=H-1/3;for(var X=0;X<3;X++)N[X]<0&&(N[X]+=1),N[X]>1&&(N[X]-=1),6*N[X]<1?R[X]=j+(O-j)*6*N[X]:2*N[X]<1?R[X]=O:3*N[X]<2?R[X]=j+(O-j)*(2/3-N[X])*6:R[X]=j;r=[P(R[0]*255),P(R[1]*255),P(R[2]*255)],dLine truncated
|
||||
<div :ref="root" class="pickr">
|
||||
|
||||
${C?"":'<button type="button" :ref="button" class="pcr-button"></button>'}
|
||||
|
||||
<div :ref="app" class="pcr-app ${x||""}" data-theme="${T}" ${v?'style="position: unset"':""} aria-label="${P("ui:dialog")}" role="window">
|
||||
<div class="pcr-selection" ${D(m.palette)}>
|
||||
<div :obj="preview" class="pcr-color-preview" ${D(m.preview)}>
|
||||
<button type="button" :ref="lastColor" class="pcr-last-color" aria-label="${P("btn:last-color")}"></button>
|
||||
<div :ref="currentColor" class="pcr-current-color"></div>
|
||||
</div>
|
||||
|
||||
<div :obj="palette" class="pcr-color-palette">
|
||||
<div :ref="picker" class="pcr-picker"></div>
|
||||
<div :ref="palette" class="pcr-palette" tabindex="0" aria-label="${P("aria:palette")}" role="listbox"></div>
|
||||
</div>
|
||||
|
||||
<div :obj="hue" class="pcr-color-chooser" ${D(m.hue)}>
|
||||
<div :ref="picker" class="pcr-picker"></div>
|
||||
<div :ref="slider" class="pcr-hue pcr-slider" tabindex="0" aria-label="${P("aria:hue")}" role="slider"></div>
|
||||
</div>
|
||||
|
||||
<div :obj="opacity" class="pcr-color-opacity" ${D(m.opacity)}>
|
||||
<div :ref="picker" class="pcr-picker"></div>
|
||||
<div :ref="slider" class="pcr-opacity pcr-slider" tabindex="0" aria-label="${P("aria:opacity")}" role="slider"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pcr-swatches ${m.palette?"":"pcr-last"}" :ref="swatches"></div>
|
||||
|
||||
<div :obj="interaction" class="pcr-interaction" ${D(Object.keys(m.interaction).length)}>
|
||||
<input :ref="result" class="pcr-result" type="text" spellcheck="false" ${D(m.interaction.input)} aria-label="${P("aria:input")}">
|
||||
|
||||
<input :arr="options" class="pcr-type" data-type="HEXA" value="${I?"HEX":"HEXA"}" type="button" ${D(m.interaction.hex)}>
|
||||
<input :arr="options" class="pcr-type" data-type="RGBA" value="${I?"RGB":"RGBA"}" type="button" ${D(m.interaction.rgba)}>
|
||||
<input :arr="options" class="pcr-type" data-type="HSLA" value="${I?"HSL":"HSLA"}" type="button" ${D(m.interaction.hsla)}>
|
||||
<input :arr="options" class="pcr-type" data-type="HSVA" value="${I?"HSV":"HSVA"}" type="button" ${D(m.interaction.hsva)}>
|
||||
<input :arr="options" class="pcr-type" data-type="CMYK" value="CMYK" type="button" ${D(m.interaction.cmyk)}>
|
||||
|
||||
<input :ref="save" class="pcr-save" value="${P("btn:save")}" type="button" ${D(m.interaction.save)} aria-label="${P("aria:btn:save")}">
|
||||
<input :ref="cancel" class="pcr-cancel" value="${P("btn:cancel")}" type="button" ${D(m.interaction.cancel)} aria-label="${P("aria:btn:cancel")}">
|
||||
<input :ref="clear" class="pcr-clear" value="${P("btn:clear")}" type="button" ${D(m.interaction.clear)} aria-label="${P("aria:btn:clear")}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`),q=G.interaction;return q.options.find(U=>!U.hidden&&!U.classList.add("active")),q.type=()=>q.options.find(U=>U.classList.contains("active")),G})(this),u.useAsButton&&(this._root.button=u.el),u.container.appendChild(this._root.root)}_finalBuild(){let u=this.options,h=this._root;if(u.container.removeChild(h.root),u.inline){let m=u.el.parentElement;u.el.nextSibling?m.insertBefore(h.app,u.el.nextSibling):m.appendChild(h.app)}else u.container.appendChild(h.app);u.useAsButton?u.inline&&u.el.remove():u.el.parentNode.replaceChild(h.root,u.el),u.disabled&&this.disable(),u.comparison||(h.button.style.transition="none",u.useAsButton||(h.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){let u=this,h=this.options.components,m=(u.options.sliders||"v").repeat(2),[C,v]=m.match(/^[vh]+$/g)?m:[],x=()=>this._color||(this._color=this._lastColor.clone()),T={palette:Qe({element:u._root.palette.picker,wrapper:u._root.palette.palette,onstop:()=>u._emit("changestop","slider",u),onchange(I,D){if(!h.palette)return;let P=x(),{_root:G,options:q}=u,{lastColor:U,currentColor:fe}=G.preview;u._recalc&&(P.s=100*I,P.v=100-100*D,P.v<0&&(P.v=0),u._updateOutput("slider"));let le=P.toRGBA().toString(0);this.element.style.background=le,this.wrapper.style.background=`
|
||||
linear-gradient(to top, rgba(0, 0, 0, ${P.a}), transparent),
|
||||
linear-gradient(to left, hsla(${P.h}, 100%, 50%, ${P.a}), rgba(255, 255, 255, ${P.a}))
|
||||
`,q.comparison?q.useAsButton||u._lastColor||U.style.setProperty("--pcr-color",le):(G.button.style.setProperty("--pcr-color",le),G.button.classList.remove("clear"));let Oe=P.toHEXA().toString();for(let{el:ye,color:Se}of u._swatchColors)ye.classList[Oe===Se.toHEXA().toString()?"add":"remove"]("pcr-active");fe.style.setProperty("--pcr-color",le)}}),hue:Qe({lock:v==="v"?"h":"v",element:u._root.hue.picker,wrapper:u._root.hue.slider,onstop:()=>u._emit("changestop","slider",u),onchange(I){if(!h.hue||!h.palette)return;let D=x();u._recalc&&(D.h=360*I),this.element.style.backgroundColor=`hsl(${D.h}, 100%, 50%)`,T.palette.trigger()}}),opacity:Qe({lock:C==="v"?"h":"v",element:u._root.opacity.picker,wrapper:u._root.opacity.slider,onstop:()=>u._emit("changestop","slider",u),onchange(I){if(!h.opacity||!h.palette)return;let D=x();u._recalc&&(D.a=Math.round(100*I)/100),this.element.style.background=`rgba(0, 0, 0, ${D.a})`,T.palette.trigger()}}),selectable:ie({elements:u._root.interaction.options,className:"active",onchange(I){u._representation=I.target.getAttribute("data-type").toUpperCase(),u._recalc&&u._updateOutput("swatch")}})};this._components=T}_bindEvents(){let{_root:u,options:h}=this,m=[i(u.interaction.clear,"click",()=>this._clearColor()),i([u.interaction.cancel,u.preview.lastColor],"click",()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")}),i(u.interaction.save,"click",()=>{!this.applyColor()&&!h.showAlways&&this.hide()}),i(u.interaction.result,["keyup","input"],C=>{this.setColor(C.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),C.stopImmediatePropagation()}),i(u.interaction.result,["focus","blur"],C=>{this._recalc=C.type==="blur",this._recalc&&this._updateOutput(null)}),i([u.palette.palette,u.palette.picker,u.hue.slider,u.hue.picker,u.opacity.slider,u.opacity.picker],["mousedown","touchstart"],()=>this._recalc=!0,{passive:!0})];if(!h.showAlways){let C=h.closeWithKey;m.push(i(u.button,"click",()=>this.isOpen()?this.hide():this.show()),i(document,"keyup",v=>this.isOpen()&&(v.key===C||v.code===C)&&this.hide()),i(document,["touchstart","mousedown"],v=>{this.isOpen()&&!p(v).some(x=>x===u.app||x===u.button)&&this.hide()},{capture:!0}))}if(h.adjustableNumbers){let C={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};S(u.interaction.result,(v,x,T)=>{let I=C[this.getColorRepresentation().toLowerCase()];if(I){let D=I[T],P=v+(D>=100?1e3*x:x);return P<=0?0:Number((P<D?P:D).toPrecision(3))}return v})}if(h.autoReposition&&!h.inline){let C=null,v=this;m.push(i(window,["scroll","resize"],()=>{v.isOpen()&&(h.closeOnScroll&&v.hide(),C===null?(C=setTimeout(()=>C=null,100),requestAnimationFrame(function x(){v._rePositioningPicker(),C!==null&&requestAnimationFrame(x)})):(clearTimeout(C),C=setTimeout(()=>C=null,100)))},{capture:!0}))}this._eventBindings=m}_rePositioningPicker(){let{options:u}=this;if(!u.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:u.position})){let h=this._root.app,m=h.getBoundingClientRect();h.style.top=(window.innerHeight-m.height)/2+"px",h.style.left=(window.innerWidth-m.width)/2+"px"}}_updateOutput(u){let{_root:h,_color:m,options:C}=this;if(h.interaction.type()){let v=`to${h.interaction.type().getAttribute("data-type")}`;h.interaction.result.value=typeof m[v]=="function"?m[v]().toString(C.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",m,u,this)}_clearColor(){let u=arguments.length>0&&arguments[0]!==void 0&&arguments[0],{_root:h,options:m}=this;m.useAsButton||h.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),h.button.classList.add("clear"),m.showAlways||this.hide(),this._lastColor=null,this._initializingActive||u||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(u){let{values:h,type:m,a:C}=Te(u),{lockOpacity:v}=this.options,x=C!==void 0&&C!==1;return h&&h.length===3&&(h[3]=void 0),{values:!h||v&&x?null:h,type:m}}_t(u){return this.options.i18n[u]||M.I18N_DEFAULTS[u]}_emit(u){for(var h=arguments.length,m=new Array(h>1?h-1:0),C=1;C<h;C++)m[C-1]=arguments[C];this._eventListener[u].forEach(v=>v(...m,this))}on(u,h){return this._eventListener[u].push(h),this}off(u,h){let m=this._eventListener[u]||[],C=m.indexOf(h);return~C&&m.splice(C,1),this}addSwatch(u){let{values:h}=this._parseLocalColor(u);if(h){let{_swatchColors:m,_root:C}=this,v=xe(...h),x=c(`<button type="button" style="--pcr-color: ${v.toRGBA().toString(0)}" aria-label="${this._t("btn:swatch")}"/>`);return C.swatches.appendChild(x),m.push({el:x,color:v}),this._eventBindings.push(i(x,"click",()=>{this.setHSVA(...v.toHSVA(),!0),this._emit("swatchselect",v),this._emit("change",v,"swatch",this)})),!0}return!1}removeSwatch(u){let h=this._swatchColors[u];if(h){let{el:m}=h;return this._root.swatches.removeChild(m),this._swatchColors.splice(u,1),!0}return!1}applyColor(){let u=arguments.length>0&
Line truncated
|
||||
body.css-settings-manager {
|
||||
${n.reduce((i,l)=>i+`--${l.key}: ${l.value}; `,"")}
|
||||
}
|
||||
|
||||
body.theme-light.css-settings-manager {
|
||||
${t.reduce((i,l)=>i+`--${l.key}: ${l.value}; `,"")}
|
||||
}
|
||||
|
||||
body.theme-dark.css-settings-manager {
|
||||
${a.reduce((i,l)=>i+`--${l.key}: ${l.value}; `,"")}
|
||||
}
|
||||
`.trim().replace(/[\r\n\s]+/g," "),this.plugin.app.workspace.trigger("css-change",{source:"style-settings"})}setConfig(n){this.config={},this.gradients={},n.forEach(a=>{this.config[a.id]={},a.settings.forEach(i=>{this.config[a.id][i.id]=i,i.type===he.COLOR_GRADIENT&&(this.gradients[a.id]||(this.gradients[a.id]=[]),this.gradients[a.id].push(i))})});let t=!1;for(let a in this.settings){let[i,l]=a.split("@@");this.config[i]&&!this.config[i][l]&&(delete this.settings[a],t=!0)}t?this.save():this.setCSSVariables()}getSetting(n,t){return this.settings[`${n}@@${t}`]}getSettings(n,t){return t.reduce((a,i)=>{let l=`${n}@@${i}`,c=["dark","light"];return this.settings[l]&&(a[l]=this.settings[l]),c.forEach(f=>{let p=`${l}@@${f}`;this.settings[p]&&(a[p]=this.settings[p])}),a},{})}setSetting(n,t,a){this.settings[`${n}@@${t}`]=a,this.save(),this.removeClasses(),this.initClasses()}setSettings(n){return Object.keys(n).forEach(t=>{this.settings[t]=n[t]}),this.removeClasses(),this.initClasses(),this.save()}clearSetting(n,t){delete this.settings[`${n}@@${t}`],this.save(),this.removeClasses(),this.initClasses()}clearSection(n){Object.keys(this.settings).forEach(t=>{let[a]=t.split("@@");a===n&&delete this.settings[t]}),this.save(),this.removeClasses(),this.initClasses()}export(n,t){new Qt(this.plugin.app,this.plugin,n,t).open()}import(){new Zt(this.plugin.app,this.plugin).open()}};var ei={};var ti={};var ri={};var ni={"Default:":"Standard:","Error:":"Fehler:","missing default light value, or value is not in a valid color format":"Fehlender heller standard Wert oder Wert ist in keinem validen Farb-Format","missing default dark value, or value is not in a valid color format":"Fehlender dunkler standard Wert oder Wert ist in keinem validen Farb-Format","missing default value, or value is not in a valid color format":"Fehlender standard Wert oder Wert ist in keinem validen Farb-Format","missing default value":"Fehlender standard Wert"};var nn={"Default:":"Default:","Error:":"Error:","missing default light value, or value is not in a valid color format":"missing default light value, or value is not in a valid color format","missing default dark value, or value is not in a valid color format":"missing default dark value, or value is not in a valid color format","missing default value, or value is not in a valid color format":"missing default value, or value is not in a valid color format","missing default value":"missing default value"};var ii={};var ai={};var si={};var oi={};var li={};var ci={};var ui={};var fi={"Default:":"Standaard:","Error:":"Error:","missing default light value, or value is not in a valid color format":"Geen standaard waarde voor het lichte thema, of de waarde is niet in het goede formaat","missing default dark value, or value is not in a valid color format":"Geen standaard waarde voor het donkere thema, of de waarde is niet in het goede formaat","missing default value, or value is not in a valid color format":"Geen standaard waarde, of de waarde is niet in het goede formaat","missing default value":"Geen standaard waarde"};var gi={};var pi={};var hi={};var di={};var vi={};var mi={};var bi={};var yi={};var Si={};var Ci={"Default:":"\u9ED8\u8BA4\uFF1A","Error:":"\u9519\u8BEF\uFF1A","missing default light value, or value is not in a valid color format":"\u7F3A\u5C11\u9ED8\u8BA4\u7684\u6D45\u8272\u6A21\u5F0F\u8272\u503C\uFF0C\u6216\u8BE5\u8272\u503C\u6CA1\u6709\u91C7\u7528\u4E00\u4E2A\u6709\u6548\u7684\u989C\u8272\u683C\u5F0F","missing default dark value, or value is not in a valid color format":"\u7F3A\u5C11\u9ED8\u8BA4\u7684\u6DF1\u8272\u6A21\u5F0F\u8272\u503C\uFF0C\u6216\u8BE5\u8272\u503C\u6CA1\u6709\u91C7\u7528\u4E00\u4E2A\u6709\u6548\u7684\u989C\u8272\u683C\u5F0F","missing default value, or value is not in a valid color format":"\u7F3A\u5C11\u9ED8\u8BA4\u8272\u503C\uFF0C\u6216\u8BE5\u8272\u503C\u6CA1\u6709\u91C7\u7528\u4E00\u4E2A\u6709\u6548\u7684\u989C\u8272\u683C\u5F0F","missing default value":"\u7F3A\u5C11\u9ED8\u8BA4\u8272\u503C"};var xi={};var ct=window.localStorage.getItem("language"),pl={ar:ei,cz:ti,da:ri,de:ni,en:nn,es:ii,fr:ai,hi:si,id:oi,it:li,ja:ci,ko:ui,nl:fi,no:gi,pl:pi,"pt-BR":di,pt:hi,ro:vi,ru:mi,sq:bi,tr:yi,uk:Si,"zh-TW":xi,zh:Ci},an=pl[ct||"en"];function de(e){return an||console.error("Error: Style Settings locale not found",ct),an&&an[e]||nn[e]}var sn=/\/\*!?\s*@settings[\r\n]+?([\s\S]+?)\*\//g,wi=/^name:\s*(.+)$/m;function ve(e){return ct&&e[`title.${ct}`]||e.title}function me(e){return ct&&e[`description.${ct}`]||e.description}function Ct(e){return/^(#|rgb|hsl)/.test(e)}function Nt(e){let{el:n,isView:t,containerEl:a,swatches:i,opacity:l,defaultColor:c}=e;return{el:n,container:t?document.body:a,theme:"nano",swatches:i,lockOpacity:!l,default:c,position:"left-middle",components:{preview:!0,hue:!0,opacity:!!l,interaction:{hex:!0,rgba:!0,hsla:!0,input:!0,cancel:!0,save:!0}}}}function Ot(e){e.hide()}function Ei(e){return e===""?'""':e.replace(/[;<>]/g,"")}function We(e,n,t){let a=createFragment
Line truncated
|
||||
|
||||
`+e.mark.snippet),a+" "+t):a}function Pt(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=ea(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Pt.prototype=Object.create(Error.prototype);Pt.prototype.constructor=Pt;Pt.prototype.toString=function(n){return this.name+": "+ea(this,n)};var $e=Pt;function gn(e,n,t,a,i){var l="",c="",f=Math.floor(i/2)-1;return a-n>f&&(l=" ... ",n=a-f+l.length),t-a>f&&(c=" ...",t=a+f-c.length),{str:l+e.slice(n,t).replace(/\t/g,"\u2192")+c,pos:a-n+l.length}}function pn(e,n){return Ae.repeat(" ",n-e.length)+e}function Il(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var t=/\r?\n|\r|\0/g,a=[0],i=[],l,c=-1;l=t.exec(e.buffer);)i.push(l.index),a.push(l.index+l[0].length),e.position<=l.index&&c<0&&(c=a.length-2);c<0&&(c=a.length-1);var f="",p,w,S=Math.min(e.line+n.linesAfter,i.length).toString().length,E=n.maxLength-(n.indent+S+3);for(p=1;p<=n.linesBefore&&!(c-p<0);p++)w=gn(e.buffer,a[c-p],i[c-p],e.position-(a[c]-a[c-p]),E),f=Ae.repeat(" ",n.indent)+pn((e.line-p+1).toString(),S)+" | "+w.str+`
|
||||
`+f;for(w=gn(e.buffer,a[c],i[c],e.position,E),f+=Ae.repeat(" ",n.indent)+pn((e.line+1).toString(),S)+" | "+w.str+`
|
||||
`,f+=Ae.repeat("-",n.indent+S+3+w.pos)+`^
|
||||
`,p=1;p<=n.linesAfter&&!(c+p>=i.length);p++)w=gn(e.buffer,a[c+p],i[c+p],e.position-(a[c]-a[c+p]),E),f+=Ae.repeat(" ",n.indent)+pn((e.line+p+1).toString(),S)+" | "+w.str+`
|
||||
`;return f.replace(/\n$/,"")}var Fl=Il,Nl=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ol=["scalar","sequence","mapping"];function Dl(e){var n={};return e!==null&&Object.keys(e).forEach(function(t){e[t].forEach(function(a){n[String(a)]=t})}),n}function Rl(e,n){if(n=n||{},Object.keys(n).forEach(function(t){if(Nl.indexOf(t)===-1)throw new $e('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(t){return t},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Dl(n.styleAliases||null),Ol.indexOf(this.kind)===-1)throw new $e('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Ne=Rl;function Pi(e,n){var t=[];return e[n].forEach(function(a){var i=t.length;t.forEach(function(l,c){l.tag===a.tag&&l.kind===a.kind&&l.multi===a.multi&&(i=c)}),t[i]=a}),t}function $l(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,t;function a(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(n=0,t=arguments.length;n<t;n+=1)arguments[n].forEach(a);return e}function dn(e){return this.extend(e)}dn.prototype.extend=function(n){var t=[],a=[];if(n instanceof Ne)a.push(n);else if(Array.isArray(n))a=a.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(t=t.concat(n.implicit)),n.explicit&&(a=a.concat(n.explicit));else throw new $e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.forEach(function(l){if(!(l instanceof Ne))throw new $e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new $e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new $e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),a.forEach(function(l){if(!(l instanceof Ne))throw new $e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(dn.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(a),i.compiledImplicit=Pi(i,"implicit"),i.compiledExplicit=Pi(i,"explicit"),i.compiledTypeMap=$l(i.compiledImplicit,i.compiledExplicit),i};var ta=dn,ra=new Ne("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),na=new Ne("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),ia=new Ne("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),aa=new ta({explicit:[ra,na,ia]});function Pl(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function Vl(){return null}function Bl(e){return e===null}var sa=new Ne("tag:yaml.org,2002:null",{kind:"scalar",resolve:Pl,construct:Vl,predicate:Bl,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Hl(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function jl(e){return e==="true"||e==="True"||e==="TRUE"}function Gl(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var oa=new Ne("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Hl,construct:jl,predicate:Gl,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function Yl(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function Ul(e){return 48<=e&&e<=55}function Wl(e){return 48<=e&&e<=57}function ql(e){if(e===null)return!1;var n=e.length,t=0,a=!1,i;if(!n)return!1;if(i=e[t],(i==="-"||i==="+")&&(i=e[++t]),i==="0"){if(t+1===n)return!0;if(i=e[++t],i==="b"){for(t++;t<n;t++)if(i=e[t],i!=="_"){if(i!=="0"&&i!=="1")return!1;a=!0}return a&&i!=="_"}if(i==="x"){for(t++;t<n;t++)if(i=e[t],i!=="_"){if(!Yl(e.charCodeAt(t)))return!1;a=!0}return a&&i!=="_"}if(i==="o"){for(t++;t<n;t++)if(i=e[t],i!=="_"){if(!Ul(e.charCodeAt(t)))return!1;a=!0}return a&&i!=="_"}}if(i==="_")return!1;for(;t<n;t++)if(i=e[t],i!=="_"){if(!Wl(e.charCodeAt(t)))return!1;a=!0}return!(!a||i==="_")}function zl(e){var n=e,t=1,a;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),a=n[0],(a==="-"||a==="+")&&(a==="-"&&(t=-1),n=n.slice(1),a=n[0]),n==="0")return 0;if(a==="0"){if(n[1]==="b")return t*parseInt(n.
Line truncated
|
||||
\r`;function sc(e){if(e===null)return!1;var n,t,a=0,i=e.length,l=Sn;for(t=0;t<i;t++)if(n=l.indexOf(e.charAt(t)),!(n>64)){if(n<0)return!1;a+=6}return a%8===0}function oc(e){var n,t,a=e.replace(/[\r\n=]/g,""),i=a.length,l=Sn,c=0,f=[];for(n=0;n<i;n++)n%4===0&&n&&(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)),c=c<<6|l.indexOf(a.charAt(n));return t=i%4*6,t===0?(f.push(c>>16&255),f.push(c>>8&255),f.push(c&255)):t===18?(f.push(c>>10&255),f.push(c>>2&255)):t===12&&f.push(c>>4&255),new Uint8Array(f)}function lc(e){var n="",t=0,a,i,l=e.length,c=Sn;for(a=0;a<l;a++)a%3===0&&a&&(n+=c[t>>18&63],n+=c[t>>12&63],n+=c[t>>6&63],n+=c[t&63]),t=(t<<8)+e[a];return i=l%3,i===0?(n+=c[t>>18&63],n+=c[t>>12&63],n+=c[t>>6&63],n+=c[t&63]):i===2?(n+=c[t>>10&63],n+=c[t>>4&63],n+=c[t<<2&63],n+=c[64]):i===1&&(n+=c[t>>2&63],n+=c[t<<4&63],n+=c[64],n+=c[64]),n}function cc(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var va=new Ne("tag:yaml.org,2002:binary",{kind:"scalar",resolve:sc,construct:oc,predicate:cc,represent:lc}),uc=Object.prototype.hasOwnProperty,fc=Object.prototype.toString;function gc(e){if(e===null)return!0;var n=[],t,a,i,l,c,f=e;for(t=0,a=f.length;t<a;t+=1){if(i=f[t],c=!1,fc.call(i)!=="[object Object]")return!1;for(l in i)if(uc.call(i,l))if(!c)c=!0;else return!1;if(!c)return!1;if(n.indexOf(l)===-1)n.push(l);else return!1}return!0}function pc(e){return e!==null?e:[]}var ma=new Ne("tag:yaml.org,2002:omap",{kind:"sequence",resolve:gc,construct:pc}),hc=Object.prototype.toString;function dc(e){if(e===null)return!0;var n,t,a,i,l,c=e;for(l=new Array(c.length),n=0,t=c.length;n<t;n+=1){if(a=c[n],hc.call(a)!=="[object Object]"||(i=Object.keys(a),i.length!==1))return!1;l[n]=[i[0],a[i[0]]]}return!0}function vc(e){if(e===null)return[];var n,t,a,i,l,c=e;for(l=new Array(c.length),n=0,t=c.length;n<t;n+=1)a=c[n],i=Object.keys(a),l[n]=[i[0],a[i[0]]];return l}var ba=new Ne("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:dc,construct:vc}),mc=Object.prototype.hasOwnProperty;function bc(e){if(e===null)return!0;var n,t=e;for(n in t)if(mc.call(t,n)&&t[n]!==null)return!1;return!0}function yc(e){return e!==null?e:{}}var ya=new Ne("tag:yaml.org,2002:set",{kind:"mapping",resolve:bc,construct:yc}),Cn=fa.extend({implicit:[ha,da],explicit:[va,ma,ba,ya]}),ot=Object.prototype.hasOwnProperty,yr=1,Sa=2,Ca=3,Sr=4,hn=1,Sc=2,Vi=3,Cc=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,xc=/[\x85\u2028\u2029]/,wc=/[,\[\]\{\}]/,xa=/^(?:!|!!|![a-z\-]+!)$/i,wa=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Bi(e){return Object.prototype.toString.call(e)}function Xe(e){return e===10||e===13}function ft(e){return e===9||e===32}function Ge(e){return e===9||e===32||e===10||e===13}function _t(e){return e===44||e===91||e===93||e===123||e===125}function Ec(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function _c(e){return e===120?2:e===117?4:e===85?8:0}function Ac(e){return 48<=e&&e<=57?e-48:-1}function Hi(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
||||
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function kc(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var Ea=new Array(256),_a=new Array(256);for(ut=0;ut<256;ut++)Ea[ut]=Hi(ut)?1:0,_a[ut]=Hi(ut);var ut;function Tc(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||Cn,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Aa(e,n){var t={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return t.snippet=Fl(t),new $e(n,t)}function W(e,n){throw Aa(e,n)}function Cr(e,n){e.onWarning&&e.onWarning.call(null,Aa(e,n))}var ji={YAML:function(n,t,a){var i,l,c;n.version!==null&&W(n,"duplication of %YAML directive"),a.length!==1&&W(n,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),i===null&&W(n,"ill-formed argument of the YAML directive"),l=parseInt(i[1],10),c=parseInt(i[2],10),l!==1&&W(n,"unacceptable YAML version of the document"),n.version=a[0],n.checkLineBreaks=c<2,c!==1&&c!==2&&Cr(n,"unsupported YAML version of the document")},TAG:function(n,t,a){var i,l;a.length!==2&&W(n,"TAG directive accepts exactly two arguments"),i=a[0],l=a[1],xa.test(i)||W(n,"ill-formed tag handle (first argument) of the TAG directive"),ot.call(n.tagMap,i)&&W(n,'there is a previously declared suffix for "'+i+'" tag handle'),wa.test(l)||W(n,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch(c){W(n,"tag prefix is malformed: "+l)}n.tagMap[i]=l}};function st(e,n,t,a){var i,l,c,f;if(n<t){if(f=e.input.slice(n,t),a)for(i=0,l=f.length;i<l;i+=1)c=f.charCodeAt(i),c===9||32<=c&&c<=1114111||W(e,"expected valid JSON character");else Cc.test(f)&&W(e,"the stream contains non-printable characters");e.result+=f}}function Gi(e,n,t,a){var i,l,c,f;for(Ae.isObject(t)||W(e,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(t),c=0,f=i.length;c<f;c+=1)l=i[c],ot.call(n,l)||(n[l]=t[l],a[l]=!0)}function At(e,n,t,a,i,l,c,f,p){var w,S;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),w=0,S=i.length;w<S;w+=1)Array.isArray(i[w])&&W(e,"nested arrays are not supported inside keys"),typeof i=="object"&&Bi(i[w])==="[object Object]"&&(i[w]="[object Object]");if(typeof i=="object"&&Bi(i)==="[object Object]"&&(i="[object Object]"),i=String(i),n===null&&(n={}),a==="tag:yaml.org,2002:merge")if(Array.isArray(l))for(w=0,S=l.length;w<S;w+=1)Gi(e,n,l[w],t);else Gi(e,n,l,t);else!e.json&&!ot.call(t,i)&&ot.call(n,i)&&(e.line=c||e.line,e.lineStart=f||e.lineStart,e.position=p||e.position,W(e,"duplicated mapping key")),i==="__proto__"?Object.defineProperty(n,i,{configurable:!0,enumerable:!0,writable:!0,value:l}):n[i]=l,delete t[i];return n}function xn(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):W(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function Ee(e,n,t){for(var a=0,i=e.input.charCodeAt(e.position);i!==0;){for(;ft(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(n&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Xe(i))for(xn(e),i=e.input.charCodeAt(e.position),a++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return t!==-1&&a!==0&&e.lineIndent<t&&Cr(e,"deficient indentation"),a}function Er(e){var n=e.position,t;return t=e.input.charCodeAt(n),!!((t===45||t===46)&&t===e.input.charCodeAt(n+1)&&t===e.input.charCodeAt(n+2)&&(n+=3,t=e.input.charCodeAt(n),t===0||Ge(t)))}function wn(e,n){n===1?e.result+=" ":n>1&&(e.result+=Ae.repeat(`
|
||||
`,n-1))}function Lc(e,n,t){var a,i,l,c,f,p,w,S,E=e.kind,B=e.result,Y;if(Y=e.input.charCodeAt(e.position),Ge(Y)||_t(Y)||Y===35||Y===38||Y===42||Y===33||Y===124||Y===62||Y===39||Y===34||Y===37||Y===64||Y===96||(Y===63||Y===45)&&(i=e.input.charCodeAt(e.position+1),Ge(i)||t&&_t(i)))return!1;for(e.kind="scalar",e.result="",l=c=e.position,f=!1;Y!==0;){if(Y===58){if(i=e.input.charCodeAt(e.position+1),Ge(i)||t&&_t(i))break}else if(Y===35){if(a=e.input.charCodeAt(e.position-1),Ge(a))break}else{if(e.position===e.lineStart&&Er(e)||t&&_t(Y))break;if(Xe(Y))if(p=e.line,w=e.lineStart,S=e.lineIndent,Ee(e,!1,-1),e.lineIndent>=n){f=!0,Y=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=p,e.lineStart=w,e.lineIndent=S;break}}f&&(st(e,l,c,!1),wn(e,e.line-p),l=c=e.position,f=!1),ft(Y)||(c=e.position+1),Y=e.input.charCodeAt(++e.position)}return st(e,l,c,!1),e.result?!0:(e.kind=E,e.result=B,!1)}function Mc(e,n){var t,a,i;if(t=e.input.charCodeAt(e.position),t!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=i=e.position;(t=e.input.charCodeAt(e.position))!==0;)if(t===39)if(st(e,a,e.position,!0),t=e.input.charCodeAt(++e.position),t===39)a=e.position,e.position++,i=e.position;else return!0;else Xe(t)?(st(e,a,i,!0),wn(e,Ee(e,!1,n)),a=i=e.position):e.position===e.lineStart&&Er(e)?W(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);W(e,"unexpected end of the stream within a single quoted scalar")}function Ic(e,n){var t,a,i,l,c,f;if(f=e.input.charCodeAt(e.position),f!==34)return!1;for(e.kind="scalar",e.result="",e.position++,t=a=e.position;(f=e.input.charCodeAt(e.position))!==0;){if(f===34)return st(e,t,e.position,!0),e.position++,!0;if(f===92){if(st(e,t,e.position,!0),f=e.input.charCodeAt(++e.position),Xe(f))Ee(e,!1,n);else if(f<256&&Ea[f])e.result+=_a[f],e.position++;else if((c=_c(f))>0){for(i=c,l=0;i>0;i--)f=e.input.charCodeAt(++e.position),(c=Ec(f))>=0?l=(l<<4)+c:W(e,"expected hexadecimal character");e.result+=kc(l),e.position++}else W(e,"unknown escape sequence");t=a=e.position}else Xe(f)?(st(e,t,a,!0),wn(e,Ee(e,!1,n)),t=a=e.position):e.position===e.lineStart&&Er(e)?W(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}W(e,"unexpected end of the stream within a double quoted scalar")}function Fc(e,n){var t=!0,a,i,l,c=e.tag,f,p=e.anchor,w,S,E,B,Y,K=Object.create(null),Q,L,re,F;if(F=e.input.charCodeAt(e.position),F===91)S=93,Y=!1,f=[];else if(F===123)S=125,Y=!0,f={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),F=e.input.charCodeAt(++e.position);F!==0;){if(Ee(e,!0,n),F=e.input.charCodeAt(e.position),F===S)return e.position++,e.tag=c,e.anchor=p,e.kind=Y?"mapping":"sequence",e.result=f,!0;t?F===44&&W(e,"expected the node content, but found ','"):W(e,"missed comma between flow collection entries"),L=Q=re=null,E=B=!1,F===63&&(w=e.input.charCodeAt(e.position+1),Ge(w)&&(E=B=!0,e.position++,Ee(e,!0,n))),a=e.line,i=e.lineStart,l=e.position,kt(e,n,yr,!1,!0),L=e.tag,Q=e.result,Ee(e,!0,n),F=e.input.charCodeAt(e.position),(B||e.line===a)&&F===58&&(E=!0,F=e.input.charCodeAt(++e.position),Ee(e,!0,n),kt(e,n,yr,!1,!0),re=e.result),Y?At(e,f,K,L,Q,re,a,i,l):E?f.push(At(e,null,K,L,Q,re,a,i,l)):f.push(Q),Ee(e,!0,n),F=e.input.charCodeAt(e.position),F===44?(t=!0,F=e.input.charCodeAt(++e.position)):t=!1}W(e,"unexpected end of the stream within a flow collection")}function Nc(e,n){var t,a,i=hn,l=!1,c=!1,f=n,p=0,w=!1,S,E;if(E=e.input.charCodeAt(e.position),E===124)a=!1;else if(E===62)a=!0;else return!1;for(e.kind="scalar",e.result="";E!==0;)if(E=e.input.charCodeAt(++e.position),E===43||E===45)hn===i?i=E===43?Vi:Sc:W(e,"repeat of a chomping mode identifier");else if((S=Ac(E))>=0)S===0?W(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?W(e,"repeat of an indentation width identifier"):(f=n+S-1,c=!0);else break;if(ft(E)){do E=e.input.charCodeAt(++e.position);while(ft(E));if(E===35)do E=e.input.charCodeAt(++e.position);while(!Xe(E)&&E!==0)}for(;E!==0;){for(xn(e),e.lineIndent=0,E=e.input.charCodeAt(e.position);(!c||e.lineIndent<f)&&E===32;)e.lineIndent++,E=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>f&&(f=e.lineIndent),Xe(E)){p++;continue}if(e.lineIndent<f){i===Vi?e.result+=Ae.repeat(`
|
||||
`,l?1+p:p):i===hn&&l&&(e.result+=`
|
||||
`);break}for(a?ft(E)?(w=!0,e.result+=Ae.repeat(`
|
||||
`,l?1+p:p)):w?(w=!1,e.result+=Ae.repeat(`
|
||||
`,p+1)):p===0?l&&(e.result+=" "):e.result+=Ae.repeat(`
|
||||
`,p):e.result+=Ae.repeat(`
|
||||
`,l?1+p:p),l=!0,c=!0,p=0,t=e.position;!Xe(E)&&E!==0;)E=e.input.charCodeAt(++e.position);st(e,t,e.position,!1)}return!0}function Yi(e,n){var t,a=e.tag,i=e.anchor,l=[],c,f=!1,p;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=l),p=e.input.charCodeAt(e.position);p!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,W(e,"tab characters must not be used in indentation")),!(p!==45||(c=e.input.charCodeAt(e.position+1),!Ge(c))));){if(f=!0,e.position++,Ee(e,!0,-1)&&e.lineIndent<=n){l.push(null),p=e.input.charCodeAt(e.position);continue}if(t=e.line,kt(e,n,Ca,!1,!0),l.push(e.result),Ee(e,!0,-1),p=e.input.charCodeAt(e.position),(e.line===t||e.lineIndent>n)&&p!==0)W(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return f?(e.tag=a,e.anchor=i,e.kind="sequence",e.result=l,!0):!1}function Oc(e,n,t){var a,i,l,c,f,p,w=e.tag,S=e.anchor,E={},B=Object.create(null),Y=null,K=null,Q=null,L=!1,re=!1,F;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=E),F=e.input.charCodeAt(e.position);F!==0;){if(!L&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,W(e,"tab characters must not be used in indentation")),a=e.input.charCodeAt(e.position+1),l=e.line,(F===63||F===58)&&Ge(a))F===63?(L&&(At(e,E,B,Y,K,null,c,f,p),Y=K=Q=null),re=!0,L=!0,i=!0):L?(L=!1,i=!0):W(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,F=a;else{if(c=e.line,f=e.lineStart,p=e.position,!kt(e,t,Sa,!1,!0))break;if(e.line===l){for(F=e.input.charCodeAt(e.position);ft(F);)F=e.input.charCodeAt(++e.position);if(F===58)F=e.input.charCodeAt(++e.position),Ge(F)||W(e,"a whitespace character is expected after the key-value separator within a block mapping"),L&&(At(e,E,B,Y,K,null,c,f,p),Y=K=Q=null),re=!0,L=!1,i=!1,Y=e.tag,K=e.result;else if(re)W(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=w,e.anchor=S,!0}else if(re)W(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=w,e.anchor=S,!0}if((e.line===l||e.lineIndent>n)&&(L&&(c=e.line,f=e.lineStart,p=e.position),kt(e,n,Sr,!0,i)&&(L?K=e.result:Q=e.result),L||(At(e,E,B,Y,K,Q,c,f,p),Y=K=Q=null),Ee(e,!0,-1),F=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>n)&&F!==0)W(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return L&&At(e,E,B,Y,K,null,c,f,p),re&&(e.tag=w,e.anchor=S,e.kind="mapping",e.result=E),re}function Dc(e){var n,t=!1,a=!1,i,l,c;if(c=e.input.charCodeAt(e.position),c!==33)return!1;if(e.tag!==null&&W(e,"duplication of a tag property"),c=e.input.charCodeAt(++e.position),c===60?(t=!0,c=e.input.charCodeAt(++e.position)):c===33?(a=!0,i="!!",c=e.input.charCodeAt(++e.position)):i="!",n=e.position,t){do c=e.input.charCodeAt(++e.position);while(c!==0&&c!==62);e.position<e.length?(l=e.input.slice(n,e.position),c=e.input.charCodeAt(++e.position)):W(e,"unexpected end of the stream within a verbatim tag")}else{for(;c!==0&&!Ge(c);)c===33&&(a?W(e,"tag suffix cannot contain exclamation marks"):(i=e.input.slice(n-1,e.position+1),xa.test(i)||W(e,"named tag handle cannot contain such characters"),a=!0,n=e.position+1)),c=e.input.charCodeAt(++e.position);l=e.input.slice(n,e.position),wc.test(l)&&W(e,"tag suffix cannot contain flow indicator characters")}l&&!wa.test(l)&&W(e,"tag name cannot contain such characters: "+l);try{l=decodeURIComponent(l)}catch(f){W(e,"tag name is malformed: "+l)}return t?e.tag=l:ot.call(e.tagMap,i)?e.tag=e.tagMap[i]+l:i==="!"?e.tag="!"+l:i==="!!"?e.tag="tag:yaml.org,2002:"+l:W(e,'undeclared tag handle "'+i+'"'),!0}function Rc(e){var n,t;if(t=e.input.charCodeAt(e.position),t!==38)return!1;for(e.anchor!==null&&W(e,"duplication of an anchor property"),t=e.input.charCodeAt(++e.position),n=e.position;t!==0&&!Ge(t)&&!_t(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&W(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function $c(e){var n,t,a;if(a=e.input.charCodeAt(e.position),a!==42)return!1;for(a=e.input.charCodeAt(++e.position),n=e.position;a!==0&&!Ge(a)&&!_t(a);)a=e.input.charCodeAt(++e.position);return e.position===n&&W(e,"name of an alias node must contain at least one character"),t=e.input.slice(n,e.position),ot.call(e.anchorMap,t)||W(e,'unidentified alias "'+t+'"'),e.result=e.anchorMap[t],Ee(e,!0,-1),!0}function kt(e,n,t,a,i){var l,c,f,p=1,w=!1,S=!1,E,B,Y,K,Q,L;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,l=c=f=Sr===t||Ca===t,a&&Ee(e,!0,-1)&&(w=!0,e.lineIndent>n?p=1:e.lineIndent===n?p=0:e.lineIndent<n&&(p=-1)),p===1)for(;Dc(e)||Rc(e);)Ee(e,!0,-1)?(w=!0,f=l,e.lineIndent>n?p=1:e.lineIndent===n?p=0:e.lineIndent<n&&(p=-1)):f=!1;if(f&&(f=w||i),(p===1||Sr===t)&&(yr===t||Sa===t?Q=n:Q=n+1,L=e.position-e.lineStart,p===1?f&&(Yi(e,L)||Oc(e,L,Q))||Fc(e,Q)?S=!0:(c&&Nc(e,Q)||Mc(e,Q)||Ic(e,Q)?S=!0:$c(e)?(S=!0,(e.tag!==null||e.anchor!==null)&&W(e,"alias node
Line truncated
|
||||
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var t=new Tc(e,n),a=e.indexOf("\0");for(a!==-1&&(t.position=a,W(t,"null byte is not allowed in input")),t.input+="\0";t.input.charCodeAt(t.position)===32;)t.lineIndent+=1,t.position+=1;for(;t.position<t.length-1;)Pc(t);return t.documents}function Vc(e,n,t){n!==null&&typeof n=="object"&&typeof t=="undefined"&&(t=n,n=null);var a=ka(e,t);if(typeof n!="function")return a;for(var i=0,l=a.length;i<l;i+=1)n(a[i])}function Bc(e,n){var t=ka(e,n);if(t.length!==0){if(t.length===1)return t[0];throw new $e("expected a single document in the stream, but found more")}}var Hc=Vc,jc=Bc,Ta={loadAll:Hc,load:jc},La=Object.prototype.toString,Ma=Object.prototype.hasOwnProperty,En=65279,Gc=9,Vt=10,Yc=13,Uc=32,Wc=33,qc=34,vn=35,zc=37,Kc=38,Xc=39,Qc=42,Ia=44,Zc=45,xr=58,Jc=61,eu=62,tu=63,ru=64,Fa=91,Na=93,nu=96,Oa=123,iu=124,Da=125,De={};De[0]="\\0";De[7]="\\a";De[8]="\\b";De[9]="\\t";De[10]="\\n";De[11]="\\v";De[12]="\\f";De[13]="\\r";De[27]="\\e";De[34]='\\"';De[92]="\\\\";De[133]="\\N";De[160]="\\_";De[8232]="\\L";De[8233]="\\P";var au=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],su=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ou(e,n){var t,a,i,l,c,f,p;if(n===null)return{};for(t={},a=Object.keys(n),i=0,l=a.length;i<l;i+=1)c=a[i],f=String(n[c]),c.slice(0,2)==="!!"&&(c="tag:yaml.org,2002:"+c.slice(2)),p=e.compiledTypeMap.fallback[c],p&&Ma.call(p.styleAliases,f)&&(f=p.styleAliases[f]),t[c]=f;return t}function lu(e){var n,t,a;if(n=e.toString(16).toUpperCase(),e<=255)t="x",a=2;else if(e<=65535)t="u",a=4;else if(e<=4294967295)t="U",a=8;else throw new $e("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+t+Ae.repeat("0",a-n.length)+n}var cu=1,Bt=2;function uu(e){this.schema=e.schema||Cn,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Ae.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=ou(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Bt:cu,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Ui(e,n){for(var t=Ae.repeat(" ",n),a=0,i=-1,l="",c,f=e.length;a<f;)i=e.indexOf(`
|
||||
`,a),i===-1?(c=e.slice(a),a=f):(c=e.slice(a,i+1),a=i+1),c.length&&c!==`
|
||||
`&&(l+=t),l+=c;return l}function mn(e,n){return`
|
||||
`+Ae.repeat(" ",e.indent*n)}function fu(e,n){var t,a,i;for(t=0,a=e.implicitTypes.length;t<a;t+=1)if(i=e.implicitTypes[t],i.resolve(n))return!0;return!1}function wr(e){return e===Uc||e===Gc}function Ht(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==En||65536<=e&&e<=1114111}function Wi(e){return Ht(e)&&e!==En&&e!==Yc&&e!==Vt}function qi(e,n,t){var a=Wi(e),i=a&&!wr(e);return(t?a:a&&e!==Ia&&e!==Fa&&e!==Na&&e!==Oa&&e!==Da)&&e!==vn&&!(n===xr&&!i)||Wi(n)&&!wr(n)&&e===vn||n===xr&&i}function gu(e){return Ht(e)&&e!==En&&!wr(e)&&e!==Zc&&e!==tu&&e!==xr&&e!==Ia&&e!==Fa&&e!==Na&&e!==Oa&&e!==Da&&e!==vn&&e!==Kc&&e!==Qc&&e!==Wc&&e!==iu&&e!==Jc&&e!==eu&&e!==Xc&&e!==qc&&e!==zc&&e!==ru&&e!==nu}function pu(e){return!wr(e)&&e!==xr}function $t(e,n){var t=e.charCodeAt(n),a;return t>=55296&&t<=56319&&n+1<e.length&&(a=e.charCodeAt(n+1),a>=56320&&a<=57343)?(t-55296)*1024+a-56320+65536:t}function Ra(e){var n=/^\n* /;return n.test(e)}var $a=1,bn=2,Pa=3,Va=4,Et=5;function hu(e,n,t,a,i,l,c,f){var p,w=0,S=null,E=!1,B=!1,Y=a!==-1,K=-1,Q=gu($t(e,0))&&pu($t(e,e.length-1));if(n||c)for(p=0;p<e.length;w>=65536?p+=2:p++){if(w=$t(e,p),!Ht(w))return Et;Q=Q&&qi(w,S,f),S=w}else{for(p=0;p<e.length;w>=65536?p+=2:p++){if(w=$t(e,p),w===Vt)E=!0,Y&&(B=B||p-K-1>a&&e[K+1]!==" ",K=p);else if(!Ht(w))return Et;Q=Q&&qi(w,S,f),S=w}B=B||Y&&p-K-1>a&&e[K+1]!==" "}return!E&&!B?Q&&!c&&!i(e)?$a:l===Bt?Et:bn:t>9&&Ra(e)?Et:c?l===Bt?Et:bn:B?Va:Pa}function du(e,n,t,a,i){e.dump=function(){if(n.length===0)return e.quotingType===Bt?'""':"''";if(!e.noCompatMode&&(au.indexOf(n)!==-1||su.test(n)))return e.quotingType===Bt?'"'+n+'"':"'"+n+"'";var l=e.indent*Math.max(1,t),c=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-l),f=a||e.flowLevel>-1&&t>=e.flowLevel;function p(w){return fu(e,w)}switch(hu(n,f,e.indent,c,p,e.quotingType,e.forceQuotes&&!a,i)){case $a:return n;case bn:return"'"+n.replace(/'/g,"''")+"'";case Pa:return"|"+zi(n,e.indent)+Ki(Ui(n,l));case Va:return">"+zi(n,e.indent)+Ki(Ui(vu(n,c),l));case Et:return'"'+mu(n)+'"';default:throw new $e("impossible error: invalid scalar style")}}()}function zi(e,n){var t=Ra(e)?String(n):"",a=e[e.length-1]===`
|
||||
`,i=a&&(e[e.length-2]===`
|
||||
`||e===`
|
||||
`),l=i?"+":a?"":"-";return t+l+`
|
||||
`}function Ki(e){return e[e.length-1]===`
|
||||
`?e.slice(0,-1):e}function vu(e,n){for(var t=/(\n+)([^\n]*)/g,a=function(){var w=e.indexOf(`
|
||||
`);return w=w!==-1?w:e.length,t.lastIndex=w,Xi(e.slice(0,w),n)}(),i=e[0]===`
|
||||
`||e[0]===" ",l,c;c=t.exec(e);){var f=c[1],p=c[2];l=p[0]===" ",a+=f+(!i&&!l&&p!==""?`
|
||||
`:"")+Xi(p,n),i=l}return a}function Xi(e,n){if(e===""||e[0]===" ")return e;for(var t=/ [^ ]/g,a,i=0,l,c=0,f=0,p="";a=t.exec(e);)f=a.index,f-i>n&&(l=c>i?c:f,p+=`
|
||||
`+e.slice(i,l),i=l+1),c=f;return p+=`
|
||||
`,e.length-i>n&&c>i?p+=e.slice(i,c)+`
|
||||
`+e.slice(c+1):p+=e.slice(i),p.slice(1)}function mu(e){for(var n="",t=0,a,i=0;i<e.length;t>=65536?i+=2:i++)t=$t(e,i),a=De[t],!a&&Ht(t)?(n+=e[i],t>=65536&&(n+=e[i+1])):n+=a||lu(t);return n}function bu(e,n,t){var a="",i=e.tag,l,c,f;for(l=0,c=t.length;l<c;l+=1)f=t[l],e.replacer&&(f=e.replacer.call(t,String(l),f)),(Je(e,n,f,!1,!1)||typeof f=="undefined"&&Je(e,n,null,!1,!1))&&(a!==""&&(a+=","+(e.condenseFlow?"":" ")),a+=e.dump);e.tag=i,e.dump="["+a+"]"}function Qi(e,n,t,a){var i="",l=e.tag,c,f,p;for(c=0,f=t.length;c<f;c+=1)p=t[c],e.replacer&&(p=e.replacer.call(t,String(c),p)),(Je(e,n+1,p,!0,!0,!1,!0)||typeof p=="undefined"&&Je(e,n+1,null,!0,!0,!1,!0))&&((!a||i!=="")&&(i+=mn(e,n)),e.dump&&Vt===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=l,e.dump=i||"[]"}function yu(e,n,t){var a="",i=e.tag,l=Object.keys(t),c,f,p,w,S;for(c=0,f=l.length;c<f;c+=1)S="",a!==""&&(S+=", "),e.condenseFlow&&(S+='"'),p=l[c],w=t[p],e.replacer&&(w=e.replacer.call(t,p,w)),Je(e,n,p,!1,!1)&&(e.dump.length>1024&&(S+="? "),S+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Je(e,n,w,!1,!1)&&(S+=e.dump,a+=S));e.tag=i,e.dump="{"+a+"}"}function Su(e,n,t,a){var i="",l=e.tag,c=Object.keys(t),f,p,w,S,E,B;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new $e("sortKeys must be a boolean or a function");for(f=0,p=c.length;f<p;f+=1)B="",(!a||i!=="")&&(B+=mn(e,n)),w=c[f],S=t[w],e.replacer&&(S=e.replacer.call(t,w,S)),Je(e,n+1,w,!0,!0,!0)&&(E=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,E&&(e.dump&&Vt===e.dump.charCodeAt(0)?B+="?":B+="? "),B+=e.dump,E&&(B+=mn(e,n)),Je(e,n+1,S,!0,E)&&(e.dump&&Vt===e.dump.charCodeAt(0)?B+=":":B+=": ",B+=e.dump,i+=B));e.tag=l,e.dump=i||"{}"}function Zi(e,n,t){var a,i,l,c,f,p;for(i=t?e.explicitTypes:e.implicitTypes,l=0,c=i.length;l<c;l+=1)if(f=i[l],(f.instanceOf||f.predicate)&&(!f.instanceOf||typeof n=="object"&&n instanceof f.instanceOf)&&(!f.predicate||f.predicate(n))){if(t?f.multi&&f.representName?e.tag=f.representName(n):e.tag=f.tag:e.tag="?",f.represent){if(p=e.styleMap[f.tag]||f.defaultStyle,La.call(f.represent)==="[object Function]")a=f.represent(n,p);else if(Ma.call(f.represent,p))a=f.represent[p](n,p);else throw new $e("!<"+f.tag+'> tag resolver accepts not "'+p+'" style');e.dump=a}return!0}return!1}function Je(e,n,t,a,i,l,c){e.tag=null,e.dump=t,Zi(e,t,!1)||Zi(e,t,!0);var f=La.call(e.dump),p=a,w;a&&(a=e.flowLevel<0||e.flowLevel>n);var S=f==="[object Object]"||f==="[object Array]",E,B;if(S&&(E=e.duplicates.indexOf(t),B=E!==-1),(e.tag!==null&&e.tag!=="?"||B||e.indent!==2&&n>0)&&(i=!1),B&&e.usedDuplicates[E])e.dump="*ref_"+E;else{if(S&&B&&!e.usedDuplicates[E]&&(e.usedDuplicates[E]=!0),f==="[object Object]")a&&Object.keys(e.dump).length!==0?(Su(e,n,e.dump,i),B&&(e.dump="&ref_"+E+e.dump)):(yu(e,n,e.dump),B&&(e.dump="&ref_"+E+" "+e.dump));else if(f==="[object Array]")a&&e.dump.length!==0?(e.noArrayIndent&&!c&&n>0?Qi(e,n-1,e.dump,i):Qi(e,n,e.dump,i),B&&(e.dump="&ref_"+E+e.dump)):(bu(e,n,e.dump),B&&(e.dump="&ref_"+E+" "+e.dump));else if(f==="[object String]")e.tag!=="?"&&du(e,e.dump,n,l,p);else{if(f==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new $e("unacceptable kind of an object to dump "+f)}e.tag!==null&&e.tag!=="?"&&(w=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?w="!"+w:w.slice(0,18)==="tag:yaml.org,2002:"?w="!!"+w.slice(18):w="!<"+w+">",e.dump=w+" "+e.dump)}return!0}function Cu(e,n){var t=[],a=[],i,l;for(yn(e,t,a),i=0,l=a.length;i<l;i+=1)n.duplicates.push(t[a[i]]);n.usedDuplicates=new Array(l)}function yn(e,n,t){var a,i,l;if(e!==null&&typeof e=="object")if(i=n.indexOf(e),i!==-1)t.indexOf(i)===-1&&t.push(i);else if(n.push(e),Array.isArray(e))for(i=0,l=e.length;i<l;i+=1)yn(e[i],n,t);else for(a=Object.keys(e),i=0,l=a.length;i<l;i+=1)yn(e[a[i]],n,t)}function xu(e,n){n=n||{};var t=new uu(n);t.noRefs||Cu(e,t);var a=e;return t.replacer&&(a=t.replacer.call({"":a},"",a)),Je(t,0,a,!0,!0)?t.dump+`
|
||||
`:""}var wu=xu,Eu={dump:wu};function _n(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var _u=Ne,Au=ta,ku=aa,Tu=ua,Lu=fa,Mu=Cn,Iu=Ta.load,Fu=Ta.loadAll,Nu=Eu.dump,Ou=$e,Du={binary:va,float:ca,map:ia,null:sa,pairs:ba,set:ya,timestamp:ha,bool:oa,int:la,merge:da,omap:ma,seq:na,str:ra},Ru=_n("safeLoad","load"),$u=_n("safeLoadAll","loadAll"),Pu=_n("safeDump","dump"),Vu={Type:_u,Schema:Au,FAILSAFE_SCHEMA:ku,JSON_SCHEMA:Tu,CORE_SCHEMA:Lu,DEFAULT_SCHEMA:Mu,load:Iu,loadAll:Fu,dump:Nu,YAMLException:Ou,types:Du,safeLoad:Ru,safeLoadAll:$u,safeDump:Pu},Ba=Vu;var Ha=require("obsidian"),_r=class extends Ha.Plugin{constructor(){super(...arguments);this.settingsList=[];this.errorList=[];this.commandList=[];this.debounceTimer=0}async onload(){this.settingsManager=new Jt(this),await this.settingsManager.load(),this.settingsTab=new mr(this.app,this),this.addSettingTab(this.settingsTab),this.registerView(at,t=>new br(this,t)),this.addCommand({id:"show-style-settings-leaf",name:"Show style settings view",callback:()=>{this.activateView()}}),this.registerEvent(this.app.workspace.on("css-change",t=>{(t==null?void 0:t.source)!=="style-settings"&&this.parseCSS()})),this.registerEvent(this.app.workspace.on("parse-style-settings",()=>{this.parseCSS()})),this.lightEl=document.body.createDiv("theme-light style-settings-ref"),this.darkEl=document.body.createDiv("theme-dark style-settings-ref"),document.body.classList.add("css-settings-manager"),this.parseCSS(),this.app.workspace.onLayoutReady(()=>{this.settingsList&&this.app.workspace.getLeavesOfType(at).forEach(t=>{t.view.setSettings(this.settingsList,this.errorList)})})}getCSSVar(t){let a=getComputedStyle(this.lightEl).getPropertyValue(`--${t}`),i=getComputedStyle(this.darkEl).getPropertyValue(`--${t}`),l=getComputedStyle(document.body).getPropertyValue(`--${t}`);return{light:a,dark:i,current:l}}parseCSS(){clearTimeout(this.debounceTimer),this.debounceTimer=activeWindow.setTimeout(()=>{this.settingsList=[],this.errorList=[];for(let a of this.commandList)this.app.commands.removeCommand(a.id);this.commandList=[],this.settingsManager.removeClasses();let t=document.styleSheets;for(let a=0,i=t.length;a<i;a++){let l=t.item(a);l&&this.parseCSSStyleSheet(l)}this.registerSettingsToSettingsSearch(),this.settingsTab.setSettings(this.settingsList,this.errorList),this.app.workspace.getLeavesOfType(at).forEach(a=>{a.view.setSettings(this.settingsList,this.errorList)}),this.settingsManager.setConfig(this.settingsList),this.settingsManager.initClasses(),this.registerSettingCommands()},100)}registerSettingsToSettingsSearch(){var a;let t=()=>{if(window.SettingsSearch){let i=window.SettingsSearch;i.removeTabResources("obsidian-style-settings");for(let l of this.settingsList)i.addResources(...l.settings.map(c=>{var p,w;return{tab:"obsidian-style-settings",name:"Style Settings",text:(p=ve(c))!=null?p:"",desc:(w=me(c))!=null?w:""}}))}};(a=this.app.plugins.plugins["settings-search"])!=null&&a.loaded?t():this.app.workspace.on("settings-search-loaded",()=>{t()})}unregisterSettingsFromSettingsSearch(){var t;(t=this.app.plugins.plugins["settings-search"])!=null&&t.loaded&&window.SettingsSearch.removeTabResources("obsidian-style-settings")}parseCSSStyleSheet(t){var l,c;let a=(c=(l=t==null?void 0:t.ownerNode)==null?void 0:l.textContent)==null?void 0:c.trim();if(!a)return;let i=sn.exec(a);if(i!=null&&i.length)do{let f=a.match(wi);if(!f)continue;let p=f[1];try{let w=i[1].trim(),S=this.parseCSSSettings(w,p);S&&typeof S=="object"&&S.name&&S.id&&S.settings&&S.settings.length&&this.settingsList.push(S)}catch(w){this.errorList.push({name:p,error:`${w}`})}}while((i=sn.exec(a))!==null)}parseCSSSettings(t,a){let i=fn(t),l=Ba.load(t.replace(/\t/g,i.type==="space"?i.indent:" "),{filename:a});if(l.settings)return l.settings=l.settings.filter(c=>c),l}registerSettingCommands(){for(let t of this.settingsList)for(let a of t.settings)a.type===he.CLASS_TOGGLE&&a.addCommand&&this.addClassToggleCommand(t,a)}addClassToggleCommand(t,a){this.commandList.push(this.addCommand({id:`style-settings-class-toggle-${t.id}-${a.id}`,name:`Toggle ${a.title}`,callback:()=>{let i=!this.settingsManager.getSetting(t.id,a.id);this.settingsManager.setSetting(t.id,a.id,i),this.settingsTab.rerender();for(let l of this.app.workspace.getLeavesOfType(at))l.view.rerender()}}))}onunload(){this.lightEl.remove(),this.darkEl.remove(),document.body.classList.remove("css-settings-manager"),this.settingsManager.cleanup(),this.deactivateView(),this.unregisterSettingsFromSettingsSearch()}deactivateView(){this.app.workspace.detachLeavesOfType(at)}async activateView(){this.deactivateView();let t=this.app.workspace.getLeaf("tab");await t.setViewState({type:at,active:!0}),t.view.setSettings(this.settingsList,this.errorList)}};
|
||||
/*! Bundled license information:
|
||||
|
||||
chroma-js/chroma.js:
|
||||
(**
|
||||
* chroma.js - JavaScript library for color conversions
|
||||
*
|
||||
* Copyright (c) 2011-2019, Gregor Aisch
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name Gregor Aisch may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL GREGOR AISCH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* -------------------------------------------------------
|
||||
*
|
||||
* chroma.js includes colors from colorbrewer2.org, which are released under
|
||||
* the following license:
|
||||
*
|
||||
* Copyright (c) 2002 Cynthia Brewer, Mark Harrower,
|
||||
* and The Pennsylvania State University.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
* either express or implied. See the License for the specific
|
||||
* language governing permissions and limitations under the License.
|
||||
*
|
||||
* ------------------------------------------------------
|
||||
*
|
||||
* Named colors are taken from X11 Color Names.
|
||||
* http://www.w3.org/TR/css3-color/#svg-color
|
||||
*
|
||||
* @preserve
|
||||
*)
|
||||
|
||||
@simonwep/pickr/dist/pickr.min.js:
|
||||
(*! Pickr 1.8.4 MIT | https://github.com/Simonwep/pickr *)
|
||||
|
||||
js-yaml/dist/js-yaml.mjs:
|
||||
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
|
||||
*/
|
||||
|
||||
/* nosourcemap */
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "obsidian-style-settings",
|
||||
"name": "Style Settings",
|
||||
"version": "1.0.9",
|
||||
"minAppVersion": "0.11.5",
|
||||
"description": "Offers controls for adjusting theme, plugin, and snippet CSS variables.",
|
||||
"author": "mgmeyers",
|
||||
"authorUrl": "https://github.com/mgmeyers/obsidian-style-settings",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
.style-settings-heading {
|
||||
cursor: pointer;
|
||||
margin-bottom: 18px;
|
||||
padding-bottom: 6px;
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.style-settings-heading[data-level="0"] {
|
||||
margin-bottom: 26px;
|
||||
}
|
||||
|
||||
.style-settings-container {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
|
||||
.style-settings-heading[data-level="0"] + .style-settings-container {
|
||||
padding-left: 34px;
|
||||
}
|
||||
|
||||
.style-settings-heading.is-collapsed {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.style-settings-heading.is-collapsed + .style-settings-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.style-settings-collapse-indicator {
|
||||
color: var(--text-faint);
|
||||
display: inline-block;
|
||||
margin-right: 8px;
|
||||
position: relative;
|
||||
top: -1px;
|
||||
}
|
||||
|
||||
.style-settings-heading[data-level="0"]
|
||||
+ .style-settings-container
|
||||
.style-settings-collapse-indicator {
|
||||
margin-left: -17px;
|
||||
}
|
||||
|
||||
.style-settings-collapse-indicator > svg {
|
||||
height: 9px;
|
||||
width: 9px;
|
||||
}
|
||||
|
||||
.style-settings-heading.is-collapsed .style-settings-collapse-indicator > svg {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.style-settings-filter-result-count {
|
||||
color: var(--text-faint);
|
||||
line-height: var(--line-height-tight);
|
||||
margin-inline: var(--size-4-2);
|
||||
}
|
||||
|
||||
.style-settings-error {
|
||||
font-size: 14px;
|
||||
border-radius: 6px;
|
||||
background: rgba(var(--background-modifier-error-rgb), 0.2);
|
||||
color: var(--text-error);
|
||||
padding: 10px;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.style-settings-error-name {
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.style-settings-error-desc {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.style-settings-empty {
|
||||
font-size: 14px;
|
||||
background: var(--background-secondary);
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.style-settings-empty-name {
|
||||
font-weight: bold;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.style-settings-import-input {
|
||||
width: 0.1px;
|
||||
height: 0.1px;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.style-settings-import-label {
|
||||
cursor: pointer;
|
||||
color: var(--text-accent);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.style-settings-import-label:hover {
|
||||
color: var(--text-accent-hover);
|
||||
}
|
||||
|
||||
.style-settings-export,
|
||||
.style-settings-import {
|
||||
display: inline-block;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.style-settings-copy,
|
||||
.style-settings-download {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.style-settings-copy:before {
|
||||
color: var(--interactive-success);
|
||||
content: "✓";
|
||||
position: absolute;
|
||||
left: -18px;
|
||||
font-weight: bold;
|
||||
opacity: 0;
|
||||
transition: 150ms opacity ease-in-out;
|
||||
}
|
||||
|
||||
.style-settings-copy.success:before {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.modal-style-settings {
|
||||
height: 70vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.modal-style-settings .modal-content {
|
||||
flex-grow: 1;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.modal-style-settings textarea {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-family: var(--font-monospace) !important;
|
||||
font-size: 12px;
|
||||
white-space: pre;
|
||||
overflow-wrap: normal;
|
||||
overflow-x: scroll;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.modal-style-settings .setting-item {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.modal-style-settings button {
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
|
||||
.style-settings-import-error {
|
||||
display: none;
|
||||
color: var(--text-error);
|
||||
}
|
||||
|
||||
.style-settings-import-error.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.view-content .style-settings-container .setting-item:not(.setting-item-heading) {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.view-content .style-settings-container .setting-item:not(.setting-item-heading) .setting-item-control {
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
|
||||
.view-content .style-settings-container .setting-item:not(.setting-item-heading) .themed-color-wrapper {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.style-settings-ref {
|
||||
position: absolute;
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.style-settings-info-text .style-settings-markdown :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.style-settings-info-text .style-settings-markdown :last-child {
|
||||
margin-bottom: 0;
|
||||
}.style-settings-container .pcr-app {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.style-settings-container .pcr-app.visible {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.pcr-app .pcr-swatches > button {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.pickr .pcr-button {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.themed-color-wrapper > div {
|
||||
background: var(--background-primary);
|
||||
padding: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.themed-color-wrapper > div + div {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.themed-color-wrapper button {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.themed-color-wrapper .pickr-reset > button {
|
||||
margin: 0 0 0 10px;
|
||||
padding: 9px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.themed-color-wrapper .pickr-reset > button > svg {
|
||||
display: block;
|
||||
}
|
||||
/*! Pickr 1.8.4 MIT | https://github.com/Simonwep/pickr */
|
||||
.pickr{position:relative;overflow:visible;transform:translateY(0)}.pickr *{box-sizing:border-box;outline:none;border:none;-webkit-appearance:none}.pickr .pcr-button{position:relative;height:2em;width:2em;padding:0.5em;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Helvetica Neue",Arial,sans-serif;border-radius:.15em;background:url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" stroke="%2342445A" stroke-width="5px" stroke-linecap="round"><path d="M45,45L5,5"></path><path d="M45,5L5,45"></path></svg>') no-repeat center;background-size:0;transition:all 0.3s}.pickr .pcr-button::before{position:absolute;content:'';top:0;left:0;width:100%;height:100%;background:url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><path fill="white" d="M1,0H2V1H1V0ZM0,1H1V2H0V1Z"/><path fill="gray" d="M0,0H1V1H0V0ZM1,1H2V2H1V1Z"/></svg>');background-size:.5em;border-radius:.15em;z-index:-1}.pickr .pcr-button::before{z-index:initial}.pickr .pcr-button::after{position:absolute;content:'';top:0;left:0;height:100%;width:100%;transition:background 0.3s;background:var(--pcr-color);border-radius:.15em}.pickr .pcr-button.clear{background-size:70%}.pickr .pcr-button.clear::before{opacity:0}.pickr .pcr-button.clear:focus{box-shadow:0 0 0 1px rgba(255,255,255,0.85),0 0 0 3px var(--pcr-color)}.pickr .pcr-button.disabled{cursor:not-allowed}.pickr *,.pcr-app *{box-sizing:border-box;outline:none;border:none;-webkit-appearance:none}.pickr input:focus,.pickr input.pcr-active,.pickr button:focus,.pickr button.pcr-active,.pcr-app input:focus,.pcr-app input.pcr-active,.pcr-app button:focus,.pcr-app button.pcr-active{box-shadow:0 0 0 1px rgba(255,255,255,0.85),0 0 0 3px var(--pcr-color)}.pickr .pcr-palette,.pickr .pcr-slider,.pcr-app .pcr-palette,.pcr-app .pcr-slider{transition:box-shadow 0.3s}.pickr .pcr-palette:focus,.pickr .pcr-slider:focus,.pcr-app .pcr-palette:focus,.pcr-app .pcr-slider:focus{box-shadow:0 0 0 1px rgba(255,255,255,0.85),0 0 0 3px rgba(0,0,0,0.25)}.pcr-app{position:fixed;display:flex;flex-direction:column;z-index:10000;border-radius:0.1em;background:#fff;opacity:0;visibility:hidden;transition:opacity 0.3s, visibility 0s 0.3s;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Helvetica Neue",Arial,sans-serif;box-shadow:0 0.15em 1.5em 0 rgba(0,0,0,0.1),0 0 1em 0 rgba(0,0,0,0.03);left:0;top:0}.pcr-app.visible{transition:opacity 0.3s;visibility:visible;opacity:1}.pcr-app .pcr-swatches{display:flex;flex-wrap:wrap;margin-top:0.75em}.pcr-app .pcr-swatches.pcr-last{margin:0}@supports (display: grid){.pcr-app .pcr-swatches{display:grid;align-items:center;grid-template-columns:repeat(auto-fit, 1.75em)}}.pcr-app .pcr-swatches>button{font-size:1em;position:relative;width:calc(1.75em - 5px);height:calc(1.75em - 5px);border-radius:0.15em;cursor:pointer;margin:2.5px;flex-shrink:0;justify-self:center;transition:all 0.15s;overflow:hidden;background:transparent;z-index:1}.pcr-app .pcr-swatches>button::before{position:absolute;content:'';top:0;left:0;width:100%;height:100%;background:url('data:image/svg+xml;utf8, <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2"><path fill="white" d="M1,0H2V1H1V0ZM0,1H1V2H0V1Z"/><path fill="gray" d="M0,0H1V1H0V0ZM1,1H2V2H1V1Z"/></svg>');background-size:6px;border-radius:.15em;z-index:-1}.pcr-app .pcr-swatches>button::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;background:var(--pcr-color);border:1px solid rgba(0,0,0,0.05);border-radius:0.15em;box-sizing:border-box}.pcr-app .pcr-swatches>button:hover{filter:brightness(1.05)}.pcr-app .pcr-swatches>button:not(.pcr-active){box-shadow:none}.pcr-app .pcr-interaction{display:flex;flex-wrap:wrap;align-items:center;margin:0 -0.2em 0 -0.2em}.pcr-app .pcr-interaction>*{margin:0 0.2em}.pcr-app .pcr-interaction input{letter-spacing:0.07em;font-size:0.75em;text-align:center;cursor:pointer;color:#75797e;background:#f1f3f4;border-radius:.15em;transition:all 0.15s;padding:0.45em 0.5em;margin-top:0.75em}.pcr-app .pcr-interaction input:hover{filter:brightness(0.975)}.pcr-app .pcr-interaction input:focus{box-shadow:0 0 0 1px rgba(255,255,255,0.85),0 0 0 3px rgba(66,133,244,0.75)}.pcr-app .pcr-interaction .pcr-result{color:#75797e;text-align:left;flex:1 1 8em;min-width:8em;transition:all 0.2s;border-radius:.15em;background:#f1f3f4;cursor:text}.pcr-app .pcr-interaction .pcr-result::-moz-selection{background:#4285f4;color:#fff}.pcr-app .pcr-interaction .pcr-result::selection{background:#4285f4;color:#fff}.pcr-app .pcr-interaction .pcr-type.active{color:#fff;background:#4285f4}.pcr-app .pcr-interaction .pcr-save,.pcr-app .pcr-interaction .pcr-cancel,.pcr-app .pcr-interaction .pcr-clear{color:#fff;width:auto}.pcr-app .pcr-interaction .pcr-save,.pcr-app .pcr-interaction .pcr-cancel,.pcr-app .pcr-interaction .pcr-clear{color:#fff}.pcr-app .pcr-interaction .pcr-save:hover,.pcr-app .pcr-interaction .pcr-cancel:hover,.pcr-app .pcr-interactioLine truncated
|
||||
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"manifest": {
|
||||
"version": "3.1.0"
|
||||
},
|
||||
"MergeParagraph_Newlines": true,
|
||||
"MergeParagraph_Spaces": true,
|
||||
"LowercaseFirst": true,
|
||||
"RemoveBlanksWhenChinese": false,
|
||||
"ZoteroNoteRegExp": "“(?<text>.*)” \\((?<item>.*?)\\) \\(\\[pdf\\]\\((?<pdf_url>.*?)\\)\\)",
|
||||
"ZoteroNoteTemplate": "{text} [🔖]({pdf_url})",
|
||||
"BulletPoints": "•–§",
|
||||
"WrapperList": [
|
||||
{
|
||||
"name": "underline",
|
||||
"prefix": "<u>",
|
||||
"suffix": "</u>",
|
||||
"id": "underline"
|
||||
}
|
||||
],
|
||||
"RequestList": [],
|
||||
"customReplaceList": [
|
||||
{
|
||||
"id": "remove-trailing-spaces",
|
||||
"name": "Remove trailing spaces",
|
||||
"data": [
|
||||
{
|
||||
"search": "(\\s*)(?=\\n)|(\\s*)$",
|
||||
"replace": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "remove-blank-line",
|
||||
"name": "Remove blank line(s)",
|
||||
"data": [
|
||||
{
|
||||
"search": "\\n\\s*\\n",
|
||||
"replace": "\\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "add-line-break",
|
||||
"name": "Add extra line break between paragraphs",
|
||||
"data": [
|
||||
{
|
||||
"search": "\\n",
|
||||
"replace": "\\n\\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "split-lines-by-blank",
|
||||
"name": "Split line(s) by blanks",
|
||||
"data": [
|
||||
{
|
||||
"search": " ",
|
||||
"replace": "\\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"customReplaceBuiltInLog": {
|
||||
"remove-trailing-spaces": {
|
||||
"id": "remove-trailing-spaces",
|
||||
"modified": false,
|
||||
"data": [
|
||||
{
|
||||
"search": "(\\s*)(?=\\n)|(\\s*)$",
|
||||
"replace": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"remove-blank-line": {
|
||||
"id": "remove-blank-line",
|
||||
"modified": false,
|
||||
"data": [
|
||||
{
|
||||
"search": "\\n\\s*\\n",
|
||||
"replace": "\\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
"add-line-break": {
|
||||
"id": "add-line-break",
|
||||
"modified": false,
|
||||
"data": [
|
||||
{
|
||||
"search": "\\n",
|
||||
"replace": "\\n\\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
"split-lines-by-blank": {
|
||||
"id": "split-lines-by-blank",
|
||||
"modified": false,
|
||||
"data": [
|
||||
{
|
||||
"search": " ",
|
||||
"replace": "\\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"ToggleSequence": "titleCase\nlowerCase\nupperCase",
|
||||
"RemoveWikiURL2": false,
|
||||
"WikiLinkFormat": {
|
||||
"headingOnly": "{title} (> {heading})",
|
||||
"aliasOnly": "{alias} ({title})",
|
||||
"both": "{alias} ({title} > {heading})"
|
||||
},
|
||||
"UrlLinkFormat": "{text}",
|
||||
"ProperNoun": "",
|
||||
"OrderedListOtherSeparator": "",
|
||||
"Wikilink2mdRelativePath": "relative-obsidian",
|
||||
"calloutType": "NOTE",
|
||||
"debugMode": false,
|
||||
"headingLevelMin": 0,
|
||||
"calloutTypeDecider": "previous-content",
|
||||
"formatOnSaveSettings": {
|
||||
"enabled": false,
|
||||
"commandsString": ""
|
||||
}
|
||||
}
|
||||
+10895
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "obsidian-text-format",
|
||||
"name": "Text Format",
|
||||
"version": "3.1.0",
|
||||
"minAppVersion": "0.9.7",
|
||||
"description": "Format text such as lowercase/uppercase/capitalize/titlecase, converting order/bullet list, removing redundant spaces/newline characters.",
|
||||
"author": "Benature",
|
||||
"authorUrl": "https://github.com/Benature",
|
||||
"fundingUrl": {
|
||||
"Buy Me a Coffee": "https://www.buymeacoffee.com/benature",
|
||||
"爱发电": "https://afdian.net/a/Benature-K",
|
||||
"微信/支付宝": "https://s2.loli.net/2024/01/30/jQ9fTSyBxvXRoOM.png"
|
||||
},
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
.plugin-text-format H3,
|
||||
.plugin-text-format H4 {
|
||||
margin-bottom: 0px;
|
||||
padding-bottom: 0px;
|
||||
}
|
||||
.plugin-text-format H4{
|
||||
opacity: 0.7;
|
||||
}
|
||||
.plugin-text-format .heading-description {
|
||||
padding-top: 0px;
|
||||
color: var(--text-faint);
|
||||
}
|
||||
|
||||
.plugin-text-format .header-div:has(H3) + .tf-collapsible-content {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.plugin-text-format .header-div:has(H4) + .tf-collapsible-content {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.plugin-text-format .setting-item > .setting-item-control > input {
|
||||
min-width: 145px;
|
||||
}
|
||||
|
||||
.plugin-text-format .setting-item.custom-replace input,
|
||||
.plugin-text-format .setting-item.wrapper input {
|
||||
width: 33%;
|
||||
}
|
||||
.plugin-text-format .setting-item.api-request input:first-child {
|
||||
width: 30%;
|
||||
}
|
||||
.plugin-text-format .setting-item.api-request input {
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.tf-collapsible-content.is-active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.tf-collapsible-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.plugin-text-format .header-div:hover {
|
||||
background-color: var(--interactive-hover, #363636);
|
||||
border-radius: var(--button-radius, 5px);
|
||||
}
|
||||
|
||||
.tf-collapsible-header {
|
||||
padding-bottom: 8px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.tf-collapsible-icon {
|
||||
position: relative;
|
||||
top: 4px;
|
||||
left: 16px;
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"settingsSchemaVersion": 2,
|
||||
"gitRemoteUrl": "https://gitea.exocomet-frog.ts.net",
|
||||
"gitBranch": "v5",
|
||||
"gitCorsProxyUrl": "",
|
||||
"gitAuthType": "basic",
|
||||
"gitAuthUsername": "andus",
|
||||
"gitProviderHint": "gitea",
|
||||
"vaultPath": "/",
|
||||
"contentFolder": "content",
|
||||
"publishFrontmatterKey": "publish",
|
||||
"allNotesPublishableByDefault": false,
|
||||
"showCreatedTimestamp": true,
|
||||
"showUpdatedTimestamp": true,
|
||||
"showPublishedTimestamp": false,
|
||||
"usePermalink": false,
|
||||
"includeAllFrontmatter": false,
|
||||
"frontmatterFormat": "yaml",
|
||||
"createdTimestampKey": "created, created_at, date",
|
||||
"updatedTimestampKey": "modified, lastmod, updated, last-modified",
|
||||
"publishedTimestampKey": "published, publishDate, date",
|
||||
"timestampFormat": "MMM dd, yyyy h:mm a",
|
||||
"useCache": true,
|
||||
"syncCache": true,
|
||||
"persistCache": false,
|
||||
"cacheTimestamp": 1787529500997,
|
||||
"cache": "{}",
|
||||
"useAutoCardLink": false,
|
||||
"useDataview": true,
|
||||
"useDatacore": false,
|
||||
"useExcalidraw": false,
|
||||
"useFantasyStatblocks": false,
|
||||
"useBases": false,
|
||||
"useCanvas": false,
|
||||
"manageSyncerStyles": true,
|
||||
"lastUsedSettingsTab": "git",
|
||||
"noteSettingsIsInitialized": true,
|
||||
"pluginVersion": "1.18.0",
|
||||
"lastUpstreamCommitSha": "",
|
||||
"upgradeCheckStrategy": "version",
|
||||
"diffViewStyle": "auto",
|
||||
"ENABLE_DEVELOPER_TOOLS": false
|
||||
}
|
||||
+1315
File diff suppressed because it is too large.
Load diff
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"id": "quartz-syncer",
|
||||
"name": "Quartz Syncer",
|
||||
"version": "1.18.0",
|
||||
"minAppVersion": "1.13.0",
|
||||
"description": "Manage and publish your notes to Quartz, the fast, batteries-included static-site generator.",
|
||||
"author": "Emile Bangma",
|
||||
"authorUrl": "https://github.com/saberzero1",
|
||||
"fundingUrl": {
|
||||
"Buy Me a Coffee": "https://buymeacoffee.com/saberzero1",
|
||||
"GitHub Sponsor": "https://github.com/sponsors/saberzero1",
|
||||
"Ko-Fi": "https://ko-fi.com/saberzero1"
|
||||
},
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+642
@@ -0,0 +1,642 @@
|
||||
/* Quartz Syncer Publication Center */
|
||||
.quartz-syncer-publisher-title-separator {
|
||||
margin-top: 0;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.quartz-syncer-publisher-footer-separator {
|
||||
margin-top: 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.quartz-syncer-publisher-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.quartz-syncer-publisher-loading-msg {
|
||||
font-size: var(--font-ui-larger);
|
||||
display: flex;
|
||||
flex-grow: 0; /* Prevnets the loading message from stretching the container */
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.quartz-syncer-progress-bar-text {
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
button.quartz-syncer-publisher-button {
|
||||
background-color: var(--interactive-accent);
|
||||
color: var(--text-on-accent);
|
||||
cursor: var(--cursor);
|
||||
font-weight: var(--font-bold);
|
||||
}
|
||||
|
||||
.quartz-syncer-publisher-loading-container {
|
||||
width: 100%;
|
||||
height: 5px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.quartz-syncer-publisher-loading-bar {
|
||||
background-color: var(--interactive-accent);
|
||||
height: 100%;
|
||||
transition: all 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
.quartz-syncer-publisher-published {
|
||||
color: var(--text-success, var(--color-green));
|
||||
}
|
||||
|
||||
.quartz-syncer-publisher-deleted {
|
||||
color: var(--text-error, var(--color-red));
|
||||
}
|
||||
|
||||
/* Quartz Syncer Diff View */
|
||||
.quartz-syncer-diff-modal {
|
||||
max-width: var(--modal-max-width, 100%);
|
||||
width: var(--modal-width, 100%);
|
||||
}
|
||||
|
||||
body.is-mobile .quartz-syncer-diff-modal {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body.is-mobile .quartz-syncer-diff-view-container {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
pre.quartz-syncer-diff-view {
|
||||
display: block;
|
||||
white-space: pre;
|
||||
overflow-wrap: break-word;
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
pre.quartz-syncer-diff-view.quartz-syncer-diff-added {
|
||||
background-color: rgb(
|
||||
var(--background-modifier-success-rgb, var(--color-green-rgb)),
|
||||
0.5
|
||||
);
|
||||
color: var(--text-on-accent);
|
||||
}
|
||||
|
||||
pre.quartz-syncer-diff-view.quartz-syncer-diff-removed {
|
||||
background-color: rgb(
|
||||
var(--background-modifier-error-rgb, var(--color-red-rgb)),
|
||||
0.5
|
||||
);
|
||||
color: var(--text-on-accent);
|
||||
}
|
||||
|
||||
.quartz-syncer-diff-line {
|
||||
white-space: pre;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.quartz-syncer-diff-line-added {
|
||||
background-color: var(--text-success, var(--color-green));
|
||||
color: var(--text-on-accent);
|
||||
text-decoration: overline;
|
||||
}
|
||||
|
||||
.quartz-syncer-diff-line-removed {
|
||||
background-color: var(--text-error, var(--color-red));
|
||||
color: var(--text-on-accent);
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
/* Quartz Syncer Tree Selectors */
|
||||
.quartz-syncer-modal-content ul {
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
padding-left: 1.2rem;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.quartz-syncer-modal-content li {
|
||||
margin: 0.2rem 0;
|
||||
}
|
||||
|
||||
.quartz-syncer-modal-content .no-arrow {
|
||||
padding-left: calc(var(--icon-size) + 2px);
|
||||
}
|
||||
|
||||
.quartz-syncer-modal-content .arrow {
|
||||
cursor: var(--cursor);
|
||||
display: inline-block;
|
||||
transition: transform 200ms;
|
||||
}
|
||||
|
||||
/* arrowDown svelte variable */
|
||||
.quartz-syncer-modal-content .arrowDown {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
/* isRoot svelte variable */
|
||||
.quartz-syncer-modal-content ul.isRoot {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.quartz-syncer-modal-content .root-header {
|
||||
font-weight: var(--font-bold);
|
||||
font-size: var(--font-ui-larger);
|
||||
}
|
||||
|
||||
input:indeterminate {
|
||||
background-color: var(--checkbox-color);
|
||||
border-color: var(--checkbox-color);
|
||||
}
|
||||
|
||||
input[type="checkbox"]:indeterminate::after {
|
||||
content: "";
|
||||
top: -1px;
|
||||
left: -1px;
|
||||
position: absolute;
|
||||
width: var(--checkbox-size);
|
||||
height: var(--checkbox-size);
|
||||
display: block;
|
||||
background-color: var(--checkbox-marker-color);
|
||||
mask-position: 52% 52%;
|
||||
mask-size: 65%;
|
||||
mask-repeat: no-repeat;
|
||||
mask-image: url('data:image/svg+xml; utf8,<svg fill="none" width="12px" height="12px" viewBox="0 0 32 32" id="icon" xmlns="http://www.w3.org/2000/svg"><rect fill="%23000000" x="4" y="4" width="24" height="24"/></svg>');
|
||||
}
|
||||
|
||||
.quartz-syncer-icon-diff {
|
||||
cursor: var(--cursor);
|
||||
display: inline-block;
|
||||
margin-left: 4px;
|
||||
}
|
||||
|
||||
/* File type badges */
|
||||
.quartz-syncer-file-badge {
|
||||
font-size: 9px;
|
||||
font-weight: var(--font-bold);
|
||||
padding: 1px 4px;
|
||||
border-radius: var(--radius-s);
|
||||
margin-left: 6px;
|
||||
text-transform: uppercase;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.quartz-syncer-badge-base {
|
||||
background-color: rgb(var(--color-purple-rgb, 147, 51, 234), 0.2);
|
||||
color: var(--text-accent, var(--color-purple, #9333ea));
|
||||
border: 1px solid rgb(var(--color-purple-rgb, 147, 51, 234), 0.3);
|
||||
}
|
||||
|
||||
.quartz-syncer-badge-canvas {
|
||||
background-color: rgb(var(--color-cyan-rgb, 6, 182, 212), 0.2);
|
||||
color: var(--text-accent, var(--color-cyan, #06b6d4));
|
||||
border: 1px solid rgb(var(--color-cyan-rgb, 6, 182, 212), 0.3);
|
||||
}
|
||||
|
||||
/* Quartz Syncer Settings */
|
||||
|
||||
/* Quartz V5 Settings - Collapsible Sections */
|
||||
.quartz-syncer-v5-section-heading {
|
||||
cursor: var(--cursor);
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.quartz-syncer-v5-section-heading:hover {
|
||||
background-color: var(--background-modifier-hover);
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
.quartz-syncer-v5-section-chevron {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-right: 4px;
|
||||
transition: transform 200ms ease;
|
||||
}
|
||||
|
||||
.quartz-syncer-v5-section-chevron-open {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.quartz-syncer-v5-section-content {
|
||||
/* Optional subtle left border to show section grouping */
|
||||
border-left: 2px solid var(--background-modifier-border);
|
||||
margin-left: 8px;
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
.quartz-syncer-publish-status-view button:disabled {
|
||||
pointer-events: none;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.quartz-syncer-publish-status-view ul {
|
||||
list-style-type: none;
|
||||
position: relative;
|
||||
margin-left: 5px;
|
||||
margin-top: 0;
|
||||
max-height: 250px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.quartz-syncer-publish-status-view h2 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.quartz-syncer-publish-status-view .collapsable {
|
||||
cursor: var(--cursor);
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.quartz-syncer-svg-icon {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
/* GitHub connection status */
|
||||
.quartz-syncer-connection-status {
|
||||
font-weight: var(--font-bold);
|
||||
}
|
||||
|
||||
.quartz-syncer-connection-status-failed {
|
||||
color: var(--text-error, var(--color-red));
|
||||
}
|
||||
|
||||
.quartz-syncer-connection-status-success {
|
||||
color: var(--text-success, var(--color-green));
|
||||
}
|
||||
|
||||
.quartz-syncer-connection-status-pending {
|
||||
color: var(--text-warning, var(--color-orange));
|
||||
}
|
||||
|
||||
/* Cog animation */
|
||||
@keyframes quartz-syncer-rotate-animation {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.quartz-syncer-rotate {
|
||||
animation: quartz-syncer-rotate-animation 4s linear infinite;
|
||||
}
|
||||
|
||||
.quartz-syncer-cog {
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.quartz-syncer-cog-big {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
/* Progress bar */
|
||||
.quartz-syncer-progress-bar-container {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* Publication center */
|
||||
|
||||
.quartz-syncer-modal-content:first-child {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Token/Secret Storage UI */
|
||||
.quartz-syncer-token-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.quartz-syncer-token-status {
|
||||
font-size: var(--font-ui-smaller);
|
||||
padding: 4px 8px;
|
||||
border-radius: var(--radius-s);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.quartz-syncer-token-status::before {
|
||||
content: "";
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.quartz-syncer-token-status-set {
|
||||
background-color: rgb(var(--color-green-rgb), 0.15);
|
||||
color: var(--text-success, var(--color-green));
|
||||
}
|
||||
|
||||
.quartz-syncer-token-status-set::before {
|
||||
background-color: var(--text-success, var(--color-green));
|
||||
}
|
||||
|
||||
.quartz-syncer-token-status-unset {
|
||||
background-color: rgb(var(--color-orange-rgb), 0.15);
|
||||
color: var(--text-warning, var(--color-orange));
|
||||
}
|
||||
|
||||
.quartz-syncer-token-status-unset::before {
|
||||
background-color: var(--text-warning, var(--color-orange));
|
||||
}
|
||||
|
||||
.quartz-syncer-token-input-container {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.quartz-syncer-token-input {
|
||||
flex: 1;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
border-radius: var(--radius-s);
|
||||
background-color: var(--background-primary);
|
||||
color: var(--text-normal);
|
||||
font-family: var(--font-monospace);
|
||||
}
|
||||
|
||||
.quartz-syncer-token-input:focus {
|
||||
border-color: var(--interactive-accent);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.quartz-syncer-token-toggle {
|
||||
padding: 6px;
|
||||
border: none;
|
||||
background: transparent;
|
||||
cursor: var(--cursor);
|
||||
color: var(--text-muted);
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
.quartz-syncer-token-toggle:hover {
|
||||
color: var(--text-normal);
|
||||
background-color: var(--background-modifier-hover);
|
||||
}
|
||||
|
||||
.quartz-syncer-token-buttons {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.quartz-syncer-token-buttons button {
|
||||
padding: 6px 12px;
|
||||
border-radius: var(--radius-s);
|
||||
cursor: var(--cursor);
|
||||
font-size: var(--font-ui-small);
|
||||
}
|
||||
|
||||
/* Plugin Browser Modal */
|
||||
.quartz-syncer-plugin-browser {
|
||||
width: 700px;
|
||||
max-width: 90vw;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser .modal-content {
|
||||
max-height: 70vh;
|
||||
overflow-y: auto;
|
||||
padding: 0 16px 16px;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-loading {
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
padding: 24px 0;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-controls {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
margin-bottom: 12px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: var(--modal-background);
|
||||
padding: 8px 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-search {
|
||||
flex: 1;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
border-radius: var(--radius-s);
|
||||
background: var(--background-primary);
|
||||
color: var(--text-normal);
|
||||
font-size: var(--font-ui-small);
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-tag-filter {
|
||||
padding: 6px 10px;
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
border-radius: var(--radius-s);
|
||||
background: var(--background-primary);
|
||||
color: var(--text-normal);
|
||||
font-size: var(--font-ui-small);
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-empty {
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
padding: 16px 0;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-card {
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
border-radius: var(--radius-m);
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-card-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-card-name {
|
||||
font-weight: var(--font-bold);
|
||||
font-size: var(--font-ui-medium);
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-badge-official {
|
||||
font-size: var(--font-ui-smaller);
|
||||
color: var(--text-on-accent);
|
||||
background: var(--interactive-accent);
|
||||
padding: 1px 6px;
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-card-desc {
|
||||
color: var(--text-muted);
|
||||
font-size: var(--font-ui-small);
|
||||
margin: 0 0 8px;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-card-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-card-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-tag {
|
||||
font-size: var(--font-ui-smaller);
|
||||
color: var(--text-muted);
|
||||
background: var(--background-secondary);
|
||||
padding: 1px 6px;
|
||||
border-radius: var(--radius-s);
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-installed {
|
||||
font-size: var(--font-ui-small);
|
||||
color: var(--text-success);
|
||||
font-weight: var(--font-bold);
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-install-btn {
|
||||
padding: 4px 12px;
|
||||
border-radius: var(--radius-s);
|
||||
background: var(--interactive-accent);
|
||||
color: var(--text-on-accent);
|
||||
cursor: var(--cursor);
|
||||
font-size: var(--font-ui-small);
|
||||
font-weight: var(--font-bold);
|
||||
border: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-browser-install-btn:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Quartz V5 Settings - Search */
|
||||
.quartz-syncer-v5-search-bar {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 1;
|
||||
background: var(--background-primary);
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.quartz-syncer-v5-search-results {
|
||||
font-size: var(--font-ui-smaller);
|
||||
color: var(--text-muted);
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.quartz-syncer-v5-no-results {
|
||||
text-align: center;
|
||||
color: var(--text-muted);
|
||||
padding: 24px 0;
|
||||
font-size: var(--font-ui-medium);
|
||||
}
|
||||
|
||||
/* Quartz V5 Settings - Sticky Action Bar */
|
||||
.quartz-syncer-v5-action-bar {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
z-index: 1;
|
||||
background: var(--background-primary);
|
||||
padding: 8px 0;
|
||||
border-top: 1px solid var(--background-modifier-border);
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.quartz-syncer-v5-action-bar .setting-item {
|
||||
border-top: none;
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
/* Git Settings - Status Pills */
|
||||
.quartz-syncer-git-status-container {
|
||||
display: inline-flex;
|
||||
gap: 6px;
|
||||
margin-left: 8px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.quartz-syncer-git-status-pill {
|
||||
font-size: var(--font-ui-smaller);
|
||||
padding: 2px 8px;
|
||||
border-radius: var(--radius-s);
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
font-weight: var(--font-bold);
|
||||
}
|
||||
|
||||
.quartz-syncer-git-status-pill::before {
|
||||
content: "";
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.quartz-syncer-git-status-success {
|
||||
background-color: rgb(var(--color-green-rgb), 0.15);
|
||||
color: var(--text-success, var(--color-green));
|
||||
}
|
||||
|
||||
.quartz-syncer-git-status-success::before {
|
||||
background-color: var(--text-success, var(--color-green));
|
||||
}
|
||||
|
||||
.quartz-syncer-git-status-failed {
|
||||
background-color: rgb(var(--color-red-rgb), 0.15);
|
||||
color: var(--text-error, var(--color-red));
|
||||
}
|
||||
|
||||
.quartz-syncer-git-status-failed::before {
|
||||
background-color: var(--text-error, var(--color-red));
|
||||
}
|
||||
|
||||
.quartz-syncer-git-status-pending {
|
||||
background-color: rgb(var(--color-orange-rgb), 0.15);
|
||||
color: var(--text-warning, var(--color-orange));
|
||||
}
|
||||
|
||||
.quartz-syncer-git-status-pending::before {
|
||||
background-color: var(--text-warning, var(--color-orange));
|
||||
}
|
||||
|
||||
/* Plugin Options Modal */
|
||||
.quartz-syncer-plugin-options-modal {
|
||||
width: 600px;
|
||||
max-width: 90vw;
|
||||
}
|
||||
|
||||
.quartz-syncer-plugin-options-modal .modal-content {
|
||||
max-height: 70vh;
|
||||
overflow-y: auto;
|
||||
padding: 0 16px 16px;
|
||||
}
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"folder": "templates"
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "Cybertron",
|
||||
"version": "2.2",
|
||||
"minAppVersion": "1.0.0",
|
||||
"author": "nickmilo",
|
||||
"authorUri": "https://github.com/nickmilo/Cybertron/"
|
||||
}
|
||||
Vendored
+1255
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "Dracula + LYT",
|
||||
"version": "0.0.0",
|
||||
"minAppVersion": "0.16.0",
|
||||
"author": "xRyul"
|
||||
}
|
||||
+6611
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "Dracula for Obsidian",
|
||||
"version": "0.0.0",
|
||||
"minAppVersion": "0.16.0",
|
||||
"author": "jarodise"
|
||||
}
|
||||
+719
@@ -0,0 +1,719 @@
|
||||
:root
|
||||
{
|
||||
--font-size-normal: 19px;
|
||||
--font-size-code: 16px;
|
||||
--font-size-side-dock: 16px;
|
||||
--font-size-side-dock-title: 18px;
|
||||
--font-size-status-bar: 16px;
|
||||
--font-size-h1: 24px;
|
||||
--font-size-h2: 23px;
|
||||
--font-size-h3: 22px;
|
||||
--font-size-h4: 21px;
|
||||
--font-size-h5: 20px;
|
||||
--font-size-h6: 19px;
|
||||
--font-family-editor: Avenir, Avenir Next, sans-serif;
|
||||
--font-family-preview: Avenir, Avenir Next, sans-serif;
|
||||
}
|
||||
|
||||
.theme-light,
|
||||
.theme-dark {
|
||||
--background-primary: #282a36;
|
||||
--background-primary-alt: #44475a;
|
||||
--background-secondary: #44475a;
|
||||
--background-secondary-alt: #282a36;
|
||||
--background-accent: #f8f8f2;
|
||||
--background-modifier-border: #f8f8f2;
|
||||
--background-modifier-form-field: rgba(0, 0, 0, 0.2);
|
||||
--background-modifier-form-field-highlighted: rgba(0, 0, 0, 0.5);
|
||||
--background-modifier-box-shadow: rgba(0, 0, 0, 0.3);
|
||||
--background-modifier-success: #50fa7b; /*no sure*/
|
||||
--background-modifier-error: #3d0000; /*no sure*/
|
||||
--background-modifier-error-rgb: 61, 0, 0;
|
||||
--background-modifier-error-hover: #470000;
|
||||
--background-modifier-cover: rgba(0, 0, 0, 0.6);
|
||||
--text-accent: #ffb86c;
|
||||
--text-accent-hover: #8be9fd;
|
||||
--text-normal: #f8f8f2;
|
||||
--text-muted: #f8f8f2;
|
||||
--text-faint: #bd93f9;
|
||||
--text-highlight-bg: #ff5555;
|
||||
--text-error: #ff79c6;
|
||||
--text-error-hover: #ff79c6;
|
||||
--text-selection: #6272a4; /* Chromium precess this color with alpha channel */
|
||||
--text-on-accent: #bd93f9;
|
||||
--interactive-normal: #ffb86c;
|
||||
--interactive-hover: #ff5555;
|
||||
--interactive-accent: #ffb86c;
|
||||
--interactive-accent-rgb: 123, 108, 217;
|
||||
--interactive-accent-hover: #ff5555;
|
||||
--scrollbar-active-thumb-bg: rgba(255, 255, 255, 0.2);
|
||||
--scrollbar-bg: rgba(255, 255, 255, 0.05);
|
||||
--scrollbar-thumb-bg: rgba(255, 255, 255, 0.1);
|
||||
|
||||
--text-title-h1: #ff79c6;
|
||||
--text-title-h2: #bd93f9;
|
||||
--text-title-h3: #ff5555;
|
||||
--text-title-h4: #ffb86c;
|
||||
--text-title-h5: #50fa7b;
|
||||
--text-title-h6: #8be9fd;
|
||||
--inline-code: #bd93f9;
|
||||
--code-block: #8be9fd;
|
||||
--pre-code: #44475a;
|
||||
--blockquote-border: #ffb86c;
|
||||
--vim-cursor: #ff5555;
|
||||
--border-color: #2b2727; /*also like transparent*/
|
||||
}
|
||||
|
||||
/*-------------------------------------*/
|
||||
/* Search the following lines */
|
||||
/* to jump to specific section */
|
||||
/*-------------------------------------*/
|
||||
/* resize-handle and borders */
|
||||
/* tags */
|
||||
/* link */
|
||||
/* Cursor */
|
||||
/* basic format in EDITOR and PREVIEW */
|
||||
/* Headings - EDITOR and PREVIEW */
|
||||
/* Code block in Preview */
|
||||
/* Code block in Editor */
|
||||
/* Brackets */
|
||||
/* Blockquote */
|
||||
/* table */
|
||||
/* Checkbox */
|
||||
/* html in editor */
|
||||
/* popover */
|
||||
/* Side panel */
|
||||
/* internal embedded link in preview */
|
||||
/* graph view */
|
||||
/* settings */
|
||||
/* Hide side bar */
|
||||
/* width of content */
|
||||
/* at a rule line before ul list *
|
||||
/* Hide Scrollbar (recommend for mac) */
|
||||
/*-------------------------------------*/
|
||||
|
||||
/***************************************/
|
||||
/* resize-handle and borders */
|
||||
/***************************************/
|
||||
|
||||
/*vertical resize-handle*/
|
||||
.workspace-split.mod-vertical > * > .workspace-leaf-resize-handle,
|
||||
.workspace-split.mod-left-split > .workspace-leaf-resize-handle,
|
||||
.workspace-split.mod-right-split > .workspace-leaf-resize-handle{
|
||||
width: 1px !important;
|
||||
background-color: var(--border-color);
|
||||
}
|
||||
|
||||
/*horizontal resize-handle*/
|
||||
.workspace-split.mod-horizontal > * > .workspace-leaf-resize-handle{
|
||||
height: 1px !important;
|
||||
background-color: var(--border-color);
|
||||
}
|
||||
|
||||
/*workspace ribbon when collapsed*/
|
||||
.workspace-ribbon.is-collapsed {
|
||||
background-color: var(--background-primary-alt);
|
||||
}
|
||||
|
||||
/*the vertical split*/
|
||||
.workspace-split.mod-root .workspace-split.mod-vertical .workspace-leaf-content,
|
||||
.workspace-split.mod-vertical > .workspace-split,
|
||||
.workspace-split.mod-vertical > .workspace-leaf,
|
||||
.workspace-tabs{
|
||||
padding-right: 0px;
|
||||
}
|
||||
|
||||
/*status-bar*/
|
||||
.status-bar{
|
||||
font-size: var(--font-size-status-bar);
|
||||
background-color: var(--background-secondary-alt);
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
.document-search-container{
|
||||
border-top: 0px;
|
||||
border-right: 0px;
|
||||
z-index: inherit;
|
||||
}
|
||||
|
||||
.workspace-ribbon.mod-left.is-collapsed{
|
||||
border-right: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.workspace-ribbon.mod-right.is-collapsed{
|
||||
border-left: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
/*************************************/
|
||||
/* tags */
|
||||
/*************************************/
|
||||
|
||||
/* Tag hover in preview */
|
||||
a.tag:hover {
|
||||
color: var(--text-accent) !important;
|
||||
}
|
||||
|
||||
/* Tag Color in editor and preview*/
|
||||
.cm-hashtag, a.tag {
|
||||
color: var(--text-accent-hover) !important;
|
||||
text-decoration: none !important;
|
||||
font-style: normal !important;
|
||||
}
|
||||
|
||||
/*********************************/
|
||||
/* link */
|
||||
/*********************************/
|
||||
|
||||
/* link */
|
||||
a,
|
||||
.internal-link,
|
||||
.cm-hmd-internal-link,
|
||||
.cm-link,
|
||||
.cm-formatting-link,
|
||||
.cm-url {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
|
||||
/* the url string in editor */
|
||||
.cm-s-obsidian span.cm-string{
|
||||
color: var(--text-accent-hover) !important;
|
||||
}
|
||||
|
||||
/* make external links italics to differentiate */
|
||||
a:not(.internal-link) {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/*footnote*/
|
||||
.cm-s-obsidian pre.HyperMD-footnote span.cm-hmd-footnote,
|
||||
.cm-s-obsidian span.cm-footref {
|
||||
color: var(--text-accent) !important;
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* Cursor */
|
||||
/***************************************/
|
||||
|
||||
/* Cursor color and opacity */
|
||||
|
||||
.cm-fat-cursor .CodeMirror-cursor, .cm-animate-fat-cursor
|
||||
{
|
||||
width: 0.5em;
|
||||
background: var(--vim-cursor);
|
||||
opacity: 60% !important;
|
||||
}
|
||||
|
||||
/**************************************/
|
||||
/* basic format in EDITOR and PREVIEW */
|
||||
/**************************************/
|
||||
|
||||
/* font for everything outside of editor/preview panes */
|
||||
.app-container {
|
||||
font-family: var(--font-family-preview);
|
||||
}
|
||||
|
||||
/* set the text selection color for preview mode */
|
||||
::selection {
|
||||
background-color: var(--text-selection);
|
||||
}
|
||||
|
||||
/* normal text outside of headings and code of editor */
|
||||
.cm-s-obsidian, .mod-single-child .cm-s-obsidian {
|
||||
font-family: var(--font-family-editor);
|
||||
font-size: var(--font-size-normal);
|
||||
}
|
||||
|
||||
/* normal text outside of headings and code of preview */
|
||||
.markdown-preview-view, .mod-single-child .markdown-preview-view {
|
||||
font-family: var(--font-family-editor);
|
||||
font-size: var(--font-size-normal);
|
||||
padding-top: 0px;
|
||||
padding-left: 2% !important;
|
||||
padding-right: 1% !important;
|
||||
}
|
||||
|
||||
/* bold in preview and editor */
|
||||
strong, .cm-strong {
|
||||
font-weight: 600;
|
||||
color: #50fa7b;
|
||||
}
|
||||
|
||||
/* emphasis in preview and editor */
|
||||
em, .cm-em {
|
||||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* strikethrough in preview and editor */
|
||||
s, .cm-strikethrough {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* list in editor */
|
||||
.cm-s-obsidian span.cm-formatting-list {
|
||||
color: var(--text-normal) !important;
|
||||
}
|
||||
|
||||
/* horizontal line in preview */
|
||||
.markdown-preview-view hr {
|
||||
background-color: var(--text-faint) !important;
|
||||
}
|
||||
|
||||
/* embedded images */
|
||||
img:not(.emoji) {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
/* img hover zoom out img*/
|
||||
img:hover {
|
||||
transform: scale(1.04);
|
||||
transition: transform 0.25s ease-in-out 0s;
|
||||
}
|
||||
|
||||
.community-theme img:hover{
|
||||
transform: none;
|
||||
}
|
||||
|
||||
/*********************************/
|
||||
/* Headings - EDITOR and PREVIEW */
|
||||
/*********************************/
|
||||
|
||||
|
||||
/* headings for editor and preview */
|
||||
.cm-header-1, .markdown-preview-view h1
|
||||
{
|
||||
font-family: var(--font-family-editor);
|
||||
font-weight: 500;
|
||||
font-size: var(--font-size-h1);
|
||||
color: var(--text-title-h1);
|
||||
}
|
||||
|
||||
.cm-header-2, .markdown-preview-view h2
|
||||
{
|
||||
font-family: var(--font-family-editor);
|
||||
font-weight: 500;
|
||||
font-size: var(--font-size-h2);
|
||||
color: var(--text-title-h2);
|
||||
}
|
||||
|
||||
.cm-header-3, .markdown-preview-view h3
|
||||
{
|
||||
font-family: var(--font-family-editor);
|
||||
font-weight: 500;
|
||||
font-size: var(--font-size-h3);
|
||||
color: var(--text-title-h3);
|
||||
}
|
||||
|
||||
.cm-header-4, .markdown-preview-view h4
|
||||
{
|
||||
font-family: var(--font-family-editor);
|
||||
font-weight: 500;
|
||||
font-size: var(--font-size-h4);
|
||||
color: var(--text-title-h4);
|
||||
}
|
||||
|
||||
.cm-header-5, .markdown-preview-view h5
|
||||
{
|
||||
font-family: var(--font-family-editor);
|
||||
font-weight: 500;
|
||||
font-size: var(--font-size-h5);
|
||||
color: var(--text-title-h5);
|
||||
}
|
||||
|
||||
.cm-header-6, .markdown-preview-view h6
|
||||
{
|
||||
font-family: var(--font-family-editor);
|
||||
font-weight: 500;
|
||||
font-size: var(--font-size-h6);
|
||||
color: var(--text-title-h6);
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* Code block in Preview */
|
||||
/***************************************/
|
||||
|
||||
/* code blocks in preview */
|
||||
pre code {
|
||||
font-family: monaco !important;
|
||||
font-size: var(--font-size-code) !important;
|
||||
padding: 6px !important;
|
||||
line-height: normal;
|
||||
display: block;
|
||||
color: var(--code-block) !important;
|
||||
}
|
||||
|
||||
/* padding of code blocks in preview */
|
||||
.markdown-preview-view pre {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
/* font-size of in-line block for preview */
|
||||
.markdown-preview-view code
|
||||
{
|
||||
font-size: var(--font-size-code);
|
||||
}
|
||||
|
||||
|
||||
/* remove the shadow that typically affect light mode */
|
||||
.theme-dark code[class*="language-"],
|
||||
.theme-dark pre[class*="language-"],
|
||||
.theme-light code[class*="language-"],
|
||||
.theme-light pre[class*="language-"]
|
||||
{
|
||||
text-shadow: none !important;
|
||||
color: var(--text-faint) !important;
|
||||
background-color: var(--pre-code);
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* Brackets */
|
||||
/***************************************/
|
||||
|
||||
.cm-s-obsidian span.cm-formatting-link {
|
||||
color: var(--text-accent) !important;
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* Blockquote */
|
||||
/***************************************/
|
||||
|
||||
/* for editor */
|
||||
.cm-quote {
|
||||
color: var(--text-normal) !important;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* for preview */
|
||||
.markdown-preview-view blockquote {
|
||||
background-color: var(--pre-code);
|
||||
border: 0px solid;
|
||||
border-color: var(--blockquote-border) !important;
|
||||
border-left-width: 4px !important;
|
||||
border-radius: 0 8px 8px 0;
|
||||
line-height: 1.5em;
|
||||
margin: 30px 0px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* table */
|
||||
/***************************************/
|
||||
|
||||
th {
|
||||
font-weight: 800 !important;
|
||||
}
|
||||
|
||||
.markdown-preview-view th {
|
||||
font-weight: 800;
|
||||
background-color: var(--background-secondary) !important;
|
||||
}
|
||||
|
||||
thead {
|
||||
border-bottom: 3px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.table {
|
||||
padding: 4px;
|
||||
line-height: normal;
|
||||
display: block;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
border-bottom-left-radius: 4px;
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* Checkbox */
|
||||
/***************************************/
|
||||
|
||||
.markdown-preview-view .task-list-item-checkbox:checked::before {
|
||||
content: '✓';
|
||||
position: absolute;
|
||||
color: var(--text-accent);
|
||||
font-size:1em;
|
||||
line-height: 1.25em;
|
||||
width:1.2em;
|
||||
text-align:center;
|
||||
text-shadow: 0 0 0.1em var(--text-accent);
|
||||
}
|
||||
|
||||
.markdown-preview-view .task-list-item-checkbox {
|
||||
-webkit-appearance: none;
|
||||
top: 0.2em !important;
|
||||
right: 4px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid var(--text-muted);
|
||||
position: relative;
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
margin: 0;
|
||||
box-shadow: 0 0 0.1em var(--text-muted);
|
||||
}
|
||||
|
||||
.checkbox-container {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
|
||||
|
||||
/***************************************/
|
||||
/* popover */
|
||||
/***************************************/
|
||||
|
||||
.popover{
|
||||
border: 1px solid var(--border-color);
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
|
||||
|
||||
/***************************************/
|
||||
/* Side panel */
|
||||
/***************************************/
|
||||
|
||||
/* search result in backlink or file search */
|
||||
.search-result-file-title {
|
||||
font-size: 15px ;
|
||||
}
|
||||
|
||||
.search-result-file-matches, .search-empty-state {
|
||||
font-size: var(--font-size-side-dock);
|
||||
}
|
||||
|
||||
/*decrease the spacing between result items*/
|
||||
.search-result-file-title,
|
||||
.search-result-file-match {
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
.nav-file-title, .nav-folder-title {
|
||||
border-bottom-left-radius: 0 !important;
|
||||
border-bottom-right-radius: 0 !important;
|
||||
border-top-left-radius: 0 !important;
|
||||
border-top-right-radius: 0 !important;
|
||||
}
|
||||
|
||||
/*backlink pane*/
|
||||
.workspace-leaf-content[data-type="backlink"] .view-content{
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="tag"] .tag-pane-tag-count,
|
||||
.workspace-leaf-content[data-type="tag"] .tag-pane-tag-text {
|
||||
font-size: var(--font-size-side-dock);
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type="backlink"] .search-result-file-matches {
|
||||
font-size: var(--font-size-side-dock);
|
||||
}
|
||||
/***************************************/
|
||||
/* internal embedded link in preview */
|
||||
/***************************************/
|
||||
|
||||
/* Naked Embeds */
|
||||
.markdown-embed-title { display: none; }
|
||||
.markdown-preview-view .markdown-embed-content>:first-child { margin-top: 0; }
|
||||
.markdown-preview-view .markdown-embed-content>:last-child { margin-bottom: 0; }
|
||||
/*remove the following two line, you will get border and scroll*/
|
||||
.markdown-preview-view .markdown-embed { border:none; padding:0; margin:0; }
|
||||
.markdown-preview-view .markdown-embed-content
|
||||
{
|
||||
max-height: unset;
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
|
||||
/* the link on the top right corner*/
|
||||
.markdown-embed-link {
|
||||
color: var(--text-faint) !important;
|
||||
}
|
||||
|
||||
.markdown-embed-link:hover {
|
||||
color: var(--text-accent) !important;
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* graph view */
|
||||
/***************************************/
|
||||
.graph-view.color-circle,
|
||||
.graph-view.color-fill-highlight,
|
||||
.graph-view.color-line-highlight
|
||||
{
|
||||
color: var(--text-accent) !important;
|
||||
}
|
||||
|
||||
.graph-view.color-text
|
||||
{
|
||||
color: var(--text-normal) !important;
|
||||
}
|
||||
|
||||
.graph-view.color-line {
|
||||
color: #6272a4;
|
||||
}
|
||||
|
||||
.graph-view.color-fill{
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.workspace-leaf-content[data-type = "graph"] .view-content{
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* settings */
|
||||
/***************************************/
|
||||
|
||||
.modal.mod-settings button:not(.mod-cta):hover {
|
||||
background-color: var(--interactive-accent-hover);
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* Hide side bar */
|
||||
/***************************************/
|
||||
|
||||
/* DISABLED: Sidebar now always visible
|
||||
.workspace-ribbon:not(:hover) .workspace-ribbon-collapse-btn,
|
||||
.workspace-ribbon:not(:hover) .side-dock-actions,
|
||||
.workspace-ribbon:not(:hover) .side-dock-settings {
|
||||
display:none;
|
||||
transition: all 300ms ease-in-out;}
|
||||
.workspace-ribbon:not(:hover) {
|
||||
width: 0px;
|
||||
transition: all 300ms ease-in-out;}
|
||||
|
||||
.workspace-split.mod-left-split {margin-left: 0px;}
|
||||
.workspace-split.mod-right-split {margin-right: 0px;}
|
||||
*/
|
||||
|
||||
/***************************************/
|
||||
/* width of content */
|
||||
/***************************************/
|
||||
|
||||
.markdown-source-view.is-readable-line-width .CodeMirror {
|
||||
max-width: 900px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.markdown-preview-view.is-readable-line-width .markdown-preview-section {
|
||||
max-width: 900px;
|
||||
margin-left: 30px;
|
||||
margin-right: 30px;
|
||||
}
|
||||
|
||||
|
||||
/* header */
|
||||
|
||||
.theme-dark .view-header {
|
||||
background-color: var(--background-primary) !important;
|
||||
border-top: 1px solid var(--border-color) !important;
|
||||
border-bottom: 1px solid var(--border-color) !important;
|
||||
}
|
||||
|
||||
.theme-dark .view-header-title-container:after {
|
||||
background: linear-gradient(to bottom, transparent, var(--background-primary)) !important;
|
||||
}
|
||||
|
||||
.theme-dark .workspace-leaf.mod-active .view-header {
|
||||
background-color: var(--background-secondary-alt) !important;
|
||||
border-top: 0px !important;
|
||||
border-bottom: 3px solid var(--interactive-accent) !important;
|
||||
}
|
||||
|
||||
.workspace-leaf.mod-active .view-header-title-container:after {
|
||||
background: linear-gradient(to bottom, transparent, var(--background-secondary-alt)) !important;
|
||||
}
|
||||
|
||||
.workspace-leaf.mod-active .view-header-title,
|
||||
.workspace-leaf.mod-active .view-header-icon
|
||||
{
|
||||
color: var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.view-header-title, .view-header-icon, .view-action{
|
||||
color: var(--text-faint);
|
||||
}
|
||||
.view-header-title
|
||||
{
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
/***************************************/
|
||||
/* at a rule line before ul list */
|
||||
/***************************************/
|
||||
|
||||
ul ul { position: relative; }
|
||||
ul ul::before {
|
||||
content:'';
|
||||
border-left: 1px solid var(--border-color);
|
||||
position: absolute;
|
||||
}
|
||||
ul ul::before { left: -1em; top: 0; bottom: 0; }
|
||||
|
||||
/* rule line when there are checkboxes*/
|
||||
ul .task-list-item ul::before {left: 0.15em !important}
|
||||
|
||||
/***************************************/
|
||||
/* Code block in Editor */
|
||||
/***************************************/
|
||||
|
||||
/* in-line block for editor */
|
||||
.cm-s-obsidian span.cm-inline-code,
|
||||
.cm-s-obsidian span.cm-inline-code.cm-hmd-indented-code,
|
||||
.cm-s-obsidian span.cm-inline-code:not(.cm-formatting):not(.cm-hmd-indented-code)
|
||||
{
|
||||
background-color: var(--pre-code-bg);
|
||||
color: var(--inline-code) !important;
|
||||
bottom: 0px !important;
|
||||
}
|
||||
|
||||
/* Editor CodeBlock TEXT Appearance */
|
||||
.cm-s-obsidian pre.HyperMD-codeblock {
|
||||
font-family: monaco !important;
|
||||
font-size: var(--font-size-code) !important;
|
||||
padding: 1px !important;
|
||||
display: block;
|
||||
color: var(--code-block) !important;
|
||||
font-weight: 500;
|
||||
text-indent: 0px !important;
|
||||
}
|
||||
|
||||
/*remove the border of codeblock in editor */
|
||||
.HyperMD-codeblock-bg{
|
||||
border: 0px !important;
|
||||
}
|
||||
|
||||
/*an active line highlight in vim normal mode
|
||||
.cm-fat-cursor .CodeMirror-activeline .CodeMirror-linebackground{
|
||||
background-color: var(--text-selection) !important;
|
||||
} */
|
||||
|
||||
/* in-line block for preview */
|
||||
code{
|
||||
color: var(--inline-code) !important;
|
||||
bottom: 0px !important;
|
||||
}
|
||||
|
||||
/* graph css */
|
||||
.theme-dark .graph-view.color-arrow {
|
||||
color: #50fa7b;
|
||||
}
|
||||
|
||||
.theme-dark .graph-view.color-fill-tag {
|
||||
color: #ffb86c;
|
||||
}
|
||||
|
||||
.theme-dark .graph-view.color-fill-attachment {
|
||||
color: #ff5555;
|
||||
}
|
||||
|
||||
.theme-dark .graph-view.color-fill-unresolved {
|
||||
color: #6272a4;
|
||||
}
|
||||
|
||||
.search-result-collapse-indicator {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: -3px;
|
||||
color: var(--text-faint);
|
||||
transition: transform 100ms ease-in-out;
|
||||
padding: 0px !important;
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "Encore",
|
||||
"version": "2.11.0",
|
||||
"minAppVersion": "1.1.9",
|
||||
"author": "Carbonateb",
|
||||
"authorUrl": "https://lucaschampagne.dev/"
|
||||
}
|
||||
Vendored
+2339
File diff suppressed because it is too large.
Load diff
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "Prism",
|
||||
"version": "3.8.0",
|
||||
"minAppVersion": "1.11.3",
|
||||
"author": "Damian Korcz",
|
||||
"authorUrl": "https://github.com/damiankorcz",
|
||||
"fundingUrl": "https://www.buymeacoffee.com/DamianKorcz"
|
||||
}
|
||||
Vendored
+11851
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "Solarized",
|
||||
"version": "1.1.5",
|
||||
"minAppVersion": "1.0.0",
|
||||
"author": "harmtemolder",
|
||||
"authorUrl": "https://github.com/harmtemolder"
|
||||
}
|
||||
Vendored
+440
@@ -0,0 +1,440 @@
|
||||
.theme-dark,
|
||||
.theme-light {
|
||||
/* Overwrite default theme colors */
|
||||
--base03: rgb(0, 43, 54);
|
||||
--base02: rgb(7, 54, 66);
|
||||
--base01: rgb(88, 110, 117);
|
||||
--base00: rgb(101, 123, 131);
|
||||
--base0: rgb(131, 148, 150);
|
||||
--base1: rgb(147, 161, 161);
|
||||
--base2: rgb(238, 232, 213);
|
||||
--base3: rgb(253, 246, 227);
|
||||
--color-yellow: rgb(181, 137, 0);
|
||||
--color-yellow-rgb: 181, 137, 0;
|
||||
--color-orange: rgb(203, 75, 22);
|
||||
--color-orange-rgb: 203, 75, 22;
|
||||
--color-red: rgb(220, 50, 47);
|
||||
--color-red-rgb: 220, 50, 47;
|
||||
--color-pink: rgb(211, 54, 130);
|
||||
--color-pink-rgb: 211, 54, 130;
|
||||
--color-purple: rgb(108, 113, 196);
|
||||
--color-purple-rgb: 108, 113, 196;
|
||||
--color-blue: rgb(38, 139, 210);
|
||||
--color-blue-rgb: 38, 139, 210;
|
||||
--color-cyan: rgb(42, 161, 152);
|
||||
--color-cyan-rgb: 42, 161, 152;
|
||||
--color-green: rgb(133, 153, 0);
|
||||
--color-green-rgb: 133, 153, 0;
|
||||
--accent-h: 17.5690607735deg;
|
||||
--accent-s: 80.4444444444%;
|
||||
--accent-l: 44.1176470588%;
|
||||
}
|
||||
|
||||
/* Settings for the Style Settings plugin. Leave in _colors.scss because
|
||||
it relies on the $tones and $colors maps. */
|
||||
/*! @settings
|
||||
name: Solarized Theme Settings
|
||||
id: solarized-theme-settings
|
||||
settings:
|
||||
- id: disable-active-line-highlight
|
||||
title: Disable active line highlight
|
||||
description: "By default Solarized highlights the active line. This setting lets you disable that behavior."
|
||||
type: class-toggle
|
||||
default: false
|
||||
- id: tones
|
||||
title: Base Tones
|
||||
type: heading
|
||||
level: 2
|
||||
collapsed: true
|
||||
- id: base03
|
||||
title: base03
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(0 43 54)
|
||||
- id: base02
|
||||
title: base02
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(7 54 66)
|
||||
- id: base01
|
||||
title: base01
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(88 110 117)
|
||||
- id: base00
|
||||
title: base00
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(101 123 131)
|
||||
- id: base0
|
||||
title: base0
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(131 148 150)
|
||||
- id: base1
|
||||
title: base1
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(147 161 161)
|
||||
- id: base2
|
||||
title: base2
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(238 232 213)
|
||||
- id: base3
|
||||
title: base3
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(253 246 227)
|
||||
- id: accents
|
||||
description: "NB This does not override Obsidian's built-in accent color (see Appearance > Accent color)"
|
||||
title: Accent Colors
|
||||
type: heading
|
||||
level: 2
|
||||
collapsed: true
|
||||
- id: color-yellow
|
||||
title: yellow
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(181 137 0)
|
||||
alt-format:
|
||||
- id: color-yellow-rgb
|
||||
format: rgb-values
|
||||
- id: color-orange
|
||||
title: orange
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(203 75 22)
|
||||
alt-format:
|
||||
- id: color-orange-rgb
|
||||
format: rgb-values
|
||||
- id: color-red
|
||||
title: red
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(220 50 47)
|
||||
alt-format:
|
||||
- id: color-red-rgb
|
||||
format: rgb-values
|
||||
- id: color-pink
|
||||
title: pink
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(211 54 130)
|
||||
alt-format:
|
||||
- id: color-pink-rgb
|
||||
format: rgb-values
|
||||
- id: color-purple
|
||||
title: purple
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(108 113 196)
|
||||
alt-format:
|
||||
- id: color-purple-rgb
|
||||
format: rgb-values
|
||||
- id: color-blue
|
||||
title: blue
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(38 139 210)
|
||||
alt-format:
|
||||
- id: color-blue-rgb
|
||||
format: rgb-values
|
||||
- id: color-cyan
|
||||
title: cyan
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(42 161 152)
|
||||
alt-format:
|
||||
- id: color-cyan-rgb
|
||||
format: rgb-values
|
||||
- id: color-green
|
||||
title: green
|
||||
type: variable-color
|
||||
format: rgb
|
||||
default: rgb(133 153 0)
|
||||
alt-format:
|
||||
- id: color-green-rgb
|
||||
format: rgb-values
|
||||
*/
|
||||
.theme-dark {
|
||||
/* Overwrite default theme colors */
|
||||
--color-base-00: #1e1e1e;
|
||||
--color-base-10: #242424;
|
||||
--color-base-20: #262626;
|
||||
--color-base-25: var(--base03);
|
||||
--color-base-30: var(--base02);
|
||||
--color-base-35: var(--base02);
|
||||
--color-base-40: var(--base0);
|
||||
--color-base-50: #666;
|
||||
--color-base-60: #999;
|
||||
--color-base-70: #bababa;
|
||||
--color-base-100: #dadada;
|
||||
/* Background */
|
||||
--background-primary: var(--base03);
|
||||
--background-primary-alt: var(--base02);
|
||||
/* Text */
|
||||
--text-normal: var(--base0);
|
||||
--text-muted: var(--base00);
|
||||
--text-faint: var(--base01);
|
||||
/* File explorer */
|
||||
--active-bg: var(--nav-item-background-active);
|
||||
/* Hashtags */
|
||||
--tag-background: hsla(var(--interactive-accent-hsl), 0.2);
|
||||
}
|
||||
|
||||
.theme-light {
|
||||
/* Overwrite default theme colors */
|
||||
--color-base-00: var(--base2);
|
||||
--color-base-05: #fcfcfc;
|
||||
--color-base-10: var(--base2);
|
||||
--color-base-20: #f6f6f6;
|
||||
--color-base-25: #e3e3e3;
|
||||
--color-base-30: var(--base2);
|
||||
--color-base-35: var(--base2);
|
||||
--color-base-40: var(--base00);
|
||||
--color-base-50: #ababab;
|
||||
--color-base-60: #707070;
|
||||
--color-base-70: #5a5a5a;
|
||||
--color-base-100: #222222;
|
||||
/* Background */
|
||||
--background-primary: var(--base3);
|
||||
--background-primary-alt: var(--base2);
|
||||
/* Text */
|
||||
--text-normal: var(--base00);
|
||||
--text-muted: var(--base0);
|
||||
--text-faint: var(--base1);
|
||||
/* File explorer */
|
||||
--active-bg: hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.1);
|
||||
--nav-item-background-active: var(--active-bg);
|
||||
/* Hashtags */
|
||||
--tag-background: hsla(var(--interactive-accent-hsl), 0.1);
|
||||
}
|
||||
|
||||
.theme-dark,
|
||||
.theme-light {
|
||||
/* UI elements */
|
||||
--interactive-accent: var(--color-accent);
|
||||
--interactive-normal: var(--background-primary-alt);
|
||||
--interactive-hover: var(--background-primary);
|
||||
/* Background */
|
||||
--background-secondary: var(--background-primary);
|
||||
--background-secondary-alt: var(--background-primary-alt);
|
||||
/* Text */
|
||||
--text-on-accent: var(--background-primary);
|
||||
/* Headings */
|
||||
--text-title: var(--color-cyan);
|
||||
--heading-formatting: var(--text-title);
|
||||
--h1-color: var(--text-title);
|
||||
--h2-color: var(--text-title);
|
||||
--h3-color: var(--text-title);
|
||||
--h4-color: var(--text-title);
|
||||
--h5-color: var(--text-title);
|
||||
--h6-color: var(--text-title);
|
||||
/* Links */
|
||||
--link-color: var(--color-blue);
|
||||
--link-color-hover: var(--link-color);
|
||||
--link-decoration: none;
|
||||
--link-decoration-hover: underline;
|
||||
--link-external-color: var(--color-purple);
|
||||
--link-external-color-hover: var(--link-external-color);
|
||||
--link-external-decoration: none;
|
||||
--link-external-decoration-hover: underline;
|
||||
--link-unresolved-color: var(--color-red);
|
||||
--link-unresolved-color-hover: var(--link-unresolved-color);
|
||||
--link-unresolved-opacity: unset;
|
||||
--link-unresolved-decoration-color: var(--link-unresolved-color);
|
||||
/* Code */
|
||||
--code-normal: var(--text-normal);
|
||||
--code-comment: var(--color-cyan);
|
||||
--code-function: var(--color-blue);
|
||||
--code-important: var(--color-orange);
|
||||
--code-keyword: var(--color-green);
|
||||
--code-operator: var(--code-normal);
|
||||
--code-property: var(--code-normal);
|
||||
--code-punctuation: var(--code-normal);
|
||||
--code-string: var(--color-cyan);
|
||||
--code-tag: var(--color-red);
|
||||
--code-value: var(--color-pink);
|
||||
/* Tables */
|
||||
--table-header-size: inherit;
|
||||
--table-header-weight: var(--font-bold);
|
||||
--table-header-color: inherit;
|
||||
/* Highlights */
|
||||
--text-highlight-bg: var(--color-accent);
|
||||
--text-highlight-bg-active: var(--color-accent);
|
||||
/* Checkboxes in reading view */
|
||||
--checkbox-border-color: var(--interactive-accent);
|
||||
--checkbox-border-color-hover: var(--interactive-accent-hover);
|
||||
/* Hashtags */
|
||||
--tag-padding-x: var(--tag-padding-y);
|
||||
--tag-color: var(--color-accent);
|
||||
/* Focus border */
|
||||
--background-modifier-border-focus: var(--interactive-accent);
|
||||
}
|
||||
|
||||
.cm-s-obsidian {
|
||||
/* Checkboxes */
|
||||
/* Links */
|
||||
/* Tables */
|
||||
/* Search results */
|
||||
/* Code */
|
||||
/* Highlights */
|
||||
}
|
||||
.cm-s-obsidian span.cm-formatting-task {
|
||||
color: var(--checkbox-color);
|
||||
}
|
||||
.cm-s-obsidian span.cm-formatting-link {
|
||||
color: var(--link-color);
|
||||
}
|
||||
.cm-s-obsidian span.cm-formatting-link.cm-strikethrough {
|
||||
text-decoration-line: line-through;
|
||||
}
|
||||
.cm-s-obsidian span.cm-link {
|
||||
color: var(--link-external-color) !important;
|
||||
}
|
||||
.cm-s-obsidian span.cm-url.cm-strikethrough {
|
||||
text-decoration-line: line-through;
|
||||
}
|
||||
.cm-s-obsidian .HyperMD-table-row-0 {
|
||||
font-weight: var(--font-bold);
|
||||
}
|
||||
.cm-s-obsidian span.obsidian-search-match-highlight {
|
||||
box-shadow: unset;
|
||||
mix-blend-mode: unset;
|
||||
border-radius: unset;
|
||||
background: var(--color-green);
|
||||
color: var(--text-on-accent);
|
||||
padding: 2px 0;
|
||||
}
|
||||
.cm-s-obsidian span.cm-comment {
|
||||
color: var(--code-comment);
|
||||
}
|
||||
.cm-s-obsidian span.cm-inline-code {
|
||||
padding: 2px 0;
|
||||
}
|
||||
.cm-s-obsidian span.cm-formatting-highlight,
|
||||
.cm-s-obsidian span.cm-highlight {
|
||||
color: var(--text-on-accent);
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
/* More code */
|
||||
.cm-def {
|
||||
color: var(--code-function);
|
||||
}
|
||||
|
||||
.cm-atom {
|
||||
color: var(--code-value);
|
||||
}
|
||||
|
||||
.cm-hmd-frontmatter.cm-hmd-frontmatter.cm-atom,
|
||||
.cm-hmd-frontmatter.cm-hmd-frontmatter.cm-def {
|
||||
color: var(--interactive-accent);
|
||||
}
|
||||
|
||||
/* Search results */
|
||||
.is-flashing {
|
||||
border-radius: unset;
|
||||
--code-normal: var(--text-highlight-bg);
|
||||
--link-color: var(--text-on-accent);
|
||||
--link-color-hover: var(--background-primary-alt);
|
||||
--link-decoration: underline;
|
||||
--link-decoration-hover: none;
|
||||
--link-external-color: var(--text-on-accent);
|
||||
--link-external-color-hover: var(--background-primary-alt);
|
||||
--link-external-decoration: underline;
|
||||
--link-external-decoration-hover: none;
|
||||
}
|
||||
|
||||
.search-result-file-matched-text {
|
||||
color: var(--text-on-accent);
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
.markdown-rendered {
|
||||
/* Unresolved links in preview mode */
|
||||
/* Highlights in preview mode */
|
||||
}
|
||||
.markdown-rendered .internal-link.is-unresolved:hover {
|
||||
color: var(--link-unresolved-color-hover);
|
||||
text-decoration-color: var(--link-unresolved-color-hover);
|
||||
}
|
||||
.markdown-rendered mark {
|
||||
color: var(--text-on-accent);
|
||||
}
|
||||
|
||||
/* Highlight current line */
|
||||
body:not(.disable-active-line-highlight) .cm-active {
|
||||
background: var(--active-bg);
|
||||
}
|
||||
body:not(.disable-active-line-highlight) .cm-active.cm-gutterElement {
|
||||
color: var(--color-accent);
|
||||
}
|
||||
|
||||
/* Hashtags */
|
||||
.cm-hashtag.cm-hashtag-begin, .cm-hashtag.cm-hashtag-end {
|
||||
border: unset;
|
||||
border-radius: unset;
|
||||
}
|
||||
|
||||
/* https://github.com/nothingislost/obsidian-dynamic-highlights */
|
||||
.cm-current-word,
|
||||
.cm-matched-word,
|
||||
.cm-current-string,
|
||||
.cm-matched-string {
|
||||
background: var(--color-yellow);
|
||||
color: var(--text-on-accent);
|
||||
text-decoration: none;
|
||||
padding: 2px 0;
|
||||
}
|
||||
|
||||
/* File explorer */
|
||||
.is-flashing {
|
||||
color: var(--text-on-accent) !important;
|
||||
}
|
||||
|
||||
.workspace-leaf.mod-active .nav-folder.has-focus > .nav-folder-title,
|
||||
.workspace-leaf.mod-active .nav-file.has-focus > .nav-file-title {
|
||||
box-shadow: 0 0 0 2px var(--color-accent);
|
||||
}
|
||||
|
||||
/* Community theme and plugin browsers */
|
||||
.community-item:hover {
|
||||
border-color: var(--color-accent);
|
||||
}
|
||||
.community-item .suggestion-highlight {
|
||||
color: var(--text-on-accent);
|
||||
font-weight: unset;
|
||||
}
|
||||
|
||||
/* Vimrc Support Plugin */
|
||||
div.status-bar-item.plugin-obsidian-vimrc-support.vimrc-support-vim-mode {
|
||||
color: var(--text-on-accent);
|
||||
}
|
||||
div.status-bar-item.plugin-obsidian-vimrc-support.vimrc-support-vim-mode[data-vim-mode=normal] {
|
||||
background-color: var(--color-blue);
|
||||
}
|
||||
div.status-bar-item.plugin-obsidian-vimrc-support.vimrc-support-vim-mode[data-vim-mode=insert] {
|
||||
background-color: var(--color-green);
|
||||
}
|
||||
div.status-bar-item.plugin-obsidian-vimrc-support.vimrc-support-vim-mode[data-vim-mode=visual] {
|
||||
background-color: var(--color-pink);
|
||||
}
|
||||
div.status-bar-item.plugin-obsidian-vimrc-support.vimrc-support-vim-mode[data-vim-mode=replace] {
|
||||
background-color: var(--red);
|
||||
}
|
||||
|
||||
/* Mermaid */
|
||||
.mermaid tspan {
|
||||
fill: var(--text-on-accent);
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
@media (hover: hover) {
|
||||
button.mod-cta:hover {
|
||||
color: var(--interactive-accent);
|
||||
}
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=theme.css.map */
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "Sparkling Night",
|
||||
"version": "1.2.2",
|
||||
"minAppVersion": "1.2.2",
|
||||
"author": "isax785",
|
||||
"authorUrl": "https://github.com/isax785/obsidian-sparkling-night"
|
||||
}
|
||||
+575
@@ -0,0 +1,575 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
/** -----------------------------------------------------------------------
|
||||
_____ _ _ _ _ _ _ _ _
|
||||
/ ____| | | | (_) | \ | (_) | | | |
|
||||
| (___ _ __ __ _ _ __| | _| |_ _ __ __ _ | \| |_ __ _| |__ | |_
|
||||
\___ \| '_ \ / _` | '__| |/ / | | '_ \ / _` | | . ` | |/ _` | '_ \| __|
|
||||
____) | |_) | (_| | | | <| | | | | | (_| | | |\ | | (_| | | | | |_
|
||||
|_____/| .__/ \__,_|_| |_|\_\_|_|_| |_|\__, | |_| \_|_|\__, |_| |_|\__|
|
||||
| | __/ | __/ |
|
||||
|_| |___/ |___/
|
||||
|
||||
—— Version 1.0.0
|
||||
—— Made by Isax785
|
||||
Changelog here:
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* :root {
|
||||
--default-font: Calibri;
|
||||
--h1-font: Times;
|
||||
--font-monospace: Courier;
|
||||
--code-mono-font: 'OperatorMonoSSmLig-Book';;
|
||||
} */
|
||||
|
||||
:root {
|
||||
--white: #FCFCFC;
|
||||
/* --raisin-black: #1b1825; */
|
||||
--raisin-black: #16141f;
|
||||
--rich-black: #121019;
|
||||
--dark-purple: #242032;
|
||||
--dark-purple-light: #413a58;
|
||||
--bright-green: #5AFF15;
|
||||
--tropical-indigo: #8B80F9;
|
||||
--tropical-indigo-light: #A69EFA;
|
||||
--robin-egg-blue: #19D8D5;
|
||||
--cool-gray: #7C809B;
|
||||
--french-gray : #D1D2DC; /*cool gray light*/
|
||||
--white-smoke: #F5F5F5;
|
||||
--ylmn-blue: #375BA9;
|
||||
--mint: #13C4A3;
|
||||
--anti-flash-white: #EBEBEB;
|
||||
--folly: #FF3366;
|
||||
--gold: rgb(253, 233, 9);
|
||||
--line-width: 750px;
|
||||
}
|
||||
|
||||
.theme-dark, .theme-light {
|
||||
--file-line-width: var(--line-width);
|
||||
/* Line color */
|
||||
--tab-divider-color: var(--dark-purple-light);
|
||||
--tab-outline-color: var(--dark-purple-light);
|
||||
--divider-color: var(--dark-purple-light);
|
||||
/* Background */
|
||||
--background-primary: var(--rich-black);
|
||||
--background-secondary: var(--raisin-black);
|
||||
--background-secondary-alt: var(--raisin-black);
|
||||
--background-code: var(--grey);
|
||||
|
||||
/* Text */
|
||||
--text-normal: var(--white);
|
||||
--text-accent: var(--bright-green);
|
||||
--text-selection: var(--tropical-indigo-light);
|
||||
|
||||
--text-header: var(--tropical-indigo);
|
||||
|
||||
--h1-color: var(--tropical-indigo);
|
||||
--h1-gradient-start: transparent;
|
||||
--h1-gradient-mid: var(--tropical-indigo);
|
||||
--h1-gradient-end: transparent;
|
||||
|
||||
--h2-color: var(--tropical-indigo);
|
||||
--h2-gradient-start: var(--tropical-indigo);
|
||||
--h2-gradient-end: transparent;
|
||||
|
||||
--h3-color: var(--tropical-indigo);
|
||||
--h4-color: var(--tropical-indigo);
|
||||
--h5-color: var(--tropical-indigo);
|
||||
--h6-color: var(--tropical-indigo);
|
||||
|
||||
/* bar */
|
||||
--bar-gradient-start: transparent;
|
||||
--bar-gradient-mid: var(--bright-green);
|
||||
--bar-gradient-end: transparent;
|
||||
|
||||
/* bold, Italic, Underline */
|
||||
|
||||
--strong: var(--robin-egg-blue);
|
||||
/* --italic: var(--robin-egg-blue); */
|
||||
--underline-text-color: var(--white);
|
||||
--underline-line-color: var(--bright-green);
|
||||
--underline-line-thickness: 0.15em;
|
||||
|
||||
/* Code */
|
||||
--codeblock-background: var(--dark-purple);
|
||||
--codeblock-color: var(--white);
|
||||
--inline-code-background: var(--dark-purple);
|
||||
--inline-code-color: var(--bright-green);
|
||||
--code-variable-color: var(--white);
|
||||
--code-function-color: var(--bright-green);
|
||||
--code-builtin-color: var(--tropical-indigo);
|
||||
--code-string-color: var(--robin-egg-blue);
|
||||
--code-operator-color: var(--bright-green);
|
||||
--code-comment-color: var(--cool-gray);
|
||||
--code-text-size: 0.9em;
|
||||
|
||||
/* Tags */
|
||||
--tags-background: var(--dark-purple);
|
||||
--tags-color: var(--robin-egg-blue);
|
||||
|
||||
/* List Markers */
|
||||
--list-marker-color: var(--white);
|
||||
--list-marker-color-hover: var(--bright-green);
|
||||
|
||||
/* Checkboxes */
|
||||
--checkbox-marker-color: var(--white);
|
||||
--radius-s: 3px;
|
||||
--interactive-accent: var(--tropical-indigo); /*marked color*/
|
||||
--checklist-done-color: var(--cool-gray);
|
||||
--checkbox-border-color: var(--cool-gray);
|
||||
--checkbox-border-color-hover: var(--bright-green);
|
||||
--checkbox-color-hover: var(--bright-green);
|
||||
--checklist-done-decoration: none;
|
||||
|
||||
/* Quotes */
|
||||
--quote-background: var(--dark-purple);
|
||||
/* --quote-style: italic; */
|
||||
|
||||
/* Links */
|
||||
--link-text-shadow: var(--raisin-black);
|
||||
--link-text-color: var(--white);
|
||||
--link-text-color-hover: var(--tropical-indigo);
|
||||
--link-ext-color: var(--tropical-indigo);
|
||||
--link-int-color: var(--robin-egg-blue);
|
||||
--link-url-text-color: var(--tropical-indigo);
|
||||
|
||||
/* Explorer */
|
||||
--folder-title-color: var(--white);
|
||||
--file-title-color: var(--white);
|
||||
--folder-filter: invert(30%) sepia(99%) saturate(1210%) hue-rotate(51deg) brightness(120%) contrast(100%);
|
||||
|
||||
/* Progress Bar Loading */
|
||||
--progress-bar-color: var(--tropical-indigo);
|
||||
|
||||
/* Highlight */
|
||||
--highlight-background-color: var(--bright-green);
|
||||
--highlight-text-color: var(--dark-purple);
|
||||
--highlight-text-shadow: var(--text-normal);
|
||||
|
||||
/* Search and Find */
|
||||
--search-result-background: var(--tropical-indigo);
|
||||
--find-flashing: var(--bright-green);
|
||||
}
|
||||
|
||||
|
||||
/* ----------- Font ----------- */
|
||||
|
||||
/* working progress */
|
||||
|
||||
/* ----------- Text ----------- */
|
||||
|
||||
.markdown-source-view.mod-cm6 .cm-line {
|
||||
padding-top: 0em;
|
||||
padding-bottom: 0.3em;
|
||||
}
|
||||
|
||||
/* ----------- Titles ----------- */
|
||||
|
||||
.HyperMD-header-1, .HyperMD-header.HyperMD-header-1.cm-line, h1 {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
border-bottom: 0.1em solid transparent;
|
||||
border-image: linear-gradient(0.25turn,
|
||||
var(--h1-gradient-start) 5%,
|
||||
var(--h1-gradient-mid) 50%,
|
||||
var(--h1-gradient-end) 96%);
|
||||
border-radius: 3px;
|
||||
border-image-slice: 1;
|
||||
padding-top: 0.3em!important;
|
||||
padding-bottom: 0.2em!important;
|
||||
margin-top: 0.3em!important;
|
||||
margin-bottom: 0.5em!important;
|
||||
}
|
||||
|
||||
.HyperMD-header-2, .HyperMD-header.HyperMD-header-2.cm-line, h2 {
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
border-bottom: 0.05em solid transparent;
|
||||
border-image: linear-gradient(0.25turn,
|
||||
var(--h2-gradient-start) 0%,
|
||||
var(--h2-gradient-end) 60%);
|
||||
border-radius: 3px;
|
||||
border-image-slice: 1;
|
||||
padding-top: 0.3em!important;
|
||||
padding-bottom: 0.2em!important;
|
||||
margin-top: 0.3em!important;
|
||||
margin-bottom: 0.5em!important;
|
||||
}
|
||||
|
||||
.HyperMD-header-3, .HyperMD-header.HyperMD-header-3.cm-line, h3 {
|
||||
padding-top: 0.3em!important;
|
||||
margin-top: 0.3em!important;
|
||||
margin-bottom: 0.3em!important;
|
||||
}
|
||||
|
||||
.cm-header.cm-header-1.cm-inline-code,
|
||||
.cm-header.cm-header-2.cm-inline-code{
|
||||
font-size: var(--code-text-size)!important;
|
||||
}
|
||||
|
||||
.cm-header.cm-header-3.cm-inline-code,
|
||||
.cm-header.cm-header-4.cm-inline-code,
|
||||
.cm-header.cm-header-5.cm-inline-code,
|
||||
.cm-header.cm-header-6.cm-inline-code{
|
||||
font-size: var(--code-text-size)!important;
|
||||
}
|
||||
/* ----------- Bar ----------- */
|
||||
|
||||
.cm-line hr,
|
||||
.markdown-preview-view hr {
|
||||
margin-block-start: 1em;
|
||||
margin-block-end: 1.2em;
|
||||
border: none;
|
||||
height: 0;
|
||||
border-bottom: 1px solid;
|
||||
border-image-slice: 1;
|
||||
border-width: 0.1em;
|
||||
border-image-source: linear-gradient(0.25turn,
|
||||
var(--bar-gradient-start) 2%,
|
||||
var(--bar-gradient-mid) 50%,
|
||||
var(--bar-gradient-end) 98%);
|
||||
}
|
||||
|
||||
/* ----------- Lists ----------- */
|
||||
|
||||
.mod-cm6 .HyperMD-list-line.cm-line {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
/* ordered */
|
||||
ol,
|
||||
ol ol,
|
||||
ol ol ol,
|
||||
ol ol ol ol
|
||||
{
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
/* unordered */
|
||||
ul,
|
||||
ul ul,
|
||||
ul ul ul {
|
||||
list-style-type: square;
|
||||
}
|
||||
|
||||
/* ----------- Checkboxes ----------- */
|
||||
|
||||
:is(.HyperMD-task-line[data-task="/"],
|
||||
.HyperMD-task-line[data-task=">"],
|
||||
.HyperMD-task-line[data-task="-"],
|
||||
.HyperMD-task-line[data-task="<"]) .task-list-item-checkbox::after {
|
||||
-webkit-mask-image: none;
|
||||
mask-image: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.HyperMD-task-line[data-task="/"] .task-list-item-checkbox,
|
||||
.HyperMD-task-line[data-task="/"] .task-list-item-checkbox:hover {
|
||||
background-color: var(--folly);
|
||||
border-color: var(--checkbox-border-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.HyperMD-task-line[data-task=">"] .task-list-item-checkbox,
|
||||
.HyperMD-task-line[data-task=">"] .task-list-item-checkbox:hover {
|
||||
background-color: var(--bright-green);
|
||||
border-color: var(--checkbox-border-color);
|
||||
}
|
||||
|
||||
.HyperMD-task-line[data-task="-"] .task-list-item-checkbox,
|
||||
.HyperMD-task-line[data-task="-"] .task-list-item-checkbox:hover {
|
||||
background-color: var(--gold);
|
||||
border-color: var(--checkbox-border-color);
|
||||
}
|
||||
.HyperMD-task-line[data-task="<"] .task-list-item-checkbox,
|
||||
.HyperMD-task-line[data-task="<"] .task-list-item-checkbox:hover {
|
||||
background-color: var(--robin-egg-blue);
|
||||
border-color: var(--checkbox-border-color);
|
||||
}
|
||||
|
||||
/* ----------- Bold, Italic, Underline ----------- */
|
||||
|
||||
.cm-strong, strong {
|
||||
color: var(--strong) !important;
|
||||
}
|
||||
|
||||
.cm-em, em,
|
||||
.cm-em cm-quote cm-quote-1
|
||||
{
|
||||
color: var(--italic);
|
||||
}
|
||||
|
||||
/* ----------- Code - Code Block ----------- */
|
||||
|
||||
pre code {
|
||||
background-color: var(--codeblock-background) !important;
|
||||
border: var(--codeblock-background) !important;
|
||||
color: var(--codeblock-color)!important;
|
||||
}
|
||||
|
||||
.markdown-rendered pre {
|
||||
background-color: var(--codeblock-background);
|
||||
}
|
||||
|
||||
pre[class*="language-"],
|
||||
code[class*="language-"]
|
||||
{
|
||||
font-size: var(--code-text-size)!important;
|
||||
background: var(--codeblock-background)!important;
|
||||
color: var(--codeblock-color)!important;
|
||||
}
|
||||
|
||||
.cm-s-obsidian div.HyperMD-codeblock-begin-bg,
|
||||
.cm-s-obsidian div.HyperMD-codeblock-end-bg {
|
||||
background-color: var(--codeblock-background);
|
||||
}
|
||||
|
||||
.cm-s-obsidian div.HyperMD-codeblock-bg {
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: var(--codeblock-background);
|
||||
}
|
||||
|
||||
.cm-inline-code{
|
||||
background-color: var(--inline-code-background)!important;
|
||||
color: var(--inline-code-color)!important;
|
||||
font-size: var(--code-text-size)!important;
|
||||
padding: 3px 4px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.markdown-rendered code {
|
||||
background-color: var(--codeblock-background)!important;
|
||||
/* color: var(--white); */
|
||||
color: var(--inline-code-color);
|
||||
font-size: var(--code-text-size)!important;
|
||||
padding: 3px 4px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
/* code styling */
|
||||
|
||||
.cm-link, .cm-variable, .cm-variable-2, .cm-variable-3 {color: var(--code-variable-color)!important;} /* variable */
|
||||
.cm-def.cm-hmd-codeblock, .token.function, .token.class-name {
|
||||
color: var(--code-function-color)!important;
|
||||
text-emphasis: italic;
|
||||
} /* function name in declaration */
|
||||
.cm-builtin, .cm-property, .cm-attribute, .cm-type, .cm-keyword, .token.keyword, .token.builtin, .token.property {color: var(--code-builtin-color)!important;} /* built-in functions, methods */
|
||||
.cm-hmd-codeblock.cm-string, .token.string {color: var(--code-string-color)!important;} /* strings and numbers */
|
||||
.cm-hmd-codeblock.cm-number, .token.number {color: var(--code-operator-color)!important}
|
||||
.cm-operator, .token.operator {color: var(--code-operator-color)!important;} /* operators */
|
||||
.cm-hmd-codeblock {color: var(--codeblock-color);} /* codeblock */
|
||||
.cm-comment, .token.comment {color: var(--code-comment-color)!important;} /* comment */
|
||||
|
||||
|
||||
/* ----------- Tags ----------- */
|
||||
|
||||
.cm-s-obsidian span.cm-hashtag, .tag
|
||||
{
|
||||
background-color: var(--tags-background)!important;
|
||||
color: var(--tags-color)!important;
|
||||
font-weight: bold;
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
/* ----------- Quotes ----------- */
|
||||
|
||||
.markdown-source-view.mod-cm6.is-live-preview .HyperMD-quote, .markdown-rendered blockquote {
|
||||
/* font-style: var(--quote-style); */
|
||||
font-size: 0.9em;
|
||||
background-color: var(--quote-background);
|
||||
padding-top: 0.3em;
|
||||
padding-bottom: 0.4em;
|
||||
}
|
||||
|
||||
/* ----------- Underline ----------- */
|
||||
|
||||
u {
|
||||
color: var(--underline-text-color);
|
||||
text-decoration-color: var(--underline-line-color);
|
||||
text-decoration-thickness: var(--underline-line-thickness);
|
||||
}
|
||||
|
||||
/* ----------- Highlight ----------- */
|
||||
|
||||
.cm-s-obsidian span.cm-formatting-highlight, .cm-s-obsidian span.cm-highlight, .markdown-rendered mark {
|
||||
background-color: var(--highlight-background-color);
|
||||
color: var(--highlight-text-color);
|
||||
padding-left: 0.3rem;
|
||||
padding-right: 0.3rem;
|
||||
border-radius: 0.2rem;
|
||||
/* text-shadow: -1px -1px 1px var(--highlight-text-shadow), -1px 1px 1px var(--highlight-text-shadow), 1px -1px 1px var(--highlight-text-shadow), 1px 1px 1px var(--highlight-text-shadow); */
|
||||
}
|
||||
|
||||
|
||||
/* ----------- Search ----------- */
|
||||
|
||||
.search-result-file-matched-text {
|
||||
background-color: var(--search-result-background);
|
||||
}
|
||||
|
||||
|
||||
/* ----------- Explorer ----------- */
|
||||
|
||||
.is-flashing {
|
||||
background-color: var(--find-flashing);
|
||||
transition: all 0.7s ease-in !important;
|
||||
}
|
||||
|
||||
|
||||
/* ----------- Links ----------- */
|
||||
|
||||
.external-link, .internal-link,
|
||||
.cm-s-obsidian span.cm-link:not(.cm-formatting-link) .cm-underline,
|
||||
.cm-s-obsidian span.cm-hmd-internal-link .cm-underline {
|
||||
text-shadow: -1px -1px 2px var(--link-text-shadow),
|
||||
-1px 1px 2px var(--link-text-shadow),
|
||||
1px -1px 2px var(--link-text-shadow),
|
||||
1px 1px 2px var(--link-text-shadow);
|
||||
color: var(--link-text-color);
|
||||
background-position: 0 100%;
|
||||
background-repeat: repeat-x;
|
||||
background-size: 1px 2px;
|
||||
text-decoration: none;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
.external-link,
|
||||
.cm-s-obsidian span.cm-link:not(.cm-formatting-link) .cm-underline,
|
||||
.cm-s-obsidian span.cm-hmd-external-link .cm-underline
|
||||
{
|
||||
background-image: linear-gradient(
|
||||
to bottom,
|
||||
var(--link-ext-color) 0%,
|
||||
var(--link-ext-color) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.internal-link,
|
||||
.cm-s-obsidian span.cm-hmd-internal-link .cm-underline
|
||||
{
|
||||
background-image: linear-gradient(
|
||||
to bottom,
|
||||
var(--link-int-color) 0%,
|
||||
var(--link-int-color) 100%
|
||||
);
|
||||
text-decoration: none!important;
|
||||
}
|
||||
|
||||
/* link hover color */
|
||||
a:hover,
|
||||
.internal-link:hover,
|
||||
.external-link:hover,
|
||||
.cm-underline:hover {
|
||||
text-decoration: none !important;
|
||||
color: var(--link-text-color-hover);
|
||||
}
|
||||
|
||||
.cm-s-obsidian span.cm-url {
|
||||
color: var(--link-url-text-color)!important;
|
||||
background-image: none!important;
|
||||
background-color: transparent!important;
|
||||
/* text-decoration: double!important; */
|
||||
}
|
||||
|
||||
.markdown-rendered .internal-link{
|
||||
color: var(--text-normal) !important;
|
||||
}
|
||||
|
||||
/* ----------- Images ----------- */
|
||||
|
||||
img {display:block;
|
||||
margin-left:auto;
|
||||
margin-right:auto;}
|
||||
|
||||
.markdown-preview-view img {
|
||||
display: block;
|
||||
margin-top: 20pt;
|
||||
margin-bottom: 20pt;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 40%; /* experiment with values */
|
||||
transition:transform 0.25s ease;
|
||||
}
|
||||
|
||||
.markdown-preview-view img:hover {
|
||||
-webkit-transform:scale(1); /* experiment with values */
|
||||
transform:scale(1.4);
|
||||
}
|
||||
|
||||
/* ----------- Tables ----------- */
|
||||
|
||||
/* preview */
|
||||
.markdown-preview-view table {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.markdown-source-view.mod-cm6 .cm-table-widget {
|
||||
margin-left: auto!important;
|
||||
margin-right: auto!important;
|
||||
}
|
||||
|
||||
/* ----------- File Explorer ----------- */
|
||||
|
||||
.nav-folder-children .nav-file-title-content:first-child::before
|
||||
{
|
||||
content: '📄 ';
|
||||
}
|
||||
|
||||
.nav-folder-children .nav-folder-title-content::before
|
||||
{
|
||||
content: '📁 ';
|
||||
margin-right: 0px !important;
|
||||
}
|
||||
|
||||
.nav-folder-title-content
|
||||
{
|
||||
color: var(--folder-title-color);
|
||||
}
|
||||
|
||||
.nav-file-title-content
|
||||
{
|
||||
color: var(--file-title-color);
|
||||
}
|
||||
|
||||
.nav-folder-title-content::before {
|
||||
font-size: 13px;
|
||||
/* how to get CSS filter ?
|
||||
0, open website: https://www.zhangxinxu.com/sp/filter.html
|
||||
1, first: image original color this is : #000
|
||||
2, second: display color i want : #D6FFF1
|
||||
3, CSS filter trans btn clik: the result is :
|
||||
filter: invert(99%) sepia(90%) saturate(382%) hue-rotate(69deg) brightness(106%) contrast(102%);
|
||||
4, pause👇 : OK ✌️;
|
||||
*/
|
||||
|
||||
/* filter to --bright-green: invert(72%) sepia(99%) saturate(1210%) hue-rotate(51deg) brightness(107%) contrast(107%); */
|
||||
/* filter: invert(30%) sepia(99%) saturate(1210%) hue-rotate(51deg) brightness(120%) contrast(100%); */
|
||||
filter: var(--folder-filter);
|
||||
|
||||
/*
|
||||
/* If you want to change the icon, you only need to modify this code.you can only change d=''
|
||||
*/
|
||||
|
||||
content: url("data:image/svg+xml;charset=UTF-8, <svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='0 0 100 100' width='17' height='17'><path fill='currentColor' stroke='currentColor' d='M6.1,8c-3.3,0-6,2.7-6,6v73.8c-0.1,0.5-0.1,0.9,0.1,1.4c0.6,2.7,3,4.8,5.9,4.8h78c3,0,5.4-2.2,5.9-5.1 c0-0.1,0.1-0.2,0.1-0.4c0,0,0-0.1,0-0.1l0.1-0.3c0,0,0,0,0-0.1l9.9-53.6l0.1-0.2V34c0-3.3-2.7-6-6-6v-6c0-3.3-2.7-6-6-6H36.1 c0,0,0,0-0.1,0c-0.1,0-0.2-0.2-0.6-0.6c-0.5-0.6-1.1-1.5-1.7-2.5c-0.6-1-1.3-2.1-2.1-3C30.9,9,29.7,8,28.1,8L6.1,8z M6.1,12h22 c-0.1,0,0.1,0,0.6,0.6c0.5,0.6,1.1,1.5,1.7,2.5c0.6,1,1.3,2.1,2.1,3c0.8,0.9,1.9,1.9,3.6,1.9h52c1.1,0,2,0.9,2,2v6h-74 c-3.1,0-5.7,2.5-5.9,5.6h-0.1L10.1,34l-6,32.4V14C4.1,12.9,4.9,12,6.1,12z M16.1,32h78c1.1,0,2,0.9,2,2l-9.8,53.1l-0.1,0.1 c0,0.1,0,0.2-0.1,0.2c0,0.1,0,0.2-0.1,0.2c0,0,0,0.1,0,0.1c0,0,0,0,0,0.1c0,0.1,0,0.2-0.1,0.3c0,0.1,0,0.1,0,0.2 c0,0.1,0,0.2,0,0.2c-0.3,0.8-1,1.4-1.9,1.4h-78c-1.1,0-2-0.9-2-2L14,34.4l0.1-0.2V34C14.1,32.9,14.9,32,16.1,32L16.1,32z'/></svg>");
|
||||
|
||||
margin-right: 7px !important;
|
||||
}
|
||||
|
||||
/* ----------- Progress Bar Loading ----------- */
|
||||
|
||||
.progress-bar-subline {
|
||||
position: absolute;
|
||||
background-color: var(--progress-bar-color);
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
.progress-bar-line {
|
||||
position: absolute;
|
||||
opacity: 0.4;
|
||||
background-color: var(--progress-bar-color);
|
||||
width: 150%;
|
||||
height: 5px;
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "SynthWave",
|
||||
"version": "0.0.0",
|
||||
"minAppVersion": "0.16.0",
|
||||
"author": "Marco Luzi"
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
.theme-dark,.theme-light{--background-primary:#262335;--background-primary-alt:#241b2f;--background-secondary:#241b2f;--background-secondary-alt:#262335;--background-modifier-border:#372b3d;--background-modifier-form-field:#372b3d;--background-modifier-box-shadow:none;--background-modifier-success:#7ee787;--background-modifier-error:#8b0000;--background-modifier-error-hover:#580000;--background-modifier-cover:#171520d2;--text-accent:#f97e72;--text-accent-hover:#ff7edb;--text-normal:#fff;--text-muted:#a7a4ac;--text-faint:#706a76;--text-error:red;--text-error-hover:#ff0;--text-highlight-bg:#d18616bb;--text-highlight-bg-active:#d1861655;--text-selection:#ffffff20;--text-on-accent:#fff;--interactive-normal:#614e83;--interactive-hover:#745d9e;--interactive-accent:#f97e72;--interactive-accent-hover:#ff7edb;--interactive-success:#7ee787}.dropdown:focus,input[type=text]:active,input[type=text]:focus,select:focus{box-shadow:none}.checkbox-container:focus-within{outline-width:1px}.modal-container{backdrop-filter:blur(20px)}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background-color:transparent;border-radius:0}::-webkit-scrollbar-thumb{background-color:#706a76;border-radius:19px}::-webkit-scrollbar-thumb:hover{background-color:#a7a4ac}.HyperMD-header-1{--h1-size:37.00897225px}.markdown-rendered h1{font-size:37.00897225px}.HyperMD-header-2{--h2-size:32.181715px}.markdown-rendered h2{font-size:32.181715px}.HyperMD-header-3{--h3-size:27.9841px}.markdown-rendered h3{font-size:27.9841px}.HyperMD-header-4{--h4-size:24.334px}.markdown-rendered h4{font-size:24.334px}.HyperMD-header-5{--h5-size:21.16px}.markdown-rendered h5{font-size:21.16px}.HyperMD-header-6{--h6-size:18.4px}.markdown-rendered h6{font-size:18.4px}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "Tokyo Night",
|
||||
"version": "1.1.6",
|
||||
"minAppVersion": "0.0.1",
|
||||
"author": "tcmmichaelb139"
|
||||
}
|
||||
+2129
File diff suppressed because it is too large.
Load diff
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "Vauxhall",
|
||||
"version": "1.0.2",
|
||||
"minAppVersion": "1.5.0",
|
||||
"author": "CyanVoxel",
|
||||
"authorUrl": "https//github.com/CyanVoxel"
|
||||
}
|
||||
Vendored
+504
@@ -0,0 +1,504 @@
|
||||
/* @settings
|
||||
|
||||
name: Vauxhall
|
||||
id: vauxhall
|
||||
settings:
|
||||
-
|
||||
id: main-color
|
||||
title: Main Color
|
||||
description: "The main color influencing the interface colors."
|
||||
type: class-select
|
||||
default: vauxhall-indigo
|
||||
options:
|
||||
-
|
||||
label: Teal
|
||||
value: vauxhall-teal
|
||||
-
|
||||
label: Blue
|
||||
value: vauxhall-blue
|
||||
-
|
||||
label: Indigo
|
||||
value: vauxhall-indigo
|
||||
-
|
||||
label: Purple
|
||||
value: vauxhall-purple
|
||||
-
|
||||
label: Magenta
|
||||
value: vauxhall-magenta
|
||||
-
|
||||
label: Red
|
||||
value: vauxhall-red
|
||||
-
|
||||
label: White
|
||||
value: vauxhall-white
|
||||
-
|
||||
id: color-intensity
|
||||
title: Color Intensity
|
||||
description: "How intense the main color appears across the interface. (Dark Theme only)"
|
||||
type: class-select
|
||||
default: intensity-standard
|
||||
options:
|
||||
-
|
||||
label: Void
|
||||
value: intensity-void
|
||||
-
|
||||
label: Standard
|
||||
value: intensity-standard
|
||||
-
|
||||
label: Nebula
|
||||
value: intensity-nebula
|
||||
-
|
||||
id: header-color-type
|
||||
title: Header Color Style
|
||||
description: "How intense the main color appears across the interface."
|
||||
type: class-select
|
||||
default: headers-gradient-cyan-to-purple
|
||||
options:
|
||||
-
|
||||
label: Mono
|
||||
value: headers-mono
|
||||
-
|
||||
label: Mono Gradient
|
||||
value: headers-mono-gradient
|
||||
-
|
||||
label: Rainbow
|
||||
value: headers-colorful
|
||||
-
|
||||
label: Gradient (Mint/Blue)
|
||||
value: headers-gradient-mint-to-blue
|
||||
-
|
||||
label: Gradient (Cyan/Purple)
|
||||
value: headers-gradient-cyan-to-purple
|
||||
-
|
||||
label: Gradient (Blue/Red)
|
||||
value: headers-gradient-blue-to-red
|
||||
-
|
||||
id: h1-accent
|
||||
title: Accent Color Main Header
|
||||
description: "Apply the user's accent color to H1 headers."
|
||||
type: class-toggle
|
||||
*/
|
||||
|
||||
/* Default Base Color */
|
||||
.theme-dark,
|
||||
.theme-light,
|
||||
.vauxhall-indigo {
|
||||
--hue-bg: 238;
|
||||
--hue-fg: 255;
|
||||
--sat-bg: 60%;
|
||||
--sat-fg: 100%;
|
||||
&.theme-light {
|
||||
--lum-fg: 50%;
|
||||
--lum-bg: 95%;
|
||||
}
|
||||
}
|
||||
|
||||
.vauxhall-teal {
|
||||
--hue-bg: 200;
|
||||
--hue-fg: 180;
|
||||
--sat-bg: 60%;
|
||||
--sat-fg: 100%;
|
||||
&.theme-light {
|
||||
--lum-fg: 30%;
|
||||
--lum-bg: 95%;
|
||||
}
|
||||
}
|
||||
|
||||
.vauxhall-blue {
|
||||
--hue-bg: 228;
|
||||
--hue-fg: 220;
|
||||
--sat-bg: 60%;
|
||||
--sat-fg: 100%;
|
||||
&.theme-light {
|
||||
--lum-fg: 50%;
|
||||
--lum-bg: 95%;
|
||||
}
|
||||
}
|
||||
|
||||
.vauxhall-purple {
|
||||
--hue-bg: 265;
|
||||
--hue-fg: 265;
|
||||
--sat-bg: 60%;
|
||||
--sat-fg: 100%;
|
||||
&.theme-light {
|
||||
--lum-fg: 50%;
|
||||
--lum-bg: 95%;
|
||||
}
|
||||
}
|
||||
|
||||
.vauxhall-magenta {
|
||||
--hue-bg: 290;
|
||||
--hue-fg: 280;
|
||||
--sat-bg: 60%;
|
||||
--sat-fg: 100%;
|
||||
&.theme-light {
|
||||
--lum-fg: 50%;
|
||||
--lum-bg: 95%;
|
||||
}
|
||||
}
|
||||
|
||||
.vauxhall-red {
|
||||
--hue-bg: 340;
|
||||
--hue-fg: 320;
|
||||
--sat-bg: 60%;
|
||||
--sat-fg: 100%;
|
||||
&.theme-light {
|
||||
--lum-fg: 50%;
|
||||
--lum-bg: 95%;
|
||||
}
|
||||
}
|
||||
|
||||
.vauxhall-white {
|
||||
--hue-bg: 228;
|
||||
--hue-fg: 220;
|
||||
--sat-bg: 20%;
|
||||
--sat-fg: 20%;
|
||||
|
||||
&.theme-light {
|
||||
--sat-bg: 30%;
|
||||
--sat-fg: 0%;
|
||||
--lum-bg: 90%;
|
||||
--lum-fg: 0%;
|
||||
|
||||
&.intensity-void {
|
||||
--lum-bg: 100%;
|
||||
}
|
||||
|
||||
&.intensity-nebula {
|
||||
--lum-bg: 80%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Default Intensity */
|
||||
.theme-dark,
|
||||
.theme-light,
|
||||
.intensity-standard {
|
||||
--lum: 11%;
|
||||
}
|
||||
|
||||
.intensity-nebula {
|
||||
--lum: 22%;
|
||||
--background-secondary: var(--color-base-00) !important;
|
||||
--titlebar-background-focused: var(--color-base-05) !important;
|
||||
--background-modifier-form-field: var(--color-base-05) !important;
|
||||
}
|
||||
|
||||
.intensity-void {
|
||||
--lum: 0%;
|
||||
--background-modifier-border: var(--color-base-40);
|
||||
}
|
||||
|
||||
/* Default Header Colors */
|
||||
.theme-dark,
|
||||
.theme-light,
|
||||
.headers-gradient-cyan-to-purple {
|
||||
--h1-color: var(--cool-cyan);
|
||||
--h2-color: var(--light-blue);
|
||||
--h3-color: var(--blue);
|
||||
--h4-color: var(--blue-violet);
|
||||
--h5-color: var(--violet);
|
||||
--h6-color: var(--purple);
|
||||
}
|
||||
|
||||
.headers-mono {
|
||||
--h1-color: var(--vauxhall-fg);
|
||||
--h2-color: var(--vauxhall-fg);
|
||||
--h3-color: var(--vauxhall-fg);
|
||||
--h4-color: var(--vauxhall-fg);
|
||||
--h5-color: var(--vauxhall-fg);
|
||||
--h6-color: var(--vauxhall-fg);
|
||||
}
|
||||
|
||||
.headers-mono-gradient {
|
||||
--h1-color: hsl(var(--hue-fg), var(--sat-fg), 65%);
|
||||
--h2-color: hsl(var(--hue-fg), var(--sat-fg), 75%);
|
||||
--h3-color: hsl(var(--hue-fg), var(--sat-fg), 80%);
|
||||
--h4-color: hsl(var(--hue-fg), var(--sat-fg), 80%);
|
||||
--h5-color: hsl(var(--hue-fg), var(--sat-fg), 90%);
|
||||
--h6-color: hsl(var(--hue-fg), var(--sat-fg), 95%);
|
||||
}
|
||||
|
||||
.headers-colorful {
|
||||
--h1-color: var(--mint);
|
||||
--h2-color: var(--cool-cyan);
|
||||
--h3-color: var(--blue);
|
||||
--h4-color: var(--violet);
|
||||
--h5-color: var(--magenta);
|
||||
--h6-color: var(--hot-red);
|
||||
}
|
||||
|
||||
.headers-gradient-mint-to-blue {
|
||||
--h1-color: var(--mint);
|
||||
--h2-color: color-mix(in srgb, var(--mint) 50%, var(--cool-cyan));
|
||||
--h3-color: var(--cool-cyan);
|
||||
--h4-color: color-mix(in srgb, var(--cool-cyan) 60%, var(--blue));
|
||||
--h5-color: color-mix(in srgb, var(--cool-cyan) 40%, var(--blue));
|
||||
--h6-color: var(--blue);
|
||||
}
|
||||
|
||||
.headers-gradient-blue-to-red {
|
||||
--h1-color: var(--light-blue);
|
||||
--h2-color: var(--blue);
|
||||
--h3-color: var(--violet);
|
||||
--h4-color: var(--purple);
|
||||
--h5-color: var(--magenta);
|
||||
--h6-color: var(--hot-red);
|
||||
}
|
||||
|
||||
.h1-accent {
|
||||
--h1-color: var(--color-accent) !important;
|
||||
}
|
||||
|
||||
.theme-dark {
|
||||
--black: #000;
|
||||
--white: #fff;
|
||||
|
||||
--mint: #52eea3;
|
||||
--cyan: #51e1e9;
|
||||
--cool-cyan: #43cfea;
|
||||
--light-blue: #54b6f8;
|
||||
--blue: #437cf3;
|
||||
--blue-violet: #6f51f4;
|
||||
--violet: #9446f8;
|
||||
--purple: #c952ed;
|
||||
--magenta: #e54f9b;
|
||||
--hot-red: #e3365e;
|
||||
--cool-gray: #515768;
|
||||
|
||||
--vauxhall-bg: hsl(var(--hue-bg), var(--sat-bg), var(--lum));
|
||||
--vauxhall-fg: hsl(var(--hue-fg), var(--sat-fg), 80%);
|
||||
|
||||
--color-red: var(--hot-red);
|
||||
--color-orange: #fa9f50;
|
||||
--color-yellow: #ffd85e;
|
||||
--color-green: var(--mint);
|
||||
--color-cyan: var(--cool-cyan);
|
||||
--color-blue: var(--blue);
|
||||
--color-purple: var(--violet);
|
||||
--color-pink: var(--magenta);
|
||||
|
||||
--background-primary: var(--color-base-00);
|
||||
--background-secondary: var(--color-base-05);
|
||||
--titlebar-background: var(--color-base-00);
|
||||
--titlebar-background-focused: var(--color-base-10);
|
||||
|
||||
--color-base-00: color-mix(in srgb, var(--vauxhall-bg) 25%, var(--black));
|
||||
--color-base-05: color-mix(in srgb, var(--vauxhall-bg) 40%, var(--black));
|
||||
--color-base-10: color-mix(in srgb, var(--vauxhall-bg) 50%, var(--black));
|
||||
--color-base-20: color-mix(in srgb, var(--vauxhall-bg) 80%, var(--black));
|
||||
--color-base-25: color-mix(in srgb, var(--vauxhall-bg) 80%, var(--black));
|
||||
--color-base-30: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 90%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-35: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 95%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-40: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 80%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-50: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 60%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-60: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 60%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-70: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 30%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-100: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 0%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
|
||||
--text-normal: color-mix(in srgb, var(--vauxhall-fg) 30%, var(--white));
|
||||
--background-modifier-form-field: var(--color-base-20);
|
||||
--background-modifier-hover: var(--color-base-35);
|
||||
|
||||
/* File Navigation Guides */
|
||||
--nav-indentation-guide-color: var(--color-base-30);
|
||||
|
||||
/* Indentation Guides for Lists */
|
||||
--indentation-guide-color: var(--color-base-30);
|
||||
--indentation-guide-color-active: var(--color-base-35);
|
||||
|
||||
--text-highlight-bg: color-mix(in srgb, var(--h1-color) 25%, transparent);
|
||||
--text-highlight-bg-active: color-mix(
|
||||
in srgb,
|
||||
var(--h1-color) 25%,
|
||||
transparent
|
||||
);
|
||||
--code-background: var(--color-base-25);
|
||||
}
|
||||
|
||||
.theme-light {
|
||||
--black: #000;
|
||||
--white: #fff;
|
||||
|
||||
--mint: #47cc91;
|
||||
--cyan: #47c1cd;
|
||||
--cool-cyan: #3bb2ce;
|
||||
--light-blue: #54b6f8;
|
||||
--blue: #437cf3;
|
||||
--blue-violet: #6f51f4;
|
||||
--violet: #9446f8;
|
||||
--purple: #c952ed;
|
||||
--magenta: #e54f9b;
|
||||
--hot-red: #e3365e;
|
||||
--cool-gray: #515768;
|
||||
|
||||
--vauxhall-bg: hsl(var(--hue-bg), var(--sat-bg), var(--lum-bg));
|
||||
--vauxhall-fg: hsl(var(--hue-fg), var(--sat-fg), var(--lum-fg));
|
||||
|
||||
--color-red: var(--hot-red);
|
||||
--color-orange: #fa9f50;
|
||||
--color-yellow: #ffd85e;
|
||||
--color-green: var(--mint);
|
||||
--color-cyan: var(--cool-cyan);
|
||||
--color-blue: var(--blue);
|
||||
--color-purple: var(--violet);
|
||||
--color-pink: var(--magenta);
|
||||
|
||||
--background-primary: var(--color-base-05);
|
||||
--background-secondary: var(--color-base-05);
|
||||
--titlebar-background: var(--color-base-00);
|
||||
--titlebar-background-focused: var(--color-base-10);
|
||||
|
||||
--color-base-00: color-mix(in srgb, var(--vauxhall-bg) 25%, var(--white));
|
||||
--color-base-05: color-mix(in srgb, var(--vauxhall-bg) 40%, var(--white));
|
||||
--color-base-10: color-mix(in srgb, var(--vauxhall-bg) 50%, var(--white));
|
||||
--color-base-20: color-mix(in srgb, var(--vauxhall-bg) 80%, var(--white));
|
||||
--color-base-25: color-mix(in srgb, var(--vauxhall-bg) 80%, var(--white));
|
||||
--color-base-30: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 90%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-35: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 95%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-40: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 80%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-50: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 60%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-60: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 60%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-70: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 30%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
--color-base-100: color-mix(
|
||||
in srgb,
|
||||
var(--vauxhall-bg) 0%,
|
||||
var(--vauxhall-fg)
|
||||
);
|
||||
|
||||
--text-normal: color-mix(in srgb, var(--vauxhall-fg) 50%, var(--black));
|
||||
--background-modifier-form-field: var(--color-base-20);
|
||||
--background-modifier-hover: var(--color-base-35);
|
||||
|
||||
/* File Navigation Guides */
|
||||
--nav-indentation-guide-color: var(--color-base-30);
|
||||
|
||||
/* Indentation Guides for Lists */
|
||||
--indentation-guide-color: var(--color-base-30);
|
||||
--indentation-guide-color-active: var(--color-base-35);
|
||||
|
||||
--text-highlight-bg: color-mix(in srgb, var(--h1-color) 25%, transparent);
|
||||
--text-highlight-bg-active: color-mix(
|
||||
in srgb,
|
||||
var(--h1-color) 25%,
|
||||
transparent
|
||||
);
|
||||
--code-background: var(--color-base-30);
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: 20px !important;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.markdown-preview-view img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.callout {
|
||||
border-radius: 12px;
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
.task-list-item-checkbox {
|
||||
border-width: 2px;
|
||||
}
|
||||
|
||||
.markdown-preview-view {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.document-search-container {
|
||||
border-bottom-left-radius: 6px;
|
||||
border-bottom-right-radius: 6px;
|
||||
border-color: var(--color-base-30);
|
||||
border-width: 1px;
|
||||
border-top-width: 0px;
|
||||
border-style: solid;
|
||||
/* box-shadow: var(--input-shadow); */
|
||||
}
|
||||
|
||||
.document-search-button {
|
||||
color: var(--color-base-100);
|
||||
}
|
||||
|
||||
.cg-note-toolbar-container {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.callout[data-callout="note-toolbar"] {
|
||||
box-shadow: none;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
/* input {
|
||||
color: var(--lavender) !important;
|
||||
} */
|
||||
|
||||
/* table {
|
||||
border-radius: 6px;
|
||||
border-width: 2px;
|
||||
border-style: solid;
|
||||
border-color: var(--color-base-30);
|
||||
} */
|
||||
Vendored
+243
@@ -0,0 +1,243 @@
|
||||
{
|
||||
"main": {
|
||||
"id": "c6b0dd92de6ebb05",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "f7a5877ff52c1a28",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "beae7decc3e25f02",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "Locations/The Rock of Bral.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "The Rock of Bral"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
},
|
||||
"left": {
|
||||
"id": "eb1e7a8139dcaeca",
|
||||
"type": "mobile-drawer",
|
||||
"children": [
|
||||
{
|
||||
"id": "306b26ad40f06b3e",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-explorer",
|
||||
"state": {
|
||||
"sortOrder": "alphabetical",
|
||||
"autoReveal": false
|
||||
},
|
||||
"icon": "lucide-folder-closed",
|
||||
"title": "Files"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "c0d4b82c0a9410cf",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "search",
|
||||
"state": {
|
||||
"query": "",
|
||||
"matchingCase": false,
|
||||
"explainSearch": false,
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical"
|
||||
},
|
||||
"icon": "lucide-search",
|
||||
"title": "Search"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ef0248516abb509e",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "tag",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"useHierarchy": true,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-tags",
|
||||
"title": "Tags"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "85bdad2a1e4508ba",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "all-properties",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-archive",
|
||||
"title": "All properties"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "bd0049b95c76ab1b",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "bookmarks",
|
||||
"state": {},
|
||||
"icon": "lucide-bookmark",
|
||||
"title": "Bookmarks"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 0
|
||||
},
|
||||
"right": {
|
||||
"id": "096cf959bc3ecb5a",
|
||||
"type": "mobile-drawer",
|
||||
"children": [
|
||||
{
|
||||
"id": "2f43ca9f45f06203",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
"showSearch": false,
|
||||
"searchQuery": "",
|
||||
"backlinkCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-coming-in",
|
||||
"title": "Backlinks"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "f77a69dd91215e90",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"file": "Factions/Dumathoins-Prospectors.md",
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-going-out",
|
||||
"title": "Outgoing links"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "d34c1adca5bc2e7b",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "Factions/Dumathoins-Prospectors.md",
|
||||
"followCursor": false,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-list",
|
||||
"title": "Outline"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "82883434b28c96af",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "DICE_ROLLER_VIEW",
|
||||
"state": {},
|
||||
"icon": "dices",
|
||||
"title": "Dice Tray"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "9edee1fcc15ed7e4",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "git-view",
|
||||
"state": {},
|
||||
"icon": "git-pull-request",
|
||||
"title": "Source Control"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 4
|
||||
},
|
||||
"left-ribbon": {
|
||||
"hiddenItems": {
|
||||
"switcher:Open quick switcher": false,
|
||||
"graph:Open graph view": false,
|
||||
"canvas:Create new canvas": false,
|
||||
"daily-notes:Open today's daily note": false,
|
||||
"templates:Insert template": false,
|
||||
"command-palette:Open command palette": false,
|
||||
"bases:Create new base": false,
|
||||
"obsidian-5e-statblocks:Open Creature pane": false,
|
||||
"obsidian-git:Open Git source control": false
|
||||
}
|
||||
},
|
||||
"active": "beae7decc3e25f02",
|
||||
"lastOpenFiles": [
|
||||
"Factions/Dragons.md",
|
||||
"Cosmology/Spelljamming and Travel.md",
|
||||
"Current-Events/Emerald-Neoji War.md",
|
||||
"Cosmology/Cosmology.md",
|
||||
"Locations/Vaardland.md",
|
||||
"Cosmology/Crystal Spheres.md",
|
||||
"Factions/Neoji Hegemony.md",
|
||||
"Factions/Emerald Armada.md",
|
||||
"Factions/Dumathoins Prospectors.md",
|
||||
"Factions/Yapa Clan Shipping.md",
|
||||
"Factions/Star Cogs.md",
|
||||
"Locations/The Temple of the Choir.md",
|
||||
"Factions/Regulators.md",
|
||||
"Current-Events/Nephil Refugee Immigration Program.md",
|
||||
"Factions/Itch.VD.md",
|
||||
"Notable Characters/The Heroes of Vaardland/Ernchaït Seawail.md",
|
||||
"Notable Characters/The Heroes of Vaardland/Burgell Schmurgle.md",
|
||||
"Notable Characters/The Heroes of Vaardland/Yvarië Galanodel.md",
|
||||
"Notable Characters/The Heroes of Vaardland/Detective Maletir.md",
|
||||
"Notable Characters/The Heroes of Vaardland/Bilgar of Hilgar.md",
|
||||
"Locations/Erythnul.md",
|
||||
"Notable Characters/Sharzak.md",
|
||||
"Locations/The Rock of Bral.md",
|
||||
"index.md",
|
||||
"/Factions/Regulators.md",
|
||||
"/Factions/Illithid.md",
|
||||
"/Factions",
|
||||
"/img/NewBurgell.webp",
|
||||
"img/NewBurgell.webp",
|
||||
"/img",
|
||||
"/Locations",
|
||||
"/History",
|
||||
"Notable Characters/The Heroes of Vaardland",
|
||||
"Notable Characters",
|
||||
"/Notable Characters/The Heroes of Vaardland",
|
||||
"/Notable Characters",
|
||||
"/NotableCharacters",
|
||||
"Untitled",
|
||||
"img/DumathoinsProspectorsIcon.png",
|
||||
"img/GreaterSphereMap.webp",
|
||||
"img/StarCog.png",
|
||||
"Cosmology/GreaterSphereMap.webp",
|
||||
"/img/StarCog.png",
|
||||
"/img/GreaterSphereMap.webp",
|
||||
"/img/DumathoinsProspectorsIcon.png",
|
||||
"/Cosmology/GreaterSphereMap.webp",
|
||||
"/The Greater Saggitarian Sphere.canvas",
|
||||
"The Greater Saggitarian Sphere.canvas"
|
||||
]
|
||||
}
|
||||
Vendored
+284
@@ -0,0 +1,284 @@
|
||||
{
|
||||
"main": {
|
||||
"id": "bd2201c098a0bc7a",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "e0b41c7abf7155d9",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "d0bc5a7cb21fde1f",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "Notable Characters/The Heroes of Vaardland/Ernchaït Seawail.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "Ernchaït Seawail"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
},
|
||||
"left": {
|
||||
"id": "8836837511f20339",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "069f616846a983e9",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "1ee23c6dd42d3a59",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-explorer",
|
||||
"state": {
|
||||
"sortOrder": "alphabetical",
|
||||
"autoReveal": false,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-folder-closed",
|
||||
"title": "Files"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "8eb3c20c290f38b0",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "search",
|
||||
"state": {
|
||||
"query": "Allorienne",
|
||||
"matchingCase": false,
|
||||
"explainSearch": false,
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical"
|
||||
},
|
||||
"icon": "lucide-search",
|
||||
"title": "Search"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "c5e11346f7acd0c1",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "bookmarks",
|
||||
"state": {},
|
||||
"icon": "lucide-bookmark",
|
||||
"title": "Bookmarks"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 278.5004348754883
|
||||
},
|
||||
"right": {
|
||||
"id": "bc76b3eb239009cb",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "916174a7ec47dd54",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "5f9b32759e0fefc2",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
"showSearch": false,
|
||||
"searchQuery": "",
|
||||
"backlinkCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-coming-in",
|
||||
"title": "Backlinks"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "dd539f0ce4fa129d",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-going-out",
|
||||
"title": "Outgoing links"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "e7f34d2222781ad4",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "tag",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"useHierarchy": true,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-tags",
|
||||
"title": "Tags"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "62991fd79ad80e60",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "all-properties",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-archive",
|
||||
"title": "All properties"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "c83637cf2e45815b",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outline",
|
||||
"state": {
|
||||
"file": "Locations/Vaardland.md",
|
||||
"followCursor": false,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-list",
|
||||
"title": "Outline of Vaardland"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "6a838b5dfdc3f5a7",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "DICE_ROLLER_VIEW",
|
||||
"state": {},
|
||||
"icon": "dices",
|
||||
"title": "Dice Tray"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "0f92b65c91437ba1",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-properties",
|
||||
"state": {
|
||||
"file": "Notable Characters/The Heroes of Vaardland/Ernchaït Seawail.md"
|
||||
},
|
||||
"icon": "lucide-info",
|
||||
"title": "File properties"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 6
|
||||
},
|
||||
{
|
||||
"id": "2caa40b15ae2de5a",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "f9b5968100fe4d78",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "fantasy-statblocks-creature-pane",
|
||||
"state": {},
|
||||
"icon": "skull",
|
||||
"title": "Combatant"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 318.5
|
||||
},
|
||||
"left-ribbon": {
|
||||
"hiddenItems": {
|
||||
"obsidian-git:Open Git source control": false,
|
||||
"switcher:Open quick switcher": false,
|
||||
"graph:Open graph view": false,
|
||||
"canvas:Create new canvas": false,
|
||||
"templates:Insert template": false,
|
||||
"daily-notes:Open today's daily note": false,
|
||||
"command-palette:Open command palette": false,
|
||||
"bases:Create new base": false,
|
||||
"obsidian-5e-statblocks:Open Creature pane": false,
|
||||
"obsidian-livesync:P2P Status": false,
|
||||
"obsidian-livesync:Replicate": false,
|
||||
"obsidian-livesync:Show Log": false,
|
||||
"obsidian-livesync:Show Customization sync": false,
|
||||
"quartz-syncer:Quartz Syncer publication center": false,
|
||||
"github-sync:Sync with Remote": false
|
||||
}
|
||||
},
|
||||
"active": "d0bc5a7cb21fde1f",
|
||||
"lastOpenFiles": [
|
||||
"Notable Characters/Sharzak.md",
|
||||
"Notable Characters/The Heroes of Vaardland/Detective Maletir.md",
|
||||
"Notable Characters/The Heroes of Vaardland/Burgell Schmurgle.md",
|
||||
"flag_rebuild.md",
|
||||
"Cosmology/Untitled.canvas",
|
||||
"Cosmology/Untitled.md",
|
||||
"img/galaxy-background.jpg",
|
||||
"Locations/The Rock of Bral.md",
|
||||
"Notable Characters/The Heroes of Vaardland/Yvarië Galanodel.md",
|
||||
"Notable Characters/The Heroes of Vaardland/Ernchaït Seawail.md",
|
||||
"Notable Characters/The Heroes of Vaardland/Bilgar of Hilgar.md",
|
||||
"Factions/Yapa Clan Shipping.md",
|
||||
"Factions/Star Cogs.md",
|
||||
"Factions/Neoji Hegemony.md",
|
||||
"Factions/Emerald Armada.md",
|
||||
"Factions/Dumathoins Prospectors.md",
|
||||
"Cosmology/Spelljamming and Travel.md",
|
||||
"Untitled.canvas",
|
||||
"Locations/Erythnul.md",
|
||||
"Locations/Cornucopia.md",
|
||||
"Locations/Lavos RST.md",
|
||||
"index.md",
|
||||
"Factions/Regulators.md",
|
||||
"Factions/Illithid.md",
|
||||
"Notable Characters/Adm. Allorienne Arandeiros.md",
|
||||
"Locations/Vaardland.md",
|
||||
"History/Recent History.md",
|
||||
"Burgle Schmurgle.md",
|
||||
"History/Ancient History.md",
|
||||
"img/NewBurgell.webp",
|
||||
"Notable Characters/The Heroes of Vaardland",
|
||||
"Notable Characters",
|
||||
"img/DumathoinsProspectorsIcon.png",
|
||||
"img/GreaterSphereMap.webp",
|
||||
"img/StarCog.png",
|
||||
"DumathoinsProspectorsIcon.png",
|
||||
"StarCog.png",
|
||||
"img",
|
||||
"Untitled Folder",
|
||||
"The Greater Saggitarian Sphere.canvas",
|
||||
"Cosmology/GreaterSagSphere.webp",
|
||||
"Locations",
|
||||
"Cosmology/Vaardspace.webp",
|
||||
"Cosmology/Milky Way Square.jpg",
|
||||
"Cosmology",
|
||||
"History",
|
||||
"Current-Events",
|
||||
"templates",
|
||||
"Factions"
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user