System.register([],function(_export,_context){"use strict";function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArray(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r);}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r);}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var _n3=0,F=function F(){};return{s:F,n:function n(){return _n3>=r.length?{done:!0}:{done:!1,value:r[_n3++]};},e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}function o(o){return!!o&&"object"==_typeof(o)&&"group"===o.type&&Array.isArray(o.options);}function n(n){if(!Array.isArray(n))return!1;var _iterator=_createForOfIteratorHelper(n),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _t=_step.value;if(o(_t))return!0;}}catch(err){_iterator.e(err);}finally{_iterator.f();}return!1;}function t(n){var r=0;var _iterator2=_createForOfIteratorHelper(n.options),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _i=_step2.value;o(_i)?r+=t(_i):r+=1;}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}return r;}function r(n){var r=[],_i2=function i(n,e,f){var _iterator3=_createForOfIteratorHelper(n),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var u=_step3.value;o(u)?(r.push({kind:"header",id:u.id,label:u.label,prefix:u.prefix,depth:e,optionCount:t(u)}),_i2(u.options,e+1,[].concat(_toConsumableArray(f),[u.id]))):r.push({kind:"option",item:u,depth:e,parentIds:f});}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}};return _i2(Array.isArray(n)?n:[],0,[]),r;}function i(o){var n=[];var _iterator4=_createForOfIteratorHelper(o),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _t2=_step4.value;"option"===_t2.kind&&n.push(_t2);}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}return n;}function e(n,e,f){var u=(e||"").trim().toLowerCase();if(!u){var _o=r(n);return{rows:_o,visibleOptionCount:i(_o).length};}var _s=function s(n,t){if(o(n)){var _o2=n.label.toLowerCase().includes(u)||t,_r=[];var _iterator5=_createForOfIteratorHelper(n.options),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var _t3=_step5.value;var _n=_s(_t3,_o2);_n&&_r.push(_n);}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}return 0!==_r.length||_o2?{kind:"group",group:n,children:_r}:null;}return t||function(o){return(f(o)||"").toString().toLowerCase().includes(u);}(n)?{kind:"option",item:n}:null;},c=[];var _iterator6=_createForOfIteratorHelper(n),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var _o3=_step6.value;var _n2=_s(_o3,!1);_n2&&c.push(_n2);}}catch(err){_iterator6.e(err);}finally{_iterator6.f();}var p=[],_d=function d(o,n,r){var _iterator7=_createForOfIteratorHelper(o),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _i3=_step7.value;_i3&&("group"===_i3.kind?(p.push({kind:"header",id:_i3.group.id,label:_i3.group.label,prefix:_i3.group.prefix,depth:n,optionCount:t(_i3.group)}),_d(_i3.children,n+1,[].concat(_toConsumableArray(r),[_i3.group.id]))):p.push({kind:"option",item:_i3.item,depth:n,parentIds:r}));}}catch(err){_iterator7.e(err);}finally{_iterator7.f();}};return _d(c,0,[]),{rows:p,visibleOptionCount:i(p).length};}_export({a:e,f:r,g:i,h:n});return{setters:[],execute:function execute(){}};});
//# sourceMappingURL=group-utils.cjs.js.map
