1
0
Fork 0
obsidian-vault-starter/.obsidian/plugins/obsidian-kanban/main.js

135 lines
673 KiB
JavaScript
Raw Normal View History

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source visit the plugins github repository
*/
2022-04-07 16:18:07 +00:00
var by=Object.create;var Na=Object.defineProperty;var wy=Object.getOwnPropertyDescriptor;var Ey=Object.getOwnPropertyNames;var Sy=Object.getPrototypeOf,xy=Object.prototype.hasOwnProperty;var Pu=t=>Na(t,"__esModule",{value:!0});var ky=(t,n)=>()=>(t&&(n=t(t=0)),n),rt=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),Oi=(t,n)=>{for(var e in n)Na(t,e,{get:n[e],enumerable:!0})},_y=(t,n,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let r of Ey(n))!xy.call(t,r)&&r!=="default"&&Na(t,r,{get:()=>n[r],enumerable:!(e=wy(n,r))||e.enumerable});return t},me=t=>_y(Pu(Na(t!=null?by(Sy(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var It=rt((Nn,Td)=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});function En(t){return typeof t=="object"&&!("toString"in t)?Object.prototype.toString.call(t).slice(8,-1):t}var nb=typeof process=="object"&&!0;function pn(t,n){if(!t)throw nb?new Error("Invariant failed"):new Error(n())}Nn.invariant=pn;var sl=Object.prototype.hasOwnProperty,rb=Array.prototype.splice,ib=Object.prototype.toString;function xr(t){return ib.call(t).slice(8,-1)}var qa=Object.assign||function(t,n){return ll(n).forEach(function(e){sl.call(n,e)&&(t[e]=n[e])}),t},ll=typeof Object.getOwnPropertySymbols=="function"?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.keys(t)};function or(t){return Array.isArray(t)?qa(t.constructor(t.length),t):xr(t)==="Map"?new Map(t):xr(t)==="Set"?new Set(t):t&&typeof t=="object"?qa(Object.create(Object.getPrototypeOf(t)),t):t}var Sd=function(){function t(){this.commands=qa({},ab),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(n,e){return n===e},this.update.newContext=function(){return new t().update}}return Object.defineProperty(t.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(n){this.update.isEquals=n},enumerable:!0,configurable:!0}),t.prototype.extend=function(n,e){this.commands[n]=e},t.prototype.update=function(n,e){var r=this,i=typeof e=="function"?{$apply:e}:e;Array.isArray(n)&&Array.isArray(i)||pn(!Array.isArray(i),function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."}),pn(typeof i=="object"&&i!==null,function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the "+("following commands: "+Object.keys(r.commands).join(", ")+".")});var a=n;return ll(i).forEach(function(o){if(sl.call(r.commands,o)){var s=n===a;a=r.commands[o](i[o],a,i,n),s&&r.isEquals(a,n)&&(a=n)}else{var u=xr(n)==="Map"?r.update(n.get(o),i[o]):r.update(n[o],i[o]),l=xr(a)==="Map"?a.get(o):a[o];(!r.isEquals(u,l)||typeof u=="undefined"&&!sl.call(n,o))&&(a===n&&(a=or(n)),xr(a)==="Map"?a.set(o,u):a[o]=u)}}),a},t}();Nn.Context=Sd;var ab={$push:function(t,n,e){return xd(n,e,"$push"),t.length?n.concat(t):n},$unshift:function(t,n,e){return xd(n,e,"$unshift"),t.length?t.concat(n):n},$splice:function(t,n,e,r){return ob(n,e),t.forEach(function(i){kd(i),n===r&&i.length&&(n=or(r)),rb.apply(n,i)}),n},$set:function(t,n,e){return lb(e),t},$toggle:function(t,n){Ki(t,"$toggle");var e=t.length?or(n):n;return t.forEach(function(r){e[r]=!n[r]}),e},$unset:function(t,n,e,r){return Ki(t,"$unset"),t.forEach(function(i){Object.hasOwnProperty.call(n,i)&&(n===r&&(n=or(r)),delete n[i])}),n},$add:function(t,n,e,r){return _d(n,"$add"),Ki(t,"$add"),xr(n)==="Map"?t.forEach(function(i){var a=i[0],o=i[1];n===r&&n.get(a)!==o&&(n=or(r)),n.set(a,o)}):t.forEach(function(i){n===r&&!n.has(i)&&(n=or(r)),n.add(i)}),n},$remove:function(t,n,e,r){return _d(n,"$remove"),Ki(t,"$remove"),t.forEach(function(i){n===r&&n.has(i)&&(n=or(r)),n.delete(i)}),n},$merge:function(t,n,e,r){return cb(n,t),ll(t).forEach(function(i){t[i]!==n[i]&&(n===r&&(n=or(r)),n[i]=t[i])}),n},$apply:function(t,n){return sb(t),t(n)}}
Available method signatures are:
animateScrollTo(y:number, options)
animateScrollTo([x:number | null, y:number | null], options)
2022-04-07 16:18:07 +00:00
animateScrollTo(scrollToElement:Element, options)`;return e+=a.horizontalOffset,r+=a.verticalOffset,d=c.getMaxHorizontalScroll(),f=c.getHorizontalScroll(),e>d&&(e=d),h=e-f,p=c.getMaxVerticalScroll(),g=c.getVerticalScroll(),r>p&&(r=p),w=r-g,S=Math.abs(Math.round(h/1e3*a.speed)),T=Math.abs(Math.round(w/1e3*a.speed)),k=S>T?S:T,k<a.minDuration?k=a.minDuration:k>a.maxDuration&&(k=a.maxDuration),[2,new Promise(function(N,C){h===0&&w===0&&N(!0),nr.remove(a.elementToScroll,!0);var O,B=function(){q(),cancelAnimationFrame(O),N(!1)};nr.add(a.elementToScroll,B);var z=function(ce){return ce.preventDefault()},Q=a.cancelOnUserAction?B:z,X=a.cancelOnUserAction?{passive:!0}:{passive:!1},ie=["wheel","touchstart","keydown","mousedown"],q=function(){ie.forEach(function(ce){a.elementToScroll.removeEventListener(ce,Q,X)})};ie.forEach(function(ce){a.elementToScroll.addEventListener(ce,Q,X)});var J=Date.now(),te=function(){var ce=Date.now()-J,de=ce/k,fe=Math.round(f+h*a.easing(de)),he=Math.round(g+w*a.easing(de));ce<k&&(fe!==e||he!==r)?(c.scrollTo(fe,he),O=requestAnimationFrame(te)):(c.scrollTo(e,r),cancelAnimationFrame(O),q(),nr.remove(a.elementToScroll,!1),N(!0))};O=requestAnimationFrame(te)})]})})}rr.default=Bx});var Yg=rt((gs,jc)=>{(function(n,e){typeof gs=="object"&&typeof jc=="object"?jc.exports=e():typeof define=="function"&&define.amd?define([],e):typeof gs=="object"?gs.Choices=e():n.Choices=e()})(window,function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(r,i,a){e.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:a})},e.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},e.t=function(r,i){if(i&1&&(r=e(r)),i&8||i&4&&typeof r=="object"&&r&&r.__esModule)return r;var a=Object.create(null);if(e.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:r}),i&2&&typeof r!="string")for(var o in r)e.d(a,o,function(s){return r[s]}.bind(null,o));return a},e.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return e.d(i,"a",i),i},e.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},e.p="/public/assets/scripts/",e(e.s=4)}([function(t,n,e){"use strict";var r=function(D){return i(D)&&!a(D)};function i(k){return!!k&&typeof k=="object"}function a(k){var D=Object.prototype.toString.call(k);return D==="[object RegExp]"||D==="[object Date]"||u(k)}var o=typeof Symbol=="function"&&Symbol.for,s=o?Symbol.for("react.element"):60103;function u(k){return k.$$typeof===s}function l(k){return Array.isArray(k)?[]:{}}function c(k,D){return D.clone!==!1&&D.isMergeableObject(k)?S(l(k),k,D):k}function d(k,D,N){return k.concat(D).map(function(C){return c(C,N)})}function f(k,D){if(!D.customMerge)return S;var N=D.customMerge(k);return typeof N=="function"?N:S}function h(k){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(k).filter(function(D){return k.propertyIsEnumerable(D)}):[]}function p(k){return Object.keys(k).concat(h(k))}function g(k,D){try{return D in k&&!(Object.hasOwnProperty.call(k,D)&&Object.propertyIsEnumerable.call(k,D))}catch(N){return!1}}function w(k,D,N){var C={};return N.isMergeableObject(k)&&p(k).forEach(function(O){C[O]=c(k[O],N)}),p(D).forEach(function(O){g(k,O)||(!N.isMergeableObject(D[O])||!k[O]?C[O]=c(D[O],N):C[O]=f(O,N)(k[O],D[O],N))}),C}function S(k,D,N){N=N||{},N.arrayMerge=N.arrayMerge||d,N.isMergeableObject=N.isMergeableObject||r,N.cloneUnlessOtherwiseSpecified=c;var C=Array.isArray(D),O=Array.isArray(k),B=C===O;return B?C?N.arrayMerge(k,D,N):w(k,D,N):c(D,N)}S.all=function(D,N){if(!Array.isArray(D))throw new Error("first argument should be an array");return D.reduce(function(C,O){return S(C,O,N)},{})};var T=S;t.exports=T},function(t,n,e){"use strict";(function(r,i){var a=e(3),o;typeof self!="undefined"?o=self:typeof window!="undefined"?o=window:typeof r!="undefined"?o=r:o=i;var s=Object(a.a)(o);n.a=s}).
Search pattern: "`.concat(w,'"'));var T=this._prepareSearchers(w),k=T.tokenSearchers,D=T.fullSearcher,N=this._search(k,D),C=N.weights,O=N.results;return this._computeScore(C,O),this.options.shouldSort&&this._sort(O),S.limit&&typeof S.limit=="number"&&(O=O.slice(0,S.limit)),this._format(O)}},{key:"_prepareSearchers",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",S=[];if(this.options.tokenize)for(var T=w.split(this.options.tokenSeparator),k=0,D=T.length;k<D;k+=1)S.push(new u(T[k],this.options));return{tokenSearchers:S,fullSearcher:new u(w,this.options)}}},{key:"_search",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],S=arguments.length>1?arguments[1]:void 0,T=this.list,k={},D=[];if(typeof T[0]=="string"){for(var N=0,C=T.length;N<C;N+=1)this._analyze({key:"",value:T[N],record:N,index:N},{resultMap:k,results:D,tokenSearchers:w,fullSearcher:S});return{weights:null,results:D}}for(var O={},B=0,z=T.length;B<z;B+=1)for(var Q=T[B],X=0,ie=this.options.keys.length;X<ie;X+=1){var q=this.options.keys[X];if(typeof q!="string"){if(O[q.name]={weight:1-q.weight||1},q.weight<=0||q.weight>1)throw new Error("Key weight has to be > 0 and <= 1");q=q.name}else O[q]={weight:1};this._analyze({key:q,value:this.options.getFn(Q,q),record:Q,index:B},{resultMap:k,results:D,tokenSearchers:w,fullSearcher:S})}return{weights:O,results:D}}},{key:"_analyze",value:function(w,S){var T=w.key,k=w.arrayIndex,D=k===void 0?-1:k,N=w.value,C=w.record,O=w.index,B=S.tokenSearchers,z=B===void 0?[]:B,Q=S.fullSearcher,X=Q===void 0?[]:Q,ie=S.resultMap,q=ie===void 0?{}:ie,J=S.results,te=J===void 0?[]:J;if(N!=null){var ce=!1,de=-1,fe=0;if(typeof N=="string"){this._log(`
Key: `.concat(T===""?"-":T));var he=X.search(N);if(this._log('Full text: "'.concat(N,'", score: ').concat(he.score)),this.options.tokenize){for(var De=N.split(this.options.tokenSeparator),A=[],I=0;I<z.length;I+=1){var et=z[I];this._log(`
Pattern: "`.concat(et.pattern,'"'));for(var qe=!1,K=0;K<De.length;K+=1){var V=De[K],U=et.search(V),G={};U.isMatch?(G[V]=U.score,ce=!0,qe=!0,A.push(U.score)):(G[V]=1,this.options.matchAllTokens||A.push(1)),this._log('Token: "'.concat(V,'", score: ').concat(G[V]))}qe&&(fe+=1)}de=A[0];for(var ye=A.length,Ee=1;Ee<ye;Ee+=1)de+=A[Ee];de/=ye,this._log("Token score average:",de)}var Fe=he.score;de>-1&&(Fe=(Fe+de)/2),this._log("Score average:",Fe);var Ge=!this.options.tokenize||!this.options.matchAllTokens||fe>=z.length;if(this._log(`
Check Matches: `.concat(Ge)),(ce||he.isMatch)&&Ge){var ht=q[O];ht?ht.output.push({key:T,arrayIndex:D,value:N,score:Fe,matchedIndices:he.matchedIndices}):(q[O]={item:C,output:[{key:T,arrayIndex:D,value:N,score:Fe,matchedIndices:he.matchedIndices}]},te.push(q[O]))}}else if(c(N))for(var pt=0,tn=N.length;pt<tn;pt+=1)this._analyze({key:T,arrayIndex:pt,value:N[pt],record:C,index:O},{resultMap:q,results:te,tokenSearchers:z,fullSearcher:X})}}},{key:"_computeScore",value:function(w,S){this._log(`
Computing score:
2022-04-07 16:18:07 +00:00
`);for(var T=0,k=S.length;T<k;T+=1){for(var D=S[T].output,N=D.length,C=1,O=1,B=0;B<N;B+=1){var z=w?w[D[B].key].weight:1,Q=(z===1?D[B].score:D[B].score||.001)*z;z!==1?O=Math.min(O,Q):(D[B].nScore=Q,C*=Q)}S[T].score=O===1?C:O,this._log(S[T])}}},{key:"_sort",value:function(w){this._log(`
2022-04-07 16:18:07 +00:00
Sorting....`),w.sort(this.options.sortFn)}},{key:"_format",value:function(w){var S=[];if(this.options.verbose){var T=[];this._log(`
Output:
2022-04-07 16:18:07 +00:00
`,JSON.stringify(w,function(Q,X){if(o(X)==="object"&&X!==null){if(T.indexOf(X)!==-1)return;T.push(X)}return X})),T=null}var k=[];this.options.includeMatches&&k.push(function(Q,X){var ie=Q.output;X.matches=[];for(var q=0,J=ie.length;q<J;q+=1){var te=ie[q];if(te.matchedIndices.length!==0){var ce={indices:te.matchedIndices,value:te.value};te.key&&(ce.key=te.key),te.hasOwnProperty("arrayIndex")&&te.arrayIndex>-1&&(ce.arrayIndex=te.arrayIndex),X.matches.push(ce)}}}),this.options.includeScore&&k.push(function(Q,X){X.score=Q.score});for(var D=0,N=w.length;D<N;D+=1){var C=w[D];if(this.options.id&&(C.item=this.options.getFn(C.item,this.options.id)[0]),k.length){for(var O={item:C.item},B=0,z=k.length;B<z;B+=1)k[B](C,O);S.push(O)}else S.push(C.item)}return S}},{key:"_log",value:function(){var w;this.options.verbose&&(w=console).log.apply(w,arguments)}}])&&s(h.prototype,p),g&&s(h,g),f}();r.exports=d},function(r,i,a){function o(d,f){for(var h=0;h<f.length;h++){var p=f[h];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(d,p.key,p)}}var s=a(3),u=a(4),l=a(7),c=function(){function d(g,w){var S=w.location,T=S===void 0?0:S,k=w.distance,D=k===void 0?100:k,N=w.threshold,C=N===void 0?.6:N,O=w.maxPatternLength,B=O===void 0?32:O,z=w.isCaseSensitive,Q=z!==void 0&&z,X=w.tokenSeparator,ie=X===void 0?/ +/g:X,q=w.findAllMatches,J=q!==void 0&&q,te=w.minMatchCharLength,ce=te===void 0?1:te;(function(de,fe){if(!(de instanceof fe))throw new TypeError("Cannot call a class as a function")})(this,d),this.options={location:T,distance:D,threshold:C,maxPatternLength:B,isCaseSensitive:Q,tokenSeparator:ie,findAllMatches:J,minMatchCharLength:ce},this.pattern=this.options.isCaseSensitive?g:g.toLowerCase(),this.pattern.length<=B&&(this.patternAlphabet=l(this.pattern))}var f,h,p;return f=d,(h=[{key:"search",value:function(g){if(this.options.isCaseSensitive||(g=g.toLowerCase()),this.pattern===g)return{isMatch:!0,score:0,matchedIndices:[[0,g.length-1]]};var w=this.options,S=w.maxPatternLength,T=w.tokenSeparator;if(this.pattern.length>S)return s(g,this.pattern,T);var k=this.options,D=k.location,N=k.distance,C=k.threshold,O=k.findAllMatches,B=k.minMatchCharLength;return u(g,this.pattern,this.patternAlphabet,{location:D,distance:N,threshold:C,findAllMatches:O,minMatchCharLength:B})}}])&&o(f.prototype,h),p&&o(f,p),d}();r.exports=c},function(r,i){var a=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;r.exports=function(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:/ +/g,l=new RegExp(s.replace(a,"\\$&").replace(u,"|")),c=o.match(l),d=!!c,f=[];if(d)for(var h=0,p=c.length;h<p;h+=1){var g=c[h];f.push([o.indexOf(g),g.length-1])}return{score:d?.5:1,isMatch:d,matchedIndices:f}}},function(r,i,a){var o=a(5),s=a(6);r.exports=function(u,l,c,d){for(var f=d.location,h=f===void 0?0:f,p=d.distance,g=p===void 0?100:p,w=d.threshold,S=w===void 0?.6:w,T=d.findAllMatches,k=T!==void 0&&T,D=d.minMatchCharLength,N=D===void 0?1:D,C=h,O=u.length,B=S,z=u.indexOf(l,C),Q=l.length,X=[],ie=0;ie<O;ie+=1)X[ie]=0;if(z!==-1){var q=o(l,{errors:0,currentLocation:z,expectedLocation:C,distance:g});if(B=Math.min(q,B),(z=u.lastIndexOf(l,C+Q))!==-1){var J=o(l,{errors:0,currentLocation:z,expectedLocation:C,distance:g});B=Math.min(J,B)}}z=-1;for(var te=[],ce=1,de=Q+O,fe=1<<Q-1,he=0;he<Q;he+=1){for(var De=0,A=de;De<A;)o(l,{errors:he,currentLocation:C+A,expectedLocation:C,distance:g})<=B?De=A:de=A,A=Math.floor((de-De)/2+De);de=A;var I=Math.max(1,C-A+1),et=k?O:Math.min(C+A,O)+Q,qe=Array(et+2);qe[et+1]=(1<<he)-1;for(var K=et;K>=I;K-=1){var V=K-1,U=c[u.charAt(V)];if(U&&(X[V]=1),qe[K]=(qe[K+1]<<1|1)&U,he!==0&&(qe[K]|=(te[K+1]|te[K])<<1|1|te[K+1]),qe[K]&fe&&(ce=o(l,{errors:he,currentLocation:V,expectedLocation:C,distance:g}))<=B){if(B=ce,(z=V)<=C)break;I=Math.max(1,2*C-z)}}if(o(l,{errors:he+1,currentLocation:C,expectedLocation:C,distance:g})>B)break;te=qe}return{isMatch:z>=0,score:ce===0?.001:ce,matchedIndices:s(X,N)}}},function(r,i){r.exports=function(a,o){var s=o.errors,u=s===void 0?0:s,l=o.currentLocation,c=l===void 0?0:l,d=o.expectedLocation,f=d===void 0?0:d,
<span class='flatpickr-weekday'>
2022-04-07 16:18:07 +00:00
`+_.join("</span><span class='flatpickr-weekday'>")+`
</span>
2022-04-07 16:18:07 +00:00
`}}function De(){e.calendarContainer.classList.add("hasWeeks");var x=Ve("div","flatpickr-weekwrapper");x.appendChild(Ve("span","flatpickr-weekday",e.l10n.weekAbbreviation));var _=Ve("div","flatpickr-weeks");return x.appendChild(_),{weekWrapper:x,weekNumbers:_}}function A(x,_){_===void 0&&(_=!0);var R=_?x:x-e.currentMonth;R<0&&e._hidePrevMonthArrow===!0||R>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=R,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,Se("onYearChange"),q()),ie(),Se("onMonthChange"),qt())}function I(x,_){if(x===void 0&&(x=!0),_===void 0&&(_=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,_===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var R=Lo(e.config),W=R.hours,re=R.minutes,ae=R.seconds;h(W,re,ae)}e.redraw(),x&&Se("onChange")}function et(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),Se("onClose")}function qe(){e.config!==void 0&&Se("onDestroy");for(var x=e._handlers.length;x--;)e._handlers[x].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var _=e.calendarContainer.parentNode;if(_.lastChild&&_.removeChild(_.lastChild),_.parentNode){for(;_.firstChild;)_.parentNode.insertBefore(_.firstChild,_);_.parentNode.removeChild(_)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(R){try{delete e[R]}catch(W){}})}function K(x){return e.calendarContainer.contains(x)}function V(x){if(e.isOpen&&!e.config.inline){var _=Xt(x),R=K(_),W=_===e.input||_===e.altInput||e.element.contains(_)||x.path&&x.path.indexOf&&(~x.path.indexOf(e.input)||~x.path.indexOf(e.altInput)),re=!W&&!R&&!K(x.relatedTarget),ae=!e.config.ignoredFocusElements.some(function(xe){return xe.contains(_)});re&&ae&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&u(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function U(x){if(!(!x||e.config.minDate&&x<e.config.minDate.getFullYear()||e.config.maxDate&&x>e.config.maxDate.getFullYear())){var _=x,R=e.currentYear!==_;e.currentYear=_||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),R&&(e.redraw(),Se("onYearChange"),q())}}function G(x,_){var R;_===void 0&&(_=!0);var W=e.parseDate(x,void 0,_);if(e.config.minDate&&W&&Zt(W,e.config.minDate,_!==void 0?_:!e.minDateHasTime)<0||e.config.maxDate&&W&&Zt(W,e.config.maxDate,_!==void 0?_:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(W===void 0)return!1
`);_t(s,u)}}catch(o){console.error(o),n.setError(o)}}var Dc=me(require("obsidian"));function Xn(t){return Array.isArray?Array.isArray(t):Ep(t)==="[object Array]"}var KE=1/0;function $E(t){if(typeof t=="string")return t;let n=t+"";return n=="0"&&1/t==-KE?"-0":n}function UE(t){return t==null?"":$E(t)}function Zn(t){return typeof t=="string"}function bp(t){return typeof t=="number"}function zE(t){return t===!0||t===!1||VE(t)&&Ep(t)=="[object Boolean]"}function wp(t){return typeof t=="object"}function VE(t){return wp(t)&&t!==null}function cn(t){return t!=null}function tc(t){return!t.trim().length}function Ep(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}var jE="Incorrect 'index' type",WE=t=>`Invalid value for key ${t}`,qE=t=>`Pattern length exceeds max of ${t}.`,YE=t=>`Missing ${t} property in key`,JE=t=>`Property 'weight' in key '${t}' must be a positive integer`,Sp=Object.prototype.hasOwnProperty,xp=class{constructor(n){this._keys=[],this._keyMap={};let e=0;n.forEach(r=>{let i=kp(r);e+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,e+=i.weight}),this._keys.forEach(r=>{r.weight/=e})}get(n){return this._keyMap[n]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function kp(t){let n=null,e=null,r=null,i=1;if(Zn(t)||Xn(t))r=t,n=_p(t),e=nc(t);else{if(!Sp.call(t,"name"))throw new Error(YE("name"));let a=t.name;if(r=a,Sp.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(JE(a));n=_p(a),e=nc(a)}return{path:n,id:e,weight:i,src:r}}function _p(t){return Xn(t)?t:t.split(".")}function nc(t){return Xn(t)?t.join("."):t}function GE(t,n){let e=[],r=!1,i=(a,o,s)=>{if(!!cn(a))if(!o[s])e.push(a);else{let u=o[s],l=a[u];if(!cn(l))return;if(s===o.length-1&&(Zn(l)||bp(l)||zE(l)))e.push(UE(l));else if(Xn(l)){r=!0;for(let c=0,d=l.length;c<d;c+=1)i(l[c],o,s+1)}else o.length&&i(l,o,s+1)}};return i(t,Zn(n)?n.split("."):n,0),r?e:e[0]}var QE={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},XE={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,n)=>t.score===n.score?t.idx<n.idx?-1:1:t.score<n.score?-1:1},ZE={location:0,threshold:.6,distance:100},eS={useExtendedSearch:!1,getFn:GE,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Me={...XE,...QE,...ZE,...eS},tS=/[^ ]+/g;function nS(t=1,n=3){let e=new Map,r=Math.pow(10,n);return{get(i){let a=i.match(tS).length;if(e.has(a))return e.get(a);let o=1/Math.pow(a,.5*t),s=parseFloat(Math.round(o*r)/r);return e.set(a,s),s},clear(){e.clear()}}}var Yo=class{constructor({getFn:n=Me.getFn,fieldNormWeight:e=Me.fieldNormWeight}={}){this.norm=nS(e,3),this.getFn=n,this.isCreated=!1,this.setIndexRecords()}setSources(n=[]){this.docs=n}setIndexRecords(n=[]){this.records=n}setKeys(n=[]){this.keys=n,this._keysMap={},n.forEach((e,r)=>{this._keysMap[e.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Zn(this.docs[0])?this.docs.forEach((n,e)=>{this._addString(n,e)}):this.docs.forEach((n,e)=>{this._addObject(n,e)}),this.norm.clear())}add(n){let e=this.size();Zn(n)?this._addString(n,e):this._addObject(n,e)}removeAt(n){this.records.splice(n,1);for(let e=n,r=this.size();e<r;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(n,e){return n[this._keysMap[e]]}size(){return this.records.length}_addString(n,e){if(!cn(n)||tc(n))return;let r={v:n,i:e,n:this.norm.get(n)};this.records.push(r)}_addObject(n,e){let r={i:e,$:{}};this.keys.forEach((i,a)=>{let o=this.getFn(n,i.path);if(!!cn(o)){if(Xn(o)){let s=[],u=[{nestedArrIndex:-1,value:o}];for(;u.length;){let{nestedArrIndex:l,value:c}=u.pop();if(!!cn(c))if(Zn(c)&&!tc(c)){let d={v:c,i:l,n:this.norm.get(c)};s.push(d)}else Xn(c)&&c.forEach((d,f)=>{u.push({nestedArrIndex:f,value:d})})}r.$[a]=s}else if(!tc(o)){let s={v:o,n:this.norm.get(o)};r.$[a]=s}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}};function Tp(t,n,{getFn:e=Me.getFn,fieldNormWeight:r=Me.fieldNormWeight}={}){let i=new Yo({getFn:e,fieldNormWeight:r});return i.setKeys(t.map(kp)),i.setSources(n),i.create(),i}function rS(t,{getFn:n=Me.getFn,fieldNormWeight:e=Me.fieldNormWeight}={}){l
2022-04-07 16:18:07 +00:00
`:" ";n.app.vault.cachedRead(i.item.file).then(c=>{let d=`${c.slice(0,i.item.block.end)}${l}^${u}${c.slice(i.item.block.end)}`;n.app.vault.modify(i.item.file,d)}).catch(c=>{n.setError(c),console.error(c)}),o+=u}a.push(n.app.fileManager.generateMarkdownLink(i.item.file,n.file.path,o,i.item.alias));let s=!!n.app.vault.getConfig("useMarkdownLinks");return e&&!s?a[a.length-1]=a[a.length-1].slice(0,-2):!e&&!s&&a.push("]] "),a.join("")}}}var CS=/\B#([^\s]*)?$/;function jp(t,n){return{id:"tag",match:CS,index:1,search:(e,r)=>{r(e?n.search(e,{limit:50}):t.slice(0,50).map((i,a)=>({item:i,refIndex:a})))},template:e=>e.item,replace:e=>`${e.item} `}}var qp=me(pa());var IS=/\$&/g,LS=/\$(\d)/g,gc=class{constructor(n,e,r){this.data=n;this.term=e;this.strategy=r}getReplacementData(n){let e=this.strategy.replace(this.data);if(e==null)return null;let r="";Array.isArray(e)&&(r=e[1],e=e[0]);let i=this.strategy.match(n);if(i==null||i.index==null)return null;let a=e.replace(IS,i[0]).replace(LS,(o,s)=>i[parseInt(s)]);return{start:i.index,end:i.index+i[0].length,beforeCursor:a,afterCursor:r}}replace(n,e){let r=this.getReplacementData(n);if(r!==null)return e=r.afterCursor+e,[[n.slice(0,r.start),r.beforeCursor,n.slice(r.end)].join(""),e]}render(){return this.strategy.renderTemplate(this.data,this.term)}getStrategyId(){return this.strategy.getId()}};var PS=1,vc=class{constructor(n){this.props=n;this.cache={}}destroy(){return this.cache={},this}replace(n){return this.props.replace(n)}execute(n,e){var a;let r=this.matchWithContext(n);if(!r)return!1;let i=r[(a=this.props.index)!=null?a:PS];return this.search(i,o=>{e(o.map(s=>new gc(s,i,this)))},r),!0}renderTemplate(n,e){if(this.props.template)return this.props.template(n,e);if(typeof n=="string")return n;throw new Error(`Unexpected render data type: ${typeof n}. Please implement template parameter by yourself`)}getId(){return this.props.id||null}match(n){return typeof this.props.match=="function"?this.props.match(n):n.match(this.props.match)}search(n,e,r){this.props.cache?this.searchWithCach(n,e,r):this.props.search(n,e,r)}matchWithContext(n){let e=this.context(n);return e===!1?null:this.match(e===!0?n:e)}context(n){return this.props.context?this.props.context(n):!0}searchWithCach(n,e,r){this.cache[n]!=null?e(this.cache[n]):this.props.search(n,i=>{this.cache[n]=i,e(i)},r)}};var yc=class extends qp.EventEmitter{constructor(n){super();this.handleQueryResult=n=>{this.emit("hit",{searchResults:n})};this.strategies=n.map(e=>new vc(e))}destroy(){return this.strategies.forEach(n=>n.destroy()),this}run(n){for(let e of this.strategies)if(e.execute(n,this.handleQueryResult))return;this.handleQueryResult([])}};var Yp=me(pa());var OS=typeof window!="undefined"&&!!window.CustomEvent,Rt=(t,n)=>{if(OS)return new CustomEvent(t,n);let e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,(n==null?void 0:n.cancelable)||!1,(n==null?void 0:n.detail)||void 0),e};var NS=10,FS="auto",RS="dropdown-menu textcomplete-dropdown",Jp="textcomplete-item",HS=`${Jp} active`,ma=class extends Yp.EventEmitter{constructor(n,e){super();this.el=n;this.option=e;this.shown=!1;this.items=[];this.activeIndex=null}static create(n){let e=document.createElement("ul");e.className=n.className||RS,Object.assign(e.style,{display:"none",position:"absolute",zIndex:"1000"},n.style);let r=n.parent||document.body;return r==null||r.appendChild(e),new ma(e,n)}render(n,e){let r=Rt("render",{cancelable:!0});return this.emit("render",r),r.defaultPrevented?this:(this.clear(),n.length===0?this.hide():(this.items=n.slice(0,this.option.maxCount||NS).map((i,a)=>{var o;return new Gp(this,a,i,((o=this.option)==null?void 0:o.item)||{})}),this.setStrategyId(n[0]).renderEdge(n,"header").renderItems().renderEdge(n,"footer").show().setOffset(e).activate(0),this.emit("rendered",Rt("rendered")),this))}destroy(){var n;return this.clear(),(n=this.el.parentNode)==null||n.removeChild(this.el),this}select(n){let e={searchResult:n.searchResult},r=Rt("select",{cancelable:!0,detail:e});return this.emit("select",r),r.defaultPrevented?this:(this.hide(),this.emit("selec
`).map(e=>e[0]===">"?e:`> ${e}`).join(`
2022-04-07 16:18:07 +00:00
`)}function QS(t){return t.split(`
`).map(e=>e[0]!==">"?e:e.replace(/^>+\s*/,"")).join(`
2022-04-07 16:18:07 +00:00
`)}var ga=/^(?:\s*\d+[.)]\s+.+?(?:[\r\n]|$))+$/,Ec=/^(?:\s*\d+[.)]\s+\[\s+\]+.+?(?:[\r\n]|$))+$/,Sc=/^(?:\s*\d+[.)]\s+\[[^\]\s]+\]+.+?(?:[\r\n]|$))+$/;function XS(t){return t.match(/^\s*/)[0].length}function ZS(t){return parseInt(t.match(/^\s*(\d+)/)[1],10)}function ex(t){let n=[0],e=0;return t.split(`
`).map(r=>{let i=XS(r);if(i>e?n.push(0):i<e&&n.pop(),e=i,ga.test(r)){let a=ZS(r);return n[n.length-1]=a,r}return n[n.length-1]=n[n.length-1]+1,r.replace(/^(\s*)/,`$1${n[n.length-1]}. `)}).join(`
`)}function tx(t){return t.split(`
`).map(n=>ga.test(n)?n.replace(/^(\s*)\d+[.)]\s+/,"$1"):n).join(`
`)}var va=/^(?:\s*[-*+]\s+.+?(?:[\r\n]|$))+$/,xc=/^(?:\s*[-*+]\s+\[\s+\]+.+?(?:[\r\n]|$))+$/,kc=/^(?:\s*[-*+]\s+\[[^\]\s]+\]+.+?(?:[\r\n]|$))+$/;function fm(t){return t.split(`
`).map(e=>va.test(e)?e:e.replace(/^(\s*)/,"$1- ")).join(`
`)}function nx(t){return t.split(`
`).map(n=>xc.test(n)||kc.test(n)?n:n.replace(/^(\s*[-*+]\s+)/,"$1[ ] ")).join(`
`)}function rx(t){return t.split(`
`).map(n=>Ec.test(n)||Sc.test(n)?n:n.replace(/^(\s*\d+[.)]\s+)/,"$1[ ] ")).join(`
`)}function ix(t){return t.split(`
`).map(n=>xc.test(n)?n:n.replace(/^(\s*[-*+]\s+)\[[^\]]\]/,"$1[ ]")).join(`
`)}function ax(t){return t.split(`
`).map(n=>Ec.test(n)?n:n.replace(/^(\s*\d+[.)]\s+)\[[^\]]{1}\]/,"$1[ ]")).join(`
`)}function ox(t){return t.split(`
`).map(n=>kc.test(n)?n:n.replace(/^(\s*[-*+]\s+)\[\s\]/,"$1[x]")).join(`
`)}function sx(t){return t.split(`
`).map(n=>Sc.test(n)?n:n.replace(/^(\s*\d+[.)]\s+)\[\s\]/,"$1[x]")).join(`
`)}function lx(t){return t.split(`
`).map(e=>va.test(e)?e.replace(/^(\s*)[-+*]\s+/,"$1"):e).join(`
`)}var hm={"editor:toggle-bold":t=>{yi(t,sm,VS,"**")},"editor:toggle-code":t=>{yi(t,cm,WS,"`")},"editor:toggle-italics":t=>{yi(t,lm,jS,"*")},"editor:toggle-highlight":t=>{yi(t,um,qS,"==")},"editor:toggle-strikethrough":t=>{yi(t,dm,YS,"~~")},"editor:toggle-blockquote":t=>{jo(t,JS,GS,QS)},"editor:toggle-bullet-list":t=>{jo(t,va,fm,lx)},"editor:toggle-numbered-list":t=>{jo(t,ga,ex,tx)},"editor:toggle-checklist-status":t=>{let n=Kn(t),e=vi({text:n.text,selection:n.selection}),r=Nt(t,e),i=r.selectedText,a=va.test(i),o=ga.test(i);!a&&!o?i=fm(i):a?xc.test(i)?i=ox(i):kc.test(i)?i=ix(i):i=nx(i):Ec.test(i)?i=sx(i):Sc.test(i)?i=ax(i):i=rx(i);let s=_t(t,i);Nt(t,{start:r.selection.start,end:s.selection.end})}},_c={"(":t=>ln(t,"(",")",!1),"[":t=>ln(t,"[","]",!1,!0),"{":t=>ln(t,"{","}",!1),"'":t=>ln(t,"'","'",!1),'"':t=>ln(t,'"','"',!1)},Tc={"*":t=>ln(t,"*","*",!1),_:t=>ln(t,"_","_",!1),"`":t=>ln(t,"`","`",!1),"=":t=>ln(t,"=","=",!0),"~":t=>ln(t,"~","~",!0),$:t=>ln(t,"$","$",!0),"%":t=>ln(t,"%","%",!0)},cx={"(":")","[":"]","{":"}","'":"'",'"':'"',"*":"*",_:"_","`":"`","=":"=","~":"~",$:"$","%":"%"};function pm(t,n){let e=Kn(t);if(e.selection.end!==e.selection.start||e.selection.end===e.text.length)return!1;let r=e.text[e.selection.end-1],i=e.text[e.selection.end];if(n[r]&&i===cx[r])return Nt(t,{start:e.selection.end,end:e.selection.end+1}),_t(t,""),!0}function mm(t){return pm(t,_c)}function gm(t){return pm(t,Tc)}function ux(t,n,e){let r=n?" ":" ".repeat(e);return t.split(`
`).map(i=>r+i).join(`
2022-04-07 16:18:07 +00:00
`)}function dx(t,n,e){let r=n?"\\t":" ".repeat(e),i=new RegExp(`^${r}`);return t.split(`
`).map(a=>i.test(a)?a.replace(i,""):a).join(`
2022-04-07 16:18:07 +00:00
`)}function vm(t,n,e,r){let i=Kn(t);if(n){let l=vi(i),c=Nt(t,l);if(_t(t,dx(c.selectedText,e,r)),i.selection.start===i.selection.end){let d=e?1:r;Nt(t,{start:i.selection.start-d,end:i.selection.end-d})}return!0}let a=vi(i),o=Nt(t,a),u=ux(o.selectedText,e,r).replace(/^(\s*)(\d+)([.)]\s)/,(l,c,d,f)=>`${c}1${f}`);return _t(t,u),!0}function ym(t){let n=Kn(t);if(n.selection.start!==n.selection.end)return!1;let e=vi(n),r=t.value.slice(e.start,n.selection.end),i=t.value.slice(e.start,e.end);if(/^(\s*[-*+]\s+(?:\[[^\]]\]\s*)?)$/.test(i))return Nt(t,{start:e.start-1,end:e.end}),_t(t,`
`),!0;if(/^(\s*\d[.)]\s+(?:\[[^\]]\]\s*)?)$/.test(i))return Nt(t,{start:e.start-1,end:e.end}),_t(t,`
`),!0;if(va.test(r)){let a=r.match(/^(\s*[-*+]\s+(?:\[[^\]]\]\s*)?)/)[1];return fa(t,`
${a.replace(/^(\s*[-*+]\s+)\[[^\]]\]/,"$1[ ]")}`),!0}if(ga.test(r)){let s=r.match(/^(\s*\d+[.)]\s+(?:\[[^\]]\]\s*)?)/)[1].replace(/^(\s*\d+[.)]\s+)\[[^\]]\]/,"$1[ ]").replace(/^(\s*)(\d+)/,(u,l,c)=>`${l}${parseInt(c)+1}`);return fa(t,`
${s}`),!0}return!1}var bm={};var wm={};var Em={};var Sm={"Open as kanban board":"\xD6ffne als Kanban-Board","Create new board":"Erstelle ein neues Board","Archive completed cards in active board":"Archiviere fertiggestellte Karten im aktiven Board","Error: current file is not a Kanban board":"Fehler: Momentan ge\xF6ffnete Datei ist kein Kanban-Board","Convert empty note to Kanban":"Konvertiere leere Notiz in ein Kanban-Board","Error: cannot create Kanban, the current note is not empty":"Fehler: Kanban konnte nicht erstellt werden, momentan ge\xF6ffnete Datei ist nicht leer","New kanban board":"Neues Kanban-Board","Untitled Kanban":"Unbenanntes Kanban","Toggle between Kanban and markdown mode":"Wechsle zwischen Kanban und Markdown Modus","Open as markdown":"\xD6ffne als Markdown","Open board settings":"\xD6ffne Board-Einstellungen","Archive completed cards":"Archiviere fertiggestellte Karten","Something went wrong":"Etwas ist schief gelaufen","You may wish to open as markdown and inspect or edit the file.":"Du kannst die Datei im Markdown Modus \xF6ffnen und \xFCberpr\xFCfen oder bearbeiten.","Are you sure you want to archive all completed cards on this board?":"Bist du dir sicher, dass du alle fertiggestellten Karten des Boards archivieren m\xF6chtest?",Complete:"Fertiggestellt",Archive:"Archiv","Invalid Kanban file: problems parsing frontmatter":"Fehlerhafte Kanban Datei: Probleme beim Parsen des Frontmatters","I don't know how to interpret this line:":"Ich wei\xDF nicht, wie ich diese Zeile interpretieren soll:",Untitled:"Unbenannt","Note: No template plugins are currently enabled.":"Beachte: Keine Template-Plugins sind derzeit aktiviert.",default:"Standard","Search...":"Suche...","These settings will take precedence over the default Kanban board settings.":"Diese Einstellung wird Vorrang vor der standard Kanban-Board Einstellung haben. ","Set the default Kanban board settings. Settings can be overridden on a board-by-board basis.":"Stelle standard Kanban-Board Einstellungen ein. Einstellungen k\xF6nnen auf einer Board-f\xFCr-Board Basis \xFCberschrieben werden.","Note template":"Notiz Vorlage","This template will be used when creating new notes from Kanban cards.":"Diese Vorlage wird beim Erstellen neuer Notizen aus Kanban-Karten verwendet.","No template":"Keine Vorlage","Note folder":"Notiz Ordner","Notes created from Kanban cards will be placed in this folder. If blank, they will be placed in the default location for this vault.":"Notizen, welche aus einer Kanban-Karte erstellt wurden, werden in diesem Ordner platziert. Falls leer, werden die Einstellungen des Vaults verwendet.","Default folder":"Standard Ordner","Lane width":"Schienen Breite","Enter a number to set the lane width in pixels.":"Gebe ein Zahl ein, um die Schienen Breite in Pixeln einzustellen.","Maximum number of archived cards":"Maximale Anzahl archivierter Karten.","Archived cards can be viewed in markdown mode. This setting will begin removing old cards once the limit is reached. Setting this value to -1 will allow a board's archive to grow infinitely.":"Archivierte Karten k\xF6nnen im Markdown-Modus betrachtet werden. Diese Einstellung wird alte Karten l\xF6schen, sobald das Limit erreicht wird. Eine Einstellung von -1 setzt das Archiv auf eine unendliche Gr\xF6\xDFe.","Display card checkbox":"Zeige Karten Checkbox","When toggled, a checkbox will be displayed with each card":"Wenn aktiviert, wird eine Checkbox mit jeder Karte angezeigt.","Reset to default":"Zur\xFCcksetzen","Date & Time":"Datum & Uhrzeit","Date trigger":"Datums Ausl\xF6ser","When this is typed, it will trigger the date selector":"Wenn dies eingegeben wird, dann wird die Datumsauswahl angezeigt","Time trigger":"Uhrzeit Ausl\xF6ser","When this is typed, it will trigger the time selector":"Wenn dies eingegeben wird, dann wird die Uhrzeitsauswahl angezeigt","Date format":"Format des Datums","This format will be used when saving dates in markdown.":"Dieses Format wird verwendet, wenn ein Datum in Markdown gespeichert wird.","For more syntax, refer to":"F\xFCr mehr Syntax Informationen
`)[0].trim(),h=f.replace(Dx,"$1").replace(Ax,"$1").replace(Ix,"$1").replace(Cx," ").trim(),p=i.getSetting("new-note-folder"),g=i.getSetting("new-note-template"),w=p?i.app.vault.getAbstractFileByPath(p):i.app.fileManager.getNewFileParent(i.file.path),S=await i.app.fileManager.createNewMarkdownFile(w,h),T=i.app.workspace.splitActiveLeaf();await T.openFile(S),i.app.workspace.setActiveLeaf(T,!1,!0),await Kd(i,g);let k=n.data.titleRaw.replace(f,i.app.fileManager.generateMarkdownLink(S,i.file.path));i.updateItemContent(n,k).then(D=>{r.updateItem(e,D)}).catch(D=>{i.setError(D),console.error(D)})})}).addItem(d=>{d.setIcon("links-coming-in").setTitle(F("Copy link to card")).onClick(()=>{if(n.data.blockId)navigator.clipboard.writeText(`${this.app.fileManager.generateMarkdownLink(i.file,"","#^"+n.data.blockId)}`);else{let f=Ke(6);navigator.clipboard.writeText(`${this.app.fileManager.generateMarkdownLink(i.file,"","#^"+f)}`),i.updateItemContent(n,`${n.data.titleRaw} ^${f}`).then(h=>{r.updateItem(e,h)}).catch(h=>{i.setError(h),console.error(h)})}})}).addSeparator(),/\n/.test(n.data.titleRaw)&&c.addItem(d=>{d.setIcon("split").setTitle(F("Split card")).onClick(async()=>{let f=n.data.titleRaw.split(/[\r\n]+/g).map(p=>p.trim()),h=await Promise.all(f.map(p=>i.getNewItem(p)));r.splitItem(e,h)})}),c.addItem(d=>{d.setIcon("documents").setTitle(F("Duplicate card")).onClick(()=>r.duplicateEntity(e))}).addItem(d=>{d.setIcon("plus-with-circle").setTitle(F("Insert card before")).onClick(async()=>r.insertItems(e,[await i.getNewItem("",!1,!0)]))}).addItem(d=>{d.setIcon("plus-with-circle").setTitle(F("Insert card after")).onClick(async()=>{let f=[...e];f[f.length-1]=f[f.length-1]+1,r.insertItems(f,[await i.getNewItem("",!1,!0)])})}).addItem(d=>{d.setIcon("sheets-in-box").setTitle(F("Archive card")).onClick(()=>r.archiveItem(e))}).addItem(d=>{d.setIcon("trash").setTitle(F("Delete card")).onClick(()=>r.deleteEntity(e))}).addSeparator().addItem(d=>{d.setIcon("calendar-with-checkmark").setTitle(u?F("Edit date"):F("Add date")).onClick(()=>{var f;Ro(i,s,Ho({stateManager:i,boardModifiers:r,item:n,hasDate:u,path:e}),(f=n.data.metadata.date)==null?void 0:f.toDate())})}),u&&(c.addItem(d=>{d.setIcon("cross").setTitle(F("Remove date")).onClick(()=>{let f=i.getSetting("link-date-to-daily-note"),h=i.getSetting("date-trigger"),p=f?"(?:\\[[^\\]]+\\]\\([^\\)]+\\)|\\[\\[[^\\]]+\\]\\])":"{[^}]+}",g=new RegExp(`(^|\\s)${Fn(h)}${p}`),w=n.data.titleRaw.replace(g,"").trim();i.updateItemContent(n,w).then(S=>{r.updateItem(e,S)}).catch(S=>{i.setError(S),console.error(S)})})}),c.addItem(d=>{d.setIcon("clock").setTitle(l?F("Edit time"):F("Add time")).onClick(()=>{Bo(i,s,Ko({stateManager:i,boardModifiers:r,item:n,hasTime:l,path:e}),n.data.metadata.time)})}),l&&c.addItem(d=>{d.setIcon("cross").setTitle(F("Remove time")).onClick(()=>{let f=i.getSetting("time-trigger"),h=new RegExp(`(^|\\s)${Fn(f)}{([^}]+)}`),p=n.data.titleRaw.replace(h,"").trim();i.updateItemContent(n,p).then(g=>{r.updateItem(e,g)}).catch(g=>{i.setError(g),console.error(g)})})})),c.showAtPosition(s)}},[t,n,e,r,i])}var Xm=v.memo(function({isEditing:n,setIsEditing:e,showMenu:r}){let i=v.useMemo(()=>n?{"data-ignore-drag":!0}:{},[n]);return v.createElement("div",{...i,className:$("item-postfix-button-wrapper")},n?v.createElement("button",{"data-ignore-drag":!0,onPointerDown:a=>{a.preventDefault()},onClick:()=>{e(!1)},className:`${$("item-postfix-button")} is-enabled`,"aria-label":F("Cancel")},v.createElement(en,{name:"cross"})):v.createElement("button",{"data-ignore-drag":!0,onPointerDown:a=>a.preventDefault(),onClick:r,className:$("item-postfix-button"),"aria-label":F("More options")},v.createElement(en,{name:"vertical-three-dots"})))});function Zm({item:t,isSettingsVisible:n,searchQuery:e}){return n||!t.data.metadata.fileMetadata?null:v.createElement("div",{className:$("item-metadata-wrapper")},v.createElement(Px,{metadata:t.data.metadata.fileMetadata,order:t.data.metadata.fileMetadataOrder,searchQuery:e}))}function eg(t){return`${t.embed?"!":""}[[${t.path}${t.display?`|${t.display}`:""}]]`}function Lx({data:t,sea
`);function Rg(t){return["","","%% kanban:settings","```",JSON.stringify(t),"```","%%"].join(`
`)}function Hg(t,n,e){let r=t.innerText.trim();if((n==null?void 0:n.length)&&(r+=" "+n.join(" ")),e){let i=Object.keys(e).join(" "),a=Object.values(e).map(o=>Array.isArray(o.value)?o.value.join(" "):o.value.toString()).join(" ");r+=" "+i+" "+a}return r.toLocaleLowerCase()}function Xx(t,n,e){var r,i,a;if(t.plugins.enabledPlugins.has("dataview")&&((a=(i=(r=t.plugins)==null?void 0:r.plugins)==null?void 0:i.dataview)==null?void 0:a.api))return t.plugins.plugins.dataview.api.page(n.path,e.path)}function Vc(t,n){let e=t.getSetting("metadata-keys");if(!e.length)return{};if(!n)return{};let r=t.app.metadataCache.getFileCache(n),i=Xx(t.app,n,t.file);if(!r&&!i)return{};let a={},o={},s={},u=[],l=!1;return e.forEach(c=>{var d;if(!s[c.metadataKey]){if(s[c.metadataKey]=!0,c.metadataKey==="tags"){let f=(r==null?void 0:r.tags)||[];if(Array.isArray((d=r==null?void 0:r.frontmatter)==null?void 0:d.tags)&&(f=[].concat(f,r.frontmatter.tags.map(h=>({tag:`#${h}`})))),(f==null?void 0:f.length)===0)return;u.push(c.metadataKey),a.tags={...c,value:f.map(h=>h.tag).filter(h=>o[h]?!1:(o[h]=!0,!0))},l=!0;return}if((r==null?void 0:r.frontmatter)&&r.frontmatter[c.metadataKey])u.push(c.metadataKey),a[c.metadataKey]={...c,value:r.frontmatter[c.metadataKey]},l=!0;else if(i&&i[c.metadataKey]){let f=i[c.metadataKey],h=f.values||f.val||f;if(h===f&&typeof h=="object")h={...f};else if(!Array.isArray(h)&&typeof h!="string"&&typeof h!="number")return;u.push(c.metadataKey),a[c.metadataKey]={...c,value:h},l=!0}}}),{fileMetadata:l?a:void 0,fileMetadataOrder:u}}function Bg(t,n){return!t&&n?!0:!["metadata-keys","date-trigger","time-trigger","link-date-to-daily-note","date-format","time-format","hide-date-in-title","hide-tags-in-title"].every(r=>t[r]===n[r])}function Kg({onNewLane:t,closeLaneForm:n}){let{boardModifiers:e,stateManager:r}=v.useContext(We),[i,a]=v.useState(!1),[o,s]=v.useState(""),u=v.useRef(),l=cs(()=>{n()},{ignoreClass:$("ignore-click-outside")});v.useLayoutEffect(()=>{var d;(d=u.current)==null||d.focus()},[]);let c=()=>{e.addLane({...mr,id:Ke(),children:[],data:{title:o,shouldMarkItemsComplete:i}}),s(""),a(!1),t()};return v.createElement("div",{ref:l,className:$("lane-form-wrapper")},v.createElement("div",{className:$("lane-input-wrapper")},v.createElement(gr,{ref:u,className:$("lane-input"),onChange:d=>s(d.target.value),onEnter:d=>{tr(d,r)||(d.preventDefault(),c())},onSubmit:()=>{c()},onEscape:n,value:o})),v.createElement("div",{className:$("checkbox-wrapper")},v.createElement("div",{className:$("checkbox-label")},F("Mark cards in this list as complete")),v.createElement("div",{onClick:()=>a(!i),className:`checkbox-container ${i?"is-enabled":""}`})),v.createElement("div",{className:$("lane-input-actions")},v.createElement("button",{className:$("lane-action-add"),onClick:c},F("Add list")),v.createElement("button",{className:$("lane-action-cancel"),onClick:n},F("Cancel"))))}var Zx=[Xe.Item,Xe.Lane],ek=[Xe.Lane],Vg=({view:t,stateManager:n})=>{let e=n.useState(),r=Ag(),i=v.useRef(null),a=v.useRef(null),[o,s]=v.useState(""),[u,l]=v.useState(!1),[c,d]=v.useState(""),[f,h]=v.useState((e==null?void 0:e.children.length)===0),p=n.file.path,g=n.useSetting("max-archive-size"),w=v.useCallback(()=>{(e==null?void 0:e.children.length)>0&&h(!1)},[e==null?void 0:e.children.length]);v.useEffect(()=>{(e==null?void 0:e.children.length)===0&&h(!0)},[e==null?void 0:e.children.length]);let S=v.useCallback(()=>{setTimeout(()=>{var B;let O=(B=i.current)==null?void 0:B.getElementsByClassName($("board"));O.length&&(0,$g.default)([O[0].scrollWidth,0],{elementToScroll:O[0],speed:300,minDuration:150,easing:z=>z===1?1:1-Math.pow(2,-10*z)})})},[]);v.useEffect(()=>{let O=z=>{z==="editor:open-search"&&l(Q=>!Q)},B=()=>{h(!0)};return t.emitter.on("hotkey",O),t.emitter.on("showLaneForm",B),()=>{t.emitter.off("hotkey",O),t.emitter.off("showLaneForm",B)}},[t]),v.useEffect(()=>{var O;u&&((O=a.current)==null||O.focus())},[u]),v.useEffect(()=>{let O=o.trim(),B;return O?B=window.setTimeout(()=>{d(O)},250):d(""),()=>{window.clearTimeout(B)}},[o]),v.useEffect(()=>{g===void 0||g===-1||typeof g=="n
`)}var xa=function(t){lk(n,t);function n(e,r,i,a,o){var s=this.constructor,u=t.call(this,tv(e,{name:r,index:i,operation:a,tree:o}))||this;return u.name=r,u.index=i,u.operation=a,u.tree=o,Object.setPrototypeOf(u,s.prototype),u.message=tv(e,{name:r,index:i,operation:a,tree:o}),u}return n}(Error);var st=xa,uk=Tt,xi={add:function(t,n,e){return t[n]=this.value,{newDocument:e}},remove:function(t,n,e){var r=t[n];return delete t[n],{newDocument:e,removed:r}},replace:function(t,n,e){var r=t[n];return t[n]=this.value,{newDocument:e,removed:r}},move:function(t,n,e){var r=Ts(e,this.path);r&&(r=Tt(r));var i=Fr(e,{op:"remove",path:this.from}).removed;return Fr(e,{op:"add",path:this.path,value:i}),{newDocument:e,removed:r}},copy:function(t,n,e){var r=Ts(e,this.from);return Fr(e,{op:"add",path:this.path,value:Tt(r)}),{newDocument:e}},test:function(t,n,e){return{newDocument:e,test:ka(t[n],this.value)}},_get:function(t,n,e){return this.value=t[n],{newDocument:e}}},dk={add:function(t,n,e){return ks(n)?t.splice(n,0,this.value):t[n]=this.value,{newDocument:e,index:n}},remove:function(t,n,e){var r=t.splice(n,1);return{newDocument:e,removed:r[0]}},replace:function(t,n,e){var r=t[n];return t[n]=this.value,{newDocument:e,removed:r}},move:xi.move,copy:xi.copy,test:xi.test,_get:xi._get};function Ts(t,n){if(n=="")return t;var e={op:"_get",path:n};return Fr(t,e),e.value}function Fr(t,n,e,r,i,a){if(e===void 0&&(e=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),e&&(typeof e=="function"?e(n,0,t,n.path):Cs(n,0)),n.path===""){var o={newDocument:t};if(n.op==="add")return o.newDocument=n.value,o;if(n.op==="replace")return o.newDocument=n.value,o.removed=t,o;if(n.op==="move"||n.op==="copy")return o.newDocument=Ts(t,n.from),n.op==="move"&&(o.removed=t),o;if(n.op==="test"){if(o.test=ka(t,n.value),o.test===!1)throw new st("Test operation failed","TEST_OPERATION_FAILED",a,n,t);return o.newDocument=t,o}else{if(n.op==="remove")return o.removed=t,o.newDocument=null,o;if(n.op==="_get")return n.value=t,o;if(e)throw new st("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,n,t);return o}}else{r||(t=Tt(t));var s=n.path||"",u=s.split("/"),l=t,c=1,d=u.length,f=void 0,h=void 0,p=void 0;for(typeof e=="function"?p=e:p=Cs;;){if(h=u[c],h&&h.indexOf("~")!=-1&&(h=Sa(h)),i&&h=="__proto__")throw new TypeError("JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(e&&f===void 0&&(l[h]===void 0?f=u.slice(0,c).join("/"):c==d-1&&(f=n.path),f!==void 0&&p(n,0,t,f)),c++,Array.isArray(l)){if(h==="-")h=l.length;else{if(e&&!ks(h))throw new st("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,n,t);ks(h)&&(h=~~h)}if(c>=d){if(e&&n.op==="add"&&h>l.length)throw new st("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,n,t);var o=dk[n.op].call(n,l,h,t);if(o.test===!1)throw new st("Test operation failed","TEST_OPERATION_FAILED",a,n,t);return o}}else if(c>=d){var o=xi[n.op].call(n,l,h,t);if(o.test===!1)throw new st("Test operation failed","TEST_OPERATION_FAILED",a,n,t);return o}if(l=l[h],e&&c<d&&(!l||typeof l!="object"))throw new st("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,n,t)}}}function Ms(t,n,e,r,i){if(r===void 0&&(r=!0),i===void 0&&(i=!0),e&&!Array.isArray(n))throw new st("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(t=Tt(t));for(var a=new Array(n.length),o=0,s=n.length;o<s;o++)a[o]=Fr(t,n[o],e,!0,i,o),t=a[o].newDocument;return a.newDocument=t,a}function fk(t,n,e){var r=Fr(t,n);if(r.test===!1)throw new st("Test operation failed","TEST_OPERATION_FAILED",e,n,t);return r.newDocument}function Cs(t,n,e,r){if(typeof t!="object"||t===null||Array.isArray(t))throw new st("Operation is not an object","OPERATION_NOT_AN_OBJECT",n,t,e);if(xi[t.op]){if(typeof t.p
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",Nscr:"\u{1D4A9}",Ntild:"\xD1",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacut:"\xD3",Oacute:"\xD3",Ocir:"\xD4",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograv:"\xD2",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslas:"\xD8",Oslash:"\xD8",Otild:"\xD5",Otilde:"\xD5",Otimes:"\u2A37",Oum:"\xD6",Ouml:"\xD6",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",Poincareplane:"\u210C",Popf:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",Prime:"\u2033",Product:"\u220F",Proportion:"\u2237",Proportional:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUO:'"',QUOT:'"',Qfr:"\u{1D514}",Qopf:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",RE:"\xAE",REG:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:"\u211C",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",Rfr:"\u211C",Rho:"\u03A1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",Rightarrow:"\u21D2",Ropf:"\u211D",RoundImplies:"\u2970",Rrightarrow:"\u21DB",Rscr:"\u211B",Rsh:"\u21B1",RuleDelayed:"\u29F4",SHCHcy:"\u0429",SHcy:"\u0428",SOFTcy:"\u042C",Sacute:"\u015A",Sc:"\u2ABC",Scaron:"\u0160",Scedil:"\u015E",Scirc:"\u015C",Scy:"\u0421",Sfr:"\u{1D516}",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",Sigma:"\u03A3",SmallCircle:"\u2218",Sopf:"\u{1D54A}",Sqrt:"\u221A",Square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",Sscr:"\u{1D4AE}",Star:"\u22C6",Sub:"\u22D0",Subset:"\u22D0",SubsetEqual:"\u2286",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",SuchThat:"\u220B",Sum:"\u2211",Sup:"\u22D1",Superset:"\u2283",SupersetEqual:"\u2287",Supset:"\u22D1",THOR:"\xDE",THORN:"\xDE",TRADE:"\u
`;break}case-3:{o=`\r
2022-04-07 16:18:07 +00:00
`;break}case-2:{o=n?" ":" ";break}case-1:{if(!n&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join("")}var Eu={};Oi(Eu,{attentionMarkers:()=>z0,contentInitial:()=>R0,disable:()=>V0,document:()=>F0,flow:()=>B0,flowInitial:()=>H0,insideSpan:()=>U0,string:()=>K0,text:()=>$0});var F0={[42]:Ht,[43]:Ht,[45]:Ht,[48]:Ht,[49]:Ht,[50]:Ht,[51]:Ht,[52]:Ht,[53]:Ht,[54]:Ht,[55]:Ht,[56]:Ht,[57]:Ht,[62]:Ls},R0={[91]:hu},H0={[-2]:Aa,[-1]:Aa,[32]:Aa},B0={[35]:mu,[42]:Br,[45]:[Ks,Br],[60]:vu,[61]:Ks,[95]:Br,[96]:Ns,[126]:Ns},K0={[38]:Os,[92]:Ps},$0={[-5]:Ia,[-4]:Ia,[-3]:Ia,[33]:bu,[38]:Os,[42]:Da,[60]:[cu,yu],[91]:wu,[92]:[pu,Ps],[93]:Hr,[95]:Da,[96]:du},U0={null:[Da,Iv]},z0={null:[42,95]},V0={null:[]};function Rv(t={}){let n=bv([Eu].concat(t.extensions||[])),e={defined:[],lazy:{},constructs:n,content:r(_v),document:r(Tv),flow:r(Av),string:r(Lv),text:r(Pv)};return e;function r(i){return a;function a(o){return Fv(e,i,o)}}}var Hv=/[\0\t\n\r]/g;function Bv(){let t=1,n="",e=!0,r;return i;function i(a,o,s){let u=[],l,c,d,f,h;for(a=n+a.toString(o),d=0,n="",e&&(a.charCodeAt(0)===65279&&d++,e=void 0);d<a.length;){if(Hv.lastIndex=d,l=Hv.exec(a),f=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(f),!l){n=a.slice(d);break}if(h===10&&d===f&&r)u.push(-3),r=void 0;else switch(r&&(u.push(-5),r=void 0),d<f&&(u.push(a.slice(d,f)),t+=f-d),h){case 0:{u.push(65533),t++;break}case 9:{for(c=Math.ceil(t/4)*4,u.push(-2);t++<c;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:r=!0,t=1}d=f+1}return s&&(r&&u.push(-5),n&&u.push(n),u.push(null)),u}}function Kv(t){for(;!Fs(t););return t}function $s(t,n){let e=Number.parseInt(t,n);return e<9||e===11||e>13&&e<32||e>126&&e<160||e>55295&&e<57344||e>64975&&e<65008||(e&65535)==65535||(e&65535)==65534||e>1114111?"\uFFFD":String.fromCharCode(e)}var j0=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $v(t){return t.replace(j0,W0)}function W0(t,n,e){if(n)return n;if(e.charCodeAt(0)===35){let i=e.charCodeAt(1),a=i===120||i===88;return $s(e.slice(a?2:1),a?16:10)}return _i(e)||t}var Ti={}.hasOwnProperty;function La(t){return!t||typeof t!="object"?"":Ti.call(t,"position")||Ti.call(t,"type")?Uv(t.position):Ti.call(t,"start")||Ti.call(t,"end")?Uv(t):Ti.call(t,"line")||Ti.call(t,"column")?Su(t):""}function Su(t){return zv(t&&t.line)+":"+zv(t&&t.column)}function Uv(t){return Su(t&&t.start)+"-"+Su(t&&t.end)}function zv(t){return t&&typeof t=="number"?t:1}var xu={}.hasOwnProperty,Us=function(t,n,e){return typeof n!="string"&&(e=n,n=void 0),q0(e)(Kv(Rv(e).document().write(Bv()(t,n,!0))))};function q0(t={}){let n=Vv({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(zn),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:u(nn),blockQuote:u(Ge),characterEscape:ie,characterReference:ie,codeFenced:u(ht),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:u(ht,l),codeText:u(pt,l),codeTextData:ie,data:ie,codeFlowValue:ie,definition:u(tn),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:u(yn),hardBreakEscape:u(Wt),hardBreakTrailing:u(Wt),htmlFlow:u(Ct,l),htmlFlowData:ie,htmlText:u(Ct,l),htmlTextData:ie,image:u(Un),label:l,link:u(zn),listItem:u(Mn),listItemValue:g,listOrdered:u(Tn,p),listUnordered:u(Tn),paragraph:u(Cn),reference:V,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:u(nn),strong:u(lt),thematicBreak:u(tt)},exit:{atxHeading:d(),atxHeadingSequence:B,autolink:d(),autolinkEmail:Fe,autolinkProtocol:Ee,blockQuote:d(),characterEscapeValue:q,characterReferenceMarkerHexadecimal:G,characterReferenceMarkerNumeric:G,characterReferenceValue:ye,codeFenced:d(k),codeFencedFence:T,codeFencedFenceInfo:w,codeFencedFenceMeta:S,codeFlowValue:q,codeIndented:d(D),codeText:d(fe),codeTextData:q,data:q,definition:d(),definitionDestinationString:O,definitionLabelString:N,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(ce),htmlFlowData:q,htmlText:d(de),htmlTextData:q,image:d(De),label:I,labelText:A,lineEnding:J,link:d(he
`),blockId:void 0,title:"",titleSearch:"",metadata:{dateStr:void 0,date:void 0,time:void 0,timeStr:void 0,tags:[],fileAccessor:void 0,file:void 0,fileMetadata:void 0,fileMetadataOrder:void 0},dom:void 0,isComplete:!!e.checked};return dv(e,l=>l.type!=="paragraph",l=>{let c=l;if(c.type==="blockid")return u.blockId=c.value,!0;if(c.type==="hashtag")return u.metadata.tags||(u.metadata.tags=[]),u.metadata.tags.push("#"+c.value),r&&(s=Is(s,{start:l.position.start.offset-a.start,end:l.position.end.offset-a.start})),!0;if(c.type==="date"||c.type==="dateLink")return u.metadata.dateStr=c.date,i&&(s=Is(s,{start:l.position.start.offset-a.start,end:l.position.end.offset-a.start})),!0;if(c.type==="time")return u.metadata.timeStr=c.time,s=Is(s,{start:l.position.start.offset-a.start,end:l.position.end.offset-a.start}),!0;if(c.type==="embedWikilink")return u.metadata.fileAccessor=c.fileAccessor,!0;if(c.type==="wikilink"||c.type==="link"&&c.fileAccessor)return u.metadata.fileAccessor=c.fileAccessor,u.metadata.fileMetadata=c.fileMetadata,u.metadata.fileMetadataOrder=c.fileMetadataOrder,!0;if(c.type==="embedLink")return u.metadata.fileAccessor=c.fileAccessor,!0}),u.title=vv(s).replace(/<br>/g,`
`),u}function a_(t,n,e){if(t.type!=="heading"||_a(t,{includeImageAlt:!1})!==F("Archive"))return!1;let r=fv(n,e);return r&&r.type==="thematicBreak"}function dy(t,n,e,r,i){let a=[],o=[];return r.children.forEach((s,u)=>{if(s.type==="heading"){let l=a_(s,r.children,u),c=iu(s),d=au(i,c),f=!1,h=hv(r.children,u,"list",p=>{if(p.type==="heading")return!1;if(p.type==="paragraph"){let g=_a(p);if(g.startsWith("%% kanban:settings"))return!1;if(g===F("Complete"))return f=!0,!0}return!0});if(l&&h){o.push(...h.children.map(p=>({...Uo,id:Ke(),data:Ws(t,i,p)})));return}h?a.push({...mr,children:h.children.map(p=>({...Uo,id:Ke(),data:Ws(t,i,p)})),id:Ke(),data:{title:d,shouldMarkItemsComplete:f}}):a.push({...mr,children:[],id:Ke(),data:{title:d,shouldMarkItemsComplete:f}})}}),{...zo,id:t.file.path,children:a,data:{settings:n,frontmatter:e,archive:o,isSearching:!1,errors:[]}}}async function Du(t,n,e){let r=`- [${n.data.isComplete?"x":" "}] ${e.replace(/(\r\n|\n)/g,"<br>").trim()}${n.data.blockId?` ^${n.data.blockId}`:""}`,i=Cu(t,r),a=Ws(t,r,i.children[0].children[0]),o=(0,js.default)(n,{data:{$set:a}});try{await Ta(t,o)}catch(s){console.error(s)}return o}async function fy(t,n,e,r){let i=`- [${e?"x":" "}] ${n.trim().replace(/(\r\n|\n)/g,"<br>")}`,a=Cu(t,i),o=Ws(t,i,a.children[0].children[0]);o.forceEditMode=!!r;let s={...Uo,id:Ke(),data:o};try{await Ta(t,s)}catch(u){console.error(u)}return s}async function hy(t,n){try{return(0,js.default)(n,{children:{$set:await Promise.all(n.children.map(async e=>{try{return(0,js.default)(e,{children:{$set:await Promise.all(e.children.map(r=>Du(t,r,r.data.titleRaw)))}})}catch(r){throw t.setError(r),r}}))}})}catch(e){throw t.setError(e),e}}function py(t){return`- [${t.data.isComplete?"x":" "}] ${t.data.titleRaw.replace(/(\r\n|\n)/g,"<br>").trim()}${t.data.blockId?` ^${t.data.blockId}`:""}`}function o_(t){let n=[];return n.push(`## ${t.data.title}`),n.push(""),t.data.shouldMarkItemsComplete&&n.push(Ng),t.children.forEach(e=>{n.push(py(e))}),n.push(""),n.push(""),n.push(""),n.join(`
`)}function s_(t){if(t.length){let n=[Fg,"",`## ${F("Archive")}`,""];return t.forEach(e=>{n.push(py(e))}),n.join(`
`)}return""}function my(t){let n=t.children.reduce((r,i)=>r+o_(i),"");return["---","",(0,uy.stringifyYaml)(t.data.frontmatter),"---","",""].join(`
`)+n+s_(t.data.archive)+Rg(t.data.settings)}var Au=class{constructor(n){this.stateManager=n}newItem(n,e,r){return fy(this.stateManager,n,e,r)}updateItemContent(n,e){return Du(this.stateManager,n,e)}boardToMd(n){return my(n)}mdToBoard(n){let{ast:e,settings:r,frontmatter:i}=cy(this.stateManager,n),a=dy(this.stateManager,r,i,e,n);if(this.stateManager.state){let s=eu(this.stateManager.state,a).filter(l=>["/id","/dom","/date","/time","/titleSearch","/file"].every(c=>!l.path.endsWith(c))),u=(0,gy.immutableJSONPatch)(this.stateManager.state,s);return gv(this.stateManager,u,s)}return mv(this.stateManager,a)}reparseBoard(){return hy(this.stateManager,this.stateManager.state)}};var Iu=class{constructor(n,e,r,i,a){this.stateReceivers=[];this.settingsNotifiers=new Map;this.viewSet=new Set;this.compiledSettings={};this.newBoardPromise=null;this.getSetting=(n,e)=>e&&e[n]!==void 0?e[n]:this.compiledSettings&&this.compiledSettings[n]!==void 0?this.compiledSettings[n]:this.getSettingRaw(n);this.getSettingRaw=(n,e)=>{var r,i;return e&&e[n]!==void 0?e[n]:((i=(r=this.state)==null?void 0:r.data)==null?void 0:i.settings)&&this.state.data.settings[n]!==void 0?this.state.data.settings[n]:this.getGlobalSetting(n)};this.getGlobalSetting=n=>{let e=this.getGlobalSettings();return e&&e[n]!==void 0?e[n]:null};this.app=n,this.file=e.file,this.onEmpty=i,this.getGlobalSettings=a,this.parser=new Au(this),this.registerView(e,r,!0)}getAView(){return this.viewSet.values().next().value}registerView(n,e,r){this.viewSet.has(n)||(this.viewSet.add(n),n.initHeaderButtons()),r&&(this.newBoardPromise!==null?this.newBoardPromise.then(()=>this.newBoard(e)):this.newBoardPromise=this.newBoard(e).then(()=>{this.newBoardPromise=null}).catch(i=>{console.error(i),this.setError(i)}))}unregisterView(n){this.viewSet.has(n)&&(this.viewSet.delete(n),this.viewSet.size===0&&this.onEmpty())}buildSettingRetrievers(){return{getGlobalSettings:this.getGlobalSettings,getGlobalSetting:this.getGlobalSetting,getSetting:this.getSetting}}async newBoard(n){try{await this.setState(await this.getParsedBoard(n),!1)}catch(e){this.setError(e)}}saveToDisk(){if(this.state.data.errors.length>0)return;let n=this.getAView(),e=this.parser.boardToMd(this.state);n.requestSaveToDisk(e),this.viewSet.forEach(r=>{r.data=e})}softRefresh(){this.stateReceivers.forEach(n=>n({...this.state}))}async forceRefresh(){if(this.state)try{this.compileSettings(),this.state=await this.parser.reparseBoard(),this.stateReceivers.forEach(n=>n(this.state)),this.viewSet.forEach(n=>n.initHeaderButtons())}catch(n){console.error(n),this.setError(n)}}async setState(n,e=!0){var r;try{let i=(r=this.state)==null?void 0:r.data.settings,a=typeof n=="function"?await n(this.state):n,o=a==null?void 0:a.data.settings;i&&o&&Bg(i,o)?(this.state=(0,Ii.default)(this.state,{data:{settings:{$set:o}}}),this.compileSettings(),this.state=await this.parser.reparseBoard()):(this.state=a,this.compileSettings()),this.viewSet.forEach(s=>s.initHeaderButtons()),e&&this.saveToDisk(),this.stateReceivers.forEach(s=>s(this.state)),i!==o&&o&&this.settingsNotifiers.forEach((s,u)=>{(!i&&o||i[u]!==o[u])&&s.forEach(l=>l())})}catch(i){console.error(i),this.setError(i)}}useState(){let[n,e]=v.useState(this.state);return v.useEffect(()=>(this.stateReceivers.push(r=>{e(r)}),e(this.state),()=>{this.stateReceivers.remove(e)}),[]),n}useSetting(n){let[e,r]=v.useState(this.getSetting(n));return v.useEffect(()=>{let i=()=>{r(this.getSetting(n))};return this.settingsNotifiers.has(n)?this.settingsNotifiers.get(n).push(i):this.settingsNotifiers.set(n,[i]),()=>{this.settingsNotifiers.get(n).remove(i)}},[]),e}compileSettings(n){var s,u,l,c,d;let e=this.getGlobalSetting("metadata-keys")||[],r=this.getSettingRaw("metadata-keys",n)||[],i=this.getSettingRaw("date-format",n)||Xr(this.app),a=this.getSettingRaw("time-format",n)||Vi(this.app),o=this.getSettingRaw("prepend-archive-format",n)||`${i} ${a}`;this.compiledSettings={"date-format":i,"date-display-format":this.getSettingRaw("date-display-format",n)||i,"date-trigger":this.getSettingRaw("date-trigger",n)||ys,"time-format":a,"time-tr
/*!
* Fuse.js v3.4.5 - Lightweight fuzzy-search (http://fusejs.io)
*
* Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)
* All Rights Reserved. Apache Software License 2.0
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
/*!
* https://github.com/Starcounter-Jack/JSON-Patch
* (c) 2017 Joachim Wester
* MIT license
*/
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
/*! choices.js v9.0.1 | © 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme */
/*!***************************************************
* mark.js v8.11.1
* https://markjs.io/
* Copyright (c) 20142018, Julian Kühnel
* Released under the MIT license https://git.io/vwTVl
*****************************************************/