tree-processor 0.8.2 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +293 -12
- package/README.md +293 -14
- package/dist/.tsbuildinfo +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/stats.html +1 -1
- package/dist/tree-processor.cjs.js +130 -95
- package/dist/tree-processor.esm.js +72 -37
- package/dist/tree-processor.umd.js +70 -35
- package/package.json +11 -4
|
@@ -1,100 +1,135 @@
|
|
|
1
1
|
"use strict"
|
|
2
2
|
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})
|
|
3
3
|
const r={children:"children",id:"id"}
|
|
4
|
-
function
|
|
5
|
-
return function r(
|
|
6
|
-
const
|
|
7
|
-
Array.isArray(
|
|
8
|
-
return function r(
|
|
9
|
-
const
|
|
10
|
-
Array.isArray(
|
|
11
|
-
const
|
|
12
|
-
if(Array.isArray(
|
|
13
|
-
if(r)return r}}return null}function
|
|
14
|
-
const
|
|
15
|
-
if(Array.isArray(
|
|
16
|
-
const
|
|
17
|
-
if(Array.isArray(
|
|
18
|
-
return!!(Array.isArray(r)&&r.length>0)&&(r.pop(),!0)}const
|
|
19
|
-
if(Array.isArray(
|
|
20
|
-
return!!(Array.isArray(r)&&r.length>0)&&(r.shift(),!0)}const
|
|
21
|
-
if(Array.isArray(
|
|
22
|
-
const
|
|
23
|
-
if(Array.isArray(
|
|
24
|
-
const
|
|
25
|
-
if(Array.isArray(
|
|
26
|
-
const
|
|
27
|
-
if(Array.isArray(
|
|
28
|
-
if(
|
|
29
|
-
if(!
|
|
30
|
-
const
|
|
31
|
-
if(!Array.isArray(
|
|
32
|
-
const s=t>=0?t:
|
|
33
|
-
return s>=0&&s<
|
|
34
|
-
if(
|
|
35
|
-
const f=
|
|
36
|
-
if(Array.isArray(f)&&f.length>0){const
|
|
37
|
-
if(
|
|
38
|
-
let
|
|
39
|
-
for(let r=0;r<
|
|
40
|
-
if(!Array.isArray(
|
|
41
|
-
const o
|
|
42
|
-
if(r===
|
|
43
|
-
const
|
|
44
|
-
if(!Array.isArray(
|
|
45
|
-
|
|
46
|
-
return function r(
|
|
47
|
-
const
|
|
48
|
-
Array.isArray(
|
|
49
|
-
const
|
|
50
|
-
if(Array.isArray(
|
|
51
|
-
if(null!==
|
|
52
|
-
return function r(
|
|
53
|
-
for(const
|
|
54
|
-
if(null!=
|
|
55
|
-
|
|
56
|
-
Array.isArray(f)&&f.length>0&&(s[t.children]=r(f)),
|
|
57
|
-
if(
|
|
58
|
-
const
|
|
59
|
-
if(Array.isArray(
|
|
60
|
-
const
|
|
61
|
-
Array.isArray(
|
|
62
|
-
const t=e
|
|
63
|
-
return void 0===t
|
|
64
|
-
const
|
|
65
|
-
if(Array.isArray(
|
|
66
|
-
if(null!==
|
|
67
|
-
if(!
|
|
68
|
-
const o
|
|
69
|
-
return Array.isArray(
|
|
70
|
-
const
|
|
71
|
-
if(Array.isArray(
|
|
72
|
-
if(null!==
|
|
73
|
-
if(!
|
|
74
|
-
if(null===
|
|
75
|
-
const o
|
|
76
|
-
return Array.isArray(
|
|
77
|
-
const
|
|
78
|
-
if(Array.isArray(
|
|
79
|
-
if(null!==
|
|
80
|
-
const
|
|
81
|
-
if(Array.isArray(
|
|
82
|
-
const t=e
|
|
4
|
+
function n(n,e,t=r){const o=[]
|
|
5
|
+
return function r(n){for(const i of n){o.push(e(i))
|
|
6
|
+
const n=i[t.children]
|
|
7
|
+
Array.isArray(n)&&n.length>0&&r(n)}}(n),o}function e(n,e,t=r){const o=[]
|
|
8
|
+
return function r(n){n.forEach((n,i)=>{e(n,i)&&o.push(n)
|
|
9
|
+
const c=n[t.children]
|
|
10
|
+
Array.isArray(c)&&c.length>0&&r(c)})}(n),o}function t(n,e,o=r){for(const r of n){if(e(r))return r
|
|
11
|
+
const n=r[o.children]
|
|
12
|
+
if(Array.isArray(n)&&n.length>0){const r=t(n,e,o)
|
|
13
|
+
if(r)return r}}return null}function o(n,e,t,o=r){return function r(n){for(const i of n){if(i[o.id]===e)return i[o.children]||(i[o.children]=[]),i[o.children].push(t),!0
|
|
14
|
+
const n=i[o.children]
|
|
15
|
+
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(n)}function i(n,e,t,o=r){return function r(n){for(const i of n){if(i[o.id]===e)return i[o.children]||(i[o.children]=[]),i[o.children].unshift(t),!0
|
|
16
|
+
const n=i[o.children]
|
|
17
|
+
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(n)}function c(n,e,t=r){return function r(n){for(const o of n){if(o[t.id]===e){const r=o[t.children]
|
|
18
|
+
return!!(Array.isArray(r)&&r.length>0)&&(r.pop(),!0)}const n=o[t.children]
|
|
19
|
+
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(n)}function s(n,e,t=r){return function r(n){for(const o of n){if(o[t.id]===e){const r=o[t.children]
|
|
20
|
+
return!!(Array.isArray(r)&&r.length>0)&&(r.shift(),!0)}const n=o[t.children]
|
|
21
|
+
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(n)}function f(n,e,t=r){for(const r of n){if(e(r))return!0
|
|
22
|
+
const n=r[t.children]
|
|
23
|
+
if(Array.isArray(n)&&n.length>0&&f(n,e,t))return!0}return!1}function u(n,e,t=r){for(const r of n){if(!e(r))return!1
|
|
24
|
+
const n=r[t.children]
|
|
25
|
+
if(Array.isArray(n)&&n.length>0&&!u(n,e,t))return!1}return!0}function l(n,e,t,o=r){const i=function r(n){for(const t of n){if(t[o.id]===e)return t
|
|
26
|
+
const n=t[o.children]
|
|
27
|
+
if(Array.isArray(n)&&n.length>0){const e=r(n)
|
|
28
|
+
if(e)return e}}return null}(n)
|
|
29
|
+
if(!i)return null
|
|
30
|
+
const c=i[o.children]
|
|
31
|
+
if(!Array.isArray(c)||0===c.length)return null
|
|
32
|
+
const s=t>=0?t:c.length+t
|
|
33
|
+
return s>=0&&s<c.length?c[s]:null}function a(n,e,t=r){return function r(n,o=[]){for(let i=0;i<n.length;i++){const c=n[i],s=[...o,i]
|
|
34
|
+
if(c[t.id]===e)return s
|
|
35
|
+
const f=c[t.children]
|
|
36
|
+
if(Array.isArray(f)&&f.length>0){const n=r(f,s)
|
|
37
|
+
if(n)return n}}return null}(n)}function h(n,e,t=r){if(!Array.isArray(e)||0===e.length)return null
|
|
38
|
+
let o=n
|
|
39
|
+
for(let r=0;r<e.length;r++){const n=e[r]
|
|
40
|
+
if(!Array.isArray(o)||n<0||n>=o.length)return null
|
|
41
|
+
const i=o[n]
|
|
42
|
+
if(r===e.length-1)return i
|
|
43
|
+
const c=i[t.children]
|
|
44
|
+
if(!Array.isArray(c))return null
|
|
45
|
+
o=c}return null}function d(n,e=r){const t={}
|
|
46
|
+
return function r(n,o=1){for(const i of n){t[i[e.id]]=o
|
|
47
|
+
const n=i[e.children]
|
|
48
|
+
Array.isArray(n)&&n.length>0&&r(n,o+1)}}(n),t}function y(n,e,t=r){return function r(n,o=1){for(const i of n){if(i[t.id]===e)return o
|
|
49
|
+
const n=i[t.children]
|
|
50
|
+
if(Array.isArray(n)&&n.length>0){const e=r(n,o+1)
|
|
51
|
+
if(null!==e)return e}}return null}(n)}function A(n,e,t=r){const o=new Set
|
|
52
|
+
return function r(n){const i=[]
|
|
53
|
+
for(const c of n){const n=c[e]
|
|
54
|
+
if(null!=n){if(o.has(n))continue
|
|
55
|
+
o.add(n)}const s={...c},f=c[t.children]
|
|
56
|
+
Array.isArray(f)&&f.length>0&&(s[t.children]=r(f)),i.push(s)}return i}(n)}function p(n,e,t=r){return function r(n){for(let o=0;o<n.length;o++){const i=n[o]
|
|
57
|
+
if(i[t.id]===e)return n.splice(o,1),!0
|
|
58
|
+
const c=i[t.children]
|
|
59
|
+
if(Array.isArray(c)&&c.length>0&&r(c))return!0}return!1}(n)}function T(n,e,t=r){!function r(n){for(const o of n){e(o)
|
|
60
|
+
const n=o[t.children]
|
|
61
|
+
Array.isArray(n)&&n.length>0&&r(n)}}(n)}function g(r){return!Array.isArray(r)||0===r.length}function x(n,e=r){if(!m(n,e))return!0
|
|
62
|
+
const t=n[e.children]
|
|
63
|
+
return void 0===t||!Array.isArray(t)||0===t.length}function v(n,e,t=r){const o=function r(n){for(const o of n){if(o[t.id]===e)return o
|
|
64
|
+
const n=o[t.children]
|
|
65
|
+
if(Array.isArray(n)&&n.length>0){const e=r(n)
|
|
66
|
+
if(null!==e)return e}}return null}(n)
|
|
67
|
+
if(!o)return[]
|
|
68
|
+
const i=o[t.children]
|
|
69
|
+
return Array.isArray(i)?i:[]}function D(n,e,t=r){const o=function r(n,o=null){for(const i of n){if(i[t.id]===e)return{node:i,parent:o}
|
|
70
|
+
const n=i[t.children]
|
|
71
|
+
if(Array.isArray(n)&&n.length>0){const e=r(n,i)
|
|
72
|
+
if(null!==e)return e}}return null}(n)
|
|
73
|
+
if(!o)return[]
|
|
74
|
+
if(null===o.parent)return n
|
|
75
|
+
const i=o.parent[t.children]
|
|
76
|
+
return Array.isArray(i)?i:[]}function b(n,e,t=r){return function r(n,o=null){for(const i of n){if(i[t.id]===e)return o
|
|
77
|
+
const n=i[t.children]
|
|
78
|
+
if(Array.isArray(n)&&n.length>0){const e=r(n,i)
|
|
79
|
+
if(null!==e)return e}}return null}(n)}function N(n,e,t=r){for(const r of n){if(r[t.id]===e)return!0
|
|
80
|
+
const n=r[t.children]
|
|
81
|
+
if(Array.isArray(n)&&n.length>0&&N(n,e,t))return!0}return!1}function m(n,e=r){if(!n||"object"!=typeof n||Array.isArray(n))return!1
|
|
82
|
+
const t=n[e.children]
|
|
83
83
|
if(void 0!==t){if(null===t)return!1
|
|
84
84
|
if(!Array.isArray(t))return!1
|
|
85
|
-
for(const r of t)if(!
|
|
86
|
-
for(const r of
|
|
87
|
-
return!0}function
|
|
88
|
-
const t=e
|
|
89
|
-
return void 0===t||Array.isArray(t)}function
|
|
90
|
-
if(t.has(
|
|
91
|
-
t.add(
|
|
92
|
-
const
|
|
93
|
-
if(void 0!==
|
|
94
|
-
if(!Array.isArray(
|
|
95
|
-
for(const r of
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
return
|
|
100
|
-
|
|
85
|
+
for(const r of t)if(!m(r,e))return!1}return!0}function S(n,e=r){if(!Array.isArray(n))return!1
|
|
86
|
+
for(const r of n)if(!m(r,e))return!1
|
|
87
|
+
return!0}function M(n,e=r){if(!n||"object"!=typeof n||Array.isArray(n))return!1
|
|
88
|
+
const t=n[e.children]
|
|
89
|
+
return void 0===t||Array.isArray(t)}function j(n,e=r,t=new WeakSet){if(!n||"object"!=typeof n||Array.isArray(n))return!1
|
|
90
|
+
if(t.has(n))return!1
|
|
91
|
+
t.add(n)
|
|
92
|
+
const o=n[e.children]
|
|
93
|
+
if(void 0!==o){if(null===o)return!1
|
|
94
|
+
if(!Array.isArray(o))return!1
|
|
95
|
+
for(const r of o)if(!j(r,e,t))return!1}return!0}function E(n,e,t=r){return!(e<=0)&&function r(n,o){if(o>e)return!1
|
|
96
|
+
for(const e of n){const n=e[t.children]
|
|
97
|
+
if(Array.isArray(n)&&n.length>0&&!r(n,o+1))return!1}return!0}(n,1)}function O(n,e=r){const t=n[e.children]
|
|
98
|
+
return void 0===t||!Array.isArray(t)||0===t.length}function k(n,e,t=r){return!!N(n,e,t)&&null===b(n,e,t)}function C(n,e=r){const t=[]
|
|
99
|
+
return function r(n){for(const o of n){const{[e.children]:n,...i}=o
|
|
100
|
+
t.push(i)
|
|
101
|
+
const c=o[e.children]
|
|
102
|
+
Array.isArray(c)&&c.length>0&&r(c)}}(n),t}function I(n,e={}){const{rootParentId:t=null,parentIdField:o="parentId",fieldNames:i=r}=e
|
|
103
|
+
if(Array.isArray(n)){if(0===n.length)return[]
|
|
104
|
+
const r=new Map
|
|
105
|
+
for(const e of n){const n=e[i.id]
|
|
106
|
+
if(null==n)continue
|
|
107
|
+
const t={...e,[i.children]:[]}
|
|
108
|
+
r.set(n,t)}const e=[]
|
|
109
|
+
for(const c of n){const n=c[i.id],s=c[o]
|
|
110
|
+
if(null==n)continue
|
|
111
|
+
const f=r.get(n)
|
|
112
|
+
if(f)if(s===t||null==s)e.push(f)
|
|
113
|
+
else{const n=r.get(s)
|
|
114
|
+
if(n){const r=n[i.children]
|
|
115
|
+
Array.isArray(r)?r.push(f):n[i.children]=[f]}else e.push(f)}}return e}if(n instanceof Map){if(0===n.size)return[]
|
|
116
|
+
const r=[]
|
|
117
|
+
return n.forEach((n,e)=>{r.push({...n,[i.id]:e})}),I(r,e)}if(n&&"object"==typeof n&&!Array.isArray(n)&&!(n instanceof Map)){const r=n[i.children]
|
|
118
|
+
if(Array.isArray(r))return[n]
|
|
119
|
+
const t=Object.keys(n)
|
|
120
|
+
if(t.length>0){let r=!0
|
|
121
|
+
for(const e of t){const t=n[e]
|
|
122
|
+
if(!t||"object"!=typeof t||Array.isArray(t)){r=!1
|
|
123
|
+
break}}if(r){const r=[]
|
|
124
|
+
for(const e of t){const t=n[e]
|
|
125
|
+
r.push({...t,[i.id]:e})}if(r.length>0)return I(r,e)}}return[{...n,[i.children]:[]}]}return[]}function w(n,e=r){const t=new Map
|
|
126
|
+
return function r(n){for(const o of n){const n=o[e.id]
|
|
127
|
+
if(null!=n){const{[e.children]:r,...i}=o
|
|
128
|
+
t.set(n,i)}const i=o[e.children]
|
|
129
|
+
Array.isArray(i)&&i.length>0&&r(i)}}(n),t}function L(n,e=r){const t=[]
|
|
130
|
+
return Array.isArray(n)&&0!==n.length?(function r(n,o=0){t[o]||(t[o]=[])
|
|
131
|
+
for(const i of n){const{[e.children]:n,...c}=i
|
|
132
|
+
t[o].push(c)
|
|
133
|
+
const s=i[e.children]
|
|
134
|
+
Array.isArray(s)&&s.length>0&&r(s,o+1)}}(n),t):[]}function P(r){return Array.isArray(r)&&0!==r.length&&1===r.length?r[0]:null}const W={mapTree:n,filterTree:e,findTree:t,pushTree:o,unshiftTree:i,popTree:c,shiftTree:s,someTree:f,everyTree:u,atTree:l,indexOfTree:a,atIndexOfTree:h,getNodeDepthMap:d,getNodeDepth:y,dedupTree:A,removeTree:p,forEachTree:T,isEmptyTreeData:g,isEmptySingleTreeData:x,getParentTree:b,getChildrenTree:v,getSiblingsTree:D,includesTree:N,isSingleTreeData:m,isTreeData:S,isValidTreeNode:M,isTreeNodeWithCircularCheck:j,isSafeTreeDepth:E,isLeafNode:O,isRootNode:k,convertToArrayTree:C,convertBackTree:I,convertToMapTree:w,convertToLevelArrayTree:L,convertToObjectTree:P}
|
|
135
|
+
exports.atIndexOfTree=h,exports.atTree=l,exports.convertBackTree=I,exports.convertToArrayTree=C,exports.convertToLevelArrayTree=L,exports.convertToMapTree=w,exports.convertToObjectTree=P,exports.dedupTree=A,exports.default=W,exports.everyTree=u,exports.filterTree=e,exports.findTree=t,exports.forEachTree=T,exports.getChildrenTree=v,exports.getNodeDepth=y,exports.getNodeDepthMap=d,exports.getParentTree=b,exports.getSiblingsTree=D,exports.includesTree=N,exports.indexOfTree=a,exports.isEmptySingleTreeData=x,exports.isEmptyTreeData=g,exports.isLeafNode=O,exports.isRootNode=k,exports.isSafeTreeDepth=E,exports.isSingleTreeData=m,exports.isTreeData=S,exports.isTreeNodeWithCircularCheck=j,exports.isValidTreeNode=M,exports.mapTree=n,exports.popTree=c,exports.pushTree=o,exports.removeTree=p,exports.shiftTree=s,exports.someTree=f,exports.unshiftTree=i
|
|
@@ -4,43 +4,43 @@ return function r(n){for(const o of n){i.push(t(o))
|
|
|
4
4
|
const n=o[e.children]
|
|
5
5
|
Array.isArray(n)&&n.length>0&&r(n)}}(n),i}function t(n,t,e=r){const i=[]
|
|
6
6
|
return function r(n){n.forEach((n,o)=>{t(n,o)&&i.push(n)
|
|
7
|
-
const
|
|
8
|
-
Array.isArray(
|
|
7
|
+
const c=n[e.children]
|
|
8
|
+
Array.isArray(c)&&c.length>0&&r(c)})}(n),i}function e(n,t,i=r){for(const r of n){if(t(r))return r
|
|
9
9
|
const n=r[i.children]
|
|
10
10
|
if(Array.isArray(n)&&n.length>0){const r=e(n,t,i)
|
|
11
11
|
if(r)return r}}return null}function i(n,t,e,i=r){return function r(n){for(const o of n){if(o[i.id]===t)return o[i.children]||(o[i.children]=[]),o[i.children].push(e),!0
|
|
12
12
|
const n=o[i.children]
|
|
13
13
|
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(n)}function o(n,t,e,i=r){return function r(n){for(const o of n){if(o[i.id]===t)return o[i.children]||(o[i.children]=[]),o[i.children].unshift(e),!0
|
|
14
14
|
const n=o[i.children]
|
|
15
|
-
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(n)}function u(n,t,e=r){return function r(n){for(const i of n){if(i[e.id]===t){const r=i[e.children]
|
|
16
|
-
return!!(Array.isArray(r)&&r.length>0)&&(r.pop(),!0)}const n=i[e.children]
|
|
17
15
|
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(n)}function c(n,t,e=r){return function r(n){for(const i of n){if(i[e.id]===t){const r=i[e.children]
|
|
16
|
+
return!!(Array.isArray(r)&&r.length>0)&&(r.pop(),!0)}const n=i[e.children]
|
|
17
|
+
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(n)}function f(n,t,e=r){return function r(n){for(const i of n){if(i[e.id]===t){const r=i[e.children]
|
|
18
18
|
return!!(Array.isArray(r)&&r.length>0)&&(r.shift(),!0)}const n=i[e.children]
|
|
19
|
-
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(n)}function
|
|
19
|
+
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(n)}function u(n,t,e=r){for(const r of n){if(t(r))return!0
|
|
20
20
|
const n=r[e.children]
|
|
21
|
-
if(Array.isArray(n)&&n.length>0&&
|
|
21
|
+
if(Array.isArray(n)&&n.length>0&&u(n,t,e))return!0}return!1}function s(n,t,e=r){for(const r of n){if(!t(r))return!1
|
|
22
22
|
const n=r[e.children]
|
|
23
|
-
if(Array.isArray(n)&&n.length>0&&!
|
|
23
|
+
if(Array.isArray(n)&&n.length>0&&!s(n,t,e))return!1}return!0}function l(n,t,e,i=r){const o=function r(n){for(const e of n){if(e[i.id]===t)return e
|
|
24
24
|
const n=e[i.children]
|
|
25
25
|
if(Array.isArray(n)&&n.length>0){const t=r(n)
|
|
26
26
|
if(t)return t}}return null}(n)
|
|
27
27
|
if(!o)return null
|
|
28
|
-
const
|
|
29
|
-
if(!Array.isArray(
|
|
30
|
-
const
|
|
31
|
-
return
|
|
32
|
-
if(
|
|
33
|
-
const
|
|
34
|
-
if(Array.isArray(
|
|
28
|
+
const c=o[i.children]
|
|
29
|
+
if(!Array.isArray(c)||0===c.length)return null
|
|
30
|
+
const f=e>=0?e:c.length+e
|
|
31
|
+
return f>=0&&f<c.length?c[f]:null}function a(n,t,e=r){return function r(n,i=[]){for(let o=0;o<n.length;o++){const c=n[o],f=[...i,o]
|
|
32
|
+
if(c[e.id]===t)return f
|
|
33
|
+
const u=c[e.children]
|
|
34
|
+
if(Array.isArray(u)&&u.length>0){const n=r(u,f)
|
|
35
35
|
if(n)return n}}return null}(n)}function h(n,t,e=r){if(!Array.isArray(t)||0===t.length)return null
|
|
36
36
|
let i=n
|
|
37
37
|
for(let r=0;r<t.length;r++){const n=t[r]
|
|
38
38
|
if(!Array.isArray(i)||n<0||n>=i.length)return null
|
|
39
39
|
const o=i[n]
|
|
40
40
|
if(r===t.length-1)return o
|
|
41
|
-
const
|
|
42
|
-
if(!Array.isArray(
|
|
43
|
-
i=
|
|
41
|
+
const c=o[e.children]
|
|
42
|
+
if(!Array.isArray(c))return null
|
|
43
|
+
i=c}return null}function y(n,t=r){const e={}
|
|
44
44
|
return function r(n,i=1){for(const o of n){e[o[t.id]]=i
|
|
45
45
|
const n=o[t.children]
|
|
46
46
|
Array.isArray(n)&&n.length>0&&r(n,i+1)}}(n),e}function d(n,t,e=r){return function r(n,i=1){for(const o of n){if(o[e.id]===t)return i
|
|
@@ -48,51 +48,86 @@ const n=o[e.children]
|
|
|
48
48
|
if(Array.isArray(n)&&n.length>0){const t=r(n,i+1)
|
|
49
49
|
if(null!==t)return t}}return null}(n)}function A(n,t,e=r){const i=new Set
|
|
50
50
|
return function r(n){const o=[]
|
|
51
|
-
for(const
|
|
51
|
+
for(const c of n){const n=c[t]
|
|
52
52
|
if(null!=n){if(i.has(n))continue
|
|
53
|
-
i.add(n)}const
|
|
54
|
-
Array.isArray(
|
|
53
|
+
i.add(n)}const f={...c},u=c[e.children]
|
|
54
|
+
Array.isArray(u)&&u.length>0&&(f[e.children]=r(u)),o.push(f)}return o}(n)}function g(n,t,e=r){return function r(n){for(let i=0;i<n.length;i++){const o=n[i]
|
|
55
55
|
if(o[e.id]===t)return n.splice(i,1),!0
|
|
56
|
-
const
|
|
57
|
-
if(Array.isArray(
|
|
56
|
+
const c=o[e.children]
|
|
57
|
+
if(Array.isArray(c)&&c.length>0&&r(c))return!0}return!1}(n)}function p(n,t,e=r){!function r(n){for(const i of n){t(i)
|
|
58
58
|
const n=i[e.children]
|
|
59
|
-
Array.isArray(n)&&n.length>0&&r(n)}}(n)}function
|
|
59
|
+
Array.isArray(n)&&n.length>0&&r(n)}}(n)}function T(r){return!Array.isArray(r)||0===r.length}function v(n,t=r){if(!m(n,t))return!0
|
|
60
60
|
const e=n[t.children]
|
|
61
|
-
return void 0===e
|
|
61
|
+
return void 0===e||!Array.isArray(e)||0===e.length}function b(n,t,e=r){const i=function r(n){for(const i of n){if(i[e.id]===t)return i
|
|
62
62
|
const n=i[e.children]
|
|
63
63
|
if(Array.isArray(n)&&n.length>0){const t=r(n)
|
|
64
64
|
if(null!==t)return t}}return null}(n)
|
|
65
65
|
if(!i)return[]
|
|
66
66
|
const o=i[e.children]
|
|
67
|
-
return Array.isArray(o)?o:[]}function
|
|
67
|
+
return Array.isArray(o)?o:[]}function j(n,t,e=r){const i=function r(n,i=null){for(const o of n){if(o[e.id]===t)return{node:o,parent:i}
|
|
68
68
|
const n=o[e.children]
|
|
69
69
|
if(Array.isArray(n)&&n.length>0){const t=r(n,o)
|
|
70
70
|
if(null!==t)return t}}return null}(n)
|
|
71
71
|
if(!i)return[]
|
|
72
72
|
if(null===i.parent)return n
|
|
73
73
|
const o=i.parent[e.children]
|
|
74
|
-
return Array.isArray(o)?o:[]}function
|
|
74
|
+
return Array.isArray(o)?o:[]}function D(n,t,e=r){return function r(n,i=null){for(const o of n){if(o[e.id]===t)return i
|
|
75
75
|
const n=o[e.children]
|
|
76
76
|
if(Array.isArray(n)&&n.length>0){const t=r(n,o)
|
|
77
|
-
if(null!==t)return t}}return null}(n)}function
|
|
77
|
+
if(null!==t)return t}}return null}(n)}function N(n,t,e=r){for(const r of n){if(r[e.id]===t)return!0
|
|
78
78
|
const n=r[e.children]
|
|
79
|
-
if(Array.isArray(n)&&n.length>0&&
|
|
79
|
+
if(Array.isArray(n)&&n.length>0&&N(n,t,e))return!0}return!1}function m(n,t=r){if(!n||"object"!=typeof n||Array.isArray(n))return!1
|
|
80
80
|
const e=n[t.children]
|
|
81
81
|
if(void 0!==e){if(null===e)return!1
|
|
82
82
|
if(!Array.isArray(e))return!1
|
|
83
|
-
for(const r of e)if(!
|
|
84
|
-
for(const r of n)if(!
|
|
85
|
-
return!0}function
|
|
83
|
+
for(const r of e)if(!m(r,t))return!1}return!0}function M(n,t=r){if(!Array.isArray(n))return!1
|
|
84
|
+
for(const r of n)if(!m(r,t))return!1
|
|
85
|
+
return!0}function S(n,t=r){if(!n||"object"!=typeof n||Array.isArray(n))return!1
|
|
86
86
|
const e=n[t.children]
|
|
87
|
-
return void 0===e||Array.isArray(e)}function
|
|
87
|
+
return void 0===e||Array.isArray(e)}function k(n,t=r,e=new WeakSet){if(!n||"object"!=typeof n||Array.isArray(n))return!1
|
|
88
88
|
if(e.has(n))return!1
|
|
89
89
|
e.add(n)
|
|
90
90
|
const i=n[t.children]
|
|
91
91
|
if(void 0!==i){if(null===i)return!1
|
|
92
92
|
if(!Array.isArray(i))return!1
|
|
93
|
-
for(const r of i)if(!
|
|
94
|
-
return function r(n,i){if(i>t)return!1
|
|
93
|
+
for(const r of i)if(!k(r,t,e))return!1}return!0}function E(n,t,e=r){return!(t<=0)&&function r(n,i){if(i>t)return!1
|
|
95
94
|
for(const t of n){const n=t[e.children]
|
|
96
|
-
if(Array.isArray(n)&&n.length>0&&!r(n,i+1))return!1}return!0}(n,1)}function
|
|
97
|
-
return void 0===e||!Array.isArray(e)||0===e.length}function
|
|
98
|
-
|
|
95
|
+
if(Array.isArray(n)&&n.length>0&&!r(n,i+1))return!1}return!0}(n,1)}function w(n,t=r){const e=n[t.children]
|
|
96
|
+
return void 0===e||!Array.isArray(e)||0===e.length}function I(n,t,e=r){return!!N(n,t,e)&&null===D(n,t,e)}function O(n,t=r){const e=[]
|
|
97
|
+
return function r(n){for(const i of n){const{[t.children]:n,...o}=i
|
|
98
|
+
e.push(o)
|
|
99
|
+
const c=i[t.children]
|
|
100
|
+
Array.isArray(c)&&c.length>0&&r(c)}}(n),e}function x(n,t={}){const{rootParentId:e=null,parentIdField:i="parentId",fieldNames:o=r}=t
|
|
101
|
+
if(Array.isArray(n)){if(0===n.length)return[]
|
|
102
|
+
const r=new Map
|
|
103
|
+
for(const t of n){const n=t[o.id]
|
|
104
|
+
if(null==n)continue
|
|
105
|
+
const e={...t,[o.children]:[]}
|
|
106
|
+
r.set(n,e)}const t=[]
|
|
107
|
+
for(const c of n){const n=c[o.id],f=c[i]
|
|
108
|
+
if(null==n)continue
|
|
109
|
+
const u=r.get(n)
|
|
110
|
+
if(u)if(f===e||null==f)t.push(u)
|
|
111
|
+
else{const n=r.get(f)
|
|
112
|
+
if(n){const r=n[o.children]
|
|
113
|
+
Array.isArray(r)?r.push(u):n[o.children]=[u]}else t.push(u)}}return t}if(n instanceof Map){if(0===n.size)return[]
|
|
114
|
+
const r=[]
|
|
115
|
+
return n.forEach((n,t)=>{r.push({...n,[o.id]:t})}),x(r,t)}if(n&&"object"==typeof n&&!Array.isArray(n)&&!(n instanceof Map)){const r=n[o.children]
|
|
116
|
+
if(Array.isArray(r))return[n]
|
|
117
|
+
const e=Object.keys(n)
|
|
118
|
+
if(e.length>0){let r=!0
|
|
119
|
+
for(const t of e){const e=n[t]
|
|
120
|
+
if(!e||"object"!=typeof e||Array.isArray(e)){r=!1
|
|
121
|
+
break}}if(r){const r=[]
|
|
122
|
+
for(const t of e){const e=n[t]
|
|
123
|
+
r.push({...e,[o.id]:t})}if(r.length>0)return x(r,t)}}return[{...n,[o.children]:[]}]}return[]}function C(n,t=r){const e=new Map
|
|
124
|
+
return function r(n){for(const i of n){const n=i[t.id]
|
|
125
|
+
if(null!=n){const{[t.children]:r,...o}=i
|
|
126
|
+
e.set(n,o)}const o=i[t.children]
|
|
127
|
+
Array.isArray(o)&&o.length>0&&r(o)}}(n),e}function L(n,t=r){const e=[]
|
|
128
|
+
return Array.isArray(n)&&0!==n.length?(function r(n,i=0){e[i]||(e[i]=[])
|
|
129
|
+
for(const o of n){const{[t.children]:n,...c}=o
|
|
130
|
+
e[i].push(c)
|
|
131
|
+
const f=o[t.children]
|
|
132
|
+
Array.isArray(f)&&f.length>0&&r(f,i+1)}}(n),e):[]}function P(r){return Array.isArray(r)&&0!==r.length&&1===r.length?r[0]:null}const W={mapTree:n,filterTree:t,findTree:e,pushTree:i,unshiftTree:o,popTree:c,shiftTree:f,someTree:u,everyTree:s,atTree:l,indexOfTree:a,atIndexOfTree:h,getNodeDepthMap:y,getNodeDepth:d,dedupTree:A,removeTree:g,forEachTree:p,isEmptyTreeData:T,isEmptySingleTreeData:v,getParentTree:D,getChildrenTree:b,getSiblingsTree:j,includesTree:N,isSingleTreeData:m,isTreeData:M,isValidTreeNode:S,isTreeNodeWithCircularCheck:k,isSafeTreeDepth:E,isLeafNode:w,isRootNode:I,convertToArrayTree:O,convertBackTree:x,convertToMapTree:C,convertToLevelArrayTree:L,convertToObjectTree:P}
|
|
133
|
+
export{h as atIndexOfTree,l as atTree,x as convertBackTree,O as convertToArrayTree,L as convertToLevelArrayTree,C as convertToMapTree,P as convertToObjectTree,A as dedupTree,W as default,s as everyTree,t as filterTree,e as findTree,p as forEachTree,b as getChildrenTree,d as getNodeDepth,y as getNodeDepthMap,D as getParentTree,j as getSiblingsTree,N as includesTree,a as indexOfTree,v as isEmptySingleTreeData,T as isEmptyTreeData,w as isLeafNode,I as isRootNode,E as isSafeTreeDepth,m as isSingleTreeData,M as isTreeData,k as isTreeNodeWithCircularCheck,S as isValidTreeNode,n as mapTree,c as popTree,i as pushTree,g as removeTree,f as shiftTree,u as someTree,o as unshiftTree}
|
|
@@ -5,17 +5,17 @@ return function r(n){for(const o of n){i.push(e(o))
|
|
|
5
5
|
const n=o[t.children]
|
|
6
6
|
Array.isArray(n)&&n.length>0&&r(n)}}(r),i}function t(r,e,t=n){const i=[]
|
|
7
7
|
return function r(n){n.forEach((n,o)=>{e(n,o)&&i.push(n)
|
|
8
|
-
const
|
|
9
|
-
Array.isArray(
|
|
8
|
+
const c=n[t.children]
|
|
9
|
+
Array.isArray(c)&&c.length>0&&r(c)})}(r),i}function i(r,e,t=n){for(const n of r){if(e(n))return n
|
|
10
10
|
const r=n[t.children]
|
|
11
11
|
if(Array.isArray(r)&&r.length>0){const n=i(r,e,t)
|
|
12
12
|
if(n)return n}}return null}function o(r,e,t,i=n){return function r(n){for(const o of n){if(o[i.id]===e)return o[i.children]||(o[i.children]=[]),o[i.children].push(t),!0
|
|
13
13
|
const n=o[i.children]
|
|
14
|
-
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(r)}function
|
|
14
|
+
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(r)}function c(r,e,t,i=n){return function r(n){for(const o of n){if(o[i.id]===e)return o[i.children]||(o[i.children]=[]),o[i.children].unshift(t),!0
|
|
15
15
|
const n=o[i.children]
|
|
16
|
-
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(r)}function
|
|
16
|
+
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(r)}function f(r,e,t=n){return function r(n){for(const i of n){if(i[t.id]===e){const r=i[t.children]
|
|
17
17
|
return!!(Array.isArray(r)&&r.length>0)&&(r.pop(),!0)}const n=i[t.children]
|
|
18
|
-
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(r)}function
|
|
18
|
+
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(r)}function u(r,e,t=n){return function r(n){for(const i of n){if(i[t.id]===e){const r=i[t.children]
|
|
19
19
|
return!!(Array.isArray(r)&&r.length>0)&&(r.shift(),!0)}const n=i[t.children]
|
|
20
20
|
if(Array.isArray(n)&&n.length>0&&r(n))return!0}return!1}(r)}function s(r,e,t=n){for(const n of r){if(e(n))return!0
|
|
21
21
|
const r=n[t.children]
|
|
@@ -26,22 +26,22 @@ const n=t[i.children]
|
|
|
26
26
|
if(Array.isArray(n)&&n.length>0){const e=r(n)
|
|
27
27
|
if(e)return e}}return null}(r)
|
|
28
28
|
if(!o)return null
|
|
29
|
-
const
|
|
30
|
-
if(!Array.isArray(
|
|
31
|
-
const
|
|
32
|
-
return
|
|
33
|
-
if(
|
|
34
|
-
const c
|
|
35
|
-
if(Array.isArray(
|
|
29
|
+
const c=o[i.children]
|
|
30
|
+
if(!Array.isArray(c)||0===c.length)return null
|
|
31
|
+
const f=t>=0?t:c.length+t
|
|
32
|
+
return f>=0&&f<c.length?c[f]:null}function h(r,e,t=n){return function r(n,i=[]){for(let o=0;o<n.length;o++){const c=n[o],f=[...i,o]
|
|
33
|
+
if(c[t.id]===e)return f
|
|
34
|
+
const u=c[t.children]
|
|
35
|
+
if(Array.isArray(u)&&u.length>0){const n=r(u,f)
|
|
36
36
|
if(n)return n}}return null}(r)}function d(r,e,t=n){if(!Array.isArray(e)||0===e.length)return null
|
|
37
37
|
let i=r
|
|
38
38
|
for(let r=0;r<e.length;r++){const n=e[r]
|
|
39
39
|
if(!Array.isArray(i)||n<0||n>=i.length)return null
|
|
40
40
|
const o=i[n]
|
|
41
41
|
if(r===e.length-1)return o
|
|
42
|
-
const
|
|
43
|
-
if(!Array.isArray(
|
|
44
|
-
i=
|
|
42
|
+
const c=o[t.children]
|
|
43
|
+
if(!Array.isArray(c))return null
|
|
44
|
+
i=c}return null}function y(r,e=n){const t={}
|
|
45
45
|
return function r(n,i=1){for(const o of n){t[o[e.id]]=i
|
|
46
46
|
const n=o[e.children]
|
|
47
47
|
Array.isArray(n)&&n.length>0&&r(n,i+1)}}(r),t}function A(r,e,t=n){return function r(n,i=1){for(const o of n){if(o[t.id]===e)return i
|
|
@@ -49,51 +49,86 @@ const n=o[t.children]
|
|
|
49
49
|
if(Array.isArray(n)&&n.length>0){const e=r(n,i+1)
|
|
50
50
|
if(null!==e)return e}}return null}(r)}function T(r,e,t=n){const i=new Set
|
|
51
51
|
return function r(n){const o=[]
|
|
52
|
-
for(const
|
|
52
|
+
for(const c of n){const n=c[e]
|
|
53
53
|
if(null!=n){if(i.has(n))continue
|
|
54
|
-
i.add(n)}const
|
|
55
|
-
Array.isArray(
|
|
54
|
+
i.add(n)}const f={...c},u=c[t.children]
|
|
55
|
+
Array.isArray(u)&&u.length>0&&(f[t.children]=r(u)),o.push(f)}return o}(r)}function g(r,e,t=n){return function r(n){for(let i=0;i<n.length;i++){const o=n[i]
|
|
56
56
|
if(o[t.id]===e)return n.splice(i,1),!0
|
|
57
|
-
const
|
|
58
|
-
if(Array.isArray(
|
|
57
|
+
const c=o[t.children]
|
|
58
|
+
if(Array.isArray(c)&&c.length>0&&r(c))return!0}return!1}(r)}function p(r,e,t=n){!function r(n){for(const i of n){e(i)
|
|
59
59
|
const n=i[t.children]
|
|
60
|
-
Array.isArray(n)&&n.length>0&&r(n)}}(r)}function
|
|
60
|
+
Array.isArray(n)&&n.length>0&&r(n)}}(r)}function v(r){return!Array.isArray(r)||0===r.length}function b(r,e=n){if(!j(r,e))return!0
|
|
61
61
|
const t=r[e.children]
|
|
62
|
-
return void 0===t
|
|
62
|
+
return void 0===t||!Array.isArray(t)||0===t.length}function m(r,e,t=n){const i=function r(n){for(const i of n){if(i[t.id]===e)return i
|
|
63
63
|
const n=i[t.children]
|
|
64
64
|
if(Array.isArray(n)&&n.length>0){const e=r(n)
|
|
65
65
|
if(null!==e)return e}}return null}(r)
|
|
66
66
|
if(!i)return[]
|
|
67
67
|
const o=i[t.children]
|
|
68
|
-
return Array.isArray(o)?o:[]}function
|
|
68
|
+
return Array.isArray(o)?o:[]}function D(r,e,t=n){const i=function r(n,i=null){for(const o of n){if(o[t.id]===e)return{node:o,parent:i}
|
|
69
69
|
const n=o[t.children]
|
|
70
70
|
if(Array.isArray(n)&&n.length>0){const e=r(n,o)
|
|
71
71
|
if(null!==e)return e}}return null}(r)
|
|
72
72
|
if(!i)return[]
|
|
73
73
|
if(null===i.parent)return r
|
|
74
74
|
const o=i.parent[t.children]
|
|
75
|
-
return Array.isArray(o)?o:[]}function
|
|
75
|
+
return Array.isArray(o)?o:[]}function N(r,e,t=n){return function r(n,i=null){for(const o of n){if(o[t.id]===e)return i
|
|
76
76
|
const n=o[t.children]
|
|
77
77
|
if(Array.isArray(n)&&n.length>0){const e=r(n,o)
|
|
78
|
-
if(null!==e)return e}}return null}(r)}function
|
|
78
|
+
if(null!==e)return e}}return null}(r)}function S(r,e,t=n){for(const n of r){if(n[t.id]===e)return!0
|
|
79
79
|
const r=n[t.children]
|
|
80
|
-
if(Array.isArray(r)&&r.length>0&&
|
|
80
|
+
if(Array.isArray(r)&&r.length>0&&S(r,e,t))return!0}return!1}function j(r,e=n){if(!r||"object"!=typeof r||Array.isArray(r))return!1
|
|
81
81
|
const t=r[e.children]
|
|
82
82
|
if(void 0!==t){if(null===t)return!1
|
|
83
83
|
if(!Array.isArray(t))return!1
|
|
84
|
-
for(const r of t)if(!
|
|
85
|
-
for(const n of r)if(!
|
|
86
|
-
return!0}function
|
|
84
|
+
for(const r of t)if(!j(r,e))return!1}return!0}function M(r,e=n){if(!Array.isArray(r))return!1
|
|
85
|
+
for(const n of r)if(!j(n,e))return!1
|
|
86
|
+
return!0}function E(r,e=n){if(!r||"object"!=typeof r||Array.isArray(r))return!1
|
|
87
87
|
const t=r[e.children]
|
|
88
|
-
return void 0===t||Array.isArray(t)}function
|
|
88
|
+
return void 0===t||Array.isArray(t)}function O(r,e=n,t=new WeakSet){if(!r||"object"!=typeof r||Array.isArray(r))return!1
|
|
89
89
|
if(t.has(r))return!1
|
|
90
90
|
t.add(r)
|
|
91
91
|
const i=r[e.children]
|
|
92
92
|
if(void 0!==i){if(null===i)return!1
|
|
93
93
|
if(!Array.isArray(i))return!1
|
|
94
|
-
for(const r of i)if(!
|
|
95
|
-
return function r(n,i){if(i>e)return!1
|
|
94
|
+
for(const r of i)if(!O(r,e,t))return!1}return!0}function k(r,e,t=n){return!(e<=0)&&function r(n,i){if(i>e)return!1
|
|
96
95
|
for(const e of n){const n=e[t.children]
|
|
97
|
-
if(Array.isArray(n)&&n.length>0&&!r(n,i+1))return!1}return!0}(r,1)}function
|
|
98
|
-
return void 0===t||!Array.isArray(t)||0===t.length}function
|
|
99
|
-
r
|
|
96
|
+
if(Array.isArray(n)&&n.length>0&&!r(n,i+1))return!1}return!0}(r,1)}function x(r,e=n){const t=r[e.children]
|
|
97
|
+
return void 0===t||!Array.isArray(t)||0===t.length}function C(r,e,t=n){return!!S(r,e,t)&&null===N(r,e,t)}function I(r,e=n){const t=[]
|
|
98
|
+
return function r(n){for(const i of n){const{[e.children]:n,...o}=i
|
|
99
|
+
t.push(o)
|
|
100
|
+
const c=i[e.children]
|
|
101
|
+
Array.isArray(c)&&c.length>0&&r(c)}}(r),t}function P(r,e={}){const{rootParentId:t=null,parentIdField:i="parentId",fieldNames:o=n}=e
|
|
102
|
+
if(Array.isArray(r)){if(0===r.length)return[]
|
|
103
|
+
const n=new Map
|
|
104
|
+
for(const e of r){const r=e[o.id]
|
|
105
|
+
if(null==r)continue
|
|
106
|
+
const t={...e,[o.children]:[]}
|
|
107
|
+
n.set(r,t)}const e=[]
|
|
108
|
+
for(const c of r){const r=c[o.id],f=c[i]
|
|
109
|
+
if(null==r)continue
|
|
110
|
+
const u=n.get(r)
|
|
111
|
+
if(u)if(f===t||null==f)e.push(u)
|
|
112
|
+
else{const r=n.get(f)
|
|
113
|
+
if(r){const n=r[o.children]
|
|
114
|
+
Array.isArray(n)?n.push(u):r[o.children]=[u]}else e.push(u)}}return e}if(r instanceof Map){if(0===r.size)return[]
|
|
115
|
+
const n=[]
|
|
116
|
+
return r.forEach((r,e)=>{n.push({...r,[o.id]:e})}),P(n,e)}if(r&&"object"==typeof r&&!Array.isArray(r)&&!(r instanceof Map)){const n=r[o.children]
|
|
117
|
+
if(Array.isArray(n))return[r]
|
|
118
|
+
const t=Object.keys(r)
|
|
119
|
+
if(t.length>0){let n=!0
|
|
120
|
+
for(const e of t){const t=r[e]
|
|
121
|
+
if(!t||"object"!=typeof t||Array.isArray(t)){n=!1
|
|
122
|
+
break}}if(n){const n=[]
|
|
123
|
+
for(const e of t){const t=r[e]
|
|
124
|
+
n.push({...t,[o.id]:e})}if(n.length>0)return P(n,e)}}return[{...r,[o.children]:[]}]}return[]}function w(r,e=n){const t=new Map
|
|
125
|
+
return function r(n){for(const i of n){const n=i[e.id]
|
|
126
|
+
if(null!=n){const{[e.children]:r,...o}=i
|
|
127
|
+
t.set(n,o)}const o=i[e.children]
|
|
128
|
+
Array.isArray(o)&&o.length>0&&r(o)}}(r),t}function L(r,e=n){const t=[]
|
|
129
|
+
return Array.isArray(r)&&0!==r.length?(function r(n,i=0){t[i]||(t[i]=[])
|
|
130
|
+
for(const o of n){const{[e.children]:n,...c}=o
|
|
131
|
+
t[i].push(c)
|
|
132
|
+
const f=o[e.children]
|
|
133
|
+
Array.isArray(f)&&f.length>0&&r(f,i+1)}}(r),t):[]}function W(r){return Array.isArray(r)&&0!==r.length&&1===r.length?r[0]:null}const B={mapTree:e,filterTree:t,findTree:i,pushTree:o,unshiftTree:c,popTree:f,shiftTree:u,someTree:s,everyTree:l,atTree:a,indexOfTree:h,atIndexOfTree:d,getNodeDepthMap:y,getNodeDepth:A,dedupTree:T,removeTree:g,forEachTree:p,isEmptyTreeData:v,isEmptySingleTreeData:b,getParentTree:N,getChildrenTree:m,getSiblingsTree:D,includesTree:S,isSingleTreeData:j,isTreeData:M,isValidTreeNode:E,isTreeNodeWithCircularCheck:O,isSafeTreeDepth:k,isLeafNode:x,isRootNode:C,convertToArrayTree:I,convertBackTree:P,convertToMapTree:w,convertToLevelArrayTree:L,convertToObjectTree:W}
|
|
134
|
+
r.atIndexOfTree=d,r.atTree=a,r.convertBackTree=P,r.convertToArrayTree=I,r.convertToLevelArrayTree=L,r.convertToMapTree=w,r.convertToObjectTree=W,r.dedupTree=T,r.default=B,r.everyTree=l,r.filterTree=t,r.findTree=i,r.forEachTree=p,r.getChildrenTree=m,r.getNodeDepth=A,r.getNodeDepthMap=y,r.getParentTree=N,r.getSiblingsTree=D,r.includesTree=S,r.indexOfTree=h,r.isEmptySingleTreeData=b,r.isEmptyTreeData=v,r.isLeafNode=x,r.isRootNode=C,r.isSafeTreeDepth=k,r.isSingleTreeData=j,r.isTreeData=M,r.isTreeNodeWithCircularCheck=O,r.isValidTreeNode=E,r.mapTree=e,r.popTree=f,r.pushTree=o,r.removeTree=g,r.shiftTree=u,r.someTree=s,r.unshiftTree=c,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})
|