function e(t,n,r){function i(t){let i=t[n.key],a=t[n.children];r(i,t)!==!1&&e(a||[],n,r)}t.forEach(i)}function t({treeData:t,expandedKeys:n,startKey:r,endKey:i,fieldNames:a={title:`title`,key:`key`,children:`children`}}){let o=[],s=0;if(r&&r===i)return[r];if(!r||!i)return[];function c(e){return e===r||e===i}return e(t,a,e=>{if(s===2)return!1;if(c(e)){if(o.push(e),s===0)s=1;else if(s===1)return s=2,!1}else s===1&&o.push(e);return n.includes(e)}),o}function n(t,n,r){let i=[...n],a=[];return e(t,r,(e,t)=>{let n=i.indexOf(e);return n!==-1&&(a.push(t),i.splice(n,1)),!!i.length}),a}exports.calcRangeKeys=t,exports.convertDirectoryKeysToNodes=n;