"use strict";var e=require("obsidian"),t=require("@codemirror/language"),o=require("@codemirror/state"),i=require("@codemirror/view");const n=["Custom","editingToolbar","editingToolbarSub","editingToolbarAdd","editingToolbarDelete","editingToolbarReload","codeblock-glyph","underline-glyph","superscript-glyph","subscript-glyph","bot-glyph","header-1","header-2","header-3","header-4","header-5","header-6","header-n","obsidian","obsidian-new","accessibility","activity","air-vent","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","angry","annoyed","aperture","apple","archive-restore","archive","armchair","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","axis-3d","baby","backpack","baggage-claim","banana","banknote","bar-chart-2","bar-chart-3","bar-chart-4","bar-chart-horizontal","bar-chart","baseline","bath","battery-charging","battery-full","battery-low","battery-medium","battery","beaker","bed-double","bed-single","bed","beer","bell-minus","bell-off","bell-plus","bell-ring","bell","bike","binary","bitcoin","bluetooth-connected","bluetooth-off","bluetooth-searching","bluetooth","bold","bomb","bone","book-open","book","bookmark-minus","bookmark-plus","bookmark","bot","box-select","box","boxes","briefcase","brush","bug","building-2","building","bus","cake","calculator","calendar-check-2","calendar-check","calendar-clock","calendar-days","calendar-heart","calendar-minus","calendar-off","calendar-plus","calendar-range","calendar-search","calendar-x2","calendar-x","calendar","camera-off","camera","car","carrot","cast","check-circle-2","check-circle","check-square","check","chef-hat","cherry","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","chevrons-down-up","chevrons-down","chevrons-left-right","chevrons-left","chevrons-right-left","chevrons-right","chevrons-up-down","chevrons-up","chrome","cigarette-off","cigarette","circle-dot","circle-ellipsis","circle-slashed","circle","citrus","clapperboard","clipboard-check","clipboard-copy","clipboard-edit","clipboard-list","clipboard-signature","clipboard-type","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","clock","cloud-cog","cloud-drizzle","cloud-fog","cloud-hail","cloud-lightning","cloud-moon-rain","cloud-moon","cloud-off","cloud-rain-wind","cloud-rain","cloud-snow","cloud-sun-rain","cloud-sun","cloud","cloudy","clover","code-2","code","codepen","codesandbox","coffee","cog","coins","columns","command","compass","component","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","croissant","crop","cross","crosshair","crown","cup-soda","curly-braces","currency","database","delete","diamond","dice-1","dice-2","dice-3","dice-4","dice-5","dice-6","dices","diff","disc","divide-circle","divide-square","divide","dollar-sign","download-cloud","download","dribbble","droplet","droplets","drumstick","edit-2","edit-3","edit","egg-fried","egg","equal-not","equal","eraser","euro","expand","external-link","eye-off","eye","facebook","factory","fast-forward","feather","figma","file-archive","file-audio-2","file-audio","file-axis-3d","file-badge-2","file-badge","file-bar-chart-2","file-bar-chart","file-box","file-check-2","file-check","file-clock","file-code","file-cog-2","file-cog","file-diff","file-digit","file-down","file-edit","file-heart","file-image","file-input","file-json-2","file-json","file-key-2","file-key","file-line-chart","file-lock-2","file-lock","file-minus-2","file-minus","file-output","file-pie-chart","file-plus-2","file-plus","file-question","file-scan","file-search-2","file-search","file-signature","file-spreadsheet","file-symlink","file-terminal","file-text","file-type-2","file-type","file-up","file-video-2","file-video","file-volume-2","file-volume","file-warning","file-x2","file-x","file","files","film","filter","fingerprint","flag-off","flag-triangle-left","flag-triangle-right","flag","flame","flashlight-off","flashlight","flask-conical","flask-round","flip-horizontal-2","flip-horizontal","flip-vertical-2","flip-vertical","flower-2","flower","focus","folder-archive","folder-check","folder-clock","folder-closed","folder-cog-2","folder-cog","folder-down","folder-edit","folder-heart","folder-input","folder-key","folder-lock","folder-minus","folder-open","folder-output","folder-plus","folder-search-2","folder-search","folder-symlink","folder-tree","folder-up","folder-x","folder","folders","form-input","forward","frame","framer","frown","fuel","function-square","gamepad-2","gamepad","gauge","gavel","gem","ghost","gift","git-branch-plus","git-branch","git-commit","git-compare","git-fork","git-merge","git-pull-request-closed","git-pull-request-draft","git-pull-request","github","gitlab","glass-water","glasses","globe-2","globe","grab","graduation-cap","grape","grid","grip-horizontal","grip-vertical","hammer","hand-metal","hand","hard-drive","hard-hat","hash","haze","headphones","heart-crack","heart-handshake","heart-off","heart-pulse","heart","help-circle","hexagon","highlighter","history","home","hourglass","ice-cream","image-minus","image-off","image-plus","image","import","inbox","indent","indian-rupee","infinity","info","inspect","instagram","italic","japanese-yen","joystick","key","keyboard","lamp-ceiling","lamp-desk","lamp-floor","lamp-wall-down","lamp-wall-up","lamp","landmark","languages","laptop-2","laptop","lasso-select","lasso","laugh","layers","layout-dashboard","layout-grid","layout-list","layout-template","layout","leaf","library","life-buoy","lightbulb-off","lightbulb","line-chart","link-2off","link-2","link","linkedin","list-checks","list-end","list-minus","list-music","list-ordered","list-plus","list-start","list-video","list-x","list","loader-2","loader","locate-fixed","locate-off","locate","lock","log-in","log-out","luggage","magnet","mail-check","mail-minus","mail-open","mail-plus","mail-question","mail-search","mail-warning","mail-x","mail","mails","map-pin-off","map-pin","map","martini","maximize-2","maximize","medal","megaphone-off","megaphone","meh","menu","message-circle","message-square","mic-2","mic-off","mic","microscope","milestone","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-3d","move-diagonal-2","move-diagonal","move-horizontal","move-vertical","move","music-2","music-3","music-4","music","navigation-2off","navigation-2","navigation-off","navigation","network","newspaper","octagon","option","outdent","package-2","package-check","package-minus","package-open","package-plus","package-search","package-x","package","paint-bucket","paintbrush-2","paintbrush","palette","palmtree","paperclip","party-popper","pause-circle","pause-octagon","pause","pen-tool","pencil","percent","person-standing","phone-call","phone-forwarded","phone-incoming","phone-missed","phone-off","phone-outgoing","phone","pie-chart","piggy-bank","pin-off","pin","pipette","pizza","plane","play-circle","play","plug-zap","plus-circle","plus-square","plus","pocket","podcast","pointer","pound-sterling","power-off","power","printer","puzzle","qr-code","quote","radio-receiver","radio","recycle","redo-2","redo","refresh-ccw","refresh-cw","regex","repeat-1","repeat","reply-all","reply","rewind","rocket","rocking-chair","rotate-3d","rotate-ccw","rotate-cw","rss","ruler","russian-ruble","save","scale-3d","scale","scaling","scan-face","scan-line","scan","scissors","screen-share-off","screen-share","scroll","search","send","separator-horizontal","separator-vertical","server-cog","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","shrub","shuffle","sidebar-close","sidebar-open","sidebar","sigma","signal-high","signal-low","signal-medium","signal-zero","signal","siren","skip-back","skip-forward","skull","slack","slash","slice","sliders-horizontal","sliders","smartphone-charging","smartphone","smile-plus","smile","snowflake","sofa","sort-asc","sort-desc","speaker","sprout","square","star-half","star-off","star","stethoscope","sticker","sticky-note","stop-circle","stretch-horizontal","stretch-vertical","strikethrough","subscript","sun-dim","sun-medium","sun-moon","sun-snow","sun","sunrise","sunset","superscript","swiss-franc","switch-camera","sword","swords","syringe","table-2","table","tablet","tag","tags","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","toy-brick","train","trash-2","trash","tree-deciduous","tree-pine","trees","trello","trending-down","trending-up","triangle","trophy","truck","tv-2","tv","twitch","twitter","type","umbrella","underline","undo-2","undo","unlink-2","unlink","unlock","upload-cloud","upload","usb","user-check","user-cog","user-minus","user-plus","user-x","user","users","utensils-crossed","utensils","venetian-mask","verified","vibrate-off","vibrate","video-off","video","view","voicemail","volume-1","volume-2","volume-x","volume","wallet","wand-2","wand","watch","waves","webcam","webhook","wifi-off","wifi","wind","wine","wrap-text","wrench","x-circle","x-octagon","x-square","x","youtube","zap-off","zap","zoom-in","zoom-out","create-new","trash","search","right-triangle","document","folder","pencil","left-arrow","right-arrow","three-horizontal-bars","dot-network","audio-file","image-file","pdf-file","gear","documents","blocks","go-to-file","presentation","cross-in-box","microphone","microphone-filled","two-columns","link","popup-open","checkmark","hashtag","left-arrow-with-tail","right-arrow-with-tail","up-arrow-with-tail","down-arrow-with-tail","lines-of-text","vertical-three-dots","pin","magnifying-glass","info","horizontal-split","vertical-split","calendar-with-checkmark","folder-minus","sheets-in-box","up-and-down-arrows","broken-link","cross","any-key","reset","star","crossed-star","dice","filled-pin","enter","help","vault","open-vault","paper-plane","bullet-list","uppercase-lowercase-a","star-list","expand-vertically","languages","switch","pane-layout","install","sync","check-in-circle","sync-small","check-small","paused","forward-arrow","stacked-levels","bracket-glyph","note-glyph","tag-glyph","price-tag-glyph","heading-glyph","bold-glyph","italic-glyph","strikethrough-glyph","highlight-glyph","code-glyph","quote-glyph","link-glyph","bullet-list-glyph","number-list-glyph","checkbox-glyph","undo-glyph","redo-glyph","up-chevron-glyph","down-chevron-glyph","left-chevron-glyph","right-chevron-glyph","percent-sign-glyph","keyboard-glyph","double-up-arrow-glyph","double-down-arrow-glyph","image-glyph","wrench-screwdriver-glyph","clock","plus-with-circle","minus-with-circle","indent-glyph","unindent-glyph","fullscreen","exit-fullscreen","cloud","run-command","compress-glyph","enlarge-glyph","scissors-glyph","up-curly-arrow-glyph","down-curly-arrow-glyph","plus-minus-glyph","links-going-out","links-coming-in","add-note-glyph","duplicate-glyph","clock-glyph","calendar-glyph","command-glyph","dice-glyph","file-explorer-glyph","graph-glyph","import-glyph","navigate-glyph","open-elsewhere-glyph","presentation-glyph","paper-plane-glyph","question-mark-glyph","restore-file-glyph","search-glyph","star-glyph","play-audio-glyph","stop-audio-glyph","tomorrow-glyph","wand-glyph","workspace-glyph","yesterday-glyph","box-glyph","merge-files-glyph","merge-files","two-blank-pages","scissors","paste","paste-text","split","select-all-text","wand","github-glyph","reading-glasses","user-manual-filled","discord-filled","chat-bubbles-filled","experiment-filled","bracket-glyph","box-glyph","check-small","dice-glyph","dice","discord","right-triangle","heading-glyph","help","keyboard-toggle","broken-link","experiment","left-arrow","link","link-glyph","links-coming-in","links-going-out","open-vault","paused","question-mark-glyph","right-arrow","sidebar-left","sidebar-right","sheets-in-box","star-list","sync-small","tabs","uppercase-lowercase-a","vault","stack-horizontal","stack-vertical","stretch-horizontal","stretch-vertical","distribute-space-horizontal","distribute-space-vertical"];function a(e){let t=Date.now().toString(36);return t+=Math.random().toString(36).substr(3,e),t}function s(e,t,o,i){let n,a={index:-1,subindex:-1},s=i;return o?s.forEach((e,o)=>{if("SubmenuCommands"in e&&(n=e.SubmenuCommands.findIndex(e=>e.id==t.id),n>=0))return a={index:o,subindex:n},a}):(n=s.findIndex(e=>e.id==t.id),a={index:n,subindex:-1}),a}function r(e,t){let o,i=t.getLine(t.getCursor().line),n="";const a=/^(\>*(\[[!\w]+\])?\s*)#+\s/;let s;const r=i.match(a);r&&(s=r[0].trim()),e==s||""==e?o=i.replace(a,"$1"):(o=i.replace(/^\s*(#*|\>|\-|\d+\.)\s*/m,""),o=e+" "+o),n=""!=o?t.getRange(t.getCursor(),{line:t.getCursor().line,ch:i.length}):t.getRange(t.getCursor(),{line:t.getCursor().line,ch:0}),t.setLine(t.getCursor().line,o),t.setCursor({line:t.getCursor().line,ch:Number(o.length-n.length)})}function l(e,t){if(!t)return;const o=t.getSelection();if(!o||""===o.trim())return void this.plugin.setLastExecutedCommand("editing-toolbar:change-font-color");const i=/]+["']?>(.*?)<\/font>/gms,n=i.test(o);if(a=o,new RegExp(`^(.+)<\\/font>$`,"ms").test(a.trim()))return;var a;const s=o.replace(i,(t,o)=>o.split("\n").map(t=>t.trim()?`${t}`:t).join("\n")),r=s===o?o.split("\n").map(t=>t.trim()?`${t}`:t).join("\n"):s,l=t.listSelections().map(t=>{const o=n?0:``.length;return t.anchor.line([\s\S]*?)<\/mark>/g.test(o);if(((e,t)=>{const o=t.replace(/([()[{*+.$^\\|?])/g,"\\$1");return new RegExp(`^([sS]+)<\\/mark>$`).test(e.trim())})(o,e))return;let n;n=i?o.replace(/(background:)(?:#[0-9a-fA-F]{3,6}|rgba?\([^)]+\))/gi,`$1${e}`):o.split("\n").map(t=>t.trim()?`${t}`:t).join("\n");const a=t.listSelections().map(t=>{const o=i?0:``.length;return t.anchor.line{"OrderedList"===e.name&&(d=e.to)}}),d>=0){const e=n.offsetToPos(d).line+1;e=0?n.getLine(g).trim():"";if(f&&!/^\s*$/.test(f)&&!f.includes("ㅤ")&&(h.push(""),h.push("ㅤ")),m)h.push(...o);else{let e={},t=-1;for(const i of o){const o=i.trim(),n=/^\d+\.\s/.test(o),a=i.match(/^\s*/)?.[0]||"";if(n){const i=a.length;e[i]=i!==t?1:(e[i]||1)+1,h.push(`${a}${e[i]}. ${o.replace(/^\d+\.\s/,"")}`),t=i}else h.push(i),t=-1}}n.replaceRange(h.join("\n"),{line:i,ch:0},{line:i+o.length-1,ch:n.getLine(i+o.length-1).length})}function m(e,t,o){const i=[];for(let n=t;n<=o;n++)i.push(e.getLine(n));d(i,t,e)}let u;const p=t=>{u=e.requireApiVersion("0.15.0")?activeWindow.document:window.document;["top","following","fixed"].forEach(e=>{u.querySelectorAll(`.editingToolbarModalBar[data-toolbar-style="${e}"]`).forEach(e=>{t?(e.style.display="",e.style.visibility="visible"):e.style.display="none"})});const o=u.getElementById("editingToolbarModalBar");o&&(t?(o.style.display="",o.style.visibility="visible"):o.style.display="none")},h=t=>{u=e.requireApiVersion("0.15.0")?activeWindow.document:window.document,u.documentElement.style.setProperty("--toolbar-vertical-offset",`${t.verticalPosition}px`)},g=t=>{u=e.requireApiVersion("0.15.0")?activeWindow.document:window.document,u.documentElement.style.setProperty("--toolbar-horizontal-offset",`${t.horizontalPosition}px`)};var f={"Editing Toolbar Append Method":"Editing Toolbar Append Method","Choose where Editing Toolbar will append upon regeneration. To see the change, hit the refresh button below, or in the status bar menu.":"Choose where Editing Toolbar will append upon regeneration. To see the change, hit the refresh button below, or in the status bar menu.","Editing Toolbar aesthetic":"Editing Toolbar aesthetic","Choose between a glass morphism, tiny and default style for Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.":"Choose between a glass morphism, tiny and default style for Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.","Editing Toolbar position":"Editing Toolbar position","Choose between fixed position or cursor following mode.":"Choose between fixed position, cursor following or Top mode.","Editing Toolbar Columns":"Editing Toolbar Columns","Choose the number of columns per row to display on Editing Toolbar.":"Choose the number of columns per row to display on Editing Toolbar.","Editing Toolbar refresh":"Editing Toolbar refresh","Editing Toolbar Commands":"Editing Toolbar Commands","Add a command onto Editing Toolbar from Obsidian's commands library. To reorder the commands, drag and drop the command items. To delete them, use the delete buttom to the right of the command item. Editing Toolbar will not automaticaly refresh after reordering commands. Use the refresh button above.":"Add a command onto Editing Toolbar from Obsidian's commands library. To reorder the commands, drag and drop the command items. To delete them, use the delete buttom to the right of the command item. Editing Toolbar will not automaticaly refresh after reordering commands. Use the refresh button above.","Format Brush Off!":"Format Brush Off!","Hide & Show":"Hide & Show","Editing Toolbar will only refresh automatically after you have either added or deleted a command from it. To see UI changes to editingToolbar (above settings changes) use the refresh button. If you forget to refresh in settings, no worries. There is also a refresh button in the editingToolbar status bar menu.":"Editing Toolbar will only refresh automatically after you have either added or deleted a command from it. To see UI changes to editingToolbar (above settings changes) use the refresh button. If you forget to refresh in settings, no worries. There is also a refresh button in the editingToolbar status bar menu.","Font-Color formatting brush ON!":"Font-Color formatting brush ON!",More:"More","Copy commands from selected style.":"Copy commands from selected style.","Font Colors":"Font Colors","Format Brush":"Format Brush","Background Color":"Background color",Refresh:"Refresh",Add:"Add",Delete:"Delete","Change Command Name":"Change Command Name","Change Submenu Name":"Change Submenu Name","Button Submenu":"Button Submenu","Dropdown Menu":"Dropdown Menu","Menu type changed to":"Menu type changed to","Add Submenu":"Add Submenu","Add Separator":"Add Separator","Enter the icon code, it looks like .... format":"Enter the icon code, it looks like .... format","Please enter a new name: ":"Please enter a new name: ","Drag the slider to move the position":"Drag the slider to move the position","Plugin Settings":"Plugin Settings","Background-color formatting brush ON!":"Background-color formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush","Clear formatting brush ON!":"Clear formatting brush ON!","Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush":"Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush","The toolbar is displayed when the mouse moves over it, otherwise it is automatically hidden":"The toolbar is displayed when the mouse moves over it, otherwise it is automatically hidden","Editing Toolbar Auto-hide":"Editing Toolbar Auto-hide","Editing Toolbar Centred Display":"Editing Toolbar Centred Display","Whether the toolbar is centred or full-width, the default is full-width.":"Whether the toolbar is centred or full-width, the default is full-width.","Custom Backgroud Color":"Custom Backgroud Color","Custom Font Color":"Custom Font Color","🎨 Set Custom Background":"🎨 Set Custom Background","🖌️ Set Custom Font Color":"🖌️ Set Custom Font Color","Click on the picker to adjust the color":"Click on the picker to adjust the color","Mobile Enabled or Not":"Mobile Enabled or Not","Whether to enable the plugin for the mobile client, the default is enabled.":"Whether to enable the plugin for the mobile client, the default is enabled.","Whether to enable on mobile devices with device width less than 768px.":"Whether to enable on mobile devices with device width less than 768px, the default is disable.",Reset:"Reset",Fix:"Fix","Fix Editing Toolbar":"Fix Editing Toolbar",General:"General",Appearance:"Appearance",Commands:"Commands","Choose between fixed position or cursor following mode":"Choose between fixed position, cursor following or Top mode.","Add and manage commands":"Add and manage commands","Choose where Editing Toolbar will append upon regeneration.":"Choose where Editing Toolbar will append upon regeneration.","Whether to enable on mobile devices with device width less than 768px":"Whether to enable on mobile devices with device width less than 768px","Choose between a glass morphism, tiny and default style.":"Choose between a glass morphism, tiny and default style.","Refresh Toolbar":"Refresh Toolbar","Add Command":"Add Command",Settings:"Settings","Position Style":"Position Style",Columns:"Columns","Drag to Adjust Position":"Drag to Adjust Position","Vertical Position":"Vertical Position","Horizontal Position":"Horizontal Position","Toolbar Position":"Toolbar Position","Choose an icon":"Choose an icon","Search for an icon...":"Search for an icon...",All:"All",Obsidian:"Obsidian",Glyph:"Glyph",Custom:"Custom","Choose a command":"Choose a command","The command":"The command","already exists":"already exists","Enter the icon code, format as .... ":"Enter the icon code, format as .... ","No matching icons found":"No matching icons found","Custom Commands":"Custom Commands","Toolbar Commands":"Toolbar Commands",ID:"ID",Prefix:"Prefix",Suffix:"Suffix",Pattern:"Pattern","Custom Format Commands":"Custom Format Commands","Add, edit or delete custom format commands.":"Add, edit or delete custom format commands.",Edit:"Edit","Command ID":"Command ID",'Unique identifier, no spaces, e.g.: "my-custom-format"':'Unique identifier, no spaces, e.g.: "my-custom-format"',"Displayed name in toolbar and menu":"Displayed name in toolbar and menu","Add content before selected text":"Add content before selected text","Add content after selected text":"Add content after selected text","Character offset of cursor after formatting":"Character offset of cursor after formatting","Line offset of cursor after formatting":"Line offset of cursor after formatting","Whether to insert at the beginning of the next line":"Whether to insert at the beginning of the next line","Command icon (click to select)":"Command icon (click to select)","Choose Icon":"Choose Icon",Save:"Save",Cancel:"Cancel","Edit Custom Command":"Edit Custom Command","Add Custom Command":"Add Custom Command","Command ID and command name cannot be empty":"Command ID and command name cannot be empty","Command ID cannot contain spaces":"Command ID cannot contain spaces",'Command ID "${this.commandId}" already exists':'Command ID "${this.commandId}" already exists',"Cursor Position Offset":"Cursor Position Offset","Line Offset":"Line Offset","Line Head Format":"Line Head Format",Icon:"Icon","Command Name":"Command Name","Are you sure you want to restore all settings to default? This will lose all your custom configurations.":"Are you sure you want to restore all settings to default? This will lose all your custom configurations.","Restore default":"Restore default","Restore default settings":"Restore default settings","🔄Restore default settings":"🔄Restore default settings","🔧Data repair":"🔧Data repair","Command IDs have been successfully repaired!":"Command IDs have been successfully repaired!","No command IDs need to be repaired":"No command IDs need to be repaired","Error repairing command IDs, please check the console for details":"Error repairing command IDs, please check the console for details","Error restoring default settings, please check the console for details":"Error restoring default settings, please check the console for details","Successfully restored default settings!":"Successfully restored default settings!",Close:"Close",Tips:"Tips","This update changed the ID of some commands, please click this button to repair the commands to ensure the toolbar works properly":"This update changed the ID of some commands, please click this button to repair the commands to ensure the toolbar works properly","Repair command ID":"Repair command ID","This will reset all your custom configurations":"This will reset all your custom configurations","Notice:":"Notice:","This update rebuilds the entire code, reducing resource consumption":"This update rebuilds the entire code, reducing resource consumption","Optimized mobile usage, added canvas support, and added custom commands":"Optimized mobile usage, added canvas support, and added custom commands","⚠️This update is not compatible with 2.x version command ids, please click [Repair command] to be compatible":"⚠️This update is not compatible with 2.x version command ids, please click [Repair command] to be compatible","⚠️If you want to restore the default settings, please click [Restore default settings]":"⚠️If you want to restore the default settings, please click [Restore default settings]","Please execute a editingToolbar format command first, then enable the format brush":"Please execute a editingToolbar format command first, then enable the format brush","Format brush ON! Select text to apply【":"Format brush ON! Select text to apply【","】format":"】format\nClick the mouse right key to close the formatting-brush","Add to Toolbar":"Add to Toolbar","This command is already in the toolbar.":"This command is already in the toolbar.","Command added to toolbar":"Command added to toolbar","Add this command to the toolbar.":"Add this command to the toolbar.","Callout Type":"Callout Type",Title:"Title","Optional, leave blank for default title":"Optional, leave blank for default title","Input title":"Input title","Collapse State":"Collapse State",Open:"Open",Closed:"Closed",Default:"Default",Content:"Content",Insert:"Insert","Input content":"Input content","Link Text":"Link Text","Link Alias":"Link Alias","Link URL":"Link URL","Embed Content":"Embed Content","Image Size":"Image Size","Insert New Line":"Insert New Line","Paste and Parse":"Paste and Parse","URL Format Error":"URL Format Error","Image Width":"Image Width","Image Height":"Image Height","If it is an image, turn on":"If it is an image, turn on","Insert a link on the next line":"Insert a link on the next line","Link Title(optional)":"Link Title(optional)",Alias:"Alias",Optional:"Optional","Default 0, format will keep the text selected":"Default 0, format will keep the text selected","to insert":"to insert","Latest Changes":"Latest Changes","📋View full changelog":"📋View full changelog","Open changelog":"Open changelog","Loading changelog...":"Loading changelog...","Open the complete changelog in your browser":"Open the complete changelog in your browser","Enable Multiple Configurations":"Enable Multiple Configurations","Enable different command configurations for each position style (following, top, fixed).":"Enable different command configurations for each position style (following, top, fixed).","Currently editing commands for":"Currently editing commands for","position style":"position style","Current Configuration":"Current Configuration","Switch between different command configurations.":"Switch between different command configurations.","Following Style":"Following Style","Top Style":"Top Style","Fixed Style":"Fixed Style","Mobile Style":"Mobile Style",configuration:"configuration","Deploy command to configurations":"Deploy command to configurations","All Configurations":"All Configurations",Deploy:"Deploy","Command deployed to selected configurations":"Command deployed to selected configurations","No configuration selected for deployment":"No configuration selected for deployment","Command already exists in selected configurations":"Command already exists in selected configurations","Command deployed to: ":"Command deployed to: ","Command Deleted":"Command Deleted","Confirm Delete?":"Confirm Delete?",Confirm:"Confirm","Are you sure you want to restore all settings to default? But custom commands will be preserved.":"Are you sure you want to restore all settings to default? But custom commands will be preserved.","Successfully restored default settings! (Custom commands preserved)":"Successfully restored default settings! (Custom commands preserved)","This will reset all your custom configurations, but custom commands will be preserved":"This will reset all your custom configurations, but custom commands will be preserved","Import/Export":"Import/Export","Export Configuration":"Export Configuration","Export your toolbar configuration to share with others.":"Export your toolbar configuration to share with others.",Export:"Export","Import Configuration":"Import Configuration","Import toolbar configuration from JSON.":"Import toolbar configuration from JSON.",Import:"Import","Usage Instructions":"Usage Instructions","Export: Generate a JSON configuration that you can save or share.":"Export: Generate a JSON configuration that you can save or share.","Import: Paste a previously exported JSON configuration.":"Import: Paste a previously exported JSON configuration.","You can choose to export all settings, only toolbar commands, or only custom commands":"You can choose to export all settings, only toolbar commands, or only custom commands","When importing, the plugin will only update the settings included in the import data":"When importing, the plugin will only update the settings included in the import data","Warning: Importing configuration will overwrite your current settings. Consider exporting your current configuration first as a backup.":"Warning: Importing configuration will overwrite your current settings. Consider exporting your current configuration first as a backup.","Export Type":"Export Type","Choose what to export":"Choose what to export","All Settings":"All Settings","Toolbar Commands Only":"Toolbar Commands Only","Custom Commands Only":"Custom Commands Only","Export Content":"Export Content","Copy this content to share with others":"Copy this content to share with others","Loading...":"Loading...","Copy to Clipboard":"Copy","Configuration copied to clipboard":"Configuration copied to clipboard","Failed to copy configuration":"Failed to copy configuration","Paste the configuration JSON here":"Paste the configuration JSON here","Paste configuration here...":"Paste configuration here...","Invalid import data":"Invalid import data","Configuration imported successfully":"Configuration imported successfully","No valid configuration found in import data":"No valid configuration found in import data","Failed to import configuration. Invalid format.":"Failed to import configuration. Invalid format.","Import Mode":"Import Mode","Choose how to import the configuration":"Choose how to import the configuration","Update Mode (Add new items and update existing ones)":"Update Mode (Add new items and update existing ones)","Overwrite Mode (Replace all settings with imported ones)":"Overwrite Mode (Replace all settings with imported ones)","Configuration imported successfully (Overwrite mode)":"Configuration imported successfully (Overwrite mode)","Configuration imported successfully (Update mode)":"Configuration imported successfully (Update mode)","Warning: Overwrite mode will completely replace your current settings with the imported ones. Consider exporting your current configuration first as a backup.":"Warning: Overwrite mode will completely replace your current settings with the imported ones. Consider exporting your current configuration first as a backup.","Warning: Update mode will add new items and update existing ones based on the imported configuration.":"Warning: Update mode will add new items and update existing ones based on the imported configuration.","Add Format Command":"Add Format Command",Regex:"Regex","Prefix/Suffix":"Prefix/Suffix","Insert Special Char":"Insert Special Char","Add Regex Command":"Add Regex Command","Switch Regex Command Window":"Switch Regex Command Window","Please select text first":"Please select text first","Place the cursor in a paragraph or select text first.":"Place the cursor in a paragraph or select text first.","Current line is empty, please select text or move to a non-empty line":"Current line is empty, please select text or move to a non-empty line","Use current line for regex commands":"Use current line for regex commands","When no text is selected, regex commands will use the current line instead of clipboard content":"When no text is selected, regex commands will use the current line instead of clipboard content","The selected text does not meet the condition requirements":"The selected text does not meet the condition requirements","Regex command execution error: ":"Regex command execution error: ","Copy code":"Copy code","Copied!":"Copied!","Explain the syntax of JavaScript regular expressions":"Explain the syntax of JavaScript regular expressions","Apply regular expression replacement":"Apply regular expression replacement","Conditional matching":"Conditional matching","Complete regular expression code (copy to AI for explanation)":"Complete regular expression code (copy to AI for explanation)","Error: ":"Error: ","Regex pattern cannot be empty":"Regex pattern cannot be empty","Command already exists":"Command already exists","Choose icon":"Choose icon","URL to Markdown link":"URL to Markdown link","Convert MM/DD/YYYY to YYYY-MM-DD":"Convert MM/DD/YYYY to YYYY-MM-DD","Add bold to keywords":"Add bold to keywords","Format phone number":"Format phone number","Remove extra spaces":"Remove extra spaces","Convert HTML bold tags to Markdown format":"Convert HTML bold tags to Markdown format","Convert quoted text to quote block":"Convert quoted text to quote block","Convert CSV to Markdown table row":"Convert CSV to Markdown table row","Add uniform alias to Markdown links":"Add uniform alias to Markdown links","Delete empty lines (multiline mode)":"Delete empty lines (multiline mode)","Add list symbol to each line (multiline mode)":"Add list symbol to each line (multiline mode)","If the text contains important, set the text highlight (conditional format)":"If the text contains important, set the text highlight (conditional format)","Matching pattern":"Matching pattern","Regex pattern to match":"Regex pattern to match","Replacement pattern (use $1, $2, etc. to reference capture groups)":"Replacement pattern (use $1, $2, etc. to reference capture groups)","Ignore case":"Ignore case","Global replace":"Global replace","Multiline mode":"Multiline mode","Use condition":"Use condition","Condition pattern":"Condition pattern","Only apply custom command when text matches the condition":"Only apply custom command when text matches the condition","Must exist regular expression or text":"Must exist regular expression or text","Replacement pattern":"Replacement pattern","Match case-insensitive":"Match case-insensitive","^ and $ match the start and end of each line":"^ and $ match the start and end of each line","Replace all matches":"Replace all matches",Command:"Command","Input example text to view the formatting effect of the command...":"Input example text to view the formatting effect of the command...",Description:"Description","[Example]":"[Example]","[Requirements]":"[Requirements]","[Output]":"[Output]","AI question template:":"AI question template:","I need to convert the url to a markdown format link":"I need to convert the url to a markdown format link","For example, convert https://example.com to [https://example.com](https://example.com)":"For example, convert https://example.com to [https://example.com](https://example.com)","Use js regular expression to implement, and output the parameters in the following format (the result does not need to be escaped with json)":"Use js regular expression to implement, and output the parameters in the following format (the result does not need to be escaped with json)","[Description]":"[Description]","How to use AI to get regular expressions?":"How to use AI to get regular expressions?","Regular expression examples":"Regular expression examples","Edit regular expression command":"Edit regular expression command","Add regular expression command":"Add regular expression command","Result: ":"Result: ","Example text:":"Example text:",Preview:"Preview",Result:"Result","Please select text or copy text to clipboard first":"Please select text or copy text to clipboard first","Overwrite Import":"Overwrite Import","Update Import":"Update Import","Importing configuration...":"Importing configuration...","Following Style Only":"Following Style Only","Top Style Only":"Top Style Only","Fixed Style Only":"Fixed Style Only","Mobile Style Only":"Mobile Style Only","Unknown import type":"Unknown import type","All Toolbar Commands":"All Toolbar Commands","Initialize Commands":"Initialize Commands","Copy commands from the main menu configuration":"Copy commands from the main menu configuration","Initialize commands to default settings":"Initialize commands to default settings","Reset Commands":"Reset Commands","Commands reset successfully":"Commands reset successfully","Following style commands initialized from current menu commands":"Following style commands initialized from current menu commands","Commands initialized successfully":"Commands initialized successfully","Reset to Menu Commands":"Reset to Menu Commands","Are you sure you want to reset the current configuration?":"Are you sure you want to reset the current configuration?","Following style commands successfully initialized":"Following style commands successfully initialized","Top style commands successfully initialized":"Top style commands successfully initialized","Fixed style commands successfully initialized":"Fixed style commands successfully initialized","Mobile style commands successfully initialized":"Mobile style commands successfully initialized","Reset commands to default settings":"Reset commands to default settings",Clear:"Clear","Remove all commands from this configuration.":"Remove all commands from this configuration.","Are you sure you want to clear all commands under the current style?":"Are you sure you want to clear all commands under the current style?","Current style commands have been cleared":"Current style commands have been cleared","Manage Commands":"Manage Commands","Reset or clear all commands in this configuration":"Reset or clear all commands in this configuration","One-click Clear":"One-click Clear","Import Commands from Other Styles":"Import Commands from Other Styles","Copy commands from another style configuration.":"Copy commands from another style configuration.","Main menu only":"Main menu only","This import will update:":"This import will update:","Custom commands":"Custom commands","Toolbar commands":"Toolbar commands","General settings":"General settings","Please paste configuration data first":"Please paste configuration data first","Invalid import data format":"Invalid import data format","Import From":"Import From","This import will:":"This import will:","Update general settings":"Update general settings","Update Main Menu Commands":"Update Main Menu Commands","Update Custom Commands":"Update Custom Commands","Update Following Style Commands":"Update Following Style Commands","Update Top Style Commands":"Update Top Style Commands","Update Fixed Style Commands":"Update Fixed Style Commands","Update Mobile Style Commands":"Update Mobile Style Commands","Clear all Main Menu Commands":"Clear all Main Menu Commands","Clear all Custom Commands":"Clear all Custom Commands","Clear all Following Style Commands":"Clear all Following Style Commands","Clear all Top Style Commands":"Clear all Top Style Commands","Clear all Fixed Style Commands":"Clear all Fixed Style Commands","Clear all Mobile Style Commands":"Clear all Mobile Style Commands","Overwrite Mode (Replace settings with imported ones)":"Overwrite Mode (Replace settings with imported ones)","Warning: Overwrite mode will replace existing settings with imported ones.":"Warning: Overwrite mode will replace existing settings with imported ones.","Warning: Update mode will add new items and update existing ones.":"Warning: Update mode will add new items and update existing ones.","Enable Multiple Config":"Enable Multiple Config","Set Multiple Config to:":"Set Multiple Config to:",Enable:"Enable",Disable:"Disable","Set Position Style to:":"Set Position Style to:",Following:"Following",Top:"Top",Fixed:"Fixed",Mobile:"Mobile","All commands":"All commands","⚠️ Overwrite mode will replace existing settings with imported ones.":"⚠️ Overwrite mode will replace existing settings with imported ones.","ℹ️ Update mode will merge imported settings with existing ones.":"ℹ️ Update mode will merge imported settings with existing ones.","Do you want to continue?":"Do you want to continue?","Imported settings:":"Imported settings:","Imported commands:":"Imported commands:","Disable toolbar for this view":"Disable toolbar for this view","Enable toolbar for this view":"Enable toolbar for this view","Manage all view types":"Manage all view types","Current View: ":"Current View: ","Appearance Style":"Appearance Style","Position Settings":"Position Settings","All commands have been removed.":"All commands have been removed.","Join the Community":"Join the Community","Share your toolbar settings and styles in our":"Share your toolbar settings and styles in our","Get inspired by what others have created or showcase your own customizations.":"Get inspired by what others have created or showcase your own customizations.","Toolbar Preview (With a hypothetical command configuration.)":"Toolbar Preview (With a hypothetical command configuration.)","Toolbar Theme":"Toolbar Theme","Select a preset toolbar theme, automatically setting the background color, icon color, and size for the selected style.":"Select a preset toolbar theme, automatically setting the background color, icon color, and size for the selected style.","Toolbar Background Color":"Toolbar Background Color","Set the background color of the toolbar.":"Set the background color of the toolbar.","Toolbar Icon Color":"Toolbar Icon Color","Set the color of the toolbar icon.":"Set the color of the toolbar icon.","Toolbar Icon Size":"Toolbar Icon Size","Set the size of the toolbar icon (px); default: 18px":"Set the size of the toolbar icon (px); default: 18px","Custom Theme":"Custom Theme","Fixed Position Offset":"Fixed Position Offset","Choose the offset of the Editing Toolbar in the fixed position.":"Choose the offset of the Editing Toolbar in the fixed position.","Renumber List":"Renumber List","Fetch Remote Title":"Fetch Remote Title","Please enter a URL first":"Please enter a URL first","Failed to fetch title for":"Failed to fetch title for","Link Title (optional)":"Link Title (optional)","Unable to detect editor width":"Unable to detect editor width","Fit Editor Width":"Fit Editor Width","Please execute a format command or select format text first, then enable the format brush":"Please execute a format command or select format text first, then enable the format brush","Use \\n to represent line breaks":"Use \\n to represent line breaks","Use ↵ to represent line breaks":"Use ↵ to represent line breaks","Top Toolbar":"Top Toolbar","Enable the toolbar positioned at the top.":"Enable the toolbar positioned at the top.","Following Toolbar":"Following Toolbar","Enable the toolbar that appears upon text selection.":"Enable the toolbar that appears upon text selection.","Fixed Toolbar":"Fixed Toolbar","Enable the toolbar whose position may be fixed where you please.":"Enable the toolbar whose position may be fixed where you please.","Toolbar Settings":"Toolbar Settings","Choose which toolbar style's appearance you want to edit.":"Choose which toolbar style's appearance you want to edit.","Vertical Split":"Vertical Split","Text Enhancement Tools":"Text Enhancement Tools","Get Plain Text":"Get Plain Text","Full Half Converter":"Full Half Converter","Insert Blank Lines":"Insert Blank Lines","Remove Blank Lines":"Remove Blank Lines","Split Lines":"Split Lines","Dedupe Lines":"Dedupe Lines","Add Prefix/Suffix":"Add Prefix/Suffix","Number Lines (Custom)":"Number Lines (Custom)","Trim Line Ends":"Trim Line Ends","Shrink Extra Spaces":"Shrink Extra Spaces","Remove All Whitespace":"Remove All Whitespace","Extract Between Strings":"Extract Between Strings","Merge Lines":"Merge Lines","List to Table":"List to Table","Table to List":"Table to List","Line Operations":"Line Operations","Text Processing":"Text Processing","Advanced Tools":"Advanced Tools","Align Text Right":"Align Text Right",Bold:"Bold",Checklist:"Checklist","Clear Text Formatting":"Clear Text Formatting",Copy:"Copy",Cut:"Cut",Embed:"Embed","Header 1":"Header 1","Header 2":"Header 2","Header 3":"Header 3","Header 4":"Header 4","Header 5":"Header 5","Header 6":"Header 6",Highlight:"Highlight","Horizontal Divider":"Horizontal Divider","Indent list":"Indent list","Inline Math":"Inline Math",Italic:"Italic",Link:"Link",MathBlock:"MathBlock","Ordered List":"Ordered List",Paste:"Paste","Redo Edit":"Redo Edit",Strikethrough:"Strikethrough",Underline:"Underline","Undo Edit":"Undo Edit","Unindent List":"Unindent List","Unordered List":"Unordered List","Insert Embed":"Insert Embed","Insert Link":"Insert Link","Insert Tag":"Insert Tag","Insert Internal link":"Insert Internal link","Insert Code":"Insert Code","Insert Blockquote":"Insert Blockquote","Insert Comment":"Insert Comment","Insert Callout":"Insert Callout","Insert MathBlock":"Insert MathBlock","Insert Table":"Insert Table","Swap Line Up":"Swap Line Up","Swap Line Down":"Swap Line Down","Attach File":"Attach File","Clear Formatting":"Clear Formatting","Cycle List and Checklist":"Cycle List and Checklist",Blockquote:"Blockquote",Callout:"Callout",Superscript:"Superscript",Subscript:"Subscript","Inline Code":"Inline Code","Code Block":"Code Block",Wikilink:"Wikilink","Justify Text":"Justify Text","Align Text Left":"Align Text Left","Center Text":"Center Text","Change Font Color":"Change Font Color","Change Background Color":"Change Background Color","Fullscreen Focus Mode":"Fullscreen Focus Mode","Workplace Fullscreen":"Workplace Fullscreen","Renumber Ordered List":"Renumber Ordered List","Toggle Format Brush":"Toggle Format Brush","Toggle Fullscreen Focus Mode":"Toggle Fullscreen Focus Mode","Toggle Workplace Fullscreen Focus":"Toggle Workplace Fullscreen Focus","Enter prefix":"Enter prefix","Enter suffix":"Enter suffix",Delimiter:"Delimiter","Enter delimiter (e.g., comma, tab)":"Enter delimiter (e.g., comma, tab)","Column Number":"Column Number","Enter column number (starting from 1)":"Enter column number (starting from 1)","Start String":"Start String","Enter start string":"Enter start string","End String":"End String","Enter end string":"Enter end string","Number Lines Configuration":"Number Lines Configuration","Start Number":"Start Number",Step:"Step",Separator:"Separator","Merge Lines Settings":"Merge Lines Settings","Separator (leave empty for smart spacing)":"Separator (leave empty for smart spacing)","e.g., comma, pipe, arrow":"e.g., comma, pipe, arrow","Plain text copied to clipboard":"Plain text copied to clipboard","Whitespace cleaning completed":"Whitespace cleaning completed","List pattern detected, auto-split":"List pattern detected, auto-split","No obvious separator or list pattern detected":"No obvious separator or list pattern detected","Paste failed":"Paste failed","Detected Chinese context: converted to full-width symbols":"Detected Chinese context: converted to full-width symbols","Detected code/English context: converted to half-width symbols":"Detected code/English context: converted to half-width symbols","Please select text to dedupe first":"Please select text to dedupe first","Deduplication completed, remaining":"Deduplication completed, remaining",lines:"lines","Prefix/suffix added":"Prefix/suffix added","Please select text to number first":"Please select text to number first","Numbering completed: starting from":"Numbering completed: starting from","Please specify start or end string":"Please specify start or end string",Extracted:"Extracted",matches:"matches","No matches found":"No matches found","Extraction failed":"Extraction failed","Please select lines to merge first":"Please select lines to merge first","Merged with":"Merged with","Merge completed":"Merge completed",Item:"Item","Super conversion completed: context preserved and layout optimized":"Super conversion completed: context preserved and layout optimized","Please select a valid Markdown table":"Please select a valid Markdown table","Table converted to multi-level list":"Table converted to multi-level list","AI Editor":"AI Editor","Enable AI Editor":"Enable AI Editor","Enable AI editor features such as inline completion and selection rewrite.":"Enable AI editor features such as inline completion and selection rewrite.","Try AI Editing":"Try AI Editing","Unlock inline completion, rewrite, frontmatter, and canvas generation right inside your toolbar.":"Unlock inline completion, rewrite, frontmatter, and canvas generation right inside your toolbar.","Sign in to PKMer AI for free managed AI, or use your own compatible model.":"Sign in to PKMer AI for free managed AI, or use your own compatible model.","What you get":"What you get","Inline completion while you write":"Inline completion while you write","Rewrite, summarize, and continue text in place":"Rewrite, summarize, and continue text in place","Generate frontmatter, lists, tables, and canvas drafts":"Generate frontmatter, lists, tables, and canvas drafts","Before you enable AI":"Before you enable AI","The plugin itself does not intentionally store your note content.":"The plugin itself does not intentionally store your note content.","AI requests are sent only to the provider you choose, such as PKMer AI or your custom model.":"AI requests are sent only to the provider you choose, such as PKMer AI or your custom model.","Those requests remain subject to the provider privacy policy, terms, and model rules.":"Those requests remain subject to the provider privacy policy, terms, and model rules.","You can turn AI off at any time in settings.":"You can turn AI off at any time in settings.","Agree & Enable AI":"Agree & Enable AI","Not now":"Not now","AI editing is now enabled. The plugin does not intentionally store your note content, and requests follow your chosen provider policies.":"AI editing is now enabled. The plugin does not intentionally store your note content, and requests follow your chosen provider policies.",Enabled:"Enabled",Disabled:"Disabled","Completion Mode":"Completion Mode","Choose whether completion is triggered manually or automatically after a short pause.":"Choose whether completion is triggered manually or automatically after a short pause.","Enable Inline Completion":"Enable Inline Completion","Show ghost text suggestions inside the editor.":"Show ghost text suggestions inside the editor.","Completion Delay (ms)":"Completion Delay (ms)","Delay before auto-triggering inline completion.":"Delay before auto-triggering inline completion.","Completion Max Tokens":"Completion Max Tokens","Upper bound for one inline completion response. Increase it if completions feel cut off.":"Upper bound for one inline completion response. Increase it if completions feel cut off.",Manual:"Manual",Auto:"Auto","Text Tools":"Text Tools","AI Tools":"AI Tools","Inline Completion":"Inline Completion","Select text to see more tools":"Select text to see more tools","AI Assistant":"AI Assistant","AI module is ready":"AI module is ready","Use AI enhancements directly from the toolbar.":"Use AI enhancements directly from the toolbar.","Place the cursor for inline completion, or select text to unlock rewrite actions.":"Place the cursor for inline completion, or select text to unlock rewrite actions.","Selected text detected. Rewrite actions are ready.":"Selected text detected. Rewrite actions are ready.","AI Continue Writing":"AI Continue Writing","AI Summarize Selection":"AI Summarize Selection","AI Explain Selection":"AI Explain Selection","At Cursor":"At Cursor","On Selection":"On Selection","Continue writing at the current cursor.":"Continue writing at the current cursor.","Polish tone, wording, and structure.":"Polish tone, wording, and structure.","Extend from the selected passage.":"Extend from the selected passage.","Turn long text into concise points.":"Turn long text into concise points.","Explain the meaning and key ideas.":"Explain the meaning and key ideas.","Use your own prompt on the selection.":"Use your own prompt on the selection.","Custom Model":"Custom Model",Unavailable:"Unavailable","Checking...":"Checking...",AI:"AI","AI Complete":"AI Complete","AI Rewrite":"AI Rewrite","AI Continue":"AI Continue","AI Summarize":"AI Summarize","AI Explain":"AI Explain","AI Translate":"AI Translate","AI Tone":"AI Tone","AI Fix":"AI Fix","AI Shorten":"AI Shorten","AI Expand":"AI Expand","AI Simplify":"AI Simplify","AI Professional":"AI Professional","AI Casual":"AI Casual","AI Custom":"AI Custom",Tone:"Tone",Translate:"Translate",Generate:"Generate","Improve writing":"Improve writing","Fix spelling & grammar":"Fix spelling & grammar","Make shorter":"Make shorter","Make longer":"Make longer","Simplify language":"Simplify language","Professional tone":"Professional tone","Casual tone":"Casual tone",English:"English",Chinese:"Chinese",Japanese:"Japanese",German:"German",French:"French",Spanish:"Spanish","Explain this":"Explain this",Summarize:"Summarize","Continue writing":"Continue writing","Press Enter to send, Shift+Enter for newline, Esc to close.":"Press Enter to send, Shift+Enter for newline, Esc to close.","Enter inserts a newline. Tap Send to submit.":"Enter inserts a newline. Tap Send to submit.","Open AI Settings":"Open AI Settings","Trigger AI Inline Completion":"Trigger AI Inline Completion","AI Improve Selection":"AI Improve Selection","AI Custom Rewrite":"AI Custom Rewrite",Send:"Send","Login to PKMer AI":"Login to PKMer AI","PKMer AI":"PKMer AI","Sign in to PKMer to use managed AI without manual model setup.":"Sign in to PKMer to use managed AI without manual model setup.","Log in to PKMer AI to get free AI features without manual model setup.":"Log in to PKMer AI to get free AI features without manual model setup.","Log in to PKMer AI and you can start using free AI features right away.":"Log in to PKMer AI and you can start using free AI features right away.","Need a PKMer AI account?":"Need a PKMer AI account?","Open PKMer AI":"Open PKMer AI","PKMer Account":"PKMer Account",Login:"Login",Logout:"Logout","Refresh Quota":"Refresh Quota","Check Quota":"Check Quota","More Quota":"More Quota","PKMer AI is ready. You can use AI now and check your quota here.":"PKMer AI is ready. You can use AI now and check your quota here.","PKMer managed defaults are used automatically after sign-in.":"PKMer managed defaults are used automatically after sign-in.","Checking current AI route...":"Checking current AI route...","Current route: PKMer AI. If unavailable, it falls back to your custom model.":"Current route: PKMer AI. If unavailable, it falls back to your custom model.","Current route: PKMer AI.":"Current route: PKMer AI.","Current route: Custom model.":"Current route: Custom model.","No provider available. Log in to PKMer or complete the custom model settings.":"No provider available. Log in to PKMer or complete the custom model settings.","No provider available. Log in to PKMer to enable AI.":"No provider available. Log in to PKMer to enable AI.","Unable to determine current AI route.":"Unable to determine current AI route.",Account:"Account",Complete:"Complete","Quick Trigger":"Quick Trigger","Improve Selection":"Improve Selection","Custom Rewrite":"Custom Rewrite","Logout from PKMer":"Logout from PKMer","Editor Features":"Editor Features","PKMer Model":"PKMer Model","Choose models by task.":"Choose models by task.",Mode:"Mode","Light tasks use the light model. Complex tasks use the reasoning model.":"Light tasks use the light model. Complex tasks use the reasoning model.",Completion:"Completion",Rewrite:"Rewrite",Reasoning:"Reasoning",Structured:"Structured","Used for inline completion.":"Used for inline completion.","Used for normal rewrite.":"Used for normal rewrite.","Used for explain, summarize, and custom prompts.":"Used for explain, summarize, and custom prompts.","Used for frontmatter and canvas.":"Used for frontmatter and canvas.","PKMer route only.":"PKMer route only.","Light model":"Light model","Reasoning model":"Reasoning model","Inline completion":"Inline completion","Configure inline completion and rewrite after your AI provider is ready.":"Configure inline completion and rewrite after your AI provider is ready.","Custom Model (Optional)":"Custom Model (Optional)","Custom model is used automatically when PKMer AI is unavailable.":"Custom model is used automatically when PKMer AI is unavailable.","Enable Custom Model":"Enable Custom Model","Use your own OpenAI-compatible provider as a fallback.":"Use your own OpenAI-compatible provider as a fallback.","Custom API Format":"Custom API Format","Choose whether the custom model uses an OpenAI-compatible endpoint or the native Ollama API.":"Choose whether the custom model uses an OpenAI-compatible endpoint or the native Ollama API.","OpenAI-compatible":"OpenAI-compatible",Ollama:"Ollama","Custom API Base URL":"Custom API Base URL","OpenAI-compatible endpoint for your own provider.":"OpenAI-compatible endpoint for your own provider.","Native Ollama endpoint. The root URL, /api, /api/chat, or /api/generate are all supported.":"Native Ollama endpoint. The root URL, /api, /api/chat, or /api/generate are all supported.","Custom Model Name":"Custom Model Name","Model identifier used for inline completion and rewrite requests.":"Model identifier used for inline completion and rewrite requests.","Detected Ollama Models":"Detected Ollama Models","Fetch available models from your Ollama service.":"Fetch available models from your Ollama service.","Choose a detected Ollama model to fill the model field.":"Choose a detected Ollama model to fill the model field.","Select a detected model":"Select a detected model","Custom API Key":"Custom API Key","Optional for Ollama. Leave empty unless your gateway requires authentication.":"Optional for Ollama. Leave empty unless your gateway requires authentication.","Stored securely in Obsidian secret storage.":"Stored securely in Obsidian secret storage.","Will be stored securely in Obsidian secret storage.":"Will be stored securely in Obsidian secret storage.","Current Obsidian version does not support secure secret storage.":"Current Obsidian version does not support secure secret storage.","Stored securely":"Stored securely","Enter API key":"Enter API key",Temperature:"Temperature","Lower values are more stable; higher values are more creative.":"Lower values are more stable; higher values are more creative.","Test Connection":"Test Connection","Send a lightweight request to verify your custom model settings.":"Send a lightweight request to verify your custom model settings.","Please fill in the required custom model settings first.":"Please fill in the required custom model settings first.","No Ollama models found at this endpoint.":"No Ollama models found at this endpoint.","Failed to load Ollama models:":"Failed to load Ollama models:","Please fill in Custom API Base URL, Custom Model Name, and Custom API Key first.":"Please fill in Custom API Base URL, Custom Model Name, and Custom API Key first.","Testing...":"Testing...","Testing custom model connection...":"Testing custom model connection...","Custom model connection succeeded.":"Custom model connection succeeded.","Custom model connection failed:":"Custom model connection failed:","Unknown connection error.":"Unknown connection error.","PKMer AI request failed because your quota is insufficient. Please get more quota in PKMer and try again.":"PKMer AI request failed because your quota is insufficient. Please get more quota in PKMer and try again.","Manual Completion Shortcut":"Manual Completion Shortcut","Default shortcut is Ctrl+J. You can customize it in Obsidian Hotkeys.":"Default shortcut is Ctrl+J. You can customize it in Obsidian Hotkeys.","Open Hotkey Settings":"Open Hotkey Settings","More Options":"More Options",Advanced:"Advanced","Advanced AI settings are usually not needed.":"Advanced AI settings are usually not needed.","Not logged in":"Not logged in","Logged in":"Logged in",Quota:"Quota","Unable to refresh PKMer quota.":"Unable to refresh PKMer quota.","PKMer quota refreshed:":"PKMer quota refreshed:","AI features are disabled in settings.":"AI features are disabled in settings.","Inline completion is disabled in settings.":"Inline completion is disabled in settings.","Current editor does not support AI inline completion.":"Current editor does not support AI inline completion.","Current editor does not support AI rewrite.":"Current editor does not support AI rewrite.","AI Custom Instruction":"AI Custom Instruction",Instruction:"Instruction","Please enter your custom AI instruction":"Please enter your custom AI instruction","Current Obsidian version does not support secure token storage.":"Current Obsidian version does not support secure token storage.","Login cancelled or timed out.":"Login cancelled or timed out.","PKMer login is already in progress. Please continue in the opened browser window.":"PKMer login is already in progress. Please continue in the opened browser window.","Successfully logged in to PKMer!":"Successfully logged in to PKMer!","Failed to complete login. Please try again.":"Failed to complete login. Please try again.","Login failed. Please try again.":"Login failed. Please try again.","OAuth state mismatch. Please try logging in again.":"OAuth state mismatch. Another Obsidian window may have intercepted the callback. Please close other vaults and try again.","Logged out from PKMer.":"Logged out from PKMer.","AI thinking":"AI thinking","AI generating":"AI generating","Ask AI to edit or generate...":"Ask AI to edit or generate...","Submit custom instruction":"Submit custom instruction","AI is writing...":"AI is writing...","AI is generating":"AI is generating","AI suggestion":"AI suggestion",Replace:"Replace","Insert below":"Insert below","Try again":"Try again",Discard:"Discard","AI List":"AI List","AI Table":"AI Table","AI Base":"AI Base","AI Canvas":"AI Canvas","AI Frontmatter":"AI Frontmatter",Toolbox:"Toolbox","AI Toolbox":"AI Toolbox","Convert to list":"Convert to list","Convert to table":"Convert to table","Convert to base":"Convert to base","Convert to canvas":"Convert to canvas","Generate frontmatter":"Generate frontmatter","Insert at cursor":"Insert at cursor","If nothing is selected, AI will use the current block or cursor context.":"If nothing is selected, AI will use the current block or cursor context.",Create:"Create","Create & Embed":"Create & Embed","AI file suggestion":"AI file suggestion","AI frontmatter suggestion":"AI frontmatter suggestion","AI Base File":"AI Base","AI Canvas File":"AI Canvas","Insert frontmatter":"Insert frontmatter","Replace frontmatter":"Replace frontmatter","Failed to apply frontmatter.":"Failed to apply frontmatter.","Created AI file:":"Created AI file:","Failed to create AI file.":"Failed to create AI file.","AI file creation is unavailable.":"AI file creation is unavailable.","AI generated content is empty.":"AI generated content is empty.","AI returned invalid Canvas JSON.":"AI returned invalid Canvas JSON.","Unable to allocate a file name for the generated artifact.":"Unable to allocate a file name for the generated artifact.",Untitled:"Untitled"},b={"Editing Toolbar Append Method":"工具栏的附加方法。","Choose where Editing Toolbar will append upon regeneration. To see the change, hit the refresh button below, or in the status bar menu.":"工具栏在Obsidian中的追加的位置,只对固定和跟随模式有效。如果你遇到工具栏显示问题,可以选择body试试。请点击下面或者状态栏菜单中的刷新按钮生效。","Editing Toolbar aesthetic":"工具栏样式","Choose between a glass morphism, tiny and default style for Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.":"样式有毛玻璃,简约和默认风格选择。请点击下面或者状态栏菜单中的刷新按钮生效。","Editing Toolbar position":"工具栏位置","Choose between fixed position or cursor following mode.":"在固定位置,光标跟随模式或者置顶模式之间进行选择。","Editing Toolbar Columns":"工具栏栏目数","Choose the number of columns per row to display on Editing Toolbar.":"选择在Editing Toolbar上显示的每行的列数。","Editing Toolbar refresh":"刷新工具栏","Editing Toolbar Commands":"在工具栏中添加命令","Add a command onto Editing Toolbar from Obsidian's commands library. To reorder the commands, drag and drop the command items. To delete them, use the delete buttom to the right of the command item. Editing Toolbar will not automaticaly refresh after reordering commands. Use the refresh button above.":"从Obsidian的命令库中添加一个命令到工具栏。要重新排列命令,可以拖放命令项。要删除它们,请使用命令项右边的删除按钮。图标选择Custom可以自定义图标","Format Brush Off!":"关闭格式刷!","Hide & Show":"隐藏 & 显示","Editing Toolbar will only refresh automatically after you have either added or deleted a command from it. To see UI changes to editingToolbar (above settings changes) use the refresh button. If you forget to refresh in settings, no worries. There is also a refresh button in the editingToolbar status bar menu.":"对外观的更改生效需要使用刷新按钮。如果你忘记在设置中刷新,在状态栏菜单中也有一个刷新按钮。","Font-Color formatting brush ON!":"字体颜色格式刷开启\n点击鼠标中键或者右键关闭格式刷",More:"更多","Copy commands from selected style.":"从所选样式复制命令。","Font Colors":"字体颜色","Format Brush":"格式刷","Background Color":"背景颜色",Refresh:"刷新",Add:"添加",Delete:"删除","Change Command Name":"更改命令名称","Change Submenu Name":"更改子菜单名称","Button Submenu":"按钮子菜单","Dropdown Menu":"下拉菜单","Menu type changed to":"菜单类型已更改为","Add Submenu":"添加子菜单","Add Separator":"添加分割线","Enter the icon code, it looks like .... format":"输入图标代码,类似.... 格式","Please enter a new name: ":"请输入新名称:","Drag the slider to move the position":"拖动滑块来移动位置","Plugin Settings":"插件设置","Background-color formatting brush ON!":"开启背景色格式刷","Clear formatting brush ON!":"清除格式刷已开启","Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush":"清除格式刷已开启\n点击鼠标中键或者右键关闭格式刷","The toolbar is displayed when the mouse moves over it, otherwise it is automatically hidden":"当鼠标移到工具栏上方时,工具栏显示,否则自动隐藏","Editing Toolbar Auto-hide":"工具栏是否自动隐藏","Editing Toolbar Centred Display":"工具栏是否居中显示","Whether the toolbar is centred or full-width, the default is full-width.":"工具栏居中还是全宽显示,默认全宽显示","Custom Backgroud Color":"设置自定义背景色","Custom Font Color":"设置自定义字体颜色","🎨 Set Custom Background":"🎨 设置自定义背景","🖌️ Set Custom Font Color":"🖌️ 设置自定义字体颜色","Click on the picker to adjust the color":"点击选取器来调整颜色","Mobile Enabled or Not":"是否在移动端启用","Whether to enable on mobile devices with device width less than 768px.":"是否在设备宽度小于768的移动设备启用。默认不启用",Reset:"重置",Fix:"修复","Fix Editing Toolbar":"修复工具栏",General:"常规",Appearance:"外观",Commands:"命令","Choose between fixed position or cursor following mode":"选择固定位置或者光标跟随模式","Add and manage commands":"添加和管理命令","Choose where Editing Toolbar will append upon regeneration.":"选择工具栏在Obsidian中的追加的位置。","Whether to enable on mobile devices with device width less than 768px":"是否在移动设备中启用。默认不启用","Choose between a glass morphism, tiny and default style":"选择毛玻璃,简约和默认风格","Refresh Toolbar":"刷新工具栏","Add Command":"添加命令",Settings:"设置","Adjust Toolbar Position[Fixed mode]":"调整工具栏位置[固定模式]","Position Style":"位置样式",Columns:"列数","Drag to Adjust Position":"拖动调整位置","Vertical Position":"垂直位置","Horizontal Position":"水平位置","Toolbar Position":"工具栏位置","Choose an icon":"选择一个图标","Search for an icon...":"搜索图标...",All:"全部",Obsidian:"Obsidian",Glyph:"Glyph","Choose a command":"选择一个命令","The command":"命令","already exists":"已存在","Enter the icon code, format as .... ":"输入图标代码,格式为 .... ","No matching icons found":"没有找到匹配的图标","Custom Commands":"自定义命令","Toolbar Commands":"工具栏命令",ID:"ID",Prefix:"前缀",Suffix:"后缀","Custom Format Commands":"自定义格式命令","Add, edit or delete custom format commands.":"添加、编辑或删除自定义格式命令","Command ID":"命令ID",'Unique identifier, no spaces, e.g.: "my-custom-format"':'唯一标识符,不包含空格,例如:"my-custom-format"',"Displayed name in toolbar and menu":"在工具栏和菜单中显示的名称","Add content before selected text":"在选中的文本前添加内容","Add content after selected text":"在选中的文本后添加内容","Character offset of cursor after formatting":"格式化后光标的字符偏移量","Line offset of cursor after formatting":"格式化后光标的行偏移量","Whether to insert at the beginning of the next line":"是否在下一行首插入","Command icon (click to select)":"命令图标(点击选择)","Choose Icon":"选择图标",Save:"保存",Cancel:"取消","Edit Custom Command":"编辑自定义命令","Add Custom Command":"添加自定义命令","Command ID and command name cannot be empty":"命令ID和命令名称不能为空","Command ID cannot contain spaces":"命令ID不能包含空格",'Command ID "${this.commandId}" already exists':'命令ID "${this.commandId}" 已存在',"Command Name":"命令名称","Cursor Position Offset":"光标位置偏移量","Line Offset":"行偏移量","Line Head Format":"行首格式",Icon:"图标","Are you sure you want to restore all settings to default? This will lose all your custom configurations.":"确定要恢复所有设置为默认值吗?这将丢失您的所有自定义配置。","Restore default":"恢复默认值","Restore default settings":"恢复默认设置","🔄Restore default settings":"🔄恢复默认设置","🔧Data repair":"🔧数据修复","Command IDs have been successfully repaired!":"命令ID已成功修复!","No command IDs need to be repaired":"没有命令ID需要修复","Error repairing command IDs, please check the console for details":"修复命令ID时出错,请查看控制台了解详情","Error restoring default settings, please check the console for details":"恢复默认设置时出错,请查看控制台了解详情","Successfully restored default settings!":"已成功恢复默认设置!",Close:"关闭",Tips:"提示","This update changed the ID of some commands, please click this button to repair the commands to ensure the toolbar works properly":"此次更新更改了部分命令的ID,请点击此按钮修复命令以确保工具栏正常工作","Repair command ID":"修复命令ID","This will reset all your custom configurations":"这将重置您的所有自定义配置","Notice:":"注意","This update rebuilds the entire code, reducing resource consumption":"此次更新重构了全部代码,降低了资源占用","Optimized mobile usage, added canvas support, and added custom commands":"优化了移动端,增加了对canvas支持,增加了自定义命令","⚠️This update is not compatible with 2.x version command ids, please click [Repair command] to be compatible":"⚠️此次更新不兼容2.x旧版本命令id,请点击【修复命令】进行兼容","⚠️If you want to restore the default settings, please click [Restore default settings]":"⚠️如果想恢复默认设置,请点击【恢复默认设置】","Please execute a editingToolbar format command first, then enable the format brush":"请先执行一个格式命令,然后再启用格式刷","Format brush ON! Select text to apply【":"格式刷已开启\n选中文本应用【","】format":"】格式\n点击鼠标右键关闭格式刷","Add to Toolbar":"添加到工具栏","This command is already in the toolbar.":"该命令已存在于工具栏中","Command added to toolbar":"命令已添加到工具栏","Add this command to the toolbar.":"添加该命令到工具栏","Callout Type":"Callout 类型",Title:"标题","Optional, leave blank for default title":"可选,留空则使用默认标题","Input title":"输入标题","Collapse State":"折叠状态",Open:"展开",Closed:"折叠",Content:"内容",Insert:"插入","Input content":"输入内容","Link Text":"链接文本","Link Alias":"链接别名","Link URL":"链接地址","Embed Content":"嵌入内容","Image Size":"图片尺寸","Insert New Line":"插入新行","Paste and Parse":"粘贴并解析","URL Format Error":"URL格式错误","Image Width":"图片宽度","Image Height":"图片高度","Insert a link on the next line":"在下一行插入链接","If it is an image, turn on":"如果是图片,请开启","Link Title(optional)":"链接标题(可选)",Alias:"别名",Optional:"可选","Default 0, format will keep the text selected":"默认0,格式化将保持文本选中","to insert":"插入","Latest Changes":"最新更新","📋View full changelog":"📋查看完整更新日志","Open changelog":"打开更新日志","Loading changelog...":"加载更新日志...","Open the complete changelog in your browser":"在浏览器中打开完整更新日志","Enable Multiple Configurations":"启用多配置","Enable different command configurations for each position style (following, top, fixed).":"启用每个位置样式的不同命令配置(following,top,fixed)","Currently editing commands for":"当前编辑的命令配置为:","position style":"样式","Current Configuration":"当前配置","Switch between different command configurations.":"切换不同的命令配置","Following Style":"跟随样式","Top Style":"顶部样式","Fixed Style":"固定样式","Mobile Style":"移动端样式",configuration:"配置","Deploy command to configurations":"部署命令到配置","All Configurations":"所有配置",Deploy:"部署","Command deployed to selected configurations":"命令已部署到选中的配置","No configuration selected for deployment":"没有选中的配置","Command already exists in selected configurations":"命令已存在于选中的配置","Command deployed to: ":"命令已部署到:","Command Deleted":"命令已删除","Confirm Delete?":"确认删除?","Are you sure you want to restore all settings to default? But custom commands will be preserved.":"您确定要将所有设置恢复为默认值吗?但自定义命令将被保留。","Successfully restored default settings! (Custom commands preserved)":"成功恢复默认设置!(自定义命令已保留)","This will reset all your custom configurations, but custom commands will be preserved":"这将重置您的所有自定义配置,但自定义命令将被保留","Import/Export":"导入/导出","Export Configuration":"导出配置","Export your toolbar configuration to share with others.":"导出您的工具栏配置以与他人共享",Export:"导出","Import Configuration":"导入配置","Import toolbar configuration from JSON.":"从JSON导入工具栏配置",Import:"导入","Usage Instructions":"使用说明","Export: Generate a JSON configuration that you can save or share.":"导出:生成可保存或共享的JSON配置","Import: Paste a previously exported JSON configuration.":"导入:粘贴先前导出的JSON配置","You can choose to export all settings, only toolbar commands, or only custom commands":"您可以选择导出所有设置、仅工具栏命令或仅自定义命令","When importing, the plugin will only update the settings included in the import data":"导入时,插件将仅更新导入数据中包含的设置","Warning: Importing configuration will overwrite your current settings. Consider exporting your current configuration first as a backup.":"警告:导入配置将覆盖您当前的设置。建议先导出当前配置作为备份。","Export Type":"导出类型","Choose what to export":"选择要导出的内容","All Settings":"所有设置","Toolbar Commands Only":"仅工具栏命令","Custom Commands Only":"仅自定义命令","Export Content":"导出内容","Copy this content to share with others":"复制此内容以与他人共享","Loading...":"加载中...","Copy to Clipboard":"复制","Configuration copied to clipboard":"配置已复制到剪贴板","Failed to copy configuration":"复制配置失败","Paste the configuration JSON here":"在此处粘贴配置JSON","Paste configuration here...":"在此处粘贴配置...","Invalid import data":"无效的导入数据","Configuration imported successfully":"配置导入成功","No valid configuration found in import data":"导入数据中未找到有效配置","Failed to import configuration. Invalid format.":"导入配置失败。格式无效。","Import Mode":"导入模式","Choose how to import the configuration":"选择如何导入配置","Update Mode (Add new items and update existing ones)":"更新模式(添加新项目并更新现有项目)","Overwrite Mode (Replace all settings with imported ones)":"覆盖模式(用导入的配置替换所有设置)","Configuration imported successfully (Overwrite mode)":"配置导入成功(覆盖模式)","Configuration imported successfully (Update mode)":"配置导入成功(更新模式)","Warning: Overwrite mode will completely replace your current settings with the imported ones. Consider exporting your current configuration first as a backup.":"警告:覆盖模式将完全替换您当前的设置与导入的设置。建议先导出当前配置作为备份。","Warning: Update mode will add new items and update existing ones based on the imported configuration.":"警告:更新模式将根据导入的配置添加新项目并更新现有项目。","Add Format Command":"添加格式命令",Regex:"正则","Prefix/Suffix":"前缀/后缀","Insert Special Char":"增加特殊符号","Add Regex Command":"添加正则表达式命令","Switch Regex Command Window":"切换到正则命令窗口","Please select text first":"请先选中文本","Place the cursor in a paragraph or select text first.":"请将光标放在当前段落内,或先选中文本。","Current line is empty, please select text or move to a non-empty line":"当前行为空,请选中文本或移动到非空行","Use current line for regex commands":"正则命令使用当前行","When no text is selected, regex commands will use the current line instead of clipboard content":"当没有选中文本时,正则命令将使用当前行内容而不是剪贴板内容","The selected text does not meet the condition requirements":"选中的文本不满足条件要求","Regex command execution error: ":"正则表达式命令执行错误:","Copy code":"复制代码","Copied!":"已复制!","Explain the syntax of JavaScript regular expressions":"解释JavaScript正则表达式的语法","Apply regular expression replacement":"应用正则表达式替换","Conditional matching":"条件匹配","Complete regular expression code (copy to AI for explanation)":"完整正则表达式代码(复制到AI解释)","Error: ":"错误:","Regex pattern cannot be empty":"正则表达式不能为空","Command already exists":"命令已存在","Choose icon":"选择图标","URL to Markdown link":"URL转Markdown链接","Convert MM/DD/YYYY to YYYY-MM-DD":"将MM/DD/YYYY日期格式转换为YYYY-MM-DD","Add bold to keywords":"添加粗体到关键词","Format phone number":"格式化电话号码","Remove extra spaces":"删除多余空格","Convert HTML bold tags to Markdown format":"将HTML粗体标签转换为Markdown格式","Convert quoted text to quote block":"将引用的文本转换为引用块","Convert CSV to Markdown table row":"将CSV转换为Markdown表格行","Add uniform alias to Markdown links":"添加统一别名到Markdown链接","Delete empty lines (multiline mode)":"删除空行(多行模式)","Add list symbol to each line (multiline mode)":"添加列表符号到每行(多行模式)","If the text contains important, set the text highlight (conditional format)":"如果文本包含重要内容,设置文本高亮(条件格式)","Matching pattern":"匹配模式","Regex pattern to match":"正则表达式匹配","Replacement pattern (use $1, $2, etc. to reference capture groups)":"替换模式(使用$1, $2等引用捕获组)","Ignore case":"忽略大小写","Global replace":"全局替换","Multiline mode":"多行模式","Use condition":"使用条件","Condition pattern":"条件模式","Only apply custom command when text matches the condition":"仅在文本匹配条件时应用自定义命令","Must exist regular expression or text":"必须存在正则表达式或文本","Replacement pattern":"替换模式","Match case-insensitive":"匹配不区分大小写","^ and $ match the start and end of each line":"^ 和 $ 匹配每行的开始和结束","Replace all matches":"替换所有匹配",Command:"命令","Input example text to view the formatting effect of the command...":"输入示例文本以查看命令的格式化效果...",Description:"描述","[Example]":"[示例]","[Requirements]":"[要求]","[Output]":"[输出]","AI question template:":"AI问题模板:","I need to convert the url to a markdown format link":"我需要将URL转换为Markdown格式链接","For example, convert https://example.com to [https://example.com](https://example.com)":"例如,将https://example.com转换为[https://example.com](https://example.com)","Use js regular expression to implement, and output the parameters in the following format (the result does not need to be escaped with json)":"使用js正则表达式实现,并输出以下格式的参数(结果不需要用json转义)","[Description]":"[描述]","How to use AI to get regular expressions?":"如何使用AI获取正则表达式?","Regular expression examples":"正则表达式示例","Edit regular expression command":"编辑正则表达式命令","Add regular expression command":"添加正则表达式命令","Result:":"结果:","Example text:":"示例文本:",Preview:"预览",Result:"结果","Update Import":"增量导入","Overwrite Import":"覆盖导入","Importing configuration...":"正在导入配置...","Following Style Only":"仅Following样式","Top Style Only":"仅Top样式","Fixed Style Only":"仅Fixed样式","Mobile Style Only":"仅Mobile样式","Unknown import type":"未知导入类型","All Toolbar Commands":"所有工具栏命令","Following style commands successfully initialized":"Following样式初始化成功","Top style commands successfully initialized":"Top样式初始化成功","Fixed style commands successfully initialized":"Fixed样式初始化成功","Mobile style commands successfully initialized":"Mobile样式初始化成功","Commands initialized successfully":"命令初始化成功","Reset Commands":"重置命令","Are you sure you want to reset the current configuration?":"您确定要将当前配置进行重置吗?","Commands reset successfully":"命令重置成功","Initialize Commands":"初始化命令","Initialize commands to default settings":"初始化命令到默认设置","Reset commands to default settings":"重置命令到默认设置",Clear:"清除","Remove all commands from this configuration.":"清除当前样式下的所有命令","Are you sure you want to clear all commands under the current style?":"您确定要清除当前样式下的所有命令吗?","Current style commands have been cleared":"当前样式下的命令已清除","Manage Commands":"管理命令","Reset or clear all commands in this configuration":"重置或清除当前样式下的所有命令","Import Commands from Other Styles":"从其他样式导入命令","Copy commands from another style configuration.":"从另一个样式配置复制命令","Main menu only":"Main menu only","This import will update:":"此次导入将更新:","Custom commands":"自定义命令","Toolbar commands":"工具栏命令","All settings":"所有设置","Following style only":"跟随样式","Top style only":"顶部样式","Fixed style only":"固定样式","Mobile style only":"移动端样式","Main Menu Commands":"主菜单命令","Following Style Commands":"跟随样式命令","Top Style Commands":"顶部样式命令","Fixed Style Commands":"固定样式命令","Mobile Style Commands":"移动端样式命令","General settings":"常规设置","Please paste configuration data first":"请先粘贴配置数据","Invalid import data format":"无效的导入数据格式","Do you want to continue?":"您确定要继续吗?","Warning: Update mode will add new items and update existing ones.":"警告:更新模式将添加新项目并更新现有项目。","Warning: Overwrite mode will completely replace your current settings with the imported ones.":"警告:覆盖模式将完全替换您当前的设置与导入的设置。","Overwrite Mode (Replace settings with imported ones)":"覆盖模式(用导入的配置替换所有设置)","Warning: Overwrite mode will replace existing settings with imported ones.":"警告:覆盖模式将用导入的配置替换所有设置。","Enable Multiple Config":"启用多配置","One-click Clear":"一键清除","This import will:":"此次导入将:","Update general settings":"更新常规设置","Update Main Menu Commands":"更新主菜单命令","Update Custom Commands":"更新自定义命令","Update Following Style Commands":"更新跟随样式命令","Update Top Style Commands":"更新顶部样式命令","Update Fixed Style Commands":"更新固定样式命令","Clear all Main Menu Commands":"清除所有主菜单命令","Clear all Custom Commands":"清除所有自定义命令","Clear all Following Style Commands":"清除所有跟随样式命令","Clear all Top Style Commands":"清除所有顶部样式命令","Clear all Fixed Style Commands":"清除所有固定样式命令","Clear all Mobile Style Commands":"清除所有移动端样式命令","Set Multiple Config to:":"设置多配置为:",Enable:"启用",Disable:"禁用","Set Position Style to:":"设置位置样式为:",Following:"跟随",Top:"顶部",Fixed:"固定",Mobile:"移动端","All commands":"所有命令","⚠️ Overwrite mode will replace existing settings with imported ones.":"⚠️ 覆盖模式将用导入的配置替换所有设置。","ℹ️ Update mode will merge imported settings with existing ones.":"ℹ️ 更新模式将合并导入的设置与现有的设置。","Imported settings:":"导入的设置:","Imported commands:":"导入的命令:","Disable toolbar for this view":"禁用此视图的工具栏","Enable toolbar for this view":"启用此视图的工具栏","Manage all view types":"管理所有视图类型","Current View: ":"当前视图:","Appearance Style":"外观样式","Position Settings":"位置设置","Join the Community":"加入社区","Share your toolbar settings and styles in our":"分享您的工具栏设置和样式:","section!":"社区!","Get inspired by what others have created or showcase your own customizations.":"获取灵感或展示您的自定义设置。","Toolbar Preview (With a hypothetical command configuration.)":"工具栏预览(按钮仅供参考)","Toolbar Theme":"工具栏主题","Select a preset toolbar theme, automatically setting the background color, icon color, and size for the selected style.":"选择预设的工具栏主题,自动设置背景颜色、图标颜色和大小","Toolbar Background Color":"工具栏背景颜色","Set the background color of the toolbar.":"设置工具栏的背景颜色","Toolbar Icon Color":"工具栏图标颜色","Set the color of the toolbar icon.":"设置工具栏图标颜色","Toolbar Icon Size":"工具栏图标大小","Set the size of the toolbar icon (px); default: 18px":"设置工具栏图标大小(px)默认18px","Custom theme":"自定义主题","Fixed Position Offset":"固定位置偏移","Choose the offset of the Editing Toolbar in the fixed position.":"选择固定位置工具栏的偏移量。","Renumber List":"列表重新编号","Insert link":"插入链接","Please enter a URL first":"请先输入一个URL","Failed to fetch title for":"获取标题失败","Link Title (optional)":"链接标题(可选)","Unable to detect editor width":"无法检测编辑器宽度","Fit Editor Width":"自适应宽度","Fetch Remote Title":"获取URL标题","Please execute a format command or select format text first, then enable the format brush":"请先执行一个格式命令或选中带格式的文本,然后启用格式刷",Confirm:"确认","Use \\n to represent line breaks":"使用\\n表示换行符","Use ↵ to represent line breaks":"使用↵表示换行符","All commands have been removed.":"所有命令已被清除。","Top Toolbar":"顶部工具栏","Enable the toolbar positioned at the top.":"启用位于顶部的工具栏。","Following Toolbar":"跟随工具栏","Enable the toolbar that appears upon text selection.":"启用在选中文本时出现的工具栏。","Fixed Toolbar":"固定工具栏","Enable the toolbar whose position may be fixed where you please.":"启用可以固定在任意位置的工具栏。","Toolbar Settings":"工具栏设置","Choose which toolbar style's appearance you want to edit.":"选择要编辑外观的工具栏样式。","Vertical Split":"垂直分割","Text Enhancement Tools":"文本增强工具","Get Plain Text":"获取无语法文本","Full Half Converter":"全角半角转换","Insert Blank Lines":"插入空行","Remove Blank Lines":"删除空行","Split Lines":"拆分行","Dedupe Lines":"去除重复行","Add Prefix/Suffix":"添加前后缀","Number Lines (Custom)":"添加行号(自定义)","Trim Line Ends":"去除行首尾空格","Shrink Extra Spaces":"压缩多余空格","Remove All Whitespace":"移除所有空白","Extract Between Strings":"提取字符串之间内容","Merge Lines":"合并行","List to Table":"多级列表转表格","Table to List":"表格转多级列表","Line Operations":"行操作","Text Processing":"文本处理","Advanced Tools":"高级工具","Align Text Right":"右对齐",Bold:"加粗",Checklist:"清单","Clear Text Formatting":"清除文本格式",Copy:"复制",Cut:"剪切",Embed:"嵌入","Header 1":"标题 1","Header 2":"标题 2","Header 3":"标题 3","Header 4":"标题 4","Header 5":"标题 5","Header 6":"标题 6",Highlight:"高亮","Horizontal Divider":"水平分隔线","Indent list":"增加列表缩进","Inline Math":"行内公式",Italic:"斜体",Link:"链接",MathBlock:"数学公式块","Ordered List":"有序列表",Paste:"粘贴","Redo Edit":"重做编辑",Strikethrough:"删除线",Underline:"下划线","Undo Edit":"撤销编辑","Unindent List":"减少列表缩进","Unordered List":"无序列表","Insert Embed":"插入嵌入","Insert Link":"插入链接","Insert Tag":"插入标签","Insert Internal link":"插入内部链接","Insert Code":"插入代码","Insert Blockquote":"插入引用块","Insert Comment":"插入注释","Insert Callout":"插入 Callout","Insert MathBlock":"插入数学公式块","Insert Table":"插入表格","Swap Line Up":"上移当前行","Swap Line Down":"下移当前行","Attach File":"附加文件","Clear Formatting":"清除格式","Cycle List and Checklist":"循环切换列表与清单",Blockquote:"引用块",Callout:"Callout",Superscript:"上标",Subscript:"下标","Inline Code":"行内代码","Code Block":"代码块",Wikilink:"内部链接","Justify Text":"两端对齐","Align Text Left":"左对齐","Center Text":"居中对齐","Change Font Color":"更改字体颜色","Change Background Color":"更改背景颜色","Fullscreen Focus Mode":"全屏专注模式","Workplace Fullscreen":"工作区全屏","Renumber Ordered List":"重新编号有序列表","Toggle Format Brush":"切换格式刷","Toggle Fullscreen Focus Mode":"切换全屏专注模式","Toggle Workplace Fullscreen Focus":"切换工作区全屏","Enter prefix":"输入前缀","Enter suffix":"输入后缀",Delimiter:"分隔符","Enter delimiter (e.g., comma, tab)":"输入分隔符(例如:逗号、制表符)","Column Number":"列号","Enter column number (starting from 1)":"输入列号(从1开始)","Start String":"起始字符串","Enter start string":"输入起始字符串","End String":"结束字符串","Enter end string":"输入结束字符串","Number Lines Configuration":"行号配置","Start Number":"起始数字",Step:"步长",Separator:"分隔符","Merge Lines Settings":"合并行设置","Separator (leave empty for smart spacing)":"分隔符 (留空则开启智能中英间距)","e.g., comma, pipe, arrow":"例如: , 或 | 或 →","Plain text copied to clipboard":"无语法文本已复制到剪贴板","Whitespace cleaning completed":"空白字符清洗完成","List pattern detected, auto-split":"检测到列表模式,已自动拆分","No obvious separator or list pattern detected":"未识别到明显的分隔符或列表模式","Paste failed":"粘贴失败","Detected Chinese context: converted to full-width symbols":"检测为中文语境:已转换为全角符号","Detected code/English context: converted to half-width symbols":"检测为代码/英文语境:已转换为半角符号","Please select text to dedupe first":"请先选择要去重的文本","Deduplication completed, remaining":"去重完成,剩余",lines:"行","Prefix/suffix added":"添加前后缀完成","Please select text to number first":"请先选择要编号的文本","Numbering completed: starting from":"已完成编号:从","Please specify start or end string":"请指定起始或结束字符串",Extracted:"提取了",matches:"个匹配项","No matches found":"未找到匹配项","Extraction failed":"提取失败","Please select lines to merge first":"请先选择要合并的行","Merged with":"已按","Merge completed":"已完成合并",Item:"项目","Super conversion completed: context preserved and layout optimized":"超级转换完成:已保留上下文并优化排版","Please select a valid Markdown table":"请先选择有效的 Markdown 表格","Table converted to multi-level list":"表格已还原为多级列表","AI Editor":"AI 编辑","Enable AI Editor":"启用 AI 编辑","Enable AI editor features such as inline completion and selection rewrite.":"启用行内补全和选区改写等 AI 编辑能力。","Try AI Editing":"试试 AI 编辑","Unlock inline completion, rewrite, frontmatter, and canvas generation right inside your toolbar.":"在当前工具栏中直接解锁行内补全、改写、Frontmatter 生成和 Canvas 草稿等能力。","Sign in to PKMer AI for free managed AI, or use your own compatible model.":"登录 PKMer AI 即可优先使用免费托管 AI,也可以改用你自己的兼容模型。","What you get":"你将获得","Inline completion while you write":"写作过程中直接获得行内补全","Rewrite, summarize, and continue text in place":"原地改写、总结、续写当前内容","Generate frontmatter, lists, tables, and canvas drafts":"生成 Frontmatter、列表、表格与 Canvas 草稿","Before you enable AI":"启用前请知悉","The plugin itself does not intentionally store your note content.":"插件本身不会主动存储你的笔记内容。","AI requests are sent only to the provider you choose, such as PKMer AI or your custom model.":"AI 请求只会发送到你选择的服务提供方,例如 PKMer AI 或你的自定义模型。","Those requests remain subject to the provider privacy policy, terms, and model rules.":"这些请求仍然受到对应服务提供方的隐私政策、服务条款和模型规则约束。","You can turn AI off at any time in settings.":"你可以随时在设置中关闭 AI。","Agree & Enable AI":"同意并启用 AI","Not now":"暂不开启","AI editing is now enabled. The plugin does not intentionally store your note content, and requests follow your chosen provider policies.":"AI 编辑已启用。插件不会主动存储你的笔记内容,但请求仍会遵循你所选 AI 服务方的策略。",Enabled:"已启用",Disabled:"已停用","Completion Mode":"补全模式","Choose whether completion is triggered manually or automatically after a short pause.":"选择手动触发,或在短暂停顿后自动触发补全。","Enable Inline Completion":"启用行内补全","Show ghost text suggestions inside the editor.":"在编辑器中显示幽灵文字补全建议。","Completion Delay (ms)":"补全延迟(毫秒)","Delay before auto-triggering inline completion.":"自动触发补全前的等待时长。","Completion Max Tokens":"补全最大 Tokens","Upper bound for one inline completion response. Increase it if completions feel cut off.":"单次行内补全的长度上限。如果经常感觉补全被截断,可以适当调高。",Manual:"手动",Auto:"自动","Text Tools":"文本工具","AI Tools":"AI 工具","Inline Completion":"行内补全","Select text to see more tools":"选中文本后显示更多工具","AI Assistant":"AI 助手","AI module is ready":"AI 已就绪","Use AI enhancements directly from the toolbar.":"直接在工具栏中使用 AI 编辑增强。","Place the cursor for inline completion, or select text to unlock rewrite actions.":"将光标放在编辑位置可触发行内补全;选中文本后可使用改写类能力。","Selected text detected. Rewrite actions are ready.":"已检测到选中文本,可直接使用改写、续写、总结与解释功能。","AI Continue Writing":"AI 继续写作","AI Summarize Selection":"AI 总结选中文本","AI Explain Selection":"AI 解释选中文本","At Cursor":"光标位置","On Selection":"选中文本","Continue writing at the current cursor.":"基于当前光标位置继续写作。","Polish tone, wording, and structure.":"润色语气、措辞与结构。","Extend from the selected passage.":"基于选中内容继续往下写。","Turn long text into concise points.":"将较长内容提炼成精简要点。","Explain the meaning and key ideas.":"解释这段内容的含义与重点。","Use your own prompt on the selection.":"对选中内容使用你的自定义指令。","Custom Model":"自定义模型",Unavailable:"不可用","Checking...":"检查中...",AI:"AI","AI Complete":"AI补全","AI Rewrite":"AI改写","AI Continue":"AI续写","AI Summarize":"AI总结","AI Explain":"AI解释","AI Translate":"AI翻译","AI Tone":"AI语气","AI Fix":"AI纠错","AI Shorten":"AI缩写","AI Expand":"AI扩写","AI Simplify":"AI简化","AI Professional":"AI专业化","AI Casual":"AI口语化","AI Custom":"AI自定义",Custom:"自定义",Edit:"编辑",Tone:"语气",Translate:"翻译",Generate:"生成","Improve writing":"优化写作","Fix spelling & grammar":"修复拼写与语法","Make shorter":"缩短内容","Make longer":"扩展内容","Simplify language":"简化表达","Professional tone":"专业语气","Casual tone":"口语语气",English:"英文",Chinese:"中文",Japanese:"日文",German:"德语",French:"法语",Spanish:"西班牙语","Explain this":"解释这段内容",Summarize:"总结内容","Continue writing":"继续写作","Press Enter to send, Shift+Enter for newline, Esc to close.":"回车发送,Shift+Enter 换行,Esc 关闭。","Enter inserts a newline. Tap Send to submit.":"回车换行,点击发送提交。","Open AI Settings":"打开 AI 设置","Trigger AI Inline Completion":"触发 AI 行内补全","AI Improve Selection":"AI 优化选中文本","AI Custom Rewrite":"AI 自定义改写",Send:"发送","Login to PKMer AI":"登录 PKMer AI","PKMer AI":"PKMer AI","Sign in to PKMer to use managed AI without manual model setup.":"登录 PKMer 后即可使用托管 AI,无需手动配置模型参数。","Log in to PKMer AI to get free AI features without manual model setup.":"登录 PKMer AI 后即可免费使用 AI 能力,无需手动配置模型参数。","Log in to PKMer AI and you can start using free AI features right away.":"登录 PKMer AI 后即可立即开始免费使用 AI 能力。","Need a PKMer AI account?":"还没有 PKMer AI 账号?","Open PKMer AI":"前往 PKMer AI","PKMer Account":"PKMer 账号",Login:"登录",Logout:"退出登录","Refresh Quota":"刷新额度","Check Quota":"查询额度","More Quota":"更多额度","PKMer AI is ready. You can use AI now and check your quota here.":"PKMer AI 已就绪。你现在可以直接使用 AI,并在这里查询额度。","PKMer managed defaults are used automatically after sign-in.":"登录后会自动使用 PKMer 的托管默认配置。","Checking current AI route...":"正在检查当前 AI 链路...","Current route: PKMer AI. If unavailable, it falls back to your custom model.":"当前链路:优先使用 PKMer AI;如果不可用,则回退到自定义模型。","Current route: PKMer AI.":"当前链路:PKMer AI。","Current route: Custom model.":"当前链路:自定义模型。","No provider available. Log in to PKMer or complete the custom model settings.":"当前没有可用 provider。请登录 PKMer,或完成自定义模型配置。","No provider available. Log in to PKMer to enable AI.":"当前没有可用 provider。请登录 PKMer 以启用 AI。","Unable to determine current AI route.":"无法判断当前 AI 链路。",Account:"账户",Complete:"补全","Quick Trigger":"快速触发","Improve Selection":"优化选中文本","Custom Rewrite":"自定义改写","Logout from PKMer":"退出 PKMer","Editor Features":"编辑增强功能","PKMer Model":"PKMer 模型","Choose models by task.":"按场景选择模型。",Mode:"模式","Light tasks use the light model. Complex tasks use the reasoning model.":"轻量任务用轻量模型,复杂任务用推理模型。",Completion:"补全",Rewrite:"改写",Reasoning:"推理",Structured:"结构化","Used for inline completion.":"用于行内补全。","Used for normal rewrite.":"用于普通改写。","Used for explain, summarize, and custom prompts.":"用于解释、总结和自定义指令。","Used for frontmatter and canvas.":"用于 Frontmatter 和 Canvas。","PKMer route only.":"仅对 PKMer 生效。","Light model":"轻量模型","Reasoning model":"推理模型","Inline completion":"行内补全","Configure inline completion and rewrite after your AI provider is ready.":"在 AI provider 准备就绪后,再配置行内补全和改写能力。","Custom Model (Optional)":"自定义模型(可选)","Custom model is used automatically when PKMer AI is unavailable.":"当 PKMer AI 不可用时,会自动使用你的自定义模型。","Enable Custom Model":"启用自定义模型","Use your own OpenAI-compatible provider as a fallback.":"将你自己的 OpenAI 兼容服务作为备用链路。","Custom API Format":"自定义接口格式","Choose whether the custom model uses an OpenAI-compatible endpoint or the native Ollama API.":"选择自定义模型使用 OpenAI 兼容接口,还是原生 Ollama API。","OpenAI-compatible":"OpenAI 兼容",Ollama:"Ollama","Custom API Base URL":"自定义 API 地址","OpenAI-compatible endpoint for your own provider.":"填写你自己的 OpenAI 兼容接口地址。","Native Ollama endpoint. The root URL, /api, /api/chat, or /api/generate are all supported.":"填写原生 Ollama 接口地址。支持根地址、/api、/api/chat 或 /api/generate。","Custom Model Name":"自定义模型名称","Model identifier used for inline completion and rewrite requests.":"用于行内补全和改写请求的模型标识。","Detected Ollama Models":"检测到的 Ollama 模型","Fetch available models from your Ollama service.":"从你的 Ollama 服务读取可用模型。","Choose a detected Ollama model to fill the model field.":"选择一个检测到的 Ollama 模型,自动填入模型名称。","Select a detected model":"选择一个检测到的模型","Custom API Key":"自定义 API Key","Optional for Ollama. Leave empty unless your gateway requires authentication.":"Ollama 模式下此项可选;除非你的网关要求鉴权,否则可以留空。","Stored securely in Obsidian secret storage.":"已安全存储在 Obsidian 的秘密存储区。","Will be stored securely in Obsidian secret storage.":"将安全存储在 Obsidian 的秘密存储区。","Current Obsidian version does not support secure secret storage.":"当前 Obsidian 版本不支持安全秘密存储。","Stored securely":"已安全存储","Enter API key":"输入 API Key",Temperature:"温度","Lower values are more stable; higher values are more creative.":"更低的值更稳定,更高的值更具创造性。","Test Connection":"测试连接","Send a lightweight request to verify your custom model settings.":"发送一次轻量请求,验证你的自定义模型配置是否可用。","Please fill in the required custom model settings first.":"请先填写必需的自定义模型配置。","No Ollama models found at this endpoint.":"这个 Ollama 地址下没有读取到任何模型。","Failed to load Ollama models:":"读取 Ollama 模型列表失败:","Please fill in Custom API Base URL, Custom Model Name, and Custom API Key first.":"请先填写自定义 API 地址、自定义模型名称和自定义 API Key。","Testing...":"测试中...","Testing custom model connection...":"正在测试自定义模型连接...","Custom model connection succeeded.":"自定义模型连接成功。","Custom model connection failed:":"自定义模型连接失败:","Unknown connection error.":"未知连接错误。","PKMer AI request failed because your quota is insufficient. Please get more quota in PKMer and try again.":"PKMer AI 请求失败:当前账号额度不足。请前往 PKMer 获取更多额度后重试。","Manual Completion Shortcut":"手动补全快捷键","Default shortcut is Ctrl+J. You can customize it in Obsidian Hotkeys.":"默认快捷键是 Ctrl+J,你也可以在 Obsidian 快捷键设置中自定义。","Open Hotkey Settings":"打开快捷键设置","More Options":"更多选项",Advanced:"高级","Advanced AI settings are usually not needed.":"大多数情况下不需要调整这些高级 AI 设置。","Not logged in":"未登录","Logged in":"已登录",Quota:"额度","Unable to refresh PKMer quota.":"无法刷新 PKMer 额度。","PKMer quota refreshed:":"PKMer 额度已刷新:","AI features are disabled in settings.":"AI 功能已在设置中关闭。","Inline completion is disabled in settings.":"行内补全已在设置中关闭。","Current editor does not support AI inline completion.":"当前编辑器不支持 AI 行内补全。","Current editor does not support AI rewrite.":"当前编辑器不支持 AI 改写。","AI Custom Instruction":"AI 自定义指令",Instruction:"指令","Please enter your custom AI instruction":"请输入你的自定义 AI 指令","Current Obsidian version does not support secure token storage.":"当前 Obsidian 版本不支持安全令牌存储。","Login cancelled or timed out.":"登录已取消或已超时。","PKMer login is already in progress. Please continue in the opened browser window.":"PKMer 登录已在进行中,请在已打开的浏览器窗口中继续完成授权。","Successfully logged in to PKMer!":"已成功登录 PKMer!","Failed to complete login. Please try again.":"登录流程未完成,请重试。","Login failed. Please try again.":"登录失败,请重试。","OAuth state mismatch. Please try logging in again.":"OAuth 状态校验失败:可能是另一个 Obsidian 窗口或库拦截了本次回调。请关闭多余库后重试。","Logged out from PKMer.":"已退出 PKMer 登录。","AI thinking":"AI 思考中","AI generating":"AI 正在生成","Ask AI to edit or generate...":"告诉 AI 你想编辑或生成什么…","Submit custom instruction":"提交自定义指令","AI is writing...":"AI 正在生成…","AI is generating":"AI 正在生成","AI suggestion":"AI 建议",Replace:"替换","Insert below":"插入到下方","Try again":"重试",Discard:"丢弃","AI List":"AI 列表","AI Table":"AI 表格","AI Base":"AI Base","AI Canvas":"AI Canvas","AI Frontmatter":"AI 属性",Toolbox:"百宝箱","AI Toolbox":"AI 百宝箱","Convert to list":"转为列表","Convert to table":"转为表格","Convert to base":"转为 Base","Convert to canvas":"转为 Canvas","Generate frontmatter":"生成 Frontmatter","Insert at cursor":"插入到光标处","If nothing is selected, AI will use the current block or cursor context.":"如果未选中文本,AI 会自动使用当前段落或光标上下文。",Create:"创建","Create & Embed":"创建并嵌入","AI file suggestion":"AI 文件建议","AI frontmatter suggestion":"AI 属性建议","AI Base File":"AI Base","AI Canvas File":"AI Canvas","Insert frontmatter":"插入 Frontmatter","Replace frontmatter":"替换 Frontmatter","Failed to apply frontmatter.":"应用 Frontmatter 失败。","Created AI file:":"已创建 AI 文件:","Failed to create AI file.":"创建 AI 文件失败。","AI file creation is unavailable.":"当前无法创建 AI 文件。","AI generated content is empty.":"AI 生成的内容为空。","AI returned invalid Canvas JSON.":"AI 返回的 Canvas JSON 无效。","Unable to allocate a file name for the generated artifact.":"无法为生成结果分配可用文件名。",Untitled:"未命名"},y={...b};const C={ar:{},cs:{},da:{},de:{},en:f,"en-gb":{"Editing Toolbar Append Method":"Editing Toolbar Append Method","Choose where Editing Toolbar will append upon regeneration. To see the change, hit the refresh button below, or in the status bar menu.":"Choose where Editing Toolbar will append upon regeneration. To see the change, hit the refresh button below, or in the status bar menu.","Editing Toolbar aesthetic":"Editing Toolbar aesthetic","Choose between a glass morphism, tiny and default style for Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.":"Choose between a glass morphism, tiny and default style for Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.","Editing Toolbar position":"Editing Toolbar position","Choose between fixed position or cursor following mode.":"Choose between fixed position, cursor following or Top mode.","Editing Toolbar Columns":"Editing Toolbar Columns","Choose the number of columns per row to display on Editing Toolbar.":"Choose the number of columns per row to display on Editing Toolbar.","Editing Toolbar refresh":"Editing Toolbar refresh","Editing Toolbar Commands":"Editing Toolbar Commands","Add a command onto Editing Toolbar from Obsidian's commands library. To reorder the commands, drag and drop the command items. To delete them, use the delete buttom to the right of the command item. Editing Toolbar will not automaticaly refresh after reordering commands. Use the refresh button above.":"Add a command onto Editing Toolbar from Obsidian's commands library. To reorder the commands, drag and drop the command items. To delete them, use the delete buttom to the right of the command item. Editing Toolbar will not automaticaly refresh after reordering commands. Use the refresh button above.","Format Brush Off!":"Format Brush Off!","Hide & Show":"Hide & Show","Editing Toolbar will only refresh automatically after you have either added or deleted a command from it. To see UI changes to editingToolbar (above settings changes) use the refresh button. If you forget to refresh in settings, no worries. There is also a refresh button in the editingToolbar status bar menu.":"Editing Toolbar will only refresh automatically after you have either added or deleted a command from it. To see UI changes to editingToolbar (above settings changes) use the refresh button. If you forget to refresh in settings, no worries. There is also a refresh button in the editingToolbar status bar menu.","Font-Color formatting brush ON!":"Font-Colour formatting brush ON!",More:"More","Font Colors":"Font Colours","Format Brush":"Format Brush","Background color":"Background colour",Refresh:"Refresh",Add:"Add",Delete:"Delete","Change Command Name":"Change Command Name","Add Submenu":"Add Submenu","Add Separator":"Add Separator","Enter the icon code, it looks like .... format":"Enter the icon code, it looks like .... format","Please enter a new name: ":"Please enter a new name: ","Drag the slider to move the position":"Drag the slider to move the position","Plugin Settings":"Plugin Settings","Background-color formatting brush ON!":"Background-colour formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush","Clear formatting brush ON!":"Clear formatting brush ON!","Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush":"Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush","The toolbar is displayed when the mouse moves over it, otherwise it is automatically hidden":"The toolbar is displayed when the mouse moves over it, otherwise it is automatically hidden","Editing Toolbar Auto-hide":"Editing Toolbar Auto-hide","Editing Toolbar Centred Display":"Editing Toolbar Centred Display","Whether the toolbar is centred or full-width, the default is full-width.":"Whether the toolbar is centred or full-width, the default is full-width.","Custom Backgroud Color":"Custom Backgroud Colour","Custom Font Color":"Custom Font Colour","🎨 Set Custom Background":"🎨 Set Custom Background","🖌️ Set Custom Font Color":"🖌️ Set Custom Font Colour","Click on the picker to adjust the color":"Click on the picker to adjust the colour","Mobile Enabled or Not":"Mobile Enabled or Not","Whether to enable the plugin for the mobile client, the default is enabled.":"Whether to enable the plugin for the mobile client, the default is enabled.","Whether to enable on mobile devices with device width less than 768px.":"Whether to enable on mobile devices with device width less than 768px, the default is disable.",Reset:"Reset",Fix:"Fix","Fix Editing Toolbar":"Fix Editing Toolbar",General:"General",Appearance:"Appearance",Commands:"Commands","Choose between fixed position or cursor following mode":"Choose between fixed position, cursor following or Top mode.","Add and manage commands":"Add and manage commands","Choose where Editing Toolbar will append upon regeneration.":"Choose where Editing Toolbar will append upon regeneration.","Whether to enable on mobile devices with device width less than 768px":"Whether to enable on mobile devices with device width less than 768px","Choose between a glass morphism, tiny and default style.":"Choose between a glass morphism, tiny and default style.","Refresh Toolbar":"Refresh Toolbar","Add Command":"Add Command",Settings:"Settings","Position Style":"Position Style",Columns:"Columns","Drag to Adjust Position":"Drag to Adjust Position","Vertical Position":"Vertical Position","Horizontal Position":"Horizontal Position","Toolbar Position":"Toolbar Position","Choose an icon":"Choose an icon","Search for an icon...":"Search for an icon...",All:"All",Obsidian:"Obsidian",Glyph:"Glyph",Custom:"Custom","Choose a command":"Choose a command","The command":"The command","already exists":"already exists","Enter the icon code, format as .... ":"Enter the icon code, format as .... ","No matching icons found":"No matching icons found","Custom Commands":"Custom Commands","Toolbar Commands":"Toolbar Commands",ID:"ID",Prefix:"Prefix",Suffix:"Suffix",Pattern:"Pattern","Custom Format Commands":"Custom Format Commands","Add, edit or delete custom format commands.":"Add, edit or delete custom format commands.",Edit:"Edit","Command ID":"Command ID",'Unique identifier, no spaces, e.g.: "my-custom-format"':'Unique identifier, no spaces, e.g.: "my-custom-format"',"Displayed name in toolbar and menu":"Displayed name in toolbar and menu","Add content before selected text":"Add content before selected text","Add content after selected text":"Add content after selected text","Character offset of cursor after formatting":"Character offset of cursor after formatting","Line offset of cursor after formatting":"Line offset of cursor after formatting","Whether to insert at the beginning of the next line":"Whether to insert at the beginning of the next line","Command icon (click to select)":"Command icon (click to select)","Choose Icon":"Choose Icon",Save:"Save",Cancel:"Cancel","Edit Custom Command":"Edit Custom Command","Add Custom Command":"Add Custom Command","Command ID and command name cannot be empty":"Command ID and command name cannot be empty","Command ID cannot contain spaces":"Command ID cannot contain spaces",'Command ID "${this.commandId}" already exists':'Command ID "${this.commandId}" already exists',"Cursor Position Offset":"Cursor Position Offset","Line Offset":"Line Offset","Line Head Format":"Line Head Format",Icon:"Icon","Command Name":"Command Name","Are you sure you want to restore all settings to default? This will lose all your custom configurations.":"Are you sure you want to restore all settings to default? This will lose all your custom configurations.","Restore default":"Restore default","Restore default settings":"Restore default settings","🔄Restore default settings":"🔄Restore default settings","🔧Data repair":"🔧Data repair","Command IDs have been successfully repaired!":"Command IDs have been successfully repaired!","No command IDs need to be repaired":"No command IDs need to be repaired","Error repairing command IDs, please check the console for details":"Error repairing command IDs, please check the console for details","Error restoring default settings, please check the console for details":"Error restoring default settings, please check the console for details","Successfully restored default settings!":"Successfully restored default settings!",Close:"Close",Tips:"Tips","This update changed the ID of some commands, please click this button to repair the commands to ensure the toolbar works properly":"This update changed the ID of some commands, please click this button to repair the commands to ensure the toolbar works properly","Repair command ID":"Repair command ID","This will reset all your custom configurations":"This will reset all your custom configurations","Notice:":"Notice:","This update rebuilds the entire code, reducing resource consumption":"This update rebuilds the entire code, reducing resource consumption","Optimized mobile usage, added canvas support, and added custom commands":"Optimized mobile usage, added canvas support, and added custom commands","⚠️This update is not compatible with 2.x version command ids, please click [Repair command] to be compatible":"⚠️This update is not compatible with 2.x version command ids, please click [Repair command] to be compatible","⚠️If you want to restore the default settings, please click [Restore default settings]":"⚠️If you want to restore the default settings, please click [Restore default settings]","Please execute a editingToolbar format command first, then enable the format brush":"Please execute a editingToolbar format command first, then enable the format brush","Format brush ON! Select text to apply【":"Format brush ON! Select text to apply【","】format":"】format\nClick the mouse middle or right key to close the formatting-brush","Add to Toolbar":"Add to Toolbar","This command is already in the toolbar.":"This command is already in the toolbar.","Command added to toolbar":"Command added to toolbar","Add this command to the toolbar.":"Add this command to the toolbar.","Callout Type":"Callout Type",Title:"Title","Optional, leave blank for default title":"Optional, leave blank for default title","Input title":"Input title","Collapse State":"Collapse State",Open:"Open",Closed:"Closed",Content:"Content",Insert:"Insert",Default:"Default","Input content":"Input content","Link Text":"Link Text","Link Alias":"Link Alias","Link URL":"Link URL","Embed Content":"Embed Content","Image Size":"Image Size","Insert New Line":"Insert New Line","Paste and Parse":"Paste and Parse","URL Format Error":"URL Format Error","Image Width":"Image Width","Image Height":"Image Height","If it is an image, turn on":"If it is an image, turn on","Insert a link on the next line":"Insert a link on the next line","Link Title(optional)":"Link Title(optional)",Alias:"Alias",Optional:"Optional","Default 0, format will keep the text selected":"Default 0, format will keep the text selected","to insert":"to insert","Latest Changes":"Latest Changes","📋View full changelog":"📋View full changelog","Open changelog":"Open changelog","Loading changelog...":"Loading changelog...","Open the complete changelog in your browser":"Open the complete changelog in your browser","Enable Multiple Configurations":"Enable Multiple Configurations","Enable different command configurations for each position style (following, top, fixed).":"Enable different command configurations for each position style (following, top, fixed).","Currently editing commands for":"Currently editing commands for","position style":"position style","Current Configuration":"Current Configuration","Switch between different command configurations.":"Switch between different command configurations.","Following Style":"Following Style","Top Style":"Top Style","Fixed Style":"Fixed Style","Mobile Style":"Mobile Style",configuration:"configuration","Deploy command to configurations":"Deploy command to configurations","All Configurations":"All Configurations",Deploy:"Deploy","Command deployed to selected configurations":"Command deployed to selected configurations","No configuration selected for deployment":"No configuration selected for deployment","Command already exists in selected configurations":"Command already exists in selected configurations","Command deployed to: ":"Command deployed to: ","Command Deleted.":"Command Deleted.","Confirm Delete?":"Confirm Delete?",Confirm:"Confirm","Are you sure you want to restore all settings to default? But custom commands will be preserved.":"Are you sure you want to restore all settings to default? But custom commands will be preserved.","Successfully restored default settings! (Custom commands preserved)":"Successfully restored default settings! (Custom commands preserved)","This will reset all your custom configurations, but custom commands will be preserved":"This will reset all your custom configurations, but custom commands will be preserved","Import/Export":"Import/Export","Export Configuration":"Export Configuration","Export your toolbar configuration to share with others.":"Export your toolbar configuration to share with others.",Export:"Export","Import Configuration":"Import Configuration","Import toolbar configuration from JSON.":"Import toolbar configuration from JSON.",Import:"Import","Usage Instructions":"Usage Instructions","Export: Generate a JSON configuration that you can save or share.":"Export: Generate a JSON configuration that you can save or share.","Import: Paste a previously exported JSON configuration.":"Import: Paste a previously exported JSON configuration.","You can choose to export all settings, only toolbar commands, or only custom commands":"You can choose to export all settings, only toolbar commands, or only custom commands","When importing, the plugin will only update the settings included in the import data":"When importing, the plugin will only update the settings included in the import data","Warning: Importing configuration will overwrite your current settings. Consider exporting your current configuration first as a backup.":"Warning: Importing configuration will overwrite your current settings. Consider exporting your current configuration first as a backup.","Export Type":"Export Type","Choose what to export":"Choose what to export","All Settings":"All Settings","Toolbar Commands Only":"Toolbar Commands Only","Custom Commands Only":"Custom Commands Only","Export Content":"Export Content","Copy this content to share with others":"Copy this content to share with others","Loading...":"Loading...","Copy to Clipboard":"Copy","Configuration copied to clipboard":"Configuration copied to clipboard","Failed to copy configuration":"Failed to copy configuration","Paste the configuration JSON here":"Paste the configuration JSON here","Paste configuration here...":"Paste configuration here...","Invalid import data":"Invalid import data","Configuration imported successfully":"Configuration imported successfully","No valid configuration found in import data":"No valid configuration found in import data","Failed to import configuration. Invalid format.":"Failed to import configuration. Invalid format.","Import Mode":"Import Mode","Choose how to import the configuration":"Choose how to import the configuration","Update Mode (Add new items and update existing ones)":"Update Mode (Add new items and update existing ones)","Overwrite Mode (Replace all settings with imported ones)":"Overwrite Mode (Replace all settings with imported ones)","Configuration imported successfully (Overwrite mode)":"Configuration imported successfully (Overwrite mode)","Configuration imported successfully (Update mode)":"Configuration imported successfully (Update mode)","Warning: Overwrite mode will completely replace your current settings with the imported ones. Consider exporting your current configuration first as a backup.":"Warning: Overwrite mode will completely replace your current settings with the imported ones. Consider exporting your current configuration first as a backup.","Warning: Update mode will add new items and update existing ones based on the imported configuration.":"Warning: Update mode will add new items and update existing ones based on the imported configuration.","Add Format Command":"Add Format Command",Regex:"Regex","Prefix/Suffix":"Prefix/Suffix","Insert Special Char":"Insert Special Char","Add Regex Command":"Add Regex Command","Switch Regex Command Window":"Switch Regex Command Window","Please select text first":"Please select text first","The selected text does not meet the condition requirements":"The selected text does not meet the condition requirements","Regex command execution error: ":"Regex command execution error: ","Copy code":"Copy code","Copied!":"Copied!","Explain the syntax of JavaScript regular expressions":"Explain the syntax of JavaScript regular expressions","Apply regular expression replacement":"Apply regular expression replacement","Conditional matching":"Conditional matching","Complete regular expression code (copy to AI for explanation)":"Complete regular expression code (copy to AI for explanation)","Error: ":"Error: ","Regex pattern cannot be empty":"Regex pattern cannot be empty","Command already exists":"Command already exists","Choose icon":"Choose icon","URL to Markdown link":"URL to Markdown link","Convert MM/DD/YYYY to YYYY-MM-DD":"Convert MM/DD/YYYY to YYYY-MM-DD","Add bold to keywords":"Add bold to keywords","Format phone number":"Format phone number","Remove extra spaces":"Remove extra spaces","Convert HTML bold tags to Markdown format":"Convert HTML bold tags to Markdown format","Convert quoted text to quote block":"Convert quoted text to quote block","Convert CSV to Markdown table row":"Convert CSV to Markdown table row","Add uniform alias to Markdown links":"Add uniform alias to Markdown links","Delete empty lines (multiline mode)":"Delete empty lines (multiline mode)","Add list symbol to each line (multiline mode)":"Add list symbol to each line (multiline mode)","If the text contains important, set the text highlight (conditional format)":"If the text contains important, set the text highlight (conditional format)","Matching pattern":"Matching pattern","Regex pattern to match":"Regex pattern to match","Replacement pattern (use $1, $2, etc. to reference capture groups)":"Replacement pattern (use $1, $2, etc. to reference capture groups)","Ignore case":"Ignore case","Global replace":"Global replace","Multiline mode":"Multiline mode","Use condition":"Use condition","Condition pattern":"Condition pattern","Only apply custom command when text matches the condition":"Only apply custom command when text matches the condition","Must exist regular expression or text":"Must exist regular expression or text","Replacement pattern":"Replacement pattern","Match case-insensitive":"Match case-insensitive","^ and $ match the start and end of each line":"^ and $ match the start and end of each line","Replace all matches":"Replace all matches",Command:"Command","Input example text to view the formatting effect of the command...":"Input example text to view the formatting effect of the command...",Description:"Description","[Example]":"[Example]","[Requirements]":"[Requirements]","[Output]":"[Output]","AI question template:":"AI question template:","I need to convert the url to a markdown format link":"I need to convert the url to a markdown format link","For example, convert https://example.com to [https://example.com](https://example.com)":"For example, convert https://example.com to [https://example.com](https://example.com)","Use js regular expression to implement, and output the parameters in the following format (the result does not need to be escaped with json)":"Use js regular expression to implement, and output the parameters in the following format (the result does not need to be escaped with json)","[Description]":"[Description]","How to use AI to get regular expressions?":"How to use AI to get regular expressions?","Regular expression examples":"Regular expression examples","Edit regular expression command":"Edit regular expression command","Add regular expression command":"Add regular expression command","Result: ":"Result: ","Example text:":"Example text:",Preview:"Preview",Result:"Result","Please select text or copy text to clipboard first":"Please select text or copy text to clipboard first","Overwrite Import":"Overwrite Import","Update Import":"Update Import","Importing configuration...":"Importing configuration...","Following Style Only":"Following Style Only","Top Style Only":"Top Style Only","Fixed Style Only":"Fixed Style Only","Mobile Style Only":"Mobile Style Only","Unknown import type":"Unknown import type","All Toolbar Commands":"All Toolbar Commands","Initialize Commands":"Initialize Commands","Copy commands from the main menu configuration":"Copy commands from the main menu configuration","Initialize commands to default settings":"Initialize commands to default settings","Reset Commands":"Reset Commands","Commands reset successfully":"Commands reset successfully","Following style commands initialized from current menu commands":"Following style commands initialized from current menu commands","Commands initialized successfully":"Commands initialized successfully","Reset to Menu Commands":"Reset to Menu Commands","Are you sure you want to reset the current configuration?":"Are you sure you want to reset the current configuration?","Following style commands successfully initialized":"Following style commands successfully initialized","Top style commands successfully initialized":"Top style commands successfully initialized","Fixed style commands successfully initialized":"Fixed style commands successfully initialized","Mobile style commands successfully initialized":"Mobile style commands successfully initialized","Reset commands to default settings":"Reset commands to default settings",Clear:"Clear","Remove all commands from this configuration.":"Remove all commands from this configuration.","Are you sure you want to clear all commands under the current style?":"Are you sure you want to clear all commands under the current style?","Current style commands have been cleared":"Current style commands have been cleared","Manage Commands":"Manage Commands","Reset or clear all commands in this configuration":"Reset or clear all commands in this configuration","One-click Clear":"One-click Clear","Import Commands from Other Styles":"Import Commands from Other Styles","Copy commands from another style configuration.":"Copy commands from another style configuration.","Main menu only":"Main menu only","This import will update:":"This import will update:","Custom commands":"Custom commands","Toolbar commands":"Toolbar commands","General settings":"General settings","Please paste configuration data first":"Please paste configuration data first","Invalid import data format":"Invalid import data format","Import From":"Import From","This import will:":"This import will:","Update general settings":"Update general settings","Update Main Menu Commands":"Update Main Menu Commands","Update Custom Commands":"Update Custom Commands","Update Following Style Commands":"Update Following Style Commands","Update Top Style Commands":"Update Top Style Commands","Update Fixed Style Commands":"Update Fixed Style Commands","Update Mobile Style Commands":"Update Mobile Style Commands","Clear all Main Menu Commands":"Clear all Main Menu Commands","Clear all Custom Commands":"Clear all Custom Commands","Clear all Following Style Commands":"Clear all Following Style Commands","Clear all Top Style Commands":"Clear all Top Style Commands","Clear all Fixed Style Commands":"Clear all Fixed Style Commands","Clear all Mobile Style Commands":"Clear all Mobile Style Commands","Overwrite Mode (Replace settings with imported ones)":"Overwrite Mode (Replace settings with imported ones)","Warning: Overwrite mode will replace existing settings with imported ones.":"Warning: Overwrite mode will replace existing settings with imported ones.","Warning: Update mode will add new items and update existing ones.":"Warning: Update mode will add new items and update existing ones.","Enable Multiple Config":"Enable Multiple Config","Set Multiple Config to:":"Set Multiple Config to:",Enable:"Enable",Disable:"Disable","Set Position Style to:":"Set Position Style to:",Following:"Following",Top:"Top",Fixed:"Fixed",Mobile:"Mobile","All commands":"All commands","⚠️ Overwrite mode will replace existing settings with imported ones.":"⚠️ Overwrite mode will replace existing settings with imported ones.","ℹ️ Update mode will merge imported settings with existing ones.":"ℹ️ Update mode will merge imported settings with existing ones.","Do you want to continue?":"Do you want to continue?","Imported settings:":"Imported settings:","Imported commands:":"Imported commands:","Disable toolbar for this view":"Disable toolbar for this view","Enable toolbar for this view":"Enable toolbar for this view","Manage all view types":"Manage all view types","Current View: ":"Current View: ","Appearance Style":"Appearance Style","Position Settings":"Position Settings","All commands have been removed.":"All commands have been removed.","Join the Community":"Join the Community","Share your toolbar settings and styles in our":"Share your toolbar settings and styles in our","Get inspired by what others have created or showcase your own customizations.":"Get inspired by what others have created or showcase your own customisations.","Toolbar Preview (With a hypothetical command configuration.)":"Toolbar Preview (With a hypothetical command configuration.)","Toolbar Theme":"Toolbar Theme","Select a preset toolbar theme, automatically setting the background color, icon color, and size for the selected style.":"Select a preset toolbar theme, automatically setting the background colour, icon colour, and size for the selected style.","Toolbar Background Color":"Toolbar Background Colour","Set the background color of the toolbar.":"Set the background colour of the toolbar.","Toolbar Icon Color":"Toolbar Icon Colour","Set the color of the toolbar icon.":"Set the colour of the toolbar icon.","Toolbar Icon Size":"Toolbar Icon Size","Set the size of the toolbar icon (px); default: 18px":"Set the size of the toolbar icon (px); default: 18px","Custom Theme":"Custom Theme","Fixed Position Offset":"Fixed Position Offset","Choose the offset of the Editing Toolbar in the fixed position.":"Choose the offset of the Editing Toolbar in the fixed position.","Renumber List":"Renumber List","Fetch Remote Title":"Fetch Remote Title","Please enter a URL first":"Please enter a URL first","Failed to fetch title for":"Failed to fetch title for","Link Title (optional)":"Link Title (optional)","Unable to detect editor width":"Unable to detect editor width","Fit Editor Width":"Fit Editor Width","Please execute a format command or select format text first, then enable the format brush":"Please execute a format command or select format text first, then enable the format brush","Use \\n to represent line breaks":"Use \\n to represent line breaks","Use ↵ to represent line breaks":"Use ↵ to represent line breaks","Top Toolbar":"Top Toolbar","Enable the toolbar positioned at the top.":"Enable the toolbar positioned at the top.","Following Toolbar":"Following Toolbar","Enable the toolbar that appears upon text selection.":"Enable the toolbar that appears upon text selection.","Fixed Toolbar":"Fixed Toolbar","Enable the toolbar whose position may be fixed where you please.":"Enable the toolbar whose position may be fixed where you please.","Toolbar Settings":"Toolbar Settings","Choose which toolbar style's appearance you want to edit.":"Choose which toolbar style's appearance you want to edit.","Vertical Split":"Vertical Split"},es:{},fr:{},hi:{},id:{},it:{},ja:{},ko:{},nl:{},nn:{},pl:{},pt:{},"pt-br":{"Editing Toolbar Append Method":"Método de Inserção da Barra de Ferramentas","Choose where Editing Toolbar will append upon regeneration. To see the change, hit the refresh button below, or in the status bar menu.":"Escolha onde a Barra de Ferramentas será inserida ao regenerar. Para ver a alteração, clique no botão de atualização abaixo, ou no menu da barra de status.","Editing Toolbar aesthetic":"Estilo da Barra de Ferramentas","Choose between a glass morphism, tiny and default style for Editing Toolbar. To see the change, hit the refresh button below, or in the status bar menu.":"Escolha entre um estilo de vidro, pequeno e padrão para a Barra de Ferramentas. Para ver a alteração, clique no botão de atualização abaixo, ou no menu da barra de status.","Editing Toolbar position":"Posição da Barra de Ferramentas","Choose between fixed position or cursor following mode.":"Escolha entre posição fixa ou modo contextual.","Editing Toolbar Columns":"Colunas da Barra de Ferramentas","Choose the number of columns per row to display on Editing Toolbar.":"Escolha o número de colunas por linha para exibir na Barra de Ferramentas.","Editing Toolbar refresh":"Atualizar Barra de Ferramentas","Editing Toolbar Commands":"Comandos da Barra de Ferramentas","Add a command onto Editing Toolbar from Obsidian's commands library. To reorder the commands, drag and drop the command items. To delete them, use the delete buttom to the right of the command item. Editing Toolbar will not automaticaly refresh after reordering commands. Use the refresh button above.":"Adicione um comando na Barra de Ferramentas a partir da biblioteca de comandos do Obsidian. Para reordenar os comandos, arraste e solte os itens do comando. Para deletar, use o botão de deletar à direita do item do comando. A Barra de Ferramentas não atualizará automaticamente após reordenar os comandos. Use o botão de atualização acima.","Format Brush Off!":"Pincel de formatação desligado!","Hide & Show":"Ocultar & Mostrar","Editing Toolbar will only refresh automatically after you have either added or deleted a command from it. To see UI changes to editingToolbar (above settings changes) use the refresh button. If you forget to refresh in settings, no worries. There is also a refresh button in the editingToolbar status bar menu.":"A barra de edição só atualizará automaticamente após você ter adicionado ou deletado um comando dela. Para ver as alterações na interface do editingToolbar (alterações acima das configurações) use o botão de atualização. Se você esquecer de atualizar nas configurações, não se preocupe. Também há um botão de atualização na barra de status da Barra de Edição.","Font-Color formatting brush ON!":"Pincel de cor da fonte ativado!",More:"Mais","Font Colors":"Cores de Texto","Format Brush":"Pincel de formatação","Background Color":"Cor de Fundo",Refresh:"Atualizar",Add:"Adicionar",Delete:"Deletar","Change Command Name":"Alterar Nome do Comando","Add Submenu":"Adicionar Submenu","Add Separator":"Adicionar Separador","Enter the icon code, it looks like .... format":"Digite o código do ícone, parece com o formato .... ","Please enter a new name: ":"Por favor, digite um novo nome: ","Drag the slider to move the position":"Arraste o slider para mover a posição","Plugin Settings":"Configurações do Plugin","Background-color formatting brush ON!":"Pincel de cor de fundo ativado!\nClique com o botão do meio ou direito do mouse para sair do modo.","Clear formatting brush ON!":"Pincel de formatação ativado!","Clear formatting brush ON!\nClick the mouse middle or right key to close the formatting-brush":"Pincel de formatação ativado!\nClique com o botão do meio ou direito do mouse para sair do modo de formatação.","The toolbar is displayed when the mouse moves over it, otherwise it is automatically hidden":"A barra de ferramentas é exibida quando o mouse passa por cima dela, caso contrário, ela é automaticamente oculta.","Editing Toolbar Auto-hide":"Auto-ocultação da Barra de Ferramentas","Editing Toolbar Centred Display":"Exibição Centralizada da Barra de Ferramentas","Whether the toolbar is centred or full-width, the default is full-width.":"Define se a barra de ferramentas é centralizada ou ocupa toda a largura. O padrão é largura completa.","Custom Backgroud Color":"Cor de Fundo Personalizada","Custom Font Color":"Cor de Texto Personalizada","🎨 Set Custom Background":"🎨 Definir Cor de Fundo Personalizada","🖌️ Set Custom Font Color":"🖌️ Definir Cor de Texto Personalizada","Click on the picker to adjust the color":"Clique no seletor para ajustar a cor","Mobile Enabled or Not":"Habilitar em dispositivos móveis","Whether to enable the plugin for the mobile client, the default is enabled.":"Habilitar o plugin para dispositivos móveis, o padrão é habilitado.","Whether to enable on mobile devices with device width less than 768px.":"Habilitar o plugin para dispositivos móveis com largura de dispositivo menor que 768px, o padrão é desabilitado.",Reset:"Reiniciar",Fix:"Ajustar","Fix Editing Toolbar":"Ajustar Barra de Ferramentas",General:"Geral",Appearance:"Aparência",Commands:"Comandos","Choose between fixed position or cursor following mode":"Escolha entre posição fixa ou modo contextual.","Add and manage commands":"Adicionar e gerenciar comandos","Choose where Editing Toolbar will append upon regeneration.":"Escolha onde a Barra de Ferramentas será inserida ao regenerar.","Whether to enable on mobile devices with device width less than 768px":"Habilitar o plugin para dispositivos móveis com largura de dispositivo menor que 768px","Choose between a glass morphism, tiny and default style.":"Escolha entre um estilo de vidro, pequeno e padrão.","Refresh Toolbar":"Atualizar Barra de Ferramentas","Add Command":"Adicionar Comando",Settings:"Configurações","Position Style":"Estilo de Posição",Columns:"Colunas","Drag to Adjust Position":"Arraste para ajustar a posição","Vertical Position":"Posição Vertical","Horizontal Position":"Posição Horizontal","Toolbar Position":"Posição da Barra de Ferramentas","Choose an icon":"Escolha um ícone","Search for an icon...":"Pesquisar por um ícone...",All:"Todos",Obsidian:"Obsidian",Glyph:"Ícone",Custom:"Personalizado","Choose a command":"Escolha um comando","The command":"O comando","already exists":"já existe","Enter the icon code, format as .... ":"Digite o código do ícone, formato como .... ","No matching icons found":"Nenhum ícone correspondente encontrado","Custom Commands":"Comandos Personalizados","Toolbar Commands":"Comandos da Barra de Ferramentas",ID:"ID",Prefix:"Prefixo",Suffix:"Sufixo",Pattern:"Padrão","Custom Format Commands":"Comandos de Formatação Personalizados","Add, edit or delete custom format commands.":"Adicionar, editar ou deletar comandos de formatação personalizados.",Edit:"Editar","Command ID":"ID do Comando",'Unique identifier, no spaces, e.g.: "my-custom-format"':'Identificador único, sem espaços, exemplo: "meu-comando-personalizado"',"Displayed name in toolbar and menu":"Nome exibido na barra de ferramentas e menu","Add content before selected text":"Adicionar conteúdo antes do texto selecionado","Add content after selected text":"Adicionar conteúdo depois do texto selecionado","Character offset of cursor after formatting":"Deslocamento do cursor após a formatação","Line offset of cursor after formatting":"Deslocamento da linha do cursor após a formatação","Whether to insert at the beginning of the next line":"Inserir no início da próxima linha","Command icon (click to select)":"Ícone do comando (clique para selecionar)","Choose Icon":"Escolha um ícone",Save:"Salvar",Cancel:"Cancelar","Edit Custom Command":"Editar Comando Personalizado","Add Custom Command":"Adicionar Comando Personalizado","Command ID and command name cannot be empty":"ID do Comando e nome do comando não podem ser vazios","Command ID cannot contain spaces":"ID do Comando não pode conter espaços",'Command ID "${this.commandId}" already exists':'ID do Comando "${this.commandId}" já existe',"Cursor Position Offset":"Deslocamento do cursor","Line Offset":"Deslocamento da linha","Line Head Format":"Formatação de linha inicial",Icon:"Ícone","Command Name":"Nome do Comando","Are you sure you want to restore all settings to default? This will lose all your custom configurations.":"Tem certeza que deseja restaurar todas as configurações para a configuração padrão? Isso irá apagar todas as suas configurações personalizadas.","Restore default":"Restaurar padrão","Restore default settings":"Restaurar configurações padrão","🔄Restore default settings":"🔄Restaurar configurações padrão","🔧Data repair":"🔧Reparar dados","Command IDs have been successfully repaired!":"IDs de comando foram reparadas com sucesso!","No command IDs need to be repaired":"Nenhuma ID de comando precisa ser reparada","Error repairing command IDs, please check the console for details":"Erro ao reparar IDs de comando, por favor verifique o console para mais detalhes","Error restoring default settings, please check the console for details":"Erro ao restaurar configurações padrão, por favor verifique o console para mais detalhes","Successfully restored default settings!":"Configurações padrão restauradas com sucesso!",Close:"Fechar",Tips:"Dicas","This update changed the ID of some commands, please click this button to repair the commands to ensure the toolbar works properly":"Esta atualização alterou o ID de alguns comandos. Clique neste botão para repará-los e garantir que a barra de ferramentas funcione corretamente.","Repair command ID":"Reparar ID do Comando","This will reset all your custom configurations":"Isso irá resetar todas as suas configurações personalizadas","Notice:":"Nota:","This update rebuilds the entire code, reducing resource consumption":"Esta atualização recompila todo o código, reduzindo o consumo de recursos","Optimized mobile usage, added canvas support, and added custom commands":"Otimizado para uso em dispositivos móveis, adicionando suporte para o canvas e adicionado comandos personalizados","⚠️This update is not compatible with 2.x version command ids, please click [Repair command] to be compatible":"⚠️Esta atualização não é compatível com IDs de comando da versão 2.x. Clique em [Reparar comando] para corrigir a compatibilidade.","⚠️If you want to restore the default settings, please click [Restore default settings]":"⚠️Se você quiser restaurar as configurações padrão, por favor clique em [Restaurar configurações padrão].","Please execute a editingToolbar format command first, then enable the format brush":"Execute um comando de formatação da barra de edição antes de ativar o pincel de formatação.","Format brush ON! Select text to apply【":"Pincel de formatação ativado! Selecione o texto para aplicar【","】format":"】\nClique com o botão do meio ou direito do mouse para sair do modo de formatação.","Add to Toolbar":"Adicionar à Barra de Edição","This command is already in the toolbar.":"Este comando já está na barra de ferramentas.","Command added to toolbar":"Comando adicionado à barra de ferramentas","Add this command to the toolbar.":"Adicionar este comando à barra de ferramentas.","Callout Type":"Tipo de Callout",Title:"Título","Optional, leave blank for default title":"Opcional, deixe em branco para o título padrão","Input title":"Digite o título","Collapse State":"Estado de Colapso",Open:"Abrir",Closed:"Fechado",Content:"Conteúdo",Insert:"Inserir",Default:"Padrão","Input content":"Digite o conteúdo","Link Text":"Texto do Link","Link Alias":"Alias do Link","Link URL":"URL do Link","Embed Content":"Conteúdo Embutido","Image Size":"Tamanho da Imagem","Insert New Line":"Inserir Nova Linha","Paste and Parse":"Colar e Analisar","URL Format Error":"Erro de Formato de URL","Image Width":"Largura da Imagem","Image Height":"Altura da Imagem","If it is an image, turn on":"Se for uma imagem, ative","Insert a link on the next line":"Inserir um link na próxima linha","Link Title(optional)":"Título do Link(opcional)",Alias:"Alias",Optional:"Opcional","Default 0, format will keep the text selected":"Padrão 0, o formato manterá o texto selecionado","to insert":"para inserir","Latest Changes":"Últimas Alterações","📋View full changelog":"📋Ver o registro de alterações completo","Open changelog":"Abrir registro de alterações","Loading changelog...":"Carregando registro de alterações...","Open the complete changelog in your browser":"Abrir o registro de alterações completo no seu navegador","Enable Multiple Configurations":"Habilitar Múltiplas Configurações","Enable different command configurations for each position style (following, top, fixed).":"Habilitar configurações de comandos diferentes para cada modo de posição (following, top, fixed).","Currently editing commands for":"Atualmente editando comandos para","position style":"estilo de posição","Current Configuration":"Configuração Atual","Switch between different command configurations.":"Trocar entre configurações de comando diferentes.","Following Style":"Estilo Contextual","Top Style":"Estilo de Topo","Fixed Style":"Estilo Fixo","Mobile Style":"Estilo Mobile",configuration:"configuração","Deploy command to configurations":"Implantar comando para configurações","All Configurations":"Todas as Configurações",Deploy:"Implantar","Command deployed to selected configurations":"Comando implantado para configurações selecionadas","No configuration selected for deployment":"Nenhuma configuração selecionada para implantação","Command already exists in selected configurations":"Comando já existe nas configurações selecionadas","Command deployed to: ":"Comando implantado para: ","Command Deleted":"Comando Deletado","Confirm Delete?":"Confirmar Deleção?",Confirm:"Confirmar","Are you sure you want to restore all settings to default? But custom commands will be preserved.":"Tem certeza que deseja restaurar todas as configurações para a configuração padrão? Mas os comandos personalizados serão preservados.","Successfully restored default settings! (Custom commands preserved)":"Configurações padrão restauradas com sucesso! (Comandos personalizados preservados)","This will reset all your custom configurations, but custom commands will be preserved":"Isso redefinirá todas as suas configurações personalizadas, mas os comandos personalizados serão preservados.","Import/Export":"Importar/Exportar","Export Configuration":"Exportar Configuração","Export your toolbar configuration to share with others.":"Exportar sua configuração da barra de ferramentas para compartilhar com outros.",Export:"Exportar","Import Configuration":"Configuração de Importação","Import toolbar configuration from JSON.":"Importar configuração da barra de ferramentas em formato JSON.",Import:"Importar","Usage Instructions":"Instruções de Uso","Export: Generate a JSON configuration that you can save or share.":"Exportar: Gerar uma configuração em formato JSON para salvar ou compartilhar.","Import: Paste a previously exported JSON configuration.":"Importar: Colar uma configuração em formato JSON exportada anteriormente.","You can choose to export all settings, only toolbar commands, or only custom commands":"Você pode escolher exportar todas as configurações, apenas comandos da barra de ferramentas, ou apenas comandos personalizados","When importing, the plugin will only update the settings included in the import data":"Ao importar, o plugin irá atualizar apenas as configurações incluídas nos dados de importação","Warning: Importing configuration will overwrite your current settings. Consider exporting your current configuration first as a backup.":"Aviso: A importação de configuração irá sobrescrever suas configurações atuais. Considere exportar sua configuração atual primeiro como backup.","Export Type":"Tipo de Exportação","Choose what to export":"Escolha o que exportar","All Settings":"Todas as Configurações","Toolbar Commands Only":"Apenas Comandos da Barra de Ferramentas","Custom Commands Only":"Apenas Comandos Personalizados","Export Content":"Conteúdo de Exportação","Copy this content to share with others":"Copiar este conteúdo para compartilhar com outros","Loading...":"Carregando...","Copy to Clipboard":"Copiar para a área de transferência","Configuration copied to clipboard":"Configuração copiada para a área de transferência","Failed to copy configuration":"Falha ao copiar configuração","Paste the configuration JSON here":"Colar a configuração JSON aqui","Paste configuration here...":"Colar configuração aqui...","Invalid import data":"Dados de importação inválidos","Configuration imported successfully":"Configuração importada com sucesso","No valid configuration found in import data":"Nenhuma configuração válida encontrada nos dados de importação","Failed to import configuration. Invalid format.":"Falha ao importar configuração. Formato inválido.","Import Mode":"Modo de Importação","Choose how to import the configuration":"Escolha como importar a configuração","Update Mode (Add new items and update existing ones)":"Modo de Atualização (Adicionar novos itens e atualizar os existentes)","Overwrite Mode (Replace all settings with imported ones)":"Modo de Sobrescrever (Substituir todas as configurações com as importadas)","Configuration imported successfully (Overwrite mode)":"Configuração importada com sucesso (Modo de Sobrescrever)","Configuration imported successfully (Update mode)":"Configuração importada com sucesso (Modo de Atualização)","Warning: Overwrite mode will completely replace your current settings with the imported ones. Consider exporting your current configuration first as a backup.":"Aviso: O modo de sobrescrever irá substituir todas as suas configurações atuais com as importadas. Considere exportar sua configuração atual primeiro como backup.","Warning: Update mode will add new items and update existing ones based on the imported configuration.":"Aviso: O modo de atualização irá adicionar novos itens e atualizar os existentes com base na configuração importada.","Add Format Command":"Adicionar formatação",Regex:"Regex","Prefix/Suffix":"Prefixo/Sufixo","Insert Special Char":"Inserir Caractere Especial","Add Regex Command":"Adicionar regex","Switch Regex Command Window":"Trocar para Janela de Comando de Regex","Please select text first":"Por favor selecione o texto primeiro","Current line is empty, please select text or move to a non-empty line":"A linha atual está vazia, por favor selecione o texto ou mova para uma linha não vazia","Use current line for regex commands":"Usar a linha atual para comandos de regex","When no text is selected, regex commands will use the current line instead of clipboard content":"Quando não houver texto selecionado, comandos de regex usarão a linha atual em vez do conteúdo da área de transferência","The selected text does not meet the condition requirements":"O texto selecionado não atende aos requisitos da condição","Regex command execution error: ":"Erro ao executar comando de regex: ","Copy code":"Copiar código","Copied!":"Copiado!","Explain the syntax of JavaScript regular expressions":"Explicar a sintaxe das expressões regulares em JavaScript","Apply regular expression replacement":"Aplicar substituição de expressão regular","Conditional matching":"Ocorrência Condicional","Complete regular expression code (copy to AI for explanation)":"Código de expressão regular completo (copiar para explicação com IA)","Error: ":"Erro: ","Regex pattern cannot be empty":"Padrão de regex não pode estar vazio","Command already exists":"Comando já existe","Choose icon":"Escolha um ícone","URL to Markdown link":"URL para Link Markdown","Convert MM/DD/YYYY to YYYY-MM-DD":"Converter MM/DD/YYYY para YYYY-MM-DD","Add bold to keywords":"Adicionar negrito a palavras-chave","Format phone number":"Formatar número de telefone","Remove extra spaces":"Remover espaços extra","Convert HTML bold tags to Markdown format":"Converter tags HTML de negrito para negrito em Markdown","Convert quoted text to quote block":"Converter texto citado para bloco de citação","Convert CSV to Markdown table row":"Converter CSV para linha de tabela Markdown","Add uniform alias to Markdown links":"Adicionar um alias uniforme aos links Markdown","Delete empty lines (multiline mode)":"Deletar linhas vazias (modo multilinha)","Add list symbol to each line (multiline mode)":"Adicionar símbolo de lista a cada linha (modo multilinha)","If the text contains important, set the text highlight (conditional format)":'Se o texto contiver "importante", aplicar destaque ao texto (formatação condicional)',"Matching pattern":"Padrão de correspondência","Regex pattern to match":"Padrão de regex a ser correspondido","Replacement pattern (use $1, $2, etc. to reference capture groups)":"Padrão de substituição (use $1, $2, etc. para referenciar grupos de captura)","Ignore case":"Ignorar maiúsculas e minúsculas","Global replace":"Substituir globalmente","Multiline mode":"Modo multilinha","Use condition":"Usar condição","Condition pattern":"Padrão de condição","Only apply custom command when text matches the condition":"Aplicar o comando personalizado apenas quando o texto corresponder à condição","Must exist regular expression or text":"Deve existir expressão regular ou texto","Replacement pattern":"Padrão de substituição","Match case-insensitive":"Ignorar maiúsculas e minúsculas","^ and $ match the start and end of each line":"^ e $ correspondem ao início e ao fim de cada linha","Replace all matches":"Substituir todas as ocorrências",Command:"Comando","Input example text to view the formatting effect of the command...":"Digite um texto de exemplo para visualizar o efeito do comando...",Description:"Descrição","[Example]":"[Exemplo]","[Requirements]":"[Requisitos]","[Output]":"[Saída]","AI question template:":"Modelo de pergunta para IA:","I need to convert the url to a markdown format link":"Preciso converter a URL para um link no formato Markdown","For example, convert https://example.com to [https://example.com](https://example.com)":"Por exemplo, converter https://exemplo.com para [https://exemplo.com](https://exemplo.com)","Use js regular expression to implement, and output the parameters in the following format (the result does not need to be escaped with json)":"Usar expressões regulares em JavaScript para implementar e gerar os parâmetros no formato abaixo (o resultado não precisa ser escapado em JSON).","[Description]":"[Descrição]","How to use AI to get regular expressions?":"Como usar IA para obter expressões regulares?","Regular expression examples":"Exemplos de expressões regulares","Edit regular expression command":"Editar comando de expressão regular","Add regular expression command":"Adicionar comando de expressão regular","Result: ":"Resultado: ","Example text:":"Texto de exemplo:",Preview:"Visualizar",Result:"Resultado","Please select text or copy text to clipboard first":"Por favor selecione o texto ou copie o texto para a área de transferência primeiro","Overwrite Import":"Sobrescrever Importação","Update Import":"Atualizar Importação","Importing configuration...":"Importando configuração...","Following Style Only":"Disponível apenas no modo contextual","Top Style Only":"Disponível apenas no modo de topo","Fixed Style Only":"Disponível apenas no modo fixo","Mobile Style Only":"Disponível apenas no modo mobile","Unknown import type":"Tipo de importação desconhecido","All Toolbar Commands":"Todos os Comandos da Barra de Ferramentas","Initialize Commands":"Inicializar Comandos","Copy commands from the main menu configuration":"Copiar comandos do menu principal","Initialize commands to default settings":"Inicializar comandos para configurações padrão","Reset Commands":"Resetar Comandos","Commands reset successfully":"Comandos resetados com sucesso","Following style commands initialized from current menu commands":"Comandos de estilo contextual inicializados a partir dos comandos do menu principal","Commands initialized successfully":"Comandos inicializados com sucesso","Reset to Menu Commands":"Resetar para Comandos do Menu","Are you sure you want to reset the current configuration?":"Tem certeza que deseja resetar a configuração atual?","Following style commands successfully initialized":"Comandos de estilo contextual inicializados com sucesso","Top style commands successfully initialized":"Comandos de estilo de topo inicializados com sucesso","Fixed style commands successfully initialized":"Comandos de estilo fixo inicializados com sucesso","Mobile style commands successfully initialized":"Comandos de estilo mobile inicializados com sucesso","Reset commands to default settings":"Resetar comandos para configurações padrão",Clear:"Limpar","Remove all commands from this configuration.":"Remover todos os comandos desta configuração.","Are you sure you want to clear all commands under the current style?":"Tem certeza que deseja limpar todos os comandos sob o estilo atual?","Current style commands have been cleared":"Comandos do estilo atual foram limpos","Manage Commands":"Gerenciar Comandos","Reset or clear all commands in this configuration":"Resetar ou limpar todos os comandos nesta configuração","One-click Clear":"Limpar com um clique","Import Commands from Other Styles":"Importar Comandos de Outros Estilos","Copy commands from another style configuration.":"Copiar comandos de outra configuração de estilo.","Main menu only":"Apenas para o menu principal","This import will update:":"Esta importação irá atualizar:","Custom commands":"Comandos Personalizados","Toolbar commands":"Comandos da Barra de Ferramentas","General settings":"Configurações Gerais","Please paste configuration data first":"Por favor coloque os dados da configuração primeiro","Invalid import data format":"Formato de dados de importação inválido","Import From":"Importar de","This import will:":"Esta importação irá:","Update general settings":"Atualizar configurações gerais","Update Main Menu Commands":"Atualizar Comandos do Menu Principal","Update Custom Commands":"Atualizar Comandos Personalizados","Update Following Style Commands":"Atualizar Comandos de Estilo Contextual","Update Top Style Commands":"Atualizar Comandos de Estilo de Topo","Update Fixed Style Commands":"Atualizar Comandos de Estilo Fixo","Update Mobile Style Commands":"Atualizar Comandos de Estilo Mobile","Clear all Main Menu Commands":"Limpar todos os Comandos do Menu Principal","Clear all Custom Commands":"Limpar todos os Comandos Personalizados","Clear all Following Style Commands":"Limpar todos os Comandos de Estilo Contextual","Clear all Top Style Commands":"Limpar todos os Comandos de Estilo de Topo","Clear all Fixed Style Commands":"Limpar todos os Comandos de Estilo Fixo","Clear all Mobile Style Commands":"Limpar todos os Comandos de Estilo Mobile","Overwrite Mode (Replace settings with imported ones)":"Modo de Sobrescrever (Substituir configurações com as importadas)","Warning: Overwrite mode will replace existing settings with imported ones.":"Aviso: O modo de sobrescrever irá substituir todas as suas configurações atuais com as importadas.","Warning: Update mode will add new items and update existing ones.":"Aviso: O modo de atualização irá adicionar novos itens e atualizar os existentes com base na configuração importada.","Enable Multiple Config":"Habilitar Múltiplas Configurações","Set Multiple Config to:":"Definir Múltiplas Configurações para:",Enable:"Habilitar",Disable:"Desabilitar","Set Position Style to:":"Definir Estilo de Posição para:",Following:"Contextual",Top:"Topo",Fixed:"Fixo",Mobile:"Mobile","All commands":"Todos os Comandos","⚠️ Overwrite mode will replace existing settings with imported ones.":"⚠️ O modo de sobrescrever irá substituir todas as suas configurações atuais com as importadas.","ℹ️ Update mode will merge imported settings with existing ones.":"ℹ️ O modo de atualização irá adicionar novos itens e atualizar os existentes com base na configuração importada.","Do you want to continue?":"Deseja continuar?","Imported settings:":"Configurações importadas:","Imported commands:":"Comandos importados:","Disable toolbar for this view":"Desabilitar barra de ferramentas para esta visualização","Enable toolbar for this view":"Habilitar barra de ferramentas para esta visualização","Manage all view types":"Gerenciar todos os tipos de visualização","Current View: ":"Visualização Atual: ","Appearance Style":"Estilo de Aparência","Position Settings":"Configurações de Posição","All commands have been removed.":"Todos os comandos foram removidos.","Join the Community":"Juntar-se à Comunidade","Share your toolbar settings and styles in our":"Compartilhe suas configurações e estilos da barra de ferramentas em nossa","Get inspired by what others have created or showcase your own customizations.":"Inspire-se com o que outros criaram ou mostre suas próprias personalizações.","Toolbar Preview (With a hypothetical command configuration.)":"Visualização da barra de ferramentas (com uma configuração de comandos hipotética).","Toolbar Theme":"Estilo da Barra de Ferramentas","Select a preset toolbar theme, automatically setting the background color, icon color, and size for the selected style.":"Selecione um estilo de barra de ferramentas pré-definido, automaticamente definindo a cor de fundo, cor do ícone e tamanho para o estilo selecionado.","Toolbar Background Color":"Cor de Fundo da Barra de Ferramentas","Set the background color of the toolbar.":"Definir a cor de fundo da barra de ferramentas.","Toolbar Icon Color":"Cor do Ícone da Barra de Ferramentas","Set the color of the toolbar icon.":"Definir a cor do ícone da barra de ferramentas.","Toolbar Icon Size":"Tamanho do Ícone da Barra de Ferramentas","Set the size of the toolbar icon (px); default: 18px":"Definir o tamanho do ícone da barra de ferramentas (px); padrão: 18px","Custom Theme":"Estilo Personalizado","Fixed Position Offset":"Deslocamento Fixo","Choose the offset of the Editing Toolbar in the fixed position.":"Escolha o deslocamento da Barra de Edição na posição fixa.","Renumber List":"Renumerar Lista","Fetch Remote Title":"Obter Título Remoto","Please enter a URL first":"Por favor digite uma URL primeiro","Failed to fetch title for":"Falha ao obter título para","Link Title (optional)":"Título do Link (opcional)","Unable to detect editor width":"Não foi possível detectar a largura do editor","Fit Editor Width":"Ajustar Largura do Editor","Please execute a format command or select format text first, then enable the format brush":"Execute um comando de formatação ou selecione um texto já formatado antes de ativar o pincel de formatação.","Use \\n to represent line breaks":"Use \\n para representar quebras de linha","Use ↵ to represent line breaks":"Use ↵ para representar quebras de linha","Top Toolbar":"Barra de Ferramentas de Topo","Enable the toolbar positioned at the top.":"Habilitar a barra de ferramentas posicionada no topo.","Following Toolbar":"Barra de Ferramentas Contextual","Enable the toolbar that appears upon text selection.":"Habilitar a barra de ferramentas que aparece ao selecionar texto.","Fixed Toolbar":"Barra de Ferramentas Fixa","Enable the toolbar whose position may be fixed where you please.":"Habilitar a barra de ferramentas cuja posição pode ser fixa onde você preferir.","Toolbar Settings":"Configurações da Barra de Ferramentas","Choose which toolbar style's appearance you want to edit.":"Escolha qual estilo de barra de ferramentas você deseja editar.","Vertical Split":"Divisão Vertical"},ro:{},ru:{},tr:{},"zh-cn":b,"zh-tw":y}[e.moment.locale()];function w(e){return"string"!=typeof e||0===e.length?"":C&&C[e]||f[e]||e}class v extends e.FuzzySuggestModal{constructor(e,t,o=!1,i,n){super(e.app),this.customCallback=null,this.plugin=e,this.command=t,this.issub=o,this.customCallback=i||null,this.setPlaceholder(w("Choose an icon")),this.currentEditingConfig=n||""}capitalJoin(e){return e.split(" ").map(e=>e[0].toUpperCase()+e.substring(1)).join(" ")}getItems(){return n}getItemText(e){return this.capitalJoin(e.replace("feather-","").replace("remix-","").replace("bx-","").replace(/([A-Z])/g," $1").trim().replace(/-/gi," "))}renderSuggestion(t,o){const i=createSpan({cls:"editingToolbarIconPick"});o.appendChild(i),e.setIcon(i,t.item),super.renderSuggestion(t,o)}async onChooseItem(e){if("Custom"===e)return this.customCallback?void new x(this.app,this.plugin,{id:this.command.id,name:this.command.name,icon:""},this.issub,e=>{this.customCallback(e)}).open():void new x(this.app,this.plugin,this.command,this.issub,null,this.currentEditingConfig).open();if(this.customCallback)return void this.customCallback(e);const t=this.plugin.getCurrentCommands(this.currentEditingConfig);if(this.command.icon){let o=s(this.plugin,this.command,this.issub,t);this.issub?t[o.index].SubmenuCommands[o.subindex].icon=e:t[o.index].icon=e,this.plugin.updateCurrentCommands(t,this.currentEditingConfig)}else this.command.icon=e,t.push(this.command),this.plugin.updateCurrentCommands(t,this.currentEditingConfig);await this.plugin.saveSettings(),setTimeout(()=>{dispatchEvent(new Event("editingToolbar-NewCommand"))},100),console.log(`%c命令 '${this.command.name}' 已添加到编辑工具栏`,"color: Violet")}}class x extends e.Modal{constructor(e,t,o,i,n,a){super(e),this.customCallback=null,this.plugin=t,this.item=o,this.issub=i,this.customCallback=n||null,this.currentEditingConfig=a||"",this.containerEl.addClass("editingToolbar-Modal"),this.containerEl.addClass("customicon")}onOpen(){const{contentEl:e}=this;e.createEl("b",{text:w("Enter the icon code, format as .... ")});const t=document.createElement("textarea");t.className="wideInputPromptInputEl",t.placeholder="",t.value=this.item.icon||"",t.style.width="100%",t.style.height="200px",e.appendChild(t),t.addEventListener("input",async()=>{const e=t.value;if(this.customCallback)return void(this.item.icon=e);this.item.icon=e;const o=this.plugin.getCurrentCommands(this.currentEditingConfig),i=s(this.plugin,this.item,this.issub,o);if(this.issub){let t=i.subindex;-1===t?this.plugin.settings.menuCommands[i.index].SubmenuCommands.push(this.item):this.plugin.settings.menuCommands[i.index].SubmenuCommands[t].icon=e}else{let e=i.index;-1===e?this.plugin.settings.menuCommands.push(this.item):this.plugin.settings.menuCommands[e].icon=this.item.icon}await this.plugin.saveSettings()}),this.submitEnterCallback&&t.addEventListener("keydown",this.submitEnterCallback)}onClose(){const{contentEl:e}=this;e.empty(),this.customCallback?this.customCallback(this.item.icon||""):setTimeout(()=>{dispatchEvent(new Event("editingToolbar-NewCommand"))},100)}}class k extends e.FuzzySuggestModal{constructor(e,t){super(e.app),this.plugin=e,this.app,this.setPlaceholder(w("Choose a command")),this.currentEditingConfig=t||""}getItems(){return app.commands.listCommands()}getItemText(e){return w(e.name)}async onChooseItem(t){const o=this.plugin.getCurrentCommands(this.currentEditingConfig);o.findIndex(e=>e.id==t.id)>-1?new e.Notice(w("The command")+w(t.name)+w("already exists"),3e3):t.icon?(o.push(t),this.plugin.updateCurrentCommands(o,this.currentEditingConfig),await this.plugin.saveSettings(),setTimeout(()=>{dispatchEvent(new Event("editingToolbar-NewCommand"))},100),console.log(`%c命令 '${t.name}' 已添加到编辑工具栏`,"color: Violet")):new v(this.plugin,t,!1,null,this.currentEditingConfig).open()}}class T extends e.Modal{constructor(e,t,o,i,n){super(t.app),this.plugin=t,this.item=o,this.issub=i,this.currentEditingConfig=n||"",this.containerEl.addClass("editingToolbar-Modal"),this.containerEl.addClass("changename")}onOpen(){const{contentEl:t}=this;t.createEl("b",{text:w("Please enter a new name: ")});const o=new e.TextComponent(t);o.inputEl.classList.add("InputPromptInputEl"),o.setPlaceholder("").setValue(this.item.name??"").onChange(e.debounce(async e=>{const t=this.plugin.getCurrentCommands(this.currentEditingConfig);let o=s(this.plugin,this.item,this.issub,t);if(this.item.name=e,this.issub){let i=o.subindex;-1===i?t[o.index].SubmenuCommands.push(this.item):t[o.index].SubmenuCommands[i].name=e}else{let e=o.index;-1===e?t.push(this.item):t[e].name=this.item.name}this.plugin.updateCurrentCommands(t),await this.plugin.saveSettings()},100,!0)).inputEl.addEventListener("keydown",this.submitEnterCallback)}onClose(){const{contentEl:e}=this;e.empty(),setTimeout(()=>{dispatchEvent(new Event("editingToolbar-NewCommand"))},100)}}class S extends e.Modal{constructor(e,t){super(t.app),this.needSave=!1,this.plugin=t,this.containerEl.addClass("editingToolbar-Modal")}onOpen(){const{contentEl:t}=this;t.createEl("p",{text:w("Drag the slider to move the position")});const o=t.createDiv({cls:"slider-container"}),i=o.createDiv({cls:"vertical-slider-container"});i.createEl("p",{text:w("Vertical Position")});const n=o.createDiv({cls:"horizontal-slider-container"});n.createEl("p",{text:w("Horizontal Position")});const a=o.createDiv({cls:"columns-slider-container"});a.createEl("p",{text:w("Editing Toolbar Columns")});const s=document.body.clientHeight,r=document.body.clientWidth,l=Math.floor(s/3),c=-Math.floor(s),d=Math.floor(r/2),m=-Math.floor(r/2),u=new e.SliderComponent(i).setLimits(c,l,5).setValue(this.plugin.settings.verticalPosition||0).onChange(e.debounce(e=>{this.needSave=!0,this.plugin.settings.verticalPosition=e,h(this.plugin.settings)},100,!0)).setDynamicTooltip(),p=new e.SliderComponent(n).setLimits(m,d,10).setValue(this.plugin.settings.horizontalPosition||0).onChange(e.debounce(e=>{this.needSave=!0,this.plugin.settings.horizontalPosition=e,g(this.plugin.settings)},100,!0)).setDynamicTooltip(),f=new e.SliderComponent(a).setLimits(1,32,1).setValue(this.plugin.settings.cMenuNumRows||12).onChange(e.debounce(async e=>{this.needSave=!0,this.plugin.settings.cMenuNumRows=e,await this.plugin.saveSettings(),setTimeout(()=>{dispatchEvent(new Event("editingToolbar-NewCommand"))},100)},100,!0)).setDynamicTooltip();o.createDiv({cls:"reset-container"}).createEl("button",{text:w("Reset"),cls:"reset-button"}).addEventListener("click",()=>{this.needSave=!0,u.setValue(0),p.setValue(0),f.setValue(12),this.plugin.settings.verticalPosition=0,this.plugin.settings.horizontalPosition=0,this.plugin.settings.cMenuNumRows=12,h(this.plugin.settings),g(this.plugin.settings)})}async onClose(){const{contentEl:e}=this;e.empty(),this.needSave&&await this.plugin.saveSettings()}}const E=[{value:"04-fast",label:"04-fast"},{value:"03-agent",label:"03-agent"}],I={mode:"smart",completion:"04-fast",rewrite:"04-fast",reasoning:"03-agent",artifact:"03-agent"};function A(e,t){const o=e.pkmerModelRouting??I;if("smart"===o.mode)return I[t];const i=o[t]?.trim();return i||I[t]}const M=[{instruction:"improve",label:"Improve writing",group:"Edit"},{instruction:"fix-grammar",label:"Fix spelling & grammar",group:"Edit"},{instruction:"make-shorter",label:"Make shorter",group:"Edit"},{instruction:"make-longer",label:"Make longer",group:"Edit"},{instruction:"simplify",label:"Simplify language",group:"Edit"},{instruction:"professional",label:"Professional tone",group:"Tone"},{instruction:"casual",label:"Casual tone",group:"Tone"},{instruction:"translate-en",label:"English",group:"Translate"},{instruction:"translate-zh",label:"Chinese",group:"Translate"},{instruction:"translate-ja",label:"Japanese",group:"Translate"},{instruction:"translate-de",label:"German",group:"Translate"},{instruction:"translate-fr",label:"French",group:"Translate"},{instruction:"translate-es",label:"Spanish",group:"Translate"},{instruction:"explain",label:"Explain this",group:"Generate"},{instruction:"summarize",label:"Summarize",group:"Generate"},{instruction:"continue",label:"Continue writing",group:"Generate"}],P="editing-toolbar-pkmer-access-token",D="editing-toolbar-pkmer-refresh-token",O="editing-toolbar-pkmer-ai-token",F="editing-toolbar-custom-model-api-key",q="https://api.pkmer.cn/api/v1/oauth/authorize",L="https://api.pkmer.cn/api/v1/oauth/token",N="https://api.pkmer.cn/api/v1/oauth/userinfo",R="pkmer_dd2a562c8653ca0112a050150d974ccd",B="openid profile email ai:token",_="http://localhost:10891/editing-toolbar/callback",$="obsidian://editing-toolbar-pkmer-auth",z=10891,U=["body","workspace"],V=["default","tiny","glass","custom"],H=["following","top","fixed"],W={lastVersion:"0.0.0",aestheticStyle:"default",positionStyle:"top",menuCommands:[{id:"editing-toolbar:editor-undo",name:"Undo Edit",icon:"undo-glyph"},{id:"editing-toolbar:editor-redo",name:"Redo Edit",icon:"redo-glyph"},{id:"editing-toolbar:toggle-format-brush",name:"Format Brush",icon:"paintbrush"},{id:"editing-toolbar:format-eraser",name:"Clear Text Formatting",icon:"eraser"},{id:"editing-toolbar:header2-text",name:"Header 2",icon:"header-2"},{id:"editing-toolbar:header3-text",name:"Header 3",icon:"header-3"},{id:"SubmenuCommands-header",name:"submenu",icon:"header-n",SubmenuCommands:[{id:"editing-toolbar:header1-text",name:"Header 1",icon:"header-1"},{id:"editing-toolbar:header4-text",name:"Header 4",icon:"header-4"},{id:"editing-toolbar:header5-text",name:"Header 5",icon:"header-5"},{id:"editing-toolbar:header6-text",name:"Header 6",icon:"header-6"}]},{id:"editing-toolbar:toggle-bold",name:"Bold",icon:"bold-glyph"},{id:"editing-toolbar:toggle-italics",name:"Italic",icon:"italic-glyph"},{id:"editing-toolbar:toggle-strikethrough",name:"Strikethrough",icon:"strikethrough-glyph"},{id:"editing-toolbar:underline",name:"Underline",icon:"underline-glyph"},{id:"editing-toolbar:toggle-highlight",name:"Highlight",icon:"highlight-glyph"},{id:"SubmenuCommands-text-tools",name:"Text Tools",icon:"box",menuType:"dropdown",SubmenuCommands:[{id:"editing-toolbar:get-plain-text",name:"Get Plain Text",icon:"lucide-file-text"},{id:"editing-toolbar:smart-symbols",name:"Full Half Converter",icon:"lucide-at-sign"},{id:"editingToolbar-Divider-Line",name:"Line Operations",icon:"vertical-split"},{id:"editing-toolbar:insert-blank-lines",name:"Insert Blank Lines",icon:"lucide-space"},{id:"editing-toolbar:remove-blank-lines",name:"Remove Blank Lines",icon:"lucide-minimize-2"},{id:"editing-toolbar:split-lines",name:"Split Lines",icon:"lucide-split"},{id:"editing-toolbar:merge-lines",name:"Merge Lines",icon:"lucide-merge"},{id:"editing-toolbar:dedupe-lines",name:"Dedupe Lines",icon:"lucide-filter"},{id:"editingToolbar-Divider-Line",name:"Text Processing",icon:"vertical-split"},{id:"editing-toolbar:add-wrap",name:"Add Prefix/Suffix",icon:"lucide-wrap-text"},{id:"editing-toolbar:number-lines",name:"Number Lines (Custom)",icon:"lucide-list-ordered"},{id:"editing-toolbar:remove-whitespace-trim",name:"Trim Line Ends",icon:"lucide-scissors"},{id:"editing-toolbar:remove-whitespace-compress",name:"Shrink Extra Spaces",icon:"lucide-minimize"},{id:"editing-toolbar:remove-whitespace-all",name:"Remove All Whitespace",icon:"lucide-eraser"},{id:"editingToolbar-Divider-Line",name:"Advanced Tools",icon:"vertical-split"},{id:"editing-toolbar:list-to-table",name:"List to Table",icon:"lucide-table"},{id:"editing-toolbar:table-to-list",name:"Table to List",icon:"lucide-list"},{id:"editing-toolbar:extract-between",name:"Extract Between Strings",icon:"lucide-brackets"}]},{id:"SubmenuCommands-lucdf3en5",name:"submenu",icon:"edit",SubmenuCommands:[{id:"editing-toolbar:editor-cut",name:"Cut",icon:"lucide-scissors"},{id:"editing-toolbar:editor-copy",name:"Copy",icon:"lucide-copy"},{id:"editing-toolbar:editor-paste",name:"Paste",icon:"lucide-clipboard-type"},{id:"editing-toolbar:editor:swap-line-down",name:"Swap Line Down",icon:"lucide-corner-right-down"},{id:"editing-toolbar:editor:swap-line-up",name:"Swap Line Up",icon:"lucide-corner-right-up"}]},{id:"editing-toolbar:editor:attach-file",name:"Attach File",icon:"lucide-paperclip"},{id:"editing-toolbar:editor:insert-table",name:"Insert Table",icon:"lucide-table"},{id:"editing-toolbar:editor:cycle-list-checklist",name:"Cycle List and Checklist",icon:"check-circle"},{id:"SubmenuCommands-luc8efull",name:"submenu",icon:"message-square",SubmenuCommands:[{id:"editing-toolbar:editor:toggle-blockquote",name:"Blockquote",icon:"lucide-text-quote"},{id:"editing-toolbar:insert-callout",name:"Callout",icon:"lucide-quote"}]},{id:"SubmenuCommands-mdcmder",name:"submenu",icon:'',SubmenuCommands:[{id:"editing-toolbar:superscript",name:"Superscript",icon:"superscript-glyph"},{id:"editing-toolbar:subscript",name:"Subscript",icon:"subscript-glyph"},{id:"editing-toolbar:editor:toggle-code",name:"Inline Code",icon:"code-glyph"},{id:"editing-toolbar:codeblock",name:"Code Block",icon:"codeblock-glyph"},{id:"editing-toolbar:editor:insert-wikilink",name:"Wikilink",icon:''},{id:"editing-toolbar:editor:insert-embed",name:"Embed",icon:"note-glyph"},{id:"editing-toolbar:insert-link",name:"Link",icon:"link-glyph"},{id:"editing-toolbar:hrline",name:"Horizontal Divider",icon:''},{id:"editing-toolbar:toggle-inline-math",name:"Inline Math",icon:"lucide-sigma"},{id:"editing-toolbar:editor:insert-mathblock",name:"MathBlock",icon:"lucide-sigma-square"}]},{id:"SubmenuCommands-list",name:"submenu-list",icon:"bullet-list-glyph",SubmenuCommands:[{id:"editing-toolbar:editor:toggle-checklist-status",name:"Checklist",icon:"checkbox-glyph"},{id:"editing-toolbar:renumber-ordered-list",name:"Renumber Ordered List",icon:"list-restart"},{id:"editing-toolbar:toggle-numbered-list",name:"Ordered List",icon:''},{id:"editing-toolbar:toggle-bullet-list",name:"Unordered List",icon:''},{id:"editing-toolbar:undent-list",name:"Unindent List",icon:''},{id:"editing-toolbar:indent-list",name:"Indent list",icon:''}]},{id:"SubmenuCommands-aligin",name:"submenu-aligin",icon:'',SubmenuCommands:[{id:"editing-toolbar:justify",name:"Justify Text",icon:''},{id:"editing-toolbar:left",name:"Align Text Left",icon:''},{id:"editing-toolbar:center",name:"Center Text",icon:''},{id:"editing-toolbar:right",name:"Align Text Right",icon:''}]},{id:"editing-toolbar:change-font-color",name:"Change Font Color",icon:''},{id:"editing-toolbar:change-background-color",name:"Change Background Color",icon:''},{id:"editing-toolbar:fullscreen-focus",name:"Fullscreen Focus Mode",icon:"fullscreen"},{id:"editing-toolbar:workplace-fullscreen-focus",name:"Workplace Fullscreen",icon:"exit-fullscreen"}],followingCommands:[],topCommands:[],fixedCommands:[],mobileCommands:[],enableMultipleConfig:!1,enableTopToolbar:!1,enableFollowingToolbar:!1,enableFixedToolbar:!1,appendMethod:"workspace",shouldShowMenuOnSelect:!1,cMenuVisibility:!0,cMenuBottomValue:4.25,cMenuNumRows:12,cMenuWidth:610,cMenuFontColor:"#2DC26B",cMenuBackgroundColor:"#d3f8b6",autohide:!1,Iscentered:!1,custom_bg1:"#FFB78B8C",custom_bg2:"#CDF4698C",custom_bg3:"#A0CCF68C",custom_bg4:"#F0A7D88C",custom_bg5:"#ADEFEF8C",custom_fc1:"#D83931",custom_fc2:"#DE7802",custom_fc3:"#245BDB",custom_fc4:"#6425D0",custom_fc5:"#646A73",isLoadOnMobile:!1,horizontalPosition:0,verticalPosition:0,formatBrushes:{},customCommands:[],viewTypeSettings:{},appearanceByStyle:{top:{toolbarBackgroundColor:"rgba(var(--background-secondary-rgb), 0.7)",toolbarIconColor:"var(--text-normal)",toolbarIconSize:18,aestheticStyle:"default"},following:{toolbarBackgroundColor:"rgba(var(--background-secondary-rgb), 0.7)",toolbarIconColor:"var(--text-normal)",toolbarIconSize:18,aestheticStyle:"default"},fixed:{toolbarBackgroundColor:"rgba(var(--background-secondary-rgb), 0.7)",toolbarIconColor:"var(--text-normal)",toolbarIconSize:18,aestheticStyle:"default"},mobile:{toolbarBackgroundColor:"rgba(var(--background-secondary-rgb), 0.7)",toolbarIconColor:"var(--text-normal)",toolbarIconSize:18,aestheticStyle:"default"}},toolbarBackgroundColor:"rgba(var(--background-secondary-rgb), 0.7)",toolbarIconColor:"var(--text-normal)",toolbarIconSize:18,useCurrentLineForRegex:!1,ai:{enabled:!1,consentAccepted:!1,onboardingShown:!1,providerMode:"pkmer-first",enableInlineCompletion:!0,completionTrigger:"manual",completionDelay:500,enableRewrite:!0,showRewriteToolbarOnSelection:!1,rewriteMinSelectionLength:1,pkmerApiBaseUrl:"https://newapi.pkmer.cn",pkmerModel:"04-fast",pkmerModelRouting:I,pkmer:{tokenExpiresAt:0,userInfo:null},enableCustomModel:!1,customModel:{apiFormat:"openai-compatible",baseUrl:"",apiKey:"",model:"",temperature:.2}}};class j{static isAllowedViewType(e,t){if(!e)return!1;const o=e.getViewType(),i=window.app?.plugins?.plugins?.["editing-toolbar"];if(i?.settings?.viewTypeSettings&&void 0!==i.settings.viewTypeSettings[o])return i.settings.viewTypeSettings[o];return(t||["markdown","canvas","thino_view","meld-encrypted-view"]).includes(o)}static isSourceMode(e){return!!e&&"source"===e.getMode?.()}}const K="editing-toolbar:ai-tools";const Y=[{id:"list",label:"Convert to list",icon:"lucide-list-tree"},{id:"table",label:"Convert to table",icon:"lucide-table-properties"},{id:"frontmatter",label:"Generate frontmatter",icon:"lucide-file-badge-2"},{id:"canvas",label:"Convert to canvas",icon:"lucide-waypoints"}],G=["Obsidian Markdown rules:","- Preserve valid Obsidian flavored Markdown whenever relevant.","- Preserve wikilinks like [[Note]], embeds like ![[Note]], tags, task lists, callouts, tables, and inline formatting if they appear in the source.","- For internal links use [[wikilinks]] rather than Markdown links whenever the target looks like a vault note.","- Use standard Markdown headings, lists, blockquotes, tables, and code fences only when they fit the content naturally."].join("\n"),Z=["Obsidian Bases skill requirements:","- Output a valid .base file body in YAML only. No explanations. No code fences.","- A base file may contain top-level filters, formulas, properties, summaries, and views.","- filters can be a single filter string or nested and/or/not filter objects.","- formulas is a mapping from formula name to expression string.","- properties config can include displayName for note, file, and formula properties.","- views must be an array. Each view should have a useful type such as table, cards, list, or map, plus a name and order.","- Use practical property names inferred from the source content, and use formula.* when referencing formula properties in views.","- Common file properties include file.name, file.basename, file.path, file.folder, file.ext, file.ctime, file.mtime, file.tags, file.links, file.backlinks, file.embeds, file.properties.","- Keep YAML valid: quote strings when needed, keep indentation consistent, and do not reference undefined formulas.","- Prefer concise but actually usable output over placeholders.","- If the source describes tabular entities, create at least one table view.","- If the source suggests browsing or grouping, consider cards or list views too.","- If filtering logic is unclear, you may omit filters rather than inventing weak ones.","- If there are date-like fields, formulas may use date(), now(), today(), and duration .days accessors.","- Return one complete semantic .base file ready to save and open in Obsidian.","Suggested schema pattern:","filters:"," and: []","formulas:"," formula_name: 'expression'","properties:"," property_name:",' displayName: "Display Name"',"views:"," - type: table",' name: "Overview"'," order:"," - file.name"," - property_name"].join("\n"),J=["Obsidian JSON Canvas skill requirements:","- Output valid JSON only. No explanations. No code fences.","- The top-level object must contain arrays named nodes and edges.","- Every node needs id, type, x, y, width, and height.","- Every edge must reference existing node ids using fromNode and toNode.","- Use unique 16-character lowercase hexadecimal ids for all nodes and edges.","- Valid node types are text, file, link, and group.","- Prefer text nodes unless a file node or link node is clearly required by the source.","- Text nodes should contain concise, structured Markdown-friendly text.","- Use \\n inside JSON strings for line breaks. Never emit literal \\\\n.","- If useful, use one group node to organize the canvas, but do not overuse groups.","- Layout should be readable: align to a loose grid, leave about 50-100px spacing between nodes, and avoid overlaps.","- Coordinates can be negative, but prefer a clean left-to-right or center-out layout.","- A good canvas usually has a clear central node and connected supporting nodes rather than isolated fragments.","- Unless the source is tiny, create a meaningful structure with several nodes instead of only one or two.","- Use edge labels only when they add real meaning.","- Return a canvas that is ready to save as a .canvas file and open directly in Obsidian.","Reference shape:","{",' "nodes": [',' { "id": "6f0ad84f44ce9c17", "type": "text", "x": 0, "y": 0, "width": 360, "height": 180, "text": "# Topic\\n\\n- point" }'," ],",' "edges": [',' { "id": "0123456789abcdef", "fromNode": "6f0ad84f44ce9c17", "toNode": "a1b2c3d4e5f67890", "toEnd": "arrow" }'," ]","}"].join("\n");let X;const Q={markdown:".markdown-source-view",thino_view:".markdown-source-view",canvas:".canvas-wrapper",excalidraw:".view-header",image:".image-container",pdf:".view-content",meld_encrypted_view:".markdown-source-view"};function ee(t){X=e.requireApiVersion("0.15.0")?activeWindow.document:window.document;const o=function(){const t=[];t.push(app.workspace.rootSplit);const o=app.workspace.floatingSplit;return o?.children.forEach(o=>{o instanceof e.WorkspaceWindow&&t.push(o)}),t}(),i=e=>{const t=e.querySelectorAll(".editingToolbarModalBar"),o=e.querySelectorAll(".editingToolbarPopoverBar");t.forEach(e=>{e.firstChild&&e.removeChild(e.firstChild),e.remove()}),o.forEach(e=>{e.firstChild&&e.removeChild(e.firstChild),e.remove()})};i(X),o&&o.forEach(e=>{e?.containerEl&&i(e.containerEl)}),t&&t.clearToolbarCache()}function te(t,o,i,n){const a=n||t.workspace.activeLeaf?.view?.containerEl?.ownerDocument||(e.requireApiVersion("0.15.0")?activeWindow.document:window.document);X=a;const s=i||o.positionStyle||o.settings.positionStyle||"top";if("top"!==s){const e=o.getCachedToolbar(s);if(e&&e.ownerDocument===a)return e}const r=`.editingToolbarModalBar[data-toolbar-style="${s}"]`;let l=null;return l="top"===s?t.workspace.activeLeaf?.view.containerEl?.querySelector(r)||null:a.querySelector(r),l&&"top"!==s&&o.setCachedToolbar(s,l),l||null}const oe=(e,t)=>t.reduce((e,t)=>e&&"undefined"!==e[t]?e[t]:void 0,e);function ie(e,t){return e&&void 0!==e[1][0]?t+e.flat(2).join("+").replace("Mod","Ctrl")+t:t+"–"+t}function ne(e,t,o=!0){let i=e.commands.findCommand(t),n=o?"*":"";if(i){let t=i.hotkeys?[[oe(i.hotkeys,[0,"modifiers"])],[oe(i.hotkeys,[0,"key"])]]:void 0,o=e.hotkeyManager.customKeys[i.id];var a=o?[[oe(o,[0,"modifiers"])],[oe(o,[0,"key"])]]:void 0;return a?ie(a,n):ie(t,"")}return"–"}function ae(e){return/<[^>]+>/g.test(e)}function se(t,o){return o?ae(o)?(t.setIcon("lucide-square"),void(t.iconEl&&(t.iconEl.empty(),t.iconEl.innerHTML=o))):(t.setIcon(o),void(t.iconEl&&0===t.iconEl.childElementCount&&e.setIcon(t.iconEl,o))):(t.setIcon(""),void(t.iconEl&&t.iconEl.empty()))}function re(e,t,o,i){const n=i.commandsManager.getActiveEditor(),a=n&&n.somethingSelected();0==t.cMenuVisibility?e.style.visibility="hidden":"following"===o?a||(e.style.visibility="hidden"):e.style.visibility="visible"}const le={improve:"lucide-wand-2","fix-grammar":"lucide-spell-check-2","make-shorter":"lucide-minimize-2","make-longer":"lucide-maximize-2",simplify:"lucide-align-left",professional:"lucide-briefcase",casual:"lucide-message-circle-more","translate-en":"lucide-languages","translate-zh":"lucide-languages","translate-ja":"lucide-languages","translate-de":"lucide-languages","translate-fr":"lucide-languages","translate-es":"lucide-languages",explain:"lucide-info",summarize:"lucide-file-text",continue:"lucide-pencil-line",custom:"lucide-message-square"},ce={"editing-toolbar:ai-inline-completion":"AI Complete","editing-toolbar:ai-rewrite-improve":"AI Rewrite","editing-toolbar:ai-rewrite-continue":"AI Continue","editing-toolbar:ai-rewrite-custom":"AI Custom","editing-toolbar:ai-tools:improve":"AI Rewrite","editing-toolbar:ai-tools:fix-grammar":"AI Fix","editing-toolbar:ai-tools:make-shorter":"AI Shorten","editing-toolbar:ai-tools:make-longer":"AI Expand","editing-toolbar:ai-tools:simplify":"AI Simplify","editing-toolbar:ai-tools:professional":"AI Professional","editing-toolbar:ai-tools:casual":"AI Casual","editing-toolbar:ai-tools:translate-en":"AI Translate","editing-toolbar:ai-tools:translate-zh":"AI Translate","editing-toolbar:ai-tools:translate-ja":"AI Translate","editing-toolbar:ai-tools:translate-de":"AI Translate","editing-toolbar:ai-tools:translate-fr":"AI Translate","editing-toolbar:ai-tools:translate-es":"AI Translate","editing-toolbar:ai-tools:explain":"AI Explain","editing-toolbar:ai-tools:summarize":"AI Summarize","editing-toolbar:ai-tools:continue":"AI Continue","editing-toolbar:ai-tools:custom":"AI Custom","editing-toolbar:ai-toolbox:list":"AI List","editing-toolbar:ai-toolbox:table":"AI Table","editing-toolbar:ai-toolbox:frontmatter":"AI Frontmatter","editing-toolbar:ai-toolbox:canvas":"AI Canvas"};function de(e,t){e.lastExecutedCommand=t,e.lastExecutedCommandName=w(ce[t]?ce[t]:"AI")}function me(e){const t=e.lastExecutedCommand;return t&&ce[t]?w(ce[t]):t?.startsWith("editing-toolbar:ai")&&e.lastExecutedCommandName?e.lastExecutedCommandName:w("AI")}function ue(t,o,i,n,a){if(i<=100)return!1;return t+o+6*Math.max(1,Math.round(t/Math.max(n,1)))+(n+12)+("following"===a?n+10:0)+(e.Platform.isMobileApp||"mobile"===a?14:0)>=Math.max(i-16,2*n)}function pe(t,o,i){X=e.requireApiVersion("0.15.0")?activeWindow.document:window.document;const n=o.commandsManager.getActiveEditor();let a=te(t,o),s=a?.querySelector("#"+i);if(s){let e=s.rows,t=e.length;for(let a=1;a{t.style.fill=e})}else if("x-backgroundcolor-picker-table"==i){o.settings.cMenuBackgroundColor=e,c(e,n),X.querySelectorAll("#change-background-color-icon").forEach(t=>{t.style.fill=e})}o.saveSettings()}}}}}const he=function(e){let t=e;if(/^(rgb|RGB)/.test(t)){let e=t.replace(/(?:\(|\)|rgb|RGB)*/g,"").split(","),o="#";for(let t=0;t{"hidden"==s.style.visibility?(s.style.visibility="visible",s.style.height="32px",((e,t,o)=>{if("following"!==o)return void(e=>{e.style.removeProperty("left"),e.style.removeProperty("top"),e.style.removeProperty("right"),e.style.removeProperty("bottom"),e.style.removeProperty("transform"),e.style.removeProperty("margin"),e.style.removeProperty("position")})(t);const i=t.ownerDocument.defaultView??window,n=e.getBoundingClientRect(),a=Math.max(t.offsetWidth,t.scrollWidth),s=Math.max(t.offsetHeight,t.scrollHeight),r=Math.max(12,i.innerWidth-a-12);let l=n.right-a;a<=0&&(l=n.left),l=Math.min(Math.max(l,12),r);let c=n.bottom+8;s>0&&c+s>i.innerHeight-12&&(c=Math.max(12,n.top-s-8)),t.style.position="fixed",t.style.left=`${l}px`,t.style.top=`${c}px`,t.style.right="auto",t.style.bottom="auto",t.style.transform="none",t.style.margin="0"})(l.buttonEl,s,a)):(s.style.visibility="hidden",s.style.height="0")}),l.buttonEl.innerHTML='',o.setIS_MORE_Button(!1),r}function fe(e){e.quiteAllFormatBrushes()}function be(e,t){let o=t.getSelection();if(!o||""===o.trim())return;if(o.match(/^>\s*\[\![\w\s]*\]/m)){let e=o.split("\n"),i=[],n=!1,a=0,s=!1;for(let t=0;t+)\s*\[\!([\w\s]*)\]\s*(.*?)$/);if(!r||s)if(n){let e=o.match(/^(>+)\s*/);if(e&&e[1].length>=a){let e=o.replace(new RegExp(`^>{${a}}\\s*`),"");i.push(e)}else n=!1,i.push(o)}else i.push(o);else a=r[1].length,s=!0,r[3].trim()&&i.push(r[3].trim()),n=!0}return void t.replaceSelection(i.join("\n"))}o=o.replace(/(^#+\s|^#(?=\s)|^\>|^\- \[( |x)\]|^\+ |\<[^\<\>]+?\>|^1\. |^\s*\- |^\-+$|^\*+$)/gm,""),o=o.replace(/^[ ]+|[ ]+$/gm,""),o=o.replace(/\!?\[\[([^\[\]\|]*\|)*([^\(\)\[\]]+)\]\]/g,"$2"),o=o.replace(/\!?\[+([^\[\]\(\)]+)\]+\(([^\(\)]+)\)/g,"$1"),o=o.replace(/`([^`]+)`/g,"$1"),o=o.replace(/_([^_]+)_/g,"$1"),o=o.replace(/==([^=]+)==/g,"$1"),o=o.replace(/\*\*\*([^\*]+)\*\*\*/g,"$1"),o=o.replace(/\*\*?([^\*]+)\*\*?/g,"$1"),o=o.replace(/~~([^~]+)~~/g,"$1"),t.replaceSelection(o)}function ye(t,o,i,n,a=!1,s){const r=s||n?.cm?.dom?.ownerDocument||n?.cm?.contentDOM?.ownerDocument||t.workspace.activeLeaf?.view?.containerEl?.ownerDocument||(e.requireApiVersion("0.15.0")?activeWindow.document:window.document);let l=te(t,i,"following",r);const c=t.workspace.getActiveViewOfType(e.ItemView);if(!j.isAllowedViewType(c))return void(l&&(l.style.visibility="hidden"));if(!(i.settings.enableFollowingToolbar||!i.settings.enableTopToolbar&&!i.settings.enableFixedToolbar&&"following"===i.positionStyle))return;l||(Ce(t,i,"following",r),l=te(t,i,"following",r));const d=c?.getViewType(),m="markdown"===d;let u=30;if(u="tiny"===i.settings.aestheticStyle?30:o+14,m)if(j.isSourceMode(c)){if(l){const e=a||n.somethingSelected();l.style.visibility=e?"visible":"hidden","visible"===l.style.visibility&&(l.style.height=u+"px",l.addClass("editingToolbarFlex"),l.removeClass("editingToolbarGrid"),function(e,t){const o=t.containerEl.getBoundingClientRect(),i=e.offsetWidth,n=e.offsetHeight,a=12,s=e.ownerDocument.defaultView?.innerWidth??window.innerWidth,r=t.getCursor("from");t.getCursor("to");const l=t.coordsAtPos(r),c=X.getElementsByClassName("mod-left-split")[0]?.clientWidth??0,d=X.getElementsByClassName("side-dock-ribbon mod-left")[0]?.clientWidth??0,m=c+d;let u=l.left-m-28;u+i>s-m&&(u=s-m-i-a);u=Math.max(0,u);let p=function(e,t,o,i){const n=e.getCursor("from"),a=e.getCursor("to"),s=e.coordsAtPos(a),r=n.line===a.line;let l=t.top-i-10;if(r)l<=o.top&&(l=s.bottom+10);else{if(e.getCursor("head").ch==e.getCursor("from").ch)l=t.top-i-10,l<=o.top&&(l=o.top+2*i);else{const t=(e=>{let t,o=e.getCursor("head");if(e.getCursor("head").ch!==e.getCursor("from").ch&&(o.ch=Math.max(0,o.ch-1)),e.cursorCoords)t=e.cursorCoords(!0,"window");else{if(!e.coordsAtPos)return;{const i=e.posToOffset(o);t=e.cm.coordsAtPos?.(i)??e.coordsAtPos(i)}}return t})(e);l=t.bottom+10,l>=o.bottom-i&&(l=o.bottom-2*i)}}return l}(t,l,o,n);p=Math.max(0,p),e.style.left=`${u}px`,e.style.top=`${p}px`}(l,n))}}else l&&(l.style.visibility="hidden");else l&&(l.style.visibility="visible",l.style.height=u+"px",l.addClass("editingToolbarFlex"),l.removeClass("editingToolbarGrid"))}function Ce(t,o,i,n){const a=o.settings,s=n||t.workspace.activeLeaf?.view?.containerEl?.ownerDocument||(e.requireApiVersion("0.15.0")?activeWindow.document:window.document);if(X=s,!i){const e=[];if(a.enableTopToolbar&&e.push("top"),a.enableFollowingToolbar&&e.push("following"),a.enableFixedToolbar&&e.push("fixed"),0===e.length){const t=o.positionStyle||o.settings.positionStyle||"top";e.push(t)}return void e.forEach(e=>{Ce(t,o,e,s)})}const r=i;if(!a.cMenuVisibility){const e=te(t,o,r,s);return void(e&&(e.style.display="none"))}const l=(a.appearanceByStyle||{})[r]||{},c=l.toolbarIconSize??o.toolbarIconSize??18,d=l.aestheticStyle??a.aestheticStyle??"default",m="custom"===d?l.toolbarBackgroundColor??a.toolbarBackgroundColor:void 0,u="custom"===d?l.toolbarIconColor??a.toolbarIconColor:void 0,p={default:"editingToolbarDefaultAesthetic",tiny:"editingToolbarTinyAesthetic",glass:"editingToolbarGlassAesthetic",custom:"editingToolbarCustomAesthetic"};!function(){function i(e,t){Object.values(p).forEach(t=>{e.removeClass(t)});const o=p[t]||p.default;e.addClass(o)}const n=()=>{let n=0,l=0,p=c+8,h=createEl("div");if(h)if(h.addClass("editingToolbarModalBar"),h.setAttribute("data-toolbar-style",r),"top"===r)h.className+=" top",a.autohide&&(h.className+=" autohide"),a.Iscentered&&(h.className+=" centered");else if("following"===r)h.style.visibility="hidden";else if("fixed"===r){const e=c||18,t=`left: calc(50% - calc(${a.cMenuNumRows*(e+10)}px / 2));\n bottom: 4.25em; \n grid-template-columns: repeat(${a.cMenuNumRows}, ${e+10}px);\n gap: ${(e-18)/4}px`;h.setAttribute("style",t)}h.setAttribute("id","editingToolbarModalBar");let g=createEl("div");if(g.addClass("editingToolbarpopover"),g.addClass("editingToolbarTinyAesthetic"),g.addClass("editingToolbarPopoverBar"),g.setAttribute("data-toolbar-style",r),g.setAttribute("id","editingToolbarPopoverBar"),g.style.visibility="hidden",g.style.height="0",i(h,d),i(g,d),m&&(h.style.setProperty("--editing-toolbar-background-color",m),g.style.setProperty("--editing-toolbar-background-color",m)),u&&(h.style.setProperty("--editing-toolbar-icon-color",u),g.style.setProperty("--editing-toolbar-icon-color",u)),c&&(h.style.setProperty("--toolbar-icon-size",`${c}px`),g.style.setProperty("--toolbar-icon-size",`${c}px`)),"top"===r){let e=t.workspace.activeLeaf.view.containerEl,o=null;const i=t.workspace.activeLeaf.view.getViewType(),n=Q[i];if(n&&(o=e?.querySelector(n)),!o){const t=e?.querySelector(".view-content");if(t){const e=t.querySelectorAll(":scope > div");o=e.length>0?e[0]:t}}if(!o)return void console.log("Editing Toolbar: Failed to find target DOM element for toolbar insertion");const a="canvas"===i?e?.querySelector(".view-content"):null;"canvas"===i&&a?(a.insertAdjacentElement("beforebegin",h),e?.querySelector("#editingToolbarPopoverBar")||a.insertAdjacentElement("beforebegin",g)):(e?.querySelector("#editingToolbarPopoverBar")||("excalidraw"==i?o.insertAdjacentElement("afterend",g):o.insertAdjacentElement("afterbegin",g)),"excalidraw"==i?o.insertAdjacentElement("afterend",h):o.insertAdjacentElement("afterbegin",h));const r=[o?.clientWidth||o?.offsetWidth||0,e?.clientWidth||e?.getBoundingClientRect().width||0,s.defaultView?.innerWidth||0].filter(e=>e>0);l=r.length>0?Math.min(...r):0}else if("body"==a.appendMethod){s.querySelector(`.editingToolbarPopoverBar[data-toolbar-style="${r}"]`)||s.body.appendChild(g),s.body.appendChild(h),l=s.defaultView?.innerWidth||s.body?.clientWidth||0}else if("workspace"==a.appendMethod){const e=s.body?.querySelector(".mod-vertical.mod-root");if(!e)return;e.querySelector(`.editingToolbarPopoverBar[data-toolbar-style="${r}"]`)||e.insertAdjacentElement("afterbegin",g),e.insertAdjacentElement("afterbegin",h);const t=[s.body?.clientWidth||0,s.defaultView?.innerWidth||0].filter(e=>e>0);l=t.length>0?Math.min(...t):0}let f="top"===r?t.workspace.activeLeaf.view.containerEl?.querySelector("#editingToolbarPopoverBar"):s.querySelector(`.editingToolbarPopoverBar[data-toolbar-style="${r}"]`);const b=e=>e?f||(console.warn(`Editing Toolbar: missing popover host for style "${r}", falling back to toolbar host.`),h):h,y=o.getCurrentCommands(r),C=e=>w(e),v=(e,t)=>{const o=C(e);return"–"===t?o:`${o}(${t})`};y.forEach((i,s)=>{let c;if("SubmenuCommands"in i){let d;ue(n,p,l,p,r)?(o.setIS_MORE_Button(!0),d=new e.ButtonComponent(b(!0))):d=new e.ButtonComponent(h),d.setClass("editingToolbarCommandsubItem"+s),s>=a.cMenuNumRows?d.setClass("editingToolbarSecond"):"top"!==r&&d.buttonEl.setAttribute("aria-label-position","top"),ae(i.icon)?d.buttonEl.innerHTML=i.icon:d.setIcon(i.icon),n+=p+2;if("dropdown"===(i.menuType||"submenu")){d.setClass("editingToolbarDropdownButton");let n=ne(t,i.id);c=v(i.name,n),d.setTooltip(c),d.onClick(n=>{const s=new e.Menu;i.SubmenuCommands.forEach(e=>{"editingToolbar-Divider-Line"===e.id?(s.addSeparator(),s.addItem(t=>{t.setTitle(w(e.name)).setDisabled(!0),se(t,"")})):s.addItem(i=>{const n=ne(t,e.id,!1),s=w(e.name),l="–"!==n?`${s}`:s;if(i.setTitle(l).onClick(()=>{t.commands.executeCommandById(e.id);const i=o.commandsManager.getActiveEditor(),n=i&&i.somethingSelected();0==a.cMenuVisibility?h.style.visibility="hidden":"following"===r?n||(h.style.visibility="hidden"):h.style.visibility="visible"}),se(i,e.icon),"—"!==n){i.dom.createSpan({cls:"menu-item-hotkey"}).setText(n)}})}),s.dom.addClass("editing-toolbar-dropdown-menu"),s.showAtMouseEvent(n)})}else{let n=function(e){let t=createEl("div");return t.addClass(e),t}("subitem");n&&i.SubmenuCommands.forEach(i=>{let l=ne(t,i.id);c=v(i.name,l);let m=new e.ButtonComponent(n).setTooltip(c).setClass("menu-item").onClick(()=>{t.commands.executeCommandById(i.id);const e=o.commandsManager.getActiveEditor(),n=e&&e.somethingSelected();0==a.cMenuVisibility?h.style.visibility="hidden":"following"===r?n||(h.style.visibility="hidden"):h.style.visibility="visible"});s=a.cMenuNumRows?u.setClass("editingToolbarSecond"):"top"!==r&&u.buttonEl.setAttribute("aria-label-position","top"),ae(i.icon)?u.buttonEl.innerHTML=i.icon:u.setIcon(i.icon);const g="fixed"===r;u.setClass(g?"editing-toolbar-ai-button-fixed":"editing-toolbar-ai-button-inline");let f=null;if(!g){const e=document.createElement("span");e.className="editing-toolbar-ai-button-main",f=document.createElement("span"),f.className="editing-toolbar-ai-button-label",f.textContent=me(o),e.appendChild(f),u.buttonEl.appendChild(e)}const y=document.createElement("span");y.className="editing-toolbar-ai-button-arrow",y.setAttribute("aria-hidden","true"),y.textContent=String.fromCharCode(9662),u.buttonEl.appendChild(y),n+=c;const C=async i=>{v=Date.now()+240;const n="unavailable"!==await o.aiManager.getToolbarRouteState(),s=o.commandsManager.getActiveEditor(),l=ne(t,"editing-toolbar:ai-inline-completion",!1),c=l.includes("+")?l:"",d=new e.Menu,m=()=>{d.hide()},u=t=>{const i=async()=>{if(!n)return void new e.Notice(await o.aiManager.getProviderRouteStatusText());!1!==await t.action()&&(m(),t.commandIdForLabel&&(de(o,t.commandIdForLabel),f&&(f.textContent=me(o))),re(h,a,r,o))};d.addItem(e=>{if(e.setTitle(w(t.title)).setIcon(t.icon).onClick(i),t.hotkey){e.dom.createSpan({cls:"menu-item-hotkey"}).setText(t.hotkey)}})},p=(t,i,s)=>{d.addItem(l=>{l.setTitle(w(t)).setIcon(i);const c=l.setSubmenu();s.forEach(t=>{c.addItem(i=>{if(i.setTitle(w(t.title)).setIcon(t.icon).onClick(async()=>{if(!n)return void new e.Notice(await o.aiManager.getProviderRouteStatusText());!1!==await t.action()&&(m(),t.commandIdForLabel&&(de(o,t.commandIdForLabel),f&&(f.textContent=me(o))),re(h,a,r,o))}),t.hotkey){i.dom.createSpan({cls:"menu-item-hotkey"}).setText(t.hotkey)}})})})};u({title:"Trigger AI Inline Completion",icon:"lucide-sparkles",hotkey:c||void 0,commandIdForLabel:"editing-toolbar:ai-inline-completion",action:()=>o.aiManager.triggerInlineCompletion(s)});const g=new Map;M.forEach(e=>{const t=g.get(e.group)??[];t.push(e),g.set(e.group,t)});const b={Edit:"lucide-wand-sparkles",Tone:"lucide-messages-square",Translate:"lucide-languages",Generate:"lucide-bot"};g.forEach((e,t)=>{p(t,b[t]??"lucide-sparkles",e.map(e=>({title:e.label,icon:le[e.instruction],commandIdForLabel:`editing-toolbar:ai-tools:${e.instruction}`,action:async()=>{await o.aiManager.startRewrite(s,e.instruction)}})))}),u({title:"AI Custom Rewrite",icon:le.custom,commandIdForLabel:"editing-toolbar:ai-tools:custom",action:()=>o.aiManager.openCustomRewrite(s)}),p("AI Toolbox","lucide-boxes",Y.map(e=>({title:e.label,icon:e.icon,commandIdForLabel:`editing-toolbar:ai-toolbox:${e.id}`,action:async()=>o.aiManager.runToolboxAction(s,e.id)}))),d.dom.addClass("editing-toolbar-dropdown-menu"),d.dom.addClass("editing-toolbar-ai-dropdown-menu"),d.showAtMouseEvent(i)};let v=0;y.addEventListener("click",async e=>{e.preventDefault(),e.stopPropagation(),await C(e)}),u.buttonEl.addEventListener("click",async t=>{if(t.preventDefault(),t.stopPropagation(),Date.now(){t.commands.executeCommandById(i.id);const e=o.commandsManager.getActiveEditor(),n=e&&e.somethingSelected();0==a.cMenuVisibility?h.style.visibility="hidden":"following"===r?n||(h.style.visibility="hidden"):h.style.visibility="visible"}),ae(i.icon)?s.buttonEl.innerHTML=i.icon:s.setIcon(i.icon),n+=p;let l=createEl("div");if(l.addClass("subitem"),l){l.innerHTML=function(e){return`
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Theme Colors
Standard Colors
Custom Font Colors
\n
\n
`}(o),s.buttonEl.insertAdjacentElement("afterbegin",l),pe(t,o,"x-color-picker-table");let i=l.querySelector(".x-color-picker-wrapper");new e.ButtonComponent(i).setIcon("paintbrush").setTooltip(w("Format Brush")).onClick(()=>{fe(o),o.setEN_FontColor_Format_Brush(!0),o.Temp_Notice=new e.Notice(w("Font-Color formatting brush ON!"),0)}),new e.ButtonComponent(i).setIcon("palette").setTooltip(w("Custom Font Color")).onClick(()=>{t.setting.open(),t.setting.openTabById("editing-toolbar"),setTimeout(()=>{const e=t.setting.activeTab.containerEl.querySelector(".editing-toolbar-tabs");if(e){const o=e.children[1];o?.click(),setTimeout(()=>{let e=t.setting.activeTab.containerEl.querySelector(".custom_font");e&&e.addClass?.("toolbar-cta")},100)}},200)})}}else if("editing-toolbar:change-background-color"==i.id){let s=new e.ButtonComponent(h);s.setClass("editingToolbarCommandsubItem-font-color").setTooltip(w("Background Color")).onClick(()=>{t.commands.executeCommandById(i.id);const e=o.commandsManager.getActiveEditor(),n=e&&e.somethingSelected();0==a.cMenuVisibility?h.style.visibility="hidden":"following"===r?n||(h.style.visibility="hidden"):h.style.visibility="visible"}),ae(i.icon)?s.buttonEl.innerHTML=i.icon:s.setIcon(i.icon),n+=p;let l=createEl("div");if(l.addClass("subitem"),l){l.innerHTML=function(e){return`
\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Translucent Colors
Highlighter Colors
Custom Colors
\n
\n
`}(o),s.buttonEl.insertAdjacentElement("afterbegin",l),pe(t,o,"x-backgroundcolor-picker-table");let i=l.querySelector(".x-color-picker-wrapper");new e.ButtonComponent(i).setIcon("paintbrush").setTooltip(w("Format Brush")).onClick(()=>{fe(o),o.setEN_BG_Format_Brush(!0),o.Temp_Notice=new e.Notice(w("Font-Color formatting brush ON!"),0)}),new e.ButtonComponent(i).setIcon("palette").setTooltip(w("Custom Backgroud Color")).onClick(()=>{t.setting.open(),t.setting.openTabById("editing-toolbar"),setTimeout(()=>{const e=t.setting.activeTab.containerEl.querySelector(".editing-toolbar-tabs");if(e){const o=e.children[1];o?.click(),setTimeout(()=>{let e=t.setting.activeTab.containerEl.querySelector(".custom_bg");e&&e.addClass?.("toolbar-cta")},100)}},200)})}}else{let d;ue(n,p,l,p,r)?(o.setIS_MORE_Button(!0),d=new e.ButtonComponent(b(!0))):d=new e.ButtonComponent(h);let m=ne(t,i.id);c=v(i.name,m),d.setTooltip(c).onClick(()=>{t.commands.executeCommandById(i.id);const e=o.commandsManager.getActiveEditor(),n=e&&e.somethingSelected();0==a.cMenuVisibility?h.style.visibility="hidden":"following"===r?n||(h.style.visibility="hidden"):h.style.visibility="visible"}),d.setClass("editingToolbarCommandItem"),s>=a.cMenuNumRows?d.setClass("editingToolbarSecond"):"top"!==r&&d.buttonEl.setAttribute("aria-label-position","top"),"editingToolbar-Divider-Line"==i.id&&d.setClass("editingToolbar-Divider-Line"),ae(i.icon)?d.buttonEl.innerHTML=i.icon:d.setIcon(i.icon),n+=p}}),ge(t,o,h),Math.abs(o.settings.cMenuWidth-Number(n))>n+4&&(o.settings.cMenuWidth=Number(n),setTimeout(()=>{o.saveSettings()},100))};if(!o.isLoadMobile())return;const l=t.workspace.getActiveViewOfType(e.ItemView);if(j.isAllowedViewType(l)){const i=te(t,o,r,s);if(i&&"top"!==r)return a.cMenuVisibility?"following"===r?(i.style.visibility="hidden",i.style.display=""):(i.style.visibility="visible",i.style.display=""):i.style.display="none",m&&i.style.setProperty("--editing-toolbar-background-color",m),u&&i.style.setProperty("--editing-toolbar-icon-color",u),void(c&&i.style.setProperty("--toolbar-icon-size",`${c}px`));if(n(),"top"!==r){const e=te(t,o,r,s);e&&o.setCachedToolbar(r,e)}g(o.settings),h(o.settings),function(t,o){X=e.requireApiVersion("0.15.0")?activeWindow.document:window.document;const i=X.querySelectorAll("#change-font-color-icon"),n=X.querySelectorAll("#change-background-color-icon");i.length>0&&i.forEach(e=>{e.style.fill=t});n.length>0&&n.forEach(e=>{e.style.fill=o})} /**! * Sortable 1.15.7 * @author RubaXa * @author owenm * @license MIT */(a.cMenuFontColor,a.cMenuBackgroundColor)}}()}function we(e,t,o){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var i=o.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function ve(){return ve=Object.assign?Object.assign.bind():function(e){for(var t=1;t"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function Ne(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function Re(e,t,o,i){if(e){o=o||document;do{if(null!=t&&(">"===t[0]?e.parentNode===o&&Le(e,t):Le(e,t))||i&&e===o)return e;if(e===o)break}while(e=Ne(e))}return null}var Be,_e=/\s+/g;function $e(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(_e," ").replace(" "+t+" "," ");e.className=(i+(o?" "+t:"")).replace(_e," ")}}function ze(e,t,o){var i=e&&e.style;if(i){if(void 0===o)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),void 0===t?o:o[t];t in i||-1!==t.indexOf("webkit")||(t="-webkit-"+t),i[t]=o+("string"==typeof o?"":"px")}}function Ue(e,t){var o="";if("string"==typeof e)o=e;else do{var i=ze(e,"transform");i&&"none"!==i&&(o=i+" "+o)}while(!t&&(e=e.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(o)}function Ve(e,t,o){if(e){var i=e.getElementsByTagName(t),n=0,a=i.length;if(o)for(;n=a:n<=a))return i;if(i===He())break;i=Je(i,!1)}return!1}function Ke(e,t,o,i){for(var n=0,a=0,s=e.children;a2&&void 0!==arguments[2]?arguments[2]:{},i=o.evt,n=function(e,t){if(null==e)return{};var o,i,n=function(e,t){if(null==e)return{};var o={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;o[i]=e[i]}return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=i&&"none"===o[jt]||a&&"none"===o[jt]&&l+c>i)?"vertical":"horizontal"},Zt=function(e){function t(e,o){return function(i,n,a,s){var r=i.options.group.name&&n.options.group.name&&i.options.group.name===n.options.group.name;if(null==e&&(o||r))return!0;if(null==e||!1===e)return!1;if(o&&"clone"===e)return e;if("function"==typeof e)return t(e(i,n,a,s),o)(i,n,a,s);var l=(o?i:n).options.group.name;return!0===e||"string"==typeof e&&e===l||e.join&&e.indexOf(l)>-1}}var o={},i=e.group;i&&"object"==Te(i)||(i={name:i}),o.name=i.name,o.checkPull=t(i.pull,!0),o.checkPut=t(i.put),o.revertClone=i.revertClone,e.group=o},Jt=function(){!Yt&&pt&&ze(pt,"display","none")},Xt=function(){!Yt&&pt&&ze(pt,"display","")};Ht&&!De&&document.addEventListener("click",function(e){if(Rt)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Rt=!1,!1},!0);var Qt=function(e){if(mt){e=e.touches?e.touches[0]:e;var t=(n=e.clientX,a=e.clientY,Bt.some(function(e){var t=e[it].options.emptyInsertThreshold;if(t&&!Ye(e)){var o=We(e),i=n>=o.left-t&&n<=o.right+t,r=a>=o.top-t&&a<=o.bottom+t;return i&&r?s=e:void 0}}),s);if(t){var o={};for(var i in e)e.hasOwnProperty(i)&&(o[i]=e[i]);o.target=o.rootEl=t,o.preventDefault=void 0,o.stopPropagation=void 0,t[it]._onDragOver(o)}}var n,a,s},eo=function(e){mt&&mt.parentNode[it]._isOutsideThisEl(e.target)};function to(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=ve({},t),e[it]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Gt(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==to.supportPointer&&"PointerEvent"in window&&(!Me||Pe),emptyInsertThreshold:5};for(var i in rt.initializePlugins(this,e,o),o)!(i in t)&&(t[i]=o[i]);for(var n in Zt(t),this)"_"===n.charAt(0)&&"function"==typeof this[n]&&(this[n]=this[n].bind(this));this.nativeDraggable=!t.forceFallback&&Kt,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?Fe(e,"pointerdown",this._onTapStart):(Fe(e,"mousedown",this._onTapStart),Fe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(Fe(e,"dragover",this),Fe(e,"dragenter",this)),Bt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),ve(this,nt())}function oo(e,t,o,i,n,a,s,r){var l,c,d=e[it],m=d.options.onMove;return!window.CustomEvent||Ee||Ie?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=t,l.from=e,l.dragged=o,l.draggedRect=i,l.related=n||t,l.relatedRect=a||We(t),l.willInsertAfter=r,l.originalEvent=s,e.dispatchEvent(l),m&&(c=m.call(d,l,s)),c}function io(e){e.draggable=!1}function no(){Ut=!1}function ao(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,i=0;o--;)i+=t.charCodeAt(o);return i.toString(36)}function so(e){return setTimeout(e,0)}function ro(e){return clearTimeout(e)}to.prototype={constructor:to,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(Ot=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,mt):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,o=this.el,i=this.options,n=i.preventOnFilter,a=e.type,s=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,r=(s||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||r,c=i.filter;if(function(e){Vt.length=0;var t=e.getElementsByTagName("input"),o=t.length;for(;o--;){var i=t[o];i.checked&&Vt.push(i)}}(o),!mt&&!(/mousedown|pointerdown/.test(a)&&0!==e.button||i.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!Me||!r||"SELECT"!==r.tagName.toUpperCase())&&!((r=Re(r,i.draggable,o,!1))&&r.animated||ft===r)){if(Ct=Ge(r),vt=Ge(r,i.draggable),"function"==typeof c){if(c.call(this,e,r,this))return dt({sortable:t,rootEl:l,name:"filter",targetEl:r,toEl:o,fromEl:o}),ct("filter",t,{evt:e}),void(n&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(i){if(i=Re(l,i.trim(),o,!1))return dt({sortable:t,rootEl:i,name:"filter",targetEl:r,fromEl:o,toEl:o}),ct("filter",t,{evt:e}),!0})))return void(n&&e.preventDefault());i.handle&&!Re(l,i.handle,o,!1)||this._prepareDragStart(e,s,r)}}},_prepareDragStart:function(e,t,o){var i,n=this,a=n.el,s=n.options,r=a.ownerDocument;if(o&&!mt&&o.parentNode===a){var l=We(o);if(ht=a,ut=(mt=o).parentNode,gt=mt.nextSibling,ft=o,kt=s.group,to.dragged=mt,St={target:mt,clientX:(t||e).clientX,clientY:(t||e).clientY},Mt=St.clientX-l.left,Pt=St.clientY-l.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,mt.style["will-change"]="all",i=function(){ct("delayEnded",n,{evt:e}),to.eventCanceled?n._onDrop():(n._disableDelayedDragEvents(),!Ae&&n.nativeDraggable&&(mt.draggable=!0),n._triggerDragStart(e,t),dt({sortable:n,name:"choose",originalEvent:e}),$e(mt,s.chosenClass,!0))},s.ignore.split(",").forEach(function(e){Ve(mt,e.trim(),io)}),Fe(r,"dragover",Qt),Fe(r,"mousemove",Qt),Fe(r,"touchmove",Qt),s.supportPointer?(Fe(r,"pointerup",n._onDrop),!this.nativeDraggable&&Fe(r,"pointercancel",n._onDrop)):(Fe(r,"mouseup",n._onDrop),Fe(r,"touchend",n._onDrop),Fe(r,"touchcancel",n._onDrop)),Ae&&this.nativeDraggable&&(this.options.touchStartThreshold=4,mt.draggable=!0),ct("delayStart",this,{evt:e}),!s.delay||s.delayOnTouchOnly&&!t||this.nativeDraggable&&(Ie||Ee))i();else{if(to.eventCanceled)return void this._onDrop();s.supportPointer?(Fe(r,"pointerup",n._disableDelayedDrag),Fe(r,"pointercancel",n._disableDelayedDrag)):(Fe(r,"mouseup",n._disableDelayedDrag),Fe(r,"touchend",n._disableDelayedDrag),Fe(r,"touchcancel",n._disableDelayedDrag)),Fe(r,"mousemove",n._delayedDragTouchMoveHandler),Fe(r,"touchmove",n._delayedDragTouchMoveHandler),s.supportPointer&&Fe(r,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(i,s.delay)}}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){mt&&io(mt),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;qe(e,"mouseup",this._disableDelayedDrag),qe(e,"touchend",this._disableDelayedDrag),qe(e,"touchcancel",this._disableDelayedDrag),qe(e,"pointerup",this._disableDelayedDrag),qe(e,"pointercancel",this._disableDelayedDrag),qe(e,"mousemove",this._delayedDragTouchMoveHandler),qe(e,"touchmove",this._delayedDragTouchMoveHandler),qe(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?Fe(document,"pointermove",this._onTouchMove):Fe(document,t?"touchmove":"mousemove",this._onTouchMove):(Fe(mt,"dragend",this),Fe(ht,"dragstart",this._onDragStart));try{document.selection?so(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Nt=!1,ht&&mt){ct("dragStarted",this,{evt:t}),this.nativeDraggable&&Fe(document,"dragover",eo);var o=this.options;!e&&$e(mt,o.dragClass,!1),$e(mt,o.ghostClass,!0),to.active=this,e&&this._appendGhost(),dt({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(Et){this._lastX=Et.clientX,this._lastY=Et.clientY,Jt();for(var e=document.elementFromPoint(Et.clientX,Et.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Et.clientX,Et.clientY))!==t;)t=e;if(mt.parentNode[it]._isOutsideThisEl(e),t)do{if(t[it]){if(t[it]._onDragOver({clientX:Et.clientX,clientY:Et.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}e=t}while(t=Ne(t));Xt()}},_onTouchMove:function(e){if(St){var t=this.options,o=t.fallbackTolerance,i=t.fallbackOffset,n=e.touches?e.touches[0]:e,a=pt&&Ue(pt,!0),s=pt&&a&&a.a,r=pt&&a&&a.d,l=Wt&&Lt&&Ze(Lt),c=(n.clientX-St.clientX+i.x)/(s||1)+(l?l[0]-zt[0]:0)/(s||1),d=(n.clientY-St.clientY+i.y)/(r||1)+(l?l[1]-zt[1]:0)/(r||1);if(!to.active&&!Nt){if(o&&Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))n.right+a||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>n.bottom+a||e.clientX>i.right&&e.clientY>i.top}(e,n,this)&&!g.animated){if(g===mt)return D(!1);if(g&&a===e.target&&(s=g),s&&(o=We(s)),!1!==oo(ht,a,mt,t,s,o,e,!!s))return P(),g&&g.nextSibling?a.insertBefore(mt,g.nextSibling):a.appendChild(mt),ut=a,O(),D(!0)}else if(g&&function(e,t,o){var i=We(Ke(o.el,0,o.options,!0)),n=ot(o.el,o.options,pt),a=10;return t?e.clientXd+c*a/2:lm-qt)return-Ft}else if(l>d+c*(1-n)/2&&lm-c*a/2))return l>d+c/2?1:-1;return 0}(e,s,o,n,v?1:r.swapThreshold,null==r.invertedSwapThreshold?r.swapThreshold:r.invertedSwapThreshold,$t,Ot===s),0!==b){var S=Ge(mt);do{S-=b,C=ut.children[S]}while(C&&("none"===ze(C,"display")||C===pt))}if(0===b||C===s)return D(!1);Ot=s,Ft=b;var E=s.nextElementSibling,I=!1,A=oo(ht,a,mt,t,s,o,e,I=1===b);if(!1!==A)return 1!==A&&-1!==A||(I=1===A),Ut=!0,setTimeout(no,30),P(),I&&!E?a.appendChild(mt):s.parentNode.insertBefore(mt,I?E:s),k&&et(k,0,T-k.scrollTop),ut=mt.parentNode,void 0===y||$t||(qt=Math.abs(y-We(s)[x])),O(),D(!0)}if(a.contains(mt))return D(!1)}return!1}function M(r,l){ct(r,p,ke({evt:e,isOwner:d,axis:n?"vertical":"horizontal",revert:i,dragRect:t,targetRect:o,canSort:m,fromSortable:u,target:s,completed:D,onMove:function(o,i){return oo(ht,a,mt,t,o,We(o),e,i)},changed:O},l))}function P(){M("dragOverAnimationCapture"),p.captureAnimationState(),p!==u&&u.captureAnimationState()}function D(t){return M("dragOverCompleted",{insertion:t}),t&&(d?c._hideClone():c._showClone(p),p!==u&&($e(mt,Tt?Tt.options.ghostClass:c.options.ghostClass,!1),$e(mt,r.ghostClass,!0)),Tt!==p&&p!==to.active?Tt=p:p===to.active&&Tt&&(Tt=null),u===p&&(p._ignoreWhileAnimating=s),p.animateAll(function(){M("dragOverAnimationComplete"),p._ignoreWhileAnimating=null}),p!==u&&(u.animateAll(),u._ignoreWhileAnimating=null)),(s===mt&&!mt.animated||s===a&&!s.animated)&&(Ot=null),r.dragoverBubble||e.rootEl||s===document||(mt.parentNode[it]._isOutsideThisEl(e.target),!t&&Qt(e)),!r.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),h=!0}function O(){wt=Ge(mt),xt=Ge(mt,r.draggable),dt({sortable:p,name:"change",toEl:a,newIndex:wt,newDraggableIndex:xt,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){qe(document,"mousemove",this._onTouchMove),qe(document,"touchmove",this._onTouchMove),qe(document,"pointermove",this._onTouchMove),qe(document,"dragover",Qt),qe(document,"mousemove",Qt),qe(document,"touchmove",Qt)},_offUpEvents:function(){var e=this.el.ownerDocument;qe(e,"mouseup",this._onDrop),qe(e,"touchend",this._onDrop),qe(e,"pointerup",this._onDrop),qe(e,"pointercancel",this._onDrop),qe(e,"touchcancel",this._onDrop),qe(document,"selectstart",this)},_onDrop:function(e){var t=this.el,o=this.options;wt=Ge(mt),xt=Ge(mt,o.draggable),ct("drop",this,{evt:e}),ut=mt&&mt.parentNode,wt=Ge(mt),xt=Ge(mt,o.draggable),to.eventCanceled||(Nt=!1,$t=!1,_t=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ro(this.cloneId),ro(this._dragStartId),this.nativeDraggable&&(qe(document,"drop",this),qe(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Me&&ze(document.body,"user-select",""),ze(mt,"transform",""),e&&(Dt&&(e.cancelable&&e.preventDefault(),!o.dropBubble&&e.stopPropagation()),pt&&pt.parentNode&&pt.parentNode.removeChild(pt),(ht===ut||Tt&&"clone"!==Tt.lastPutMode)&&bt&&bt.parentNode&&bt.parentNode.removeChild(bt),mt&&(this.nativeDraggable&&qe(mt,"dragend",this),io(mt),mt.style["will-change"]="",Dt&&!Nt&&$e(mt,Tt?Tt.options.ghostClass:this.options.ghostClass,!1),$e(mt,this.options.chosenClass,!1),dt({sortable:this,name:"unchoose",toEl:ut,newIndex:null,newDraggableIndex:null,originalEvent:e}),ht!==ut?(wt>=0&&(dt({rootEl:ut,name:"add",toEl:ut,fromEl:ht,originalEvent:e}),dt({sortable:this,name:"remove",toEl:ut,originalEvent:e}),dt({rootEl:ut,name:"sort",toEl:ut,fromEl:ht,originalEvent:e}),dt({sortable:this,name:"sort",toEl:ut,originalEvent:e})),Tt&&Tt.save()):wt!==Ct&&wt>=0&&(dt({sortable:this,name:"update",toEl:ut,originalEvent:e}),dt({sortable:this,name:"sort",toEl:ut,originalEvent:e})),to.active&&(null!=wt&&-1!==wt||(wt=Ct,xt=vt),dt({sortable:this,name:"end",toEl:ut,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){ct("nulling",this),ht=mt=ut=pt=gt=bt=ft=yt=St=Et=Dt=wt=xt=Ct=vt=Ot=Ft=Tt=kt=to.dragged=to.ghost=to.clone=to.active=null;var e=this.el;Vt.forEach(function(t){e.contains(t)&&(t.checked=!0)}),Vt.length=It=At=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":mt&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],o=this.el.children,i=0,n=o.length,a=this.options;i{t.createEl("p",{text:e})});const o=t.createDiv("confirm-modal-buttons");new e.ButtonComponent(o).setButtonText(this.options.cancelText).onClick(()=>this.close()),new e.ButtonComponent(o).setButtonText(this.options.confirmText).setCta().onClick(async()=>{await this.options.onConfirm(),this.close()})}onClose(){const{contentEl:e}=this;e.empty()}static show(e,t){new ko(e,t).open()}}class To extends e.Modal{constructor(e,t){super(e),this.changelogContent="",this.changelogLoaded=!1,this.plugin=t}async loadChangelog(){try{const t=await e.request({url:"https://raw.githubusercontent.com/PKM-er/obsidian-editing-toolbar/master/CHANGELOG.md",method:"GET"});if(!t)throw new Error("无法获取 Changelog 内容");{const e=t.split("\n");let o="",i=[],n=!1;for(const t of e)if(t.startsWith("## ")&&!o)o=t.substring(3).trim(),n=!0,i.push(t);else{if(t.startsWith("## ")&&n)break;n&&i.push(t)}this.changelogContent=i.join("\n")}}catch(e){console.error("加载 Changelog 时出错:",e),this.changelogContent="### 无法加载更新说明\n\n请[点击此处查看最新更新说明](https://github.com/PKM-er/obsidian-editing-toolbar/blob/master/CHANGELOG.md)"}this.changelogLoaded=!0,this.updateChangelogDisplay()}updateChangelogDisplay(){this.changelogContainer&&this.changelogContentEl&&this.changelogLoaded&&(this.changelogContentEl.empty(),e.MarkdownRenderer.renderMarkdown(this.changelogContent,this.changelogContentEl,"",this.plugin))}async fixCommandIds(){try{const t={"editor:toggle-numbered-list":"editing-toolbar:toggle-numbered-list","editor:toggle-bullet-list":"editing-toolbar:toggle-bullet-list","editor:toggle-highlight":"editing-toolbar:toggle-highlight","toggle-highlight":"editing-toolbar:toggle-highlight","editing-toolbar:editor:toggle-bold":"editing-toolbar:toggle-bold","editing-toolbar:editor:toggle-italics":"editing-toolbar:toggle-italics","editing-toolbar:editor:toggle-strikethrough":"editing-toolbar:toggle-strikethrough","editing-toolbar:editor:toggle-inline-math":"editing-toolbar:toggle-inline-math","editing-toolbar:editor:insert-callout":"editing-toolbar:insert-callout","editing-toolbar:editor:insert-link":"editing-toolbar:insert-link","cMenuToolbar-Divider-Line":"editingToolbar-Divider-Line"};let o=!1;const i=this.plugin.settings,n=e=>{e&&Array.isArray(e)&&e.forEach(e=>{e.id&&t[e.id]&&(e.id=t[e.id],o=!0),"editing-toolbar:format-eraser"===e.id&&(e.icon="eraser",o=!0),"editing-toolbar:change-font-color"===e.id&&(e.icon='',o=!0),e.SubmenuCommands&&n(e.SubmenuCommands)})},a=e=>{if(!e||!Array.isArray(e))return!1;for(const t of e){if("editing-toolbar:toggle-format-brush"===t.id)return!0;if(t.SubmenuCommands){if(a(t.SubmenuCommands))return!0}}return!1},s=e=>{if(!e||!Array.isArray(e))return!1;if(!a(e)&&e.length>=2){const t={id:"editing-toolbar:toggle-format-brush",name:"Format Brush",icon:"paintbrush"};return e.splice(2,0,t),!0}return!1},r=e=>{if(!e||!Array.isArray(e))return!1;for(const t of e)if("SubmenuCommands-text-tools"===t.id)return!0;return!1},l=e=>{if(!e||!Array.isArray(e))return!1;if(!r(e)){const t=W.menuCommands.find(e=>"SubmenuCommands-text-tools"===e.id);if(t){const o=11;return e.length>=o?e.splice(o,0,t):e.push(t),!0}}return!1};i.menuCommands&&(n(i.menuCommands),s(i.menuCommands)&&(o=!0),l(i.menuCommands)&&(o=!0)),i.enableMultipleConfig&&(i.followingCommands&&(n(i.followingCommands),s(i.followingCommands)&&(o=!0)),i.topCommands&&(n(i.topCommands),s(i.topCommands)&&(o=!0),l(i.topCommands)&&(o=!0)),i.fixedCommands&&(n(i.fixedCommands),s(i.fixedCommands)&&(o=!0)),i.mobileCommands&&(n(i.mobileCommands),s(i.mobileCommands)&&(o=!0))),o?(await this.plugin.saveSettings(),new e.Notice(w("Command IDs have been successfully repaired!")),dispatchEvent(new Event("editingToolbar-NewCommand"))):new e.Notice(w("No command IDs need to be repaired"))}catch(t){console.error("修复命令ID时出错:",t),new e.Notice(w("Error repairing command IDs, please check the console for details"))}}async reloadPlugin(e){const{plugins:t}=this.app;try{await t.disablePlugin(e),await t.enablePlugin(e)}catch(e){console.error(e)}}async restoreDefaultSettings(){try{const t=this.plugin.settings.lastVersion,o=this.plugin.settings.customCommands;this.plugin.settings={...W,lastVersion:t,customCommands:o},await this.plugin.saveSettings(),new e.Notice(w("Successfully restored default settings! (Custom commands preserved)")),this.reloadPlugin(this.plugin.manifest.id),this.close()}catch(t){console.error("恢复默认设置时出错:",t),new e.Notice(w("Error restoring default settings, please check the console for details"))}}onOpen(){const{contentEl:t}=this;t.createEl("h2",{text:`${this.plugin.manifest.name} v${this.plugin.manifest.version} · ${w("Tips")}`}),t.createEl("p",{text:w("Notice:")});const o=t.createEl("ul");o.createEl("li",{text:w("⚠️This update is not compatible with 2.x version command ids, please click [Repair command] to be compatible")}),o.createEl("li",{text:w("⚠️If you want to restore the default settings, please click [Restore default settings]")}),this.changelogContainer=t.createDiv({cls:"changelog-container"}),this.changelogContainer.createEl("h3",{text:w("Latest Changes")}),this.changelogContentEl=this.changelogContainer.createDiv({cls:"changelog-content"}),this.changelogContentEl.setText(w("Loading changelog...")),setTimeout(()=>{this.loadChangelog()},100),new e.Setting(t).setName(w("🔧Data repair")).setDesc(w("This update changed the ID of some commands, please click this button to repair the commands to ensure the toolbar works properly")).addButton(e=>e.setButtonText(w("Repair command ID")).onClick(async()=>{await this.fixCommandIds()})),new e.Setting(t).setName(w("🔄Restore default settings")).setDesc(w("This will reset all your custom configurations, but custom commands will be preserved")).addButton(e=>e.setButtonText(w("Restore default")).onClick(async()=>{ko.show(this.app,{message:w("Are you sure you want to restore all settings to default? But custom commands will be preserved."),onConfirm:async()=>{await this.restoreDefaultSettings()}})})),new e.Setting(t).setName(w("📋View full changelog")).setDesc(w("Open the complete changelog in your browser")).addButton(e=>e.setButtonText(w("Open changelog")).onClick(()=>{window.open("https://github.com/PKM-er/obsidian-editing-toolbar/blob/master/CHANGELOG.md","_blank")})),new e.Setting(t).addButton(e=>e.setButtonText(w("Close")).onClick(()=>{this.close()})),t.createEl("style",{text:"\n .changelog-container {\n margin-top: 20px;\n margin-bottom: 20px;\n padding: 10px;\n border: 1px solid var(--background-modifier-border);\n border-radius: 5px;\n max-height: 200px;\n overflow-y: auto;\n }\n .changelog-content {\n padding: 0 10px;\n }\n .changelog-content a {\n text-decoration: underline;\n }\n "})}onClose(){const{contentEl:e}=this;e.empty()}}function So(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e} /*! Pickr 1.8.4 MIT | https://github.com/Simonwep/pickr */ var Eo=function(e){var t={exports:{}};return e(t,t.exports),t.exports}(function(e,t){self,e.exports=(()=>{var e={d:(t,o)=>{for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.d(t,{default:()=>D});var o={};function i(e,t,o,i){let n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};t instanceof HTMLCollection||t instanceof NodeList?t=Array.from(t):Array.isArray(t)||(t=[t]),Array.isArray(o)||(o=[o]);for(const a of t)for(const t of o)a[e](t,i,{capture:!1,...n});return Array.prototype.slice.call(arguments,1)}e.r(o),e.d(o,{adjustableInputNumbers:()=>d,createElementFromString:()=>s,createFromTemplate:()=>r,eventPath:()=>l,off:()=>a,on:()=>n,resolveElement:()=>c});const n=i.bind(null,"addEventListener"),a=i.bind(null,"removeEventListener");function s(e){const t=document.createElement("div");return t.innerHTML=e.trim(),t.firstElementChild}function r(e){const t=(e,t)=>{const o=e.getAttribute(t);return e.removeAttribute(t),o},o=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t(e,":obj"),a=t(e,":ref"),s=n?i[n]={}:i;a&&(i[a]=e);for(const i of Array.from(e.children)){const e=t(i,":arr"),n=o(i,e?{}:s);e&&(s[e]||(s[e]=[])).push(Object.keys(n).length?n:i)}return i};return o(s(e))}function l(e){let t=e.path||e.composedPath&&e.composedPath();if(t)return t;let o=e.target.parentElement;for(t=[e.target,o];o=o.parentElement;)t.push(o);return t.push(document,window),t}function c(e){return e instanceof Element?e:"string"==typeof e?e.split(/>>/g).reduce((e,t,o,i)=>(e=e.querySelector(t),o1&&void 0!==arguments[1]?arguments[1]:e=>e;function o(o){const i=[.001,.01,.1][Number(o.shiftKey||2*o.ctrlKey)]*(o.deltaY<0?1:-1);let n=0,a=e.selectionStart;e.value=e.value.replace(/[\d.]+/g,(e,o)=>o<=a&&o+e.length>=a?(a=o,t(Number(e),i,n)):(n++,e)),e.focus(),e.setSelectionRange(a,a),o.preventDefault(),e.dispatchEvent(new Event("input"))}n(e,"focus",()=>n(window,"wheel",o,{passive:!1})),n(e,"blur",()=>a(window,"wheel",o))}const{min:m,max:u,floor:p,round:h}=Math;function g(e,t,o){t/=100,o/=100;const i=p(e=e/360*6),n=e-i,a=o*(1-t),s=o*(1-n*t),r=o*(1-(1-n)*t),l=i%6;return[255*[o,s,a,a,r,o][l],255*[r,o,o,s,a,a][l],255*[a,a,r,o,o,s][l]]}function f(e,t,o){return g(e,t,o).map(e=>h(e).toString(16).padStart(2,"0"))}function b(e,t,o){const i=g(e,t,o),n=i[0]/255,a=i[1]/255,s=i[2]/255,r=m(1-n,1-a,1-s);return[100*(1===r?0:(1-n-r)/(1-r)),100*(1===r?0:(1-a-r)/(1-r)),100*(1===r?0:(1-s-r)/(1-r)),100*r]}function y(e,t,o){const i=(2-(t/=100))*(o/=100)/2;return 0!==i&&(t=1===i?0:i<.5?t*o/(2*i):t*o/(2-2*i)),[e,100*t,100*i]}function C(e,t,o){const i=m(e/=255,t/=255,o/=255),n=u(e,t,o),a=n-i;let s,r;if(0===a)s=r=0;else{r=a/n;const i=((n-e)/6+a/2)/a,l=((n-t)/6+a/2)/a,c=((n-o)/6+a/2)/a;e===n?s=c-l:t===n?s=1/3+i-c:o===n&&(s=2/3+l-i),s<0?s+=1:s>1&&(s-=1)}return[360*s,100*r,100*n]}function w(e,t,o,i){return t/=100,o/=100,[...C(255*(1-m(1,(e/=100)*(1-(i/=100))+i)),255*(1-m(1,t*(1-i)+i)),255*(1-m(1,o*(1-i)+i)))]}function v(e,t,o){t/=100;const i=2*(t*=(o/=100)<.5?o:1-o)/(o+t)*100,n=100*(o+t);return[e,isNaN(i)?0:i,n]}function x(e){return C(...e.match(/.{2}/g).map(e=>parseInt(e,16)))}function k(e){e=e.match(/^[a-zA-Z]+$/)?function(e){if("black"===e.toLowerCase())return"#000";const t=document.createElement("canvas").getContext("2d");return t.fillStyle=e,"#000"===t.fillStyle?null:t.fillStyle}(e):e;const t={cmyk:/^cmyk[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)/i,rgba:/^((rgba)|rgb)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsla:/^((hsla)|hsl)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hsva:/^((hsva)|hsv)[\D]+([\d.]+)[\D]+([\d.]+)[\D]+([\d.]+)[\D]*?([\d.]+|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i},o=e=>e.map(e=>/^(|\d+)\.\d+|\d+$/.test(e)?Number(e):void 0);let i;e:for(const n in t){if(!(i=t[n].exec(e)))continue;const a=e=>!!i[2]==("number"==typeof e);switch(n){case"cmyk":{const[,e,t,a,s]=o(i);if(e>100||t>100||a>100||s>100)break e;return{values:w(e,t,a,s),type:n}}case"rgba":{const[,,,e,t,s,r]=o(i);if(e>255||t>255||s>255||r<0||r>1||!a(r))break e;return{values:[...C(e,t,s),r],a:r,type:n}}case"hexa":{let[,e]=i;4!==e.length&&3!==e.length||(e=e.split("").map(e=>e+e).join(""));const t=e.substring(0,6);let o=e.substring(6);return o=o?parseInt(o,16)/255:void 0,{values:[...x(t),o],a:o,type:n}}case"hsla":{const[,,,e,t,s,r]=o(i);if(e>360||t>100||s>100||r<0||r>1||!a(r))break e;return{values:[...v(e,t,s),r],a:r,type:n}}case"hsva":{const[,,,e,t,s,r]=o(i);if(e>360||t>100||s>100||r<0||r>1||!a(r))break e;return{values:[e,t,s,r],a:r,type:n}}}}return{values:null,type:null}}function T(){const e=(e,t)=>function(){let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;return t(~o?e.map(e=>Number(e.toFixed(o))):e)},t={h:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,s:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,v:arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a:arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,toHSVA(){const o=[t.h,t.s,t.v,t.a];return o.toString=e(o,e=>`hsva(${e[0]}, ${e[1]}%, ${e[2]}%, ${t.a})`),o},toHSLA(){const o=[...y(t.h,t.s,t.v),t.a];return o.toString=e(o,e=>`hsla(${e[0]}, ${e[1]}%, ${e[2]}%, ${t.a})`),o},toRGBA(){const o=[...g(t.h,t.s,t.v),t.a];return o.toString=e(o,e=>`rgba(${e[0]}, ${e[1]}, ${e[2]}, ${t.a})`),o},toCMYK(){const o=b(t.h,t.s,t.v);return o.toString=e(o,e=>`cmyk(${e[0]}%, ${e[1]}%, ${e[2]}%, ${e[3]}%)`),o},toHEXA(){const e=f(t.h,t.s,t.v),o=t.a>=1?"":Number((255*t.a).toFixed(0)).toString(16).toUpperCase().padStart(2,"0");return o&&e.push(o),e.toString=()=>`#${e.join("").toUpperCase()}`,e},clone:()=>T(t.h,t.s,t.v,t.a)};return t}const S=e=>Math.max(Math.min(e,1),0);function E(e){const t={options:Object.assign({lock:null,onchange:()=>0,onstop:()=>0},e),_keyboard(e){const{options:o}=t,{type:i,key:n}=e;if(document.activeElement===o.wrapper){const{lock:o}=t.options,a="ArrowUp"===n,s="ArrowRight"===n,r="ArrowDown"===n,l="ArrowLeft"===n;if("keydown"===i&&(a||s||r||l)){let i=0,n=0;"v"===o?i=a||s?1:-1:"h"===o?i=a||s?-1:1:(n=a?-1:r?1:0,i=l?-1:s?1:0),t.update(S(t.cache.x+.01*i),S(t.cache.y+.01*n)),e.preventDefault()}else n.startsWith("Arrow")&&(t.options.onstop(),e.preventDefault())}},_tapstart(e){n(document,["mouseup","touchend","touchcancel"],t._tapstop),n(document,["mousemove","touchmove"],t._tapmove),e.cancelable&&e.preventDefault(),t._tapmove(e)},_tapmove(e){const{options:o,cache:i}=t,{lock:n,element:a,wrapper:s}=o,r=s.getBoundingClientRect();let l=0,c=0;if(e){const t=e&&e.touches&&e.touches[0];l=e?(t||e).clientX:0,c=e?(t||e).clientY:0,lr.left+r.width&&(l=r.left+r.width),cr.top+r.height&&(c=r.top+r.height),l-=r.left,c-=r.top}else i&&(l=i.x*r.width,c=i.y*r.height);"h"!==n&&(a.style.left=`calc(${l/r.width*100}% - ${a.offsetWidth/2}px)`),"v"!==n&&(a.style.top=`calc(${c/r.height*100}% - ${a.offsetHeight/2}px)`),t.cache={x:l/r.width,y:c/r.height};const d=S(l/r.width),m=S(c/r.height);switch(n){case"v":return o.onchange(d);case"h":return o.onchange(m);default:return o.onchange(d,m)}},_tapstop(){t.options.onstop(),a(document,["mouseup","touchend","touchcancel"],t._tapstop),a(document,["mousemove","touchmove"],t._tapmove)},trigger(){t._tapmove()},update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const{left:i,top:n,width:a,height:s}=t.options.wrapper.getBoundingClientRect();"h"===t.options.lock&&(o=e),t._tapmove({clientX:i+a*e,clientY:n+s*o})},destroy(){const{options:e,_tapstart:o,_keyboard:i}=t;a(document,["keydown","keyup"],i),a([e.wrapper,e.element],"mousedown",o),a([e.wrapper,e.element],"touchstart",o,{passive:!1})}},{options:o,_tapstart:i,_keyboard:s}=t;return n([o.wrapper,o.element],"mousedown",i),n([o.wrapper,o.element],"touchstart",i,{passive:!1}),n(document,["keydown","keyup"],s),t}function I(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e=Object.assign({onchange:()=>0,className:"",elements:[]},e);const t=n(e.elements,"click",t=>{e.elements.forEach(o=>o.classList[t.target===o?"add":"remove"](e.className)),e.onchange(t),t.stopPropagation()});return{destroy:()=>a(...t)}}const A={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8},M=(e,t,o)=>{const{container:i,margin:n,position:a,variantFlipOrder:s,positionFlipOrder:r}={container:document.documentElement.getBoundingClientRect(),...A,...o},{left:l,top:c}=t.style;t.style.left="0",t.style.top="0";const d=e.getBoundingClientRect(),m=t.getBoundingClientRect(),u={t:d.top-m.height-n,b:d.bottom+n,r:d.right+n,l:d.left-m.width-n},p={vs:d.left,vm:d.left+d.width/2+-m.width/2,ve:d.left+d.width-m.width,hs:d.top,hm:d.bottom-d.height/2-m.height/2,he:d.bottom-m.height},[h,g="middle"]=a.split("-"),f=r[h],b=s[g],{top:y,left:C,bottom:w,right:v}=i;for(const e of f){const o="t"===e||"b"===e,i=u[e],[n,a]=o?["top","left"]:["left","top"],[s,r]=o?[m.height,m.width]:[m.width,m.height],[l,c]=o?[w,v]:[v,w],[d,h]=o?[y,C]:[C,y];if(!(il))for(const s of b){const l=p[(o?"v":"h")+s];if(!(lc))return t.style[a]=l-m[a]+"px",t.style[n]=i-m[n]+"px",e+s}}return t.style.left=l,t.style.top=c,null};function P(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}class D{constructor(e){P(this,"_initializingActive",!0),P(this,"_recalc",!0),P(this,"_nanopop",null),P(this,"_root",null),P(this,"_color",T()),P(this,"_lastColor",T()),P(this,"_swatchColors",[]),P(this,"_setupAnimationFrame",null),P(this,"_eventListener",{init:[],save:[],hide:[],show:[],clear:[],change:[],changestop:[],cancel:[],swatchselect:[]}),this.options=e=Object.assign({...D.DEFAULT_OPTIONS},e);const{swatches:t,components:o,theme:i,sliders:n,lockOpacity:a,padding:s}=e;["nano","monolith"].includes(i)&&!n&&(e.sliders="h"),o.interaction||(o.interaction={});const{preview:r,opacity:l,hue:c,palette:d}=o;o.opacity=!a&&l,o.palette=d||r||l||c,this._preBuild(),this._buildComponents(),this._bindEvents(),this._finalBuild(),t&&t.length&&t.forEach(e=>this.addSwatch(e));const{button:m,app:u}=this._root;this._nanopop=((e,t,o)=>{const i="object"!=typeof e||e instanceof HTMLElement?{reference:e,popper:t,...o}:e;return{update(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i;const{reference:t,popper:o}=Object.assign(i,e);if(!o||!t)throw new Error("Popper- or reference-element missing.");return M(t,o,i)}}})(m,u,{margin:s}),m.setAttribute("role","button"),m.setAttribute("aria-label",this._t("btn:toggle"));const p=this;this._setupAnimationFrame=requestAnimationFrame(function t(){if(!u.offsetWidth)return p._setupAnimationFrame=requestAnimationFrame(t);p.setColor(e.default),p._rePositioningPicker(),e.defaultRepresentation&&(p._representation=e.defaultRepresentation,p.setColorRepresentation(p._representation)),e.showAlways&&p.show(),p._initializingActive=!1,p._emit("init")})}_preBuild(){const{options:e}=this;for(const t of["el","container"])e[t]=c(e[t]);this._root=(e=>{const{components:t,useAsButton:o,inline:i,appClass:n,theme:a,lockOpacity:s}=e.options,l=e=>e?"":'style="display:none" hidden',c=t=>e._t(t),d=r(`\n
\n\n ${o?"":''}\n\n
\n
\n
\n \n
\n
\n\n
\n
\n
\n
\n\n
\n
\n
\n
\n\n
\n
\n
\n
\n
\n\n
\n\n
\n \n\n \n \n \n \n \n\n \n \n \n
\n
\n
\n `),m=d.interaction;return m.options.find(e=>!e.hidden&&!e.classList.add("active")),m.type=()=>m.options.find(e=>e.classList.contains("active")),d})(this),e.useAsButton&&(this._root.button=e.el),e.container.appendChild(this._root.root)}_finalBuild(){const e=this.options,t=this._root;if(e.container.removeChild(t.root),e.inline){const o=e.el.parentElement;e.el.nextSibling?o.insertBefore(t.app,e.el.nextSibling):o.appendChild(t.app)}else e.container.appendChild(t.app);e.useAsButton?e.inline&&e.el.remove():e.el.parentNode.replaceChild(t.root,e.el),e.disabled&&this.disable(),e.comparison||(t.button.style.transition="none",e.useAsButton||(t.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){const e=this,t=this.options.components,o=(e.options.sliders||"v").repeat(2),[i,n]=o.match(/^[vh]+$/g)?o:[],a=()=>this._color||(this._color=this._lastColor.clone()),s={palette:E({element:e._root.palette.picker,wrapper:e._root.palette.palette,onstop:()=>e._emit("changestop","slider",e),onchange(o,i){if(!t.palette)return;const n=a(),{_root:s,options:r}=e,{lastColor:l,currentColor:c}=s.preview;e._recalc&&(n.s=100*o,n.v=100-100*i,n.v<0&&(n.v=0),e._updateOutput("slider"));const d=n.toRGBA().toString(0);this.element.style.background=d,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${n.a}), transparent),\n linear-gradient(to left, hsla(${n.h}, 100%, 50%, ${n.a}), rgba(255, 255, 255, ${n.a}))\n `,r.comparison?r.useAsButton||e._lastColor||l.style.setProperty("--pcr-color",d):(s.button.style.setProperty("--pcr-color",d),s.button.classList.remove("clear"));const m=n.toHEXA().toString();for(const{el:t,color:o}of e._swatchColors)t.classList[m===o.toHEXA().toString()?"add":"remove"]("pcr-active");c.style.setProperty("--pcr-color",d)}}),hue:E({lock:"v"===n?"h":"v",element:e._root.hue.picker,wrapper:e._root.hue.slider,onstop:()=>e._emit("changestop","slider",e),onchange(o){if(!t.hue||!t.palette)return;const i=a();e._recalc&&(i.h=360*o),this.element.style.backgroundColor=`hsl(${i.h}, 100%, 50%)`,s.palette.trigger()}}),opacity:E({lock:"v"===i?"h":"v",element:e._root.opacity.picker,wrapper:e._root.opacity.slider,onstop:()=>e._emit("changestop","slider",e),onchange(o){if(!t.opacity||!t.palette)return;const i=a();e._recalc&&(i.a=Math.round(100*o)/100),this.element.style.background=`rgba(0, 0, 0, ${i.a})`,s.palette.trigger()}}),selectable:I({elements:e._root.interaction.options,className:"active",onchange(t){e._representation=t.target.getAttribute("data-type").toUpperCase(),e._recalc&&e._updateOutput("swatch")}})};this._components=s}_bindEvents(){const{_root:e,options:t}=this,o=[n(e.interaction.clear,"click",()=>this._clearColor()),n([e.interaction.cancel,e.preview.lastColor],"click",()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")}),n(e.interaction.save,"click",()=>{!this.applyColor()&&!t.showAlways&&this.hide()}),n(e.interaction.result,["keyup","input"],e=>{this.setColor(e.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),e.stopImmediatePropagation()}),n(e.interaction.result,["focus","blur"],e=>{this._recalc="blur"===e.type,this._recalc&&this._updateOutput(null)}),n([e.palette.palette,e.palette.picker,e.hue.slider,e.hue.picker,e.opacity.slider,e.opacity.picker],["mousedown","touchstart"],()=>this._recalc=!0,{passive:!0})];if(!t.showAlways){const i=t.closeWithKey;o.push(n(e.button,"click",()=>this.isOpen()?this.hide():this.show()),n(document,"keyup",e=>this.isOpen()&&(e.key===i||e.code===i)&&this.hide()),n(document,["touchstart","mousedown"],t=>{this.isOpen()&&!l(t).some(t=>t===e.app||t===e.button)&&this.hide()},{capture:!0}))}if(t.adjustableNumbers){const t={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};d(e.interaction.result,(e,o,i)=>{const n=t[this.getColorRepresentation().toLowerCase()];if(n){const t=n[i],a=e+(t>=100?1e3*o:o);return a<=0?0:Number((a{i.isOpen()&&(t.closeOnScroll&&i.hide(),null===e?(e=setTimeout(()=>e=null,100),requestAnimationFrame(function t(){i._rePositioningPicker(),null!==e&&requestAnimationFrame(t)})):(clearTimeout(e),e=setTimeout(()=>e=null,100)))},{capture:!0}))}this._eventBindings=o}_rePositioningPicker(){const{options:e}=this;if(!e.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:e.position})){const e=this._root.app,t=e.getBoundingClientRect();e.style.top=(window.innerHeight-t.height)/2+"px",e.style.left=(window.innerWidth-t.width)/2+"px"}}_updateOutput(e){const{_root:t,_color:o,options:i}=this;if(t.interaction.type()){const e=`to${t.interaction.type().getAttribute("data-type")}`;t.interaction.result.value="function"==typeof o[e]?o[e]().toString(i.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",o,e,this)}_clearColor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{_root:t,options:o}=this;o.useAsButton||t.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),t.button.classList.add("clear"),o.showAlways||this.hide(),this._lastColor=null,this._initializingActive||e||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(e){const{values:t,type:o,a:i}=k(e),{lockOpacity:n}=this.options,a=void 0!==i&&1!==i;return t&&3===t.length&&(t[3]=void 0),{values:!t||n&&a?null:t,type:o}}_t(e){return this.options.i18n[e]||D.I18N_DEFAULTS[e]}_emit(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),i=1;ie(...o,this))}on(e,t){return this._eventListener[e].push(t),this}off(e,t){const o=this._eventListener[e]||[],i=o.indexOf(t);return~i&&o.splice(i,1),this}addSwatch(e){const{values:t}=this._parseLocalColor(e);if(t){const{_swatchColors:e,_root:o}=this,i=T(...t),a=s(`