/* 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 qf=Object.create;var _n=Object.defineProperty,Gf=Object.defineProperties,Kf=Object.getOwnPropertyDescriptor,Yf=Object.getOwnPropertyDescriptors,Zf=Object.getOwnPropertyNames,Jn=Object.getOwnPropertySymbols,Xf=Object.getPrototypeOf,go=Object.prototype.hasOwnProperty,fa=Object.prototype.propertyIsEnumerable;var da=(e,t,n)=>t in e?_n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ue=(e,t)=>{for(var n in t||(t={}))go.call(t,n)&&da(e,n,t[n]);if(Jn)for(var n of Jn(t))fa.call(t,n)&&da(e,n,t[n]);return e},_t=(e,t)=>Gf(e,Yf(t)),pa=e=>_n(e,"__esModule",{value:!0});var ha=(e,t)=>{var n={};for(var r in e)go.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Jn)for(var r of Jn(e))t.indexOf(r)<0&&fa.call(e,r)&&(n[r]=e[r]);return n};var ze=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Jf=(e,t)=>{pa(e);for(var n in t)_n(e,n,{get:t[n],enumerable:!0})},Qf=(e,t,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Zf(t))!go.call(e,r)&&r!=="default"&&_n(e,r,{get:()=>t[r],enumerable:!(n=Kf(t,r))||n.enumerable});return e},Re=e=>Qf(pa(_n(e!=null?qf(Xf(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var Ee=(e,t,n)=>new Promise((r,o)=>{var i=l=>{try{s(n.next(l))}catch(c){o(c)}},a=l=>{try{s(n.throw(l))}catch(c){o(c)}},s=l=>l.done?r(l.value):Promise.resolve(l.value).then(i,a);s((n=n.apply(e,t)).next())});var ns=ze((H0,ts)=>{"use strict";var Cd="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";ts.exports=Cd});var as=ze((q0,is)=>{"use strict";var Nd=ns();function rs(){}function os(){}os.resetWarningCache=rs;is.exports=function(){function e(r,o,i,a,s,l){if(l!==Nd){var c=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 c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:os,resetWarningCache:rs};return n.PropTypes=n,n}});var ko=ze((Y0,ss)=>{ss.exports=as()();var G0,K0});var Fs=ze((Z0,sr)=>{var ls,cs,us,fs,ds,ps,hs,ms,vs,ir,Lo,_s,gs,ys,Ht,bs,ws,Ss,Ts,xs,Es,Rs,As,ar;(function(e){var t=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(r){e(n(t,n(r)))}):typeof sr=="object"&&typeof sr.exports=="object"?e(n(t,n(sr.exports))):e(n(t));function n(r,o){return r!==t&&(typeof Object.create=="function"?Object.defineProperty(r,"__esModule",{value:!0}):r.__esModule=!0),function(i,a){return r[i]=o?o(i,a):a}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(r[i]=o[i])};ls=function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");t(r,o);function i(){this.constructor=r}r.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)},cs=Object.assign||function(r){for(var o,i=1,a=arguments.length;i=0;u--)(c=r[u])&&(l=(s<3?c(l):s>3?c(o,i,l):c(o,i))||l);return s>3&&l&&Object.defineProperty(o,i,l),l},ds=function(r,o){return function(i,a){o(i,a,r)}},ps=function(r,o){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,o)},hs=function(r,o,i,a){function s(l){return l instanceof i?l:new i(function(c){c(l)})}return new(i||(i=Promise))(function(l,c){function u(m){try{f(a.next(m))}catch(p){c(p)}}function d(m){try{f(a.throw(m))}catch(p){c(p)}}function f(m){m.done?l(m.value):s(m.value).then(u,d)}f((a=a.apply(r,o||[])).next())})},ms=function(r,o){var i={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},a,s,l,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(f){return function(m){return d([f,m])}}function d(f){if(a)throw new TypeError("Generator is already executing.");for(;i;)try{if(a=1,s&&(l=f[0]&2?s.return:f[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,f[1])).done)return l;switch(s=0,l&&(f=[f[0]&2,l.value]),f[0]){case 0:case 1:l=f;break;case 4:return i.label++,{value:f[1],done:!1};case 5:i.label++,s=f[1],f=[0];continue;case 7:f=i.ops.pop(),i.trys.pop();continue;default:if(l=i.trys,!(l=l.length>0&&l[l.length-1])&&(f[0]===6||f[0]===2)){i=0;continue}if(f[0]===3&&(!l||f[1]>l[0]&&f[1]=r.length&&(r=void 0),{value:r&&r[a++],done:!r}}};throw new TypeError(o?"Object is not iterable.":"Symbol.iterator is not defined.")},Lo=function(r,o){var i=typeof Symbol=="function"&&r[Symbol.iterator];if(!i)return r;var a=i.call(r),s,l=[],c;try{for(;(o===void 0||o-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(u){c={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(c)throw c.error}}return l},_s=function(){for(var r=[],o=0;o1||u(y,v)})})}function u(y,v){try{d(a[y](v))}catch(w){p(l[0][3],w)}}function d(y){y.value instanceof Ht?Promise.resolve(y.value.v).then(f,m):p(l[0][2],y)}function f(y){u("next",y)}function m(y){u("throw",y)}function p(y,v){y(v),l.shift(),l.length&&u(l[0][0],l[0][1])}},ws=function(r){var o,i;return o={},a("next"),a("throw",function(s){throw s}),a("return"),o[Symbol.iterator]=function(){return this},o;function a(s,l){o[s]=r[s]?function(c){return(i=!i)?{value:Ht(r[s](c)),done:s==="return"}:l?l(c):c}:l}},Ss=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=r[Symbol.asyncIterator],i;return o?o.call(r):(r=typeof ir=="function"?ir(r):r[Symbol.iterator](),i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i);function a(l){i[l]=r[l]&&function(c){return new Promise(function(u,d){c=r[l](c),s(u,d,c.done,c.value)})}}function s(l,c,u,d){Promise.resolve(d).then(function(f){l({value:f,done:u})},c)}},Ts=function(r,o){return Object.defineProperty?Object.defineProperty(r,"raw",{value:o}):r.raw=o,r};var n=Object.create?function(r,o){Object.defineProperty(r,"default",{enumerable:!0,value:o})}:function(r,o){r.default=o};xs=function(r){if(r&&r.__esModule)return r;var o={};if(r!=null)for(var i in r)i!=="default"&&Object.prototype.hasOwnProperty.call(r,i)&&ar(o,r,i);return n(o,r),o},Es=function(r){return r&&r.__esModule?r:{default:r}},Rs=function(r,o,i,a){if(i==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof o=="function"?r!==o||!a:!o.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?a:i==="a"?a.call(r):a?a.value:o.get(r)},As=function(r,o,i,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof o=="function"?r!==o||!s:!o.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(r,i):s?s.value=i:o.set(r,i),i},e("__extends",ls),e("__assign",cs),e("__rest",us),e("__decorate",fs),e("__param",ds),e("__metadata",ps),e("__awaiter",hs),e("__generator",ms),e("__exportStar",vs),e("__createBinding",ar),e("__values",ir),e("__read",Lo),e("__spread",_s),e("__spreadArrays",gs),e("__spreadArray",ys),e("__await",Ht),e("__asyncGenerator",bs),e("__asyncDelegator",ws),e("__asyncValues",Ss),e("__makeTemplateObject",Ts),e("__importStar",xs),e("__importDefault",Es),e("__classPrivateFieldGet",Rs),e("__classPrivateFieldSet",As)})});var Ds=ze(Do=>{"use strict";Do.__esModule=!0;Do.default=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0}});var zl=ze(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});var Ol="fas",Dl="plus-circle",Vl=512,Ml=512,Il=[],$l="f055",Ul="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm144 276c0 6.6-5.4 12-12 12h-92v92c0 6.6-5.4 12-12 12h-56c-6.6 0-12-5.4-12-12v-92h-92c-6.6 0-12-5.4-12-12v-56c0-6.6 5.4-12 12-12h92v-92c0-6.6 5.4-12 12-12h56c6.6 0 12 5.4 12 12v92h92c6.6 0 12 5.4 12 12v56z";Ze.definition={prefix:Ol,iconName:Dl,icon:[Vl,Ml,Il,$l,Ul]};Ze.faPlusCircle=Ze.definition;Ze.prefix=Ol;Ze.iconName=Dl;Ze.width=Vl;Ze.height=Ml;Ze.ligatures=Il;Ze.unicode=$l;Ze.svgPathData=Ul});var Yl=ze(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});var jl="fas",Bl="arrow-circle-left",Wl=512,Hl=512,ql=[],Gl="f0a8",Kl="M256 504C119 504 8 393 8 256S119 8 256 8s248 111 248 248-111 248-248 248zm28.9-143.6L209.4 288H392c13.3 0 24-10.7 24-24v-16c0-13.3-10.7-24-24-24H209.4l75.5-72.4c9.7-9.3 9.9-24.8.4-34.3l-11-10.9c-9.4-9.4-24.6-9.4-33.9 0L107.7 239c-9.4 9.4-9.4 24.6 0 33.9l132.7 132.7c9.4 9.4 24.6 9.4 33.9 0l11-10.9c9.5-9.5 9.3-25-.4-34.3z";Xe.definition={prefix:jl,iconName:Bl,icon:[Wl,Hl,ql,Gl,Kl]};Xe.faArrowCircleLeft=Xe.definition;Xe.prefix=jl;Xe.iconName=Bl;Xe.width=Wl;Xe.height=Hl;Xe.ligatures=ql;Xe.unicode=Gl;Xe.svgPathData=Kl});var rc=ze(Je=>{"use strict";Object.defineProperty(Je,"__esModule",{value:!0});var Zl="fas",Xl="thumbtack",Jl=384,Ql=512,ec=[],tc="f08d",nc="M298.028 214.267L285.793 96H328c13.255 0 24-10.745 24-24V24c0-13.255-10.745-24-24-24H56C42.745 0 32 10.745 32 24v48c0 13.255 10.745 24 24 24h42.207L85.972 214.267C37.465 236.82 0 277.261 0 328c0 13.255 10.745 24 24 24h136v104.007c0 1.242.289 2.467.845 3.578l24 48c2.941 5.882 11.364 5.893 14.311 0l24-48a8.008 8.008 0 0 0 .845-3.578V352h136c13.255 0 24-10.745 24-24-.001-51.183-37.983-91.42-85.973-113.733z";Je.definition={prefix:Zl,iconName:Xl,icon:[Jl,Ql,ec,tc,nc]};Je.faThumbtack=Je.definition;Je.prefix=Zl;Je.iconName=Xl;Je.width=Jl;Je.height=Ql;Je.ligatures=ec;Je.unicode=tc;Je.svgPathData=nc});var fc=ze(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});var oc="fas",ic="search",ac=512,sc=512,lc=[],cc="f002",uc="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z";Qe.definition={prefix:oc,iconName:ic,icon:[ac,sc,lc,cc,uc]};Qe.faSearch=Qe.definition;Qe.prefix=oc;Qe.iconName=ic;Qe.width=ac;Qe.height=sc;Qe.ligatures=lc;Qe.unicode=cc;Qe.svgPathData=uc});var yc=ze(et=>{"use strict";Object.defineProperty(et,"__esModule",{value:!0});var dc="fas",pc="times-circle",hc=512,mc=512,vc=[],_c="f057",gc="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm121.6 313.1c4.7 4.7 4.7 12.3 0 17L338 377.6c-4.7 4.7-12.3 4.7-17 0L256 312l-65.1 65.6c-4.7 4.7-12.3 4.7-17 0L134.4 338c-4.7-4.7-4.7-12.3 0-17l65.6-65-65.6-65.1c-4.7-4.7-4.7-12.3 0-17l39.6-39.6c4.7-4.7 12.3-4.7 17 0l65 65.7 65.1-65.6c4.7-4.7 12.3-4.7 17 0l39.6 39.6c4.7 4.7 4.7 12.3 0 17L312 256l65.6 65.1z";et.definition={prefix:dc,iconName:pc,icon:[hc,mc,vc,_c,gc]};et.faTimesCircle=et.definition;et.prefix=dc;et.iconName=pc;et.width=hc;et.height=mc;et.ligatures=vc;et.unicode=_c;et.svgPathData=gc});var Ac=ze(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});var bc="fas",wc="eye",Sc=576,Tc=512,xc=[],Ec="f06e",Rc="M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z";tt.definition={prefix:bc,iconName:wc,icon:[Sc,Tc,xc,Ec,Rc]};tt.faEye=tt.definition;tt.prefix=bc;tt.iconName=wc;tt.width=Sc;tt.height=Tc;tt.ligatures=xc;tt.unicode=Ec;tt.svgPathData=Rc});var Dc=ze(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});var Fc="fas",Cc="eye-slash",Nc=640,kc=512,Lc=[],Pc="f070",Oc="M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z";nt.definition={prefix:Fc,iconName:Cc,icon:[Nc,kc,Lc,Pc,Oc]};nt.faEyeSlash=nt.definition;nt.prefix=Fc;nt.iconName=Cc;nt.width=Nc;nt.height=kc;nt.ligatures=Lc;nt.unicode=Pc;nt.svgPathData=Oc});var zf=ze(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.LocalStorageHandler=void 0;var C0=function(){function e(t){var n=this;this.getTimeStampKey=function(o){return o+"-timestamp"},this.getFromLocalStorage=function(o){var i=o.key,a=o.checkCacheHours,s=o.cacheHours,l=localStorage.getItem(i),c=localStorage.getItem(n.getTimeStampKey(i));if(a!==void 0&&!a)return l;if(s&&(n.cacheHours=s),c!==null){var u=new Date(JSON.parse(c)),d=Math.abs(new Date().getTime()-u.getTime())/36e5;if(dca});var un=Re(require("obsidian"));var Uf=Re(require("obsidian"));var gn,z,ma,ed,yn,va,_a,ga,Qn={},ya=[],td=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function gt(e,t){for(var n in t)e[n]=t[n];return e}function ba(e){var t=e.parentNode;t&&t.removeChild(e)}function at(e,t,n){var r,o,i,a={};for(i in t)i=="key"?r=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?gn.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return bn(e,a,r,o,null)}function bn(e,t,n,r,o){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++ma};return o==null&&z.vnode!=null&&z.vnode(i),i}function yo(){return{current:null}}function Ge(e){return e.children}function Ke(e,t){this.props=e,this.context=t}function zt(e,t){if(t==null)return e.__?zt(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t0?bn(m.type,m.props,m.key,null,m.__v):m)!=null){if(m.__=n,m.__b=n.__b+1,(f=w[u])===null||f&&m.key==f.key&&m.type===f.type)w[u]=void 0;else for(d=0;d2&&(a.children=arguments.length>3?gn.call(arguments,2):n),bn(e.type,a,r||e.key,o||e.ref,null)}function To(e,t){var n={__c:t="__cC"+ga++,__:e,Consumer:function(r,o){return r.children(o)},Provider:function(r){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(bo)},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}gn=ya.slice,z={__e:function(e,t){for(var n,r,o;t=t.__;)if((n=t.__c)&&!n.__)try{if((r=n.constructor)&&r.getDerivedStateFromError!=null&&(n.setState(r.getDerivedStateFromError(e)),o=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e),o=n.__d),o)return n.__E=n}catch(i){e=i}throw e}},ma=0,ed=function(e){return e!=null&&e.constructor===void 0},Ke.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=gt({},this.state),typeof e=="function"&&(e=e(gt({},n),this.props)),e&>(n,e),e!=null&&this.__v&&(t&&this.__h.push(t),bo(this))},Ke.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),bo(this))},Ke.prototype.render=Ge,yn=[],va=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,er.__r=0,ga=0;var Bt,De,La,Wt=0,xo=[],Pa=z.__b,Oa=z.__r,Da=z.diffed,Va=z.__c,Ma=z.unmount;function wn(e,t){z.__h&&z.__h(De,e,Wt||t),Wt=0;var n=De.__H||(De.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function Ve(e){return Wt=1,Sn(za,e)}function Sn(e,t,n){var r=wn(Bt++,2);return r.t=e,r.__c||(r.__=[n?n(t):za(void 0,t),function(o){var i=r.t(r.__[0],o);r.__[0]!==i&&(r.__=[i,r.__[1]],r.__c.setState({}))}],r.__c=De),r.__}function Le(e,t){var n=wn(Bt++,3);!z.__s&&Ao(n.__H,t)&&(n.__=e,n.__H=t,De.__H.__h.push(n))}function Eo(e,t){var n=wn(Bt++,4);!z.__s&&Ao(n.__H,t)&&(n.__=e,n.__H=t,De.__h.push(n))}function yt(e){return Wt=5,Lt(function(){return{current:e}},[])}function nr(e,t,n){Wt=6,Eo(function(){typeof e=="function"?e(t()):e&&(e.current=t())},n==null?n:n.concat(e))}function Lt(e,t){var n=wn(Bt++,7);return Ao(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function je(e,t){return Wt=8,Lt(function(){return e},t)}function Ia(e){var t=De.context[e.__c],n=wn(Bt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(De)),t.props.value):e.__}function $a(e,t){z.useDebugValue&&z.useDebugValue(t?t(e):e)}function id(){xo.forEach(function(e){if(e.__P)try{e.__H.__h.forEach(rr),e.__H.__h.forEach(Ro),e.__H.__h=[]}catch(t){e.__H.__h=[],z.__e(t,e.__v)}}),xo=[]}z.__b=function(e){De=null,Pa&&Pa(e)},z.__r=function(e){Oa&&Oa(e),Bt=0;var t=(De=e.__c).__H;t&&(t.__h.forEach(rr),t.__h.forEach(Ro),t.__h=[])},z.diffed=function(e){Da&&Da(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(xo.push(t)!==1&&La===z.requestAnimationFrame||((La=z.requestAnimationFrame)||function(n){var r,o=function(){clearTimeout(i),Ua&&cancelAnimationFrame(r),setTimeout(n)},i=setTimeout(o,100);Ua&&(r=requestAnimationFrame(o))})(id)),De=null},z.__c=function(e,t){t.some(function(n){try{n.__h.forEach(rr),n.__h=n.__h.filter(function(r){return!r.__||Ro(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],z.__e(r,n.__v)}}),Va&&Va(e,t)},z.unmount=function(e){Ma&&Ma(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(rr)}catch(n){z.__e(n,t.__v)}};var Ua=typeof requestAnimationFrame=="function";function rr(e){var t=De;typeof e.__c=="function"&&e.__c(),De=t}function Ro(e){var t=De;e.__c=e.__(),De=t}function Ao(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function za(e,t){return typeof t=="function"?t(e):t}function ja(e,t){for(var n in t)e[n]=t[n];return e}function Fo(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Co(e){this.props=e}function ad(e,t){function n(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:Fo(this.props,o)}function r(o){return this.shouldComponentUpdate=n,at(e,o)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Co.prototype=new Ke).isPureReactComponent=!0,Co.prototype.shouldComponentUpdate=function(e,t){return Fo(this.props,e)||Fo(this.state,t)};var Ba=z.__b;z.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ba&&Ba(e)};var sd=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function No(e){function t(n,r){var o=ja({},n);return delete o.ref,e(o,(r=n.ref||r)&&(typeof r!="object"||"current"in r)?r:null)}return t.$$typeof=sd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Wa=function(e,t){return e==null?null:dt(dt(e).map(t))},ld={map:Wa,forEach:Wa,count:function(e){return e?dt(e).length:0},only:function(e){var t=dt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:dt},cd=z.__e;z.__e=function(e,t,n){if(e.then){for(var r,o=t;o=o.__;)if((r=o.__c)&&r.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),r.__c(e,t)}cd(e,t,n)};var Ha=z.unmount;function or(){this.__u=0,this.t=null,this.__b=null}function qa(e){var t=e.__.__c;return t&&t.__e&&t.__e(e)}function ud(e){var t,n,r;function o(i){if(t||(t=e()).then(function(a){n=a.default||a},function(a){r=a}),r)throw r;if(!n)throw t;return at(n,i)}return o.displayName="Lazy",o.__f=!0,o}function Tn(){this.u=null,this.o=null}z.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ha&&Ha(e)},(or.prototype=new Ke).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var o=qa(r.__v),i=!1,a=function(){i||(i=!0,n.__R=null,o?o(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__e){var c=r.state.__e;r.__v.__k[0]=function d(f,m,p){return f&&(f.__v=null,f.__k=f.__k&&f.__k.map(function(y){return d(y,m,p)}),f.__c&&f.__c.__P===m&&(f.__e&&p.insertBefore(f.__e,f.__d),f.__c.__e=!0,f.__c.__P=p)),f}(c,c.__c.__P,c.__c.__O)}var u;for(r.setState({__e:r.__b=null});u=r.t.pop();)u.forceUpdate()}},l=t.__h===!0;r.__u++||l||r.setState({__e:r.__b=r.__v.__k[0]}),e.then(a,a)},or.prototype.componentWillUnmount=function(){this.t=[]},or.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function i(a,s,l){return a&&(a.__c&&a.__c.__H&&(a.__c.__H.__.forEach(function(c){typeof c.__c=="function"&&c.__c()}),a.__c.__H=null),(a=ja({},a)).__c!=null&&(a.__c.__P===l&&(a.__c.__P=s),a.__c=null),a.__k=a.__k&&a.__k.map(function(c){return i(c,s,l)})),a}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__e&&at(Ge,null,e.fallback);return o&&(o.__h=null),[at(Ge,null,t.__e?null:e.children),o]};var Ga=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),t.i.removeChild(r)}}),jt(at(fd,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function pd(e,t){return at(dd,{__v:e,i:t})}(Tn.prototype=new Ke).__e=function(e){var t=this,n=qa(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Ga(t,e,r)):o()};n?n(i):i()}},Tn.prototype.render=function(e){this.u=null,this.o=new Map;var t=dt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Tn.prototype.componentDidUpdate=Tn.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){Ga(e,n,t)})};var Ka=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,hd=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,md=typeof document!="undefined",vd=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(e)};function _d(e,t,n){return t.__k==null&&(t.textContent=""),jt(e,t),typeof n=="function"&&n(),e?e.__c:null}function gd(e,t,n){return So(e,t),typeof n=="function"&&n(),e?e.__c:null}Ke.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Ke.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ya=z.event;function yd(){}function bd(){return this.cancelBubble}function wd(){return this.defaultPrevented}z.event=function(e){return Ya&&(e=Ya(e)),e.persist=yd,e.isPropagationStopped=bd,e.isDefaultPrevented=wd,e.nativeEvent=e};var Za,Xa={configurable:!0,get:function(){return this.class}},Ja=z.vnode;z.vnode=function(e){var t=e.type,n=e.props,r=n;if(typeof t=="string"){var o=t.indexOf("-")===-1;for(var i in r={},n){var a=n[i];md&&i==="children"&&t==="noscript"||i==="value"&&"defaultValue"in n&&a==null||(i==="defaultValue"&&"value"in n&&n.value==null?i="value":i==="download"&&a===!0?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+t)&&!vd(n.type)?i="oninput":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():o&&hd.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():a===null&&(a=void 0),r[i]=a)}t=="select"&&r.multiple&&Array.isArray(r.value)&&(r.value=dt(n.children).forEach(function(s){s.props.selected=r.value.indexOf(s.props.value)!=-1})),t=="select"&&r.defaultValue!=null&&(r.value=dt(n.children).forEach(function(s){s.props.selected=r.multiple?r.defaultValue.indexOf(s.props.value)!=-1:r.defaultValue==s.props.value})),e.props=r}t&&n.class!=n.className&&(Xa.enumerable="className"in n,n.className!=null&&(r.class=n.className),Object.defineProperty(r,"className",Xa)),e.$$typeof=Ka,Ja&&Ja(e)};var Qa=z.__r;z.__r=function(e){Qa&&Qa(e),Za=e.__c};var Sd={ReactCurrentDispatcher:{current:{readContext:function(e){return Za.__n[e.__c].props.value}}}};function Td(e){return at.bind(null,e)}function es(e){return!!e&&e.$$typeof===Ka}function xd(e){return es(e)?ka.apply(null,arguments):e}function Ed(e){return!!e.__k&&(jt(null,e),!0)}function Rd(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ad=function(e,t){return e(t)},Fd=function(e,t){return e(t)};var b={useState:Ve,useReducer:Sn,useEffect:Le,useLayoutEffect:Eo,useRef:yt,useImperativeHandle:nr,useMemo:Lt,useCallback:je,useContext:Ia,useDebugValue:$a,version:"17.0.2",Children:ld,render:_d,hydrate:gd,unmountComponentAtNode:Ed,createPortal:pd,createElement:at,createContext:To,createFactory:Td,cloneElement:xd,createRef:yo,Fragment:Ge,isValidElement:es,findDOMNode:Rd,Component:Ke,PureComponent:Co,memo:ad,forwardRef:No,flushSync:Fd,unstable_batchedUpdates:Ad,StrictMode:Ge,Suspense:or,SuspenseList:Tn,lazy:ud,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Sd};var Zn=Re(require("obsidian"));var ve=Re(ko());var Cs=Re(Fs()),{__extends:X0,__assign:J0,__rest:Q0,__decorate:eb,__param:tb,__metadata:nb,__awaiter:qt,__generator:Gt,__exportStar:rb,__createBinding:ob,__values:ib,__read:ab,__spread:Ns,__spreadArrays:sb,__spreadArray:lb,__await:cb,__asyncGenerator:ub,__asyncDelegator:fb,__asyncValues:db,__makeTemplateObject:pb,__importStar:hb,__importDefault:mb,__classPrivateFieldGet:vb,__classPrivateFieldSet:_b}=Cs.default;var kd=new Map([["avi","video/avi"],["gif","image/gif"],["ico","image/x-icon"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["mkv","video/x-matroska"],["mov","video/quicktime"],["mp4","video/mp4"],["pdf","application/pdf"],["png","image/png"],["zip","application/zip"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"]]);function xn(e,t){var n=Ld(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function Ld(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=kd.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var Pd=[".DS_Store","Thumbs.db"];function Po(e){return qt(this,void 0,void 0,function(){return Gt(this,function(t){return[2,Od(e)&&e.dataTransfer?Md(e.dataTransfer,e.type):Dd(e)]})})}function Od(e){return!!e.dataTransfer}function Dd(e){var t=Vd(e.target)?e.target.files?Oo(e.target.files):[]:[];return t.map(function(n){return xn(n)})}function Vd(e){return e!==null}function Md(e,t){return qt(this,void 0,void 0,function(){var n,r;return Gt(this,function(o){switch(o.label){case 0:return e.items?(n=Oo(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(Id))]):[3,2];case 1:return r=o.sent(),[2,ks(Ls(r))];case 2:return[2,ks(Oo(e.files).map(function(i){return xn(i)}))]}})})}function ks(e){return e.filter(function(t){return Pd.indexOf(t.name)===-1})}function Oo(e){for(var t=[],n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);nn)return[!1,$s(n)];if(e.sizen)return[!1,$s(n)]}return[!0,null]}function En(e){return e!=null}function js(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(s){var l=Vo(s,n),c=Vs(l,1),u=c[0],d=Mo(s,r,o),f=Vs(d,1),m=f[0];return u&&m})}function Rn(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble!="undefined"?e.cancelBubble:!1}function An(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function Io(e){e.preventDefault()}function Zd(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function Xd(e){return e.indexOf("Edge/")!==-1}function Bs(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return Zd(e)||Xd(e)}function st(){for(var e=arguments.length,t=new Array(e),n=0;n1?o-1:0),a=1;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function cp(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}var cr=No(function(e,t){var n=e.children,r=lr(e,Jd),o=up(r),i=o.open,a=lr(o,Qd);return nr(t,function(){return{open:i}},[i]),b.createElement(Ge,null,n(Se(Se({},a),{},{open:i})))});cr.displayName="Dropzone";var qs={disabled:!1,getFilesFromEvent:Po,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null};cr.defaultProps=qs;cr.propTypes={children:ve.default.func,accept:ve.default.oneOfType([ve.default.string,ve.default.arrayOf(ve.default.string)]),multiple:ve.default.bool,preventDropOnDocument:ve.default.bool,noClick:ve.default.bool,noKeyboard:ve.default.bool,noDrag:ve.default.bool,noDragEventsBubbling:ve.default.bool,minSize:ve.default.number,maxSize:ve.default.number,maxFiles:ve.default.number,disabled:ve.default.bool,getFilesFromEvent:ve.default.func,onFileDialogCancel:ve.default.func,onDragEnter:ve.default.func,onDragLeave:ve.default.func,onDragOver:ve.default.func,onDrop:ve.default.func,onDropAccepted:ve.default.func,onDropRejected:ve.default.func,validator:ve.default.func};var ur=cr,Gs={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function up(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Se(Se({},qs),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,d=t.onDragOver,f=t.onDrop,m=t.onDropAccepted,p=t.onDropRejected,y=t.onFileDialogCancel,v=t.preventDropOnDocument,w=t.noClick,S=t.noKeyboard,T=t.noDrag,R=t.noDragEventsBubbling,U=t.validator,V=yt(null),I=yt(null),B=Sn(fp,Gs),Z=$o(B,2),W=Z[0],ee=Z[1],Te=W.isFocused,Q=W.isFileDialogActive,ne=W.draggedFiles,_e=je(function(){I.current&&(ee({type:"openDialog"}),I.current.value=null,I.current.click())},[ee]),oe=function(){Q&&setTimeout(function(){if(I.current){var J=I.current.files;J.length||(ee({type:"closeDialog"}),typeof y=="function"&&y())}},300)};Le(function(){return window.addEventListener("focus",oe,!1),function(){window.removeEventListener("focus",oe,!1)}},[I,Q,y]);var ie=je(function(P){!V.current||!V.current.isEqualNode(P.target)||(P.keyCode===32||P.keyCode===13)&&(P.preventDefault(),_e())},[V,I]),F=je(function(){ee({type:"focus"})},[]),O=je(function(){ee({type:"blur"})},[]),G=je(function(){w||(Bs()?setTimeout(_e,0):_e())},[I,w]),le=yt([]),C=function(J){V.current&&V.current.contains(J.target)||(J.preventDefault(),le.current=[])};Le(function(){return v&&(document.addEventListener("dragover",Io,!1),document.addEventListener("drop",C,!1)),function(){v&&(document.removeEventListener("dragover",Io),document.removeEventListener("drop",C))}},[V,v]);var q=je(function(P){P.preventDefault(),P.persist(),N(P),le.current=[].concat(np(le.current),[P.target]),An(P)&&Promise.resolve(o(P)).then(function(J){Rn(P)&&!R||(ee({draggedFiles:J,isDragActive:!0,type:"setDraggedFiles"}),c&&c(P))})},[o,c,R]),j=je(function(P){P.preventDefault(),P.persist(),N(P);var J=An(P);if(J&&P.dataTransfer)try{P.dataTransfer.dropEffect="copy"}catch(de){}return J&&d&&d(P),!1},[d,R]),_=je(function(P){P.preventDefault(),P.persist(),N(P);var J=le.current.filter(function(ye){return V.current&&V.current.contains(ye)}),de=J.indexOf(P.target);de!==-1&&J.splice(de,1),le.current=J,!(J.length>0)&&(ee({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),An(P)&&u&&u(P))},[V,u,R]),x=je(function(P){P.preventDefault(),P.persist(),N(P),le.current=[],An(P)&&Promise.resolve(o(P)).then(function(J){if(!(Rn(P)&&!R)){var de=[],ye=[];J.forEach(function(Ne){var Rt=Vo(Ne,n),vt=$o(Rt,2),fn=vt[0],Nt=vt[1],kt=Mo(Ne,a,i),$t=$o(kt,2),dn=$t[0],vo=$t[1],pn=U?U(Ne):null;if(fn&&dn&&!pn)de.push(Ne);else{var hn=[Nt,vo];pn&&(hn=hn.concat(pn)),ye.push({file:Ne,errors:hn.filter(function(_o){return _o})})}}),(!s&&de.length>1||s&&l>=1&&de.length>l)&&(de.forEach(function(Ne){ye.push({file:Ne,errors:[zs]})}),de.splice(0)),ee({acceptedFiles:de,fileRejections:ye,type:"setFiles"}),f&&f(de,ye,P),ye.length>0&&p&&p(ye,P),de.length>0&&m&&m(de,P)}}),ee({type:"reset"})},[s,n,a,i,l,o,f,m,p,R,U]),A=function(J){return r?null:J},$=function(J){return S?null:A(J)},D=function(J){return T?null:A(J)},N=function(J){R&&J.stopPropagation()},ce=Lt(function(){return function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=P.refKey,de=J===void 0?"ref":J,ye=P.onKeyDown,Ne=P.onFocus,Rt=P.onBlur,vt=P.onClick,fn=P.onDragEnter,Nt=P.onDragOver,kt=P.onDragLeave,$t=P.onDrop,dn=lr(P,ep);return Se(Se(zo({onKeyDown:$(st(ye,ie)),onFocus:$(st(Ne,F)),onBlur:$(st(Rt,O)),onClick:A(st(vt,G)),onDragEnter:D(st(fn,q)),onDragOver:D(st(Nt,j)),onDragLeave:D(st(kt,_)),onDrop:D(st($t,x))},de,V),!r&&!S?{tabIndex:0}:{}),dn)}},[V,ie,F,O,G,q,j,_,x,S,T,r]),Ce=je(function(P){P.stopPropagation()},[]),xe=Lt(function(){return function(){var P=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},J=P.refKey,de=J===void 0?"ref":J,ye=P.onChange,Ne=P.onClick,Rt=lr(P,tp),vt=zo({accept:n,multiple:s,type:"file",style:{display:"none"},onChange:A(st(ye,x)),onClick:A(st(Ne,Ce)),autoComplete:"off",tabIndex:-1},de,I);return Se(Se({},vt),Rt)}},[I,n,s,x,r]),we=ne.length,ge=we>0&&js({files:ne,accept:n,minSize:a,maxSize:i,multiple:s,maxFiles:l}),me=we>0&&!ge;return Se(Se({},W),{},{isDragAccept:ge,isDragReject:me,isFocused:Te&&!r,getRootProps:ce,getInputProps:xe,rootRef:V,inputRef:I,open:A(_e)})}function fp(e,t){switch(t.type){case"focus":return Se(Se({},e),{},{isFocused:!0});case"blur":return Se(Se({},e),{},{isFocused:!1});case"openDialog":return Se(Se({},e),{},{isFileDialogActive:!0});case"closeDialog":return Se(Se({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return Se(Se({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return Se(Se({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Se({},Gs);default:return e}}var hf=Re(require("obsidian"));function Fn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Fn=function(t){return typeof t}:Fn=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fn(e)}function dp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ks(e,t){for(var n=0;n-1;o--){var i=n[o],a=(i.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=i)}return Me.head.insertBefore(t,r),e}}var Dp="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function vr(){for(var e=12,t="";e-- >0;)t+=Dp[Math.random()*62|0];return t}function dl(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function Vp(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(dl(e[n]),'" ')},"").trim()}function pl(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n],";")},"")}function hl(e){return e.size!==Kt.size||e.x!==Kt.x||e.y!==Kt.y||e.rotate!==Kt.rotate||e.flipX||e.flipY}function ml(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(n/2," 256)")},i="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(i," ").concat(a," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:o,inner:l,path:c}}var Yo={x:0,y:0,width:"100%",height:"100%"};function vl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function Mp(e){return e.tag==="g"?e.children:[e]}function Ip(e){var t=e.children,n=e.attributes,r=e.main,o=e.mask,i=e.maskId,a=e.transform,s=r.width,l=r.icon,c=o.width,u=o.icon,d=ml({transform:a,containerWidth:c,iconWidth:s}),f={tag:"rect",attributes:ue({},Yo,{fill:"white"})},m=l.children?{children:l.children.map(vl)}:{},p={tag:"g",attributes:ue({},d.inner),children:[vl(ue({tag:l.tag,attributes:ue({},l.attributes,d.path)},m))]},y={tag:"g",attributes:ue({},d.outer),children:[p]},v="mask-".concat(i||vr()),w="clip-".concat(i||vr()),S={tag:"mask",attributes:ue({},Yo,{id:v,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,y]},T={tag:"defs",children:[{tag:"clipPath",attributes:{id:w},children:Mp(u)},S]};return t.push(T,{tag:"rect",attributes:ue({fill:"currentColor","clip-path":"url(#".concat(w,")"),mask:"url(#".concat(v,")")},Yo)}),{children:t,attributes:n}}function $p(e){var t=e.children,n=e.attributes,r=e.main,o=e.transform,i=e.styles,a=pl(i);if(a.length>0&&(n.style=a),hl(o)){var s=ml({transform:o,containerWidth:r.width,iconWidth:r.width});t.push({tag:"g",attributes:ue({},s.outer),children:[{tag:"g",attributes:ue({},s.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:ue({},r.icon.attributes,s.path)}]}]})}else t.push(r.icon);return{children:t,attributes:n}}function Up(e){var t=e.children,n=e.main,r=e.mask,o=e.attributes,i=e.styles,a=e.transform;if(hl(a)&&n.found&&!r.found){var s=n.width,l=n.height,c={x:s/l/2,y:.5};o.style=pl(ue({},i,{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:o,children:t}]}function zp(e){var t=e.prefix,n=e.iconName,r=e.children,o=e.attributes,i=e.symbol,a=i===!0?"".concat(t,"-").concat(Be.familyPrefix,"-").concat(n):i;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:ue({},o,{id:a}),children:r}]}]}function jp(e){var t=e.icons,n=t.main,r=t.mask,o=e.prefix,i=e.iconName,a=e.transform,s=e.symbol,l=e.title,c=e.maskId,u=e.titleId,d=e.extra,f=e.watchable,m=f===void 0?!1:f,p=r.found?r:n,y=p.width,v=p.height,w=o==="fak",S=w?"":"fa-w-".concat(Math.ceil(y/v*16)),T=[Be.replacementClass,i?"".concat(Be.familyPrefix,"-").concat(i):"",S].filter(function(W){return d.classes.indexOf(W)===-1}).filter(function(W){return W!==""||!!W}).concat(d.classes).join(" "),R={children:[],attributes:ue({},d.attributes,{"data-prefix":o,"data-icon":i,class:T,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(y," ").concat(v)})},U=w&&!~d.classes.indexOf("fa-fw")?{width:"".concat(y/v*16*.0625,"em")}:{};m&&(R.attributes[bp]=""),l&&R.children.push({tag:"title",attributes:{id:R.attributes["aria-labelledby"]||"title-".concat(u||vr())},children:[l]});var V=ue({},R,{prefix:o,iconName:i,main:n,mask:r,maskId:c,transform:a,symbol:s,styles:ue({},U,d.styles)}),I=r.found&&n.found?Ip(V):$p(V),B=I.children,Z=I.attributes;return V.children=B,V.attributes=Z,s?zp(V):Up(V)}var _l=function(){},Ib=Be.measurePerformance&&dr&&dr.mark&&dr.measure?dr:{mark:_l,measure:_l};var Bp=function(t,n){return function(r,o,i,a){return t.call(n,r,o,i,a)}},Zo=function(t,n,r,o){var i=Object.keys(t),a=i.length,s=o!==void 0?Bp(n,o):n,l,c,u;for(r===void 0?(l=1,u=t[i[0]]):(l=0,u=r);l2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,o=r===void 0?!1:r,i=Object.keys(t).reduce(function(a,s){var l=t[s],c=!!l.icon;return c?a[l.iconName]=l.icon:a[s]=l,a},{});typeof pt.hooks.addPack=="function"&&!o?pt.hooks.addPack(e,i):pt.styles[e]=ue({},pt.styles[e]||{},i),e==="fas"&&gl("fa",t)}var yl=pt.styles,Wp=pt.shims,Hp={},qp={},Gp={},bl=function(){var t=function(o){return Zo(yl,function(i,a,s){return i[s]=Zo(a,o,{}),i},{})};Hp=t(function(r,o,i){return o[3]&&(r[o[3]]=i),r}),qp=t(function(r,o,i){var a=o[2];return r[i]=i,a.forEach(function(s){r[s]=i}),r});var n="far"in yl;Gp=Zo(Wp,function(r,o){var i=o[0],a=o[1],s=o[2];return a==="far"&&!n&&(a="fas"),r[i]={prefix:a,iconName:s},r},{})};bl();var $b=pt.styles;function wl(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}function Sl(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,o=e.children,i=o===void 0?[]:o;return typeof e=="string"?dl(e):"<".concat(t," ").concat(Vp(r),">").concat(i.map(Sl).join(""),"")}var Kp=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t?t.toLowerCase().split(" ").reduce(function(r,o){var i=o.toLowerCase().split("-"),a=i[0],s=i.slice(1).join("-");if(a&&s==="h")return r.flipX=!0,r;if(a&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(a){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n):n};function Xo(e){this.name="MissingIcon",this.message=e||"Icon unavailable",this.stack=new Error().stack}Xo.prototype=Object.create(Error.prototype);Xo.prototype.constructor=Xo;var _r={fill:"currentColor"},Tl={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},Ub={tag:"path",attributes:ue({},_r,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},Jo=ue({},Tl,{attributeName:"opacity"}),zb={tag:"circle",attributes:ue({},_r,{cx:"256",cy:"364",r:"28"}),children:[{tag:"animate",attributes:ue({},Tl,{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:ue({},Jo,{values:"1;0;1;1;0;1;"})}]},jb={tag:"path",attributes:ue({},_r,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:[{tag:"animate",attributes:ue({},Jo,{values:"1;0;0;0;0;1;"})}]},Bb={tag:"path",attributes:ue({},_r,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:ue({},Jo,{values:"0;0;1;1;0;0;"})}]};var Wb=pt.styles;function xl(e){var t=e[0],n=e[1],r=e.slice(4),o=Ys(r,1),i=o[0],a=null;return Array.isArray(i)?a={tag:"g",attributes:{class:"".concat(Be.familyPrefix,"-").concat(Pt.GROUP)},children:[{tag:"path",attributes:{class:"".concat(Be.familyPrefix,"-").concat(Pt.SECONDARY),fill:"currentColor",d:i[0]}},{tag:"path",attributes:{class:"".concat(Be.familyPrefix,"-").concat(Pt.PRIMARY),fill:"currentColor",d:i[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:i}},{found:!0,width:t,height:n,icon:a}}var Hb=pt.styles;var Yp=`svg:not(:root).svg-inline--fa { overflow: visible; } .svg-inline--fa { display: inline-block; font-size: inherit; height: 1em; overflow: visible; vertical-align: -0.125em; } .svg-inline--fa.fa-lg { vertical-align: -0.225em; } .svg-inline--fa.fa-w-1 { width: 0.0625em; } .svg-inline--fa.fa-w-2 { width: 0.125em; } .svg-inline--fa.fa-w-3 { width: 0.1875em; } .svg-inline--fa.fa-w-4 { width: 0.25em; } .svg-inline--fa.fa-w-5 { width: 0.3125em; } .svg-inline--fa.fa-w-6 { width: 0.375em; } .svg-inline--fa.fa-w-7 { width: 0.4375em; } .svg-inline--fa.fa-w-8 { width: 0.5em; } .svg-inline--fa.fa-w-9 { width: 0.5625em; } .svg-inline--fa.fa-w-10 { width: 0.625em; } .svg-inline--fa.fa-w-11 { width: 0.6875em; } .svg-inline--fa.fa-w-12 { width: 0.75em; } .svg-inline--fa.fa-w-13 { width: 0.8125em; } .svg-inline--fa.fa-w-14 { width: 0.875em; } .svg-inline--fa.fa-w-15 { width: 0.9375em; } .svg-inline--fa.fa-w-16 { width: 1em; } .svg-inline--fa.fa-w-17 { width: 1.0625em; } .svg-inline--fa.fa-w-18 { width: 1.125em; } .svg-inline--fa.fa-w-19 { width: 1.1875em; } .svg-inline--fa.fa-w-20 { width: 1.25em; } .svg-inline--fa.fa-pull-left { margin-right: 0.3em; width: auto; } .svg-inline--fa.fa-pull-right { margin-left: 0.3em; width: auto; } .svg-inline--fa.fa-border { height: 1.5em; } .svg-inline--fa.fa-li { width: 2em; } .svg-inline--fa.fa-fw { width: 1.25em; } .fa-layers svg.svg-inline--fa { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; } .fa-layers { display: inline-block; height: 1em; position: relative; text-align: center; vertical-align: -0.125em; width: 1em; } .fa-layers svg.svg-inline--fa { -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-counter, .fa-layers-text { display: inline-block; position: absolute; text-align: center; } .fa-layers-text { left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); -webkit-transform-origin: center center; transform-origin: center center; } .fa-layers-counter { background-color: #ff253a; border-radius: 1em; -webkit-box-sizing: border-box; box-sizing: border-box; color: #fff; height: 1.5em; line-height: 1; max-width: 5em; min-width: 1.5em; overflow: hidden; padding: 0.25em; right: 0; text-overflow: ellipsis; top: 0; -webkit-transform: scale(0.25); transform: scale(0.25); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-bottom-right { bottom: 0; right: 0; top: auto; -webkit-transform: scale(0.25); transform: scale(0.25); -webkit-transform-origin: bottom right; transform-origin: bottom right; } .fa-layers-bottom-left { bottom: 0; left: 0; right: auto; top: auto; -webkit-transform: scale(0.25); transform: scale(0.25); -webkit-transform-origin: bottom left; transform-origin: bottom left; } .fa-layers-top-right { right: 0; top: 0; -webkit-transform: scale(0.25); transform: scale(0.25); -webkit-transform-origin: top right; transform-origin: top right; } .fa-layers-top-left { left: 0; right: auto; top: 0; -webkit-transform: scale(0.25); transform: scale(0.25); -webkit-transform-origin: top left; transform-origin: top left; } .fa-lg { font-size: 1.3333333333em; line-height: 0.75em; vertical-align: -0.0667em; } .fa-xs { font-size: 0.75em; } .fa-sm { font-size: 0.875em; } .fa-1x { font-size: 1em; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-6x { font-size: 6em; } .fa-7x { font-size: 7em; } .fa-8x { font-size: 8em; } .fa-9x { font-size: 9em; } .fa-10x { font-size: 10em; } .fa-fw { text-align: center; width: 1.25em; } .fa-ul { list-style-type: none; margin-left: 2.5em; padding-left: 0; } .fa-ul > li { position: relative; } .fa-li { left: -2em; position: absolute; text-align: center; width: 2em; line-height: inherit; } .fa-border { border: solid 0.08em #eee; border-radius: 0.1em; padding: 0.2em 0.25em 0.15em; } .fa-pull-left { float: left; } .fa-pull-right { float: right; } .fa.fa-pull-left, .fas.fa-pull-left, .far.fa-pull-left, .fal.fa-pull-left, .fab.fa-pull-left { margin-right: 0.3em; } .fa.fa-pull-right, .fas.fa-pull-right, .far.fa-pull-right, .fal.fa-pull-right, .fab.fa-pull-right { margin-left: 0.3em; } .fa-spin { -webkit-animation: fa-spin 2s infinite linear; animation: fa-spin 2s infinite linear; } .fa-pulse { -webkit-animation: fa-spin 1s infinite steps(8); animation: fa-spin 1s infinite steps(8); } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } .fa-rotate-90 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; -webkit-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; -webkit-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; -webkit-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; -webkit-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; -webkit-transform: scale(1, -1); transform: scale(1, -1); } .fa-flip-both, .fa-flip-horizontal.fa-flip-vertical { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; -webkit-transform: scale(-1, -1); transform: scale(-1, -1); } :root .fa-rotate-90, :root .fa-rotate-180, :root .fa-rotate-270, :root .fa-flip-horizontal, :root .fa-flip-vertical, :root .fa-flip-both { -webkit-filter: none; filter: none; } .fa-stack { display: inline-block; height: 2em; position: relative; width: 2.5em; } .fa-stack-1x, .fa-stack-2x { bottom: 0; left: 0; margin: auto; position: absolute; right: 0; top: 0; } .svg-inline--fa.fa-stack-1x { height: 1em; width: 1.25em; } .svg-inline--fa.fa-stack-2x { height: 2em; width: 2.5em; } .fa-inverse { color: #fff; } .sr-only { border: 0; clip: rect(0, 0, 0, 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } .sr-only-focusable:active, .sr-only-focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; } .svg-inline--fa .fa-primary { fill: var(--fa-primary-color, currentColor); opacity: 1; opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa .fa-secondary { fill: var(--fa-secondary-color, currentColor); opacity: 0.4; opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-primary { opacity: 0.4; opacity: var(--fa-secondary-opacity, 0.4); } .svg-inline--fa.fa-swap-opacity .fa-secondary { opacity: 1; opacity: var(--fa-primary-opacity, 1); } .svg-inline--fa mask .fa-primary, .svg-inline--fa mask .fa-secondary { fill: black; } .fad.fa-inverse { color: #fff; }`;function Zp(){var e=tl,t=nl,n=Be.familyPrefix,r=Be.replacementClass,o=Yp;if(n!==e||r!==t){var i=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");o=o.replace(i,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return o}var Xp=function(){function e(){dp(this,e),this.definitions={}}return pp(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,o=new Array(r),i=0;i1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:El(t||{}),o=n.mask;return o&&(o=(o||{}).icon?o:El(o||{})),e(r,ue({},n,{mask:o}))}}var th=new Xp;var Rl=!1;var gr={transform:function(t){return Kp(t)}},Al=eh(function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transform,r=n===void 0?Kt:n,o=t.symbol,i=o===void 0?!1:o,a=t.mask,s=a===void 0?null:a,l=t.maskId,c=l===void 0?null:l,u=t.title,d=u===void 0?null:u,f=t.titleId,m=f===void 0?null:f,p=t.classes,y=p===void 0?[]:p,v=t.attributes,w=v===void 0?{}:v,S=t.styles,T=S===void 0?{}:S;if(!!e){var R=e.prefix,U=e.iconName,V=e.icon;return Qp(ue({type:"icon"},e),function(){return Jp(),Be.autoA11y&&(d?w["aria-labelledby"]="".concat(Be.replacementClass,"-title-").concat(m||vr()):(w["aria-hidden"]="true",w.focusable="false")),jp({icons:{main:xl(V),mask:s?xl(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:R,iconName:U,transform:ue({},Kt,r),symbol:i,title:d,maskId:c,titleId:m,extra:{attributes:w,styles:T,classes:y}})})}});var pe=Re(ko());function kn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?kn=function(t){return typeof t}:kn=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(e)}function Yt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fl(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qo(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function Cl(e,t){if(e==null)return{};var n=nh(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function ei(e){return rh(e)||oh(e)||ih()}function rh(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return kl(e,l)}),o=Object.keys(t.attributes||{}).reduce(function(l,c){var u=t.attributes[c];switch(c){case"class":l.attrs.className=u,delete t.attributes.class;break;case"style":l.attrs.style=ch(u);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=u:l.attrs[Nl(c)]=u}return l},{attrs:{}}),i=n.style,a=i===void 0?{}:i,s=Cl(n,["style"]);return o.attrs.style=Qo({},o.attrs.style,{},a),e.apply(void 0,[t.tag,Qo({},o.attrs,{},s)].concat(ei(r)))}var Ll=!1;try{Ll=!0}catch(e){}function uh(){if(!Ll&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function Pl(e){if(e&&kn(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(gr.icon)return gr.icon(e);if(e===null)return null;if(e&&kn(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function ti(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?Yt({},e,t):{}}function lt(e){var t=e.forwardedRef,n=Cl(e,["forwardedRef"]),r=n.icon,o=n.mask,i=n.symbol,a=n.className,s=n.title,l=n.titleId,c=Pl(r),u=ti("classes",[].concat(ei(ah(n)),ei(a.split(" ")))),d=ti("transform",typeof n.transform=="string"?gr.transform(n.transform):n.transform),f=ti("mask",Pl(o)),m=Al(c,Qo({},u,{},d,{},f,{symbol:i,title:s,titleId:l}));if(!m)return uh("Could not find icon",c),null;var p=m.abstract,y={ref:t};return Object.keys(n).forEach(function(v){lt.defaultProps.hasOwnProperty(v)||(y[v]=n[v])}),fh(p[0],y)}lt.displayName="FontAwesomeIcon";lt.propTypes={border:pe.default.bool,className:pe.default.string,mask:pe.default.oneOfType([pe.default.object,pe.default.array,pe.default.string]),fixedWidth:pe.default.bool,inverse:pe.default.bool,flip:pe.default.oneOf(["horizontal","vertical","both"]),icon:pe.default.oneOfType([pe.default.object,pe.default.array,pe.default.string]),listItem:pe.default.bool,pull:pe.default.oneOf(["right","left"]),pulse:pe.default.bool,rotation:pe.default.oneOf([0,90,180,270]),size:pe.default.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:pe.default.bool,symbol:pe.default.oneOfType([pe.default.bool,pe.default.string]),title:pe.default.string,transform:pe.default.oneOfType([pe.default.string,pe.default.object]),swapOpacity:pe.default.bool};lt.defaultProps={border:!1,className:"",mask:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,symbol:!1,title:"",transform:null,swapOpacity:!1};var fh=kl.bind(null,b.createElement);var ni=Re(zl()),ri=Re(Yl()),oi=Re(rc()),ii=Re(fc()),ai=Re(yc()),si=Re(Ac()),li=Re(Dc()),Vc=e=>b.createElement("svg",_t(Ue({},e),{viewBox:"64 -65 897 897"}),b.createElement("g",null,b.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`,fill:"var(--interactive-accent)"}))),Mc=e=>b.createElement("svg",_t(Ue({},e),{viewBox:"64 -65 897 897"}),b.createElement("g",null,b.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`,fill:"var(--interactive-accent)"})));var Ic=e=>b.createElement("svg",_t(Ue({},e),{viewBox:"64 -65 897 897"}),b.createElement("g",null,b.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`,fill:"var(--interactive-accent)"}))),$c='',Uc='',zc='';var Zt=Re(require("obsidian")),St=class extends Zt.Modal{constructor(t,n,r){super(t);this.file=n,this.action=r}onOpen(){let{contentEl:t}=this,n=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"),t.createEl("div",{text:r}).addClass("modal-title");let i=t.createEl("input");i.style.cssText="width: 100%; height: 2.5em; margin-bottom: 15px;",this.action==="rename"&&(this.file.name.endsWith(".md")?i.value=this.file.name.substring(0,this.file.name.lastIndexOf(".")):i.value=this.file.name),i.focus();let a;this.action==="rename"?a="Change Name":this.action==="create folder"?a="Create Folder":this.action==="create note"&&(a="Create Note");let s=t.createEl("button",{text:a}),l=t.createEl("button",{text:"Cancel"});l.style.cssText="float: right;",l.addEventListener("click",()=>{n.close()});let c=()=>Ee(this,null,function*(){let u=i.value;if(this.action==="rename")this.file.name.endsWith(".md")&&(u=u+".md"),this.app.fileManager.renameFile(this.file,this.file.parent.path+"/"+u);else if(this.action==="create folder")this.app.vault.createFolder(this.file.path+"/"+u);else if(this.action==="create note"){let d=yield this.app.fileManager.createNewMarkdownFile(this.file,u);this.app.workspace.activeLeaf.setViewState({type:"markdown",state:{file:d.path}})}n.close()});s.addEventListener("click",c),i.addEventListener("keydown",u=>{u.key==="Enter"&&c()})}onClose(){let{contentEl:t}=this;t.empty()}},Ln=class extends Zt.FuzzySuggestModal{constructor(t,n){super(t);this.fileOrFolderToMove=n}getItemText(t){return t.path}getItems(){return dh(this.app)}onChooseItem(t,n){this.app.vault.rename(this.fileOrFolderToMove,t.path+"/"+this.fileOrFolderToMove.name)}};function dh(e){let t=[],n=e.vault.getRoot();t.push(n);function r(o){for(let i of o.children)if(i instanceof Zt.TFolder){let a=i;t.push(a),a.children&&r(a)}}return r(n),t}var Tt=Re(require("obsidian")),Xt=(e,t,n)=>{var r=[],o=n?!0:t.settings.showFilesFromSubFolders;i(e,t.app);function i(a,s){var l=s.vault.getAbstractFileByPath(a);if(l instanceof Tt.TFolder&&l.children)for(let c of l.children)c instanceof Tt.TFile&&r.push(c),c instanceof Tt.TFolder&&o&&i(c.path,s)}return r},ci=e=>{let t={folder:e,children:[]};function n(r,o){if(!!(r&&r.children)){for(let i of r.children)if(i instanceof Tt.TFolder){let a=i,s={folder:a,children:[]};o.children.push(s),a.children&&n(a,s)}}}return n(e,t),t},ui=e=>{let t={},n;return e.settings.folderCountOption==="notes"?n=e.app.vault.getMarkdownFiles():n=e.app.vault.getFiles(),n.forEach(r=>{for(let o=r.parent;o!=null;o=o.parent)t[o.path]=1+(t[o.path]||0)}),t},jc=e=>{let t=e.children;for(let n of t)if(n instanceof Tt.TFolder)return!0;return!1},yr=e=>{var t=e.lastIndexOf(".");return{fileName:e.substring(0,t),extension:e.substring(t+1)}},br=(e,t)=>{if(e==="/")return t.vault.getName();let n=e.lastIndexOf("/");return n!==-1?e.substring(n+1):e},wr=(e,t)=>{var n;return(n=t.internalPlugins.plugins[e])==null?void 0:n._loaded},Bc=(e,t,n)=>{n.workspace.openLinkText(t,"/",Tt.Keymap.isModifier(e,"Mod")||e.button===1)};function ph(e){return!!e&&typeof e.then=="function"}var Ae=ph;function hh(e,t){if(e!=null)return e;throw new Error(t??"Got unexpected null or undefined")}var fe=hh,fi=class{},mh=new fi,di={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(e){return e.state===this.state&&e.contents===this.contents},map(e){if(this.state==="hasError")return this;if(this.state==="hasValue")try{let n=e(this.contents);return Ae(n)?Jt(n.then(r=>({__value:r}))):pi(n)}catch(n){return Ae(n)?Jt(n.next(()=>e(this.contents))):hi(n)}if(this.state==="loading")return Jt(this.contents.then(n=>({__value:e(n.__value)})).catch(n=>{if(Ae(n))return n.then(()=>e(this.contents));throw n}));throw new Error("Invalid Loadable state")}};function pi(e){return Object.freeze({state:"hasValue",contents:e,...di,getValue(){return this.contents},toPromise(){return Promise.resolve(this.contents)},valueMaybe(){return this.contents},valueOrThrow(){return this.contents}})}function hi(e){return Object.freeze({state:"hasError",contents:e,...di,getValue(){throw this.contents},toPromise(){return Promise.reject(this.contents)},errorMaybe(){return this.contents},errorOrThrow(){return this.contents}})}function Jt(e){return Object.freeze({state:"loading",contents:e,...di,getValue(){throw this.contents.then(({__value:t})=>t)},toPromise(){return this.contents.then(({__value:t})=>t)},promiseMaybe(){return this.contents.then(({__value:t})=>t)},promiseOrThrow(){return this.contents.then(({__value:t})=>t)}})}function vh(){return Jt(new Promise(()=>{}))}function _h(e){return e.every(t=>t.state==="hasValue")?pi(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?hi(fe(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):Jt(Promise.all(e.map(t=>t.contents)).then(t=>({__value:t})))}var Pn={loadableWithValue:pi,loadableWithError:hi,loadableWithPromise:Jt,loadableLoading:vh,loadableAll:_h,Canceled:fi,CANCELED:mh},mi,Wc=(mi=b.useMutableSource)!==null&&mi!==void 0?mi:b.unstable_useMutableSource;function gh(){return Wc&&!(typeof window!="undefined"&&window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE)}var Hc={mutableSourceExists:gh,useMutableSource:Wc},{mutableSourceExists:yh}=Hc,vi=new Map().set("recoil_hamt_2020",!0).set("recoil_memory_managament_2020",!0).set("recoil_suppress_rerender_in_callback",!0);function _i(e){var t;return e==="recoil_early_rendering_2021"&&!yh()?!1:(t=vi.get(e))!==null&&t!==void 0?t:!1}_i.setPass=e=>{vi.set(e,!0)};_i.setFail=e=>{vi.set(e,!1)};var he=_i;function bh(e,t,{error:n}={}){return null}var wh=bh,ht=wh;function Sh(e,t){let n=new Set(e);return n.add(t),n}function Th(e,t){let n=new Set(e);return n.delete(t),n}function xh(e,t,n){let r=new Map(e);return r.set(t,n),r}function Eh(e,t,n){let r=new Map(e);return r.set(t,n(r.get(t))),r}function Rh(e,t){let n=new Map(e);return n.delete(t),n}function Ah(e,t){let n=new Map(e);return t.forEach(r=>n.delete(r)),n}var qc={setByAddingToSet:Sh,setByDeletingFromSet:Th,mapBySettingInMap:xh,mapByUpdatingInMap:Eh,mapByDeletingFromMap:Rh,mapByDeletingMultipleFromMap:Ah};function*Fh(e,t){let n=0;for(let r of e)t(r,n++)&&(yield r)}var Gc=Fh;function Ch(e,t){return function*(){let n=0;for(let r of e)yield t(r,n++)}()}var Kc=Ch;function Nh(e,...t){}var kh=Nh,gi=kh;function ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sr=class{constructor(t){ae(this,"key",void 0),this.key=t}},yi=class extends Sr{},bi=class extends Sr{};function Lh(e){return e instanceof yi||e instanceof bi}var Tr={AbstractRecoilValue:Sr,RecoilState:yi,RecoilValueReadOnly:bi,isRecoilValue:Lh},Ph=Tr.AbstractRecoilValue,Oh=Tr.RecoilState,Dh=Tr.RecoilValueReadOnly,Vh=Tr.isRecoilValue,Ot=Object.freeze({__proto__:null,AbstractRecoilValue:Ph,RecoilState:Oh,RecoilValueReadOnly:Dh,isRecoilValue:Vh}),wi=class{},Mh=new wi,Yc=class extends Error{constructor(t){super(`Tried to set the value of Recoil selector ${t} using an updater function, but it is an async selector in a pending or error state; this is not supported.`)}},Dt=new Map,Si=new Map;function Ih(e){return Kc(e,t=>fe(Si.get(t)))}function $h(e){if(Dt.has(e.key)){let n=`Duplicate atom key "${e.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(n)}Dt.set(e.key,e);let t=e.set==null?new Ot.RecoilValueReadOnly(e.key):new Ot.RecoilState(e.key);return Si.set(e.key,t),t}var Ti=class extends Error{};function Uh(e){let t=Dt.get(e);if(t==null)throw new Ti(`Missing definition for RecoilValue: "${e}""`);return t}function zh(e){return Dt.get(e)}var xr=new Map;function jh(e){var t;if(!he("recoil_memory_managament_2020"))return;let n=Dt.get(e);if(n==null||(t=n.shouldDeleteConfigOnRelease)===null||t===void 0?void 0:t.call(n)){var r;Dt.delete(e),(r=Zc(e))===null||r===void 0||r(),xr.delete(e)}}function Bh(e,t){!he("recoil_memory_managament_2020")||(t===void 0?xr.delete(e):xr.set(e,t))}function Zc(e){return xr.get(e)}var rt={nodes:Dt,recoilValues:Si,registerNode:$h,getNode:Uh,getNodeMaybe:zh,deleteNodeConfigIfPossible:jh,setConfigDeletionHandler:Bh,getConfigDeletionHandler:Zc,recoilValuesForKeys:Ih,NodeMissingError:Ti,DefaultValue:wi,DEFAULT_VALUE:Mh,RecoilValueNotReady:Yc},xi=class{};function Wh(){return new xi}var Er={RetentionZone:xi,retentionZone:Wh},{setByAddingToSet:Hh}=qc,{getNode:Rr,getNodeMaybe:qh,recoilValuesForKeys:Xc}=rt,{RetentionZone:Jc}=Er,Gh=Object.freeze(new Set),Qc=class extends Error{};function Kh(e,t,n){if(!he("recoil_memory_managament_2020"))return()=>{};let{nodesRetainedByZone:r}=e.getState().retention;function o(i){let a=r.get(i);a||r.set(i,a=new Set),a.add(t)}if(n instanceof Jc)o(n);else if(Array.isArray(n))for(let i of n)o(i);return()=>{if(!he("recoil_memory_managament_2020"))return;let i=e.getState().retention.nodesRetainedByZone;function a(s){let l=i.get(s);l&&l.delete(t),l&&l.size===0&&i.delete(s)}if(n instanceof Jc)a(n);else if(Array.isArray(n))for(let s of n)a(s)}}function Ei(e,t,n,r){let o=e.getState();if(o.nodeCleanupFunctions.has(n))return;let i=Rr(n),a=Kh(e,n,i.retainedBy),s=i.init(e,t,r);o.nodeCleanupFunctions.set(n,()=>{s(),a()})}function Yh(e,t){var n;let r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function Zh(e,t,n){return Ei(e,t,n,"get"),Rr(n).get(e,t)}function eu(e,t,n){return Rr(n).peek(e,t)}function Xh(e,t,n){var r;let o=qh(t);return o==null||(r=o.invalidate)===null||r===void 0||r.call(o,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:Hh(e.dirtyAtoms,t)}}function Jh(e,t,n,r){let o=Rr(n);if(o.set==null)throw new Qc(`Attempt to set read-only RecoilValue: ${n}`);let i=o.set;return Ei(e,t,n,"set"),i(e,t,r)}function Qh(e,t,n){var r,o,i;let a=e.getState(),s=e.getGraph(t.version),l=a.knownAtoms.has(n)?"atom":a.knownSelectors.has(n)?"selector":void 0,c=Gc(tu(e,t,new Set([n])),u=>u!==n);return{loadable:eu(e,t,n),isActive:a.knownAtoms.has(n)||a.knownSelectors.has(n),isSet:l==="selector"?!1:t.atomValues.has(n),isModified:t.dirtyAtoms.has(n),type:l,deps:Xc((r=s.nodeDeps.get(n))!==null&&r!==void 0?r:[]),subscribers:{nodes:Xc(c),components:Kc((o=(i=a.nodeToComponentSubscriptions.get(n))===null||i===void 0?void 0:i.values())!==null&&o!==void 0?o:[],([u])=>({name:u}))}}}function tu(e,t,n){let r=new Set,o=Array.from(n),i=e.getGraph(t.version);for(let s=o.pop();s;s=o.pop()){var a;r.add(s);let l=(a=i.nodeToNodeSubscriptions.get(s))!==null&&a!==void 0?a:Gh;for(let c of l)r.has(c)||o.push(c)}return r}var Qt={getNodeLoadable:Zh,peekNodeLoadable:eu,setNodeValue:Jh,cleanUpNode:Yh,setUnvalidatedAtomValue_DEPRECATED:Xh,peekNodeInfo:Qh,getDownstreamNodes:tu,initializeNodeIfNewToStore:Ei},{CANCELED:em}=Pn,{getDownstreamNodes:tm,getNodeLoadable:nu,setNodeValue:nm}=Qt,{getNodeMaybe:ru}=rt,{DefaultValue:Ri,RecoilValueNotReady:rm}=rt,{AbstractRecoilValue:om,RecoilState:im,RecoilValueReadOnly:am,isRecoilValue:sm}=Ot;function lm(e,{key:t},n=e.getState().currentTree){var r,o;let i=e.getState();n.version===i.currentTree.version||n.version===((r=i.nextTree)===null||r===void 0?void 0:r.version)||n.version===((o=i.previousTree)===null||o===void 0?void 0:o.version)||ht("Tried to read from a discarded tree");let a=nu(e,n,t);return a.state==="loading"&&a.contents.catch(()=>em),a}function cm(e,t){let n=e.clone();return t.forEach((r,o)=>{r.state==="hasValue"&&r.contents instanceof Ri?n.delete(o):n.set(o,r)}),n}function um(e,t,{key:n},r){if(typeof r=="function"){let o=nu(e,t,n);if(o.state==="loading")throw new rm(n);if(o.state==="hasError")throw o.contents;return r(o.contents)}else return r}function fm(e,t,n){if(n.type==="set"){let{recoilValue:o,valueOrUpdater:i}=n,a=um(e,t,o,i),s=nm(e,t,o.key,a);for(let[l,c]of s.entries())Ai(t,l,c)}else if(n.type==="setLoadable"){let{recoilValue:{key:o},loadable:i}=n;Ai(t,o,i)}else if(n.type==="markModified"){let{recoilValue:{key:o}}=n;t.dirtyAtoms.add(o)}else if(n.type==="setUnvalidated"){var r;let{recoilValue:{key:o},unvalidatedValue:i}=n,a=ru(o);a==null||(r=a.invalidate)===null||r===void 0||r.call(a,t),t.atomValues.delete(o),t.nonvalidatedAtoms.set(o,i),t.dirtyAtoms.add(o)}else ht(`Unknown action ${n.type}`)}function Ai(e,t,n){n.state==="hasValue"&&n.contents instanceof Ri?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function ou(e,t){e.replaceState(n=>{let r=iu(n);for(let o of t)fm(e,r,o);return Fi(e,r),r})}function Ar(e,t){if(On.length){let n=On[On.length-1],r=n.get(e);r||n.set(e,r=[]),r.push(t)}else ou(e,[t])}var On=[];function dm(){let e=new Map;return On.push(e),()=>{for(let[n,r]of e)ou(n,r);On.pop()!==e&&ht("Incorrect order of batch popping")}}function iu(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function Fi(e,t){let n=tm(e,t,t.dirtyAtoms);for(let i of n){var r,o;(r=ru(i))===null||r===void 0||(o=r.invalidate)===null||o===void 0||o.call(r,t)}}function au(e,t,n){Ar(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function pm(e,t,n){if(n instanceof Ri)return au(e,t,n);Ar(e,{type:"setLoadable",recoilValue:t,loadable:n})}function hm(e,t){Ar(e,{type:"markModified",recoilValue:t})}function mm(e,t,n){Ar(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}var vm=0;function _m(e,{key:t},n,r=null){let o=vm++,i=e.getState();if(i.nodeToComponentSubscriptions.has(t)||i.nodeToComponentSubscriptions.set(t,new Map),fe(i.nodeToComponentSubscriptions.get(t)).set(o,[r??"",n]),he("recoil_early_rendering_2021")){let a=e.getState().nextTree;a&&a.dirtyAtoms.has(t)&&n(a)}return{release:()=>{let a=e.getState(),s=a.nodeToComponentSubscriptions.get(t);if(s===void 0||!s.has(o)){ht(`Subscription missing at release time for atom ${t}. This is a bug in Recoil.`);return}s.delete(o),s.size===0&&a.nodeToComponentSubscriptions.delete(t)}}}var Vt={RecoilValueReadOnly:am,AbstractRecoilValue:om,RecoilState:im,getRecoilValueAsLoadable:lm,setRecoilValue:au,setRecoilValueLoadable:pm,markRecoilValueModified:hm,setUnvalidatedRecoilValue:mm,subscribeToRecoilValue:_m,isRecoilValue:sm,applyAtomValueWrites:cm,batchStart:dm,writeLoadableToTreeState:Ai,invalidateDownstreams:Fi,copyTreeState:iu,invalidateDownstreams_FOR_TESTING:Fi},{unstable_batchedUpdates:gm}=b,ym={unstable_batchedUpdates:gm},{unstable_batchedUpdates:bm}=ym,wm={unstable_batchedUpdates:bm},{batchStart:Sm}=Vt,{unstable_batchedUpdates:Tm}=wm,Ci=Tm,xm=e=>{Ci=e},Em=()=>Ci,Rm=e=>{Ci(()=>{let t=()=>{};try{t=Sm(),e()}finally{t()}})},Ni={getBatcher:Em,setBatcher:xm,batchUpdates:Rm};function Am(e,t){t()}var Fm={enqueueExecution:Am};function Cm(e,...t){let n=new Set;e:for(let r of e){for(let o of t)if(o.has(r))continue e;n.add(r)}return n}var Fr=Cm;function Nm(e,t){let n=new Map;return e.forEach((r,o)=>{n.set(o,t(r,o))}),n}var Cr=Nm;function km(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function Lm(e){return{nodeDeps:Cr(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:Cr(e.nodeToNodeSubscriptions,t=>new Set(t))}}function ki(e,t,n){let{nodeDeps:r,nodeToNodeSubscriptions:o}=t;e.forEach((i,a)=>{let s=r.get(a);if(s&&n&&s!==n.nodeDeps.get(a))return;r.set(a,new Set(i)),(s==null?i:Fr(i,s)).forEach(c=>{o.has(c)||o.set(c,new Set),fe(o.get(c)).add(a)}),s&&Fr(s,i).forEach(u=>{if(!o.has(u))return;let d=fe(o.get(u));d.delete(a),d.size===0&&o.delete(u)})})}function Pm(e,t,n){var r,o,i,a;let s=t.getState();n===s.currentTree.version||n===((r=s.nextTree)===null||r===void 0?void 0:r.version)||n===((o=s.previousTree)===null||o===void 0?void 0:o.version)||ht("Tried to save dependencies to a discarded tree");let l=t.getGraph(n);if(ki(e,l),n===((i=s.previousTree)===null||i===void 0?void 0:i.version)){let u=t.getGraph(s.currentTree.version);ki(e,u,l)}if(n===((a=s.previousTree)===null||a===void 0?void 0:a.version)||n===s.currentTree.version){var c;let u=(c=s.nextTree)===null||c===void 0?void 0:c.version;if(u!==void 0){let d=t.getGraph(u);ki(e,d,l)}}}function Om(e,t){e.forEach((n,r)=>{t.has(r)||t.set(r,new Set);let o=fe(t.get(r));n.forEach(i=>o.add(i))})}function Dm(e,t,n){n.has(e)||n.set(e,new Set),fe(n.get(e)).add(t)}var Dn={addToDependencyMap:Dm,cloneGraph:Lm,graph:km,mergeDepsIntoDependencyMap:Om,saveDependencyMapToStore:Pm};function Vm(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Mm=Vm(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},n={},r=5,o=Math.pow(2,r),i=o-1,a=o/2,s=o/4,l={},c=function(h){return function(){return h}},u=n.hash=function(g){var h=typeof g=="undefined"?"undefined":t(g);if(h==="number")return g;h!=="string"&&(g+="");for(var E=0,k=0,L=g.length;k>1&1431655765,h=(h&858993459)+(h>>2&858993459),h=h+(h>>4)&252645135,h+=h>>8,h+=h>>16,h&127},f=function(h,E){return E>>>h&i},m=function(h){return 1<=E;)L[X--]=L[X];return L[E]=k,L}for(var K=0,Y=0,te=new Array(M+1);K>>=1;return X[E]=k,ee(h,Y+1,X)},ne=function(h,E,k,L){for(var M=new Array(E-1),X=0,K=0,Y=0,te=L.length;Y1?Z(h,this.hash,te):te[0]}var be=L();return be===l?this:(++K.value,_e(h,k,this.hash,this,M,B(h,M,X,be)))},G=function(h,E,k,L,M,X,K){var Y=this.mask,te=this.children,be=f(k,M),Ie=m(be),ke=p(Y,Ie),qe=Y&Ie,it=qe?te[ke]:V,Ut=it._modify(h,E,k+r,L,M,X,K);if(it===Ut)return this;var Xn=ie(h,this),mn=Y,vn=void 0;if(qe&&I(Ut)){if(mn&=~Ie,!mn)return V;if(te.length<=2&&Te(te[ke^1]))return te[ke^1];vn=v(Xn,ke,te)}else if(!qe&&!I(Ut)){if(te.length>=a)return Q(h,be,Ut,Y,te);mn|=Ie,vn=w(Xn,ke,Ut,te)}else vn=y(Xn,ke,Ut,te);return Xn?(this.mask=mn,this.children=vn,this):W(h,mn,vn)},le=function(h,E,k,L,M,X,K){var Y=this.size,te=this.children,be=f(k,M),Ie=te[be],ke=(Ie||V)._modify(h,E,k+r,L,M,X,K);if(Ie===ke)return this;var qe=ie(h,this),it=void 0;if(I(Ie)&&!I(ke))++Y,it=y(qe,be,ke,te);else if(!I(Ie)&&I(ke)){if(--Y,Y<=s)return ne(h,Y,be,te);it=y(qe,be,V,te)}else it=y(qe,be,ke,te);return qe?(this.size=Y,this.children=it,this):ee(h,Y,it)};V._modify=function(g,h,E,k,L,M,X){var K=k();return K===l?V:(++X.value,B(g,L,M,K))};function C(g,h,E,k,L){this._editable=g,this._edit=h,this._config=E,this._root=k,this._size=L}C.prototype.setTree=function(g,h){return this._editable?(this._root=g,this._size=h,this):g===this._root?this:new C(this._editable,this._edit,this._config,g,h)};var q=n.tryGetHash=function(g,h,E,k){for(var L=k._root,M=0,X=k._config.keyEq;;)switch(L.type){case S:return X(E,L.key)?L.value:g;case T:{if(h===L.hash)for(var K=L.children,Y=0,te=K.length;Yjm++;function uu(){let e=cu();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:lu(),nonvalidatedAtoms:lu()}}function Bm(){let e=uu();return{currentTree:e,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(e.version,zm()),versionsUsedByComponent:new Map,retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var fu={makeEmptyTreeState:uu,makeEmptyStoreState:Bm,getNextTreeStateVersion:cu};function Wm(...e){let t=new Set;for(let n of e)for(let r of n)t.add(r);return t}var Hm=Wm;function qm(e,t,n){let r=e.entries(),o=r.next();for(;!o.done;){let i=o.value;if(t.call(n,i[1],i[0],e))return!0;o=r.next()}return!1}var Gm=qm,{cleanUpNode:Km}=Qt,{deleteNodeConfigIfPossible:Ym,getNode:du}=rt,{RetentionZone:pu}=Er,hu=new Set;function mu(e,t){let n=e.getState(),r=n.currentTree;if(n.nextTree){ht("releaseNodesNowOnCurrentTree should only be called at the end of a batch");return}let o=new Set;for(let a of t)if(a instanceof pu)for(let s of Qm(n,a))o.add(s);else o.add(a);let i=Zm(e,o);for(let a of i)Jm(e,r,a)}function Zm(e,t){let n=e.getState(),r=n.currentTree,o=e.getGraph(r.version),i=new Set,a=new Set;return s(t),i;function s(l){let c=new Set,u=Xm(e,r,l,i,a);for(let p of u){var d;if(du(p).retainedBy==="recoilRoot"){a.add(p);continue}if(((d=n.retention.referenceCounts.get(p))!==null&&d!==void 0?d:0)>0){a.add(p);continue}if(vu(p).some(v=>n.retention.referenceCounts.get(v))){a.add(p);continue}let y=o.nodeToNodeSubscriptions.get(p);if(y&&Gm(y,v=>a.has(v))){a.add(p);continue}i.add(p),c.add(p)}let f=new Set;for(let p of c)for(let y of(m=o.nodeDeps.get(p))!==null&&m!==void 0?m:hu){var m;i.has(y)||f.add(y)}f.size&&s(f)}}function Xm(e,t,n,r,o){let i=e.getGraph(t.version),a=[],s=new Set;for(;n.size>0;)l(fe(n.values().next().value));return a;function l(c){if(r.has(c)||o.has(c)){n.delete(c);return}if(s.has(c))return;let u=i.nodeToNodeSubscriptions.get(c);if(u)for(let d of u)l(d);s.add(c),n.delete(c),a.push(c)}}function Jm(e,t,n){if(!he("recoil_memory_managament_2020"))return;Km(e,n);let r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);let o=vu(n);for(let l of o){var i;(i=r.retention.nodesRetainedByZone.get(l))===null||i===void 0||i.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);let a=r.graphsByVersion.get(t.version);if(a){let l=a.nodeDeps.get(n);if(l!==void 0){a.nodeDeps.delete(n);for(let c of l){var s;(s=a.nodeToNodeSubscriptions.get(c))===null||s===void 0||s.delete(n)}}a.nodeToNodeSubscriptions.delete(n)}Ym(n)}function Qm(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:hu}function vu(e){let t=du(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof pu?[t]:t}function ev(e,t){let n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):mu(e,new Set([t]))}function tv(e,t,n){var r;if(!he("recoil_memory_managament_2020"))return;let o=e.getState().retention.referenceCounts,i=((r=o.get(t))!==null&&r!==void 0?r:0)+n;i===0?_u(e,t):o.set(t,i)}function _u(e,t){if(!he("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),ev(e,t)}function nv(e){if(!he("recoil_memory_managament_2020"))return;let t=e.getState();mu(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function rv(e){return e===void 0?"recoilRoot":e}var Vn={updateRetainCount:tv,updateRetainCountToZero:_u,releaseScheduledRetainablesNow:nv,retainedByOptionWithDefault:rv};function*ov(e){for(let t of e)for(let n of t)yield n}var iv=ov,av=typeof window=="undefined",sv=typeof navigator!="undefined"&&navigator.product==="ReactNative",gu={isSSR:av,isReactNative:sv},{isSSR:lv}=gu,{batchUpdates:Pi}=Ni,{initializeNodeIfNewToStore:cv,peekNodeInfo:uv}=Qt,{graph:fv}=Dn,{DEFAULT_VALUE:dv,recoilValues:yu,recoilValuesForKeys:bu}=rt,{AbstractRecoilValue:pv,getRecoilValueAsLoadable:hv,setRecoilValue:wu,setUnvalidatedRecoilValue:mv}=Vt,{updateRetainCount:kr}=Vn,{getNextTreeStateVersion:vv,makeEmptyStoreState:_v}=fu;var Mn=class{constructor(t){ae(this,"_store",void 0),ae(this,"_refCount",0),ae(this,"getLoadable",n=>(this.checkRefCount_INTERNAL(),hv(this._store,n))),ae(this,"getPromise",n=>(this.checkRefCount_INTERNAL(),this.getLoadable(n).toPromise())),ae(this,"getNodes_UNSTABLE",n=>{if(this.checkRefCount_INTERNAL(),(n==null?void 0:n.isModified)===!0){if((n==null?void 0:n.isInitialized)===!1)return[];let i=this._store.getState().currentTree;return bu(i.dirtyAtoms)}let r=this._store.getState().knownAtoms,o=this._store.getState().knownSelectors;return(n==null?void 0:n.isInitialized)==null?yu.values():n.isInitialized===!0?bu(iv([this._store.getState().knownAtoms,this._store.getState().knownSelectors])):Gc(yu.values(),({key:i})=>!r.has(i)&&!o.has(i))}),ae(this,"getInfo_UNSTABLE",({key:n})=>(this.checkRefCount_INTERNAL(),uv(this._store,this._store.getState().currentTree,n))),ae(this,"map",n=>{this.checkRefCount_INTERNAL();let r=new Lr(this,Pi);return n(r),Oi(r.getStore_INTERNAL())}),ae(this,"asyncMap",async n=>{this.checkRefCount_INTERNAL();let r=new Lr(this,Pi);return await n(r),Oi(r.getStore_INTERNAL())}),this._store={getState:()=>t,replaceState:n=>{t.currentTree=n(t.currentTree)},getGraph:n=>{let r=t.graphsByVersion;if(r.has(n))return fe(r.get(n));let o=fv();return r.set(n,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw new Error("Cannot subscribe to Snapshots")}};for(let n of this._store.getState().nodeCleanupFunctions.keys())cv(this._store,t.currentTree,n,"get"),kr(this._store,n,1);this.retain(),this.autorelease_INTERNAL()}retain(){if(!he("recoil_memory_managament_2020"))return()=>{};this._refCount++;let t=!1;return()=>{t||(t=!0,this.release_INTERNAL())}}autorelease_INTERNAL(){!he("recoil_memory_managament_2020")||lv||window.setTimeout(()=>this.release_INTERNAL(),0)}release_INTERNAL(){!he("recoil_memory_managament_2020")||(this._refCount--,this._refCount===0)}checkRefCount_INTERNAL(){he("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 Su(e,t,n=!1){let r=e.getState(),o=n?vv():t.version;return{currentTree:n?{version:o,stateID:o,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()}:t,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(o,e.getGraph(t.version)),versionsUsedByComponent:new Map,retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}function gv(e){let t=new Mn(_v());return e!=null?t.map(e):t}function Oi(e,t="current"){let n=e.getState(),r=t==="current"?n.currentTree:fe(n.previousTree);return new Mn(Su(e,r))}var Lr=class extends Mn{constructor(t,n){super(Su(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0));ae(this,"_batch",void 0),ae(this,"set",(r,o)=>{this.checkRefCount_INTERNAL();let i=this.getStore_INTERNAL();this._batch(()=>{kr(i,r.key,1),wu(this.getStore_INTERNAL(),r,o)})}),ae(this,"reset",r=>{this.checkRefCount_INTERNAL();let o=this.getStore_INTERNAL();this._batch(()=>{kr(o,r.key,1),wu(this.getStore_INTERNAL(),r,dv)})}),ae(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();let o=this.getStore_INTERNAL();Pi(()=>{for(let[i,a]of r.entries())kr(o,i,1),mv(o,new pv(i),a)})}),this._batch=n}},Pr={Snapshot:Mn,MutableSnapshot:Lr,freshSnapshot:gv,cloneSnapshot:Oi},yv=Pr.Snapshot,bv=Pr.MutableSnapshot,wv=Pr.freshSnapshot,Sv=Pr.cloneSnapshot,Or=Object.freeze({__proto__:null,Snapshot:yv,MutableSnapshot:bv,freshSnapshot:wv,cloneSnapshot:Sv}),{getNextTreeStateVersion:Tv,makeEmptyStoreState:Tu}=fu,{cleanUpNode:xv,getDownstreamNodes:Ev,setNodeValue:Rv,setUnvalidatedAtomValue_DEPRECATED:Av}=Qt,{graph:Fv}=Dn,{cloneGraph:Cv}=Dn,{applyAtomValueWrites:Nv}=Vt,{releaseScheduledRetainablesNow:xu}=Vn,{freshSnapshot:kv}=Or,{useCallback:Lv,useContext:Eu,useEffect:Di,useMemo:Pv,useRef:Vi,useState:Ov}=b;function In(){throw new Error("This component must be used inside a component.")}var Ru=Object.freeze({getState:In,replaceState:In,getGraph:In,subscribeToTransactions:In,addTransactionMetadata:In}),Mi=!1;function Au(e){if(Mi)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 t=e.getState();if(t.nextTree===null){he("recoil_memory_managament_2020")&&he("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&xu(e);let n=t.currentTree.version,r=Tv();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,Cv(fe(t.graphsByVersion.get(n))))}}var Fu=b.createContext({current:Ru}),Ii=()=>Eu(Fu),Cu=b.createContext(null);function Dv(){let e=Eu(Cu);return e==null&&gi("Attempted to use a Recoil hook outside of a . must be an ancestor of any component that uses Recoil hooks."),e}function $i(e,t,n){let r=Ev(e,n,n.dirtyAtoms);for(let o of r){let i=t.nodeToComponentSubscriptions.get(o);if(i)for(let[a,[s,l]]of i)l(n)}}function Nu(e){let t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(let[o,i]of t.nodeTransactionSubscriptions)if(r.has(o))for(let[a,s]of i)s(e);for(let[o,i]of t.transactionSubscriptions)i(e);(!he("recoil_early_rendering_2021")||t.suspendedComponentResolvers.size)&&($i(e,t,n),t.suspendedComponentResolvers.forEach(o=>o()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(o=>o(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function Vv(e){let t=e.current.getState();t.commitDepth++;try{let{nextTree:n}=t;if(n===null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,Nu(e.current),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):ht("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,he("recoil_memory_managament_2020")&&xu(e.current)}finally{t.commitDepth--}}function Mv({setNotifyBatcherOfChange:e}){let t=Ii(),[n,r]=Ov([]);return e(()=>r({})),Di(()=>{Fm.enqueueExecution("Batcher",()=>{Vv(t)})}),Di(()=>()=>{e(()=>{})},[e]),null}function Iv(e,t){let n=Tu();return t({set:(r,o)=>{let i=n.currentTree,a=Rv(e,i,r.key,o),s=new Set(a.keys()),l=i.nonvalidatedAtoms.clone();for(let c of s)l.delete(c);n.currentTree={...i,dirtyAtoms:Hm(i.dirtyAtoms,s),atomValues:Nv(i.atomValues,a),nonvalidatedAtoms:l}},setUnvalidatedAtomValues:r=>{r.forEach((o,i)=>{n.currentTree=Av(n.currentTree,i,o)})}}),n}function $v(e){return kv().map(e).getStore_INTERNAL().getState()}var ku=0;function Uv({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){var o;let i,a=v=>{let w=i.current.graphsByVersion;if(w.has(v))return fe(w.get(v));let S=Fv();return w.set(v,S),S},s=(v,w)=>{if(w==null){let{transactionSubscriptions:S}=p.current.getState(),T=ku++;return S.set(T,v),{release:()=>{S.delete(T)}}}else{let{nodeTransactionSubscriptions:S}=p.current.getState();S.has(w)||S.set(w,new Map);let T=ku++;return fe(S.get(w)).set(T,v),{release:()=>{let R=S.get(w);R&&(R.delete(T),R.size===0&&S.delete(w))}}}},l=v=>{Au(p.current);for(let w of Object.keys(v))fe(p.current.getState().nextTree).transactionMetadata[w]=v[w]},c=v=>{let w=p.current.getState();Au(p.current);let S=fe(w.nextTree),T;try{Mi=!0,T=v(S)}finally{Mi=!1}T!==S&&(w.nextTree=T,he("recoil_early_rendering_2021")&&$i(m,w,T),fe(u.current)())},u=Vi(null),d=Lv(v=>{u.current=v},[u]),f=(o=b.createMutableSource)!==null&&o!==void 0?o:b.unstable_createMutableSource,m=n??{getState:()=>i.current,replaceState:c,getGraph:a,subscribeToTransactions:s,addTransactionMetadata:l},p=Vi(m);i=Vi(e!=null?Iv(m,e):t!=null?$v(t):Tu());let y=Pv(()=>f?f(i,()=>i.current.currentTree.version):null,[f,i]);return Di(()=>()=>{for(let v of p.current.getState().knownAtoms)xv(p.current,v)},[]),b.createElement(Fu.Provider,{value:p},b.createElement(Cu.Provider,{value:y},b.createElement(Mv,{setNotifyBatcherOfChange:d}),r))}function zv(e){let{override:t,...n}=e,r=Ii();return t===!1&&r.current!==Ru?e.children:b.createElement(Uv,n)}var Dr={useStoreRef:Ii,useRecoilMutableSource:Dv,RecoilRoot:zv,notifyComponents_FOR_TESTING:$i,sendEndOfBatchNotifications_FOR_TESTING:Nu},{loadableWithValue:jv}=Pn,{DEFAULT_VALUE:Bv,getNode:Wv}=rt,{copyTreeState:Hv,getRecoilValueAsLoadable:qv,invalidateDownstreams:Gv,writeLoadableToTreeState:Kv}=Vt;function Lu(e){return Wv(e.key).nodeType==="atom"}var Pu=class{constructor(t,n){ae(this,"_store",void 0),ae(this,"_treeState",void 0),ae(this,"_changes",void 0),ae(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!Lu(r))throw new Error("Reading selectors within atomicUpdate is not supported");let o=qv(this._store,r,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:new Error(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),ae(this,"set",(r,o)=>{if(!Lu(r))throw new Error("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){let i=this.get(r);this._changes.set(r.key,o(i))}else this._changes.set(r.key,o)}),ae(this,"reset",r=>{this.set(r,Bv)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;let t=Hv(this._treeState);for(let[n,r]of this._changes)Kv(t,n,jv(r));return Gv(this._store,t),t}};function Yv(e){return t=>{e.replaceState(n=>{let r=new Pu(e,n);return t(r),r.newTreeState_INTERNAL()})}}var Zv={atomicUpdater:Yv},Xv=Zv.atomicUpdater,Jv=Object.freeze({__proto__:null,atomicUpdater:Xv});function Qv(e,t){let n=new Map;for(let[r,o]of e)t(o,r)&&n.set(r,o);return n}var e_=Qv;function t_(e,t){let n=new Set;for(let r of e)t(r)&&n.add(r);return n}var n_=t_;function r_(e,t){if(!e)throw new Error(t)}var o_=r_,Vr=o_;function i_(...e){let t=new Map;for(let n=0;n"}var Ui=u_,{atomicUpdater:Ou}=Jv,{batchUpdates:zi}=Ni,{DEFAULT_VALUE:Mr,getNode:Du,nodes:f_}=rt,{useRecoilMutableSource:d_,useStoreRef:We}=Dr;var{AbstractRecoilValue:ji,getRecoilValueAsLoadable:$n,setRecoilValue:en,setRecoilValueLoadable:p_,setUnvalidatedRecoilValue:h_,subscribeToRecoilValue:Bi}=Vt,{updateRetainCount:Un}=Vn,{RetentionZone:m_}=Er,{Snapshot:p1,cloneSnapshot:zn}=Or,{setByAddingToSet:v_}=qc,{isSSR:Ir}=gu,{mutableSourceExists:__,useMutableSource:g_}=Hc,{useCallback:ct,useEffect:xt,useMemo:Vu,useRef:At,useState:Wi}=b,Mu=12e4;function Iu(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(o=>{n.current.getState().suspendedComponentResolvers.add(o)}):e.state==="hasError"?e.contents:new Error(`Invalid value of loadable atom "${t.key}"`)}function y_(){let e=We(),[t,n]=Wi([]),r=At(new Set);r.current=new Set;let o=At(new Set),i=At(new Map),a=ct(l=>{let c=i.current.get(l);c&&(c.release(),i.current.delete(l))},[i]),s=Ui();return xt(()=>{let l=e.current;function c(u,d){!i.current.has(d)||n([])}Fr(r.current,o.current).forEach(u=>{if(i.current.has(u)){gi(`Double subscription to RecoilValue "${u}"`);return}let d=Bi(l,new ji(u),m=>{c(m,u)},s);i.current.set(u,d),l.getState().nextTree?l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{c(l.getState(),u)}):c(l.getState(),u)}),Fr(o.current,r.current).forEach(u=>{a(u)}),o.current=r.current}),xt(()=>{let l=i.current;return()=>l.forEach((c,u)=>a(u))},[a]),Vu(()=>{function l(p){return y=>{en(e.current,p,y)}}function c(p){return()=>en(e.current,p,Mr)}function u(p){var y;r.current.has(p.key)||(r.current=v_(r.current,p.key));let v=e.current.getState();return $n(e.current,p,he("recoil_early_rendering_2021")&&(y=v.nextTree)!==null&&y!==void 0?y:v.currentTree)}function d(p){let y=u(p);return Iu(y,p,e)}function f(p){return[d(p),l(p)]}function m(p){return[u(p),l(p)]}return{getRecoilValue:d,getRecoilValueLoadable:u,getRecoilState:f,getRecoilStateLoadable:m,getSetRecoilState:l,getResetRecoilState:c}},[r,e])}var b_={current:0};function w_(e){let t=We(),n=ct(()=>{var c;let u=t.current,d=u.getState(),f=he("recoil_early_rendering_2021")&&(c=d.nextTree)!==null&&c!==void 0?c:d.currentTree;return $n(u,e,f)},[t,e]),r=ct(()=>n(),[n]),o=Ui(),i=ct((c,u)=>{let d=t.current;return Bi(d,e,()=>{if(!he("recoil_suppress_rerender_in_callback"))return u();let m=n();l.current.is(m)||u(),l.current=m},o).release},[t,e,o,n]),a=d_(),s=g_(a,r,i),l=At(s);return xt(()=>{l.current=s}),s}function S_(e){let t=We(),[n,r]=Wi([]),o=Ui();xt(()=>{let s=t.current,l=s.getState(),c=Bi(s,e,d=>{var f;if(!he("recoil_suppress_rerender_in_callback"))return r([]);let m=$n(s,e,s.getState().currentTree);((f=a.current)===null||f===void 0?void 0:f.is(m))||r(m),a.current=m},o);if(l.nextTree)s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a.current=null,r([])});else{var u;if(!he("recoil_suppress_rerender_in_callback"))return r([]);let d=$n(s,e,s.getState().currentTree);((u=a.current)===null||u===void 0?void 0:u.is(d))||r(d),a.current=d}return c.release},[o,e,t]);let i=$n(t.current,e),a=At(i);return xt(()=>{a.current=i}),i}function Hi(e){return he("recoil_memory_managament_2020")&&Bu(e),__()?w_(e):S_(e)}function $u(e){let t=We(),n=Hi(e);return Iu(n,e,t)}function qi(e){let t=We();return ct(n=>{en(t.current,e,n)},[t,e])}function T_(e){let t=We();return ct(()=>{en(t.current,e,Mr)},[t,e])}function x_(e){return[$u(e),qi(e)]}function E_(e){return[Hi(e),qi(e)]}function $r(e){let t=We();xt(()=>t.current.subscribeToTransactions(e).release,[e,t])}function Uu(e){let t=e.atomValues.toMap(),n=Cr(e_(t,(r,o)=>{let a=Du(o).persistence_UNSTABLE;return a!=null&&a.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return a_(e.nonvalidatedAtoms.toMap(),n)}function R_(e){$r(ct(t=>{let n=t.getState().previousTree,r=t.getState().currentTree;n||(ht("Transaction subscribers notified without a previous tree being present -- this is a bug in Recoil"),n=t.getState().currentTree);let o=Uu(r),i=Uu(n),a=Cr(f_,l=>{var c,u,d,f;return{persistence_UNSTABLE:{type:(c=(u=l.persistence_UNSTABLE)===null||u===void 0?void 0:u.type)!==null&&c!==void 0?c:"none",backButton:(d=(f=l.persistence_UNSTABLE)===null||f===void 0?void 0:f.backButton)!==null&&d!==void 0?d:!1}}}),s=n_(r.dirtyAtoms,l=>o.has(l)||i.has(l));e({atomValues:o,previousAtomValues:i,atomInfo:a,modifiedAtoms:s,transactionMetadata:{...r.transactionMetadata}})},[e]))}function A_(e){$r(ct(t=>{let n=zn(t,"current"),r=zn(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function zu(e){let t=At();return xt(()=>{t.current=e}),t.current}function F_(){let e=We(),[t,n]=Wi(()=>zn(e.current)),r=zu(t),o=At();return xt(()=>(o.current&&!Ir&&window.clearTimeout(o.current),t.retain()),[t]),$r(ct(i=>n(zn(i)),[])),r!==t&&!Ir&&(o.current&&(r==null||r.release_INTERNAL(),window.clearTimeout(o.current)),t.retain(),o.current=window.setTimeout(()=>{t.release_INTERNAL(),o.current=null},Mu)),t}function ju(){let e=We();return ct(t=>{var n;let r=e.current.getState(),o=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,i=t.getStore_INTERNAL().getState().currentTree;zi(()=>{let a=new Set;for(let c of[o.atomValues.keys(),i.atomValues.keys()])for(let u of c){var s,l;((s=o.atomValues.get(u))===null||s===void 0?void 0:s.contents)!==((l=i.atomValues.get(u))===null||l===void 0?void 0:l.contents)&&Du(u).shouldRestoreFromSnapshots&&a.add(u)}a.forEach(c=>{p_(e.current,new ji(c),i.atomValues.has(c)?fe(i.atomValues.get(c)):Mr)}),e.current.replaceState(c=>({...c,stateID:t.getID_INTERNAL()}))})},[e])}function C_(){let e=We();return(t,n={})=>{zi(()=>{e.current.addTransactionMetadata(n),t.forEach((r,o)=>h_(e.current,new ji(o),r))})}}var Gi=class{},N_=new Gi;function k_(e,t){let n=We(),r=ju();return ct((...o)=>{function i(u,d){en(n.current,u,d)}function a(u){en(n.current,u,Mr)}let s=zn(n.current),l=Ou(n.current),c=N_;return zi(()=>{let u="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 e!="function")throw new Error(u);let d=e({set:i,reset:a,snapshot:s,gotoSnapshot:r,transact_UNSTABLE:l});if(typeof d!="function")throw new Error(u);c=d(...o)}),c instanceof Gi&&Vr(!1),c},t!=null?[...t,n]:void 0)}function Bu(e){if(!!he("recoil_memory_managament_2020"))return L_(e)}function L_(e){let n=(Array.isArray(e)?e:[e]).map(a=>a instanceof m_?a:a.key),r=We();xt(()=>{if(!he("recoil_memory_managament_2020"))return;let a=r.current;if(o.current&&!Ir)window.clearTimeout(o.current),o.current=null;else for(let s of n)Un(a,s,1);return()=>{for(let s of n)Un(a,s,-1)}},[r,...n]);let o=At(),i=zu(n);if(!Ir&&(i===void 0||!l_(i,n))){let a=r.current;for(let s of n)Un(a,s,1);if(i)for(let s of i)Un(a,s,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(let s of n)Un(a,s,-1)},Mu)}}function P_(e,t){let n=We();return Vu(()=>(...r)=>{Ou(n.current)(i=>{e(i)(...r)})},t!=null?[...t,n]:void 0)}var O_={recoilComponentGetRecoilValueCount_FOR_TESTING:b_,useGotoRecoilSnapshot:ju,useRecoilCallback:k_,useRecoilInterface:y_,useRecoilSnapshot:F_,useRecoilState:x_,useRecoilStateLoadable:E_,useRecoilTransaction:P_,useRecoilTransactionObserver:A_,useRecoilValue:$u,useRecoilValueLoadable:Hi,useRetain:Bu,useResetRecoilState:T_,useSetRecoilState:qi,useSetUnvalidatedAtomValues:C_,useTransactionObservation_DEPRECATED:R_,useTransactionSubscription_DEPRECATED:$r},{peekNodeInfo:D_}=Qt,{useStoreRef:V_}=Dr;function M_(){let e=V_();return({key:t})=>D_(e.current,e.current.getState().currentTree,t)}var I_=M_,{RecoilRoot:$_,useStoreRef:U_}=Dr,{useMemo:z_}=b;function j_(){let e=U_().current;return z_(()=>{function t({children:n}){return b.createElement($_,{store_INTERNAL:e},n)}return t},[e])}var B_=j_;function ut(e,t,n){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if((t==null?void 0:t.allowFunctions)!==!0)throw new Error("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var r;return(r=JSON.stringify(e))!==null&&r!==void 0?r:""}if(Ae(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,i)=>ut(o,t,i.toString()))}]`;if(typeof e.toJSON=="function")return ut(e.toJSON(n),t,n);if(e instanceof Map){let o={};for(let[i,a]of e)o[typeof i=="string"?i:ut(i,t)]=a;return ut(o,t,n)}return e instanceof Set?ut(Array.from(e).sort((o,i)=>ut(o,t).localeCompare(ut(i,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?ut(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${ut(o,t)}:${ut(e[o],t,o)}`).join(",")}}`}function W_(e,t={allowFunctions:!1}){return ut(e,t)}var Ur=W_,Wu=class{constructor(t){var n,r,o;ae(this,"_numLeafs",void 0),ae(this,"_root",void 0),ae(this,"_onHit",void 0),ae(this,"_onSet",void 0),ae(this,"_mapNodeValue",void 0),this._numLeafs=0,this._root=null,this._onHit=(n=t==null?void 0:t.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=t==null?void 0:t.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(o=t==null?void 0:t.mapNodeValue)!==null&&o!==void 0?o:i=>i}size(){return this._numLeafs}root(){return this._root}get(t,n){var r;return(r=this.getLeafNode(t,n))===null||r===void 0?void 0:r.value}getLeafNode(t,n){return Hu(this.root(),r=>this._mapNodeValue(t(r)),{onNodeVisit:r=>{n==null||n.onNodeVisit(r),r.type==="leaf"&&this._onHit(r)}})}set(t,n,r){let o,i=Ki(this.root(),t.map(([a,s])=>[a,this._mapNodeValue(s)]),null,n,null,{onNodeVisit:a=>{r==null||r.onNodeVisit(a),a.type==="leaf"&&(o=a)}});this.root()||(this._root=i),this._numLeafs++,this._onSet(fe(o))}delete(t){if(!this.root())return!1;let n=fe(this.root());return H_(n,t,t.parent)?t===n||n.type==="branch"&&!n.branches.size?(this._root=null,this._numLeafs=0,!0):(this._numLeafs-=Gu(t),!0):!1}clear(){this._numLeafs=0,this._root=null}},Hu=(e,t,n)=>{var r;if(e==null)return;if(n==null||(r=n.onNodeVisit)===null||r===void 0||r.call(n,e),e.type==="leaf")return e;let o=t(e.nodeKey);return Hu(e.branches.get(o),t,n)},Ki=(e,t,n,r,o,i)=>{var a;let s;if(e==null)if(t.length===0)s={type:"leaf",value:r,parent:n,branchKey:o};else{let[l,...c]=t,[u,d]=l;s={type:"branch",nodeKey:u,parent:n,branches:new Map,branchKey:o},s.branches.set(d,Ki(null,c,s,r,d,i))}else if(s=e,t.length){let[l,...c]=t,[u,d]=l;e.type==="branch"&&e.nodeKey===u||Vr(!1),e.branches.set(d,Ki(e.branches.get(d),c,e,r,d,i))}return i==null||(a=i.onNodeVisit)===null||a===void 0||a.call(i,s),s},H_=(e,t,n)=>n?(n.branches.delete(t.branchKey),qu(e,n,n.parent)):e===t,qu=(e,t,n)=>n?(t.branches.size===0&&n.branches.delete(t.branchKey),qu(e,n,n.parent)):e===t,Gu=e=>e.type==="leaf"?1:Array.from(e.branches.values()).reduce((t,n)=>t+Gu(n),0),q_={TreeCache:Wu},G_=q_.TreeCache,Ku=Object.freeze({__proto__:null,TreeCache:G_}),Yu=class{constructor(t){var n;ae(this,"_maxSize",void 0),ae(this,"_size",void 0),ae(this,"_head",void 0),ae(this,"_tail",void 0),ae(this,"_map",void 0),ae(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){let n=this._keyMapper(t),r=this._map.get(n);if(!!r)return this.set(t,r.value),r.value}set(t,n){let r=this._keyMapper(t);this._map.get(r)&&this.delete(t);let i=this.head(),a={key:t,right:i,left:null,value:n};i?i.left=a:this._tail=a,this._map.set(r,a),this._head=a,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){let t=this.tail();t&&this.delete(t.key)}delete(t){let n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;let r=fe(this._map.get(n)),o=r.right,i=r.left;o&&(o.left=r.left),i&&(i.right=r.right),r===this.head()&&(this._head=o),r===this.tail()&&(this._tail=i),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}},K_={LRUCache:Yu},Y_=K_.LRUCache,Zu=Object.freeze({__proto__:null,LRUCache:Y_}),{LRUCache:Z_}=Zu,{TreeCache:X_}=Ku;function J_(e,t=n=>n){let n=new Z_({maxSize:e}),r=new X_({mapNodeValue:t,onHit:o=>{n.set(o,!0)},onSet:o=>{let i=n.tail();n.set(o,!0),i&&r.size()>e&&r.delete(i.key)}});return r}var Xu=J_,{TreeCache:Q_}=Ku,zr={equality:"reference",eviction:"keep-all",maxSize:1/0};function eg({equality:e=zr.equality,eviction:t=zr.eviction,maxSize:n=zr.maxSize}=zr){let r=tg(e);return ng(t,n,r)}function tg(e){switch(e){case"reference":return t=>t;case"value":return t=>Ur(t)}throw new Error(`Unrecognized equality policy ${e}`)}function ng(e,t,n){switch(e){case"keep-all":return new Q_({mapNodeValue:n});case"lru":return Xu(fe(t),n);case"most-recent":return Xu(1,n)}throw new Error(`Unrecognized eviction policy ${e}`)}var rg=eg;function og(e){return()=>null}var ig={startPerfBlock:og},{CANCELED:jn,Canceled:ag,loadableWithError:Bn,loadableWithPromise:sg,loadableWithValue:Yi}=Pn,{getNodeLoadable:Ju,peekNodeLoadable:lg,setNodeValue:cg}=Qt,{saveDependencyMapToStore:ug}=Dn,{DEFAULT_VALUE:fg,RecoilValueNotReady:dg,getConfigDeletionHandler:pg,registerNode:Qu}=rt,{isRecoilValue:hg}=Ot,{AbstractRecoilValue:mg}=Ot,{setRecoilValueLoadable:vg}=Vt,{retainedByOptionWithDefault:_g}=Vn,{cloneSnapshot:gg}=Or,{startPerfBlock:yg}=ig,Wn=[],jr=new Map,bg=(()=>{let e=0;return()=>e++})();function wg(){return{depValuesDiscoveredSoFarDuringAsyncWork:null,latestLoadable:null,latestExecutionId:null,stateVersion:null}}function Sg(e){let{key:t,get:n,cachePolicy_UNSTABLE:r}=e,o=e.set!=null?e.set:void 0,i=rg(r??{equality:"reference",eviction:"keep-all"}),a=_g(e.retainedBy_UNSTABLE),s=new Map,l=0;function c(){return!he("recoil_memory_managament_2020")||l>0}function u(_){return s.has(_)||s.set(_,wg()),fe(s.get(_))}function d(_){return l++,_.getState().knownSelectors.add(t),()=>{l--,_.getState().knownSelectors.delete(t),s.delete(_)}}function f(){return pg(t)!==void 0&&!c()}function m(_,x,A){if(x.state==="loading"){let $=jr.get(A);$==null&&jr.set(A,$=new Set),$.add(_)}}function p(_,x){let A=jr.get(x);if(A!==void 0){for(let $ of A)vg($,new mg(t),_);jr.delete(x)}}function y(_,x,A){let $=_.getState().knownSelectors.has(A);if($&&x.atomValues.has(A))return fe(x.atomValues.get(A));let D=Ju(_,x,A);return D.state!=="loading"&&$&&x.atomValues.set(A,D),D}function v(_,x,A,$,D){return x.then(N=>{if(!c())return oe(_,D),jn;let ce=Yi(N);return O(N),G(A,I($),ce),T(_,A,new Set($.keys()),D),S(_,ce,D),{__value:N,__key:t}}).catch(N=>{if(!c())return oe(_,D),jn;if(ie(_,D)&&_e($,_,D),Ae(N))return w(_,N,A,$,D);let ce=Bn(N);throw O(N),G(A,I($),ce),T(_,A,new Set($.keys()),D),S(_,ce,D),N})}function w(_,x,A,$,D){return x.then(N=>{if(!c())return oe(_,D),jn;if(N instanceof ag)return ht("Selector was released while it had dependencies"),jn;let{__key:ce,__value:Ce}=N??{},xe=!0;ce!=null&&(A.atomValues.set(ce,Yi(Ce)),xe=!1);let we=V(_,A);if(we&&we.state==="hasValue")return Q(we,_),{__value:we.contents,__key:t};if(!ie(_,D)){var ge;let J=W(A);if((J==null||(ge=J.latestLoadable)===null||ge===void 0?void 0:ge.state)==="loading")return J.latestLoadable.contents}let[me,P]=U(_,A,D,xe);if(ie(_,D)&&_e(P,_,D),F(me),me.state!=="loading"&&(G(A,I(P),me),T(_,A,new Set(P.keys()),D),S(_,me,D)),me.state==="hasError")throw me.contents;return me.state==="hasValue"?{__value:me.contents,__key:t}:me.contents}).catch(N=>{if(!c())return oe(_,D),jn;let ce=Bn(N);throw O(N),G(A,I($),Bn(N)),T(_,A,new Set($.keys()),D),S(_,ce,D),N})}function S(_,x,A){ie(_,A)&&(Q(x,_),p(x,A))}function T(_,x,A,$){var D,N,ce,Ce;if(ie(_,$)||x.version===((D=_.getState())===null||D===void 0||(N=D.currentTree)===null||N===void 0?void 0:N.version)||x.version===((ce=_.getState())===null||ce===void 0||(Ce=ce.nextTree)===null||Ce===void 0?void 0:Ce.version)){var xe,we,ge;ug(new Map([[t,A]]),_,(xe=(we=_.getState())===null||we===void 0||(ge=we.nextTree)===null||ge===void 0?void 0:ge.version)!==null&&xe!==void 0?xe:_.getState().currentTree.version)}}function R(_,x,A,$,D){A.add($),T(_,x,A,D)}function U(_,x,A,$=!1){let D=yg(t),N,ce=!1,Ce,xe=new Map,we=new Set;T(_,x,we,A);function ge(J){let{key:de}=J;R(_,x,we,de,A);let ye=$?Ju(_,x,de):y(_,x,de);if(F(ye),xe.set(de,ye),ye.state==="hasValue")return ye.contents;throw ye.contents}let me=!1,P=J=>(...de)=>{if(!me)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 ye=gg(_),Ne=J({snapshot:ye});if(typeof Ne!="function")throw new Error("getCallback() expects a function that returns a function.");return Ne(...de)};try{N=n({get:ge,getCallback:P}),N=hg(N)?ge(N):N,me=!0,Ae(N)?N=v(_,N,x,xe,A).finally(D):D()}catch(J){N=J,Ae(N)?N=w(_,N,x,xe,A).finally(D):(ce=!0,D())}return ce?Ce=Bn(N):Ae(N)?Ce=sg(N):Ce=Yi(N),F(Ce),[Ce,xe]}function V(_,x){let A=new Set,$=u(_),D=i.get(N=>(typeof N!="string"&&Vr(!1),y(_,x,N).contents),{onNodeVisit:N=>{N.type==="branch"&&N.nodeKey!==t&&typeof N.nodeKey=="string"&&A.add(N.nodeKey)}});return D&&T(_,x,A,$.latestExecutionId),D}function I(_){return Array.from(_.entries()).map(([x,A])=>[x,A.contents])}function B(_,x){let A=bg(),[$,D]=U(_,x,A);return Q($,_,D,A,x),ne(x,I(D),$),m(_,$,A),$}function Z(_,x){let A=V(_,x);if(A!=null)return Q(A,_),A;let $=W(x);if($){let D=$;return m(_,fe(D.latestLoadable),fe(D.latestExecutionId)),fe(D.latestLoadable)}return B(_,x)}function W(_){var x;let[,A]=(x=Array.from(s.entries()).find(([$,D])=>D.latestLoadable!=null&&D.latestExecutionId!=null&&!Te($,_)))!==null&&x!==void 0?x:[];return A}let ee=new Map;function Te(_,x){var A,$;let D=u(_),N=(A=D.depValuesDiscoveredSoFarDuringAsyncWork)!==null&&A!==void 0?A:new Map,ce=Array((($=ee.get(x.version))!==null&&$!==void 0?$:new Map).entries()),Ce=ee.has(x.version)&&ce.length===N.size&&ce.every(([xe,we])=>N.get(xe)===we);return N==null||x.version===D.stateVersion||Ce?!1:(ee.set(x.version,new Map(N)),Array.from(N).some(([xe,we])=>y(_,x,xe).contents!==we.contents))}function Q(_,x,A,$,D){let N=u(x);_.state==="loading"?(N.depValuesDiscoveredSoFarDuringAsyncWork=A,N.latestExecutionId=$,N.latestLoadable=_,N.stateVersion=D==null?void 0:D.version):(N.depValuesDiscoveredSoFarDuringAsyncWork=null,N.latestExecutionId=null,N.latestLoadable=null,N.stateVersion=null)}function ne(_,x,A){A.state!=="loading"&&G(_,x,A)}function _e(_,x,A){let $=u(x);ie(x,A)&&($.depValuesDiscoveredSoFarDuringAsyncWork=_)}function oe(_,x){ie(_,x)&&s.delete(_)}function ie(_,x){let A=u(_);return x===A.latestExecutionId}function F(_){_.state!=="loading"&&O(_.contents)}function O(_){}function G(_,x,A){_.atomValues.set(t,A),i.set(x,A)}function le(_){if(Wn.includes(t)){let x=`Recoil selector has circular dependencies: ${Wn.slice(Wn.indexOf(t)).join(" \u2192 ")}`;return Bn(new Error(x))}Wn.push(t);try{return _()}finally{Wn.pop()}}function C(_,x){return i.get($=>{typeof $!="string"&&Vr(!1);let D=lg(_,x,$);return D==null?void 0:D.contents})}function q(_,x){return le(()=>Z(_,x))}function j(_){_.atomValues.delete(t)}return o!=null?Qu({key:t,nodeType:"selector",peek:C,get:q,set:(x,A,$)=>{let D=!1,N=new Map;function ce({key:ge}){if(D)throw new Error("Recoil: Async selector sets are not currently supported.");let me=y(x,A,ge);if(F(me),me.state==="hasValue")return me.contents;throw me.state==="loading"?new dg(ge):me.contents}function Ce(ge,me){if(D)throw new Error("Recoil: Async selector sets are not currently supported.");let P=typeof me=="function"?me(ce(ge)):me;cg(x,A,ge.key,P).forEach((de,ye)=>N.set(ye,de))}function xe(ge){Ce(ge,fg)}let we=o({set:Ce,get:ce,reset:xe},$);if(we!==void 0)throw Ae(we)?new Error("Recoil: Async selector sets are not currently supported."):new Error("Recoil: selector set should be a void function.");return D=!0,N},init:d,invalidate:j,shouldDeleteConfigOnRelease:f,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:a}):Qu({key:t,nodeType:"selector",peek:C,get:q,init:d,invalidate:j,shouldDeleteConfigOnRelease:f,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:a})}var Br=Sg,{loadableWithError:ef,loadableWithPromise:tf,loadableWithValue:Hn}=Pn,{DEFAULT_VALUE:Mt,DefaultValue:tn,getConfigDeletionHandler:nf,registerNode:Tg,setConfigDeletionHandler:xg}=rt,{isRecoilValue:Eg}=Ot,{markRecoilValueModified:Rg,setRecoilValue:rf,setRecoilValueLoadable:Ag}=Vt,{retainedByOptionWithDefault:Fg}=Vn;function Cg(e){let{key:t,persistence_UNSTABLE:n}=e,r=Fg(e.retainedBy_UNSTABLE),o=0,i=Ae(e.default)?tf(e.default.then(v=>(i=Hn(v),{__key:t,__value:v})).catch(v=>{throw i=ef(v),v})):Hn(e.default),a,s=new Map;function l(v,w){let S=w.then(T=>{var R,U;return((U=((R=v.getState().nextTree)!==null&&R!==void 0?R:v.getState().currentTree).atomValues.get(t))===null||U===void 0?void 0:U.contents)===S&&rf(v,y,T),{__key:t,__value:T}}).catch(T=>{var R,U;throw((U=((R=v.getState().nextTree)!==null&&R!==void 0?R:v.getState().currentTree).atomValues.get(t))===null||U===void 0?void 0:U.contents)===S&&Ag(v,y,ef(T)),T});return S}function c(v,w,S){o++;let T=v.getState().knownAtoms.has(t);if(v.getState().knownAtoms.add(t),i.state==="loading"){let Z=()=>{var W;((W=v.getState().nextTree)!==null&&W!==void 0?W:v.getState().currentTree).atomValues.has(t)||Rg(v,y)};i.contents.then(Z).catch(Z)}let R=Mt,U=null;if(e.effects_UNSTABLE!=null&&!T){let Z=!0,W=Q=>ne=>{if(Z){let _e=R instanceof tn||Ae(R)?i.state==="hasValue"?i.contents:Mt:R;R=typeof ne=="function"?ne(_e):ne,Ae(R)&&(R=R.then(oe=>(U={effect:Q,value:oe},oe)))}else{if(Ae(ne))throw new Error("Setting atoms to async values is not implemented.");typeof ne!="function"&&(U={effect:Q,value:ne}),rf(v,y,typeof ne=="function"?_e=>{let oe=ne(_e);return U={effect:Q,value:oe},oe}:ne)}},ee=Q=>()=>W(Q)(Mt),Te=Q=>ne=>{v.subscribeToTransactions(_e=>{var oe;let{currentTree:ie,previousTree:F}=_e.getState();F||(ht("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),F=ie);let O=(oe=ie.atomValues.get(t))!==null&&oe!==void 0?oe:i;if(O.state==="hasValue"){var G,le,C,q;let j=O.contents,_=(G=F.atomValues.get(t))!==null&&G!==void 0?G:i,x=_.state==="hasValue"?_.contents:Mt;((le=U)===null||le===void 0?void 0:le.effect)!==Q||((C=U)===null||C===void 0?void 0:C.value)!==j?ne(j,x):((q=U)===null||q===void 0?void 0:q.effect)===Q&&(U=null)}},t)};for(let Q of(V=e.effects_UNSTABLE)!==null&&V!==void 0?V:[]){var V;let ne=Q({node:y,trigger:S,setSelf:W(Q),resetSelf:ee(Q),onSet:Te(Q)});if(ne!=null){var I;s.set(v,[...(I=s.get(v))!==null&&I!==void 0?I:[],ne])}}Z=!1}if(!(R instanceof tn)){var B;let Z=Ae(R)?tf(l(v,R)):Hn(R);w.atomValues.set(t,Z),(B=v.getState().nextTree)===null||B===void 0||B.atomValues.set(t,Z)}return()=>{var Z;o--,(Z=s.get(v))===null||Z===void 0||Z.forEach(W=>W()),s.delete(v),v.getState().knownAtoms.delete(t)}}function u(v,w){var S,T,R;return(S=(T=w.atomValues.get(t))!==null&&T!==void 0?T:(R=a)===null||R===void 0?void 0:R[1])!==null&&S!==void 0?S:i}function d(v,w){if(w.atomValues.has(t))return fe(w.atomValues.get(t));if(w.nonvalidatedAtoms.has(t)){if(a!=null)return a;if(n==null)return gi(`Tried to restore a persisted value for atom ${t} but it has no persistence settings.`),i;let S=w.nonvalidatedAtoms.get(t),T=n.validator(S,Mt);return a=T instanceof tn?i:Hn(T),a}else return i}function f(){a=void 0}function m(v,w,S){if(w.atomValues.has(t)){let T=fe(w.atomValues.get(t));if(T.state==="hasValue"&&S===T.contents)return new Map}else if(!w.nonvalidatedAtoms.has(t)&&S instanceof tn)return new Map;return a=void 0,new Map().set(t,Hn(S))}function p(){return nf(t)!==void 0&&o<=0}let y=Tg({key:t,nodeType:"atom",peek:u,get:d,set:m,init:c,invalidate:f,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return y}function of(e){let{default:t,...n}=e;return Eg(t)?Ng({...n,default:t}):Cg({...n,default:t})}function Ng(e){let t=of({...e,default:Mt,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof tn?r:fe(e.persistence_UNSTABLE).validator(r,Mt)},effects_UNSTABLE:e.effects_UNSTABLE}),n=Br({key:`${e.key}__withFallback`,get:({get:r})=>{let o=r(t);return o instanceof tn?e.default:o},set:({set:r},o)=>r(t,o),dangerouslyAllowMutability:e.dangerouslyAllowMutability});return xg(n.key,nf(e.key)),n}var af=of,sf=class{constructor(t){var n;ae(this,"_map",void 0),ae(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t==null?void 0:t.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}},kg={MapCache:sf},Lg=kg.MapCache,Pg=Object.freeze({__proto__:null,MapCache:Lg}),{LRUCache:lf}=Zu,{MapCache:Og}=Pg,Wr={equality:"reference",eviction:"none",maxSize:1/0};function Dg({equality:e=Wr.equality,eviction:t=Wr.eviction,maxSize:n=Wr.maxSize}=Wr){let r=Vg(e);return Mg(t,n,r)}function Vg(e){switch(e){case"reference":return t=>t;case"value":return t=>Ur(t)}throw new Error(`Unrecognized equality policy ${e}`)}function Mg(e,t,n){switch(e){case"keep-all":return new Og({mapKey:n});case"lru":return new lf({mapKey:n,maxSize:fe(t)});case"most-recent":return new lf({mapKey:n,maxSize:1})}throw new Error(`Unrecognized eviction policy ${e}`)}var cf=Dg,{setConfigDeletionHandler:Ig}=rt;function $g(e){var t,n;let r=cf({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var i;let a=r.get(o);if(a!=null)return a;let{cachePolicyForParams_UNSTABLE:s,...l}=e,c=af({...l,key:`${e.key}__${(i=Ur(o))!==null&&i!==void 0?i:"void"}`,default:typeof e.default=="function"?e.default(o):e.default,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE,effects_UNSTABLE:typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(o):e.effects_UNSTABLE});return r.set(o,c),Ig(c.key,()=>{r.delete(o)}),c}}var Ug=$g,{setConfigDeletionHandler:zg}=rt,jg=0;function Bg(e){var t,n;let r=cf({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var i;let a=r.get(o);if(a!=null)return a;let s=`${e.key}__selectorFamily/${(i=Ur(o,{allowFunctions:!0}))!==null&&i!==void 0?i:"void"}/${jg++}`,l=f=>e.get(o)(f),c=e.cachePolicy_UNSTABLE,u=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE,d;if(e.set!=null){let f=e.set;d=Br({key:s,get:l,set:(p,y)=>f(o)(p,y),cachePolicy_UNSTABLE:c,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:u})}else d=Br({key:s,get:l,cachePolicy_UNSTABLE:c,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:u});return r.set(o,d),zg(d.key,()=>{r.delete(o)}),d}}var Ft=Bg,Wg=Ft({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function Hg(e){return Wg(e)}var qg=Hg,Gg=Ft({key:"__error",get:e=>()=>{throw new Error(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function Kg(e){return Gg(e)}var Yg=Kg;function Zg(e){return e}var Xg=Zg,{loadableWithError:uf,loadableWithPromise:ff,loadableWithValue:df}=Pn;function Hr(e,t){let n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(let[o,i]of t.entries())try{n[o]=e(i)}catch(a){r[o]=a}return[n,r]}function Jg(e){return e!=null&&!Ae(e)}function qr(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function Zi(e){return e!=null&&typeof e=="object"&&e.hasOwnProperty("__value")?e.__value:e}function Xi(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,o)=>({...n,[r]:t[o]}),{})}function nn(e,t,n){let r=n.map((o,i)=>o==null?df(t[i]):Ae(o)?ff(o):uf(o));return Xi(e,r)}function Qg(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}var ey=Ft({key:"__waitForNone",get:e=>({get:t})=>{let n=qr(e),[r,o]=Hr(t,n);return nn(e,r,o)},dangerouslyAllowMutability:!0}),ty=Ft({key:"__waitForAny",get:e=>({get:t})=>{let n=qr(e),[r,o]=Hr(t,n);return o.some(i=>!Ae(i))?nn(e,r,o):new Promise(i=>{for(let[a,s]of o.entries())Ae(s)&&s.then(l=>{r[a]=Zi(l),o[a]=void 0,i(nn(e,r,o))}).catch(l=>{o[a]=l,i(nn(e,r,o))})})},dangerouslyAllowMutability:!0}),ny=Ft({key:"__waitForAll",get:e=>({get:t})=>{let n=qr(e),[r,o]=Hr(t,n);if(o.every(a=>a==null))return Xi(e,r);let i=o.find(Jg);if(i!=null)throw i;return Promise.all(o).then(a=>Xi(e,Qg(r,a).map(Zi)))},dangerouslyAllowMutability:!0}),ry=Ft({key:"__waitForAllSettled",get:e=>({get:t})=>{let n=qr(e),[r,o]=Hr(t,n);return o.every(i=>!Ae(i))?nn(e,r,o):Promise.all(o.map((i,a)=>Ae(i)?i.then(s=>{r[a]=Zi(s),o[a]=void 0}).catch(s=>{r[a]=void 0,o[a]=s}):null)).then(()=>nn(e,r,o))},dangerouslyAllowMutability:!0}),oy=Ft({key:"__noWait",get:e=>({get:t})=>{try{return df(t(e))}catch(n){return Ae(n)?ff(n):uf(n)}},dangerouslyAllowMutability:!0}),iy={waitForNone:ey,waitForAny:ty,waitForAll:ny,waitForAllSettled:ry,noWait:oy},{batchUpdates:ay,setBatcher:sy}=Ni,{DefaultValue:ly}=rt,{RecoilRoot:cy}=Dr,{isRecoilValue:uy}=Ot,{retentionZone:fy}=Er,{freshSnapshot:dy}=Or,{useGotoRecoilSnapshot:py,useRecoilCallback:hy,useRecoilSnapshot:my,useRecoilState:vy,useRecoilStateLoadable:_y,useRecoilTransaction:gy,useRecoilTransactionObserver:yy,useRecoilValue:by,useRecoilValueLoadable:wy,useResetRecoilState:Sy,useRetain:Ty,useSetRecoilState:xy,useSetUnvalidatedAtomValues:Ey,useTransactionObservation_DEPRECATED:Ry}=O_,{noWait:Ay,waitForAll:Fy,waitForAllSettled:Cy,waitForAny:Ny,waitForNone:ky}=iy,re={DefaultValue:ly,RecoilRoot:cy,useRecoilBridgeAcrossReactRoots_UNSTABLE:B_,atom:af,selector:Br,retentionZone:fy,atomFamily:Ug,selectorFamily:Ft,constSelector:qg,errorSelector:Yg,readOnlySelector:Xg,useRecoilValue:by,useRecoilValueLoadable:wy,useRecoilState:vy,useRecoilStateLoadable:_y,useSetRecoilState:xy,useResetRecoilState:Sy,useGetRecoilValueInfo_UNSTABLE:I_,useRetain:Ty,useRecoilCallback:hy,useRecoilTransaction_UNSTABLE:gy,useGotoRecoilSnapshot:py,useRecoilSnapshot:my,useRecoilTransactionObserver_UNSTABLE:yy,useTransactionObservation_UNSTABLE:Ry,useSetUnvalidatedAtomValues_UNSTABLE:Ey,noWait:Ay,waitForNone:ky,waitForAny:Ny,waitForAll:Fy,waitForAllSettled:Cy,isRecoilValue:uy,batchUpdates:ay,setBatcher:sy,snapshot_UNSTABLE:dy},h1=re.DefaultValue,pf=re.RecoilRoot,m1=re.useRecoilBridgeAcrossReactRoots_UNSTABLE,ot=re.atom,v1=re.selector,_1=re.retentionZone,g1=re.atomFamily,y1=re.selectorFamily,b1=re.constSelector,w1=re.errorSelector,S1=re.readOnlySelector,T1=re.useRecoilValue,x1=re.useRecoilValueLoadable,se=re.useRecoilState,E1=re.useRecoilStateLoadable,R1=re.useSetRecoilState,A1=re.useResetRecoilState,F1=re.useGetRecoilValueInfo_UNSTABLE,C1=re.useRetain,N1=re.useRecoilCallback,k1=re.useRecoilTransaction_UNSTABLE,L1=re.useGotoRecoilSnapshot,P1=re.useRecoilSnapshot,O1=re.useRecoilTransactionObserver_UNSTABLE,D1=re.useTransactionObservation_UNSTABLE,V1=re.useSetUnvalidatedAtomValues_UNSTABLE,M1=re.noWait,I1=re.waitForNone,$1=re.waitForAny,U1=re.waitForAll,z1=re.waitForAllSettled,j1=re.isRecoilValue,B1=re.batchUpdates,W1=re.setBatcher,H1=re.snapshot_UNSTABLE;var Gr=ot({key:"fileTreeViewState",default:"folder"}),mt=ot({key:"fileTreeActiveFolderPathState",default:""}),Kr=ot({key:"fileTreeExcludedFoldersState",default:[]}),Yr=ot({key:"fileTreeExcludedExtensions",default:[]}),Zr=ot({key:"fileTreeFolderFileCountMapState",default:{}}),Xr=ot({key:"fileTreeFolderTreeState",default:null,dangerouslyAllowMutability:!0}),Jr=ot({key:"fileTreeFileListState",default:[],dangerouslyAllowMutability:!0}),Qr=ot({key:"fileTreePinnedFilesState",default:[],dangerouslyAllowMutability:!0}),rn=ot({key:"fileTreeOpenFoldersState",default:[],dangerouslyAllowMutability:!0}),eo=ot({key:"showSubFoldersInVault",default:!1}),on=ot({key:"fileTreeFocusedFolder",default:null,dangerouslyAllowMutability:!0});function to(e){let t=b.useRef(null),n=e.plugin,[r,o]=se(Gr),[i,a]=se(Jr),[s,l]=se(Qr),[c,u]=se(mt),[d]=se(Yr),[f,m]=se(eo),[p,y]=Ve(null),[v,w]=Ve(!1),[S,T]=Ve(""),[R,U]=Ve(!1),[V,I]=Ve(br(c,n.app));Le(()=>I(br(c,n.app)),[c]),Le(()=>{a(Xt(c,n))},[f]),Le(()=>{R&&t.current.focus()},[R]);let B=C=>{C.map(q=>Ee(this,null,function*(){q.arrayBuffer().then(j=>{n.app.vault.adapter.writeBinary(c+"/"+q.name,j)})}))},Z=(C,q)=>{Bc(q,C.path,n.app),y(C)},W=(C,q)=>{let j=new hf.Menu(n.app);return j.addItem(_=>{_.setIcon("pin"),s.contains(C)?_.setTitle("Unpin"):_.setTitle("Pin to Top"),_.onClick(x=>{if(s.contains(C)){let A=s.filter($=>$!==C);l(A)}else l([...s,C])})}),j.addItem(_=>{_.setTitle("Rename"),_.setIcon("pencil"),_.onClick(x=>{new St(n.app,C,"rename").open()})}),j.addItem(_=>{_.setTitle("Delete"),_.setIcon("trash"),_.onClick(x=>{n.app.vault.delete(C,!0)})}),wr("file-explorer",n.app)||j.addItem(_=>{_.setTitle("Move file to..."),_.setIcon("paper-plane"),_.onClick(x=>{new Ln(n.app,C).open()})}),n.app.workspace.trigger("file-menu",j,C,"file-explorer"),j.showAtPosition({x:q.pageX,y:q.pageY}),!1},ee=C=>{let q;return d.length>0&&(q=C.filter(j=>!d.contains(j.extension))),q=q.sort((j,_)=>{if(n.settings.sortFilesBy==="name")return j.name.localeCompare(_.name,"en",{numeric:!0});if(n.settings.sortFilesBy==="last-update")return _.stat.mtime-j.stat.mtime}),s.length>0&&(q=q.reduce((j,_)=>s.contains(_)?[_,...j]:[...j,_],[])),q},Te=(C,q)=>Ee(this,null,function*(){let j=n.app.vault.getAbstractFileByPath(q);if(!j)return;new St(n.app,j,"create note").open()}),Q=C=>{o("folder"),u("")},ne=C=>{T(""),U(!R),a(Xt(c,n))},_e=new RegExp("all:(.*)?"),oe=new RegExp("tag:(.*)?"),ie=C=>{var q=C.target.value;T(q);var j=c;let _=q.match(oe);if(_){if(I("Files with Tag"),_[1]===void 0||_[1].replace(/\s/g,"").length===0){a([]);return}a([...O(_[1])]);return}let x=q.match(_e);x?(q=x[1]?x[1]:"",j="/",I("All Files")):I(br(c,n.app));let $=F(q,j,!!x);a($)},F=(C,q,j)=>{var _=Xt(q,n,j),x=_.filter(A=>A.name.toLowerCase().includes(C.toLowerCase().trimStart()));return x},O=C=>{let q=new Set,j=n.app.vault.getMarkdownFiles();for(let _ of j){let x=n.app.metadataCache.getFileCache(_);if(x.tags)for(let A of x.tags)A.tag.toLowerCase().contains(C.toLowerCase().trimStart())&&(q.has(_)||q.add(_))}return q},G=(C,q)=>{n.settings.filePreviewOnHover&&n.app.workspace.trigger("link-hover",{},C.target,q.path,q.path)},le=()=>Ee(this,null,function*(){n.settings.showFilesFromSubFolders=!f,yield n.saveSettings(),m(!f)});return b.createElement(b.Fragment,null,b.createElement(ur,{onDrop:B,noClick:!0,onDragEnter:()=>w(!0),onDragLeave:()=>w(!1),onDropAccepted:()=>w(!1),onDropRejected:()=>w(!1)},({getRootProps:C,getInputProps:q})=>b.createElement("div",_t(Ue({},C()),{className:v?"drag-entered":"",style:{width:"100%",height:"100%",position:"relative"}}),b.createElement("input",Ue({},q())),b.createElement("div",{className:"oz-explorer-container"},b.createElement("div",{className:`oz-file-tree-header-wrapper${n.settings.fixedHeaderInFileList?" file-tree-header-fixed":""}`},b.createElement("div",{className:"oz-flex-container"},b.createElement("div",{className:"nav-action-button oz-nav-action-button"},b.createElement(lt,{icon:n.settings.evernoteView?ai.faTimesCircle:ri.faArrowCircleLeft,onClick:j=>Q(j),size:"lg"})),b.createElement("div",{className:"oz-nav-buttons-right-block"},n.settings.showFilesFromSubFoldersButton&&b.createElement("div",{className:"nav-action-button oz-nav-action-button"},f?b.createElement(lt,{icon:li.faEyeSlash,onClick:le,size:"lg"}):b.createElement(lt,{icon:si.faEye,onClick:le,size:"lg"})),n.settings.searchFunction&&b.createElement("div",{className:"nav-action-button oz-nav-action-button"},b.createElement(lt,{icon:ii.faSearch,onClick:ne,size:"lg"})),b.createElement("div",{className:"nav-action-button oz-nav-action-button"},b.createElement(lt,{icon:ni.faPlusCircle,onClick:j=>Te(j,c),size:"lg"})))),R&&b.createElement("div",{className:"search-input-container oz-input-container"},b.createElement("input",{type:"search",placeholder:"Search...",ref:t,value:S,onChange:ie})),b.createElement("div",{className:"oz-file-tree-header"},V)),b.createElement("div",{className:`oz-file-tree-files${n.settings.fixedHeaderInFileList?R?" file-tree-files-fixed-with-search":" file-tree-files-fixed":""}`},ee(i).map(j=>b.createElement("div",{className:"nav-file oz-nav-file",key:j.path,onClick:_=>Z(j,_),onContextMenu:_=>W(j,_),onMouseEnter:_=>G(_,j)},b.createElement("div",{className:"nav-file-title oz-nav-file-title"+(p===j?" is-active":""),"data-path":j.path},yr(j.name).extension!=="md"&&b.createElement("span",{className:"nav-file-tag"},yr(j.name).extension),b.createElement("div",{className:"nav-file-title-content"},yr(j.name).fileName,s.contains(j)&&b.createElement(lt,{icon:oi.faThumbtack,style:{marginLeft:"3px",float:"right"},size:"xs"}))))))))))}function H(){return H=Object.assign||function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}var mf=void 0,no=void 0,vf=[],Ly=function(t){return global.requestAnimationFrame(t)},Py=function(t){return global.cancelAnimationFrame(t)},Ji=void 0,_f=function(){return Date.now()},Oy=void 0,Dy=function(t,n){return no={fn:t,transform:n}},Vy=function(t){return vf=t},My=function(t){return mf=t},Iy=function(t){return Ji=t};var $y=function(t){return Oy=t};var ro={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Uy=function(t){return t},Qi=function(){function e(){}return e.create=function(n){if(typeof n=="function")return n;if(Ji&&n.output&&typeof n.output[0]=="string")return Ji(n);var r=n.output,o=n.range,i=n.easing||Uy,a="extend",s=n.map;n.extrapolateLeft!==void 0?a=n.extrapolateLeft:n.extrapolate!==void 0&&(a=n.extrapolate);var l="extend";return n.extrapolateRight!==void 0?l=n.extrapolateRight:n.extrapolate!==void 0&&(l=n.extrapolate),function(c){var u=jy(c,o);return zy(c,o[u],o[u+1],r[u],r[u+1],i,a,l,s)}},e}();function zy(e,t,n,r,o,i,a,s,l){var c=l?l(e):e;if(cn){if(s==="identity")return c;s==="clamp"&&(c=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?c=-c:n===1/0?c=c-t:c=(c-t)/(n-t),c=i(c),r===-1/0?c=-c:o===1/0?c=c+r:c=c*(o-r)+r,c)}function jy(e,t){for(var n=1;n=e);++n);return n-1}var ft="[-+]?\\d*\\.?\\d+",oo=ft+"%";function io(){return"\\(\\s*("+Array.prototype.slice.call(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}var By=new RegExp("rgb"+io(ft,ft,ft)),Wy=new RegExp("rgba"+io(ft,ft,ft,ft)),Hy=new RegExp("hsl"+io(ft,oo,oo)),qy=new RegExp("hsla"+io(ft,oo,oo,ft)),Gy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ky=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Yy=/^#([0-9a-fA-F]{6})$/,Zy=/^#([0-9a-fA-F]{8})$/;function Xy(e){var t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Yy.exec(e))?parseInt(t[1]+"ff",16)>>>0:ro.hasOwnProperty(e)?ro[e]:(t=By.exec(e))?(an(t[1])<<24|an(t[2])<<16|an(t[3])<<8|255)>>>0:(t=Wy.exec(e))?(an(t[1])<<24|an(t[2])<<16|an(t[3])<<8|bf(t[4]))>>>0:(t=Gy.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Zy.exec(e))?parseInt(t[1],16)>>>0:(t=Ky.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Hy.exec(e))?(gf(yf(t[1]),ao(t[2]),ao(t[3]))|255)>>>0:(t=qy.exec(e))?(gf(yf(t[1]),ao(t[2]),ao(t[3]))|bf(t[4]))>>>0:null}function ea(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function gf(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,i=ea(o,r,e+1/3),a=ea(o,r,e),s=ea(o,r,e-1/3);return Math.round(i*255)<<24|Math.round(a*255)<<16|Math.round(s*255)<<8}function an(e){var t=parseInt(e,10);return t<0?0:t>255?255:t}function yf(e){var t=parseFloat(e);return(t%360+360)%360/360}function bf(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ao(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function wf(e){var t=Xy(e);if(t===null)return e;t=t||0;var n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,i=(t&255)/255;return"rgba("+n+", "+r+", "+o+", "+i+")"}var so=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Jy=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Qy=new RegExp("("+Object.keys(ro).join("|")+")","g");function e0(e){var t=e.output.map(function(i){return i.replace(Jy,wf)}).map(function(i){return i.replace(Qy,wf)}),n=t[0].match(so).map(function(){return[]});t.forEach(function(i){i.match(so).forEach(function(a,s){return n[s].push(+a)})});var r=t[0].match(so).map(function(i,a){return Qi.create(H({},e,{output:n[a]}))}),o=/^rgb/.test(t[0]);return function(i){var a=0;return t[0].replace(so,function(){return r[a++](i)}).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,function(s,l,c,u,d){return"rgba("+Math.round(l)+", "+Math.round(c)+", "+Math.round(u)+", "+d+")"})}}var Oe=function(){function e(){}var t=e.prototype;return t.__attach=function(){},t.__detach=function(){},t.__getValue=function(){},t.__getAnimatedValue=function(){return this.__getValue()},t.__addChild=function(r){},t.__removeChild=function(r){},t.__getChildren=function(){return[]},e}(),t0=function(e){Pe(t,e);function t(r,o,i,a,s){var l;return l=e.call(this)||this,l.update=n0(function(){l._value.animate(new l._animationClass(H({},l._animationConfig,{to:l._animationConfig.to.__getValue()})),l._callback)},1e3/30),l._value=r,l._parent=o,l._animationClass=i,l._animationConfig=a,l._callback=s,l.__attach(),l}var n=t.prototype;return n.__getValue=function(){return this._parent.__getValue()},n.__attach=function(){this._parent.__addChild(this)},n.__detach=function(){this._parent.__removeChild(this)},t}(Oe);function n0(e,t){var n=null,r=0,o=function(){return e(r=Date.now(),n=null)};return function(){var i=Date.now(),a=t-(i-r);a<=0||a>t?(n&&(clearTimeout(n),n=null),e(r=i)):n||(n=setTimeout(o,a))}}var lo=function(e){Pe(t,e);function t(){var r;return r=e.call(this)||this,r._children=[],r}var n=t.prototype;return n.__addChild=function(o){this._children.length===0&&this.__attach(),this._children.push(o)},n.__removeChild=function(o){var i=this._children.indexOf(o);i!==-1&&(this._children.splice(i,1),this._children.length===0&&this.__detach())},n.__getChildren=function(){return this._children},t}(Oe),r0=function(e){Pe(t,e);function t(r,o){var i;return i=e.call(this)||this,i._parents=r._values?r._values:Array.isArray(r)?r:[r],i._interpolation=Qi.create(o),i}var n=t.prototype;return n.__getValue=function(){return this._interpolation.apply(this,this._parents.map(function(o){return o.__getValue()}))},n.__attach=function(){for(var o=0;o2?n-2:0),o=2;oo._lastTime+u&&(d=o._lastTime+u);for(var f=1,m=Math.floor((d-o._lastTime)/f),p=0;po._to:a0?(this._timer&&(clearTimeout(this._timer),this._timer=void 0),this._timer=setTimeout(this.startAsync,this._delay)):this.startAsync()},n.getInternalState=function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}},n.stop=function(){this.__active=!1,clearTimeout(this._timeout),this._timeout=void 0,Py(this._animationFrame),this.__debouncedOnEnd({finished:!1})},t}(f0),Ff=function(e){Pe(t,e);function t(r){var o;return o=e.call(this)||this,o._values=r.map(function(i){return new Ct(i)}),o}var n=t.prototype;return n.setValue=function(o){var i=this;o.forEach(function(a,s){return i._values[s].setValue(a)})},n.__getValue=function(){return this._values.map(function(o){return o.__getValue()})},n.stopAnimation=function(o){this._values.forEach(function(i){return i.stopAnimation()}),o&&o(this.__getValue())},n.__attach=function(){for(var o=0;o=p.length)return"break";w=p[v++]}else{if(v=p.next(),v.done)return"break";w=v.value}var R=w;f=f.then(function(){return u===i.guid&&i.next(l(R))})},p=d,y=Array.isArray(p),v=0,p=y?p:p[Symbol.iterator]();;){var w,S=m();if(S==="break")break}else typeof d=="function"?d(function(T){return u===i.guid&&i.next(l(T))},i.props):i.next(l(s[c]))}()}()},n.render=function(){var o=this,i=this.state,a=i.props,s=i.oldProps,l=i.resolve;if(!a||Object.keys(a).length===0)return null;var c=this.props,u=c.state,d=c.filter,f=c.states,m=c.primitive,p=c.from,y=c.onRest,v=$e(c,["state","filter","states","primitive","from","onRest"]),w=this.instance&&this.instance.getValues(),S=typeof a.from=="function"?a.from:H({},s.from,w,a.from);return b.createElement(m,H({ref:function(R){return o.instance=R}},v,a,{from:H({},S,p),onRest:function(R){l(R),y&&y(R)}}))},t}(b.PureComponent);He.defaultProps={state:kf};He.create=function(e){return function(t,n){var r;return n===void 0&&(n=function(i){return i}),(typeof t=="function"||Array.isArray(t))&&(t=(r={},r[kf]=t,r)),function(o){return b.createElement(He,H({primitive:e,states:t,filter:n},o))}}};var Lf=function(t){var n=xf(t),r=Object.keys(t).reduce(function(o,i){var a;return typeof n[i]!="undefined"?o:H({},o,(a={},a[i]=t[i],a))},{});return H({to:n},r)};He.Spring=He.create(sn);He.Spring.to=function(e){return He.Spring(e,Lf)};He.Trail=He.create(w0);He.Trail.to=function(e){return He.Trail(e,Lf)};He.Transition=He.create(b0);var S0=na("div"),Pf=b.createContext(null),T0=Pf.Provider,x0=Pf.Consumer;function ra(e){return e?"scrollLeft":"scrollTop"}var uo="translate3d(0px,0px,0px)",fo="translate(0px,0px)",Of=function(e){Pe(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentDidMount=function(){var o=this.parent;o&&(o.layers=o.layers.concat(this),o.update())},n.componentWillUnmount=function(){var o=this,i=this.parent;i&&(i.layers=i.layers.filter(function(a){return a!==o}),i.update())},n.setPosition=function(o,i,a){a===void 0&&(a=!1);var s=this.parent.props,l=s.config,c=s.impl,u=Math.floor(this.props.offset)*o,d=o*this.props.offset+u*this.props.speed,f=parseFloat(-(i*this.props.speed)+d);a?this.animatedTranslate.setValue(f):Yn(this.animatedTranslate,H({to:f},l),c).start()},n.setHeight=function(o,i){i===void 0&&(i=!1);var a=this.parent.props,s=a.config,l=a.impl,c=parseFloat(o*this.props.factor);i?this.animatedSpace.setValue(c):Yn(this.animatedSpace,H({to:c},s),l).start()},n.initialize=function(){var o=this.props,i=this.parent,a=Math.floor(o.offset)*i.space,s=i.space*o.offset+a*o.speed,l=parseFloat(-(i.current*o.speed)+s);this.animatedTranslate=new Ct(l),this.animatedSpace=new Ct(i.space*o.factor)},n.renderLayer=function(){var o,i=this.props,a=i.style,s=i.children,l=i.offset,c=i.speed,u=i.factor,d=i.className,f=$e(i,["style","children","offset","speed","factor","className"]),m=this.parent.props.horizontal,p=this.animatedTranslate.interpolate({range:[0,1],output:m?[uo,"translate3d(1px,0,0)"]:[uo,"translate3d(0,1px,0)"]});return b.createElement(S0,H({},f,{className:d,style:H((o={position:"absolute",backgroundSize:"auto",backgroundRepeat:"no-repeat",willChange:"transform"},o[m?"height":"width"]="100%",o[m?"width":"height"]=this.animatedSpace,o.WebkitTransform=p,o.MsTransform=p,o.transform=p,o),a)}),s)},n.render=function(){var o=this;return b.createElement(x0,null,function(i){return i&&!o.parent&&(o.parent=i,o.initialize()),o.renderLayer()})},t}(b.PureComponent);Of.defaultProps={factor:1,offset:0,speed:0};var Df=function(e){Pe(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;a{if(e.children){if(!i)n([...t,e.folder]);else{let y=t.filter(v=>e.folder!==v);n(y)}a(!i)}},d=y=>{y.map(v=>Ee(this,null,function*(){v.arrayBuffer().then(w=>{e.plugin.app.vault.adapter.writeBinary(e.folder.path+"/"+v.name,w)})}))},f=()=>e.onClick(),m=()=>e.onContextMenu(),p=e.children?i?Vc:Mc:Ic;return b.createElement(ur,{onDrop:d,noClick:!0,onDragEnter:()=>l(!0),onDragLeave:()=>l(!1),onDropAccepted:()=>l(!1),onDropRejected:()=>l(!1)},({getRootProps:y,getInputProps:v})=>b.createElement("div",{style:Ue({},e.style),className:"treeview"},b.createElement("div",_t(Ue({},y({className:"dropzone"})),{className:"oz-folder-element"+(s?" drag-entered":""),"data-path":e.folder.path}),b.createElement("input",Ue({},v())),b.createElement("div",{style:{width:"100%"}},b.createElement("div",{className:"oz-icon-div"},b.createElement(p,{className:"oz-folder-toggle",style:{opacity:e.children?1:.3},onClick:u})),b.createElement("div",{className:"oz-folder-block",onClick:f,onContextMenu:m},b.createElement("div",{className:"oz-folder-type",style:{marginRight:e.type?10:0}}," ",e.type," "),b.createElement("div",{className:`oz-folder-name ${c?"is-folder-active":""}${e.isRootFolder?" is-root-folder":""}`},e.content),!i&&r[e.folder.path]&&b.createElement("div",{className:`oz-folder-count ${e.plugin.settings.showRootFolder?"with-root":"no-root"}`},b.createElement("span",{className:"nav-file-tag"},r[e.folder.path]))))),b.createElement(sn,{native:!0,immediate:!0,config:_t(Ue({},co.default),{restSpeedThreshold:1,restDisplacementThreshold:.01}),from:{height:0,opacity:0,transform:"translate3d(20px,0,0)"},to:{height:i?"auto":0,opacity:i?1:0,transform:i?"translate3d(0px,0,0)":"translate3d(20px,0,0)"},render:R0},e.children)))}var R0=n=>{var r=n,{children:e}=r,t=ha(r,["children"]);return b.createElement(Vf.div,{style:Ue({},t),className:"oz-folder-contents"},e)};var A0=({condition:e,wrapper:t,children:n})=>e?t(n):n,Mf=A0;var po=Re(require("obsidian"));function oa(e){let t=e.plugin,n=t.app,r=n.vault.getRoot(),[o]=se(rn),[i,a]=se(mt),[s,l]=se(Kr),[c,u]=se(on),d=p=>a(p),f=p=>{let y=p;return s.length>0&&(y=y.filter(v=>!s.contains(v.folder.path))),y=y.sort((v,w)=>v.folder.name.localeCompare(w.folder.name,"en",{numeric:!0})),y},m=p=>{let{event:y,folder:v}=p,w=y;y===void 0&&(w=window.event);let S=new po.Menu(t.app);return jc(v)&&S.addItem(T=>{T.setTitle("Focus on Folder").setIcon("zoomInIcon").onClick(()=>u(v))}),c.isRoot()||S.addItem(T=>{T.setTitle("Focus Back to Root").setIcon("zoomOutIcon").onClick(()=>u(r))}),S.addItem(T=>{T.setTitle("New Folder").setIcon("folder").onClick(R=>{new St(n,v,"create folder").open()})}),S.addItem(T=>{T.setTitle("Delete").setIcon("trash").onClick(R=>{t.app.vault.delete(v,!0)})}),S.addItem(T=>{T.setTitle("Rename").setIcon("pencil").onClick(R=>{new St(n,v,"rename").open()})}),wr("file-explorer",n)||S.addItem(T=>{T.setTitle("Move folder to...").setIcon("paper-plane").onClick(R=>{new Ln(n,v).open()})}),S.addItem(T=>{T.setTitle("Add to Excluded Folders").setIcon("switch").onClick(R=>{l([...s,v.path])})}),n.workspace.trigger("file-menu",S,v,"file-explorer"),S.showAtPosition({x:w.pageX,y:w.pageY}),!1};return e.folderTree.children?b.createElement(b.Fragment,null,Array.isArray(e.folderTree.children)&&f(e.folderTree.children).map(p=>b.createElement(b.Fragment,{key:p.folder.path},p.folder.children.some(y=>y instanceof po.TFolder)?b.createElement(ln,{plugin:t,content:p.folder.name,open:!!o.contains(p.folder),onClick:()=>d(p.folder.path),onContextMenu:y=>m({event:y,folder:p.folder}),folder:p.folder},b.createElement(oa,{plugin:t,folderTree:p})):b.createElement(ln,{plugin:t,content:p.folder.name,onClick:()=>d(p.folder.path),onContextMenu:y=>m({event:y,folder:p.folder}),folder:p.folder})))):null}var If=Re(require("obsidian"));function ho(e){let t={color:"var(--text-muted)",fill:"#c16ff7",width:"100%"},n=e.plugin,r=n.app,o=r.vault.getRoot(),[i,a]=se(mt),[s]=se(Xr),[l,c]=se(on),u=(d,f)=>{let m=d;d===void 0&&(m=window.event);let p=new If.Menu(r);return p.addItem(y=>{y.setTitle("New Folder").setIcon("folder").onClick(v=>{new St(r,f,"create folder").open()})}),f.isRoot()||p.addItem(y=>{y.setTitle("Focus Back to Root").setIcon("zoomOutDoubleIcon").onClick(()=>c(o))}),f.parent&&!f.parent.isRoot()&&f.parent!==l&&p.addItem(y=>{y.setTitle("Focus to Parent Folder").setIcon("zoomOutIcon").onClick(()=>c(f.parent))}),r.workspace.trigger("root-folder-menu",p,f),p.showAtPosition({x:m.pageX,y:m.pageY}),!1};return b.createElement("div",{className:"oz-folders-tree-wrapper"},b.createElement(Mf,{condition:l&&!l.isRoot()||l&&l.isRoot&&n.settings.showRootFolder,wrapper:d=>b.createElement(ln,{plugin:n,content:l.isRoot()?n.app.vault.getName():l.name,open:!0,isRootFolder:l.isRoot(),style:t,onClick:()=>a(l.path),folder:l,onContextMenu:f=>u(f,l)},d)},s&&b.createElement(oa,{plugin:n,folderTree:s})))}var $f=e=>{let{plugin:t}=e,[n,r]=Ve(!1),[o,i]=Ve(null),[a,s]=Ve(null),l=yt(),c=yt(),u=localStorage.getItem(t.keys.customHeightKey);Le(()=>{o&&localStorage.setItem(t.keys.customHeightKey,o.toString())},[o]);function d(p){p.preventDefault(),r(!0);let y=c.current.offsetTop-l.current.offsetTop;i(y),s(p.nativeEvent.clientY)}function f(p){p.preventDefault(),!!n&&(i(o+(p.nativeEvent.clientY-a)),s(p.nativeEvent.clientY))}function m(p){p.preventDefault(),r(!1),s(p.nativeEvent.clientY)}return b.createElement("div",{className:"file-tree-container",onMouseMove:p=>f(p),onMouseUp:p=>m(p)},b.createElement("div",{className:"oz-folder-pane",ref:l,style:{height:o?`${o}px`:u&&u!==""?`${u}px`:"50%"}},b.createElement(ho,{plugin:t})),b.createElement("div",{id:"file-tree-divider",ref:c,onClick:p=>p.preventDefault(),onMouseDown:p=>d(p),style:{backgroundColor:n?"var(--interactive-accent)":""}}),b.createElement("div",{className:"oz-file-list-pane"},b.createElement(to,{plugin:t})))};function ia(e){let{plugin:t}=e;t.registerEvent(t.app.vault.on("modify",F=>ie(F,"modify"))),t.registerEvent(t.app.vault.on("rename",(F,O)=>ie(F,"rename",O))),t.registerEvent(t.app.vault.on("delete",F=>ie(F,"delete"))),t.registerEvent(t.app.vault.on("create",F=>ie(F,"create")));let[n,r]=se(Gr),[o,i]=se(mt),[a,s]=se(Jr),[l,c]=se(Qr),[u,d]=se(rn),[f,m]=se(Xr),[p,y]=se(Kr),[v,w]=se(Zr),[S,T]=se(Yr),[R,U]=se(eo),[V,I]=se(on),B=F=>{s(Xt(F||o,t))},Z=()=>{if(t.settings.evernoteView){let F=localStorage.getItem(t.keys.activeFolderPathKey);if(F){let O=t.app.vault.getAbstractFileByPath(F);O&&O instanceof Zn.TFolder&&i(O.path)}}};Le(()=>{I(t.app.vault.getRoot()),y(ee()),T(W()),c(Q()),d(Te()),U(t.settings.showFilesFromSubFolders),Z(),t.settings.folderCount&&w(ui(t))},[]),Le(()=>{V&&m(ci(V))},[V]),Le(()=>_e(),[l]),Le(()=>ne(),[u]),Le(()=>oe(),[p]),Le(()=>{o!==""&&(B(o),r("file")),localStorage.setItem(t.keys.activeFolderPathKey,o)},[o]);function W(){let F=t.settings.excludedExtensions,O=[];for(let G of F.split(","))O.push(G.trim());return O}function ee(){let F=t.settings.excludedFolders,O=[];for(let G of F.split(","))O.push(G.trim());return O}function Te(){let F=[],O=localStorage.getItem(t.keys.openFoldersKey);if(O){O=JSON.parse(O);for(let G of O){let le=t.app.vault.getAbstractFileByPath(G);le&&F.push(le)}}return F}function Q(){let F=[],O=localStorage.getItem(t.keys.pinnedFilesKey);if(O){O=JSON.parse(O);for(let G of O){let le=t.app.vault.getAbstractFileByPath(G);le&&F.push(le)}}return F}function ne(){let F=[];for(let O of u)F.push(O.path);localStorage.setItem(t.keys.openFoldersKey,JSON.stringify(F))}function _e(){let F=[];for(let O of l)F.push(O.path);localStorage.setItem(t.keys.pinnedFilesKey,JSON.stringify(F))}function oe(){t.settings.excludedFolders=p.join(", "),t.saveSettings()}function ie(F,O,G){if(F instanceof Zn.TFile){if(n==="file")if(O==="rename"||O==="modify"||O==="delete"){if(O==="modify"&&t.settings.sortFilesBy!=="last-update")return;a.some(le=>le.path===F.path)&&B()}else O==="create"&&F.path.match(new RegExp(o+".*"))&&B()}else F instanceof Zn.TFolder&&(m(ci(V)),O==="rename"&&G&&o===G&&i(F.path));t.settings.folderCount&&w(ui(t))}return b.createElement(b.Fragment,null,n==="folder"?b.createElement(ho,{plugin:t}):t.settings.evernoteView?b.createElement($f,{plugin:t}):b.createElement(to,{plugin:t}))}var cn="file-tree-view",F0="File Tree",aa="sheets-in-box",sa=class extends Uf.ItemView{constructor(t,n){super(t);this.plugin=n}getViewType(){return cn}getDisplayText(){return F0}getIcon(){return aa}onClose(){return Ee(this,null,function*(){this.destroy()})}destroy(){b.unmountComponentAtNode(this.contentEl)}onOpen(){return Ee(this,null,function*(){b.unmountComponentAtNode(this.contentEl),this.constructFileTree(this.app.vault.getRoot().path,"")})}constructFileTree(t,n){b.unmountComponentAtNode(this.contentEl),b.render(b.createElement("div",{className:"file-tree-plugin-view"},b.createElement(pf,null,b.createElement(ia,{fileTreeView:this,plugin:this.plugin}))),this.contentEl)}};var Fe=Re(require("obsidian")),jf=Re(zf()),Bf={ribbonIcon:!0,showRootFolder:!0,showFilesFromSubFolders:!0,searchFunction:!0,showFilesFromSubFoldersButton:!0,excludedExtensions:"",excludedFolders:"",folderCount:!0,folderCountOption:"notes",evernoteView:!0,filePreviewOnHover:!1,sortFilesBy:"name",fixedHeaderInFileList:!1},la=class extends Fe.PluginSettingTab{constructor(t,n){super(t,n);this.plugin=n}display(){let{containerEl:t}=this;t.empty();let n=new jf.LocalStorageHandler({}),r=t.createDiv("coffee");r.addClass("oz-coffee-div");let i=r.createEl("a",{href:"https://ko-fi.com/L3L356V6Q"}).createEl("img",{attr:{src:"https://cdn.ko-fi.com/cdn/kofi2.png?v=3"}});i.height=40,t.createEl("h2",{text:"General"}),new Fe.Setting(t).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.").addToggle(a=>a.setValue(this.plugin.settings.evernoteView).onChange(s=>{this.plugin.settings.evernoteView=s,this.plugin.saveSettings(),this.plugin.refreshTreeLeafs()})),new Fe.Setting(t).setName("Ribbon Icon").setDesc("Turn on if you want Ribbon Icon for activating the File Tree.").addToggle(a=>a.setValue(this.plugin.settings.ribbonIcon).onChange(s=>{this.plugin.settings.ribbonIcon=s,this.plugin.saveSettings(),this.plugin.refreshIconRibbon()})),t.createEl("h2",{text:"Folder Pane Settings"}),new Fe.Setting(t).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(a=>a.setValue(this.plugin.settings.showRootFolder).onChange(s=>{this.plugin.settings.showRootFolder=s,this.plugin.saveSettings(),this.plugin.refreshTreeLeafs()})),new Fe.Setting(t).setName("Folder Count").setDesc("Turn on if you want see the number of notes/files under file tree.").addToggle(a=>a.setValue(this.plugin.settings.folderCount).onChange(s=>{this.plugin.settings.folderCount=s,this.plugin.saveSettings(),this.plugin.refreshTreeLeafs()})),new Fe.Setting(t).setName("Folder Count Details").setDesc("Select which files you want to be included into count").addDropdown(a=>{a.addOption("notes","Notes"),a.addOption("files","All Files"),a.setValue(this.plugin.settings.folderCountOption),a.onChange(s=>{this.plugin.settings.folderCountOption=s,this.plugin.saveSettings(),this.plugin.refreshTreeLeafs()})}),t.createEl("h2",{text:"File Pane Settings"}),new Fe.Setting(t).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(a=>a.setValue(this.plugin.settings.showFilesFromSubFolders).onChange(s=>{this.plugin.settings.showFilesFromSubFolders=s,this.plugin.saveSettings(),this.plugin.refreshTreeLeafs()})),new Fe.Setting(t).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(a=>a.setValue(this.plugin.settings.showFilesFromSubFoldersButton).onChange(s=>{this.plugin.settings.showFilesFromSubFoldersButton=s,this.plugin.saveSettings(),this.plugin.refreshTreeLeafs()})),new Fe.Setting(t).setName("Search in File List").setDesc("Turn on this option if you want to enable search function to filter files by name.").addToggle(a=>a.setValue(this.plugin.settings.searchFunction).onChange(s=>{this.plugin.settings.searchFunction=s,this.plugin.saveSettings(),this.plugin.refreshTreeLeafs()})),new Fe.Setting(t).setName("Sort Files By").setDesc("Select your preference how the files should be sorted in the file list").addDropdown(a=>{a.addOption("name","Name"),a.addOption("last-update","Last Update"),a.setValue(this.plugin.settings.sortFilesBy),a.onChange(s=>{this.plugin.settings.sortFilesBy=s,this.plugin.saveSettings(),this.plugin.refreshTreeLeafs()})}),new Fe.Setting(t).setName("Preview File on Hover").setDesc("Turn on if you want to preview the files once you hover on them within the file list.").addToggle(a=>a.setValue(this.plugin.settings.filePreviewOnHover).onChange(s=>{this.plugin.settings.filePreviewOnHover=s,this.plugin.saveSettings()})),new Fe.Setting(t).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(a=>a.setValue(this.plugin.settings.fixedHeaderInFileList).onChange(s=>{this.plugin.settings.fixedHeaderInFileList=s,this.plugin.saveSettings(),this.plugin.refreshTreeLeafs()})),t.createEl("h2",{text:"Exclude Settings"}),new Fe.Setting(t).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 to make changes effective.`).addTextArea(a=>a.setValue(this.plugin.settings.excludedExtensions).onChange(s=>{this.plugin.settings.excludedExtensions=s,this.plugin.saveSettings()})),new Fe.Setting(t).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 to make changes effective.`).addTextArea(a=>a.setValue(this.plugin.settings.excludedFolders).onChange(s=>{this.plugin.settings.excludedFolders=s,this.plugin.saveSettings()})),t.createEl("h2",{text:"Clear Data"}),new Fe.Setting(t).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(a=>{let s=a.setTooltip("Click here to clear the cache data").setButtonText("Click for Clearing the Cache").onClick(()=>Ee(this,null,function*(){n.removeFromLocalStorage({key:this.plugin.keys.customHeightKey}),n.removeFromLocalStorage({key:this.plugin.keys.openFoldersKey}),n.removeFromLocalStorage({key:this.plugin.keys.activeFolderPathKey}),this.plugin.refreshTreeLeafs(),new Fe.Notice("The plugin cache is cleared...")}))}),new Fe.Setting(t).setName("Clear Pinned Files").setDesc("This button will clear the pinned files in the file list pane.").addButton(a=>{let s=a.setTooltip("Click here to clear the pinned files").setButtonText("Click for Clearing the Pinned files").onClick(()=>Ee(this,null,function*(){n.removeFromLocalStorage({key:this.plugin.keys.pinnedFilesKey}),this.plugin.refreshTreeLeafs(),new Fe.Notice("The pinned files are cleared...")}))})}};var ca=class extends un.Plugin{constructor(){super(...arguments);this.ribbonIconEl=void 0;this.keys={activeFolderPathKey:"fileTreePlugin-ActiveFolderPath",pinnedFilesKey:"fileTreePlugin-PinnedFiles",openFoldersKey:"fileTreePlugin-OpenFolders",customHeightKey:"fileTreePlugin-CustomHeight"};this.refreshIconRibbon=()=>{var t;(t=this.ribbonIconEl)==null||t.remove(),this.settings.ribbonIcon&&(this.ribbonIconEl=this.addRibbonIcon(aa,"File Tree Alternative Plugin",()=>Ee(this,null,function*(){yield this.openFileTreeLeaf(!0)})))};this.openFileTreeLeaf=t=>Ee(this,null,function*(){if(this.app.workspace.getLeavesOfType(cn).length==0){let n=this.app.workspace.getLeftLeaf(!1);yield n.setViewState({type:cn}),t&&this.app.workspace.revealLeaf(n)}});this.detachFileTreeLeafs=()=>{let t=this.app.workspace.getLeavesOfType(cn);for(let n of t)n.view.destroy(),n.detach()};this.refreshTreeLeafs=()=>{this.detachFileTreeLeafs(),this.openFileTreeLeaf(!0)}}onload(){return Ee(this,null,function*(){console.log("Loading Alternative File Tree Plugin"),(0,un.addIcon)("zoomInIcon",zc),(0,un.addIcon)("zoomOutIcon",$c),(0,un.addIcon)("zoomOutDoubleIcon",Uc),this.addSettingTab(new la(this.app,this)),yield this.loadSettings(),this.registerView(cn,t=>new sa(t,this)),this.app.workspace.onLayoutReady(()=>Ee(this,null,function*(){return yield this.openFileTreeLeaf(!0)})),this.addCommand({id:"open-file-tree-leaf",name:"Open File Tree Leaf",callback:()=>Ee(this,null,function*(){return yield this.openFileTreeLeaf(!0)})}),this.refreshIconRibbon()})}onunload(){console.log("Unloading Alternative File Tree Plugin"),this.detachFileTreeLeafs()}loadSettings(){return Ee(this,null,function*(){this.settings=Object.assign({},Bf,yield this.loadData())})}saveSettings(){return Ee(this,null,function*(){yield this.saveData(this.settings)})}};0&&(module.exports={}); /*! * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) */ /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */