"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFullKeyList=getFullKeyList,exports.calcRangeKeys=calcRangeKeys;var Record,_util=require("rc-tree/lib/util");function traverseNodesKey(e,n){((0,_util.getNodeChildren)(e)||[]).forEach(function(e){var r=e.key,t=e.props.children;!1!==n(r)&&traverseNodesKey(t,n)})}function getFullKeyList(e){var r=(0,_util.convertTreeToEntities)(e).keyEntities;return Object.keys(r)}function calcRangeKeys(e,r,t,n){var o=[],i=Record.None;if(t&&t===n)return[t];if(!t||!n)return[];return traverseNodesKey(e,function(e){if(i===Record.End)return!1;if(function(e){return e===t||e===n}(e)){if(o.push(e),i===Record.None)i=Record.Start;else if(i===Record.Start)return i=Record.End,!1}else i===Record.Start&&o.push(e);return-1!==r.indexOf(e)}),o}!function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"}(Record=Record||{});