diff --git a/.obsidian/appearance.json b/.obsidian/appearance.json index b17b36a..8b6ba0a 100644 --- a/.obsidian/appearance.json +++ b/.obsidian/appearance.json @@ -3,5 +3,6 @@ "enabledCssSnippets": [ "supercharged-links-gen", "dataview-table-overflow" - ] + ], + "theme": "moonstone" } \ No newline at end of file diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index 2b4b928..9b07cbd 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -27,5 +27,7 @@ "settings-search", "recent-files-obsidian", "obsidian-plugin-update-tracker", - "obsidian-linter" + "obsidian-linter", + "lumberjack-obsidian", + "open-vscode" ] \ No newline at end of file diff --git a/.obsidian/plugins/cmdr/data.json b/.obsidian/plugins/cmdr/data.json index 4f49dd5..ea8fc89 100644 --- a/.obsidian/plugins/cmdr/data.json +++ b/.obsidian/plugins/cmdr/data.json @@ -50,8 +50,7 @@ "macros": [], "explorer": [], "hide": { - "statusbar": [], - "leftRibbon": [] + "statusbar": [] }, "spacing": 8, "advancedToolbar": { diff --git a/.obsidian/plugins/cmdr/main.js b/.obsidian/plugins/cmdr/main.js index 424709f..1c9f567 100644 --- a/.obsidian/plugins/cmdr/main.js +++ b/.obsidian/plugins/cmdr/main.js @@ -3,7 +3,7 @@ THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin (https://github.com/phibr0/obsidian-commander) */ -var He=Object.defineProperty,hn=Object.defineProperties,vn=Object.getOwnPropertyDescriptor,gn=Object.getOwnPropertyDescriptors,bn=Object.getOwnPropertyNames,Re=Object.getOwnPropertySymbols;var ut=Object.prototype.hasOwnProperty,Ut=Object.prototype.propertyIsEnumerable;var Vt=(t,o,e)=>o in t?He(t,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[o]=e,ze=(t,o)=>{for(var e in o||(o={}))ut.call(o,e)&&Vt(t,e,o[e]);if(Re)for(var e of Re(o))Ut.call(o,e)&&Vt(t,e,o[e]);return t},qt=(t,o)=>hn(t,gn(o));var Xt=(t,o)=>{var e={};for(var n in t)ut.call(t,n)&&o.indexOf(n)<0&&(e[n]=t[n]);if(t!=null&&Re)for(var n of Re(t))o.indexOf(n)<0&&Ut.call(t,n)&&(e[n]=t[n]);return e};var Cn=(t,o)=>{for(var e in o)He(t,e,{get:o[e],enumerable:!0})},_n=(t,o,e,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of bn(o))!ut.call(t,i)&&i!==e&&He(t,i,{get:()=>o[i],enumerable:!(n=vn(o,i))||n.enumerable});return t};var yn=t=>_n(He({},"__esModule",{value:!0}),t);var ai={};Cn(ai,{default:()=>st});module.exports=yn(ai);var Oe=require("obsidian");var ht=require("obsidian");var Jt={};var jt={};var Yt={};var $t={"Open Commander Settings":"Commander Einstellungen \xF6ffnen","Open Macro Builder":"Makro Baukasten \xF6ffnen","Change Icon":"Symbol ver\xE4ndern",Rename:"Umbenennen",Delete:"L\xF6schen","Add command":"Befehl hinzuf\xFCgen","Add new":"Neuen Befehl hinzuf\xFCgen","This Command seems to have been removed. {{command_name}}":"Dieser Befehl wurde entfernt. {{command_name}}","Choose a Command to add":"W\xE4hle einen Befehl zum hinzuf\xFCgen","to navigate":"zum navigieren","to choose an icon":"um ein symbol auszuw\xE4hlen","to cancel":"zum abbrechen","Use a custom name":"Nutze einen benutzerdefinierten Namen","Choose a custom Name for your new Command":"W\xE4hle einen benutzerdefinierten Namen f\xFCr deinen neuen Befehl","to save":"zum speichern","Choose a Icon for your new Command":"W\xE4hle ein Symbol f\xFCr deinen neuen Befehl","to choose a custom icon":"um ein benutzerdefiniertes Symbol auszuw\xE4hlen","Remove Command":"Befehl entfernen","Double click to rename":"Zum umbenennen doppelklicken","This device":"Dieses Ger\xE4t","Added by {{plugin_name}}.":"Hinzugef\xFCgt von {{plugin_name}}.","Warning: This is a checked Command, meaning it might not run under every circumstance.":"Warnung: Dieser Befehl wird nur unter bestimmten Vorraussetzungen ausgef\xFChrt.","Move down":"Nach unten","Move up":"Nach oben","Change Mode (Currently: {{current_mode}})":"Modus ver\xE4ndern (Momentan: {{current_mode}})","Are you sure you want to delete the Command?":"Bist du dir sicher, dass du diesen Befehl entfernen m\xF6chtest?","Remove and don't ask again":"Entfernen und Auswahl speichern",Remove:"Entfernen",Cancel:"Abbrechen","Always ask before removing?":"Immer fragen, bevor ein Befehl gel\xF6scht wird?","Always show a Popup to confirm deletion of a Command.":"Zeige immer ein Popup um L\xF6schen zu best\xE4tigen.",'Show "Add Command" Button':'Zeige "Befehl hinzuf\xFCgen" Knopf','Show the "Add Command" Button in every Menu. Requires restart.':'Zeige den "Befehl hinzuf\xFCgen" Knopf in jedem Men\xFC. Erfordert neustart.',"Please restart Obsidian for these changes to take effect.":"Bitte starte Obsidian neu, damit diese \xC4nderungen in Kraft treten.","Enable debugging":"Aktiviere debugging","Enable console output.":"Aktiviere Konsolen-Output (F\xFCr Entwickler)",General:"Allgemein","Editor Menu":"Editor-Men\xFC","File Menu":"Datei-Men\xFC","Left Ribbon":"Band","Right Ribbon":"Rechtes Band",Titlebar:"Titelleiste",Statusbar:"Statusleiste","Page Header":"Kopfzeile","Support development":"Entwicklung unterst\xFCtzen","No commands here!":"Keine Befehle da!","Would you like to add one now?":"M\xF6chtest du jetzt einen hinzuf\xFCgen?","Hide Commands":"Befehle verstecken","Choose new":"W\xE4hle neu","Hide Commands of other Plugins":"Hide Commands of other Plugins",Icon:"Symbol",Name:"Name","Custom Name":"Benutzerdefinierter Name","Add command to all devices":"F\xFCge Befehl allen Ger\xE4ten hinzu","Add command only to mobile devices":"F\xFCge Befehl nur Mobilen Ger\xE4ten hinzu","Add command only to desktop devices":"F\xFCge Befehl nur Desktop Ger\xE4ten hinzu","Add command only to this device":"F\xFCge Befehl nur diesem Ger\xE4t hinzu",Done:"Fertig","By Johnny\u2728 and phibr0":"Von Johnny\u2728 und phibr0","Leave feedback":"Feedback geben",Donate:"Spenden","Share feedback, issues, and ideas with our feedback form.":"Teile Feedback, Probleme und Ideen mit unserem Feedback Formular!","Consider donating to support development.":"Spende um die Entwicklung zu unterst\xFCtzen.",Save:"Speichern","This Command is not available on this device.":"Dieser Befehl ist auf diesem Ger\xE4t nicht verf\xFCgbar.",Show:"Anzeigen",Hide:"Verstecken","Hide other Commands":"Andere Befehle verstecken","Double click to enter custom value":"Doppelklicken um eigenen Wert einzutragen","Choose custom spacing for Command Buttons":"W\xE4hle den Abstand zwischen Befehlen","Change the spacing between commands. You can set different values on mobile and desktop.":"Ver\xE4ndert den Abstand zwischen Befehlen.",Warning:"Achtung","As of Obsidian 0.16.0 you need to explicitly enable the View Header.":'Ab Obsidian Version 0.16.0 m\xFCssen Sie den "View Header" explizit aktivieren. Anschlie\xDFend muss Obsidian neugestartet werden.',"Open Appearance Settings":"\xD6ffne Darstellungs-Einstellungen",Explorer:"Explorer"};var pt={"Open Commander Settings":"Open Commander Settings","Open Macro Builder":"Open Macro Builder","Change Icon":"Change Icon",Rename:"Rename",Delete:"Delete","Add command":"Add command","Add new":"Add new command","This Command seems to have been removed. {{command_name}}":"This Command seems to have been removed. {{command_name}}","Choose a Command to add":"Choose a Command to add","to navigate":"to navigate","to choose an icon":"to choose an icon","to cancel":"to cancel","Use a custom name":"Use a custom name","Choose a custom Name for your new Command":"Choose a custom Name for your new Command","to save":"to save","Choose a Icon for your new Command":"Choose a Icon for your new Command","to choose a custom icon":"to choose a custom icon","Remove Command":"Remove Command","Double click to rename":"Double click to rename","This device":"This device","Added by {{plugin_name}}.":"Added by {{plugin_name}}.","Warning: This is a checked Command, meaning it might not run under every circumstance.":"Warning: This is a checked Command, meaning it might not run under every circumstance.","Move down":"Move down","Move up":"Move up","Change Mode (Currently: {{current_mode}})":"Change Mode (Currently: {{current_mode}})","Are you sure you want to delete the Command?":"Are you sure you want to delete the Command?","Remove and don't ask again":"Remove and don't ask again",Remove:"Remove",Cancel:"Cancel","Always ask before removing?":"Always ask before removing?","Always show a Popup to confirm deletion of a Command.":"Always show a Popup to confirm deletion of a Command.",'Show "Add Command" Button':'Show "Add Command" Button','Show the "Add Command" Button in every Menu. Requires restart.':'Show the "Add Command" Button in every Menu. Requires restart.',"Please restart Obsidian for these changes to take effect.":"Please restart Obsidian for these changes to take effect.","Enable debugging":"Enable debugging","Enable console output.":"Enable console output.",General:"General","Editor Menu":"Editor Menu","File Menu":"File Menu","Left Ribbon":"Ribbon","Right Ribbon":"Right Ribbon",Titlebar:"Titlebar",Statusbar:"Status Bar","Page Header":"Tab Bar","Support development":"Support development","No commands here!":"No commands here!","Would you like to add one now?":"Would you like to add one now?","Hide Commands":"Hide Commands","Choose new":"Choose new","Hide Commands of other Plugins":"Hide Commands of other Plugins",Icon:"Icon",Name:"Name","Custom Name":"Custom Name","Add command to all devices":"Add command to all devices","Add command only to mobile devices":"Add command only to mobile devices","Add command only to desktop devices":"Add command only to desktop devices","Add command only to this device":"Add command only to this device",Done:"Done","By Johnny\u2728 and phibr0":"By Johnny\u2728 and phibr0","Leave feedback":"Leave feedback",Donate:"Donate","Share feedback, issues, and ideas with our feedback form.":"Share feedback, issues, and ideas with our feedback form.","Consider donating to support development.":"Consider donating to support development.",Save:"Save","This Command is not available on this device.":"This Command is not available on this device.",Show:"Show",Hide:"Hide","Hide other Commands":"Hide other Commands","Double click to enter custom value":"Double click to enter custom value","Choose custom spacing for Command Buttons":"Choose custom spacing for Command Buttons","Change the spacing between commands. You can set different values on mobile and desktop.":"Change the spacing between commands.",Warning:"Warning","As of Obsidian 0.16.0 you need to explicitly enable the View Header.":"As of Obsidian 0.16.0 you need to explicitly enable the Tab Title Bar. Once enabled, you might need to restart Obsidian.","Open Appearance Settings":"Open Appearance Settings",Explorer:"Explorer"};var Zt={};var Gt={};var Kt={};var Qt={};var eo={};var to={};var oo={};var no={};var io={};var ao={};var ro={};var so={};var co={};var mo={};var lo={};var uo={};var po={"Open Commander Settings":"\u6253\u5F00 Commander \u8BBE\u7F6E","Open Macro Builder":"\u6253\u5F00\u5B8F\u6307\u4EE4\u751F\u6210\u5668","Change Icon":"\u66F4\u6362\u56FE\u6807",Rename:"\u91CD\u547D\u540D",Delete:"\u5220\u9664","Add command":"\u6DFB\u52A0\u547D\u4EE4","Add new":"\u6DFB\u52A0\u65B0\u547D\u4EE4","This Command seems to have been removed. {{command_name}}":"\u8BE5\u547D\u4EE4\u4F3C\u4E4E\u5DF2\u88AB\u79FB\u9664\u3002{{command_name}}","Choose a Command to add":"\u9009\u62E9\u4E00\u4E2A\u547D\u4EE4\u5E76\u6DFB\u52A0","to navigate":"\u5BFC\u822A","to choose an icon":"\u9009\u4E2D\u4E00\u4E2A\u56FE\u6807","to cancel":"\u53D6\u6D88","Use a custom name":"\u4F7F\u7528\u4E00\u4E2A\u81EA\u5B9A\u4E49\u540D\u79F0","Choose a custom Name for your new Command":"\u4E3A\u4F60\u7684\u65B0\u547D\u4EE4\u9009\u62E9\u4E00\u4E2A\u81EA\u5B9A\u4E49\u540D\u79F0","to save":"\u4FDD\u5B58","Choose a Icon for your new Command":"\u4E3A\u4F60\u7684\u65B0\u547D\u4EE4\u9009\u62E9\u4E00\u4E2A\u56FE\u6807","to choose a custom icon":"\u9009\u62E9\u4E00\u4E2A\u81EA\u5B9A\u4E49\u56FE\u6807","Remove Command":"\u79FB\u9664\u547D\u4EE4","Double click to rename":"\u53CC\u51FB\u4EE5\u91CD\u547D\u540D","This device":"\u8BE5\u8BBE\u5907","Added by {{plugin_name}}.":"\u7531{{plugin_name}}\u6DFB\u52A0\u3002","Warning: This is a checked Command, meaning it might not run under every circumstance.":"\u8B66\u544A\uFF1A\u8FD9\u662F\u4E00\u4E2A\u53D7\u68C0\u7684\u547D\u4EE4\uFF0C\u8FD9\u610F\u5473\u7740\u5B83\u672A\u5FC5\u80FD\u5728\u6240\u4EE5\u73AF\u5883\u4E0B\u8FD0\u884C\u3002","Move down":"\u5411\u4E0B\u79FB\u52A8","Move up":"\u5411\u4E0A\u79FB\u52A8","Change Mode (Currently: {{current_mode}})":"\u5207\u6362\u6A21\u5F0F\uFF08\u5F53\u524D\uFF1A{{current_mode}}\uFF09","Are you sure you want to delete the Command?":"\u662F\u5426\u786E\u8BA4\u79FB\u9664\u8BE5\u547D\u4EE4\uFF1F","Remove and don't ask again":"\u79FB\u9664\u4E14\u4E0D\u8981\u518D\u8BE2\u95EE",Remove:"\u79FB\u9664",Cancel:"\u53D6\u6D88","Always ask before removing?":"\u5728\u79FB\u9664\u524D\u603B\u662F\u8BE2\u95EE\uFF1F","Always show a Popup to confirm deletion of a Command.":"\u5728\u786E\u8BA4\u79FB\u9664\u547D\u4EE4\u524D\u603B\u662F\u5F39\u7A97\u3002",'Show "Add Command" Button':"\u663E\u793A\u201C\u6DFB\u52A0\u547D\u4EE4\u201D\u6309\u94AE",'Show the "Add Command" Button in every Menu. Requires restart.':"\u5728\u6BCF\u4E2A\u83DC\u5355\u90FD\u5C55\u793A\u201C\u6DFB\u52A0\u547D\u4EE4\u201D\u6309\u94AE\u3002\u9700\u8981\u91CD\u542F\u3002","Please restart Obsidian for these changes to take effect.":"\u8BF7\u91CD\u542F Obsidian \u4EE5\u4F7F\u8FD9\u4E9B\u66F4\u6539\u751F\u6548\u3002","Enable debugging":"\u542F\u7528\u9664\u9519","Enable console output.":"\u542F\u7528\u63A7\u5236\u53F0\u8F93\u51FA\u3002",General:"\u901A\u7528","Editor Menu":"\u7F16\u8F91\u5668\u83DC\u5355","File Menu":"\u6587\u4EF6\u83DC\u5355","Left Ribbon":"\u5DE6\u4FA7\u8FB9\u680F","Right Ribbon":"\u53F3\u4FA7\u8FB9\u680F",Titlebar:"\u6807\u9898\u680F",Statusbar:"\u72B6\u6001\u680F","Page Header":"\u9875\u9996","Support development":"\u652F\u6301\u5F00\u53D1","No commands here!":"\u8FD9\u91CC\u6CA1\u6709\u547D\u4EE4\uFF01","Would you like to add one now?":"\u4F60\u73B0\u5728\u60F3\u8981\u52A0\u4E00\u4E2A\u5417\uFF1F","Hide Commands":"\u9690\u85CF\u547D\u4EE4","Choose new":"\u9009\u62E9\u65B0\u7684","Hide Commands of other Plugins":"\u9690\u85CF\u5176\u4ED6\u63D2\u4EF6\u7684\u547D\u4EE4",Icon:"\u56FE\u6807",Name:"\u540D\u79F0","Custom Name":"\u81EA\u5B9A\u4E49\u540D\u79F0","Add command to all devices":"\u5411\u6240\u6709\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to mobile devices":"\u53EA\u5411\u79FB\u52A8\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to desktop devices":"\u53EA\u5411\u684C\u9762\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to this device":"\u53EA\u5411\u5F53\u524D\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4",Done:"\u5B8C\u6210","By Johnny\u2728 and phibr0":"\u7531 Johnny\u2728 \u548C phibr0 \u5F00\u53D1","Leave feedback":"\u7559\u4E0B\u53CD\u9988",Donate:"\u6350\u8D60","Share feedback, issues, and ideas with our feedback form.":"\u4EE5\u6211\u4EEC\u7684\u53CD\u9988\u8868\uFF0C\u5206\u4EAB\u53CD\u9988\u3001\u8BAE\u9898\u6216\u8005\u4F60\u7684\u60F3\u6CD5\u3002","Consider donating to support development.":"\u8003\u8651\u6350\u8D60\u4EE5\u652F\u6301\u5F00\u53D1\u3002",Save:"\u4FDD\u5B58","This Command is not available on this device.":"\u8FD9\u4E00\u547D\u4EE4\u5728\u5F53\u524D\u8BBE\u5907\u4E0D\u53EF\u7528\u3002",Show:"\u663E\u793A",Hide:"\u9690\u85CF","Hide other Commands":"\u9690\u85CF\u5176\u4F59\u547D\u4EE4","Double click to enter custom value":"\u53CC\u51FB\u4EE5\u6DFB\u52A0\u81EA\u5B9A\u4E49\u503C","Choose custom spacing for Command Buttons":"\u4E3A\u547D\u4EE4\u6309\u94AE\u9009\u62E9\u81EA\u5B9A\u4E49\u95F4\u8DDD","Change the spacing between commands. You can set different values on mobile and desktop.":"\u6539\u53D8\u547D\u4EE4\u4E4B\u95F4\u7684\u95F4\u8DDD\u3002\u4F60\u53EF\u4EE5\u4E3A\u79FB\u52A8\u548C\u684C\u9762\u8BBE\u5907\u8BBE\u7F6E\u4E0D\u540C\u7684\u503C\u3002"};var fo={};var Xn={ar:Jt,cs:jt,da:Yt,de:$t,en:pt,"en-gb":Zt,es:Gt,fr:Kt,hi:Qt,id:eo,it:to,ja:oo,ko:no,nl:io,nn:ao,pl:ro,pt:so,"pt-br":co,ro:mo,ru:lo,tr:uo,"zh-cn":po,"zh-tw":fo},ft=Xn[ht.moment.locale()];function m(t){return ft||console.error("Error: dictionary locale not found",ht.moment.locale()),ft&&ft[t]||pt[t]}var ne=class extends Oe.FuzzySuggestModal{constructor(e){super(app);this.plugin=e,this.commands=Object.values(app.commands.commands),this.setPlaceholder(m("Choose a Command to add")),this.setInstructions([{command:"\u2191\u2193",purpose:m("to navigate")},{command:"\u21B5",purpose:m("to choose an icon")},{command:"esc",purpose:m("to cancel")}])}async awaitSelection(){return this.open(),new Promise((e,n)=>{this.onChooseItem=i=>e(i),this.onClose=()=>window.setTimeout(()=>n("No Command selected"),0)})}renderSuggestion(e,n){if(n.addClass("mod-complex"),n.createDiv({cls:"suggestion-content"}).createDiv({cls:"suggestion-title"}).setText(e.item.name),e.item.icon){let r=n.createDiv({cls:"suggestion-aux"});(0,Oe.setIcon)(r.createSpan({cls:"suggestion-flair"}),e.item.icon)}}getItems(){return this.commands}getItemText(e){return e.name}onChooseItem(e,n){}};var ho={confirmDeletion:!0,showAddCommand:!0,debug:!1,editorMenu:[],fileMenu:[],leftRibbon:[],rightRibbon:[],titleBar:[],statusBar:[],pageHeader:[],macros:[],explorer:[],hide:{statusbar:[],leftRibbon:[]},spacing:8,advancedToolbar:{rowHeight:48,rowCount:1,spacing:0,buttonWidth:48,columnLayout:!1,mappedIcons:[],tooltips:!1,heightOffset:0}},vo=["activity","airplay","alarm-check","alarm-clock-off","alarm-clock","alarm-minus","alarm-plus","album","alert-circle","alert-octagon","alert-triangle","align-center-horizontal","align-center-vertical","align-center","align-end-horizontal","align-end-vertical","align-horizontal-distribute-center","align-horizontal-distribute-end","align-horizontal-distribute-start","align-horizontal-justify-center","align-horizontal-justify-end","align-horizontal-justify-start","align-horizontal-space-around","align-horizontal-space-between","align-justify","align-left","align-right","align-start-horizontal","align-start-vertical","align-vertical-distribute-center","align-vertical-distribute-end","align-vertical-distribute-start","align-vertical-justify-center","align-vertical-justify-end","align-vertical-justify-start","align-vertical-space-around","align-vertical-space-between","anchor","aperture","archive","arrow-big-down","arrow-big-left","arrow-big-right","arrow-big-up","arrow-down-circle","arrow-down-left","arrow-down-right","arrow-down","arrow-left-circle","arrow-left-right","arrow-left","arrow-right-circle","arrow-right","arrow-up-circle","arrow-up-left","arrow-up-right","arrow-up","asterisk","at-sign","award","axe","banknote","bar-chart-2","bar-chart","baseline","battery-charging","battery-full","battery-low","battery-medium","battery","beaker","bell-minus","bell-off","bell-plus","bell-ring","bell","bike","binary","bitcoin","bluetooth-connected","bluetooth-off","bluetooth-searching","bluetooth","bold","book-open","book","bookmark-minus","bookmark-plus","bookmark","bot","box-select","box","briefcase","brush","bug","building-2","building","bus","calculator","calendar","camera-off","camera","car","carrot","cast","check-circle-2","check-circle","check-square","check","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","chevrons-down-up","chevrons-down","chevrons-left","chevrons-right","chevrons-up-down","chevrons-up","chrome","circle-slashed","circle","clipboard-check","clipboard-copy","clipboard-list","clipboard-x","clipboard","clock-1","clock-10","clock-11","clock-12","clock-2","clock-3","clock-4","clock-5","clock-6","clock-7","clock-8","clock-9","lucide-clock","cloud-drizzle","cloud-fog","cloud-hail","cloud-lightning","cloud-moon","cloud-off","cloud-rain-wind","cloud-rain","cloud-snow","cloud-sun","lucide-cloud","cloudy","clover","code-2","code","codepen","codesandbox","coffee","coins","columns","command","compass","contact","contrast","cookie","copy","copyleft","copyright","corner-down-left","corner-down-right","corner-left-down","corner-left-up","corner-right-down","corner-right-up","corner-up-left","corner-up-right","cpu","credit-card","crop","lucide-cross","crosshair","crown","currency","database","delete","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","disc","divide-circle","divide-square","divide","dollar-sign","download-cloud","download","dribbble","droplet","droplets","drumstick","edit-2","edit-3","edit","egg","equal-not","equal","eraser","euro","expand","external-link","eye-off","eye","facebook","fast-forward","feather","figma","file-check-2","file-check","file-code","file-digit","file-input","file-minus-2","file-minus","file-output","file-plus-2","file-plus","file-search","file-text","file-x-2","file-x","file","files","film","filter","flag-off","flag-triangle-left","flag-triangle-right","flag","flame","flashlight-off","flashlight","flask-conical","flask-round","folder-minus","folder-open","folder-plus","lucide-folder","form-input","forward","frame","framer","frown","function-square","gamepad-2","gamepad","gauge","gavel","gem","ghost","gift","git-branch-plus","git-branch","git-commit","git-fork","git-merge","git-pull-request","github","gitlab","glasses","globe-2","globe","grab","graduation-cap","grid","grip-horizontal","grip-vertical","hammer","hand-metal","hand","hard-drive","hard-hat","hash","haze","headphones","heart","help-circle","hexagon","highlighter","history","home","image-minus","image-off","image-plus","image","import","inbox","indent","indian-rupee","infinity","lucide-info","inspect","instagram","italic","japanese-yen","key","keyboard","landmark","lucide-languages","laptop-2","laptop","lasso-select","lasso","layers","layout-dashboard","layout-grid","layout-list","layout-template","layout","library","life-buoy","lightbulb-off","lightbulb","link-2-off","link-2","lucide-link","linkedin","list-checks","list-minus","list-ordered","list-plus","list-x","list","loader-2","loader","locate-fixed","locate-off","locate","lock","log-in","log-out","mail","map-pin","map","maximize-2","maximize","megaphone","meh","menu","message-circle","message-square","mic-off","mic","minimize-2","minimize","minus-circle","minus-square","minus","monitor-off","monitor-speaker","monitor","moon","more-horizontal","more-vertical","mountain-snow","mountain","mouse-pointer-2","mouse-pointer-click","mouse-pointer","mouse","move-diagonal-2","move-diagonal","move-horizontal","move-vertical","move","music","navigation-2","navigation","network","octagon","option","outdent","package-check","package-minus","package-plus","package-search","package-x","package","palette","palmtree","paperclip","pause-circle","pause-octagon","pause","pen-tool","lucide-pencil","percent","person-standing","phone-call","phone-forwarded","phone-incoming","phone-missed","phone-off","phone-outgoing","phone","pie-chart","piggy-bank","lucide-pin","pipette","plane","play-circle","play","plug-zap","plus-circle","plus-square","plus","pocket","podcast","pointer","pound-sterling","power-off","power","printer","qr-code","quote","radio-receiver","radio","redo","refresh-ccw","refresh-cw","regex","repeat-1","repeat","reply-all","reply","rewind","rocket","rocking-chair","rotate-ccw","rotate-cw","rss","ruler","russian-ruble","save","scale","scan-line","scan","scissors","screen-share-off","screen-share","lucide-search","send","separator-horizontal","separator-vertical","server-crash","server-off","server","settings-2","settings","share-2","share","sheet","shield-alert","shield-check","shield-close","shield-off","shield","shirt","shopping-bag","shopping-cart","shovel","shrink","shuffle","sidebar-close","sidebar-open","sidebar","sigma","signal-high","signal-low","signal-medium","signal-zero","signal","skip-back","skip-forward","skull","slack","slash","sliders","smartphone-charging","smartphone","smile","snowflake","sort-asc","sort-desc","speaker","sprout","square","star-half","lucide-star","stop-circle","stretch-horizontal","stretch-vertical","strikethrough","subscript","sun","sunrise","sunset","superscript","swiss-franc","switch-camera","table","tablet","tag","target","tent","terminal-square","terminal","text-cursor-input","text-cursor","thermometer-snowflake","thermometer-sun","thermometer","thumbs-down","thumbs-up","ticket","timer-off","timer-reset","timer","toggle-left","toggle-right","tornado","trash-2","lucide-trash","trello","trending-down","trending-up","triangle","truck","tv-2","tv","twitch","twitter","type","umbrella","underline","undo","unlink-2","unlink","unlock","upload-cloud","upload","user-check","user-minus","user-plus","user-x","user","users","verified","vibrate","video-off","video","view","voicemail","volume-1","volume-2","volume-x","volume","wallet","wand","watch","waves","webcam","wifi-off","wifi","wind","wrap-text","wrench","x-circle","x-octagon","x-square","x","youtube","zap-off","zap","zoom-in","zoom-out","search-large"];var Fe=require("obsidian");var D=class extends Fe.FuzzySuggestModal{constructor(e){super(app);this.plugin=e,this.setPlaceholder(m("Choose a Icon for your new Command")),this.setInstructions([{command:"\u2191\u2193",purpose:m("to navigate")},{command:"\u21B5",purpose:m("to choose a custom icon")},{command:"esc",purpose:m("to cancel")}])}async awaitSelection(){return this.open(),new Promise((e,n)=>{this.onChooseItem=i=>e(i),this.onClose=()=>window.setTimeout(()=>n("No Icon selected"),0)})}renderSuggestion(e,n){n.addClass("mod-complex"),n.createDiv({cls:"suggestion-content"}).createDiv({cls:"suggestion-title"}).setText(e.item.replace(/-/g," ").replace(/(^\w{1})|(\s+\w{1})/g,c=>c.toUpperCase()));let r=n.createDiv({cls:"suggestion-aux"});(0,Fe.setIcon)(r.createSpan({cls:"suggestion-flair"}),e.item)}getItems(){return vo}getItemText(e){return e}onChooseItem(e,n){}};var Ge=require("obsidian");var go=require("obsidian");var U=class extends go.SuggestModal{constructor(e){super(app);this.defaultName=e;this.setPlaceholder(m("Use a custom name")),this.resultContainerEl.style.display="none",this.setInstructions([{command:"",purpose:m("Choose a custom Name for your new Command")},{command:"\u21B5",purpose:m("to save")},{command:"esc",purpose:m("to cancel")}])}onOpen(){var i;super.onOpen(),this.inputEl.value=this.defaultName;let e=createDiv({cls:"cmdr-name-input-wrapper"});(i=this.inputEl.parentNode)==null||i.insertBefore(e,this.inputEl),e.appendChild(this.inputEl),e.parentElement.style.display="block";let n=createEl("button",{text:m("Save"),cls:"mod-cta"});n.onclick=r=>this.selectSuggestion(this.inputEl.value,r),e.appendChild(n)}async awaitSelection(){return this.open(),new Promise((e,n)=>{this.onChooseSuggestion=i=>e(i),this.onClose=()=>window.setTimeout(()=>n("No Name selected"),0)})}getSuggestions(e){return[e]}renderSuggestion(e,n){}onChooseSuggestion(e,n){}};var Je,y,wo,Jn,we,bo,ko,Ue={},Mo=[],jn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ie(t,o){for(var e in o)t[e]=o[e];return t}function Io(t){var o=t.parentNode;o&&o.removeChild(t)}function a(t,o,e){var n,i,r,c={};for(r in o)r=="key"?n=o[r]:r=="ref"?i=o[r]:c[r]=o[r];if(arguments.length>2&&(c.children=arguments.length>3?Je.call(arguments,2):e),typeof t=="function"&&t.defaultProps!=null)for(r in t.defaultProps)c[r]===void 0&&(c[r]=t.defaultProps[r]);return We(t,c,n,i,null)}function We(t,o,e,n,i){var r={type:t,props:o,key:e,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++wo:i};return i==null&&y.vnode!=null&&y.vnode(r),r}function R(t){return t.children}function Ve(t,o){this.props=t,this.context=o}function ke(t,o){if(o==null)return t.__?ke(t.__,t.__.__k.indexOf(t)+1):null;for(var e;o0?We(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)!=null){if(f.__=e,f.__b=e.__b+1,(v=_[s])===null||v&&f.key==v.key&&f.type===v.type)_[s]=void 0;else for(g=0;g=e.__.length&&e.__.push({__V:je}),e.__[t]}function O(t){return $e=1,Gn(Uo,t)}function Gn(t,o,e){var n=Ze(Me++,2);if(n.t=t,!n.__c&&(n.__=[e?e(o):Uo(void 0,o),function(r){var c=n.__N?n.__N[0]:n.__[0],u=n.t(c,r);c!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=z,!z.u)){z.u=!0;var i=z.shouldComponentUpdate;z.shouldComponentUpdate=function(r,c,u){if(!n.__c.__H)return!0;var l=n.__c.__H.__.filter(function(s){return s.__c});if(l.every(function(s){return!s.__N}))return!i||i.call(this,r,c,u);var h=!1;return l.forEach(function(s){if(s.__N){var g=s.__[0];s.__=s.__N,s.__N=void 0,g!==s.__[0]&&(h=!0)}}),!(!h&&n.__c.props===r)&&(!i||i.call(this,r,c,u))}}return n.__N||n.__}function q(t,o){var e=Ze(Me++,3);!y.__s&&yt(e.__H,o)&&(e.__=t,e.i=o,z.__H.__h.push(e))}function Vo(t,o){var e=Ze(Me++,4);!y.__s&&yt(e.__H,o)&&(e.__=t,e.i=o,z.__h.push(e))}function ee(t){return $e=5,_t(function(){return{current:t}},[])}function _t(t,o){var e=Ze(Me++,7);return yt(e.__H,o)?(e.__V=t(),e.i=o,e.__h=t,e.__V):e.__}function Kn(){for(var t;t=Wo.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ye),t.__H.__h.forEach(Ct),t.__H.__h=[]}catch(o){t.__H.__h=[],y.__e(o,t.__v)}}y.__b=function(t){z=null,Do&&Do(t)},y.__r=function(t){Ro&&Ro(t),Me=0;var o=(z=t.__c).__H;o&&(bt===z?(o.__h=[],z.__h=[],o.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=je,e.__N=e.i=void 0})):(o.__h.forEach(Ye),o.__h.forEach(Ct),o.__h=[])),bt=z},y.diffed=function(t){Ho&&Ho(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(Wo.push(o)!==1&&Bo===y.requestAnimationFrame||((Bo=y.requestAnimationFrame)||Qn)(Kn)),o.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==je&&(e.__=e.__V),e.i=void 0,e.__V=je})),bt=z=null},y.__c=function(t,o){o.some(function(e){try{e.__h.forEach(Ye),e.__h=e.__h.filter(function(n){return!n.__||Ct(n)})}catch(n){o.some(function(i){i.__h&&(i.__h=[])}),o=[],y.__e(n,e.__v)}}),zo&&zo(t,o)},y.unmount=function(t){Oo&&Oo(t);var o,e=t.__c;e&&e.__H&&(e.__H.__.forEach(function(n){try{Ye(n)}catch(i){o=i}}),e.__H=void 0,o&&y.__e(o,e.__v))};var Fo=typeof requestAnimationFrame=="function";function Qn(t){var o,e=function(){clearTimeout(n),Fo&&cancelAnimationFrame(o),setTimeout(t)},n=setTimeout(e,100);Fo&&(o=requestAnimationFrame(e))}function Ye(t){var o=z,e=t.__c;typeof e=="function"&&(t.__c=void 0,e()),z=o}function Ct(t){var o=z;t.__c=t.__(),z=o}function yt(t,o){return!t||t.length!==o.length||o.some(function(e,n){return e!==t[n]})}function Uo(t,o){return typeof o=="function"?o(t):o}var wt={};(function t(o,e,n,i){var r=!!(o.Worker&&o.Blob&&o.Promise&&o.OffscreenCanvas&&o.OffscreenCanvasRenderingContext2D&&o.HTMLCanvasElement&&o.HTMLCanvasElement.prototype.transferControlToOffscreen&&o.URL&&o.URL.createObjectURL);function c(){}function u(p){var d=e.exports.Promise,S=d!==void 0?d:o.Promise;return typeof S=="function"?new S(p):(p(c,c),null)}var l=function(){var p=Math.floor(16.666666666666668),d,S,M={},T=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(d=function(E){var I=Math.random();return M[I]=requestAnimationFrame(function x(B){T===B||T+p-1{r.current.style.setProperty("--icon-size",`${o}px`),(0,Ge.setIcon)(r.current,t)},[t,o]),a("div",ze({ref:r},e))}function $(t){let{isMobile:o,appId:e}=app;return t==="any"||t===e||t==="mobile"&&o||t==="desktop"&&!o}function Ke(t){var e;let o="";for(let n of t.hide.statusbar)o+=`div.status-bar-item.plugin-${n} {display: none !important; content-visibility: hidden;}`;for(let n of t.hide.leftRibbon)o+=`div.side-dock-ribbon-action[aria-label="${n}"] {display: none !important; content-visibility: hidden;}`;(e=document.head.querySelector("style#cmdr"))==null||e.remove(),o&&document.head.appendChild(createEl("style",{attr:{id:"cmdr"},text:o,type:"text/css"}))}async function kt({target:t}){let o=activeDocument.createElement("canvas");activeDocument.body.appendChild(o),o.style.position="fixed",o.style.width="100vw",o.style.height="100vh",o.style.top="0px",o.style.left="0px",o.style["pointer-events"]="none",o.style["z-index"]="100";let e=qo.create(o,{resize:!0,useWorker:!0}),n=t.getBoundingClientRect();await e({particleCount:Ge.Platform.isDesktop?160:80,startVelocity:55,spread:75,angle:90,drift:-1,ticks:250,origin:{x:(n.x+n.width/2)/activeWindow.innerWidth,y:(n.y+n.height/2)/activeWindow.innerHeight}}),o.remove()}function Qe(t){activeDocument.body.style.setProperty("--cmdr-spacing",`${t}px`)}function Ie(t){let o=Object.keys(app.commands.commands).filter(n=>n.startsWith("cmdr:macro-"));for(let n of o)app.commands.removeCommand(n);let e=t.settings.macros;for(let[n,i]of Object.entries(e))t.addCommand({id:`macro-${n}`,name:i.name,callback:()=>{t.executeMacro(parseInt(n))}})}function oe(t){var n,i;let{classList:o,style:e}=document.body;e.setProperty("--at-button-height",((n=t.rowHeight)!=null?n:48)+"px"),e.setProperty("--at-button-width",((i=t.buttonWidth)!=null?i:48)+"px"),e.setProperty("--at-row-count",t.rowCount.toString()),e.setProperty("--at-spacing",t.spacing+"px"),e.setProperty("--at-offset",t.heightOffset+"px"),o.toggle("AT-multirow",t.rowCount>1),o.toggle("AT-row",!t.columnLayout),o.toggle("AT-column",t.columnLayout),o.toggle("AT-no-toolbar",t.rowCount===0)}function Xo(){let{classList:t,style:o}=document.body;o.removeProperty("--at-button-height"),o.removeProperty("--at-button-width"),o.removeProperty("--at-row-count"),o.removeProperty("--at-spacing"),o.removeProperty("--at-offset"),t.remove("AT-multirow"),t.remove("AT-row"),t.remove("AT-column"),t.remove("AT-no-toolbar"),t.remove("advanced-toolbar")}function et(t){t.mappedIcons.forEach(o=>{let e=app.commands.commands[o.commandID];e?e.icon=o.iconID:t.mappedIcons.remove(o)})}var rn=require("obsidian");var xe=require("obsidian");var jo=require("obsidian");function Jo({modal:t}){return a(R,null,a("p",null,m("Are you sure you want to delete the Command?")),a("div",{className:"modal-button-container"},a("button",{className:"mod-warning",onClick:async()=>{t.plugin.settings.confirmDeletion=!1,t.plugin.saveSettings(),t.remove=!0,t.close()}},m("Remove and don't ask again")),a("button",{className:"mod-warning",onClick:()=>{t.remove=!0,t.close()}},m("Remove")),a("button",{onClick:()=>{t.remove=!1,t.close()}},m("Cancel"))))}var H=class extends jo.Modal{constructor(e){super(app);this.plugin=e}async onOpen(){this.titleEl.innerText=m("Remove Command"),this.containerEl.style.zIndex="99",this.reactComponent=a(Jo,{modal:this}),X(this.reactComponent,this.contentEl)}async didChooseRemove(){return this.open(),new Promise(e=>{this.onClose=()=>{var n;return e((n=this.remove)!=null?n:!1)}})}onClose(){X(null,this.contentEl)}};var j=class{constructor(o,e){this.plugin=o,this.pairs=e}};var be=class extends j{constructor(e,n){super(e,n);this.actions=new Map;this.init(),this.plugin.register(()=>this.actions.forEach((i,r)=>this.removeAction(r)))}getFileExplorers(){return app.workspace.getLeavesOfType("file-explorer")}init(){app.workspace.onLayoutReady(()=>{for(let e of this.pairs)$(e.mode)&&(app.workspace.onLayoutReady(()=>{this.getFileExplorers().forEach(i=>{this.addAction(e,i)})}),this.plugin.registerEvent(app.workspace.on("layout-change",()=>{this.getFileExplorers().forEach(i=>{this.addAction(e,i)})})))})}reorder(){this.actions.forEach((e,n)=>this.removeAction(n,!0)),this.init()}async addCommand(e){this.pairs.push(e),app.workspace.onLayoutReady(()=>{this.getFileExplorers().forEach(i=>{this.addAction(e,i)})}),this.plugin.registerEvent(app.workspace.on("layout-change",()=>{this.getFileExplorers().forEach(i=>{this.addAction(e,i)})})),await this.plugin.saveSettings()}async removeCommand(e){this.pairs.remove(e),this.removeAction(e),await this.plugin.saveSettings()}buttonExists(e,n){return[...e.view.containerEl.querySelectorAll("div.nav-buttons-container > .cmdr.clickable-icon")].some(i=>i.getAttribute("data-cmdr")===n.icon+n.name)}addAction(e,n){var l,h,s,g,v;if(this.buttonExists(n,e))return;let i=createDiv({cls:"cmdr clickable-icon",attr:{"aria-label-position":"top","aria-label":e.name,"data-cmdr":e.icon+e.name}});this.actions.set(e,i),i.style.color=e.color==="#000000"||e.color===void 0?"inherit":e.color;let r=!1,c=()=>{i.empty(),i.style.setProperty("--icon-size","12px"),(0,xe.setIcon)(i,e.icon),i.onclick=()=>app.commands.executeCommandById(e.id)},u=()=>{i.empty(),i.style.setProperty("--icon-size","12px"),(0,xe.setIcon)(i,"trash"),i.onclick=async()=>{(!this.plugin.settings.confirmDeletion||await new H(this.plugin).didChooseRemove())&&this.removeCommand(e)}};i.addEventListener("mouseleave",()=>{c(),r=!1}),i.addEventListener("mousemove",f=>{f.preventDefault(),f.stopImmediatePropagation(),f.shiftKey&&(r||u(),r=!0)}),i.addEventListener("contextmenu",f=>{f.stopImmediatePropagation(),new xe.Menu().addItem(b=>{b.setTitle(m("Add command")).setIcon("command").onClick(async()=>{let P=await W(this.plugin);this.addCommand(P)})}).addSeparator().addItem(b=>{b.setTitle(m("Change Icon")).setIcon("box").onClick(async()=>{let P=await new D(this.plugin).awaitSelection();P&&P!==e.icon&&(e.icon=P,await this.plugin.saveSettings(),this.reorder())})}).addItem(b=>{b.setTitle(m("Rename")).setIcon("text-cursor-input").onClick(async()=>{let P=await new U(e.name).awaitSelection();P&&P!==e.name&&(e.name=P,await this.plugin.saveSettings(),this.reorder())})}).addItem(b=>{b.dom.addClass("is-warning"),b.setTitle(m("Delete")).setIcon("lucide-trash").onClick(async()=>{(!this.plugin.settings.confirmDeletion||await new H(this.plugin).didChooseRemove())&&this.removeCommand(e)})}).showAtMouseEvent(f)}),c(),(v=(g=(s=(h=(l=n.view)==null?void 0:l.containerEl)==null?void 0:h.querySelector)==null?void 0:s.call(h,"div.nav-buttons-container"))==null?void 0:g.appendChild)==null||v.call(g,i)}removeAction(e,n=!1){let i=this.actions.get(e);if(!!i){if(n){i.remove(),this.actions.delete(e);return}i.addClass("cmdr-ribbon-removing"),i.addEventListener("transitionend",async()=>{i.remove(),this.actions.delete(e)})}}};var se=require("obsidian");var tt=class extends j{async addCommand(o){this.pairs.push(o),await this.plugin.saveSettings()}async removeCommand(o){this.pairs.remove(o),await this.plugin.saveSettings()}reorder(){}addRemovableCommand(o,e,n,i,r){return c=>{var f;c.dom.addClass("cmdr"),c.dom.style.color=e.color==="#000000"||e.color===void 0?"inherit":e.color,c.setSection("cmdr"),c.dom.style.display="flex";let u=createDiv({cls:"cmdr-menu-more-options"}),l=null;u.addEventListener("click",b=>{b.preventDefault(),b.stopImmediatePropagation(),l?(l.hide(),l=null):l=new se.Menu().addItem(P=>{P.setTitle(m("Change Icon")).setIcon("box").onClick(async()=>{let C=await new D(n).awaitSelection();C&&C!==e.icon&&(e.icon=C,await n.saveSettings())})}).addItem(P=>{P.setTitle(m("Rename")).setIcon("text-cursor-input").onClick(async()=>{let C=await new U(e.name).awaitSelection();C&&C!==e.name&&(e.name=C,await n.saveSettings())})}).addItem(P=>{P.dom.addClass("is-warning"),P.setTitle(m("Delete")).setIcon("lucide-trash").onClick(async()=>{(!n.settings.confirmDeletion||await new H(n).didChooseRemove())&&v()})}).showAtMouseEvent(b)}),u.style.setProperty("--icon-size","16px"),(0,se.setIcon)(u,"more-vertical"),c.dom.append(u),c.setTitle((f=e.name)!=null?f:o.name).setIcon(e.icon).onClick(()=>app.commands.executeCommandById(e.id));let h=!1,s=()=>{u.style.display="none"},g=()=>{u.style.display="block"},v=async()=>{c.dom.addClass("cmdr-removing"),i.registerDomEvent(c.dom,"transitionend",()=>{c.dom.remove()}),r.remove(e),await n.saveSettings()};i.registerDomEvent(c.dom,"mousemove",b=>{b.preventDefault(),b.stopImmediatePropagation(),h||g(),h=!0}),i.registerDomEvent(c.dom,"mouseleave",()=>{s(),h=!1}),s()}}addCommandAddButton(o,e,n){o.settings.showAddCommand&&e.addItem(i=>{i.setTitle(m("Add command")).setIcon("plus-circle").setSection("cmdr").onClick(async()=>{try{let r=await W(o);n.push(r),await o.saveSettings()}catch(r){console.log(r)}})})}},Pe=class extends tt{applyEditorMenuCommands(o){return async(e,n,i)=>{this.addCommandAddButton(o,e,o.settings.editorMenu);for(let r of o.settings.editorMenu){let c=G(r.id);!c||!$(r.mode)||c.checkCallback&&!c.checkCallback(!0)||c.editorCheckCallback&&!c.editorCheckCallback(!0,n,i)||e.addItem(this.addRemovableCommand.call(this,c,r,o,e,o.settings.editorMenu))}}}},Se=class extends tt{applyFileMenuCommands(o){return async(e,n,i,r)=>{this.addCommandAddButton(o,e,o.settings.fileMenu);for(let c of o.settings.fileMenu){let u=G(c.id);if(!!u&&!(u.checkCallback&&!u.checkCallback(!0))){if(u.editorCallback){if(!((r==null?void 0:r.view)instanceof se.MarkdownView))continue}else if(u.editorCheckCallback)if((r==null?void 0:r.view)instanceof se.MarkdownView){if(!u.editorCheckCallback(!0,r.view.editor,r.view))continue}else continue;e.addItem(this.addRemovableCommand.call(this,u,c,o,e,o.settings.fileMenu))}}}}};var ce=require("obsidian");var Ce=class extends j{constructor(e,n){super(e,n);this.buttons=new WeakMap;this.init()}addPageHeaderButton(e,n){let{id:i,icon:r,name:c}=n,{view:u}=e;if(!(u instanceof ce.ItemView))return;let l=this.buttonsFor(e,!0);if(!l||l.has(i))return;let h=u.addAction(r,c,()=>{app.workspace.setActiveLeaf(e,{focus:!0}),app.commands.executeCommandById(i)});l.set(i,h),h.addClasses(["cmdr-page-header",i]),h.style.color=n.color==="#000000"||n.color===void 0?"inherit":n.color,h.addEventListener("contextmenu",s=>{s.stopImmediatePropagation(),new ce.Menu().addItem(g=>{g.setTitle(m("Add command")).setIcon("command").onClick(async()=>{let v=await W(this.plugin);this.addCommand(v)})}).addSeparator().addItem(g=>{g.setTitle(m("Change Icon")).setIcon("box").onClick(async()=>{let v=await new D(this.plugin).awaitSelection();v&&v!==n.icon&&(n.icon=v,await this.plugin.saveSettings(),this.reorder())})}).addItem(g=>{g.setTitle(m("Rename")).setIcon("text-cursor-input").onClick(async()=>{let v=await new U(n.name).awaitSelection();v&&v!==n.name&&(n.name=v,await this.plugin.saveSettings(),this.reorder())})}).addItem(g=>{g.dom.addClass("is-warning"),g.setTitle(m("Delete")).setIcon("lucide-trash").onClick(async()=>{(!this.plugin.settings.confirmDeletion||await new H(this.plugin).didChooseRemove())&&this.removeCommand(n)})}).showAtMouseEvent(s)})}init(){this.plugin.register(()=>{this.removeButtonsFromAllLeaves()}),this.plugin.registerEvent(app.workspace.on("layout-change",()=>{this.addButtonsToAllLeaves()})),app.workspace.onLayoutReady(()=>setTimeout(()=>this.addButtonsToAllLeaves(),100))}addAdderButton(e){var c;let{view:n}=e,i="cmdr-adder";if(!(n instanceof ce.ItemView)||(c=this.buttons.get(n))!=null&&c.has(i))return;let r=n.addAction("plus",m("Add new"),async()=>{this.addCommand(await W(this.plugin))});r.addClasses(["cmdr",i]),this.buttons.has(n)||this.buttons.set(n,new Map),this.buttons.get(n).set(i,r)}addButtonsToAllLeaves(e=!1){activeWindow.requestAnimationFrame(()=>app.workspace.iterateAllLeaves(n=>this.addButtonsToLeaf(n,e)))}removeButtonsFromAllLeaves(){activeWindow.requestAnimationFrame(()=>app.workspace.iterateAllLeaves(e=>this.removeButtonsFromLeaf(e)))}buttonsFor(e,n=!1){if(e.view instanceof ce.ItemView)return n&&!this.buttons.has(e.view)&&this.buttons.set(e.view,new Map),this.buttons.get(e.view)}addButtonsToLeaf(e,n=!1){var i;if(e.view instanceof ce.ItemView){if(n)this.removeButtonsFromLeaf(e);else if((i=this.buttonsFor(e))!=null&&i.size)return;for(let r=this.pairs.length-1;r>=0;r--){let c=this.pairs[r];$(c.mode)&&this.addPageHeaderButton(e,c)}this.plugin.settings.showAddCommand&&this.addAdderButton(e)}}removeButtonsFromLeaf(e){let n=this.buttonsFor(e);if(n){for(let i of n.values())i.detach();n==null||n.clear()}}reorder(){this.addButtonsToAllLeaves(!0)}async addCommand(e){this.pairs.push(e),this.addButtonsToAllLeaves(!0),await this.plugin.saveSettings()}async removeCommand(e){this.pairs.remove(e),this.addButtonsToAllLeaves(!0),await this.plugin.saveSettings()}};var Q=require("obsidian");var _e=class extends j{constructor(e,n){super(n,n.settings[`${e}Ribbon`]);this.side=e;this.actions={},app.workspace.onLayoutReady(()=>{this.side==="right"?this.addActionContainer():this.ribbonEl=app.workspace.leftRibbon,this.addBtn=createDiv({cls:"cmdr side-dock-ribbon-action cmdr-adder",attr:{"aria-label-position":e==="left"?"right":"left","aria-label":m("Add new")}}),this.init()}),this.plugin.register(()=>{Q.Platform.isMobile?Object.keys(this.actions).forEach(i=>this.removeActionMobile(i)):Object.values(this.actions).forEach(i=>i.remove())})}async addCommand(e){var i;let n=G(e.id);n?this.addAction((i=e.name)!=null?i:n.name,e.icon,e,()=>app.commands.executeCommandById(e.id)):this.addAction(m("This Command seems to have been removed. {{command_name}}").replace("{{command_name}}",e.name||""),"trash",e,r=>{this.removeAction(r.target.getAttribute("aria-label")+"trash")}),this.pairs.push(e),await this.plugin.saveSettings()}async removeCommand(e){this.removeAction(e.name+e.icon),this.pairs.remove(e),await this.plugin.saveSettings()}reorder(){this.addBtn.remove(),Q.Platform.isMobile?Object.keys(this.actions).forEach(e=>this.removeActionMobile(e)):Object.values(this.actions).forEach(e=>e.remove()),this.init()}init(){for(let e of this.pairs)$(e.mode)&&this.addAction(e.name,e.icon,e,()=>app.commands.executeCommandById(e.id));this.plugin.register(()=>this.addBtn.remove()),(0,Q.setIcon)(this.addBtn,"plus"),this.addBtn.onclick=async()=>{let e=await W(this.plugin);this.addCommand(e),this.reorder()},this.plugin.settings.showAddCommand&&app.workspace.onLayoutReady(()=>{var e,n;return(n=(e=this.ribbonEl.ribbonItemsEl)==null?void 0:e.append)==null?void 0:n.call(e,this.addBtn)})}addActionMobile(e,n,i){app.workspace.leftRibbon.orderedRibbonActions.push({cmdr__id:e+n,title:e,icon:n,callback:i})}removeActionMobile(e){app.workspace.leftRibbon.orderedRibbonActions=app.workspace.leftRibbon.orderedRibbonActions.filter(n=>n.cmdr__id!==e)}addAction(e,n,i,r){var s;let c=this.ribbonEl.makeRibbonItemButton(n,e,()=>{});if(c.addClass("cmdr"),c.style.color=i.color==="#000000"||i.color===void 0?"inherit":i.color,c.setAttribute("aria-label-position",this.side==="left"?"right":"left"),this.actions[e+n]=c,Q.Platform.isMobile){this.addActionMobile(e,n,r);return}let u=!1,l=()=>{c.empty(),(0,Q.setIcon)(c,n),c.onclick=r},h=()=>{c.empty(),(0,Q.setIcon)(c,"trash"),c.onclick=async()=>{(!this.plugin.settings.confirmDeletion||await new H(this.plugin).didChooseRemove())&&this.removeCommand(i)}};c.addEventListener("mouseleave",()=>{u=!1,l()}),c.addEventListener("mousemove",g=>{g.preventDefault(),g.stopImmediatePropagation(),g.shiftKey&&(u||h(),u=!0)}),c.addEventListener("contextmenu",g=>{g.stopImmediatePropagation(),new Q.Menu().addItem(v=>{v.setTitle(m("Add command")).setIcon("command").onClick(async()=>{let f=await W(this.plugin);this.addCommand(f)})}).addSeparator().addItem(v=>{v.setTitle(m("Change Icon")).setIcon("box").onClick(async()=>{let f=await new D(this.plugin).awaitSelection();f&&f!==i.icon&&(i.icon=f,await this.plugin.saveSettings(),this.reorder())})}).addItem(v=>{v.setTitle(m("Rename")).setIcon("text-cursor-input").onClick(async()=>{let f=await new U(i.name).awaitSelection();f&&f!==i.name&&(i.name=f,await this.plugin.saveSettings(),this.reorder())})}).addItem(v=>{v.dom.addClass("is-warning"),v.setTitle(m("Delete")).setIcon("lucide-trash").onClick(async()=>{(!this.plugin.settings.confirmDeletion||await new H(this.plugin).didChooseRemove())&&this.removeCommand(i)})}).showAtMouseEvent(g)}),l(),(s=this.ribbonEl.ribbonItemsEl)==null||s.append(c)}async removeAction(e){if(Q.Platform.isMobile){this.removeActionMobile(e);return}this.actions[e].addClass("cmdr-ribbon-removing"),this.actions[e].addEventListener("transitionend",()=>{this.actions[e].remove(),delete this.actions[e]})}addActionContainer(){let e=createDiv({cls:`side-dock-actions cmdr-${this.side}-ribbon`});this.ribbonEl.collapseButtonEl.insertAdjacentElement("afterend",e),this.ribbonEl.ribbonItemsEl=e,this.plugin.register(()=>e.remove())}};var de=require("obsidian");var ye=class extends j{constructor(e,n){super(e,n);this.actions=new Map;this.addBtn=createDiv({cls:"cmdr status-bar-item cmdr-adder",attr:{"aria-label-position":"top","aria-label":m("Add new")}});this.init(),this.plugin.register(()=>this.actions.forEach((i,r)=>this.removeAction(r)))}init(){app.workspace.onLayoutReady(()=>{this.container=app.statusBar.containerEl;for(let e of this.pairs)G(e.id)||this.pairs.remove(e),$(e.mode)&&this.addAction(e);this.plugin.saveSettings(),this.plugin.registerDomEvent(this.container,"contextmenu",e=>{e.target===this.container&&new de.Menu().addItem(n=>{n.setTitle(m("Add command")).setIcon("command").onClick(async()=>{let i=await W(this.plugin);this.addCommand(i)})}).showAtMouseEvent(e)}),this.plugin.register(()=>this.addBtn.remove()),this.addBtn.style.setProperty("--icon-size","12px"),(0,de.setIcon)(this.addBtn,"plus"),this.addBtn.onclick=async()=>{let e=await W(this.plugin);this.addCommand(e),this.reorder()},this.plugin.settings.showAddCommand&&this.container.prepend(this.addBtn)})}reorder(){this.addBtn.remove(),this.actions.forEach((e,n)=>this.removeAction(n,!0)),this.init()}async addCommand(e){this.pairs.push(e),this.addAction(e),await this.plugin.saveSettings()}async removeCommand(e){this.pairs.remove(e),this.removeAction(e),await this.plugin.saveSettings()}addAction(e){let n=createDiv({cls:"cmdr status-bar-item clickable-icon",attr:{"aria-label-position":"top","aria-label":e.name}});this.actions.set(e,n),n.style.color=e.color==="#000000"||e.color===void 0?"inherit":e.color;let i=!1,r=()=>{n.empty(),n.style.setProperty("--icon-size","12px"),(0,de.setIcon)(n,e.icon),n.onclick=()=>app.commands.executeCommandById(e.id)},c=()=>{n.empty(),n.style.setProperty("--icon-size","12px"),(0,de.setIcon)(n,"trash"),n.onclick=async()=>{(!this.plugin.settings.confirmDeletion||await new H(this.plugin).didChooseRemove())&&this.removeCommand(e)}};n.addEventListener("mouseleave",()=>{r(),i=!1}),n.addEventListener("mousemove",u=>{u.preventDefault(),u.stopImmediatePropagation(),u.shiftKey&&(i||c(),i=!0)}),n.addEventListener("contextmenu",u=>{u.stopImmediatePropagation(),new de.Menu().addItem(l=>{l.setTitle(m("Add command")).setIcon("command").onClick(async()=>{let h=await W(this.plugin);this.addCommand(h)})}).addSeparator().addItem(l=>{l.setTitle(m("Change Icon")).setIcon("box").onClick(async()=>{let h=await new D(this.plugin).awaitSelection();h&&h!==e.icon&&(e.icon=h,await this.plugin.saveSettings(),this.reorder())})}).addItem(l=>{l.setTitle(m("Rename")).setIcon("text-cursor-input").onClick(async()=>{let h=await new U(e.name).awaitSelection();h&&h!==e.name&&(e.name=h,await this.plugin.saveSettings(),this.reorder())})}).addItem(l=>{l.dom.addClass("is-warning"),l.setTitle(m("Delete")).setIcon("lucide-trash").onClick(async()=>{(!this.plugin.settings.confirmDeletion||await new H(this.plugin).didChooseRemove())&&this.removeCommand(e)})}).showAtMouseEvent(u)}),r(),this.container.prepend(n)}removeAction(e,n=!1){let i=this.actions.get(e);if(!!i){if(n){i.remove(),this.actions.delete(e);return}i.addClass("cmdr-ribbon-removing"),i.addEventListener("transitionend",async()=>{i.remove(),this.actions.delete(e)})}}};var Yo=require("obsidian");var at=require("obsidian");var Y=require("obsidian");var It=require("obsidian");function Mt(){return a("div",{className:"cmdr-credits"},a("span",null,m("By Johnny\u2728 and phibr0")))}var $o='';function me(){return a("div",{class:"cmdr-icon-wrapper",dangerouslySetInnerHTML:{__html:$o}})}function xt({manifest:t}){let o=a("button",{className:"mod-cta",onClick:n=>{kt(n),setTimeout(()=>location.replace("https://forms.gle/hPjn61G9bqqFb3256"),Math.random()*800+500)}},a(w,{icon:"message-square",size:20}),m("Leave feedback")),e=a("button",{className:"mod-cta",onClick:n=>{kt(n),setTimeout(()=>location.replace("https://ko-fi.com/phibr0"),Math.random()*800+500)}},a(w,{icon:"coffee",size:20}),m("Support development"));return a("div",{className:"cmdr-about"},It.Platform.isMobile&&[a("hr",null),o,e],It.Platform.isDesktop&&[a("div",{className:"setting-item mod-toggle",style:{width:"100%",borderTop:"1px solid var(--background-modifier-border)",paddingTop:"18px"}},a("div",{className:"setting-item-info"},a("div",{className:"setting-item-name"},m("Leave feedback")),a("div",{className:"setting-item-description"},m("Share feedback, issues, and ideas with our feedback form."))),a("div",{className:"setting-item-control"},o)),a("div",{className:"setting-item mod-toggle",style:{width:"100%"}},a("div",{className:"setting-item-info"},a("div",{className:"setting-item-name"},m("Donate")),a("div",{className:"setting-item-description"},m("Consider donating to support development."))),a("div",{className:"setting-item-control"},e)),a("hr",null)],a(me,null),a("b",null,t.name),a(Mt,null),a("a",{className:"cmdr-version",href:"https://github.com/phibr0/obsidian-commander/releases/tag/"+t.version},t.version))}var V=require("obsidian");function Pt(t,o){if(t.empty(),new V.Setting(t).setName("Toolbar Row Count").setDesc("Set how many Rows the Mobile Toolbar should have. Set this to 0 to remove the Toolbar.").addSlider(n=>n.setLimits(0,5,1).setValue(o.settings.advancedToolbar.rowCount).setDynamicTooltip().onChange(async i=>{o.settings.advancedToolbar.rowCount=i,await o.saveSettings(),oe(o.settings.advancedToolbar)})),new V.Setting(t).setName("Column Layout").setDesc("Use a column based layout instead of the default row. This makes it easier to arrange the Commands.").addToggle(n=>n.setValue(o.settings.advancedToolbar.columnLayout).onChange(async i=>{o.settings.advancedToolbar.columnLayout=i,await o.saveSettings(),oe(o.settings.advancedToolbar)})),new V.Setting(t).setName("Bottom Offset").setDesc("Offset the Toolbar from the Bottom of the Screen. This is useful if the toolbar is partially obscured by other UI Elements.").addSlider(n=>n.setLimits(0,32,1).setValue(o.settings.advancedToolbar.heightOffset).setDynamicTooltip().onChange(async i=>{o.settings.advancedToolbar.heightOffset=i,await o.saveSettings(),oe(o.settings.advancedToolbar)})),V.Platform.isMobile){let n=document.createDocumentFragment();n.appendChild(createEl("h3",{text:"Custom Icons"})),t.appendChild(n),o.getCommandsWithoutIcons().forEach(i=>{new V.Setting(t).setName(i.name).setDesc(`ID: ${i.id}`).addButton(r=>{var u;let c=r.buttonEl.createDiv({cls:"AT-settings-icon"});if(i.icon)(0,V.setIcon)(c,i.icon,20);else{let l=(u=o.settings.advancedToolbar.mappedIcons.find(h=>h.commandID===i.id))==null?void 0:u.iconID;l?(0,V.setIcon)(c,l):r.setButtonText("No Icon")}r.onClick(async()=>{let l=await new D(o).awaitSelection(),h=o.settings.advancedToolbar.mappedIcons.find(s=>s.commandID===i.id);h?h.iconID=l:o.settings.advancedToolbar.mappedIcons.push({commandID:i.id,iconID:l}),await o.saveSettings(),et(o.settings.advancedToolbar),Pt(t,o)})}).addExtraButton(r=>{r.setIcon("reset").setTooltip("Reset to default - Requires a restart").onClick(async()=>{o.settings.advancedToolbar.mappedIcons=o.settings.advancedToolbar.mappedIcons.filter(c=>c.commandID!==i.id),delete i.icon,delete app.commands.commands[i.id].icon,await o.saveSettings(),Pt(t,o),new V.Notice("If the default Icon doesn't appear, you might have to restart Obsidian.")})})})}let e=t.appendChild(createEl("div",{cls:"cmdr-sep-con",attr:{style:"margin-top: 64px"}}));e.appendChild(createEl("div",{text:"Advanced Settings",attr:{style:"margin-bottom: 8px; font-weight: bold"}})),new V.Setting(e).setName("Button Height").setDesc("Change the Height of each Button inside the Mobile Toolbar (in px).").addText(n=>{var i,r;return n.setValue((r=(i=o.settings.advancedToolbar.rowHeight)==null?void 0:i.toString())!=null?r:"48").setPlaceholder("48").onChange(async c=>{let u=Number(c),l=isNaN(u);n.inputEl.toggleClass("is-invalid",l),l||(o.settings.advancedToolbar.rowHeight=u,await o.saveSettings(),oe(o.settings.advancedToolbar))})}),new V.Setting(e).setName("Button Width").setDesc("Change the Width of each Button inside the Mobile Toolbar (in px).").addText(n=>{var i,r;return n.setValue((r=(i=o.settings.advancedToolbar.buttonWidth)==null?void 0:i.toString())!=null?r:"48").setPlaceholder("48").onChange(async c=>{let u=Number(c),l=isNaN(u);n.inputEl.toggleClass("is-invalid",l),l||(o.settings.advancedToolbar.buttonWidth=u,await o.saveSettings(),oe(o.settings.advancedToolbar))})}),new V.Setting(e).setName("Toolbar Extra Spacing").setDesc("Some Themes need extra spacing in the toolbar. If your Toolbar doesn't wrap properly, try increasing this value.").addSlider(n=>n.setLimits(0,64,1).setValue(o.settings.advancedToolbar.spacing).setDynamicTooltip().onChange(async i=>{o.settings.advancedToolbar.spacing=i,await o.saveSettings(),oe(o.settings.advancedToolbar)}))}function St({plugin:t}){let o=ee(null);return q(()=>{Pt(o.current,t)},[]),a(R,null,a("div",{className:"cmdr-sep-con callout","data-callout":"info"},a("span",{className:"cmdr-callout-warning"},a(w,{icon:"alert-circle"})," ","Info"),a("p",{className:"cmdr-warning-description"},"The Toolbar is only available in Obsidian Mobile. ",V.Platform.isMobile&&a(R,null,"To configure which Commands show up in the Toolbar, open the Mobile Settings.")),V.Platform.isMobile&&a("button",{onClick:()=>{app.setting.openTabById("mobile")},className:"mod-cta"},"Open Mobile Settings")),a("div",{ref:o,style:{paddingBottom:"256px"}}))}var ue=require("obsidian");var Go=require("obsidian");var Zo=require("obsidian");var ot=({initialColor:t,onChange:o})=>{let e=ee(null);return q(()=>(e.current&&new Zo.ColorComponent(e.current).setValue(t).onChange(o),()=>{var n,i;return(i=(n=e.current)==null?void 0:n.empty)==null?void 0:i.call(n)}),[o,t]),a("div",{ref:e,className:"cmdr-flex cmdr-items-center"})};function Et({modal:t}){var o;return q(()=>{let e=()=>{this.forceUpdate()};return addEventListener("cmdr-icon-changed",e),()=>removeEventListener("cmdr-icon-changed",e)},[]),a("div",{className:"cmdr-mobile-modify-grid"},a("div",{className:"cmdr-mobile-modify-option",onClick:t.handleNewIcon},a("span",null,m("Icon")),a("span",{className:"cmdr-flex cmdr-gap-1"},a(w,{icon:t.pair.icon,size:20,className:"clickable-icon",style:{marginRight:"0px"}}),a(ot,{initialColor:(o=t.pair.color)!=null?o:"#000",onChange:t.handleColorChange}))),a("div",{className:"cmdr-mobile-modify-option"},a("span",null,m("Name")),a("input",{onBlur:({currentTarget:e})=>t.handleRename(e.value),type:"text",placeholder:m("Custom Name"),value:t.pair.name})),a("div",{className:"cmdr-mobile-modify-option"},a("select",{className:"dropdown",value:t.pair.mode,onChange:({currentTarget:e})=>t.handleModeChange(e.value)},a("option",{value:"any"},m("Add command to all devices")),a("option",{value:"mobile"},m("Add command only to mobile devices")),a("option",{value:"desktop"},m("Add command only to desktop devices")),a("option",{value:app.appId},m("Add command only to this device")))),a("div",{className:"modal-button-container"},a("button",{className:"mod-cta",onClick:()=>t.close()},m("Done"))))}var le=class extends Go.Modal{constructor(e,n,i,r,c){super(app);this.pair=e;this.handleRename=n;this.handleNewIcon=i;this.handleModeChange=r;this.handleColorChange=c}async onOpen(){this.titleEl.innerText=this.pair.name,this.reactComponent=a(Et,{modal:this}),X(this.reactComponent,this.contentEl)}onClose(){X(null,this.contentEl)}};function Ee({value:t,handleChange:o,ariaLabel:e}){let[n,i]=O(!1),r=ee(null),[c,u]=O(0);return q(()=>{var l,h;(l=r==null?void 0:r.current)==null||l.select(),(h=r==null?void 0:r.current)==null||h.focus()}),a("div",{class:"cmdr-editable"},n?a("input",{type:"text",value:t,style:{width:c+25+"px"},onKeyDown:l=>{l.key==="Enter"&&l.target.value.length>0&&(i(!1),o(l))},onBlur:()=>i(!1),ref:r}):a("span",{onDblClick:({target:l})=>{u(l==null?void 0:l.offsetWidth),i(!0)},"aria-label":e},t))}function Tt({pair:t,handleRemove:o,handleDown:e,handleUp:n,handleNewIcon:i,handleRename:r,handleModeChange:c,handleColorChange:u}){var P;let l=G(t.id);if(!l)return a(R,null,ue.Platform.isDesktop&&a("div",{className:"setting-item mod-toggle"},a(w,{icon:"alert-triangle",size:20,className:"cmdr-icon clickable-icon mod-warning"}),a("div",{className:"setting-item-info"},a("div",{className:"setting-item-name"},t.name),a("div",{className:"setting-item-description"},m("This Command is not available on this device."))),a("div",{className:"setting-item-control"},a("button",{className:"mod-warning",style:"display: flex",onClick:o,"aria-label":m("Delete")},a(w,{icon:"lucide-trash"})))),ue.Platform.isMobile&&a("div",{className:"mobile-option-setting-item",onClick:()=>{new ue.Notice(m("This Command is not available on this device."))}},a("span",{className:"mobile-option-setting-item-remove-icon",onClick:o},a(w,{icon:"minus-with-circle",size:22,style:{color:"var(--text-error)"}})),a("span",{className:"mobile-option-setting-item-option-icon mod-warning"},a(w,{icon:"alert-triangle",size:22})),a("span",{className:"mobile-option-setting-item-name"},t.name)));let h=l.id.split(":").first(),s=app.plugins.manifests[h],g=!s,v=l.hasOwnProperty("checkCallback")||l.hasOwnProperty("editorCheckCallback"),f=ti(t.mode),b=t.mode.match(/desktop|mobile|any/)?t.mode[0].toUpperCase()+t.mode.substring(1):m("This device");return a(R,null,ue.Platform.isDesktop&&a("div",{className:"setting-item mod-toggle"},a(w,{icon:t.icon,size:20,"aria-label":m("Choose new"),onClick:i,className:"cmdr-icon clickable-icon"}),a("div",{className:"setting-item-info"},a("div",{className:"setting-item-name"},a(Ee,{ariaLabel:m("Double click to rename"),handleChange:({target:C})=>{r(C==null?void 0:C.value)},value:t.name}),t.name!==l.name&&a("span",{style:"margin-left: .8ex"},"(",l.name,")")),a("div",{className:"setting-item-description"},m("Added by {{plugin_name}}.".replace("{{plugin_name}}",g?"Obsidian":s.name))," ",v?m("Warning: This is a checked Command, meaning it might not run under every circumstance."):"")),a("div",{className:"setting-item-control"},a(ot,{initialColor:(P=t.color)!=null?P:"#000",onChange:u}),a(w,{icon:"arrow-down",className:"setting-editor-extra-setting-button clickable-icon",onClick:e,"aria-label":m("Move down")}),a(w,{icon:"arrow-up",className:"setting-editor-extra-setting-button clickable-icon",onClick:n,"aria-label":m("Move up")}),a(w,{icon:f,className:"setting-editor-extra-setting-button clickable-icon",onClick:()=>c(),"aria-label":m("Change Mode (Currently: {{current_mode}})").replace("{{current_mode}}",b)}),a("button",{className:"mod-warning",style:"display: flex",onClick:o,"aria-label":m("Delete")},a(w,{icon:"lucide-trash"})))),ue.Platform.isMobile&&a("div",{className:"mobile-option-setting-item"},a("span",{className:"mobile-option-setting-item-remove-icon",onClick:o},a(w,{icon:"minus-with-circle",size:22,style:{color:"var(--text-error)"}})),a("span",{className:"mobile-option-setting-item-option-icon"},a(w,{icon:t.icon,size:22,onClick:()=>{new le(t,r,i,c,u).open()}})),a("span",{className:"mobile-option-setting-item-name",onClick:()=>{new le(t,r,i,c,u).open()}},t.name,t.name!==l.name&&a("span",{className:"cmdr-option-setting-name"},"(",l.name,")")),a("span",{className:"mobile-option-setting-item-option-icon"},a(w,{icon:"arrow-down",className:"clickable-icon",onClick:e}),a(w,{icon:"arrow-up",className:"clickable-icon",onClick:n}),a(w,{icon:"three-horizontal-bars",className:"clickable-icon",onClick:()=>{new le(t,r,i,c,u).open()}}))))}function ti(t){return t==="mobile"?"smartphone":t==="desktop"?"monitor":t==="any"?"cmdr-all-devices":"airplay"}function At(t,o,e){let n=o<0?t.length+o:o;if(n>=0&&n{if(n.mode.match(/desktop|mobile|any/)||n.mode===app.appId)return a(Tt,{key:n.id,pair:n,handleRemove:async()=>{(!o.settings.confirmDeletion||await new H(o).didChooseRemove())&&(await t.removeCommand(n),this.forceUpdate())},handleUp:()=>{At(t.pairs,i,i-1),t.reorder(),this.forceUpdate()},handleDown:()=>{At(t.pairs,i,i+1),t.reorder(),this.forceUpdate()},handleRename:async r=>{n.name=r,await o.saveSettings(),t.reorder(),this.forceUpdate()},handleNewIcon:async()=>{let r=await new D(o).awaitSelection();r&&r!==n.icon&&(n.icon=r,await o.saveSettings(),t.reorder(),this.forceUpdate()),dispatchEvent(new Event("cmdr-icon-changed"))},handleModeChange:async r=>{let c=["any","desktop","mobile",app.appId],u=c.indexOf(n.mode);u===3&&(u=-1),n.mode=r||c[u+1],await o.saveSettings(),t.reorder(),this.forceUpdate()},handleColorChange:async r=>{n.color=r,await o.saveSettings(),t.reorder()}})})),!t.pairs.some(n=>$(n.mode)||n.mode.match(/mobile|desktop/))&&a("div",{class:"cmdr-commands-empty"},a(me,null),a("h3",null,m("No commands here!")),a("span",null,m("Would you like to add one now?"))),Ko.Platform.isMobile&&a("hr",null),a("div",{className:"cmdr-add-new-wrapper"},a("button",{className:"mod-cta",onClick:async()=>{let n=await W(o);await t.addCommand(n),t.reorder(),this.forceUpdate()}},m("Add command")))),e)}function Nt({title:t,children:o}){let[e,n]=O(!1);return a("div",{className:"cmdr-accordion cmdr-sep-con","aria-expanded":e},a("div",{className:"cmdr-accordion-header",onClick:()=>{n(!e)}},a(w,{className:"cmdr-accordion-chevron clickable-icon",icon:"chevron-down",size:24}),a("span",null,t)),a("div",{className:"cmdr-accordion-content",style:{maxHeight:[o].flat().length*120+"px"}},o))}function Lt({name:t,description:o,children:e,className:n}){return a("div",{className:`setting-item ${n}`},a("div",{className:"setting-item-info"},a("div",{className:"setting-item-name"},t),a("div",{className:"setting-item-description"},o)),a("div",{className:"setting-item-control"},e))}function nt(t){let[o,e]=O(t.value);return a(Lt,{name:t.name,description:t.description,className:"mod-toggle"},a("div",{className:`checkbox-container ${o?"is-enabled":""}`,onClick:()=>{e(!o),t.changeHandler(o)}}))}function Qo({name:t,description:o,changeHandler:e,value:n,hideLabel:i,showLabel:r}){let[c,u]=O(n);return a(Lt,{name:t,description:o,className:"mod-toggle"},a(w,{"aria-label":c?r:i,icon:c?"eye-off":"eye",size:20,className:"clickable-icon",onClick:()=>{u(!c),e(c)}}))}function it(t){var n,i,r;let[o,e]=O(t.value);return a(Lt,{description:t.description,name:t.name,className:"cmdr-slider"},a("div",null,a(Ee,{ariaLabel:m("Double click to enter custom value"),value:o.toString(),handleChange:({target:c})=>{let u=Number(c.value);!isNaN(u)&&o!==u&&(e(u),t.changeHandler(u))}}),a("input",{class:"slider",type:"range",min:(n=t.min)!=null?n:"0",max:(i=t.max)!=null?i:"32",step:(r=t.step)!=null?r:"1",value:o,onPointerMove:({target:c})=>{o!==c.value&&(e(c.value),t.changeHandler(c.value))}})))}function en({plugin:t}){let o=t.settings.hide.statusbar,[e,n]=O([]);return q(()=>{let r=[...app.statusBar.containerEl.getElementsByClassName("status-bar-item")].map(c=>[...c.classList].find(u=>u.startsWith("plugin-"))).filter(c=>c).map(c=>c.substring(7));n(r.map(c=>app.plugins.manifests[c]||{id:c,name:c.replace(/-/g," ").replace(/(^\w{1})|(\s+\w{1})/g,u=>u.toUpperCase()),description:"Core Plugin"}))},[]),a(R,null,a("hr",null),a(Nt,{title:m("Hide other Commands")},e.map(i=>a(Qo,{name:i.name,description:i.description,value:o.contains(i.id),hideLabel:m("Hide"),showLabel:m("Show"),changeHandler:async r=>{r?o.contains(i.id)&&o.remove(i.id):o.push(i.id),Ke(t.settings),await t.saveSettings()}}))))}var nn=require("obsidian");var on=require("obsidian");function tn({plugin:t,macro:o,onSave:e,onCancel:n}){let[i,r]=O(o.name||"Macro Name"),[c,u]=O(o.icon||"star"),[l,h]=O(o.startup||!1),[s,g]=O(JSON.parse(JSON.stringify(o.macro))||[]),v=this.forceUpdate.bind(this),f=async()=>{let C=await new ne(t).awaitSelection();C&&g([...s,{action:0,commandId:C.id}])},b=async()=>{g([...s,{action:1,delay:250}])},P=async()=>{};return a("div",null,a("div",{class:"setting-item cmdr-mm-item"},a("div",null,a("span",null,"Name"),a("input",{type:"text",placeholder:"Macro Name",value:i,onChange:C=>r(C.currentTarget.value),width:"100%"})),a("div",null,a("span",null,"Icon"),a("button",{onClick:async()=>u(await new D(t).awaitSelection())},a(w,{icon:c})))),s.map((C,_)=>{switch(C.action){case 0:let F=G(C.commandId);return a("div",{class:"setting-item cmdr-mm-item"},a("div",null,a("button",{onClick:async()=>{let k=await new ne(t).awaitSelection();g(s.map((L,pe)=>pe===_?qt(ze({},L),{commandId:k.id}):L))}},(F==null?void 0:F.name)||"Cannot find Command")),a("div",null,a("div",{class:"cmdr-mm-action-options"},a(w,{class:"clickable-icon",icon:"arrow-down",onClick:()=>{if(_===s.length-1)return;let k=[...s],L=k[_];k[_]=k[_+1],k[_+1]=L,g(k)}}),a(w,{class:"clickable-icon",icon:"arrow-up",onClick:()=>{if(_===0)return;let k=[...s],L=k[_];k[_]=k[_-1],k[_-1]=L,g(k)}}),a(w,{class:"clickable-icon",icon:"cross",onClick:()=>{g(s.filter((k,L)=>L!==_))}}))));case 1:return a("div",{class:"setting-item cmdr-mm-item"},a("div",null,a(it,{name:"Delay",min:0,max:1e4,step:50,description:"Delay in milliseconds",value:C.delay,changeHandler:k=>C.delay=k})),a("div",null,a("div",{class:"cmdr-mm-action-options"},a(w,{class:"clickable-icon",icon:"arrow-down",onClick:()=>{if(_===s.length-1)return;let k=[...s],L=k[_];k[_]=k[_+1],k[_+1]=L,g(k)}}),a(w,{class:"clickable-icon",icon:"arrow-up",onClick:()=>{if(_===0)return;let k=[...s],L=k[_];k[_]=k[_-1],k[_-1]=L,g(k)}}),a(w,{class:"clickable-icon",icon:"cross",onClick:()=>{g(s.filter((k,L)=>L!==_))}}))));case 2:return a("div",null,"Editor: ",C.action);case 3:return a("div",null,"Loop: ",C.times)}}),a("div",{className:"setting-item cmdr-mm-actions cmdr-justify-between"},a("div",{className:"cmdr-flex cmdr-items-center cmdr-justify-self-start"},a("input",{type:"checkbox",id:"checkbox",checked:l,onChange:({target:C})=>{var _;h((_=C==null?void 0:C.checked)!=null?_:!1)}}),a("label",{htmlFor:"checkbox"},"Auto-Run on Startup")),a("div",null,a("button",{onClick:f},"Add Command"),a("button",{onClick:b},"Add Delay"))),a("div",{className:"cmdr-mm-control"},a("button",{class:s.length===0?"disabled":"mod-cta",disabled:s.length===0,onClick:()=>s.length&&e({macro:s,name:i,icon:c,startup:l})},"Save"),a("button",{onClick:n},"Cancel")))}var Te=class extends on.Modal{constructor(e,n,i){super(app);this.macro=n,this.plugin=e,this.onSave=i}onOpen(){this.titleEl.setText("Macro Builder"),X(a(tn,{plugin:this.plugin,macro:this.macro,onSave:this.onSave,onCancel:this.close.bind(this)}),this.contentEl)}onClose(){X(null,this.contentEl)}};function Bt({plugin:t,macros:o}){let e=(i,r)=>{let c=l=>{o.splice(r!==void 0?r:o.length,r!==void 0?1:0,l),t.saveSettings(),this.forceUpdate(),Ie(t),u.close()},u=new Te(t,i,c);u.open()},n=i=>{o.splice(i,1),t.saveSettings(),this.forceUpdate(),Ie(t)};return a(R,null,a("div",{className:"cmdr-sep-con"},o.map((i,r)=>a("div",{class:"setting-item mod-toggle"},a("div",{className:"setting-item-info"},a("div",{className:"setting-item-name"},i.name),a("div",{className:"setting-item-description"},i.macro.length," Actions")),a("div",{className:"setting-item-control"},a("button",{"aria-label":"Edit Macro",onClick:()=>e(i,r)},a(w,{icon:"lucide-pencil"})),a("button",{"aria-label":"Delete",class:"mod-warning",onClick:async()=>{(!t.settings.confirmDeletion||await new H(t).didChooseRemove())&&n(r)}},a(w,{icon:"trash"})))))),!o.length&&a("div",{class:"cmdr-commands-empty"},a(me,null),a("h3",null,"No Macros yet!"),a("span",null,m("Would you like to add one now?"))),nn.Platform.isMobile&&a("hr",null),a("div",{className:"cmdr-add-new-wrapper"},a("button",{class:"mod-cta",onClick:()=>e({name:"",macro:[],icon:"star"})},"Add Macro")))}function Ae({plugin:t,mobileMode:o}){let[e,n]=O(0),[i,r]=O(!0),c=({key:l,shiftKey:h})=>{h&&l==="Tab"?e>0?n((e-1)%u.length):n(u.length-1):l==="Tab"&&n((e+1)%u.length)};q(()=>(addEventListener("keydown",c),()=>removeEventListener("keydown",c)),[e]),Y.Platform.isMobile&&q(()=>{let l=document.querySelector(".modal-setting-back-button"),h=l.cloneNode(!0);l.parentNode.replaceChild(h,l),r(!0)},[]),q(()=>{let l=document.querySelector(".modal-setting-back-button");!l||(i?(l.parentElement.lastChild.textContent="Commander",l.onclick=()=>app.setting.closeActiveTab()):(l.parentElement.lastChild.textContent=u[e].name,l.onclick=()=>r(!0)))},[i]);let u=_t(()=>[{name:m("General"),tab:a(R,null,a(nt,{name:m("Always ask before removing?"),description:m("Always show a Popup to confirm deletion of a Command."),value:t.settings.confirmDeletion,changeHandler:async l=>{t.settings.confirmDeletion=!l,await t.saveSettings()}}),a(nt,{value:t.settings.showAddCommand,name:m('Show "Add Command" Button'),description:m('Show the "Add Command" Button in every Menu.'),changeHandler:async l=>{t.settings.showAddCommand=!l,t.manager.pageHeader.reorder(),await t.saveSettings()}}),a(nt,{value:t.settings.debug,name:m("Enable debugging"),description:m("Enable console output."),changeHandler:async l=>{t.settings.debug=!l,await t.saveSettings()}}),a(it,{value:t.settings.spacing,name:m("Choose custom spacing for Command Buttons"),description:m("Change the spacing between commands. You can set different values on mobile and desktop."),changeHandler:async l=>{Qe(l),t.settings.spacing=l,await t.saveSettings()}}))},{name:m("Left Ribbon"),tab:a(ae,{manager:t.manager.leftRibbon,plugin:t})},{name:m("Page Header"),tab:a(ae,{manager:t.manager.pageHeader,plugin:t},a("hr",null),a("div",{className:"cmdr-sep-con callout","data-callout":"warning"},a("span",{className:"cmdr-callout-warning"},a(w,{icon:"alert-triangle"})," ",m("Warning")),a("p",{className:"cmdr-warning-description"},m("As of Obsidian 0.16.0 you need to explicitly enable the View Header.")),a("button",{onClick:()=>{app.setting.openTabById("appearance"),setTimeout(()=>{var l,h,s,g;app.setting.activeTab.containerEl.scroll({behavior:"smooth",top:250}),(g=(s=(h=(l=app.setting.activeTab.containerEl.querySelectorAll(".setting-item-heading")[1].nextSibling)==null?void 0:l.nextSibling)==null?void 0:h.nextSibling)==null?void 0:s.addClass)==null||g.call(s,"cmdr-cta")},50)},className:"mod-cta"},m("Open Appearance Settings"))))},{name:m("Statusbar"),tab:a(ae,{manager:t.manager.statusBar,plugin:t},a(en,{plugin:t}))},{name:m("Editor Menu"),tab:a(ae,{manager:t.manager.editorMenu,plugin:t})},{name:m("File Menu"),tab:a(ae,{manager:t.manager.fileMenu,plugin:t})},{name:m("Explorer"),tab:a(ae,{manager:t.manager.explorerManager,plugin:t},a("hr",null),a("div",{className:"cmdr-sep-con callout","data-callout":"warning"},a("span",{className:"cmdr-callout-warning"},a(w,{icon:"alert-triangle"})," ",m("Warning")),a("p",{className:"cmdr-warning-description"},"When clicking on a Command in the Explorer, the Explorer view will become focused. This might interfere with Commands that are supposed to be executed on an active File/Explorer.")))},{name:Y.Platform.isMobile?"Mobile Toolbar":"Toolbar",tab:a(St,{plugin:t})},{name:"Macros",tab:a(Bt,{plugin:t,macros:t.settings.macros})}],[]);return a(R,null,Y.Platform.isDesktop&&a("div",{className:"cmdr-setting-title"},a("h1",null,t.manifest.name)),(Y.Platform.isDesktop||i)&&a(ii,{tabs:u,activeTab:e,setActiveTab:n,setOpen:r}),a("div",{class:`cmdr-setting-content ${o?"cmdr-mobile":""}`},(Y.Platform.isDesktop||!i)&&u[e].tab,(Y.Platform.isMobile&&i||Y.Platform.isDesktop&&e===0)&&a(xt,{manifest:t.manifest})))}function ii({tabs:t,activeTab:o,setActiveTab:e,setOpen:n}){let i=ee(null),r=c=>{var u;c.preventDefault(),(u=i.current)==null||u.scrollBy({left:c.deltaY>0?16:-16})};return q(()=>{let c=i.current;if(!(!c||Y.Platform.isMobile))return c.addEventListener("wheel",r),()=>c.removeEventListener("wheel",r)},[]),q(()=>{var c;return(c=document.querySelector(".cmdr-tab-active"))==null?void 0:c.scrollIntoView({behavior:"smooth",block:"nearest"})},[o]),a("nav",{class:`cmdr-setting-header ${Y.Platform.isMobile?"cmdr-mobile":""}`,ref:i},a("div",{class:`cmdr-setting-tab-group ${Y.Platform.isMobile?"vertical-tab-header-group-items":""}`},t.map((c,u)=>a("div",{className:`cmdr-tab ${o===u?"cmdr-tab-active":""} ${Y.Platform.isMobile?"vertical-tab-nav-item":""}`,onClick:()=>{e(u),n(!1)}},c.name,Y.Platform.isMobile&&a(w,{className:"vertical-tab-nav-item-chevron cmdr-block",icon:"chevron-right",size:24})))),Y.Platform.isDesktop&&a("div",{className:"cmdr-fill"}))}var Ne=class extends at.PluginSettingTab{constructor(e){super(app,e);this.plugin=e}display(){X(a(Ae,{plugin:this.plugin,mobileMode:at.Platform.isMobile}),this.containerEl)}hide(){X(null,this.containerEl)}};var rt=require("obsidian");var Le=class extends rt.Modal{constructor(e){super(app);this.plugin=e,this.containerEl.addClass("cmdr-setting-modal")}onOpen(){let e=rt.Platform.isMobile;X(a(Ae,{plugin:this.plugin,mobileMode:e}),this.contentEl)}onClose(){X(null,this.contentEl)}};var an=require("obsidian");function Dt(){(0,an.addIcon)("cmdr-all-devices",'')}var st=class extends rn.Plugin{async executeStartupMacros(){let e=setTimeout(()=>{this.settings.macros.forEach((n,i)=>{n.startup&&this.executeMacro(i)})},1e3);this.register(()=>clearTimeout(e))}async executeMacro(e){let n=this.settings.macros[e];if(!n)throw new Error("Macro not found");for(let i of n.macro)switch(i.action){case 0:{await app.commands.executeCommandById(i.commandId);continue}case 1:{await new Promise(r=>setTimeout(r,i.delay));continue}case 2:continue;case 3:{for(let r=0;rnew Le(this).open()}),this.registerEvent(app.workspace.on("editor-menu",this.manager.editorMenu.applyEditorMenuCommands(this))),this.registerEvent(app.workspace.on("file-menu",this.manager.fileMenu.applyFileMenuCommands(this))),app.workspace.onLayoutReady(()=>{Ke(this.settings),Ie(this),Qe(this.settings.spacing),oe(this.settings.advancedToolbar),et(this.settings.advancedToolbar),this.executeStartupMacros()})}onunload(){var e;(e=document.head.querySelector("style#cmdr"))==null||e.remove(),Xo()}async loadSettings(){let e=Object.assign({},ho,await this.loadData());this.settings=e}async saveSettings(){await this.saveData(this.settings)}listActiveToolbarCommands(){return this.app.vault.getConfig("mobileToolbarCommands")}getCommands(){let e=[];return this.listActiveToolbarCommands().forEach(n=>{let i=this.app.commands.commands[n];i&&e.push(i)}),e}getCommandsWithoutIcons(e=!0){let n=[];return this.getCommands().forEach(i=>{i&&!i.icon&&n.push(i)}),e&&this.getCommands().forEach(i=>{this.settings.advancedToolbar.mappedIcons.find(r=>r.commandID===i.id)&&n.push(i)}),n}}; +var Fe=Object.defineProperty,Dn=Object.defineProperties,Hn=Object.getOwnPropertyDescriptor,Rn=Object.getOwnPropertyDescriptors,Fn=Object.getOwnPropertyNames,Re=Object.getOwnPropertySymbols;var ht=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable;var jt=(e,o,t)=>o in e?Fe(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,Oe=(e,o)=>{for(var t in o||(o={}))ht.call(o,t)&&jt(e,t,o[t]);if(Re)for(var t of Re(o))$t.call(o,t)&&jt(e,t,o[t]);return e},Yt=(e,o)=>Dn(e,Rn(o));var Gt=(e,o)=>{var t={};for(var n in e)ht.call(e,n)&&o.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&Re)for(var n of Re(e))o.indexOf(n)<0&&$t.call(e,n)&&(t[n]=e[n]);return t};var On=(e,o)=>{for(var t in o)Fe(e,t,{get:o[t],enumerable:!0})},Vn=(e,o,t,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let i of Fn(o))!ht.call(e,i)&&i!==t&&Fe(e,i,{get:()=>o[i],enumerable:!(n=Hn(o,i))||n.enumerable});return e};var zn=e=>Vn(Fe({},"__esModule",{value:!0}),e);var Oi={};On(Oi,{default:()=>dt});module.exports=zn(Oi);var Ve=require("obsidian");var bt=require("obsidian");var Kt={};var Qt={};var eo={};var to={"Open Commander Settings":"Commander Einstellungen \xF6ffnen","Open Macro Builder":"Makro Baukasten \xF6ffnen","Change Icon":"Symbol ver\xE4ndern",Rename:"Umbenennen",Delete:"L\xF6schen","Add command":"Befehl hinzuf\xFCgen","Add new":"Neuen Befehl hinzuf\xFCgen","This Command seems to have been removed. {{command_name}}":"Dieser Befehl wurde entfernt. {{command_name}}","Choose a Command to add":"W\xE4hle einen Befehl zum hinzuf\xFCgen","to navigate":"zum navigieren","to choose an icon":"um ein symbol auszuw\xE4hlen","to cancel":"zum abbrechen","Use a custom name":"Nutze einen benutzerdefinierten Namen","Choose a custom Name for your new Command":"W\xE4hle einen benutzerdefinierten Namen f\xFCr deinen neuen Befehl","to save":"zum speichern","Choose a Icon for your new Command":"W\xE4hle ein Symbol f\xFCr deinen neuen Befehl","to choose a custom icon":"um ein benutzerdefiniertes Symbol auszuw\xE4hlen","Remove Command":"Befehl entfernen","Double click to rename":"Zum umbenennen doppelklicken","This device":"Dieses Ger\xE4t","Added by {{plugin_name}}.":"Hinzugef\xFCgt von {{plugin_name}}.","Warning: This is a checked Command, meaning it might not run under every circumstance.":"Warnung: Dieser Befehl wird nur unter bestimmten Vorraussetzungen ausgef\xFChrt.","Move down":"Nach unten","Move up":"Nach oben","Change Mode (Currently: {{current_mode}})":"Modus ver\xE4ndern (Momentan: {{current_mode}})","Are you sure you want to delete the Command?":"Bist du dir sicher, dass du diesen Befehl entfernen m\xF6chtest?","Remove and don't ask again":"Entfernen und Auswahl speichern",Remove:"Entfernen",Cancel:"Abbrechen","Always ask before removing?":"Immer fragen, bevor ein Befehl gel\xF6scht wird?","Always show a Popup to confirm deletion of a Command.":"Zeige immer ein Popup um L\xF6schen zu best\xE4tigen.",'Show "Add Command" Button':'Zeige "Befehl hinzuf\xFCgen" Knopf','Show the "Add Command" Button in every Menu. Requires restart.':'Zeige den "Befehl hinzuf\xFCgen" Knopf in jedem Men\xFC. Erfordert neustart.',"Please restart Obsidian for these changes to take effect.":"Bitte starte Obsidian neu, damit diese \xC4nderungen in Kraft treten.","Enable debugging":"Aktiviere debugging","Enable console output.":"Aktiviere Konsolen-Output (F\xFCr Entwickler)",General:"Allgemein","Editor Menu":"Editor-Men\xFC","File Menu":"Datei-Men\xFC","Left Ribbon":"Band","Right Ribbon":"Rechtes Band",Titlebar:"Titelleiste",Statusbar:"Statusleiste","Page Header":"Kopfzeile","Support development":"Entwicklung unterst\xFCtzen","No commands here!":"Keine Befehle da!","Would you like to add one now?":"M\xF6chtest du jetzt einen hinzuf\xFCgen?","Hide Commands":"Befehle verstecken","Choose new":"W\xE4hle neu","Hide Commands of other Plugins":"Hide Commands of other Plugins",Icon:"Symbol",Name:"Name","Custom Name":"Benutzerdefinierter Name","Add command to all devices":"F\xFCge Befehl allen Ger\xE4ten hinzu","Add command only to mobile devices":"F\xFCge Befehl nur Mobilen Ger\xE4ten hinzu","Add command only to desktop devices":"F\xFCge Befehl nur Desktop Ger\xE4ten hinzu","Add command only to this device":"F\xFCge Befehl nur diesem Ger\xE4t hinzu",Done:"Fertig","By Johnny\u2728 and phibr0":"Von Johnny\u2728 und phibr0","Leave feedback":"Feedback geben",Donate:"Spenden","Share feedback, issues, and ideas with our feedback form.":"Teile Feedback, Probleme und Ideen mit unserem Feedback Formular!","Consider donating to support development.":"Spende um die Entwicklung zu unterst\xFCtzen.",Save:"Speichern","This Command is not available on this device.":"Dieser Befehl ist auf diesem Ger\xE4t nicht verf\xFCgbar.",Show:"Anzeigen",Hide:"Verstecken","Hide other Commands":"Andere Befehle verstecken","Double click to enter custom value":"Doppelklicken um eigenen Wert einzutragen","Choose custom spacing for Command Buttons":"W\xE4hle den Abstand zwischen Befehlen","Change the spacing between commands. You can set different values on mobile and desktop.":"Ver\xE4ndert den Abstand zwischen Befehlen.",Warning:"Achtung","As of Obsidian 0.16.0 you need to explicitly enable the View Header.":'Ab Obsidian Version 0.16.0 m\xFCssen Sie den "View Header" explizit aktivieren. Anschlie\xDFend muss Obsidian neugestartet werden.',"Open Appearance Settings":"\xD6ffne Darstellungs-Einstellungen",Explorer:"Explorer"};var vt={"Open Commander Settings":"Open Commander Settings","Open Macro Builder":"Open Macro Builder","Change Icon":"Change Icon",Rename:"Rename",Delete:"Delete","Add command":"Add command","Add new":"Add new command","This Command seems to have been removed. {{command_name}}":"This Command seems to have been removed. {{command_name}}","Choose a Command to add":"Choose a Command to add","to navigate":"to navigate","to choose an icon":"to choose an icon","to cancel":"to cancel","Use a custom name":"Use a custom name","Choose a custom Name for your new Command":"Choose a custom Name for your new Command","to save":"to save","Choose a Icon for your new Command":"Choose a Icon for your new Command","to choose a custom icon":"to choose a custom icon","Remove Command":"Remove Command","Double click to rename":"Double click to rename","This device":"This device","Added by {{plugin_name}}.":"Added by {{plugin_name}}.","Warning: This is a checked Command, meaning it might not run under every circumstance.":"Warning: This is a checked Command, meaning it might not run under every circumstance.","Move down":"Move down","Move up":"Move up","Change Mode (Currently: {{current_mode}})":"Change Mode (Currently: {{current_mode}})","Are you sure you want to delete the Command?":"Are you sure you want to delete the Command?","Remove and don't ask again":"Remove and don't ask again",Remove:"Remove",Cancel:"Cancel","Always ask before removing?":"Always ask before removing?","Always show a Popup to confirm deletion of a Command.":"Always show a Popup to confirm deletion of a Command.",'Show "Add Command" Button':'Show "Add Command" Button','Show the "Add Command" Button in every Menu. Requires restart.':'Show the "Add Command" Button in every Menu. Requires restart.',"Please restart Obsidian for these changes to take effect.":"Please restart Obsidian for these changes to take effect.","Enable debugging":"Enable debugging","Enable console output.":"Enable console output.",General:"General","Editor Menu":"Editor Menu","File Menu":"File Menu","Left Ribbon":"Ribbon","Right Ribbon":"Right Ribbon",Titlebar:"Titlebar",Statusbar:"Status Bar","Page Header":"Tab Bar","Support development":"Support development","No commands here!":"No commands here!","Would you like to add one now?":"Would you like to add one now?","Hide Commands":"Hide Commands","Choose new":"Choose new","Hide Commands of other Plugins":"Hide Commands of other Plugins",Icon:"Icon",Name:"Name","Custom Name":"Custom Name","Add command to all devices":"Add command to all devices","Add command only to mobile devices":"Add command only to mobile devices","Add command only to desktop devices":"Add command only to desktop devices","Add command only to this device":"Add command only to this device",Done:"Done","By Johnny\u2728 and phibr0":"By Johnny\u2728 and phibr0","Leave feedback":"Leave feedback",Donate:"Donate","Share feedback, issues, and ideas with our feedback form.":"Share feedback, issues, and ideas with our feedback form.","Consider donating to support development.":"Consider donating to support development.",Save:"Save","This Command is not available on this device.":"This Command is not available on this device.",Show:"Show",Hide:"Hide","Hide other Commands":"Hide other Commands","Double click to enter custom value":"Double click to enter custom value","Choose custom spacing for Command Buttons":"Choose custom spacing for Command Buttons","Change the spacing between commands. You can set different values on mobile and desktop.":"Change the spacing between commands.",Warning:"Warning","As of Obsidian 0.16.0 you need to explicitly enable the View Header.":"As of Obsidian 0.16.0 you need to explicitly enable the Tab Title Bar. Once enabled, you might need to restart Obsidian.","Open Appearance Settings":"Open Appearance Settings",Explorer:"Explorer"};var oo={};var no={};var io={};var ao={};var ro={};var so={};var co={};var lo={};var mo={};var uo={};var po={};var fo={};var ho={};var vo={};var go={};var bo={};var _o={"Open Commander Settings":"\u6253\u5F00 Commander \u8BBE\u7F6E","Open Macro Builder":"\u6253\u5F00\u5B8F\u6307\u4EE4\u751F\u6210\u5668","Change Icon":"\u66F4\u6362\u56FE\u6807",Rename:"\u91CD\u547D\u540D",Delete:"\u5220\u9664","Add command":"\u6DFB\u52A0\u547D\u4EE4","Add new":"\u6DFB\u52A0\u65B0\u547D\u4EE4","This Command seems to have been removed. {{command_name}}":"\u8BE5\u547D\u4EE4\u4F3C\u4E4E\u5DF2\u88AB\u79FB\u9664\u3002{{command_name}}","Choose a Command to add":"\u9009\u62E9\u4E00\u4E2A\u547D\u4EE4\u5E76\u6DFB\u52A0","to navigate":"\u5BFC\u822A","to choose an icon":"\u9009\u4E2D\u4E00\u4E2A\u56FE\u6807","to cancel":"\u53D6\u6D88","Use a custom name":"\u4F7F\u7528\u4E00\u4E2A\u81EA\u5B9A\u4E49\u540D\u79F0","Choose a custom Name for your new Command":"\u4E3A\u4F60\u7684\u65B0\u547D\u4EE4\u9009\u62E9\u4E00\u4E2A\u81EA\u5B9A\u4E49\u540D\u79F0","to save":"\u4FDD\u5B58","Choose a Icon for your new Command":"\u4E3A\u4F60\u7684\u65B0\u547D\u4EE4\u9009\u62E9\u4E00\u4E2A\u56FE\u6807","to choose a custom icon":"\u9009\u62E9\u4E00\u4E2A\u81EA\u5B9A\u4E49\u56FE\u6807","Remove Command":"\u79FB\u9664\u547D\u4EE4","Double click to rename":"\u53CC\u51FB\u4EE5\u91CD\u547D\u540D","This device":"\u8BE5\u8BBE\u5907","Added by {{plugin_name}}.":"\u7531{{plugin_name}}\u6DFB\u52A0\u3002","Warning: This is a checked Command, meaning it might not run under every circumstance.":"\u8B66\u544A\uFF1A\u8FD9\u662F\u4E00\u4E2A\u53D7\u68C0\u7684\u547D\u4EE4\uFF0C\u8FD9\u610F\u5473\u7740\u5B83\u672A\u5FC5\u80FD\u5728\u6240\u4EE5\u73AF\u5883\u4E0B\u8FD0\u884C\u3002","Move down":"\u5411\u4E0B\u79FB\u52A8","Move up":"\u5411\u4E0A\u79FB\u52A8","Change Mode (Currently: {{current_mode}})":"\u5207\u6362\u6A21\u5F0F\uFF08\u5F53\u524D\uFF1A{{current_mode}}\uFF09","Are you sure you want to delete the Command?":"\u662F\u5426\u786E\u8BA4\u79FB\u9664\u8BE5\u547D\u4EE4\uFF1F","Remove and don't ask again":"\u79FB\u9664\u4E14\u4E0D\u8981\u518D\u8BE2\u95EE",Remove:"\u79FB\u9664",Cancel:"\u53D6\u6D88","Always ask before removing?":"\u5728\u79FB\u9664\u524D\u603B\u662F\u8BE2\u95EE\uFF1F","Always show a Popup to confirm deletion of a Command.":"\u5728\u786E\u8BA4\u79FB\u9664\u547D\u4EE4\u524D\u603B\u662F\u5F39\u7A97\u3002",'Show "Add Command" Button':"\u663E\u793A\u201C\u6DFB\u52A0\u547D\u4EE4\u201D\u6309\u94AE",'Show the "Add Command" Button in every Menu. Requires restart.':"\u5728\u6BCF\u4E2A\u83DC\u5355\u90FD\u5C55\u793A\u201C\u6DFB\u52A0\u547D\u4EE4\u201D\u6309\u94AE\u3002\u9700\u8981\u91CD\u542F\u3002","Please restart Obsidian for these changes to take effect.":"\u8BF7\u91CD\u542F Obsidian \u4EE5\u4F7F\u8FD9\u4E9B\u66F4\u6539\u751F\u6548\u3002","Enable debugging":"\u542F\u7528\u9664\u9519","Enable console output.":"\u542F\u7528\u63A7\u5236\u53F0\u8F93\u51FA\u3002",General:"\u901A\u7528","Editor Menu":"\u7F16\u8F91\u5668\u83DC\u5355","File Menu":"\u6587\u4EF6\u83DC\u5355","Left Ribbon":"\u5DE6\u4FA7\u8FB9\u680F","Right Ribbon":"\u53F3\u4FA7\u8FB9\u680F",Titlebar:"\u6807\u9898\u680F",Statusbar:"\u72B6\u6001\u680F","Page Header":"\u9875\u9996","Support development":"\u652F\u6301\u5F00\u53D1","No commands here!":"\u8FD9\u91CC\u6CA1\u6709\u547D\u4EE4\uFF01","Would you like to add one now?":"\u4F60\u73B0\u5728\u60F3\u8981\u52A0\u4E00\u4E2A\u5417\uFF1F","Hide Commands":"\u9690\u85CF\u547D\u4EE4","Choose new":"\u9009\u62E9\u65B0\u7684","Hide Commands of other Plugins":"\u9690\u85CF\u5176\u4ED6\u63D2\u4EF6\u7684\u547D\u4EE4",Icon:"\u56FE\u6807",Name:"\u540D\u79F0","Custom Name":"\u81EA\u5B9A\u4E49\u540D\u79F0","Add command to all devices":"\u5411\u6240\u6709\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to mobile devices":"\u53EA\u5411\u79FB\u52A8\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to desktop devices":"\u53EA\u5411\u684C\u9762\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4","Add command only to this device":"\u53EA\u5411\u5F53\u524D\u8BBE\u5907\u6DFB\u52A0\u547D\u4EE4",Done:"\u5B8C\u6210","By Johnny\u2728 and phibr0":"\u7531 Johnny\u2728 \u548C phibr0 \u5F00\u53D1","Leave feedback":"\u7559\u4E0B\u53CD\u9988",Donate:"\u6350\u8D60","Share feedback, issues, and ideas with our feedback form.":"\u4EE5\u6211\u4EEC\u7684\u53CD\u9988\u8868\uFF0C\u5206\u4EAB\u53CD\u9988\u3001\u8BAE\u9898\u6216\u8005\u4F60\u7684\u60F3\u6CD5\u3002","Consider donating to support development.":"\u8003\u8651\u6350\u8D60\u4EE5\u652F\u6301\u5F00\u53D1\u3002",Save:"\u4FDD\u5B58","This Command is not available on this device.":"\u8FD9\u4E00\u547D\u4EE4\u5728\u5F53\u524D\u8BBE\u5907\u4E0D\u53EF\u7528\u3002",Show:"\u663E\u793A",Hide:"\u9690\u85CF","Hide other Commands":"\u9690\u85CF\u5176\u4F59\u547D\u4EE4","Double click to enter custom value":"\u53CC\u51FB\u4EE5\u6DFB\u52A0\u81EA\u5B9A\u4E49\u503C","Choose custom spacing for Command Buttons":"\u4E3A\u547D\u4EE4\u6309\u94AE\u9009\u62E9\u81EA\u5B9A\u4E49\u95F4\u8DDD","Change the spacing between commands. You can set different values on mobile and desktop.":"\u6539\u53D8\u547D\u4EE4\u4E4B\u95F4\u7684\u95F4\u8DDD\u3002\u4F60\u53EF\u4EE5\u4E3A\u79FB\u52A8\u548C\u684C\u9762\u8BBE\u5907\u8BBE\u7F6E\u4E0D\u540C\u7684\u503C\u3002"};var Co={};var mi={ar:Kt,cs:Qt,da:eo,de:to,en:vt,"en-gb":oo,es:no,fr:io,hi:ao,id:ro,it:so,ja:co,ko:lo,nl:mo,nn:uo,pl:po,pt:fo,"pt-br":ho,ro:vo,ru:go,tr:bo,"zh-cn":_o,"zh-tw":Co},gt=mi[bt.moment.locale()];function u(e){return gt||console.error("Error: dictionary locale not found",bt.moment.locale()),gt&>[e]||vt[e]}var ne=class extends Ve.FuzzySuggestModal{constructor(t){super(app);this.plugin=t,this.commands=Object.values(app.commands.commands),this.setPlaceholder(u("Choose a Command to add")),this.setInstructions([{command:"\u2191\u2193",purpose:u("to navigate")},{command:"\u21B5",purpose:u("to choose an icon")},{command:"esc",purpose:u("to cancel")}])}async awaitSelection(){return this.open(),new Promise((t,n)=>{this.onChooseItem=i=>t(i),this.onClose=()=>window.setTimeout(()=>n("No Command selected"),0)})}renderSuggestion(t,n){if(n.addClass("mod-complex"),n.createDiv({cls:"suggestion-content"}).createDiv({cls:"suggestion-title"}).setText(t.item.name),t.item.icon){let a=n.createDiv({cls:"suggestion-aux"});(0,Ve.setIcon)(a.createSpan({cls:"suggestion-flair"}),t.item.icon)}}getItems(){return this.commands}getItemText(t){return t.name}onChooseItem(t,n){}};var yo={confirmDeletion:!0,showAddCommand:!0,debug:!1,editorMenu:[],fileMenu:[],leftRibbon:[],rightRibbon:[],titleBar:[],statusBar:[],pageHeader:[],macros:[],explorer:[],hide:{statusbar:[],leftRibbon:[]},spacing:8,advancedToolbar:{rowHeight:48,rowCount:1,spacing:0,buttonWidth:48,columnLayout:!1,mappedIcons:[],tooltips:!1,heightOffset:0}},wo=["activity","airplay","alarm-check","alarm-clock-off","alarm-clock","alarm-minus","alarm-plus","album","alert-circle","alert-octagon","alert-triangle","align-center-horizontal","align-center-vertical","align-center","align-end-horizontal","align-end-vertical","align-horizontal-distribute-center","align-horizontal-distribute-end","align-horizontal-distribute-start","align-horizontal-justify-center","align-horizontal-justify-end","align-horizontal-justify-start","align-horizontal-space-around","align-horizontal-space-between","align-justify","align-left","align-right","align-start-horizontal","align-start-vertical","align-vertical-distribute-center","align-vertical-distribute-end","align-vertical-distribute-start","align-vertical-justify-center","align-vertical-justify-end","align-vertical-justify-start","align-vertical-space-around","align-vertical-space-between","anchor","aperture","archive","arrow-big-down","arrow-big-left","arrow-big-right","arrow-big-up","arrow-down-circle","arrow-down-left","arrow-down-right","arrow-down","arrow-left-circle","arrow-left-right","arrow-left","arrow-right-circle","arrow-right","arrow-up-circle","arrow-up-left","arrow-up-right","arrow-up","asterisk","at-sign","award","axe","banknote","bar-chart-2","bar-chart","baseline","battery-charging","battery-full","battery-low","battery-medium","battery","beaker","bell-minus","bell-off","bell-plus","bell-ring","bell","bike","binary","bitcoin","bluetooth-connected","bluetooth-off","bluetooth-searching","bluetooth","bold","book-open","book","bookmark-minus","bookmark-plus","bookmark","bot","box-select","box","briefcase","brush","bug","building-2","building","bus","calculator","calendar","camera-off","camera","car","carrot","cast","check-circle-2","check-circle","check-square","check","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","chevrons-down-up","chevrons-down","chevrons-left","chevrons-right","chevrons-up-down","chevrons-up","chrome","circle-slashed","circle","clipboard-check","clipboard-copy","clipboard-list","clipboard-x","clipboard","clock-1","clock-10","clock-11","clock-12","clock-2","clock-3","clock-4","clock-5","clock-6","clock-7","clock-8","clock-9","lucide-clock","cloud-drizzle","cloud-fog","cloud-hail","cloud-lightning","cloud-moon","cloud-off","cloud-rain-wind","cloud-rain","cloud-snow","cloud-sun","lucide-cloud","cloudy","clover","code-2","code","codepen","codesandbox","coffee","coins","columns","command","compass","contact","contrast","cookie","copy","copyleft","copyright","corner-down-left","corner-down-right","corner-left-down","corner-left-up","corner-right-down","corner-right-up","corner-up-left","corner-up-right","cpu","credit-card","crop","lucide-cross","crosshair","crown","currency","database","delete","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","disc","divide-circle","divide-square","divide","dollar-sign","download-cloud","download","dribbble","droplet","droplets","drumstick","edit-2","edit-3","edit","egg","equal-not","equal","eraser","euro","expand","external-link","eye-off","eye","facebook","fast-forward","feather","figma","file-check-2","file-check","file-code","file-digit","file-input","file-minus-2","file-minus","file-output","file-plus-2","file-plus","file-search","file-text","file-x-2","file-x","file","files","film","filter","flag-off","flag-triangle-left","flag-triangle-right","flag","flame","flashlight-off","flashlight","flask-conical","flask-round","folder-minus","folder-open","folder-plus","lucide-folder","form-input","forward","frame","framer","frown","function-square","gamepad-2","gamepad","gauge","gavel","gem","ghost","gift","git-branch-plus","git-branch","git-commit","git-fork","git-merge","git-pull-request","github","gitlab","glasses","globe-2","globe","grab","graduation-cap","grid","grip-horizontal","grip-vertical","hammer","hand-metal","hand","hard-drive","hard-hat","hash","haze","headphones","heart","help-circle","hexagon","highlighter","history","home","image-minus","image-off","image-plus","image","import","inbox","indent","indian-rupee","infinity","lucide-info","inspect","instagram","italic","japanese-yen","key","keyboard","landmark","lucide-languages","laptop-2","laptop","lasso-select","lasso","layers","layout-dashboard","layout-grid","layout-list","layout-template","layout","library","life-buoy","lightbulb-off","lightbulb","link-2-off","link-2","lucide-link","linkedin","list-checks","list-minus","list-ordered","list-plus","list-x","list","loader-2","loader","locate-fixed","locate-off","locate","lock","log-in","log-out","mail","map-pin","map","maximize-2","maximize","megaphone","meh","menu","message-circle","message-square","mic-off","mic","minimize-2","minimize","minus-circle","minus-square","minus","monitor-off","monitor-speaker","monitor","moon","more-horizontal","more-vertical","mountain-snow","mountain","mouse-pointer-2","mouse-pointer-click","mouse-pointer","mouse","move-diagonal-2","move-diagonal","move-horizontal","move-vertical","move","music","navigation-2","navigation","network","octagon","option","outdent","package-check","package-minus","package-plus","package-search","package-x","package","palette","palmtree","paperclip","pause-circle","pause-octagon","pause","pen-tool","lucide-pencil","percent","person-standing","phone-call","phone-forwarded","phone-incoming","phone-missed","phone-off","phone-outgoing","phone","pie-chart","piggy-bank","lucide-pin","pipette","plane","play-circle","play","plug-zap","plus-circle","plus-square","plus","pocket","podcast","pointer","pound-sterling","power-off","power","printer","qr-code","quote","radio-receiver","radio","redo","refresh-ccw","refresh-cw","regex","repeat-1","repeat","reply-all","reply","rewind","rocket","rocking-chair","rotate-ccw","rotate-cw","rss","ruler","russian-ruble","save","scale","scan-line","scan","scissors","screen-share-off","screen-share","lucide-search","send","separator-horizontal","separator-vertical","server-crash","server-off","server","settings-2","settings","share-2","share","sheet","shield-alert","shield-check","shield-close","shield-off","shield","shirt","shopping-bag","shopping-cart","shovel","shrink","shuffle","sidebar-close","sidebar-open","sidebar","sigma","signal-high","signal-low","signal-medium","signal-zero","signal","skip-back","skip-forward","skull","slack","slash","sliders","smartphone-charging","smartphone","smile","snowflake","sort-asc","sort-desc","speaker","sprout","square","star-half","lucide-star","stop-circle","stretch-horizontal","stretch-vertical","strikethrough","subscript","sun","sunrise","sunset","superscript","swiss-franc","switch-camera","table","tablet","tag","target","tent","terminal-square","terminal","text-cursor-input","text-cursor","thermometer-snowflake","thermometer-sun","thermometer","thumbs-down","thumbs-up","ticket","timer-off","timer-reset","timer","toggle-left","toggle-right","tornado","trash-2","lucide-trash","trello","trending-down","trending-up","triangle","truck","tv-2","tv","twitch","twitter","type","umbrella","underline","undo","unlink-2","unlink","unlock","upload-cloud","upload","user-check","user-minus","user-plus","user-x","user","users","verified","vibrate","video-off","video","view","voicemail","volume-1","volume-2","volume-x","volume","wallet","wand","watch","waves","webcam","wifi-off","wifi","wind","wrap-text","wrench","x-circle","x-octagon","x-square","x","youtube","zap-off","zap","zoom-in","zoom-out","search-large"];var ze=require("obsidian");var H=class extends ze.FuzzySuggestModal{constructor(t){super(app);this.plugin=t,this.setPlaceholder(u("Choose a Icon for your new Command")),this.setInstructions([{command:"\u2191\u2193",purpose:u("to navigate")},{command:"\u21B5",purpose:u("to choose a custom icon")},{command:"esc",purpose:u("to cancel")}])}async awaitSelection(){return this.open(),new Promise((t,n)=>{this.onChooseItem=i=>t(i),this.onClose=()=>window.setTimeout(()=>n("No Icon selected"),0)})}renderSuggestion(t,n){n.addClass("mod-complex"),n.createDiv({cls:"suggestion-content"}).createDiv({cls:"suggestion-title"}).setText(t.item.replace(/-/g," ").replace(/(^\w{1})|(\s+\w{1})/g,c=>c.toUpperCase()));let a=n.createDiv({cls:"suggestion-aux"});(0,ze.setIcon)(a.createSpan({cls:"suggestion-flair"}),t.item)}getItems(){return wo}getItemText(t){return t}onChooseItem(t,n){}};var Qe=require("obsidian");var ko=require("obsidian");var U=class extends ko.SuggestModal{constructor(t){super(app);this.defaultName=t;this.setPlaceholder(u("Use a custom name")),this.resultContainerEl.style.display="none",this.setInstructions([{command:"",purpose:u("Choose a custom Name for your new Command")},{command:"\u21B5",purpose:u("to save")},{command:"esc",purpose:u("to cancel")}])}onOpen(){var i;super.onOpen(),this.inputEl.value=this.defaultName;let t=createDiv({cls:"cmdr-name-input-wrapper"});(i=this.inputEl.parentNode)==null||i.insertBefore(t,this.inputEl),t.appendChild(this.inputEl),t.parentElement.style.display="block";let n=createEl("button",{text:u("Save"),cls:"mod-cta"});n.onclick=a=>this.selectSuggestion(this.inputEl.value,a),t.appendChild(n)}async awaitSelection(){return this.open(),new Promise((t,n)=>{this.onChooseSuggestion=i=>t(i),this.onClose=()=>window.setTimeout(()=>n("No Name selected"),0)})}getSuggestions(t){return[t]}renderSuggestion(t,n){}onChooseSuggestion(t,n){}};var Xe,C,So,ui,Ce,Mo,Po,Ue={},To=[],pi=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function ie(e,o){for(var t in o)e[t]=o[t];return e}function Lo(e){var o=e.parentNode;o&&o.removeChild(e)}function r(e,o,t){var n,i,a,c={};for(a in o)a=="key"?n=o[a]:a=="ref"?i=o[a]:c[a]=o[a];if(arguments.length>2&&(c.children=arguments.length>3?Xe.call(arguments,2):t),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)c[a]===void 0&&(c[a]=e.defaultProps[a]);return We(e,c,n,i,null)}function We(e,o,t,n,i){var a={type:e,props:o,key:t,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i==null?++So:i};return i==null&&C.vnode!=null&&C.vnode(a),a}function P(e){return e.children}function G(e,o){this.props=e,this.context=o}function ye(e,o){if(o==null)return e.__?ye(e.__,e.__.__k.indexOf(e)+1):null;for(var t;o0?We(f.type,f.props,f.key,f.ref?f.ref:null,f.__v):f)!=null){if(f.__=t,f.__b=t.__b+1,(_=B[s])===null||_&&f.key==_.key&&f.type===_.type)B[s]=void 0;else for(g=0;g=t.__.length&&t.__.push({__V:je}),t.__[e]}function F(e){return Ye=1,Jo(jo,e)}function Jo(e,o,t){var n=Ge(ke++,2);if(n.t=e,!n.__c&&(n.__=[t?t(o):jo(void 0,o),function(a){var c=n.__N?n.__N[0]:n.__[0],d=n.t(c,a);c!==d&&(n.__N=[d,n.__[1]],n.__c.setState({}))}],n.__c=R,!R.u)){R.u=!0;var i=R.shouldComponentUpdate;R.shouldComponentUpdate=function(a,c,d){if(!n.__c.__H)return!0;var m=n.__c.__H.__.filter(function(s){return s.__c});if(m.every(function(s){return!s.__N}))return!i||i.call(this,a,c,d);var h=!1;return m.forEach(function(s){if(s.__N){var g=s.__[0];s.__=s.__N,s.__N=void 0,g!==s.__[0]&&(h=!0)}}),!(!h&&n.__c.props===a)&&(!i||i.call(this,a,c,d))}}return n.__N||n.__}function V(e,o){var t=Ge(ke++,3);!C.__s&&Mt(t.__H,o)&&(t.__=e,t.i=o,R.__H.__h.push(t))}function kt(e,o){var t=Ge(ke++,4);!C.__s&&Mt(t.__H,o)&&(t.__=e,t.i=o,R.__h.push(t))}function K(e){return Ye=5,Ke(function(){return{current:e}},[])}function Ke(e,o){var t=Ge(ke++,7);return Mt(t.__H,o)?(t.__V=e(),t.i=o,t.__h=e,t.__V):t.__}function gi(){for(var e;e=Xo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach($e),e.__H.__h.forEach(wt),e.__H.__h=[]}catch(o){e.__H.__h=[],C.__e(o,e.__v)}}C.__b=function(e){R=null,Vo&&Vo(e)},C.__r=function(e){zo&&zo(e),ke=0;var o=(R=e.__c).__H;o&&(yt===R?(o.__h=[],R.__h=[],o.__.forEach(function(t){t.__N&&(t.__=t.__N),t.__V=je,t.__N=t.i=void 0})):(o.__h.forEach($e),o.__h.forEach(wt),o.__h=[])),yt=R},C.diffed=function(e){Wo&&Wo(e);var o=e.__c;o&&o.__H&&(o.__H.__h.length&&(Xo.push(o)!==1&&Oo===C.requestAnimationFrame||((Oo=C.requestAnimationFrame)||bi)(gi)),o.__H.__.forEach(function(t){t.i&&(t.__H=t.i),t.__V!==je&&(t.__=t.__V),t.i=void 0,t.__V=je})),yt=R=null},C.__c=function(e,o){o.some(function(t){try{t.__h.forEach($e),t.__h=t.__h.filter(function(n){return!n.__||wt(n)})}catch(n){o.some(function(i){i.__h&&(i.__h=[])}),o=[],C.__e(n,t.__v)}}),Uo&&Uo(e,o)},C.unmount=function(e){Zo&&Zo(e);var o,t=e.__c;t&&t.__H&&(t.__H.__.forEach(function(n){try{$e(n)}catch(i){o=i}}),t.__H=void 0,o&&C.__e(o,t.__v))};var qo=typeof requestAnimationFrame=="function";function bi(e){var o,t=function(){clearTimeout(n),qo&&cancelAnimationFrame(o),setTimeout(e)},n=setTimeout(t,100);qo&&(o=requestAnimationFrame(t))}function $e(e){var o=R,t=e.__c;typeof t=="function"&&(e.__c=void 0,t()),R=o}function wt(e){var o=R;e.__c=e.__(),R=o}function Mt(e,o){return!e||e.length!==o.length||o.some(function(t,n){return t!==e[n]})}function jo(e,o){return typeof o=="function"?o(e):o}var xt={};(function e(o,t,n,i){var a=!!(o.Worker&&o.Blob&&o.Promise&&o.OffscreenCanvas&&o.OffscreenCanvasRenderingContext2D&&o.HTMLCanvasElement&&o.HTMLCanvasElement.prototype.transferControlToOffscreen&&o.URL&&o.URL.createObjectURL);function c(){}function d(p){var l=t.exports.Promise,E=l!==void 0?l:o.Promise;return typeof E=="function"?new E(p):(p(c,c),null)}var m=function(){var p=Math.floor(16.666666666666668),l,E,M={},T=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(l=function(S){var x=Math.random();return M[x]=requestAnimationFrame(function I(N){T===N||T+p-1{(0,Qe.setIcon)(a.current,e)},[e,o]),r("div",Oe({ref:a},t))}function $(e){let{isMobile:o,appId:t}=app;return e==="any"||e===t||e==="mobile"&&o||e==="desktop"&&!o}function et(e){var t;let o="";for(let n of e.hide.statusbar)o+=`div.status-bar-item.plugin-${n} {display: none !important; content-visibility: hidden;}`;(t=document.head.querySelector("style#cmdr"))==null||t.remove(),o&&document.head.appendChild(createEl("style",{attr:{id:"cmdr"},text:o,type:"text/css"}))}async function It({target:e}){let o=activeDocument.createElement("canvas");activeDocument.body.appendChild(o),o.style.position="fixed",o.style.width="100vw",o.style.height="100vh",o.style.top="0px",o.style.left="0px",o.style["pointer-events"]="none",o.style["z-index"]="100";let t=$o.create(o,{resize:!0,useWorker:!0}),n=e.getBoundingClientRect();await t({particleCount:Qe.Platform.isDesktop?160:80,startVelocity:55,spread:75,angle:90,drift:-1,ticks:250,origin:{x:(n.x+n.width/2)/activeWindow.innerWidth,y:(n.y+n.height/2)/activeWindow.innerHeight}}),o.remove()}function tt(e){activeDocument.body.style.setProperty("--cmdr-spacing",`${e}px`)}function Me(e){let o=Object.keys(app.commands.commands).filter(n=>n.startsWith("cmdr:macro-"));for(let n of o)app.commands.removeCommand(n);let t=e.settings.macros;for(let[n,i]of Object.entries(t))e.addCommand({id:`macro-${n}`,name:i.name,callback:()=>{e.executeMacro(parseInt(n))}})}function oe(e){var n,i;let{classList:o,style:t}=document.body;t.setProperty("--at-button-height",((n=e.rowHeight)!=null?n:48)+"px"),t.setProperty("--at-button-width",((i=e.buttonWidth)!=null?i:48)+"px"),t.setProperty("--at-row-count",e.rowCount.toString()),t.setProperty("--at-spacing",e.spacing+"px"),t.setProperty("--at-offset",e.heightOffset+"px"),o.toggle("AT-multirow",e.rowCount>1),o.toggle("AT-row",!e.columnLayout),o.toggle("AT-column",e.columnLayout),o.toggle("AT-no-toolbar",e.rowCount===0)}function Yo(){let{classList:e,style:o}=document.body;o.removeProperty("--at-button-height"),o.removeProperty("--at-button-width"),o.removeProperty("--at-row-count"),o.removeProperty("--at-spacing"),o.removeProperty("--at-offset"),e.remove("AT-multirow"),e.remove("AT-row"),e.remove("AT-column"),e.remove("AT-no-toolbar"),e.remove("advanced-toolbar")}function ot(e){e.mappedIcons.forEach(o=>{let t=app.commands.commands[o.commandID];t?t.icon=o.iconID:e.mappedIcons.remove(o)})}var In=require("obsidian");var xe=require("obsidian");var Ko=require("obsidian");function Go({modal:e}){return r(P,null,r("p",null,u("Are you sure you want to delete the Command?")),r("div",{className:"modal-button-container"},r("button",{className:"mod-warning",onClick:async()=>{e.plugin.settings.confirmDeletion=!1,e.plugin.saveSettings(),e.remove=!0,e.close()}},u("Remove and don't ask again")),r("button",{className:"mod-warning",onClick:()=>{e.remove=!0,e.close()}},u("Remove")),r("button",{onClick:()=>{e.remove=!1,e.close()}},u("Cancel"))))}var O=class extends Ko.Modal{constructor(t){super(app);this.plugin=t}async onOpen(){this.titleEl.innerText=u("Remove Command"),this.containerEl.style.zIndex="99",this.reactComponent=r(Go,{modal:this}),W(this.reactComponent,this.contentEl)}async didChooseRemove(){return this.open(),new Promise(t=>{this.onClose=()=>{var n;return t((n=this.remove)!=null?n:!1)}})}onClose(){W(null,this.contentEl)}};var q=class{constructor(o,t){this.plugin=o,this.pairs=t}};var ve=class extends q{constructor(t,n){super(t,n);this.actions=new Map;this.init(),this.plugin.register(()=>this.actions.forEach((i,a)=>this.removeAction(a)))}getFileExplorers(){return app.workspace.getLeavesOfType("file-explorer")}init(){app.workspace.onLayoutReady(()=>{for(let t of this.pairs)$(t.mode)&&(app.workspace.onLayoutReady(()=>{this.getFileExplorers().forEach(i=>{this.addAction(t,i)})}),this.plugin.registerEvent(app.workspace.on("layout-change",()=>{this.getFileExplorers().forEach(i=>{this.addAction(t,i)})})))})}reorder(){this.actions.forEach((t,n)=>this.removeAction(n,!0)),this.init()}async addCommand(t){this.pairs.push(t),app.workspace.onLayoutReady(()=>{this.getFileExplorers().forEach(i=>{this.addAction(t,i)})}),this.plugin.registerEvent(app.workspace.on("layout-change",()=>{this.getFileExplorers().forEach(i=>{this.addAction(t,i)})})),await this.plugin.saveSettings()}async removeCommand(t){this.pairs.remove(t),this.removeAction(t),await this.plugin.saveSettings()}buttonExists(t,n){return[...t.view.containerEl.querySelectorAll("div.nav-buttons-container > .cmdr.clickable-icon")].some(i=>i.getAttribute("data-cmdr")===n.icon+n.name)}addAction(t,n){var m,h,s,g,_;if(this.buttonExists(n,t))return;let i=createDiv({cls:"cmdr clickable-icon",attr:{"aria-label-position":"top","aria-label":t.name,"data-cmdr":t.icon+t.name}});this.actions.set(t,i),i.style.color=t.color==="#000000"||t.color===void 0?"inherit":t.color;let a=!1,c=()=>{i.empty(),(0,xe.setIcon)(i,t.icon),i.onclick=()=>app.commands.executeCommandById(t.id)},d=()=>{i.empty(),(0,xe.setIcon)(i,"trash"),i.onclick=async()=>{(!this.plugin.settings.confirmDeletion||await new O(this.plugin).didChooseRemove())&&this.removeCommand(t)}};i.addEventListener("mouseleave",()=>{c(),a=!1}),i.addEventListener("mousemove",f=>{f.preventDefault(),f.stopImmediatePropagation(),f.shiftKey&&(a||d(),a=!0)}),i.addEventListener("contextmenu",f=>{f.stopImmediatePropagation(),new xe.Menu().addItem(b=>{b.setTitle(u("Add command")).setIcon("command").onClick(async()=>{let y=await Z(this.plugin);this.addCommand(y)})}).addSeparator().addItem(b=>{b.setTitle(u("Change Icon")).setIcon("box").onClick(async()=>{let y=await new H(this.plugin).awaitSelection();y&&y!==t.icon&&(t.icon=y,await this.plugin.saveSettings(),this.reorder())})}).addItem(b=>{b.setTitle(u("Rename")).setIcon("text-cursor-input").onClick(async()=>{let y=await new U(t.name).awaitSelection();y&&y!==t.name&&(t.name=y,await this.plugin.saveSettings(),this.reorder())})}).addItem(b=>{b.dom.addClass("is-warning"),b.setTitle(u("Delete")).setIcon("lucide-trash").onClick(async()=>{(!this.plugin.settings.confirmDeletion||await new O(this.plugin).didChooseRemove())&&this.removeCommand(t)})}).showAtMouseEvent(f)}),c(),(_=(g=(s=(h=(m=n.view)==null?void 0:m.containerEl)==null?void 0:h.querySelector)==null?void 0:s.call(h,"div.nav-buttons-container"))==null?void 0:g.appendChild)==null||_.call(g,i)}removeAction(t,n=!1){let i=this.actions.get(t);if(!!i){if(n){i.remove(),this.actions.delete(t);return}i.addClass("cmdr-ribbon-removing"),i.addEventListener("transitionend",async()=>{i.remove(),this.actions.delete(t)})}}};var se=require("obsidian");var nt=class extends q{async addCommand(o){this.pairs.push(o),await this.plugin.saveSettings()}async removeCommand(o){this.pairs.remove(o),await this.plugin.saveSettings()}reorder(){}addRemovableCommand(o,t,n,i,a){return c=>{var f;c.dom.addClass("cmdr"),c.dom.style.color=t.color==="#000000"||t.color===void 0?"inherit":t.color,c.setSection("cmdr"),c.dom.style.display="flex";let d=createDiv({cls:"cmdr-menu-more-options"}),m=null;d.addEventListener("click",b=>{b.preventDefault(),b.stopImmediatePropagation(),m?(m.hide(),m=null):m=new se.Menu().addItem(y=>{y.setTitle(u("Change Icon")).setIcon("box").onClick(async()=>{let v=await new H(n).awaitSelection();v&&v!==t.icon&&(t.icon=v,await n.saveSettings())})}).addItem(y=>{y.setTitle(u("Rename")).setIcon("text-cursor-input").onClick(async()=>{let v=await new U(t.name).awaitSelection();v&&v!==t.name&&(t.name=v,await n.saveSettings())})}).addItem(y=>{y.dom.addClass("is-warning"),y.setTitle(u("Delete")).setIcon("lucide-trash").onClick(async()=>{(!n.settings.confirmDeletion||await new O(n).didChooseRemove())&&_()})}).showAtMouseEvent(b)}),(0,se.setIcon)(d,"more-vertical"),c.dom.append(d),c.setTitle((f=t.name)!=null?f:o.name).setIcon(t.icon).onClick(()=>app.commands.executeCommandById(t.id));let h=!1,s=()=>{d.style.display="none"},g=()=>{d.style.display="block"},_=async()=>{c.dom.addClass("cmdr-removing"),i.registerDomEvent(c.dom,"transitionend",()=>{c.dom.remove()}),a.remove(t),await n.saveSettings()};i.registerDomEvent(c.dom,"mousemove",b=>{b.preventDefault(),b.stopImmediatePropagation(),h||g(),h=!0}),i.registerDomEvent(c.dom,"mouseleave",()=>{s(),h=!1}),s()}}addCommandAddButton(o,t,n){o.settings.showAddCommand&&t.addItem(i=>{i.setTitle(u("Add command")).setIcon("plus-circle").setSection("cmdr").onClick(async()=>{try{let a=await Z(o);n.push(a),await o.saveSettings()}catch(a){console.log(a)}})})}},Ie=class extends nt{applyEditorMenuCommands(o){return async(t,n,i)=>{this.addCommandAddButton(o,t,o.settings.editorMenu);for(let a of o.settings.editorMenu){let c=Q(a.id);!c||!$(a.mode)||c.checkCallback&&!c.checkCallback(!0)||c.editorCheckCallback&&!c.editorCheckCallback(!0,n,i)||t.addItem(this.addRemovableCommand.call(this,c,a,o,t,o.settings.editorMenu))}}}},Ee=class extends nt{applyFileMenuCommands(o){return async(t,n,i,a)=>{this.addCommandAddButton(o,t,o.settings.fileMenu);for(let c of o.settings.fileMenu){let d=Q(c.id);if(!!d&&!(d.checkCallback&&!d.checkCallback(!0))){if(d.editorCallback){if(!((a==null?void 0:a.view)instanceof se.MarkdownView))continue}else if(d.editorCheckCallback)if((a==null?void 0:a.view)instanceof se.MarkdownView){if(!d.editorCheckCallback(!0,a.view.editor,a.view))continue}else continue;t.addItem(this.addRemovableCommand.call(this,d,c,o,t,o.settings.fileMenu))}}}}};var ce=require("obsidian");var ge=class extends q{constructor(t,n){super(t,n);this.buttons=new WeakMap;this.init()}addPageHeaderButton(t,n){let{id:i,icon:a,name:c}=n,{view:d}=t;if(!(d instanceof ce.ItemView))return;let m=this.buttonsFor(t,!0);if(!m||m.has(i))return;let h=d.addAction(a,c,()=>{app.workspace.setActiveLeaf(t,{focus:!0}),app.commands.executeCommandById(i)});m.set(i,h),h.addClasses(["cmdr-page-header",i]),h.style.color=n.color==="#000000"||n.color===void 0?"inherit":n.color,h.addEventListener("contextmenu",s=>{s.stopImmediatePropagation(),new ce.Menu().addItem(g=>{g.setTitle(u("Add command")).setIcon("command").onClick(async()=>{let _=await Z(this.plugin);this.addCommand(_)})}).addSeparator().addItem(g=>{g.setTitle(u("Change Icon")).setIcon("box").onClick(async()=>{let _=await new H(this.plugin).awaitSelection();_&&_!==n.icon&&(n.icon=_,await this.plugin.saveSettings(),this.reorder())})}).addItem(g=>{g.setTitle(u("Rename")).setIcon("text-cursor-input").onClick(async()=>{let _=await new U(n.name).awaitSelection();_&&_!==n.name&&(n.name=_,await this.plugin.saveSettings(),this.reorder())})}).addItem(g=>{g.dom.addClass("is-warning"),g.setTitle(u("Delete")).setIcon("lucide-trash").onClick(async()=>{(!this.plugin.settings.confirmDeletion||await new O(this.plugin).didChooseRemove())&&this.removeCommand(n)})}).showAtMouseEvent(s)})}init(){this.plugin.register(()=>{this.removeButtonsFromAllLeaves()}),this.plugin.registerEvent(app.workspace.on("layout-change",()=>{this.addButtonsToAllLeaves()})),app.workspace.onLayoutReady(()=>setTimeout(()=>this.addButtonsToAllLeaves(),100))}addAdderButton(t){var c;let{view:n}=t,i="cmdr-adder";if(!(n instanceof ce.ItemView)||(c=this.buttons.get(n))!=null&&c.has(i))return;let a=n.addAction("plus",u("Add new"),async()=>{this.addCommand(await Z(this.plugin))});a.addClasses(["cmdr",i]),this.buttons.has(n)||this.buttons.set(n,new Map),this.buttons.get(n).set(i,a)}addButtonsToAllLeaves(t=!1){activeWindow.requestAnimationFrame(()=>app.workspace.iterateAllLeaves(n=>this.addButtonsToLeaf(n,t)))}removeButtonsFromAllLeaves(){activeWindow.requestAnimationFrame(()=>app.workspace.iterateAllLeaves(t=>this.removeButtonsFromLeaf(t)))}buttonsFor(t,n=!1){if(t.view instanceof ce.ItemView)return n&&!this.buttons.has(t.view)&&this.buttons.set(t.view,new Map),this.buttons.get(t.view)}addButtonsToLeaf(t,n=!1){var i;if(t.view instanceof ce.ItemView){if(n)this.removeButtonsFromLeaf(t);else if((i=this.buttonsFor(t))!=null&&i.size)return;for(let a=this.pairs.length-1;a>=0;a--){let c=this.pairs[a];$(c.mode)&&this.addPageHeaderButton(t,c)}this.plugin.settings.showAddCommand&&this.addAdderButton(t)}}removeButtonsFromLeaf(t){let n=this.buttonsFor(t);if(n){for(let i of n.values())i.detach();n==null||n.clear()}}reorder(){this.addButtonsToAllLeaves(!0)}async addCommand(t){this.pairs.push(t),this.addButtonsToAllLeaves(!0),await this.plugin.saveSettings()}async removeCommand(t){this.pairs.remove(t),this.addButtonsToAllLeaves(!0),await this.plugin.saveSettings()}};var Et=require("obsidian");var le=require("obsidian");var be=class extends q{constructor(t,n){super(t,n);this.actions=new Map;this.addBtn=createDiv({cls:"cmdr status-bar-item cmdr-adder",attr:{"aria-label-position":"top","aria-label":u("Add new")}});this.init(),this.plugin.register(()=>this.actions.forEach((i,a)=>this.removeAction(a)))}init(){app.workspace.onLayoutReady(()=>{this.container=app.statusBar.containerEl;for(let t of this.pairs)Q(t.id)||this.pairs.remove(t),$(t.mode)&&this.addAction(t);this.plugin.saveSettings(),this.plugin.registerDomEvent(this.container,"contextmenu",t=>{t.target===this.container&&new le.Menu().addItem(n=>{n.setTitle(u("Add command")).setIcon("command").onClick(async()=>{let i=await Z(this.plugin);this.addCommand(i)})}).showAtMouseEvent(t)}),this.plugin.register(()=>this.addBtn.remove()),(0,le.setIcon)(this.addBtn,"plus"),this.addBtn.onclick=async()=>{let t=await Z(this.plugin);this.addCommand(t),this.reorder()},this.plugin.settings.showAddCommand&&this.container.prepend(this.addBtn)})}reorder(){this.addBtn.remove(),this.actions.forEach((t,n)=>this.removeAction(n,!0)),this.init()}async addCommand(t){this.pairs.push(t),this.addAction(t),await this.plugin.saveSettings()}async removeCommand(t){this.pairs.remove(t),this.removeAction(t),await this.plugin.saveSettings()}addAction(t){let n=createDiv({cls:"cmdr status-bar-item clickable-icon",attr:{"aria-label-position":"top","aria-label":t.name}});this.actions.set(t,n),n.style.color=t.color==="#000000"||t.color===void 0?"inherit":t.color;let i=!1,a=()=>{n.empty(),(0,le.setIcon)(n,t.icon),n.onclick=()=>app.commands.executeCommandById(t.id)},c=()=>{n.empty(),(0,le.setIcon)(n,"trash"),n.onclick=async()=>{(!this.plugin.settings.confirmDeletion||await new O(this.plugin).didChooseRemove())&&this.removeCommand(t)}};n.addEventListener("mouseleave",()=>{a(),i=!1}),n.addEventListener("mousemove",d=>{d.preventDefault(),d.stopImmediatePropagation(),d.shiftKey&&(i||c(),i=!0)}),n.addEventListener("contextmenu",d=>{d.stopImmediatePropagation(),new le.Menu().addItem(m=>{m.setTitle(u("Add command")).setIcon("command").onClick(async()=>{let h=await Z(this.plugin);this.addCommand(h)})}).addSeparator().addItem(m=>{m.setTitle(u("Change Icon")).setIcon("box").onClick(async()=>{let h=await new H(this.plugin).awaitSelection();h&&h!==t.icon&&(t.icon=h,await this.plugin.saveSettings(),this.reorder())})}).addItem(m=>{m.setTitle(u("Rename")).setIcon("text-cursor-input").onClick(async()=>{let h=await new U(t.name).awaitSelection();h&&h!==t.name&&(t.name=h,await this.plugin.saveSettings(),this.reorder())})}).addItem(m=>{m.dom.addClass("is-warning"),m.setTitle(u("Delete")).setIcon("lucide-trash").onClick(async()=>{(!this.plugin.settings.confirmDeletion||await new O(this.plugin).didChooseRemove())&&this.removeCommand(t)})}).showAtMouseEvent(d)}),a(),this.container.prepend(n)}removeAction(t,n=!1){let i=this.actions.get(t);if(!!i){if(n){i.remove(),this.actions.delete(t);return}i.addClass("cmdr-ribbon-removing"),i.addEventListener("transitionend",async()=>{i.remove(),this.actions.delete(t)})}}};var Qo=require("obsidian");var ct=require("obsidian");var J=require("obsidian");var Lt=require("obsidian");function St(){return r("div",{className:"cmdr-credits"},r("span",null,u("By Johnny\u2728 and phibr0")))}function Ci(e,o){for(var t in o)e[t]=o[t];return e}function Tt(e,o){for(var t in e)if(t!=="__source"&&!(t in o))return!0;for(var n in o)if(n!=="__source"&&e[n]!==o[n])return!0;return!1}function en(e){this.props=e}function ln(e,o){function t(i){var a=this.props.ref,c=a==i.ref;return!c&&a&&(a.call?a(null):a.current=null),o?!o(this.props,i)||!c:Tt(this.props,i)}function n(i){return this.shouldComponentUpdate=t,r(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(en.prototype=new G).isPureReactComponent=!0,en.prototype.shouldComponentUpdate=function(e,o){return Tt(this.props,e)||Tt(this.state,o)};var tn=C.__b;C.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),tn&&tn(e)};var Ds=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;var yi=C.__e;C.__e=function(e,o,t,n){if(e.then){for(var i,a=o;a=a.__;)if((i=a.__c)&&i.__c)return o.__e==null&&(o.__e=t.__e,o.__k=t.__k),i.__c(e,o)}yi(e,o,t,n)};var on=C.unmount;function dn(e,o,t){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=Ci({},e)).__c!=null&&(e.__c.__P===t&&(e.__c.__P=o),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return dn(n,o,t)})),e}function mn(e,o,t){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return mn(n,o,t)}),e.__c&&e.__c.__P===o&&(e.__e&&t.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=t)),e}function Pt(){this.__u=0,this.t=null,this.__b=null}function un(e){var o=e.__.__c;return o&&o.__a&&o.__a(e)}function it(){this.u=null,this.o=null}C.unmount=function(e){var o=e.__c;o&&o.__R&&o.__R(),o&&e.__h===!0&&(e.type=null),on&&on(e)},(Pt.prototype=new G).__c=function(e,o){var t=o.__c,n=this;n.t==null&&(n.t=[]),n.t.push(t);var i=un(n.__v),a=!1,c=function(){a||(a=!0,t.__R=null,i?i(d):d())};t.__R=c;var d=function(){if(!--n.__u){if(n.state.__a){var h=n.state.__a;n.__v.__k[0]=mn(h,h.__c.__P,h.__c.__O)}var s;for(n.setState({__a:n.__b=null});s=n.t.pop();)s.forceUpdate()}},m=o.__h===!0;n.__u++||m||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(c,c)},Pt.prototype.componentWillUnmount=function(){this.t=[]},Pt.prototype.render=function(e,o){if(this.__b){if(this.__v.__k){var t=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=dn(this.__b,t,n.__O=n.__P)}this.__b=null}var i=o.__a&&r(P,null,e.fallback);return i&&(i.__h=null),[r(P,null,o.__a?null:e.children),i]};var nn=function(e,o,t){if(++t[1]===t[0]&&e.o.delete(o),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(t=e.u;t;){for(;t.length>3;)t.pop()();if(t[1]{It(n),setTimeout(()=>location.replace("https://forms.gle/hPjn61G9bqqFb3256"),Math.random()*800+500)}},r(k,{icon:"message-square",size:20}),u("Leave feedback")),t=r("button",{className:"mod-cta",onClick:n=>{It(n),setTimeout(()=>location.replace("https://ko-fi.com/phibr0"),Math.random()*800+500)}},r(k,{icon:"coffee",size:20}),u("Support development"));return r("div",{className:"cmdr-about"},Lt.Platform.isMobile&&[r("hr",null),o,t],Lt.Platform.isDesktop&&[r("div",{className:"setting-item mod-toggle",style:{width:"100%",borderTop:"1px solid var(--background-modifier-border)",paddingTop:"18px"}},r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},u("Leave feedback")),r("div",{className:"setting-item-description"},u("Share feedback, issues, and ideas with our feedback form."))),r("div",{className:"setting-item-control"},o)),r("div",{className:"setting-item mod-toggle",style:{width:"100%"}},r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},u("Donate")),r("div",{className:"setting-item-description"},u("Consider donating to support development."))),r("div",{className:"setting-item-control"},t)),r("hr",null)],r(_e,null),r("b",null,e.name),r(St,null),r("a",{className:"cmdr-version",href:"https://github.com/phibr0/obsidian-commander/releases/tag/"+e.version},e.version))}var z=require("obsidian");function Nt(e,o){if(e.empty(),new z.Setting(e).setName("Toolbar Row Count").setDesc("Set how many Rows the Mobile Toolbar should have. Set this to 0 to remove the Toolbar.").addSlider(n=>n.setLimits(0,5,1).setValue(o.settings.advancedToolbar.rowCount).setDynamicTooltip().onChange(async i=>{o.settings.advancedToolbar.rowCount=i,await o.saveSettings(),oe(o.settings.advancedToolbar)})),new z.Setting(e).setName("Column Layout").setDesc("Use a column based layout instead of the default row. This makes it easier to arrange the Commands.").addToggle(n=>n.setValue(o.settings.advancedToolbar.columnLayout).onChange(async i=>{o.settings.advancedToolbar.columnLayout=i,await o.saveSettings(),oe(o.settings.advancedToolbar)})),new z.Setting(e).setName("Bottom Offset").setDesc("Offset the Toolbar from the Bottom of the Screen. This is useful if the toolbar is partially obscured by other UI Elements.").addSlider(n=>n.setLimits(0,32,1).setValue(o.settings.advancedToolbar.heightOffset).setDynamicTooltip().onChange(async i=>{o.settings.advancedToolbar.heightOffset=i,await o.saveSettings(),oe(o.settings.advancedToolbar)})),z.Platform.isMobile){let n=document.createDocumentFragment();n.appendChild(createEl("h3",{text:"Custom Icons"})),e.appendChild(n),o.getCommandsWithoutIcons().forEach(i=>{new z.Setting(e).setName(i.name).setDesc(`ID: ${i.id}`).addButton(a=>{var d;let c=a.buttonEl.createDiv({cls:"AT-settings-icon"});if(i.icon)(0,z.setIcon)(c,i.icon,20);else{let m=(d=o.settings.advancedToolbar.mappedIcons.find(h=>h.commandID===i.id))==null?void 0:d.iconID;m?(0,z.setIcon)(c,m):a.setButtonText("No Icon")}a.onClick(async()=>{let m=await new H(o).awaitSelection(),h=o.settings.advancedToolbar.mappedIcons.find(s=>s.commandID===i.id);h?h.iconID=m:o.settings.advancedToolbar.mappedIcons.push({commandID:i.id,iconID:m}),await o.saveSettings(),ot(o.settings.advancedToolbar),Nt(e,o)})}).addExtraButton(a=>{a.setIcon("reset").setTooltip("Reset to default - Requires a restart").onClick(async()=>{o.settings.advancedToolbar.mappedIcons=o.settings.advancedToolbar.mappedIcons.filter(c=>c.commandID!==i.id),delete i.icon,delete app.commands.commands[i.id].icon,await o.saveSettings(),Nt(e,o),new z.Notice("If the default Icon doesn't appear, you might have to restart Obsidian.")})})})}let t=e.appendChild(createEl("div",{cls:"cmdr-sep-con",attr:{style:"margin-top: 64px"}}));t.appendChild(createEl("div",{text:"Advanced Settings",attr:{style:"margin-bottom: 8px; font-weight: bold"}})),new z.Setting(t).setName("Button Height").setDesc("Change the Height of each Button inside the Mobile Toolbar (in px).").addText(n=>{var i,a;return n.setValue((a=(i=o.settings.advancedToolbar.rowHeight)==null?void 0:i.toString())!=null?a:"48").setPlaceholder("48").onChange(async c=>{let d=Number(c),m=isNaN(d);n.inputEl.toggleClass("is-invalid",m),m||(o.settings.advancedToolbar.rowHeight=d,await o.saveSettings(),oe(o.settings.advancedToolbar))})}),new z.Setting(t).setName("Button Width").setDesc("Change the Width of each Button inside the Mobile Toolbar (in px).").addText(n=>{var i,a;return n.setValue((a=(i=o.settings.advancedToolbar.buttonWidth)==null?void 0:i.toString())!=null?a:"48").setPlaceholder("48").onChange(async c=>{let d=Number(c),m=isNaN(d);n.inputEl.toggleClass("is-invalid",m),m||(o.settings.advancedToolbar.buttonWidth=d,await o.saveSettings(),oe(o.settings.advancedToolbar))})}),new z.Setting(t).setName("Toolbar Extra Spacing").setDesc("Some Themes need extra spacing in the toolbar. If your Toolbar doesn't wrap properly, try increasing this value.").addSlider(n=>n.setLimits(0,64,1).setValue(o.settings.advancedToolbar.spacing).setDynamicTooltip().onChange(async i=>{o.settings.advancedToolbar.spacing=i,await o.saveSettings(),oe(o.settings.advancedToolbar)}))}function Bt({plugin:e}){let o=K(null);return V(()=>(o.current&&Nt(o.current,e),()=>o.current&&o.current.empty()),[]),r(P,null,r("div",{className:"cmdr-sep-con callout","data-callout":"info"},r("span",{className:"cmdr-callout-warning"},r(k,{icon:"alert-circle"})," ","Info"),r("p",{className:"cmdr-warning-description"},"The Toolbar is only available in Obsidian Mobile. ",z.Platform.isMobile&&r(P,null,"To configure which Commands show up in the Toolbar, open the Mobile Settings.")),z.Platform.isMobile&&r("button",{onClick:()=>{app.setting.openTabById("mobile")},className:"mod-cta"},"Open Mobile Settings")),r("div",{ref:o,style:{paddingBottom:"128px"}}))}var me=require("obsidian");var bn=require("obsidian");var gn=require("obsidian");var at=({initialColor:e,onChange:o})=>{let t=K(null);return V(()=>(t.current&&new gn.ColorComponent(t.current).setValue(e).onChange(o),()=>{var n,i;return(i=(n=t.current)==null?void 0:n.empty)==null?void 0:i.call(n)}),[o,e]),r("div",{ref:t,className:"cmdr-flex cmdr-items-center"})};function Dt({modal:e}){var o;return V(()=>{let t=()=>{this.forceUpdate()};return addEventListener("cmdr-icon-changed",t),()=>removeEventListener("cmdr-icon-changed",t)},[]),r("div",{className:"cmdr-mobile-modify-grid"},r("div",{className:"cmdr-mobile-modify-option",onClick:e.handleNewIcon},r("span",null,u("Icon")),r("span",{className:"cmdr-flex cmdr-gap-1"},r(k,{icon:e.pair.icon,size:20,className:"clickable-icon",style:{marginRight:"0px"}}),r(at,{initialColor:(o=e.pair.color)!=null?o:"#000",onChange:e.handleColorChange}))),r("div",{className:"cmdr-mobile-modify-option"},r("span",null,u("Name")),r("input",{onBlur:({currentTarget:t})=>e.handleRename(t.value),type:"text",placeholder:u("Custom Name"),value:e.pair.name})),r("div",{className:"cmdr-mobile-modify-option"},r("select",{className:"dropdown",value:e.pair.mode,onChange:({currentTarget:t})=>e.handleModeChange(t.value)},r("option",{value:"any"},u("Add command to all devices")),r("option",{value:"mobile"},u("Add command only to mobile devices")),r("option",{value:"desktop"},u("Add command only to desktop devices")),r("option",{value:app.appId},u("Add command only to this device")))),r("div",{className:"modal-button-container"},r("button",{className:"mod-cta",onClick:()=>e.close()},u("Done"))))}var de=class extends bn.Modal{constructor(t,n,i,a,c){super(app);this.pair=t;this.handleRename=n;this.handleNewIcon=i;this.handleModeChange=a;this.handleColorChange=c}async onOpen(){this.titleEl.innerText=this.pair.name,this.reactComponent=r(Dt,{modal:this}),W(this.reactComponent,this.contentEl)}onClose(){W(null,this.contentEl)}};function Se({value:e,handleChange:o,ariaLabel:t}){let[n,i]=F(!1),a=K(null),[c,d]=F(0);return V(()=>{var m,h;(m=a==null?void 0:a.current)==null||m.select(),(h=a==null?void 0:a.current)==null||h.focus()}),r("div",{class:"cmdr-editable"},n?r("input",{type:"text",value:e,style:{width:c+25+"px"},onKeyDown:m=>{m.key==="Enter"&&m.target.value.length>0&&(i(!1),o(m))},onBlur:()=>i(!1),ref:a}):r("span",{onDblClick:({target:m})=>{d(m==null?void 0:m.offsetWidth),i(!0)},"aria-label":t},e))}function Ht({pair:e,handleRemove:o,handleDown:t,handleUp:n,handleNewIcon:i,handleRename:a,handleModeChange:c,handleColorChange:d}){var y;let m=Q(e.id);if(!m)return r(P,null,me.Platform.isDesktop&&r("div",{className:"setting-item mod-toggle"},r(k,{icon:"alert-triangle",size:20,className:"cmdr-icon clickable-icon mod-warning"}),r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},e.name),r("div",{className:"setting-item-description"},u("This Command is not available on this device."))),r("div",{className:"setting-item-control"},r("button",{className:"mod-warning",style:"display: flex",onClick:o,"aria-label":u("Delete")},r(k,{icon:"lucide-trash"})))),me.Platform.isMobile&&r("div",{className:"mobile-option-setting-item",onClick:()=>{new me.Notice(u("This Command is not available on this device."))}},r("span",{className:"mobile-option-setting-item-remove-icon",onClick:o},r(k,{icon:"minus-with-circle",size:22,style:{color:"var(--text-error)"}})),r("span",{className:"mobile-option-setting-item-option-icon mod-warning"},r(k,{icon:"alert-triangle",size:22})),r("span",{className:"mobile-option-setting-item-name"},e.name)));let h=m.id.split(":").first(),s=app.plugins.manifests[h],g=!s,_=m.hasOwnProperty("checkCallback")||m.hasOwnProperty("editorCheckCallback"),f=Di(e.mode),b=e.mode.match(/desktop|mobile|any/)?e.mode[0].toUpperCase()+e.mode.substring(1):u("This device");return r(P,null,me.Platform.isDesktop&&r("div",{className:"setting-item mod-toggle"},r(k,{icon:e.icon,size:20,"aria-label":u("Choose new"),onClick:i,className:"cmdr-icon clickable-icon"}),r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},r(Se,{ariaLabel:u("Double click to rename"),handleChange:({target:v})=>{a(v==null?void 0:v.value)},value:e.name}),e.name!==m.name&&r("span",{style:"margin-left: .8ex"},"(",m.name,")")),r("div",{className:"setting-item-description"},u("Added by {{plugin_name}}.".replace("{{plugin_name}}",g?"Obsidian":s.name))," ",_?u("Warning: This is a checked Command, meaning it might not run under every circumstance."):"")),r("div",{className:"setting-item-control"},r(at,{initialColor:(y=e.color)!=null?y:"#000",onChange:d}),r(k,{icon:"arrow-down",className:"setting-editor-extra-setting-button clickable-icon",onClick:t,"aria-label":u("Move down")}),r(k,{icon:"arrow-up",className:"setting-editor-extra-setting-button clickable-icon",onClick:n,"aria-label":u("Move up")}),r(k,{icon:f,className:"setting-editor-extra-setting-button clickable-icon",onClick:()=>c(),"aria-label":u("Change Mode (Currently: {{current_mode}})").replace("{{current_mode}}",b)}),r("button",{className:"mod-warning",style:"display: flex",onClick:o,"aria-label":u("Delete")},r(k,{icon:"lucide-trash"})))),me.Platform.isMobile&&r("div",{className:"mobile-option-setting-item"},r("span",{className:"mobile-option-setting-item-remove-icon",onClick:o},r(k,{icon:"minus-with-circle",size:22,style:{color:"var(--text-error)"}})),r("span",{className:"mobile-option-setting-item-option-icon"},r(k,{icon:e.icon,size:22,onClick:()=>{new de(e,a,i,c,d).open()}})),r("span",{className:"mobile-option-setting-item-name",onClick:()=>{new de(e,a,i,c,d).open()}},e.name,e.name!==m.name&&r("span",{className:"cmdr-option-setting-name"},"(",m.name,")")),r("span",{className:"mobile-option-setting-item-option-icon"},r(k,{icon:"arrow-down",className:"clickable-icon",onClick:t}),r(k,{icon:"arrow-up",className:"clickable-icon",onClick:n}),r(k,{icon:"three-horizontal-bars",className:"clickable-icon",onClick:()=>{new de(e,a,i,c,d).open()}}))))}function Di(e){return e==="mobile"?"smartphone":e==="desktop"?"monitor":e==="any"?"cmdr-all-devices":"airplay"}function Rt(e,o,t){let n=o<0?e.length+o:o;if(n>=0&&n{if(n.mode.match(/desktop|mobile|any/)||n.mode===app.appId)return r(Ht,{key:n.id,pair:n,handleRemove:async()=>{(!o.settings.confirmDeletion||await new O(o).didChooseRemove())&&(await e.removeCommand(n),this.forceUpdate())},handleUp:()=>{Rt(e.pairs,i,i-1),e.reorder(),this.forceUpdate()},handleDown:()=>{Rt(e.pairs,i,i+1),e.reorder(),this.forceUpdate()},handleRename:async a=>{n.name=a,await o.saveSettings(),e.reorder(),this.forceUpdate()},handleNewIcon:async()=>{let a=await new H(o).awaitSelection();a&&a!==n.icon&&(n.icon=a,await o.saveSettings(),e.reorder(),this.forceUpdate()),dispatchEvent(new Event("cmdr-icon-changed"))},handleModeChange:async a=>{let c=["any","desktop","mobile",app.appId],d=c.indexOf(n.mode);d===3&&(d=-1),n.mode=a||c[d+1],await o.saveSettings(),e.reorder(),this.forceUpdate()},handleColorChange:async a=>{n.color=a,await o.saveSettings(),e.reorder()}})})),!e.pairs.some(n=>$(n.mode)||n.mode.match(/mobile|desktop/))&&r("div",{class:"cmdr-commands-empty"},r(_e,null),r("h3",null,u("No commands here!")),r("span",null,u("Would you like to add one now?"))),_n.Platform.isMobile&&r("hr",null),r("div",{className:"cmdr-add-new-wrapper"},r("button",{className:"mod-cta",onClick:async()=>{let n=await Z(o);await e.addCommand(n),e.reorder(),this.forceUpdate()}},u("Add command")))),t)}function Ft({title:e,children:o}){let[t,n]=F(!1);return r("div",{className:"cmdr-accordion cmdr-sep-con","aria-expanded":t},r("div",{className:"cmdr-accordion-header",onClick:()=>{n(!t)}},r(k,{className:"cmdr-accordion-chevron clickable-icon",icon:"chevron-down",size:24}),r("span",null,e)),r("div",{className:"cmdr-accordion-content",style:{maxHeight:[o].flat().length*120+"px"}},o))}function Ot({name:e,description:o,children:t,className:n}){return r("div",{className:`setting-item ${n}`},r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},e),r("div",{className:"setting-item-description"},o)),r("div",{className:"setting-item-control"},t))}function rt(e){let[o,t]=F(e.value);return r(Ot,{name:e.name,description:e.description,className:"mod-toggle"},r("div",{className:`checkbox-container ${o?"is-enabled":""}`,onClick:()=>{t(!o),e.changeHandler(o)}}))}function Cn({name:e,description:o,changeHandler:t,value:n,hideLabel:i,showLabel:a}){let[c,d]=F(n);return r(Ot,{name:e,description:o,className:"mod-toggle"},r(k,{"aria-label":c?a:i,icon:c?"eye-off":"eye",size:20,className:"clickable-icon",onClick:()=>{d(!c),t(c)}}))}function st(e){var n,i,a;let[o,t]=F(e.value);return r(Ot,{description:e.description,name:e.name,className:"cmdr-slider"},r("div",null,r(Se,{ariaLabel:u("Double click to enter custom value"),value:o.toString(),handleChange:({target:c})=>{let d=Number(c.value);!isNaN(d)&&o!==d&&(t(d),e.changeHandler(d))}}),r("input",{class:"slider",type:"range",min:(n=e.min)!=null?n:"0",max:(i=e.max)!=null?i:"32",step:(a=e.step)!=null?a:"1",value:o,onPointerMove:({target:c})=>{o!==c.value&&(t(c.value),e.changeHandler(c.value))}})))}function yn({plugin:e}){let o=e.settings.hide.statusbar,[t,n]=F([]);return V(()=>{let a=[...app.statusBar.containerEl.getElementsByClassName("status-bar-item")].map(c=>[...c.classList].find(d=>d.startsWith("plugin-"))).filter(c=>c).map(c=>c.substring(7));n(a.map(c=>app.plugins.manifests[c]||{id:c,name:c.replace(/-/g," ").replace(/(^\w{1})|(\s+\w{1})/g,d=>d.toUpperCase()),description:"Core Plugin"}))},[]),r(P,null,r("hr",null),r(Ft,{title:u("Hide other Commands")},t.map(i=>r(Cn,{name:i.name,description:i.description,value:o.contains(i.id),hideLabel:u("Hide"),showLabel:u("Show"),changeHandler:async a=>{a?o.contains(i.id)&&o.remove(i.id):o.push(i.id),et(e.settings),await e.saveSettings()}}))))}var Mn=require("obsidian");var kn=require("obsidian");function wn({plugin:e,macro:o,onSave:t,onCancel:n}){let[i,a]=F(o.name||"Macro Name"),[c,d]=F(o.icon||"star"),[m,h]=F(o.startup||!1),[s,g]=F(JSON.parse(JSON.stringify(o.macro))||[]),_=this.forceUpdate.bind(this),f=async()=>{let y=await new ne(e).awaitSelection();y&&g([...s,{action:0,commandId:y.id}])},b=async()=>{g([...s,{action:1,delay:250}])};return r("div",null,r("div",{class:"setting-item cmdr-mm-item"},r("div",null,r("span",null,"Name"),r("input",{type:"text",placeholder:"Macro Name",value:i,onChange:y=>a(y.currentTarget.value),width:"100%"})),r("div",null,r("span",null,"Icon"),r("button",{onClick:async()=>d(await new H(e).awaitSelection())},r(k,{icon:c})))),s.map((y,v)=>{switch(y.action){case 0:let B=Q(y.commandId);return r("div",{class:"setting-item cmdr-mm-item"},r("div",null,r("button",{onClick:async()=>{let w=await new ne(e).awaitSelection();g(s.map((D,ee)=>ee===v?Yt(Oe({},D),{commandId:w.id}):D))}},(B==null?void 0:B.name)||"Cannot find Command")),r("div",null,r("div",{class:"cmdr-mm-action-options"},r(k,{class:"clickable-icon",icon:"arrow-down",onClick:()=>{if(v===s.length-1)return;let w=[...s],D=w[v];w[v]=w[v+1],w[v+1]=D,g(w)}}),r(k,{class:"clickable-icon",icon:"arrow-up",onClick:()=>{if(v===0)return;let w=[...s],D=w[v];w[v]=w[v-1],w[v-1]=D,g(w)}}),r(k,{class:"clickable-icon",icon:"cross",onClick:()=>{g(s.filter((w,D)=>D!==v))}}))));case 1:return r("div",{class:"setting-item cmdr-mm-item"},r("div",null,r(st,{name:"Delay",min:0,max:1e4,step:50,description:"Delay in milliseconds",value:y.delay,changeHandler:w=>y.delay=w})),r("div",null,r("div",{class:"cmdr-mm-action-options"},r(k,{class:"clickable-icon",icon:"arrow-down",onClick:()=>{if(v===s.length-1)return;let w=[...s],D=w[v];w[v]=w[v+1],w[v+1]=D,g(w)}}),r(k,{class:"clickable-icon",icon:"arrow-up",onClick:()=>{if(v===0)return;let w=[...s],D=w[v];w[v]=w[v-1],w[v-1]=D,g(w)}}),r(k,{class:"clickable-icon",icon:"cross",onClick:()=>{g(s.filter((w,D)=>D!==v))}}))));case 2:return r("div",null,"Editor: ",y.action);case 3:return r("div",null,"Loop: ",y.times)}}),r("div",{className:"setting-item cmdr-mm-actions cmdr-justify-between"},r("div",{className:"cmdr-flex cmdr-items-center cmdr-justify-self-start"},r("input",{type:"checkbox",id:"checkbox",checked:m,onChange:({target:y})=>{var v;h((v=y==null?void 0:y.checked)!=null?v:!1)}}),r("label",{htmlFor:"checkbox"},"Auto-Run on Startup")),r("div",null,r("button",{onClick:f},"Add Command"),r("button",{onClick:b},"Add Delay"))),r("div",{className:"cmdr-mm-control"},r("button",{class:s.length===0?"disabled":"mod-cta",disabled:s.length===0,onClick:()=>s.length&&t({macro:s,name:i,icon:c,startup:m})},"Save"),r("button",{onClick:n},"Cancel")))}var Pe=class extends kn.Modal{constructor(t,n,i){super(app);this.macro=n,this.plugin=t,this.onSave=i}onOpen(){this.titleEl.setText("Macro Builder"),W(r(wn,{plugin:this.plugin,macro:this.macro,onSave:this.onSave,onCancel:this.close.bind(this)}),this.contentEl)}onClose(){W(null,this.contentEl)}};function Vt({plugin:e,macros:o}){let t=(i,a)=>{let c=m=>{o.splice(a!==void 0?a:o.length,a!==void 0?1:0,m),e.saveSettings(),this.forceUpdate(),Me(e),d.close()},d=new Pe(e,i,c);d.open()},n=i=>{o.splice(i,1),e.saveSettings(),this.forceUpdate(),Me(e)};return r(P,null,r("div",{className:"cmdr-sep-con"},o.map((i,a)=>r("div",{class:"setting-item mod-toggle"},r("div",{className:"setting-item-info"},r("div",{className:"setting-item-name"},i.name),r("div",{className:"setting-item-description"},i.macro.length," Actions")),r("div",{className:"setting-item-control"},r("button",{"aria-label":"Edit Macro",onClick:()=>t(i,a)},r(k,{icon:"lucide-pencil"})),r("button",{"aria-label":"Delete",class:"mod-warning",onClick:async()=>{(!e.settings.confirmDeletion||await new O(e).didChooseRemove())&&n(a)}},r(k,{icon:"trash"})))))),!o.length&&r("div",{class:"cmdr-commands-empty"},r(_e,null),r("h3",null,"No Macros yet!"),r("span",null,u("Would you like to add one now?"))),Mn.Platform.isMobile&&r("hr",null),r("div",{className:"cmdr-add-new-wrapper"},r("button",{class:"mod-cta",onClick:()=>t({name:"",macro:[],icon:"star"})},"Add Macro")))}function Te({plugin:e,mobileMode:o}){let[t,n]=F(0),[i,a]=F(!0),c=({key:m,shiftKey:h})=>{h&&m==="Tab"?t>0?n((t-1)%d.length):n(d.length-1):m==="Tab"&&n((t+1)%d.length)};V(()=>(addEventListener("keydown",c),()=>removeEventListener("keydown",c)),[t]),J.Platform.isMobile&&V(()=>{let m=document.querySelector(".modal-setting-back-button"),h=m.cloneNode(!0);m.parentNode.replaceChild(h,m),a(!0)},[]),V(()=>{let m=document.querySelector(".modal-setting-back-button");!m||(i?(m.parentElement.lastChild.textContent="Commander",m.onclick=()=>app.setting.closeActiveTab()):(m.parentElement.lastChild.textContent=d[t].name,m.onclick=()=>a(!0)))},[i]);let d=Ke(()=>[{name:u("General"),tab:r(P,null,r(rt,{name:u("Always ask before removing?"),description:u("Always show a Popup to confirm deletion of a Command."),value:e.settings.confirmDeletion,changeHandler:async m=>{e.settings.confirmDeletion=!m,await e.saveSettings()}}),r(rt,{value:e.settings.showAddCommand,name:u('Show "Add Command" Button'),description:u('Show the "Add Command" Button in every Menu.'),changeHandler:async m=>{e.settings.showAddCommand=!m,e.manager.pageHeader.reorder(),await e.saveSettings()}}),r(rt,{value:e.settings.debug,name:u("Enable debugging"),description:u("Enable console output."),changeHandler:async m=>{e.settings.debug=!m,await e.saveSettings()}}),r(st,{value:e.settings.spacing,name:u("Choose custom spacing for Command Buttons"),description:u("Change the spacing between commands. You can set different values on mobile and desktop."),changeHandler:async m=>{tt(m),e.settings.spacing=m,await e.saveSettings()}}))},{name:u("Left Ribbon"),tab:r(ae,{manager:e.manager.leftRibbon,plugin:e},r("hr",null),r("div",{className:"cmdr-sep-con callout","data-callout":"warning"},r("span",{className:"cmdr-callout-warning"},"Reordering/Sorting"),r("p",{className:"cmdr-warning-description"},"As of Obsidian 1.1.0 you can reorder the Buttons in the left ribbon by dragging. This will replace the old sorting feature.")))},{name:u("Page Header"),tab:r(ae,{manager:e.manager.pageHeader,plugin:e},r("hr",null),r("div",{className:"cmdr-sep-con callout","data-callout":"warning"},r("span",{className:"cmdr-callout-warning"},r(k,{icon:"alert-triangle"})," ",u("Warning")),r("p",{className:"cmdr-warning-description"},u("As of Obsidian 0.16.0 you need to explicitly enable the View Header.")),r("button",{onClick:()=>{app.setting.openTabById("appearance"),setTimeout(()=>{var m,h,s,g;app.setting.activeTab.containerEl.scroll({behavior:"smooth",top:250}),(g=(s=(h=(m=app.setting.activeTab.containerEl.querySelectorAll(".setting-item-heading")[1].nextSibling)==null?void 0:m.nextSibling)==null?void 0:h.nextSibling)==null?void 0:s.addClass)==null||g.call(s,"cmdr-cta")},50)},className:"mod-cta"},u("Open Appearance Settings"))))},{name:u("Statusbar"),tab:r(ae,{manager:e.manager.statusBar,plugin:e},r(yn,{plugin:e}))},{name:u("Editor Menu"),tab:r(ae,{manager:e.manager.editorMenu,plugin:e})},{name:u("File Menu"),tab:r(ae,{manager:e.manager.fileMenu,plugin:e})},{name:u("Explorer"),tab:r(ae,{manager:e.manager.explorerManager,plugin:e},r("hr",null),r("div",{className:"cmdr-sep-con callout","data-callout":"warning"},r("span",{className:"cmdr-callout-warning"},r(k,{icon:"alert-triangle"})," ",u("Warning")),r("p",{className:"cmdr-warning-description"},"When clicking on a Command in the Explorer, the Explorer view will become focused. This might interfere with Commands that are supposed to be executed on an active File/Explorer.")))},{name:J.Platform.isMobile?"Mobile Toolbar":"Toolbar",tab:r(Bt,{plugin:e})},{name:"Macros",tab:r(Vt,{plugin:e,macros:e.settings.macros})}],[]);return r(P,null,J.Platform.isDesktop&&r("div",{className:"cmdr-setting-title"},r("h1",null,e.manifest.name)),(J.Platform.isDesktop||i)&&r(Fi,{tabs:d,activeTab:t,setActiveTab:n,setOpen:a}),r("div",{class:`cmdr-setting-content ${o?"cmdr-mobile":""}`},(J.Platform.isDesktop||!i)&&d[t].tab,(J.Platform.isMobile&&i||J.Platform.isDesktop&&t===0)&&r(At,{manifest:e.manifest})))}function Fi({tabs:e,activeTab:o,setActiveTab:t,setOpen:n}){let i=K(null),a=c=>{var d;c.preventDefault(),(d=i.current)==null||d.scrollBy({left:c.deltaY>0?16:-16})};return V(()=>{let c=i.current;if(!(!c||J.Platform.isMobile))return c.addEventListener("wheel",a),()=>c.removeEventListener("wheel",a)},[]),V(()=>{var c;return(c=document.querySelector(".cmdr-tab-active"))==null?void 0:c.scrollIntoView({behavior:"smooth",block:"nearest"})},[o]),r("nav",{class:`cmdr-setting-header ${J.Platform.isMobile?"cmdr-mobile":""}`,ref:i},r("div",{class:`cmdr-setting-tab-group ${J.Platform.isMobile?"vertical-tab-header-group-items":""}`},e.map((c,d)=>r("div",{className:`cmdr-tab ${o===d?"cmdr-tab-active":""} ${J.Platform.isMobile?"vertical-tab-nav-item":""}`,onClick:()=>{t(d),n(!1)}},c.name,J.Platform.isMobile&&r(k,{className:"vertical-tab-nav-item-chevron cmdr-block",icon:"chevron-right",size:24})))),J.Platform.isDesktop&&r("div",{className:"cmdr-fill"}))}var Le=class extends ct.PluginSettingTab{constructor(t){super(app,t);this.plugin=t}display(){W(r(Te,{plugin:this.plugin,mobileMode:ct.Platform.isMobile}),this.containerEl)}hide(){W(null,this.containerEl)}};var lt=require("obsidian");var Ae=class extends lt.Modal{constructor(t){super(app);this.plugin=t,this.containerEl.addClass("cmdr-setting-modal")}onOpen(){let t=lt.Platform.isMobile;W(r(Te,{plugin:this.plugin,mobileMode:t}),this.contentEl)}onClose(){W(null,this.contentEl)}};var xn=require("obsidian");function zt(){(0,xn.addIcon)("cmdr-all-devices",'')}var Ne=class extends q{constructor(t){super(t,t.settings.leftRibbon);this.plugin=t,app.workspace.onLayoutReady(()=>{this.plugin.settings.leftRibbon.forEach(n=>this.addCommand(n,!1))})}async addCommand(t,n=!0){n&&(this.plugin.settings.leftRibbon.push(t),await this.plugin.saveSettings()),this.plugin.addRibbonIcon(t.icon,t.name,()=>app.commands.executeCommandById(t.id)),this.plugin.register(()=>this.removeCommand(t,!1))}async removeCommand(t,n=!0){n&&(this.plugin.settings.leftRibbon.remove(t),await this.plugin.saveSettings());let i=app.workspace.leftRibbon.items.find(a=>a.icon===t.icon&&a.name===a.name);i&&i.buttonEl.remove(),app.workspace.leftRibbon.items.remove(i)}reorder(){}};var dt=class extends In.Plugin{async executeStartupMacros(){let t=setTimeout(()=>{this.settings.macros.forEach(async(n,i)=>{n.startup&&await this.executeMacro(i)})},1e3);this.register(()=>clearTimeout(t))}async executeMacro(t){let n=this.settings.macros[t];if(!n)throw new Error("Macro not found");for(let i of n.macro)switch(i.action){case 0:{await app.commands.executeCommandById(i.commandId);continue}case 1:{await new Promise(a=>setTimeout(a,i.delay));continue}case 2:continue;case 3:{for(let a=0;anew Ae(this).open()}),this.registerEvent(app.workspace.on("editor-menu",this.manager.editorMenu.applyEditorMenuCommands(this))),this.registerEvent(app.workspace.on("file-menu",this.manager.fileMenu.applyFileMenuCommands(this))),app.workspace.onLayoutReady(()=>{et(this.settings),Me(this),tt(this.settings.spacing),oe(this.settings.advancedToolbar),ot(this.settings.advancedToolbar),this.executeStartupMacros()})}onunload(){var t;(t=document.head.querySelector("style#cmdr"))==null||t.remove(),Yo()}async loadSettings(){let t=Object.assign({},yo,await this.loadData());this.settings=t}async saveSettings(){await this.saveData(this.settings)}listActiveToolbarCommands(){return this.app.vault.getConfig("mobileToolbarCommands")}getCommands(){let t=[];return this.listActiveToolbarCommands().forEach(n=>{let i=this.app.commands.commands[n];i&&t.push(i)}),t}getCommandsWithoutIcons(t=!0){let n=[];return this.getCommands().forEach(i=>{i&&!i.icon&&n.push(i)}),t&&this.getCommands().forEach(i=>{this.settings.advancedToolbar.mappedIcons.find(a=>a.commandID===i.id)&&n.push(i)}),n}}; /* by phibr0 */ diff --git a/.obsidian/plugins/cmdr/manifest.json b/.obsidian/plugins/cmdr/manifest.json index 07afd78..5570066 100644 --- a/.obsidian/plugins/cmdr/manifest.json +++ b/.obsidian/plugins/cmdr/manifest.json @@ -1,11 +1 @@ -{ - "id": "cmdr", - "name": "Commander", - "version": "0.4.4", - "minAppVersion": "1.1.0", - "description": "Customize your workspace by adding commands everywhere, create Macros and supercharge your mobile toolbar.", - "author": "jsmorabito & phibr0", - "authorUrl": "https://github.com/phibr0", - "fundingUrl": "https://ko-fi.com/phibr0", - "isDesktopOnly": false -} +{"id":"cmdr","name":"Commander","version":"0.4.5","minAppVersion":"1.1.0","description":"Customize your workspace by adding commands everywhere, create Macros and supercharge your mobile toolbar.","author":"jsmorabito & phibr0","authorUrl":"https://github.com/phibr0","fundingUrl":"https://ko-fi.com/phibr0","isDesktopOnly":false} \ No newline at end of file diff --git a/.obsidian/plugins/cmdr/styles.css b/.obsidian/plugins/cmdr/styles.css index 7b525cf..f095fb2 100644 --- a/.obsidian/plugins/cmdr/styles.css +++ b/.obsidian/plugins/cmdr/styles.css @@ -1 +1 @@ -.cmdr{transition:transform .4s 0s}.cmdr.status-bar-item{margin:0}.cmdr-removing{transform:translate(100%);z-index:0}.cmdr-ribbon-removing{transform:scale(0)}.cmdr-setting-title{display:flex;align-items:baseline;justify-content:space-between}.cmdr-setting-title h1{font-weight:900;margin-top:6px;margin-bottom:12px}.cmdr-option-setting-name{margin-left:.8ex}.cmdr-base-component{padding:0 20px;margin-bottom:-18px}.cmdr-menu-more-options{color:var(--text-muted);position:absolute;right:6px;padding-top:2px;transform:scale(.9);transition:all .15s ease}.cmdr-menu-more-options:hover{color:var(--text-primary)}.cmdr-mobile .cmdr-credits{place-content:center}.cmdr-fill{border:2px solid #0000;width:100%}.cmdr-icon{height:20px;align-self:center}.cmdr-setting-modal>.modal{height:60vh;width:80vw}.cmdr-editable{display:inline-block}.cmdr-editable input{padding:0;border:none;height:unset;background-color:initial!important;border-bottom:1px solid var(--interactive-accent);border-radius:0}.cmdr-setting-content{height:calc(100% - 10rem)}.cmdr-setting-content .setting-item:first{border-top:none}.cmdr-commands-empty{display:flex;place-items:center;flex-flow:column;margin:2.5rem 0 1.25rem;place-content:center}.cmdr-commands-empty svg{width:100%}.cmdr-commands-empty h3{margin:8px 0;font-weight:900}.cmdr-sep-con:not(:empty){background-color:var(--background-primary);border:1px solid var(--background-modifier-border);padding:12px;border-radius:12px}.cmdr-sep-con:not(:empty) .setting-item:first-of-type{padding-top:0}.cmdr-sep-con:not(:empty) .setting-item:last-of-type{padding-bottom:0}.cmdr-sep-con:not(:empty) .cmdr-callout-warning{padding:var(--callout-title-padding);display:flex;gap:var(--size-4-1);font-size:var(--callout-title-size);color:rgb(var(--callout-color));line-height:var(--line-height-tight);font-weight:700}.cmdr-sep-con:not(:empty) p.cmdr-warning-description{margin:8px 0}.cmdr-accordion{margin-bottom:16px}.cmdr-accordion .cmdr-accordion-chevron{margin-left:0;margin-right:4px;height:24px}.cmdr-accordion .cmdr-accordion-chevron>svg{transition:all .25s ease}.cmdr-accordion .cmdr-accordion-content{max-height:1000px;transition:all .3s ease-in-out;overflow:hidden;margin-left:14px;padding-left:14px}.cmdr-accordion .cmdr-accordion-content .setting-item{padding-top:12px}.cmdr-accordion[aria-expanded=false] .cmdr-accordion-chevron>svg{transform:rotate(-90deg)}.cmdr-accordion[aria-expanded=false] .cmdr-accordion-content{max-height:0!important;transition:max-height .3s cubic-bezier(0,1,0,1)}.cmdr-accordion .cmdr-accordion-header{display:flex;cursor:var(--cursor)}.cmdr-accordion .cmdr-accordion-header span{font-weight:600;margin-top:0;align-self:end}.cmdr-add-new-wrapper{width:100%;margin-top:12px;margin-bottom:2rem;display:flex;justify-content:center;align-items:center}.cmdr-add-new-wrapper button{margin:0 24px}.cmdr-adder{opacity:0;transition:opacity .12s ease}.cmdr-adder:hover{opacity:1}.cmdr-adder.view-action{order:-1001}.cmdr-page-header{order:-1000}.cmdr-macro-builder .modal{height:80vh;width:95vw;padding:0}.cmdr-macro-builder .modal-close-button{z-index:99}.cmdr-macro-builder .modal-content{margin-top:0}.cmdr-macro-builder .cmdr-macro-icon{display:flex;justify-content:center}.cmdr-macro-builder .cmdr-macro-control{position:absolute;z-index:5;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:3em;top:0}.cmdr-macro-builder .cmdr-macro-control .cmdr-macro-button{background-color:var(--background-secondary-alt);aspect-ratio:1;display:flex;justify-content:center;align-items:center;border-radius:2px;outline:1px solid var(--background-modifier-border);padding:2px}.cmdr-setting-header{margin-bottom:24px;overflow-y:hidden;overflow-x:auto}.cmdr-setting-header .cmdr-setting-tab-group{display:flex;align-items:flex-end;border-bottom:2px solid var(--background-modifier-border)}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group{display:flex;flex-direction:column;align-items:flex-start;border:none}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group .cmdr-tab{border-left:none!important;border-right:none!important;border-top:none!important;transform:none;transition:color .2s ease;width:100%;display:flex;font-weight:500;justify-content:space-between}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group .cmdr-tab:first-child{margin-left:0}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group .cmdr-tab.cmdr-tab-active{transform:none}.cmdr-setting-header .cmdr-tab{padding:6px 8px;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap;border-left:2px solid #0000;border-right:2px solid #0000}.cmdr-setting-header .cmdr-tab:first-child{margin-left:6px}.cmdr-setting-header .cmdr-tab.cmdr-tab-active{transform:translateY(2px);border-radius:2px;border:2px solid var(--background-modifier-border);border-bottom-color:var(--background-primary)}.is-tablet .cmdr-tab{border:none!important;margin-bottom:2px;padding:10px;font-size:1.08em}.is-tablet .cmdr-tab,.is-tablet .cmdr-tab .cmdr-block{display:flex;align-items:center}.cmdr-mobile-modify-grid{padding:22px}.cmdr-mobile-modify-grid .cmdr-mobile-modify-option{display:flex;width:100%;justify-content:space-between;align-items:center;margin-bottom:16px}.cmdr-mobile-modify-grid .cmdr-mobile-modify-option>input{max-width:70%}.cmdr-mobile-modify-grid .cmdr-mobile-modify-option .dropdown{margin:auto}.cmdr-credits{display:flex}.cmdr-credits>span{color:var(--text-muted);font-size:14px}.cmdr-about{display:flex;flex-direction:column;align-items:center;padding-bottom:64px}.cmdr-about hr{width:100%;margin-top:0}.cmdr-about button{display:flex;align-items:center;height:2.6em;font-weight:700;gap:16px;border-radius:6px;margin-bottom:8px}.cmdr-about button:last-of-type{margin-bottom:32px}.cmdr-about .setting-item button{margin:0}.cmdr-about .cmdr-icon-wrapper{display:flex}.cmdr-about .cmdr-icon-wrapper>svg{width:70px;height:70px}.cmdr-about .cmdr-version{text-decoration:none;font-size:12px;color:var(--text-muted)}.cmdr-name-input-wrapper{display:flex;gap:8px;align-items:center}.cmdr-name-input-wrapper button{margin:8px}.cmdr-icon.clickable-icon.mod-warning{cursor:default}.cmdr-hider-title{display:flex;flex-direction:column;align-items:center}.cmdr-hider-title h3{margin-top:0;margin-bottom:8px;font-weight:900}.cmdr-hider-title p{margin-top:0;margin-bottom:26px;width:50%;text-align:center}.setting-item-control .cmdr-editable{width:2em;text-align:center}.setting-item-control .cmdr-editable input,.setting-item-control .cmdr-editable span{width:2em;color:var(--text-normal)}.cmdr-slider .setting-item-control>div{width:100%}.cmdr-slider input.slider{margin-left:4px}.view-action:not(:last-child){margin-right:var(--cmdr-spacing)}.status-bar-item:not(:last-child),.titlebar-button:not(:last-child){margin-right:calc(var(--cmdr-spacing) - 8px)}.side-dock-ribbon-action:not(:last-child){margin-bottom:calc(var(--cmdr-spacing) - 8px)}.cmdr-cta{position:relative}.cmdr-cta:after{content:"";position:absolute;top:-10%;width:104%;left:-2%;height:120%;outline:2px solid var(--color-accent);border-radius:1em;pointer-events:none}.cmdr-mm-item{display:flex;flex-direction:row!important;align-items:center!important;justify-content:space-between;padding:24px 0}.cmdr-mm-item>:first-child{flex-grow:1}.cmdr-mm-item>:last-child{display:flex}.cmdr-mm-item>*{display:flex;flex-direction:column}.cmdr-mm-item>*>span{margin-right:4px;margin-bottom:2px;font-size:12px;color:var(--text-muted);font-weight:700;margin-left:2px}.cmdr-mm-item .cmdr-slider{padding-bottom:0}.cmdr-mm-item .cmdr-slider .cmdr-editable{width:auto;font-size:smaller}.cmdr-mm-item .cmdr-slider .cmdr-editable span{color:var(--text-muted)}.cmdr-mm-actions{width:100%;display:flex;flex-direction:row!important;justify-content:end;gap:8px}.cmdr-mm-actions button{all:unset;cursor:pointer;color:var(--text-accent);padding:6px;border-radius:4px;transition:all .15s ease;text-transform:uppercase;font-weight:700;font-size:small}.cmdr-mm-actions button:hover{color:var(--text-accent-hover);background-color:var(--background-secondary)}.cmdr-mm-actions button:before{content:"+ "}.cmdr-mm-actions button:active{transform:scale(.98)}.cmdr-mm-control{margin-top:24px;width:100%;display:flex;justify-content:center;gap:8px}.cmdr-mm-action-text{opacity:0}.cmdr-mm-action-options{display:flex}.body{--at-button-height:48;--at-row-count:0}.AT-multirow.AT-row .mobile-toolbar-options-container{flex-flow:column wrap}.is-mobile .mobile-toolbar{position:sticky!important;z-index:5;margin-bottom:var(--at-offset)}.AT-always-shown .is-pinned .workspace-drawer-inner{margin-bottom:calc(var(--at-button-height)*var(--at-row-count) + var(--at-spacing))}.AT-multirow.AT-column .mobile-toolbar-options-container{flex-flow:row wrap;overflow-y:auto}.mobile-toolbar-option{height:var(--at-button-height);min-width:var(--at-button-width)}.AT-multirow .mobile-toolbar,.AT-multirow .mobile-toolbar-options-container{height:calc(var(--at-button-height)*var(--at-row-count) + var(--at-spacing))!important}.AT-no-toolbar .mobile-toolbar{display:none}.cmdr-block{display:block}.cmdr-flex{display:flex}.cmdr-items-center{align-items:center}.cmdr-justify-between{justify-content:space-between}.cmdr-gap-1{gap:.25rem}.cmdr-justify-self-start{justify-self:start} \ No newline at end of file +.cmdr{transition:transform .4s 0s}.cmdr.status-bar-item{margin:0}.cmdr-removing{transform:translate(100%);z-index:0}.cmdr-ribbon-removing{transform:scale(0)}.cmdr-setting-title{display:flex;align-items:baseline;justify-content:space-between}.cmdr-setting-title h1{font-weight:900;margin-top:6px;margin-bottom:12px}.cmdr-option-setting-name{margin-left:.8ex}.cmdr-base-component{padding:0 20px;margin-bottom:-18px}.cmdr-menu-more-options{color:var(--text-muted);position:absolute;right:6px;padding-top:2px;transform:scale(.9);transition:all .15s ease}.cmdr-menu-more-options:hover{color:var(--text-primary)}.cmdr-mobile .cmdr-credits{place-content:center}.cmdr-fill{border:2px solid #0000;width:100%}.cmdr-icon{height:20px;align-self:center}.cmdr-setting-modal>.modal{height:60vh;width:80vw}.cmdr-editable{display:inline-block}.cmdr-editable input{padding:0;border:none;height:unset;background-color:initial!important;border-bottom:1px solid var(--interactive-accent);border-radius:0}.cmdr-setting-content{height:calc(100% - 10rem)}.cmdr-setting-content .setting-item:first{border-top:none}.cmdr-commands-empty{display:flex;place-items:center;flex-flow:column;margin:2.5rem 0 1.25rem;place-content:center}.cmdr-commands-empty svg{width:100%}.cmdr-commands-empty h3{margin:8px 0;font-weight:900}.cmdr-sep-con:not(:empty){background-color:var(--background-primary);border:1px solid var(--background-modifier-border);padding:12px;border-radius:12px}.cmdr-sep-con:not(:empty) .setting-item:first-of-type{padding-top:0}.cmdr-sep-con:not(:empty) .setting-item:last-of-type{padding-bottom:0}.cmdr-sep-con:not(:empty) .cmdr-callout-warning{padding:var(--callout-title-padding);display:flex;gap:var(--size-4-1);font-size:var(--callout-title-size);color:rgb(var(--callout-color));line-height:var(--line-height-tight);font-weight:700}.cmdr-sep-con:not(:empty) p.cmdr-warning-description{margin:8px 0}.cmdr-accordion{margin-bottom:16px}.cmdr-accordion .cmdr-accordion-chevron{margin-left:0;margin-right:4px;height:24px}.cmdr-accordion .cmdr-accordion-chevron>svg{transition:all .25s ease}.cmdr-accordion .cmdr-accordion-content{max-height:1000px;transition:all .3s ease-in-out;overflow:hidden;margin-left:14px;padding-left:14px}.cmdr-accordion .cmdr-accordion-content .setting-item{padding-top:12px}.cmdr-accordion[aria-expanded=false] .cmdr-accordion-chevron>svg{transform:rotate(-90deg)}.cmdr-accordion[aria-expanded=false] .cmdr-accordion-content{max-height:0!important;transition:max-height .3s cubic-bezier(0,1,0,1)}.cmdr-accordion .cmdr-accordion-header{display:flex;cursor:var(--cursor)}.cmdr-accordion .cmdr-accordion-header span{font-weight:600;margin-top:0;align-self:end}.cmdr-add-new-wrapper{width:100%;margin-top:12px;margin-bottom:2rem;display:flex;justify-content:center;align-items:center}.cmdr-add-new-wrapper button{margin:0 24px}.cmdr-adder{opacity:0;transition:opacity .12s ease}.cmdr-adder:hover{opacity:1}.cmdr-adder.view-action{order:-1001}.cmdr-page-header{order:-1000}.cmdr-macro-builder .modal{height:80vh;width:95vw;padding:0}.cmdr-macro-builder .modal-close-button{z-index:99}.cmdr-macro-builder .modal-content{margin-top:0}.cmdr-macro-builder .cmdr-macro-icon{display:flex;justify-content:center}.cmdr-macro-builder .cmdr-macro-control{position:absolute;z-index:5;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:3em;top:0}.cmdr-macro-builder .cmdr-macro-control .cmdr-macro-button{background-color:var(--background-secondary-alt);aspect-ratio:1;display:flex;justify-content:center;align-items:center;border-radius:2px;outline:1px solid var(--background-modifier-border);padding:2px}.cmdr-setting-header{margin-bottom:24px;overflow-y:hidden;overflow-x:auto}.cmdr-setting-header .cmdr-setting-tab-group{display:flex;align-items:flex-end;border-bottom:2px solid var(--background-modifier-border)}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group{display:flex;flex-direction:column;align-items:flex-start;border:none}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group .cmdr-tab{border-left:none!important;border-right:none!important;border-top:none!important;transform:none;transition:color .2s ease;width:100%;display:flex;font-weight:500;justify-content:space-between}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group .cmdr-tab:first-child{margin-left:0}.cmdr-setting-header.cmdr-mobile .cmdr-setting-tab-group .cmdr-tab.cmdr-tab-active{transform:none}.cmdr-setting-header .cmdr-tab{padding:6px 8px;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap;border-left:2px solid #0000;border-right:2px solid #0000}.cmdr-setting-header .cmdr-tab:first-child{margin-left:6px}.cmdr-setting-header .cmdr-tab.cmdr-tab-active{transform:translateY(2px);border-radius:2px;border:2px solid var(--background-modifier-border);border-bottom-color:var(--background-primary)}.is-tablet .cmdr-tab{border:none!important;margin-bottom:2px;padding:10px;font-size:1.08em}.is-tablet .cmdr-tab,.is-tablet .cmdr-tab .cmdr-block{display:flex;align-items:center}.cmdr-mobile-modify-grid{padding:22px}.cmdr-mobile-modify-grid .cmdr-mobile-modify-option{display:flex;width:100%;justify-content:space-between;align-items:center;margin-bottom:16px}.cmdr-mobile-modify-grid .cmdr-mobile-modify-option>input{max-width:70%}.cmdr-mobile-modify-grid .cmdr-mobile-modify-option .dropdown{margin:auto}.cmdr-credits{display:flex}.cmdr-credits>span{color:var(--text-muted);font-size:14px}.cmdr-about{display:flex;flex-direction:column;align-items:center;padding-bottom:64px}.cmdr-about hr{width:100%;margin-top:0}.cmdr-about button{display:flex;align-items:center;height:2.6em;font-weight:700;gap:16px;border-radius:6px;margin-bottom:8px}.cmdr-about button:last-of-type{margin-bottom:32px}.cmdr-about .setting-item button{margin:0}.cmdr-about .cmdr-icon-wrapper{display:flex}.cmdr-about .cmdr-icon-wrapper>svg{width:90px;height:90px}.cmdr-about .cmdr-version{text-decoration:none;font-size:12px;color:var(--text-muted)}.cmdr-name-input-wrapper{display:flex;gap:8px;align-items:center}.cmdr-name-input-wrapper button{margin:8px}.cmdr-icon.clickable-icon.mod-warning{cursor:default}.cmdr-hider-title{display:flex;flex-direction:column;align-items:center}.cmdr-hider-title h3{margin-top:0;margin-bottom:8px;font-weight:900}.cmdr-hider-title p{margin-top:0;margin-bottom:26px;width:50%;text-align:center}.setting-item-control .cmdr-editable{width:2em;text-align:center}.setting-item-control .cmdr-editable input,.setting-item-control .cmdr-editable span{width:2em;color:var(--text-normal)}.cmdr-slider .setting-item-control>div{width:100%}.cmdr-slider input.slider{margin-left:4px}.view-action:not(:last-child){margin-right:var(--cmdr-spacing)}.status-bar-item:not(:last-child),.titlebar-button:not(:last-child){margin-right:calc(var(--cmdr-spacing) - 8px)}.side-dock-ribbon-action:not(:last-child){margin-bottom:calc(var(--cmdr-spacing) - 8px)}.cmdr-cta{position:relative}.cmdr-cta:after{content:"";position:absolute;top:-10%;width:104%;left:-2%;height:120%;outline:2px solid var(--color-accent);border-radius:1em;pointer-events:none}.cmdr-mm-item{display:flex;flex-direction:row!important;align-items:center!important;justify-content:space-between;padding:24px 0}.cmdr-mm-item>:first-child{flex-grow:1}.cmdr-mm-item>:last-child{display:flex}.cmdr-mm-item>*{display:flex;flex-direction:column}.cmdr-mm-item>*>span{margin-right:4px;margin-bottom:2px;font-size:12px;color:var(--text-muted);font-weight:700;margin-left:2px}.cmdr-mm-item .cmdr-slider{padding-bottom:0}.cmdr-mm-item .cmdr-slider .cmdr-editable{width:auto;font-size:smaller}.cmdr-mm-item .cmdr-slider .cmdr-editable span{color:var(--text-muted)}.cmdr-mm-actions{width:100%;display:flex;flex-direction:row!important;justify-content:end;gap:8px}.cmdr-mm-actions button{all:unset;cursor:pointer;color:var(--text-accent);padding:6px;border-radius:4px;transition:all .15s ease;text-transform:uppercase;font-weight:700;font-size:small}.cmdr-mm-actions button:hover{color:var(--text-accent-hover);background-color:var(--background-secondary)}.cmdr-mm-actions button:before{content:"+ "}.cmdr-mm-actions button:active{transform:scale(.98)}.cmdr-mm-control{margin-top:24px;width:100%;display:flex;justify-content:center;gap:8px}.cmdr-mm-action-text{opacity:0}.cmdr-mm-action-options{display:flex}.body{--at-button-height:48;--at-row-count:0}.AT-multirow.AT-row .mobile-toolbar-options-container{flex-flow:column wrap}.is-mobile .mobile-toolbar{position:sticky!important;z-index:5;margin-bottom:var(--at-offset)}.AT-always-shown .is-pinned .workspace-drawer-inner{margin-bottom:calc(var(--at-button-height)*var(--at-row-count) + var(--at-spacing))}.AT-multirow.AT-column .mobile-toolbar-options-container{flex-flow:row wrap;overflow-y:auto}.mobile-toolbar-option{height:var(--at-button-height);min-width:var(--at-button-width)}.AT-multirow .mobile-toolbar,.AT-multirow .mobile-toolbar-options-container{height:calc(var(--at-button-height)*var(--at-row-count) + var(--at-spacing))!important}.AT-no-toolbar .mobile-toolbar{display:none}.cmdr-block{display:block}.cmdr-flex{display:flex}.cmdr-items-center{align-items:center}.cmdr-justify-between{justify-content:space-between}.cmdr-gap-1{gap:.25rem}.cmdr-justify-self-start{justify-self:start} \ No newline at end of file diff --git a/.obsidian/plugins/lumberjack-obsidian/data.json b/.obsidian/plugins/lumberjack-obsidian/data.json new file mode 100644 index 0000000..00cf469 --- /dev/null +++ b/.obsidian/plugins/lumberjack-obsidian/data.json @@ -0,0 +1,9 @@ +{ + "logPrefix": "- [ ] ", + "useTimestamp": true, + "alwaysOpenInNewLeaf": false, + "inboxFilePath": "Inbox/Lumberjack", + "newDraftFilenameTemplate": "YYYYMMDD--HHmmss", + "targetHeader": "todo/daily", + "timestampFormat": "HH:mm" +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-kanban/data.json b/.obsidian/plugins/obsidian-kanban/data.json new file mode 100644 index 0000000..dac5dcf --- /dev/null +++ b/.obsidian/plugins/obsidian-kanban/data.json @@ -0,0 +1,3 @@ +{ + "new-note-folder": "Databases/Kanban Cards" +} \ No newline at end of file diff --git a/.obsidian/plugins/recent-files-obsidian/data.json b/.obsidian/plugins/recent-files-obsidian/data.json index e7d6c43..169c505 100644 --- a/.obsidian/plugins/recent-files-obsidian/data.json +++ b/.obsidian/plugins/recent-files-obsidian/data.json @@ -1,13 +1,29 @@ { "recentFiles": [ - { - "basename": "Hotkeys", - "path": "_tutorial/Hotkeys.md" - }, { "basename": "README", "path": "README.md" }, + { + "basename": "CRM", + "path": "Computed/CRM.md" + }, + { + "basename": "CRM", + "path": "Databases/CRM/CRM.md" + }, + { + "basename": "Tasks", + "path": "Computed/Tasks.md" + }, + { + "basename": "202212151455", + "path": "202212151455.md" + }, + { + "basename": "Hotkeys", + "path": "_tutorial/Hotkeys.md" + }, { "basename": "To Process", "path": "Computed/To Process.md" @@ -68,18 +84,10 @@ "basename": "Secret Note", "path": "Private/Secret Note.md" }, - { - "basename": "CRM", - "path": "Computed/CRM.md" - }, { "basename": "Trackers", "path": "Computed/Trackers.md" }, - { - "basename": "Tasks", - "path": "Computed/Tasks.md" - }, { "basename": "202212090137", "path": "202212090137.md" @@ -88,10 +96,6 @@ "basename": "2022-12-15-14-50-51", "path": "Inbox/Computer Capture/2022-12-15-14-50-51.md" }, - { - "basename": "202212151455", - "path": "202212151455.md" - }, { "basename": "2022-12-15-14-50-23", "path": "Inbox/Computer Capture/2022-12-15-14-50-23.md" @@ -168,10 +172,6 @@ "basename": "Quarterly", "path": "Templates/Quarterly.md" }, - { - "basename": "CRM", - "path": "Databases/CRM/CRM.md" - }, { "basename": "Recipes", "path": "Templates/Recipes.md" diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 800852b..2fde3a1 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -20,21 +20,8 @@ }, "pinned": true } - }, - { - "id": "c8a2876e1feba161", - "type": "leaf", - "state": { - "type": "markdown", - "state": { - "file": "_tutorial/Hotkeys.md", - "mode": "source", - "source": false - } - } } - ], - "currentTab": 1 + ] } ], "direction": "vertical" @@ -103,7 +90,8 @@ } ], "direction": "horizontal", - "width": 300 + "width": 300, + "collapsed": true }, "right": { "id": "b2837026535a9eaa", @@ -120,7 +108,7 @@ "state": { "type": "backlink", "state": { - "file": "_tutorial/Hotkeys.md", + "file": "README.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -137,7 +125,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "_tutorial/Hotkeys.md", + "file": "README.md", "linksCollapsed": false, "unlinkedCollapsed": true } @@ -160,7 +148,7 @@ "state": { "type": "outline", "state": { - "file": "_tutorial/Hotkeys.md" + "file": "README.md" } } }, @@ -203,22 +191,29 @@ "command-palette:Open command palette": true, "zk-prefixer:Create new unique note": true, "random-note:Open random note": true, - "periodic-notes:Open today": false, "obsidian-map-view:Open map view": false, - "obsidian-excalidraw-plugin:New Excalidraw drawing": false + "obsidian-excalidraw-plugin:New Excalidraw drawing": false, + "periodic-notes:Open today": false, + "cmdr:QuickAdd: Add to Project Scratchpad": false, + "cmdr:QuickAdd: Create New Project": false, + "cmdr:QuickAdd: Add to Project Kanban": false, + "cmdr:Linter: Lint the current file": false, + "cmdr:QuickAdd: Capture Thought": false, + "cmdr:Luhman: Insert Zettel Link": false, + "open-vscode:VSCode": false } }, - "active": "c8a2876e1feba161", + "active": "c102a50492c64997", "lastOpenFiles": [ + "Computed/CRM.md", + "Databases/CRM/CRM.md", "README.md", + "Computed/Tasks.md", + "202212151455.md", + "_tutorial/Hotkeys.md", "Computed/To Process.md", "Inbox/Computer Capture/2022-12-11--12-00-00.md", "Readwise-Example/Readwise-Example.md", - "202212120002.md", - "_tests/_tests.md", - "Private/202212141113.md", - "Private/Attachments/seinfeld the art of seduction.png", - "Attachments/Instant Pot Fried Rice - Little Sunny Kitchen.pdf", - "Attachments/Attachments.md" + "202212120002.md" ] } \ No newline at end of file diff --git a/Computed/CRM.md b/Computed/CRM.md index 3a58d16..2bc1918 100644 --- a/Computed/CRM.md +++ b/Computed/CRM.md @@ -1,6 +1,16 @@ + ```dataview -table phone, email, birthday, relationship, elink("https://instagram.com/@" + instagram, instagram) as instagram, elink("https://twitter.com/" + twitter, twitter) as twitter, elink("https://linkedin.com/@" + linkedin, linkedin) as linkedin, url as url +table phone, email, birthday, relationship, +choice( + regexmatch("\w+", instagram), + elink("https://instagram.com/@" + instagram, instagram), "\-") as instagram, +choice( + regexmatch("\w+", instagram), + elink("https://twitter.com/" + twitter, twitter), "\-") as twitter, +choice( + regexmatch("\w+", instagram), + elink("https://linkedin.com/@" + linkedin, linkedin), "\-") as linkedin, url as url from "Databases/CRM" where file.name != "CRM" ``` diff --git a/README.md b/README.md index 38d039c..96f156e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ --- -tags: [zettel] +tags: [readme] title: README date created: Friday, December 9th 2022, 12:24:59 pm date modified: Wednesday, December 14th 2022, 5:04:46 pm @@ -457,7 +457,21 @@ Plugins: ## Implementation -Now that we have examined some of the philosophies that power BHOV-2023, we get to go into the gritty details of how to set it up. +Now that we have examined some of the philosophies that power BHOV-2023, we get to go into the gritty details of how to set BHOV-2023 up, starting with the Big Three Workflows. + +### The Big Three + +Most interactions with BHOV fall under three categories: project related work, daily notes related work, and Zettelkasten related work. Each has its own set of workflows, and particularities. Let's dive into each and see how to work with them. + +#### From Capture To Complete Thought (Zettelkasten) + +There are numerous ways that new information comes into the vault. This could be through the lumberjack plug-in read wise or any other variety of shortcuts. Since obsidian is folder backed, anything that can insert a file to this folder will show up in your vault. If a note has the \#to-process tag, it will show up in computed/To Process. + +From there take a second to think about the note that you are looking at. Is it missing information or contacts that you can provide? Is it too long and needs to be shortened down to something more pithy? In the two processes know right out what you wanted to see if it was a standalone note that you wouldn't mind putting in a letter and sealing up in an envelope. + +Finally highlight the text that you just created and copy it to clipboard. Once in the clipboard hit control in to make a new note, in template it will automatically create a Zettelkasten note + +#### Project Management Like a Pro (Projects) ### Folder Structure @@ -548,15 +562,9 @@ I use my CRM to keep track of important days like birthdays as well as items dis ## Tips and Tricks -### From Capture To Complete Thought +### Someday/Maybe Tasks (GTD) -There are a lot of different ways that new information my into your vault. This could be through the lumberjack plug-in read wise or any other variety of shortcuts. Since obsidian is folder backed, anything that can insert a file to this folder will show up in your vault. If a note has the \#to-process tag, it will show up in computed/To Process. - -From there take a second to think about the note that you are looking at. Is it missing information or contacts that you can provide? Is it too long and needs to be shortened down to something more pithy? In the two processes know right out what you wanted to see if it was a standalone note that you wouldn't mind putting in a letter and sealing up in an envelope. - -Finally highlight the text that you just created and copy it to clipboard. Once in the clipboard hit control in to make a new note, in template it will automatically create a Zettelkasten note - -### Project Management Like a Pro +Since BHOV-2023 is catered towards immediate processes, you may be wondering where to put open goals you have for yourself that aren't immediately trackable; like "learn Italian" or "run a 5k". I personally create a Kanban within my Quarterly note, and in addition to the regular columns (To Do, In Progress, Complete, Waiting On) I have a fourth column called "Someday/Maybe". The reason I put it in my quarterly note is that quarterly review happens infrequently enough (once every three months) that I get to decide if I really want to take on a Someday/Maybe task. In addition, Quarterly planning is a great time to do long term goal planning and come up with concrete steps! ## External Tools diff --git a/_scripts/quick-add-create-project-folder.js b/_scripts/quick-add-create-project-folder.js index e5c4d9e..650f721 100644 --- a/_scripts/quick-add-create-project-folder.js +++ b/_scripts/quick-add-create-project-folder.js @@ -47,7 +47,7 @@ aliases: tags: [projects, ${userInput.replace(/ /g, "-")}] ---\n\n\`\`\`dataview list -where contains(projects, "${userInput}") +where contains(projects, "${userInput.replace(/ /g, "-")}") \`\`\`\n\n` ) }