30 lines
194 KiB
JavaScript

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
If you want to view the source, visit the plugins github repository
https://github.com/ozntel/file-tree-alternative
*/
var L9=Object.create;var n4=Object.defineProperty,w9=Object.defineProperties,B9=Object.getOwnPropertyDescriptor,A9=Object.getOwnPropertyDescriptors,S9=Object.getOwnPropertyNames,y5=Object.getOwnPropertySymbols,F9=Object.getPrototypeOf,O5=Object.prototype.hasOwnProperty,y9=Object.prototype.propertyIsEnumerable;var Z5=(t,a,c)=>a in t?n4(t,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):t[a]=c,q1=(t,a)=>{for(var c in a||(a={}))O5.call(a,c)&&Z5(t,c,a[c]);if(y5)for(var c of y5(a))y9.call(a,c)&&Z5(t,c,a[c]);return t},p2=(t,a)=>w9(t,A9(a)),R5=t=>n4(t,"__esModule",{value:!0});var w2=(t,a)=>()=>(a||t((a={exports:{}}).exports,a),a.exports),O9=(t,a)=>{R5(t);for(var c in a)n4(t,c,{get:a[c],enumerable:!0})},Z9=(t,a,c)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of S9(a))!O5.call(t,r)&&r!=="default"&&n4(t,r,{get:()=>a[r],enumerable:!(c=B9(a,r))||c.enumerable});return t},U1=t=>Z9(R5(n4(t!=null?L9(F9(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var L1=(t,a,c)=>new Promise((r,e)=>{var h=i=>{try{v(c.next(i))}catch(o){e(o)}},l=i=>{try{v(c.throw(i))}catch(o){e(o)}},v=i=>i.done?r(i.value):Promise.resolve(i.value).then(h,l);v((c=c.apply(t,a)).next())});var w6=w2((pv,L6)=>{"use strict";var st="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";L6.exports=st});var F6=w2((Mv,S6)=>{"use strict";var ut=w6();function B6(){}function A6(){}A6.resetWarningCache=B6;S6.exports=function(){function t(r,e,h,l,v,i){if(i!==ut){var o=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw o.name="Invariant Violation",o}}t.isRequired=t;function a(){return t}var c={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:a,element:t,elementType:t,instanceOf:a,node:t,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:A6,resetWarningCache:B6};return c.PropTypes=c,c}});var O6=w2((xv,y6)=>{y6.exports=F6()();var Hv,fv});var X6=w2((Vv,J4)=>{var Z6,R6,b6,I6,T6,_6,P6,k6,D6,Y4,t3,E6,N6,U6,U2,W6,G6,q6,$6,j6,K6,Y6,Q6,J6,Q4;(function(t){var a=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){t(c(a,c(r)))}):typeof J4=="object"&&typeof J4.exports=="object"?t(c(a,c(J4.exports))):t(c(a));function c(r,e){return r!==a&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(h,l){return r[h]=e?e(h,l):l}}})(function(t){var a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,e){r.__proto__=e}||function(r,e){for(var h in e)Object.prototype.hasOwnProperty.call(e,h)&&(r[h]=e[h])};Z6=function(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");a(r,e);function h(){this.constructor=r}r.prototype=e===null?Object.create(e):(h.prototype=e.prototype,new h)},R6=Object.assign||function(r){for(var e,h=1,l=arguments.length;h<l;h++){e=arguments[h];for(var v in e)Object.prototype.hasOwnProperty.call(e,v)&&(r[v]=e[v])}return r},b6=function(r,e){var h={};for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&e.indexOf(l)<0&&(h[l]=r[l]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var v=0,l=Object.getOwnPropertySymbols(r);v<l.length;v++)e.indexOf(l[v])<0&&Object.prototype.propertyIsEnumerable.call(r,l[v])&&(h[l[v]]=r[l[v]]);return h},I6=function(r,e,h,l){var v=arguments.length,i=v<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,h):l,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(r,e,h,l);else for(var n=r.length-1;n>=0;n--)(o=r[n])&&(i=(v<3?o(i):v>3?o(e,h,i):o(e,h))||i);return v>3&&i&&Object.defineProperty(e,h,i),i},T6=function(r,e){return function(h,l){e(h,l,r)}},_6=function(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)},P6=function(r,e,h,l){function v(i){return i instanceof h?i:new h(function(o){o(i)})}return new(h||(h=Promise))(function(i,o){function n(C){try{H(l.next(C))}catch(p){o(p)}}function u(C){try{H(l.throw(C))}catch(p){o(p)}}function H(C){C.done?i(C.value):v(C.value).then(n,u)}H((l=l.apply(r,e||[])).next())})},k6=function(r,e){var h={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},l,v,i,o;return o={next:n(0),throw:n(1),return:n(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function n(H){return function(C){return u([H,C])}}function u(H){if(l)throw new TypeError("Generator is already executing.");for(;o&&(o=0,H[0]&&(h=0)),h;)try{if(l=1,v&&(i=H[0]&2?v.return:H[0]?v.throw||((i=v.return)&&i.call(v),0):v.next)&&!(i=i.call(v,H[1])).done)return i;switch(v=0,i&&(H=[H[0]&2,i.value]),H[0]){case 0:case 1:i=H;break;case 4:return h.label++,{value:H[1],done:!1};case 5:h.label++,v=H[1],H=[0];continue;case 7:H=h.ops.pop(),h.trys.pop();continue;default:if(i=h.trys,!(i=i.length>0&&i[i.length-1])&&(H[0]===6||H[0]===2)){h=0;continue}if(H[0]===3&&(!i||H[1]>i[0]&&H[1]<i[3])){h.label=H[1];break}if(H[0]===6&&h.label<i[1]){h.label=i[1],i=H;break}if(i&&h.label<i[2]){h.label=i[2],h.ops.push(H);break}i[2]&&h.ops.pop(),h.trys.pop();continue}H=e.call(r,h)}catch(C){H=[6,C],v=0}finally{l=i=0}if(H[0]&5)throw H[1];return{value:H[0]?H[1]:void 0,done:!0}}},D6=function(r,e){for(var h in r)h!=="default"&&!Object.prototype.hasOwnProperty.call(e,h)&&Q4(e,r,h)},Q4=Object.create?function(r,e,h,l){l===void 0&&(l=h);var v=Object.getOwnPropertyDescriptor(e,h);(!v||("get"in v?!e.__esModule:v.writable||v.configurable))&&(v={enumerable:!0,get:function(){return e[h]}}),Object.defineProperty(r,l,v)}:function(r,e,h,l){l===void 0&&(l=h),r[l]=e[h]},Y4=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,h=e&&r[e],l=0;if(h)return h.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&l>=r.length&&(r=void 0),{value:r&&r[l++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},t3=function(r,e){var h=typeof Symbol=="function"&&r[Symbol.iterator];if(!h)return r;var l=h.call(r),v,i=[],o;try{for(;(e===void 0||e-- >0)&&!(v=l.next()).done;)i.push(v.value)}catch(n){o={error:n}}finally{try{v&&!v.done&&(h=l.return)&&h.call(l)}finally{if(o)throw o.error}}return i},E6=function(){for(var r=[],e=0;e<arguments.length;e++)r=r.concat(t3(arguments[e]));return r},N6=function(){for(var r=0,e=0,h=arguments.length;e<h;e++)r+=arguments[e].length;for(var l=Array(r),v=0,e=0;e<h;e++)for(var i=arguments[e],o=0,n=i.length;o<n;o++,v++)l[v]=i[o];return l},U6=function(r,e,h){if(h||arguments.length===2)for(var l=0,v=e.length,i;l<v;l++)(i||!(l in e))&&(i||(i=Array.prototype.slice.call(e,0,l)),i[l]=e[l]);return r.concat(i||Array.prototype.slice.call(e))},U2=function(r){return this instanceof U2?(this.v=r,this):new U2(r)},W6=function(r,e,h){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l=h.apply(r,e||[]),v,i=[];return v={},o("next"),o("throw"),o("return"),v[Symbol.asyncIterator]=function(){return this},v;function o(R){l[R]&&(v[R]=function(w){return new Promise(function(T,O){i.push([R,w,T,O])>1||n(R,w)})})}function n(R,w){try{u(l[R](w))}catch(T){p(i[0][3],T)}}function u(R){R.value instanceof U2?Promise.resolve(R.value.v).then(H,C):p(i[0][2],R)}function H(R){n("next",R)}function C(R){n("throw",R)}function p(R,w){R(w),i.shift(),i.length&&n(i[0][0],i[0][1])}},G6=function(r){var e,h;return e={},l("next"),l("throw",function(v){throw v}),l("return"),e[Symbol.iterator]=function(){return this},e;function l(v,i){e[v]=r[v]?function(o){return(h=!h)?{value:U2(r[v](o)),done:v==="return"}:i?i(o):o}:i}},q6=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],h;return e?e.call(r):(r=typeof Y4=="function"?Y4(r):r[Symbol.iterator](),h={},l("next"),l("throw"),l("return"),h[Symbol.asyncIterator]=function(){return this},h);function l(i){h[i]=r[i]&&function(o){return new Promise(function(n,u){o=r[i](o),v(n,u,o.done,o.value)})}}function v(i,o,n,u){Promise.resolve(u).then(function(H){i({value:H,done:n})},o)}},$6=function(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r};var c=Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e};j6=function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var h in r)h!=="default"&&Object.prototype.hasOwnProperty.call(r,h)&&Q4(e,r,h);return c(e,r),e},K6=function(r){return r&&r.__esModule?r:{default:r}},Y6=function(r,e,h,l){if(h==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!l:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return h==="m"?l:h==="a"?l.call(r):l?l.value:e.get(r)},Q6=function(r,e,h,l,v){if(l==="m")throw new TypeError("Private method is not writable");if(l==="a"&&!v)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!v:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?v.call(r,h):v?v.value=h:e.set(r,h),h},J6=function(r,e){if(e===null||typeof e!="object"&&typeof e!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof r=="function"?e===r:r.has(e)},t("__extends",Z6),t("__assign",R6),t("__rest",b6),t("__decorate",I6),t("__param",T6),t("__metadata",_6),t("__awaiter",P6),t("__generator",k6),t("__exportStar",D6),t("__createBinding",Q4),t("__values",Y4),t("__read",t3),t("__spread",E6),t("__spreadArrays",N6),t("__spreadArray",U6),t("__await",U2),t("__asyncGenerator",W6),t("__asyncDelegator",G6),t("__asyncValues",q6),t("__makeTemplateObject",$6),t("__importStar",j6),t("__importDefault",K6),t("__classPrivateFieldGet",Y6),t("__classPrivateFieldSet",Q6),t("__classPrivateFieldIn",J6)})});var l8=w2(r3=>{"use strict";r3.__esModule=!0;r3.default=function(t,a){if(t&&a){var c=Array.isArray(a)?a:a.split(","),r=t.name||"",e=(t.type||"").toLowerCase(),h=e.replace(/\/.*$/,"");return c.some(function(l){var v=l.trim().toLowerCase();return v.charAt(0)==="."?r.toLowerCase().endsWith(v):v.endsWith("/*")?h===v.replace(/\/.*$/,""):e===v})}return!0}});var E8=w2((O3,Z3)=>{(function(t,a){typeof O3=="object"&&typeof Z3!="undefined"?Z3.exports=a():typeof define=="function"&&define.amd?define(a):(t=typeof globalThis!="undefined"?globalThis:t||self).dayjs=a()})(O3,function(){"use strict";var t=1e3,a=6e4,c=36e5,r="millisecond",e="second",h="minute",l="hour",v="day",i="week",o="month",n="quarter",u="year",H="date",C="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var _=["th","st","nd","rd"],A=P%100;return"["+P+(_[(A-20)%10]||_[A]||_[0])+"]"}},T=function(P,_,A){var E=String(P);return!E||E.length>=_?P:""+Array(_+1-E.length).join(A)+P},O={s:T,z:function(P){var _=-P.utcOffset(),A=Math.abs(_),E=Math.floor(A/60),F=A%60;return(_<=0?"+":"-")+T(E,2,"0")+":"+T(F,2,"0")},m:function P(_,A){if(_.date()<A.date())return-P(A,_);var E=12*(A.year()-_.year())+(A.month()-_.month()),F=_.clone().add(E,o),q=A-F<0,W=_.clone().add(E+(q?-1:1),o);return+(-(E+(A-F)/(q?F-W:W-F))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:o,y:u,w:i,d:v,D:H,h:l,m:h,s:e,ms:r,Q:n}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},S="en",d={};d[S]=w;var B=function(P){return P instanceof U},I=function P(_,A,E){var F;if(!_)return S;if(typeof _=="string"){var q=_.toLowerCase();d[q]&&(F=q),A&&(d[q]=A,F=q);var W=_.split("-");if(!F&&W.length>1)return P(W[0])}else{var t1=_.name;d[t1]=_,F=t1}return!E&&F&&(S=F),F||!E&&S},L=function(P,_){if(B(P))return P.clone();var A=typeof _=="object"?_:{};return A.date=P,A.args=arguments,new U(A)},b=O;b.l=I,b.i=B,b.w=function(P,_){return L(P,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var U=function(){function P(A){this.$L=I(A.locale,null,!0),this.parse(A)}var _=P.prototype;return _.parse=function(A){this.$d=function(E){var F=E.date,q=E.utc;if(F===null)return new Date(NaN);if(b.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var W=F.match(p);if(W){var t1=W[2]-1||0,o1=(W[7]||"0").substring(0,3);return q?new Date(Date.UTC(W[1],t1,W[3]||1,W[4]||0,W[5]||0,W[6]||0,o1)):new Date(W[1],t1,W[3]||1,W[4]||0,W[5]||0,W[6]||0,o1)}}return new Date(F)}(A),this.$x=A.x||{},this.init()},_.init=function(){var A=this.$d;this.$y=A.getFullYear(),this.$M=A.getMonth(),this.$D=A.getDate(),this.$W=A.getDay(),this.$H=A.getHours(),this.$m=A.getMinutes(),this.$s=A.getSeconds(),this.$ms=A.getMilliseconds()},_.$utils=function(){return b},_.isValid=function(){return this.$d.toString()!==C},_.isSame=function(A,E){var F=L(A);return this.startOf(E)<=F&&F<=this.endOf(E)},_.isAfter=function(A,E){return L(A)<this.startOf(E)},_.isBefore=function(A,E){return this.endOf(E)<L(A)},_.$g=function(A,E,F){return b.u(A)?this[E]:this.set(F,A)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(A,E){var F=this,q=!!b.u(E)||E,W=b.p(A),t1=function(m,V){var Z=b.w(F.$u?Date.UTC(F.$y,V,m):new Date(F.$y,V,m),F);return q?Z:Z.endOf(v)},o1=function(m,V){return b.w(F.toDate()[m].apply(F.toDate("s"),(q?[0,0,0,0]:[23,59,59,999]).slice(V)),F)},a1=this.$W,u1=this.$M,K=this.$D,g1="set"+(this.$u?"UTC":"");switch(W){case u:return q?t1(1,0):t1(31,11);case o:return q?t1(1,u1):t1(0,u1+1);case i:var l1=this.$locale().weekStart||0,z=(a1<l1?a1+7:a1)-l1;return t1(q?K-z:K+(6-z),u1);case v:case H:return o1(g1+"Hours",0);case l:return o1(g1+"Minutes",1);case h:return o1(g1+"Seconds",2);case e:return o1(g1+"Milliseconds",3);default:return this.clone()}},_.endOf=function(A){return this.startOf(A,!1)},_.$set=function(A,E){var F,q=b.p(A),W="set"+(this.$u?"UTC":""),t1=(F={},F[v]=W+"Date",F[H]=W+"Date",F[o]=W+"Month",F[u]=W+"FullYear",F[l]=W+"Hours",F[h]=W+"Minutes",F[e]=W+"Seconds",F[r]=W+"Milliseconds",F)[q],o1=q===v?this.$D+(E-this.$W):E;if(q===o||q===u){var a1=this.clone().set(H,1);a1.$d[t1](o1),a1.init(),this.$d=a1.set(H,Math.min(this.$D,a1.daysInMonth())).$d}else t1&&this.$d[t1](o1);return this.init(),this},_.set=function(A,E){return this.clone().$set(A,E)},_.get=function(A){return this[b.p(A)]()},_.add=function(A,E){var F,q=this;A=Number(A);var W=b.p(E),t1=function(u1){var K=L(q);return b.w(K.date(K.date()+Math.round(u1*A)),q)};if(W===o)return this.set(o,this.$M+A);if(W===u)return this.set(u,this.$y+A);if(W===v)return t1(1);if(W===i)return t1(7);var o1=(F={},F[h]=a,F[l]=c,F[e]=t,F)[W]||1,a1=this.$d.getTime()+A*o1;return b.w(a1,this)},_.subtract=function(A,E){return this.add(-1*A,E)},_.format=function(A){var E=this,F=this.$locale();if(!this.isValid())return F.invalidDate||C;var q=A||"YYYY-MM-DDTHH:mm:ssZ",W=b.z(this),t1=this.$H,o1=this.$m,a1=this.$M,u1=F.weekdays,K=F.months,g1=function(V,Z,M,x){return V&&(V[Z]||V(E,q))||M[Z].slice(0,x)},l1=function(V){return b.s(t1%12||12,V,"0")},z=F.meridiem||function(V,Z,M){var x=V<12?"AM":"PM";return M?x.toLowerCase():x},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a1+1,MM:b.s(a1+1,2,"0"),MMM:g1(F.monthsShort,a1,K,3),MMMM:g1(K,a1),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:g1(F.weekdaysMin,this.$W,u1,2),ddd:g1(F.weekdaysShort,this.$W,u1,3),dddd:u1[this.$W],H:String(t1),HH:b.s(t1,2,"0"),h:l1(1),hh:l1(2),a:z(t1,o1,!0),A:z(t1,o1,!1),m:String(o1),mm:b.s(o1,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:W};return q.replace(R,function(V,Z){return Z||m[V]||W.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(A,E,F){var q,W=b.p(E),t1=L(A),o1=(t1.utcOffset()-this.utcOffset())*a,a1=this-t1,u1=b.m(this,t1);return u1=(q={},q[u]=u1/12,q[o]=u1,q[n]=u1/3,q[i]=(a1-o1)/6048e5,q[v]=(a1-o1)/864e5,q[l]=a1/c,q[h]=a1/a,q[e]=a1/t,q)[W]||a1,F?u1:b.a(u1)},_.daysInMonth=function(){return this.endOf(o).$D},_.$locale=function(){return d[this.$L]},_.locale=function(A,E){if(!A)return this.$L;var F=this.clone(),q=I(A,E,!0);return q&&(F.$L=q),F},_.clone=function(){return b.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},P}(),Y=U.prototype;return L.prototype=Y,[["$ms",r],["$s",e],["$m",h],["$H",l],["$W",v],["$M",o],["$y",u],["$D",H]].forEach(function(P){Y[P[1]]=function(_){return this.$g(_,P[0],P[1])}}),L.extend=function(P,_){return P.$i||(P(_,U,L),P.$i=!0),L},L.locale=I,L.isDayjs=B,L.unix=function(P){return L(1e3*P)},L.en=d[S],L.Ls=d,L.p={},L})});var V9=w2(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.LocalStorageHandler=void 0;var tv=function(){function t(a){var c=this;this.getTimeStampKey=function(e){return e+"-timestamp"},this.getFromLocalStorage=function(e){var h=e.key,l=e.checkCacheHours,v=e.cacheHours,i=localStorage.getItem(h),o=localStorage.getItem(c.getTimeStampKey(h));if(l!==void 0&&!l)return i;if(v&&(c.cacheHours=v),o!==null){var n=new Date(JSON.parse(o)),u=Math.abs(new Date().getTime()-n.getTime())/36e5;if(u<c.cacheHours&&i!==null)return i}return null},this.setLocalStorage=function(e){var h=e.key,l=e.value;return localStorage.setItem(h,l),localStorage.setItem(c.getTimeStampKey(h),JSON.stringify(new Date)),"success"},this.removeFromLocalStorage=function(e){var h=e.key,l=localStorage.getItem(h);if(!l)return"not-found";localStorage.removeItem(h);var v=c.getTimeStampKey(h),i=localStorage.getItem(v);return i&&localStorage.removeItem(v),"success"};var r=a.cacheHours;this.cacheHours=r||24}return t}();E0.LocalStorageHandler=tv});O9(exports,{default:()=>F5,eventTypes:()=>y1});var C2=U1(require("obsidian"));var x9=U1(require("obsidian"));var i4,j,b5,R9,o4,I5,T5,U4={},_5=[],b9=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function o2(t,a){for(var c in a)t[c]=a[c];return t}function P5(t){var a=t.parentNode;a&&a.removeChild(t)}function t2(t,a,c){var r,e,h,l={};for(h in a)h=="key"?r=a[h]:h=="ref"?e=a[h]:l[h]=a[h];if(arguments.length>2&&(l.children=arguments.length>3?i4.call(arguments,2):c),typeof t=="function"&&t.defaultProps!=null)for(h in t.defaultProps)l[h]===void 0&&(l[h]=t.defaultProps[h]);return g4(t,l,r,e,null)}function g4(t,a,c,r,e){var h={type:t,props:a,key:c,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:e??++b5};return e==null&&j.vnode!=null&&j.vnode(h),h}function N0(){return{current:null}}function Y1(t){return t.children}function Q1(t,a){this.props=t,this.context=a}function d4(t,a){if(a==null)return t.__?d4(t.__,t.__.__k.indexOf(t)+1):null;for(var c;a<t.__k.length;a++)if((c=t.__k[a])!=null&&c.__e!=null)return c.__e;return typeof t.type=="function"?d4(t):null}function k5(t){var a,c;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,a=0;a<t.__k.length;a++)if((c=t.__k[a])!=null&&c.__e!=null){t.__e=t.__c.base=c.__e;break}return k5(t)}}function U0(t){(!t.__d&&(t.__d=!0)&&o4.push(t)&&!W4.__r++||I5!==j.debounceRendering)&&((I5=j.debounceRendering)||setTimeout)(W4)}function W4(){for(var t;W4.__r=o4.length;)t=o4.sort(function(a,c){return a.__v.__b-c.__v.__b}),o4=[],t.some(function(a){var c,r,e,h,l,v;a.__d&&(l=(h=(c=a).__v).__e,(v=c.__P)&&(r=[],(e=o2({},h)).__v=h.__v+1,W0(v,h,e,c.__n,v.ownerSVGElement!==void 0,h.__h!=null?[l]:null,r,l??d4(h),h.__h),q5(r,h),h.__e!=l&&k5(h)))})}function D5(t,a,c,r,e,h,l,v,i,o){var n,u,H,C,p,R,w,T=r&&r.__k||_5,O=T.length;for(c.__k=[],n=0;n<a.length;n++)if((C=c.__k[n]=(C=a[n])==null||typeof C=="boolean"?null:typeof C=="string"||typeof C=="number"||typeof C=="bigint"?g4(null,C,null,null,C):Array.isArray(C)?g4(Y1,{children:C},null,null,null):C.__b>0?g4(C.type,C.props,C.key,C.ref?C.ref:null,C.__v):C)!=null){if(C.__=c,C.__b=c.__b+1,(H=T[n])===null||H&&C.key==H.key&&C.type===H.type)T[n]=void 0;else for(u=0;u<O;u++){if((H=T[u])&&C.key==H.key&&C.type===H.type){T[u]=void 0;break}H=null}W0(t,C,H=H||U4,e,h,l,v,i,o),p=C.__e,(u=C.ref)&&H.ref!=u&&(w||(w=[]),H.ref&&w.push(H.ref,null,C),w.push(u,C.__c||p,C)),p!=null?(R==null&&(R=p),typeof C.type=="function"&&C.__k===H.__k?C.__d=i=E5(C,i,t):i=N5(t,C,H,T,p,i),typeof c.type=="function"&&(c.__d=i)):i&&H.__e==i&&i.parentNode!=t&&(i=d4(H))}for(c.__e=R,n=O;n--;)T[n]!=null&&j5(T[n],T[n]);if(w)for(n=0;n<w.length;n++)$5(w[n],w[++n],w[++n])}function E5(t,a,c){for(var r,e=t.__k,h=0;e&&h<e.length;h++)(r=e[h])&&(r.__=t,a=typeof r.type=="function"?E5(r,a,c):N5(c,r,r,e,r.__e,a));return a}function h2(t,a){return a=a||[],t==null||typeof t=="boolean"||(Array.isArray(t)?t.some(function(c){h2(c,a)}):a.push(t)),a}function N5(t,a,c,r,e,h){var l,v,i;if(a.__d!==void 0)l=a.__d,a.__d=void 0;else if(c==null||e!=h||e.parentNode==null)t:if(h==null||h.parentNode!==t)t.appendChild(e),l=null;else{for(v=h,i=0;(v=v.nextSibling)&&i<r.length;i+=1)if(v==e)break t;t.insertBefore(e,h),l=h}return l!==void 0?l:e.nextSibling}function I9(t,a,c,r,e){var h;for(h in c)h==="children"||h==="key"||h in a||G4(t,h,null,c[h],r);for(h in a)e&&typeof a[h]!="function"||h==="children"||h==="key"||h==="value"||h==="checked"||c[h]===a[h]||G4(t,h,a[h],c[h],r)}function U5(t,a,c){a[0]==="-"?t.setProperty(a,c):t[a]=c==null?"":typeof c!="number"||b9.test(a)?c:c+"px"}function G4(t,a,c,r,e){var h;t:if(a==="style")if(typeof c=="string")t.style.cssText=c;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(a in r)c&&a in c||U5(t.style,a,"");if(c)for(a in c)r&&c[a]===r[a]||U5(t.style,a,c[a])}else if(a[0]==="o"&&a[1]==="n")h=a!==(a=a.replace(/Capture$/,"")),a=a.toLowerCase()in t?a.toLowerCase().slice(2):a.slice(2),t.l||(t.l={}),t.l[a+h]=c,c?r||t.addEventListener(a,h?G5:W5,h):t.removeEventListener(a,h?G5:W5,h);else if(a!=="dangerouslySetInnerHTML"){if(e)a=a.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(a!=="href"&&a!=="list"&&a!=="form"&&a!=="tabIndex"&&a!=="download"&&a in t)try{t[a]=c??"";break t}catch(l){}typeof c=="function"||(c==null||c===!1&&a.indexOf("-")==-1?t.removeAttribute(a):t.setAttribute(a,c))}}function W5(t){this.l[t.type+!1](j.event?j.event(t):t)}function G5(t){this.l[t.type+!0](j.event?j.event(t):t)}function W0(t,a,c,r,e,h,l,v,i){var o,n,u,H,C,p,R,w,T,O,S,d,B,I,L,b=a.type;if(a.constructor!==void 0)return null;c.__h!=null&&(i=c.__h,v=a.__e=c.__e,a.__h=null,h=[v]),(o=j.__b)&&o(a);try{t:if(typeof b=="function"){if(w=a.props,T=(o=b.contextType)&&r[o.__c],O=o?T?T.props.value:o.__:r,c.__c?R=(n=a.__c=c.__c).__=n.__E:("prototype"in b&&b.prototype.render?a.__c=n=new b(w,O):(a.__c=n=new Q1(w,O),n.constructor=b,n.render=_9),T&&T.sub(n),n.props=w,n.state||(n.state={}),n.context=O,n.__n=r,u=n.__d=!0,n.__h=[],n._sb=[]),n.__s==null&&(n.__s=n.state),b.getDerivedStateFromProps!=null&&(n.__s==n.state&&(n.__s=o2({},n.__s)),o2(n.__s,b.getDerivedStateFromProps(w,n.__s))),H=n.props,C=n.state,u)b.getDerivedStateFromProps==null&&n.componentWillMount!=null&&n.componentWillMount(),n.componentDidMount!=null&&n.__h.push(n.componentDidMount);else{if(b.getDerivedStateFromProps==null&&w!==H&&n.componentWillReceiveProps!=null&&n.componentWillReceiveProps(w,O),!n.__e&&n.shouldComponentUpdate!=null&&n.shouldComponentUpdate(w,n.__s,O)===!1||a.__v===c.__v){for(n.props=w,n.state=n.__s,a.__v!==c.__v&&(n.__d=!1),n.__v=a,a.__e=c.__e,a.__k=c.__k,a.__k.forEach(function(U){U&&(U.__=a)}),S=0;S<n._sb.length;S++)n.__h.push(n._sb[S]);n._sb=[],n.__h.length&&l.push(n);break t}n.componentWillUpdate!=null&&n.componentWillUpdate(w,n.__s,O),n.componentDidUpdate!=null&&n.__h.push(function(){n.componentDidUpdate(H,C,p)})}if(n.context=O,n.props=w,n.__v=a,n.__P=t,d=j.__r,B=0,"prototype"in b&&b.prototype.render){for(n.state=n.__s,n.__d=!1,d&&d(a),o=n.render(n.props,n.state,n.context),I=0;I<n._sb.length;I++)n.__h.push(n._sb[I]);n._sb=[]}else do n.__d=!1,d&&d(a),o=n.render(n.props,n.state,n.context),n.state=n.__s;while(n.__d&&++B<25);n.state=n.__s,n.getChildContext!=null&&(r=o2(o2({},r),n.getChildContext())),u||n.getSnapshotBeforeUpdate==null||(p=n.getSnapshotBeforeUpdate(H,C)),L=o!=null&&o.type===Y1&&o.key==null?o.props.children:o,D5(t,Array.isArray(L)?L:[L],a,c,r,e,h,l,v,i),n.base=a.__e,a.__h=null,n.__h.length&&l.push(n),R&&(n.__E=n.__=null),n.__e=!1}else h==null&&a.__v===c.__v?(a.__k=c.__k,a.__e=c.__e):a.__e=T9(c.__e,a,c,r,e,h,l,i);(o=j.diffed)&&o(a)}catch(U){a.__v=null,(i||h!=null)&&(a.__e=v,a.__h=!!i,h[h.indexOf(v)]=null),j.__e(U,a,c)}}function q5(t,a){j.__c&&j.__c(a,t),t.some(function(c){try{t=c.__h,c.__h=[],t.some(function(r){r.call(c)})}catch(r){j.__e(r,c.__v)}})}function T9(t,a,c,r,e,h,l,v){var i,o,n,u=c.props,H=a.props,C=a.type,p=0;if(C==="svg"&&(e=!0),h!=null){for(;p<h.length;p++)if((i=h[p])&&"setAttribute"in i==!!C&&(C?i.localName===C:i.nodeType===3)){t=i,h[p]=null;break}}if(t==null){if(C===null)return document.createTextNode(H);t=e?document.createElementNS("http://www.w3.org/2000/svg",C):document.createElement(C,H.is&&H),h=null,v=!1}if(C===null)u===H||v&&t.data===H||(t.data=H);else{if(h=h&&i4.call(t.childNodes),o=(u=c.props||U4).dangerouslySetInnerHTML,n=H.dangerouslySetInnerHTML,!v){if(h!=null)for(u={},p=0;p<t.attributes.length;p++)u[t.attributes[p].name]=t.attributes[p].value;(n||o)&&(n&&(o&&n.__html==o.__html||n.__html===t.innerHTML)||(t.innerHTML=n&&n.__html||""))}if(I9(t,H,u,e,v),n)a.__k=[];else if(p=a.props.children,D5(t,Array.isArray(p)?p:[p],a,c,r,e&&C!=="foreignObject",h,l,h?h[0]:c.__k&&d4(c,0),v),h!=null)for(p=h.length;p--;)h[p]!=null&&P5(h[p]);v||("value"in H&&(p=H.value)!==void 0&&(p!==t.value||C==="progress"&&!p||C==="option"&&p!==u.value)&&G4(t,"value",p,u.value,!1),"checked"in H&&(p=H.checked)!==void 0&&p!==t.checked&&G4(t,"checked",p,u.checked,!1))}return t}function $5(t,a,c){try{typeof t=="function"?t(a):t.current=a}catch(r){j.__e(r,c)}}function j5(t,a,c){var r,e;if(j.unmount&&j.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||$5(r,null,a)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(h){j.__e(h,a)}r.base=r.__P=null,t.__c=void 0}if(r=t.__k)for(e=0;e<r.length;e++)r[e]&&j5(r[e],a,c||typeof t.type!="function");c||t.__e==null||P5(t.__e),t.__=t.__e=t.__d=void 0}function _9(t,a,c){return this.constructor(t,c)}function D2(t,a,c){var r,e,h;j.__&&j.__(t,a),e=(r=typeof c=="function")?null:c&&c.__k||a.__k,h=[],W0(a,t=(!r&&c||a).__k=t2(Y1,null,[t]),e||U4,U4,a.ownerSVGElement!==void 0,!r&&c?[c]:e?null:a.firstChild?i4.call(a.childNodes):null,h,!r&&c?c:e?e.__e:a.firstChild,r),q5(h,t)}function G0(t,a){D2(t,a,G0)}function K5(t,a,c){var r,e,h,l=o2({},t.props);for(h in a)h=="key"?r=a[h]:h=="ref"?e=a[h]:l[h]=a[h];return arguments.length>2&&(l.children=arguments.length>3?i4.call(arguments,2):c),g4(t.type,l,r||t.key,e||t.ref,null)}function q0(t,a){var c={__c:a="__cC"+T5++,__:t,Consumer:function(r,e){return r.children(e)},Provider:function(r){var e,h;return this.getChildContext||(e=[],(h={})[a]=this,this.getChildContext=function(){return h},this.shouldComponentUpdate=function(l){this.props.value!==l.value&&e.some(U0)},this.sub=function(l){e.push(l);var v=l.componentWillUnmount;l.componentWillUnmount=function(){e.splice(e.indexOf(l),1),v&&v.call(l)}}),r.children}};return c.Provider.__=c.Consumer.contextType=c}i4=_5.slice,j={__e:function(t,a,c,r){for(var e,h,l;a=a.__;)if((e=a.__c)&&!e.__)try{if((h=e.constructor)&&h.getDerivedStateFromError!=null&&(e.setState(h.getDerivedStateFromError(t)),l=e.__d),e.componentDidCatch!=null&&(e.componentDidCatch(t,r||{}),l=e.__d),l)return e.__E=e}catch(v){t=v}throw t}},b5=0,R9=function(t){return t!=null&&t.constructor===void 0},Q1.prototype.setState=function(t,a){var c;c=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=o2({},this.state),typeof t=="function"&&(t=t(o2({},c),this.props)),t&&o2(c,t),t!=null&&this.__v&&(a&&this._sb.push(a),U0(this))},Q1.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),U0(this))},Q1.prototype.render=Y1,o4=[],W4.__r=0,T5=0;var B2,A1,$0,Y5,E2=0,Q5=[],q4=[],J5=j.__b,X5=j.__r,t6=j.diffed,a6=j.__c,c6=j.unmount;function N2(t,a){j.__h&&j.__h(A1,t,E2||a),E2=0;var c=A1.__H||(A1.__H={__:[],__h:[]});return t>=c.__.length&&c.__.push({__V:q4}),c.__[t]}function w1(t){return E2=1,z4(v6,t)}function z4(t,a,c){var r=N2(B2++,2);if(r.t=t,!r.__c&&(r.__=[c?c(a):v6(void 0,a),function(h){var l=r.__N?r.__N[0]:r.__[0],v=r.t(l,h);l!==v&&(r.__N=[v,r.__[1]],r.__c.setState({}))}],r.__c=A1,!A1.u)){A1.u=!0;var e=A1.shouldComponentUpdate;A1.shouldComponentUpdate=function(h,l,v){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(n){return n.__c});if(i.every(function(n){return!n.__N}))return!e||e.call(this,h,l,v);var o=!1;return i.forEach(function(n){if(n.__N){var u=n.__[0];n.__=n.__N,n.__N=void 0,u!==n.__[0]&&(o=!0)}}),!(!o&&r.__c.props===h)&&(!e||e.call(this,h,l,v))}}return r.__N||r.__}function m1(t,a){var c=N2(B2++,3);!j.__s&&K0(c.__H,a)&&(c.__=t,c.i=a,A1.__H.__h.push(c))}function s4(t,a){var c=N2(B2++,4);!j.__s&&K0(c.__H,a)&&(c.__=t,c.i=a,A1.__h.push(c))}function a2(t){return E2=5,k1(function(){return{current:t}},[])}function $4(t,a,c){E2=6,s4(function(){return typeof t=="function"?(t(a()),function(){return t(null)}):t?(t.current=a(),function(){return t.current=null}):void 0},c==null?c:c.concat(t))}function k1(t,a){var c=N2(B2++,7);return K0(c.__H,a)?(c.__V=t(),c.i=a,c.__h=t,c.__V):c.__}function _1(t,a){return E2=8,k1(function(){return t},a)}function r6(t){var a=A1.context[t.__c],c=N2(B2++,9);return c.c=t,a?(c.__==null&&(c.__=!0,a.sub(A1)),a.props.value):t.__}function e6(t,a){j.useDebugValue&&j.useDebugValue(a?a(t):t)}function h6(){var t=N2(B2++,11);if(!t.__){for(var a=A1.__v;a!==null&&!a.__m&&a.__!==null;)a=a.__;var c=a.__m||(a.__m=[0,0]);t.__="P"+c[0]+"-"+c[1]++}return t.__}function P9(){for(var t;t=Q5.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(j4),t.__H.__h.forEach(j0),t.__H.__h=[]}catch(a){t.__H.__h=[],j.__e(a,t.__v)}}j.__b=function(t){A1=null,J5&&J5(t)},j.__r=function(t){X5&&X5(t),B2=0;var a=(A1=t.__c).__H;a&&($0===A1?(a.__h=[],A1.__h=[],a.__.forEach(function(c){c.__N&&(c.__=c.__N),c.__V=q4,c.__N=c.i=void 0})):(a.__h.forEach(j4),a.__h.forEach(j0),a.__h=[])),$0=A1},j.diffed=function(t){t6&&t6(t);var a=t.__c;a&&a.__H&&(a.__H.__h.length&&(Q5.push(a)!==1&&Y5===j.requestAnimationFrame||((Y5=j.requestAnimationFrame)||k9)(P9)),a.__H.__.forEach(function(c){c.i&&(c.__H=c.i),c.__V!==q4&&(c.__=c.__V),c.i=void 0,c.__V=q4})),$0=A1=null},j.__c=function(t,a){a.some(function(c){try{c.__h.forEach(j4),c.__h=c.__h.filter(function(r){return!r.__||j0(r)})}catch(r){a.some(function(e){e.__h&&(e.__h=[])}),a=[],j.__e(r,c.__v)}}),a6&&a6(t,a)},j.unmount=function(t){c6&&c6(t);var a,c=t.__c;c&&c.__H&&(c.__H.__.forEach(function(r){try{j4(r)}catch(e){a=e}}),c.__H=void 0,a&&j.__e(a,c.__v))};var l6=typeof requestAnimationFrame=="function";function k9(t){var a,c=function(){clearTimeout(r),l6&&cancelAnimationFrame(a),setTimeout(t)},r=setTimeout(c,100);l6&&(a=requestAnimationFrame(c))}function j4(t){var a=A1,c=t.__c;typeof c=="function"&&(t.__c=void 0,c()),A1=a}function j0(t){var a=A1;t.__c=t.__(),A1=a}function K0(t,a){return!t||t.length!==a.length||a.some(function(c,r){return c!==t[r]})}function v6(t,a){return typeof a=="function"?a(t):a}function n6(t,a){for(var c in a)t[c]=a[c];return t}function Y0(t,a){for(var c in t)if(c!=="__source"&&!(c in a))return!0;for(var r in a)if(r!=="__source"&&t[r]!==a[r])return!0;return!1}function Q0(t,a){return t===a&&(t!==0||1/t==1/a)||t!=t&&a!=a}function J0(t){this.props=t}function D9(t,a){function c(e){var h=this.props.ref,l=h==e.ref;return!l&&h&&(h.call?h(null):h.current=null),a?!a(this.props,e)||!l:Y0(this.props,e)}function r(e){return this.shouldComponentUpdate=c,t2(t,e)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(J0.prototype=new Q1).isPureReactComponent=!0,J0.prototype.shouldComponentUpdate=function(t,a){return Y0(this.props,t)||Y0(this.state,a)};var i6=j.__b;j.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),i6&&i6(t)};var E9=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function X0(t){function a(c){var r=n6({},c);return delete r.ref,t(r,c.ref||null)}return a.$$typeof=E9,a.render=a,a.prototype.isReactComponent=a.__f=!0,a.displayName="ForwardRef("+(t.displayName||t.name)+")",a}var o6=function(t,a){return t==null?null:h2(h2(t).map(a))},N9={map:o6,forEach:o6,count:function(t){return t?h2(t).length:0},only:function(t){var a=h2(t);if(a.length!==1)throw"Children.only";return a[0]},toArray:h2},U9=j.__e;j.__e=function(t,a,c,r){if(t.then){for(var e,h=a;h=h.__;)if((e=h.__c)&&e.__c)return a.__e==null&&(a.__e=c.__e,a.__k=c.__k),e.__c(t,a)}U9(t,a,c,r)};var g6=j.unmount;function d6(t,a,c){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=n6({},t)).__c!=null&&(t.__c.__P===c&&(t.__c.__P=a),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return d6(r,a,c)})),t}function z6(t,a,c){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return z6(r,a,c)}),t.__c&&t.__c.__P===a&&(t.__e&&c.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=c)),t}function K4(){this.__u=0,this.t=null,this.__b=null}function s6(t){var a=t.__.__c;return a&&a.__a&&a.__a(t)}function W9(t){var a,c,r;function e(h){if(a||(a=t()).then(function(l){c=l.default||l},function(l){r=l}),r)throw r;if(!c)throw a;return t2(c,h)}return e.displayName="Lazy",e.__f=!0,e}function u4(){this.u=null,this.o=null}j.unmount=function(t){var a=t.__c;a&&a.__R&&a.__R(),a&&t.__h===!0&&(t.type=null),g6&&g6(t)},(K4.prototype=new Q1).__c=function(t,a){var c=a.__c,r=this;r.t==null&&(r.t=[]),r.t.push(c);var e=s6(r.__v),h=!1,l=function(){h||(h=!0,c.__R=null,e?e(v):v())};c.__R=l;var v=function(){if(!--r.__u){if(r.state.__a){var o=r.state.__a;r.__v.__k[0]=z6(o,o.__c.__P,o.__c.__O)}var n;for(r.setState({__a:r.__b=null});n=r.t.pop();)n.forceUpdate()}},i=a.__h===!0;r.__u++||i||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(l,l)},K4.prototype.componentWillUnmount=function(){this.t=[]},K4.prototype.render=function(t,a){if(this.__b){if(this.__v.__k){var c=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=d6(this.__b,c,r.__O=r.__P)}this.__b=null}var e=a.__a&&t2(Y1,null,t.fallback);return e&&(e.__h=null),[t2(Y1,null,a.__a?null:t.children),e]};var u6=function(t,a,c){if(++c[1]===c[0]&&t.o.delete(a),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(c=t.u;c;){for(;c.length>3;)c.pop()();if(c[1]<c[0])break;t.u=c=c[2]}};function G9(t){return this.getChildContext=function(){return t.context},t.children}function q9(t){var a=this,c=t.i;a.componentWillUnmount=function(){D2(null,a.l),a.l=null,a.i=null},a.i&&a.i!==c&&a.componentWillUnmount(),t.__v?(a.l||(a.i=c,a.l={nodeType:1,parentNode:c,childNodes:[],appendChild:function(r){this.childNodes.push(r),a.i.appendChild(r)},insertBefore:function(r,e){this.childNodes.push(r),a.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),a.i.removeChild(r)}}),D2(t2(G9,{context:a.context},t.__v),a.l)):a.l&&a.componentWillUnmount()}function $9(t,a){var c=t2(q9,{__v:t,i:a});return c.containerInfo=a,c}(u4.prototype=new Q1).__a=function(t){var a=this,c=s6(a.__v),r=a.o.get(t);return r[0]++,function(e){var h=function(){a.props.revealOrder?(r.push(e),u6(a,t,r)):e()};c?c(h):h()}},u4.prototype.render=function(t){this.u=null,this.o=new Map;var a=h2(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&a.reverse();for(var c=a.length;c--;)this.o.set(a[c],this.u=[1,0,this.u]);return t.children},u4.prototype.componentDidUpdate=u4.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(a,c){u6(t,c,a)})};var p6=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,j9=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,K9=typeof document!="undefined",Y9=function(t){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(t)};function Q9(t,a,c){return a.__k==null&&(a.textContent=""),D2(t,a),typeof c=="function"&&c(),t?t.__c:null}function J9(t,a,c){return G0(t,a),typeof c=="function"&&c(),t?t.__c:null}Q1.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Q1.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(a){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:a})}})});var M6=j.event;function X9(){}function tt(){return this.cancelBubble}function at(){return this.defaultPrevented}j.event=function(t){return M6&&(t=M6(t)),t.persist=X9,t.isPropagationStopped=tt,t.isDefaultPrevented=at,t.nativeEvent=t};var H6,f6={configurable:!0,get:function(){return this.class}},x6=j.vnode;j.vnode=function(t){var a=t.type,c=t.props,r=c;if(typeof a=="string"){var e=a.indexOf("-")===-1;for(var h in r={},c){var l=c[h];K9&&h==="children"&&a==="noscript"||h==="value"&&"defaultValue"in c&&l==null||(h==="defaultValue"&&"value"in c&&c.value==null?h="value":h==="download"&&l===!0?l="":/ondoubleclick/i.test(h)?h="ondblclick":/^onchange(textarea|input)/i.test(h+a)&&!Y9(c.type)?h="oninput":/^onfocus$/i.test(h)?h="onfocusin":/^onblur$/i.test(h)?h="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(h)?h=h.toLowerCase():e&&j9.test(h)?h=h.replace(/[A-Z0-9]/g,"-$&").toLowerCase():l===null&&(l=void 0),/^oninput$/i.test(h)&&(h=h.toLowerCase(),r[h]&&(h="oninputCapture")),r[h]=l)}a=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=h2(c.children).forEach(function(v){v.props.selected=r.value.indexOf(v.props.value)!=-1})),a=="select"&&r.defaultValue!=null&&(r.value=h2(c.children).forEach(function(v){v.props.selected=r.multiple?r.defaultValue.indexOf(v.props.value)!=-1:r.defaultValue==v.props.value})),t.props=r,c.class!=c.className&&(f6.enumerable="className"in c,c.className!=null&&(r.class=c.className),Object.defineProperty(r,"className",f6))}t.$$typeof=p6,x6&&x6(t)};var V6=j.__r;j.__r=function(t){V6&&V6(t),H6=t.__c};var ct={ReactCurrentDispatcher:{current:{readContext:function(t){return H6.__n[t.__c].props.value}}}};function rt(t){return t2.bind(null,t)}function m6(t){return!!t&&t.$$typeof===p6}function et(t){return m6(t)?K5.apply(null,arguments):t}function ht(t){return!!t.__k&&(D2(null,t),!0)}function lt(t){return t&&(t.base||t.nodeType===1&&t)||null}var vt=function(t,a){return t(a)},nt=function(t,a){return t(a)},it=Y1;function C6(t){t()}function ot(t){return t}function gt(){return[!1,C6]}var dt=s4;function zt(t,a){var c=a(),r=w1({h:{__:c,v:a}}),e=r[0].h,h=r[1];return s4(function(){e.__=c,e.v=a,Q0(e.__,a())||h({h:e})},[t,c,a]),m1(function(){return Q0(e.__,e.v())||h({h:e}),t(function(){Q0(e.__,e.v())||h({h:e})})},[t]),c}var f={useState:w1,useId:h6,useReducer:z4,useEffect:m1,useLayoutEffect:s4,useInsertionEffect:dt,useTransition:gt,useDeferredValue:ot,useSyncExternalStore:zt,startTransition:C6,useRef:a2,useImperativeHandle:$4,useMemo:k1,useCallback:_1,useContext:r6,useDebugValue:e6,version:"17.0.2",Children:N9,render:Q9,hydrate:J9,unmountComponentAtNode:ht,createPortal:$9,createElement:t2,createContext:q0,createFactory:rt,cloneElement:et,createRef:N0,Fragment:Y1,isValidElement:m6,findDOMNode:lt,Component:Q1,PureComponent:J0,memo:D9,forwardRef:X0,flushSync:nt,unstable_batchedUpdates:vt,StrictMode:it,Suspense:K4,SuspenseList:u4,lazy:W9,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ct};var i2=U1(require("obsidian"));var C1=U1(O6());var t8=U1(X6()),{__extends:mv,__assign:Cv,__rest:Lv,__decorate:wv,__param:Bv,__metadata:Av,__awaiter:A2,__generator:S2,__exportStar:Sv,__createBinding:Fv,__values:yv,__read:Ov,__spread:a8,__spreadArrays:Zv,__spreadArray:Rv,__await:bv,__asyncGenerator:Iv,__asyncDelegator:Tv,__asyncValues:_v,__makeTemplateObject:Pv,__importStar:kv,__importDefault:Dv,__classPrivateFieldGet:Ev,__classPrivateFieldSet:Nv,__classPrivateFieldIn:Uv}=t8.default;var pt=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function W2(t,a){var c=Mt(t);if(typeof c.path!="string"){var r=t.webkitRelativePath;Object.defineProperty(c,"path",{value:typeof a=="string"?a:typeof r=="string"&&r.length>0?r:t.name,writable:!1,configurable:!1,enumerable:!0})}return c}function Mt(t){var a=t.name,c=a&&a.lastIndexOf(".")!==-1;if(c&&!t.type){var r=a.split(".").pop().toLowerCase(),e=pt.get(r);e&&Object.defineProperty(t,"type",{value:e,writable:!1,configurable:!1,enumerable:!0})}return t}var Ht=[".DS_Store","Thumbs.db"];function a3(t){return A2(this,void 0,void 0,function(){return S2(this,function(a){return X4(t)&&ft(t)?[2,Ct(t.dataTransfer,t.type)]:xt(t)?[2,Vt(t)]:Array.isArray(t)&&t.every(function(c){return"getFile"in c&&typeof c.getFile=="function"})?[2,mt(t)]:[2,[]]})})}function ft(t){return X4(t.dataTransfer)}function xt(t){return X4(t)&&X4(t.target)}function X4(t){return typeof t=="object"&&t!==null}function Vt(t){return c3(t.target.files).map(function(a){return W2(a)})}function mt(t){return A2(this,void 0,void 0,function(){var a;return S2(this,function(c){switch(c.label){case 0:return[4,Promise.all(t.map(function(r){return r.getFile()}))];case 1:return a=c.sent(),[2,a.map(function(r){return W2(r)})]}})})}function Ct(t,a){return A2(this,void 0,void 0,function(){var c,r;return S2(this,function(e){switch(e.label){case 0:return t===null?[2,[]]:t.items?(c=c3(t.items).filter(function(h){return h.kind==="file"}),a!=="drop"?[2,c]:[4,Promise.all(c.map(Lt))]):[3,2];case 1:return r=e.sent(),[2,c8(r8(r))];case 2:return[2,c8(c3(t.files).map(function(h){return W2(h)}))]}})})}function c8(t){return t.filter(function(a){return Ht.indexOf(a.name)===-1})}function c3(t){if(t===null)return[];for(var a=[],c=0;c<t.length;c++){var r=t[c];a.push(r)}return a}function Lt(t){if(typeof t.webkitGetAsEntry!="function")return e8(t);var a=t.webkitGetAsEntry();return a&&a.isDirectory?h8(a):e8(t)}function r8(t){return t.reduce(function(a,c){return a8(a,Array.isArray(c)?r8(c):[c])},[])}function e8(t){var a=t.getAsFile();if(!a)return Promise.reject(t+" is not a File");var c=W2(a);return Promise.resolve(c)}function wt(t){return A2(this,void 0,void 0,function(){return S2(this,function(a){return[2,t.isDirectory?h8(t):Bt(t)]})})}function h8(t){var a=t.createReader();return new Promise(function(c,r){var e=[];function h(){var l=this;a.readEntries(function(v){return A2(l,void 0,void 0,function(){var i,o,n;return S2(this,function(u){switch(u.label){case 0:if(v.length)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,Promise.all(e)];case 2:return i=u.sent(),c(i),[3,4];case 3:return o=u.sent(),r(o),[3,4];case 4:return[3,6];case 5:n=Promise.all(v.map(wt)),e.push(n),h(),u.label=6;case 6:return[2]}})})},function(v){r(v)})}h()})}function Bt(t){return A2(this,void 0,void 0,function(){return S2(this,function(a){return[2,new Promise(function(c,r){t.file(function(e){var h=W2(e,t.fullPath);c(h)},function(e){r(e)})})]})})}var d8=U1(l8());function v8(t,a){var c=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);a&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),c.push.apply(c,r)}return c}function n8(t){for(var a=1;a<arguments.length;a++){var c=arguments[a]!=null?arguments[a]:{};a%2?v8(Object(c),!0).forEach(function(r){i8(t,r,c[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(c)):v8(Object(c)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(c,r))})}return t}function i8(t,a,c){return a in t?Object.defineProperty(t,a,{value:c,enumerable:!0,configurable:!0,writable:!0}):t[a]=c,t}function o8(t,a){return yt(t)||Ft(t,a)||St(t,a)||At()}function At(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function St(t,a){if(!!t){if(typeof t=="string")return g8(t,a);var c=Object.prototype.toString.call(t).slice(8,-1);if(c==="Object"&&t.constructor&&(c=t.constructor.name),c==="Map"||c==="Set")return Array.from(t);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return g8(t,a)}}function g8(t,a){(a==null||a>t.length)&&(a=t.length);for(var c=0,r=new Array(a);c<a;c++)r[c]=t[c];return r}function Ft(t,a){var c=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(c!=null){var r=[],e=!0,h=!1,l,v;try{for(c=c.call(t);!(e=(l=c.next()).done)&&(r.push(l.value),!(a&&r.length===a));e=!0);}catch(i){h=!0,v=i}finally{try{!e&&c.return!=null&&c.return()}finally{if(h)throw v}}return r}}function yt(t){if(Array.isArray(t))return t}var Ot="file-invalid-type",Zt="file-too-large",Rt="file-too-small",bt="too-many-files";var It=function(a){a=Array.isArray(a)&&a.length===1?a[0]:a;var c=Array.isArray(a)?"one of ".concat(a.join(", ")):a;return{code:Ot,message:"File type must be ".concat(c)}},z8=function(a){return{code:Zt,message:"File is larger than ".concat(a," ").concat(a===1?"byte":"bytes")}},s8=function(a){return{code:Rt,message:"File is smaller than ".concat(a," ").concat(a===1?"byte":"bytes")}},u8={code:bt,message:"Too many files"};function e3(t,a){var c=t.type==="application/x-moz-file"||(0,d8.default)(t,a);return[c,c?null:It(a)]}function h3(t,a,c){if(p4(t.size))if(p4(a)&&p4(c)){if(t.size>c)return[!1,z8(c)];if(t.size<a)return[!1,s8(a)]}else{if(p4(a)&&t.size<a)return[!1,s8(a)];if(p4(c)&&t.size>c)return[!1,z8(c)]}return[!0,null]}function p4(t){return t!=null}function p8(t){var a=t.files,c=t.accept,r=t.minSize,e=t.maxSize,h=t.multiple,l=t.maxFiles;return!h&&a.length>1||h&&l>=1&&a.length>l?!1:a.every(function(v){var i=e3(v,c),o=o8(i,1),n=o[0],u=h3(v,r,e),H=o8(u,1),C=H[0];return n&&C})}function M4(t){return typeof t.isPropagationStopped=="function"?t.isPropagationStopped():typeof t.cancelBubble!="undefined"?t.cancelBubble:!1}function H4(t){return t.dataTransfer?Array.prototype.some.call(t.dataTransfer.types,function(a){return a==="Files"||a==="application/x-moz-file"}):!!t.target&&!!t.target.files}function l3(t){t.preventDefault()}function Tt(t){return t.indexOf("MSIE")!==-1||t.indexOf("Trident/")!==-1}function _t(t){return t.indexOf("Edge/")!==-1}function M8(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Tt(t)||_t(t)}function c2(){for(var t=arguments.length,a=new Array(t),c=0;c<t;c++)a[c]=arguments[c];return function(r){for(var e=arguments.length,h=new Array(e>1?e-1:0),l=1;l<e;l++)h[l-1]=arguments[l];return a.some(function(v){return!M4(r)&&v&&v.apply(void 0,[r].concat(h)),M4(r)})}}function v3(){return"showOpenFilePicker"in window}function H8(t){return t=typeof t=="string"?t.split(","):t,[{description:"everything",accept:Array.isArray(t)?t.filter(function(a){return a==="audio/*"||a==="video/*"||a==="image/*"||a==="text/*"||/\w+\/[-+.\w]+/g.test(a)}).reduce(function(a,c){return n8(n8({},a),{},i8({},c,[]))},{}):{}}]}var Pt=["children"],kt=["open"],Dt=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Et=["refKey","onChange","onClick"];function Nt(t){return Gt(t)||Wt(t)||f8(t)||Ut()}function Ut(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wt(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Gt(t){if(Array.isArray(t))return i3(t)}function n3(t,a){return jt(t)||$t(t,a)||f8(t,a)||qt()}function qt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f8(t,a){if(!!t){if(typeof t=="string")return i3(t,a);var c=Object.prototype.toString.call(t).slice(8,-1);if(c==="Object"&&t.constructor&&(c=t.constructor.name),c==="Map"||c==="Set")return Array.from(t);if(c==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return i3(t,a)}}function i3(t,a){(a==null||a>t.length)&&(a=t.length);for(var c=0,r=new Array(a);c<a;c++)r[c]=t[c];return r}function $t(t,a){var c=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(c!=null){var r=[],e=!0,h=!1,l,v;try{for(c=c.call(t);!(e=(l=c.next()).done)&&(r.push(l.value),!(a&&r.length===a));e=!0);}catch(i){h=!0,v=i}finally{try{!e&&c.return!=null&&c.return()}finally{if(h)throw v}}return r}}function jt(t){if(Array.isArray(t))return t}function x8(t,a){var c=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);a&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),c.push.apply(c,r)}return c}function S1(t){for(var a=1;a<arguments.length;a++){var c=arguments[a]!=null?arguments[a]:{};a%2?x8(Object(c),!0).forEach(function(r){o3(t,r,c[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(c)):x8(Object(c)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(c,r))})}return t}function o3(t,a,c){return a in t?Object.defineProperty(t,a,{value:c,enumerable:!0,configurable:!0,writable:!0}):t[a]=c,t}function t0(t,a){if(t==null)return{};var c=Kt(t,a),r,e;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(t);for(e=0;e<h.length;e++)r=h[e],!(a.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,r)||(c[r]=t[r]))}return c}function Kt(t,a){if(t==null)return{};var c={},r=Object.keys(t),e,h;for(h=0;h<r.length;h++)e=r[h],!(a.indexOf(e)>=0)&&(c[e]=t[e]);return c}var a0=X0(function(t,a){var c=t.children,r=t0(t,Pt),e=Yt(r),h=e.open,l=t0(e,kt);return $4(a,function(){return{open:h}},[h]),f.createElement(Y1,null,c(S1(S1({},l),{},{open:h})))});a0.displayName="Dropzone";var V8={disabled:!1,getFilesFromEvent:a3,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!1};a0.defaultProps=V8;a0.propTypes={children:C1.default.func,accept:C1.default.oneOfType([C1.default.string,C1.default.arrayOf(C1.default.string)]),multiple:C1.default.bool,preventDropOnDocument:C1.default.bool,noClick:C1.default.bool,noKeyboard:C1.default.bool,noDrag:C1.default.bool,noDragEventsBubbling:C1.default.bool,minSize:C1.default.number,maxSize:C1.default.number,maxFiles:C1.default.number,disabled:C1.default.bool,getFilesFromEvent:C1.default.func,onFileDialogCancel:C1.default.func,onFileDialogOpen:C1.default.func,useFsAccessApi:C1.default.bool,onDragEnter:C1.default.func,onDragLeave:C1.default.func,onDragOver:C1.default.func,onDrop:C1.default.func,onDropAccepted:C1.default.func,onDropRejected:C1.default.func,validator:C1.default.func};var c0=a0,g3={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Yt(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=S1(S1({},V8),t),c=a.accept,r=a.disabled,e=a.getFilesFromEvent,h=a.maxSize,l=a.minSize,v=a.multiple,i=a.maxFiles,o=a.onDragEnter,n=a.onDragLeave,u=a.onDragOver,H=a.onDrop,C=a.onDropAccepted,p=a.onDropRejected,R=a.onFileDialogCancel,w=a.onFileDialogOpen,T=a.useFsAccessApi,O=a.preventDropOnDocument,S=a.noClick,d=a.noKeyboard,B=a.noDrag,I=a.noDragEventsBubbling,L=a.validator,b=k1(function(){return typeof w=="function"?w:m8},[w]),U=k1(function(){return typeof R=="function"?R:m8},[R]),Y=a2(null),P=a2(null),_=z4(Qt,g3),A=n3(_,2),E=A[0],F=A[1],q=E.isFocused,W=E.isFileDialogActive,t1=E.draggedFiles,o1=function(){W&&setTimeout(function(){if(P.current){var r1=P.current.files;r1.length||(F({type:"closeDialog"}),U())}},300)};m1(function(){return T&&v3()?function(){}:(window.addEventListener("focus",o1,!1),function(){window.removeEventListener("focus",o1,!1)})},[P,W,U,T]);var a1=a2([]),u1=function(r1){Y.current&&Y.current.contains(r1.target)||(r1.preventDefault(),a1.current=[])};m1(function(){return O&&(document.addEventListener("dragover",l3,!1),document.addEventListener("drop",u1,!1)),function(){O&&(document.removeEventListener("dragover",l3),document.removeEventListener("drop",u1))}},[Y,O]);var K=_1(function(N){N.preventDefault(),N.persist(),n1(N),a1.current=[].concat(Nt(a1.current),[N.target]),H4(N)&&Promise.resolve(e(N)).then(function(r1){M4(N)&&!I||(F({draggedFiles:r1,isDragActive:!0,type:"setDraggedFiles"}),o&&o(N))})},[e,o,I]),g1=_1(function(N){N.preventDefault(),N.persist(),n1(N);var r1=H4(N);if(r1&&N.dataTransfer)try{N.dataTransfer.dropEffect="copy"}catch(b1){}return r1&&u&&u(N),!1},[u,I]),l1=_1(function(N){N.preventDefault(),N.persist(),n1(N);var r1=a1.current.filter(function(I1){return Y.current&&Y.current.contains(I1)}),b1=r1.indexOf(N.target);b1!==-1&&r1.splice(b1,1),a1.current=r1,!(r1.length>0)&&(F({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),H4(N)&&n&&n(N))},[Y,n,I]),z=_1(function(N,r1){var b1=[],I1=[];N.forEach(function(N1){var L2=e3(N1,c),u2=n3(L2,2),a4=u2[0],c4=u2[1],r4=h3(N1,l,h),_2=n3(r4,2),P2=_2[0],e4=_2[1],h4=L?L(N1):null;if(a4&&P2&&!h4)b1.push(N1);else{var s=[c4,e4];h4&&(s=s.concat(h4)),I1.push({file:N1,errors:s.filter(function(g){return g})})}}),(!v&&b1.length>1||v&&i>=1&&b1.length>i)&&(b1.forEach(function(N1){I1.push({file:N1,errors:[u8]})}),b1.splice(0)),F({acceptedFiles:b1,fileRejections:I1,type:"setFiles"}),H&&H(b1,I1,r1),I1.length>0&&p&&p(I1,r1),b1.length>0&&C&&C(b1,r1)},[F,v,c,l,h,i,H,C,p,L]),m=_1(function(N){N.preventDefault(),N.persist(),n1(N),a1.current=[],H4(N)&&Promise.resolve(e(N)).then(function(r1){M4(N)&&!I||z(r1,N)}),F({type:"reset"})},[e,z,I]),V=_1(function(){if(T&&v3()){F({type:"openDialog"}),b();var N={multiple:v,types:H8(c)};window.showOpenFilePicker(N).then(function(r1){return e(r1)}).then(function(r1){return z(r1,null)}).catch(function(r1){return U(r1)}).finally(function(){return F({type:"closeDialog"})});return}P.current&&(F({type:"openDialog"}),b(),P.current.value=null,P.current.click())},[F,b,U,T,z,c,v]),Z=_1(function(N){!Y.current||!Y.current.isEqualNode(N.target)||(N.keyCode===32||N.keyCode===13)&&(N.preventDefault(),V())},[Y,P,V]),M=_1(function(){F({type:"focus"})},[]),x=_1(function(){F({type:"blur"})},[]),$=_1(function(){S||(M8()?setTimeout(V,0):V())},[P,S,V]),e1=function(r1){return r?null:r1},v1=function(r1){return d?null:e1(r1)},p1=function(r1){return B?null:e1(r1)},n1=function(r1){I&&r1.stopPropagation()},c1=k1(function(){return function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r1=N.refKey,b1=r1===void 0?"ref":r1,I1=N.role,N1=N.onKeyDown,L2=N.onFocus,u2=N.onBlur,a4=N.onClick,c4=N.onDragEnter,r4=N.onDragOver,_2=N.onDragLeave,P2=N.onDrop,e4=t0(N,Dt);return S1(S1(o3({onKeyDown:v1(c2(N1,Z)),onFocus:v1(c2(L2,M)),onBlur:v1(c2(u2,x)),onClick:e1(c2(a4,$)),onDragEnter:p1(c2(c4,K)),onDragOver:p1(c2(r4,g1)),onDragLeave:p1(c2(_2,l1)),onDrop:p1(c2(P2,m)),role:typeof I1=="string"&&I1!==""?I1:"button"},b1,Y),!r&&!d?{tabIndex:0}:{}),e4)}},[Y,Z,M,x,$,K,g1,l1,m,d,B,r]),D1=_1(function(N){N.stopPropagation()},[]),R1=k1(function(){return function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r1=N.refKey,b1=r1===void 0?"ref":r1,I1=N.onChange,N1=N.onClick,L2=t0(N,Et),u2=o3({accept:c,multiple:v,type:"file",style:{display:"none"},onChange:e1(c2(I1,m)),onClick:e1(c2(N1,D1)),autoComplete:"off",tabIndex:-1},b1,P);return S1(S1({},u2),L2)}},[P,c,v,m,r]),E1=t1.length,Z1=E1>0&&p8({files:t1,accept:c,minSize:l,maxSize:h,multiple:v,maxFiles:i}),s2=E1>0&&!Z1;return S1(S1({},E),{},{isDragAccept:Z1,isDragReject:s2,isFocused:q&&!r,getRootProps:c1,getInputProps:R1,rootRef:Y,inputRef:P,open:e1(V)})}function Qt(t,a){switch(a.type){case"focus":return S1(S1({},t),{},{isFocused:!0});case"blur":return S1(S1({},t),{},{isFocused:!1});case"openDialog":return S1(S1({},g3),{},{isFileDialogActive:!0});case"closeDialog":return S1(S1({},t),{},{isFileDialogActive:!1});case"setDraggedFiles":var c=a.isDragActive,r=a.draggedFiles;return S1(S1({},t),{},{draggedFiles:r,isDragActive:c});case"setFiles":return S1(S1({},t),{},{acceptedFiles:a.acceptedFiles,fileRejections:a.fileRejections});case"reset":return S1({},g3);default:return t}}function m8(){}var C5=U1(require("obsidian"));var d3={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},z3=f.createContext&&f.createContext(d3);var M2=function(){return M2=Object.assign||function(t){for(var a,c=1,r=arguments.length;c<r;c++){a=arguments[c];for(var e in a)Object.prototype.hasOwnProperty.call(a,e)&&(t[e]=a[e])}return t},M2.apply(this,arguments)},Jt=function(t,a){var c={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&a.indexOf(r)<0&&(c[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var e=0,r=Object.getOwnPropertySymbols(t);e<r.length;e++)a.indexOf(r[e])<0&&Object.prototype.propertyIsEnumerable.call(t,r[e])&&(c[r[e]]=t[r[e]]);return c};function C8(t){return t&&t.map(function(a,c){return f.createElement(a.tag,M2({key:c},a.attr),C8(a.child))})}function d1(t){return function(a){return f.createElement(Xt,M2({attr:M2({},t.attr)},a),C8(t.child))}}function Xt(t){var a=function(c){var r=t.attr,e=t.size,h=t.title,l=Jt(t,["attr","size","title"]),v=e||c.size||"1em",i;return c.className&&(i=c.className),t.className&&(i=(i?i+" ":"")+t.className),f.createElement("svg",M2({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},c.attr,r,l,{className:i,style:M2(M2({color:t.color||c.color},c.style),t.style),height:v,width:v,xmlns:"http://www.w3.org/2000/svg"}),h&&f.createElement("title",null,h),t.children)};return z3!==void 0?f.createElement(z3.Consumer,null,function(c){return a(c)}):a(d3)}function s3(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"4"}},{tag:"path",attr:{d:"M13 4.069V2h-2v2.069A8.01 8.01 0 0 0 4.069 11H2v2h2.069A8.008 8.008 0 0 0 11 19.931V22h2v-2.069A8.007 8.007 0 0 0 19.931 13H22v-2h-2.069A8.008 8.008 0 0 0 13 4.069zM12 18c-3.309 0-6-2.691-6-6s2.691-6 6-6 6 2.691 6 6-2.691 6-6 6z"}}]})(t)}function u3(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M19.903 8.586a.997.997 0 0 0-.196-.293l-6-6a.997.997 0 0 0-.293-.196c-.03-.014-.062-.022-.094-.033a.991.991 0 0 0-.259-.051C13.04 2.011 13.021 2 13 2H6c-1.103 0-2 .897-2 2v16c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V9c0-.021-.011-.04-.013-.062a.952.952 0 0 0-.051-.259c-.01-.032-.019-.063-.033-.093zM16.586 8H14V5.414L16.586 8zM6 20V4h6v5a1 1 0 0 0 1 1h5l.002 10H6z"}},{tag:"path",attr:{d:"M8 12h8v2H8zm0 4h8v2H8zm0-8h2v2H8z"}}]})(t)}function L8(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 5h-8.586L9.707 3.293A.996.996 0 0 0 9 3H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V7c0-1.103-.897-2-2-2zM4 19V7h16l.002 12H4z"}},{tag:"path",attr:{d:"M7.874 12h8v2h-8z"}}]})(t)}function w8(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M13 9h-2v3H8v2h3v3h2v-3h3v-2h-3z"}},{tag:"path",attr:{d:"M20 5h-8.586L9.707 3.293A.996.996 0 0 0 9 3H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V7c0-1.103-.897-2-2-2zM4 19V7h16l.002 12H4z"}}]})(t)}function B8(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M20 5h-8.586L9.707 3.293A.997.997 0 0 0 9 3H4c-1.103 0-2 .897-2 2v14c0 1.103.897 2 2 2h16c1.103 0 2-.897 2-2V7c0-1.103-.897-2-2-2zM4 19V7h16l.002 12H4z"}}]})(t)}function A8(t){return d1({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7 2l2 2h7v11h-16v-13z"}}]})(t)}function S8(t){return d1({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9 4l-2-2h-7v13h16v-11h-7zM11 11h-2v2h-2v-2h-2v-2h2v-2h2v2h2v2z"}}]})(t)}function F8(t){return d1({tag:"svg",attr:{version:"1.1",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9 4l-2-2h-7v13h16v-11h-7zM11 11h-6v-2h6v2z"}}]})(t)}function y8(t){return d1({tag:"svg",attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M22.3 8h-2.4c-.4-1.2-1.5-2-2.8-2h-6c0-1.1-.9-2-2-2h-4.1c-1.7 0-3 1.3-3 3v10c0 1.7 1.3 3 3 3h12c1.7 0 3.4-1.3 3.8-3l2.2-8c.1-.6-.2-1-.7-1zm-18.3 1v-2c0-.6.4-1 1-1h4c0 1.1.9 2 2 2h6c.6 0 1 .4 1 1h-11.1c-.6 0-1.1.4-1.3 1l-1.6 6.3v-7.3zm14.9 7.5c-.2.8-1.1 1.5-1.9 1.5h-12s-.4-.2-.2-.8l1.9-7c0-.1.2-.2.3-.2h13.7l-1.8 6.5z"}}]})(t)}function p3(t){return d1({tag:"svg",attr:{version:"1.2",baseProfile:"tiny",viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18 6h-6c0-1.104-.896-2-2-2h-4c-1.654 0-3 1.346-3 3v10c0 1.654 1.346 3 3 3h12c1.654 0 3-1.346 3-3v-8c0-1.654-1.346-3-3-3zm-12 0h4c0 1.104.896 2 2 2h6c.552 0 1 .448 1 1h-14v-2c0-.552.448-1 1-1zm12 12h-12c-.552 0-1-.448-1-1v-7h14v7c0 .552-.448 1-1 1z"}}]})(t)}function O8(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12ZM12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M13 7C13 6.44772 12.5523 6 12 6C11.4477 6 11 6.44772 11 7V11H7C6.44772 11 6 11.4477 6 12C6 12.5523 6.44772 13 7 13H11V17C11 17.5523 11.4477 18 12 18C12.5523 18 13 17.5523 13 17V13H17C17.5523 13 18 12.5523 18 12C18 11.4477 17.5523 11 17 11H13V7Z",fill:"currentColor"}}]})(t)}function M3(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M7.75735 5.63605L6.34314 7.05026L12 12.7071L17.6569 7.05029L16.2427 5.63608L12 9.87872L7.75735 5.63605Z",fill:"currentColor"}},{tag:"path",attr:{d:"M6.34314 12.7071L7.75735 11.2929L12 15.5356L16.2427 11.2929L17.6569 12.7071L12 18.364L6.34314 12.7071Z",fill:"currentColor"}}]})(t)}function H3(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M17.6569 11.2929L16.2427 12.7071L12 8.46444L7.75735 12.7071L6.34314 11.2929L12 5.63605L17.6569 11.2929Z",fill:"currentColor"}},{tag:"path",attr:{d:"M17.6569 16.9497L16.2427 18.3639L12 14.1213L7.75735 18.364L6.34314 16.9498L12 11.2929L17.6569 16.9497Z",fill:"currentColor"}}]})(t)}function Z8(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M16.3394 9.32245C16.7434 8.94589 16.7657 8.31312 16.3891 7.90911C16.0126 7.50509 15.3798 7.48283 14.9758 7.85938L12.0497 10.5866L9.32245 7.66048C8.94589 7.25647 8.31312 7.23421 7.90911 7.61076C7.50509 7.98731 7.48283 8.62008 7.85938 9.0241L10.5866 11.9502L7.66048 14.6775C7.25647 15.054 7.23421 15.6868 7.61076 16.0908C7.98731 16.4948 8.62008 16.5171 9.0241 16.1405L11.9502 13.4133L14.6775 16.3394C15.054 16.7434 15.6868 16.7657 16.0908 16.3891C16.4948 16.0126 16.5171 15.3798 16.1405 14.9758L13.4133 12.0497L16.3394 9.32245Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12ZM12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12C21 16.9706 16.9706 21 12 21Z",fill:"currentColor"}}]})(t)}function R8(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M8 11C7.44772 11 7 11.4477 7 12C7 12.5523 7.44772 13 8 13H16C16.5523 13 17 12.5523 17 12C17 11.4477 16.5523 11 16 11H8Z",fill:"currentColor"}},{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",fill:"currentColor"}}]})(t)}function f4(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none"},child:[{tag:"path",attr:{d:"M6 8C6 7.44772 6.44772 7 7 7H17C17.5523 7 18 7.44772 18 8C18 8.55228 17.5523 9 17 9H7C6.44772 9 6 8.55228 6 8Z",fill:"currentColor"}},{tag:"path",attr:{d:"M8 12C8 11.4477 8.44772 11 9 11H15C15.5523 11 16 11.4477 16 12C16 12.5523 15.5523 13 15 13H9C8.44772 13 8 12.5523 8 12Z",fill:"currentColor"}},{tag:"path",attr:{d:"M11 15C10.4477 15 10 15.4477 10 16C10 16.5523 10.4477 17 11 17H13C13.5523 17 14 16.5523 14 16C14 15.4477 13.5523 15 13 15H11Z",fill:"currentColor"}}]})(t)}function f3(t){return d1({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M298.028 214.267L285.793 96H328c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v48c0 13.255 10.745 24 24 24h42.207L85.972 214.267C37.465 236.82 0 277.261 0 328c0 13.255 10.745 24 24 24h136v104.007c0 1.242.289 2.467.845 3.578l24 48c2.941 5.882 11.364 5.893 14.311 0l24-48a8.008 8.008 0 0 0 .845-3.578V352h136c13.255 0 24-10.745 24-24-.001-51.183-37.983-91.42-85.973-113.733z"}}]})(t)}function x3(t){return d1({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M854.6 288.7L639.4 73.4c-6-6-14.2-9.4-22.7-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.6-9.4-22.6zM400 402c22.1 0 40 17.9 40 40s-17.9 40-40 40-40-17.9-40-40 17.9-40 40-40zm296 294H328c-6.7 0-10.4-7.7-6.3-12.9l99.8-127.2a8 8 0 0 1 12.6 0l41.1 52.4 77.8-99.2a8 8 0 0 1 12.6 0l136.5 174c4.3 5.2.5 12.9-6.1 12.9zm-94-370V137.8L790.2 326H602z"}}]})(t)}function V3(t){return d1({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM633.22 637.26c-15.18-.5-31.32.67-49.65 2.96-24.3-14.99-40.66-35.58-52.28-65.83l1.07-4.38 1.24-5.18c4.3-18.13 6.61-31.36 7.3-44.7.52-10.07-.04-19.36-1.83-27.97-3.3-18.59-16.45-29.46-33.02-30.13-15.45-.63-29.65 8-33.28 21.37-5.91 21.62-2.45 50.07 10.08 98.59-15.96 38.05-37.05 82.66-51.2 107.54-18.89 9.74-33.6 18.6-45.96 28.42-16.3 12.97-26.48 26.3-29.28 40.3-1.36 6.49.69 14.97 5.36 21.92 5.3 7.88 13.28 13 22.85 13.74 24.15 1.87 53.83-23.03 86.6-79.26 3.29-1.1 6.77-2.26 11.02-3.7l11.9-4.02c7.53-2.54 12.99-4.36 18.39-6.11 23.4-7.62 41.1-12.43 57.2-15.17 27.98 14.98 60.32 24.8 82.1 24.8 17.98 0 30.13-9.32 34.52-23.99 3.85-12.88.8-27.82-7.48-36.08-8.56-8.41-24.3-12.43-45.65-13.12zM385.23 765.68v-.36l.13-.34a54.86 54.86 0 0 1 5.6-10.76c4.28-6.58 10.17-13.5 17.47-20.87 3.92-3.95 8-7.8 12.79-12.12 1.07-.96 7.91-7.05 9.19-8.25l11.17-10.4-8.12 12.93c-12.32 19.64-23.46 33.78-33 43-3.51 3.4-6.6 5.9-9.1 7.51a16.43 16.43 0 0 1-2.61 1.42c-.41.17-.77.27-1.13.3a2.2 2.2 0 0 1-1.12-.15 2.07 2.07 0 0 1-1.27-1.91zM511.17 547.4l-2.26 4-1.4-4.38c-3.1-9.83-5.38-24.64-6.01-38-.72-15.2.49-24.32 5.29-24.32 6.74 0 9.83 10.8 10.07 27.05.22 14.28-2.03 29.14-5.7 35.65zm-5.81 58.46l1.53-4.05 2.09 3.8c11.69 21.24 26.86 38.96 43.54 51.31l3.6 2.66-4.39.9c-16.33 3.38-31.54 8.46-52.34 16.85 2.17-.88-21.62 8.86-27.64 11.17l-5.25 2.01 2.8-4.88c12.35-21.5 23.76-47.32 36.05-79.77zm157.62 76.26c-7.86 3.1-24.78.33-54.57-12.39l-7.56-3.22 8.2-.6c23.3-1.73 39.8-.45 49.42 3.07 4.1 1.5 6.83 3.39 8.04 5.55a4.64 4.64 0 0 1-1.36 6.31 6.7 6.7 0 0 1-2.17 1.28z"}}]})(t)}function m3(t){return d1({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M854.6 288.7c6 6 9.4 14.1 9.4 22.6V928c0 17.7-14.3 32-32 32H192c-17.7 0-32-14.3-32-32V96c0-17.7 14.3-32 32-32h424.7c8.5 0 16.7 3.4 22.7 9.4l215.2 215.3zM790.2 326L602 137.8V326h188.2zM512 566.1l52.81 197a12 12 0 0 0 11.6 8.9h31.77a12 12 0 0 0 11.6-8.88l74.37-276a12 12 0 0 0 .4-3.12 12 12 0 0 0-12-12h-35.57a12 12 0 0 0-11.7 9.31l-45.78 199.1-49.76-199.32A12 12 0 0 0 528.1 472h-32.2a12 12 0 0 0-11.64 9.1L434.6 680.01 388.5 481.3a12 12 0 0 0-11.68-9.29h-35.39a12 12 0 0 0-3.11.41 12 12 0 0 0-8.47 14.7l74.17 276A12 12 0 0 0 415.6 772h31.99a12 12 0 0 0 11.59-8.9l52.81-197z"}}]})(t)}function C3(t){return d1({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 48C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48zm90.5 224H272v74.5c0 8.8-7.2 16-16 16-4.4 0-8.4-1.8-11.3-4.7-2.9-2.9-4.7-6.9-4.7-11.3V272h-74.5c-4.4 0-8.4-1.8-11.3-4.7-2.9-2.9-4.7-6.9-4.7-11.3 0-8.8 7.2-16 16-16H240v-74.5c0-8.8 7.2-16 16-16s16 7.2 16 16V240h74.5c8.8 0 16 7.2 16 16s-7.2 16-16 16z"}}]})(t)}function L3(t){return d1({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M217.9 256L345 129c9.4-9.4 9.4-24.6 0-33.9-9.4-9.4-24.6-9.3-34 0L167 239c-9.1 9.1-9.3 23.7-.7 33.1L310.9 417c4.7 4.7 10.9 7 17 7s12.3-2.3 17-7c9.4-9.4 9.4-24.6 0-33.9L217.9 256z"}}]})(t)}function w3(t){return d1({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M331.3 308.7L278.6 256l52.7-52.7c6.2-6.2 6.2-16.4 0-22.6-6.2-6.2-16.4-6.2-22.6 0L256 233.4l-52.7-52.7c-6.2-6.2-15.6-7.1-22.6 0-7.1 7.1-6 16.6 0 22.6l52.7 52.7-52.7 52.7c-6.7 6.7-6.4 16.3 0 22.6 6.4 6.4 16.4 6.2 22.6 0l52.7-52.7 52.7 52.7c6.2 6.2 16.4 6.2 22.6 0 6.3-6.2 6.3-16.4 0-22.6z"}},{tag:"path",attr:{d:"M256 76c48.1 0 93.3 18.7 127.3 52.7S436 207.9 436 256s-18.7 93.3-52.7 127.3S304.1 436 256 436c-48.1 0-93.3-18.7-127.3-52.7S76 304.1 76 256s18.7-93.3 52.7-127.3S207.9 76 256 76m0-28C141.1 48 48 141.1 48 256s93.1 208 208 208 208-93.1 208-208S370.9 48 256 48z"}}]})(t)}function B3(t){return d1({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M88.3 68.1c-5.6-5.5-14.6-5.5-20.1.1-5.5 5.5-5.5 14.5 0 20l355.5 355.7c3.7 3.7 9 4.9 13.7 3.6 2.4-.6 4.6-1.9 6.4-3.7 5.5-5.5 5.5-14.5 0-20L88.3 68.1zM260.2 345.9c-53 2.4-96.6-41.2-94.1-94.1.6-12.2 3.6-23.8 8.6-34.3L121.3 164c-27.7 21.4-55.4 48.9-85.1 81.3-5.5 6.1-5.6 15.2-.1 21.3C101 338.3 158.2 400 255.8 400c29.7 0 57.1-7.4 82.3-19.2l-43.5-43.5c-10.6 5-22.2 8-34.4 8.6zM475.8 266c5.3-5.8 5.6-14.6.5-20.7C424 181.8 351.5 112 255.8 112c-29.1 0-56 6.6-82 19l43.7 43.7c10.5-5 22.1-8.1 34.3-8.6 53-2.4 96.6 41.2 94.1 94.1-.6 12.2-3.6 23.8-8.6 34.3l53.5 53.5c33-25.3 61.3-55.9 85-82z"}},{tag:"path",attr:{d:"M192.2 260.9c2.4 31.3 27.6 56.5 58.9 58.9 8.2.6 16.1-.3 23.4-2.6l-79.8-79.8c-2.2 7.4-3.1 15.3-2.5 23.5zM320 256c0-1.3-.1-2.6-.1-3.9-5.6 2.5-11.7 3.9-18.2 3.9-1.1 0-2.1 0-3.1-.1l18.6 18.7c1.8-5.9 2.8-12.2 2.8-18.6zM256 209c0-6 1.1-11.7 3.1-16.9-1 0-2-.1-3.1-.1-6.4 0-12.6 1-18.5 2.8l18.7 18.7c-.1-1.5-.2-3-.2-4.5z"}}]})(t)}function A3(t){return d1({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M255.8 112c-80.4 0-143.8 50.6-219.6 133.3-5.5 6.1-5.6 15.2-.1 21.3C101 338.3 158.2 400 255.8 400c96.4 0 168.7-77.7 220.1-134 5.3-5.8 5.6-14.6.5-20.7C424 181.8 351.5 112 255.8 112zm4.4 233.9c-53 2.4-96.6-41.2-94.1-94.1 2.1-46.2 39.5-83.6 85.7-85.7 53-2.4 96.6 41.2 94.1 94.1-2.1 46.2-39.5 83.6-85.7 85.7z"}},{tag:"path",attr:{d:"M256 209c0-6 1.1-11.7 3.1-16.9-1 0-2-.1-3.1-.1-36.9 0-66.6 31.4-63.8 68.9 2.4 31.3 27.6 56.5 58.9 58.9 37.5 2.8 68.9-26.9 68.9-63.8 0-1.3-.1-2.6-.1-3.9-5.6 2.5-11.7 3.9-18.2 3.9-25.2 0-45.7-21.1-45.7-47z"}}]})(t)}function S3(t){return d1({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M443.5 420.2L336.7 312.4c20.9-26.2 33.5-59.4 33.5-95.5 0-84.5-68.5-153-153.1-153S64 132.5 64 217s68.5 153 153.1 153c36.6 0 70.1-12.8 96.5-34.2l106.1 107.1c3.2 3.4 7.6 5.1 11.9 5.1 4.1 0 8.2-1.5 11.3-4.5 6.6-6.3 6.8-16.7.6-23.3zm-226.4-83.1c-32.1 0-62.3-12.5-85-35.2-22.7-22.7-35.2-52.9-35.2-84.9 0-32.1 12.5-62.3 35.2-84.9 22.7-22.7 52.9-35.2 85-35.2s62.3 12.5 85 35.2c22.7 22.7 35.2 52.9 35.2 84.9 0 32.1-12.5 62.3-35.2 84.9-22.7 22.7-52.9 35.2-85 35.2z"}}]})(t)}function F3(t){return d1({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M192 128l128 128-128 128z"}}]})(t)}function y3(t){return d1({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"}},{tag:"path",attr:{d:"M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm0 12H4V6h5.17l2 2H20v10zm-8-4h2v2h2v-2h2v-2h-2v-2h-2v2h-2z"}}]})(t)}var ta=t=>f.createElement("svg",p2(q1({},t),{viewBox:"64 -65 897 897"}),f.createElement("g",null,f.createElement("path",{d:`M888 760v0v0v-753v0h-752v0v753v0h752zM888 832h-752q-30 0 -51 -21t-21 -51v-753q0 -29 21 -50.5t51 -21.5h753q29 0 50.5 21.5t21.5 50.5v753q0 30 -21.5 51t-51.5 21v0zM732 347h-442q-14 0 -25 10.5t-11 25.5v0q0 15 11 25.5t25 10.5h442q14 0 25 -10.5t11 -25.5v0
q0 -15 -11 -25.5t-25 -10.5z`}))),aa=t=>f.createElement("svg",p2(q1({},t),{viewBox:"64 -65 897 897"}),f.createElement("g",null,f.createElement("path",{d:`M888 760v0v0v-753v0h-752v0v753v0h752zM888 832h-752q-30 0 -51 -21t-21 -51v-753q0 -29 21 -50.5t51 -21.5h753q29 0 50.5 21.5t21.5 50.5v753q0 30 -21.5 51t-51.5 21v0zM732 420h-184v183q0 15 -10.5 25.5t-25.5 10.5v0q-14 0 -25 -10.5t-11 -25.5v-183h-184
q-15 0 -25.5 -11t-10.5 -25v0q0 -15 10.5 -25.5t25.5 -10.5h184v-183q0 -15 11 -25.5t25 -10.5v0q15 0 25.5 10.5t10.5 25.5v183h184q15 0 25.5 10.5t10.5 25.5v0q0 14 -10.5 25t-25.5 11z`})));var ca=t=>f.createElement("svg",p2(q1({},t),{viewBox:"64 -65 897 897"}),f.createElement("g",null,f.createElement("path",{d:`M717.5 589.5q-10.5 10.5 -25.5 10.5t-26 -10l-154 -155l-154 155q-11 10 -26 10t-25.5 -10.5t-10.5 -25.5t11 -25l154 -155l-154 -155q-11 -10 -11 -25t10.5 -25.5t25.5 -10.5t26 10l154 155l154 -155q11 -10 26 -10t25.5 10.5t10.5 25t-11 25.5l-154 155l154 155
q11 10 11 25t-10.5 25.5zM888 760v0v0v-753v0h-752v0v753v0h752zM888 832h-752q-30 0 -51 -21t-21 -51v-753q0 -29 21 -50.5t51 -21.5h753q29 0 50.5 21.5t21.5 50.5v753q0 30 -21.5 51t-51.5 21v0z`}))),b8='<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill="currentColor" stroke="currentColor" viewBox="0 0 50 50"><path d="M 24 0 L 24 1 L 24 4.0234375 C 13.208549 4.5309414 4.5329027 13.208443 4.0253906 24 L 1 24 L 0 24 L 0 26 L 1 26 L 4.0253906 26 C 4.5329027 36.791557 13.208549 45.469059 24 45.976562 L 24 49 L 24 50 L 26 50 L 26 49 L 26 45.974609 C 36.79155 45.467098 45.467098 36.79155 45.974609 26 L 49 26 L 50 26 L 50 24 L 49 24 L 45.974609 24 C 45.467098 13.20845 36.79155 4.5329024 26 4.0253906 L 26 1 L 26 0 L 24 0 z M 24 6.0488281 L 24 9 L 24 10 L 26 10 L 26 9 L 26 6.0507812 C 35.703044 6.5553041 43.444696 14.296956 43.949219 24 L 41 24 L 40 24 L 40 26 L 41 26 L 43.949219 26 C 43.444696 35.703044 35.703044 43.444696 26 43.949219 L 26 41 L 26 40 L 24 40 L 24 41 L 24 43.951172 C 14.298476 43.446281 6.5553046 35.703053 6.0507812 26 L 9 26 L 10 26 L 10 24 L 9 24 L 6.0507812 24 C 6.5553046 14.296947 14.298476 6.5537194 24 6.0488281 z M 19.990234 18.990234 A 1.0001 1.0001 0 0 0 19.292969 20.707031 L 23.585938 25 L 19.292969 29.292969 A 1.0001 1.0001 0 1 0 20.707031 30.707031 L 25 26.414062 L 29.292969 30.707031 A 1.0001 1.0001 0 1 0 30.707031 29.292969 L 26.414062 25 L 30.707031 20.707031 A 1.0001 1.0001 0 0 0 29.980469 18.990234 A 1.0001 1.0001 0 0 0 29.292969 19.292969 L 25 23.585938 L 20.707031 19.292969 A 1.0001 1.0001 0 0 0 19.990234 18.990234 z"/></svg>',I8='<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',T8='<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 50 50" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M 21 3 C 11.621094 3 4 10.621094 4 20 C 4 29.378906 11.621094 37 21 37 C 24.710938 37 28.140625 35.804688 30.9375 33.78125 L 44.09375 46.90625 L 46.90625 44.09375 L 33.90625 31.0625 C 36.460938 28.085938 38 24.222656 38 20 C 38 10.621094 30.378906 3 21 3 Z M 21 5 C 29.296875 5 36 11.703125 36 20 C 36 28.296875 29.296875 35 21 35 C 12.703125 35 6 28.296875 6 20 C 6 11.703125 12.703125 5 21 5 Z M 13 12 L 13 18 L 15.28125 15.71875 L 19.5625 20 L 15.28125 24.28125 L 13 22 L 13 28 L 19 28 L 16.71875 25.71875 L 21 21.4375 L 25.28125 25.71875 L 23 28 L 29 28 L 29 22 L 26.71875 24.28125 L 22.4375 20 L 26.71875 15.71875 L 29 18 L 29 12 L 23 12 L 25.28125 14.28125 L 21 18.5625 L 16.71875 14.28125 L 19 12 Z"/></svg>',_8='<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line><line x1="11" y1="8" x2="11" y2="14"></line><line x1="8" y1="11" x2="14" y2="11"></line></svg>',P8='<circle cx="50" cy="50" r="50" fill="transparent" />',k8=(t,a,c)=>{let r=t.settings.folderIcon,e=ta,h=ca,l=aa;return r==="box-folder"?(e=L8,h=B8,l=w8):r==="icomoon"?(e=F8,h=A8,l=S8):r==="typicon"?(e=y8,h=p3,l=p3):r==="circle-gg"&&(e=R8,h=Z8,l=O8),a?c?e:l:h};var y2=U1(require("obsidian"));var d2=U1(require("obsidian"));var ra=function(){function t(a,c){for(var r=0;r<c.length;r++){var e=c[r];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(a,e.key,e)}}return function(a,c,r){return c&&t(a.prototype,c),r&&t(a,r),a}}(),ea=ha(["",""],["",""]);function ha(t,a){return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(a)}}))}function la(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}var va=function(){function t(){for(var a=this,c=arguments.length,r=Array(c),e=0;e<c;e++)r[e]=arguments[e];return la(this,t),this.tag=function(h){for(var l=arguments.length,v=Array(l>1?l-1:0),i=1;i<l;i++)v[i-1]=arguments[i];return typeof h=="function"?a.interimTag.bind(a,h):typeof h=="string"?a.transformEndResult(h):(h=h.map(a.transformString.bind(a)),a.transformEndResult(h.reduce(a.processSubstitutions.bind(a,v))))},r.length>0&&Array.isArray(r[0])&&(r=r[0]),this.transformers=r.map(function(h){return typeof h=="function"?h():h}),this.tag}return ra(t,[{key:"interimTag",value:function(c,r){for(var e=arguments.length,h=Array(e>2?e-2:0),l=2;l<e;l++)h[l-2]=arguments[l];return this.tag(ea,c.apply(void 0,[r].concat(h)))}},{key:"processSubstitutions",value:function(c,r,e){var h=this.transformSubstitution(c.shift(),r);return"".concat(r,h,e)}},{key:"transformString",value:function(c){var r=function(h,l){return l.onString?l.onString(h):h};return this.transformers.reduce(r,c)}},{key:"transformSubstitution",value:function(c,r){var e=function(l,v){return v.onSubstitution?v.onSubstitution(l,r):l};return this.transformers.reduce(e,c)}},{key:"transformEndResult",value:function(c){var r=function(h,l){return l.onEndResult?l.onEndResult(h):h};return this.transformers.reduce(r,c)}}]),t}(),H1=va;var na=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return{onEndResult:function(r){if(a==="")return r.trim();if(a=a.toLowerCase(),a==="start"||a==="left")return r.replace(/^\s*/,"");if(a==="end"||a==="right")return r.replace(/\s*$/,"");throw new Error("Side not supported: "+a)}}},f1=na;function ia(t){if(Array.isArray(t)){for(var a=0,c=Array(t.length);a<t.length;a++)c[a]=t[a];return c}else return Array.from(t)}var oa=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";return{onEndResult:function(r){if(a==="initial"){var e=r.match(/^[^\S\n]*(?=\S)/gm),h=e&&Math.min.apply(Math,ia(e.map(function(v){return v.length})));if(h){var l=new RegExp("^.{"+h+"}","gm");return r.replace(l,"")}return r}if(a==="all")return r.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+a)}}},P1=oa;var ga=function(a,c){return{onEndResult:function(e){if(a==null||c==null)throw new Error("replaceResultTransformer requires at least 2 arguments.");return e.replace(a,c)}}},G1=ga;var da=function(a,c){return{onSubstitution:function(e,h){if(a==null||c==null)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return e==null?e:e.toString().replace(a,c)}}},g2=da;var sa={separator:"",conjunction:"",serial:!1},ua=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sa;return{onSubstitution:function(r,e){if(Array.isArray(r)){var h=r.length,l=a.separator,v=a.conjunction,i=a.serial,o=e.match(/(\n?[^\S\n]+)$/);if(o?r=r.join(l+o[1]):r=r.join(l+" "),v&&h>1){var n=r.lastIndexOf(l);r=r.slice(0,n)+(i?l:"")+" "+v+r.slice(n+1)}}return r}}},F1=ua;var pa=function(a){return{onSubstitution:function(r,e){if(a!=null&&typeof a=="string")typeof r=="string"&&r.includes(a)&&(r=r.split(a));else throw new Error("You need to specify a string character to split by.");return r}}},G2=pa;var D8=function(a){return a!=null&&!Number.isNaN(a)&&typeof a!="boolean"},Ma=function(){return{onSubstitution:function(c){return Array.isArray(c)?c.filter(D8):D8(c)?c:""}}},r0=Ma;var Vi=new H1(F1({separator:","}),P1,f1);var Fi=new H1(F1({separator:",",conjunction:"and"}),P1,f1);var _i=new H1(F1({separator:",",conjunction:"or"}),P1,f1);var $i=new H1(G2(`
`),r0,F1,P1,f1);var vo=new H1(G2(`
`),F1,P1,f1,g2(/&/g,"&amp;"),g2(/</g,"&lt;"),g2(/>/g,"&gt;"),g2(/"/g,"&quot;"),g2(/'/g,"&#x27;"),g2(/`/g,"&#x60;"));var uo=new H1(G1(/(?:\n(?:\s*))+/g," "),f1);var mo=new H1(G1(/(?:\n\s*)/g,""),f1);var yo=new H1(F1({separator:","}),G1(/(?:\s+)/g," "),f1);var Po=new H1(F1({separator:",",conjunction:"or"}),G1(/(?:\s+)/g," "),f1);var qo=new H1(F1({separator:",",conjunction:"and"}),G1(/(?:\s+)/g," "),f1);var tg=new H1(F1,P1,f1);var ng=new H1(F1,G1(/(?:\s+)/g," "),f1);var ug=new H1(P1,f1);var ya=new H1(P1("all"),f1),e0=ya;var N8=U1(E8());var F2=(t,a,c)=>{var r=[],e=c?!0:a.settings.showFilesFromSubFolders;h(t,a.app);function h(l,v){var i=v.vault.getAbstractFileByPath(l);if(i instanceof d2.TFolder&&i.children)for(let o of i.children)o instanceof d2.TFile&&r.push(o),o instanceof d2.TFolder&&e&&h(o.path,v)}return r},R3=t=>{let a={folder:t,children:[]};function c(r,e){if(!!(r&&r.children)){for(let h of r.children)if(h instanceof d2.TFolder){let l=h,v={folder:l,children:[]};e.children.push(v),l.children&&c(l,v)}}}return c(t,a),a},b3=t=>{let a={},c;return t.settings.folderCountOption==="notes"?c=t.app.vault.getMarkdownFiles():c=t.app.vault.getFiles(),t.settings.folderNote&&(c=c.filter(r=>r.extension!=="md"||r.extension==="md"&&r.basename!==r.parent.name)),c.forEach(r=>{for(let e=r.parent;e!=null;e=e.parent)a[e.path]||(a[e.path]={open:0,closed:0}),e==r.parent&&(a[e.path].open=1+a[e.path].open),a[e.path].closed=1+a[e.path].closed}),a},U8=t=>{let a=t.children;for(let c of a)if(c instanceof d2.TFolder)return!0;return!1},h0=t=>{var a=t.lastIndexOf(".");return{fileName:t.substring(0,a),extension:t.substring(a+1)}};var l0=(t,a)=>{if(t==="/")return a.vault.getName();let c=t.lastIndexOf("/");return c!==-1?t.substring(c+1):t},v0=(t,a)=>{var c;return(c=a.internalPlugins.plugins[t])==null?void 0:c._loaded},V4=t=>{let{file:a,app:c,newLeaf:r,leafBySplit:e}=t,h=c.workspace.getLeaf(r);e&&(h=c.workspace.createLeafBySplit(h,"vertical")),c.workspace.setActiveLeaf(h,!1),h.openFile(a,{eState:{focus:!0}})};var I3=(t,a)=>{V4({file:a,app:t,newLeaf:!0})},W8=(t,a)=>{V4({file:a,app:t,newLeaf:!1,leafBySplit:!0})},G8=t=>{let{plugin:a,fileName:c}=t;return e0`
${a.settings.createdYaml?`
---
created: ${(0,N8.default)(new Date).format("YYYY-MM-DD hh:mm:ss")}
---
`:""}
${a.settings.fileNameIsHeader?`# ${c}`:""}
`},q8=(t,a)=>t.plugins.getPlugin(a),n0=(t,a,c,r)=>L1(void 0,null,function*(){let e=yield t.app.fileManager.createNewMarkdownFile(a,c);r&&r!==""&&(yield t.app.vault.modify(e,r)),V4({file:e,app:t.app,newLeaf:!1});let h=new CustomEvent(y1.activeFileChange,{detail:{filePath:e.path}});window.dispatchEvent(h)});var q2=(t,a,c)=>L1(void 0,null,function*(){let r=c.app.vault.getAbstractFileByPath(a);if(!r)return;new l2(c,r,"create note").open()});var m4=class extends y2.Modal{constructor(a,c,r){super(a.app);this.confirmationNote=c,this.callBackAfterConfirmation=r,this.plugin=a}onOpen(){let{contentEl:a}=this,c=this;a.createEl("div",{text:this.confirmationNote}).addClass("modal-title"),this.confirmButton=a.createEl("button",{text:"Confirm"});let e=a.createEl("button",{text:"Cancel"});e.style.cssText="float: right;",e.addEventListener("click",()=>{c.close()}),this.onConfirmClickAction=h=>{this.callBackAfterConfirmation(),this.close()},this.confirmButton.addEventListener("click",this.onConfirmClickAction)}onClose(){let{contentEl:a}=this;a.empty(),this.confirmButton.removeEventListener("click",this.onConfirmClickAction)}},l2=class extends y2.Modal{constructor(a,c,r){super(a.app);this.file=c,this.action=r,this.plugin=a}onOpen(){let{contentEl:a}=this,c=this,r;this.action==="rename"?r="Rename: Provide a New Name":this.action==="create folder"?r="Create Folder: Provide Name":this.action==="create note"&&(r="Create Note: Provide Name"),a.createEl("div",{text:r}).addClass("modal-title");let h=a.createEl("input");h.style.cssText="width: 100%; height: 2.5em; margin-bottom: 15px;",this.action==="rename"&&(this.file.name.endsWith(".md")?h.value=this.file.name.substring(0,this.file.name.lastIndexOf(".")):h.value=this.file.name),h.focus();let l;this.action==="rename"?l="Change Name":this.action==="create folder"?l="Create Folder":this.action==="create note"&&(l="Create Note");let v=a.createEl("button",{text:l}),i=a.createEl("button",{text:"Cancel"});i.style.cssText="float: right;",i.addEventListener("click",()=>{c.close()});let o=()=>L1(this,null,function*(){let n=h.value;this.action==="rename"?(this.file.name.endsWith(".md")&&(n=n+".md"),this.app.fileManager.renameFile(this.file,this.file.parent.path+"/"+n)):this.action==="create folder"?this.app.vault.createFolder(this.file.path+"/"+n):this.action==="create note"&&(yield n0(this.plugin,this.file,n,this.plugin.settings.createdYaml?G8({plugin:this.plugin,fileName:n}):"")),c.close()});v.addEventListener("click",o),h.addEventListener("keydown",n=>{n.key==="Enter"&&o()})}onClose(){let{contentEl:a}=this;a.empty()}},C4=class extends y2.FuzzySuggestModal{constructor(a,c){super(a);this.fileOrFolderToMove=c}getItemText(a){return a.path}getItems(){return Oa(this.app)}onChooseItem(a,c){this.app.vault.rename(this.fileOrFolderToMove,a.path+"/"+this.fileOrFolderToMove.name)}};function Oa(t){let a=[],c=t.vault.getRoot();a.push(c);function r(e){for(let h of e.children)if(h instanceof y2.TFolder){let l=h;a.push(l),l.children&&r(l)}}return r(c),a}function Za(t){return!!t&&typeof t.then=="function"}var O1=Za;function Ra(t,a){if(t!=null)return t;throw new Error(a??"Got unexpected null or undefined")}var x1=Ra,T3=class{},ba=new T3,_3={valueMaybe(){},valueOrThrow(){throw new Error(`Loadable expected value, but in "${this.state}" state`)},errorMaybe(){},errorOrThrow(){throw new Error(`Loadable expected error, but in "${this.state}" state`)},promiseMaybe(){},promiseOrThrow(){throw new Error(`Loadable expected promise, but in "${this.state}" state`)},is(t){return t.state===this.state&&t.contents===this.contents},map(t){if(this.state==="hasError")return this;if(this.state==="hasValue")try{let c=t(this.contents);return O1(c)?$2(c.then(r=>({__value:r}))):P3(c)}catch(c){return O1(c)?$2(c.next(()=>t(this.contents))):k3(c)}if(this.state==="loading")return $2(this.contents.then(c=>({__value:t(c.__value)})).catch(c=>{if(O1(c))return c.then(()=>t(this.contents));throw c}));throw new Error("Invalid Loadable state")}};function P3(t){return Object.freeze({state:"hasValue",contents:t,..._3,getValue(){return this.contents},toPromise(){return Promise.resolve(this.contents)},valueMaybe(){return this.contents},valueOrThrow(){return this.contents}})}function k3(t){return Object.freeze({state:"hasError",contents:t,..._3,getValue(){throw this.contents},toPromise(){return Promise.reject(this.contents)},errorMaybe(){return this.contents},errorOrThrow(){return this.contents}})}function $2(t){return Object.freeze({state:"loading",contents:t,..._3,getValue(){throw this.contents.then(({__value:a})=>a)},toPromise(){return this.contents.then(({__value:a})=>a)},promiseMaybe(){return this.contents.then(({__value:a})=>a)},promiseOrThrow(){return this.contents.then(({__value:a})=>a)}})}function Ia(){return $2(new Promise(()=>{}))}function Ta(t){return t.every(a=>a.state==="hasValue")?P3(t.map(a=>a.contents)):t.some(a=>a.state==="hasError")?k3(x1(t.find(a=>a.state==="hasError"),"Invalid loadable passed to loadableAll").contents):$2(Promise.all(t.map(a=>a.contents)).then(a=>({__value:a})))}var L4={loadableWithValue:P3,loadableWithError:k3,loadableWithPromise:$2,loadableLoading:Ia,loadableAll:Ta,Canceled:T3,CANCELED:ba},D3,$8=(D3=f.useMutableSource)!==null&&D3!==void 0?D3:f.unstable_useMutableSource;function _a(){return $8&&!(typeof window!="undefined"&&window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE)}var j8={mutableSourceExists:_a,useMutableSource:$8},{mutableSourceExists:Pa}=j8,E3=new Map().set("recoil_hamt_2020",!0).set("recoil_memory_managament_2020",!0).set("recoil_suppress_rerender_in_callback",!0);function N3(t){var a;return t==="recoil_early_rendering_2021"&&!Pa()?!1:(a=E3.get(t))!==null&&a!==void 0?a:!1}N3.setPass=t=>{E3.set(t,!0)};N3.setFail=t=>{E3.set(t,!1)};var V1=N3;function ka(t,a,{error:c}={}){return null}var Da=ka,v2=Da;function Ea(t,a){let c=new Set(t);return c.add(a),c}function Na(t,a){let c=new Set(t);return c.delete(a),c}function Ua(t,a,c){let r=new Map(t);return r.set(a,c),r}function Wa(t,a,c){let r=new Map(t);return r.set(a,c(r.get(a))),r}function Ga(t,a){let c=new Map(t);return c.delete(a),c}function qa(t,a){let c=new Map(t);return a.forEach(r=>c.delete(r)),c}var K8={setByAddingToSet:Ea,setByDeletingFromSet:Na,mapBySettingInMap:Ua,mapByUpdatingInMap:Wa,mapByDeletingFromMap:Ga,mapByDeletingMultipleFromMap:qa};function*$a(t,a){let c=0;for(let r of t)a(r,c++)&&(yield r)}var Y8=$a;function ja(t,a){return function*(){let c=0;for(let r of t)yield a(r,c++)}()}var Q8=ja;function Ka(t,...a){}var Ya=Ka,U3=Ya;function s1(t,a,c){return a in t?Object.defineProperty(t,a,{value:c,enumerable:!0,configurable:!0,writable:!0}):t[a]=c,t}var i0=class{constructor(a){s1(this,"key",void 0),this.key=a}},W3=class extends i0{},G3=class extends i0{};function Qa(t){return t instanceof W3||t instanceof G3}var o0={AbstractRecoilValue:i0,RecoilState:W3,RecoilValueReadOnly:G3,isRecoilValue:Qa},Ja=o0.AbstractRecoilValue,Xa=o0.RecoilState,tc=o0.RecoilValueReadOnly,ac=o0.isRecoilValue,O2=Object.freeze({__proto__:null,AbstractRecoilValue:Ja,RecoilState:Xa,RecoilValueReadOnly:tc,isRecoilValue:ac}),q3=class{},cc=new q3,J8=class extends Error{constructor(a){super(`Tried to set the value of Recoil selector ${a} using an updater function, but it is an async selector in a pending or error state; this is not supported.`)}},Z2=new Map,$3=new Map;function rc(t){return Q8(t,a=>x1($3.get(a)))}function ec(t){if(Z2.has(t.key)){let c=`Duplicate atom key "${t.key}". This is a FATAL ERROR in
production. But it is safe to ignore this warning if it occurred because of
hot module replacement.`;console.warn(c)}Z2.set(t.key,t);let a=t.set==null?new O2.RecoilValueReadOnly(t.key):new O2.RecoilState(t.key);return $3.set(t.key,a),a}var j3=class extends Error{};function hc(t){let a=Z2.get(t);if(a==null)throw new j3(`Missing definition for RecoilValue: "${t}""`);return a}function lc(t){return Z2.get(t)}var g0=new Map;function vc(t){var a;if(!V1("recoil_memory_managament_2020"))return;let c=Z2.get(t);if(c==null||(a=c.shouldDeleteConfigOnRelease)===null||a===void 0?void 0:a.call(c)){var r;Z2.delete(t),(r=X8(t))===null||r===void 0||r(),g0.delete(t)}}function nc(t,a){!V1("recoil_memory_managament_2020")||(a===void 0?g0.delete(t):g0.set(t,a))}function X8(t){return g0.get(t)}var J1={nodes:Z2,recoilValues:$3,registerNode:ec,getNode:hc,getNodeMaybe:lc,deleteNodeConfigIfPossible:vc,setConfigDeletionHandler:nc,getConfigDeletionHandler:X8,recoilValuesForKeys:rc,NodeMissingError:j3,DefaultValue:q3,DEFAULT_VALUE:cc,RecoilValueNotReady:J8},K3=class{};function ic(){return new K3}var d0={RetentionZone:K3,retentionZone:ic},{setByAddingToSet:oc}=K8,{getNode:z0,getNodeMaybe:gc,recoilValuesForKeys:t7}=J1,{RetentionZone:a7}=d0,dc=Object.freeze(new Set),c7=class extends Error{};function zc(t,a,c){if(!V1("recoil_memory_managament_2020"))return()=>{};let{nodesRetainedByZone:r}=t.getState().retention;function e(h){let l=r.get(h);l||r.set(h,l=new Set),l.add(a)}if(c instanceof a7)e(c);else if(Array.isArray(c))for(let h of c)e(h);return()=>{if(!V1("recoil_memory_managament_2020"))return;let h=t.getState().retention.nodesRetainedByZone;function l(v){let i=h.get(v);i&&i.delete(a),i&&i.size===0&&h.delete(v)}if(c instanceof a7)l(c);else if(Array.isArray(c))for(let v of c)l(v)}}function Y3(t,a,c,r){let e=t.getState();if(e.nodeCleanupFunctions.has(c))return;let h=z0(c),l=zc(t,c,h.retainedBy),v=h.init(t,a,r);e.nodeCleanupFunctions.set(c,()=>{v(),l()})}function sc(t,a){var c;let r=t.getState();(c=r.nodeCleanupFunctions.get(a))===null||c===void 0||c(),r.nodeCleanupFunctions.delete(a)}function uc(t,a,c){return Y3(t,a,c,"get"),z0(c).get(t,a)}function r7(t,a,c){return z0(c).peek(t,a)}function pc(t,a,c){var r;let e=gc(a);return e==null||(r=e.invalidate)===null||r===void 0||r.call(e,t),{...t,atomValues:t.atomValues.clone().delete(a),nonvalidatedAtoms:t.nonvalidatedAtoms.clone().set(a,c),dirtyAtoms:oc(t.dirtyAtoms,a)}}function Mc(t,a,c,r){let e=z0(c);if(e.set==null)throw new c7(`Attempt to set read-only RecoilValue: ${c}`);let h=e.set;return Y3(t,a,c,"set"),h(t,a,r)}function Hc(t,a,c){var r,e,h;let l=t.getState(),v=t.getGraph(a.version),i=l.knownAtoms.has(c)?"atom":l.knownSelectors.has(c)?"selector":void 0,o=Y8(e7(t,a,new Set([c])),n=>n!==c);return{loadable:r7(t,a,c),isActive:l.knownAtoms.has(c)||l.knownSelectors.has(c),isSet:i==="selector"?!1:a.atomValues.has(c),isModified:a.dirtyAtoms.has(c),type:i,deps:t7((r=v.nodeDeps.get(c))!==null&&r!==void 0?r:[]),subscribers:{nodes:t7(o),components:Q8((e=(h=l.nodeToComponentSubscriptions.get(c))===null||h===void 0?void 0:h.values())!==null&&e!==void 0?e:[],([n])=>({name:n}))}}}function e7(t,a,c){let r=new Set,e=Array.from(c),h=t.getGraph(a.version);for(let v=e.pop();v;v=e.pop()){var l;r.add(v);let i=(l=h.nodeToNodeSubscriptions.get(v))!==null&&l!==void 0?l:dc;for(let o of i)r.has(o)||e.push(o)}return r}var j2={getNodeLoadable:uc,peekNodeLoadable:r7,setNodeValue:Mc,cleanUpNode:sc,setUnvalidatedAtomValue_DEPRECATED:pc,peekNodeInfo:Hc,getDownstreamNodes:e7,initializeNodeIfNewToStore:Y3},{CANCELED:fc}=L4,{getDownstreamNodes:xc,getNodeLoadable:h7,setNodeValue:Vc}=j2,{getNodeMaybe:l7}=J1,{DefaultValue:Q3,RecoilValueNotReady:mc}=J1,{AbstractRecoilValue:Cc,RecoilState:Lc,RecoilValueReadOnly:wc,isRecoilValue:Bc}=O2;function Ac(t,{key:a},c=t.getState().currentTree){var r,e;let h=t.getState();c.version===h.currentTree.version||c.version===((r=h.nextTree)===null||r===void 0?void 0:r.version)||c.version===((e=h.previousTree)===null||e===void 0?void 0:e.version)||v2("Tried to read from a discarded tree");let l=h7(t,c,a);return l.state==="loading"&&l.contents.catch(()=>fc),l}function Sc(t,a){let c=t.clone();return a.forEach((r,e)=>{r.state==="hasValue"&&r.contents instanceof Q3?c.delete(e):c.set(e,r)}),c}function Fc(t,a,{key:c},r){if(typeof r=="function"){let e=h7(t,a,c);if(e.state==="loading")throw new mc(c);if(e.state==="hasError")throw e.contents;return r(e.contents)}else return r}function yc(t,a,c){if(c.type==="set"){let{recoilValue:e,valueOrUpdater:h}=c,l=Fc(t,a,e,h),v=Vc(t,a,e.key,l);for(let[i,o]of v.entries())J3(a,i,o)}else if(c.type==="setLoadable"){let{recoilValue:{key:e},loadable:h}=c;J3(a,e,h)}else if(c.type==="markModified"){let{recoilValue:{key:e}}=c;a.dirtyAtoms.add(e)}else if(c.type==="setUnvalidated"){var r;let{recoilValue:{key:e},unvalidatedValue:h}=c,l=l7(e);l==null||(r=l.invalidate)===null||r===void 0||r.call(l,a),a.atomValues.delete(e),a.nonvalidatedAtoms.set(e,h),a.dirtyAtoms.add(e)}else v2(`Unknown action ${c.type}`)}function J3(t,a,c){c.state==="hasValue"&&c.contents instanceof Q3?t.atomValues.delete(a):t.atomValues.set(a,c),t.dirtyAtoms.add(a),t.nonvalidatedAtoms.delete(a)}function v7(t,a){t.replaceState(c=>{let r=n7(c);for(let e of a)yc(t,r,e);return X3(t,r),r})}function s0(t,a){if(w4.length){let c=w4[w4.length-1],r=c.get(t);r||c.set(t,r=[]),r.push(a)}else v7(t,[a])}var w4=[];function Oc(){let t=new Map;return w4.push(t),()=>{for(let[c,r]of t)v7(c,r);w4.pop()!==t&&v2("Incorrect order of batch popping")}}function n7(t){return{...t,atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(t.dirtyAtoms)}}function X3(t,a){let c=xc(t,a,a.dirtyAtoms);for(let h of c){var r,e;(r=l7(h))===null||r===void 0||(e=r.invalidate)===null||e===void 0||e.call(r,a)}}function i7(t,a,c){s0(t,{type:"set",recoilValue:a,valueOrUpdater:c})}function Zc(t,a,c){if(c instanceof Q3)return i7(t,a,c);s0(t,{type:"setLoadable",recoilValue:a,loadable:c})}function Rc(t,a){s0(t,{type:"markModified",recoilValue:a})}function bc(t,a,c){s0(t,{type:"setUnvalidated",recoilValue:a,unvalidatedValue:c})}var Ic=0;function Tc(t,{key:a},c,r=null){let e=Ic++,h=t.getState();if(h.nodeToComponentSubscriptions.has(a)||h.nodeToComponentSubscriptions.set(a,new Map),x1(h.nodeToComponentSubscriptions.get(a)).set(e,[r??"<not captured>",c]),V1("recoil_early_rendering_2021")){let l=t.getState().nextTree;l&&l.dirtyAtoms.has(a)&&c(l)}return{release:()=>{let l=t.getState(),v=l.nodeToComponentSubscriptions.get(a);if(v===void 0||!v.has(e)){v2(`Subscription missing at release time for atom ${a}. This is a bug in Recoil.`);return}v.delete(e),v.size===0&&l.nodeToComponentSubscriptions.delete(a)}}}var R2={RecoilValueReadOnly:wc,AbstractRecoilValue:Cc,RecoilState:Lc,getRecoilValueAsLoadable:Ac,setRecoilValue:i7,setRecoilValueLoadable:Zc,markRecoilValueModified:Rc,setUnvalidatedRecoilValue:bc,subscribeToRecoilValue:Tc,isRecoilValue:Bc,applyAtomValueWrites:Sc,batchStart:Oc,writeLoadableToTreeState:J3,invalidateDownstreams:X3,copyTreeState:n7,invalidateDownstreams_FOR_TESTING:X3},{unstable_batchedUpdates:_c}=f,Pc={unstable_batchedUpdates:_c},{unstable_batchedUpdates:kc}=Pc,Dc={unstable_batchedUpdates:kc},{batchStart:Ec}=R2,{unstable_batchedUpdates:Nc}=Dc,t5=Nc,Uc=t=>{t5=t},Wc=()=>t5,Gc=t=>{t5(()=>{let a=()=>{};try{a=Ec(),t()}finally{a()}})},a5={getBatcher:Wc,setBatcher:Uc,batchUpdates:Gc};function qc(t,a){a()}var $c={enqueueExecution:qc};function jc(t,...a){let c=new Set;t:for(let r of t){for(let e of a)if(e.has(r))continue t;c.add(r)}return c}var u0=jc;function Kc(t,a){let c=new Map;return t.forEach((r,e)=>{c.set(e,a(r,e))}),c}var p0=Kc;function Yc(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function Qc(t){return{nodeDeps:p0(t.nodeDeps,a=>new Set(a)),nodeToNodeSubscriptions:p0(t.nodeToNodeSubscriptions,a=>new Set(a))}}function c5(t,a,c){let{nodeDeps:r,nodeToNodeSubscriptions:e}=a;t.forEach((h,l)=>{let v=r.get(l);if(v&&c&&v!==c.nodeDeps.get(l))return;r.set(l,new Set(h)),(v==null?h:u0(h,v)).forEach(o=>{e.has(o)||e.set(o,new Set),x1(e.get(o)).add(l)}),v&&u0(v,h).forEach(n=>{if(!e.has(n))return;let u=x1(e.get(n));u.delete(l),u.size===0&&e.delete(n)})})}function Jc(t,a,c){var r,e,h,l;let v=a.getState();c===v.currentTree.version||c===((r=v.nextTree)===null||r===void 0?void 0:r.version)||c===((e=v.previousTree)===null||e===void 0?void 0:e.version)||v2("Tried to save dependencies to a discarded tree");let i=a.getGraph(c);if(c5(t,i),c===((h=v.previousTree)===null||h===void 0?void 0:h.version)){let n=a.getGraph(v.currentTree.version);c5(t,n,i)}if(c===((l=v.previousTree)===null||l===void 0?void 0:l.version)||c===v.currentTree.version){var o;let n=(o=v.nextTree)===null||o===void 0?void 0:o.version;if(n!==void 0){let u=a.getGraph(n);c5(t,u,i)}}}function Xc(t,a){t.forEach((c,r)=>{a.has(r)||a.set(r,new Set);let e=x1(a.get(r));c.forEach(h=>e.add(h))})}function tr(t,a,c){c.has(t)||c.set(t,new Set),x1(c.get(t)).add(a)}var B4={addToDependencyMap:tr,cloneGraph:Qc,graph:Yc,mergeDepsIntoDependencyMap:Xc,saveDependencyMapToStore:Jc};function ar(t,a){return a={exports:{}},t(a,a.exports),a.exports}var cr=ar(function(t){var a=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},c={},r=5,e=Math.pow(2,r),h=e-1,l=e/2,v=e/4,i={},o=function(g){return function(){return g}},n=c.hash=function(s){var g=typeof s=="undefined"?"undefined":a(s);if(g==="number")return s;g!=="string"&&(s+="");for(var y=0,k=0,D=s.length;k<D;++k){var G=s.charCodeAt(k);y=(y<<5)-y+G|0}return y},u=function(g){return g-=g>>1&1431655765,g=(g&858993459)+(g>>2&858993459),g=g+(g>>4)&252645135,g+=g>>8,g+=g>>16,g&127},H=function(g,y){return y>>>g&h},C=function(g){return 1<<g},p=function(g,y){return u(g&y-1)},R=function(g,y,k,D){var G=D;if(!g){var X=D.length;G=new Array(X);for(var Q=0;Q<X;++Q)G[Q]=D[Q]}return G[y]=k,G},w=function(g,y,k){var D=k.length-1,G=0,X=0,Q=k;if(g)G=X=y;else for(Q=new Array(D);G<y;)Q[X++]=k[G++];for(++G;G<=D;)Q[X++]=k[G++];return g&&(Q.length=D),Q},T=function(g,y,k,D){var G=D.length;if(g){for(var X=G;X>=y;)D[X--]=D[X];return D[y]=k,D}for(var Q=0,J=0,i1=new Array(G+1);Q<y;)i1[J++]=D[Q++];for(i1[y]=k;Q<G;)i1[++J]=D[Q++];return i1},O=1,S=2,d=3,B=4,I={__hamt_isEmpty:!0},L=function(g){return g===I||g&&g.__hamt_isEmpty},b=function(g,y,k,D){return{type:O,edit:g,hash:y,key:k,value:D,_modify:t1}},U=function(g,y,k){return{type:S,edit:g,hash:y,children:k,_modify:o1}},Y=function(g,y,k){return{type:d,edit:g,mask:y,children:k,_modify:a1}},P=function(g,y,k){return{type:B,edit:g,size:y,children:k,_modify:u1}},_=function(g){return g===I||g.type===O||g.type===S},A=function(g,y,k,D,G){for(var X=[],Q=D,J=0,i1=0;Q;++i1)Q&1&&(X[i1]=G[J++]),Q>>>=1;return X[y]=k,P(g,J+1,X)},E=function(g,y,k,D){for(var G=new Array(y-1),X=0,Q=0,J=0,i1=D.length;J<i1;++J)if(J!==k){var B1=D[J];B1&&!L(B1)&&(G[X++]=B1,Q|=1<<J)}return Y(g,Q,G)},F=function s(g,y,k,D,G,X){if(k===G)return U(g,k,[X,D]);var Q=H(y,k),J=H(y,G);return Y(g,C(Q)|C(J),Q===J?[s(g,y+r,k,D,G,X)]:Q<J?[D,X]:[X,D])},q=function(g,y,k,D,G,X,Q,J){for(var i1=G.length,B1=0;B1<i1;++B1){var W1=G[B1];if(k(Q,W1.key)){var T1=W1.value,K1=X(T1);return K1===T1?G:K1===i?(--J.value,w(g,B1,G)):R(g,B1,b(y,D,Q,K1),G)}}var X1=X();return X1===i?G:(++J.value,R(g,i1,b(y,D,Q,X1),G))},W=function(g,y){return g===y.edit},t1=function(g,y,k,D,G,X,Q){if(y(X,this.key)){var J=D(this.value);return J===this.value?this:J===i?(--Q.value,I):W(g,this)?(this.value=J,this):b(g,G,X,J)}var i1=D();return i1===i?this:(++Q.value,F(g,k,this.hash,this,G,b(g,G,X,i1)))},o1=function(g,y,k,D,G,X,Q){if(G===this.hash){var J=W(g,this),i1=q(J,g,y,this.hash,this.children,D,X,Q);return i1===this.children?this:i1.length>1?U(g,this.hash,i1):i1[0]}var B1=D();return B1===i?this:(++Q.value,F(g,k,this.hash,this,G,b(g,G,X,B1)))},a1=function(g,y,k,D,G,X,Q){var J=this.mask,i1=this.children,B1=H(k,G),W1=C(B1),T1=p(J,W1),K1=J&W1,X1=K1?i1[T1]:I,k2=X1._modify(g,y,k+r,D,G,X,Q);if(X1===k2)return this;var N4=W(g,this),l4=J,v4=void 0;if(K1&&L(k2)){if(l4&=~W1,!l4)return I;if(i1.length<=2&&_(i1[T1^1]))return i1[T1^1];v4=w(N4,T1,i1)}else if(!K1&&!L(k2)){if(i1.length>=l)return A(g,B1,k2,J,i1);l4|=W1,v4=T(N4,T1,k2,i1)}else v4=R(N4,T1,k2,i1);return N4?(this.mask=l4,this.children=v4,this):Y(g,l4,v4)},u1=function(g,y,k,D,G,X,Q){var J=this.size,i1=this.children,B1=H(k,G),W1=i1[B1],T1=(W1||I)._modify(g,y,k+r,D,G,X,Q);if(W1===T1)return this;var K1=W(g,this),X1=void 0;if(L(W1)&&!L(T1))++J,X1=R(K1,B1,T1,i1);else if(!L(W1)&&L(T1)){if(--J,J<=v)return E(g,J,B1,i1);X1=R(K1,B1,I,i1)}else X1=R(K1,B1,T1,i1);return K1?(this.size=J,this.children=X1,this):P(g,J,X1)};I._modify=function(s,g,y,k,D,G,X){var Q=k();return Q===i?I:(++X.value,b(s,D,G,Q))};function K(s,g,y,k,D){this._editable=s,this._edit=g,this._config=y,this._root=k,this._size=D}K.prototype.setTree=function(s,g){return this._editable?(this._root=s,this._size=g,this):s===this._root?this:new K(this._editable,this._edit,this._config,s,g)};var g1=c.tryGetHash=function(s,g,y,k){for(var D=k._root,G=0,X=k._config.keyEq;;)switch(D.type){case O:return X(y,D.key)?D.value:s;case S:{if(g===D.hash)for(var Q=D.children,J=0,i1=Q.length;J<i1;++J){var B1=Q[J];if(X(y,B1.key))return B1.value}return s}case d:{var W1=H(G,g),T1=C(W1);if(D.mask&T1){D=D.children[p(D.mask,T1)],G+=r;break}return s}case B:{if(D=D.children[H(G,g)],D){G+=r;break}return s}default:return s}};K.prototype.tryGetHash=function(s,g,y){return g1(s,g,y,this)};var l1=c.tryGet=function(s,g,y){return g1(s,y._config.hash(g),g,y)};K.prototype.tryGet=function(s,g){return l1(s,g,this)};var z=c.getHash=function(s,g,y){return g1(void 0,s,g,y)};K.prototype.getHash=function(s,g){return z(s,g,this)};var m=c.get=function(s,g){return g1(void 0,g._config.hash(s),s,g)};K.prototype.get=function(s,g){return l1(g,s,this)};var V=c.has=function(s,g,y){return g1(i,s,g,y)!==i};K.prototype.hasHash=function(s,g){return V(s,g,this)};var Z=c.has=function(s,g){return V(g._config.hash(s),s,g)};K.prototype.has=function(s){return Z(s,this)};var M=function(g,y){return g===y};c.make=function(s){return new K(0,0,{keyEq:s&&s.keyEq||M,hash:s&&s.hash||n},I,0)},c.empty=c.make();var x=c.isEmpty=function(s){return s&&!!L(s._root)};K.prototype.isEmpty=function(){return x(this)};var $=c.modifyHash=function(s,g,y,k){var D={value:k._size},G=k._root._modify(k._editable?k._edit:NaN,k._config.keyEq,0,s,g,y,D);return k.setTree(G,D.value)};K.prototype.modifyHash=function(s,g,y){return $(y,s,g,this)};var e1=c.modify=function(s,g,y){return $(s,y._config.hash(g),g,y)};K.prototype.modify=function(s,g){return e1(g,s,this)};var v1=c.setHash=function(s,g,y,k){return $(o(y),s,g,k)};K.prototype.setHash=function(s,g,y){return v1(s,g,y,this)};var p1=c.set=function(s,g,y){return v1(y._config.hash(s),s,g,y)};K.prototype.set=function(s,g){return p1(s,g,this)};var n1=o(i),c1=c.removeHash=function(s,g,y){return $(n1,s,g,y)};K.prototype.removeHash=K.prototype.deleteHash=function(s,g){return c1(s,g,this)};var D1=c.remove=function(s,g){return c1(g._config.hash(s),s,g)};K.prototype.remove=K.prototype.delete=function(s){return D1(s,this)};var R1=c.beginMutation=function(s){return new K(s._editable+1,s._edit+1,s._config,s._root,s._size)};K.prototype.beginMutation=function(){return R1(this)};var E1=c.endMutation=function(s){return s._editable=s._editable&&s._editable-1,s};K.prototype.endMutation=function(){return E1(this)};var Z1=c.mutate=function(s,g){var y=R1(g);return s(y),E1(y)};K.prototype.mutate=function(s){return Z1(s,this)};var s2=function(g){return g&&N(g[0],g[1],g[2],g[3],g[4])},N=function(g,y,k,D,G){for(;k<g;){var X=y[k++];if(X&&!L(X))return r1(X,D,[g,y,k,D,G])}return s2(G)},r1=function(g,y,k){switch(g.type){case O:return{value:y(g),rest:k};case S:case B:case d:var D=g.children;return N(D.length,D,0,y,k);default:return s2(k)}},b1={done:!0};function I1(s){this.v=s}I1.prototype.next=function(){if(!this.v)return b1;var s=this.v;return this.v=s2(s.rest),s},I1.prototype[Symbol.iterator]=function(){return this};var N1=function(g,y){return new I1(r1(g._root,y))},L2=function(g){return[g.key,g.value]},u2=c.entries=function(s){return N1(s,L2)};K.prototype.entries=K.prototype[Symbol.iterator]=function(){return u2(this)};var a4=function(g){return g.key},c4=c.keys=function(s){return N1(s,a4)};K.prototype.keys=function(){return c4(this)};var r4=function(g){return g.value},_2=c.values=K.prototype.values=function(s){return N1(s,r4)};K.prototype.values=function(){return _2(this)};var P2=c.fold=function(s,g,y){var k=y._root;if(k.type===O)return s(g,k.value,k.key);for(var D=[k.children],G=void 0;G=D.pop();)for(var X=0,Q=G.length;X<Q;){var J=G[X++];J&&J.type&&(J.type===O?g=s(g,J.value,J.key):D.push(J.children))}return g};K.prototype.fold=function(s,g){return P2(s,g,this)};var e4=c.forEach=function(s,g){return P2(function(y,k,D){return s(k,D,g)},null,g)};K.prototype.forEach=function(s){return e4(s,this)};var h4=c.count=function(s){return s._size};K.prototype.count=function(){return h4(this)},Object.defineProperty(K.prototype,"size",{get:K.prototype.count}),t.exports?t.exports=c:(void 0).hamt=c}),o7=class{constructor(a){s1(this,"_map",void 0),this._map=new Map(a==null?void 0:a.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(a){return this._map.get(a)}has(a){return this._map.has(a)}set(a,c){return this._map.set(a,c),this}delete(a){return this._map.delete(a),this}clone(){return r5(this)}toMap(){return new Map(this._map)}},M0=class{constructor(a){if(s1(this,"_hamt",cr.empty.beginMutation()),a instanceof M0){let c=a._hamt.endMutation();a._hamt=c.beginMutation(),this._hamt=c.beginMutation()}else if(a)for(let[c,r]of a.entries())this._hamt.set(c,r)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(a){return this._hamt.get(a)}has(a){return this._hamt.has(a)}set(a,c){return this._hamt.set(a,c),this}delete(a){return this._hamt.delete(a),this}clone(){return r5(this)}toMap(){return new Map(this._hamt)}};function r5(t){return V1("recoil_hamt_2020")?new M0(t):new o7(t)}var rr={persistentMap:r5},er=rr.persistentMap,hr=Object.freeze({__proto__:null,persistentMap:er}),{graph:lr}=B4,{persistentMap:g7}=hr,vr=0,d7=()=>vr++;function z7(){let t=d7();return{version:t,stateID:t,transactionMetadata:{},dirtyAtoms:new Set,atomValues:g7(),nonvalidatedAtoms:g7()}}function nr(){let t=z7();return{currentTree:t,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(t.version,lr()),versionsUsedByComponent:new Map,retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var s7={makeEmptyTreeState:z7,makeEmptyStoreState:nr,getNextTreeStateVersion:d7};function ir(...t){let a=new Set;for(let c of t)for(let r of c)a.add(r);return a}var or=ir;function gr(t,a,c){let r=t.entries(),e=r.next();for(;!e.done;){let h=e.value;if(a.call(c,h[1],h[0],t))return!0;e=r.next()}return!1}var dr=gr,{cleanUpNode:zr}=j2,{deleteNodeConfigIfPossible:sr,getNode:u7}=J1,{RetentionZone:p7}=d0,M7=new Set;function H7(t,a){let c=t.getState(),r=c.currentTree;if(c.nextTree){v2("releaseNodesNowOnCurrentTree should only be called at the end of a batch");return}let e=new Set;for(let l of a)if(l instanceof p7)for(let v of Hr(c,l))e.add(v);else e.add(l);let h=ur(t,e);for(let l of h)Mr(t,r,l)}function ur(t,a){let c=t.getState(),r=c.currentTree,e=t.getGraph(r.version),h=new Set,l=new Set;return v(a),h;function v(i){let o=new Set,n=pr(t,r,i,h,l);for(let p of n){var u;if(u7(p).retainedBy==="recoilRoot"){l.add(p);continue}if(((u=c.retention.referenceCounts.get(p))!==null&&u!==void 0?u:0)>0){l.add(p);continue}if(f7(p).some(w=>c.retention.referenceCounts.get(w))){l.add(p);continue}let R=e.nodeToNodeSubscriptions.get(p);if(R&&dr(R,w=>l.has(w))){l.add(p);continue}h.add(p),o.add(p)}let H=new Set;for(let p of o)for(let R of(C=e.nodeDeps.get(p))!==null&&C!==void 0?C:M7){var C;h.has(R)||H.add(R)}H.size&&v(H)}}function pr(t,a,c,r,e){let h=t.getGraph(a.version),l=[],v=new Set;for(;c.size>0;)i(x1(c.values().next().value));return l;function i(o){if(r.has(o)||e.has(o)){c.delete(o);return}if(v.has(o))return;let n=h.nodeToNodeSubscriptions.get(o);if(n)for(let u of n)i(u);v.add(o),c.delete(o),l.push(o)}}function Mr(t,a,c){if(!V1("recoil_memory_managament_2020"))return;zr(t,c);let r=t.getState();r.knownAtoms.delete(c),r.knownSelectors.delete(c),r.nodeTransactionSubscriptions.delete(c),r.retention.referenceCounts.delete(c);let e=f7(c);for(let i of e){var h;(h=r.retention.nodesRetainedByZone.get(i))===null||h===void 0||h.delete(c)}a.atomValues.delete(c),a.dirtyAtoms.delete(c),a.nonvalidatedAtoms.delete(c);let l=r.graphsByVersion.get(a.version);if(l){let i=l.nodeDeps.get(c);if(i!==void 0){l.nodeDeps.delete(c);for(let o of i){var v;(v=l.nodeToNodeSubscriptions.get(o))===null||v===void 0||v.delete(c)}}l.nodeToNodeSubscriptions.delete(c)}sr(c)}function Hr(t,a){var c;return(c=t.retention.nodesRetainedByZone.get(a))!==null&&c!==void 0?c:M7}function f7(t){let a=u7(t).retainedBy;return a===void 0||a==="components"||a==="recoilRoot"?[]:a instanceof p7?[a]:a}function fr(t,a){let c=t.getState();c.nextTree?c.retention.retainablesToCheckForRelease.add(a):H7(t,new Set([a]))}function xr(t,a,c){var r;if(!V1("recoil_memory_managament_2020"))return;let e=t.getState().retention.referenceCounts,h=((r=e.get(a))!==null&&r!==void 0?r:0)+c;h===0?x7(t,a):e.set(a,h)}function x7(t,a){if(!V1("recoil_memory_managament_2020"))return;t.getState().retention.referenceCounts.delete(a),fr(t,a)}function Vr(t){if(!V1("recoil_memory_managament_2020"))return;let a=t.getState();H7(t,a.retention.retainablesToCheckForRelease),a.retention.retainablesToCheckForRelease.clear()}function mr(t){return t===void 0?"recoilRoot":t}var A4={updateRetainCount:xr,updateRetainCountToZero:x7,releaseScheduledRetainablesNow:Vr,retainedByOptionWithDefault:mr};function*Cr(t){for(let a of t)for(let c of a)yield c}var Lr=Cr,wr=typeof window=="undefined",Br=typeof navigator!="undefined"&&navigator.product==="ReactNative",V7={isSSR:wr,isReactNative:Br},{isSSR:Ar}=V7,{batchUpdates:e5}=a5,{initializeNodeIfNewToStore:Sr,peekNodeInfo:Fr}=j2,{graph:yr}=B4,{DEFAULT_VALUE:Or,recoilValues:m7,recoilValuesForKeys:C7}=J1,{AbstractRecoilValue:Zr,getRecoilValueAsLoadable:Rr,setRecoilValue:L7,setUnvalidatedRecoilValue:br}=R2,{updateRetainCount:H0}=A4,{getNextTreeStateVersion:Ir,makeEmptyStoreState:Tr}=s7;var S4=class{constructor(a){s1(this,"_store",void 0),s1(this,"_refCount",0),s1(this,"getLoadable",c=>(this.checkRefCount_INTERNAL(),Rr(this._store,c))),s1(this,"getPromise",c=>(this.checkRefCount_INTERNAL(),this.getLoadable(c).toPromise())),s1(this,"getNodes_UNSTABLE",c=>{if(this.checkRefCount_INTERNAL(),(c==null?void 0:c.isModified)===!0){if((c==null?void 0:c.isInitialized)===!1)return[];let h=this._store.getState().currentTree;return C7(h.dirtyAtoms)}let r=this._store.getState().knownAtoms,e=this._store.getState().knownSelectors;return(c==null?void 0:c.isInitialized)==null?m7.values():c.isInitialized===!0?C7(Lr([this._store.getState().knownAtoms,this._store.getState().knownSelectors])):Y8(m7.values(),({key:h})=>!r.has(h)&&!e.has(h))}),s1(this,"getInfo_UNSTABLE",({key:c})=>(this.checkRefCount_INTERNAL(),Fr(this._store,this._store.getState().currentTree,c))),s1(this,"map",c=>{this.checkRefCount_INTERNAL();let r=new f0(this,e5);return c(r),h5(r.getStore_INTERNAL())}),s1(this,"asyncMap",async c=>{this.checkRefCount_INTERNAL();let r=new f0(this,e5);return await c(r),h5(r.getStore_INTERNAL())}),this._store={getState:()=>a,replaceState:c=>{a.currentTree=c(a.currentTree)},getGraph:c=>{let r=a.graphsByVersion;if(r.has(c))return x1(r.get(c));let e=yr();return r.set(c,e),e},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw new Error("Cannot subscribe to Snapshots")}};for(let c of this._store.getState().nodeCleanupFunctions.keys())Sr(this._store,a.currentTree,c,"get"),H0(this._store,c,1);this.retain(),this.autorelease_INTERNAL()}retain(){if(!V1("recoil_memory_managament_2020"))return()=>{};this._refCount++;let a=!1;return()=>{a||(a=!0,this.release_INTERNAL())}}autorelease_INTERNAL(){!V1("recoil_memory_managament_2020")||Ar||window.setTimeout(()=>this.release_INTERNAL(),0)}release_INTERNAL(){!V1("recoil_memory_managament_2020")||(this._refCount--,this._refCount===0)}checkRefCount_INTERNAL(){V1("recoil_memory_managament_2020")&&this._refCount<=0}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this.getID_INTERNAL()}getID_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}};function w7(t,a,c=!1){let r=t.getState(),e=c?Ir():a.version;return{currentTree:c?{version:e,stateID:e,transactionMetadata:{...a.transactionMetadata},dirtyAtoms:new Set(a.dirtyAtoms),atomValues:a.atomValues.clone(),nonvalidatedAtoms:a.nonvalidatedAtoms.clone()}:a,commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(e,t.getGraph(a.version)),versionsUsedByComponent:new Map,retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}function _r(t){let a=new S4(Tr());return t!=null?a.map(t):a}function h5(t,a="current"){let c=t.getState(),r=a==="current"?c.currentTree:x1(c.previousTree);return new S4(w7(t,r))}var f0=class extends S4{constructor(a,c){super(w7(a.getStore_INTERNAL(),a.getStore_INTERNAL().getState().currentTree,!0));s1(this,"_batch",void 0),s1(this,"set",(r,e)=>{this.checkRefCount_INTERNAL();let h=this.getStore_INTERNAL();this._batch(()=>{H0(h,r.key,1),L7(this.getStore_INTERNAL(),r,e)})}),s1(this,"reset",r=>{this.checkRefCount_INTERNAL();let e=this.getStore_INTERNAL();this._batch(()=>{H0(e,r.key,1),L7(this.getStore_INTERNAL(),r,Or)})}),s1(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();let e=this.getStore_INTERNAL();e5(()=>{for(let[h,l]of r.entries())H0(e,h,1),br(e,new Zr(h),l)})}),this._batch=c}},x0={Snapshot:S4,MutableSnapshot:f0,freshSnapshot:_r,cloneSnapshot:h5},Pr=x0.Snapshot,kr=x0.MutableSnapshot,Dr=x0.freshSnapshot,Er=x0.cloneSnapshot,V0=Object.freeze({__proto__:null,Snapshot:Pr,MutableSnapshot:kr,freshSnapshot:Dr,cloneSnapshot:Er}),{getNextTreeStateVersion:Nr,makeEmptyStoreState:B7}=s7,{cleanUpNode:Ur,getDownstreamNodes:Wr,setNodeValue:Gr,setUnvalidatedAtomValue_DEPRECATED:qr}=j2,{graph:$r}=B4,{cloneGraph:jr}=B4,{applyAtomValueWrites:Kr}=R2,{releaseScheduledRetainablesNow:A7}=A4,{freshSnapshot:Yr}=V0,{useCallback:Qr,useContext:S7,useEffect:l5,useMemo:Jr,useRef:v5,useState:Xr}=f;function F4(){throw new Error("This component must be used inside a <RecoilRoot> component.")}var F7=Object.freeze({getState:F4,replaceState:F4,getGraph:F4,subscribeToTransactions:F4,addTransactionMetadata:F4}),n5=!1;function y7(t){if(n5)throw new Error("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");let a=t.getState();if(a.nextTree===null){V1("recoil_memory_managament_2020")&&V1("recoil_release_on_cascading_update_killswitch_2021")&&a.commitDepth>0&&A7(t);let c=a.currentTree.version,r=Nr();a.nextTree={...a.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},a.graphsByVersion.set(r,jr(x1(a.graphsByVersion.get(c))))}}var O7=f.createContext({current:F7}),i5=()=>S7(O7),Z7=f.createContext(null);function te(){let t=S7(Z7);return t==null&&U3("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),t}function o5(t,a,c){let r=Wr(t,c,c.dirtyAtoms);for(let e of r){let h=a.nodeToComponentSubscriptions.get(e);if(h)for(let[l,[v,i]]of h)i(c)}}function R7(t){let a=t.getState(),c=a.currentTree,r=c.dirtyAtoms;if(r.size){for(let[e,h]of a.nodeTransactionSubscriptions)if(r.has(e))for(let[l,v]of h)v(t);for(let[e,h]of a.transactionSubscriptions)h(t);(!V1("recoil_early_rendering_2021")||a.suspendedComponentResolvers.size)&&(o5(t,a,c),a.suspendedComponentResolvers.forEach(e=>e()),a.suspendedComponentResolvers.clear())}a.queuedComponentCallbacks_DEPRECATED.forEach(e=>e(c)),a.queuedComponentCallbacks_DEPRECATED.splice(0,a.queuedComponentCallbacks_DEPRECATED.length)}function ae(t){let a=t.current.getState();a.commitDepth++;try{let{nextTree:c}=a;if(c===null)return;a.previousTree=a.currentTree,a.currentTree=c,a.nextTree=null,R7(t.current),a.previousTree!=null?a.graphsByVersion.delete(a.previousTree.version):v2("Ended batch with no previous state, which is unexpected","recoil"),a.previousTree=null,V1("recoil_memory_managament_2020")&&A7(t.current)}finally{a.commitDepth--}}function ce({setNotifyBatcherOfChange:t}){let a=i5(),[c,r]=Xr([]);return t(()=>r({})),l5(()=>{$c.enqueueExecution("Batcher",()=>{ae(a)})}),l5(()=>()=>{t(()=>{})},[t]),null}function re(t,a){let c=B7();return a({set:(r,e)=>{let h=c.currentTree,l=Gr(t,h,r.key,e),v=new Set(l.keys()),i=h.nonvalidatedAtoms.clone();for(let o of v)i.delete(o);c.currentTree={...h,dirtyAtoms:or(h.dirtyAtoms,v),atomValues:Kr(h.atomValues,l),nonvalidatedAtoms:i}},setUnvalidatedAtomValues:r=>{r.forEach((e,h)=>{c.currentTree=qr(c.currentTree,h,e)})}}),c}function ee(t){return Yr().map(t).getStore_INTERNAL().getState()}var b7=0;function he({initializeState_DEPRECATED:t,initializeState:a,store_INTERNAL:c,children:r}){var e;let h,l=w=>{let T=h.current.graphsByVersion;if(T.has(w))return x1(T.get(w));let O=$r();return T.set(w,O),O},v=(w,T)=>{if(T==null){let{transactionSubscriptions:O}=p.current.getState(),S=b7++;return O.set(S,w),{release:()=>{O.delete(S)}}}else{let{nodeTransactionSubscriptions:O}=p.current.getState();O.has(T)||O.set(T,new Map);let S=b7++;return x1(O.get(T)).set(S,w),{release:()=>{let d=O.get(T);d&&(d.delete(S),d.size===0&&O.delete(T))}}}},i=w=>{y7(p.current);for(let T of Object.keys(w))x1(p.current.getState().nextTree).transactionMetadata[T]=w[T]},o=w=>{let T=p.current.getState();y7(p.current);let O=x1(T.nextTree),S;try{n5=!0,S=w(O)}finally{n5=!1}S!==O&&(T.nextTree=S,V1("recoil_early_rendering_2021")&&o5(C,T,S),x1(n.current)())},n=v5(null),u=Qr(w=>{n.current=w},[n]),H=(e=f.createMutableSource)!==null&&e!==void 0?e:f.unstable_createMutableSource,C=c??{getState:()=>h.current,replaceState:o,getGraph:l,subscribeToTransactions:v,addTransactionMetadata:i},p=v5(C);h=v5(t!=null?re(C,t):a!=null?ee(a):B7());let R=Jr(()=>H?H(h,()=>h.current.currentTree.version):null,[H,h]);return l5(()=>()=>{for(let w of p.current.getState().knownAtoms)Ur(p.current,w)},[]),f.createElement(O7.Provider,{value:p},f.createElement(Z7.Provider,{value:R},f.createElement(ce,{setNotifyBatcherOfChange:u}),r))}function le(t){let{override:a,...c}=t,r=i5();return a===!1&&r.current!==F7?t.children:f.createElement(he,c)}var m0={useStoreRef:i5,useRecoilMutableSource:te,RecoilRoot:le,notifyComponents_FOR_TESTING:o5,sendEndOfBatchNotifications_FOR_TESTING:R7},{loadableWithValue:ve}=L4,{DEFAULT_VALUE:ne,getNode:ie}=J1,{copyTreeState:oe,getRecoilValueAsLoadable:ge,invalidateDownstreams:de,writeLoadableToTreeState:ze}=R2;function I7(t){return ie(t.key).nodeType==="atom"}var T7=class{constructor(a,c){s1(this,"_store",void 0),s1(this,"_treeState",void 0),s1(this,"_changes",void 0),s1(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!I7(r))throw new Error("Reading selectors within atomicUpdate is not supported");let e=ge(this._store,r,this._treeState);if(e.state==="hasValue")return e.contents;throw e.state==="hasError"?e.contents:new Error(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),s1(this,"set",(r,e)=>{if(!I7(r))throw new Error("Setting selectors within atomicUpdate is not supported");if(typeof e=="function"){let h=this.get(r);this._changes.set(r.key,e(h))}else this._changes.set(r.key,e)}),s1(this,"reset",r=>{this.set(r,ne)}),this._store=a,this._treeState=c,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;let a=oe(this._treeState);for(let[c,r]of this._changes)ze(a,c,ve(r));return de(this._store,a),a}};function se(t){return a=>{t.replaceState(c=>{let r=new T7(t,c);return a(r),r.newTreeState_INTERNAL()})}}var ue={atomicUpdater:se},pe=ue.atomicUpdater,Me=Object.freeze({__proto__:null,atomicUpdater:pe});function He(t,a){let c=new Map;for(let[r,e]of t)a(e,r)&&c.set(r,e);return c}var fe=He;function xe(t,a){let c=new Set;for(let r of t)a(r)&&c.add(r);return c}var Ve=xe;function me(t,a){if(!t)throw new Error(a)}var Ce=me,C0=Ce;function Le(...t){let a=new Map;for(let c=0;c<t.length;c++){let r=t[c].keys(),e;for(;!(e=r.next()).done;)a.set(e.value,t[c].get(e.value))}return a}var we=Le;function Be(t,a){if(t===a)return!0;if(t.length!==a.length)return!1;for(let c=0,r=t.length;c<r;c++)if(t[c]!==a[c])return!1;return!0}var Ae=Be;var{useRef:Se}=f;function Fe(){let t=Se();if(!1&&V1("recoil_infer_component_names"))var a;return"<component name not available>"}var g5=Fe,{atomicUpdater:_7}=Me,{batchUpdates:d5}=a5,{DEFAULT_VALUE:L0,getNode:P7,nodes:ye}=J1,{useRecoilMutableSource:Oe,useStoreRef:$1}=m0;var{AbstractRecoilValue:z5,getRecoilValueAsLoadable:y4,setRecoilValue:K2,setRecoilValueLoadable:Ze,setUnvalidatedRecoilValue:Re,subscribeToRecoilValue:s5}=R2,{updateRetainCount:O4}=A4,{RetentionZone:be}=d0,{Snapshot:id,cloneSnapshot:Z4}=V0,{setByAddingToSet:Ie}=K8,{isSSR:w0}=V7,{mutableSourceExists:Te,useMutableSource:_e}=j8,{useCallback:r2,useEffect:z2,useMemo:k7,useRef:H2,useState:u5}=f,D7=12e4;function E7(t,a,c){if(t.state==="hasValue")return t.contents;throw t.state==="loading"?new Promise(e=>{c.current.getState().suspendedComponentResolvers.add(e)}):t.state==="hasError"?t.contents:new Error(`Invalid value of loadable atom "${a.key}"`)}function Pe(){let t=$1(),[a,c]=u5([]),r=H2(new Set);r.current=new Set;let e=H2(new Set),h=H2(new Map),l=r2(i=>{let o=h.current.get(i);o&&(o.release(),h.current.delete(i))},[h]),v=g5();return z2(()=>{let i=t.current;function o(n,u){!h.current.has(u)||c([])}u0(r.current,e.current).forEach(n=>{if(h.current.has(n)){U3(`Double subscription to RecoilValue "${n}"`);return}let u=s5(i,new z5(n),C=>{o(C,n)},v);h.current.set(n,u),i.getState().nextTree?i.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{o(i.getState(),n)}):o(i.getState(),n)}),u0(e.current,r.current).forEach(n=>{l(n)}),e.current=r.current}),z2(()=>{let i=h.current;return()=>i.forEach((o,n)=>l(n))},[l]),k7(()=>{function i(p){return R=>{K2(t.current,p,R)}}function o(p){return()=>K2(t.current,p,L0)}function n(p){var R;r.current.has(p.key)||(r.current=Ie(r.current,p.key));let w=t.current.getState();return y4(t.current,p,V1("recoil_early_rendering_2021")&&(R=w.nextTree)!==null&&R!==void 0?R:w.currentTree)}function u(p){let R=n(p);return E7(R,p,t)}function H(p){return[u(p),i(p)]}function C(p){return[n(p),i(p)]}return{getRecoilValue:u,getRecoilValueLoadable:n,getRecoilState:H,getRecoilStateLoadable:C,getSetRecoilState:i,getResetRecoilState:o}},[r,t])}var ke={current:0};function De(t){let a=$1(),c=r2(()=>{var o;let n=a.current,u=n.getState(),H=V1("recoil_early_rendering_2021")&&(o=u.nextTree)!==null&&o!==void 0?o:u.currentTree;return y4(n,t,H)},[a,t]),r=r2(()=>c(),[c]),e=g5(),h=r2((o,n)=>{let u=a.current;return s5(u,t,()=>{if(!V1("recoil_suppress_rerender_in_callback"))return n();let C=c();i.current.is(C)||n(),i.current=C},e).release},[a,t,e,c]),l=Oe(),v=_e(l,r,h),i=H2(v);return z2(()=>{i.current=v}),v}function Ee(t){let a=$1(),[c,r]=u5([]),e=g5();z2(()=>{let v=a.current,i=v.getState(),o=s5(v,t,u=>{var H;if(!V1("recoil_suppress_rerender_in_callback"))return r([]);let C=y4(v,t,v.getState().currentTree);((H=l.current)===null||H===void 0?void 0:H.is(C))||r(C),l.current=C},e);if(i.nextTree)v.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{l.current=null,r([])});else{var n;if(!V1("recoil_suppress_rerender_in_callback"))return r([]);let u=y4(v,t,v.getState().currentTree);((n=l.current)===null||n===void 0?void 0:n.is(u))||r(u),l.current=u}return o.release},[e,t,a]);let h=y4(a.current,t),l=H2(h);return z2(()=>{l.current=h}),h}function p5(t){return V1("recoil_memory_managament_2020")&&q7(t),Te()?De(t):Ee(t)}function N7(t){let a=$1(),c=p5(t);return E7(c,t,a)}function M5(t){let a=$1();return r2(c=>{K2(a.current,t,c)},[a,t])}function Ne(t){let a=$1();return r2(()=>{K2(a.current,t,L0)},[a,t])}function Ue(t){return[N7(t),M5(t)]}function We(t){return[p5(t),M5(t)]}function B0(t){let a=$1();z2(()=>a.current.subscribeToTransactions(t).release,[t,a])}function U7(t){let a=t.atomValues.toMap(),c=p0(fe(a,(r,e)=>{let l=P7(e).persistence_UNSTABLE;return l!=null&&l.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return we(t.nonvalidatedAtoms.toMap(),c)}function Ge(t){B0(r2(a=>{let c=a.getState().previousTree,r=a.getState().currentTree;c||(v2("Transaction subscribers notified without a previous tree being present -- this is a bug in Recoil"),c=a.getState().currentTree);let e=U7(r),h=U7(c),l=p0(ye,i=>{var o,n,u,H;return{persistence_UNSTABLE:{type:(o=(n=i.persistence_UNSTABLE)===null||n===void 0?void 0:n.type)!==null&&o!==void 0?o:"none",backButton:(u=(H=i.persistence_UNSTABLE)===null||H===void 0?void 0:H.backButton)!==null&&u!==void 0?u:!1}}}),v=Ve(r.dirtyAtoms,i=>e.has(i)||h.has(i));t({atomValues:e,previousAtomValues:h,atomInfo:l,modifiedAtoms:v,transactionMetadata:{...r.transactionMetadata}})},[t]))}function qe(t){B0(r2(a=>{let c=Z4(a,"current"),r=Z4(a,"previous");t({snapshot:c,previousSnapshot:r})},[t]))}function W7(t){let a=H2();return z2(()=>{a.current=t}),a.current}function $e(){let t=$1(),[a,c]=u5(()=>Z4(t.current)),r=W7(a),e=H2();return z2(()=>(e.current&&!w0&&window.clearTimeout(e.current),a.retain()),[a]),B0(r2(h=>c(Z4(h)),[])),r!==a&&!w0&&(e.current&&(r==null||r.release_INTERNAL(),window.clearTimeout(e.current)),a.retain(),e.current=window.setTimeout(()=>{a.release_INTERNAL(),e.current=null},D7)),a}function G7(){let t=$1();return r2(a=>{var c;let r=t.current.getState(),e=(c=r.nextTree)!==null&&c!==void 0?c:r.currentTree,h=a.getStore_INTERNAL().getState().currentTree;d5(()=>{let l=new Set;for(let o of[e.atomValues.keys(),h.atomValues.keys()])for(let n of o){var v,i;((v=e.atomValues.get(n))===null||v===void 0?void 0:v.contents)!==((i=h.atomValues.get(n))===null||i===void 0?void 0:i.contents)&&P7(n).shouldRestoreFromSnapshots&&l.add(n)}l.forEach(o=>{Ze(t.current,new z5(o),h.atomValues.has(o)?x1(h.atomValues.get(o)):L0)}),t.current.replaceState(o=>({...o,stateID:a.getID_INTERNAL()}))})},[t])}function je(){let t=$1();return(a,c={})=>{d5(()=>{t.current.addTransactionMetadata(c),a.forEach((r,e)=>Re(t.current,new z5(e),r))})}}var H5=class{},Ke=new H5;function Ye(t,a){let c=$1(),r=G7();return r2((...e)=>{function h(n,u){K2(c.current,n,u)}function l(n){K2(c.current,n,L0)}let v=Z4(c.current),i=_7(c.current),o=Ke;return d5(()=>{let n="useRecoilCallback expects a function that returns a function: it accepts a function of the type (RecoilInterface) => T = R and returns a callback function T => R, where RecoilInterface is an object {snapshot, set, ...} and T and R are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw new Error(n);let u=t({set:h,reset:l,snapshot:v,gotoSnapshot:r,transact_UNSTABLE:i});if(typeof u!="function")throw new Error(n);o=u(...e)}),o instanceof H5&&C0(!1),o},a!=null?[...a,c]:void 0)}function q7(t){if(!!V1("recoil_memory_managament_2020"))return Qe(t)}function Qe(t){let c=(Array.isArray(t)?t:[t]).map(l=>l instanceof be?l:l.key),r=$1();z2(()=>{if(!V1("recoil_memory_managament_2020"))return;let l=r.current;if(e.current&&!w0)window.clearTimeout(e.current),e.current=null;else for(let v of c)O4(l,v,1);return()=>{for(let v of c)O4(l,v,-1)}},[r,...c]);let e=H2(),h=W7(c);if(!w0&&(h===void 0||!Ae(h,c))){let l=r.current;for(let v of c)O4(l,v,1);if(h)for(let v of h)O4(l,v,-1);e.current&&window.clearTimeout(e.current),e.current=window.setTimeout(()=>{e.current=null;for(let v of c)O4(l,v,-1)},D7)}}function Je(t,a){let c=$1();return k7(()=>(...r)=>{_7(c.current)(h=>{t(h)(...r)})},a!=null?[...a,c]:void 0)}var Xe={recoilComponentGetRecoilValueCount_FOR_TESTING:ke,useGotoRecoilSnapshot:G7,useRecoilCallback:Ye,useRecoilInterface:Pe,useRecoilSnapshot:$e,useRecoilState:Ue,useRecoilStateLoadable:We,useRecoilTransaction:Je,useRecoilTransactionObserver:qe,useRecoilValue:N7,useRecoilValueLoadable:p5,useRetain:q7,useResetRecoilState:Ne,useSetRecoilState:M5,useSetUnvalidatedAtomValues:je,useTransactionObservation_DEPRECATED:Ge,useTransactionSubscription_DEPRECATED:B0},{peekNodeInfo:th}=j2,{useStoreRef:ah}=m0;function ch(){let t=ah();return({key:a})=>th(t.current,t.current.getState().currentTree,a)}var rh=ch,{RecoilRoot:eh,useStoreRef:hh}=m0,{useMemo:lh}=f;function vh(){let t=hh().current;return lh(()=>{function a({children:c}){return f.createElement(eh,{store_INTERNAL:t},c)}return a},[t])}var nh=vh;function e2(t,a,c){if(typeof t=="string"&&!t.includes('"')&&!t.includes("\\"))return`"${t}"`;switch(typeof t){case"undefined":return"";case"boolean":return t?"true":"false";case"number":case"symbol":return String(t);case"string":return JSON.stringify(t);case"function":if((a==null?void 0:a.allowFunctions)!==!0)throw new Error("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${t.name})__`}if(t===null)return"null";if(typeof t!="object"){var r;return(r=JSON.stringify(t))!==null&&r!==void 0?r:""}if(O1(t))return"__PROMISE__";if(Array.isArray(t))return`[${t.map((e,h)=>e2(e,a,h.toString()))}]`;if(typeof t.toJSON=="function")return e2(t.toJSON(c),a,c);if(t instanceof Map){let e={};for(let[h,l]of t)e[typeof h=="string"?h:e2(h,a)]=l;return e2(e,a,c)}return t instanceof Set?e2(Array.from(t).sort((e,h)=>e2(e,a).localeCompare(e2(h,a))),a,c):Symbol!==void 0&&t[Symbol.iterator]!=null&&typeof t[Symbol.iterator]=="function"?e2(Array.from(t),a,c):`{${Object.keys(t).filter(e=>t[e]!==void 0).sort().map(e=>`${e2(e,a)}:${e2(t[e],a,e)}`).join(",")}}`}function ih(t,a={allowFunctions:!1}){return e2(t,a)}var A0=ih,$7=class{constructor(a){var c,r,e;s1(this,"_numLeafs",void 0),s1(this,"_root",void 0),s1(this,"_onHit",void 0),s1(this,"_onSet",void 0),s1(this,"_mapNodeValue",void 0),this._numLeafs=0,this._root=null,this._onHit=(c=a==null?void 0:a.onHit)!==null&&c!==void 0?c:()=>{},this._onSet=(r=a==null?void 0:a.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(e=a==null?void 0:a.mapNodeValue)!==null&&e!==void 0?e:h=>h}size(){return this._numLeafs}root(){return this._root}get(a,c){var r;return(r=this.getLeafNode(a,c))===null||r===void 0?void 0:r.value}getLeafNode(a,c){return j7(this.root(),r=>this._mapNodeValue(a(r)),{onNodeVisit:r=>{c==null||c.onNodeVisit(r),r.type==="leaf"&&this._onHit(r)}})}set(a,c,r){let e,h=f5(this.root(),a.map(([l,v])=>[l,this._mapNodeValue(v)]),null,c,null,{onNodeVisit:l=>{r==null||r.onNodeVisit(l),l.type==="leaf"&&(e=l)}});this.root()||(this._root=h),this._numLeafs++,this._onSet(x1(e))}delete(a){if(!this.root())return!1;let c=x1(this.root());return oh(c,a,a.parent)?a===c||c.type==="branch"&&!c.branches.size?(this._root=null,this._numLeafs=0,!0):(this._numLeafs-=Y7(a),!0):!1}clear(){this._numLeafs=0,this._root=null}},j7=(t,a,c)=>{var r;if(t==null)return;if(c==null||(r=c.onNodeVisit)===null||r===void 0||r.call(c,t),t.type==="leaf")return t;let e=a(t.nodeKey);return j7(t.branches.get(e),a,c)},f5=(t,a,c,r,e,h)=>{var l;let v;if(t==null)if(a.length===0)v={type:"leaf",value:r,parent:c,branchKey:e};else{let[i,...o]=a,[n,u]=i;v={type:"branch",nodeKey:n,parent:c,branches:new Map,branchKey:e},v.branches.set(u,f5(null,o,v,r,u,h))}else if(v=t,a.length){let[i,...o]=a,[n,u]=i;t.type==="branch"&&t.nodeKey===n||C0(!1),t.branches.set(u,f5(t.branches.get(u),o,t,r,u,h))}return h==null||(l=h.onNodeVisit)===null||l===void 0||l.call(h,v),v},oh=(t,a,c)=>c?(c.branches.delete(a.branchKey),K7(t,c,c.parent)):t===a,K7=(t,a,c)=>c?(a.branches.size===0&&c.branches.delete(a.branchKey),K7(t,c,c.parent)):t===a,Y7=t=>t.type==="leaf"?1:Array.from(t.branches.values()).reduce((a,c)=>a+Y7(c),0),gh={TreeCache:$7},dh=gh.TreeCache,Q7=Object.freeze({__proto__:null,TreeCache:dh}),J7=class{constructor(a){var c;s1(this,"_maxSize",void 0),s1(this,"_size",void 0),s1(this,"_head",void 0),s1(this,"_tail",void 0),s1(this,"_map",void 0),s1(this,"_keyMapper",void 0),this._maxSize=a.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(c=a.mapKey)!==null&&c!==void 0?c:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(a){return this._map.has(this._keyMapper(a))}get(a){let c=this._keyMapper(a),r=this._map.get(c);if(!!r)return this.set(a,r.value),r.value}set(a,c){let r=this._keyMapper(a);this._map.get(r)&&this.delete(a);let h=this.head(),l={key:a,right:h,left:null,value:c};h?h.left=l:this._tail=l,this._map.set(r,l),this._head=l,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){let a=this.tail();a&&this.delete(a.key)}delete(a){let c=this._keyMapper(a);if(!this._size||!this._map.has(c))return;let r=x1(this._map.get(c)),e=r.right,h=r.left;e&&(e.left=r.left),h&&(h.right=r.right),r===this.head()&&(this._head=e),r===this.tail()&&(this._tail=h),this._map.delete(c),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}},zh={LRUCache:J7},sh=zh.LRUCache,X7=Object.freeze({__proto__:null,LRUCache:sh}),{LRUCache:uh}=X7,{TreeCache:ph}=Q7;function Mh(t,a=c=>c){let c=new uh({maxSize:t}),r=new ph({mapNodeValue:a,onHit:e=>{c.set(e,!0)},onSet:e=>{let h=c.tail();c.set(e,!0),h&&r.size()>t&&r.delete(h.key)}});return r}var t9=Mh,{TreeCache:Hh}=Q7,S0={equality:"reference",eviction:"keep-all",maxSize:1/0};function fh({equality:t=S0.equality,eviction:a=S0.eviction,maxSize:c=S0.maxSize}=S0){let r=xh(t);return Vh(a,c,r)}function xh(t){switch(t){case"reference":return a=>a;case"value":return a=>A0(a)}throw new Error(`Unrecognized equality policy ${t}`)}function Vh(t,a,c){switch(t){case"keep-all":return new Hh({mapNodeValue:c});case"lru":return t9(x1(a),c);case"most-recent":return t9(1,c)}throw new Error(`Unrecognized eviction policy ${t}`)}var mh=fh;function Ch(t){return()=>null}var Lh={startPerfBlock:Ch},{CANCELED:R4,Canceled:wh,loadableWithError:b4,loadableWithPromise:Bh,loadableWithValue:x5}=L4,{getNodeLoadable:a9,peekNodeLoadable:Ah,setNodeValue:Sh}=j2,{saveDependencyMapToStore:Fh}=B4,{DEFAULT_VALUE:yh,RecoilValueNotReady:Oh,getConfigDeletionHandler:Zh,registerNode:c9}=J1,{isRecoilValue:Rh}=O2,{AbstractRecoilValue:bh}=O2,{setRecoilValueLoadable:Ih}=R2,{retainedByOptionWithDefault:Th}=A4,{cloneSnapshot:_h}=V0,{startPerfBlock:Ph}=Lh,I4=[],F0=new Map,kh=(()=>{let t=0;return()=>t++})();function Dh(){return{depValuesDiscoveredSoFarDuringAsyncWork:null,latestLoadable:null,latestExecutionId:null,stateVersion:null}}function Eh(t){let{key:a,get:c,cachePolicy_UNSTABLE:r}=t,e=t.set!=null?t.set:void 0,h=mh(r??{equality:"reference",eviction:"keep-all"}),l=Th(t.retainedBy_UNSTABLE),v=new Map,i=0;function o(){return!V1("recoil_memory_managament_2020")||i>0}function n(z){return v.has(z)||v.set(z,Dh()),x1(v.get(z))}function u(z){return i++,z.getState().knownSelectors.add(a),()=>{i--,z.getState().knownSelectors.delete(a),v.delete(z)}}function H(){return Zh(a)!==void 0&&!o()}function C(z,m,V){if(m.state==="loading"){let Z=F0.get(V);Z==null&&F0.set(V,Z=new Set),Z.add(z)}}function p(z,m){let V=F0.get(m);if(V!==void 0){for(let Z of V)Ih(Z,new bh(a),z);F0.delete(m)}}function R(z,m,V){let Z=z.getState().knownSelectors.has(V);if(Z&&m.atomValues.has(V))return x1(m.atomValues.get(V));let M=a9(z,m,V);return M.state!=="loading"&&Z&&m.atomValues.set(V,M),M}function w(z,m,V,Z,M){return m.then(x=>{if(!o())return q(z,M),R4;let $=x5(x);return o1(x),a1(V,L(Z),$),S(z,V,new Set(Z.keys()),M),O(z,$,M),{__value:x,__key:a}}).catch(x=>{if(!o())return q(z,M),R4;if(W(z,M)&&F(Z,z,M),O1(x))return T(z,x,V,Z,M);let $=b4(x);throw o1(x),a1(V,L(Z),$),S(z,V,new Set(Z.keys()),M),O(z,$,M),x})}function T(z,m,V,Z,M){return m.then(x=>{if(!o())return q(z,M),R4;if(x instanceof wh)return v2("Selector was released while it had dependencies"),R4;let{__key:$,__value:e1}=x??{},v1=!0;$!=null&&(V.atomValues.set($,x5(e1)),v1=!1);let p1=I(z,V);if(p1&&p1.state==="hasValue")return A(p1,z),{__value:p1.contents,__key:a};if(!W(z,M)){var n1;let R1=Y(V);if((R1==null||(n1=R1.latestLoadable)===null||n1===void 0?void 0:n1.state)==="loading")return R1.latestLoadable.contents}let[c1,D1]=B(z,V,M,v1);if(W(z,M)&&F(D1,z,M),t1(c1),c1.state!=="loading"&&(a1(V,L(D1),c1),S(z,V,new Set(D1.keys()),M),O(z,c1,M)),c1.state==="hasError")throw c1.contents;return c1.state==="hasValue"?{__value:c1.contents,__key:a}:c1.contents}).catch(x=>{if(!o())return q(z,M),R4;let $=b4(x);throw o1(x),a1(V,L(Z),b4(x)),S(z,V,new Set(Z.keys()),M),O(z,$,M),x})}function O(z,m,V){W(z,V)&&(A(m,z),p(m,V))}function S(z,m,V,Z){var M,x,$,e1;if(W(z,Z)||m.version===((M=z.getState())===null||M===void 0||(x=M.currentTree)===null||x===void 0?void 0:x.version)||m.version===(($=z.getState())===null||$===void 0||(e1=$.nextTree)===null||e1===void 0?void 0:e1.version)){var v1,p1,n1;Fh(new Map([[a,V]]),z,(v1=(p1=z.getState())===null||p1===void 0||(n1=p1.nextTree)===null||n1===void 0?void 0:n1.version)!==null&&v1!==void 0?v1:z.getState().currentTree.version)}}function d(z,m,V,Z,M){V.add(Z),S(z,m,V,M)}function B(z,m,V,Z=!1){let M=Ph(a),x,$=!1,e1,v1=new Map,p1=new Set;S(z,m,p1,V);function n1(R1){let{key:E1}=R1;d(z,m,p1,E1,V);let Z1=Z?a9(z,m,E1):R(z,m,E1);if(t1(Z1),v1.set(E1,Z1),Z1.state==="hasValue")return Z1.contents;throw Z1.contents}let c1=!1,D1=R1=>(...E1)=>{if(!c1)throw new Error("getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can obtain the current Recoil state without a subscription.");let Z1=_h(z),s2=R1({snapshot:Z1});if(typeof s2!="function")throw new Error("getCallback() expects a function that returns a function.");return s2(...E1)};try{x=c({get:n1,getCallback:D1}),x=Rh(x)?n1(x):x,c1=!0,O1(x)?x=w(z,x,m,v1,V).finally(M):M()}catch(R1){x=R1,O1(x)?x=T(z,x,m,v1,V).finally(M):($=!0,M())}return $?e1=b4(x):O1(x)?e1=Bh(x):e1=x5(x),t1(e1),[e1,v1]}function I(z,m){let V=new Set,Z=n(z),M=h.get(x=>(typeof x!="string"&&C0(!1),R(z,m,x).contents),{onNodeVisit:x=>{x.type==="branch"&&x.nodeKey!==a&&typeof x.nodeKey=="string"&&V.add(x.nodeKey)}});return M&&S(z,m,V,Z.latestExecutionId),M}function L(z){return Array.from(z.entries()).map(([m,V])=>[m,V.contents])}function b(z,m){let V=kh(),[Z,M]=B(z,m,V);return A(Z,z,M,V,m),E(m,L(M),Z),C(z,Z,V),Z}function U(z,m){let V=I(z,m);if(V!=null)return A(V,z),V;let Z=Y(m);if(Z){let M=Z;return C(z,x1(M.latestLoadable),x1(M.latestExecutionId)),x1(M.latestLoadable)}return b(z,m)}function Y(z){var m;let[,V]=(m=Array.from(v.entries()).find(([Z,M])=>M.latestLoadable!=null&&M.latestExecutionId!=null&&!_(Z,z)))!==null&&m!==void 0?m:[];return V}let P=new Map;function _(z,m){var V,Z;let M=n(z),x=(V=M.depValuesDiscoveredSoFarDuringAsyncWork)!==null&&V!==void 0?V:new Map,$=Array(((Z=P.get(m.version))!==null&&Z!==void 0?Z:new Map).entries()),e1=P.has(m.version)&&$.length===x.size&&$.every(([v1,p1])=>x.get(v1)===p1);return x==null||m.version===M.stateVersion||e1?!1:(P.set(m.version,new Map(x)),Array.from(x).some(([v1,p1])=>R(z,m,v1).contents!==p1.contents))}function A(z,m,V,Z,M){let x=n(m);z.state==="loading"?(x.depValuesDiscoveredSoFarDuringAsyncWork=V,x.latestExecutionId=Z,x.latestLoadable=z,x.stateVersion=M==null?void 0:M.version):(x.depValuesDiscoveredSoFarDuringAsyncWork=null,x.latestExecutionId=null,x.latestLoadable=null,x.stateVersion=null)}function E(z,m,V){V.state!=="loading"&&a1(z,m,V)}function F(z,m,V){let Z=n(m);W(m,V)&&(Z.depValuesDiscoveredSoFarDuringAsyncWork=z)}function q(z,m){W(z,m)&&v.delete(z)}function W(z,m){let V=n(z);return m===V.latestExecutionId}function t1(z){z.state!=="loading"&&o1(z.contents)}function o1(z){}function a1(z,m,V){z.atomValues.set(a,V),h.set(m,V)}function u1(z){if(I4.includes(a)){let m=`Recoil selector has circular dependencies: ${I4.slice(I4.indexOf(a)).join(" \u2192 ")}`;return b4(new Error(m))}I4.push(a);try{return z()}finally{I4.pop()}}function K(z,m){return h.get(Z=>{typeof Z!="string"&&C0(!1);let M=Ah(z,m,Z);return M==null?void 0:M.contents})}function g1(z,m){return u1(()=>U(z,m))}function l1(z){z.atomValues.delete(a)}return e!=null?c9({key:a,nodeType:"selector",peek:K,get:g1,set:(m,V,Z)=>{let M=!1,x=new Map;function $({key:n1}){if(M)throw new Error("Recoil: Async selector sets are not currently supported.");let c1=R(m,V,n1);if(t1(c1),c1.state==="hasValue")return c1.contents;throw c1.state==="loading"?new Oh(n1):c1.contents}function e1(n1,c1){if(M)throw new Error("Recoil: Async selector sets are not currently supported.");let D1=typeof c1=="function"?c1($(n1)):c1;Sh(m,V,n1.key,D1).forEach((E1,Z1)=>x.set(Z1,E1))}function v1(n1){e1(n1,yh)}let p1=e({set:e1,get:$,reset:v1},Z);if(p1!==void 0)throw O1(p1)?new Error("Recoil: Async selector sets are not currently supported."):new Error("Recoil: selector set should be a void function.");return M=!0,x},init:u,invalidate:l1,shouldDeleteConfigOnRelease:H,dangerouslyAllowMutability:t.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l}):c9({key:a,nodeType:"selector",peek:K,get:g1,init:u,invalidate:l1,shouldDeleteConfigOnRelease:H,dangerouslyAllowMutability:t.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}var y0=Eh,{loadableWithError:r9,loadableWithPromise:e9,loadableWithValue:T4}=L4,{DEFAULT_VALUE:b2,DefaultValue:Y2,getConfigDeletionHandler:h9,registerNode:Nh,setConfigDeletionHandler:Uh}=J1,{isRecoilValue:Wh}=O2,{markRecoilValueModified:Gh,setRecoilValue:l9,setRecoilValueLoadable:qh}=R2,{retainedByOptionWithDefault:$h}=A4;function jh(t){let{key:a,persistence_UNSTABLE:c}=t,r=$h(t.retainedBy_UNSTABLE),e=0,h=O1(t.default)?e9(t.default.then(w=>(h=T4(w),{__key:a,__value:w})).catch(w=>{throw h=r9(w),w})):T4(t.default),l,v=new Map;function i(w,T){let O=T.then(S=>{var d,B;return((B=((d=w.getState().nextTree)!==null&&d!==void 0?d:w.getState().currentTree).atomValues.get(a))===null||B===void 0?void 0:B.contents)===O&&l9(w,R,S),{__key:a,__value:S}}).catch(S=>{var d,B;throw((B=((d=w.getState().nextTree)!==null&&d!==void 0?d:w.getState().currentTree).atomValues.get(a))===null||B===void 0?void 0:B.contents)===O&&qh(w,R,r9(S)),S});return O}function o(w,T,O){e++;let S=w.getState().knownAtoms.has(a);if(w.getState().knownAtoms.add(a),h.state==="loading"){let U=()=>{var Y;((Y=w.getState().nextTree)!==null&&Y!==void 0?Y:w.getState().currentTree).atomValues.has(a)||Gh(w,R)};h.contents.then(U).catch(U)}let d=b2,B=null;if(t.effects_UNSTABLE!=null&&!S){let U=!0,Y=A=>E=>{if(U){let F=d instanceof Y2||O1(d)?h.state==="hasValue"?h.contents:b2:d;d=typeof E=="function"?E(F):E,O1(d)&&(d=d.then(q=>(B={effect:A,value:q},q)))}else{if(O1(E))throw new Error("Setting atoms to async values is not implemented.");typeof E!="function"&&(B={effect:A,value:E}),l9(w,R,typeof E=="function"?F=>{let q=E(F);return B={effect:A,value:q},q}:E)}},P=A=>()=>Y(A)(b2),_=A=>E=>{w.subscribeToTransactions(F=>{var q;let{currentTree:W,previousTree:t1}=F.getState();t1||(v2("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),t1=W);let o1=(q=W.atomValues.get(a))!==null&&q!==void 0?q:h;if(o1.state==="hasValue"){var a1,u1,K,g1;let l1=o1.contents,z=(a1=t1.atomValues.get(a))!==null&&a1!==void 0?a1:h,m=z.state==="hasValue"?z.contents:b2;((u1=B)===null||u1===void 0?void 0:u1.effect)!==A||((K=B)===null||K===void 0?void 0:K.value)!==l1?E(l1,m):((g1=B)===null||g1===void 0?void 0:g1.effect)===A&&(B=null)}},a)};for(let A of(I=t.effects_UNSTABLE)!==null&&I!==void 0?I:[]){var I;let E=A({node:R,trigger:O,setSelf:Y(A),resetSelf:P(A),onSet:_(A)});if(E!=null){var L;v.set(w,[...(L=v.get(w))!==null&&L!==void 0?L:[],E])}}U=!1}if(!(d instanceof Y2)){var b;let U=O1(d)?e9(i(w,d)):T4(d);T.atomValues.set(a,U),(b=w.getState().nextTree)===null||b===void 0||b.atomValues.set(a,U)}return()=>{var U;e--,(U=v.get(w))===null||U===void 0||U.forEach(Y=>Y()),v.delete(w),w.getState().knownAtoms.delete(a)}}function n(w,T){var O,S,d;return(O=(S=T.atomValues.get(a))!==null&&S!==void 0?S:(d=l)===null||d===void 0?void 0:d[1])!==null&&O!==void 0?O:h}function u(w,T){if(T.atomValues.has(a))return x1(T.atomValues.get(a));if(T.nonvalidatedAtoms.has(a)){if(l!=null)return l;if(c==null)return U3(`Tried to restore a persisted value for atom ${a} but it has no persistence settings.`),h;let O=T.nonvalidatedAtoms.get(a),S=c.validator(O,b2);return l=S instanceof Y2?h:T4(S),l}else return h}function H(){l=void 0}function C(w,T,O){if(T.atomValues.has(a)){let S=x1(T.atomValues.get(a));if(S.state==="hasValue"&&O===S.contents)return new Map}else if(!T.nonvalidatedAtoms.has(a)&&O instanceof Y2)return new Map;return l=void 0,new Map().set(a,T4(O))}function p(){return h9(a)!==void 0&&e<=0}let R=Nh({key:a,nodeType:"atom",peek:n,get:u,set:C,init:o,invalidate:H,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:t.dangerouslyAllowMutability,persistence_UNSTABLE:t.persistence_UNSTABLE?{type:t.persistence_UNSTABLE.type,backButton:t.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return R}function v9(t){let{default:a,...c}=t;return Wh(a)?Kh({...c,default:a}):jh({...c,default:a})}function Kh(t){let a=v9({...t,default:b2,persistence_UNSTABLE:t.persistence_UNSTABLE===void 0?void 0:{...t.persistence_UNSTABLE,validator:r=>r instanceof Y2?r:x1(t.persistence_UNSTABLE).validator(r,b2)},effects_UNSTABLE:t.effects_UNSTABLE}),c=y0({key:`${t.key}__withFallback`,get:({get:r})=>{let e=r(a);return e instanceof Y2?t.default:e},set:({set:r},e)=>r(a,e),dangerouslyAllowMutability:t.dangerouslyAllowMutability});return Uh(c.key,h9(t.key)),c}var n9=v9,i9=class{constructor(a){var c;s1(this,"_map",void 0),s1(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(c=a==null?void 0:a.mapKey)!==null&&c!==void 0?c:r=>r}size(){return this._map.size}has(a){return this._map.has(this._keyMapper(a))}get(a){return this._map.get(this._keyMapper(a))}set(a,c){this._map.set(this._keyMapper(a),c)}delete(a){this._map.delete(this._keyMapper(a))}clear(){this._map.clear()}},Yh={MapCache:i9},Qh=Yh.MapCache,Jh=Object.freeze({__proto__:null,MapCache:Qh}),{LRUCache:o9}=X7,{MapCache:Xh}=Jh,O0={equality:"reference",eviction:"none",maxSize:1/0};function tl({equality:t=O0.equality,eviction:a=O0.eviction,maxSize:c=O0.maxSize}=O0){let r=al(t);return cl(a,c,r)}function al(t){switch(t){case"reference":return a=>a;case"value":return a=>A0(a)}throw new Error(`Unrecognized equality policy ${t}`)}function cl(t,a,c){switch(t){case"keep-all":return new Xh({mapKey:c});case"lru":return new o9({mapKey:c,maxSize:x1(a)});case"most-recent":return new o9({mapKey:c,maxSize:1})}throw new Error(`Unrecognized eviction policy ${t}`)}var g9=tl,{setConfigDeletionHandler:rl}=J1;function el(t){var a,c;let r=g9({equality:(a=(c=t.cachePolicyForParams_UNSTABLE)===null||c===void 0?void 0:c.equality)!==null&&a!==void 0?a:"value",eviction:"keep-all"});return e=>{var h;let l=r.get(e);if(l!=null)return l;let{cachePolicyForParams_UNSTABLE:v,...i}=t,o=n9({...i,key:`${t.key}__${(h=A0(e))!==null&&h!==void 0?h:"void"}`,default:typeof t.default=="function"?t.default(e):t.default,retainedBy_UNSTABLE:typeof t.retainedBy_UNSTABLE=="function"?t.retainedBy_UNSTABLE(e):t.retainedBy_UNSTABLE,effects_UNSTABLE:typeof t.effects_UNSTABLE=="function"?t.effects_UNSTABLE(e):t.effects_UNSTABLE});return r.set(e,o),rl(o.key,()=>{r.delete(e)}),o}}var hl=el,{setConfigDeletionHandler:ll}=J1,vl=0;function nl(t){var a,c;let r=g9({equality:(a=(c=t.cachePolicyForParams_UNSTABLE)===null||c===void 0?void 0:c.equality)!==null&&a!==void 0?a:"value",eviction:"keep-all"});return e=>{var h;let l=r.get(e);if(l!=null)return l;let v=`${t.key}__selectorFamily/${(h=A0(e,{allowFunctions:!0}))!==null&&h!==void 0?h:"void"}/${vl++}`,i=H=>t.get(e)(H),o=t.cachePolicy_UNSTABLE,n=typeof t.retainedBy_UNSTABLE=="function"?t.retainedBy_UNSTABLE(e):t.retainedBy_UNSTABLE,u;if(t.set!=null){let H=t.set;u=y0({key:v,get:i,set:(p,R)=>H(e)(p,R),cachePolicy_UNSTABLE:o,dangerouslyAllowMutability:t.dangerouslyAllowMutability,retainedBy_UNSTABLE:n})}else u=y0({key:v,get:i,cachePolicy_UNSTABLE:o,dangerouslyAllowMutability:t.dangerouslyAllowMutability,retainedBy_UNSTABLE:n});return r.set(e,u),ll(u.key,()=>{r.delete(e)}),u}}var f2=nl,il=f2({key:"__constant",get:t=>()=>t,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function ol(t){return il(t)}var gl=ol,dl=f2({key:"__error",get:t=>()=>{throw new Error(t)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function zl(t){return dl(t)}var sl=zl;function ul(t){return t}var pl=ul,{loadableWithError:d9,loadableWithPromise:z9,loadableWithValue:s9}=L4;function Z0(t,a){let c=Array(a.length).fill(void 0),r=Array(a.length).fill(void 0);for(let[e,h]of a.entries())try{c[e]=t(h)}catch(l){r[e]=l}return[c,r]}function Ml(t){return t!=null&&!O1(t)}function R0(t){return Array.isArray(t)?t:Object.getOwnPropertyNames(t).map(a=>t[a])}function V5(t){return t!=null&&typeof t=="object"&&t.hasOwnProperty("__value")?t.__value:t}function m5(t,a){return Array.isArray(t)?a:Object.getOwnPropertyNames(t).reduce((c,r,e)=>({...c,[r]:a[e]}),{})}function Q2(t,a,c){let r=c.map((e,h)=>e==null?s9(a[h]):O1(e)?z9(e):d9(e));return m5(t,r)}function Hl(t,a){return a.map((c,r)=>c===void 0?t[r]:c)}var fl=f2({key:"__waitForNone",get:t=>({get:a})=>{let c=R0(t),[r,e]=Z0(a,c);return Q2(t,r,e)},dangerouslyAllowMutability:!0}),xl=f2({key:"__waitForAny",get:t=>({get:a})=>{let c=R0(t),[r,e]=Z0(a,c);return e.some(h=>!O1(h))?Q2(t,r,e):new Promise(h=>{for(let[l,v]of e.entries())O1(v)&&v.then(i=>{r[l]=V5(i),e[l]=void 0,h(Q2(t,r,e))}).catch(i=>{e[l]=i,h(Q2(t,r,e))})})},dangerouslyAllowMutability:!0}),Vl=f2({key:"__waitForAll",get:t=>({get:a})=>{let c=R0(t),[r,e]=Z0(a,c);if(e.every(l=>l==null))return m5(t,r);let h=e.find(Ml);if(h!=null)throw h;return Promise.all(e).then(l=>m5(t,Hl(r,l).map(V5)))},dangerouslyAllowMutability:!0}),ml=f2({key:"__waitForAllSettled",get:t=>({get:a})=>{let c=R0(t),[r,e]=Z0(a,c);return e.every(h=>!O1(h))?Q2(t,r,e):Promise.all(e.map((h,l)=>O1(h)?h.then(v=>{r[l]=V5(v),e[l]=void 0}).catch(v=>{r[l]=void 0,e[l]=v}):null)).then(()=>Q2(t,r,e))},dangerouslyAllowMutability:!0}),Cl=f2({key:"__noWait",get:t=>({get:a})=>{try{return s9(a(t))}catch(c){return O1(c)?z9(c):d9(c)}},dangerouslyAllowMutability:!0}),Ll={waitForNone:fl,waitForAny:xl,waitForAll:Vl,waitForAllSettled:ml,noWait:Cl},{batchUpdates:wl,setBatcher:Bl}=a5,{DefaultValue:Al}=J1,{RecoilRoot:Sl}=m0,{isRecoilValue:Fl}=O2,{retentionZone:yl}=d0,{freshSnapshot:Ol}=V0,{useGotoRecoilSnapshot:Zl,useRecoilCallback:Rl,useRecoilSnapshot:bl,useRecoilState:Il,useRecoilStateLoadable:Tl,useRecoilTransaction:_l,useRecoilTransactionObserver:Pl,useRecoilValue:kl,useRecoilValueLoadable:Dl,useResetRecoilState:El,useRetain:Nl,useSetRecoilState:Ul,useSetUnvalidatedAtomValues:Wl,useTransactionObservation_DEPRECATED:Gl}=Xe,{noWait:ql,waitForAll:$l,waitForAllSettled:jl,waitForAny:Kl,waitForNone:Yl}=Ll,z1={DefaultValue:Al,RecoilRoot:Sl,useRecoilBridgeAcrossReactRoots_UNSTABLE:nh,atom:n9,selector:y0,retentionZone:yl,atomFamily:hl,selectorFamily:f2,constSelector:gl,errorSelector:sl,readOnlySelector:pl,useRecoilValue:kl,useRecoilValueLoadable:Dl,useRecoilState:Il,useRecoilStateLoadable:Tl,useSetRecoilState:Ul,useResetRecoilState:El,useGetRecoilValueInfo_UNSTABLE:rh,useRetain:Nl,useRecoilCallback:Rl,useRecoilTransaction_UNSTABLE:_l,useGotoRecoilSnapshot:Zl,useRecoilSnapshot:bl,useRecoilTransactionObserver_UNSTABLE:Pl,useTransactionObservation_UNSTABLE:Gl,useSetUnvalidatedAtomValues_UNSTABLE:Wl,noWait:ql,waitForNone:Yl,waitForAny:Kl,waitForAll:$l,waitForAllSettled:jl,isRecoilValue:Fl,batchUpdates:wl,setBatcher:Bl,snapshot_UNSTABLE:Ol},od=z1.DefaultValue,u9=z1.RecoilRoot,gd=z1.useRecoilBridgeAcrossReactRoots_UNSTABLE,j1=z1.atom,dd=z1.selector,zd=z1.retentionZone,sd=z1.atomFamily,ud=z1.selectorFamily,pd=z1.constSelector,Md=z1.errorSelector,Hd=z1.readOnlySelector,fd=z1.useRecoilValue,xd=z1.useRecoilValueLoadable,h1=z1.useRecoilState,Vd=z1.useRecoilStateLoadable,md=z1.useSetRecoilState,Cd=z1.useResetRecoilState,Ld=z1.useGetRecoilValueInfo_UNSTABLE,wd=z1.useRetain,Bd=z1.useRecoilCallback,Ad=z1.useRecoilTransaction_UNSTABLE,Sd=z1.useGotoRecoilSnapshot,Fd=z1.useRecoilSnapshot,yd=z1.useRecoilTransactionObserver_UNSTABLE,Od=z1.useTransactionObservation_UNSTABLE,Zd=z1.useSetUnvalidatedAtomValues_UNSTABLE,Rd=z1.noWait,bd=z1.waitForNone,Id=z1.waitForAny,Td=z1.waitForAll,_d=z1.waitForAllSettled,Pd=z1.isRecoilValue,kd=z1.batchUpdates,Dd=z1.setBatcher,Ed=z1.snapshot_UNSTABLE;var J2=j1({key:"fileTreeViewState",default:"folder"}),n2=j1({key:"fileTreeActiveFolderPathState",default:""}),b0=j1({key:"fileTreeActiveFile",default:null,dangerouslyAllowMutability:!0}),X2=j1({key:"fileTreeExcludedFoldersState",default:[]}),I0=j1({key:"fileTreeExcludedExtensions",default:[]}),x2=j1({key:"fileTreeFolderFileCountMapState",default:{}}),T0=j1({key:"fileTreeFolderTreeState",default:null,dangerouslyAllowMutability:!0}),_0=j1({key:"fileTreeFileListState",default:[],dangerouslyAllowMutability:!0}),_4=j1({key:"fileTreePinnedFilesState",default:[],dangerouslyAllowMutability:!0}),V2=j1({key:"fileTreeOpenFoldersState",default:[]}),P0=j1({key:"showSubFoldersInVault",default:!1}),m2=j1({key:"fileTreeFocusedFolder",default:null,dangerouslyAllowMutability:!0});function I2(){let[t,a]=w1(0);return()=>a(c=>c+1)}function p9(t){return t&&"screenX"in t}function P4(t=c=>{},a=300){let[c,r]=w1(!1),[e,h]=w1(null),[l,v]=w1(null);m1(()=>{let u;return c&&l?u=setTimeout(()=>{t(e),n(e)},a):clearTimeout(u),()=>{clearTimeout(u)}},[t,a,c,l]);let i=_1(u=>{r(!0),v(u.touches[0].clientY),h(u)},[]),o=_1(u=>{l&&Math.abs(u.touches[0].clientY-l)>=.5&&n(u)},[l]),n=_1(u=>{r(!1),h(null)},[]);return{onTouchStart:i,onTouchMove:o,onTouchEnd:n}}function k4(t){let a=f.useRef(null),c=t.plugin,[r,e]=h1(J2),[h,l]=h1(_0),[v]=h1(_4),[i,o]=h1(n2),[n]=h1(I0),[u]=h1(X2),[H,C]=h1(P0),[p,R]=h1(m2),[w,T]=w1(!1),[O,S]=w1(""),[d,B]=w1(!1),[I,L]=w1(l0(i,c.app)),b=I2();m1(()=>L(l0(i,c.app)),[i]),m1(()=>{l(F2(i,c))},[H]),m1(()=>{d&&a.current.focus()},[d]);let U=l1=>{l1.map(z=>L1(this,null,function*(){z.arrayBuffer().then(m=>{c.app.vault.adapter.writeBinary(i+"/"+z.name,m)})}))},Y=l1=>{let z;return n.length>0&&(z=l1.filter(m=>!n.contains(m.extension))),u.length>0&&(z=z.filter(m=>{for(let V of u)if(m.path.startsWith(V))return!1;return!0})),c.settings.folderNote&&(z=z.filter(m=>m.basename!==m.parent.name)),z=z.sort((m,V)=>{if(v.contains(m)&&!v.contains(V))return-1;if(!v.contains(m)&&v.contains(V))return 1;if(c.settings.sortReverse&&([m,V]=[V,m]),c.settings.sortFilesBy==="name")return c.settings.showFileNameAsFullPath?m.path.localeCompare(V.path,"en",{numeric:!0}):m.name.localeCompare(V.name,"en",{numeric:!0});if(c.settings.sortFilesBy==="last-update")return V.stat.mtime-m.stat.mtime;if(c.settings.sortFilesBy==="created")return V.stat.ctime-m.stat.ctime;if(c.settings.sortFilesBy==="file-size")return V.stat.size-m.stat.size}),z},P=k1(()=>Y(h),[u,n,v,h,c.settings.sortFilesBy,c.settings.sortReverse]),_=l1=>{e("folder"),o("")},A=()=>{S(""),B(!d),l(F2(i,c))},E=new RegExp("all:(.*)?"),F=new RegExp("tag:(.*)?"),q=l1=>{var z=l1.target.value;S(z);var m=i;let V=z.match(F);if(V){if(L("Files with Tag"),V[1]===void 0||V[1].replace(/\s/g,"").length===0){l([]);return}l([...o1(V[1])]);return}let Z=z.match(E);Z?(z=Z[1]?Z[1]:"",m=c.settings.allSearchOnlyInFocusedFolder?p.path:"/",L("All Files")):L(l0(i,c.app));let x=W(z,m,!!Z);l(x)},W=(l1,z,m)=>{var V=F2(z,c,m),Z=V.filter(M=>M.name.toLowerCase().includes(l1.toLowerCase().trimStart()));return Z},t1=l1=>{let z=c.app.metadataCache.getFileCache(l1),m=[];if(z.tags)for(let V of z.tags)m.push(V.tag);if(z.frontmatter&&z.frontmatter.tags){let V=z.frontmatter.tags;if(typeof V=="string"){let Z=V.split(",");for(let M=0;M<Z.length;M++)m.push(Z[M])}else if(Array.isArray(V))for(let Z=0;Z<V.length;Z++)m.push(V[Z])}return m},o1=l1=>{let z=new Set,m=F2(c.settings.allSearchOnlyInFocusedFolder?p.path:"/",c,!0);for(let V of m){let Z=t1(V);for(let M of Z)M.toLowerCase().contains(l1.toLowerCase().trimStart())&&(z.has(V)||z.add(V))}return z},a1=()=>L1(this,null,function*(){c.settings.showFilesFromSubFolders=!H,yield c.saveSettings(),C(!H)}),u1=()=>{let l1=new CustomEvent(y1.revealFile,{detail:{file:c.app.workspace.getActiveFile()}});window.dispatchEvent(l1)},K=l1=>{let z=new C5.Menu(c.app),m=Z=>{c.settings.sortFilesBy=Z,c.saveSettings(),b()},V=(Z,M,x,$)=>{z.addItem(e1=>{let v1=c.settings.sortReverse?`${x} to ${M}`:`${M} to ${x}`;e1.setTitle(`${Z} (${v1})`),e1.setIcon($===c.settings.sortFilesBy?"checkmark":"spaceIcon"),e1.onClick(()=>m($))})};V("File Name","A","Z","name"),V("Created","New","Old","created"),V("File Size","Big","Small","file-size"),V("Last Update","New","Old","last-update"),z.addSeparator(),z.addItem(Z=>{Z.setTitle("Reverse Order"),Z.setIcon(c.settings.sortReverse?"checkmark":"spaceIcon"),Z.onClick(()=>{c.settings.sortReverse=!c.settings.sortReverse,c.saveSettings(),b()})}),z.showAtPosition({x:l1.pageX,y:l1.pageY})},g1=19;return f.createElement(f.Fragment,null,f.createElement(c0,{onDrop:U,noClick:!0,onDragEnter:()=>T(!0),onDragLeave:()=>T(!1),onDropAccepted:()=>T(!1),onDropRejected:()=>T(!1)},({getRootProps:l1,getInputProps:z})=>f.createElement("div",p2(q1({},l1()),{className:w?"drag-entered":"",style:{width:"100%",height:"100%",position:"relative"}}),f.createElement("input",q1({},z())),f.createElement("div",{className:"oz-explorer-container"},f.createElement("div",{className:`oz-file-tree-header-wrapper${c.settings.fixedHeaderInFileList?" file-tree-header-fixed":""}`},f.createElement("div",{className:"oz-flex-container"},f.createElement("div",{className:"oz-nav-action-button",style:{marginLeft:"0px"}},["Horizontal","Vertical"].includes(c.settings.evernoteView)?f.createElement(w3,{onClick:m=>_(m),size:g1,"aria-label":"Close File Pane"}):f.createElement(L3,{onClick:m=>_(m),size:g1,"aria-label":"Go Back to Folder View"})),f.createElement("div",{className:"oz-nav-buttons-right-block"},c.settings.revealActiveFileButton&&f.createElement("div",{className:"oz-nav-action-button"},f.createElement(s3,{onClick:u1,size:g1,"aria-label":"Reveal Active File"})),c.settings.showFilesFromSubFoldersButton&&f.createElement("div",{className:"oz-nav-action-button"},H?f.createElement(B3,{onClick:a1,size:g1,"aria-label":"Hide Files from Sub-Folders"}):f.createElement(A3,{onClick:a1,size:g1,"aria-label":"Show Files from Sub-Folders"})),c.settings.searchFunction&&f.createElement("div",{className:"oz-nav-action-button"},f.createElement(S3,{onClick:A,size:g1,"aria-label":"Search File by Name or Tag"})),f.createElement("div",{className:"oz-nav-action-button"},f.createElement(f4,{size:g1+2,onClick:K,"aria-label":"Sorting Options"})),f.createElement("div",{className:"oz-nav-action-button"},f.createElement(C3,{onClick:m=>q2(m,i,c),size:g1,"aria-label":"Create a Note"})))),d&&f.createElement("div",{className:"oz-input-container"},f.createElement("input",{type:"search",placeholder:"Search...",ref:a,value:O,onChange:q,onKeyDown:m=>{m.key==="Escape"&&(m.preventDefault(),A())}})),f.createElement("div",{className:"oz-file-tree-header"},I)),f.createElement("div",{className:`oz-file-tree-files${c.settings.fixedHeaderInFileList?d?" file-tree-files-fixed-with-search":" file-tree-files-fixed":""}`},P.map(m=>f.createElement(Ql,{file:m,plugin:c,key:m.path})))))))}var Ql=t=>{let{file:a,plugin:c}=t,[r,e]=h1(_4),[h,l]=h1(b0),[v,i]=w1(!1),o=P4(d=>{u(a,d)},500);m1(()=>{if(v&&c.settings.filePreviewOnHover)return document.addEventListener("keydown",H),()=>{document.removeEventListener("keydown",H)}},[v]);let n=(d,B)=>{V4({file:d,app:c.app,newLeaf:(B.ctrlKey||B.metaKey)&&!(B.shiftKey||B.altKey),leafBySplit:(B.ctrlKey||B.metaKey)&&(B.shiftKey||B.altKey)}),l(d)},u=(d,B)=>{let I=new C5.Menu(c.app);return I.addItem(L=>{L.setIcon("pin"),r.contains(d)?L.setTitle("Unpin"):L.setTitle("Pin to Top"),L.onClick(b=>{if(r.contains(d)){let U=r.filter(Y=>Y!==d);e(U)}else e([...r,d])})}),I.addItem(L=>{L.setTitle("Rename"),L.setIcon("pencil"),L.onClick(b=>{new l2(c,d,"rename").open()})}),I.addItem(L=>{L.setTitle("Delete"),L.setIcon("trash"),L.onClick(b=>{new m4(c,`Are you sure you want to delete the file "${d.basename}${d.extension==="md"?"":d.extension}"?`,function(){let Y=c.settings.deleteFileOption;Y==="permanent"?c.app.vault.delete(d,!0):Y==="system-trash"?c.app.vault.trash(d,!0):Y==="trash"&&c.app.vault.trash(d,!1)}).open()})}),I.addItem(L=>{L.setIcon("go-to-file"),L.setTitle("Open in a new tab"),L.onClick(b=>{I3(c.app,d)})}),I.addItem(L=>{L.setIcon("go-to-file"),L.setTitle("Open to right"),L.onClick(b=>{W8(c.app,d)})}),I.addItem(L=>{L.setTitle("Make a copy"),L.setIcon("documents"),L.onClick(b=>{c.app.vault.copy(d,`${d.parent.path}/${d.basename} 1.${d.extension}`)})}),v0("file-explorer",c.app)||I.addItem(L=>{L.setTitle("Move file to..."),L.setIcon("paper-plane"),L.onClick(b=>{new C4(c.app,d).open()})}),c.app.workspace.trigger("file-menu",I,d,"file-explorer"),p9(B)?I.showAtPosition({x:B.pageX,y:B.pageY}):I.showAtPosition({x:B.nativeEvent.locationX,y:B.nativeEvent.locationY}),!1},H=d=>{if(d.key==="Control"||d.key==="Meta"){let B=document.querySelector(`.oz-nav-file-title[data-path="${a.path}"]`);B&&c.app.workspace.trigger("link-hover",{},B,a.path,a.path)}},C=(d,B)=>{i(!0),c.settings.filePreviewOnHover&&(d.ctrlKey||d.metaKey)&&c.app.workspace.trigger("link-hover",{},d.target,B.path,B.path)},p=(d,B)=>{i(!1)},R=(d,B)=>{d.dataTransfer.setData("application/json",JSON.stringify({filePath:B.path})),c.app.dragManager.onDragStart(d,{icon:D4,source:void 0,title:B.name,type:"file",file:B}),c.app.dragManager.dragFile(d,B,!0)},w=d=>{d.button===1&&I3(c.app,a)},T=()=>a.extension==="pdf"?V3:["png","jpg","jpeg","svg"].contains(a.extension)?x3:["doc","docx"].contains(a.extension)?m3:u3,O=k1(()=>T(),[c.settings.iconBeforeFileName]),S=k1(()=>{let d=c.settings.showFileNameAsFullPath?a.path:a.name;return h0(d).fileName},[c.settings.showFileNameAsFullPath,a.path]);return f.createElement("div",q1({className:"oz-nav-file"+(h===a?" is-active":""),key:a.path,draggable:!0,onDragStart:d=>R(d,a),onClick:d=>n(a,d),onAuxClick:w,onContextMenu:d=>u(a,d),onMouseEnter:d=>C(d,a),onMouseLeave:d=>p(d,a)},o),f.createElement("div",{className:"oz-nav-file-title","data-path":a.path},f.createElement("div",{className:"oz-nav-file-title-content"},c.settings.iconBeforeFileName&&f.createElement(O,{className:"oz-nav-file-icon",size:15}),S),r.contains(a)&&f.createElement(f3,{className:"oz-nav-file-tag",size:14}),h0(a.name).extension!=="md"&&f.createElement("span",{className:"oz-nav-file-tag"},h0(a.name).extension)))};var k0=U1(require("obsidian"));function t4(t){let[a,c]=h1(V2),[r]=h1(x2),[e]=h1(n2),h=P4(S=>{t.onContextMenu(S)},500),[l,v]=w1(t.open),[i,o]=w1(!1),n=t.folder.path===e;m1(()=>v(t.open),[t.open]);let u=()=>{if(t.children){if(!l)c([...a,t.folder.path]);else{let S=a.filter(d=>t.folder.path!==d);c(S)}v(!l)}},H=S=>{S.map(d=>L1(this,null,function*(){d.arrayBuffer().then(B=>{t.plugin.app.vault.adapter.writeBinary(t.folder.path+"/"+d.name,B)})}))},C=S=>{if(t.plugin.settings.folderNote&&S.shiftKey){let d=`${t.folder.path}/${t.folder.name}.md`,B=t.plugin.app.vault.getAbstractFileByPath(d);t.plugin.app.workspace.openLinkText(d,"/",!1)}else t.onClick()},p=()=>t.onContextMenu(),R=k1(()=>k8(t.plugin,t.children,l),[l,t.children]),w=r[t.folder.path],T=S=>{let d=S.dataTransfer.getData("application/json");if(d!==""){let B=JSON.parse(d);if(B.filePath){let I=B.filePath,L=t.plugin.app.vault.getAbstractFileByPath(I);L?t.plugin.app.vault.rename(L,`${t.folder.path}/${L.name}`):new k0.Notice("Couldnt find the file")}else if(B.folderPath){let I=B.folderPath,L=t.plugin.app.vault.getAbstractFileByPath(I);L?t.folder.path.startsWith(L.path)?new k0.Notice("You cant move folder under its child"):t.plugin.app.vault.rename(L,`${t.folder.path}/${L.name}`):new k0.Notice("Couldnt find the folder")}}o(!1),S.dataTransfer.clearData()},O=(S,d)=>{S.dataTransfer.setData("application/json",JSON.stringify({folderPath:d.path}))};return f.createElement(c0,{onDrop:H,noClick:!0,onDragEnter:()=>o(!0),onDragLeave:()=>o(!1),onDropAccepted:()=>o(!1),onDropRejected:()=>o(!1)},({getRootProps:S,getInputProps:d})=>f.createElement(f.Fragment,null,f.createElement("div",{style:q1({},t.style),className:"treeview",draggable:!0,onDragStart:B=>O(B,t.folder),onDrop:B=>T(B),onDragOver:()=>o(!0),onDragLeave:()=>o(!1)},f.createElement("div",p2(q1({},S({className:"dropzone"})),{className:"oz-folder-element"+(i?" drag-entered":""),"data-path":t.folder.path}),f.createElement("input",q1({},d())),f.createElement("div",{className:"oz-folder-line"},f.createElement("div",{className:"oz-icon-div"},f.createElement(R,{className:"oz-folder-toggle",style:{opacity:t.children?1:.3},onClick:u})),f.createElement("div",q1({className:"oz-folder-block",onClick:C,onContextMenu:p},h),f.createElement("div",{className:"oz-folder-type",style:{marginRight:t.type?10:0}},t.type),f.createElement("div",{className:`oz-folder-name ${n?"is-folder-active":""}${t.isRootFolder?" is-root-folder":""}`},t.content," ",t.plugin.settings.folderNote&&t.folder.children.some(B=>B.name===`${t.folder.name}.md`)?f.createElement(F3,{size:10,className:"oz-folder-note-icon"}):""),t.plugin.settings.folderCount&&f.createElement("div",{className:"oz-folder-count"},f.createElement("span",{className:"oz-nav-file-tag"},w?l?w.open:w.closed:0)))))),t.children&&f.createElement("div",{className:"oz-folder-contents",style:{height:l?"auto":0,opacity:l?1:0,display:l?"inherit":"none"}},t.children)))}var Jl=({condition:t,wrapper:a,children:c})=>t?a(c):c,M9=Jl;var D0=U1(require("obsidian"));function L5(t){let a=t.plugin,c=a.app,r=c.vault.getRoot(),[e]=h1(V2),[h,l]=h1(n2),[v,i]=h1(X2),[o,n]=h1(m2),[u]=h1(x2),[H,C]=h1(J2),p=O=>l(O),R=O=>{let S=O;return v.length>0&&(S=S.filter(d=>!v.contains(d.folder.path))),S=S.sort((d,B)=>{if(a.settings.sortFoldersBy==="name")return d.folder.name.localeCompare(B.folder.name,"en",{numeric:!0});if(a.settings.sortFoldersBy==="item-number"){let I=u[d.folder.path]?u[d.folder.path].closed:0;return(u[B.folder.path]?u[B.folder.path].closed:0)-I}}),S},w=O=>{let{event:S,folder:d}=O,B=S;S===void 0&&(B=window.event);let I=new D0.Menu(a.app);U8(d)&&I.addItem(U=>{U.setTitle("Focus on Folder").setIcon("zoomInIcon").onClick(()=>n(d))}),o.isRoot()||I.addItem(U=>{U.setTitle("Focus Back to Root").setIcon("zoomOutIcon").onClick(()=>n(r))}),I.addItem(U=>{U.setTitle("New Folder").setIcon("folder").onClick(Y=>{new l2(a,d,"create folder").open()})}),I.addItem(U=>{U.setTitle("Delete").setIcon("trash").onClick(Y=>{new m4(a,`Are you sure you want to delete folder "${d.name}" and all folders & files under it?`,()=>{let _=a.settings.deleteFileOption;_==="permanent"?a.app.vault.delete(d,!0):_==="system-trash"?a.app.vault.trash(d,!0):_==="trash"&&a.app.vault.trash(d,!1),h===d.path&&(l(""),C("folder"))}).open()})}),I.addItem(U=>{U.setTitle("Rename").setIcon("pencil").onClick(Y=>{new l2(a,d,"rename").open()})}),I.addItem(U=>{U.setTitle("New File").setIcon("document").onClick(Y=>{q2(Y,d.path,a)})}),v0("file-explorer",c)||I.addItem(U=>{U.setTitle("Move folder to...").setIcon("paper-plane").onClick(Y=>{new C4(c,d).open()})}),I.addItem(U=>{U.setTitle("Add to Excluded Folders").setIcon("switch").onClick(Y=>{i([...v,d.path])})});let L=`${d.path}/${d.name}.md`,b=d.children.some(U=>`${d.name}.md`===U.name);return b&&I.addItem(U=>{U.setTitle("Open Folder Note").setIcon("go-to-file").onClick(Y=>{a.app.workspace.activeLeaf.setViewState({type:"markdown",state:{file:L}})})}),q8(a.app,"folder-note-core")||(b?I.addItem(U=>{U.setTitle("Delete Folder Note").setIcon("trash").onClick(Y=>{let P=a.app.vault.getAbstractFileByPath(L);P&&a.app.vault.delete(P,!0)})}):I.addItem(U=>{U.setTitle("Create Folder Note").setIcon("create-new").onClick(Y=>L1(this,null,function*(){n0(a,d,d.name,`# ${d.name}`)}))})),c.workspace.trigger("file-menu",I,d,"file-explorer"),B instanceof MouseEvent?I.showAtPosition({x:B.pageX,y:B.pageY}):I.showAtPosition({x:0,y:0}),!1};if(!t.folderTree.children)return null;let T=k1(()=>R(t.folderTree.children),[t.folderTree.children,v,a.settings.sortFoldersBy]);return f.createElement(f.Fragment,null,Array.isArray(t.folderTree.children)&&T.map(O=>f.createElement(f.Fragment,{key:O.folder.path},O.folder.children.some(S=>S instanceof D0.TFolder)?f.createElement(t4,{plugin:a,content:O.folder.name,open:e.contains(O.folder.path),onClick:()=>p(O.folder.path),onContextMenu:S=>w({event:S,folder:O.folder}),folder:O.folder},f.createElement(L5,{plugin:a,folderTree:O})):f.createElement(t4,{plugin:a,content:O.folder.name,onClick:()=>p(O.folder.path),onContextMenu:S=>w({event:S,folder:O.folder}),folder:O.folder}))))}var w5=U1(require("obsidian"));function E4(t){let a={color:"var(--text-muted)",fill:"#c16ff7",width:"100%"},c=t.plugin,r=c.app,e=r.vault.getRoot(),[h,l]=h1(n2),[v]=h1(T0),[i,o]=h1(m2),[n,u]=h1(V2),[H]=h1(x2),C=I2(),p=d=>{new l2(c,d,"create folder").open()},R=(d,B)=>{let I=d;d===void 0&&(I=window.event);let L=new w5.Menu(r);return L.addItem(b=>{b.setTitle("New Folder").setIcon("folder").onClick(U=>p(B))}),B.isRoot()||L.addItem(b=>{b.setTitle("Focus Back to Root").setIcon("zoomOutDoubleIcon").onClick(()=>o(e))}),B.parent&&!B.parent.isRoot()&&B.parent!==i&&L.addItem(b=>{b.setTitle("Focus to Parent Folder").setIcon("zoomOutIcon").onClick(()=>o(B.parent))}),r.workspace.trigger("root-folder-menu",L,B),L.showAtPosition({x:I.pageX,y:I.pageY}),!1},w=()=>u([]),T=()=>{let d=[];d.push(v.folder.path);let B=I=>{for(let L of I)d.push(L.folder.path),L.children.length>0&&B(L.children)};B(v.children),u(d)},O=d=>{let B=new w5.Menu(c.app),I=L=>{c.settings.sortFoldersBy=L,c.saveSettings(),C()};return B.addItem(L=>{L.setTitle("Folder Name (A to Z)"),L.onClick(b=>{I("name")})}),c.settings.folderCount&&B.addItem(L=>{L.setTitle("Item Numbers (Bigger to Smaller)"),L.onClick(b=>{I("item-number")})}),c.app.workspace.trigger("sort-menu",B),B.showAtPosition({x:d.pageX,y:d.pageY}),!1},S=22;return f.createElement("div",{className:"oz-folders-tree-wrapper"},f.createElement("div",{className:"oz-folders-action-items file-tree-header-fixed"},f.createElement(y3,{className:"oz-nav-action-button",size:S,onClick:d=>p(c.app.vault.getRoot()),"aria-label":"Create Folder"}),f.createElement(f4,{className:"oz-nav-action-button",size:S,onClick:O,"aria-label":"Sorting Options"}),f.createElement(H3,{className:"oz-nav-action-button",size:S,onClick:w,"aria-label":"Collapse Folders"}),f.createElement(M3,{className:"oz-nav-action-button",size:S,onClick:T,"aria-label":"Expand Folders"})),f.createElement(M9,{condition:i&&!i.isRoot()||i&&i.isRoot&&c.settings.showRootFolder,wrapper:d=>f.createElement(t4,{plugin:c,content:i.isRoot()?c.app.vault.getName():i.name,open:!0,isRootFolder:i.isRoot(),style:a,onClick:()=>l(i.path),folder:i,onContextMenu:B=>R(B,i)},d)},v&&f.createElement(L5,{plugin:c,folderTree:v})))}var H9=t=>{let{plugin:a}=t,[c,r]=w1(!1),[e,h]=w1(null),[l,v]=w1(null),i=a2(),o=a2(),n=localStorage.getItem(a.keys.customHeightKey);m1(()=>{e&&localStorage.setItem(a.keys.customHeightKey,e.toString())},[e]);function u(p){p.preventDefault(),r(!0);let R=o.current.offsetTop-i.current.offsetTop;h(R),v(p.nativeEvent.clientY)}function H(p){p.preventDefault(),!!c&&(h(e+(p.nativeEvent.clientY-l)),v(p.nativeEvent.clientY))}function C(p){p.preventDefault(),r(!1),v(p.nativeEvent.clientY)}return f.createElement("div",{className:"file-tree-container",onMouseMove:p=>H(p),onMouseUp:p=>C(p)},f.createElement("div",{className:"oz-folder-pane",ref:i,style:{height:e?`${e}px`:n&&n!==""?`${n}px`:"50%"}},f.createElement(E4,{plugin:a})),f.createElement("div",{id:"file-tree-divider",ref:o,onClick:p=>p.preventDefault(),onMouseDown:p=>u(p),className:c?"active-divider":""}),f.createElement("div",{className:"oz-file-list-pane"},f.createElement(k4,{plugin:a})))},f9=t=>{let{plugin:a}=t,[c,r]=w1(!1),[e,h]=w1(null),[l,v]=w1(null),i=a2(),o=a2(),n=localStorage.getItem(a.keys.customWidthKey);m1(()=>{e&&localStorage.setItem(a.keys.customWidthKey,e.toString())},[e]);function u(p){p.preventDefault(),r(!0);let R=o.current.offsetLeft-i.current.offsetLeft;h(R),v(p.nativeEvent.clientX)}function H(p){p.preventDefault(),!!c&&(h(e+(p.nativeEvent.clientX-l)),v(p.nativeEvent.clientX))}function C(p){p.preventDefault(),r(!1),v(p.nativeEvent.clientX)}return f.createElement("div",{className:"file-tree-container-horizontal",onMouseMove:p=>H(p),onMouseUp:p=>C(p)},f.createElement("div",{className:"oz-folder-pane-horizontal",ref:i,style:{width:e?`${e}px`:n&&n!==""?`${n}px`:"50%"}},f.createElement(E4,{plugin:a})),f.createElement("div",{id:"file-tree-divider-horizontal",ref:o,onClick:p=>p.preventDefault(),onMouseDown:p=>u(p),className:c?"active-divider":""}),f.createElement("div",{className:"oz-file-list-pane-horizontal"},f.createElement(k4,{plugin:a})))};function B5(t){let{plugin:a}=t,c=I2(),[r,e]=h1(J2),[h,l]=h1(n2),[v,i]=h1(_0),[o,n]=h1(_4),[u,H]=h1(V2),[C,p]=h1(T0),[R,w]=h1(X2),[T,O]=h1(x2),[S,d]=h1(I0),[B,I]=h1(P0),[L,b]=h1(m2),[U,Y]=h1(b0),P=M=>{i(F2(M||h,a))},_=()=>{if(["Horizontal","Vertical"].includes(a.settings.evernoteView)){let M=localStorage.getItem(a.keys.activeFolderPathKey);if(M){let x=a.app.vault.getAbstractFileByPath(M);x&&x instanceof i2.TFolder&&l(x.path)}}};m1(()=>(window.addEventListener(y1.vaultChange,E),window.addEventListener(y1.activeFileChange,F),window.addEventListener(y1.refreshView,c),window.addEventListener(y1.revealFile,z),window.addEventListener(y1.createNewNote,A),()=>{window.removeEventListener(y1.vaultChange,E),window.removeEventListener(y1.activeFileChange,F),window.removeEventListener(y1.refreshView,c),window.removeEventListener(y1.revealFile,z),window.removeEventListener(y1.revealFile,A)}),[]);let A=()=>{let M="/";l(x=>(M=x,x)),q2(null,M,a)},E=M=>{l1(M.detail.file,M.detail.changeType,M.detail.oldPath)},F=M=>{let x=M.detail.filePath,$=a.app.vault.getAbstractFileByPath(x);$&&Y($)};m1(()=>{q(),w(t1()),d(W()),n(a1()),H(o1()),I(a.settings.showFilesFromSubFolders),_(),a.settings.folderCount&&O(b3(a))},[]),m1(()=>{L&&(p(R3(L)),localStorage.setItem(a.keys.focusedFolder,L.path))},[L]);let q=()=>{let M=localStorage.getItem(a.keys.focusedFolder);if(M){let x=a.app.vault.getAbstractFileByPath(M);if(x&&x instanceof i2.TFolder){b(x);return}}b(a.app.vault.getRoot())};m1(()=>K(),[o]),m1(()=>u1(),[u]),m1(()=>g1(),[R]),m1(()=>{h!==""&&(P(h),e("file")),localStorage.setItem(a.keys.activeFolderPathKey,h)},[h]);function W(){let M=a.settings.excludedExtensions,x=[];for(let $ of M.split(","))x.push($.trim());return x}function t1(){let M=a.settings.excludedFolders,x=[];if(M)for(let $ of M.split(","))$!==""&&x.push($.trim());return x}function o1(){let M=[],x=localStorage.getItem(a.keys.openFoldersKey);if(x){x=JSON.parse(x);for(let $ of x){let e1=a.app.vault.getAbstractFileByPath($);e1&&M.push(e1.path)}}return M}function a1(){let M=[],x=localStorage.getItem(a.keys.pinnedFilesKey);if(x){x=JSON.parse(x);for(let $ of x){let e1=a.app.vault.getAbstractFileByPath($);e1&&M.push(e1)}}return M}function u1(){let M=[];for(let x of u)M.push(x);localStorage.setItem(a.keys.openFoldersKey,JSON.stringify(M))}function K(){let M=[];for(let x of o)M.push(x.path);localStorage.setItem(a.keys.pinnedFilesKey,JSON.stringify(M))}function g1(){a.settings.excludedFolders=R.length>1?R.join(", "):R[0],a.saveSettings()}function l1(M,x,$){let e1=null,v1="",p1="",n1=[];if(b(c1=>(e1=c1,c1)),l(c1=>(v1=c1,c1)),e(c1=>(p1=c1,c1)),i(c1=>(n1=c1,c1)),M instanceof i2.TFile){if(p1==="file")if(x==="rename"||x==="modify"||x==="delete"){let c1=a.settings.sortFilesBy;if(x==="modify"&&!(c1==="last-update"||c1==="file-size"))return;let D1=M.path.substring(0,M.path.lastIndexOf("/")),R1=n1.some(Z1=>Z1.path===M.path),E1=v1===D1||a.settings.showFilesFromSubFolders&&D1.startsWith(v1);R1?x==="delete"?i(n1.filter(Z1=>Z1.path!==M.path)):(x==="rename"||x==="modify"&&(c1==="last-update"||c1==="file-size"))&&i([...n1.filter(Z1=>Z1.path!==M.path),...M.parent.path===v1?[M]:[]]):E1&&!R1&&i([...n1,M])}else x==="create"&&M.path.match(new RegExp(v1+".*"))&&(n1.some(D1=>D1.path===M.path)||i([...n1,M]))}else M instanceof i2.TFolder&&(p(R3(e1)),x==="rename"&&$&&v1===$&&l(M.path));a.settings.folderCount&&x!=="modify"&&O(b3(a))}m1(()=>{U&&v.length>0&&m(U)},[v]);function z(M){let x=M.detail.file;x&&x instanceof i2.TFile?Z(x):new i2.Notice("No active file")}function m(M){let x=`div.oz-file-tree-files div.oz-nav-file-title[data-path="${M.path}"]`,$=document.querySelector(x);$&&$.scrollIntoView(!1)}function V(M){let x=`div.oz-folder-contents div.oz-folder-element[data-path="${M.path}"]`,$=document.querySelector(x);$&&$.scrollIntoView(!1)}function Z(M){let x=M.parent;L&&L.path!=="/"&&b(a.app.vault.getRoot());let $=e1=>{let v1=[],p1=n1=>{v1.push(n1.path),n1.parent&&p1(n1.parent)};return p1(e1.parent),v1};if(x instanceof i2.TFolder){l(x.path),Y(M);let e1=$(M),v1=new Set([...u,...e1]);H(Array.from(v1)),m(M),V(x)}}return f.createElement(f.Fragment,null,r==="folder"?f.createElement(E4,{plugin:a}):a.settings.evernoteView==="Horizontal"?f.createElement(f9,{plugin:a}):a.settings.evernoteView==="Vertical"?f.createElement(H9,{plugin:a}):f.createElement(k4,{plugin:a}))}var T2="file-tree-view",Xl="File Tree",D4="sheets-in-box",A5=class extends x9.ItemView{constructor(a,c){super(a);this.navigation=!1;this.plugin=c}getViewType(){return T2}getDisplayText(){return Xl}getIcon(){return D4}onClose(){return L1(this,null,function*(){this.destroy()})}destroy(){f.unmountComponentAtNode(this.contentEl)}onOpen(){return L1(this,null,function*(){this.destroy(),this.constructFileTree(this.app.vault.getRoot().path,"")})}constructFileTree(a,c){this.destroy(),f.render(f.createElement("div",{className:"file-tree-plugin-view"},f.createElement(u9,null,f.createElement(B5,{fileTreeView:this,plugin:this.plugin}))),this.contentEl)}};var M1=U1(require("obsidian")),m9=U1(V9()),C9={openViewOnStart:!0,ribbonIcon:!0,showRootFolder:!0,showFilesFromSubFolders:!0,searchFunction:!0,allSearchOnlyInFocusedFolder:!1,showFilesFromSubFoldersButton:!0,revealActiveFileButton:!1,excludedExtensions:"",excludedFolders:"",folderIcon:"default",folderCount:!0,folderCountOption:"notes",evernoteView:"Vertical",filePreviewOnHover:!1,iconBeforeFileName:!0,sortFilesBy:"name",sortReverse:!1,sortFoldersBy:"name",fixedHeaderInFileList:!0,createdYaml:!1,fileNameIsHeader:!1,folderNote:!1,deleteFileOption:"trash",showFileNameAsFullPath:!1},S5=class extends M1.PluginSettingTab{constructor(a,c){super(a,c);this.plugin=c}refreshView(){let a=new CustomEvent(y1.refreshView,{});window.dispatchEvent(a)}display(){let{containerEl:a}=this;a.empty();let c=new m9.LocalStorageHandler({}),r=a.createDiv("tip");r.addClass("oz-tip-div");let h=r.createEl("a",{href:"https://revolut.me/ozante"}).createEl("img",{attr:{src:"https://raw.githubusercontent.com/ozntel/file-tree-alternative/main/images/tip%20the%20artist_v2.png"}});h.height=55;let l=a.createDiv("coffee");l.addClass("oz-coffee-div");let i=l.createEl("a",{href:"https://ko-fi.com/L3L356V6Q"}).createEl("img",{attr:{src:"https://cdn.ko-fi.com/cdn/kofi2.png?v=3"}});i.height=45,a.createEl("h2",{text:"General"}),new M1.Setting(a).setName("Evernote View").setDesc("Turn on if you want to see the folders and files in a single view without switching between views. Similar experience to Evernote.").addDropdown(o=>{o.addOption("Disabled","Disabled").addOption("Horizontal","Horizontal").addOption("Vertical","Vertical").setValue(this.plugin.settings.evernoteView).onChange(n=>{this.plugin.settings.evernoteView=n,this.plugin.saveSettings(),this.refreshView()})}),new M1.Setting(a).setName("Ribbon Icon").setDesc("Turn on if you want Ribbon Icon for activating the File Tree.").addToggle(o=>o.setValue(this.plugin.settings.ribbonIcon).onChange(n=>{this.plugin.settings.ribbonIcon=n,this.plugin.saveSettings(),this.plugin.refreshIconRibbon()})),new M1.Setting(a).setName("Open on Start").setDesc("Turn off if you don't want file tree view to be opened automatically during vault start").addToggle(o=>o.setValue(this.plugin.settings.openViewOnStart).onChange(n=>{this.plugin.settings.openViewOnStart=n,this.plugin.saveSettings()})),a.createEl("h2",{text:"Folder Pane Settings"}),new M1.Setting(a).setName("Folder Icons").setDesc("Change the default folder icons your preferred option").addDropdown(o=>{o.addOption("default","Default").addOption("box-folder","Box Icons").addOption("icomoon","IcoMoon Icons").addOption("typicon","Typicons").addOption("circle-gg","Circle GG").setValue(this.plugin.settings.folderIcon).onChange(n=>{this.plugin.settings.folderIcon=n,this.plugin.saveSettings(),this.refreshView()})}),new M1.Setting(a).setName("Show Root Folder").setDesc(`Turn on if you want your Root Folder "${this.plugin.app.vault.getName()}" to be visible in the file tree`).addToggle(o=>o.setValue(this.plugin.settings.showRootFolder).onChange(n=>{this.plugin.settings.showRootFolder=n,this.plugin.saveSettings(),this.refreshView()})),new M1.Setting(a).setName("Folder Count").setDesc("Turn on if you want see the number of notes/files under file tree.").addToggle(o=>o.setValue(this.plugin.settings.folderCount).onChange(n=>{this.plugin.settings.folderCount=n,this.plugin.saveSettings(),this.plugin.refreshTreeLeafs()})),new M1.Setting(a).setName("Folder Count Details").setDesc("Select which files you want to be included into count").addDropdown(o=>{o.addOption("notes","Notes"),o.addOption("files","All Files"),o.setValue(this.plugin.settings.folderCountOption),o.onChange(n=>{this.plugin.settings.folderCountOption=n,this.plugin.saveSettings(),this.refreshView()})}),new M1.Setting(a).setName("Folder Note").setDesc(`Turn this option on if you want to create Folder Note same as Folder Note Plugin.
By default, Click will open the list of files. You need to use "Shift+Click" to open the folder note. If folder has a folder note,
you will see an arrow icon on the right side of folder. The note created as a folder note is hidden in the file list.`).addToggle(o=>{o.setValue(this.plugin.settings.folderNote).onChange(n=>{this.plugin.settings.folderNote=n,this.plugin.saveSettings(),this.refreshView()})}),a.createEl("h2",{text:"File Pane Settings"}),new M1.Setting(a).setName("Include Files From Subfolders to the File List").setDesc("Turn on this option if you want to see the list of files from all subfolders in addition to the selected folder").addToggle(o=>o.setValue(this.plugin.settings.showFilesFromSubFolders).onChange(n=>{this.plugin.settings.showFilesFromSubFolders=n,this.plugin.saveSettings(),this.refreshView()})),new M1.Setting(a).setName("Toggle Button for Include Files from Subfolders").setDesc('Turn on this option if you want to have an additional button on the top of the file list to toggle "Include Files From Subfolders"').addToggle(o=>o.setValue(this.plugin.settings.showFilesFromSubFoldersButton).onChange(n=>{this.plugin.settings.showFilesFromSubFoldersButton=n,this.plugin.saveSettings(),this.refreshView()})),new M1.Setting(a).setName("Reveal Active File in File Tree Button").setDesc("Turn on this option if you want to have an additional button to reveal the active file in the file tree. It will set the folder and file pane accordingly.").addToggle(o=>o.setValue(this.plugin.settings.revealActiveFileButton).onChange(n=>{this.plugin.settings.revealActiveFileButton=n,this.plugin.saveSettings(),this.refreshView()})),new M1.Setting(a).setName("Search in File List").setDesc("Turn on this option if you want to enable search function to filter files by name.").addToggle(o=>o.setValue(this.plugin.settings.searchFunction).onChange(n=>{this.plugin.settings.searchFunction=n,this.plugin.saveSettings(),this.refreshView()})),new M1.Setting(a).setName("All & Tag Search only in Focused Folder").setDesc('"all:" and "tag:" searches by default looks for all files in your vault. Turn on this option if you want search only in Focused Folder').addToggle(o=>o.setValue(this.plugin.settings.allSearchOnlyInFocusedFolder).onChange(n=>{this.plugin.settings.allSearchOnlyInFocusedFolder=n,this.plugin.saveSettings()})),new M1.Setting(a).setName("Icon Before File Name").setDesc("Turn on if you want to file icon before the file name in the file list.").addToggle(o=>o.setValue(this.plugin.settings.iconBeforeFileName).onChange(n=>{this.plugin.settings.iconBeforeFileName=n,this.plugin.saveSettings(),this.refreshView()})),new M1.Setting(a).setName("Preview File on Hover").setDesc("Turn on if you want to preview the files once you hover on them within the file list holding Ctrl/Cmd button.").addToggle(o=>o.setValue(this.plugin.settings.filePreviewOnHover).onChange(n=>{this.plugin.settings.filePreviewOnHover=n,this.plugin.saveSettings()})),new M1.Setting(a).setName("Fixed Buttons and Header in File Pane").setDesc("Turn on if you want buttons and header to be not scrolled within the file list.").addToggle(o=>o.setValue(this.plugin.settings.fixedHeaderInFileList).onChange(n=>{this.plugin.settings.fixedHeaderInFileList=n,this.plugin.saveSettings(),this.refreshView()})),new M1.Setting(a).setName("Show file names as full path").setDesc("Turn on if you want to see the full path within the file name list rather than only file name").addToggle(o=>{o.setValue(this.plugin.settings.showFileNameAsFullPath).onChange(n=>{this.plugin.settings.showFileNameAsFullPath=n,this.plugin.saveSettings(),this.refreshView()})}),new M1.Setting(a).setName("Deleted File Destination").setDesc("Select where you want files to be moved once they are deleted").addDropdown(o=>{o.addOption("permanent","Delete Permanently"),o.addOption("trash","Move to Obsidian Trash"),o.addOption("system-trash","Move to System Trash"),o.setValue(this.plugin.settings.deleteFileOption),o.onChange(n=>{this.plugin.settings.deleteFileOption=n,this.plugin.saveSettings()})}),a.createEl("h2",{text:"File Creation"}),a.createEl("p",{text:"The settings below are only applicable if the plus (+) button within the file pane of the plugin is used."}),new M1.Setting(a).setName("Created information in YAML").setDesc("Turn on if you want plugin to include created YAML key with the time of creation").addToggle(o=>{o.setValue(this.plugin.settings.createdYaml).onChange(n=>{this.plugin.settings.createdYaml=n,this.plugin.saveSettings()})}),new M1.Setting(a).setName("Set File Name as Header 1").setDesc("Turn on if you want plugin to add the initial file name as main header in the created file.").addToggle(o=>{o.setValue(this.plugin.settings.fileNameIsHeader).onChange(n=>{this.plugin.settings.fileNameIsHeader=n,this.plugin.saveSettings()})}),a.createEl("h2",{text:"Exclude Settings"}),new M1.Setting(a).setName("Excluded File Extensions").setDesc(`Provide extension of files, which you want to exclude from listing in file tree, divided by comma. i.e. 'png, pdf, jpeg'.
You need to reload the vault or use "Reload File Tree" button below to make changes effective.`).addTextArea(o=>o.setValue(this.plugin.settings.excludedExtensions).onChange(n=>{this.plugin.settings.excludedExtensions=n,this.plugin.saveSettings()})),new M1.Setting(a).setName("Excluded Folder Paths").setDesc(`Provide full path of folders, which you want to exclude from listing in file tree, divided by comma. i.e. 'Personal/Attachments, Work/Documents/Folders'.
All subfolders are going to be excluded, as well. You need to reload the vault or use "Reload File Tree" button below to make changes effective.`).addTextArea(o=>o.setValue(this.plugin.settings.excludedFolders).onChange(n=>{this.plugin.settings.excludedFolders=n,this.plugin.saveSettings()})),new M1.Setting(a).setDesc("Use this button to reload the file tree. Reloading the file tree is required for some of the settings. You can also restart your vault to have same effect.").addButton(o=>{o.setClass("reload-file-tree-button").setTooltip("Click here to reload the file tree").setButtonText("Reload File Tree").onClick(n=>{this.plugin.refreshTreeLeafs()})}),a.createEl("h2",{text:"Clear Data"}),new M1.Setting(a).setName("Clear All Cache Data").setDesc(`This button will clear the following cache data: "Last position of the divider" & "List of expanded folders in the folder pane",
& "Last active folder path". It will not touch your settings above and list of pinned files. It is recommended to do this clearing once in a while.`).addButton(o=>{let n=o.setTooltip("Click here to clear the cache data").setButtonText("Click for Clearing the Cache").onClick(()=>L1(this,null,function*(){c.removeFromLocalStorage({key:this.plugin.keys.customHeightKey}),c.removeFromLocalStorage({key:this.plugin.keys.customWidthKey}),c.removeFromLocalStorage({key:this.plugin.keys.openFoldersKey}),c.removeFromLocalStorage({key:this.plugin.keys.activeFolderPathKey}),c.removeFromLocalStorage({key:this.plugin.keys.focusedFolder}),this.plugin.refreshTreeLeafs(),new M1.Notice("The plugin cache is cleared...")}))}),new M1.Setting(a).setName("Clear Pinned Files").setDesc("This button will clear the pinned files in the file list pane.").addButton(o=>{let n=o.setTooltip("Click here to clear the pinned files").setButtonText("Click for Clearing the Pinned files").onClick(()=>L1(this,null,function*(){c.removeFromLocalStorage({key:this.plugin.keys.pinnedFilesKey}),this.plugin.refreshTreeLeafs(),new M1.Notice("The pinned files are cleared...")}))})}};var y1={activeFileChange:"fta-active-file-change",refreshView:"fta-refresh-view",revealFile:"fta-reveal-file",vaultChange:"fta-vault-change",createNewNote:"fta-create-new-note"},F5=class extends C2.Plugin{constructor(){super(...arguments);this.ribbonIconEl=void 0;this.keys={activeFolderPathKey:"fileTreePlugin-ActiveFolderPath",pinnedFilesKey:"fileTreePlugin-PinnedFiles",openFoldersKey:"fileTreePlugin-OpenFolders",customHeightKey:"fileTreePlugin-CustomHeight",customWidthKey:"fileTreePlugin-CustomWidth",focusedFolder:"fileTreePlugin-FocusedFolder"};this.triggerVaultChangeEvent=(a,c,r)=>{let e=new CustomEvent(y1.vaultChange,{detail:{file:a,changeType:c,oldPath:r||""}});window.dispatchEvent(e)};this.onCreate=a=>this.triggerVaultChangeEvent(a,"create","");this.onDelete=a=>this.triggerVaultChangeEvent(a,"delete","");this.onModify=a=>this.triggerVaultChangeEvent(a,"modify","");this.onRename=(a,c)=>this.triggerVaultChangeEvent(a,"rename",c);this.refreshIconRibbon=()=>{var a;(a=this.ribbonIconEl)==null||a.remove(),this.settings.ribbonIcon&&(this.ribbonIconEl=this.addRibbonIcon(D4,"File Tree Alternative Plugin",()=>L1(this,null,function*(){yield this.openFileTreeLeaf(!0)})))};this.openFileTreeLeaf=a=>L1(this,null,function*(){let c=this.app.workspace.getLeavesOfType(T2);if(c.length==0){let r=this.app.workspace.getLeftLeaf(!1);yield r.setViewState({type:T2}),a&&this.app.workspace.revealLeaf(r)}else a&&c.forEach(r=>this.app.workspace.revealLeaf(r))});this.detachFileTreeLeafs=()=>{let a=this.app.workspace.getLeavesOfType(T2);for(let c of a)c.view.destroy(),c.detach()};this.refreshTreeLeafs=()=>{this.detachFileTreeLeafs(),this.openFileTreeLeaf(!0)}}onload(){return L1(this,null,function*(){console.log("Loading Alternative File Tree Plugin"),(0,C2.addIcon)("zoomInIcon",_8),(0,C2.addIcon)("zoomOutIcon",I8),(0,C2.addIcon)("zoomOutDoubleIcon",T8),(0,C2.addIcon)("locationIcon",b8),(0,C2.addIcon)("spaceIcon",P8),this.addSettingTab(new S5(this.app,this)),yield this.loadSettings(),this.registerView(T2,a=>new A5(a,this)),this.app.workspace.onLayoutReady(()=>L1(this,null,function*(){this.settings.openViewOnStart&&(yield this.openFileTreeLeaf(!0))})),this.addCommand({id:"open-file-tree-view",name:"Open File Tree View",callback:()=>L1(this,null,function*(){return yield this.openFileTreeLeaf(!0)})}),this.addCommand({id:"reveal-active-file",name:"Reveal Active File",callback:()=>{let a=this.app.workspace.getLeavesOfType(T2);a.length===0&&this.openFileTreeLeaf(!0);for(let r of a)this.app.workspace.revealLeaf(r);let c=new CustomEvent(y1.revealFile,{detail:{file:this.app.workspace.getActiveFile()}});window.dispatchEvent(c)}}),this.addCommand({id:" create-new-note",name:"Create a New Note",callback:()=>{let a=new CustomEvent(y1.createNewNote,{detail:{}});window.dispatchEvent(a)}}),this.app.vault.on("create",this.onCreate),this.app.vault.on("delete",this.onDelete),this.app.vault.on("modify",this.onModify),this.app.vault.on("rename",this.onRename),this.refreshIconRibbon()})}onunload(){console.log("Unloading Alternative File Tree Plugin"),this.detachFileTreeLeafs(),this.app.vault.off("create",this.onCreate),this.app.vault.off("delete",this.onDelete),this.app.vault.off("modify",this.onModify),this.app.vault.off("rename",this.onRename)}loadSettings(){return L1(this,null,function*(){this.settings=Object.assign({},C9,yield this.loadData())})}saveSettings(){return L1(this,null,function*(){yield this.saveData(this.settings)})}};0&&(module.exports={eventTypes});