digital-garden/.obsidian/plugins/obsidian-kanban/main.js

152 lines
968 KiB
JavaScript
Raw Normal View History

2024-06-13 21:01:37 +03:00
var sF=Object.create;var Vs=Object.defineProperty;var lF=Object.getOwnPropertyDescriptor;var uF=Object.getOwnPropertyNames;var cF=Object.getPrototypeOf,dF=Object.prototype.hasOwnProperty;var fF=(e,t,r)=>t in e?Vs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var hF=(e,t)=>()=>(e&&(t=e(e=0)),t);var wn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Rf=(e,t)=>{for(var r in t)Vs(e,r,{get:t[r],enumerable:!0})},av=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of uF(t))!dF.call(e,i)&&i!==r&&Vs(e,i,{get:()=>t[i],enumerable:!(n=lF(t,i))||n.enumerable});return e};var Ct=(e,t,r)=>(r=e!=null?sF(cF(e)):{},av(t||!e||!e.__esModule?Vs(r,"default",{value:e,enumerable:!0}):r,e)),ov=e=>av(Vs({},"__esModule",{value:!0}),e);var ur=(e,t,r)=>(fF(e,typeof t!="symbol"?t+"":t,r),r);var ln=wn((hi,Zv)=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});function Qr(e){return typeof e=="object"&&!("toString"in e)?Object.prototype.toString.call(e).slice(8,-1):e}var eI=typeof process=="object"&&!0;function Vr(e,t){if(!e)throw eI?new Error("Invariant failed"):new Error(t())}hi.invariant=Vr;var nh=Object.prototype.hasOwnProperty,tI=Array.prototype.splice,nI=Object.prototype.toString;function Ua(e){return nI.call(e).slice(8,-1)}var bu=Object.assign||function(e,t){return rh(t).forEach(function(r){nh.call(t,r)&&(e[r]=t[r])}),e},rh=typeof Object.getOwnPropertySymbols=="function"?function(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.keys(e)};function sa(e){return Array.isArray(e)?bu(e.constructor(e.length),e):Ua(e)==="Map"?new Map(e):Ua(e)==="Set"?new Set(e):e&&typeof e=="object"?bu(Object.create(Object.getPrototypeOf(e)),e):e}var Gv=function(){function e(){this.commands=bu({},rI),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(t,r){return t===r},this.update.newContext=function(){return new e().update}}return Object.defineProperty(e.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(t){this.update.isEquals=t},enumerable:!0,configurable:!0}),e.prototype.extend=function(t,r){this.commands[t]=r},e.prototype.update=function(t,r){var n=this,i=typeof r=="function"?{$apply:r}:r;Array.isArray(t)&&Array.isArray(i)||Vr(!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."}),Vr(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(n.commands).join(", ")+".")});var a=t;return rh(i).forEach(function(o){if(nh.call(n.commands,o)){var s=t===a;a=n.commands[o](i[o],a,i,t),s&&n.isEquals(a,t)&&(a=t)}else{var u=Ua(t)==="Map"?n.update(t.get(o),i[o]):n.update(t[o],i[o]),l=Ua(a)==="Map"?a.get(o):a[o];(!n.isEquals(u,l)||typeof u=="undefined"&&!nh.call(t,o))&&(a===t&&(a=sa(t)),Ua(a)==="Map"?a.set(o,u):a[o]=u)}}),a},e}();hi.Context=Gv;var rI={$push:function(e,t,r){return jv(t,r,"$push"),e.length?t.concat(e):t},$unshift:function(e,t,r){return jv(t,r,"$unshift"),e.length?e.concat(t):t},$splice:function(e,t,r,n){return iI(t,r),e.forEach(function(i){Jv(i),t===n&&i.length&&(t=sa(n)),tI.apply(t,i)}),t},$set:function(e,t,r){return oI(r),e},$toggle:function(e,t){zs(e,"$toggle");var r=e.length?sa(t):t;return e.forEach(function(n){r[n]=!t[n]}),r},$unset:function(e,t,r,n){return zs(e,"$unset"),e.forEach(function(i){Object.hasOwnProperty.call(t,i)&&(t===n&&(t=sa(n)),delete t[i])}),t},$add:function(e,t,r,n){return qv(t,"$add"),zs(e,"$add"),Ua(t)==="Map"?e.forEach(function(i){var a=i[0],o=i[1];t===n&&t.get(a)!==o&&(t=sa(n)),t.set(a,o)}):e.forEach(function(i){t===n&&!t.has(i)&&(t=sa(n)),t.add(i)}),t},$remove:function(e,t,r,n){return qv(t,"$remove"),zs(e,"$remove"),e.forEach(function(i){t===n&&t.has(i)&&(t=sa(n)),t.delete(i)}),t},$merge:function(e,t,r,n){return sI(t,e
`||L.charAt(ge)==="\r"&&L.charAt(ge+1)!==`
`)&&(de++,ve===0&&(ve=ge+1)),ge--}var M=ue+de,H=K-ve;return ee[K]={line:M,lineStart:ve},{offset:K,line:M+1,column:H+1}}function oe(L){if(!x(L))throw new Error("not a parser: "+L)}function te(L,K){return typeof L=="string"?L.charAt(K):L[K]}function re(L){if(typeof L!="number")throw new Error("not a number: "+L)}function ne(L){if(typeof L!="function")throw new Error("not a function: "+L)}function be(L){if(typeof L!="string")throw new Error("not a string: "+L)}var pe=2,De=3,Ce=8,U=5*Ce,Je=4*Ce,it=" ";function N(L,K){return new Array(K+1).join(L)}function Ze(L,K,ee){var ue=K-L.length;return ue<=0?L:N(ee,ue)+L}function It(L,K,ee,ue){return{from:L-K>0?L-K:0,to:L+ee>ue?ue:L+ee}}function Mt(L,K){var ee,ue,de,ve,ge,M=K.index,H=M.offset,q=1;if(H===L.length)return"Got the end of the input";if(A(L)){var ie=H-H%Ce,ye=H-ie,ce=It(ie,U,Je+Ce,L.length),ae=l(function(Te){return l(function(Ue){return Ze(Ue.toString(16),2,"0")},Te)},function(Te,Ue){var We=Te.length,Ft=[],Hn=0;if(We<=Ue)return[Te.slice()];for(var Ot=0;Ot<We;Ot++)Ft[Hn]||Ft.push([]),Ft[Hn].push(Te[Ot]),(Ot+1)%Ue==0&&Hn++;return Ft}(L.slice(ce.from,ce.to).toJSON().data,Ce));ve=function(Te){return Te.from===0&&Te.to===1?{from:Te.from,to:Te.to}:{from:Te.from/Ce,to:Math.floor(Te.to/Ce)}}(ce),ue=ie/Ce,ee=3*ye,ye>=4&&(ee+=1),q=2,de=l(function(Te){return Te.length<=4?Te.join(" "):Te.slice(0,4).join(" ")+" "+Te.slice(4).join(" ")},ae),(ge=(8*(ve.to>0?ve.to-1:ve.to)).toString(16).length)<2&&(ge=2)}else{var Se=L.split(/\r\n|[\n\r\u2028\u2029]/);ee=M.column-1,ue=M.line-1,ve=It(ue,pe,De,Se.length),de=Se.slice(ve.from,ve.to),ge=ve.to.toString().length}var nt=ue-ve.from;return A(L)&&(ge=(8*(ve.to>0?ve.to-1:ve.to)).toString(16).length)<2&&(ge=2),u(function(Te,Ue,We){var Ft,Hn=We===nt,Ot=Hn?"> ":it;return Ft=A(L)?Ze((8*(ve.from+We)).toString(16),ge,"0"):Ze((ve.from+We+1).toString(),ge," "),[].concat(Te,[Ot+Ft+" | "+Ue],Hn?[it+N(" ",ge)+" | "+Ze("",ee," ")+N("^",q)]:[])},[],de).join(`
`)}function jt(L,K){return[`
`,"-- PARSING FAILED "+N("-",50),`
`,Mt(L,K),`
`,(ee=K.expected,ee.length===1?`Expected:
`+ee[0]:`Expected one of the following:
`+ee.join(", ")),`
`].join("");var ee}function vt(L){return L.flags!==void 0?L.flags:[L.global?"g":"",L.ignoreCase?"i":"",L.multiline?"m":"",L.unicode?"u":"",L.sticky?"y":""].join("")}function Wt(){for(var L=[].slice.call(arguments),K=L.length,ee=0;ee<K;ee+=1)oe(L[ee]);return a(function(ue,de){for(var ve,ge=new Array(K),M=0;M<K;M+=1){if(!(ve=G(L[M]._(ue,de),ve)).status)return ve;ge[M]=ve.value,de=ve.index}return G(P(de,ge),ve)})}function Tt(){var L=[].slice.call(arguments);if(L.length===0)throw new Error("seqMap needs at least one argument");var K=L.pop();return ne(K),Wt.apply(null,L).map(function(ee){return K.apply(null,ee)})}function Jt(){var L=[].slice.call(arguments),K=L.length;if(K===0)return jn("zero alternates");for(var ee=0;ee<K;ee+=1)oe(L[ee]);return a(function(ue,de){for(var ve,ge=0;ge<L.length;ge+=1)if((ve=G(L[ge]._(ue,de),ve)).status)return ve;return ve})}function en(L,K){return gn(L,K).or(xn([]))}function gn(L,K){return oe(L),oe(K),Tt(L,K.then(L).many(),function(ee,ue){return[ee].concat(ue)})}function yn(L){be(L);var K="'"+L+"'";return a(function(ee,ue){var de=ue+L.length,ve=ee.slice(ue,de);return ve===L?P(de,ve):B(ue,K)})}function vn(L,K){(function(de){if(!(de instanceof RegExp))throw new Error("not a regexp: "+de);for(var ve=vt(de),ge=0;ge<ve.length;ge++){var M=ve.charAt(ge);if(M!=="i"&&M!=="m"&&M!=="u"&&M!=="s")throw new Error('unsupported regexp flag "'+M+'": '+de)}})(L),arguments.length>=2?re(K):K=0;var ee=function(de){return RegExp("^(?:"+de.source+")",vt(de))}(L),ue=""+L;return a(function(de,ve){var ge=ee.exec(de.slice(ve));if(ge){if(0<=K&&K<=ge.length){var M=ge[0],H=ge[K];return P(ve+M.length,H)}return B(ve,"valid match group (0 to "+ge.length+") in "+ue)}return B(ve,ue)})}function xn(L){return a(function(K,ee){return P(ee,L)})}function jn(L){return a(function(K,ee){return B(ee,L)})}function sn(L){if(x(L))return a(function(K,ee){var ue=L._(K,ee);return ue.index=ee,ue.value="",ue});if(typeof L=="string")return sn(yn(L));if(L instanceof RegExp)return sn(vn(L));throw new Error("not a string, regexp, or parser: "+L)}function Rt(L){return oe(L),a(function(K,ee){var ue=L._(K,ee),de=K.slice(ee,ue.index);return ue.status?B(ee,'not "'+de+'"'):P(ee,null)})}function Vt(L){return ne(L),a(function(K,ee){var ue=te(K,ee);return ee<K.length&&L(ue)?P(ee+1,ue):B(ee,"a character/byte matching "+L)})}function Sr(L,K){arguments.length<2&&(K=L,L=void 0);var ee=a(function(ue,de){return ee._=K()._,ee._(ue,de)});return L?ee.desc(L):ee}function Rr(){return jn("fantasy-land/empty")}o.parse=function(L){if(typeof L!="string"&&!A(L))throw new Error(".parse must be called with a string or Buffer as its argument");var K,ee=this.skip(At)._(L,0);return K=ee.status?{status:!0,value:ee.value}:{status:!1,index:Q(L,ee.furthest),expected:ee.expected},delete J[L],K},o.tryParse=function(L){var K=this.parse(L);if(K.status)return K.value;var ee=jt(L,K),ue=new Error(ee);throw ue.type="ParsimmonError",ue.result=K,ue},o.assert=function(L,K){return this.chain(function(ee){return L(ee)?xn(ee):jn(K)})},o.or=function(L){return Jt(this,L)},o.trim=function(L){return this.wrap(L,L)},o.wrap=function(L,K){return Tt(L,this,K,function(ee,ue){return ue})},o.thru=function(L){return L(this)},o.then=function(L){return oe(L),Wt(this,L).map(function(K){return K[1]})},o.many=function(){var L=this;return a(function(K,ee){for(var ue=[],de=void 0;;){if(!(de=G(L._(K,ee),de)).status)return G(P(ee,ue),de);if(ee===de.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");ee=de.index,ue.push(de.value)}})},o.tieWith=function(L){return be(L),this.map(function(K){if(function(de){if(!O(de))throw new Error("not an array: "+de)}(K),K.length){be(K[0]);for(var ee=K[0],ue=1;ue<K.length;ue++)be(K[ue]),ee+=L+K[ue];return ee}return""})},o.tie=function(){return this.tieWith("")},o.times=function(L,K){var ee=this;return arguments.length<2&&(K=L),re(L),re(K),a(function(ue,de){for(var ve=[],ge=void 0,M=void 0,H=0;H<L;H+=1){if(M=G(ge=ee._(ue,de),M),!ge.status)return M;de=ge.index,ve.push(ge.value)}for(;H<K&&(M
`),ar=yn(`\r
`),ht=Jt(ar,Ht,_n).desc("newline"),St=Jt(ht,At);a.all=rn,a.alt=Jt,a.any=Hr,a.cr=_n,a.createLanguage=function(L){var K={};for(var ee in L)({}).hasOwnProperty.call(L,ee)&&function(ue){K[ue]=Sr(function(){return L[ue](K)})}(ee);return K},a.crlf=ar,a.custom=function(L){return a(L(P,B))},a.digit=Z,a.digits=me,a.empty=Rr,a.end=St,a.eof=At,a.fail=jn,a.formatError=jt,a.index=Bt,a.isParser=x,a.lazy=Sr,a.letter=Ie,a.letters=at,a.lf=Ht,a.lookahead=sn,a.makeFailure=B,a.makeSuccess=P,a.newline=ht,a.noneOf=function(L){return Vt(function(K){return L.indexOf(K)<0}).desc("none of '"+L+"'")},a.notFollowedBy=Rt,a.of=xn,a.oneOf=function(L){for(var K=L.split(""),ee=0;ee<K.length;ee++)K[ee]="'"+K[ee]+"'";return Vt(function(ue){return L.indexOf(ue)>=0}).desc(K)},a.optWhitespace=Dt,a.Parser=a,a.range=function(L,K){return Vt(function(ee){return L<=ee&&ee<=K}).desc(L+"-"+K)},a.regex=vn,a.regexp=vn,a.sepBy=en,a.sepBy1=gn,a.seq=Wt,a.seqMap=Tt,a.seqObj=function(){for(var L,K={},ee=0,ue=(L=arguments,Array.prototype.slice.call(L)),de=ue.length,ve=0;ve<de;ve+=1){var ge=ue[ve];if(!x(ge)){if(O(ge)&&ge.length===2&&typeof ge[0]=="string"&&x(ge[1])){var M=ge[0];if(Object.prototype.hasOwnProperty.call(K,M))throw new Error("seqObj: duplicate key "+M);K[M]=!0,ee++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(ee===0)throw new Error("seqObj expects at least one named parser, found zero");return a(function(H,q){for(var ie,ye={},ce=0;ce<de;ce+=1){var ae,Se;if(O(ue[ce])?(ae=ue[ce][0],Se=ue[ce][1]):(ae=null,Se=ue[ce]),!(ie=G(Se._(H,q),ie)).status)return ie;ae&&(ye[ae]=ie.value),q=ie.index}return G(P(q,ye),ie)})},a.string=yn,a.succeed=xn,a.takeWhile=function(L){return ne(L),a(function(K,ee){for(var ue=ee;ue<K.length&&L(te(K,ue));)ue++;return P(ue,K.slice(ee,ue))})},a.test=Vt,a.whitespace=Cn,a["fantasy-land/empty"]=Rr,a["fantasy-land/of"]=xn,a.Binary={bitSeq:h,bitSeqObj:function(L){m();var K={},ee=0,ue=l(function(ve){if(O(ve)){var ge=ve;if(ge.length!==2)throw new Error("["+ge.join(", ")+"] should be length 2, got length "+ge.length);if(be(ge[0]),re(ge[1]),Object.prototype.hasOwnProperty.call(K,ge[0]))throw new Error("duplicate key in bitSeqObj: "+ge[0]);return K[ge[0]]=!0,ee++,ge}return re(ve),[null,ve]},L);if(ee<1)throw new Error("bitSeqObj expects at least one named pair, got ["+L.join(", ")+"]");var de=l(function(ve){return ve[0]},ue);return h(l(function(ve){return ve[1]},ue)).map(function(ve){return u(function(ge,M){return M[0]!==null&&(ge[M[0]]=M[1]),ge},{},l(function(ge,M){return[ge,ve[M]]},de))})},byte:function(L){if(m(),re(L),L>255)throw new Error("Value specified to byte constructor ("+L+"=0x"+L.toString(16)+") is larger in value than a single byte.");var K=(L>15?"0x":"0x0")+L.toString(16);return a(function(ee,ue){var de=te(ee,ue);return de===L?P(ue+1,de):B(ue,K)})},buffer:function(L){return g("buffer",L).map(function(K){return Buffer.from(K)})},encodedString:function(L,K){return g("string",K).map(function(ee){return ee.toString(L)})},uintBE:v,uint8BE:v(1),uint16BE:v(2),uint32BE:v(4),uintLE:D,uint8LE:D(1),uint16LE:D(2),uint32LE:D(4),intBE:I,int8BE:I(1),int16BE:I(2),int32BE:I(4),intLE:C,int8LE:C(1),int16LE:C(2),int32LE:C(4),floatBE:g("floatBE",4).map(function(L){return L.readFloatBE(0)}),floatLE:g("floatLE",4).map(function(L){return L.readFloatLE(0)}),doubleBE:g("doubleBE",8).map(function(L){return L.readDoubleBE(0)}),doubleLE:g("doubleLE",8).map(function(L){return L.readDoubleLE(0)})},r.exports=a}])})})(kc,kc.exports);var W=kc.exports,Bm=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u
`)[0];let n=r.substring(2).trim();return W.makeSuccess(t+r.length,n)}),namedField:e=>W.alt(e.explicitNamedField,jP(ai.field).map(([t,r])=>Cc.named(qP(r),t))),sortField:e=>W.seqMap(ai.field.skip(W.optWhitespace),W.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),(t,r)=>{let n=r.length==0?"ascending":r[0].toLowerCase();return n=="desc"&&(n="descending"),n=="asc"&&(n="ascending"),{field:t,direction:n}}),headerClause:e=>e.queryType.chain(t=>{switch(t){case"table":return R0(()=>({type:t,fields:[],showId:!0}),W.seqMap(W.regexp(/WITHOUT\s+ID/i).skip(W.optWhitespace).atMost(1),W.sepBy(e.namedField,W.string(",").trim(W.optWhitespace)),(r,n)=>({type:t,fields:n,showId:r.length==0})));case"list":return R0(()=>({type:t,format:void 0,showId:!0}),W.seqMap(W.regexp(/WITHOUT\s+ID/i).skip(W.optWhitespace).atMost(1),ai.field.atMost(1),(r,n)=>({type:t,format:n.length==1?n[0]:void 0,showId:r.length==0})));case"task":return W.succeed({type:t});case"calendar":return W.whitespace.then(W.seqMap(e.namedField,r=>({type:t,showId:!0,field:r})));default:return W.fail(`Unrecognized query type '${t}'`)}}).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:e=>W.seqMap(W.regexp(/FROM/i),W.whitespace,ai.source,(t,r,n)=>n),whereClause:e=>W.seqMap(W.regexp(/WHERE/i),W.whitespace,ai.field,(t,r,n)=>({type:"where",clause:n})).desc("WHERE <expression>"),sortByClause:e=>W.seqMap(W.regexp(/SORT/i),W.whitespace,e.sortField.sepBy1(W.string(",").trim(W.optWhitespace)),(t,r,n)=>({type:"sort",fields:n})).desc("SORT field [ASC/DESC]"),limitClause:e=>W.seqMap(W.regexp(/LIMIT/i),W.whitespace,ai.field,(t,r,n)=>({type:"limit",amount:n})).desc("LIMIT <value>"),flattenClause:e=>W.seqMap(W.regexp(/FLATTEN/i).skip(W.whitespace),e.namedField,(t,r)=>({type:"flatten",field:r})).desc("FLATTEN <value> [AS <name>]"),groupByClause:e=>W.seqMap(W.regexp(/GROUP BY/i).skip(W.whitespace),e.namedField,(t,r)=>({type:"group",field:r})).desc("GROUP BY <value> [AS <name>]"),clause:e=>W.alt(e.fromClause,e.whereClause,e.sortByClause,e.limitClause,e.groupByClause,e.flattenClause),query:e=>W.seqMap(e.headerClause.trim(dm),e.fromClause.trim(dm).atMost(1),e.clause.trim(dm).many(),(t,r,n)=>({header:t,source:r.length==0?Si.folder(""):r[0],operations:n,settings:Hm}))}),dm=W.alt(W.whitespace,RS.comment).many().map(e=>e.join("")),GP=e=>{var t;return e?(t=e.plugins.plugins.dataview)==null?void 0:t.api:window.DataviewAPI},JP=e=>e.plugins.enabledPlugins.has("dataview");Ei.DATE_SHORTHANDS=Fm;Ei.DURATION_TYPES=Tm;Ei.EXPRESSION=ai;Ei.KEYWORDS=Im;Ei.QUERY_LANGUAGE=RS;Ei.getAPI=GP;Ei.isPluginEnabled=JP;Ei.parseField=KP});var HS=wn((Vm,$m)=>{(function(e,t){typeof Vm=="object"&&typeof $m!="undefined"?$m.exports=t():typeof define=="function"&&define.amd?define(t):e.Mark=t()})(Vm,function(){"use strict";var e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(s){return typeof s}:function(s){return s&&typeof Symbol=="function"&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s},t=function(s,u){if(!(s instanceof u))throw new TypeError("Cannot call a class as a function")},r=function(){function s(u,l){for(var c=0;c<l.length;c++){var d=l[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(u,d.key,d)}}return function(u,l,c){return l&&s(u.prototype,l),c&&s(u,c),u}}(),n=Object.assign||function(s){for(var u=1;u<arguments.length;u++){var l=arguments[u];for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(s[c]=l[c])}return s},i=function(){function s(u){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:5e3;t(this,s),this.ctx=u,this.iframes=l,this.exclude=c,this.iframesTimeout=d}return r(s,[{key:"getContexts",value:function(){var l=void 0,c=[];return typeof this.ctx=="undefined"||!this.ctx?l=[]:NodeList.prototype.isPrototypeOf(this.ctx)?l=Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?l=this.ctx:typeof this.ctx=="string"?l=Array.prototype.slice.call(document.querySelectorAll(this.ctx)):l=[this.c
[`+j+"] ";for(se in arguments[0])a(arguments[0],se)&&(F+=se+": "+arguments[0][se]+", ");F=F.slice(0,-2)}else F=arguments[j];S.push(F)}P(f+`
Arguments: `+Array.prototype.slice.call(S).join("")+`
`+new Error().stack),w=!1}return p.apply(this,arguments)},p)}var G={};function J(f,p){t.deprecationHandler!=null&&t.deprecationHandler(f,p),G[f]||(P(p),G[f]=!0)}t.suppressDeprecationWarnings=!1,t.deprecationHandler=null;function Q(f){return typeof Function!="undefined"&&f instanceof Function||Object.prototype.toString.call(f)==="[object Function]"}function oe(f){var p,w;for(w in f)a(f,w)&&(p=f[w],Q(p)?this[w]=p:this["_"+w]=p);this._config=f,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function te(f,p){var w=d({},f),S;for(S in p)a(p,S)&&(i(f[S])&&i(p[S])?(w[S]={},d(w[S],f[S]),d(w[S],p[S])):p[S]!=null?w[S]=p[S]:delete w[S]);for(S in f)a(f,S)&&!a(p,S)&&i(f[S])&&(w[S]=d({},w[S]));return w}function re(f){f!=null&&this.set(f)}var ne;Object.keys?ne=Object.keys:ne=function(f){var p,w=[];for(p in f)a(f,p)&&w.push(p);return w};var be={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function pe(f,p,w){var S=this._calendar[f]||this._calendar.sameElse;return Q(S)?S.call(p,w):S}function De(f,p,w){var S=""+Math.abs(f),F=p-S.length,j=f>=0;return(j?w?"+":"":"-")+Math.pow(10,Math.max(0,F)).toString().substr(1)+S}var Ce=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Je={},it={};function N(f,p,w,S){var F=S;typeof S=="string"&&(F=function(){return this[S]()}),f&&(it[f]=F),p&&(it[p[0]]=function(){return De(F.apply(this,arguments),p[1],p[2])}),w&&(it[w]=function(){return this.localeData().ordinal(F.apply(this,arguments),f)})}function Ze(f){return f.match(/\[[\s\S]/)?f.replace(/^\[|\]$/g,""):f.replace(/\\/g,"")}function It(f){var p=f.match(Ce),w,S;for(w=0,S=p.length;w<S;w++)it[p[w]]?p[w]=it[p[w]]:p[w]=Ze(p[w]);return function(F){var j="",se;for(se=0;se<S;se++)j+=Q(p[se])?p[se].call(F,f):p[se];return j}}function Mt(f,p){return f.isValid()?(p=jt(p,f.localeData()),Je[p]=Je[p]||It(p),Je[p](f)):f.localeData().invalidDate()}function jt(f,p){var w=5;function S(F){return p.longDateFormat(F)||F}for(U.lastIndex=0;w>=0&&U.test(f);)f=f.replace(U,S),U.lastIndex=0,w-=1;return f}var vt={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Wt(f){var p=this._longDateFormat[f],w=this._longDateFormat[f.toUpperCase()];return p||!w?p:(this._longDateFormat[f]=w.match(Ce).map(function(S){return S==="MMMM"||S==="MM"||S==="DD"||S==="dddd"?S.slice(1):S}).join(""),this._longDateFormat[f])}var Tt="Invalid date";function Jt(){return this._invalidDate}var en="%d",gn=/\d{1,2}/;function yn(f){return this._ordinal.replace("%d",f)}var vn={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function xn(f,p,w,S){var F=this._relativeTime[w];return Q(F)?F(f,p,w,S):F.replace(/%d/i,f)}function jn(f,p){var w=this._relativeTime[f>0?"future":"past"];return Q(w)?w(p):w.replace(/%s/i,p)}var sn={};function Rt(f,p){var w=f.toLowerCase();sn[w]=sn[w+"s"]=sn[p]=f}function Vt(f){return typeof f=="string"?sn[f]||sn[f.toLowerCase()]:void 0}function Sr(f){var p={},w,S;for(S in f)a(f,S)&&(w=Vt(S),w&&(p[w]=f[S]));return p}var Rr={};function Bt(f,p){Rr[f]=p}function Hr(f){var p=[],w;for(w in f)a(f,w)&&p.push({unit:w,priority:Rr[w]});return p.sort(function(S,F){return S.priority-F.priority}),p}function rn(f){return f%4===0&&f%100!==0||f%400===0}function At(f){return f<0?Math.ceil(f)||0:Math.floor(f)}function Z(f){var p=+f,w=0;return p!==0&&isFinite(p)&&(w=At(p)),w}function me(f,p){return function(w){return w!=null?(at(this,f,w),t.updateOffset(this,p),this):Ie(this,f)}}function Ie(f,p){return f.isValid()?f._d["get"+(f._isUTC?"UTC":"")+p]():NaN}function at(f,p,w){f.isValid()&&!isN
Search pattern: "`.concat(v,'"'));var I=this._prepareSearchers(v),C=I.tokenSearchers,x=I.fullSearcher,O=this._search(C,x),A=O.weights,P=O.results;return this._computeScore(A,P),this.options.shouldSort&&this._sort(P),D.limit&&typeof D.limit=="number"&&(P=P.slice(0,D.limit)),this._format(P)}},{key:"_prepareSearchers",value:function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",D=[];if(this.options.tokenize)for(var I=v.split(this.options.tokenSeparator),C=0,x=I.length;C<x;C+=1)D.push(new u(I[C],this.options));return{tokenSearchers:D,fullSearcher:new u(v,this.options)}}},{key:"_search",value:function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],D=arguments.length>1?arguments[1]:void 0,I=this.list,C={},x=[];if(typeof I[0]=="string"){for(var O=0,A=I.length;O<A;O+=1)this._analyze({key:"",value:I[O],record:O,index:O},{resultMap:C,results:x,tokenSearchers:v,fullSearcher:D});return{weights:null,results:x}}for(var P={},B=0,G=I.length;B<G;B+=1)for(var J=I[B],Q=0,oe=this.options.keys.length;Q<oe;Q+=1){var te=this.options.keys[Q];if(typeof te!="string"){if(P[te.name]={weight:1-te.weight||1},te.weight<=0||te.weight>1)throw new Error("Key weight has to be > 0 and <= 1");te=te.name}else P[te]={weight:1};this._analyze({key:te,value:this.options.getFn(J,te),record:J,index:B},{resultMap:C,results:x,tokenSearchers:v,fullSearcher:D})}return{weights:P,results:x}}},{key:"_analyze",value:function(v,D){var I=v.key,C=v.arrayIndex,x=C===void 0?-1:C,O=v.value,A=v.record,P=v.index,B=D.tokenSearchers,G=B===void 0?[]:B,J=D.fullSearcher,Q=J===void 0?[]:J,oe=D.resultMap,te=oe===void 0?{}:oe,re=D.results,ne=re===void 0?[]:re;if(O!=null){var be=!1,pe=-1,De=0;if(typeof O=="string"){this._log(`
Key: `.concat(I===""?"-":I));var Ce=Q.search(O);if(this._log('Full text: "'.concat(O,'", score: ').concat(Ce.score)),this.options.tokenize){for(var U=O.split(this.options.tokenSeparator),Je=[],it=0;it<G.length;it+=1){var N=G[it];this._log(`
Pattern: "`.concat(N.pattern,'"'));for(var Ze=!1,It=0;It<U.length;It+=1){var Mt=U[It],jt=N.search(Mt),vt={};jt.isMatch?(vt[Mt]=jt.score,be=!0,Ze=!0,Je.push(jt.score)):(vt[Mt]=1,this.options.matchAllTokens||Je.push(1)),this._log('Token: "'.concat(Mt,'", score: ').concat(vt[Mt]))}Ze&&(De+=1)}pe=Je[0];for(var Wt=Je.length,Tt=1;Tt<Wt;Tt+=1)pe+=Je[Tt];pe/=Wt,this._log("Token score average:",pe)}var Jt=Ce.score;pe>-1&&(Jt=(Jt+pe)/2),this._log("Score average:",Jt);var en=!this.options.tokenize||!this.options.matchAllTokens||De>=G.length;if(this._log(`
Check Matches: `.concat(en)),(be||Ce.isMatch)&&en){var gn=te[P];gn?gn.output.push({key:I,arrayIndex:x,value:O,score:Jt,matchedIndices:Ce.matchedIndices}):(te[P]={item:A,output:[{key:I,arrayIndex:x,value:O,score:Jt,matchedIndices:Ce.matchedIndices}]},ne.push(te[P]))}}else if(c(O))for(var yn=0,vn=O.length;yn<vn;yn+=1)this._analyze({key:I,arrayIndex:yn,value:O[yn],record:A,index:P},{resultMap:te,results:ne,tokenSearchers:G,fullSearcher:Q})}}},{key:"_computeScore",value:function(v,D){this._log(`
Computing score:
`);for(var I=0,C=D.length;I<C;I+=1){for(var x=D[I].output,O=x.length,A=1,P=1,B=0;B<O;B+=1){var G=v?v[x[B].key].weight:1,J=(G===1?x[B].score:x[B].score||.001)*G;G!==1?P=Math.min(P,J):(x[B].nScore=J,A*=J)}D[I].score=P===1?A:P,this._log(D[I])}}},{key:"_sort",value:function(v){this._log(`
Sorting....`),v.sort(this.options.sortFn)}},{key:"_format",value:function(v){var D=[];if(this.options.verbose){var I=[];this._log(`
Output:
`,JSON.stringify(v,function(J,Q){if(o(Q)==="object"&&Q!==null){if(I.indexOf(Q)!==-1)return;I.push(Q)}return Q})),I=null}var C=[];this.options.includeMatches&&C.push(function(J,Q){var oe=J.output;Q.matches=[];for(var te=0,re=oe.length;te<re;te+=1){var ne=oe[te];if(ne.matchedIndices.length!==0){var be={indices:ne.matchedIndices,value:ne.value};ne.key&&(be.key=ne.key),ne.hasOwnProperty("arrayIndex")&&ne.arrayIndex>-1&&(be.arrayIndex=ne.arrayIndex),Q.matches.push(be)}}}),this.options.includeScore&&C.push(function(J,Q){Q.score=J.score});for(var x=0,O=v.length;x<O;x+=1){var A=v[x];if(this.options.id&&(A.item=this.options.getFn(A.item,this.options.id)[0]),C.length){for(var P={item:A.item},B=0,G=C.length;B<G;B+=1)C[B](A,P);D.push(P)}else D.push(A.item)}return D}},{key:"_log",value:function(){var v;this.options.verbose&&(v=console).log.apply(v,arguments)}}])&&s(h.prototype,g),y&&s(h,y),m}();n.exports=d},function(n,i,a){function o(d,m){for(var h=0;h<m.length;h++){var g=m[h];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(d,g.key,g)}}var s=a(3),u=a(4),l=a(7),c=function(){function d(y,v){var D=v.location,I=D===void 0?0:D,C=v.distance,x=C===void 0?100:C,O=v.threshold,A=O===void 0?.6:O,P=v.maxPatternLength,B=P===void 0?32:P,G=v.isCaseSensitive,J=G!==void 0&&G,Q=v.tokenSeparator,oe=Q===void 0?/ +/g:Q,te=v.findAllMatches,re=te!==void 0&&te,ne=v.minMatchCharLength,be=ne===void 0?1:ne;(function(pe,De){if(!(pe instanceof De))throw new TypeError("Cannot call a class as a function")})(this,d),this.options={location:I,distance:x,threshold:A,maxPatternLength:B,isCaseSensitive:J,tokenSeparator:oe,findAllMatches:re,minMatchCharLength:be},this.pattern=this.options.isCaseSensitive?y:y.toLowerCase(),this.pattern.length<=B&&(this.patternAlphabet=l(this.pattern))}var m,h,g;return m=d,(h=[{key:"search",value:function(y){if(this.options.isCaseSensitive||(y=y.toLowerCase()),this.pattern===y)return{isMatch:!0,score:0,matchedIndices:[[0,y.length-1]]};var v=this.options,D=v.maxPatternLength,I=v.tokenSeparator;if(this.pattern.length>D)return s(y,this.pattern,I);var C=this.options,x=C.location,O=C.distance,A=C.threshold,P=C.findAllMatches,B=C.minMatchCharLength;return u(y,this.pattern,this.patternAlphabet,{location:x,distance:O,threshold:A,findAllMatches:P,minMatchCharLength:B})}}])&&o(m.prototype,h),g&&o(m,g),d}();n.exports=c},function(n,i){var a=/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g;n.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,m=[];if(d)for(var h=0,g=c.length;h<g;h+=1){var y=c[h];m.push([o.indexOf(y),y.length-1])}return{score:d?.5:1,isMatch:d,matchedIndices:m}}},function(n,i,a){var o=a(5),s=a(6);n.exports=function(u,l,c,d){for(var m=d.location,h=m===void 0?0:m,g=d.distance,y=g===void 0?100:g,v=d.threshold,D=v===void 0?.6:v,I=d.findAllMatches,C=I!==void 0&&I,x=d.minMatchCharLength,O=x===void 0?1:x,A=h,P=u.length,B=D,G=u.indexOf(l,A),J=l.length,Q=[],oe=0;oe<P;oe+=1)Q[oe]=0;if(G!==-1){var te=o(l,{errors:0,currentLocation:G,expectedLocation:A,distance:y});if(B=Math.min(te,B),(G=u.lastIndexOf(l,A+J))!==-1){var re=o(l,{errors:0,currentLocation:G,expectedLocation:A,distance:y});B=Math.min(re,B)}}G=-1;for(var ne=[],be=1,pe=J+P,De=1<<J-1,Ce=0;Ce<J;Ce+=1){for(var U=0,Je=pe;U<Je;)o(l,{errors:Ce,currentLocation:A+Je,expectedLocation:A,distance:y})<=B?U=Je:pe=Je,Je=Math.floor((pe-U)/2+U);pe=Je;var it=Math.max(1,A-Je+1),N=C?P:Math.min(A+Je,P)+J,Ze=Array(N+2);Ze[N+1]=(1<<Ce)-1;for(var It=N;It>=it;It-=1){var Mt=It-1,jt=c[u.charAt(Mt)];if(jt&&(Q[Mt]=1),Ze[It]=(Ze[It+1]<<1|1)&jt,Ce!==0&&(Ze[It]|=(ne[It+1]|ne[It])<<1|1|ne[It+1]),Ze[It]&De&&(be=o(l,{errors:Ce,currentLocation:Mt,expectedLocation:A,distance:y}))<=B){if(B=be,(G=Mt)<=A)break;it=Math.max(1,2*A-G)}}if(o(l,{errors:Ce+1,currentLocation:A,expectedLocation:A,distance:y})>B)break;ne=Ze}return{isMatch:G>=0,score:be===0?.001:be,matchedIndices:s(Q,O)}}},function(n,i){n.exports=function(a,o){var s=o.errors,u=s===void 0?0:s,l=o.currentLocation,c=l===void 0?0:l,d
`).map(BI).filter(function(r){return r!==null});return Un(Un({},t[0]),t[1])}function tl(e){var t={},r=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(e);if(!r)return t;var n=r[1],i=r[2];return n&&(t.tzid=n),t.dtstart=Zs(i),t}function BI(e){if(e=e.replace(/^\s+|\s+$/,""),!e.length)return null;var t=/^([A-Z]+?)[:;]/.exec(e.toUpperCase());if(!t)return Sw(e);var r=t[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return Sw(e);case"DTSTART":return tl(e);default:throw new Error("Unsupported RFC prop ".concat(r," in ").concat(e))}}function Sw(e){var t=e.replace(/^RRULE:/i,""),r=tl(t),n=e.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(i){var a=i.split("="),o=a[0],s=a[1];switch(o.toUpperCase()){case"FREQ":r.freq=pt[s.toUpperCase()];break;case"WKST":r.wkst=Ur[s.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=VI(s),l=o.toLowerCase();r[l]=u;break;case"BYWEEKDAY":case"BYDAY":r.byweekday=$I(s);break;case"DTSTART":case"TZID":var c=tl(e);r.tzid=c.tzid,r.dtstart=c.dtstart;break;case"UNTIL":r.until=Zs(s);break;case"BYEASTER":r.byeaster=Number(s);break;default:throw new Error("Unknown RRULE property '"+o+"'")}}),r}function VI(e){if(e.indexOf(",")!==-1){var t=e.split(",");return t.map(Ew)}return Ew(e)}function Ew(e){return/^[+-]?\d+$/.test(e)?Number(e):e}function $I(e){var t=e.split(",");return t.map(function(r){if(r.length===2)return Ur[r];var n=r.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(r));var i=Number(n[1]),a=n[2],o=Ur[a].weekday;return new Mn(o,i)})}var Ka=function(){function e(t,r){if(isNaN(t.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=t,this.tzid=r}return Object.defineProperty(e.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),e.prototype.toString=function(){var t=Fo(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(t):";TZID=".concat(this.tzid,":").concat(t)},e.prototype.getTime=function(){return this.date.getTime()},e.prototype.rezonedDate=function(){return this.isUTC?this.date:fw(this.date,this.tzid)},e}();function rl(e){for(var t=[],r="",n=Object.keys(e),i=Object.keys(el),a=0;a<n.length;a++)if(n[a]!=="tzid"&&Et(i,n[a])){var o=n[a].toUpperCase(),s=e[n[a]],u="";if(!(!Gt(s)||$n(s)&&!s.length)){switch(o){case"FREQ":u=Oe.FREQUENCIES[e.freq];break;case"WKST":Cr(s)?u=new Mn(s).toString():u=s.toString();break;case"BYWEEKDAY":o="BYDAY",u=sw(s).map(function(h){return h instanceof Mn?h:$n(h)?new Mn(h[0],h[1]):new Mn(h)}).toString();break;case"DTSTART":r=UI(s,e.tzid);break;case"UNTIL":u=Fo(s,!e.tzid);break;default:if($n(s)){for(var l=[],c=0;c<s.length;c++)l[c]=String(s[c]);u=l.toString()}else u=String(s)}u&&t.push([o,u])}}var d=t.map(function(h){var g=h[0],y=h[1];return"".concat(g,"=").concat(y.toString())}).join(";"),m="";return d!==""&&(m="RRULE:".concat(d)),[r,m].filter(function(h){return!!h}).join(`
`)}function UI(e,t){return e?"DTSTART"+new Ka(new Date(e),t).toString():""}function WI(e,t){return Array.isArray(e)?!Array.isArray(t)||e.length!==t.length?!1:e.every(function(r,n){return r.getTime()===t[n].getTime()}):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():e===t}var kw=function(){function e(){this.all=!1,this.before=[],this.after=[],this.between=[]}return e.prototype._cacheAdd=function(t,r,n){r&&(r=r instanceof Date?Cu(r):ch(r)),t==="all"?this.all=r:(n._value=r,this[t].push(n))},e.prototype._cacheGet=function(t,r){var n=!1,i=r?Object.keys(r):[],a=function(c){for(var d=0;d<i.length;d++){var m=i[d];if(!WI(r[m],c[m]))return!0}return!1},o=this[t];if(t==="all")n=this.all;else if($n(o))for(var s=0;s<o.length;s++){var u=o[s];if(!(i.length&&a(u))){n=u._value;break}}if(!n&&this.all){for(var l=new Vi(t,r),s=0;s<this.all.length&&l.accept(this.all[s]);s++);n=l.getValue(),this._cacheAdd(t,n,r)}return $n(n)?ch(n):n instanceof Date?Cu(n):n},e}();var xw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],wt(1,31),!0),wt(2,28),!0),wt(3,31),!0),wt(4,30),!0),wt(5,31),!0),wt(6,30),!0),wt(7,31),!0),wt(8,31),!0),wt(9,30),!0),wt(10,31),!0),wt(11,30),!0),wt(12,31),!0),wt(1,7),!0),Cw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],wt(1,31),!0),wt(2,29),!0),wt(3,31),!0),wt(4,30),!0),wt(5,31),!0),wt(6,30),!0),wt(7,31),!0),wt(8,31),!0),wt(9,30),!0),wt(10,31),!0),wt(11,30),!0),wt(12,31),!0),wt(1,7),!0),YI=$r(1,29),zI=$r(1,30),ua=$r(1,31),Gn=$r(1,32),_w=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Gn,!0),zI,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn.slice(0,7),!0),Mw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Gn,!0),YI,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn,!0),ua,!0),Gn,!0),ua,!0),Gn,!0),Gn.slice(0,7),!0),KI=$r(-28,0),jI=$r(-29,0),ca=$r(-30,0),Jn=$r(-31,0),Tw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Jn,!0),jI,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn.slice(0,7),!0),Fw=ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke(ke([],Jn,!0),KI,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn,!0),ca,!0),Jn,!0),ca,!0),Jn,!0),Jn.slice(0,7),!0),Iw=[0,31,60,91,121,152,182,213,244,274,305,335,366],Aw=[0,31,59,90,120,151,181,212,243,273,304,334,365],mh=function(){for(var e=[],t=0;t<55;t++)e=e.concat($r(7));return e}();function Ow(e,t){var r=pi(e,1,1),n=To(e)?366:365,i=To(e+1)?366:365,a=Js(r),o=Hi(r),s=Un(Un({yearlen:n,nextyearlen:i,yearordinal:a,yearweekday:o},qI(e)),{wnomask:null});if(_r(t.byweekno))return s;s.wnomask=wt(0,n+7);var u,l,c=u=qn(7-o+t.wkst,7);c>=4?(c=0,l=s.yearlen+qn(o-t.wkst,7)):l=n-c;for(var d=Math.floor(l/7),m=qn(l,7),h=Math.floor(d+m/4),g=0;g<t.byweekno.length;g++){var y=t.byweekno[g];if(y<0&&(y+=h+1),y>0&&y<=h){var v=void 0;y>1?(v=c+(y-1)*7,c!==u&&(v-=7-u)):v=c;for(var D=0;D<7&&(s.wnomask[v]=1,v++,s.wdaymask[v]!==t.wkst);D++);}}if(Et(t.byweekno,1)){var v=c+h*7;if(c!==u&&(v-=7-u),v<n)for(var g=0;g<7&&(s.wnomask[v]=1,v+=1,s.wdaymask[v]!==t.wkst);g++);}if(c){var I=void 0;if(Et(t.byweekno,-1))I=-1;else{var C=Hi(pi(e-1,1,1)),x=qn(7-C.valueOf()+t.wkst,7),O=To(e-1)?366:365,A=void 0;x>=4?(x=0,A=O+qn(C-t.wkst,7)):A=n-c,I=Math.floor(52+qn(A,7)/4)}if(Et(t.byweekno,I))for(var v=0;v<c;v++)s.wnomask[v]=1}return s}function qI(e){var t=To(e)?366:365,r=pi(e,1,1),n=Hi(r);return t===365?{mmask:xw,mdaymask:Mw,nmdaymask:Fw,wdaymask:mh.slice(n),mrange:Aw}:{mmask:Cw,mdaymask:_w,nmdaymask:Tw,wdaymask:mh.slice(n),mrange:Iw}}function Lw(e,t,r,n,i,a){var o={lastyear:e,lastmonth:t,nwdaymask:[]},s=[];if(a.freq===Oe.YEARLY)if(_r(a.bymonth))s=[[0,r]];else for(var u=0;u<a.bymonth.length;u++)t=a.bymonth[u],s.push(n.slice(t-1,t+1));else a.freq===Oe.MONTHLY&&(s=[n.slice(t-1,t+1)]);if(_r(s))return o;o.nwdaymask=wt(0,r);for(var u=0;u<s.length;u++)for(var l=s[u],c=l[0],d=l[1]-1,m=0;m<a.bynweekday.length;m++){var h=void 0,g=a.bynweekday[m],y=g[0],v=g[1];v<0?(h=d+(v+1)*7,h-=qn(i[h]-y,7)):(h=c+(v-1)*7,h+=qn(7-i[h]+y,7)),c<=h&&h<=d&&(o.nwdaymask[h]=1)}return o}function Pw(e,t){t===void 0&&(t=0);var r=e%19,n=Math.floor(e/100),i=e%100,a=Math.floor(n/4),o=n%4,s=Math.floor((n+8)/25),u=Math.floor((n-s+1)/3),l=Math.floor(19*r+n-a-u+15)%30
`),n=0;n<r.length;){var i=r[n]=r[n].replace(/\s+$/g,"");i?n>0&&i[0]===" "?(r[n-1]+=i.slice(1),r.splice(n,1)):n+=1:r.splice(n,1)}return r}function aA(e){e.forEach(function(t){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(t))throw new Error("unsupported RDATE/EXDATE parm: "+t)})}function $w(e,t){return aA(t),e.split(",").map(function(r){return Zs(r)})}function Uw(e){var t=this;return function(r){if(r!==void 0&&(t["_".concat(e)]=r),t["_".concat(e)]!==void 0)return t["_".concat(e)];for(var n=0;n<t._rrule.length;n++){var i=t._rrule[n].origOptions[e];if(i)return i}}}var gh=function(e){Io(t,e);function t(r){r===void 0&&(r=!1);var n=e.call(this,{},r)||this;return n.dtstart=Uw.apply(n,["dtstart"]),n.tzid=Uw.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return t.prototype._iter=function(r){return Bw(r,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},t.prototype.rrule=function(r){Ww(r,this._rrule)},t.prototype.exrule=function(r){Ww(r,this._exrule)},t.prototype.rdate=function(r){Yw(r,this._rdate)},t.prototype.exdate=function(r){Yw(r,this._exdate)},t.prototype.rrules=function(){return this._rrule.map(function(r){return Mu(r.toString())})},t.prototype.exrules=function(){return this._exrule.map(function(r){return Mu(r.toString())})},t.prototype.rdates=function(){return this._rdate.map(function(r){return new Date(r.getTime())})},t.prototype.exdates=function(){return this._exdate.map(function(r){return new Date(r.getTime())})},t.prototype.valueOf=function(){var r=[];return!this._rrule.length&&this._dtstart&&(r=r.concat(rl({dtstart:this._dtstart}))),this._rrule.forEach(function(n){r=r.concat(n.toString().split(`
`))}),this._exrule.forEach(function(n){r=r.concat(n.toString().split(`
`).map(function(i){return i.replace(/^RRULE:/,"EXRULE:")}).filter(function(i){return!/^DTSTART/.test(i)}))}),this._rdate.length&&r.push(zw("RDATE",this._rdate,this.tzid())),this._exdate.length&&r.push(zw("EXDATE",this._exdate,this.tzid())),r},t.prototype.toString=function(){return this.valueOf().join(`
`)},t.prototype.clone=function(){var r=new t(!!this._cache);return this._rrule.forEach(function(n){return r.rrule(n.clone())}),this._exrule.forEach(function(n){return r.exrule(n.clone())}),this._rdate.forEach(function(n){return r.rdate(new Date(n.getTime()))}),this._exdate.forEach(function(n){return r.exdate(new Date(n.getTime()))}),r},t}(Oe);function Ww(e,t){if(!(e instanceof Oe))throw new TypeError(String(e)+" is not RRule instance");Et(t.map(String),String(e))||t.push(e)}function Yw(e,t){if(!(e instanceof Date))throw new TypeError(String(e)+" is not Date instance");Et(t.map(Number),Number(e))||(t.push(e),Bi(t))}function zw(e,t,r){var n=!r||r.toUpperCase()==="UTC",i=n?"".concat(e,":"):"".concat(e,";TZID=").concat(r,":"),a=t.map(function(o){return Fo(o.valueOf(),n)}).join(",");return"".concat(i).concat(a)}var oA={},Kw=oA;var sA={},jw=sA;var lA={},qw=lA;var uA={"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","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,
`)}),l,s]}var Fu=Object.freeze({"[":"]","(":")"});function AA(e,t){let r=e.indexOf("::",t);if(!(r<0))return{key:e.substring(t,r).trim(),valueIndex:r+2}}function OA(e,t,r,n){let i=0,a=!1;for(let o=t;o<e.length;o++){let s=e.charAt(o);if(s=="\\"){a=!a;continue}if(a){a=!1;continue}if(s==r?i++:s==n&&i--,i<0)return{value:e.substring(t,o).trim(),endIndex:o+1};a=!1}}function LA(e,t){let r=e.charAt(t),n=AA(e,t+1);if(n===void 0)return;for(let a of Object.keys(Fu).concat(Object.values(Fu)))if(n.key.includes(a))return;let i=OA(e,n.valueIndex,r,Fu[r]);if(i!==void 0)return{key:n.key,value:i.value,start:t,startValue:n.valueIndex,end:i.endIndex,wrapping:r}}var PA=/([🔺⏫🔼🔽⏬])\uFE0F?/u,NA=/🛫 *(\d{4}-\d{2}-\d{2})/u,RA=/ *(\d{4}-\d{2}-\d{2})/u,HA=/[⏳⌛] *(\d{4}-\d{2}-\d{2})/u,BA=/[📅📆🗓] *(\d{4}-\d{2}-\d{2})/u,VA=/✅ *(\d{4}-\d{2}-\d{2})/u,$A=/❌ *(\d{4}-\d{2}-\d{2})/u,UA=/⛔\uFE0F? *([a-zA-Z0-9-_]+)/u,WA=/🆔 *([a-zA-Z0-9-_]+)/u,YA=/🔁 *([a-zA-Z0-9; !]+)/u,yi=new Set(["priority","start","created","scheduled","due","completion","cancelled","id","dependsOn","repeat"]),zA=[{regex:PA,key:"priority"},{regex:NA,key:"start"},{regex:RA,key:"created"},{regex:HA,key:"scheduled"},{regex:BA,key:"due"},{regex:VA,key:"completion"},{regex:$A,key:"cancelled"},{regex:WA,key:"id"},{regex:UA,key:"dependsOn"},{regex:YA,key:"repeat"}];function KA(e){let t=[];for(let{regex:r,key:n}of zA){let i=r.exec(e);if(!i)continue;let a=i[1],o=i.index+i[0].length;if(n==="priority")a=IA(a);else if(n==="repeat"){let s=a.length;a=Oe.fromText(a).toText(),o-=s-a.length}t.push({key:n,value:a,start:i.index,startValue:i.index+1,end:o,wrapping:"emoji-shorthand"})}return t}function gb(e,t=!1){let r=il(),n=wh(),i=[];if(r)for(let o of Object.keys(Fu)){let s=e.indexOf(o);for(;s>=0;){let u=LA(e,s);if(!u){s=e.indexOf(o,s+1);continue}i.push(u),s=e.indexOf(o,u.end)}}n&&t&&(i=i.concat(KA(e))),i.sort((o,s)=>o.start-s.start);let a=[];for(let o=0;o<i.length;o++){let s=i[o];(o==0||a[a.length-1].end<s.start)&&a.push(s)}return a}function il(){return app.plugins.enabledPlugins.has("dataview")?app.plugins.plugins.dataview:null}var Eh="kanban-plugin";function Mr(){}var Dh=new Map;function $(e){if(Dh.has(e))return Dh.get(e);let t=`${Eh}__${e}`;return Dh.set(e,t),t}function et(e=9){return Math.random().toString(36).slice(2,2+e)}function Au(e,t,r,n,i,a,o){var h,g;let s=un(t,r.slice(0,-1)),u=un(i,a.slice(0,-1)),l=(h=s==null?void 0:s.data)==null?void 0:h.shouldMarkItemsComplete,c=(g=u==null?void 0:u.data)==null?void 0:g.shouldMarkItemsComplete;if(!l&&!c)return{next:o};let d=o.data.checked&&o.data.checkChar===Zn();if(c===d)return{next:o};c&&(o=(0,Sh.default)(o,{data:{checkChar:{$set:Iu()}}}));let m=Ro(o,n.file);if(m){let[y,v,D]=m,I,C;return y.forEach((x,O)=>{O===D?I=n.getNewItem(x,v[O]):C=n.getNewItem(x,v[O])}),{next:I,replacement:C}}return{next:(0,Sh.default)(o,{data:{checked:{$set:c},checkChar:{$set:c?Zn():" "}}})}}function Ou(){let e=$e.useRef(!1);return{oncompositionstart:()=>{e.current=!0},oncompositionend:()=>{e.current=!1},getShouldIMEBlockAction:()=>e.current}}var jA=/<%/;async function yb(e,t){let r=t?e.app.vault.getAbstractFileByPath(t):null;if(r&&r instanceof da.TFile){let n=app.workspace.getActiveViewOfType(da.MarkdownView);try{(n==null?void 0:n.getMode())!=="source"&&await n.setState({...n.getState(),mode:"source"},{history:!1});let{templatesEnabled:i,templaterEnabled:a,templatesPlugin:o,templaterPlugin:s}=kh(e.app),u=await e.app.vault.read(r);if(i&&a)return jA.test(u)?await s.append_template_to_active_file(r):await o.instance.insertTemplate(r);if(i)return await o.instance.insertTemplate(r);if(a)return await s.append_template_to_active_file(r);await e.app.vault.modify(e.app.workspace.getActiveFile(),u)}catch(i){console.error(i),e.setError(i)}}}function ja(e){var s,u,l,c,d;let t=e.internalPlugins.plugins,r=(s=t["daily-notes"])==null?void 0:s.enabled,n=(u=t["daily-notes"])==null?void 0:u.instance.options.format,i=(l=e.plugins.plugins["nldates-obsidian"])==null?void 0:l.settings.format,a=(c=t.templates)==null?void 0:c.enabled,o=(d=t.templates)==null?void 0:d.ins
<span class='flatpickr-weekday'>
${H.join("</span><span class='flatpickr-weekday'>")}
</span>
`}function Je(){n.calendarContainer.classList.add("hasWeeks");let M=Pt(r.document,"div","flatpickr-weekwrapper");M.appendChild(Pt(r.document,"span","flatpickr-weekday",n.l10n.weekAbbreviation));let H=Pt(r.document,"div","flatpickr-weeks");return M.appendChild(H),{weekWrapper:M,weekNumbers:H}}function it(M,H=!0){let q=H?M:M-n.currentMonth;q<0&&n._hidePrevMonthArrow===!0||q>0&&n._hideNextMonthArrow===!0||(n.currentMonth+=q,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,ht("onYearChange"),re()),te(),ht("onMonthChange"),ee())}function N(M=!0,H=!0){if(n.input.value="",n.altInput!==void 0&&(n.altInput.value=""),n.mobileInput!==void 0&&(n.mobileInput.value=""),n.selectedDates=[],n.latestSelectedDateObj=void 0,H===!0&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth()),n.config.enableTime===!0){let{hours:q,minutes:ie,seconds:ye}=Jc(n.config);g(q,ie,ye)}n.redraw(),M&&ht("onChange")}function Ze(){n.isOpen=!1,n.isMobile||(n.calendarContainer!==void 0&&n.calendarContainer.classList.remove("open"),n._input!==void 0&&n._input.classList.remove("active")),ht("onClose")}function It(){n.config!==void 0&&ht("onDestroy");for(let M=n._handlers.length;M--;)n._handlers[M].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){let M=n.calendarContainer.parentNode;if(M.lastChild&&M.removeChild(M.lastChild),M.parentNode){for(;M.firstChild;)M.parentNode.insertBefore(M.firstChild,M);M.parentNode.removeChild(M)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput),n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.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(M=>{try{delete n[M]}catch(H){}})}function Mt(M){return n.calendarContainer.contains(M)}function jt(M){if(n.isOpen&&!n.config.inline){let H=Dr(M),q=Mt(H),ye=!(H===n.input||H===n.altInput||n.element.contains(H)||M.path&&M.path.indexOf&&(~M.path.indexOf(n.input)||~M.path.indexOf(n.altInput)))&&!q&&!Mt(M.relatedTarget),ce=!n.config.ignoredFocusElements.some(ae=>ae.contains(H));ye&&ce&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),n.timeContainer!==void 0&&n.minuteElement!==void 0&&n.hourElement!==void 0&&n.input.value!==""&&n.input.value!==void 0&&l(),n.close(),n.config&&n.config.mode==="range"&&n.selectedDates.length===1&&n.clear(!1))}}function vt(M){if(!M||n.config.minDate&&M<n.config.minDate.getFullYear()||n.config.maxDate&&M>n.config.maxDate.getFullYear())return;let H=M,q=n.currentYear!==H;n.currentYear=H||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),q&&(n.redraw(),ht("onYearChange"),re())}function Wt(M,H=!0){var ce;let q=n.parseDate(M,void 0,H);if(n.config.minDate&&q&&br(q,n.config.minDate,H!==void 0?H:!n.minDateHasTime)<0||n.config.maxDate&&q&&br(q,n.config.maxDate,H!==void 0?H:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&n.config.disable.length===0)return!0;if(q===void 0)return!1;let ie=!!n.config.enable,ye=(ce=n.config.enable)!=nul
`)}function ps({tags:e,searchQuery:t,alwaysShow:r}){let{stateManager:n}=Ee(tt),i=Lu(n),a=Ee(zn),o=n.useSetting("move-tags")||r;return!e.length||!o?null:E("div",{className:$("item-tags"),children:e.map((s,u)=>{let l=i(s);return E("a",{href:s,onClick:c=>{c.preventDefault();let d=n.getSetting("tag-action");if(a&&d==="kanban"){a.search(s,!0);return}n.app.internalPlugins.getPluginById("global-search").instance.openGlobalSearch(`tag:${s}`)},className:`tag ${$("item-tag")} ${t&&s.toLocaleLowerCase().contains(t)?"is-search-match":""}`,style:l&&{"--tag-color":l.color,"--tag-background":l.backgroundColor},children:[E("span",{children:s[0]}),s.slice(1)]},u)})})}var ad=zt(function({item:t,editState:r,setEditState:n,searchQuery:i,showMetadata:a=!0,isStatic:o}){let{stateManager:s,filePath:u,boardModifiers:l}=Ee(tt),c=fa(s),d=Fe(null);Ae(()=>{r===1?(d.current!==null&&l.updateItem(m,s.updateItemContent(t,d.current)),d.current=null):r===0&&(d.current=null)},[r,s,t]);let m=Ui(),{onEditDate:h,onEditTime:g}=ug(t),y=Ye((x,O,A)=>{if(!Ca(s,O,A))return n(1),!0},[s]),v=Ye(x=>{x.targetNode.instanceOf(HTMLElement)&&(x.targetNode.hasClass($("item-metadata-date"))?h(x):x.targetNode.hasClass($("item-metadata-time"))&&g(x))},[h,g]),D=Ye(()=>n(1),[]),I=Ye(()=>(n(0),!0),[t]),C=Ye(x=>{let O=x.target;if(O.hasClass("task-list-item-checkbox")){if(O.dataset.src)return;let A=parseInt(O.dataset.checkboxIndex,10),P=dN(s,t.data.titleRaw,A),B=s.updateItemContent(t,P);l.updateItem(m,B)}},[m,l,s,t]);return!o&&kn(r)?E("div",{className:$("item-input-wrapper"),children:E(_a,{editState:r,className:$("item-input"),onEnter:y,onEscape:I,onSubmit:D,value:t.data.titleRaw,onChange:x=>{x.docChanged&&(d.current=x.state.doc.toString().trim())}})}):E("div",{onClick:v,className:$("item-title"),children:[o?E(WS,{entityId:t.id,className:$("item-markdown"),markdownString:t.data.title,searchQuery:i,onPointerUp:C}):E(Sa,{entityId:t.id,className:$("item-markdown"),markdownString:t.data.title,searchQuery:i,onPointerUp:C}),a&&E("div",{className:$("item-metadata"),children:[E(rd,{item:t,stateManager:s}),E(id,{item:t,stateManager:s,filePath:u,getDateColor:c}),E(dk,{item:t,stateManager:s}),E(ps,{tags:t.data.metadata.tags,searchQuery:i})]})]})});function fN(e,t=[],r){return t.reduce((n,i)=>{if(yi.has(i.key))return n;let a=Pu(i,r);return n[i.key]=a,n},e||{})}function fk({item:e,searchQuery:t}){let{stateManager:r}=Ee(tt),n=r.useSetting("inline-metadata-position")==="metadata-table",i=r.useSetting("metadata-keys"),{fileMetadata:a,fileMetadataOrder:o,inlineMetadata:s}=e.data.metadata,u=Re(()=>{let c=n?fN(a,s,i||[]):a;return!c||!Object.keys(c).length?null:c},[a,s,i]),l=Re(()=>{let c=new Set(o||[]);return n&&(s!=null&&s.length)&&s.forEach(d=>{c.has(d.key)||c.add(d.key)}),Array.from(c)},[o,n,s]);return u?E("div",{className:$("item-metadata-wrapper"),children:E(gN,{metadata:u,order:l,searchQuery:t})}):null}function hN(e,t){let r;if(e.ts?r=(0,li.moment)(e.ts):li.moment.isMoment(e)?r=e:e instanceof Date&&(r=(0,li.moment)(e)),r){let n=t.getSetting(r.hours()===0?"date-display-format":"date-time-display-format");return r.format(n)}return null}function mN(e,t){if(typeof e!="object"||!e.path)return null;let r=app.vault.getAbstractFileByPath(e.path);if(r&&r instanceof li.TFile){let n=app.fileManager.generateMarkdownLink(r,t.file.path,e.subpath,e.display);return`${e.embed&&n[0]!=="!"?"!":""}${n}`}return`${e.embed?"!":""}[[${e.path}${e.display?`|${e.display}`:""}]]`}function hk(e){if(typeof e=="string"&&/^\d{4}-\d{2}-\d{2}/.test(e)){let r=(0,li.moment)(e);if(r.isValid())return r}if(li.moment.isMoment(e))return e;if(e instanceof Date)return(0,li.moment)(e);let t=(0,cg.getAPI)();return t!=null&&t.value.isDate(e)?(0,li.moment)(e.ts):null}function In(e,t){Ni(e)&&e.value&&(e=e.value);let r=hk(e);if(r)return hN(r,t);if(typeof e=="string")return e;if(e instanceof li.TFile)return e.path;if(Array.isArray(e))return e.map(i=>In(i,t)).join(" ");if(e.rrule)return e.toText();let n=(0,cg.getAPI)();return n?n.value.toString(e):`${e}`}function pN(e,t){return In(e.value,t)}function hs({data:e,dateLabel:t,searchQuery:r}){let{v
`);function vk(e){return["","","%% kanban:settings","```",JSON.stringify(e.data.settings),"```","%%"].join(`
`)}function wk(e,t){let r=e.data.metadata.fileMetadata,{titleSearchRaw:n}=e.data,i=[n];if(r){let a=Object.keys(r).filter(o=>{var s;return(s=e.data.metadata.fileMetadataOrder)==null?void 0:s.includes(o)});if(a.length){let o=In(a,t),s=In(a.map(u=>r[u]),t);o&&i.push(o),s&&i.push(s)}}return e.data.metadata.time?(i.push(e.data.metadata.time.format("LLLL")),i.push(In(e.data.metadata.time,t))):e.data.metadata.date&&(i.push(e.data.metadata.date.format("LLLL")),i.push(In(e.data.metadata.date,t))),i.join(" ").toLocaleLowerCase()}function yN(e,t,r){var n,i,a;if(e.plugins.enabledPlugins.has("dataview")&&((a=(i=(n=e.plugins)==null?void 0:n.plugins)==null?void 0:i.dataview)!=null&&a.api))return e.plugins.plugins.dataview.api.page(t.path,r.path)}function mk(e,t){if(!e)return null;if(e[t])return e[t];let r=t.split("."),n=e;for(let i of r)if(typeof n=="object"&&i in n)n=n[i];else{n=null;break}return n}function fg(e,t){let r=e.getSetting("metadata-keys");if(!r.length)return{};if(!t)return{};let n=e.app.metadataCache.getFileCache(t),i=yN(e.app,t,e.file);if(!n&&!i)return{};let a={},o={},s={},u=[],l=!1;return r.forEach(c=>{var h;if(s[c.metadataKey])return;if(s[c.metadataKey]=!0,c.metadataKey==="tags"){let g=(n==null?void 0:n.tags)||[];if(Array.isArray((h=n==null?void 0:n.frontmatter)==null?void 0:h.tags)&&(g=[].concat(g,n.frontmatter.tags.map(y=>({tag:`#${y}`})))),(g==null?void 0:g.length)===0)return;u.push(c.metadataKey),a.tags={...c,value:g.map(y=>y.tag).filter(y=>o[y]?!1:(o[y]=!0,!0)).sort(fr)},l=!0;return}let d=mk(i,c.metadataKey),m=mk(n==null?void 0:n.frontmatter,c.metadataKey);if(m!=null&&m!==""&&!(Array.isArray(m)&&m.length===0)){if(typeof m=="string"){if(/^\d{4}-\d{2}-\d{2}/.test(m))m=(0,pk.moment)(m);else if(/^\[\[[^\]]+\]\]$/.test(m)){let g=(n.frontmatterLinks||[]).find(y=>y.key===c.metadataKey);if(g){let y=e.app.metadataCache.getFirstLinkpathDest(g.link,e.file.path);y&&(m=y)}}}else Array.isArray(m)&&(m=m.map((g,y)=>{if(typeof g=="string"&&/^\[\[[^\]]+\]\]$/.test(g)){let v=(n.frontmatterLinks||[]).find(D=>D.key===c.metadataKey+"."+y.toString());if(v){let D=e.app.metadataCache.getFirstLinkpathDest(v.link,e.file.path);if(D)return D}}return g}));u.push(c.metadataKey),a[c.metadataKey]={...c,value:m},l=!0}else if(d!=null&&d!==""&&!(Array.isArray(d)&&d.length===0)){let g=i[c.metadataKey];u.push(c.metadataKey),a[c.metadataKey]={...c,value:g},l=!0}}),{fileMetadata:l?a:void 0,fileMetadataOrder:u}}function bk(e,t){return!e&&t?!0:!["metadata-keys","date-trigger","time-trigger","link-date-to-daily-note","date-format","time-format","move-dates","move-tags","inline-metadata-position","move-task-metadata","hide-card-count","tag-colors","date-colors"].every(n=>e[n]===t[n])}function Dk(e,t){let r=(0,Vl.getDateFromFile)(t,"day");if(!r||!r.isValid())return;e.internalPlugins.plugins["daily-notes"].instance.gotoNextExisting(r)}function Sk(e,t){let r=(0,Vl.getDateFromFile)(t,"day");if(!r||!r.isValid())return;e.internalPlugins.plugins["daily-notes"].instance.gotoPreviousExisting(r)}function ed(e,t){let r=(0,Vl.getDailyNoteSettings)();return e.vault.getConfig("useMarkdownLinks")?`[${t}](${r.folder?`${encodeURIComponent(r.folder)}/`:""}${encodeURIComponent(t)}.md)`:`[[${t}]]`}function Ek(e){if(!e)return!1;let t=e.match(/---\s+([\w\W]+?)\s+---/);return!(!t||!t[1].contains(_t))}function hg(e){var r;if(!e)return!1;let t=app.metadataCache.getFileCache(e);return!!((r=t==null?void 0:t.frontmatter)!=null&&r[_t])}function cd(e,t){return t?`${e} (${t})`:e}function od(e,t,r,n,i){return e.document.body.createDiv({cls:`${$("date-picker")} ${$("ignore-click-outside")}`},a=>{a.style.left=`${r.x||0}px`,a.style.top=`${r.y||0}px`,a.createEl("input",{type:"text"},o=>{a.win.setTimeout(()=>{let s=null,u=d=>{d.target instanceof d.view.HTMLElement&&d.target.closest(`.${$("date-picker")}`)===null&&c()},l=d=>{d.key==="Escape"&&c()},c=()=>{s.destroy(),a.remove(),e.document.body.removeEventListener("click",u),e.document.removeEventListener("keydown",l)};s=Qc(o,{locale:zc(t),defaultDate:i,inline:!0,onChange:d=>{n(d),c()},win:e}),a.win.setTimeout(()=>{let d=a.clientHeight,m=a.client
`)[0].trim(),h=m.replace(FN,"$1").replace(IN,"$1").replace(AN,"$1").replace(ON,"$1").replace(TN," ").trim().replace(LN," "),g=i.getSetting("new-note-folder"),y=i.getSetting("new-note-template"),v=g?i.app.vault.getAbstractFileByPath(g):i.app.fileManager.getNewFileParent(i.file.path),D=await i.app.fileManager.createNewMarkdownFile(v,h),I=i.app.workspace.splitActiveLeaf();await I.openFile(D),i.app.workspace.setActiveLeaf(I,!1,!0),await yb(i,y);let C=t.data.titleRaw.replace(m,i.app.fileManager.generateMarkdownLink(D,i.file.path));n.updateItem(r,i.updateItemContent(t,C))})}).addItem(d=>{d.setIcon("lucide-link").setTitle(R("Copy link to card")).onClick(()=>{if(t.data.blockId)navigator.clipboard.writeText(`${this.app.fileManager.generateMarkdownLink(i.file,"","#^"+t.data.blockId)}`);else{let m=et(6);navigator.clipboard.writeText(`${this.app.fileManager.generateMarkdownLink(i.file,"","#^"+m)}`),n.updateItem(r,i.updateItemContent((0,Lk.default)(t,{data:{blockId:{$set:m}}}),t.data.titleRaw))}})}).addSeparator(),/\n/.test(t.data.titleRaw)&&l.addItem(d=>{d.setIcon("lucide-wrap-text").setTitle(R("Split card")).onClick(async()=>{let m=t.data.titleRaw.split(/[\r\n]+/g).map(g=>g.trim()),h=await Promise.all(m.map(g=>i.getNewItem(g," ")));n.splitItem(r,h)})}),l.addItem(d=>{d.setIcon("lucide-copy").setTitle(R("Duplicate card")).onClick(()=>n.duplicateEntity(r))}).addItem(d=>{d.setIcon("lucide-list-start").setTitle(R("Insert card before")).onClick(()=>n.insertItems(r,[i.getNewItem(""," ",!0)]))}).addItem(d=>{d.setIcon("lucide-list-end").setTitle(R("Insert card after")).onClick(()=>{let m=[...r];m[m.length-1]=m[m.length-1]+1,n.insertItems(m,[i.getNewItem(""," ",!0)])})}).addItem(d=>{d.setIcon("lucide-arrow-up").setTitle(R("Move to top")).onClick(()=>n.moveItemToTop(r))}).addItem(d=>{d.setIcon("lucide-arrow-down").setTitle(R("Move to bottom")).onClick(()=>n.moveItemToBottom(r))}).addItem(d=>{d.setIcon("lucide-archive").setTitle(R("Archive card")).onClick(()=>n.archiveItem(r))}).addItem(d=>{d.setIcon("lucide-trash-2").setTitle(R("Delete card")).onClick(()=>n.deleteEntity(r))}).addSeparator().addItem(d=>{d.setIcon("lucide-calendar-check").setTitle(s?R("Edit date"):R("Add date")).onClick(()=>{var m;od(a.view,i,o,sd({stateManager:i,boardModifiers:n,item:t,hasDate:s,path:r}),(m=t.data.metadata.date)==null?void 0:m.toDate())})}),s&&(l.addItem(d=>{d.setIcon("lucide-x").setTitle(R("Remove date")).onClick(()=>{let m=i.getSetting("link-date-to-daily-note"),h=i.getSetting("date-trigger"),g=m?"(?:\\[[^\\]]+\\]\\([^\\)]+\\)|\\[\\[[^\\]]+\\]\\])":"{[^}]+}",y=new RegExp(`(^|\\s)${Qn(h)}${g}`),v=t.data.titleRaw.replace(y,"").trim();n.updateItem(r,i.updateItemContent(t,v))})}),l.addItem(d=>{d.setIcon("lucide-clock").setTitle(u?R("Edit time"):R("Add time")).onClick(()=>{ld(a.view,i,o,ud({stateManager:i,boardModifiers:n,item:t,hasTime:u,path:r}),t.data.metadata.time)})}),u&&l.addItem(d=>{d.setIcon("lucide-x").setTitle(R("Remove time")).onClick(()=>{let m=i.getSetting("time-trigger"),h=new RegExp(`(^|\\s)${Qn(m)}{([^}]+)}`),g=t.data.titleRaw.replace(h,"").trim();n.updateItem(r,i.updateItemContent(t,g))})})),l.addSeparator();let c=d=>{let m=i.state.children;if(!(m.length<=1))for(let h=0,g=m.length;h<g;h++)d.addItem(y=>y.setIcon("lucide-square-kanban").setChecked(r[0]===h).setTitle(m[h].data.title).onClick(()=>{r[0]!==h&&i.setState(v=>Ri(v,r,[h,0]))}))};pd.Platform.isPhone?c(l):l.addItem(d=>{let m=d.setTitle(R("Move to list")).setIcon("lucide-square-kanban").setSubmenu();c(m)}),l.showAtPosition(o)},[e,t,r,n,i])}var Pk=$e.memo(function({editState:t,setEditState:r,showMenu:n}){let i=$e.useMemo(()=>t?{"data-ignore-drag":!0}:{},[t]);return E("div",{...i,className:$("item-postfix-button-wrapper"),children:kn(t)?E("a",{"data-ignore-drag":!0,onPointerDown:a=>a.preventDefault(),onClick:()=>r(0),className:`${$("item-postfix-button")} is-enabled clickable-icon`,"aria-label":R("Cancel"),children:E(Ut,{name:"lucide-x"})}):E("a",{"data-ignore-drag":!0,onPointerDown:a=>a.preventDefault(),onClick:n,className:`${$("item-postfix-button")} clickable-icon`,"aria-label":R("More opti
Available method signatures are:
animateScrollTo(y:number, options)
animateScrollTo([x:number | null, y:number | null], options)
animateScrollTo(scrollToElement:Element, options)`;r+=a.horizontalOffset,n+=a.verticalOffset;let d=c.getMaxHorizontalScroll(),m=c.getHorizontalScroll();r>d&&(r=d);let h=r-m,g=c.getMaxVerticalScroll(),y=c.getVerticalScroll();n>g&&(n=g);let v=n-y,D=Math.abs(Math.round(h/1e3*a.speed)),I=Math.abs(Math.round(v/1e3*a.speed)),C=D>I?D:I;return C<a.minDuration?C=a.minDuration:C>a.maxDuration&&(C=a.maxDuration),new Promise((x,O)=>{h===0&&v===0&&x(!0),Ji.remove(c.element,!0);let A,P=()=>{oe(),activeWindow.cancelAnimationFrame(A),x(!1)};Ji.add(c.element,P);let B=ne=>ne.preventDefault(),G=a.cancelOnUserAction?P:B,J=a.cancelOnUserAction?{passive:!0}:{passive:!1},Q=["wheel","touchstart","keydown","mousedown"],oe=()=>{Q.forEach(ne=>{c.element.removeEventListener(ne,G,J)})};Q.forEach(ne=>{c.element.addEventListener(ne,G,J)});let te=Date.now(),re=()=>{var ne=Date.now()-te,be=ne/C;let pe=Math.round(m+h*a.easing(be)),De=Math.round(y+v*a.easing(be));ne<C&&(pe!==r||De!==n)?(c.scrollTo(pe,De),A=activeWindow.requestAnimationFrame(re)):(c.scrollTo(r,n),activeWindow.cancelAnimationFrame(A),oe(),Ji.remove(c.element,!1),x(!0))};A=activeWindow.requestAnimationFrame(re)})})}var vd=RN;var kg=Ct(ln());function Bk({children:e}){let t=$e.useMemo(()=>new Vo,[]);return E(sl.Provider,{value:t,children:e})}function Vk(e,t){let r=$e.useContext(ma),n=$e.useRef(null),i=$e.useContext(sl),a=o=>{n.current=o,n.current&&o.win.requestAnimationFrame(()=>{let s=i.getScrollState(e);s&&(s.x!==0||s.y!==0)&&(n.current.scrollLeft=s.x,n.current.scrollTop=s.y)})};return $e.useEffect(()=>{let o=n.current;if(!o)return;let s=dd(o.win,u=>{let l=u.target;i.setScrollState(r,e,{x:l.scrollLeft,y:l.scrollTop})});return o.addEventListener("scroll",s),()=>{o.removeEventListener("scroll",s)}},[i,e,t]),{setRef:a,scrollRef:n}}var HN="scroll-container",wd=8,bd=["top","right","bottom","left"],Dd=class{constructor(t,r,n,i){this.scrollFrame=0;this.observerQueue=[];this.onScroll=()=>{this.activeScroll.size===0&&(this.scrollState=Th(this.scrollEl),this.handleEntityRegistration())};this.onDragEnd=()=>{this.activeScroll.clear()};this.handleBeginDragScroll=({scrollEntitySide:t,scrollStrength:r})=>{this.isDoneScrolling(t)||(this.activeScroll.set(t,r),this.handleDragScroll())};this.handleUpdateDragScroll=({scrollEntitySide:t,scrollStrength:r})=>{this.isDoneScrolling(t)||this.activeScroll.set(t,r)};this.handleEndDragScroll=({scrollEntitySide:t})=>{this.activeScroll.delete(t)};this.dndManager=t,this.instanceId=et(),this.scopeId=r,this.triggerTypes=n,this.scrollState=Tr,this.parent=i,this.activeScroll=new Map,this.observerHandlers=new Map}initNodes(t){this.scrollEl=t,this.scrollEl.dataset.hitboxid=this.instanceId,this.scrollEl.dataset.scrollid=this.instanceId,this.top=this.createScrollEntity("top"),this.right=this.createScrollEntity("right"),this.bottom=this.createScrollEntity("bottom"),this.left=this.createScrollEntity("left"),this.bindScrollHandlers(),this.observer=new IntersectionObserver(n=>{n.forEach(i=>{var o;let a=(o=i.target.dataset)==null?void 0:o.hitboxid;if(a&&this.observerHandlers.has(a)){let s=this.observerHandlers.get(a);s&&s(i)}})},{root:t,threshold:.1});let{observerQueue:r}=this;this.observerQueue=[],r.forEach(([n,i,a])=>{this.observerHandlers.set(n,a),this.observer.observe(i)}),this.scrollEl.addEventListener("scroll",this.onScroll,{passive:!0,capture:!1}),this.dndManager.emitter.on("scrollResize",this.onScroll),this.scrollEl.win.setTimeout(()=>this.onScroll()),this.dndManager.observeResize(this.scrollEl),this.parent?this.parent.registerObserverHandler(this.instanceId,this.scrollEl,n=>{n.isIntersecting?this.handleEntityRegistration():this.handleEntityUnregistration()}):this.handleEntityRegistration()}destroy(){var t;!this.scrollEl&&!this.observer||(this.observerQueue.length=0,this.handleEntityUnregistration(),this.observer.disconnect(),this.unbindScrollHandlers(),this.scrollEl.removeEventListener("scroll",this.onScroll),this.dndManager.emitter.off("scrollResize",this.onScroll),(t=this.parent)==null||t.unregisterObserverHandler(this.instanceId,this.scrollEl),this.dndManager.unobserveRe
`).trim()}function Cd(e){let t=app.vault.getConfig("useTab");return e.trim().replace(/(?:\r\n|\n)/g,t?`
`:`
`)}function Sg(e,t){if(!t.data.blockId)return e;let r=e.split(/(?:\r\n|\n)/g);return r[0]+=" ^"+t.data.blockId,r.join(`
`)}function qk(e){let t=e.split(/(?:\r\n|\n)/g);return t[0]=t[0].replace(/\s+\^([a-zA-Z0-9-]+)$/,""),t.join(`
`)}function Eg(e){return e.trim().replace(/(?:\r\n|\n)(?: {4}|\t)/g,`
`)}function co(e){e=Dg(e);let t=e.match(/^(.*?)\s*\((\d+)\)$/);return t==null?{title:e,maxItems:0}:{title:t[1],maxItems:Number(t[2])}}function Gk(e){return E("svg",{...e,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",children:E("path",{fill:"currentColor",d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"})})}var $l=Ct(ln()),_d=require("obsidian");var Jk={delete:{description:R("Are you sure you want to delete this list and all its cards?"),confirm:R("Yes, delete list")},archive:{description:R("Are you sure you want to archive this list and all its cards?"),confirm:R("Yes, archive list")},"archive-items":{description:R("Are you sure you want to archive all cards in this list?"),confirm:R("Yes, archive cards")}};function Zk({action:e,cancel:t,onAction:r,lane:n}){return Ae(()=>{e&&n.children.length===0&&r()},[e,n.children.length]),!e||e&&n.children.length===0?null:E("div",{className:$("action-confirm-wrapper"),children:[E("div",{className:$("action-confirm-text"),children:Jk[e].description}),E("div",{children:[E("button",{onClick:r,className:$("confirm-action-button"),children:Jk[e].confirm}),E("button",{onClick:t,className:$("cancel-action-button"),children:"Cancel"})]})]})}function Qk({setEditState:e,path:t,lane:r}){let{stateManager:n,boardModifiers:i}=Ee(tt),[a,o]=Ne(null);return{settingsMenu:Re(()=>{let u=new Set,l=!1,c=!1;r.children.forEach(h=>{var y;let g=h.data.metadata.inlineMetadata;g&&g.forEach(v=>{v.key!=="repeat"&&(u.has(v.key)||u.add(v.key))}),!l&&h.data.metadata.date&&(l=!0),!c&&((y=h.data.metadata.tags)!=null&&y.length)&&(c=!0)});let d=new _d.Menu().addItem(h=>{h.setIcon("lucide-edit-3").setTitle(R("Edit list")).onClick(()=>e({x:0,y:0}))}).addItem(h=>{h.setIcon("lucide-archive").setTitle(R("Archive cards")).onClick(()=>o("archive-items"))}).addSeparator().addItem(h=>{h.setIcon("arrow-left-to-line").setTitle(R("Insert list before")).onClick(()=>i.insertLane(t,{...Ea,id:et(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}}))}).addItem(h=>{h.setIcon("arrow-right-to-line").setTitle(R("Insert list after")).onClick(()=>{let g=[...t];g[g.length-1]=g[g.length-1]+1,i.insertLane(g,{...Ea,id:et(),children:[],data:{title:"",shouldMarkItemsComplete:!1,forceEditMode:!0}})})}).addSeparator().addItem(h=>{h.setIcon("lucide-archive").setTitle(R("Archive list")).onClick(()=>o("archive"))}).addItem(h=>{h.setIcon("lucide-trash-2").setTitle(R("Delete list")).onClick(()=>o("delete"))}).addSeparator(),m=h=>{h.addItem(g=>{g.setIcon("arrow-down-up").setTitle(R("Sort by card text")).onClick(()=>{let y=r.children.slice(),v=r.data.sorted===0;y.sort((D,I)=>v?I.data.title.localeCompare(D.data.title):D.data.title.localeCompare(I.data.title)),i.updateLane(t,(0,$l.default)(r,{children:{$set:y},data:{sorted:{$set:r.data.sorted===0?1:0}}}))})}),l&&h.addItem(g=>{g.setIcon("arrow-down-up").setTitle(R("Sort by date")).onClick(()=>{let y=r.children.slice(),v=r.data.sorted===2?-1:1;y.sort((D,I)=>{let C=D.data.metadata.time||D.data.metadata.date,x=I.data.metadata.time||I.data.metadata.date;return C&&!x?-1*v:x&&!C?1*v:!C&&!x?0:(C.isBefore(x)?-1:1)*v}),i.updateLane(t,(0,$l.default)(r,{children:{$set:y},data:{sorted:{$set:r.data.sorted===2?3:2}}}))})}),c&&h.addItem(g=>{g.setIcon("arrow-down-up").setTitle(R("Sort by tags")).onClick(()=>{let y=n.getSetting("tag-sort"),v=r.children.slice(),D=r.data.sorted===4;v.sort((I,C)=>{var B,G;let x=I.data.metadata.tags,O=C.data.metadata.tags;if(!(x!=null&&x.length)&&!(O!=null&&O.length))return 0;if(!(x!=null&&x.length))return 1;if(!(O!=null&&O.length))return-1;let A=(B=y==null?void 0:y.findIndex(J=>x.includes(J.tag)))!=null?B:-1,P=(G=y==null?void 0:y.findIndex(J=>O.includes(J.tag)))!=null?G:-1;return A>-1&&P<0?D?1:-1:P>-1&&A<0?D?-1:1:A>-1&&P>-1?D?P-A:A-P:D?fr(O.join(""),x.join("")):fr(x.join(""),O.join(""))}),i.updateLane(t,(0,$l.default)(r,{children:{$set:v},data:{sorted:{$set:r.data.sorted===4?5:4}}}))})}),u.size&&u.forEach(g=>{h.addItem(y=>{y.setIcon("arrow-down-up").setTitle(R("Sort by")+" "+No(g).toLocaleLowerCase()).onClick(()=>{let v=r.children.slice(),D=r.d
font-size: .6rem;
font-weight: bold;
color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,r==null?void 0:r.key)}return i}}function Ke(e,t,r,n){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:n}}function NR(e,t,r,n){let i=()=>{var o;return(o=a.getValue())!=null?o:e.options.renderFallbackValue},a={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(n),renderValue:i,getContext:ze(()=>[e,r,t,a],(o,s,u,l)=>({table:o,column:s,row:u,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ke(e.options,"debugCells","cell.getContext"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(a,r,t,e)},{}),a}function RR(e,t,r,n){var i,a;let s={...e._getDefaultColumnDef(),...t},u=s.accessorKey,l=(i=(a=s.id)!=null?a:u?u.replace(".","_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(".")?c=m=>{let h=m;for(let y of u.split(".")){var g;h=(g=h)==null?void 0:g[y]}return h}:c=m=>m[s.accessorKey]),!l)throw new Error;let d={id:`${String(l)}`,accessorFn:c,parent:n,depth:r,columnDef:s,columns:[],getFlatColumns:ze(()=>[!0],()=>{var m;return[d,...(m=d.columns)==null?void 0:m.flatMap(h=>h.getFlatColumns())]},Ke(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:ze(()=>[e._getOrderColumnsFn()],m=>{var h;if((h=d.columns)!=null&&h.length){let g=d.columns.flatMap(y=>y.getLeafColumns());return m(g)}return[d]},Ke(e.options,"debugColumns","column.getLeafColumns"))};for(let m of e._features)m.createColumn==null||m.createColumn(d,e);return d}var nr="debugHeaders";function Kx(e,t,r){var n;let a={id:(n=r.id)!=null?n:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let o=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),o.push(u)};return s(a),o},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(a,e)}),a}var HR={createTable:e=>{e.getHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,i)=>{var a,o;let s=(a=n==null?void 0:n.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?a:[],u=(o=i==null?void 0:i.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?o:[],l=r.filter(d=>!(n!=null&&n.includes(d.id))&&!(i!=null&&i.includes(d.id)));return Wd(t,[...s,...l,...u],e)},Ke(e.options,nr,"getHeaderGroups")),e.getCenterHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,n,i)=>(r=r.filter(a=>!(n!=null&&n.includes(a.id))&&!(i!=null&&i.includes(a.id))),Wd(t,r,e,"center")),Ke(e.options,nr,"getCenterHeaderGroups")),e.getLeftHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,n)=>{var i;let a=(i=n==null?void 0:n.map(o=>r.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return Wd(t,a,e,"left")},Ke(e.options,nr,"getLeftHeaderGroups")),e.getRightHeaderGroups=ze(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,n)=>{var i;let a=(i=n==null?void 0:n.map(o=>r.find(s=>s.id===o)).filter(Boolean))!=null?i:[];return Wd(t,a,e,"right")},Ke(e.options,nr,"getRightHeaderGroups")),e.getFooterGroups=ze(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,"getFooterGroups")),e.getLeftFooterGroups=ze(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,"getLeftFooterGroups")),e.getCenterFooterGroups=ze(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,"getCenterFooterGroups")),e.getRightFooterGroups=ze(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ke(e.options,nr,"getRightFooterGroups")),e.getFlatHeaders=ze(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),Ke(e.options,nr,"getFlatHeaders")),e.getLeftFlatHeaders=ze(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),Ke(e.options,nr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=ze(()=>[e.getCenterHeaderGroups()],t=>t.map(r=
`;break}case-3:{o=`\r
`;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&i)continue;o=" ";break}default:o=String.fromCharCode(a)}i=a===-2,n.push(o)}return n.join("")}var wy={};Rf(wy,{attentionMarkers:()=>gB,contentInitial:()=>cB,disable:()=>yB,document:()=>uB,flow:()=>fB,flowInitial:()=>dB,insideSpan:()=>pB,string:()=>hB,text:()=>mB});var uB={42:ir,43:ir,45:ir,48:ir,49:ir,50:ir,51:ir,52:ir,53:ir,54:ir,55:ir,56:ir,57:ir,62:tf},cB={91:dy},dB={[-2]:Ql,[-1]:Ql,32:Ql},fB={35:hy,42:vo,45:[cf,vo],60:py,61:cf,95:vo,96:af,126:af},hB={38:rf,92:nf},mB={[-5]:Xl,[-4]:Xl,[-3]:Xl,33:yy,38:rf,42:Zl,60:[ly,gy],91:vy,92:[fy,nf],93:yo,95:Zl,96:uy},pB={null:[Zl,o_]},gB={null:[42,95]},yB={null:[]};function f_(e){let r=zC([wy,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:r,content:i(QC),document:i(e_),flow:i(a_),string:i(s_),text:i(l_)};return n;function i(a){return o;function o(s){return d_(n,a,s)}}}var h_=/[\0\t\n\r]/g;function m_(){let e=1,t="",r=!0,n;return i;function i(a,o,s){let u=[],l,c,d,m,h;for(a=t+a.toString(o),d=0,t="",r&&(a.charCodeAt(0)===65279&&d++,r=void 0);d<a.length;){if(h_.lastIndex=d,l=h_.exec(a),m=l&&l.index!==void 0?l.index:a.length,h=a.charCodeAt(m),!l){t=a.slice(d);break}if(h===10&&d===m&&n)u.push(-3),n=void 0;else switch(n&&(u.push(-5),n=void 0),d<m&&(u.push(a.slice(d,m)),e+=m-d),h){case 0:{u.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,u.push(-2);e++<c;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:n=!0,e=1}d=m+1}return s&&(n&&u.push(-5),t&&u.push(t),u.push(null)),u}}function p_(e){for(;!of(e););return e}function df(e,t){let r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"\uFFFD":String.fromCharCode(r)}var vB=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function g_(e){return e.replace(vB,wB)}function wB(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){let i=r.charCodeAt(1),a=i===120||i===88;return df(r.slice(a?2:1),a?16:10)}return Ts(r)||e}function Fs(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?y_(e.position):"start"in e||"end"in e?y_(e):"line"in e||"column"in e?by(e):""}function by(e){return v_(e&&e.line)+":"+v_(e&&e.column)}function y_(e){return by(e&&e.start)+"-"+by(e&&e.end)}function v_(e){return e&&typeof e=="number"?e:1}var b_={}.hasOwnProperty,ff=function(e,t,r){return typeof t!="string"&&(r=t,t=void 0),bB(r)(p_(f_(r).document().write(m_()(e,t,!0))))};function bB(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Vt),autolinkProtocol:Q,autolinkEmail:Q,atxHeading:s(xn),blockQuote:s(Jt),characterEscape:Q,characterReference:Q,codeFenced:s(en),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(en,u),codeText:s(gn,u),codeTextData:Q,data:Q,codeFlowValue:Q,definition:s(yn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(vn),hardBreakEscape:s(jn),hardBreakTrailing:s(jn),htmlFlow:s(sn,u),htmlFlowData:Q,htmlText:s(sn,u),htmlTextData:Q,image:s(Rt),label:u,link:s(Vt),listItem:s(Rr),listItemValue:g,listOrdered:s(Sr,h),listUnordered:s(Sr),paragraph:s(Bt),reference:It,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(xn),strong:s(Hr),thematicBreak:s(At)},exit:{atxHeading:c(),atxHeadingSequence:P,autolink:c(),autolinkEmail:Tt,autolinkProtocol:Wt,blockQuote:c(),characterEscapeValue:oe,characterReferenceMarkerHexadecimal:jt,characterReferenceMarkerNumeric:jt,characterReferenceValue:vt,codeFenced:c(I),codeFencedFence:D,codeFencedFenceInfo:y,codeFencedFenceMeta:v,codeFlowValue:oe,codeIndented:c(C),codeText:c(pe),codeTextData:oe,data:oe,definition:c(),definitionDestinationString:A,definitionLabelString:x,definitionTitleString:O,emphasis:c(),hardBreakEscape:c(re),hardBreakTrailing:c(re),htmlFlow:c(ne),htmlFlowData:oe,htmlText:c(be),htmlTextData:oe,image:c(Ce),label:Je,labelText:U,lineEnding:te,link:c(De),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Mt,resourceDestinationString:it,resourceTitleString:N,resource
`),y=gb(h.title,!0);if(y!=null&&y.length){let D=h.metadata.inlineMetadata=y.reduce((x,O)=>(yi.has(O.key)?(g<=0||O.end<g)&&x.push(O):x.push(O),x),[]),I=e.getSetting("move-task-metadata"),C=e.getSetting("inline-metadata-position")!=="body";if(I||C){let x=h.title;for(let O of[...D].reverse()){let A=yi.has(O.key);A&&!I||!A&&!C||(x=x.slice(0,O.start)+x.slice(O.end))}h.title=x}}return(v=h.metadata.tags)==null||v.sort(fr),h}function OB(e,t,r){if(e.type!=="heading"||_s(e,{includeImageAlt:!1})!==R("Archive"))return!1;let n=HC(t,r);return n&&n.type==="thematicBreak"}function B_(e,t,r,n,i){let a=[],o=[];return n.children.forEach((s,u)=>{if(s.type==="heading"){let l=OB(s,n.children,u),c=ef(s),d=oy(i,c),m=!1,h=BC(n.children,u,"list",g=>{if(g.type==="heading")return!1;if(g.type==="paragraph"){let y=_s(g);if(y.startsWith("%% kanban:settings"))return!1;if(y===R("Complete"))return m=!0,!0}return!0});if(l&&h){o.push(...h.children.map(g=>({...Pc,id:et(),data:gf(e,i,g)})));return}h?a.push({...Ea,children:h.children.map(g=>{let y=gf(e,i,g);return{...Pc,id:et(),data:y}}),id:et(),data:{...co(d),shouldMarkItemsComplete:m}}):a.push({...Ea,children:[],id:et(),data:{...co(d),shouldMarkItemsComplete:m}})}}),{...Nc,id:e.file.path,children:a,data:{settings:t,frontmatter:r,archive:o,isSearching:!1,errors:[]}}}function _y(e,t,r){let n=`- [${t.data.checkChar}] ${Sg(Cd(r),t)}`,i=Cy(e,n),a=gf(e,n,i.children[0].children[0]),o=(0,pf.default)(t,{data:{$set:a}});try{ql(e,o)}catch(s){console.error(s)}return o}function V_(e,t,r,n){let i=`- [${r}] ${Cd(t)}`,a=Cy(e,i),o=gf(e,i,a.children[0].children[0]);o.forceEditMode=!!n;let s={...Pc,id:et(),data:o};try{ql(e,s)}catch(u){console.error(u)}return s}function $_(e,t){try{return(0,pf.default)(t,{children:{$set:t.children.map(r=>(0,pf.default)(r,{children:{$set:r.children.map(n=>_y(e,n,n.data.titleRaw))}}))}})}catch(r){throw e.setError(r),r}}function U_(e){return`- [${e.data.checkChar}] ${Sg(Cd(e.data.titleRaw),e)}`}function LB(e){let t=[];return t.push(`## ${jk(cd(e.data.title,e.data.maxItems))}`),t.push(""),e.data.shouldMarkItemsComplete&&t.push(gk),e.children.forEach(r=>{t.push(U_(r))}),t.push(""),t.push(""),t.push(""),t.join(`
`)}function PB(e){if(e.length){let t=[yk,"",`## ${R("Archive")}`,""];return e.forEach(r=>{t.push(U_(r))}),t.join(`
`)}return""}function W_(e){let t=e.children.reduce((n,i)=>n+LB(i),"");return["---","",(0,H_.stringifyYaml)(e.data.frontmatter),"---","",""].join(`
`)+t+PB(e.data.archive)+vk(e)}var NB=["id","date","time","titleSearch","titleSearchRaw","file"],yf=class{constructor(t){this.stateManager=t}newItem(t,r,n){return V_(this.stateManager,t,r,n)}updateItemContent(t,r){return _y(this.stateManager,t,r)}boardToMd(t){return W_(t)}mdToBoard(t){let{ast:r,settings:n,frontmatter:i}=R_(this.stateManager,t),a=B_(this.stateManager,n,i,r,t),{state:o}=this.stateManager,s=(0,z_.getAPI)();if(!this.stateManager.hasError()&&o){let u=OC(o,a,c=>NB.includes(c.last()),c=>c?c instanceof Y_.TFile?c.path:Ni(c)||Array.isArray(c)?String(c):s&&!s.value.isObject(c)?s.value.toString(c):String(c):String(c)),l=PC(o,u);return WC(this.stateManager,l,u)}return UC(this.stateManager,a)}reparseBoard(){return $_(this.stateManager,this.stateManager.state)}};var vf=class{constructor(t,r,n,i,a){this.stateReceivers=[];this.settingsNotifiers=new Map;this.viewSet=new Set;this.compiledSettings={};this.getSetting=(t,r)=>{var n;return(r==null?void 0:r[t])!==void 0?r[t]:((n=this.compiledSettings)==null?void 0:n[t])!==void 0?this.compiledSettings[t]:this.getSettingRaw(t)};this.getSettingRaw=(t,r)=>{var n,i,a;return(r==null?void 0:r[t])!==void 0?r[t]:((a=(i=(n=this.state)==null?void 0:n.data)==null?void 0:i.settings)==null?void 0:a[t])!==void 0?this.state.data.settings[t]:this.getGlobalSetting(t)};this.getGlobalSetting=t=>{let r=this.getGlobalSettings();return(r==null?void 0:r[t])!==void 0?r[t]:null};this.app=t,this.file=r.file,this.onEmpty=i,this.getGlobalSettings=a,this.parser=new yf(this),this.registerView(r,n,!0)}getAView(){return this.viewSet.values().next().value}hasError(){var t,r,n;return!!((n=(r=(t=this.state)==null?void 0:t.data)==null?void 0:r.errors)!=null&&n.length)}async registerView(t,r,n){this.viewSet.has(t)||this.viewSet.add(t),await new Promise(i=>activeWindow.setTimeout(i,10)),n?await this.newBoard(t,r):await t.prerender(this.state),t.populateViewState(this.state.data.settings)}unregisterView(t){this.viewSet.has(t)&&(this.viewSet.delete(t),this.viewSet.size===0&&this.onEmpty())}buildSettingRetrievers(){return{getGlobalSettings:this.getGlobalSettings,getGlobalSetting:this.getGlobalSetting,getSetting:this.getSetting}}async newBoard(t,r){try{let n=this.getParsedBoard(r);await t.prerender(n),this.setState(n,!1)}catch(n){this.setError(n)}}saveToDisk(){if(this.state.data.errors.length>0)return;let t=this.getAView();if(t){let r=this.parser.boardToMd(this.state);t.requestSaveToDisk(r),this.viewSet.forEach(n=>{n.data=r})}}softRefresh(){this.stateReceivers.forEach(t=>t({...this.state}))}forceRefresh(){if(this.state)try{this.compileSettings(),this.state=this.parser.reparseBoard(),this.stateReceivers.forEach(t=>t(this.state)),this.settingsNotifiers.forEach(t=>{t.forEach(r=>r())}),this.viewSet.forEach(t=>t.initHeaderButtons())}catch(t){console.error(t),this.setError(t)}}setState(t,r=!0){var n;try{let i=(n=this.state)==null?void 0:n.data.settings,a=typeof t=="function"?t(this.state):t,o=a==null?void 0:a.data.settings;i&&o&&bk(i,o)?(this.state=(0,Ps.default)(this.state,{data:{settings:{$set:o}}}),this.compileSettings(),this.state=this.parser.reparseBoard()):(this.state=a,this.compileSettings()),this.viewSet.forEach(s=>{s.initHeaderButtons(),s.validatePreviewCache(a)}),r&&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[t,r]=Ne(this.state);return Ae(()=>(this.stateReceivers.push(n=>r(n)),r(this.state),()=>{this.stateReceivers.remove(r)}),[]),t}useSetting(t){let[r,n]=Ne(this.getSetting(t));return Ae(()=>{let i=()=>n(this.getSetting(t));return this.settingsNotifiers.has(t)?this.settingsNotifiers.get(t).push(i):this.settingsNotifiers.set(t,[i]),()=>{this.settingsNotifiers.get(t).remove(i)}},[]),r}compileSettings(t){var l,c,d,m,h,g,y,v,D,I;let r=this.getGlobalSetting("metadata-keys")||[],n=this.getSettingRaw("metadata-keys",t)||[],i=Array.from(new Set([...r,...n])),a=this.getSettingRaw("date-format",t)||ja(this.app),o=this.getSettingRaw("date-display-format",t)||
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
/*! Bundled license information:
mark.js/dist/mark.js:
(*!***************************************************
* mark.js v8.11.1
* https://markjs.io/
* Copyright (c) 20142018, Julian Kühnel
* Released under the MIT license https://git.io/vwTVl
*****************************************************)
moment/moment.js:
(*! moment.js *)
(*! version : 2.29.4 *)
(*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)
(*! license : MIT *)
(*! momentjs.com *)
choices.js/public/assets/scripts/choices.js:
(*! choices.js v9.0.1 | © 2019 Josh Johnson | https://github.com/jshjohnson/Choices#readme *)
(*!
* 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
*)
is-plain-object/dist/is-plain-object.mjs:
(*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*)
@tanstack/table-core/build/lib/index.mjs:
(**
* table-core
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*)
@tanstack/react-table/build/lib/index.mjs:
(**
* react-table
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*)
@tanstack/match-sorter-utils/build/lib/index.mjs:
(**
* match-sorter-utils
*
* Copyright (c) TanStack
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*)
(**
* @name match-sorter
* @license MIT license.
* @copyright (c) 2099 Kent C. Dodds
* @author Kent C. Dodds <me@kentcdodds.com> (https://kentcdodds.com)
*)
*/