Files
bramses-highly-opinionated-…/.obsidian/plugins/cmdr/main.js
2022-12-17 16:44:35 -06:00

10 lines
109 KiB
JavaScript

/*
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 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&&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;o<e.__k.length;o++)if((t=e.__k[o])!=null&&t.__e!=null)return t.__e;return typeof e.type=="function"?ye(e):null}function Ao(e){var o,t;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,o=0;o<e.__k.length;o++)if((t=e.__k[o])!=null&&t.__e!=null){e.__e=e.__c.base=t.__e;break}return Ao(e)}}function _t(e){(!e.__d&&(e.__d=!0)&&Ce.push(e)&&!Ze.__r++||Mo!==C.debounceRendering)&&((Mo=C.debounceRendering)||setTimeout)(Ze)}function Ze(){for(var e;Ze.__r=Ce.length;)e=Ce.sort(function(o,t){return o.__v.__b-t.__v.__b}),Ce=[],e.some(function(o){var t,n,i,a,c,d;o.__d&&(c=(a=(t=o).__v).__e,(d=t.__P)&&(n=[],(i=ie({},a)).__v=a.__v+1,Ct(d,a,i,t.__n,d.ownerSVGElement!==void 0,a.__h!=null?[c]:null,n,c==null?ye(a):c,a.__h),Ho(n,a),a.__e!=c&&Ao(a)))})}function No(e,o,t,n,i,a,c,d,m,h){var s,g,_,f,b,y,v,B=n&&n.__k||To,w=B.length;for(t.__k=[],s=0;s<o.length;s++)if((f=t.__k[s]=(f=o[s])==null||typeof f=="boolean"?null:typeof f=="string"||typeof f=="number"||typeof f=="bigint"?We(null,f,null,null,f):Array.isArray(f)?We(P,{children:f},null,null,null):f.__b>0?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<w;g++){if((_=B[g])&&f.key==_.key&&f.type===_.type){B[g]=void 0;break}_=null}Ct(e,f,_=_||Ue,i,a,c,d,m,h),b=f.__e,(g=f.ref)&&_.ref!=g&&(v||(v=[]),_.ref&&v.push(_.ref,null,f),v.push(g,f.__c||b,f)),b!=null?(y==null&&(y=b),typeof f.type=="function"&&f.__k===_.__k?f.__d=m=Bo(f,m,e):m=Do(e,f,_,B,b,m),typeof t.type=="function"&&(t.__d=m)):m&&_.__e==m&&m.parentNode!=e&&(m=ye(_))}for(t.__e=y,s=w;s--;)B[s]!=null&&Fo(B[s],B[s]);if(v)for(s=0;s<v.length;s++)Ro(v[s],v[++s],v[++s])}function Bo(e,o,t){for(var n,i=e.__k,a=0;i&&a<i.length;a++)(n=i[a])&&(n.__=e,o=typeof n.type=="function"?Bo(n,o,t):Do(t,n,n,i,n.__e,o));return o}function we(e,o){return o=o||[],e==null||typeof e=="boolean"||(Array.isArray(e)?e.some(function(t){we(t,o)}):o.push(e)),o}function Do(e,o,t,n,i,a){var c,d,m;if(o.__d!==void 0)c=o.__d,o.__d=void 0;else if(t==null||i!=a||i.parentNode==null)e:if(a==null||a.parentNode!==e)e.appendChild(i),c=null;else{for(d=a,m=0;(d=d.nextSibling)&&m<n.length;m+=1)if(d==i)break e;e.insertBefore(i,a),c=a}return c!==void 0?c:i.nextSibling}function fi(e,o,t,n,i){var a;for(a in t)a==="children"||a==="key"||a in o||qe(e,a,null,t[a],n);for(a in o)i&&typeof o[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||t[a]===o[a]||qe(e,a,o[a],t[a],n)}function xo(e,o,t){o[0]==="-"?e.setProperty(o,t):e[o]=t==null?"":typeof t!="number"||pi.test(o)?t:t+"px"}function qe(e,o,t,n,i){var a;e:if(o==="style")if(typeof t=="string")e.style.cssText=t;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(o in n)t&&o in t||xo(e.style,o,"");if(t)for(o in t)n&&t[o]===n[o]||xo(e.style,o,t[o])}else if(o[0]==="o"&&o[1]==="n")a=o!==(o=o.replace(/Capture$/,"")),o=o.toLowerCase()in e?o.toLowerCase().slice(2):o.slice(2),e.l||(e.l={}),e.l[o+a]=t,t?n||e.addEventListener(o,a?Eo:Io,a):e.removeEventListener(o,a?Eo:Io,a);else if(o!=="dangerouslySetInnerHTML"){if(i)o=o.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(o!=="href"&&o!=="list"&&o!=="form"&&o!=="tabIndex"&&o!=="download"&&o in e)try{e[o]=t==null?"":t;break e}catch(c){}typeof t=="function"||(t==null||t===!1&&o.indexOf("-")==-1?e.removeAttribute(o):e.setAttribute(o,t))}}function Io(e){this.l[e.type+!1](C.event?C.event(e):e)}function Eo(e){this.l[e.type+!0](C.event?C.event(e):e)}function Ct(e,o,t,n,i,a,c,d,m){var h,s,g,_,f,b,y,v,B,w,D,ee,Be,ue,pe,X=o.type;if(o.constructor!==void 0)return null;t.__h!=null&&(m=t.__h,d=o.__e=t.__e,o.__h=null,a=[d]),(h=C.__b)&&h(o);try{e:if(typeof X=="function"){if(v=o.props,B=(h=X.contextType)&&n[h.__c],w=h?B?B.props.value:h.__:n,t.__c?y=(s=o.__c=t.__c).__=s.__E:("prototype"in X&&X.prototype.render?o.__c=s=new X(v,w):(o.__c=s=new G(v,w),s.constructor=X,s.render=vi),B&&B.sub(s),s.props=v,s.state||(s.state={}),s.context=w,s.__n=n,g=s.__d=!0,s.__h=[],s._sb=[]),s.__s==null&&(s.__s=s.state),X.getDerivedStateFromProps!=null&&(s.__s==s.state&&(s.__s=ie({},s.__s)),ie(s.__s,X.getDerivedStateFromProps(v,s.__s))),_=s.props,f=s.state,g)X.getDerivedStateFromProps==null&&s.componentWillMount!=null&&s.componentWillMount(),s.componentDidMount!=null&&s.__h.push(s.componentDidMount);else{if(X.getDerivedStateFromProps==null&&v!==_&&s.componentWillReceiveProps!=null&&s.componentWillReceiveProps(v,w),!s.__e&&s.shouldComponentUpdate!=null&&s.shouldComponentUpdate(v,s.__s,w)===!1||o.__v===t.__v){for(s.props=v,s.state=s.__s,o.__v!==t.__v&&(s.__d=!1),s.__v=o,o.__e=t.__e,o.__k=t.__k,o.__k.forEach(function(fe){fe&&(fe.__=o)}),D=0;D<s._sb.length;D++)s.__h.push(s._sb[D]);s._sb=[],s.__h.length&&c.push(s);break e}s.componentWillUpdate!=null&&s.componentWillUpdate(v,s.__s,w),s.componentDidUpdate!=null&&s.__h.push(function(){s.componentDidUpdate(_,f,b)})}if(s.context=w,s.props=v,s.__v=o,s.__P=e,ee=C.__r,Be=0,"prototype"in X&&X.prototype.render){for(s.state=s.__s,s.__d=!1,ee&&ee(o),h=s.render(s.props,s.state,s.context),ue=0;ue<s._sb.length;ue++)s.__h.push(s._sb[ue]);s._sb=[]}else do s.__d=!1,ee&&ee(o),h=s.render(s.props,s.state,s.context),s.state=s.__s;while(s.__d&&++Be<25);s.state=s.__s,s.getChildContext!=null&&(n=ie(ie({},n),s.getChildContext())),g||s.getSnapshotBeforeUpdate==null||(b=s.getSnapshotBeforeUpdate(_,f)),pe=h!=null&&h.type===P&&h.key==null?h.props.children:h,No(e,Array.isArray(pe)?pe:[pe],o,t,n,i,a,c,d,m),s.base=o.__e,o.__h=null,s.__h.length&&c.push(s),y&&(s.__E=s.__=null),s.__e=!1}else a==null&&o.__v===t.__v?(o.__k=t.__k,o.__e=t.__e):o.__e=hi(t.__e,o,t,n,i,a,c,m);(h=C.diffed)&&h(o)}catch(fe){o.__v=null,(m||a!=null)&&(o.__e=d,o.__h=!!m,a[a.indexOf(d)]=null),C.__e(fe,o,t)}}function Ho(e,o){C.__c&&C.__c(o,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(n){n.call(t)})}catch(n){C.__e(n,t.__v)}})}function hi(e,o,t,n,i,a,c,d){var m,h,s,g=t.props,_=o.props,f=o.type,b=0;if(f==="svg"&&(i=!0),a!=null){for(;b<a.length;b++)if((m=a[b])&&"setAttribute"in m==!!f&&(f?m.localName===f:m.nodeType===3)){e=m,a[b]=null;break}}if(e==null){if(f===null)return document.createTextNode(_);e=i?document.createElementNS("http://www.w3.org/2000/svg",f):document.createElement(f,_.is&&_),a=null,d=!1}if(f===null)g===_||d&&e.data===_||(e.data=_);else{if(a=a&&Xe.call(e.childNodes),h=(g=t.props||Ue).dangerouslySetInnerHTML,s=_.dangerouslySetInnerHTML,!d){if(a!=null)for(g={},b=0;b<e.attributes.length;b++)g[e.attributes[b].name]=e.attributes[b].value;(s||h)&&(s&&(h&&s.__html==h.__html||s.__html===e.innerHTML)||(e.innerHTML=s&&s.__html||""))}if(fi(e,_,g,i,d),s)o.__k=[];else if(b=o.props.children,No(e,Array.isArray(b)?b:[b],o,t,n,i&&f!=="foreignObject",a,c,a?a[0]:t.__k&&ye(t,0),d),a!=null)for(b=a.length;b--;)a[b]!=null&&Lo(a[b]);d||("value"in _&&(b=_.value)!==void 0&&(b!==e.value||f==="progress"&&!b||f==="option"&&b!==g.value)&&qe(e,"value",b,g.value,!1),"checked"in _&&(b=_.checked)!==void 0&&b!==e.checked&&qe(e,"checked",b,g.checked,!1))}return e}function Ro(e,o,t){try{typeof e=="function"?e(o):e.current=o}catch(n){C.__e(n,t)}}function Fo(e,o,t){var n,i;if(C.unmount&&C.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Ro(n,null,o)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){C.__e(a,o)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Fo(n[i],o,t||typeof e.type!="function");t||e.__e==null||Lo(e.__e),e.__=e.__e=e.__d=void 0}function vi(e,o,t){return this.constructor(e,t)}function W(e,o,t){var n,i,a;C.__&&C.__(e,o),i=(n=typeof t=="function")?null:t&&t.__k||o.__k,a=[],Ct(o,e=(!n&&t||o).__k=r(P,null,[e]),i||Ue,Ue,o.ownerSVGElement!==void 0,!n&&t?[t]:i?null:o.firstChild?Xe.call(o.childNodes):null,a,!n&&t?t:i?i.__e:o.firstChild,n),Ho(a,e)}function Je(e,o){var t={__c:o="__cC"+Po++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,a;return this.getChildContext||(i=[],(a={})[o]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(c){this.props.value!==c.value&&i.some(_t)},this.sub=function(c){i.push(c);var d=c.componentWillUnmount;c.componentWillUnmount=function(){i.splice(i.indexOf(c),1),d&&d.call(c)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t}Xe=To.slice,C={__e:function(e,o,t,n){for(var i,a,c;o=o.__;)if((i=o.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),c=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),c=i.__d),c)return i.__E=i}catch(d){e=d}throw e}},So=0,ui=function(e){return e!=null&&e.constructor===void 0},G.prototype.setState=function(e,o){var t;t=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ie({},this.state),typeof e=="function"&&(e=e(ie({},t),this.props)),e&&ie(t,e),e!=null&&this.__v&&(o&&this._sb.push(o),_t(this))},G.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),_t(this))},G.prototype.render=P,Ce=[],Ze.__r=0,Po=0;var ke,R,yt,Oo,Ye=0,Xo=[],je=[],Vo=C.__b,zo=C.__r,Wo=C.diffed,Uo=C.__c,Zo=C.unmount;function Ge(e,o){C.__h&&C.__h(R,e,Ye||o),Ye=0;var t=R.__H||(R.__H={__:[],__h:[]});return e>=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<N?(T=N,delete M[x],S()):M[x]=requestAnimationFrame(I)}),x},E=function(S){M[S]&&cancelAnimationFrame(M[S])}):(l=function(S){return setTimeout(S,p)},E=function(S){return clearTimeout(S)}),{frame:l,cancel:E}}(),h=function(){var p,l,E={};function M(T){function S(x,I){T.postMessage({options:x||{},callback:I})}T.init=function(I){var N=I.transferControlToOffscreen();T.postMessage({canvas:N},[N])},T.fire=function(I,N,te){if(l)return S(I,null),l;var L=Math.random().toString(36).slice(2);return l=d(function(Y){function j(A){A.data.callback===L&&(delete E[L],T.removeEventListener("message",j),l=null,te(),Y())}T.addEventListener("message",j),S(I,L),E[L]=j.bind(null,{data:{callback:L}})}),l},T.reset=function(){T.postMessage({reset:!0});for(var I in E)E[I](),delete E[I]}}return function(){if(p)return p;if(!n&&a){var T=["var CONFETTI, SIZE = {}, module = {};","("+e.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join(`
`);try{p=new Worker(URL.createObjectURL(new Blob([T])))}catch(S){return typeof console!==void 0&&typeof console.warn=="function"&&console.warn("\u{1F38A} Could not load worker",S),null}M(p)}return p}}(),s={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function g(p,l){return l?l(p):p}function _(p){return p!=null}function f(p,l,E){return g(p&&_(p[l])?p[l]:s[l],E)}function b(p){return p<0?0:Math.floor(p)}function y(p,l){return Math.floor(Math.random()*(l-p))+p}function v(p){return parseInt(p,16)}function B(p){return p.map(w)}function w(p){var l=String(p).replace(/[^0-9a-f]/gi,"");return l.length<6&&(l=l[0]+l[0]+l[1]+l[1]+l[2]+l[2]),{r:v(l.substring(0,2)),g:v(l.substring(2,4)),b:v(l.substring(4,6))}}function D(p){var l=f(p,"origin",Object);return l.x=f(l,"x",Number),l.y=f(l,"y",Number),l}function ee(p){p.width=document.documentElement.clientWidth,p.height=document.documentElement.clientHeight}function Be(p){var l=p.getBoundingClientRect();p.width=l.width,p.height=l.height}function ue(p){var l=document.createElement("canvas");return l.style.position="fixed",l.style.top="0px",l.style.left="0px",l.style.pointerEvents="none",l.style.zIndex=p,l}function pe(p,l,E,M,T,S,x,I,N){p.save(),p.translate(l,E),p.rotate(S),p.scale(M,T),p.arc(0,0,1,x,I,N),p.restore()}function X(p){var l=p.angle*(Math.PI/180),E=p.spread*(Math.PI/180);return{x:p.x,y:p.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:p.startVelocity*.5+Math.random()*p.startVelocity,angle2D:-l+(.5*E-Math.random()*E),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:p.color,shape:p.shape,tick:0,totalTicks:p.ticks,decay:p.decay,drift:p.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:p.gravity*3,ovalScalar:.6,scalar:p.scalar}}function fe(p,l){l.x+=Math.cos(l.angle2D)*l.velocity+l.drift,l.y+=Math.sin(l.angle2D)*l.velocity+l.gravity,l.wobble+=l.wobbleSpeed,l.velocity*=l.decay,l.tiltAngle+=.1,l.tiltSin=Math.sin(l.tiltAngle),l.tiltCos=Math.cos(l.tiltAngle),l.random=Math.random()+2,l.wobbleX=l.x+10*l.scalar*Math.cos(l.wobble),l.wobbleY=l.y+10*l.scalar*Math.sin(l.wobble);var E=l.tick++/l.totalTicks,M=l.x+l.random*l.tiltCos,T=l.y+l.random*l.tiltSin,S=l.wobbleX+l.random*l.tiltCos,x=l.wobbleY+l.random*l.tiltSin;if(p.fillStyle="rgba("+l.color.r+", "+l.color.g+", "+l.color.b+", "+(1-E)+")",p.beginPath(),l.shape==="circle")p.ellipse?p.ellipse(l.x,l.y,Math.abs(S-M)*l.ovalScalar,Math.abs(x-T)*l.ovalScalar,Math.PI/10*l.wobble,0,2*Math.PI):pe(p,l.x,l.y,Math.abs(S-M)*l.ovalScalar,Math.abs(x-T)*l.ovalScalar,Math.PI/10*l.wobble,0,2*Math.PI);else if(l.shape==="star")for(var I=Math.PI/2*3,N=4*l.scalar,te=8*l.scalar,L=l.x,Y=l.y,j=5,A=Math.PI/j;j--;)L=l.x+Math.cos(I)*te,Y=l.y+Math.sin(I)*te,p.lineTo(L,Y),I+=A,L=l.x+Math.cos(I)*N,Y=l.y+Math.sin(I)*N,p.lineTo(L,Y),I+=A;else p.moveTo(Math.floor(l.x),Math.floor(l.y)),p.lineTo(Math.floor(l.wobbleX),Math.floor(T)),p.lineTo(Math.floor(S),Math.floor(x)),p.lineTo(Math.floor(M),Math.floor(l.wobbleY));return p.closePath(),p.fill(),l.tick<l.totalTicks}function En(p,l,E,M,T){var S=l.slice(),x=p.getContext("2d"),I,N,te=d(function(L){function Y(){I=N=null,x.clearRect(0,0,M.width,M.height),T(),L()}function j(){n&&!(M.width===i.width&&M.height===i.height)&&(M.width=p.width=i.width,M.height=p.height=i.height),!M.width&&!M.height&&(E(p),M.width=p.width,M.height=p.height),x.clearRect(0,0,M.width,M.height),S=S.filter(function(A){return fe(x,A)}),S.length?I=m.frame(j):Y()}I=m.frame(j),N=Y});return{addFettis:function(L){return S=S.concat(L),te},canvas:p,promise:te,reset:function(){I&&m.cancel(I),N&&N()}}}function Wt(p,l){var E=!p,M=!!f(l||{},"resize"),T=f(l,"disableForReducedMotion",Boolean),S=a&&!!f(l||{},"useWorker"),x=S?h():null,I=E?ee:Be,N=p&&x?!!p.__confetti_initialized:!1,te=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,L;function Y(A,ut,pt){for(var he=f(A,"particleCount",b),De=f(A,"angle",Number),He=f(A,"spread",Number),re=f(A,"startVelocity",Number),Sn=f(A,"decay",Number),Pn=f(A,"gravity",Number),Tn=f(A,"drift",Number),Zt=f(A,"colors",B),Ln=f(A,"ticks",Number),qt=f(A,"shapes"),An=f(A,"scalar"),Xt=D(A),Jt=he,ft=[],Nn=p.width*Xt.x,Bn=p.height*Xt.y;Jt--;)ft.push(X({x:Nn,y:Bn,angle:De,spread:He,startVelocity:re,color:Zt[Jt%Zt.length],shape:qt[y(0,qt.length)],ticks:Ln,decay:Sn,gravity:Pn,drift:Tn,scalar:An}));return L?L.addFettis(ft):(L=En(p,ft,I,ut,pt),L.promise)}function j(A){var ut=T||f(A,"disableForReducedMotion",Boolean),pt=f(A,"zIndex",Number);if(ut&&te)return d(function(re){re()});E&&L?p=L.canvas:E&&!p&&(p=ue(pt),document.body.appendChild(p)),M&&!N&&I(p);var he={width:p.width,height:p.height};x&&!N&&x.init(p),N=!0,x&&(p.__confetti_initialized=!0);function De(){if(x){var re={getBoundingClientRect:function(){if(!E)return p.getBoundingClientRect()}};I(re),x.postMessage({resize:{width:re.width,height:re.height}});return}he.width=he.height=null}function He(){L=null,M&&o.removeEventListener("resize",De),E&&p&&(document.body.removeChild(p),p=null,N=!1)}return M&&o.addEventListener("resize",De,!1),x?x.fire(A,he,He):Y(A,he,He)}return j.reset=function(){x&&x.reset(),L&&L.reset()},j}var mt;function Ut(){return mt||(mt=Wt(null,{useWorker:!0,resize:!0})),mt}t.exports=function(){return Ut().apply(this,arguments)},t.exports.reset=function(){Ut().reset()},t.exports.create=Wt})(function(){return typeof window!="undefined"?window:typeof self!="undefined"?self:this||{}}(),xt,!1);var $o=xt.exports,ja=xt.exports.create;async function Z(e){let o=await new ne(e).awaitSelection(),t;o.hasOwnProperty("icon")||(t=await new H(e).awaitSelection());let n=await new U(o.name).awaitSelection();return{id:o.id,icon:t!=null?t:o.icon,name:n||o.name,mode:"any"}}function Q(e){var o;return(o=app.commands.commands[e])!=null?o:null}function k(n){var i=n,{icon:e,size:o}=i,t=Gt(i,["icon","size"]);let a=K(null);return kt(()=>{(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]<t[0])break;e.u=t=t[2]}};(it.prototype=new G).__a=function(e){var o=this,t=un(o.__v),n=o.o.get(e);return n[0]++,function(i){var a=function(){o.props.revealOrder?(n.push(i),nn(o,e,n)):i()};t?t(a):a()}},it.prototype.render=function(e){this.u=null,this.o=new Map;var o=we(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&o.reverse();for(var t=o.length;t--;)this.o.set(o[t],this.u=[1,0,this.u]);return e.children},it.prototype.componentDidUpdate=it.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(o,t){nn(e,t,o)})};var wi=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,ki=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Mi=typeof document!="undefined",xi=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};G.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(G.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(o){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:o})}})});var an=C.event;function Ii(){}function Ei(){return this.cancelBubble}function Si(){return this.defaultPrevented}C.event=function(e){return an&&(e=an(e)),e.persist=Ii,e.isPropagationStopped=Ei,e.isDefaultPrevented=Si,e.nativeEvent=e};var Pi,rn={configurable:!0,get:function(){return this.class}},sn=C.vnode;C.vnode=function(e){var o=e.type,t=e.props,n=t;if(typeof o=="string"){var i=o.indexOf("-")===-1;for(var a in n={},t){var c=t[a];Mi&&a==="children"&&o==="noscript"||a==="value"&&"defaultValue"in t&&c==null||(a==="defaultValue"&&"value"in t&&t.value==null?a="value":a==="download"&&c===!0?c="":/ondoubleclick/i.test(a)?a="ondblclick":/^onchange(textarea|input)/i.test(a+o)&&!xi(t.type)?a="oninput":/^onfocus$/i.test(a)?a="onfocusin":/^onblur$/i.test(a)?a="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(a)?a=a.toLowerCase():i&&ki.test(a)?a=a.replace(/[A-Z0-9]/g,"-$&").toLowerCase():c===null&&(c=void 0),/^oninput$/i.test(a)&&(a=a.toLowerCase(),n[a]&&(a="oninputCapture")),n[a]=c)}o=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=we(t.children).forEach(function(d){d.props.selected=n.value.indexOf(d.props.value)!=-1})),o=="select"&&n.defaultValue!=null&&(n.value=we(t.children).forEach(function(d){d.props.selected=n.multiple?n.defaultValue.indexOf(d.props.value)!=-1:n.defaultValue==d.props.value})),e.props=n,t.class!=t.className&&(rn.enumerable="className"in t,t.className!=null&&(n.class=t.className),Object.defineProperty(n,"className",rn))}e.$$typeof=wi,sn&&sn(e)};var cn=C.__r;C.__r=function(e){cn&&cn(e),Pi=e.__c};var pn='<svg viewbox="0 0 118 105" width="118" xmlns="http://www.w3.org/2000/svg" height="105" style="-webkit-print-color-adjust:exact" fill="none"><defs><clipPath id="a" class="frame-clip"><rect rx="0" ry="0" width="118" height="105"/></clipPath></defs><g clip-path="url(#a)"><rect rx="0" ry="0" width="118" height="105" class="frame-background"/><g class="frame-children"><g class="any-key" style="fill:#000"><path d="M35.2 1C25.7 1 18 8.7 18 18.2v51.6C18 79.3 25.7 87 35.2 87h45.6C90.3 87 98 79.3 98 69.8V18.2C98 8.7 90.3 1 80.8 1H35.2Zm0 4h45.6C88.1 5 94 10.9 94 18.2v37.6C94 63.1 88.1 69 80.8 69H35.2C27.9 69 22 63.1 22 55.8V18.2C22 10.9 27.9 5 35.2 5ZM56 19v14.5L43.6 26l-2.1 3.4L54.1 37l-12.6 7.6 2.1 3.4L56 40.5V55h4V40.5L72.4 48l2.1-3.4L61.9 37l12.6-7.6-2.1-3.4L60 33.5V19h-4ZM22 66.8c3.2 3.8 7.9 6.2 13.2 6.2h45.6c5.3 0 10-2.4 13.2-6.2v3C94 77.1 88.1 83 80.8 83H35.2C27.9 83 22 77.1 22 69.8v-3Z" style="fill:var(--text-accent);fill-opacity:1"/><path d="M35.2 1C25.7 1 18 8.7 18 18.2v51.6C18 79.3 25.7 87 35.2 87h45.6C90.3 87 98 79.3 98 69.8V18.2C98 8.7 90.3 1 80.8 1H35.2Zm0 4h45.6C88.1 5 94 10.9 94 18.2v37.6C94 63.1 88.1 69 80.8 69H35.2C27.9 69 22 63.1 22 55.8V18.2C22 10.9 27.9 5 35.2 5ZM56 19v14.5L43.6 26l-2.1 3.4L54.1 37l-12.6 7.6 2.1 3.4L56 40.5V55h4V40.5L72.4 48l2.1-3.4L61.9 37l12.6-7.6-2.1-3.4L60 33.5V19h-4ZM22 66.8c3.2 3.8 7.9 6.2 13.2 6.2h45.6c5.3 0 10-2.4 13.2-6.2v3C94 77.1 88.1 83 80.8 83H35.2C27.9 83 22 77.1 22 69.8v-3Z" style="fill:none;stroke-width:1;stroke:var(--text-accent);stroke-opacity:1" class="stroke-shape"/></g><path d="M20.11 53.587 3 63.9"/><g class="stroke-shape"><defs><marker refX="3" fill-opacity="1" orient="auto-start-reverse" id="b" viewBox="0 0 6 6" fill="var(--text-accent)" refY="3" markerWidth="6" markerHeight="6"><path d="M3 2.5a.5.5 0 0 1 0 1"/></marker></defs><path d="M20.11 53.587 3 63.9" style="fill:none;stroke-width:5;stroke:var(--text-accent);stroke-opacity:1;marker-end:url(#b)"/></g><path d="m96 53.567 19.161-11.55"/><g class="stroke-shape"><defs><marker refX="3" fill-opacity="1" orient="auto-start-reverse" id="c" viewBox="0 0 6 6" fill="var(--text-accent)" refY="3" markerWidth="6" markerHeight="6"><path d="M3 2.5a.5.5 0 0 1 0 1"/></marker></defs><path d="m96 53.567 19.161-11.55" style="fill:none;stroke-width:5;stroke:var(--text-accent);stroke-opacity:1;marker-end:url(#c)"/></g><path d="M20.11 53.587 3 63.9"/><g class="stroke-shape"><defs><marker refX="3" fill-opacity="1" orient="auto-start-reverse" id="d" viewBox="0 0 6 6" fill="var(--text-accent)" refY="3" markerWidth="6" markerHeight="6"><path d="M3 2.5a.5.5 0 0 1 0 1"/></marker></defs><path d="M20.11 53.587 3 63.9" style="fill:none;stroke-width:5;stroke:var(--text-accent);stroke-opacity:1;marker-end:url(#d)"/></g><path d="M42 84v18h12"/><g class="stroke-shape"><defs><marker refX="3" fill-opacity="1" orient="auto-start-reverse" id="e" viewBox="0 0 6 6" fill="var(--text-accent)" refY="3" markerWidth="6" markerHeight="6"><path d="M3 2.5a.5.5 0 0 1 0 1"/></marker></defs><path d="M42 84v18h12" style="fill:none;stroke-width:5;stroke:var(--text-accent);stroke-opacity:1;marker-end:url(#e)"/></g><path d="M74 84v18h12"/><g class="stroke-shape"><defs><marker refX="3" fill-opacity="1" orient="auto-start-reverse" id="f" viewBox="0 0 6 6" fill="var(--text-accent)" refY="3" markerWidth="6" markerHeight="6"><path d="M3 2.5a.5.5 0 0 1 0 1"/></marker></defs><path d="M74 84v18h12" style="fill:none;stroke-width:5;stroke:var(--text-accent);stroke-opacity:1;marker-end:url(#f)"/></g><path d="m96 53.567 19.161-11.55"/><g class="stroke-shape"><defs><marker refX="3" fill-opacity="1" orient="auto-start-reverse" id="g" viewBox="0 0 6 6" fill="var(--text-accent)" refY="3" markerWidth="6" markerHeight="6"><path d="M3 2.5a.5.5 0 0 1 0 1"/></marker></defs><path d="m96 53.567 19.161-11.55" style="fill:none;stroke-width:5;stroke:var(--text-accent);stroke-opacity:1;marker-end:url(#g)"/></g><path d="M42 84v18h12"/><g class="stroke-shape"><defs><marker refX="3" fill-opacity="1" orient="auto-start-reverse" id="h" viewBox="0 0 6 6" fill="var(--text-accent)" refY="3" markerWidth="6" markerHeight="6"><path d="M3 2.5a.5.5 0 0 1 0 1"/></marker></defs><path d="M42 84v18h12" style="fill:none;stroke-width:5;stroke:var(--text-accent);stroke-opacity:1;marker-end:url(#h)"/></g><path d="M74 84v18h12"/><g class="stroke-shape"><defs><marker refX="3" fill-opacity="1" orient="auto-start-reverse" id="i" viewBox="0 0 6 6" fill="var(--text-accent)" refY="3" markerWidth="6" markerHeight="6"><path d="M3 2.5a.5.5 0 0 1 0 1"/></marker></defs><path d="M74 84v18h12" style="fill:none;stroke-width:5;stroke:var(--text-accent);stroke-opacity:1;marker-end:url(#i)"/></g></g></g></svg>';var fn='<svg width="123" height="188" viewBox="0 0 123 188" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M119 175L103.432 133C73.7524 139.283 53.9222 145.129 22.5771 136.862C15.3206 149.682 12.2565 162.18 5 175C10.7765 172.272 13.6163 172.349 18.0573 175C24.2389 171.44 26.3603 172.689 30.1101 175C38.3142 168.983 42.4376 170.766 49.696 175C56.2083 170.119 59.7022 170.597 65.7665 175C75.3874 169.4 79.6872 171.411 87.3505 174.994L87.3612 175C93.0886 171.481 96.1438 171.819 101.423 175C108.021 171.024 111.937 172.03 119 175Z" fill="#A80000" stroke="#A80000" stroke-width="4" /><path d="M36.156 79.2386L84.6308 77.676L52.8425 7.1636L36.156 79.2386Z" fill="#B50D0D" stroke="#B50D0D" stroke-width="4" /><ellipse cx="84" cy="172.5" rx="8" ry="6.5" fill="white" /><ellipse cx="92" cy="174.5" rx="8" ry="6.5" fill="white" /><ellipse cx="100" cy="172.5" rx="8" ry="6.5" fill="white" /><ellipse cx="111" cy="174.5" rx="8" ry="6.5" fill="white" /><ellipse cx="114" cy="176.5" rx="8" ry="6.5" fill="white" /><ellipse cx="75" cy="174.5" rx="8" ry="6.5" fill="white" /><ellipse cx="66" cy="172.5" rx="8" ry="6.5" fill="white" /><ellipse cx="57" cy="172.5" rx="8" ry="6.5" fill="white" /><ellipse cx="48" cy="174.5" rx="8" ry="6.5" fill="white" /><ellipse cx="41" cy="172.5" rx="8" ry="6.5" fill="white" /><ellipse cx="36" cy="174.5" rx="8" ry="6.5" fill="white" /><ellipse cx="30" cy="173.5" rx="8" ry="6.5" fill="white" /><ellipse cx="28" cy="172.5" rx="8" ry="6.5" fill="white" /><ellipse cx="24" cy="174.5" rx="8" ry="6.5" fill="white" /><ellipse cx="19" cy="172.5" rx="8" ry="6.5" fill="white" /><ellipse cx="13" cy="174.5" rx="8" ry="6.5" fill="white" /><ellipse cx="8" cy="175.5" rx="8" ry="6.5" fill="white" /><path d="M46 166V183H58" stroke="#28CC39" stroke-width="5" stroke-linecap="round" /><path d="M78 166V183H90" stroke="#28CC39" stroke-width="5" stroke-linecap="round" /><path d="M39.2 81.9995C29.7 81.9995 22 89.6995 22 99.1995V150.8C22 160.3 29.7 168 39.2 168H84.8C94.3 168 102 160.3 102 150.8V99.1995C102 89.6995 94.3 81.9995 84.8 81.9995H39.2ZM39.2 85.9995H84.8C92.1 85.9995 98 91.8995 98 99.1995V136.8C98 144.1 92.1 150 84.8 150H39.2C31.9 150 26 144.1 26 136.8V99.1995C26 91.8995 31.9 85.9995 39.2 85.9995ZM60 99.9995V114.5L47.6 107L45.5 110.4L58.1 118L45.5 125.6L47.6 129L60 121.5V136H64V121.5L76.4 129L78.5 125.6L65.9 118L78.5 110.4L76.4 107L64 114.5V99.9995H60ZM26 147.8C29.2 151.6 33.9 154 39.2 154H84.8C90.1 154 94.8 151.6 98 147.8V150.8C98 158.1 92.1 164 84.8 164H39.2C31.9 164 26 158.1 26 150.8V147.8Z" fill="#28CC39" stroke="#28CC39" /><path d="M24 134.999L6.99997 145.603" stroke="#28CC39" stroke-width="5" stroke-linecap="round" /><path d="M119.104 122.489L100 134.614" stroke="#28CC39" stroke-width="5" stroke-linecap="round" /><path d="M83.5 177V172.5H74.5V177H83.5ZM79 183H74.5V187.5H79V183ZM89 187.5C91.4853 187.5 93.5 185.485 93.5 183C93.5 180.514 91.4853 178.5 89 178.5V187.5ZM74.5 177V183H83.5V177H74.5ZM79 187.5H89V178.5H79V187.5Z" fill="black" /><path d="M51.5 177V172.5H42.5V177H51.5ZM47 183H42.5V187.5H47V183ZM57 187.5C59.4853 187.5 61.5 185.485 61.5 183C61.5 180.514 59.4853 178.5 57 178.5V187.5ZM42.5 177V183H51.5V177H42.5ZM47 187.5H57V178.5H47V187.5Z" fill="black" /><ellipse cx="37.1555" cy="79.2062" rx="8" ry="6.5" transform="rotate(-1.84634 37.1555 79.2062)" fill="white" /><ellipse cx="42.0885" cy="77.046" rx="8" ry="6.5" transform="rotate(-1.84634 42.0885 77.046)" fill="white" /><ellipse cx="45.1513" cy="78.9483" rx="8" ry="6.5" transform="rotate(-1.84634 45.1513 78.9483)" fill="white" /><ellipse cx="53.0827" cy="76.692" rx="8" ry="6.5" transform="rotate(-1.84634 53.0827 76.692)" fill="white" /><ellipse cx="58.1445" cy="78.5299" rx="8" ry="6.5" transform="rotate(-1.84634 58.1445 78.5299)" fill="white" /><ellipse cx="66.0759" cy="76.2731" rx="8" ry="6.5" transform="rotate(-1.84634 66.0759 76.2731)" fill="white" /><ellipse cx="69.1389" cy="78.1754" rx="8" ry="6.5" transform="rotate(-1.84634 69.1389 78.1754)" fill="white" /><ellipse cx="79.0692" cy="75.8541" rx="8" ry="6.5" transform="rotate(-1.84634 79.0692 75.8541)" fill="white" /><ellipse cx="82.1321" cy="77.7565" rx="8" ry="6.5" transform="rotate(-1.84634 82.1321 77.7565)" fill="white" /><ellipse cx="52.8585" cy="7.66343" rx="8" ry="6.5" transform="rotate(-1.84634 52.8585 7.66343)" fill="white" /><path d="M103.5 127C74.5109 145.65 54.8196 153.503 20.5 133" stroke="#750000" stroke-width="4" /><path d="M67.2248 147.783C68.0243 148.525 68.5328 149.358 68.7415 150.062C68.9573 150.792 68.8141 151.195 68.6516 151.37C68.4892 151.545 68.0976 151.718 67.3543 151.557C66.6357 151.402 65.7679 150.957 64.9684 150.215C64.1688 149.473 63.6603 148.641 63.4517 147.936C63.2359 147.207 63.379 146.804 63.5415 146.628C63.7039 146.453 64.0955 146.281 64.8389 146.441C65.5574 146.597 66.4252 147.042 67.2248 147.783Z" stroke="#750000" stroke-width="2" /><path d="M61.5372 150.611C60.7935 151.57 59.9314 152.23 59.1818 152.548C58.398 152.88 57.9595 152.766 57.7766 152.625C57.5937 152.483 57.3744 152.086 57.5013 151.244C57.6227 150.439 58.0467 149.44 58.7903 148.481C59.534 147.522 60.3961 146.863 61.1457 146.545C61.9296 146.212 62.3681 146.326 62.551 146.468C62.7339 146.61 62.9532 147.006 62.8262 147.848C62.7048 148.653 62.2809 149.652 61.5372 150.611Z" stroke="#750000" stroke-width="2" /></svg>';var hn='<svg width="152" height="220" viewBox="0 0 127 184" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.82568 174.501L23.3257 131.001C52.8749 137.508 72.6181 143.564 103.826 135.001C111.05 148.279 114.101 161.223 121.326 174.501C115.575 171.676 112.747 171.756 108.326 174.501C102.171 170.814 100.059 172.108 96.3257 174.501C88.1576 168.27 84.0522 170.116 76.8257 174.501C70.342 169.446 66.8634 169.941 60.8257 174.501C51.247 168.701 46.9661 170.784 39.3364 174.496L39.3257 174.501C33.6234 170.857 30.5816 171.207 25.3257 174.501C18.7562 170.383 14.8574 171.426 7.82568 174.501Z" fill="#8B6CEF" stroke="#8B6CEF" stroke-width="4" /><path d="M80.3257 164.501V181.501H68.3257" stroke="#FF820F" stroke-width="5" stroke-linecap="round" /><path d="M48.3257 164.501V181.501H36.3257" stroke="#FF820F" stroke-width="5" stroke-linecap="round" /><path d="M87.1257 80.501C96.6257 80.501 104.326 88.201 104.326 97.701V149.301C104.326 158.801 96.6257 166.501 87.1257 166.501H41.5257C32.0257 166.501 24.3257 158.801 24.3257 149.301V97.701C24.3257 88.201 32.0257 80.501 41.5257 80.501H87.1257ZM87.1257 84.501H41.5257C34.2257 84.501 28.3257 90.401 28.3257 97.701V135.301C28.3257 142.601 34.2257 148.501 41.5257 148.501H87.1257C94.4257 148.501 100.326 142.601 100.326 135.301V97.701C100.326 90.401 94.4257 84.501 87.1257 84.501ZM66.3257 98.501V113.001L78.7257 105.501L80.8257 108.901L68.2257 116.501L80.8257 124.101L78.7257 127.501L66.3257 120.001V134.501H62.3257V120.001L49.9257 127.501L47.8257 124.101L60.4257 116.501L47.8257 108.901L49.9257 105.501L62.3257 113.001V98.501H66.3257ZM100.326 146.301C97.1257 150.101 92.4257 152.501 87.1257 152.501H41.5257C36.2257 152.501 31.5257 150.101 28.3257 146.301V149.301C28.3257 156.601 34.2257 162.501 41.5257 162.501H87.1257C94.4257 162.501 100.326 156.601 100.326 149.301V146.301Z" fill="#FF820F" stroke="#FF820F" /><path d="M102.326 133.501L119.326 144.105" stroke="#FF820F" stroke-width="5" stroke-linecap="round" /><path d="M7.22161 120.99L26.3257 133.116" stroke="#FF820F" stroke-width="5" stroke-linecap="round" /><path d="M9.32568 136.501L3.32568 105.501" stroke="black" stroke-width="4" /><path d="M3.36682 105.807L1.95891 99.5009" stroke="white" stroke-width="4" /><path d="M39.8257 78.501H88.3257L58.8257 7.00098L39.8257 78.501Z" fill="#8B6CEF" stroke="#8B6CEF" stroke-width="4" /><path d="M70.3257 57.119L69.6786 59.1104L69.5664 59.4559H69.2031H67.1092L68.8032 60.6866L69.0971 60.9002L68.9849 61.2457L68.3378 63.237L70.0318 62.0063L70.3257 61.7928L70.6196 62.0063L72.3136 63.237L71.6665 61.2457L71.5543 60.9002L71.8481 60.6866L73.5421 59.4559H71.4483H71.085L70.9727 59.1104L70.3257 57.119Z" fill="#FFF50F" stroke="#FFF50F" /><path d="M58.3537 35.403L55.5616 39.5509L55.3588 39.8523L55.0095 39.7525L50.2018 38.3788L53.2839 42.316L53.5078 42.602L53.3049 42.9034L50.5129 47.0512L55.2098 45.3367L55.551 45.2121L55.7749 45.4982L58.857 49.4353L58.6778 44.4385L58.6647 44.0755L59.006 43.9509L63.7029 42.2364L58.8952 40.8627L58.5459 40.7629L58.5329 40.3999L58.3537 35.403Z" fill="#FFF50F" stroke="#FFF50F" /><path d="M22.8257 125.501C51.8148 144.152 71.5061 151.504 105.826 131.001" stroke="#5845CF" stroke-width="4" /><path d="M58.101 145.285C57.3014 146.027 56.7929 146.859 56.5843 147.564C56.3685 148.293 56.5117 148.696 56.6741 148.871C56.8366 149.046 57.2281 149.219 57.9715 149.059C58.69 148.903 59.5579 148.458 60.3574 147.716C61.1569 146.975 61.6654 146.142 61.8741 145.437C62.0899 144.708 61.9467 144.305 61.7843 144.13C61.6218 143.955 61.2302 143.782 60.4869 143.942C59.7683 144.098 58.9005 144.543 58.101 145.285Z" stroke="#5845CF" stroke-width="2" /><path d="M63.7886 148.113C64.5322 149.072 65.3943 149.731 66.1439 150.049C66.9278 150.381 67.3663 150.268 67.5492 150.126C67.7321 149.984 67.9514 149.588 67.8244 148.746C67.703 147.94 67.2791 146.941 66.5354 145.982C65.7917 145.023 64.9296 144.364 64.18 144.046C63.3962 143.714 62.9577 143.827 62.7748 143.969C62.5919 144.111 62.3726 144.508 62.4995 145.349C62.6209 146.155 63.0449 147.154 63.7886 148.113Z" stroke="#5845CF" stroke-width="2" /><ellipse rx="41.5" ry="4" transform="matrix(-1 0 0 1 62.8257 79.501)" fill="#8B6CEF" /><path d="M48.7999 64.3399L48.7051 67.8856L48.6954 68.2487L48.3471 68.3517L44.9456 69.3573L48.2885 70.5431L48.6309 70.6645L48.6212 71.0276L48.5264 74.5733L50.6872 71.7605L50.9085 71.4724L51.2508 71.5939L54.5937 72.7796L52.5863 69.8554L52.3807 69.5559L52.602 69.2679L54.7627 66.455L51.3613 67.4606L51.0129 67.5636L50.8073 67.2641L48.7999 64.3399Z" fill="#FFF50F" stroke="#FFF50F" /></svg>';var vn=require("obsidian"),Ni={9:hn,11:fn};function Bi(){var e;return r("div",{class:"cmdr-icon-wrapper",dangerouslySetInnerHTML:{__html:(e=Ni[(0,vn.moment)().month()])!=null?e:pn}})}var _e=ln(Bi);function At({manifest:e}){let o=r("button",{className:"mod-cta",onClick:n=>{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<e.length){let i=t<0?e.length+t:t,[a]=e.splice(o,1);e.splice(i,0,a)}}var _n=require("obsidian");var Hi=Je(null);function ae({manager:e,plugin:o,children:t}){return r(P,null,r(Hi.Provider,{value:e},r("div",{className:"cmdr-sep-con"},e.pairs.map((n,i)=>{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",'<g style="fill: currentColor;"><path d="M 12.5 16.667969 L 83.332031 16.667969 C 87.9375 16.667969 91.667969 20.398438 91.667969 25 L 91.667969 33.332031 L 75 33.332031 L 75 25 L 20.832031 25 L 20.832031 75 L 58.332031 75 L 58.332031 83.332031 L 12.5 83.332031 C 7.898438 83.332031 4.167969 79.601562 4.167969 75 L 4.167969 25 C 4.167969 20.398438 7.898438 16.667969 12.5 16.667969 M 70.832031 41.667969 L 95.832031 41.667969 C 98.132812 41.667969 100 43.53125 100 45.832031 L 100 87.5 C 100 89.800781 98.132812 91.667969 95.832031 91.667969 L 70.832031 91.667969 C 68.53125 91.667969 66.667969 89.800781 66.667969 87.5 L 66.667969 45.832031 C 66.667969 43.53125 68.53125 41.667969 70.832031 41.667969 M 75 50 L 75 79.167969 L 91.667969 79.167969 L 91.667969 50 Z M 75 50 "/></g>')}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;a<i.times;a++)await app.commands.executeCommandById(i.commandId);continue}}}async onload(){await this.loadSettings(),delete this.settings.hide.leftRibbon,zt(),this.manager={editorMenu:new Ie(this,this.settings.editorMenu),fileMenu:new Ee(this,this.settings.fileMenu),leftRibbon:new Ne(this),statusBar:new be(this,this.settings.statusBar),pageHeader:new ge(this,this.settings.pageHeader),explorerManager:new ve(this,this.settings.explorer)},this.addSettingTab(new Le(this)),this.addCommand({name:u("Open Commander Settings"),id:"open-commander-settings",callback:()=>new 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 */