Files
journal/.obsidian/plugins/bujo-bullets/main.js
thad-w541 1ac5bad942 plz
2025-10-28 21:57:41 -05:00

16 lines
26 KiB
JavaScript

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var rn=Object.create;var Ae=Object.defineProperty;var sn=Object.getOwnPropertyDescriptor;var ln=Object.getOwnPropertyNames;var cn=Object.getPrototypeOf,un=Object.prototype.hasOwnProperty;var Lt=(i,n)=>()=>(n||i((n={exports:{}}).exports,n),n.exports),fn=(i,n)=>{for(var a in n)Ae(i,a,{get:n[a],enumerable:!0})},Rt=(i,n,a,s)=>{if(n&&typeof n=="object"||typeof n=="function")for(let c of ln(n))!un.call(i,c)&&c!==a&&Ae(i,c,{get:()=>n[c],enumerable:!(s=sn(n,c))||s.enumerable});return i};var pn=(i,n,a)=>(a=i!=null?rn(cn(i)):{},Rt(n||!i||!i.__esModule?Ae(a,"default",{value:i,enumerable:!0}):a,i)),mn=i=>Rt(Ae({},"__esModule",{value:!0}),i);var Ke=Lt((Wn,Ht)=>{"use strict";var{entries:vt,setPrototypeOf:Ot,isFrozen:dn,getPrototypeOf:gn,getOwnPropertyDescriptor:Tn}=Object,{freeze:L,seal:I,create:kt}=Object,{apply:qe,construct:Je}=typeof Reflect!="undefined"&&Reflect;L||(L=function(n){return n});I||(I=function(n){return n});qe||(qe=function(n,a,s){return n.apply(a,s)});Je||(Je=function(n,a){return new n(...a)});var be=R(Array.prototype.forEach),hn=R(Array.prototype.lastIndexOf),wt=R(Array.prototype.pop),ae=R(Array.prototype.push),En=R(Array.prototype.splice),Re=R(String.prototype.toLowerCase),Ye=R(String.prototype.toString),Dt=R(String.prototype.match),re=R(String.prototype.replace),_n=R(String.prototype.indexOf),An=R(String.prototype.trim),N=R(Object.prototype.hasOwnProperty),b=R(RegExp.prototype.test),se=Sn(TypeError);function R(i){return function(n){for(var a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];return qe(i,n,s)}}function Sn(i){return function(){for(var n=arguments.length,a=new Array(n),s=0;s<n;s++)a[s]=arguments[s];return Je(i,a)}}function l(i,n){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Re;Ot&&Ot(i,null);let s=n.length;for(;s--;){let c=n[s];if(typeof c=="string"){let _=a(c);_!==c&&(dn(n)||(n[s]=_),c=_)}i[c]=!0}return i}function yn(i){for(let n=0;n<i.length;n++)N(i,n)||(i[n]=null);return i}function Y(i){let n=kt(null);for(let[a,s]of vt(i))N(i,a)&&(Array.isArray(s)?n[a]=yn(s):s&&typeof s=="object"&&s.constructor===Object?n[a]=Y(s):n[a]=s);return n}function le(i,n){for(;i!==null;){let s=Tn(i,n);if(s){if(s.get)return R(s.get);if(typeof s.value=="function")return R(s.value)}i=gn(i)}function a(){return null}return a}var It=L(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Xe=L(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ve=L(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),bn=L(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),je=L(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Ln=L(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Nt=L(["#text"]),Ct=L(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),$e=L(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Mt=L(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Le=L(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Rn=I(/\{\{[\w\W]*|[\w\W]*\}\}/gm),On=I(/<%[\w\W]*|[\w\W]*%>/gm),wn=I(/\$\{[\w\W]*/gm),Dn=I(/^data-[\-\w.\u00B7-\uFFFF]+$/),In=I(/^aria-[\-\w]+$/),Ut=I(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Nn=I(/^(?:\w+script|data):/i),Cn=I(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ft=I(/^html$/i),Mn=I(/^[a-z][.\w]*(-[.\w]+)+$/i),xt=Object.freeze({__proto__:null,ARIA_ATTR:In,ATTR_WHITESPACE:Cn,CUSTOM_ELEMENT:Mn,DATA_ATTR:Dn,DOCTYPE_NAME:Ft,ERB_EXPR:On,IS_ALLOWED_URI:Ut,IS_SCRIPT_OR_DATA:Nn,MUSTACHE_EXPR:Rn,TMPLIT_EXPR:wn}),ce={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},xn=function(){return typeof window=="undefined"?null:window},Pn=function(n,a){if(typeof n!="object"||typeof n.createPolicy!="function")return null;let s=null,c="data-tt-policy-suffix";a&&a.hasAttribute(c)&&(s=a.getAttribute(c));let _="dompurify"+(s?"#"+s:"");try{return n.createPolicy(_,{createHTML(m){return m},createScriptURL(m){return m}})}catch(m){return console.warn("TrustedTypes policy "+_+" could not be created."),null}},Pt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Bt(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xn(),n=r=>Bt(r);if(n.version="3.2.4",n.removed=[],!i||!i.document||i.document.nodeType!==ce.document||!i.Element)return n.isSupported=!1,n;let{document:a}=i,s=a,c=s.currentScript,{DocumentFragment:_,HTMLTemplateElement:m,Node:p,Element:C,NodeFilter:D,NamedNodeMap:B=i.NamedNodeMap||i.MozNamedAttrMap,HTMLFormElement:O,DOMParser:H,trustedTypes:z}=i,k=C.prototype,ue=le(k,"cloneNode"),Ie=le(k,"remove"),fe=le(k,"nextSibling"),pe=le(k,"childNodes"),M=le(k,"parentNode");if(typeof m=="function"){let r=a.createElement("template");r.content&&r.content.ownerDocument&&(a=r.content.ownerDocument)}let d,x="",{implementation:V,createNodeIterator:Ze,createDocumentFragment:j,getElementsByTagName:Xt}=a,{importNode:Vt}=s,S=Pt();n.isSupported=typeof vt=="function"&&typeof M=="function"&&V&&V.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:Ne,ERB_EXPR:Ce,TMPLIT_EXPR:Me,DATA_ATTR:jt,ARIA_ATTR:$t,IS_SCRIPT_OR_DATA:qt,ATTR_WHITESPACE:Qe,CUSTOM_ELEMENT:Jt}=xt,{IS_ALLOWED_URI:et}=xt,g=null,tt=l({},[...It,...Xe,...Ve,...je,...Nt]),h=null,nt=l({},[...Ct,...$e,...Mt,...Le]),f=Object.seal(kt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ee=null,xe=null,it=!0,Pe=!0,ot=!1,at=!0,$=!1,ve=!0,G=!1,ke=!1,Ue=!1,q=!1,me=!1,de=!1,rt=!0,st=!1,Kt="user-content-",Fe=!0,te=!1,J={},K=null,lt=l({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ct=null,ut=l({},["audio","video","img","source","image","track"]),Be=null,ft=l({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",Te="http://www.w3.org/2000/svg",U="http://www.w3.org/1999/xhtml",Z=U,He=!1,ze=null,Zt=l({},[ge,Te,U],Ye),he=l({},["mi","mo","mn","ms","mtext"]),Ee=l({},["annotation-xml"]),Qt=l({},["title","style","font","a","script"]),ne=null,en=["application/xhtml+xml","text/html"],tn="text/html",T=null,Q=null,nn=a.createElement("form"),pt=function(e){return e instanceof RegExp||e instanceof Function},Ge=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Q&&Q===e)){if((!e||typeof e!="object")&&(e={}),e=Y(e),ne=en.indexOf(e.PARSER_MEDIA_TYPE)===-1?tn:e.PARSER_MEDIA_TYPE,T=ne==="application/xhtml+xml"?Ye:Re,g=N(e,"ALLOWED_TAGS")?l({},e.ALLOWED_TAGS,T):tt,h=N(e,"ALLOWED_ATTR")?l({},e.ALLOWED_ATTR,T):nt,ze=N(e,"ALLOWED_NAMESPACES")?l({},e.ALLOWED_NAMESPACES,Ye):Zt,Be=N(e,"ADD_URI_SAFE_ATTR")?l(Y(ft),e.ADD_URI_SAFE_ATTR,T):ft,ct=N(e,"ADD_DATA_URI_TAGS")?l(Y(ut),e.ADD_DATA_URI_TAGS,T):ut,K=N(e,"FORBID_CONTENTS")?l({},e.FORBID_CONTENTS,T):lt,ee=N(e,"FORBID_TAGS")?l({},e.FORBID_TAGS,T):{},xe=N(e,"FORBID_ATTR")?l({},e.FORBID_ATTR,T):{},J=N(e,"USE_PROFILES")?e.USE_PROFILES:!1,it=e.ALLOW_ARIA_ATTR!==!1,Pe=e.ALLOW_DATA_ATTR!==!1,ot=e.ALLOW_UNKNOWN_PROTOCOLS||!1,at=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,$=e.SAFE_FOR_TEMPLATES||!1,ve=e.SAFE_FOR_XML!==!1,G=e.WHOLE_DOCUMENT||!1,q=e.RETURN_DOM||!1,me=e.RETURN_DOM_FRAGMENT||!1,de=e.RETURN_TRUSTED_TYPE||!1,Ue=e.FORCE_BODY||!1,rt=e.SANITIZE_DOM!==!1,st=e.SANITIZE_NAMED_PROPS||!1,Fe=e.KEEP_CONTENT!==!1,te=e.IN_PLACE||!1,et=e.ALLOWED_URI_REGEXP||Ut,Z=e.NAMESPACE||U,he=e.MATHML_TEXT_INTEGRATION_POINTS||he,Ee=e.HTML_INTEGRATION_POINTS||Ee,f=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(f.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&pt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(f.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(f.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),$&&(Pe=!1),me&&(q=!0),J&&(g=l({},Nt),h=[],J.html===!0&&(l(g,It),l(h,Ct)),J.svg===!0&&(l(g,Xe),l(h,$e),l(h,Le)),J.svgFilters===!0&&(l(g,Ve),l(h,$e),l(h,Le)),J.mathMl===!0&&(l(g,je),l(h,Mt),l(h,Le))),e.ADD_TAGS&&(g===tt&&(g=Y(g)),l(g,e.ADD_TAGS,T)),e.ADD_ATTR&&(h===nt&&(h=Y(h)),l(h,e.ADD_ATTR,T)),e.ADD_URI_SAFE_ATTR&&l(Be,e.ADD_URI_SAFE_ATTR,T),e.FORBID_CONTENTS&&(K===lt&&(K=Y(K)),l(K,e.FORBID_CONTENTS,T)),Fe&&(g["#text"]=!0),G&&l(g,["html","head","body"]),g.table&&(l(g,["tbody"]),delete ee.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!="function")throw se('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw se('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');d=e.TRUSTED_TYPES_POLICY,x=d.createHTML("")}else d===void 0&&(d=Pn(z,c)),d!==null&&typeof x=="string"&&(x=d.createHTML(""));L&&L(e),Q=e}},mt=l({},[...Xe,...Ve,...bn]),dt=l({},[...je,...Ln]),on=function(e){let t=M(e);(!t||!t.tagName)&&(t={namespaceURI:Z,tagName:"template"});let o=Re(e.tagName),u=Re(t.tagName);return ze[e.namespaceURI]?e.namespaceURI===Te?t.namespaceURI===U?o==="svg":t.namespaceURI===ge?o==="svg"&&(u==="annotation-xml"||he[u]):Boolean(mt[o]):e.namespaceURI===ge?t.namespaceURI===U?o==="math":t.namespaceURI===Te?o==="math"&&Ee[u]:Boolean(dt[o]):e.namespaceURI===U?t.namespaceURI===Te&&!Ee[u]||t.namespaceURI===ge&&!he[u]?!1:!dt[o]&&(Qt[o]||!mt[o]):!!(ne==="application/xhtml+xml"&&ze[e.namespaceURI]):!1},P=function(e){ae(n.removed,{element:e});try{M(e).removeChild(e)}catch(t){Ie(e)}},_e=function(e,t){try{ae(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(o){ae(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),e==="is")if(q||me)try{P(t)}catch(o){}else try{t.setAttribute(e,"")}catch(o){}},gt=function(e){let t=null,o=null;if(Ue)e="<remove></remove>"+e;else{let E=Dt(e,/^[\r\n\t ]+/);o=E&&E[0]}ne==="application/xhtml+xml"&&Z===U&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");let u=d?d.createHTML(e):e;if(Z===U)try{t=new H().parseFromString(u,ne)}catch(E){}if(!t||!t.documentElement){t=V.createDocument(Z,"template",null);try{t.documentElement.innerHTML=He?x:u}catch(E){}}let A=t.body||t.documentElement;return e&&o&&A.insertBefore(a.createTextNode(o),A.childNodes[0]||null),Z===U?Xt.call(t,G?"html":"body")[0]:G?t.documentElement:A},Tt=function(e){return Ze.call(e.ownerDocument||e,e,D.SHOW_ELEMENT|D.SHOW_COMMENT|D.SHOW_TEXT|D.SHOW_PROCESSING_INSTRUCTION|D.SHOW_CDATA_SECTION,null)},We=function(e){return e instanceof O&&(typeof e.nodeName!="string"||typeof e.textContent!="string"||typeof e.removeChild!="function"||!(e.attributes instanceof B)||typeof e.removeAttribute!="function"||typeof e.setAttribute!="function"||typeof e.namespaceURI!="string"||typeof e.insertBefore!="function"||typeof e.hasChildNodes!="function")},ht=function(e){return typeof p=="function"&&e instanceof p};function F(r,e,t){be(r,o=>{o.call(n,e,t,Q)})}let Et=function(e){let t=null;if(F(S.beforeSanitizeElements,e,null),We(e))return P(e),!0;let o=T(e.nodeName);if(F(S.uponSanitizeElement,e,{tagName:o,allowedTags:g}),e.hasChildNodes()&&!ht(e.firstElementChild)&&b(/<[/\w]/g,e.innerHTML)&&b(/<[/\w]/g,e.textContent)||e.nodeType===ce.progressingInstruction||ve&&e.nodeType===ce.comment&&b(/<[/\w]/g,e.data))return P(e),!0;if(!g[o]||ee[o]){if(!ee[o]&&At(o)&&(f.tagNameCheck instanceof RegExp&&b(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o)))return!1;if(Fe&&!K[o]){let u=M(e)||e.parentNode,A=pe(e)||e.childNodes;if(A&&u){let E=A.length;for(let w=E-1;w>=0;--w){let v=ue(A[w],!0);v.__removalCount=(e.__removalCount||0)+1,u.insertBefore(v,fe(e))}}}return P(e),!0}return e instanceof C&&!on(e)||(o==="noscript"||o==="noembed"||o==="noframes")&&b(/<\/no(script|embed|frames)/i,e.innerHTML)?(P(e),!0):($&&e.nodeType===ce.text&&(t=e.textContent,be([Ne,Ce,Me],u=>{t=re(t,u," ")}),e.textContent!==t&&(ae(n.removed,{element:e.cloneNode()}),e.textContent=t)),F(S.afterSanitizeElements,e,null),!1)},_t=function(e,t,o){if(rt&&(t==="id"||t==="name")&&(o in a||o in nn))return!1;if(!(Pe&&!xe[t]&&b(jt,t))){if(!(it&&b($t,t))){if(!h[t]||xe[t]){if(!(At(e)&&(f.tagNameCheck instanceof RegExp&&b(f.tagNameCheck,e)||f.tagNameCheck instanceof Function&&f.tagNameCheck(e))&&(f.attributeNameCheck instanceof RegExp&&b(f.attributeNameCheck,t)||f.attributeNameCheck instanceof Function&&f.attributeNameCheck(t))||t==="is"&&f.allowCustomizedBuiltInElements&&(f.tagNameCheck instanceof RegExp&&b(f.tagNameCheck,o)||f.tagNameCheck instanceof Function&&f.tagNameCheck(o))))return!1}else if(!Be[t]){if(!b(et,re(o,Qe,""))){if(!((t==="src"||t==="xlink:href"||t==="href")&&e!=="script"&&_n(o,"data:")===0&&ct[e])){if(!(ot&&!b(qt,re(o,Qe,"")))){if(o)return!1}}}}}}return!0},At=function(e){return e!=="annotation-xml"&&Dt(e,Jt)},St=function(e){F(S.beforeSanitizeAttributes,e,null);let{attributes:t}=e;if(!t||We(e))return;let o={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:h,forceKeepAttr:void 0},u=t.length;for(;u--;){let A=t[u],{name:E,namespaceURI:w,value:v}=A,ie=T(E),y=E==="value"?v:An(v);if(o.attrName=ie,o.attrValue=y,o.keepAttr=!0,o.forceKeepAttr=void 0,F(S.uponSanitizeAttribute,e,o),y=o.attrValue,st&&(ie==="id"||ie==="name")&&(_e(E,e),y=Kt+y),ve&&b(/((--!?|])>)|<\/(style|title)/i,y)){_e(E,e);continue}if(o.forceKeepAttr||(_e(E,e),!o.keepAttr))continue;if(!at&&b(/\/>/i,y)){_e(E,e);continue}$&&be([Ne,Ce,Me],bt=>{y=re(y,bt," ")});let yt=T(e.nodeName);if(_t(yt,ie,y)){if(d&&typeof z=="object"&&typeof z.getAttributeType=="function"&&!w)switch(z.getAttributeType(yt,ie)){case"TrustedHTML":{y=d.createHTML(y);break}case"TrustedScriptURL":{y=d.createScriptURL(y);break}}try{w?e.setAttributeNS(w,E,y):e.setAttribute(E,y),We(e)?P(e):wt(n.removed)}catch(bt){}}}F(S.afterSanitizeAttributes,e,null)},an=function r(e){let t=null,o=Tt(e);for(F(S.beforeSanitizeShadowDOM,e,null);t=o.nextNode();)F(S.uponSanitizeShadowNode,t,null),Et(t),St(t),t.content instanceof _&&r(t.content);F(S.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=null,o=null,u=null,A=null;if(He=!r,He&&(r="<!-->"),typeof r!="string"&&!ht(r))if(typeof r.toString=="function"){if(r=r.toString(),typeof r!="string")throw se("dirty is not a string, aborting")}else throw se("toString is not a function");if(!n.isSupported)return r;if(ke||Ge(e),n.removed=[],typeof r=="string"&&(te=!1),te){if(r.nodeName){let v=T(r.nodeName);if(!g[v]||ee[v])throw se("root node is forbidden and cannot be sanitized in-place")}}else if(r instanceof p)t=gt("<!---->"),o=t.ownerDocument.importNode(r,!0),o.nodeType===ce.element&&o.nodeName==="BODY"||o.nodeName==="HTML"?t=o:t.appendChild(o);else{if(!q&&!$&&!G&&r.indexOf("<")===-1)return d&&de?d.createHTML(r):r;if(t=gt(r),!t)return q?null:de?x:""}t&&Ue&&P(t.firstChild);let E=Tt(te?r:t);for(;u=E.nextNode();)Et(u),St(u),u.content instanceof _&&an(u.content);if(te)return r;if(q){if(me)for(A=j.call(t.ownerDocument);t.firstChild;)A.appendChild(t.firstChild);else A=t;return(h.shadowroot||h.shadowrootmode)&&(A=Vt.call(s,A,!0)),A}let w=G?t.outerHTML:t.innerHTML;return G&&g["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&b(Ft,t.ownerDocument.doctype.name)&&(w="<!DOCTYPE "+t.ownerDocument.doctype.name+`>
`+w),$&&be([Ne,Ce,Me],v=>{w=re(w,v," ")}),d&&de?d.createHTML(w):w},n.setConfig=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ge(r),ke=!0},n.clearConfig=function(){Q=null,ke=!1},n.isValidAttribute=function(r,e,t){Q||Ge({});let o=T(r),u=T(e);return _t(o,u,t)},n.addHook=function(r,e){typeof e=="function"&&ae(S[r],e)},n.removeHook=function(r,e){if(e!==void 0){let t=hn(S[r],e);return t===-1?void 0:En(S[r],t,1)[0]}return wt(S[r])},n.removeHooks=function(r){S[r]=[]},n.removeAllHooks=function(){S=Pt()},n}var vn=Bt();Ht.exports=vn});var Gt=Lt((Yn,zt)=>{zt.exports=window.DOMPurify||(window.DOMPurify=Ke().default||Ke())});var kn={};fn(kn,{AVAILABLE_BULLETS_TYPES:()=>W,default:()=>we});module.exports=mn(kn);var De=require("obsidian");function Se(i,n){if(!oe(i))throw new Error("The provided text is not a valid bullet point.");return i.replace(/- \[.\]/,`- [${n.character}]`)}function oe(i){return i.trimStart().startsWith("- [")}var ye=class{constructor(n){this.plugin=n,this.setup()}setup(){W.forEach(({name:n,character:a})=>{this.plugin.addCommand({id:`change-bullet-to-${a.toLowerCase()}`,name:`Change bullet to ${n}`,editorCheckCallback:(s,c,_)=>{let m=c.getCursor(),p=c.getLine(m.line);if(oe(p)){if(!s){let D=W.find(O=>O.character===a);if(!D)return console.error(`Type ${a} not found`),!1;let B=Se(p,D);c.setLine(m.line,B)}return!0}return!1}})})}};var Yt=pn(Gt());var X=require("obsidian"),Wt={signifiers:[{name:"Priority",value:"!"},{name:"Follow-up",value:"?"}]},Oe=class extends X.PluginSettingTab{constructor(a,s){super(a,s);this.plugin=s}display(){this.containerEl.empty(),this.add_signifiers_setting()}add_signifiers_setting(){new X.Setting(this.containerEl).setName("Signifiers").setHeading();let a=document.createDocumentFragment();a.append("Signifiers are symbols that give your bullets added context. For example, you can use an exclamation mark (!) to indicate a priority task or a question mark (?) to indicate a question to follow up on. Examples:",a.createEl("br"),"- [ ] ! Priority task",a.createEl("br"),"- ? Follow up on this idea",a.createEl("br"),a.createEl("br"),a.createEl("b",{text:"Warning: "}),"The asterisk (*) signifier cannot be used as a signifier because of limitations in the Obsidian Markown renderer. Using it will cause a double bullet to appear in the rendered view."),new X.Setting(this.containerEl).setDesc(a),this.plugin.settings.signifiers.forEach((s,c)=>{new X.Setting(this.containerEl).addText(m=>{m.setPlaceholder("Enter signifier").setValue(s.value).onChange(async p=>{this.plugin.settings.signifiers[c].value=p,await this.plugin.saveSettings()})}).addText(m=>{m.setPlaceholder("Enter name").setValue(s.name).onChange(async p=>{this.plugin.settings.signifiers[c].name=p,await this.plugin.saveSettings()})}).addExtraButton(m=>{m.setIcon("cross").setTooltip("Remove signifier").onClick(async()=>{this.plugin.settings.signifiers.splice(c,1),await this.plugin.saveSettings(),this.display()})}).infoEl.remove()}),new X.Setting(this.containerEl).addButton(s=>{s.setButtonText("Add new signifier").setCta().onClick(async()=>{this.plugin.settings.signifiers.push({name:"",value:""}),await this.plugin.saveSettings(),this.display()})})}};var W=[{name:"Incomplete",character:" "},{name:"Complete",character:"x"},{name:"Irrelevant",character:"-"},{name:"Migrated",character:">"},{name:"Scheduled",character:"<"},{name:"Event",character:"o"}],we=class extends De.Plugin{async onload(){await this.loadSettings(),this.commandHandler=new ye(this),this.registerMarkdownPostProcessor((a,s)=>{let c=a.findAll("ul > li"),_=a.findAll(".task-list-item"),m=[...c,..._];if(m.length!==0){for(let p of m){let C=p.innerText,D=this.settings.signifiers;for(let B of D){let O=B.value;if(C.startsWith(O+" ")){let H=p.innerHTML,z=Yt.sanitize(O);H=H.replace(O,`<span class="bujo-bullet-signifier">${z}</span>`),p.innerHTML=H}}}if(_.length!==0){_.forEach((p,C)=>{p.setAttribute("data-bullet-id",C.toString())});for(let p of _){let C=p.getAttribute("data-task"),D=C?W.find(O=>O.character===C):W.find(O=>O.character===" ");if(!D)continue;let B=p.querySelector('input[type="checkbox"]');B&&B.addEventListener("contextmenu",O=>{let H=new De.Menu,z=p.getAttribute("data-bullet-id");for(let k of W)D.character!==k.character&&H.addItem(ue=>{ue.setTitle(`Change to: ${k.name}`),ue.onClick(async()=>{let Ie=this.app.vault,fe=this.app.workspace.getActiveFile();fe&&Ie.process(fe,pe=>{let M=pe.split(`
`),d=0,x=-1,V=-1;for(let j=0;j<M.length;j++)if(V++,oe(M[j])){if(d.toString()===z){x=j;break}d++}return x===-1?(console.error("Bullet not found"),pe):[...M.slice(0,V),Se(M[x],k),...M.slice(x+1)].join(`
`)})})});H.showAtPosition({x:O.clientX,y:O.clientY})})}}}})}async loadSettings(){this.settings=Object.assign({},Wt,await this.loadData()),this.addSettingTab(new Oe(this.app,this))}async saveSettings(){await this.saveData(this.settings)}};
/*! Bundled license information:
dompurify/dist/purify.cjs.js:
(*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE *)
*/
/* nosourcemap */