"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("vue");function s(e){return typeof e=="string"||e instanceof RegExp||Array.isArray(e)}function i(e){return Array.isArray(e)||(e=[e]),e.filter(Boolean)}function p(e,r,u){const l=i(r.only),n=i(r.except);return Object.entries(e).filter(([t])=>g(t,l,n,u,r.filterNative)).reduce((t,[o,a])=>(t[o]=d=>a(d),t),{})}function f(e){if(e instanceof RegExp)return e;{const r=e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&").replace(/^\*/,".*").replace(/\*$/,".*");return r.includes(".*")?new RegExp(`^${r}$`):e}}function g(e,r,u,l,n){return r.length?r.some(t=>(t=f(t),l.includes(e)&&n!==!0?!0:t instanceof RegExp?t.test(e):t===e)):u.every(t=>(t=f(t),l.includes(e)&&n!==!0?!0:t instanceof RegExp?t.test(e)===!1:t!==e))}function y(e,r,u,l,n){return c.h(e,l,p(u,r,n))}const S=c.defineComponent({name:"ForwardSlots",inheritAttrs:!1,props:{slots:{type:Object,default:()=>({}),required:!0},only:{type:[String,RegExp,Array],default:()=>[],validator:s},except:{type:[String,RegExp,Array],default:()=>[],validator:s},inheritAttrs:{type:Boolean,default:!0},filterNative:{type:Boolean,default:!1}},setup(e,{slots:r,attrs:u}){const l=c.computed(()=>{var n;return((n=r.default)==null?void 0:n.call(r))||[]});return()=>l.value.map(n=>{const t=Object.keys(n.children??{}),o=Object.assign({},e.slots,n.children),a=e.inheritAttrs?u:{};return y(n,e,o,a,t)})}});exports.ForwardSlots=S;