rpg-westreiche/RPG/.obsidian/plugins/editing-toolbar/main.js

12 lines
652 KiB
JavaScript
Raw Normal View History

2026-03-04 22:28:24 +01:00
"use strict";var e=require("obsidian");const t=["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","edi
/**!
* Sortable 1.15.6
* @author RubaXa <trash@rubaxa.org>
* @author owenm <owen23355@gmail.com>
* @license MIT
*/(n.cMenuFontColor,n.cMenuBackgroundColor)}}()}function ka(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,o)}return i}function Sa(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ka(Object(i),!0).forEach(function(t){Ea(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ka(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function Ta(e){return Ta="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ta(e)}function Ea(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ma(){return Ma=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(e[o]=i[o])}return e},Ma.apply(this,arguments)}function Aa(e,t){if(null==e)return{};var i,o,n=function(e,t){if(null==e)return{};var i,o,n={},s=Object.keys(e);for(o=0;o<s.length;o++)i=s[o],t.indexOf(i)>=0||(n[i]=e[i]);return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(o=0;o<s.length;o++)i=s[o],t.indexOf(i)>=0||Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function Ia(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var Da=Ia(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Oa=Ia(/Edge/i),Ba=Ia(/firefox/i),La=Ia(/safari/i)&&!Ia(/chrome/i)&&!Ia(/android/i),Pa=Ia(/iP(ad|od|hone)/i),Na=Ia(/chrome/i)&&Ia(/android/i),Ra={capture:!1,passive:!1};function Fa(e,t,i){e.addEventListener(t,i,!Da&&Ra)}function qa(e,t,i){e.removeEventListener(t,i,!Da&&Ra)}function _a(e,t){if(t){if(">"===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 za(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Va(e,t,i,o){if(e){i=i||document;do{if(null!=t&&(">"===t[0]?e.parentNode===i&&_a(e,t):_a(e,t))||o&&e===i)return e;if(e===i)break}while(e=za(e))}return null}var Wa,Ha=/\s+/g;function $a(e,t,i){if(e&&t)if(e.classList)e.classList[i?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(Ha," ").replace(" "+t+" "," ");e.className=(o+(i?" "+t:"")).replace(Ha," ")}}function Ua(e,t,i){var o=e&&e.style;if(o){if(void 0===i)return document.defaultView&&document.defaultView.getComputedStyle?i=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(i=e.currentStyle),void 0===t?i:i[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=i+("string"==typeof i?"":"px")}}function ja(e,t){var i="";if("string"==typeof e)i=e;else do{var o=Ua(e,"transform");o&&"none"!==o&&(i=o+" "+i)}while(!t&&(e=e.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(i)}function Ya(e,t,i){if(e){var o=e.getElementsByTagName(t),n=0,s=o.length;if(i)for(;n<s;n++)i(o[n],n);return o}return[]}function Ga(){var e=document.scrollingElement;return e||document.documentElement}function Za(e,t,i,o,n){if(e.getBoundingClientRect||e===window){var s,r,a,l,c,d,h;if(e!==window&&e.parentNode&&e!==Ga()?(r=(s=e.getBoundingClientRect()).top,a=s.left,l=s.bottom,c=s.right,d=s.height,h=s.width):(r=0,a=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(t||i)&&e!==window&&(n=n||e.parentNode,!Da))do{if(n&&n.getBoundingClientRect&&("none"!==Ua(n,"transform")||i&&"static"!==Ua(n,"position"))){var u=n.getBoundingClientRect();r-=u.top+parseInt(Ua(n,"border-top-width")),a-=u.left+parseInt(Ua(n,"border-left-width")),l=r+s.height,c=a+s.width;break}}while(n=n.parentNode);if(o&&e!==window){var p=ja(n||e),m
/*! Pickr 1.8.4 MIT | https://github.com/Simonwep/pickr */
var Ic=function(e){var t={exports:{}};return e(t,t.exports),t.exports}(function(e,t){self,e.exports=(()=>{var e={d:(t,i)=>{for(var o in i)e.o(i,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:i[o]})},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:()=>O});var i={};function o(e,t,i,o){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(i)||(i=[i]);for(const s of t)for(const t of i)s[e](t,o,{capture:!1,...n});return Array.prototype.slice.call(arguments,1)}e.r(i),e.d(i,{adjustableInputNumbers:()=>d,createElementFromString:()=>r,createFromTemplate:()=>a,eventPath:()=>l,off:()=>s,on:()=>n,resolveElement:()=>c});const n=o.bind(null,"addEventListener"),s=o.bind(null,"removeEventListener");function r(e){const t=document.createElement("div");return t.innerHTML=e.trim(),t.firstElementChild}function a(e){const t=(e,t)=>{const i=e.getAttribute(t);return e.removeAttribute(t),i},i=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=t(e,":obj"),s=t(e,":ref"),r=n?o[n]={}:o;s&&(o[s]=e);for(const o of Array.from(e.children)){const e=t(o,":arr"),n=i(o,e?{}:r);e&&(r[e]||(r[e]=[])).push(Object.keys(n).length?n:o)}return o};return i(r(e))}function l(e){let t=e.path||e.composedPath&&e.composedPath();if(t)return t;let i=e.target.parentElement;for(t=[e.target,i];i=i.parentElement;)t.push(i);return t.push(document,window),t}function c(e){return e instanceof Element?e:"string"==typeof e?e.split(/>>/g).reduce((e,t,i,o)=>(e=e.querySelector(t),i<o.length-1?e.shadowRoot:e),document):null}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;function i(i){const o=[.001,.01,.1][Number(i.shiftKey||2*i.ctrlKey)]*(i.deltaY<0?1:-1);let n=0,s=e.selectionStart;e.value=e.value.replace(/[\d.]+/g,(e,i)=>i<=s&&i+e.length>=s?(s=i,t(Number(e),o,n)):(n++,e)),e.focus(),e.setSelectionRange(s,s),i.preventDefault(),e.dispatchEvent(new Event("input"))}n(e,"focus",()=>n(window,"wheel",i,{passive:!1})),n(e,"blur",()=>s(window,"wheel",i))}const{min:h,max:u,floor:p,round:m}=Math;function g(e,t,i){t/=100,i/=100;const o=p(e=e/360*6),n=e-o,s=i*(1-t),r=i*(1-n*t),a=i*(1-(1-n)*t),l=o%6;return[255*[i,r,s,s,a,i][l],255*[a,i,i,r,s,s][l],255*[s,s,a,i,i,r][l]]}function f(e,t,i){return g(e,t,i).map(e=>m(e).toString(16).padStart(2,"0"))}function b(e,t,i){const o=g(e,t,i),n=o[0]/255,s=o[1]/255,r=o[2]/255,a=h(1-n,1-s,1-r);return[100*(1===a?0:(1-n-a)/(1-a)),100*(1===a?0:(1-s-a)/(1-a)),100*(1===a?0:(1-r-a)/(1-a)),100*a]}function y(e,t,i){const o=(2-(t/=100))*(i/=100)/2;return 0!==o&&(t=1===o?0:o<.5?t*i/(2*o):t*i/(2-2*o)),[e,100*t,100*o]}function w(e,t,i){const o=h(e/=255,t/=255,i/=255),n=u(e,t,i),s=n-o;let r,a;if(0===s)r=a=0;else{a=s/n;const o=((n-e)/6+s/2)/s,l=((n-t)/6+s/2)/s,c=((n-i)/6+s/2)/s;e===n?r=c-l:t===n?r=1/3+o-c:i===n&&(r=2/3+l-o),r<0?r+=1:r>1&&(r-=1)}return[360*r,100*a,100*n]}function v(e,t,i,o){return t/=100,i/=100,[...w(255*(1-h(1,(e/=100)*(1-(o/=100))+o)),255*(1-h(1,t*(1-o)+o)),255*(1-h(1,i*(1-o)+o)))]}function C(e,t,i){t/=100;const o=2*(t*=(i/=100)<.5?i:1-i)/(i+t)*100,n=100*(i+t);return[e,isNaN(o)?0:o,n]}function x(e){return w(...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},i=e=>e.map(e=>/^(|\d+)\.\d+|\d+$/.test(e)?Number(e):void 0);
/* nosourcemap */