/* 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=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]=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;e1||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()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){"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(uF5,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;a0?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;u2&&(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]>>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;ct.length)&&(a=t.length);for(var c=0,r=new Array(a);cc)return[!1,z8(c)];if(t.sizec)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;c1?e-1:0),l=1;lt.length)&&(a=t.length);for(var c=0,r=new Array(a);c=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=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;cf.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='',I8='',T8='',_8='',P8='',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;r1?l-1:0),i=1;i0&&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;l0&&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);a0&&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,"&"),g2(//g,">"),g2(/"/g,"""),g2(/'/g,"'"),g2(/`/g,"`"));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??"",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>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<=y;)D[X--]=D[X];return D[y]=k,D}for(var Q=0,J=0,i1=new Array(G+1);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;J1?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;Jvr++;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 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 . 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"}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{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});