(function(o,c){typeof exports=="object"&&typeof module!="undefined"?c(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],c):(o=typeof globalThis!="undefined"?globalThis:o||self,c(o.index={},o.Vue))})(this,function(o,c){"use strict";const P={align:{type:String,default:"top"},gutter:{type:[Number,Object,Array],default:0},justify:{type:String,default:"start"},wrap:{type:Boolean,default:!1}},p=Number,E={flex:[String,Number],order:p},S={offset:p,pull:p,push:p,span:p},a=[Number,Object],$={xs:a,sm:a,md:a,lg:a,xl:a,xxl:a},B={...E,...S,...$},T=["xxl","xl","lg","md","sm","xs"],w={xs:"screen and (max-width: 575px)",sm:"screen and (min-width: 576px)",md:"screen and (min-width: 768px)",lg:"screen and (min-width: 992px)",xl:"screen and (min-width: 1200px)",xxl:"screen and (min-width: 1600px)"},l=new Map;let x=-1;const g={},O={};function R(){l.forEach(e=>{e({...g})})}function _(){Object.keys(w).forEach(e=>{const s=window.matchMedia(w[e]);s.matches&&(g[e]=!0,R());const n=r=>{g[e]=r.matches,R()};s.addEventListener("change",n),O[e]={res:s,listener:n}})}function L(e){return l.size||_(),x+=1,l.set(x,e),e({...g}),x}function A(){Object.keys(w).forEach(e=>{const s=O[e];s.res.removeEventListener("change",s.listener)}),l.clear()}function U(e){l.delete(e),l.size===0&&A()}function b(e,s,n){let r=e;return s&&(r+=`__${s}`),n&&(r+=`--${n}`),r}function C(e,s=!1){const n=s?`.devui-${e}`:`devui-${e}`;return{b:()=>b(n),e:t=>t?b(n,t):"",m:t=>t?b(n,"",t):"",em:(t,u)=>t&&u?b(n,t,u):""}}var q="",j=c.defineComponent({name:"DRow",props:P,emits:[],setup(e,{slots:s}){const n=c.ref({}),r=C("row"),i=c.computed(()=>({[r.em("align",e.align)]:!0,[r.em("justify",e.justify)]:!0,[r.e("wrap")]:e.wrap}));let f;c.onMounted(()=>{f=L(t=>{n.value=t})}),c.onUnmounted(()=>{U(f)});const m=c.computed(()=>{if(!e.gutter)return{};let t=[0,0];Array.isArray(e.gutter)?t=e.gutter:typeof e.gutter=="number"?t=[e.gutter,0]:T.some(M=>{const h=e.gutter[M];return n.value[M]&&h?(typeof h=="number"?t=[h,0]:t=h,!0):!1});const u=`${(t[0]||0)/2}px`,z=`${(t[0]||0)/2}px`,y=`${(t[1]||0)/2}px`,K=`${(t[1]||0)/2}px`;return{paddingLeft:u,paddingRight:z,paddingTop:y,paddingBottom:K}});return c.provide("gutterStyle",m),()=>{var t;return c.createVNode("div",{class:[r.b(),i.value]},[(t=s.default)==null?void 0:t.call(s)])}}});const d=C("col");function V(e){return c.computed(()=>({[d.em("span",e.span?String(e.span):"")]:!0,[d.em("offset",e.offset?String(e.offset):"")]:!0,[d.em("pull",e.pull?String(e.pull):"")]:!0,[d.em("push",e.push?String(e.push):"")]:!0}))}function v(e){return` ${e.trim()}${e&&" "}`}function D(e){const s=Object.keys(e).filter(n=>n in $);return c.computed(()=>s.reduce((n,r)=>{const i=typeof e[r];if(i==="number")n=`${v(n)}${d.em(r,`span-${e[r]}`)}`;else if(i==="object"){const m=Object.keys(e[r]).filter(t=>t in S).reduce((t,u)=>{const y=e[r][u];return typeof y!="number"?"":(t=`${v(t)}${d.em(r,`${u}-${y}`)}`,t)},"");n=`${v(n)}${m}`}return n},""))}var F="",N=c.defineComponent({name:"DCol",props:B,setup(e,{slots:s}){const n=C("col"),r=u=>typeof u=="number"?`${u} ${u} auto`:/^\d+(\.\d+)?(px|rem|em|%)$/.test(u)?`0 0 ${u}`:u,i=V(e),f=D(e),m=c.computed(()=>({flex:r(e.flex),order:e.order})),t=c.inject("gutterStyle");return()=>{var u;return c.createVNode("div",{class:[n.b(),i.value,f.value],style:{...m.value,...t==null?void 0:t.value}},[(u=s.default)==null?void 0:u.call(s)])}}}),G={title:"Grid \u6805\u683C",category:"\u5E03\u5C40",status:"100%",install(e){e.component(j.name,j),e.component(N.name,N)}};o.Col=N,o.Row=j,o.colProps=B,o.colPropsBaseClass=S,o.colPropsBaseStyle=E,o.default=G,o.rowProps=P,o.screenSizes=$,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
