"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const g=require("vue"),c="__rc_cascader_search_mark__",S=(t,l,{label:e})=>l.some(i=>String(i[e]).toLowerCase().includes(t.toLowerCase())),C=({path:t,fieldNames:l})=>t.map(e=>e[l.label]).join(" / "),R=(t,l,e,i,_,h)=>g.computed(()=>{const{filter:p=S,render:b=C,limit:r=50,sort:o}=_.value,u=[];if(!t.value)return[];function f(s,v){s.forEach(n=>{if(!o&&r>0&&u.length>=r)return;const a=[...v,n],d=n[e.value.children];(!d||d.length===0||h.value)&&p(t.value,a,{label:e.value.label})&&u.push({...n,[e.value.label]:b({inputValue:t.value,path:a,prefixCls:i.value,fieldNames:e.value}),[c]:a}),d&&f(n[e.value.children],a)})}return f(l.value,[]),o&&u.sort((s,v)=>o(s[c],v[c],t.value,e.value)),r>0?u.slice(0,r):u});exports.SEARCH_MARK=c;exports.default=R;
