diff --git a/.obsidian/plugins/cron/data.json b/.obsidian/plugins/cron/data.json index 47281e21..3993e8f0 100644 --- a/.obsidian/plugins/cron/data.json +++ b/.obsidian/plugins/cron/data.json @@ -19,7 +19,7 @@ "601d1cc7-a4f3-4f19-aa9f-3bddd7ab6b1d": { "locked": false, "lockedDeviceName": "iPhone", - "lastRun": "2025-01-03T07:48:44+01:00" + "lastRun": "2025-01-15T07:37:12+01:00" } } } \ No newline at end of file diff --git a/.obsidian/plugins/obsidian-activity-history/data.json b/.obsidian/plugins/obsidian-activity-history/data.json index 493d959a..6de3284e 100644 --- a/.obsidian/plugins/obsidian-activity-history/data.json +++ b/.obsidian/plugins/obsidian-activity-history/data.json @@ -12,8 +12,8 @@ "checkpointList": [ { "path": "/", - "date": "2025-01-03", - "size": 11566542 + "date": "2025-01-15", + "size": 11839252 } ], "activityHistory": [ @@ -4370,7 +4370,55 @@ }, { "date": "2025-01-03", - "value": 1572 + "value": 4842 + }, + { + "date": "2025-01-04", + "value": 3834 + }, + { + "date": "2025-01-05", + "value": 2548 + }, + { + "date": "2025-01-06", + "value": 124918 + }, + { + "date": "2025-01-07", + "value": 1754 + }, + { + "date": "2025-01-08", + "value": 1601 + }, + { + "date": "2025-01-09", + "value": 1438 + }, + { + "date": "2025-01-10", + "value": 2341 + }, + { + "date": "2025-01-11", + "value": 1922 + }, + { + "date": "2025-01-12", + "value": 2030 + }, + { + "date": "2025-01-13", + "value": 1571 + }, + { + "date": "2025-01-14", + "value": 126700 + }, + { + "date": "2025-01-15", + "value": 1285 } ] } diff --git a/.obsidian/plugins/obsidian-advanced-uri/main.js b/.obsidian/plugins/obsidian-advanced-uri/main.js index 52be4968..cd42b6fb 100644 --- a/.obsidian/plugins/obsidian-advanced-uri/main.js +++ b/.obsidian/plugins/obsidian-advanced-uri/main.js @@ -3,15 +3,15 @@ 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)?` +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 Tt(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=Tt(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 kt(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=kt;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"];e in this.app.plugins.manifests&&!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(` +`+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.toLowerCase()];e.editor.focus(),i&&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:r.id});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 Te=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(` +`);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,Te())}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();n=n.toLowerCase();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(` diff --git a/.obsidian/plugins/obsidian-advanced-uri/manifest.json b/.obsidian/plugins/obsidian-advanced-uri/manifest.json index d51a111c..8ffda6f6 100644 --- a/.obsidian/plugins/obsidian-advanced-uri/manifest.json +++ b/.obsidian/plugins/obsidian-advanced-uri/manifest.json @@ -5,7 +5,7 @@ "isDesktopOnly": false, "js": "main.js", "fundingUrl": "https://ko-fi.com/vinzent", - "version": "1.44.2", + "version": "1.44.3", "author": "Vinzent", "authorUrl": "https://github.com/Vinzent03" } diff --git a/.obsidian/plugins/obsidian-commits/data.json b/.obsidian/plugins/obsidian-commits/data.json index e2a17c65..cbd095aa 100644 --- a/.obsidian/plugins/obsidian-commits/data.json +++ b/.obsidian/plugins/obsidian-commits/data.json @@ -490,7 +490,7 @@ "links": 4 }, "05.01 Computer setup/Storage and Syncing.md": { - "size": 6019, + "size": 6674, "tags": 4, "links": 13 }, @@ -1510,12 +1510,12 @@ "links": 7 }, "05.02 Networks/Selfhosting.md": { - "size": 9487, + "size": 10506, "tags": 5, "links": 13 }, "05.02 Networks/Configuring UFW.md": { - "size": 5415, + "size": 6059, "tags": 2, "links": 6 }, @@ -1565,7 +1565,7 @@ "links": 1 }, "01.02 Home/Household.md": { - "size": 2643, + "size": 3024, "tags": 2, "links": 4 }, @@ -6280,7 +6280,7 @@ "links": 4 }, "01.07 Animals/@Sally.md": { - "size": 2282, + "size": 2545, "tags": 2, "links": 4 }, @@ -10950,7 +10950,7 @@ "links": 3 }, "01.06 Health/2024-06-29 Fungal treatment.md": { - "size": 8696, + "size": 10699, "tags": 2, "links": 3 }, @@ -12785,7 +12785,7 @@ "links": 5 }, "01.07 Animals/@Ambar.md": { - "size": 2147, + "size": 2426, "tags": 2, "links": 4 }, @@ -13072,7 +13072,7 @@ "00.03 News/The Ghosts in the Machine, by Liz Pelly.md": { "size": 36886, "tags": 3, - "links": 1 + "links": 2 }, "02.02 Paris/La Fantaisie.md": { "size": 1510, @@ -13082,7 +13082,7 @@ "00.03 News/The American Oil Industry’s Playbook, Illustrated How Drillers Offload Costly Cleanup Onto the Public.md": { "size": 26971, "tags": 5, - "links": 1 + "links": 2 }, "03.03 Food & Wine/Velouté de carottes à l’anis.md": { "size": 3164, @@ -13170,6 +13170,126 @@ "links": 4 }, "00.01 Admin/Calendars/2025-01-03.md": { + "size": 1412, + "tags": 0, + "links": 5 + }, + "03.04 Cinematheque/The Shining (1980).md": { + "size": 2315, + "tags": 1, + "links": 1 + }, + "03.04 Cinematheque/Speed (1994).md": { + "size": 2171, + "tags": 1, + "links": 1 + }, + "00.01 Admin/Calendars/2025-01-04.md": { + "size": 1412, + "tags": 0, + "links": 6 + }, + "00.01 Admin/Calendars/2025-01-05.md": { + "size": 1412, + "tags": 0, + "links": 7 + }, + "00.01 Admin/Calendars/2025-01-06.md": { + "size": 1412, + "tags": 0, + "links": 4 + }, + "00.03 News/The After Dark Bandit.md": { + "size": 76522, + "tags": 4, + "links": 1 + }, + "00.03 News/Trump’s Campaign Chiefs Tell Their Inside Story ‘The Black Swan Election’ - POLITICO.md": { + "size": 31054, + "tags": 3, + "links": 1 + }, + "00.03 News/College Football Insiders Reveal ‘Secret Economy of NIL’.md": { + "size": 1172, + "tags": 4, + "links": 1 + }, + "00.03 News/His Very Best (1924-2024).md": { + "size": 14832, + "tags": 3, + "links": 1 + }, + "00.01 Admin/Calendars/2025-01-07.md": { + "size": 1412, + "tags": 0, + "links": 4 + }, + "00.01 Admin/Calendars/2025-01-08.md": { + "size": 1412, + "tags": 0, + "links": 4 + }, + "00.01 Admin/Calendars/2025-01-09.md": { + "size": 1412, + "tags": 0, + "links": 4 + }, + "00.01 Admin/Calendars/2025-01-10.md": { + "size": 1412, + "tags": 0, + "links": 7 + }, + "00.01 Admin/Calendars/2025-01-11.md": { + "size": 1412, + "tags": 0, + "links": 4 + }, + "00.01 Admin/Calendars/2025-01-12.md": { + "size": 1412, + "tags": 0, + "links": 9 + }, + "00.01 Admin/Calendars/2025-01-13.md": { + "size": 1412, + "tags": 0, + "links": 6 + }, + "00.01 Admin/Calendars/2025-01-14.md": { + "size": 1412, + "tags": 0, + "links": 4 + }, + "00.01 Admin/Calendars/Events/2025-01-12 ⚽️ PSG - ASSE (2-1).md": { + "size": 384, + "tags": 0, + "links": 2 + }, + "00.03 News/Power Failure On Landscape and Abandonment — Switchyard.md": { + "size": 30893, + "tags": 2, + "links": 1 + }, + "00.03 News/Sunset Boulevard in ruins Palisades fire’s massive scale comes into focus - Los Angeles Times.md": { + "size": 9546, + "tags": 3, + "links": 1 + }, + "00.03 News/Steward Health a cautionary tale in private equity's push into health care.md": { + "size": 42865, + "tags": 4, + "links": 1 + }, + "00.03 News/On the Grid.md": { + "size": 28842, + "tags": 4, + "links": 1 + }, + "00.03 News/How Iran moves sanctioned oil around the world.md": { + "size": 12518, + "tags": 4, + "links": 1 + }, + "00.01 Admin/Calendars/2025-01-15.md": { "size": 1412, "tags": 0, "links": 4 @@ -13177,54 +13297,64 @@ }, "commitTypes": { "/": { - "Refactor": 14130, - "Create": 3195, - "Link": 17068, - "Expand": 2580 + "Refactor": 14142, + "Create": 3219, + "Link": 17115, + "Expand": 2590 } }, "dailyCommits": { "/": { - "0": 228, - "1": 66, + "0": 231, + "1": 67, "2": 33, "3": 13, "4": 47, "5": 18, "6": 77, - "7": 1262, - "8": 3621, - "9": 1416, - "10": 933, - "11": 754, - "12": 6910, - "13": 842, - "14": 777, - "15": 1051, + "7": 1270, + "8": 3645, + "9": 1425, + "10": 936, + "11": 755, + "12": 6911, + "13": 850, + "14": 778, + "15": 1052, "16": 819, "17": 981, "18": 11403, - "19": 1255, - "20": 1056, - "21": 1053, + "19": 1256, + "20": 1067, + "21": 1068, "22": 872, - "23": 1486 + "23": 1492 } }, "weeklyCommits": { "/": { - "Mon": 3722, - "Tue": 2237, - "Wed": 12246, - "Thu": 1722, - "Fri": 1952, + "Mon": 3748, + "Tue": 2264, + "Wed": 12253, + "Thu": 1724, + "Fri": 1962, "Sat": 0, - "Sun": 15094 + "Sun": 15115 } }, "recentCommits": { "/": { "Expanded": [ + " Storage and Syncing ", + " 2024-06-29 Fungal treatment ", + " 2025-01-12 ⚽️ PSG - ASSE ", + " 2025-01-12 ⚽️ PSG - ASSE ", + " Configuring UFW ", + " @Sally ", + " @Ambar ", + " 2024-06-29 Fungal treatment ", + " Selfhosting ", + " Household ", " 2024-06-29 Fungal treatment ", " 2025-01-01 ", " 2025-01-01 ", @@ -13265,19 +13395,33 @@ " Bookmarks - Travels & Sport ", " 2024-06-29 Fungal treatment ", " Salzburg ", - " Salzburg ", - " Salzburg ", - " Salzburg ", - " 2024-12-18 ⚽️ ASM - PSG ", - " 2024-12-18 ⚽️ ASM - PSG ", - " 2024-06-29 Fungal treatment ", - " Household ", - " Davinie ", - " 2024-12-15 ⚽️ PSG - OL ", - " 2024-12-15 ⚽️ PSG - OL ", - " Casa Monti " + " Salzburg " ], "Created": [ + " 2025-01-15 ", + " How Iran moves sanctioned oil around the world ", + " On the Grid ", + " Steward Health a cautionary tale in private equity's push into health care ", + " Sunset Boulevard in ruins Palisades fire’s massive scale comes into focus - Los Angeles Times ", + " Power Failure On Landscape and Abandonment — Switchyard ", + " 2025-01-14 ", + " 2025-01-13 ", + " Untitled ", + " 2025-01-12 ", + " 2025-01-11 ", + " 2025-01-10 ", + " 2025-01-09 ", + " 2025-01-08 ", + " 2025-01-07 ", + " His Very Best (1924-2024) ", + " College Football Insiders Reveal ‘Secret Economy of NIL’ ", + " Trump’s Campaign Chiefs Tell Their Inside Story ‘The Black Swan Election’ - POLITICO ", + " The After Dark Bandit ", + " 2025-01-06 ", + " 2025-01-05 ", + " 2025-01-04 ", + " Speed (1994) ", + " The Shining (1980) ", " 2025-01-03 ", " 2025-01-02 ", " 2025-01-01 ", @@ -13304,33 +13448,20 @@ " 2024-12-29 ", " Mission - Impossible - Dead Reckoning Part One (2023) ", " 2024-12-28 ", - " 2024-12-27 ", - " Monkey Man (2024) ", - " The Last Duel (2021) ", - " 2024-12-26 ", - " Kneecap (2024) ", - " Life Is a Miracle (2004) ", - " Dersu Uzala (1975) ", - " Mustang (2015) ", - " 2024-12-25 ", - " Killers of the Flower Moon (2023) ", - " 2024-12-24 ", - " 2024-12-23 ", - " 2024-12-22 ", - " 2024-12-21 ", - " Untitled ", - " 2024-12-20 ", - " 2024-12-19 ", - " Untitled ", - " 2024-12-18 ", - " City of God (2002) ", - " Hope and Despair at Assad's 'Human Slaughterhouse' ", - " 2024-12-17 ", - " The Bikeriders (2023) ", - " 2024-12-16 ", - " Untitled " + " 2024-12-27 " ], "Renamed": [ + " How Iran moves sanctioned oil around the world ", + " On the Grid ", + " Steward Health a cautionary tale in private equity's push into health care ", + " Sunset Boulevard in ruins Palisades fire’s massive scale comes into focus - Los Angeles Times ", + " Power Failure On Landscape and Abandonment — Switchyard ", + " 2025-01-12 ⚽️ PSG - ASSE (2-1) ", + " 2025-01-12 ⚽️ PSG - ASSE (2-1) ", + " His Very Best (1924-2024) ", + " College Football Insiders Reveal ‘Secret Economy of NIL’ ", + " Trump’s Campaign Chiefs Tell Their Inside Story ‘The Black Swan Election’ - POLITICO ", + " The After Dark Bandit ", " Halo ", " Laudat ", " Sa Botiga ", @@ -13370,20 +13501,21 @@ " Inside the Tragic Life and Controversial Execution of Marcellus Williams ", " ‘Teens and fentanyl’ ProPublica's Lizzie Presser weaves an emotional story about the impacts of the drug trade - The Sunday Long Read ", " The Strange Theft of a Priceless Churchill Portrait ", - " 2024-12-03 Vet check ", - " 2024-10-27 Decision to buy ", - " 2024-10-26 Decision to buy ", - " @Ambar ", - " My Name Is Red ", - " The ‘mad egghead’ who built a mouse utopia ", - " Rudy Giuliani's Four Yankees World Series Rings Remain In Legal Limbo ", - " The lost village Western oil companies enriched Kazakhstan's power brokers — and left a community in ruins - ICIJ ", - " La societé ouverte et ses ennemis ", - " 2024-11-26 ⚽️ Bayern - PSG (1-0) ", - " Is the $11 Billion Online Sportsbook Bubble About to Burst ", - " La societé ouverte et ses ennemis " + " 2024-12-03 Vet check " ], "Tagged": [ + " How Iran moves sanctioned oil around the world ", + " On the Grid ", + " Sunset Boulevard in ruins Palisades fire’s massive scale comes into focus - Los Angeles Times ", + " Steward Health a cautionary tale in private equity's push into health care ", + " Power Failure On Landscape and Abandonment — Switchyard ", + " College Football Insiders Reveal ‘Secret Economy of NIL’ ", + " His Very Best (1924-2024) ", + " College Football Insiders Reveal ‘Secret Economy of NIL’ ", + " The After Dark Bandit ", + " Trump’s Campaign Chiefs Tell Their Inside Story ‘The Black Swan Election’ - POLITICO ", + " Speed (1994) ", + " The Shining (1980) ", " Halo ", " Laudat ", " Sa Botiga ", @@ -13422,21 +13554,10 @@ " Mamiche ", " Mamiche ", " Dame ", - " Brisket ", - " elmira ", - " Butcher's Crossing ", - " Berlin Alexanderplatz ", - " Butcher's Crossing ", - " Butcher's Crossing ", - " ‘Teens and fentanyl’ ProPublica's Lizzie Presser weaves an emotional story about the impacts of the drug trade - The Sunday Long Read ", - " Inside the Tragic Life and Controversial Execution of Marcellus Williams ", - " The Strange Theft of a Priceless Churchill Portrait ", - " Unraveling the 50-Year Mystery of the Body in the Basement ", - " Art Cashin, New York Stock Exchange fixture for decades, dies at age 83 ", - " 2024-12-03 Vet check ", - " 2024-10-26 Decision to buy " + " Brisket " ], "Refactored": [ + " College Football Insiders Reveal ‘Secret Economy of NIL’ ", " 2025-01-02 ", " Mallorca ", " Bookmarks - Art ", @@ -13486,8 +13607,7 @@ " 2023-07-13 Health check ", " 2024-09-09 ", " 2024-09-06 ", - " 2024-09-04 ", - " Life mementos " + " 2024-09-04 " ], "Deleted": [ " ‘Can the Queen sack a PM’ how Boris Johnson prorogued parliament ", @@ -13543,6 +13663,41 @@ " 2022-06-17 🎶 Gorillaz - arenes de Nimes " ], "Linked": [ + " 2025-01-15 ", + " How Iran moves sanctioned oil around the world ", + " On the Grid ", + " Steward Health a cautionary tale in private equity's push into health care ", + " Sunset Boulevard in ruins Palisades fire’s massive scale comes into focus - Los Angeles Times ", + " 2025-01-12 ", + " Power Failure On Landscape and Abandonment — Switchyard ", + " 2025-01-14 ", + " 2025-01-10 ", + " 2025-01-13 ", + " 2025-01-13 ", + " 2025-01-12 ⚽️ PSG - ASSE ", + " 2025-01-12 ", + " 2025-01-12 ", + " 2025-01-11 ", + " 2025-01-10 ", + " 2025-01-10 ", + " 2025-01-09 ", + " 2025-01-08 ", + " 2025-01-07 ", + " His Very Best (1924-2024) ", + " College Football Insiders Reveal ‘Secret Economy of NIL’ ", + " The After Dark Bandit ", + " Trump’s Campaign Chiefs Tell Their Inside Story ‘The Black Swan Election’ - POLITICO ", + " 2025-01-06 ", + " The American Oil Industry’s Playbook, Illustrated How Drillers Offload Costly Cleanup Onto the Public ", + " 2025-01-05 ", + " The Ghosts in the Machine, by Liz Pelly ", + " 2025-01-05 ", + " 2025-01-04 ", + " 2025-01-04 ", + " 2025-01-04 ", + " Speed (1994) ", + " 2025-01-03 ", + " The Shining (1980) ", " 2025-01-03 ", " 2025-01-02 ", " 2025-01-01 ", @@ -13558,42 +13713,7 @@ " Palazzo Talia ", " Vocabolo Moscatelli ", " Monastero Arx Vivendi ", - " 2024-12-31 ", - " 2024-12-30 ", - " 2024-12-30 ", - " 2024-11-17 ", - " 2024-11-30 ", - " 2024-12-30 ", - " Underground (1995) ", - " Honey-Ginger Butternut Squash Soup ", - " 2024-12-27 ", - " 2024-12-30 ", - " Velouté de carottes à l’anis ", - " The American Oil Industry’s Playbook, Illustrated How Drillers Offload Costly Cleanup Onto the Public ", - " The Ghosts in the Machine, by Liz Pelly ", - " 2024-12-30 ", - " 2024-12-30 ", - " La Chimera (2023) ", - " Klosters ", - " 2024-12-29 ", - " 2024-12-29 ", - " 2024-12-29 ", - " 2024-12-28 ", - " Mission - Impossible - Dead Reckoning Part One (2023) ", - " 2024-12-28 ", - " For Jeff Bezos and his businesses, Washington has become more important ", - " ‘Anticipatory obedience’ newspapers’ refusal to endorse shines light on billionaire owners’ motives ", - " The ‘mad egghead’ who built a mouse utopia ", - " How Anthony Flores and Anna Moore Scammed Dr. Mark Sawusch ", - " 2024-12-27 ", - " Rudy Giuliani's Four Yankees World Series Rings Remain In Legal Limbo ", - " How France uncovered the mystery of the forbidden photos of Nazi-occupied Paris ", - " Art Cashin, New York Stock Exchange fixture for decades, dies at age 83 ", - " The Alchemists ", - " 2024-12-26 ", - " Monkey Man (2024) ", - " 2024-12-26 ", - " The Last Duel (2021) " + " 2024-12-31 " ], "Removed Tags from": [ " La Fantaisie ", diff --git a/.obsidian/plugins/obsidian-icon-folder/main.js b/.obsidian/plugins/obsidian-icon-folder/main.js index c78a6207..271b2ffc 100644 --- a/.obsidian/plugins/obsidian-icon-folder/main.js +++ b/.obsidian/plugins/obsidian-icon-folder/main.js @@ -6834,7 +6834,7 @@ class IconizePlugin extends obsidian.Plugin { return; } for (const openedFile of getAllOpenedFiles(this)) { - if (openedFile.path !== file.path) { + if (!file || !openedFile || openedFile.path !== file.path) { continue; } const leaf = openedFile.leaf.view; diff --git a/.obsidian/plugins/obsidian-icon-folder/manifest.json b/.obsidian/plugins/obsidian-icon-folder/manifest.json index ad2ded6f..6e916c33 100644 --- a/.obsidian/plugins/obsidian-icon-folder/manifest.json +++ b/.obsidian/plugins/obsidian-icon-folder/manifest.json @@ -1,7 +1,7 @@ { "id": "obsidian-icon-folder", "name": "Iconize", - "version": "2.14.6", + "version": "2.14.7", "minAppVersion": "0.9.12", "description": "Add icons to anything you desire in Obsidian, including files, folders, and text.", "author": "Florian Woelki", diff --git a/.obsidian/plugins/obsidian-icon-folder/styles.css b/.obsidian/plugins/obsidian-icon-folder/styles.css index 945ee331..a74fdd44 100644 --- a/.obsidian/plugins/obsidian-icon-folder/styles.css +++ b/.obsidian/plugins/obsidian-icon-folder/styles.css @@ -1,5 +1,6 @@ .iconize-inline-title-wrapper { width: var(--line-width); + max-width: var(--max-width); margin-inline: var(--content-margin); } diff --git a/.obsidian/plugins/obsidian-tracker/main.js b/.obsidian/plugins/obsidian-tracker/main.js index 23159504..b96e1e5d 100644 --- a/.obsidian/plugins/obsidian-tracker/main.js +++ b/.obsidian/plugins/obsidian-tracker/main.js @@ -1,2 +1,4 @@ -"use strict";var t=require("obsidian");function e(t,e,n,r){return new(n||(n=Promise))((function(i,a){function l(t){try{s(r.next(t))}catch(t){a(t)}}function o(t){try{s(r.throw(t))}catch(t){a(t)}}function s(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(l,o)}s((r=r.apply(t,e||[])).next())}))}function n(t,e){return null==t||null==e?NaN:te?1:t>=e?0:NaN}function r(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function i(t){let e,i,l;function o(t,n,r=0,a=t.length){if(r>>1;i(t[e],n)<0?r=e+1:a=e}while(rn(t(e),r),l=(e,n)=>t(e)-n):(e=t===n||t===r?t:a,i=t,l=t),{left:o,center:function(t,e,n=0,r=t.length){const i=o(t,e,n,r-1);return i>n&&l(t[i-1],e)>-l(t[i],e)?i-1:i},right:function(t,n,r=0,a=t.length){if(r>>1;i(t[e],n)<=0?r=e+1:a=e}while(r=t))-(null==e||!(e>=e))||(te?1:0)}const c=Math.sqrt(50),h=Math.sqrt(10),d=Math.sqrt(2);function g(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),l=a>=c?10:a>=h?5:a>=d?2:1;let o,s,u;return i<0?(u=Math.pow(10,-i)/l,o=Math.round(t*u),s=Math.round(e*u),o/ue&&--s,u=-u):(u=Math.pow(10,i)*l,o=Math.round(t/u),s=Math.round(e/u),o*ue&&--s),s=e)&&(n=e);return n}function v(t,e){let n;for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);return n}function x(t,e,r=0,i=1/0,a){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(t.length-1,i)),!(r<=e&&e<=i))return t;for(a=void 0===a?f:function(t=n){if(t===n)return f;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}(a);i>r;){if(i-r>600){const n=i-r+1,l=e-r+1,o=Math.log(n),s=.5*Math.exp(2*o/3),u=.5*Math.sqrt(o*s*(n-s)/n)*(l-n/2<0?-1:1);x(t,e,Math.max(r,Math.floor(e-l*s/n+u)),Math.min(i,Math.floor(e+(n-l)*s/n+u)),a)}const n=t[e];let l=r,o=i;for(A(t,r,e),a(t[i],n)>0&&A(t,r,i);l0;)--o}0===a(t[r],n)?A(t,r,o):(++o,A(t,o,i)),o<=e&&(r=o+1),e<=o&&(i=o-1)}return t}function A(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function w(t,e){return function(t,e,n){if((r=(t=Float64Array.from(function*(t,e){for(let e of t)null!=e&&(e=+e)>=e&&(yield e)}(t))).length)&&!isNaN(e=+e)){if(e<=0||r<2)return v(t);if(e>=1)return m(t);var r,i=(r-1)*e,a=Math.floor(i),l=m(x(t,a).subarray(0,a+1));return l+(v(t.subarray(a+1))-l)*(i-a)}}(t,.5)}function b(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r+t(e)}function N(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function L(){return!this.__axis}function I(t,e){var n=[],r=null,i=null,a=6,l=6,o=3,s="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=t===C||t===_?-1:1,f=t===_||t===M?"x":"y",c=t===C||t===T?F:S;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,g=null==i?e.tickFormat?e.tickFormat.apply(e,n):k:i,p=Math.max(a,0)+o,y=e.range(),m=+y[0]+s,v=+y[y.length-1]+s,x=(e.bandwidth?N:B)(e.copy(),s),A=h.selection?h.selection():h,w=A.selectAll(".domain").data([null]),b=A.selectAll(".tick").data(d,e).order(),D=b.exit(),F=b.enter().append("g").attr("class","tick"),S=b.select("line"),I=b.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(F),S=S.merge(F.append("line").attr("stroke","currentColor").attr(f+"2",u*a)),I=I.merge(F.append("text").attr("fill","currentColor").attr(f,u*p).attr("dy",t===C?"0em":t===T?"0.71em":"0.32em")),h!==A&&(w=w.transition(h),b=b.transition(h),S=S.transition(h),I=I.transition(h),D=D.transition(h).attr("opacity",E).attr("transform",(function(t){return isFinite(t=x(t))?c(t+s):this.getAttribute("transform")})),F.attr("opacity",E).attr("transform",(function(t){var e=this.parentNode.__axis;return c((e&&isFinite(e=e(t))?e:x(t))+s)}))),D.remove(),w.attr("d",t===_||t===M?l?"M"+u*l+","+m+"H"+s+"V"+v+"H"+u*l:"M"+s+","+m+"V"+v:l?"M"+m+","+u*l+"V"+s+"H"+v+"V"+u*l:"M"+m+","+s+"H"+v),b.attr("opacity",1).attr("transform",(function(t){return c(x(t)+s)})),S.attr(f+"2",u*a),I.attr(f,u*p).text(g),A.filter(L).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===M?"start":t===_?"end":"middle"),A.each((function(){this.__axis=x}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=l=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(l=+t,h):l},h.tickPadding=function(t){return arguments.length?(o=+t,h):o},h.offset=function(t){return arguments.length?(s=+t,h):s},h}function V(t){return I(T,t)}function O(t){return I(_,t)}var P={value:()=>{}};function $(){for(var t,e=0,n=arguments.length,r={};e=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),l=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++l0)for(var n,r,i=new Array(n),a=0;a=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),H.hasOwnProperty(e)?{space:H[e],local:t}:t}function W(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===U&&e.documentElement.namespaceURI===U?e.createElement(t):e.createElementNS(n,t)}}function j(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function q(t){var e=X(t);return(e.local?j:W)(e)}function G(){}function Q(t){return null==t?G:function(){return this.querySelector(t)}}function Z(){return[]}function K(t){return null==t?Z:function(){return this.querySelectorAll(t)}}function J(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function tt(t){return function(){return this.matches(t)}}function et(t){return function(e){return e.matches(t)}}var nt=Array.prototype.find;function rt(){return this.firstElementChild}var it=Array.prototype.filter;function at(){return Array.from(this.children)}function lt(t){return new Array(t.length)}function ot(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function st(t,e,n,r,i,a){for(var l,o=0,s=e.length,u=a.length;oe?1:t>=e?0:NaN}function dt(t){return function(){this.removeAttribute(t)}}function gt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pt(t,e){return function(){this.setAttribute(t,e)}}function yt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function vt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function xt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function At(t){return function(){this.style.removeProperty(t)}}function wt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function bt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Dt(t,e){return t.style.getPropertyValue(e)||xt(t).getComputedStyle(t,null).getPropertyValue(e)}function kt(t){return function(){delete this[t]}}function Ct(t,e){return function(){this[t]=e}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Tt(t){return t.trim().split(/^|\s+/)}function _t(t){return t.classList||new Et(t)}function Et(t){this._node=t,this._names=Tt(t.getAttribute("class")||"")}function Ft(t,e){for(var n=_t(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Kt=[null];function Jt(t,e){this._groups=t,this._parents=e}function te(){return new Jt([[document.documentElement]],Kt)}function ee(t){return"string"==typeof t?new Jt([[document.querySelector(t)]],[document.documentElement]):new Jt([[t]],Kt)}function ne(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function re(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ie(){}Jt.prototype=te.prototype={constructor:Jt,select:function(t){"function"!=typeof t&&(t=Q(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=A&&(A=x+1);!(v=y[A])&&++A=0;)(r=i[a])&&(l&&4^r.compareDocumentPosition(l)&&l.parentNode.insertBefore(r,l),l=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ht);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?At:"function"==typeof e?bt:wt)(t,e,null==n?"":n)):Dt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?kt:"function"==typeof e?Mt:Ct)(t,e)):this.node()[t]},classed:function(t,e){var n=Tt(t+"");if(arguments.length<2){for(var r=_t(this.node()),i=-1,a=n.length;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),l=a.length;if(!(arguments.length<2)){for(o=e?qt:jt,r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?be(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?be(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ce.exec(t))?new Ce(e[1],e[2],e[3],1):(e=he.exec(t))?new Ce(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=de.exec(t))?be(e[1],e[2],e[3],e[4]):(e=ge.exec(t))?be(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=pe.exec(t))?Se(e[1],e[2]/100,e[3]/100,1):(e=ye.exec(t))?Se(e[1],e[2]/100,e[3]/100,e[4]):me.hasOwnProperty(t)?we(me[t]):"transparent"===t?new Ce(NaN,NaN,NaN,0):null}function we(t){return new Ce(t>>16&255,t>>8&255,255&t,1)}function be(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ce(t,e,n,r)}function De(t){return t instanceof ie||(t=Ae(t)),t?new Ce((t=t.rgb()).r,t.g,t.b,t.opacity):new Ce}function ke(t,e,n,r){return 1===arguments.length?De(t):new Ce(t,e,n,null==r?1:r)}function Ce(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Me(){return`#${Fe(this.r)}${Fe(this.g)}${Fe(this.b)}`}function Te(){const t=_e(this.opacity);return`${1===t?"rgb(":"rgba("}${Ee(this.r)}, ${Ee(this.g)}, ${Ee(this.b)}${1===t?")":`, ${t})`}`}function _e(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ee(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Fe(t){return((t=Ee(t))<16?"0":"")+t.toString(16)}function Se(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ne(t,e,n,r)}function Be(t){if(t instanceof Ne)return new Ne(t.h,t.s,t.l,t.opacity);if(t instanceof ie||(t=Ae(t)),!t)return new Ne;if(t instanceof Ne)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),l=NaN,o=a-i,s=(a+i)/2;return o?(l=e===a?(n-r)/o+6*(n0&&s<1?0:l,new Ne(l,o,s,t.opacity)}function Ne(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Le(t){return(t=(t||0)%360)<0?t+360:t}function Ie(t){return Math.max(0,Math.min(1,t||0))}function Ve(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}ne(ie,Ae,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ve,formatHex:ve,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Be(this).formatHsl()},formatRgb:xe,toString:xe}),ne(Ce,ke,re(ie,{brighter(t){return t=null==t?le:Math.pow(le,t),new Ce(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?ae:Math.pow(ae,t),new Ce(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ce(Ee(this.r),Ee(this.g),Ee(this.b),_e(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Me,formatHex:Me,formatHex8:function(){return`#${Fe(this.r)}${Fe(this.g)}${Fe(this.b)}${Fe(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Te,toString:Te})),ne(Ne,(function(t,e,n,r){return 1===arguments.length?Be(t):new Ne(t,e,n,null==r?1:r)}),re(ie,{brighter(t){return t=null==t?le:Math.pow(le,t),new Ne(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?ae:Math.pow(ae,t),new Ne(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ce(Ve(t>=240?t-240:t+120,i,r),Ve(t,i,r),Ve(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Ne(Le(this.h),Ie(this.s),Ie(this.l),_e(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=_e(this.opacity);return`${1===t?"hsl(":"hsla("}${Le(this.h)}, ${100*Ie(this.s)}%, ${100*Ie(this.l)}%${1===t?")":`, ${t})`}`}}));const Oe=Math.PI/180,Pe=180/Math.PI,$e=.96422,Ye=1,Re=.82521,ze=4/29,Ue=6/29,He=3*Ue*Ue,Xe=Ue*Ue*Ue;function We(t){if(t instanceof qe)return new qe(t.l,t.a,t.b,t.opacity);if(t instanceof Je)return tn(t);t instanceof Ce||(t=De(t));var e,n,r=Ke(t.r),i=Ke(t.g),a=Ke(t.b),l=Ge((.2225045*r+.7168786*i+.0606169*a)/Ye);return r===i&&i===a?e=n=l:(e=Ge((.4360747*r+.3850649*i+.1430804*a)/$e),n=Ge((.0139322*r+.0971045*i+.7141733*a)/Re)),new qe(116*l-16,500*(e-l),200*(l-n),t.opacity)}function je(t,e,n,r){return 1===arguments.length?We(t):new qe(t,e,n,null==r?1:r)}function qe(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ge(t){return t>Xe?Math.pow(t,1/3):t/He+ze}function Qe(t){return t>Ue?t*t*t:He*(t-ze)}function Ze(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ke(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Je(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function tn(t){if(isNaN(t.h))return new qe(t.l,0,0,t.opacity);var e=t.h*Oe;return new qe(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}ne(qe,je,re(ie,{brighter(t){return new qe(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new qe(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ce(Ze(3.1338561*(e=$e*Qe(e))-1.6168667*(t=Ye*Qe(t))-.4906146*(n=Re*Qe(n))),Ze(-.9787684*e+1.9161415*t+.033454*n),Ze(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),ne(Je,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof Je)return new Je(t.h,t.c,t.l,t.opacity);if(t instanceof qe||(t=We(t)),0===t.a&&0===t.b)return new Je(NaN,0()=>t;function nn(t){return 1==(t=+t)?rn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):en(isNaN(e)?n:e)}}function rn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):en(isNaN(t)?e:t)}var an=function t(e){var n=nn(e);function r(t,e){var r=n((t=ke(t)).r,(e=ke(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),l=rn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=l(e),t+""}}return r.gamma=t,r}(1);var ln,on=(ln=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],l=r>0?t[r-1]:2*i-a,o=ra&&(i=e.slice(a,i),o[l]?o[l]+=i:o[++l]=i),(n=n[0])===(r=r[0])?o[l]?o[l]+=r:o[++l]=r:(o[++l]=null,s.push({i:l,x:cn(n,r)})),a=gn.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:cn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,l.rotate,o,s),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:cn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,l.skewX,o,s),function(t,e,n,r,a,l){if(t!==n||e!==r){var o=a.push(i(a)+"scale(",null,",",null,")");l.push({i:o-4,x:cn(t,n)},{i:o-2,x:cn(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,l.scaleX,l.scaleY,o,s),a=l=null,function(t){for(var e,n=-1,r=s.length;++n=0&&e._call.call(void 0,t),e=e._next;--_n}()}finally{_n=0,function(){var t,e,n=Mn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Mn=e);Tn=t,Un(r)}(),Nn=0}}function zn(){var t=In.now(),e=t-Bn;e>Sn&&(Ln-=e,Bn=t)}function Un(t){_n||(En&&(En=clearTimeout(En)),t-Nn>24?(t<1/0&&(En=setTimeout(Rn,t-In.now()-Ln)),Fn&&(Fn=clearInterval(Fn))):(Fn||(Bn=In.now(),Fn=setInterval(zn,Sn)),_n=1,Vn(Rn)))}function Hn(t,e,n){var r=new $n;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}$n.prototype=Yn.prototype={constructor:$n,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?On():+n)+(null==e?0:+e),this._next||Tn===this||(Tn?Tn._next=this:Mn=this,Tn=this),this._call=t,this._time=n,Un()},stop:function(){this._call&&(this._call=null,this._time=1/0,Un())}};var Xn=$("start","end","cancel","interrupt"),Wn=[],jn=0,qn=1,Gn=2,Qn=3,Zn=4,Kn=5,Jn=6;function tr(t,e,n,r,i,a){var l=t.__transition;if(l){if(n in l)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=qn,n.timer.restart(l,n.delay,n.time),n.delay<=t&&l(t-n.delay)}function l(a){var u,f,c,h;if(n.state!==qn)return s();for(u in i)if((h=i[u]).name===n.name){if(h.state===Qn)return Hn(l);h.state===Zn?(h.state=Jn,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[u]):+ujn)throw new Error("too late; already scheduled");return n}function nr(t,e){var n=rr(t,e);if(n.state>Qn)throw new Error("too late; already running");return n}function rr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ir(t,e){var n,r;return function(){var i=nr(this,t),a=i.tween;if(a!==n)for(var l=0,o=(r=n=a).length;l=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?er:nr;return function(){var l=a(this,t),o=l.on;o!==r&&(i=(r=o).copy()).on(e,n),l.on=i}}(n,t,e))},attr:function(t,e){var n=X(t),r="transform"===n?kn:or;return this.attrTween(t,"function"==typeof e?(n.local?dr:hr)(n,r,lr(this,"attr."+t,e)):null==e?(n.local?ur:sr)(n):(n.local?cr:fr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=X(t);return this.tween(n,(r.local?gr:pr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Dn:or;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Dt(this,t),l=(this.style.removeProperty(t),Dt(this,t));return a===l?null:a===n&&l===r?i:i=e(n=a,r=l)}}(t,r)).on("end.style."+t,wr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var l=Dt(this,t),o=n(this),s=o+"";return null==o&&(this.style.removeProperty(t),s=o=Dt(this,t)),l===s?null:l===r&&s===i?a:(i=s,a=e(r=l,o))}}(t,r,lr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,l="style."+e,o="end."+l;return function(){var s=nr(this,t),u=s.on,f=null==s.value[l]?a||(a=wr(e)):void 0;u===n&&i===f||(r=(n=u).copy()).on(o,i=f),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var l=Dt(this,t);return l===a?null:l===r?i:i=e(r=l,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(lr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=rr(this.node(),n).tween,a=0,l=i.length;aGn&&n.state=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Br;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eFr)if(Math.abs(f*o-s*u)>Fr&&i){let h=n-a,d=r-l,g=o*o+s*s,p=h*h+d*d,y=Math.sqrt(g),m=Math.sqrt(c),v=i*Math.tan((_r-Math.acos((g+c-p)/(2*y*m)))/2),x=v/m,A=v/y;Math.abs(x-1)>Fr&&this._append`L${t+x*u},${e+x*f}`,this._append`A${i},${i},0,0,${+(f*h>u*d)},${this._x1=t+A*o},${this._y1=e+A*s}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(r),o=n*Math.sin(r),s=t+l,u=e+o,f=1^a,c=a?r-i:i-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>Fr||Math.abs(this._y1-u)>Fr)&&this._append`L${s},${u}`,n&&(c<0&&(c=c%Er+Er),c>Sr?this._append`A${n},${n},0,1,${f},${t-l},${e-o}A${n},${n},0,1,${f},${this._x1=s},${this._y1=u}`:c>Fr&&this._append`A${n},${n},0,${+(c>=_r)},${f},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Lr(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Ir(t){return(t=Lr(Math.abs(t)))?t[1]:NaN}var Vr,Or=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pr(t){if(!(e=Or.exec(t)))throw new Error("invalid format: "+t);var e;return new $r({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function $r(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Yr(t,e){var n=Lr(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Pr.prototype=$r.prototype,$r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Rr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Yr(100*t,e),r:Yr,s:function(t,e){var n=Lr(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Vr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,l=r.length;return a===l?r:a>l?r+new Array(a-l+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Lr(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function zr(t){return t}var Ur,Hr,Xr,Wr=Array.prototype.map,jr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function qr(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?zr:(e=Wr.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],l=0,o=e[0],s=0;i>0&&o>0&&(s+o+1>r&&(o=Math.max(1,r-s)),a.push(t.substring(i-=o,i+o)),!((s+=o+1)>r));)o=e[l=(l+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?zr:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Wr.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function c(t){var e=(t=Pr(t)).fill,n=t.align,c=t.sign,h=t.symbol,d=t.zero,g=t.width,p=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(p=!0,v="g"):Rr[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",A="$"===h?a:/[%p]/.test(v)?s:"",w=Rr[v],b=/[defgprs%]/.test(v);function D(t){var i,a,s,h=x,D=A;if("c"===v)D=w(t)+D,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:w(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==c&&(k=!1),h=(k?"("===c?c:u:"-"===c||"("===c?"":c)+h,D=("s"===v?jr[8+Vr/3]:"")+D+(k&&"("===c?")":""),b)for(i=-1,a=t.length;++i(s=t.charCodeAt(i))||s>57){D=(46===s?l+t.slice(i+1):t.slice(i))+D,t=t.slice(0,i);break}}p&&!d&&(t=r(t,1/0));var C=h.length+t.length+D.length,M=C>1)+h+t+D+M.slice(C);break;default:t=M+h+t+D}return o(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),D.toString=function(){return t+""},D}return{format:c,formatPrefix:function(t,e){var n=c(((t=Pr(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ir(e)/3))),i=Math.pow(10,-r),a=jr[8+r/3];return function(t){return n(i*t)+a}}}}function Gr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}Ur=qr({thousands:",",grouping:[3],currency:["$",""]}),Hr=Ur.format,Xr=Ur.formatPrefix;const Qr=Symbol("implicit");function Zr(){var t=new o,e=[],n=[],r=Qr;function i(i){let a=t.get(i);if(void 0===a){if(r!==Qr)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new o;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Zr(e,n).unknown(r)},Gr.apply(i,arguments),i}function Kr(t){return+t}var Jr=[0,1];function ti(t){return t}function ei(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function ni(t,e,n){var r=t[0],i=t[1],a=e[0],l=e[1];return ie&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),r=s>2?ri:ni,i=a=null,c}function c(e){return null==e||isNaN(e=+e)?n:(i||(i=r(l.map(t),o,s)))(t(u(e)))}return c.invert=function(n){return u(e((a||(a=r(o,l.map(t),cn)))(n)))},c.domain=function(t){return arguments.length?(l=Array.from(t,Kr),f()):l.slice()},c.range=function(t){return arguments.length?(o=Array.from(t),f()):o.slice()},c.rangeRound=function(t){return o=Array.from(t),s=mn,f()},c.clamp=function(t){return arguments.length?(u=!!t||ti,f()):u!==ti},c.interpolate=function(t){return arguments.length?(s=t,f()):s},c.unknown=function(t){return arguments.length?(n=t,c):n},function(n,r){return t=n,e=r,f()}}function li(){return ai()(ti,ti)}function oi(t,e,n,r){var i,a=y(t,e,n);switch((r=Pr(null==r?",f":r)).type){case"s":var l=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Ir(e)/3)))-Ir(Math.abs(t)))}(a,l))||(r.precision=i),Xr(r,l);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Ir(e)-Ir(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-Ir(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Hr(r)}function si(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const r=e=i))return[];const o=a-i+1,s=new Array(o);if(r)if(l<0)for(let t=0;t0;){if((i=p(s,u,n))===r)return a[l]=s,a[o]=u,e(a);if(i>0)s=Math.floor(s/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;s=Math.ceil(s*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function ui(){var t=li();return t.copy=function(){return ii(t,ui())},Gr.apply(t,arguments),si(t)}const fi=new Date,ci=new Date;function hi(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,a)=>{const l=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n0))return l;let o;do{l.push(o=new Date(+n)),e(n,a),t(n)}while(ohi((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(fi.setTime(+e),ci.setTime(+r),t(fi),t(ci),Math.floor(n(fi,ci))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const di=hi((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));di.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?hi((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):di:null),di.range;const gi=1e3,pi=6e4,yi=36e5,mi=864e5,vi=6048e5,xi=2592e6,Ai=31536e6,wi=hi((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*gi)}),((t,e)=>(e-t)/gi),(t=>t.getUTCSeconds()));wi.range;const bi=hi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*gi)}),((t,e)=>{t.setTime(+t+e*pi)}),((t,e)=>(e-t)/pi),(t=>t.getMinutes()));bi.range;const Di=hi((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*pi)}),((t,e)=>(e-t)/pi),(t=>t.getUTCMinutes()));Di.range;const ki=hi((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*gi-t.getMinutes()*pi)}),((t,e)=>{t.setTime(+t+e*yi)}),((t,e)=>(e-t)/yi),(t=>t.getHours()));ki.range;const Ci=hi((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*yi)}),((t,e)=>(e-t)/yi),(t=>t.getUTCHours()));Ci.range;const Mi=hi((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pi)/mi),(t=>t.getDate()-1));Mi.range;const Ti=hi((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/mi),(t=>t.getUTCDate()-1));Ti.range;const _i=hi((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/mi),(t=>Math.floor(t/mi)));function Ei(t){return hi((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pi)/vi))}_i.range;const Fi=Ei(0),Si=Ei(1),Bi=Ei(2),Ni=Ei(3),Li=Ei(4),Ii=Ei(5),Vi=Ei(6);function Oi(t){return hi((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/vi))}Fi.range,Si.range,Bi.range,Ni.range,Li.range,Ii.range,Vi.range;const Pi=Oi(0),$i=Oi(1),Yi=Oi(2),Ri=Oi(3),zi=Oi(4),Ui=Oi(5),Hi=Oi(6);Pi.range,$i.range,Yi.range,Ri.range,zi.range,Ui.range,Hi.range;const Xi=hi((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));Xi.range;const Wi=hi((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Wi.range;const ji=hi((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));ji.every=t=>isFinite(t=Math.floor(t))&&t>0?hi((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,ji.range;const qi=hi((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));qi.every=t=>isFinite(t=Math.floor(t))&&t>0?hi((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,qi.range;const[Gi,Qi]=function(t,e,n,r,a,l){const o=[[wi,1,gi],[wi,5,5e3],[wi,15,15e3],[wi,30,3e4],[l,1,pi],[l,5,3e5],[l,15,9e5],[l,30,18e5],[a,1,yi],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,mi],[r,2,1728e5],[n,1,vi],[e,1,xi],[e,3,7776e6],[t,1,Ai]];function s(e,n,r){const a=Math.abs(n-e)/r,l=i((([,,t])=>t)).right(o,a);if(l===o.length)return t.every(y(e/Ai,n/Ai,r));if(0===l)return di.every(Math.max(y(e,n,r),1));const[s,u]=o[a/o[l-1][2][t.toLowerCase(),e])))}function fa(t,e,n){var r=ra.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ca(t,e,n){var r=ra.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function ha(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function da(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function ga(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function pa(t,e,n){var r=ra.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ya(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ma(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function va(t,e,n){var r=ra.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function xa(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Aa(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function wa(t,e,n){var r=ra.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ba(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Da(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function ka(t,e,n){var r=ra.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ca(t,e,n){var r=ra.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ma(t,e,n){var r=ra.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ta(t,e,n){var r=ia.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function _a(t,e,n){var r=ra.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Ea(t,e,n){var r=ra.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Fa(t,e){return la(t.getDate(),e,2)}function Sa(t,e){return la(t.getHours(),e,2)}function Ba(t,e){return la(t.getHours()%12||12,e,2)}function Na(t,e){return la(1+Mi.count(ji(t),t),e,3)}function La(t,e){return la(t.getMilliseconds(),e,3)}function Ia(t,e){return La(t,e)+"000"}function Va(t,e){return la(t.getMonth()+1,e,2)}function Oa(t,e){return la(t.getMinutes(),e,2)}function Pa(t,e){return la(t.getSeconds(),e,2)}function $a(t){var e=t.getDay();return 0===e?7:e}function Ya(t,e){return la(Fi.count(ji(t)-1,t),e,2)}function Ra(t){var e=t.getDay();return e>=4||0===e?Li(t):Li.ceil(t)}function za(t,e){return t=Ra(t),la(Li.count(ji(t),t)+(4===ji(t).getDay()),e,2)}function Ua(t){return t.getDay()}function Ha(t,e){return la(Si.count(ji(t)-1,t),e,2)}function Xa(t,e){return la(t.getFullYear()%100,e,2)}function Wa(t,e){return la((t=Ra(t)).getFullYear()%100,e,2)}function ja(t,e){return la(t.getFullYear()%1e4,e,4)}function qa(t,e){var n=t.getDay();return la((t=n>=4||0===n?Li(t):Li.ceil(t)).getFullYear()%1e4,e,4)}function Ga(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+la(e/60|0,"0",2)+la(e%60,"0",2)}function Qa(t,e){return la(t.getUTCDate(),e,2)}function Za(t,e){return la(t.getUTCHours(),e,2)}function Ka(t,e){return la(t.getUTCHours()%12||12,e,2)}function Ja(t,e){return la(1+Ti.count(qi(t),t),e,3)}function tl(t,e){return la(t.getUTCMilliseconds(),e,3)}function el(t,e){return tl(t,e)+"000"}function nl(t,e){return la(t.getUTCMonth()+1,e,2)}function rl(t,e){return la(t.getUTCMinutes(),e,2)}function il(t,e){return la(t.getUTCSeconds(),e,2)}function al(t){var e=t.getUTCDay();return 0===e?7:e}function ll(t,e){return la(Pi.count(qi(t)-1,t),e,2)}function ol(t){var e=t.getUTCDay();return e>=4||0===e?zi(t):zi.ceil(t)}function sl(t,e){return t=ol(t),la(zi.count(qi(t),t)+(4===qi(t).getUTCDay()),e,2)}function ul(t){return t.getUTCDay()}function fl(t,e){return la($i.count(qi(t)-1,t),e,2)}function cl(t,e){return la(t.getUTCFullYear()%100,e,2)}function hl(t,e){return la((t=ol(t)).getUTCFullYear()%100,e,2)}function dl(t,e){return la(t.getUTCFullYear()%1e4,e,4)}function gl(t,e){var n=t.getUTCDay();return la((t=n>=4||0===n?zi(t):zi.ceil(t)).getUTCFullYear()%1e4,e,4)}function pl(){return"+0000"}function yl(){return"%"}function ml(t){return+t}function vl(t){return Math.floor(+t/1e3)}function xl(t){return new Date(t)}function Al(t){return t instanceof Date?+t:+new Date(+t)}function wl(t,e,n,r,i,a,l,o,s,u){var f=li(),c=f.invert,h=f.domain,d=u(".%L"),g=u(":%S"),p=u("%I:%M"),y=u("%I %p"),m=u("%a %d"),v=u("%b %d"),x=u("%B"),A=u("%Y");function w(t){return(s(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ml,s:vl,S:Pa,u:$a,U:Ya,V:za,w:Ua,W:Ha,x:null,X:null,y:Xa,Y:ja,Z:Ga,"%":yl},A={a:function(t){return l[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return o[t.getUTCMonth()]},c:null,d:Qa,e:Qa,f:el,g:hl,G:gl,H:Za,I:Ka,j:Ja,L:tl,m:nl,M:rl,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ml,s:vl,S:il,u:al,U:ll,V:sl,w:ul,W:fl,x:null,X:null,y:cl,Y:dl,Z:pl,"%":yl},w={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return k(t,e,n,r)},d:Aa,e:Aa,f:Ma,g:ya,G:pa,H:ba,I:ba,j:wa,L:Ca,m:xa,M:Da,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=f.get(r[0].toLowerCase()),n+r[0].length):-1},q:va,Q:_a,s:Ea,S:ka,u:ca,U:ha,V:da,w:fa,W:ga,x:function(t,e,r){return k(t,n,e,r)},X:function(t,e,n){return k(t,r,e,n)},y:ya,Y:pa,Z:ma,"%":Ta};function b(t,e){return function(n){var r,i,a,l=[],o=-1,s=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++o53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Ki(Ji(a.y,0,1))).getUTCDay(),r=i>4||0===i?$i.ceil(r):$i(r),r=Ti.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Zi(Ji(a.y,0,1))).getDay(),r=i>4||0===i?Si.ceil(r):Si(r),r=Mi.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Ki(Ji(a.y,0,1)).getUTCDay():Zi(Ji(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Ki(a)):Zi(a)}}function k(t,e,n,r){for(var i,a,l=0,o=e.length,s=n.length;l=s)return-1;if(37===(i=e.charCodeAt(l++))){if(i=e.charAt(l++),!(a=w[i in na?e.charAt(l++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=b(n,x),x.X=b(r,x),x.c=b(e,x),A.x=b(n,A),A.X=b(r,A),A.c=b(e,A),{format:function(t){var e=b(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=D(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=b(t+="",A);return e.toString=function(){return t},e},utcParse:function(t){var e=D(t+="",!0);return e.toString=function(){return t},e}}}(t),ea=ta.format,ta.parse,ta.utcFormat,ta.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Dl=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map((function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r{on(t[t.length-1])})(Dl);const Cl=Math.abs,Ml=Math.atan2,Tl=Math.cos,_l=Math.max,El=Math.min,Fl=Math.sin,Sl=Math.sqrt,Bl=1e-12,Nl=Math.PI,Ll=Nl/2,Il=2*Nl;function Vl(t){return t>=1?Ll:t<=-1?-Ll:Math.asin(t)}function Ol(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new Nr(e)}function Pl(t){return t.innerRadius}function $l(t){return t.outerRadius}function Yl(t){return t.startAngle}function Rl(t){return t.endAngle}function zl(t){return t&&t.padAngle}function Ul(t,e,n,r,i,a,l){var o=t-n,s=e-r,u=(l?a:-a)/Sl(o*o+s*s),f=u*s,c=-u*o,h=t+f,d=e+c,g=n+f,p=r+c,y=(h+g)/2,m=(d+p)/2,v=g-h,x=p-d,A=v*v+x*x,w=i-a,b=h*p-g*d,D=(x<0?-1:1)*Sl(_l(0,w*w*A-b*b)),k=(b*x-v*D)/A,C=(-b*v-x*D)/A,M=(b*x+v*D)/A,T=(-b*v+x*D)/A,_=k-y,E=C-m,F=M-y,S=T-m;return _*_+E*E>F*F+S*S&&(k=M,C=T),{cx:k,cy:C,x01:-f,y01:-c,x11:k*(i/w-1),y11:C*(i/w-1)}}function Hl(){var t=Pl,e=$l,n=kl(0),r=null,i=Yl,a=Rl,l=zl,o=null,s=Ol(u);function u(){var u,f,c=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-Ll,g=a.apply(this,arguments)-Ll,p=Cl(g-d),y=g>d;if(o||(o=u=s()),hBl)if(p>Il-Bl)o.moveTo(h*Tl(d),h*Fl(d)),o.arc(0,0,h,d,g,!y),c>Bl&&(o.moveTo(c*Tl(g),c*Fl(g)),o.arc(0,0,c,g,d,y));else{var m,v,x=d,A=g,w=d,b=g,D=p,k=p,C=l.apply(this,arguments)/2,M=C>Bl&&(r?+r.apply(this,arguments):Sl(c*c+h*h)),T=El(Cl(h-c)/2,+n.apply(this,arguments)),_=T,E=T;if(M>Bl){var F=Vl(M/c*Fl(C)),S=Vl(M/h*Fl(C));(D-=2*F)>Bl?(w+=F*=y?1:-1,b-=F):(D=0,w=b=(d+g)/2),(k-=2*S)>Bl?(x+=S*=y?1:-1,A-=S):(k=0,x=A=(d+g)/2)}var B=h*Tl(x),N=h*Fl(x),L=c*Tl(b),I=c*Fl(b);if(T>Bl){var V,O=h*Tl(A),P=h*Fl(A),$=c*Tl(w),Y=c*Fl(w);if(p1?0:t<-1?Nl:Math.acos(t)}((R*U+z*H)/(Sl(R*R+z*z)*Sl(U*U+H*H)))/2),W=Sl(V[0]*V[0]+V[1]*V[1]);_=El(T,(c-W)/(X-1)),E=El(T,(h-W)/(X+1))}else _=E=0}k>Bl?E>Bl?(m=Ul($,Y,B,N,h,E,y),v=Ul(O,P,L,I,h,E,y),o.moveTo(m.cx+m.x01,m.cy+m.y01),EBl&&D>Bl?_>Bl?(m=Ul(L,I,O,P,c,-_,y),v=Ul(B,N,$,Y,c,-_,y),o.lineTo(m.cx+m.x01,m.cy+m.y01),_t?1:e>=t?0:NaN}function Zl(t){return t}function Kl(t,e,n){this.k=t,this.x=e,this.y=n}var Jl,to,eo;Wl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Kl.prototype={constructor:Kl,scale:function(t){return 1===t?this:new Kl(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Kl(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Kl.prototype,function(t){t[t.Tag=0]="Tag",t[t.Frontmatter=1]="Frontmatter",t[t.Wiki=2]="Wiki",t[t.WikiLink=3]="WikiLink",t[t.WikiDisplay=4]="WikiDisplay",t[t.Text=5]="Text",t[t.dvField=6]="dvField",t[t.Table=7]="Table",t[t.FileMeta=8]="FileMeta",t[t.Task=9]="Task",t[t.TaskDone=10]="TaskDone",t[t.TaskNotDone=11]="TaskNotDone"}(Jl||(Jl={})),function(t){t[t.Line=0]="Line",t[t.Bar=1]="Bar",t[t.Pie=2]="Pie",t[t.Radar=3]="Radar",t[t.Summary=4]="Summary",t[t.Table=5]="Table",t[t.Month=6]="Month",t[t.Heatmap=7]="Heatmap",t[t.Bullet=8]="Bullet",t[t.Unknown=9]="Unknown"}(to||(to={})),function(t){t[t.Number=0]="Number",t[t.Int=1]="Int",t[t.Date=2]="Date",t[t.Time=3]="Time",t[t.DateTime=4]="DateTime",t[t.String=5]="String"}(eo||(eo={}));class no{constructor(t,e){this.date=t,this.value=e}}class ro{constructor(t,e,n){if(this.type=e,this.target=n,this.separator="",this.id=t,this.accessor=-1,this.accessor1=-1,this.accessor2=-1,this.valueType=eo.Number,this.usedAsXDataset=!1,this.numTargets=0,e===Jl.Table){let t,e=new RegExp("\\[(?[0-9]+)\\]\\[(?[0-9]+)\\](\\[(?[0-9]+)\\])?","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);if(Number.isNumber(r)&&void 0!==t.groups.accessor1){let i=parseFloat(t.groups.accessor1);if(Number.isNumber(i)){let a;void 0!==t.groups.accessor2&&(a=parseFloat(t.groups.accessor2)),this.accessor=r,this.accessor1=i,Number.isNumber(a)&&(this.accessor2=a),this.parentTarget=n.replace(e,"")}break}}}else{let t,e=new RegExp("\\[(?[0-9]+)\\]","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);Number.isNumber(r)&&(this.accessor=r,this.parentTarget=n.replace(e,""));break}}}equalTo(t){return this.type===t.type&&this.target===t.target}getType(){return this.type}getTarget(){return this.target}getParentTarget(){return this.parentTarget}getId(){return this.id}getAccessor(t=0){switch(t){case 0:return this.accessor;case 1:return this.accessor1;case 2:return this.accessor2}return null}setSeparator(t){this.separator=t}getSeparator(t=!1){return""===this.separator?t?",":"/":this.separator}addNumTargets(t=1){this.numTargets=this.numTargets+t}getNumTargets(){return this.numTargets}}class io{constructor(t,e){this.currentIndex=0,this.name="untitled",this.query=e,this.values=[],this.parent=t,this.id=-1,this.yMin=null,this.yMax=null,this.startDate=null,this.endDate=null,this.numTargets=0,this.lineInfo=null,this.barInfo=null,this.isTmpDataset=!1,this.valueType=null==e?void 0:e.valueType;for(let e=0;e=0&&n=0&&nthis.yMax)&&(this.yMax=e),(null===this.startDate||tthis.endDate)&&(this.endDate=t.clone()))}recalculateMinMax(){this.yMin=Math.min(...this.values),this.yMax=Math.max(...this.values)}getYMin(){return this.yMin}getYMax(){return this.yMax}getStartDate(){return this.startDate}getEndDate(){return this.endDate}shift(t,e){let n=!1;for(let r=0;r=e)&&(this.values[r]=this.values[r]+t,n=!0);n&&(this.yMin=this.yMin+t,this.yMax=this.yMax+t)}setPenalty(t){for(let e=0;ethis.yMax&&(this.yMax=t))}getQuery(){return this.query}accumulateValues(){let t=0;for(let e=0;ethis.yMax&&(this.yMax=t)}shiftByDataset(t){for(let e=0;ethis.yMax&&(this.yMax=n)}}getValues(){return this.values}getLength(){return this.values.length}getLengthNotNull(){let t=0;for(let e=0;e[\d\.\/-]+)\s*,\s*(?[\d\.\/-]+)\s*\)/).groups;e&&(this.translateX=parseFloat(e.x),this.translateY=parseFloat(e.y))}}}class wo{constructor(t,e){this.filePath=t,this.tableIndex=e,this.xDataset=null,this.yDatasets=[]}}class bo{constructor(){this.fileTotal=0,this.fileAvailable=0,this.fileOutOfDateRange=0,this.fileNotInFormat=0,this.errorMessage="",this.minDate=window.moment(""),this.maxDate=window.moment(""),this.gotAnyValidXValue=!1,this.gotAnyValidYValue=!1}}const Do=function(){const t=["HH","H","hh","h"],e=["mm","m"],n=["ss","s",""];let r=[];for(let i of t)for(let t of e)for(let e of n){let n=`${i}:${t}`;""!==e&&(n+=`:${e}`),i.contains("h")&&(n+=" a"),r.push(n)}return r}();function ko(t,e,n){if(!e&&!n)return t;let r=t;if(r.startsWith("^")&&(r=r.slice(1)),e){let t=new RegExp("^("+e+")","gm");t.test(r)&&(r=r.replace(t,""))}if(n){let t=new RegExp("("+n+")$","gm");t.test(r)&&(r=r.replace(t,""))}return r}function Co(t,e){let n=e;t.length>4&&t.startsWith("[[")&&t.endsWith("]]")&&(t=t.substring(2,t.length-2)),"iso-8601"===e.toLowerCase()&&(n=window.moment.ISO_8601);let r=window.moment(t,n,!0);return r=r.startOf("day"),r}function Mo(t,e,n=!0){if(!t||!e||0===e.length)return[null,t];let r=null;const i="^(?[0-9]+)("+e.join("|")+")$",a=new RegExp(i,"gm");let l=a.exec(t);return l&&void 0!==l.groups&&void 0!==l.groups.value&&(r=parseFloat(l.groups.value),Number.isNumber(r)&&!Number.isNaN(r))?(n&&(t=t.replace(a,"")),[r,t]):[null,t]}function To(t){if(!t)return null;let e=window.moment.duration(0),n=!1,r=!1;t.startsWith("+")&&(r=!1,t=t.substring(1)),t.startsWith("-")&&(r=!0,t=t.substring(1));let i=null;[i,t]=Mo(t,["year","years","Y","y"]),null!==i&&(r&&(i*=-1),e.add(i,"years"),n=!0);let a=null;[a,t]=Mo(t,["month","months","M"]),null!==a&&(r&&(a*=-1),e.add(a,"months"),n=!0);let l=null;[l,t]=Mo(t,["week","weeks","W","w"]),null!==l&&(r&&(l*=-1),e.add(l,"weeks"),n=!0);let o=null;[o,t]=Mo(t,["day","days","D","d"]),null!==o&&(r&&(o*=-1),e.add(o,"days"),n=!0);let s=null;[s,t]=Mo(t,["hour","hours","H","h"]),null!==s&&(r&&(s*=-1),e.add(s,"hours"),n=!0);let u=null;[u,t]=Mo(t,["minute","minutes","m"]),null!==u&&(r&&(u*=-1),e.add(u,"minutes"),n=!0);let f=null;return[f,t]=Mo(t,["second","seconds","S","s"]),null!==f&&(r&&(f*=-1),e.add(f,"seconds"),n=!0),n?e:null}function _o(t,e){let n=null,r=To(t);return r&&window.moment.isDuration(r)&&(n=So(e),n=n.add(r),n&&n.isValid()),n}function Eo(t,e){return null==t?null:"iso-8601"===e.toLowerCase()?t.format():t.format(e)}function Fo(t,e){return Co(Eo(window.moment(t),e),e)}function So(t){return Co(Eo(window.moment(),t),t)}function Bo(t,e){for(var n=(e=e.replace(/^\./,"")).split("."),r=0,i=n.length;rt!==e)),i=n.reverse().findIndex((t=>t!==e));return-1===r&&-1===i?t:t.substring(r,t.length-i)}function Lo(t){if(null===t)return null;let e=new RegExp(']*?alt\\s*=\\s*[""\']?(?[^\'"" >]+?)[ \'""][^>]*?>',"g");return t.replace(e,((...t)=>{let e=t[t.length-1];return e&&e.emoji?e.emoji.trim():""}))}function Io(t,e=null){let n=null,r=eo.Number;if("string"==typeof t)if(t.includes(":")){let e=!1;t.startsWith("-")&&(e=!0,t=t.substring(1));let i=window.moment(t,Do,!0);i.isValid()&&(n=i.diff(window.moment("00:00","HH:mm",!0),"seconds"),e&&(n*=-1),r=eo.Time)}else if(e){const r=Object.keys(e);for(let n of r)if("string"==typeof n){let r=new RegExp(n,"gm");if(r.test(t)&&Number.isNumber(e[n])){let i=e[n].toString();t=t.replace(r,i);break}}n=parseFloat(t),Number.isNaN(n)&&(n=null)}else n=parseFloat(t),Number.isNaN(n)&&(n=null);else"number"==typeof t&&(n=t);return{type:r,value:n}}function Vo(t,e="",n=""){var r=ee("body").append("svg");let i=r.append("text").text(t).attr("x",-99999).attr("y",-99999);e&&i.attr("class",e),n&&i.attr("transform","rotate("+n+")");var a=r.node().getBBox();return r.remove(),{width:a.width,height:a.height}}function Oo(t,e,n){let r=(0|parseFloat(t.attr("width")))+e,i=(0|parseFloat(t.attr("height")))+n;t.attr("width",r),t.attr("height",i)}function Po(t,e,n){let r=new Ao(t.attr("transform"));t.attr("transform","translate("+(r.translateX+e)+","+(r.translateY+n)+")")}function $o(t){return t=(t=(t=t.replace(/(^\\s\*)|(\\s\*$)/gi,"")).replace(/\[ \]{2,}/gi," ")).replace(/\\n /,"\\n")}class Yo{static get version(){return"1.3.8"}static toString(){return"JavaScript Expression Parser (JSEP) v"+Yo.version}static addUnaryOp(t){return Yo.max_unop_len=Math.max(t.length,Yo.max_unop_len),Yo.unary_ops[t]=1,Yo}static addBinaryOp(t,e,n){return Yo.max_binop_len=Math.max(t.length,Yo.max_binop_len),Yo.binary_ops[t]=e,n?Yo.right_associative.add(t):Yo.right_associative.delete(t),Yo}static addIdentifierChar(t){return Yo.additional_identifier_chars.add(t),Yo}static addLiteral(t,e){return Yo.literals[t]=e,Yo}static removeUnaryOp(t){return delete Yo.unary_ops[t],t.length===Yo.max_unop_len&&(Yo.max_unop_len=Yo.getMaxKeyLen(Yo.unary_ops)),Yo}static removeAllUnaryOps(){return Yo.unary_ops={},Yo.max_unop_len=0,Yo}static removeIdentifierChar(t){return Yo.additional_identifier_chars.delete(t),Yo}static removeBinaryOp(t){return delete Yo.binary_ops[t],t.length===Yo.max_binop_len&&(Yo.max_binop_len=Yo.getMaxKeyLen(Yo.binary_ops)),Yo.right_associative.delete(t),Yo}static removeAllBinaryOps(){return Yo.binary_ops={},Yo.max_binop_len=0,Yo}static removeLiteral(t){return delete Yo.literals[t],Yo}static removeAllLiterals(){return Yo.literals={},Yo}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new Yo(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map((t=>t.length)))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return Yo.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!Yo.binary_ops[String.fromCharCode(t)]||Yo.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return Yo.isIdentifierStart(t)||Yo.isDecimalDigit(t)}throwError(t){const e=new Error(t+" at character "+this.index);throw e.index=this.index,e.description=t,e}runHook(t,e){if(Yo.hooks[t]){const n={context:this,node:e};return Yo.hooks.run(t,n),n.node}return e}searchHook(t){if(Yo.hooks[t]){const e={context:this};return Yo.hooks[t].find((function(t){return t.call(e.context,e),e.node})),e.node}}gobbleSpaces(){let t=this.code;for(;t===Yo.SPACE_CODE||t===Yo.TAB_CODE||t===Yo.LF_CODE||t===Yo.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),e=1===t.length?t[0]:{type:Yo.COMPOUND,body:t};return this.runHook("after-all",e)}gobbleExpressions(t){let e,n,r=[];for(;this.index0;){if(Yo.binary_ops.hasOwnProperty(t)&&(!Yo.isIdentifierStart(this.code)||this.index+t.lengthi.right_a&&t.right_a?n>t.prec:n<=t.prec;for(;r.length>2&&o(r[r.length-2]);)l=r.pop(),e=r.pop().value,a=r.pop(),t={type:Yo.BINARY_EXP,operator:e,left:a,right:l},r.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+s),r.push(i,t)}for(o=r.length-1,t=r[o];o>1;)t={type:Yo.BINARY_EXP,operator:r[o-1].value,left:r[o-2],right:t},o-=2;return t}gobbleToken(){let t,e,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"),r)return this.runHook("after-token",r);if(t=this.code,Yo.isDecimalDigit(t)||t===Yo.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===Yo.SQUOTE_CODE||t===Yo.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(t===Yo.OBRACK_CODE)r=this.gobbleArray();else{for(e=this.expr.substr(this.index,Yo.max_unop_len),n=e.length;n>0;){if(Yo.unary_ops.hasOwnProperty(e)&&(!Yo.isIdentifierStart(this.code)||this.index+e.length=e.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===Yo.COMMA_CODE){if(this.index++,r++,r!==e.length)if(t===Yo.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===Yo.CBRACK_CODE)for(let t=e.length;t{if("object"!=typeof t||!t.name||!t.init)throw new Error("Invalid JSEP plugin format");this.registered[t.name]||(t.init(this.jsep),this.registered[t.name]=t)}))}}(Yo),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),Yo.max_unop_len=Yo.getMaxKeyLen(Yo.unary_ops),Yo.max_binop_len=Yo.getMaxKeyLen(Yo.binary_ops);const zo=t=>new Yo(t).parse();Object.getOwnPropertyNames(Yo).forEach((t=>{void 0===zo[t]&&"prototype"!==t&&(zo[t]=Yo[t])})),zo.Jsep=Yo;var Uo={name:"ternary",init(t){t.hooks.add("after-expression",(function(e){if(e.node&&this.code===t.QUMARK_CODE){this.index++;const n=e.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const i=this.gobbleExpression();if(i||this.throwError("Expected expression"),e.node={type:"ConditionalExpression",test:n,consequent:r,alternate:i},n.operator&&t.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&t.binary_ops[r.right.operator]<=.9;)r=r.right;e.node.test=r.right,r.right=e.node,e.node=n}}else this.throwError("Expected :")}}))}};zo.plugins.register(Uo);var Ho,Xo={};function Wo(t){if("number"==typeof t){if(0===t)return!1}else if(t instanceof io&&t.getValues().some((function(t){return 0===t})))return!1;return!0}Ho=Xo,function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(n){return function(n,r){var i,a,l,o,s,u,f,c,h,d=1,g=n.length,p="";for(a=0;a=0),o.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,o.width?parseInt(o.width):0);break;case"e":i=o.precision?parseFloat(i).toExponential(o.precision):parseFloat(i).toExponential();break;case"f":i=o.precision?parseFloat(i).toFixed(o.precision):parseFloat(i);break;case"g":i=o.precision?String(Number(i.toPrecision(o.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case"t":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(o.type)?p+=i:(!t.number.test(o.type)||c&&!o.sign?h="":(h=c?"+":"-",i=i.toString().replace(t.sign,"")),u=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",f=o.width-(h+i).length,s=o.width&&f>0?u.repeat(f):"",p+=o.align?h+i+s:"0"===u?h+s+i:s+h+i)}return p}(function(e){if(r[e])return r[e];for(var n,i=e,a=[],l=0;i;){if(null!==(n=t.text.exec(i)))a.push(n[0]);else if(null!==(n=t.modulo.exec(i)))a.push("%");else{if(null===(n=t.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){l|=1;var o=[],s=n[2],u=[];if(null===(u=t.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=t.key_access.exec(s)))o.push(u[1]);else{if(null===(u=t.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}n[2]=o}else l|=2;if(3===l)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}i=i.substring(n[0].length)}return r[e]=a}(n),arguments)}function n(t,n){return e.apply(null,[t].concat(n||[]))}var r=Object.create(null);Ho.sprintf=e,Ho.vsprintf=n,"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}();const jo={min:function(t,e){return v(t.getValues())},minDate:function(t,e){let n=v(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: min not found"},max:function(t,e){return m(t.getValues())},maxDate:function(t,e){let n=m(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: max not found"},startDate:function(t,e){if(t){let e=t.getStartDate();if(e&&e.isValid())return e}return e.startDate},endDate:function(t,e){if(t){let e=t.getEndDate();if(e&&e.isValid())return e}return e.endDate},sum:function(t,e){return D(t.getValues())},count:function(t,e){return"Error: deprecated function 'count'"},numTargets:function(t,e){return t.getNumTargets()},days:function(t,e){return"Error: deprecated function 'days'"},numDays:function(t,e){return t.getLength()},numDaysHavingData:function(t,e){return t.getLengthNotNull()},maxStreak:function(t,e){let n=0,r=0;for(let e of t)e.value?n++:n=0,n>=r&&(r=n);return r},maxStreakStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)e.value?(0===n&&(i=e.date),n++):n=0,n>=r&&(r=n,a=i);return a},maxStreakEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t=r&&(r=n,a=i)}}return a},maxBreaks:function(t,e){let n=0,r=0;for(let e of t)e.value?n=0:n++,n>r&&(r=n);return r},maxBreaksStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)e.value?n=0:(0===n&&(i=e.date),n++),n>=r&&(r=n,a=i);return a},maxBreaksEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t=r&&(r=n,a=i)}}return a},lastStreak:function(t,e){return"Error: deprecated function 'lastStreak'"},currentStreak:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(!e[t].value)break;n++}}return n},currentStreakStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t=0;t--){let i=e[t];if(!i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},currentBreaks:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(e[t].value)break;n++}}return n},currentBreaksStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t=0;t--){let i=e[t];if(i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},average:function(t,e){let n=t.getLengthNotNull();return Wo(n)?D(t.getValues())/n:"Error: divide by zero in expression"},median:function(t,e){return w(t.getValues())},variance:function(t,e){return function(t,e){let n,r=0,i=0,a=0;for(let e of t)null!=e&&(e=+e)>=e&&(n=e-i,i+=n/++r,a+=n*(e-i));if(r>1)return a/(r-1)}(t.getValues())}},qo={"-":function(t){if("number"==typeof t)return-1*t;if(t instanceof io){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){null!==n[e]&&(n[e]=-1*t)})),e.recalculateMinMax(),e}return"Error: unknown operation for '-'"},"+":function(t){if("number"==typeof t)return t;if(t instanceof io){return t.cloneToTmpDataset()}return"Error: unknown operation for '+'"}},Go={"+":function(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("number"==typeof t&&e instanceof io){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof io&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof io&&e instanceof io){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '+'"},"-":function(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("number"==typeof t&&e instanceof io){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof io&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n}if(t instanceof io&&e instanceof io){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '-'"},"*":function(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;if("number"==typeof t&&e instanceof io){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof io&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof io&&e instanceof io){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '*'"},"/":function(t,e){if(!Wo(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t/e;if("number"==typeof t&&e instanceof io){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof io&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof io&&e instanceof io){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '/'"},"%":function(t,e){if(!Wo(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t%e;if("number"==typeof t&&e instanceof io){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof io&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof io&&e instanceof io){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '%'"}},Qo={normalize:function(t,e,n){let r=t.getYMin(),i=t.getYMax();if(null!==r&&null!==i&&i>r){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){n[e]=(t-r)/(i-r)})),e.recalculateMinMax(),e}return"Error: invalid data range for function 'normalize'"},setMissingValues:function(t,e,n){if(e&&e.length>0){let n=e[0],r=t.cloneToTmpDataset();return Number.isNumber(n)&&!Number.isNaN(n)?(r.getValues().forEach((function(t,e,r){null===t&&(r[e]=n)})),r.recalculateMinMax(),r):"Error: invalid arguments for function 'setMissingValues'"}return"Error: invalid arguments for function 'setMissingValues"}};function Zo(t,e){switch(t.type){case"Literal":return t.value;case"Identifier":let n=t.name;return n in jo||n in Qo?`Error: deprecated template variable '${n}', use '${n}()' instead`:`Error: unknown function name '${n}'`;case"UnaryExpression":let r=t,i=Zo(r.argument,e);return"string"==typeof i?i:qo[r.operator](i);case"BinaryExpression":let a=t,l=Zo(a.left,e),o=Zo(a.right,e),s=function(t,e){return"string"==typeof t?t:"string"==typeof e?e:"number"==typeof t||window.moment.isMoment(t)||t instanceof io?"number"==typeof e||window.moment.isMoment(e)||e instanceof io?"":"Error: invalide operant type":"Error: invalid operant type"}(l,o);return"string"==typeof s&&s.startsWith("Error:")?s:Go[a.operator](l,o);case"CallExpression":let u=t,f=u.callee.name,c=function(t,e){return t.map((function(t){return Zo(t,e)}))}(u.arguments,e);if("string"==typeof c)return c;if("dataset"===f){if(1===c.length){let t=c[0];if("string"==typeof t)return t;if("number"!=typeof t)return"Error: function 'dataset' only accepts id in number";let n=function(t,e){return e.datasets.getDatasetById(t)}(t,e);return n||`Error: no dataset found for id '${t}'`}}else{if(f in jo){if(0===c.length){let t=null;for(let n of e.datasets)t||n.getQuery().usedAsXDataset||(t=n);return t?jo[f](t,e):`No available dataset found for function ${f}`}if(1===c.length){let t=c[0];return"string"==typeof t?t:t instanceof io?jo[f](t,e):`Error: function '${f}' only accepts Dataset`}return`Error: Too many arguments for function ${f}`}if(f in Qo){if(1===c.length){if("string"==typeof c[0])return c[0];if(c[0]instanceof io){let t=c[0];return Qo[f](t,null,e)}return`Error: function ${f} only accept Dataset`}if(c.length>1){if("string"==typeof c[0])return c[0];if(c[0]instanceof io){let t=c[0];return Qo[f](t,c.filter((function(t,e,n){return e>0})),e)}return`Error: function ${f} only accept Dataset`}return`Error: Too many arguments for function ${f}`}}return`Error: unknown function name '${f}'`}return"Error: unknown expression"}function Ko(t,e){let n,r=[],i=new RegExp("{{(?[\\w+\\-*\\/0-9\\s()\\[\\]%.,]+)(::(?[\\w+\\-*\\/0-9\\s()\\[\\]%.:]+))?}}","gm");for(;n=i.exec(t);){let t=n[0];if(!r.some((e=>e.source===t))&&(void 0!==n.groups&&void 0!==n.groups.expr)){let i=n.groups.expr,a=null;try{a=zo(i)}catch(t){return"Error:"+t.message}if(!a)return"Error: failed to parse expression";const l=Zo(a,e);if("string"==typeof l)return l;if("number"==typeof l||window.moment.isMoment(l)){let e=null;void 0!==n.groups.format&&(e=n.groups.format),r.push({source:t,value:l,format:e})}}}return r}function Jo(t,e){let n=Ko(t,e);if("string"==typeof n)return n;let r=n;for(let n of r){let r=n.source,i=n.value,a=n.format,l="";"number"==typeof i?l=a?Xo.sprintf("%"+a,i):i.toFixed(1):window.moment.isMoment(i)&&(l=Eo(i,a||e.dateFormat)),l&&(t=t.split(r).join(l))}return t}function ts(t,e){if(t=t.trim(),/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)$/.test(t))return parseFloat(t);let n=Ko(t,e);if("string"==typeof n)return n;let r=n;return r.length>0?r[0].value:"Error: failed to resolve values"}function es(t,e,n,r){let i="",a=.5*n.dataAreaSize.width,l=.7*a,o=l*r.ratioInnerRadius,s=[];for(let t of r.data){let e=ts(t,n);if("string"==typeof e){i=e;break}"number"==typeof e&&s.push(e)}if(""!==i)return i;let u=[];for(let t of r.label){let e=Jo(t,n);if(e.startsWith("Error")){i=e;break}u.push(e)}if(""!==i)return i;let f=r.hideLabelLessThan,c=u.map((function(t){return Vo(t,"tracker-tick-label")})),h=[];for(let t of r.extLabel){let e=Jo(t,n);if(e.startsWith("Error")){i=e;break}h.push(e)}if(""!==i)return i;let d=h.map((function(t){return Vo(t,"tracker-pie-label")})),g=r.showExtLabelOnlyIfNoLabel,p=Zr().range(r.dataColor),y=e.dataArea.append("g");y.attr("transform",(function(){return"translate("+.5*n.dataAreaSize.width+","+.5*n.dataAreaSize.height+")"}));let m=function(){var t=Zl,e=Ql,n=null,r=kl(0),i=kl(Il),a=kl(0);function l(l){var o,s,u,f,c,h=(l=Xl(l)).length,d=0,g=new Array(h),p=new Array(h),y=+r.apply(this,arguments),m=Math.min(Il,Math.max(-Il,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/h,a.apply(this,arguments)),x=v*(m<0?-1:1);for(o=0;o0&&(d+=c);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(l[t],l[e])})),o=0,u=d?(m-h*x)/d:0;o0?c*u:0)+x,p[s]={data:l[s],index:o,value:c,startAngle:y,endAngle:f,padAngle:v};return p}return l.value=function(e){return arguments.length?(t="function"==typeof e?e:kl(+e),l):t},l.sortValues=function(t){return arguments.length?(e=t,n=null,l):e},l.sort=function(t){return arguments.length?(n=t,e=null,l):n},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:kl(+t),l):r},l.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:kl(+t),l):i},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:kl(+t),l):a},l}(),v=m(s);v.forEach((function(t,e){t.input_index=e}));let x=y.selectAll("sector").data(v).enter().append("g").attr("class","sector"),A=Hl().innerRadius(o).outerRadius(l);var w=Hl().innerRadius(.9*a).outerRadius(.9*a);function b(t){return(t.endAngle-t.startAngle)/(2*Math.PI)Math.sqrt(Math.pow(o[0]-a[0],2)+Math.pow(o[1]-a[1],2))?[a,o]:[a,l,o]}y.selectAll("extLabel").data(v).enter().append("text").sort((function(t,e){return Math.cos(D(e))-Math.cos(D(t))})).text((function(t,e){return k(t,t.input_index)})).attr("transform",(function(t,e){if(0==k(t,e=t.input_index).length)return;let n=w.centroid(t),r=D(t);n[0]=(.99*a-d[e].width)*(rc&&(c=u[t].width,f=t);let h=c/s[f].length,d=u[f].height,g=s.length,p=2*h,y=d,m=2*h,v=0,x=0;"vertical"===r.legendOrientation?(v=3*p+m+c,x=(g+1)*y):"horizontal"===r.legendOrientation&&(v=(2*p+m)*g+p+D(u,(function(t,e){return t.width})),x=y+d);let A=0,w=0;if("top"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=o,Oo(i,0,x+y),Po(a,0,x+y);else if("bottom"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=o+n.dataAreaSize.height+y,Oo(i,0,x+y);else if("left"===r.legendPosition)A=0,w=o+n.dataAreaSize.height/2-x/2,Oo(i,v+p,0),Po(a,v+p,0);else{if("right"!==r.legendPosition)return;A=n.dataAreaSize.width+p,w=o+n.dataAreaSize.height/2-x/2,Oo(i,v+p,0)}let b=e.graphArea.append("g").attr("id","legend").attr("transform","translate("+A+","+w+")"),k=b.append("rect").attr("class","tracker-legend").attr("width",v).attr("height",x);r.legendBgColor&&k.style("fill",r.legendBgColor),r.legendBorderColor&&k.style("stroke",r.legendBorderColor);let C=p,M=d,T=C+p+m,_=M;if("vertical"===r.legendOrientation)b.selectAll("markers").data(s).enter().append("circle").attr("cx",C+m/2).attr("cy",(function(t,e){return M+e*y})).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),b.selectAll("labels").data(s).enter().append("text").attr("x",T).attr("y",(function(t,e){return _+e*y})).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}));else if("horizontal"===r.legendOrientation){let t=0;t=0,b.selectAll("markers").data(s).enter().append("circle").attr("cx",(function(e,n){return 0===n?t=C+m/2:t+=u[n].width+p+m+p,t})).attr("cy",M).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),t=0,b.selectAll("labels").data(s).enter().append("text").attr("x",(function(e,n){return 0===n?t=T:t+=u[n].width+p+m+p,t})).attr("y",_).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}))}}(0,r,e,n),function(t,e,n){let r=ee(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}(t,r,e)}function rs(t,e,n){if(!e||!n)return;let r="";n.template,r=n.template;let i=Jo(r,e);if(i.startsWith("Error:"))return i;if(r=i,""!==r){let e=ee(t).append("div");if(r.includes("\n")||r.includes("\\n")){let t=r.split(/(\n|\\n)/);for(let n of t)"\n"!==n&&"\\n"!==n&&e.append("div").text(n)}else e.text(r);""!==n.style&&e.attr("style",n.style)}}let is=!1,as=2.8,ls=1.8;function os(t,e){let n=e.dataset;if(0===n.length)return!1;let r=null;if(null===e.selectedDataset){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;if(r)return e.selectedDataset=r.getId(),!0}else{let i=e.selectedDataset,a=n.findIndex((t=>t===i));if(a>=0){if(a===e.dataset.length-1){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;return!!r&&(e.selectedDataset=r.getId(),!0)}{a++;let i=n[a];if(r=t.datasets.getDatasetById(i),e.selectedDataset=i,r&&!r.getQuery().usedAsXDataset)return!0;os(t,e)}}}return!1}function ss(t,e,n,r){ee(e).select("#svg").remove();for(var i=Object.getOwnPropertyNames(t),a=0;a").attr("id","arrowLeft").attr("transform","translate("+6.5*u+","+(g/2+D.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(a){us(e,r);let l=i.clone().add(1,"month");hs(t,e,n,r,l)})).style("cursor","pointer"),p.append("text").text("◦").attr("id","arrowToday").attr("transform","translate("+6*u+","+(g/2+D.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(i){us(e,r);let a=So(n.dateFormat);hs(t,e,n,r,a)})).style("cursor","pointer"),g+=8;let k=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];"mon"===r.startWeekOn.toLowerCase()&&k.push(k.shift());let C=Vo(k[0],"tracker-month-weekday");e.graphArea.selectAll("weekDays").data(k).enter().append("text").text((function(t){return t})).attr("transform",(function(t,e){return"translate("+(e+.5)*u+","+(g+C.height)+")"})).attr("class","tracker-month-weekday").attr("text-anchor","middle").style("cursor","default").on("click",(function(t){us(e,r)})),g+=C.height+8;let M=null;r.dividingLineColor?M=r.dividingLineColor:r.color&&(M=r.color);let T=e.graphArea.append("rect").attr("x",0).attr("y",g).attr("width",6.5*u+C.width).attr("height",1).attr("class","tracker-month-dividing-line");M&&T.style("fill",M),g+=1,p.attr("height",g),e.header=p,Po(e.dataArea,0,g)}function cs(t,e,n,r,i){if(!n||!r)return;let a=r.mode;if("circle"!==a&&"annotation"!==a)return"Unknown month view mode";let l=r.selectedDataset;if(null===l)return;let o=n.datasets.getDatasetById(l);if(!o)return;let s=r.dataset.findIndex((t=>t===l));l<0&&(s=0);let u=r.threshold[s];i.month(),i.daysInMonth();let f=Vo("30","tracker-month-label"),c=Math.max(f.width,f.height)*as,h=c/as*ls/2,d=(c-2*h)/2,g=v(o.getValues());null!==r.yMin[s]&&(g=r.yMin[s]);let p=m(o.getValues());null!==r.yMax[s]&&(p=r.yMax[s]);let y=!0;(null===p||null===g||p<=g)&&(y=!1);const x=i.clone().startOf("month");let A=x.clone().subtract(x.day(),"days");"mon"===r.startWeekOn.toLowerCase()&&(A=A.add(1,"days"));const w=i.clone().endOf("month");let b=w.clone().add(7-w.day()-1,"days");"mon"===r.startWeekOn.toLowerCase()&&(b=b.add(1,"days"));const D=o.getStartDate(),k=o.getEndDate();let C=r.showAnnotation,M=r.annotation,T=M[s],_=r.showAnnotationOfAllTargets,E=[],F=0,S=0,B=0;for(let t=A.clone();t<=b;t.add(1,"days")){t=Co(Eo(t,n.dateFormat),n.dateFormat),"2021-09-13"===t.format("YYYY-MM-DD")&&(is=!1),"mon"===r.startWeekOn.toLowerCase()?(F=t.day()-1,F<0&&(F=6),S=Math.floor(B/7)):(F=t.day(),S=Math.floor(B/7));let e=!0;(t.diff(x)<0||t.diff(w)>0)&&(e=!1);let i=!0;D&&k&&t.diff(D)>=0&&t.diff(k)<=0&&(i=!1);const a=o.getValue(t);is&&(console.log(o),console.log(Eo(t,n.dateFormat)),console.log(a));let l=!1;r.circleColorByValue?(y||null!==a&&a>u)&&(l=!0):null!==a&&a>u&&(l=!0);let s=null;r.circleColorByValue&&y&&null!==a&&(s=(a-g)/(p-g)),is&&(console.log(g),console.log(p),console.log(s));let f=o.getValue(t,1),c=o.getValue(t,-1),h=!1;null!==a&&a>u&&null!==c&&c>u&&(h=!0);let d=!1;null!==a&&a>u&&null!==f&&f>u&&(d=!0),is&&(console.log(`preValue: ${c}, curValue: ${a}, nextValue: ${f}`),console.log(r.threshold),console.log(`streakIn: ${h}, streakOut: ${d}`));let m="";if(C)if(_)for(let e of r.dataset){let i=r.dataset.findIndex((t=>t===e));if(i>=0){let a=n.datasets.getDatasetById(e).getValue(t),l=r.threshold[i];null!==a&&a>l&&(m+=M[i])}}else a>u&&(m=T);E.push({date:Eo(t,n.dateFormat),value:a,scaledValue:s,dayInMonth:t.date(),isInThisMonth:e,isOutOfDataRange:i,row:S,col:F,showCircle:l,streakIn:h,streakOut:d,annotation:m}),B++,is&&(is=!1)}let N=(F+1)*c,L=ui().domain([-.5,6.5]).range([0,N]);if("circle"===a&&r.showCircle&&r.showStreak){let t="#69b3a2";r.circleColor?t=r.circleColor:r.color&&(t=r.color),e.dataArea.selectAll("streakIn").data(E.filter((function(t){return t.streakIn}))).enter().append("rect").attr("x",(function(t){return L(t.col)-h-d})).attr("y",(function(t){return L(t.row)-1.5})).attr("width",d).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?Cn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})),e.dataArea.selectAll("streakOut").data(E.filter((function(t){return t.streakOut}))).enter().append("rect").attr("x",(function(t){return L(t.col)+h})).attr("y",(function(t){return L(t.row)-1.5})).attr("width",d).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?Cn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1}))}let I="#69b3a2";r.circleColor?I=r.circleColor:r.color&&(I=r.color),"circle"===a&&r.showCircle&&e.dataArea.selectAll("dot").data(E).enter().append("circle").attr("r",h).attr("cx",(function(t){return L(t.col)})).attr("cy",(function(t){return L(t.row)})).style("fill",(function(t){if(t.showCircle){if(!r.circleColorByValue)return I;if(null!==t.scaledValue){return Cn("white",I)(.8*t.scaledValue+.2)}return"none"}return"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).style("cursor","default");let V=Eo(window.moment(),n.dateFormat);if("circle"===a&&r.showTodayRing){let t=e.dataArea.selectAll("todayRing").data(E.filter((function(t){return t.date===V}))).enter().append("circle").attr("r",.9*h).attr("cx",(function(t){return L(t.col)})).attr("cy",(function(t){return L(t.row)})).attr("class","tracker-month-today-circle").style("cursor","default");""!==r.todayRingColor?t.style("stroke",r.todayRingColor):t.style("stroke","white")}"circle"===a&&r.showSelectedRing&&e.dataArea.selectAll("selectedRing").data(E).enter().append("circle").attr("r",h).attr("cx",(function(t){return L(t.col)})).attr("cy",(function(t){return L(t.row)})).attr("id",(function(t){return"tracker-selected-circle-"+t.date})).attr("class","tracker-month-selected-circle").style("cursor","default").style("stroke","none"),e.dataArea.selectAll("dayLabel").data(E).enter().append("text").text((function(t){return t.dayInMonth.toString()})).attr("transform",(function(t){return"translate("+L(t.col)+","+(L(t.row)+f.height/4)+")"})).style("fill-opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).attr("date",(function(t){return t.date})).attr("value",(function(t){return t.value})).attr("valueType",(function(t){return eo[o.valueType]})).attr("class","tracker-month-label").on("click",(function(t){us(e,r);let n=ee(this).attr("date");if(r.selectedDate=n,r.showSelectedRing&&e.dataArea.select("#tracker-selected-circle-"+n).style("stroke",r.selectedRingColor),r.showSelectedValue){let t=ee(this).attr("value"),n="";if("Time"===ee(this).attr("valueType")){n=window.moment("00:00","HH:mm",!0).add(parseFloat(t),"seconds").format("HH:mm")}else n=t;e.monitor.text(n)}})).style("cursor","pointer"),"annotation"===a&&C&&e.dataArea.selectAll("dayAnnotation").data(E).enter().append("text").text((function(t){return t.annotation})).attr("transform",(function(t){let e=L(t.col),n=L(t.row)+f.height/4;return t.annotation&&(n+=h),"translate("+e+","+n+")"})).attr("class","tracker-month-annotation");let O=parseFloat(e.svg.attr("width")),P=parseFloat(e.svg.attr("height")),$=parseFloat(e.graphArea.attr("width")),Y=parseFloat(e.graphArea.attr("height")),R=7*c+parseFloat(e.header.attr("height")),z=7*c;R>P&&Oo(e.svg,0,R-P),z>O&&Oo(e.svg,z-O,0),R>Y&&Oo(e.graphArea,0,R-Y),z>$&&Oo(e.svg,z-$,0)}function hs(t,e,n,r,i){n&&ds&&(fs(t,e=ss(e,t,n),n,r,i),cs(0,e,n,r,i))}function ds(t,e,n){if(!e||!ds)return;n.dataset;let r=0;for(let t of e.datasets)t.getQuery().usedAsXDataset||r++;if(0===r)return"No available dataset found";if(os(e,n),null===n.selectedDataset)return"No available dataset found";let i={};i=ss(i,t,e);let a=null;if(n.initMonth){if(a=_o(n.initMonth,e.dateFormat),!a){let t=window.moment(n.initMonth,"YYYY-MM",!0);if(!t.isValid())return"Invalid initMonth";a=t}}else a=e.datasets.getDates().last();a&&(fs(t,i,e,n,a),cs(0,i,e,n,a),function(t,e,n){let r=ee(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}(t,i,e))}function gs(t,e,n){if(e&&gs)return"Under construction"}function ps(t,e,n){if(!e||!n)return;let r=parseFloat(n.dataset);e.datasets.getDatasetById(r),"horizontal"===n.orientation?e.dataAreaSize={width:250,height:24}:"vertical"===n.orientation&&(e.dataAreaSize={width:24,height:250});let i=function(t,e,n){let r={};if(!e||!n)return;let i=ee(t).append("svg").attr("id","svg").attr("width",e.dataAreaSize.width+e.margin.left+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.top+e.margin.bottom);r.svg=i;let a=i.append("g").attr("id","graphArea").attr("transform","translate("+e.margin.left+","+e.margin.top+")").attr("width",e.dataAreaSize.width+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.bottom);r.graphArea=a;let l=a.append("g").attr("id","dataArea").attr("width",e.dataAreaSize.width).attr("height",e.dataAreaSize.height);return r.dataArea=l,r}(t,e,n),a=function(t,e,n,r){if(!e||!n)return;let i=n.range,a=i[i.length-1],l=[0,a],o=n.valueUnit,s=function(t){return o&&o.endsWith("%")?oi(0,a,7)(t)+" %":oi(0,a,7)(t)},u=Vo(s(a),"tracker-tick-label");if("horizontal"===n.orientation){let n=ui();n.domain(l).range([0,e.dataAreaSize.width]),t.scale=n;let r=V(n);r.tickFormat(s);let i=t.dataArea.append("g").attr("id","axis").attr("transform","translate(0,"+e.dataAreaSize.height+")").call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",e.dataAreaSize.width+u.width),i.attr("height",6+u.height),Oo(t.svg,+u.width,6+u.height),Oo(t.graphArea,+u.width,6+u.height)}else if("vertical"===n.orientation){let n=ui();n.domain(l).range([e.dataAreaSize.height,0]),t.scale=n;let r=O(n);r.tickFormat(s);let i=t.dataArea.append("g").attr("id","axis").attr("x",0).attr("y",0).call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",6+u.width),i.attr("height",e.dataAreaSize.width),Oo(t.svg,6+u.width,0),Oo(t.graphArea,6+u.width,0),Po(t.dataArea,6+u.width,0)}}(i,e,n);if("string"==typeof a)return a;!function(t,e,n){if(!e||!n)return;if(n.title){let r=Vo(n.title,"tracker-title-small");if("horizontal"===n.orientation){let i=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",r.width/2).attr("y",e.dataAreaSize.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=i,Oo(t.svg,r.width+6,0),Oo(t.graphArea,r.width+6,0),Po(t.dataArea,r.width+6,0)}else if("vertical"===n.orientation){let i=e.dataAreaSize.width/2;r.width>e.dataAreaSize.width&&(Oo(t.svg,r.width-e.dataAreaSize.width,0),Oo(t.graphArea,r.width-e.dataAreaSize.width,0),Po(t.dataArea,r.width/2-e.dataAreaSize.width/2,0),i=r.width/2);let a=parseFloat(t.axis.attr("width")),l=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",i+a).attr("y",r.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=l,Oo(t.svg,0,r.height+6),Oo(t.graphArea,0,r.height+6),Po(t.dataArea,0,r.height+6)}}if(n.valueUnit){let r=Vo(n.valueUnit,"tracker-tick-label");if("horizontal"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",-1*(r.width+6)).attr("y",e.dataAreaSize.height+6).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i}else if("vertical"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",e.dataAreaSize.width/2-r.width/2).attr("y",-(r.height/2+6)).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i,Oo(t.svg,0,r.height+6),Oo(t.graphArea,0,r.height+6),Po(t.dataArea,0,r.height+6)}}}(i,e,n),function(t,e,n,r){if(!e||!n)return;let i=t.scale,a=n.range,l=n.rangeColor,o=[],s=0;for(let t=0;t=e&&(n=r=e):(n>e&&(n=e),ro)&&(o=e.getYMax()),u=e.valueType===eo.Time,null===s)s=u;else if(u!==s)return"Not all values in time format"}let f=null;"left"===r?f=n.yMin[0]:"right"===r&&(f=n.yMin[1]);let c=!1;"number"!=typeof f?f=l:c=!0;let h=null;"left"===r?h=n.yMax[0]:"right"===r&&(h=n.yMax[1]);let d=!1;if("number"!=typeof h?h=o:d=!0,h0&&(g=0));let v=[g,p];("left"===r&&n.reverseYAxis[0]||"right"===r&&n.reverseYAxis[1])&&(v=[p,g]),m.domain(v).range([e.dataAreaSize.height,0]),"left"===r?t.leftYScale=m:"right"===r&&(t.rightYScale=m);let x="";"left"===r?x=n.yAxisColor[0]:"right"===r&&(x=n.yAxisColor[1]);let A="";"left"===r?A=n.yAxisLabelColor[0]:"right"===r&&(A=n.yAxisLabelColor[1]);let w="";"left"===r?w=n.yAxisLabel[0]:"right"===r&&(w=n.yAxisLabel[1]);let D="",k=null,C=null;"left"===r?(D=n.yAxisUnit[0],k=n.yAxisTickInterval[0],C=n.yAxisTickLabelFormat[0]):"right"===r&&(D=n.yAxisUnit[1],k=n.yAxisTickInterval[1],C=n.yAxisTickLabelFormat[1]);let T,_=null;if(u?_=To(k):(_=parseFloat(k),Number.isNumber(_)&&!Number.isNaN(_)||(_=null)),"left"===r?T=O(m):"right"===r&&(T=I(M,m)),T){let t=function(t,e,n,r=!1){if(r){if(n){function i(t){return window.moment("00:00","HH:mm",!0).add(t,"seconds").format(n)}return i}{function a(n){const r=Math.abs(e-t);let i=window.moment("00:00","HH:mm",!0).add(n,"seconds").format("HH:mm");return r>43200&&(ne||(n-t)/3600%2<1)&&(i=""),i}return a}}if(n){function l(t){return Xo.sprintf("%"+n,t)}return l}return oi(t,e,10)}(g,p,C,u);t&&T.tickFormat(t);let e=function(t,e,n,r=!1){const i=Math.abs(e-t);let a=[];r?a=n&&window.moment.isDuration(n)?b(t,e,Math.abs(n.asSeconds())):i>18e3?b(t=3600*Math.floor(t/3600),e=3600*Math.ceil(e/3600),3600):b(t=1800*Math.floor(t/1800),e=1800*Math.ceil(e/1800),1800):n&&"number"==typeof n&&(a=b(t,e,n));return 0===a.length?null:a}(g,p,_,u);e&&T.tickValues(e)}let E=t.dataArea.append("g").attr("id","yAxis").call(T).attr("class","tracker-axis");"right"==r&&E.attr("transform","translate("+e.dataAreaSize.width+" ,0)"),"left"===r?t.leftYAxis=E:"right"===r&&(t.rightYAxis=E);let F=E.selectAll("path");x&&F.style("stroke",x);let S=E.selectAll("line");x&&S.style("stroke",x);let B=E.selectAll("text").attr("class","tracker-tick-label");x&&B.style("fill",x);let N=0;for(let t of B)if(t.textContent){let e=Vo(t.textContent,"tracker-axis-label");e.width>N&&(N=e.width)}""!==D&&(w+=" ("+D+")");let L=Vo(w),V=E.append("text").text(w).attr("transform","rotate(-90)").attr("x",-1*e.dataAreaSize.height/2).attr("class","tracker-axis-label");"left"===r?V.attr("y",-6-N-L.height/2):V.attr("y",6+N+L.height),A&&V.style("fill",A);let P=L.height+N+6;E.attr("width",P),Oo(t.svg,P,0),Oo(t.graphArea,P,0),"left"===r&&(Po(t.dataArea,P,0),t.title&&Po(t.title,P,0))}function vs(t,e,n,r,i){if(!e||!n)return;let a=null;if("left"===i?a=t.leftYScale:"right"===i&&(a=t.rightYScale),n.showLine[r.getId()]){let e=function(t,e){var n=kl(!0),r=null,i=jl,a=null,l=Ol(o);function o(o){var s,u,f,c=(o=Xl(o)).length,h=!1;for(null==r&&(a=i(f=l())),s=0;s<=c;++s)!(s0&&(i.style("stroke",n.pointBorderColor[r.getId()]),i.style("stroke-width",n.pointBorderWidth[r.getId()]))),n.allowInspectData&&function(t,e,n){let r=e.dataArea.append("svg").style("opacity",0),i=r.append("rect").attr("x",0).attr("y",0),a=r.append("text"),l=a.append("tspan").attr("class","tracker-tooltip-label"),o=a.append("tspan").attr("class","tracker-tooltip-label"),s=3,u=3;t.on("mouseenter",(function(t){const[e,f]=function(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}(t);let c=0,h=0,d="date: "+ee(this).attr("date"),g=Vo(d,"tracker-tooltip-label");l.text(d),g.width>c&&(c=g.width),h+=g.height,l.attr("x",s).attr("y",h);let p="value: ",y=ee(this).attr("valueType"),m=ee(this).attr("value");if("Time"===y){p+=window.moment("00:00","HH:mm",!0).add(parseFloat(m),"seconds").format("HH:mm"),o.text(p)}else p+=m,o.text(p);let v=Vo(p,"tracker-tooltip-label");v.width>c&&(c=v.width),h+=u+v.height,o.attr("x",s).attr("y",h),c+=2*s,h+=2*u,a.attr("width",c).attr("height",h),i.attr("width",c).attr("height",h).attr("class","tracker-tooltip");let x=e,A=f,w=12,b=12;x=e+w+c>n.dataAreaSize.width?e-c-w:e+w,A=f-b-h<0?f+b:f-b-h,r.attr("x",x).attr("y",A),r.transition().duration(200).style("opacity",1)})).on("mouseleave",(function(){r.transition().duration(500).style("opacity",0)}))}(i,t,e)}}function As(t,e,n,r,i,a,l){if(!e||!n)return;let o=e.dataAreaSize.width/r.getLength(),s=o,u=a,f=l;o-1>0&&(s=o-1),e.stack?(u=0,f=1):s/=l;let c=null;"left"===i?c=t.leftYScale:"right"===i&&(c=t.rightYScale);let h=t.dataArea.selectAll("bar").data(Array.from(r).filter((function(t){return null!==t.value}))).enter().append("rect").attr("x",(function(e,n){if(0===n){let n=u+1-f/2;if(n<1)return t.xScale(e.date)-o/2+u*s+n*s}return t.xScale(e.date)-o/2+u*s})).attr("y",(function(t){return c(Math.max(t.value,0))})).attr("width",(function(t,e){if(0===e){let t=u+1-f/2;return t<0?0:t<1?s*t:s}if(e===r.getLength()-1){let t=1-(u+1-f/2);return t<0?0:t<1?s*t:s}return s})).attr("height",(function(t){if(null!==t.value)return Math.abs(c(t.value)-c(0))})).attr("class","tracker-bar");n.barColor[r.getId()]&&h.style("fill",n.barColor[r.getId()])}function ws(t,e,n){let r=t.svg;t.graphArea;let i=t.dataArea,a=t.title,l=t.xAxis,o=t.leftYAxis,s=t.rightYAxis,u=0;a&&(u=parseFloat(a.attr("height")));let f=parseFloat(l.attr("height")),c=0;o&&(c=parseFloat(o.attr("width")));let h=0;s&&(h=parseFloat(s.attr("width")));let d=e.datasets,g=d.getXDatasetIds(),p=d.getNames(),y=p.map((function(t){return Vo(t,"tracker-legend-label")})),m=0,v=0;for(let t=0;tv&&(v=y[t].width,m=t);let x=v/p[m].length,A=y[m].height,w=p.length-g.length,b=2*x,k=A,C=2*x,M=0,T=0;"vertical"===n.legendOrientation?(M=3*b+C+v,T=(w+1)*k):"horizontal"===n.legendOrientation&&(M=(2*b+C)*w+b+D(y,(function(t,e){return g.includes(e)?0:t.width})),T=k+A);let _=0,E=0;if("top"===n.legendPosition)_=c+e.dataAreaSize.width/2-M/2,E=u,Oo(r,0,T+k),Po(i,0,T+k);else if("bottom"===n.legendPosition)_=c+e.dataAreaSize.width/2-M/2,E=u+e.dataAreaSize.height+f+k,Oo(r,0,T+k);else if("left"===n.legendPosition)_=0,E=u+e.dataAreaSize.height/2-T/2,Oo(r,M+b,0),Po(i,M+b,0);else{if("right"!==n.legendPosition)return;_=e.dataAreaSize.width+c+h+b,E=u+e.dataAreaSize.height/2-T/2,Oo(r,M+b,0)}let F=t.graphArea.append("g").attr("id","legend").attr("transform","translate("+_+","+E+")"),S=F.append("rect").attr("class","tracker-legend").attr("width",M).attr("height",T);n.legendBgColor&&S.style("fill",n.legendBgColor),n.legendBorderColor&&S.style("stroke",n.legendBorderColor);let B=b,N=A,L=B+b+C,I=N;if("vertical"===n.legendOrientation){n.GetGraphType()===to.Line?(F.selectAll("markers").data(p).enter().append("line").attr("x1",B).attr("x2",B+C).attr("y1",(function(t,e){let n=g.filter((t=>ttttt!g.includes(e)))).enter().append("rect").attr("x",(function(t,e){let n=b;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t=0;t--){if(l.includes(t))continue;let e=n.yAxisLocation[t];"left"===e.toLowerCase()?i.push(t):"right"===e.toLocaleLowerCase()&&a.push(t)}else for(let t=0;ta.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n0&&(s=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){l="Invalid inputs for "+t;break}a[n]=null!==s?s:r}else{if("boolean"!=typeof i){l="Invalid inputs for "+t;break}a[n]=i,o++}}else{let t=e[e.length-1];a[n]=o>0?t:r}}}else if("string"==typeof e){let i=Ss(e);if(i.length>1){if(i.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let e=0;e0&&(s=Ts(i[e-1].trim())),""===n)a[e]=null!==s?s:r;else{let r=Ts(n);if(null===r){l="Invalid inputs for "+t;break}a[e]=r,o++}}else{let t=Ts(i[i.length-1].trim());a[e]=o>0&&null!==t?t:r}}else if(""===e);else{let n=Ts(e);if(null!==n){a[0]=n,o++;for(let t=1;ta.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n0&&(s=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){l="Invalid inputs for "+t;break}a[n]=null!==s?s:r}else{if("number"!=typeof i){l="Invalid inputs for "+t;break}a[n]=i,o++}}else{let t=e[e.length-1];a[n]=o>0?t:r}}}else if("string"==typeof e){let i=Ss(e);if(i.length>1){if(i.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let n=0;n0&&(s=Io(i[n-1].trim()).value),""===e)null!==s&&Number.isNumber(s)?a[n]=s:a[n]=r;else{let r=Io(e).value;if(null===r){l="Invalid inputs for "+t;break}a[n]=r,o++}}else{let t=Io(i[e.length-1].trim()).value;a[n]=o>0&&null!==t?t:r}}else if(""===e);else{let n=Io(e).value;if(null!==n){a[0]=n,o++;for(let t=1;tl.length;)l.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return o="Too many inputs for parameter '"+t+"'",o;if(0===e.length)return o="Empty array not allowd for "+t,o;for(let n=0;n0&&(u=e[n-1].trim()),"string"!=typeof a){o="Invalid inputs for "+t;break}if(a=a.trim(),""===a)l[n]=null!==u?u:r;else if(i){if(!i(a)){o="Invalid inputs for "+t;break}l[n]=a,s++}else l[n]=a,s++}else{let t=e[e.length-1].trim();l[n]=s>0?t:r}}}else if("string"==typeof e){let a=Ss(e);if(a.length>1){if(a.length>n)return o="Too many inputs for parameter '"+t+"'",o;for(let e=0;e0&&(u=a[e-1].trim()),""===n)l[e]=null!==u?u:r;else if(i){if(!i(n)){o="Invalid inputs for "+t;break}l[e]=n,s++}else l[e]=n,s++}else{let t=a[a.length-1].trim();l[e]=s>0?t:r}}else if(""===e);else if(i)if(i(e)){l[0]=e,s++;for(let t=1;t1)for(let e of r){let r=parseFloat(e.trim());if(Number.isNaN(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}else{if(""===e){return`Empty ${t} is not allowed.`}{let r=parseFloat(e);if(!Number.isNumber(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}}}else{if("number"!=typeof e){return`Invalid ${t}`}n.push(e)}return n}function Os(t,e){let n=[];if(null==e)return n;if("object"==typeof e){if(Array.isArray(e))for(let t of e)"string"==typeof t&&n.push(t.trim())}else{if("string"!=typeof e){return`Invalid ${t}`}{let r=Ss(e);if(r.length>1)for(let t of r)n.push(t.trim());else{if(""===e){return`Empty ${t} is not allowed.`}n.push(e)}}}for(let t=0;t2)return"yAxisLabel accepts not more than two values for left and right y-axes";e.yAxisLabel=n;let r=Is("yAxisColor",null==t?void 0:t.yAxisColor,2,"",Fs,!0);if("string"==typeof r)return r;if(r.length>2)return"yAxisColor accepts not more than two values for left and right y-axes";e.yAxisColor=r;let i=Is("yAxisLabelColor",null==t?void 0:t.yAxisLabelColor,2,"",Fs,!0);if("string"==typeof i)return i;if(i.length>2)return"yAxisLabelColor accepts not more than two values for left and right y-axes";e.yAxisLabelColor=i;let a=Is("yAxisUnit",null==t?void 0:t.yAxisUnit,2,"",null,!0);if("string"==typeof a)return a;if(a.length>2)return"yAxisUnit accepts not more than two values for left and right y-axes";e.yAxisUnit=a,e.xAxisTickInterval=Ls(null==t?void 0:t.xAxisTickInterval,e.xAxisTickInterval);let l=Is("yAxisTickInterval",null==t?void 0:t.yAxisTickInterval,2,null,null,!0);if("string"==typeof l)return l;if(l.length>2)return"yAxisTickInterval accepts not more than two values for left and right y-axes";e.yAxisTickInterval=l,e.xAxisTickLabelFormat=Ls(null==t?void 0:t.xAxisTickLabelFormat,e.xAxisTickLabelFormat);let o=Is("yAxisTickLabelFormat",null==t?void 0:t.yAxisTickLabelFormat,2,null,null,!0);if("string"==typeof o)return o;if(o.length>2)return"yAxisTickLabelFormat accepts not more than two values for left and right y-axes";e.yAxisTickLabelFormat=o;let s=Ns("yMin",null==t?void 0:t.yMin,2,null);if("string"==typeof s)return s;if(s.length>2)return"yMin accepts not more than two values for left and right y-axes";e.yMin=s;let u=Ns("yMax",null==t?void 0:t.yMax,2,null);if("string"==typeof u)return u;if(u.length>2)return"yMax accepts not more than two values for left and right y-axes";e.yMax=u;let f=Bs("reverseYAxis",null==t?void 0:t.reverseYAxis,2,!1);return"string"==typeof f?f:f.length>2?"reverseYAxis accepts not more than two values for left and right y-axes":void(e.reverseYAxis=f)}function $s(t){let e=[];if(null!==t){const n=Object.keys(t);for(let t of n)e.push(t.toString())}return e}function Ys(t,e){return Co(ko(t.basename,e.dateFormatPrefix,e.dateFormatSuffix),e.dateFormat)}function Rs(t,e,n){let r=window.moment(""),i=t.frontmatter;if(i&&Bo(i,e.getTarget())){let t=Bo(i,e.getTarget());"string"==typeof t&&(t=ko(t,n.dateFormatPrefix,n.dateFormatSuffix),r=Co(t,n.dateFormat))}return r}function zs(t,e,n){let r,i=window.moment(""),a=new RegExp(e,"gm");for(;r=a.exec(t);)if(void 0!==r.groups&&void 0!==r.groups.value){let t=r.groups.value.trim();if(t=ko(t,n.dateFormatPrefix,n.dateFormatSuffix),i=Co(t,n.dateFormat),i.isValid())return i}return i}function Us(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),zs(t,"(^|\\s)#"+r+"(\\/[\\w-]+)*(:(?[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",n)}function Hs(t,e,n){return window.moment(""),zs(t,e.getTarget(),n)}function Xs(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),r=r.replace("-","[\\s\\-]"),zs(t,"(^| |\\t)\\*{0,2}"+r+"\\*{0,2}(::[ |\\t]*(?[\\d\\.\\/\\-\\w,@; \\t:]*))(\\r\\?\\n|\\r|$)",n)}function Ws(e,n,r){let i=window.moment("");if(e&&e instanceof t.TFile){let t=n.getTarget();if("cDate"===t){i=Fo(e.stat.ctime,r.dateFormat)}else if("mDate"===t){i=Fo(e.stat.mtime,r.dateFormat)}else"name"===t&&(i=Ys(e,r))}return i}function js(t,e,n){window.moment("");let r=e.getType(),i=e.getTarget();return i=r===Jl.Task?"\\[[\\sx]\\]\\s"+i:r===Jl.TaskDone?"\\[x\\]\\s"+i:r===Jl.TaskNotDone?"\\[\\s\\]\\s"+i:"\\[[\\sx]\\]\\s"+i,zs(t,i,n)}function qs(t,e,n,r){if(t.has(e)){t.get(e).push({query:n,value:r})}else{let i=new Array;i.push({query:n,value:r}),t.set(e,i)}}function Gs(t,e,n,r,i,a){let l,o=new RegExp(e,"gmu"),s=0,u=!1;for(;l=o.exec(t);)if(a.ignoreAttachedValue[n.getId()])s+=a.constValue[n.getId()],u=!0,n.addNumTargets();else if(void 0!==l.groups&&void 0!==l.groups.value){let t=l.groups.value.trim().split(n.getSeparator());if(!t)continue;if(1===t.length){let e=Io(t[0].trim(),a.textValueMap);null!==e.value&&(e.type===eo.Time?(s=e.value,u=!0,n.valueType=eo.Time,n.addNumTargets()):a.ignoreZeroValue[n.getId()]&&0===e.value||(s+=e.value,u=!0,n.addNumTargets()))}else if(t.length>n.getAccessor()&&n.getAccessor()>=0){let e=Io(t[n.getAccessor()].trim(),a.textValueMap);null!==e.value&&(e.type===eo.Time?(s=e.value,u=!0,n.valueType=eo.Time,n.addNumTargets()):(s+=e.value,u=!0,n.addNumTargets()))}}else s+=a.constValue[n.getId()],u=!0,n.addNumTargets();if(u){return qs(r,i.get(a.xDataset[n.getId()]),n,s),!0}return!1}function Qs(e,n,r,i,a,l){if(e&&e instanceof t.TFile){let t=r.getTarget(),o=l.get(i.xDataset[r.getId()]);if("cDate"===t){let t=e.stat.ctime;return r.valueType=eo.Date,r.addNumTargets(),qs(a,o,r,t),!0}if("mDate"===t){let t=e.stat.mtime;return r.valueType=eo.Date,r.addNumTargets(),qs(a,o,r,t),!0}if("size"===t){let t=e.stat.size;return r.addNumTargets(),qs(a,o,r,t),!0}if("numWords"===t){return qs(a,o,r,function(t){t=$o(t);var e=new RegExp(["(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-"+/A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source+"])+",/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source].join("|"),"g");return(t.match(e)||[]).length}(n)),!0}if("numChars"===t){let t=n.length;return r.addNumTargets(),qs(a,o,r,t),!0}if("numSentences"===t){let t=function(t){return(((t=$o(t))||"").match(/[^.。!!??\s][^.。!!??]*(?:[.!?](?!['‘’"“”「」『』]?\s|$)[^.。!!??]*)*[.。!!??]?['’"”」』]?(?=\s||$)/gm)||[]).length}(n);return r.addNumTargets(),qs(a,o,r,t),!0}if("name"===t){let t=0,n=!1,l=Io(e.basename,i.textValueMap);null!==l.value&&(l.type===eo.Time?(t=l.value,n=!0,r.valueType=eo.Time,r.addNumTargets()):i.ignoreZeroValue[r.getId()]&&0===l.value||(t+=l.value,n=!0,r.addNumTargets()));let s=null;if(n&&(s=t),null!==s)return qs(a,o,r,s),!0}}return!1}const Zs={folder:"/",dateFormat:"YYYY-MM-DD"};class Ks extends t.PluginSettingTab{constructor(t,e){super(t,e),this.plugin=e}display(){let{containerEl:n}=this;n.empty(),new t.Setting(n).setName("Default folder location").setDesc("Files in this folder will be parsed and used as input data of the tracker plugin.\nYou can also override it using 'folder' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("Folder Path").setValue(this.plugin.settings.folder).onChange((t=>e(this,void 0,void 0,(function*(){this.plugin.settings.folder=t,yield this.plugin.saveSettings()})))))),new t.Setting(n).setName("Default date format").setDesc("This format is used to parse the date in your diary title.\nYou can also override it using 'dateFormat' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("YYYY-MM-DD").setValue(this.plugin.settings.dateFormat).onChange((t=>e(this,void 0,void 0,(function*(){this.plugin.settings.dateFormat=t,yield this.plugin.saveSettings()}))))))}}class Js extends t.Plugin{onload(){return e(this,void 0,void 0,(function*(){console.log("loading obsidian-tracker plugin"),yield this.loadSettings(),this.addSettingTab(new Ks(this.app,this)),this.registerMarkdownCodeBlockProcessor("tracker",this.postprocessor.bind(this)),this.addCommand({id:"add-line-chart-tracker",name:"Add Line Chart Tracker",callback:()=>this.addCodeBlock(to.Line)}),this.addCommand({id:"add-bar-chart-tracker",name:"Add Bar Chart Tracker",callback:()=>this.addCodeBlock(to.Bar)}),this.addCommand({id:"add-summary-tracker",name:"Add Summary Tracker",callback:()=>this.addCodeBlock(to.Summary)})}))}loadSettings(){return e(this,void 0,void 0,(function*(){this.settings=Object.assign({},Zs,yield this.loadData())}))}saveSettings(){return e(this,void 0,void 0,(function*(){yield this.saveData(this.settings)}))}renderErrorMessage(t,e,n){!function(t,e){ee(t).select("#svg").remove(),ee(t).append("div").text(e).style("background-color","white").style("margin-bottom","20px").style("padding","10px").style("color","red")}(e,t),n.appendChild(e)}onunload(){console.log("unloading obsidian-tracker plugin")}getFilesInFolder(e,n=!0){let r=[];for(let i of e.children)i instanceof t.TFile?"md"===i.extension&&r.push(i):i instanceof t.TFolder&&n&&(r=r.concat(this.getFilesInFolder(i)));return r}getFiles(n,r){return e(this,arguments,void 0,(function*(e,n,r=!0){if(!e)return;let i=n.folder,a=n.specifiedFilesOnly,l=n.file,o=n.fileContainsLinkedFiles,s=n.fileMultiplierAfterLink;if(!a){let n=this.app.vault.getAbstractFileByPath(t.normalizePath(i));if(n&&n instanceof t.TFolder){let t=this.getFilesInFolder(n);for(let n of t)e.push(n)}}for(let n of l){let r=n;r.endsWith(".md")||(r+=".md"),r=t.normalizePath(r);let i=this.app.vault.getAbstractFileByPath(r);i&&i instanceof t.TFile&&e.push(i)}let u=1,f=!0;""===s?f=!1:/^[0-9]+$/.test(s)?(u=parseFloat(s),f=!1):/\?/.test(s)||(f=!1);for(let r of o){r.endsWith(".md")||(r+=".md");let i=this.app.vault.getAbstractFileByPath(t.normalizePath(r));if(i&&i instanceof t.TFile){let a=this.app.metadataCache.getFileCache(i),l=(yield this.app.vault.adapter.read(i.path)).split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/);if(!(null==a?void 0:a.links))continue;for(let i of a.links){if(!i)continue;let a=this.app.metadataCache.getFirstLinkpathDest(i.link,r);if(a&&a instanceof t.TFile){if(f){let t=i.position.end.line;if(t>=0&&t1)for(let e of t){if(e=e.trim(),""===e){a="Empty search target is not allowed.";break}l.push(e)}else""===r.searchTarget?a="Empty search target is not allowed.":l.push(r.searchTarget)}else a="Invalid search target (searchTarget)";for(let t=0;tt!==Jl.Table)).length>0)return"searchType 'table' doestn't work with other types for now";let f=[],c=Is("separator",r.separator,o,"",null,!0);if("string"==typeof c)return c;f=c.map((t=>"comma"===t||"\\,"===t?",":t));let h=Ns("xDataset",r.xDataset,o,-1);if("string"==typeof h)return h;let d=h.map((t=>t<0||t>=o?-1:t)),g=[];for(let t=0;tt.getId()===e)))return a="Duplicated dataset id for key '"+t+"'",a;C.push(t),m.push(t)}for(let t of i)if(!y.includes(t)&&!m.includes(t))return a="'"+t+"' is not an available key",a;if(0===v.length+x.length+A.length+w.length+k.length+b.length+D.length)return"No output parameter provided, please place line, bar, pie, month, bullet, or summary.";p.folder=Ls(null==r?void 0:r.folder,n.settings.folder),""===p.folder.trim()&&(p.folder=n.settings.folder);let M=n.app.vault.getAbstractFileByPath(t.normalizePath(p.folder));if(!(M&&M instanceof t.TFolder))return"Folder '"+p.folder+"' doesn't exist";if("string"==typeof r.file){let t=Os("file",r.file);if("string"==typeof t)return t;p.file=t}if("boolean"==typeof r.specifiedFilesOnly&&(p.specifiedFilesOnly=r.specifiedFilesOnly),"string"==typeof r.fileContainsLinkedFiles){let t=Os("fileContainsLinkedFiles",r.fileContainsLinkedFiles);if("string"==typeof t)return t;p.fileContainsLinkedFiles=t}p.fileMultiplierAfterLink=Ls(null==r?void 0:r.fileMultiplierAfterLink,p.fileMultiplierAfterLink);const T=r.dateFormat;if("string"==typeof r.dateFormat?""===r.dateFormat?p.dateFormat=n.settings.dateFormat:p.dateFormat=T:p.dateFormat=n.settings.dateFormat,p.dateFormatPrefix=Ls(null==r?void 0:r.dateFormatPrefix,p.dateFormatPrefix),p.dateFormatSuffix=Ls(null==r?void 0:r.dateFormatSuffix,p.dateFormatSuffix),"string"==typeof r.startDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.startDate))return"'m' for 'minute' is too small for parameter startDate, please use 'd' for 'day' or 'M' for month";let t=ko(r.startDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=_o(t,p.dateFormat),e?n=!0:(e=Co(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid startDate, the format of startDate may not match your dateFormat "+p.dateFormat;p.startDate=e}if("string"==typeof r.endDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.endDate))return"'m' for 'minute' is too small for parameter endDate, please use 'd' for 'day' or 'M' for month";let t=ko(r.endDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=_o(t,p.dateFormat),e?n=!0:(e=Co(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid endDate, the format of endDate may not match your dateFormat "+p.dateFormat;p.endDate=e}if(null!==p.startDate&&p.startDate.isValid()&&null!==p.endDate&&p.endDate.isValid()&&p.endDateparseInt(t,10))),2==e.length&&(p.aspectRatio=new vo(e[0],e[1]),p.dataAreaSize=p.aspectRatio.recalculateSize(p.dataAreaSize))}let O=Ns("margin",r.margin,4,10);if("string"==typeof O)return O;if(O.length>4)return"margin accepts not more than four values for top, right, bottom, and left margins.";p.margin=new xo(O[0],O[1],O[2],O[3]);for(let t of C){let e=new oo,n=r[t],i=$s(e),l=$s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let o=-1,s=t.replace("dataset","");o=""===s?0:parseFloat(s),e.id=o,e.name=Ls(null==n?void 0:n.name,e.name);let u=Os("xData",null==n?void 0:n.xData);if("string"==typeof u)return u;e.xData=u;let f=e.xData.length,c=Os("yData",null==n?void 0:n.yData);if("string"==typeof c)return c;if(e.yData=c,e.yData.length!==f)return"Number of elements in xData and yData not matched";p.customDataset.push(e)}for(let t of v){let e=new uo,n=r[t],i=$s(e),l=$s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let s=Ps(n,e);if("string"==typeof s)return s;let u=Is("lineColor",null==n?void 0:n.lineColor,o,"",Fs,!0);if("string"==typeof u)return u;e.lineColor=u;let f=Ns("lineWidth",null==n?void 0:n.lineWidth,o,1.5);if("string"==typeof f)return f;e.lineWidth=f;let c=Bs("showLine",null==n?void 0:n.showLine,o,!0);if("string"==typeof c)return c;e.showLine=c;let h=Bs("showPoint",null==n?void 0:n.showPoint,o,!0);if("string"==typeof h)return h;e.showPoint=h;let d=Is("pointColor",null==n?void 0:n.pointColor,o,"#69b3a2",Fs,!0);if("string"==typeof d)return d;e.pointColor=d;let g=Is("pointBorderColor",null==n?void 0:n.pointBorderColor,o,"#69b3a2",Fs,!0);if("string"==typeof g)return g;e.pointBorderColor=g;let y=Ns("pointBorderWidth",null==n?void 0:n.pointBorderWidth,o,0);if("string"==typeof y)return y;e.pointBorderWidth=y;let m=Ns("pointSize",null==n?void 0:n.pointSize,o,3);if("string"==typeof m)return m;e.pointSize=m;let v=Bs("fillGap",null==n?void 0:n.fillGap,o,!1);if("string"==typeof v)return v;e.fillGap=v;let x=Is("yAxisLocation",null==n?void 0:n.yAxisLocation,o,"left",Es,!0);if("string"==typeof x)return x;e.yAxisLocation=x,p.line.push(e)}for(let t of x){let e=new fo,n=r[t],i=$s(e),l=$s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let s=Ps(n,e);if("string"==typeof s)return s;let u=Is("barColor",null==n?void 0:n.barColor,o,"",Fs,!0);if("string"==typeof u)return u;e.barColor=u;let f=Is("yAxisLocation",null==n?void 0:n.yAxisLocation,o,"left",Es,!0);if("string"==typeof f)return f;e.yAxisLocation=f,p.bar.push(e)}for(let t of A){let e=new co,n=r[t],i=$s(e),l=$s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.title=Ls(null==n?void 0:n.title,e.title);let o=Os("data",null==n?void 0:n.data);if("string"==typeof o)return o;e.data=o;let s=e.data.length,u=Is("dataColor",null==n?void 0:n.dataColor,s,null,Fs,!0);if("string"==typeof u)return u;e.dataColor=u;let f=Is("dataName",null==n?void 0:n.dataName,s,"",null,!0);if("string"==typeof f)return f;e.dataName=f;let c=Is("label",null==n?void 0:n.label,s,"",null,!0);if("string"==typeof c)return c;e.label=c,"number"==typeof(null==n?void 0:n.hideLabelLessThan)&&(e.hideLabelLessThan=n.hideLabelLessThan);let h=Is("extLabel",null==n?void 0:n.extLabel,s,"",null,!0);if("string"==typeof h)return h;e.extLabel=h,"boolean"==typeof(null==n?void 0:n.showExtLabelOnlyIfNoLabel)&&(e.showExtLabelOnlyIfNoLabel=n.showExtLabelOnlyIfNoLabel),"number"==typeof(null==n?void 0:n.ratioInnerRadius)&&(e.ratioInnerRadius=n.ratioInnerRadius),"boolean"==typeof(null==n?void 0:n.showLegend)&&(e.showLegend=n.showLegend),e.legendPosition=Ls(null==n?void 0:n.legendPosition,"right");let d="horizontal";d="top"===e.legendPosition||"bottom"===e.legendPosition?"horizontal":"left"===e.legendPosition||"right"===e.legendPosition?"vertical":"horizontal",e.legendOrientation=Ls(null==n?void 0:n.legendOrientation,d),e.legendBgColor=Ls(null==n?void 0:n.legendBgColor,e.legendBgColor),e.legendBorderColor=Ls(null==n?void 0:n.legendBorderColor,e.legendBorderColor),p.pie.push(e)}for(let t of w){let e=new ho,n=r[t],i=$s(e),l=$s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.template=Ls(null==n?void 0:n.template,e.template),e.style=Ls(null==n?void 0:n.style,e.style),p.summary.push(e)}for(let t of b){let e=new go,n=r[t],i=$s(e),l=$s(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.mode=Ls(null==n?void 0:n.mode,e.mode);let o=Vs("dataset",null==n?void 0:n.dataset);if("string"==typeof o)return o;if(0===o.length)for(let t of g)o.push(t.getId());e.dataset=o;let s=e.dataset.length;e.startWeekOn=Ls(null==n?void 0:n.startWeekOn,e.startWeekOn),"boolean"==typeof(null==n?void 0:n.showCircle)&&(e.showCircle=n.showCircle);let u=Vs("threshold",null==n?void 0:n.threshold);if("string"==typeof u)return u;if(e.threshold=u,0===e.threshold.length)for(let t=0;t1))return a="Empty range is not allowed",a;{let t=s[0];if(t<0)return a="Negative range value is not allowed",a;for(let e=1;ee(this,void 0,void 0,(function*(){let n=null;u.queries.some((t=>{let e=t.getType();return t.getTarget(),e===Jl.Frontmatter||e===Jl.Tag||e===Jl.Wiki||e===Jl.WikiLink||e===Jl.WikiDisplay}))&&(n=this.app.metadataCache.getFileCache(t));let r=null;u.queries.some((t=>{let e=t.getType(),n=t.getTarget();return e===Jl.Tag||e===Jl.Text||e===Jl.dvField||e===Jl.Task||e===Jl.TaskDone||e===Jl.TaskNotDone||e===Jl.FileMeta&&("numWords"===n||"numChars"===n||"numSentences"===n)}))&&(r=yield this.app.vault.adapter.read(t.path));let i=new Map,a=!1;for(let e of u.xDataset)if(!i.has(e)){let l=window.moment("");if(-1===e)l=Ys(t,u);else{let i=u.queries[e];switch(i.getType()){case Jl.Frontmatter:l=Rs(n,i,u);break;case Jl.Tag:l=Us(r,i,u);break;case Jl.Text:l=Hs(r,i,u);break;case Jl.dvField:l=Xs(r,i,u);break;case Jl.FileMeta:l=Ws(t,i,u);break;case Jl.Task:case Jl.TaskDone:case Jl.TaskNotDone:l=js(r,i,u)}}l.isValid()?(null!==u.startDate&&lu.endDate&&(a=!0,h.fileOutOfDateRange++)):(a=!0,h.fileNotInFormat++),a||(h.gotAnyValidXValue||(h.gotAnyValidXValue=!0),i.set(e,Eo(l,u.dateFormat)),h.fileAvailable++,1==h.fileAvailable?(h.minDate=l.clone(),h.maxDate=l.clone()):(lh.maxDate&&(h.maxDate=l.clone())))}if(a)return;const l=u.queries.filter((t=>t.getType()!==Jl.Table&&!t.usedAsXDataset)).map((a=>e(this,void 0,void 0,(function*(){if(n&&a.getType()===Jl.Tag){let t=function(t,e,n,r,i){let a=t.frontmatter,l=[];if(a&&a.tags){let t=0,o=!1;if(Array.isArray(a.tags))l=l.concat(a.tags);else if("string"==typeof a.tags){let t=a.tags.split(e.getSeparator(!0));for(let e of t){let t=e.trim();""!==t&&l.push(t)}}for(let a of l){if(a===e.getTarget())t+=n.constValue[e.getId()],o=!0,e.addNumTargets();else{if(!a.startsWith(e.getTarget()+"/"))continue;t+=n.constValue[e.getId()],o=!0,e.addNumTargets()}let l=null;return o&&(l=t),qs(r,i.get(n.xDataset[e.getId()]),e,l),!0}}return!1}(n,a,u,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&a.getType()===Jl.Frontmatter&&"tags"!==a.getTarget()){let t=function(t,e,n,r,i){let a=t.frontmatter;if(a){let t=Bo(a,e.getTarget());if(t){let a=Io(t,n.textValueMap);if(null===a.value&&("true"!==t&&"false"!==t||(a.type=eo.Number,a.value="true"===t?1:0)),null!==a.value)return a.type===eo.Time&&(e.valueType=eo.Time),e.addNumTargets(),qs(r,i.get(n.xDataset[e.getId()]),e,a.value),!0}else if(e.getParentTarget()&&Bo(a,e.getParentTarget())){let t=Bo(a,e.getParentTarget()),l=null;if(Array.isArray(t)?l=t.map((t=>t.toString())):"string"==typeof t&&(l=t.split(e.getSeparator())),l&&l.length>e.getAccessor()&&e.getAccessor()>=0){let t=Io(l[e.getAccessor()].trim(),n.textValueMap);if(null!==t.value)return t.type===eo.Time&&(e.valueType=eo.Time),e.addNumTargets(),qs(r,i.get(n.xDataset[e.getId()]),e,t.value),!0}}}return!1}(n,a,u,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&(a.getType()===Jl.Wiki||a.getType()===Jl.WikiLink||a.getType()===Jl.WikiDisplay)){let t=function(t,e,n,r,i){let a=t.links;if(!a)return!1;let l=e.getTarget(),o=e.getType(),s="",u=l;for(let t of a){if(!t)continue;let e="";o===Jl.Wiki?e=t.displayText?t.displayText:t.link:o===Jl.WikiLink?e=t.link:o===Jl.WikiDisplay?t.displayText&&(e=t.displayText):e=t.displayText?t.displayText:t.link,e=e.trim(),s+=e+"\n"}return Gs(s,u,e,r,i,n)}(n,a,u,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(r&&a.getType()===Jl.Tag){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a.length>1&&a.startsWith("#")&&(a=a.substring(1)),Gs(t,"(^|\\s)#"+a+"(\\/[\\w-]+)*(:(?[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",e,r,i,n)}(r,a,u,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(r&&a.getType()===Jl.Text){let t=function(t,e,n,r,i){return Gs(t,e.getTarget(),e,r,i,n)}(r,a,u,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(a.getType()===Jl.FileMeta){let e=Qs(t,r,a,u,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=e)}if(r&&a.getType()===Jl.dvField){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a=a.replace("-","[\\s\\-]"),Gs(t,String.raw`(^| |\t|\|)(\[|\()?\*{0,2}`+a+String.raw`\*{0,2}(::[ |\t]*(?[\p{ExtPict}\d\.\/\-\w,@; \t:`+"\\w$€£¥¢₹₨₱₩฿₫₪α-ωΑ-Ω©®℗™℠一-鿿㐀-䶿 、-〿"+String.raw`]*)(\]|\))?)`,e,r,i,n)}(r,a,u,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(r&&(a.getType()===Jl.Task||a.getType()===Jl.TaskDone||a.getType()===Jl.TaskNotDone)){let t=function(t,e,n,r,i){let a=e.getType(),l=e.getTarget();return l=a===Jl.Task?"\\[[\\sx]\\]\\s"+l:a===Jl.TaskDone?"\\[x\\]\\s"+l:a===Jl.TaskNotDone?"\\[\\s\\]\\s"+l:"\\[[\\sx]\\]\\s"+l,Gs(t,l,e,r,i,n)}(r,a,u,c,i);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}}))));yield Promise.all(l)}))));if(yield Promise.all(d),yield this.collectDataFromTable(c,u,h),h.errorMessage)return this.renderErrorMessage(h.errorMessage,i,r);let g="";if(h.minDate.isValid()&&h.maxDate.isValid()&&0!==h.fileAvailable&&h.gotAnyValidXValue||(g="No valid date as X value found in notes",h.fileOutOfDateRange>0&&(g+=`\n${h.fileOutOfDateRange} files are out of the date range.`),h.fileNotInFormat&&(g+=`\n${h.fileNotInFormat} files are not in the right format.`)),null===u.startDate&&null===u.endDate?(u.startDate=h.minDate.clone(),u.endDate=h.maxDate.clone()):null!==u.startDate&&null===u.endDate?u.startDateh.minDate?u.startDate=h.minDate.clone():g="Invalid date range":(u.startDateh.maxDate&&u.endDate>h.maxDate)&&(g="Invalid date range"),g)return this.renderErrorMessage(g,i,r);if(!h.gotAnyValidYValue)return this.renderErrorMessage("No valid Y value found in notes",i,r);let p=new ao(u.startDate,u.endDate);for(let t of u.queries){let e=p.createDataset(t,u);e.addNumTargets(t.getNumTargets());for(let n=u.startDate.clone();n<=u.endDate;n.add(1,"days"))if(c.has(Eo(n,u.dateFormat))){let r=c.get(Eo(n,u.dateFormat)).filter((function(e){return e.query.equalTo(t)}));if(r.length>0){let t=null;for(let e=0;et.getType()===Jl.Table)),a=[],l=!1;for(let n of e){let e=n.getParentTarget(),r=this.app.vault.getAbstractFileByPath(t.normalizePath(e+".md"));if(!(r&&r instanceof t.TFile)){l=!0;break}let i=n.getAccessor(),o=n.usedAsXDataset,s=a.find((t=>t.filePath===e&&t.tableIndex===i));if(s)o?s.xDataset=n:s.yDatasets.push(n);else{let t=new wo(e,i);o?t.xDataset=n:t.yDatasets.push(n),a.push(t)}}if(l)i.errorMessage="File containing tables not found";else for(let e of a){let a=e.xDataset;if(!a)continue;let l=e.yDatasets,o=a.getParentTarget(),s=a.getAccessor(),u="";o+=".md";let f=this.app.vault.getAbstractFileByPath(t.normalizePath(o));if(!(f&&f instanceof t.TFile))continue;{i.fileAvailable++;let t,e=yield this.app.vault.adapter.read(f.path),n=new RegExp("((\\r?\\n){2}|^)([^\\r\\n]*\\|[^\\r\\n]*(\\r?\\n)?)+(?=(\\r?\\n){2}|$)","gm"),r=0;for(;t=n.exec(e);){if(r===s){u=t[0];break}r++}}let c=u.split(/\r?\n/);c=c.filter((t=>""!==t));let h=0,d=0;if(c.length>=2){let t=c.shift().trim();t=No(t,"|"),h=t.split("|").length;let e=c.shift().trim();e=No(e,"|");let n=e.split("|");for(let t of n)if(!t.includes("-"))break;d=c.length}if(0==d)continue;let g=a.getAccessor(1);if(g>=h)continue;let p=[];for(let t of c){let e=No(t.trim(),"|").split("|");if(gi.maxDate&&(i.maxDate=t.clone())):(i.minDate=t.clone(),i.maxDate=t.clone())):p.push(null)}else p.push(null)}if(p.every((t=>null===t)))return void(i.errorMessage="No valid date as X value found in table");i.gotAnyValidXValue||(i.gotAnyValidXValue=!0);for(let t of l){let e=t.getAccessor(1);if(e>=h)continue;let a=0;for(let l of c){let o=No(l.trim(),"|").split("|");if(et.getAccessor(2)&&t.getAccessor(2)>=0){let e=null,o=Io(l[t.getAccessor(2)].trim(),r.textValueMap);null!==o.value&&(o.type===eo.Time&&(t.valueType=eo.Time),e=o.value,ae?1:t>=e?0:NaN}function n(t,e){return null==t||null==e?NaN:et?1:e>=t?0:NaN}function r(t){let r,a,l;function o(t,e,n=0,i=t.length){if(n>>1;a(t[r],e)<0?n=r+1:i=r}while(ne(t(n),r),l=(e,n)=>t(e)-n):(r=t===e||t===n?t:i,a=t,l=t),{left:o,center:function(t,e,n=0,r=t.length){const i=o(t,e,n,r-1);return i>n&&l(t[i-1],e)>-l(t[i],e)?i-1:i},right:function(t,e,n=0,i=t.length){if(n>>1;a(t[r],e)<=0?n=r+1:i=r}while(n=t))-(null==e||!(e>=e))||(te?1:0)}const c=Math.sqrt(50),f=Math.sqrt(10),h=Math.sqrt(2);function d(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),l=a>=c?10:a>=f?5:a>=h?2:1;let o,s,u;return i<0?(u=Math.pow(10,-i)/l,o=Math.round(t*u),s=Math.round(e*u),o/ue&&--s,u=-u):(u=Math.pow(10,i)*l,o=Math.round(t/u),s=Math.round(e/u),o*ue&&--s),s=e)&&(n=e);return n}function m(t,e){let n;for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);return n}function v(t,n,r=0,i=1/0,a){if(n=Math.floor(n),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(t.length-1,i)),!(r<=n&&n<=i))return t;for(a=void 0===a?u:function(t=e){if(t===e)return u;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||0===r?r:(0===t(n,n))-(0===t(e,e))}}(a);i>r;){if(i-r>600){const e=i-r+1,l=n-r+1,o=Math.log(e),s=.5*Math.exp(2*o/3),u=.5*Math.sqrt(o*s*(e-s)/e)*(l-e/2<0?-1:1);v(t,n,Math.max(r,Math.floor(n-l*s/e+u)),Math.min(i,Math.floor(n+(e-l)*s/e+u)),a)}const e=t[n];let l=r,o=i;for(x(t,r,n),a(t[i],e)>0&&x(t,r,i);l0;)--o}0===a(t[r],e)?x(t,r,o):(++o,x(t,o,i)),o<=n&&(r=o+1),n<=o&&(i=o-1)}return t}function x(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function A(t,e){return function(t,e){if((n=(t=Float64Array.from(function*(t){for(let e of t)null!=e&&(e=+e)>=e&&(yield e)}(t))).length)&&!isNaN(e=+e)){if(e<=0||n<2)return m(t);if(e>=1)return y(t);var n,r=(n-1)*e,i=Math.floor(r),a=y(v(t,i).subarray(0,i+1));return a+(m(t.subarray(i+1))-a)*(r-i)}}(t,.5)}function w(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r+t(e)}function _(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function E(){return!this.__axis}function F(t,e){var n=[],r=null,i=null,a=6,l=6,o=3,s="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",f=1===t||3===t?C:M;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,g=null==i?e.tickFormat?e.tickFormat.apply(e,n):D:i,p=Math.max(a,0)+o,y=e.range(),m=+y[0]+s,v=+y[y.length-1]+s,x=(e.bandwidth?_:T)(e.copy(),s),A=h.selection?h.selection():h,w=A.selectAll(".domain").data([null]),b=A.selectAll(".tick").data(d,e).order(),C=b.exit(),M=b.enter().append("g").attr("class","tick"),F=b.select("line"),S=b.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(M),F=F.merge(M.append("line").attr("stroke","currentColor").attr(c+"2",u*a)),S=S.merge(M.append("text").attr("fill","currentColor").attr(c,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==A&&(w=w.transition(h),b=b.transition(h),F=F.transition(h),S=S.transition(h),C=C.transition(h).attr("opacity",k).attr("transform",(function(t){return isFinite(t=x(t))?f(t+s):this.getAttribute("transform")})),M.attr("opacity",k).attr("transform",(function(t){var e=this.parentNode.__axis;return f((e&&isFinite(e=e(t))?e:x(t))+s)}))),C.remove(),w.attr("d",4===t||2===t?l?"M"+u*l+","+m+"H"+s+"V"+v+"H"+u*l:"M"+s+","+m+"V"+v:l?"M"+m+","+u*l+"V"+s+"H"+v+"V"+u*l:"M"+m+","+s+"H"+v),b.attr("opacity",1).attr("transform",(function(t){return f(x(t)+s)})),F.attr(c+"2",u*a),S.attr(c,u*p).text(g),A.filter(E).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),A.each((function(){this.__axis=x}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=l=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(l=+t,h):l},h.tickPadding=function(t){return arguments.length?(o=+t,h):o},h.offset=function(t){return arguments.length?(s=+t,h):s},h}function S(t){return F(3,t)}function B(t){return F(4,t)}var N={value:()=>{}};function L(){for(var t,e=0,n=arguments.length,r={};e=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),l=-1,o=a.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++l0)for(var n,r,i=new Array(n),a=0;a=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),$.hasOwnProperty(e)?{space:$[e],local:t}:t}function R(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===P&&e.documentElement.namespaceURI===P?e.createElement(t):e.createElementNS(n,t)}}function z(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function U(t){var e=Y(t);return(e.local?z:R)(e)}function H(){}function X(t){return null==t?H:function(){return this.querySelector(t)}}function W(){return[]}function j(t){return null==t?W:function(){return this.querySelectorAll(t)}}function q(t){return function(){return function(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}(t.apply(this,arguments))}}function G(t){return function(){return this.matches(t)}}function Q(t){return function(e){return e.matches(t)}}var Z=Array.prototype.find;function K(){return this.firstElementChild}var J=Array.prototype.filter;function tt(){return Array.from(this.children)}function et(t){return new Array(t.length)}function nt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function rt(t,e,n,r,i,a){for(var l,o=0,s=e.length,u=a.length;oe?1:t>=e?0:NaN}function st(t){return function(){this.removeAttribute(t)}}function ut(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ct(t,e){return function(){this.setAttribute(t,e)}}function ft(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ht(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function dt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function gt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function pt(t){return function(){this.style.removeProperty(t)}}function yt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function mt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function vt(t,e){return t.style.getPropertyValue(e)||gt(t).getComputedStyle(t,null).getPropertyValue(e)}function xt(t){return function(){delete this[t]}}function At(t,e){return function(){this[t]=e}}function wt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function bt(t){return t.trim().split(/^|\s+/)}function Dt(t){return t.classList||new kt(t)}function kt(t){this._node=t,this._names=bt(t.getAttribute("class")||"")}function Ct(t,e){for(var n=Dt(t),r=-1,i=e.length;++r=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var jt=[null];function qt(t,e){this._groups=t,this._parents=e}function Gt(){return new qt([[document.documentElement]],jt)}function Qt(t){return"string"==typeof t?new qt([[document.querySelector(t)]],[document.documentElement]):new qt([[t]],jt)}function Zt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Kt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Jt(){}qt.prototype=Gt.prototype={constructor:qt,select:function(t){"function"!=typeof t&&(t=X(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=A&&(A=x+1);!(v=y[A])&&++A=0;)(r=i[a])&&(l&&4^r.compareDocumentPosition(l)&&l.parentNode.insertBefore(r,l),l=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=ot);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?pt:"function"==typeof e?mt:yt)(t,e,null==n?"":n)):vt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?xt:"function"==typeof e?wt:At)(t,e)):this.node()[t]},classed:function(t,e){var n=bt(t+"");if(arguments.length<2){for(var r=Dt(this.node()),i=-1,a=n.length;++i=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),l=a.length;if(!(arguments.length<2)){for(o=e?Ut:zt,r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?me(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?me(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=le.exec(t))?new Ae(e[1],e[2],e[3],1):(e=oe.exec(t))?new Ae(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=se.exec(t))?me(e[1],e[2],e[3],e[4]):(e=ue.exec(t))?me(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ce.exec(t))?Me(e[1],e[2]/100,e[3]/100,1):(e=fe.exec(t))?Me(e[1],e[2]/100,e[3]/100,e[4]):he.hasOwnProperty(t)?ye(he[t]):"transparent"===t?new Ae(NaN,NaN,NaN,0):null}function ye(t){return new Ae(t>>16&255,t>>8&255,255&t,1)}function me(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ae(t,e,n,r)}function ve(t){return t instanceof Jt||(t=pe(t)),t?new Ae((t=t.rgb()).r,t.g,t.b,t.opacity):new Ae}function xe(t,e,n,r){return 1===arguments.length?ve(t):new Ae(t,e,n,null==r?1:r)}function Ae(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function we(){return`#${Ce(this.r)}${Ce(this.g)}${Ce(this.b)}`}function be(){const t=De(this.opacity);return`${1===t?"rgb(":"rgba("}${ke(this.r)}, ${ke(this.g)}, ${ke(this.b)}${1===t?")":`, ${t})`}`}function De(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ke(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ce(t){return((t=ke(t))<16?"0":"")+t.toString(16)}function Me(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new _e(t,e,n,r)}function Te(t){if(t instanceof _e)return new _e(t.h,t.s,t.l,t.opacity);if(t instanceof Jt||(t=pe(t)),!t)return new _e;if(t instanceof _e)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),l=NaN,o=a-i,s=(a+i)/2;return o?(l=e===a?(n-r)/o+6*(n0&&s<1?0:l,new _e(l,o,s,t.opacity)}function _e(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ee(t){return(t=(t||0)%360)<0?t+360:t}function Fe(t){return Math.max(0,Math.min(1,t||0))}function Se(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Zt(Jt,pe,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:de,formatHex:de,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Te(this).formatHsl()},formatRgb:ge,toString:ge}),Zt(Ae,xe,Kt(Jt,{brighter(t){return t=null==t?ee:Math.pow(ee,t),new Ae(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?te:Math.pow(te,t),new Ae(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ae(ke(this.r),ke(this.g),ke(this.b),De(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:we,formatHex:we,formatHex8:function(){return`#${Ce(this.r)}${Ce(this.g)}${Ce(this.b)}${Ce(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:be,toString:be})),Zt(_e,(function(t,e,n,r){return 1===arguments.length?Te(t):new _e(t,e,n,null==r?1:r)}),Kt(Jt,{brighter(t){return t=null==t?ee:Math.pow(ee,t),new _e(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?te:Math.pow(te,t),new _e(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ae(Se(t>=240?t-240:t+120,i,r),Se(t,i,r),Se(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new _e(Ee(this.h),Fe(this.s),Fe(this.l),De(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=De(this.opacity);return`${1===t?"hsl(":"hsla("}${Ee(this.h)}, ${100*Fe(this.s)}%, ${100*Fe(this.l)}%${1===t?")":`, ${t})`}`}}));const Be=Math.PI/180,Ne=180/Math.PI,Le=.96422,Ie=.82521,Oe=4/29,Ve=6/29,Pe=3*Ve*Ve,$e=Ve*Ve*Ve;function Ye(t){if(t instanceof ze)return new ze(t.l,t.a,t.b,t.opacity);if(t instanceof je)return qe(t);t instanceof Ae||(t=ve(t));var e,n,r=We(t.r),i=We(t.g),a=We(t.b),l=Ue((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=l:(e=Ue((.4360747*r+.3850649*i+.1430804*a)/Le),n=Ue((.0139322*r+.0971045*i+.7141733*a)/Ie)),new ze(116*l-16,500*(e-l),200*(l-n),t.opacity)}function Re(t,e,n,r){return 1===arguments.length?Ye(t):new ze(t,e,n,null==r?1:r)}function ze(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ue(t){return t>$e?Math.pow(t,1/3):t/Pe+Oe}function He(t){return t>Ve?t*t*t:Pe*(t-Oe)}function Xe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function We(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function je(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function qe(t){if(isNaN(t.h))return new ze(t.l,0,0,t.opacity);var e=t.h*Be;return new ze(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Zt(ze,Re,Kt(Jt,{brighter(t){return new ze(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new ze(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ae(Xe(3.1338561*(e=Le*He(e))-1.6168667*(t=1*He(t))-.4906146*(n=Ie*He(n))),Xe(-.9787684*e+1.9161415*t+.033454*n),Xe(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Zt(je,(function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof je)return new je(t.h,t.c,t.l,t.opacity);if(t instanceof ze||(t=Ye(t)),0===t.a&&0===t.b)return new je(NaN,0()=>t;function Qe(t){return 1==(t=+t)?Ze:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ge(isNaN(e)?n:e)}}function Ze(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ge(isNaN(t)?e:t)}var Ke=function t(e){var n=Qe(e);function r(t,e){var r=n((t=xe(t)).r,(e=xe(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),l=Ze(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=l(e),t+""}}return r.gamma=t,r}(1);var Je,tn=(Je=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],l=r>0?t[r-1]:2*i-a,o=ra&&(i=e.slice(a,i),o[l]?o[l]+=i:o[++l]=i),(n=n[0])===(r=r[0])?o[l]?o[l]+=r:o[++l]=r:(o[++l]=null,s.push({i:l,x:an(n,r)})),a=sn.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:an(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,l.rotate,o,s),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:an(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,l.skewX,o,s),function(t,e,n,r,a,l){if(t!==n||e!==r){var o=a.push(i(a)+"scale(",null,",",null,")");l.push({i:o-4,x:an(t,n)},{i:o-2,x:an(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,l.scaleX,l.scaleY,o,s),a=l=null,function(t){for(var e,n=-1,r=s.length;++n=0&&e._call.call(void 0,t),e=e._next;--bn}()}finally{bn=0,function(){var t,e,n=An,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:An=e);wn=t,On(r)}(),Mn=0}}function In(){var t=_n.now(),e=t-Cn;e>1e3&&(Tn-=e,Cn=t)}function On(t){bn||(Dn&&(Dn=clearTimeout(Dn)),t-Mn>24?(t<1/0&&(Dn=setTimeout(Ln,t-_n.now()-Tn)),kn&&(kn=clearInterval(kn))):(kn||(Cn=_n.now(),kn=setInterval(In,1e3)),bn=1,En(Ln)))}function Vn(t,e,n){var r=new Bn;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Bn.prototype=Nn.prototype={constructor:Bn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Fn():+n)+(null==e?0:+e),this._next||wn===this||(wn?wn._next=this:An=this,wn=this),this._call=t,this._time=n,On()},stop:function(){this._call&&(this._call=null,this._time=1/0,On())}};var Pn=L("start","end","cancel","interrupt"),$n=[];function Yn(t,e,n,r,i,a){var l=t.__transition;if(l){if(n in l)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(l,n.delay,n.time),n.delay<=t&&l(t-n.delay)}function l(a){var u,c,f,h;if(1!==n.state)return s();for(u in i)if((h=i[u]).name===n.name){if(3===h.state)return Vn(l);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[u]):+u0)throw new Error("too late; already scheduled");return n}function zn(t,e){var n=Un(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Un(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Hn(t,e){var n,r;return function(){var i=zn(this,t),a=i.tween;if(a!==n)for(var l=0,o=(r=n=a).length;l=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Rn:zn;return function(){var l=a(this,t),o=l.on;o!==r&&(i=(r=o).copy()).on(e,n),l.on=i}}(n,t,e))},attr:function(t,e){var n=Y(t),r="transform"===n?vn:jn;return this.attrTween(t,"function"==typeof e?(n.local?Jn:Kn)(n,r,Wn(this,"attr."+t,e)):null==e?(n.local?Gn:qn)(n):(n.local?Zn:Qn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Y(t);return this.tween(n,(r.local?tr:er)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?mn:jn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=vt(this,t),l=(this.style.removeProperty(t),vt(this,t));return a===l?null:a===n&&l===r?i:i=e(n=a,r=l)}}(t,r)).on("end.style."+t,or(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var l=vt(this,t),o=n(this),s=o+"";return null==o&&(this.style.removeProperty(t),s=o=vt(this,t)),l===s?null:l===r&&s===i?a:(i=s,a=e(r=l,o))}}(t,r,Wn(this,"style."+t,e))).each(function(t,e){var n,r,i,a,l="style."+e,o="end."+l;return function(){var s=zn(this,t),u=s.on,c=null==s.value[l]?a||(a=or(e)):void 0;u===n&&i===c||(r=(n=u).copy()).on(o,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var l=vt(this,t);return l===a?null:l===r?i:i=e(r=l,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,a,n)),r}return a._value=e,a}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Wn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Un(this.node(),n).tween,a=0,l=i.length;a2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):l=!1;l&&delete t.__transition}}(this,t)}))},Gt.prototype.transition=function(t){var e,n;t instanceof ur?(e=t._id,t=t._name):(e=cr(),(n=hr).time=Fn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a=0))throw new Error(`invalid digits: ${t}`);if(e>15)return vr;const n=10**e;return function(t){this._+=t[0];for(let e=1,r=t.length;eyr)if(Math.abs(c*o-s*u)>yr&&i){let h=n-a,d=r-l,g=o*o+s*s,p=h*h+d*d,y=Math.sqrt(g),m=Math.sqrt(f),v=i*Math.tan((gr-Math.acos((g+f-p)/(2*y*m)))/2),x=v/m,A=v/y;Math.abs(x-1)>yr&&this._append`L${t+x*u},${e+x*c}`,this._append`A${i},${i},0,0,${+(c*h>u*d)},${this._x1=t+A*o},${this._y1=e+A*s}`}else this._append`L${this._x1=t},${this._y1=e}`;else;}arc(t,e,n,r,i,a){if(t=+t,e=+e,a=!!a,(n=+n)<0)throw new Error(`negative radius: ${n}`);let l=n*Math.cos(r),o=n*Math.sin(r),s=t+l,u=e+o,c=1^a,f=a?r-i:i-r;null===this._x1?this._append`M${s},${u}`:(Math.abs(this._x1-s)>yr||Math.abs(this._y1-u)>yr)&&this._append`L${s},${u}`,n&&(f<0&&(f=f%pr+pr),f>mr?this._append`A${n},${n},0,1,${c},${t-l},${e-o}A${n},${n},0,1,${c},${this._x1=s},${this._y1=u}`:f>yr&&this._append`A${n},${n},0,${+(f>=gr)},${c},${this._x1=t+n*Math.cos(i)},${this._y1=e+n*Math.sin(i)}`)}rect(t,e,n,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}}function Ar(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function wr(t){return(t=Ar(Math.abs(t)))?t[1]:NaN}var br,Dr=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function kr(t){if(!(e=Dr.exec(t)))throw new Error("invalid format: "+t);var e;return new Cr({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Cr(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Mr(t,e){var n=Ar(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}kr.prototype=Cr.prototype,Cr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Tr={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Mr(100*t,e),r:Mr,s:function(t,e){var n=Ar(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(br=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,l=r.length;return a===l?r:a>l?r+new Array(a-l+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ar(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function _r(t){return t}var Er,Fr,Sr,Br=Array.prototype.map,Nr=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Lr(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?_r:(e=Br.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],l=0,o=e[0],s=0;i>0&&o>0&&(s+o+1>r&&(o=Math.max(1,r-s)),a.push(t.substring(i-=o,i+o)),!((s+=o+1)>r));)o=e[l=(l+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",l=void 0===t.decimal?".":t.decimal+"",o=void 0===t.numerals?_r:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Br.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=kr(t)).fill,n=t.align,f=t.sign,h=t.symbol,d=t.zero,g=t.width,p=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(p=!0,v="g"):Tr[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var x="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",A="$"===h?a:/[%p]/.test(v)?s:"",w=Tr[v],b=/[defgprs%]/.test(v);function D(t){var i,a,s,h=x,D=A;if("c"===v)D=w(t)+D,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:w(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==f&&(k=!1),h=(k?"("===f?f:u:"-"===f||"("===f?"":f)+h,D=("s"===v?Nr[8+br/3]:"")+D+(k&&"("===f?")":""),b)for(i=-1,a=t.length;++i(s=t.charCodeAt(i))||s>57){D=(46===s?l+t.slice(i+1):t.slice(i))+D,t=t.slice(0,i);break}}p&&!d&&(t=r(t,1/0));var C=h.length+t.length+D.length,M=C>1)+h+t+D+M.slice(C);break;default:t=M+h+t+D}return o(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),D.toString=function(){return t+""},D}return{format:f,formatPrefix:function(t,e){var n=f(((t=kr(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(wr(e)/3))),i=Math.pow(10,-r),a=Nr[8+r/3];return function(t){return n(i*t)+a}}}}function Ir(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}Er=Lr({thousands:",",grouping:[3],currency:["$",""]}),Fr=Er.format,Sr=Er.formatPrefix;const Or=Symbol("implicit");function Vr(){var t=new l,e=[],n=[],r=Or;function i(i){let a=t.get(i);if(void 0===a){if(r!==Or)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new l;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Vr(e,n).unknown(r)},Ir.apply(i,arguments),i}function Pr(t){return+t}var $r=[0,1];function Yr(t){return t}function Rr(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function zr(t,e,n){var r=t[0],i=t[1],a=e[0],l=e[1];return ie&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),r=s>2?Ur:zr,i=a=null,f}function f(e){return null==e||isNaN(e=+e)?n:(i||(i=r(l.map(t),o,s)))(t(u(e)))}return f.invert=function(n){return u(e((a||(a=r(o,l.map(t),an)))(n)))},f.domain=function(t){return arguments.length?(l=Array.from(t,Pr),c()):l.slice()},f.range=function(t){return arguments.length?(o=Array.from(t),c()):o.slice()},f.rangeRound=function(t){return o=Array.from(t),s=fn,c()},f.clamp=function(t){return arguments.length?(u=!!t||Yr,c()):u!==Yr},f.interpolate=function(t){return arguments.length?(s=t,c()):s},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function Wr(){return Xr()(Yr,Yr)}function jr(t,e,n,r){var i,a=p(t,e,n);switch((r=kr(null==r?",f":r)).type){case"s":var l=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(wr(e)/3)))-wr(Math.abs(t)))}(a,l))||(r.precision=i),Sr(r,l);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,wr(e)-wr(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-wr(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return Fr(r)}function qr(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){if(!((n=+n)>0))return[];if((t=+t)==(e=+e))return[t];const r=e=i))return[];const o=a-i+1,s=new Array(o);if(r)if(l<0)for(let t=0;t0;){if((i=g(s,u,n))===r)return a[l]=s,a[o]=u,e(a);if(i>0)s=Math.floor(s/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;s=Math.ceil(s*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function Gr(){var t=Wr();return t.copy=function(){return Hr(t,Gr())},Ir.apply(t,arguments),qr(t)}const Qr=new Date,Zr=new Date;function Kr(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=e=>(t(e=new Date(+e)),e),i.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),i.round=t=>{const e=i(t),n=i.ceil(t);return t-e(e(t=new Date(+t),null==n?1:Math.floor(n)),t),i.range=(n,r,a)=>{const l=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n0))return l;let o;do{l.push(o=new Date(+n)),e(n,a),t(n)}while(oKr((e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),((t,r)=>{if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})),n&&(i.count=(e,r)=>(Qr.setTime(+e),Zr.setTime(+r),t(Qr),t(Zr),Math.floor(n(Qr,Zr))),i.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?e=>r(e)%t==0:e=>i.count(0,e)%t==0):i:null)),i}const Jr=Kr((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Jr.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?Kr((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t)):Jr:null),Jr.range;const ti=1e3,ei=6e4,ni=36e5,ri=864e5,ii=6048e5,ai=2592e6,li=31536e6,oi=Kr((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*ti)}),((t,e)=>(e-t)/ti),(t=>t.getUTCSeconds()));oi.range;const si=Kr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ti)}),((t,e)=>{t.setTime(+t+e*ei)}),((t,e)=>(e-t)/ei),(t=>t.getMinutes()));si.range;const ui=Kr((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*ei)}),((t,e)=>(e-t)/ei),(t=>t.getUTCMinutes()));ui.range;const ci=Kr((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*ti-t.getMinutes()*ei)}),((t,e)=>{t.setTime(+t+e*ni)}),((t,e)=>(e-t)/ni),(t=>t.getHours()));ci.range;const fi=Kr((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*ni)}),((t,e)=>(e-t)/ni),(t=>t.getUTCHours()));fi.range;const hi=Kr((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ei)/ri),(t=>t.getDate()-1));hi.range;const di=Kr((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/ri),(t=>t.getUTCDate()-1));di.range;const gi=Kr((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/ri),(t=>Math.floor(t/ri)));function pi(t){return Kr((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+7*e)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ei)/ii))}gi.range;const yi=pi(0),mi=pi(1),vi=pi(2),xi=pi(3),Ai=pi(4),wi=pi(5),bi=pi(6);function Di(t){return Kr((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)}),((t,e)=>(e-t)/ii))}yi.range,mi.range,vi.range,xi.range,Ai.range,wi.range,bi.range;const ki=Di(0),Ci=Di(1),Mi=Di(2),Ti=Di(3),_i=Di(4),Ei=Di(5),Fi=Di(6);ki.range,Ci.range,Mi.range,Ti.range,_i.range,Ei.range,Fi.range;const Si=Kr((t=>{t.setDate(1),t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())),(t=>t.getMonth()));Si.range;const Bi=Kr((t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())),(t=>t.getUTCMonth()));Bi.range;const Ni=Kr((t=>{t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));Ni.every=t=>isFinite(t=Math.floor(t))&&t>0?Kr((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)})):null,Ni.range;const Li=Kr((t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));Li.every=t=>isFinite(t=Math.floor(t))&&t>0?Kr((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null,Li.range;const[Ii,Oi]=function(t,e,n,i,a,l){const o=[[oi,1,ti],[oi,5,5e3],[oi,15,15e3],[oi,30,3e4],[l,1,ei],[l,5,3e5],[l,15,9e5],[l,30,18e5],[a,1,ni],[a,3,108e5],[a,6,216e5],[a,12,432e5],[i,1,ri],[i,2,1728e5],[n,1,ii],[e,1,ai],[e,3,7776e6],[t,1,li]];function s(e,n,i){const a=Math.abs(n-e)/i,l=r((([,,t])=>t)).right(o,a);if(l===o.length)return t.every(p(e/li,n/li,i));if(0===l)return Jr.every(Math.max(p(e,n,i),1));const[s,u]=o[a/o[l-1][2][t.toLowerCase(),e])))}function Qi(t,e,n){var r=Ui.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Zi(t,e,n){var r=Ui.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ki(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ji(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function ta(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function ea(t,e,n){var r=Ui.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function na(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function ra(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function ia(t,e,n){var r=Ui.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function aa(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function la(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function oa(t,e,n){var r=Ui.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sa(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ua(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function ca(t,e,n){var r=Ui.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function fa(t,e,n){var r=Ui.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ha(t,e,n){var r=Ui.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function da(t,e,n){var r=Hi.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ga(t,e,n){var r=Ui.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function pa(t,e,n){var r=Ui.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ya(t,e){return Wi(t.getDate(),e,2)}function ma(t,e){return Wi(t.getHours(),e,2)}function va(t,e){return Wi(t.getHours()%12||12,e,2)}function xa(t,e){return Wi(1+hi.count(Ni(t),t),e,3)}function Aa(t,e){return Wi(t.getMilliseconds(),e,3)}function wa(t,e){return Aa(t,e)+"000"}function ba(t,e){return Wi(t.getMonth()+1,e,2)}function Da(t,e){return Wi(t.getMinutes(),e,2)}function ka(t,e){return Wi(t.getSeconds(),e,2)}function Ca(t){var e=t.getDay();return 0===e?7:e}function Ma(t,e){return Wi(yi.count(Ni(t)-1,t),e,2)}function Ta(t){var e=t.getDay();return e>=4||0===e?Ai(t):Ai.ceil(t)}function _a(t,e){return t=Ta(t),Wi(Ai.count(Ni(t),t)+(4===Ni(t).getDay()),e,2)}function Ea(t){return t.getDay()}function Fa(t,e){return Wi(mi.count(Ni(t)-1,t),e,2)}function Sa(t,e){return Wi(t.getFullYear()%100,e,2)}function Ba(t,e){return Wi((t=Ta(t)).getFullYear()%100,e,2)}function Na(t,e){return Wi(t.getFullYear()%1e4,e,4)}function La(t,e){var n=t.getDay();return Wi((t=n>=4||0===n?Ai(t):Ai.ceil(t)).getFullYear()%1e4,e,4)}function Ia(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Wi(e/60|0,"0",2)+Wi(e%60,"0",2)}function Oa(t,e){return Wi(t.getUTCDate(),e,2)}function Va(t,e){return Wi(t.getUTCHours(),e,2)}function Pa(t,e){return Wi(t.getUTCHours()%12||12,e,2)}function $a(t,e){return Wi(1+di.count(Li(t),t),e,3)}function Ya(t,e){return Wi(t.getUTCMilliseconds(),e,3)}function Ra(t,e){return Ya(t,e)+"000"}function za(t,e){return Wi(t.getUTCMonth()+1,e,2)}function Ua(t,e){return Wi(t.getUTCMinutes(),e,2)}function Ha(t,e){return Wi(t.getUTCSeconds(),e,2)}function Xa(t){var e=t.getUTCDay();return 0===e?7:e}function Wa(t,e){return Wi(ki.count(Li(t)-1,t),e,2)}function ja(t){var e=t.getUTCDay();return e>=4||0===e?_i(t):_i.ceil(t)}function qa(t,e){return t=ja(t),Wi(_i.count(Li(t),t)+(4===Li(t).getUTCDay()),e,2)}function Ga(t){return t.getUTCDay()}function Qa(t,e){return Wi(Ci.count(Li(t)-1,t),e,2)}function Za(t,e){return Wi(t.getUTCFullYear()%100,e,2)}function Ka(t,e){return Wi((t=ja(t)).getUTCFullYear()%100,e,2)}function Ja(t,e){return Wi(t.getUTCFullYear()%1e4,e,4)}function tl(t,e){var n=t.getUTCDay();return Wi((t=n>=4||0===n?_i(t):_i.ceil(t)).getUTCFullYear()%1e4,e,4)}function el(){return"+0000"}function nl(){return"%"}function rl(t){return+t}function il(t){return Math.floor(+t/1e3)}function al(t){return new Date(t)}function ll(t){return t instanceof Date?+t:+new Date(+t)}function ol(t,e,n,r,i,a,l,o,s,u){var c=Wr(),f=c.invert,h=c.domain,d=u(".%L"),g=u(":%S"),p=u("%I:%M"),y=u("%I %p"),m=u("%a %d"),v=u("%b %d"),x=u("%B"),A=u("%Y");function w(t){return(s(t)=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:rl,s:il,S:ka,u:Ca,U:Ma,V:_a,w:Ea,W:Fa,x:null,X:null,y:Sa,Y:Na,Z:Ia,"%":nl},A={a:function(t){return l[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return o[t.getUTCMonth()]},c:null,d:Oa,e:Oa,f:Ra,g:Ka,G:tl,H:Va,I:Pa,j:$a,L:Ya,m:za,M:Ua,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:rl,s:il,S:Ha,u:Xa,U:Wa,V:qa,w:Ga,W:Qa,x:null,X:null,y:Za,Y:Ja,Z:el,"%":nl},w={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return k(t,e,n,r)},d:la,e:la,f:ha,g:na,G:ea,H:sa,I:sa,j:oa,L:fa,m:aa,M:ua,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:ia,Q:ga,s:pa,S:ca,u:Zi,U:Ki,V:Ji,w:Qi,W:ta,x:function(t,e,r){return k(t,n,e,r)},X:function(t,e,n){return k(t,r,e,n)},y:na,Y:ea,Z:ra,"%":da};function b(t,e){return function(n){var r,i,a,l=[],o=-1,s=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++o53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Pi($i(a.y,0,1))).getUTCDay(),r=i>4||0===i?Ci.ceil(r):Ci(r),r=di.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Vi($i(a.y,0,1))).getDay(),r=i>4||0===i?mi.ceil(r):mi(r),r=hi.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Pi($i(a.y,0,1)).getUTCDay():Vi($i(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Pi(a)):Vi(a)}}function k(t,e,n,r){for(var i,a,l=0,o=e.length,s=n.length;l=s)return-1;if(37===(i=e.charCodeAt(l++))){if(i=e.charAt(l++),!(a=w[i in zi?e.charAt(l++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=b(n,x),x.X=b(r,x),x.c=b(e,x),A.x=b(n,A),A.X=b(r,A),A.c=b(e,A),{format:function(t){var e=b(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=D(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=b(t+="",A);return e.toString=function(){return t},e},utcParse:function(t){var e=D(t+="",!0);return e.toString=function(){return t},e}}}(t),Ri=Yi.format,Yi.parse,Yi.utcFormat,Yi.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ul=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map((function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r{tn(t[t.length-1])})(ul);const fl=Math.abs,hl=Math.atan2,dl=Math.cos,gl=Math.max,pl=Math.min,yl=Math.sin,ml=Math.sqrt,vl=1e-12,xl=Math.PI,Al=xl/2,wl=2*xl;function bl(t){return t>=1?Al:t<=-1?-Al:Math.asin(t)}function Dl(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{const t=Math.floor(n);if(!(t>=0))throw new RangeError(`invalid digits: ${n}`);e=t}return t},()=>new xr(e)}function kl(t){return t.innerRadius}function Cl(t){return t.outerRadius}function Ml(t){return t.startAngle}function Tl(t){return t.endAngle}function _l(t){return t&&t.padAngle}function El(t,e,n,r,i,a,l){var o=t-n,s=e-r,u=(l?a:-a)/ml(o*o+s*s),c=u*s,f=-u*o,h=t+c,d=e+f,g=n+c,p=r+f,y=(h+g)/2,m=(d+p)/2,v=g-h,x=p-d,A=v*v+x*x,w=i-a,b=h*p-g*d,D=(x<0?-1:1)*ml(gl(0,w*w*A-b*b)),k=(b*x-v*D)/A,C=(-b*v-x*D)/A,M=(b*x+v*D)/A,T=(-b*v+x*D)/A,_=k-y,E=C-m,F=M-y,S=T-m;return _*_+E*E>F*F+S*S&&(k=M,C=T),{cx:k,cy:C,x01:-c,y01:-f,x11:k*(i/w-1),y11:C*(i/w-1)}}function Fl(){var t=kl,e=Cl,n=cl(0),r=null,i=Ml,a=Tl,l=_l,o=null,s=Dl(u);function u(){var u,c,f=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-Al,g=a.apply(this,arguments)-Al,p=fl(g-d),y=g>d;if(o||(o=u=s()),hvl)if(p>wl-vl)o.moveTo(h*dl(d),h*yl(d)),o.arc(0,0,h,d,g,!y),f>vl&&(o.moveTo(f*dl(g),f*yl(g)),o.arc(0,0,f,g,d,y));else{var m,v,x=d,A=g,w=d,b=g,D=p,k=p,C=l.apply(this,arguments)/2,M=C>vl&&(r?+r.apply(this,arguments):ml(f*f+h*h)),T=pl(fl(h-f)/2,+n.apply(this,arguments)),_=T,E=T;if(M>vl){var F=bl(M/f*yl(C)),S=bl(M/h*yl(C));(D-=2*F)>vl?(w+=F*=y?1:-1,b-=F):(D=0,w=b=(d+g)/2),(k-=2*S)>vl?(x+=S*=y?1:-1,A-=S):(k=0,x=A=(d+g)/2)}var B=h*dl(x),N=h*yl(x),L=f*dl(b),I=f*yl(b);if(T>vl){var O,V=h*dl(A),P=h*yl(A),$=f*dl(w),Y=f*yl(w);if(p1?0:t<-1?xl:Math.acos(t)}((R*U+z*H)/(ml(R*R+z*z)*ml(U*U+H*H)))/2),W=ml(O[0]*O[0]+O[1]*O[1]);_=pl(T,(f-W)/(X-1)),E=pl(T,(h-W)/(X+1))}else _=E=0}k>vl?E>vl?(m=El($,Y,B,N,h,E,y),v=El(V,P,L,I,h,E,y),o.moveTo(m.cx+m.x01,m.cy+m.y01),Evl&&D>vl?_>vl?(m=El(L,I,V,P,f,-_,y),v=El(B,N,$,Y,f,-_,y),o.lineTo(m.cx+m.x01,m.cy+m.y01),_t?1:e>=t?0:NaN}function Vl(t){return t}function Pl(t,e,n){this.k=t,this.x=e,this.y=n}var $l,Yl,Rl;Bl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Pl.prototype={constructor:Pl,scale:function(t){return 1===t?this:new Pl(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Pl(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Pl.prototype,function(t){t[t.Tag=0]="Tag",t[t.Frontmatter=1]="Frontmatter",t[t.Wiki=2]="Wiki",t[t.WikiLink=3]="WikiLink",t[t.WikiDisplay=4]="WikiDisplay",t[t.Text=5]="Text",t[t.dvField=6]="dvField",t[t.Table=7]="Table",t[t.FileMeta=8]="FileMeta",t[t.Task=9]="Task",t[t.TaskDone=10]="TaskDone",t[t.TaskNotDone=11]="TaskNotDone"}($l||($l={})),function(t){t[t.Line=0]="Line",t[t.Bar=1]="Bar",t[t.Pie=2]="Pie",t[t.Radar=3]="Radar",t[t.Summary=4]="Summary",t[t.Table=5]="Table",t[t.Month=6]="Month",t[t.Heatmap=7]="Heatmap",t[t.Bullet=8]="Bullet",t[t.Unknown=9]="Unknown"}(Yl||(Yl={})),function(t){t[t.Number=0]="Number",t[t.Int=1]="Int",t[t.Date=2]="Date",t[t.Time=3]="Time",t[t.DateTime=4]="DateTime",t[t.String=5]="String"}(Rl||(Rl={}));class zl{constructor(t,e){this.date=t,this.value=e}}class Ul{constructor(t,e,n){if(this.type=e,this.target=n,this.separator="",this.id=t,this.accessor=-1,this.accessor1=-1,this.accessor2=-1,this.valueType=Rl.Number,this.usedAsXDataset=!1,this.numTargets=0,e===$l.Table){let t,e=new RegExp("\\[(?[0-9]+)\\]\\[(?[0-9]+)\\](\\[(?[0-9]+)\\])?","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);if(Number.isNumber(r)&&void 0!==t.groups.accessor1){let i=parseFloat(t.groups.accessor1);if(Number.isNumber(i)){let a;void 0!==t.groups.accessor2&&(a=parseFloat(t.groups.accessor2)),this.accessor=r,this.accessor1=i,Number.isNumber(a)&&(this.accessor2=a),this.parentTarget=n.replace(e,"")}break}}}else{let t,e=new RegExp("\\[(?[0-9]+)\\]","gm");for(;t=e.exec(n);)if(void 0!==t.groups.accessor){let r=parseFloat(t.groups.accessor);Number.isNumber(r)&&(this.accessor=r,this.parentTarget=n.replace(e,""));break}}}equalTo(t){return this.type===t.type&&this.target===t.target}getType(){return this.type}getTarget(){return this.target}getParentTarget(){return this.parentTarget}getId(){return this.id}getAccessor(t=0){switch(t){case 0:return this.accessor;case 1:return this.accessor1;case 2:return this.accessor2}return null}setSeparator(t){this.separator=t}getSeparator(t=!1){return""===this.separator?t?",":"/":this.separator}addNumTargets(t=1){this.numTargets=this.numTargets+t}getNumTargets(){return this.numTargets}}class Hl{constructor(t,e){this.currentIndex=0,this.name="untitled",this.query=e,this.values=[],this.parent=t,this.id=-1,this.yMin=null,this.yMax=null,this.startDate=null,this.endDate=null,this.numTargets=0,this.lineInfo=null,this.barInfo=null,this.isTmpDataset=!1,this.valueType=null==e?void 0:e.valueType;for(let e=0;e=0&&n=0&&nthis.yMax)&&(this.yMax=e),(null===this.startDate||tthis.endDate)&&(this.endDate=t.clone()))}recalculateMinMax(){this.yMin=Math.min(...this.values),this.yMax=Math.max(...this.values)}getYMin(){return this.yMin}getYMax(){return this.yMax}getStartDate(){return this.startDate}getEndDate(){return this.endDate}shift(t,e){let n=!1;for(let r=0;r=e)&&(this.values[r]=this.values[r]+t,n=!0);n&&(this.yMin=this.yMin+t,this.yMax=this.yMax+t)}setPenalty(t){for(let e=0;ethis.yMax&&(this.yMax=t))}getQuery(){return this.query}accumulateValues(){let t=0;for(let e=0;ethis.yMax&&(this.yMax=t)}shiftByDataset(t){for(let e=0;ethis.yMax&&(this.yMax=n)}}getValues(){return this.values}getLength(){return this.values.length}getLengthNotNull(){let t=0;for(let e=0;e[\d\.\/-]+)\s*,\s*(?[\d\.\/-]+)\s*\)/).groups;e&&(this.translateX=parseFloat(e.x),this.translateY=parseFloat(e.y))}}}class lo{constructor(t,e){this.filePath=t,this.tableIndex=e,this.xDataset=null,this.yDatasets=[]}}class oo{constructor(){this.fileTotal=0,this.fileAvailable=0,this.fileOutOfDateRange=0,this.fileNotInFormat=0,this.errorMessage="",this.minDate=window.moment(""),this.maxDate=window.moment(""),this.gotAnyValidXValue=!1,this.gotAnyValidYValue=!1}}const so=function(){const t=["HH","H","hh","h"],e=["mm","m"],n=["ss","s",""];let r=[];for(let i of t)for(let t of e)for(let e of n){let n=`${i}:${t}`;""!==e&&(n+=`:${e}`),i.contains("h")&&(n+=" a"),r.push(n)}return r}();function uo(t,e,n){if(!e&&!n)return t;let r=t;if(r.startsWith("^")&&(r=r.slice(1)),e){let t=new RegExp("^("+e+")","gm");t.test(r)&&(r=r.replace(t,""))}if(n){let t=new RegExp("("+n+")$","gm");t.test(r)&&(r=r.replace(t,""))}return r}function co(t,e){let n=e;t.length>4&&t.startsWith("[[")&&t.endsWith("]]")&&(t=t.substring(2,t.length-2)),"iso-8601"===e.toLowerCase()&&(n=window.moment.ISO_8601);let r=window.moment(t,n,!0);return r=r.startOf("day"),r}function fo(t,e,n=!0){if(!t||!e||0===e.length)return[null,t];let r=null;const i="^(?[0-9]+)("+e.join("|")+")$",a=new RegExp(i,"gm");let l=a.exec(t);return l&&void 0!==l.groups&&void 0!==l.groups.value&&(r=parseFloat(l.groups.value),Number.isNumber(r)&&!Number.isNaN(r))?(n&&(t=t.replace(a,"")),[r,t]):[null,t]}function ho(t){if(!t)return null;let e=window.moment.duration(0),n=!1,r=!1;t.startsWith("+")&&(r=!1,t=t.substring(1)),t.startsWith("-")&&(r=!0,t=t.substring(1));let i=null;[i,t]=fo(t,["year","years","Y","y"]),null!==i&&(r&&(i*=-1),e.add(i,"years"),n=!0);let a=null;[a,t]=fo(t,["month","months","M"]),null!==a&&(r&&(a*=-1),e.add(a,"months"),n=!0);let l=null;[l,t]=fo(t,["week","weeks","W","w"]),null!==l&&(r&&(l*=-1),e.add(l,"weeks"),n=!0);let o=null;[o,t]=fo(t,["day","days","D","d"]),null!==o&&(r&&(o*=-1),e.add(o,"days"),n=!0);let s=null;[s,t]=fo(t,["hour","hours","H","h"]),null!==s&&(r&&(s*=-1),e.add(s,"hours"),n=!0);let u=null;[u,t]=fo(t,["minute","minutes","m"]),null!==u&&(r&&(u*=-1),e.add(u,"minutes"),n=!0);let c=null;return[c,t]=fo(t,["second","seconds","S","s"]),null!==c&&(r&&(c*=-1),e.add(c,"seconds"),n=!0),n?e:null}function go(t,e){let n=null,r=ho(t);return r&&window.moment.isDuration(r)&&(n=mo(e),n=n.add(r),n&&n.isValid()),n}function po(t,e){return null==t?null:"iso-8601"===e.toLowerCase()?t.format():t.format(e)}function yo(t,e){return co(po(window.moment(t),e),e)}function mo(t){return co(po(window.moment(),t),t)}function vo(t,e){for(var n=(e=e.replace(/^\./,"")).split("."),r=0,i=n.length;rt!==e)),i=n.reverse().findIndex((t=>t!==e));return-1===r&&-1===i?t:t.substring(r,t.length-i)}function Ao(t){if(null===t)return null;let e=new RegExp(']*?alt\\s*=\\s*[""\']?(?[^\'"" >]+?)[ \'""][^>]*?>',"g");return t.replace(e,((...t)=>{let e=t[t.length-1];return e&&e.emoji?e.emoji.trim():""}))}function wo(t,e=null){let n=null,r=Rl.Number;if("string"==typeof t)if(t.includes(":")){let e=!1;t.startsWith("-")&&(e=!0,t=t.substring(1));let i=window.moment(t,so,!0);i.isValid()&&(n=i.diff(window.moment("00:00","HH:mm",!0),"seconds"),e&&(n*=-1),r=Rl.Time)}else if(e){const r=Object.keys(e);for(let n of r)if("string"==typeof n){let r=new RegExp(n,"gm");if(r.test(t)&&Number.isNumber(e[n])){let i=e[n].toString();t=t.replace(r,i);break}}n=parseFloat(t),Number.isNaN(n)&&(n=null)}else n=parseFloat(t),Number.isNaN(n)&&(n=null);else"number"==typeof t&&(n=t);return{type:r,value:n}}function bo(t,e="",n=""){var r=Qt("body").append("svg");let i=r.append("text").text(t).attr("x",-99999).attr("y",-99999);e&&i.attr("class",e),n&&i.attr("transform","rotate("+n+")");var a=r.node().getBBox();return r.remove(),{width:a.width,height:a.height}}function Do(t,e,n){let r=(0|parseFloat(t.attr("width")))+e,i=(0|parseFloat(t.attr("height")))+n;t.attr("width",r),t.attr("height",i)}function ko(t,e,n){let r=new ao(t.attr("transform"));t.attr("transform","translate("+(r.translateX+e)+","+(r.translateY+n)+")")}function Co(t){return t=(t=(t=t.replace(/(^\\s\*)|(\\s\*$)/gi,"")).replace(/\[ \]{2,}/gi," ")).replace(/\\n /,"\\n")}class Mo{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+Mo.version}static addUnaryOp(t){return Mo.max_unop_len=Math.max(t.length,Mo.max_unop_len),Mo.unary_ops[t]=1,Mo}static addBinaryOp(t,e,n){return Mo.max_binop_len=Math.max(t.length,Mo.max_binop_len),Mo.binary_ops[t]=e,n?Mo.right_associative.add(t):Mo.right_associative.delete(t),Mo}static addIdentifierChar(t){return Mo.additional_identifier_chars.add(t),Mo}static addLiteral(t,e){return Mo.literals[t]=e,Mo}static removeUnaryOp(t){return delete Mo.unary_ops[t],t.length===Mo.max_unop_len&&(Mo.max_unop_len=Mo.getMaxKeyLen(Mo.unary_ops)),Mo}static removeAllUnaryOps(){return Mo.unary_ops={},Mo.max_unop_len=0,Mo}static removeIdentifierChar(t){return Mo.additional_identifier_chars.delete(t),Mo}static removeBinaryOp(t){return delete Mo.binary_ops[t],t.length===Mo.max_binop_len&&(Mo.max_binop_len=Mo.getMaxKeyLen(Mo.binary_ops)),Mo.right_associative.delete(t),Mo}static removeAllBinaryOps(){return Mo.binary_ops={},Mo.max_binop_len=0,Mo}static removeLiteral(t){return delete Mo.literals[t],Mo}static removeAllLiterals(){return Mo.literals={},Mo}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(t){this.expr=t,this.index=0}static parse(t){return new Mo(t).parse()}static getMaxKeyLen(t){return Math.max(0,...Object.keys(t).map((t=>t.length)))}static isDecimalDigit(t){return t>=48&&t<=57}static binaryPrecedence(t){return Mo.binary_ops[t]||0}static isIdentifierStart(t){return t>=65&&t<=90||t>=97&&t<=122||t>=128&&!Mo.binary_ops[String.fromCharCode(t)]||Mo.additional_identifier_chars.has(String.fromCharCode(t))}static isIdentifierPart(t){return Mo.isIdentifierStart(t)||Mo.isDecimalDigit(t)}throwError(t){const e=new Error(t+" at character "+this.index);throw e.index=this.index,e.description=t,e}runHook(t,e){if(Mo.hooks[t]){const n={context:this,node:e};return Mo.hooks.run(t,n),n.node}return e}searchHook(t){if(Mo.hooks[t]){const e={context:this};return Mo.hooks[t].find((function(t){return t.call(e.context,e),e.node})),e.node}}gobbleSpaces(){let t=this.code;for(;t===Mo.SPACE_CODE||t===Mo.TAB_CODE||t===Mo.LF_CODE||t===Mo.CR_CODE;)t=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");const t=this.gobbleExpressions(),e=1===t.length?t[0]:{type:Mo.COMPOUND,body:t};return this.runHook("after-all",e)}gobbleExpressions(t){let e,n,r=[];for(;this.index0;){if(Mo.binary_ops.hasOwnProperty(t)&&(!Mo.isIdentifierStart(this.code)||this.index+t.lengthi.right_a&&t.right_a?n>t.prec:n<=t.prec;for(;r.length>2&&o(r[r.length-2]);)l=r.pop(),e=r.pop().value,a=r.pop(),t={type:Mo.BINARY_EXP,operator:e,left:a,right:l},r.push(t);t=this.gobbleToken(),t||this.throwError("Expected expression after "+s),r.push(i,t)}for(o=r.length-1,t=r[o];o>1;)t={type:Mo.BINARY_EXP,operator:r[o-1].value,left:r[o-2],right:t},o-=2;return t}gobbleToken(){let t,e,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"),r)return this.runHook("after-token",r);if(t=this.code,Mo.isDecimalDigit(t)||t===Mo.PERIOD_CODE)return this.gobbleNumericLiteral();if(t===Mo.SQUOTE_CODE||t===Mo.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(t===Mo.OBRACK_CODE)r=this.gobbleArray();else{for(e=this.expr.substr(this.index,Mo.max_unop_len),n=e.length;n>0;){if(Mo.unary_ops.hasOwnProperty(e)&&(!Mo.isIdentifierStart(this.code)||this.index+e.length=e.length&&this.throwError("Unexpected token "+String.fromCharCode(t));break}if(i===Mo.COMMA_CODE){if(this.index++,r++,r!==e.length)if(t===Mo.CPAREN_CODE)this.throwError("Unexpected token ,");else if(t===Mo.CBRACK_CODE)for(let t=e.length;t{if("object"!=typeof t||!t.name||!t.init)throw new Error("Invalid JSEP plugin format");this.registered[t.name]||(t.init(this.jsep),this.registered[t.name]=t)}))}}(Mo),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),Mo.max_unop_len=Mo.getMaxKeyLen(Mo.unary_ops),Mo.max_binop_len=Mo.getMaxKeyLen(Mo.binary_ops);const _o=t=>new Mo(t).parse(),Eo=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(Mo).filter((t=>!Eo.includes(t)&&void 0===_o[t])).forEach((t=>{_o[t]=Mo[t]})),_o.Jsep=Mo;var Fo={name:"ternary",init(t){t.hooks.add("after-expression",(function(e){if(e.node&&this.code===t.QUMARK_CODE){this.index++;const n=e.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;const i=this.gobbleExpression();if(i||this.throwError("Expected expression"),e.node={type:"ConditionalExpression",test:n,consequent:r,alternate:i},n.operator&&t.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&t.binary_ops[r.right.operator]<=.9;)r=r.right;e.node.test=r.right,r.right=e.node,e.node=n}}else this.throwError("Expected :")}}))}};_o.plugins.register(Fo);var So,Bo={};function No(t){if("number"==typeof t){if(0===t)return!1}else if(t instanceof Hl&&t.getValues().some((function(t){return 0===t})))return!1;return!0}So=Bo,function(){var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(n){return function(n,r){var i,a,l,o,s,u,c,f,h,d=1,g=n.length,p="";for(a=0;a=0),o.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,o.width?parseInt(o.width):0);break;case"e":i=o.precision?parseFloat(i).toExponential(o.precision):parseFloat(i).toExponential();break;case"f":i=o.precision?parseFloat(i).toFixed(o.precision):parseFloat(i);break;case"g":i=o.precision?String(Number(i.toPrecision(o.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=o.precision?i.substring(0,o.precision):i;break;case"t":i=String(!!i),i=o.precision?i.substring(0,o.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=o.precision?i.substring(0,o.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=o.precision?i.substring(0,o.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(o.type)?p+=i:(!t.number.test(o.type)||f&&!o.sign?h="":(h=f?"+":"-",i=i.toString().replace(t.sign,"")),u=o.pad_char?"0"===o.pad_char?"0":o.pad_char.charAt(1):" ",c=o.width-(h+i).length,s=o.width&&c>0?u.repeat(c):"",p+=o.align?h+i+s:"0"===u?h+s+i:s+h+i)}return p}(function(e){if(r[e])return r[e];for(var n,i=e,a=[],l=0;i;){if(null!==(n=t.text.exec(i)))a.push(n[0]);else if(null!==(n=t.modulo.exec(i)))a.push("%");else{if(null===(n=t.placeholder.exec(i)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){l|=1;var o=[],s=n[2],u=[];if(null===(u=t.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=t.key_access.exec(s)))o.push(u[1]);else{if(null===(u=t.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}n[2]=o}else l|=2;if(3===l)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");a.push({placeholder:n[0],param_no:n[1],keys:n[2],sign:n[3],pad_char:n[4],align:n[5],width:n[6],precision:n[7],type:n[8]})}i=i.substring(n[0].length)}return r[e]=a}(n),arguments)}function n(t,n){return e.apply(null,[t].concat(n||[]))}var r=Object.create(null);So.sprintf=e,So.vsprintf=n,"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}();const Lo={first:function(t,e){return t.getValue(this.startDate(...arguments))},last:function(t,e){return t.getValue(this.endDate(...arguments))},min:function(t,e){return m(t.getValues())},minDate:function(t,e){let n=m(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: min not found"},max:function(t,e){return y(t.getValues())},maxDate:function(t,e){let n=y(t.getValues());if(Number.isNumber(n)){let e=Array.from(t);for(let t of e.reverse())if(null!==t.value&&t.value===n)return t.date}return"Error: max not found"},startDate:function(t,e){if(t){let e=t.getStartDate();if(e&&e.isValid())return e}return e.startDate},endDate:function(t,e){if(t){let e=t.getEndDate();if(e&&e.isValid())return e}return e.endDate},sum:function(t,e){return b(t.getValues())},count:function(t,e){return"Error: deprecated function 'count'"},numTargets:function(t,e){return t.getNumTargets()},days:function(t,e){return"Error: deprecated function 'days'"},numDays:function(t,e){return t.getLength()},numDaysHavingData:function(t,e){return t.getLengthNotNull()},maxStreak:function(t,e){let n=0,r=0;for(let e of t)e.value?n++:n=0,n>=r&&(r=n);return r},maxStreakStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)e.value?(0===n&&(i=e.date),n++):n=0,n>=r&&(r=n,a=i);return a},maxStreakEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t=r&&(r=n,a=i)}}return a},maxBreaks:function(t,e){let n=0,r=0;for(let e of t)e.value?n=0:n++,n>r&&(r=n);return r},maxBreaksStart:function(t,e){let n=0,r=0,i=null,a=null;if(t)for(let e of t)e.value?n=0:(0===n&&(i=e.date),n++),n>=r&&(r=n,a=i);return a},maxBreaksEnd:function(t,e){let n=0,r=0,i=null,a=null;if(t){let e=Array.from(t);for(let t=0;t=r&&(r=n,a=i)}}return a},lastStreak:function(t,e){return"Error: deprecated function 'lastStreak'"},currentStreak:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(!e[t].value)break;n++}}return n},currentStreakStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t=0;t--){let i=e[t];if(!i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},currentBreaks:function(t,e){let n=0;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){if(e[t].value)break;n++}}return n},currentBreaksStart:function(t,e){let n=null;if(t){let e=Array.from(t);for(let t=e.length-1;t>=0;t--){let r=e[t];if(t=0;t--){let i=e[t];if(i.value)break;0===n&&(r=i.date),n++}}return null===r?"Error: absense":r},average:function(t,e){let n=t.getLengthNotNull();return No(n)?b(t.getValues())/n:"Error: divide by zero in expression"},median:function(t,e){return A(t.getValues())},variance:function(t,e){return function(t){let e,n=0,r=0,i=0;for(let a of t)null!=a&&(a=+a)>=a&&(e=a-r,r+=e/++n,i+=e*(a-r));if(n>1)return i/(n-1)}(t.getValues())}},Io={"-":function(t){if("number"==typeof t)return-1*t;if(t instanceof Hl){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){null!==n[e]&&(n[e]=-1*t)})),e.recalculateMinMax(),e}return"Error: unknown operation for '-'"},"+":function(t){if("number"==typeof t)return t;if(t instanceof Hl){return t.cloneToTmpDataset()}return"Error: unknown operation for '+'"}},Oo={"+":function(t,e){if("number"==typeof t&&"number"==typeof e)return t+e;if("number"==typeof t&&e instanceof Hl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&e instanceof Hl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t+e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '+'"},"-":function(t,e){if("number"==typeof t&&"number"==typeof e)return t-e;if("number"==typeof t&&e instanceof Hl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e:r[n]=null})),n}if(t instanceof Hl&&e instanceof Hl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t-e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '-'"},"*":function(t,e){if("number"==typeof t&&"number"==typeof e)return t*e;if("number"==typeof t&&e instanceof Hl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&e instanceof Hl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t*e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '*'"},"/":function(t,e){if(!No(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t/e;if("number"==typeof t&&e instanceof Hl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&e instanceof Hl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t/e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '/'"},"%":function(t,e){if(!No(e))return"Error: divide by zero in expression";if("number"==typeof t&&"number"==typeof e)return t%e;if("number"==typeof t&&e instanceof Hl){let n=e.cloneToTmpDataset();return n.getValues().forEach((function(e,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&"number"==typeof e){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e:r[n]=null})),n.recalculateMinMax(),n}if(t instanceof Hl&&e instanceof Hl){let n=t.cloneToTmpDataset();return n.getValues().forEach((function(t,n,r){null!==r[n]?r[n]=t%e.getValues()[n]:r[n]=null})),n.recalculateMinMax(),n}return"Error: unknown operation for '%'"}},Vo={normalize:function(t,e,n){let r=t.getYMin(),i=t.getYMax();if(null!==r&&null!==i&&i>r){let e=t.cloneToTmpDataset();return e.getValues().forEach((function(t,e,n){n[e]=(t-r)/(i-r)})),e.recalculateMinMax(),e}return"Error: invalid data range for function 'normalize'"},setMissingValues:function(t,e,n){if(e&&e.length>0){let n=e[0],r=t.cloneToTmpDataset();return Number.isNumber(n)&&!Number.isNaN(n)?(r.getValues().forEach((function(t,e,r){null===t&&(r[e]=n)})),r.recalculateMinMax(),r):"Error: invalid arguments for function 'setMissingValues'"}return"Error: invalid arguments for function 'setMissingValues"}};function Po(t,e){switch(t.type){case"Literal":return t.value;case"Identifier":let n=t.name;return n in Lo||n in Vo?`Error: deprecated template variable '${n}', use '${n}()' instead`:`Error: unknown function name '${n}'`;case"UnaryExpression":let r=t,i=Po(r.argument,e);return"string"==typeof i?i:Io[r.operator](i);case"BinaryExpression":let a=t,l=Po(a.left,e),o=Po(a.right,e),s=function(t,e){return"string"==typeof t?t:"string"==typeof e?e:"number"==typeof t||window.moment.isMoment(t)||t instanceof Hl?"number"==typeof e||window.moment.isMoment(e)||e instanceof Hl?"":"Error: invalide operant type":"Error: invalid operant type"}(l,o);return"string"==typeof s&&s.startsWith("Error:")?s:Oo[a.operator](l,o);case"CallExpression":let u=t,c=u.callee.name,f=function(t,e){return t.map((function(t){return Po(t,e)}))}(u.arguments,e);if("string"==typeof f)return f;if("dataset"===c){if(1===f.length){let t=f[0];if("string"==typeof t)return t;if("number"!=typeof t)return"Error: function 'dataset' only accepts id in number";let n=function(t,e){return e.datasets.getDatasetById(t)}(t,e);return n||`Error: no dataset found for id '${t}'`}}else{if(c in Lo){if(0===f.length){let t=null;for(let n of e.datasets)t||n.getQuery().usedAsXDataset||(t=n);return t?Lo[c](t,e):`No available dataset found for function ${c}`}if(1===f.length){let t=f[0];return"string"==typeof t?t:t instanceof Hl?Lo[c](t,e):`Error: function '${c}' only accepts Dataset`}return`Error: Too many arguments for function ${c}`}if(c in Vo){if(1===f.length){if("string"==typeof f[0])return f[0];if(f[0]instanceof Hl){let t=f[0];return Vo[c](t,null,e)}return`Error: function ${c} only accept Dataset`}if(f.length>1){if("string"==typeof f[0])return f[0];if(f[0]instanceof Hl){let t=f[0];return Vo[c](t,f.filter((function(t,e,n){return e>0})),e)}return`Error: function ${c} only accept Dataset`}return`Error: Too many arguments for function ${c}`}}return`Error: unknown function name '${c}'`}return"Error: unknown expression"}function $o(t,e){let n,r=[],i=new RegExp("{{(?[\\w+\\-*\\/0-9\\s()\\[\\]%.,]+)(::(?[\\w+\\-*\\/0-9\\s()\\[\\]%.:]+))?}}","gm");for(;n=i.exec(t);){let t=n[0];if(!r.some((e=>e.source===t))&&(void 0!==n.groups&&void 0!==n.groups.expr)){let i=n.groups.expr,a=null;try{a=_o(i)}catch(t){return"Error:"+t.message}if(!a)return"Error: failed to parse expression";const l=Po(a,e);if("string"==typeof l)return l;if("number"==typeof l||window.moment.isMoment(l)){let e=null;void 0!==n.groups.format&&(e=n.groups.format),r.push({source:t,value:l,format:e})}}}return r}function Yo(t,e){let n=$o(t,e);if("string"==typeof n)return n;let r=n;for(let n of r){let r=n.source,i=n.value,a=n.format,l="";"number"==typeof i?l=a?Bo.sprintf("%"+a,i):i.toFixed(1):window.moment.isMoment(i)&&(l=po(i,a||e.dateFormat)),l&&(t=t.split(r).join(l))}return t}function Ro(t,e){if(t=t.trim(),/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)$/.test(t))return parseFloat(t);let n=$o(t,e);if("string"==typeof n)return n;let r=n;return r.length>0?r[0].value:"Error: failed to resolve values"}function zo(t,e,n,r){let i="",a=.5*n.dataAreaSize.width,l=.7*a,o=l*r.ratioInnerRadius,s=[];for(let t of r.data){let e=Ro(t,n);if("string"==typeof e){i=e;break}"number"==typeof e&&s.push(e)}if(""!==i)return i;let u=[];for(let t of r.label){let e=Yo(t,n);if(e.startsWith("Error")){i=e;break}u.push(e)}if(""!==i)return i;let c=r.hideLabelLessThan,f=u.map((function(t){return bo(t,"tracker-tick-label")})),h=[];for(let t of r.extLabel){let e=Yo(t,n);if(e.startsWith("Error")){i=e;break}h.push(e)}if(""!==i)return i;let d=h.map((function(t){return bo(t,"tracker-pie-label")})),g=r.showExtLabelOnlyIfNoLabel,p=Vr().range(r.dataColor),y=e.dataArea.append("g");y.attr("transform",(function(){return"translate("+.5*n.dataAreaSize.width+","+.5*n.dataAreaSize.height+")"}));let m=function(){var t=Vl,e=Ol,n=null,r=cl(0),i=cl(wl),a=cl(0);function l(l){var o,s,u,c,f,h=(l=Sl(l)).length,d=0,g=new Array(h),p=new Array(h),y=+r.apply(this,arguments),m=Math.min(wl,Math.max(-wl,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/h,a.apply(this,arguments)),x=v*(m<0?-1:1);for(o=0;o0&&(d+=f);for(null!=e?g.sort((function(t,n){return e(p[t],p[n])})):null!=n&&g.sort((function(t,e){return n(l[t],l[e])})),o=0,u=d?(m-h*x)/d:0;o0?f*u:0)+x,p[s]={data:l[s],index:o,value:f,startAngle:y,endAngle:c,padAngle:v};return p}return l.value=function(e){return arguments.length?(t="function"==typeof e?e:cl(+e),l):t},l.sortValues=function(t){return arguments.length?(e=t,n=null,l):e},l.sort=function(t){return arguments.length?(n=t,e=null,l):n},l.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:cl(+t),l):r},l.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:cl(+t),l):i},l.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:cl(+t),l):a},l}(),v=m(s);v.forEach((function(t,e){t.input_index=e}));let x=y.selectAll("sector").data(v).enter().append("g").attr("class","sector"),A=Fl().innerRadius(o).outerRadius(l);var w=Fl().innerRadius(.9*a).outerRadius(.9*a);function b(t){return(t.endAngle-t.startAngle)/(2*Math.PI)Math.sqrt((o[0]-a[0])**2+(o[1]-a[1])**2)?[a,o]:[a,l,o]}y.selectAll("extLabel").data(v).enter().append("text").sort((function(t,e){return Math.cos(D(e))-Math.cos(D(t))})).text((function(t,e){return k(t,t.input_index)})).attr("transform",(function(t,e){if(0==k(t,e=t.input_index).length)return;let n=w.centroid(t),r=D(t);n[0]=(.99*a-d[e].width)*(rf&&(f=u[t].width,c=t);let h=f/s[c].length,d=u[c].height,g=s.length,p=2*h,y=d,m=2*h,v=0,x=0;"vertical"===r.legendOrientation?(v=3*p+m+f,x=(g+1)*y):"horizontal"===r.legendOrientation&&(v=(2*p+m)*g+p+b(u,(function(t,e){return t.width})),x=y+d);let A=0,w=0;if("top"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=o,Do(i,0,x+y),ko(a,0,x+y);else if("bottom"===r.legendPosition)A=n.dataAreaSize.width/2-v/2,w=o+n.dataAreaSize.height+y,Do(i,0,x+y);else if("left"===r.legendPosition)A=0,w=o+n.dataAreaSize.height/2-x/2,Do(i,v+p,0),ko(a,v+p,0);else{if("right"!==r.legendPosition)return;A=n.dataAreaSize.width+p,w=o+n.dataAreaSize.height/2-x/2,Do(i,v+p,0)}let D=e.graphArea.append("g").attr("id","legend").attr("transform","translate("+A+","+w+")"),k=D.append("rect").attr("class","tracker-legend").attr("width",v).attr("height",x);r.legendBgColor&&k.style("fill",r.legendBgColor),r.legendBorderColor&&k.style("stroke",r.legendBorderColor);let C=p,M=d,T=C+p+m,_=M;if("vertical"===r.legendOrientation)D.selectAll("markers").data(s).enter().append("circle").attr("cx",C+m/2).attr("cy",(function(t,e){return M+e*y})).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),D.selectAll("labels").data(s).enter().append("text").attr("x",T).attr("y",(function(t,e){return _+e*y})).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}));else if("horizontal"===r.legendOrientation){let t=0;t=0,D.selectAll("markers").data(s).enter().append("circle").attr("cx",(function(e,n){return 0===n?t=C+m/2:t+=u[n].width+p+m+p,t})).attr("cy",M).attr("r",(function(t,e){return 5})).style("fill",(function(t,e){return r.dataColor[e]})),t=0,D.selectAll("labels").data(s).enter().append("text").attr("x",(function(e,n){return 0===n?t=T:t+=u[n].width+p+m+p,t})).attr("y",_).text((function(t,e){return t})).style("alignment-baseline","middle").attr("class","tracker-legend-label").style("fill",(function(t,e){return r.dataColor[e]}))}}(0,r,e,n),function(t,e,n){let r=Qt(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}(t,r,e)}function Ho(t,e,n){if(!e||!n)return;let r="";n.template,r=n.template;let i=Yo(r,e);if(i.startsWith("Error:"))return i;if(r=i,""!==r){let e=Qt(t).append("div");if(r.includes("\n")||r.includes("\\n")){let t=r.split(/(\n|\\n)/);for(let n of t)"\n"!==n&&"\\n"!==n&&e.append("div").text(n)}else e.text(r);""!==n.style&&e.attr("style",n.style)}}let Xo=!1;function Wo(t,e){let n=e.dataset;if(0===n.length)return!1;let r=null;if(null===e.selectedDataset){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;if(r)return e.selectedDataset=r.getId(),!0}else{let i=e.selectedDataset,a=n.findIndex((t=>t===i));if(a>=0){if(a===e.dataset.length-1){for(let e of n)if(r=t.datasets.getDatasetById(e),r&&!r.getQuery().usedAsXDataset)break;return!!r&&(e.selectedDataset=r.getId(),!0)}{a++;let i=n[a];if(r=t.datasets.getDatasetById(i),e.selectedDataset=i,r&&!r.getQuery().usedAsXDataset)return!0;Wo(t,e)}}}return!1}function jo(t,e,n,r){Qt(e).select("#svg").remove();for(var i=Object.getOwnPropertyNames(t),a=0;a").attr("id","arrowLeft").attr("transform","translate("+6.5*u+","+(g/2+D.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(a){qo(e,r);let l=i.clone().add(1,"month");Zo(t,e,n,r,l)})).style("cursor","pointer"),p.append("text").text("◦").attr("id","arrowToday").attr("transform","translate("+6*u+","+(g/2+D.height/2)+")").attr("class","tracker-month-title-arrow").on("click",(function(i){qo(e,r);let a=mo(n.dateFormat);Zo(t,e,n,r,a)})).style("cursor","pointer"),g+=8;let k=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];"mon"===r.startWeekOn.toLowerCase()&&k.push(k.shift());let C=bo(k[0],"tracker-month-weekday");e.graphArea.selectAll("weekDays").data(k).enter().append("text").text((function(t){return t})).attr("transform",(function(t,e){return"translate("+(e+.5)*u+","+(g+C.height)+")"})).attr("class","tracker-month-weekday").attr("text-anchor","middle").style("cursor","default").on("click",(function(t){qo(e,r)})),g+=C.height+8;let M=null;r.dividingLineColor?M=r.dividingLineColor:r.color&&(M=r.color);let T=e.graphArea.append("rect").attr("x",0).attr("y",g).attr("width",6.5*u+C.width).attr("height",1).attr("class","tracker-month-dividing-line");M&&T.style("fill",M),g+=1,p.attr("height",g),e.header=p,ko(e.dataArea,0,g)}function Qo(t,e,n,r,i){if(!n||!r)return;let a=r.mode;if("circle"!==a&&"annotation"!==a)return"Unknown month view mode";let l=r.selectedDataset;if(null===l)return;let o=n.datasets.getDatasetById(l);if(!o)return;let s=r.dataset.findIndex((t=>t===l));l<0&&(s=0);let u=r.threshold[s];i.month(),i.daysInMonth();let c=bo("30","tracker-month-label"),f=2.8*Math.max(c.width,c.height),h=f/2.8*1.8/2,d=(f-2*h)/2,g=m(o.getValues());null!==r.yMin[s]&&(g=r.yMin[s]);let p=y(o.getValues());null!==r.yMax[s]&&(p=r.yMax[s]);let v=!0;(null===p||null===g||p<=g)&&(v=!1);const x=i.clone().startOf("month");let A=x.clone().subtract(x.day(),"days");"mon"===r.startWeekOn.toLowerCase()&&(A=A.add(1,"days"));const w=i.clone().endOf("month");let b=w.clone().add(7-w.day()-1,"days");"mon"===r.startWeekOn.toLowerCase()&&(b=b.add(1,"days"));const D=o.getStartDate(),k=o.getEndDate();let C=r.showAnnotation,M=r.annotation,T=M[s],_=r.showAnnotationOfAllTargets,E=[],F=0,S=0,B=0;for(let t=A.clone();t<=b;t.add(1,"days")){t=co(po(t,n.dateFormat),n.dateFormat),"2021-09-13"===t.format("YYYY-MM-DD")&&(Xo=!1),"mon"===r.startWeekOn.toLowerCase()?(F=t.day()-1,F<0&&(F=6),S=Math.floor(B/7)):(F=t.day(),S=Math.floor(B/7));let e=!0;(t.diff(x)<0||t.diff(w)>0)&&(e=!1);let i=!0;D&&k&&t.diff(D)>=0&&t.diff(k)<=0&&(i=!1);const a=o.getValue(t);Xo&&(console.log(o),console.log(po(t,n.dateFormat)),console.log(a));const l=null!=a&&a>u;let s=null;r.circleColorByValue&&v&&null!==a&&(s=(a-g)/(p-g)),Xo&&(console.log(g),console.log(p),console.log(s));let c=o.getValue(t,1),f=o.getValue(t,-1),h=!1;null!==a&&a>u&&null!==f&&f>u&&(h=!0);let d=!1;null!==a&&a>u&&null!==c&&c>u&&(d=!0),Xo&&(console.log(`preValue: ${f}, curValue: ${a}, nextValue: ${c}`),console.log(r.threshold),console.log(`streakIn: ${h}, streakOut: ${d}`));let y="";if(C)if(_)for(let e of r.dataset){let i=r.dataset.findIndex((t=>t===e));if(i>=0){let a=n.datasets.getDatasetById(e).getValue(t),l=r.threshold[i];null!==a&&a>l&&(y+=M[i])}}else a>u&&(y=T);E.push({date:po(t,n.dateFormat),value:a,scaledValue:s,dayInMonth:t.date(),isInThisMonth:e,isOutOfDataRange:i,row:S,col:F,showCircle:l,streakIn:h,streakOut:d,annotation:y}),B++,Xo&&(Xo=!1)}let N=(F+1)*f,L=Gr().domain([-.5,6.5]).range([0,N]);if("circle"===a&&r.showCircle&&r.showStreak){let t="#69b3a2";r.circleColor?t=r.circleColor:r.color&&(t=r.color),e.dataArea.selectAll("streakIn").data(E.filter((function(t){return t.streakIn}))).enter().append("rect").attr("x",(function(t){return L(t.col)-h-d})).attr("y",(function(t){return L(t.row)-1.5})).attr("width",d).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?xn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})),e.dataArea.selectAll("streakOut").data(E.filter((function(t){return t.streakOut}))).enter().append("rect").attr("x",(function(t){return L(t.col)+h})).attr("y",(function(t){return L(t.row)-1.5})).attr("width",d).attr("height",3).style("fill",(function(e){return e.showCircle?r.circleColorByValue?null!==e.scaledValue?xn("white",t)(.8*e.scaledValue+.2):"none":t:"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1}))}let I="#69b3a2";r.circleColor?I=r.circleColor:r.color&&(I=r.color),"circle"===a&&r.showCircle&&e.dataArea.selectAll("dot").data(E).enter().append("circle").attr("r",h).attr("cx",(function(t){return L(t.col)})).attr("cy",(function(t){return L(t.row)})).style("fill",(function(t){if(t.showCircle){if(!r.circleColorByValue)return I;if(null!==t.scaledValue){return xn("white",I)(.8*t.scaledValue+.2)}return"none"}return"none"})).style("opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).style("cursor","default");let O=po(window.moment(),n.dateFormat);if("circle"===a&&r.showTodayRing){let t=e.dataArea.selectAll("todayRing").data(E.filter((function(t){return t.date===O}))).enter().append("circle").attr("r",.9*h).attr("cx",(function(t){return L(t.col)})).attr("cy",(function(t){return L(t.row)})).attr("class","tracker-month-today-circle").style("cursor","default");""!==r.todayRingColor?t.style("stroke",r.todayRingColor):t.style("stroke","white")}"circle"===a&&r.showSelectedRing&&e.dataArea.selectAll("selectedRing").data(E).enter().append("circle").attr("r",h).attr("cx",(function(t){return L(t.col)})).attr("cy",(function(t){return L(t.row)})).attr("id",(function(t){return"tracker-selected-circle-"+t.date})).attr("class","tracker-month-selected-circle").style("cursor","default").style("stroke","none"),e.dataArea.selectAll("dayLabel").data(E).enter().append("text").text((function(t){return t.dayInMonth.toString()})).attr("transform",(function(t){return"translate("+L(t.col)+","+(L(t.row)+c.height/4)+")"})).style("fill-opacity",(function(t){return t.isOutOfDataRange||r.dimNotInMonth&&!t.isInThisMonth?.2:1})).attr("date",(function(t){return t.date})).attr("value",(function(t){return t.value})).attr("valueType",(function(t){return Rl[o.valueType]})).attr("class","tracker-month-label").on("click",(function(t){qo(e,r);let n=Qt(this).attr("date");if(r.selectedDate=n,r.showSelectedRing&&e.dataArea.select("#tracker-selected-circle-"+n).style("stroke",r.selectedRingColor),r.showSelectedValue){let t=Qt(this).attr("value"),n="";if("Time"===Qt(this).attr("valueType")){n=window.moment("00:00","HH:mm",!0).add(parseFloat(t),"seconds").format("HH:mm")}else n=t;e.monitor.text(n)}})).style("cursor","pointer"),"annotation"===a&&C&&e.dataArea.selectAll("dayAnnotation").data(E).enter().append("text").text((function(t){return t.annotation})).attr("transform",(function(t){let e=L(t.col),n=L(t.row)+c.height/4;return t.annotation&&(n+=h),"translate("+e+","+n+")"})).attr("class","tracker-month-annotation");let V=parseFloat(e.svg.attr("width")),P=parseFloat(e.svg.attr("height")),$=parseFloat(e.graphArea.attr("width")),Y=parseFloat(e.graphArea.attr("height")),R=7*f+parseFloat(e.header.attr("height")),z=7*f;R>P&&Do(e.svg,0,R-P),z>V&&Do(e.svg,z-V,0),R>Y&&Do(e.graphArea,0,R-Y),z>$&&Do(e.svg,z-$,0)}function Zo(t,e,n,r,i){n&&Ko&&(Go(t,e=jo(e,t,n),n,r,i),Qo(0,e,n,r,i))}function Ko(t,e,n){if(!e||!Ko)return;n.dataset;let r=0;for(let t of e.datasets)t.getQuery().usedAsXDataset||r++;if(0===r)return"No available dataset found";if(Wo(e,n),null===n.selectedDataset)return"No available dataset found";let i={};i=jo(i,t,e);let a=null;if(n.initMonth){if(a=go(n.initMonth,e.dateFormat),!a){let t=window.moment(n.initMonth,"YYYY-MM",!0);if(!t.isValid())return"Invalid initMonth";a=t}}else a=e.datasets.getDates().last();a&&(Go(t,i,e,n,a),Qo(0,i,e,n,a),function(t,e,n){let r=Qt(t),i=e.svg,a=parseFloat(i.attr("width")),l=parseFloat(i.attr("height"));i.attr("width",null).attr("height",null).attr("viewBox",`0 0 ${a} ${l}`).attr("preserveAspectRatio","xMidYMid meet"),n.fitPanelWidth?r.style("width","100%"):(r.style("width",(a*n.fixedScale).toString()+"px"),r.style("height",(l*n.fixedScale).toString()+"px"))}(t,i,e))}function Jo(t,e,n){if(e&&Jo)return"Under construction"}function ts(t,e,n){if(!e||!n)return;let r=parseFloat(n.dataset);e.datasets.getDatasetById(r),"horizontal"===n.orientation?e.dataAreaSize={width:250,height:24}:"vertical"===n.orientation&&(e.dataAreaSize={width:24,height:250});let i=function(t,e,n){let r={};if(!e||!n)return;let i=Qt(t).append("svg").attr("id","svg").attr("width",e.dataAreaSize.width+e.margin.left+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.top+e.margin.bottom);r.svg=i;let a=i.append("g").attr("id","graphArea").attr("transform","translate("+e.margin.left+","+e.margin.top+")").attr("width",e.dataAreaSize.width+e.margin.right).attr("height",e.dataAreaSize.height+e.margin.bottom);r.graphArea=a;let l=a.append("g").attr("id","dataArea").attr("width",e.dataAreaSize.width).attr("height",e.dataAreaSize.height);return r.dataArea=l,r}(t,e,n),a=function(t,e,n){if(!e||!n)return;let r=n.range,i=r[r.length-1],a=[0,i],l=n.valueUnit,o=function(t){return l&&l.endsWith("%")?jr(0,i,7)(t)+" %":jr(0,i,7)(t)},s=bo(o(i),"tracker-tick-label");if("horizontal"===n.orientation){let n=Gr();n.domain(a).range([0,e.dataAreaSize.width]),t.scale=n;let r=S(n);r.tickFormat(o);let i=t.dataArea.append("g").attr("id","axis").attr("transform","translate(0,"+e.dataAreaSize.height+")").call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",e.dataAreaSize.width+s.width),i.attr("height",6+s.height),Do(t.svg,+s.width,6+s.height),Do(t.graphArea,+s.width,6+s.height)}else if("vertical"===n.orientation){let n=Gr();n.domain(a).range([e.dataAreaSize.height,0]),t.scale=n;let r=B(n);r.tickFormat(o);let i=t.dataArea.append("g").attr("id","axis").attr("x",0).attr("y",0).call(r).attr("class","tracker-axis");t.axis=i,i.selectAll("path").style("stroke","none"),i.selectAll("line"),i.selectAll("text").attr("class","tracker-tick-label"),i.attr("width",6+s.width),i.attr("height",e.dataAreaSize.width),Do(t.svg,6+s.width,0),Do(t.graphArea,6+s.width,0),ko(t.dataArea,6+s.width,0)}}(i,e,n);if("string"==typeof a)return a;!function(t,e,n){if(!e||!n)return;if(n.title){let r=bo(n.title,"tracker-title-small");if("horizontal"===n.orientation){let i=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",r.width/2).attr("y",e.dataAreaSize.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=i,Do(t.svg,r.width+6,0),Do(t.graphArea,r.width+6,0),ko(t.dataArea,r.width+6,0)}else if("vertical"===n.orientation){let i=e.dataAreaSize.width/2;r.width>e.dataAreaSize.width&&(Do(t.svg,r.width-e.dataAreaSize.width,0),Do(t.graphArea,r.width-e.dataAreaSize.width,0),ko(t.dataArea,r.width/2-e.dataAreaSize.width/2,0),i=r.width/2);let a=parseFloat(t.axis.attr("width")),l=t.graphArea.append("text").text(n.title).attr("id","title").attr("x",i+a).attr("y",r.height/2).attr("height",r.height).attr("class","tracker-title-small");t.title=l,Do(t.svg,0,r.height+6),Do(t.graphArea,0,r.height+6),ko(t.dataArea,0,r.height+6)}}if(n.valueUnit){let r=bo(n.valueUnit,"tracker-tick-label");if("horizontal"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",-1*(r.width+6)).attr("y",e.dataAreaSize.height+6).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i}else if("vertical"===n.orientation){let i=t.dataArea.append("text").text(n.valueUnit).attr("id","unit").attr("x",e.dataAreaSize.width/2-r.width/2).attr("y",-(r.height/2+6)).attr("height",r.height).attr("class","tracker-tick-label");t.unit=i,Do(t.svg,0,r.height+6),Do(t.graphArea,0,r.height+6),ko(t.dataArea,0,r.height+6)}}}(i,e,n),function(t,e,n){if(!e||!n)return;let r=t.scale,i=n.range,a=n.rangeColor,l=[],o=0;for(let t=0;t=r&&(e=n=r):(e>r&&(e=r),no)&&(o=e.getYMax()),u=e.valueType===Rl.Time,null===s)s=u;else if(u!==s)return"Not all values in time format"}let c=null;"left"===r?c=n.yMin[0]:"right"===r&&(c=n.yMin[1]);let f=!1;"number"!=typeof c?c=l:f=!0;let h=null;"left"===r?h=n.yMax[0]:"right"===r&&(h=n.yMax[1]);let d=!1;if("number"!=typeof h?h=o:d=!0,h0&&(g=0));let v=[g,p];("left"===r&&n.reverseYAxis[0]||"right"===r&&n.reverseYAxis[1])&&(v=[p,g]),m.domain(v).range([e.dataAreaSize.height,0]),"left"===r?t.leftYScale=m:"right"===r&&(t.rightYScale=m);let x="";"left"===r?x=n.yAxisColor[0]:"right"===r&&(x=n.yAxisColor[1]);let A="";"left"===r?A=n.yAxisLabelColor[0]:"right"===r&&(A=n.yAxisLabelColor[1]);let b="";"left"===r?b=n.yAxisLabel[0]:"right"===r&&(b=n.yAxisLabel[1]);let D="",k=null,C=null;"left"===r?(D=n.yAxisUnit[0],k=n.yAxisTickInterval[0],C=n.yAxisTickLabelFormat[0]):"right"===r&&(D=n.yAxisUnit[1],k=n.yAxisTickInterval[1],C=n.yAxisTickLabelFormat[1]);let M,T=null;if(u?T=ho(k):(T=parseFloat(k),Number.isNumber(T)&&!Number.isNaN(T)||(T=null)),"left"===r?M=B(m):"right"===r&&(M=F(2,m)),M){let t=function(t,e,n,r=!1){if(r){if(n){function i(t){return window.moment("00:00","HH:mm",!0).add(t,"seconds").format(n)}return i}{function a(n){const r=Math.abs(e-t);let i=window.moment("00:00","HH:mm",!0).add(n,"seconds").format("HH:mm");return r>43200&&(ne||(n-t)/3600%2<1)&&(i=""),i}return a}}if(n){function l(t){return Bo.sprintf("%"+n,t)}return l}return jr(t,e,10)}(g,p,C,u);t&&M.tickFormat(t);let e=function(t,e,n,r=!1){const i=Math.abs(e-t);let a=[];r?a=n&&window.moment.isDuration(n)?w(t,e,Math.abs(n.asSeconds())):i>18e3?w(t=3600*Math.floor(t/3600),e=3600*Math.ceil(e/3600),3600):w(t=1800*Math.floor(t/1800),e=1800*Math.ceil(e/1800),1800):n&&"number"==typeof n&&(a=w(t,e,n));return 0===a.length?null:a}(g,p,T,u);e&&M.tickValues(e)}let _=t.dataArea.append("g").attr("id","yAxis").call(M).attr("class","tracker-axis");"right"==r&&_.attr("transform","translate("+e.dataAreaSize.width+" ,0)"),"left"===r?t.leftYAxis=_:"right"===r&&(t.rightYAxis=_);let E=_.selectAll("path");x&&E.style("stroke",x);let S=_.selectAll("line");x&&S.style("stroke",x);let N=_.selectAll("text").attr("class","tracker-tick-label");x&&N.style("fill",x);let L=0;for(let t of N)if(t.textContent){let e=bo(t.textContent,"tracker-axis-label");e.width>L&&(L=e.width)}""!==D&&(b+=" ("+D+")");let I=bo(b),O=_.append("text").text(b).attr("transform","rotate(-90)").attr("x",-1*e.dataAreaSize.height/2).attr("class","tracker-axis-label");"left"===r?O.attr("y",-6-L-I.height/2):O.attr("y",6+L+I.height),A&&O.style("fill",A);let V=I.height+L+6;_.attr("width",V),Do(t.svg,V,0),Do(t.graphArea,V,0),"left"===r&&(ko(t.dataArea,V,0),t.title&&ko(t.title,V,0))}function rs(t,e,n,r,i){if(!e||!n)return;let a=null;if("left"===i?a=t.leftYScale:"right"===i&&(a=t.rightYScale),n.showLine[r.getId()]){let e=function(t,e){var n=cl(!0),r=null,i=Nl,a=null,l=Dl(o);function o(o){var s,u,c,f=(o=Sl(o)).length,h=!1;for(null==r&&(a=i(c=l())),s=0;s<=f;++s)!(s0&&(i.style("stroke",n.pointBorderColor[r.getId()]),i.style("stroke-width",n.pointBorderWidth[r.getId()]))),n.allowInspectData&&function(t,e,n){let r=e.dataArea.append("svg").style("opacity",0),i=r.append("rect").attr("x",0).attr("y",0),a=r.append("text"),l=a.append("tspan").attr("class","tracker-tooltip-label"),o=a.append("tspan").attr("class","tracker-tooltip-label"),s=3,u=3;t.on("mouseenter",(function(t){const[e,c]=function(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}(t);let f=0,h=0,d="date: "+Qt(this).attr("date"),g=bo(d,"tracker-tooltip-label");l.text(d),g.width>f&&(f=g.width),h+=g.height,l.attr("x",s).attr("y",h);let p="value: ",y=Qt(this).attr("valueType"),m=Qt(this).attr("value");if("Time"===y){p+=window.moment("00:00","HH:mm",!0).add(parseFloat(m),"seconds").format("HH:mm"),o.text(p)}else p+=m,o.text(p);let v=bo(p,"tracker-tooltip-label");v.width>f&&(f=v.width),h+=u+v.height,o.attr("x",s).attr("y",h),f+=2*s,h+=2*u,a.attr("width",f).attr("height",h),i.attr("width",f).attr("height",h).attr("class","tracker-tooltip");let x=e,A=c,w=12,b=12;x=e+w+f>n.dataAreaSize.width?e-f-w:e+w,A=c-b-h<0?c+b:c-b-h,r.attr("x",x).attr("y",A),r.transition().duration(200).style("opacity",1)})).on("mouseleave",(function(){r.transition().duration(500).style("opacity",0)}))}(i,t,e)}}function as(t,e,n,r,i,a,l){if(!e||!n)return;let o=e.dataAreaSize.width/r.getLength(),s=o,u=a,c=l;o-1>0&&(s=o-1),e.stack?(u=0,c=1):s/=l;let f=null;"left"===i?f=t.leftYScale:"right"===i&&(f=t.rightYScale);let h=t.dataArea.selectAll("bar").data(Array.from(r).filter((function(t){return null!==t.value}))).enter().append("rect").attr("x",(function(e,n){if(0===n){let n=u+1-c/2;if(n<1)return t.xScale(e.date)-o/2+u*s+n*s}return t.xScale(e.date)-o/2+u*s})).attr("y",(function(t){return f(Math.max(t.value,0))})).attr("width",(function(t,e){if(0===e){let t=u+1-c/2;return t<0?0:t<1?s*t:s}if(e===r.getLength()-1){let t=1-(u+1-c/2);return t<0?0:t<1?s*t:s}return s})).attr("height",(function(t){if(null!==t.value)return Math.abs(f(t.value)-f(0))})).attr("class","tracker-bar");n.barColor[r.getId()]&&h.style("fill",n.barColor[r.getId()])}function ls(t,e,n){let r=t.svg;t.graphArea;let i=t.dataArea,a=t.title,l=t.xAxis,o=t.leftYAxis,s=t.rightYAxis,u=0;a&&(u=parseFloat(a.attr("height")));let c=parseFloat(l.attr("height")),f=0;o&&(f=parseFloat(o.attr("width")));let h=0;s&&(h=parseFloat(s.attr("width")));let d=e.datasets,g=d.getXDatasetIds(),p=d.getNames(),y=p.map((function(t){return bo(t,"tracker-legend-label")})),m=0,v=0;for(let t=0;tv&&(v=y[t].width,m=t);let x=v/p[m].length,A=y[m].height,w=p.length-g.length,D=2*x,k=A,C=2*x,M=0,T=0;"vertical"===n.legendOrientation?(M=3*D+C+v,T=(w+1)*k):"horizontal"===n.legendOrientation&&(M=(2*D+C)*w+D+b(y,(function(t,e){return g.includes(e)?0:t.width})),T=k+A);let _=0,E=0;if("top"===n.legendPosition)_=f+e.dataAreaSize.width/2-M/2,E=u,Do(r,0,T+k),ko(i,0,T+k);else if("bottom"===n.legendPosition)_=f+e.dataAreaSize.width/2-M/2,E=u+e.dataAreaSize.height+c+k,Do(r,0,T+k);else if("left"===n.legendPosition)_=0,E=u+e.dataAreaSize.height/2-T/2,Do(r,M+D,0),ko(i,M+D,0);else{if("right"!==n.legendPosition)return;_=e.dataAreaSize.width+f+h+D,E=u+e.dataAreaSize.height/2-T/2,Do(r,M+D,0)}let F=t.graphArea.append("g").attr("id","legend").attr("transform","translate("+_+","+E+")"),S=F.append("rect").attr("class","tracker-legend").attr("width",M).attr("height",T);n.legendBgColor&&S.style("fill",n.legendBgColor),n.legendBorderColor&&S.style("stroke",n.legendBorderColor);let B=D,N=A,L=B+D+C,I=N;if("vertical"===n.legendOrientation){n.GetGraphType()===Yl.Line?(F.selectAll("markers").data(p).enter().append("line").attr("x1",B).attr("x2",B+C).attr("y1",(function(t,e){let n=g.filter((t=>ttttt!g.includes(e)))).enter().append("rect").attr("x",(function(t,e){let n=D;for(let[t,r]of y.entries())if(!g.includes(t)){if(!(t=0;t--){if(l.includes(t))continue;let e=n.yAxisLocation[t];"left"===e.toLowerCase()?i.push(t):"right"===e.toLocaleLowerCase()&&a.push(t)}else for(let t=0;ta.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n0&&(s=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){l="Invalid inputs for "+t;break}a[n]=null!==s?s:r}else{if("boolean"!=typeof i){l="Invalid inputs for "+t;break}a[n]=i,o++}}else{let t=e[e.length-1];a[n]=o>0?t:r}}}else if("string"==typeof e){let i=ys(e);if(i.length>1){if(i.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let e=0;e0&&(s=hs(i[e-1].trim())),""===n)a[e]=null!==s?s:r;else{let r=hs(n);if(null===r){l="Invalid inputs for "+t;break}a[e]=r,o++}}else{let t=hs(i[i.length-1].trim());a[e]=o>0&&null!==t?t:r}}else if(""===e);else{let n=hs(e);if(null!==n){a[0]=n,o++;for(let t=1;ta.length;)a.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return l="Too many inputs for parameter '"+t+"'",l;if(0===e.length)return l="Empty array not allowd for "+t,l;for(let n=0;n0&&(s=e[n-1].trim()),"string"==typeof i){if(i=i.trim(),""!==i){l="Invalid inputs for "+t;break}a[n]=null!==s?s:r}else{if("number"!=typeof i){l="Invalid inputs for "+t;break}a[n]=i,o++}}else{let t=e[e.length-1];a[n]=o>0?t:r}}}else if("string"==typeof e){let i=ys(e);if(i.length>1){if(i.length>n)return l="Too many inputs for parameter '"+t+"'",l;for(let n=0;n0&&(s=wo(i[n-1].trim()).value),""===e)null!==s&&Number.isNumber(s)?a[n]=s:a[n]=r;else{let r=wo(e).value;if(null===r){l="Invalid inputs for "+t;break}a[n]=r,o++}}else{let t=wo(i[e.length-1].trim()).value;a[n]=o>0&&null!==t?t:r}}else if(""===e);else{let n=wo(e).value;if(null!==n){a[0]=n,o++;for(let t=1;tl.length;)l.push(r);if(null==e);else if("object"==typeof e&&null!==e){if(Array.isArray(e)){if(e.length>n)return o="Too many inputs for parameter '"+t+"'",o;if(0===e.length)return o="Empty array not allowd for "+t,o;for(let n=0;n0&&(u=e[n-1].trim()),"string"!=typeof a){o="Invalid inputs for "+t;break}if(a=a.trim(),""===a)l[n]=null!==u?u:r;else if(i){if(!i(a)){o="Invalid inputs for "+t;break}l[n]=a,s++}else l[n]=a,s++}else{let t=e[e.length-1].trim();l[n]=s>0?t:r}}}else if("string"==typeof e){let a=ys(e);if(a.length>1){if(a.length>n)return o="Too many inputs for parameter '"+t+"'",o;for(let e=0;e0&&(u=a[e-1].trim()),""===n)l[e]=null!==u?u:r;else if(i){if(!i(n)){o="Invalid inputs for "+t;break}l[e]=n,s++}else l[e]=n,s++}else{let t=a[a.length-1].trim();l[e]=s>0?t:r}}else if(""===e);else if(i)if(i(e)){l[0]=e,s++;for(let t=1;t1)for(let e of r){let r=parseFloat(e.trim());if(Number.isNaN(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}else{if(""===e){return`Empty ${t} is not allowed.`}{let r=parseFloat(e);if(!Number.isNumber(r)){return`Parameter '${t}' accepts only numbers`}n.push(r)}}}else{if("number"!=typeof e){return`Invalid ${t}`}n.push(e)}return n}function bs(t,e){let n=[];if(null==e)return n;if("object"==typeof e){if(Array.isArray(e))for(let t of e)"string"==typeof t&&n.push(t.trim())}else{if("string"!=typeof e){return`Invalid ${t}`}{let r=ys(e);if(r.length>1)for(let t of r)n.push(t.trim());else{if(""===e){return`Empty ${t} is not allowed.`}n.push(e)}}}for(let t=0;t2)return"yAxisLabel accepts not more than two values for left and right y-axes";e.yAxisLabel=n;let r=As("yAxisColor",null==t?void 0:t.yAxisColor,2,"",ps,!0);if("string"==typeof r)return r;if(r.length>2)return"yAxisColor accepts not more than two values for left and right y-axes";e.yAxisColor=r;let i=As("yAxisLabelColor",null==t?void 0:t.yAxisLabelColor,2,"",ps,!0);if("string"==typeof i)return i;if(i.length>2)return"yAxisLabelColor accepts not more than two values for left and right y-axes";e.yAxisLabelColor=i;let a=As("yAxisUnit",null==t?void 0:t.yAxisUnit,2,"",null,!0);if("string"==typeof a)return a;if(a.length>2)return"yAxisUnit accepts not more than two values for left and right y-axes";e.yAxisUnit=a,e.xAxisTickInterval=xs(null==t?void 0:t.xAxisTickInterval,e.xAxisTickInterval);let l=As("yAxisTickInterval",null==t?void 0:t.yAxisTickInterval,2,null,null,!0);if("string"==typeof l)return l;if(l.length>2)return"yAxisTickInterval accepts not more than two values for left and right y-axes";e.yAxisTickInterval=l,e.xAxisTickLabelFormat=xs(null==t?void 0:t.xAxisTickLabelFormat,e.xAxisTickLabelFormat);let o=As("yAxisTickLabelFormat",null==t?void 0:t.yAxisTickLabelFormat,2,null,null,!0);if("string"==typeof o)return o;if(o.length>2)return"yAxisTickLabelFormat accepts not more than two values for left and right y-axes";e.yAxisTickLabelFormat=o;let s=vs("yMin",null==t?void 0:t.yMin,2,null);if("string"==typeof s)return s;if(s.length>2)return"yMin accepts not more than two values for left and right y-axes";e.yMin=s;let u=vs("yMax",null==t?void 0:t.yMax,2,null);if("string"==typeof u)return u;if(u.length>2)return"yMax accepts not more than two values for left and right y-axes";e.yMax=u;let c=ms("reverseYAxis",null==t?void 0:t.reverseYAxis,2,!1);return"string"==typeof c?c:c.length>2?"reverseYAxis accepts not more than two values for left and right y-axes":void(e.reverseYAxis=c)}function ks(t){let e=[];if(null!==t){const n=Object.keys(t);for(let t of n)e.push(t.toString())}return e}function Cs(t,e){return co(uo(t.basename,e.dateFormatPrefix,e.dateFormatSuffix),e.dateFormat)}function Ms(t,e,n){let r=window.moment(""),i=t.frontmatter;if(i&&vo(i,e.getTarget())){let t=vo(i,e.getTarget());"string"==typeof t&&(t=uo(t,n.dateFormatPrefix,n.dateFormatSuffix),r=co(t,n.dateFormat))}return r}function Ts(t,e,n){let r,i=window.moment(""),a=new RegExp(e,"gm");for(;r=a.exec(t);)if(void 0!==r.groups&&void 0!==r.groups.value){let t=r.groups.value.trim();if(t=uo(t,n.dateFormatPrefix,n.dateFormatSuffix),i=co(t,n.dateFormat),i.isValid())return i}return i}function _s(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),Ts(t,"(^|\\s)#"+r+"(\\/[\\w-]+)*(:(?[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",n)}function Es(t,e,n){return window.moment(""),Ts(t,e.getTarget(),n)}function Fs(t,e,n){window.moment("");let r=e.getTarget();return e.getParentTarget()&&(r=e.getParentTarget()),r=r.replace("-","[\\s\\-]"),Ts(t,"(^| |\\t)\\*{0,2}"+r+"\\*{0,2}(::[ |\\t]*(?[\\d\\.\\/\\-\\w,@; \\t:]*))(\\r\\?\\n|\\r|$)",n)}function Ss(e,n,r){let i=window.moment("");if(e&&e instanceof t.TFile){let t=n.getTarget();if("cDate"===t){i=yo(e.stat.ctime,r.dateFormat)}else if("mDate"===t){i=yo(e.stat.mtime,r.dateFormat)}else"name"===t&&(i=Cs(e,r))}return i}function Bs(t,e,n){window.moment("");let r=e.getType(),i=e.getTarget();return i=r===$l.Task?"\\[[\\sx]\\]\\s"+i:r===$l.TaskDone?"\\[x\\]\\s"+i:r===$l.TaskNotDone?"\\[\\s\\]\\s"+i:"\\[[\\sx]\\]\\s"+i,Ts(t,i,n)}function Ns(t,e,n,r){if(t.has(e)){t.get(e).push({query:n,value:r})}else{let i=new Array;i.push({query:n,value:r}),t.set(e,i)}}function Ls(t,e,n,r,i,a){let l,o=new RegExp(e,"gmu"),s=0,u=!1;for(;l=o.exec(t);)if(a.ignoreAttachedValue[n.getId()])s+=a.constValue[n.getId()],u=!0,n.addNumTargets();else if(void 0!==l.groups&&void 0!==l.groups.value){let t=l.groups.value.trim().split(n.getSeparator());if(!t)continue;if(1===t.length){let e=wo(t[0].trim(),a.textValueMap);null!==e.value&&(e.type===Rl.Time?(s=e.value,u=!0,n.valueType=Rl.Time,n.addNumTargets()):a.ignoreZeroValue[n.getId()]&&0===e.value||(s+=e.value,u=!0,n.addNumTargets()))}else if(t.length>n.getAccessor()&&n.getAccessor()>=0){let e=wo(t[n.getAccessor()].trim(),a.textValueMap);null!==e.value&&(e.type===Rl.Time?(s=e.value,u=!0,n.valueType=Rl.Time,n.addNumTargets()):(s+=e.value,u=!0,n.addNumTargets()))}}else s+=a.constValue[n.getId()],u=!0,n.addNumTargets();if(u){return Ns(r,i.get(a.xDataset[n.getId()]),n,s),!0}return!1}function Is(e,n,r,i,a,l){if(e&&e instanceof t.TFile){let t=r.getTarget(),o=l.get(i.xDataset[r.getId()]);if("cDate"===t){let t=e.stat.ctime;return r.valueType=Rl.Date,r.addNumTargets(),Ns(a,o,r,t),!0}if("mDate"===t){let t=e.stat.mtime;return r.valueType=Rl.Date,r.addNumTargets(),Ns(a,o,r,t),!0}if("size"===t){let t=e.stat.size;return r.addNumTargets(),Ns(a,o,r,t),!0}if("numWords"===t){return Ns(a,o,r,function(t){t=Co(t);var e=new RegExp(["(?:[0-9]+(?:(?:,|\\.)[0-9]+)*|[\\-"+/A-Za-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source+"])+",/[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u4E00-\u9FD5]{1}/.source].join("|"),"g");return(t.match(e)||[]).length}(n)),!0}if("numChars"===t){let t=n.length;return r.addNumTargets(),Ns(a,o,r,t),!0}if("numSentences"===t){let t=function(t){return(((t=Co(t))||"").match(/[^.。!!??\s][^.。!!??]*(?:[.!?](?!['‘’"“”「」『』]?\s|$)[^.。!!??]*)*[.。!!??]?['’"”」』]?(?=\s||$)/gm)||[]).length}(n);return r.addNumTargets(),Ns(a,o,r,t),!0}if("name"===t){let t=0,n=!1,l=wo(e.basename,i.textValueMap);null!==l.value&&(l.type===Rl.Time?(t=l.value,n=!0,r.valueType=Rl.Time,r.addNumTargets()):i.ignoreZeroValue[r.getId()]&&0===l.value||(t+=l.value,n=!0,r.addNumTargets()));let s=null;if(n&&(s=t),null!==s)return Ns(a,o,r,s),!0}}return!1}const Os={folder:"/",dateFormat:"YYYY-MM-DD"};class Vs extends t.PluginSettingTab{constructor(t,e){super(t,e),this.plugin=e}display(){let{containerEl:e}=this;e.empty(),new t.Setting(e).setName("Default folder location").setDesc("Files in this folder will be parsed and used as input data of the tracker plugin.\nYou can also override it using 'folder' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("Folder Path").setValue(this.plugin.settings.folder).onChange((async t=>{this.plugin.settings.folder=t,await this.plugin.saveSettings()})))),new t.Setting(e).setName("Default date format").setDesc("This format is used to parse the date in your diary title.\nYou can also override it using 'dateFormat' argument in the tracker codeblock.").addText((t=>t.setPlaceholder("YYYY-MM-DD").setValue(this.plugin.settings.dateFormat).onChange((async t=>{this.plugin.settings.dateFormat=t,await this.plugin.saveSettings()}))))}}class Ps extends t.Plugin{async onload(){console.log("loading obsidian-tracker plugin"),await this.loadSettings(),this.addSettingTab(new Vs(this.app,this)),this.registerMarkdownCodeBlockProcessor("tracker",this.postprocessor.bind(this)),this.addCommand({id:"add-line-chart-tracker",name:"Add Line Chart Tracker",callback:()=>this.addCodeBlock(Yl.Line)}),this.addCommand({id:"add-bar-chart-tracker",name:"Add Bar Chart Tracker",callback:()=>this.addCodeBlock(Yl.Bar)}),this.addCommand({id:"add-summary-tracker",name:"Add Summary Tracker",callback:()=>this.addCodeBlock(Yl.Summary)})}async loadSettings(){this.settings=Object.assign({},Os,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}renderErrorMessage(t,e,n){!function(t,e){Qt(t).select("#svg").remove(),Qt(t).append("div").text(e).style("background-color","white").style("margin-bottom","20px").style("padding","10px").style("color","red")}(e,t),n.appendChild(e)}onunload(){console.log("unloading obsidian-tracker plugin")}getFilesInFolder(e,n=!0){let r=[];for(let i of e.children)i instanceof t.TFile?"md"===i.extension&&r.push(i):i instanceof t.TFolder&&n&&(r=r.concat(this.getFilesInFolder(i)));return r}async getFiles(e,n,r=!0){if(!e)return;let i=n.folder,a=n.specifiedFilesOnly,l=n.file,o=n.fileContainsLinkedFiles,s=n.fileMultiplierAfterLink;if(!a){let n=this.app.vault.getAbstractFileByPath(t.normalizePath(i));if(n&&n instanceof t.TFolder){let t=this.getFilesInFolder(n);for(let n of t)e.push(n)}}for(let n of l){let r=n;r.endsWith(".md")||(r+=".md"),r=t.normalizePath(r);let i=this.app.vault.getAbstractFileByPath(r);i&&i instanceof t.TFile&&e.push(i)}let u=1,c=!0;""===s?c=!1:/^[0-9]+$/.test(s)?(u=parseFloat(s),c=!1):/\?/.test(s)||(c=!1);for(let r of o){r.endsWith(".md")||(r+=".md");let i=this.app.vault.getAbstractFileByPath(t.normalizePath(r));if(i&&i instanceof t.TFile){let a=this.app.metadataCache.getFileCache(i),l=(await this.app.vault.adapter.read(i.path)).split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/);if(!(null==a?void 0:a.links))continue;for(let i of a.links){if(!i)continue;let a=this.app.metadataCache.getFirstLinkpathDest(i.link,r);if(a&&a instanceof t.TFile){if(c){let t=i.position.end.line;if(t>=0&&t1)for(let e of t){if(e=e.trim(),""===e){a="Empty search target is not allowed.";break}l.push(e)}else""===r.searchTarget?a="Empty search target is not allowed.":l.push(r.searchTarget)}else a="Invalid search target (searchTarget)";for(let t=0;tt!==$l.Table)).length>0)return"searchType 'table' doestn't work with other types for now";let c=[],f=As("separator",r.separator,o,"",null,!0);if("string"==typeof f)return f;c=f.map((t=>"comma"===t||"\\,"===t?",":t));let h=vs("xDataset",r.xDataset,o,-1);if("string"==typeof h)return h;let d=h.map((t=>t<0||t>=o?-1:t)),g=[];for(let t=0;tt.getId()===e)))return a="Duplicated dataset id for key '"+t+"'",a;C.push(t),m.push(t)}for(let t of i)if(!y.includes(t)&&!m.includes(t))return a="'"+t+"' is not an available key",a;if(0===v.length+x.length+A.length+w.length+k.length+b.length+D.length)return"No output parameter provided, please place line, bar, pie, month, bullet, or summary.";p.folder=xs(null==r?void 0:r.folder,n.settings.folder),""===p.folder.trim()&&(p.folder=n.settings.folder);let M=n.app.vault.getAbstractFileByPath(t.normalizePath(p.folder));if(!(M&&M instanceof t.TFolder))return"Folder '"+p.folder+"' doesn't exist";if("string"==typeof r.file){let t=bs("file",r.file);if("string"==typeof t)return t;p.file=t}if("boolean"==typeof r.specifiedFilesOnly&&(p.specifiedFilesOnly=r.specifiedFilesOnly),"string"==typeof r.fileContainsLinkedFiles){let t=bs("fileContainsLinkedFiles",r.fileContainsLinkedFiles);if("string"==typeof t)return t;p.fileContainsLinkedFiles=t}p.fileMultiplierAfterLink=xs(null==r?void 0:r.fileMultiplierAfterLink,p.fileMultiplierAfterLink);const T=r.dateFormat;if("string"==typeof r.dateFormat?""===r.dateFormat?p.dateFormat=n.settings.dateFormat:p.dateFormat=T:p.dateFormat=n.settings.dateFormat,p.dateFormatPrefix=xs(null==r?void 0:r.dateFormatPrefix,p.dateFormatPrefix),p.dateFormatSuffix=xs(null==r?void 0:r.dateFormatSuffix,p.dateFormatSuffix),"string"==typeof r.startDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.startDate))return"'m' for 'minute' is too small for parameter startDate, please use 'd' for 'day' or 'M' for month";let t=uo(r.startDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=go(t,p.dateFormat),e?n=!0:(e=co(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid startDate, the format of startDate may not match your dateFormat "+p.dateFormat;p.startDate=e}if("string"==typeof r.endDate){if(/^([\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)m$/.test(r.endDate))return"'m' for 'minute' is too small for parameter endDate, please use 'd' for 'day' or 'M' for month";let t=uo(r.endDate,p.dateFormatPrefix,p.dateFormatSuffix),e=null,n=!1;if(e=go(t,p.dateFormat),e?n=!0:(e=co(t,p.dateFormat),e.isValid()&&(n=!0)),!n||null===e)return"Invalid endDate, the format of endDate may not match your dateFormat "+p.dateFormat;p.endDate=e}if(null!==p.startDate&&p.startDate.isValid()&&null!==p.endDate&&p.endDate.isValid()&&p.endDateparseInt(t,10))),2==e.length&&(p.aspectRatio=new ro(e[0],e[1]),p.dataAreaSize=p.aspectRatio.recalculateSize(p.dataAreaSize))}let V=vs("margin",r.margin,4,10);if("string"==typeof V)return V;if(V.length>4)return"margin accepts not more than four values for top, right, bottom, and left margins.";p.margin=new io(V[0],V[1],V[2],V[3]);for(let t of C){let e=new jl,n=r[t],i=ks(e),l=ks(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let o=-1,s=t.replace("dataset","");o=""===s?0:parseFloat(s),e.id=o,e.name=xs(null==n?void 0:n.name,e.name);let u=bs("xData",null==n?void 0:n.xData);if("string"==typeof u)return u;e.xData=u;let c=e.xData.length,f=bs("yData",null==n?void 0:n.yData);if("string"==typeof f)return f;if(e.yData=f,e.yData.length!==c)return"Number of elements in xData and yData not matched";p.customDataset.push(e)}for(let t of v){let e=new Gl,n=r[t],i=ks(e),l=ks(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let s=Ds(n,e);if("string"==typeof s)return s;let u=As("lineColor",null==n?void 0:n.lineColor,o,"",ps,!0);if("string"==typeof u)return u;e.lineColor=u;let c=vs("lineWidth",null==n?void 0:n.lineWidth,o,1.5);if("string"==typeof c)return c;e.lineWidth=c;let f=ms("showLine",null==n?void 0:n.showLine,o,!0);if("string"==typeof f)return f;e.showLine=f;let h=ms("showPoint",null==n?void 0:n.showPoint,o,!0);if("string"==typeof h)return h;e.showPoint=h;let d=As("pointColor",null==n?void 0:n.pointColor,o,"#69b3a2",ps,!0);if("string"==typeof d)return d;e.pointColor=d;let g=As("pointBorderColor",null==n?void 0:n.pointBorderColor,o,"#69b3a2",ps,!0);if("string"==typeof g)return g;e.pointBorderColor=g;let y=vs("pointBorderWidth",null==n?void 0:n.pointBorderWidth,o,0);if("string"==typeof y)return y;e.pointBorderWidth=y;let m=vs("pointSize",null==n?void 0:n.pointSize,o,3);if("string"==typeof m)return m;e.pointSize=m;let v=ms("fillGap",null==n?void 0:n.fillGap,o,!1);if("string"==typeof v)return v;e.fillGap=v;let x=As("yAxisLocation",null==n?void 0:n.yAxisLocation,o,"left",gs,!0);if("string"==typeof x)return x;e.yAxisLocation=x,p.line.push(e)}for(let t of x){let e=new Ql,n=r[t],i=ks(e),l=ks(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;let s=Ds(n,e);if("string"==typeof s)return s;let u=As("barColor",null==n?void 0:n.barColor,o,"",ps,!0);if("string"==typeof u)return u;e.barColor=u;let c=As("yAxisLocation",null==n?void 0:n.yAxisLocation,o,"left",gs,!0);if("string"==typeof c)return c;e.yAxisLocation=c,p.bar.push(e)}for(let t of A){let e=new Zl,n=r[t],i=ks(e),l=ks(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.title=xs(null==n?void 0:n.title,e.title);let o=bs("data",null==n?void 0:n.data);if("string"==typeof o)return o;e.data=o;let s=e.data.length,u=As("dataColor",null==n?void 0:n.dataColor,s,null,ps,!0);if("string"==typeof u)return u;e.dataColor=u;let c=As("dataName",null==n?void 0:n.dataName,s,"",null,!0);if("string"==typeof c)return c;e.dataName=c;let f=As("label",null==n?void 0:n.label,s,"",null,!0);if("string"==typeof f)return f;e.label=f,"number"==typeof(null==n?void 0:n.hideLabelLessThan)&&(e.hideLabelLessThan=n.hideLabelLessThan);let h=As("extLabel",null==n?void 0:n.extLabel,s,"",null,!0);if("string"==typeof h)return h;e.extLabel=h,"boolean"==typeof(null==n?void 0:n.showExtLabelOnlyIfNoLabel)&&(e.showExtLabelOnlyIfNoLabel=n.showExtLabelOnlyIfNoLabel),"number"==typeof(null==n?void 0:n.ratioInnerRadius)&&(e.ratioInnerRadius=n.ratioInnerRadius),"boolean"==typeof(null==n?void 0:n.showLegend)&&(e.showLegend=n.showLegend),e.legendPosition=xs(null==n?void 0:n.legendPosition,"right");let d="horizontal";d="top"===e.legendPosition||"bottom"===e.legendPosition?"horizontal":"left"===e.legendPosition||"right"===e.legendPosition?"vertical":"horizontal",e.legendOrientation=xs(null==n?void 0:n.legendOrientation,d),e.legendBgColor=xs(null==n?void 0:n.legendBgColor,e.legendBgColor),e.legendBorderColor=xs(null==n?void 0:n.legendBorderColor,e.legendBorderColor),p.pie.push(e)}for(let t of w){let e=new Kl,n=r[t],i=ks(e),l=ks(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.template=xs(null==n?void 0:n.template,e.template),e.style=xs(null==n?void 0:n.style,e.style),p.summary.push(e)}for(let t of b){let e=new Jl,n=r[t],i=ks(e),l=ks(n);for(let t of l)if(!i.includes(t))return a="'"+t+"' is not an available key",a;e.mode=xs(null==n?void 0:n.mode,e.mode);let o=ws("dataset",null==n?void 0:n.dataset);if("string"==typeof o)return o;if(0===o.length)for(let t of g)o.push(t.getId());e.dataset=o;let s=e.dataset.length;e.startWeekOn=xs(null==n?void 0:n.startWeekOn,e.startWeekOn),"boolean"==typeof(null==n?void 0:n.showCircle)&&(e.showCircle=n.showCircle);let u=ws("threshold",null==n?void 0:n.threshold);if("string"==typeof u)return u;if(e.threshold=u,0===e.threshold.length)for(let t=0;t1))return a="Empty range is not allowed",a;{let t=s[0];if(t<0)return a="Negative range value is not allowed",a;for(let e=1;e{let e=null;u.queries.some((t=>{let e=t.getType();return t.getTarget(),e===$l.Frontmatter||e===$l.Tag||e===$l.Wiki||e===$l.WikiLink||e===$l.WikiDisplay}))&&(e=this.app.metadataCache.getFileCache(t));let n=null;u.queries.some((t=>{let e=t.getType(),n=t.getTarget();return e===$l.Tag||e===$l.Text||e===$l.dvField||e===$l.Task||e===$l.TaskDone||e===$l.TaskNotDone||e===$l.FileMeta&&("numWords"===n||"numChars"===n||"numSentences"===n)}))&&(n=await this.app.vault.adapter.read(t.path));let r=new Map,i=!1;for(let a of u.xDataset)if(!r.has(a)){let l=window.moment("");if(-1===a)l=Cs(t,u);else{let r=u.queries[a];switch(r.getType()){case $l.Frontmatter:l=Ms(e,r,u);break;case $l.Tag:l=_s(n,r,u);break;case $l.Text:l=Es(n,r,u);break;case $l.dvField:l=Fs(n,r,u);break;case $l.FileMeta:l=Ss(t,r,u);break;case $l.Task:case $l.TaskDone:case $l.TaskNotDone:l=Bs(n,r,u)}}l.isValid()?(null!==u.startDate&&lu.endDate&&(i=!0,h.fileOutOfDateRange++)):(i=!0,h.fileNotInFormat++),i||(h.gotAnyValidXValue||(h.gotAnyValidXValue=!0),r.set(a,po(l,u.dateFormat)),h.fileAvailable++,1==h.fileAvailable?(h.minDate=l.clone(),h.maxDate=l.clone()):(lh.maxDate&&(h.maxDate=l.clone())))}if(i)return;const a=u.queries.filter((t=>t.getType()!==$l.Table&&!t.usedAsXDataset)).map((async i=>{if(e&&i.getType()===$l.Tag){let t=function(t,e,n,r,i){let a=t.frontmatter,l=[];if(a&&a.tags){let t=0,o=!1;if(Array.isArray(a.tags))l=l.concat(a.tags);else if("string"==typeof a.tags){let t=a.tags.split(e.getSeparator(!0));for(let e of t){let t=e.trim();""!==t&&l.push(t)}}for(let a of l){if(a===e.getTarget())t+=n.constValue[e.getId()],o=!0,e.addNumTargets();else{if(!a.startsWith(e.getTarget()+"/"))continue;t+=n.constValue[e.getId()],o=!0,e.addNumTargets()}let l=null;return o&&(l=t),Ns(r,i.get(n.xDataset[e.getId()]),e,l),!0}}return!1}(e,i,u,f,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(e&&i.getType()===$l.Frontmatter&&"tags"!==i.getTarget()){let t=function(t,e,n,r,i){let a=t.frontmatter;if(a){let t=vo(a,e.getTarget());if(t){let a=wo(t,n.textValueMap);if(null===a.value&&("true"!==t&&"false"!==t||(a.type=Rl.Number,a.value="true"===t?1:0)),null!==a.value)return a.type===Rl.Time&&(e.valueType=Rl.Time),e.addNumTargets(),Ns(r,i.get(n.xDataset[e.getId()]),e,a.value),!0}else if(e.getParentTarget()&&vo(a,e.getParentTarget())){let t=vo(a,e.getParentTarget()),l=null;if(Array.isArray(t)?l=t.map((t=>t.toString())):"string"==typeof t&&(l=t.split(e.getSeparator())),l&&l.length>e.getAccessor()&&e.getAccessor()>=0){let t=wo(l[e.getAccessor()].trim(),n.textValueMap);if(null!==t.value)return t.type===Rl.Time&&(e.valueType=Rl.Time),e.addNumTargets(),Ns(r,i.get(n.xDataset[e.getId()]),e,t.value),!0}}}return!1}(e,i,u,f,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(e&&(i.getType()===$l.Wiki||i.getType()===$l.WikiLink||i.getType()===$l.WikiDisplay)){let t=function(t,e,n,r,i){let a=t.links;if(!a)return!1;let l=e.getTarget(),o=e.getType(),s="",u=l;for(let t of a){if(!t)continue;let e="";o===$l.Wiki?e=t.displayText?t.displayText:t.link:o===$l.WikiLink?e=t.link:o===$l.WikiDisplay?t.displayText&&(e=t.displayText):e=t.displayText?t.displayText:t.link,e=e.trim(),s+=e+"\n"}return Ls(s,u,e,r,i,n)}(e,i,u,f,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&i.getType()===$l.Tag){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a.length>1&&a.startsWith("#")&&(a=a.substring(1)),Ls(t,"(^|\\s)#"+a+"(\\/[\\w-]+)*(:(?[\\d\\.\\/-]*)[a-zA-Z]*)?([\\.!,\\?;~-]*)?(\\s|$)",e,r,i,n)}(n,i,u,f,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&i.getType()===$l.Text){let t=function(t,e,n,r,i){return Ls(t,e.getTarget(),e,r,i,n)}(n,i,u,f,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(i.getType()===$l.FileMeta){let e=Is(t,n,i,u,f,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=e)}if(n&&i.getType()===$l.dvField){let t=function(t,e,n,r,i){let a=e.getTarget();return e.getParentTarget()&&(a=e.getParentTarget()),a=a.replace("-","[\\s\\-]"),Ls(t,String.raw`(^| |\t|\|)(\[|\()?\*{0,2}`+a+String.raw`\*{0,2}(::[ |\t]*(?[\p{ExtPict}\d\.\/\-\w,@; \t:`+"\\w$€£¥¢₹₨₱₩฿₫₪α-ωΑ-Ω©®℗™℠一-鿿㐀-䶿 、-〿"+String.raw`]*)(\]|\))?)`,e,r,i,n)}(n,i,u,f,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}if(n&&(i.getType()===$l.Task||i.getType()===$l.TaskDone||i.getType()===$l.TaskNotDone)){let t=function(t,e,n,r,i){let a=e.getType(),l=e.getTarget();return l=a===$l.Task?"\\[[\\sx]\\]\\s"+l:a===$l.TaskDone?"\\[x\\]\\s"+l:a===$l.TaskNotDone?"\\[\\s\\]\\s"+l:"\\[[\\sx]\\]\\s"+l,Ls(t,l,e,r,i,n)}(n,i,u,f,r);h.gotAnyValidYValue||(h.gotAnyValidYValue=t)}}));await Promise.all(a)}));if(await Promise.all(d),await this.collectDataFromTable(f,u,h),h.errorMessage)return this.renderErrorMessage(h.errorMessage,i,n);let g="";if(h.minDate.isValid()&&h.maxDate.isValid()&&0!==h.fileAvailable&&h.gotAnyValidXValue||(g="No valid date as X value found in notes",h.fileOutOfDateRange>0&&(g+=`\n${h.fileOutOfDateRange} files are out of the date range.`),h.fileNotInFormat&&(g+=`\n${h.fileNotInFormat} files are not in the right format.`)),null===u.startDate&&null===u.endDate?(u.startDate=h.minDate.clone(),u.endDate=h.maxDate.clone()):null!==u.startDate&&null===u.endDate?u.startDateh.minDate?u.startDate=h.minDate.clone():g="Invalid date range":(u.startDateh.maxDate&&u.endDate>h.maxDate)&&(g="Invalid date range"),g)return this.renderErrorMessage(g,i,n);if(!h.gotAnyValidYValue)return this.renderErrorMessage("No valid Y value found in notes",i,n);let p=new Xl(u.startDate,u.endDate);for(let t of u.queries){let e=p.createDataset(t,u);e.addNumTargets(t.getNumTargets());for(let n=u.startDate.clone();n<=u.endDate;n.add(1,"days"))if(f.has(po(n,u.dateFormat))){let r=f.get(po(n,u.dateFormat)).filter((function(e){return e.query.equalTo(t)}));if(r.length>0){let t=null;for(let e=0;et.getType()===$l.Table)),a=[],l=!1;for(let e of i){let n=e.getParentTarget(),r=this.app.vault.getAbstractFileByPath(t.normalizePath(n+".md"));if(!(r&&r instanceof t.TFile)){l=!0;break}let i=e.getAccessor(),o=e.usedAsXDataset,s=a.find((t=>t.filePath===n&&t.tableIndex===i));if(s)o?s.xDataset=e:s.yDatasets.push(e);else{let t=new lo(n,i);o?t.xDataset=e:t.yDatasets.push(e),a.push(t)}}if(l)r.errorMessage="File containing tables not found";else for(let i of a){let a=i.xDataset;if(!a)continue;let l=i.yDatasets,o=a.getParentTarget(),s=a.getAccessor(),u="";o+=".md";let c=this.app.vault.getAbstractFileByPath(t.normalizePath(o));if(!(c&&c instanceof t.TFile))continue;{r.fileAvailable++;let t,e=await this.app.vault.adapter.read(c.path),n=new RegExp("((\\r?\\n){2}|^)([^\\r\\n]*\\|[^\\r\\n]*(\\r?\\n)?)+(?=(\\r?\\n){2}|$)","gm"),i=0;for(;t=n.exec(e);){if(i===s){u=t[0];break}i++}}let f=u.split(/\r?\n/);f=f.filter((t=>""!==t));let h=0,d=0;if(f.length>=2){let t=f.shift().trim();t=xo(t,"|"),h=t.split("|").length;let e=f.shift().trim();e=xo(e,"|");let n=e.split("|");for(let t of n)if(!t.includes("-"))break;d=f.length}if(0==d)continue;let g=a.getAccessor(1);if(g>=h)continue;let p=[];for(let t of f){let e=xo(t.trim(),"|").split("|");if(gr.maxDate&&(r.maxDate=t.clone())):(r.minDate=t.clone(),r.maxDate=t.clone())):p.push(null)}else p.push(null)}if(p.every((t=>null===t)))return void(r.errorMessage="No valid date as X value found in table");r.gotAnyValidXValue||(r.gotAnyValidXValue=!0);for(let t of l){let i=t.getAccessor(1);if(i>=h)continue;let a=0;for(let l of f){let o=xo(l.trim(),"|").split("|");if(it.getAccessor(2)&&t.getAccessor(2)>=0){let i=null,o=wo(l[t.getAccessor(2)].trim(),n.textValueMap);null!==o.value&&(o.type===Rl.Time&&(t.valueType=Rl.Time),i=o.value,a>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-04Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-04NSave + +  + +# 2025-01-04 + +  + +> [!summary]+ +> Daily note for 2025-01-04 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-04 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🍴: [[Honey-Ginger Butternut Squash Soup]] + +:tv:: [[The Shining (1980)]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-04]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-05.md b/00.01 Admin/Calendars/2025-01-05.md new file mode 100644 index 00000000..32ec5e75 --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-05.md @@ -0,0 +1,136 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-05 +Date: 2025-01-05 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 3.03 +Coffee: 5 +Steps: 12896 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-04|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-06|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-05Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-05NSave + +  + +# 2025-01-05 + +  + +> [!summary]+ +> Daily note for 2025-01-05 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-05 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🛫: [[@@Zürich|Zürich]] to [[@@London|London]] + +:book:: [[Berlin Alexanderplatz]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-05]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-06.md b/00.01 Admin/Calendars/2025-01-06.md new file mode 100644 index 00000000..2857573e --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-06.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-06 +Date: 2025-01-06 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 1.66 +Coffee: 2 +Steps: 6401 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-05|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-07|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-06Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-06NSave + +  + +# 2025-01-06 + +  + +> [!summary]+ +> Daily note for 2025-01-06 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-06 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-06]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-07.md b/00.01 Admin/Calendars/2025-01-07.md new file mode 100644 index 00000000..3133ae80 --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-07.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-07 +Date: 2025-01-07 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 2.71 +Coffee: 3 +Steps: 6118 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-06|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-08|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-07Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-07NSave + +  + +# 2025-01-07 + +  + +> [!summary]+ +> Daily note for 2025-01-07 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-07 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-07]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-08.md b/00.01 Admin/Calendars/2025-01-08.md new file mode 100644 index 00000000..2af81f3c --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-08.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-08 +Date: 2025-01-08 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 2.41 +Coffee: 4 +Steps: 5413 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-07|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-09|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-08Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-08NSave + +  + +# 2025-01-08 + +  + +> [!summary]+ +> Daily note for 2025-01-08 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-08 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-08]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-09.md b/00.01 Admin/Calendars/2025-01-09.md new file mode 100644 index 00000000..008d749e --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-09.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-09 +Date: 2025-01-09 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 1.96 +Coffee: 3 +Steps: 6130 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-08|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-10|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-09Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-09NSave + +  + +# 2025-01-09 + +  + +> [!summary]+ +> Daily note for 2025-01-09 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-09 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-09]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-10.md b/00.01 Admin/Calendars/2025-01-10.md new file mode 100644 index 00000000..2fbc6363 --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-10.md @@ -0,0 +1,136 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-10 +Date: 2025-01-10 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 6.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 2.81 +Coffee: 2 +Steps: 11533 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-09|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-11|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-10Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-10NSave + +  + +# 2025-01-10 + +  + +> [!summary]+ +> Daily note for 2025-01-10 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-10 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🛬: [[@@London|London]] to [[@@Zürich|Zürich]] + +💌: Arrivée [[Davinie|Poupi]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-10]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-11.md b/00.01 Admin/Calendars/2025-01-11.md new file mode 100644 index 00000000..3822c74b --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-11.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-11 +Date: 2025-01-11 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 0.3 +Coffee: 2 +Steps: +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-10|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-12|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-11Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-11NSave + +  + +# 2025-01-11 + +  + +> [!summary]+ +> Daily note for 2025-01-11 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-11 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-11]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-12.md b/00.01 Admin/Calendars/2025-01-12.md new file mode 100644 index 00000000..0dbfe197 --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-12.md @@ -0,0 +1,140 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-12 +Date: 2025-01-12 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 2.58 +Coffee: 2 +Steps: 4498 +Weight: +Ski: 11 +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-11|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-13|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-12Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-12NSave + +  + +# 2025-01-12 + +  + +> [!summary]+ +> Daily note for 2025-01-12 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-12 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +🥐: [[Turkish Eggs]] + +⛷: [[Flumserberg]] with [[Davinie|Poupi]] + +🍽: [[Spicy Szechuan Noodles with Garlic Chilli Oil]] + +:tv:: [[2025-01-12 ⚽️ PSG - ASSE (2-1)]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-12]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-13.md b/00.01 Admin/Calendars/2025-01-13.md new file mode 100644 index 00000000..e129162e --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-13.md @@ -0,0 +1,136 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-13 +Date: 2025-01-13 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 2.2 +Coffee: 5 +Steps: 16817 +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-12|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-14|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-13Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-13NSave + +  + +# 2025-01-13 + +  + +> [!summary]+ +> Daily note for 2025-01-13 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-13 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +💌: Depart [[Davinie|Poupi]] + +:blue_car:: [[Rex Automobile CH]] + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-13]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-14.md b/00.01 Admin/Calendars/2025-01-14.md new file mode 100644 index 00000000..78085bdf --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-14.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-14 +Date: 2025-01-14 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7.5 +Happiness: 85 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: 2.58 +Coffee: 3 +Steps: 14998 +Weight: 95 +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-13|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-15|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-14Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-14NSave + +  + +# 2025-01-14 + +  + +> [!summary]+ +> Daily note for 2025-01-14 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-14 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-14]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/2025-01-15.md b/00.01 Admin/Calendars/2025-01-15.md new file mode 100644 index 00000000..6086255b --- /dev/null +++ b/00.01 Admin/Calendars/2025-01-15.md @@ -0,0 +1,134 @@ +--- + +title: "🗒 Daily Note" +allDay: true +date: 2025-01-15 +Date: 2025-01-15 +DocType: Note +Hierarchy: +TimeStamp: +location: +CollapseMetaTable: true +Sleep: 7.5 +Happiness: 90 +Gratefulness: 90 +Stress: 25 +FrontHeadBar: 5 +EarHeadBar: 30 +BackHeadBar: 20 +Water: +Coffee: +Steps: +Weight: +Ski: +IceSkating: +Riding: +Racket: +Football: +Swim: + +--- + +%% Parent:: [[@Life Admin]] %% + +--- + +[[2025-01-14|<< 🗓 Previous ]]       [[@Main Dashboard|Back]]       [[2025-01-16|🗓 Next >>]] + +--- + +  + +```button +name Record today's health +type command +action MetaEdit: Run MetaEdit +id EditMetaData +``` +^button-2025-01-15Edit + +```button +name Save +type command +action Save current file +id Save +``` +^button-2025-01-15NSave + +  + +# 2025-01-15 + +  + +> [!summary]+ +> Daily note for 2025-01-15 + +  + +```toc +style: number +``` + +  + +--- + +  + +### ✅ Tasks of the day + +  + +```tasks +not done +due on 2025-01-15 +path does not include Templates +hide backlinks +hide task count +``` + +  + +--- + +  + +### 📝 Memos + +  + +This section does serve for quick memos. + +  + + +%% --- %% +  + +--- + +  + +### 🗒 Notes + +  + +Loret ipsum + +  + +--- + +  + +### :link: Linked activity + +  + +```dataview +Table from [[2025-01-15]] +``` + +  +  \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2023-01-23 🩺 Médecin.md b/00.01 Admin/Calendars/Events/2023-01-23 🩺 Médecin.md deleted file mode 100644 index c32582d8..00000000 --- a/00.01 Admin/Calendars/Events/2023-01-23 🩺 Médecin.md +++ /dev/null @@ -1,13 +0,0 @@ ---- - -title: Médecin -allDay: false -startTime: 11:15 -endTime: 12:15 -date: 2023-01-23 -completed: null -CollapseMetaTable: true - ---- - -[[2023-01-23|Ce jour]], 1er RDV avec [[Dr Cleopatra Morales]]. diff --git a/00.01 Admin/Calendars/Events/2023-02-06 📍 Genève.md b/00.01 Admin/Calendars/Events/2023-02-06 📍 Genève.md deleted file mode 100644 index 2a48ac3f..00000000 --- a/00.01 Admin/Calendars/Events/2023-02-06 📍 Genève.md +++ /dev/null @@ -1,12 +0,0 @@ ---- - -title: Genève -allDay: true -date: 2023-02-06 -endDate: 2023-02-08 -completed: null -CollapseMetaTable: true - ---- - -Depart à [[Geneva|Genève]] [[2023-02-06|ce jour]] et retour le [[223-02-07|lendemain]]. \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2023-02-09 🩺 Médecin.md b/00.01 Admin/Calendars/Events/2023-02-09 🩺 Médecin.md deleted file mode 100644 index 00dd4061..00000000 --- a/00.01 Admin/Calendars/Events/2023-02-09 🩺 Médecin.md +++ /dev/null @@ -1,13 +0,0 @@ ---- - -title: ⚕ Médecin -allDay: false -startTime: 12:15 -endTime: 13:15 -date: 2023-02-09 -completed: null -CollapseMetaTable: true - ---- - -[[2023-02-09|Ce jour]], RDV de suivi avec [[Dr Cleopatra Morales]] \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2023-02-11 💍 Mariage Eloi & Zélie.md b/00.01 Admin/Calendars/Events/2023-02-11 💍 Mariage Eloi & Zélie.md deleted file mode 100644 index 5e20b705..00000000 --- a/00.01 Admin/Calendars/Events/2023-02-11 💍 Mariage Eloi & Zélie.md +++ /dev/null @@ -1,91 +0,0 @@ ---- - -title: "👰‍♀ Mariage Eloi & Zélie" -allDay: true -date: 2023-02-10 -endDate: 2023-02-12 -CollapseMetaTable: true - ---- - -Mariage d’[[Eloi de Villeneuve|Éloi]] avec [[Zélie]] en [[@France|Bretagne]] (Rennes) [[2023-02-11|ce jour]]. - -  - -🚆: 23h11, arrivée à Rennes - -  - -🏨: **Hotel Saint Antoine**
27 avenue Janvier
Rennes - -  - -### Vendredi 10 Février - -  - -#### 17h: Mariage civil - -Mairie de Montfort-sur-Meu (35) - -  - -#### 20h30: Veillée de Prière - -Chapelle du château de la Châsse -Iffendic (35) - -  - ---- - -  - -### Samedi 11 Février - -  - -#### 14h: Messe de Mariage - -Saint-Louis-Marie -Montfort-sur-Meu (35) - -  - -#### 16h30: Cocktail - -Château de la Châsse -Iffendic (35) - -  - -#### 19h30: Dîner - -Château de la Châsse -Iffendic (35) - -  - ---- - -  - -### Dimanche 12 Février - -  - -#### 11h: Messe - -Chapelle du château de la Châsse -Iffendic (35) - -  - -#### 12h: Déjeuner breton - -Château de la Châsse -Iffendic (35) - -  - -🚆: 13h35, départ de Rennes \ No newline at end of file diff --git a/00.01 Admin/Calendars/Events/2023-02-19 🎞️ Tár @ Riff Raff.md b/00.01 Admin/Calendars/Events/2023-02-19 🎞️ Tár @ Riff Raff.md deleted file mode 100644 index 4f2da539..00000000 --- a/00.01 Admin/Calendars/Events/2023-02-19 🎞️ Tár @ Riff Raff.md +++ /dev/null @@ -1,13 +0,0 @@ ---- - -title: 🎬 Tár @ Riff Raff -allDay: false -startTime: 20:30 -endTime: 22:30 -date: 2023-02-19 -completed: null -CollapseMetaTable: true - ---- - -[[2023-02-19|Ce jour]], [[Tár (2022)]] @ [[Riff Raff Kino Bar]]. diff --git a/00.01 Admin/Calendars/Events/2023-03-06 🩺 Médecin.md b/00.01 Admin/Calendars/Events/2023-03-06 🩺 Médecin.md deleted file mode 100644 index 9780ae6c..00000000 --- a/00.01 Admin/Calendars/Events/2023-03-06 🩺 Médecin.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: 🩺 Médecin -allDay: false -startTime: 15:00 -endTime: 15:30 -date: 2023-03-06 -completed: null -CollapseMetaTable: true - ---- - -[[2023-03-06|Ce jour]], rdv avec [[Dr Awad Abuawad]] diff --git a/00.01 Admin/Calendars/Events/2023-03-11 🏠 Marg & Arnold à Zürich.md b/00.01 Admin/Calendars/Events/2023-03-11 🏠 Marg & Arnold à Zürich.md deleted file mode 100644 index e69a2915..00000000 --- a/00.01 Admin/Calendars/Events/2023-03-11 🏠 Marg & Arnold à Zürich.md +++ /dev/null @@ -1,13 +0,0 @@ ---- - -title: 👨‍👩‍👧‍👦 Marg & Arnold à Zürich -allDay: true -date: 2023-03-11 -endDate: 2023-03-13 -completed: null -CollapseMetaTable: true - ---- - -Arrivée le [[2023-03-11|11 mars]] de [[Marguerite de Villeneuve|Marg]] et [[Arnold Moulin|Arnold]]. -Départ le [[2023-03-12|lendemain]]. diff --git a/00.01 Admin/Calendars/Events/2023-03-18 🇨🇭 Molly & boyfriend in Zürich.md b/00.01 Admin/Calendars/Events/2023-03-18 🇨🇭 Molly & boyfriend in Zürich.md deleted file mode 100644 index 2f3197c0..00000000 --- a/00.01 Admin/Calendars/Events/2023-03-18 🇨🇭 Molly & boyfriend in Zürich.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: 👨‍👩‍👧‍👦 Molly & boyfriend in Zürich -allDay: true -date: 2023-03-18 -endDate: 2023-03-20 -completed: null -CollapseMetaTable: true - ---- - -Weekend in [[@@Zürich|Zürich]] for [[@@MRCK|Meggi-mo]]‘s cousin Molly and boyfriend. -Arrival on [[2023-03-18|18th March]] and departure on Monday [[2023-03-20|20th March]]. diff --git a/00.01 Admin/Calendars/Events/2023-04-14 🩺 Médecin.md b/00.01 Admin/Calendars/Events/2023-04-14 🩺 Médecin.md deleted file mode 100644 index 502d286d..00000000 --- a/00.01 Admin/Calendars/Events/2023-04-14 🩺 Médecin.md +++ /dev/null @@ -1,13 +0,0 @@ ---- - -title: 🩺 Médecin -allDay: false -startTime: 11:45 -endTime: 12:15 -date: 2023-04-14 -completed: null -CollapseMetaTable: true - ---- - -[[2023-04-14|Ce jour]], rdv avec [[Dr Cleopatra Morales]] diff --git a/00.01 Admin/Calendars/Events/2023-12-21 🏠 Arrivée Papa.md b/00.01 Admin/Calendars/Events/2023-12-21 🏠 Arrivée Papa.md deleted file mode 100644 index b0d95b10..00000000 --- a/00.01 Admin/Calendars/Events/2023-12-21 🏠 Arrivée Papa.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: 🏠 Arrivée Papa -allDay: false -startTime: 20:26 -endTime: 21:26 -date: 2023-12-21 -completed: null ---- - -[[2023-12-21|Ce jour]], arrivée de [[Amaury de Villeneuve|Papa]] à [[@@Zürich|Zürich]] diff --git a/00.01 Admin/Calendars/Events/2023-12-27 🗼 Départ Papa.md b/00.01 Admin/Calendars/Events/2023-12-27 🗼 Départ Papa.md deleted file mode 100644 index 544487a5..00000000 --- a/00.01 Admin/Calendars/Events/2023-12-27 🗼 Départ Papa.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: 🗼 Départ Papa -allDay: false -startTime: 13:30 -endTime: 14:30 -date: 2023-12-27 -completed: null ---- - -[[2023-12-27|Ce jour]], départ de [[Amaury de Villeneuve|Papa]] de [[@@Zürich|Zürich]] pour [[@@Paris|Paris]] diff --git a/00.01 Admin/Calendars/Events/2025-01-12 ⚽️ PSG - ASSE (2-1).md b/00.01 Admin/Calendars/Events/2025-01-12 ⚽️ PSG - ASSE (2-1).md new file mode 100644 index 00000000..1a04e496 --- /dev/null +++ b/00.01 Admin/Calendars/Events/2025-01-12 ⚽️ PSG - ASSE (2-1).md @@ -0,0 +1,20 @@ +--- + +title: ⚽️ PSG - ASSE (2-1) +allDay: false +startTime: 20:45 +endTime: 22:45 +date: 2025-01-12 +completed: null + +--- + +[[2025-01-12|Ce jour]], [[Paris SG|PSG]] - ASSE: 2-1 +Buteurs:: ⚽️⚽️ Dembélé
⚽️ Davitashvili (ASSE) + +  + +```lineup +formation: 433 +players: Donnarumma,Nuno Mendes, Hernandez (Pacho),Beraldo,Hakimi,Mayulu,Ruiz,Lee,Barcola,G.Ramos (Doué),Dembélé +``` \ No newline at end of file diff --git a/00.03 News/College Football Insiders Reveal ‘Secret Economy of NIL’.md b/00.03 News/College Football Insiders Reveal ‘Secret Economy of NIL’.md new file mode 100644 index 00000000..3586098a --- /dev/null +++ b/00.03 News/College Football Insiders Reveal ‘Secret Economy of NIL’.md @@ -0,0 +1,43 @@ +--- + +dg-publish: true +Alias: [""] +Tag: ["🥉", "🇺🇸", "🏈", "🎓"] +Date: 2025-01-06 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2025-01-06 +Link: https://www.bloomberg.com/news/features/2024-12-20/college-football-insiders-reveal-secret-economy-of-nil +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-CollegeFootballInsidersRevealSecretEconomyofNILNSave + +  + +# College Football Insiders Reveal ‘Secret Economy of NIL’ + +*This is the third story in the series Turf Wars, documenting how the pay-for-play era exploits many athletes.* + +Sports agent Henry Organ answered a call in September from a mother looking to protect her son. Rated among the top 20 high school football recruits in California, he had committed months earlier to play for the University of Oklahoma. A team official had agreed that he'd be paid $300,000 his freshman year, his mother said, as long as he stopped visiting other schools. + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/His Very Best (1924-2024).md b/00.03 News/His Very Best (1924-2024).md new file mode 100644 index 00000000..cce9e17c --- /dev/null +++ b/00.03 News/His Very Best (1924-2024).md @@ -0,0 +1,97 @@ +--- + +dg-publish: true +Alias: [""] +Tag: ["🗳️", "🇺🇸", "👤"] +Date: 2025-01-06 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2025-01-06 +Link: https://oldgoats.substack.com/p/his-very-best-1924-2024 +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-HisVeryBest1924-2024NSave + +  + +# His Very Best (1924-2024) + +[ + +![Photos of Jimmy Carter: Remembering the life of the 39th president and humanitarian - The Washington Post](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8f1536d-3fa4-471e-9d38-09f6dd1df6fa_3504x2336.jpeg "Photos of Jimmy Carter: Remembering the life of the 39th president and humanitarian - The Washington Post") + +](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb8f1536d-3fa4-471e-9d38-09f6dd1df6fa_3504x2336.jpeg) + +When I heard the news of Jimmy Carter’s death, I felt a sense of loss for the country and the world. We need his sense of decency and ceaseless commitment to helping other people. But I was also flooded with personal memories — not just of my time with Carter and his family but of the whole process of trying to write **[a biography](https://jonathanalter.com/work/his-very-best-jimmy-carter-a-life/)** of a formidable, complex man who became a world-historical figure. Rather than writing another piece about his legacy, which I did here when he **[went into hospice](https://oldgoats.substack.com/p/jimmy-carter-an-epic-american-life)** in early 2023 and in TIME, I thought I’d take you back to researching and writing the book between 2015 and 2020. + +The timing was auspicious. When I began my research, the importance of character in the White House was not yet an issue in America. I was working in the Carter Library in Atlanta when Donald Trump came down the escalator on June 16, 2015. MSNBC asked me to go to a studio and comment on his attacks on Mexican immigrants as rapists and murderers. When I returned to the library, I found that turning the pages of documents that validated Carter’s core values had the effect of brushing away some of the toxins of our times. My book became a kind of balm — and continued providing relief for me in the following years. + +At the same time, Trump’s election in 2016 gave my Carter project a new urgency — and it kindled a fragile hope that his life story might help light our way back to at least a slightly better politics. + +I first met Jimmy Carter — for a split-second handshake — on the South Lawn of the White House on the 4th of July, 1978, when I was a college intern in his speechwriting office. In early 1980, like so many Democrats, I grew disillusioned with him. I worked for a few weeks as a part-time volunteer on Ted Kennedy’s campaign against him in the Democratic primaries. That was dumb. Carter wasn’t a bad president, just swamped by cataclysmic events and ideologically trapped: Too conservative for liberals, too liberal for conservatives. + +Thirty-five years later, I found myself drawn back to a perplexing leader and to his virtuoso achievement— the 1978 **[Camp David Accords](https://en.wikipedia.org/wiki/Camp_David_Accords)**, which brought peace to Israel and Egypt after 2000 years of enmity and became the most durable major treaty of the postwar era. + +My book group in New York was reading **[a book about Camp David](https://www.amazon.com/Thirteen-Days-September-Carter-Begin/dp/B00NLNSZ3W/ref=sr_1_1?crid=282FYN0W5DZQB&dib=eyJ2IjoiMSJ9.vfDna17ClHJXDhtzP7iHHpHpCMTZE9-vMtNsJB-2OC90YxyFuVN3FFVLq0O17U6l.bZGFietP39NpzOaoneoaR1JSeOphufIw9af-ARt6I6s&dib_tag=se&keywords=Camp+David+by+Lawrence+Wright&qid=1708640601&sprefix=camp+david+by+lawrence+wright%2Caps%2C112&sr=8-1)** by Lawrence Wright, and one of our members had worked in Jason Carter’s unsuccessful campaign for governor of Georgia in 2014. He arranged for Jason and the former president to come to our group. Carter was 90 and ridiculously sharp. As he talked about Camp David, the idea of a book took shape. If he pulled that off, I figured, there must be more to him than the easy shorthand — inept president/noble ex-president. Fortuitously, my editor, the late Alice Mayhew, was also Carter’s book editor, and she smoothed the way for lots of access to the Carters and their whole family. When I learned that he would almost certainly have begun to address global warming in the early 1980s had he been reelected, I was hooked. I became a bit obsessed with trying to understand the most misunderstood president in American history. + +Carter was politically tone-deaf and made plenty of mistakes in office; even as he moved up a few places in the latest historians’ list, he will never be in the top tier of chief executives. But I came to believe he was one of America’s most consequential one-term presidents, with a long list of unheralded achievements and an enduring moral vision. + +I was surprised to learn that Carter was our greatest environmental president. (Theodore and Franklin Roosevelt were also historic conservationists but in the era before efforts to combat industrial pollution). I knew about his human rights policy but had no clue how much change it helped bring worldwide. Many little-known accomplishments — from normalizing relations with China to diversifying the federal judiciary to enacting the whistleblower protections that made the impeachment of Donald Trump possible — have shaped our own time in ways that almost no one connects to Carter. + +Now, thanks to the publication of a handful of new books, the long goodbye afforded by his time in hospice, and the striking contrast to Trump, more people are beginning to appreciate him, and a broader reappraisal is underway. I hope that interest and appreciation will grow in death. + +From the start of my research, Carter’s journey from barefoot farm boy to global icon struck me as an American epic. I wanted to understand how he evolved from a short, timid kid nicknamed “Peewee” into an ambitious and born-again governor of Georgia; how — straddling two worlds — he miraculously advanced from obscure outsider to President of the United States; how he stumbled as a leader at the time but succeeded in reinventing himself as a warrior for peace. + +Carter was warm in public, brisk — sometimes peevish — in private, and decent at his core. Throughout his long life, he passed what his Naval Academy rule book called “the final test of a man”—honesty. Like most politicians, he exaggerated. But he fulfilled his famous promise in his 1976 campaign and never lied to the American people, which is no small thing today. + +I decided to call my book *His Very Best* because it reflects not just the title of Carter’s 1975 campaign autobiography (***[Why Not the Best?](https://www.amazon.com/Why-Not-Best-Jimmy-Carter/dp/0553101986)***) but his intensity and his sense of obligation to God, humanity, and himself. In his daily, even hourly, prayers, he asked not just “What would Jesus do?” but “Have I done my best?” After cantankerous Admiral Hyman Rickover sternly asked the nervous young lieutenant in a job interview if he had done his best at Annapolis — and he confessed that he had not — Carter disciplined himself to make the maximum effort in every single thing he did for the rest of his life. When bestowing the Nobel Peace Prize on Carter in 2002, the chairman of the Nobel committee said. “Carter himself has taken \[from Ecclesiastes 11:4\]  as his motto: ‘The worst thing that you can do is not to try.’ Few people, if any, have tried harder.” + +[Share](https://oldgoats.substack.com/p/his-very-best-1924-2024?utm_source=substack&utm_medium=email&utm_content=share&action=share) + +Whether sprinting as a naval officer through the core of a melted-down nuclear reactor, laboring to save tens of millions of acres of wilderness, driving 100 miles out of his way on rutted roads to talk to a single African farmer, or turkey-hunting at age 95 — Carter was all-in, all the time. Calling him the least-lazy American president is not to damn him with faint praise; the story of his long life should endure as a master class in making every minute count. + +I interviewed him more than a dozen times in his home, office, over meals, in transit, and by email. I saw him teach Sunday school and helped build a Habitat for Humanity house with him in Memphis. I also interviewed Rosalynn Carter — who was kind enough to share Jimmy’s tender love letters from the navy and portions of her unpublished diaries for the first time. My most memorable interviews took place in Plains, the tiny town in Southwest Georgia that Jimmy and Rosalynn — married for 77 years — always called home. They met there as infants more than nine decades ago. Jimmy’s mother, a nurse, delivered Rosalynn and brought her nearly three-year-old son over to see the new baby. Plains is a friendly place, but I learned of its harsh past, with a county sheriff who Martin Luther King Jr. described as “the meanest man in the world.” I concluded that Carter’s historic focus on human rights abroad has been at least partial atonement for too often ducking brutal abuses of civil rights at home — the white terrorism in his own backyard. + +Carter’s storied 1976 presidential campaign transformed American politics, but his presidency bogged down for reasons often beyond his control. In his last two years, he was often flailing, buffeted by events, and stripped of the mystery and elan he needed to perform in the theater of the presidency. + +One day, I asked him to identify the biggest myth about his time in office. He answered: “That I was weak. I made many bold decisions, almost all of which were difficult to implement and not especially popular.” This is true. Carter was not fundamentally weak, though he allowed perceptions of weakness to harden. They have warped our impression of him, obscuring the enduring truth that contemporary unpopularity is often unrelated to larger significance. One of my challenges was to untangle the two and lift Carter from the muck of his times for inspection in the sunshine of historical context. + +He was the first American president since Thomas Jefferson who could reasonably claim to be a Renaissance Man or at least a world-class autodidact. At various times in his life, he acquired the skills of a farmer, naval officer, electrician, sonar technologist, nuclear engineer, businessman, equipment designer, agronomist, master woodworker, Sunday School teacher, land-use planner, legislator, door-to-door missionary, governor, long-shot presidential candidate, U.S. president, diplomat, fly-fisherman, bird dog trainer, arrowhead collector, home builder, painter, professor, memoirist, poet, novelist, and children's book author — an incomplete list, as he would be happy to point out. + +Midway through my research, it struck me that Carter was the only American president who essentially lived in three centuries: His early life on the farm in the 1920s without electricity or running water might as well have been in the 19th; he was connected — before, during and after his presidency — to many of the significant events and transformative social movements of the 20th; and the Carter Center he founded is focused on conflict resolution, global health, and strengthening democracy — major challenges of the 21st. + +Throughout Jimmy Carter’s long life, classmates, colleagues, friends — even members of his own family — found him hard to read. The enigma deepened in the presidency. From my own observations and the people who worked for and with him in Atlanta and Washington, a complicated picture emerges: I concluded that Carter was a driven engineer laboring to free the artist within. He once told me that he could only express his true feelings in his poetry, which he wrote after leaving the presidency. Some of it is quite good. + +I enjoyed trying to peel back the layers of his complex personality. Carter was a disciplined, driven and incorruptible president equipped with a sharp, omnivorous mind; a calm and adult president —dependable in a crisis — whose religious faith helped keep him focused on saving lives; a friendless president, who in the 1976 primaries had defeated or alienated a good chunk of the Democratic Party; a stubborn and acerbic president, never demeaning but sometimes an SOB; a non-ideological and logic-driven president who worshipped science along with God and saw governing as a series of problem sets; an austere, even spartan president out of sync with profligate American culture; a sometimes-obsessive president whose diamond-cutter attention to detail brought ridicule but also historic results; a charming and formidable president in small groups and when speaking off-the-cuff but often underwhelming — even off-putting — on television, especially when reading prepared texts; an insular, all-business president, allergic to schmoozing, with few devotees beyond his intimate circle of Georgians, in part because — like his father and Admiral Rickover, two of his greatest influences — he rarely spared time for small talk and often had trouble saying “Thank You”; and an unlucky president — hamstrung in Iran by his own humanity — who was committed first to doing what he thought was right in the long-term, with the politics that often imperiled him distinctly secondary to his larger aims. + +For some in Carter’s orbit, his impatient and occasionally persnickety style — a few dubbed him “the grammarian-in-chief” for correcting their memos — would mean their respect would only turn to reverence and love in later years. Only then did many of those who served in his administration fully understand that he had accomplished much more in office than they knew and that he had done so with passion and foresight they had not fully appreciated at the time. + +Now, the rest of us are learning that, too. + +[ + +![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F218408de-6a7b-46d0-831e-16a93dffd044_256x256.png) + +](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F218408de-6a7b-46d0-831e-16a93dffd044_256x256.png) + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/How Iran moves sanctioned oil around the world.md b/00.03 News/How Iran moves sanctioned oil around the world.md new file mode 100644 index 00000000..4d95c369 --- /dev/null +++ b/00.03 News/How Iran moves sanctioned oil around the world.md @@ -0,0 +1,163 @@ +--- + +Tag: ["📈", "🇮🇷", "🛢️", "💸"] +Date: 2025-01-14 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2025-01-14 +Link: https://www.reuters.com/graphics/IRAN-OIL/zjpqngedmvx/ +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-HowIranmovessanctionedoilaroundtheworldNSave + +  + +# How Iran moves sanctioned oil around the world + +Despite some of the West’s toughest sanctions, Iran has built a roaring global trade for its oil. It relies on a shadow fleet of tankers that conceal their activities to skirt sanctions, and willing buyers in Asia to keep its economy afloat and to finance anti-Western militias in the Middle East.  + +Tehran's oil exports brought in $53 billion in 2023 and $54 billion a year earlier, according to U.S. Energy Information Administration estimates, and output during 2024 was running at its highest since 2018, based on OPEC data.   + +It was former U.S. President Donald Trump who ditched the West's nuclear deal with Iran and reimposed sanctions on Iranian oil in 2018. Set to return to the White House in January, Trump is expected to once again target Iran's oil industry with "maximum pressure", say Iranian, Arab and Western officials. + +While Iran's methods have been well guarded, the leaked emails exposed unusually granular detail about the day-to-day workings of a company that has helped keep Tehran’s multibillion dollar oil industry alive. + +Hacking group PRANA Network leaked the Sahara Thunder emails in February last year because it wanted to lift the lid on Iran’s circumvention of Western sanctions, two of the hackers told Reuters. + +In April, the United States [sanctioned Sahara Thunder](https://home.treasury.gov/news/press-releases/jy2295), labelling it a “front company” for Iran’s government which supported its elite Revolutionary Guards with a vast shipping network. + +Sahara Thunder is based in Tehran and describes itself as an import-export, construction and contracting firm in sectors including oil and gas, according to an archived version of its website. + +Sahara Thunder’s email addresses were no longer active when Reuters reached out for comment and the news agency was unable to determine whether it is still in business. Sahara Thunder’s website now brings up a Chinese sports gambling page. Emails to people and addresses associated with the company in the data leak did not get replies. + +Iranian officials did not respond to requests for comment. + +Extracts from emails between Sahara Thunder and its partners showed how they shifted their cargoes from vessel to vessel, forged documents, painted ships with new identities, faked tracking signals to disguise their locations, and took painstaking measures to avoid any trace of Iran. + +Reuters shared its reporting with Roke Intelligence, a part of British research and development firm Roke which specialises in monitoring sanctions evasion for clients in the maritime industry. It independently verified many of the findings, located ships with satellite imaging, found the likely offloading points for vessels, and identified manipulated vessel tracking data. + +Reuters also shared with Iraqi officials the documents used by the Remy to pass its Iranian oil off as Iraqi. Besides the certificate of origin, it had an Iraqi bill of lading, a cargo manifest, port clearance and other paperwork. An Iraqi customs official told Reuters the documents were poor forgeries while SOMO, the body responsible for oil exports, said there was no record of the ship loading crude from any of Iraq’s ports. + +### The fleet + +From March 2022 to February 2024, Sahara Thunder helped deliver 18 different sanctioned oil cargoes via its own and business partners’ vessels - a fleet of 34 ships, according to the Reuters analysis of the leaked emails. + +Ships such as the Remy and the Wen Yao ferried sanctioned crude between continents or formed links in chains of voyages stretching around the globe. Vessels siphoned parcels of oil from other ships in the Sahara Thunder network such as the Dune, a very large crude carrier capable of carrying 2.2 million barrels - twice as much as the Remy. + +The Remy was the name of the oil tanker recorded in shipping databases, but it typically switched to using the fake name Deep Ocean when taking on Iranian oil, according to Sahara Thunder’s emails. + +The Remy under its former name Asian Spirit as seen at Rotterdam on July 10, 2016, via MarineTraffic/Roland Delhaxhe + +The Wen Yao under its former name New Spirit, as seen in Singapore on Nov. 21, 2008, via MarineTraffic/Hans Rosenkranz + +Other ships shuttled crude back and forth across the Gulf. In total, Sahara Thunder’s crude cargoes were moved between vessels more than 60 times as they wended their way over thousands of miles to their ultimate buyers, mostly in China. + +Reuters pieced together the fleet of vessels run by Sahara Thunder and its business partners, and mapped out how much oil was transferred between each of the ships in the network. + +There were 92 owner or operating companies for the 34 ships involved with Sahara Thunder's activities during the period covered by the emails, according to the leak and the public shipping database Equasis.  + +Reuters contacted 79 of them and was unable to reach 13. Ten companies replied. Eight said they were not involved. Two said they only handled the ships’ technical management and had no knowledge of chartering or voyages. + +### Go East + +Most of the oil moved by Sahara Thunder was Iranian. But the company was also hired to help deliver oil from other countries forced by sanctions to operate in a shadow economy, blocked from Western banking, insurance and buyers. Ships in the Sahara Thunder network including the Remy and Wen Yao transported oil from state-owned companies in Russia and Venezuela, according to the leaked emails, helping them skirt sanctions. + +Most of the oil Sahara Thunder moved ended up in China. + +The U.S. Treasury did not comment. + +China’s Ministry of Foreign Affairs told Reuters it was not familiar with Sahara Thunder’s business in China. + +“China has consistently and resolutely opposed the U.S.'s illegal and unreasonable unilateral sanctions on Iran and other countries and its long-arm jurisdiction,” the ministry said. + +### A highly lucrative trade + +Iran is under what the United States’ Congressional Research Service calls “arguably the most extensive and comprehensive set of sanctions” the U.S. maintains. Allies such as the European Union, Britain and others mirror Washington’s efforts. + +These sanctions have come in response to Iran’s nuclear programme, its backing of militant groups in the Middle East, brutal crackdowns on protests and, more recently, its support of Russia as the latter wages war in Ukraine. + +They are designed to throttle Iran’s access to energy, finance and military markets, undermine the economy and cut off businesses and officials from much of the West. + +As a result of the sanctions, some of Iran’s oil trade has transferred from state entities to companies such as Sahara Thunder and [other networks](https://www.reuters.com/world/middle-east/fuel-oil-smuggling-network-rakes-1-billion-iran-its-proxies-2024-12-03/) that can [work around the restrictions](https://www.reuters.com/world/middle-east/irans-revolutionary-guards-extend-control-over-tehrans-oil-exports-sources-say-2024-12-18/) and bring in sorely needed foreign currency. + +“You have opaque networks involved in a highly lucrative trade, and now U.S. officials are forced to play a game of whack-a-mole to try to stay ahead of them,” said Esfandyar Batmanghelidj, chief executive of the Bourse & Bazaar Foundation, a think-tank in London that tracks Iran’s oil sector. + +## Defying the elements + +## New name, same game + +## Cash economy + +Locked out of Western banking systems by sanctions, Sahara Thunder still had to settle payments for incidental costs outside Iran such as for refuelling, the emails showed. + +Before the Remy could load a new oil cargo from the Dune, it sailed to the United Arab Emirates, where Emirati firm Marin Ocean Refined Oil Products Trading refuelled the ship, according to emails between the company and Sahara Thunder. + +When it came to settlement, the company told Sahara Thunder to deliver 4.3 million dirham ($1.2 million) to its agent - in cash. + +In August 2023, one firm assisting in ship-to-ship transfer operations also asked Sahara Thunder to give $105,000 in cash to a customs clearance clerk in the UAE. + +Reuters was unable to determine from the emails whether the two payments were made. + +Marin Ocean did not respond to a request for comment. Reuters was unable to reach the agents and other partner firms for comment. + +A UAE official did not comment specifically on Sahara Thunder’s activities in the country. “The UAE adheres to, and strictly enforces, international laws and UN mandated sanctions, alongside agreements established with international partners,” the official said. + +## Iran meets world + +Sahara Thunder’s trade went beyond Iranian crude, including oil from other sanctions-hit nations such as Russia and Venezuela. + +While Sahara Thunder’s major crude deals were often carried out by the Remy, some shipments relied on other vessels in its network. + +In August 2022, one of those ships came calling at Venezuela’s Jose Terminal. + +The Won was there under Sahara Thunder’s orders to load 1.9 million barrels of Merey crude, according to the leaked emails. The ship’s IMO number was 9288098. + +But shipping databases have no record of a tanker with that name at the time. Nor does that IMO number exist. + +### Moscow mule + +By December 2023, the Remy was on the other side of the world, preparing its last cargo before the Sahara Thunder leak. This time, the crude was Russian. + +Moscow has been under ever-tightening sanctions since its full-scale invasion of Ukraine in 2022, and in need of buyers for its oil. Sahara Thunder was there to help. + +In December, the U.S. sanctioned five more ships in the fleet tied to Sahara Thunder, bringing the total to 21. Thirteen vessels remain unsanctioned. One of those is the Remy which, according to shipping databases, now goes by the name Wilma II. + +A previous version of this graphic included a satellite image which wrongly named the vessel next to the MS Enola as the Remy. The satellite image has been replaced with the correct one which shows the Remy next to the MS Enola on March 24, 2023. + +In February 2024, hackers leaked more than 10,000 emails and their attachments from Sahara Thunder. Reuters ran the emails through Google’s Pinpoint, a research tool for journalists and academics that analyses large sets of documents and highlights frequently repeated key words, names and phrases. + +Reuters then sorted the emails into sets, including for each ship identified and for each ship-to-ship transfer, as well as by key companies, contracts, and mentions of specific phrases such as those relating to China, Russia, Venezuela and various countries in the Middle East. + +Reuters identified emails that contained GPS coordinates, including some ships’ daily location updates, allowing reporters to pinpoint the exact location of ship-to-ship transfers and chart movements of Sahara Thunder vessels like the Remy, even when ships turned off or spoofed their AIS. + +Communications, contracts and documents were then matched to the relevant trades to construct a timeline of Sahara Thunder’s activities. + +Reuters then shared its findings with Roke Intelligence, which independently verified many of the ship-to-ship transfers and ship movements, and identified satellite images of the transactions, ships’ likely offloading points and instances of spoofing. + +PRANA Network’s Sahara Thunder leak at [https://simorgh.io/](https://simorgh.io/); Satellite image analysis and ship tracking analysis via Roke Intelligence; Ship tracking data from LSEG and Kpler. + +James Pearson in London, Ahmed Rasheed in Baghdad, Tim Gardner in Washington, Michelle Nichols in New York, Chen Aizhu and Jeslyn Lerh in Singapore, Colleen Howe in Beijing, Rozanna Latiff in Kuala Lumpur, and Parisa Hafezi and Alexander Cornwell in Dubai + +Jon McClure, Richard Valdmanis and David Clarke + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/On the Grid.md b/00.03 News/On the Grid.md new file mode 100644 index 00000000..07ff43a3 --- /dev/null +++ b/00.03 News/On the Grid.md @@ -0,0 +1,87 @@ +--- + +Tag: ["📟", "🇺🇸", "📱", "📍"] +Date: 2025-01-14 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2025-01-14 +Link: https://www.thedriftmag.com/on-the-grid/ +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-OntheGridNSave + +  + +# On the Grid + +**A** full-page ad in a November 1990 issue of *Fortune* magazine features two dozen men in dark suits turned away from the viewer. Standing in neat rows, most blend together in a uniform mass. But three are singled out, with red targets pinned to their backs. The text below the shadowy tableau reads: “Wouldn’t it be great if new customers were this easy to spot? Now they can be.” Bullseye. + +The spread was for Lotus MarketPlace, a collaboration between Lotus Development Corporation, a spreadsheet-software tech giant then valued at over one billion dollars, and Equifax, one of the country’s largest consumer credit agencies. Lotus MarketPlace contained detailed profiles of 120 million Americans, including their names, addresses, phone numbers, marital statuses, estimated household incomes, and purchase histories, all filed into lifestyle categories such as “cautious young couples” and “inner-city singles.” For $695 (about $1,600 today), a company could purchase eleven CD-ROM discs of consumer data covering half the U.S. population. + +In a *Wall Street Journal* piece that ran just after the *Fortune* ad appeared, a Georgetown professor was quoted describing the product as “a big step toward people completely losing control of how, and by whom, personal information is used.” A staff attorney with the American Civil Liberties Union said that Lotus was “stretching for the broadest interpretation of the law and looking for ways to get around its intent.” The article ricocheted through nascent cyberspace, finding its way onto message boards and email lists where angry netizens encouraged one another to call Lotus to insist that their names be removed. This online backlash quickly grew into a coordinated attack, with phone calls and letters overwhelming Lotus’s headquarters. + +Nine months after the product was announced, Lotus’s president publicly acknowledged the “volume and tenor of the concerns raised” as well as the insurmountable expense of removing the over thirty thousand people who demanded to be taken out of the database. Lotus MarketPlace was canceled before it even launched. Today, this triumph of privacy advocates reads like a false dawn. In the decades since, we have indeed, as the Georgetown professor warned, completely lost “control of how, and by whom, personal information is used.”  + +And we know how it happened. After the dot-com bubble burst in 2002, Google realized that it was sitting on a monetizable surplus: the data produced by people’s engagement with its search engine could be wielded to customize ads. And then it discovered that the more precisely those ads were targeted, the more lucrative they became. Google’s data was richer and vaster than Lotus’s — a combination of search histories, IP addresses, and metadata that could paint a picture of what a specific person in a specific place at a specific time wanted to do, know, or buy. Google’s approach was stealthier, too. The company updated its terms of service to note, without explicitly mentioning advertising, that it was stockpiling this information “to improve the quality of our service and to better understand how people interact with us.” Facebook and data brokers like Acxiom quickly followed suit, refining ad-targeting algorithms and accumulating massive data sets of consumer profiles. By the late 2000s, smartphones provided new sources of data, harvesting information all day long, not just when people were at their computers. There were no more full-page ads in popular magazines. Just terms of service in miniscule fonts, manipulative interfaces, and other tricks of the magician. + +The result is that we are now locked in innumerable contracts through which we surrender our personal information for convenience or pleasure — for better search results, faster delivery, more helpful recommendations, thimblefuls of dopamine. We feel conflicted about these agreements, but also powerless to amend or terminate them. Even the “techlash” of the late 2010s — when scandals like Cambridge Analytica and high-octane critiques like Shoshana Zuboff’s *The Age of Surveillance Capitalism* ended the era of unquestioned techno-optimism — did little to free us from these arrangements. According to a 2023 Pew Research Center survey, 73 percent of Americans feel that “they have very little to no control over the data collected about them by companies.” And yet, we still turn over our information voluntarily for trifles — FaceApp, which [demands](https://www.nytimes.com/2019/07/24/style/faceapp-privacy-scare.html?login=email&auth=login-email) full access to cameras and camera rolls in exchange for filters that add or subtract twenty years or twenty pounds, has been downloaded by over 350 million people across the globe. We are burnt out, fatigued, addicted. We talk casually about our Big Tech overlords, more or less accepting our debased roles in their fiefdoms. + +But there is something more insidious happening, too. Technology companies have so thoroughly conditioned us to believe we are powerless when it comes to digital privacy that our attitudes toward privacy more broadly have also been warped. Just as in the era of the PATRIOT Act the national security state insisted that it was virtuous, even patriotic, to give in to the intelligence machine, tech culture now ascribes its own virtues to the forfeiture of privacy: realness and connection. Where we once guarded our control over personal information, we now give up control not just freely but even tenderly, monitoring and being monitored by loved ones through social media platforms like BeReal and location-sharing apps. It’s a strange form of Stockholm syndrome for the surveillance age — we love, and love with, the tools of our captors. Resigned to the Big Tech companies recording our every move, we’ve invited friends, family, and partners to join them in watching us. We’ve begun to celebrate surveillance as a form of intimacy. + +**F**ind My Friends, an app that allows people to track their consenting contacts’ whereabouts in real-time, was introduced in 2011 with the launch of the iPhone 4S. In the app, you can set up alerts for when someone enters or leaves a specified location. Or, you can simply treat Find My as a live map, and watch your targets strut around the neighborhood, the city, or the globe. In 2019, Apple merged Find My Friends with Find My iPhone, which geolocates Apple ID-linked devices. Now, the streamlined Find My app (represented by a green target with a blue bullseye) takes care of both, as if friends are also expensive possessions to track in case they get lost or stolen. And location-tracking is not limited to Find My: Google Maps offers the same, and Snapchat, for example, has a similar feature called Snap Map, which the company claims is accessed by over 350 million users per month. + +What might have seemed, not too long ago, like a dangerous act of exposure has rapidly become a security blanket and a source of recreation. Location-sharing apps allow parents to track their adolescent children, and adult children to keep tabs on their senescent parents. Marketed as “family safety” solutions, location-tracking apps like Life360 offer more than just real-time location data. They also maintain a database of your family’s movements, storing up to thirty days of precise location history for every member of your “circle.” There are even smartwatches and other GPS devices designed for kids who don’t yet have phones; the Wizard Watch, for example, says it “gives guardians the confidence to allow their loved one to explore the world outside, without the stress and fear of wondering where they are or if they are safe.” In these duty-bound dynamics, there may be a clear sense in which the person tracking is responsible for the well-being of the person who’s being tracked — one party gives up privacy in exchange for care. + +In friendships and intimate partnerships there may be good safety rationales to turn on location sharing, but there’s nothing in the implicit relationship contract to suggest that one person can monitor the other’s whereabouts. Still, it can be entertaining to track the people in our lives. As one 22-year-old Find My user who habitually retrieves ten friends’ locations [told](https://www.vox.com/culture/23742552/location-sharing-iphone-friends-privacy-risks) *Vox*, the app “is so, so common among basically everyone I know, just for safety reasons but also for fun.” A 2023 TikTok [featuring](https://www.tiktok.com/@kelseywhitexox/video/7213605593846648110) a screen recording of the Find My interface overlaid with a GIF of Pedro Pascal eating a sandwich and the words “Me checking find my friends to make sure all my sims are where they’re supposed to be” garnered nearly ten million views, one million likes, and countless videos riffing on the format. This kind of location-sharing turns friendship into a video game. And if it’s all a game, there’s no reason to object. + +Those who celebrate the fun side of location-sharing apps don’t talk about them in terms of control; they talk about convenience. Apps like Find My save people who are always down to hang from the effort of texting, and enable spontaneous coordination in a globalized, expeditious present in which friends are literally hard to find, stochastically whizzing across and between cities. But what’s really disturbing — and representative of how this technology is changing relationships — is how people talk about mutual location-sharing like it’s a badge of intimacy, the implication being that truly close friends deserve to know everything about each other, including minute-by-minute coordinates. The same *Vox* article describes the phenomenon as “the next step in digital intimacy after following someone on Instagram.” And some say that it makes their friendships deeper. In *The Paris Review*, Sophie Haigney (a *Drift* contributor) [cheekily declares](https://www.theparisreview.org/blog/2022/10/07/find-my-friends/) Find My to be her “favorite app” and recounts using it “constantly and impractically” to check on her loved ones. “I guess it makes me feel close to them in a stupid technology way,” she explains. In a poetic apologia for the app [published](https://www.nytimes.com/2018/04/17/magazine/letter-of-recommendation-find-my-friends.html) in the *New York Times*, the novelist Kathleen Alcott muses, “Find My Friends rewards a groundwork of trust that’s already laid, magnifying what we know to be true about the people we love through the changes in place that express it.” + +In his landmark work from the middle of the last century, sociologist Erving Goffman theorized that in any social interaction, individuals are like actors who tailor their performances to their audiences and their contexts. Building on Goffman’s ideas, media scholars like danah boyd have used the term “context collapse” to describe how social media demands a unified presentation of the self to distinct audiences simultaneously. Unlike face-to-face interactions — in which we present ourselves differently to family, friends, or colleagues — social media forces us to speak to all of them at once. It also introduces another audience member: the algorithm. Whenever we communicate online, we communicate to a collapsed version of our social worlds via a medium that is structured to maximize engagement — by prioritizing the extreme, or the enviable, or the seemingly successful. And so we find ourselves further and further from anything that resembles our complete “self,” presenting ourselves as — per a popular meme — professional on LinkedIn, wholesome on Facebook, slutty on Tinder, and stylish on Instagram. Location-sharing apps, on the other hand, can offer the illusion of remaining whole. They entice in part because they seem to counter the distortionary, performative aspects of social media. They allow us to exercise our desire to rein in our audience and banish the always-lurking algorithm, sharing a truly unfiltered stream of information with the small group we’ve pulled in close. “In a world where we use social media to broadcast highly curated versions of ourselves,” Alcott writes, Find My furnishes an “antithesis.” + +Location-sharing suggests that to be authentic is to cede agency over what you share — to give your friends unmediated access to your life. Putting the imperative in its very name, the French social media app BeReal capitalizes on a hunger for alternatives to the performance of social media. At some uncertain time every day, BeReal pings its users: “⚠️ Time To BeReal ⚠️” Users then have two minutes to take and post two photos using their front and back cameras simultaneously. Photos can be posted along with optional geotags, though not all users are aware of this feature and may unknowingly share their locations. It’s a digital approximation of the panopticon’s punishing 360-degree view, with the randomly timed notifications creating that disciplining feeling of always possibly being watched. + +The sense that we are showing less filtered and more continuous footage of our lives to our friends distracts us from the reality that we are also showing all of it to the extraordinarily powerful tech companies that gave us the idea to do so in the first place. It’s not nice to think about how Apple can see where you are at all times of the day, but it’s lovely to think about a good friend catching you on a long hike in the middle of a big green swatch on the little map in the palm of their hand. So even when we supposedly react against the ways that tech companies try to control us, we reinforce the surveillance logic on which they thrive. We continue to subscribe to and even spread the idea that it is virtuous to give up agency over the personal information we share with others, because we’re conditioned by the tech companies to trade that agency for convenience. By the time we start sharing our location, we’ve likely already given that same real-time data to companies like Apple and Google. + +Perhaps we share our information willy-nilly with our friends simply because it’s, at this point, an unremarkable thing to do. As Eva Galperin, the cybersecurity director at digital rights group Electronic Frontier Foundation, [told](https://www.nytimes.com/2022/08/20/technology/find-my-app-friends.html) the *New York Times*, “People do this sort of indefinite data sharing because it is normalized within their immediate family or friend group.” It is advantageous for the omniscient, omnipotent tech companies, which have been tracking and psychologically manipulating us for almost two decades, if we adopt a posture of powerlessness about our personal information in all realms of life, online and off. Our dependence on them grows, giving them license to continue harvesting more and better data even as regulatory scrutiny intensifies. As a non-location-sharer in a friend group filled with them, I am often teased for pushing against Find My and for other practices (auto-deleting messages, always using Signal, affixing privacy screens to my devices) that I like to think of as basic digital hygiene. It’s worth mentioning that I am the only one in the group who thinks about information technologies for a living — I recently wrote a doctoral dissertation on the economics of privacy and am currently a researcher at OpenAI (all views here are, of course, my own). Still, my friends insist I’m paranoid. Behind their taunts lies an internalized and unquestioned consensus that being truthful means full disclosure by default. + +**O**ur surveillance Stockholm syndrome is not only making us more submissive to Big Tech; it’s also changing how we relate to each other. It creates snags in relationships, to be sure — location-sharing apps, for example, expose white lies, stoke FOMO, and enable unwanted or unwarranted deductions about who’s sleeping with whom. But there may be deeper relational losses, too, that come from the moral attitude that says it’s wrong to have secrets, and that it’s wrong to have regions of our lives that are not translated into data. By replacing opportunities for genuine reflection and connection with runnels of information, our appropriation of digital surveillance may diminish our autonomy, erode trust, and undermine the meaning of our relationships with others and with ourselves. + +In her 2015 book *In Defense of Secrets*, the late French psychoanalyst Anne Dufourmantelle corrects one of the implicit claims of the surveillance-as-intimacy perspective: “Transparency is not truth,” she writes. Believing it is leaves our psychological landscapes exposed and open to manipulation by external forces. A “free life,” she argues, is precisely one that is “capable of generating” secrets. Clearly, our sharing-is-caring regime makes it harder to have secrets. In her playful discussion of Find My, Haigney reports, “someone above the age of forty asked me recently how anyone in my generation has affairs, if we all know where others are at any given time.” Affairs are not the only kind of secret to be had in intimate relationships, of course: some other common secrets have to do with gambling, drugs, alcohol, frivolous shopping, illicit friendships, delicate health, or financial issues. Whatever it is, our adoption of surveillance as intimacy makes it harder to keep the activity or fact secret, and indeed tells us we are wrong to do so. + +It seems plausible that our warm acceptance of surveillance tools has been at least a partial factor in the recent popularity of non-monogamy. Given the constant flow of information from social media and tracking apps, it can be simpler to pursue an open relationship than to hide an affair. But even if our embrace of digital surveillance has potentially helped to push us toward open relationships, it has also made carrying them out more difficult. The writer and artist Shelby Lorman [reports](https://www.thecut.com/2018/07/setting-digital-boundaries-in-an-open-relationship.html) falling into a “digitally induced paranoia” when her boyfriend posted an inscrutable candlelit photo on his Instagram story during their year-long attempt at an open relationship, for which they adopted a “don’t ask, don’t tell” policy when it comes to talking about others they’re dating. “We’re so inundated in the amount of access we have to everyone, all the time, that it’s easy to dismiss how this impacts us, especially romantically,” she writes. As an anonymous writer in *The New Statesman* put it about their own non-monogamous relationship, “I want to know everything. But sometimes the details make me feel jealous and insecure.” Of course they do! Imagine how much more of a mess Proust’s narrator — already constantly seeking to uncover his lover Albertine’s secrets — would be if he were equipped with contemporary tracking tools and cast into a society that normalizes them. In Proust’s world, surveillance breeds obsession, not intimacy, and entrenches insecurity rather than securing love, distancing the narrator from the object of his affection. Eventually, he observes, “we only love what we do not wholly possess.” + +So secret affairs are unworkable, because we know where everyone is at all times. And open relationships can devolve into paranoia, or ratchet up to spectacles of endless disclosure. But even for those relationships in which neither party has secrets, something is lost when we decide to share everything: the freedom to reflect on and narrate our needs and desires, and tailor them for specific listeners. When we surrender control over what and how we disclose, we undercut our capacities for self-determination. + +In a thrilling new book, *The Right to Oblivion*, political theorist Lowry Pressly centers a defense of privacy not on secrets, as Dufourmantelle does, but on the value of oblivion. Oblivion, for Pressly, “describes a state of affairs about which there is no information or knowledge one way or the other, only ambiguity and potential.” Oblivion and secrecy are not the same — for some experience to become a secret, it must first travel out of the domain of oblivion and into that of information. Pressly argues that true privacy requires safeguarding oblivion, not secrets. Surveillance-as-intimacy renders the self as a “repository of information to be got at rather than a human being whose depths are unknown and respected as such.” Open relationships can inscribe a partner as a “repository” by assuming that they are a sum of facts about what they bought, where they went, whom they flirted with or kissed or brought home from the bar. To be constantly worried about disclosure is to be always in the process of codifying experience as information. Some of the most tantalizing and powerful encounters in our lives resist the kind of classification that often weighs us down and anchors us in the shallow end of what’s possible. In all relationships in which we treat each other as repositories of information, we tend toward surveillance — to our mutual detriment. Pressly points out that “the child who is tracked by her parents from her earliest opportunities for independence, whether in the physical world or online” will ultimately miss out on “opportunities to be trusted,” which are crucial to “personal development and moral self worth.” + +Our surveillance Stockholm syndrome blinkers us in another kind of relationship — our relationships with ourselves. The most dramatic example of this behavior is “digital hoarding,” the practice of relentlessly collecting digital files to the point that virtual clutter causes stress, confusion, and an overwhelming sense of disorder. Many of us have some digital hoarding tendencies — deleting photos can feel like an impossible task, as though the memories and relationships they represent might dissolve if they were to be wiped from our machines. These habits represent a conflation of “memory” of the human kind with the “memory” of the machine kind. Apple, for example, shows us “memories” from our camera rolls, employing facial recognition and metadata to put together collections like “Last Weekend in Kansas City” or “All Together,” a photo album of you and your family. It’s a bit creepy — after all, Apple is showing its hand, proving that it can infer which faces belong to which of our friends — but it’s also endearing. Every time you smile at a “memory” in spite of yourself, you are unknowingly saluting the principle that we ought not have power over the information we spew onto countless servers, as well as the more foundational principle that memories — the kaleidoscopic whorl of experience that we draw on to make life meaningful — ought to be tabulated into neat packets of information. The suggestion that we have no realm of oblivion and that we are the sum of our data, in Pressly’s words, creates an “excess of historicity” about one’s own life that can lead to a “sense of life becoming more fixed, more factual, with less ambiguity and life-giving potentiality.” It diminishes our belief in “that central capacity of human agency to change and become different” from who we were in the past. + +Today’s ascendant technology — large machine learning models, often mythologized as “artificial intelligence,” that promise and threaten to bring about profound changes in the social order — evolve the capitalists’ surveillance practices, and our modes of participation in them. Security expert Bruce Schneier [warns](https://slate.com/technology/2023/12/ai-mass-spying-internet-surveillance.html) that the new generation of artificial intelligence tools enables mass spying, which goes beyond the mass surveillance that we have already normalized*.* Surveillance is about tracking actions — what you do, where you go, what you buy. Spying, on the other hand, is about gleaning intent through a careful study of what you say, what you think, and what you feel. While surveillance is easy today, with our devices logging our physical coordinates, our transactions, and our website visits, spying has remained relatively labor-intensive, requiring analysis of large amounts of unstructured data like text, audio, and video. The new wave of machine learning models can take enormous amounts of messy data and instantly produce summaries that anyone can understand. + +The normalization of mass spying could go further than surveillance did in skewing our relationships. The devices cozied up in our homes — Ring cameras capturing every neighborhood drama, Alexa politely ignoring our off-key singing — are already quietly recording and transmitting data every moment of the day. There have been flashes of resistance to the creep of these gadgets. Amazon’s ill-fated *Ring Nation* — a television show that featured Ring-captured clips of doorstep marriage proposals (“Ring, you heard it first!”), kids being chased across their yard by cranes and cats, and deer and iguanas chilling on patios — was canceled after one season, having caught the attention of high-profile critics like Senator Ed Markey. “The Ring platform has too often made over-policing and over-surveillance a real and pressing problem for America’s neighborhoods, and attempts to normalize these problems are no laughing matter,” he cautioned. A writer in *Vice* [pronounced](https://www.vice.com/en/article/ring-nation-is-amazons-reality-show-for-our-surveillance-dystopia/) the show an audacious new step in “Amazon’s propaganda campaign to normalize surveillance.” Still, these technologies continue to proliferate, even incorporating new language models. In October, Ring [launched](https://www.wired.com/story/amazon-ring-new-ai-video-search-tool-mixed-results/) an A.I.-powered search tool that can pinpoint specific objects and activities from recorded footage. The search is not yet very sophisticated, but it’s not hard to imagine it soon enabling queries like, “What did my partner get up to while I was gone?” In this world, you wouldn’t even need to be suspicious about something specific — a generalized hunch would be enough to format a query, and receive an easily digestible response. This is a significant shift beyond our current capabilities; intimate spying typically entails continually monitoring live feeds, manually reviewing recorded data, and watching dots on location-sharing apps. If we’ve already adopted digital surveillance as a modern love language, are we going to normalize and then moralize digital spying too? + +Lotus MarketPlace tried to put targets on our backs, but we threw them off. Three decades later, we have bullseyes on all sides and don’t seem to care. In fact, we now fasten targets on our friends like charms on a friendship bracelet. We say — with pride — that we have nothing to hide. In our unthinking acceptance and enforcement of the relational terms of service that cast surveillance as a form of intimacy, we not only make ourselves ever more powerless in the grips of our captors, but also overlook what these contracts may devalue or destroy entirely: the deep autonomy, trust, and moral self-worth born out of secrets and regions of our lives that should be protected from a translation into mere information. In a 1991 postmortem of the Lotus MarketPlace debacle in the *Technology Review*, scholar Langdon Winner augured, “The troubles unearthed during the MarketPlace furor will not vanish with the product’s ignominious death.” Indeed, the troubles live on, even as our response to them has been subdued. To distract us from their power over us, at first the tech companies hid their intentions. Now that we’ve caught on, they’ve taken a new approach. They’ve served us a tiny sip of their own intoxicating power — they’ve given us power over each other. + +Zoë Hitzig is an economist and the author of two poetry collections, most recently *Not Us Now*. She is the poetry editor of *The Drift.* + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/Power Failure On Landscape and Abandonment — Switchyard.md b/00.03 News/Power Failure On Landscape and Abandonment — Switchyard.md new file mode 100644 index 00000000..50aeaf6f --- /dev/null +++ b/00.03 News/Power Failure On Landscape and Abandonment — Switchyard.md @@ -0,0 +1,147 @@ +--- + +Tag: ["🏕️", "🌱"] +Date: 2025-01-14 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2025-01-14 +Link: https://www.switchyardmag.com/issue-4/power-failure +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-PowerFailureOnLandscapeandAbandonmentNSave + +  + +# Power Failure: On Landscape and Abandonment — Switchyard + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/a0d8e659-4dd0-466f-94c6-02c152164700/_17A8827.jpg) + +*hotographs by Jesse Rieser* + +I had driven for an hour through a landscape blasted by extreme heat and drought before I saw a single combine at harvest. It kicked up a thick dust cloud that coated my windshield, and from then on, it was like watching some dystopian film looping on fast-forward inside the frame of my car window. The monotonous succession of stricken row crops flashed by. It had been a brutal harvest for Ohio’s farmers. The corn, the soybeans, the wheat fields, all rust-colored, almost Mars-like in hue. There were no green fields. Corn yields cut by almost half. Disaster declared across the state. According to official agricultural maps, I wasn’t even in the worst of it yet: a moderate drought (light brown) zone lay ahead. It was hard to imagine worse—extreme drought (bright red) or exceptional drought (a deep brick red).  + + I pulled over and stepped out. The air felt indistinguishable from a summer day, with temperatures in the high 80s. It was October, which one could say made no sense, if it weren’t just the way things are now. I walked beyond the rocky berm and stood in a patch of brown grass, directly underneath a high-voltage power line. It was held up by a soaring mass of steel, a transmission tower, its base thick and wide as an old oak tree. The route of the lines went north across more withered fields to the horizon line. I listened hard and long, and in the brief silences when no cars drove past, I finally heard it: a rapid succession of intermittent crackling. It started then stopped. Started again. Sometimes the crackling merged with an otherworldly vibration. I stood in blinkered awe: the lines really did hum. These two discordant sounds—the crackle and the hum—morphed into something more spectral. The wind picked up, and for the briefest of moments, my entire body felt electrified, as if some inescapable force had surrounded me.  + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/686d882d-f246-4237-a446-460b0e146e43/_17A0098.jpg) + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/00b6a69b-ce66-4a55-b116-f1685e8c3a9b/_MG_9153.jpg) + +I only later learned that I was likely standing in a corona discharge. A phenomenon that’s hard to put into plain language: a kind of disturbance, yes, and of the kind power companies don’t exactly bring to our attention. The definitions I read, all too long and too technical to repeat, don’t really capture the phenomenon. What’s worth knowing is: the crackle and hum are a symptom of a failure. Not all power makes it to its destination. There’s always a discharge of some sort. Losses, by most estimates, run as high as five percent of power transmitted within the US grid system. These discharges sometimes happen when the air surrounding a high-voltage line is unstable: it’s hot, too dry, or blustery. The energy thrown off has nowhere to go. The air itself becomes a conductor. In effect, the line becomes more powerful than what exists around it. A corona discharge is, in a word, an imbalance.  + +I was searching for power lines, because I wanted to make sense of another kind of imbalance within the landscape of central Ohio: that between corporate control and ordinary people; between economic development and nature; and, most acutely in a season of drought, between electricity-hungry data centers and something as necessary for human survival as a field of crops. That’s what brought me to this roadside in Sunbury, a once quiet farming village founded as a stagecoach stop in the early 1800s, nearly at the bullseye center of Ohio. This was the starting place for two proposed 13-mile high-voltage transmission line corridors to be built by American Electric Power Ohio, the state’s largest utility. The lines would start just south of Sunbury at a sprawling substation and then traverse a stretch of farming tracts and country homes within a rural township until they reached two substations northeast of New Albany. The 150-foot-wide corridors, with towers equally tall, connect two cities radically divergent in fortune and political influence, another kind of imbalance. Where Sunbury has a median household income of about $92,000, New Albany is the wealthiest city in Ohio, with a median household income of nearly $225,000.  + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/6e086447-e865-4124-8afc-60d7c62bca90/_MG_9154.jpg) + +New Albany is also the epicenter of Ohio’s data center boom, and a city effectively controlled by Ohio’s richest man: Les Wexner, the retail billionaire behind Victoria’s Secret, who according to *Forbes*, recently netted an $800 million windfall by investing in an artificial intelligence data center. The two new lines, once completed, will also power a cluster of Amazon data centers in New Albany and a massive new factory being built by Intel, lured to Ohio by $2 billion in state incentives. Recently, Amazon and Intel signed a deal with each other—after securing a $3 billion grant from the US government—to make chips for the military. And on Dec. 16, Amazon said it plans to invest another $10 billion in new data centers in Ohio by the end of 2030. + +Stuck in the middle of these two cities is Harlem Township, a rural farming community, where the loss of land and the consequent shift in the psychological landscape would be felt most intensely. At public meetings with township trustees about how to keep the community intact and maintain its “rural-centric” character, a sense of powerlessness was pervasive. “We got Les Wexner out there letting everybody else come in. AEP’s throwing these big tower poles in our front yards,” one resident complained. “Put one in Les’s backyard see how he likes it. Run a gas line through his backyard, see how he likes it.” + +Other locals submitted comment letters to the state’s regulatory body charged with approving the lines. They worried about losing their unobstructed views of fields and forests. Some had moved away from cities specifically to escape the snarl of overhead lines. Adam and Beth Franz bought land in Harlem Township and built their dream home, only to discover that their property will now be crossed by the lines. Some commenters’ families had been on their land for generations. They worried about damage to their farms, to drainage tiles and crop yields. “The needs of our corporate neighbors to the East should not be the only consideration here,” wrote Amelia Smith. Ron Van Winkle worried about the creek on his property and the utility’s plans to “remove trees that presently hold our creek bank intact.” Sarah and Shaun Collignon, who live on five acres, were too far from the lines to receive any compensation, but not far enough that the lines wouldn’t destroy the peaceful sanctuary they’d built for their three young children: the garden at the edge of the property, the chickens roaming freely in the yard, a tree house built by grandpa, the unobstructed view of sky and fields, the garden where the children “gather blackberries in the summer, run with the dog, find interesting insects, play in the leaves.” + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/262f9115-9f22-4d72-88b2-7a14454c74be/_17A9264.jpg) + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/0f9eb12a-3086-4ee3-b247-18e61e0aa452/_17A9554.jpg) + +Despite these complaints, construction of the lines is moving ahead, no matter the cost. Many locals have already been bought out in private negotiations for easements, although only for those with lines and towers directly on their land. Those living adjacent get nothing. Meanwhile, the cost of land has soared. In Ohio, the average value was $8,040 an acre last year, according to the USDA. But in Central Ohio, a farmer recently sold 227 acres of farmland to Microsoft for $29 million. Who could say no? With those left behind, slammed with higher tax burdens. It wouldn’t be accurate to even call it a battle. More a full-scale appropriation of place. There was too much at stake. And no chance of a David versus Goliath ending in such a scenario.  + +When I first started following this story, I thought I would walk the transmission routes. Maybe then I could understand the impact of data centers on the landscape of my home state, where I grew up and still live, and how they were changing other places. But when I looked south along the transmission route, across the road from where I’d pulled over, I saw a fenced-off field, fallow and desolate, a NO TRESPASSING sign hammered to an old wooden post. The lines dipped and followed the slight rise and fall of the land to the southern horizon line. There was no way to even glimpse the scale of what was being lost, what was being taken. + +Data centers, in the plainest terms, are nothing more than buildings—gleaming windowless monstrosities but just buildings. The danger comes from what’s inside. Computers, servers, data storage drives, network equipment and communication connections, and everything else needed to prop up the fragile infrastructure of our rapacious tech boom. In Ohio, many of those data centers service Amazon, which defines the need for such a site bluntly: “It is the physical facility that stores any company’s digital data.” Because that data, for an online juggernaut like Amazon, essentially *is* the company, they protect it with redundancies and backup systems, with air conditioning and water cooling and fire suppression systems, and physical security measures wired to surveillance and alarm systems. Every bit of it demands more and more electricity, amping up demand for fossil fuels, and it requires astounding amounts of water—a large data center can require as much as five million gallons of water a day. + +And with the rise of crypto mining and artificial intelligence, that usage continues to climb. Ohio has more than a hundred data centers now. Amazon, Meta, Google, they’re all here and all expanding, and Microsoft is coming next. Attracted by hundreds of millions in tax breaks, now they’re pressing for more. Much of that growth was sold as economic salve, with Ohio an easy mark, reeling as it was from the loss of nearly half a million manufacturing jobs during the Great Recession; the giveaways justified with the promise of reviving communities, despite the fact that most data centers are being built in the state’s richest city, and they offer few jobs, and when they do, they are mostly low-paying, contract security jobs. It wasn’t just the tax breaks. Massive sweetheart deals for cheap electricity, still undisclosed, were hashed out with a public utility commission captured by industry, with no mandate to safeguard against broader disaster, no concern for our shared future. + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/4d2ec37b-3d0b-4d35-8445-d5af9cf53a37/_17A9578.jpg) + +All told, the power needs of Ohio’s data centers are already staggering, but the near future is hard to even imagine. By 2030, in Central Ohio alone, demand will skyrocket to more than 5,000 megawatts—roughly equivalent to the power consumption of all of New York City. That power must be delivered to those facilities somehow. And so along with the data centers, miles and miles of new high-voltage transmission lines are needed in the state. AEP has chosen distressed farms and politically weak rural communities as sites to clear paths for more transmission lines, and for good reason: these communities have the least influence to resist such encroachment. + +This expansion of the electric grid and demand for power comes at a moment when the consensus among scientists is dire at best. We’re a mere decade from a point of no return if we are to avoid the worst consequences of climate catastrophe. If we fail to recognize the stakes, our generation will have to answer the hard questions of history. How did we become so oblivious to our own peril? Our oceans are rising and acidifying, our forests burning, our rivers flooding, our ice caps melting, our soil degrading, our harvests scorched by drought. How did we allow ourselves to be gripped by this collective death drive?  + +Instead, we’re doing the most destructive thing imaginable: transforming the landscape irrevocably, adding at an astonishing clip to the estimated 11,000 energy-and-water-hungry data centers already in operation globally. With thousands more planned. Whether we fully recognize the consequences or not, we’re giving in to corporate America’s thirst for power and callous indifference to environmental cataclysm. + +It’s unlike anything that has come before. For seven decades, the balance between economic growth and the power requirements to sustain that growth followed divergent trend lines. We had steady growth while our power needs remained mostly flat. In the 2010s, for example, the US economy expanded by a cumulative 24 percent, but electricity demand remained unchanged, according to energy research firm Wood Mackenzie. That balance is now being radically upended. And the unprecedented energy demands of artificial intelligence represent a potentially calamitous divergence. The International Energy Agency (IEA) has said the electricity usage of data centers worldwide might double in just four years. US electricity demand alone could jump 20 percent by 2030, driven mostly by AI, according to a Wells Fargo analysis. + +By 2050, the global electricity demand for AI and data center will be nine times higher, at 4,500 trillion-watt hours of electricity. That’s up from only 500 trillion-watt hours last year. A figure impossible to wrap your head around. “I’ll see if I can get some perspective, but it is a very large amount,” wrote Mark Thomton from Wood Mackenzie, when I asked for some way to translate the unit of measurement into something more comprehensible. He emailed back, within the hour, apparently stumped. “Unfortunately, we don’t have an easy way for you to conceptualize it.” + +But one part is possible to visualize: the lines. Electricity flows through thousands and thousands of miles of high-voltage lines within the US grid—an astonishing 150,000 miles of transmission corridors, enough to circle the equator six times. These corridors are the backbone of industrial development. It’s been called the largest machine on Earth, a marvel of engineering. But it also has, cumulatively, released more heat-trapping greenhouse gasses into the atmosphere than any other machine on earth. This machine is getting bigger, much bigger, both in Ohio, and across the country—but for whom?  + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/02084151-cc62-41d0-9564-b24fa64941e7/_17A4140.jpg) + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/a1ac646d-86cb-481e-89a4-c1e0103cd171/_17A9013.jpg) + +As the body’s vascular system circulates blood, transmission lines carry power across great distances, most of which is still derived from burned coal, fracked gas, and the potent hydrocarbons of methane. Their massive steel towers, as high as 180-feet, require wide corridors the size of football fields. After the mass clearing of trees and vegetation, vast swaths of rural countryside and farmland are rendered useless for much else. In this way, data centers are remaking the form and function of the American landscape as surely as the Erie Canal did or the Transcontinental Railroad. Second only to the Interstate Highway System, data centers are now the most visible and ubiquitous manifestation of raw political power in our country, and a physical representation of our nation’s enduring class divides. + +There’s a certain banality to a data center within the landscape. They are void of any cultural significance, or aesthetic value, and inside they offer little in the way of space amenable to human habitation. In this way, data centers embody our existential alienation, a visual representation of the emptiness at the core of our impulsive material consumption. Nothing remotely awes in these spaces despite an outlay of treasure estimated in the trillions already. To think too hard on it, is to welcome a mood of loss over the extraordinary opportunity costs. A construction boom that in some alternate universe might have gone to building actual sustainable and technologically superior libraries, community spaces, cleaner farms, or even meeting basic human needs in the present: gardens and bike paths and sidewalks, or affordable homes. + +The data center has only one possible ending: abandonment. Those giant windowless buildings will come to symbolize the post-agricultural landscape as surely as the worthless artifacts of our post-industrial age: the “ghost boxes” of shuttered Walmart superstores, the deserted shopping malls, the defunct Rust Belt factories. The knowledge locked up in data centers will be inaccessible to future generations, even if the forever chemicals used in their cooling systems will last, well, forever. We are told they will bring to us—in supporting the functions and computing power of AI—a magical transformation, but to what end? Bill Gates, in an inexplicable tautology during a recent interview with *The Verge*, argued the power needs of AI are an acceptable compromise, a net benefit, because AI might help us solve the climate crisis. Coal-powered solutions to eliminating coal. He also suggested that AI could answer questions in the new era of climate catastrophe, questions like: “How do you make steel? How do you make meat? What’s the weather going to be like?” + +This is the new promise—there have been others—that the tech giants are going to save us. They say they are poised to become the largest purchasers of renewable energy in the US, propping up and providing mega-buyers for green initiatives. In shiny sustainability reports, they promise net-zero emissions. They promise to transform the US grid system. Instead, in recent years, Google’s greenhouse gas emissions increased 50 percent; Microsoft’s rose 29 percent; Meta’s jumped 66 percent. Such drastic rises expose the lies obscured by past promises: data centers don’t use green energy. Because they can’t. They must be connected directly to the grid. There’s too much at risk otherwise: the sun sets, the wind stops. And even if they buy offsets and renewables, that’s not the same. They cannot be islands. They must be tied up to the grid. They need high-voltage transmission lines. And in that way, big tech dictates the design of the future grid, which means more coal, more natural gas, more carbon emissions. The mad rush to secure power has become increasingly desperate: in Pennsylvania, Microsoft wants a 20-year agreement to reopen the Three Mile Island nuclear plant; in Virginia, Amazon is pushing the state’s energy suppliers, including the Ohio-based FirstEnergy Corporation, to slow their move away from coal-fired plants. For those who raise red flags, the tech industry points to concerns of the moment. We need data centers to uphold the speed of modern life. To drive economic growth. To beat the Chinese. + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/e1c5c680-88ac-4555-9705-87b7de2cbfec/_17A8687.jpg) + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/d4278663-e03e-4bf1-a851-5ef6be83644f/_MG_9072.jpg) + +It’s another way in which the balance is off: between human and machine. Data centers are landscapes onto themselves—boxes built for the automation of entire sectors of the economy; stacks of servers, acres long and wide, inhumane in scale and aesthetics; sealed off, fenced-in for security, useless for anything but the empty act of simulacrum. They cannot grow food. They cannot house people. They cannot even sustain themselves for very long (the lifecycle of a server is less than five years). Like us, data centers can only consume—electricity, water, space. At most, they promise to drive the revolution that makes humanity obsolete. + +As Amazon behaves in other sectors of the economy, so it behaves in energy markets. It stops at nothing, neglects no lever of influence or power, and in the end, gets what it wants. In Ohio, it has gained not only massive tax incentives but also deep, undisclosed discounts for its electricity—the power that powers its power. Deals unfolded with almost no transparency and even less public scrutiny and input. In the beginning, Amazon hid its identity, using a subsidiary, Vadata, to conduct private negotiations, even using code names, in correspondence with the state’s privatized economic development entity, JobsOhio, the region’s largest public utility, and state regulators. At any mention of concern, Amazon threatened to take its business to other states, and extracted price concessions, which the public still doesn’t know the value of nearly seven years later. + +Some communities hoping for jobs and an economic lift offered free land where Amazon could build. There was little way, and no viable democratic process—public officials negotiated with Amazon in secret, shielded from the state’s sunshine laws—for residents or local officials, or school districts, in more economically strapped regions to question whether Ohio officials and regulators should give tax breaks and preferential electricity rates to a company with a market capitalization in the trillions to bring data centers to the state’s most affluent community. It was decided before locals could object, so they had no choice but to compete to get some piece of the proceeds rather than simply shouldering all the costs. + +Consider that even today, retail customers of AEP Ohio are unaware how much their electric bills have inched higher because of its Amazon deal. Amazon claims such information is a “trade secret.” The combination of free handouts and little transparency has attracted other companies, such as Google, Microsoft, and Meta, all of which also get undisclosed discounts on electricity—and all of which banded together in September 2024 to loudly oppose a payment suggested by AEP Ohio to cover the cost of expanding the electrical grid to support them. So everyone else in Ohio, including low-income residents who pay more of their monthly income on energy than affluent households, have been forced to absorb these rising costs to devastating effect: since 2021, AEP has shut off power to 496,368 households for unpaid bills—a number which seems certain to rise as rates for electricity rise. Meanwhile, the richest, most powerful companies in the world continue to get special, undisclosed deals for their electricity. Ordinary Americans, in the language of energy policy wonks, are mere “ratepayers,” and the least influential actors in this opaque regulatory process. As such, they are the least likely to figure out some effective means of resistance, some way to stop this blatant gaming of the system. The process of utility ratemaking—deciding who pays how much for power and where new transmission lines get built—remains a byzantine, muddled process ruled by experts. + +There’s an even more pernicious imbalance at work. The regulatory bodies charged with making sure that what you pay for your power is “fair, just, and reasonable for all consumers” have often, and quite easily, been co-opted by industry, or worse, succumbed to double-dealing and outright fraud. Consider that the largest bribery scandal in Ohio’s history involved utility ratemaking, a seemingly staid and uncorruptible process, which is saying something for a state that gave the world Jim Traficant, the Youngstown Congressman ousted for racketeering, bribery, and tax evasion.  + +The shocking $65 million bribery scheme ended in early 2024 with Sam Randazzo, the former chair of Ohio’s public utility commission, which first approved the Amazon rate deals, found hanging from a rope in an empty warehouse, dead from suicide, as he was faced with a long jail sentence. That scandal—more than $1 billion was offloaded to ratepayers to bail out two failing nuclear power plants—toppled the speaker of Ohio’s Republican-controlled statehouse, Larry Householder. He now lives in a federal prison in Elkton, serving out a 20-year sentence.   + +#### **• • • •** + +These imbalances of power offer only grim conclusions. The lines from Sunbury to the two substations near New Albany will get built. + +The lines will traverse 25 streams, according to environmental studies by the state. + +The lines will clear-cut 55 acres of trees. + +The lines will cross 47 wetlands and two ponds. + +The lines will destroy habitat for the Indiana bat, the northern long-eared bat, the little brown bat, the tricolored bat, and the northern long-eared bat, all endangered or threatened. + +It’s another imbalance: the bats need the trees, but the transmission lines need the land. The trees should be “saved wherever possible,” the state’s bureaucrats working for Ohio Department of Nature Resources (ODNR) noted, albeit without much conviction. “If tree removal is unavoidable,” they can still be cut. + +The lines will cross within the range of the state-endangered northern harrier hawk, which prefers open habitats and hunts over grasslands. But in the language of officialdom, this hawk is not enough to stop the routes. There will be field inspections, sure. But if habitat is found, it’s not a game-stopper. The ODNR only recommends that “efforts shall be made to minimize impacts.” + +The lines will be built. Amazon will use its power to get more power.  + +Driving south on the gravel road of the Sunbury substation, I passed onto the idyllic, two-lane country roads of Harlem Township. I saw black cattle grazing in wide open fields and more burned-out row crops withered in the heat. There were silos next to tracts of five-acre homesteads with RVs and campers in long driveways. Trump flags flapping from flag poles. Murals of the former president on the sides of old wooden barns. Signs of his pending victory all around. + +In the coming weeks, *The Washington Post*, now owned by Amazon’s founder Jeff Bezos, would issue a craven and calculated non-endorsement of either presidential candidate. The move was another way of building Amazon’s extraordinary form of power. The company has billions in government and military contracts—and hopes to secure more under a second Trump administration. Amazon already safeguards top secret information for the CIA and for the US military; now, they’re hoping for an $8 billion contract with the Pentagon to modernize military servers and data centers. As the government’s dependency on intelligence-gathering and AI analysis grows, Amazon’s profitability is also growing inseparable from the powerful interests of the US military and the arms industry that sustains it.   + +![](https://images.squarespace-cdn.com/content/v1/65203ed8bebd9d456c1ad651/05f62781-c8d4-403f-965e-7ded0af6984f/_17A9068.jpg) + +The morning after Trump’s election in early November, Bezos would take to Elon Musk’s platform X to offer a belated unofficial endorsement. “Big congratulations to our 45th and now 47th President on an extraordinary political comeback and decisive victory,” Bezos wrote. “No nation has bigger opportunities. Wishing @realDonaldTrump all success in leading and uniting the America we all love.” But such blatant flattery to secure one’s advantage was still weeks away as I neared the outskirts of New Albany. + +I came first upon the thousand acres of the Intel campus, with its two chip factories in the throes of construction. The sprawling site had been rebranded by the state’s economic development boosters as the “Silicon Heartland.” It was surrounded by a wire fence and more NO TRESPASSING signs. A few dozen orange and white cranes towered above the site. Rather improbably, across the street, a farmer in a combine harvested a field of crops and kicked up more dust clouds. The field was adjacent to a newly built water tower, not yet operational, its massive tank, resting near the ground, not yet ready to play its role in providing the plant with the 5 million gallons of water it would need a day to operate.  + +I drove on in search of Amazon’s data centers, clustered south of the development and far from New Albany’s residential enclaves with names like Asbury Ridge, Windsor, and Hampsted Green. The Amazon data centers might as well have been blank spots on the map. Their anonymity and uniformity unnerved me. There were no signs signifying what was what. It was like a miniaturized landscape of old medieval cities. Fortress-like black vertical steel fences with foreboding spear tips that weren’t ornamental, surrounded the perimeters of long, flat-roofed buildings larger than any shopping mall or airport hangar. I pulled into one entrance and stepped out. I felt watched and registered by round camera globes secured to building corners or protruding conspicuously from towering light poles.  + +I drove on to New Albany’s downtown. At an upscale wine bar and restaurant, the bathrooms had bidets and heated toilet seats, and Sinatra piped in through a ceiling speaker. The perfectly coiffed women seated across from me slurped oysters and sipped Cava, while they debated the capital gains hit if the second home of one was sold in Santa Barbara. Outside on Main Street, there was no hint of the industrial world only five miles away. The sky above unobstructed. It was all clear blue all the way to the horizon line. + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/Steward Health a cautionary tale in private equity's push into health care.md b/00.03 News/Steward Health a cautionary tale in private equity's push into health care.md new file mode 100644 index 00000000..69b14e5b --- /dev/null +++ b/00.03 News/Steward Health a cautionary tale in private equity's push into health care.md @@ -0,0 +1,367 @@ +--- + +Tag: ["📈", "🫀", "🇺🇸", "💸"] +Date: 2025-01-14 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2025-01-14 +Link: https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/for-profit-health-care/ +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-StewardHealthacautionarytaleinprivateequityspushintohealthcareNSave + +  + +# Steward Health a cautionary tale in private equity's push into health care + +Nearly 75 years ago, more than 6,000 people gathered on a Methuen hilltop, under dark skies and in a persistent drizzle. They held umbrellas or newspapers over their heads, and jockeyed for a spot to witness this grand opening. + +The dedication of a new Catholic hospital, paid for by donations from the “rank and file,” as their archbishop noted, was a momentous leap for their community. + +Nancy Glynn, 13, sensed the magnitude of the moment. The schoolgirl was among the thousands who strolled through the hospital’s open house that September day in 1950. Floors gleamed. New equipment sparkled. Nuns in all-white habits stood sentry at front-line medical posts. + +A fund-raising drive, endorsed by the Boston Archdiocese in 1944, had brought in the dizzying sum of $1 million to stand up the sprawling four-story brick-and-mortar building. Businesses gave thousands; working people gave a dollar or two, whatever they could spare. Three years into World War II, people understood sacrifice for the greater good. + +![A statue of the Virgin Mary stood outside of Holy Family Hospital in Methuen in October 2024. The hospital, once part of Steward Health Care, has been taken over by Lawrence General Hospital.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/280507500f34e696630a55bf7bac76a1/8f95c/OHWWIIHKT65SBKBGOERPCXJEPA.jpg) + +A statue of the Virgin Mary stood outside of Holy Family Hospital in Methuen in October 2024. The hospital, once part of Steward Health Care, has been taken over by Lawrence General Hospital. (Jessica Rinaldi/Globe Staff) + +A submarine officer from Lawrence sent a $25 check and a letter written in the waters near Okinawa. “I, and the submarine in which I have served, have caused so much destruction in this war that it does my soul good to be able to help construct something.” + +Amid this upswell of goodwill and hope, Glynn, the teen from Lawrence, found a calling for service for the sick and needy. + +###### [Explore more](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/) + +- [Death, indignity, despair: The human cost of Steward’s neglect](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/steward-for-profit-hospitals-investigation/) +- [How Steward’s CEO used corporate funds as the company crumbled](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/flights/) +- [Meet the corporate board that OK’d many of de la Torre's decisions](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/steward-board/) +- [Steward raided the coffers of its in-house malpractice insurer](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/steward-traco/) +- [How state officials enabled Steward’s rise and fall](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/regulators/) + +She returned to the hospital in high school to work as a candystriper. She came back after that, for a job as a physical therapist. She so admired the sisters who ran the place and for whom the hospital was originally named that she joined the order. + +“What drew me to the Sisters of Bon Secours was they were very human, very down to earth,” Sister Glynn, 87, said recently. “And also the fact that it was a health care community. I knew that I wanted to work in health care.” + +The hospital was not merely an asset to the sisters: It was the work of their lives, their reason to be. They not only served at the hospital, they lived in a convent next door. They took winter toboggan rides on the property’s steep grounds. And when they grew old and died, they were buried there, in a cemetery behind the convent. + +Holy Family Hospital’s stirring origin story makes its tribulations in recent years all the more devastating. Sold off to a private equity firm and repackaged as a part of the for-profit Steward Health Care chain, this vital public asset — and many others like it — became a victim of Steward’s financial meltdown, which serves today as a warning about what can happen when profit imperative collides with the values and interests of a community. + +![Sisters of Bon Secours assigned to what is now Holy Family Hospital in Methuen enjoying winter sledding in a photograph from the mid-1960s. Courtesy of the Sisters of Bon Secours.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/4601c4f89fe1cccae126282c00f313c8/3dfdb/RODQRM6VNNTOUWAT5D4EC42VWA.jpg) + +Sisters of Bon Secours assigned to what is now Holy Family Hospital in Methuen enjoying winter sledding in a photograph from the mid-1960s. Courtesy of the Sisters of Bon Secours. + +The rise and fall of Steward tracks a surge in private equity into all sectors of US health care in the wake of the 2010 Affordable Care Act. The annual value of private equity health care deals roughly tripled over the 2010s, reaching $120 billion by 2019, according to experts. Today, private equity firms own around 460 US hospitals, about 8 percent of all private hospitals and 22 percent of all for-profit hospitals, according to the nonprofit Private Equity Stakeholder Project. + +At its peak, Steward, with more than 30 hospitals, was a significant slice of that pie. Private equity deals are often pitched as the last chance to save struggling hospitals. Sometimes they do. In other cases, hospital systems have been stripped of assets and neglected while executives and investors reap huge payouts. + +Today, Steward is under scrutiny in several ways, [including bankruptcy court](https://www.bostonglobe.com/2024/10/16/business/steward-health-care-lawyers/), where the carcass of the company — $9 billion in debt — is being picked over. And in federal district court, where prosecutors are digging into allegations of financial mismanagement that hastened the company’s collapse. + +In Massachusetts, taxpayers are bracing for [a $700 million bill](https://www.bostonglobe.com/2024/08/23/business/steward-hospital-new-operators-cash-infusion-taxpayers-700-million/) to rescue several Steward hospitals, from the same government that permitted this to happen. A Steward spokeswoman said the company declined to comment. + +Early this year, [the Globe Spotlight Team](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/) set out to examine what went wrong in this once-promising, Boston-born hospital chain. The scenes and revelations in this story are drawn from eight months of reporting and more than 100 interviews, including first-hand accounts from key Steward insiders who witnessed, and at times enabled, the company’s downfall. The account also relies on tens of thousands of internal company emails obtained by [the Organized Crime and Corruption Reporting Project](https://www.occrp.org/en) and shared with the Globe. + +What’s emerged is a cautionary tale about letting a wannabe billionaire, a titan of private equity, and a real estate investment trust become stewards of a public necessity like health care. It is about how they took a business dedicated to serving patients, and by their own account, turned it into a business for finance and investing. And it is about how everyone, so far, has gotten away with it. + +In the decades following its grand opening, Holy Family suffered a series of indignities, each worse than the one before it. In the 1980s, it was subsumed into the Boston archdiocese’s hospital network, Caritas Christi Health Care, to the dismay of the sisters. They left Methuen in 1988, taking the Bon Secours name and the bones of their departed sisters from the hospital grounds, exhumed to be reburied near their US headquarters in Maryland. + +As the archdiocese’s finances grew shaky in the years after the child sex abuse crisis, the six hospitals of its Caritas chain operated on thin budgets. + +“The financial challenges were front and center,” recalled Helen Drinan, Caritas’s former human resources chief who worked there in the 2000s. + +In 2008, the Caritas board took a big swing at new leadership, hiring a CEO with zeal and intellect, but zero experience running a hospital. Ralph de la Torre was an accomplished heart surgeon, who swaggered into Caritas like a savior in a white lab coat, with a CV chockablock with elite institutions: schooling at Duke University, Harvard Medical School, and MIT; training at Massachusetts General Hospital. He had worked at Boston Medical Center and founded a cardiovascular institute at Beth Israel Deaconess Medical Center. + +![Dr. Ralph de la Torre, then CEO of Caritas Christi Health Care, talked with Norwood Hospital President Margaret Hanson as they walked to a meeting in 2009. Behind them is a statue of St. Luke, the patron saint of doctors.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/3bd4148a8ef3080e4d665beea5fb2f53/7dd0b/HOF57226KNF55BGP7FBZVKEP64.jpg) + +Dr. Ralph de la Torre, then CEO of Caritas Christi Health Care, talked with Norwood Hospital President Margaret Hanson as they walked to a meeting in 2009. Behind them is a statue of St. Luke, the patron saint of doctors. (John Tlumacki/Globe staff) + +He also sought personal wealth and power, and exhibited “an unhealthy desire to win at all cost,” as a former colleague put it to the Globe. Several company insiders said De la Torre was often heard to remark: *If I’m not a billionaire by the time I’m 50, my life will be a failure.* + +In response to questions from the Globe, a spokesman for de la Torre released the following statement: + +“Dr. de la Torre cannot control what people think they hear. That said, throughout his career, Dr. de la Torre’s mission has been to expand access to high-quality care for underserved communities. You need to look no further than his advocacy for Carney and Saint Joseph’s Medical Center despite their monumental losses.” + +When de la Torre took command, the shopworn Caritas hospitals were overshadowed by Boston’s big teaching hospitals, and generally served a less affluent population. But the chain was a vital part of the region’s health care ecosystem. It employed 13,000 and served more than 500,000 patients annually. + +De la Torre knew the chain needed fresh capital. But from where? Merger plans with a bigger Catholic health system had failed. Banks hungover from the Great Recession weren’t interested. + +That left private equity firms, which attract investment from institutions, such as pension funds and college endowments, and assume stakes in companies seeking cash, expertise, and greater profit margins. + +If there’s an episode that best reflects the birth of Steward, company insiders say, it might have been in 2009, at the Ernst & Young Strategic Growth Forum in Palm Desert, Calif. The event brought the celebrities of the business world and more than a thousand executives and entrepreneurs to the JW Marriott Desert Springs Resort & Spa. Along with lectures and panels, the conference offered a chance to network with the stars. + +Ralph de la Torre had worked connections to land in a small-group dinner with former Home Depot CEO Bob Nardelli. He had run Chrysler for its private equity owner, Cerberus Capital Management. + +De la Torre intended to consult Nardelli on how a deal to reimagine the archdiocese’s hospitals might be structured, and, according to multiple people who heard this story, as the group of self-styled alphas jousted with one another, de la Torre asked Nardelli: *Hey Bob, have you ever held a human heart in your hands*? + +Nardelli came away impressed by de la Torre’s moxie. “This guy had tremendous edge,” Nardelli later recalled. And in the world of private equity, edge is everything. Nardelli later connected de la Torre with the leader of Cerberus’s private equity group. + +![Stephen Feinberg, cofounder of Cerberus Capital Management, during a December 2008 visit to Capitol Hill. Feinberg, who backed President Donald Trump’s campaign, is said to be in talks for a top post in the Office of the Director of National Intelligence.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/2b14d20a9d843f6cb6067969593603f2/705a4/UJF3YFVNUPB2LQ6OY3VE4NM7BQ.jpg) + +Stephen Feinberg, cofounder of Cerberus Capital Management, during a December 2008 visit to Capitol Hill. Feinberg, who backed President Donald Trump’s campaign, is said to be in talks for a top post in the Office of the Director of National Intelligence. (Brendan Smialowski/The New York Times) + +Cerberus, named for the three-headed dog in mythology that guards the gates of Hades, was cofounded in 1992 by investor Stephen Feinberg, who was recently picked by President-elect Donald Trump to be the next deputy defense secretary. Former Republican vice president Dan Quayle is on Cerberus’s senior leadership team. + +Cerberus became one of three private equity firms interested in acquiring the Caritas hospitals in 2010, and the only one willing to invest and stick around for at least five years. That was how long de la Torre said he needed to become profitable, according to a former Steward executive. + +At the time, the chain’s rickety finances made it “impracticable, if not impossible” for the church’s hospitals to continue operating as a charity. So said Massachusetts Attorney General Martha Coakley before she signed off on Caritas’s transition into a for-profit business. + +The new for-profit hospital chain, Steward, emerged as a subsidiary of Cerberus, allowing the value locked up in hospitals built by sweat and charity to redound instead to Cerberus’s investors. + +Like Steward, other private equity-backed hospital chains have cut less profitable services; others have also sold hospital real estate and leased the properties back, choosing quick cash in exchange for ever-escalating rents. + +Others paid massive distributions to their owners even as the hospitals they owned struggled. The private equity firm Leonard Green & Partners, for instance, famously took $658 million in dividends and fees from troubled Prospect Medical Holdings, a chain with hospitals in Connecticut and Rhode Island. Prospect is currently being sued by Pennsylvania’s attorney general for [“corporate looting.”](https://whyy.org/articles/crozer-health-pennsylvania-attorney-general-sues-prospect/) + +With Steward, Cerberus’s initial cash investment was $246 million. That was all the money the firm would put into the company. Steward was required under an agreement with the state to invest at least $400 million to improve its hospitals. That amount would largely come from selling assets and from adding debt — not on Cerberus’s balance sheet, but on Steward’s. + +Cerberus, in a recent public statement, said its 2010 investment “saved multiple hospitals that would have otherwise closed more than a decade ago, putting thousands of employees out of work, and leaving the communities served by these hospitals devoid of necessary healthcare services.” + +For nearly its first six years, Steward delivered no giant paydays for its private equity owners. That was about to change. + +Five years after de la Torre wooed Nardelli in Palm Desert, the relationship between Steward and Cerberus had soured. Though Cerberus provided the catalyst for de la Torre’s company and road to billionairehood, the executive now chafed under its ownership. + +De la Torre had taken to preaching about the predatory nature of private equity. + +*Cerberus is evil. We’re just an asset to them. They don’t care about patients*, he’d complain to anyone within earshot, one company insider recalled. + +This much was true: Cerberus was out for money. Private equity firms are unlike the 20th-century benefactors of Catholic hospitals. Cerberus’s cash infusion was not charity. They wanted a return. A return with interest. + +“You can’t blame a lion for eating you, because that’s what they do,” said one high-ranking Steward executive who heard de la Torre’s pitch. + +> “You can’t blame a lion for eating you, because that’s what they do.” +> +> —Steward executive + +De la Torre knew it. So he sought a windfall big enough to satisfy Cerberus. To get there, de la Torre and his executive team embarked on a cross-country roadshow aboard a rented plane in search of the big spender that would pay off the private equity giant and supply Steward with the funds to expand. + +They started out with the big banks; the Wall Street types with offices in gleaming towers. But no one in New York — or the entire East Coast — would bite. + +No matter how much cajoling de la Torre did, potential investors kept pointing out an inherent problem with Steward’s pitch: There had been no profit to date and there seemed little chance of a return. Months into the tour, the executives found themselves inside the waiting room of a small Canadian pension fund, according to a person familiar with the trip. They, too, said, “Thank you for coming, but goodbye.” + +Eventually, de la Torre found a second life through something an Alabama-based real estate investment trust was calling the “asset-light” model. + +Steward would sell its land and hospital buildings to the firm, Medical Properties Trust. The hitch? Steward would need to [lease back those properties at premium prices](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/steward-mpt/). + +The arrangement transformed Steward’s physical assets into immediate cash. + +But most importantly and immediately, at least to de la Torre, the deal represented opportunity. + +In the 1940s, when the site in Methuen was selected for the Bon Secours hospital, later renamed Holy Family, townspeople swarmed to the spot as if on a pilgrimage. Some even scooped up loose soil in handkerchiefs, pocketing a piece of history. When construction began, hordes gathered each Sunday to watch the hospital come to life from steel, bricks, and mortar. + +In 2016, both the hospital and the land on which it sat had become bullet points in the portfolio of a publicly traded firm, headquartered 1,000 miles away in Birmingham, Ala. + +Medical Properties Trust would pay Steward a staggering sum — nearly $1.3 billion — for its nine hospital campuses in Massachusetts, roughly nine times what Steward had paid less than a decade earlier. The majority of the proceeds went to dividends and to return Cerberus’s original investment, not patient care or physical improvements. Cerberus took $719 million; de la Torre and his management team got $71 million, according to figures Cerberus later made public. + +De la Torre provided slightly different numbers to the Globe, saying about $55 million in cash was divided among the management team and 19 board members. The group also received MPT stock, which taken together with the cash, totaled about $68 million. + +“To be clear,” de la Torre said, “Cerberus was the majority owner at the time of this dividend.” + +![Dr. Ralph de la Torre's yacht, Amaral, was docked at the Seahaven Marina in Dania Beach, Fla., on Aug. 29, 2024.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/2bdc9cdab87230f91ea966075f7111c2/f19bc/QV7JOC3MX52EGHGLLZG4ZVSIVU.jpg) + +Dr. Ralph de la Torre's yacht, Amaral, was docked at the Seahaven Marina in Dania Beach, Fla., on Aug. 29, 2024. (Mike Stocker For The Boston Globe) + +The deal marked a “key turning point” for the company, said one Steward HR executive. De la Torre and his inner circle were suddenly flush with cash. The HR executive was gobsmacked when he found a $1 million check left on a copy machine near the corporate suite. It was made out to a Steward executive vice president. “They had all gotten so filthy rich from that deal,” said the former executive. “The money changed everything.” + +Together, MPT and Steward looked to expand the system, from the Rust Belt to the Deep South to the Rockies, and then overseas. + +“The ink was hardly dry on Medical Properties Trust’s first sale/leaseback transaction with Steward Health Care … when a second Steward deal began moving through MPT’s pipeline,” MPT announced in an annual report, referencing the purchase of eight hospitals from Community Health Systems in Ohio, Florida, and Pennsylvania. + +Several of the facilities were dilapidated. But that wasn’t the point. Growth was the point. + +“We are excited to add these properties to our Steward portfolio!” an MPT executive said in an email to de la Torre and his team, which was reviewed by the Globe. + +Mark Rich, then Steward’s chief financial officer, responded sarcastically: “Really? Have you seen some of these buildings? Kidding — thanks.” + +![An ambulance idled in the bay at Glenwood Regional Medical Center in West Monroe, La., on Aug. 28, 2024.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/b64c7276ba3fc737a431fc736c962d52/8f95c/2KBUTFTVXJUXRF2CAMG3Q5NZTA.jpg) + +An ambulance idled in the bay at Glenwood Regional Medical Center in West Monroe, La., on Aug. 28, 2024. (Craig F. Walker/Globe Staff) + +In September 2017, Steward added facilities in Utah, Arizona, Colorado, Texas, Arkansas, and Louisiana, making the system the largest private for-profit hospital chain in the country. + +A hospital deal with the island nation of Malta was the first stop in Steward’s whirlwind international campaign that included plans to partner with Turkey’s strongman president, Recep Tayyip Erdogan. + +Just before Christmas in 2017, de la Torre and his second-in-command, Michael Callum, jetted to Rome and enjoyed a tour of the Vatican with two junior employees. The company did not have business at the Vatican, an insider said, though the cost of the trip was billed to Steward. + +De la Torre’s spokesman said the Steward executives were in Malta on business, and then stopped in Rome for two days for business meetings. + +Upon their arrival at the Vatican, Boston’s own Cardinal Sean O’Malley greeted the group and gave them a tour of St. Peter’s Basilica — along with an endorsement of their work in health care. + +“Many people have the misperception that the Catholic hospitals have disappeared from the Archdiocese of Boston,” wrote O’Malley in [a blog post](https://cardinalseansblog.org/2017/12/15/rome-in-advent/) that included a photo of the priest with the Steward entourage. “They have simply moved under the ownership of Steward Health … but they continue to fulfill the mission of serving the poor.” + +![Then-Boston Archbishop Sean Patrick O'Malley was welcomed in July 2003 to St. Elizabeth Medical Center in Brighton by Sister Joanna Fernandes, then chair of the board of trustees at Saint Anne's Hospital.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/7ec5a3f068528872603c86bd26bc90c7/b7269/IOOBWEP3TVAINDT6M3EPIL5QSQ.jpg) + +Then-Boston Archbishop Sean Patrick O'Malley was welcomed in July 2003 to St. Elizabeth Medical Center in Brighton by Sister Joanna Fernandes, then chair of the board of trustees at Saint Anne's Hospital. (Dominic Chavez/Globe Staff) + +Through 2018, Steward’s stated mission, outlined in annual filings with the Massachusetts secretary of state, seemed aligned with O’Malley’s words. The company existed to “establish and maintain hospitals,” to “carry on scientific research related to the care of the sick and injured” and “promote the general health of the community.” + +But the next year marked an official change of heart. All previous mission language was absent, replaced with a simple, declarative sentence: “The company is organized for the purpose of engaging in investment, trading or financing activities of all kinds.” + +By their own words, Steward’s leaders were no longer running a health care company, but a financial one. + +That self-admitted change in philosophy — with patients no longer at the center of Steward’s universe — was perhaps best encapsulated by the trip company brass took to Vienna in February 2020, ostensibly for a board meeting. + +De la Torre took the company’s jet directly from Dallas, where he was met by other top executives. They stayed at the Hotel Sacher Wien, an imperial five-star ode to opulence. + +There was little business on their itinerary. The group took a VIP tour of a Gustav Klimt exhibition, and enjoyed a visit to the National Library and a private performance at the Spanish Riding School. The marquee event of the weekend was the Vienna Opera Ball, an annual gala where attendees sip champagne and gaze at young debutantes who waltz about the ballroom. + +![The Opera Ball at the Vienna State Opera in Vienna, Austria, photographed on Feb. 20, 2020.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/2db57c8ec2e948b49c2ebf0d64cc1ef2/1dfd0/7FOUWAP4ZMZX6ZMVUSGKBCMYEE.jpg) + +The Opera Ball at the Vienna State Opera in Vienna, Austria, photographed on Feb. 20, 2020. (Chris Hofer/Getty Images) + +In just three days, the Steward executives racked up a bill of roughly $200,000. Every penny of it was billed to Steward Health Care, according to emails and internal expense logs obtained by the Organized Crime and Corruption Reporting Project and shared with the Globe. + +De la Torre, in a statement, didn’t offer specifics, but said the trip was “for business purposes related to the work of Steward Health Care International.” + +Shortly after the executives got back from Vienna, Steward purchased an even fancier corporate jet, with tiger-striped wood finishes and satin gold plating. The cost: $26.5 million. + +The company was spending beyond its means. At headquarters, bills for hospital services were stacking up. Vendors were starting to squawk, occasionally staking out the Steward parking lot to demand payment from hospital leaders. And then in March 2020, the pandemic hit. + +Already facing massive debt, Steward was pushed to the limit when elective surgeries — the cash cows of health care — were canceled indefinitely. Looking to offload one of its most unprofitable hospitals, Steward gave the Commonwealth of Pennsylvania an unappetizing offer: Give us $40 million within three days or we’ll close our hospital in Easton, a small city in the Lehigh River valley, eliminating 700 jobs and a key health care facility. + +This was what it meant to be a financial firm organized for investment and trading. Steward viewed Easton Hospital as a cash sieve. Steward had been in talks since late 2019 to sell it to St. Luke’s University Health Network, based in Bethlehem, Pa., a nonprofit. Steward has said it told the Pennsylvania Department of Health in January 2020 that the hospital would close by late April if it was not sold by then. + +But with the onset of COVID, St. Luke’s tapped the brakes. + +Nobody in Easton knew life without the hospital. It had been established in 1890, financed by a public charity drive. Many native Eastonians took their first breath there. Community Health Systems bought Easton in 2001, and then flipped it in 2017 to Steward. + +Steward’s bailout request to Governor Tom Wolf, dated March 22, 2020, came 16 days after Wolf declared a state of emergency over COVID. When Pennsylvania officials offered $8 million with stiff conditions, Steward tightened the screws, writing on March 27 that Steward was ready to surrender the operation of Easton to the state that very night: “If the Commonwealth has no interest in assuming all operating expenses and liabilities for Easton Hospital, Steward Health Care will proceed immediately on planning to close the facility.” + +Some inside Steward were queasy about the hard-nosed strategy. One insider likened the move to an armed stickup of state officials. “It went beyond callousness,” the former executive said, “it was contempt for the state and the need to step up in a global pandemic.” + +Even as the virus ravaged his hospitals across the country, de la Torre found himself with a reason to celebrate in May of 2020. + +A $95 bottle of Laurent-Perrier Cuvée Rosé was opened in triumph. And not just opened, but sabered. That is, the top of the bottle, cork and all, had been cleaved off with the stroke of a knife, unleashing a foaming geyser, as Napoleon’s soldiers were known to do. + +A photo from the moment, which de la Torre shared by email with another Steward executive, shows two champagne flutes, the decapitated bottle, and a gleaming silver saber. The caption: “Ding dong the witch is dead.” + +De la Torre’s day had come. Steward, MPT, and Cerberus had confected a complex deal that was aimed at getting the private equity company out. It allowed de la Torre and his team to acquire Cerberus’s shares in Steward for a $350 million loan. + +But de la Torre wasn’t quite free of Cerberus’s restrictions. Until the note was paid, Steward was forbidden from distributing money to its shareholders, the most significant one being de la Torre himself. + +![In this photo illustration, the logo of Medical Properties Trust, a real estate investment trust that invests in health care facilities, was displayed on a smartphone with an economic stock exchange index graph in the background.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/4e48855dccf7bc51044ec3dd3b5f37c0/94182/5J6RDC7WWEUQIWQ57WKUKIX6VE.jpg) + +In this photo illustration, the logo of Medical Properties Trust, a real estate investment trust that invests in health care facilities, was displayed on a smartphone with an economic stock exchange index graph in the background. (SOPA Images) + +He wanted a payday. MPT jumped in to help. + +“We think we have a plan,” MPT’s chief financial officer R. Steven Hamner, wrote to de la Torre in an email obtained by the Globe, “and then you are free at last and can take a well-deserved distribution.” + +In January 2021, MPT loaned $335 million to Steward executives to help them buy out Cerberus, at a discount. The private equity firm exited Steward with about $800 million in profit, an annual return averaging about 14 percent over 11 years, a healthy but not exceptional amount by private equity standards. + +Steward then paid a $111 million cash distribution to its owners. The payment was “advisable and in the best interests of the Company,” according to the confidential Steward document authorizing the distribution. It was signed by de la Torre, the majority owner and the prime beneficiary. + +De la Torre received about three-quarters of the payment. MPT, which owned about 10 percent of Steward, got $11 million. + +De la Torre’s portion of the distribution was intended to “partially offset Dr. de la Torre’s guarantee” of a $200 million loan from MPT that aimed to recapitalize Steward, which he backed with his stake in the company, he has said through a spokesman. + +Amid de la Torre’s new wealth, hospitals in the Steward network struggled. At St. Elizabeth’s Medical Center in Brighton, the elevators, particularly in the labor and delivery unit, rarely worked for much of 2023. + +Nurses wheeled critically ill newborns to lifts farther away, manually hand-pumping oxygen into their lungs with each step. A ceiling tile once fell and narrowly missed a baby in a bassinet. Crumbling concrete in the parking garages tripped up nurses. One broke her ankle, another fell and hit her face. It was here, at St. Elizabeth’s, that the staff ran out of bereavement boxes for stillborn infants. + +![Nabil Haque lost his wife, Sungida Rashid, in October 2023, shortly after she gave birth to their daughter Otindria, shown here at the age of 2 and a half months. Rashid died after suffering postpartum bleeding at St. Elizabeth's Medical Center. Her condition was treatable, but Steward lacked the necessary equipment because it had failed to pay the vendor that supplied it.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/f059f9f349576a56ec961e70ee30a5c1/833a6/MVSIB6YJG53B5AVWCBBOFKP54A.jpg) + +Nabil Haque lost his wife, Sungida Rashid, in October 2023, shortly after she gave birth to their daughter Otindria, shown here at the age of 2 and a half months. Rashid died after suffering postpartum bleeding at St. Elizabeth's Medical Center. Her condition was treatable, but Steward lacked the necessary equipment because it had failed to pay the vendor that supplied it. (Suzanne Kreiter/Globe Staff) + +Five Irish women founded St. Elizabeth’s in 1869 in a four-story brownstone tucked into a cramped row of Boston’s South End. The fledgling hospital catered to immigrant women who had lived hard, taxing lives of service for others. The 30 beds were always full. + +It was clear a bigger space was needed, something “capable of sheltering whatever poor soul, requiring its aid, may knock on its doors — a blessing to the community and an honor to the city,” wrote Horatio R. Storer in a 19th-century book entitled “Nurses and Nursing.” + +A century later, the hospital moved to a 12-building complex in Brighton that saw St. Elizabeth’s become an early pioneer in gynecology. But by 2022, the Brighton property was dangerous and derelict due to deferred upgrades and maintenance. + +The grim conditions were the norm for a Steward hospital by 2023. Bats took up residence in the attic of Rockledge Regional Medical Center in Florida. Air conditioning units died during a heat wave in Arizona, sending temperatures in the emergency department into the 90s. Broken radiology equipment, scarce blood banks, and shortage of needles drove one Louisiana doctor to liken conditions to “third world medicine” in a federal inspection report. + +![Ellen MacInnis, a nurse at St. Elizabeth’s Medical Center, wiped away tears as Senator Ed Markey spoke about patients that died at Steward-owned hospitals, during a hearing of the US Senate Committee on Health, Education, Labor, & Pensions on Sept. 12, 2024.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/40bd8daa87252c930b0a753538fa4b33/f19bc/MTXDDQCFXAPBVJD6AL4T4UQHTE.jpg) + +Ellen MacInnis, a nurse at St. Elizabeth’s Medical Center, wiped away tears as Senator Ed Markey spoke about patients that died at Steward-owned hospitals, during a hearing of the US Senate Committee on Health, Education, Labor, & Pensions on Sept. 12, 2024. (Kayla Bartkowski for The Boston Globe) + +By May of 2024, Steward owed nearly $1 billion in unpaid bills, $1.2 billion in loans, $290 million in unpaid employee wages and benefits, and $6.6 billion in long-term rent obligations to MPT. + +By then, Steward officials had quietly been meeting for months with top Massachusetts health officials to demand help in staving off the seemingly inevitable collapse of the chain. Bankruptcy seemed inevitable. The hospitals would need to be sold or closed. + +The executives, who took home hundreds of thousands in bonuses in 2023, came to a humbling realization, as outlined in internal presentations obtained by the Globe. + +*Perhaps hospitals such as St. Elizabeth’s and Holy Family would be better off under the control of a nonprofit hospital operator*? + +Steward Health Care officially filed for [bankruptcy](https://www.bostonglobe.com/2024/05/06/business/steward-bankruptcy/) in May, 14 years after Cerberus made its initial investment. The fallout of Steward’s collapse will be felt for decades to come. + +What’s clear today is that de la Torre and his associates ran the system into the rocks and got rich doing it. The ultimate risk of their actions fell on the general public, the health care workers who served in their hospitals, and the patients who sought care in their most vulnerable moments. + +Earlier this month, the state of Pennsylvania was faced with yet another Steward ultimatum. Steward demanded the state cough up millions to keep a rural 163-bed hospital afloat. The state declined. The hospital is set to close next week. + +Meanwhile, more than 500 outstanding malpractice claims [remain](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/steward-traco/) unpaid or unsettled after Steward raided the coffers of its in-house insurer. Grievously injured patients await restitution, while doctors foot their own legal bills. + +De la Torre, who left Steward in September, has been [held in contempt by Congress](https://www.bostonglobe.com/2024/09/25/business/ralph-de-la-torre-contempt-charge-senate-justice-department/) after not showing up for a September committee hearing on Steward’s demise. But his public shaming seems divorced from the forces that underpinned his rise — a considerable shift in US health care from patients-first to profit-first. + +![An empty chair reflected the absence of Steward Health Care System CEO Ralph de la Torre at a hearing of the US Senate Committee on Health, Education, Labor, & Pensions on Sept. 12, 2024. De la Torre was ordered to attend but declined to do so.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/54d5520ad14dcb88cf29a56e2e070274/f19bc/RWAELUX6BNGY3JNTD655HJSV6Y.jpg) + +An empty chair reflected the absence of Steward Health Care System CEO Ralph de la Torre at a hearing of the US Senate Committee on Health, Education, Labor, & Pensions on Sept. 12, 2024. De la Torre was ordered to attend but declined to do so. (Kayla Bartkowski For The Boston Globe) + +“I wish this were not true, but there are hundreds of Ralph de la Torres who are making a disgusting fortune off of withholding health care from people in need,” said Senator Chris Murphy, a Connecticut Democrat, speaking at a hearing in Washington on the Steward fiasco. + +In his own state, Murphy said, a scandal involving Prospect Medical Holdings — another private equity-backed hospital company that also did a huge sale-leaseback deal with MPT — was a near carbon copy of the Steward scandal. + +“This is just a choice to decide to commoditize our health care system,” said Murphy. “How have we let American capitalism get so off the rails, so unmoored from the common good?” + +It was a rhetorical question. + +Steward spent much of this year taking itself apart. + +Holy Family, with a campus in Haverhill in addition to the original Methuen location, was bought by Lawrence General Hospital, aided by $165 million in state money. + +Sister Glynn, who still has great affection for the hospital, recalled being “very, very sad” when it was sold to Cerberus, because she anticipated hard times under for-profit ownership. “The mission is different than not-for-profit hospitals,” she said. She was pleased to see the hospital emerge from Steward under the control of a nonprofit. “I think it’s the best solution for the provision of health care,” she said recently. + +A short drive south, in Dorchester, Steward’s Carney Hospital was deemed unsalvageable. The 161-year-old hospital, established in 1863 with a charitable gift from Irish immigrant Andrew Carney, expired on the morning of Aug. 31. + +Anger, sadness, and a deep sense of betrayal swept over the remaining staff that day. Some employees ripped crucifixes from the hospital walls. Others took turns punching and kicking a mannequin in the lobby depicting de la Torre in prison garb. + +![Lead department secretary Maryanne Murphy (right) hugged a friend on Aug. 31, 2024, the day the emergency department at Carney Hospital in Dorchester closed.](https://apps.bostonglobe.com/metro/investigations/spotlight/2024/09/steward-hospitals/static/a47a01b8af8b719a1ec9879241cfc2fc/f19bc/FHLMKMHE2L6BARXYJJ5OOALFBU.jpg) + +Lead department secretary Maryanne Murphy (right) hugged a friend on Aug. 31, 2024, the day the emergency department at Carney Hospital in Dorchester closed. (Kayla Bartkowski For The Boston Globe) + +By dawn, a group of nurses danced to Sister Sledge’s “We Are Family,” blaring from a car stereo outside the ambulance bay on Dorchester Avenue. + +Promptly at 7 a.m., closing time, security officer Bob Huxley emerged from behind the automatic doors of the emergency department and yelled, “Last call!” to a crowd of onlookers. He locked the doors and urged anyone who needed emergency medical care to call 911. “To have this happen is an atrocity,” said Huxley, his eyes flooding with tears. “Where are the politicians? Where are people going to go?” + +By 8 a.m., the crowd had dispersed. Left in its wake: A handwritten sign that read: “You’ll regret this!” + +*Mark Arsenault can be reached at* [*\[email protected\]*](https://apps.bostonglobe.com/cdn-cgi/l/email-protection#c4a9a5b6afeaa5b6b7a1aaa5b1a8b084a3a8aba6a1eaa7aba9)*. Hanna Krueger can be reached at* [*\[email protected\]*](https://apps.bostonglobe.com/cdn-cgi/l/email-protection#89e1e8e7e7e8a7e2fbfceceeecfbc9eee5e6ebeca7eae6e4) + +*Chris Serres, Rebecca Ostriker, Elizabeth Koh, Jessica Bartlett, and Liz Kowalczyk of the Globe staff contributed to this report. Khadija Sharife of the Organized Crime and Corruption Reporting Project also contributed.* + +###### Credits + +- Reporters: Mark Arsenault and Hanna Krueger +- Contributors: Chris Serres, Rebecca Ostriker, Elizabeth Koh, Jessica Bartlett, and Liz Kowalczyk of the Globe staff. Khadija Sharife of the Organized Crime and Corruption Reporting Project. +- Editors: Brendan McCarthy, Gordon Russell, Nancy Barnes, and Mark Morrow +- Visual editor: Tim Rasmussen +- Photos: Wendy Maeda, Jessica Rinaldi, John Tlumacki, Craig F. Walker, Mike Stocker, Dominic Chavez, Kayla Bartkowski, Globe wire services +- Director of photography: Bill Greene +- Photo editor: Leanne Burden Seidel and Kevin Martin +- Design: Ashley Borg and John Hancock +- Development: John Hancock +- Digital editor: Christina Prignano +- Copy editor: Mary Creane +- Audience: Cecilia Mazanec +- Audience editor: Heather Ciras + +© 2024 Boston Globe Media Partners, LLC + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/Sunset Boulevard in ruins Palisades fire’s massive scale comes into focus - Los Angeles Times.md b/00.03 News/Sunset Boulevard in ruins Palisades fire’s massive scale comes into focus - Los Angeles Times.md new file mode 100644 index 00000000..d1af9d10 --- /dev/null +++ b/00.03 News/Sunset Boulevard in ruins Palisades fire’s massive scale comes into focus - Los Angeles Times.md @@ -0,0 +1,129 @@ +--- + +Tag: ["🏕️", "🇺🇸", "🔥"] +Date: 2025-01-14 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2025-01-14 +Link: https://www.latimes.com/california/story/2025-01-08/palisades-fire-devastation-scope +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-SunsetBoulevardinruinsNSave + +  + +# Sunset Boulevard in ruins: Palisades fire’s massive scale comes into focus - Los Angeles Times + +By Wednesday morning, it looked as if a bomb had detonated on Sunset Boulevard. + +As the catastrophic Palisades fire receded from one of the city’s iconic thoroughfares, smoke and ash rendered the once-picturesque landscape into something oddly lunar. + +There were charred buildings, some slightly damaged, others fully destroyed. A burned-out Shell station, the pumps intact but the convenience store gone; a Bank of America in a historic building hollowed out by fire, the metal skeletons of the ATMs out front left twisted by the intense heat. + +At a police blockade, residents of the Palisades begged LAPD officers to let them through to check on their homes and pick up essential medications. + + ![Two people in charred surroundings](https://ca-times.brightspotcdn.com/dims4/default/a9f351c/2147483647/strip/true/crop/6720x4480+0+0/resize/1200x800!/quality/75/?url=https%3A%2F%2Fcalifornia-times-brightspot.s3.amazonaws.com%2F08%2F58%2F635e989248f5b2b6b551d04ebd09%2F1489879-me-0108-palisades-fire-gem-004.jpg) + +Glenn Watson, left, and his brother Wes return to their Pacific Palisades neighborhood to view fire damage on Wednesday. + +(Genaro Molina / Los Angeles Times) + +The Palisades inferno broke out Tuesday morning [near Piedra Morada Drive](https://www.latimes.com/wildfires-map/) and was brutally whipped by gusting winds. It burned through more than 11,802 acres by Wednesday afternoon, snaking west into Malibu and east toward Brentwood and leaving widespread devastation in its wake. + +Tens of thousands of residents have been forced from their homes. Authorities reported an unspecified number of “significant” injuries as concurrent catastrophic fires raged in other parts of the city. The L.A. County Sheriff’s Department counted two arrests for looting as thieves tried to plunder wealthy neighborhoods that had been evacuated. + +“Despite the exceptional nature of what’s transpired and is transpiring, I fear we are getting a look at a new, terrible and tragic normal,” said William Deverell, a historian and director of the Huntington-USC Institute on California and the West. + +Much of Pacific Coast Highway and its homes and landmarks between Will Rogers State Beach just north of Santa Monica and Carbon Beach in eastern Malibu lay in ruins Wednesday. Large swaths of coastal homes perched along the highway were reduced to smoldering rubble, crumbling onto the beach and into the sea. + +Cozy homes and multimillion-dollar beach palaces that once hugged the coastline — all gone. Beloved longtime businesses and emblems of the local canon — also wiped out. + +In Santa Monica, doctors at the emergency department at Providence Saint John’s Health Center treated patients suffering from smoke inhalation, eye irritation and minor burns. + +Dr. Ali Jamehdor urged people with cardiac or respiratory issues to stay inside and for everyone to be cautious amid battering winds that sent debris flying into the air. Surgeries at the Santa Monica hospital had been postponed Tuesday night and were expected to resume Thursday. + + ![A woman runs down Sunset Boulevard as the Palisades fire burns](https://ca-times.brightspotcdn.com/dims4/default/6c02081/2147483647/strip/true/crop/5694x3722+0+0/resize/1200x784!/quality/75/?url=https%3A%2F%2Fcalifornia-times-brightspot.s3.amazonaws.com%2F60%2F61%2Fc1fd98f84ca096977b1dfefeaa34%2F1489711-me-0107-palisades-fire-gem-018.jpg) + +A woman runs down Sunset Boulevard as the Palisades fire burns on Tuesday. + +(Genaro Molina / Los Angeles Times) + +Much of what remained Wednesday of the “Alphabet Streets” neighborhood of the Palisades, a mostly flat residential grid in a U-shaped pocket just north of Sunset Boulevard, was blackened rubble and dust. + +Although much of the Palisades was cordoned off, James Fynes, 40, found a back staircase into the area. He’d come to check on the home of his friend’s parents, who had moved in last year after three years of construction. + +“This is insane,” he repeated as he walked through street after street of charred cars and homes reduced to nothing. “I can’t believe there’s no water.” + +Through every incinerated block, reminders of the property owners’ affluence lingered: a home gym burned nearly beyond recognition, then a blackened hot tub, next the husks of multiple cars parked in a garage. + +On most blocks, the only things left standing were fireplaces. Power lines sagged down onto ruined streets. Some homes were still on fire. + +For John Lightfoot, 56, each business that burned down had memories attached: the bank he used for decades, the little cafe he frequented, both gone. + +A few blocks away, Michael Payton, store director of the nearby Erewhon, came to survey the damage. The business had survived, but so much else was gone. + +“The whole Palisades is done. The whole town is done,” he said. “This is complete devastation.” + +Fear blanketed Los Angeles as the Palisades and other fires raged and winds screamed, with seemingly no corner of the city entirely out of danger. + +Some residents reported evacuating more than once, as fire followed them toward the homes of friends or family in “safe” zones. Others learned their homes had burned from afar, through fire or security alarms that alerted their phones. + +“Historically, from my experience, when we talk about disasters in Southern California, in L.A. County, and specifically when we talk about fire disasters, there seems to be a disconnect between those of us who live in the flats, far from the foothill areas,” said historian D.J. Waldie. + + ![A home is fully engulfed in flames](https://ca-times.brightspotcdn.com/dims4/default/3adb11b/2147483647/strip/true/crop/6720x4480+0+0/resize/1200x800!/quality/75/?url=https%3A%2F%2Fcalifornia-times-brightspot.s3.amazonaws.com%2F04%2Fe4%2F56cd26274ff4a9da829c79f2a9c9%2F1489879-me-0108-palisades-fire-gem-012.jpg) + +A home is fully engulfed by fire along Bowdoin Street in Pacific Palisades on Tuesday. + +(Genaro Molina / Los Angeles Times) + +From the flats, the flames at higher elevations can seem far off and like “somebody else’s Los Angeles, where things burn down all the time,” Waldie said. + +But that paradigm was upended Tuesday night, as a wide swatch of lower-elevation Santa Monica was put under an evacuation warning. + +By midday Wednesday, distressed Santa Monica residents gasped in the smoke and strained against 40-mph wind gusts, dragging pets and suitcases to their cars to flee the mandatory evacuation zone north of San Vicente. And yet two blocks away, on Marguerita Avenue near Ocean Avenue, a construction crew calmly worked at an apartment building. + +“We have to survive; that’s why we’re still here,” said Josue Curiel, who lives in Inglewood and is originally from Jalisco, Mexico. Everyone on his crew of about half a dozen was also born south of the border. + +“If you’re a worker, you’re hungry, so that’s what it is.” + +With their ladder lashed to the building to help steady it in the howling wind, they labored to repair a water-damaged balcony — unrelated to the natural disaster raging around them. + +“I was planning to have the day off,” while watching the news last night, Curiel said with a shrug, but he awoke to find the job was still on. “A lot of people are still working.” + +Mike Flannigan, a professor at Thompson Rivers University in Canada’s British Columbia who studies wildfires, said there’s a simple recipe that applies to California blazes: vegetation, ignition and conducive weather, which typically is hot and dry winds. + +“If you got all three, then you got a wildfire,” he said. + +Those elements helped the Palisades fire move swiftly and tear through neighborhoods nestled along canyons and hillsides. + +On east-west corridors through central L.A., the brown fronds of palms — queen, fan and other varieties — were scattered on the streets and sidewalks like carrion. None stood a chance against the fierce winds. + +Heading west from the Miracle Mile area, the eerie drift of smoke under a midmorning sun bathed the landscape in amber and ochre. The plume so intensely darkened the sky that street and residential lights with photocells designed to turn on at dusk were illuminated — human technology tricked by the inferno. + +Former Police Commission President Steve Soboroff, a West L.A. resident, said that each of his five children, all of whom live in the Los Angeles area, had evacuated their homes. + +“This isn’t just a fire,” Soboroff said. “You contain a fire, build a ring around the fire. This is like a thousand fires. It’s just impossible. I think back to the Great Chicago Fire. I don’t know anything here that’s ever been like this, because of the density. It is just a worst-case scenario.” + +### More to Read + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/The After Dark Bandit.md b/00.03 News/The After Dark Bandit.md new file mode 100644 index 00000000..bee6807b --- /dev/null +++ b/00.03 News/The After Dark Bandit.md @@ -0,0 +1,481 @@ +--- + +dg-publish: true +Alias: [""] +Tag: ["🚔", "🇦🇺", "🔫", "🏦"] +Date: 2025-01-06 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2025-01-06 +Link: https://magazine.atavist.com/the-after-dark-bandit-australia-bushranger-robbery-morgan-doug-peter/ +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-TheAfterDarkBanditNSave + +  + +# The After Dark Bandit + +![](https://magazine.atavist.com/wp-content/uploads/2024/12/Dubbins_1-scaled.jpg) + +**The +After Dark +Bandit** + +## **The police couldn’t figure out how the perpetrator ripped off two banks at the same time. Until they discovered there wasn’t just one robber but a pair of them: identical twin brothers.** + +###### The *Atavist* Magazine, No. 158 + +--- + +**The Manhunt** + +The light was giving way to darkness as detective Patrick Brear arrived at the CBC Bank in Heathcote, an old gold-mining town in southern Australia nestled between mountains and surrounded by dense forest. The quaint two-story redbrick building had been the scene of a crime. Earlier that afternoon, on April 27, 1979, a bank robber shot Ray Koch, a beloved veteran of the local police force. Two bullets ripped holes in Koch’s stomach and intestines, forcing surgeons to remove his spleen. He lost a dangerous amount of blood, and nobody was sure if “Kochy,” as he was affectionately known, would make it. + +Brear, who worked for the state of Victoria’s Armed Robbery Squad, passed through the swarm of blue-uniformed police officers collecting evidence, then had a look at the bank’s CCTV footage.  It showed the thief running into the bank carrying a Browning pistol and wearing a black leather jacket, black gloves, and a mask bearing the face of an old man. Brear thought he knew who the perpetrator was: the After Dark Bandit. + +The bandit was the state’s most wanted man, suspected in two dozen armed robberies. Brear and his partner, detective John Beever, had been hunting him for over a year. They knew his MO well. He liked to hit rural targets just before they closed for the day, then escape into the bush under cover of darkness. The timing of many of his crimes was the inspiration for his nickname. + +Though it pained Beever and Brear to admit it, there was something different about this criminal, almost superhuman. He was known to pull off two robberies within a half-hour of each other, in towns that were more than a dozen miles apart. Newspaper reporters theorized that he must be driving a very fast car. Brear and Beever had attempted to reenact one of the back-to-back jobs, but they couldn’t make it from one location to the other in time. + +Just as unusual were the bandit’s mood swings. According to witnesses, he could be cheeky and chatty on one job, menacing and severe on the next. Early in his career, the After Dark Bandit had been cautious and deliberate, taking small sums from off-track betting storefronts, known as TAB agencies. But in recent months he’d grown bolder, emptying banks, sometimes in broad daylight. So audacious was the bandit that he’d robbed the CBC branch in Heathcote twice in the previous nine months. As he entered the bank on the third occasion, on April 27, the ledger keeper recognized him; she could be seen in security footage standing arms akimbo like a peeved schoolmarm. The bandit had stolen her orange Datsun to use as his getaway vehicle the last time he was there. He took it again this time, after shooting Koch and packing up the money he’d come for. + +The bandit ditched the Datsun at the edge of town and was then seen speeding on a motorcycle into a forested area outside Heathcote. Law enforcement descended on the spot from far and wide; they came from various branches of the state’s police force, including an elite SWAT team and a dog squad. A police helicopter and two fixed-wing aircraft led an aerial search. Police on motorbikes were tasked with covering the dense, rugged terrain of the forest, where thickets of eucalyptus and pine covered abandoned goldfields. “We are very hopeful that he is in the area and we will get him,” a detective told journalists. “He has used a firearm, and we must treat him as very dangerous.” + +The following morning, senior constable Rick Hasty was cruising in his police van through the city of Bendigo, 40 minutes northwest of Heathcote. Hasty was a friend of Koch’s and had just visited the wounded cop’s wife. He would have preferred to be helping with the manhunt, but was ordered to remain on duty in Bendigo, part of a skeleton crew of officers keeping an eye on the place. Nobody expected the robber to turn up there, since doing so would require snaking his way through the nearly 200 officers searching for him, a maneuver considered too bold even for the After Dark Bandit. + +While sitting in traffic, Hasty spotted a man walking with a blue suitcase and sporting a red Zapata mustache. Hasty didn’t have any particular reason to suspect that this was the man his colleagues were looking for, but he had a feeling. “I just knew it was him,” Hasty told me. He watched the man cross the road and enter a dead-end alley. He parked his van and got out. As he walked into the alley, the man came toward him. + +“What’s your name?” Hasty asked. + +“Peter Morgan,” the man replied. “Why?” + +“Because I run this fucking town and I want to know who’s in it.” + +Hasty wasn’t carrying a gun, nor did he see any lumps in Morgan’s pockets suggesting a weapon. He felt confident that he could take the man if needed. Tough and fit, Hasty competed as a professional cyclist and had been a farmer before a drought pushed him onto the police force to make ends meet. + +“Where you going?” Hasty asked. + +“Going to Melbourne to watch footy.” + +“What’s in the case?” + +“Oh, it’s only knickknacks.” + +“Can I have a look?” + +“Sure.” + +Hasty knelt down, opened the suitcase, and rifled through it. There was a can of Coca-Cola, a newspaper, and—inside a drawstring sack—a sawed-off shotgun, stacks of money, and a mask that looked like an old man’s face. Hasty turned to Morgan, who now had a Browning pistol aimed at him. + +It’s a toy, Hasty thought. Then: No, it’s death. + +Morgan shoved his pistol into Hasty’s stomach, and the two men wrestled in silence. Morgan pulled the trigger twice, but there wasn’t a bullet in the chamber. Hasty forced his adversary’s gun hand upward and the pistol fell. (Later he would claim that he pried the gun away, and Morgan that he dropped it in surrender.) Hasty then pushed Morgan up against the wall and grabbed him by the throat. + +“You’ve got me,” Morgan said. “I just made you a hero.” + +“If you fucking move,” Hasty replied, “I’ll kill you as you stand there.” + +Later that day, police detectives arrived at Peter Morgan’s farm in Nyora, a small railroad town in the rolling hills of southern Victoria, about 140 miles from Heathcote. While searching the property where Morgan lived with his wife and son, law enforcement found two Valiant automobiles, a motorbike, cans of black spray paint, a flashlight, a compass, a sleeping bag, and a variety of guns. They also found a beanie and a striped brown jumper—articles the After Dark Bandit was known to have worn during robberies. + +According to Brear, the most shocking piece of evidence was a black-and-white photograph. It showed Morgan in a posh restaurant, smiling while seated beside another man. The two had matching shirts, matching mustaches, matching sideburns, and matching faces. + +Finally, it was clear to police how the bandit had managed to be in two places at once: Peter had an identical twin brother.   + +Detective Brear called his partner, Beever, and told him that the robber they’d been chasing wasn’t one man but two. “Bullshit,” Beever answered. But it was true. And it meant that the After Dark Bandit—or the other half of him—was still at large. + +![](https://magazine.atavist.com/wp-content/uploads/2024/12/Dubbins_3.jpg) + +**The Inheritance** + +Understanding the Morgan twins’ crime spree requires understanding their father. On December 15, 1949, a 19-year-old Kay Morgan carried a briefcase into the Commercial Bank in Eltham, a suburb of Melbourne known for its natural surroundings. Wearing a dark blue suit, gray felt hat, and sunglasses, the nervous teenager presented himself as a customer looking to open a new account, then drew a Browning pistol, according to newspaper reports. “The game is on!” he shouted. “I’ll take the lot!” + +The teller opened the money drawer. “Here it is,” he said, tauntingly. “Come and get it.” Then the teller and the bank manager pulled pistols of their own from their pockets. + +Kay fired a shot that went straight through the counter and between the teller’s legs, then another into the ceiling as he hurried from the bank. He ran to his getaway vehicle, a stolen gray Singer sports car parked across the street. The teller and the bank manager chased after him, firing 15 shots at the fleeing car and hitting it numerous times. Speeding out of Eltham, Kay crashed into an embankment a half-mile down the road, then escaped on foot into the bush. + +Following a large manhunt, police captured Kay, acting on a tip from one of his friends. “I am pleased you have caught me,” Kay told them, according to a newspaper report. “I will tell you everything.” He confessed to the failed robbery, admitting that he had attempted it to repay a loan to his father, a prominent real estate developer. (His father refused to pay Kay’s bail.) + +Kay served nearly three years behind bars, then moved to the countryside and married a childhood friend named Beryl. On October 30, 1953, they had identical twins, Peter and Doug. The family relocated to Melbourne, where Kay thrived as a property developer, until a credit squeeze in the 1960s bankrupted him. To stay afloat, Kay may have resorted to shady business dealings that threatened to catch up with him, prompting an abrupt move to New Zealand when the twins were barely in their teens. + +Kay found work as a carpenter outside Wellington, the small, windy capital city at the mouth of the Cook Strait. But after offering to import a Holden sedan for his boss, then blowing the money at the racetrack, Kay returned to crime. He’d break into a post office at night, put the facility’s safe on a trolley, wheel it out to his car, and speed off into the night. Kay rented a house where he’d use a cold chisel to open the safes, often while the twins were playing in the other room. In addition to money, they usually contained stamps, which Kay liked to sell back to the post office he’d robbed. He told the boys that whatever they needed to do to get ahead in life was OK, so long as no one got hurt. + +To disguise himself during his crimes, Kay wore fake glasses and used Brylcreem to darken and slick back his hair. Sometimes he asked the boys if they wanted to come along to “give him a hand.” Doug always volunteered. The twins provided excellent cover—the police were less likely to pull over a vehicle with an adorable boy or two in the back—and doubled as lookouts. + +One night, when Doug was 12, Kay parked near a supermarket and told his son to keep an eye out. Doug watched his dad run toward the store, a silhouette in the moonlight. Kay robbed the market so often he’d left a piece of roofing loose for easy access. Doug had just wiggled into the driver’s seat—he thought it would feel cool to sit behind the wheel—when the market’s alarm started blaring. He waited for what felt like an eternity. Then the driver’s-side door suddenly flung open and his dad appeared out of the dark. “Move over,” Kay said as he slid into the car. Father and son peeled away from the scene. + +Kay’s criminal career meant that the family was constantly on the run. Over the course of their childhood, Peter and Doug lived in some 40 houses and attended five schools, where they were often enrolled under false names. In photos from back then, it’s impossible to tell them apart. As early as infancy, their mom liked to dress her sons the same. They wore matching shoes and jumpers and had matching hairstyles. The twins were often each other’s only playmate. Indeed, the family’s status as fugitives made them a tight unit; Doug considered them “a gang of four.” + +But then Beryl became suspicious that Kay—charismatic and handsome, a “cross between Steve McQueen and Paul Newman,” in Peter’s words—was seeing other women. One evening, during an especially heated argument, Beryl refused to let Kay take the car to rob a post office. Instead, he pushed a wheelbarrow to his target, planning to haul away the safe. The police showed up before he could clear out, and Kay was arrested—but not before the former boxer bashed one of them in the head with a crowbar. + +With Kay in custody, his 13-year-old twins were left to dispose of the evidence of his crimes. According to Peter, Beryl drove them to Kay’s rental house, where they filled the family car with empty safes. Then she drove them to a nearby bridge where, one by one, in the pitch dark, they were tipped into the river below. (In Doug’s recollection, the brothers did this without their mother’s help.) + +After serving an 18-month prison sentence, Kay was deported back to Australia, and his family followed. Kay vowed to go straight and resume working in construction. The twins worked alongside him; he’d taken them out of school when they were 15 and trained them himself. The teenagers also worked briefly at a bank; Doug, who’d earned high marks in math while still in school, rose to become a teller, while Peter remained a junior employee. + +One Sunday morning in December 1971, 18-year-old Doug and Peter were relaxing at home when they heard a guttural scream from their parents’ bedroom. They ran inside to find 41-year-old Kay lying on the bed with his arms in the air, as if reaching for the ceiling. Doug tried to lower them while Peter watched from the edge of the bed as his father gasped for air. + +Someone called for help, and a nurse hurried over from a church across the street, where she’d been attending service. When Doug checked on his father later that day, he found the nurse straightening Kay’s legs and tightening the sheets around him. + +“He’s OK?” Doug asked. + +“No,” said the nurse. “He’s dead.” + +## **Kay’s sudden death brought the twins closer for a while. “It sort of cemented a bond with my brother \[and me\] against the world,” Doug said.** + +A half-century later, Doug remembers his tumultuous early years fondly. “My childhood was a great adventure,” he told me. “I still look back and I smile. Maybe it was the teamwork, maybe it was being part of something.” At his home in the countryside north of Melbourne, Doug showed me the dusty old train set he and Peter used to play with when Kay was prying open stolen safes, and offered me some of his dad’s favorite cookies. Outside he pushed forward the driver’s seat of his Land Rover. Underneath, wrapped in some of his mother’s curtains, was his father’s ashes. “He goes everywhere with me,” Doug said with a smirk. + +Peter doesn’t find this funny. “If I want to visit my dad,” he told me on the anniversary of Kay’s death, “I’ll have to steal my brother’s car.” + +Peter doesn’t know where Doug lives, and he doesn’t like to talk to him. Doug is fine with that. The roots of the men’s resentment run deep. As kids their personalities clashed—Doug was irreverent, while Peter was serious—and they were hyper-competitive. When Doug found himself in the principal’s office in first grade for kissing a girl behind a shed, he claimed that Peter was the guilty one and had blamed him to avoid getting in trouble. Their relationship could hold an edge of violence: They had water and pillow fights so intense that their mom shut herself up in another room to avoid the chaos. Sometimes one twin would pull his jumper over his head, then hold the other twin’s neck under his arm as if in a vise, making it appear like he was carrying his own severed head. + +Kay’s sudden death brought the twins closer for a while. “It sort of cemented a bond with my brother \[and me\] against the world,” Doug said. It was what happened later, when they followed in their father’s footsteps and became prolific stickup men, that transformed what might have been a bygone rivalry into a bitter, unbridgeable rift. + +As Peter tells it, for decades Doug made himself out to be the good twin and Peter the bad twin. Peter finds this ridiculous. He also insists that Doug is unworthy of any media attention for the robberies that had once captivated the public across Australia. In Peter’s view, there was only one After Dark Bandit. + +**The Late Checks** + +Within six months of Kay’s death, Beryl remarried. Doug considered it the gang of four’s second loss. Around the same time, the twins began working together in construction. They were young, but they’d been trained well by their dad and could pull in more than the average subcontractor—sometimes over $500 Australian a week. (The country stopped using pounds in 1966.) Over time, though, Peter grew to resent being dependent on other people for his livelihood. The twins were 23 and at a construction site when Peter read a newspaper article about the Boiler Suit Gang, a group of bank robbers named after the blue outfits they wore during robberies. “We could do that,” he said to his brother. + +At first Doug brushed him off, but Peter kept bringing it up, and Doug was soon indulging Peter’s fantasies about how they’d pull off a heist. They talked about how most robberies occurred in cities, where a cop might be parked around the corner, leaving the perpetrator little time to escape. But if they went after rural targets, they could ascertain how many cops were in town and suss out where they’d be at a given time. The brothers could strike at dusk, just before closing, and use the falling darkness to conceal themselves as they fled. They could anticipate where police roadblocks would be set up and hike through the bush to avoid them. The idea, Peter told me, “was basically guerrilla warfare: Do the crime, disappear, and then reappear outside the search area.” + +It was all just talk until money got tight. The twins had families to support. Their mother’s second husband had six children, and Peter had developed a romantic relationship with his 16-year-old stepsister, Pamela. Peter married her when he was 19—the same year Doug married another woman named Pamela. Both were shotgun weddings, the twins told me, and Peter and Doug were soon fathers. + +In the lead-up to Easter in 1977, the twins were waiting on payment for a pair of house frames they’d built. The person who owed them said that the checks were in the mail, but they hadn’t arrived. Peter, feeling stuck, decided that a robbery would free him. He was also anxious about his health. He’d suffered rheumatic fever in his teens and then developed chest pains. (These were later diagnosed as symptoms of panic attacks.) He feared an early cardiac event like the one that killed his father, and figured that if he wouldn’t be around long enough to retire, he may as well “go out and get my gold watch now.” + +Doug was open to the idea—he, too, had been raised by a man with a criminal mindset. “My father’s philosophy was that it’s OK to do whatever you want to maintain the lifestyle you want,” he told me. He also realized that, were they ever to be caught, the fact that they were twins might keep them out of jail. Prosecutors would be forced to prove which of them had committed the crime. As long as the brothers stayed silent, reasonable doubt would always cloud the truth. + +The brothers planned to use a stolen car during the crime, but Doug declined to help with that. He also refused to carry out the robbery or use a gun. “I’ll do it all,” Peter said. Doug agreed to serve as an “assistant,” helping Peter get to and from the scene. The twins decided that Peter would get two-thirds of the loot and Doug the remainder. + +On a rainy Holy Thursday, Peter walked into a car dealership in a suburb of Melbourne. He told the salesman that he was interested in the Ford Falcon GT. Capable of going up to 140 miles per hour, and priced at about $6,500 Australian, it was the best car in the yard. The new salesman couldn’t believe his good fortune. “It’s a surprise for my wife,” Peter told him, “so what I’d like to do is take the car to our house and show her what I’m going to buy her.” + +Peter got behind the wheel, the salesman climbed in, and they sped off along a rain-slickened road. Peter drove to a random house nearby. The two got out, and the salesman began walking up the path, eager to meet Peter’s wife, who he presumed was inside. Peter drew an air pistol. + +“This is where we part company,” Peter said. The salesman saw the gun. “What, and the car?” he managed to say. “Yeah,” Peter replied. He climbed back into the driver’s seat and sped away. + +Peter drove to a nearby cemetery where Doug was waiting in a Leyland P76 with a few jerricans of gasoline for the stolen GT, so Peter didn’t have to risk showing his face at a filling station. Rain fell in sheets over the tombstones and pounded the roofs of the cars. Doug poured the gas into the tank, bid his brother goodbye, and drove off. Then Peter waited in the cemetery for darkness to come. + +At dusk, Peter drove to a TAB agency in nearby Mernda and entered holding a Jager .22 semiautomatic assault rifle he’d purchased in Melbourne. The rain had drenched his khaki carpentry overalls. He’d planned to wear a stocking over his head, but the moisture on his face had made it hard to see, so he went unconcealed. + +Peter ordered the manager to empty the cash drawers, then stuffed the bills into a bag and directed him to open the safe. The man refused. Instead he gave Peter a lecture, imploring him not to ruin his life. Looking back, Peter assumed that this was prompted by his appearance—he was a “23-year-old bloke” who looked like “a drowned rat” in his soaked work clothes. Rather than threaten to shoot, Peter backed out the door and leapt into the stolen GT. + +Doug was waiting behind the wheel of the Leyland a few miles outside Mernda. When Peter rolled up in the GT, he threw the bag of money through the driver’s-side window. Doug yanked the steering wheel from its column and shoved the cash into the exposed space. Then the brothers drove off in different directions. + +With his adrenaline pumping, Peter raced along a forestry road in the deluge. Suddenly, the GT slid off the asphalt into a rushing creek. Peter abandoned the vehicle and made his way on foot to the rendezvous point he and Doug had agreed on. Only later would Peter realize the uncanny parallels to his father’s bank robbery in nearby Eltham, the one that landed him in prison for several years: Like Kay, Peter had failed to access the establishment’s safe, and like his dad he’d crashed a stolen sports car. + +The haul from the TAB agency came to $320. “You’re not much of a robber,” Doug said. + +Peter was shaken by the experience. He worried that he’d screwed up his life for a couple hundred bucks.  “The paranoia sets in,” he told me. “What if they know it’s me? What if the car salesman gave a really good description?” + +When the cops failed to come knocking, Peter had an exhilarating realization: He’d gotten away with it. The missing checks from the construction job arrived four days after the robbery. By then it didn’t matter. Peter had tasted crime and wanted more. So did Doug. + +**The Bushrangers** + +In the late 18th century, Great Britain established Australia as a penal colony, primarily to alleviate overcrowding in British prisons. Over time, around 160,000 prisoners were transported to the continent. Those who were uneducated were made to perform backbreaking labor under threat of corporal punishment. Some escaped into the bush seeking freedom and turned to crime to stay alive. + +Known as bushrangers, they adapted to life in the wilderness, forming outlaw bands that robbed travelers and settlers alike, stealing food, weapons, ammunition, bedding, and other supplies. Many bushrangers had short careers that ended in shootouts or capture, and in some cases execution. But a few gained notoriety for their bold escapades and their ability to evade capture for long periods in the wilderness. + +The most infamous bushranger was Ned Kelly, born around 1854 in Victoria. Kelly’s father—just like the Morgan twins’—was a criminal. He’d been brought from Ireland to Australia as a convicted thief. Kelly eventually committed an infamous string of robberies and bush escapes. He was captured, tried, and hanged in 1880. + +Unlike Kelly, who killed three police officers, the brothers agreed to avoid undue violence—they wanted the money, not to harm anyone. They pledged to walk away from a job if things got “too hot.” After the Mernda robbery, Doug decided that he wanted an equal role in the next heist, to prove that he was as tough as his brother. The twins set their sights on another betting agency, this one in the town of Berwick, on the southeastern fringes of Melbourne. It would be the first and only time the brothers pulled a job together. + +Doug still felt squeamish about carrying a gun, so he went to a local army surplus store and paid $59 for an imitation pistol. It didn’t have a bore—the hole through the center of the barrel—so he’d need to avoid pointing it at anyone, or they might realize it was a fake. + +On the evening of May 30, 1977, right before the robbery, Doug strolled past Berwick’s police station, a hundred yards from the betting agency. A cop car was parked out front. He punctured the tires with a screwdriver. Then the Morgan twins barged into the betting agency, with Peter carrying a rifle and Doug the imitation pistol. “I don’t like to boast,” Doug told me, recalling the event, “but the manager definitely opened the safe door when I went along.” The brothers filled their bags with $916, ran outside, and mounted a pair of bicycles. Peter had painted the bikes black so they’d be less visible at night. They coasted down a hill away from the betting agency, met up with a railroad line, and pedaled along the tracks to a car parked a short distance away. + +For their next crime, Peter drew up what he called a “double job”—two heists committed within half an hour of each other. The first would distract police and clear the way for the second. The twins would wear identical jumpers, like when they were kids, to fool the authorities into thinking that both were carried out by a single perpetrator. + +Peter did his part, stealing $1,277 from a betting agency in Hastings, but Doug got cold feet and aborted his portion of the plan. Twelve days later Doug sought redemption, charging into a betting agency in Koo Wee Rup armed with the imitation pistol and a sawed-off shotgun, which he vowed he’d use only to fire warning shots. + +A month later, Peter planned another double job. He robbed $1,567 from a TAB agency in Lilydale, only to discover afterward that Doug had balked again. Ten days later Doug struck his assigned target, a betting agency in Healesville, a small town in the fertile Yarra Valley, where kangaroos were often spotted lazing in the shade. When he entered the TAB, a customer was placing a bet. Doug told the employee behind the counter to let the customer finish up before turning over the agency’s cash. + +After exiting with $1,080, Doug leapt onto a bicycle and rode past the police station. He stashed the bike in some hedges and disappeared into the bush. Doug hiked about ten miles to a rendezvous point with Peter, scratching himself on blackberry bushes and lying prone as cars passed along the highway. It was like a game of hide-and-seek, he told me, “except your friend is going to shoot you.” + +## **“You’re mainlining on adrenaline for six or eight hours,” Peter said. “That’s the most powerful drug in the world, adrenaline. And the cheapest.”** + +The twins were young and immature, and they’d found a way to make cash far more quickly than they could lugging lumber and bricks around construction sites. Plus, there was a sense of adventure in it all. Doug remembers sleeping under a giant fern during a storm and falling asleep to the sound of rain. Peter was once scouting an escape route on his motorbike when a dozen kangaroos rushed past. “For about 20 seconds, I’m part of the kangaroo flock,” he told me. Peter also thrived on the rush he felt after a job. “You’re mainlining on adrenaline for six or eight hours,” he said. “That’s the most powerful drug in the world, adrenaline. And the cheapest.” + +The police were at a loss to figure out who was behind the brothers’ capers. Despite Peter carrying a gun in his left hand and Doug in his right, nobody caught on that there were two robbers and not one. The twins were  “cleanskins,”  meaning that they didn’t have a criminal record. Nor did they have any questionable friends, gang affiliations, or links to Australia’s underworld.  “The only criminal we ever knew was our father,” Peter said. This kept them off authorities’ radar but also meant that they only had each other to confide in and rely on. + +Peter was the planner, and a meticulous one. He kept a black book of potential jobs, with the locations of various TABs and banks, when they opened and closed, exit points, nearby police stations, and even coffee shops local law enforcement frequented. He gave each target a score based on its suitability. “Two ticks if the building was good, and maybe another tick if the getaway was good,” Peter said. + +The twins decided not to do robberies in the summer months, because that was when Australia’s venomous snakes were about. If one of them was bitten, he’d have to turn himself in to avoid succumbing from the venom. They also didn’t use walkie-talkies, concerned that someone might pick up the frequency. Instead, they developed a way of communicating in code by flashlight. When one brother arrived at a rendezvous point and gave a signal in the darkness, the other would signal back if it was safe to meet. + +The brothers never ate before a job. “You don’t want a full stomach when you’ve got to walk 20 kilometers,” Doug explained. To cut down on weight, they didn’t even bring water; they kept their mouths moist by chewing gum with flavored liquid in the center. + +After a job, the tradition was to drive to Melbourne and eat at an all-night burger joint. They’d pick up the latest paper, which sometimes included news of their crime. Peter remembered one headline declaring that the police had the bandit surrounded and were expecting an early arrest. The twins laughed as they scarfed down hamburgers several towns away.   + +![](https://magazine.atavist.com/wp-content/uploads/2024/12/Dubbins_2-1667x2500.jpg) + +**The Mask** + +Victoria’s Armed Robbery Squad operated out of the Russell Street Police Headquarters in downtown Melbourne. A blond-brick skyscraper crowned with a tall metal radio mast, the building stood across the road from the Old Melbourne Gaol, where Ned Kelly was hanged. Nineteen investigators had been allocated to the squad, and they were spread thin. Detective sergeant Jimmy Louden, who led one of the squad’s six crews, was in charge of the investigation into the prolific TAB robber, known initially as the Machine Gun Bandit because the assault rifle he sometimes carried resembled an automatic weapon. By August 1978, John Beever and Patrick Brear were running lead on the case. + +Beever and Brear started by revisiting each crime scene. The detectives drove long distances to talk to small-town cops and reinterview witnesses, paying close attention to physical details of the bandit and his routine. He usually struck at around 7 p.m., and police noticed that he hadn’t been very active during the Australian summer of 1977–78. The officers concluded that this was because the summer months brought more daylight hours, preventing the bandit from using darkness to his advantage. + +The robber was hitting targets all across southern Victoria, from windy Great Ocean Road in the west to the farm-studded flatlands of Wellington Shire in the east. Beever and Brear were especially baffled by robberies in Dromana and Sorrento that had occurred within 30 minutes of each other. The coastal towns were 15 miles apart on the Mornington Peninsula, a narrow boot-shaped strip of land south of Melbourne known for its vineyards, sheltered beaches, and great surf. As the bandit entered the agency in Sorrento, he told a female staff member, “Sorry I’m late, but I just held up the Dromana branch.” Beever and Brear were unable to cover the distance between the two towns in the time that elapsed between the robberies. “We were dealing with more than just your run-of-the-mill offender,” Brear said. “We were looking for a very smart operative.” + +Once the bandit’s MO was established, Victoria police launched a broad-based surveillance effort code-named Operation Rimfire. The objective was to monitor TAB agencies in areas where the bandit was operating, in particular between the hours of 5 p.m. and 7:30 p.m. It was an enormous allocation of manpower for small-town police stations with just a handful of employees. Officers attended briefings and manned stakeouts in shifts. They were instructed to wear civilian clothes, stay near a telephone, and maintain radio contact. Meal breaks were forbidden. After the bandit struck while an officer was using the restroom, officers were ordered to hold their water, too. + +As the search dragged on, the police grew annoyed by the public’s lack of assistance. The leader of Victoria’s Armed Robbery Squad, detective inspector Tom O’Keeffe, told the press, “It’s not a Ned Kelly fight between the coppers and the villain. It’s not a game people can join in by watching on TV.” He warned that the bandit was “a potential psychopath,” and compared him to rapists and murderers. “It looks like it’s a challenge to him,” he said, “and we accept the challenge.” + +## **Doug feared that the heavy bag of cash tied around his neck might drown him, but managed to reach the bank and drag himself ashore.** + +Despite careful planning, close calls were unavoidable for the Morgan twins. During one escape, Doug encountered a roadblock on a bridge and had to slip into a swollen river to avoid detection. From under the bridge, he could see the cops above silhouetted by flashing lights. For a moment he considered yelling for help. He feared that the heavy bag of cash tied around his neck might drown him, but managed to reach the bank and drag himself ashore. + +To stay ahead of police, the twins had to innovate. After one stickup in the bayside town of Edithvale, Peter experimented with a novel getaway method: a timber canoe. He built it himself, along with a paddle, to prevent the police from tracing it to a store. He navigated into foggy Port Phillip Bay with his stolen cash in a waterproof container, watching the lights of the police cars as they raced into town. Suddenly, the canoe started to sink—he hadn’t waterproofed it. Peter paddled frantically to shore, where he abandoned the vessel and hiked back to his car.   + +One day, Peter was perusing a collection of novelty items at an agricultural show in Melbourne when he spotted a mask. It looked like the face of an ugly old man and had a mop of curly hair attached, long enough that it ran to Peter’s collar. He decided that it offered perfect cover. He came to see the mask as the part of his robbery kit that distinguished him as a serious professional criminal, and resolved not to let his brother use it. + +That was fine with Doug, who used handkerchiefs and bandanas to cover his face during robberies. He had no interest in wearing Peter’s mask, which he tried on just once. “It was a piece of shit,” he told me. “Your vision was really bad out of it, so you didn’t have peripheral.” + +Peter felt that his brother was an unreliable partner. Doug wasn’t balking at jobs anymore, but he was sometimes unavailable because of practice with his recreational football team. “I was full on,” Peter said, “whereas for whatever reason, Douglas became reluctant.” Peter planned TAB heists in Drouin and Keilor without telling his brother. + +But TABs were beginning to feel too small-time for the kind of criminal Peter saw himself as. In early 1978, he decided to hit his first bank. + +**The Nickname** + +Because banks closed earlier than TABs, Peter knew that he risked being seen before the sun went down. This meant it was imperative that he get into the bush faster than usual. He decided to steal a motorbike to do so. One of Peter’s rules was to only steal from businesses, not individuals, so he went to a used-car lot, asked to test-drive a Honda 500cc motorcycle, and zoomed away without paying for it. + +The next day, March 7, 1978, Peter rode the stolen motorbike to the State Savings Bank in Mirboo North, a tranquil farming town. He ran inside armed with a shotgun and ordered the manager to fill up a bag with money. He then escaped to a nearby pine forest, stashed the bike, and set off on foot. When he stopped to rest, he rifled through his bag of money and found a brand-new .25-caliber Browning pistol inside. It belonged to the bank. A staff member must have tossed it inside for some reason during the robbery. + +The take was a hefty $15,098, and Peter planned to spend his share. While Doug sometimes used his portion of the loot to purchase sports cars, Peter preferred ski boats, motorbikes, and guns. Like their father before them, both men enjoyed betting on horses and greyhounds. Peter used this as a way to launder his money: He’d place a bet with stolen cash at one window, then claim his winnings at another, receiving clean bills in return. (Since the races didn’t always go his way, he figures that the method amounted to about a 20 percent processing fee.) + +Peter also took up horse trading. He bought horses at country markets, transported them to his property, and sold some to recreational riders while keeping others for himself. It was an ideal cover for the robberies, justifying his frequent travel and surplus cash, and providing an explanation for how he spent his time. He’d even use the horse trailer to haul stolen motorcycles to robbery locations. Peter accumulated so many horses—he estimates that he bought and sold about 100—that he bought a farm in Nyora and moved his family there. + +Several of Peter’s Thoroughbreds competed on the local racing circuit. As kids the Morgan twins idolized the Skelton brothers, who were among the best jockeys in New Zealand. Now, as an owner of racehorses, Peter had the opportunity to lift R.J. Skelton into his saddle before a race. “He called me Mr. Morgan,” Peter bragged to Doug. However indirectly, the robberies were earning him power and respect. + +Peter claims that he hid his crimes from his family. He’d wait until his wife left for work—Pamela managed a hardware company—before washing the stolen bank notes, dunking them in water, shoving them in a stocking, and running them in the clothes dryer to remove any ink stamps the bank had marked them with. Like his father, he also rented a safe house in Essendon, gave the landlady a phony story, and kept a car at the property in case he needed to disappear in a hurry. + +Doug’s son, Michael, told me that his mother once opened the trunk of their car and found it full of cash. “But Father was good at lying,” Michael said. “He said he’d won it at the races.” + +The Morgan brothers treated their wives with coldness at times, and despite their fraternal competitiveness, they often opted to spend time with each other rather than their families. Doug’s wife was saddened by his absence and neglect; Peter’s wife finally left, taking their son with her, after Peter returned from a three-day heist and refused to tell her where he’d been. Peter spent the next day losing $7,000 at the racetrack. When his wife returned with their son and a new toy she’d bought for him, Peter bitterly blamed her for his losses. That toy had cost seven grand, he thought. + +Still, the Pamelas stuck by their husbands even as their families grew: Doug eventually had a son and a daughter, and Peter had two sons. Just as Kay brought the twins along on jobs, Peter sometimes took his four-year-old to scout potential targets and police stations. One day the toddler was in the car with his grandparents when he said, “We need to go and look at the cop shop!” + +“Why?” they asked. + +Because, the boy said, Dad always liked to check them out. + +After the Mirboo North bank heist, the twins targeted a string of betting agencies. Following one stickup, in the town of Torquay, Doug was fleeing in the darkness when a local service-station owner gave chase. Doug turned and fired his gun, which was loaded with buckshot. He intended it to be a warning shot and had aimed at the ground, but a pellet struck the man’s lip. + +At around 7 p.m., Peter heard about the robbery on the radio and fell into a fury. “The shooting broke my rules,” Peter told me. “There was to be no violence.” Waiting in his Valiant Charger at the rendezvous point, Peter extended the barrel of his Jager .22 rifle through the open window. I’m going to kill him, Peter thought. The gun was loaded and cocked, with the safety off. He saw Doug walking toward the vehicle in the darkness, finishing what was a 15-mile hike from Torquay. Peter was about to pull the trigger when he thought: What am I doing? He put the gun back down on his lap. + +In the wake of the shooting of the service-station owner, police reporter Geoff Wilkinson published a story headlined “Hunt for 14-Raid TAB Thief,” portraying the criminal as a “potential killer.” Wilkinson—who would later write *[Double Trouble](https://www.wilkinsonpublishing.com.au/product/double-trouble-2023/),* a book about the twins, with coauthor Ross Brundrett—also gave the robber a new nickname, based on his propensity for nighttime heists: the After Dark Bandit. + +![](https://magazine.atavist.com/wp-content/uploads/2024/12/Dubbins_4.jpg) + +**The Briefcase** + +Doug’s shooting of the man in Torquay brought to the fore some fundamental disagreements between the Morgan brothers. Doug had always considered himself the better carpenter, better with girls, and their father’s favorite. Doug felt that Peter now saw himself as the better bank robber and was intent on rubbing it in. For his part, Peter felt like his brother was just “along for the ride,” enjoying the fruits of his efforts while pulling fewer jobs and bringing in less money. This inspired Peter’s nickname for Doug: Parasite. He felt that Doug lacked commitment. “It was a business,” Peter told me. “Not a legal business, but it was still a business.” + +Peter was meticulous to the point of obsessive when preparing for a robbery, scouting targets for hours at a time and repeatedly assembling and disassembling his rifle in the dark like a commando. As Peter saw it, Doug had never taken anything seriously in his life. In their teens, they’d been evenly matched in most sports, but Peter had the edge in track and field. During one race in New Zealand, Doug unexpectedly got out to a huge lead, and Peter exhausted himself catching up. Then, halfway through the race, Doug stopped and walked off the track. “It was all just a big joke to him,” Peter told me. + +Doug’s lackadaisical attitude clashed with Peter’s desire to expand their criminal enterprise to include higher-stakes bank jobs. The last TAB Peter ever hit was in the small dairy town of Maffra. It was the second half of a double robbery; Doug had struck a betting agency in Heyfield 25 minutes earlier. Peter, wearing his mask, entered the caged area behind the TAB’s counter and collected the money from the cash drawers. But when the manager opened the floor safe, it was empty. “Where’d you hide it?” asked Peter, rummaging through a waste bin to see if any money was stashed inside. The manager just smiled. Reading the papers afterward, Peter concluded that after Doug’s Heyfield heist, the police had notified all TABs in the area that the After Dark Bandit was on the prowl. Peter was less annoyed by the measly haul—a mere $463—than by the feeling that he’d been outsmarted. + +Two weeks later,  eager to show the police who was boss, Peter parked his motorcycle outside Heathcote’s CBC Bank, donned his mask, and ran inside carrying a sawed-off shotgun and a large bag. “I have to rob a bank because the coppers have got the TABs covered,” he told the frightened staff. He seized $15,106 in cash.   + +Carrying the stolen money out of the Heathcote CBC, Peter spotted a man seated in a car wearing a blue Victoria Police uniform. Peter, still in his mask, dragged the man out of the car and frisked him for a gun. + +“You’re a cop,” Peter said. + +“No,” lied the off-duty constable, terrified. + +Peter threw the man’s keys into a nearby field, then climbed onto his motorcycle and sped off down Heathcote’s main street. + +Soon after, flush with cash from the bank heist, the Morgan twins went to the races at Ballarat, a provincial city in the gold-rich Central Highlands of Victoria. They drove Peter’s Valiant Charger, which he’d recently souped up to outrun the cops. “It was my pride and joy, obviously,” Peter told me. In the boot of the car was a briefcase containing two shotguns and thousands of dollars in cash. + +Before the races started, Doug vanished. Peter couldn’t find him in the restroom or anywhere else he searched. He’d never known his brother to skip a race, so Peter panicked, worrying that the police might have nabbed him. He decided to leave, but walking through the parking lot he realized that the cops might be waiting at his car. He crept between vehicles, trying to remain unseen, until he came to his spot. The Valiant was gone. + +Peter took a taxi back to his house, where he found his car parked with the door and trunk open. The briefcase was gone, and there was a note on the steering wheel: “Thanks bro.” + +Doug had stolen the car by having a copy of Peter’s key cut the previous day. “My greatest job,” Doug told me. “I robbed the robber.” + +For three days, Peter said, he “hunted Doug around Victoria prepared to kill him.” He drove to every motel he could find. “I’m looking for my twin brother. He looks like me,” he told each proprietor. “There’s been a death in the family, and I can’t contact him.” + +Doug told me that he robbed his brother because he was fed up with Peter calling him Parasite. Plus, he wanted to prove that he could get the better of his twin. “I showed him who’s the real master,” Doug said. + +A few days after disappearing, Doug called Peter. “We need to talk,” he said. + +“You’re a scumbag,” Peter replied. + +Still, the brothers agreed to meet. When they sat down at a pub in Melbourne, according to Doug, he handed over Peter’s gun and half the money from the boot of his car. (As Peter tells it, Doug had already spent it all, and slid him an empty briefcase.) Doug explained that he’d been at a motel in the town of Sale. Peter hadn’t checked it because it was next to a police station. + +The incident strained the already volatile relationship between the brothers, yet they continued their criminal partnership. Despite a mutual hatred, they were the last remaining members of the original gang of four, and neither could simply walk away. + +**The Gum Tree** + +Robbing Peter made Doug more confident than ever. In the spring of 1978, he told his brother that he intended to hit a bank. Peter asked for specifics, but Doug simply said that he had it all planned out. + +In fact, all he’d done at that point was pick a target: the National Bank in Warburton, an old gold-mining town on the Yarra River, surrounded by the lush green mountains of the Great Dividing Range. Doug had banked there a few years earlier, and once when he looked over the teller’s shoulder, he saw heaps of cash in trays—far more than he’d seen when working in a bank as a teenager. “It told me this was a good bank to rob,” Doug said. + +Five nights before the heist, Doug stole a small Honda motorbike from a local garage. On October 17, he rode around Warburton for four hours, scouting his getaway route. As the afternoon shadows lengthened, he found a hill overlooking the bank and sat there for 20 minutes, counting the customers going in and out of the building. + +Doug stepped into the bank dressed in a long oilskin coat, his face covered by a black stocking and a balaclava. He vaulted over the counter, shouting, “You probably know who I am. I am the After Dark Bandit!”  He announced that he’d shot people before, then he emptied the cash from the tellers’s boxes and locked everyone in the bathroom. He warned them not to contact the police, claiming that he knew where they lived. + +After the holdup, Doug raced on his motorbike into the hills above Warburton. With the heavy bag of stolen money strapped to his wrist, he accidentally popped a wheelie that sent him swerving toward an oncoming bus, which he narrowly avoided hitting. He then doubled back over some dirt tracks he’d made that morning, forcing his pursuers to guess which direction he’d gone. After returning to the paved road, he puttered along for a distance before stopping. He threw the bike over a wire fence, covered it with branches, and set off on foot into the bush. + +When he felt that he’d gone far enough to shake any pursuers, Doug took a rest against an enormous gum tree. “It was like a romantic painting,” he said. He opened his bag and counted the stolen cash: nearly $39,000. While some thieves might have considered the impressive haul ample reason to keep pulling jobs, Doug felt differently. “It was enough money to start a new life,” he recalled. “I could leave Australia. Maybe move to New Zealand or America. I could buy two houses in cash, maybe set up a business.” + +He thought about his brother—blowing money on racehorses, doing jobs just to prove he could, and walking around like a movie gangster with the Browning pistol from the Mirboo North robbery tucked into a homemade holster.  Doug didn’t want to be like his brother, because he didn’t like his brother. If Peter was going to continue to define himself by robbing banks, Doug would take the opposite tack. He pledged to never do another holdup. + +In the distance he could hear the *thrup-thrup-thrup* of a police helicopter searching for him. He looked up at the canopy of the gum tree. Its long branches and flowing leaves provided perfect cover. + +Later, when Peter discovered how much Doug had scored, their biggest haul to date, he scoffed. “Beginner’s luck,” he said. + +## **“He was like a bomb just waiting to go off, and the trouble is, the bomb was going to destroy my life as well,” Doug said.** + +On March 14, 1979, Peter put on his rubber mask and darted inside the same Heathcote CBC he robbed the previous July. “Hello,” he cheerily greeted the staff. “Remember me?” He tossed a bag on the counter and told the tellers to fill it up. Peter then placed his sawed-off shotgun on the counter and caught one of the tellers looking at it. “This is your chance,” Peter said, daring them to grab the weapon. + +He forced the customers into the storeroom. A few noted that the bandit had grown a pot belly, causing his shirt buttons to pop. In a subsequent news article headlined “The after-dark bandit casts a broader shadow,” journalist Lindsay Murdoch wrote, “Police say the bandit’s big spending of TAB and bank money is starting to show.” + +Peter announced that he needed a getaway car, and ledger keeper Jan Murphy handed him the keys to her orange Datsun. He drove Murphy’s car to a small building in the countryside, where earlier that day he’d stashed his motorbike—an unregistered, customized machine with a top speed of 100 mph. Zipping away on the bike, Peter was free. + +Doug thought that his brother was insane to rob the same bank twice. “He was like a bomb just waiting to go off, and the trouble is, the bomb was going to destroy my life as well,” Doug said. + +Peter didn’t take his brother’s retirement all that seriously, and felt validated when, a few months after the revelation under the gum tree, Doug agreed to do another bank job. The heist was planned for the idyllic farming town of Heyfield. Peter gave Doug his motorbike and guns, and dropped him off about 12 miles from the target. Doug, who later said that he’d felt pressured into the job, yanked a few wires on the bike to render it inoperable, then spent the day sitting by a lake. When Peter found out, he was furious—about the broken bike and because his brother had pulled out of yet another robbery.   + +The twins had always fought, but their confrontations were becoming increasingly violent. Doug remembered Peter once holding his hair and kicking him in the face with his boot; another time, he said, Peter tried to run him down with a car. Doug also recalled punching Peter in the face and ramming his head through a plaster wall at a construction site. During one fierce fight, Doug begged Peter to give up the robberies. “You have to stop,” Doug said. “You’re going to get us killed.” + +By then the twins had stolen close to $100,000, but for Peter it wasn’t enough. His goal was to become “the big guy in domestic horses in Victoria,” he told me. To do that, he needed a sizable nest egg. If Doug continued to dig in his heels and refuse to pull his weight, Peter figured that it would take six more jobs to get where he wanted to be. + +**The Church** + +For detectives Beever and Brear, each new robbery felt like a failure of their investigative work. But it also added to the pool of knowledge about the After Dark Bandit. They realized that he was becoming greedier, favoring banks over betting agencies, and also more daring and reckless. He was hitting targets during the day sometimes, and he’d robbed Heathcote CBC twice in eight months. + +Beever and Brear’s working theory was that the bandit was a drug addict or gambler—someone “not very strong on investments,” in Brear’s words, who was spending the money he stole, then pulling another job when cash got low. The detectives recorded the dates of each robbery and the amounts taken. Using this information, they discerned what they thought was a pattern and tried to predict when he would strike again. + +Beever thought that the next robbery would fall on April 27, and he sent a telex dispatch the day before, warning police in county stations to be on high alert. “Regarding the offender sought for numerous armed robberies on TAB agencies at banks in country areas, it is anticipated that this offender will commit a similar offence in the very near future,” Beever wrote. He urged police to monitor banks and TABs “in particular within half an hour either side of closing time,” to be “discreet in the surveillance,” and to stay off their radios. “It appears that this offender has monitored police broadcasts in the past,” Beever wrote. + +Brear suspected that the target would be Heathcote CBC for a third time. He couldn’t say why—it was just “a hell of a strong gut feeling,” he told me. Sitting at Russell Street Police Headquarters, with nothing pressing on the day’s agenda, Brear suggested to Beever that they drive from Melbourne up to Heathcote, park near the CBC Bank, and watch for the thief. Beever doubted that the robber would hit Heathcote a third time, however, so the detectives stayed put. + +Still, Brear was so convinced that Heathcote was the target that he called senior constable Ray Koch, one of two police officers in the small town. Brear urged him to keep an eye on the bank, and Koch reassured him that he was standing guard. + +Around 4:40 p.m., 51-year-old Koch was cruising down Heathcote’s main street in his squad car when he decided to do another pass by the bank before it closed for the day. Koch gripped the steering wheel with his big hands. He was a strong, stocky man; his friends knew him as a gentle giant who enjoyed spending time with his wife and four kids. A pillar of the tight-knit community, he could often be found trap shooting, duck hunting, or drinking beer with friends. + +Clad in his blue police jacket and trousers, Koch drove up to the brick bank, where he noticed a figure on a side street. It was Peter, who on an impulse had indeed chosen to hit Heathcote a third time, because he knew the bank inside and out. For the previous two hours, he had stood at the edge of a nearby football field, watching Koch’s police car pass the bank every 30 minutes. “Like clockwork,” he recalled. Come 4:30, Peter decided to strike, figuring he’d have half an hour to rob the bank before the cop returned. He didn’t expect Koch to come back early. + +Peter had just put his mask on and was walking toward the bank when Koch pulled up. Upon hearing the car door open, Peter ducked behind a small tree, pulled off his mask, and shoved it in his jumper. He’d hoped to appear as a passerby. But then he changed his mind; instead of trying to blend in, he’d take action. + +Peter drew the Browning .25 pistol, which he’d come to regard as his lucky gun. It was the same model his father had used in the Eltham bank shootout, and Peter always kept it cocked and loaded. Koch, now out of his vehicle and clearly facing the After Dark Bandit, made for the far side of his car for cover, but Peter came at him and grabbed him by the arm. Koch tried to seize the Browning, and as the men wrestled, Peter’s gun hand slid under Koch’s armpit and the weapon discharged. Koch was hit in the back of the hip. He dragged Peter to the ground as he fell. When the two men hit the pavement, there was another loud pop. Intense pain seared through Koch’s body. (Peter has always insisted that both shots were unintentional.) + +As Koch bled under his jacket, Peter hoisted him to his feet, grabbed him by the elbow, and walked him toward the bank. Peter was about to don his mask and enter the building when he turned to Koch. “I should finish you right now, because you’re the only person that’s ever seen my face,” Peter said. “But I won’t.” Then he pulled the officer into the bank. + +Peter ordered the bank staff, who knew his routine by now, to fill up his bag with cash and open the safe. Koch, meanwhile, sat in a chair by the door, moaning with pain. Peter wanted to get out of there fast, lest Koch’s colleagues show up. He also wanted Koch to pull through. + +“When we finish this, you can ring for the ambulance,” Peter told a young bank teller. + +“What’s the phone number?” the teller asked. + +“You idiot!” yelled Peter, kicking the teller’s backside. + +Once again Peter needed a getaway vehicle, and once again ledger keeper Jan Murphy offered the keys to her orange Datsun. Lugging $11,100 in stolen cash, he left through the rear of the bank and got in the car, which was parked in the same spot as the last time he stole it. + +Peter drove the Datsun down a side street, then around the back of the football field and into Heathcote’s scrubby fairground, where he’d hidden a black Yamaha motorcycle. Because Doug had sabotaged Peter’s personal bike, he lifted this one from a garage the night before. Peter ditched the car and got on the bike just as a police car pulled into the fairground. Behind the wheel was Fred Hobley, the other half of Heathcote’s two-man police force, who minutes after Peter fled the bank got the call that Koch had been shot. + +Peter maneuvered into a ditch and then up an embankment and onto the road, with the cop in pursuit. Hobley lifted his police radio. “I’m chasing the motorbike,” he reported. Hobley kept losing sight of Peter on a windy dirt road leading into the forest, but he could follow the dust stirred up by the bike’s tires. + +Peter saw a vehicle up ahead also kicking up a cloud of dust. He turned onto a narrower track, then slowed down. Behind him the cop car sped past, following the other vehicle’s trail.   + +Peter puttered along slowly, drained from the adrenaline rush. After a few miles, he reached a spot where earlier that day he’d cut some tree branches to cover the bike and also stashed a bag of supplies—two cans of Coke, some blocks of chocolate, and a portable transistor radio. He grabbed the sack and started into the bush. + +## **Doug drove to his brother’s farm, grabbed some guns from Peter’s shed, and loaded them into his car.** + +Later that evening, Doug was visiting his 17-year-old mistress, Wendy Breen. He’d been smitten by Wendy after she came to ride horses at Peter’s farm. “She probably went for the older man that had nice things, being young and from a working-class family,” Doug said.  Now, while spending time at her home, he heard a news flash on the radio that a policeman had been shot. He knew right away that Peter was responsible, and that the two of them were in deep trouble. + +Doug had played a minor part in the heist that day, dropping off Peter and his motorbike outside Heathcote in the predawn hours. Doug rationalized that this wasn’t as bad as holding up a bank—he was only driving. Still, he’d told Peter that this was the last time he would help. Now he drove to his brother’s farm, grabbed some guns from Peter’s shed, and loaded them into his car. He told me he’d planned to use them to fire warning shots if he encountered police. + +As part of the heist, Doug was supposed to pick up Peter at 2 a.m. at a rendezvous point: a Catholic church outside the small farming town of Axedale. Fueled by adrenaline, Peter made it there early and sat on the steps of the old church, waiting for his brother. The night air was frigid, causing him to shiver. He thought about kicking down the door of the church to warm up inside but decided that wouldn’t be right. It was a church after all. He turned on his transistor radio and listened to the news about the shooting and the massive police manhunt. The whole world was going to come down on his shoulders, he thought. + +Two a.m. came and went with no sign of Doug. Unbeknownst to Peter, his brother had decided to wait until morning to head to the church, hoping that the police presence would diminish with time. En route, Doug spotted a roadblock. He knew that if the cops searched his car, they’d discover the guns he’d concealed under a newspaper on the passenger seat, so he stopped at a convenience store and bought a Coke. Then he got back in his car and hung a U-turn. According to Doug, if either missed the rendezvous, their plan was to return 24 hours later. + +By 10:15 a.m., Peter was fed up with waiting. Eager to make it home for his wedding anniversary celebration, he decided to hitch a ride on a nearby road. A woman driving with her daughter gave him a lift into the town of Bendigo. “Retrospectively,” he told me, “I should have went bush.” Peter walked into a Woolworths to buy a different suitcase to carry the cash from the bank job. On his way out, he thought he was probably in the clear. He was only ten minutes from Bendigo’s railway station, where he could finally make his way home. That’s when constable Rick Hasty spotted him, pinned him against the wall, and arrested him. + +Peter was shoved into a police car with three burly cops. They drove him a couple hundred yards to the police station and escorted him inside. + +Peter calmly asked for a white coffee with one and a half sugars. “He was a cocky smart-ass,” Hasty told me. “Don’t let him put it over you that he was sorry for \[what he did\].” Hasty added, “He should have been fucking shot between the eyes.” So many policemen crowded in to get a glimpse of the After Dark Bandit that Peter “couldn’t see the walls,” he told me. “All I could see was blue.” + +Brear, who’d gone to Heathcote the night before after hearing about the shooting, now arrived at the Bendigo station. He and a couple of other cops took Peter into a room for questioning. The men slid a list of suspected robberies across the table and asked him which were his. To their surprise, Peter admitted to nearly every one, 23 in total. He also volunteered that his first robbery was in Mernda. + +One of the stunned cops asked him the date of the crime. Peter said that it was Holy Thursday 1977. + +Peter then described his robberies down to the exact amounts stolen and the weapons used. “He was very cooperative,” Brear told me. “He offered no resistance to us at all.” Peter was following in the footsteps of his father, who’d freely confessed to his crimes after the Eltham robbery. “If you ever do something wrong,” Kay had told his sons, “at least be a man and accept the punishment.” + +Ten hours after Peter’s arrest, once the police had searched his home and discovered that he had a twin brother, detectives Beever and Brear sat Peter down for a second round of questioning. They said that they believed his twin had been involved in the heists, too. Given their recent feuding, Peter had no intention of covering for Doug. + +Yes, he told the police, his brother was his partner in crime. + +When Doug saw his name and face on TV, he realized that his brother had ratted him out. He figured that it was Peter’s revenge for stealing his car and money at the horse races. “I don’t think I really trusted people after that,” he told me. + +Doug suspected that the cops would be watching his home, so he spent the next few days moving from motel to motel with Wendy. The police already knew his face, of course, and they had a description of Wendy, which was circulating in the newspapers: a petite blonde, “last seen wearing blue jeans and a navy jumper.” Doug needed a car the police couldn’t trace, so he put a deposit down on a Land Rover, the first model he remembered his father driving. His plan was to head deep into the bush with Wendy and lie low for a while. + +But first he took Wendy to the beach in Frankston, a lively seaside suburb of Melbourne with a golden sandy shore. Doug was watching the surf when he saw police officers coming down the beach, pointing at him. He bolted but didn’t make it far. Within moments, he collided with a police car and the cops piled on top of him. + +![](https://magazine.atavist.com/wp-content/uploads/2024/12/Dubbins_5.jpg) + +**The Prison** + +Justice for the brothers was swift. Doug pled guilty to robbing 17 TABs and four banks; Peter admitted to the same crimes, plus the two TABs he’d hit alone. A jury acquitted Peter of intent to cause grievous bodily harm to Ray Koch but found him guilty of the lesser charge of using a firearm to resist arrest. + +The judge sentenced the twins to 17 years, but on appeal the state argued that they deserved more jail time. They’d left countless victims in their wake. There were the bank tellers and the customers who’d been traumatized by the brothers’ crimes. There was also Rick Hasty, who for the next 15 years wouldn’t speak to anyone about his terrifying encounter with Peter. He drank to forget, costing him two marriages, and moved to a cul-de-sac in the countryside, where he still lives today, often venturing alone into the Outback. Then there was Koch, who survived his injuries, but not without consequence. Doctors were in such a hurry to save his life they didn’t have time to scan the 32 pints of blood—donated by friends and Heathcote locals—his surgery required. Many suspected it had been infected with hepatitis, which took Koch’s life 16 years later. “So Morgan actually did kill him,” Hasty told me. + +As a result of the state’s appeal, Doug’s sentence was increased to more than 20 years, and Peter’s to nearly 22. “The longest sentence from a robbery in Victorian history,” Peter boasted to me. Doug served almost 11 years, and Peter 12, both at Pentridge Prison, known for its strict security measures and notorious inmates. + +While behind bars, Peter and Doug’s wives divorced them, and the brothers faced violence from fellow inmates and guards. Doug told me that there were times he wanted to kill himself but found strength by pretending he was a tough-as-nails John Wayne character. He also developed a mantra: “Hang yourself on Thursday.” Meaning give it a few days—by then you’ll forget what was so depressing. + +During our conversations, both Peter and Doug expressed remorse for their criminal acts, attributing them to youthful stupidity. “I have a chronic guilty conscience of what I did, on all levels,” Peter said. Doug posts videos of himself on Facebook that often delve into his feelings of regret. He records them the moment he wakes up, which he says is when his thoughts are clearest. Some are strikingly raw and poetic, such as his memory of standing on a hilltop before a robbery, watching a town’s “streetlights flicker on, the smoke escaping from the chimneys, the people keeping warm, innocently going about their business.” + +He concludes: “I never forgot sitting there on that hill and how peaceful the town was. But I was not a bringer of peace. I was a bringer of grief.” + +## **The final competition between the Morgan brothers is over their legacy, as each man seeks to prove who was the better thief and who became the better man.** + +Today, Doug leads tours of the old prison where he did his stretch, which ceased operations in 1997. Parts of the facility have been remade into the ritzy Interlude hotel, where guests stay in converted-cell suites and take a dip in the softly lit subterranean swimming pool. Doug told me that tourists often ask questions about the time he served: “What was it like?” “How did you make it through?” Doug might say something glib in the moment, but then chew over his response for days until he falls upon something closer to the truth. + +Peter despises that his brother is a tour guide, calling him a “show pony.” But Doug told me that he doesn’t do it for the fame or the money. He says that he enjoys meeting people and talking to them. Often, after a tour, he’ll go to a chic bar inside the old prison called the BrewDog, where he’s served free beer, and swap stories with the people from his tours—locals, foreign tourists, even a cop once. + +Doug likes to present himself as a loner. He’s had girlfriends since prison, but he told me that he never lets them spend the night. He took up painting behind bars and likes to capture scenes of isolation: a red mug in the corner of a white room, Ned Kelly seated alone in darkness, a tumbledown shack on a barren plain. The bush features prominently in Doug’s artwork, and he romanticizes his time alone there, running from the law. + +But there are signs that he craves real community. After his release from prison, he got interested in charity work and became a Salvation Army volunteer. He still takes on construction jobs, even at the age of 70, because he enjoys mentoring younger carpenters. And he posts video diaries online, reaching into the ether for connection. + +Peter told me that his parents were never affectionate. He recalled one time sitting in the back seat of the car with his mother, grandmother, and brother. “I pretended to be asleep so I could lean against my grandmother and get cuddled,” Peter said. “I got that from my *grandmother,* not my mother.” Perhaps somewhere in that Rosebud-like memory lies the origin of the Morgan brothers’ intense rivalry: Maybe as boys, Doug and Peter had to compete for scarce attention, affirmation, and love from their parents. It’s a rivalry that has lasted their whole lives. It didn’t surprise me, then, to hear that Peter, too, had tried his hand at painting, and was endeavoring to get a charity startup off the ground. + +Both men were hobbled by leg injuries sustained during their nighttime bush escapes, but apart from a matching limp, the twins are no longer identical. Doug wears his brown hair long and has a tangled beard; Peter is mostly bald, with a neat white mustache. Peter, who retired from construction, told me that Doug’s Facebook videos are ruining the quiet life he tried to create for himself. Doug frequently portrays Peter as an egomaniac trapped in his gangster past. He points to Peter’s use of “ADB” in his email address, short for After Dark Bandit. Peter told me that he chose ADB because “AfterDarkBandit” was already taken—by Doug. + +Peter claims that Doug was just his “gopher” and “sidekick” during the robberies, and yet Doug, because of his charity work, painting, and prison tours, has spent more time in the limelight in recent years than Peter has. Peter is planning to write a memoir, titled *The Whole Truth and Nothing But the Truth*. Doug, of course, is considering a memoir of his own. + +The final competition between the Morgan brothers is over their legacy, as each man seeks to prove who was the better thief and who became the better man. Their feud has reached its climax; neither brother knows where the other lives. + +On a cloudy day in Melbourne in December 2023, Doug led his son, Michael, along with Michael’s wife and son, on a private tour through Pentridge’s B division, where the ground floor has been preserved. Doug walked his grandson into a small, dimly lit cell. “That’s your whole life,” Doug said. “You lived there all day. How would you like that for being a bank robber?” + +Michael was shocked by the tour. “I never expected it to be so barbaric,” he told Doug. “From the outside, I don’t know what I expected. It just wasn’t this. These old, tiny, shitty cells.” It was the first time Michael had been past the visiting area. As a kid, he relished prison visits with his dad. “They take you down the path in the building, down to the garden, and these big old metal doors open,” Michael remembered. “It was always joyful, because in the garden I got to see my dad. He’d always have a Crunch bar for me.” + +Doug, too, felt joy when his son visited, but a sense of melancholy, too. He told me about the time Michael pulled a tee out of his pocket, because his new stepdad was teaching him how to play golf. “I look at it and I go, ‘Well, if I was still a free man, he would be playing football, but now another man is raising my son,’ ” Doug said. “That’s when I realized a lot about the cost of crime.” + +Michael is a successful salesman and marketing manager. I asked him if he’d ever thought about how he’d managed to break the cycle of crime that started with his grandfather. He said that he never really considered a life on the wrong side of the law. Sure, he’d felt a little rebellious toward the police as a kid, having witnessed them ransack his home searching for Doug—much like what Doug had experienced when law enforcement came looking for Kay. But Michael also experienced the consequences of crime, the visits to Pentridge where he could see his dad but never leave with him. “You have to live it,” he said, “\[seeing\] your parent in prison.” + +Then Michael smirked. “It’s too hard these days anyway,” he added. He meant robbing banks. + +--- + +*© 2024 The Atavist Magazine. Proudly powered by [Newspack](https://newspack.com/) by [Automattic](https://automattic.com/)*. *[Privacy Policy.](https://automattic.com/privacy/)* [*Privacy Notice for California Users.*](https://automattic.com/privacy/#us-privacy-laws) + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/00.03 News/The American Oil Industry’s Playbook, Illustrated How Drillers Offload Costly Cleanup Onto the Public.md b/00.03 News/The American Oil Industry’s Playbook, Illustrated How Drillers Offload Costly Cleanup Onto the Public.md index dc41a09d..0dfe996c 100644 --- a/00.03 News/The American Oil Industry’s Playbook, Illustrated How Drillers Offload Costly Cleanup Onto the Public.md +++ b/00.03 News/The American Oil Industry’s Playbook, Illustrated How Drillers Offload Costly Cleanup Onto the Public.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2025-01-05]] --- @@ -36,10 +36,6 @@ In December 1990, officials in the federal agency tasked with regulating offshor More than three decades later, little action has been taken to heed that warning, and the time bomb is threatening to explode. -#### Good journalism makes a difference: - -Our nonprofit, independent newsroom has one job: to hold the powerful to account. Here’s how our investigations are [spurring real world change:](https://www.propublica.org/impact) - ![](https://img.assets-c3.propublica.org/images/series/abortion-deaths-3x2_preview_maxWidth_3000_maxHeight_3000_ppi_72_embedColorProfile_true_quality_95.jpg?crop=focalpoint&fit=crop&fm=webp&fp-x=0.5&fp-y=0.5&h=800&q=75&w=800&s=13155306325de40f6283157b2d3b0bce) ![](https://img.assets-d.propublica.org/v5/images/2023113-Ethics-Code.jpg?crop=focalpoint&fit=crop&fm=webp&fp-x=0.5&fp-y=0.5&h=800&q=75&w=800&s=bef937d6f2c382c24d2579a21fbe4faa) @@ -52,11 +48,8 @@ The Supreme Court created its [first-ever code of conduct](https://www.propublic ![](https://img.assets-d.propublica.org/v5/images/2024-11-05-Flynn-2024election-057_maxWidth_3000_maxHeight_3000_ppi_72_quality_95_embedColorProfile_true.jpg?crop=focalpoint&fit=crop&fm=webp&fp-x=0.5&fp-y=0.5&h=800&q=75&w=800&s=c9e12f8feb4547bfd29bf2053213c82c) -Support ProPublica’s investigative reporting today. - -[Donate Now](https://give.propublica.org/give/346423/#!/donation/checkout?c_src=imp) - [](https://www.propublica.org/article/oil-orphan-wells-cleanup-playbook-siana-tom-ragsdale#)  [](https://www.propublica.org/article/oil-orphan-wells-cleanup-playbook-siana-tom-ragsdale#)  [](https://www.propublica.org/article/oil-orphan-wells-cleanup-playbook-siana-tom-ragsdale#)  [](https://www.propublica.org/article/oil-orphan-wells-cleanup-playbook-siana-tom-ragsdale#)  [](https://www.propublica.org/article/oil-orphan-wells-cleanup-playbook-siana-tom-ragsdale#) +![](https://www.propublica.org/article/oil-orphan-wells-cleanup-playbook-siana-tom-ragsdale#) We’re trying something new. [Was it helpful?](https://iteratehq.com/propublica/670eabefffb484af7dc7db86) diff --git a/00.03 News/The Ghosts in the Machine, by Liz Pelly.md b/00.03 News/The Ghosts in the Machine, by Liz Pelly.md index 74f0d41a..e93f6ca5 100644 --- a/00.03 News/The Ghosts in the Machine, by Liz Pelly.md +++ b/00.03 News/The Ghosts in the Machine, by Liz Pelly.md @@ -12,7 +12,7 @@ CollapseMetaTable: true --- Parent:: [[@News|News]] -Read:: 🟥 +Read:: [[2025-01-05]] --- diff --git a/00.03 News/Trump’s Campaign Chiefs Tell Their Inside Story ‘The Black Swan Election’ - POLITICO.md b/00.03 News/Trump’s Campaign Chiefs Tell Their Inside Story ‘The Black Swan Election’ - POLITICO.md new file mode 100644 index 00000000..5348d0e2 --- /dev/null +++ b/00.03 News/Trump’s Campaign Chiefs Tell Their Inside Story ‘The Black Swan Election’ - POLITICO.md @@ -0,0 +1,520 @@ +--- + +dg-publish: true +Alias: [""] +Tag: ["🗳️", "🇺🇸", "🐘"] +Date: 2025-01-06 +DocType: "WebClipping" +Hierarchy: +TimeStamp: 2025-01-06 +Link: https://www.politico.com/news/magazine/2024/12/19/trump-campaign-lacivita-fabrizio-qa-00195206 +location: +CollapseMetaTable: true + +--- + +Parent:: [[@News|News]] +Read:: 🟥 + +--- + +  + +```button +name Save +type command +action Save current file +id Save +``` +^button-TrumpsCampaignChiefsTellTheirInsideStoryTheBlackSwanElectionNSave + +  + +# Trump’s Campaign Chiefs Tell Their Inside Story: ‘The Black Swan Election’ - POLITICO + +Fabrizio is older and less sharp-elbowed than LaCivita. He can be the cooling saucer to his younger colleague’s hot cup. At one point during the IOP conference, Fabrizio jokingly said “down, boy,” to an animated LaCivita. + +Yet by his standards, LaCivita, every bit the pugnacious Marine and Purple Heart recipient, was fairly restrained at Harvard. When Harris strategist David Plouffe didn’t show up at the conference, LaCivita decided to scrap his planned troll: to arrive with and display on the table a copy of Plouffe’s book, “A Citizen’s Guide to Beating Donald Trump.” + +Fabrizio and LaCivita have worked on a number of Republican races together and aren’t shy about finishing the other’s sentence. But all their time in the campaign trenches couldn’t prepare the two paisans for the most extraordinary year in modern American politics. Along with co-campaign manager Susie Wiles, they oversaw a campaign that prevailed through indictments, convictions, a pair of assassination attempts and over two Democratic standard-bearers. + +Until this interview, neither had spoken at length on the record about Trump’s victory. You’ll want to read the entirety of our free-flowing conversation. Fabrizio discusses the Biden alternative who tested the strongest against Trump, LaCivita reveals one of his few regrets, and both weigh in on who they think will emerge as the 2028 GOP nominee. + +*This conversation, best read with a strong red, has been edited for length and clarity.* + +**Was this election a macro election and it’s just that simple — high inflation, disorder at the border, unpopular incumbent, therefore the out party wins?** + +**Fabrizio:** No, because we faced — Well, first of all, I look at this election, I used to refer to it as the black swan election. If you look at all the events that took place and said, now we’re going to have an election and just one of them is going to occur — you’d say, “Wow, that’s incredible.” You have two assassination attempts. The incumbent candidate leaving in the middle of the race. You had his replacement being chosen without getting a single vote. You had all of these different things happening — candidate getting indicted. Candidate getting convicted. Those were all challenges that we faced. Nothing was inevitable to us. We knew that the environment was primed for us to be victorious. But it was us — think about a farm, right. You got all of this fertile land but if you don’t farm it right, you’re not going to get a crop. + +**Does that piss you off — the fact that the structural environment gets the credit for Trump winning more than the actions of the campaign?** + +**Fabrizio:** Well, that’s only what happens when the Democrats lose. + +**When did you guys think winning the popular vote was a real possibility?** + +**LaCivita:** Last two weeks. + +**Why?** + +**Fabrizio:** So the president asked me election day, he said: “What about the popular vote?” I said: “Well, sir, popular vote is tough.” It really depends on what happens in states like New York and California. Because it all depends on what their margins are, how much we lose them by. But you know the truth of the matter is: Winning the popular vote from our perspective, I don’t want to call it a vanity point, but … + +**But it’s an important vanity point, because it says ’16 was not a fluke. This is somebody who has got a real movement behind him.** + +**Fabrizio:** Well, we knew because of the shifts in the other demographic groups — that we were going to get that. The question was whether or not it could all play together. + +**LaCivita:** Whether it would be enough. + +**Fabrizio:** You know, what was going to happen with Black men. + +**When you had that conversation, Tony, with Trump — was it clear that he wanted the popular vote, that it was important to him?** + +**Fabrizio:** I have to say he was very content with what I had told him. + +**LaCivita:** But he started asking the question about the popular vote — that’s when I think he knew that he was in good shape. Because it was about seven days out, is when he started asking Susie and I point blank: “Do you think I can win the popular vote?” It no longer became a discussion of how are we doing in the battlegrounds. I remember telling Susie, I said: “I think he thinks we’re going to win.” + +**Fabrizio:** When I saw him on Election Day, all he wanted to know is: “You still saying feeling good?” I said: “Yes sir.” + +**Feeling good about the popular vote or electoral vote?** + +**Both:** The outcome. + +**How deep in the weeds is he about the data? Is he asking you about La Crosse, Wisconsin, or the numbers in suburban Philly?** + +**Fabrizio:** *(Shakes head no and quotes Trump)* “You feeling good about it?” That’s what he wants to know. + +One of the jokes was, when I would say “I’m feeling good about it,” he would go, “You sure?” And I would go, when did we switch that I became the optimist, and you became the pessimist? Because usually I’m the pessimist in these circumstances. + +**You guys mentioned the last two weeks. And I think this is an important point that hasn’t really been touched on. But I think it gets to the heart of politics in this moment and Trump specifically, which is, he said a bunch of things in the final weeks of the campaign that were provocative, let’s put it that way.** + +**Fabrizio:** As he’s known to do. + +**Exactly. Which I think gave a level of confidence to the Harris folks and Democrats broadly that Trump is closing in a way that really could help us. And he’s, to put it bluntly, pissing this thing away. Do his comments just not matter because it’s just so baked in?** + +**Fabrizio:** Two things. One is, is that the people who were off to the side, were people that were tuned out to mainstream news sources. + +**They weren’t hearing the Arnold Palmer comment.** + +**Fabrizio:** They weren’t hearing it. They weren’t hearing it. And to the extent that they did hear it, they had already made up their mind on him saying stuff like that. Again, if this race was about policy and performance, we win. And that’s why we kept it on policy and performance. + +**LaCivita:** And I think the press has overplayed its hand on how it deals with what he says and does. There’s nothing ever positive said. Everything is negative, negative, negative, negative. And I think the general population — people in general, just turned it off. They’re like: Eh. + +**They care about themselves, not him.** + +**LaCivita:** Right. + +**There’s the great old Bill Clinton line, which is, “Voters care more about their future than my past.”** + +**LaCivita:** It is. + +**Fabrizio:** Like we said, show me a voter who didn’t have an opinion on Donald Trump, one way or another, and I’ll tell you: They’re lying. + +**Right. But their opinion was chiefly to how they were doing. Now versus four years ago.** + +**Fabrizio:** What he can do for them. One of the things — the difference that we saw, from ‘20 to now, is there was a group of voters that had just accepted, he is what he is, but I know that he can do A, B, C and D, and you know why I know that? Because he did it. It wasn’t a promise. He had done it. + +**Was there a moment between July 21, when Joe Biden drops out, not where you thought you were going to lose, but where you said: “Well, this thing is a real ballgame.”** + +**Fabrizio:** I would say, the first couple of weeks after he dropped out, Harris just took off like a rocket. + +**LaCivita:** Our numbers never changed. + +**Fabrizio:** She just took off like a rocket. Her image changed 20 points. But what happened is, I used to describe it like a wave coming up on the shore, and the wave hit its high-water mark and then it just receded back. And so, the one thing she was never able to do, was close the sale. + +**Why?** + +**Fabrizio:** Because they just didn’t really have a coherent message. And they changed. I mean, one of the untold stories of this race — perfect example, last week of the campaign. They ran 162 different unique creatives on digital, TV. + +**How many did you have?** + +**Fabrizio:** 50. And by the way, we spent about the same amount of money. + +**LaCivita:** But if you were looking at it from TV, just broadcast, we had two \[commercials\]. That’s it. That’s it! + +**What did your data show was your most effective ad against her?** + +**Fabrizio:** There were several. Well, first, usually any ad where she was talking, was effective. Using her words. And there were a ton. In fact, there was so much, we couldn’t use all of it. + +**Was the trans stuff more effective than her not having an answer on The View on differences with Biden?** + +**Fabrizio:** Two different things. + +**LaCivita:** Appealed to two different groups of voters, too. + +**Talk about that for a minute, Chris.** + +**LaCivita:** We’re focusing on the group of persuadable voters and a group of low propensity voters. It’s two different tacks. Low propensity: Get them to vote. Persuadable: Try to get them over. The Harris campaign was convinced \[persuadables were\] around 4 to 6 percent. We knew it was probably closer to 10 to 12 percent. We focused the entire campaign built around the issues that matter to the persuadable voters early. Tony modeled them, and we tracked what the electorate, based on the persuadables, was thinking. And that drove all of our decision making. All of our decision making. We spent millions in mail in the summer, which we were roundly criticized for doing. All of this stuff was something that we started in June. + +**Would she have been better off running a conventional campaign against Trump as a pro-rich guy, tax cuts for the rich Republican who’s going to end your entitlements. Instead of saying: fascist, John Kelly.** + +**LaCivita:** What they did do, they started off with — Let’s not forget, Biden spent $100 million, a couple hundred million attacking us, and it had negligible impact. + +And then she shows up, she raises $1.5 billion in 107 days, gets crowned queen, coronated, gets tens of millions of dollars in free media where she’s the best thing since sliced bread. And yet, our numbers never changed. She consolidated the Democratic base. The bedwetters on the right try to decapitate the campaign at a critical, critical time. + +**Who was behind that?** + +**LaCivita:** Corey \[Lewandowski\] and Kellyanne \[Conway\], if you ask me. + +*\[Told of the claim, Lewandowski said of Harris: “I was prepared for her. Many others were not.” Conway denied the charge but suggested there were attempts to overthrow the campaign staff. “Nope. Wasn’t I. Despite the many entreaties to join I rebuffed and expressed confidence in the team. Routinely. Including to President Trump. I kept the peace. Others, not so much.”\]* + +**Tony, was there ever a moment where you thought, look, this is Trump’s third campaign, he’s gone through some campaign folks in the past, maybe this is going to be the time where our number is up.** + +**Both:** No. + +**Fabrizio:** Having been through three of these with him, I like to say: “In ’16 we got lucky, in ’20 we got screwed, in ’24 we earned it.” + +**Fair enough, but Trump can be, when it comes to personnel, he can make some changes. There was never a moment where either of you guys thought …** + +**Fabrizio:** He bitches about me, but I wasn’t going anywhere. + +**There was never a moment where, “oh, the boss could be” ...** + +**LaCivita:** Nope. + +**Is that because of the primary? Because he so dominated the primary that that put capital in your bank?** + +**Fabrizio:** (*turns to LaCivita)* It definitely put capital in their bank for sure. + +**You and Susie.** + +**LaCivita:** Yeah. + +**Were you guys preparing for her to do more to run to the center — to say, look, I’m not a liberal?** + +**Fabrizio:** That’s why we came at her for being a liberal right out of the gate. + +**Do you think that she hurt herself by not doing more to reassure the center?** + +**Fabrizio:** I think at some point, they became hamstrung by their own base. And they became hamstrung by their loyalty to Biden. + +**Did that surprise you by the way, that she couldn’t break from Biden?** + +**LaCivita:** It’s a really tough position to be in. + +**Fabrizio:** She’s the sitting vice president. + +**Did your data show that she would be rewarded, politically, from breaking from Biden?** + +**Fabrizio:** The problem was it would have undercut Democratic enthusiasm and motivation. + +**Did your polls show that?** + +**LaCivita:** Yeah. When you talk about if she had gone to the center — they had no intention of ever going to the center because they’re incapable of doing that. If she was going to run the center, she would have picked \[Pennsylvania Gov. Josh\] Shapiro to be her running mate. + +**I’m tempted to ask you if he still would have picked JD had Kamala already been the nominee — if Biden had dropped out by the time you picked your VP, would it have been a different choice?** + +**Fabrizio:** Honestly, I don’t know. That’s an imponderable, I will tell you that by picking JD — JD was a very deliberate pick. + +**How so?** + +**Fabrizio:** Well, I think, one, they have a really good personal relationship. Two, I think he sees JD — and I’m not trying to put words in the president’s mouth — he kind of sees JD as the torch-carrier of MAGA. This was a generational pick. This is, “I want this movement to go forward beyond me.” + +**You expect JD to be the nominee in ‘28?** + +**Fabrizio:** Yes — well, he certainly has a leg up. + +**Do you, Chris?** + +**LaCivita:** I do. + +**Let’s talk about Biden for a minute. Tell us about the polling data before and after that first debate.** + +**LaCivita:** We were in a great position pre-debate. + +**What does that mean?** + +**Fabrizio:** At that point, if the election were held before the debate, we likely would have won Virginia, and we would have won Minnesota and maybe New Hampshire. + +**So what did the polling look like two weeks after the Biden debate?** + +**Fabrizio:** The electoral vote count didn’t change all that much. What happened was you had states like New York and New Jersey and Illinois where Biden’s lead contracted so it boosted the national numbers up, so the national numbers became inflated. You saw polls where some of them had us up six nationally. + +**What happens if Biden stays in?** + +**Fabrizio:** We would have definitely won the popular vote, and we would have won with a larger electoral college vote. + +**LaCivita:** And we would’ve won more Senate seats. + +**Were there other Democrats you tested as possible opponents?** + +**Fabrizio:** Yeah, we tested them all. + +**Who was the strongest?** + +**Fabrizio:** Strangely enough, Michelle Obama. + +**But that was never an option for Democrats.** + +**Fabrizio:** But we tested it! Everybody said: “Oh, you got caught flat-flooted,” we were not flat-footed. + +**LaCivita:** Bullshit, we were way ahead of the ballgame. + +**Fabrizio:** We tested them all! + +**When?** + +**Fabrizio:** Right after the debate, soon as the whispers started. + +**LaCivita:** But back in May, we did an analysis of what it would take to remove Biden as the nominee because we wanted to know how the Democratic Party would do it. And then of course, then it gets put on the back burner. And then the first debate happens, me, Tony and Susie were watching the debate, within the first 5 minutes we were like: +“Oh fuck, he’s not going to last.” + +**Where were you?** + +**LaCivita:** Right behind the stage, in the green room. Five minutes into the debate, I look at Tony and Susie, and were like, I said: “He’s dead.” He’s not going to stay. + +**What did Trump say after the debate? Did he get, in the moment, how bad that was for Biden?** + +**Fabrizio:** Oh, he knew. Immediately. I think he was like, “I can’t believe they let him debate!” *(laughing)* + +**And it was his idea.** + +**LaCivita:** Yes, “anywhere, anytime, anyplace.” + +**Trump was tweaked that Biden got pushed out, though, he kept talking about it over and over again.** + +**LaCivita:** But he loves to — oh, and that’s the other campaign of firsts: the first Republican nominee, the first candidate for presidential history to beat two Democrat nominees in the same damn election. + +**What is it about Trump that appeals to working-class voters?** + +**LaCivita:** He’s talking about what they care about first and foremost. He’s talking about inflation, he’s talking about the cost of things. Here you have a billionaire candidate who is identifying better with working class than the nominee for the Democrat party? How is that possible? But the reason is because Trump speaks to and focused on the issues that matter. Not all the time. Right, he was prone to talk about other things. But on the issue of immigration, on the issue of the economy, on the issue of inflation — and he’s also speaking from the position of having done it. People remembered what it was like when he was president. It’s not like ’16 with “I’m gonna do.” In ’24, it was “I did” and “I’ll do it again.” + +**Did Democrats misread those voters as culturally liberal when they’re just not?** + +**LaCivita:** They made so many … If you go back and you look at when Biden was still in the race, one of the things that you would see is the third-party candidates were garnering in the teens combined. + +**But you guys were a little bit concerned about Kennedy still being on the ballot at the end in Michigan and Wisconsin though?** + +**Fabrizio:** The people who were most likely to vote for Kennedy were those persuadables that would otherwise vote for Trump because they wouldn’t vote for her. So the smaller we made that gap, the better for us. + +**Was she hurt by her gender?** + +**Fabrizio:** No. But it didn’t help her. We improved with women. Across the board. This whole notion that abortion was going to make the difference — you know what it did, it stoked motivation for their voters, but other than that … + +**LaCivita:** They ran a campaign that was literally just geared toward the base. They ran a base campaign in a presidential election. + +**The one Harris debate. Did that make any difference even in the moment?** + +**Fabrizio:** Even though voters said she had won the debate, the race did not change in my polling. And, by the way, that was the reason not to do anymore. What were we going to gain? + +**Ok, but let’s be honest. He was tempted to do a second debate, wasn’t he?** + +**Fabrizio:** I mean, he’s always tempted. + +**How close did he come, Chris?** + +**LaCivita:** He didn’t. Never. + +**You guys knew that giving her a second debate was just an opportunity for her to tell her story?** + +**Fabrizio:** Why would we give her the chance? What are you going to tell people about Donald Trump they don’t already know by then? + +**Was there anything you guys were expecting her to do — that you were waiting for her to do — that she never did?** + +**Fabrizio:** Yes. Stick to a single fricking message. Find a message and ride it. + +**LaCivita:** You have to remember, she spent the better part of the summer, the late summer after she was coronated, running ads about who she is, trying to define herself. And we were laying the wood to her. We were already defined. + +And I was telling people from our standpoint, she is a blank canvas and we’re holding a bucket of paint. And we started throwing the paint on the canvas very early, defining her as dangerously liberal, out of touch. + +And then they shifted their messaging to trying to attack Trump. It didn’t work. And it was all on the abortion topic. They threw that out there for a week — then they just kept on cycling stuff in and out, in and out. We were focused. We prosecuted four weeks of crime stuff. Then we moved to economics. And we stayed on economics all the way through, with the exception of introducing the trans ad. + +**What did you guys think in October when she starts talking about John Kelly?** + +**LaCivita:** Old news. + +**Fabrizio:** If this is what they’re closing on, we win. + +In fact, when she went to Nazi and J6, all that other stuff, one of our things is our goal was to get him *not* to engage with that. Because they’re trying to goad him into closing out that way instead of the way we wanted to close. + +**Did you find it easier this time around, Tony, to get Trump to respond to those kinds of pleas?** + +**Fabrizio:** Than ’16 or ’20? Absolutely, absolutely. + +**LaCivita:** You don’t run for president three times and be president and not learn something. + +**And he had a level of faith in you guys.** + +**LaCivita:** 100 percent, he did. + +**Fabrizio:** That doesn’t mean he doesn’t push back. + +**LaCivita:** Correct. But he did have a level of confidence with his campaign team. + +**He wanted to do the rally at Madison Square Garden. But was he pissed afterwards about some of the speakers that were there?** + +**LaCivita:** I won’t say he was livid, but he was aggravated. + +**Fabrizio:** Unforced error. And by the way, our reaction to it — I mean, obviously we weren’t happy that it happened — but it was like, yeah … + +**LaCivita:** We’re going to put out a one-line statement. And that’s it. Move on. + +**Fabrizio:** And the media just made — + +**And that was a Monday and then Biden’s garbage comment was Wednesday.** + +**LaCivita:** Saved it. + +**Biden saved the news cycle?** + +**LaCivita:** Yeah. + +**Let’s talk about Trump as a cultural phenomenon because I think of two things. The McDonald’s drive-through and the garbage truck, both things that broke into the pop culture conversation, even beyond our world. Could any other candidate do that?** + +**Fabrizio:** MMA fights. Joe Rogan. We think of them as very specific things, but the symbolism — It says something about him that she couldn’t capture. + +Where she’s doing the big speech or having the big debate, the conventional warfare, traditional campaign tactics. Donald Trump goes to the McDonald’s drive-through. But in the year 2024, when we’re all living on our phones, a big speech at the Ellipse vs. Trump at the drive-through, which is going to break through? + +**LaCivita:** Donald Trump is a man who has made a large part of his living in a visual medium: TV. He understands that politics is a visual medium. And so he looks at everything through the prism of that. And your average candidate for public office doesn’t look at the world that way. + +**He’s also a celebrity.** + +**LaCivita:** Defined outside the realm of politics. He has his own persona and definition outside of politics. + +**And because of that, some of the stuff he says …** + +**LaCivita:** He gets away with, he does. + +**He’s not graded as a politician. He’s graded as a celebrity.** + +**Fabrizio:** I know this is going to sound counterintuitive, but when he says stuff that makes people go — *(grimaces)* — it only reinforces that … + +**LaCivita:** … He’s not a politician, exactly! + +**But there’s some stuff that he says, that you guys don’t necessarily like. For example, calling Elaine Chao “Chow Chow” or Youngkin sounded like an Asian name. Were there times where you were able to steer him away from saying that kind of stuff?** + +**Fabrizio:** I would say so, on the plane, there were times, yeah. + +**LaCivita:** We had conversations. And he moved away from the Elaine stuff. + +**There were moments on the plane where he wanted to say something and he runs it by you and you guys were like ehhhh maybe no?** + +**LaCivita:** Yeah. And I’ll tell you the one time I didn’t was flying into Georgia \[in August\] when \[Trump attacked Gov.\] Brian Kemp. He said: “You know, if I do this, it’s going to make news.” I said: “Yeah, it’s not a big deal.” + +**Why didn’t you steer him away from doing that?** + +**LaCivita:** I misread the moment. + +**You regret that?** + +**LaCivita:** 100 percent. + +**It caused a headache for you.** + +**Fabrizio:** It turned out alright. + +**LaCivita:** It was fine. In fact, when they made up, it was even better. But the next morning, I was banging my head against the wall. It was a missed opportunity. + +**Were there other moments that you guys regret?** + +**Fabrizio:** I mean obviously having the comedian on the \[Madison Square Garden\] stage. It creates a distraction. And again, we were trying to play error-free ball for the last couple of weeks because we felt pretty good about where we were. I don’t mean to sound like we were measuring drapes, in fact if anybody did that we would jump all fucking over them and say: “We haven’t won anything yet!” + +**What was the most sobering moment after the assassination?** + +**LaCivita:** We were at dinner at Bedminister, probably a week after it happened. He’s talking about it, I’m dumbfounded, almost speechless dumbfounded, and I was trying to say to him: “I’m so sorry.” He’s like: “You believe it?! It went, zoom…" + +**Fabrizio:** “Quarter of an inch, quarter of an inch.” + +**LaCivita:** He’s not one to invoke God in conversation, but he made it very clear … + +**Fabrizio:** Divine intervention. + +**Did you ever have a survey showing Trump down in any of the three Blue Wall states?** + +**Fabrizio:** Yes. + +**Wisconsin?** + +**Fabrizio:** Wisconsin and Michigan. + +**When?** + +**Fabrizio:** August. + +**But never after Labor Day?** + +**Fabrizio:** Ehhh, It varied. There would be variations. We would be up one, we would be down one. But then it got to the point where we went ahead and we stayed consistently ahead. Not by much, but consistently. + +**When was that point?** + +**Fabrizio:** October. + +**Was there data in crosstabs that either gave you reassurance or concern throughout the whole campaign? Like was there one demographic or one piece of that that you felt reliably as a tell?** + +**Fabrizio:** Yes. You’re going to laugh when I tell you this. What our performance was relative to the recall of 2020 vote. And in every survey, we were overperforming recalled performance. + +There were people who voted third party in 2020 and there were people who didn’t vote in 2020, and they broke our way in 2024. And by the way, that spills into a lot of different things. But we would watch, how are we doing with Hispanics, how are we doing with Hispanic men. We knew consistently, we were getting the same number. Once the switch occurred, those numbers kind of settled down. And we knew we were going to break a record with Black men. We knew we were going to break a record with Hispanics. All of these things we knew. It was just a function of what it was going to be. + +**What do you think Susie meant to the campaign broadly, but also the candidate himself?** + +**LaCivita:** Stability. + +**Fabrizio:** Trust. + +**LaCivita:** He trusts her. Because people tried to drive a wedge and create distrust but all it did was reinforce her position. + +**So, on the timeline, you guys thought Biden’s going to fend this off. He’s going to hang in there. So when Biden drops …** + +**LaCivita:** But it doesn’t mean that we weren’t prepared for, because we really were. We had the oppo. We had the audio. We had the video. Libraries with everything ready. And by the way, going into the \[GOP\] convention, signage, video, all that stuff was ready. + +**Fabrizio:** If they pulled the switch before the convention, we were ready. We had separate speeches written at that time. + +**Do you remember finding that 2019 ACLU video where she’s talking about trans prisoners?** + +**Fabrizio:** Actually, the guy who found it, Alex Pfeiffer. He came to me with it and he goes: “What do you think about this?” And I looked at it and said “Do we have any other backup on this? Somebody’s gotta write it.” He goes: “I think I got CNN interested in it.” He comes back and shows us the thing and then we gave it to the ad guy — in less than 24 hours, we had the script. And what’d you make, one change to the script? + +**LaCivita:** Yeah. Because he said “Donald Trump’s for you, she’s for they/them.” I said flip it. “Kamala Harris is for they/them, Donald Trump is for you.” That was the only change I made. + +**Who wrote it?** + +**Fabrizio:** A guy named Pat McCarthy. + +**What did Trump think personally of Biden as an opponent?** + +**LaCivita:** I don’t think he had any respect at all. + +**Fabrizio:** I think he did a lousy job as president. + +**Did he talk about his age at all?** + +**LaCivita:** He would say he’s cognitively impaired. He said it all the fucking time. + +**But did he say something along the lines of “Joe’s really gone down hill the last few years?”** + +**LaCivita:** I’ve heard him say things like that. + +**What did he think of Kamala Harris as an opponent?** + +**LaCivita:** Not very bright. + +**He just didn’t think she was that formidable. But stronger than Biden?** + +**Fabrizio:** I don’t know about that. I think different than Biden. + +**How so?** + +**LaCivita:** Her numbers were going to improve. The Democrat numbers were going to improve because they had someone with a pulse. + +**That was his view?** + +**LaCivita:** Yeah. + +**And your polling showed that?** + +**LaCivita:** Yeah, she consolidated her base. + +**Is there one big thing that you think we’re missing in this campaign that was enormously consequential or at least significant?** + +**LaCivita:** You guys have written about the impact of the assassination attempt. But I don’t think people give enough credit to the fact that the world has a visual. It’s an iconic visual. But I don’t think people have given enough credit to that visual. + +**Him holding up his fist.** + +**LaCivita:** And what that visual means. And what the visual conveys. Not only about him, but the country as a whole. Americans get knocked down, but they always fight back. And that visual is as quintessential America as the fucking flag is. + +**Fabrizio:** I am always amazed, I’ve learned not to be amazed, but he has this ability in most cases to put his finger on something. And you say to yourself: “Where did he come up with that?” But he just does. Then you test it and, holy shit, he’s right. + +*Benjamin Johansen contributed to this report.* + +  +  + +--- +`$= dv.el('center', 'Source: ' + dv.current().Link + ', ' + dv.current().Date.toLocaleString("fr-FR"))` \ No newline at end of file diff --git a/01.01 Life Orga/@Finances.md b/01.01 Life Orga/@Finances.md index faff385c..9b279688 100644 --- a/01.01 Life Orga/@Finances.md +++ b/01.01 Life Orga/@Finances.md @@ -111,7 +111,8 @@ hide task count   - [ ] :moneybag: [[@Finances]]: Transfer UK pension to CH %%done_del%% 🔁 every year 📅 2025-10-31 -- [ ] :heavy_dollar_sign: [[@Finances|Finances]]: Close yearly accounts %%done_del%% 🔁 every year 📅 2025-01-07 +- [ ] :heavy_dollar_sign: [[@Finances|Finances]]: Close yearly accounts %%done_del%% 🔁 every year 📅 2026-01-07 +- [x] :heavy_dollar_sign: [[@Finances|Finances]]: Close yearly accounts %%done_del%% 🔁 every year 📅 2025-01-07 ✅ 2025-01-05 - [ ] :heavy_dollar_sign: [[@Finances|Finances]]: Swiss tax self declaration %%done_del%% 🔁 every year 📅 2025-04-29   diff --git a/01.01 Life Orga/@Life Admin.md b/01.01 Life Orga/@Life Admin.md index d2be57cf..43825d7d 100644 --- a/01.01 Life Orga/@Life Admin.md +++ b/01.01 Life Orga/@Life Admin.md @@ -141,7 +141,8 @@ style: number   -- [ ] :confetti_ball: :crown: [[@Life Admin|Life Admin]]: Epiphanie ([[Galette des rois]]) %%done_del%% 🔁every year 📅2025-01-06 +- [ ] :confetti_ball: :crown: [[@Life Admin|Life Admin]]: Epiphanie ([[Galette des rois]]) %%done_del%% 🔁 every year 📅 2026-01-06 +- [x] :confetti_ball: :crown: [[@Life Admin|Life Admin]]: Epiphanie ([[Galette des rois]]) %%done_del%% 🔁 every year 📅 2025-01-06 ✅ 2025-01-03 - [ ] :confetti_ball: :love_letter: [[@Life Admin|Life Admin]]: Saint Valentin %%done_del%% 🔁 every year 📅 2025-02-14 - [x] :confetti_ball: :love_letter: [[@Life Admin|Life Admin]]: Saint Valentin %%done_del%% 🔁 every year 📅 2024-02-14 ✅ 2024-02-14 - [ ] :confetti_ball: :mother_christmas: [[@Life Admin|Life Admin]]: Saint Nicolas %%done_del%% 🔁 every year 📅 2025-12-06 diff --git a/01.02 Home/Fashion.md b/01.02 Home/Fashion.md index 5cc43e6a..7375cac6 100644 --- a/01.02 Home/Fashion.md +++ b/01.02 Home/Fashion.md @@ -62,6 +62,17 @@ style: number Missègle + +```cardlink +url: https://www.dilling.fr/ +title: "Sous-vêtements bio à partir de matières naturelles, conçus au Danemark" +description: "Vêtements durables, doux et agréables sur la peau et biologiques, fabriqués à partir de matériaux naturels tels que la laine mérinos et le coton. Le coton biologique est cultivé sans engrais chimique ni pesticides. Achetez en ligne directement auprès du fabricant DILLING. Trouvez des sous-vêtements bio pour toute la famille, des vêtements d'extérieur et des vêtements d'intérieur conçus pour être portés près de la peau." +host: www.dilling.fr +favicon: https://www.dilling.fr/favicon.ico +image: https://res.cloudinary.com/dilling/image/upload/w_1200,h_630,f_auto,c_fill,g_auto,q_auto:eco/Home%20page%2FSkiing_Loen10_bred +``` + +   ##### Chausseur diff --git a/01.02 Home/Household.md b/01.02 Home/Household.md index 99046c5a..2526ee75 100644 --- a/01.02 Home/Household.md +++ b/01.02 Home/Household.md @@ -73,10 +73,12 @@ style: number #### 🚮 Garbage collection -- [ ] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2025-01-14 +- [ ] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2025-01-28 +- [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2025-01-14 ✅ 2025-01-14 - [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2024-12-31 ✅ 2024-12-30 - [x] ♻ [[Household]]: *Paper* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2024-12-17 ✅ 2024-12-17 -- [ ] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2025-01-07 +- [ ] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2025-01-21 +- [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2025-01-07 ✅ 2025-01-05 - [x] ♻ [[Household]]: *Cardboard* recycling collection %%done_del%% 🔁 every 2 weeks on Tuesday 📅 2024-12-24 ✅ 2024-12-23   @@ -85,7 +87,8 @@ style: number - [ ] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2025-01-31 - [x] 🛎️ :house: [[Household]]: Pay rent %%done_del%% 🔁 every month on the last 📅 2024-12-31 ✅ 2024-12-30 -- [ ] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every 2 weeks 📅 2025-01-13 +- [ ] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every 2 weeks 📅 2025-01-27 +- [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every 2 weeks 📅 2025-01-13 ✅ 2025-01-10 - [x] 🛎 🧻 REMINDER [[Household]]: check need for toilet paper %%done_del%% 🔁 every 2 weeks 📅 2024-12-30 ✅ 2024-12-30   diff --git a/01.03 Family/Jérôme Bédier.md b/01.03 Family/Jérôme Bédier.md index b247662b..5be62b96 100644 --- a/01.03 Family/Jérôme Bédier.md +++ b/01.03 Family/Jérôme Bédier.md @@ -103,7 +103,8 @@ style: number   -- [ ] :birthday: **[[Jérôme Bédier|Jérôme]]** %%done_del%% 🔁 every year 📅 2025-01-14 +- [ ] :birthday: **[[Jérôme Bédier|Jérôme]]** %%done_del%% 🔁 every year 📅 2026-01-14 +- [x] :birthday: **[[Jérôme Bédier|Jérôme]]** %%done_del%% 🔁 every year 📅 2025-01-14 ✅ 2025-01-14 - [x] :birthday: **[[Jérôme Bédier|Jérôme]]** %%done_del%% 🔁 every year 📅 2024-01-14 ✅ 2024-01-14 - [x] :birthday: **[[Jérôme Bédier|Jérôme]]** %%done_del%% 🔁 every year 📅 2023-01-14 ✅ 2023-01-14 - [x] :birthday: **[[Jérôme Bédier|Jérôme]]** 🔁 every year 📅 2022-01-14 ✅ 2022-01-14 diff --git a/01.04 Partner/Davinie.md b/01.04 Partner/Davinie.md index 3fccdfae..e4c3e29d 100644 --- a/01.04 Partner/Davinie.md +++ b/01.04 Partner/Davinie.md @@ -1,6 +1,6 @@ --- -Alias: ["Dav"] +Alias: ["Dav", "Poupi"] Tag: ["❤️"] Date: 2024-10-31 DocType: Confidential diff --git a/01.06 Health/2024-06-29 Fungal treatment.md b/01.06 Health/2024-06-29 Fungal treatment.md index dc512bb6..8c364f3b 100644 --- a/01.06 Health/2024-06-29 Fungal treatment.md +++ b/01.06 Health/2024-06-29 Fungal treatment.md @@ -56,7 +56,19 @@ Fungal treatment started on [[2024-06-29|29th June]].   -- [ ] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-04 +- [ ] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-16 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-15 ✅ 2025-01-15 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-14 ✅ 2025-01-14 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-13 ✅ 2025-01-13 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-12 ✅ 2025-01-11 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-11 ✅ 2025-01-11 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-10 ✅ 2025-01-10 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-09 ✅ 2025-01-09 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-08 ✅ 2025-01-08 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-07 ✅ 2025-01-07 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-06 ✅ 2025-01-06 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-05 ✅ 2025-01-05 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-04 ✅ 2025-01-04 - [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-03 ✅ 2025-01-03 - [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-02 ✅ 2025-01-02 - [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2025-01-01 ✅ 2025-01-01 @@ -97,7 +109,11 @@ Fungal treatment started on [[2024-06-29|29th June]]. - [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2024-11-27 ✅ 2024-11-27 - [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2024-11-26 ✅ 2024-11-26 - [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Take the pill %%done_del%% 🔁 every day 📅 2024-11-25 ✅ 2024-11-25 -- [ ] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Nail lack %%done_del%% 🔁 every 3 days when done 📅 2025-01-04 +- [ ] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Nail lack %%done_del%% 🔁 every 3 days when done 📅 2025-01-17 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Nail lack %%done_del%% 🔁 every 3 days when done 📅 2025-01-14 ✅ 2025-01-14 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Nail lack %%done_del%% 🔁 every 3 days when done 📅 2025-01-10 ✅ 2025-01-11 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Nail lack %%done_del%% 🔁 every 3 days when done 📅 2025-01-07 ✅ 2025-01-07 +- [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Nail lack %%done_del%% 🔁 every 3 days when done 📅 2025-01-04 ✅ 2025-01-04 - [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Nail lack %%done_del%% 🔁 every 3 days when done 📅 2025-01-01 ✅ 2025-01-01 - [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Nail lack %%done_del%% 🔁 every 3 days when done 📅 2024-12-29 ✅ 2024-12-29 - [x] :test_pharmacie_logo_svg_vector: [[2024-06-29 Fungal treatment|Fungus]]: Nail lack %%done_del%% 🔁 every 3 days when done 📅 2024-12-26 ✅ 2024-12-26 diff --git a/01.07 Animals/2023-07-13 Health check.md b/01.07 Animals/2023-07-13 Health check.md index 5fbe889a..2b5492d0 100644 --- a/01.07 Animals/2023-07-13 Health check.md +++ b/01.07 Animals/2023-07-13 Health check.md @@ -51,7 +51,8 @@ style: number [[2023-07-13|This day]], ripped hoof (front right) is healing well –> On track to heal fully by the end of the Summer season -- [ ] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing %%done_del%% 🔁 every month 📅 2025-01-10 +- [ ] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing %%done_del%% 🔁 every month 📅 2025-02-10 +- [x] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing %%done_del%% 🔁 every month 📅 2025-01-10 ✅ 2025-01-10 - [x] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing %%done_del%% 🔁 every month 📅 2024-12-10 ✅ 2024-12-09 - [x] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing %%done_del%% 🔁 every month 📅 2024-11-10 ✅ 2024-11-09 - [x] :racehorse: [[@Sally|Sally]], [[2023-07-13 Health check|Note]]: Check front hoofs healing %%done_del%% 🔁 every month 📅 2024-10-10 ✅ 2024-10-10 diff --git a/01.07 Animals/@Ambar.md b/01.07 Animals/@Ambar.md index aef191e5..8cb2916c 100644 --- a/01.07 Animals/@Ambar.md +++ b/01.07 Animals/@Ambar.md @@ -133,5 +133,6 @@ divWidth=100 - [ ] :racehorse: [[@Ambar|Ambar]]: Vet check %%done_del%% 🔁 every 6 months 📅 2025-03-30 - [ ] :racehorse: [[@Ambar|Ambar]]: EHV-1 vaccination dose %%done_del%% 🔁 every year 📅 2025-01-31 - [ ] :racehorse: [[@Ambar|Ambar]]: Influenza vaccination dose %%done_del%% 🔁 every year 📅 2025-01-31 -- [ ] :racehorse: [[@Ambar|Ambar]]: Pay for horseshoes (150 CHF) %%done_del%% 🔁 every month 📅 2025-01-10 +- [ ] :racehorse: [[@Ambar|Ambar]]: Pay for horseshoes (150 CHF) %%done_del%% 🔁 every month 📅 2025-02-10 +- [x] :racehorse: [[@Ambar|Ambar]]: Pay for horseshoes (150 CHF) %%done_del%% 🔁 every month 📅 2025-01-10 ✅ 2025-01-10 - [x] :racehorse: [[@Ambar|Ambar]]: Pay for horseshoes (150 CHF) %%done_del%% 🔁 every month 📅 2024-12-10 ✅ 2024-12-09 diff --git a/01.07 Animals/@Sally.md b/01.07 Animals/@Sally.md index f6e050e3..b4835200 100644 --- a/01.07 Animals/@Sally.md +++ b/01.07 Animals/@Sally.md @@ -137,5 +137,6 @@ divWidth=100 - [ ] :racehorse: [[@Sally|Sally]]: Vet check %%done_del%% 🔁 every 6 months 📅 2025-03-30 - [ ] :racehorse: [[@Sally|Sally]]: EHV-1 vaccination dose %%done_del%% 🔁 every year 📅 2025-01-31 - [ ] :racehorse: [[@Sally|Sally]]: Influenza vaccination dose %%done_del%% 🔁 every year 📅 2025-01-31 -- [ ] :racehorse: [[@Sally|Sally]]: Pay for horseshoes (150 CHF) %%done_del%% 🔁 every month 📅 2025-01-10 +- [ ] :racehorse: [[@Sally|Sally]]: Pay for horseshoes (150 CHF) %%done_del%% 🔁 every month 📅 2025-02-10 +- [x] :racehorse: [[@Sally|Sally]]: Pay for horseshoes (150 CHF) %%done_del%% 🔁 every month 📅 2025-01-10 ✅ 2025-01-10 - [x] :racehorse: [[@Sally|Sally]]: Pay for horseshoes (150 CHF) %%done_del%% 🔁 every month 📅 2024-12-10 ✅ 2024-12-09 \ No newline at end of file diff --git a/03.04 Cinematheque/Speed (1994).md b/03.04 Cinematheque/Speed (1994).md new file mode 100644 index 00000000..ef4ad4d7 --- /dev/null +++ b/03.04 Cinematheque/Speed (1994).md @@ -0,0 +1,104 @@ +--- + +type: movie +title: Speed +englishTitle: Speed +year: "1994" +dataSource: OMDbAPI +url: https://www.imdb.com/title/tt0111257/ +id: tt0111257 +plot: "A young police officer must prevent a bomb exploding aboard a city bus by keeping its speed above 50 mph." +genres: + - Action + - Adventure + - Thriller +director: + - Jan de Bont +writer: + - Graham Yost +studio: + - N/A +duration: 116 min +onlineRating: 7.3 +actors: + - Keanu Reeves + - Dennis Hopper + - Sandra Bullock +image: https://m.media-amazon.com/images/M/MV5BMDc2ODI5YWQtMmM2ZS00MTdmLWEyNWEtNmRmOGE5NGZlYWMzXkEyXkFqcGc@._V1_SX300.jpg +released: true +streamingServices: [] +premiere: 10/06/1994 +watched: true +lastWatched: "[[2025-01-03]]" +personalRating: 7.5 +tags: mediaDB/tv/movie + +--- + +Parent:: [[@Cinematheque]] + +--- + +```dataviewjs +dv.paragraph(`> [!${dv.current().watched ? 'SUCCESS' : 'WARNING'}] ${dv.current().watched ? 'last watched on ' + dv.current().lastWatched : 'not yet watched'}`) +``` + +  + +# `$= dv.current().title` + +  + +`$= dv.current().watched ? '**Rating**: ' + dv.current().personalRating + ' out of 10' : ''` + +```toc +``` + +  + +### Details + +  + +**Genres**: +`$= dv.current().genres.length === 0 ? ' - none' : dv.list(dv.current().genres)` + +`$= !dv.current().released ? '**Not released** The movie is not yet released.' : ''` + +  + +```dataview +list without id + "" + + + "" ++ + "" + + + "" + + + "" + + + "" + + + "" + + + "" + + + "" + + + "
Type" + this.type + "
Online Rating" + this.onlineRating + "
Duration" + this.duration + "
Premiered" + this.premiere + "
Producer" + this.producer + "
" +FROM "03.04 Cinematheque/Speed (1994)" +``` + +  + +--- + +  + +### Poster + +  + +`$= '![Image|360](' + dv.current().image + ')'` \ No newline at end of file diff --git a/03.04 Cinematheque/The Godfather (1972).md b/03.04 Cinematheque/The Godfather (1972).md index b4152a92..c25963ee 100644 --- a/03.04 Cinematheque/The Godfather (1972).md +++ b/03.04 Cinematheque/The Godfather (1972).md @@ -17,7 +17,7 @@ released: true premiere: "24/03/1972" watched: true lastWatched: "[[2007-11-23]]" -personalRating: 8.5 +personalRating: 9 CollapseMetaTable: true --- diff --git a/03.04 Cinematheque/The Shining (1980).md b/03.04 Cinematheque/The Shining (1980).md new file mode 100644 index 00000000..c5c4f9d2 --- /dev/null +++ b/03.04 Cinematheque/The Shining (1980).md @@ -0,0 +1,105 @@ +--- + +type: movie +title: The Shining +englishTitle: The Shining +year: "1980" +dataSource: OMDbAPI +url: https://www.imdb.com/title/tt0081505/ +id: tt0081505 +plot: A family heads to an isolated hotel for the winter, where a sinister presence influences the father into violence. At the same time, his psychic son sees horrifying forebodings from both the past and the future. +genres: + - Drama + - Horror +director: + - Stanley Kubrick +writer: + - Stephen King + - Stanley Kubrick + - Diane Johnson +studio: + - N/A +duration: 146 min +onlineRating: 8.4 +actors: + - Jack Nicholson + - Shelley Duvall + - Danny Lloyd +image: https://m.media-amazon.com/images/M/MV5BNmM5ZThhY2ItOGRjOS00NzZiLWEwYTItNDgyMjFkOTgxMmRiXkEyXkFqcGc@._V1_SX300.jpg +released: true +streamingServices: [] +premiere: 13/06/1980 +watched: true +lastWatched: "[[2025-01-04]]" +personalRating: 8 +tags: mediaDB/tv/movie + +--- + +Parent:: [[@Cinematheque]] + +--- + +```dataviewjs +dv.paragraph(`> [!${dv.current().watched ? 'SUCCESS' : 'WARNING'}] ${dv.current().watched ? 'last watched on ' + dv.current().lastWatched : 'not yet watched'}`) +``` + +  + +# `$= dv.current().title` + +  + +`$= dv.current().watched ? '**Rating**: ' + dv.current().personalRating + ' out of 10' : ''` + +```toc +``` + +  + +### Details + +  + +**Genres**: +`$= dv.current().genres.length === 0 ? ' - none' : dv.list(dv.current().genres)` + +`$= !dv.current().released ? '**Not released** The movie is not yet released.' : ''` + +  + +```dataview +list without id + "" + + + "" ++ + "" + + + "" + + + "" + + + "" + + + "" + + + "" + + + "" + + + "
Type" + this.type + "
Online Rating" + this.onlineRating + "
Duration" + this.duration + "
Premiered" + this.premiere + "
Producer" + this.producer + "
" +FROM "03.04 Cinematheque/The Shining (1980)" +``` + +  + +--- + +  + +### Poster + +  + +`$= '![Image|360](' + dv.current().image + ')'` \ No newline at end of file diff --git a/05.01 Computer setup/Storage and Syncing.md b/05.01 Computer setup/Storage and Syncing.md index e40ffb54..277d3fe7 100644 --- a/05.01 Computer setup/Storage and Syncing.md +++ b/05.01 Computer setup/Storage and Syncing.md @@ -175,16 +175,19 @@ The following Apps require a manual backup: - [ ] :coin: Backup [[Storage and Syncing#Instructions for Anchor|Anchor Wallet]] %%done_del%% 🔁 every 3 months on the 1st Thursday 📅 2025-04-03 - [x] :coin: Backup [[Storage and Syncing#Instructions for Anchor|Anchor Wallet]] %%done_del%% 🔁 every 3 months on the 1st Thursday 📅 2025-01-02 ✅ 2025-01-02 - [x] :coin: Backup [[Storage and Syncing#Instructions for Anchor|Anchor Wallet]] %%done_del%% 🔁 every 3 months on the 1st Thursday 📅 2024-10-03 ✅ 2024-10-03 -- [ ] :iphone: Backup [[Storage and Syncing#Instructions for iPhone|iPhone]] %%done_del%% 🔁 every 3 months on the 2nd Tuesday 📅 2025-01-14 +- [ ] :iphone: Backup [[Storage and Syncing#Instructions for iPhone|iPhone]] %%done_del%% 🔁 every 3 months on the 2nd Tuesday 📅 2025-04-08 +- [x] :iphone: Backup [[Storage and Syncing#Instructions for iPhone|iPhone]] %%done_del%% 🔁 every 3 months on the 2nd Tuesday 📅 2025-01-14 ✅ 2025-01-14 - [x] :iphone: Backup [[Storage and Syncing#Instructions for iPhone|iPhone]] %%done_del%% 🔁 every 3 months on the 2nd Tuesday 📅 2024-10-08 ✅ 2024-10-08 - [ ] :iphone: Backup [[Storage and Syncing|news for previous year]] %%done_del%% 🔁 every year 📅 2025-01-15 -- [ ] :floppy_disk: Backup [[Storage and Syncing#Instructions for FV|Folder Vault]] %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2025-01-03 +- [ ] :floppy_disk: Backup [[Storage and Syncing#Instructions for FV|Folder Vault]] %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2025-04-04 +- [x] :floppy_disk: Backup [[Storage and Syncing#Instructions for FV|Folder Vault]] %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2025-01-03 ✅ 2025-01-03 - [x] :floppy_disk: Backup [[Storage and Syncing#Instructions for FV|Folder Vault]] %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2024-10-04 ✅ 2024-10-04 - [ ] :cloud: [[Storage and Syncing|Storage & Sync]]: Backup Volumes to [[Sync|Sync.com]] %%done_del%% 🔁 every 3 months on the 2nd Monday 📅 2025-03-10 - [x] :cloud: [[Storage and Syncing|Storage & Sync]]: Backup Volumes to [[Sync|Sync.com]] %%done_del%% 🔁 every 3 months on the 2nd Monday 📅 2024-12-09 ✅ 2024-12-09 - [x] :cloud: [[Storage and Syncing|Storage & Sync]]: Backup Volumes to [[Sync|Sync.com]] %%done_del%% 🔁 every 3 months on the 2nd Monday 📅 2024-09-09 ✅ 2024-09-09 - [x] :cloud: [[Storage and Syncing|Storage & Sync]]: Backup Volumes to [[Sync|Sync.com]] %%done_del%% 🔁 every 3 months on the 2nd Monday 📅 2024-06-10 ✅ 2024-07-16 -- [ ] :camera: [[Storage and Syncing|Storage & Sync]]: Transfer pictures to ED %%done_del%% 🔁 every 3 months on the 2nd Thursday 📅 2025-01-09 +- [ ] :camera: [[Storage and Syncing|Storage & Sync]]: Transfer pictures to ED %%done_del%% 🔁 every 3 months on the 2nd Thursday 📅 2025-04-10 +- [x] :camera: [[Storage and Syncing|Storage & Sync]]: Transfer pictures to ED %%done_del%% 🔁 every 3 months on the 2nd Thursday 📅 2025-01-09 ✅ 2025-01-11 - [x] :camera: [[Storage and Syncing|Storage & Sync]]: Transfer pictures to ED %%done_del%% 🔁 every 3 months on the 2nd Thursday 📅 2024-10-10 ✅ 2024-10-15   diff --git a/05.02 Networks/Configuring UFW.md b/05.02 Networks/Configuring UFW.md index e8f4c961..1f49618e 100644 --- a/05.02 Networks/Configuring UFW.md +++ b/05.02 Networks/Configuring UFW.md @@ -265,14 +265,18 @@ sudo bash /etc/addip4ban/addip4ban.sh #### Ban List Tasks -- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2025-01-04 +- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2025-01-18 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2025-01-11 ✅ 2025-01-10 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2025-01-04 ✅ 2025-01-03 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-12-28 ✅ 2024-12-28 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-12-21 ✅ 2024-12-21 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-12-14 ✅ 2024-12-13 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-12-07 ✅ 2024-12-09 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-11-30 ✅ 2024-11-29 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]] Get IP addresses caught by Postfix %%done_del%% 🔁 every week on Saturday 📅 2024-11-23 ✅ 2024-11-23 -- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2025-01-04 +- [ ] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2025-01-18 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2025-01-11 ✅ 2025-01-10 +- [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2025-01-04 ✅ 2025-01-03 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2024-12-28 ✅ 2024-12-28 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2024-12-21 ✅ 2024-12-21 - [x] 🖥 [[Selfhosting]], [[Configuring UFW|Firewall]]: Update the Blocked IP list %%done_del%% 🔁 every month on Saturday 📅 2024-12-14 ✅ 2024-12-13 diff --git a/05.02 Networks/Selfhosting.md b/05.02 Networks/Selfhosting.md index 351246cd..f78d9873 100644 --- a/05.02 Networks/Selfhosting.md +++ b/05.02 Networks/Selfhosting.md @@ -300,7 +300,8 @@ Database: MySQL, MariaDB, Postgres   -- [ ] :desktop_computer: [[Selfhosting|Self hosting]]: Check log activity for all servers %%done_del%% 🔁 every 2 weeks 📅 2025-01-07 +- [ ] :desktop_computer: [[Selfhosting|Self hosting]]: Check log activity for all servers %%done_del%% 🔁 every 2 weeks 📅 2025-01-21 +- [x] :desktop_computer: [[Selfhosting|Self hosting]]: Check log activity for all servers %%done_del%% 🔁 every 2 weeks 📅 2025-01-07 ✅ 2025-01-07 - [x] :desktop_computer: [[Selfhosting|Self hosting]]: Check log activity for all servers %%done_del%% 🔁 every 2 weeks 📅 2024-12-24 ✅ 2024-12-24 - [x] :desktop_computer: [[Selfhosting|Self hosting]]: Check log activity for all servers %%done_del%% 🔁 every 2 weeks 📅 2024-12-10 ✅ 2024-12-10 - [x] :desktop_computer: [[Selfhosting|Self hosting]]: Check log activity for all servers %%done_del%% 🔁 every 2 weeks 📅 2024-11-26 ✅ 2024-11-26 diff --git a/06.01 Finances/2024.ledger b/06.01 Finances/2024.ledger index 772679a2..20cd1765 100644 --- a/06.01 Finances/2024.ledger +++ b/06.01 Finances/2024.ledger @@ -3291,4 +3291,84 @@ alias i=income 2025/01/03 Coffee expenses:Food:CHF CHF6.00 + liability:CreditCard:CHF + +2025/01/04 Bakery + expenses:Food:CHF CHF3.90 + liability:CreditCard:CHF + +2025/01/04 Migros + expenses:Food:CHF CHF14.45 + liability:CreditCard:CHF + +2025/01/05 Lunch at airport + expenses:Food:CHF CHF23.20 + liability:CreditCard:CHF + +2025/01/05 Airport shuttle + expenses:Travel:GBP CHF6.70 + liability:CreditCard:CHF + +2025/01/05 Oyster card + expenses:Travel:GBP CHF27.00 + liability:CreditCard:CHF + +2025/01/05 Dej + expenses:Food:GBP CHF47.21 + liability:CreditCard:CHF + +2025/01/05 Airport shuttle + expenses:Travel:CHF CHF7.00 + liability:CreditCard:CHF + +2025/01/07 Coffee + expenses:Food:GBP CHF6.70 + liability:CreditCard:CHF + +2025/01/08 Bao + expenses:Food:GBP CHF25.00 + liability:CreditCard:CHF + +2025/01/11 Pain + expenses:Food:CHF CHF5.30 + liability:CreditCard:CHF + +2025/01/11 Migros + expenses:Food:CHF CHF42.35 + liability:CreditCard:CHF + +2025/01/10 Takeaway + expenses:Food:CHF CHF44.20 + liability:CreditCard:CHF + +2025/01/10 CHF to CHF + expenses:Travel:CHF CHF7.00 + liability:CreditCard:CHF + +2025/01/13 Migros + expenses:Food:CHF CHF14.55 + liability:CreditCard:CHF + +2025/01/12 Flumserberg day pass + expenses:Sport:CHF CHF72.00 + liability:CreditCard:CHF + +2025/01/11 Rucksack + expenses:Sport:CHF CHF69.90 + liability:CreditCard:CHF + +2025/01/14 Coffee + expenses:Food:CHF CHF6.00 + liability:CreditCard:CHF + +2025/01/14 SBB + expenses:Travel:CHF CHF4.60 + liability:CreditCard:CHF + +2025/01/14 Coop + expenses:Food:CHF CHF4.95 + liability:CreditCard:CHF + +2025/01/14 Uber Eats + expenses:Food:CHF CHF32.74 liability:CreditCard:CHF \ No newline at end of file diff --git a/06.01 Finances/hLedger.md b/06.01 Finances/hLedger.md index 0c1480e9..57403bd2 100644 --- a/06.01 Finances/hLedger.md +++ b/06.01 Finances/hLedger.md @@ -425,7 +425,8 @@ title: To explore - [x] :heavy_dollar_sign: [[hLedger]]: Update Price file %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2023-10-06 ✅ 2023-10-06 - [x] :heavy_dollar_sign: [[hLedger]]: Update Price file %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2023-07-07 ✅ 2023-07-07 - [x] :heavy_dollar_sign: [[hLedger]]: Update Price file %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2023-04-07 ✅ 2023-04-07 -- [ ] :heavy_dollar_sign: [[hLedger]]: Update current ledger %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2025-01-03 +- [ ] :heavy_dollar_sign: [[hLedger]]: Update current ledger %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2025-04-04 +- [x] :heavy_dollar_sign: [[hLedger]]: Update current ledger %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2025-01-03 ✅ 2025-01-03 - [x] :heavy_dollar_sign: [[hLedger]]: Update current ledger %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2024-10-04 ✅ 2024-10-04 - [x] :heavy_dollar_sign: [[hLedger]]: Update current ledger %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2024-07-05 ✅ 2024-07-05 - [x] :heavy_dollar_sign: [[hLedger]]: Update current ledger %%done_del%% 🔁 every 3 months on the 1st Friday 📅 2024-04-05 ✅ 2024-04-05 diff --git a/06.02 Investments/Crypto Tasks.md b/06.02 Investments/Crypto Tasks.md index 21b440d5..1debfd0d 100644 --- a/06.02 Investments/Crypto Tasks.md +++ b/06.02 Investments/Crypto Tasks.md @@ -70,7 +70,8 @@ All tasks and to-dos Crypto-related.   %%- [ ] 💰[[Crypto Tasks#internet alerts|monitor Crypto news and publications]] %%done_del%% 🔁 every week on Friday 📅 2022-12-16%% -- [ ] :ballot_box_with_ballot: [[Crypto Tasks]]: Vote for [[EOS]] block producers %%done_del%% 🔁 every month on the 1st Tuesday 📅 2025-01-07 +- [ ] :ballot_box_with_ballot: [[Crypto Tasks]]: Vote for [[EOS]] block producers %%done_del%% 🔁 every month on the 1st Tuesday 📅 2025-02-04 +- [x] :ballot_box_with_ballot: [[Crypto Tasks]]: Vote for [[EOS]] block producers %%done_del%% 🔁 every month on the 1st Tuesday 📅 2025-01-07 ✅ 2025-01-07 - [x] :ballot_box_with_ballot: [[Crypto Tasks]]: Vote for [[EOS]] block producers %%done_del%% 🔁 every month on the 1st Tuesday 📅 2024-12-03 ✅ 2024-12-03 - [x] :ballot_box_with_ballot: [[Crypto Tasks]]: Vote for [[EOS]] block producers %%done_del%% 🔁 every month on the 1st Tuesday 📅 2024-11-05 ✅ 2024-11-09 - [x] :ballot_box_with_ballot: [[Crypto Tasks]]: Vote for [[EOS]] block producers %%done_del%% 🔁 every month on the 1st Tuesday 📅 2024-10-01 ✅ 2024-10-01