UNPKG

react-router-chart

Version:
2 lines 1.67 kB
(()=>{"use strict";var t={d:(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{$:()=>r,$$:()=>o,Chart:()=>i});const r=Symbol("$"),o=Symbol("$$"),n="/";class i{static describe(...t){return function(t){const e={},[i,c]=u(t);return i.forEach((t=>{const i=[...function*(t){t.startsWith(n)&&(yield n);let e="";const r=t.split(n);for(;r.length;){const t=r.shift();e&&(yield e),t&&(e=t)}e&&(yield e)}(t)];let a=e;i.forEach(((t,e)=>{a[t]||(a[t]={});const n=s(i.slice(0,e+1));c.has(n)&&!a[o]&&(a[o]=n),a=a[t],a[r]||(a[r]=n)}))})),e}(t)}}var c,a,l;function u(t,e){const r=Array.from([]),o=new Set;return t.forEach((t=>{const n=s([e,t.path]),[i,c]=function(t,e){const[r,o]=t.children?u(t.children,e):[[],new Set];return[(e?[e]:[]).concat(...r),o]}(t,n);r.push(...i),c.forEach((t=>o.add(t))),t.index&&o.add(n)})),[r,o]}function s(t){const e=t.filter(Boolean),r=e.map((t=>t===n?"":t)).join(n);return`${e[0]!==n||r.startsWith(n)?"":n}${r}`}c=i,l=n,(a=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(a="ROOT"))in c?Object.defineProperty(c,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):c[a]=l,module.exports=e})(); //# sourceMappingURL=index.js.map