From 6a79f83a32a3262bc98d2b036b4adbb18660bd85 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sun, 13 Oct 2024 10:25:08 -0400 Subject: [PATCH] add advanced uri plugin --- .obsidian/community-plugins.json | 3 +- .../plugins/obsidian-advanced-uri/data.json | 12 +++++++ .../plugins/obsidian-advanced-uri/main.js | 35 +++++++++++++++++++ .../obsidian-advanced-uri/manifest.json | 11 ++++++ 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 .obsidian/plugins/obsidian-advanced-uri/data.json create mode 100644 .obsidian/plugins/obsidian-advanced-uri/main.js create mode 100644 .obsidian/plugins/obsidian-advanced-uri/manifest.json diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index 9083595..7632aac 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -6,5 +6,6 @@ "tag-word-cloud", "obsidian-sort-and-permute-lines", "dashboard-navigator", - "automatic-table-of-contents" + "automatic-table-of-contents", + "obsidian-advanced-uri" ] \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-advanced-uri/data.json b/.obsidian/plugins/obsidian-advanced-uri/data.json new file mode 100644 index 0000000..54fe409 --- /dev/null +++ b/.obsidian/plugins/obsidian-advanced-uri/data.json @@ -0,0 +1,12 @@ +{ + "openFileOnWrite": true, + "openDailyInNewPane": false, + "openFileOnWriteInNewPane": false, + "openFileWithoutWriteInNewPane": false, + "idField": "uid", + "useUID": true, + "addFilepathWhenUsingUID": false, + "allowEval": false, + "includeVaultName": true, + "vaultParam": "name" +} \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-advanced-uri/main.js b/.obsidian/plugins/obsidian-advanced-uri/main.js new file mode 100644 index 0000000..0b48617 --- /dev/null +++ b/.obsidian/plugins/obsidian-advanced-uri/main.js @@ -0,0 +1,35 @@ +/* +THIS IS A GENERATED/BUNDLED FILE BY ESBUILD +if you want to view the source visit the plugins github repository (https://github.com/Vinzent03/obsidian-advanced-uri) +*/ + +var gt=Object.create;var ae=Object.defineProperty;var mt=Object.getOwnPropertyDescriptor;var xt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,wt=Object.prototype.hasOwnProperty;var De=(o,n)=>()=>(n||o((n={exports:{}}).exports,n),n.exports),jt=(o,n)=>{for(var e in n)ae(o,e,{get:n[e],enumerable:!0})},Ve=(o,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of xt(n))!wt.call(o,i)&&i!==e&&ae(o,i,{get:()=>n[i],enumerable:!(t=mt(n,i))||t.enumerable});return o};var xe=(o,n,e)=>(e=o!=null?gt(vt(o)):{},Ve(n||!o||!o.__esModule?ae(e,"default",{value:o,enumerable:!0}):e,o)),bt=o=>Ve(ae({},"__esModule",{value:!0}),o);var Le=De((Y,ve)=>{(function(n,e){typeof Y=="object"&&typeof ve=="object"?ve.exports=e():typeof define=="function"&&define.amd?define([],e):typeof Y=="object"?Y.feather=e():n.feather=e()})(typeof self!="undefined"?self:Y,function(){return function(o){var n={};function e(t){if(n[t])return n[t].exports;var i=n[t]={i:t,l:!1,exports:{}};return o[t].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=o,e.c=n,e.d=function(t,i,a){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:a})},e.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="",e(e.s=0)}({"./dist/icons.json":function(o){o.exports={activity:'',airplay:'',"alert-circle":'',"alert-octagon":'',"alert-triangle":'',"align-center":'',"align-justify":'',"align-left":'',"align-right":'',anchor:'',aperture:'',archive:'',"arrow-down-circle":'',"arrow-down-left":'',"arrow-down-right":'',"arrow-down":'',"arrow-left-circle":'',"arrow-left":'',"arrow-right-circle":'',"arrow-right":'',"arrow-up-circle":'',"arrow-up-left":'',"arrow-up-right":'',"arrow-up":'',"at-sign":'',award:'',"bar-chart-2":'',"bar-chart":'',"battery-charging":'',battery:'',"bell-off":'',bell:'',bluetooth:'',bold:'',"book-open":'',book:'',bookmark:'',box:'',briefcase:'',calendar:'',"camera-off":'',camera:'',cast:'',"check-circle":'',"check-square":'',check:'',"chevron-down":'',"chevron-left":'',"chevron-right":'',"chevron-up":'',"chevrons-down":'',"chevrons-left":'',"chevrons-right":'',"chevrons-up":'',chrome:'',circle:'',clipboard:'',clock:'',"cloud-drizzle":'',"cloud-lightning":'',"cloud-off":'',"cloud-rain":'',"cloud-snow":'',cloud:'',code:'',codepen:'',codesandbox:'',coffee:'',columns:'',command:'',compass:'',copy:'',"corner-down-left":'',"corner-down-right":'',"corner-left-down":'',"corner-left-up":'',"corner-right-down":'',"corner-right-up":'',"corner-up-left":'',"corner-up-right":'',cpu:'',"credit-card":'',crop:'',crosshair:'',database:'',delete:'',disc:'',"divide-circle":'',"divide-square":'',divide:'',"dollar-sign":'',"download-cloud":'',download:'',dribbble:'',droplet:'',"edit-2":'',"edit-3":'',edit:'',"external-link":'',"eye-off":'',eye:'',facebook:'',"fast-forward":'',feather:'',figma:'',"file-minus":'',"file-plus":'',"file-text":'',file:'',film:'',filter:'',flag:'',"folder-minus":'',"folder-plus":'',folder:'',framer:'',frown:'',gift:'',"git-branch":'',"git-commit":'',"git-merge":'',"git-pull-request":'',github:'',gitlab:'',globe:'',grid:'',"hard-drive":'',hash:'',headphones:'',heart:'',"help-circle":'',hexagon:'',home:'',image:'',inbox:'',info:'',instagram:'',italic:'',key:'',layers:'',layout:'',"life-buoy":'',"link-2":'',link:'',linkedin:'',list:'',loader:'',lock:'',"log-in":'',"log-out":'',mail:'',"map-pin":'',map:'',"maximize-2":'',maximize:'',meh:'',menu:'',"message-circle":'',"message-square":'',"mic-off":'',mic:'',"minimize-2":'',minimize:'',"minus-circle":'',"minus-square":'',minus:'',monitor:'',moon:'',"more-horizontal":'',"more-vertical":'',"mouse-pointer":'',move:'',music:'',"navigation-2":'',navigation:'',octagon:'',package:'',paperclip:'',"pause-circle":'',pause:'',"pen-tool":'',percent:'',"phone-call":'',"phone-forwarded":'',"phone-incoming":'',"phone-missed":'',"phone-off":'',"phone-outgoing":'',phone:'',"pie-chart":'',"play-circle":'',play:'',"plus-circle":'',"plus-square":'',plus:'',pocket:'',power:'',printer:'',radio:'',"refresh-ccw":'',"refresh-cw":'',repeat:'',rewind:'',"rotate-ccw":'',"rotate-cw":'',rss:'',save:'',scissors:'',search:'',send:'',server:'',settings:'',"share-2":'',share:'',"shield-off":'',shield:'',"shopping-bag":'',"shopping-cart":'',shuffle:'',sidebar:'',"skip-back":'',"skip-forward":'',slack:'',slash:'',sliders:'',smartphone:'',smile:'',speaker:'',square:'',star:'',"stop-circle":'',sun:'',sunrise:'',sunset:'',table:'',tablet:'',tag:'',target:'',terminal:'',thermometer:'',"thumbs-down":'',"thumbs-up":'',"toggle-left":'',"toggle-right":'',tool:'',"trash-2":'',trash:'',trello:'',"trending-down":'',"trending-up":'',triangle:'',truck:'',tv:'',twitch:'',twitter:'',type:'',umbrella:'',underline:'',unlock:'',"upload-cloud":'',upload:'',"user-check":'',"user-minus":'',"user-plus":'',"user-x":'',user:'',users:'',"video-off":'',video:'',voicemail:'',"volume-1":'',"volume-2":'',"volume-x":'',volume:'',watch:'',"wifi-off":'',wifi:'',wind:'',"x-circle":'',"x-octagon":'',"x-square":'',x:'',youtube:'',"zap-off":'',zap:'',"zoom-in":'',"zoom-out":''}},"./node_modules/classnames/dedupe.js":function(o,n,e){var t,i;(function(){"use strict";var a=function(){function l(){}l.prototype=Object.create(null);function r(f,y){for(var g=y.length,x=0;x1?arguments[1]:void 0,y=f!==void 0,g=0,x=s(h),b,M,A,P;if(y&&(f=t(f,m>2?arguments[2]:void 0,2)),x!=null&&!(u==Array&&l(x)))for(P=x.call(h),M=new u;!(A=P.next()).done;g++)c(M,g,y?a(P,f,[A.value,g],!0):A.value);else for(b=r(h.length),M=new u(b);b>g;g++)c(M,g,y?f(h[g],g):h[g]);return M.length=g,M}},"./node_modules/core-js/internals/array-includes.js":function(o,n,e){var t=e("./node_modules/core-js/internals/to-indexed-object.js"),i=e("./node_modules/core-js/internals/to-length.js"),a=e("./node_modules/core-js/internals/to-absolute-index.js");o.exports=function(l){return function(r,c,s){var d=t(r),p=i(d.length),h=a(s,p),u;if(l&&c!=c){for(;p>h;)if(u=d[h++],u!=u)return!0}else for(;p>h;h++)if((l||h in d)&&d[h]===c)return l||h||0;return!l&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(o,n,e){var t=e("./node_modules/core-js/internals/a-function.js");o.exports=function(i,a,l){if(t(i),a===void 0)return i;switch(l){case 0:return function(){return i.call(a)};case 1:return function(r){return i.call(a,r)};case 2:return function(r,c){return i.call(a,r,c)};case 3:return function(r,c,s){return i.call(a,r,c,s)}}return function(){return i.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(o,n,e){var t=e("./node_modules/core-js/internals/an-object.js");o.exports=function(i,a,l,r){try{return r?a(t(l)[0],l[1]):a(l)}catch(s){var c=i.return;throw c!==void 0&&t(c.call(i)),s}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(o,n,e){var t=e("./node_modules/core-js/internals/well-known-symbol.js"),i=t("iterator"),a=!1;try{var l=0,r={next:function(){return{done:!!l++}},return:function(){a=!0}};r[i]=function(){return this},Array.from(r,function(){throw 2})}catch(c){}o.exports=function(c,s){if(!s&&!a)return!1;var d=!1;try{var p={};p[i]=function(){return{next:function(){return{done:d=!0}}}},c(p)}catch(h){}return d}},"./node_modules/core-js/internals/classof-raw.js":function(o,n){var e={}.toString;o.exports=function(t){return e.call(t).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(o,n,e){var t=e("./node_modules/core-js/internals/classof-raw.js"),i=e("./node_modules/core-js/internals/well-known-symbol.js"),a=i("toStringTag"),l=t(function(){return arguments}())=="Arguments",r=function(c,s){try{return c[s]}catch(d){}};o.exports=function(c){var s,d,p;return c===void 0?"Undefined":c===null?"Null":typeof(d=r(s=Object(c),a))=="string"?d:l?t(s):(p=t(s))=="Object"&&typeof s.callee=="function"?"Arguments":p}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(o,n,e){var t=e("./node_modules/core-js/internals/has.js"),i=e("./node_modules/core-js/internals/own-keys.js"),a=e("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),l=e("./node_modules/core-js/internals/object-define-property.js");o.exports=function(r,c){for(var s=i(c),d=l.f,p=a.f,h=0;h",b="java"+g+":",M;for(m.style.display="none",r.appendChild(m),m.src=String(b),M=m.contentWindow.document,M.open(),M.write(y+g+x+"document.F=Object"+y+"/"+g+x),M.close(),u=M.F;f--;)delete u[p][a[f]];return u()};o.exports=Object.create||function(f,y){var g;return f!==null?(h[p]=t(f),g=new h,h[p]=null,g[d]=f):g=u(),y===void 0?g:i(g,y)},l[d]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(o,n,e){var t=e("./node_modules/core-js/internals/descriptors.js"),i=e("./node_modules/core-js/internals/object-define-property.js"),a=e("./node_modules/core-js/internals/an-object.js"),l=e("./node_modules/core-js/internals/object-keys.js");o.exports=t?Object.defineProperties:function(c,s){a(c);for(var d=l(s),p=d.length,h=0,u;p>h;)i.f(c,u=d[h++],s[u]);return c}},"./node_modules/core-js/internals/object-define-property.js":function(o,n,e){var t=e("./node_modules/core-js/internals/descriptors.js"),i=e("./node_modules/core-js/internals/ie8-dom-define.js"),a=e("./node_modules/core-js/internals/an-object.js"),l=e("./node_modules/core-js/internals/to-primitive.js"),r=Object.defineProperty;n.f=t?r:function(s,d,p){if(a(s),d=l(d,!0),a(p),i)try{return r(s,d,p)}catch(h){}if("get"in p||"set"in p)throw TypeError("Accessors not supported");return"value"in p&&(s[d]=p.value),s}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(o,n,e){var t=e("./node_modules/core-js/internals/descriptors.js"),i=e("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=e("./node_modules/core-js/internals/create-property-descriptor.js"),l=e("./node_modules/core-js/internals/to-indexed-object.js"),r=e("./node_modules/core-js/internals/to-primitive.js"),c=e("./node_modules/core-js/internals/has.js"),s=e("./node_modules/core-js/internals/ie8-dom-define.js"),d=Object.getOwnPropertyDescriptor;n.f=t?d:function(h,u){if(h=l(h),u=r(u,!0),s)try{return d(h,u)}catch(m){}if(c(h,u))return a(!i.f.call(h,u),h[u])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(o,n,e){var t=e("./node_modules/core-js/internals/object-keys-internal.js"),i=e("./node_modules/core-js/internals/enum-bug-keys.js"),a=i.concat("length","prototype");n.f=Object.getOwnPropertyNames||function(r){return t(r,a)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(o,n){n.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(o,n,e){var t=e("./node_modules/core-js/internals/has.js"),i=e("./node_modules/core-js/internals/to-object.js"),a=e("./node_modules/core-js/internals/shared-key.js"),l=e("./node_modules/core-js/internals/correct-prototype-getter.js"),r=a("IE_PROTO"),c=Object.prototype;o.exports=l?Object.getPrototypeOf:function(s){return s=i(s),t(s,r)?s[r]:typeof s.constructor=="function"&&s instanceof s.constructor?s.constructor.prototype:s instanceof Object?c:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(o,n,e){var t=e("./node_modules/core-js/internals/has.js"),i=e("./node_modules/core-js/internals/to-indexed-object.js"),a=e("./node_modules/core-js/internals/array-includes.js"),l=e("./node_modules/core-js/internals/hidden-keys.js"),r=a(!1);o.exports=function(c,s){var d=i(c),p=0,h=[],u;for(u in d)!t(l,u)&&t(d,u)&&h.push(u);for(;s.length>p;)t(d,u=s[p++])&&(~r(h,u)||h.push(u));return h}},"./node_modules/core-js/internals/object-keys.js":function(o,n,e){var t=e("./node_modules/core-js/internals/object-keys-internal.js"),i=e("./node_modules/core-js/internals/enum-bug-keys.js");o.exports=Object.keys||function(l){return t(l,i)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(o,n,e){"use strict";var t={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!t.call({1:2},1);n.f=a?function(r){var c=i(this,r);return!!c&&c.enumerable}:t},"./node_modules/core-js/internals/object-set-prototype-of.js":function(o,n,e){var t=e("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");o.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var i=!1,a={},l;try{l=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,l.call(a,[]),i=a instanceof Array}catch(r){}return function(c,s){return t(c,s),i?l.call(c,s):c.__proto__=s,c}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(o,n,e){var t=e("./node_modules/core-js/internals/global.js"),i=e("./node_modules/core-js/internals/object-get-own-property-names.js"),a=e("./node_modules/core-js/internals/object-get-own-property-symbols.js"),l=e("./node_modules/core-js/internals/an-object.js"),r=t.Reflect;o.exports=r&&r.ownKeys||function(s){var d=i.f(l(s)),p=a.f;return p?d.concat(p(s)):d}},"./node_modules/core-js/internals/path.js":function(o,n,e){o.exports=e("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(o,n,e){var t=e("./node_modules/core-js/internals/global.js"),i=e("./node_modules/core-js/internals/shared.js"),a=e("./node_modules/core-js/internals/hide.js"),l=e("./node_modules/core-js/internals/has.js"),r=e("./node_modules/core-js/internals/set-global.js"),c=e("./node_modules/core-js/internals/function-to-string.js"),s=e("./node_modules/core-js/internals/internal-state.js"),d=s.get,p=s.enforce,h=String(c).split("toString");i("inspectSource",function(u){return c.call(u)}),(o.exports=function(u,m,f,y){var g=y?!!y.unsafe:!1,x=y?!!y.enumerable:!1,b=y?!!y.noTargetGet:!1;if(typeof f=="function"&&(typeof m=="string"&&!l(f,"name")&&a(f,"name",m),p(f).source=h.join(typeof m=="string"?m:"")),u===t){x?u[m]=f:r(m,f);return}else g?!b&&u[m]&&(x=!0):delete u[m];x?u[m]=f:a(u,m,f)})(Function.prototype,"toString",function(){return typeof this=="function"&&d(this).source||c.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(o,n){o.exports=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e}},"./node_modules/core-js/internals/set-global.js":function(o,n,e){var t=e("./node_modules/core-js/internals/global.js"),i=e("./node_modules/core-js/internals/hide.js");o.exports=function(a,l){try{i(t,a,l)}catch(r){t[a]=l}return l}},"./node_modules/core-js/internals/set-to-string-tag.js":function(o,n,e){var t=e("./node_modules/core-js/internals/object-define-property.js").f,i=e("./node_modules/core-js/internals/has.js"),a=e("./node_modules/core-js/internals/well-known-symbol.js"),l=a("toStringTag");o.exports=function(r,c,s){r&&!i(r=s?r:r.prototype,l)&&t(r,l,{configurable:!0,value:c})}},"./node_modules/core-js/internals/shared-key.js":function(o,n,e){var t=e("./node_modules/core-js/internals/shared.js"),i=e("./node_modules/core-js/internals/uid.js"),a=t("keys");o.exports=function(l){return a[l]||(a[l]=i(l))}},"./node_modules/core-js/internals/shared.js":function(o,n,e){var t=e("./node_modules/core-js/internals/global.js"),i=e("./node_modules/core-js/internals/set-global.js"),a=e("./node_modules/core-js/internals/is-pure.js"),l="__core-js_shared__",r=t[l]||i(l,{});(o.exports=function(c,s){return r[c]||(r[c]=s!==void 0?s:{})})("versions",[]).push({version:"3.1.3",mode:a?"pure":"global",copyright:"\xA9 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(o,n,e){var t=e("./node_modules/core-js/internals/to-integer.js"),i=e("./node_modules/core-js/internals/require-object-coercible.js");o.exports=function(a,l,r){var c=String(i(a)),s=t(l),d=c.length,p,h;return s<0||s>=d?r?"":void 0:(p=c.charCodeAt(s),p<55296||p>56319||s+1===d||(h=c.charCodeAt(s+1))<56320||h>57343?r?c.charAt(s):p:r?c.slice(s,s+2):(p-55296<<10)+(h-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(o,n,e){var t=e("./node_modules/core-js/internals/to-integer.js"),i=Math.max,a=Math.min;o.exports=function(l,r){var c=t(l);return c<0?i(c+r,0):a(c,r)}},"./node_modules/core-js/internals/to-indexed-object.js":function(o,n,e){var t=e("./node_modules/core-js/internals/indexed-object.js"),i=e("./node_modules/core-js/internals/require-object-coercible.js");o.exports=function(a){return t(i(a))}},"./node_modules/core-js/internals/to-integer.js":function(o,n){var e=Math.ceil,t=Math.floor;o.exports=function(i){return isNaN(i=+i)?0:(i>0?t:e)(i)}},"./node_modules/core-js/internals/to-length.js":function(o,n,e){var t=e("./node_modules/core-js/internals/to-integer.js"),i=Math.min;o.exports=function(a){return a>0?i(t(a),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(o,n,e){var t=e("./node_modules/core-js/internals/require-object-coercible.js");o.exports=function(i){return Object(t(i))}},"./node_modules/core-js/internals/to-primitive.js":function(o,n,e){var t=e("./node_modules/core-js/internals/is-object.js");o.exports=function(i,a){if(!t(i))return i;var l,r;if(a&&typeof(l=i.toString)=="function"&&!t(r=l.call(i))||typeof(l=i.valueOf)=="function"&&!t(r=l.call(i))||!a&&typeof(l=i.toString)=="function"&&!t(r=l.call(i)))return r;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(o,n){var e=0,t=Math.random();o.exports=function(i){return"Symbol(".concat(i===void 0?"":i,")_",(++e+t).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(o,n,e){var t=e("./node_modules/core-js/internals/is-object.js"),i=e("./node_modules/core-js/internals/an-object.js");o.exports=function(a,l){if(i(a),!t(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(o,n,e){var t=e("./node_modules/core-js/internals/global.js"),i=e("./node_modules/core-js/internals/shared.js"),a=e("./node_modules/core-js/internals/uid.js"),l=e("./node_modules/core-js/internals/native-symbol.js"),r=t.Symbol,c=i("wks");o.exports=function(s){return c[s]||(c[s]=l&&r[s]||(l?r:a)("Symbol."+s))}},"./node_modules/core-js/modules/es.array.from.js":function(o,n,e){var t=e("./node_modules/core-js/internals/export.js"),i=e("./node_modules/core-js/internals/array-from.js"),a=e("./node_modules/core-js/internals/check-correctness-of-iteration.js"),l=!a(function(r){Array.from(r)});t({target:"Array",stat:!0,forced:l},{from:i})},"./node_modules/core-js/modules/es.string.iterator.js":function(o,n,e){"use strict";var t=e("./node_modules/core-js/internals/string-at.js"),i=e("./node_modules/core-js/internals/internal-state.js"),a=e("./node_modules/core-js/internals/define-iterator.js"),l="String Iterator",r=i.set,c=i.getterFor(l);a(String,"String",function(s){r(this,{type:l,string:String(s),index:0})},function(){var d=c(this),p=d.string,h=d.index,u;return h>=p.length?{value:void 0,done:!0}:(u=t(p,h,!0),d.index+=u.length,{value:u,done:!1})})},"./node_modules/webpack/buildin/global.js":function(o,n){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){typeof window=="object"&&(e=window)}o.exports=e},"./src/default-attrs.json":function(o){o.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(o,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(u){for(var m=1;m2&&arguments[2]!==void 0?arguments[2]:[];d(this,u),this.name=m,this.contents=f,this.tags=y,this.attrs=t({},c.default,{class:"feather feather-"+m})}return i(u,[{key:"toSvg",value:function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=t({},this.attrs,f,{class:(0,l.default)(this.attrs.class,f.class)});return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),u}();function h(u){return Object.keys(u).map(function(m){return m+'="'+u[m]+'"'}).join(" ")}n.default=p},"./src/icons.js":function(o,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=e("./src/icon.js"),i=s(t),a=e("./dist/icons.json"),l=s(a),r=e("./src/tags.json"),c=s(r);function s(d){return d&&d.__esModule?d:{default:d}}n.default=Object.keys(l.default).map(function(d){return new i.default(d,l.default[d],c.default[d])}).reduce(function(d,p){return d[p.name]=p,d},{})},"./src/index.js":function(o,n,e){"use strict";var t=e("./src/icons.js"),i=s(t),a=e("./src/to-svg.js"),l=s(a),r=e("./src/replace.js"),c=s(r);function s(d){return d&&d.__esModule?d:{default:d}}o.exports={icons:i.default,toSvg:l.default,replace:c.default}},"./src/replace.js":function(o,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=Object.assign||function(h){for(var u=1;u0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document=="undefined")throw new Error("`feather.replace()` only works in a browser environment.");var u=document.querySelectorAll("[data-feather]");Array.from(u).forEach(function(m){return d(m,h)})}function d(h){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},m=p(h),f=m["data-feather"];delete m["data-feather"];var y=r.default[f].toSvg(t({},u,m,{class:(0,a.default)(u.class,m.class)})),g=new DOMParser().parseFromString(y,"image/svg+xml"),x=g.querySelector("svg");h.parentNode.replaceChild(x,h)}function p(h){return Array.from(h.attributes).reduce(function(u,m){return u[m.name]=m.value,u},{})}n.default=s},"./src/tags.json":function(o){o.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-buoy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},"./src/to-svg.js":function(o,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var t=e("./src/icons.js"),i=a(t);function a(r){return r&&r.__esModule?r:{default:r}}function l(r){var c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!r)throw new Error("The required `key` (icon name) parameter is missing.");if(!i.default[r])throw new Error("No icon matching '"+r+"'. See the complete list of icons at https://feathericons.com");return i.default[r].toSvg(c)}n.default=l},0:function(o,n,e){e("./node_modules/core-js/es/array/from.js"),o.exports=e("./src/index.js")}})})});var Ie=De(v=>{"use strict";Object.defineProperty(v,"__esModule",{value:!0});var F=require("obsidian"),we="YYYY-MM-DD",je="gggg-[W]ww",ze="YYYY-MM",Ue="YYYY-[Q]Q",He="YYYY";function G(o){var e,t;let n=window.app.plugins.getPlugin("periodic-notes");return n&&((t=(e=n.settings)==null?void 0:e[o])==null?void 0:t.enabled)}function Q(){var o,n,e,t;try{let{internalPlugins:i,plugins:a}=window.app;if(G("daily")){let{format:s,folder:d,template:p}=((n=(o=a.getPlugin("periodic-notes"))==null?void 0:o.settings)==null?void 0:n.daily)||{};return{format:s||we,folder:(d==null?void 0:d.trim())||"",template:(p==null?void 0:p.trim())||""}}let{folder:l,format:r,template:c}=((t=(e=i.getPluginById("daily-notes"))==null?void 0:e.instance)==null?void 0:t.options)||{};return{format:r||we,folder:(l==null?void 0:l.trim())||"",template:(c==null?void 0:c.trim())||""}}catch(i){console.info("No custom daily note settings found!",i)}}function Z(){var o,n,e,t,i,a,l;try{let r=window.app.plugins,c=(o=r.getPlugin("calendar"))==null?void 0:o.options,s=(e=(n=r.getPlugin("periodic-notes"))==null?void 0:n.settings)==null?void 0:e.weekly;if(G("weekly"))return{format:s.format||je,folder:((t=s.folder)==null?void 0:t.trim())||"",template:((i=s.template)==null?void 0:i.trim())||""};let d=c||{};return{format:d.weeklyNoteFormat||je,folder:((a=d.weeklyNoteFolder)==null?void 0:a.trim())||"",template:((l=d.weeklyNoteTemplate)==null?void 0:l.trim())||""}}catch(r){console.info("No custom weekly note settings found!",r)}}function J(){var n,e,t,i;let o=window.app.plugins;try{let a=G("monthly")&&((e=(n=o.getPlugin("periodic-notes"))==null?void 0:n.settings)==null?void 0:e.monthly)||{};return{format:a.format||ze,folder:((t=a.folder)==null?void 0:t.trim())||"",template:((i=a.template)==null?void 0:i.trim())||""}}catch(a){console.info("No custom monthly note settings found!",a)}}function X(){var n,e,t,i;let o=window.app.plugins;try{let a=G("quarterly")&&((e=(n=o.getPlugin("periodic-notes"))==null?void 0:n.settings)==null?void 0:e.quarterly)||{};return{format:a.format||Ue,folder:((t=a.folder)==null?void 0:t.trim())||"",template:((i=a.template)==null?void 0:i.trim())||""}}catch(a){console.info("No custom quarterly note settings found!",a)}}function q(){var n,e,t,i;let o=window.app.plugins;try{let a=G("yearly")&&((e=(n=o.getPlugin("periodic-notes"))==null?void 0:n.settings)==null?void 0:e.yearly)||{};return{format:a.format||He,folder:((t=a.folder)==null?void 0:t.trim())||"",template:((i=a.template)==null?void 0:i.trim())||""}}catch(a){console.info("No custom yearly note settings found!",a)}}function We(...o){let n=[];for(let t=0,i=o.length;t{let x=t(),b=o.clone().set({hour:x.get("hour"),minute:x.get("minute"),second:x.get("second")});return m&&b.add(parseInt(f,10),y),g?b.format(g.substring(1).trim()):b.format(a)}).replace(/{{\s*yesterday\s*}}/gi,o.clone().subtract(1,"day").format(a)).replace(/{{\s*tomorrow\s*}}/gi,o.clone().add(1,"d").format(a)));return n.foldManager.save(p,c),p}catch(p){console.error(`Failed to create file: '${d}'`,p),new F.Notice("Unable to create new file.")}}function St(o,n){var e;return(e=n[O(o,"day")])!=null?e:null}function Ot(){let{vault:o}=window.app,{folder:n}=Q(),e=o.getAbstractFileByPath(F.normalizePath(n));if(!e)throw new be("Failed to find daily notes folder");let t={};return F.Vault.recurseChildren(e,i=>{if(i instanceof F.TFile){let a=W(i,"day");if(a){let l=O(a,"day");t[l]=i}}}),t}var Me=class extends Error{};function Ct(){let{moment:o}=window,n=o.localeData()._week.dow,e=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];for(;n;)e.push(e.shift()),n--;return e}function kt(o){return Ct().indexOf(o.toLowerCase())}async function Ke(o){let{vault:n}=window.app,{template:e,format:t,folder:i}=Z(),[a,l]=await H(e),r=o.format(t),c=await _(i,r);try{let s=await n.create(c,a.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,h,u,m,f)=>{let y=window.moment(),g=o.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return h&&g.add(parseInt(u,10),m),f?g.format(f.substring(1).trim()):g.format(t)}).replace(/{{\s*title\s*}}/gi,r).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\s*:(.*?)}}/gi,(d,p,h)=>{let u=kt(p);return o.weekday(u).format(h.trim())}));return window.app.foldManager.save(s,l),s}catch(s){console.error(`Failed to create file: '${c}'`,s),new F.Notice("Unable to create new file.")}}function Tt(o,n){var e;return(e=n[O(o,"week")])!=null?e:null}function Et(){let o={};if(!Qe())return o;let{vault:n}=window.app,{folder:e}=Z(),t=n.getAbstractFileByPath(F.normalizePath(e));if(!t)throw new Me("Failed to find weekly notes folder");return F.Vault.recurseChildren(t,i=>{if(i instanceof F.TFile){let a=W(i,"week");if(a){let l=O(a,"week");o[l]=i}}}),o}var Ae=class extends Error{};async function Ge(o){let{vault:n}=window.app,{template:e,format:t,folder:i}=J(),[a,l]=await H(e),r=o.format(t),c=await _(i,r);try{let s=await n.create(c,a.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,h,u,m,f)=>{let y=window.moment(),g=o.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return h&&g.add(parseInt(u,10),m),f?g.format(f.substring(1).trim()):g.format(t)}).replace(/{{\s*date\s*}}/gi,r).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,r));return window.app.foldManager.save(s,l),s}catch(s){console.error(`Failed to create file: '${c}'`,s),new F.Notice("Unable to create new file.")}}function Rt(o,n){var e;return(e=n[O(o,"month")])!=null?e:null}function Nt(){let o={};if(!Ze())return o;let{vault:n}=window.app,{folder:e}=J(),t=n.getAbstractFileByPath(F.normalizePath(e));if(!t)throw new Ae("Failed to find monthly notes folder");return F.Vault.recurseChildren(t,i=>{if(i instanceof F.TFile){let a=W(i,"month");if(a){let l=O(a,"month");o[l]=i}}}),o}var Fe=class extends Error{};async function Dt(o){let{vault:n}=window.app,{template:e,format:t,folder:i}=X(),[a,l]=await H(e),r=o.format(t),c=await _(i,r);try{let s=await n.create(c,a.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,h,u,m,f)=>{let y=window.moment(),g=o.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return h&&g.add(parseInt(u,10),m),f?g.format(f.substring(1).trim()):g.format(t)}).replace(/{{\s*date\s*}}/gi,r).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,r));return window.app.foldManager.save(s,l),s}catch(s){console.error(`Failed to create file: '${c}'`,s),new F.Notice("Unable to create new file.")}}function Vt(o,n){var e;return(e=n[O(o,"quarter")])!=null?e:null}function Lt(){let o={};if(!Je())return o;let{vault:n}=window.app,{folder:e}=X(),t=n.getAbstractFileByPath(F.normalizePath(e));if(!t)throw new Fe("Failed to find quarterly notes folder");return F.Vault.recurseChildren(t,i=>{if(i instanceof F.TFile){let a=W(i,"quarter");if(a){let l=O(a,"quarter");o[l]=i}}}),o}var Pe=class extends Error{};async function zt(o){let{vault:n}=window.app,{template:e,format:t,folder:i}=q(),[a,l]=await H(e),r=o.format(t),c=await _(i,r);try{let s=await n.create(c,a.replace(/{{\s*(date|time)\s*(([+-]\d+)([yqmwdhs]))?\s*(:.+?)?}}/gi,(d,p,h,u,m,f)=>{let y=window.moment(),g=o.clone().set({hour:y.get("hour"),minute:y.get("minute"),second:y.get("second")});return h&&g.add(parseInt(u,10),m),f?g.format(f.substring(1).trim()):g.format(t)}).replace(/{{\s*date\s*}}/gi,r).replace(/{{\s*time\s*}}/gi,window.moment().format("HH:mm")).replace(/{{\s*title\s*}}/gi,r));return window.app.foldManager.save(s,l),s}catch(s){console.error(`Failed to create file: '${c}'`,s),new F.Notice("Unable to create new file.")}}function Ut(o,n){var e;return(e=n[O(o,"year")])!=null?e:null}function Ht(){let o={};if(!Xe())return o;let{vault:n}=window.app,{folder:e}=q(),t=n.getAbstractFileByPath(F.normalizePath(e));if(!t)throw new Pe("Failed to find yearly notes folder");return F.Vault.recurseChildren(t,i=>{if(i instanceof F.TFile){let a=W(i,"year");if(a){let l=O(a,"year");o[l]=i}}}),o}function Wt(){var t,i;let{app:o}=window,n=o.internalPlugins.plugins["daily-notes"];if(n&&n.enabled)return!0;let e=o.plugins.getPlugin("periodic-notes");return e&&((i=(t=e.settings)==null?void 0:t.daily)==null?void 0:i.enabled)}function Qe(){var e,t;let{app:o}=window;if(o.plugins.getPlugin("calendar"))return!0;let n=o.plugins.getPlugin("periodic-notes");return n&&((t=(e=n.settings)==null?void 0:e.weekly)==null?void 0:t.enabled)}function Ze(){var e,t;let{app:o}=window,n=o.plugins.getPlugin("periodic-notes");return n&&((t=(e=n.settings)==null?void 0:e.monthly)==null?void 0:t.enabled)}function Je(){var e,t;let{app:o}=window,n=o.plugins.getPlugin("periodic-notes");return n&&((t=(e=n.settings)==null?void 0:e.quarterly)==null?void 0:t.enabled)}function Xe(){var e,t;let{app:o}=window,n=o.plugins.getPlugin("periodic-notes");return n&&((t=(e=n.settings)==null?void 0:e.yearly)==null?void 0:t.enabled)}function Bt(o){let n={day:Q,week:Z,month:J,quarter:X,year:q}[o];return n()}function $t(o,n){return{day:Ye,month:Ge,week:Ke}[o](n)}v.DEFAULT_DAILY_NOTE_FORMAT=we;v.DEFAULT_MONTHLY_NOTE_FORMAT=ze;v.DEFAULT_QUARTERLY_NOTE_FORMAT=Ue;v.DEFAULT_WEEKLY_NOTE_FORMAT=je;v.DEFAULT_YEARLY_NOTE_FORMAT=He;v.appHasDailyNotesPluginLoaded=Wt;v.appHasMonthlyNotesPluginLoaded=Ze;v.appHasQuarterlyNotesPluginLoaded=Je;v.appHasWeeklyNotesPluginLoaded=Qe;v.appHasYearlyNotesPluginLoaded=Xe;v.createDailyNote=Ye;v.createMonthlyNote=Ge;v.createPeriodicNote=$t;v.createQuarterlyNote=Dt;v.createWeeklyNote=Ke;v.createYearlyNote=zt;v.getAllDailyNotes=Ot;v.getAllMonthlyNotes=Nt;v.getAllQuarterlyNotes=Lt;v.getAllWeeklyNotes=Et;v.getAllYearlyNotes=Ht;v.getDailyNote=St;v.getDailyNoteSettings=Q;v.getDateFromFile=W;v.getDateFromPath=It;v.getDateUID=O;v.getMonthlyNote=Rt;v.getMonthlyNoteSettings=J;v.getPeriodicNoteSettings=Bt;v.getQuarterlyNote=Vt;v.getQuarterlyNoteSettings=X;v.getTemplateInfo=H;v.getWeeklyNote=Tt;v.getWeeklyNoteSettings=Z;v.getYearlyNote=Ut;v.getYearlyNoteSettings=q});var Xt={};jt(Xt,{default:()=>ge});module.exports=bt(Xt);var j=require("obsidian");var Mt=xe(Le()),E=require("obsidian");var K=o=>o.match(/\.MD$|\.md$/m)?o.split(/\.MD$|\.md$/m).slice(0,-1).join(".md"):o;var R=xe(Ie());var qe=require("obsidian"),le=class o{static getBlock(n,e,t){var s,d;let i=e.getCursor("to"),a=n.metadataCache.getFileCache(t),l=a==null?void 0:a.sections;if(!l||l.length===0){console.log("error reading FileCache (empty file?)");return}let r=l.findIndex(p=>p.position.start.line>i.line),c=r>0?l[r-1]:l[l.length-1];return(c==null?void 0:c.type)=="list"&&(c=(d=(s=a.listItems)==null?void 0:s.find(p=>p.position.start.line<=i.line&&p.position.end.line>=i.line))!=null?d:c),c}static getIdOfBlock(n,e){let t=e.id;if(t)return t;let i=e.position.end,a={ch:i.col,line:i.line},l=Math.random().toString(36).substring(2,8),r=o.shouldInsertAfter(e)?` + +`:" ";return n.replaceRange(`${r}^${l}`,a),l}static shouldInsertAfter(n){if(n.type)return["blockquote","code","table","heading","comment","footnoteDefinition"].includes(n.type)}static getBlockId(n){let e=n.workspace.getActiveViewOfType(qe.MarkdownView);if(e){let t=e.editor,i=e.file,a=this.getBlock(n,t,i);if(a)return this.getIdOfBlock(t,a)}}};var _e={openFileOnWrite:!0,openDailyInNewPane:!1,openFileOnWriteInNewPane:!1,openFileWithoutWriteInNewPane:!1,idField:"id",useUID:!1,addFilepathWhenUsingUID:!1,allowEval:!1,includeVaultName:!0,vaultParam:"name"};var et=require("obsidian"),tt=xe(Ie());function nt(...o){let n=[];for(let t=0,i=o.length;t{this.file?this.plugin.tools.copyURI({filepath:this.file,data:e,mode:i}):this.plugin.tools.copyURI({daily:"true",data:e,mode:i})}})}return t}renderSuggestion(e,t){t.innerText=e.display}onChooseSuggestion(e,t){e.func()}};var at=require("obsidian"),V=class extends at.FuzzySuggestModal{constructor(e,t,i=!0){super(e.app);this.placeHolder=t;this.allowNoFile=i;this.plugin=e,this.setPlaceholder(this.placeHolder)}getItems(){let e=[];this.allowNoFile&&e.push({display:"",source:void 0});let t=this.app.workspace.getActiveFile();return t&&e.push({display:"",source:t.path}),[...e,...this.app.vault.getFiles().map(i=>({display:i.path,source:i.path}))]}getItemText(e){return e.display}onChooseItem(e,t){}};var lt=require("obsidian");function Se(o){return o.viewmode?{state:{mode:o.viewmode,source:o.viewmode=="source"}}:void 0}function ee(o){return navigator.clipboard.writeText(o)}function re(o,n){var a;let e=(a=n.parent)==null?void 0:a.path,t=e==="/"?"":e,i=n.name;for(let l=1;l<100;l++){let r=K(i),c=t+(t==""?"":"/")+r+` ${l}.md`;if(!(o.vault.getAbstractFileByPath(c)!==null))return c}}function rt(o,n){let e=new URL(o.vault.getResourcePath(n));return e.host="localhosthostlocal",e.protocol="file",e.search="",e.pathname=decodeURIComponent(e.pathname),e.toString().replace("/localhosthostlocal/","/")}function Oe(o,n,e){var l,r;let t=o.metadataCache.getFileCache(n),i=t.sections,a=(l=t.headings)==null?void 0:l.find(c=>c.heading===e);if(a){let c=i.findIndex(u=>u.type==="heading"&&u.position.start.line===a.position.start.line),s=i.slice(c+1),d=s==null?void 0:s.findIndex(u=>u.type==="heading");return{lastLine:((r=s[(d!==-1?d:s.length)-1])!=null?r:i[c]).position.end.line+1,firstLine:i[c].position.end.line+1}}else new lt.Notice("Can't find heading")}var te=class{constructor(n){this.plugin=n;this.app=this.plugin.app}get tools(){return this.plugin.tools}handlePluginManagement(n){if(n["enable-plugin"]){let e=n["enable-plugin"];this.app.plugins.getPlugin(e)?(this.app.plugins.enablePluginAndSave(e),new w.Notice(`Enabled ${e}`)):this.app.internalPlugins.plugins[e]&&(this.app.internalPlugins.plugins[e].enable(!0),new w.Notice(`Enabled ${e}`))}else if(n["disable-plugin"]){let e=n["disable-plugin"];this.app.plugins.getPlugin(e)?(this.app.plugins.disablePluginAndSave(e),new w.Notice(`Disabled ${e}`)):this.app.internalPlugins.plugins[e]&&(this.app.internalPlugins.plugins[e].disable(!0),new w.Notice(`Disabled ${e}`))}}handleFrontmatterKey(n){var a;let e=n.frontmatterkey,t=this.app.vault.getAbstractFileByPath((a=n.filepath)!=null?a:this.app.workspace.getActiveFile().path);if(!(t instanceof w.TFile))return;let i=this.app.metadataCache.getFileCache(t).frontmatter;if(n.data){let l=n.data;try{l=JSON.parse(l)}catch(r){l=`"${l}"`,l=JSON.parse(l)}this.app.fileManager.processFrontMatter(t,r=>{if(e.startsWith("[")&&e.endsWith("]")){let c=e.substring(1,e.length-1).split(","),s=r;for(let d=0;du==p)),d==c.length-1?s[parseInt(p)]=l:s=s[parseInt(p)]}else d==c.length-1?s[p]=l:s=s[p]}}else r[e]=l})}else{let l;if(e.startsWith("[")&&e.endsWith("]")){let r=e.substring(1,e.length-1).split(","),c=i;for(let s of r)if(c instanceof Array){let d=parseInt(s);Number.isNaN(d)&&(c=c.find(p=>p==s)),c=c[parseInt(s)]}else c=c[s];l=c}else l=i[e];ee(l)}}handleWorkspace(n){let e=this.app.internalPlugins.getEnabledPluginById("workspaces");if(!e)new w.Notice("Workspaces plugin is not enabled"),this.plugin.failure(n);else{if(n.saveworkspace=="true"){let t=e.activeWorkspace;e.saveWorkspace(t),new w.Notice(`Saved current workspace to ${t}`)}n.clipboard&&n.clipboard!="false"?this.tools.copyURI({workspace:e.activeWorkspace}):n.workspace!=null&&e.loadWorkspace(n.workspace),this.plugin.success(n)}}async handleCommand(n){if(n.filepath)if(n.mode){if(n.mode=="new"){let t=this.app.metadataCache.getFirstLinkpathDest(n.filepath,"/");t instanceof w.TFile&&(n.filepath=re(this.app,t))}await this.plugin.open({file:n.filepath,mode:"source",parameters:n});let e=this.app.workspace.getActiveViewOfType(w.MarkdownView);if(e){let t=e.editor,i=t.getValue();if(n.mode==="append"){t.setValue(i+` +`);let a=t.lineCount();t.setCursor({ch:0,line:a})}else n.mode==="prepend"?(t.setValue(` +`+i),t.setCursor({ch:0,line:0})):n.mode==="overwrite"&&t.setValue("")}}else n.line!=null||n.column!=null||n.offset!=null?(await this.plugin.open({file:n.filepath,mode:"source",parameters:n}),await this.plugin.setCursorInLine(n)):await this.plugin.open({file:n.filepath,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n});else(n.openmode||n.viewmode)&&await this.plugin.open({parameters:n});if(n.commandid)this.app.commands.executeCommandById(n.commandid);else if(n.commandname){let e=this.app.commands.commands;for(let t in e)if(e[t].name===n.commandname){e[t].callback?await e[t].callback():e[t].checkCallback(!1);break}}if(n.confirm&&n.confirm!="false"){await new Promise(t=>setTimeout(t,750));let e=document.querySelector(".mod-cta:not([style*='display: none'])");e.click instanceof Function&&e.click()}this.plugin.success(n)}async handleEval(n){if(n.filepath)if(n.mode){if(n.mode=="new"){let t=this.app.metadataCache.getFirstLinkpathDest(n.filepath,"/");t instanceof w.TFile&&(n.filepath=re(this.app,t))}await this.plugin.open({file:n.filepath,mode:"source",parameters:n});let e=this.app.workspace.getActiveViewOfType(w.MarkdownView);if(e){let t=e.editor,i=t.getValue();if(n.mode==="append"){t.setValue(i+` +`);let a=t.lineCount();t.setCursor({ch:0,line:a})}else n.mode==="prepend"?(t.setValue(` +`+i),t.setCursor({ch:0,line:0})):n.mode==="overwrite"&&t.setValue("")}}else n.line!=null||n.column!=null||n.offset!=null?(await this.plugin.open({file:n.filepath,mode:"source",parameters:n}),await this.plugin.setCursorInLine(n)):await this.plugin.open({file:n.filepath,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n});this.plugin.settings.allowEval?((0,eval)(n.eval),this.plugin.success(n)):(new w.Notice("Eval is not allowed. Please enable it in the settings."),this.plugin.failure(n))}async handleDoesFileExist(n){let e=await this.app.vault.adapter.exists(n.filepath);ee((e?1:0).toString()),this.plugin.success(n)}async handleSearchAndReplace(n){let e;if(n.filepath){let t=this.app.vault.getAbstractFileByPath(n.filepath);t instanceof w.TFile&&(e=t)}else e=this.app.workspace.getActiveFile();if(e){let t=await this.app.vault.read(e);if(n.searchregex)try{let[,,i,a]=n.searchregex.match(/(\/?)(.+)\1([a-z]*)/i),l=new RegExp(i,a);t=t.replace(l,n.replace),this.plugin.success(n)}catch(i){new w.Notice(`Can't parse ${n.searchregex} as RegEx`),this.plugin.failure(n)}else t=t.replaceAll(n.search,n.replace),this.plugin.success(n);await this.plugin.writeAndOpenFile(e.path,t,n)}else new w.Notice("Cannot find file"),this.plugin.failure(n)}async handleSearch(n){n.filepath&&await this.plugin.open({file:n.filepath,parameters:n});let e=this.app.workspace.getActiveViewOfType(w.FileView);e.currentMode.showSearch();let t=e.currentMode.search;t.searchInputEl.value=n.search,t.searchInputEl.dispatchEvent(new Event("input"))}async handleWrite(n,e=!1){var i;let t;if(n.filepath?t=this.app.vault.getAbstractFileByPath(n.filepath):t=this.app.workspace.getActiveFile(),n.filepath||t){let a,l=(i=n.filepath)!=null?i:t.path;n.mode==="overwrite"?(a=await this.plugin.writeAndOpenFile(l,n.data,n),this.plugin.success(n)):n.mode==="prepend"?(t instanceof w.TFile?a=await this.plugin.prepend(t,n):a=await this.plugin.prepend(l,n),this.plugin.success(n)):n.mode==="append"?(t instanceof w.TFile?a=await this.plugin.append(t,n):a=await this.plugin.append(l,n),this.plugin.success(n)):n.mode==="new"?t instanceof w.TFile?(a=await this.plugin.writeAndOpenFile(re(this.app,t),n.data,n),this.plugin.hookSuccess(n,a)):(a=await this.plugin.writeAndOpenFile(l,n.data,n),this.plugin.hookSuccess(n,a)):!e&&t instanceof w.TFile?(new w.Notice("File already exists"),this.plugin.openExistingFileAndSetCursor(t.path,n),this.plugin.failure(n)):(a=await this.plugin.writeAndOpenFile(l,n.data,n),this.plugin.success(n)),n.uid&&this.tools.writeUIDToFile(a,n.uid)}else new w.Notice("Cannot find file"),this.plugin.failure(n)}async handleOpen(n){if(n.heading!=null){await this.plugin.open({file:n.filepath+"#"+n.heading,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n});let e=this.app.workspace.getActiveViewOfType(w.MarkdownView);if(!e)return;let i=this.app.metadataCache.getFileCache(e.file).headings.find(a=>a.heading===n.heading);e.editor.focus(),e.editor.setCursor({line:i.position.start.line+1,ch:0})}else if(n.block!=null){await this.plugin.open({file:n.filepath+"#^"+n.block,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n});let e=this.app.workspace.getActiveViewOfType(w.MarkdownView);if(!e)return;let i=this.app.metadataCache.getFileCache(e.file).blocks[n.block];e.editor.focus(),e.editor.setCursor({line:i.position.start.line,ch:0})}else await this.plugin.open({file:n.filepath,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n}),(n.line!=null||n.column!=null||n.offset!=null)&&await this.plugin.setCursorInLine(n);if(n.mode!=null&&await this.plugin.setCursor(n),n.uid){let e=this.app.workspace.getActiveViewOfType(w.MarkdownView);this.tools.writeUIDToFile(e.file,n.uid)}this.plugin.success(n)}async handleOpenBlock(n){let e=this.tools.getFileFromBlockID(n.block);e&&await this.plugin.chooseHandler({...n,filepath:e.path},!1)}handleCopyFileURI(n,e){let t=this.app.workspace.getActiveViewOfType(w.FileView);if(!(!t&&!e)){if(t instanceof w.MarkdownView){let i=t.editor.getCursor(),a=this.app.metadataCache.getFileCache(t.file);if(a.headings){for(let l of a.headings)if(l.position.start.line<=i.line&&l.position.end.line>=i.line){this.tools.copyURI({filepath:t.file.path,heading:l.heading});return}}if(a.blocks)for(let l of Object.keys(a.blocks)){let r=a.blocks[l];if(r.position.start.line<=i.line&&r.position.end.line>=i.line){this.tools.copyURI({filepath:t.file.path,block:l});return}}}if(n){let i=e!=null?e:this.app.workspace.getActiveFile();if(!i){new w.Notice("No file opened");return}this.tools.copyURI({filepath:i.path})}else{let i=new V(this.plugin,"Choose a file",!1);i.open(),i.onChooseItem=(a,l)=>{new B(this.plugin,a.source).open()}}}}handleOpenSettings(n){if(this.app.setting.containerEl.parentElement===null&&this.app.setting.open(),n.settingid=="plugin-browser"?(this.app.setting.openTabById("community-plugins"),this.app.setting.activeTab.containerEl.find(".mod-cta").click()):n.settingid=="theme-browser"?(this.app.setting.openTabById("appearance"),this.app.setting.activeTab.containerEl.find(".mod-cta").click()):this.app.setting.openTabById(n.settingid),n.settingsection){let e=this.app.setting.tabContentContainer.querySelectorAll("*"),t=Array.prototype.find.call(e,i=>i.textContent==n.settingsection);t&&t.scrollIntoView()}this.plugin.success(n)}async handleUpdatePlugins(n){new w.Notice("Checking for updates\u2026"),await this.app.plugins.checkForUpdates(),Object.keys(this.app.plugins.updates).length>0&&(n.settingid="community-plugins",this.handleOpenSettings(n),this.app.setting.activeTab.containerEl.findAll(".mod-cta").last().click()),this.plugin.success(n)}async handleBookmarks(n){let e=this.app.internalPlugins.getEnabledPluginById("bookmarks"),i=e.getBookmarks().find(l=>l.title==n.bookmark),a;n.openmode=="true"||n.openmode=="false"?a=n.openmode=="true":a=n.openmode,e.openBookmark(i,a)}async handleCanvas(n){n.filepath&&await this.plugin.open({file:n.filepath,setting:this.plugin.settings.openFileWithoutWriteInNewPane,parameters:n});let e=this.app.workspace.activeLeaf.view;if(e.getViewType()!="canvas"){new w.Notice("Active view is not a canvas");return}let t=e;if(n.canvasnodes){let i=n.canvasnodes.split(","),a=t.canvas.nodes,l=i.map(c=>a.get(c)),r=t.canvas.selection;t.canvas.updateSelection(()=>{for(let c of l)r.add(c)}),t.canvas.zoomToSelection()}if(n.canvasviewport){let[i,a,l]=n.canvasviewport.split(",");if(i!="-")if(i.startsWith("--")||i.startsWith("++")){let r=t.canvas.tx+Number(i.substring(1));t.canvas.tx=r}else t.canvas.tx=Number(i);if(a!="-")if(a.startsWith("--")||a.startsWith("++")){let r=t.canvas.ty+Number(a.substring(1));t.canvas.ty=r}else t.canvas.ty=Number(a);if(l!="-")if(l.startsWith("--")||l.startsWith("++")){let r=t.canvas.tZoom+Number(l.substring(1));t.canvas.tZoom=r}else t.canvas.tZoom=Number(l);t.canvas.markViewportChanged()}}};var st=require("obsidian"),se=class extends st.FuzzySuggestModal{constructor(e,t){super(e.app);this.plugin=e,this.file=t}getItems(){let e=this.app.commands.commands;return Object.keys(e).map(i=>({id:e[i].id,name:e[i].name}))}getItemText(e){return e.name}onChooseItem(e,t){this.plugin.tools.copyURI({filepath:this.file,commandid:e.id})}};var ct=require("obsidian"),ce=class extends ct.SuggestModal{constructor(e,t,i){super(e.app);this.search=t;this.filepath=i;this.emptyText="Empty text (replace with nothing)";this.plugin=e,this.setPlaceholder("Replacement text")}getSuggestions(e){return e===""&&(e=this.emptyText),[e]}renderSuggestion(e,t){t.innerText=e}onChooseSuggestion(e,t){this.search.isRegEx?this.plugin.tools.copyURI({filepath:this.filepath,searchregex:this.search.source,replace:e==this.emptyText?"":e}):this.plugin.tools.copyURI({filepath:this.filepath,search:this.search.source,replace:e==this.emptyText?"":e})}};var dt=require("obsidian"),de=class extends dt.SuggestModal{constructor(e){super(e.app);this.plugin=e,this.setPlaceholder("Searched text. RegEx is supported")}getSuggestions(e){e===""&&(e="...");let t;try{t=new RegExp(e)}catch(i){}return[{source:e,isRegEx:!1,display:e},{source:e,display:t?`As RegEx: ${e}`:"Can't parse RegEx",isRegEx:!0}]}renderSuggestion(e,t){t.innerText=e.display}onChooseSuggestion(e,t){}};var S=require("obsidian"),pe=class extends S.PluginSettingTab{constructor(e,t){super(e,t);this.plugin=t}display(){let{containerEl:e}=this;e.empty(),e.createEl("h2",{text:this.plugin.manifest.name}),new S.Setting(e).setName("Open file on write").addToggle(t=>t.setValue(this.plugin.settings.openFileOnWrite).onChange(i=>{this.plugin.settings.openFileOnWrite=i,this.plugin.saveSettings()})),new S.Setting(e).setName("Open file on write in a new pane").setDisabled(this.plugin.settings.openFileOnWrite).addToggle(t=>t.setValue(this.plugin.settings.openFileOnWriteInNewPane).onChange(i=>{this.plugin.settings.openFileOnWriteInNewPane=i,this.plugin.saveSettings()})),new S.Setting(e).setName("Open daily note in a new pane").addToggle(t=>t.setValue(this.plugin.settings.openDailyInNewPane).onChange(i=>{this.plugin.settings.openDailyInNewPane=i,this.plugin.saveSettings()})),new S.Setting(e).setName("Open file without write in new pane").addToggle(t=>t.setValue(this.plugin.settings.openFileWithoutWriteInNewPane).onChange(i=>{this.plugin.settings.openFileWithoutWriteInNewPane=i,this.plugin.saveSettings()})),new S.Setting(e).setName("Use UID instead of file paths").addToggle(t=>t.setValue(this.plugin.settings.useUID).onChange(i=>{this.plugin.settings.useUID=i,this.plugin.saveSettings(),this.display()})),new S.Setting(e).setName("Include vault name/ID parameter").addToggle(t=>t.setValue(this.plugin.settings.includeVaultName).onChange(i=>{this.plugin.settings.includeVaultName=i,this.plugin.saveSettings(),this.display()})),this.plugin.settings.includeVaultName&&new S.Setting(e).setName("Vault identifying parameter").setDesc("Choose whether to use the vault Name or its internal ID as the identifying parameter.").addDropdown(t=>t.addOption("name","Name").addOption("id","ID").setValue(this.plugin.settings.vaultParam).onChange(i=>{this.plugin.settings.vaultParam=i,this.plugin.saveSettings()})),this.plugin.settings.useUID&&new S.Setting(e).setName("Add filepath parameter").setDesc("When using UID instead of file paths, you can still add the filepath parameter to know what this URI is about. It's NOT actually used.").addToggle(t=>t.setValue(this.plugin.settings.addFilepathWhenUsingUID).onChange(i=>{this.plugin.settings.addFilepathWhenUsingUID=i,this.plugin.saveSettings()})),new S.Setting(e).setName("UID field in frontmatter").addText(t=>t.setValue(this.plugin.settings.idField).onChange(i=>{this.plugin.settings.idField=i,this.plugin.saveSettings()})),new S.Setting(e).setName("Allow executing arbitrary code via eval").setDesc("\u26A0\uFE0F This can be dangerous as it allows executing arbitrary code. Only enable this if you trust the source of the URIs you are using and know what you are doing. \u26A0\uFE0F").addToggle(t=>t.setValue(this.plugin.settings.allowEval).onChange(i=>{this.plugin.settings.allowEval=i,this.plugin.saveSettings()})),new S.Setting(e).setName("Donate").setDesc("If you like this Plugin, consider donating to support continued development.").addButton(t=>{t.buttonEl.outerHTML="Buy Me a Coffee at ko-fi.com"})}};var L=require("obsidian");var ue,Gt=new Uint8Array(16);function Ce(){if(!ue&&(ue=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!ue))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ue(Gt)}var pt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Qt(o){return typeof o=="string"&&pt.test(o)}var ut=Qt;var I=[];for(he=0;he<256;++he)I.push((he+256).toString(16).substr(1));var he;function Zt(o){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=(I[o[n+0]]+I[o[n+1]]+I[o[n+2]]+I[o[n+3]]+"-"+I[o[n+4]]+I[o[n+5]]+"-"+I[o[n+6]]+I[o[n+7]]+"-"+I[o[n+8]]+I[o[n+9]]+"-"+I[o[n+10]]+I[o[n+11]]+I[o[n+12]]+I[o[n+13]]+I[o[n+14]]+I[o[n+15]]).toLowerCase();if(!ut(e))throw TypeError("Stringified UUID is invalid");return e}var ht=Zt;function Jt(o,n,e){o=o||{};var t=o.random||(o.rng||Ce)();if(t[6]=t[6]&15|64,t[8]=t[8]&63|128,n){e=e||0;for(var i=0;i<16;++i)n[e+i]=t[i];return n}return ht(t)}var ke=Jt;var ne=class{constructor(n){this.plugin=n;this.app=this.plugin.app}get settings(){return this.plugin.settings}async writeUIDToFile(n,e){var s;let t=(s=this.app.metadataCache.getFileCache(n))==null?void 0:s.frontmatter,i=await this.app.vault.read(n),a=(!t||t.length===0)&&!i.match(/^-{3}\s*\n*\r*-{3}/),l=i.split(` +`),r=`${this.plugin.settings.idField}:`;if(a)l.unshift("---"),l.unshift(`${r} ${e}`),l.unshift("---");else{let d=l.findIndex(p=>p.startsWith(r));d!=-1?l[d]=`${r} ${e}`:l.splice(1,0,`${r} ${e}`)}let c=l.join(` +`);return await this.app.vault.modify(n,c),e}async getUIDFromFile(n){var i;let e=(i=this.app.metadataCache.getFileCache(n))!=null?i:await new Promise(a=>{let l=this.app.metadataCache.on("changed",r=>{if(r.path==n.path){let c=this.app.metadataCache.getFileCache(n);this.app.metadataCache.offref(l),a(c)}})}),t=(0,L.parseFrontMatterEntry)(e.frontmatter,this.plugin.settings.idField);return t!=null?t instanceof Array?t[0]:t:await this.writeUIDToFile(n,ke())}async generateURI(n){let e="obsidian://adv-uri",t="",i=this.app.vault.getAbstractFileByPath(n.filepath);this.settings.includeVaultName&&(t+="?vault=",this.settings.vaultParam=="id"&&this.app.appId?t+=encodeURIComponent(this.app.appId):t+=encodeURIComponent(this.app.vault.getName())),this.settings.useUID&&i instanceof L.TFile&&i.extension=="md"&&(this.settings.addFilepathWhenUsingUID||(n.filepath=void 0),n.uid=await this.getUIDFromFile(i));let a=Object.keys(n).filter(l=>n[l]).sort((l,r)=>{let c=["filepath","filename","uid","daily"],s=["data","eval"];return c.includes(l)?-1:c.includes(r)||s.includes(l)?1:s.includes(r)?-1:0});for(let l of a)n[l]!=null&&(t+=t?"&":"?",t+=`${l}=${encodeURIComponent(n[l])}`);return t.endsWith("%20")&&(t+="&"),e+t}async copyURI(n){let e=await this.generateURI(n);await ee(e),new L.Notice("Advanced URI copied to your clipboard")}getFileFromUID(n){var i;let e=this.app.vault.getMarkdownFiles(),t=this.settings.idField;for(let a of e){let l=(0,L.parseFrontMatterEntry)((i=this.app.metadataCache.getFileCache(a))==null?void 0:i.frontmatter,t);if(l instanceof Array){if(l.contains(n))return a}else if(l==n)return a}}getFileFromBlockID(n){var t,i;let e=this.app.vault.getMarkdownFiles();for(let a of e)if(((i=(t=this.app.metadataCache.getFileCache(a))==null?void 0:t.blocks)==null?void 0:i[n])!=null)return a}};var fe=require("obsidian"),ye=class extends fe.FuzzySuggestModal{constructor(e){super(e.app);this.plugin=e,this.setPlaceholder("Choose a workspace")}getItems(){let e=this.app.internalPlugins.getEnabledPluginById("workspaces");if(!e)new fe.Notice("Workspaces plugin is not enabled");else return Object.keys(e.workspaces)}getItemText(e){return e}onChooseItem(e,t){this.plugin.tools.copyURI({workspace:e})}};var ge=class extends j.Plugin{constructor(){super(...arguments);this.handlers=new te(this);this.tools=new ne(this)}async onload(){await this.loadSettings(),this.addSettingTab(new pe(this.app,this)),this.addCommand({id:"copy-uri-current-file",name:"Copy URI for file with options",callback:()=>this.handlers.handleCopyFileURI(!1)}),this.addCommand({id:"copy-uri-current-file-simple",name:"Copy URI for current file",callback:()=>this.handlers.handleCopyFileURI(!0)}),this.addCommand({id:"copy-uri-daily",name:"Copy URI for daily note",callback:()=>new B(this).open()}),this.addCommand({id:"copy-uri-search-and-replace",name:"Copy URI for search and replace",callback:()=>{let e=new V(this,"Used file for search and replace");e.open(),e.onChooseItem=t=>{let i=new de(this);i.open(),i.onChooseSuggestion=a=>{new ce(this,a,t==null?void 0:t.source).open()}}}}),this.addCommand({id:"copy-uri-command",name:"Copy URI for command",callback:()=>{let e=new V(this,"Select a file to be opened before executing the command");e.open(),e.onChooseItem=t=>{new se(this,t==null?void 0:t.source).open()}}}),this.addCommand({id:"copy-uri-block",name:"Copy URI for current block",checkCallback:e=>{let t=this.app.workspace.getActiveViewOfType(j.MarkdownView);if(e)return t!=null;let i=le.getBlockId(this.app);i&&this.tools.copyURI({filepath:t.file.path,block:i})}}),this.addCommand({id:"copy-uri-workspace",name:"Copy URI for workspace",callback:()=>{new ye(this).open()}}),this.addCommand({id:"copy-uri-canvas-node",name:"Copy URI for selected canvas nodes",checkCallback:e=>{let t=this.app.workspace.activeLeaf.view;if(e)return t.getViewType()==="canvas"&&t.canvas.selection.size>0;if(t.getViewType()!=="canvas")return!1;let i=t,a=[];i.canvas.selection.forEach(l=>{a.push(l.id)}),this.tools.copyURI({canvasnodes:a.join(","),filepath:t.file.path})}}),this.addCommand({id:"copy-uri-canvas-viewport",name:"Copy URI for current canvas viewport",checkCallback:e=>{let t=this.app.workspace.activeLeaf.view;if(e)return t.getViewType()==="canvas";if(t.getViewType()!=="canvas")return!1;let a=t.canvas,l=a.tx.toFixed(0),r=a.ty.toFixed(0),c=a.tZoom.toFixed(3);this.tools.copyURI({filepath:t.file.path,canvasviewport:`${l},${r},${c}`})}}),this.registerObsidianProtocolHandler("advanced-uri",async e=>{let t=e;for(let i in t)t[i]=decodeURIComponent(t[i]);this.onUriCall(t)}),this.registerObsidianProtocolHandler("adv-uri",async e=>{let t=e;this.onUriCall(t)}),this.registerObsidianProtocolHandler("hook-get-advanced-uri",async e=>{let t=e;for(let a in t)t[a]=decodeURIComponent(t[a]);let i=this.app.workspace.getActiveFile();i?this.hookSuccess(t,i):this.failure(t,{errorMessage:"No file opened"})}),this.registerEvent(this.app.workspace.on("file-menu",(e,t,i)=>{(i==="more-options"||i==="tab-header"||i=="file-explorer-context-menu")&&t instanceof j.TFile&&e.addItem(a=>{a.setTitle("Copy Advanced URI").setIcon("link").setSection("info").onClick(l=>this.handlers.handleCopyFileURI(!0,t))})}))}async onUriCall(e){var i,a,l;let t=!1;if(this.lastParameters={...e},e.uid){let r=(i=this.tools.getFileFromUID(e.uid))==null?void 0:i.path;r!=null&&(e.filepath=r,e.uid=void 0)}else if(e.filename){let r=this.app.metadataCache.getFirstLinkpathDest(e.filename,"");r||(r=this.app.vault.getMarkdownFiles().find(d=>{var p;return(p=(0,j.parseFrontMatterAliases)(this.app.metadataCache.getFileCache(d).frontmatter))==null?void 0:p.includes(e.filename)}));let c=this.app.fileManager.getNewFileParent((a=this.app.workspace.getActiveFile())==null?void 0:a.path),s=c.isRoot()?"":c.path+"/";e.filepath=(l=r==null?void 0:r.path)!=null?l:s+(0,j.normalizePath)(e.filename)}if(e.filepath){e.filepath=(0,j.normalizePath)(e.filepath);let r=e.filepath.lastIndexOf(".");e.filepath.substring(r<0?e.filepath.length:r)===""&&(e.filepath=e.filepath+".md")}else if(e.daily==="true"){if(!(0,R.appHasDailyNotesPluginLoaded)()){new j.Notice("Daily notes plugin is not loaded");return}let r=window.moment(Date.now()),c=(0,R.getAllDailyNotes)(),s=(0,R.getDailyNote)(r,c);s||(e.exists==="true"?e.filepath=await it(r):(s=await(0,R.createDailyNote)(r),await new Promise(d=>setTimeout(d,500)),t=!0)),s!==void 0&&(e.filepath=s.path)}e.clipboard==="true"&&(e.data=await navigator.clipboard.readText()),this.chooseHandler(e,t)}async chooseHandler(e,t){e["enable-plugin"]||e["disable-plugin"]?this.handlers.handlePluginManagement(e):e.frontmatterkey?this.handlers.handleFrontmatterKey(e):e.workspace||e.saveworkspace=="true"?this.handlers.handleWorkspace(e):e.commandname||e.commandid?this.handlers.handleCommand(e):e.bookmark?this.handlers.handleBookmarks(e):e.eval?this.handlers.handleEval(e):e.filepath&&e.exists==="true"?this.handlers.handleDoesFileExist(e):e.canvasnodes||e.canvasviewport?this.handlers.handleCanvas(e):e.data?this.handlers.handleWrite(e,t):e.filepath&&e.heading?(await this.handlers.handleOpen(e),e.filepath=void 0,e.heading=void 0,this.chooseHandler(e,t)):e.filepath&&e.block?(await this.handlers.handleOpen(e),e.filepath=void 0,e.block=void 0,this.chooseHandler(e,t)):(e.search||e.searchregex)&&e.replace!=null?this.handlers.handleSearchAndReplace(e):e.search?this.handlers.handleSearch(e):e.filepath?this.handlers.handleOpen(e):e.block?this.handlers.handleOpenBlock(e):e.settingid?this.handlers.handleOpenSettings(e):e.updateplugins&&this.handlers.handleUpdatePlugins(e)}async hookSuccess(e,t){if(!e["x-success"])return;let i={title:K(t.name),advanceduri:await this.tools.generateURI({filepath:t.path}),urlkey:"advanceduri",fileuri:rt(this.app,t)};this.success(e,i)}success(e,t){if(e["x-success"]){let i=new URL(e["x-success"]);for(let a in t)i.searchParams.set(a,t[a]);window.open(i.toString())}}failure(e,t){if(e["x-error"]){let i=new URL(e["x-error"]);for(let a in t)i.searchParams.set(a,t[a]);window.open(i.toString())}}async append(e,t){var l;let i,a;if(t.heading){if(e instanceof j.TFile){i=e.path;let r=(l=Oe(this.app,e,t.heading))==null?void 0:l.lastLine;if(r===void 0)return;let s=(await this.app.vault.read(e)).split(` +`);s.splice(r,0,...t.data.split(` +`)),a=s.join(` +`)}}else if(e instanceof j.TFile){i=e.path;let r=await this.app.vault.read(e);if(t.line){let c=Math.max(Number(t.line),0),s=r.split(` +`);s.splice(c,0,t.data),a=s.join(` +`)}else a=r+` +`+t.data}else i=e,a=t.data;return this.writeAndOpenFile(i,a,t)}async prepend(e,t){var l;let i,a;if(t.heading){if(e instanceof j.TFile){i=e.path;let r=(l=Oe(this.app,e,t.heading))==null?void 0:l.firstLine;if(r===void 0)return;let s=(await this.app.vault.read(e)).split(` +`);s.splice(r,0,...t.data.split(` +`)),a=s.join(` +`)}}else if(e instanceof j.TFile){i=e.path;let r=await this.app.vault.read(e),c=this.app.metadataCache.getFileCache(e),s=0;t.line?s+=Math.max(Number(t.line)-1,0):c.frontmatterPosition&&(s+=c.frontmatterPosition.end.line+1);let d=r.split(` +`);d.splice(s,0,t.data),a=d.join(` +`)}else i=e,a=t.data;return this.writeAndOpenFile(i,a,t)}async writeAndOpenFile(e,t,i){let a=this.app.vault.getAbstractFileByPath(e);if(a instanceof j.TFile)await this.app.vault.modify(a,t);else{let l=e.split("/"),r=l.slice(0,l.length-1).join("/");l.length>1&&!(this.app.vault.getAbstractFileByPath(r)instanceof j.TFolder)&&await this.app.vault.createFolder(r),/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(t)?await this.app.vault.createBinary(e,(0,j.base64ToArrayBuffer)(t)):await this.app.vault.create(e,t)}return this.openExistingFileAndSetCursor(e,i),this.app.vault.getAbstractFileByPath(e)}async openExistingFileAndSetCursor(e,t){t.openmode!="silent"&&this.settings.openFileOnWrite&&(await this.open({file:e,setting:this.settings.openFileOnWriteInNewPane,parameters:t}),(t.line!=null||t.column!=null||t.offset!=null)&&await this.setCursorInLine(t))}async open({file:e,setting:t,parameters:i,supportPopover:a,mode:l}){var c;let r;if(i.openmode=="popover"&&(a==null||a)){let s=this.app.plugins.plugins["obsidian-hover-editor"];s||(new j.Notice("Cannot find Hover Editor plugin. Please file an issue."),this.failure(i)),await new Promise(d=>{r=s.spawnPopover(void 0,()=>{this.app.workspace.setActiveLeaf(r,{focus:!0}),d()})})}else{let s=t;if(i.newpane!==void 0&&(s=i.newpane=="true"),i.openmode!==void 0&&(i.openmode=="true"||i.openmode=="false"?s=i.openmode=="true":i.openmode=="popover"?s=!1:j.Platform.isMobile&&i.openmode=="window"||(s=i.openmode)),s=="silent")return;if(j.Platform.isMobileApp&&s=="window"&&(s=!0),e!=null){let d=!1;isBoolean(s)&&this.app.workspace.iterateAllLeaves(p=>{var h;if(((h=p.view.file)==null?void 0:h.path)===i.filepath){if(d&&p.width==0)return;d=!0,this.app.workspace.setActiveLeaf(p,{focus:!0}),r=p}})}r||(r=this.app.workspace.getLeaf(s),this.app.workspace.setActiveLeaf(r,{focus:!0}))}if(e instanceof j.TFile?await r.openFile(e):e!=null&&await this.app.workspace.openLinkText(e,"/",!1,l!=null?{state:{mode:l}}:Se(i)),r.view instanceof j.MarkdownView){let s=r.getViewState();l!=null?s.state.mode=l:s.state={...s.state,...(c=Se(i))==null?void 0:c.state},await r.setViewState(s)}return r}async setCursor(e){let t=this.app.workspace.getActiveViewOfType(j.MarkdownView);if(!t)return;let i=e.mode,a=t.editor,l=t.leaf.getViewState();if(l.state.mode="source",i==="append"){let r=a.lastLine(),c=a.getLine(r).length;await t.leaf.setViewState(l,{focus:!0}),a.setCursor({ch:c,line:r})}else i==="prepend"&&(await t.leaf.setViewState(l,{focus:!0}),a.setCursor({ch:0,line:0}));await new Promise(r=>setTimeout(r,10)),e.viewmode=="preview"&&(l.state.mode="preview",await t.leaf.setViewState(l))}async setCursorInLine(e){let t=this.app.workspace.getActiveViewOfType(j.MarkdownView);if(!t)return;let i=t.leaf.getViewState(),a=e.line!=null?Number(e.line):void 0,l=e.column?Number(e.column):void 0;i.state.mode="source",await t.leaf.setViewState(i);let r,c;if(e.offset!=null){let s=t.editor.offsetToPos(Number(e.offset));r=s.line,c=s.ch}else{r=a!=null?Math.min(a-1,t.editor.lineCount()-1):t.editor.getCursor().line;let s=t.editor.getLine(r).length-1;c=Math.min(l-1,s)}t.editor.focus(),t.editor.setCursor({line:r,ch:c}),t.editor.scrollIntoView({from:{line:r,ch:c},to:{line:r,ch:c}},!0),await new Promise(s=>setTimeout(s,10)),e.viewmode=="preview"&&(i.state.mode="preview",await t.leaf.setViewState(i))}async loadSettings(){this.settings=Object.assign(_e,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}}; +//! All of these methods are taken from https://www.npmjs.com/package/obsidian-daily-notes-interface. +/*! Bundled license information: + +feather-icons/dist/feather.js: + (*! + Copyright (c) 2016 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames + *) +*/ diff --git a/.obsidian/plugins/obsidian-advanced-uri/manifest.json b/.obsidian/plugins/obsidian-advanced-uri/manifest.json new file mode 100644 index 0000000..c92d8e2 --- /dev/null +++ b/.obsidian/plugins/obsidian-advanced-uri/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "obsidian-advanced-uri", + "name": "Advanced URI", + "description": "Advanced modes for Obsidian URI", + "isDesktopOnly": false, + "js": "main.js", + "fundingUrl": "https://ko-fi.com/vinzent", + "version": "1.44.1", + "author": "Vinzent", + "authorUrl": "https://github.com/Vinzent03" +}